From da3db9a4f7e00790fa792c69004da542c87909ce Mon Sep 17 00:00:00 2001 From: Kornel Date: Tue, 3 Oct 2023 15:45:14 +0100 Subject: Rename MaybeUninit::write_slice #79995 --- library/core/src/io/borrowed_buf.rs | 2 +- library/core/src/mem/maybe_uninit.rs | 22 +++++++++++----------- library/core/src/net/display_buffer.rs | 2 +- library/core/tests/mem.rs | 16 ++++++++-------- library/proc_macro/src/bridge/arena.rs | 2 +- 5 files changed, 22 insertions(+), 22 deletions(-) diff --git a/library/core/src/io/borrowed_buf.rs b/library/core/src/io/borrowed_buf.rs index fe25cac280f..b7be7811c8b 100644 --- a/library/core/src/io/borrowed_buf.rs +++ b/library/core/src/io/borrowed_buf.rs @@ -289,7 +289,7 @@ impl<'a> BorrowedCursor<'a> { // SAFETY: we do not de-initialize any of the elements of the slice unsafe { - MaybeUninit::write_slice(&mut self.as_mut()[..buf.len()], buf); + MaybeUninit::copy_from_slice(&mut self.as_mut()[..buf.len()], buf); } // SAFETY: We just added the entire contents of buf to the filled section. diff --git a/library/core/src/mem/maybe_uninit.rs b/library/core/src/mem/maybe_uninit.rs index 8a4070ebd96..68c78b366c7 100644 --- a/library/core/src/mem/maybe_uninit.rs +++ b/library/core/src/mem/maybe_uninit.rs @@ -1019,7 +1019,7 @@ impl MaybeUninit { /// Copies the elements from `src` to `this`, returning a mutable reference to the now initialized contents of `this`. /// - /// If `T` does not implement `Copy`, use [`write_slice_cloned`] + /// If `T` does not implement `Copy`, use [`clone_from_slice`] /// /// This is similar to [`slice::copy_from_slice`]. /// @@ -1036,7 +1036,7 @@ impl MaybeUninit { /// let mut dst = [MaybeUninit::uninit(); 32]; /// let src = [0; 32]; /// - /// let init = MaybeUninit::write_slice(&mut dst, &src); + /// let init = MaybeUninit::copy_from_slice(&mut dst, &src); /// /// assert_eq!(init, src); /// ``` @@ -1048,7 +1048,7 @@ impl MaybeUninit { /// let mut vec = Vec::with_capacity(32); /// let src = [0; 16]; /// - /// MaybeUninit::write_slice(&mut vec.spare_capacity_mut()[..src.len()], &src); + /// MaybeUninit::copy_from_slice(&mut vec.spare_capacity_mut()[..src.len()], &src); /// /// // SAFETY: we have just copied all the elements of len into the spare capacity /// // the first src.len() elements of the vec are valid now. @@ -1059,9 +1059,9 @@ impl MaybeUninit { /// assert_eq!(vec, src); /// ``` /// - /// [`write_slice_cloned`]: MaybeUninit::write_slice_cloned + /// [`clone_from_slice`]: MaybeUninit::clone_from_slice #[unstable(feature = "maybe_uninit_write_slice", issue = "79995")] - pub fn write_slice<'a>(this: &'a mut [MaybeUninit], src: &[T]) -> &'a mut [T] + pub fn copy_from_slice<'a>(this: &'a mut [MaybeUninit], src: &[T]) -> &'a mut [T] where T: Copy, { @@ -1077,7 +1077,7 @@ impl MaybeUninit { /// Clones the elements from `src` to `this`, returning a mutable reference to the now initialized contents of `this`. /// Any already initialized elements will not be dropped. /// - /// If `T` implements `Copy`, use [`write_slice`] + /// If `T` implements `Copy`, use [`copy_from_slice`] /// /// This is similar to [`slice::clone_from_slice`] but does not drop existing elements. /// @@ -1096,7 +1096,7 @@ impl MaybeUninit { /// let mut dst = [MaybeUninit::uninit(), MaybeUninit::uninit(), MaybeUninit::uninit(), MaybeUninit::uninit(), MaybeUninit::uninit()]; /// let src = ["wibbly".to_string(), "wobbly".to_string(), "timey".to_string(), "wimey".to_string(), "stuff".to_string()]; /// - /// let init = MaybeUninit::write_slice_cloned(&mut dst, &src); + /// let init = MaybeUninit::clone_from_slice(&mut dst, &src); /// /// assert_eq!(init, src); /// ``` @@ -1108,7 +1108,7 @@ impl MaybeUninit { /// let mut vec = Vec::with_capacity(32); /// let src = ["rust", "is", "a", "pretty", "cool", "language"]; /// - /// MaybeUninit::write_slice_cloned(&mut vec.spare_capacity_mut()[..src.len()], &src); + /// MaybeUninit::clone_from_slice(&mut vec.spare_capacity_mut()[..src.len()], &src); /// /// // SAFETY: we have just cloned all the elements of len into the spare capacity /// // the first src.len() elements of the vec are valid now. @@ -1119,9 +1119,9 @@ impl MaybeUninit { /// assert_eq!(vec, src); /// ``` /// - /// [`write_slice`]: MaybeUninit::write_slice + /// [`copy_from_slice`]: MaybeUninit::copy_from_slice #[unstable(feature = "maybe_uninit_write_slice", issue = "79995")] - pub fn write_slice_cloned<'a>(this: &'a mut [MaybeUninit], src: &[T]) -> &'a mut [T] + pub fn clone_from_slice<'a>(this: &'a mut [MaybeUninit], src: &[T]) -> &'a mut [T] where T: Clone, { @@ -1264,7 +1264,7 @@ impl MaybeUninit { /// /// let mut uninit = [MaybeUninit::::uninit(), MaybeUninit::::uninit()]; /// let uninit_bytes = MaybeUninit::slice_as_bytes_mut(&mut uninit); - /// MaybeUninit::write_slice(uninit_bytes, &[0x12, 0x34, 0x56, 0x78]); + /// MaybeUninit::copy_from_slice(uninit_bytes, &[0x12, 0x34, 0x56, 0x78]); /// let vals = unsafe { MaybeUninit::slice_assume_init_ref(&uninit) }; /// if cfg!(target_endian = "little") { /// assert_eq!(vals, &[0x3412u16, 0x7856u16]); diff --git a/library/core/src/net/display_buffer.rs b/library/core/src/net/display_buffer.rs index 7aadf06e92f..b7e778605fc 100644 --- a/library/core/src/net/display_buffer.rs +++ b/library/core/src/net/display_buffer.rs @@ -30,7 +30,7 @@ impl fmt::Write for DisplayBuffer { let bytes = s.as_bytes(); if let Some(buf) = self.buf.get_mut(self.len..(self.len + bytes.len())) { - MaybeUninit::write_slice(buf, bytes); + MaybeUninit::copy_from_slice(buf, bytes); self.len += bytes.len(); Ok(()) } else { diff --git a/library/core/tests/mem.rs b/library/core/tests/mem.rs index 20498b16cb2..0f7fde74769 100644 --- a/library/core/tests/mem.rs +++ b/library/core/tests/mem.rs @@ -205,7 +205,7 @@ fn uninit_write_slice() { let mut dst = [MaybeUninit::new(255); 64]; let src = [0; 64]; - assert_eq!(MaybeUninit::write_slice(&mut dst, &src), &src); + assert_eq!(MaybeUninit::copy_from_slice(&mut dst, &src), &src); } #[test] @@ -214,7 +214,7 @@ fn uninit_write_slice_panic_lt() { let mut dst = [MaybeUninit::uninit(); 64]; let src = [0; 32]; - MaybeUninit::write_slice(&mut dst, &src); + MaybeUninit::copy_from_slice(&mut dst, &src); } #[test] @@ -223,7 +223,7 @@ fn uninit_write_slice_panic_gt() { let mut dst = [MaybeUninit::uninit(); 64]; let src = [0; 128]; - MaybeUninit::write_slice(&mut dst, &src); + MaybeUninit::copy_from_slice(&mut dst, &src); } #[test] @@ -231,7 +231,7 @@ fn uninit_clone_from_slice() { let mut dst = [MaybeUninit::new(255); 64]; let src = [0; 64]; - assert_eq!(MaybeUninit::write_slice_cloned(&mut dst, &src), &src); + assert_eq!(MaybeUninit::clone_from_slice(&mut dst, &src), &src); } #[test] @@ -240,7 +240,7 @@ fn uninit_write_slice_cloned_panic_lt() { let mut dst = [MaybeUninit::uninit(); 64]; let src = [0; 32]; - MaybeUninit::write_slice_cloned(&mut dst, &src); + MaybeUninit::clone_from_slice(&mut dst, &src); } #[test] @@ -249,7 +249,7 @@ fn uninit_write_slice_cloned_panic_gt() { let mut dst = [MaybeUninit::uninit(); 64]; let src = [0; 128]; - MaybeUninit::write_slice_cloned(&mut dst, &src); + MaybeUninit::clone_from_slice(&mut dst, &src); } #[test] @@ -290,7 +290,7 @@ fn uninit_write_slice_cloned_mid_panic() { ]; let err = panic::catch_unwind(panic::AssertUnwindSafe(|| { - MaybeUninit::write_slice_cloned(&mut dst, &src); + MaybeUninit::clone_from_slice(&mut dst, &src); })); drop(src); @@ -322,7 +322,7 @@ fn uninit_write_slice_cloned_no_drop() { let mut dst = [MaybeUninit::uninit()]; let src = [Bomb]; - MaybeUninit::write_slice_cloned(&mut dst, &src); + MaybeUninit::clone_from_slice(&mut dst, &src); forget(src); } diff --git a/library/proc_macro/src/bridge/arena.rs b/library/proc_macro/src/bridge/arena.rs index fa72d2816eb..7c6891c90d0 100644 --- a/library/proc_macro/src/bridge/arena.rs +++ b/library/proc_macro/src/bridge/arena.rs @@ -104,7 +104,7 @@ impl Arena { pub(crate) fn alloc_str<'a>(&'a self, string: &str) -> &'a mut str { let alloc = self.alloc_raw(string.len()); - let bytes = MaybeUninit::write_slice(alloc, string.as_bytes()); + let bytes = MaybeUninit::copy_from_slice(alloc, string.as_bytes()); // SAFETY: we convert from `&str` to `&[u8]`, clone it into the arena, // and immediately convert the clone back to `&str`. -- cgit 1.4.1-3-g733a5 From 28af00c611164bfbb242b2184bd3168ac1e57d2b Mon Sep 17 00:00:00 2001 From: bjorn3 <17426603+bjorn3@users.noreply.github.com> Date: Thu, 8 Jun 2023 21:22:23 +0000 Subject: Support configuring the set of codegen backends to build per host triple This allows building the compiler itself with one backend while using another backend at runtime. For example this allows compiling rustc to wasm using LLVM, while using Cranelift at runtime to produce actual code. Cranelift can't compile to wasm, but is perfectly capable of running on wasm. LLVM can compile to wasm, but can't run on wasm. [^1] [^1]: The prototype of this still requires a couple of other patches. --- config.example.toml | 5 ++++ src/bootstrap/src/core/build_steps/compile.rs | 16 ++++++------ src/bootstrap/src/core/build_steps/dist.rs | 4 +-- src/bootstrap/src/core/build_steps/test.rs | 7 +++--- src/bootstrap/src/core/builder.rs | 5 ++-- src/bootstrap/src/core/config/config.rs | 35 ++++++++++++++++++++++++--- src/bootstrap/src/core/sanity.rs | 32 ++++++++++++------------ src/bootstrap/src/lib.rs | 7 +++--- 8 files changed, 74 insertions(+), 37 deletions(-) diff --git a/config.example.toml b/config.example.toml index a5ef4022d39..098811195d7 100644 --- a/config.example.toml +++ b/config.example.toml @@ -829,6 +829,11 @@ # target triples containing `-none`, `nvptx`, `switch`, or `-uefi`. #no-std = (bool) +# This is an array of the codegen backends that will be compiled a rustc +# compiled for this target, overriding the global rust.codegen-backends option. +# See that option for more info. +#codegen-backends = rust.codegen-backends (array) + # ============================================================================= # Distribution options # diff --git a/src/bootstrap/src/core/build_steps/compile.rs b/src/bootstrap/src/core/build_steps/compile.rs index e06bc3fb09a..b2a9a89fff6 100644 --- a/src/bootstrap/src/core/build_steps/compile.rs +++ b/src/bootstrap/src/core/build_steps/compile.rs @@ -1003,7 +1003,7 @@ impl Step for Rustc { pub fn rustc_cargo(builder: &Builder<'_>, cargo: &mut Cargo, target: TargetSelection, stage: u32) { cargo .arg("--features") - .arg(builder.rustc_features(builder.kind)) + .arg(builder.rustc_features(builder.kind, target)) .arg("--manifest-path") .arg(builder.src.join("compiler/rustc/Cargo.toml")); @@ -1060,7 +1060,7 @@ pub fn rustc_cargo_env( cargo.env("CFG_OMIT_GIT_HASH", "1"); } - if let Some(backend) = builder.config.default_codegen_backend() { + if let Some(backend) = builder.config.default_codegen_backend(target) { cargo.env("CFG_DEFAULT_CODEGEN_BACKEND", backend); } @@ -1101,7 +1101,7 @@ pub fn rustc_cargo_env( // build. If we are in a check build we still go ahead here presuming we've // detected that LLVM is already built and good to go which helps prevent // busting caches (e.g. like #71152). - if builder.config.llvm_enabled() { + if builder.config.llvm_enabled(target) { let building_is_expensive = crate::core::build_steps::llvm::prebuilt_llvm_config(builder, target).is_err(); // `top_stage == stage` might be false for `check --stage 1`, if we are building the stage 1 compiler @@ -1250,7 +1250,7 @@ pub(crate) const CODEGEN_BACKEND_PREFIX: &str = "rustc_codegen_"; fn is_codegen_cfg_needed(path: &TaskPath, run: &RunConfig<'_>) -> bool { if path.path.to_str().unwrap().contains(&CODEGEN_BACKEND_PREFIX) { let mut needs_codegen_backend_config = true; - for &backend in &run.builder.config.rust_codegen_backends { + for &backend in run.builder.config.codegen_backends(run.target) { if path .path .to_str() @@ -1287,7 +1287,7 @@ impl Step for CodegenBackend { return; } - for &backend in &run.builder.config.rust_codegen_backends { + for &backend in run.builder.config.codegen_backends(run.target) { if backend == "llvm" { continue; // Already built as part of rustc } @@ -1387,7 +1387,7 @@ fn copy_codegen_backends_to_sysroot( return; } - for backend in builder.config.rust_codegen_backends.iter() { + for backend in builder.config.codegen_backends(target) { if backend == "llvm" { continue; // Already built as part of rustc } @@ -1694,7 +1694,7 @@ impl Step for Assemble { // to not fail while linking the artifacts. build_compiler.stage = actual_stage; - for &backend in builder.config.rust_codegen_backends.iter() { + for &backend in builder.config.codegen_backends(target_compiler.host) { if backend == "llvm" { continue; // Already built as part of rustc } @@ -1779,7 +1779,7 @@ impl Step for Assemble { } } - if builder.config.rust_codegen_backends.contains(&INTERNER.intern_str("llvm")) { + if builder.config.llvm_enabled(target_compiler.host) { let llvm::LlvmResult { llvm_config, .. } = builder.ensure(llvm::Llvm { target: target_compiler.host }); if !builder.config.dry_run() && builder.config.llvm_tools_enabled { diff --git a/src/bootstrap/src/core/build_steps/dist.rs b/src/bootstrap/src/core/build_steps/dist.rs index f50026368da..6d56492e41b 100644 --- a/src/bootstrap/src/core/build_steps/dist.rs +++ b/src/bootstrap/src/core/build_steps/dist.rs @@ -1278,7 +1278,7 @@ impl Step for CodegenBackend { } fn make_run(run: RunConfig<'_>) { - for &backend in &run.builder.config.rust_codegen_backends { + for &backend in run.builder.config.codegen_backends(run.target) { if backend == "llvm" { continue; // Already built as part of rustc } @@ -1302,7 +1302,7 @@ impl Step for CodegenBackend { return None; } - if !builder.config.rust_codegen_backends.contains(&self.backend) { + if !builder.config.codegen_backends(self.compiler.host).contains(&self.backend) { return None; } diff --git a/src/bootstrap/src/core/build_steps/test.rs b/src/bootstrap/src/core/build_steps/test.rs index 04728e2e00d..e0e94f194e0 100644 --- a/src/bootstrap/src/core/build_steps/test.rs +++ b/src/bootstrap/src/core/build_steps/test.rs @@ -1841,7 +1841,7 @@ NOTE: if you're sure you want to do this, please open an issue as to why. In the let mut llvm_components_passed = false; let mut copts_passed = false; - if builder.config.llvm_enabled() { + if builder.config.llvm_enabled(compiler.host) { let llvm::LlvmResult { llvm_config, .. } = builder.ensure(llvm::Llvm { target: builder.config.build }); if !builder.config.dry_run() { @@ -3155,7 +3155,8 @@ impl Step for CodegenCranelift { return; } - if !builder.config.rust_codegen_backends.contains(&INTERNER.intern_str("cranelift")) { + if !builder.config.codegen_backends(run.target).contains(&INTERNER.intern_str("cranelift")) + { builder.info("cranelift not in rust.codegen-backends. skipping"); return; } @@ -3277,7 +3278,7 @@ impl Step for CodegenGCC { return; } - if !builder.config.rust_codegen_backends.contains(&INTERNER.intern_str("gcc")) { + if !builder.config.codegen_backends(run.target).contains(&INTERNER.intern_str("gcc")) { builder.info("gcc not in rust.codegen-backends. skipping"); return; } diff --git a/src/bootstrap/src/core/builder.rs b/src/bootstrap/src/core/builder.rs index 3770d0687b2..0ececcdcacc 100644 --- a/src/bootstrap/src/core/builder.rs +++ b/src/bootstrap/src/core/builder.rs @@ -1230,7 +1230,7 @@ impl<'a> Builder<'a> { /// Note that this returns `None` if LLVM is disabled, or if we're in a /// check build or dry-run, where there's no need to build all of LLVM. fn llvm_config(&self, target: TargetSelection) -> Option { - if self.config.llvm_enabled() && self.kind != Kind::Check && !self.config.dry_run() { + if self.config.llvm_enabled(target) && self.kind != Kind::Check && !self.config.dry_run() { let llvm::LlvmResult { llvm_config, .. } = self.ensure(llvm::Llvm { target }); if llvm_config.is_file() { return Some(llvm_config); @@ -2113,7 +2113,8 @@ impl<'a> Builder<'a> { }; if let Some(limit) = limit { - if stage == 0 || self.config.default_codegen_backend().unwrap_or_default() == "llvm" + if stage == 0 + || self.config.default_codegen_backend(target).unwrap_or_default() == "llvm" { rustflags.arg(&format!("-Cllvm-args=-import-instr-limit={limit}")); } diff --git a/src/bootstrap/src/core/config/config.rs b/src/bootstrap/src/core/config/config.rs index fcdd742e69c..5969ddfdf90 100644 --- a/src/bootstrap/src/core/config/config.rs +++ b/src/bootstrap/src/core/config/config.rs @@ -581,6 +581,7 @@ pub struct Target { pub wasi_root: Option, pub qemu_rootfs: Option, pub no_std: bool, + pub codegen_backends: Option>>, } impl Target { @@ -1139,6 +1140,7 @@ define_config! { wasi_root: Option = "wasi-root", qemu_rootfs: Option = "qemu-rootfs", no_std: Option = "no-std", + codegen_backends: Option> = "codegen-backends", } } @@ -1845,6 +1847,24 @@ impl Config { target.profiler = cfg.profiler; target.rpath = cfg.rpath; + if let Some(ref backends) = cfg.codegen_backends { + let available_backends = vec!["llvm", "cranelift", "gcc"]; + + target.codegen_backends = Some(backends.iter().map(|s| { + if let Some(backend) = s.strip_prefix(CODEGEN_BACKEND_PREFIX) { + if available_backends.contains(&backend) { + panic!("Invalid value '{s}' for 'target.{triple}.codegen-backends'. Instead, please use '{backend}'."); + } else { + println!("HELP: '{s}' for 'target.{triple}.codegen-backends' might fail. \ + Codegen backends are mostly defined without the '{CODEGEN_BACKEND_PREFIX}' prefix. \ + In this case, it would be referred to as '{backend}'."); + } + } + + INTERNER.intern_str(s) + }).collect()); + } + config.target_config.insert(TargetSelection::from_user(&triple), target); } } @@ -2227,8 +2247,8 @@ impl Config { self.target_config.get(&target).map(|t| t.rpath).flatten().unwrap_or(self.rust_rpath) } - pub fn llvm_enabled(&self) -> bool { - self.rust_codegen_backends.contains(&INTERNER.intern_str("llvm")) + pub fn llvm_enabled(&self, target: TargetSelection) -> bool { + self.codegen_backends(target).contains(&INTERNER.intern_str("llvm")) } pub fn llvm_libunwind(&self, target: TargetSelection) -> LlvmLibunwind { @@ -2247,8 +2267,15 @@ impl Config { self.submodules.unwrap_or(rust_info.is_managed_git_subrepository()) } - pub fn default_codegen_backend(&self) -> Option> { - self.rust_codegen_backends.get(0).cloned() + pub fn codegen_backends(&self, target: TargetSelection) -> &[Interned] { + self.target_config + .get(&target) + .and_then(|cfg| cfg.codegen_backends.as_deref()) + .unwrap_or(&self.rust_codegen_backends) + } + + pub fn default_codegen_backend(&self, target: TargetSelection) -> Option> { + self.codegen_backends(target).get(0).cloned() } pub fn git_config(&self) -> GitConfig<'_> { diff --git a/src/bootstrap/src/core/sanity.rs b/src/bootstrap/src/core/sanity.rs index 5f1ca5de74a..1dce8d8ac71 100644 --- a/src/bootstrap/src/core/sanity.rs +++ b/src/bootstrap/src/core/sanity.rs @@ -16,7 +16,6 @@ use std::path::PathBuf; use std::process::Command; use crate::core::config::Target; -use crate::utils::cache::INTERNER; use crate::utils::helpers::output; use crate::Build; @@ -88,19 +87,19 @@ pub fn check(build: &mut Build) { } // We need cmake, but only if we're actually building LLVM or sanitizers. - let building_llvm = build.config.rust_codegen_backends.contains(&INTERNER.intern_str("llvm")) - && build - .hosts - .iter() - .map(|host| { - build + let building_llvm = build + .hosts + .iter() + .map(|host| { + build.config.llvm_enabled(*host) + && build .config .target_config .get(host) .map(|config| config.llvm_config.is_none()) .unwrap_or(true) - }) - .any(|build_llvm_ourselves| build_llvm_ourselves); + }) + .any(|build_llvm_ourselves| build_llvm_ourselves); let need_cmake = building_llvm || build.config.any_sanitizers_to_build(); if need_cmake && cmd_finder.maybe_have("cmake").is_none() { @@ -190,13 +189,16 @@ than building it. if !build.config.dry_run() { cmd_finder.must_have(build.cxx(*host).unwrap()); } - } - if build.config.rust_codegen_backends.contains(&INTERNER.intern_str("llvm")) { - // Externally configured LLVM requires FileCheck to exist - let filecheck = build.llvm_filecheck(build.build); - if !filecheck.starts_with(&build.out) && !filecheck.exists() && build.config.codegen_tests { - panic!("FileCheck executable {filecheck:?} does not exist"); + if build.config.llvm_enabled(*host) { + // Externally configured LLVM requires FileCheck to exist + let filecheck = build.llvm_filecheck(build.build); + if !filecheck.starts_with(&build.out) + && !filecheck.exists() + && build.config.codegen_tests + { + panic!("FileCheck executable {filecheck:?} does not exist"); + } } } diff --git a/src/bootstrap/src/lib.rs b/src/bootstrap/src/lib.rs index 1726e7aacbc..6a7bba2463d 100644 --- a/src/bootstrap/src/lib.rs +++ b/src/bootstrap/src/lib.rs @@ -734,12 +734,12 @@ impl Build { } /// Gets the space-separated set of activated features for the compiler. - fn rustc_features(&self, kind: Kind) -> String { + fn rustc_features(&self, kind: Kind, target: TargetSelection) -> String { let mut features = vec![]; if self.config.jemalloc { features.push("jemalloc"); } - if self.config.llvm_enabled() || kind == Kind::Check { + if self.config.llvm_enabled(target) || kind == Kind::Check { features.push("llvm"); } // keep in sync with `bootstrap/compile.rs:rustc_cargo_env` @@ -1560,7 +1560,8 @@ impl Build { || target .map(|t| self.config.profiler_enabled(t)) .unwrap_or_else(|| self.config.any_profiler_enabled())) - && (dep != "rustc_codegen_llvm" || self.config.llvm_enabled()) + && (dep != "rustc_codegen_llvm" + || self.config.hosts.iter().any(|host| self.config.llvm_enabled(*host))) { list.push(*dep); } -- cgit 1.4.1-3-g733a5 From f4e279f2db0aa8235c59c1da1dc146b1274a63e4 Mon Sep 17 00:00:00 2001 From: bjorn3 <17426603+bjorn3@users.noreply.github.com> Date: Sat, 27 Jan 2024 11:39:43 +0100 Subject: Add bootstrap changelog entry --- src/bootstrap/src/utils/change_tracker.rs | 5 +++++ 1 file changed, 5 insertions(+) diff --git a/src/bootstrap/src/utils/change_tracker.rs b/src/bootstrap/src/utils/change_tracker.rs index 327b4674acf..3c076f80f51 100644 --- a/src/bootstrap/src/utils/change_tracker.rs +++ b/src/bootstrap/src/utils/change_tracker.rs @@ -111,4 +111,9 @@ pub const CONFIG_CHANGE_HISTORY: &[ChangeInfo] = &[ severity: ChangeSeverity::Warning, summary: "A new `optimized-compiler-builtins` option has been introduced. Whether to build llvm's `compiler-rt` from source is no longer implicitly controlled by git state. See the PR for more details.", }, + ChangeInfo { + change_id: 120348, + severity: ChangeSeverity::Info, + summary: "New option `target..codegen-backends` added to config.toml.", + }, ]; -- cgit 1.4.1-3-g733a5 From fee4992fb160ae59f0a35bb5333b801e6c12ac9d Mon Sep 17 00:00:00 2001 From: Kornel Date: Wed, 31 Jan 2024 23:26:50 +0000 Subject: Make File::read_to_end less special Follow-up to #117925 --- library/std/src/fs.rs | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/library/std/src/fs.rs b/library/std/src/fs.rs index 80d369eb067..25ed51f1233 100644 --- a/library/std/src/fs.rs +++ b/library/std/src/fs.rs @@ -776,14 +776,14 @@ impl Read for &File { // Reserves space in the buffer based on the file size when available. fn read_to_end(&mut self, buf: &mut Vec) -> io::Result { let size = buffer_capacity_required(self); - buf.try_reserve_exact(size.unwrap_or(0)).map_err(|_| io::ErrorKind::OutOfMemory)?; + buf.try_reserve(size.unwrap_or(0)).map_err(|_| io::ErrorKind::OutOfMemory)?; io::default_read_to_end(self, buf, size) } // Reserves space in the buffer based on the file size when available. fn read_to_string(&mut self, buf: &mut String) -> io::Result { let size = buffer_capacity_required(self); - buf.try_reserve_exact(size.unwrap_or(0)).map_err(|_| io::ErrorKind::OutOfMemory)?; + buf.try_reserve(size.unwrap_or(0)).map_err(|_| io::ErrorKind::OutOfMemory)?; io::default_read_to_string(self, buf, size) } } -- cgit 1.4.1-3-g733a5 From 0a42a540c603846aa22f29f378a61a64c9d4383e Mon Sep 17 00:00:00 2001 From: BenoĆ®t du Garreau Date: Wed, 7 Feb 2024 16:21:16 +0100 Subject: Make `io::BorrowedCursor::advance` safe This also keeps the old `advance` method under `advance_unchecked` name. This makes pattern like `std::io::default_read_buf` safe to write. --- library/core/src/io/borrowed_buf.rs | 22 +++++++++++++++++++++- library/core/tests/io/borrowed_buf.rs | 16 ++++------------ library/std/src/io/mod.rs | 12 ++---------- library/std/src/io/tests.rs | 2 +- library/std/src/io/util.rs | 2 +- library/std/src/sys/pal/hermit/net.rs | 2 +- library/std/src/sys/pal/solid/fs.rs | 2 +- library/std/src/sys/pal/solid/net.rs | 2 +- library/std/src/sys/pal/unix/fd.rs | 2 +- library/std/src/sys/pal/unix/net.rs | 2 +- library/std/src/sys/pal/wasi/fd.rs | 2 +- library/std/src/sys/pal/windows/handle.rs | 2 +- library/std/src/sys/pal/windows/net.rs | 2 +- library/std/src/sys/pal/windows/pipe.rs | 2 +- 14 files changed, 38 insertions(+), 34 deletions(-) diff --git a/library/core/src/io/borrowed_buf.rs b/library/core/src/io/borrowed_buf.rs index fe25cac280f..161bb4b6a1f 100644 --- a/library/core/src/io/borrowed_buf.rs +++ b/library/core/src/io/borrowed_buf.rs @@ -233,6 +233,26 @@ impl<'a> BorrowedCursor<'a> { &mut self.buf.buf[self.buf.filled..] } + /// Advance the cursor by asserting that `n` bytes have been filled. + /// + /// After advancing, the `n` bytes are no longer accessible via the cursor and can only be + /// accessed via the underlying buffer. I.e., the buffer's filled portion grows by `n` elements + /// and its unfilled portion (and the capacity of this cursor) shrinks by `n` elements. + /// + /// If less than `n` bytes initialized (by the cursor's point of view), `set_init` should be + /// called first. + /// + /// # Panics + /// + /// Panics if there are less than `n` bytes initialized. + #[inline] + pub fn advance(&mut self, n: usize) -> &mut Self { + assert!(self.buf.init >= self.buf.filled + n); + + self.buf.filled += n; + self + } + /// Advance the cursor by asserting that `n` bytes have been filled. /// /// After advancing, the `n` bytes are no longer accessible via the cursor and can only be @@ -244,7 +264,7 @@ impl<'a> BorrowedCursor<'a> { /// The caller must ensure that the first `n` bytes of the cursor have been properly /// initialised. #[inline] - pub unsafe fn advance(&mut self, n: usize) -> &mut Self { + pub unsafe fn advance_unchecked(&mut self, n: usize) -> &mut Self { self.buf.filled += n; self.buf.init = cmp::max(self.buf.init, self.buf.filled); self diff --git a/library/core/tests/io/borrowed_buf.rs b/library/core/tests/io/borrowed_buf.rs index 69511e49acd..a5dd4e52577 100644 --- a/library/core/tests/io/borrowed_buf.rs +++ b/library/core/tests/io/borrowed_buf.rs @@ -40,9 +40,7 @@ fn advance_filled() { let buf: &mut [_] = &mut [0; 16]; let mut rbuf: BorrowedBuf<'_> = buf.into(); - unsafe { - rbuf.unfilled().advance(1); - } + rbuf.unfilled().advance(1); assert_eq!(rbuf.filled().len(), 1); assert_eq!(rbuf.unfilled().capacity(), 15); @@ -53,9 +51,7 @@ fn clear() { let buf: &mut [_] = &mut [255; 16]; let mut rbuf: BorrowedBuf<'_> = buf.into(); - unsafe { - rbuf.unfilled().advance(16); - } + rbuf.unfilled().advance(16); assert_eq!(rbuf.filled().len(), 16); assert_eq!(rbuf.unfilled().capacity(), 0); @@ -79,9 +75,7 @@ fn set_init() { assert_eq!(rbuf.init_len(), 8); - unsafe { - rbuf.unfilled().advance(4); - } + rbuf.unfilled().advance(4); unsafe { rbuf.set_init(2); @@ -153,9 +147,7 @@ fn cursor_set_init() { assert_eq!(rbuf.unfilled().uninit_mut().len(), 8); assert_eq!(unsafe { rbuf.unfilled().as_mut() }.len(), 16); - unsafe { - rbuf.unfilled().advance(4); - } + rbuf.unfilled().advance(4); unsafe { rbuf.unfilled().set_init(2); diff --git a/library/std/src/io/mod.rs b/library/std/src/io/mod.rs index a238e74ed95..f842a0b6d55 100644 --- a/library/std/src/io/mod.rs +++ b/library/std/src/io/mod.rs @@ -578,15 +578,7 @@ where F: FnOnce(&mut [u8]) -> Result, { let n = read(cursor.ensure_init().init_mut())?; - assert!( - n <= cursor.capacity(), - "read should not return more bytes than there is capacity for in the read buffer" - ); - unsafe { - // SAFETY: we initialised using `ensure_init` so there is no uninit data to advance to - // and we have checked that the read amount is not over capacity (see #120603) - cursor.advance(n); - } + cursor.advance(n); Ok(()) } @@ -2915,7 +2907,7 @@ impl Read for Take { unsafe { // SAFETY: filled bytes have been filled and therefore initialized - buf.advance(filled); + buf.advance_unchecked(filled); // SAFETY: new_init bytes of buf's unfilled buffer have been initialized buf.set_init(new_init); } diff --git a/library/std/src/io/tests.rs b/library/std/src/io/tests.rs index 33e9d8efed5..fd7e51688cd 100644 --- a/library/std/src/io/tests.rs +++ b/library/std/src/io/tests.rs @@ -655,7 +655,7 @@ fn bench_take_read_buf(b: &mut test::Bencher) { // Issue #120603 #[test] -#[should_panic = "read should not return more bytes than there is capacity for in the read buffer"] +#[should_panic] fn read_buf_broken_read() { struct MalformedRead; diff --git a/library/std/src/io/util.rs b/library/std/src/io/util.rs index a04bc481146..16eaed15e72 100644 --- a/library/std/src/io/util.rs +++ b/library/std/src/io/util.rs @@ -198,7 +198,7 @@ impl Read for Repeat { // SAFETY: the entire unfilled portion of buf has been initialized unsafe { - buf.advance(remaining); + buf.advance_unchecked(remaining); } Ok(()) diff --git a/library/std/src/sys/pal/hermit/net.rs b/library/std/src/sys/pal/hermit/net.rs index 3cf63fccf2e..871a2ccdfa4 100644 --- a/library/std/src/sys/pal/hermit/net.rs +++ b/library/std/src/sys/pal/hermit/net.rs @@ -156,7 +156,7 @@ impl Socket { ) })?; unsafe { - buf.advance(ret as usize); + buf.advance_unchecked(ret as usize); } Ok(()) } diff --git a/library/std/src/sys/pal/solid/fs.rs b/library/std/src/sys/pal/solid/fs.rs index 6c66b93a3e1..a6c1336109a 100644 --- a/library/std/src/sys/pal/solid/fs.rs +++ b/library/std/src/sys/pal/solid/fs.rs @@ -388,7 +388,7 @@ impl File { // Safety: `num_bytes_read` bytes were written to the unfilled // portion of the buffer - cursor.advance(num_bytes_read); + cursor.advance_unchecked(num_bytes_read); Ok(()) } diff --git a/library/std/src/sys/pal/solid/net.rs b/library/std/src/sys/pal/solid/net.rs index 1c310648a3d..6ea874e509e 100644 --- a/library/std/src/sys/pal/solid/net.rs +++ b/library/std/src/sys/pal/solid/net.rs @@ -209,7 +209,7 @@ impl Socket { netc::recv(self.as_raw_fd(), buf.as_mut().as_mut_ptr().cast(), buf.capacity(), flags) })?; unsafe { - buf.advance(ret as usize); + buf.advance_unchecked(ret as usize); } Ok(()) } diff --git a/library/std/src/sys/pal/unix/fd.rs b/library/std/src/sys/pal/unix/fd.rs index bf1fb3123c4..a1c0321876f 100644 --- a/library/std/src/sys/pal/unix/fd.rs +++ b/library/std/src/sys/pal/unix/fd.rs @@ -161,7 +161,7 @@ impl FileDesc { // Safety: `ret` bytes were written to the initialized portion of the buffer unsafe { - cursor.advance(ret as usize); + cursor.advance_unchecked(ret as usize); } Ok(()) } diff --git a/library/std/src/sys/pal/unix/net.rs b/library/std/src/sys/pal/unix/net.rs index 8f537de7026..1b6a6bb2c5c 100644 --- a/library/std/src/sys/pal/unix/net.rs +++ b/library/std/src/sys/pal/unix/net.rs @@ -272,7 +272,7 @@ impl Socket { ) })?; unsafe { - buf.advance(ret as usize); + buf.advance_unchecked(ret as usize); } Ok(()) } diff --git a/library/std/src/sys/pal/wasi/fd.rs b/library/std/src/sys/pal/wasi/fd.rs index d7295a799da..8966e4b80ad 100644 --- a/library/std/src/sys/pal/wasi/fd.rs +++ b/library/std/src/sys/pal/wasi/fd.rs @@ -60,7 +60,7 @@ impl WasiFd { }]; match wasi::fd_read(self.as_raw_fd() as wasi::Fd, &bufs) { Ok(n) => { - buf.advance(n); + buf.advance_unchecked(n); Ok(()) } Err(e) => Err(err2io(e)), diff --git a/library/std/src/sys/pal/windows/handle.rs b/library/std/src/sys/pal/windows/handle.rs index c4495f81a5a..3f85bb0a099 100644 --- a/library/std/src/sys/pal/windows/handle.rs +++ b/library/std/src/sys/pal/windows/handle.rs @@ -121,7 +121,7 @@ impl Handle { Ok(read) => { // Safety: `read` bytes were written to the initialized portion of the buffer unsafe { - cursor.advance(read); + cursor.advance_unchecked(read); } Ok(()) } diff --git a/library/std/src/sys/pal/windows/net.rs b/library/std/src/sys/pal/windows/net.rs index c34e01e000a..e37fbe9ef83 100644 --- a/library/std/src/sys/pal/windows/net.rs +++ b/library/std/src/sys/pal/windows/net.rs @@ -234,7 +234,7 @@ impl Socket { } } _ => { - unsafe { buf.advance(result as usize) }; + unsafe { buf.advance_unchecked(result as usize) }; Ok(()) } } diff --git a/library/std/src/sys/pal/windows/pipe.rs b/library/std/src/sys/pal/windows/pipe.rs index 7624e746f5c..fd10df82d8b 100644 --- a/library/std/src/sys/pal/windows/pipe.rs +++ b/library/std/src/sys/pal/windows/pipe.rs @@ -273,7 +273,7 @@ impl AnonPipe { Err(e) => Err(e), Ok(n) => { unsafe { - buf.advance(n); + buf.advance_unchecked(n); } Ok(()) } -- cgit 1.4.1-3-g733a5 From 24e2cf01d36039c7e808a1b95688eb25f606cb2a Mon Sep 17 00:00:00 2001 From: Markus Reiter Date: Thu, 1 Feb 2024 23:41:19 +0100 Subject: Make `NonZero::get` generic. --- library/core/src/num/nonzero.rs | 41 +++++++++++++++++++++-------------------- 1 file changed, 21 insertions(+), 20 deletions(-) diff --git a/library/core/src/num/nonzero.rs b/library/core/src/num/nonzero.rs index 193f2fa8731..576178c3ce4 100644 --- a/library/core/src/num/nonzero.rs +++ b/library/core/src/num/nonzero.rs @@ -164,6 +164,27 @@ where } } } + + /// Returns the contained value as a primitive type. + #[stable(feature = "nonzero", since = "1.28.0")] + #[rustc_const_stable(feature = "const_nonzero_get", since = "1.34.0")] + #[inline] + pub const fn get(self) -> T { + // FIXME: This can be changed to simply `self.0` once LLVM supports `!range` metadata + // for function arguments: https://github.com/llvm/llvm-project/issues/76628 + // + // Rustc can set range metadata only if it loads `self` from + // memory somewhere. If the value of `self` was from by-value argument + // of some not-inlined function, LLVM don't have range metadata + // to understand that the value cannot be zero. + match Self::new(self.0) { + Some(Self(n)) => n, + None => { + // SAFETY: `NonZero` is guaranteed to only contain non-zero values, so this is unreachable. + unsafe { intrinsics::unreachable() } + } + } + } } macro_rules! impl_nonzero_fmt { @@ -225,26 +246,6 @@ macro_rules! nonzero_integer { pub type $Ty = NonZero<$Int>; impl $Ty { - /// Returns the value as a primitive type. - #[$stability] - #[inline] - #[rustc_const_stable(feature = "const_nonzero_get", since = "1.34.0")] - pub const fn get(self) -> $Int { - // FIXME: Remove this after LLVM supports `!range` metadata for function - // arguments https://github.com/llvm/llvm-project/issues/76628 - // - // Rustc can set range metadata only if it loads `self` from - // memory somewhere. If the value of `self` was from by-value argument - // of some not-inlined function, LLVM don't have range metadata - // to understand that the value cannot be zero. - - // SAFETY: It is an invariant of this type. - unsafe { - intrinsics::assume(self.0 != 0); - } - self.0 - } - /// The size of this non-zero integer type in bits. /// #[doc = concat!("This value is equal to [`", stringify!($Int), "::BITS`].")] -- cgit 1.4.1-3-g733a5 From 0eee945680754e30f0f40fb051f98ffc7b1d8c62 Mon Sep 17 00:00:00 2001 From: Oli Scherer Date: Tue, 30 Jan 2024 14:20:22 +0000 Subject: Make `is_intrinsic` query return the intrinsic name --- compiler/rustc_borrowck/src/type_check/mod.rs | 13 +++---------- compiler/rustc_const_eval/src/const_eval/fn_queries.rs | 2 +- compiler/rustc_const_eval/src/interpret/terminator.rs | 2 +- .../rustc_const_eval/src/transform/check_consts/check.rs | 2 +- compiler/rustc_hir_typeck/src/callee.rs | 3 +-- compiler/rustc_hir_typeck/src/coercion.rs | 2 +- compiler/rustc_infer/src/infer/error_reporting/suggest.rs | 6 +++--- compiler/rustc_lint/src/builtin.rs | 2 +- compiler/rustc_metadata/src/rmeta/decoder.rs | 4 ++-- compiler/rustc_metadata/src/rmeta/decoder/cstore_impl.rs | 2 +- compiler/rustc_metadata/src/rmeta/encoder.rs | 2 +- compiler/rustc_metadata/src/rmeta/mod.rs | 2 +- compiler/rustc_middle/src/query/erase.rs | 1 + compiler/rustc_middle/src/query/mod.rs | 4 ++-- compiler/rustc_middle/src/ty/util.rs | 13 +++++++++---- compiler/rustc_mir_dataflow/src/rustc_peek.rs | 3 +-- compiler/rustc_mir_transform/src/cost_checker.rs | 2 +- compiler/rustc_mir_transform/src/instsimplify.rs | 5 ++--- compiler/rustc_mir_transform/src/lib.rs | 3 +-- compiler/rustc_mir_transform/src/lower_intrinsics.rs | 3 +-- compiler/rustc_ty_utils/src/instance.rs | 3 ++- src/tools/clippy/clippy_utils/src/qualify_min_const_fn.rs | 2 +- 22 files changed, 38 insertions(+), 43 deletions(-) diff --git a/compiler/rustc_borrowck/src/type_check/mod.rs b/compiler/rustc_borrowck/src/type_check/mod.rs index cfb46f3ac8a..08b6aead728 100644 --- a/compiler/rustc_borrowck/src/type_check/mod.rs +++ b/compiler/rustc_borrowck/src/type_check/mod.rs @@ -1650,16 +1650,9 @@ impl<'a, 'tcx> TypeChecker<'a, 'tcx> { let func_ty = func.ty(body, self.infcx.tcx); if let ty::FnDef(def_id, _) = *func_ty.kind() { - if self.tcx().is_intrinsic(def_id) { - match self.tcx().item_name(def_id) { - sym::simd_shuffle => { - if !matches!(args[2], Spanned { node: Operand::Constant(_), .. }) { - self.tcx() - .dcx() - .emit_err(SimdShuffleLastConst { span: term.source_info.span }); - } - } - _ => {} + if let Some(sym::simd_shuffle) = self.tcx().intrinsic(def_id) { + if !matches!(args[2], Spanned { node: Operand::Constant(_), .. }) { + self.tcx().dcx().emit_err(SimdShuffleLastConst { span: term.source_info.span }); } } } diff --git a/compiler/rustc_const_eval/src/const_eval/fn_queries.rs b/compiler/rustc_const_eval/src/const_eval/fn_queries.rs index dbc29e607ef..ddad6683afb 100644 --- a/compiler/rustc_const_eval/src/const_eval/fn_queries.rs +++ b/compiler/rustc_const_eval/src/const_eval/fn_queries.rs @@ -49,7 +49,7 @@ fn constness(tcx: TyCtxt<'_>, def_id: LocalDefId) -> hir::Constness { hir::Node::ForeignItem(hir::ForeignItem { kind: hir::ForeignItemKind::Fn(..), .. }) => { // Intrinsics use `rustc_const_{un,}stable` attributes to indicate constness. All other // foreign items cannot be evaluated at compile-time. - let is_const = if tcx.is_intrinsic(def_id) { + let is_const = if tcx.intrinsic(def_id).is_some() { tcx.lookup_const_stability(def_id).is_some() } else { false diff --git a/compiler/rustc_const_eval/src/interpret/terminator.rs b/compiler/rustc_const_eval/src/interpret/terminator.rs index ff20fc5092c..0a130d4bc49 100644 --- a/compiler/rustc_const_eval/src/interpret/terminator.rs +++ b/compiler/rustc_const_eval/src/interpret/terminator.rs @@ -526,7 +526,7 @@ impl<'mir, 'tcx: 'mir, M: Machine<'mir, 'tcx>> InterpCx<'mir, 'tcx, M> { match instance.def { ty::InstanceDef::Intrinsic(def_id) => { - assert!(self.tcx.is_intrinsic(def_id)); + assert!(self.tcx.intrinsic(def_id).is_some()); // FIXME: Should `InPlace` arguments be reset to uninit? M::call_intrinsic( self, diff --git a/compiler/rustc_const_eval/src/transform/check_consts/check.rs b/compiler/rustc_const_eval/src/transform/check_consts/check.rs index 28dc69859fd..1ee7c905d91 100644 --- a/compiler/rustc_const_eval/src/transform/check_consts/check.rs +++ b/compiler/rustc_const_eval/src/transform/check_consts/check.rs @@ -859,7 +859,7 @@ impl<'tcx> Visitor<'tcx> for Checker<'_, 'tcx> { // We do not use `const` modifiers for intrinsic "functions", as intrinsics are // `extern` functions, and these have no way to get marked `const`. So instead we // use `rustc_const_(un)stable` attributes to mean that the intrinsic is `const` - if self.ccx.is_const_stable_const_fn() || tcx.is_intrinsic(callee) { + if self.ccx.is_const_stable_const_fn() || tcx.intrinsic(callee).is_some() { self.check_op(ops::FnCallUnstable(callee, None)); return; } diff --git a/compiler/rustc_hir_typeck/src/callee.rs b/compiler/rustc_hir_typeck/src/callee.rs index c4271c66e1c..27614634c6b 100644 --- a/compiler/rustc_hir_typeck/src/callee.rs +++ b/compiler/rustc_hir_typeck/src/callee.rs @@ -540,8 +540,7 @@ impl<'a, 'tcx> FnCtxt<'a, 'tcx> { if let Some(def_id) = def_id && self.tcx.def_kind(def_id) == hir::def::DefKind::Fn - && self.tcx.is_intrinsic(def_id) - && self.tcx.item_name(def_id) == sym::const_eval_select + && matches!(self.tcx.intrinsic(def_id), Some(sym::const_eval_select)) { let fn_sig = self.resolve_vars_if_possible(fn_sig); for idx in 0..=1 { diff --git a/compiler/rustc_hir_typeck/src/coercion.rs b/compiler/rustc_hir_typeck/src/coercion.rs index 549ad44d7e3..355fc61e795 100644 --- a/compiler/rustc_hir_typeck/src/coercion.rs +++ b/compiler/rustc_hir_typeck/src/coercion.rs @@ -864,7 +864,7 @@ impl<'f, 'tcx> Coerce<'f, 'tcx> { let a_sig = a.fn_sig(self.tcx); if let ty::FnDef(def_id, _) = *a.kind() { // Intrinsics are not coercible to function pointers - if self.tcx.is_intrinsic(def_id) { + if self.tcx.intrinsic(def_id).is_some() { return Err(TypeError::IntrinsicCast); } diff --git a/compiler/rustc_infer/src/infer/error_reporting/suggest.rs b/compiler/rustc_infer/src/infer/error_reporting/suggest.rs index 248e1c0fcc8..81c531fad55 100644 --- a/compiler/rustc_infer/src/infer/error_reporting/suggest.rs +++ b/compiler/rustc_infer/src/infer/error_reporting/suggest.rs @@ -313,7 +313,7 @@ impl<'tcx> TypeErrCtxt<'_, 'tcx> { if !self.same_type_modulo_infer(*found_sig, *expected_sig) || !sig.is_suggestable(self.tcx, true) - || self.tcx.is_intrinsic(*did) + || self.tcx.intrinsic(*did).is_some() { return; } @@ -345,8 +345,8 @@ impl<'tcx> TypeErrCtxt<'_, 'tcx> { if !self.same_type_modulo_infer(*found_sig, *expected_sig) || !found_sig.is_suggestable(self.tcx, true) || !expected_sig.is_suggestable(self.tcx, true) - || self.tcx.is_intrinsic(*did1) - || self.tcx.is_intrinsic(*did2) + || self.tcx.intrinsic(*did1).is_some() + || self.tcx.intrinsic(*did2).is_some() { return; } diff --git a/compiler/rustc_lint/src/builtin.rs b/compiler/rustc_lint/src/builtin.rs index 6ee1d1ca924..faa35f51cd4 100644 --- a/compiler/rustc_lint/src/builtin.rs +++ b/compiler/rustc_lint/src/builtin.rs @@ -1227,7 +1227,7 @@ impl<'tcx> LateLintPass<'tcx> for MutableTransmutes { } fn def_id_is_transmute(cx: &LateContext<'_>, def_id: DefId) -> bool { - cx.tcx.is_intrinsic(def_id) && cx.tcx.item_name(def_id) == sym::transmute + matches!(cx.tcx.intrinsic(def_id), Some(sym::transmute)) } } } diff --git a/compiler/rustc_metadata/src/rmeta/decoder.rs b/compiler/rustc_metadata/src/rmeta/decoder.rs index 11cb1bb6d9e..a738fc86a06 100644 --- a/compiler/rustc_metadata/src/rmeta/decoder.rs +++ b/compiler/rustc_metadata/src/rmeta/decoder.rs @@ -1746,8 +1746,8 @@ impl<'a, 'tcx> CrateMetadataRef<'a> { self.root.tables.attr_flags.get(self, index) } - fn get_is_intrinsic(self, index: DefIndex) -> bool { - self.root.tables.is_intrinsic.get(self, index) + fn get_intrinsic(self, index: DefIndex) -> bool { + self.root.tables.intrinsic.get(self, index) } fn get_doc_link_resolutions(self, index: DefIndex) -> DocLinkResMap { diff --git a/compiler/rustc_metadata/src/rmeta/decoder/cstore_impl.rs b/compiler/rustc_metadata/src/rmeta/decoder/cstore_impl.rs index 988388edfd5..1faddee2e98 100644 --- a/compiler/rustc_metadata/src/rmeta/decoder/cstore_impl.rs +++ b/compiler/rustc_metadata/src/rmeta/decoder/cstore_impl.rs @@ -348,7 +348,7 @@ provide! { tcx, def_id, other, cdata, cdata.get_stability_implications(tcx).iter().copied().collect() } stripped_cfg_items => { cdata.get_stripped_cfg_items(cdata.cnum, tcx) } - is_intrinsic => { cdata.get_is_intrinsic(def_id.index) } + intrinsic => { cdata.get_intrinsic(def_id.index).then(|| tcx.item_name(def_id)) } defined_lang_items => { cdata.get_lang_items(tcx) } diagnostic_items => { cdata.get_diagnostic_items() } missing_lang_items => { cdata.get_missing_lang_items(tcx) } diff --git a/compiler/rustc_metadata/src/rmeta/encoder.rs b/compiler/rustc_metadata/src/rmeta/encoder.rs index 6ca1973396f..f3213185449 100644 --- a/compiler/rustc_metadata/src/rmeta/encoder.rs +++ b/compiler/rustc_metadata/src/rmeta/encoder.rs @@ -1411,7 +1411,7 @@ impl<'a, 'tcx> EncodeContext<'a, 'tcx> { if let DefKind::Fn | DefKind::AssocFn = def_kind { self.tables.asyncness.set_some(def_id.index, tcx.asyncness(def_id)); record_array!(self.tables.fn_arg_names[def_id] <- tcx.fn_arg_names(def_id)); - self.tables.is_intrinsic.set(def_id.index, tcx.is_intrinsic(def_id)); + self.tables.intrinsic.set(def_id.index, tcx.intrinsic(def_id).is_some()); } if let DefKind::TyParam = def_kind { let default = self.tcx.object_lifetime_default(def_id); diff --git a/compiler/rustc_metadata/src/rmeta/mod.rs b/compiler/rustc_metadata/src/rmeta/mod.rs index 8205e995c19..49c97b8c2e6 100644 --- a/compiler/rustc_metadata/src/rmeta/mod.rs +++ b/compiler/rustc_metadata/src/rmeta/mod.rs @@ -375,7 +375,7 @@ macro_rules! define_tables { define_tables! { - defaulted: - is_intrinsic: Table, + intrinsic: Table, is_macro_rules: Table, is_type_alias_impl_trait: Table, type_alias_is_lazy: Table, diff --git a/compiler/rustc_middle/src/query/erase.rs b/compiler/rustc_middle/src/query/erase.rs index a272a51f327..92ce3854b92 100644 --- a/compiler/rustc_middle/src/query/erase.rs +++ b/compiler/rustc_middle/src/query/erase.rs @@ -240,6 +240,7 @@ trivial! { Option, Option, Option, + Option, Result<(), rustc_errors::ErrorGuaranteed>, Result<(), rustc_middle::traits::query::NoSolution>, Result, diff --git a/compiler/rustc_middle/src/query/mod.rs b/compiler/rustc_middle/src/query/mod.rs index 938fba0ed09..16d3a0bd0cf 100644 --- a/compiler/rustc_middle/src/query/mod.rs +++ b/compiler/rustc_middle/src/query/mod.rs @@ -1753,8 +1753,8 @@ rustc_queries! { separate_provide_extern } /// Whether the function is an intrinsic - query is_intrinsic(def_id: DefId) -> bool { - desc { |tcx| "checking whether `{}` is an intrinsic", tcx.def_path_str(def_id) } + query intrinsic(def_id: DefId) -> Option { + desc { |tcx| "fetch intrinsic name if `{}` is an intrinsic", tcx.def_path_str(def_id) } separate_provide_extern } /// Returns the lang items defined in another crate by loading it from metadata. diff --git a/compiler/rustc_middle/src/ty/util.rs b/compiler/rustc_middle/src/ty/util.rs index 4feaeb0dd05..626ea0342e5 100644 --- a/compiler/rustc_middle/src/ty/util.rs +++ b/compiler/rustc_middle/src/ty/util.rs @@ -18,7 +18,7 @@ use rustc_hir::def_id::{CrateNum, DefId, LocalDefId}; use rustc_index::bit_set::GrowableBitSet; use rustc_macros::HashStable; use rustc_session::Limit; -use rustc_span::sym; +use rustc_span::{sym, Symbol}; use rustc_target::abi::{Integer, IntegerType, Primitive, Size}; use rustc_target::spec::abi::Abi; use smallvec::SmallVec; @@ -1550,8 +1550,13 @@ pub fn is_doc_notable_trait(tcx: TyCtxt<'_>, def_id: DefId) -> bool { } /// Determines whether an item is an intrinsic by Abi. -pub fn is_intrinsic(tcx: TyCtxt<'_>, def_id: LocalDefId) -> bool { - matches!(tcx.fn_sig(def_id).skip_binder().abi(), Abi::RustIntrinsic | Abi::PlatformIntrinsic) +pub fn intrinsic(tcx: TyCtxt<'_>, def_id: LocalDefId) -> Option { + if matches!(tcx.fn_sig(def_id).skip_binder().abi(), Abi::RustIntrinsic | Abi::PlatformIntrinsic) + { + Some(tcx.item_name(def_id.into())) + } else { + None + } } pub fn provide(providers: &mut Providers) { @@ -1559,7 +1564,7 @@ pub fn provide(providers: &mut Providers) { reveal_opaque_types_in_bounds, is_doc_hidden, is_doc_notable_trait, - is_intrinsic, + intrinsic, ..*providers } } diff --git a/compiler/rustc_mir_dataflow/src/rustc_peek.rs b/compiler/rustc_mir_dataflow/src/rustc_peek.rs index cbbf3548c07..1575f31e75e 100644 --- a/compiler/rustc_mir_dataflow/src/rustc_peek.rs +++ b/compiler/rustc_mir_dataflow/src/rustc_peek.rs @@ -202,8 +202,7 @@ impl PeekCall { &terminator.kind { if let ty::FnDef(def_id, fn_args) = *func.const_.ty().kind() { - let name = tcx.item_name(def_id); - if !tcx.is_intrinsic(def_id) || name != sym::rustc_peek { + if tcx.intrinsic(def_id)? != sym::rustc_peek { return None; } diff --git a/compiler/rustc_mir_transform/src/cost_checker.rs b/compiler/rustc_mir_transform/src/cost_checker.rs index 79bed960b95..2c692c95003 100644 --- a/compiler/rustc_mir_transform/src/cost_checker.rs +++ b/compiler/rustc_mir_transform/src/cost_checker.rs @@ -70,7 +70,7 @@ impl<'tcx> Visitor<'tcx> for CostChecker<'_, 'tcx> { TerminatorKind::Call { func: Operand::Constant(ref f), unwind, .. } => { let fn_ty = self.instantiate_ty(f.const_.ty()); self.cost += if let ty::FnDef(def_id, _) = *fn_ty.kind() - && tcx.is_intrinsic(def_id) + && tcx.intrinsic(def_id).is_some() { // Don't give intrinsics the extra penalty for calls INSTR_COST diff --git a/compiler/rustc_mir_transform/src/instsimplify.rs b/compiler/rustc_mir_transform/src/instsimplify.rs index f65eb5cbea9..81cf31e6bf4 100644 --- a/compiler/rustc_mir_transform/src/instsimplify.rs +++ b/compiler/rustc_mir_transform/src/instsimplify.rs @@ -329,9 +329,8 @@ fn resolve_rust_intrinsic<'tcx>( func_ty: Ty<'tcx>, ) -> Option<(Symbol, GenericArgsRef<'tcx>)> { if let ty::FnDef(def_id, args) = *func_ty.kind() { - if tcx.is_intrinsic(def_id) { - return Some((tcx.item_name(def_id), args)); - } + let name = tcx.intrinsic(def_id)?; + return Some((name, args)); } None } diff --git a/compiler/rustc_mir_transform/src/lib.rs b/compiler/rustc_mir_transform/src/lib.rs index 72d9ffe8ca5..524d62546dd 100644 --- a/compiler/rustc_mir_transform/src/lib.rs +++ b/compiler/rustc_mir_transform/src/lib.rs @@ -161,8 +161,7 @@ fn remap_mir_for_const_eval_select<'tcx>( fn_span, .. } if let ty::FnDef(def_id, _) = *const_.ty().kind() - && tcx.item_name(def_id) == sym::const_eval_select - && tcx.is_intrinsic(def_id) => + && matches!(tcx.intrinsic(def_id), Some(sym::const_eval_select)) => { let [tupled_args, called_in_const, called_at_rt]: [_; 3] = std::mem::take(args).try_into().unwrap(); diff --git a/compiler/rustc_mir_transform/src/lower_intrinsics.rs b/compiler/rustc_mir_transform/src/lower_intrinsics.rs index f43b85173d4..a0af902c4e1 100644 --- a/compiler/rustc_mir_transform/src/lower_intrinsics.rs +++ b/compiler/rustc_mir_transform/src/lower_intrinsics.rs @@ -14,9 +14,8 @@ impl<'tcx> MirPass<'tcx> for LowerIntrinsics { if let TerminatorKind::Call { func, args, destination, target, .. } = &mut terminator.kind && let ty::FnDef(def_id, generic_args) = *func.ty(local_decls, tcx).kind() - && tcx.is_intrinsic(def_id) + && let Some(intrinsic_name) = tcx.intrinsic(def_id) { - let intrinsic_name = tcx.item_name(def_id); match intrinsic_name { sym::unreachable => { terminator.kind = TerminatorKind::Unreachable; diff --git a/compiler/rustc_ty_utils/src/instance.rs b/compiler/rustc_ty_utils/src/instance.rs index 7fa416197b3..5fc93d666ab 100644 --- a/compiler/rustc_ty_utils/src/instance.rs +++ b/compiler/rustc_ty_utils/src/instance.rs @@ -28,7 +28,8 @@ fn resolve_instance<'tcx>( tcx.normalize_erasing_regions(param_env, args), ) } else { - let def = if matches!(tcx.def_kind(def_id), DefKind::Fn) && tcx.is_intrinsic(def_id) { + let def = if matches!(tcx.def_kind(def_id), DefKind::Fn) && tcx.intrinsic(def_id).is_some() + { debug!(" => intrinsic"); ty::InstanceDef::Intrinsic(def_id) } else if Some(def_id) == tcx.lang_items().drop_in_place_fn() { diff --git a/src/tools/clippy/clippy_utils/src/qualify_min_const_fn.rs b/src/tools/clippy/clippy_utils/src/qualify_min_const_fn.rs index 8d5bcd665ad..47195fcc17b 100644 --- a/src/tools/clippy/clippy_utils/src/qualify_min_const_fn.rs +++ b/src/tools/clippy/clippy_utils/src/qualify_min_const_fn.rs @@ -335,7 +335,7 @@ fn check_terminator<'tcx>( // within const fns. `transmute` is allowed in all other const contexts. // This won't really scale to more intrinsics or functions. Let's allow const // transmutes in const fn before we add more hacks to this. - if tcx.is_intrinsic(fn_def_id) && tcx.item_name(fn_def_id) == sym::transmute { + if matches!(tcx.intrinsic(fn_def_id), Some(sym::transmute)) { return Err(( span, "can only call `transmute` from const items, not `const fn`".into(), -- cgit 1.4.1-3-g733a5 From 92281c7e815f3898f4403d45a079c7d266b78076 Mon Sep 17 00:00:00 2001 From: Oli Scherer Date: Tue, 30 Jan 2024 16:03:58 +0000 Subject: Implement intrinsics with fallback bodies --- compiler/rustc_codegen_ssa/src/mir/block.rs | 2 +- compiler/rustc_feature/src/builtin_attrs.rs | 4 + compiler/rustc_metadata/src/rmeta/decoder.rs | 4 +- .../src/rmeta/decoder/cstore_impl.rs | 2 +- compiler/rustc_metadata/src/rmeta/encoder.rs | 4 +- compiler/rustc_metadata/src/rmeta/mod.rs | 2 +- compiler/rustc_middle/src/ty/util.rs | 3 +- compiler/rustc_span/src/symbol.rs | 1 + library/core/src/intrinsics.rs | 138 ++++++++++----------- .../src/language-features/intrinsics.md | 52 +++++++- src/librustdoc/clean/types.rs | 2 +- tests/ui/consts/is_val_statically_known.rs | 3 +- 12 files changed, 136 insertions(+), 81 deletions(-) diff --git a/compiler/rustc_codegen_ssa/src/mir/block.rs b/compiler/rustc_codegen_ssa/src/mir/block.rs index e35b4029b45..a4d97200cdb 100644 --- a/compiler/rustc_codegen_ssa/src/mir/block.rs +++ b/compiler/rustc_codegen_ssa/src/mir/block.rs @@ -787,7 +787,7 @@ impl<'a, 'tcx, Bx: BuilderMethods<'a, 'tcx>> FunctionCx<'a, 'tcx, Bx> { // Handle intrinsics old codegen wants Expr's for, ourselves. let intrinsic = match def { - Some(ty::InstanceDef::Intrinsic(def_id)) => Some(bx.tcx().item_name(def_id)), + Some(ty::InstanceDef::Intrinsic(def_id)) => Some(bx.tcx().intrinsic(def_id).unwrap()), _ => None, }; diff --git a/compiler/rustc_feature/src/builtin_attrs.rs b/compiler/rustc_feature/src/builtin_attrs.rs index 019cc1c847e..155eb834ecd 100644 --- a/compiler/rustc_feature/src/builtin_attrs.rs +++ b/compiler/rustc_feature/src/builtin_attrs.rs @@ -788,6 +788,10 @@ pub const BUILTIN_ATTRIBUTES: &[BuiltinAttribute] = &[ rustc_safe_intrinsic, Normal, template!(Word), WarnFollowing, "the `#[rustc_safe_intrinsic]` attribute is used internally to mark intrinsics as safe" ), + rustc_attr!( + rustc_intrinsic, Normal, template!(Word), ErrorFollowing, + "the `#[rustc_intrinsic]` attribute is used to declare intrinsics with function bodies", + ), // ========================================================================== // Internal attributes, Testing: diff --git a/compiler/rustc_metadata/src/rmeta/decoder.rs b/compiler/rustc_metadata/src/rmeta/decoder.rs index a738fc86a06..a24961df67b 100644 --- a/compiler/rustc_metadata/src/rmeta/decoder.rs +++ b/compiler/rustc_metadata/src/rmeta/decoder.rs @@ -1746,8 +1746,8 @@ impl<'a, 'tcx> CrateMetadataRef<'a> { self.root.tables.attr_flags.get(self, index) } - fn get_intrinsic(self, index: DefIndex) -> bool { - self.root.tables.intrinsic.get(self, index) + fn get_intrinsic(self, index: DefIndex) -> Option { + self.root.tables.intrinsic.get(self, index).map(|d| d.decode(self)) } fn get_doc_link_resolutions(self, index: DefIndex) -> DocLinkResMap { diff --git a/compiler/rustc_metadata/src/rmeta/decoder/cstore_impl.rs b/compiler/rustc_metadata/src/rmeta/decoder/cstore_impl.rs index 1faddee2e98..1cbf854f733 100644 --- a/compiler/rustc_metadata/src/rmeta/decoder/cstore_impl.rs +++ b/compiler/rustc_metadata/src/rmeta/decoder/cstore_impl.rs @@ -348,7 +348,7 @@ provide! { tcx, def_id, other, cdata, cdata.get_stability_implications(tcx).iter().copied().collect() } stripped_cfg_items => { cdata.get_stripped_cfg_items(cdata.cnum, tcx) } - intrinsic => { cdata.get_intrinsic(def_id.index).then(|| tcx.item_name(def_id)) } + intrinsic => { cdata.get_intrinsic(def_id.index) } defined_lang_items => { cdata.get_lang_items(tcx) } diagnostic_items => { cdata.get_diagnostic_items() } missing_lang_items => { cdata.get_missing_lang_items(tcx) } diff --git a/compiler/rustc_metadata/src/rmeta/encoder.rs b/compiler/rustc_metadata/src/rmeta/encoder.rs index f3213185449..54061a2c6fc 100644 --- a/compiler/rustc_metadata/src/rmeta/encoder.rs +++ b/compiler/rustc_metadata/src/rmeta/encoder.rs @@ -1411,7 +1411,9 @@ impl<'a, 'tcx> EncodeContext<'a, 'tcx> { if let DefKind::Fn | DefKind::AssocFn = def_kind { self.tables.asyncness.set_some(def_id.index, tcx.asyncness(def_id)); record_array!(self.tables.fn_arg_names[def_id] <- tcx.fn_arg_names(def_id)); - self.tables.intrinsic.set(def_id.index, tcx.intrinsic(def_id).is_some()); + if let Some(name) = tcx.intrinsic(def_id) { + record!(self.tables.intrinsic[def_id] <- name); + } } if let DefKind::TyParam = def_kind { let default = self.tcx.object_lifetime_default(def_id); diff --git a/compiler/rustc_metadata/src/rmeta/mod.rs b/compiler/rustc_metadata/src/rmeta/mod.rs index 49c97b8c2e6..6b4b12e9d6a 100644 --- a/compiler/rustc_metadata/src/rmeta/mod.rs +++ b/compiler/rustc_metadata/src/rmeta/mod.rs @@ -375,7 +375,7 @@ macro_rules! define_tables { define_tables! { - defaulted: - intrinsic: Table, + intrinsic: Table>>, is_macro_rules: Table, is_type_alias_impl_trait: Table, type_alias_is_lazy: Table, diff --git a/compiler/rustc_middle/src/ty/util.rs b/compiler/rustc_middle/src/ty/util.rs index 626ea0342e5..1f64c76a57c 100644 --- a/compiler/rustc_middle/src/ty/util.rs +++ b/compiler/rustc_middle/src/ty/util.rs @@ -1549,9 +1549,10 @@ pub fn is_doc_notable_trait(tcx: TyCtxt<'_>, def_id: DefId) -> bool { .any(|items| items.iter().any(|item| item.has_name(sym::notable_trait))) } -/// Determines whether an item is an intrinsic by Abi. +/// Determines whether an item is an intrinsic by Abi. or by whether it has a `rustc_intrinsic` attribute pub fn intrinsic(tcx: TyCtxt<'_>, def_id: LocalDefId) -> Option { if matches!(tcx.fn_sig(def_id).skip_binder().abi(), Abi::RustIntrinsic | Abi::PlatformIntrinsic) + || tcx.has_attr(def_id, sym::rustc_intrinsic) { Some(tcx.item_name(def_id.into())) } else { diff --git a/compiler/rustc_span/src/symbol.rs b/compiler/rustc_span/src/symbol.rs index aa912c93c08..0b5ee2bc51b 100644 --- a/compiler/rustc_span/src/symbol.rs +++ b/compiler/rustc_span/src/symbol.rs @@ -1418,6 +1418,7 @@ symbols! { rustc_if_this_changed, rustc_inherit_overflow_checks, rustc_insignificant_dtor, + rustc_intrinsic, rustc_layout, rustc_layout_scalar_valid_range_end, rustc_layout_scalar_valid_range_start, diff --git a/library/core/src/intrinsics.rs b/library/core/src/intrinsics.rs index c8259c0024c..375fa1350b5 100644 --- a/library/core/src/intrinsics.rs +++ b/library/core/src/intrinsics.rs @@ -2517,79 +2517,79 @@ extern "rust-intrinsic" { where G: FnOnce, F: FnOnce; +} - /// Returns whether the argument's value is statically known at - /// compile-time. - /// - /// This is useful when there is a way of writing the code that will - /// be *faster* when some variables have known values, but *slower* - /// in the general case: an `if is_val_statically_known(var)` can be used - /// to select between these two variants. The `if` will be optimized away - /// and only the desired branch remains. - /// - /// Formally speaking, this function non-deterministically returns `true` - /// or `false`, and the caller has to ensure sound behavior for both cases. - /// In other words, the following code has *Undefined Behavior*: - /// - /// ```no_run - /// #![feature(is_val_statically_known)] - /// #![feature(core_intrinsics)] - /// # #![allow(internal_features)] - /// use std::hint::unreachable_unchecked; - /// use std::intrinsics::is_val_statically_known; - /// - /// unsafe { - /// if !is_val_statically_known(0) { unreachable_unchecked(); } - /// } - /// ``` - /// - /// This also means that the following code's behavior is unspecified; it - /// may panic, or it may not: - /// - /// ```no_run - /// #![feature(is_val_statically_known)] - /// #![feature(core_intrinsics)] - /// # #![allow(internal_features)] - /// use std::intrinsics::is_val_statically_known; - /// - /// unsafe { - /// assert_eq!(is_val_statically_known(0), is_val_statically_known(0)); - /// } - /// ``` - /// - /// Unsafe code may not rely on `is_val_statically_known` returning any - /// particular value, ever. However, the compiler will generally make it - /// return `true` only if the value of the argument is actually known. - /// - /// When calling this in a `const fn`, both paths must be semantically - /// equivalent, that is, the result of the `true` branch and the `false` - /// branch must return the same value and have the same side-effects *no - /// matter what*. - #[rustc_const_unstable(feature = "is_val_statically_known", issue = "none")] - #[rustc_nounwind] - pub fn is_val_statically_known(arg: T) -> bool; - - /// Returns the value of `cfg!(debug_assertions)`, but after monomorphization instead of in - /// macro expansion. - /// - /// This always returns `false` in const eval and Miri. The interpreter provides better - /// diagnostics than the checks that this is used to implement. However, this means - /// you should only be using this intrinsic to guard requirements that, if violated, - /// immediately lead to UB. Otherwise, const-eval and Miri will miss out on those - /// checks entirely. - /// - /// Since this is evaluated after monomorphization, branching on this value can be used to - /// implement debug assertions that are included in the precompiled standard library, but can - /// be optimized out by builds that monomorphize the standard library code with debug - /// assertions disabled. This intrinsic is primarily used by [`assert_unsafe_precondition`]. - #[rustc_const_unstable(feature = "delayed_debug_assertions", issue = "none")] - #[rustc_safe_intrinsic] - #[cfg(not(bootstrap))] - pub(crate) fn debug_assertions() -> bool; +/// Returns whether the argument's value is statically known at +/// compile-time. +/// +/// This is useful when there is a way of writing the code that will +/// be *faster* when some variables have known values, but *slower* +/// in the general case: an `if is_val_statically_known(var)` can be used +/// to select between these two variants. The `if` will be optimized away +/// and only the desired branch remains. +/// +/// Formally speaking, this function non-deterministically returns `true` +/// or `false`, and the caller has to ensure sound behavior for both cases. +/// In other words, the following code has *Undefined Behavior*: +/// +/// ```no_run +/// #![feature(is_val_statically_known)] +/// #![feature(core_intrinsics)] +/// # #![allow(internal_features)] +/// use std::hint::unreachable_unchecked; +/// use std::intrinsics::is_val_statically_known; +/// +/// unsafe { +/// if !is_val_statically_known(0) { unreachable_unchecked(); } +/// } +/// ``` +/// +/// This also means that the following code's behavior is unspecified; it +/// may panic, or it may not: +/// +/// ```no_run +/// #![feature(is_val_statically_known)] +/// #![feature(core_intrinsics)] +/// # #![allow(internal_features)] +/// use std::intrinsics::is_val_statically_known; +/// +/// unsafe { +/// assert_eq!(is_val_statically_known(0), is_val_statically_known(0)); +/// } +/// ``` +/// +/// Unsafe code may not rely on `is_val_statically_known` returning any +/// particular value, ever. However, the compiler will generally make it +/// return `true` only if the value of the argument is actually known. +/// +/// When calling this in a `const fn`, both paths must be semantically +/// equivalent, that is, the result of the `true` branch and the `false` +/// branch must return the same value and have the same side-effects *no +/// matter what*. +#[rustc_const_unstable(feature = "is_val_statically_known", issue = "none")] +#[rustc_nounwind] +#[unstable(feature = "core_intrinsics", issue = "none")] +#[cfg_attr(not(bootstrap), rustc_intrinsic)] +pub const unsafe fn is_val_statically_known(_arg: T) -> bool { + false } -#[cfg(bootstrap)] +/// Returns the value of `cfg!(debug_assertions)`, but after monomorphization instead of in +/// macro expansion. +/// +/// This always returns `false` in const eval and Miri. The interpreter provides better +/// diagnostics than the checks that this is used to implement. However, this means +/// you should only be using this intrinsic to guard requirements that, if violated, +/// immediately lead to UB. Otherwise, const-eval and Miri will miss out on those +/// checks entirely. +/// +/// Since this is evaluated after monomorphization, branching on this value can be used to +/// implement debug assertions that are included in the precompiled standard library, but can +/// be optimized out by builds that monomorphize the standard library code with debug +/// assertions disabled. This intrinsic is primarily used by [`assert_unsafe_precondition`]. #[rustc_const_unstable(feature = "delayed_debug_assertions", issue = "none")] +#[unstable(feature = "core_intrinsics", issue = "none")] +#[cfg_attr(not(bootstrap), rustc_intrinsic)] pub(crate) const fn debug_assertions() -> bool { cfg!(debug_assertions) } diff --git a/src/doc/unstable-book/src/language-features/intrinsics.md b/src/doc/unstable-book/src/language-features/intrinsics.md index 8fa8f567d7e..9d07ae6fc67 100644 --- a/src/doc/unstable-book/src/language-features/intrinsics.md +++ b/src/doc/unstable-book/src/language-features/intrinsics.md @@ -2,13 +2,60 @@ The tracking issue for this feature is: None. -Intrinsics are never intended to be stable directly, but intrinsics are often +Intrinsics are rarely intended to be stable directly, but are usually exported in some sort of stable manner. Prefer using the stable interfaces to the intrinsic directly when you can. ------------------------ +## Intrinsics with fallback logic + +Many intrinsics can be written in pure rust, albeit inefficiently or without supporting +some features that only exist on some backends. Backends can simply not implement those +intrinsics without causing any code miscompilations or failures to compile. + +```rust +#![feature(rustc_attrs, effects)] +#![allow(internal_features)] + +#[rustc_intrinsic] +const unsafe fn const_deallocate(_ptr: *mut u8, _size: usize, _align: usize) {} +``` + +Since these are just regular functions, it is perfectly ok to create the intrinsic twice: + +```rust +#![feature(rustc_attrs, effects)] +#![allow(internal_features)] + +#[rustc_intrinsic] +const unsafe fn const_deallocate(_ptr: *mut u8, _size: usize, _align: usize) {} + +mod foo { + #[rustc_intrinsic] + const unsafe fn const_deallocate(_ptr: *mut u8, _size: usize, _align: usize) { + panic!("noisy const dealloc") + } +} + +``` + +The behaviour on backends that override the intrinsic is exactly the same. On other +backends, the intrinsic behaviour depends on which implementation is called, just like +with any regular function. + +## Intrinsics lowered to MIR instructions + +Various intrinsics have native MIR operations that they correspond to. Instead of requiring +backends to implement both the intrinsic and the MIR operation, the `lower_intrinsics` pass +will convert the calls to the MIR operation. Backends do not need to know about these intrinsics +at all. + +## Intrinsics without fallback logic + +These must be implemented by all backends. + These are imported as if they were FFI functions, with the special `rust-intrinsic` ABI. For example, if one was in a freestanding context, but wished to be able to `transmute` between types, and @@ -27,4 +74,5 @@ extern "rust-intrinsic" { } ``` -As with any other FFI functions, these are always `unsafe` to call. +As with any other FFI functions, these are by default always `unsafe` to call. +You can add `#[rustc_safe_intrinsic]` to the intrinsic to make it safe to call. diff --git a/src/librustdoc/clean/types.rs b/src/librustdoc/clean/types.rs index 6710193f961..f39276f1778 100644 --- a/src/librustdoc/clean/types.rs +++ b/src/librustdoc/clean/types.rs @@ -643,7 +643,7 @@ impl Item { let abi = tcx.fn_sig(def_id).skip_binder().abi(); hir::FnHeader { unsafety: if abi == Abi::RustIntrinsic { - intrinsic_operation_unsafety(tcx, self.def_id().unwrap()) + intrinsic_operation_unsafety(tcx, def_id.expect_local()) } else { hir::Unsafety::Unsafe }, diff --git a/tests/ui/consts/is_val_statically_known.rs b/tests/ui/consts/is_val_statically_known.rs index b0565842eb4..b4056375543 100644 --- a/tests/ui/consts/is_val_statically_known.rs +++ b/tests/ui/consts/is_val_statically_known.rs @@ -1,7 +1,6 @@ // run-pass -#![feature(core_intrinsics)] -#![feature(is_val_statically_known)] +#![feature(core_intrinsics, is_val_statically_known)] use std::intrinsics::is_val_statically_known; -- cgit 1.4.1-3-g733a5 From 79daf6107c6242dd211d43068b71959f50887146 Mon Sep 17 00:00:00 2001 From: Oli Scherer Date: Wed, 31 Jan 2024 14:05:14 +0000 Subject: Make the signature of equate_intrinsic_type support items other than `ForeignItem` --- compiler/rustc_hir_analysis/src/check/intrinsic.rs | 38 ++++++++++++---------- compiler/rustc_hir_analysis/src/collect.rs | 2 +- 2 files changed, 22 insertions(+), 18 deletions(-) diff --git a/compiler/rustc_hir_analysis/src/check/intrinsic.rs b/compiler/rustc_hir_analysis/src/check/intrinsic.rs index dc391ab5648..fbafbdcdecc 100644 --- a/compiler/rustc_hir_analysis/src/check/intrinsic.rs +++ b/compiler/rustc_hir_analysis/src/check/intrinsic.rs @@ -7,30 +7,35 @@ use crate::errors::{ WrongNumberOfGenericArgumentsToIntrinsic, }; -use hir::def_id::DefId; use rustc_errors::{codes::*, struct_span_code_err, DiagnosticMessage}; use rustc_hir as hir; use rustc_middle::traits::{ObligationCause, ObligationCauseCode}; use rustc_middle::ty::{self, Ty, TyCtxt}; +use rustc_span::def_id::LocalDefId; use rustc_span::symbol::{kw, sym}; +use rustc_span::Span; use rustc_target::spec::abi::Abi; fn equate_intrinsic_type<'tcx>( tcx: TyCtxt<'tcx>, - it: &hir::ForeignItem<'_>, + span: Span, + def_id: LocalDefId, n_tps: usize, n_lts: usize, n_cts: usize, sig: ty::PolyFnSig<'tcx>, ) { - let (own_counts, span) = match &it.kind { - hir::ForeignItemKind::Fn(.., generics) => { - let own_counts = tcx.generics_of(it.owner_id.to_def_id()).own_counts(); + let (own_counts, span) = match tcx.hir_node_by_def_id(def_id) { + hir::Node::ForeignItem(hir::ForeignItem { + kind: hir::ForeignItemKind::Fn(.., generics), + .. + }) => { + let own_counts = tcx.generics_of(def_id).own_counts(); (own_counts, generics.span) } _ => { - struct_span_code_err!(tcx.dcx(), it.span, E0622, "intrinsic must be a function") - .with_span_label(it.span, "expected a function") + struct_span_code_err!(tcx.dcx(), span, E0622, "intrinsic must be a function") + .with_span_label(span, "expected a function") .emit(); return; } @@ -54,23 +59,22 @@ fn equate_intrinsic_type<'tcx>( && gen_count_ok(own_counts.types, n_tps, "type") && gen_count_ok(own_counts.consts, n_cts, "const") { - let it_def_id = it.owner_id.def_id; let _ = check_function_signature( tcx, - ObligationCause::new(it.span, it_def_id, ObligationCauseCode::IntrinsicType), - it_def_id.into(), + ObligationCause::new(span, def_id, ObligationCauseCode::IntrinsicType), + def_id.into(), sig, ); } } /// Returns the unsafety of the given intrinsic. -pub fn intrinsic_operation_unsafety(tcx: TyCtxt<'_>, intrinsic_id: DefId) -> hir::Unsafety { +pub fn intrinsic_operation_unsafety(tcx: TyCtxt<'_>, intrinsic_id: LocalDefId) -> hir::Unsafety { let has_safe_attr = match tcx.has_attr(intrinsic_id, sym::rustc_safe_intrinsic) { true => hir::Unsafety::Normal, false => hir::Unsafety::Unsafe, }; - let is_in_list = match tcx.item_name(intrinsic_id) { + let is_in_list = match tcx.item_name(intrinsic_id.into()) { // When adding a new intrinsic to this list, // it's usually worth updating that intrinsic's documentation // to note that it's safe to call, since @@ -122,7 +126,7 @@ pub fn intrinsic_operation_unsafety(tcx: TyCtxt<'_>, intrinsic_id: DefId) -> hir tcx.def_span(intrinsic_id), DiagnosticMessage::from(format!( "intrinsic safety mismatch between list of intrinsics within the compiler and core library intrinsics for intrinsic `{}`", - tcx.item_name(intrinsic_id) + tcx.item_name(intrinsic_id.into()) ) )).emit(); } @@ -144,8 +148,8 @@ pub fn check_intrinsic_type(tcx: TyCtxt<'_>, it: &hir::ForeignItem<'_>) { Ty::new_error_with_message(tcx, tcx.def_span(it.owner_id), "expected param") } }; - let intrinsic_id = it.owner_id.to_def_id(); - let intrinsic_name = tcx.item_name(intrinsic_id); + let intrinsic_id = it.owner_id.def_id; + let intrinsic_name = tcx.item_name(intrinsic_id.into()); let name_str = intrinsic_name.as_str(); let bound_vars = tcx.mk_bound_variable_kinds(&[ @@ -483,7 +487,7 @@ pub fn check_intrinsic_type(tcx: TyCtxt<'_>, it: &hir::ForeignItem<'_>) { }; let sig = tcx.mk_fn_sig(inputs, output, false, unsafety, Abi::RustIntrinsic); let sig = ty::Binder::bind_with_vars(sig, bound_vars); - equate_intrinsic_type(tcx, it, n_tps, n_lts, 0, sig) + equate_intrinsic_type(tcx, it.span, intrinsic_id, n_tps, n_lts, 0, sig) } /// Type-check `extern "platform-intrinsic" { ... }` functions. @@ -581,5 +585,5 @@ pub fn check_platform_intrinsic_type(tcx: TyCtxt<'_>, it: &hir::ForeignItem<'_>) let sig = tcx.mk_fn_sig(inputs, output, false, hir::Unsafety::Unsafe, Abi::PlatformIntrinsic); let sig = ty::Binder::dummy(sig); - equate_intrinsic_type(tcx, it, n_tps, 0, n_cts, sig) + equate_intrinsic_type(tcx, it.span, it.owner_id.def_id, n_tps, 0, n_cts, sig) } diff --git a/compiler/rustc_hir_analysis/src/collect.rs b/compiler/rustc_hir_analysis/src/collect.rs index f458ff01c10..3eb64f8b56e 100644 --- a/compiler/rustc_hir_analysis/src/collect.rs +++ b/compiler/rustc_hir_analysis/src/collect.rs @@ -1480,7 +1480,7 @@ fn compute_sig_of_foreign_fn_decl<'tcx>( abi: abi::Abi, ) -> ty::PolyFnSig<'tcx> { let unsafety = if abi == abi::Abi::RustIntrinsic { - intrinsic_operation_unsafety(tcx, def_id.to_def_id()) + intrinsic_operation_unsafety(tcx, def_id) } else { hir::Unsafety::Unsafe }; -- cgit 1.4.1-3-g733a5 From 09fd5569624f2581337d46c88940ac8db517d88e Mon Sep 17 00:00:00 2001 From: Oli Scherer Date: Wed, 31 Jan 2024 14:09:42 +0000 Subject: Make check_intrinsic_type not require ForeignItems anymore --- compiler/rustc_hir_analysis/src/check/check.rs | 11 +++++--- compiler/rustc_hir_analysis/src/check/intrinsic.rs | 32 ++++++++++++---------- 2 files changed, 24 insertions(+), 19 deletions(-) diff --git a/compiler/rustc_hir_analysis/src/check/check.rs b/compiler/rustc_hir_analysis/src/check/check.rs index 7250dc81faf..6bc36176602 100644 --- a/compiler/rustc_hir_analysis/src/check/check.rs +++ b/compiler/rustc_hir_analysis/src/check/check.rs @@ -533,15 +533,18 @@ pub(crate) fn check_item_type(tcx: TyCtxt<'_>, def_id: LocalDefId) { match abi { Abi::RustIntrinsic => { for item in items { - let item = tcx.hir().foreign_item(item.id); - intrinsic::check_intrinsic_type(tcx, item); + intrinsic::check_intrinsic_type(tcx, item.id.owner_id.def_id, item.span); } } Abi::PlatformIntrinsic => { for item in items { - let item = tcx.hir().foreign_item(item.id); - intrinsic::check_platform_intrinsic_type(tcx, item); + intrinsic::check_platform_intrinsic_type( + tcx, + item.id.owner_id.def_id, + item.span, + item.ident.name, + ); } } diff --git a/compiler/rustc_hir_analysis/src/check/intrinsic.rs b/compiler/rustc_hir_analysis/src/check/intrinsic.rs index fbafbdcdecc..50da6bcbf73 100644 --- a/compiler/rustc_hir_analysis/src/check/intrinsic.rs +++ b/compiler/rustc_hir_analysis/src/check/intrinsic.rs @@ -13,7 +13,7 @@ use rustc_middle::traits::{ObligationCause, ObligationCauseCode}; use rustc_middle::ty::{self, Ty, TyCtxt}; use rustc_span::def_id::LocalDefId; use rustc_span::symbol::{kw, sym}; -use rustc_span::Span; +use rustc_span::{Span, Symbol}; use rustc_target::spec::abi::Abi; fn equate_intrinsic_type<'tcx>( @@ -136,8 +136,8 @@ pub fn intrinsic_operation_unsafety(tcx: TyCtxt<'_>, intrinsic_id: LocalDefId) - /// Remember to add all intrinsics here, in `compiler/rustc_codegen_llvm/src/intrinsic.rs`, /// and in `library/core/src/intrinsics.rs`. -pub fn check_intrinsic_type(tcx: TyCtxt<'_>, it: &hir::ForeignItem<'_>) { - let generics = tcx.generics_of(it.owner_id); +pub fn check_intrinsic_type(tcx: TyCtxt<'_>, intrinsic_id: LocalDefId, span: Span) { + let generics = tcx.generics_of(intrinsic_id); let param = |n| { if let Some(&ty::GenericParamDef { name, kind: ty::GenericParamDefKind::Type { .. }, .. @@ -145,10 +145,9 @@ pub fn check_intrinsic_type(tcx: TyCtxt<'_>, it: &hir::ForeignItem<'_>) { { Ty::new_param(tcx, n, name) } else { - Ty::new_error_with_message(tcx, tcx.def_span(it.owner_id), "expected param") + Ty::new_error_with_message(tcx, span, "expected param") } }; - let intrinsic_id = it.owner_id.def_id; let intrinsic_name = tcx.item_name(intrinsic_id.into()); let name_str = intrinsic_name.as_str(); @@ -191,7 +190,7 @@ pub fn check_intrinsic_type(tcx: TyCtxt<'_>, it: &hir::ForeignItem<'_>) { | "umin" => (1, vec![Ty::new_mut_ptr(tcx, param(0)), param(0)], param(0)), "fence" | "singlethreadfence" => (0, Vec::new(), Ty::new_unit(tcx)), op => { - tcx.dcx().emit_err(UnrecognizedAtomicOperation { span: it.span, op }); + tcx.dcx().emit_err(UnrecognizedAtomicOperation { span, op }); return; } }; @@ -479,7 +478,7 @@ pub fn check_intrinsic_type(tcx: TyCtxt<'_>, it: &hir::ForeignItem<'_>) { sym::debug_assertions => (0, Vec::new(), tcx.types.bool), other => { - tcx.dcx().emit_err(UnrecognizedIntrinsicFunction { span: it.span, name: other }); + tcx.dcx().emit_err(UnrecognizedIntrinsicFunction { span, name: other }); return; } }; @@ -487,12 +486,17 @@ pub fn check_intrinsic_type(tcx: TyCtxt<'_>, it: &hir::ForeignItem<'_>) { }; let sig = tcx.mk_fn_sig(inputs, output, false, unsafety, Abi::RustIntrinsic); let sig = ty::Binder::bind_with_vars(sig, bound_vars); - equate_intrinsic_type(tcx, it.span, intrinsic_id, n_tps, n_lts, 0, sig) + equate_intrinsic_type(tcx, span, intrinsic_id, n_tps, n_lts, 0, sig) } /// Type-check `extern "platform-intrinsic" { ... }` functions. -pub fn check_platform_intrinsic_type(tcx: TyCtxt<'_>, it: &hir::ForeignItem<'_>) { - let generics = tcx.generics_of(it.owner_id); +pub fn check_platform_intrinsic_type( + tcx: TyCtxt<'_>, + intrinsic_id: LocalDefId, + span: Span, + name: Symbol, +) { + let generics = tcx.generics_of(intrinsic_id); let param = |n| { if let Some(&ty::GenericParamDef { name, kind: ty::GenericParamDefKind::Type { .. }, .. @@ -500,12 +504,10 @@ pub fn check_platform_intrinsic_type(tcx: TyCtxt<'_>, it: &hir::ForeignItem<'_>) { Ty::new_param(tcx, n, name) } else { - Ty::new_error_with_message(tcx, tcx.def_span(it.owner_id), "expected param") + Ty::new_error_with_message(tcx, span, "expected param") } }; - let name = it.ident.name; - let (n_tps, n_cts, inputs, output) = match name { sym::simd_eq | sym::simd_ne | sym::simd_lt | sym::simd_le | sym::simd_gt | sym::simd_ge => { (2, 0, vec![param(0), param(0)], param(1)) @@ -578,12 +580,12 @@ pub fn check_platform_intrinsic_type(tcx: TyCtxt<'_>, it: &hir::ForeignItem<'_>) sym::simd_shuffle_generic => (2, 1, vec![param(0), param(0)], param(1)), _ => { let msg = format!("unrecognized platform-specific intrinsic function: `{name}`"); - tcx.dcx().span_err(it.span, msg); + tcx.dcx().span_err(span, msg); return; } }; let sig = tcx.mk_fn_sig(inputs, output, false, hir::Unsafety::Unsafe, Abi::PlatformIntrinsic); let sig = ty::Binder::dummy(sig); - equate_intrinsic_type(tcx, it.span, it.owner_id.def_id, n_tps, 0, n_cts, sig) + equate_intrinsic_type(tcx, span, intrinsic_id, n_tps, 0, n_cts, sig) } -- cgit 1.4.1-3-g733a5 From 0dac617a75bdc76f7984af9ade104b50182b4388 Mon Sep 17 00:00:00 2001 From: Oli Scherer Date: Wed, 31 Jan 2024 14:22:10 +0000 Subject: support adding const generic params to intrinsics but right now all of them have zero const generic params --- compiler/rustc_hir_analysis/src/check/intrinsic.rs | 196 +++++++++++---------- 1 file changed, 104 insertions(+), 92 deletions(-) diff --git a/compiler/rustc_hir_analysis/src/check/intrinsic.rs b/compiler/rustc_hir_analysis/src/check/intrinsic.rs index 50da6bcbf73..fe1a5a28964 100644 --- a/compiler/rustc_hir_analysis/src/check/intrinsic.rs +++ b/compiler/rustc_hir_analysis/src/check/intrinsic.rs @@ -172,7 +172,7 @@ pub fn check_intrinsic_type(tcx: TyCtxt<'_>, intrinsic_id: LocalDefId, span: Spa }) }; - let (n_tps, n_lts, inputs, output, unsafety) = if name_str.starts_with("atomic_") { + let (n_tps, n_lts, n_cts, inputs, output, unsafety) = if name_str.starts_with("atomic_") { let split: Vec<&str> = name_str.split('_').collect(); assert!(split.len() >= 2, "Atomic intrinsic in an incorrect format"); @@ -194,45 +194,47 @@ pub fn check_intrinsic_type(tcx: TyCtxt<'_>, intrinsic_id: LocalDefId, span: Spa return; } }; - (n_tps, 0, inputs, output, hir::Unsafety::Unsafe) + (n_tps, 0, 0, inputs, output, hir::Unsafety::Unsafe) } else { let unsafety = intrinsic_operation_unsafety(tcx, intrinsic_id); - let (n_tps, inputs, output) = match intrinsic_name { - sym::abort => (0, Vec::new(), tcx.types.never), - sym::unreachable => (0, Vec::new(), tcx.types.never), - sym::breakpoint => (0, Vec::new(), Ty::new_unit(tcx)), + let (n_tps, n_cts, inputs, output) = match intrinsic_name { + sym::abort => (0, 0, vec![], tcx.types.never), + sym::unreachable => (0, 0, vec![], tcx.types.never), + sym::breakpoint => (0, 0, vec![], Ty::new_unit(tcx)), sym::size_of | sym::pref_align_of | sym::min_align_of | sym::variant_count => { - (1, Vec::new(), tcx.types.usize) + (1, 0, vec![], tcx.types.usize) } sym::size_of_val | sym::min_align_of_val => { - (1, vec![Ty::new_imm_ptr(tcx, param(0))], tcx.types.usize) + (1, 0, vec![Ty::new_imm_ptr(tcx, param(0))], tcx.types.usize) } - sym::rustc_peek => (1, vec![param(0)], param(0)), - sym::caller_location => (0, vec![], tcx.caller_location_ty()), + sym::rustc_peek => (1, 0, vec![param(0)], param(0)), + sym::caller_location => (0, 0, vec![], tcx.caller_location_ty()), sym::assert_inhabited | sym::assert_zero_valid - | sym::assert_mem_uninitialized_valid => (1, Vec::new(), Ty::new_unit(tcx)), - sym::forget => (1, vec![param(0)], Ty::new_unit(tcx)), - sym::transmute | sym::transmute_unchecked => (2, vec![param(0)], param(1)), + | sym::assert_mem_uninitialized_valid => (1, 0, vec![], Ty::new_unit(tcx)), + sym::forget => (1, 0, vec![param(0)], Ty::new_unit(tcx)), + sym::transmute | sym::transmute_unchecked => (2, 0, vec![param(0)], param(1)), sym::prefetch_read_data | sym::prefetch_write_data | sym::prefetch_read_instruction | sym::prefetch_write_instruction => ( 1, + 0, vec![ Ty::new_ptr(tcx, ty::TypeAndMut { ty: param(0), mutbl: hir::Mutability::Not }), tcx.types.i32, ], Ty::new_unit(tcx), ), - sym::drop_in_place => (1, vec![Ty::new_mut_ptr(tcx, param(0))], Ty::new_unit(tcx)), - sym::needs_drop => (1, Vec::new(), tcx.types.bool), + sym::drop_in_place => (1, 0, vec![Ty::new_mut_ptr(tcx, param(0))], Ty::new_unit(tcx)), + sym::needs_drop => (1, 0, vec![], tcx.types.bool), - sym::type_name => (1, Vec::new(), Ty::new_static_str(tcx)), - sym::type_id => (1, Vec::new(), tcx.types.u128), - sym::offset => (2, vec![param(0), param(1)], param(0)), + sym::type_name => (1, 0, vec![], Ty::new_static_str(tcx)), + sym::type_id => (1, 0, vec![], tcx.types.u128), + sym::offset => (2, 0, vec![param(0), param(1)], param(0)), sym::arith_offset => ( 1, + 0, vec![ Ty::new_ptr(tcx, ty::TypeAndMut { ty: param(0), mutbl: hir::Mutability::Not }), tcx.types.isize, @@ -241,6 +243,7 @@ pub fn check_intrinsic_type(tcx: TyCtxt<'_>, intrinsic_id: LocalDefId, span: Spa ), sym::ptr_mask => ( 1, + 0, vec![ Ty::new_ptr(tcx, ty::TypeAndMut { ty: param(0), mutbl: hir::Mutability::Not }), tcx.types.usize, @@ -250,6 +253,7 @@ pub fn check_intrinsic_type(tcx: TyCtxt<'_>, intrinsic_id: LocalDefId, span: Spa sym::copy | sym::copy_nonoverlapping => ( 1, + 0, vec![ Ty::new_ptr(tcx, ty::TypeAndMut { ty: param(0), mutbl: hir::Mutability::Not }), Ty::new_ptr(tcx, ty::TypeAndMut { ty: param(0), mutbl: hir::Mutability::Mut }), @@ -259,6 +263,7 @@ pub fn check_intrinsic_type(tcx: TyCtxt<'_>, intrinsic_id: LocalDefId, span: Spa ), sym::volatile_copy_memory | sym::volatile_copy_nonoverlapping_memory => ( 1, + 0, vec![ Ty::new_ptr(tcx, ty::TypeAndMut { ty: param(0), mutbl: hir::Mutability::Mut }), Ty::new_ptr(tcx, ty::TypeAndMut { ty: param(0), mutbl: hir::Mutability::Not }), @@ -268,10 +273,11 @@ pub fn check_intrinsic_type(tcx: TyCtxt<'_>, intrinsic_id: LocalDefId, span: Spa ), sym::compare_bytes => { let byte_ptr = Ty::new_imm_ptr(tcx, tcx.types.u8); - (0, vec![byte_ptr, byte_ptr, tcx.types.usize], tcx.types.i32) + (0, 0, vec![byte_ptr, byte_ptr, tcx.types.usize], tcx.types.i32) } sym::write_bytes | sym::volatile_set_memory => ( 1, + 0, vec![ Ty::new_ptr(tcx, ty::TypeAndMut { ty: param(0), mutbl: hir::Mutability::Mut }), tcx.types.u8, @@ -279,56 +285,56 @@ pub fn check_intrinsic_type(tcx: TyCtxt<'_>, intrinsic_id: LocalDefId, span: Spa ], Ty::new_unit(tcx), ), - sym::sqrtf32 => (0, vec![tcx.types.f32], tcx.types.f32), - sym::sqrtf64 => (0, vec![tcx.types.f64], tcx.types.f64), - sym::powif32 => (0, vec![tcx.types.f32, tcx.types.i32], tcx.types.f32), - sym::powif64 => (0, vec![tcx.types.f64, tcx.types.i32], tcx.types.f64), - sym::sinf32 => (0, vec![tcx.types.f32], tcx.types.f32), - sym::sinf64 => (0, vec![tcx.types.f64], tcx.types.f64), - sym::cosf32 => (0, vec![tcx.types.f32], tcx.types.f32), - sym::cosf64 => (0, vec![tcx.types.f64], tcx.types.f64), - sym::powf32 => (0, vec![tcx.types.f32, tcx.types.f32], tcx.types.f32), - sym::powf64 => (0, vec![tcx.types.f64, tcx.types.f64], tcx.types.f64), - sym::expf32 => (0, vec![tcx.types.f32], tcx.types.f32), - sym::expf64 => (0, vec![tcx.types.f64], tcx.types.f64), - sym::exp2f32 => (0, vec![tcx.types.f32], tcx.types.f32), - sym::exp2f64 => (0, vec![tcx.types.f64], tcx.types.f64), - sym::logf32 => (0, vec![tcx.types.f32], tcx.types.f32), - sym::logf64 => (0, vec![tcx.types.f64], tcx.types.f64), - sym::log10f32 => (0, vec![tcx.types.f32], tcx.types.f32), - sym::log10f64 => (0, vec![tcx.types.f64], tcx.types.f64), - sym::log2f32 => (0, vec![tcx.types.f32], tcx.types.f32), - sym::log2f64 => (0, vec![tcx.types.f64], tcx.types.f64), - sym::fmaf32 => (0, vec![tcx.types.f32, tcx.types.f32, tcx.types.f32], tcx.types.f32), - sym::fmaf64 => (0, vec![tcx.types.f64, tcx.types.f64, tcx.types.f64], tcx.types.f64), - sym::fabsf32 => (0, vec![tcx.types.f32], tcx.types.f32), - sym::fabsf64 => (0, vec![tcx.types.f64], tcx.types.f64), - sym::minnumf32 => (0, vec![tcx.types.f32, tcx.types.f32], tcx.types.f32), - sym::minnumf64 => (0, vec![tcx.types.f64, tcx.types.f64], tcx.types.f64), - sym::maxnumf32 => (0, vec![tcx.types.f32, tcx.types.f32], tcx.types.f32), - sym::maxnumf64 => (0, vec![tcx.types.f64, tcx.types.f64], tcx.types.f64), - sym::copysignf32 => (0, vec![tcx.types.f32, tcx.types.f32], tcx.types.f32), - sym::copysignf64 => (0, vec![tcx.types.f64, tcx.types.f64], tcx.types.f64), - sym::floorf32 => (0, vec![tcx.types.f32], tcx.types.f32), - sym::floorf64 => (0, vec![tcx.types.f64], tcx.types.f64), - sym::ceilf32 => (0, vec![tcx.types.f32], tcx.types.f32), - sym::ceilf64 => (0, vec![tcx.types.f64], tcx.types.f64), - sym::truncf32 => (0, vec![tcx.types.f32], tcx.types.f32), - sym::truncf64 => (0, vec![tcx.types.f64], tcx.types.f64), - sym::rintf32 => (0, vec![tcx.types.f32], tcx.types.f32), - sym::rintf64 => (0, vec![tcx.types.f64], tcx.types.f64), - sym::nearbyintf32 => (0, vec![tcx.types.f32], tcx.types.f32), - sym::nearbyintf64 => (0, vec![tcx.types.f64], tcx.types.f64), - sym::roundf32 => (0, vec![tcx.types.f32], tcx.types.f32), - sym::roundf64 => (0, vec![tcx.types.f64], tcx.types.f64), - sym::roundevenf32 => (0, vec![tcx.types.f32], tcx.types.f32), - sym::roundevenf64 => (0, vec![tcx.types.f64], tcx.types.f64), + sym::sqrtf32 => (0, 0, vec![tcx.types.f32], tcx.types.f32), + sym::sqrtf64 => (0, 0, vec![tcx.types.f64], tcx.types.f64), + sym::powif32 => (0, 0, vec![tcx.types.f32, tcx.types.i32], tcx.types.f32), + sym::powif64 => (0, 0, vec![tcx.types.f64, tcx.types.i32], tcx.types.f64), + sym::sinf32 => (0, 0, vec![tcx.types.f32], tcx.types.f32), + sym::sinf64 => (0, 0, vec![tcx.types.f64], tcx.types.f64), + sym::cosf32 => (0, 0, vec![tcx.types.f32], tcx.types.f32), + sym::cosf64 => (0, 0, vec![tcx.types.f64], tcx.types.f64), + sym::powf32 => (0, 0, vec![tcx.types.f32, tcx.types.f32], tcx.types.f32), + sym::powf64 => (0, 0, vec![tcx.types.f64, tcx.types.f64], tcx.types.f64), + sym::expf32 => (0, 0, vec![tcx.types.f32], tcx.types.f32), + sym::expf64 => (0, 0, vec![tcx.types.f64], tcx.types.f64), + sym::exp2f32 => (0, 0, vec![tcx.types.f32], tcx.types.f32), + sym::exp2f64 => (0, 0, vec![tcx.types.f64], tcx.types.f64), + sym::logf32 => (0, 0, vec![tcx.types.f32], tcx.types.f32), + sym::logf64 => (0, 0, vec![tcx.types.f64], tcx.types.f64), + sym::log10f32 => (0, 0, vec![tcx.types.f32], tcx.types.f32), + sym::log10f64 => (0, 0, vec![tcx.types.f64], tcx.types.f64), + sym::log2f32 => (0, 0, vec![tcx.types.f32], tcx.types.f32), + sym::log2f64 => (0, 0, vec![tcx.types.f64], tcx.types.f64), + sym::fmaf32 => (0, 0, vec![tcx.types.f32, tcx.types.f32, tcx.types.f32], tcx.types.f32), + sym::fmaf64 => (0, 0, vec![tcx.types.f64, tcx.types.f64, tcx.types.f64], tcx.types.f64), + sym::fabsf32 => (0, 0, vec![tcx.types.f32], tcx.types.f32), + sym::fabsf64 => (0, 0, vec![tcx.types.f64], tcx.types.f64), + sym::minnumf32 => (0, 0, vec![tcx.types.f32, tcx.types.f32], tcx.types.f32), + sym::minnumf64 => (0, 0, vec![tcx.types.f64, tcx.types.f64], tcx.types.f64), + sym::maxnumf32 => (0, 0, vec![tcx.types.f32, tcx.types.f32], tcx.types.f32), + sym::maxnumf64 => (0, 0, vec![tcx.types.f64, tcx.types.f64], tcx.types.f64), + sym::copysignf32 => (0, 0, vec![tcx.types.f32, tcx.types.f32], tcx.types.f32), + sym::copysignf64 => (0, 0, vec![tcx.types.f64, tcx.types.f64], tcx.types.f64), + sym::floorf32 => (0, 0, vec![tcx.types.f32], tcx.types.f32), + sym::floorf64 => (0, 0, vec![tcx.types.f64], tcx.types.f64), + sym::ceilf32 => (0, 0, vec![tcx.types.f32], tcx.types.f32), + sym::ceilf64 => (0, 0, vec![tcx.types.f64], tcx.types.f64), + sym::truncf32 => (0, 0, vec![tcx.types.f32], tcx.types.f32), + sym::truncf64 => (0, 0, vec![tcx.types.f64], tcx.types.f64), + sym::rintf32 => (0, 0, vec![tcx.types.f32], tcx.types.f32), + sym::rintf64 => (0, 0, vec![tcx.types.f64], tcx.types.f64), + sym::nearbyintf32 => (0, 0, vec![tcx.types.f32], tcx.types.f32), + sym::nearbyintf64 => (0, 0, vec![tcx.types.f64], tcx.types.f64), + sym::roundf32 => (0, 0, vec![tcx.types.f32], tcx.types.f32), + sym::roundf64 => (0, 0, vec![tcx.types.f64], tcx.types.f64), + sym::roundevenf32 => (0, 0, vec![tcx.types.f32], tcx.types.f32), + sym::roundevenf64 => (0, 0, vec![tcx.types.f64], tcx.types.f64), sym::volatile_load | sym::unaligned_volatile_load => { - (1, vec![Ty::new_imm_ptr(tcx, param(0))], param(0)) + (1, 0, vec![Ty::new_imm_ptr(tcx, param(0))], param(0)) } sym::volatile_store | sym::unaligned_volatile_store => { - (1, vec![Ty::new_mut_ptr(tcx, param(0)), param(0)], Ty::new_unit(tcx)) + (1, 0, vec![Ty::new_mut_ptr(tcx, param(0)), param(0)], Ty::new_unit(tcx)) } sym::ctpop @@ -337,22 +343,24 @@ pub fn check_intrinsic_type(tcx: TyCtxt<'_>, intrinsic_id: LocalDefId, span: Spa | sym::cttz | sym::cttz_nonzero | sym::bswap - | sym::bitreverse => (1, vec![param(0)], param(0)), + | sym::bitreverse => (1, 0, vec![param(0)], param(0)), sym::add_with_overflow | sym::sub_with_overflow | sym::mul_with_overflow => { - (1, vec![param(0), param(0)], Ty::new_tup(tcx, &[param(0), tcx.types.bool])) + (1, 0, vec![param(0), param(0)], Ty::new_tup(tcx, &[param(0), tcx.types.bool])) } sym::ptr_guaranteed_cmp => ( 1, + 0, vec![Ty::new_imm_ptr(tcx, param(0)), Ty::new_imm_ptr(tcx, param(0))], tcx.types.u8, ), sym::const_allocate => { - (0, vec![tcx.types.usize, tcx.types.usize], Ty::new_mut_ptr(tcx, tcx.types.u8)) + (0, 0, vec![tcx.types.usize, tcx.types.usize], Ty::new_mut_ptr(tcx, tcx.types.u8)) } sym::const_deallocate => ( + 0, 0, vec![Ty::new_mut_ptr(tcx, tcx.types.u8), tcx.types.usize, tcx.types.usize], Ty::new_unit(tcx), @@ -360,39 +368,41 @@ pub fn check_intrinsic_type(tcx: TyCtxt<'_>, intrinsic_id: LocalDefId, span: Spa sym::ptr_offset_from => ( 1, + 0, vec![Ty::new_imm_ptr(tcx, param(0)), Ty::new_imm_ptr(tcx, param(0))], tcx.types.isize, ), sym::ptr_offset_from_unsigned => ( 1, + 0, vec![Ty::new_imm_ptr(tcx, param(0)), Ty::new_imm_ptr(tcx, param(0))], tcx.types.usize, ), sym::unchecked_div | sym::unchecked_rem | sym::exact_div => { - (1, vec![param(0), param(0)], param(0)) + (1, 0, vec![param(0), param(0)], param(0)) } sym::unchecked_shl | sym::unchecked_shr | sym::rotate_left | sym::rotate_right => { - (1, vec![param(0), param(0)], param(0)) + (1, 0, vec![param(0), param(0)], param(0)) } sym::unchecked_add | sym::unchecked_sub | sym::unchecked_mul => { - (1, vec![param(0), param(0)], param(0)) + (1, 0, vec![param(0), param(0)], param(0)) } sym::wrapping_add | sym::wrapping_sub | sym::wrapping_mul => { - (1, vec![param(0), param(0)], param(0)) + (1, 0, vec![param(0), param(0)], param(0)) } - sym::saturating_add | sym::saturating_sub => (1, vec![param(0), param(0)], param(0)), + sym::saturating_add | sym::saturating_sub => (1, 0, vec![param(0), param(0)], param(0)), sym::fadd_fast | sym::fsub_fast | sym::fmul_fast | sym::fdiv_fast | sym::frem_fast => { - (1, vec![param(0), param(0)], param(0)) + (1, 0, vec![param(0), param(0)], param(0)) } - sym::float_to_int_unchecked => (2, vec![param(0)], param(1)), + sym::float_to_int_unchecked => (2, 0, vec![param(0)], param(1)), - sym::assume => (0, vec![tcx.types.bool], Ty::new_unit(tcx)), - sym::likely => (0, vec![tcx.types.bool], tcx.types.bool), - sym::unlikely => (0, vec![tcx.types.bool], tcx.types.bool), + sym::assume => (0, 0, vec![tcx.types.bool], Ty::new_unit(tcx)), + sym::likely => (0, 0, vec![tcx.types.bool], tcx.types.bool), + sym::unlikely => (0, 0, vec![tcx.types.bool], tcx.types.bool), - sym::read_via_copy => (1, vec![Ty::new_imm_ptr(tcx, param(0))], param(0)), + sym::read_via_copy => (1, 0, vec![Ty::new_imm_ptr(tcx, param(0))], param(0)), sym::write_via_move => { - (1, vec![Ty::new_mut_ptr(tcx, param(0)), param(0)], Ty::new_unit(tcx)) + (1, 0, vec![Ty::new_mut_ptr(tcx, param(0)), param(0)], Ty::new_unit(tcx)) } sym::discriminant_value => { @@ -404,6 +414,7 @@ pub fn check_intrinsic_type(tcx: TyCtxt<'_>, intrinsic_id: LocalDefId, span: Spa let br = ty::BoundRegion { var: ty::BoundVar::from_u32(0), kind: ty::BrAnon }; ( 1, + 0, vec![Ty::new_imm_ref( tcx, ty::Region::new_bound(tcx, ty::INNERMOST, br), @@ -430,6 +441,7 @@ pub fn check_intrinsic_type(tcx: TyCtxt<'_>, intrinsic_id: LocalDefId, span: Spa Abi::Rust, )); ( + 0, 0, vec![Ty::new_fn_ptr(tcx, try_fn_ty), mut_u8, Ty::new_fn_ptr(tcx, catch_fn_ty)], tcx.types.i32, @@ -437,56 +449,56 @@ pub fn check_intrinsic_type(tcx: TyCtxt<'_>, intrinsic_id: LocalDefId, span: Spa } sym::va_start | sym::va_end => match mk_va_list_ty(hir::Mutability::Mut) { - Some((va_list_ref_ty, _)) => (0, vec![va_list_ref_ty], Ty::new_unit(tcx)), + Some((va_list_ref_ty, _)) => (0, 0, vec![va_list_ref_ty], Ty::new_unit(tcx)), None => bug!("`va_list` language item needed for C-variadic intrinsics"), }, sym::va_copy => match mk_va_list_ty(hir::Mutability::Not) { Some((va_list_ref_ty, va_list_ty)) => { let va_list_ptr_ty = Ty::new_mut_ptr(tcx, va_list_ty); - (0, vec![va_list_ptr_ty, va_list_ref_ty], Ty::new_unit(tcx)) + (0, 0, vec![va_list_ptr_ty, va_list_ref_ty], Ty::new_unit(tcx)) } None => bug!("`va_list` language item needed for C-variadic intrinsics"), }, sym::va_arg => match mk_va_list_ty(hir::Mutability::Mut) { - Some((va_list_ref_ty, _)) => (1, vec![va_list_ref_ty], param(0)), + Some((va_list_ref_ty, _)) => (1, 0, vec![va_list_ref_ty], param(0)), None => bug!("`va_list` language item needed for C-variadic intrinsics"), }, sym::nontemporal_store => { - (1, vec![Ty::new_mut_ptr(tcx, param(0)), param(0)], Ty::new_unit(tcx)) + (1, 0, vec![Ty::new_mut_ptr(tcx, param(0)), param(0)], Ty::new_unit(tcx)) } sym::raw_eq => { let br = ty::BoundRegion { var: ty::BoundVar::from_u32(0), kind: ty::BrAnon }; let param_ty = Ty::new_imm_ref(tcx, ty::Region::new_bound(tcx, ty::INNERMOST, br), param(0)); - (1, vec![param_ty; 2], tcx.types.bool) + (1, 0, vec![param_ty; 2], tcx.types.bool) } - sym::black_box => (1, vec![param(0)], param(0)), + sym::black_box => (1, 0, vec![param(0)], param(0)), - sym::is_val_statically_known => (1, vec![param(0)], tcx.types.bool), + sym::is_val_statically_known => (1, 0, vec![param(0)], tcx.types.bool), - sym::const_eval_select => (4, vec![param(0), param(1), param(2)], param(3)), + sym::const_eval_select => (4, 0, vec![param(0), param(1), param(2)], param(3)), sym::vtable_size | sym::vtable_align => { - (0, vec![Ty::new_imm_ptr(tcx, Ty::new_unit(tcx))], tcx.types.usize) + (0, 0, vec![Ty::new_imm_ptr(tcx, Ty::new_unit(tcx))], tcx.types.usize) } - sym::debug_assertions => (0, Vec::new(), tcx.types.bool), + sym::debug_assertions => (0, 0, Vec::new(), tcx.types.bool), other => { tcx.dcx().emit_err(UnrecognizedIntrinsicFunction { span, name: other }); return; } }; - (n_tps, 0, inputs, output, unsafety) + (n_tps, 0, n_cts, inputs, output, unsafety) }; let sig = tcx.mk_fn_sig(inputs, output, false, unsafety, Abi::RustIntrinsic); let sig = ty::Binder::bind_with_vars(sig, bound_vars); - equate_intrinsic_type(tcx, span, intrinsic_id, n_tps, n_lts, 0, sig) + equate_intrinsic_type(tcx, span, intrinsic_id, n_tps, n_lts, n_cts, sig) } /// Type-check `extern "platform-intrinsic" { ... }` functions. -- cgit 1.4.1-3-g733a5 From 531505f1826941db43c4ccd7643a549e78b53832 Mon Sep 17 00:00:00 2001 From: Oli Scherer Date: Wed, 31 Jan 2024 14:28:40 +0000 Subject: Check signature of intrinsics with fallback bodies --- compiler/rustc_hir_analysis/src/check/check.rs | 21 ++++++- compiler/rustc_hir_analysis/src/check/intrinsic.rs | 18 ++++-- library/core/src/intrinsics.rs | 2 +- tests/ui/feature-gates/feature-gate-abi.rs | 2 + tests/ui/feature-gates/feature-gate-abi.stderr | 67 +++++++++++++--------- tests/ui/feature-gates/feature-gate-intrinsics.rs | 1 + .../feature-gates/feature-gate-intrinsics.stderr | 8 ++- tests/ui/intrinsics-always-extern.rs | 1 + tests/ui/intrinsics-always-extern.stderr | 10 +++- 9 files changed, 92 insertions(+), 38 deletions(-) diff --git a/compiler/rustc_hir_analysis/src/check/check.rs b/compiler/rustc_hir_analysis/src/check/check.rs index 6bc36176602..e213ebfb344 100644 --- a/compiler/rustc_hir_analysis/src/check/check.rs +++ b/compiler/rustc_hir_analysis/src/check/check.rs @@ -472,7 +472,18 @@ pub(crate) fn check_item_type(tcx: TyCtxt<'_>, def_id: LocalDefId) { DefKind::Enum => { check_enum(tcx, def_id); } - DefKind::Fn => {} // entirely within check_item_body + DefKind::Fn => { + if let Some(name) = tcx.intrinsic(def_id) { + intrinsic::check_intrinsic_type( + tcx, + def_id, + tcx.def_ident_span(def_id).unwrap(), + name, + Abi::Rust, + ) + } + // Everything else is checked entirely within check_item_body + } DefKind::Impl { of_trait } => { if of_trait && let Some(impl_trait_ref) = tcx.impl_trait_ref(def_id) { check_impl_items_against_trait(tcx, def_id, impl_trait_ref.instantiate_identity()); @@ -533,7 +544,13 @@ pub(crate) fn check_item_type(tcx: TyCtxt<'_>, def_id: LocalDefId) { match abi { Abi::RustIntrinsic => { for item in items { - intrinsic::check_intrinsic_type(tcx, item.id.owner_id.def_id, item.span); + intrinsic::check_intrinsic_type( + tcx, + item.id.owner_id.def_id, + item.span, + item.ident.name, + abi, + ); } } diff --git a/compiler/rustc_hir_analysis/src/check/intrinsic.rs b/compiler/rustc_hir_analysis/src/check/intrinsic.rs index fe1a5a28964..b0cf1d1656d 100644 --- a/compiler/rustc_hir_analysis/src/check/intrinsic.rs +++ b/compiler/rustc_hir_analysis/src/check/intrinsic.rs @@ -26,7 +26,8 @@ fn equate_intrinsic_type<'tcx>( sig: ty::PolyFnSig<'tcx>, ) { let (own_counts, span) = match tcx.hir_node_by_def_id(def_id) { - hir::Node::ForeignItem(hir::ForeignItem { + hir::Node::Item(hir::Item { kind: hir::ItemKind::Fn(_, generics, _), .. }) + | hir::Node::ForeignItem(hir::ForeignItem { kind: hir::ForeignItemKind::Fn(.., generics), .. }) => { @@ -136,7 +137,13 @@ pub fn intrinsic_operation_unsafety(tcx: TyCtxt<'_>, intrinsic_id: LocalDefId) - /// Remember to add all intrinsics here, in `compiler/rustc_codegen_llvm/src/intrinsic.rs`, /// and in `library/core/src/intrinsics.rs`. -pub fn check_intrinsic_type(tcx: TyCtxt<'_>, intrinsic_id: LocalDefId, span: Span) { +pub fn check_intrinsic_type( + tcx: TyCtxt<'_>, + intrinsic_id: LocalDefId, + span: Span, + intrinsic_name: Symbol, + abi: Abi, +) { let generics = tcx.generics_of(intrinsic_id); let param = |n| { if let Some(&ty::GenericParamDef { @@ -148,7 +155,6 @@ pub fn check_intrinsic_type(tcx: TyCtxt<'_>, intrinsic_id: LocalDefId, span: Spa Ty::new_error_with_message(tcx, span, "expected param") } }; - let intrinsic_name = tcx.item_name(intrinsic_id.into()); let name_str = intrinsic_name.as_str(); let bound_vars = tcx.mk_bound_variable_kinds(&[ @@ -479,7 +485,7 @@ pub fn check_intrinsic_type(tcx: TyCtxt<'_>, intrinsic_id: LocalDefId, span: Spa sym::black_box => (1, 0, vec![param(0)], param(0)), - sym::is_val_statically_known => (1, 0, vec![param(0)], tcx.types.bool), + sym::is_val_statically_known => (1, 1, vec![param(0)], tcx.types.bool), sym::const_eval_select => (4, 0, vec![param(0), param(1), param(2)], param(3)), @@ -487,7 +493,7 @@ pub fn check_intrinsic_type(tcx: TyCtxt<'_>, intrinsic_id: LocalDefId, span: Spa (0, 0, vec![Ty::new_imm_ptr(tcx, Ty::new_unit(tcx))], tcx.types.usize) } - sym::debug_assertions => (0, 0, Vec::new(), tcx.types.bool), + sym::debug_assertions => (0, 1, Vec::new(), tcx.types.bool), other => { tcx.dcx().emit_err(UnrecognizedIntrinsicFunction { span, name: other }); @@ -496,7 +502,7 @@ pub fn check_intrinsic_type(tcx: TyCtxt<'_>, intrinsic_id: LocalDefId, span: Spa }; (n_tps, 0, n_cts, inputs, output, unsafety) }; - let sig = tcx.mk_fn_sig(inputs, output, false, unsafety, Abi::RustIntrinsic); + let sig = tcx.mk_fn_sig(inputs, output, false, unsafety, abi); let sig = ty::Binder::bind_with_vars(sig, bound_vars); equate_intrinsic_type(tcx, span, intrinsic_id, n_tps, n_lts, n_cts, sig) } diff --git a/library/core/src/intrinsics.rs b/library/core/src/intrinsics.rs index 375fa1350b5..d56c3d3b6c1 100644 --- a/library/core/src/intrinsics.rs +++ b/library/core/src/intrinsics.rs @@ -2590,7 +2590,7 @@ pub const unsafe fn is_val_statically_known(_arg: T) -> bool { #[rustc_const_unstable(feature = "delayed_debug_assertions", issue = "none")] #[unstable(feature = "core_intrinsics", issue = "none")] #[cfg_attr(not(bootstrap), rustc_intrinsic)] -pub(crate) const fn debug_assertions() -> bool { +pub(crate) const unsafe fn debug_assertions() -> bool { cfg!(debug_assertions) } diff --git a/tests/ui/feature-gates/feature-gate-abi.rs b/tests/ui/feature-gates/feature-gate-abi.rs index 712655f9775..39f98ac908b 100644 --- a/tests/ui/feature-gates/feature-gate-abi.rs +++ b/tests/ui/feature-gates/feature-gate-abi.rs @@ -14,8 +14,10 @@ trait Tuple { } // Functions extern "rust-intrinsic" fn f1() {} //~ ERROR intrinsics are subject to change //~^ ERROR intrinsic must be in + //~| ERROR unrecognized intrinsic function: `f1` extern "platform-intrinsic" fn f2() {} //~ ERROR platform intrinsics are experimental //~^ ERROR intrinsic must be in + //~| ERROR unrecognized intrinsic function: `f2` extern "rust-call" fn f4(_: ()) {} //~ ERROR rust-call ABI is subject to change // Methods in trait definition diff --git a/tests/ui/feature-gates/feature-gate-abi.stderr b/tests/ui/feature-gates/feature-gate-abi.stderr index d031c2adf50..aa60434d9fe 100644 --- a/tests/ui/feature-gates/feature-gate-abi.stderr +++ b/tests/ui/feature-gates/feature-gate-abi.stderr @@ -8,7 +8,7 @@ LL | extern "rust-intrinsic" fn f1() {} = note: this compiler was built on YYYY-MM-DD; consider upgrading it if it is out of date error[E0658]: platform intrinsics are experimental and possibly buggy - --> $DIR/feature-gate-abi.rs:17:8 + --> $DIR/feature-gate-abi.rs:18:8 | LL | extern "platform-intrinsic" fn f2() {} | ^^^^^^^^^^^^^^^^^^^^ @@ -18,7 +18,7 @@ LL | extern "platform-intrinsic" fn f2() {} = note: this compiler was built on YYYY-MM-DD; consider upgrading it if it is out of date error[E0658]: rust-call ABI is subject to change - --> $DIR/feature-gate-abi.rs:19:8 + --> $DIR/feature-gate-abi.rs:21:8 | LL | extern "rust-call" fn f4(_: ()) {} | ^^^^^^^^^^^ @@ -28,7 +28,7 @@ LL | extern "rust-call" fn f4(_: ()) {} = note: this compiler was built on YYYY-MM-DD; consider upgrading it if it is out of date error[E0658]: intrinsics are subject to change - --> $DIR/feature-gate-abi.rs:23:12 + --> $DIR/feature-gate-abi.rs:25:12 | LL | extern "rust-intrinsic" fn m1(); | ^^^^^^^^^^^^^^^^ @@ -37,7 +37,7 @@ LL | extern "rust-intrinsic" fn m1(); = note: this compiler was built on YYYY-MM-DD; consider upgrading it if it is out of date error[E0658]: platform intrinsics are experimental and possibly buggy - --> $DIR/feature-gate-abi.rs:25:12 + --> $DIR/feature-gate-abi.rs:27:12 | LL | extern "platform-intrinsic" fn m2(); | ^^^^^^^^^^^^^^^^^^^^ @@ -47,7 +47,7 @@ LL | extern "platform-intrinsic" fn m2(); = note: this compiler was built on YYYY-MM-DD; consider upgrading it if it is out of date error[E0658]: rust-call ABI is subject to change - --> $DIR/feature-gate-abi.rs:27:12 + --> $DIR/feature-gate-abi.rs:29:12 | LL | extern "rust-call" fn m4(_: ()); | ^^^^^^^^^^^ @@ -57,7 +57,7 @@ LL | extern "rust-call" fn m4(_: ()); = note: this compiler was built on YYYY-MM-DD; consider upgrading it if it is out of date error[E0658]: rust-call ABI is subject to change - --> $DIR/feature-gate-abi.rs:29:12 + --> $DIR/feature-gate-abi.rs:31:12 | LL | extern "rust-call" fn dm4(_: ()) {} | ^^^^^^^^^^^ @@ -67,7 +67,7 @@ LL | extern "rust-call" fn dm4(_: ()) {} = note: this compiler was built on YYYY-MM-DD; consider upgrading it if it is out of date error[E0658]: intrinsics are subject to change - --> $DIR/feature-gate-abi.rs:36:12 + --> $DIR/feature-gate-abi.rs:38:12 | LL | extern "rust-intrinsic" fn m1() {} | ^^^^^^^^^^^^^^^^ @@ -76,7 +76,7 @@ LL | extern "rust-intrinsic" fn m1() {} = note: this compiler was built on YYYY-MM-DD; consider upgrading it if it is out of date error[E0658]: platform intrinsics are experimental and possibly buggy - --> $DIR/feature-gate-abi.rs:38:12 + --> $DIR/feature-gate-abi.rs:40:12 | LL | extern "platform-intrinsic" fn m2() {} | ^^^^^^^^^^^^^^^^^^^^ @@ -86,7 +86,7 @@ LL | extern "platform-intrinsic" fn m2() {} = note: this compiler was built on YYYY-MM-DD; consider upgrading it if it is out of date error[E0658]: rust-call ABI is subject to change - --> $DIR/feature-gate-abi.rs:40:12 + --> $DIR/feature-gate-abi.rs:42:12 | LL | extern "rust-call" fn m4(_: ()) {} | ^^^^^^^^^^^ @@ -96,7 +96,7 @@ LL | extern "rust-call" fn m4(_: ()) {} = note: this compiler was built on YYYY-MM-DD; consider upgrading it if it is out of date error[E0658]: intrinsics are subject to change - --> $DIR/feature-gate-abi.rs:45:12 + --> $DIR/feature-gate-abi.rs:47:12 | LL | extern "rust-intrinsic" fn im1() {} | ^^^^^^^^^^^^^^^^ @@ -105,7 +105,7 @@ LL | extern "rust-intrinsic" fn im1() {} = note: this compiler was built on YYYY-MM-DD; consider upgrading it if it is out of date error[E0658]: platform intrinsics are experimental and possibly buggy - --> $DIR/feature-gate-abi.rs:47:12 + --> $DIR/feature-gate-abi.rs:49:12 | LL | extern "platform-intrinsic" fn im2() {} | ^^^^^^^^^^^^^^^^^^^^ @@ -115,7 +115,7 @@ LL | extern "platform-intrinsic" fn im2() {} = note: this compiler was built on YYYY-MM-DD; consider upgrading it if it is out of date error[E0658]: rust-call ABI is subject to change - --> $DIR/feature-gate-abi.rs:49:12 + --> $DIR/feature-gate-abi.rs:51:12 | LL | extern "rust-call" fn im4(_: ()) {} | ^^^^^^^^^^^ @@ -125,7 +125,7 @@ LL | extern "rust-call" fn im4(_: ()) {} = note: this compiler was built on YYYY-MM-DD; consider upgrading it if it is out of date error[E0658]: intrinsics are subject to change - --> $DIR/feature-gate-abi.rs:53:18 + --> $DIR/feature-gate-abi.rs:55:18 | LL | type A1 = extern "rust-intrinsic" fn(); | ^^^^^^^^^^^^^^^^ @@ -134,7 +134,7 @@ LL | type A1 = extern "rust-intrinsic" fn(); = note: this compiler was built on YYYY-MM-DD; consider upgrading it if it is out of date error[E0658]: platform intrinsics are experimental and possibly buggy - --> $DIR/feature-gate-abi.rs:54:18 + --> $DIR/feature-gate-abi.rs:56:18 | LL | type A2 = extern "platform-intrinsic" fn(); | ^^^^^^^^^^^^^^^^^^^^ @@ -144,7 +144,7 @@ LL | type A2 = extern "platform-intrinsic" fn(); = note: this compiler was built on YYYY-MM-DD; consider upgrading it if it is out of date error[E0658]: rust-call ABI is subject to change - --> $DIR/feature-gate-abi.rs:55:18 + --> $DIR/feature-gate-abi.rs:57:18 | LL | type A4 = extern "rust-call" fn(_: ()); | ^^^^^^^^^^^ @@ -154,7 +154,7 @@ LL | type A4 = extern "rust-call" fn(_: ()); = note: this compiler was built on YYYY-MM-DD; consider upgrading it if it is out of date error[E0658]: intrinsics are subject to change - --> $DIR/feature-gate-abi.rs:58:8 + --> $DIR/feature-gate-abi.rs:60:8 | LL | extern "rust-intrinsic" {} | ^^^^^^^^^^^^^^^^ @@ -163,7 +163,7 @@ LL | extern "rust-intrinsic" {} = note: this compiler was built on YYYY-MM-DD; consider upgrading it if it is out of date error[E0658]: platform intrinsics are experimental and possibly buggy - --> $DIR/feature-gate-abi.rs:59:8 + --> $DIR/feature-gate-abi.rs:61:8 | LL | extern "platform-intrinsic" {} | ^^^^^^^^^^^^^^^^^^^^ @@ -173,7 +173,7 @@ LL | extern "platform-intrinsic" {} = note: this compiler was built on YYYY-MM-DD; consider upgrading it if it is out of date error[E0658]: rust-call ABI is subject to change - --> $DIR/feature-gate-abi.rs:60:8 + --> $DIR/feature-gate-abi.rs:62:8 | LL | extern "rust-call" {} | ^^^^^^^^^^^ @@ -182,14 +182,26 @@ LL | extern "rust-call" {} = help: add `#![feature(unboxed_closures)]` to the crate attributes to enable = note: this compiler was built on YYYY-MM-DD; consider upgrading it if it is out of date +error[E0093]: unrecognized intrinsic function: `f1` + --> $DIR/feature-gate-abi.rs:15:28 + | +LL | extern "rust-intrinsic" fn f1() {} + | ^^ unrecognized intrinsic + +error[E0093]: unrecognized intrinsic function: `f2` + --> $DIR/feature-gate-abi.rs:18:32 + | +LL | extern "platform-intrinsic" fn f2() {} + | ^^ unrecognized intrinsic + error: intrinsic must be in `extern "rust-intrinsic" { ... }` block - --> $DIR/feature-gate-abi.rs:23:32 + --> $DIR/feature-gate-abi.rs:25:32 | LL | extern "rust-intrinsic" fn m1(); | ^^ error: intrinsic must be in `extern "rust-intrinsic" { ... }` block - --> $DIR/feature-gate-abi.rs:25:36 + --> $DIR/feature-gate-abi.rs:27:36 | LL | extern "platform-intrinsic" fn m2(); | ^^ @@ -201,35 +213,36 @@ LL | extern "rust-intrinsic" fn f1() {} | ^^ error: intrinsic must be in `extern "rust-intrinsic" { ... }` block - --> $DIR/feature-gate-abi.rs:17:37 + --> $DIR/feature-gate-abi.rs:18:37 | LL | extern "platform-intrinsic" fn f2() {} | ^^ error: intrinsic must be in `extern "rust-intrinsic" { ... }` block - --> $DIR/feature-gate-abi.rs:36:37 + --> $DIR/feature-gate-abi.rs:38:37 | LL | extern "rust-intrinsic" fn m1() {} | ^^ error: intrinsic must be in `extern "rust-intrinsic" { ... }` block - --> $DIR/feature-gate-abi.rs:38:41 + --> $DIR/feature-gate-abi.rs:40:41 | LL | extern "platform-intrinsic" fn m2() {} | ^^ error: intrinsic must be in `extern "rust-intrinsic" { ... }` block - --> $DIR/feature-gate-abi.rs:45:38 + --> $DIR/feature-gate-abi.rs:47:38 | LL | extern "rust-intrinsic" fn im1() {} | ^^ error: intrinsic must be in `extern "rust-intrinsic" { ... }` block - --> $DIR/feature-gate-abi.rs:47:42 + --> $DIR/feature-gate-abi.rs:49:42 | LL | extern "platform-intrinsic" fn im2() {} | ^^ -error: aborting due to 27 previous errors +error: aborting due to 29 previous errors -For more information about this error, try `rustc --explain E0658`. +Some errors have detailed explanations: E0093, E0658. +For more information about an error, try `rustc --explain E0093`. diff --git a/tests/ui/feature-gates/feature-gate-intrinsics.rs b/tests/ui/feature-gates/feature-gate-intrinsics.rs index e0dc3cc579d..725d968d24c 100644 --- a/tests/ui/feature-gates/feature-gate-intrinsics.rs +++ b/tests/ui/feature-gates/feature-gate-intrinsics.rs @@ -4,5 +4,6 @@ extern "rust-intrinsic" { //~ ERROR intrinsics are subject to change extern "rust-intrinsic" fn baz() {} //~ ERROR intrinsics are subject to change //~^ ERROR intrinsic must be in +//~| ERROR unrecognized intrinsic function: `baz` fn main() {} diff --git a/tests/ui/feature-gates/feature-gate-intrinsics.stderr b/tests/ui/feature-gates/feature-gate-intrinsics.stderr index ebd0f41715e..78c21843adb 100644 --- a/tests/ui/feature-gates/feature-gate-intrinsics.stderr +++ b/tests/ui/feature-gates/feature-gate-intrinsics.stderr @@ -22,13 +22,19 @@ error[E0093]: unrecognized intrinsic function: `bar` LL | fn bar(); | ^^^^^^^^^ unrecognized intrinsic +error[E0093]: unrecognized intrinsic function: `baz` + --> $DIR/feature-gate-intrinsics.rs:5:28 + | +LL | extern "rust-intrinsic" fn baz() {} + | ^^^ unrecognized intrinsic + error: intrinsic must be in `extern "rust-intrinsic" { ... }` block --> $DIR/feature-gate-intrinsics.rs:5:34 | LL | extern "rust-intrinsic" fn baz() {} | ^^ -error: aborting due to 4 previous errors +error: aborting due to 5 previous errors Some errors have detailed explanations: E0093, E0658. For more information about an error, try `rustc --explain E0093`. diff --git a/tests/ui/intrinsics-always-extern.rs b/tests/ui/intrinsics-always-extern.rs index 22951147d7d..0afd8353455 100644 --- a/tests/ui/intrinsics-always-extern.rs +++ b/tests/ui/intrinsics-always-extern.rs @@ -10,6 +10,7 @@ impl Foo for () { } extern "rust-intrinsic" fn hello() {//~ ERROR intrinsic must + //~^ ERROR unrecognized intrinsic function: `hello` } fn main() { diff --git a/tests/ui/intrinsics-always-extern.stderr b/tests/ui/intrinsics-always-extern.stderr index 24b6da16096..32468f99197 100644 --- a/tests/ui/intrinsics-always-extern.stderr +++ b/tests/ui/intrinsics-always-extern.stderr @@ -4,6 +4,12 @@ error: intrinsic must be in `extern "rust-intrinsic" { ... }` block LL | extern "rust-intrinsic" fn foo(&self); | ^^^ +error[E0093]: unrecognized intrinsic function: `hello` + --> $DIR/intrinsics-always-extern.rs:12:28 + | +LL | extern "rust-intrinsic" fn hello() { + | ^^^^^ unrecognized intrinsic + error: intrinsic must be in `extern "rust-intrinsic" { ... }` block --> $DIR/intrinsics-always-extern.rs:8:43 | @@ -17,8 +23,10 @@ error: intrinsic must be in `extern "rust-intrinsic" { ... }` block | LL | extern "rust-intrinsic" fn hello() { | ____________________________________^ +LL | | LL | | } | |_^ -error: aborting due to 3 previous errors +error: aborting due to 4 previous errors +For more information about this error, try `rustc --explain E0093`. -- cgit 1.4.1-3-g733a5 From 8549c0a3e6b39b31f29f308d3b33744aaefa4080 Mon Sep 17 00:00:00 2001 From: Oli Scherer Date: Wed, 31 Jan 2024 14:29:12 +0000 Subject: Add intrinsic body fallback to cranelift and use it --- compiler/rustc_codegen_cranelift/src/abi/mod.rs | 10 ++-- .../rustc_codegen_cranelift/src/intrinsics/mod.rs | 57 ++++++++++------------ 2 files changed, 32 insertions(+), 35 deletions(-) diff --git a/compiler/rustc_codegen_cranelift/src/abi/mod.rs b/compiler/rustc_codegen_cranelift/src/abi/mod.rs index 0f0d828c8fc..fd1f081a0a8 100644 --- a/compiler/rustc_codegen_cranelift/src/abi/mod.rs +++ b/compiler/rustc_codegen_cranelift/src/abi/mod.rs @@ -387,15 +387,19 @@ pub(crate) fn codegen_terminator_call<'tcx>( match instance.def { InstanceDef::Intrinsic(_) => { - crate::intrinsics::codegen_intrinsic_call( + match crate::intrinsics::codegen_intrinsic_call( fx, instance, args, ret_place, target, source_info, - ); - return; + ) { + Ok(()) => return, + // Unimplemented intrinsics must have a fallback body. The fallback body is obtained + // by converting the `InstanceDef::Intrinsic` to an `InstanceDef::Item`. + Err(()) => Some(Instance::new(instance.def_id(), instance.args)), + } } InstanceDef::DropGlue(_, None) => { // empty drop glue - a nop. diff --git a/compiler/rustc_codegen_cranelift/src/intrinsics/mod.rs b/compiler/rustc_codegen_cranelift/src/intrinsics/mod.rs index 819cb5ef137..5e64fec76e4 100644 --- a/compiler/rustc_codegen_cranelift/src/intrinsics/mod.rs +++ b/compiler/rustc_codegen_cranelift/src/intrinsics/mod.rs @@ -268,7 +268,7 @@ pub(crate) fn codegen_intrinsic_call<'tcx>( destination: CPlace<'tcx>, target: Option, source_info: mir::SourceInfo, -) { +) -> Result<(), ()> { let intrinsic = fx.tcx.item_name(instance.def_id()); let instance_args = instance.args; @@ -295,8 +295,9 @@ pub(crate) fn codegen_intrinsic_call<'tcx>( destination, target, source_info, - ); + )?; } + Ok(()) } fn codegen_float_intrinsic_call<'tcx>( @@ -430,25 +431,20 @@ fn codegen_regular_intrinsic_call<'tcx>( ret: CPlace<'tcx>, destination: Option, source_info: mir::SourceInfo, -) { +) -> Result<(), ()> { + assert_eq!(generic_args, instance.args); let usize_layout = fx.layout_of(fx.tcx.types.usize); match intrinsic { sym::abort => { fx.bcx.ins().trap(TrapCode::User(0)); - return; + return Ok(()); } sym::likely | sym::unlikely => { intrinsic_args!(fx, args => (a); intrinsic); ret.write_cvalue(fx, a); } - sym::is_val_statically_known => { - intrinsic_args!(fx, args => (_a); intrinsic); - - let res = fx.bcx.ins().iconst(types::I8, 0); - ret.write_cvalue(fx, CValue::by_val(res, ret.layout())); - } sym::breakpoint => { intrinsic_args!(fx, args => (); intrinsic); @@ -697,7 +693,7 @@ fn codegen_regular_intrinsic_call<'tcx>( }) }); crate::base::codegen_panic_nounwind(fx, &msg_str, Some(source_info.span)); - return; + return Ok(()); } } } @@ -792,7 +788,7 @@ fn codegen_regular_intrinsic_call<'tcx>( if fx.tcx.is_compiler_builtins(LOCAL_CRATE) { // special case for compiler-builtins to avoid having to patch it crate::trap::trap_unimplemented(fx, "128bit atomics not yet supported"); - return; + return Ok(()); } else { fx.tcx .dcx() @@ -802,7 +798,7 @@ fn codegen_regular_intrinsic_call<'tcx>( ty::Uint(_) | ty::Int(_) | ty::RawPtr(..) => {} _ => { report_atomic_type_validation_error(fx, intrinsic, source_info.span, ty); - return; + return Ok(()); } } let clif_ty = fx.clif_type(ty).unwrap(); @@ -823,7 +819,7 @@ fn codegen_regular_intrinsic_call<'tcx>( if fx.tcx.is_compiler_builtins(LOCAL_CRATE) { // special case for compiler-builtins to avoid having to patch it crate::trap::trap_unimplemented(fx, "128bit atomics not yet supported"); - return; + return Ok(()); } else { fx.tcx .dcx() @@ -833,7 +829,7 @@ fn codegen_regular_intrinsic_call<'tcx>( ty::Uint(_) | ty::Int(_) | ty::RawPtr(..) => {} _ => { report_atomic_type_validation_error(fx, intrinsic, source_info.span, ty); - return; + return Ok(()); } } @@ -850,7 +846,7 @@ fn codegen_regular_intrinsic_call<'tcx>( ty::Uint(_) | ty::Int(_) | ty::RawPtr(..) => {} _ => { report_atomic_type_validation_error(fx, intrinsic, source_info.span, layout.ty); - return; + return Ok(()); } } let ty = fx.clif_type(layout.ty).unwrap(); @@ -872,7 +868,7 @@ fn codegen_regular_intrinsic_call<'tcx>( ty::Uint(_) | ty::Int(_) | ty::RawPtr(..) => {} _ => { report_atomic_type_validation_error(fx, intrinsic, source_info.span, layout.ty); - return; + return Ok(()); } } @@ -895,7 +891,7 @@ fn codegen_regular_intrinsic_call<'tcx>( ty::Uint(_) | ty::Int(_) | ty::RawPtr(..) => {} _ => { report_atomic_type_validation_error(fx, intrinsic, source_info.span, layout.ty); - return; + return Ok(()); } } let ty = fx.clif_type(layout.ty).unwrap(); @@ -917,7 +913,7 @@ fn codegen_regular_intrinsic_call<'tcx>( ty::Uint(_) | ty::Int(_) | ty::RawPtr(..) => {} _ => { report_atomic_type_validation_error(fx, intrinsic, source_info.span, layout.ty); - return; + return Ok(()); } } let ty = fx.clif_type(layout.ty).unwrap(); @@ -939,7 +935,7 @@ fn codegen_regular_intrinsic_call<'tcx>( ty::Uint(_) | ty::Int(_) | ty::RawPtr(..) => {} _ => { report_atomic_type_validation_error(fx, intrinsic, source_info.span, layout.ty); - return; + return Ok(()); } } let ty = fx.clif_type(layout.ty).unwrap(); @@ -960,7 +956,7 @@ fn codegen_regular_intrinsic_call<'tcx>( ty::Uint(_) | ty::Int(_) | ty::RawPtr(..) => {} _ => { report_atomic_type_validation_error(fx, intrinsic, source_info.span, layout.ty); - return; + return Ok(()); } } let ty = fx.clif_type(layout.ty).unwrap(); @@ -981,7 +977,7 @@ fn codegen_regular_intrinsic_call<'tcx>( ty::Uint(_) | ty::Int(_) | ty::RawPtr(..) => {} _ => { report_atomic_type_validation_error(fx, intrinsic, source_info.span, layout.ty); - return; + return Ok(()); } } let ty = fx.clif_type(layout.ty).unwrap(); @@ -1002,7 +998,7 @@ fn codegen_regular_intrinsic_call<'tcx>( ty::Uint(_) | ty::Int(_) | ty::RawPtr(..) => {} _ => { report_atomic_type_validation_error(fx, intrinsic, source_info.span, layout.ty); - return; + return Ok(()); } } let ty = fx.clif_type(layout.ty).unwrap(); @@ -1023,7 +1019,7 @@ fn codegen_regular_intrinsic_call<'tcx>( ty::Uint(_) | ty::Int(_) | ty::RawPtr(..) => {} _ => { report_atomic_type_validation_error(fx, intrinsic, source_info.span, layout.ty); - return; + return Ok(()); } } let ty = fx.clif_type(layout.ty).unwrap(); @@ -1044,7 +1040,7 @@ fn codegen_regular_intrinsic_call<'tcx>( ty::Uint(_) | ty::Int(_) | ty::RawPtr(..) => {} _ => { report_atomic_type_validation_error(fx, intrinsic, source_info.span, layout.ty); - return; + return Ok(()); } } let ty = fx.clif_type(layout.ty).unwrap(); @@ -1065,7 +1061,7 @@ fn codegen_regular_intrinsic_call<'tcx>( ty::Uint(_) | ty::Int(_) | ty::RawPtr(..) => {} _ => { report_atomic_type_validation_error(fx, intrinsic, source_info.span, layout.ty); - return; + return Ok(()); } } let ty = fx.clif_type(layout.ty).unwrap(); @@ -1086,7 +1082,7 @@ fn codegen_regular_intrinsic_call<'tcx>( ty::Uint(_) | ty::Int(_) | ty::RawPtr(..) => {} _ => { report_atomic_type_validation_error(fx, intrinsic, source_info.span, layout.ty); - return; + return Ok(()); } } let ty = fx.clif_type(layout.ty).unwrap(); @@ -1261,13 +1257,10 @@ fn codegen_regular_intrinsic_call<'tcx>( ); } - _ => { - fx.tcx - .dcx() - .span_fatal(source_info.span, format!("unsupported intrinsic {}", intrinsic)); - } + _ => return Err(()), } let ret_block = fx.get_block(destination.unwrap()); fx.bcx.ins().jump(ret_block, &[]); + Ok(()) } -- cgit 1.4.1-3-g733a5 From 55200e75da337a17e0daa333e1f3e70b5aa18e8a Mon Sep 17 00:00:00 2001 From: Oli Scherer Date: Wed, 31 Jan 2024 20:22:01 +0000 Subject: Do the entire ReturnDest computation within make_return_dest --- compiler/rustc_codegen_ssa/src/mir/block.rs | 18 ++++++++++++------ 1 file changed, 12 insertions(+), 6 deletions(-) diff --git a/compiler/rustc_codegen_ssa/src/mir/block.rs b/compiler/rustc_codegen_ssa/src/mir/block.rs index a4d97200cdb..df5a2c29ef0 100644 --- a/compiler/rustc_codegen_ssa/src/mir/block.rs +++ b/compiler/rustc_codegen_ssa/src/mir/block.rs @@ -820,12 +820,14 @@ impl<'a, 'tcx, Bx: BuilderMethods<'a, 'tcx>> FunctionCx<'a, 'tcx, Bx> { let mut llargs = Vec::with_capacity(arg_count); // Prepare the return value destination - let ret_dest = if target.is_some() { - let is_intrinsic = intrinsic.is_some(); - self.make_return_dest(bx, destination, &fn_abi.ret, &mut llargs, is_intrinsic) - } else { - ReturnDest::Nothing - }; + let ret_dest = self.make_return_dest( + bx, + destination, + &fn_abi.ret, + &mut llargs, + intrinsic.is_some(), + target.is_some(), + ); if intrinsic == Some(sym::caller_location) { return if let Some(target) = target { @@ -1632,7 +1634,11 @@ impl<'a, 'tcx, Bx: BuilderMethods<'a, 'tcx>> FunctionCx<'a, 'tcx, Bx> { fn_ret: &ArgAbi<'tcx, Ty<'tcx>>, llargs: &mut Vec, is_intrinsic: bool, + has_target: bool, ) -> ReturnDest<'tcx, Bx::Value> { + if !has_target { + return ReturnDest::Nothing; + } // If the return is ignored, we can just return a do-nothing `ReturnDest`. if fn_ret.is_ignore() { return ReturnDest::Nothing; -- cgit 1.4.1-3-g733a5 From 432635a9ea4a23cc0133a9b0a956ee033518ad55 Mon Sep 17 00:00:00 2001 From: Oli Scherer Date: Wed, 31 Jan 2024 20:24:44 +0000 Subject: Create ret_dest as late as possible in all code paths --- compiler/rustc_codegen_ssa/src/mir/block.rs | 32 +++++++++++++++++------------ 1 file changed, 19 insertions(+), 13 deletions(-) diff --git a/compiler/rustc_codegen_ssa/src/mir/block.rs b/compiler/rustc_codegen_ssa/src/mir/block.rs index df5a2c29ef0..0c4661ef16e 100644 --- a/compiler/rustc_codegen_ssa/src/mir/block.rs +++ b/compiler/rustc_codegen_ssa/src/mir/block.rs @@ -817,23 +817,16 @@ impl<'a, 'tcx, Bx: BuilderMethods<'a, 'tcx>> FunctionCx<'a, 'tcx, Bx> { // The arguments we'll be passing. Plus one to account for outptr, if used. let arg_count = fn_abi.args.len() + fn_abi.ret.is_indirect() as usize; - let mut llargs = Vec::with_capacity(arg_count); - - // Prepare the return value destination - let ret_dest = self.make_return_dest( - bx, - destination, - &fn_abi.ret, - &mut llargs, - intrinsic.is_some(), - target.is_some(), - ); if intrinsic == Some(sym::caller_location) { return if let Some(target) = target { let location = self.get_caller_location(bx, mir::SourceInfo { span: fn_span, ..source_info }); + let mut llargs = Vec::with_capacity(arg_count); + let ret_dest = + self.make_return_dest(bx, destination, &fn_abi.ret, &mut llargs, true, true); + assert_eq!(llargs, []); if let ReturnDest::IndirectOperand(tmp, _) = ret_dest { location.val.store(bx, tmp); } @@ -847,6 +840,15 @@ impl<'a, 'tcx, Bx: BuilderMethods<'a, 'tcx>> FunctionCx<'a, 'tcx, Bx> { match intrinsic { None | Some(sym::drop_in_place) => {} Some(intrinsic) => { + let mut llargs = Vec::with_capacity(1); + let ret_dest = self.make_return_dest( + bx, + destination, + &fn_abi.ret, + &mut llargs, + true, + target.is_some(), + ); let dest = match ret_dest { _ if fn_abi.ret.is_indirect() => llargs[0], ReturnDest::Nothing => bx.const_undef(bx.type_ptr()), @@ -902,6 +904,11 @@ impl<'a, 'tcx, Bx: BuilderMethods<'a, 'tcx>> FunctionCx<'a, 'tcx, Bx> { } } + let mut llargs = Vec::with_capacity(arg_count); + let destination = target.as_ref().map(|&target| { + (self.make_return_dest(bx, destination, &fn_abi.ret, &mut llargs, false, true), target) + }); + // Split the rust-call tupled arguments off. let (first_args, untuple) = if abi == Abi::RustCall && !args.is_empty() { let (tup, args) = args.split_last().unwrap(); @@ -1042,14 +1049,13 @@ impl<'a, 'tcx, Bx: BuilderMethods<'a, 'tcx>> FunctionCx<'a, 'tcx, Bx> { (_, Some(llfn)) => llfn, _ => span_bug!(span, "no instance or llfn for call"), }; - helper.do_call( self, bx, fn_abi, fn_ptr, &llargs, - target.as_ref().map(|&target| (ret_dest, target)), + destination, unwind, &copied_constant_arguments, mergeable_succ, -- cgit 1.4.1-3-g733a5 From 9a0743747f3b587ff0b4ba06bf51d3a079f37e50 Mon Sep 17 00:00:00 2001 From: Oli Scherer Date: Wed, 31 Jan 2024 20:39:59 +0000 Subject: Teach llvm backend how to fall back to default bodies --- compiler/rustc_codegen_cranelift/src/abi/mod.rs | 4 +- .../rustc_codegen_cranelift/src/intrinsics/mod.rs | 16 ++---- compiler/rustc_codegen_gcc/src/intrinsic/mod.rs | 18 ++++--- compiler/rustc_codegen_llvm/src/intrinsic.rs | 23 +++++---- compiler/rustc_codegen_ssa/src/mir/block.rs | 37 +++++++------- compiler/rustc_codegen_ssa/src/mir/intrinsic.rs | 58 +++++++++++----------- compiler/rustc_codegen_ssa/src/traits/intrinsic.rs | 4 +- compiler/rustc_hir_analysis/src/check/intrinsic.rs | 2 +- compiler/rustc_mir_transform/src/instsimplify.rs | 7 +-- compiler/rustc_monomorphize/src/collector.rs | 15 ++++-- library/core/src/intrinsics.rs | 28 ++++++----- 11 files changed, 109 insertions(+), 103 deletions(-) diff --git a/compiler/rustc_codegen_cranelift/src/abi/mod.rs b/compiler/rustc_codegen_cranelift/src/abi/mod.rs index fd1f081a0a8..6e846d721f2 100644 --- a/compiler/rustc_codegen_cranelift/src/abi/mod.rs +++ b/compiler/rustc_codegen_cranelift/src/abi/mod.rs @@ -396,9 +396,7 @@ pub(crate) fn codegen_terminator_call<'tcx>( source_info, ) { Ok(()) => return, - // Unimplemented intrinsics must have a fallback body. The fallback body is obtained - // by converting the `InstanceDef::Intrinsic` to an `InstanceDef::Item`. - Err(()) => Some(Instance::new(instance.def_id(), instance.args)), + Err(instance) => Some(instance), } } InstanceDef::DropGlue(_, None) => { diff --git a/compiler/rustc_codegen_cranelift/src/intrinsics/mod.rs b/compiler/rustc_codegen_cranelift/src/intrinsics/mod.rs index 5e64fec76e4..210a3da2c5d 100644 --- a/compiler/rustc_codegen_cranelift/src/intrinsics/mod.rs +++ b/compiler/rustc_codegen_cranelift/src/intrinsics/mod.rs @@ -268,7 +268,7 @@ pub(crate) fn codegen_intrinsic_call<'tcx>( destination: CPlace<'tcx>, target: Option, source_info: mir::SourceInfo, -) -> Result<(), ()> { +) -> Result<(), Instance<'tcx>> { let intrinsic = fx.tcx.item_name(instance.def_id()); let instance_args = instance.args; @@ -431,7 +431,7 @@ fn codegen_regular_intrinsic_call<'tcx>( ret: CPlace<'tcx>, destination: Option, source_info: mir::SourceInfo, -) -> Result<(), ()> { +) -> Result<(), Instance<'tcx>> { assert_eq!(generic_args, instance.args); let usize_layout = fx.layout_of(fx.tcx.types.usize); @@ -1229,14 +1229,6 @@ fn codegen_regular_intrinsic_call<'tcx>( ret.write_cvalue(fx, CValue::by_val(cmp, ret.layout())); } - sym::const_allocate => { - intrinsic_args!(fx, args => (_size, _align); intrinsic); - - // returns a null pointer at runtime. - let null = fx.bcx.ins().iconst(fx.pointer_type, 0); - ret.write_cvalue(fx, CValue::by_val(null, ret.layout())); - } - sym::const_deallocate => { intrinsic_args!(fx, args => (_ptr, _size, _align); intrinsic); // nop at runtime. @@ -1257,7 +1249,9 @@ fn codegen_regular_intrinsic_call<'tcx>( ); } - _ => return Err(()), + // Unimplemented intrinsics must have a fallback body. The fallback body is obtained + // by converting the `InstanceDef::Intrinsic` to an `InstanceDef::Item`. + _ => return Err(Instance::new(instance.def_id(), instance.args)), } let ret_block = fx.get_block(destination.unwrap()); diff --git a/compiler/rustc_codegen_gcc/src/intrinsic/mod.rs b/compiler/rustc_codegen_gcc/src/intrinsic/mod.rs index eac8cb43779..f162ef831b7 100644 --- a/compiler/rustc_codegen_gcc/src/intrinsic/mod.rs +++ b/compiler/rustc_codegen_gcc/src/intrinsic/mod.rs @@ -90,7 +90,7 @@ fn get_simple_intrinsic<'gcc, 'tcx>(cx: &CodegenCx<'gcc, 'tcx>, name: Symbol) -> } impl<'a, 'gcc, 'tcx> IntrinsicCallMethods<'tcx> for Builder<'a, 'gcc, 'tcx> { - fn codegen_intrinsic_call(&mut self, instance: Instance<'tcx>, fn_abi: &FnAbi<'tcx, Ty<'tcx>>, args: &[OperandRef<'tcx, RValue<'gcc>>], llresult: RValue<'gcc>, span: Span) { + fn codegen_intrinsic_call(&mut self, instance: Instance<'tcx>, fn_abi: &FnAbi<'tcx, Ty<'tcx>>, args: &[OperandRef<'tcx, RValue<'gcc>>], llresult: RValue<'gcc>, span: Span) -> Result<(), Instance<'tcx>> { let tcx = self.tcx; let callee_ty = instance.ty(tcx, ty::ParamEnv::reveal_all()); @@ -137,7 +137,7 @@ impl<'a, 'gcc, 'tcx> IntrinsicCallMethods<'tcx> for Builder<'a, 'gcc, 'tcx> { args[2].immediate(), llresult, ); - return; + return Ok(()); } sym::breakpoint => { unimplemented!(); @@ -166,12 +166,12 @@ impl<'a, 'gcc, 'tcx> IntrinsicCallMethods<'tcx> for Builder<'a, 'gcc, 'tcx> { sym::volatile_store => { let dst = args[0].deref(self.cx()); args[1].val.volatile_store(self, dst); - return; + return Ok(()); } sym::unaligned_volatile_store => { let dst = args[0].deref(self.cx()); args[1].val.unaligned_volatile_store(self, dst); - return; + return Ok(()); } sym::prefetch_read_data | sym::prefetch_write_data @@ -269,7 +269,7 @@ impl<'a, 'gcc, 'tcx> IntrinsicCallMethods<'tcx> for Builder<'a, 'gcc, 'tcx> { }, None => { tcx.dcx().emit_err(InvalidMonomorphization::BasicIntegerType { span, name, ty }); - return; + return Ok(()); } } } @@ -339,7 +339,7 @@ impl<'a, 'gcc, 'tcx> IntrinsicCallMethods<'tcx> for Builder<'a, 'gcc, 'tcx> { extended_asm.set_volatile_flag(true); // We have copied the value to `result` already. - return; + return Ok(()); } sym::ptr_mask => { @@ -357,11 +357,12 @@ impl<'a, 'gcc, 'tcx> IntrinsicCallMethods<'tcx> for Builder<'a, 'gcc, 'tcx> { _ if name_str.starts_with("simd_") => { match generic_simd_intrinsic(self, name, callee_ty, args, ret_ty, llret_ty, span) { Ok(llval) => llval, - Err(()) => return, + Err(()) => return Ok(()), } } - _ => bug!("unknown intrinsic '{}'", name), + // Fall back to default body + _ => return Err(Instance::new(instance.def_id(), instance.args)), }; if !fn_abi.ret.is_ignore() { @@ -376,6 +377,7 @@ impl<'a, 'gcc, 'tcx> IntrinsicCallMethods<'tcx> for Builder<'a, 'gcc, 'tcx> { .store(self, result); } } + Ok(()) } fn abort(&mut self) { diff --git a/compiler/rustc_codegen_llvm/src/intrinsic.rs b/compiler/rustc_codegen_llvm/src/intrinsic.rs index e3e48ecb3aa..4415c51acf6 100644 --- a/compiler/rustc_codegen_llvm/src/intrinsic.rs +++ b/compiler/rustc_codegen_llvm/src/intrinsic.rs @@ -86,7 +86,7 @@ impl<'ll, 'tcx> IntrinsicCallMethods<'tcx> for Builder<'_, 'll, 'tcx> { args: &[OperandRef<'tcx, &'ll Value>], llresult: &'ll Value, span: Span, - ) { + ) -> Result<(), ty::Instance<'tcx>> { let tcx = self.tcx; let callee_ty = instance.ty(tcx, ty::ParamEnv::reveal_all()); @@ -141,7 +141,7 @@ impl<'ll, 'tcx> IntrinsicCallMethods<'tcx> for Builder<'_, 'll, 'tcx> { args[2].immediate(), llresult, ); - return; + return Ok(()); } sym::breakpoint => self.call_intrinsic("llvm.debugtrap", &[]), sym::va_copy => { @@ -194,17 +194,17 @@ impl<'ll, 'tcx> IntrinsicCallMethods<'tcx> for Builder<'_, 'll, 'tcx> { if !result.layout.is_zst() { self.store(load, result.llval, result.align); } - return; + return Ok(()); } sym::volatile_store => { let dst = args[0].deref(self.cx()); args[1].val.volatile_store(self, dst); - return; + return Ok(()); } sym::unaligned_volatile_store => { let dst = args[0].deref(self.cx()); args[1].val.unaligned_volatile_store(self, dst); - return; + return Ok(()); } sym::prefetch_read_data | sym::prefetch_write_data @@ -305,7 +305,7 @@ impl<'ll, 'tcx> IntrinsicCallMethods<'tcx> for Builder<'_, 'll, 'tcx> { name, ty, }); - return; + return Ok(()); } } } @@ -387,7 +387,7 @@ impl<'ll, 'tcx> IntrinsicCallMethods<'tcx> for Builder<'_, 'll, 'tcx> { .unwrap_or_else(|| bug!("failed to generate inline asm call for `black_box`")); // We have copied the value to `result` already. - return; + return Ok(()); } _ if name.as_str().starts_with("simd_") => { @@ -395,11 +395,15 @@ impl<'ll, 'tcx> IntrinsicCallMethods<'tcx> for Builder<'_, 'll, 'tcx> { self, name, callee_ty, fn_args, args, ret_ty, llret_ty, span, ) { Ok(llval) => llval, - Err(()) => return, + Err(()) => return Ok(()), } } - _ => bug!("unknown intrinsic '{}' -- should it have been lowered earlier?", name), + _ => { + debug!("unknown intrinsic '{}' -- falling back to default body", name); + // Call the fallback body instead of generating the intrinsic code + return Err(ty::Instance::new(instance.def_id(), instance.args)); + } }; if !fn_abi.ret.is_ignore() { @@ -411,6 +415,7 @@ impl<'ll, 'tcx> IntrinsicCallMethods<'tcx> for Builder<'_, 'll, 'tcx> { .store(self, result); } } + Ok(()) } fn abort(&mut self) { diff --git a/compiler/rustc_codegen_ssa/src/mir/block.rs b/compiler/rustc_codegen_ssa/src/mir/block.rs index 0c4661ef16e..75d413dedad 100644 --- a/compiler/rustc_codegen_ssa/src/mir/block.rs +++ b/compiler/rustc_codegen_ssa/src/mir/block.rs @@ -837,8 +837,8 @@ impl<'a, 'tcx, Bx: BuilderMethods<'a, 'tcx>> FunctionCx<'a, 'tcx, Bx> { }; } - match intrinsic { - None | Some(sym::drop_in_place) => {} + let instance = match intrinsic { + None | Some(sym::drop_in_place) => instance, Some(intrinsic) => { let mut llargs = Vec::with_capacity(1); let ret_dest = self.make_return_dest( @@ -882,27 +882,24 @@ impl<'a, 'tcx, Bx: BuilderMethods<'a, 'tcx>> FunctionCx<'a, 'tcx, Bx> { }) .collect(); - Self::codegen_intrinsic_call( - bx, - *instance.as_ref().unwrap(), - fn_abi, - &args, - dest, - span, - ); + let instance = *instance.as_ref().unwrap(); + match Self::codegen_intrinsic_call(bx, instance, fn_abi, &args, dest, span) { + Ok(()) => { + if let ReturnDest::IndirectOperand(dst, _) = ret_dest { + self.store_return(bx, ret_dest, &fn_abi.ret, dst.llval); + } - if let ReturnDest::IndirectOperand(dst, _) = ret_dest { - self.store_return(bx, ret_dest, &fn_abi.ret, dst.llval); + return if let Some(target) = target { + helper.funclet_br(self, bx, target, mergeable_succ) + } else { + bx.unreachable(); + MergingSucc::False + }; + } + Err(instance) => Some(instance), } - - return if let Some(target) = target { - helper.funclet_br(self, bx, target, mergeable_succ) - } else { - bx.unreachable(); - MergingSucc::False - }; } - } + }; let mut llargs = Vec::with_capacity(arg_count); let destination = target.as_ref().map(|&target| { diff --git a/compiler/rustc_codegen_ssa/src/mir/intrinsic.rs b/compiler/rustc_codegen_ssa/src/mir/intrinsic.rs index 8530bf9e2b3..d6a0dc6bbef 100644 --- a/compiler/rustc_codegen_ssa/src/mir/intrinsic.rs +++ b/compiler/rustc_codegen_ssa/src/mir/intrinsic.rs @@ -54,6 +54,7 @@ fn memset_intrinsic<'a, 'tcx, Bx: BuilderMethods<'a, 'tcx>>( } impl<'a, 'tcx, Bx: BuilderMethods<'a, 'tcx>> FunctionCx<'a, 'tcx, Bx> { + /// In the `Err` case, returns the instance that should be called instead. pub fn codegen_intrinsic_call( bx: &mut Bx, instance: ty::Instance<'tcx>, @@ -61,7 +62,7 @@ impl<'a, 'tcx, Bx: BuilderMethods<'a, 'tcx>> FunctionCx<'a, 'tcx, Bx> { args: &[OperandRef<'tcx, Bx::Value>], llresult: Bx::Value, span: Span, - ) { + ) -> Result<(), ty::Instance<'tcx>> { let callee_ty = instance.ty(bx.tcx(), ty::ParamEnv::reveal_all()); let ty::FnDef(def_id, fn_args) = *callee_ty.kind() else { @@ -81,7 +82,7 @@ impl<'a, 'tcx, Bx: BuilderMethods<'a, 'tcx>> FunctionCx<'a, 'tcx, Bx> { let llval = match name { sym::abort => { bx.abort(); - return; + return Ok(()); } sym::va_start => bx.va_start(args[0].immediate()), @@ -150,7 +151,7 @@ impl<'a, 'tcx, Bx: BuilderMethods<'a, 'tcx>> FunctionCx<'a, 'tcx, Bx> { args[0].immediate(), args[2].immediate(), ); - return; + return Ok(()); } sym::write_bytes => { memset_intrinsic( @@ -161,7 +162,7 @@ impl<'a, 'tcx, Bx: BuilderMethods<'a, 'tcx>> FunctionCx<'a, 'tcx, Bx> { args[1].immediate(), args[2].immediate(), ); - return; + return Ok(()); } sym::volatile_copy_nonoverlapping_memory => { @@ -174,7 +175,7 @@ impl<'a, 'tcx, Bx: BuilderMethods<'a, 'tcx>> FunctionCx<'a, 'tcx, Bx> { args[1].immediate(), args[2].immediate(), ); - return; + return Ok(()); } sym::volatile_copy_memory => { copy_intrinsic( @@ -186,7 +187,7 @@ impl<'a, 'tcx, Bx: BuilderMethods<'a, 'tcx>> FunctionCx<'a, 'tcx, Bx> { args[1].immediate(), args[2].immediate(), ); - return; + return Ok(()); } sym::volatile_set_memory => { memset_intrinsic( @@ -197,17 +198,17 @@ impl<'a, 'tcx, Bx: BuilderMethods<'a, 'tcx>> FunctionCx<'a, 'tcx, Bx> { args[1].immediate(), args[2].immediate(), ); - return; + return Ok(()); } sym::volatile_store => { let dst = args[0].deref(bx.cx()); args[1].val.volatile_store(bx, dst); - return; + return Ok(()); } sym::unaligned_volatile_store => { let dst = args[0].deref(bx.cx()); args[1].val.unaligned_volatile_store(bx, dst); - return; + return Ok(()); } sym::exact_div => { let ty = arg_tys[0]; @@ -225,7 +226,7 @@ impl<'a, 'tcx, Bx: BuilderMethods<'a, 'tcx>> FunctionCx<'a, 'tcx, Bx> { name, ty, }); - return; + return Ok(()); } } } @@ -245,7 +246,7 @@ impl<'a, 'tcx, Bx: BuilderMethods<'a, 'tcx>> FunctionCx<'a, 'tcx, Bx> { name, ty: arg_tys[0], }); - return; + return Ok(()); } } } @@ -256,14 +257,14 @@ impl<'a, 'tcx, Bx: BuilderMethods<'a, 'tcx>> FunctionCx<'a, 'tcx, Bx> { span, ty: arg_tys[0], }); - return; + return Ok(()); } let Some((_width, signed)) = int_type_width_signed(ret_ty, bx.tcx()) else { bx.tcx().dcx().emit_err(InvalidMonomorphization::FloatToIntUnchecked { span, ty: ret_ty, }); - return; + return Ok(()); }; if signed { bx.fptosi(args[0].immediate(), llret_ty) @@ -280,14 +281,9 @@ impl<'a, 'tcx, Bx: BuilderMethods<'a, 'tcx>> FunctionCx<'a, 'tcx, Bx> { } } - sym::const_allocate => { - // returns a null pointer at runtime. - bx.const_null(bx.type_ptr()) - } - sym::const_deallocate => { // nop at runtime. - return; + return Ok(()); } // This requires that atomic intrinsics follow a specific naming pattern: @@ -350,10 +346,10 @@ impl<'a, 'tcx, Bx: BuilderMethods<'a, 'tcx>> FunctionCx<'a, 'tcx, Bx> { bx.store(val, dest.llval, dest.align); let dest = result.project_field(bx, 1); bx.store(success, dest.llval, dest.align); - return; } else { - return invalid_monomorphization(ty); + invalid_monomorphization(ty); } + return Ok(()); } "load" => { @@ -383,7 +379,8 @@ impl<'a, 'tcx, Bx: BuilderMethods<'a, 'tcx>> FunctionCx<'a, 'tcx, Bx> { ) } } else { - return invalid_monomorphization(ty); + invalid_monomorphization(ty); + return Ok(()); } } @@ -399,10 +396,10 @@ impl<'a, 'tcx, Bx: BuilderMethods<'a, 'tcx>> FunctionCx<'a, 'tcx, Bx> { val = bx.ptrtoint(val, bx.type_isize()); } bx.atomic_store(val, ptr, parse_ordering(bx, ordering), size); - return; } else { - return invalid_monomorphization(ty); + invalid_monomorphization(ty); } + return Ok(()); } "fence" => { @@ -410,7 +407,7 @@ impl<'a, 'tcx, Bx: BuilderMethods<'a, 'tcx>> FunctionCx<'a, 'tcx, Bx> { parse_ordering(bx, ordering), SynchronizationScope::CrossThread, ); - return; + return Ok(()); } "singlethreadfence" => { @@ -418,7 +415,7 @@ impl<'a, 'tcx, Bx: BuilderMethods<'a, 'tcx>> FunctionCx<'a, 'tcx, Bx> { parse_ordering(bx, ordering), SynchronizationScope::SingleThread, ); - return; + return Ok(()); } // These are all AtomicRMW ops @@ -449,7 +446,8 @@ impl<'a, 'tcx, Bx: BuilderMethods<'a, 'tcx>> FunctionCx<'a, 'tcx, Bx> { } bx.atomic_rmw(atom_op, ptr, val, parse_ordering(bx, ordering)) } else { - return invalid_monomorphization(ty); + invalid_monomorphization(ty); + return Ok(()); } } } @@ -458,7 +456,7 @@ impl<'a, 'tcx, Bx: BuilderMethods<'a, 'tcx>> FunctionCx<'a, 'tcx, Bx> { sym::nontemporal_store => { let dst = args[0].deref(bx.cx()); args[1].val.nontemporal_store(bx, dst); - return; + return Ok(()); } sym::ptr_guaranteed_cmp => { @@ -493,8 +491,7 @@ impl<'a, 'tcx, Bx: BuilderMethods<'a, 'tcx>> FunctionCx<'a, 'tcx, Bx> { _ => { // Need to use backend-specific things in the implementation. - bx.codegen_intrinsic_call(instance, fn_abi, args, llresult, span); - return; + return bx.codegen_intrinsic_call(instance, fn_abi, args, llresult, span); } }; @@ -507,6 +504,7 @@ impl<'a, 'tcx, Bx: BuilderMethods<'a, 'tcx>> FunctionCx<'a, 'tcx, Bx> { .store(bx, result); } } + Ok(()) } } diff --git a/compiler/rustc_codegen_ssa/src/traits/intrinsic.rs b/compiler/rustc_codegen_ssa/src/traits/intrinsic.rs index 450672fb941..502f0b3fcb5 100644 --- a/compiler/rustc_codegen_ssa/src/traits/intrinsic.rs +++ b/compiler/rustc_codegen_ssa/src/traits/intrinsic.rs @@ -8,6 +8,8 @@ pub trait IntrinsicCallMethods<'tcx>: BackendTypes { /// Remember to add all intrinsics here, in `compiler/rustc_hir_analysis/src/check/mod.rs`, /// and in `library/core/src/intrinsics.rs`; if you need access to any LLVM intrinsics, /// add them to `compiler/rustc_codegen_llvm/src/context.rs`. + /// Returns `Err` if another instance should be called instead. This is used to invoke + /// intrinsic default bodies in case an intrinsic is not implemented by the backend. fn codegen_intrinsic_call( &mut self, instance: ty::Instance<'tcx>, @@ -15,7 +17,7 @@ pub trait IntrinsicCallMethods<'tcx>: BackendTypes { args: &[OperandRef<'tcx, Self::Value>], llresult: Self::Value, span: Span, - ); + ) -> Result<(), ty::Instance<'tcx>>; fn abort(&mut self); fn assume(&mut self, val: Self::Value); diff --git a/compiler/rustc_hir_analysis/src/check/intrinsic.rs b/compiler/rustc_hir_analysis/src/check/intrinsic.rs index b0cf1d1656d..397112e8db7 100644 --- a/compiler/rustc_hir_analysis/src/check/intrinsic.rs +++ b/compiler/rustc_hir_analysis/src/check/intrinsic.rs @@ -363,7 +363,7 @@ pub fn check_intrinsic_type( ), sym::const_allocate => { - (0, 0, vec![tcx.types.usize, tcx.types.usize], Ty::new_mut_ptr(tcx, tcx.types.u8)) + (0, 1, vec![tcx.types.usize, tcx.types.usize], Ty::new_mut_ptr(tcx, tcx.types.u8)) } sym::const_deallocate => ( 0, diff --git a/compiler/rustc_mir_transform/src/instsimplify.rs b/compiler/rustc_mir_transform/src/instsimplify.rs index 81cf31e6bf4..a9de37244c5 100644 --- a/compiler/rustc_mir_transform/src/instsimplify.rs +++ b/compiler/rustc_mir_transform/src/instsimplify.rs @@ -296,9 +296,9 @@ impl<'tcx> InstSimplifyContext<'tcx, '_> { if args.is_empty() { return; } - let ty = args.type_at(0); - let known_is_valid = intrinsic_assert_panics(self.tcx, self.param_env, ty, intrinsic_name); + let known_is_valid = + intrinsic_assert_panics(self.tcx, self.param_env, args[0], intrinsic_name); match known_is_valid { // We don't know the layout or it's not validity assertion at all, don't touch it None => {} @@ -317,10 +317,11 @@ impl<'tcx> InstSimplifyContext<'tcx, '_> { fn intrinsic_assert_panics<'tcx>( tcx: TyCtxt<'tcx>, param_env: ty::ParamEnv<'tcx>, - ty: Ty<'tcx>, + arg: ty::GenericArg<'tcx>, intrinsic_name: Symbol, ) -> Option { let requirement = ValidityRequirement::from_intrinsic(intrinsic_name)?; + let ty = arg.expect_ty(); Some(!tcx.check_validity_requirement((requirement, param_env.and(ty))).ok()?) } diff --git a/compiler/rustc_monomorphize/src/collector.rs b/compiler/rustc_monomorphize/src/collector.rs index 149e4c2cb08..a9926820caf 100644 --- a/compiler/rustc_monomorphize/src/collector.rs +++ b/compiler/rustc_monomorphize/src/collector.rs @@ -956,19 +956,24 @@ fn visit_instance_use<'tcx>( if !should_codegen_locally(tcx, &instance) { return; } - - // The intrinsics assert_inhabited, assert_zero_valid, and assert_mem_uninitialized_valid will - // be lowered in codegen to nothing or a call to panic_nounwind. So if we encounter any - // of those intrinsics, we need to include a mono item for panic_nounwind, else we may try to - // codegen a call to that function without generating code for the function itself. if let ty::InstanceDef::Intrinsic(def_id) = instance.def { let name = tcx.item_name(def_id); if let Some(_requirement) = ValidityRequirement::from_intrinsic(name) { + // The intrinsics assert_inhabited, assert_zero_valid, and assert_mem_uninitialized_valid will + // be lowered in codegen to nothing or a call to panic_nounwind. So if we encounter any + // of those intrinsics, we need to include a mono item for panic_nounwind, else we may try to + // codegen a call to that function without generating code for the function itself. let def_id = tcx.lang_items().get(LangItem::PanicNounwind).unwrap(); let panic_instance = Instance::mono(tcx, def_id); if should_codegen_locally(tcx, &panic_instance) { output.push(create_fn_mono_item(tcx, panic_instance, source)); } + } else if tcx.has_attr(def_id, sym::rustc_intrinsic) { + // Codegen the fallback body of intrinsics with fallback bodies + let instance = ty::Instance::new(def_id, instance.args); + if should_codegen_locally(tcx, &instance) { + output.push(create_fn_mono_item(tcx, instance, source)); + } } } diff --git a/library/core/src/intrinsics.rs b/library/core/src/intrinsics.rs index d56c3d3b6c1..3a178510e79 100644 --- a/library/core/src/intrinsics.rs +++ b/library/core/src/intrinsics.rs @@ -2368,18 +2368,6 @@ extern "rust-intrinsic" { #[rustc_nounwind] pub fn ptr_guaranteed_cmp(ptr: *const T, other: *const T) -> u8; - /// Allocates a block of memory at compile time. - /// At runtime, just returns a null pointer. - /// - /// # Safety - /// - /// - The `align` argument must be a power of two. - /// - At compile time, a compile error occurs if this constraint is violated. - /// - At runtime, it is not checked. - #[rustc_const_unstable(feature = "const_heap", issue = "79597")] - #[rustc_nounwind] - pub fn const_allocate(size: usize, align: usize) -> *mut u8; - /// Deallocates a memory which allocated by `intrinsics::const_allocate` at compile time. /// At runtime, does nothing. /// @@ -2594,6 +2582,22 @@ pub(crate) const unsafe fn debug_assertions() -> bool { cfg!(debug_assertions) } +/// Allocates a block of memory at compile time. +/// At runtime, just returns a null pointer. +/// +/// # Safety +/// +/// - The `align` argument must be a power of two. +/// - At compile time, a compile error occurs if this constraint is violated. +/// - At runtime, it is not checked. +#[rustc_const_unstable(feature = "const_heap", issue = "79597")] +#[rustc_nounwind] +#[cfg_attr(not(bootstrap), rustc_intrinsic)] +pub const unsafe fn const_allocate(_size: usize, _align: usize) -> *mut u8 { + // const eval overrides this function, but runtime code should always just return null pointers. + crate::ptr::null_mut() +} + // Some functions are defined here because they accidentally got made // available in this module on stable. See . // (`transmute` also falls into this category, but it cannot be wrapped due to the -- cgit 1.4.1-3-g733a5 From 6b73fe2d0977f9b1a98242b8ecf359c7804640e4 Mon Sep 17 00:00:00 2001 From: Oli Scherer Date: Wed, 31 Jan 2024 20:51:29 +0000 Subject: Give const_deallocate a default body --- .../rustc_codegen_cranelift/src/intrinsics/mod.rs | 5 ---- compiler/rustc_codegen_ssa/src/mir/intrinsic.rs | 5 ---- compiler/rustc_hir_analysis/src/check/intrinsic.rs | 2 +- library/core/src/intrinsics.rs | 31 ++++++++++++---------- 4 files changed, 18 insertions(+), 25 deletions(-) diff --git a/compiler/rustc_codegen_cranelift/src/intrinsics/mod.rs b/compiler/rustc_codegen_cranelift/src/intrinsics/mod.rs index 210a3da2c5d..476752c7230 100644 --- a/compiler/rustc_codegen_cranelift/src/intrinsics/mod.rs +++ b/compiler/rustc_codegen_cranelift/src/intrinsics/mod.rs @@ -1229,11 +1229,6 @@ fn codegen_regular_intrinsic_call<'tcx>( ret.write_cvalue(fx, CValue::by_val(cmp, ret.layout())); } - sym::const_deallocate => { - intrinsic_args!(fx, args => (_ptr, _size, _align); intrinsic); - // nop at runtime. - } - sym::black_box => { intrinsic_args!(fx, args => (a); intrinsic); diff --git a/compiler/rustc_codegen_ssa/src/mir/intrinsic.rs b/compiler/rustc_codegen_ssa/src/mir/intrinsic.rs index d6a0dc6bbef..e4633acd817 100644 --- a/compiler/rustc_codegen_ssa/src/mir/intrinsic.rs +++ b/compiler/rustc_codegen_ssa/src/mir/intrinsic.rs @@ -281,11 +281,6 @@ impl<'a, 'tcx, Bx: BuilderMethods<'a, 'tcx>> FunctionCx<'a, 'tcx, Bx> { } } - sym::const_deallocate => { - // nop at runtime. - return Ok(()); - } - // This requires that atomic intrinsics follow a specific naming pattern: // "atomic_[_]" name if let Some(atomic) = name_str.strip_prefix("atomic_") => { diff --git a/compiler/rustc_hir_analysis/src/check/intrinsic.rs b/compiler/rustc_hir_analysis/src/check/intrinsic.rs index 397112e8db7..6f5584225c1 100644 --- a/compiler/rustc_hir_analysis/src/check/intrinsic.rs +++ b/compiler/rustc_hir_analysis/src/check/intrinsic.rs @@ -367,7 +367,7 @@ pub fn check_intrinsic_type( } sym::const_deallocate => ( 0, - 0, + 1, vec![Ty::new_mut_ptr(tcx, tcx.types.u8), tcx.types.usize, tcx.types.usize], Ty::new_unit(tcx), ), diff --git a/library/core/src/intrinsics.rs b/library/core/src/intrinsics.rs index 3a178510e79..2cc01a5390b 100644 --- a/library/core/src/intrinsics.rs +++ b/library/core/src/intrinsics.rs @@ -2368,20 +2368,6 @@ extern "rust-intrinsic" { #[rustc_nounwind] pub fn ptr_guaranteed_cmp(ptr: *const T, other: *const T) -> u8; - /// Deallocates a memory which allocated by `intrinsics::const_allocate` at compile time. - /// At runtime, does nothing. - /// - /// # Safety - /// - /// - The `align` argument must be a power of two. - /// - At compile time, a compile error occurs if this constraint is violated. - /// - At runtime, it is not checked. - /// - If the `ptr` is created in an another const, this intrinsic doesn't deallocate it. - /// - If the `ptr` is pointing to a local variable, this intrinsic doesn't deallocate it. - #[rustc_const_unstable(feature = "const_heap", issue = "79597")] - #[rustc_nounwind] - pub fn const_deallocate(ptr: *mut u8, size: usize, align: usize); - /// Determines whether the raw bytes of the two values are equal. /// /// This is particularly handy for arrays, since it allows things like just @@ -2591,6 +2577,7 @@ pub(crate) const unsafe fn debug_assertions() -> bool { /// - At compile time, a compile error occurs if this constraint is violated. /// - At runtime, it is not checked. #[rustc_const_unstable(feature = "const_heap", issue = "79597")] +#[unstable(feature = "core_intrinsics", issue = "none")] #[rustc_nounwind] #[cfg_attr(not(bootstrap), rustc_intrinsic)] pub const unsafe fn const_allocate(_size: usize, _align: usize) -> *mut u8 { @@ -2598,6 +2585,22 @@ pub const unsafe fn const_allocate(_size: usize, _align: usize) -> *mut u8 { crate::ptr::null_mut() } +/// Deallocates a memory which allocated by `intrinsics::const_allocate` at compile time. +/// At runtime, does nothing. +/// +/// # Safety +/// +/// - The `align` argument must be a power of two. +/// - At compile time, a compile error occurs if this constraint is violated. +/// - At runtime, it is not checked. +/// - If the `ptr` is created in an another const, this intrinsic doesn't deallocate it. +/// - If the `ptr` is pointing to a local variable, this intrinsic doesn't deallocate it. +#[rustc_const_unstable(feature = "const_heap", issue = "79597")] +#[unstable(feature = "core_intrinsics", issue = "none")] +#[rustc_nounwind] +#[cfg_attr(not(bootstrap), rustc_intrinsic)] +pub const unsafe fn const_deallocate(_ptr: *mut u8, _size: usize, _align: usize) {} + // Some functions are defined here because they accidentally got made // available in this module on stable. See . // (`transmute` also falls into this category, but it cannot be wrapped due to the -- cgit 1.4.1-3-g733a5 From f35a2bd401cad2ca15dea8c82489ef9c7b67c4f6 Mon Sep 17 00:00:00 2001 From: Oli Scherer Date: Fri, 2 Feb 2024 14:47:59 +0000 Subject: Support safe intrinsics with fallback bodies Turn `is_val_statically_known` into such an intrinsic to demonstrate. It is perfectly safe to call after all. --- compiler/rustc_hir_analysis/src/check/intrinsic.rs | 11 ++++++++--- library/core/src/intrinsics.rs | 12 ++++-------- src/tools/miri/tests/pass/intrinsics.rs | 2 +- tests/codegen/is_val_statically_known.rs | 4 ++-- tests/ui/consts/is_val_statically_known.rs | 2 +- 5 files changed, 16 insertions(+), 15 deletions(-) diff --git a/compiler/rustc_hir_analysis/src/check/intrinsic.rs b/compiler/rustc_hir_analysis/src/check/intrinsic.rs index 6f5584225c1..f0f6bfff64a 100644 --- a/compiler/rustc_hir_analysis/src/check/intrinsic.rs +++ b/compiler/rustc_hir_analysis/src/check/intrinsic.rs @@ -71,9 +71,13 @@ fn equate_intrinsic_type<'tcx>( /// Returns the unsafety of the given intrinsic. pub fn intrinsic_operation_unsafety(tcx: TyCtxt<'_>, intrinsic_id: LocalDefId) -> hir::Unsafety { - let has_safe_attr = match tcx.has_attr(intrinsic_id, sym::rustc_safe_intrinsic) { - true => hir::Unsafety::Normal, - false => hir::Unsafety::Unsafe, + let has_safe_attr = if tcx.has_attr(intrinsic_id, sym::rustc_intrinsic) { + tcx.fn_sig(intrinsic_id).skip_binder().unsafety() + } else { + match tcx.has_attr(intrinsic_id, sym::rustc_safe_intrinsic) { + true => hir::Unsafety::Normal, + false => hir::Unsafety::Unsafe, + } }; let is_in_list = match tcx.item_name(intrinsic_id.into()) { // When adding a new intrinsic to this list, @@ -117,6 +121,7 @@ pub fn intrinsic_operation_unsafety(tcx: TyCtxt<'_>, intrinsic_id: LocalDefId) - | sym::forget | sym::black_box | sym::variant_count + | sym::is_val_statically_known | sym::ptr_mask | sym::debug_assertions => hir::Unsafety::Normal, _ => hir::Unsafety::Unsafe, diff --git a/library/core/src/intrinsics.rs b/library/core/src/intrinsics.rs index 2cc01a5390b..fc6c1eab803 100644 --- a/library/core/src/intrinsics.rs +++ b/library/core/src/intrinsics.rs @@ -2513,9 +2513,7 @@ extern "rust-intrinsic" { /// use std::hint::unreachable_unchecked; /// use std::intrinsics::is_val_statically_known; /// -/// unsafe { -/// if !is_val_statically_known(0) { unreachable_unchecked(); } -/// } +/// if !is_val_statically_known(0) { unsafe { unreachable_unchecked(); } } /// ``` /// /// This also means that the following code's behavior is unspecified; it @@ -2527,9 +2525,7 @@ extern "rust-intrinsic" { /// # #![allow(internal_features)] /// use std::intrinsics::is_val_statically_known; /// -/// unsafe { -/// assert_eq!(is_val_statically_known(0), is_val_statically_known(0)); -/// } +/// assert_eq!(is_val_statically_known(0), is_val_statically_known(0)); /// ``` /// /// Unsafe code may not rely on `is_val_statically_known` returning any @@ -2544,7 +2540,7 @@ extern "rust-intrinsic" { #[rustc_nounwind] #[unstable(feature = "core_intrinsics", issue = "none")] #[cfg_attr(not(bootstrap), rustc_intrinsic)] -pub const unsafe fn is_val_statically_known(_arg: T) -> bool { +pub const fn is_val_statically_known(_arg: T) -> bool { false } @@ -2564,7 +2560,7 @@ pub const unsafe fn is_val_statically_known(_arg: T) -> bool { #[rustc_const_unstable(feature = "delayed_debug_assertions", issue = "none")] #[unstable(feature = "core_intrinsics", issue = "none")] #[cfg_attr(not(bootstrap), rustc_intrinsic)] -pub(crate) const unsafe fn debug_assertions() -> bool { +pub(crate) const fn debug_assertions() -> bool { cfg!(debug_assertions) } diff --git a/src/tools/miri/tests/pass/intrinsics.rs b/src/tools/miri/tests/pass/intrinsics.rs index 8e46bd7ad48..0dda5aadce2 100644 --- a/src/tools/miri/tests/pass/intrinsics.rs +++ b/src/tools/miri/tests/pass/intrinsics.rs @@ -37,7 +37,7 @@ fn main() { let mut saw_false = false; for _ in 0..50 { - if unsafe { intrinsics::is_val_statically_known(0) } { + if intrinsics::is_val_statically_known(0) { saw_true = true; } else { saw_false = true; diff --git a/tests/codegen/is_val_statically_known.rs b/tests/codegen/is_val_statically_known.rs index 8f084f6c54b..95f6466b254 100644 --- a/tests/codegen/is_val_statically_known.rs +++ b/tests/codegen/is_val_statically_known.rs @@ -11,7 +11,7 @@ pub enum B { #[inline] pub fn _u32(a: u32) -> i32 { - if unsafe { is_val_statically_known(a) } { 1 } else { 0 } + if is_val_statically_known(a) { 1 } else { 0 } } // CHECK-LABEL: @_u32_true( @@ -30,7 +30,7 @@ pub fn _u32_false(a: u32) -> i32 { #[inline] pub fn _bool(b: bool) -> i32 { - if unsafe { is_val_statically_known(b) } { 3 } else { 2 } + if is_val_statically_known(b) { 3 } else { 2 } } // CHECK-LABEL: @_bool_true( diff --git a/tests/ui/consts/is_val_statically_known.rs b/tests/ui/consts/is_val_statically_known.rs index b4056375543..7362978301a 100644 --- a/tests/ui/consts/is_val_statically_known.rs +++ b/tests/ui/consts/is_val_statically_known.rs @@ -4,7 +4,7 @@ use std::intrinsics::is_val_statically_known; -const CONST_TEST: bool = unsafe { is_val_statically_known(0) }; +const CONST_TEST: bool = is_val_statically_known(0); fn main() { if CONST_TEST { -- cgit 1.4.1-3-g733a5 From 164b9c3be074239aa1857b2e47a63201eb294fc8 Mon Sep 17 00:00:00 2001 From: Oli Scherer Date: Fri, 2 Feb 2024 15:07:10 +0000 Subject: Add more tests --- tests/ui/intrinsics/safe-intrinsic-mismatch.rs | 12 ++++++++ tests/ui/intrinsics/safe-intrinsic-mismatch.stderr | 33 ++++++++++++++++++---- 2 files changed, 40 insertions(+), 5 deletions(-) diff --git a/tests/ui/intrinsics/safe-intrinsic-mismatch.rs b/tests/ui/intrinsics/safe-intrinsic-mismatch.rs index b0688e530ae..fcd6612f125 100644 --- a/tests/ui/intrinsics/safe-intrinsic-mismatch.rs +++ b/tests/ui/intrinsics/safe-intrinsic-mismatch.rs @@ -1,5 +1,6 @@ #![feature(intrinsics)] #![feature(rustc_attrs)] +#![feature(effects)] extern "rust-intrinsic" { fn size_of() -> usize; //~ ERROR intrinsic safety mismatch @@ -10,4 +11,15 @@ extern "rust-intrinsic" { //~^ ERROR intrinsic safety mismatch } +#[rustc_intrinsic] +const fn const_deallocate(_ptr: *mut u8, _size: usize, _align: usize) {} +//~^ ERROR intrinsic safety mismatch +//~| ERROR intrinsic has wrong type + +mod foo { + #[rustc_intrinsic] + unsafe fn const_deallocate(_ptr: *mut u8, _size: usize, _align: usize) {} + //~^ ERROR wrong number of const parameters +} + fn main() {} diff --git a/tests/ui/intrinsics/safe-intrinsic-mismatch.stderr b/tests/ui/intrinsics/safe-intrinsic-mismatch.stderr index b6961275e18..0b579121ac1 100644 --- a/tests/ui/intrinsics/safe-intrinsic-mismatch.stderr +++ b/tests/ui/intrinsics/safe-intrinsic-mismatch.stderr @@ -1,17 +1,17 @@ error: intrinsic safety mismatch between list of intrinsics within the compiler and core library intrinsics for intrinsic `size_of` - --> $DIR/safe-intrinsic-mismatch.rs:5:5 + --> $DIR/safe-intrinsic-mismatch.rs:6:5 | LL | fn size_of() -> usize; | ^^^^^^^^^^^^^^^^^^^^^^^^ error: intrinsic safety mismatch between list of intrinsics within the compiler and core library intrinsics for intrinsic `assume` - --> $DIR/safe-intrinsic-mismatch.rs:9:5 + --> $DIR/safe-intrinsic-mismatch.rs:10:5 | LL | fn assume(b: bool); | ^^^^^^^^^^^^^^^^^^ error: intrinsic safety mismatch between list of intrinsics within the compiler and core library intrinsics for intrinsic `size_of` - --> $DIR/safe-intrinsic-mismatch.rs:5:5 + --> $DIR/safe-intrinsic-mismatch.rs:6:5 | LL | fn size_of() -> usize; | ^^^^^^^^^^^^^^^^^^^^^^^^ @@ -19,12 +19,35 @@ LL | fn size_of() -> usize; = note: duplicate diagnostic emitted due to `-Z deduplicate-diagnostics=no` error: intrinsic safety mismatch between list of intrinsics within the compiler and core library intrinsics for intrinsic `assume` - --> $DIR/safe-intrinsic-mismatch.rs:9:5 + --> $DIR/safe-intrinsic-mismatch.rs:10:5 | LL | fn assume(b: bool); | ^^^^^^^^^^^^^^^^^^ | = note: duplicate diagnostic emitted due to `-Z deduplicate-diagnostics=no` -error: aborting due to 4 previous errors +error: intrinsic safety mismatch between list of intrinsics within the compiler and core library intrinsics for intrinsic `const_deallocate` + --> $DIR/safe-intrinsic-mismatch.rs:15:1 + | +LL | const fn const_deallocate(_ptr: *mut u8, _size: usize, _align: usize) {} + | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ + +error[E0308]: intrinsic has wrong type + --> $DIR/safe-intrinsic-mismatch.rs:15:26 + | +LL | const fn const_deallocate(_ptr: *mut u8, _size: usize, _align: usize) {} + | ^ expected unsafe fn, found normal fn + | + = note: expected signature `unsafe fn(_, _, _)` + found signature `fn(_, _, _)` + +error[E0094]: intrinsic has wrong number of const parameters: found 0, expected 1 + --> $DIR/safe-intrinsic-mismatch.rs:21:31 + | +LL | unsafe fn const_deallocate(_ptr: *mut u8, _size: usize, _align: usize) {} + | ^ expected 1 const parameter + +error: aborting due to 7 previous errors +Some errors have detailed explanations: E0094, E0308. +For more information about an error, try `rustc --explain E0094`. -- cgit 1.4.1-3-g733a5 From e99766d885a9a2c714aa58e06712d30a96b24514 Mon Sep 17 00:00:00 2001 From: demilade Date: Sat, 13 Jan 2024 14:26:08 +0100 Subject: suggest `into_iter()` when `Iterator` method called on `impl IntoIterator` --- compiler/rustc_hir_typeck/src/method/suggest.rs | 96 ++++++++++++++++++++++ .../did_you_mean/collect-without-into-iter-call.rs | 19 +++++ .../collect-without-into-iter-call.stderr | 36 ++++++++ 3 files changed, 151 insertions(+) create mode 100644 tests/ui/did_you_mean/collect-without-into-iter-call.rs create mode 100644 tests/ui/did_you_mean/collect-without-into-iter-call.stderr diff --git a/compiler/rustc_hir_typeck/src/method/suggest.rs b/compiler/rustc_hir_typeck/src/method/suggest.rs index 7fc51e36a2b..05fe6b532ea 100644 --- a/compiler/rustc_hir_typeck/src/method/suggest.rs +++ b/compiler/rustc_hir_typeck/src/method/suggest.rs @@ -109,6 +109,93 @@ impl<'a, 'tcx> FnCtxt<'a, 'tcx> { self.autoderef(span, ty).any(|(ty, _)| matches!(ty.kind(), ty::Slice(..) | ty::Array(..))) } + fn impl_into_iterator_should_be_iterator( + &self, + ty: Ty<'tcx>, + span: Span, + unsatisfied_predicates: &Vec<( + ty::Predicate<'_>, + Option>, + Option>, + )>, + ) -> bool { + fn predicate_bounds_generic_param<'tcx>( + predicate: ty::Predicate<'_>, + generics: &'tcx ty::Generics, + generic_param: &ty::GenericParamDef, + tcx: TyCtxt<'tcx>, + ) -> bool { + if let ty::PredicateKind::Clause(ty::ClauseKind::Trait(trait_pred)) = + predicate.kind().as_ref().skip_binder() + { + let ty::TraitPredicate { trait_ref: ty::TraitRef { args, .. }, .. } = trait_pred; + if args.is_empty() { + return false; + } + let Some(arg_ty) = args[0].as_type() else { + return false; + }; + let ty::Param(param) = arg_ty.kind() else { + return false; + }; + // Is `generic_param` the same as the arg for this trait predicate? + generic_param.index == generics.type_param(¶m, tcx).index + } else { + false + } + } + + fn is_iterator_predicate(predicate: ty::Predicate<'_>, tcx: TyCtxt<'_>) -> bool { + if let ty::PredicateKind::Clause(ty::ClauseKind::Trait(trait_pred)) = + predicate.kind().as_ref().skip_binder() + { + tcx.is_diagnostic_item(sym::Iterator, trait_pred.trait_ref.def_id) + } else { + false + } + } + + // Does the `ty` implement `IntoIterator`? + let Some(into_iterator_trait) = self.tcx.get_diagnostic_item(sym::IntoIterator) else { + return false; + }; + let trait_ref = ty::TraitRef::new(self.tcx, into_iterator_trait, [ty]); + let cause = ObligationCause::new(span, self.body_id, ObligationCauseCode::MiscObligation); + let obligation = Obligation::new(self.tcx, cause, self.param_env, trait_ref); + if !self.predicate_must_hold_modulo_regions(&obligation) { + return false; + } + + match ty.kind() { + ty::Param(param) => { + let generics = self.tcx.generics_of(self.body_id); + let generic_param = generics.type_param(¶m, self.tcx); + for unsatisfied in unsatisfied_predicates.iter() { + // The parameter implements `IntoIterator` + // but it has called a method that requires it to implement `Iterator` + if predicate_bounds_generic_param( + unsatisfied.0, + generics, + generic_param, + self.tcx, + ) && is_iterator_predicate(unsatisfied.0, self.tcx) + { + return true; + } + } + } + ty::Alias(ty::AliasKind::Opaque, _) => { + for unsatisfied in unsatisfied_predicates.iter() { + if is_iterator_predicate(unsatisfied.0, self.tcx) { + return true; + } + } + } + _ => return false, + } + false + } + #[instrument(level = "debug", skip(self))] pub fn report_method_error( &self, @@ -555,6 +642,15 @@ impl<'a, 'tcx> FnCtxt<'a, 'tcx> { "`count` is defined on `{iterator_trait}`, which `{rcvr_ty}` does not implement" )); } + } else if self.impl_into_iterator_should_be_iterator(rcvr_ty, span, unsatisfied_predicates) + { + err.span_label(span, format!("`{rcvr_ty}` is not an iterator")); + err.multipart_suggestion_verbose( + "call `.into_iter()` first", + vec![(span.shrink_to_lo(), format!("into_iter()."))], + Applicability::MaybeIncorrect, + ); + return Some(err); } else if !unsatisfied_predicates.is_empty() && matches!(rcvr_ty.kind(), ty::Param(_)) { // We special case the situation where we are looking for `_` in // `::method` because otherwise the machinery will look for blanket diff --git a/tests/ui/did_you_mean/collect-without-into-iter-call.rs b/tests/ui/did_you_mean/collect-without-into-iter-call.rs new file mode 100644 index 00000000000..ee4d75615bd --- /dev/null +++ b/tests/ui/did_you_mean/collect-without-into-iter-call.rs @@ -0,0 +1,19 @@ +// Tests that the compiler suggests an `into_iter` call when an `Iterator` method +// is called on something that implements `IntoIterator` + +fn main() { + let items = items(); + let other_items = items.map(|i| i + 1); + //~^ ERROR no method named `map` found for opaque type `impl IntoIterator` in the current scope + let vec: Vec = items.collect(); + //~^ ERROR no method named `collect` found for opaque type `impl IntoIterator` in the current scope +} + +fn items() -> impl IntoIterator { + vec![1, 2, 3] +} + +fn process(items: impl IntoIterator) -> Vec { + items.collect() + //~^ ERROR no method named `collect` found for type parameter `impl IntoIterator` in the current scope +} diff --git a/tests/ui/did_you_mean/collect-without-into-iter-call.stderr b/tests/ui/did_you_mean/collect-without-into-iter-call.stderr new file mode 100644 index 00000000000..797bd1e9e6f --- /dev/null +++ b/tests/ui/did_you_mean/collect-without-into-iter-call.stderr @@ -0,0 +1,36 @@ +error[E0599]: no method named `map` found for opaque type `impl IntoIterator` in the current scope + --> $DIR/collect-without-into-iter-call.rs:6:29 + | +LL | let other_items = items.map(|i| i + 1); + | ^^^ `impl IntoIterator` is not an iterator + | +help: call `.into_iter()` first + | +LL | let other_items = items.into_iter().map(|i| i + 1); + | ++++++++++++ + +error[E0599]: no method named `collect` found for opaque type `impl IntoIterator` in the current scope + --> $DIR/collect-without-into-iter-call.rs:8:31 + | +LL | let vec: Vec = items.collect(); + | ^^^^^^^ `impl IntoIterator` is not an iterator + | +help: call `.into_iter()` first + | +LL | let vec: Vec = items.into_iter().collect(); + | ++++++++++++ + +error[E0599]: no method named `collect` found for type parameter `impl IntoIterator` in the current scope + --> $DIR/collect-without-into-iter-call.rs:17:11 + | +LL | items.collect() + | ^^^^^^^ `impl IntoIterator` is not an iterator + | +help: call `.into_iter()` first + | +LL | items.into_iter().collect() + | ++++++++++++ + +error: aborting due to 3 previous errors + +For more information about this error, try `rustc --explain E0599`. -- cgit 1.4.1-3-g733a5 From d3a89cd214a41e8c339db0baf6fc7acb463e64ec Mon Sep 17 00:00:00 2001 From: Oli Scherer Date: Tue, 13 Feb 2024 10:44:50 +0000 Subject: Avoid an ICE in diagnostics --- .../src/diagnostics/mutability_errors.rs | 2 +- tests/ui/borrowck/argument_number_mismatch_ice.rs | 15 +++++++++++++++ tests/ui/borrowck/argument_number_mismatch_ice.stderr | 19 +++++++++++++++++++ 3 files changed, 35 insertions(+), 1 deletion(-) create mode 100644 tests/ui/borrowck/argument_number_mismatch_ice.rs create mode 100644 tests/ui/borrowck/argument_number_mismatch_ice.stderr diff --git a/compiler/rustc_borrowck/src/diagnostics/mutability_errors.rs b/compiler/rustc_borrowck/src/diagnostics/mutability_errors.rs index b3d684086c2..65643e93d27 100644 --- a/compiler/rustc_borrowck/src/diagnostics/mutability_errors.rs +++ b/compiler/rustc_borrowck/src/diagnostics/mutability_errors.rs @@ -698,7 +698,7 @@ impl<'a, 'tcx> MirBorrowckCtxt<'a, 'tcx> { ), .. }) => { - let hir::Ty { span, .. } = inputs[local.index() - 1]; + let hir::Ty { span, .. } = *inputs.get(local.index() - 1)?; Some(span) } _ => None, diff --git a/tests/ui/borrowck/argument_number_mismatch_ice.rs b/tests/ui/borrowck/argument_number_mismatch_ice.rs new file mode 100644 index 00000000000..67af899fdff --- /dev/null +++ b/tests/ui/borrowck/argument_number_mismatch_ice.rs @@ -0,0 +1,15 @@ +trait Hello { + fn example(val: ()); +} + +struct Test1(i32); + +impl Hello for Test1 { + fn example(&self, input: &i32) { + //~^ ERROR `&self` declaration in the impl, but not in the trait + *input = self.0; + //~^ ERROR cannot assign to `*input`, which is behind a `&` reference + } +} + +fn main() {} diff --git a/tests/ui/borrowck/argument_number_mismatch_ice.stderr b/tests/ui/borrowck/argument_number_mismatch_ice.stderr new file mode 100644 index 00000000000..2a6a6dbc64c --- /dev/null +++ b/tests/ui/borrowck/argument_number_mismatch_ice.stderr @@ -0,0 +1,19 @@ +error[E0185]: method `example` has a `&self` declaration in the impl, but not in the trait + --> $DIR/argument_number_mismatch_ice.rs:8:5 + | +LL | fn example(val: ()); + | -------------------- trait method declared without `&self` +... +LL | fn example(&self, input: &i32) { + | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ `&self` used in impl + +error[E0594]: cannot assign to `*input`, which is behind a `&` reference + --> $DIR/argument_number_mismatch_ice.rs:10:9 + | +LL | *input = self.0; + | ^^^^^^^^^^^^^^^ `input` is a `&` reference, so the data it refers to cannot be written + +error: aborting due to 2 previous errors + +Some errors have detailed explanations: E0185, E0594. +For more information about an error, try `rustc --explain E0185`. -- cgit 1.4.1-3-g733a5 From 220e8a7484de6fd4e2679a3f6577ba879be73204 Mon Sep 17 00:00:00 2001 From: trevyn <230691+trevyn@users.noreply.github.com> Date: Wed, 14 Feb 2024 12:42:32 -0800 Subject: For E0038, suggest associated type if available --- compiler/rustc_errors/src/lib.rs | 1 + compiler/rustc_resolve/src/late.rs | 18 ++++++++++++++++++ .../src/traits/error_reporting/type_err_ctxt_ext.rs | 9 +++++++++ tests/ui/suggestions/issue-116434-2015.rs | 6 ++++++ tests/ui/suggestions/issue-116434-2015.stderr | 16 ++++++++++++---- tests/ui/suggestions/issue-116434-2021.rs | 2 ++ tests/ui/suggestions/issue-116434-2021.stderr | 12 ++++++++++-- 7 files changed, 58 insertions(+), 6 deletions(-) diff --git a/compiler/rustc_errors/src/lib.rs b/compiler/rustc_errors/src/lib.rs index d876f28040d..6d5202bbbd3 100644 --- a/compiler/rustc_errors/src/lib.rs +++ b/compiler/rustc_errors/src/lib.rs @@ -524,6 +524,7 @@ pub enum StashKey { MaybeFruTypo, CallAssocMethod, TraitMissingMethod, + AssociatedTypeSuggestion, OpaqueHiddenTypeMismatch, MaybeForgetReturn, /// Query cycle detected, stashing in favor of a better error. diff --git a/compiler/rustc_resolve/src/late.rs b/compiler/rustc_resolve/src/late.rs index 6bd221ff058..3ea4df1d2a4 100644 --- a/compiler/rustc_resolve/src/late.rs +++ b/compiler/rustc_resolve/src/late.rs @@ -18,6 +18,7 @@ use rustc_ast::*; use rustc_data_structures::fx::{FxHashMap, FxHashSet, FxIndexMap}; use rustc_errors::{ codes::*, struct_span_code_err, Applicability, DiagnosticArgValue, ErrCode, IntoDiagnosticArg, + StashKey, }; use rustc_hir::def::Namespace::{self, *}; use rustc_hir::def::{self, CtorKind, DefKind, LifetimeRes, NonMacroAttrKind, PartialRes, PerNS}; @@ -3890,6 +3891,23 @@ impl<'a: 'ast, 'b, 'ast, 'tcx> LateResolutionVisitor<'a, 'b, 'ast, 'tcx> { finalize, ) { Ok(Some(partial_res)) if let Some(res) = partial_res.full_res() => { + // if we also have an associated type that matches the ident, stash a suggestion + if let Some(items) = self.diagnostic_metadata.current_trait_assoc_items + && let [Segment { ident, .. }] = path + && items.iter().any(|item| { + item.ident == *ident && matches!(item.kind, AssocItemKind::Type(_)) + }) + { + let mut diag = self.r.tcx.dcx().struct_allow(""); + diag.span_suggestion_verbose( + path_span.shrink_to_lo(), + "there is an associated type with the same name", + "Self::", + Applicability::MaybeIncorrect, + ); + diag.stash(path_span, StashKey::AssociatedTypeSuggestion); + } + if source.is_expected(res) || res == Res::Err { partial_res } else { diff --git a/compiler/rustc_trait_selection/src/traits/error_reporting/type_err_ctxt_ext.rs b/compiler/rustc_trait_selection/src/traits/error_reporting/type_err_ctxt_ext.rs index 2c8d3fc9de2..e4ae2440384 100644 --- a/compiler/rustc_trait_selection/src/traits/error_reporting/type_err_ctxt_ext.rs +++ b/compiler/rustc_trait_selection/src/traits/error_reporting/type_err_ctxt_ext.rs @@ -2922,6 +2922,15 @@ impl<'tcx> InferCtxtPrivExt<'tcx> for TypeErrCtxt<'_, 'tcx> { &mut Default::default(), ); self.suggest_unsized_bound_if_applicable(err, obligation); + if let Some(span) = err.span.primary_span() + && let Some(mut diag) = + self.tcx.dcx().steal_diagnostic(span, StashKey::AssociatedTypeSuggestion) + && let Ok(ref mut s1) = err.suggestions + && let Ok(ref mut s2) = diag.suggestions + { + s1.append(s2); + diag.cancel() + } } } diff --git a/tests/ui/suggestions/issue-116434-2015.rs b/tests/ui/suggestions/issue-116434-2015.rs index 614fc27b771..a53e2a044e9 100644 --- a/tests/ui/suggestions/issue-116434-2015.rs +++ b/tests/ui/suggestions/issue-116434-2015.rs @@ -3,9 +3,12 @@ trait Foo { fn foo() -> Clone; //~^ WARNING trait objects without an explicit `dyn` are deprecated [bare_trait_objects] //~| WARNING this is accepted in the current edition (Rust 2015) but is a hard error in Rust 2021! + //~| HELP if this is an object-safe trait, use `dyn` //~| WARNING trait objects without an explicit `dyn` are deprecated [bare_trait_objects] //~| WARNING this is accepted in the current edition (Rust 2015) but is a hard error in Rust 2021! + //~| HELP if this is an object-safe trait, use `dyn` //~| ERROR the trait `Clone` cannot be made into an object [E0038] + //~| HELP there is an associated type with the same name } trait DbHandle: Sized {} @@ -15,9 +18,12 @@ trait DbInterface { fn handle() -> DbHandle; //~^ WARNING trait objects without an explicit `dyn` are deprecated [bare_trait_objects] //~| WARNING this is accepted in the current edition (Rust 2015) but is a hard error in Rust 2021! + //~| HELP if this is an object-safe trait, use `dyn` //~| WARNING trait objects without an explicit `dyn` are deprecated [bare_trait_objects] //~| WARNING this is accepted in the current edition (Rust 2015) but is a hard error in Rust 2021! + //~| HELP if this is an object-safe trait, use `dyn` //~| ERROR the trait `DbHandle` cannot be made into an object [E0038] + //~| HELP there is an associated type with the same name } fn main() {} diff --git a/tests/ui/suggestions/issue-116434-2015.stderr b/tests/ui/suggestions/issue-116434-2015.stderr index 2d87029b6eb..73a1cfa9c1d 100644 --- a/tests/ui/suggestions/issue-116434-2015.stderr +++ b/tests/ui/suggestions/issue-116434-2015.stderr @@ -13,7 +13,7 @@ LL | fn foo() -> dyn Clone; | +++ warning: trait objects without an explicit `dyn` are deprecated - --> $DIR/issue-116434-2015.rs:15:20 + --> $DIR/issue-116434-2015.rs:18:20 | LL | fn handle() -> DbHandle; | ^^^^^^^^ @@ -47,9 +47,13 @@ LL | fn foo() -> Clone; | = note: the trait cannot be made into an object because it requires `Self: Sized` = note: for a trait to be "object safe" it needs to allow building a vtable to allow the call to be resolvable dynamically; for more information visit +help: there is an associated type with the same name + | +LL | fn foo() -> Self::Clone; + | ++++++ warning: trait objects without an explicit `dyn` are deprecated - --> $DIR/issue-116434-2015.rs:15:20 + --> $DIR/issue-116434-2015.rs:18:20 | LL | fn handle() -> DbHandle; | ^^^^^^^^ @@ -63,18 +67,22 @@ LL | fn handle() -> dyn DbHandle; | +++ error[E0038]: the trait `DbHandle` cannot be made into an object - --> $DIR/issue-116434-2015.rs:15:20 + --> $DIR/issue-116434-2015.rs:18:20 | LL | fn handle() -> DbHandle; | ^^^^^^^^ `DbHandle` cannot be made into an object | note: for a trait to be "object safe" it needs to allow building a vtable to allow the call to be resolvable dynamically; for more information visit - --> $DIR/issue-116434-2015.rs:11:17 + --> $DIR/issue-116434-2015.rs:14:17 | LL | trait DbHandle: Sized {} | -------- ^^^^^ ...because it requires `Self: Sized` | | | this trait cannot be made into an object... +help: there is an associated type with the same name + | +LL | fn handle() -> Self::DbHandle; + | ++++++ error: aborting due to 2 previous errors; 4 warnings emitted diff --git a/tests/ui/suggestions/issue-116434-2021.rs b/tests/ui/suggestions/issue-116434-2021.rs index 74c30e0cc1f..e7159bc2f3c 100644 --- a/tests/ui/suggestions/issue-116434-2021.rs +++ b/tests/ui/suggestions/issue-116434-2021.rs @@ -4,6 +4,7 @@ trait Foo { type Clone; fn foo() -> Clone; //~^ ERROR the trait `Clone` cannot be made into an object [E0038] + //~| HELP there is an associated type with the same name } trait DbHandle: Sized {} @@ -12,6 +13,7 @@ trait DbInterface { type DbHandle; fn handle() -> DbHandle; //~^ ERROR the trait `DbHandle` cannot be made into an object [E0038] + //~| HELP there is an associated type with the same name } fn main() {} diff --git a/tests/ui/suggestions/issue-116434-2021.stderr b/tests/ui/suggestions/issue-116434-2021.stderr index 43ad82d484a..a10d6ef6da4 100644 --- a/tests/ui/suggestions/issue-116434-2021.stderr +++ b/tests/ui/suggestions/issue-116434-2021.stderr @@ -6,20 +6,28 @@ LL | fn foo() -> Clone; | = note: the trait cannot be made into an object because it requires `Self: Sized` = note: for a trait to be "object safe" it needs to allow building a vtable to allow the call to be resolvable dynamically; for more information visit +help: there is an associated type with the same name + | +LL | fn foo() -> Self::Clone; + | ++++++ error[E0038]: the trait `DbHandle` cannot be made into an object - --> $DIR/issue-116434-2021.rs:13:20 + --> $DIR/issue-116434-2021.rs:14:20 | LL | fn handle() -> DbHandle; | ^^^^^^^^ `DbHandle` cannot be made into an object | note: for a trait to be "object safe" it needs to allow building a vtable to allow the call to be resolvable dynamically; for more information visit - --> $DIR/issue-116434-2021.rs:9:17 + --> $DIR/issue-116434-2021.rs:10:17 | LL | trait DbHandle: Sized {} | -------- ^^^^^ ...because it requires `Self: Sized` | | | this trait cannot be made into an object... +help: there is an associated type with the same name + | +LL | fn handle() -> Self::DbHandle; + | ++++++ error: aborting due to 2 previous errors -- cgit 1.4.1-3-g733a5 From 746a58d4359786e4aebb372a30829706fa5a968f Mon Sep 17 00:00:00 2001 From: Markus Reiter Date: Mon, 29 Jan 2024 23:59:09 +0100 Subject: Use generic `NonZero` internally. --- compiler/rustc_attr/src/builtin.rs | 6 +- compiler/rustc_attr/src/lib.rs | 1 + .../rustc_const_eval/src/interpret/validity.rs | 4 +- compiler/rustc_const_eval/src/interpret/visitor.rs | 4 +- compiler/rustc_const_eval/src/lib.rs | 1 + compiler/rustc_data_structures/src/lib.rs | 1 + .../rustc_data_structures/src/stable_hasher.rs | 5 +- .../rustc_data_structures/src/sync/worker_local.rs | 6 +- .../rustc_data_structures/src/tagged_ptr/copy.rs | 9 +- compiler/rustc_errors/src/diagnostic_impls.rs | 2 +- compiler/rustc_errors/src/lib.rs | 5 +- compiler/rustc_feature/src/lib.rs | 17 +- compiler/rustc_hir_analysis/src/check/mod.rs | 4 +- compiler/rustc_hir_analysis/src/lib.rs | 1 + compiler/rustc_interface/src/lib.rs | 1 + compiler/rustc_interface/src/tests.rs | 4 +- compiler/rustc_interface/src/util.rs | 2 +- compiler/rustc_lint/src/lib.rs | 1 + compiler/rustc_lint/src/lints.rs | 5 +- compiler/rustc_metadata/src/lib.rs | 1 + compiler/rustc_metadata/src/rmeta/decoder.rs | 14 +- compiler/rustc_metadata/src/rmeta/encoder.rs | 8 +- compiler/rustc_metadata/src/rmeta/mod.rs | 20 +- compiler/rustc_metadata/src/rmeta/table.rs | 6 +- compiler/rustc_middle/src/lib.rs | 1 + compiler/rustc_middle/src/middle/stability.rs | 8 +- compiler/rustc_middle/src/mir/interpret/mod.rs | 8 +- compiler/rustc_middle/src/mir/interpret/pointer.rs | 6 +- compiler/rustc_middle/src/ty/consts/int.rs | 27 ++- compiler/rustc_middle/src/ty/generic_args.rs | 4 +- compiler/rustc_middle/src/ty/layout.rs | 4 +- compiler/rustc_middle/src/ty/mod.rs | 4 +- compiler/rustc_passes/src/lib.rs | 1 + compiler/rustc_passes/src/stability.rs | 4 +- compiler/rustc_query_impl/src/lib.rs | 1 + compiler/rustc_query_impl/src/plumbing.rs | 4 +- compiler/rustc_query_system/src/lib.rs | 1 + compiler/rustc_query_system/src/query/job.rs | 4 +- compiler/rustc_serialize/src/lib.rs | 1 + compiler/rustc_serialize/src/serialize.rs | 7 +- compiler/rustc_session/src/config.rs | 4 +- compiler/rustc_session/src/errors.rs | 4 +- compiler/rustc_session/src/lib.rs | 1 + compiler/rustc_session/src/options.rs | 13 +- library/alloc/src/collections/binary_heap/mod.rs | 10 +- .../alloc/src/collections/vec_deque/into_iter.rs | 10 +- library/alloc/src/collections/vec_deque/iter.rs | 6 +- .../alloc/src/collections/vec_deque/iter_mut.rs | 6 +- library/alloc/src/lib.rs | 1 + library/alloc/src/vec/in_place_collect.rs | 6 +- library/alloc/src/vec/into_iter.rs | 14 +- library/alloc/tests/lib.rs | 1 + library/alloc/tests/vec.rs | 8 +- library/alloc/tests/vec_deque.rs | 6 +- library/core/src/array/iter.rs | 10 +- library/core/src/ascii.rs | 6 +- library/core/src/char/mod.rs | 6 +- library/core/src/cmp/bytewise.rs | 4 +- library/core/src/escape.rs | 6 +- library/core/src/iter/adapters/array_chunks.rs | 8 +- library/core/src/iter/adapters/by_ref_sized.rs | 6 +- library/core/src/iter/adapters/chain.rs | 10 +- library/core/src/iter/adapters/cloned.rs | 6 +- library/core/src/iter/adapters/copied.rs | 10 +- library/core/src/iter/adapters/cycle.rs | 6 +- library/core/src/iter/adapters/enumerate.rs | 10 +- library/core/src/iter/adapters/filter.rs | 6 +- library/core/src/iter/adapters/filter_map.rs | 6 +- library/core/src/iter/adapters/flatten.rs | 46 ++-- library/core/src/iter/adapters/inspect.rs | 6 +- library/core/src/iter/adapters/map.rs | 6 +- library/core/src/iter/adapters/map_while.rs | 6 +- library/core/src/iter/adapters/mod.rs | 6 +- library/core/src/iter/adapters/rev.rs | 6 +- library/core/src/iter/adapters/scan.rs | 6 +- library/core/src/iter/adapters/skip.rs | 14 +- library/core/src/iter/adapters/skip_while.rs | 6 +- library/core/src/iter/adapters/take.rs | 14 +- library/core/src/iter/adapters/take_while.rs | 6 +- library/core/src/iter/adapters/zip.rs | 6 +- library/core/src/iter/range.rs | 26 +- library/core/src/iter/sources/repeat.rs | 6 +- library/core/src/iter/sources/repeat_n.rs | 8 +- library/core/src/iter/traits/double_ended.rs | 10 +- library/core/src/iter/traits/iterator.rs | 10 +- library/core/src/iter/traits/marker.rs | 6 +- library/core/src/num/nonzero.rs | 10 +- library/core/src/ops/index_range.rs | 10 +- library/core/src/ptr/alignment.rs | 4 +- library/core/src/ptr/non_null.rs | 4 +- library/core/src/slice/iter.rs | 2 +- library/core/src/slice/iter/macros.rs | 8 +- library/core/src/slice/mod.rs | 4 +- library/core/src/str/iter.rs | 4 +- library/core/tests/array.rs | 10 +- library/core/tests/iter/adapters/chain.rs | 17 +- library/core/tests/iter/adapters/enumerate.rs | 4 +- library/core/tests/iter/adapters/flatten.rs | 6 +- library/core/tests/iter/adapters/skip.rs | 8 +- library/core/tests/iter/adapters/take.rs | 16 +- library/core/tests/iter/range.rs | 4 +- library/core/tests/iter/traits/iterator.rs | 27 ++- library/core/tests/lib.rs | 1 + library/core/tests/nonzero.rs | 265 +++++++++++---------- library/core/tests/ptr.rs | 6 +- library/core/tests/result.rs | 13 +- library/core/tests/slice.rs | 6 +- library/proc_macro/src/bridge/handle.rs | 6 +- library/proc_macro/src/bridge/rpc.rs | 6 +- library/proc_macro/src/bridge/symbol.rs | 8 +- library/proc_macro/src/lib.rs | 1 + library/std/src/sys/pal/hermit/thread.rs | 6 +- library/std/src/sys/pal/itron/thread.rs | 3 +- library/std/src/sys/pal/sgx/abi/tls/mod.rs | 8 +- library/std/src/sys/pal/sgx/abi/usercalls/raw.rs | 17 +- library/std/src/sys/pal/sgx/rwlock.rs | 14 +- library/std/src/sys/pal/sgx/thread.rs | 4 +- library/std/src/sys/pal/sgx/waitqueue/mod.rs | 6 +- library/std/src/sys/pal/teeos/thread.rs | 4 +- library/std/src/sys/pal/uefi/thread.rs | 6 +- .../sys/pal/unix/process/process_common/tests.rs | 4 +- .../src/sys/pal/unix/process/process_fuchsia.rs | 8 +- .../std/src/sys/pal/unix/process/process_unix.rs | 4 +- .../sys/pal/unix/process/process_unsupported.rs | 4 +- .../src/sys/pal/unix/process/process_vxworks.rs | 4 +- library/std/src/sys/pal/unix/thread.rs | 18 +- library/std/src/sys/pal/unsupported/process.rs | 4 +- library/std/src/sys/pal/unsupported/thread.rs | 4 +- library/std/src/sys/pal/wasi/thread.rs | 4 +- library/std/src/sys/pal/wasm/atomics/thread.rs | 4 +- library/std/src/sys/pal/windows/args.rs | 16 +- library/std/src/sys/pal/windows/process.rs | 4 +- library/std/src/sys/pal/windows/thread.rs | 6 +- library/std/src/sys/pal/xous/thread.rs | 6 +- library/std/src/sys_common/wstr.rs | 13 +- library/std/src/thread/mod.rs | 9 +- src/tools/miri/src/bin/miri.rs | 5 +- src/tools/miri/src/borrow_tracker/mod.rs | 14 +- src/tools/miri/src/concurrency/init_once.rs | 1 - src/tools/miri/src/concurrency/sync.rs | 9 +- src/tools/miri/src/diagnostics.rs | 4 +- src/tools/miri/src/helpers.rs | 4 +- src/tools/miri/src/lib.rs | 1 + src/tools/miri/src/shims/foreign_items.rs | 2 +- 144 files changed, 658 insertions(+), 609 deletions(-) diff --git a/compiler/rustc_attr/src/builtin.rs b/compiler/rustc_attr/src/builtin.rs index a3783db5f80..f414ff746bb 100644 --- a/compiler/rustc_attr/src/builtin.rs +++ b/compiler/rustc_attr/src/builtin.rs @@ -13,7 +13,7 @@ use rustc_session::parse::feature_err; use rustc_session::{RustcVersion, Session}; use rustc_span::hygiene::Transparency; use rustc_span::{symbol::sym, symbol::Symbol, Span}; -use std::num::NonZeroU32; +use std::num::NonZero; use crate::session_diagnostics::{self, IncorrectReprFormatGenericCause}; @@ -113,7 +113,7 @@ pub enum StabilityLevel { /// Reason for the current stability level. reason: UnstableReason, /// Relevant `rust-lang/rust` issue. - issue: Option, + issue: Option>, is_soft: bool, /// If part of a feature is stabilized and a new feature is added for the remaining parts, /// then the `implied_by` attribute is used to indicate which now-stable feature previously @@ -442,7 +442,7 @@ fn parse_unstability(sess: &Session, attr: &Attribute) -> Option<(Symbol, Stabil // is a name/value pair string literal. issue_num = match issue.unwrap().as_str() { "none" => None, - issue => match issue.parse::() { + issue => match issue.parse::>() { Ok(num) => Some(num), Err(err) => { sess.dcx().emit_err( diff --git a/compiler/rustc_attr/src/lib.rs b/compiler/rustc_attr/src/lib.rs index dd87a5c4dc3..fada69c4e6d 100644 --- a/compiler/rustc_attr/src/lib.rs +++ b/compiler/rustc_attr/src/lib.rs @@ -7,6 +7,7 @@ #![allow(internal_features)] #![feature(rustdoc_internals)] #![doc(rust_logo)] +#![feature(generic_nonzero)] #![feature(let_chains)] #[macro_use] diff --git a/compiler/rustc_const_eval/src/interpret/validity.rs b/compiler/rustc_const_eval/src/interpret/validity.rs index eb9f3fee165..d9edcf6ea97 100644 --- a/compiler/rustc_const_eval/src/interpret/validity.rs +++ b/compiler/rustc_const_eval/src/interpret/validity.rs @@ -5,7 +5,7 @@ //! to be const-safe. use std::fmt::Write; -use std::num::NonZeroUsize; +use std::num::NonZero; use either::{Left, Right}; @@ -782,7 +782,7 @@ impl<'rt, 'mir, 'tcx: 'mir, M: Machine<'mir, 'tcx>> ValueVisitor<'mir, 'tcx, M> fn visit_union( &mut self, op: &OpTy<'tcx, M::Provenance>, - _fields: NonZeroUsize, + _fields: NonZero, ) -> InterpResult<'tcx> { // Special check for CTFE validation, preventing `UnsafeCell` inside unions in immutable memory. if self.ctfe_mode.is_some_and(|c| !c.allow_immutable_unsafe_cell()) { diff --git a/compiler/rustc_const_eval/src/interpret/visitor.rs b/compiler/rustc_const_eval/src/interpret/visitor.rs index 340a496a689..b200ecbf73a 100644 --- a/compiler/rustc_const_eval/src/interpret/visitor.rs +++ b/compiler/rustc_const_eval/src/interpret/visitor.rs @@ -7,7 +7,7 @@ use rustc_middle::ty; use rustc_target::abi::FieldIdx; use rustc_target::abi::{FieldsShape, VariantIdx, Variants}; -use std::num::NonZeroUsize; +use std::num::NonZero; use super::{InterpCx, MPlaceTy, Machine, Projectable}; @@ -43,7 +43,7 @@ pub trait ValueVisitor<'mir, 'tcx: 'mir, M: Machine<'mir, 'tcx>>: Sized { } /// Visits the given value as a union. No automatic recursion can happen here. #[inline(always)] - fn visit_union(&mut self, _v: &Self::V, _fields: NonZeroUsize) -> InterpResult<'tcx> { + fn visit_union(&mut self, _v: &Self::V, _fields: NonZero) -> InterpResult<'tcx> { Ok(()) } /// Visits the given value as the pointer of a `Box`. There is nothing to recurse into. diff --git a/compiler/rustc_const_eval/src/lib.rs b/compiler/rustc_const_eval/src/lib.rs index 839cfd8d85a..fd8be45e25d 100644 --- a/compiler/rustc_const_eval/src/lib.rs +++ b/compiler/rustc_const_eval/src/lib.rs @@ -11,6 +11,7 @@ Rust MIR: a lowered representation of Rust. #![feature(assert_matches)] #![feature(box_patterns)] #![feature(decl_macro)] +#![feature(generic_nonzero)] #![feature(let_chains)] #![feature(slice_ptr_get)] #![feature(never_type)] diff --git a/compiler/rustc_data_structures/src/lib.rs b/compiler/rustc_data_structures/src/lib.rs index 2b799d6f5d3..b82a9a909e6 100644 --- a/compiler/rustc_data_structures/src/lib.rs +++ b/compiler/rustc_data_structures/src/lib.rs @@ -20,6 +20,7 @@ #![feature(cfg_match)] #![feature(core_intrinsics)] #![feature(extend_one)] +#![feature(generic_nonzero)] #![feature(hash_raw_entry)] #![feature(hasher_prefixfree_extras)] #![feature(lazy_cell)] diff --git a/compiler/rustc_data_structures/src/stable_hasher.rs b/compiler/rustc_data_structures/src/stable_hasher.rs index 52304c72a2f..15691804a94 100644 --- a/compiler/rustc_data_structures/src/stable_hasher.rs +++ b/compiler/rustc_data_structures/src/stable_hasher.rs @@ -6,6 +6,7 @@ use std::fmt; use std::hash::{BuildHasher, Hash, Hasher}; use std::marker::PhantomData; use std::mem; +use std::num::NonZero; #[cfg(test)] mod tests; @@ -338,14 +339,14 @@ impl HashStable for PhantomData { fn hash_stable(&self, _ctx: &mut CTX, _hasher: &mut StableHasher) {} } -impl HashStable for ::std::num::NonZeroU32 { +impl HashStable for NonZero { #[inline] fn hash_stable(&self, ctx: &mut CTX, hasher: &mut StableHasher) { self.get().hash_stable(ctx, hasher) } } -impl HashStable for ::std::num::NonZeroUsize { +impl HashStable for NonZero { #[inline] fn hash_stable(&self, ctx: &mut CTX, hasher: &mut StableHasher) { self.get().hash_stable(ctx, hasher) diff --git a/compiler/rustc_data_structures/src/sync/worker_local.rs b/compiler/rustc_data_structures/src/sync/worker_local.rs index b34d3dd9044..50a614a1b02 100644 --- a/compiler/rustc_data_structures/src/sync/worker_local.rs +++ b/compiler/rustc_data_structures/src/sync/worker_local.rs @@ -1,7 +1,7 @@ use parking_lot::Mutex; use std::cell::Cell; use std::cell::OnceCell; -use std::num::NonZeroUsize; +use std::num::NonZero; use std::ops::Deref; use std::ptr; use std::sync::Arc; @@ -31,7 +31,7 @@ impl RegistryId { } struct RegistryData { - thread_limit: NonZeroUsize, + thread_limit: NonZero, threads: Mutex, } @@ -61,7 +61,7 @@ thread_local! { impl Registry { /// Creates a registry which can hold up to `thread_limit` threads. - pub fn new(thread_limit: NonZeroUsize) -> Self { + pub fn new(thread_limit: NonZero) -> Self { Registry(Arc::new(RegistryData { thread_limit, threads: Mutex::new(0) })) } diff --git a/compiler/rustc_data_structures/src/tagged_ptr/copy.rs b/compiler/rustc_data_structures/src/tagged_ptr/copy.rs index e893a2c7813..8af4042ad87 100644 --- a/compiler/rustc_data_structures/src/tagged_ptr/copy.rs +++ b/compiler/rustc_data_structures/src/tagged_ptr/copy.rs @@ -4,7 +4,7 @@ use std::fmt; use std::hash::{Hash, Hasher}; use std::marker::PhantomData; use std::mem::ManuallyDrop; -use std::num::NonZeroUsize; +use std::num::NonZero; use std::ops::{Deref, DerefMut}; use std::ptr::NonNull; @@ -134,7 +134,7 @@ where ptr.map_addr(|addr| { // Safety: - // - The pointer is `NonNull` => it's address is `NonZeroUsize` + // - The pointer is `NonNull` => it's address is `NonZero` // - `P::BITS` least significant bits are always zero (`Pointer` contract) // - `T::BITS <= P::BITS` (from `Self::ASSERTION`) // @@ -143,14 +143,15 @@ where // `{non_zero} | packed_tag` can't make the value zero. let packed = (addr.get() >> T::BITS) | packed_tag; - unsafe { NonZeroUsize::new_unchecked(packed) } + unsafe { NonZero::::new_unchecked(packed) } }) } /// Retrieves the original raw pointer from `self.packed`. #[inline] pub(super) fn pointer_raw(&self) -> NonNull { - self.packed.map_addr(|addr| unsafe { NonZeroUsize::new_unchecked(addr.get() << T::BITS) }) + self.packed + .map_addr(|addr| unsafe { NonZero::::new_unchecked(addr.get() << T::BITS) }) } /// This provides a reference to the `P` pointer itself, rather than the diff --git a/compiler/rustc_errors/src/diagnostic_impls.rs b/compiler/rustc_errors/src/diagnostic_impls.rs index e936ebc7185..eaf75539f59 100644 --- a/compiler/rustc_errors/src/diagnostic_impls.rs +++ b/compiler/rustc_errors/src/diagnostic_impls.rs @@ -79,7 +79,7 @@ into_diagnostic_arg_using_display!( ast::ParamKindOrd, std::io::Error, Box, - std::num::NonZeroU32, + std::num::NonZero, hir::Target, Edition, Ident, diff --git a/compiler/rustc_errors/src/lib.rs b/compiler/rustc_errors/src/lib.rs index d876f28040d..9f8aee614d7 100644 --- a/compiler/rustc_errors/src/lib.rs +++ b/compiler/rustc_errors/src/lib.rs @@ -16,6 +16,7 @@ #![feature(box_patterns)] #![feature(error_reporter)] #![feature(extract_if)] +#![feature(generic_nonzero)] #![feature(let_chains)] #![feature(negative_impls)] #![feature(never_type)] @@ -77,7 +78,7 @@ use std::error::Report; use std::fmt; use std::hash::Hash; use std::io::Write; -use std::num::NonZeroUsize; +use std::num::NonZero; use std::ops::DerefMut; use std::panic; use std::path::{Path, PathBuf}; @@ -545,7 +546,7 @@ pub struct DiagCtxtFlags { pub can_emit_warnings: bool, /// If Some, the Nth error-level diagnostic is upgraded to bug-level. /// (rustc: see `-Z treat-err-as-bug`) - pub treat_err_as_bug: Option, + pub treat_err_as_bug: Option>, /// Eagerly emit delayed bugs as errors, so that the compiler debugger may /// see all of the errors being emitted at once. pub eagerly_emit_delayed_bugs: bool, diff --git a/compiler/rustc_feature/src/lib.rs b/compiler/rustc_feature/src/lib.rs index f1c8f2e2dde..02ce5d3534c 100644 --- a/compiler/rustc_feature/src/lib.rs +++ b/compiler/rustc_feature/src/lib.rs @@ -12,6 +12,7 @@ //! symbol to the `accepted` or `removed` modules respectively. #![allow(internal_features)] +#![feature(generic_nonzero)] #![feature(rustdoc_internals)] #![doc(rust_logo)] #![feature(lazy_cell)] @@ -25,13 +26,13 @@ mod unstable; mod tests; use rustc_span::symbol::Symbol; -use std::num::NonZeroU32; +use std::num::NonZero; #[derive(Debug, Clone)] pub struct Feature { pub name: Symbol, pub since: &'static str, - issue: Option, + issue: Option>, } #[derive(Copy, Clone, Debug)] @@ -85,7 +86,7 @@ impl UnstableFeatures { } } -fn find_lang_feature_issue(feature: Symbol) -> Option { +fn find_lang_feature_issue(feature: Symbol) -> Option> { // Search in all the feature lists. if let Some(f) = UNSTABLE_FEATURES.iter().find(|f| f.feature.name == feature) { return f.feature.issue; @@ -99,21 +100,21 @@ fn find_lang_feature_issue(feature: Symbol) -> Option { panic!("feature `{feature}` is not declared anywhere"); } -const fn to_nonzero(n: Option) -> Option { - // Can be replaced with `n.and_then(NonZeroU32::new)` if that is ever usable +const fn to_nonzero(n: Option) -> Option> { + // Can be replaced with `n.and_then(NonZero::new)` if that is ever usable // in const context. Requires https://github.com/rust-lang/rfcs/pull/2632. match n { None => None, - Some(n) => NonZeroU32::new(n), + Some(n) => NonZero::::new(n), } } pub enum GateIssue { Language, - Library(Option), + Library(Option>), } -pub fn find_feature_issue(feature: Symbol, issue: GateIssue) -> Option { +pub fn find_feature_issue(feature: Symbol, issue: GateIssue) -> Option> { match issue { GateIssue::Language => find_lang_feature_issue(feature), GateIssue::Library(lib) => lib, diff --git a/compiler/rustc_hir_analysis/src/check/mod.rs b/compiler/rustc_hir_analysis/src/check/mod.rs index 2f8e065df33..6b064b36cf1 100644 --- a/compiler/rustc_hir_analysis/src/check/mod.rs +++ b/compiler/rustc_hir_analysis/src/check/mod.rs @@ -74,7 +74,7 @@ pub mod wfcheck; pub use check::check_abi; -use std::num::NonZeroU32; +use std::num::NonZero; use rustc_data_structures::fx::{FxHashMap, FxHashSet}; use rustc_errors::ErrorGuaranteed; @@ -270,7 +270,7 @@ fn default_body_is_unstable( item_did: DefId, feature: Symbol, reason: Option, - issue: Option, + issue: Option>, ) { let missing_item_name = tcx.associated_item(item_did).name; let (mut some_note, mut none_note, mut reason_str) = (false, false, String::new()); diff --git a/compiler/rustc_hir_analysis/src/lib.rs b/compiler/rustc_hir_analysis/src/lib.rs index 1cd77050217..d507fb39e19 100644 --- a/compiler/rustc_hir_analysis/src/lib.rs +++ b/compiler/rustc_hir_analysis/src/lib.rs @@ -63,6 +63,7 @@ This API is completely unstable and subject to change. #![feature(rustdoc_internals)] #![allow(internal_features)] #![feature(control_flow_enum)] +#![feature(generic_nonzero)] #![feature(if_let_guard)] #![feature(is_sorted)] #![feature(iter_intersperse)] diff --git a/compiler/rustc_interface/src/lib.rs b/compiler/rustc_interface/src/lib.rs index 7d69e49b209..24c2e290534 100644 --- a/compiler/rustc_interface/src/lib.rs +++ b/compiler/rustc_interface/src/lib.rs @@ -1,5 +1,6 @@ #![feature(decl_macro)] #![feature(error_iter)] +#![feature(generic_nonzero)] #![feature(lazy_cell)] #![feature(let_chains)] #![feature(thread_spawn_unchecked)] diff --git a/compiler/rustc_interface/src/tests.rs b/compiler/rustc_interface/src/tests.rs index bfc4fc07d4c..a9c614df7ad 100644 --- a/compiler/rustc_interface/src/tests.rs +++ b/compiler/rustc_interface/src/tests.rs @@ -20,7 +20,7 @@ use rustc_span::{FileName, SourceFileHashAlgorithm}; use rustc_target::spec::{CodeModel, LinkerFlavorCli, MergeFunctions, PanicStrategy, RelocModel}; use rustc_target::spec::{RelroLevel, SanitizerSet, SplitDebuginfo, StackProtector, TlsModel}; use std::collections::{BTreeMap, BTreeSet}; -use std::num::NonZeroUsize; +use std::num::NonZero; use std::path::{Path, PathBuf}; use std::sync::Arc; @@ -827,7 +827,7 @@ fn test_unstable_options_tracking_hash() { tracked!(tls_model, Some(TlsModel::GeneralDynamic)); tracked!(translate_remapped_path_to_local_path, false); tracked!(trap_unreachable, Some(false)); - tracked!(treat_err_as_bug, NonZeroUsize::new(1)); + tracked!(treat_err_as_bug, NonZero::::new(1)); tracked!(tune_cpu, Some(String::from("abc"))); tracked!(uninit_const_chunk_threshold, 123); tracked!(unleash_the_miri_inside_of_you, true); diff --git a/compiler/rustc_interface/src/util.rs b/compiler/rustc_interface/src/util.rs index 76b9e8de75f..00cf84138ba 100644 --- a/compiler/rustc_interface/src/util.rs +++ b/compiler/rustc_interface/src/util.rs @@ -107,7 +107,7 @@ pub(crate) fn run_in_thread_pool_with_globals R + Send, R: Send>( use rustc_query_impl::QueryCtxt; use rustc_query_system::query::{deadlock, QueryContext}; - let registry = sync::Registry::new(std::num::NonZeroUsize::new(threads).unwrap()); + let registry = sync::Registry::new(std::num::NonZero::::new(threads).unwrap()); if !sync::is_dyn_thread_safe() { return run_in_thread_with_globals(edition, || { diff --git a/compiler/rustc_lint/src/lib.rs b/compiler/rustc_lint/src/lib.rs index 5f769e9ad8a..85f9d3bd63e 100644 --- a/compiler/rustc_lint/src/lib.rs +++ b/compiler/rustc_lint/src/lib.rs @@ -31,6 +31,7 @@ #![feature(array_windows)] #![feature(box_patterns)] #![feature(control_flow_enum)] +#![feature(generic_nonzero)] #![feature(if_let_guard)] #![feature(iter_order_by)] #![feature(let_chains)] diff --git a/compiler/rustc_lint/src/lints.rs b/compiler/rustc_lint/src/lints.rs index 7445e2e80b4..da59ffebdc5 100644 --- a/compiler/rustc_lint/src/lints.rs +++ b/compiler/rustc_lint/src/lints.rs @@ -1,7 +1,6 @@ #![allow(rustc::diagnostic_outside_of_impl)] #![allow(rustc::untranslatable_diagnostic)] - -use std::num::NonZeroU32; +use std::num::NonZero; use crate::errors::RequestedLevel; use crate::fluent_generated as fluent; @@ -402,7 +401,7 @@ pub struct BuiltinIncompleteFeaturesHelp; #[derive(Subdiagnostic)] #[note(lint_note)] pub struct BuiltinFeatureIssueNote { - pub n: NonZeroU32, + pub n: NonZero, } pub struct BuiltinUnpermittedTypeInit<'a> { diff --git a/compiler/rustc_metadata/src/lib.rs b/compiler/rustc_metadata/src/lib.rs index 2e7130f3565..70ad8598957 100644 --- a/compiler/rustc_metadata/src/lib.rs +++ b/compiler/rustc_metadata/src/lib.rs @@ -5,6 +5,7 @@ #![feature(decl_macro)] #![feature(extract_if)] #![feature(coroutines)] +#![feature(generic_nonzero)] #![feature(iter_from_coroutine)] #![feature(let_chains)] #![feature(if_let_guard)] diff --git a/compiler/rustc_metadata/src/rmeta/decoder.rs b/compiler/rustc_metadata/src/rmeta/decoder.rs index 72e9744295b..8a031e4f3a3 100644 --- a/compiler/rustc_metadata/src/rmeta/decoder.rs +++ b/compiler/rustc_metadata/src/rmeta/decoder.rs @@ -327,7 +327,7 @@ impl<'a, 'tcx> DecodeContext<'a, 'tcx> { } #[inline] - fn read_lazy_offset_then(&mut self, f: impl Fn(NonZeroUsize) -> T) -> T { + fn read_lazy_offset_then(&mut self, f: impl Fn(NonZero) -> T) -> T { let distance = self.read_usize(); let position = match self.lazy_state { LazyState::NoNode => bug!("read_lazy_with_meta: outside of a metadata node"), @@ -338,7 +338,7 @@ impl<'a, 'tcx> DecodeContext<'a, 'tcx> { } LazyState::Previous(last_pos) => last_pos.get() + distance, }; - let position = NonZeroUsize::new(position).unwrap(); + let position = NonZero::::new(position).unwrap(); self.lazy_state = LazyState::Previous(position); f(position) } @@ -685,15 +685,17 @@ impl MetadataBlob { } pub(crate) fn get_rustc_version(&self) -> String { - LazyValue::::from_position(NonZeroUsize::new(METADATA_HEADER.len() + 8).unwrap()) - .decode(self) + LazyValue::::from_position( + NonZero::::new(METADATA_HEADER.len() + 8).unwrap(), + ) + .decode(self) } - fn root_pos(&self) -> NonZeroUsize { + fn root_pos(&self) -> NonZero { let offset = METADATA_HEADER.len(); let pos_bytes = self.blob()[offset..][..8].try_into().unwrap(); let pos = u64::from_le_bytes(pos_bytes); - NonZeroUsize::new(pos as usize).unwrap() + NonZero::::new(pos as usize).unwrap() } pub(crate) fn get_header(&self) -> CrateHeader { diff --git a/compiler/rustc_metadata/src/rmeta/encoder.rs b/compiler/rustc_metadata/src/rmeta/encoder.rs index 4a24c038f7a..51d747efdd3 100644 --- a/compiler/rustc_metadata/src/rmeta/encoder.rs +++ b/compiler/rustc_metadata/src/rmeta/encoder.rs @@ -421,7 +421,7 @@ macro_rules! record_defaulted_array { } impl<'a, 'tcx> EncodeContext<'a, 'tcx> { - fn emit_lazy_distance(&mut self, position: NonZeroUsize) { + fn emit_lazy_distance(&mut self, position: NonZero) { let pos = position.get(); let distance = match self.lazy_state { LazyState::NoNode => bug!("emit_lazy_distance: outside of a metadata node"), @@ -439,7 +439,7 @@ impl<'a, 'tcx> EncodeContext<'a, 'tcx> { position.get() - last_pos.get() } }; - self.lazy_state = LazyState::Previous(NonZeroUsize::new(pos).unwrap()); + self.lazy_state = LazyState::Previous(NonZero::::new(pos).unwrap()); self.emit_usize(distance); } @@ -447,7 +447,7 @@ impl<'a, 'tcx> EncodeContext<'a, 'tcx> { where T::Value<'tcx>: Encodable>, { - let pos = NonZeroUsize::new(self.position()).unwrap(); + let pos = NonZero::::new(self.position()).unwrap(); assert_eq!(self.lazy_state, LazyState::NoNode); self.lazy_state = LazyState::NodeStart(pos); @@ -466,7 +466,7 @@ impl<'a, 'tcx> EncodeContext<'a, 'tcx> { where T::Value<'tcx>: Encodable>, { - let pos = NonZeroUsize::new(self.position()).unwrap(); + let pos = NonZero::::new(self.position()).unwrap(); assert_eq!(self.lazy_state, LazyState::NoNode); self.lazy_state = LazyState::NodeStart(pos); diff --git a/compiler/rustc_metadata/src/rmeta/mod.rs b/compiler/rustc_metadata/src/rmeta/mod.rs index 4d0a6cb60ee..81d834e0456 100644 --- a/compiler/rustc_metadata/src/rmeta/mod.rs +++ b/compiler/rustc_metadata/src/rmeta/mod.rs @@ -37,7 +37,7 @@ use rustc_target::abi::{FieldIdx, VariantIdx}; use rustc_target::spec::{PanicStrategy, TargetTriple}; use std::marker::PhantomData; -use std::num::NonZeroUsize; +use std::num::NonZero; use decoder::DecodeContext; pub(crate) use decoder::{CrateMetadata, CrateNumMap, MetadataBlob}; @@ -83,7 +83,7 @@ pub const METADATA_HEADER: &[u8] = &[b'r', b'u', b's', b't', 0, 0, 0, METADATA_V /// order than they were encoded in. #[must_use] struct LazyValue { - position: NonZeroUsize, + position: NonZero, _marker: PhantomData T>, } @@ -92,7 +92,7 @@ impl ParameterizedOverTcx for LazyValue { } impl LazyValue { - fn from_position(position: NonZeroUsize) -> LazyValue { + fn from_position(position: NonZero) -> LazyValue { LazyValue { position, _marker: PhantomData } } } @@ -108,7 +108,7 @@ impl LazyValue { /// the minimal distance the length of the sequence, i.e. /// it's assumed there's no 0-byte element in the sequence. struct LazyArray { - position: NonZeroUsize, + position: NonZero, num_elems: usize, _marker: PhantomData T>, } @@ -119,12 +119,12 @@ impl ParameterizedOverTcx for LazyArray { impl Default for LazyArray { fn default() -> LazyArray { - LazyArray::from_position_and_num_elems(NonZeroUsize::new(1).unwrap(), 0) + LazyArray::from_position_and_num_elems(NonZero::::new(1).unwrap(), 0) } } impl LazyArray { - fn from_position_and_num_elems(position: NonZeroUsize, num_elems: usize) -> LazyArray { + fn from_position_and_num_elems(position: NonZero, num_elems: usize) -> LazyArray { LazyArray { position, num_elems, _marker: PhantomData } } } @@ -135,7 +135,7 @@ impl LazyArray { /// `LazyArray`, but without requiring encoding or decoding all the values /// eagerly and in-order. struct LazyTable { - position: NonZeroUsize, + position: NonZero, /// The encoded size of the elements of a table is selected at runtime to drop /// trailing zeroes. This is the number of bytes used for each table element. width: usize, @@ -150,7 +150,7 @@ impl ParameterizedOverTcx for LazyTable LazyTable { fn from_position_and_encoded_size( - position: NonZeroUsize, + position: NonZero, width: usize, len: usize, ) -> LazyTable { @@ -187,11 +187,11 @@ enum LazyState { /// Inside a metadata node, and before any `Lazy`s. /// The position is that of the node itself. - NodeStart(NonZeroUsize), + NodeStart(NonZero), /// Inside a metadata node, with a previous `Lazy`s. /// The position is where that previous `Lazy` would start. - Previous(NonZeroUsize), + Previous(NonZero), } type SyntaxContextTable = LazyTable>>; diff --git a/compiler/rustc_metadata/src/rmeta/table.rs b/compiler/rustc_metadata/src/rmeta/table.rs index 306bf07a976..00752ad15a3 100644 --- a/compiler/rustc_metadata/src/rmeta/table.rs +++ b/compiler/rustc_metadata/src/rmeta/table.rs @@ -339,7 +339,7 @@ impl FixedSizeEncoding for Option> { #[inline] fn from_bytes(b: &[u8; 8]) -> Self { - let position = NonZeroUsize::new(u64::from_bytes(b) as usize)?; + let position = NonZero::::new(u64::from_bytes(b) as usize)?; Some(LazyValue::from_position(position)) } @@ -366,7 +366,7 @@ impl LazyArray { } fn from_bytes_impl(position: &[u8; 8], meta: &[u8; 8]) -> Option> { - let position = NonZeroUsize::new(u64::from_bytes(position) as usize)?; + let position = NonZero::::new(u64::from_bytes(position) as usize)?; let len = u64::from_bytes(meta) as usize; Some(LazyArray::from_position_and_num_elems(position, len)) } @@ -497,7 +497,7 @@ impl> TableBui } LazyTable::from_position_and_encoded_size( - NonZeroUsize::new(pos).unwrap(), + NonZero::::new(pos).unwrap(), width, self.blocks.len(), ) diff --git a/compiler/rustc_middle/src/lib.rs b/compiler/rustc_middle/src/lib.rs index 2aaece1060a..9c0846e9fb1 100644 --- a/compiler/rustc_middle/src/lib.rs +++ b/compiler/rustc_middle/src/lib.rs @@ -34,6 +34,7 @@ #![feature(discriminant_kind)] #![feature(exhaustive_patterns)] #![feature(coroutines)] +#![feature(generic_nonzero)] #![feature(if_let_guard)] #![feature(inline_const)] #![feature(iter_from_coroutine)] diff --git a/compiler/rustc_middle/src/middle/stability.rs b/compiler/rustc_middle/src/middle/stability.rs index afb6937b43b..15ef00629b9 100644 --- a/compiler/rustc_middle/src/middle/stability.rs +++ b/compiler/rustc_middle/src/middle/stability.rs @@ -21,7 +21,7 @@ use rustc_session::parse::feature_err_issue; use rustc_session::Session; use rustc_span::symbol::{sym, Symbol}; use rustc_span::Span; -use std::num::NonZeroU32; +use std::num::NonZero; #[derive(PartialEq, Clone, Copy, Debug)] pub enum StabilityLevel { @@ -102,7 +102,7 @@ pub fn report_unstable( sess: &Session, feature: Symbol, reason: Option, - issue: Option, + issue: Option>, suggestion: Option<(Span, String, String, Applicability)>, is_soft: bool, span: Span, @@ -235,7 +235,7 @@ pub enum EvalResult { Deny { feature: Symbol, reason: Option, - issue: Option, + issue: Option>, suggestion: Option<(Span, String, String, Applicability)>, is_soft: bool, }, @@ -433,7 +433,7 @@ impl<'tcx> TyCtxt<'tcx> { // the `-Z force-unstable-if-unmarked` flag present (we're // compiling a compiler crate), then let this missing feature // annotation slide. - if feature == sym::rustc_private && issue == NonZeroU32::new(27812) { + if feature == sym::rustc_private && issue == NonZero::::new(27812) { if self.sess.opts.unstable_opts.force_unstable_if_unmarked { return EvalResult::Allow; } diff --git a/compiler/rustc_middle/src/mir/interpret/mod.rs b/compiler/rustc_middle/src/mir/interpret/mod.rs index 0da3524e055..4ef02a86e30 100644 --- a/compiler/rustc_middle/src/mir/interpret/mod.rs +++ b/compiler/rustc_middle/src/mir/interpret/mod.rs @@ -122,7 +122,7 @@ mod value; use std::fmt; use std::io; use std::io::{Read, Write}; -use std::num::{NonZeroU32, NonZeroU64}; +use std::num::NonZero; use std::sync::atomic::{AtomicU32, Ordering}; use rustc_ast::LitKind; @@ -205,7 +205,7 @@ pub enum LitToConstError { } #[derive(Copy, Clone, Eq, Hash, Ord, PartialEq, PartialOrd)] -pub struct AllocId(pub NonZeroU64); +pub struct AllocId(pub NonZero); // We want the `Debug` output to be readable as it is used by `derive(Debug)` for // all the Miri types. @@ -260,7 +260,7 @@ pub fn specialized_encode_alloc_id<'tcx, E: TyEncoder>>( } // Used to avoid infinite recursion when decoding cyclic allocations. -type DecodingSessionId = NonZeroU32; +type DecodingSessionId = NonZero; #[derive(Clone)] enum State { @@ -500,7 +500,7 @@ impl<'tcx> AllocMap<'tcx> { AllocMap { alloc_map: Default::default(), dedup: Default::default(), - next_id: AllocId(NonZeroU64::new(1).unwrap()), + next_id: AllocId(NonZero::::new(1).unwrap()), } } fn reserve(&mut self) -> AllocId { diff --git a/compiler/rustc_middle/src/mir/interpret/pointer.rs b/compiler/rustc_middle/src/mir/interpret/pointer.rs index dabf6297aa9..15e12c45679 100644 --- a/compiler/rustc_middle/src/mir/interpret/pointer.rs +++ b/compiler/rustc_middle/src/mir/interpret/pointer.rs @@ -3,7 +3,7 @@ use super::{AllocId, InterpResult}; use rustc_macros::HashStable; use rustc_target::abi::{HasDataLayout, Size}; -use std::{fmt, num::NonZeroU64}; +use std::{fmt, num::NonZero}; //////////////////////////////////////////////////////////////////////////////// // Pointer arithmetic @@ -129,7 +129,7 @@ pub trait Provenance: Copy + fmt::Debug + 'static { /// The type of provenance in the compile-time interpreter. /// This is a packed representation of an `AllocId` and an `immutable: bool`. #[derive(Copy, Clone, Eq, Hash, Ord, PartialEq, PartialOrd)] -pub struct CtfeProvenance(NonZeroU64); +pub struct CtfeProvenance(NonZero); impl From for CtfeProvenance { fn from(value: AllocId) -> Self { @@ -155,7 +155,7 @@ impl CtfeProvenance { /// Returns the `AllocId` of this provenance. #[inline(always)] pub fn alloc_id(self) -> AllocId { - AllocId(NonZeroU64::new(self.0.get() & !IMMUTABLE_MASK).unwrap()) + AllocId(NonZero::::new(self.0.get() & !IMMUTABLE_MASK).unwrap()) } /// Returns whether this provenance is immutable. diff --git a/compiler/rustc_middle/src/ty/consts/int.rs b/compiler/rustc_middle/src/ty/consts/int.rs index 515d564e81d..15f69d2333c 100644 --- a/compiler/rustc_middle/src/ty/consts/int.rs +++ b/compiler/rustc_middle/src/ty/consts/int.rs @@ -4,7 +4,7 @@ use rustc_errors::{DiagnosticArgValue, IntoDiagnosticArg}; use rustc_serialize::{Decodable, Decoder, Encodable, Encoder}; use rustc_target::abi::Size; use std::fmt; -use std::num::NonZeroU8; +use std::num::NonZero; use crate::ty::TyCtxt; @@ -132,7 +132,7 @@ pub struct ScalarInt { /// The first `size` bytes of `data` are the value. /// Do not try to read less or more bytes than that. The remaining bytes must be 0. data: u128, - size: NonZeroU8, + size: NonZero, } // Cannot derive these, as the derives take references to the fields, and we @@ -161,14 +161,14 @@ impl Decodable for ScalarInt { let mut data = [0u8; 16]; let size = d.read_u8(); data[..size as usize].copy_from_slice(d.read_raw_bytes(size as usize)); - ScalarInt { data: u128::from_le_bytes(data), size: NonZeroU8::new(size).unwrap() } + ScalarInt { data: u128::from_le_bytes(data), size: NonZero::::new(size).unwrap() } } } impl ScalarInt { - pub const TRUE: ScalarInt = ScalarInt { data: 1_u128, size: NonZeroU8::new(1).unwrap() }; + pub const TRUE: ScalarInt = ScalarInt { data: 1_u128, size: NonZero::::new(1).unwrap() }; - pub const FALSE: ScalarInt = ScalarInt { data: 0_u128, size: NonZeroU8::new(1).unwrap() }; + pub const FALSE: ScalarInt = ScalarInt { data: 0_u128, size: NonZero::::new(1).unwrap() }; #[inline] pub fn size(self) -> Size { @@ -196,7 +196,7 @@ impl ScalarInt { #[inline] pub fn null(size: Size) -> Self { - Self { data: 0, size: NonZeroU8::new(size.bytes() as u8).unwrap() } + Self { data: 0, size: NonZero::::new(size.bytes() as u8).unwrap() } } #[inline] @@ -208,7 +208,7 @@ impl ScalarInt { pub fn try_from_uint(i: impl Into, size: Size) -> Option { let data = i.into(); if size.truncate(data) == data { - Some(Self { data, size: NonZeroU8::new(size.bytes() as u8).unwrap() }) + Some(Self { data, size: NonZero::::new(size.bytes() as u8).unwrap() }) } else { None } @@ -220,7 +220,7 @@ impl ScalarInt { // `into` performed sign extension, we have to truncate let truncated = size.truncate(i as u128); if size.sign_extend(truncated) as i128 == i { - Some(Self { data: truncated, size: NonZeroU8::new(size.bytes() as u8).unwrap() }) + Some(Self { data: truncated, size: NonZero::::new(size.bytes() as u8).unwrap() }) } else { None } @@ -388,7 +388,7 @@ macro_rules! from { fn from(u: $ty) -> Self { Self { data: u128::from(u), - size: NonZeroU8::new(std::mem::size_of::<$ty>() as u8).unwrap(), + size: NonZero::::new(std::mem::size_of::<$ty>() as u8).unwrap(), } } } @@ -427,7 +427,10 @@ impl TryFrom for bool { impl From for ScalarInt { #[inline] fn from(c: char) -> Self { - Self { data: c as u128, size: NonZeroU8::new(std::mem::size_of::() as u8).unwrap() } + Self { + data: c as u128, + size: NonZero::::new(std::mem::size_of::() as u8).unwrap(), + } } } @@ -454,7 +457,7 @@ impl From for ScalarInt { #[inline] fn from(f: Single) -> Self { // We trust apfloat to give us properly truncated data. - Self { data: f.to_bits(), size: NonZeroU8::new((Single::BITS / 8) as u8).unwrap() } + Self { data: f.to_bits(), size: NonZero::::new((Single::BITS / 8) as u8).unwrap() } } } @@ -470,7 +473,7 @@ impl From for ScalarInt { #[inline] fn from(f: Double) -> Self { // We trust apfloat to give us properly truncated data. - Self { data: f.to_bits(), size: NonZeroU8::new((Double::BITS / 8) as u8).unwrap() } + Self { data: f.to_bits(), size: NonZero::::new((Double::BITS / 8) as u8).unwrap() } } } diff --git a/compiler/rustc_middle/src/ty/generic_args.rs b/compiler/rustc_middle/src/ty/generic_args.rs index 84de12b23a0..c931c2064b0 100644 --- a/compiler/rustc_middle/src/ty/generic_args.rs +++ b/compiler/rustc_middle/src/ty/generic_args.rs @@ -18,7 +18,7 @@ use core::intrinsics; use std::cmp::Ordering; use std::marker::PhantomData; use std::mem; -use std::num::NonZeroUsize; +use std::num::NonZero; use std::ops::{ControlFlow, Deref}; use std::ptr::NonNull; @@ -144,7 +144,7 @@ impl<'tcx> GenericArg<'tcx> { #[inline] pub fn unpack(self) -> GenericArgKind<'tcx> { let ptr = unsafe { - self.ptr.map_addr(|addr| NonZeroUsize::new_unchecked(addr.get() & !TAG_MASK)) + self.ptr.map_addr(|addr| NonZero::::new_unchecked(addr.get() & !TAG_MASK)) }; // SAFETY: use of `Interned::new_unchecked` here is ok because these // pointers were originally created from `Interned` types in `pack()`, diff --git a/compiler/rustc_middle/src/ty/layout.rs b/compiler/rustc_middle/src/ty/layout.rs index 8d8d06b7c0b..d9fa99535b1 100644 --- a/compiler/rustc_middle/src/ty/layout.rs +++ b/compiler/rustc_middle/src/ty/layout.rs @@ -20,7 +20,7 @@ use rustc_target::spec::{abi::Abi as SpecAbi, HasTargetSpec, PanicStrategy, Targ use std::cmp; use std::fmt; -use std::num::NonZeroUsize; +use std::num::NonZero; use std::ops::Bound; pub trait IntegerExt { @@ -761,7 +761,7 @@ where }; tcx.mk_layout(LayoutS { variants: Variants::Single { index: variant_index }, - fields: match NonZeroUsize::new(fields) { + fields: match NonZero::::new(fields) { Some(fields) => FieldsShape::Union(fields), None => FieldsShape::Arbitrary { offsets: IndexVec::new(), memory_index: IndexVec::new() }, }, diff --git a/compiler/rustc_middle/src/ty/mod.rs b/compiler/rustc_middle/src/ty/mod.rs index 15bddb2a64f..3eea0d428ee 100644 --- a/compiler/rustc_middle/src/ty/mod.rs +++ b/compiler/rustc_middle/src/ty/mod.rs @@ -61,7 +61,7 @@ use std::fmt::Debug; use std::hash::{Hash, Hasher}; use std::marker::PhantomData; use std::mem; -use std::num::NonZeroUsize; +use std::num::NonZero; use std::ops::ControlFlow; use std::ptr::NonNull; use std::{fmt, str}; @@ -618,7 +618,7 @@ impl<'tcx> Term<'tcx> { #[inline] pub fn unpack(self) -> TermKind<'tcx> { let ptr = unsafe { - self.ptr.map_addr(|addr| NonZeroUsize::new_unchecked(addr.get() & !TAG_MASK)) + self.ptr.map_addr(|addr| NonZero::::new_unchecked(addr.get() & !TAG_MASK)) }; // SAFETY: use of `Interned::new_unchecked` here is ok because these // pointers were originally created from `Interned` types in `pack()`, diff --git a/compiler/rustc_passes/src/lib.rs b/compiler/rustc_passes/src/lib.rs index e795537e84a..7227b185f4d 100644 --- a/compiler/rustc_passes/src/lib.rs +++ b/compiler/rustc_passes/src/lib.rs @@ -8,6 +8,7 @@ #![doc(rust_logo)] #![feature(rustdoc_internals)] #![allow(internal_features)] +#![feature(generic_nonzero)] #![feature(let_chains)] #![feature(map_try_insert)] #![feature(try_blocks)] diff --git a/compiler/rustc_passes/src/stability.rs b/compiler/rustc_passes/src/stability.rs index 17ad08b0569..312a136c897 100644 --- a/compiler/rustc_passes/src/stability.rs +++ b/compiler/rustc_passes/src/stability.rs @@ -27,7 +27,7 @@ use rustc_span::Span; use rustc_target::spec::abi::Abi; use std::mem::replace; -use std::num::NonZeroU32; +use std::num::NonZero; #[derive(PartialEq)] enum AnnotationKind { @@ -645,7 +645,7 @@ fn stability_index(tcx: TyCtxt<'_>, (): ()) -> Index { let stability = Stability { level: attr::StabilityLevel::Unstable { reason: UnstableReason::Default, - issue: NonZeroU32::new(27812), + issue: NonZero::::new(27812), is_soft: false, implied_by: None, }, diff --git a/compiler/rustc_query_impl/src/lib.rs b/compiler/rustc_query_impl/src/lib.rs index 0fe5b9c664a..33116737a42 100644 --- a/compiler/rustc_query_impl/src/lib.rs +++ b/compiler/rustc_query_impl/src/lib.rs @@ -3,6 +3,7 @@ #![doc(html_root_url = "https://doc.rust-lang.org/nightly/nightly-rustc/")] #![doc(rust_logo)] #![feature(rustdoc_internals)] +#![feature(generic_nonzero)] #![feature(min_specialization)] #![feature(rustc_attrs)] #![allow(rustc::potential_query_instability, unused_parens)] diff --git a/compiler/rustc_query_impl/src/plumbing.rs b/compiler/rustc_query_impl/src/plumbing.rs index a827717d9bb..8cbcce986a1 100644 --- a/compiler/rustc_query_impl/src/plumbing.rs +++ b/compiler/rustc_query_impl/src/plumbing.rs @@ -30,7 +30,7 @@ use rustc_serialize::Decodable; use rustc_serialize::Encodable; use rustc_session::Limit; use rustc_span::def_id::LOCAL_CRATE; -use std::num::NonZeroU64; +use std::num::NonZero; use thin_vec::ThinVec; #[derive(Copy, Clone)] @@ -68,7 +68,7 @@ impl QueryContext for QueryCtxt<'_> { #[inline] fn next_job_id(self) -> QueryJobId { QueryJobId( - NonZeroU64::new( + NonZero::::new( self.query_system.jobs.fetch_add(1, std::sync::atomic::Ordering::Relaxed), ) .unwrap(), diff --git a/compiler/rustc_query_system/src/lib.rs b/compiler/rustc_query_system/src/lib.rs index 416f556f57d..6a959a99e5d 100644 --- a/compiler/rustc_query_system/src/lib.rs +++ b/compiler/rustc_query_system/src/lib.rs @@ -1,5 +1,6 @@ #![feature(assert_matches)] #![feature(core_intrinsics)] +#![feature(generic_nonzero)] #![feature(hash_raw_entry)] #![feature(min_specialization)] #![feature(let_chains)] diff --git a/compiler/rustc_query_system/src/query/job.rs b/compiler/rustc_query_system/src/query/job.rs index 8d7c0ca0144..bf89bc7f7c3 100644 --- a/compiler/rustc_query_system/src/query/job.rs +++ b/compiler/rustc_query_system/src/query/job.rs @@ -11,7 +11,7 @@ use rustc_span::Span; use std::hash::Hash; use std::io::Write; -use std::num::NonZeroU64; +use std::num::NonZero; #[cfg(parallel_compiler)] use { @@ -36,7 +36,7 @@ pub type QueryMap = FxHashMap; /// A value uniquely identifying an active query job. #[derive(Copy, Clone, Eq, PartialEq, Hash, Debug)] -pub struct QueryJobId(pub NonZeroU64); +pub struct QueryJobId(pub NonZero); impl QueryJobId { fn query(self, map: &QueryMap) -> QueryStackFrame { diff --git a/compiler/rustc_serialize/src/lib.rs b/compiler/rustc_serialize/src/lib.rs index 95833f532f4..bb822c611a1 100644 --- a/compiler/rustc_serialize/src/lib.rs +++ b/compiler/rustc_serialize/src/lib.rs @@ -11,6 +11,7 @@ #![feature(associated_type_bounds)] #![feature(const_option)] #![feature(core_intrinsics)] +#![feature(generic_nonzero)] #![feature(inline_const)] #![feature(min_specialization)] #![feature(never_type)] diff --git a/compiler/rustc_serialize/src/serialize.rs b/compiler/rustc_serialize/src/serialize.rs index 287e317b10f..a38a4a916fb 100644 --- a/compiler/rustc_serialize/src/serialize.rs +++ b/compiler/rustc_serialize/src/serialize.rs @@ -6,6 +6,7 @@ use std::cell::{Cell, RefCell}; use std::collections::{BTreeMap, BTreeSet, HashMap, HashSet, VecDeque}; use std::hash::{BuildHasher, Hash}; use std::marker::PhantomData; +use std::num::NonZero; use std::path; use std::rc::Rc; use std::sync::Arc; @@ -216,15 +217,15 @@ impl Decodable for ! { } } -impl Encodable for ::std::num::NonZeroU32 { +impl Encodable for NonZero { fn encode(&self, s: &mut S) { s.emit_u32(self.get()); } } -impl Decodable for ::std::num::NonZeroU32 { +impl Decodable for NonZero { fn decode(d: &mut D) -> Self { - ::std::num::NonZeroU32::new(d.read_u32()).unwrap() + NonZero::::new(d.read_u32()).unwrap() } } diff --git a/compiler/rustc_session/src/config.rs b/compiler/rustc_session/src/config.rs index d35f951e2ae..b89dfab2ca9 100644 --- a/compiler/rustc_session/src/config.rs +++ b/compiler/rustc_session/src/config.rs @@ -3226,7 +3226,7 @@ pub(crate) mod dep_tracking { }; use std::collections::BTreeMap; use std::hash::{DefaultHasher, Hash}; - use std::num::NonZeroUsize; + use std::num::NonZero; use std::path::PathBuf; pub trait DepTrackingHash { @@ -3268,7 +3268,7 @@ pub(crate) mod dep_tracking { impl_dep_tracking_hash_via_hash!( bool, usize, - NonZeroUsize, + NonZero, u64, Hash64, String, diff --git a/compiler/rustc_session/src/errors.rs b/compiler/rustc_session/src/errors.rs index c36cec6f353..192dbb05530 100644 --- a/compiler/rustc_session/src/errors.rs +++ b/compiler/rustc_session/src/errors.rs @@ -1,4 +1,4 @@ -use std::num::NonZeroU32; +use std::num::NonZero; use rustc_ast::token; use rustc_ast::util::literal::LitError; @@ -26,7 +26,7 @@ impl<'a> IntoDiagnostic<'a> for FeatureGateError { #[derive(Subdiagnostic)] #[note(session_feature_diagnostic_for_issue)] pub struct FeatureDiagnosticForIssue { - pub n: NonZeroU32, + pub n: NonZero, } #[derive(Subdiagnostic)] diff --git a/compiler/rustc_session/src/lib.rs b/compiler/rustc_session/src/lib.rs index 58e1394c090..c63af90a7f3 100644 --- a/compiler/rustc_session/src/lib.rs +++ b/compiler/rustc_session/src/lib.rs @@ -1,3 +1,4 @@ +#![feature(generic_nonzero)] #![feature(let_chains)] #![feature(lazy_cell)] #![feature(option_get_or_insert_default)] diff --git a/compiler/rustc_session/src/options.rs b/compiler/rustc_session/src/options.rs index ea93ac5841f..1a046667bd7 100644 --- a/compiler/rustc_session/src/options.rs +++ b/compiler/rustc_session/src/options.rs @@ -21,7 +21,7 @@ use rustc_span::SourceFileHashAlgorithm; use std::collections::BTreeMap; use std::hash::{DefaultHasher, Hasher}; -use std::num::{IntErrorKind, NonZeroUsize}; +use std::num::{IntErrorKind, NonZero}; use std::path::PathBuf; use std::str; @@ -617,7 +617,7 @@ mod parse { pub(crate) fn parse_threads(slot: &mut usize, v: Option<&str>) -> bool { match v.and_then(|s| s.parse().ok()) { Some(0) => { - *slot = std::thread::available_parallelism().map_or(1, std::num::NonZeroUsize::get); + *slot = std::thread::available_parallelism().map_or(1, NonZero::::get); true } Some(i) => { @@ -991,7 +991,10 @@ mod parse { true } - pub(crate) fn parse_treat_err_as_bug(slot: &mut Option, v: Option<&str>) -> bool { + pub(crate) fn parse_treat_err_as_bug( + slot: &mut Option>, + v: Option<&str>, + ) -> bool { match v { Some(s) => match s.parse() { Ok(val) => { @@ -1004,7 +1007,7 @@ mod parse { } }, None => { - *slot = NonZeroUsize::new(1); + *slot = NonZero::::new(1); true } } @@ -1950,7 +1953,7 @@ written to standard error output)"), "translate remapped paths into local paths when possible (default: yes)"), trap_unreachable: Option = (None, parse_opt_bool, [TRACKED], "generate trap instructions for unreachable intrinsics (default: use target setting, usually yes)"), - treat_err_as_bug: Option = (None, parse_treat_err_as_bug, [TRACKED], + treat_err_as_bug: Option> = (None, parse_treat_err_as_bug, [TRACKED], "treat the `val`th error that occurs as bug (default if not specified: 0 - don't treat errors as bugs. \ default if specified without a value: 1 - treat the first error as bug)"), trim_diagnostic_paths: bool = (true, parse_bool, [UNTRACKED], diff --git a/library/alloc/src/collections/binary_heap/mod.rs b/library/alloc/src/collections/binary_heap/mod.rs index 00a101541c5..3a82fb0df88 100644 --- a/library/alloc/src/collections/binary_heap/mod.rs +++ b/library/alloc/src/collections/binary_heap/mod.rs @@ -147,7 +147,7 @@ use core::alloc::Allocator; use core::fmt; use core::iter::{FusedIterator, InPlaceIterable, SourceIter, TrustedFused, TrustedLen}; use core::mem::{self, swap, ManuallyDrop}; -use core::num::NonZeroUsize; +use core::num::NonZero; use core::ops::{Deref, DerefMut}; use core::ptr; @@ -296,7 +296,7 @@ pub struct PeekMut< heap: &'a mut BinaryHeap, // If a set_len + sift_down are required, this is Some. If a &mut T has not // yet been exposed to peek_mut()'s caller, it's None. - original_len: Option, + original_len: Option>, } #[stable(feature = "collection_debug", since = "1.17.0")] @@ -350,7 +350,7 @@ impl DerefMut for PeekMut<'_, T, A> { // the standard library as "leak amplification". unsafe { // SAFETY: len > 1 so len != 0. - self.original_len = Some(NonZeroUsize::new_unchecked(len)); + self.original_len = Some(NonZero::::new_unchecked(len)); // SAFETY: len > 1 so all this does for now is leak elements, // which is safe. self.heap.data.set_len(1); @@ -1576,8 +1576,8 @@ unsafe impl SourceIter for IntoIter { #[unstable(issue = "none", feature = "inplace_iteration")] #[doc(hidden)] unsafe impl InPlaceIterable for IntoIter { - const EXPAND_BY: Option = NonZeroUsize::new(1); - const MERGE_BY: Option = NonZeroUsize::new(1); + const EXPAND_BY: Option> = NonZero::::new(1); + const MERGE_BY: Option> = NonZero::::new(1); } unsafe impl AsVecIntoIter for IntoIter { diff --git a/library/alloc/src/collections/vec_deque/into_iter.rs b/library/alloc/src/collections/vec_deque/into_iter.rs index d9e274df0f5..02ab3f79b06 100644 --- a/library/alloc/src/collections/vec_deque/into_iter.rs +++ b/library/alloc/src/collections/vec_deque/into_iter.rs @@ -1,5 +1,5 @@ use core::iter::{FusedIterator, TrustedLen}; -use core::num::NonZeroUsize; +use core::num::NonZero; use core::{array, fmt, mem::MaybeUninit, ops::Try, ptr}; use crate::alloc::{Allocator, Global}; @@ -54,7 +54,7 @@ impl Iterator for IntoIter { } #[inline] - fn advance_by(&mut self, n: usize) -> Result<(), NonZeroUsize> { + fn advance_by(&mut self, n: usize) -> Result<(), NonZero> { let len = self.inner.len; let rem = if len < n { self.inner.clear(); @@ -63,7 +63,7 @@ impl Iterator for IntoIter { self.inner.drain(..n); 0 }; - NonZeroUsize::new(rem).map_or(Ok(()), Err) + NonZero::::new(rem).map_or(Ok(()), Err) } #[inline] @@ -183,7 +183,7 @@ impl DoubleEndedIterator for IntoIter { } #[inline] - fn advance_back_by(&mut self, n: usize) -> Result<(), NonZeroUsize> { + fn advance_back_by(&mut self, n: usize) -> Result<(), NonZero> { let len = self.inner.len; let rem = if len < n { self.inner.clear(); @@ -192,7 +192,7 @@ impl DoubleEndedIterator for IntoIter { self.inner.truncate(len - n); 0 }; - NonZeroUsize::new(rem).map_or(Ok(()), Err) + NonZero::::new(rem).map_or(Ok(()), Err) } fn try_rfold(&mut self, mut init: B, mut f: F) -> R diff --git a/library/alloc/src/collections/vec_deque/iter.rs b/library/alloc/src/collections/vec_deque/iter.rs index 646a2a991e7..5a5e7f70854 100644 --- a/library/alloc/src/collections/vec_deque/iter.rs +++ b/library/alloc/src/collections/vec_deque/iter.rs @@ -1,5 +1,5 @@ use core::iter::{FusedIterator, TrustedLen, TrustedRandomAccess, TrustedRandomAccessNoCoerce}; -use core::num::NonZeroUsize; +use core::num::NonZero; use core::ops::Try; use core::{fmt, mem, slice}; @@ -56,7 +56,7 @@ impl<'a, T> Iterator for Iter<'a, T> { } } - fn advance_by(&mut self, n: usize) -> Result<(), NonZeroUsize> { + fn advance_by(&mut self, n: usize) -> Result<(), NonZero> { let remaining = self.i1.advance_by(n); match remaining { Ok(()) => return Ok(()), @@ -128,7 +128,7 @@ impl<'a, T> DoubleEndedIterator for Iter<'a, T> { } } - fn advance_back_by(&mut self, n: usize) -> Result<(), NonZeroUsize> { + fn advance_back_by(&mut self, n: usize) -> Result<(), NonZero> { match self.i2.advance_back_by(n) { Ok(()) => return Ok(()), Err(n) => { diff --git a/library/alloc/src/collections/vec_deque/iter_mut.rs b/library/alloc/src/collections/vec_deque/iter_mut.rs index 7defbb1090f..5061931afb7 100644 --- a/library/alloc/src/collections/vec_deque/iter_mut.rs +++ b/library/alloc/src/collections/vec_deque/iter_mut.rs @@ -1,5 +1,5 @@ use core::iter::{FusedIterator, TrustedLen, TrustedRandomAccess, TrustedRandomAccessNoCoerce}; -use core::num::NonZeroUsize; +use core::num::NonZero; use core::ops::Try; use core::{fmt, mem, slice}; @@ -48,7 +48,7 @@ impl<'a, T> Iterator for IterMut<'a, T> { } } - fn advance_by(&mut self, n: usize) -> Result<(), NonZeroUsize> { + fn advance_by(&mut self, n: usize) -> Result<(), NonZero> { match self.i1.advance_by(n) { Ok(()) => return Ok(()), Err(remaining) => { @@ -119,7 +119,7 @@ impl<'a, T> DoubleEndedIterator for IterMut<'a, T> { } } - fn advance_back_by(&mut self, n: usize) -> Result<(), NonZeroUsize> { + fn advance_back_by(&mut self, n: usize) -> Result<(), NonZero> { match self.i2.advance_back_by(n) { Ok(()) => return Ok(()), Err(remaining) => { diff --git a/library/alloc/src/lib.rs b/library/alloc/src/lib.rs index 3341b564d1f..b84273848ee 100644 --- a/library/alloc/src/lib.rs +++ b/library/alloc/src/lib.rs @@ -128,6 +128,7 @@ #![feature(extend_one)] #![feature(fmt_internals)] #![feature(fn_traits)] +#![feature(generic_nonzero)] #![feature(hasher_prefixfree_extras)] #![feature(hint_assert_unchecked)] #![feature(inline_const)] diff --git a/library/alloc/src/vec/in_place_collect.rs b/library/alloc/src/vec/in_place_collect.rs index 5dc3c69e493..07eb91c9005 100644 --- a/library/alloc/src/vec/in_place_collect.rs +++ b/library/alloc/src/vec/in_place_collect.rs @@ -160,14 +160,14 @@ use core::alloc::Layout; use core::iter::{InPlaceIterable, SourceIter, TrustedRandomAccessNoCoerce}; use core::marker::PhantomData; use core::mem::{self, ManuallyDrop, SizedTypeProperties}; -use core::num::NonZeroUsize; +use core::num::NonZero; use core::ptr::{self, NonNull}; use super::{InPlaceDrop, InPlaceDstDataSrcBufDrop, SpecFromIter, SpecFromIterNested, Vec}; const fn in_place_collectible( - step_merge: Option, - step_expand: Option, + step_merge: Option>, + step_expand: Option>, ) -> bool { // Require matching alignments because an alignment-changing realloc is inefficient on many // system allocators and better implementations would require the unstable Allocator trait. diff --git a/library/alloc/src/vec/into_iter.rs b/library/alloc/src/vec/into_iter.rs index 7800560da94..76d1b7b72a1 100644 --- a/library/alloc/src/vec/into_iter.rs +++ b/library/alloc/src/vec/into_iter.rs @@ -12,7 +12,7 @@ use core::iter::{ }; use core::marker::PhantomData; use core::mem::{self, ManuallyDrop, MaybeUninit, SizedTypeProperties}; -use core::num::NonZeroUsize; +use core::num::NonZero; #[cfg(not(no_global_oom_handling))] use core::ops::Deref; use core::ptr::{self, NonNull}; @@ -234,7 +234,7 @@ impl Iterator for IntoIter { } #[inline] - fn advance_by(&mut self, n: usize) -> Result<(), NonZeroUsize> { + fn advance_by(&mut self, n: usize) -> Result<(), NonZero> { let step_size = self.len().min(n); let to_drop = ptr::slice_from_raw_parts_mut(self.ptr.as_ptr(), step_size); if T::IS_ZST { @@ -248,7 +248,7 @@ impl Iterator for IntoIter { unsafe { ptr::drop_in_place(to_drop); } - NonZeroUsize::new(n - step_size).map_or(Ok(()), Err) + NonZero::::new(n - step_size).map_or(Ok(()), Err) } #[inline] @@ -336,7 +336,7 @@ impl DoubleEndedIterator for IntoIter { } #[inline] - fn advance_back_by(&mut self, n: usize) -> Result<(), NonZeroUsize> { + fn advance_back_by(&mut self, n: usize) -> Result<(), NonZero> { let step_size = self.len().min(n); if T::IS_ZST { // SAFETY: same as for advance_by() @@ -350,7 +350,7 @@ impl DoubleEndedIterator for IntoIter { unsafe { ptr::drop_in_place(to_drop); } - NonZeroUsize::new(n - step_size).map_or(Ok(()), Err) + NonZero::::new(n - step_size).map_or(Ok(()), Err) } } @@ -457,8 +457,8 @@ unsafe impl<#[may_dangle] T, A: Allocator> Drop for IntoIter { #[unstable(issue = "none", feature = "inplace_iteration")] #[doc(hidden)] unsafe impl InPlaceIterable for IntoIter { - const EXPAND_BY: Option = NonZeroUsize::new(1); - const MERGE_BY: Option = NonZeroUsize::new(1); + const EXPAND_BY: Option> = NonZero::::new(1); + const MERGE_BY: Option> = NonZero::::new(1); } #[unstable(issue = "none", feature = "inplace_iteration")] diff --git a/library/alloc/tests/lib.rs b/library/alloc/tests/lib.rs index ca17dab55b0..c4e89a58a05 100644 --- a/library/alloc/tests/lib.rs +++ b/library/alloc/tests/lib.rs @@ -13,6 +13,7 @@ #![feature(core_intrinsics)] #![feature(extract_if)] #![feature(exact_size_is_empty)] +#![feature(generic_nonzero)] #![feature(linked_list_cursors)] #![feature(map_try_insert)] #![feature(new_uninit)] diff --git a/library/alloc/tests/vec.rs b/library/alloc/tests/vec.rs index 38a68df79cc..e872ace883c 100644 --- a/library/alloc/tests/vec.rs +++ b/library/alloc/tests/vec.rs @@ -1,5 +1,5 @@ use core::alloc::{Allocator, Layout}; -use core::num::NonZeroUsize; +use core::num::NonZero; use core::ptr::NonNull; use core::{assert_eq, assert_ne}; use std::alloc::System; @@ -1089,9 +1089,9 @@ fn test_into_iter_advance_by() { assert_eq!(i.advance_back_by(1), Ok(())); assert_eq!(i.as_slice(), [2, 3, 4]); - assert_eq!(i.advance_back_by(usize::MAX), Err(NonZeroUsize::new(usize::MAX - 3).unwrap())); + assert_eq!(i.advance_back_by(usize::MAX), Err(NonZero::::new(usize::MAX - 3).unwrap())); - assert_eq!(i.advance_by(usize::MAX), Err(NonZeroUsize::new(usize::MAX).unwrap())); + assert_eq!(i.advance_by(usize::MAX), Err(NonZero::::new(usize::MAX).unwrap())); assert_eq!(i.advance_by(0), Ok(())); assert_eq!(i.advance_back_by(0), Ok(())); @@ -1192,7 +1192,7 @@ fn test_from_iter_specialization_with_iterator_adapters() { .map(|(a, b)| a + b) .map_while(Option::Some) .skip(1) - .map(|e| if e != usize::MAX { Ok(std::num::NonZeroUsize::new(e)) } else { Err(()) }); + .map(|e| if e != usize::MAX { Ok(NonZero::::new(e)) } else { Err(()) }); assert_in_place_trait(&iter); let sink = iter.collect::, _>>().unwrap(); let sinkptr = sink.as_ptr(); diff --git a/library/alloc/tests/vec_deque.rs b/library/alloc/tests/vec_deque.rs index f6fb1f73e5c..079750abd69 100644 --- a/library/alloc/tests/vec_deque.rs +++ b/library/alloc/tests/vec_deque.rs @@ -1,4 +1,4 @@ -use core::num::NonZeroUsize; +use core::num::NonZero; use std::assert_matches::assert_matches; use std::collections::TryReserveErrorKind::*; use std::collections::{vec_deque::Drain, VecDeque}; @@ -445,9 +445,9 @@ fn test_into_iter() { assert_eq!(it.next_back(), Some(3)); let mut it = VecDeque::from(vec![1, 2, 3, 4, 5]).into_iter(); - assert_eq!(it.advance_by(10), Err(NonZeroUsize::new(5).unwrap())); + assert_eq!(it.advance_by(10), Err(NonZero::::new(5).unwrap())); let mut it = VecDeque::from(vec![1, 2, 3, 4, 5]).into_iter(); - assert_eq!(it.advance_back_by(10), Err(NonZeroUsize::new(5).unwrap())); + assert_eq!(it.advance_back_by(10), Err(NonZero::::new(5).unwrap())); } } diff --git a/library/core/src/array/iter.rs b/library/core/src/array/iter.rs index 2b22488b8ff..e50ae1b0d70 100644 --- a/library/core/src/array/iter.rs +++ b/library/core/src/array/iter.rs @@ -1,6 +1,6 @@ //! Defines the `IntoIter` owned iterator for arrays. -use crate::num::NonZeroUsize; +use crate::num::NonZero; use crate::{ fmt, intrinsics::transmute_unchecked, @@ -280,7 +280,7 @@ impl Iterator for IntoIter { self.next_back() } - fn advance_by(&mut self, n: usize) -> Result<(), NonZeroUsize> { + fn advance_by(&mut self, n: usize) -> Result<(), NonZero> { // This also moves the start, which marks them as conceptually "dropped", // so if anything goes bad then our drop impl won't double-free them. let range_to_drop = self.alive.take_prefix(n); @@ -292,7 +292,7 @@ impl Iterator for IntoIter { ptr::drop_in_place(MaybeUninit::slice_assume_init_mut(slice)); } - NonZeroUsize::new(remaining).map_or(Ok(()), Err) + NonZero::::new(remaining).map_or(Ok(()), Err) } #[inline] @@ -335,7 +335,7 @@ impl DoubleEndedIterator for IntoIter { }) } - fn advance_back_by(&mut self, n: usize) -> Result<(), NonZeroUsize> { + fn advance_back_by(&mut self, n: usize) -> Result<(), NonZero> { // This also moves the end, which marks them as conceptually "dropped", // so if anything goes bad then our drop impl won't double-free them. let range_to_drop = self.alive.take_suffix(n); @@ -347,7 +347,7 @@ impl DoubleEndedIterator for IntoIter { ptr::drop_in_place(MaybeUninit::slice_assume_init_mut(slice)); } - NonZeroUsize::new(remaining).map_or(Ok(()), Err) + NonZero::::new(remaining).map_or(Ok(()), Err) } } diff --git a/library/core/src/ascii.rs b/library/core/src/ascii.rs index 02867789b79..c29e5565d51 100644 --- a/library/core/src/ascii.rs +++ b/library/core/src/ascii.rs @@ -12,7 +12,7 @@ use crate::escape; use crate::fmt; use crate::iter::FusedIterator; -use crate::num::NonZeroUsize; +use crate::num::NonZero; mod ascii_char; #[unstable(feature = "ascii_char", issue = "110998")] @@ -133,7 +133,7 @@ impl Iterator for EscapeDefault { } #[inline] - fn advance_by(&mut self, n: usize) -> Result<(), NonZeroUsize> { + fn advance_by(&mut self, n: usize) -> Result<(), NonZero> { self.0.advance_by(n) } } @@ -146,7 +146,7 @@ impl DoubleEndedIterator for EscapeDefault { } #[inline] - fn advance_back_by(&mut self, n: usize) -> Result<(), NonZeroUsize> { + fn advance_back_by(&mut self, n: usize) -> Result<(), NonZero> { self.0.advance_back_by(n) } } diff --git a/library/core/src/char/mod.rs b/library/core/src/char/mod.rs index 5c42912874c..12bca0b438c 100644 --- a/library/core/src/char/mod.rs +++ b/library/core/src/char/mod.rs @@ -43,7 +43,7 @@ use crate::error::Error; use crate::escape; use crate::fmt::{self, Write}; use crate::iter::FusedIterator; -use crate::num::NonZeroUsize; +use crate::num::NonZero; pub(crate) use self::methods::EscapeDebugExtArgs; @@ -185,7 +185,7 @@ impl Iterator for EscapeUnicode { } #[inline] - fn advance_by(&mut self, n: usize) -> Result<(), NonZeroUsize> { + fn advance_by(&mut self, n: usize) -> Result<(), NonZero> { self.0.advance_by(n) } } @@ -260,7 +260,7 @@ impl Iterator for EscapeDefault { } #[inline] - fn advance_by(&mut self, n: usize) -> Result<(), NonZeroUsize> { + fn advance_by(&mut self, n: usize) -> Result<(), NonZero> { self.0.advance_by(n) } } diff --git a/library/core/src/cmp/bytewise.rs b/library/core/src/cmp/bytewise.rs index 2548d9e24c9..b19eef8e255 100644 --- a/library/core/src/cmp/bytewise.rs +++ b/library/core/src/cmp/bytewise.rs @@ -33,7 +33,7 @@ is_bytewise_comparable!(u8, u16, u32, u64, u128, usize, i8, i16, i32, i64, i128, // so we can compare them directly. is_bytewise_comparable!(bool, char, super::Ordering); -// SAFETY: Similarly, the non-zero types have a niche, but no undef and no pointers, +// SAFETY: Similarly, the `NonZero` type has a niche, but no undef and no pointers, // and they compare like their underlying numeric type. is_bytewise_comparable!( NonZeroU8, @@ -50,7 +50,7 @@ is_bytewise_comparable!( NonZeroIsize, ); -// SAFETY: The NonZero types have the "null" optimization guaranteed, and thus +// SAFETY: The `NonZero` type has the "null" optimization guaranteed, and thus // are also safe to equality-compare bitwise inside an `Option`. // The way `PartialOrd` is defined for `Option` means that this wouldn't work // for `<` or `>` on the signed types, but since we only do `==` it's fine. diff --git a/library/core/src/escape.rs b/library/core/src/escape.rs index 60b5df752ca..143e277283e 100644 --- a/library/core/src/escape.rs +++ b/library/core/src/escape.rs @@ -1,7 +1,7 @@ //! Helper code for character escaping. use crate::ascii; -use crate::num::NonZeroUsize; +use crate::num::NonZero; use crate::ops::Range; const HEX_DIGITS: [ascii::Char; 16] = *b"0123456789abcdef".as_ascii().unwrap(); @@ -106,11 +106,11 @@ impl EscapeIterInner { self.alive.next_back().map(|i| self.data[usize::from(i)].to_u8()) } - pub fn advance_by(&mut self, n: usize) -> Result<(), NonZeroUsize> { + pub fn advance_by(&mut self, n: usize) -> Result<(), NonZero> { self.alive.advance_by(n) } - pub fn advance_back_by(&mut self, n: usize) -> Result<(), NonZeroUsize> { + pub fn advance_back_by(&mut self, n: usize) -> Result<(), NonZero> { self.alive.advance_back_by(n) } } diff --git a/library/core/src/iter/adapters/array_chunks.rs b/library/core/src/iter/adapters/array_chunks.rs index 946d0051cce..2e437b41dce 100644 --- a/library/core/src/iter/adapters/array_chunks.rs +++ b/library/core/src/iter/adapters/array_chunks.rs @@ -3,7 +3,7 @@ use crate::iter::adapters::SourceIter; use crate::iter::{ ByRefSized, FusedIterator, InPlaceIterable, TrustedFused, TrustedRandomAccessNoCoerce, }; -use crate::num::NonZeroUsize; +use crate::num::NonZero; use crate::ops::{ControlFlow, NeverShortCircuit, Try}; /// An iterator over `N` elements of the iterator at a time. @@ -253,9 +253,9 @@ where #[unstable(issue = "none", feature = "inplace_iteration")] unsafe impl InPlaceIterable for ArrayChunks { - const EXPAND_BY: Option = I::EXPAND_BY; - const MERGE_BY: Option = const { - match (I::MERGE_BY, NonZeroUsize::new(N)) { + const EXPAND_BY: Option> = I::EXPAND_BY; + const MERGE_BY: Option> = const { + match (I::MERGE_BY, NonZero::::new(N)) { (Some(m), Some(n)) => m.checked_mul(n), _ => None, } diff --git a/library/core/src/iter/adapters/by_ref_sized.rs b/library/core/src/iter/adapters/by_ref_sized.rs index 4e0e19ddc78..d084bede1eb 100644 --- a/library/core/src/iter/adapters/by_ref_sized.rs +++ b/library/core/src/iter/adapters/by_ref_sized.rs @@ -1,4 +1,4 @@ -use crate::num::NonZeroUsize; +use crate::num::NonZero; use crate::ops::{NeverShortCircuit, Try}; /// Like `Iterator::by_ref`, but requiring `Sized` so it can forward generics. @@ -27,7 +27,7 @@ impl Iterator for ByRefSized<'_, I> { } #[inline] - fn advance_by(&mut self, n: usize) -> Result<(), NonZeroUsize> { + fn advance_by(&mut self, n: usize) -> Result<(), NonZero> { I::advance_by(self.0, n) } @@ -63,7 +63,7 @@ impl DoubleEndedIterator for ByRefSized<'_, I> { } #[inline] - fn advance_back_by(&mut self, n: usize) -> Result<(), NonZeroUsize> { + fn advance_back_by(&mut self, n: usize) -> Result<(), NonZero> { I::advance_back_by(self.0, n) } diff --git a/library/core/src/iter/adapters/chain.rs b/library/core/src/iter/adapters/chain.rs index c748336cd7f..7edfee7bf6c 100644 --- a/library/core/src/iter/adapters/chain.rs +++ b/library/core/src/iter/adapters/chain.rs @@ -1,5 +1,5 @@ use crate::iter::{FusedIterator, TrustedLen}; -use crate::num::NonZeroUsize; +use crate::num::NonZero; use crate::ops::Try; /// An iterator that links two iterators together, in a chain. @@ -96,7 +96,7 @@ where } #[inline] - fn advance_by(&mut self, mut n: usize) -> Result<(), NonZeroUsize> { + fn advance_by(&mut self, mut n: usize) -> Result<(), NonZero> { if let Some(ref mut a) = self.a { n = match a.advance_by(n) { Ok(()) => return Ok(()), @@ -110,7 +110,7 @@ where // we don't fuse the second iterator } - NonZeroUsize::new(n).map_or(Ok(()), Err) + NonZero::::new(n).map_or(Ok(()), Err) } #[inline] @@ -182,7 +182,7 @@ where } #[inline] - fn advance_back_by(&mut self, mut n: usize) -> Result<(), NonZeroUsize> { + fn advance_back_by(&mut self, mut n: usize) -> Result<(), NonZero> { if let Some(ref mut b) = self.b { n = match b.advance_back_by(n) { Ok(()) => return Ok(()), @@ -196,7 +196,7 @@ where // we don't fuse the second iterator } - NonZeroUsize::new(n).map_or(Ok(()), Err) + NonZero::::new(n).map_or(Ok(()), Err) } #[inline] diff --git a/library/core/src/iter/adapters/cloned.rs b/library/core/src/iter/adapters/cloned.rs index 3de91267cf5..1a106ef9794 100644 --- a/library/core/src/iter/adapters/cloned.rs +++ b/library/core/src/iter/adapters/cloned.rs @@ -3,7 +3,7 @@ use crate::iter::adapters::{ }; use crate::iter::{FusedIterator, InPlaceIterable, TrustedLen, UncheckedIterator}; use crate::ops::Try; -use core::num::NonZeroUsize; +use core::num::NonZero; /// An iterator that clones the elements of an underlying iterator. /// @@ -185,6 +185,6 @@ where #[unstable(issue = "none", feature = "inplace_iteration")] unsafe impl InPlaceIterable for Cloned { - const EXPAND_BY: Option = I::EXPAND_BY; - const MERGE_BY: Option = I::MERGE_BY; + const EXPAND_BY: Option> = I::EXPAND_BY; + const MERGE_BY: Option> = I::MERGE_BY; } diff --git a/library/core/src/iter/adapters/copied.rs b/library/core/src/iter/adapters/copied.rs index 52a5add1132..6d82d1581f7 100644 --- a/library/core/src/iter/adapters/copied.rs +++ b/library/core/src/iter/adapters/copied.rs @@ -4,7 +4,7 @@ use crate::iter::adapters::{ use crate::iter::{FusedIterator, InPlaceIterable, TrustedLen}; use crate::mem::MaybeUninit; use crate::mem::SizedTypeProperties; -use crate::num::NonZeroUsize; +use crate::num::NonZero; use crate::ops::Try; use crate::{array, ptr}; @@ -90,7 +90,7 @@ where } #[inline] - fn advance_by(&mut self, n: usize) -> Result<(), NonZeroUsize> { + fn advance_by(&mut self, n: usize) -> Result<(), NonZero> { self.it.advance_by(n) } @@ -131,7 +131,7 @@ where } #[inline] - fn advance_back_by(&mut self, n: usize) -> Result<(), NonZeroUsize> { + fn advance_back_by(&mut self, n: usize) -> Result<(), NonZero> { self.it.advance_back_by(n) } } @@ -272,6 +272,6 @@ where #[unstable(issue = "none", feature = "inplace_iteration")] unsafe impl InPlaceIterable for Copied { - const EXPAND_BY: Option = I::EXPAND_BY; - const MERGE_BY: Option = I::MERGE_BY; + const EXPAND_BY: Option> = I::EXPAND_BY; + const MERGE_BY: Option> = I::MERGE_BY; } diff --git a/library/core/src/iter/adapters/cycle.rs b/library/core/src/iter/adapters/cycle.rs index 51bd09b6eff..7919c040dba 100644 --- a/library/core/src/iter/adapters/cycle.rs +++ b/library/core/src/iter/adapters/cycle.rs @@ -1,4 +1,4 @@ -use crate::num::NonZeroUsize; +use crate::num::NonZero; use crate::{iter::FusedIterator, ops::Try}; /// An iterator that repeats endlessly. @@ -82,7 +82,7 @@ where #[inline] #[rustc_inherit_overflow_checks] - fn advance_by(&mut self, n: usize) -> Result<(), NonZeroUsize> { + fn advance_by(&mut self, n: usize) -> Result<(), NonZero> { let mut n = match self.iter.advance_by(n) { Ok(()) => return Ok(()), Err(rem) => rem.get(), @@ -97,7 +97,7 @@ where }; } - NonZeroUsize::new(n).map_or(Ok(()), Err) + NonZero::::new(n).map_or(Ok(()), Err) } // No `fold` override, because `fold` doesn't make much sense for `Cycle`, diff --git a/library/core/src/iter/adapters/enumerate.rs b/library/core/src/iter/adapters/enumerate.rs index 92f465ccdb4..ef46040f0a7 100644 --- a/library/core/src/iter/adapters/enumerate.rs +++ b/library/core/src/iter/adapters/enumerate.rs @@ -2,7 +2,7 @@ use crate::iter::adapters::{ zip::try_get_unchecked, SourceIter, TrustedRandomAccess, TrustedRandomAccessNoCoerce, }; use crate::iter::{FusedIterator, InPlaceIterable, TrustedFused, TrustedLen}; -use crate::num::NonZeroUsize; +use crate::num::NonZero; use crate::ops::Try; /// An iterator that yields the current count and the element during iteration. @@ -115,7 +115,7 @@ where #[inline] #[rustc_inherit_overflow_checks] - fn advance_by(&mut self, n: usize) -> Result<(), NonZeroUsize> { + fn advance_by(&mut self, n: usize) -> Result<(), NonZero> { let remaining = self.iter.advance_by(n); let advanced = match remaining { Ok(()) => n, @@ -206,7 +206,7 @@ where } #[inline] - fn advance_back_by(&mut self, n: usize) -> Result<(), NonZeroUsize> { + fn advance_back_by(&mut self, n: usize) -> Result<(), NonZero> { // we do not need to update the count since that only tallies the number of items // consumed from the front. consuming items from the back can never reduce that. self.iter.advance_back_by(n) @@ -265,8 +265,8 @@ where #[unstable(issue = "none", feature = "inplace_iteration")] unsafe impl InPlaceIterable for Enumerate { - const EXPAND_BY: Option = I::EXPAND_BY; - const MERGE_BY: Option = I::MERGE_BY; + const EXPAND_BY: Option> = I::EXPAND_BY; + const MERGE_BY: Option> = I::MERGE_BY; } #[stable(feature = "default_iters", since = "1.70.0")] diff --git a/library/core/src/iter/adapters/filter.rs b/library/core/src/iter/adapters/filter.rs index 882f3e3bc60..a7f1fde6975 100644 --- a/library/core/src/iter/adapters/filter.rs +++ b/library/core/src/iter/adapters/filter.rs @@ -1,6 +1,6 @@ use crate::fmt; use crate::iter::{adapters::SourceIter, FusedIterator, InPlaceIterable, TrustedFused}; -use crate::num::NonZeroUsize; +use crate::num::NonZero; use crate::ops::Try; use core::array; use core::mem::{ManuallyDrop, MaybeUninit}; @@ -209,6 +209,6 @@ where #[unstable(issue = "none", feature = "inplace_iteration")] unsafe impl InPlaceIterable for Filter { - const EXPAND_BY: Option = I::EXPAND_BY; - const MERGE_BY: Option = I::MERGE_BY; + const EXPAND_BY: Option> = I::EXPAND_BY; + const MERGE_BY: Option> = I::MERGE_BY; } diff --git a/library/core/src/iter/adapters/filter_map.rs b/library/core/src/iter/adapters/filter_map.rs index 81ac0eaa67e..64bd5b3e2b6 100644 --- a/library/core/src/iter/adapters/filter_map.rs +++ b/library/core/src/iter/adapters/filter_map.rs @@ -1,6 +1,6 @@ use crate::iter::{adapters::SourceIter, FusedIterator, InPlaceIterable, TrustedFused}; use crate::mem::{ManuallyDrop, MaybeUninit}; -use crate::num::NonZeroUsize; +use crate::num::NonZero; use crate::ops::{ControlFlow, Try}; use crate::{array, fmt}; @@ -210,6 +210,6 @@ where #[unstable(issue = "none", feature = "inplace_iteration")] unsafe impl InPlaceIterable for FilterMap { - const EXPAND_BY: Option = I::EXPAND_BY; - const MERGE_BY: Option = I::MERGE_BY; + const EXPAND_BY: Option> = I::EXPAND_BY; + const MERGE_BY: Option> = I::MERGE_BY; } diff --git a/library/core/src/iter/adapters/flatten.rs b/library/core/src/iter/adapters/flatten.rs index 7d6f746845e..42396157d86 100644 --- a/library/core/src/iter/adapters/flatten.rs +++ b/library/core/src/iter/adapters/flatten.rs @@ -4,7 +4,7 @@ use crate::iter::{ TrustedLen, }; use crate::iter::{Once, OnceWith}; -use crate::num::NonZeroUsize; +use crate::num::NonZero; use crate::ops::{ControlFlow, Try}; use crate::result; use crate::{array, fmt, option}; @@ -90,7 +90,7 @@ where } #[inline] - fn advance_by(&mut self, n: usize) -> Result<(), NonZeroUsize> { + fn advance_by(&mut self, n: usize) -> Result<(), NonZero> { self.inner.advance_by(n) } @@ -135,7 +135,7 @@ where } #[inline] - fn advance_back_by(&mut self, n: usize) -> Result<(), NonZeroUsize> { + fn advance_back_by(&mut self, n: usize) -> Result<(), NonZero> { self.inner.advance_back_by(n) } } @@ -165,13 +165,13 @@ where I: InPlaceIterable, U: BoundedSize + IntoIterator, { - const EXPAND_BY: Option = const { + const EXPAND_BY: Option> = const { match (I::EXPAND_BY, U::UPPER_BOUND) { (Some(m), Some(n)) => m.checked_mul(n), _ => None, } }; - const MERGE_BY: Option = I::MERGE_BY; + const MERGE_BY: Option> = I::MERGE_BY; } #[unstable(issue = "none", feature = "inplace_iteration")] @@ -200,7 +200,7 @@ where #[rustc_specialization_trait] #[unstable(issue = "none", feature = "inplace_iteration")] unsafe trait BoundedSize { - const UPPER_BOUND: Option = NonZeroUsize::new(1); + const UPPER_BOUND: Option> = NonZero::::new(1); } #[unstable(issue = "none", feature = "inplace_iteration")] @@ -217,31 +217,31 @@ unsafe impl BoundedSize for Once {} unsafe impl BoundedSize for OnceWith {} #[unstable(issue = "none", feature = "inplace_iteration")] unsafe impl BoundedSize for [T; N] { - const UPPER_BOUND: Option = NonZeroUsize::new(N); + const UPPER_BOUND: Option> = NonZero::::new(N); } #[unstable(issue = "none", feature = "inplace_iteration")] unsafe impl BoundedSize for array::IntoIter { - const UPPER_BOUND: Option = NonZeroUsize::new(N); + const UPPER_BOUND: Option> = NonZero::::new(N); } #[unstable(issue = "none", feature = "inplace_iteration")] unsafe impl BoundedSize for Filter { - const UPPER_BOUND: Option = I::UPPER_BOUND; + const UPPER_BOUND: Option> = I::UPPER_BOUND; } #[unstable(issue = "none", feature = "inplace_iteration")] unsafe impl BoundedSize for FilterMap { - const UPPER_BOUND: Option = I::UPPER_BOUND; + const UPPER_BOUND: Option> = I::UPPER_BOUND; } #[unstable(issue = "none", feature = "inplace_iteration")] unsafe impl BoundedSize for Map { - const UPPER_BOUND: Option = I::UPPER_BOUND; + const UPPER_BOUND: Option> = I::UPPER_BOUND; } #[unstable(issue = "none", feature = "inplace_iteration")] unsafe impl BoundedSize for Copied { - const UPPER_BOUND: Option = I::UPPER_BOUND; + const UPPER_BOUND: Option> = I::UPPER_BOUND; } #[unstable(issue = "none", feature = "inplace_iteration")] unsafe impl BoundedSize for Cloned { - const UPPER_BOUND: Option = I::UPPER_BOUND; + const UPPER_BOUND: Option> = I::UPPER_BOUND; } /// An iterator that flattens one level of nesting in an iterator of things @@ -322,7 +322,7 @@ where } #[inline] - fn advance_by(&mut self, n: usize) -> Result<(), NonZeroUsize> { + fn advance_by(&mut self, n: usize) -> Result<(), NonZero> { self.inner.advance_by(n) } @@ -367,7 +367,7 @@ where } #[inline] - fn advance_back_by(&mut self, n: usize) -> Result<(), NonZeroUsize> { + fn advance_back_by(&mut self, n: usize) -> Result<(), NonZero> { self.inner.advance_back_by(n) } } @@ -394,13 +394,13 @@ where I: InPlaceIterable + Iterator, ::Item: IntoIterator + BoundedSize, { - const EXPAND_BY: Option = const { + const EXPAND_BY: Option> = const { match (I::EXPAND_BY, I::Item::UPPER_BOUND) { (Some(m), Some(n)) => m.checked_mul(n), _ => None, } }; - const MERGE_BY: Option = I::MERGE_BY; + const MERGE_BY: Option> = I::MERGE_BY; } #[unstable(issue = "none", feature = "inplace_iteration")] @@ -669,7 +669,7 @@ where #[inline] #[rustc_inherit_overflow_checks] - fn advance_by(&mut self, n: usize) -> Result<(), NonZeroUsize> { + fn advance_by(&mut self, n: usize) -> Result<(), NonZero> { #[inline] #[rustc_inherit_overflow_checks] fn advance(n: usize, iter: &mut U) -> ControlFlow<(), usize> { @@ -680,7 +680,9 @@ where } match self.iter_try_fold(n, advance) { - ControlFlow::Continue(remaining) => NonZeroUsize::new(remaining).map_or(Ok(()), Err), + ControlFlow::Continue(remaining) => { + NonZero::::new(remaining).map_or(Ok(()), Err) + } _ => Ok(()), } } @@ -759,7 +761,7 @@ where #[inline] #[rustc_inherit_overflow_checks] - fn advance_back_by(&mut self, n: usize) -> Result<(), NonZeroUsize> { + fn advance_back_by(&mut self, n: usize) -> Result<(), NonZero> { #[inline] #[rustc_inherit_overflow_checks] fn advance(n: usize, iter: &mut U) -> ControlFlow<(), usize> { @@ -770,7 +772,9 @@ where } match self.iter_try_rfold(n, advance) { - ControlFlow::Continue(remaining) => NonZeroUsize::new(remaining).map_or(Ok(()), Err), + ControlFlow::Continue(remaining) => { + NonZero::::new(remaining).map_or(Ok(()), Err) + } _ => Ok(()), } } diff --git a/library/core/src/iter/adapters/inspect.rs b/library/core/src/iter/adapters/inspect.rs index fd2d830b693..1c4656a649a 100644 --- a/library/core/src/iter/adapters/inspect.rs +++ b/library/core/src/iter/adapters/inspect.rs @@ -1,6 +1,6 @@ use crate::fmt; use crate::iter::{adapters::SourceIter, FusedIterator, InPlaceIterable, TrustedFused}; -use crate::num::NonZeroUsize; +use crate::num::NonZero; use crate::ops::Try; /// An iterator that calls a function with a reference to each element before @@ -168,6 +168,6 @@ where #[unstable(issue = "none", feature = "inplace_iteration")] unsafe impl InPlaceIterable for Inspect { - const EXPAND_BY: Option = I::EXPAND_BY; - const MERGE_BY: Option = I::MERGE_BY; + const EXPAND_BY: Option> = I::EXPAND_BY; + const MERGE_BY: Option> = I::MERGE_BY; } diff --git a/library/core/src/iter/adapters/map.rs b/library/core/src/iter/adapters/map.rs index c882c9e7f3f..6e163e20d8e 100644 --- a/library/core/src/iter/adapters/map.rs +++ b/library/core/src/iter/adapters/map.rs @@ -3,7 +3,7 @@ use crate::iter::adapters::{ zip::try_get_unchecked, SourceIter, TrustedRandomAccess, TrustedRandomAccessNoCoerce, }; use crate::iter::{FusedIterator, InPlaceIterable, TrustedFused, TrustedLen, UncheckedIterator}; -use crate::num::NonZeroUsize; +use crate::num::NonZero; use crate::ops::Try; /// An iterator that maps the values of `iter` with `f`. @@ -237,6 +237,6 @@ where #[unstable(issue = "none", feature = "inplace_iteration")] unsafe impl InPlaceIterable for Map { - const EXPAND_BY: Option = I::EXPAND_BY; - const MERGE_BY: Option = I::MERGE_BY; + const EXPAND_BY: Option> = I::EXPAND_BY; + const MERGE_BY: Option> = I::MERGE_BY; } diff --git a/library/core/src/iter/adapters/map_while.rs b/library/core/src/iter/adapters/map_while.rs index bcae73cbe09..9ad50048c25 100644 --- a/library/core/src/iter/adapters/map_while.rs +++ b/library/core/src/iter/adapters/map_while.rs @@ -1,6 +1,6 @@ use crate::fmt; use crate::iter::{adapters::SourceIter, InPlaceIterable}; -use crate::num::NonZeroUsize; +use crate::num::NonZero; use crate::ops::{ControlFlow, Try}; /// An iterator that only accepts elements while `predicate` returns `Some(_)`. @@ -84,6 +84,6 @@ where #[unstable(issue = "none", feature = "inplace_iteration")] unsafe impl InPlaceIterable for MapWhile { - const EXPAND_BY: Option = I::EXPAND_BY; - const MERGE_BY: Option = I::MERGE_BY; + const EXPAND_BY: Option> = I::EXPAND_BY; + const MERGE_BY: Option> = I::MERGE_BY; } diff --git a/library/core/src/iter/adapters/mod.rs b/library/core/src/iter/adapters/mod.rs index 4037e2e2839..cc514bd914f 100644 --- a/library/core/src/iter/adapters/mod.rs +++ b/library/core/src/iter/adapters/mod.rs @@ -1,5 +1,5 @@ use crate::iter::InPlaceIterable; -use crate::num::NonZeroUsize; +use crate::num::NonZero; use crate::ops::{ChangeOutputType, ControlFlow, FromResidual, Residual, Try}; mod array_chunks; @@ -234,6 +234,6 @@ unsafe impl InPlaceIterable for GenericShunt<'_, I, R> where I: InPlaceIterable, { - const EXPAND_BY: Option = I::EXPAND_BY; - const MERGE_BY: Option = I::MERGE_BY; + const EXPAND_BY: Option> = I::EXPAND_BY; + const MERGE_BY: Option> = I::MERGE_BY; } diff --git a/library/core/src/iter/adapters/rev.rs b/library/core/src/iter/adapters/rev.rs index 4aaf7c61f50..06ab15d5e90 100644 --- a/library/core/src/iter/adapters/rev.rs +++ b/library/core/src/iter/adapters/rev.rs @@ -1,5 +1,5 @@ use crate::iter::{FusedIterator, TrustedLen}; -use crate::num::NonZeroUsize; +use crate::num::NonZero; use crate::ops::Try; /// A double-ended iterator with the direction inverted. @@ -39,7 +39,7 @@ where } #[inline] - fn advance_by(&mut self, n: usize) -> Result<(), NonZeroUsize> { + fn advance_by(&mut self, n: usize) -> Result<(), NonZero> { self.iter.advance_back_by(n) } @@ -84,7 +84,7 @@ where } #[inline] - fn advance_back_by(&mut self, n: usize) -> Result<(), NonZeroUsize> { + fn advance_back_by(&mut self, n: usize) -> Result<(), NonZero> { self.iter.advance_by(n) } diff --git a/library/core/src/iter/adapters/scan.rs b/library/core/src/iter/adapters/scan.rs index 635bad199ff..d261a535b18 100644 --- a/library/core/src/iter/adapters/scan.rs +++ b/library/core/src/iter/adapters/scan.rs @@ -1,6 +1,6 @@ use crate::fmt; use crate::iter::{adapters::SourceIter, InPlaceIterable}; -use crate::num::NonZeroUsize; +use crate::num::NonZero; use crate::ops::{ControlFlow, Try}; /// An iterator to maintain state while iterating another iterator. @@ -94,6 +94,6 @@ where #[unstable(issue = "none", feature = "inplace_iteration")] unsafe impl InPlaceIterable for Scan { - const EXPAND_BY: Option = I::EXPAND_BY; - const MERGE_BY: Option = I::MERGE_BY; + const EXPAND_BY: Option> = I::EXPAND_BY; + const MERGE_BY: Option> = I::MERGE_BY; } diff --git a/library/core/src/iter/adapters/skip.rs b/library/core/src/iter/adapters/skip.rs index f5188dd458d..20a3b616f81 100644 --- a/library/core/src/iter/adapters/skip.rs +++ b/library/core/src/iter/adapters/skip.rs @@ -5,7 +5,7 @@ use crate::iter::{ adapters::SourceIter, FusedIterator, InPlaceIterable, TrustedLen, TrustedRandomAccess, TrustedRandomAccessNoCoerce, }; -use crate::num::NonZeroUsize; +use crate::num::NonZero; use crate::ops::{ControlFlow, Try}; /// An iterator that skips over `n` elements of `iter`. @@ -134,7 +134,7 @@ where #[inline] #[rustc_inherit_overflow_checks] - fn advance_by(&mut self, mut n: usize) -> Result<(), NonZeroUsize> { + fn advance_by(&mut self, mut n: usize) -> Result<(), NonZero> { let skip_inner = self.n; let skip_and_advance = skip_inner.saturating_add(n); @@ -154,7 +154,7 @@ where } } - NonZeroUsize::new(n).map_or(Ok(()), Err) + NonZero::::new(n).map_or(Ok(()), Err) } #[doc(hidden)] @@ -234,11 +234,11 @@ where impl_fold_via_try_fold! { rfold -> try_rfold } #[inline] - fn advance_back_by(&mut self, n: usize) -> Result<(), NonZeroUsize> { + fn advance_back_by(&mut self, n: usize) -> Result<(), NonZero> { let min = crate::cmp::min(self.len(), n); let rem = self.iter.advance_back_by(min); assert!(rem.is_ok(), "ExactSizeIterator contract violation"); - NonZeroUsize::new(n - min).map_or(Ok(()), Err) + NonZero::::new(n - min).map_or(Ok(()), Err) } } @@ -264,8 +264,8 @@ where #[unstable(issue = "none", feature = "inplace_iteration")] unsafe impl InPlaceIterable for Skip { - const EXPAND_BY: Option = I::EXPAND_BY; - const MERGE_BY: Option = I::MERGE_BY; + const EXPAND_BY: Option> = I::EXPAND_BY; + const MERGE_BY: Option> = I::MERGE_BY; } #[doc(hidden)] diff --git a/library/core/src/iter/adapters/skip_while.rs b/library/core/src/iter/adapters/skip_while.rs index 3a661973e5f..8001e6e6471 100644 --- a/library/core/src/iter/adapters/skip_while.rs +++ b/library/core/src/iter/adapters/skip_while.rs @@ -1,6 +1,6 @@ use crate::fmt; use crate::iter::{adapters::SourceIter, FusedIterator, InPlaceIterable, TrustedFused}; -use crate::num::NonZeroUsize; +use crate::num::NonZero; use crate::ops::Try; /// An iterator that rejects elements while `predicate` returns `true`. @@ -124,6 +124,6 @@ where #[unstable(issue = "none", feature = "inplace_iteration")] unsafe impl InPlaceIterable for SkipWhile { - const EXPAND_BY: Option = I::EXPAND_BY; - const MERGE_BY: Option = I::MERGE_BY; + const EXPAND_BY: Option> = I::EXPAND_BY; + const MERGE_BY: Option> = I::MERGE_BY; } diff --git a/library/core/src/iter/adapters/take.rs b/library/core/src/iter/adapters/take.rs index 80e06066d28..e668e662536 100644 --- a/library/core/src/iter/adapters/take.rs +++ b/library/core/src/iter/adapters/take.rs @@ -3,7 +3,7 @@ use crate::iter::{ adapters::SourceIter, FusedIterator, InPlaceIterable, TrustedFused, TrustedLen, TrustedRandomAccess, }; -use crate::num::NonZeroUsize; +use crate::num::NonZero; use crate::ops::{ControlFlow, Try}; /// An iterator that only iterates over the first `n` iterations of `iter`. @@ -117,7 +117,7 @@ where #[inline] #[rustc_inherit_overflow_checks] - fn advance_by(&mut self, n: usize) -> Result<(), NonZeroUsize> { + fn advance_by(&mut self, n: usize) -> Result<(), NonZero> { let min = self.n.min(n); let rem = match self.iter.advance_by(min) { Ok(()) => 0, @@ -125,7 +125,7 @@ where }; let advanced = min - rem; self.n -= advanced; - NonZeroUsize::new(n - advanced).map_or(Ok(()), Err) + NonZero::::new(n - advanced).map_or(Ok(()), Err) } } @@ -145,8 +145,8 @@ where #[unstable(issue = "none", feature = "inplace_iteration")] unsafe impl InPlaceIterable for Take { - const EXPAND_BY: Option = I::EXPAND_BY; - const MERGE_BY: Option = I::MERGE_BY; + const EXPAND_BY: Option> = I::EXPAND_BY; + const MERGE_BY: Option> = I::MERGE_BY; } #[stable(feature = "double_ended_take_iterator", since = "1.38.0")] @@ -219,7 +219,7 @@ where #[inline] #[rustc_inherit_overflow_checks] - fn advance_back_by(&mut self, n: usize) -> Result<(), NonZeroUsize> { + fn advance_back_by(&mut self, n: usize) -> Result<(), NonZero> { // The amount by which the inner iterator needs to be shortened for it to be // at most as long as the take() amount. let trim_inner = self.iter.len().saturating_sub(self.n); @@ -235,7 +235,7 @@ where let advanced_by_inner = advance_by - remainder; let advanced_by = advanced_by_inner - trim_inner; self.n -= advanced_by; - NonZeroUsize::new(n - advanced_by).map_or(Ok(()), Err) + NonZero::::new(n - advanced_by).map_or(Ok(()), Err) } } diff --git a/library/core/src/iter/adapters/take_while.rs b/library/core/src/iter/adapters/take_while.rs index e55d55a6d23..d3f09ab356a 100644 --- a/library/core/src/iter/adapters/take_while.rs +++ b/library/core/src/iter/adapters/take_while.rs @@ -1,6 +1,6 @@ use crate::fmt; use crate::iter::{adapters::SourceIter, FusedIterator, InPlaceIterable, TrustedFused}; -use crate::num::NonZeroUsize; +use crate::num::NonZero; use crate::ops::{ControlFlow, Try}; /// An iterator that only accepts elements while `predicate` returns `true`. @@ -125,6 +125,6 @@ where #[unstable(issue = "none", feature = "inplace_iteration")] unsafe impl InPlaceIterable for TakeWhile { - const EXPAND_BY: Option = I::EXPAND_BY; - const MERGE_BY: Option = I::MERGE_BY; + const EXPAND_BY: Option> = I::EXPAND_BY; + const MERGE_BY: Option> = I::MERGE_BY; } diff --git a/library/core/src/iter/adapters/zip.rs b/library/core/src/iter/adapters/zip.rs index b33400fab47..2e885f06b52 100644 --- a/library/core/src/iter/adapters/zip.rs +++ b/library/core/src/iter/adapters/zip.rs @@ -2,7 +2,7 @@ use crate::cmp; use crate::fmt::{self, Debug}; use crate::iter::{FusedIterator, TrustedFused}; use crate::iter::{InPlaceIterable, SourceIter, TrustedLen, UncheckedIterator}; -use crate::num::NonZeroUsize; +use crate::num::NonZero; /// An iterator that iterates two other iterators simultaneously. /// @@ -489,8 +489,8 @@ where // Since SourceIter forwards the left hand side we do the same here #[unstable(issue = "none", feature = "inplace_iteration")] unsafe impl InPlaceIterable for Zip { - const EXPAND_BY: Option = A::EXPAND_BY; - const MERGE_BY: Option = A::MERGE_BY; + const EXPAND_BY: Option> = A::EXPAND_BY; + const MERGE_BY: Option> = A::MERGE_BY; } #[stable(feature = "rust1", since = "1.0.0")] diff --git a/library/core/src/iter/range.rs b/library/core/src/iter/range.rs index 0e03d0c2d4e..7a4748dcc0d 100644 --- a/library/core/src/iter/range.rs +++ b/library/core/src/iter/range.rs @@ -2,7 +2,7 @@ use crate::ascii::Char as AsciiChar; use crate::convert::TryFrom; use crate::mem; use crate::net::{Ipv4Addr, Ipv6Addr}; -use crate::num::NonZeroUsize; +use crate::num::NonZero; use crate::ops::{self, Try}; use super::{ @@ -629,12 +629,12 @@ trait RangeIteratorImpl { // Iterator fn spec_next(&mut self) -> Option; fn spec_nth(&mut self, n: usize) -> Option; - fn spec_advance_by(&mut self, n: usize) -> Result<(), NonZeroUsize>; + fn spec_advance_by(&mut self, n: usize) -> Result<(), NonZero>; // DoubleEndedIterator fn spec_next_back(&mut self) -> Option; fn spec_nth_back(&mut self, n: usize) -> Option; - fn spec_advance_back_by(&mut self, n: usize) -> Result<(), NonZeroUsize>; + fn spec_advance_back_by(&mut self, n: usize) -> Result<(), NonZero>; } impl RangeIteratorImpl for ops::Range { @@ -666,7 +666,7 @@ impl RangeIteratorImpl for ops::Range { } #[inline] - default fn spec_advance_by(&mut self, n: usize) -> Result<(), NonZeroUsize> { + default fn spec_advance_by(&mut self, n: usize) -> Result<(), NonZero> { let available = if self.start <= self.end { Step::steps_between(&self.start, &self.end).unwrap_or(usize::MAX) } else { @@ -678,7 +678,7 @@ impl RangeIteratorImpl for ops::Range { self.start = Step::forward_checked(self.start.clone(), taken).expect("`Step` invariants not upheld"); - NonZeroUsize::new(n - taken).map_or(Ok(()), Err) + NonZero::::new(n - taken).map_or(Ok(()), Err) } #[inline] @@ -707,7 +707,7 @@ impl RangeIteratorImpl for ops::Range { } #[inline] - default fn spec_advance_back_by(&mut self, n: usize) -> Result<(), NonZeroUsize> { + default fn spec_advance_back_by(&mut self, n: usize) -> Result<(), NonZero> { let available = if self.start <= self.end { Step::steps_between(&self.start, &self.end).unwrap_or(usize::MAX) } else { @@ -719,7 +719,7 @@ impl RangeIteratorImpl for ops::Range { self.end = Step::backward_checked(self.end.clone(), taken).expect("`Step` invariants not upheld"); - NonZeroUsize::new(n - taken).map_or(Ok(()), Err) + NonZero::::new(n - taken).map_or(Ok(()), Err) } } @@ -751,7 +751,7 @@ impl RangeIteratorImpl for ops::Range { } #[inline] - fn spec_advance_by(&mut self, n: usize) -> Result<(), NonZeroUsize> { + fn spec_advance_by(&mut self, n: usize) -> Result<(), NonZero> { let available = if self.start <= self.end { Step::steps_between(&self.start, &self.end).unwrap_or(usize::MAX) } else { @@ -766,7 +766,7 @@ impl RangeIteratorImpl for ops::Range { // Otherwise 0 is returned which always safe to use. self.start = unsafe { Step::forward_unchecked(self.start, taken) }; - NonZeroUsize::new(n - taken).map_or(Ok(()), Err) + NonZero::::new(n - taken).map_or(Ok(()), Err) } #[inline] @@ -795,7 +795,7 @@ impl RangeIteratorImpl for ops::Range { } #[inline] - fn spec_advance_back_by(&mut self, n: usize) -> Result<(), NonZeroUsize> { + fn spec_advance_back_by(&mut self, n: usize) -> Result<(), NonZero> { let available = if self.start <= self.end { Step::steps_between(&self.start, &self.end).unwrap_or(usize::MAX) } else { @@ -807,7 +807,7 @@ impl RangeIteratorImpl for ops::Range { // SAFETY: same as the spec_advance_by() implementation self.end = unsafe { Step::backward_unchecked(self.end, taken) }; - NonZeroUsize::new(n - taken).map_or(Ok(()), Err) + NonZero::::new(n - taken).map_or(Ok(()), Err) } } @@ -871,7 +871,7 @@ impl Iterator for ops::Range { } #[inline] - fn advance_by(&mut self, n: usize) -> Result<(), NonZeroUsize> { + fn advance_by(&mut self, n: usize) -> Result<(), NonZero> { self.spec_advance_by(n) } @@ -949,7 +949,7 @@ impl DoubleEndedIterator for ops::Range { } #[inline] - fn advance_back_by(&mut self, n: usize) -> Result<(), NonZeroUsize> { + fn advance_back_by(&mut self, n: usize) -> Result<(), NonZero> { self.spec_advance_back_by(n) } } diff --git a/library/core/src/iter/sources/repeat.rs b/library/core/src/iter/sources/repeat.rs index 67051f6e97b..0168b11c739 100644 --- a/library/core/src/iter/sources/repeat.rs +++ b/library/core/src/iter/sources/repeat.rs @@ -1,5 +1,5 @@ use crate::iter::{FusedIterator, TrustedLen}; -use crate::num::NonZeroUsize; +use crate::num::NonZero; /// Creates a new iterator that endlessly repeats a single element. /// @@ -81,7 +81,7 @@ impl Iterator for Repeat { } #[inline] - fn advance_by(&mut self, n: usize) -> Result<(), NonZeroUsize> { + fn advance_by(&mut self, n: usize) -> Result<(), NonZero> { // Advancing an infinite iterator of a single element is a no-op. let _ = n; Ok(()) @@ -110,7 +110,7 @@ impl DoubleEndedIterator for Repeat { } #[inline] - fn advance_back_by(&mut self, n: usize) -> Result<(), NonZeroUsize> { + fn advance_back_by(&mut self, n: usize) -> Result<(), NonZero> { // Advancing an infinite iterator of a single element is a no-op. let _ = n; Ok(()) diff --git a/library/core/src/iter/sources/repeat_n.rs b/library/core/src/iter/sources/repeat_n.rs index db2f8b7ac28..77bb8372a44 100644 --- a/library/core/src/iter/sources/repeat_n.rs +++ b/library/core/src/iter/sources/repeat_n.rs @@ -1,6 +1,6 @@ use crate::iter::{FusedIterator, TrustedLen}; use crate::mem::ManuallyDrop; -use crate::num::NonZeroUsize; +use crate::num::NonZero; /// Creates a new iterator that repeats a single element a given number of times. /// @@ -136,7 +136,7 @@ impl Iterator for RepeatN { } #[inline] - fn advance_by(&mut self, skip: usize) -> Result<(), NonZeroUsize> { + fn advance_by(&mut self, skip: usize) -> Result<(), NonZero> { let len = self.count; if skip >= len { @@ -145,7 +145,7 @@ impl Iterator for RepeatN { if skip > len { // SAFETY: we just checked that the difference is positive - Err(unsafe { NonZeroUsize::new_unchecked(skip - len) }) + Err(unsafe { NonZero::::new_unchecked(skip - len) }) } else { self.count = len - skip; Ok(()) @@ -178,7 +178,7 @@ impl DoubleEndedIterator for RepeatN { } #[inline] - fn advance_back_by(&mut self, n: usize) -> Result<(), NonZeroUsize> { + fn advance_back_by(&mut self, n: usize) -> Result<(), NonZero> { self.advance_by(n) } diff --git a/library/core/src/iter/traits/double_ended.rs b/library/core/src/iter/traits/double_ended.rs index 4c8af4eba78..eb830256962 100644 --- a/library/core/src/iter/traits/double_ended.rs +++ b/library/core/src/iter/traits/double_ended.rs @@ -1,4 +1,4 @@ -use crate::num::NonZeroUsize; +use crate::num::NonZero; use crate::ops::{ControlFlow, Try}; /// An iterator able to yield elements from both ends. @@ -119,8 +119,8 @@ pub trait DoubleEndedIterator: Iterator { /// /// ``` /// #![feature(iter_advance_by)] - /// /// use std::num::NonZeroUsize; + /// /// let a = [3, 4, 5, 6]; /// let mut iter = a.iter(); /// @@ -134,11 +134,11 @@ pub trait DoubleEndedIterator: Iterator { /// [`Err(k)`]: Err #[inline] #[unstable(feature = "iter_advance_by", reason = "recently added", issue = "77404")] - fn advance_back_by(&mut self, n: usize) -> Result<(), NonZeroUsize> { + fn advance_back_by(&mut self, n: usize) -> Result<(), NonZero> { for i in 0..n { if self.next_back().is_none() { // SAFETY: `i` is always less than `n`. - return Err(unsafe { NonZeroUsize::new_unchecked(n - i) }); + return Err(unsafe { NonZero::::new_unchecked(n - i) }); } } Ok(()) @@ -373,7 +373,7 @@ impl<'a, I: DoubleEndedIterator + ?Sized> DoubleEndedIterator for &'a mut I { fn next_back(&mut self) -> Option { (**self).next_back() } - fn advance_back_by(&mut self, n: usize) -> Result<(), NonZeroUsize> { + fn advance_back_by(&mut self, n: usize) -> Result<(), NonZero> { (**self).advance_back_by(n) } fn nth_back(&mut self, n: usize) -> Option { diff --git a/library/core/src/iter/traits/iterator.rs b/library/core/src/iter/traits/iterator.rs index 20dd95a3a46..6df66e779c4 100644 --- a/library/core/src/iter/traits/iterator.rs +++ b/library/core/src/iter/traits/iterator.rs @@ -1,6 +1,6 @@ use crate::array; use crate::cmp::{self, Ordering}; -use crate::num::NonZeroUsize; +use crate::num::NonZero; use crate::ops::{ChangeOutputType, ControlFlow, FromResidual, Residual, Try}; use super::super::try_process; @@ -320,8 +320,8 @@ pub trait Iterator { /// /// ``` /// #![feature(iter_advance_by)] - /// /// use std::num::NonZeroUsize; + /// /// let a = [1, 2, 3, 4]; /// let mut iter = a.iter(); /// @@ -333,11 +333,11 @@ pub trait Iterator { #[inline] #[unstable(feature = "iter_advance_by", reason = "recently added", issue = "77404")] #[rustc_do_not_const_check] - fn advance_by(&mut self, n: usize) -> Result<(), NonZeroUsize> { + fn advance_by(&mut self, n: usize) -> Result<(), NonZero> { for i in 0..n { if self.next().is_none() { // SAFETY: `i` is always less than `n`. - return Err(unsafe { NonZeroUsize::new_unchecked(n - i) }); + return Err(unsafe { NonZero::::new_unchecked(n - i) }); } } Ok(()) @@ -4138,7 +4138,7 @@ impl Iterator for &mut I { fn size_hint(&self) -> (usize, Option) { (**self).size_hint() } - fn advance_by(&mut self, n: usize) -> Result<(), NonZeroUsize> { + fn advance_by(&mut self, n: usize) -> Result<(), NonZero> { (**self).advance_by(n) } fn nth(&mut self, n: usize) -> Option { diff --git a/library/core/src/iter/traits/marker.rs b/library/core/src/iter/traits/marker.rs index e7c1f195aac..8bdbca120d7 100644 --- a/library/core/src/iter/traits/marker.rs +++ b/library/core/src/iter/traits/marker.rs @@ -1,5 +1,5 @@ use crate::iter::Step; -use crate::num::NonZeroUsize; +use crate::num::NonZero; /// Same as FusedIterator /// @@ -91,12 +91,12 @@ pub unsafe trait InPlaceIterable { /// E.g. [[u8; 4]; 4].iter().flatten().flatten() would have a `EXPAND_BY` of 16. /// This is an upper bound, i.e. the transformations will produce at most this many items per /// input. It's meant for layout calculations. - const EXPAND_BY: Option; + const EXPAND_BY: Option>; /// The product of many-to-one item reductions that happen throughout the iterator pipeline. /// E.g. [u8].iter().array_chunks::<4>().array_chunks::<4>() would have a `MERGE_BY` of 16. /// This is a lower bound, i.e. the transformations will consume at least this many items per /// output. - const MERGE_BY: Option; + const MERGE_BY: Option>; } /// A type that upholds all invariants of [`Step`]. diff --git a/library/core/src/num/nonzero.rs b/library/core/src/num/nonzero.rs index 288ad8e8d87..ddaffadf4bf 100644 --- a/library/core/src/num/nonzero.rs +++ b/library/core/src/num/nonzero.rs @@ -312,10 +312,10 @@ macro_rules! nonzero_integer { /// #![feature(non_zero_count_ones)] /// # fn main() { test().unwrap(); } /// # fn test() -> Option<()> { - #[doc = concat!("# use std::num::{self, ", stringify!($Ty), "};")] - /// - /// let one = num::NonZeroU32::new(1)?; - /// let three = num::NonZeroU32::new(3)?; + /// # use std::num::*; + /// # + /// let one = NonZeroU32::new(1)?; + /// let three = NonZeroU32::new(3)?; #[doc = concat!("let a = ", stringify!($Ty), "::new(0b100_0000)?;")] #[doc = concat!("let b = ", stringify!($Ty), "::new(0b100_0011)?;")] /// @@ -336,7 +336,7 @@ macro_rules! nonzero_integer { // SAFETY: // `self` is non-zero, which means it has at least one bit set, which means // that the result of `count_ones` is non-zero. - unsafe { NonZeroU32::new_unchecked(self.get().count_ones()) } + unsafe { NonZero::::new_unchecked(self.get().count_ones()) } } nonzero_integer_signedness_dependent_methods! { diff --git a/library/core/src/ops/index_range.rs b/library/core/src/ops/index_range.rs index 743799c4b3e..2ba0bd158f7 100644 --- a/library/core/src/ops/index_range.rs +++ b/library/core/src/ops/index_range.rs @@ -1,6 +1,6 @@ use crate::intrinsics::{unchecked_add, unchecked_sub}; use crate::iter::{FusedIterator, TrustedLen}; -use crate::num::NonZeroUsize; +use crate::num::NonZero; /// Like a `Range`, but with a safety invariant that `start <= end`. /// @@ -130,9 +130,9 @@ impl Iterator for IndexRange { } #[inline] - fn advance_by(&mut self, n: usize) -> Result<(), NonZeroUsize> { + fn advance_by(&mut self, n: usize) -> Result<(), NonZero> { let taken = self.take_prefix(n); - NonZeroUsize::new(n - taken.len()).map_or(Ok(()), Err) + NonZero::::new(n - taken.len()).map_or(Ok(()), Err) } } @@ -148,9 +148,9 @@ impl DoubleEndedIterator for IndexRange { } #[inline] - fn advance_back_by(&mut self, n: usize) -> Result<(), NonZeroUsize> { + fn advance_back_by(&mut self, n: usize) -> Result<(), NonZero> { let taken = self.take_suffix(n); - NonZeroUsize::new(n - taken.len()).map_or(Ok(()), Err) + NonZero::::new(n - taken.len()).map_or(Ok(()), Err) } } diff --git a/library/core/src/ptr/alignment.rs b/library/core/src/ptr/alignment.rs index ce176e6fc18..ad22ee5a027 100644 --- a/library/core/src/ptr/alignment.rs +++ b/library/core/src/ptr/alignment.rs @@ -1,5 +1,5 @@ use crate::convert::{TryFrom, TryInto}; -use crate::num::NonZeroUsize; +use crate::num::{NonZero, NonZeroUsize}; use crate::{cmp, fmt, hash, mem, num}; /// A type storing a `usize` which is a power of two, and thus @@ -100,7 +100,7 @@ impl Alignment { #[inline] pub const fn as_nonzero(self) -> NonZeroUsize { // SAFETY: All the discriminants are non-zero. - unsafe { NonZeroUsize::new_unchecked(self.as_usize()) } + unsafe { NonZero::::new_unchecked(self.as_usize()) } } /// Returns the base-2 logarithm of the alignment. diff --git a/library/core/src/ptr/non_null.rs b/library/core/src/ptr/non_null.rs index 320cd5eb3b2..2246596a883 100644 --- a/library/core/src/ptr/non_null.rs +++ b/library/core/src/ptr/non_null.rs @@ -6,7 +6,7 @@ use crate::intrinsics::assert_unsafe_precondition; use crate::marker::Unsize; use crate::mem::SizedTypeProperties; use crate::mem::{self, MaybeUninit}; -use crate::num::NonZeroUsize; +use crate::num::{NonZero, NonZeroUsize}; use crate::ops::{CoerceUnsized, DispatchFromDyn}; use crate::ptr; use crate::ptr::Unique; @@ -295,7 +295,7 @@ impl NonNull { pub fn addr(self) -> NonZeroUsize { // SAFETY: The pointer is guaranteed by the type to be non-null, // meaning that the address will be non-zero. - unsafe { NonZeroUsize::new_unchecked(self.pointer.addr()) } + unsafe { NonZero::::new_unchecked(self.pointer.addr()) } } /// Creates a new pointer with the given address. diff --git a/library/core/src/slice/iter.rs b/library/core/src/slice/iter.rs index 1429313c890..617b385a960 100644 --- a/library/core/src/slice/iter.rs +++ b/library/core/src/slice/iter.rs @@ -11,7 +11,7 @@ use crate::iter::{ }; use crate::marker::PhantomData; use crate::mem::{self, SizedTypeProperties}; -use crate::num::{NonZero, NonZeroUsize}; +use crate::num::NonZero; use crate::ptr::{self, invalid, invalid_mut, NonNull}; use super::{from_raw_parts, from_raw_parts_mut}; diff --git a/library/core/src/slice/iter/macros.rs b/library/core/src/slice/iter/macros.rs index fc6af45fb90..53218391dcf 100644 --- a/library/core/src/slice/iter/macros.rs +++ b/library/core/src/slice/iter/macros.rs @@ -196,11 +196,11 @@ macro_rules! iterator { } #[inline] - fn advance_by(&mut self, n: usize) -> Result<(), NonZeroUsize> { + fn advance_by(&mut self, n: usize) -> Result<(), NonZero> { let advance = cmp::min(len!(self), n); // SAFETY: By construction, `advance` does not exceed `self.len()`. unsafe { self.post_inc_start(advance) }; - NonZeroUsize::new(n - advance).map_or(Ok(()), Err) + NonZero::::new(n - advance).map_or(Ok(()), Err) } #[inline] @@ -421,11 +421,11 @@ macro_rules! iterator { } #[inline] - fn advance_back_by(&mut self, n: usize) -> Result<(), NonZeroUsize> { + fn advance_back_by(&mut self, n: usize) -> Result<(), NonZero> { let advance = cmp::min(len!(self), n); // SAFETY: By construction, `advance` does not exceed `self.len()`. unsafe { self.pre_dec_end(advance) }; - NonZeroUsize::new(n - advance).map_or(Ok(()), Err) + NonZero::::new(n - advance).map_or(Ok(()), Err) } } diff --git a/library/core/src/slice/mod.rs b/library/core/src/slice/mod.rs index 73e92ed1dad..c70a3d3224d 100644 --- a/library/core/src/slice/mod.rs +++ b/library/core/src/slice/mod.rs @@ -11,7 +11,7 @@ use crate::fmt; use crate::hint; use crate::intrinsics::exact_div; use crate::mem::{self, SizedTypeProperties}; -use crate::num::NonZeroUsize; +use crate::num::NonZero; use crate::ops::{Bound, OneSidedRange, Range, RangeBounds}; use crate::panic::debug_assert_nounwind; use crate::ptr; @@ -1086,7 +1086,7 @@ impl [T] { #[inline] #[track_caller] pub fn windows(&self, size: usize) -> Windows<'_, T> { - let size = NonZeroUsize::new(size).expect("window size must be non-zero"); + let size = NonZero::::new(size).expect("window size must be non-zero"); Windows::new(self, size) } diff --git a/library/core/src/str/iter.rs b/library/core/src/str/iter.rs index 4d6239e11a3..d2180fa83fb 100644 --- a/library/core/src/str/iter.rs +++ b/library/core/src/str/iter.rs @@ -8,7 +8,7 @@ use crate::iter::{TrustedRandomAccess, TrustedRandomAccessNoCoerce}; use crate::ops::Try; use crate::option; use crate::slice::{self, Split as SliceSplit}; -use core::num::NonZeroUsize; +use core::num::{NonZero, NonZeroUsize}; use super::from_utf8_unchecked; use super::pattern::Pattern; @@ -96,7 +96,7 @@ impl<'a> Iterator for Chars<'a> { unsafe { self.iter.advance_by(slurp).unwrap_unchecked() }; } - NonZeroUsize::new(remainder).map_or(Ok(()), Err) + NonZero::::new(remainder).map_or(Ok(()), Err) } #[inline] diff --git a/library/core/tests/array.rs b/library/core/tests/array.rs index ed52de3cbec..579c140c198 100644 --- a/library/core/tests/array.rs +++ b/library/core/tests/array.rs @@ -1,4 +1,4 @@ -use core::num::NonZeroUsize; +use core::num::NonZero; use core::sync::atomic::{AtomicUsize, Ordering}; use core::{array, assert_eq}; @@ -548,7 +548,7 @@ fn array_intoiter_advance_by() { assert_eq!(counter.get(), 13); let r = it.advance_by(123456); - assert_eq!(r, Err(NonZeroUsize::new(123456 - 87).unwrap())); + assert_eq!(r, Err(NonZero::::new(123456 - 87).unwrap())); assert_eq!(it.len(), 0); assert_eq!(counter.get(), 100); @@ -558,7 +558,7 @@ fn array_intoiter_advance_by() { assert_eq!(counter.get(), 100); let r = it.advance_by(10); - assert_eq!(r, Err(NonZeroUsize::new(10).unwrap())); + assert_eq!(r, Err(NonZero::::new(10).unwrap())); assert_eq!(it.len(), 0); assert_eq!(counter.get(), 100); } @@ -601,7 +601,7 @@ fn array_intoiter_advance_back_by() { assert_eq!(counter.get(), 13); let r = it.advance_back_by(123456); - assert_eq!(r, Err(NonZeroUsize::new(123456 - 87).unwrap())); + assert_eq!(r, Err(NonZero::::new(123456 - 87).unwrap())); assert_eq!(it.len(), 0); assert_eq!(counter.get(), 100); @@ -611,7 +611,7 @@ fn array_intoiter_advance_back_by() { assert_eq!(counter.get(), 100); let r = it.advance_back_by(10); - assert_eq!(r, Err(NonZeroUsize::new(10).unwrap())); + assert_eq!(r, Err(NonZero::::new(10).unwrap())); assert_eq!(it.len(), 0); assert_eq!(counter.get(), 100); } diff --git a/library/core/tests/iter/adapters/chain.rs b/library/core/tests/iter/adapters/chain.rs index ad78a85a88d..9e098d5bee4 100644 --- a/library/core/tests/iter/adapters/chain.rs +++ b/library/core/tests/iter/adapters/chain.rs @@ -1,6 +1,6 @@ use super::*; use core::iter::*; -use core::num::NonZeroUsize; +use core::num::NonZero; #[test] fn test_iterator_chain() { @@ -34,7 +34,10 @@ fn test_iterator_chain_advance_by() { let mut iter = Unfuse::new(xs).chain(Unfuse::new(ys)); assert_eq!(iter.advance_by(i), Ok(())); assert_eq!(iter.next(), Some(&xs[i])); - assert_eq!(iter.advance_by(100), Err(NonZeroUsize::new(100 - (len - i - 1)).unwrap())); + assert_eq!( + iter.advance_by(100), + Err(NonZero::::new(100 - (len - i - 1)).unwrap()) + ); assert_eq!(iter.advance_by(0), Ok(())); } @@ -44,7 +47,7 @@ fn test_iterator_chain_advance_by() { assert_eq!(iter.next(), Some(&ys[i])); assert_eq!( iter.advance_by(100), - Err(NonZeroUsize::new(100 - (ys.len() - i - 1)).unwrap()) + Err(NonZero::::new(100 - (ys.len() - i - 1)).unwrap()) ); assert_eq!(iter.advance_by(0), Ok(())); } @@ -55,7 +58,7 @@ fn test_iterator_chain_advance_by() { assert_eq!(iter.advance_by(0), Ok(())); let mut iter = xs.iter().chain(ys); - assert_eq!(iter.advance_by(len + 1), Err(NonZeroUsize::new(1).unwrap())); + assert_eq!(iter.advance_by(len + 1), Err(NonZero::::new(1).unwrap())); assert_eq!(iter.advance_by(0), Ok(())); } @@ -76,7 +79,7 @@ fn test_iterator_chain_advance_back_by() { assert_eq!(iter.next_back(), Some(&ys[ys.len() - i - 1])); assert_eq!( iter.advance_back_by(100), - Err(NonZeroUsize::new(100 - (len - i - 1)).unwrap()) + Err(NonZero::::new(100 - (len - i - 1)).unwrap()) ); assert_eq!(iter.advance_back_by(0), Ok(())); } @@ -87,7 +90,7 @@ fn test_iterator_chain_advance_back_by() { assert_eq!(iter.next_back(), Some(&xs[xs.len() - i - 1])); assert_eq!( iter.advance_back_by(100), - Err(NonZeroUsize::new(100 - (xs.len() - i - 1)).unwrap()) + Err(NonZero::::new(100 - (xs.len() - i - 1)).unwrap()) ); assert_eq!(iter.advance_back_by(0), Ok(())); } @@ -98,7 +101,7 @@ fn test_iterator_chain_advance_back_by() { assert_eq!(iter.advance_back_by(0), Ok(())); let mut iter = xs.iter().chain(ys); - assert_eq!(iter.advance_back_by(len + 1), Err(NonZeroUsize::new(1).unwrap())); + assert_eq!(iter.advance_back_by(len + 1), Err(NonZero::::new(1).unwrap())); assert_eq!(iter.advance_back_by(0), Ok(())); } diff --git a/library/core/tests/iter/adapters/enumerate.rs b/library/core/tests/iter/adapters/enumerate.rs index ff57973a62a..5aa7532c10c 100644 --- a/library/core/tests/iter/adapters/enumerate.rs +++ b/library/core/tests/iter/adapters/enumerate.rs @@ -1,5 +1,5 @@ use core::iter::*; -use core::num::NonZeroUsize; +use core::num::NonZero; #[test] fn test_iterator_enumerate() { @@ -66,7 +66,7 @@ fn test_iterator_enumerate_advance_by() { assert_eq!(it.next(), Some((2, &2))); assert_eq!(it.advance_by(2), Ok(())); assert_eq!(it.next(), Some((5, &5))); - assert_eq!(it.advance_by(1), Err(NonZeroUsize::new(1).unwrap())); + assert_eq!(it.advance_by(1), Err(NonZero::::new(1).unwrap())); assert_eq!(it.next(), None); } diff --git a/library/core/tests/iter/adapters/flatten.rs b/library/core/tests/iter/adapters/flatten.rs index f429d90cd7d..fb6383b3289 100644 --- a/library/core/tests/iter/adapters/flatten.rs +++ b/library/core/tests/iter/adapters/flatten.rs @@ -1,7 +1,7 @@ use super::*; use core::assert_eq; use core::iter::*; -use core::num::NonZeroUsize; +use core::num::NonZero; #[test] fn test_iterator_flatten() { @@ -72,8 +72,8 @@ fn test_flatten_advance_by() { assert_eq!(it.advance_back_by(9), Ok(())); assert_eq!(it.next_back(), Some(25)); - assert_eq!(it.advance_by(usize::MAX), Err(NonZeroUsize::new(usize::MAX - 9).unwrap())); - assert_eq!(it.advance_back_by(usize::MAX), Err(NonZeroUsize::new(usize::MAX).unwrap())); + assert_eq!(it.advance_by(usize::MAX), Err(NonZero::::new(usize::MAX - 9).unwrap())); + assert_eq!(it.advance_back_by(usize::MAX), Err(NonZero::::new(usize::MAX).unwrap())); assert_eq!(it.advance_by(0), Ok(())); assert_eq!(it.advance_back_by(0), Ok(())); assert_eq!(it.size_hint(), (0, Some(0))); diff --git a/library/core/tests/iter/adapters/skip.rs b/library/core/tests/iter/adapters/skip.rs index e3e88a84fad..45726d158b6 100644 --- a/library/core/tests/iter/adapters/skip.rs +++ b/library/core/tests/iter/adapters/skip.rs @@ -1,5 +1,5 @@ use core::iter::*; -use core::num::NonZeroUsize; +use core::num::NonZero; use super::Unfuse; @@ -75,14 +75,14 @@ fn test_iterator_skip_nth() { #[test] fn test_skip_advance_by() { assert_eq!((0..0).skip(10).advance_by(0), Ok(())); - assert_eq!((0..0).skip(10).advance_by(1), Err(NonZeroUsize::new(1).unwrap())); + assert_eq!((0..0).skip(10).advance_by(1), Err(NonZero::::new(1).unwrap())); assert_eq!( (0u128..(usize::MAX as u128) + 1).skip(usize::MAX - 10).advance_by(usize::MAX - 5), - Err(NonZeroUsize::new(usize::MAX - 16).unwrap()) + Err(NonZero::::new(usize::MAX - 16).unwrap()) ); assert_eq!((0u128..u128::MAX).skip(usize::MAX - 10).advance_by(20), Ok(())); - assert_eq!((0..2).skip(1).advance_back_by(10), Err(NonZeroUsize::new(9).unwrap())); + assert_eq!((0..2).skip(1).advance_back_by(10), Err(NonZero::::new(9).unwrap())); assert_eq!((0..0).skip(1).advance_back_by(0), Ok(())); } diff --git a/library/core/tests/iter/adapters/take.rs b/library/core/tests/iter/adapters/take.rs index ff6e362b065..6aa1b929546 100644 --- a/library/core/tests/iter/adapters/take.rs +++ b/library/core/tests/iter/adapters/take.rs @@ -1,5 +1,5 @@ use core::iter::*; -use core::num::NonZeroUsize; +use core::num::NonZero; #[test] fn test_iterator_take() { @@ -79,23 +79,23 @@ fn test_take_advance_by() { let mut take = (0..10).take(3); assert_eq!(take.advance_by(2), Ok(())); assert_eq!(take.next(), Some(2)); - assert_eq!(take.advance_by(1), Err(NonZeroUsize::new(1).unwrap())); + assert_eq!(take.advance_by(1), Err(NonZero::::new(1).unwrap())); assert_eq!((0..0).take(10).advance_by(0), Ok(())); - assert_eq!((0..0).take(10).advance_by(1), Err(NonZeroUsize::new(1).unwrap())); - assert_eq!((0..10).take(4).advance_by(5), Err(NonZeroUsize::new(1).unwrap())); + assert_eq!((0..0).take(10).advance_by(1), Err(NonZero::::new(1).unwrap())); + assert_eq!((0..10).take(4).advance_by(5), Err(NonZero::::new(1).unwrap())); let mut take = (0..10).take(3); assert_eq!(take.advance_back_by(2), Ok(())); assert_eq!(take.next(), Some(0)); - assert_eq!(take.advance_back_by(1), Err(NonZeroUsize::new(1).unwrap())); + assert_eq!(take.advance_back_by(1), Err(NonZero::::new(1).unwrap())); - assert_eq!((0..2).take(1).advance_back_by(10), Err(NonZeroUsize::new(9).unwrap())); - assert_eq!((0..0).take(1).advance_back_by(1), Err(NonZeroUsize::new(1).unwrap())); + assert_eq!((0..2).take(1).advance_back_by(10), Err(NonZero::::new(9).unwrap())); + assert_eq!((0..0).take(1).advance_back_by(1), Err(NonZero::::new(1).unwrap())); assert_eq!((0..0).take(1).advance_back_by(0), Ok(())); assert_eq!( (0..usize::MAX).take(100).advance_back_by(usize::MAX), - Err(NonZeroUsize::new(usize::MAX - 100).unwrap()) + Err(NonZero::::new(usize::MAX - 100).unwrap()) ); } diff --git a/library/core/tests/iter/range.rs b/library/core/tests/iter/range.rs index a6b9f1cb7c8..f840218382d 100644 --- a/library/core/tests/iter/range.rs +++ b/library/core/tests/iter/range.rs @@ -1,6 +1,6 @@ use super::*; use core::ascii::Char as AsciiChar; -use core::num::NonZeroUsize; +use core::num::NonZero; #[test] fn test_range() { @@ -314,7 +314,7 @@ fn test_range_advance_by() { assert_eq!((r.start, r.end), (1, usize::MAX - 1)); - assert_eq!(Err(NonZeroUsize::new(2).unwrap()), r.advance_by(usize::MAX)); + assert_eq!(Err(NonZero::::new(2).unwrap()), r.advance_by(usize::MAX)); assert_eq!(Ok(()), r.advance_by(0)); assert_eq!(Ok(()), r.advance_back_by(0)); diff --git a/library/core/tests/iter/traits/iterator.rs b/library/core/tests/iter/traits/iterator.rs index 4c2d843eaa0..507f15c6088 100644 --- a/library/core/tests/iter/traits/iterator.rs +++ b/library/core/tests/iter/traits/iterator.rs @@ -1,4 +1,4 @@ -use core::num::NonZeroUsize; +use core::num::NonZero; /// A wrapper struct that implements `Eq` and `Ord` based on the wrapped /// integer modulo 3. Used to test that `Iterator::max` and `Iterator::min` @@ -152,11 +152,14 @@ fn test_iterator_advance_by() { let mut iter = v.iter(); assert_eq!(iter.advance_by(i), Ok(())); assert_eq!(iter.next().unwrap(), &v[i]); - assert_eq!(iter.advance_by(100), Err(NonZeroUsize::new(100 - (v.len() - 1 - i)).unwrap())); + assert_eq!( + iter.advance_by(100), + Err(NonZero::::new(100 - (v.len() - 1 - i)).unwrap()) + ); } assert_eq!(v.iter().advance_by(v.len()), Ok(())); - assert_eq!(v.iter().advance_by(100), Err(NonZeroUsize::new(100 - v.len()).unwrap())); + assert_eq!(v.iter().advance_by(100), Err(NonZero::::new(100 - v.len()).unwrap())); } #[test] @@ -169,12 +172,12 @@ fn test_iterator_advance_back_by() { assert_eq!(iter.next_back().unwrap(), &v[v.len() - 1 - i]); assert_eq!( iter.advance_back_by(100), - Err(NonZeroUsize::new(100 - (v.len() - 1 - i)).unwrap()) + Err(NonZero::::new(100 - (v.len() - 1 - i)).unwrap()) ); } assert_eq!(v.iter().advance_back_by(v.len()), Ok(())); - assert_eq!(v.iter().advance_back_by(100), Err(NonZeroUsize::new(100 - v.len()).unwrap())); + assert_eq!(v.iter().advance_back_by(100), Err(NonZero::::new(100 - v.len()).unwrap())); } #[test] @@ -187,12 +190,15 @@ fn test_iterator_rev_advance_back_by() { assert_eq!(iter.next_back().unwrap(), &v[i]); assert_eq!( iter.advance_back_by(100), - Err(NonZeroUsize::new(100 - (v.len() - 1 - i)).unwrap()) + Err(NonZero::::new(100 - (v.len() - 1 - i)).unwrap()) ); } assert_eq!(v.iter().rev().advance_back_by(v.len()), Ok(())); - assert_eq!(v.iter().rev().advance_back_by(100), Err(NonZeroUsize::new(100 - v.len()).unwrap())); + assert_eq!( + v.iter().rev().advance_back_by(100), + Err(NonZero::::new(100 - v.len()).unwrap()) + ); } #[test] @@ -460,11 +466,14 @@ fn test_iterator_rev_advance_by() { let mut iter = v.iter().rev(); assert_eq!(iter.advance_by(i), Ok(())); assert_eq!(iter.next().unwrap(), &v[v.len() - 1 - i]); - assert_eq!(iter.advance_by(100), Err(NonZeroUsize::new(100 - (v.len() - 1 - i)).unwrap())); + assert_eq!( + iter.advance_by(100), + Err(NonZero::::new(100 - (v.len() - 1 - i)).unwrap()) + ); } assert_eq!(v.iter().rev().advance_by(v.len()), Ok(())); - assert_eq!(v.iter().rev().advance_by(100), Err(NonZeroUsize::new(100 - v.len()).unwrap())); + assert_eq!(v.iter().rev().advance_by(100), Err(NonZero::::new(100 - v.len()).unwrap())); } #[test] diff --git a/library/core/tests/lib.rs b/library/core/tests/lib.rs index 2fe79650dbf..fa0e9a979d0 100644 --- a/library/core/tests/lib.rs +++ b/library/core/tests/lib.rs @@ -40,6 +40,7 @@ #![feature(float_minimum_maximum)] #![feature(future_join)] #![feature(generic_assert_internals)] +#![feature(generic_nonzero)] #![feature(array_try_from_fn)] #![feature(hasher_prefixfree_extras)] #![feature(hashmap_internals)] diff --git a/library/core/tests/nonzero.rs b/library/core/tests/nonzero.rs index 8873d26880c..69dbe5d7dea 100644 --- a/library/core/tests/nonzero.rs +++ b/library/core/tests/nonzero.rs @@ -1,30 +1,27 @@ -use core::num::{ - IntErrorKind, NonZeroI128, NonZeroI16, NonZeroI32, NonZeroI64, NonZeroI8, NonZeroIsize, - NonZeroU128, NonZeroU16, NonZeroU32, NonZeroU64, NonZeroU8, NonZeroUsize, -}; +use core::num::{IntErrorKind, NonZero}; use core::option::Option::None; use std::mem::size_of; #[test] fn test_create_nonzero_instance() { - let _a = unsafe { NonZeroU32::new_unchecked(21) }; + let _a = unsafe { NonZero::::new_unchecked(21) }; } #[test] fn test_size_nonzero_in_option() { - assert_eq!(size_of::(), size_of::>()); - assert_eq!(size_of::(), size_of::>()); + assert_eq!(size_of::>(), size_of::>>()); + assert_eq!(size_of::>(), size_of::>>()); } #[test] fn test_match_on_nonzero_option() { - let a = Some(unsafe { NonZeroU32::new_unchecked(42) }); + let a = Some(unsafe { NonZero::::new_unchecked(42) }); match a { Some(val) => assert_eq!(val.get(), 42), None => panic!("unexpected None while matching on Some(NonZeroU32(_))"), } - match unsafe { Some(NonZeroU32::new_unchecked(43)) } { + match unsafe { Some(NonZero::::new_unchecked(43)) } { Some(val) => assert_eq!(val.get(), 43), None => panic!("unexpected None while matching on Some(NonZeroU32(_))"), } @@ -89,13 +86,14 @@ fn test_match_option_string() { } mod atom { - use core::num::NonZeroU32; + use core::num::NonZero; #[derive(PartialEq, Eq)] pub struct Atom { - index: NonZeroU32, // private + index: NonZero, // private } - pub const FOO_ATOM: Atom = Atom { index: unsafe { NonZeroU32::new_unchecked(7) } }; + + pub const FOO_ATOM: Atom = Atom { index: unsafe { NonZero::::new_unchecked(7) } }; } macro_rules! atom { @@ -115,62 +113,65 @@ fn test_match_nonzero_const_pattern() { #[test] fn test_from_nonzero() { - let nz = NonZeroU32::new(1).unwrap(); + let nz = NonZero::::new(1).unwrap(); let num: u32 = nz.into(); assert_eq!(num, 1u32); } #[test] fn test_from_signed_nonzero() { - let nz = NonZeroI32::new(1).unwrap(); + let nz = NonZero::::new(1).unwrap(); let num: i32 = nz.into(); assert_eq!(num, 1i32); } #[test] fn test_from_str() { - assert_eq!("123".parse::(), Ok(NonZeroU8::new(123).unwrap())); - assert_eq!("0".parse::().err().map(|e| e.kind().clone()), Some(IntErrorKind::Zero)); + assert_eq!("123".parse::>(), Ok(NonZero::::new(123).unwrap())); + assert_eq!( + "0".parse::>().err().map(|e| e.kind().clone()), + Some(IntErrorKind::Zero) + ); assert_eq!( - "-1".parse::().err().map(|e| e.kind().clone()), + "-1".parse::>().err().map(|e| e.kind().clone()), Some(IntErrorKind::InvalidDigit) ); assert_eq!( - "-129".parse::().err().map(|e| e.kind().clone()), + "-129".parse::>().err().map(|e| e.kind().clone()), Some(IntErrorKind::NegOverflow) ); assert_eq!( - "257".parse::().err().map(|e| e.kind().clone()), + "257".parse::>().err().map(|e| e.kind().clone()), Some(IntErrorKind::PosOverflow) ); } #[test] fn test_nonzero_bitor() { - let nz_alt = NonZeroU8::new(0b1010_1010).unwrap(); - let nz_low = NonZeroU8::new(0b0000_1111).unwrap(); + let nz_alt = NonZero::::new(0b1010_1010).unwrap(); + let nz_low = NonZero::::new(0b0000_1111).unwrap(); - let both_nz: NonZeroU8 = nz_alt | nz_low; + let both_nz: NonZero = nz_alt | nz_low; assert_eq!(both_nz.get(), 0b1010_1111); - let rhs_int: NonZeroU8 = nz_low | 0b1100_0000u8; + let rhs_int: NonZero = nz_low | 0b1100_0000u8; assert_eq!(rhs_int.get(), 0b1100_1111); - let rhs_zero: NonZeroU8 = nz_alt | 0u8; + let rhs_zero: NonZero = nz_alt | 0u8; assert_eq!(rhs_zero.get(), 0b1010_1010); - let lhs_int: NonZeroU8 = 0b0110_0110u8 | nz_alt; + let lhs_int: NonZero = 0b0110_0110u8 | nz_alt; assert_eq!(lhs_int.get(), 0b1110_1110); - let lhs_zero: NonZeroU8 = 0u8 | nz_low; + let lhs_zero: NonZero = 0u8 | nz_low; assert_eq!(lhs_zero.get(), 0b0000_1111); } #[test] fn test_nonzero_bitor_assign() { - let mut target = NonZeroU8::new(0b1010_1010).unwrap(); + let mut target = NonZero::::new(0b1010_1010).unwrap(); - target |= NonZeroU8::new(0b0000_1111).unwrap(); + target |= NonZero::::new(0b0000_1111).unwrap(); assert_eq!(target.get(), 0b1010_1111); target |= 0b0001_0000; @@ -182,147 +183,147 @@ fn test_nonzero_bitor_assign() { #[test] fn test_nonzero_from_int_on_success() { - assert_eq!(NonZeroU8::try_from(5), Ok(NonZeroU8::new(5).unwrap())); - assert_eq!(NonZeroU32::try_from(5), Ok(NonZeroU32::new(5).unwrap())); + assert_eq!(NonZero::::try_from(5), Ok(NonZero::::new(5).unwrap())); + assert_eq!(NonZero::::try_from(5), Ok(NonZero::::new(5).unwrap())); - assert_eq!(NonZeroI8::try_from(-5), Ok(NonZeroI8::new(-5).unwrap())); - assert_eq!(NonZeroI32::try_from(-5), Ok(NonZeroI32::new(-5).unwrap())); + assert_eq!(NonZero::::try_from(-5), Ok(NonZero::::new(-5).unwrap())); + assert_eq!(NonZero::::try_from(-5), Ok(NonZero::::new(-5).unwrap())); } #[test] fn test_nonzero_from_int_on_err() { - assert!(NonZeroU8::try_from(0).is_err()); - assert!(NonZeroU32::try_from(0).is_err()); + assert!(NonZero::::try_from(0).is_err()); + assert!(NonZero::::try_from(0).is_err()); - assert!(NonZeroI8::try_from(0).is_err()); - assert!(NonZeroI32::try_from(0).is_err()); + assert!(NonZero::::try_from(0).is_err()); + assert!(NonZero::::try_from(0).is_err()); } #[test] fn nonzero_const() { // test that the methods of `NonZeroX>` are usable in a const context - // Note: only tests NonZero8 + // Note: only tests NonZero - const NONZERO_U8: NonZeroU8 = unsafe { NonZeroU8::new_unchecked(5) }; + const NONZERO_U8: NonZero = unsafe { NonZero::::new_unchecked(5) }; const GET: u8 = NONZERO_U8.get(); assert_eq!(GET, 5); - const ZERO: Option = NonZeroU8::new(0); + const ZERO: Option> = NonZero::::new(0); assert!(ZERO.is_none()); - const ONE: Option = NonZeroU8::new(1); + const ONE: Option> = NonZero::::new(1); assert!(ONE.is_some()); /* FIXME(#110395) const FROM_NONZERO_U8: u8 = u8::from(NONZERO_U8); assert_eq!(FROM_NONZERO_U8, 5); - const NONZERO_CONVERT: NonZeroU32 = NonZeroU32::from(NONZERO_U8); + const NONZERO_CONVERT: NonZero = NonZero::::from(NONZERO_U8); assert_eq!(NONZERO_CONVERT.get(), 5); */ } #[test] fn nonzero_leading_zeros() { - assert_eq!(NonZeroU8::new(1).unwrap().leading_zeros(), 7); - assert_eq!(NonZeroI8::new(1).unwrap().leading_zeros(), 7); - assert_eq!(NonZeroU16::new(1).unwrap().leading_zeros(), 15); - assert_eq!(NonZeroI16::new(1).unwrap().leading_zeros(), 15); - assert_eq!(NonZeroU32::new(1).unwrap().leading_zeros(), 31); - assert_eq!(NonZeroI32::new(1).unwrap().leading_zeros(), 31); - assert_eq!(NonZeroU64::new(1).unwrap().leading_zeros(), 63); - assert_eq!(NonZeroI64::new(1).unwrap().leading_zeros(), 63); - assert_eq!(NonZeroU128::new(1).unwrap().leading_zeros(), 127); - assert_eq!(NonZeroI128::new(1).unwrap().leading_zeros(), 127); - assert_eq!(NonZeroUsize::new(1).unwrap().leading_zeros(), usize::BITS - 1); - assert_eq!(NonZeroIsize::new(1).unwrap().leading_zeros(), usize::BITS - 1); - - assert_eq!(NonZeroU8::new(u8::MAX >> 2).unwrap().leading_zeros(), 2); - assert_eq!(NonZeroI8::new((u8::MAX >> 2) as i8).unwrap().leading_zeros(), 2); - assert_eq!(NonZeroU16::new(u16::MAX >> 2).unwrap().leading_zeros(), 2); - assert_eq!(NonZeroI16::new((u16::MAX >> 2) as i16).unwrap().leading_zeros(), 2); - assert_eq!(NonZeroU32::new(u32::MAX >> 2).unwrap().leading_zeros(), 2); - assert_eq!(NonZeroI32::new((u32::MAX >> 2) as i32).unwrap().leading_zeros(), 2); - assert_eq!(NonZeroU64::new(u64::MAX >> 2).unwrap().leading_zeros(), 2); - assert_eq!(NonZeroI64::new((u64::MAX >> 2) as i64).unwrap().leading_zeros(), 2); - assert_eq!(NonZeroU128::new(u128::MAX >> 2).unwrap().leading_zeros(), 2); - assert_eq!(NonZeroI128::new((u128::MAX >> 2) as i128).unwrap().leading_zeros(), 2); - assert_eq!(NonZeroUsize::new(usize::MAX >> 2).unwrap().leading_zeros(), 2); - assert_eq!(NonZeroIsize::new((usize::MAX >> 2) as isize).unwrap().leading_zeros(), 2); - - assert_eq!(NonZeroU8::new(u8::MAX).unwrap().leading_zeros(), 0); - assert_eq!(NonZeroI8::new(-1i8).unwrap().leading_zeros(), 0); - assert_eq!(NonZeroU16::new(u16::MAX).unwrap().leading_zeros(), 0); - assert_eq!(NonZeroI16::new(-1i16).unwrap().leading_zeros(), 0); - assert_eq!(NonZeroU32::new(u32::MAX).unwrap().leading_zeros(), 0); - assert_eq!(NonZeroI32::new(-1i32).unwrap().leading_zeros(), 0); - assert_eq!(NonZeroU64::new(u64::MAX).unwrap().leading_zeros(), 0); - assert_eq!(NonZeroI64::new(-1i64).unwrap().leading_zeros(), 0); - assert_eq!(NonZeroU128::new(u128::MAX).unwrap().leading_zeros(), 0); - assert_eq!(NonZeroI128::new(-1i128).unwrap().leading_zeros(), 0); - assert_eq!(NonZeroUsize::new(usize::MAX).unwrap().leading_zeros(), 0); - assert_eq!(NonZeroIsize::new(-1isize).unwrap().leading_zeros(), 0); - - const LEADING_ZEROS: u32 = NonZeroU16::new(1).unwrap().leading_zeros(); + assert_eq!(NonZero::::new(1).unwrap().leading_zeros(), 7); + assert_eq!(NonZero::::new(1).unwrap().leading_zeros(), 7); + assert_eq!(NonZero::::new(1).unwrap().leading_zeros(), 15); + assert_eq!(NonZero::::new(1).unwrap().leading_zeros(), 15); + assert_eq!(NonZero::::new(1).unwrap().leading_zeros(), 31); + assert_eq!(NonZero::::new(1).unwrap().leading_zeros(), 31); + assert_eq!(NonZero::::new(1).unwrap().leading_zeros(), 63); + assert_eq!(NonZero::::new(1).unwrap().leading_zeros(), 63); + assert_eq!(NonZero::::new(1).unwrap().leading_zeros(), 127); + assert_eq!(NonZero::::new(1).unwrap().leading_zeros(), 127); + assert_eq!(NonZero::::new(1).unwrap().leading_zeros(), usize::BITS - 1); + assert_eq!(NonZero::::new(1).unwrap().leading_zeros(), usize::BITS - 1); + + assert_eq!(NonZero::::new(u8::MAX >> 2).unwrap().leading_zeros(), 2); + assert_eq!(NonZero::::new((u8::MAX >> 2) as i8).unwrap().leading_zeros(), 2); + assert_eq!(NonZero::::new(u16::MAX >> 2).unwrap().leading_zeros(), 2); + assert_eq!(NonZero::::new((u16::MAX >> 2) as i16).unwrap().leading_zeros(), 2); + assert_eq!(NonZero::::new(u32::MAX >> 2).unwrap().leading_zeros(), 2); + assert_eq!(NonZero::::new((u32::MAX >> 2) as i32).unwrap().leading_zeros(), 2); + assert_eq!(NonZero::::new(u64::MAX >> 2).unwrap().leading_zeros(), 2); + assert_eq!(NonZero::::new((u64::MAX >> 2) as i64).unwrap().leading_zeros(), 2); + assert_eq!(NonZero::::new(u128::MAX >> 2).unwrap().leading_zeros(), 2); + assert_eq!(NonZero::::new((u128::MAX >> 2) as i128).unwrap().leading_zeros(), 2); + assert_eq!(NonZero::::new(usize::MAX >> 2).unwrap().leading_zeros(), 2); + assert_eq!(NonZero::::new((usize::MAX >> 2) as isize).unwrap().leading_zeros(), 2); + + assert_eq!(NonZero::::new(u8::MAX).unwrap().leading_zeros(), 0); + assert_eq!(NonZero::::new(-1i8).unwrap().leading_zeros(), 0); + assert_eq!(NonZero::::new(u16::MAX).unwrap().leading_zeros(), 0); + assert_eq!(NonZero::::new(-1i16).unwrap().leading_zeros(), 0); + assert_eq!(NonZero::::new(u32::MAX).unwrap().leading_zeros(), 0); + assert_eq!(NonZero::::new(-1i32).unwrap().leading_zeros(), 0); + assert_eq!(NonZero::::new(u64::MAX).unwrap().leading_zeros(), 0); + assert_eq!(NonZero::::new(-1i64).unwrap().leading_zeros(), 0); + assert_eq!(NonZero::::new(u128::MAX).unwrap().leading_zeros(), 0); + assert_eq!(NonZero::::new(-1i128).unwrap().leading_zeros(), 0); + assert_eq!(NonZero::::new(usize::MAX).unwrap().leading_zeros(), 0); + assert_eq!(NonZero::::new(-1isize).unwrap().leading_zeros(), 0); + + const LEADING_ZEROS: u32 = NonZero::::new(1).unwrap().leading_zeros(); assert_eq!(LEADING_ZEROS, 15); } #[test] fn nonzero_trailing_zeros() { - assert_eq!(NonZeroU8::new(1).unwrap().trailing_zeros(), 0); - assert_eq!(NonZeroI8::new(1).unwrap().trailing_zeros(), 0); - assert_eq!(NonZeroU16::new(1).unwrap().trailing_zeros(), 0); - assert_eq!(NonZeroI16::new(1).unwrap().trailing_zeros(), 0); - assert_eq!(NonZeroU32::new(1).unwrap().trailing_zeros(), 0); - assert_eq!(NonZeroI32::new(1).unwrap().trailing_zeros(), 0); - assert_eq!(NonZeroU64::new(1).unwrap().trailing_zeros(), 0); - assert_eq!(NonZeroI64::new(1).unwrap().trailing_zeros(), 0); - assert_eq!(NonZeroU128::new(1).unwrap().trailing_zeros(), 0); - assert_eq!(NonZeroI128::new(1).unwrap().trailing_zeros(), 0); - assert_eq!(NonZeroUsize::new(1).unwrap().trailing_zeros(), 0); - assert_eq!(NonZeroIsize::new(1).unwrap().trailing_zeros(), 0); - - assert_eq!(NonZeroU8::new(1 << 2).unwrap().trailing_zeros(), 2); - assert_eq!(NonZeroI8::new(1 << 2).unwrap().trailing_zeros(), 2); - assert_eq!(NonZeroU16::new(1 << 2).unwrap().trailing_zeros(), 2); - assert_eq!(NonZeroI16::new(1 << 2).unwrap().trailing_zeros(), 2); - assert_eq!(NonZeroU32::new(1 << 2).unwrap().trailing_zeros(), 2); - assert_eq!(NonZeroI32::new(1 << 2).unwrap().trailing_zeros(), 2); - assert_eq!(NonZeroU64::new(1 << 2).unwrap().trailing_zeros(), 2); - assert_eq!(NonZeroI64::new(1 << 2).unwrap().trailing_zeros(), 2); - assert_eq!(NonZeroU128::new(1 << 2).unwrap().trailing_zeros(), 2); - assert_eq!(NonZeroI128::new(1 << 2).unwrap().trailing_zeros(), 2); - assert_eq!(NonZeroUsize::new(1 << 2).unwrap().trailing_zeros(), 2); - assert_eq!(NonZeroIsize::new(1 << 2).unwrap().trailing_zeros(), 2); - - assert_eq!(NonZeroU8::new(1 << 7).unwrap().trailing_zeros(), 7); - assert_eq!(NonZeroI8::new(1 << 7).unwrap().trailing_zeros(), 7); - assert_eq!(NonZeroU16::new(1 << 15).unwrap().trailing_zeros(), 15); - assert_eq!(NonZeroI16::new(1 << 15).unwrap().trailing_zeros(), 15); - assert_eq!(NonZeroU32::new(1 << 31).unwrap().trailing_zeros(), 31); - assert_eq!(NonZeroI32::new(1 << 31).unwrap().trailing_zeros(), 31); - assert_eq!(NonZeroU64::new(1 << 63).unwrap().trailing_zeros(), 63); - assert_eq!(NonZeroI64::new(1 << 63).unwrap().trailing_zeros(), 63); - assert_eq!(NonZeroU128::new(1 << 127).unwrap().trailing_zeros(), 127); - assert_eq!(NonZeroI128::new(1 << 127).unwrap().trailing_zeros(), 127); + assert_eq!(NonZero::::new(1).unwrap().trailing_zeros(), 0); + assert_eq!(NonZero::::new(1).unwrap().trailing_zeros(), 0); + assert_eq!(NonZero::::new(1).unwrap().trailing_zeros(), 0); + assert_eq!(NonZero::::new(1).unwrap().trailing_zeros(), 0); + assert_eq!(NonZero::::new(1).unwrap().trailing_zeros(), 0); + assert_eq!(NonZero::::new(1).unwrap().trailing_zeros(), 0); + assert_eq!(NonZero::::new(1).unwrap().trailing_zeros(), 0); + assert_eq!(NonZero::::new(1).unwrap().trailing_zeros(), 0); + assert_eq!(NonZero::::new(1).unwrap().trailing_zeros(), 0); + assert_eq!(NonZero::::new(1).unwrap().trailing_zeros(), 0); + assert_eq!(NonZero::::new(1).unwrap().trailing_zeros(), 0); + assert_eq!(NonZero::::new(1).unwrap().trailing_zeros(), 0); + + assert_eq!(NonZero::::new(1 << 2).unwrap().trailing_zeros(), 2); + assert_eq!(NonZero::::new(1 << 2).unwrap().trailing_zeros(), 2); + assert_eq!(NonZero::::new(1 << 2).unwrap().trailing_zeros(), 2); + assert_eq!(NonZero::::new(1 << 2).unwrap().trailing_zeros(), 2); + assert_eq!(NonZero::::new(1 << 2).unwrap().trailing_zeros(), 2); + assert_eq!(NonZero::::new(1 << 2).unwrap().trailing_zeros(), 2); + assert_eq!(NonZero::::new(1 << 2).unwrap().trailing_zeros(), 2); + assert_eq!(NonZero::::new(1 << 2).unwrap().trailing_zeros(), 2); + assert_eq!(NonZero::::new(1 << 2).unwrap().trailing_zeros(), 2); + assert_eq!(NonZero::::new(1 << 2).unwrap().trailing_zeros(), 2); + assert_eq!(NonZero::::new(1 << 2).unwrap().trailing_zeros(), 2); + assert_eq!(NonZero::::new(1 << 2).unwrap().trailing_zeros(), 2); + + assert_eq!(NonZero::::new(1 << 7).unwrap().trailing_zeros(), 7); + assert_eq!(NonZero::::new(1 << 7).unwrap().trailing_zeros(), 7); + assert_eq!(NonZero::::new(1 << 15).unwrap().trailing_zeros(), 15); + assert_eq!(NonZero::::new(1 << 15).unwrap().trailing_zeros(), 15); + assert_eq!(NonZero::::new(1 << 31).unwrap().trailing_zeros(), 31); + assert_eq!(NonZero::::new(1 << 31).unwrap().trailing_zeros(), 31); + assert_eq!(NonZero::::new(1 << 63).unwrap().trailing_zeros(), 63); + assert_eq!(NonZero::::new(1 << 63).unwrap().trailing_zeros(), 63); + assert_eq!(NonZero::::new(1 << 127).unwrap().trailing_zeros(), 127); + assert_eq!(NonZero::::new(1 << 127).unwrap().trailing_zeros(), 127); assert_eq!( - NonZeroUsize::new(1 << (usize::BITS - 1)).unwrap().trailing_zeros(), + NonZero::::new(1 << (usize::BITS - 1)).unwrap().trailing_zeros(), usize::BITS - 1 ); assert_eq!( - NonZeroIsize::new(1 << (usize::BITS - 1)).unwrap().trailing_zeros(), + NonZero::::new(1 << (usize::BITS - 1)).unwrap().trailing_zeros(), usize::BITS - 1 ); - const TRAILING_ZEROS: u32 = NonZeroU16::new(1 << 2).unwrap().trailing_zeros(); + const TRAILING_ZEROS: u32 = NonZero::::new(1 << 2).unwrap().trailing_zeros(); assert_eq!(TRAILING_ZEROS, 2); } #[test] fn test_nonzero_uint_div() { - let nz = NonZeroU32::new(1).unwrap(); + let nz = NonZero::::new(1).unwrap(); let x: u32 = 42u32 / nz; assert_eq!(x, 42u32); @@ -330,7 +331,7 @@ fn test_nonzero_uint_div() { #[test] fn test_nonzero_uint_rem() { - let nz = NonZeroU32::new(10).unwrap(); + let nz = NonZero::::new(10).unwrap(); let x: u32 = 42u32 % nz; assert_eq!(x, 2u32); @@ -338,18 +339,18 @@ fn test_nonzero_uint_rem() { #[test] fn test_signed_nonzero_neg() { - assert_eq!((-NonZeroI8::new(1).unwrap()).get(), -1); - assert_eq!((-NonZeroI8::new(-1).unwrap()).get(), 1); + assert_eq!((-NonZero::::new(1).unwrap()).get(), -1); + assert_eq!((-NonZero::::new(-1).unwrap()).get(), 1); - assert_eq!((-NonZeroI16::new(1).unwrap()).get(), -1); - assert_eq!((-NonZeroI16::new(-1).unwrap()).get(), 1); + assert_eq!((-NonZero::::new(1).unwrap()).get(), -1); + assert_eq!((-NonZero::::new(-1).unwrap()).get(), 1); - assert_eq!((-NonZeroI32::new(1).unwrap()).get(), -1); - assert_eq!((-NonZeroI32::new(-1).unwrap()).get(), 1); + assert_eq!((-NonZero::::new(1).unwrap()).get(), -1); + assert_eq!((-NonZero::::new(-1).unwrap()).get(), 1); - assert_eq!((-NonZeroI64::new(1).unwrap()).get(), -1); - assert_eq!((-NonZeroI64::new(-1).unwrap()).get(), 1); + assert_eq!((-NonZero::::new(1).unwrap()).get(), -1); + assert_eq!((-NonZero::::new(-1).unwrap()).get(), 1); - assert_eq!((-NonZeroI128::new(1).unwrap()).get(), -1); - assert_eq!((-NonZeroI128::new(-1).unwrap()).get(), 1); + assert_eq!((-NonZero::::new(1).unwrap()).get(), -1); + assert_eq!((-NonZero::::new(-1).unwrap()).get(), 1); } diff --git a/library/core/tests/ptr.rs b/library/core/tests/ptr.rs index b68f2a50b32..8a0cf90d799 100644 --- a/library/core/tests/ptr.rs +++ b/library/core/tests/ptr.rs @@ -1,6 +1,6 @@ use core::cell::RefCell; use core::mem::{self, MaybeUninit}; -use core::num::NonZeroUsize; +use core::num::NonZero; use core::ptr; use core::ptr::*; use std::fmt::{Debug, Display}; @@ -1051,7 +1051,7 @@ fn nonnull_tagged_pointer_with_provenance() { pub fn pointer(self) -> NonNull { // SAFETY: The `addr` guaranteed to have bits set in the Self::ADDRESS_MASK, so the result will be non-null. self.0.map_addr(|addr| unsafe { - NonZeroUsize::new_unchecked(addr.get() & Self::ADDRESS_MASK) + NonZero::::new_unchecked(addr.get() & Self::ADDRESS_MASK) }) } @@ -1073,7 +1073,7 @@ fn nonnull_tagged_pointer_with_provenance() { // ADDRESS_MASK) will always be non-zero. This a property of the type and its // construction. self.0 = self.0.map_addr(|addr| unsafe { - NonZeroUsize::new_unchecked((addr.get() & Self::ADDRESS_MASK) | data) + NonZero::::new_unchecked((addr.get() & Self::ADDRESS_MASK) | data) }) } } diff --git a/library/core/tests/result.rs b/library/core/tests/result.rs index 50926da3ce7..758203408a8 100644 --- a/library/core/tests/result.rs +++ b/library/core/tests/result.rs @@ -406,13 +406,14 @@ fn result_opt_conversions() { #[test] fn result_try_trait_v2_branch() { - use core::num::NonZeroU32; + use core::num::NonZero; use core::ops::{ControlFlow::*, Try}; + assert_eq!(Ok::(4).branch(), Continue(4)); assert_eq!(Err::(4).branch(), Break(Err(4))); - let one = NonZeroU32::new(1).unwrap(); - assert_eq!(Ok::<(), NonZeroU32>(()).branch(), Continue(())); - assert_eq!(Err::<(), NonZeroU32>(one).branch(), Break(Err(one))); - assert_eq!(Ok::(one).branch(), Continue(one)); - assert_eq!(Err::(()).branch(), Break(Err(()))); + let one = NonZero::::new(1).unwrap(); + assert_eq!(Ok::<(), NonZero>(()).branch(), Continue(())); + assert_eq!(Err::<(), NonZero>(one).branch(), Break(Err(one))); + assert_eq!(Ok::, ()>(one).branch(), Continue(one)); + assert_eq!(Err::, ()>(()).branch(), Break(Err(()))); } diff --git a/library/core/tests/slice.rs b/library/core/tests/slice.rs index bcf7b5e5977..bb2c17a479e 100644 --- a/library/core/tests/slice.rs +++ b/library/core/tests/slice.rs @@ -1,7 +1,7 @@ use core::cell::Cell; use core::cmp::Ordering; use core::mem::MaybeUninit; -use core::num::NonZeroUsize; +use core::num::NonZero; use core::slice; #[test] @@ -147,7 +147,7 @@ fn test_iterator_advance_by() { } let mut iter = v.iter(); - assert_eq!(iter.advance_by(v.len() + 1), Err(NonZeroUsize::new(1).unwrap())); + assert_eq!(iter.advance_by(v.len() + 1), Err(NonZero::::new(1).unwrap())); assert_eq!(iter.as_slice(), &[]); let mut iter = v.iter(); @@ -169,7 +169,7 @@ fn test_iterator_advance_back_by() { } let mut iter = v.iter(); - assert_eq!(iter.advance_back_by(v.len() + 1), Err(NonZeroUsize::new(1).unwrap())); + assert_eq!(iter.advance_back_by(v.len() + 1), Err(NonZero::::new(1).unwrap())); assert_eq!(iter.as_slice(), &[]); let mut iter = v.iter(); diff --git a/library/proc_macro/src/bridge/handle.rs b/library/proc_macro/src/bridge/handle.rs index b3a76306997..894acae217e 100644 --- a/library/proc_macro/src/bridge/handle.rs +++ b/library/proc_macro/src/bridge/handle.rs @@ -2,13 +2,13 @@ use std::collections::BTreeMap; use std::hash::Hash; -use std::num::NonZeroU32; +use std::num::NonZero; use std::ops::{Index, IndexMut}; use std::sync::atomic::{AtomicU32, Ordering}; use super::fxhash::FxHashMap; -pub(super) type Handle = NonZeroU32; +pub(super) type Handle = NonZero; /// A store that associates values of type `T` with numeric handles. A value can /// be looked up using its handle. @@ -20,7 +20,7 @@ pub(super) struct OwnedStore { impl OwnedStore { pub(super) fn new(counter: &'static AtomicU32) -> Self { // Ensure the handle counter isn't 0, which would panic later, - // when `NonZeroU32::new` (aka `Handle::new`) is called in `alloc`. + // when `NonZero::new` (aka `Handle::new`) is called in `alloc`. assert_ne!(counter.load(Ordering::SeqCst), 0); OwnedStore { counter, data: BTreeMap::new() } diff --git a/library/proc_macro/src/bridge/rpc.rs b/library/proc_macro/src/bridge/rpc.rs index 5b1bfb30983..6d75a5a627c 100644 --- a/library/proc_macro/src/bridge/rpc.rs +++ b/library/proc_macro/src/bridge/rpc.rs @@ -2,7 +2,7 @@ use std::any::Any; use std::io::Write; -use std::num::NonZeroU32; +use std::num::NonZero; use std::str; pub(super) type Writer = super::buffer::Buffer; @@ -157,13 +157,13 @@ impl DecodeMut<'_, '_, S> for char { } } -impl Encode for NonZeroU32 { +impl Encode for NonZero { fn encode(self, w: &mut Writer, s: &mut S) { self.get().encode(w, s); } } -impl DecodeMut<'_, '_, S> for NonZeroU32 { +impl DecodeMut<'_, '_, S> for NonZero { fn decode(r: &mut Reader<'_>, s: &mut S) -> Self { Self::new(u32::decode(r, s)).unwrap() } diff --git a/library/proc_macro/src/bridge/symbol.rs b/library/proc_macro/src/bridge/symbol.rs index 930c111455d..ae3c0fe018f 100644 --- a/library/proc_macro/src/bridge/symbol.rs +++ b/library/proc_macro/src/bridge/symbol.rs @@ -10,14 +10,14 @@ //! proc_macro, this module should probably be removed or simplified. use std::cell::RefCell; -use std::num::NonZeroU32; +use std::num::NonZero; use std::str; use super::*; /// Handle for a symbol string stored within the Interner. #[derive(Copy, Clone, PartialEq, Eq, Hash)] -pub struct Symbol(NonZeroU32); +pub struct Symbol(NonZero); impl !Send for Symbol {} impl !Sync for Symbol {} @@ -137,7 +137,7 @@ thread_local! { names: fxhash::FxHashMap::default(), strings: Vec::new(), // Start with a base of 1 to make sure that `NonZeroU32` works. - sym_base: NonZeroU32::new(1).unwrap(), + sym_base: NonZero::::new(1).unwrap(), }); } @@ -152,7 +152,7 @@ struct Interner { // The offset to apply to symbol names stored in the interner. This is used // to ensure that symbol names are not re-used after the interner is // cleared. - sym_base: NonZeroU32, + sym_base: NonZero, } impl Interner { diff --git a/library/proc_macro/src/lib.rs b/library/proc_macro/src/lib.rs index 90b76cbc26e..1e6e4a04310 100644 --- a/library/proc_macro/src/lib.rs +++ b/library/proc_macro/src/lib.rs @@ -26,6 +26,7 @@ #![feature(staged_api)] #![feature(allow_internal_unstable)] #![feature(decl_macro)] +#![feature(generic_nonzero)] #![feature(maybe_uninit_write_slice)] #![feature(negative_impls)] #![feature(new_uninit)] diff --git a/library/std/src/sys/pal/hermit/thread.rs b/library/std/src/sys/pal/hermit/thread.rs index 3384906a15e..789de7f41ff 100644 --- a/library/std/src/sys/pal/hermit/thread.rs +++ b/library/std/src/sys/pal/hermit/thread.rs @@ -5,7 +5,7 @@ use super::thread_local_dtor::run_dtors; use crate::ffi::CStr; use crate::io; use crate::mem; -use crate::num::NonZeroUsize; +use crate::num::NonZero; use crate::ptr; use crate::time::Duration; @@ -97,8 +97,8 @@ impl Thread { } } -pub fn available_parallelism() -> io::Result { - unsafe { Ok(NonZeroUsize::new_unchecked(abi::get_processor_count())) } +pub fn available_parallelism() -> io::Result> { + unsafe { Ok(NonZero::::new_unchecked(abi::get_processor_count())) } } pub mod guard { diff --git a/library/std/src/sys/pal/itron/thread.rs b/library/std/src/sys/pal/itron/thread.rs index ae0f718535b..9c1387bf408 100644 --- a/library/std/src/sys/pal/itron/thread.rs +++ b/library/std/src/sys/pal/itron/thread.rs @@ -11,6 +11,7 @@ use crate::{ ffi::CStr, hint, io, mem::ManuallyDrop, + num::NonZero, ptr::NonNull, sync::atomic::{AtomicUsize, Ordering}, sys::thread_local_dtor::run_dtors, @@ -363,6 +364,6 @@ unsafe fn terminate_and_delete_current_task() -> ! { unsafe { crate::hint::unreachable_unchecked() }; } -pub fn available_parallelism() -> io::Result { +pub fn available_parallelism() -> io::Result> { super::unsupported() } diff --git a/library/std/src/sys/pal/sgx/abi/tls/mod.rs b/library/std/src/sys/pal/sgx/abi/tls/mod.rs index 09c4ab3d3e9..5ee1621420e 100644 --- a/library/std/src/sys/pal/sgx/abi/tls/mod.rs +++ b/library/std/src/sys/pal/sgx/abi/tls/mod.rs @@ -3,7 +3,7 @@ mod sync_bitset; use self::sync_bitset::*; use crate::cell::Cell; use crate::mem; -use crate::num::NonZeroUsize; +use crate::num::NonZero; use crate::ptr; use crate::sync::atomic::{AtomicUsize, Ordering}; @@ -30,7 +30,7 @@ extern "C" { #[derive(Copy, Clone)] #[repr(C)] -pub struct Key(NonZeroUsize); +pub struct Key(NonZero); impl Key { fn to_index(self) -> usize { @@ -38,7 +38,7 @@ impl Key { } fn from_index(index: usize) -> Self { - Key(NonZeroUsize::new(index + 1).unwrap()) + Key(NonZero::::new(index + 1).unwrap()) } pub fn as_usize(self) -> usize { @@ -46,7 +46,7 @@ impl Key { } pub fn from_usize(index: usize) -> Self { - Key(NonZeroUsize::new(index).unwrap()) + Key(NonZero::::new(index).unwrap()) } } diff --git a/library/std/src/sys/pal/sgx/abi/usercalls/raw.rs b/library/std/src/sys/pal/sgx/abi/usercalls/raw.rs index 10c1456d4fd..4f52bb474b1 100644 --- a/library/std/src/sys/pal/sgx/abi/usercalls/raw.rs +++ b/library/std/src/sys/pal/sgx/abi/usercalls/raw.rs @@ -3,14 +3,15 @@ #[unstable(feature = "sgx_platform", issue = "56975")] pub use fortanix_sgx_abi::*; -use crate::num::NonZeroU64; +use crate::num::NonZero; use crate::ptr::NonNull; #[repr(C)] struct UsercallReturn(u64, u64); extern "C" { - fn usercall(nr: NonZeroU64, p1: u64, p2: u64, abort: u64, p3: u64, p4: u64) -> UsercallReturn; + fn usercall(nr: NonZero, p1: u64, p2: u64, abort: u64, p3: u64, p4: u64) + -> UsercallReturn; } /// Performs the raw usercall operation as defined in the ABI calling convention. @@ -26,7 +27,7 @@ extern "C" { #[unstable(feature = "sgx_platform", issue = "56975")] #[inline] pub unsafe fn do_usercall( - nr: NonZeroU64, + nr: NonZero, p1: u64, p2: u64, p3: u64, @@ -194,7 +195,7 @@ macro_rules! enclave_usercalls_internal_define_usercalls { #[inline(always)] pub unsafe fn $f($n1: $t1, $n2: $t2, $n3: $t3, $n4: $t4) -> $r { ReturnValue::from_registers(stringify!($f), unsafe { do_usercall( - rtunwrap!(Some, NonZeroU64::new(Usercalls::$f as Register)), + rtunwrap!(Some, NonZero::::new(Usercalls::$f as Register)), RegisterArgument::into_register($n1), RegisterArgument::into_register($n2), RegisterArgument::into_register($n3), @@ -210,7 +211,7 @@ macro_rules! enclave_usercalls_internal_define_usercalls { #[inline(always)] pub unsafe fn $f($n1: $t1, $n2: $t2, $n3: $t3) -> $r { ReturnValue::from_registers(stringify!($f), unsafe { do_usercall( - rtunwrap!(Some, NonZeroU64::new(Usercalls::$f as Register)), + rtunwrap!(Some, NonZero::::new(Usercalls::$f as Register)), RegisterArgument::into_register($n1), RegisterArgument::into_register($n2), RegisterArgument::into_register($n3), @@ -226,7 +227,7 @@ macro_rules! enclave_usercalls_internal_define_usercalls { #[inline(always)] pub unsafe fn $f($n1: $t1, $n2: $t2) -> $r { ReturnValue::from_registers(stringify!($f), unsafe { do_usercall( - rtunwrap!(Some, NonZeroU64::new(Usercalls::$f as Register)), + rtunwrap!(Some, NonZero::::new(Usercalls::$f as Register)), RegisterArgument::into_register($n1), RegisterArgument::into_register($n2), 0,0, @@ -241,7 +242,7 @@ macro_rules! enclave_usercalls_internal_define_usercalls { #[inline(always)] pub unsafe fn $f($n1: $t1) -> $r { ReturnValue::from_registers(stringify!($f), unsafe { do_usercall( - rtunwrap!(Some, NonZeroU64::new(Usercalls::$f as Register)), + rtunwrap!(Some, NonZero::::new(Usercalls::$f as Register)), RegisterArgument::into_register($n1), 0,0,0, return_type_is_abort!($r) @@ -255,7 +256,7 @@ macro_rules! enclave_usercalls_internal_define_usercalls { #[inline(always)] pub unsafe fn $f() -> $r { ReturnValue::from_registers(stringify!($f), unsafe { do_usercall( - rtunwrap!(Some, NonZeroU64::new(Usercalls::$f as Register)), + rtunwrap!(Some, NonZero::::new(Usercalls::$f as Register)), 0,0,0,0, return_type_is_abort!($r) ) }) diff --git a/library/std/src/sys/pal/sgx/rwlock.rs b/library/std/src/sys/pal/sgx/rwlock.rs index d89de18ca5f..87bebac37da 100644 --- a/library/std/src/sys/pal/sgx/rwlock.rs +++ b/library/std/src/sys/pal/sgx/rwlock.rs @@ -1,7 +1,7 @@ #[cfg(test)] mod tests; -use crate::num::NonZeroUsize; +use crate::num::NonZero; use crate::sys_common::lazy_box::{LazyBox, LazyInit}; use super::waitqueue::{ @@ -10,7 +10,7 @@ use super::waitqueue::{ use crate::alloc::Layout; struct AllocatedRwLock { - readers: SpinMutex>>, + readers: SpinMutex>>>, writer: SpinMutex>, } @@ -54,7 +54,7 @@ impl RwLock { } else { // No waiting writers, acquire the read lock *rguard.lock_var_mut() = - NonZeroUsize::new(rguard.lock_var().map_or(0, |n| n.get()) + 1); + NonZero::::new(rguard.lock_var().map_or(0, |n| n.get()) + 1); } } @@ -69,7 +69,7 @@ impl RwLock { } else { // No waiting writers, acquire the read lock *rguard.lock_var_mut() = - NonZeroUsize::new(rguard.lock_var().map_or(0, |n| n.get()) + 1); + NonZero::::new(rguard.lock_var().map_or(0, |n| n.get()) + 1); true } } @@ -108,10 +108,10 @@ impl RwLock { #[inline] unsafe fn __read_unlock( &self, - mut rguard: SpinMutexGuard<'_, WaitVariable>>, + mut rguard: SpinMutexGuard<'_, WaitVariable>>>, wguard: SpinMutexGuard<'_, WaitVariable>, ) { - *rguard.lock_var_mut() = NonZeroUsize::new(rguard.lock_var().unwrap().get() - 1); + *rguard.lock_var_mut() = NonZero::::new(rguard.lock_var().unwrap().get() - 1); if rguard.lock_var().is_some() { // There are other active readers } else { @@ -137,7 +137,7 @@ impl RwLock { #[inline] unsafe fn __write_unlock( &self, - rguard: SpinMutexGuard<'_, WaitVariable>>, + rguard: SpinMutexGuard<'_, WaitVariable>>>, wguard: SpinMutexGuard<'_, WaitVariable>, ) { match WaitQueue::notify_one(wguard) { diff --git a/library/std/src/sys/pal/sgx/thread.rs b/library/std/src/sys/pal/sgx/thread.rs index 7ac9d1d64b4..c797fde7fbd 100644 --- a/library/std/src/sys/pal/sgx/thread.rs +++ b/library/std/src/sys/pal/sgx/thread.rs @@ -2,7 +2,7 @@ use super::unsupported; use crate::ffi::CStr; use crate::io; -use crate::num::NonZeroUsize; +use crate::num::NonZero; use crate::time::Duration; use super::abi::usercalls; @@ -142,7 +142,7 @@ impl Thread { } } -pub fn available_parallelism() -> io::Result { +pub fn available_parallelism() -> io::Result> { unsupported() } diff --git a/library/std/src/sys/pal/sgx/waitqueue/mod.rs b/library/std/src/sys/pal/sgx/waitqueue/mod.rs index 25eca61d67b..92ffec8d0b7 100644 --- a/library/std/src/sys/pal/sgx/waitqueue/mod.rs +++ b/library/std/src/sys/pal/sgx/waitqueue/mod.rs @@ -16,7 +16,7 @@ mod tests; mod spin_mutex; mod unsafe_list; -use crate::num::NonZeroUsize; +use crate::num::NonZero; use crate::ops::{Deref, DerefMut}; use crate::panic::{self, AssertUnwindSafe}; use crate::time::Duration; @@ -68,7 +68,7 @@ impl WaitVariable { #[derive(Copy, Clone)] pub enum NotifiedTcs { Single(Tcs), - All { count: NonZeroUsize }, + All { count: NonZero }, } /// An RAII guard that will notify a set of target threads as well as unlock @@ -252,7 +252,7 @@ impl WaitQueue { entry_guard.wake = true; } - if let Some(count) = NonZeroUsize::new(count) { + if let Some(count) = NonZero::::new(count) { Ok(WaitGuard { mutex_guard: Some(guard), notified_tcs: NotifiedTcs::All { count } }) } else { Err(guard) diff --git a/library/std/src/sys/pal/teeos/thread.rs b/library/std/src/sys/pal/teeos/thread.rs index 155f333f906..77f9040ead5 100644 --- a/library/std/src/sys/pal/teeos/thread.rs +++ b/library/std/src/sys/pal/teeos/thread.rs @@ -4,7 +4,7 @@ use crate::cmp; use crate::ffi::CStr; use crate::io; use crate::mem; -use crate::num::NonZeroUsize; +use crate::num::NonZero; use crate::ptr; use crate::sys::os; use crate::time::Duration; @@ -140,7 +140,7 @@ impl Drop for Thread { // Note: Both `sched_getaffinity` and `sysconf` are available but not functional on // teeos, so this function always returns an Error! -pub fn available_parallelism() -> io::Result { +pub fn available_parallelism() -> io::Result> { Err(io::Error::new( io::ErrorKind::NotFound, "The number of hardware threads is not known for the target platform", diff --git a/library/std/src/sys/pal/uefi/thread.rs b/library/std/src/sys/pal/uefi/thread.rs index ddfc3af2f50..f6f5b20a421 100644 --- a/library/std/src/sys/pal/uefi/thread.rs +++ b/library/std/src/sys/pal/uefi/thread.rs @@ -1,7 +1,7 @@ use super::unsupported; use crate::ffi::CStr; use crate::io; -use crate::num::NonZeroUsize; +use crate::num::NonZero; use crate::ptr::NonNull; use crate::time::Duration; @@ -44,9 +44,9 @@ impl Thread { } } -pub fn available_parallelism() -> io::Result { +pub fn available_parallelism() -> io::Result> { // UEFI is single threaded - Ok(NonZeroUsize::new(1).unwrap()) + Ok(NonZero::::new(1).unwrap()) } pub mod guard { diff --git a/library/std/src/sys/pal/unix/process/process_common/tests.rs b/library/std/src/sys/pal/unix/process/process_common/tests.rs index 4e41efc9096..823b4a56336 100644 --- a/library/std/src/sys/pal/unix/process/process_common/tests.rs +++ b/library/std/src/sys/pal/unix/process/process_common/tests.rs @@ -170,7 +170,7 @@ fn test_program_kind() { )))] #[test] fn unix_exit_statuses() { - use crate::num::NonZeroI32; + use crate::num::NonZero; use crate::os::unix::process::ExitStatusExt; use crate::process::*; @@ -182,7 +182,7 @@ fn unix_exit_statuses() { assert_eq!(exit_status.code(), Some(exit_code)); - if let Ok(nz) = NonZeroI32::try_from(exit_code) { + if let Ok(nz) = NonZero::try_from(exit_code) { assert!(!exit_status.success()); let es_error = exit_status.exit_ok().unwrap_err(); assert_eq!(es_error.code().unwrap(), i32::from(nz)); diff --git a/library/std/src/sys/pal/unix/process/process_fuchsia.rs b/library/std/src/sys/pal/unix/process/process_fuchsia.rs index 9931c2af2f1..b6a74fb4831 100644 --- a/library/std/src/sys/pal/unix/process/process_fuchsia.rs +++ b/library/std/src/sys/pal/unix/process/process_fuchsia.rs @@ -1,7 +1,7 @@ use crate::fmt; use crate::io; use crate::mem; -use crate::num::{NonZeroI32, NonZeroI64}; +use crate::num::NonZero; use crate::ptr; use crate::sys::process::process_common::*; @@ -240,7 +240,7 @@ pub struct ExitStatus(i64); impl ExitStatus { pub fn exit_ok(&self) -> Result<(), ExitStatusError> { - match NonZeroI64::try_from(self.0) { + match NonZero::try_from(self.0) { /* was nonzero */ Ok(failure) => Err(ExitStatusError(failure)), /* was zero, couldn't convert */ Err(_) => Ok(()), } @@ -314,7 +314,7 @@ impl fmt::Display for ExitStatus { } #[derive(PartialEq, Eq, Clone, Copy, Debug)] -pub struct ExitStatusError(NonZeroI64); +pub struct ExitStatusError(NonZero); impl Into for ExitStatusError { fn into(self) -> ExitStatus { @@ -323,7 +323,7 @@ impl Into for ExitStatusError { } impl ExitStatusError { - pub fn code(self) -> Option { + pub fn code(self) -> Option> { // fixme: affected by the same bug as ExitStatus::code() ExitStatus(self.0.into()).code().map(|st| st.try_into().unwrap()) } diff --git a/library/std/src/sys/pal/unix/process/process_unix.rs b/library/std/src/sys/pal/unix/process/process_unix.rs index 94c4c56bd51..d5a77085725 100644 --- a/library/std/src/sys/pal/unix/process/process_unix.rs +++ b/library/std/src/sys/pal/unix/process/process_unix.rs @@ -1,7 +1,7 @@ use crate::fmt; use crate::io::{self, Error, ErrorKind}; use crate::mem; -use crate::num::{NonZero, NonZeroI32}; +use crate::num::NonZero; use crate::sys; use crate::sys::cvt; use crate::sys::process::process_common::*; @@ -1106,7 +1106,7 @@ impl fmt::Debug for ExitStatusError { } impl ExitStatusError { - pub fn code(self) -> Option { + pub fn code(self) -> Option> { ExitStatus(self.0.into()).code().map(|st| st.try_into().unwrap()) } } diff --git a/library/std/src/sys/pal/unix/process/process_unsupported.rs b/library/std/src/sys/pal/unix/process/process_unsupported.rs index 89a2a0c6e56..33d359d3f84 100644 --- a/library/std/src/sys/pal/unix/process/process_unsupported.rs +++ b/library/std/src/sys/pal/unix/process/process_unsupported.rs @@ -1,6 +1,6 @@ use crate::fmt; use crate::io; -use crate::num::{NonZero, NonZeroI32}; +use crate::num::NonZero; use crate::sys::pal::unix::unsupported::*; use crate::sys::process::process_common::*; @@ -67,7 +67,7 @@ impl Into for ExitStatusError { } impl ExitStatusError { - pub fn code(self) -> Option { + pub fn code(self) -> Option> { ExitStatus::from(c_int::from(self.0)).code().map(|st| st.try_into().unwrap()) } } diff --git a/library/std/src/sys/pal/unix/process/process_vxworks.rs b/library/std/src/sys/pal/unix/process/process_vxworks.rs index 5b4e94d0f1b..76179e0910d 100644 --- a/library/std/src/sys/pal/unix/process/process_vxworks.rs +++ b/library/std/src/sys/pal/unix/process/process_vxworks.rs @@ -1,6 +1,6 @@ use crate::fmt; use crate::io::{self, Error, ErrorKind}; -use crate::num::{NonZero, NonZeroI32}; +use crate::num::NonZero; use crate::sys; use crate::sys::cvt; use crate::sys::process::process_common::*; @@ -257,7 +257,7 @@ impl Into for ExitStatusError { } impl ExitStatusError { - pub fn code(self) -> Option { + pub fn code(self) -> Option> { ExitStatus(self.0.into()).code().map(|st| st.try_into().unwrap()) } } diff --git a/library/std/src/sys/pal/unix/thread.rs b/library/std/src/sys/pal/unix/thread.rs index 7e4a01a5ecd..dd3c370667a 100644 --- a/library/std/src/sys/pal/unix/thread.rs +++ b/library/std/src/sys/pal/unix/thread.rs @@ -2,7 +2,7 @@ use crate::cmp; use crate::ffi::CStr; use crate::io; use crate::mem; -use crate::num::NonZeroUsize; +use crate::num::NonZero; use crate::ptr; use crate::sys::{os, stack_overflow}; use crate::time::Duration; @@ -306,7 +306,7 @@ fn truncate_cstr(cstr: &CStr) -> [libc::c_char; MAX_W result } -pub fn available_parallelism() -> io::Result { +pub fn available_parallelism() -> io::Result> { cfg_if::cfg_if! { if #[cfg(any( target_os = "android", @@ -338,7 +338,7 @@ pub fn available_parallelism() -> io::Result { // some old MIPS kernels were buggy and zero-initialized the mask if // none was explicitly set. // In that case we use the sysconf fallback. - if let Some(count) = NonZeroUsize::new(count) { + if let Some(count) = NonZero::::new(count) { return Ok(count) } } @@ -351,7 +351,7 @@ pub fn available_parallelism() -> io::Result { let count = cpus as usize; // Cover the unusual situation where we were able to get the quota but not the affinity mask let count = count.min(quota); - Ok(unsafe { NonZeroUsize::new_unchecked(count) }) + Ok(unsafe { NonZero::::new_unchecked(count) }) } } } else if #[cfg(any( @@ -375,7 +375,7 @@ pub fn available_parallelism() -> io::Result { ) == 0 { let count = libc::CPU_COUNT(&set) as usize; if count > 0 { - return Ok(NonZeroUsize::new_unchecked(count)); + return Ok(NonZero::::new_unchecked(count)); } } } @@ -397,7 +397,7 @@ pub fn available_parallelism() -> io::Result { } } libc::_cpuset_destroy(set); - if let Some(count) = NonZeroUsize::new(count) { + if let Some(count) = NonZero::::new(count) { return Ok(count); } } @@ -433,7 +433,7 @@ pub fn available_parallelism() -> io::Result { } } - Ok(unsafe { NonZeroUsize::new_unchecked(cpus as usize) }) + Ok(unsafe { NonZero::::new_unchecked(cpus as usize) }) } else if #[cfg(target_os = "nto")] { unsafe { use libc::_syspage_ptr; @@ -441,7 +441,7 @@ pub fn available_parallelism() -> io::Result { Err(io::const_io_error!(io::ErrorKind::NotFound, "No syspage available")) } else { let cpus = (*_syspage_ptr).num_cpu; - NonZeroUsize::new(cpus as usize) + NonZero::::new(cpus as usize) .ok_or(io::const_io_error!(io::ErrorKind::NotFound, "The number of hardware threads is not known for the target platform")) } } @@ -456,7 +456,7 @@ pub fn available_parallelism() -> io::Result { return Err(io::const_io_error!(io::ErrorKind::NotFound, "The number of hardware threads is not known for the target platform")); } - Ok(NonZeroUsize::new_unchecked(sinfo.cpu_count as usize)) + Ok(NonZero::::new_unchecked(sinfo.cpu_count as usize)) } } else { // FIXME: implement on vxWorks, Redox, l4re diff --git a/library/std/src/sys/pal/unsupported/process.rs b/library/std/src/sys/pal/unsupported/process.rs index a639afcc674..6a989dd3e76 100644 --- a/library/std/src/sys/pal/unsupported/process.rs +++ b/library/std/src/sys/pal/unsupported/process.rs @@ -2,7 +2,7 @@ use crate::ffi::OsStr; use crate::fmt; use crate::io; use crate::marker::PhantomData; -use crate::num::NonZeroI32; +use crate::num::NonZero; use crate::path::Path; use crate::sys::fs::File; use crate::sys::pipe::AnonPipe; @@ -170,7 +170,7 @@ impl Into for ExitStatusError { } impl ExitStatusError { - pub fn code(self) -> Option { + pub fn code(self) -> Option> { self.0 } } diff --git a/library/std/src/sys/pal/unsupported/thread.rs b/library/std/src/sys/pal/unsupported/thread.rs index a8db251de20..cd1ae7f7d11 100644 --- a/library/std/src/sys/pal/unsupported/thread.rs +++ b/library/std/src/sys/pal/unsupported/thread.rs @@ -1,7 +1,7 @@ use super::unsupported; use crate::ffi::CStr; use crate::io; -use crate::num::NonZeroUsize; +use crate::num::NonZero; use crate::time::Duration; pub struct Thread(!); @@ -31,7 +31,7 @@ impl Thread { } } -pub fn available_parallelism() -> io::Result { +pub fn available_parallelism() -> io::Result> { unsupported() } diff --git a/library/std/src/sys/pal/wasi/thread.rs b/library/std/src/sys/pal/wasi/thread.rs index a0eefa8811a..77d8b4378e7 100644 --- a/library/std/src/sys/pal/wasi/thread.rs +++ b/library/std/src/sys/pal/wasi/thread.rs @@ -1,7 +1,7 @@ use crate::ffi::CStr; use crate::io; use crate::mem; -use crate::num::NonZeroUsize; +use crate::num::NonZero; use crate::sys::unsupported; use crate::time::Duration; @@ -186,7 +186,7 @@ impl Thread { } } -pub fn available_parallelism() -> io::Result { +pub fn available_parallelism() -> io::Result> { unsupported() } diff --git a/library/std/src/sys/pal/wasm/atomics/thread.rs b/library/std/src/sys/pal/wasm/atomics/thread.rs index 714b7049227..49f936f1449 100644 --- a/library/std/src/sys/pal/wasm/atomics/thread.rs +++ b/library/std/src/sys/pal/wasm/atomics/thread.rs @@ -1,6 +1,6 @@ use crate::ffi::CStr; use crate::io; -use crate::num::NonZeroUsize; +use crate::num::NonZero; use crate::sys::unsupported; use crate::time::Duration; @@ -40,7 +40,7 @@ impl Thread { pub fn join(self) {} } -pub fn available_parallelism() -> io::Result { +pub fn available_parallelism() -> io::Result> { unsupported() } diff --git a/library/std/src/sys/pal/windows/args.rs b/library/std/src/sys/pal/windows/args.rs index fbbdbc21265..c3a4d470699 100644 --- a/library/std/src/sys/pal/windows/args.rs +++ b/library/std/src/sys/pal/windows/args.rs @@ -10,7 +10,7 @@ use super::os::current_exe; use crate::ffi::OsString; use crate::fmt; use crate::io; -use crate::num::NonZeroU16; +use crate::num::NonZero; use crate::os::windows::prelude::*; use crate::path::{Path, PathBuf}; use crate::sys::path::get_long_path; @@ -21,12 +21,12 @@ use crate::vec; use crate::iter; -/// This is the const equivalent to `NonZeroU16::new(n).unwrap()` +/// This is the const equivalent to `NonZero::::new(n).unwrap()` /// /// FIXME: This can be removed once `Option::unwrap` is stably const. /// See the `const_option` feature (#67441). -const fn non_zero_u16(n: u16) -> NonZeroU16 { - match NonZeroU16::new(n) { +const fn non_zero_u16(n: u16) -> NonZero { + match NonZero::::new(n) { Some(n) => n, None => panic!("called `unwrap` on a `None` value"), } @@ -69,10 +69,10 @@ fn parse_lp_cmd_line<'a, F: Fn() -> OsString>( lp_cmd_line: Option>, exe_name: F, ) -> Vec { - const BACKSLASH: NonZeroU16 = non_zero_u16(b'\\' as u16); - const QUOTE: NonZeroU16 = non_zero_u16(b'"' as u16); - const TAB: NonZeroU16 = non_zero_u16(b'\t' as u16); - const SPACE: NonZeroU16 = non_zero_u16(b' ' as u16); + const BACKSLASH: NonZero = non_zero_u16(b'\\' as u16); + const QUOTE: NonZero = non_zero_u16(b'"' as u16); + const TAB: NonZero = non_zero_u16(b'\t' as u16); + const SPACE: NonZero = non_zero_u16(b' ' as u16); let mut ret_val = Vec::new(); // If the cmd line pointer is null or it points to an empty string then diff --git a/library/std/src/sys/pal/windows/process.rs b/library/std/src/sys/pal/windows/process.rs index 9ec775959fd..6a94d377140 100644 --- a/library/std/src/sys/pal/windows/process.rs +++ b/library/std/src/sys/pal/windows/process.rs @@ -12,7 +12,7 @@ use crate::fmt; use crate::io::{self, Error, ErrorKind}; use crate::mem; use crate::mem::MaybeUninit; -use crate::num::NonZeroI32; +use crate::num::NonZero; use crate::os::windows::ffi::{OsStrExt, OsStringExt}; use crate::os::windows::io::{AsHandle, AsRawHandle, BorrowedHandle, FromRawHandle, IntoRawHandle}; use crate::path::{Path, PathBuf}; @@ -747,7 +747,7 @@ impl Into for ExitStatusError { } impl ExitStatusError { - pub fn code(self) -> Option { + pub fn code(self) -> Option> { Some((u32::from(self.0) as i32).try_into().unwrap()) } } diff --git a/library/std/src/sys/pal/windows/thread.rs b/library/std/src/sys/pal/windows/thread.rs index 1fe74493519..4f189944fb2 100644 --- a/library/std/src/sys/pal/windows/thread.rs +++ b/library/std/src/sys/pal/windows/thread.rs @@ -1,6 +1,6 @@ use crate::ffi::CStr; use crate::io; -use crate::num::NonZeroUsize; +use crate::num::NonZero; use crate::os::windows::io::AsRawHandle; use crate::os::windows::io::HandleOrNull; use crate::ptr; @@ -110,7 +110,7 @@ impl Thread { } } -pub fn available_parallelism() -> io::Result { +pub fn available_parallelism() -> io::Result> { let res = unsafe { let mut sysinfo: c::SYSTEM_INFO = crate::mem::zeroed(); c::GetSystemInfo(&mut sysinfo); @@ -121,7 +121,7 @@ pub fn available_parallelism() -> io::Result { io::ErrorKind::NotFound, "The number of hardware threads is not known for the target platform", )), - cpus => Ok(unsafe { NonZeroUsize::new_unchecked(cpus) }), + cpus => Ok(unsafe { NonZero::::new_unchecked(cpus) }), } } diff --git a/library/std/src/sys/pal/xous/thread.rs b/library/std/src/sys/pal/xous/thread.rs index 0f452e07a5c..2cc15856501 100644 --- a/library/std/src/sys/pal/xous/thread.rs +++ b/library/std/src/sys/pal/xous/thread.rs @@ -1,6 +1,6 @@ use crate::ffi::CStr; use crate::io; -use crate::num::NonZeroUsize; +use crate::num::NonZero; use crate::os::xous::ffi::{ blocking_scalar, create_thread, do_yield, join_thread, map_memory, update_memory_flags, MemoryFlags, Syscall, ThreadId, @@ -132,9 +132,9 @@ impl Thread { } } -pub fn available_parallelism() -> io::Result { +pub fn available_parallelism() -> io::Result> { // We're unicore right now. - Ok(unsafe { NonZeroUsize::new_unchecked(1) }) + Ok(unsafe { NonZero::::new_unchecked(1) }) } pub mod guard { diff --git a/library/std/src/sys_common/wstr.rs b/library/std/src/sys_common/wstr.rs index b230fd1a829..601ef3dd150 100644 --- a/library/std/src/sys_common/wstr.rs +++ b/library/std/src/sys_common/wstr.rs @@ -2,7 +2,7 @@ #![allow(dead_code)] use crate::marker::PhantomData; -use crate::num::NonZeroU16; +use crate::num::NonZero; use crate::ptr::NonNull; /// A safe iterator over a LPWSTR @@ -23,15 +23,15 @@ impl WStrUnits<'_> { Some(Self { lpwstr: NonNull::new(lpwstr as _)?, lifetime: PhantomData }) } - pub fn peek(&self) -> Option { + pub fn peek(&self) -> Option> { // SAFETY: It's always safe to read the current item because we don't // ever move out of the array's bounds. - unsafe { NonZeroU16::new(*self.lpwstr.as_ptr()) } + unsafe { NonZero::::new(*self.lpwstr.as_ptr()) } } /// Advance the iterator while `predicate` returns true. /// Returns the number of items it advanced by. - pub fn advance_while bool>(&mut self, mut predicate: P) -> usize { + pub fn advance_while) -> bool>(&mut self, mut predicate: P) -> usize { let mut counter = 0; while let Some(w) = self.peek() { if !predicate(w) { @@ -46,8 +46,9 @@ impl WStrUnits<'_> { impl Iterator for WStrUnits<'_> { // This can never return zero as that marks the end of the string. - type Item = NonZeroU16; - fn next(&mut self) -> Option { + type Item = NonZero; + + fn next(&mut self) -> Option { // SAFETY: If NULL is reached we immediately return. // Therefore it's safe to advance the pointer after that. unsafe { diff --git a/library/std/src/thread/mod.rs b/library/std/src/thread/mod.rs index eb837c8f6c6..0da3da23568 100644 --- a/library/std/src/thread/mod.rs +++ b/library/std/src/thread/mod.rs @@ -165,8 +165,7 @@ use crate::fmt; use crate::io; use crate::marker::PhantomData; use crate::mem::{self, forget}; -use crate::num::NonZeroU64; -use crate::num::NonZeroUsize; +use crate::num::{NonZero, NonZeroU64, NonZeroUsize}; use crate::panic; use crate::panicking; use crate::pin::Pin; @@ -1166,7 +1165,7 @@ pub fn park_timeout(dur: Duration) { /// [`id`]: Thread::id #[stable(feature = "thread_id", since = "1.19.0")] #[derive(Eq, PartialEq, Clone, Copy, Hash, Debug)] -pub struct ThreadId(NonZeroU64); +pub struct ThreadId(NonZero); impl ThreadId { // Generate a new unique thread ID. @@ -1189,7 +1188,7 @@ impl ThreadId { }; match COUNTER.compare_exchange_weak(last, id, Relaxed, Relaxed) { - Ok(_) => return ThreadId(NonZeroU64::new(id).unwrap()), + Ok(_) => return ThreadId(NonZero::::new(id).unwrap()), Err(id) => last = id, } } @@ -1208,7 +1207,7 @@ impl ThreadId { *counter = id; drop(counter); - ThreadId(NonZeroU64::new(id).unwrap()) + ThreadId(NonZero::::new(id).unwrap()) } } } diff --git a/src/tools/miri/src/bin/miri.rs b/src/tools/miri/src/bin/miri.rs index de7a4b79d26..095ba173671 100644 --- a/src/tools/miri/src/bin/miri.rs +++ b/src/tools/miri/src/bin/miri.rs @@ -1,3 +1,4 @@ +#![feature(generic_nonzero)] #![feature(rustc_private, stmt_expr_attributes)] #![allow( clippy::manual_range_contains, @@ -17,7 +18,7 @@ extern crate rustc_middle; extern crate rustc_session; use std::env::{self, VarError}; -use std::num::NonZeroU64; +use std::num::NonZero; use std::path::PathBuf; use std::str::FromStr; @@ -528,7 +529,7 @@ fn main() { } } } else if let Some(param) = arg.strip_prefix("-Zmiri-track-alloc-id=") { - let ids: Vec = match parse_comma_list::(param) { + let ids: Vec = match parse_comma_list::>(param) { Ok(ids) => ids.into_iter().map(miri::AllocId).collect(), Err(err) => show_error!( diff --git a/src/tools/miri/src/borrow_tracker/mod.rs b/src/tools/miri/src/borrow_tracker/mod.rs index 46f96a715f1..4424595ea1c 100644 --- a/src/tools/miri/src/borrow_tracker/mod.rs +++ b/src/tools/miri/src/borrow_tracker/mod.rs @@ -1,6 +1,6 @@ use std::cell::RefCell; use std::fmt; -use std::num::NonZeroU64; +use std::num::NonZero; use log::trace; use smallvec::SmallVec; @@ -13,22 +13,22 @@ use crate::*; pub mod stacked_borrows; pub mod tree_borrows; -pub type CallId = NonZeroU64; +pub type CallId = NonZero; /// Tracking pointer provenance #[derive(Copy, Clone, Hash, PartialEq, Eq, PartialOrd, Ord)] -pub struct BorTag(NonZeroU64); +pub struct BorTag(NonZero); impl BorTag { pub fn new(i: u64) -> Option { - NonZeroU64::new(i).map(BorTag) + NonZero::::new(i).map(BorTag) } pub fn get(&self) -> u64 { self.0.get() } - pub fn inner(&self) -> NonZeroU64 { + pub fn inner(&self) -> NonZero { self.0 } @@ -184,7 +184,7 @@ impl GlobalStateInner { borrow_tracker_method, next_ptr_tag: BorTag::one(), base_ptr_tags: FxHashMap::default(), - next_call_id: NonZeroU64::new(1).unwrap(), + next_call_id: NonZero::::new(1).unwrap(), protected_tags: FxHashMap::default(), tracked_pointer_tags, tracked_call_ids, @@ -206,7 +206,7 @@ impl GlobalStateInner { if self.tracked_call_ids.contains(&call_id) { machine.emit_diagnostic(NonHaltingDiagnostic::CreatedCallId(call_id)); } - self.next_call_id = NonZeroU64::new(call_id.get() + 1).unwrap(); + self.next_call_id = NonZero::::new(call_id.get() + 1).unwrap(); FrameState { call_id, protected_tags: SmallVec::new() } } diff --git a/src/tools/miri/src/concurrency/init_once.rs b/src/tools/miri/src/concurrency/init_once.rs index 9a848d50341..35dcfecbbe3 100644 --- a/src/tools/miri/src/concurrency/init_once.rs +++ b/src/tools/miri/src/concurrency/init_once.rs @@ -1,5 +1,4 @@ use std::collections::VecDeque; -use std::num::NonZeroU32; use rustc_index::Idx; use rustc_middle::ty::layout::TyAndLayout; diff --git a/src/tools/miri/src/concurrency/sync.rs b/src/tools/miri/src/concurrency/sync.rs index b288b69e0ce..c3130c8a8f0 100644 --- a/src/tools/miri/src/concurrency/sync.rs +++ b/src/tools/miri/src/concurrency/sync.rs @@ -1,5 +1,4 @@ use std::collections::{hash_map::Entry, VecDeque}; -use std::num::NonZeroU32; use std::ops::Not; use log::trace; @@ -26,12 +25,12 @@ macro_rules! declare_id { /// 0 is used to indicate that the id was not yet assigned and, /// therefore, is not a valid identifier. #[derive(Clone, Copy, Debug, PartialOrd, Ord, PartialEq, Eq, Hash)] - pub struct $name(NonZeroU32); + pub struct $name(std::num::NonZero); impl SyncId for $name { // Panics if `id == 0`. fn from_u32(id: u32) -> Self { - Self(NonZeroU32::new(id).unwrap()) + Self(std::num::NonZero::::new(id).unwrap()) } fn to_u32(&self) -> u32 { self.0.get() @@ -44,11 +43,11 @@ macro_rules! declare_id { // therefore, need to shift by one when converting from an index // into a vector. let shifted_idx = u32::try_from(idx).unwrap().checked_add(1).unwrap(); - $name(NonZeroU32::new(shifted_idx).unwrap()) + $name(std::num::NonZero::::new(shifted_idx).unwrap()) } fn index(self) -> usize { // See the comment in `Self::new`. - // (This cannot underflow because self is NonZeroU32.) + // (This cannot underflow because `self.0` is `NonZero`.) usize::try_from(self.0.get() - 1).unwrap() } } diff --git a/src/tools/miri/src/diagnostics.rs b/src/tools/miri/src/diagnostics.rs index 7f91af59d56..19b29a41819 100644 --- a/src/tools/miri/src/diagnostics.rs +++ b/src/tools/miri/src/diagnostics.rs @@ -1,5 +1,5 @@ use std::fmt::{self, Write}; -use std::num::NonZeroU64; +use std::num::NonZero; use log::trace; @@ -115,7 +115,7 @@ pub enum NonHaltingDiagnostic { /// (new_tag, new_perm, (alloc_id, base_offset, orig_tag)) /// /// new_perm is `None` for base tags. - CreatedPointerTag(NonZeroU64, Option, Option<(AllocId, AllocRange, ProvenanceExtra)>), + CreatedPointerTag(NonZero, Option, Option<(AllocId, AllocRange, ProvenanceExtra)>), /// This `Item` was popped from the borrow stack. The string explains the reason. PoppedPointerTag(Item, String), CreatedCallId(CallId), diff --git a/src/tools/miri/src/helpers.rs b/src/tools/miri/src/helpers.rs index d6b1e135808..3cee4df5885 100644 --- a/src/tools/miri/src/helpers.rs +++ b/src/tools/miri/src/helpers.rs @@ -1,6 +1,6 @@ use std::cmp; use std::iter; -use std::num::NonZeroUsize; +use std::num::NonZero; use std::time::Duration; use log::trace; @@ -574,7 +574,7 @@ pub trait EvalContextExt<'mir, 'tcx: 'mir>: crate::MiriInterpCxExt<'mir, 'tcx> { fn visit_union( &mut self, _v: &MPlaceTy<'tcx, Provenance>, - _fields: NonZeroUsize, + _fields: NonZero, ) -> InterpResult<'tcx> { bug!("we should have already handled unions in `visit_value`") } diff --git a/src/tools/miri/src/lib.rs b/src/tools/miri/src/lib.rs index 5a2bb84f3ef..305c71fb0f9 100644 --- a/src/tools/miri/src/lib.rs +++ b/src/tools/miri/src/lib.rs @@ -1,6 +1,7 @@ #![feature(rustc_private)] #![feature(cell_update)] #![feature(float_gamma)] +#![feature(generic_nonzero)] #![feature(map_try_insert)] #![feature(never_type)] #![feature(try_blocks)] diff --git a/src/tools/miri/src/shims/foreign_items.rs b/src/tools/miri/src/shims/foreign_items.rs index 25654248db4..f0e6e0374d2 100644 --- a/src/tools/miri/src/shims/foreign_items.rs +++ b/src/tools/miri/src/shims/foreign_items.rs @@ -477,7 +477,7 @@ trait EvalContextExtPriv<'mir, 'tcx: 'mir>: crate::MiriInterpCxExt<'mir, 'tcx> { let [id, show_unnamed] = this.check_shim(abi, Abi::Rust, link_name, args)?; let id = this.read_scalar(id)?.to_u64()?; let show_unnamed = this.read_scalar(show_unnamed)?.to_bool()?; - if let Some(id) = std::num::NonZeroU64::new(id) { + if let Some(id) = std::num::NonZero::::new(id) { this.print_borrow_state(AllocId(id), show_unnamed)?; } } -- cgit 1.4.1-3-g733a5 From a90cc05233858fcd16c3ca0e0b4320fc5ae09af2 Mon Sep 17 00:00:00 2001 From: Markus Reiter Date: Thu, 8 Feb 2024 23:03:25 +0100 Subject: Replace `NonZero::<_>::new` with `NonZero::new`. --- .../rustc_data_structures/src/tagged_ptr/copy.rs | 5 ++- compiler/rustc_feature/src/lib.rs | 2 +- compiler/rustc_interface/src/tests.rs | 2 +- compiler/rustc_interface/src/util.rs | 2 +- compiler/rustc_metadata/src/rmeta/decoder.rs | 10 +++--- compiler/rustc_metadata/src/rmeta/encoder.rs | 6 ++-- compiler/rustc_metadata/src/rmeta/mod.rs | 2 +- compiler/rustc_metadata/src/rmeta/table.rs | 6 ++-- compiler/rustc_middle/src/middle/stability.rs | 2 +- compiler/rustc_middle/src/mir/interpret/mod.rs | 2 +- compiler/rustc_middle/src/mir/interpret/pointer.rs | 2 +- compiler/rustc_middle/src/ty/consts/int.rs | 23 ++++++------- compiler/rustc_middle/src/ty/generic_args.rs | 5 ++- compiler/rustc_middle/src/ty/layout.rs | 2 +- compiler/rustc_middle/src/ty/mod.rs | 5 ++- compiler/rustc_passes/src/stability.rs | 2 +- compiler/rustc_query_impl/src/plumbing.rs | 6 ++-- compiler/rustc_serialize/src/serialize.rs | 2 +- compiler/rustc_session/src/options.rs | 2 +- library/alloc/src/collections/binary_heap/mod.rs | 6 ++-- .../alloc/src/collections/vec_deque/into_iter.rs | 4 +-- library/alloc/src/vec/into_iter.rs | 8 ++--- library/alloc/tests/vec.rs | 6 ++-- library/alloc/tests/vec_deque.rs | 4 +-- library/core/src/array/iter.rs | 4 +-- library/core/src/iter/adapters/array_chunks.rs | 2 +- library/core/src/iter/adapters/chain.rs | 4 +-- library/core/src/iter/adapters/cycle.rs | 2 +- library/core/src/iter/adapters/flatten.rs | 14 +++----- library/core/src/iter/adapters/skip.rs | 4 +-- library/core/src/iter/adapters/take.rs | 4 +-- library/core/src/iter/range.rs | 8 ++--- library/core/src/iter/sources/repeat_n.rs | 2 +- library/core/src/iter/traits/double_ended.rs | 2 +- library/core/src/iter/traits/iterator.rs | 2 +- library/core/src/num/nonzero.rs | 2 +- library/core/src/ops/index_range.rs | 4 +-- library/core/src/ptr/alignment.rs | 2 +- library/core/src/ptr/non_null.rs | 2 +- library/core/src/slice/iter/macros.rs | 4 +-- library/core/src/slice/mod.rs | 2 +- library/core/src/str/iter.rs | 2 +- library/core/tests/array.rs | 8 ++--- library/core/tests/iter/adapters/chain.rs | 21 ++++-------- library/core/tests/iter/adapters/enumerate.rs | 2 +- library/core/tests/iter/adapters/flatten.rs | 4 +-- library/core/tests/iter/adapters/skip.rs | 6 ++-- library/core/tests/iter/adapters/take.rs | 14 ++++---- library/core/tests/iter/range.rs | 2 +- library/core/tests/iter/traits/iterator.rs | 31 +++++------------- library/core/tests/nonzero.rs | 38 +++++++++++----------- library/core/tests/ptr.rs | 7 ++-- library/core/tests/result.rs | 2 +- library/core/tests/slice.rs | 4 +-- library/proc_macro/src/bridge/symbol.rs | 2 +- library/std/src/sys/pal/hermit/thread.rs | 2 +- library/std/src/sys/pal/sgx/abi/tls/mod.rs | 4 +-- library/std/src/sys/pal/sgx/abi/usercalls/raw.rs | 10 +++--- library/std/src/sys/pal/sgx/rwlock.rs | 8 ++--- library/std/src/sys/pal/sgx/waitqueue/mod.rs | 2 +- library/std/src/sys/pal/uefi/thread.rs | 2 +- library/std/src/sys/pal/unix/thread.rs | 14 ++++---- library/std/src/sys/pal/windows/args.rs | 4 +-- library/std/src/sys/pal/windows/thread.rs | 2 +- library/std/src/sys/pal/xous/thread.rs | 2 +- library/std/src/sys_common/wstr.rs | 2 +- library/std/src/thread/mod.rs | 4 +-- src/tools/miri/src/borrow_tracker/mod.rs | 6 ++-- src/tools/miri/src/concurrency/sync.rs | 4 +-- src/tools/miri/src/shims/foreign_items.rs | 2 +- 70 files changed, 175 insertions(+), 216 deletions(-) diff --git a/compiler/rustc_data_structures/src/tagged_ptr/copy.rs b/compiler/rustc_data_structures/src/tagged_ptr/copy.rs index 8af4042ad87..ff4208def31 100644 --- a/compiler/rustc_data_structures/src/tagged_ptr/copy.rs +++ b/compiler/rustc_data_structures/src/tagged_ptr/copy.rs @@ -143,15 +143,14 @@ where // `{non_zero} | packed_tag` can't make the value zero. let packed = (addr.get() >> T::BITS) | packed_tag; - unsafe { NonZero::::new_unchecked(packed) } + unsafe { NonZero::new_unchecked(packed) } }) } /// Retrieves the original raw pointer from `self.packed`. #[inline] pub(super) fn pointer_raw(&self) -> NonNull { - self.packed - .map_addr(|addr| unsafe { NonZero::::new_unchecked(addr.get() << T::BITS) }) + self.packed.map_addr(|addr| unsafe { NonZero::new_unchecked(addr.get() << T::BITS) }) } /// This provides a reference to the `P` pointer itself, rather than the diff --git a/compiler/rustc_feature/src/lib.rs b/compiler/rustc_feature/src/lib.rs index 02ce5d3534c..cbc0ce8c974 100644 --- a/compiler/rustc_feature/src/lib.rs +++ b/compiler/rustc_feature/src/lib.rs @@ -105,7 +105,7 @@ const fn to_nonzero(n: Option) -> Option> { // in const context. Requires https://github.com/rust-lang/rfcs/pull/2632. match n { None => None, - Some(n) => NonZero::::new(n), + Some(n) => NonZero::new(n), } } diff --git a/compiler/rustc_interface/src/tests.rs b/compiler/rustc_interface/src/tests.rs index a9c614df7ad..112553b2f70 100644 --- a/compiler/rustc_interface/src/tests.rs +++ b/compiler/rustc_interface/src/tests.rs @@ -827,7 +827,7 @@ fn test_unstable_options_tracking_hash() { tracked!(tls_model, Some(TlsModel::GeneralDynamic)); tracked!(translate_remapped_path_to_local_path, false); tracked!(trap_unreachable, Some(false)); - tracked!(treat_err_as_bug, NonZero::::new(1)); + tracked!(treat_err_as_bug, NonZero::new(1)); tracked!(tune_cpu, Some(String::from("abc"))); tracked!(uninit_const_chunk_threshold, 123); tracked!(unleash_the_miri_inside_of_you, true); diff --git a/compiler/rustc_interface/src/util.rs b/compiler/rustc_interface/src/util.rs index 00cf84138ba..087c43075f1 100644 --- a/compiler/rustc_interface/src/util.rs +++ b/compiler/rustc_interface/src/util.rs @@ -107,7 +107,7 @@ pub(crate) fn run_in_thread_pool_with_globals R + Send, R: Send>( use rustc_query_impl::QueryCtxt; use rustc_query_system::query::{deadlock, QueryContext}; - let registry = sync::Registry::new(std::num::NonZero::::new(threads).unwrap()); + let registry = sync::Registry::new(std::num::NonZero::new(threads).unwrap()); if !sync::is_dyn_thread_safe() { return run_in_thread_with_globals(edition, || { diff --git a/compiler/rustc_metadata/src/rmeta/decoder.rs b/compiler/rustc_metadata/src/rmeta/decoder.rs index 8a031e4f3a3..13d2af7a78e 100644 --- a/compiler/rustc_metadata/src/rmeta/decoder.rs +++ b/compiler/rustc_metadata/src/rmeta/decoder.rs @@ -338,7 +338,7 @@ impl<'a, 'tcx> DecodeContext<'a, 'tcx> { } LazyState::Previous(last_pos) => last_pos.get() + distance, }; - let position = NonZero::::new(position).unwrap(); + let position = NonZero::new(position).unwrap(); self.lazy_state = LazyState::Previous(position); f(position) } @@ -685,17 +685,15 @@ impl MetadataBlob { } pub(crate) fn get_rustc_version(&self) -> String { - LazyValue::::from_position( - NonZero::::new(METADATA_HEADER.len() + 8).unwrap(), - ) - .decode(self) + LazyValue::::from_position(NonZero::new(METADATA_HEADER.len() + 8).unwrap()) + .decode(self) } fn root_pos(&self) -> NonZero { let offset = METADATA_HEADER.len(); let pos_bytes = self.blob()[offset..][..8].try_into().unwrap(); let pos = u64::from_le_bytes(pos_bytes); - NonZero::::new(pos as usize).unwrap() + NonZero::new(pos as usize).unwrap() } pub(crate) fn get_header(&self) -> CrateHeader { diff --git a/compiler/rustc_metadata/src/rmeta/encoder.rs b/compiler/rustc_metadata/src/rmeta/encoder.rs index 51d747efdd3..b25f215c1aa 100644 --- a/compiler/rustc_metadata/src/rmeta/encoder.rs +++ b/compiler/rustc_metadata/src/rmeta/encoder.rs @@ -439,7 +439,7 @@ impl<'a, 'tcx> EncodeContext<'a, 'tcx> { position.get() - last_pos.get() } }; - self.lazy_state = LazyState::Previous(NonZero::::new(pos).unwrap()); + self.lazy_state = LazyState::Previous(NonZero::new(pos).unwrap()); self.emit_usize(distance); } @@ -447,7 +447,7 @@ impl<'a, 'tcx> EncodeContext<'a, 'tcx> { where T::Value<'tcx>: Encodable>, { - let pos = NonZero::::new(self.position()).unwrap(); + let pos = NonZero::new(self.position()).unwrap(); assert_eq!(self.lazy_state, LazyState::NoNode); self.lazy_state = LazyState::NodeStart(pos); @@ -466,7 +466,7 @@ impl<'a, 'tcx> EncodeContext<'a, 'tcx> { where T::Value<'tcx>: Encodable>, { - let pos = NonZero::::new(self.position()).unwrap(); + let pos = NonZero::new(self.position()).unwrap(); assert_eq!(self.lazy_state, LazyState::NoNode); self.lazy_state = LazyState::NodeStart(pos); diff --git a/compiler/rustc_metadata/src/rmeta/mod.rs b/compiler/rustc_metadata/src/rmeta/mod.rs index 81d834e0456..7c145cb5f82 100644 --- a/compiler/rustc_metadata/src/rmeta/mod.rs +++ b/compiler/rustc_metadata/src/rmeta/mod.rs @@ -119,7 +119,7 @@ impl ParameterizedOverTcx for LazyArray { impl Default for LazyArray { fn default() -> LazyArray { - LazyArray::from_position_and_num_elems(NonZero::::new(1).unwrap(), 0) + LazyArray::from_position_and_num_elems(NonZero::new(1).unwrap(), 0) } } diff --git a/compiler/rustc_metadata/src/rmeta/table.rs b/compiler/rustc_metadata/src/rmeta/table.rs index 00752ad15a3..c5f281964df 100644 --- a/compiler/rustc_metadata/src/rmeta/table.rs +++ b/compiler/rustc_metadata/src/rmeta/table.rs @@ -339,7 +339,7 @@ impl FixedSizeEncoding for Option> { #[inline] fn from_bytes(b: &[u8; 8]) -> Self { - let position = NonZero::::new(u64::from_bytes(b) as usize)?; + let position = NonZero::new(u64::from_bytes(b) as usize)?; Some(LazyValue::from_position(position)) } @@ -366,7 +366,7 @@ impl LazyArray { } fn from_bytes_impl(position: &[u8; 8], meta: &[u8; 8]) -> Option> { - let position = NonZero::::new(u64::from_bytes(position) as usize)?; + let position = NonZero::new(u64::from_bytes(position) as usize)?; let len = u64::from_bytes(meta) as usize; Some(LazyArray::from_position_and_num_elems(position, len)) } @@ -497,7 +497,7 @@ impl> TableBui } LazyTable::from_position_and_encoded_size( - NonZero::::new(pos).unwrap(), + NonZero::new(pos).unwrap(), width, self.blocks.len(), ) diff --git a/compiler/rustc_middle/src/middle/stability.rs b/compiler/rustc_middle/src/middle/stability.rs index 15ef00629b9..2f624ab0527 100644 --- a/compiler/rustc_middle/src/middle/stability.rs +++ b/compiler/rustc_middle/src/middle/stability.rs @@ -433,7 +433,7 @@ impl<'tcx> TyCtxt<'tcx> { // the `-Z force-unstable-if-unmarked` flag present (we're // compiling a compiler crate), then let this missing feature // annotation slide. - if feature == sym::rustc_private && issue == NonZero::::new(27812) { + if feature == sym::rustc_private && issue == NonZero::new(27812) { if self.sess.opts.unstable_opts.force_unstable_if_unmarked { return EvalResult::Allow; } diff --git a/compiler/rustc_middle/src/mir/interpret/mod.rs b/compiler/rustc_middle/src/mir/interpret/mod.rs index 4ef02a86e30..903c83cc54e 100644 --- a/compiler/rustc_middle/src/mir/interpret/mod.rs +++ b/compiler/rustc_middle/src/mir/interpret/mod.rs @@ -500,7 +500,7 @@ impl<'tcx> AllocMap<'tcx> { AllocMap { alloc_map: Default::default(), dedup: Default::default(), - next_id: AllocId(NonZero::::new(1).unwrap()), + next_id: AllocId(NonZero::new(1).unwrap()), } } fn reserve(&mut self) -> AllocId { diff --git a/compiler/rustc_middle/src/mir/interpret/pointer.rs b/compiler/rustc_middle/src/mir/interpret/pointer.rs index 15e12c45679..e2767ee2989 100644 --- a/compiler/rustc_middle/src/mir/interpret/pointer.rs +++ b/compiler/rustc_middle/src/mir/interpret/pointer.rs @@ -155,7 +155,7 @@ impl CtfeProvenance { /// Returns the `AllocId` of this provenance. #[inline(always)] pub fn alloc_id(self) -> AllocId { - AllocId(NonZero::::new(self.0.get() & !IMMUTABLE_MASK).unwrap()) + AllocId(NonZero::new(self.0.get() & !IMMUTABLE_MASK).unwrap()) } /// Returns whether this provenance is immutable. diff --git a/compiler/rustc_middle/src/ty/consts/int.rs b/compiler/rustc_middle/src/ty/consts/int.rs index 15f69d2333c..5d50510338c 100644 --- a/compiler/rustc_middle/src/ty/consts/int.rs +++ b/compiler/rustc_middle/src/ty/consts/int.rs @@ -161,14 +161,14 @@ impl Decodable for ScalarInt { let mut data = [0u8; 16]; let size = d.read_u8(); data[..size as usize].copy_from_slice(d.read_raw_bytes(size as usize)); - ScalarInt { data: u128::from_le_bytes(data), size: NonZero::::new(size).unwrap() } + ScalarInt { data: u128::from_le_bytes(data), size: NonZero::new(size).unwrap() } } } impl ScalarInt { - pub const TRUE: ScalarInt = ScalarInt { data: 1_u128, size: NonZero::::new(1).unwrap() }; + pub const TRUE: ScalarInt = ScalarInt { data: 1_u128, size: NonZero::new(1).unwrap() }; - pub const FALSE: ScalarInt = ScalarInt { data: 0_u128, size: NonZero::::new(1).unwrap() }; + pub const FALSE: ScalarInt = ScalarInt { data: 0_u128, size: NonZero::new(1).unwrap() }; #[inline] pub fn size(self) -> Size { @@ -196,7 +196,7 @@ impl ScalarInt { #[inline] pub fn null(size: Size) -> Self { - Self { data: 0, size: NonZero::::new(size.bytes() as u8).unwrap() } + Self { data: 0, size: NonZero::new(size.bytes() as u8).unwrap() } } #[inline] @@ -208,7 +208,7 @@ impl ScalarInt { pub fn try_from_uint(i: impl Into, size: Size) -> Option { let data = i.into(); if size.truncate(data) == data { - Some(Self { data, size: NonZero::::new(size.bytes() as u8).unwrap() }) + Some(Self { data, size: NonZero::new(size.bytes() as u8).unwrap() }) } else { None } @@ -220,7 +220,7 @@ impl ScalarInt { // `into` performed sign extension, we have to truncate let truncated = size.truncate(i as u128); if size.sign_extend(truncated) as i128 == i { - Some(Self { data: truncated, size: NonZero::::new(size.bytes() as u8).unwrap() }) + Some(Self { data: truncated, size: NonZero::new(size.bytes() as u8).unwrap() }) } else { None } @@ -388,7 +388,7 @@ macro_rules! from { fn from(u: $ty) -> Self { Self { data: u128::from(u), - size: NonZero::::new(std::mem::size_of::<$ty>() as u8).unwrap(), + size: NonZero::new(std::mem::size_of::<$ty>() as u8).unwrap(), } } } @@ -427,10 +427,7 @@ impl TryFrom for bool { impl From for ScalarInt { #[inline] fn from(c: char) -> Self { - Self { - data: c as u128, - size: NonZero::::new(std::mem::size_of::() as u8).unwrap(), - } + Self { data: c as u128, size: NonZero::new(std::mem::size_of::() as u8).unwrap() } } } @@ -457,7 +454,7 @@ impl From for ScalarInt { #[inline] fn from(f: Single) -> Self { // We trust apfloat to give us properly truncated data. - Self { data: f.to_bits(), size: NonZero::::new((Single::BITS / 8) as u8).unwrap() } + Self { data: f.to_bits(), size: NonZero::new((Single::BITS / 8) as u8).unwrap() } } } @@ -473,7 +470,7 @@ impl From for ScalarInt { #[inline] fn from(f: Double) -> Self { // We trust apfloat to give us properly truncated data. - Self { data: f.to_bits(), size: NonZero::::new((Double::BITS / 8) as u8).unwrap() } + Self { data: f.to_bits(), size: NonZero::new((Double::BITS / 8) as u8).unwrap() } } } diff --git a/compiler/rustc_middle/src/ty/generic_args.rs b/compiler/rustc_middle/src/ty/generic_args.rs index c931c2064b0..813a7a64daf 100644 --- a/compiler/rustc_middle/src/ty/generic_args.rs +++ b/compiler/rustc_middle/src/ty/generic_args.rs @@ -143,9 +143,8 @@ impl<'tcx> From> for GenericArg<'tcx> { impl<'tcx> GenericArg<'tcx> { #[inline] pub fn unpack(self) -> GenericArgKind<'tcx> { - let ptr = unsafe { - self.ptr.map_addr(|addr| NonZero::::new_unchecked(addr.get() & !TAG_MASK)) - }; + let ptr = + unsafe { self.ptr.map_addr(|addr| NonZero::new_unchecked(addr.get() & !TAG_MASK)) }; // SAFETY: use of `Interned::new_unchecked` here is ok because these // pointers were originally created from `Interned` types in `pack()`, // and this is just going in the other direction. diff --git a/compiler/rustc_middle/src/ty/layout.rs b/compiler/rustc_middle/src/ty/layout.rs index d9fa99535b1..2b34f5daaf6 100644 --- a/compiler/rustc_middle/src/ty/layout.rs +++ b/compiler/rustc_middle/src/ty/layout.rs @@ -761,7 +761,7 @@ where }; tcx.mk_layout(LayoutS { variants: Variants::Single { index: variant_index }, - fields: match NonZero::::new(fields) { + fields: match NonZero::new(fields) { Some(fields) => FieldsShape::Union(fields), None => FieldsShape::Arbitrary { offsets: IndexVec::new(), memory_index: IndexVec::new() }, }, diff --git a/compiler/rustc_middle/src/ty/mod.rs b/compiler/rustc_middle/src/ty/mod.rs index 3eea0d428ee..eea3624898c 100644 --- a/compiler/rustc_middle/src/ty/mod.rs +++ b/compiler/rustc_middle/src/ty/mod.rs @@ -617,9 +617,8 @@ impl<'tcx, D: TyDecoder>> Decodable for Term<'tcx> { impl<'tcx> Term<'tcx> { #[inline] pub fn unpack(self) -> TermKind<'tcx> { - let ptr = unsafe { - self.ptr.map_addr(|addr| NonZero::::new_unchecked(addr.get() & !TAG_MASK)) - }; + let ptr = + unsafe { self.ptr.map_addr(|addr| NonZero::new_unchecked(addr.get() & !TAG_MASK)) }; // SAFETY: use of `Interned::new_unchecked` here is ok because these // pointers were originally created from `Interned` types in `pack()`, // and this is just going in the other direction. diff --git a/compiler/rustc_passes/src/stability.rs b/compiler/rustc_passes/src/stability.rs index 312a136c897..19272b52b32 100644 --- a/compiler/rustc_passes/src/stability.rs +++ b/compiler/rustc_passes/src/stability.rs @@ -645,7 +645,7 @@ fn stability_index(tcx: TyCtxt<'_>, (): ()) -> Index { let stability = Stability { level: attr::StabilityLevel::Unstable { reason: UnstableReason::Default, - issue: NonZero::::new(27812), + issue: NonZero::new(27812), is_soft: false, implied_by: None, }, diff --git a/compiler/rustc_query_impl/src/plumbing.rs b/compiler/rustc_query_impl/src/plumbing.rs index 8cbcce986a1..5917d79983d 100644 --- a/compiler/rustc_query_impl/src/plumbing.rs +++ b/compiler/rustc_query_impl/src/plumbing.rs @@ -68,10 +68,8 @@ impl QueryContext for QueryCtxt<'_> { #[inline] fn next_job_id(self) -> QueryJobId { QueryJobId( - NonZero::::new( - self.query_system.jobs.fetch_add(1, std::sync::atomic::Ordering::Relaxed), - ) - .unwrap(), + NonZero::new(self.query_system.jobs.fetch_add(1, std::sync::atomic::Ordering::Relaxed)) + .unwrap(), ) } diff --git a/compiler/rustc_serialize/src/serialize.rs b/compiler/rustc_serialize/src/serialize.rs index a38a4a916fb..412f7eced43 100644 --- a/compiler/rustc_serialize/src/serialize.rs +++ b/compiler/rustc_serialize/src/serialize.rs @@ -225,7 +225,7 @@ impl Encodable for NonZero { impl Decodable for NonZero { fn decode(d: &mut D) -> Self { - NonZero::::new(d.read_u32()).unwrap() + NonZero::new(d.read_u32()).unwrap() } } diff --git a/compiler/rustc_session/src/options.rs b/compiler/rustc_session/src/options.rs index 1a046667bd7..743f4760339 100644 --- a/compiler/rustc_session/src/options.rs +++ b/compiler/rustc_session/src/options.rs @@ -1007,7 +1007,7 @@ mod parse { } }, None => { - *slot = NonZero::::new(1); + *slot = NonZero::new(1); true } } diff --git a/library/alloc/src/collections/binary_heap/mod.rs b/library/alloc/src/collections/binary_heap/mod.rs index 3a82fb0df88..c89a3806280 100644 --- a/library/alloc/src/collections/binary_heap/mod.rs +++ b/library/alloc/src/collections/binary_heap/mod.rs @@ -350,7 +350,7 @@ impl DerefMut for PeekMut<'_, T, A> { // the standard library as "leak amplification". unsafe { // SAFETY: len > 1 so len != 0. - self.original_len = Some(NonZero::::new_unchecked(len)); + self.original_len = Some(NonZero::new_unchecked(len)); // SAFETY: len > 1 so all this does for now is leak elements, // which is safe. self.heap.data.set_len(1); @@ -1576,8 +1576,8 @@ unsafe impl SourceIter for IntoIter { #[unstable(issue = "none", feature = "inplace_iteration")] #[doc(hidden)] unsafe impl InPlaceIterable for IntoIter { - const EXPAND_BY: Option> = NonZero::::new(1); - const MERGE_BY: Option> = NonZero::::new(1); + const EXPAND_BY: Option> = NonZero::new(1); + const MERGE_BY: Option> = NonZero::new(1); } unsafe impl AsVecIntoIter for IntoIter { diff --git a/library/alloc/src/collections/vec_deque/into_iter.rs b/library/alloc/src/collections/vec_deque/into_iter.rs index 02ab3f79b06..692af7c197a 100644 --- a/library/alloc/src/collections/vec_deque/into_iter.rs +++ b/library/alloc/src/collections/vec_deque/into_iter.rs @@ -63,7 +63,7 @@ impl Iterator for IntoIter { self.inner.drain(..n); 0 }; - NonZero::::new(rem).map_or(Ok(()), Err) + NonZero::new(rem).map_or(Ok(()), Err) } #[inline] @@ -192,7 +192,7 @@ impl DoubleEndedIterator for IntoIter { self.inner.truncate(len - n); 0 }; - NonZero::::new(rem).map_or(Ok(()), Err) + NonZero::new(rem).map_or(Ok(()), Err) } fn try_rfold(&mut self, mut init: B, mut f: F) -> R diff --git a/library/alloc/src/vec/into_iter.rs b/library/alloc/src/vec/into_iter.rs index 76d1b7b72a1..63d8fe19ac3 100644 --- a/library/alloc/src/vec/into_iter.rs +++ b/library/alloc/src/vec/into_iter.rs @@ -248,7 +248,7 @@ impl Iterator for IntoIter { unsafe { ptr::drop_in_place(to_drop); } - NonZero::::new(n - step_size).map_or(Ok(()), Err) + NonZero::new(n - step_size).map_or(Ok(()), Err) } #[inline] @@ -350,7 +350,7 @@ impl DoubleEndedIterator for IntoIter { unsafe { ptr::drop_in_place(to_drop); } - NonZero::::new(n - step_size).map_or(Ok(()), Err) + NonZero::new(n - step_size).map_or(Ok(()), Err) } } @@ -457,8 +457,8 @@ unsafe impl<#[may_dangle] T, A: Allocator> Drop for IntoIter { #[unstable(issue = "none", feature = "inplace_iteration")] #[doc(hidden)] unsafe impl InPlaceIterable for IntoIter { - const EXPAND_BY: Option> = NonZero::::new(1); - const MERGE_BY: Option> = NonZero::::new(1); + const EXPAND_BY: Option> = NonZero::new(1); + const MERGE_BY: Option> = NonZero::new(1); } #[unstable(issue = "none", feature = "inplace_iteration")] diff --git a/library/alloc/tests/vec.rs b/library/alloc/tests/vec.rs index e872ace883c..04bb20e96b7 100644 --- a/library/alloc/tests/vec.rs +++ b/library/alloc/tests/vec.rs @@ -1089,9 +1089,9 @@ fn test_into_iter_advance_by() { assert_eq!(i.advance_back_by(1), Ok(())); assert_eq!(i.as_slice(), [2, 3, 4]); - assert_eq!(i.advance_back_by(usize::MAX), Err(NonZero::::new(usize::MAX - 3).unwrap())); + assert_eq!(i.advance_back_by(usize::MAX), Err(NonZero::new(usize::MAX - 3).unwrap())); - assert_eq!(i.advance_by(usize::MAX), Err(NonZero::::new(usize::MAX).unwrap())); + assert_eq!(i.advance_by(usize::MAX), Err(NonZero::new(usize::MAX).unwrap())); assert_eq!(i.advance_by(0), Ok(())); assert_eq!(i.advance_back_by(0), Ok(())); @@ -1192,7 +1192,7 @@ fn test_from_iter_specialization_with_iterator_adapters() { .map(|(a, b)| a + b) .map_while(Option::Some) .skip(1) - .map(|e| if e != usize::MAX { Ok(NonZero::::new(e)) } else { Err(()) }); + .map(|e| if e != usize::MAX { Ok(NonZero::new(e)) } else { Err(()) }); assert_in_place_trait(&iter); let sink = iter.collect::, _>>().unwrap(); let sinkptr = sink.as_ptr(); diff --git a/library/alloc/tests/vec_deque.rs b/library/alloc/tests/vec_deque.rs index 079750abd69..eda2f8bb812 100644 --- a/library/alloc/tests/vec_deque.rs +++ b/library/alloc/tests/vec_deque.rs @@ -445,9 +445,9 @@ fn test_into_iter() { assert_eq!(it.next_back(), Some(3)); let mut it = VecDeque::from(vec![1, 2, 3, 4, 5]).into_iter(); - assert_eq!(it.advance_by(10), Err(NonZero::::new(5).unwrap())); + assert_eq!(it.advance_by(10), Err(NonZero::new(5).unwrap())); let mut it = VecDeque::from(vec![1, 2, 3, 4, 5]).into_iter(); - assert_eq!(it.advance_back_by(10), Err(NonZero::::new(5).unwrap())); + assert_eq!(it.advance_back_by(10), Err(NonZero::new(5).unwrap())); } } diff --git a/library/core/src/array/iter.rs b/library/core/src/array/iter.rs index e50ae1b0d70..e3d2cd2a31f 100644 --- a/library/core/src/array/iter.rs +++ b/library/core/src/array/iter.rs @@ -292,7 +292,7 @@ impl Iterator for IntoIter { ptr::drop_in_place(MaybeUninit::slice_assume_init_mut(slice)); } - NonZero::::new(remaining).map_or(Ok(()), Err) + NonZero::new(remaining).map_or(Ok(()), Err) } #[inline] @@ -347,7 +347,7 @@ impl DoubleEndedIterator for IntoIter { ptr::drop_in_place(MaybeUninit::slice_assume_init_mut(slice)); } - NonZero::::new(remaining).map_or(Ok(()), Err) + NonZero::new(remaining).map_or(Ok(()), Err) } } diff --git a/library/core/src/iter/adapters/array_chunks.rs b/library/core/src/iter/adapters/array_chunks.rs index 2e437b41dce..8c68ea114db 100644 --- a/library/core/src/iter/adapters/array_chunks.rs +++ b/library/core/src/iter/adapters/array_chunks.rs @@ -255,7 +255,7 @@ where unsafe impl InPlaceIterable for ArrayChunks { const EXPAND_BY: Option> = I::EXPAND_BY; const MERGE_BY: Option> = const { - match (I::MERGE_BY, NonZero::::new(N)) { + match (I::MERGE_BY, NonZero::new(N)) { (Some(m), Some(n)) => m.checked_mul(n), _ => None, } diff --git a/library/core/src/iter/adapters/chain.rs b/library/core/src/iter/adapters/chain.rs index 7edfee7bf6c..bcaac2f42cf 100644 --- a/library/core/src/iter/adapters/chain.rs +++ b/library/core/src/iter/adapters/chain.rs @@ -110,7 +110,7 @@ where // we don't fuse the second iterator } - NonZero::::new(n).map_or(Ok(()), Err) + NonZero::new(n).map_or(Ok(()), Err) } #[inline] @@ -196,7 +196,7 @@ where // we don't fuse the second iterator } - NonZero::::new(n).map_or(Ok(()), Err) + NonZero::new(n).map_or(Ok(()), Err) } #[inline] diff --git a/library/core/src/iter/adapters/cycle.rs b/library/core/src/iter/adapters/cycle.rs index 7919c040dba..b35ed844203 100644 --- a/library/core/src/iter/adapters/cycle.rs +++ b/library/core/src/iter/adapters/cycle.rs @@ -97,7 +97,7 @@ where }; } - NonZero::::new(n).map_or(Ok(()), Err) + NonZero::new(n).map_or(Ok(()), Err) } // No `fold` override, because `fold` doesn't make much sense for `Cycle`, diff --git a/library/core/src/iter/adapters/flatten.rs b/library/core/src/iter/adapters/flatten.rs index 42396157d86..99344a88efc 100644 --- a/library/core/src/iter/adapters/flatten.rs +++ b/library/core/src/iter/adapters/flatten.rs @@ -200,7 +200,7 @@ where #[rustc_specialization_trait] #[unstable(issue = "none", feature = "inplace_iteration")] unsafe trait BoundedSize { - const UPPER_BOUND: Option> = NonZero::::new(1); + const UPPER_BOUND: Option> = NonZero::new(1); } #[unstable(issue = "none", feature = "inplace_iteration")] @@ -217,11 +217,11 @@ unsafe impl BoundedSize for Once {} unsafe impl BoundedSize for OnceWith {} #[unstable(issue = "none", feature = "inplace_iteration")] unsafe impl BoundedSize for [T; N] { - const UPPER_BOUND: Option> = NonZero::::new(N); + const UPPER_BOUND: Option> = NonZero::new(N); } #[unstable(issue = "none", feature = "inplace_iteration")] unsafe impl BoundedSize for array::IntoIter { - const UPPER_BOUND: Option> = NonZero::::new(N); + const UPPER_BOUND: Option> = NonZero::new(N); } #[unstable(issue = "none", feature = "inplace_iteration")] unsafe impl BoundedSize for Filter { @@ -680,9 +680,7 @@ where } match self.iter_try_fold(n, advance) { - ControlFlow::Continue(remaining) => { - NonZero::::new(remaining).map_or(Ok(()), Err) - } + ControlFlow::Continue(remaining) => NonZero::new(remaining).map_or(Ok(()), Err), _ => Ok(()), } } @@ -772,9 +770,7 @@ where } match self.iter_try_rfold(n, advance) { - ControlFlow::Continue(remaining) => { - NonZero::::new(remaining).map_or(Ok(()), Err) - } + ControlFlow::Continue(remaining) => NonZero::new(remaining).map_or(Ok(()), Err), _ => Ok(()), } } diff --git a/library/core/src/iter/adapters/skip.rs b/library/core/src/iter/adapters/skip.rs index 20a3b616f81..f51a2c39b8e 100644 --- a/library/core/src/iter/adapters/skip.rs +++ b/library/core/src/iter/adapters/skip.rs @@ -154,7 +154,7 @@ where } } - NonZero::::new(n).map_or(Ok(()), Err) + NonZero::new(n).map_or(Ok(()), Err) } #[doc(hidden)] @@ -238,7 +238,7 @@ where let min = crate::cmp::min(self.len(), n); let rem = self.iter.advance_back_by(min); assert!(rem.is_ok(), "ExactSizeIterator contract violation"); - NonZero::::new(n - min).map_or(Ok(()), Err) + NonZero::new(n - min).map_or(Ok(()), Err) } } diff --git a/library/core/src/iter/adapters/take.rs b/library/core/src/iter/adapters/take.rs index e668e662536..6870c677b1e 100644 --- a/library/core/src/iter/adapters/take.rs +++ b/library/core/src/iter/adapters/take.rs @@ -125,7 +125,7 @@ where }; let advanced = min - rem; self.n -= advanced; - NonZero::::new(n - advanced).map_or(Ok(()), Err) + NonZero::new(n - advanced).map_or(Ok(()), Err) } } @@ -235,7 +235,7 @@ where let advanced_by_inner = advance_by - remainder; let advanced_by = advanced_by_inner - trim_inner; self.n -= advanced_by; - NonZero::::new(n - advanced_by).map_or(Ok(()), Err) + NonZero::new(n - advanced_by).map_or(Ok(()), Err) } } diff --git a/library/core/src/iter/range.rs b/library/core/src/iter/range.rs index 7a4748dcc0d..68937161e04 100644 --- a/library/core/src/iter/range.rs +++ b/library/core/src/iter/range.rs @@ -678,7 +678,7 @@ impl RangeIteratorImpl for ops::Range { self.start = Step::forward_checked(self.start.clone(), taken).expect("`Step` invariants not upheld"); - NonZero::::new(n - taken).map_or(Ok(()), Err) + NonZero::new(n - taken).map_or(Ok(()), Err) } #[inline] @@ -719,7 +719,7 @@ impl RangeIteratorImpl for ops::Range { self.end = Step::backward_checked(self.end.clone(), taken).expect("`Step` invariants not upheld"); - NonZero::::new(n - taken).map_or(Ok(()), Err) + NonZero::new(n - taken).map_or(Ok(()), Err) } } @@ -766,7 +766,7 @@ impl RangeIteratorImpl for ops::Range { // Otherwise 0 is returned which always safe to use. self.start = unsafe { Step::forward_unchecked(self.start, taken) }; - NonZero::::new(n - taken).map_or(Ok(()), Err) + NonZero::new(n - taken).map_or(Ok(()), Err) } #[inline] @@ -807,7 +807,7 @@ impl RangeIteratorImpl for ops::Range { // SAFETY: same as the spec_advance_by() implementation self.end = unsafe { Step::backward_unchecked(self.end, taken) }; - NonZero::::new(n - taken).map_or(Ok(()), Err) + NonZero::new(n - taken).map_or(Ok(()), Err) } } diff --git a/library/core/src/iter/sources/repeat_n.rs b/library/core/src/iter/sources/repeat_n.rs index 77bb8372a44..8224e4b12a0 100644 --- a/library/core/src/iter/sources/repeat_n.rs +++ b/library/core/src/iter/sources/repeat_n.rs @@ -145,7 +145,7 @@ impl Iterator for RepeatN { if skip > len { // SAFETY: we just checked that the difference is positive - Err(unsafe { NonZero::::new_unchecked(skip - len) }) + Err(unsafe { NonZero::new_unchecked(skip - len) }) } else { self.count = len - skip; Ok(()) diff --git a/library/core/src/iter/traits/double_ended.rs b/library/core/src/iter/traits/double_ended.rs index eb830256962..48aae73d928 100644 --- a/library/core/src/iter/traits/double_ended.rs +++ b/library/core/src/iter/traits/double_ended.rs @@ -138,7 +138,7 @@ pub trait DoubleEndedIterator: Iterator { for i in 0..n { if self.next_back().is_none() { // SAFETY: `i` is always less than `n`. - return Err(unsafe { NonZero::::new_unchecked(n - i) }); + return Err(unsafe { NonZero::new_unchecked(n - i) }); } } Ok(()) diff --git a/library/core/src/iter/traits/iterator.rs b/library/core/src/iter/traits/iterator.rs index 6df66e779c4..522e75a5683 100644 --- a/library/core/src/iter/traits/iterator.rs +++ b/library/core/src/iter/traits/iterator.rs @@ -337,7 +337,7 @@ pub trait Iterator { for i in 0..n { if self.next().is_none() { // SAFETY: `i` is always less than `n`. - return Err(unsafe { NonZero::::new_unchecked(n - i) }); + return Err(unsafe { NonZero::new_unchecked(n - i) }); } } Ok(()) diff --git a/library/core/src/num/nonzero.rs b/library/core/src/num/nonzero.rs index ddaffadf4bf..6410ff5f828 100644 --- a/library/core/src/num/nonzero.rs +++ b/library/core/src/num/nonzero.rs @@ -336,7 +336,7 @@ macro_rules! nonzero_integer { // SAFETY: // `self` is non-zero, which means it has at least one bit set, which means // that the result of `count_ones` is non-zero. - unsafe { NonZero::::new_unchecked(self.get().count_ones()) } + unsafe { NonZero::new_unchecked(self.get().count_ones()) } } nonzero_integer_signedness_dependent_methods! { diff --git a/library/core/src/ops/index_range.rs b/library/core/src/ops/index_range.rs index 2ba0bd158f7..07ea2e930d5 100644 --- a/library/core/src/ops/index_range.rs +++ b/library/core/src/ops/index_range.rs @@ -132,7 +132,7 @@ impl Iterator for IndexRange { #[inline] fn advance_by(&mut self, n: usize) -> Result<(), NonZero> { let taken = self.take_prefix(n); - NonZero::::new(n - taken.len()).map_or(Ok(()), Err) + NonZero::new(n - taken.len()).map_or(Ok(()), Err) } } @@ -150,7 +150,7 @@ impl DoubleEndedIterator for IndexRange { #[inline] fn advance_back_by(&mut self, n: usize) -> Result<(), NonZero> { let taken = self.take_suffix(n); - NonZero::::new(n - taken.len()).map_or(Ok(()), Err) + NonZero::new(n - taken.len()).map_or(Ok(()), Err) } } diff --git a/library/core/src/ptr/alignment.rs b/library/core/src/ptr/alignment.rs index ad22ee5a027..d2422bb80ae 100644 --- a/library/core/src/ptr/alignment.rs +++ b/library/core/src/ptr/alignment.rs @@ -100,7 +100,7 @@ impl Alignment { #[inline] pub const fn as_nonzero(self) -> NonZeroUsize { // SAFETY: All the discriminants are non-zero. - unsafe { NonZero::::new_unchecked(self.as_usize()) } + unsafe { NonZero::new_unchecked(self.as_usize()) } } /// Returns the base-2 logarithm of the alignment. diff --git a/library/core/src/ptr/non_null.rs b/library/core/src/ptr/non_null.rs index 2246596a883..16e90343993 100644 --- a/library/core/src/ptr/non_null.rs +++ b/library/core/src/ptr/non_null.rs @@ -295,7 +295,7 @@ impl NonNull { pub fn addr(self) -> NonZeroUsize { // SAFETY: The pointer is guaranteed by the type to be non-null, // meaning that the address will be non-zero. - unsafe { NonZero::::new_unchecked(self.pointer.addr()) } + unsafe { NonZero::new_unchecked(self.pointer.addr()) } } /// Creates a new pointer with the given address. diff --git a/library/core/src/slice/iter/macros.rs b/library/core/src/slice/iter/macros.rs index 53218391dcf..7910981d0f5 100644 --- a/library/core/src/slice/iter/macros.rs +++ b/library/core/src/slice/iter/macros.rs @@ -200,7 +200,7 @@ macro_rules! iterator { let advance = cmp::min(len!(self), n); // SAFETY: By construction, `advance` does not exceed `self.len()`. unsafe { self.post_inc_start(advance) }; - NonZero::::new(n - advance).map_or(Ok(()), Err) + NonZero::new(n - advance).map_or(Ok(()), Err) } #[inline] @@ -425,7 +425,7 @@ macro_rules! iterator { let advance = cmp::min(len!(self), n); // SAFETY: By construction, `advance` does not exceed `self.len()`. unsafe { self.pre_dec_end(advance) }; - NonZero::::new(n - advance).map_or(Ok(()), Err) + NonZero::new(n - advance).map_or(Ok(()), Err) } } diff --git a/library/core/src/slice/mod.rs b/library/core/src/slice/mod.rs index c70a3d3224d..1d8ac6aa043 100644 --- a/library/core/src/slice/mod.rs +++ b/library/core/src/slice/mod.rs @@ -1086,7 +1086,7 @@ impl [T] { #[inline] #[track_caller] pub fn windows(&self, size: usize) -> Windows<'_, T> { - let size = NonZero::::new(size).expect("window size must be non-zero"); + let size = NonZero::new(size).expect("window size must be non-zero"); Windows::new(self, size) } diff --git a/library/core/src/str/iter.rs b/library/core/src/str/iter.rs index d2180fa83fb..00b4405faae 100644 --- a/library/core/src/str/iter.rs +++ b/library/core/src/str/iter.rs @@ -96,7 +96,7 @@ impl<'a> Iterator for Chars<'a> { unsafe { self.iter.advance_by(slurp).unwrap_unchecked() }; } - NonZero::::new(remainder).map_or(Ok(()), Err) + NonZero::new(remainder).map_or(Ok(()), Err) } #[inline] diff --git a/library/core/tests/array.rs b/library/core/tests/array.rs index 579c140c198..e7773d138c2 100644 --- a/library/core/tests/array.rs +++ b/library/core/tests/array.rs @@ -548,7 +548,7 @@ fn array_intoiter_advance_by() { assert_eq!(counter.get(), 13); let r = it.advance_by(123456); - assert_eq!(r, Err(NonZero::::new(123456 - 87).unwrap())); + assert_eq!(r, Err(NonZero::new(123456 - 87).unwrap())); assert_eq!(it.len(), 0); assert_eq!(counter.get(), 100); @@ -558,7 +558,7 @@ fn array_intoiter_advance_by() { assert_eq!(counter.get(), 100); let r = it.advance_by(10); - assert_eq!(r, Err(NonZero::::new(10).unwrap())); + assert_eq!(r, Err(NonZero::new(10).unwrap())); assert_eq!(it.len(), 0); assert_eq!(counter.get(), 100); } @@ -601,7 +601,7 @@ fn array_intoiter_advance_back_by() { assert_eq!(counter.get(), 13); let r = it.advance_back_by(123456); - assert_eq!(r, Err(NonZero::::new(123456 - 87).unwrap())); + assert_eq!(r, Err(NonZero::new(123456 - 87).unwrap())); assert_eq!(it.len(), 0); assert_eq!(counter.get(), 100); @@ -611,7 +611,7 @@ fn array_intoiter_advance_back_by() { assert_eq!(counter.get(), 100); let r = it.advance_back_by(10); - assert_eq!(r, Err(NonZero::::new(10).unwrap())); + assert_eq!(r, Err(NonZero::new(10).unwrap())); assert_eq!(it.len(), 0); assert_eq!(counter.get(), 100); } diff --git a/library/core/tests/iter/adapters/chain.rs b/library/core/tests/iter/adapters/chain.rs index 9e098d5bee4..b2429588de1 100644 --- a/library/core/tests/iter/adapters/chain.rs +++ b/library/core/tests/iter/adapters/chain.rs @@ -34,10 +34,7 @@ fn test_iterator_chain_advance_by() { let mut iter = Unfuse::new(xs).chain(Unfuse::new(ys)); assert_eq!(iter.advance_by(i), Ok(())); assert_eq!(iter.next(), Some(&xs[i])); - assert_eq!( - iter.advance_by(100), - Err(NonZero::::new(100 - (len - i - 1)).unwrap()) - ); + assert_eq!(iter.advance_by(100), Err(NonZero::new(100 - (len - i - 1)).unwrap())); assert_eq!(iter.advance_by(0), Ok(())); } @@ -45,10 +42,7 @@ fn test_iterator_chain_advance_by() { let mut iter = Unfuse::new(xs).chain(Unfuse::new(ys)); assert_eq!(iter.advance_by(xs.len() + i), Ok(())); assert_eq!(iter.next(), Some(&ys[i])); - assert_eq!( - iter.advance_by(100), - Err(NonZero::::new(100 - (ys.len() - i - 1)).unwrap()) - ); + assert_eq!(iter.advance_by(100), Err(NonZero::new(100 - (ys.len() - i - 1)).unwrap())); assert_eq!(iter.advance_by(0), Ok(())); } @@ -58,7 +52,7 @@ fn test_iterator_chain_advance_by() { assert_eq!(iter.advance_by(0), Ok(())); let mut iter = xs.iter().chain(ys); - assert_eq!(iter.advance_by(len + 1), Err(NonZero::::new(1).unwrap())); + assert_eq!(iter.advance_by(len + 1), Err(NonZero::new(1).unwrap())); assert_eq!(iter.advance_by(0), Ok(())); } @@ -77,10 +71,7 @@ fn test_iterator_chain_advance_back_by() { let mut iter = Unfuse::new(xs).chain(Unfuse::new(ys)); assert_eq!(iter.advance_back_by(i), Ok(())); assert_eq!(iter.next_back(), Some(&ys[ys.len() - i - 1])); - assert_eq!( - iter.advance_back_by(100), - Err(NonZero::::new(100 - (len - i - 1)).unwrap()) - ); + assert_eq!(iter.advance_back_by(100), Err(NonZero::new(100 - (len - i - 1)).unwrap())); assert_eq!(iter.advance_back_by(0), Ok(())); } @@ -90,7 +81,7 @@ fn test_iterator_chain_advance_back_by() { assert_eq!(iter.next_back(), Some(&xs[xs.len() - i - 1])); assert_eq!( iter.advance_back_by(100), - Err(NonZero::::new(100 - (xs.len() - i - 1)).unwrap()) + Err(NonZero::new(100 - (xs.len() - i - 1)).unwrap()) ); assert_eq!(iter.advance_back_by(0), Ok(())); } @@ -101,7 +92,7 @@ fn test_iterator_chain_advance_back_by() { assert_eq!(iter.advance_back_by(0), Ok(())); let mut iter = xs.iter().chain(ys); - assert_eq!(iter.advance_back_by(len + 1), Err(NonZero::::new(1).unwrap())); + assert_eq!(iter.advance_back_by(len + 1), Err(NonZero::new(1).unwrap())); assert_eq!(iter.advance_back_by(0), Ok(())); } diff --git a/library/core/tests/iter/adapters/enumerate.rs b/library/core/tests/iter/adapters/enumerate.rs index 5aa7532c10c..b57d51c077e 100644 --- a/library/core/tests/iter/adapters/enumerate.rs +++ b/library/core/tests/iter/adapters/enumerate.rs @@ -66,7 +66,7 @@ fn test_iterator_enumerate_advance_by() { assert_eq!(it.next(), Some((2, &2))); assert_eq!(it.advance_by(2), Ok(())); assert_eq!(it.next(), Some((5, &5))); - assert_eq!(it.advance_by(1), Err(NonZero::::new(1).unwrap())); + assert_eq!(it.advance_by(1), Err(NonZero::new(1).unwrap())); assert_eq!(it.next(), None); } diff --git a/library/core/tests/iter/adapters/flatten.rs b/library/core/tests/iter/adapters/flatten.rs index fb6383b3289..2af7e0c388a 100644 --- a/library/core/tests/iter/adapters/flatten.rs +++ b/library/core/tests/iter/adapters/flatten.rs @@ -72,8 +72,8 @@ fn test_flatten_advance_by() { assert_eq!(it.advance_back_by(9), Ok(())); assert_eq!(it.next_back(), Some(25)); - assert_eq!(it.advance_by(usize::MAX), Err(NonZero::::new(usize::MAX - 9).unwrap())); - assert_eq!(it.advance_back_by(usize::MAX), Err(NonZero::::new(usize::MAX).unwrap())); + assert_eq!(it.advance_by(usize::MAX), Err(NonZero::new(usize::MAX - 9).unwrap())); + assert_eq!(it.advance_back_by(usize::MAX), Err(NonZero::new(usize::MAX).unwrap())); assert_eq!(it.advance_by(0), Ok(())); assert_eq!(it.advance_back_by(0), Ok(())); assert_eq!(it.size_hint(), (0, Some(0))); diff --git a/library/core/tests/iter/adapters/skip.rs b/library/core/tests/iter/adapters/skip.rs index 45726d158b6..8d5d06ad9fb 100644 --- a/library/core/tests/iter/adapters/skip.rs +++ b/library/core/tests/iter/adapters/skip.rs @@ -75,14 +75,14 @@ fn test_iterator_skip_nth() { #[test] fn test_skip_advance_by() { assert_eq!((0..0).skip(10).advance_by(0), Ok(())); - assert_eq!((0..0).skip(10).advance_by(1), Err(NonZero::::new(1).unwrap())); + assert_eq!((0..0).skip(10).advance_by(1), Err(NonZero::new(1).unwrap())); assert_eq!( (0u128..(usize::MAX as u128) + 1).skip(usize::MAX - 10).advance_by(usize::MAX - 5), - Err(NonZero::::new(usize::MAX - 16).unwrap()) + Err(NonZero::new(usize::MAX - 16).unwrap()) ); assert_eq!((0u128..u128::MAX).skip(usize::MAX - 10).advance_by(20), Ok(())); - assert_eq!((0..2).skip(1).advance_back_by(10), Err(NonZero::::new(9).unwrap())); + assert_eq!((0..2).skip(1).advance_back_by(10), Err(NonZero::new(9).unwrap())); assert_eq!((0..0).skip(1).advance_back_by(0), Ok(())); } diff --git a/library/core/tests/iter/adapters/take.rs b/library/core/tests/iter/adapters/take.rs index 6aa1b929546..39afa2cbfca 100644 --- a/library/core/tests/iter/adapters/take.rs +++ b/library/core/tests/iter/adapters/take.rs @@ -79,23 +79,23 @@ fn test_take_advance_by() { let mut take = (0..10).take(3); assert_eq!(take.advance_by(2), Ok(())); assert_eq!(take.next(), Some(2)); - assert_eq!(take.advance_by(1), Err(NonZero::::new(1).unwrap())); + assert_eq!(take.advance_by(1), Err(NonZero::new(1).unwrap())); assert_eq!((0..0).take(10).advance_by(0), Ok(())); - assert_eq!((0..0).take(10).advance_by(1), Err(NonZero::::new(1).unwrap())); - assert_eq!((0..10).take(4).advance_by(5), Err(NonZero::::new(1).unwrap())); + assert_eq!((0..0).take(10).advance_by(1), Err(NonZero::new(1).unwrap())); + assert_eq!((0..10).take(4).advance_by(5), Err(NonZero::new(1).unwrap())); let mut take = (0..10).take(3); assert_eq!(take.advance_back_by(2), Ok(())); assert_eq!(take.next(), Some(0)); - assert_eq!(take.advance_back_by(1), Err(NonZero::::new(1).unwrap())); + assert_eq!(take.advance_back_by(1), Err(NonZero::new(1).unwrap())); - assert_eq!((0..2).take(1).advance_back_by(10), Err(NonZero::::new(9).unwrap())); - assert_eq!((0..0).take(1).advance_back_by(1), Err(NonZero::::new(1).unwrap())); + assert_eq!((0..2).take(1).advance_back_by(10), Err(NonZero::new(9).unwrap())); + assert_eq!((0..0).take(1).advance_back_by(1), Err(NonZero::new(1).unwrap())); assert_eq!((0..0).take(1).advance_back_by(0), Ok(())); assert_eq!( (0..usize::MAX).take(100).advance_back_by(usize::MAX), - Err(NonZero::::new(usize::MAX - 100).unwrap()) + Err(NonZero::new(usize::MAX - 100).unwrap()) ); } diff --git a/library/core/tests/iter/range.rs b/library/core/tests/iter/range.rs index f840218382d..9af07119a89 100644 --- a/library/core/tests/iter/range.rs +++ b/library/core/tests/iter/range.rs @@ -314,7 +314,7 @@ fn test_range_advance_by() { assert_eq!((r.start, r.end), (1, usize::MAX - 1)); - assert_eq!(Err(NonZero::::new(2).unwrap()), r.advance_by(usize::MAX)); + assert_eq!(Err(NonZero::new(2).unwrap()), r.advance_by(usize::MAX)); assert_eq!(Ok(()), r.advance_by(0)); assert_eq!(Ok(()), r.advance_back_by(0)); diff --git a/library/core/tests/iter/traits/iterator.rs b/library/core/tests/iter/traits/iterator.rs index 507f15c6088..93ef9c0812b 100644 --- a/library/core/tests/iter/traits/iterator.rs +++ b/library/core/tests/iter/traits/iterator.rs @@ -152,14 +152,11 @@ fn test_iterator_advance_by() { let mut iter = v.iter(); assert_eq!(iter.advance_by(i), Ok(())); assert_eq!(iter.next().unwrap(), &v[i]); - assert_eq!( - iter.advance_by(100), - Err(NonZero::::new(100 - (v.len() - 1 - i)).unwrap()) - ); + assert_eq!(iter.advance_by(100), Err(NonZero::new(100 - (v.len() - 1 - i)).unwrap())); } assert_eq!(v.iter().advance_by(v.len()), Ok(())); - assert_eq!(v.iter().advance_by(100), Err(NonZero::::new(100 - v.len()).unwrap())); + assert_eq!(v.iter().advance_by(100), Err(NonZero::new(100 - v.len()).unwrap())); } #[test] @@ -170,14 +167,11 @@ fn test_iterator_advance_back_by() { let mut iter = v.iter(); assert_eq!(iter.advance_back_by(i), Ok(())); assert_eq!(iter.next_back().unwrap(), &v[v.len() - 1 - i]); - assert_eq!( - iter.advance_back_by(100), - Err(NonZero::::new(100 - (v.len() - 1 - i)).unwrap()) - ); + assert_eq!(iter.advance_back_by(100), Err(NonZero::new(100 - (v.len() - 1 - i)).unwrap())); } assert_eq!(v.iter().advance_back_by(v.len()), Ok(())); - assert_eq!(v.iter().advance_back_by(100), Err(NonZero::::new(100 - v.len()).unwrap())); + assert_eq!(v.iter().advance_back_by(100), Err(NonZero::new(100 - v.len()).unwrap())); } #[test] @@ -188,17 +182,11 @@ fn test_iterator_rev_advance_back_by() { let mut iter = v.iter().rev(); assert_eq!(iter.advance_back_by(i), Ok(())); assert_eq!(iter.next_back().unwrap(), &v[i]); - assert_eq!( - iter.advance_back_by(100), - Err(NonZero::::new(100 - (v.len() - 1 - i)).unwrap()) - ); + assert_eq!(iter.advance_back_by(100), Err(NonZero::new(100 - (v.len() - 1 - i)).unwrap())); } assert_eq!(v.iter().rev().advance_back_by(v.len()), Ok(())); - assert_eq!( - v.iter().rev().advance_back_by(100), - Err(NonZero::::new(100 - v.len()).unwrap()) - ); + assert_eq!(v.iter().rev().advance_back_by(100), Err(NonZero::new(100 - v.len()).unwrap())); } #[test] @@ -466,14 +454,11 @@ fn test_iterator_rev_advance_by() { let mut iter = v.iter().rev(); assert_eq!(iter.advance_by(i), Ok(())); assert_eq!(iter.next().unwrap(), &v[v.len() - 1 - i]); - assert_eq!( - iter.advance_by(100), - Err(NonZero::::new(100 - (v.len() - 1 - i)).unwrap()) - ); + assert_eq!(iter.advance_by(100), Err(NonZero::new(100 - (v.len() - 1 - i)).unwrap())); } assert_eq!(v.iter().rev().advance_by(v.len()), Ok(())); - assert_eq!(v.iter().rev().advance_by(100), Err(NonZero::::new(100 - v.len()).unwrap())); + assert_eq!(v.iter().rev().advance_by(100), Err(NonZero::new(100 - v.len()).unwrap())); } #[test] diff --git a/library/core/tests/nonzero.rs b/library/core/tests/nonzero.rs index 69dbe5d7dea..d728513a4e2 100644 --- a/library/core/tests/nonzero.rs +++ b/library/core/tests/nonzero.rs @@ -4,7 +4,7 @@ use std::mem::size_of; #[test] fn test_create_nonzero_instance() { - let _a = unsafe { NonZero::::new_unchecked(21) }; + let _a = unsafe { NonZero::new_unchecked(21) }; } #[test] @@ -18,12 +18,12 @@ fn test_match_on_nonzero_option() { let a = Some(unsafe { NonZero::::new_unchecked(42) }); match a { Some(val) => assert_eq!(val.get(), 42), - None => panic!("unexpected None while matching on Some(NonZeroU32(_))"), + None => panic!("unexpected None while matching on Some(NonZero(_))"), } match unsafe { Some(NonZero::::new_unchecked(43)) } { Some(val) => assert_eq!(val.get(), 43), - None => panic!("unexpected None while matching on Some(NonZeroU32(_))"), + None => panic!("unexpected None while matching on Some(NonZero(_))"), } } @@ -93,7 +93,7 @@ mod atom { index: NonZero, // private } - pub const FOO_ATOM: Atom = Atom { index: unsafe { NonZero::::new_unchecked(7) } }; + pub const FOO_ATOM: Atom = Atom { index: unsafe { NonZero::new_unchecked(7) } }; } macro_rules! atom { @@ -113,21 +113,21 @@ fn test_match_nonzero_const_pattern() { #[test] fn test_from_nonzero() { - let nz = NonZero::::new(1).unwrap(); + let nz = NonZero::new(1).unwrap(); let num: u32 = nz.into(); assert_eq!(num, 1u32); } #[test] fn test_from_signed_nonzero() { - let nz = NonZero::::new(1).unwrap(); + let nz = NonZero::new(1).unwrap(); let num: i32 = nz.into(); assert_eq!(num, 1i32); } #[test] fn test_from_str() { - assert_eq!("123".parse::>(), Ok(NonZero::::new(123).unwrap())); + assert_eq!("123".parse::>(), Ok(NonZero::new(123).unwrap())); assert_eq!( "0".parse::>().err().map(|e| e.kind().clone()), Some(IntErrorKind::Zero) @@ -148,8 +148,8 @@ fn test_from_str() { #[test] fn test_nonzero_bitor() { - let nz_alt = NonZero::::new(0b1010_1010).unwrap(); - let nz_low = NonZero::::new(0b0000_1111).unwrap(); + let nz_alt = NonZero::new(0b1010_1010).unwrap(); + let nz_low = NonZero::new(0b0000_1111).unwrap(); let both_nz: NonZero = nz_alt | nz_low; assert_eq!(both_nz.get(), 0b1010_1111); @@ -171,7 +171,7 @@ fn test_nonzero_bitor() { fn test_nonzero_bitor_assign() { let mut target = NonZero::::new(0b1010_1010).unwrap(); - target |= NonZero::::new(0b0000_1111).unwrap(); + target |= NonZero::new(0b0000_1111).unwrap(); assert_eq!(target.get(), 0b1010_1111); target |= 0b0001_0000; @@ -183,11 +183,11 @@ fn test_nonzero_bitor_assign() { #[test] fn test_nonzero_from_int_on_success() { - assert_eq!(NonZero::::try_from(5), Ok(NonZero::::new(5).unwrap())); - assert_eq!(NonZero::::try_from(5), Ok(NonZero::::new(5).unwrap())); + assert_eq!(NonZero::::try_from(5), Ok(NonZero::new(5).unwrap())); + assert_eq!(NonZero::::try_from(5), Ok(NonZero::new(5).unwrap())); - assert_eq!(NonZero::::try_from(-5), Ok(NonZero::::new(-5).unwrap())); - assert_eq!(NonZero::::try_from(-5), Ok(NonZero::::new(-5).unwrap())); + assert_eq!(NonZero::::try_from(-5), Ok(NonZero::new(-5).unwrap())); + assert_eq!(NonZero::::try_from(-5), Ok(NonZero::new(-5).unwrap())); } #[test] @@ -204,15 +204,15 @@ fn nonzero_const() { // test that the methods of `NonZeroX>` are usable in a const context // Note: only tests NonZero - const NONZERO_U8: NonZero = unsafe { NonZero::::new_unchecked(5) }; + const NONZERO_U8: NonZero = unsafe { NonZero::new_unchecked(5) }; const GET: u8 = NONZERO_U8.get(); assert_eq!(GET, 5); - const ZERO: Option> = NonZero::::new(0); + const ZERO: Option> = NonZero::new(0); assert!(ZERO.is_none()); - const ONE: Option> = NonZero::::new(1); + const ONE: Option> = NonZero::new(1); assert!(ONE.is_some()); /* FIXME(#110395) @@ -323,7 +323,7 @@ fn nonzero_trailing_zeros() { #[test] fn test_nonzero_uint_div() { - let nz = NonZero::::new(1).unwrap(); + let nz = NonZero::new(1).unwrap(); let x: u32 = 42u32 / nz; assert_eq!(x, 42u32); @@ -331,7 +331,7 @@ fn test_nonzero_uint_div() { #[test] fn test_nonzero_uint_rem() { - let nz = NonZero::::new(10).unwrap(); + let nz = NonZero::new(10).unwrap(); let x: u32 = 42u32 % nz; assert_eq!(x, 2u32); diff --git a/library/core/tests/ptr.rs b/library/core/tests/ptr.rs index 8a0cf90d799..b3f7dfa1fb9 100644 --- a/library/core/tests/ptr.rs +++ b/library/core/tests/ptr.rs @@ -1050,9 +1050,8 @@ fn nonnull_tagged_pointer_with_provenance() { /// memory location. pub fn pointer(self) -> NonNull { // SAFETY: The `addr` guaranteed to have bits set in the Self::ADDRESS_MASK, so the result will be non-null. - self.0.map_addr(|addr| unsafe { - NonZero::::new_unchecked(addr.get() & Self::ADDRESS_MASK) - }) + self.0 + .map_addr(|addr| unsafe { NonZero::new_unchecked(addr.get() & Self::ADDRESS_MASK) }) } /// Consume this tagged pointer and produce the data it carries. @@ -1073,7 +1072,7 @@ fn nonnull_tagged_pointer_with_provenance() { // ADDRESS_MASK) will always be non-zero. This a property of the type and its // construction. self.0 = self.0.map_addr(|addr| unsafe { - NonZero::::new_unchecked((addr.get() & Self::ADDRESS_MASK) | data) + NonZero::new_unchecked((addr.get() & Self::ADDRESS_MASK) | data) }) } } diff --git a/library/core/tests/result.rs b/library/core/tests/result.rs index 758203408a8..6c008ab2cb1 100644 --- a/library/core/tests/result.rs +++ b/library/core/tests/result.rs @@ -411,7 +411,7 @@ fn result_try_trait_v2_branch() { assert_eq!(Ok::(4).branch(), Continue(4)); assert_eq!(Err::(4).branch(), Break(Err(4))); - let one = NonZero::::new(1).unwrap(); + let one = NonZero::new(1).unwrap(); assert_eq!(Ok::<(), NonZero>(()).branch(), Continue(())); assert_eq!(Err::<(), NonZero>(one).branch(), Break(Err(one))); assert_eq!(Ok::, ()>(one).branch(), Continue(one)); diff --git a/library/core/tests/slice.rs b/library/core/tests/slice.rs index bb2c17a479e..c5743eda3e8 100644 --- a/library/core/tests/slice.rs +++ b/library/core/tests/slice.rs @@ -147,7 +147,7 @@ fn test_iterator_advance_by() { } let mut iter = v.iter(); - assert_eq!(iter.advance_by(v.len() + 1), Err(NonZero::::new(1).unwrap())); + assert_eq!(iter.advance_by(v.len() + 1), Err(NonZero::new(1).unwrap())); assert_eq!(iter.as_slice(), &[]); let mut iter = v.iter(); @@ -169,7 +169,7 @@ fn test_iterator_advance_back_by() { } let mut iter = v.iter(); - assert_eq!(iter.advance_back_by(v.len() + 1), Err(NonZero::::new(1).unwrap())); + assert_eq!(iter.advance_back_by(v.len() + 1), Err(NonZero::new(1).unwrap())); assert_eq!(iter.as_slice(), &[]); let mut iter = v.iter(); diff --git a/library/proc_macro/src/bridge/symbol.rs b/library/proc_macro/src/bridge/symbol.rs index ae3c0fe018f..712f6b45458 100644 --- a/library/proc_macro/src/bridge/symbol.rs +++ b/library/proc_macro/src/bridge/symbol.rs @@ -137,7 +137,7 @@ thread_local! { names: fxhash::FxHashMap::default(), strings: Vec::new(), // Start with a base of 1 to make sure that `NonZeroU32` works. - sym_base: NonZero::::new(1).unwrap(), + sym_base: NonZero::new(1).unwrap(), }); } diff --git a/library/std/src/sys/pal/hermit/thread.rs b/library/std/src/sys/pal/hermit/thread.rs index 789de7f41ff..fee80c02d4a 100644 --- a/library/std/src/sys/pal/hermit/thread.rs +++ b/library/std/src/sys/pal/hermit/thread.rs @@ -98,7 +98,7 @@ impl Thread { } pub fn available_parallelism() -> io::Result> { - unsafe { Ok(NonZero::::new_unchecked(abi::get_processor_count())) } + unsafe { Ok(NonZero::new_unchecked(abi::get_processor_count())) } } pub mod guard { diff --git a/library/std/src/sys/pal/sgx/abi/tls/mod.rs b/library/std/src/sys/pal/sgx/abi/tls/mod.rs index 5ee1621420e..6762a43b483 100644 --- a/library/std/src/sys/pal/sgx/abi/tls/mod.rs +++ b/library/std/src/sys/pal/sgx/abi/tls/mod.rs @@ -38,7 +38,7 @@ impl Key { } fn from_index(index: usize) -> Self { - Key(NonZero::::new(index + 1).unwrap()) + Key(NonZero::new(index + 1).unwrap()) } pub fn as_usize(self) -> usize { @@ -46,7 +46,7 @@ impl Key { } pub fn from_usize(index: usize) -> Self { - Key(NonZero::::new(index).unwrap()) + Key(NonZero::new(index).unwrap()) } } diff --git a/library/std/src/sys/pal/sgx/abi/usercalls/raw.rs b/library/std/src/sys/pal/sgx/abi/usercalls/raw.rs index 4f52bb474b1..943b771498f 100644 --- a/library/std/src/sys/pal/sgx/abi/usercalls/raw.rs +++ b/library/std/src/sys/pal/sgx/abi/usercalls/raw.rs @@ -195,7 +195,7 @@ macro_rules! enclave_usercalls_internal_define_usercalls { #[inline(always)] pub unsafe fn $f($n1: $t1, $n2: $t2, $n3: $t3, $n4: $t4) -> $r { ReturnValue::from_registers(stringify!($f), unsafe { do_usercall( - rtunwrap!(Some, NonZero::::new(Usercalls::$f as Register)), + rtunwrap!(Some, NonZero::new(Usercalls::$f as Register)), RegisterArgument::into_register($n1), RegisterArgument::into_register($n2), RegisterArgument::into_register($n3), @@ -211,7 +211,7 @@ macro_rules! enclave_usercalls_internal_define_usercalls { #[inline(always)] pub unsafe fn $f($n1: $t1, $n2: $t2, $n3: $t3) -> $r { ReturnValue::from_registers(stringify!($f), unsafe { do_usercall( - rtunwrap!(Some, NonZero::::new(Usercalls::$f as Register)), + rtunwrap!(Some, NonZero::new(Usercalls::$f as Register)), RegisterArgument::into_register($n1), RegisterArgument::into_register($n2), RegisterArgument::into_register($n3), @@ -227,7 +227,7 @@ macro_rules! enclave_usercalls_internal_define_usercalls { #[inline(always)] pub unsafe fn $f($n1: $t1, $n2: $t2) -> $r { ReturnValue::from_registers(stringify!($f), unsafe { do_usercall( - rtunwrap!(Some, NonZero::::new(Usercalls::$f as Register)), + rtunwrap!(Some, NonZero::new(Usercalls::$f as Register)), RegisterArgument::into_register($n1), RegisterArgument::into_register($n2), 0,0, @@ -242,7 +242,7 @@ macro_rules! enclave_usercalls_internal_define_usercalls { #[inline(always)] pub unsafe fn $f($n1: $t1) -> $r { ReturnValue::from_registers(stringify!($f), unsafe { do_usercall( - rtunwrap!(Some, NonZero::::new(Usercalls::$f as Register)), + rtunwrap!(Some, NonZero::new(Usercalls::$f as Register)), RegisterArgument::into_register($n1), 0,0,0, return_type_is_abort!($r) @@ -256,7 +256,7 @@ macro_rules! enclave_usercalls_internal_define_usercalls { #[inline(always)] pub unsafe fn $f() -> $r { ReturnValue::from_registers(stringify!($f), unsafe { do_usercall( - rtunwrap!(Some, NonZero::::new(Usercalls::$f as Register)), + rtunwrap!(Some, NonZero::new(Usercalls::$f as Register)), 0,0,0,0, return_type_is_abort!($r) ) }) diff --git a/library/std/src/sys/pal/sgx/rwlock.rs b/library/std/src/sys/pal/sgx/rwlock.rs index 87bebac37da..ebae1cff0ee 100644 --- a/library/std/src/sys/pal/sgx/rwlock.rs +++ b/library/std/src/sys/pal/sgx/rwlock.rs @@ -53,8 +53,7 @@ impl RwLock { // Another thread has passed the lock to us } else { // No waiting writers, acquire the read lock - *rguard.lock_var_mut() = - NonZero::::new(rguard.lock_var().map_or(0, |n| n.get()) + 1); + *rguard.lock_var_mut() = NonZero::new(rguard.lock_var().map_or(0, |n| n.get()) + 1); } } @@ -68,8 +67,7 @@ impl RwLock { false } else { // No waiting writers, acquire the read lock - *rguard.lock_var_mut() = - NonZero::::new(rguard.lock_var().map_or(0, |n| n.get()) + 1); + *rguard.lock_var_mut() = NonZero::new(rguard.lock_var().map_or(0, |n| n.get()) + 1); true } } @@ -111,7 +109,7 @@ impl RwLock { mut rguard: SpinMutexGuard<'_, WaitVariable>>>, wguard: SpinMutexGuard<'_, WaitVariable>, ) { - *rguard.lock_var_mut() = NonZero::::new(rguard.lock_var().unwrap().get() - 1); + *rguard.lock_var_mut() = NonZero::new(rguard.lock_var().unwrap().get() - 1); if rguard.lock_var().is_some() { // There are other active readers } else { diff --git a/library/std/src/sys/pal/sgx/waitqueue/mod.rs b/library/std/src/sys/pal/sgx/waitqueue/mod.rs index 92ffec8d0b7..2d952b7ebbc 100644 --- a/library/std/src/sys/pal/sgx/waitqueue/mod.rs +++ b/library/std/src/sys/pal/sgx/waitqueue/mod.rs @@ -252,7 +252,7 @@ impl WaitQueue { entry_guard.wake = true; } - if let Some(count) = NonZero::::new(count) { + if let Some(count) = NonZero::new(count) { Ok(WaitGuard { mutex_guard: Some(guard), notified_tcs: NotifiedTcs::All { count } }) } else { Err(guard) diff --git a/library/std/src/sys/pal/uefi/thread.rs b/library/std/src/sys/pal/uefi/thread.rs index f6f5b20a421..3d8fa27251f 100644 --- a/library/std/src/sys/pal/uefi/thread.rs +++ b/library/std/src/sys/pal/uefi/thread.rs @@ -46,7 +46,7 @@ impl Thread { pub fn available_parallelism() -> io::Result> { // UEFI is single threaded - Ok(NonZero::::new(1).unwrap()) + Ok(NonZero::new(1).unwrap()) } pub mod guard { diff --git a/library/std/src/sys/pal/unix/thread.rs b/library/std/src/sys/pal/unix/thread.rs index dd3c370667a..767f269dbea 100644 --- a/library/std/src/sys/pal/unix/thread.rs +++ b/library/std/src/sys/pal/unix/thread.rs @@ -338,7 +338,7 @@ pub fn available_parallelism() -> io::Result> { // some old MIPS kernels were buggy and zero-initialized the mask if // none was explicitly set. // In that case we use the sysconf fallback. - if let Some(count) = NonZero::::new(count) { + if let Some(count) = NonZero::new(count) { return Ok(count) } } @@ -351,7 +351,7 @@ pub fn available_parallelism() -> io::Result> { let count = cpus as usize; // Cover the unusual situation where we were able to get the quota but not the affinity mask let count = count.min(quota); - Ok(unsafe { NonZero::::new_unchecked(count) }) + Ok(unsafe { NonZero::new_unchecked(count) }) } } } else if #[cfg(any( @@ -375,7 +375,7 @@ pub fn available_parallelism() -> io::Result> { ) == 0 { let count = libc::CPU_COUNT(&set) as usize; if count > 0 { - return Ok(NonZero::::new_unchecked(count)); + return Ok(NonZero::new_unchecked(count)); } } } @@ -397,7 +397,7 @@ pub fn available_parallelism() -> io::Result> { } } libc::_cpuset_destroy(set); - if let Some(count) = NonZero::::new(count) { + if let Some(count) = NonZero::new(count) { return Ok(count); } } @@ -433,7 +433,7 @@ pub fn available_parallelism() -> io::Result> { } } - Ok(unsafe { NonZero::::new_unchecked(cpus as usize) }) + Ok(unsafe { NonZero::new_unchecked(cpus as usize) }) } else if #[cfg(target_os = "nto")] { unsafe { use libc::_syspage_ptr; @@ -441,7 +441,7 @@ pub fn available_parallelism() -> io::Result> { Err(io::const_io_error!(io::ErrorKind::NotFound, "No syspage available")) } else { let cpus = (*_syspage_ptr).num_cpu; - NonZero::::new(cpus as usize) + NonZero::new(cpus as usize) .ok_or(io::const_io_error!(io::ErrorKind::NotFound, "The number of hardware threads is not known for the target platform")) } } @@ -456,7 +456,7 @@ pub fn available_parallelism() -> io::Result> { return Err(io::const_io_error!(io::ErrorKind::NotFound, "The number of hardware threads is not known for the target platform")); } - Ok(NonZero::::new_unchecked(sinfo.cpu_count as usize)) + Ok(NonZero::new_unchecked(sinfo.cpu_count as usize)) } } else { // FIXME: implement on vxWorks, Redox, l4re diff --git a/library/std/src/sys/pal/windows/args.rs b/library/std/src/sys/pal/windows/args.rs index c3a4d470699..2ecfe088d10 100644 --- a/library/std/src/sys/pal/windows/args.rs +++ b/library/std/src/sys/pal/windows/args.rs @@ -21,12 +21,12 @@ use crate::vec; use crate::iter; -/// This is the const equivalent to `NonZero::::new(n).unwrap()` +/// This is the const equivalent to `NonZero::new(n).unwrap()` /// /// FIXME: This can be removed once `Option::unwrap` is stably const. /// See the `const_option` feature (#67441). const fn non_zero_u16(n: u16) -> NonZero { - match NonZero::::new(n) { + match NonZero::new(n) { Some(n) => n, None => panic!("called `unwrap` on a `None` value"), } diff --git a/library/std/src/sys/pal/windows/thread.rs b/library/std/src/sys/pal/windows/thread.rs index 4f189944fb2..0f709e2ec7b 100644 --- a/library/std/src/sys/pal/windows/thread.rs +++ b/library/std/src/sys/pal/windows/thread.rs @@ -121,7 +121,7 @@ pub fn available_parallelism() -> io::Result> { io::ErrorKind::NotFound, "The number of hardware threads is not known for the target platform", )), - cpus => Ok(unsafe { NonZero::::new_unchecked(cpus) }), + cpus => Ok(unsafe { NonZero::new_unchecked(cpus) }), } } diff --git a/library/std/src/sys/pal/xous/thread.rs b/library/std/src/sys/pal/xous/thread.rs index 2cc15856501..21f5954d6e2 100644 --- a/library/std/src/sys/pal/xous/thread.rs +++ b/library/std/src/sys/pal/xous/thread.rs @@ -134,7 +134,7 @@ impl Thread { pub fn available_parallelism() -> io::Result> { // We're unicore right now. - Ok(unsafe { NonZero::::new_unchecked(1) }) + Ok(unsafe { NonZero::new_unchecked(1) }) } pub mod guard { diff --git a/library/std/src/sys_common/wstr.rs b/library/std/src/sys_common/wstr.rs index 601ef3dd150..8eae1606485 100644 --- a/library/std/src/sys_common/wstr.rs +++ b/library/std/src/sys_common/wstr.rs @@ -26,7 +26,7 @@ impl WStrUnits<'_> { pub fn peek(&self) -> Option> { // SAFETY: It's always safe to read the current item because we don't // ever move out of the array's bounds. - unsafe { NonZero::::new(*self.lpwstr.as_ptr()) } + unsafe { NonZero::new(*self.lpwstr.as_ptr()) } } /// Advance the iterator while `predicate` returns true. diff --git a/library/std/src/thread/mod.rs b/library/std/src/thread/mod.rs index 0da3da23568..4f0f010984a 100644 --- a/library/std/src/thread/mod.rs +++ b/library/std/src/thread/mod.rs @@ -1188,7 +1188,7 @@ impl ThreadId { }; match COUNTER.compare_exchange_weak(last, id, Relaxed, Relaxed) { - Ok(_) => return ThreadId(NonZero::::new(id).unwrap()), + Ok(_) => return ThreadId(NonZero::new(id).unwrap()), Err(id) => last = id, } } @@ -1207,7 +1207,7 @@ impl ThreadId { *counter = id; drop(counter); - ThreadId(NonZero::::new(id).unwrap()) + ThreadId(NonZero::new(id).unwrap()) } } } diff --git a/src/tools/miri/src/borrow_tracker/mod.rs b/src/tools/miri/src/borrow_tracker/mod.rs index 4424595ea1c..45240edea45 100644 --- a/src/tools/miri/src/borrow_tracker/mod.rs +++ b/src/tools/miri/src/borrow_tracker/mod.rs @@ -21,7 +21,7 @@ pub struct BorTag(NonZero); impl BorTag { pub fn new(i: u64) -> Option { - NonZero::::new(i).map(BorTag) + NonZero::new(i).map(BorTag) } pub fn get(&self) -> u64 { @@ -184,7 +184,7 @@ impl GlobalStateInner { borrow_tracker_method, next_ptr_tag: BorTag::one(), base_ptr_tags: FxHashMap::default(), - next_call_id: NonZero::::new(1).unwrap(), + next_call_id: NonZero::new(1).unwrap(), protected_tags: FxHashMap::default(), tracked_pointer_tags, tracked_call_ids, @@ -206,7 +206,7 @@ impl GlobalStateInner { if self.tracked_call_ids.contains(&call_id) { machine.emit_diagnostic(NonHaltingDiagnostic::CreatedCallId(call_id)); } - self.next_call_id = NonZero::::new(call_id.get() + 1).unwrap(); + self.next_call_id = NonZero::new(call_id.get() + 1).unwrap(); FrameState { call_id, protected_tags: SmallVec::new() } } diff --git a/src/tools/miri/src/concurrency/sync.rs b/src/tools/miri/src/concurrency/sync.rs index c3130c8a8f0..b948ecb8345 100644 --- a/src/tools/miri/src/concurrency/sync.rs +++ b/src/tools/miri/src/concurrency/sync.rs @@ -30,7 +30,7 @@ macro_rules! declare_id { impl SyncId for $name { // Panics if `id == 0`. fn from_u32(id: u32) -> Self { - Self(std::num::NonZero::::new(id).unwrap()) + Self(std::num::NonZero::new(id).unwrap()) } fn to_u32(&self) -> u32 { self.0.get() @@ -43,7 +43,7 @@ macro_rules! declare_id { // therefore, need to shift by one when converting from an index // into a vector. let shifted_idx = u32::try_from(idx).unwrap().checked_add(1).unwrap(); - $name(std::num::NonZero::::new(shifted_idx).unwrap()) + $name(std::num::NonZero::new(shifted_idx).unwrap()) } fn index(self) -> usize { // See the comment in `Self::new`. diff --git a/src/tools/miri/src/shims/foreign_items.rs b/src/tools/miri/src/shims/foreign_items.rs index f0e6e0374d2..bf90d1468bb 100644 --- a/src/tools/miri/src/shims/foreign_items.rs +++ b/src/tools/miri/src/shims/foreign_items.rs @@ -477,7 +477,7 @@ trait EvalContextExtPriv<'mir, 'tcx: 'mir>: crate::MiriInterpCxExt<'mir, 'tcx> { let [id, show_unnamed] = this.check_shim(abi, Abi::Rust, link_name, args)?; let id = this.read_scalar(id)?.to_u64()?; let show_unnamed = this.read_scalar(show_unnamed)?.to_bool()?; - if let Some(id) = std::num::NonZero::::new(id) { + if let Some(id) = std::num::NonZero::new(id) { this.print_borrow_state(AllocId(id), show_unnamed)?; } } -- cgit 1.4.1-3-g733a5 From 0702701297d5ec7b49dd2debbd777531676c48e2 Mon Sep 17 00:00:00 2001 From: Ralf Jung Date: Fri, 16 Feb 2024 09:58:53 +0100 Subject: allow mutable references in const values when they point to no memory --- compiler/rustc_const_eval/messages.ftl | 2 +- compiler/rustc_const_eval/src/errors.rs | 24 +++--- .../rustc_const_eval/src/interpret/validity.rs | 85 ++++++++++------------ compiler/rustc_middle/src/mir/interpret/error.rs | 9 ++- tests/ui/consts/const-mut-refs/const_mut_refs.rs | 6 ++ .../mut_ref_in_final_dynamic_check.32bit.stderr | 17 +++-- .../mut_ref_in_final_dynamic_check.64bit.stderr | 17 +++-- .../mut_ref_in_final_dynamic_check.rs | 17 ++--- 8 files changed, 93 insertions(+), 84 deletions(-) diff --git a/compiler/rustc_const_eval/messages.ftl b/compiler/rustc_const_eval/messages.ftl index 4a6d4fe930c..c456e40d7c1 100644 --- a/compiler/rustc_const_eval/messages.ftl +++ b/compiler/rustc_const_eval/messages.ftl @@ -453,7 +453,7 @@ const_eval_validation_invalid_fn_ptr = {$front_matter}: encountered {$value}, bu const_eval_validation_invalid_ref_meta = {$front_matter}: encountered invalid reference metadata: total size is bigger than largest supported object const_eval_validation_invalid_ref_slice_meta = {$front_matter}: encountered invalid reference metadata: slice is bigger than largest supported object const_eval_validation_invalid_vtable_ptr = {$front_matter}: encountered {$value}, but expected a vtable pointer -const_eval_validation_mutable_ref_in_const = {$front_matter}: encountered mutable reference in a `const` or `static` +const_eval_validation_mutable_ref_in_const_or_static = {$front_matter}: encountered mutable reference in a `const` or `static` const_eval_validation_mutable_ref_to_immutable = {$front_matter}: encountered mutable reference or box pointing to read-only memory const_eval_validation_never_val = {$front_matter}: encountered a value of the never type `!` const_eval_validation_null_box = {$front_matter}: encountered a null box diff --git a/compiler/rustc_const_eval/src/errors.rs b/compiler/rustc_const_eval/src/errors.rs index 11679ab77e3..2fd34b3c7fc 100644 --- a/compiler/rustc_const_eval/src/errors.rs +++ b/compiler/rustc_const_eval/src/errors.rs @@ -603,18 +603,18 @@ impl<'tcx> ReportErrorExt for ValidationErrorInfo<'tcx> { PtrToUninhabited { ptr_kind: PointerKind::Box, .. } => { const_eval_validation_box_to_uninhabited } - PtrToUninhabited { ptr_kind: PointerKind::Ref, .. } => { + PtrToUninhabited { ptr_kind: PointerKind::Ref(_), .. } => { const_eval_validation_ref_to_uninhabited } PtrToStatic { ptr_kind: PointerKind::Box } => const_eval_validation_box_to_static, - PtrToStatic { ptr_kind: PointerKind::Ref } => const_eval_validation_ref_to_static, + PtrToStatic { ptr_kind: PointerKind::Ref(_) } => const_eval_validation_ref_to_static, PointerAsInt { .. } => const_eval_validation_pointer_as_int, PartialPointer => const_eval_validation_partial_pointer, ConstRefToMutable => const_eval_validation_const_ref_to_mutable, ConstRefToExtern => const_eval_validation_const_ref_to_extern, - MutableRefInConst => const_eval_validation_mutable_ref_in_const, + MutableRefInConstOrStatic => const_eval_validation_mutable_ref_in_const_or_static, MutableRefToImmutable => const_eval_validation_mutable_ref_to_immutable, NullFnPtr => const_eval_validation_null_fn_ptr, NeverVal => const_eval_validation_never_val, @@ -630,37 +630,39 @@ impl<'tcx> ReportErrorExt for ValidationErrorInfo<'tcx> { InvalidMetaSliceTooLarge { ptr_kind: PointerKind::Box } => { const_eval_validation_invalid_box_slice_meta } - InvalidMetaSliceTooLarge { ptr_kind: PointerKind::Ref } => { + InvalidMetaSliceTooLarge { ptr_kind: PointerKind::Ref(_) } => { const_eval_validation_invalid_ref_slice_meta } InvalidMetaTooLarge { ptr_kind: PointerKind::Box } => { const_eval_validation_invalid_box_meta } - InvalidMetaTooLarge { ptr_kind: PointerKind::Ref } => { + InvalidMetaTooLarge { ptr_kind: PointerKind::Ref(_) } => { const_eval_validation_invalid_ref_meta } - UnalignedPtr { ptr_kind: PointerKind::Ref, .. } => const_eval_validation_unaligned_ref, + UnalignedPtr { ptr_kind: PointerKind::Ref(_), .. } => { + const_eval_validation_unaligned_ref + } UnalignedPtr { ptr_kind: PointerKind::Box, .. } => const_eval_validation_unaligned_box, NullPtr { ptr_kind: PointerKind::Box } => const_eval_validation_null_box, - NullPtr { ptr_kind: PointerKind::Ref } => const_eval_validation_null_ref, + NullPtr { ptr_kind: PointerKind::Ref(_) } => const_eval_validation_null_ref, DanglingPtrNoProvenance { ptr_kind: PointerKind::Box, .. } => { const_eval_validation_dangling_box_no_provenance } - DanglingPtrNoProvenance { ptr_kind: PointerKind::Ref, .. } => { + DanglingPtrNoProvenance { ptr_kind: PointerKind::Ref(_), .. } => { const_eval_validation_dangling_ref_no_provenance } DanglingPtrOutOfBounds { ptr_kind: PointerKind::Box } => { const_eval_validation_dangling_box_out_of_bounds } - DanglingPtrOutOfBounds { ptr_kind: PointerKind::Ref } => { + DanglingPtrOutOfBounds { ptr_kind: PointerKind::Ref(_) } => { const_eval_validation_dangling_ref_out_of_bounds } DanglingPtrUseAfterFree { ptr_kind: PointerKind::Box } => { const_eval_validation_dangling_box_use_after_free } - DanglingPtrUseAfterFree { ptr_kind: PointerKind::Ref } => { + DanglingPtrUseAfterFree { ptr_kind: PointerKind::Ref(_) } => { const_eval_validation_dangling_ref_use_after_free } InvalidBool { .. } => const_eval_validation_invalid_bool, @@ -766,7 +768,7 @@ impl<'tcx> ReportErrorExt for ValidationErrorInfo<'tcx> { } NullPtr { .. } | PtrToStatic { .. } - | MutableRefInConst + | MutableRefInConstOrStatic | ConstRefToMutable | ConstRefToExtern | MutableRefToImmutable diff --git a/compiler/rustc_const_eval/src/interpret/validity.rs b/compiler/rustc_const_eval/src/interpret/validity.rs index 08a2e38bfa1..460a7d2407b 100644 --- a/compiler/rustc_const_eval/src/interpret/validity.rs +++ b/compiler/rustc_const_eval/src/interpret/validity.rs @@ -445,22 +445,22 @@ impl<'rt, 'mir, 'tcx: 'mir, M: Machine<'mir, 'tcx>> ValidityVisitor<'rt, 'mir, ' // Determine whether this pointer expects to be pointing to something mutable. let ptr_expected_mutbl = match ptr_kind { PointerKind::Box => Mutability::Mut, - PointerKind::Ref => { - let tam = value.layout.ty.builtin_deref(false).unwrap(); - // ZST never require mutability. We do not take into account interior mutability - // here since we cannot know if there really is an `UnsafeCell` inside - // `Option` -- so we check that in the recursive descent behind this - // reference. - if size == Size::ZERO { Mutability::Not } else { tam.mutbl } + PointerKind::Ref(mutbl) => { + // We do not take into account interior mutability here since we cannot know if + // there really is an `UnsafeCell` inside `Option` -- so we check + // that in the recursive descent behind this reference (controlled by + // `allow_immutable_unsafe_cell`). + mutbl } }; // Proceed recursively even for ZST, no reason to skip them! // `!` is a ZST and we want to validate it. if let Ok((alloc_id, _offset, _prov)) = self.ecx.ptr_try_get_alloc_id(place.ptr()) { + let mut skip_recursive_check = false; // Let's see what kind of memory this points to. // `unwrap` since dangling pointers have already been handled. let alloc_kind = self.ecx.tcx.try_get_global_alloc(alloc_id).unwrap(); - match alloc_kind { + let alloc_actual_mutbl = match alloc_kind { GlobalAlloc::Static(did) => { // Special handling for pointers to statics (irrespective of their type). assert!(!self.ecx.tcx.is_thread_local_static(did)); @@ -474,12 +474,6 @@ impl<'rt, 'mir, 'tcx: 'mir, M: Machine<'mir, 'tcx>> ValidityVisitor<'rt, 'mir, ' .no_bound_vars() .expect("statics should not have generic parameters") .is_freeze(*self.ecx.tcx, ty::ParamEnv::reveal_all()); - // Mutability check. - if ptr_expected_mutbl == Mutability::Mut { - if !is_mut { - throw_validation_failure!(self.path, MutableRefToImmutable); - } - } // Mode-specific checks match self.ctfe_mode { Some( @@ -494,15 +488,9 @@ impl<'rt, 'mir, 'tcx: 'mir, M: Machine<'mir, 'tcx>> ValidityVisitor<'rt, 'mir, ' // trigger cycle errors if we try to compute the value of the other static // and that static refers back to us (potentially through a promoted). // This could miss some UB, but that's fine. - return Ok(()); + skip_recursive_check = true; } Some(CtfeValidationMode::Const { .. }) => { - // For consts on the other hand we have to recursively check; - // pattern matching assumes a valid value. However we better make - // sure this is not mutable. - if is_mut { - throw_validation_failure!(self.path, ConstRefToMutable); - } // We can't recursively validate `extern static`, so we better reject them. if self.ecx.tcx.is_foreign_item(did) { throw_validation_failure!(self.path, ConstRefToExtern); @@ -510,26 +498,39 @@ impl<'rt, 'mir, 'tcx: 'mir, M: Machine<'mir, 'tcx>> ValidityVisitor<'rt, 'mir, ' } None => {} } + // Return alloc mutability + if is_mut { Mutability::Mut } else { Mutability::Not } } - GlobalAlloc::Memory(alloc) => { - if alloc.inner().mutability == Mutability::Mut - && matches!(self.ctfe_mode, Some(CtfeValidationMode::Const { .. })) - { - throw_validation_failure!(self.path, ConstRefToMutable); - } - if ptr_expected_mutbl == Mutability::Mut - && alloc.inner().mutability == Mutability::Not - { - throw_validation_failure!(self.path, MutableRefToImmutable); - } - } + GlobalAlloc::Memory(alloc) => alloc.inner().mutability, GlobalAlloc::Function(..) | GlobalAlloc::VTable(..) => { // These are immutable, we better don't allow mutable pointers here. - if ptr_expected_mutbl == Mutability::Mut { - throw_validation_failure!(self.path, MutableRefToImmutable); - } + Mutability::Not + } + }; + // Mutability check. + // If this allocation has size zero, there is no actual mutability here. + let (size, _align, _alloc_kind) = self.ecx.get_alloc_info(alloc_id); + if size != Size::ZERO { + if ptr_expected_mutbl == Mutability::Mut + && alloc_actual_mutbl == Mutability::Not + { + throw_validation_failure!(self.path, MutableRefToImmutable); + } + if ptr_expected_mutbl == Mutability::Mut + && self.ctfe_mode.is_some_and(|c| !c.may_contain_mutable_ref()) + { + throw_validation_failure!(self.path, MutableRefInConstOrStatic); + } + if alloc_actual_mutbl == Mutability::Mut + && matches!(self.ctfe_mode, Some(CtfeValidationMode::Const { .. })) + { + throw_validation_failure!(self.path, ConstRefToMutable); } } + // Potentially skip recursive check. + if skip_recursive_check { + return Ok(()); + } } let path = &self.path; ref_tracking.track(place, || { @@ -598,16 +599,8 @@ impl<'rt, 'mir, 'tcx: 'mir, M: Machine<'mir, 'tcx>> ValidityVisitor<'rt, 'mir, ' } Ok(true) } - ty::Ref(_, ty, mutbl) => { - if self.ctfe_mode.is_some_and(|c| !c.may_contain_mutable_ref()) - && *mutbl == Mutability::Mut - { - let layout = self.ecx.layout_of(*ty)?; - if !layout.is_zst() { - throw_validation_failure!(self.path, MutableRefInConst); - } - } - self.check_safe_pointer(value, PointerKind::Ref)?; + ty::Ref(_, _ty, mutbl) => { + self.check_safe_pointer(value, PointerKind::Ref(*mutbl))?; Ok(true) } ty::FnPtr(_sig) => { diff --git a/compiler/rustc_middle/src/mir/interpret/error.rs b/compiler/rustc_middle/src/mir/interpret/error.rs index 9d4ec7d25bb..125fac48df8 100644 --- a/compiler/rustc_middle/src/mir/interpret/error.rs +++ b/compiler/rustc_middle/src/mir/interpret/error.rs @@ -12,6 +12,7 @@ use rustc_macros::HashStable; use rustc_session::CtfeBacktrace; use rustc_span::{def_id::DefId, Span, DUMMY_SP}; use rustc_target::abi::{call, Align, Size, VariantIdx, WrappingRange}; +use rustc_type_ir::Mutability; use std::borrow::Cow; use std::{any::Any, backtrace::Backtrace, fmt}; @@ -367,7 +368,7 @@ pub enum UndefinedBehaviorInfo<'tcx> { #[derive(Debug, Clone, Copy)] pub enum PointerKind { - Ref, + Ref(Mutability), Box, } @@ -375,7 +376,7 @@ impl IntoDiagnosticArg for PointerKind { fn into_diagnostic_arg(self) -> DiagnosticArgValue { DiagnosticArgValue::Str( match self { - Self::Ref => "ref", + Self::Ref(_) => "ref", Self::Box => "box", } .into(), @@ -408,7 +409,7 @@ impl From for ExpectedKind { fn from(x: PointerKind) -> ExpectedKind { match x { PointerKind::Box => ExpectedKind::Box, - PointerKind::Ref => ExpectedKind::Reference, + PointerKind::Ref(_) => ExpectedKind::Reference, } } } @@ -419,7 +420,7 @@ pub enum ValidationErrorKind<'tcx> { PartialPointer, PtrToUninhabited { ptr_kind: PointerKind, ty: Ty<'tcx> }, PtrToStatic { ptr_kind: PointerKind }, - MutableRefInConst, + MutableRefInConstOrStatic, ConstRefToMutable, ConstRefToExtern, MutableRefToImmutable, diff --git a/tests/ui/consts/const-mut-refs/const_mut_refs.rs b/tests/ui/consts/const-mut-refs/const_mut_refs.rs index 544458dfcd8..96321a1defd 100644 --- a/tests/ui/consts/const-mut-refs/const_mut_refs.rs +++ b/tests/ui/consts/const-mut-refs/const_mut_refs.rs @@ -1,6 +1,8 @@ // check-pass #![feature(const_mut_refs)] +use std::sync::Mutex; + struct Foo { x: usize } @@ -28,6 +30,10 @@ const fn bazz(foo: &mut Foo) -> usize { foo.x } +// Empty slices get promoted so this passes the static checks. +// Make sure it also passes the dynamic checks. +static MUTABLE_REFERENCE_HOLDER: Mutex<&mut [u8]> = Mutex::new(&mut []); + fn main() { let _: [(); foo().bar()] = [(); 1]; let _: [(); baz(&mut foo())] = [(); 2]; diff --git a/tests/ui/consts/const-mut-refs/mut_ref_in_final_dynamic_check.32bit.stderr b/tests/ui/consts/const-mut-refs/mut_ref_in_final_dynamic_check.32bit.stderr index 87420a03751..acb6f121bbf 100644 --- a/tests/ui/consts/const-mut-refs/mut_ref_in_final_dynamic_check.32bit.stderr +++ b/tests/ui/consts/const-mut-refs/mut_ref_in_final_dynamic_check.32bit.stderr @@ -1,19 +1,24 @@ error[E0080]: it is undefined behavior to use this value - --> $DIR/mut_ref_in_final_dynamic_check.rs:15:1 + --> $DIR/mut_ref_in_final_dynamic_check.rs:16:1 | LL | const A: Option<&mut i32> = helper(); | ^^^^^^^^^^^^^^^^^^^^^^^^^ constructing invalid value at ..0: encountered mutable reference in a `const` or `static` | = note: The rules on what exactly is undefined behavior aren't clear, so this check might be overzealous. Please open an issue on the rustc repository if you believe it should not be considered undefined behavior. = note: the raw bytes of the constant (size: 4, align: 4) { - 2a 00 00 00 │ *... + ╾ALLOC0╼ │ ╾──╼ } -error: encountered dangling pointer in final value of constant - --> $DIR/mut_ref_in_final_dynamic_check.rs:22:1 +error[E0080]: it is undefined behavior to use this value + --> $DIR/mut_ref_in_final_dynamic_check.rs:18:1 + | +LL | static A_STATIC: Option<&mut i32> = helper(); + | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ constructing invalid value at ..0: encountered mutable reference in a `const` or `static` | -LL | const B: Option<&mut i32> = helper2(); - | ^^^^^^^^^^^^^^^^^^^^^^^^^ + = note: The rules on what exactly is undefined behavior aren't clear, so this check might be overzealous. Please open an issue on the rustc repository if you believe it should not be considered undefined behavior. + = note: the raw bytes of the constant (size: 4, align: 4) { + ╾ALLOC0╼ │ ╾──╼ + } error: aborting due to 2 previous errors diff --git a/tests/ui/consts/const-mut-refs/mut_ref_in_final_dynamic_check.64bit.stderr b/tests/ui/consts/const-mut-refs/mut_ref_in_final_dynamic_check.64bit.stderr index fc68207512c..6dc7d851391 100644 --- a/tests/ui/consts/const-mut-refs/mut_ref_in_final_dynamic_check.64bit.stderr +++ b/tests/ui/consts/const-mut-refs/mut_ref_in_final_dynamic_check.64bit.stderr @@ -1,19 +1,24 @@ error[E0080]: it is undefined behavior to use this value - --> $DIR/mut_ref_in_final_dynamic_check.rs:15:1 + --> $DIR/mut_ref_in_final_dynamic_check.rs:16:1 | LL | const A: Option<&mut i32> = helper(); | ^^^^^^^^^^^^^^^^^^^^^^^^^ constructing invalid value at ..0: encountered mutable reference in a `const` or `static` | = note: The rules on what exactly is undefined behavior aren't clear, so this check might be overzealous. Please open an issue on the rustc repository if you believe it should not be considered undefined behavior. = note: the raw bytes of the constant (size: 8, align: 8) { - 2a 00 00 00 00 00 00 00 │ *....... + ╾ALLOC0╼ │ ╾──────╼ } -error: encountered dangling pointer in final value of constant - --> $DIR/mut_ref_in_final_dynamic_check.rs:22:1 +error[E0080]: it is undefined behavior to use this value + --> $DIR/mut_ref_in_final_dynamic_check.rs:18:1 + | +LL | static A_STATIC: Option<&mut i32> = helper(); + | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ constructing invalid value at ..0: encountered mutable reference in a `const` or `static` | -LL | const B: Option<&mut i32> = helper2(); - | ^^^^^^^^^^^^^^^^^^^^^^^^^ + = note: The rules on what exactly is undefined behavior aren't clear, so this check might be overzealous. Please open an issue on the rustc repository if you believe it should not be considered undefined behavior. + = note: the raw bytes of the constant (size: 8, align: 8) { + ╾ALLOC0╼ │ ╾──────╼ + } error: aborting due to 2 previous errors diff --git a/tests/ui/consts/const-mut-refs/mut_ref_in_final_dynamic_check.rs b/tests/ui/consts/const-mut-refs/mut_ref_in_final_dynamic_check.rs index 455b557b97c..26b4796c6c4 100644 --- a/tests/ui/consts/const-mut-refs/mut_ref_in_final_dynamic_check.rs +++ b/tests/ui/consts/const-mut-refs/mut_ref_in_final_dynamic_check.rs @@ -1,5 +1,5 @@ // stderr-per-bitwidth -#![feature(const_mut_refs)] +#![feature(const_mut_refs, const_refs_to_static)] #![feature(raw_ref_op)] // This file checks that our dynamic checks catch things that the static checks miss. @@ -8,17 +8,14 @@ // do that without causing the borrow checker to complain (see the B4/helper test in // mut_ref_in_final.rs). +static mut BUFFER: i32 = 42; + const fn helper() -> Option<&'static mut i32> { unsafe { - // Undefined behaviour (integer as pointer), who doesn't love tests like this. - Some(&mut *(42 as *mut i32)) + Some(&mut *std::ptr::addr_of_mut!(BUFFER)) } } const A: Option<&mut i32> = helper(); //~ ERROR it is undefined behavior to use this value -//~^ encountered mutable reference in a `const` - -const fn helper2() -> Option<&'static mut i32> { unsafe { - // Undefined behaviour (dangling pointer), who doesn't love tests like this. - Some(&mut *(&mut 42 as *mut i32)) -} } -const B: Option<&mut i32> = helper2(); //~ ERROR encountered dangling pointer in final value of constant +//~^ encountered mutable reference +static A_STATIC: Option<&mut i32> = helper(); //~ ERROR it is undefined behavior to use this value +//~^ encountered mutable reference fn main() {} -- cgit 1.4.1-3-g733a5 From f68e79dcac3acb635c58ff2fa4178b9a0b040fe4 Mon Sep 17 00:00:00 2001 From: Ralf Jung Date: Fri, 16 Feb 2024 10:01:43 +0100 Subject: remove stderr-per-bitwidth from some tests --- .../validate_uninhabited_zsts.32bit.stderr | 52 ------------- .../validate_uninhabited_zsts.64bit.stderr | 52 ------------- .../consts/const-eval/validate_uninhabited_zsts.rs | 2 - .../const-eval/validate_uninhabited_zsts.stderr | 52 +++++++++++++ .../consts/const-mut-refs/issue-76510.32bit.stderr | 26 ------- .../consts/const-mut-refs/issue-76510.64bit.stderr | 26 ------- tests/ui/consts/const-mut-refs/issue-76510.rs | 2 - tests/ui/consts/const-mut-refs/issue-76510.stderr | 26 +++++++ .../mut_ref_in_final_dynamic_check.32bit.stderr | 25 ------ .../mut_ref_in_final_dynamic_check.64bit.stderr | 25 ------ .../mut_ref_in_final_dynamic_check.rs | 3 +- .../mut_ref_in_final_dynamic_check.stderr | 25 ++++++ .../const_refers_to_static.32bit.stderr | 65 ---------------- .../const_refers_to_static.64bit.stderr | 65 ---------------- .../miri_unleashed/const_refers_to_static.rs | 3 +- .../miri_unleashed/const_refers_to_static.stderr | 65 ++++++++++++++++ ...const_refers_to_static_cross_crate.32bit.stderr | 89 ---------------------- ...const_refers_to_static_cross_crate.64bit.stderr | 89 ---------------------- .../const_refers_to_static_cross_crate.rs | 3 +- .../const_refers_to_static_cross_crate.stderr | 89 ++++++++++++++++++++++ 20 files changed, 263 insertions(+), 521 deletions(-) delete mode 100644 tests/ui/consts/const-eval/validate_uninhabited_zsts.32bit.stderr delete mode 100644 tests/ui/consts/const-eval/validate_uninhabited_zsts.64bit.stderr create mode 100644 tests/ui/consts/const-eval/validate_uninhabited_zsts.stderr delete mode 100644 tests/ui/consts/const-mut-refs/issue-76510.32bit.stderr delete mode 100644 tests/ui/consts/const-mut-refs/issue-76510.64bit.stderr create mode 100644 tests/ui/consts/const-mut-refs/issue-76510.stderr delete mode 100644 tests/ui/consts/const-mut-refs/mut_ref_in_final_dynamic_check.32bit.stderr delete mode 100644 tests/ui/consts/const-mut-refs/mut_ref_in_final_dynamic_check.64bit.stderr create mode 100644 tests/ui/consts/const-mut-refs/mut_ref_in_final_dynamic_check.stderr delete mode 100644 tests/ui/consts/miri_unleashed/const_refers_to_static.32bit.stderr delete mode 100644 tests/ui/consts/miri_unleashed/const_refers_to_static.64bit.stderr create mode 100644 tests/ui/consts/miri_unleashed/const_refers_to_static.stderr delete mode 100644 tests/ui/consts/miri_unleashed/const_refers_to_static_cross_crate.32bit.stderr delete mode 100644 tests/ui/consts/miri_unleashed/const_refers_to_static_cross_crate.64bit.stderr create mode 100644 tests/ui/consts/miri_unleashed/const_refers_to_static_cross_crate.stderr diff --git a/tests/ui/consts/const-eval/validate_uninhabited_zsts.32bit.stderr b/tests/ui/consts/const-eval/validate_uninhabited_zsts.32bit.stderr deleted file mode 100644 index b423edbdcec..00000000000 --- a/tests/ui/consts/const-eval/validate_uninhabited_zsts.32bit.stderr +++ /dev/null @@ -1,52 +0,0 @@ -warning: the type `!` does not permit zero-initialization - --> $DIR/validate_uninhabited_zsts.rs:4:14 - | -LL | unsafe { std::mem::transmute(()) } - | ^^^^^^^^^^^^^^^^^^^^^^^ this code causes undefined behavior when executed - | - = note: the `!` type has no valid value - = note: `#[warn(invalid_value)]` on by default - -error[E0080]: evaluation of constant value failed - --> $DIR/validate_uninhabited_zsts.rs:4:14 - | -LL | unsafe { std::mem::transmute(()) } - | ^^^^^^^^^^^^^^^^^^^^^^^ constructing invalid value: encountered a value of the never type `!` - | -note: inside `foo` - --> $DIR/validate_uninhabited_zsts.rs:4:14 - | -LL | unsafe { std::mem::transmute(()) } - | ^^^^^^^^^^^^^^^^^^^^^^^ -note: inside `FOO` - --> $DIR/validate_uninhabited_zsts.rs:19:33 - | -LL | const FOO: [empty::Empty; 3] = [foo(); 3]; - | ^^^^^ - -error[E0080]: evaluation of constant value failed - --> $DIR/validate_uninhabited_zsts.rs:21:42 - | -LL | const BAR: [empty::Empty; 3] = [unsafe { std::mem::transmute(()) }; 3]; - | ^^^^^^^^^^^^^^^^^^^^^^^ constructing invalid value at .0: encountered a value of uninhabited type `Void` - -warning: the type `empty::Empty` does not permit zero-initialization - --> $DIR/validate_uninhabited_zsts.rs:21:42 - | -LL | const BAR: [empty::Empty; 3] = [unsafe { std::mem::transmute(()) }; 3]; - | ^^^^^^^^^^^^^^^^^^^^^^^ this code causes undefined behavior when executed - | -note: in this struct field - --> $DIR/validate_uninhabited_zsts.rs:16:22 - | -LL | pub struct Empty(Void); - | ^^^^ -note: enums with no inhabited variants have no valid value - --> $DIR/validate_uninhabited_zsts.rs:13:5 - | -LL | enum Void {} - | ^^^^^^^^^ - -error: aborting due to 2 previous errors; 2 warnings emitted - -For more information about this error, try `rustc --explain E0080`. diff --git a/tests/ui/consts/const-eval/validate_uninhabited_zsts.64bit.stderr b/tests/ui/consts/const-eval/validate_uninhabited_zsts.64bit.stderr deleted file mode 100644 index b423edbdcec..00000000000 --- a/tests/ui/consts/const-eval/validate_uninhabited_zsts.64bit.stderr +++ /dev/null @@ -1,52 +0,0 @@ -warning: the type `!` does not permit zero-initialization - --> $DIR/validate_uninhabited_zsts.rs:4:14 - | -LL | unsafe { std::mem::transmute(()) } - | ^^^^^^^^^^^^^^^^^^^^^^^ this code causes undefined behavior when executed - | - = note: the `!` type has no valid value - = note: `#[warn(invalid_value)]` on by default - -error[E0080]: evaluation of constant value failed - --> $DIR/validate_uninhabited_zsts.rs:4:14 - | -LL | unsafe { std::mem::transmute(()) } - | ^^^^^^^^^^^^^^^^^^^^^^^ constructing invalid value: encountered a value of the never type `!` - | -note: inside `foo` - --> $DIR/validate_uninhabited_zsts.rs:4:14 - | -LL | unsafe { std::mem::transmute(()) } - | ^^^^^^^^^^^^^^^^^^^^^^^ -note: inside `FOO` - --> $DIR/validate_uninhabited_zsts.rs:19:33 - | -LL | const FOO: [empty::Empty; 3] = [foo(); 3]; - | ^^^^^ - -error[E0080]: evaluation of constant value failed - --> $DIR/validate_uninhabited_zsts.rs:21:42 - | -LL | const BAR: [empty::Empty; 3] = [unsafe { std::mem::transmute(()) }; 3]; - | ^^^^^^^^^^^^^^^^^^^^^^^ constructing invalid value at .0: encountered a value of uninhabited type `Void` - -warning: the type `empty::Empty` does not permit zero-initialization - --> $DIR/validate_uninhabited_zsts.rs:21:42 - | -LL | const BAR: [empty::Empty; 3] = [unsafe { std::mem::transmute(()) }; 3]; - | ^^^^^^^^^^^^^^^^^^^^^^^ this code causes undefined behavior when executed - | -note: in this struct field - --> $DIR/validate_uninhabited_zsts.rs:16:22 - | -LL | pub struct Empty(Void); - | ^^^^ -note: enums with no inhabited variants have no valid value - --> $DIR/validate_uninhabited_zsts.rs:13:5 - | -LL | enum Void {} - | ^^^^^^^^^ - -error: aborting due to 2 previous errors; 2 warnings emitted - -For more information about this error, try `rustc --explain E0080`. diff --git a/tests/ui/consts/const-eval/validate_uninhabited_zsts.rs b/tests/ui/consts/const-eval/validate_uninhabited_zsts.rs index b6783175dd3..5fc0674c576 100644 --- a/tests/ui/consts/const-eval/validate_uninhabited_zsts.rs +++ b/tests/ui/consts/const-eval/validate_uninhabited_zsts.rs @@ -1,5 +1,3 @@ -// stderr-per-bitwidth - const fn foo() -> ! { unsafe { std::mem::transmute(()) } //~^ ERROR evaluation of constant value failed diff --git a/tests/ui/consts/const-eval/validate_uninhabited_zsts.stderr b/tests/ui/consts/const-eval/validate_uninhabited_zsts.stderr new file mode 100644 index 00000000000..4c50ab5319e --- /dev/null +++ b/tests/ui/consts/const-eval/validate_uninhabited_zsts.stderr @@ -0,0 +1,52 @@ +warning: the type `!` does not permit zero-initialization + --> $DIR/validate_uninhabited_zsts.rs:2:14 + | +LL | unsafe { std::mem::transmute(()) } + | ^^^^^^^^^^^^^^^^^^^^^^^ this code causes undefined behavior when executed + | + = note: the `!` type has no valid value + = note: `#[warn(invalid_value)]` on by default + +error[E0080]: evaluation of constant value failed + --> $DIR/validate_uninhabited_zsts.rs:2:14 + | +LL | unsafe { std::mem::transmute(()) } + | ^^^^^^^^^^^^^^^^^^^^^^^ constructing invalid value: encountered a value of the never type `!` + | +note: inside `foo` + --> $DIR/validate_uninhabited_zsts.rs:2:14 + | +LL | unsafe { std::mem::transmute(()) } + | ^^^^^^^^^^^^^^^^^^^^^^^ +note: inside `FOO` + --> $DIR/validate_uninhabited_zsts.rs:17:33 + | +LL | const FOO: [empty::Empty; 3] = [foo(); 3]; + | ^^^^^ + +error[E0080]: evaluation of constant value failed + --> $DIR/validate_uninhabited_zsts.rs:19:42 + | +LL | const BAR: [empty::Empty; 3] = [unsafe { std::mem::transmute(()) }; 3]; + | ^^^^^^^^^^^^^^^^^^^^^^^ constructing invalid value at .0: encountered a value of uninhabited type `Void` + +warning: the type `empty::Empty` does not permit zero-initialization + --> $DIR/validate_uninhabited_zsts.rs:19:42 + | +LL | const BAR: [empty::Empty; 3] = [unsafe { std::mem::transmute(()) }; 3]; + | ^^^^^^^^^^^^^^^^^^^^^^^ this code causes undefined behavior when executed + | +note: in this struct field + --> $DIR/validate_uninhabited_zsts.rs:14:22 + | +LL | pub struct Empty(Void); + | ^^^^ +note: enums with no inhabited variants have no valid value + --> $DIR/validate_uninhabited_zsts.rs:11:5 + | +LL | enum Void {} + | ^^^^^^^^^ + +error: aborting due to 2 previous errors; 2 warnings emitted + +For more information about this error, try `rustc --explain E0080`. diff --git a/tests/ui/consts/const-mut-refs/issue-76510.32bit.stderr b/tests/ui/consts/const-mut-refs/issue-76510.32bit.stderr deleted file mode 100644 index dc04d85770e..00000000000 --- a/tests/ui/consts/const-mut-refs/issue-76510.32bit.stderr +++ /dev/null @@ -1,26 +0,0 @@ -error[E0764]: mutable references are not allowed in the final value of constants - --> $DIR/issue-76510.rs:5:29 - | -LL | const S: &'static mut str = &mut " hello "; - | ^^^^^^^^^^^^^^ - -error[E0658]: mutation through a reference is not allowed in constants - --> $DIR/issue-76510.rs:5:29 - | -LL | const S: &'static mut str = &mut " hello "; - | ^^^^^^^^^^^^^^ - | - = note: see issue #57349 for more information - = help: add `#![feature(const_mut_refs)]` to the crate attributes to enable - = note: this compiler was built on YYYY-MM-DD; consider upgrading it if it is out of date - -error[E0596]: cannot borrow data in a `&` reference as mutable - --> $DIR/issue-76510.rs:5:29 - | -LL | const S: &'static mut str = &mut " hello "; - | ^^^^^^^^^^^^^^ cannot borrow as mutable - -error: aborting due to 3 previous errors - -Some errors have detailed explanations: E0596, E0658, E0764. -For more information about an error, try `rustc --explain E0596`. diff --git a/tests/ui/consts/const-mut-refs/issue-76510.64bit.stderr b/tests/ui/consts/const-mut-refs/issue-76510.64bit.stderr deleted file mode 100644 index dc04d85770e..00000000000 --- a/tests/ui/consts/const-mut-refs/issue-76510.64bit.stderr +++ /dev/null @@ -1,26 +0,0 @@ -error[E0764]: mutable references are not allowed in the final value of constants - --> $DIR/issue-76510.rs:5:29 - | -LL | const S: &'static mut str = &mut " hello "; - | ^^^^^^^^^^^^^^ - -error[E0658]: mutation through a reference is not allowed in constants - --> $DIR/issue-76510.rs:5:29 - | -LL | const S: &'static mut str = &mut " hello "; - | ^^^^^^^^^^^^^^ - | - = note: see issue #57349 for more information - = help: add `#![feature(const_mut_refs)]` to the crate attributes to enable - = note: this compiler was built on YYYY-MM-DD; consider upgrading it if it is out of date - -error[E0596]: cannot borrow data in a `&` reference as mutable - --> $DIR/issue-76510.rs:5:29 - | -LL | const S: &'static mut str = &mut " hello "; - | ^^^^^^^^^^^^^^ cannot borrow as mutable - -error: aborting due to 3 previous errors - -Some errors have detailed explanations: E0596, E0658, E0764. -For more information about an error, try `rustc --explain E0596`. diff --git a/tests/ui/consts/const-mut-refs/issue-76510.rs b/tests/ui/consts/const-mut-refs/issue-76510.rs index 143d2fb6b9a..b6a73abb09c 100644 --- a/tests/ui/consts/const-mut-refs/issue-76510.rs +++ b/tests/ui/consts/const-mut-refs/issue-76510.rs @@ -1,5 +1,3 @@ -// stderr-per-bitwidth - use std::mem::{transmute, ManuallyDrop}; const S: &'static mut str = &mut " hello "; diff --git a/tests/ui/consts/const-mut-refs/issue-76510.stderr b/tests/ui/consts/const-mut-refs/issue-76510.stderr new file mode 100644 index 00000000000..8a1b19baff7 --- /dev/null +++ b/tests/ui/consts/const-mut-refs/issue-76510.stderr @@ -0,0 +1,26 @@ +error[E0764]: mutable references are not allowed in the final value of constants + --> $DIR/issue-76510.rs:3:29 + | +LL | const S: &'static mut str = &mut " hello "; + | ^^^^^^^^^^^^^^ + +error[E0658]: mutation through a reference is not allowed in constants + --> $DIR/issue-76510.rs:3:29 + | +LL | const S: &'static mut str = &mut " hello "; + | ^^^^^^^^^^^^^^ + | + = note: see issue #57349 for more information + = help: add `#![feature(const_mut_refs)]` to the crate attributes to enable + = note: this compiler was built on YYYY-MM-DD; consider upgrading it if it is out of date + +error[E0596]: cannot borrow data in a `&` reference as mutable + --> $DIR/issue-76510.rs:3:29 + | +LL | const S: &'static mut str = &mut " hello "; + | ^^^^^^^^^^^^^^ cannot borrow as mutable + +error: aborting due to 3 previous errors + +Some errors have detailed explanations: E0596, E0658, E0764. +For more information about an error, try `rustc --explain E0596`. diff --git a/tests/ui/consts/const-mut-refs/mut_ref_in_final_dynamic_check.32bit.stderr b/tests/ui/consts/const-mut-refs/mut_ref_in_final_dynamic_check.32bit.stderr deleted file mode 100644 index acb6f121bbf..00000000000 --- a/tests/ui/consts/const-mut-refs/mut_ref_in_final_dynamic_check.32bit.stderr +++ /dev/null @@ -1,25 +0,0 @@ -error[E0080]: it is undefined behavior to use this value - --> $DIR/mut_ref_in_final_dynamic_check.rs:16:1 - | -LL | const A: Option<&mut i32> = helper(); - | ^^^^^^^^^^^^^^^^^^^^^^^^^ constructing invalid value at ..0: encountered mutable reference in a `const` or `static` - | - = note: The rules on what exactly is undefined behavior aren't clear, so this check might be overzealous. Please open an issue on the rustc repository if you believe it should not be considered undefined behavior. - = note: the raw bytes of the constant (size: 4, align: 4) { - ╾ALLOC0╼ │ ╾──╼ - } - -error[E0080]: it is undefined behavior to use this value - --> $DIR/mut_ref_in_final_dynamic_check.rs:18:1 - | -LL | static A_STATIC: Option<&mut i32> = helper(); - | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ constructing invalid value at ..0: encountered mutable reference in a `const` or `static` - | - = note: The rules on what exactly is undefined behavior aren't clear, so this check might be overzealous. Please open an issue on the rustc repository if you believe it should not be considered undefined behavior. - = note: the raw bytes of the constant (size: 4, align: 4) { - ╾ALLOC0╼ │ ╾──╼ - } - -error: aborting due to 2 previous errors - -For more information about this error, try `rustc --explain E0080`. diff --git a/tests/ui/consts/const-mut-refs/mut_ref_in_final_dynamic_check.64bit.stderr b/tests/ui/consts/const-mut-refs/mut_ref_in_final_dynamic_check.64bit.stderr deleted file mode 100644 index 6dc7d851391..00000000000 --- a/tests/ui/consts/const-mut-refs/mut_ref_in_final_dynamic_check.64bit.stderr +++ /dev/null @@ -1,25 +0,0 @@ -error[E0080]: it is undefined behavior to use this value - --> $DIR/mut_ref_in_final_dynamic_check.rs:16:1 - | -LL | const A: Option<&mut i32> = helper(); - | ^^^^^^^^^^^^^^^^^^^^^^^^^ constructing invalid value at ..0: encountered mutable reference in a `const` or `static` - | - = note: The rules on what exactly is undefined behavior aren't clear, so this check might be overzealous. Please open an issue on the rustc repository if you believe it should not be considered undefined behavior. - = note: the raw bytes of the constant (size: 8, align: 8) { - ╾ALLOC0╼ │ ╾──────╼ - } - -error[E0080]: it is undefined behavior to use this value - --> $DIR/mut_ref_in_final_dynamic_check.rs:18:1 - | -LL | static A_STATIC: Option<&mut i32> = helper(); - | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ constructing invalid value at ..0: encountered mutable reference in a `const` or `static` - | - = note: The rules on what exactly is undefined behavior aren't clear, so this check might be overzealous. Please open an issue on the rustc repository if you believe it should not be considered undefined behavior. - = note: the raw bytes of the constant (size: 8, align: 8) { - ╾ALLOC0╼ │ ╾──────╼ - } - -error: aborting due to 2 previous errors - -For more information about this error, try `rustc --explain E0080`. diff --git a/tests/ui/consts/const-mut-refs/mut_ref_in_final_dynamic_check.rs b/tests/ui/consts/const-mut-refs/mut_ref_in_final_dynamic_check.rs index 26b4796c6c4..081353a47c8 100644 --- a/tests/ui/consts/const-mut-refs/mut_ref_in_final_dynamic_check.rs +++ b/tests/ui/consts/const-mut-refs/mut_ref_in_final_dynamic_check.rs @@ -1,4 +1,5 @@ -// stderr-per-bitwidth +// normalize-stderr-test "(the raw bytes of the constant) \(size: [0-9]*, align: [0-9]*\)" -> "$1 (size: $$SIZE, align: $$ALIGN)" +// normalize-stderr-test "([0-9a-f][0-9a-f] |╾─*ALLOC[0-9]+(\+[a-z0-9]+)?()?─*╼ )+ *│.*" -> "HEX_DUMP" #![feature(const_mut_refs, const_refs_to_static)] #![feature(raw_ref_op)] diff --git a/tests/ui/consts/const-mut-refs/mut_ref_in_final_dynamic_check.stderr b/tests/ui/consts/const-mut-refs/mut_ref_in_final_dynamic_check.stderr new file mode 100644 index 00000000000..8625c445f99 --- /dev/null +++ b/tests/ui/consts/const-mut-refs/mut_ref_in_final_dynamic_check.stderr @@ -0,0 +1,25 @@ +error[E0080]: it is undefined behavior to use this value + --> $DIR/mut_ref_in_final_dynamic_check.rs:17:1 + | +LL | const A: Option<&mut i32> = helper(); + | ^^^^^^^^^^^^^^^^^^^^^^^^^ constructing invalid value at ..0: encountered mutable reference in a `const` or `static` + | + = note: The rules on what exactly is undefined behavior aren't clear, so this check might be overzealous. Please open an issue on the rustc repository if you believe it should not be considered undefined behavior. + = note: the raw bytes of the constant (size: $SIZE, align: $ALIGN) { + HEX_DUMP + } + +error[E0080]: it is undefined behavior to use this value + --> $DIR/mut_ref_in_final_dynamic_check.rs:19:1 + | +LL | static A_STATIC: Option<&mut i32> = helper(); + | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ constructing invalid value at ..0: encountered mutable reference in a `const` or `static` + | + = note: The rules on what exactly is undefined behavior aren't clear, so this check might be overzealous. Please open an issue on the rustc repository if you believe it should not be considered undefined behavior. + = note: the raw bytes of the constant (size: $SIZE, align: $ALIGN) { + HEX_DUMP + } + +error: aborting due to 2 previous errors + +For more information about this error, try `rustc --explain E0080`. diff --git a/tests/ui/consts/miri_unleashed/const_refers_to_static.32bit.stderr b/tests/ui/consts/miri_unleashed/const_refers_to_static.32bit.stderr deleted file mode 100644 index 9e76b873858..00000000000 --- a/tests/ui/consts/miri_unleashed/const_refers_to_static.32bit.stderr +++ /dev/null @@ -1,65 +0,0 @@ -error[E0080]: evaluation of constant value failed - --> $DIR/const_refers_to_static.rs:9:5 - | -LL | FOO.fetch_add(1, Ordering::Relaxed) - | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ calling non-const function `AtomicUsize::fetch_add` - -error[E0080]: evaluation of constant value failed - --> $DIR/const_refers_to_static.rs:14:14 - | -LL | unsafe { *(&FOO as *const _ as *const usize) } - | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ constant accesses mutable global memory - -error[E0080]: evaluation of constant value failed - --> $DIR/const_refers_to_static.rs:18:32 - | -LL | const READ_MUT: u32 = unsafe { MUTABLE }; - | ^^^^^^^ constant accesses mutable global memory - -error[E0080]: it is undefined behavior to use this value - --> $DIR/const_refers_to_static.rs:21:1 - | -LL | const REF_INTERIOR_MUT: &usize = { - | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ constructing invalid value: encountered reference to mutable memory in `const` - | - = note: The rules on what exactly is undefined behavior aren't clear, so this check might be overzealous. Please open an issue on the rustc repository if you believe it should not be considered undefined behavior. - = note: the raw bytes of the constant (size: 4, align: 4) { - ╾ALLOC0╼ │ ╾──╼ - } - -warning: skipping const checks - | -help: skipping check for `const_refs_to_static` feature - --> $DIR/const_refers_to_static.rs:9:5 - | -LL | FOO.fetch_add(1, Ordering::Relaxed) - | ^^^ -help: skipping check that does not even have a feature gate - --> $DIR/const_refers_to_static.rs:9:5 - | -LL | FOO.fetch_add(1, Ordering::Relaxed) - | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ -help: skipping check for `const_refs_to_static` feature - --> $DIR/const_refers_to_static.rs:14:17 - | -LL | unsafe { *(&FOO as *const _ as *const usize) } - | ^^^ -help: skipping check for `const_refs_to_static` feature - --> $DIR/const_refers_to_static.rs:18:32 - | -LL | const READ_MUT: u32 = unsafe { MUTABLE }; - | ^^^^^^^ -help: skipping check for `const_refs_to_static` feature - --> $DIR/const_refers_to_static.rs:24:18 - | -LL | unsafe { &*(&FOO as *const _ as *const usize) } - | ^^^ -help: skipping check for `const_refs_to_static` feature - --> $DIR/const_refers_to_static.rs:29:25 - | -LL | const REF_IMMUT: &u8 = &MY_STATIC; - | ^^^^^^^^^ - -error: aborting due to 4 previous errors; 1 warning emitted - -For more information about this error, try `rustc --explain E0080`. diff --git a/tests/ui/consts/miri_unleashed/const_refers_to_static.64bit.stderr b/tests/ui/consts/miri_unleashed/const_refers_to_static.64bit.stderr deleted file mode 100644 index 989d3c75cd6..00000000000 --- a/tests/ui/consts/miri_unleashed/const_refers_to_static.64bit.stderr +++ /dev/null @@ -1,65 +0,0 @@ -error[E0080]: evaluation of constant value failed - --> $DIR/const_refers_to_static.rs:9:5 - | -LL | FOO.fetch_add(1, Ordering::Relaxed) - | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ calling non-const function `AtomicUsize::fetch_add` - -error[E0080]: evaluation of constant value failed - --> $DIR/const_refers_to_static.rs:14:14 - | -LL | unsafe { *(&FOO as *const _ as *const usize) } - | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ constant accesses mutable global memory - -error[E0080]: evaluation of constant value failed - --> $DIR/const_refers_to_static.rs:18:32 - | -LL | const READ_MUT: u32 = unsafe { MUTABLE }; - | ^^^^^^^ constant accesses mutable global memory - -error[E0080]: it is undefined behavior to use this value - --> $DIR/const_refers_to_static.rs:21:1 - | -LL | const REF_INTERIOR_MUT: &usize = { - | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ constructing invalid value: encountered reference to mutable memory in `const` - | - = note: The rules on what exactly is undefined behavior aren't clear, so this check might be overzealous. Please open an issue on the rustc repository if you believe it should not be considered undefined behavior. - = note: the raw bytes of the constant (size: 8, align: 8) { - ╾ALLOC0╼ │ ╾──────╼ - } - -warning: skipping const checks - | -help: skipping check for `const_refs_to_static` feature - --> $DIR/const_refers_to_static.rs:9:5 - | -LL | FOO.fetch_add(1, Ordering::Relaxed) - | ^^^ -help: skipping check that does not even have a feature gate - --> $DIR/const_refers_to_static.rs:9:5 - | -LL | FOO.fetch_add(1, Ordering::Relaxed) - | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ -help: skipping check for `const_refs_to_static` feature - --> $DIR/const_refers_to_static.rs:14:17 - | -LL | unsafe { *(&FOO as *const _ as *const usize) } - | ^^^ -help: skipping check for `const_refs_to_static` feature - --> $DIR/const_refers_to_static.rs:18:32 - | -LL | const READ_MUT: u32 = unsafe { MUTABLE }; - | ^^^^^^^ -help: skipping check for `const_refs_to_static` feature - --> $DIR/const_refers_to_static.rs:24:18 - | -LL | unsafe { &*(&FOO as *const _ as *const usize) } - | ^^^ -help: skipping check for `const_refs_to_static` feature - --> $DIR/const_refers_to_static.rs:29:25 - | -LL | const REF_IMMUT: &u8 = &MY_STATIC; - | ^^^^^^^^^ - -error: aborting due to 4 previous errors; 1 warning emitted - -For more information about this error, try `rustc --explain E0080`. diff --git a/tests/ui/consts/miri_unleashed/const_refers_to_static.rs b/tests/ui/consts/miri_unleashed/const_refers_to_static.rs index f8d956b3dd8..212003deba3 100644 --- a/tests/ui/consts/miri_unleashed/const_refers_to_static.rs +++ b/tests/ui/consts/miri_unleashed/const_refers_to_static.rs @@ -1,5 +1,6 @@ // compile-flags: -Zunleash-the-miri-inside-of-you -// stderr-per-bitwidth +// normalize-stderr-test "(the raw bytes of the constant) \(size: [0-9]*, align: [0-9]*\)" -> "$1 (size: $$SIZE, align: $$ALIGN)" +// normalize-stderr-test "([0-9a-f][0-9a-f] |╾─*ALLOC[0-9]+(\+[a-z0-9]+)?()?─*╼ )+ *│.*" -> "HEX_DUMP" use std::sync::atomic::AtomicUsize; use std::sync::atomic::Ordering; diff --git a/tests/ui/consts/miri_unleashed/const_refers_to_static.stderr b/tests/ui/consts/miri_unleashed/const_refers_to_static.stderr new file mode 100644 index 00000000000..df910546d11 --- /dev/null +++ b/tests/ui/consts/miri_unleashed/const_refers_to_static.stderr @@ -0,0 +1,65 @@ +error[E0080]: evaluation of constant value failed + --> $DIR/const_refers_to_static.rs:10:5 + | +LL | FOO.fetch_add(1, Ordering::Relaxed) + | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ calling non-const function `AtomicUsize::fetch_add` + +error[E0080]: evaluation of constant value failed + --> $DIR/const_refers_to_static.rs:15:14 + | +LL | unsafe { *(&FOO as *const _ as *const usize) } + | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ constant accesses mutable global memory + +error[E0080]: evaluation of constant value failed + --> $DIR/const_refers_to_static.rs:19:32 + | +LL | const READ_MUT: u32 = unsafe { MUTABLE }; + | ^^^^^^^ constant accesses mutable global memory + +error[E0080]: it is undefined behavior to use this value + --> $DIR/const_refers_to_static.rs:22:1 + | +LL | const REF_INTERIOR_MUT: &usize = { + | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ constructing invalid value: encountered reference to mutable memory in `const` + | + = note: The rules on what exactly is undefined behavior aren't clear, so this check might be overzealous. Please open an issue on the rustc repository if you believe it should not be considered undefined behavior. + = note: the raw bytes of the constant (size: $SIZE, align: $ALIGN) { + HEX_DUMP + } + +warning: skipping const checks + | +help: skipping check for `const_refs_to_static` feature + --> $DIR/const_refers_to_static.rs:10:5 + | +LL | FOO.fetch_add(1, Ordering::Relaxed) + | ^^^ +help: skipping check that does not even have a feature gate + --> $DIR/const_refers_to_static.rs:10:5 + | +LL | FOO.fetch_add(1, Ordering::Relaxed) + | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ +help: skipping check for `const_refs_to_static` feature + --> $DIR/const_refers_to_static.rs:15:17 + | +LL | unsafe { *(&FOO as *const _ as *const usize) } + | ^^^ +help: skipping check for `const_refs_to_static` feature + --> $DIR/const_refers_to_static.rs:19:32 + | +LL | const READ_MUT: u32 = unsafe { MUTABLE }; + | ^^^^^^^ +help: skipping check for `const_refs_to_static` feature + --> $DIR/const_refers_to_static.rs:25:18 + | +LL | unsafe { &*(&FOO as *const _ as *const usize) } + | ^^^ +help: skipping check for `const_refs_to_static` feature + --> $DIR/const_refers_to_static.rs:30:25 + | +LL | const REF_IMMUT: &u8 = &MY_STATIC; + | ^^^^^^^^^ + +error: aborting due to 4 previous errors; 1 warning emitted + +For more information about this error, try `rustc --explain E0080`. diff --git a/tests/ui/consts/miri_unleashed/const_refers_to_static_cross_crate.32bit.stderr b/tests/ui/consts/miri_unleashed/const_refers_to_static_cross_crate.32bit.stderr deleted file mode 100644 index db7e8b6847a..00000000000 --- a/tests/ui/consts/miri_unleashed/const_refers_to_static_cross_crate.32bit.stderr +++ /dev/null @@ -1,89 +0,0 @@ -error[E0080]: it is undefined behavior to use this value - --> $DIR/const_refers_to_static_cross_crate.rs:11:1 - | -LL | const SLICE_MUT: &[u8; 1] = { - | ^^^^^^^^^^^^^^^^^^^^^^^^^ constructing invalid value: encountered reference to mutable memory in `const` - | - = note: The rules on what exactly is undefined behavior aren't clear, so this check might be overzealous. Please open an issue on the rustc repository if you believe it should not be considered undefined behavior. - = note: the raw bytes of the constant (size: 4, align: 4) { - ╾ALLOC0╼ │ ╾──╼ - } - -error: could not evaluate constant pattern - --> $DIR/const_refers_to_static_cross_crate.rs:39:9 - | -LL | SLICE_MUT => true, - | ^^^^^^^^^ - -error[E0080]: it is undefined behavior to use this value - --> $DIR/const_refers_to_static_cross_crate.rs:16:1 - | -LL | const U8_MUT: &u8 = { - | ^^^^^^^^^^^^^^^^^ constructing invalid value: encountered reference to mutable memory in `const` - | - = note: The rules on what exactly is undefined behavior aren't clear, so this check might be overzealous. Please open an issue on the rustc repository if you believe it should not be considered undefined behavior. - = note: the raw bytes of the constant (size: 4, align: 4) { - ╾ALLOC0╼ │ ╾──╼ - } - -error: could not evaluate constant pattern - --> $DIR/const_refers_to_static_cross_crate.rs:47:9 - | -LL | U8_MUT => true, - | ^^^^^^ - -error[E0080]: it is undefined behavior to use this value - --> $DIR/const_refers_to_static_cross_crate.rs:22:1 - | -LL | const U8_MUT2: &u8 = { - | ^^^^^^^^^^^^^^^^^^ constructing invalid value: encountered reference to mutable memory in `const` - | - = note: The rules on what exactly is undefined behavior aren't clear, so this check might be overzealous. Please open an issue on the rustc repository if you believe it should not be considered undefined behavior. - = note: the raw bytes of the constant (size: 4, align: 4) { - ╾ALLOC0╼ │ ╾──╼ - } - -error: could not evaluate constant pattern - --> $DIR/const_refers_to_static_cross_crate.rs:57:9 - | -LL | U8_MUT2 => true, - | ^^^^^^^ - -error[E0080]: evaluation of constant value failed - --> $DIR/const_refers_to_static_cross_crate.rs:28:15 - | -LL | match static_cross_crate::OPT_ZERO { - | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^ constant accesses mutable global memory - -error: could not evaluate constant pattern - --> $DIR/const_refers_to_static_cross_crate.rs:64:9 - | -LL | U8_MUT3 => true, - | ^^^^^^^ - -warning: skipping const checks - | -help: skipping check for `const_refs_to_static` feature - --> $DIR/const_refers_to_static_cross_crate.rs:13:15 - | -LL | unsafe { &static_cross_crate::ZERO } - | ^^^^^^^^^^^^^^^^^^^^^^^^ -help: skipping check for `const_refs_to_static` feature - --> $DIR/const_refers_to_static_cross_crate.rs:18:15 - | -LL | unsafe { &static_cross_crate::ZERO[0] } - | ^^^^^^^^^^^^^^^^^^^^^^^^ -help: skipping check for `const_refs_to_static` feature - --> $DIR/const_refers_to_static_cross_crate.rs:24:17 - | -LL | unsafe { &(*static_cross_crate::ZERO_REF)[0] } - | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^ -help: skipping check for `const_refs_to_static` feature - --> $DIR/const_refers_to_static_cross_crate.rs:28:15 - | -LL | match static_cross_crate::OPT_ZERO { - | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^ - -error: aborting due to 8 previous errors; 1 warning emitted - -For more information about this error, try `rustc --explain E0080`. diff --git a/tests/ui/consts/miri_unleashed/const_refers_to_static_cross_crate.64bit.stderr b/tests/ui/consts/miri_unleashed/const_refers_to_static_cross_crate.64bit.stderr deleted file mode 100644 index 200faf35587..00000000000 --- a/tests/ui/consts/miri_unleashed/const_refers_to_static_cross_crate.64bit.stderr +++ /dev/null @@ -1,89 +0,0 @@ -error[E0080]: it is undefined behavior to use this value - --> $DIR/const_refers_to_static_cross_crate.rs:11:1 - | -LL | const SLICE_MUT: &[u8; 1] = { - | ^^^^^^^^^^^^^^^^^^^^^^^^^ constructing invalid value: encountered reference to mutable memory in `const` - | - = note: The rules on what exactly is undefined behavior aren't clear, so this check might be overzealous. Please open an issue on the rustc repository if you believe it should not be considered undefined behavior. - = note: the raw bytes of the constant (size: 8, align: 8) { - ╾ALLOC0╼ │ ╾──────╼ - } - -error: could not evaluate constant pattern - --> $DIR/const_refers_to_static_cross_crate.rs:39:9 - | -LL | SLICE_MUT => true, - | ^^^^^^^^^ - -error[E0080]: it is undefined behavior to use this value - --> $DIR/const_refers_to_static_cross_crate.rs:16:1 - | -LL | const U8_MUT: &u8 = { - | ^^^^^^^^^^^^^^^^^ constructing invalid value: encountered reference to mutable memory in `const` - | - = note: The rules on what exactly is undefined behavior aren't clear, so this check might be overzealous. Please open an issue on the rustc repository if you believe it should not be considered undefined behavior. - = note: the raw bytes of the constant (size: 8, align: 8) { - ╾ALLOC0╼ │ ╾──────╼ - } - -error: could not evaluate constant pattern - --> $DIR/const_refers_to_static_cross_crate.rs:47:9 - | -LL | U8_MUT => true, - | ^^^^^^ - -error[E0080]: it is undefined behavior to use this value - --> $DIR/const_refers_to_static_cross_crate.rs:22:1 - | -LL | const U8_MUT2: &u8 = { - | ^^^^^^^^^^^^^^^^^^ constructing invalid value: encountered reference to mutable memory in `const` - | - = note: The rules on what exactly is undefined behavior aren't clear, so this check might be overzealous. Please open an issue on the rustc repository if you believe it should not be considered undefined behavior. - = note: the raw bytes of the constant (size: 8, align: 8) { - ╾ALLOC0╼ │ ╾──────╼ - } - -error: could not evaluate constant pattern - --> $DIR/const_refers_to_static_cross_crate.rs:57:9 - | -LL | U8_MUT2 => true, - | ^^^^^^^ - -error[E0080]: evaluation of constant value failed - --> $DIR/const_refers_to_static_cross_crate.rs:28:15 - | -LL | match static_cross_crate::OPT_ZERO { - | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^ constant accesses mutable global memory - -error: could not evaluate constant pattern - --> $DIR/const_refers_to_static_cross_crate.rs:64:9 - | -LL | U8_MUT3 => true, - | ^^^^^^^ - -warning: skipping const checks - | -help: skipping check for `const_refs_to_static` feature - --> $DIR/const_refers_to_static_cross_crate.rs:13:15 - | -LL | unsafe { &static_cross_crate::ZERO } - | ^^^^^^^^^^^^^^^^^^^^^^^^ -help: skipping check for `const_refs_to_static` feature - --> $DIR/const_refers_to_static_cross_crate.rs:18:15 - | -LL | unsafe { &static_cross_crate::ZERO[0] } - | ^^^^^^^^^^^^^^^^^^^^^^^^ -help: skipping check for `const_refs_to_static` feature - --> $DIR/const_refers_to_static_cross_crate.rs:24:17 - | -LL | unsafe { &(*static_cross_crate::ZERO_REF)[0] } - | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^ -help: skipping check for `const_refs_to_static` feature - --> $DIR/const_refers_to_static_cross_crate.rs:28:15 - | -LL | match static_cross_crate::OPT_ZERO { - | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^ - -error: aborting due to 8 previous errors; 1 warning emitted - -For more information about this error, try `rustc --explain E0080`. diff --git a/tests/ui/consts/miri_unleashed/const_refers_to_static_cross_crate.rs b/tests/ui/consts/miri_unleashed/const_refers_to_static_cross_crate.rs index bcd29f8b034..783b3d18051 100644 --- a/tests/ui/consts/miri_unleashed/const_refers_to_static_cross_crate.rs +++ b/tests/ui/consts/miri_unleashed/const_refers_to_static_cross_crate.rs @@ -1,6 +1,7 @@ // compile-flags: -Zunleash-the-miri-inside-of-you // aux-build:static_cross_crate.rs -// stderr-per-bitwidth +// normalize-stderr-test "(the raw bytes of the constant) \(size: [0-9]*, align: [0-9]*\)" -> "$1 (size: $$SIZE, align: $$ALIGN)" +// normalize-stderr-test "([0-9a-f][0-9a-f] |╾─*ALLOC[0-9]+(\+[a-z0-9]+)?()?─*╼ )+ *│.*" -> "HEX_DUMP" #![feature(exclusive_range_pattern, half_open_range_patterns_in_slices)] #![allow(static_mut_ref)] diff --git a/tests/ui/consts/miri_unleashed/const_refers_to_static_cross_crate.stderr b/tests/ui/consts/miri_unleashed/const_refers_to_static_cross_crate.stderr new file mode 100644 index 00000000000..7b22fa4399f --- /dev/null +++ b/tests/ui/consts/miri_unleashed/const_refers_to_static_cross_crate.stderr @@ -0,0 +1,89 @@ +error[E0080]: it is undefined behavior to use this value + --> $DIR/const_refers_to_static_cross_crate.rs:12:1 + | +LL | const SLICE_MUT: &[u8; 1] = { + | ^^^^^^^^^^^^^^^^^^^^^^^^^ constructing invalid value: encountered reference to mutable memory in `const` + | + = note: The rules on what exactly is undefined behavior aren't clear, so this check might be overzealous. Please open an issue on the rustc repository if you believe it should not be considered undefined behavior. + = note: the raw bytes of the constant (size: $SIZE, align: $ALIGN) { + HEX_DUMP + } + +error: could not evaluate constant pattern + --> $DIR/const_refers_to_static_cross_crate.rs:40:9 + | +LL | SLICE_MUT => true, + | ^^^^^^^^^ + +error[E0080]: it is undefined behavior to use this value + --> $DIR/const_refers_to_static_cross_crate.rs:17:1 + | +LL | const U8_MUT: &u8 = { + | ^^^^^^^^^^^^^^^^^ constructing invalid value: encountered reference to mutable memory in `const` + | + = note: The rules on what exactly is undefined behavior aren't clear, so this check might be overzealous. Please open an issue on the rustc repository if you believe it should not be considered undefined behavior. + = note: the raw bytes of the constant (size: $SIZE, align: $ALIGN) { + HEX_DUMP + } + +error: could not evaluate constant pattern + --> $DIR/const_refers_to_static_cross_crate.rs:48:9 + | +LL | U8_MUT => true, + | ^^^^^^ + +error[E0080]: it is undefined behavior to use this value + --> $DIR/const_refers_to_static_cross_crate.rs:23:1 + | +LL | const U8_MUT2: &u8 = { + | ^^^^^^^^^^^^^^^^^^ constructing invalid value: encountered reference to mutable memory in `const` + | + = note: The rules on what exactly is undefined behavior aren't clear, so this check might be overzealous. Please open an issue on the rustc repository if you believe it should not be considered undefined behavior. + = note: the raw bytes of the constant (size: $SIZE, align: $ALIGN) { + HEX_DUMP + } + +error: could not evaluate constant pattern + --> $DIR/const_refers_to_static_cross_crate.rs:58:9 + | +LL | U8_MUT2 => true, + | ^^^^^^^ + +error[E0080]: evaluation of constant value failed + --> $DIR/const_refers_to_static_cross_crate.rs:29:15 + | +LL | match static_cross_crate::OPT_ZERO { + | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^ constant accesses mutable global memory + +error: could not evaluate constant pattern + --> $DIR/const_refers_to_static_cross_crate.rs:65:9 + | +LL | U8_MUT3 => true, + | ^^^^^^^ + +warning: skipping const checks + | +help: skipping check for `const_refs_to_static` feature + --> $DIR/const_refers_to_static_cross_crate.rs:14:15 + | +LL | unsafe { &static_cross_crate::ZERO } + | ^^^^^^^^^^^^^^^^^^^^^^^^ +help: skipping check for `const_refs_to_static` feature + --> $DIR/const_refers_to_static_cross_crate.rs:19:15 + | +LL | unsafe { &static_cross_crate::ZERO[0] } + | ^^^^^^^^^^^^^^^^^^^^^^^^ +help: skipping check for `const_refs_to_static` feature + --> $DIR/const_refers_to_static_cross_crate.rs:25:17 + | +LL | unsafe { &(*static_cross_crate::ZERO_REF)[0] } + | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^ +help: skipping check for `const_refs_to_static` feature + --> $DIR/const_refers_to_static_cross_crate.rs:29:15 + | +LL | match static_cross_crate::OPT_ZERO { + | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^ + +error: aborting due to 8 previous errors; 1 warning emitted + +For more information about this error, try `rustc --explain E0080`. -- cgit 1.4.1-3-g733a5 From 2611fac03fbb9fa79e7550f968d08f4815fb8d86 Mon Sep 17 00:00:00 2001 From: Ralf Jung Date: Fri, 16 Feb 2024 10:06:23 +0100 Subject: add back some more attempts at having &mut in the final value of a const/static --- .../mut_ref_in_final_dynamic_check.rs | 20 +++++++++- .../mut_ref_in_final_dynamic_check.stderr | 44 +++++++++++++++++++--- 2 files changed, 57 insertions(+), 7 deletions(-) diff --git a/tests/ui/consts/const-mut-refs/mut_ref_in_final_dynamic_check.rs b/tests/ui/consts/const-mut-refs/mut_ref_in_final_dynamic_check.rs index 081353a47c8..331c2de55cc 100644 --- a/tests/ui/consts/const-mut-refs/mut_ref_in_final_dynamic_check.rs +++ b/tests/ui/consts/const-mut-refs/mut_ref_in_final_dynamic_check.rs @@ -14,9 +14,25 @@ static mut BUFFER: i32 = 42; const fn helper() -> Option<&'static mut i32> { unsafe { Some(&mut *std::ptr::addr_of_mut!(BUFFER)) } } -const A: Option<&mut i32> = helper(); //~ ERROR it is undefined behavior to use this value +const MUT: Option<&mut i32> = helper(); //~ ERROR it is undefined behavior to use this value //~^ encountered mutable reference -static A_STATIC: Option<&mut i32> = helper(); //~ ERROR it is undefined behavior to use this value +static MUT_STATIC: Option<&mut i32> = helper(); //~ ERROR it is undefined behavior to use this value //~^ encountered mutable reference +const fn helper_int2ptr() -> Option<&'static mut i32> { unsafe { + // Undefined behaviour (integer as pointer), who doesn't love tests like this. + Some(&mut *(42 as *mut i32)) +} } +const INT2PTR: Option<&mut i32> = helper_int2ptr(); //~ ERROR it is undefined behavior to use this value +//~^ encountered a dangling reference +static INT2PTR_STATIC: Option<&mut i32> = helper_int2ptr(); //~ ERROR it is undefined behavior to use this value +//~^ encountered a dangling reference + +const fn helper_dangling() -> Option<&'static mut i32> { unsafe { + // Undefined behaviour (dangling pointer), who doesn't love tests like this. + Some(&mut *(&mut 42 as *mut i32)) +} } +const DANGLING: Option<&mut i32> = helper_dangling(); //~ ERROR encountered dangling pointer +static DANGLING_STATIC: Option<&mut i32> = helper_dangling(); //~ ERROR encountered dangling pointer + fn main() {} diff --git a/tests/ui/consts/const-mut-refs/mut_ref_in_final_dynamic_check.stderr b/tests/ui/consts/const-mut-refs/mut_ref_in_final_dynamic_check.stderr index 8625c445f99..a7cd32a7c5f 100644 --- a/tests/ui/consts/const-mut-refs/mut_ref_in_final_dynamic_check.stderr +++ b/tests/ui/consts/const-mut-refs/mut_ref_in_final_dynamic_check.stderr @@ -1,8 +1,8 @@ error[E0080]: it is undefined behavior to use this value --> $DIR/mut_ref_in_final_dynamic_check.rs:17:1 | -LL | const A: Option<&mut i32> = helper(); - | ^^^^^^^^^^^^^^^^^^^^^^^^^ constructing invalid value at ..0: encountered mutable reference in a `const` or `static` +LL | const MUT: Option<&mut i32> = helper(); + | ^^^^^^^^^^^^^^^^^^^^^^^^^^^ constructing invalid value at ..0: encountered mutable reference in a `const` or `static` | = note: The rules on what exactly is undefined behavior aren't clear, so this check might be overzealous. Please open an issue on the rustc repository if you believe it should not be considered undefined behavior. = note: the raw bytes of the constant (size: $SIZE, align: $ALIGN) { @@ -12,14 +12,48 @@ LL | const A: Option<&mut i32> = helper(); error[E0080]: it is undefined behavior to use this value --> $DIR/mut_ref_in_final_dynamic_check.rs:19:1 | -LL | static A_STATIC: Option<&mut i32> = helper(); - | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ constructing invalid value at ..0: encountered mutable reference in a `const` or `static` +LL | static MUT_STATIC: Option<&mut i32> = helper(); + | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ constructing invalid value at ..0: encountered mutable reference in a `const` or `static` | = note: The rules on what exactly is undefined behavior aren't clear, so this check might be overzealous. Please open an issue on the rustc repository if you believe it should not be considered undefined behavior. = note: the raw bytes of the constant (size: $SIZE, align: $ALIGN) { HEX_DUMP } -error: aborting due to 2 previous errors +error[E0080]: it is undefined behavior to use this value + --> $DIR/mut_ref_in_final_dynamic_check.rs:26:1 + | +LL | const INT2PTR: Option<&mut i32> = helper_int2ptr(); + | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ constructing invalid value at ..0: encountered a dangling reference (0x2a[noalloc] has no provenance) + | + = note: The rules on what exactly is undefined behavior aren't clear, so this check might be overzealous. Please open an issue on the rustc repository if you believe it should not be considered undefined behavior. + = note: the raw bytes of the constant (size: $SIZE, align: $ALIGN) { + HEX_DUMP + } + +error[E0080]: it is undefined behavior to use this value + --> $DIR/mut_ref_in_final_dynamic_check.rs:28:1 + | +LL | static INT2PTR_STATIC: Option<&mut i32> = helper_int2ptr(); + | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ constructing invalid value at ..0: encountered a dangling reference (0x2a[noalloc] has no provenance) + | + = note: The rules on what exactly is undefined behavior aren't clear, so this check might be overzealous. Please open an issue on the rustc repository if you believe it should not be considered undefined behavior. + = note: the raw bytes of the constant (size: $SIZE, align: $ALIGN) { + HEX_DUMP + } + +error: encountered dangling pointer in final value of constant + --> $DIR/mut_ref_in_final_dynamic_check.rs:35:1 + | +LL | const DANGLING: Option<&mut i32> = helper_dangling(); + | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ + +error: encountered dangling pointer in final value of static + --> $DIR/mut_ref_in_final_dynamic_check.rs:36:1 + | +LL | static DANGLING_STATIC: Option<&mut i32> = helper_dangling(); + | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ + +error: aborting due to 6 previous errors For more information about this error, try `rustc --explain E0080`. -- cgit 1.4.1-3-g733a5 From d3fc69ae450530dffa0f307ef2cb669c7b0a1c3b Mon Sep 17 00:00:00 2001 From: Ralf Jung Date: Fri, 16 Feb 2024 11:35:20 +0100 Subject: add test ensuring we detect a static actually having a mutable reference --- .../mut_ref_in_final_dynamic_check.rs | 12 ++++++++++- .../mut_ref_in_final_dynamic_check.stderr | 25 ++++++++++++++++------ 2 files changed, 29 insertions(+), 8 deletions(-) diff --git a/tests/ui/consts/const-mut-refs/mut_ref_in_final_dynamic_check.rs b/tests/ui/consts/const-mut-refs/mut_ref_in_final_dynamic_check.rs index 331c2de55cc..19f0ad8a5a4 100644 --- a/tests/ui/consts/const-mut-refs/mut_ref_in_final_dynamic_check.rs +++ b/tests/ui/consts/const-mut-refs/mut_ref_in_final_dynamic_check.rs @@ -1,8 +1,11 @@ // normalize-stderr-test "(the raw bytes of the constant) \(size: [0-9]*, align: [0-9]*\)" -> "$1 (size: $$SIZE, align: $$ALIGN)" -// normalize-stderr-test "([0-9a-f][0-9a-f] |╾─*ALLOC[0-9]+(\+[a-z0-9]+)?()?─*╼ )+ *│.*" -> "HEX_DUMP" +// normalize-stderr-test "( 0x[0-9a-f][0-9a-f] │)? ([0-9a-f][0-9a-f] |__ |╾─*ALLOC[0-9]+(\+[a-z0-9]+)?()?─*╼ )+ *│.*" -> " HEX_DUMP" +// normalize-stderr-test "HEX_DUMP\s*\n\s*HEX_DUMP" -> "HEX_DUMP" #![feature(const_mut_refs, const_refs_to_static)] #![feature(raw_ref_op)] +use std::sync::Mutex; + // This file checks that our dynamic checks catch things that the static checks miss. // We do not have static checks for these, because we do not look into function bodies. // We treat all functions as not returning a mutable reference, because there is no way to @@ -35,4 +38,11 @@ const fn helper_dangling() -> Option<&'static mut i32> { unsafe { const DANGLING: Option<&mut i32> = helper_dangling(); //~ ERROR encountered dangling pointer static DANGLING_STATIC: Option<&mut i32> = helper_dangling(); //~ ERROR encountered dangling pointer +// Variant of the real-world case in . +// Maybe we should allow this in the future (then the rest should move to `const_mut_refs.rs`), +// but for now we reject it. +static mut MUT_ARRAY: &mut [u8] = &mut [42]; +static MUTEX: Mutex<&mut [u8]> = Mutex::new(unsafe { &mut *MUT_ARRAY }); //~ ERROR it is undefined behavior to use this value +//~^ encountered mutable reference + fn main() {} diff --git a/tests/ui/consts/const-mut-refs/mut_ref_in_final_dynamic_check.stderr b/tests/ui/consts/const-mut-refs/mut_ref_in_final_dynamic_check.stderr index a7cd32a7c5f..a99d1584932 100644 --- a/tests/ui/consts/const-mut-refs/mut_ref_in_final_dynamic_check.stderr +++ b/tests/ui/consts/const-mut-refs/mut_ref_in_final_dynamic_check.stderr @@ -1,5 +1,5 @@ error[E0080]: it is undefined behavior to use this value - --> $DIR/mut_ref_in_final_dynamic_check.rs:17:1 + --> $DIR/mut_ref_in_final_dynamic_check.rs:20:1 | LL | const MUT: Option<&mut i32> = helper(); | ^^^^^^^^^^^^^^^^^^^^^^^^^^^ constructing invalid value at ..0: encountered mutable reference in a `const` or `static` @@ -10,7 +10,7 @@ LL | const MUT: Option<&mut i32> = helper(); } error[E0080]: it is undefined behavior to use this value - --> $DIR/mut_ref_in_final_dynamic_check.rs:19:1 + --> $DIR/mut_ref_in_final_dynamic_check.rs:22:1 | LL | static MUT_STATIC: Option<&mut i32> = helper(); | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ constructing invalid value at ..0: encountered mutable reference in a `const` or `static` @@ -21,7 +21,7 @@ LL | static MUT_STATIC: Option<&mut i32> = helper(); } error[E0080]: it is undefined behavior to use this value - --> $DIR/mut_ref_in_final_dynamic_check.rs:26:1 + --> $DIR/mut_ref_in_final_dynamic_check.rs:29:1 | LL | const INT2PTR: Option<&mut i32> = helper_int2ptr(); | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ constructing invalid value at ..0: encountered a dangling reference (0x2a[noalloc] has no provenance) @@ -32,7 +32,7 @@ LL | const INT2PTR: Option<&mut i32> = helper_int2ptr(); } error[E0080]: it is undefined behavior to use this value - --> $DIR/mut_ref_in_final_dynamic_check.rs:28:1 + --> $DIR/mut_ref_in_final_dynamic_check.rs:31:1 | LL | static INT2PTR_STATIC: Option<&mut i32> = helper_int2ptr(); | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ constructing invalid value at ..0: encountered a dangling reference (0x2a[noalloc] has no provenance) @@ -43,17 +43,28 @@ LL | static INT2PTR_STATIC: Option<&mut i32> = helper_int2ptr(); } error: encountered dangling pointer in final value of constant - --> $DIR/mut_ref_in_final_dynamic_check.rs:35:1 + --> $DIR/mut_ref_in_final_dynamic_check.rs:38:1 | LL | const DANGLING: Option<&mut i32> = helper_dangling(); | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ error: encountered dangling pointer in final value of static - --> $DIR/mut_ref_in_final_dynamic_check.rs:36:1 + --> $DIR/mut_ref_in_final_dynamic_check.rs:39:1 | LL | static DANGLING_STATIC: Option<&mut i32> = helper_dangling(); | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ -error: aborting due to 6 previous errors +error[E0080]: it is undefined behavior to use this value + --> $DIR/mut_ref_in_final_dynamic_check.rs:45:1 + | +LL | static MUTEX: Mutex<&mut [u8]> = Mutex::new(unsafe { &mut *MUT_ARRAY }); + | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ constructing invalid value at .data.value: encountered mutable reference in a `const` or `static` + | + = note: The rules on what exactly is undefined behavior aren't clear, so this check might be overzealous. Please open an issue on the rustc repository if you believe it should not be considered undefined behavior. + = note: the raw bytes of the constant (size: $SIZE, align: $ALIGN) { + HEX_DUMP + } + +error: aborting due to 7 previous errors For more information about this error, try `rustc --explain E0080`. -- cgit 1.4.1-3-g733a5 From e53d6dd35bb38b81dff4b00497f4c152e9009499 Mon Sep 17 00:00:00 2001 From: "č®øę°å‹ Jieyou Xu (Joe)" Date: Sat, 10 Feb 2024 14:33:31 +0000 Subject: Implement infra support for migrating from `//` to `//@` ui test directives --- src/tools/compiletest/src/header.rs | 710 ++++++++++++++++++++---------- src/tools/compiletest/src/header/tests.rs | 147 ++++--- src/tools/tidy/src/style.rs | 13 +- src/tools/tidy/src/ui_tests.rs | 3 +- tests/ui/README.md | 35 ++ tests/ui/symbol-names/x86-stdcall.rs | 1 + 6 files changed, 607 insertions(+), 302 deletions(-) create mode 100644 tests/ui/README.md diff --git a/src/tools/compiletest/src/header.rs b/src/tools/compiletest/src/header.rs index daec3914145..4ceb8a646e0 100644 --- a/src/tools/compiletest/src/header.rs +++ b/src/tools/compiletest/src/header.rs @@ -6,6 +6,7 @@ use std::io::BufReader; use std::path::{Path, PathBuf}; use std::process::Command; +use regex::Regex; use tracing::*; use crate::common::{Config, Debugger, FailMode, Mode, PassMode}; @@ -46,18 +47,32 @@ impl EarlyProps { pub fn from_reader(config: &Config, testfile: &Path, rdr: R) -> Self { let mut props = EarlyProps::default(); - iter_header(testfile, rdr, &mut |_, ln, _| { - config.push_name_value_directive(ln, directives::AUX_BUILD, &mut props.aux, |r| { - r.trim().to_string() - }); - config.push_name_value_directive( - ln, - directives::AUX_CRATE, - &mut props.aux_crate, - Config::parse_aux_crate, - ); - config.parse_and_update_revisions(ln, &mut props.revisions); - }); + let mut poisoned = false; + iter_header( + config.mode, + &config.suite, + &mut poisoned, + testfile, + rdr, + &mut |_, _, ln, _| { + config.push_name_value_directive(ln, directives::AUX_BUILD, &mut props.aux, |r| { + r.trim().to_string() + }); + config.push_name_value_directive( + ln, + directives::AUX_CRATE, + &mut props.aux_crate, + Config::parse_aux_crate, + ); + config.parse_and_update_revisions(ln, &mut props.revisions); + }, + ); + + if poisoned { + eprintln!("errors encountered during EarlyProps parsing: {}", testfile.display()); + panic!("errors encountered during EarlyProps parsing"); + } + return props; } } @@ -306,205 +321,233 @@ impl TestProps { if !testfile.is_dir() { let file = File::open(testfile).unwrap(); - iter_header(testfile, file, &mut |revision, ln, _| { - if revision.is_some() && revision != cfg { - return; - } + let mut poisoned = false; - use directives::*; + iter_header( + config.mode, + &config.suite, + &mut poisoned, + testfile, + file, + &mut |revision, _, ln, _| { + if revision.is_some() && revision != cfg { + return; + } - config.push_name_value_directive( - ln, - ERROR_PATTERN, - &mut self.error_patterns, - |r| r, - ); - config.push_name_value_directive( - ln, - REGEX_ERROR_PATTERN, - &mut self.regex_error_patterns, - |r| r, - ); + use directives::*; + + config.push_name_value_directive( + ln, + ERROR_PATTERN, + &mut self.error_patterns, + |r| r, + ); + config.push_name_value_directive( + ln, + REGEX_ERROR_PATTERN, + &mut self.regex_error_patterns, + |r| r, + ); - fn split_flags(flags: &str) -> Vec { - // Individual flags can be single-quoted to preserve spaces; see - // . - flags - .split("'") - .enumerate() - .flat_map( - |(i, f)| { + fn split_flags(flags: &str) -> Vec { + // Individual flags can be single-quoted to preserve spaces; see + // . + flags + .split("'") + .enumerate() + .flat_map(|(i, f)| { if i % 2 == 1 { vec![f] } else { f.split_whitespace().collect() } - }, - ) - .map(move |s| s.to_owned()) - .collect::>() - } + }) + .map(move |s| s.to_owned()) + .collect::>() + } - if let Some(flags) = config.parse_name_value_directive(ln, COMPILE_FLAGS) { - self.compile_flags.extend(split_flags(&flags)); - } - if config.parse_name_value_directive(ln, INCORRECT_COMPILER_FLAGS).is_some() { - panic!("`compiler-flags` directive should be spelled `compile-flags`"); - } + if let Some(flags) = config.parse_name_value_directive(ln, COMPILE_FLAGS) { + self.compile_flags.extend(split_flags(&flags)); + } + if config.parse_name_value_directive(ln, INCORRECT_COMPILER_FLAGS).is_some() { + panic!("`compiler-flags` directive should be spelled `compile-flags`"); + } - if let Some(edition) = config.parse_edition(ln) { - self.compile_flags.push(format!("--edition={}", edition.trim())); - has_edition = true; - } + if let Some(edition) = config.parse_edition(ln) { + self.compile_flags.push(format!("--edition={}", edition.trim())); + has_edition = true; + } - config.parse_and_update_revisions(ln, &mut self.revisions); + config.parse_and_update_revisions(ln, &mut self.revisions); - config.set_name_value_directive(ln, RUN_FLAGS, &mut self.run_flags, |r| r); + config.set_name_value_directive(ln, RUN_FLAGS, &mut self.run_flags, |r| r); - if self.pp_exact.is_none() { - self.pp_exact = config.parse_pp_exact(ln, testfile); - } + if self.pp_exact.is_none() { + self.pp_exact = config.parse_pp_exact(ln, testfile); + } - config.set_name_directive(ln, SHOULD_ICE, &mut self.should_ice); - config.set_name_directive(ln, BUILD_AUX_DOCS, &mut self.build_aux_docs); - config.set_name_directive(ln, FORCE_HOST, &mut self.force_host); - config.set_name_directive(ln, CHECK_STDOUT, &mut self.check_stdout); - config.set_name_directive(ln, CHECK_RUN_RESULTS, &mut self.check_run_results); - config.set_name_directive( - ln, - DONT_CHECK_COMPILER_STDOUT, - &mut self.dont_check_compiler_stdout, - ); - config.set_name_directive( - ln, - DONT_CHECK_COMPILER_STDERR, - &mut self.dont_check_compiler_stderr, - ); - config.set_name_directive(ln, NO_PREFER_DYNAMIC, &mut self.no_prefer_dynamic); - config.set_name_directive(ln, PRETTY_EXPANDED, &mut self.pretty_expanded); + config.set_name_directive(ln, SHOULD_ICE, &mut self.should_ice); + config.set_name_directive(ln, BUILD_AUX_DOCS, &mut self.build_aux_docs); + config.set_name_directive(ln, FORCE_HOST, &mut self.force_host); + config.set_name_directive(ln, CHECK_STDOUT, &mut self.check_stdout); + config.set_name_directive(ln, CHECK_RUN_RESULTS, &mut self.check_run_results); + config.set_name_directive( + ln, + DONT_CHECK_COMPILER_STDOUT, + &mut self.dont_check_compiler_stdout, + ); + config.set_name_directive( + ln, + DONT_CHECK_COMPILER_STDERR, + &mut self.dont_check_compiler_stderr, + ); + config.set_name_directive(ln, NO_PREFER_DYNAMIC, &mut self.no_prefer_dynamic); + config.set_name_directive(ln, PRETTY_EXPANDED, &mut self.pretty_expanded); - if let Some(m) = config.parse_name_value_directive(ln, PRETTY_MODE) { - self.pretty_mode = m; - } + if let Some(m) = config.parse_name_value_directive(ln, PRETTY_MODE) { + self.pretty_mode = m; + } - config.set_name_directive(ln, PRETTY_COMPARE_ONLY, &mut self.pretty_compare_only); - config.push_name_value_directive(ln, AUX_BUILD, &mut self.aux_builds, |r| { - r.trim().to_string() - }); - config.push_name_value_directive( - ln, - AUX_CRATE, - &mut self.aux_crates, - Config::parse_aux_crate, - ); - config.push_name_value_directive( - ln, - EXEC_ENV, - &mut self.exec_env, - Config::parse_env, - ); - config.push_name_value_directive( - ln, - UNSET_EXEC_ENV, - &mut self.unset_exec_env, - |r| r, - ); - config.push_name_value_directive( - ln, - RUSTC_ENV, - &mut self.rustc_env, - Config::parse_env, - ); - config.push_name_value_directive( - ln, - UNSET_RUSTC_ENV, - &mut self.unset_rustc_env, - |r| r, - ); - config.push_name_value_directive(ln, FORBID_OUTPUT, &mut self.forbid_output, |r| r); - config.set_name_directive( - ln, - CHECK_TEST_LINE_NUMBERS_MATCH, - &mut self.check_test_line_numbers_match, - ); + config.set_name_directive( + ln, + PRETTY_COMPARE_ONLY, + &mut self.pretty_compare_only, + ); + config.push_name_value_directive(ln, AUX_BUILD, &mut self.aux_builds, |r| { + r.trim().to_string() + }); + config.push_name_value_directive( + ln, + AUX_CRATE, + &mut self.aux_crates, + Config::parse_aux_crate, + ); + config.push_name_value_directive( + ln, + EXEC_ENV, + &mut self.exec_env, + Config::parse_env, + ); + config.push_name_value_directive( + ln, + UNSET_EXEC_ENV, + &mut self.unset_exec_env, + |r| r, + ); + config.push_name_value_directive( + ln, + RUSTC_ENV, + &mut self.rustc_env, + Config::parse_env, + ); + config.push_name_value_directive( + ln, + UNSET_RUSTC_ENV, + &mut self.unset_rustc_env, + |r| r, + ); + config.push_name_value_directive( + ln, + FORBID_OUTPUT, + &mut self.forbid_output, + |r| r, + ); + config.set_name_directive( + ln, + CHECK_TEST_LINE_NUMBERS_MATCH, + &mut self.check_test_line_numbers_match, + ); - self.update_pass_mode(ln, cfg, config); - self.update_fail_mode(ln, config); + self.update_pass_mode(ln, cfg, config); + self.update_fail_mode(ln, config); - config.set_name_directive(ln, IGNORE_PASS, &mut self.ignore_pass); + config.set_name_directive(ln, IGNORE_PASS, &mut self.ignore_pass); - if let Some(rule) = config.parse_custom_normalization(ln, "normalize-stdout") { - self.normalize_stdout.push(rule); - } - if let Some(rule) = config.parse_custom_normalization(ln, "normalize-stderr") { - self.normalize_stderr.push(rule); - } + if let Some(rule) = config.parse_custom_normalization(ln, "normalize-stdout") { + self.normalize_stdout.push(rule); + } + if let Some(rule) = config.parse_custom_normalization(ln, "normalize-stderr") { + self.normalize_stderr.push(rule); + } - if let Some(code) = config - .parse_name_value_directive(ln, FAILURE_STATUS) - .and_then(|code| code.trim().parse::().ok()) - { - self.failure_status = Some(code); - } + if let Some(code) = config + .parse_name_value_directive(ln, FAILURE_STATUS) + .and_then(|code| code.trim().parse::().ok()) + { + self.failure_status = Some(code); + } - config.set_name_directive( - ln, - DONT_CHECK_FAILURE_STATUS, - &mut self.dont_check_failure_status, - ); + config.set_name_directive( + ln, + DONT_CHECK_FAILURE_STATUS, + &mut self.dont_check_failure_status, + ); - config.set_name_directive(ln, RUN_RUSTFIX, &mut self.run_rustfix); - config.set_name_directive( - ln, - RUSTFIX_ONLY_MACHINE_APPLICABLE, - &mut self.rustfix_only_machine_applicable, - ); - config.set_name_value_directive( - ln, - ASSEMBLY_OUTPUT, - &mut self.assembly_output, - |r| r.trim().to_string(), - ); - config.set_name_directive(ln, STDERR_PER_BITWIDTH, &mut self.stderr_per_bitwidth); - config.set_name_directive(ln, INCREMENTAL, &mut self.incremental); - - // Unlike the other `name_value_directive`s this needs to be handled manually, - // because it sets a `bool` flag. - if let Some(known_bug) = config.parse_name_value_directive(ln, KNOWN_BUG) { - let known_bug = known_bug.trim(); - if known_bug == "unknown" - || known_bug.split(',').all(|issue_ref| { - issue_ref - .trim() - .split_once('#') - .filter(|(_, number)| { - number.chars().all(|digit| digit.is_numeric()) - }) - .is_some() - }) - { - self.known_bug = true; - } else { + config.set_name_directive(ln, RUN_RUSTFIX, &mut self.run_rustfix); + config.set_name_directive( + ln, + RUSTFIX_ONLY_MACHINE_APPLICABLE, + &mut self.rustfix_only_machine_applicable, + ); + config.set_name_value_directive( + ln, + ASSEMBLY_OUTPUT, + &mut self.assembly_output, + |r| r.trim().to_string(), + ); + config.set_name_directive( + ln, + STDERR_PER_BITWIDTH, + &mut self.stderr_per_bitwidth, + ); + config.set_name_directive(ln, INCREMENTAL, &mut self.incremental); + + // Unlike the other `name_value_directive`s this needs to be handled manually, + // because it sets a `bool` flag. + if let Some(known_bug) = config.parse_name_value_directive(ln, KNOWN_BUG) { + let known_bug = known_bug.trim(); + if known_bug == "unknown" + || known_bug.split(',').all(|issue_ref| { + issue_ref + .trim() + .split_once('#') + .filter(|(_, number)| { + number.chars().all(|digit| digit.is_numeric()) + }) + .is_some() + }) + { + self.known_bug = true; + } else { + panic!( + "Invalid known-bug value: {known_bug}\nIt requires comma-separated issue references (`#000` or `chalk#000`) or `known-bug: unknown`." + ); + } + } else if config.parse_name_directive(ln, KNOWN_BUG) { panic!( - "Invalid known-bug value: {known_bug}\nIt requires comma-separated issue references (`#000` or `chalk#000`) or `known-bug: unknown`." + "Invalid known-bug attribute, requires comma-separated issue references (`#000` or `chalk#000`) or `known-bug: unknown`." ); } - } else if config.parse_name_directive(ln, KNOWN_BUG) { - panic!( - "Invalid known-bug attribute, requires comma-separated issue references (`#000` or `chalk#000`) or `known-bug: unknown`." + + config.set_name_value_directive( + ln, + MIR_UNIT_TEST, + &mut self.mir_unit_test, + |s| s.trim().to_string(), + ); + config.set_name_directive(ln, REMAP_SRC_BASE, &mut self.remap_src_base); + config.set_name_directive( + ln, + COMPARE_OUTPUT_LINES_BY_SUBSET, + &mut self.compare_output_lines_by_subset, ); - } - config.set_name_value_directive(ln, MIR_UNIT_TEST, &mut self.mir_unit_test, |s| { - s.trim().to_string() - }); - config.set_name_directive(ln, REMAP_SRC_BASE, &mut self.remap_src_base); - config.set_name_directive( - ln, - COMPARE_OUTPUT_LINES_BY_SUBSET, - &mut self.compare_output_lines_by_subset, - ); + if let Some(flags) = config.parse_name_value_directive(ln, LLVM_COV_FLAGS) { + self.llvm_cov_flags.extend(split_flags(&flags)); + } + }, + ); - if let Some(flags) = config.parse_name_value_directive(ln, LLVM_COV_FLAGS) { - self.llvm_cov_flags.extend(split_flags(&flags)); - } - }); + if poisoned { + eprintln!("errors encountered during TestProps parsing: {}", testfile.display()); + panic!("errors encountered during TestProps parsing"); + } } if self.should_ice { @@ -628,15 +671,143 @@ pub fn line_directive<'line>( } } -fn iter_header(testfile: &Path, rdr: R, it: &mut dyn FnMut(Option<&str>, &str, usize)) { - iter_header_extra(testfile, rdr, &[], it) +fn iter_header( + mode: Mode, + suite: &str, + poisoned: &mut bool, + testfile: &Path, + rdr: R, + it: &mut dyn FnMut(Option<&str>, &str, &str, usize), +) { + iter_header_extra(mode, suite, poisoned, testfile, rdr, &[], it) } +/// This is generated by collecting directives from ui tests and then extracting their directive +/// 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] = &[ + "aux-build", + "aux-crate", + "build-fail", + "build-pass", + "check-fail", + "check-pass", + "check-run-results", + "check-stdout", + "compile-flags", + "dont-check-compiler-stderr", + "dont-check-compiler-stdout", + "dont-check-failure-status", + "edition", + "error-pattern", + "exec-env", + "failure-status", + "forbid-output", + "force-host", + "ignore-32bit", + "ignore-64bit", + "ignore-aarch64", + "ignore-aarch64-unknown-linux-gnu", + "ignore-android", + "ignore-arm", + "ignore-compare-mode-next-solver", + "ignore-compare-mode-polonius", + "ignore-cross-compile", + "ignore-debug", + "ignore-emscripten", + "ignore-endian-big", + "ignore-freebsd", + "ignore-fuchsia", + "ignore-gnu", + "ignore-haiku", + "ignore-horizon", + "ignore-i686-pc-windows-msvc", + "ignore-ios", + "ignore-llvm-version", + "ignore-macos", + "ignore-msvc", + "ignore-musl", + "ignore-netbsd", + "ignore-nightly", + "ignore-nto", + "ignore-nvptx64", + "ignore-openbsd", + "ignore-pass", + "ignore-sgx", + "ignore-spirv", + "ignore-test", + "ignore-thumbv8m.base-none-eabi", + "ignore-thumbv8m.main-none-eabi", + "ignore-uwp", + "ignore-vxworks", + "ignore-wasm", + "ignore-wasm32", + "ignore-wasm32-bare", + "ignore-windows", + "ignore-x86", + "incremental", + "known-bug", + "min-llvm-version", + "needs-asm-support", + "needs-dlltool", + "needs-dynamic-linking", + "needs-llvm-components", + "needs-profiler-support", + "needs-relocation-model-pic", + "needs-run-enabled", + "needs-sanitizer-address", + "needs-sanitizer-cfi", + "needs-sanitizer-hwaddress", + "needs-sanitizer-leak", + "needs-sanitizer-memory", + "needs-sanitizer-support", + "needs-sanitizer-thread", + "needs-unwind", + "needs-xray", + "no-prefer-dynamic", + "normalize-stderr-32bit", + "normalize-stderr-64bit", + "normalize-stderr-test", + "normalize-stdout-test", + "only-32bit", + "only-64bit", + "only-aarch64", + "only-gnu", + "only-i686-pc-windows-msvc", + "only-linux", + "only-macos", + "only-msvc", + "only-nightly", + "only-wasm32", + "only-windows", + "only-x86", + "only-x86_64", + "only-x86_64-pc-windows-msvc", + "only-x86_64-unknown-linux-gnu", + "pp-exact", + "pretty-expanded", + "regex-error-pattern", + "remap-src-base", + "revisions", + "run-fail", + "run-flags", + "run-pass", + "run-rustfix", + "rustc-env", + "rustfix-only-machine-applicable", + "should-fail", + "stderr-per-bitwidth", + "unset-rustc-env", +]; + fn iter_header_extra( + mode: Mode, + suite: &str, + poisoned: &mut bool, testfile: &Path, rdr: impl Read, extra_directives: &[&str], - it: &mut dyn FnMut(Option<&str>, &str, usize), + it: &mut dyn FnMut(Option<&str>, &str, &str, usize), ) { if testfile.is_dir() { return; @@ -645,15 +816,21 @@ fn iter_header_extra( // Process any extra directives supplied by the caller (e.g. because they // are implied by the test mode), with a dummy line number of 0. for directive in extra_directives { - it(None, directive, 0); + it(None, directive, directive, 0); } - let comment = if testfile.extension().is_some_and(|e| e == "rs") { "//" } else { "#" }; + let comment = if testfile.extension().is_some_and(|e| e == "rs") { + if mode == Mode::Ui && suite == "ui" { "//@" } else { "//" } + } else { + "#" + }; let mut rdr = BufReader::with_capacity(1024, rdr); let mut ln = String::new(); let mut line_number = 0; + let revision_magic_comment = Regex::new("//(\\[.*\\])?~.*").unwrap(); + loop { line_number += 1; ln.clear(); @@ -664,11 +841,56 @@ fn iter_header_extra( // Assume that any directives will be found before the first // module or function. This doesn't seem to be an optimization // with a warm page cache. Maybe with a cold one. + let orig_ln = &ln; let ln = ln.trim(); if ln.starts_with("fn") || ln.starts_with("mod") { return; + + // First try to accept `ui_test` style comments } else if let Some((lncfg, ln)) = line_directive(comment, ln) { - it(lncfg, ln, line_number); + it(lncfg, orig_ln, ln, line_number); + } else if mode == Mode::Ui && suite == "ui" && !revision_magic_comment.is_match(ln) { + let Some((_, rest)) = line_directive("//", ln) else { + continue; + }; + + if rest.trim_start().starts_with(':') { + // This is likely a markdown link: + // `[link_name]: https://example.org` + continue; + } + + let rest = rest.trim_start(); + + for candidate in DIAGNOSTICS_DIRECTIVE_NAMES.iter() { + if rest.starts_with(candidate) { + let Some(prefix_removed) = rest.strip_prefix(candidate) else { + // We have a comment that's *successfully* parsed as an legacy-style + // 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:{:#?}", + testfile.display(), + line_number, + line_directive("//", ln), + ); + return; + }; + + if prefix_removed.starts_with([' ', ':']) { + // We have a comment that's *successfully* parsed as an legacy-style + // 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:{:#?}", + testfile.display(), + line_number, + line_directive("//", ln), + ); + return; + } + } + } } } } @@ -946,49 +1168,77 @@ pub fn make_test_description( _ => &[], }; - iter_header_extra(path, src, extra_directives, &mut |revision, ln, line_number| { - if revision.is_some() && revision != cfg { - return; - } + let mut local_poisoned = false; + + iter_header_extra( + config.mode, + &config.suite, + &mut local_poisoned, + path, + src, + extra_directives, + &mut |revision, og_ln, ln, line_number| { + if revision.is_some() && revision != cfg { + return; + } - macro_rules! decision { - ($e:expr) => { - match $e { - IgnoreDecision::Ignore { reason } => { - ignore = true; - // The ignore reason must be a &'static str, so we have to leak memory to - // create it. This is fine, as the header is parsed only at the start of - // compiletest so it won't grow indefinitely. - ignore_message = Some(&*Box::leak(Box::::from(reason))); + macro_rules! decision { + ($e:expr) => { + match $e { + IgnoreDecision::Ignore { reason } => { + ignore = true; + // The ignore reason must be a &'static str, so we have to leak memory to + // create it. This is fine, as the header is parsed only at the start of + // compiletest so it won't grow indefinitely. + ignore_message = Some(&*Box::leak(Box::::from(reason))); + } + IgnoreDecision::Error { message } => { + eprintln!("error: {}:{line_number}: {message}", path.display()); + *poisoned = true; + return; + } + IgnoreDecision::Continue => {} } - IgnoreDecision::Error { message } => { - eprintln!("error: {}:{line_number}: {message}", path.display()); - *poisoned = true; - return; - } - IgnoreDecision::Continue => {} + }; + } + + if let Some((_, post)) = og_ln.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. + } else { + decision!(cfg::handle_ignore(config, ln)); } - }; - } + } else { + decision!(cfg::handle_ignore(config, ln)); + } - decision!(cfg::handle_ignore(config, ln)); - decision!(cfg::handle_only(config, ln)); - decision!(needs::handle_needs(&cache.needs, config, ln)); - decision!(ignore_llvm(config, ln)); - decision!(ignore_cdb(config, ln)); - decision!(ignore_gdb(config, ln)); - decision!(ignore_lldb(config, ln)); - - if config.target == "wasm32-unknown-unknown" { - if config.parse_name_directive(ln, directives::CHECK_RUN_RESULTS) { - decision!(IgnoreDecision::Ignore { - reason: "ignored when checking the run results on WASM".into(), - }); + decision!(cfg::handle_only(config, ln)); + decision!(needs::handle_needs(&cache.needs, config, ln)); + decision!(ignore_llvm(config, ln)); + decision!(ignore_cdb(config, ln)); + decision!(ignore_gdb(config, ln)); + decision!(ignore_lldb(config, ln)); + + if config.target == "wasm32-unknown-unknown" { + if config.parse_name_directive(ln, directives::CHECK_RUN_RESULTS) { + decision!(IgnoreDecision::Ignore { + reason: "ignored when checking the run results on WASM".into(), + }); + } } - } - should_fail |= config.parse_name_directive(ln, "should-fail"); - }); + should_fail |= config.parse_name_directive(ln, "should-fail"); + }, + ); + + if local_poisoned { + eprintln!("errors encountered when trying to make test description: {}", path.display()); + panic!("errors encountered when trying to make test description"); + } // The `should-fail` annotation doesn't apply to pretty tests, // since we run the pretty printer across all tests by default. diff --git a/src/tools/compiletest/src/header/tests.rs b/src/tools/compiletest/src/header/tests.rs index c859e8acade..274006ae8c1 100644 --- a/src/tools/compiletest/src/header/tests.rs +++ b/src/tools/compiletest/src/header/tests.rs @@ -210,7 +210,7 @@ fn should_fail() { let d = make_test_description(&config, tn.clone(), p, std::io::Cursor::new(""), None); assert_eq!(d.should_panic, test::ShouldPanic::No); - let d = make_test_description(&config, tn, p, std::io::Cursor::new("// should-fail"), None); + let d = make_test_description(&config, tn, p, std::io::Cursor::new("//@ should-fail"), None); assert_eq!(d.should_panic, test::ShouldPanic::Yes); } @@ -218,7 +218,7 @@ fn should_fail() { fn revisions() { let config: Config = cfg().build(); - assert_eq!(parse_rs(&config, "// revisions: a b c").revisions, vec!["a", "b", "c"],); + assert_eq!(parse_rs(&config, "//@ revisions: a b c").revisions, vec!["a", "b", "c"],); assert_eq!( parse_makefile(&config, "# revisions: hello there").revisions, vec!["hello", "there"], @@ -233,8 +233,8 @@ fn aux_build() { parse_rs( &config, r" - // aux-build: a.rs - // aux-build: b.rs + //@ aux-build: a.rs + //@ aux-build: b.rs " ) .aux, @@ -245,128 +245,128 @@ fn aux_build() { #[test] fn llvm_version() { let config: Config = cfg().llvm_version("8.1.2").build(); - assert!(check_ignore(&config, "// min-llvm-version: 9.0")); + assert!(check_ignore(&config, "//@ min-llvm-version: 9.0")); let config: Config = cfg().llvm_version("9.0.1").build(); - assert!(check_ignore(&config, "// min-llvm-version: 9.2")); + assert!(check_ignore(&config, "//@ min-llvm-version: 9.2")); let config: Config = cfg().llvm_version("9.3.1").build(); - assert!(!check_ignore(&config, "// min-llvm-version: 9.2")); + assert!(!check_ignore(&config, "//@ min-llvm-version: 9.2")); let config: Config = cfg().llvm_version("10.0.0").build(); - assert!(!check_ignore(&config, "// min-llvm-version: 9.0")); + assert!(!check_ignore(&config, "//@ min-llvm-version: 9.0")); } #[test] fn system_llvm_version() { let config: Config = cfg().system_llvm(true).llvm_version("17.0.0").build(); - assert!(check_ignore(&config, "// min-system-llvm-version: 18.0")); + assert!(check_ignore(&config, "//@ min-system-llvm-version: 18.0")); let config: Config = cfg().system_llvm(true).llvm_version("18.0.0").build(); - assert!(!check_ignore(&config, "// min-system-llvm-version: 18.0")); + assert!(!check_ignore(&config, "//@ min-system-llvm-version: 18.0")); let config: Config = cfg().llvm_version("17.0.0").build(); - assert!(!check_ignore(&config, "// min-system-llvm-version: 18.0")); + assert!(!check_ignore(&config, "//@ min-system-llvm-version: 18.0")); } #[test] fn ignore_target() { let config: Config = cfg().target("x86_64-unknown-linux-gnu").build(); - assert!(check_ignore(&config, "// ignore-x86_64-unknown-linux-gnu")); - assert!(check_ignore(&config, "// ignore-x86_64")); - assert!(check_ignore(&config, "// ignore-linux")); - assert!(check_ignore(&config, "// ignore-gnu")); - assert!(check_ignore(&config, "// ignore-64bit")); + assert!(check_ignore(&config, "//@ ignore-x86_64-unknown-linux-gnu")); + assert!(check_ignore(&config, "//@ ignore-x86_64")); + assert!(check_ignore(&config, "//@ ignore-linux")); + assert!(check_ignore(&config, "//@ ignore-gnu")); + assert!(check_ignore(&config, "//@ ignore-64bit")); - assert!(!check_ignore(&config, "// ignore-x86")); - assert!(!check_ignore(&config, "// ignore-windows")); - assert!(!check_ignore(&config, "// ignore-msvc")); - assert!(!check_ignore(&config, "// ignore-32bit")); + assert!(!check_ignore(&config, "//@ ignore-x86")); + assert!(!check_ignore(&config, "//@ ignore-windows")); + assert!(!check_ignore(&config, "//@ ignore-msvc")); + assert!(!check_ignore(&config, "//@ ignore-32bit")); } #[test] fn only_target() { let config: Config = cfg().target("x86_64-pc-windows-gnu").build(); - assert!(check_ignore(&config, "// only-x86")); - assert!(check_ignore(&config, "// only-linux")); - assert!(check_ignore(&config, "// only-msvc")); - assert!(check_ignore(&config, "// only-32bit")); + assert!(check_ignore(&config, "//@ only-x86")); + assert!(check_ignore(&config, "//@ only-linux")); + assert!(check_ignore(&config, "//@ only-msvc")); + assert!(check_ignore(&config, "//@ only-32bit")); - assert!(!check_ignore(&config, "// only-x86_64-pc-windows-gnu")); - assert!(!check_ignore(&config, "// only-x86_64")); - assert!(!check_ignore(&config, "// only-windows")); - assert!(!check_ignore(&config, "// only-gnu")); - assert!(!check_ignore(&config, "// only-64bit")); + assert!(!check_ignore(&config, "//@ only-x86_64-pc-windows-gnu")); + assert!(!check_ignore(&config, "//@ only-x86_64")); + assert!(!check_ignore(&config, "//@ only-windows")); + assert!(!check_ignore(&config, "//@ only-gnu")); + assert!(!check_ignore(&config, "//@ only-64bit")); } #[test] fn stage() { let config: Config = cfg().stage_id("stage1-x86_64-unknown-linux-gnu").build(); - assert!(check_ignore(&config, "// ignore-stage1")); - assert!(!check_ignore(&config, "// ignore-stage2")); + assert!(check_ignore(&config, "//@ ignore-stage1")); + assert!(!check_ignore(&config, "//@ ignore-stage2")); } #[test] fn cross_compile() { let config: Config = cfg().host("x86_64-apple-darwin").target("wasm32-unknown-unknown").build(); - assert!(check_ignore(&config, "// ignore-cross-compile")); + assert!(check_ignore(&config, "//@ ignore-cross-compile")); let config: Config = cfg().host("x86_64-apple-darwin").target("x86_64-apple-darwin").build(); - assert!(!check_ignore(&config, "// ignore-cross-compile")); + assert!(!check_ignore(&config, "//@ ignore-cross-compile")); } #[test] fn debugger() { let mut config = cfg().build(); config.debugger = None; - assert!(!check_ignore(&config, "// ignore-cdb")); + assert!(!check_ignore(&config, "//@ ignore-cdb")); config.debugger = Some(Debugger::Cdb); - assert!(check_ignore(&config, "// ignore-cdb")); + assert!(check_ignore(&config, "//@ ignore-cdb")); config.debugger = Some(Debugger::Gdb); - assert!(check_ignore(&config, "// ignore-gdb")); + assert!(check_ignore(&config, "//@ ignore-gdb")); config.debugger = Some(Debugger::Lldb); - assert!(check_ignore(&config, "// ignore-lldb")); + assert!(check_ignore(&config, "//@ ignore-lldb")); } #[test] fn git_hash() { let config: Config = cfg().git_hash(false).build(); - assert!(check_ignore(&config, "// needs-git-hash")); + assert!(check_ignore(&config, "//@ needs-git-hash")); let config: Config = cfg().git_hash(true).build(); - assert!(!check_ignore(&config, "// needs-git-hash")); + assert!(!check_ignore(&config, "//@ needs-git-hash")); } #[test] fn sanitizers() { // Target that supports all sanitizers: let config: Config = cfg().target("x86_64-unknown-linux-gnu").build(); - assert!(!check_ignore(&config, "// needs-sanitizer-address")); - assert!(!check_ignore(&config, "// needs-sanitizer-leak")); - assert!(!check_ignore(&config, "// needs-sanitizer-memory")); - assert!(!check_ignore(&config, "// needs-sanitizer-thread")); + assert!(!check_ignore(&config, "//@ needs-sanitizer-address")); + assert!(!check_ignore(&config, "//@ needs-sanitizer-leak")); + assert!(!check_ignore(&config, "//@ needs-sanitizer-memory")); + assert!(!check_ignore(&config, "//@ needs-sanitizer-thread")); // Target that doesn't support sanitizers: let config: Config = cfg().target("wasm32-unknown-emscripten").build(); - assert!(check_ignore(&config, "// needs-sanitizer-address")); - assert!(check_ignore(&config, "// needs-sanitizer-leak")); - assert!(check_ignore(&config, "// needs-sanitizer-memory")); - assert!(check_ignore(&config, "// needs-sanitizer-thread")); + assert!(check_ignore(&config, "//@ needs-sanitizer-address")); + assert!(check_ignore(&config, "//@ needs-sanitizer-leak")); + assert!(check_ignore(&config, "//@ needs-sanitizer-memory")); + assert!(check_ignore(&config, "//@ needs-sanitizer-thread")); } #[test] fn profiler_support() { let config: Config = cfg().profiler_support(false).build(); - assert!(check_ignore(&config, "// needs-profiler-support")); + assert!(check_ignore(&config, "//@ needs-profiler-support")); let config: Config = cfg().profiler_support(true).build(); - assert!(!check_ignore(&config, "// needs-profiler-support")); + assert!(!check_ignore(&config, "//@ needs-profiler-support")); } #[test] @@ -382,7 +382,7 @@ fn asm_support() { for (target, has_asm) in asms { let config = cfg().target(target).build(); assert_eq!(config.has_asm_support(), has_asm); - assert_eq!(check_ignore(&config, "// needs-asm-support"), !has_asm) + assert_eq!(check_ignore(&config, "//@ needs-asm-support"), !has_asm) } } @@ -390,13 +390,13 @@ fn asm_support() { fn channel() { let config: Config = cfg().channel("beta").build(); - assert!(check_ignore(&config, "// ignore-beta")); - assert!(check_ignore(&config, "// only-nightly")); - assert!(check_ignore(&config, "// only-stable")); + assert!(check_ignore(&config, "//@ ignore-beta")); + assert!(check_ignore(&config, "//@ only-nightly")); + assert!(check_ignore(&config, "//@ only-stable")); - assert!(!check_ignore(&config, "// only-beta")); - assert!(!check_ignore(&config, "// ignore-nightly")); - assert!(!check_ignore(&config, "// ignore-stable")); + assert!(!check_ignore(&config, "//@ only-beta")); + assert!(!check_ignore(&config, "//@ ignore-nightly")); + assert!(!check_ignore(&config, "//@ ignore-stable")); } #[test] @@ -418,7 +418,7 @@ fn test_extract_version_range() { #[should_panic(expected = "Duplicate revision: `rpass1` in line ` rpass1 rpass1`")] fn test_duplicate_revisions() { let config: Config = cfg().build(); - parse_rs(&config, "// revisions: rpass1 rpass1"); + parse_rs(&config, "//@ revisions: rpass1 rpass1"); } #[test] @@ -432,7 +432,7 @@ fn ignore_arch() { for (target, arch) in archs { let config: Config = cfg().target(target).build(); assert!(config.matches_arch(arch), "{target} {arch}"); - assert!(check_ignore(&config, &format!("// ignore-{arch}"))); + assert!(check_ignore(&config, &format!("//@ ignore-{arch}"))); } } @@ -447,7 +447,7 @@ fn matches_os() { for (target, os) in oss { let config = cfg().target(target).build(); assert!(config.matches_os(os), "{target} {os}"); - assert!(check_ignore(&config, &format!("// ignore-{os}"))); + assert!(check_ignore(&config, &format!("//@ ignore-{os}"))); } } @@ -461,7 +461,7 @@ fn matches_env() { for (target, env) in envs { let config: Config = cfg().target(target).build(); assert!(config.matches_env(env), "{target} {env}"); - assert!(check_ignore(&config, &format!("// ignore-{env}"))); + assert!(check_ignore(&config, &format!("//@ ignore-{env}"))); } } @@ -475,7 +475,7 @@ fn matches_abi() { for (target, abi) in abis { let config: Config = cfg().target(target).build(); assert!(config.matches_abi(abi), "{target} {abi}"); - assert!(check_ignore(&config, &format!("// ignore-{abi}"))); + assert!(check_ignore(&config, &format!("//@ ignore-{abi}"))); } } @@ -491,7 +491,7 @@ fn is_big_endian() { for (target, is_big) in endians { let config = cfg().target(target).build(); assert_eq!(config.is_big_endian(), is_big, "{target} {is_big}"); - assert_eq!(check_ignore(&config, "// ignore-endian-big"), is_big); + assert_eq!(check_ignore(&config, "//@ ignore-endian-big"), is_big); } } @@ -506,9 +506,9 @@ fn pointer_width() { for (target, width) in widths { let config: Config = cfg().target(target).build(); assert_eq!(config.get_pointer_width(), width, "{target} {width}"); - assert_eq!(check_ignore(&config, "// ignore-16bit"), width == 16); - assert_eq!(check_ignore(&config, "// ignore-32bit"), width == 32); - assert_eq!(check_ignore(&config, "// ignore-64bit"), width == 64); + assert_eq!(check_ignore(&config, "//@ ignore-16bit"), width == 16); + assert_eq!(check_ignore(&config, "//@ ignore-32bit"), width == 32); + assert_eq!(check_ignore(&config, "//@ ignore-64bit"), width == 64); } } @@ -534,7 +534,7 @@ fn wasm_special() { for (target, pattern, ignore) in ignores { let config: Config = cfg().target(target).build(); assert_eq!( - check_ignore(&config, &format!("// ignore-{pattern}")), + check_ignore(&config, &format!("//@ ignore-{pattern}")), ignore, "{target} {pattern}" ); @@ -555,8 +555,8 @@ fn families() { assert!(config.matches_family(family)); let other = if family == "windows" { "unix" } else { "windows" }; assert!(!config.matches_family(other)); - assert!(check_ignore(&config, &format!("// ignore-{family}"))); - assert!(!check_ignore(&config, &format!("// ignore-{other}"))); + assert!(check_ignore(&config, &format!("//@ ignore-{family}"))); + assert!(!check_ignore(&config, &format!("//@ ignore-{other}"))); } } @@ -566,10 +566,17 @@ fn ignore_mode() { // Indicate profiler support so that "coverage-run" tests aren't skipped. let config: Config = cfg().mode(mode).profiler_support(true).build(); let other = if mode == "coverage-run" { "coverage-map" } else { "coverage-run" }; + assert_ne!(mode, other); assert_eq!(config.mode, Mode::from_str(mode).unwrap()); assert_ne!(config.mode, Mode::from_str(other).unwrap()); - assert!(check_ignore(&config, &format!("// ignore-mode-{mode}"))); - assert!(!check_ignore(&config, &format!("// ignore-mode-{other}"))); + + 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}"))); + } } } diff --git a/src/tools/tidy/src/style.rs b/src/tools/tidy/src/style.rs index 8b0e80a94b0..a8aae6f5bc9 100644 --- a/src/tools/tidy/src/style.rs +++ b/src/tools/tidy/src/style.rs @@ -55,11 +55,14 @@ const ANNOTATIONS_TO_IGNORE: &[&str] = &[ "// CHECK", "// EMIT_MIR", "// compile-flags", + "//@ compile-flags", "// error-pattern", + "//@ error-pattern", "// gdb", "// lldb", "// cdb", "// normalize-stderr-test", + "//@ normalize-stderr-test", ]; // Intentionally written in decimal rather than hex @@ -128,7 +131,15 @@ fn should_ignore(line: &str) -> bool { // This mirrors the regex in src/tools/compiletest/src/runtest.rs, please // update both if either are changed. let re = Regex::new("\\s*//(\\[.*\\])?~.*").unwrap(); - re.is_match(line) || ANNOTATIONS_TO_IGNORE.iter().any(|a| line.contains(a)) + // For `ui_test`-style UI test directives, also ignore + // - `//@[rev] compile-flags` + // - `//@[rev] normalize-stderr-test` + let ui_test_long_directives = + Regex::new("\\s*//@(\\[.*\\]) (compile-flags|normalize-stderr-test|error-pattern).*") + .unwrap(); + re.is_match(line) + || ANNOTATIONS_TO_IGNORE.iter().any(|a| line.contains(a)) + || ui_test_long_directives.is_match(line) } /// Returns `true` if `line` is allowed to be longer than the normal limit. diff --git a/src/tools/tidy/src/ui_tests.rs b/src/tools/tidy/src/ui_tests.rs index 1dbd221fde5..5517b9fdcec 100644 --- a/src/tools/tidy/src/ui_tests.rs +++ b/src/tools/tidy/src/ui_tests.rs @@ -14,8 +14,9 @@ use std::path::{Path, PathBuf}; // #73494. const ENTRY_LIMIT: usize = 900; // FIXME: The following limits should be reduced eventually. + const ISSUES_ENTRY_LIMIT: usize = 1781; -const ROOT_ENTRY_LIMIT: usize = 870; +const ROOT_ENTRY_LIMIT: usize = 871; const EXPECTED_TEST_FILE_EXTENSIONS: &[&str] = &[ "rs", // test source files diff --git a/tests/ui/README.md b/tests/ui/README.md new file mode 100644 index 00000000000..c14d0ee78c8 --- /dev/null +++ b/tests/ui/README.md @@ -0,0 +1,35 @@ +# UI Tests + +This folder contains `rustc`'s +[UI tests](https://rustc-dev-guide.rust-lang.org/tests/ui.html). + +## Test Directives (Headers) + +Typically, a UI test will have some test directives / headers which are +special comments that tell compiletest how to build and intepret a test. + +As part of an on-going effort to rewrite compiletest +(see ), a major +change proposal to change legacy compiletest-style headers `// ` +to [`ui_test`](https://github.com/oli-obk/ui_test)-style headers +`//@ ` was accepted (see +. + +An example directive is `ignore-test`. In legacy compiletest style, the header +would be written as + +```rs +// ignore-test +``` + +but in `ui_test` style, the header would be written as + +```rs +//@ ignore-test +``` + +compiletest is changed to accept only `//@` directives for UI tests +(currently), and will reject and report an error if it encounters any +comments `// ` that may be parsed as an legacy compiletest-style +test header. To fix this, you should migrate to the `ui_test`-style header +`//@ `. diff --git a/tests/ui/symbol-names/x86-stdcall.rs b/tests/ui/symbol-names/x86-stdcall.rs index 43c086dc6bc..c0cb42023a1 100644 --- a/tests/ui/symbol-names/x86-stdcall.rs +++ b/tests/ui/symbol-names/x86-stdcall.rs @@ -1,3 +1,4 @@ +// ignore-tidy-linelength // build-pass // only-x86 // only-windows -- cgit 1.4.1-3-g733a5 From ec2cc761bc7067712ecc7734502f703fe3b024c8 Mon Sep 17 00:00:00 2001 From: "č®øę°å‹ Jieyou Xu (Joe)" Date: Fri, 16 Feb 2024 20:02:50 +0000 Subject: [AUTO-GENERATED] Migrate ui tests from `//` to `//@` directives --- tests/ui/abi/abi-sysv64-arg-passing.rs | 10 +- tests/ui/abi/abi-sysv64-register-usage.rs | 10 +- tests/ui/abi/anon-extern-mod.rs | 6 +- tests/ui/abi/arm-unadjusted-intrinsic.rs | 14 +- tests/ui/abi/c-stack-as-value.rs | 6 +- tests/ui/abi/c-stack-returning-int64.rs | 6 +- tests/ui/abi/cabi-int-widening.rs | 4 +- tests/ui/abi/compatibility.rs | 108 +++++------ .../cross-crate/anon-extern-mod-cross-crate-2.rs | 8 +- .../ui/abi/cross-crate/duplicated-external-mods.rs | 10 +- tests/ui/abi/debug.rs | 12 +- tests/ui/abi/explicit_repr_rust.rs | 2 +- tests/ui/abi/extern/extern-call-deep.rs | 6 +- tests/ui/abi/extern/extern-call-deep2.rs | 4 +- tests/ui/abi/extern/extern-call-direct.rs | 2 +- tests/ui/abi/extern/extern-call-indirect.rs | 4 +- tests/ui/abi/extern/extern-call-scrub.rs | 4 +- tests/ui/abi/extern/extern-crosscrate.rs | 6 +- tests/ui/abi/extern/extern-pass-TwoU16s.rs | 4 +- tests/ui/abi/extern/extern-pass-TwoU32s.rs | 4 +- tests/ui/abi/extern/extern-pass-TwoU64s.rs | 4 +- tests/ui/abi/extern/extern-pass-TwoU8s.rs | 4 +- tests/ui/abi/extern/extern-pass-char.rs | 4 +- tests/ui/abi/extern/extern-pass-double.rs | 4 +- tests/ui/abi/extern/extern-pass-empty.rs | 8 +- tests/ui/abi/extern/extern-pass-u32.rs | 4 +- tests/ui/abi/extern/extern-pass-u64.rs | 4 +- tests/ui/abi/extern/extern-return-TwoU16s.rs | 4 +- tests/ui/abi/extern/extern-return-TwoU32s.rs | 4 +- tests/ui/abi/extern/extern-return-TwoU64s.rs | 4 +- tests/ui/abi/extern/extern-return-TwoU8s.rs | 4 +- tests/ui/abi/foreign/foreign-call-no-runtime.rs | 4 +- tests/ui/abi/foreign/foreign-dupe.rs | 6 +- tests/ui/abi/foreign/foreign-fn-with-byval.rs | 4 +- tests/ui/abi/foreign/foreign-no-abi.rs | 6 +- tests/ui/abi/foreign/invoke-external-foreign.rs | 8 +- .../abi/homogenous-floats-target-feature-mixup.rs | 6 +- tests/ui/abi/issue-28676.rs | 4 +- .../abi/issues/issue-62350-sysv-neg-reg-counts.rs | 4 +- .../issue-97463-broken-abi-leaked-uninit-data.rs | 4 +- tests/ui/abi/lib-defaults.rs | 8 +- tests/ui/abi/mir/mir_codegen_calls_variadic.rs | 4 +- tests/ui/abi/nullable-pointer-ffi-compat.rs | 2 +- tests/ui/abi/numbers-arithmetic/i128-ffi.rs | 6 +- tests/ui/abi/relocation_model_pic.rs | 6 +- tests/ui/abi/riscv-discoverability-guidance.rs | 10 +- tests/ui/abi/rustcall-generic.rs | 6 +- tests/ui/abi/segfault-no-out-of-stack.rs | 8 +- tests/ui/abi/stack-probes-lto.rs | 24 +-- tests/ui/abi/stack-probes.rs | 20 +- tests/ui/abi/stack-protector.rs | 12 +- tests/ui/abi/statics/static-mut-foreign.rs | 4 +- tests/ui/abi/struct-enums/struct-return.rs | 4 +- tests/ui/abi/union/union-c-interop.rs | 4 +- .../unsized-args-in-c-abi-issues-94223-115845.rs | 2 +- tests/ui/abi/unsupported.rs | 26 +-- tests/ui/abi/variadic-ffi.rs | 4 +- tests/ui/abi/x86stdcall.rs | 4 +- tests/ui/abi/x86stdcall2.rs | 4 +- tests/ui/alias-uninit-value.rs | 4 +- .../alloc-error-handler-bad-signature-1.rs | 2 +- .../alloc-error-handler-bad-signature-2.rs | 2 +- .../alloc-error-handler-bad-signature-3.rs | 2 +- tests/ui/alloc-error/default-alloc-error-hook.rs | 6 +- tests/ui/allocator/auxiliary/custom-as-global.rs | 2 +- tests/ui/allocator/auxiliary/custom.rs | 2 +- tests/ui/allocator/auxiliary/helper.rs | 2 +- tests/ui/allocator/auxiliary/system-allocator.rs | 2 +- tests/ui/allocator/auxiliary/system-allocator2.rs | 2 +- tests/ui/allocator/custom-in-block.rs | 8 +- tests/ui/allocator/custom-in-submodule.rs | 8 +- tests/ui/allocator/custom.rs | 6 +- tests/ui/allocator/hygiene.rs | 8 +- .../allocator/no_std-alloc-error-handler-custom.rs | 16 +- .../no_std-alloc-error-handler-default.rs | 16 +- tests/ui/allocator/object-safe.rs | 2 +- tests/ui/allocator/two-allocators2.rs | 6 +- tests/ui/allocator/two-allocators3.rs | 8 +- tests/ui/allocator/xcrate-use.rs | 8 +- tests/ui/allocator/xcrate-use2.rs | 10 +- tests/ui/annotate-snippet/auxiliary/multispan.rs | 4 +- tests/ui/annotate-snippet/missing-type.rs | 4 +- tests/ui/annotate-snippet/multiple-files.rs | 4 +- tests/ui/annotate-snippet/multispan.rs | 6 +- tests/ui/anon-params/anon-params-denied-2018.rs | 2 +- tests/ui/anon-params/anon-params-deprecated.fixed | 6 +- tests/ui/anon-params/anon-params-deprecated.rs | 6 +- .../ui/anon-params/anon-params-edition-hygiene.rs | 4 +- .../auxiliary/anon-params-edition-hygiene.rs | 2 +- tests/ui/argument-suggestions/issue-109425.fixed | 2 +- tests/ui/argument-suggestions/issue-109425.rs | 2 +- tests/ui/array-slice-vec/array_const_index-2.rs | 2 +- .../ui/array-slice-vec/bounds-check-no-overflow.rs | 6 +- tests/ui/array-slice-vec/box-of-array-of-drop-1.rs | 6 +- tests/ui/array-slice-vec/box-of-array-of-drop-2.rs | 6 +- tests/ui/array-slice-vec/byte-literals.rs | 2 +- tests/ui/array-slice-vec/cast-in-array-size.rs | 4 +- tests/ui/array-slice-vec/check-static-slice.rs | 2 +- tests/ui/array-slice-vec/copy-out-of-array-1.rs | 2 +- tests/ui/array-slice-vec/destructure-array-1.rs | 2 +- tests/ui/array-slice-vec/dst-raw-slice.rs | 6 +- tests/ui/array-slice-vec/empty-mutable-vec.rs | 4 +- tests/ui/array-slice-vec/estr-slice.rs | 2 +- tests/ui/array-slice-vec/evec-slice.rs | 2 +- tests/ui/array-slice-vec/fixed_length_copy.rs | 2 +- tests/ui/array-slice-vec/huge-largest-array.rs | 2 +- tests/ui/array-slice-vec/infer_array_len.rs | 2 +- tests/ui/array-slice-vec/issue-15730.rs | 4 +- tests/ui/array-slice-vec/issue-18425.rs | 4 +- tests/ui/array-slice-vec/ivec-pass-by-value.rs | 2 +- tests/ui/array-slice-vec/mut-vstore-expr.rs | 4 +- ...mutability-inherits-through-fixed-length-vec.rs | 2 +- tests/ui/array-slice-vec/mutable-alias-vec.rs | 2 +- tests/ui/array-slice-vec/nested-vec-1.rs | 2 +- tests/ui/array-slice-vec/nested-vec-2.rs | 2 +- tests/ui/array-slice-vec/nested-vec-3.rs | 6 +- .../array-slice-vec/new-style-fixed-length-vec.rs | 2 +- tests/ui/array-slice-vec/rcvr-borrowed-to-slice.rs | 2 +- tests/ui/array-slice-vec/repeated-vector-syntax.rs | 2 +- tests/ui/array-slice-vec/show-boxed-slice.rs | 2 +- .../array-slice-vec/slice-of-zero-size-elements.rs | 4 +- tests/ui/array-slice-vec/slice-panic-1.rs | 6 +- tests/ui/array-slice-vec/slice-panic-2.rs | 6 +- tests/ui/array-slice-vec/slice.rs | 2 +- tests/ui/array-slice-vec/slice_binary_search.rs | 2 +- .../array-slice-vec/slice_is_sorted_by_borrow.rs | 2 +- .../subslice-patterns-const-eval-match.rs | 2 +- .../subslice-patterns-const-eval.rs | 2 +- .../ui/array-slice-vec/suggest-array-length.fixed | 2 +- tests/ui/array-slice-vec/suggest-array-length.rs | 2 +- tests/ui/array-slice-vec/variance-vec-covariant.rs | 2 +- tests/ui/array-slice-vec/vec-dst.rs | 2 +- tests/ui/array-slice-vec/vec-fixed-length.rs | 2 +- tests/ui/array-slice-vec/vec-late-init.rs | 2 +- tests/ui/array-slice-vec/vec-macro-no-std.rs | 4 +- tests/ui/array-slice-vec/vec-macro-rvalue-scope.rs | 2 +- .../ui/array-slice-vec/vec-macro-with-brackets.rs | 4 +- .../vec-macro-with-trailing-comma.rs | 2 +- tests/ui/array-slice-vec/vec-matching-autoslice.rs | 2 +- tests/ui/array-slice-vec/vec-matching-fixed.rs | 2 +- tests/ui/array-slice-vec/vec-matching-fold.rs | 2 +- .../vec-matching-legal-tail-element-borrow.rs | 2 +- tests/ui/array-slice-vec/vec-matching.rs | 2 +- tests/ui/array-slice-vec/vec-overrun.rs | 6 +- tests/ui/array-slice-vec/vec-repeat-with-cast.rs | 4 +- tests/ui/array-slice-vec/vec-tail-matching.rs | 2 +- tests/ui/array-slice-vec/vector-no-ann-2.rs | 4 +- tests/ui/artificial-block.rs | 2 +- tests/ui/as-precedence.rs | 2 +- tests/ui/asm/aarch64/bad-options.rs | 2 +- tests/ui/asm/aarch64/bad-reg.rs | 4 +- tests/ui/asm/aarch64/const.rs | 6 +- tests/ui/asm/aarch64/duplicate-options.fixed | 6 +- tests/ui/asm/aarch64/duplicate-options.rs | 6 +- tests/ui/asm/aarch64/interpolated-idents.rs | 4 +- tests/ui/asm/aarch64/llvm-58384.rs | 6 +- tests/ui/asm/aarch64/may_unwind.rs | 8 +- tests/ui/asm/aarch64/parse-error.rs | 2 +- tests/ui/asm/aarch64/srcloc.rs | 8 +- tests/ui/asm/aarch64/sym.rs | 8 +- tests/ui/asm/aarch64/type-check-2-2.rs | 2 +- tests/ui/asm/aarch64/type-check-2.rs | 2 +- tests/ui/asm/aarch64/type-check-3.rs | 4 +- tests/ui/asm/aarch64/type-check-4.rs | 4 +- tests/ui/asm/bad-arch.rs | 4 +- tests/ui/asm/bad-template.rs | 10 +- tests/ui/asm/const-error.rs | 4 +- tests/ui/asm/generic-const.rs | 4 +- tests/ui/asm/inline-syntax.rs | 26 +-- tests/ui/asm/issue-113788.rs | 4 +- tests/ui/asm/issue-72570.rs | 2 +- tests/ui/asm/issue-85247.rs | 12 +- tests/ui/asm/issue-87802.rs | 8 +- tests/ui/asm/issue-89305.rs | 4 +- tests/ui/asm/issue-92378.rs | 8 +- tests/ui/asm/issue-97490.rs | 6 +- tests/ui/asm/issue-99071.rs | 6 +- tests/ui/asm/issue-99122-2.rs | 6 +- tests/ui/asm/issue-99122.rs | 4 +- tests/ui/asm/may_unwind.rs | 4 +- tests/ui/asm/naked-functions-ffi.rs | 4 +- tests/ui/asm/naked-functions-unused.rs | 8 +- tests/ui/asm/naked-functions.rs | 8 +- tests/ui/asm/naked-invalid-attr.rs | 2 +- tests/ui/asm/named-asm-labels.rs | 8 +- tests/ui/asm/noreturn.rs | 4 +- tests/ui/asm/parse-error.rs | 2 +- tests/ui/asm/reg-conflict.rs | 4 +- tests/ui/asm/type-check-1.rs | 8 +- tests/ui/asm/type-check-4.rs | 8 +- tests/ui/asm/unpretty-expanded.rs | 6 +- tests/ui/asm/unpretty-expanded.stdout | 6 +- tests/ui/asm/x86_64/bad-clobber-abi.rs | 4 +- tests/ui/asm/x86_64/bad-options.rs | 2 +- tests/ui/asm/x86_64/bad-reg.rs | 4 +- tests/ui/asm/x86_64/const.rs | 6 +- tests/ui/asm/x86_64/duplicate-options.fixed | 4 +- tests/ui/asm/x86_64/duplicate-options.rs | 4 +- tests/ui/asm/x86_64/evex512-implicit-feature.rs | 6 +- tests/ui/asm/x86_64/interpolated-idents.rs | 2 +- tests/ui/asm/x86_64/issue-82869.rs | 4 +- tests/ui/asm/x86_64/issue-89875.rs | 6 +- tests/ui/asm/x86_64/issue-96797.rs | 10 +- tests/ui/asm/x86_64/may_unwind.rs | 8 +- tests/ui/asm/x86_64/multiple-clobber-abi.rs | 6 +- tests/ui/asm/x86_64/srcloc.rs | 6 +- tests/ui/asm/x86_64/sym.rs | 8 +- tests/ui/asm/x86_64/target-feature-attr.rs | 2 +- tests/ui/asm/x86_64/type-check-2.rs | 2 +- tests/ui/asm/x86_64/type-check-3.rs | 4 +- tests/ui/asm/x86_64/type-check-4.rs | 4 +- tests/ui/asm/x86_64/type-check-5.rs | 2 +- tests/ui/asm/x86_64/x86_64_parse_error.rs | 2 +- tests/ui/assign-assign.rs | 2 +- tests/ui/assoc-oddities-3.rs | 2 +- .../assoc-const-eq-ty-alias-noninteracting.rs | 2 +- tests/ui/associated-consts/assoc-const.rs | 2 +- .../associated-const-const-eval.rs | 2 +- .../associated-const-cross-crate-const-eval.rs | 4 +- .../associated-const-cross-crate-defaults.rs | 4 +- .../associated-const-cross-crate.rs | 4 +- .../associated-const-in-global-const.rs | 2 +- .../associated-const-inherent-impl.rs | 2 +- .../associated-const-marks-live-code.rs | 2 +- .../associated-const-match-patterns.rs | 4 +- .../associated-const-outer-ty-refs.rs | 2 +- .../associated-const-overwrite-default.rs | 2 +- .../associated-const-public-impl.rs | 2 +- .../associated-const-range-match-patterns.rs | 2 +- .../associated-const-resolution-order.rs | 2 +- .../associated-const-self-type.rs | 2 +- .../associated-const-trait-bound.rs | 2 +- .../associated-const-type-parameters.rs | 2 +- .../associated-const-ufcs-infer-trait.rs | 2 +- .../associated-const-use-default.rs | 2 +- .../associated-const-use-impl-of-same-trait.rs | 2 +- tests/ui/associated-consts/associated-const.rs | 2 +- tests/ui/associated-consts/defaults-cyclic-fail.rs | 2 +- tests/ui/associated-consts/defaults-cyclic-pass.rs | 2 +- .../associated-consts/defaults-not-assumed-fail.rs | 2 +- .../associated-consts/defaults-not-assumed-pass.rs | 2 +- tests/ui/associated-consts/issue-110933.rs | 2 +- .../issue-69020-assoc-const-arith-overflow.rs | 8 +- tests/ui/associated-consts/issue-88599-ref-self.rs | 2 +- tests/ui/associated-consts/issue-93775.rs | 2 +- tests/ui/associated-consts/mismatched_impl_ty_1.rs | 2 +- tests/ui/associated-consts/mismatched_impl_ty_2.rs | 2 +- tests/ui/associated-consts/mismatched_impl_ty_3.rs | 2 +- .../assoc-inherent-late-bound.rs | 2 +- .../assoc-inherent-unstable.rs | 4 +- .../assoc-inherent-use.rs | 2 +- .../bugs/cycle-iat-inside-of-adt.rs | 2 +- .../bugs/cycle-iat-inside-of-where-predicate.rs | 2 +- .../bugs/wf-check-skipped.rs | 4 +- .../ui/associated-inherent-types/const-generics.rs | 2 +- .../dispatch-on-self-type-0.rs | 2 +- .../dispatch-on-self-type-1.rs | 2 +- .../associated-inherent-types/former-subst-ice.rs | 2 +- .../generic-associated-types-bad.rs | 2 +- .../generic-const-exprs.rs | 2 +- tests/ui/associated-inherent-types/inference.rs | 6 +- tests/ui/associated-inherent-types/issue-104260.rs | 2 +- tests/ui/associated-inherent-types/issue-109071.rs | 2 +- tests/ui/associated-inherent-types/issue-109768.rs | 2 +- tests/ui/associated-inherent-types/issue-109790.rs | 2 +- .../ui/associated-inherent-types/issue-111404-0.rs | 2 +- .../normalize-projection-0.rs | 2 +- .../normalize-projection-1.rs | 2 +- ...found-self-type-differs-shadowing-trait-item.rs | 2 +- .../associated-inherent-types/private-in-public.rs | 2 +- .../associated-inherent-types/substitute-params.rs | 2 +- .../type-alias-bounds-are-enforced.rs | 4 +- .../ambiguous-associated-type-with-generics.fixed | 2 +- .../ambiguous-associated-type-with-generics.rs | 2 +- .../associated-item/associated-item-two-bounds.rs | 2 +- tests/ui/associated-item/issue-105449.rs | 4 +- tests/ui/associated-item/issue-87638.fixed | 2 +- tests/ui/associated-item/issue-87638.rs | 2 +- .../ambiguous-associated-type.rs | 2 +- .../assoc-type-bound-through-where-clause.rs | 2 +- .../associated-item-through-where-clause.rs | 2 +- .../bad-bounds-on-assoc-in-trait.rs | 2 +- .../bounds-on-assoc-in-trait.rs | 2 +- .../associated-type-bounds/const-projection-err.rs | 2 +- .../entails-sized-object-safety.rs | 2 +- tests/ui/associated-type-bounds/enum-bounds.rs | 2 +- tests/ui/associated-type-bounds/fn-apit.rs | 4 +- tests/ui/associated-type-bounds/fn-aux.rs | 4 +- tests/ui/associated-type-bounds/fn-inline.rs | 4 +- tests/ui/associated-type-bounds/fn-where.rs | 4 +- tests/ui/associated-type-bounds/fn-wrap-apit.rs | 4 +- ...handle-predicates-that-can-define-assoc-type.rs | 2 +- tests/ui/associated-type-bounds/higher-ranked.rs | 2 +- tests/ui/associated-type-bounds/hrtb.rs | 2 +- .../implied-in-supertrait.rs | 2 +- tests/ui/associated-type-bounds/issue-61752.rs | 2 +- tests/ui/associated-type-bounds/issue-70292.rs | 2 +- tests/ui/associated-type-bounds/issue-71443-2.rs | 2 +- tests/ui/associated-type-bounds/issue-73818.rs | 2 +- tests/ui/associated-type-bounds/issue-79949.rs | 2 +- tests/ui/associated-type-bounds/issue-81193.rs | 2 +- tests/ui/associated-type-bounds/issue-83017.rs | 2 +- .../nested-bounds-dont-eliminate-alias-bounds.rs | 2 +- .../order-dependent-bounds-issue-54121.rs | 2 +- .../return-type-notation/bad-inputs-and-output.rs | 2 +- .../return-type-notation/basic.rs | 6 +- .../return-type-notation/equality.rs | 2 +- .../issue-120208-higher-ranked-const.rs | 2 +- .../return-type-notation/missing.rs | 2 +- .../return-type-notation/unpretty-parenthesized.rs | 4 +- .../unpretty-parenthesized.stdout | 4 +- tests/ui/associated-type-bounds/rpit.rs | 2 +- tests/ui/associated-type-bounds/struct-bounds.rs | 2 +- ...raining-assoc-type-because-of-assoc-const.fixed | 2 +- ...ontraining-assoc-type-because-of-assoc-const.rs | 2 +- .../supertrait-defines-ty.rs | 2 +- .../supertrait-referencing-self.rs | 2 +- .../supertrait-referencing.rs | 2 +- .../supertrait-where-referencing-self.rs | 2 +- .../trait-alias-impl-trait.rs | 2 +- tests/ui/associated-type-bounds/trait-params.rs | 2 +- .../traits-assoc-anonymized.rs | 2 +- .../traits-assoc-type-macros.rs | 4 +- tests/ui/associated-type-bounds/type-alias.rs | 2 +- tests/ui/associated-type-bounds/union-bounds.rs | 2 +- .../associate-type-bound-normalization.rs | 2 +- .../associated-types/associated-item-long-paths.rs | 2 +- .../associated-type-destructuring-assignment.rs | 2 +- .../associated-type-struct-construction.rs | 2 +- .../ui/associated-types/associated-types-basic.rs | 2 +- .../associated-types-binding-in-trait.rs | 2 +- .../associated-types-binding-in-where-clause.rs | 4 +- .../associated-types-bound-ambiguity.rs | 2 +- .../associated-types-bound-failure.fixed | 2 +- .../associated-types-bound-failure.rs | 2 +- .../ui/associated-types/associated-types-bound.rs | 2 +- tests/ui/associated-types/associated-types-cc.rs | 4 +- .../associated-types-conditional-dispatch.rs | 4 +- .../associated-types-constant-type.rs | 2 +- .../associated-types-doubleendediterator-object.rs | 2 +- ...sociated-types-duplicate-binding-in-env-hrtb.rs | 4 +- .../associated-types-duplicate-binding-in-env.rs | 4 +- .../associated-types-enum-field-named.rs | 2 +- .../associated-types-enum-field-numbered.rs | 2 +- .../ui/associated-types/associated-types-eq-obj.rs | 4 +- .../associated-types-for-unimpl-trait.fixed | 2 +- .../associated-types-for-unimpl-trait.rs | 2 +- .../associated-types-from-supertrait.rs | 2 +- .../associated-types-impl-redirect.rs | 2 +- .../associated-types-in-ambiguous-context.rs | 2 +- .../associated-types-in-bound-type-arg.rs | 2 +- .../associated-types-in-default-method.rs | 2 +- .../ui/associated-types/associated-types-in-fn.rs | 2 +- .../associated-types-in-impl-generics.rs | 2 +- .../associated-types-in-inherent-method.rs | 2 +- .../associated-types-issue-20220.rs | 2 +- .../associated-types-issue-20371.rs | 4 +- .../associated-types-issue-21212.rs | 2 +- .../associated-types-iterator-binding.rs | 2 +- .../ui/associated-types/associated-types-method.rs | 2 +- .../associated-types-nested-projections.rs | 4 +- ...associated-types-normalize-in-bounds-binding.rs | 4 +- .../associated-types-normalize-in-bounds-ufcs.rs | 4 +- .../associated-types-normalize-in-bounds.rs | 4 +- .../associated-types-normalize-unifield-struct.rs | 2 +- .../associated-types-overridden-default.rs | 2 +- .../associated-types-project-from-hrtb-in-fn.fixed | 2 +- .../associated-types-project-from-hrtb-in-fn.rs | 2 +- ...d-types-project-from-hrtb-in-trait-method.fixed | 2 +- ...ated-types-project-from-hrtb-in-trait-method.rs | 2 +- ...s-project-from-type-param-via-bound-in-where.rs | 2 +- .../associated-types-projection-bound-ambiguity.rs | 2 +- ...ciated-types-projection-bound-in-supertraits.rs | 2 +- ...ted-types-projection-from-known-type-in-impl.rs | 2 +- .../associated-types-projection-in-object-type.rs | 4 +- .../associated-types-projection-in-supertrait.rs | 2 +- .../associated-types-projection-in-where-clause.rs | 4 +- ...unrelated-trait-in-method-without-default.fixed | 2 +- ...to-unrelated-trait-in-method-without-default.rs | 2 +- ...sociated-types-projection-to-unrelated-trait.rs | 2 +- ...alified-path-with-trait-with-type-parameters.rs | 4 +- .../associated-types-ref-from-struct.rs | 4 +- .../associated-types-ref-in-struct-literal.rs | 2 +- .../associated-types-region-erasure-issue-20582.rs | 4 +- .../associated-types-resolve-lifetime.rs | 4 +- .../ui/associated-types/associated-types-return.rs | 2 +- .../ui/associated-types/associated-types-simple.rs | 2 +- .../ui/associated-types/associated-types-stream.rs | 2 +- .../associated-types-struct-field-named.rs | 2 +- .../associated-types-struct-field-numbered.rs | 2 +- .../associated-types-sugar-path.rs | 2 +- .../associated-types-unsized.fixed | 2 +- .../associated-types/associated-types-unsized.rs | 2 +- ...associated-types-where-clause-impl-ambiguity.rs | 2 +- .../associated-types/bound-lifetime-constrained.rs | 2 +- .../bound-lifetime-in-binding-only.rs | 2 +- .../bound-lifetime-in-return-only.rs | 2 +- tests/ui/associated-types/cache/chrono-scan.rs | 2 +- tests/ui/associated-types/cache/elision.rs | 2 +- .../cache/project-fn-ret-contravariant.rs | 6 +- .../cache/project-fn-ret-invariant.rs | 4 +- .../associated-types/default-associated-types.rs | 2 +- .../ui/associated-types/defaults-cyclic-pass-1.rs | 2 +- .../ui/associated-types/defaults-cyclic-pass-2.rs | 2 +- .../defaults-in-other-trait-items-pass.rs | 2 +- .../associated-types/higher-ranked-projection.rs | 4 +- tests/ui/associated-types/impl-wf-cycle-5.fixed | 2 +- tests/ui/associated-types/impl-wf-cycle-5.rs | 2 +- tests/ui/associated-types/impl-wf-cycle-6.fixed | 2 +- tests/ui/associated-types/impl-wf-cycle-6.rs | 2 +- tests/ui/associated-types/issue-18655.rs | 2 +- tests/ui/associated-types/issue-19081.rs | 2 +- tests/ui/associated-types/issue-20825-2.rs | 2 +- tests/ui/associated-types/issue-21363.rs | 4 +- tests/ui/associated-types/issue-21726.rs | 4 +- tests/ui/associated-types/issue-22066.rs | 2 +- tests/ui/associated-types/issue-22828.rs | 4 +- tests/ui/associated-types/issue-23208.rs | 2 +- tests/ui/associated-types/issue-24159.rs | 2 +- tests/ui/associated-types/issue-24204.rs | 2 +- tests/ui/associated-types/issue-24338.rs | 2 +- tests/ui/associated-types/issue-25339.rs | 2 +- tests/ui/associated-types/issue-25700-1.rs | 2 +- tests/ui/associated-types/issue-25700-2.rs | 2 +- tests/ui/associated-types/issue-27901.rs | 2 +- tests/ui/associated-types/issue-28871.rs | 2 +- tests/ui/associated-types/issue-31597.rs | 2 +- tests/ui/associated-types/issue-32350.rs | 2 +- tests/ui/associated-types/issue-36499.rs | 2 +- tests/ui/associated-types/issue-37808.rs | 2 +- tests/ui/associated-types/issue-37883.rs | 2 +- tests/ui/associated-types/issue-38917.rs | 2 +- tests/ui/associated-types/issue-39532.rs | 2 +- tests/ui/associated-types/issue-40093.rs | 2 +- tests/ui/associated-types/issue-41868.rs | 2 +- tests/ui/associated-types/issue-43475.rs | 2 +- tests/ui/associated-types/issue-47139-1.rs | 2 +- tests/ui/associated-types/issue-47139-2.rs | 2 +- tests/ui/associated-types/issue-47385.rs | 2 +- tests/ui/associated-types/issue-48010.rs | 2 +- tests/ui/associated-types/issue-48551.rs | 2 +- tests/ui/associated-types/issue-50301.rs | 2 +- tests/ui/associated-types/issue-54182-1.rs | 2 +- tests/ui/associated-types/issue-54182-2.rs | 2 +- tests/ui/associated-types/issue-54467.rs | 2 +- tests/ui/associated-types/issue-55846.rs | 2 +- tests/ui/associated-types/issue-63591.rs | 2 +- tests/ui/associated-types/issue-64848.rs | 2 +- tests/ui/associated-types/issue-64855-2.rs | 2 +- tests/ui/associated-types/issue-65934.rs | 2 +- tests/ui/associated-types/issue-67684.rs | 8 +- tests/ui/associated-types/issue-69398.rs | 2 +- tests/ui/associated-types/issue-71113.rs | 2 +- tests/ui/associated-types/issue-76179.rs | 2 +- tests/ui/associated-types/issue-82079.rs | 6 +- tests/ui/associated-types/issue-88856.rs | 2 +- tests/ui/associated-types/issue-91069.rs | 2 +- tests/ui/associated-types/issue-91231.rs | 2 +- tests/ui/associated-types/issue-91234.rs | 2 +- .../associated-types/normalization-debruijn-1.rs | 4 +- .../associated-types/normalization-debruijn-2.rs | 4 +- .../associated-types/normalization-debruijn-3.rs | 4 +- .../associated-types/normalization-generality-2.rs | 2 +- .../associated-types/normalization-generality.rs | 2 +- .../associated-types/normalization-probe-cycle.rs | 2 +- .../normalize-cycle-in-eval-no-region.rs | 2 +- .../ui/associated-types/normalize-cycle-in-eval.rs | 2 +- .../ui/associated-types/object-method-numbering.rs | 2 +- tests/ui/associated-types/object-normalization.rs | 2 +- .../associated-types/param-env-normalize-cycle.rs | 2 +- .../associated-types/project-defer-unification.rs | 2 +- .../project-recursion-limit-non-fatal.rs | 2 +- tests/ui/associated-types/substs-ppaux.rs | 4 +- tests/ui/associated-types/wf-cycle-2.rs | 2 +- tests/ui/associated-types/wf-cycle.rs | 2 +- tests/ui/async-await/argument-patterns.rs | 4 +- .../async-await/async-assoc-fn-anon-lifetimes.rs | 4 +- tests/ui/async-await/async-await-let-else.rs | 2 +- tests/ui/async-await/async-await.rs | 10 +- .../async-block-control-flow-static-semantics.rs | 2 +- .../async-borrowck-escaping-block-error.fixed | 4 +- .../async-borrowck-escaping-block-error.rs | 4 +- .../async-borrowck-escaping-closure-error.rs | 2 +- tests/ui/async-await/async-closure-matches-expr.rs | 4 +- tests/ui/async-await/async-closure.rs | 10 +- .../ui/async-await/async-closures/arg-mismatch.rs | 4 +- .../async-closures/async-fn-mut-for-async-fn.rs | 6 +- .../async-closures/async-fn-once-for-async-fn.rs | 6 +- .../async-closures/auxiliary/block-on.rs | 2 +- .../async-closures/auxiliary/foreign.rs | 2 +- .../async-closures/await-inference-guidance.rs | 6 +- tests/ui/async-await/async-closures/brand.rs | 6 +- tests/ui/async-await/async-closures/def-path.rs | 4 +- tests/ui/async-await/async-closures/drop.rs | 8 +- tests/ui/async-await/async-closures/foreign.rs | 8 +- .../async-closures/higher-ranked-return.rs | 6 +- .../ui/async-await/async-closures/higher-ranked.rs | 6 +- tests/ui/async-await/async-closures/is-not-fn.rs | 2 +- tests/ui/async-await/async-closures/mangle.rs | 14 +- .../async-closures/move-consuming-capture.rs | 4 +- .../async-await/async-closures/move-is-async-fn.rs | 6 +- tests/ui/async-await/async-closures/mutate.rs | 6 +- tests/ui/async-await/async-closures/not-fn.rs | 2 +- tests/ui/async-await/async-closures/not-lending.rs | 4 +- tests/ui/async-await/async-closures/once.rs | 6 +- tests/ui/async-await/async-closures/refd.rs | 6 +- .../async-closures/return-type-mismatch.rs | 4 +- .../ui/async-await/async-closures/tainted-body.rs | 2 +- .../ui/async-await/async-closures/wrong-fn-kind.rs | 2 +- tests/ui/async-await/async-error-span.rs | 2 +- .../async-fn-elided-impl-lifetime-parameter.rs | 4 +- tests/ui/async-await/async-fn-nonsend.rs | 4 +- tests/ui/async-await/async-fn-path-elision.rs | 2 +- tests/ui/async-await/async-fn-send-uses-nonsend.rs | 6 +- tests/ui/async-await/async-fn-size-moved-locals.rs | 6 +- .../ui/async-await/async-fn-size-uninit-locals.rs | 8 +- tests/ui/async-await/async-fn-size.rs | 6 +- tests/ui/async-await/async-fn/dyn-pos.rs | 2 +- .../async-fn/edition-2015-not-async-bound.rs | 2 +- tests/ui/async-await/async-fn/impl-header.rs | 2 +- tests/ui/async-await/async-fn/impl-trait.rs | 4 +- tests/ui/async-await/async-fn/method-call-pos.rs | 2 +- tests/ui/async-await/async-fn/not-a-trait.rs | 2 +- tests/ui/async-await/async-fn/simple.rs | 4 +- tests/ui/async-await/async-fn/sugar.rs | 4 +- tests/ui/async-await/async-fn/wrong-trait.rs | 2 +- tests/ui/async-await/async-is-unwindsafe.rs | 2 +- tests/ui/async-await/async-matches-expr.rs | 4 +- tests/ui/async-await/async-trait-fn.rs | 4 +- .../ui/async-await/async-unsafe-fn-call-in-safe.rs | 2 +- tests/ui/async-await/async-with-closure.rs | 4 +- tests/ui/async-await/auxiliary/arc_wake.rs | 2 +- tests/ui/async-await/auxiliary/issue-107036.rs | 2 +- tests/ui/async-await/auxiliary/issue-72470-lib.rs | 4 +- tests/ui/async-await/await-into-future.rs | 6 +- .../await-keyword/2015-edition-warning.fixed | 2 +- .../await-keyword/2015-edition-warning.rs | 2 +- .../2018-edition-error-in-non-macro-position.rs | 2 +- .../await-keyword/2018-edition-error.rs | 2 +- .../await-keyword/incorrect-syntax-suggestions.rs | 2 +- .../await-keyword/post_expansion_error.rs | 2 +- tests/ui/async-await/await-sequence.rs | 4 +- tests/ui/async-await/await-unsize.rs | 4 +- tests/ui/async-await/awaiting-unsized-param.rs | 2 +- tests/ui/async-await/bound-normalization.rs | 4 +- tests/ui/async-await/clone-suggestion.fixed | 4 +- tests/ui/async-await/clone-suggestion.rs | 4 +- .../conditional-and-guaranteed-initialization.rs | 6 +- tests/ui/async-await/const-async-fn-in-main.rs | 2 +- tests/ui/async-await/coroutine-desc.rs | 2 +- tests/ui/async-await/coroutine-not-future.rs | 2 +- .../debug-ice-attempted-to-add-with-overflow.rs | 4 +- tests/ui/async-await/deep-futures-are-freeze.rs | 8 +- tests/ui/async-await/default-struct-update.rs | 4 +- tests/ui/async-await/dont-print-desugared-async.rs | 2 +- ...dont-suggest-await-on-method-return-mismatch.rs | 2 +- tests/ui/async-await/dont-suggest-missing-await.rs | 2 +- tests/ui/async-await/drop-and-assign.rs | 4 +- .../async-await/drop-order/auxiliary/arc_wake.rs | 2 +- ...order-for-async-fn-parameters-by-ref-binding.rs | 6 +- .../drop-order-for-async-fn-parameters.rs | 10 +- .../drop-order-for-locals-when-cancelled.rs | 6 +- ...drop-order-for-temporary-in-tail-return-expr.rs | 10 +- .../drop-order/drop-order-locals-are-hidden.rs | 2 +- .../drop-order/drop-order-when-cancelled.rs | 10 +- .../ui/async-await/drop-track-bad-field-in-fru.rs | 2 +- .../async-await/drop-track-field-assign-nonsend.rs | 2 +- tests/ui/async-await/drop-track-field-assign.rs | 4 +- .../drop-tracking-unresolved-typeck-results.rs | 4 +- .../ui/async-await/edition-deny-async-fns-2015.rs | 2 +- tests/ui/async-await/expansion-in-attrs.rs | 4 +- tests/ui/async-await/feature-async-closure.rs | 2 +- tests/ui/async-await/feature-async-for-loop.rs | 2 +- tests/ui/async-await/feature-self-return-type.rs | 2 +- tests/ui/async-await/field-assign-nonsend.rs | 2 +- tests/ui/async-await/field-assign.rs | 4 +- tests/ui/async-await/for-await-2015.rs | 2 +- tests/ui/async-await/for-await-consumes-iter.rs | 2 +- tests/ui/async-await/for-await-passthrough.rs | 6 +- tests/ui/async-await/for-await.rs | 4 +- .../future-contains-err-issue-115188.rs | 2 +- .../async-await/future-sizes/async-awaiting-fut.rs | 8 +- tests/ui/async-await/future-sizes/future-as-arg.rs | 4 +- tests/ui/async-await/future-sizes/large-arg.rs | 8 +- tests/ui/async-await/futures-api.rs | 4 +- tests/ui/async-await/generics-and-bounds.rs | 6 +- .../async-await/in-trait/async-associated-types.rs | 4 +- .../in-trait/async-default-fn-overridden.rs | 4 +- .../async-example-desugared-boxed-in-trait.rs | 2 +- .../in-trait/async-example-desugared-boxed.rs | 4 +- .../in-trait/async-example-desugared-extra.rs | 4 +- .../in-trait/async-example-desugared-in-trait.rs | 4 +- .../in-trait/async-example-desugared-manual.rs | 4 +- .../in-trait/async-example-desugared.rs | 4 +- tests/ui/async-await/in-trait/async-example.rs | 4 +- .../in-trait/async-generics-and-bounds.rs | 6 +- tests/ui/async-await/in-trait/async-generics.rs | 6 +- .../in-trait/async-lifetimes-and-bounds.rs | 4 +- tests/ui/async-await/in-trait/async-lifetimes.rs | 4 +- .../in-trait/async-recursive-generic.rs | 2 +- tests/ui/async-await/in-trait/async-recursive.rs | 2 +- .../async-await/in-trait/auxiliary/bad-region.rs | 2 +- .../in-trait/auxiliary/foreign-async-fn.rs | 2 +- tests/ui/async-await/in-trait/bad-region.rs | 4 +- tests/ui/async-await/in-trait/bad-signatures.rs | 2 +- .../async-await/in-trait/coherence-constrained.rs | 2 +- .../dont-project-to-specializable-projection.rs | 4 +- tests/ui/async-await/in-trait/early-bound-1.rs | 4 +- tests/ui/async-await/in-trait/early-bound-2.rs | 4 +- tests/ui/async-await/in-trait/fn-not-async-err.rs | 2 +- tests/ui/async-await/in-trait/fn-not-async-err2.rs | 4 +- tests/ui/async-await/in-trait/generics-mismatch.rs | 2 +- tests/ui/async-await/in-trait/implied-bounds.rs | 4 +- .../in-trait/indirect-recursion-issue-112047.rs | 4 +- tests/ui/async-await/in-trait/issue-102138.rs | 4 +- tests/ui/async-await/in-trait/issue-102219.rs | 6 +- tests/ui/async-await/in-trait/issue-102310.rs | 4 +- tests/ui/async-await/in-trait/issue-104678.rs | 4 +- tests/ui/async-await/in-trait/lifetime-mismatch.rs | 2 +- .../async-await/in-trait/missing-feature-flag.rs | 2 +- .../ui/async-await/in-trait/missing-send-bound.rs | 2 +- tests/ui/async-await/in-trait/nested-rpit.rs | 4 +- .../in-trait/normalize-opaque-with-bound-vars.rs | 6 +- tests/ui/async-await/in-trait/object-safety.rs | 2 +- .../in-trait/return-not-existing-pair.rs | 2 +- .../return-not-existing-type-wrapping-rpitit.rs | 2 +- .../async-await/in-trait/return-type-suggestion.rs | 2 +- .../in-trait/returning-possibly-unsized-self.rs | 4 +- .../in-trait/send-on-async-fn-in-trait.fixed | 4 +- .../in-trait/send-on-async-fn-in-trait.rs | 4 +- .../in-trait/send-on-foreign-async-fn-in-trait.rs | 4 +- .../in-trait/unconstrained-impl-region.rs | 2 +- tests/ui/async-await/in-trait/warn.rs | 2 +- .../incorrect-move-async-order-issue-79694.fixed | 4 +- .../incorrect-move-async-order-issue-79694.rs | 4 +- .../ui/async-await/inference_var_self_argument.rs | 2 +- .../interior-with-const-generic-expr.rs | 4 +- tests/ui/async-await/issue-101715.rs | 2 +- tests/ui/async-await/issue-105501.rs | 4 +- tests/ui/async-await/issue-107036.rs | 6 +- tests/ui/async-await/issue-108572.fixed | 4 +- tests/ui/async-await/issue-108572.rs | 4 +- .../issue-54239-private-type-triggers-lint.rs | 4 +- tests/ui/async-await/issue-60709.rs | 4 +- tests/ui/async-await/issue-61076.rs | 2 +- tests/ui/async-await/issue-61452.rs | 2 +- tests/ui/async-await/issue-61793.rs | 4 +- tests/ui/async-await/issue-62658.rs | 4 +- ...issue-63832-await-short-temporary-lifetime-1.rs | 4 +- .../issue-63832-await-short-temporary-lifetime.rs | 4 +- tests/ui/async-await/issue-64130-1-sync.rs | 2 +- tests/ui/async-await/issue-64130-2-send.rs | 2 +- tests/ui/async-await/issue-64130-3-other.rs | 2 +- tests/ui/async-await/issue-64130-4-async-move.rs | 4 +- .../issue-64130-non-send-future-diags.rs | 2 +- tests/ui/async-await/issue-64391.rs | 4 +- .../issue-65634-raw-ident-suggestion.rs | 4 +- tests/ui/async-await/issue-66312.rs | 2 +- .../ui/async-await/issue-66387-if-without-else.rs | 2 +- tests/ui/async-await/issue-67252-unnamed-future.rs | 2 +- tests/ui/async-await/issue-67651.rs | 2 +- .../ui/async-await/issue-67765-async-diagnostic.rs | 2 +- tests/ui/async-await/issue-68112.rs | 2 +- tests/ui/async-await/issue-68523-start.rs | 2 +- tests/ui/async-await/issue-68523.rs | 2 +- tests/ui/async-await/issue-69446-fnmut-capture.rs | 2 +- tests/ui/async-await/issue-70594.rs | 2 +- tests/ui/async-await/issue-70818.rs | 2 +- tests/ui/async-await/issue-70935-complex-spans.rs | 2 +- tests/ui/async-await/issue-71137.rs | 2 +- tests/ui/async-await/issue-72442.rs | 4 +- tests/ui/async-await/issue-72470-llvm-dominate.rs | 8 +- .../ui/async-await/issue-72590-type-error-sized.rs | 2 +- tests/ui/async-await/issue-73050.rs | 4 +- tests/ui/async-await/issue-73137.rs | 4 +- tests/ui/async-await/issue-73541-1.rs | 2 +- tests/ui/async-await/issue-73541-2.rs | 2 +- tests/ui/async-await/issue-73741-type-err.rs | 2 +- tests/ui/async-await/issue-74047.rs | 2 +- .../issue-74072-lifetime-name-annotations.rs | 2 +- .../async-await/issue-74497-lifetime-in-opaque.rs | 2 +- .../issue-75785-confusing-named-region.rs | 2 +- tests/ui/async-await/issue-76547.rs | 2 +- tests/ui/async-await/issue-77993-2.rs | 2 +- tests/ui/async-await/issue-78115.rs | 4 +- tests/ui/async-await/issue-84841.rs | 2 +- tests/ui/async-await/issue-86507.rs | 2 +- tests/ui/async-await/issue-93197.rs | 4 +- tests/ui/async-await/issue-93648.rs | 4 +- tests/ui/async-await/issue-98634.rs | 2 +- .../ui/async-await/issues/auxiliary/issue-60674.rs | 4 +- .../ui/async-await/issues/auxiliary/issue_67893.rs | 2 +- tests/ui/async-await/issues/issue-102206.rs | 2 +- tests/ui/async-await/issues/issue-107280.rs | 2 +- tests/ui/async-await/issues/issue-112225-1.rs | 4 +- tests/ui/async-await/issues/issue-112225-2.rs | 2 +- tests/ui/async-await/issues/issue-51719.rs | 2 +- tests/ui/async-await/issues/issue-51751.rs | 2 +- tests/ui/async-await/issues/issue-53249.rs | 4 +- .../async-await/issues/issue-54752-async-block.rs | 6 +- tests/ui/async-await/issues/issue-54974.rs | 4 +- tests/ui/async-await/issues/issue-55324.rs | 4 +- tests/ui/async-await/issues/issue-55809.rs | 4 +- tests/ui/async-await/issues/issue-58885.rs | 4 +- tests/ui/async-await/issues/issue-59001.rs | 4 +- tests/ui/async-await/issues/issue-59972.rs | 4 +- tests/ui/async-await/issues/issue-60518.rs | 4 +- .../issues/issue-60655-latebound-regions.rs | 4 +- tests/ui/async-await/issues/issue-60674.rs | 6 +- tests/ui/async-await/issues/issue-61187.rs | 2 +- tests/ui/async-await/issues/issue-61986.rs | 4 +- tests/ui/async-await/issues/issue-62009-1.rs | 2 +- tests/ui/async-await/issues/issue-62009-2.rs | 2 +- tests/ui/async-await/issues/issue-62097.rs | 2 +- tests/ui/async-await/issues/issue-62517-1.rs | 4 +- tests/ui/async-await/issues/issue-62517-2.rs | 4 +- tests/ui/async-await/issues/issue-63388-1.rs | 2 +- tests/ui/async-await/issues/issue-63388-2.rs | 2 +- tests/ui/async-await/issues/issue-63388-3.rs | 4 +- tests/ui/async-await/issues/issue-63388-4.rs | 4 +- tests/ui/async-await/issues/issue-64391-2.rs | 4 +- tests/ui/async-await/issues/issue-64433.rs | 4 +- tests/ui/async-await/issues/issue-64477-2.rs | 4 +- tests/ui/async-await/issues/issue-64477.rs | 4 +- tests/ui/async-await/issues/issue-64964.rs | 8 +- tests/ui/async-await/issues/issue-65159.rs | 2 +- ...issue-65419-async-fn-resume-after-completion.rs | 12 +- .../issue-65419-async-fn-resume-after-panic.rs | 12 +- ...ssue-65419-coroutine-resume-after-completion.rs | 10 +- .../issues/issue-65436-raw-ptr-not-send.rs | 4 +- .../async-await/issues/issue-66695-static-refs.rs | 4 +- .../issue-66958-non-copy-infered-type-arg.rs | 2 +- .../issues/issue-67611-static-mut-refs.rs | 4 +- tests/ui/async-await/issues/issue-67893.rs | 4 +- tests/ui/async-await/issues/issue-69307-nested.rs | 4 +- tests/ui/async-await/issues/issue-69307.rs | 4 +- tests/ui/async-await/issues/issue-72312.rs | 2 +- tests/ui/async-await/issues/issue-78600.rs | 4 +- tests/ui/async-await/issues/issue-78654.rs | 4 +- .../async-await/issues/issue-78938-async-block.rs | 2 +- tests/ui/async-await/issues/issue-95307.rs | 2 +- .../async-await/issues/non-async-enclosing-span.rs | 2 +- .../ui/async-await/missed-capture-issue-107414.rs | 4 +- .../missing-return-in-async-block.fixed | 4 +- .../async-await/missing-return-in-async-block.rs | 4 +- .../move-part-await-return-rest-struct.rs | 6 +- .../move-part-await-return-rest-tuple.rs | 6 +- tests/ui/async-await/multiple-lifetimes/elided.rs | 4 +- tests/ui/async-await/multiple-lifetimes/fn-ptr.rs | 4 +- tests/ui/async-await/multiple-lifetimes/hrtb.rs | 4 +- .../member-constraints-min-choice-issue-63033.rs | 4 +- tests/ui/async-await/multiple-lifetimes/named.rs | 4 +- .../multiple-lifetimes/partial-relation.rs | 4 +- .../multiple-lifetimes/ret-impl-trait-fg.rs | 4 +- .../multiple-lifetimes/ret-impl-trait-one.rs | 2 +- tests/ui/async-await/multiple-lifetimes/ret-ref.rs | 2 +- .../ui/async-await/multiple-lifetimes/variance.rs | 4 +- .../mutually-recursive-async-impl-trait-type.rs | 2 +- tests/ui/async-await/nested-in-impl.rs | 4 +- tests/ui/async-await/no-async-const.rs | 4 +- tests/ui/async-await/no-const-async.rs | 4 +- .../ui/async-await/no-move-across-await-struct.rs | 4 +- tests/ui/async-await/no-move-across-await-tuple.rs | 4 +- .../no-non-guaranteed-initialization.rs | 4 +- .../no-params-non-move-async-closure.rs | 4 +- tests/ui/async-await/no-std.rs | 4 +- tests/ui/async-await/no-unsafe-async.rs | 2 +- tests/ui/async-await/non-trivial-drop.rs | 4 +- .../normalize-output-in-signature-deduction.rs | 8 +- .../ui/async-await/partial-drop-partial-reinit.rs | 2 +- .../partial-initialization-across-await.rs | 2 +- .../async-await/proper-span-for-type-error.fixed | 4 +- tests/ui/async-await/proper-span-for-type-error.rs | 4 +- .../async-await/recursive-async-impl-trait-type.rs | 2 +- .../async-await/repeat_count_const_in_async_fn.rs | 6 +- tests/ui/async-await/return-ty-raw-ptr-coercion.rs | 4 +- tests/ui/async-await/return-ty-unsize-coercion.rs | 4 +- .../return-type-notation/issue-110963-early.rs | 4 +- .../return-type-notation/issue-110963-late.rs | 4 +- .../normalizing-self-auto-trait-issue-109924.rs | 8 +- .../rtn-implied-in-supertrait.rs | 4 +- .../super-method-bound-ambig.rs | 2 +- .../return-type-notation/super-method-bound.rs | 4 +- .../return-type-notation/supertrait-bound.rs | 2 +- .../return-type-notation/ty-or-ct-params.rs | 2 +- tests/ui/async-await/send-bound-async-closure.rs | 4 +- .../suggest-missing-await-closure.fixed | 4 +- .../async-await/suggest-missing-await-closure.rs | 4 +- tests/ui/async-await/suggest-missing-await.rs | 2 +- .../suggest-switching-edition-on-await-cargo.rs | 2 +- tests/ui/async-await/task-context-arg.rs | 6 +- tests/ui/async-await/track-caller/async-block.rs | 4 +- .../async-await/track-caller/async-closure-gate.rs | 4 +- tests/ui/async-await/track-caller/issue-105134.rs | 4 +- .../async-await/track-caller/panic-track-caller.rs | 8 +- tests/ui/async-await/try-on-option-in-async.rs | 2 +- tests/ui/async-await/type-parameter-send.rs | 6 +- tests/ui/async-await/unnecessary-await.rs | 2 +- tests/ui/async-await/unreachable-lint-1.rs | 2 +- tests/ui/async-await/unreachable-lint.rs | 4 +- tests/ui/async-await/unresolved_type_param.rs | 2 +- tests/ui/async-await/unsized-across-await.rs | 2 +- tests/ui/async-await/unused-lifetime.rs | 2 +- tests/ui/atomic-from-mut-not-available.rs | 4 +- tests/ui/attr-bad-crate-attr.rs | 2 +- tests/ui/attr-shebang.rs | 2 +- tests/ui/attr-start.rs | 4 +- tests/ui/attributes/attr-before-view-item.rs | 4 +- tests/ui/attributes/attr-before-view-item2.rs | 4 +- tests/ui/attributes/attr-mix-new.rs | 4 +- .../ui/attributes/auxiliary/key-value-expansion.rs | 4 +- tests/ui/attributes/class-attributes-1.rs | 4 +- tests/ui/attributes/class-attributes-2.rs | 2 +- tests/ui/attributes/duplicated-attributes.rs | 4 +- .../attributes/extented-attribute-macro-error.rs | 2 +- .../ui/attributes/invalid_macro_export_argument.rs | 4 +- .../issue-105594-invalid-attr-validation.rs | 2 +- tests/ui/attributes/issue-115264-expr-field.rs | 2 +- tests/ui/attributes/issue-115264-pat-field.rs | 2 +- tests/ui/attributes/issue-40962.rs | 2 +- tests/ui/attributes/item-attributes.rs | 2 +- tests/ui/attributes/key-value-expansion.rs | 2 +- tests/ui/attributes/log-backtrace.rs | 10 +- .../attributes/main-removed-2/auxiliary/tokyo.rs | 4 +- tests/ui/attributes/main-removed-2/main.rs | 8 +- tests/ui/attributes/method-attributes.rs | 6 +- tests/ui/attributes/rustc_confusables.rs | 2 +- tests/ui/attributes/tool_attributes.rs | 2 +- .../attributes/unix_sigpipe/unix_sigpipe-error.rs | 4 +- .../unix_sigpipe/unix_sigpipe-inherit.rs | 4 +- .../unix_sigpipe/unix_sigpipe-not-used.rs | 4 +- .../unix_sigpipe/unix_sigpipe-only-feature.rs | 4 +- .../unix_sigpipe/unix_sigpipe-rustc_main.rs | 4 +- .../unix_sigpipe/unix_sigpipe-sig_dfl.rs | 4 +- .../ui/attributes/unnamed-field-attributes-dup.rs | 2 +- .../ui/attributes/unnamed-field-attributes-vis.rs | 2 +- tests/ui/attributes/unnamed-field-attributes.rs | 2 +- .../ui/attributes/unrestricted-attribute-tokens.rs | 2 +- tests/ui/attributes/used_with_arg_no_mangle.rs | 2 +- tests/ui/attributes/variant-attributes.rs | 6 +- tests/ui/attributes/z-crate-attr.rs | 4 +- tests/ui/attrs-resolution.rs | 2 +- .../ui/augmented-assignments-feature-gate-cross.rs | 4 +- tests/ui/augmented-assignments-rpass.rs | 2 +- tests/ui/auto-instantiate.rs | 2 +- tests/ui/auto-traits/auto-is-contextual.rs | 2 +- .../auto-traits/auto-trait-projection-recursion.rs | 2 +- tests/ui/auto-traits/auto-trait-validation.fixed | 2 +- tests/ui/auto-traits/auto-trait-validation.rs | 2 +- tests/ui/auto-traits/auto-traits.rs | 2 +- tests/ui/auto-traits/issue-23080-2.rs | 4 +- tests/ui/auto-traits/pre-cfg.rs | 2 +- .../autoref-autoderef/auto-ref-bounded-ty-param.rs | 2 +- tests/ui/autoref-autoderef/auto-ref-sliceable.rs | 2 +- tests/ui/autoref-autoderef/auto-ref.rs | 2 +- .../autoderef-and-borrow-method-receiver.rs | 4 +- .../autoref-autoderef/autoderef-method-on-trait.rs | 2 +- .../autoref-autoderef/autoderef-method-priority.rs | 2 +- .../autoderef-method-twice-but-not-thrice.rs | 2 +- .../ui/autoref-autoderef/autoderef-method-twice.rs | 2 +- tests/ui/autoref-autoderef/autoderef-method.rs | 2 +- tests/ui/autoref-autoderef/autoderef-privacy.rs | 2 +- .../autoref-intermediate-types-issue-3585.rs | 2 +- tests/ui/autoref-autoderef/deref-into-array.rs | 2 +- tests/ui/auxiliary/edition-kw-macro-2015.rs | 2 +- tests/ui/auxiliary/edition-kw-macro-2018.rs | 2 +- tests/ui/auxiliary/issue-13560-1.rs | 2 +- tests/ui/auxiliary/issue-13560-2.rs | 2 +- tests/ui/auxiliary/issue-13560-3.rs | 2 +- tests/ui/auxiliary/issue-76387.rs | 2 +- tests/ui/auxiliary/msvc-data-only-lib.rs | 2 +- tests/ui/auxiliary/rustc-rust-log-aux.rs | 2 +- tests/ui/backtrace-apple-no-dsymutil.rs | 8 +- tests/ui/backtrace.rs | 18 +- tests/ui/bare-fn-implements-fn-mut.rs | 2 +- tests/ui/bare-static-string.rs | 2 +- tests/ui/bench/issue-32062.rs | 4 +- tests/ui/big-literals.rs | 2 +- tests/ui/bind-by-move.rs | 2 +- .../ui/binding/bind-field-short-with-modifiers.rs | 2 +- tests/ui/binding/borrowed-ptr-pattern-2.rs | 2 +- tests/ui/binding/borrowed-ptr-pattern-3.rs | 2 +- .../ui/binding/borrowed-ptr-pattern-infallible.rs | 2 +- tests/ui/binding/borrowed-ptr-pattern-option.rs | 2 +- tests/ui/binding/borrowed-ptr-pattern.rs | 2 +- tests/ui/binding/empty-types-in-patterns.rs | 2 +- tests/ui/binding/exhaustive-bool-match-sanity.rs | 2 +- tests/ui/binding/expr-match-generic-unique1.rs | 2 +- tests/ui/binding/expr-match-generic-unique2.rs | 2 +- tests/ui/binding/expr-match-generic.rs | 2 +- tests/ui/binding/expr-match-panic-all.rs | 2 +- tests/ui/binding/expr-match-panic.rs | 2 +- tests/ui/binding/expr-match-unique.rs | 2 +- tests/ui/binding/expr-match.rs | 2 +- tests/ui/binding/fat-arrow-match.rs | 2 +- .../fn-arg-incomplete-pattern-drop-order.rs | 4 +- tests/ui/binding/fn-pattern-expected-type-2.rs | 2 +- tests/ui/binding/fn-pattern-expected-type.rs | 2 +- tests/ui/binding/func-arg-incomplete-pattern.rs | 2 +- tests/ui/binding/func-arg-ref-pattern.rs | 2 +- tests/ui/binding/func-arg-wild-pattern.rs | 2 +- tests/ui/binding/if-let.rs | 2 +- tests/ui/binding/inconsistent-lifetime-mismatch.rs | 4 +- .../ui/binding/inferred-suffix-in-pattern-range.rs | 2 +- .../binding/irrefutable-if-let-without-else.fixed | 2 +- .../ui/binding/irrefutable-if-let-without-else.rs | 2 +- tests/ui/binding/irrefutable-slice-patterns.rs | 2 +- tests/ui/binding/issue-53114-borrow-checks.rs | 2 +- tests/ui/binding/let-assignability.rs | 2 +- tests/ui/binding/let-destruct-ref.rs | 2 +- tests/ui/binding/let-var-hygiene.rs | 2 +- tests/ui/binding/match-arm-statics.rs | 4 +- tests/ui/binding/match-beginning-vert.rs | 2 +- tests/ui/binding/match-borrowed_str.rs | 2 +- tests/ui/binding/match-bot-2.rs | 2 +- tests/ui/binding/match-bot.rs | 2 +- tests/ui/binding/match-byte-array-patterns.rs | 2 +- tests/ui/binding/match-enum-struct-0.rs | 2 +- tests/ui/binding/match-enum-struct-1.rs | 2 +- tests/ui/binding/match-implicit-copy-unique.rs | 2 +- tests/ui/binding/match-in-macro.rs | 2 +- tests/ui/binding/match-join.rs | 2 +- tests/ui/binding/match-larger-const.rs | 2 +- tests/ui/binding/match-naked-record-expr.rs | 4 +- tests/ui/binding/match-naked-record.rs | 4 +- tests/ui/binding/match-path.rs | 4 +- tests/ui/binding/match-pattern-bindings.rs | 2 +- tests/ui/binding/match-pattern-lit.rs | 2 +- tests/ui/binding/match-pattern-no-type-params.rs | 2 +- tests/ui/binding/match-pattern-simple.rs | 4 +- tests/ui/binding/match-phi.rs | 4 +- tests/ui/binding/match-pipe-binding.rs | 2 +- tests/ui/binding/match-range-infer.rs | 2 +- tests/ui/binding/match-range-static.rs | 4 +- tests/ui/binding/match-range.rs | 2 +- tests/ui/binding/match-reassign.rs | 2 +- .../ui/binding/match-ref-binding-in-guard-3256.rs | 2 +- tests/ui/binding/match-ref-binding-mut-option.rs | 2 +- tests/ui/binding/match-ref-binding-mut.rs | 2 +- tests/ui/binding/match-ref-binding.rs | 2 +- tests/ui/binding/match-ref-unsized.rs | 2 +- tests/ui/binding/match-str.rs | 2 +- tests/ui/binding/match-struct-0.rs | 2 +- tests/ui/binding/match-tag.rs | 2 +- tests/ui/binding/match-unique-bind.rs | 2 +- tests/ui/binding/match-unsized.rs | 2 +- .../binding/match-value-binding-in-guard-3291.rs | 4 +- tests/ui/binding/match-var-hygiene.rs | 2 +- tests/ui/binding/match-vec-alternatives.rs | 2 +- tests/ui/binding/match-vec-rvalue.rs | 2 +- tests/ui/binding/match-with-ret-arm.rs | 2 +- tests/ui/binding/multi-let.rs | 2 +- tests/ui/binding/mut-in-ident-patterns.rs | 2 +- tests/ui/binding/nested-matchs.rs | 2 +- tests/ui/binding/nested-pattern.rs | 2 +- tests/ui/binding/nil-pattern.rs | 4 +- tests/ui/binding/nullary-or-pattern.rs | 2 +- tests/ui/binding/optional_comma_in_match_arm.rs | 2 +- tests/ui/binding/or-pattern.rs | 2 +- tests/ui/binding/order-drop-with-match.rs | 2 +- tests/ui/binding/pat-ranges.rs | 2 +- tests/ui/binding/pat-tuple-1.rs | 2 +- tests/ui/binding/pat-tuple-2.rs | 2 +- tests/ui/binding/pat-tuple-3.rs | 2 +- tests/ui/binding/pat-tuple-4.rs | 2 +- tests/ui/binding/pat-tuple-5.rs | 2 +- tests/ui/binding/pat-tuple-6.rs | 2 +- tests/ui/binding/pat-tuple-7.rs | 2 +- tests/ui/binding/pattern-bound-var-in-for-each.rs | 2 +- tests/ui/binding/pattern-in-closure.rs | 2 +- .../binding/range-inclusive-pattern-precedence.rs | 2 +- tests/ui/binding/shadow.rs | 2 +- tests/ui/binding/simple-generic-match.rs | 4 +- tests/ui/binding/use-uninit-match.rs | 2 +- tests/ui/binding/use-uninit-match2.rs | 2 +- tests/ui/binding/zero_sized_subslice_match.rs | 2 +- tests/ui/binop/binary-minus-without-space.rs | 2 +- tests/ui/binop/binary-op-on-double-ref.fixed | 2 +- tests/ui/binop/binary-op-on-double-ref.rs | 2 +- tests/ui/binop/binary-op-on-fn-ptr-eq.rs | 2 +- tests/ui/binop/binop-bitxor-str.rs | 2 +- tests/ui/binop/binop-fail-3.rs | 6 +- tests/ui/binop/binop-mul-bool.rs | 2 +- tests/ui/binop/binop-panic.rs | 6 +- tests/ui/binop/binops-issue-22743.rs | 2 +- tests/ui/binop/binops.rs | 2 +- tests/ui/binop/borrow-suggestion-109352.fixed | 2 +- tests/ui/binop/borrow-suggestion-109352.rs | 2 +- .../binop/false-binop-caused-by-missing-semi.fixed | 2 +- .../ui/binop/false-binop-caused-by-missing-semi.rs | 2 +- tests/ui/binop/issue-25916.rs | 2 +- tests/ui/binop/operator-multidispatch.rs | 2 +- tests/ui/binop/operator-overloading.rs | 2 +- tests/ui/binop/structured-compare.rs | 2 +- tests/ui/bitwise.rs | 2 +- .../block-result/consider-removing-last-semi.fixed | 2 +- .../ui/block-result/consider-removing-last-semi.rs | 2 +- tests/ui/borrow-by-val-method-receiver.rs | 2 +- .../ui/borrowck/alias-liveness/escaping-bounds.rs | 2 +- tests/ui/borrowck/alias-liveness/gat-static.rs | 2 +- .../higher-ranked-outlives-for-capture.rs | 2 +- tests/ui/borrowck/alias-liveness/higher-ranked.rs | 2 +- tests/ui/borrowck/alias-liveness/opaque-capture.rs | 2 +- .../borrowck/alias-liveness/opaque-type-param.rs | 2 +- tests/ui/borrowck/alias-liveness/rpit-static.rs | 2 +- tests/ui/borrowck/alias-liveness/rpitit-static.rs | 2 +- tests/ui/borrowck/alias-liveness/rtn-static.rs | 2 +- tests/ui/borrowck/assign-never-type.rs | 2 +- tests/ui/borrowck/async-reference-generality.rs | 4 +- .../borrow-raw-address-of-deref-mutability-ok.rs | 2 +- .../borrow-raw-address-of-mutability-ok.rs | 2 +- tests/ui/borrowck/borrowck-assign-to-subfield.rs | 4 +- .../borrowck/borrowck-assignment-to-static-mut.rs | 2 +- tests/ui/borrowck/borrowck-binding-mutbl.rs | 2 +- .../ui/borrowck/borrowck-borrow-from-expr-block.rs | 2 +- .../borrowck-borrow-of-mut-base-ptr-safe.rs | 4 +- .../borrowck/borrowck-borrowed-uniq-rvalue.fixed | 2 +- tests/ui/borrowck/borrowck-borrowed-uniq-rvalue.rs | 2 +- tests/ui/borrowck/borrowck-box-sensitivity.rs | 2 +- .../borrowck-closures-slice-patterns-ok.rs | 2 +- tests/ui/borrowck/borrowck-closures-two-imm.rs | 2 +- .../borrowck/borrowck-field-sensitivity-rpass.rs | 4 +- tests/ui/borrowck/borrowck-fixed-length-vecs.rs | 2 +- tests/ui/borrowck/borrowck-freeze-frozen-mut.rs | 2 +- tests/ui/borrowck/borrowck-issue-2657-2.fixed | 2 +- tests/ui/borrowck/borrowck-issue-2657-2.rs | 2 +- tests/ui/borrowck/borrowck-lend-args.rs | 4 +- tests/ui/borrowck/borrowck-local-borrow.rs | 6 +- .../borrowck-macro-interaction-issue-6304.rs | 2 +- tests/ui/borrowck/borrowck-move-by-capture-ok.rs | 2 +- .../borrowck/borrowck-move-error-with-note.fixed | 2 +- tests/ui/borrowck/borrowck-move-error-with-note.rs | 2 +- ...orrowck-move-out-from-array-no-overlap-match.rs | 2 +- .../borrowck-move-out-from-array-no-overlap.rs | 2 +- ...wck-move-out-from-array-use-no-overlap-match.rs | 2 +- .../borrowck-move-out-from-array-use-no-overlap.rs | 2 +- ...orrowck-move-out-of-overloaded-auto-deref.fixed | 2 +- .../borrowck-move-out-of-overloaded-auto-deref.rs | 2 +- .../borrowck-move-out-of-struct-with-dtor.fixed | 2 +- .../borrowck-move-out-of-struct-with-dtor.rs | 2 +- ...rrowck-move-out-of-tuple-struct-with-dtor.fixed | 2 +- .../borrowck-move-out-of-tuple-struct-with-dtor.rs | 2 +- .../borrowck-multiple-borrows-interior-boxes.rs | 2 +- tests/ui/borrowck/borrowck-mut-uniq.rs | 2 +- tests/ui/borrowck/borrowck-mut-vec-as-imm-slice.rs | 2 +- tests/ui/borrowck/borrowck-pat-enum.rs | 2 +- .../borrowck/borrowck-pat-reassign-no-binding.rs | 2 +- tests/ui/borrowck/borrowck-rvalues-mutable.rs | 2 +- .../borrowck/borrowck-scope-of-deref-issue-4666.rs | 2 +- ...-slice-pattern-element-loan-array-no-overlap.rs | 2 +- .../borrowck-slice-pattern-element-loan-rpass.rs | 2 +- ...-slice-pattern-element-loan-slice-no-overlap.rs | 2 +- tests/ui/borrowck/borrowck-static-item-in-fn.rs | 4 +- tests/ui/borrowck/borrowck-trait-lifetime.rs | 4 +- tests/ui/borrowck/borrowck-uniq-via-ref.rs | 4 +- tests/ui/borrowck/borrowck-univariant-enum.rs | 2 +- .../borrowck-unsafe-static-mutable-borrows.rs | 2 +- tests/ui/borrowck/borrowck-unused-mut-locals.rs | 2 +- tests/ui/borrowck/borrowck-use-mut-borrow-rpass.rs | 4 +- tests/ui/borrowck/clone-span-on-try-operator.fixed | 2 +- tests/ui/borrowck/clone-span-on-try-operator.rs | 2 +- tests/ui/borrowck/copy-suggestion-region-vid.fixed | 2 +- tests/ui/borrowck/copy-suggestion-region-vid.rs | 2 +- tests/ui/borrowck/fn-item-check-trait-ref.rs | 2 +- tests/ui/borrowck/fn-item-check-type-params.rs | 2 +- tests/ui/borrowck/fsu-moves-and-copies.rs | 2 +- tests/ui/borrowck/issue-103095.rs | 2 +- tests/ui/borrowck/issue-103250.rs | 2 +- tests/ui/borrowck/issue-103624.rs | 2 +- tests/ui/borrowck/issue-104639-lifetime-order.rs | 4 +- tests/ui/borrowck/issue-10876.rs | 2 +- .../issue-109271-pass-self-into-closure.fixed | 2 +- .../issue-109271-pass-self-into-closure.rs | 2 +- tests/ui/borrowck/issue-11493.fixed | 2 +- tests/ui/borrowck/issue-11493.rs | 2 +- .../borrowck/issue-115259-suggest-iter-mut.fixed | 2 +- tests/ui/borrowck/issue-115259-suggest-iter-mut.rs | 2 +- tests/ui/borrowck/issue-17263.rs | 2 +- .../issue-23338-params-outlive-temps-of-body.rs | 2 +- tests/ui/borrowck/issue-28934.rs | 6 +- tests/ui/borrowck/issue-29166.rs | 2 +- tests/ui/borrowck/issue-36082.fixed | 2 +- tests/ui/borrowck/issue-36082.rs | 2 +- tests/ui/borrowck/issue-46095.rs | 2 +- .../borrowck/issue-51348-multi-ref-mut-in-guard.rs | 2 +- tests/ui/borrowck/issue-51415.fixed | 2 +- tests/ui/borrowck/issue-51415.rs | 2 +- ...e-52967-edition-2018-needs-two-phase-borrows.rs | 6 +- ...55552-ascribe-wildcard-to-structured-pattern.rs | 2 +- tests/ui/borrowck/issue-62007-assign-box.rs | 2 +- tests/ui/borrowck/issue-62007-assign-field.rs | 2 +- .../borrowck/issue-62387-suggest-iter-mut-2.fixed | 2 +- .../ui/borrowck/issue-62387-suggest-iter-mut-2.rs | 2 +- .../ui/borrowck/issue-62387-suggest-iter-mut.fixed | 2 +- tests/ui/borrowck/issue-62387-suggest-iter-mut.rs | 2 +- tests/ui/borrowck/issue-70919-drop-in-loop.rs | 2 +- tests/ui/borrowck/issue-71546.rs | 2 +- tests/ui/borrowck/issue-80772.rs | 2 +- .../issue-82126-mismatched-subst-and-hir.rs | 2 +- tests/ui/borrowck/issue-83760.fixed | 2 +- tests/ui/borrowck/issue-83760.rs | 2 +- tests/ui/borrowck/issue-83924.fixed | 2 +- tests/ui/borrowck/issue-83924.rs | 2 +- tests/ui/borrowck/issue-93093.rs | 2 +- ...ssue-95079-missing-move-in-nested-closure.fixed | 2 +- .../issue-95079-missing-move-in-nested-closure.rs | 2 +- .../borrowck/kindck-implicit-close-over-mut-var.rs | 2 +- tests/ui/borrowck/lazy-init.rs | 2 +- tests/ui/borrowck/let_underscore_temporary.rs | 2 +- tests/ui/borrowck/move-error-snippets-ext.rs | 2 +- tests/ui/borrowck/move-error-snippets.rs | 2 +- tests/ui/borrowck/move-in-pattern.fixed | 2 +- tests/ui/borrowck/move-in-pattern.rs | 2 +- tests/ui/borrowck/mut-borrow-in-loop-2.fixed | 2 +- tests/ui/borrowck/mut-borrow-in-loop-2.rs | 2 +- tests/ui/borrowck/suggest-mut-iterator.fixed | 2 +- tests/ui/borrowck/suggest-mut-iterator.rs | 2 +- .../two-phase-activation-sharing-interference.rs | 4 +- .../two-phase-allow-access-during-reservation.rs | 4 +- tests/ui/borrowck/two-phase-baseline.rs | 2 +- tests/ui/borrowck/two-phase-bin-ops.rs | 2 +- ...o-phase-control-flow-split-before-activation.rs | 2 +- tests/ui/borrowck/two-phase-method-receivers.rs | 2 +- .../ui/borrowck/two-phase-multiple-activations.rs | 2 +- tests/ui/borrowck/two-phase-nonrecv-autoref.rs | 4 +- ...two-phase-reservation-sharing-interference-2.rs | 2 +- .../two-phase-reservation-sharing-interference.rs | 4 +- ...ures-move-upvar-from-non-once-ref-closure.fixed | 2 +- ...losures-move-upvar-from-non-once-ref-closure.rs | 2 +- tests/ui/box/alloc-unstable.rs | 2 +- tests/ui/box/into-boxed-slice.rs | 2 +- tests/ui/box/issue-95036.rs | 4 +- tests/ui/box/large-allocator-ice.rs | 2 +- tests/ui/box/new-box-syntax.rs | 4 +- tests/ui/box/new-box.rs | 2 +- tests/ui/box/new.rs | 4 +- tests/ui/box/thin_align.rs | 2 +- tests/ui/box/thin_drop.rs | 2 +- tests/ui/box/thin_new.rs | 2 +- tests/ui/box/thin_zst.rs | 2 +- tests/ui/box/unit/expr-block-generic-unique1.rs | 2 +- tests/ui/box/unit/expr-block-generic-unique2.rs | 2 +- tests/ui/box/unit/expr-if-unique.rs | 2 +- tests/ui/box/unit/unique-assign-copy.rs | 2 +- tests/ui/box/unit/unique-assign-drop.rs | 2 +- tests/ui/box/unit/unique-assign-generic.rs | 2 +- tests/ui/box/unit/unique-assign.rs | 2 +- tests/ui/box/unit/unique-autoderef-field.rs | 2 +- tests/ui/box/unit/unique-autoderef-index.rs | 2 +- tests/ui/box/unit/unique-cmp.rs | 2 +- tests/ui/box/unit/unique-containing-tag.rs | 4 +- tests/ui/box/unit/unique-create.rs | 4 +- tests/ui/box/unit/unique-decl-init-copy.rs | 2 +- tests/ui/box/unit/unique-decl-init.rs | 2 +- tests/ui/box/unit/unique-decl-move.rs | 2 +- tests/ui/box/unit/unique-decl.rs | 2 +- tests/ui/box/unit/unique-deref.rs | 2 +- tests/ui/box/unit/unique-destructure.rs | 2 +- tests/ui/box/unit/unique-drop-complex.rs | 4 +- tests/ui/box/unit/unique-ffi-symbols.rs | 2 +- tests/ui/box/unit/unique-fn-arg-move.rs | 2 +- tests/ui/box/unit/unique-fn-arg-mut.rs | 2 +- tests/ui/box/unit/unique-fn-arg.rs | 2 +- tests/ui/box/unit/unique-fn-ret.rs | 2 +- tests/ui/box/unit/unique-generic-assign.rs | 4 +- tests/ui/box/unit/unique-in-tag.rs | 2 +- tests/ui/box/unit/unique-in-vec-copy.rs | 2 +- tests/ui/box/unit/unique-in-vec.rs | 2 +- tests/ui/box/unit/unique-init.rs | 4 +- tests/ui/box/unit/unique-kinds.rs | 2 +- tests/ui/box/unit/unique-log.rs | 2 +- tests/ui/box/unit/unique-match-discrim.rs | 4 +- tests/ui/box/unit/unique-move-drop.rs | 2 +- tests/ui/box/unit/unique-move-temp.rs | 2 +- tests/ui/box/unit/unique-move.rs | 2 +- tests/ui/box/unit/unique-mutable.rs | 2 +- tests/ui/box/unit/unique-object-move.rs | 4 +- tests/ui/box/unit/unique-pat-2.rs | 2 +- tests/ui/box/unit/unique-pat-3.rs | 2 +- tests/ui/box/unit/unique-pat.rs | 2 +- tests/ui/box/unit/unique-rec.rs | 2 +- tests/ui/box/unit/unique-send-2.rs | 4 +- tests/ui/box/unit/unique-send.rs | 2 +- tests/ui/box/unit/unique-swap.rs | 2 +- tests/ui/box/unit/unwind-unique.rs | 6 +- .../ui/btreemap/btreemap_into_iterator_lifetime.rs | 2 +- tests/ui/builtin-clone-unwind.rs | 4 +- .../builtin-superkinds-capabilities-transitive.rs | 2 +- .../builtin-superkinds-capabilities-xc.rs | 4 +- .../builtin-superkinds-capabilities.rs | 2 +- .../builtin-superkinds-in-metadata.rs | 2 +- .../builtin-superkinds-in-metadata2.rs | 4 +- .../builtin-superkinds-phantom-typaram.rs | 4 +- .../builtin-superkinds-simple2.rs | 4 +- .../builtin-superkinds-typaram.rs | 4 +- tests/ui/c-variadic/issue-86053-1.rs | 6 +- tests/ui/c-variadic/variadic-ffi-1.rs | 4 +- tests/ui/c-variadic/variadic-ffi-2.rs | 2 +- .../c-variadic/variadic-unreachable-arg-error.rs | 2 +- tests/ui/can-copy-pod.rs | 4 +- tests/ui/cancel-clean-via-immediate-rvalue-ref.rs | 4 +- tests/ui/capture1.rs | 2 +- tests/ui/cast/cast-does-fallback.rs | 2 +- tests/ui/cast/cast-from-nil.rs | 2 +- tests/ui/cast/cast-pointee-projection.rs | 2 +- tests/ui/cast/cast-region-to-uint.rs | 2 +- tests/ui/cast/cast-rfc0401-vtable-kinds.rs | 2 +- tests/ui/cast/cast-rfc0401.rs | 2 +- tests/ui/cast/cast-to-infer-ty.rs | 2 +- tests/ui/cast/cast-to-nil.rs | 2 +- tests/ui/cast/cast.rs | 2 +- tests/ui/cast/codegen-object-shim.rs | 2 +- tests/ui/cast/fat-ptr-cast-rpass.rs | 2 +- tests/ui/cast/issue-84213.fixed | 2 +- tests/ui/cast/issue-84213.rs | 2 +- tests/ui/cast/issue-89497.fixed | 2 +- tests/ui/cast/issue-89497.rs | 2 +- tests/ui/cast/ptr-to-ptr-different-regions.rs | 2 +- tests/ui/cast/supported-cast.rs | 2 +- tests/ui/catch-unwind-bang.rs | 4 +- .../assume-incomplete-release/assume-incomplete.rs | 8 +- .../auxiliary/ver-cfg-rel.rs | 4 +- .../cfg/auxiliary/cfg_false_lib_no_std_before.rs | 2 +- tests/ui/cfg/cfg-attr-cfg.rs | 4 +- tests/ui/cfg/cfg-attr-crate.rs | 4 +- tests/ui/cfg/cfg-false-feature.rs | 4 +- tests/ui/cfg/cfg-family.rs | 8 +- tests/ui/cfg/cfg-in-crate-1.rs | 4 +- tests/ui/cfg/cfg-macros-foo.rs | 4 +- tests/ui/cfg/cfg-macros-notfoo.rs | 4 +- tests/ui/cfg/cfg-match-arm.rs | 4 +- tests/ui/cfg/cfg-method-receiver-ok.rs | 2 +- tests/ui/cfg/cfg-panic-abort.rs | 6 +- tests/ui/cfg/cfg-panic.rs | 6 +- tests/ui/cfg/cfg-path-error.rs | 2 +- tests/ui/cfg/cfg-target-abi.rs | 2 +- tests/ui/cfg/cfg-target-compact-errors.rs | 2 +- tests/ui/cfg/cfg-target-compact.rs | 2 +- tests/ui/cfg/cfg-target-family.rs | 6 +- tests/ui/cfg/cfg-target-vendor.rs | 2 +- tests/ui/cfg/cfg_attr.rs | 4 +- tests/ui/cfg/cfg_false_no_std-1.rs | 4 +- tests/ui/cfg/cfg_false_no_std-2.rs | 6 +- tests/ui/cfg/cfg_false_no_std.rs | 4 +- tests/ui/cfg/cfg_inner_static.rs | 6 +- tests/ui/cfg/cfg_stmt_expr.rs | 2 +- tests/ui/cfg/cfgs-on-items.rs | 4 +- tests/ui/cfg/conditional-compile-arch.rs | 4 +- tests/ui/cfg/conditional-compile.rs | 2 +- tests/ui/cfg/crt-static-off-works.rs | 6 +- tests/ui/cfg/crt-static-on-works.rs | 6 +- tests/ui/cfg/diagnostics-cross-crate.rs | 2 +- tests/ui/cfg/expanded-cfg.rs | 2 +- ...uture-compat-crate-attributes-using-cfg_attr.rs | 4 +- tests/ui/cfguard-run.rs | 4 +- tests/ui/char.rs | 2 +- tests/ui/check-cfg/allow-at-crate-level.rs | 4 +- tests/ui/check-cfg/allow-macro-cfg.rs | 4 +- tests/ui/check-cfg/allow-same-level.rs | 4 +- tests/ui/check-cfg/allow-top-level.rs | 4 +- tests/ui/check-cfg/allow-upper-level.rs | 4 +- tests/ui/check-cfg/cargo-feature.rs | 16 +- .../check-cfg/cfg-value-for-cfg-name-duplicate.rs | 6 +- .../check-cfg/cfg-value-for-cfg-name-multiple.rs | 6 +- tests/ui/check-cfg/cfg-value-for-cfg-name.rs | 6 +- tests/ui/check-cfg/compact-names.rs | 4 +- tests/ui/check-cfg/compact-values.rs | 4 +- tests/ui/check-cfg/concat-values.rs | 8 +- tests/ui/check-cfg/diagnotics.rs | 10 +- tests/ui/check-cfg/empty-values.rs | 4 +- tests/ui/check-cfg/exhaustive-names-values.rs | 12 +- tests/ui/check-cfg/exhaustive-names.rs | 4 +- tests/ui/check-cfg/exhaustive-values.rs | 8 +- tests/ui/check-cfg/invalid-arguments.rs | 62 +++---- tests/ui/check-cfg/mix.rs | 6 +- tests/ui/check-cfg/no-expected-values.rs | 14 +- tests/ui/check-cfg/order-independant.rs | 12 +- tests/ui/check-cfg/stmt-no-ice.rs | 4 +- tests/ui/check-cfg/unexpected-cfg-name.rs | 4 +- tests/ui/check-cfg/unexpected-cfg-value.rs | 6 +- tests/ui/check-cfg/unknown-values.rs | 14 +- tests/ui/check-cfg/values-none.rs | 16 +- tests/ui/check-cfg/values-target-json.rs | 6 +- tests/ui/check-cfg/well-known-names.rs | 4 +- tests/ui/check-cfg/well-known-values.rs | 4 +- tests/ui/check-static-recursion-foreign.rs | 8 +- tests/ui/cleanup-rvalue-for-scope.rs | 2 +- tests/ui/cleanup-rvalue-scopes.rs | 2 +- .../cleanup-rvalue-temp-during-incomplete-alloc.rs | 6 +- tests/ui/cleanup-shortcircuit.rs | 4 +- tests/ui/close-over-big-then-small-data.rs | 2 +- .../expect-fn-supply-fn-multiple.rs | 2 +- ...expect-infer-var-supply-ty-with-bound-region.rs | 2 +- .../expect-infer-var-supply-ty-with-free-region.rs | 2 +- tests/ui/closure-expected-type/issue-24421.rs | 2 +- .../2229_closure_analysis/array_subslice.rs | 2 +- .../arrays-completely-captured.rs | 2 +- .../closures/2229_closure_analysis/bad-pattern.rs | 2 +- .../ui/closures/2229_closure_analysis/by_value.rs | 2 +- .../2229_closure_analysis/capture-analysis-1.rs | 2 +- .../2229_closure_analysis/capture-analysis-2.rs | 2 +- .../2229_closure_analysis/capture-analysis-3.rs | 2 +- .../2229_closure_analysis/capture-analysis-4.rs | 2 +- .../capture-disjoint-field-struct.rs | 2 +- .../capture-disjoint-field-tuple.rs | 2 +- .../2229_closure_analysis/capture-enum-field.rs | 4 +- .../2229_closure_analysis/capture-enums.rs | 2 +- .../deep-multilevel-struct.rs | 2 +- .../2229_closure_analysis/deep-multilevel-tuple.rs | 2 +- .../2229_closure_analysis/destructure_patterns.rs | 2 +- .../2229_closure_analysis/diagnostics/arrays.rs | 2 +- .../diagnostics/borrowck/borrowck-1.rs | 2 +- .../diagnostics/borrowck/borrowck-2.rs | 2 +- .../diagnostics/borrowck/borrowck-3.rs | 2 +- .../diagnostics/borrowck/borrowck-4.rs | 2 +- .../borrowck/borrowck-closures-mut-and-imm.rs | 2 +- .../2229_closure_analysis/diagnostics/box.rs | 2 +- .../diagnostics/cant-mutate-imm-borrow.rs | 2 +- .../diagnostics/cant-mutate-imm.rs | 2 +- .../closure-origin-array-diagnostics.rs | 2 +- .../closure-origin-multi-variant-diagnostics.rs | 2 +- .../closure-origin-single-variant-diagnostics.rs | 2 +- .../closure-origin-struct-diagnostics.rs | 2 +- .../closure-origin-tuple-diagnostics-1.rs | 2 +- .../closure-origin-tuple-diagnostics.rs | 2 +- .../2229_closure_analysis/diagnostics/liveness.rs | 4 +- .../diagnostics/liveness_unintentional_copy.rs | 4 +- .../diagnostics/multilevel-path.rs | 2 +- .../2229_closure_analysis/diagnostics/mut_ref.rs | 2 +- .../diagnostics/repr_packed.rs | 2 +- .../diagnostics/simple-struct-min-capture.rs | 2 +- .../2229_closure_analysis/diagnostics/union.rs | 2 +- .../feature-gate-capture_disjoint_fields.rs | 2 +- .../filter-on-struct-member.rs | 2 +- .../closures/2229_closure_analysis/issue-87378.rs | 2 +- .../closures/2229_closure_analysis/issue-87987.rs | 4 +- .../2229_closure_analysis/issue-88118-2.rs | 4 +- .../closures/2229_closure_analysis/issue-88476.rs | 2 +- .../closures/2229_closure_analysis/issue-89606.rs | 8 +- .../2229_closure_analysis/issue-90465.fixed | 2 +- .../closures/2229_closure_analysis/issue-90465.rs | 2 +- .../issue-92724-needsdrop-query-cycle.rs | 2 +- .../closures/2229_closure_analysis/issue_88118.rs | 4 +- .../match/if-let-guards-errors.rs | 6 +- .../2229_closure_analysis/match/if-let-guards.rs | 8 +- .../2229_closure_analysis/match/issue-87097.rs | 4 +- .../2229_closure_analysis/match/issue-87426.rs | 4 +- .../2229_closure_analysis/match/issue-87988.rs | 4 +- .../2229_closure_analysis/match/issue-88331.rs | 2 +- .../match/match-edge-cases_1.rs | 4 +- .../match/match-edge-cases_2.rs | 2 +- .../match/non-exhaustive-match.rs | 4 +- .../match/pattern-matching-should-fail.rs | 2 +- .../match/patterns-capture-analysis.rs | 2 +- .../migrations/auto_traits.fixed | 2 +- .../migrations/auto_traits.rs | 2 +- .../migrations/closure-body-macro-fragment.fixed | 6 +- .../migrations/closure-body-macro-fragment.rs | 6 +- .../migrations/insignificant_drop.fixed | 4 +- .../migrations/insignificant_drop.rs | 4 +- .../insignificant_drop_attr_migrations.fixed | 2 +- .../insignificant_drop_attr_migrations.rs | 2 +- .../insignificant_drop_attr_no_migrations.rs | 2 +- .../migrations/issue-78720.rs | 2 +- .../migrations/issue-86753.rs | 4 +- .../migrations/issue-90024-adt-correct-subst.rs | 2 +- .../2229_closure_analysis/migrations/macro.fixed | 2 +- .../2229_closure_analysis/migrations/macro.rs | 2 +- .../migrations/migrations_rustfix.fixed | 2 +- .../migrations/migrations_rustfix.rs | 2 +- .../migrations/mir_calls_to_shims.fixed | 4 +- .../migrations/mir_calls_to_shims.rs | 4 +- .../migrations/multi_diagnostics.fixed | 2 +- .../migrations/multi_diagnostics.rs | 2 +- .../migrations/no_migrations.rs | 2 +- .../2229_closure_analysis/migrations/old_name.rs | 2 +- .../2229_closure_analysis/migrations/precise.fixed | 2 +- .../2229_closure_analysis/migrations/precise.rs | 2 +- .../migrations/precise_no_migrations.rs | 2 +- .../migrations/significant_drop.fixed | 2 +- .../migrations/significant_drop.rs | 2 +- .../migrations/unpin_no_migration.rs | 2 +- .../closures/2229_closure_analysis/move_closure.rs | 2 +- .../2229_closure_analysis/multilevel-path-1.rs | 2 +- .../2229_closure_analysis/multilevel-path-2.rs | 2 +- .../2229_closure_analysis/nested-closure.rs | 2 +- .../optimization/edge_case.rs | 2 +- .../optimization/edge_case_run_pass.rs | 4 +- .../path-with-array-access.rs | 2 +- .../preserve_field_drop_order.rs | 2 +- .../preserve_field_drop_order2.rs | 10 +- .../closures/2229_closure_analysis/repr_packed.rs | 2 +- .../closures/2229_closure_analysis/run_pass/box.rs | 4 +- .../2229_closure_analysis/run_pass/by_value.rs | 4 +- .../run_pass/capture-disjoint-field-struct.rs | 4 +- .../run_pass/capture-disjoint-field-tuple-mut.rs | 4 +- .../run_pass/capture-disjoint-field-tuple.rs | 4 +- .../run_pass/capture_with_wildcard_match.rs | 4 +- .../destructure-pattern-closure-within-closure.rs | 4 +- .../run_pass/destructure_patterns.rs | 4 +- .../run_pass/disjoint-capture-in-same-closure.rs | 4 +- .../run_pass/drop_then_use_fake_reads.rs | 4 +- .../2229_closure_analysis/run_pass/edition.rs | 4 +- .../run_pass/filter-on-struct-member.rs | 4 +- .../2229_closure_analysis/run_pass/fru_syntax.rs | 4 +- .../2229_closure_analysis/run_pass/issue-87378.rs | 4 +- .../2229_closure_analysis/run_pass/issue-88372.rs | 4 +- .../2229_closure_analysis/run_pass/issue-88431.rs | 4 +- .../2229_closure_analysis/run_pass/issue-88476.rs | 4 +- .../run_pass/lit-pattern-matching-with-methods.rs | 4 +- .../2229_closure_analysis/run_pass/move_closure.rs | 4 +- .../run_pass/multilevel-path-1.rs | 4 +- .../run_pass/multilevel-path-2.rs | 4 +- .../run_pass/multilevel-path-3.rs | 4 +- .../2229_closure_analysis/run_pass/multivariant.rs | 6 +- .../2229_closure_analysis/run_pass/mut_ref.rs | 4 +- .../run_pass/mut_ref_struct_mem.rs | 4 +- .../run_pass/nested-closure.rs | 4 +- .../struct-pattern-matching-with-methods.rs | 4 +- .../tuple-struct-pattern-matching-with-methods.rs | 4 +- .../2229_closure_analysis/run_pass/unsafe_ptr.rs | 4 +- .../use_of_mutable_borrow_and_fake_reads.rs | 4 +- .../simple-struct-min-capture.rs | 2 +- .../unique-borrows-are-invariant-1.rs | 2 +- .../unique-borrows-are-invariant-2.rs | 2 +- .../closures/2229_closure_analysis/unsafe_ptr.rs | 2 +- .../2229_closure_analysis/wild_patterns.rs | 2 +- .../closures/binder/async-closure-with-binder.rs | 4 +- .../binder/bounds-on-closure-type-binders.rs | 2 +- tests/ui/closures/binder/late-bound-in-body.rs | 2 +- .../ui/closures/binder/nested-closures-regions.rs | 2 +- tests/ui/closures/binder/nested-closures.rs | 2 +- tests/ui/closures/capture-unsized-by-move.rs | 2 +- tests/ui/closures/capture-unsized-by-ref.rs | 4 +- .../closure-immutable-outer-variable.fixed | 2 +- .../closures/closure-immutable-outer-variable.rs | 2 +- .../closure_no_cap_coerce_many_check_pass.rs | 2 +- .../closure_no_cap_coerce_many_run_pass.rs | 2 +- .../closure_no_cap_coerce_many_unsafe_1.rs | 2 +- tests/ui/closures/closure_promotion.rs | 2 +- tests/ui/closures/deeply-nested_closures.rs | 2 +- tests/ui/closures/diverging-closure.rs | 6 +- tests/ui/closures/infer-signature-from-impl.rs | 8 +- tests/ui/closures/issue-101696.rs | 2 +- .../closures/issue-102089-multiple-opaque-cast.rs | 4 +- tests/ui/closures/issue-10682.rs | 4 +- .../issue-23012-supertrait-signature-inference.rs | 2 +- tests/ui/closures/issue-41366.rs | 2 +- tests/ui/closures/issue-42463.rs | 2 +- tests/ui/closures/issue-46742.rs | 2 +- tests/ui/closures/issue-48109.rs | 2 +- tests/ui/closures/issue-68025.rs | 2 +- .../issue-72408-nested-closures-exponential.rs | 4 +- tests/ui/closures/issue-868.rs | 4 +- tests/ui/closures/issue-87461.rs | 2 +- tests/ui/closures/issue-87814-1.rs | 2 +- tests/ui/closures/issue-87814-2.rs | 2 +- tests/ui/closures/issue-97607.rs | 2 +- tests/ui/closures/local-type-mix.rs | 2 +- tests/ui/closures/old-closure-arg-call-as.rs | 2 +- tests/ui/closures/old-closure-arg.rs | 2 +- tests/ui/closures/old-closure-explicit-types.rs | 2 +- tests/ui/closures/old-closure-expr-precedence.rs | 2 +- .../old-closure-expression-remove-semicolon.fixed | 2 +- .../old-closure-expression-remove-semicolon.rs | 2 +- tests/ui/closures/old-closure-fn-coerce.rs | 2 +- tests/ui/closures/old-closure-iter-1.rs | 2 +- tests/ui/closures/old-closure-iter-2.rs | 2 +- tests/ui/closures/once-move-out-on-heap.rs | 2 +- .../closure-print-generic-trim-off-verbose-2.rs | 2 +- .../print/closure-print-generic-verbose-1.rs | 2 +- .../print/closure-print-generic-verbose-2.rs | 2 +- tests/ui/closures/print/closure-print-verbose.rs | 2 +- tests/ui/closures/self-supertrait-bounds.rs | 2 +- tests/ui/closures/semistatement-in-lambda.rs | 2 +- .../static-closures-with-nonstatic-return.rs | 4 +- tests/ui/closures/supertrait-hint-cycle-2.rs | 2 +- tests/ui/closures/supertrait-hint-cycle-3.rs | 2 +- tests/ui/closures/supertrait-hint-cycle.rs | 4 +- .../supertrait-hint-references-assoc-ty.rs | 2 +- tests/ui/closures/thir-unsafeck-issue-85871.rs | 2 +- .../cmse-nonsecure-call/params-on-registers.rs | 6 +- .../cmse-nonsecure-call/params-on-stack.rs | 6 +- .../cmse-nonsecure-call/wrong-abi-location-1.rs | 4 +- .../cmse-nonsecure-call/wrong-abi-location-2.rs | 4 +- .../cmse-nonsecure-entry/params-on-registers.rs | 6 +- .../cmse-nonsecure-entry/params-on-stack.rs | 6 +- .../cmse-nonsecure-entry/trustzone-only.rs | 2 +- .../cmse-nonsecure-entry/wrong-abi.rs | 4 +- tests/ui/codegen/const-bool-bitcast.rs | 4 +- .../ui/codegen/freeze-on-polymorphic-projection.rs | 4 +- tests/ui/codegen/init-large-type.rs | 8 +- tests/ui/codegen/issue-101585-128bit-repeat.rs | 2 +- tests/ui/codegen/issue-16602-1.rs | 2 +- tests/ui/codegen/issue-16602-2.rs | 2 +- tests/ui/codegen/issue-16602-3.rs | 2 +- tests/ui/codegen/issue-28950.rs | 6 +- tests/ui/codegen/issue-55976.rs | 2 +- tests/ui/codegen/issue-63787.rs | 4 +- tests/ui/codegen/issue-64401.rs | 2 +- tests/ui/codegen/issue-79865-llvm-miscompile.rs | 6 +- tests/ui/codegen/issue-82833-slice-miscompile.rs | 4 +- tests/ui/codegen/issue-82859-slice-miscompile.rs | 4 +- .../issue-88043-bb-does-not-have-terminator.rs | 4 +- tests/ui/codegen/issue-97708.rs | 4 +- tests/ui/codegen/issue-99551.rs | 2 +- tests/ui/codegen/llvm-pr32379.rs | 4 +- tests/ui/codegen/mismatched-data-layouts.rs | 12 +- tests/ui/codegen/mono-impossible-2.rs | 4 +- tests/ui/codegen/mono-impossible.rs | 4 +- tests/ui/codegen/overflow-during-mono.rs | 2 +- .../ui/codegen/subtyping-enforces-type-equality.rs | 6 +- tests/ui/codegen/subtyping-impacts-selection-1.rs | 8 +- tests/ui/codegen/subtyping-impacts-selection-2.rs | 8 +- tests/ui/codegen/target-cpus.rs | 8 +- tests/ui/codemap_tests/two_files_data.rs | 2 +- tests/ui/codemap_tests/unicode.expanded.stdout | 6 +- tests/ui/codemap_tests/unicode.rs | 6 +- tests/ui/codemap_tests/unicode_3.rs | 2 +- tests/ui/coercion/coerce-block-tail-26978.rs | 2 +- tests/ui/coercion/coerce-block-tail-57749.rs | 2 +- tests/ui/coercion/coerce-block-tail-83783.fixed | 4 +- tests/ui/coercion/coerce-block-tail-83783.rs | 4 +- tests/ui/coercion/coerce-block-tail-83850.rs | 2 +- tests/ui/coercion/coerce-block-tail.rs | 2 +- tests/ui/coercion/coerce-expect-unsized.rs | 2 +- .../coerce-issue-49593-box-never-windows.rs | 8 +- tests/ui/coercion/coerce-issue-49593-box-never.rs | 8 +- tests/ui/coercion/coerce-overloaded-autoderef.rs | 4 +- tests/ui/coercion/coerce-reborrow-imm-ptr-arg.rs | 4 +- tests/ui/coercion/coerce-reborrow-imm-ptr-rcvr.rs | 2 +- tests/ui/coercion/coerce-reborrow-imm-vec-arg.rs | 4 +- tests/ui/coercion/coerce-reborrow-imm-vec-rcvr.rs | 2 +- tests/ui/coercion/coerce-reborrow-multi-arg.rs | 2 +- tests/ui/coercion/coerce-reborrow-mut-ptr-arg.rs | 4 +- tests/ui/coercion/coerce-reborrow-mut-ptr-rcvr.rs | 4 +- tests/ui/coercion/coerce-reborrow-mut-vec-arg.rs | 2 +- tests/ui/coercion/coerce-reborrow-mut-vec-rcvr.rs | 2 +- tests/ui/coercion/coerce-unify-return.rs | 4 +- tests/ui/coercion/coerce-unify.rs | 2 +- tests/ui/coercion/coerce-unsize-subtype.rs | 4 +- .../coercion-missing-tail-expected-type.fixed | 2 +- .../coercion-missing-tail-expected-type.rs | 2 +- tests/ui/coercion/issue-101066.rs | 2 +- tests/ui/coercion/issue-14589.rs | 4 +- tests/ui/coercion/issue-26905-rpass.rs | 2 +- tests/ui/coercion/issue-36007.rs | 2 +- tests/ui/coercion/issue-37655.rs | 2 +- tests/ui/coercion/issue-3794.rs | 2 +- tests/ui/coercion/issue-39823.rs | 4 +- tests/ui/coercion/issue-88097.rs | 2 +- tests/ui/coercion/unsafe-coercion.rs | 2 +- tests/ui/coherence/coherence-all-remote.rs | 2 +- tests/ui/coherence/coherence-bigint-int.rs | 6 +- tests/ui/coherence/coherence-bigint-param.rs | 2 +- tests/ui/coherence/coherence-bigint-vecint.rs | 6 +- ...-blanket-conflicts-with-specific-cross-crate.rs | 2 +- tests/ui/coherence/coherence-blanket.rs | 6 +- .../coherence/coherence-covered-type-parameter.rs | 6 +- tests/ui/coherence/coherence-cow.rs | 4 +- .../ui/coherence/coherence-cross-crate-conflict.rs | 2 +- .../coherence-doesnt-use-infcx-evaluate.rs | 2 +- .../coherence-fundamental-trait-objects.rs | 2 +- tests/ui/coherence/coherence-impl-in-fn.rs | 2 +- .../coherence/coherence-iterator-vec-any-elem.rs | 6 +- tests/ui/coherence/coherence-iterator-vec.rs | 6 +- .../ui/coherence/coherence-lone-type-parameter.rs | 2 +- .../ui/coherence/coherence-multidispatch-tuple.rs | 4 +- .../ui/coherence/coherence-negative-impls-copy.rs | 2 +- .../coherence-negative-impls-safe-rpass.rs | 4 +- .../coherence-negative-inherent-where-bounds.rs | 2 +- tests/ui/coherence/coherence-negative-inherent.rs | 2 +- .../coherence-negative-outlives-lifetimes.rs | 4 +- tests/ui/coherence/coherence-orphan.rs | 2 +- .../coherence/coherence-overlap-double-negative.rs | 2 +- .../coherence-overlap-downstream-inherent.rs | 4 +- tests/ui/coherence/coherence-overlap-downstream.rs | 4 +- .../coherence-overlap-issue-23516-inherent.rs | 4 +- .../ui/coherence/coherence-overlap-issue-23516.rs | 4 +- .../coherence-overlap-negate-alias-strict.rs | 2 +- .../coherence/coherence-overlap-negate-strict.rs | 2 +- .../coherence-overlap-negate-use-feature-gate.rs | 2 +- .../coherence/coherence-overlap-negative-impls.rs | 4 +- .../coherence/coherence-overlap-negative-trait.rs | 4 +- .../coherence/coherence-overlap-negative-trait2.rs | 4 +- .../coherence/coherence-overlap-super-negative.rs | 2 +- .../coherence-overlap-upstream-inherent.rs | 2 +- tests/ui/coherence/coherence-overlap-upstream.rs | 2 +- .../ui/coherence/coherence-overlap-with-regions.rs | 2 +- tests/ui/coherence/coherence-overlapping-pairs.rs | 2 +- .../coherence-pair-covered-uncovered-1.rs | 2 +- .../coherence/coherence-pair-covered-uncovered.rs | 2 +- .../ui/coherence/coherence-projection-ok-orphan.rs | 2 +- tests/ui/coherence/coherence-projection-ok.rs | 2 +- tests/ui/coherence/coherence-rfc447-constrained.rs | 2 +- tests/ui/coherence/coherence-subtyping.rs | 2 +- tests/ui/coherence/coherence-vec-local-2.rs | 2 +- tests/ui/coherence/coherence-vec-local.rs | 2 +- tests/ui/coherence/coherence-where-clause.rs | 2 +- tests/ui/coherence/coherence-with-coroutine.rs | 4 +- tests/ui/coherence/coherence_copy_like.rs | 4 +- .../coherence_copy_like_err_fundamental_struct.rs | 4 +- ...herence_copy_like_err_fundamental_struct_ref.rs | 4 +- ...rence_copy_like_err_fundamental_struct_tuple.rs | 2 +- .../ui/coherence/coherence_copy_like_err_struct.rs | 2 +- .../ui/coherence/coherence_copy_like_err_tuple.rs | 2 +- tests/ui/coherence/coherence_inherent_cc.rs | 2 +- tests/ui/coherence/coherence_local.rs | 4 +- tests/ui/coherence/coherence_local_err_struct.rs | 2 +- tests/ui/coherence/coherence_local_err_tuple.rs | 2 +- tests/ui/coherence/coherence_local_ref.rs | 4 +- .../ui/coherence/const-generics-orphan-check-ok.rs | 4 +- tests/ui/coherence/impl-foreign-for-foreign.rs | 4 +- .../coherence/impl-foreign-for-foreign[foreign].rs | 4 +- .../coherence/impl-foreign-for-foreign[local].rs | 6 +- .../impl-foreign-for-fundamental[foreign].rs | 4 +- .../impl-foreign-for-fundamental[local].rs | 6 +- tests/ui/coherence/impl-foreign-for-local.rs | 6 +- ...impl-foreign-for-locally-defined-fundamental.rs | 6 +- ...ign-for-locally-defined-fundamental[foreign].rs | 6 +- .../coherence/impl-foreign[foreign]-for-foreign.rs | 4 +- .../coherence/impl-foreign[foreign]-for-local.rs | 6 +- ...pl-foreign[fundemental[foreign]]-for-foreign.rs | 4 +- ...impl-foreign[fundemental[local]]-for-foreign.rs | 6 +- .../ui/coherence/impl[t]-foreign-for-foreign[t].rs | 4 +- .../impl[t]-foreign-for-fundamental[t].rs | 4 +- ...mpl[t]-foreign[foreign[t]_local]-for-foreign.rs | 6 +- .../impl[t]-foreign[foreign]-for-fundamental[t].rs | 4 +- .../ui/coherence/impl[t]-foreign[foreign]-for-t.rs | 4 +- .../impl[t]-foreign[fundamental[t]]-for-foreign.rs | 4 +- ...]-foreign[fundamental[t]]-for-fundamental[t].rs | 4 +- .../impl[t]-foreign[fundamental[t]]-for-local.rs | 6 +- .../impl[t]-foreign[fundamental[t]]-for-t.rs | 4 +- ...t]-foreign[fundamental[t]_local]-for-foreign.rs | 4 +- ...]-foreign[fundemental[local]]-for-foreign[t].rs | 6 +- .../impl[t]-foreign[local]-for-foreign.rs | 6 +- .../impl[t]-foreign[local]-for-foreign[t].rs | 6 +- ...]-foreign[local]-for-fundamental[foreign[t]].rs | 6 +- .../impl[t]-foreign[local]-for-fundamental[t].rs | 4 +- .../coherence/impl[t]-foreign[local]-for-local.rs | 6 +- tests/ui/coherence/impl[t]-foreign[local]-for-t.rs | 4 +- ...t]-foreign[local_fundamental[t]]-for-foreign.rs | 6 +- .../ui/coherence/impl[t]-foreign[t]-for-foreign.rs | 4 +- .../impl[t]-foreign[t]-for-fundamental.rs | 4 +- tests/ui/coherence/impl[t]-foreign[t]-for-local.rs | 6 +- tests/ui/coherence/impl[t]-foreign[t]-for-t.rs | 4 +- .../indirect-impl-for-trait-obj-coherence.rs | 4 +- .../inter-crate-ambiguity-causes-notes.rs | 4 +- tests/ui/coherence/issue-99663-2.rs | 2 +- tests/ui/coherence/issue-99663.rs | 2 +- .../negative-coherence-considering-regions.rs | 4 +- ...laceholder-region-constraints-on-unification.rs | 4 +- tests/ui/coherence/normalize-for-errors.rs | 4 +- tests/ui/coherence/occurs-check/associated-type.rs | 4 +- tests/ui/coherence/occurs-check/opaques.rs | 8 +- ...ce-coherence-default-generic-associated-type.rs | 4 +- tests/ui/coherence/re-rebalance-coherence.rs | 4 +- tests/ui/coinduction/canonicalization-rerun.rs | 6 +- tests/ui/command-line-diagnostics.rs | 2 +- tests/ui/command/command-argv0.rs | 8 +- tests/ui/command/command-current-dir.rs | 8 +- tests/ui/command/command-exec.rs | 10 +- tests/ui/command/command-pre-exec.rs | 10 +- tests/ui/command/command-setgroups.rs | 12 +- tests/ui/command/command-uid-gid.rs | 10 +- tests/ui/command/issue-10626.rs | 6 +- tests/ui/commandline-argfile-badutf8.rs | 2 +- tests/ui/commandline-argfile-missing.rs | 6 +- tests/ui/commandline-argfile.rs | 4 +- .../ui/compiletest-self-test/compile-flags-last.rs | 4 +- .../ui/compiletest-self-test/ui-testing-optout.rs | 2 +- tests/ui/complex.rs | 2 +- .../conditional-compilation/cfg-arg-invalid-1.rs | 4 +- .../conditional-compilation/cfg-arg-invalid-2.rs | 4 +- .../conditional-compilation/cfg-arg-invalid-3.rs | 4 +- .../conditional-compilation/cfg-arg-invalid-4.rs | 4 +- .../conditional-compilation/cfg-arg-invalid-5.rs | 4 +- .../conditional-compilation/cfg-arg-invalid-6.rs | 4 +- .../conditional-compilation/cfg-arg-invalid-7.rs | 6 +- .../conditional-compilation/cfg-arg-invalid-8.rs | 4 +- .../conditional-compilation/cfg-arg-invalid-9.rs | 4 +- tests/ui/conditional-compilation/cfg-attr-cfg-2.rs | 4 +- .../ui/conditional-compilation/cfg-attr-crate-2.rs | 2 +- .../cfg-attr-empty-is-unused.rs | 2 +- .../cfg-attr-multi-false.rs | 2 +- .../cfg-attr-multi-invalid-1.rs | 2 +- .../cfg-attr-multi-invalid-2.rs | 2 +- .../conditional-compilation/cfg-attr-multi-true.rs | 2 +- .../conditional-compilation/cfg-empty-codemap.rs | 4 +- .../conditional-compilation/cfg-generic-params.rs | 2 +- tests/ui/conditional-compilation/cfg-in-crate-1.rs | 2 +- .../conditional-compilation/cfg_accessible-bugs.rs | 2 +- .../cfg_accessible-not_sure.rs | 6 +- .../cfg_accessible-private.rs | 2 +- tests/ui/conditional-compilation/cfg_attr_path.rs | 2 +- .../inner-cfg-non-inline-mod.rs | 2 +- tests/ui/conditional-compilation/issue-34028.rs | 2 +- .../ui/conditional-compilation/module_with_cfg.rs | 2 +- tests/ui/conditional-compilation/test-cfg.rs | 2 +- .../adt_const_params/const_param_ty_good.rs | 2 +- tests/ui/const-generics/apit-with-const-param.rs | 2 +- tests/ui/const-generics/arg-in-pat-1.rs | 2 +- tests/ui/const-generics/arg-in-pat-2.rs | 2 +- tests/ui/const-generics/arg-in-pat-3.rs | 2 +- .../array-impls/alloc-traits-impls-length-32.rs | 2 +- .../array-impls/alloc-traits-impls-length-33.rs | 2 +- .../array-impls/alloc-types-impls-length-33.rs | 2 +- .../array-impls/core-traits-impls-length-32.rs | 2 +- .../array-impls/core-traits-impls-length-33.rs | 2 +- .../array-impls/into-iter-impls-length-32.rs | 2 +- .../array-impls/into-iter-impls-length-33.rs | 2 +- .../ui/const-generics/array-wrapper-struct-ctor.rs | 2 +- tests/ui/const-generics/associated-type-bound.rs | 2 +- tests/ui/const-generics/auxiliary/crayte.rs | 2 +- .../backcompat/trait-resolution-breakage.rs | 2 +- .../backcompat/unevaluated-consts.rs | 2 +- tests/ui/const-generics/bad-subst-const-kind.rs | 2 +- tests/ui/const-generics/broken-mir-1.rs | 2 +- tests/ui/const-generics/broken-mir-2.rs | 2 +- .../cannot-infer-type-for-const-param.rs | 2 +- tests/ui/const-generics/coerce_unsized_array.rs | 2 +- .../ui/const-generics/concrete-const-as-fn-arg.rs | 2 +- .../const-generics/concrete-const-impl-method.rs | 2 +- .../const-generics/condition-in-trait-const-arg.rs | 4 +- tests/ui/const-generics/const-arg-in-const-arg.rs | 2 +- tests/ui/const-generics/const-arg-in-fn.rs | 2 +- .../const-argument-cross-crate-mismatch.rs | 2 +- .../const-generics/const-argument-cross-crate.rs | 6 +- .../ui/const-generics/const-argument-if-length.rs | 2 +- .../const-argument-non-static-lifetime.rs | 4 +- .../ui/const-generics/const-fn-with-const-param.rs | 2 +- tests/ui/const-generics/const-generic-type_name.rs | 2 +- .../const-param-after-const-literal-arg.rs | 2 +- .../const-generics/const-param-elided-lifetime.rs | 2 +- tests/ui/const-generics/const-param-in-async.rs | 4 +- .../const-param-type-depends-on-const-param.rs | 2 +- .../const-param-type-depends-on-type-param.rs | 2 +- .../const-generics/const_trait_fn-issue-88433.rs | 2 +- tests/ui/const-generics/core-types.rs | 4 +- tests/ui/const-generics/cross_crate_complex.rs | 6 +- .../defaults/complex-generic-default-expr.rs | 4 +- .../const-generics/defaults/complex-unord-param.rs | 2 +- tests/ui/const-generics/defaults/const-default.rs | 2 +- .../defaults/const-param-as-default-value.rs | 2 +- .../defaults/const-param-in-ty-defaults.rs | 2 +- .../const-generics/defaults/default-annotation.rs | 2 +- .../defaults/default-param-wf-concrete.rs | 4 +- tests/ui/const-generics/defaults/external.rs | 4 +- .../const-generics/defaults/pretty-printing-ast.rs | 4 +- .../defaults/pretty-printing-ast.stdout | 4 +- .../const-generics/defaults/repr-c-issue-82792.rs | 2 +- tests/ui/const-generics/defaults/rp_impl_trait.rs | 2 +- .../ui/const-generics/defaults/simple-defaults.rs | 2 +- .../defaults/trait_object_lt_defaults.rs | 4 +- tests/ui/const-generics/defaults/trait_objects.rs | 2 +- .../defaults/type-default-const-param-name.rs | 2 +- .../ui/const-generics/deref-into-array-generic.rs | 2 +- tests/ui/const-generics/different_generic_args.rs | 2 +- tests/ui/const-generics/dyn-supertraits.rs | 2 +- .../ui/const-generics/early/const-param-hygiene.rs | 2 +- tests/ui/const-generics/enum-variants.rs | 2 +- .../expose-default-substs-param-env.rs | 2 +- tests/ui/const-generics/float-generic.rs | 2 +- tests/ui/const-generics/fn-const-param-call.rs | 2 +- tests/ui/const-generics/fn-const-param-infer.rs | 2 +- .../fn_with_two_same_const_inputs.rs | 2 +- .../generic_arg_infer/array-repeat-expr.rs | 2 +- .../generic_arg_infer/dont-use-defaults.rs | 2 +- .../generic_arg_infer/infer_arg_and_const_arg.rs | 2 +- .../abstract-const-as-cast-1.rs | 2 +- .../abstract-const-as-cast-4.rs | 2 +- .../array-size-in-generic-struct-param.rs | 2 +- .../const_equate_assoc_consts.rs | 2 +- .../dropck_unifies_assoc_consts.rs | 2 +- .../assoc_const_unification/unifies_evaluatable.rs | 2 +- .../generic_const_exprs/associated-const.rs | 2 +- .../generic_const_exprs/associated-consts.rs | 2 +- .../const_eval_resolve_canonical.rs | 2 +- .../const_kind_expr/relate_ty_with_infer_1.rs | 2 +- .../const_kind_expr/relate_ty_with_infer_2.rs | 2 +- .../generic_const_exprs/cross_crate.rs | 4 +- .../generic_const_exprs/cross_crate_predicate.rs | 2 +- .../generic_const_exprs/dependence_lint.rs | 4 +- .../const-generics/generic_const_exprs/division.rs | 2 +- .../dont-eagerly-error-in-is-const-evaluatable.rs | 2 +- .../generic_const_exprs/drop_impl.rs | 2 +- .../generic_const_exprs/elaborate-trait-pred.rs | 2 +- .../generic_const_exprs/eval-try-unify.rs | 2 +- .../generic_const_exprs/evaluated-to-ambig.rs | 2 +- .../const-generics/generic_const_exprs/fn_call.rs | 2 +- .../const-generics/generic_const_exprs/from-sig.rs | 2 +- .../generic_const_exprs/function-call.rs | 4 +- .../generic_const_exprs/impl-bounds.rs | 2 +- .../generic_const_exprs/infer-too-generic.rs | 2 +- .../inline-const-in-const-generic-defaults.rs | 2 +- .../generic_const_exprs/issue-100217.rs | 2 +- .../generic_const_exprs/issue-100360.rs | 2 +- .../generic_const_exprs/issue-102074.rs | 2 +- .../generic_const_exprs/issue-62504.rs | 2 +- .../generic_const_exprs/issue-72787.rs | 4 +- .../issue-72819-generic-in-const-eval.rs | 2 +- .../generic_const_exprs/issue-73298.rs | 2 +- .../generic_const_exprs/issue-73899.rs | 2 +- .../generic_const_exprs/issue-74634.rs | 2 +- .../issue-80561-incorrect-param-env.rs | 2 +- .../generic_const_exprs/issue-80742.rs | 14 +- .../generic_const_exprs/issue-82268.rs | 2 +- .../generic_const_exprs/issue-83972.rs | 2 +- .../generic_const_exprs/issue-84408.rs | 2 +- .../generic_const_exprs/issue-84669.rs | 2 +- .../generic_const_exprs/issue-86710.rs | 2 +- .../generic_const_exprs/issue-89851.rs | 2 +- .../generic_const_exprs/issue-90847.rs | 2 +- .../generic_const_exprs/issue-94287.rs | 4 +- .../generic_const_exprs/issue-94293.rs | 2 +- .../generic_const_exprs/issue-96699.rs | 2 +- .../generic_const_exprs/issue-97047-ice-1.rs | 2 +- .../generic_const_exprs/issue-97047-ice-2.rs | 2 +- .../generic_const_exprs/issue-99647.rs | 4 +- .../generic_const_exprs/issue-99705.rs | 2 +- .../generic_const_exprs/less_than.rs | 2 +- .../nested-abstract-consts-1.rs | 2 +- .../nested-abstract-consts-2.rs | 2 +- .../nested_uneval_unification-1.rs | 2 +- .../nested_uneval_unification-2.rs | 2 +- .../generic_const_exprs/no_dependence.rs | 2 +- .../non_local_anon_const_diagnostics.rs | 2 +- .../normed_to_param_is_evaluatable.rs | 2 +- .../generic_const_exprs/object-safety-ok.rs | 2 +- .../single-satisfied-ConstEvaluatable-in-probe.rs | 2 +- .../subexprs_are_const_evalutable.rs | 2 +- .../generic_const_exprs/ty-alias-substitution.rs | 2 +- .../typeid-equality-by-subtyping.rs | 4 +- .../generic_const_exprs/unify-op-with-fn-call.rs | 2 +- .../ui/const-generics/generic_const_exprs/unop.rs | 2 +- .../unused-complex-default-expr.rs | 2 +- tests/ui/const-generics/ice-68875.rs | 2 +- .../ui/const-generics/impl-const-generic-struct.rs | 2 +- tests/ui/const-generics/infer_arg_from_pat.rs | 2 +- tests/ui/const-generics/infer_arr_len_from_pat.rs | 2 +- .../ui/const-generics/inhabited-assoc-ty-ice-1.rs | 2 +- .../ui/const-generics/inhabited-assoc-ty-ice-2.rs | 2 +- .../integer-literal-generic-arg-in-where-clause.rs | 2 +- .../intrinsics-type_name-as-const-argument.rs | 4 +- tests/ui/const-generics/issue-102124.rs | 4 +- tests/ui/const-generics/issue-105689.rs | 4 +- ...sue-106419-struct-with-multiple-const-params.rs | 2 +- tests/ui/const-generics/issue-46511.rs | 2 +- tests/ui/const-generics/issue-70408.rs | 2 +- tests/ui/const-generics/issue-97007.rs | 2 +- tests/ui/const-generics/issues/issue-105037.rs | 2 +- tests/ui/const-generics/issues/issue-105821.rs | 2 +- tests/ui/const-generics/issues/issue-56445-1.rs | 2 +- .../issues/issue-60818-struct-constructors.rs | 2 +- tests/ui/const-generics/issues/issue-61336-1.rs | 2 +- tests/ui/const-generics/issues/issue-61422.rs | 2 +- tests/ui/const-generics/issues/issue-61432.rs | 2 +- .../issue-62187-encountered-polymorphic-const.rs | 2 +- tests/ui/const-generics/issues/issue-62878.rs | 2 +- .../issues/issue-63322-forbid-dyn.rs | 2 +- tests/ui/const-generics/issues/issue-64519.rs | 2 +- .../issue-66596-impl-trait-for-str-const-arg.rs | 2 +- tests/ui/const-generics/issues/issue-66906.rs | 2 +- tests/ui/const-generics/issues/issue-67185-1.rs | 2 +- tests/ui/const-generics/issues/issue-67375.rs | 2 +- tests/ui/const-generics/issues/issue-67739.rs | 2 +- tests/ui/const-generics/issues/issue-67945-1.rs | 2 +- tests/ui/const-generics/issues/issue-67945-2.rs | 2 +- tests/ui/const-generics/issues/issue-67945-3.rs | 2 +- tests/ui/const-generics/issues/issue-67945-4.rs | 2 +- .../issues/issue-68104-print-stack-overflow.rs | 4 +- tests/ui/const-generics/issues/issue-68366.rs | 2 +- tests/ui/const-generics/issues/issue-68596.rs | 2 +- tests/ui/const-generics/issues/issue-68615-adt.rs | 4 +- .../ui/const-generics/issues/issue-68615-array.rs | 4 +- .../const-generics/issues/issue-69654-run-pass.rs | 2 +- tests/ui/const-generics/issues/issue-70125-1.rs | 2 +- tests/ui/const-generics/issues/issue-70125-2.rs | 2 +- tests/ui/const-generics/issues/issue-70167.rs | 2 +- .../issues/issue-70180-1-stalled_on.rs | 2 +- .../issues/issue-70180-2-stalled_on.rs | 2 +- tests/ui/const-generics/issues/issue-70225.rs | 2 +- .../const-generics/issues/issue-70273-assoc-fn.rs | 2 +- tests/ui/const-generics/issues/issue-71169.rs | 2 +- tests/ui/const-generics/issues/issue-71381.rs | 2 +- tests/ui/const-generics/issues/issue-71382.rs | 2 +- tests/ui/const-generics/issues/issue-71547.rs | 2 +- tests/ui/const-generics/issues/issue-71611.rs | 2 +- tests/ui/const-generics/issues/issue-71986.rs | 2 +- tests/ui/const-generics/issues/issue-72352.rs | 2 +- tests/ui/const-generics/issues/issue-73120.rs | 4 +- tests/ui/const-generics/issues/issue-73491.rs | 4 +- ...sue-73727-static-reference-array-const-param.rs | 4 +- tests/ui/const-generics/issues/issue-74101.rs | 4 +- tests/ui/const-generics/issues/issue-74255.rs | 4 +- tests/ui/const-generics/issues/issue-74906.rs | 4 +- tests/ui/const-generics/issues/issue-74950.rs | 4 +- tests/ui/const-generics/issues/issue-75047.rs | 4 +- tests/ui/const-generics/issues/issue-75299.rs | 4 +- tests/ui/const-generics/issues/issue-83288.rs | 2 +- tests/ui/const-generics/issues/issue-85031-2.rs | 4 +- tests/ui/const-generics/issues/issue-86033.rs | 2 +- tests/ui/const-generics/issues/issue-86535-2.rs | 2 +- tests/ui/const-generics/issues/issue-86535.rs | 2 +- tests/ui/const-generics/issues/issue-87076.rs | 2 +- tests/ui/const-generics/issues/issue-87470.rs | 2 +- tests/ui/const-generics/issues/issue-87964.rs | 2 +- tests/ui/const-generics/issues/issue-88119.rs | 2 +- tests/ui/const-generics/issues/issue-88468.rs | 2 +- tests/ui/const-generics/issues/issue-89146.rs | 2 +- tests/ui/const-generics/issues/issue-89304.rs | 2 +- tests/ui/const-generics/issues/issue-89320.rs | 2 +- tests/ui/const-generics/issues/issue-89334.rs | 2 +- tests/ui/const-generics/issues/issue-92186.rs | 2 +- tests/ui/const-generics/issues/issue-96654.rs | 2 +- tests/ui/const-generics/issues/issue-97634.rs | 2 +- .../const-generics/late-bound-vars/in_closure.rs | 2 +- .../late-bound-in-return-issue-77357.rs | 2 +- .../late-bound-in-where-issue-83993.rs | 2 +- tests/ui/const-generics/late-bound-vars/simple.rs | 2 +- .../ui/const-generics/legacy-const-generics-bad.rs | 2 +- tests/ui/const-generics/legacy-const-generics.rs | 4 +- .../min_const_generics/assoc_const.rs | 2 +- .../min_const_generics/complex-expression.rs | 2 +- .../const-evaluatable-unchecked.rs | 4 +- .../min_const_generics/const_fn_in_generics.rs | 2 +- .../min_const_generics/default_trait_param.rs | 2 +- .../min_const_generics/inferred_const.rs | 2 +- .../min_const_generics/invalid-patterns.rs | 2 +- .../ui/const-generics/min_const_generics/macro.rs | 2 +- .../min_const_generics/type_and_const_defaults.rs | 2 +- tests/ui/const-generics/nested-type.rs | 2 +- tests/ui/const-generics/occurs-check/bind-param.rs | 2 +- .../const-generics/occurs-check/unify-fixpoint.rs | 2 +- tests/ui/const-generics/overlapping_impls.rs | 2 +- .../params-in-ct-in-ty-param-lazy-norm.rs | 2 +- .../const-generics/parent_generics_of_encoding.rs | 4 +- .../parent_generics_of_encoding_impl_trait.rs | 2 +- tests/ui/const-generics/promotion.rs | 2 +- .../ui/const-generics/raw-ptr-const-param-deref.rs | 2 +- tests/ui/const-generics/raw-ptr-const-param.rs | 2 +- .../const-generics/slice-const-param-mismatch.rs | 2 +- tests/ui/const-generics/slice-const-param.rs | 2 +- .../ui/const-generics/std/const-generics-range.rs | 4 +- tests/ui/const-generics/trait-const-args.rs | 2 +- .../transmute-const-param-static-reference.rs | 4 +- tests/ui/const-generics/transmute.rs | 2 +- .../transparent-maybeunit-array-wrapper.rs | 4 +- .../const-generics/try_unify_ignore_lifetimes.rs | 2 +- tests/ui/const-generics/two_matching_preds.rs | 2 +- tests/ui/const-generics/type-after-const-ok.rs | 2 +- .../type-dependent/const-arg-in-const-arg.rs | 4 +- .../const-generics/type-dependent/issue-61936.rs | 2 +- .../const-generics/type-dependent/issue-63695.rs | 2 +- .../const-generics/type-dependent/issue-67144-1.rs | 2 +- .../const-generics/type-dependent/issue-67144-2.rs | 2 +- .../const-generics/type-dependent/issue-69816.rs | 2 +- .../const-generics/type-dependent/issue-70217.rs | 2 +- .../const-generics/type-dependent/issue-70507.rs | 2 +- .../const-generics/type-dependent/issue-70586.rs | 2 +- .../const-generics/type-dependent/issue-71348.rs | 4 +- .../const-generics/type-dependent/issue-71805.rs | 2 +- .../const-generics/type-dependent/issue-73730.rs | 2 +- .../ui/const-generics/type-dependent/non-local.rs | 4 +- tests/ui/const-generics/type-dependent/qpath.rs | 2 +- tests/ui/const-generics/type-dependent/simple.rs | 2 +- .../const-generics/type-dependent/type-mismatch.rs | 2 +- tests/ui/const-generics/type_of_anon_const.rs | 2 +- .../ui/const-generics/types-mismatch-const-args.rs | 2 +- .../uninferred-consts-during-codegen-1.rs | 2 +- .../uninferred-consts-during-codegen-2.rs | 2 +- tests/ui/const-generics/unused-const-param.rs | 2 +- tests/ui/const-generics/unused_braces.fixed | 4 +- tests/ui/const-generics/unused_braces.full.fixed | 6 +- tests/ui/const-generics/unused_braces.min.fixed | 6 +- tests/ui/const-generics/unused_braces.rs | 4 +- .../variant-discrimiant-no-generics.rs | 2 +- tests/ui/const-generics/where-clauses.rs | 2 +- tests/ui/const-ptr/allowed_slices.rs | 2 +- tests/ui/const-ptr/forbidden_slices.rs | 4 +- tests/ui/const-ptr/out_of_bounds_read.rs | 2 +- tests/ui/const_prop/apfloat-f64-roundtrip.rs | 4 +- .../ui/const_prop/apfloat-remainder-regression.rs | 4 +- tests/ui/const_prop/const-prop-ice.rs | 2 +- tests/ui/const_prop/const-prop-ice2.rs | 2 +- tests/ui/const_prop/const-prop-ice3.rs | 2 +- .../ui/const_prop/const-prop-overflowing-casts.rs | 2 +- .../dont-propagate-generic-instance-2.rs | 2 +- .../const_prop/dont-propagate-generic-instance.rs | 2 +- tests/ui/const_prop/ice-assert-fail-div-by-zero.rs | 4 +- tests/ui/const_prop/ice-issue-111353.rs | 2 +- tests/ui/const_prop/ice-issue-96944.rs | 2 +- tests/ui/const_prop/inline_spans.rs | 4 +- tests/ui/const_prop/inline_spans_lint_attribute.rs | 4 +- tests/ui/const_prop/issue-102553.rs | 4 +- tests/ui/const_prop/issue-86351.rs | 4 +- .../const_prop/overwrite_with_const_with_params.rs | 4 +- tests/ui/const_prop/unreachable-bounds.rs | 2 +- tests/ui/const_prop/unreachable-overflow.rs | 2 +- tests/ui/const_prop/unsized-local-ice.rs | 2 +- tests/ui/consts/array-literal-index-oob.rs | 4 +- tests/ui/consts/array-to-slice-cast.rs | 2 +- tests/ui/consts/assoc-const.rs | 2 +- tests/ui/consts/assoc_const_generic_impl.rs | 2 +- tests/ui/consts/associated_const_generic.rs | 2 +- tests/ui/consts/async-block.rs | 4 +- tests/ui/consts/bswap-const.rs | 2 +- tests/ui/consts/cast-discriminant-zst-enum.rs | 2 +- tests/ui/consts/chained-constants-stackoverflow.rs | 2 +- tests/ui/consts/check_const-feature-gated.rs | 2 +- tests/ui/consts/closure-in-foreign-crate.rs | 4 +- .../consts/closure-structural-match-issue-90013.rs | 2 +- tests/ui/consts/const-address-of.rs | 2 +- tests/ui/consts/const-adt-align-mismatch.rs | 2 +- tests/ui/consts/const-autoderef.rs | 2 +- tests/ui/consts/const-big-enum.rs | 2 +- tests/ui/consts/const-binops.rs | 2 +- tests/ui/consts/const-bitshift-rhs-inference.rs | 2 +- tests/ui/consts/const-block-const-bound.rs | 2 +- tests/ui/consts/const-block-cross-crate-fn.rs | 4 +- tests/ui/consts/const-block-item-macro-codegen.rs | 2 +- tests/ui/consts/const-block-item.rs | 2 +- .../ui/consts/const-block-non-item-statement-3.rs | 2 +- .../consts/const-block-non-item-statement-rpass.rs | 2 +- tests/ui/consts/const-block-non-item-statement.rs | 2 +- tests/ui/consts/const-block.rs | 2 +- tests/ui/consts/const-blocks/const-repeat.rs | 2 +- tests/ui/consts/const-blocks/fn-call-in-const.rs | 2 +- tests/ui/consts/const-blocks/migrate-pass.rs | 2 +- tests/ui/consts/const-blocks/nll-pass.rs | 2 +- tests/ui/consts/const-blocks/run-pass.rs | 2 +- tests/ui/consts/const-bound.rs | 4 +- tests/ui/consts/const-byte-str-cast.rs | 2 +- tests/ui/consts/const-cast-ptr-int.rs | 2 +- tests/ui/consts/const-cast.rs | 2 +- tests/ui/consts/const-compare-bytes-ub.rs | 2 +- tests/ui/consts/const-compare-bytes.rs | 2 +- tests/ui/consts/const-const.rs | 2 +- tests/ui/consts/const-contents.rs | 2 +- tests/ui/consts/const-deref.rs | 2 +- tests/ui/consts/const-endianess.rs | 2 +- tests/ui/consts/const-enum-byref-self.rs | 2 +- tests/ui/consts/const-enum-byref.rs | 2 +- tests/ui/consts/const-enum-cast.rs | 2 +- tests/ui/consts/const-enum-ptr.rs | 2 +- tests/ui/consts/const-enum-struct.rs | 2 +- tests/ui/consts/const-enum-struct2.rs | 2 +- tests/ui/consts/const-enum-structlike.rs | 2 +- tests/ui/consts/const-enum-tuple.rs | 2 +- tests/ui/consts/const-enum-tuple2.rs | 2 +- tests/ui/consts/const-enum-tuplestruct.rs | 2 +- tests/ui/consts/const-enum-tuplestruct2.rs | 2 +- tests/ui/consts/const-enum-vec-index.rs | 2 +- tests/ui/consts/const-enum-vec-ptr.rs | 2 +- tests/ui/consts/const-enum-vector.rs | 2 +- tests/ui/consts/const-err-late.rs | 4 +- tests/ui/consts/const-err-rpass.rs | 2 +- tests/ui/consts/const-err2.rs | 10 +- .../ui/consts/const-eval/const-eval-query-stack.rs | 26 +-- .../const-pointer-values-in-various-types.rs | 4 +- tests/ui/consts/const-eval/const_fn_ptr.rs | 4 +- tests/ui/consts/const-eval/const_fn_ptr_fail.rs | 4 +- tests/ui/consts/const-eval/const_fn_ptr_fail2.rs | 2 +- .../consts/const-eval/const_fn_target_feature.rs | 4 +- .../const-eval/const_fn_target_feature_wasm.rs | 6 +- tests/ui/consts/const-eval/const_panic_2021.rs | 2 +- .../ui/consts/const-eval/const_panic_stability.rs | 8 +- tests/ui/consts/const-eval/const_prop_errors.rs | 2 +- tests/ui/consts/const-eval/const_signed_pat.rs | 2 +- .../dont_promote_unstable_const_fn_cross_crate.rs | 2 +- tests/ui/consts/const-eval/double_check.rs | 2 +- tests/ui/consts/const-eval/double_check2.rs | 2 +- tests/ui/consts/const-eval/duration_conversion.rs | 2 +- tests/ui/consts/const-eval/enum_discr.rs | 2 +- tests/ui/consts/const-eval/extern_fat_pointer.rs | 2 +- .../heap/alloc_intrinsic_nontransient.rs | 2 +- .../const-eval/heap/alloc_intrinsic_transient.rs | 2 +- .../const-eval/heap/alloc_intrinsic_uninit.rs | 2 +- .../const-eval/heap/alloc_intrinsic_zero_sized.rs | 2 +- .../ui/consts/const-eval/heap/dealloc_intrinsic.rs | 2 +- .../heap/dealloc_intrinsic_zero_sized.rs | 2 +- .../consts/const-eval/ice-generic-assoc-const.rs | 2 +- tests/ui/consts/const-eval/ice-packed.rs | 2 +- .../const-eval/index-out-of-bounds-never-type.rs | 2 +- .../const-eval/index_out_of_bounds_propagated.rs | 2 +- tests/ui/consts/const-eval/infinite_loop.rs | 2 +- tests/ui/consts/const-eval/issue-100878.rs | 2 +- tests/ui/consts/const-eval/issue-114994-fail.rs | 2 +- tests/ui/consts/const-eval/issue-114994.rs | 2 +- tests/ui/consts/const-eval/issue-44578.rs | 2 +- tests/ui/consts/const-eval/issue-47971.rs | 2 +- tests/ui/consts/const-eval/issue-50706.rs | 2 +- tests/ui/consts/const-eval/issue-50814-2.rs | 6 +- tests/ui/consts/const-eval/issue-50814.rs | 2 +- tests/ui/consts/const-eval/issue-51300.rs | 2 +- tests/ui/consts/const-eval/issue-53157.rs | 2 +- tests/ui/consts/const-eval/issue-53401.rs | 2 +- tests/ui/consts/const-eval/issue-55541.rs | 2 +- tests/ui/consts/const-eval/issue-64908.rs | 2 +- tests/ui/consts/const-eval/issue-64970.rs | 2 +- .../consts/const-eval/issue-70804-fn-subtyping.rs | 2 +- .../const-eval/issue-84957-const-str-as-bytes.rs | 2 +- tests/ui/consts/const-eval/issue-85155.rs | 4 +- .../no_lint_for_statically_known_error.rs | 2 +- tests/ui/consts/const-eval/nonnull_as_ref.rs | 2 +- tests/ui/consts/const-eval/nrvo.rs | 2 +- .../ui/consts/const-eval/panic-assoc-never-type.rs | 2 +- tests/ui/consts/const-eval/promote-static.rs | 2 +- .../const-eval/promote_mutable_zst_mir_borrowck.rs | 2 +- tests/ui/consts/const-eval/promoted_errors.rs | 12 +- tests/ui/consts/const-eval/raw-bytes.rs | 6 +- tests/ui/consts/const-eval/ref_to_int_match.rs | 2 +- tests/ui/consts/const-eval/simd/insert_extract.rs | 2 +- tests/ui/consts/const-eval/simple_with_undef.rs | 2 +- .../const-eval/stable-metric/ctfe-fn-call.rs | 4 +- .../const-eval/stable-metric/ctfe-labelled-loop.rs | 4 +- .../const-eval/stable-metric/ctfe-recursion.rs | 4 +- .../const-eval/stable-metric/ctfe-simple-loop.rs | 6 +- .../stable-metric/dominators-edge-case.rs | 2 +- tests/ui/consts/const-eval/strlen.rs | 2 +- tests/ui/consts/const-eval/transmute-const.rs | 2 +- tests/ui/consts/const-eval/ub-enum.rs | 6 +- tests/ui/consts/const-eval/ub-incorrect-vtable.rs | 2 +- tests/ui/consts/const-eval/ub-nonnull.rs | 4 +- tests/ui/consts/const-eval/ub-ref-ptr.rs | 4 +- .../ui/consts/const-eval/ub-slice-get-unchecked.rs | 2 +- tests/ui/consts/const-eval/ub-uninhabit.rs | 4 +- tests/ui/consts/const-eval/ub-upvars.rs | 2 +- tests/ui/consts/const-eval/ub-wide-ptr.rs | 8 +- tests/ui/consts/const-eval/union-ice.rs | 2 +- tests/ui/consts/const-eval/union-ub.rs | 2 +- .../consts/const-eval/unused-broken-const-late.rs | 4 +- tests/ui/consts/const-eval/unused-broken-const.rs | 2 +- tests/ui/consts/const-eval/valid-const.rs | 2 +- .../write-to-uninhabited-enum-variant.rs | 2 +- tests/ui/consts/const-eval/zst_operand_eval.rs | 2 +- tests/ui/consts/const-expr-addr-operator.rs | 2 +- tests/ui/consts/const-expr-in-fixed-length-vec.rs | 4 +- tests/ui/consts/const-expr-in-vec-repeat.rs | 4 +- tests/ui/consts/const-extern-fn/const-extern-fn.rs | 2 +- tests/ui/consts/const-extern-function.rs | 2 +- tests/ui/consts/const-external-macro-const-err.rs | 4 +- tests/ui/consts/const-fields-and-indexing.rs | 2 +- tests/ui/consts/const-float-bits-conv.rs | 4 +- tests/ui/consts/const-float-bits-reject-conv.rs | 4 +- tests/ui/consts/const-float-classify.rs | 4 +- tests/ui/consts/const-fn-const-eval.rs | 2 +- tests/ui/consts/const-fn-destructuring-arg.rs | 2 +- tests/ui/consts/const-fn-method.rs | 2 +- tests/ui/consts/const-fn-nested.rs | 2 +- tests/ui/consts/const-fn-stability-calls-3.rs | 4 +- tests/ui/consts/const-fn-stability-calls.rs | 4 +- tests/ui/consts/const-fn-type-name-any.rs | 2 +- tests/ui/consts/const-fn-type-name.rs | 2 +- tests/ui/consts/const-fn-val.rs | 2 +- tests/ui/consts/const-fn-zst-args.rs | 2 +- tests/ui/consts/const-fn.rs | 2 +- tests/ui/consts/const-index-feature-gate.rs | 2 +- tests/ui/consts/const-int-arithmetic-overflow.rs | 4 +- tests/ui/consts/const-int-arithmetic.rs | 2 +- tests/ui/consts/const-int-conversion-rpass.rs | 2 +- tests/ui/consts/const-int-overflowing-rpass.rs | 2 +- tests/ui/consts/const-int-pow-rpass.rs | 2 +- tests/ui/consts/const-int-rotate-rpass.rs | 2 +- tests/ui/consts/const-int-saturating-arith.rs | 2 +- tests/ui/consts/const-int-sign-rpass.rs | 2 +- tests/ui/consts/const-int-wrapping-rpass.rs | 2 +- tests/ui/consts/const-labeled-break.rs | 2 +- .../consts/const-len-underflow-separate-spans.rs | 4 +- tests/ui/consts/const-match-check.rs | 2 +- tests/ui/consts/const-match-pattern-arm.rs | 2 +- tests/ui/consts/const-meth-pattern.rs | 2 +- .../consts/const-mut-refs/const_mut_address_of.rs | 2 +- tests/ui/consts/const-mut-refs/const_mut_refs.rs | 2 +- .../mut_ref_in_final_dynamic_check.rs | 6 +- tests/ui/consts/const-needs_drop.rs | 2 +- tests/ui/consts/const-negation.rs | 2 +- tests/ui/consts/const-negative.rs | 2 +- tests/ui/consts/const-nullary-enum.rs | 2 +- tests/ui/consts/const-nullary-univariant-enum.rs | 2 +- .../ui/consts/const-pattern-not-const-evaluable.rs | 2 +- tests/ui/consts/const-pattern-variant.rs | 2 +- tests/ui/consts/const-ptr-nonnull-rpass.rs | 2 +- tests/ui/consts/const-ptr-unique-rpass.rs | 2 +- tests/ui/consts/const-rec-and-tup.rs | 2 +- tests/ui/consts/const-region-ptrs-noncopy.rs | 2 +- tests/ui/consts/const-region-ptrs.rs | 2 +- tests/ui/consts/const-repeated-values.rs | 2 +- tests/ui/consts/const-size_of-align_of.rs | 2 +- tests/ui/consts/const-size_of-cycle.rs | 2 +- tests/ui/consts/const-size_of_val-align_of_val.rs | 2 +- tests/ui/consts/const-struct-offsets.rs | 4 +- tests/ui/consts/const-struct.rs | 2 +- tests/ui/consts/const-trait-to-trait.rs | 2 +- tests/ui/consts/const-try.rs | 2 +- tests/ui/consts/const-tuple-struct.rs | 2 +- tests/ui/consts/const-typeid-of-rpass.rs | 2 +- tests/ui/consts/const-unit-struct.rs | 4 +- tests/ui/consts/const-unsafe-fn.rs | 2 +- tests/ui/consts/const-unwrap.rs | 2 +- tests/ui/consts/const-validation-fail-55455.rs | 2 +- tests/ui/consts/const-variant-count.rs | 2 +- tests/ui/consts/const-vec-of-fns.rs | 4 +- tests/ui/consts/const-vec-syntax.rs | 4 +- tests/ui/consts/const-vecs-and-slices.rs | 2 +- tests/ui/consts/const.rs | 2 +- tests/ui/consts/const_cmp_type_id.rs | 2 +- .../const_constructor/const-construct-call.rs | 2 +- .../const_constructor/const_constructor_qpath.rs | 2 +- tests/ui/consts/const_discriminant.rs | 2 +- .../consts/const_fn_floating_point_arithmetic.rs | 2 +- tests/ui/consts/const_fn_return_nested_fn_ptr.rs | 4 +- tests/ui/consts/const_fn_unsize.rs | 2 +- tests/ui/consts/const_forget.rs | 2 +- .../consts/const_in_pattern/accept_structural.rs | 2 +- .../ui/consts/const_in_pattern/cross-crate-fail.rs | 2 +- .../ui/consts/const_in_pattern/cross-crate-pass.rs | 4 +- .../const_in_pattern/custom-eq-branch-pass.rs | 2 +- tests/ui/consts/const_in_pattern/issue-44333.rs | 2 +- tests/ui/consts/const_in_pattern/issue-53708.rs | 2 +- tests/ui/consts/const_in_pattern/issue-62614.rs | 2 +- tests/ui/consts/const_in_pattern/issue-65466.rs | 2 +- tests/ui/consts/const_in_pattern/issue-73431.rs | 4 +- .../const_in_pattern/null-raw-ptr-issue-119270.rs | 2 +- .../const_in_pattern/reject_non_structural.rs | 2 +- tests/ui/consts/const_let_assign.rs | 2 +- tests/ui/consts/const_let_assign2.rs | 2 +- tests/ui/consts/const_let_eq.rs | 2 +- tests/ui/consts/const_let_eq_float.rs | 2 +- tests/ui/consts/const_let_irrefutable.rs | 2 +- tests/ui/consts/const_let_promote.rs | 2 +- tests/ui/consts/const_prop_slice_pat_ice.rs | 2 +- tests/ui/consts/const_refs_to_static.rs | 2 +- tests/ui/consts/const_refs_to_static_fail.rs | 4 +- .../ui/consts/const_refs_to_static_fail_invalid.rs | 4 +- tests/ui/consts/const_short_circuit.rs | 2 +- tests/ui/consts/const_unsafe_unreachable.rs | 2 +- tests/ui/consts/const_unsafe_unreachable_ub.rs | 2 +- .../consts/constifconst-call-in-const-position.rs | 2 +- tests/ui/consts/consts-in-patterns.rs | 2 +- tests/ui/consts/control-flow/basics.rs | 2 +- tests/ui/consts/control-flow/drop-fail.rs | 2 +- tests/ui/consts/control-flow/drop-pass.rs | 4 +- tests/ui/consts/control-flow/drop-precise.rs | 2 +- .../control-flow/exhaustive-c-like-enum-match.rs | 2 +- .../control-flow/feature-gate-const-if-match.rs | 2 +- tests/ui/consts/control-flow/short-circuit-let.rs | 2 +- tests/ui/consts/control-flow/short-circuit.rs | 2 +- .../control-flow/single_variant_match_ice.rs | 2 +- tests/ui/consts/cycle-static-promoted.rs | 2 +- tests/ui/consts/deref_in_pattern.rs | 2 +- tests/ui/consts/drop-maybe_uninit.rs | 2 +- tests/ui/consts/drop_none.rs | 2 +- tests/ui/consts/drop_zst.rs | 2 +- tests/ui/consts/extra-const-ub/detect-extra-ub.rs | 6 +- tests/ui/consts/extra-const-ub/issue-100771.rs | 4 +- tests/ui/consts/extra-const-ub/issue-101034.rs | 4 +- tests/ui/consts/fn_trait_refs.rs | 2 +- tests/ui/consts/huge-values.rs | 4 +- tests/ui/consts/ice-48279.rs | 2 +- tests/ui/consts/ice-zst-static-access.rs | 2 +- tests/ui/consts/inline_asm.rs | 2 +- tests/ui/consts/int_ptr_for_zst_slices.rs | 2 +- tests/ui/consts/interior-mut-const-via-union.rs | 4 +- tests/ui/consts/invalid_promotion.rs | 4 +- tests/ui/consts/is_val_statically_known.rs | 2 +- tests/ui/consts/issue-104155.rs | 2 +- tests/ui/consts/issue-104396.rs | 4 +- .../issue-105536-const-val-roundtrip-ptr-eq.rs | 2 +- tests/ui/consts/issue-13837.rs | 4 +- tests/ui/consts/issue-13902.rs | 2 +- tests/ui/consts/issue-17074.rs | 2 +- tests/ui/consts/issue-17718-borrow-interior.rs | 2 +- tests/ui/consts/issue-17718.rs | 4 +- tests/ui/consts/issue-17756.rs | 2 +- tests/ui/consts/issue-19244.rs | 2 +- tests/ui/consts/issue-21562.rs | 2 +- tests/ui/consts/issue-21721.rs | 2 +- tests/ui/consts/issue-23833.rs | 2 +- tests/ui/consts/issue-23968-const-not-overflow.rs | 2 +- tests/ui/consts/issue-27890.rs | 2 +- tests/ui/consts/issue-28822.rs | 2 +- tests/ui/consts/issue-29798.rs | 6 +- tests/ui/consts/issue-29914-2.rs | 2 +- tests/ui/consts/issue-29914-3.rs | 2 +- tests/ui/consts/issue-29914.rs | 2 +- tests/ui/consts/issue-29927-1.rs | 2 +- tests/ui/consts/issue-29927.rs | 2 +- tests/ui/consts/issue-33537.rs | 2 +- tests/ui/consts/issue-33903.rs | 2 +- tests/ui/consts/issue-3521.fixed | 2 +- tests/ui/consts/issue-3521.rs | 2 +- tests/ui/consts/issue-37222.rs | 2 +- tests/ui/consts/issue-37550-1.rs | 2 +- tests/ui/consts/issue-37550.rs | 2 +- tests/ui/consts/issue-37991.rs | 2 +- tests/ui/consts/issue-39161-bogus-error.rs | 2 +- tests/ui/consts/issue-44255.rs | 2 +- tests/ui/consts/issue-46553.rs | 2 +- tests/ui/consts/issue-47789.rs | 2 +- tests/ui/consts/issue-54348.rs | 2 +- tests/ui/consts/issue-54387.rs | 2 +- tests/ui/consts/issue-54582.rs | 2 +- .../ui/consts/issue-58435-ice-with-assoc-const.rs | 2 +- tests/ui/consts/issue-62045.rs | 2 +- tests/ui/consts/issue-63226.rs | 8 +- tests/ui/consts/issue-63952.rs | 2 +- tests/ui/consts/issue-64059.rs | 10 +- tests/ui/consts/issue-64506.rs | 2 +- tests/ui/consts/issue-65348.rs | 2 +- tests/ui/consts/issue-66342.rs | 4 +- tests/ui/consts/issue-66345.rs | 4 +- tests/ui/consts/issue-66397.rs | 4 +- tests/ui/consts/issue-66787.rs | 4 +- tests/ui/consts/issue-67529.rs | 4 +- tests/ui/consts/issue-67640.rs | 4 +- tests/ui/consts/issue-67641.rs | 4 +- tests/ui/consts/issue-67696-const-prop-ice.rs | 4 +- tests/ui/consts/issue-67862.rs | 4 +- tests/ui/consts/issue-68264-overflow.rs | 4 +- tests/ui/consts/issue-68684.rs | 2 +- .../issue-69191-ice-on-uninhabited-enum-field.rs | 2 +- tests/ui/consts/issue-69312.rs | 2 +- tests/ui/consts/issue-69488.rs | 2 +- tests/ui/consts/issue-69532.rs | 2 +- tests/ui/consts/issue-6991.rs | 2 +- tests/ui/consts/issue-70773-mir-typeck-lt-norm.rs | 2 +- tests/ui/consts/issue-73976-monomorphic.rs | 2 +- tests/ui/consts/issue-77062-large-zst-array.rs | 2 +- tests/ui/consts/issue-79137-monomorphic.rs | 2 +- tests/ui/consts/issue-79152-const-array-index.rs | 2 +- tests/ui/consts/issue-79690.rs | 4 +- tests/ui/consts/issue-88071.rs | 2 +- tests/ui/consts/issue-88649.rs | 2 +- tests/ui/consts/issue-89088.rs | 2 +- tests/ui/consts/issue-90762.rs | 2 +- tests/ui/consts/issue-90870.fixed | 2 +- tests/ui/consts/issue-90870.rs | 2 +- tests/ui/consts/issue-91560.fixed | 2 +- tests/ui/consts/issue-91560.rs | 2 +- tests/ui/consts/issue-94371.rs | 2 +- tests/ui/consts/issue-94675.rs | 2 +- tests/ui/consts/issue-96169.rs | 4 +- tests/ui/consts/issue-broken-mir.rs | 2 +- tests/ui/consts/issue-miri-1910.rs | 4 +- tests/ui/consts/large_const_alloc.rs | 2 +- .../consts/let-irrefutable-pattern-ice-120337.rs | 2 +- tests/ui/consts/locals-in-const-fn.rs | 2 +- tests/ui/consts/match-const-fn-structs.rs | 2 +- tests/ui/consts/min_const_fn/address_of_const.rs | 2 +- .../min_const_fn/allow_const_fn_ptr_run_pass.rs | 2 +- .../allow_raw_ptr_dereference_const_fn.rs | 2 +- tests/ui/consts/min_const_fn/cast_fn.rs | 2 +- tests/ui/consts/min_const_fn/min_const_fn_dyn.rs | 2 +- .../ui/consts/min_const_fn/min_const_fn_libstd.rs | 2 +- .../consts/min_const_fn/min_const_fn_unsafe_ok.rs | 2 +- tests/ui/consts/miri_unleashed/abi-mismatch.rs | 2 +- tests/ui/consts/miri_unleashed/assoc_const.rs | 4 +- tests/ui/consts/miri_unleashed/assoc_const_2.rs | 2 +- tests/ui/consts/miri_unleashed/box.rs | 2 +- .../miri_unleashed/const_refers_to_static.rs | 6 +- .../const_refers_to_static_cross_crate.rs | 8 +- tests/ui/consts/miri_unleashed/drop.rs | 4 +- tests/ui/consts/miri_unleashed/extern-static.rs | 2 +- tests/ui/consts/miri_unleashed/inline_asm.rs | 4 +- .../ui/consts/miri_unleashed/mutable_references.rs | 2 +- .../miri_unleashed/mutable_references_err.rs | 4 +- tests/ui/consts/miri_unleashed/mutating_global.rs | 2 +- tests/ui/consts/miri_unleashed/non_const_fn.rs | 2 +- tests/ui/consts/miri_unleashed/ptr_arith.rs | 2 +- tests/ui/consts/miri_unleashed/slice_eq.rs | 4 +- .../consts/miri_unleashed/static-no-inner-mut.rs | 4 +- tests/ui/consts/miri_unleashed/tls.rs | 2 +- tests/ui/consts/missing_span_in_backtrace.rs | 2 +- tests/ui/consts/mozjs-error.rs | 2 +- tests/ui/consts/non-scalar-cast.rs | 2 +- tests/ui/consts/non-sync-references-in-const.rs | 4 +- tests/ui/consts/offset.rs | 2 +- tests/ui/consts/offset_from.rs | 2 +- tests/ui/consts/offset_ub.rs | 2 +- tests/ui/consts/packed_pattern.rs | 2 +- tests/ui/consts/packed_pattern2.rs | 2 +- tests/ui/consts/precise-drop-with-coverage.rs | 4 +- tests/ui/consts/precise-drop-with-promoted.rs | 4 +- tests/ui/consts/promote_borrowed_field.rs | 2 +- .../ui/consts/promote_evaluation_unused_result.rs | 2 +- tests/ui/consts/promote_fn_calls.rs | 4 +- tests/ui/consts/promote_fn_calls_std.rs | 2 +- tests/ui/consts/promoted-storage.rs | 2 +- tests/ui/consts/promoted-validation-55454.rs | 2 +- tests/ui/consts/promoted_const_call.rs | 2 +- tests/ui/consts/promoted_const_call4.rs | 2 +- tests/ui/consts/promoted_regression.rs | 2 +- tests/ui/consts/promotion-mutable-ref.rs | 2 +- tests/ui/consts/promotion.rs | 10 +- tests/ui/consts/ptr_comparisons.rs | 4 +- tests/ui/consts/ptr_is_null.rs | 4 +- tests/ui/consts/qualif-indirect-mutation-fail.rs | 2 +- tests/ui/consts/qualif-indirect-mutation-pass.rs | 4 +- tests/ui/consts/raw-ptr-const.rs | 2 +- tests/ui/consts/raw_pointer_promoted.rs | 2 +- tests/ui/consts/recursive-zst-static.rs | 4 +- tests/ui/consts/references.rs | 2 +- .../refs_check_const_value_eq-issue-88876.rs | 2 +- tests/ui/consts/repeat_match.rs | 2 +- tests/ui/consts/return-in-const-fn.rs | 2 +- tests/ui/consts/rustc-impl-const-stability.rs | 2 +- tests/ui/consts/rvalue-static-promotion.rs | 2 +- tests/ui/consts/self_normalization.rs | 2 +- tests/ui/consts/self_normalization2.rs | 2 +- tests/ui/consts/signed_enum_discr.rs | 2 +- tests/ui/consts/static-cycle-error.rs | 2 +- tests/ui/consts/static-mut-refs.rs | 2 +- .../ui/consts/static-promoted-to-mutable-static.rs | 2 +- tests/ui/consts/static-raw-pointer-interning.rs | 2 +- tests/ui/consts/static-raw-pointer-interning2.rs | 2 +- tests/ui/consts/static_mut_containing_mut_ref.rs | 2 +- tests/ui/consts/static_mut_containing_mut_ref2.rs | 2 +- tests/ui/consts/std/iter.rs | 2 +- tests/ui/consts/std/slice.rs | 2 +- tests/ui/consts/timeout.rs | 4 +- tests/ui/consts/trait_specialization.rs | 6 +- tests/ui/consts/transmute-const.rs | 2 +- .../transmute-size-mismatch-before-typeck.rs | 8 +- tests/ui/consts/try-operator.rs | 2 +- tests/ui/consts/tuple-struct-constructors.rs | 2 +- tests/ui/consts/underscore_const_names.rs | 2 +- tests/ui/consts/uninhabited-const-issue-61744.rs | 2 +- tests/ui/consts/union_constant.rs | 2 +- tests/ui/consts/unnormalized-param-env.rs | 2 +- tests/ui/consts/unstable-const-fn-in-libcore.rs | 2 +- .../unstable-precise-live-drops-in-libcore.rs | 2 +- tests/ui/consts/unwind-abort.rs | 2 +- tests/ui/consts/validate_never_arrays.rs | 4 +- tests/ui/consts/write_to_mut_ref_dest.rs | 4 +- tests/ui/consts/zst_no_llvm_alloc.rs | 2 +- tests/ui/coroutine/addassign-yield.rs | 2 +- tests/ui/coroutine/async-coroutine-issue-67158.rs | 2 +- tests/ui/coroutine/async-gen-deduce-yield.rs | 4 +- tests/ui/coroutine/async-gen-yield-ty-is-unit.rs | 4 +- tests/ui/coroutine/async_gen_fn.rs | 4 +- tests/ui/coroutine/async_gen_fn_iter.rs | 6 +- .../auxiliary/metadata-sufficient-for-layout.rs | 2 +- tests/ui/coroutine/auxiliary/unwind-aux.rs | 6 +- tests/ui/coroutine/borrow-in-tail-expr.rs | 2 +- tests/ui/coroutine/clone-impl-async.rs | 2 +- tests/ui/coroutine/clone-rpit.rs | 8 +- tests/ui/coroutine/conditional-drop.rs | 6 +- tests/ui/coroutine/control-flow.rs | 6 +- tests/ui/coroutine/coroutine-resume-after-panic.rs | 8 +- tests/ui/coroutine/derived-drop-parent-expr.rs | 2 +- tests/ui/coroutine/discriminant.rs | 2 +- tests/ui/coroutine/drop-and-replace.rs | 2 +- tests/ui/coroutine/drop-control-flow.rs | 2 +- tests/ui/coroutine/drop-env.rs | 6 +- tests/ui/coroutine/drop-track-addassign-yield.rs | 2 +- .../drop-tracking-yielding-in-match-guards.rs | 4 +- tests/ui/coroutine/gen_block.rs | 4 +- tests/ui/coroutine/gen_block_is_coro.rs | 2 +- tests/ui/coroutine/gen_block_is_iter.rs | 8 +- tests/ui/coroutine/gen_block_is_no_future.rs | 2 +- tests/ui/coroutine/gen_block_iterate.rs | 8 +- tests/ui/coroutine/gen_block_move.fixed | 4 +- tests/ui/coroutine/gen_block_move.rs | 4 +- tests/ui/coroutine/gen_block_panic.rs | 6 +- tests/ui/coroutine/gen_fn.rs | 4 +- tests/ui/coroutine/gen_fn_iter.rs | 6 +- tests/ui/coroutine/gen_fn_lifetime_capture.rs | 6 +- .../issue-110929-coroutine-conflict-error-ice.rs | 4 +- tests/ui/coroutine/issue-44197.rs | 2 +- tests/ui/coroutine/issue-52304.rs | 2 +- tests/ui/coroutine/issue-52398.rs | 2 +- tests/ui/coroutine/issue-53548-1.rs | 2 +- tests/ui/coroutine/issue-53548.rs | 2 +- tests/ui/coroutine/issue-57017.rs | 2 +- tests/ui/coroutine/issue-57084.rs | 4 +- tests/ui/coroutine/issue-57478.rs | 2 +- tests/ui/coroutine/issue-58888.rs | 4 +- .../coroutine/issue-61442-stmt-expr-with-drop.rs | 4 +- tests/ui/coroutine/issue-62506-two_awaits.rs | 4 +- tests/ui/coroutine/issue-69017.rs | 2 +- tests/ui/coroutine/issue-69039.rs | 2 +- tests/ui/coroutine/issue-87142.rs | 4 +- tests/ui/coroutine/issue-93161.rs | 4 +- tests/ui/coroutine/iterator-count.rs | 2 +- tests/ui/coroutine/layout-error.rs | 2 +- tests/ui/coroutine/live-upvar-across-yield.rs | 2 +- tests/ui/coroutine/match-bindings.rs | 2 +- .../ui/coroutine/metadata-sufficient-for-layout.rs | 2 +- tests/ui/coroutine/nested_coroutine.rs | 2 +- tests/ui/coroutine/niche-in-coroutine.rs | 2 +- tests/ui/coroutine/non-static-is-unpin.rs | 6 +- tests/ui/coroutine/overlap-locals.rs | 2 +- tests/ui/coroutine/panic-drops-resume.rs | 4 +- tests/ui/coroutine/panic-drops.rs | 4 +- tests/ui/coroutine/panic-safe.rs | 4 +- tests/ui/coroutine/partial-drop.rs | 2 +- tests/ui/coroutine/pin-box-coroutine.rs | 2 +- tests/ui/coroutine/polymorphize-args.rs | 4 +- .../coroutine/print/coroutine-print-verbose-1.rs | 2 +- .../coroutine/print/coroutine-print-verbose-2.rs | 2 +- .../coroutine/print/coroutine-print-verbose-3.rs | 2 +- tests/ui/coroutine/reborrow-mut-upvar.rs | 2 +- tests/ui/coroutine/reinit-in-match-guard.rs | 2 +- tests/ui/coroutine/resume-after-return.rs | 4 +- tests/ui/coroutine/resume-arg-size.rs | 2 +- tests/ui/coroutine/resume-live-across-yield.rs | 2 +- tests/ui/coroutine/return-types-diverge.rs | 4 +- tests/ui/coroutine/return-types.rs | 2 +- tests/ui/coroutine/self_referential_gen_block.rs | 2 +- tests/ui/coroutine/size-moved-locals.rs | 8 +- tests/ui/coroutine/smoke-resume-args.rs | 6 +- tests/ui/coroutine/smoke.rs | 10 +- tests/ui/coroutine/static-coroutine.rs | 2 +- .../coroutine/static-mut-reference-across-yield.rs | 2 +- tests/ui/coroutine/static-not-unpin.rs | 6 +- .../ui/coroutine/static-reference-across-yield.rs | 2 +- .../coroutine/too-live-local-in-immovable-gen.rs | 2 +- tests/ui/coroutine/uninhabited-field.rs | 2 +- tests/ui/coroutine/unresolved-ct-var.rs | 4 +- tests/ui/coroutine/unwind-abort-mix.rs | 10 +- tests/ui/coroutine/witness-ignore-fake-reads.rs | 4 +- tests/ui/coroutine/xcrate-reachable.rs | 4 +- tests/ui/coroutine/xcrate.rs | 4 +- tests/ui/coroutine/yield-in-args-rev.rs | 2 +- tests/ui/coroutine/yield-in-initializer.rs | 2 +- tests/ui/coroutine/yield-subtype.rs | 2 +- tests/ui/coroutine/yielding-in-match-guards.rs | 4 +- tests/ui/crate-leading-sep.rs | 4 +- .../ui/crate-loading/auxiliary/crateresolve1-1.rs | 4 +- .../ui/crate-loading/auxiliary/crateresolve1-2.rs | 4 +- .../ui/crate-loading/auxiliary/crateresolve1-3.rs | 4 +- .../ui/crate-loading/auxiliary/crateresolve2-1.rs | 2 +- .../ui/crate-loading/auxiliary/crateresolve2-2.rs | 2 +- .../ui/crate-loading/auxiliary/crateresolve2-3.rs | 2 +- tests/ui/crate-loading/auxiliary/proc-macro.rs | 4 +- tests/ui/crate-loading/crateresolve1.rs | 12 +- tests/ui/crate-loading/crateresolve2.rs | 12 +- .../ui/crate-loading/cross-compiled-proc-macro.rs | 8 +- tests/ui/crate-loading/invalid-rlib.rs | 8 +- tests/ui/crate-loading/missing-std.rs | 6 +- tests/ui/crate-method-reexport-grrrrrrr.rs | 6 +- tests/ui/crate-name-attr-used.rs | 6 +- tests/ui/crate-name-mismatch.rs | 2 +- tests/ui/cross-crate/cci_borrow.rs | 4 +- tests/ui/cross-crate/cci_capture_clause.rs | 8 +- tests/ui/cross-crate/cci_impl_exe.rs | 4 +- tests/ui/cross-crate/cci_iter_exe.rs | 4 +- tests/ui/cross-crate/cci_nested_exe.rs | 4 +- tests/ui/cross-crate/cci_no_inline_exe.rs | 4 +- tests/ui/cross-crate/const-cross-crate-const.rs | 4 +- tests/ui/cross-crate/const-cross-crate-extern.rs | 4 +- tests/ui/cross-crate/cross-crate-const-pat.rs | 6 +- .../cross-crate/issue-64872/auxiliary/a_def_obj.rs | 4 +- .../issue-64872/auxiliary/b_reexport_obj.rs | 2 +- .../auxiliary/c_another_vtable_for_obj.rs | 4 +- .../auxiliary/d_chain_of_rlibs_and_dylibs.rs | 2 +- tests/ui/cross-crate/issue-64872/issue-64872.rs | 10 +- .../cross-crate/moves-based-on-type-cross-crate.rs | 6 +- .../reexported-static-methods-cross-crate.rs | 4 +- tests/ui/cross-crate/static-array-across-crate.rs | 4 +- tests/ui/cross-crate/static-init.rs | 4 +- .../ui/cross-crate/xcrate-address-insignificant.rs | 4 +- .../cross-crate/xcrate-associated-type-defaults.rs | 4 +- tests/ui/cross-crate/xcrate-static-addresses.rs | 6 +- .../ui/cross-crate/xcrate-trait-lifetime-param.rs | 6 +- .../cross-crate/xcrate_generic_fn_nested_return.rs | 4 +- tests/ui/cross/cross-crate-macro-backtrace/main.rs | 2 +- tests/ui/cross/cross-file-errors/underscore.rs | 2 +- tests/ui/custom-test-frameworks-simple.rs | 4 +- tests/ui/custom_test_frameworks/dynamic.rs | 6 +- tests/ui/custom_test_frameworks/full.rs | 6 +- tests/ui/custom_test_frameworks/mismatch.rs | 4 +- .../debuginfo-box-with-large-allocator.rs | 4 +- .../debuginfo-emit-llvm-ir-and-split-debuginfo.rs | 6 +- .../debuginfo-type-name-layout-ice-94961-1.rs | 10 +- .../debuginfo-type-name-layout-ice-94961-2.rs | 10 +- ...buginfo_with_uninhabitable_field_and_unsized.rs | 4 +- tests/ui/debuginfo/issue-105386-debuginfo-ub.rs | 4 +- tests/ui/debuginfo/late-bound-projection.rs | 4 +- tests/ui/debuginfo/sroa-fragment-debuginfo.rs | 6 +- tests/ui/deduplicate-diagnostics.rs | 4 +- tests/ui/deep.rs | 4 +- tests/ui/default-method-parsing.rs | 4 +- tests/ui/default-method-simple.rs | 2 +- tests/ui/defaults-well-formedness.rs | 2 +- tests/ui/definition-reachable/field-method.rs | 4 +- tests/ui/definition-reachable/nested-fn.rs | 4 +- tests/ui/definition-reachable/private-non-types.rs | 2 +- tests/ui/definition-reachable/private-types.rs | 2 +- tests/ui/definition-reachable/private-use.rs | 4 +- .../ui/delegation/explicit-paths-in-traits-pass.rs | 2 +- tests/ui/delegation/explicit-paths-pass.rs | 2 +- .../ui/delegation/explicit-paths-signature-pass.rs | 2 +- tests/ui/delegation/parse.rs | 2 +- tests/ui/delegation/target-expr-pass.rs | 2 +- tests/ui/dep-graph/dep-graph-assoc-type-codegen.rs | 4 +- tests/ui/dep-graph/dep-graph-caller-callee.rs | 4 +- tests/ui/dep-graph/dep-graph-dump.rs | 4 +- tests/ui/dep-graph/dep-graph-struct-signature.rs | 4 +- .../dep-graph-trait-impl-two-traits-same-method.rs | 4 +- .../dep-graph/dep-graph-trait-impl-two-traits.rs | 4 +- tests/ui/dep-graph/dep-graph-trait-impl.rs | 4 +- tests/ui/dep-graph/dep-graph-type-alias.rs | 4 +- tests/ui/dep-graph/dep-graph-variance-alias.rs | 4 +- tests/ui/deployment-target/invalid-target.rs | 4 +- tests/ui/deployment-target/macos-target.rs | 10 +- tests/ui/deprecation-in-force-unstable.rs | 4 +- tests/ui/deprecation/atomic_initializers.fixed | 4 +- tests/ui/deprecation/atomic_initializers.rs | 4 +- .../deprecation/deprecated-macro_escape-inner.rs | 2 +- tests/ui/deprecation/deprecated-macro_escape.rs | 2 +- tests/ui/deprecation/deprecation-in-future.rs | 2 +- tests/ui/deprecation/deprecation-lint-2.rs | 4 +- tests/ui/deprecation/deprecation-lint-3.rs | 4 +- tests/ui/deprecation/deprecation-lint.rs | 2 +- tests/ui/deprecation/derive_on_deprecated.rs | 2 +- .../deprecation/derive_on_deprecated_forbidden.rs | 2 +- .../feature-gate-deprecated_suggestion.rs | 2 +- ...ssue-84637-deprecated-associated-function.fixed | 2 +- .../issue-84637-deprecated-associated-function.rs | 2 +- tests/ui/deprecation/suggestion.fixed | 2 +- tests/ui/deprecation/suggestion.rs | 2 +- tests/ui/deprecation/try-macro-suggestion.rs | 2 +- tests/ui/deref-patterns/basic.rs | 4 +- tests/ui/deref-patterns/default-infer.rs | 2 +- tests/ui/deref-patterns/refs.rs | 2 +- tests/ui/deref-rc.rs | 2 +- tests/ui/deref.rs | 4 +- tests/ui/derive-uninhabited-enum-38885.rs | 4 +- tests/ui/derives/auxiliary/derive-marker-tricky.rs | 4 +- tests/ui/derives/derive-Debug-use-ufcs-struct.rs | 2 +- tests/ui/derives/derive-Debug-use-ufcs-tuple.rs | 2 +- tests/ui/derives/derive-hygiene.rs | 2 +- tests/ui/derives/derive-macro-const-default.rs | 2 +- tests/ui/derives/derive-marker-tricky.rs | 4 +- tests/ui/derives/derive-multiple-with-packed.rs | 2 +- tests/ui/derives/derive-partial-ord.rs | 2 +- tests/ui/derives/derive-renamed.rs | 4 +- tests/ui/derives/deriving-meta-empty-trait-list.rs | 2 +- tests/ui/deriving/auxiliary/derive-no-std.rs | 2 +- tests/ui/deriving/derive-no-std.rs | 4 +- tests/ui/deriving/derive-partialord-correctness.rs | 2 +- tests/ui/deriving/deriving-all-codegen.rs | 6 +- tests/ui/deriving/deriving-all-codegen.stdout | 6 +- tests/ui/deriving/deriving-associated-types.rs | 2 +- tests/ui/deriving/deriving-bounds.rs | 2 +- tests/ui/deriving/deriving-clone-array.rs | 2 +- tests/ui/deriving/deriving-clone-enum.rs | 4 +- tests/ui/deriving/deriving-clone-generic-enum.rs | 4 +- tests/ui/deriving/deriving-clone-generic-struct.rs | 4 +- .../deriving-clone-generic-tuple-struct.rs | 4 +- tests/ui/deriving/deriving-clone-struct.rs | 4 +- tests/ui/deriving/deriving-clone-tuple-struct.rs | 4 +- tests/ui/deriving/deriving-cmp-generic-enum.rs | 2 +- .../deriving/deriving-cmp-generic-struct-enum.rs | 2 +- tests/ui/deriving/deriving-cmp-generic-struct.rs | 2 +- .../deriving/deriving-cmp-generic-tuple-struct.rs | 2 +- tests/ui/deriving/deriving-cmp-shortcircuit.rs | 2 +- tests/ui/deriving/deriving-copyclone.rs | 2 +- tests/ui/deriving/deriving-default-box.rs | 2 +- tests/ui/deriving/deriving-default-enum.rs | 2 +- tests/ui/deriving/deriving-enum-single-variant.rs | 4 +- tests/ui/deriving/deriving-eq-ord-boxed-slice.rs | 2 +- tests/ui/deriving/deriving-hash.rs | 2 +- tests/ui/deriving/deriving-in-fn.rs | 2 +- tests/ui/deriving/deriving-in-macro.rs | 4 +- tests/ui/deriving/deriving-meta-multiple.rs | 4 +- tests/ui/deriving/deriving-meta.rs | 4 +- .../deriving-self-lifetime-totalord-totaleq.rs | 2 +- tests/ui/deriving/deriving-show-2.rs | 2 +- tests/ui/deriving/deriving-show.rs | 2 +- tests/ui/deriving/deriving-via-extension-c-enum.rs | 2 +- tests/ui/deriving/deriving-via-extension-enum.rs | 2 +- .../deriving/deriving-via-extension-hash-enum.rs | 2 +- .../deriving/deriving-via-extension-hash-struct.rs | 4 +- .../deriving-via-extension-struct-empty.rs | 2 +- ...iving-via-extension-struct-like-enum-variant.rs | 2 +- .../deriving-via-extension-struct-tuple.rs | 2 +- tests/ui/deriving/deriving-via-extension-struct.rs | 2 +- .../deriving/deriving-via-extension-type-params.rs | 2 +- tests/ui/deriving/deriving-with-helper.rs | 4 +- tests/ui/deriving/deriving-with-repr-packed.rs | 2 +- tests/ui/deriving/issue-103157.rs | 2 +- tests/ui/deriving/issue-15689-1.rs | 2 +- tests/ui/deriving/issue-15689-2.rs | 4 +- tests/ui/deriving/issue-19358.rs | 2 +- tests/ui/deriving/issue-3935.rs | 2 +- tests/ui/deriving/issue-58319.rs | 2 +- tests/ui/deriving/issue-6341.rs | 4 +- tests/ui/deriving/issue-89188-gat-hrtb.rs | 2 +- tests/ui/deriving/multiple-defaults.rs | 2 +- tests/ui/dest-prop/skeptic-miscompile.rs | 4 +- tests/ui/destructuring-assignment/drop-order.rs | 2 +- .../destructuring-assignment/nested_destructure.rs | 2 +- .../destructuring-assignment/slice_destructure.rs | 2 +- .../struct-or-enum-variant-path.rs | 2 +- .../destructuring-assignment/struct_destructure.rs | 2 +- .../destructuring-assignment/tuple_destructure.rs | 2 +- .../tuple_struct_destructure.rs | 2 +- .../warn-unused-duplication.rs | 2 +- .../diagnostic-flags/colored-session-opt-error.rs | 6 +- tests/ui/diagnostic-flags/terminal_urls.rs | 2 +- tests/ui/diagnostic-width/E0271.rs | 4 +- tests/ui/diagnostic-width/flag-human.rs | 2 +- tests/ui/diagnostic-width/flag-json.rs | 4 +- tests/ui/diagnostic-width/flag-json.stderr | 2 +- tests/ui/diagnostic-width/long-E0308.rs | 4 +- tests/ui/diagnostic-width/tab-column-numbers.rs | 2 +- .../auxiliary/proc-macro-helper.rs | 4 +- .../can_use_the_diagnostic_name_in_other_places.rs | 2 +- .../diagnostic_namespace/existing_proc_macros.rs | 4 +- .../non_existing_attributes_accepted.rs | 2 +- .../error_is_shown_in_downstream_crates.rs | 2 +- .../did_you_mean/dont-suggest-doc-hidden-fields.rs | 4 +- tests/ui/did_you_mean/issue-105225.fixed | 2 +- tests/ui/did_you_mean/issue-105225.rs | 2 +- tests/ui/did_you_mean/issue-31424.rs | 2 +- ...ssue-41679-tilde-bitwise-negation-attempt.fixed | 2 +- .../issue-41679-tilde-bitwise-negation-attempt.rs | 2 +- .../did_you_mean/issue-54109-without-witness.fixed | 2 +- .../ui/did_you_mean/issue-54109-without-witness.rs | 2 +- tests/ui/did_you_mean/recursion_limit_deref.rs | 2 +- .../replace-impl-infer-ty-from-trait.fixed | 2 +- .../replace-impl-infer-ty-from-trait.rs | 2 +- tests/ui/did_you_mean/use_instead_of_import.fixed | 2 +- tests/ui/did_you_mean/use_instead_of_import.rs | 2 +- .../macro_expanded_mod_helper/foo/bar.rs | 2 +- .../macro_expanded_mod_helper/foo/mod.rs | 2 +- .../mod_file_not_owning_aux1.rs | 2 +- .../mod_file_not_owning_aux2.rs | 2 +- .../mod_file_not_owning_aux3.rs | 2 +- ...wed-deconstructing-destructing-struct-let.fixed | 2 +- ...llowed-deconstructing-destructing-struct-let.rs | 2 +- ...d-deconstructing-destructing-struct-match.fixed | 2 +- ...owed-deconstructing-destructing-struct-match.rs | 2 +- tests/ui/diverging-fallback-method-chain.rs | 2 +- tests/ui/diverging-fallback-option.rs | 2 +- tests/ui/double-ref.rs | 4 +- tests/ui/drop-bounds/drop-bounds-impl-drop.rs | 2 +- tests/ui/drop/drop-if-let-binding.rs | 4 +- tests/ui/drop/drop-on-empty-block-exit.rs | 4 +- tests/ui/drop/drop-on-ret.rs | 4 +- tests/ui/drop/drop-struct-as-object.rs | 2 +- tests/ui/drop/drop-trait-enum.rs | 6 +- tests/ui/drop/drop-trait-generic.rs | 2 +- tests/ui/drop/drop-trait.rs | 2 +- tests/ui/drop/drop-uninhabited-enum.rs | 4 +- tests/ui/drop/drop-with-type-ascription-1.rs | 2 +- tests/ui/drop/drop-with-type-ascription-2.rs | 2 +- tests/ui/drop/drop_elaboration_with_errors.rs | 2 +- tests/ui/drop/drop_order.rs | 4 +- tests/ui/drop/dropck-eyepatch-extern-crate.rs | 4 +- tests/ui/drop/dropck-eyepatch-manuallydrop.rs | 2 +- tests/ui/drop/dropck-eyepatch-reorder.rs | 2 +- tests/ui/drop/dropck-eyepatch.rs | 2 +- tests/ui/drop/dropck_legal_cycles.rs | 2 +- tests/ui/drop/dynamic-drop-async.rs | 6 +- tests/ui/drop/dynamic-drop.rs | 4 +- tests/ui/drop/issue-100276.rs | 4 +- tests/ui/drop/issue-10028.rs | 6 +- tests/ui/drop/issue-103107.rs | 4 +- tests/ui/drop/issue-110682.rs | 4 +- tests/ui/drop/issue-17718-const-destructors.rs | 2 +- tests/ui/drop/issue-21486.rs | 2 +- .../ui/drop/issue-23338-ensure-param-drop-order.rs | 2 +- tests/ui/drop/issue-2734.rs | 4 +- tests/ui/drop/issue-2735-2.rs | 2 +- tests/ui/drop/issue-2735-3.rs | 2 +- tests/ui/drop/issue-2735.rs | 4 +- tests/ui/drop/issue-30018-nopanic.rs | 2 +- tests/ui/drop/issue-35546.rs | 2 +- tests/ui/drop/issue-48962.rs | 2 +- tests/ui/drop/issue-90752-raw-ptr-shenanigans.rs | 2 +- tests/ui/drop/issue-90752.rs | 2 +- tests/ui/drop/issue-979.rs | 2 +- tests/ui/drop/no-drop-flag-size.rs | 2 +- tests/ui/drop/nondrop-cycle.rs | 4 +- tests/ui/drop/recursion-check-on-erroneous-impl.rs | 2 +- tests/ui/drop/repeat-drop.rs | 4 +- tests/ui/drop/terminate-in-initializer.rs | 6 +- tests/ui/drop/use_inline_dtor.rs | 6 +- tests/ui/dropck/cleanup-arm-conditional.rs | 4 +- tests/ui/dropck/coroutine-liveness-1.rs | 4 +- tests/ui/dropck/coroutine-liveness-2.rs | 4 +- tests/ui/dropck/dropck-eyepatch-extern-crate.rs | 2 +- tests/ui/dropck/dropck_fn_type.rs | 2 +- tests/ui/dropck/dropck_traits.rs | 2 +- tests/ui/dropck/explicit-drop-bounds.rs | 6 +- tests/ui/dropck/explicit-implied-outlives.rs | 6 +- tests/ui/dropck/issue-24805-dropck-itemless.rs | 2 +- .../dropck/issue-28498-ugeh-with-lifetime-param.rs | 2 +- .../dropck/issue-28498-ugeh-with-passed-to-fn.rs | 2 +- .../ui/dropck/issue-28498-ugeh-with-trait-bound.rs | 2 +- tests/ui/dropck/issue-29844.rs | 2 +- tests/ui/dropck/issue-34053.rs | 2 +- tests/ui/dropck/issue-54943-1.rs | 2 +- tests/ui/dropck/issue-54943-2.rs | 2 +- tests/ui/dropck/transitive-outlives-2.rs | 2 +- tests/ui/dropck/transitive-outlives.rs | 4 +- tests/ui/dropck/trivial-impl-bounds.rs | 4 +- tests/ui/dupe-first-attr.rs | 4 +- tests/ui/duplicate/dupe-symbols-1.rs | 2 +- tests/ui/duplicate/dupe-symbols-2.rs | 2 +- tests/ui/duplicate/dupe-symbols-3.rs | 2 +- tests/ui/duplicate/dupe-symbols-4.rs | 4 +- tests/ui/duplicate/dupe-symbols-5.rs | 2 +- tests/ui/duplicate/dupe-symbols-6.rs | 2 +- tests/ui/duplicate/dupe-symbols-7.rs | 4 +- tests/ui/duplicate/dupe-symbols-8.rs | 4 +- tests/ui/duplicate_entry_error.rs | 2 +- .../dyn-2015-edition-keyword-ident-lint.fixed | 4 +- .../dyn-2015-edition-keyword-ident-lint.rs | 4 +- .../dyn-2015-idents-in-decl-macros-unlinted.rs | 4 +- .../dyn-2015-idents-in-macros-unlinted.rs | 4 +- .../dyn-2015-no-warnings-without-lints.rs | 4 +- tests/ui/dyn-keyword/dyn-2018-edition-lint.rs | 2 +- tests/ui/dyn-keyword/dyn-2021-edition-error.rs | 2 +- tests/ui/dyn-keyword/dyn-angle-brackets.fixed | 4 +- tests/ui/dyn-keyword/dyn-angle-brackets.rs | 4 +- .../issue-56327-dyn-trait-in-macro-is-okay.rs | 4 +- tests/ui/dyn-star/align.rs | 2 +- tests/ui/dyn-star/box.rs | 8 +- .../dyn-star/check-size-at-cast-polymorphic-bad.rs | 4 +- .../ui/dyn-star/check-size-at-cast-polymorphic.rs | 2 +- tests/ui/dyn-star/const-and-static.rs | 2 +- tests/ui/dyn-star/const.rs | 2 +- tests/ui/dyn-star/dispatch-on-pin-mut.rs | 6 +- tests/ui/dyn-star/dont-unsize-coerce-dyn-star.rs | 4 +- tests/ui/dyn-star/drop.rs | 4 +- tests/ui/dyn-star/dyn-async-trait.rs | 4 +- tests/ui/dyn-star/dyn-star-to-dyn.rs | 2 +- tests/ui/dyn-star/issue-102430.rs | 2 +- tests/ui/dyn-star/make-dyn-star.rs | 2 +- tests/ui/dyn-star/method.rs | 2 +- tests/ui/dyn-star/no-explicit-dyn-star.rs | 2 +- tests/ui/dyn-star/no-implicit-dyn-star.rs | 2 +- tests/ui/dyn-star/param-env-region-infer.rs | 4 +- tests/ui/dyn-star/return.rs | 2 +- tests/ui/dyn-star/syntax.rs | 2 +- tests/ui/dyn-star/upcast.rs | 2 +- .../dynamically-sized-types/dst-coerce-custom.rs | 2 +- tests/ui/dynamically-sized-types/dst-coerce-rc.rs | 2 +- tests/ui/dynamically-sized-types/dst-coercions.rs | 4 +- tests/ui/dynamically-sized-types/dst-deref-mut.rs | 2 +- tests/ui/dynamically-sized-types/dst-deref.rs | 2 +- .../ui/dynamically-sized-types/dst-field-align.rs | 2 +- tests/ui/dynamically-sized-types/dst-index.rs | 2 +- .../dst-irrefutable-bind.rs | 2 +- tests/ui/dynamically-sized-types/dst-raw.rs | 2 +- .../ui/dynamically-sized-types/dst-struct-sole.rs | 2 +- tests/ui/dynamically-sized-types/dst-struct.rs | 2 +- .../ui/dynamically-sized-types/dst-trait-tuple.rs | 2 +- tests/ui/dynamically-sized-types/dst-trait.rs | 2 +- .../dst-tuple-no-reorder.rs | 2 +- tests/ui/dynamically-sized-types/dst-tuple-sole.rs | 2 +- .../dst-tuple-zst-offsets.rs | 2 +- tests/ui/dynamically-sized-types/dst-tuple.rs | 2 +- tests/ui/early-ret-binop-add.rs | 4 +- .../ui/editions/auxiliary/edition-imports-2015.rs | 2 +- .../ui/editions/auxiliary/edition-imports-2018.rs | 2 +- .../ui/editions/auxiliary/edition-kw-macro-2015.rs | 2 +- .../ui/editions/auxiliary/edition-kw-macro-2018.rs | 2 +- tests/ui/editions/dyn-trait-sugg-2021.rs | 2 +- tests/ui/editions/edition-extern-crate-allowed.rs | 6 +- tests/ui/editions/edition-imports-2015.rs | 8 +- tests/ui/editions/edition-imports-2018.rs | 4 +- .../edition-imports-virtual-2015-ambiguity.rs | 8 +- .../editions/edition-imports-virtual-2015-gated.rs | 4 +- .../edition-keywords-2015-2015-expansion.rs | 6 +- .../editions/edition-keywords-2015-2015-parsing.rs | 4 +- tests/ui/editions/edition-keywords-2015-2015.rs | 6 +- .../edition-keywords-2015-2018-expansion.rs | 4 +- .../editions/edition-keywords-2015-2018-parsing.rs | 4 +- tests/ui/editions/edition-keywords-2015-2018.rs | 6 +- .../edition-keywords-2018-2015-expansion.rs | 6 +- .../editions/edition-keywords-2018-2015-parsing.rs | 4 +- tests/ui/editions/edition-keywords-2018-2015.rs | 6 +- .../edition-keywords-2018-2018-expansion.rs | 4 +- .../editions/edition-keywords-2018-2018-parsing.rs | 4 +- tests/ui/editions/edition-keywords-2018-2018.rs | 6 +- .../ui/editions/edition-raw-pointer-method-2015.rs | 2 +- .../ui/editions/edition-raw-pointer-method-2018.rs | 2 +- tests/ui/elided-test.rs | 2 +- tests/ui/else-if.rs | 2 +- tests/ui/empty-allocation-non-null.rs | 2 +- tests/ui/empty-allocation-rvalue-non-null.rs | 4 +- tests/ui/empty-type-parameter-list.rs | 2 +- tests/ui/empty/empty-macro-use.rs | 2 +- tests/ui/empty/empty-struct-braces-expr.rs | 2 +- tests/ui/empty/empty-struct-braces-pat-1.rs | 2 +- tests/ui/empty/empty-struct-braces-pat-2.rs | 2 +- tests/ui/empty/empty-struct-braces-pat-3.rs | 2 +- tests/ui/empty/empty-struct-tuple-pat.rs | 2 +- tests/ui/empty/empty-struct-unit-expr.rs | 2 +- tests/ui/empty/empty-struct-unit-pat.rs | 2 +- tests/ui/empty/issue-37026.rs | 2 +- tests/ui/empty/no-link.rs | 4 +- tests/ui/empty_global_asm.rs | 4 +- .../entry-point/imported_main_from_extern_crate.rs | 4 +- .../imported_main_from_extern_crate_wrong_type.rs | 2 +- .../ui/entry-point/imported_main_from_inner_mod.rs | 2 +- ...mported_main_unused_not_trigger_feature_gate.rs | 2 +- .../actually_not_an_enum-discriminant.rs | 2 +- .../arbitrary_enum_discriminant.rs | 2 +- tests/ui/enum-discriminant/discr-foreign.rs | 4 +- tests/ui/enum-discriminant/discriminant_size.rs | 2 +- .../discriminant_value-wrapper.rs | 2 +- tests/ui/enum-discriminant/discriminant_value.rs | 2 +- tests/ui/enum-discriminant/get_discr.rs | 2 +- tests/ui/enum-discriminant/issue-104519.rs | 2 +- tests/ui/enum-discriminant/issue-41394-rpass.rs | 4 +- tests/ui/enum-discriminant/issue-43398.rs | 2 +- tests/ui/enum-discriminant/issue-46519.rs | 6 +- tests/ui/enum-discriminant/issue-50689.rs | 2 +- tests/ui/enum-discriminant/issue-51582.rs | 2 +- tests/ui/enum-discriminant/issue-61696.rs | 2 +- .../ui/enum-discriminant/issue-70509-partial_eq.rs | 2 +- tests/ui/enum-discriminant/issue-90038.rs | 2 +- tests/ui/enum-discriminant/niche-prefer-zero.rs | 2 +- tests/ui/enum-discriminant/niche.rs | 2 +- tests/ui/enum-discriminant/repr128.rs | 2 +- tests/ui/enum/enum-size-variance.rs | 2 +- tests/ui/enum/issue-1821.rs | 4 +- tests/ui/enum/issue-42747.rs | 2 +- tests/ui/enum/union-in-enum.rs | 2 +- tests/ui/env-args-reverse-iterator.rs | 6 +- tests/ui/env-funky-keys.rs | 16 +- tests/ui/env-null-vars.rs | 6 +- tests/ui/env-vars.rs | 4 +- tests/ui/error-codes/E0010-teach.rs | 2 +- tests/ui/error-codes/E0026-teach.rs | 2 +- tests/ui/error-codes/E0029-teach.rs | 2 +- tests/ui/error-codes/E0030-teach.rs | 2 +- tests/ui/error-codes/E0033-teach.rs | 2 +- tests/ui/error-codes/E0040.fixed | 2 +- tests/ui/error-codes/E0040.rs | 2 +- tests/ui/error-codes/E0152.rs | 2 +- tests/ui/error-codes/E0161.rs | 6 +- tests/ui/error-codes/E0275.rs | 2 +- tests/ui/error-codes/E0311.fixed | 2 +- tests/ui/error-codes/E0311.rs | 2 +- tests/ui/error-codes/E0435.fixed | 2 +- tests/ui/error-codes/E0435.rs | 2 +- tests/ui/error-codes/E0462.rs | 8 +- tests/ui/error-codes/E0464.rs | 12 +- tests/ui/error-codes/E0476.rs | 4 +- tests/ui/error-codes/E0511.rs | 2 +- tests/ui/error-codes/E0519.rs | 2 +- tests/ui/error-codes/E0523.rs | 12 +- tests/ui/error-codes/E0602.rs | 10 +- tests/ui/error-codes/E0642.fixed | 2 +- tests/ui/error-codes/E0642.rs | 2 +- tests/ui/error-codes/E0789.rs | 2 +- tests/ui/error-codes/auxiliary/crateresolve1-1.rs | 4 +- tests/ui/error-codes/auxiliary/crateresolve1-2.rs | 4 +- tests/ui/error-codes/auxiliary/crateresolve1-3.rs | 4 +- tests/ui/error-codes/auxiliary/found-staticlib.rs | 2 +- tests/ui/error-codes/e0119/complex-impl.rs | 2 +- tests/ui/error-codes/e0119/issue-23563.rs | 2 +- tests/ui/error-emitter/highlighting.rs | 12 +- .../multiline-multipart-suggestion.rs | 10 +- tests/ui/errors/auxiliary/remapped_dep.rs | 2 +- tests/ui/errors/issue-104621-extern-bad-file.rs | 4 +- tests/ui/errors/issue-104621-extern-not-file.rs | 2 +- .../issue-89280-emitter-overflow-splice-lines.rs | 2 +- tests/ui/errors/remap-path-prefix-macro.rs | 12 +- tests/ui/errors/remap-path-prefix-reverse.rs | 10 +- tests/ui/errors/remap-path-prefix.rs | 12 +- tests/ui/exec-env.rs | 8 +- tests/ui/explain.rs | 4 +- tests/ui/explicit-i-suffix.rs | 4 +- tests/ui/explicit-tail-calls/become-outside.rs | 2 +- .../ui/explicit-tail-calls/return-lifetime-sub.rs | 2 +- tests/ui/explicit/explicit-call-to-dtor.fixed | 2 +- tests/ui/explicit/explicit-call-to-dtor.rs | 2 +- .../explicit-call-to-supertrait-dtor.fixed | 2 +- .../explicit/explicit-call-to-supertrait-dtor.rs | 2 +- tests/ui/explore-issue-38412.rs | 2 +- tests/ui/expr-block-fn.rs | 2 +- tests/ui/expr-block-generic.rs | 2 +- tests/ui/expr-block.rs | 2 +- tests/ui/expr-copy.rs | 2 +- tests/ui/expr-if-generic.rs | 2 +- tests/ui/expr-if-panic-all.rs | 2 +- tests/ui/expr-scope.rs | 4 +- tests/ui/expr/compound-assignment/eval-order.rs | 2 +- tests/ui/expr/if-bot.rs | 2 +- tests/ui/expr/if/attrs/builtin-if-attr.rs | 2 +- tests/ui/expr/if/attrs/cfg-false-if-attr.rs | 2 +- tests/ui/expr/if/attrs/gate-whole-expr.rs | 2 +- tests/ui/expr/if/attrs/let-chains-attr.rs | 2 +- tests/ui/expr/if/expr-if-panic-fn.rs | 6 +- tests/ui/expr/if/expr-if-panic-pass.rs | 2 +- tests/ui/expr/if/expr-if-panic.rs | 6 +- tests/ui/expr/if/expr-if.rs | 2 +- tests/ui/expr/if/if-check-panic.rs | 6 +- tests/ui/expr/if/if-check.rs | 2 +- tests/ui/expr/if/if-cond-bot.rs | 6 +- tests/ui/expr/if/if-let.rs | 2 +- tests/ui/expr/if/if-loop.rs | 2 +- tests/ui/expr/if/if-ret.rs | 4 +- tests/ui/expr/if/if-typeck.rs | 2 +- .../missing_block_in_fn_call.fixed | 2 +- .../malformed_closure/missing_block_in_fn_call.rs | 2 +- .../missing_braces_around_block.fixed | 2 +- .../missing_braces_around_block.rs | 2 +- .../ruby_style_closure_parse_error.fixed | 2 +- .../ruby_style_closure_parse_error.rs | 2 +- tests/ui/ext-expand-inner-exprs.rs | 2 +- tests/ui/ext-nonexistent.rs | 2 +- tests/ui/extenv/extenv-env-overload.rs | 6 +- tests/ui/extenv/extenv-env.rs | 4 +- tests/ui/extenv/extenv-not-env.rs | 4 +- tests/ui/extenv/issue-110547.rs | 2 +- tests/ui/extern-flag/empty-extern-arg.rs | 8 +- tests/ui/extern-flag/force-extern.rs | 10 +- tests/ui/extern-flag/invalid-crate-name-dashed.rs | 6 +- .../ui/extern-flag/invalid-crate-name-non-ascii.rs | 4 +- tests/ui/extern-flag/invalid-crate-name.rs | 4 +- tests/ui/extern-flag/multiple-opts.rs | 6 +- tests/ui/extern-flag/no-force-extern.rs | 10 +- tests/ui/extern-flag/no-nounused.rs | 6 +- tests/ui/extern-flag/noprelude-and-prelude.rs | 8 +- tests/ui/extern-flag/noprelude-resolves.rs | 8 +- tests/ui/extern-flag/noprelude.rs | 6 +- tests/ui/extern-flag/nounused.rs | 8 +- tests/ui/extern-flag/public-and-private.rs | 6 +- tests/ui/extern-flag/redundant-force-extern.rs | 10 +- tests/ui/extern/auxiliary/issue-80074-macro-2.rs | 2 +- tests/ui/extern/auxiliary/issue-80074-macro.rs | 2 +- tests/ui/extern/extern-1.rs | 4 +- tests/ui/extern/extern-calling-convention-test.rs | 6 +- tests/ui/extern/extern-compare-with-return-type.rs | 2 +- tests/ui/extern/extern-const.fixed | 6 +- tests/ui/extern/extern-const.rs | 6 +- tests/ui/extern/extern-crate-rename.rs | 4 +- tests/ui/extern/extern-foreign-crate.rs | 4 +- tests/ui/extern/extern-methods.rs | 4 +- tests/ui/extern/extern-mod-abi.rs | 4 +- tests/ui/extern/extern-mod-ordering-exe.rs | 6 +- tests/ui/extern/extern-no-mangle.rs | 2 +- tests/ui/extern/extern-prelude-core.rs | 2 +- tests/ui/extern/extern-prelude-no-speculative.rs | 4 +- tests/ui/extern/extern-prelude-std.rs | 2 +- tests/ui/extern/extern-pub.rs | 4 +- tests/ui/extern/extern-rust.rs | 4 +- tests/ui/extern/extern-take-value.rs | 4 +- tests/ui/extern/extern-thiscall.rs | 4 +- tests/ui/extern/extern-types-field-offset.rs | 8 +- tests/ui/extern/extern-types-inherent-impl.rs | 4 +- tests/ui/extern/extern-types-manual-sync-send.rs | 2 +- tests/ui/extern/extern-types-pointer-cast.rs | 2 +- tests/ui/extern/extern-types-size_of_val.rs | 10 +- tests/ui/extern/extern-types-thin-pointer.rs | 2 +- tests/ui/extern/extern-types-trait-impl.rs | 2 +- tests/ui/extern/extern-vectorcall.rs | 8 +- tests/ui/extern/extern_fat_drop.rs | 4 +- tests/ui/extern/issue-10025.rs | 4 +- tests/ui/extern/issue-10763.rs | 4 +- tests/ui/extern/issue-10764-rpass.rs | 4 +- tests/ui/extern/issue-1251.rs | 6 +- tests/ui/extern/issue-13655.rs | 2 +- tests/ui/extern/issue-18576.rs | 6 +- ...655-allow-unwind-when-calling-panic-directly.rs | 16 +- .../issue-64655-extern-rust-must-allow-unwind.rs | 36 ++-- tests/ui/extern/issue-80074.rs | 6 +- tests/ui/extern/issue-95829.rs | 2 +- tests/ui/extern/no-mangle-associated-fn.rs | 4 +- tests/ui/extoption_env-not-defined.rs | 2 +- tests/ui/fact.rs | 2 +- tests/ui/feature-gates/allow-features-empty.rs | 2 +- tests/ui/feature-gates/allow-features.rs | 2 +- tests/ui/feature-gates/bench.rs | 2 +- tests/ui/feature-gates/env-flag.rs | 2 +- .../feature-gate-abi-avr-interrupt.rs | 4 +- .../feature-gate-abi-msp430-interrupt.rs | 4 +- .../feature-gate-abi-riscv-interrupt.rs | 4 +- .../feature-gate-abi-x86-interrupt.rs | 4 +- tests/ui/feature-gates/feature-gate-abi.rs | 2 +- tests/ui/feature-gates/feature-gate-abi_ptx.rs | 4 +- .../feature-gate-alloc-error-handler.rs | 2 +- tests/ui/feature-gates/feature-gate-asm_const.rs | 2 +- .../feature-gate-asm_experimental_arch.rs | 4 +- tests/ui/feature-gates/feature-gate-asm_unwind.rs | 2 +- .../feature-gate-cfg-target-thread-local.rs | 4 +- tests/ui/feature-gates/feature-gate-check-cfg.rs | 2 +- .../feature-gate-closure_track_caller.rs | 2 +- .../feature-gates/feature-gate-const-indexing.rs | 2 +- .../feature-gate-const_refs_to_cell.rs | 2 +- tests/ui/feature-gates/feature-gate-coroutines.rs | 4 +- tests/ui/feature-gates/feature-gate-gen_blocks.rs | 4 +- .../feature-gate-generic_arg_infer.rs | 4 +- .../feature-gate-multiple_supertrait_upcastable.rs | 2 +- .../feature-gates/feature-gate-naked_functions.rs | 2 +- ...re-gate-non_exhaustive_omitted_patterns_lint.rs | 2 +- .../feature-gate-proc_macro_byte_character.rs | 2 +- .../feature-gate-proc_macro_c_str_literals.rs | 4 +- .../feature-gate-public_private_dependencies.rs | 4 +- .../feature-gate-return_type_notation.rs | 6 +- tests/ui/feature-gates/feature-gate-simd.rs | 2 +- .../feature-gate-strict_provenance.rs | 2 +- .../feature-gate-test_unstable_lint.rs | 2 +- .../feature-gate-trivial_bounds-lint.rs | 2 +- tests/ui/feature-gates/feature-gate-try_blocks.rs | 2 +- .../feature-gate-type_alias_impl_trait.rs | 2 +- .../feature-gate-type_privacy_lints.rs | 2 +- .../feature-gate-unsafe_pin_internals.rs | 2 +- tests/ui/feature-gates/feature-gate-vectorcall.rs | 4 +- tests/ui/feature-gates/feature-gate-wasm_abi.rs | 4 +- .../feature-gates/feature-gate-yeet_expr-in-cfg.rs | 2 +- tests/ui/feature-gates/feature-gate-yeet_expr.rs | 2 +- .../issue-43106-gating-of-builtin-attrs.rs | 2 +- .../issue-43106-gating-of-deprecated.rs | 2 +- .../issue-43106-gating-of-macro_escape.rs | 2 +- .../feature-gates/soft-syntax-gates-with-errors.rs | 2 +- .../soft-syntax-gates-without-errors.rs | 2 +- tests/ui/feature-gates/test-listing-format-json.rs | 14 +- tests/ui/filter-block-view-items.rs | 4 +- tests/ui/fmt/auxiliary/format-string-proc-macro.rs | 4 +- .../format-args-capture-first-literal-is-macro.rs | 2 +- .../format-args-capture-from-pm-first-arg-macro.rs | 2 +- tests/ui/fmt/format-args-capture-issue-106408.rs | 4 +- .../fmt/format-args-capture-macro-hygiene-pass.rs | 2 +- tests/ui/fmt/format-args-capture-macro-hygiene.rs | 2 +- tests/ui/fmt/format-args-capture.rs | 2 +- tests/ui/fmt/format-expanded-string.rs | 2 +- tests/ui/fmt/format-with-yield-point.rs | 4 +- tests/ui/fmt/indoc-issue-106408.rs | 4 +- tests/ui/fmt/issue-23781.rs | 2 +- tests/ui/fmt/respanned-literal-issue-106191.rs | 2 +- .../ui/fmt/struct-field-as-captured-argument.fixed | 2 +- tests/ui/fmt/struct-field-as-captured-argument.rs | 2 +- tests/ui/fn/dyn-fn-alignment.rs | 2 +- tests/ui/fn/expr-fn-panic.rs | 6 +- tests/ui/fn/expr-fn.rs | 2 +- tests/ui/fn/fn-bad-block-type.rs | 2 +- tests/ui/fn/fn-item-lifetime-bounds.rs | 4 +- tests/ui/fn/fn-ptr-trait-int-float-infer-var.rs | 2 +- tests/ui/fn/fn-ptr-trait.rs | 2 +- tests/ui/fn/fn-recover-return-sign.fixed | 2 +- tests/ui/fn/fn-recover-return-sign.rs | 2 +- tests/ui/fn/fun-call-variants.rs | 2 +- .../fn/implied-bounds-impl-header-projections.rs | 4 +- .../fn/implied-bounds-unnorm-associated-type-2.rs | 2 +- .../fn/implied-bounds-unnorm-associated-type-3.rs | 2 +- .../ui/fn/implied-bounds-unnorm-associated-type.rs | 2 +- tests/ui/fn/issue-3904.rs | 2 +- tests/ui/fn/keyword-order.rs | 2 +- tests/ui/fn/nested-function-names-issue-8587.rs | 2 +- .../fn/signature-error-reporting-under-verbose.rs | 2 +- tests/ui/fn/suggest-return-future.rs | 2 +- tests/ui/for-loop-while/auto-loop.rs | 2 +- tests/ui/for-loop-while/break-value.rs | 4 +- tests/ui/for-loop-while/break.rs | 2 +- .../cleanup-rvalue-during-if-and-while.rs | 2 +- tests/ui/for-loop-while/for-destruct.rs | 2 +- tests/ui/for-loop-while/for-loop-goofiness.rs | 2 +- tests/ui/for-loop-while/for-loop-has-unit-body.rs | 2 +- tests/ui/for-loop-while/for-loop-into-iterator.rs | 2 +- .../for-loop-lifetime-of-unbound-values.rs | 2 +- tests/ui/for-loop-while/for-loop-macro.rs | 2 +- .../ui/for-loop-while/for-loop-mut-ref-element.rs | 2 +- tests/ui/for-loop-while/for-loop-no-std.rs | 2 +- tests/ui/for-loop-while/for-loop-panic.rs | 2 +- ...loop-unconstrained-element-type-i32-fallback.rs | 2 +- .../foreach-external-iterators-break.rs | 2 +- ...ach-external-iterators-hashmap-break-restart.rs | 2 +- .../foreach-external-iterators-hashmap.rs | 2 +- .../foreach-external-iterators-loop.rs | 2 +- .../foreach-external-iterators-nested.rs | 2 +- .../for-loop-while/foreach-external-iterators.rs | 2 +- tests/ui/for-loop-while/foreach-nested.rs | 2 +- tests/ui/for-loop-while/foreach-put-structured.rs | 2 +- .../ui/for-loop-while/foreach-simple-outer-slot.rs | 2 +- tests/ui/for-loop-while/issue-1257.rs | 4 +- tests/ui/for-loop-while/issue-2216.rs | 2 +- tests/ui/for-loop-while/issue-51345.rs | 2 +- tests/ui/for-loop-while/issue-69841.rs | 2 +- tests/ui/for-loop-while/label_break_value.rs | 2 +- tests/ui/for-loop-while/labeled-break.rs | 4 +- tests/ui/for-loop-while/linear-for-loop.rs | 2 +- .../liveness-assign-imm-local-after-loop.rs | 4 +- tests/ui/for-loop-while/liveness-loop-break.rs | 2 +- tests/ui/for-loop-while/liveness-move-in-loop.rs | 4 +- tests/ui/for-loop-while/long-while.rs | 4 +- tests/ui/for-loop-while/loop-break-cont-1.rs | 2 +- tests/ui/for-loop-while/loop-break-cont.rs | 2 +- tests/ui/for-loop-while/loop-break-value.rs | 2 +- tests/ui/for-loop-while/loop-diverges.rs | 4 +- tests/ui/for-loop-while/loop-label-shadowing.rs | 4 +- .../ui/for-loop-while/loop-labeled-break-value.rs | 4 +- .../loop-no-reinit-needed-post-bot.rs | 4 +- tests/ui/for-loop-while/loop-scope.rs | 2 +- tests/ui/for-loop-while/while-cont.rs | 2 +- tests/ui/for-loop-while/while-flow-graph.rs | 4 +- tests/ui/for-loop-while/while-label.rs | 2 +- tests/ui/for-loop-while/while-let-2.rs | 2 +- tests/ui/for-loop-while/while-let.rs | 2 +- .../ui/for-loop-while/while-loop-constraints-2.rs | 2 +- tests/ui/for-loop-while/while-prelude-drop.rs | 2 +- tests/ui/for-loop-while/while-with-break.rs | 2 +- tests/ui/for-loop-while/while.rs | 2 +- tests/ui/for/issue-20605.rs | 4 +- tests/ui/foreign/foreign-fn-linkname.rs | 6 +- tests/ui/foreign/foreign-int-types.rs | 2 +- tests/ui/foreign/foreign-mod-src/inner.rs | 2 +- tests/ui/foreign/foreign-mod-unused-const.rs | 4 +- tests/ui/foreign/foreign-pub-super.rs | 2 +- tests/ui/foreign/foreign-src/foreign.rs | 2 +- tests/ui/foreign/foreign-truncated-arguments.rs | 4 +- tests/ui/foreign/foreign2.rs | 6 +- .../issue-74120-lowering-of-ffi-block-bodies.rs | 2 +- .../ui/foreign/issue-99276-same-type-lifetimes.rs | 2 +- tests/ui/foreign/nil-decl-in-foreign.rs | 4 +- tests/ui/format-no-std.rs | 4 +- tests/ui/fun-indirect-call.rs | 2 +- .../function-pointer-comparison-issue-54685.rs | 4 +- tests/ui/function-pointer/issue-102289.rs | 2 +- tests/ui/function-pointer/sized-ret-with-binder.rs | 2 +- .../call-closure-from-overloaded-op.rs | 2 +- .../capture-clauses-boxed-closures.rs | 2 +- .../capture-clauses-unboxed-closures.rs | 2 +- tests/ui/functions-closures/clone-closure.rs | 2 +- .../closure-bounds-can-capture-chan.rs | 4 +- .../expect-infer-supply-two-infers.rs | 2 +- .../closure-expected-type/issue-38714.rs | 2 +- .../supply-just-return-type.rs | 2 +- .../closure-expected-type/supply-nothing.rs | 2 +- tests/ui/functions-closures/closure-immediate.rs | 2 +- tests/ui/functions-closures/closure-inference.rs | 2 +- tests/ui/functions-closures/closure-inference2.rs | 2 +- tests/ui/functions-closures/closure-reform.rs | 2 +- .../closure-returning-closure.rs | 2 +- .../functions-closures/closure-to-fn-coercion.rs | 2 +- .../closure_to_fn_coercion-expected-types.rs | 2 +- tests/ui/functions-closures/copy-closure.rs | 2 +- tests/ui/functions-closures/fn-abi.rs | 6 +- tests/ui/functions-closures/fn-bare-assign.rs | 2 +- .../functions-closures/fn-bare-coerce-to-block.rs | 4 +- tests/ui/functions-closures/fn-bare-item.rs | 2 +- tests/ui/functions-closures/fn-bare-size.rs | 2 +- tests/ui/functions-closures/fn-bare-spawn.rs | 2 +- tests/ui/functions-closures/fn-coerce-field.rs | 4 +- tests/ui/functions-closures/fn-item-type-cast.rs | 2 +- tests/ui/functions-closures/fn-item-type-coerce.rs | 4 +- .../functions-closures/fn-item-type-zero-sized.rs | 2 +- tests/ui/functions-closures/fn-lval.rs | 4 +- tests/ui/functions-closures/fn-type-infer.rs | 4 +- .../implied-bounds-closure-arg-outlives.rs | 2 +- .../nullable-pointer-opt-closures.rs | 2 +- .../parallel-codegen-closures.rs | 4 +- tests/ui/functions-closures/return-from-closure.rs | 2 +- .../anonymize-bound-vars.rs | 2 +- .../assume-gat-normalization-for-nested-goals.rs | 2 +- .../bugs/hrtb-implied-1.rs | 4 +- .../bugs/hrtb-implied-2.rs | 4 +- .../generic-associated-types/bugs/issue-100013.rs | 6 +- .../generic-associated-types/bugs/issue-80626.rs | 2 +- .../generic-associated-types/bugs/issue-87735.rs | 4 +- .../generic-associated-types/bugs/issue-87755.rs | 4 +- .../generic-associated-types/bugs/issue-87803.rs | 4 +- .../generic-associated-types/bugs/issue-88382.rs | 4 +- .../generic-associated-types/bugs/issue-88460.rs | 2 +- .../generic-associated-types/bugs/issue-88526.rs | 4 +- .../generic-associated-types/bugs/issue-91762.rs | 4 +- tests/ui/generic-associated-types/collections.rs | 2 +- .../const-generics-gat-in-trait-return-type-1.rs | 2 +- .../const-generics-gat-in-trait-return-type-2.rs | 2 +- .../const-generics-gat-in-trait-return-type-3.rs | 2 +- .../construct_with_other_type.rs | 2 +- .../generic-associated-types/cross-crate-bounds.rs | 4 +- .../extended/lending_iterator.rs | 6 +- .../extended/lending_iterator_2.rs | 6 +- .../gat-bounds-normalize-pred.rs | 2 +- .../generic-associated-types/gat-in-trait-path.rs | 6 +- .../generic-associated-type-bounds.rs | 2 +- .../higher-ranked-self-impl-requirement.rs | 2 +- .../ui/generic-associated-types/impl_bounds_ok.rs | 2 +- tests/ui/generic-associated-types/issue-102114.rs | 4 +- tests/ui/generic-associated-types/issue-102333.rs | 2 +- .../issue-58694-parameter-out-of-range.rs | 2 +- .../issue-62326-parameter-out-of-range.rs | 2 +- tests/ui/generic-associated-types/issue-67424.rs | 2 +- .../generic-associated-types/issue-67510-pass.rs | 6 +- tests/ui/generic-associated-types/issue-68648-1.rs | 2 +- .../generic-associated-types/issue-68649-pass.rs | 2 +- tests/ui/generic-associated-types/issue-68653.rs | 2 +- tests/ui/generic-associated-types/issue-70303.rs | 2 +- tests/ui/generic-associated-types/issue-76407.rs | 2 +- tests/ui/generic-associated-types/issue-76535.rs | 2 +- tests/ui/generic-associated-types/issue-76826.rs | 2 +- .../issue-78113-lifetime-mismatch-dyn-trait-box.rs | 2 +- tests/ui/generic-associated-types/issue-78671.rs | 2 +- tests/ui/generic-associated-types/issue-79422.rs | 2 +- .../issue-80433-reduced.rs | 2 +- tests/ui/generic-associated-types/issue-81487.rs | 2 +- tests/ui/generic-associated-types/issue-84931.rs | 2 +- tests/ui/generic-associated-types/issue-85921.rs | 2 +- tests/ui/generic-associated-types/issue-86218-2.rs | 2 +- tests/ui/generic-associated-types/issue-86218.rs | 2 +- tests/ui/generic-associated-types/issue-86483.rs | 2 +- tests/ui/generic-associated-types/issue-86787.rs | 2 +- tests/ui/generic-associated-types/issue-87429-2.rs | 2 +- .../issue-87429-associated-type-default.rs | 2 +- .../issue-87429-specialization.rs | 2 +- tests/ui/generic-associated-types/issue-87429.rs | 2 +- tests/ui/generic-associated-types/issue-87748.rs | 2 +- tests/ui/generic-associated-types/issue-87750.rs | 2 +- tests/ui/generic-associated-types/issue-88287.rs | 2 +- .../ui/generic-associated-types/issue-88360.fixed | 2 +- tests/ui/generic-associated-types/issue-88360.rs | 2 +- tests/ui/generic-associated-types/issue-88405.rs | 2 +- tests/ui/generic-associated-types/issue-88459.rs | 2 +- tests/ui/generic-associated-types/issue-89008.rs | 4 +- tests/ui/generic-associated-types/issue-89352.rs | 2 +- .../generic-associated-types/issue-90014-tait.rs | 4 +- .../generic-associated-types/issue-90014-tait2.rs | 4 +- tests/ui/generic-associated-types/issue-90014.rs | 2 +- tests/ui/generic-associated-types/issue-90729.rs | 2 +- tests/ui/generic-associated-types/issue-92096.rs | 2 +- tests/ui/generic-associated-types/issue-92280.rs | 2 +- tests/ui/generic-associated-types/issue-92954.rs | 2 +- tests/ui/generic-associated-types/issue-93141.rs | 2 +- tests/ui/generic-associated-types/issue-93262.rs | 2 +- tests/ui/generic-associated-types/issue-93340.rs | 2 +- tests/ui/generic-associated-types/issue-93341.rs | 2 +- tests/ui/generic-associated-types/issue-93342.rs | 2 +- tests/ui/generic-associated-types/issue-93874.rs | 2 +- tests/ui/generic-associated-types/iterable.rs | 2 +- .../generic-associated-types/missing-bounds.fixed | 2 +- .../ui/generic-associated-types/missing-bounds.rs | 2 +- .../generic-associated-types/missing-item-sugg.rs | 2 +- .../missing-where-clause-on-trait.rs | 2 +- .../parse/in-trait-impl.rs | 4 +- .../ui/generic-associated-types/parse/in-trait.rs | 4 +- .../ui/generic-associated-types/pointer_family.rs | 2 +- .../generic-associated-types/self-outlives-lint.rs | 2 +- .../generic-associated-types/streaming_iterator.rs | 2 +- tests/ui/generic-associated-types/trait-objects.rs | 2 +- .../variance_constraints.rs | 2 +- .../associated-const-equality.rs | 2 +- tests/ui/generic-const-items/basic.rs | 2 +- tests/ui/generic-const-items/const-trait-impl.rs | 2 +- tests/ui/generic-const-items/evaluatable-bounds.rs | 4 +- .../misplaced-where-clause.fixed | 2 +- .../generic-const-items/misplaced-where-clause.rs | 2 +- tests/ui/generic-const-items/recursive.rs | 4 +- tests/ui/generics/autobind.rs | 2 +- tests/ui/generics/foreign-generic-mismatch.rs | 2 +- tests/ui/generics/generic-alias-unique.rs | 2 +- .../generic-default-type-params-cross-crate.rs | 6 +- tests/ui/generics/generic-default-type-params.rs | 2 +- tests/ui/generics/generic-derived-type.rs | 2 +- tests/ui/generics/generic-exterior-unique.rs | 2 +- tests/ui/generics/generic-extern-mangle.rs | 2 +- tests/ui/generics/generic-fn-infer.rs | 2 +- tests/ui/generics/generic-fn-twice.rs | 4 +- tests/ui/generics/generic-fn-unique.rs | 2 +- tests/ui/generics/generic-fn.rs | 2 +- tests/ui/generics/generic-ivec-leak.rs | 2 +- tests/ui/generics/generic-newtype-struct.rs | 4 +- tests/ui/generics/generic-no-mangle.fixed | 2 +- tests/ui/generics/generic-no-mangle.rs | 2 +- tests/ui/generics/generic-object.rs | 2 +- tests/ui/generics/generic-param-attrs.rs | 2 +- tests/ui/generics/generic-recursive-tag.rs | 2 +- tests/ui/generics/generic-static-methods.rs | 2 +- tests/ui/generics/generic-tag-corruption.rs | 4 +- tests/ui/generics/generic-tag-local.rs | 4 +- tests/ui/generics/generic-tag-match.rs | 2 +- tests/ui/generics/generic-tag-values.rs | 2 +- tests/ui/generics/generic-tag.rs | 4 +- tests/ui/generics/generic-temporary.rs | 2 +- tests/ui/generics/generic-tup.rs | 2 +- tests/ui/generics/generic-type-synonym.rs | 4 +- tests/ui/generics/generic-type.rs | 2 +- tests/ui/generics/generic-unique.rs | 2 +- tests/ui/generics/issue-1112.rs | 2 +- tests/ui/generics/issue-2936.rs | 2 +- tests/ui/generics/issue-32498.rs | 2 +- tests/ui/generics/issue-333.rs | 2 +- tests/ui/generics/issue-59508.fixed | 2 +- tests/ui/generics/issue-59508.rs | 2 +- tests/ui/generics/issue-94432-garbage-ice.rs | 6 +- tests/ui/generics/issue-94923.rs | 4 +- tests/ui/generics/issue-95208-ignore-qself.fixed | 2 +- tests/ui/generics/issue-95208-ignore-qself.rs | 2 +- tests/ui/generics/issue-95208.fixed | 2 +- tests/ui/generics/issue-95208.rs | 2 +- tests/ui/generics/mid-path-type-params.rs | 4 +- .../post_monomorphization_error_backtrace.rs | 2 +- tests/ui/generics/type-params-in-for-each.rs | 4 +- tests/ui/global-scope.rs | 2 +- .../half-open-range-pats-exhaustive-pass.rs | 2 +- .../half-open-range-pats-semantics.rs | 2 +- .../half-open-range-pats-syntactic-pass.rs | 2 +- tests/ui/half-open-range-patterns/pat-tuple-4.rs | 2 +- .../range_pat_interactions0.rs | 2 +- .../slice_pattern_syntax_problem2.rs | 2 +- tests/ui/hashmap/hashmap-capacity-overflow.rs | 6 +- tests/ui/hashmap/hashmap-memory.rs | 4 +- tests/ui/hello.rs | 12 +- tests/ui/hello_world/main.rs | 2 +- tests/ui/higher-ranked/leak-check-in-selection.rs | 6 +- tests/ui/higher-ranked/subtype/hr-subtype.rs | 46 ++--- .../higher-ranked/subtype/placeholder-pattern.rs | 2 +- tests/ui/higher-ranked/subtype/return-static.rs | 2 +- tests/ui/higher-ranked/trait-bounds/complex.rs | 2 +- tests/ui/higher-ranked/trait-bounds/fn-ptr.rs | 6 +- tests/ui/higher-ranked/trait-bounds/future.rs | 22 +-- .../trait-bounds/hang-on-deeply-nested-dyn.rs | 2 +- .../hrtb-binder-levels-in-object-types.rs | 4 +- .../hrtb-debruijn-object-types-in-closures.rs | 4 +- .../hrtb-exists-forall-trait-covariant.rs | 2 +- .../trait-bounds/hrtb-fn-like-trait-object.rs | 2 +- .../trait-bounds/hrtb-fn-like-trait.rs | 2 +- .../higher-ranked/trait-bounds/hrtb-opt-in-copy.rs | 2 +- tests/ui/higher-ranked/trait-bounds/hrtb-parse.rs | 4 +- .../hrtb-precedence-of-plus-where-clause.rs | 4 +- .../trait-bounds/hrtb-precedence-of-plus.rs | 4 +- .../trait-bounds/hrtb-resolve-lifetime.rs | 4 +- .../hrtb-trait-object-paren-notation.rs | 2 +- .../hrtb-trait-object-passed-to-closure.rs | 4 +- .../trait-bounds/hrtb-type-outlives.rs | 2 +- .../trait-bounds/hrtb-unboxed-closure-trait.rs | 2 +- .../ui/higher-ranked/trait-bounds/issue-100689.rs | 2 +- .../ui/higher-ranked/trait-bounds/issue-102899.rs | 2 +- tests/ui/higher-ranked/trait-bounds/issue-30786.rs | 2 +- .../issue-36139-normalize-closure-sig.rs | 2 +- tests/ui/higher-ranked/trait-bounds/issue-39292.rs | 2 +- tests/ui/higher-ranked/trait-bounds/issue-42114.rs | 2 +- tests/ui/higher-ranked/trait-bounds/issue-43623.rs | 2 +- tests/ui/higher-ranked/trait-bounds/issue-57639.rs | 2 +- tests/ui/higher-ranked/trait-bounds/issue-60283.rs | 2 +- tests/ui/higher-ranked/trait-bounds/issue-88446.rs | 2 +- .../issue-88586-hr-self-outlives-in-trait-def.rs | 2 +- tests/ui/higher-ranked/trait-bounds/issue-90177.rs | 2 +- tests/ui/higher-ranked/trait-bounds/issue-95034.rs | 4 +- tests/ui/higher-ranked/trait-bounds/issue-95230.rs | 8 +- .../normalize-under-binder/issue-44005.rs | 2 +- .../normalize-under-binder/issue-56556.rs | 2 +- .../normalize-under-binder/issue-62529-1.rs | 2 +- .../normalize-under-binder/issue-62529-2.rs | 2 +- .../normalize-under-binder/issue-62529-4.rs | 2 +- .../normalize-under-binder/issue-62529-5.rs | 2 +- .../normalize-under-binder/issue-62529-6.rs | 2 +- .../normalize-under-binder/issue-70120.rs | 2 +- .../normalize-under-binder/issue-71955.rs | 2 +- .../normalize-under-binder/issue-74261.rs | 2 +- .../normalize-under-binder/issue-76956.rs | 2 +- .../normalize-under-binder/issue-80706.rs | 4 +- .../normalize-under-binder/issue-80956.rs | 2 +- .../normalize-under-binder/issue-81809.rs | 2 +- .../normalize-under-binder/issue-89436.rs | 2 +- .../normalize-under-binder/issue-90612.rs | 2 +- .../normalize-under-binder/issue-90638.rs | 2 +- .../normalize-under-binder/issue-90875.rs | 2 +- .../normalize-under-binder/issue-90950.rs | 2 +- .../norm-before-method-resolution.rs | 2 +- tests/ui/hygiene/assoc_ty_bindings.rs | 2 +- tests/ui/hygiene/auxiliary/def-site-async-await.rs | 2 +- tests/ui/hygiene/auxiliary/opaque-hygiene.rs | 4 +- tests/ui/hygiene/cross-crate-codegen-attrs.rs | 4 +- tests/ui/hygiene/cross-crate-define-and-use.rs | 4 +- tests/ui/hygiene/cross-crate-fields.rs | 4 +- tests/ui/hygiene/cross-crate-glob-hygiene.rs | 2 +- tests/ui/hygiene/cross-crate-methods.rs | 4 +- tests/ui/hygiene/cross-crate-name-collision.rs | 4 +- tests/ui/hygiene/cross-crate-name-hiding-2.rs | 2 +- tests/ui/hygiene/cross-crate-name-hiding.rs | 2 +- tests/ui/hygiene/cross-crate-redefine.rs | 2 +- tests/ui/hygiene/cross-crate-variants.rs | 4 +- tests/ui/hygiene/dollar-crate-modern.rs | 4 +- tests/ui/hygiene/eager-from-opaque-2.rs | 2 +- tests/ui/hygiene/eager-from-opaque.rs | 2 +- .../extern-prelude-from-opaque-fail-2018.rs | 2 +- .../ui/hygiene/extern-prelude-from-opaque-fail.rs | 2 +- tests/ui/hygiene/format-args.rs | 2 +- tests/ui/hygiene/generic_params.rs | 2 +- tests/ui/hygiene/hir-res-hygiene.rs | 6 +- tests/ui/hygiene/hygiene-dodging-1.rs | 2 +- tests/ui/hygiene/hygiene.rs | 2 +- tests/ui/hygiene/hygienic-labels-in-let.rs | 2 +- tests/ui/hygiene/hygienic-labels.rs | 2 +- tests/ui/hygiene/intercrate.rs | 2 +- tests/ui/hygiene/issue-15221.rs | 4 +- tests/ui/hygiene/issue-29746.rs | 2 +- tests/ui/hygiene/issue-32922.rs | 2 +- tests/ui/hygiene/issue-40847.rs | 2 +- tests/ui/hygiene/issue-44128.rs | 2 +- tests/ui/hygiene/issue-47311.rs | 2 +- tests/ui/hygiene/issue-47312.rs | 2 +- tests/ui/hygiene/issue-61574-const-parameters.rs | 2 +- .../ui/hygiene/issue-77523-def-site-async-await.rs | 6 +- tests/ui/hygiene/items.rs | 2 +- tests/ui/hygiene/lambda-var-hygiene.rs | 2 +- tests/ui/hygiene/legacy_interaction.rs | 4 +- tests/ui/hygiene/lexical.rs | 2 +- tests/ui/hygiene/local_inner_macros.rs | 4 +- tests/ui/hygiene/macro-metavars-legacy.rs | 2 +- tests/ui/hygiene/macro-metavars-transparent.rs | 2 +- tests/ui/hygiene/nested-dollar-crate.rs | 6 +- tests/ui/hygiene/no_implicit_prelude-2018.rs | 2 +- tests/ui/hygiene/no_implicit_prelude-2021.rs | 4 +- tests/ui/hygiene/panic-location.rs | 6 +- tests/ui/hygiene/prelude-import-hygiene.rs | 8 +- tests/ui/hygiene/privacy-early.rs | 2 +- tests/ui/hygiene/specialization.rs | 2 +- .../ui/hygiene/stdlib-prelude-from-opaque-early.rs | 4 +- .../ui/hygiene/stdlib-prelude-from-opaque-late.rs | 2 +- tests/ui/hygiene/thread-local-not-in-prelude.rs | 2 +- tests/ui/hygiene/trait_items-2.rs | 2 +- tests/ui/hygiene/traits-in-scope.rs | 2 +- tests/ui/hygiene/transparent-basic.rs | 4 +- tests/ui/hygiene/unpretty-debug.rs | 6 +- tests/ui/hygiene/unpretty-debug.stdout | 6 +- tests/ui/hygiene/wrap_unhygienic_example.rs | 6 +- tests/ui/hygiene/xcrate.rs | 4 +- .../mutability-mismatch-arg.fixed | 2 +- .../illegal-sized-bound/mutability-mismatch-arg.rs | 2 +- tests/ui/illegal-ufcs-drop.fixed | 2 +- tests/ui/illegal-ufcs-drop.rs | 2 +- tests/ui/impl-header-lifetime-elision/bare_type.rs | 2 +- .../constant-used-as-arraylen.rs | 2 +- .../explicit-and-elided-same-header.rs | 2 +- .../impl-header-lifetime-elision/inherent-impl.rs | 2 +- .../path-underscore.rs | 2 +- .../impl-header-lifetime-elision/ref-underscore.rs | 2 +- .../trait-underscore.rs | 2 +- tests/ui/impl-inherent-non-conflict.rs | 2 +- tests/ui/impl-not-adjacent-to-type.rs | 2 +- tests/ui/impl-privacy-xc-1.rs | 6 +- .../associated-impl-trait-type-generic-trait.rs | 2 +- .../associated-impl-trait-type-issue-114325.rs | 4 +- .../associated-impl-trait-type-trivial.rs | 2 +- tests/ui/impl-trait/associated-impl-trait-type.rs | 2 +- tests/ui/impl-trait/async_scope_creep.rs | 6 +- tests/ui/impl-trait/auto-trait-coherence.rs | 4 +- tests/ui/impl-trait/auto-trait-leak-rpass.rs | 2 +- tests/ui/impl-trait/autoderef.rs | 6 +- tests/ui/impl-trait/bivariant-lifetime-liveness.rs | 2 +- tests/ui/impl-trait/bound-normalization-fail.rs | 2 +- tests/ui/impl-trait/bound-normalization-pass.rs | 6 +- tests/ui/impl-trait/bounds_regression.rs | 2 +- .../impl-trait/can-return-unconstrained-closure.rs | 2 +- tests/ui/impl-trait/closure-calling-parent-fn.rs | 2 +- tests/ui/impl-trait/closure-in-impl-trait-arg.rs | 2 +- tests/ui/impl-trait/closure-in-impl-trait.rs | 2 +- tests/ui/impl-trait/cross-return-site-inference.rs | 2 +- .../impl-trait/deduce-signature-from-supertrait.rs | 2 +- tests/ui/impl-trait/defined-by-trait-resolution.rs | 2 +- tests/ui/impl-trait/deprecated_annotation.rs | 2 +- tests/ui/impl-trait/divergence.rs | 2 +- .../dyn-trait-elided-two-inputs-assoc.rs | 2 +- .../dyn-trait-elided-two-inputs-param.rs | 2 +- .../dyn-trait-elided-two-inputs-ref-assoc.rs | 2 +- .../dyn-trait-elided-two-inputs-ref-param.rs | 2 +- .../ui/impl-trait/eagerly-reveal-in-local-body.rs | 4 +- tests/ui/impl-trait/equal-hidden-lifetimes.rs | 2 +- tests/ui/impl-trait/equality-in-canonical-query.rs | 22 +-- tests/ui/impl-trait/equality-rpass.rs | 2 +- tests/ui/impl-trait/erased-regions-in-hidden-ty.rs | 8 +- tests/ui/impl-trait/example-calendar.rs | 2 +- tests/ui/impl-trait/example-st.rs | 2 +- .../const-args.rs | 2 +- .../explicit-generic-args.rs | 2 +- .../issue-87718.rs | 2 +- tests/ui/impl-trait/extra-impl-in-trait-impl.fixed | 2 +- tests/ui/impl-trait/extra-impl-in-trait-impl.rs | 2 +- tests/ui/impl-trait/extra-item.rs | 4 +- tests/ui/impl-trait/fallback.rs | 2 +- tests/ui/impl-trait/feature-self-return-type.rs | 2 +- .../fresh-lifetime-from-bare-trait-obj-114664.rs | 4 +- .../generic-with-implicit-hrtb-without-dyn.rs | 4 +- tests/ui/impl-trait/hidden-type-is-opaque.rs | 2 +- tests/ui/impl-trait/impl-subtyper.rs | 2 +- tests/ui/impl-trait/impl-subtyper2.rs | 2 +- tests/ui/impl-trait/impl-trait-plus-priority.rs | 2 +- tests/ui/impl-trait/impl_fn_associativity.rs | 2 +- tests/ui/impl-trait/implicit-capture-late.rs | 2 +- tests/ui/impl-trait/in-ctfe/array-len-size-of.rs | 2 +- tests/ui/impl-trait/in-ctfe/array-len.rs | 2 +- tests/ui/impl-trait/in-ctfe/enum-discr.rs | 2 +- .../in-ctfe/fully_monomorphic_const_eval.rs | 2 +- .../ui/impl-trait/in-ctfe/match-arm-exhaustive.rs | 2 +- .../in-trait/alias-bounds-when-not-wf.rs | 2 +- .../in-trait/anonymize-binders-for-refine.rs | 4 +- .../in-trait/assumed-wf-bounds-in-impl.rs | 4 +- tests/ui/impl-trait/in-trait/async-and-ret-ref.rs | 2 +- .../in-trait/box-coerce-span-in-default.rs | 2 +- tests/ui/impl-trait/in-trait/deep-match-works.rs | 2 +- .../impl-trait/in-trait/default-body-type-err-2.rs | 2 +- .../impl-trait/in-trait/default-body-with-rpit.rs | 4 +- tests/ui/impl-trait/in-trait/default-body.rs | 4 +- .../in-trait/default-method-binder-shifting.rs | 2 +- .../in-trait/default-method-constraint.rs | 2 +- tests/ui/impl-trait/in-trait/early.rs | 4 +- tests/ui/impl-trait/in-trait/encode.rs | 4 +- tests/ui/impl-trait/in-trait/foreign-dyn-error.rs | 2 +- tests/ui/impl-trait/in-trait/foreign.rs | 4 +- tests/ui/impl-trait/in-trait/gat-outlives.rs | 2 +- tests/ui/impl-trait/in-trait/issue-102301.rs | 2 +- .../in-trait/lifetime-in-associated-trait-bound.rs | 2 +- .../in-trait/method-signature-matches.rs | 4 +- .../ui/impl-trait/in-trait/nested-rpitit-bounds.rs | 2 +- tests/ui/impl-trait/in-trait/nested-rpitit.rs | 2 +- .../ui/impl-trait/in-trait/object-safety-sized.rs | 6 +- tests/ui/impl-trait/in-trait/opaque-in-impl.rs | 2 +- tests/ui/impl-trait/in-trait/opaque-variances.rs | 4 +- .../impl-trait/in-trait/outlives-in-nested-rpit.rs | 2 +- .../in-trait/placeholder-implied-bounds.rs | 2 +- tests/ui/impl-trait/in-trait/reveal.rs | 2 +- tests/ui/impl-trait/in-trait/signature-mismatch.rs | 6 +- .../in-trait/specialization-substs-remap.rs | 2 +- tests/ui/impl-trait/in-trait/success.rs | 2 +- .../impl-trait/in-trait/suggest-missing-item.fixed | 4 +- .../ui/impl-trait/in-trait/suggest-missing-item.rs | 4 +- tests/ui/impl-trait/in-trait/variances-of-gat.rs | 2 +- tests/ui/impl-trait/in-trait/where-clause.rs | 4 +- tests/ui/impl-trait/issue-100187.rs | 2 +- tests/ui/impl-trait/issue-102605.rs | 2 +- tests/ui/impl-trait/issue-103181-1.rs | 6 +- tests/ui/impl-trait/issue-103181-2.rs | 2 +- tests/ui/impl-trait/issue-103599.rs | 2 +- tests/ui/impl-trait/issue-108591.rs | 2 +- tests/ui/impl-trait/issue-108592.rs | 2 +- tests/ui/impl-trait/issue-36792.rs | 2 +- tests/ui/impl-trait/issue-46959.rs | 2 +- tests/ui/impl-trait/issue-49556.rs | 2 +- tests/ui/impl-trait/issue-49579.rs | 2 +- tests/ui/impl-trait/issue-49685.rs | 2 +- tests/ui/impl-trait/issue-51185.rs | 2 +- tests/ui/impl-trait/issue-55872-2.rs | 2 +- tests/ui/impl-trait/issue-55872-3.rs | 2 +- tests/ui/impl-trait/issue-56445.rs | 2 +- tests/ui/impl-trait/issue-68532.rs | 2 +- tests/ui/impl-trait/issue-99642-2.rs | 2 +- tests/ui/impl-trait/issue-99642.rs | 2 +- tests/ui/impl-trait/issue-99914.rs | 2 +- tests/ui/impl-trait/issues/issue-104815.rs | 2 +- tests/ui/impl-trait/issues/issue-105826.rs | 2 +- tests/ui/impl-trait/issues/issue-42479.rs | 2 +- tests/ui/impl-trait/issues/issue-49376.rs | 2 +- tests/ui/impl-trait/issues/issue-52128.rs | 2 +- tests/ui/impl-trait/issues/issue-53457.rs | 2 +- .../issues/issue-55608-captures-empty-region.rs | 2 +- .../issues/issue-57464-unexpected-regions.rs | 2 +- tests/ui/impl-trait/issues/issue-65581.rs | 2 +- tests/ui/impl-trait/issues/issue-77987.rs | 2 +- tests/ui/impl-trait/issues/issue-78722-2.rs | 2 +- tests/ui/impl-trait/issues/issue-78722.rs | 2 +- tests/ui/impl-trait/issues/issue-83919.rs | 2 +- tests/ui/impl-trait/issues/issue-86201.rs | 2 +- tests/ui/impl-trait/issues/issue-86800.rs | 14 +- tests/ui/impl-trait/issues/issue-89312.rs | 2 +- tests/ui/impl-trait/issues/issue-92305.rs | 2 +- tests/ui/impl-trait/issues/issue-93788.rs | 2 +- .../ui/impl-trait/lifetime-ambiguity-regression.rs | 2 +- tests/ui/impl-trait/lifetimes.rs | 2 +- tests/ui/impl-trait/lifetimes2.rs | 2 +- .../mapping-duplicated-lifetimes-issue-114597.rs | 4 +- .../multiple-lifetimes/inverse-bounds.rs | 4 +- .../multiple-lifetimes/multiple-lifetimes.rs | 2 +- .../ordinary-bounds-pick-original-elided.rs | 4 +- ...y-bounds-pick-original-type-alias-impl-trait.rs | 4 +- .../ordinary-bounds-pick-original.rs | 4 +- .../ordinary-bounds-pick-other.rs | 4 +- .../ordinary-bounds-unrelated.rs | 2 +- .../multiple-lifetimes/ordinary-bounds-unsuited.rs | 2 +- tests/ui/impl-trait/needs_least_region_or_bound.rs | 2 +- tests/ui/impl-trait/nested-return-type.rs | 2 +- tests/ui/impl-trait/nested-return-type2-tait.rs | 2 +- tests/ui/impl-trait/nested-return-type2-tait2.rs | 2 +- tests/ui/impl-trait/nested-return-type2-tait3.rs | 2 +- tests/ui/impl-trait/nested-return-type2.rs | 4 +- tests/ui/impl-trait/nested-return-type3-tait.rs | 2 +- tests/ui/impl-trait/nested-return-type3-tait2.rs | 2 +- tests/ui/impl-trait/nested-return-type3-tait3.rs | 2 +- tests/ui/impl-trait/nested-return-type3.rs | 2 +- tests/ui/impl-trait/nested-return-type4.rs | 2 +- .../nested-rpit-with-anonymous-lifetimes.rs | 2 +- tests/ui/impl-trait/nesting.rs | 2 +- tests/ui/impl-trait/no-method-suggested-traits.rs | 2 +- .../impl-trait/normalize-opaque-with-bound-vars.rs | 6 +- tests/ui/impl-trait/normalize-tait-in-const.rs | 2 +- .../not_general_enough_regression_106630.rs | 4 +- .../opaque-cast-field-access-in-future.rs | 2 +- tests/ui/impl-trait/private_unused.rs | 2 +- tests/ui/impl-trait/projection.rs | 2 +- tests/ui/impl-trait/question_mark.rs | 2 +- tests/ui/impl-trait/recursive-auto-trait.rs | 2 +- tests/ui/impl-trait/recursive-coroutine-boxed.rs | 6 +- .../ui/impl-trait/recursive-coroutine-indirect.rs | 6 +- .../impl-trait/recursive-impl-trait-type-direct.rs | 2 +- ...pe-alias-impl-trait-declaration-too-subtle-2.rs | 2 +- ...egion-escape-via-bound-contravariant-closure.rs | 2 +- .../region-escape-via-bound-contravariant.rs | 2 +- .../return-position-impl-trait-minimal.rs | 2 +- tests/ui/impl-trait/reveal-during-codegen.rs | 6 +- .../ui/impl-trait/rpit-assoc-pair-with-lifetime.rs | 2 +- .../ui/impl-trait/rpit/equal-lifetime-params-ok.rs | 2 +- .../static-lifetime-return-position-impl-trait.rs | 2 +- tests/ui/impl-trait/trait_resolution.rs | 2 +- .../transmute/outside-of-defining-scope.rs | 2 +- .../ui/impl-trait/two_tait_defining_each_other.rs | 6 +- .../ui/impl-trait/two_tait_defining_each_other2.rs | 4 +- .../ui/impl-trait/two_tait_defining_each_other3.rs | 6 +- tests/ui/impl-trait/type-alias-generic-param.rs | 2 +- .../impl-trait/type-alias-impl-trait-in-fn-body.rs | 2 +- tests/ui/impl-trait/unactionable_diagnostic.fixed | 2 +- tests/ui/impl-trait/unactionable_diagnostic.rs | 2 +- tests/ui/impl-trait/universal_hrtb_anon.rs | 2 +- tests/ui/impl-trait/universal_hrtb_named.rs | 2 +- .../impl-trait/universal_in_adt_in_parameters.rs | 2 +- .../universal_in_impl_trait_in_parameters.rs | 2 +- .../universal_in_trait_defn_parameters.rs | 2 +- tests/ui/impl-trait/universal_multiple_bounds.rs | 2 +- tests/ui/impl-trait/unsafety-checking-cycle.rs | 2 +- tests/ui/impl-trait/variance.rs | 6 +- tests/ui/impl-trait/wf-eval-order.rs | 2 +- tests/ui/impl-trait/xcrate.rs | 4 +- tests/ui/impl-trait/xcrate_simple.rs | 4 +- tests/ui/implied-bounds/bevy_world_query.rs | 2 +- tests/ui/implied-bounds/gluon_salsa.rs | 2 +- .../hrlt-implied-trait-bounds-roundtrip.rs | 2 +- tests/ui/implied-bounds/ice-unbound-region-vars.rs | 2 +- ...ied-bounds-entailment-wf-vars-issue-114783-1.rs | 2 +- ...ied-bounds-entailment-wf-vars-issue-114783-2.rs | 2 +- ...ed-bounds-on-nested-references-plus-variance.rs | 4 +- .../implied-bounds-on-trait-hierarchy-2.rs | 4 +- .../implied-bounds-unconstrained-1.rs | 2 +- .../implied-bounds-unconstrained-2.rs | 2 +- .../implied_bounds_entailment_alias_var.rs | 2 +- .../implied_bounds_entailment_skip_non_outlives.rs | 2 +- tests/ui/implied-bounds/issue-101951.rs | 2 +- tests/ui/implied-bounds/issue-110161.rs | 2 +- tests/ui/implied-bounds/normalization-nested.rs | 12 +- .../normalization-placeholder-leak.rs | 6 +- .../normalization-preserve-equality.rs | 8 +- tests/ui/implied-bounds/normalization.rs | 2 +- .../implied-bounds/trait-where-clause-implied.rs | 2 +- tests/ui/imports/ambiguous-1.rs | 2 +- tests/ui/imports/ambiguous-10.rs | 2 +- tests/ui/imports/ambiguous-11.rs | 2 +- tests/ui/imports/ambiguous-12.rs | 2 +- tests/ui/imports/ambiguous-13.rs | 2 +- tests/ui/imports/ambiguous-14.rs | 2 +- tests/ui/imports/ambiguous-15.rs | 2 +- tests/ui/imports/ambiguous-16.rs | 2 +- tests/ui/imports/ambiguous-17.rs | 2 +- tests/ui/imports/ambiguous-2.rs | 4 +- tests/ui/imports/ambiguous-3.rs | 2 +- tests/ui/imports/ambiguous-4-extern.rs | 2 +- tests/ui/imports/ambiguous-4.rs | 4 +- tests/ui/imports/ambiguous-5.rs | 2 +- tests/ui/imports/ambiguous-6.rs | 4 +- tests/ui/imports/ambiguous-8.rs | 2 +- tests/ui/imports/ambiguous-9.rs | 2 +- tests/ui/imports/auxiliary/gensymed.rs | 2 +- .../imports/auxiliary/issue-114682-5-extern-2.rs | 6 +- tests/ui/imports/bad-import-in-nested.rs | 2 +- tests/ui/imports/empty-import-prefix-pass-2015.rs | 4 +- tests/ui/imports/empty-import-prefix-pass.rs | 4 +- tests/ui/imports/export-glob-imports-target.rs | 4 +- tests/ui/imports/export-multi.rs | 4 +- .../extern-crate-self-macro-alias.rs | 2 +- .../extern-crate-self-macro-item.rs | 2 +- .../extern-crate-self-macro-self.rs | 2 +- .../extern-crate-self/extern-crate-self-pass.rs | 2 +- tests/ui/imports/extern-crate-used.rs | 2 +- ...xtern-prelude-extern-crate-absolute-expanded.rs | 4 +- .../ui/imports/extern-prelude-extern-crate-cfg.rs | 4 +- .../ui/imports/extern-prelude-extern-crate-fail.rs | 4 +- .../ui/imports/extern-prelude-extern-crate-pass.rs | 4 +- ...rn-prelude-extern-crate-restricted-shadowing.rs | 2 +- .../extern-prelude-extern-crate-shadowing.rs | 4 +- tests/ui/imports/extern-with-ambiguous-1.rs | 4 +- tests/ui/imports/extern-with-ambiguous-2.rs | 6 +- tests/ui/imports/extern-with-ambiguous-3.rs | 6 +- tests/ui/imports/gensymed.rs | 6 +- tests/ui/imports/glob-conflict-cross-crate-1.rs | 2 +- tests/ui/imports/glob-conflict-cross-crate-2.rs | 2 +- tests/ui/imports/glob-conflict-cross-crate-3.rs | 4 +- tests/ui/imports/glob-cycles.rs | 2 +- tests/ui/imports/glob-use-std.rs | 6 +- tests/ui/imports/import-after-macro-expand-1.rs | 2 +- tests/ui/imports/import-after-macro-expand-10.rs | 2 +- tests/ui/imports/import-after-macro-expand-11.rs | 2 +- tests/ui/imports/import-after-macro-expand-12.rs | 2 +- tests/ui/imports/import-after-macro-expand-13.rs | 2 +- tests/ui/imports/import-after-macro-expand-14.rs | 2 +- tests/ui/imports/import-after-macro-expand-2.rs | 2 +- tests/ui/imports/import-after-macro-expand-3.rs | 2 +- tests/ui/imports/import-after-macro-expand-4.rs | 2 +- tests/ui/imports/import-after-macro-expand-5.rs | 4 +- tests/ui/imports/import-after-macro-expand-6.rs | 2 +- tests/ui/imports/import-after-macro-expand-7.rs | 2 +- tests/ui/imports/import-after-macro-expand-8.rs | 2 +- tests/ui/imports/import-after-macro-expand-9.rs | 2 +- tests/ui/imports/import-crate-var.rs | 2 +- .../auxiliary/crate_with_invalid_spans.rs | 4 +- .../import-crate-with-invalid-spans/main.rs | 6 +- tests/ui/imports/import-from.rs | 4 +- tests/ui/imports/import-glob-0-rpass.rs | 2 +- tests/ui/imports/import-glob-1.rs | 2 +- tests/ui/imports/import-glob-crate.rs | 2 +- tests/ui/imports/import-in-block.rs | 4 +- tests/ui/imports/import-loop-2.rs | 2 +- tests/ui/imports/import-loop.rs | 2 +- tests/ui/imports/import-prefix-macro.rs | 2 +- tests/ui/imports/import-rename.rs | 2 +- tests/ui/imports/import-rpass.rs | 2 +- tests/ui/imports/import-trailing-comma.rs | 4 +- tests/ui/imports/import2-rpass.rs | 2 +- tests/ui/imports/import3-rpass.rs | 2 +- tests/ui/imports/import3.rs | 2 +- tests/ui/imports/import4-rpass.rs | 2 +- tests/ui/imports/import4.rs | 2 +- tests/ui/imports/import5.rs | 2 +- tests/ui/imports/import6.rs | 2 +- tests/ui/imports/import7.rs | 2 +- tests/ui/imports/import8.rs | 2 +- tests/ui/imports/imports.rs | 2 +- tests/ui/imports/issue-109148.rs | 2 +- tests/ui/imports/issue-113953.rs | 2 +- tests/ui/imports/issue-114682-2.rs | 2 +- tests/ui/imports/issue-114682-3.rs | 4 +- tests/ui/imports/issue-114682-4.rs | 4 +- tests/ui/imports/issue-114682-5.rs | 10 +- tests/ui/imports/issue-114682-6.rs | 4 +- tests/ui/imports/issue-119369.rs | 4 +- tests/ui/imports/issue-18083.rs | 2 +- tests/ui/imports/issue-24883.rs | 2 +- tests/ui/imports/issue-26873-multifile/A/B.rs | 2 +- tests/ui/imports/issue-26873-multifile/A/C.rs | 2 +- tests/ui/imports/issue-26873-multifile/A/mod.rs | 2 +- .../issue-26873-multifile/issue-26873-multifile.rs | 2 +- .../issue-26873-multifile/issue-26873-onefile.rs | 2 +- tests/ui/imports/issue-26873-multifile/mod.rs | 2 +- tests/ui/imports/issue-26930.rs | 2 +- tests/ui/imports/issue-28134.rs | 2 +- tests/ui/imports/issue-32119.rs | 2 +- tests/ui/imports/issue-32222.rs | 2 +- .../issue-32354-suggest-import-rename.fixed | 2 +- .../imports/issue-32354-suggest-import-rename.rs | 2 +- tests/ui/imports/issue-36881.rs | 2 +- ...extern-crate-rename-suggestion-formatting.fixed | 2 +- ...ad-extern-crate-rename-suggestion-formatting.rs | 2 +- .../ui/imports/issue-45829/rename-extern-vs-use.rs | 2 +- .../imports/issue-45829/rename-extern-with-tab.rs | 4 +- tests/ui/imports/issue-45829/rename-extern.rs | 4 +- .../ui/imports/issue-45829/rename-use-vs-extern.rs | 2 +- tests/ui/imports/issue-4865-1.rs | 2 +- tests/ui/imports/issue-4865-2.rs | 2 +- tests/ui/imports/issue-4865-3.rs | 2 +- tests/ui/imports/issue-52891.fixed | 4 +- tests/ui/imports/issue-52891.rs | 4 +- tests/ui/imports/issue-53140.rs | 2 +- tests/ui/imports/issue-55811.rs | 4 +- tests/ui/imports/issue-56125.rs | 6 +- tests/ui/imports/issue-56263.rs | 4 +- tests/ui/imports/issue-57539.rs | 2 +- tests/ui/imports/issue-59764.rs | 6 +- tests/ui/imports/issue-62767.rs | 2 +- tests/ui/imports/issue-68103.rs | 2 +- tests/ui/imports/issue-85992.rs | 8 +- tests/ui/imports/issue-99695-b.fixed | 2 +- tests/ui/imports/issue-99695-b.rs | 2 +- tests/ui/imports/issue-99695.fixed | 2 +- tests/ui/imports/issue-99695.rs | 2 +- .../ui/imports/local-modularized-tricky-pass-1.rs | 2 +- .../ui/imports/local-modularized-tricky-pass-2.rs | 2 +- tests/ui/imports/local-modularized.rs | 2 +- tests/ui/imports/macro-paths.rs | 2 +- tests/ui/imports/macros.rs | 2 +- tests/ui/imports/no-pub-reexports-but-used.rs | 2 +- tests/ui/imports/overlapping_pub_trait.rs | 2 +- .../private-std-reexport-suggest-public.fixed | 2 +- .../imports/private-std-reexport-suggest-public.rs | 2 +- tests/ui/imports/reexport-star.rs | 4 +- tests/ui/imports/resolve-other-libc.rs | 2 +- tests/ui/imports/shadow_builtin_macros.rs | 2 +- tests/ui/imports/unnamed_pub_trait.rs | 2 +- tests/ui/imports/unused-import-issue-87973.fixed | 2 +- tests/ui/imports/unused-import-issue-87973.rs | 2 +- tests/ui/imports/unused-imports-in-test-mode.rs | 2 +- tests/ui/imports/use-mod.rs | 4 +- tests/ui/impossible_range.fixed | 2 +- tests/ui/impossible_range.rs | 2 +- tests/ui/inc-range-pat.rs | 2 +- tests/ui/include-macros/normalization.rs | 2 +- tests/ui/include-macros/same-file-in-two-crates.rs | 6 +- .../needs-has-incoherent-impls.rs | 2 +- .../no-attr-empty-impl.rs | 2 +- .../ui/indexing/indexing-spans-caller-location.rs | 2 +- tests/ui/infer-fn-tail-expr.rs | 4 +- tests/ui/inference/cannot-infer-async.rs | 2 +- tests/ui/inference/char-as-str-single.fixed | 2 +- tests/ui/inference/char-as-str-single.rs | 2 +- .../infer-binary-operand-behind-reference.rs | 2 +- .../inference-variable-behind-raw-pointer.rs | 2 +- tests/ui/inference/inference_unstable.rs | 6 +- tests/ui/inference/inference_unstable_featured.rs | 4 +- tests/ui/inference/inference_unstable_forced.rs | 2 +- tests/ui/inference/issue-113354.fixed | 2 +- tests/ui/inference/issue-113354.rs | 2 +- tests/ui/inference/issue-28935.rs | 2 +- tests/ui/inference/issue-36053.rs | 2 +- tests/ui/inference/issue-70703.rs | 2 +- tests/ui/inference/issue-71584.rs | 2 +- tests/ui/inference/issue-72616.rs | 2 +- tests/ui/inference/issue-80409.rs | 20 +- tests/ui/inference/issue-81522.rs | 6 +- .../ui/inference/lub-glb-with-unbound-infer-var.rs | 2 +- tests/ui/inference/newlambdas-ret-infer.rs | 4 +- tests/ui/inference/newlambdas-ret-infer2.rs | 4 +- tests/ui/inference/range-type-infer.rs | 2 +- tests/ui/inference/simple-infer.rs | 2 +- tests/ui/inference/str-as-char.fixed | 2 +- tests/ui/inference/str-as-char.rs | 2 +- tests/ui/inference/type-infer-generalize-ty-var.rs | 6 +- tests/ui/infinite/infinite-alias.rs | 2 +- tests/ui/infinite/infinite-autoderef.rs | 4 +- tests/ui/infinite/infinite-instantiation.rs | 4 +- .../infinite-type-alias-mutual-recursion.rs | 2 +- tests/ui/infinite/infinite-vec-type-recursion.rs | 2 +- .../infinite/issue-41731-infinite-macro-print.rs | 2 +- .../infinite/issue-41731-infinite-macro-println.rs | 2 +- .../auxiliary/repeat.rs | 4 +- .../ui/inherent-impls-overlap-check/no-overlap.rs | 4 +- tests/ui/inherent-impls-overlap-check/overlap.rs | 2 +- tests/ui/inherit-env.rs | 8 +- tests/ui/inline-const/const-expr-array-init.rs | 2 +- tests/ui/inline-const/const-expr-basic.rs | 2 +- tests/ui/inline-const/const-expr-generic-err.rs | 2 +- tests/ui/inline-const/const-expr-generic.rs | 2 +- tests/ui/inline-const/const-expr-inference.rs | 2 +- tests/ui/inline-const/const-expr-lifetime.rs | 2 +- tests/ui/inline-const/const-expr-macro.rs | 2 +- tests/ui/inline-const/const-expr-reference.rs | 2 +- tests/ui/inline-const/const-match-pat-inference.rs | 2 +- tests/ui/inline-const/const-match-pat-lifetime.rs | 2 +- tests/ui/inline-const/const-match-pat-range.rs | 2 +- tests/ui/inline-const/const-match-pat.rs | 2 +- .../elided-lifetime-being-infer-vars.rs | 2 +- tests/ui/inline-const/expr-unsafe.rs | 2 +- tests/ui/inline-const/expr-with-block.rs | 2 +- .../inline-const/instance-doesnt-depend-on-type.rs | 2 +- tests/ui/inline-const/interpolated.rs | 2 +- tests/ui/inline-const/macro-with-const.rs | 2 +- tests/ui/inline-const/pat-unsafe.rs | 2 +- tests/ui/inline-const/required-const.rs | 4 +- tests/ui/inlined-main.rs | 2 +- tests/ui/inner-attrs-on-impl.rs | 2 +- tests/ui/inner-module.rs | 2 +- tests/ui/inner-static.rs | 4 +- tests/ui/instrument-coverage/bad-value.rs | 6 +- tests/ui/instrument-coverage/off-values.rs | 14 +- tests/ui/instrument-coverage/on-values.rs | 18 +- tests/ui/instrument-coverage/unstable.rs | 8 +- tests/ui/instrument-xray/flags-always-never-1.rs | 6 +- tests/ui/instrument-xray/flags-always-never-2.rs | 8 +- tests/ui/instrument-xray/flags-basic.rs | 10 +- tests/ui/instrument-xray/flags-dupe-always.rs | 6 +- .../ui/instrument-xray/flags-dupe-ignore-loops.rs | 6 +- tests/ui/instrument-xray/target-not-supported.rs | 6 +- tests/ui/internal-lints/diagnostics_incorrect.rs | 2 +- tests/ui/internal-lints/existing_doc_keyword.rs | 2 +- .../ui/internal-lints/query_stability_incorrect.rs | 2 +- .../ui/internal-lints/rustc_pass_by_value_self.rs | 2 +- tests/ui/internal/internal-unstable-noallow.rs | 10 +- .../ui/internal/internal-unstable-thread-local.rs | 2 +- tests/ui/internal/internal-unstable.rs | 2 +- .../intrinsics/bad-intrinsic-monomorphization.rs | 2 +- .../intrinsics/const-eval-select-backtrace-std.rs | 6 +- tests/ui/intrinsics/const-eval-select-backtrace.rs | 6 +- tests/ui/intrinsics/const-eval-select-x86_64.rs | 4 +- tests/ui/intrinsics/const-eval-select.rs | 2 +- tests/ui/intrinsics/intrinsic-alignment.rs | 4 +- tests/ui/intrinsics/intrinsic-assume.rs | 2 +- tests/ui/intrinsics/intrinsic-atomics-cc.rs | 4 +- tests/ui/intrinsics/intrinsic-atomics.rs | 2 +- tests/ui/intrinsics/intrinsic-nearby.rs | 2 +- tests/ui/intrinsics/intrinsic-raw_eq-const.rs | 2 +- tests/ui/intrinsics/intrinsic-unreachable.rs | 2 +- tests/ui/intrinsics/intrinsic-volatile.rs | 2 +- tests/ui/intrinsics/intrinsics-integer.rs | 2 +- tests/ui/intrinsics/intrinsics-math.rs | 4 +- tests/ui/intrinsics/issue-84297-reifying-copy.rs | 2 +- tests/ui/intrinsics/non-integer-atomic.rs | 2 +- tests/ui/intrinsics/panic-uninitialized-zeroed.rs | 10 +- .../branch-protection-missing-pac-ret.rs | 14 +- .../codegen-option-without-group.rs | 2 +- .../debug-option-without-group.rs | 2 +- tests/ui/invalid-compile-flags/fuel.rs | 14 +- .../function-return/requires-x86-or-x86_64.rs | 24 +-- .../thunk-extern-requires-non-large-code-model.rs | 24 +-- .../invalid-compile-flags/invalid-llvm-passes.rs | 4 +- .../invalid/invalid-debugger-visualizer-option.rs | 4 +- tests/ui/invalid/issue-114435-layout-type-err.rs | 6 +- .../io-checks/non-ice-error-on-worker-io-fail.rs | 16 +- tests/ui/issue-11881.rs | 2 +- tests/ui/issue-13560.rs | 10 +- tests/ui/issue-15924.rs | 4 +- tests/ui/issue-16822.rs | 4 +- tests/ui/issue-18502.rs | 4 +- tests/ui/issue-24106.rs | 4 +- tests/ui/issue-76387-llvm-miscompile.rs | 6 +- tests/ui/issues/auxiliary/cgu_test.rs | 4 +- tests/ui/issues/auxiliary/cgu_test_a.rs | 4 +- tests/ui/issues/auxiliary/cgu_test_b.rs | 4 +- tests/ui/issues/auxiliary/issue-111011.rs | 2 +- tests/ui/issues/auxiliary/issue-12133-dylib2.rs | 2 +- tests/ui/issues/auxiliary/issue-12133-rlib.rs | 2 +- tests/ui/issues/auxiliary/issue-14344-1.rs | 2 +- tests/ui/issues/auxiliary/issue-18913-1.rs | 2 +- tests/ui/issues/auxiliary/issue-18913-2.rs | 2 +- tests/ui/issues/auxiliary/issue-25185-1.rs | 2 +- tests/ui/issues/auxiliary/issue-31702-2.rs | 2 +- tests/ui/issues/issue-10228.rs | 4 +- tests/ui/issues/issue-10396.rs | 2 +- tests/ui/issues/issue-10436.rs | 2 +- tests/ui/issues/issue-10456.rs | 4 +- tests/ui/issues/issue-10638.rs | 4 +- tests/ui/issues/issue-106755.rs | 2 +- tests/ui/issues/issue-10683.rs | 4 +- tests/ui/issues/issue-10718.rs | 4 +- tests/ui/issues/issue-10734.rs | 2 +- tests/ui/issues/issue-10767.rs | 4 +- tests/ui/issues/issue-10802.rs | 2 +- tests/ui/issues/issue-10806.rs | 4 +- tests/ui/issues/issue-10853.rs | 4 +- tests/ui/issues/issue-10902.rs | 4 +- tests/ui/issues/issue-11047.rs | 2 +- tests/ui/issues/issue-11085.rs | 6 +- tests/ui/issues/issue-11205.rs | 4 +- tests/ui/issues/issue-11224.rs | 6 +- tests/ui/issues/issue-11267.rs | 2 +- tests/ui/issues/issue-11382.rs | 2 +- tests/ui/issues/issue-11384.rs | 4 +- tests/ui/issues/issue-11508.rs | 4 +- tests/ui/issues/issue-11529.rs | 6 +- tests/ui/issues/issue-11552.rs | 2 +- tests/ui/issues/issue-11592.rs | 2 +- tests/ui/issues/issue-11677.rs | 2 +- tests/ui/issues/issue-11680.rs | 2 +- tests/ui/issues/issue-11709.rs | 2 +- tests/ui/issues/issue-11740.rs | 2 +- tests/ui/issues/issue-11820.rs | 4 +- tests/ui/issues/issue-11869.rs | 4 +- tests/ui/issues/issue-11958.rs | 2 +- tests/ui/issues/issue-12033.rs | 2 +- tests/ui/issues/issue-12133-1.rs | 8 +- tests/ui/issues/issue-12133-2.rs | 10 +- tests/ui/issues/issue-12133-3.rs | 16 +- tests/ui/issues/issue-12285.rs | 2 +- tests/ui/issues/issue-12612.rs | 8 +- tests/ui/issues/issue-12660.rs | 6 +- tests/ui/issues/issue-12677.rs | 2 +- tests/ui/issues/issue-12699.rs | 6 +- tests/ui/issues/issue-12729.rs | 4 +- tests/ui/issues/issue-12744.rs | 2 +- tests/ui/issues/issue-12860.rs | 2 +- tests/ui/issues/issue-12909.rs | 4 +- tests/ui/issues/issue-12920.rs | 6 +- tests/ui/issues/issue-13027.rs | 2 +- tests/ui/issues/issue-13105.rs | 4 +- tests/ui/issues/issue-13167.rs | 8 +- tests/ui/issues/issue-13202.rs | 6 +- tests/ui/issues/issue-13204.rs | 2 +- tests/ui/issues/issue-13214.rs | 4 +- tests/ui/issues/issue-13259-windows-tcb-trash.rs | 2 +- tests/ui/issues/issue-13264.rs | 2 +- tests/ui/issues/issue-13323.rs | 2 +- tests/ui/issues/issue-13405.rs | 4 +- tests/ui/issues/issue-13434.rs | 2 +- tests/ui/issues/issue-13482-2.rs | 2 +- tests/ui/issues/issue-13507-2.rs | 4 +- tests/ui/issues/issue-13620.rs | 8 +- tests/ui/issues/issue-13665.rs | 4 +- tests/ui/issues/issue-13703.rs | 4 +- tests/ui/issues/issue-13763.rs | 4 +- tests/ui/issues/issue-13775.rs | 4 +- tests/ui/issues/issue-13808.rs | 4 +- tests/ui/issues/issue-13867.rs | 2 +- tests/ui/issues/issue-13872.rs | 10 +- tests/ui/issues/issue-14082.rs | 4 +- tests/ui/issues/issue-14229.rs | 2 +- tests/ui/issues/issue-14254.rs | 4 +- tests/ui/issues/issue-14308.rs | 2 +- tests/ui/issues/issue-14330.rs | 4 +- tests/ui/issues/issue-14344.rs | 6 +- tests/ui/issues/issue-14382.rs | 2 +- tests/ui/issues/issue-14393.rs | 4 +- tests/ui/issues/issue-14399.rs | 4 +- tests/ui/issues/issue-14421.rs | 6 +- tests/ui/issues/issue-14422.rs | 6 +- tests/ui/issues/issue-1451.rs | 4 +- tests/ui/issues/issue-1460.rs | 4 +- tests/ui/issues/issue-14821.rs | 2 +- tests/ui/issues/issue-14865.rs | 2 +- tests/ui/issues/issue-14875.rs | 4 +- tests/ui/issues/issue-14901.rs | 2 +- tests/ui/issues/issue-14919.rs | 4 +- tests/ui/issues/issue-14959.rs | 4 +- tests/ui/issues/issue-15043.rs | 4 +- tests/ui/issues/issue-15063.rs | 2 +- tests/ui/issues/issue-15104.rs | 2 +- tests/ui/issues/issue-15129-rpass.rs | 2 +- tests/ui/issues/issue-15155.rs | 2 +- tests/ui/issues/issue-15189.rs | 2 +- tests/ui/issues/issue-15444.rs | 4 +- tests/ui/issues/issue-15523-big.rs | 2 +- tests/ui/issues/issue-15523.rs | 2 +- tests/ui/issues/issue-15562.rs | 6 +- tests/ui/issues/issue-15571.rs | 2 +- tests/ui/issues/issue-15673.rs | 2 +- tests/ui/issues/issue-15734.rs | 6 +- tests/ui/issues/issue-15735.rs | 2 +- tests/ui/issues/issue-15763.rs | 2 +- tests/ui/issues/issue-15774.rs | 4 +- tests/ui/issues/issue-15793.rs | 2 +- tests/ui/issues/issue-15858.rs | 2 +- tests/ui/issues/issue-16151.rs | 2 +- tests/ui/issues/issue-16256.rs | 4 +- tests/ui/issues/issue-16278.rs | 2 +- tests/ui/issues/issue-16441.rs | 4 +- tests/ui/issues/issue-16452.rs | 4 +- tests/ui/issues/issue-16492.rs | 2 +- tests/ui/issues/issue-16530.rs | 2 +- tests/ui/issues/issue-16560.rs | 4 +- tests/ui/issues/issue-16596.rs | 2 +- tests/ui/issues/issue-1660.rs | 4 +- tests/ui/issues/issue-16643.rs | 6 +- tests/ui/issues/issue-16648.rs | 2 +- tests/ui/issues/issue-16668.rs | 2 +- tests/ui/issues/issue-16671.rs | 2 +- tests/ui/issues/issue-16725.rs | 2 +- tests/ui/issues/issue-16739.rs | 2 +- tests/ui/issues/issue-16745.rs | 2 +- tests/ui/issues/issue-16774.rs | 2 +- tests/ui/issues/issue-16783.rs | 4 +- tests/ui/issues/issue-16819.rs | 2 +- tests/ui/issues/issue-16922-rpass.rs | 4 +- tests/ui/issues/issue-1696.rs | 2 +- tests/ui/issues/issue-16994.rs | 2 +- tests/ui/issues/issue-17068.rs | 2 +- tests/ui/issues/issue-17121.rs | 4 +- tests/ui/issues/issue-17216.rs | 2 +- tests/ui/issues/issue-17302.rs | 2 +- tests/ui/issues/issue-17322.rs | 4 +- tests/ui/issues/issue-17336.rs | 2 +- tests/ui/issues/issue-17351.rs | 4 +- tests/ui/issues/issue-17361.rs | 4 +- tests/ui/issues/issue-17450.rs | 2 +- tests/ui/issues/issue-17503.rs | 2 +- tests/ui/issues/issue-17546.rs | 2 +- tests/ui/issues/issue-17662.rs | 4 +- tests/ui/issues/issue-17732.rs | 4 +- tests/ui/issues/issue-17734.rs | 2 +- tests/ui/issues/issue-17746.rs | 2 +- tests/ui/issues/issue-17771.rs | 4 +- tests/ui/issues/issue-17816.rs | 2 +- tests/ui/issues/issue-17877.rs | 2 +- tests/ui/issues/issue-17897.rs | 2 +- tests/ui/issues/issue-17904.rs | 4 +- tests/ui/issues/issue-17905.rs | 2 +- tests/ui/issues/issue-18088.rs | 2 +- tests/ui/issues/issue-18110.rs | 4 +- tests/ui/issues/issue-18173.rs | 2 +- tests/ui/issues/issue-18188.rs | 4 +- tests/ui/issues/issue-18232.rs | 4 +- tests/ui/issues/issue-18352.rs | 2 +- tests/ui/issues/issue-18353.rs | 4 +- tests/ui/issues/issue-18389.rs | 2 +- tests/ui/issues/issue-18446-2.rs | 2 +- tests/ui/issues/issue-18464.rs | 2 +- tests/ui/issues/issue-18501.rs | 6 +- tests/ui/issues/issue-18514.rs | 4 +- tests/ui/issues/issue-18539.rs | 4 +- tests/ui/issues/issue-18685.rs | 4 +- tests/ui/issues/issue-18711.rs | 6 +- tests/ui/issues/issue-18738.rs | 2 +- tests/ui/issues/issue-18767.rs | 2 +- tests/ui/issues/issue-18804/main.rs | 12 +- tests/ui/issues/issue-18809.rs | 2 +- tests/ui/issues/issue-18845.rs | 2 +- tests/ui/issues/issue-18859.rs | 2 +- tests/ui/issues/issue-18906.rs | 4 +- tests/ui/issues/issue-18913.rs | 6 +- tests/ui/issues/issue-18952.rs | 2 +- tests/ui/issues/issue-18988.rs | 2 +- tests/ui/issues/issue-19001.rs | 2 +- tests/ui/issues/issue-19037.rs | 4 +- tests/ui/issues/issue-19097.rs | 2 +- tests/ui/issues/issue-19098.rs | 2 +- tests/ui/issues/issue-19100.fixed | 2 +- tests/ui/issues/issue-19100.rs | 2 +- tests/ui/issues/issue-19127.rs | 4 +- tests/ui/issues/issue-19129-1.rs | 4 +- tests/ui/issues/issue-19129-2.rs | 4 +- tests/ui/issues/issue-19135.rs | 2 +- .../issue-1920-absolute-paths/issue-1920-1.rs | 2 +- .../issue-1920-absolute-paths/issue-1920-2.rs | 2 +- .../issue-1920-absolute-paths/issue-1920-3.rs | 2 +- tests/ui/issues/issue-19293.rs | 6 +- tests/ui/issues/issue-19340-1.rs | 6 +- tests/ui/issues/issue-19340-2.rs | 4 +- tests/ui/issues/issue-19367.rs | 2 +- tests/ui/issues/issue-19398.rs | 4 +- tests/ui/issues/issue-19404.rs | 2 +- tests/ui/issues/issue-19479.rs | 4 +- tests/ui/issues/issue-19499.rs | 4 +- tests/ui/issues/issue-19601.rs | 2 +- tests/ui/issues/issue-1962.fixed | 4 +- tests/ui/issues/issue-1962.rs | 4 +- tests/ui/issues/issue-19631.rs | 4 +- tests/ui/issues/issue-19632.rs | 4 +- tests/ui/issues/issue-1974.rs | 4 +- tests/ui/issues/issue-19811-escape-unicode.rs | 2 +- tests/ui/issues/issue-19850.rs | 4 +- tests/ui/issues/issue-19982.rs | 2 +- tests/ui/issues/issue-20009.rs | 4 +- tests/ui/issues/issue-20055-box-trait.rs | 2 +- tests/ui/issues/issue-20055-box-unsized-array.rs | 2 +- tests/ui/issues/issue-20174.rs | 2 +- tests/ui/issues/issue-20186.rs | 2 +- tests/ui/issues/issue-20313-rpass.rs | 4 +- tests/ui/issues/issue-20389.rs | 6 +- tests/ui/issues/issue-20396.rs | 4 +- tests/ui/issues/issue-20413.rs | 2 +- tests/ui/issues/issue-20414.rs | 4 +- tests/ui/issues/issue-20427.rs | 4 +- tests/ui/issues/issue-20454.rs | 2 +- tests/ui/issues/issue-20544.rs | 2 +- tests/ui/issues/issue-20575.rs | 4 +- tests/ui/issues/issue-20644.rs | 4 +- tests/ui/issues/issue-20676.rs | 2 +- tests/ui/issues/issue-2074.rs | 4 +- tests/ui/issues/issue-20763-1.rs | 4 +- tests/ui/issues/issue-20763-2.rs | 4 +- tests/ui/issues/issue-20797.rs | 2 +- tests/ui/issues/issue-20803.rs | 2 +- tests/ui/issues/issue-20847.rs | 2 +- tests/ui/issues/issue-20953.rs | 2 +- tests/ui/issues/issue-20971.rs | 6 +- tests/ui/issues/issue-21033.rs | 4 +- tests/ui/issues/issue-21140.rs | 2 +- tests/ui/issues/issue-21174-2.rs | 2 +- tests/ui/issues/issue-21202.rs | 2 +- tests/ui/issues/issue-21245.rs | 4 +- tests/ui/issues/issue-21291.rs | 4 +- tests/ui/issues/issue-21306.rs | 2 +- tests/ui/issues/issue-21361.rs | 2 +- tests/ui/issues/issue-21384.rs | 2 +- tests/ui/issues/issue-21400.rs | 2 +- tests/ui/issues/issue-21402.rs | 4 +- tests/ui/issues/issue-21622.rs | 2 +- tests/ui/issues/issue-21634.rs | 2 +- tests/ui/issues/issue-21655.rs | 2 +- tests/ui/issues/issue-2170-exe.rs | 6 +- tests/ui/issues/issue-21763.rs | 2 +- tests/ui/issues/issue-21891.rs | 4 +- tests/ui/issues/issue-2190-1.rs | 6 +- tests/ui/issues/issue-21909.rs | 4 +- tests/ui/issues/issue-21922.rs | 2 +- tests/ui/issues/issue-22008.rs | 2 +- tests/ui/issues/issue-22036.rs | 2 +- tests/ui/issues/issue-2214.rs | 6 +- tests/ui/issues/issue-22258.rs | 2 +- tests/ui/issues/issue-22346.rs | 4 +- tests/ui/issues/issue-22356.rs | 4 +- tests/ui/issues/issue-22403.rs | 2 +- tests/ui/issues/issue-22426.rs | 4 +- tests/ui/issues/issue-22471.rs | 2 +- tests/ui/issues/issue-22577.rs | 4 +- tests/ui/issues/issue-22603.rs | 2 +- tests/ui/issues/issue-22629.rs | 4 +- tests/ui/issues/issue-22638.rs | 8 +- tests/ui/issues/issue-22673.rs | 2 +- tests/ui/issues/issue-22777.rs | 4 +- tests/ui/issues/issue-22781.rs | 2 +- tests/ui/issues/issue-22789.rs | 2 +- tests/ui/issues/issue-22814.rs | 2 +- tests/ui/issues/issue-2284.rs | 4 +- tests/ui/issues/issue-22864-1.rs | 2 +- tests/ui/issues/issue-22864-2.rs | 4 +- tests/ui/issues/issue-2288.rs | 2 +- tests/ui/issues/issue-22894.rs | 2 +- tests/ui/issues/issue-22933-1.rs | 2 +- tests/ui/issues/issue-22992-2.rs | 2 +- tests/ui/issues/issue-22992.rs | 2 +- tests/ui/issues/issue-23036.rs | 2 +- tests/ui/issues/issue-2311-2.rs | 2 +- tests/ui/issues/issue-2311.rs | 4 +- tests/ui/issues/issue-2312.rs | 2 +- tests/ui/issues/issue-23122-2.rs | 2 +- tests/ui/issues/issue-2316-c.rs | 8 +- tests/ui/issues/issue-23261.rs | 2 +- tests/ui/issues/issue-23304-1.rs | 2 +- tests/ui/issues/issue-23304-2.rs | 2 +- tests/ui/issues/issue-23311.rs | 2 +- tests/ui/issues/issue-23336.rs | 2 +- tests/ui/issues/issue-23354-2.rs | 6 +- tests/ui/issues/issue-23354.rs | 6 +- tests/ui/issues/issue-23406.rs | 2 +- tests/ui/issues/issue-23433.rs | 2 +- tests/ui/issues/issue-23442.rs | 2 +- tests/ui/issues/issue-23477.rs | 4 +- tests/ui/issues/issue-23485.rs | 2 +- tests/ui/issues/issue-23491.rs | 2 +- tests/ui/issues/issue-23550.rs | 2 +- tests/ui/issues/issue-23611-enum-swap-in-drop.rs | 2 +- tests/ui/issues/issue-23649-1.rs | 2 +- tests/ui/issues/issue-23649-2.rs | 2 +- tests/ui/issues/issue-23649-3.rs | 2 +- tests/ui/issues/issue-23699.rs | 2 +- tests/ui/issues/issue-2380-b.rs | 6 +- tests/ui/issues/issue-23808.rs | 2 +- tests/ui/issues/issue-2383.rs | 4 +- tests/ui/issues/issue-23891.rs | 2 +- tests/ui/issues/issue-23898.rs | 2 +- tests/ui/issues/issue-23958.rs | 2 +- tests/ui/issues/issue-23992.rs | 2 +- tests/ui/issues/issue-24086.rs | 2 +- tests/ui/issues/issue-2414-c.rs | 8 +- tests/ui/issues/issue-24161.rs | 2 +- tests/ui/issues/issue-24227.rs | 2 +- tests/ui/issues/issue-2428.rs | 2 +- tests/ui/issues/issue-24308.rs | 2 +- tests/ui/issues/issue-24353.rs | 2 +- tests/ui/issues/issue-24389.rs | 2 +- tests/ui/issues/issue-24434.rs | 4 +- tests/ui/issues/issue-2445-b.rs | 4 +- tests/ui/issues/issue-2445.rs | 4 +- tests/ui/issues/issue-24533.rs | 2 +- tests/ui/issues/issue-24589.rs | 2 +- tests/ui/issues/issue-2463.rs | 4 +- .../ui/issues/issue-24687-embed-debuginfo/main.rs | 6 +- .../ui/issues/issue-2470-bounds-check-overflow.rs | 6 +- tests/ui/issues/issue-2472.rs | 6 +- tests/ui/issues/issue-24779.rs | 2 +- tests/ui/issues/issue-2487-a.rs | 4 +- tests/ui/issues/issue-24945-repeat-dash-opts.rs | 4 +- tests/ui/issues/issue-24947.rs | 2 +- tests/ui/issues/issue-24954.rs | 2 +- tests/ui/issues/issue-2502.rs | 4 +- tests/ui/issues/issue-25089.rs | 6 +- tests/ui/issues/issue-25145.rs | 2 +- tests/ui/issues/issue-25180.rs | 2 +- tests/ui/issues/issue-25185.rs | 8 +- tests/ui/issues/issue-2526-a.rs | 6 +- tests/ui/issues/issue-25279.rs | 2 +- tests/ui/issues/issue-25343.rs | 2 +- tests/ui/issues/issue-25394.rs | 2 +- tests/ui/issues/issue-25467.rs | 4 +- tests/ui/issues/issue-25497.rs | 2 +- tests/ui/issues/issue-2550.rs | 4 +- tests/ui/issues/issue-25515.rs | 2 +- tests/ui/issues/issue-25549-multiple-drop.rs | 2 +- tests/ui/issues/issue-25579.rs | 2 +- tests/ui/issues/issue-25679.rs | 2 +- tests/ui/issues/issue-25693.rs | 2 +- tests/ui/issues/issue-25746-bool-transmute.rs | 2 +- tests/ui/issues/issue-25757.rs | 2 +- tests/ui/issues/issue-25810.rs | 2 +- tests/ui/issues/issue-26095.rs | 2 +- tests/ui/issues/issue-2611-3.rs | 2 +- tests/ui/issues/issue-26127.rs | 2 +- tests/ui/issues/issue-26186.rs | 2 +- tests/ui/issues/issue-26205.rs | 2 +- tests/ui/issues/issue-2631-b.rs | 4 +- tests/ui/issues/issue-2642.rs | 4 +- tests/ui/issues/issue-26468.rs | 2 +- tests/ui/issues/issue-26484.rs | 4 +- tests/ui/issues/issue-26614.rs | 2 +- tests/ui/issues/issue-26641.rs | 2 +- tests/ui/issues/issue-26646.rs | 2 +- tests/ui/issues/issue-26655.rs | 6 +- tests/ui/issues/issue-26709.rs | 2 +- tests/ui/issues/issue-26802.rs | 2 +- tests/ui/issues/issue-26805.rs | 2 +- tests/ui/issues/issue-26997.rs | 2 +- .../ui/issues/issue-27054-primitive-binary-ops.rs | 2 +- tests/ui/issues/issue-2708.rs | 4 +- tests/ui/issues/issue-27105.rs | 2 +- tests/ui/issues/issue-2723-b.rs | 4 +- tests/ui/issues/issue-27240.rs | 2 +- tests/ui/issues/issue-27268.rs | 2 +- tests/ui/issues/issue-27281.rs | 2 +- tests/ui/issues/issue-27401-dropflag-reinit.rs | 2 +- tests/ui/issues/issue-27433.fixed | 2 +- tests/ui/issues/issue-27433.rs | 2 +- tests/ui/issues/issue-2761.rs | 6 +- tests/ui/issues/issue-27639.rs | 2 +- tests/ui/issues/issue-27697.rs | 2 +- tests/ui/issues/issue-27859.rs | 4 +- tests/ui/issues/issue-27889.rs | 2 +- tests/ui/issues/issue-27949.rs | 2 +- tests/ui/issues/issue-27997.rs | 2 +- tests/ui/issues/issue-28181.rs | 2 +- tests/ui/issues/issue-28279.rs | 2 +- tests/ui/issues/issue-28498-must-work-ex1.rs | 2 +- tests/ui/issues/issue-28498-must-work-ex2.rs | 2 +- tests/ui/issues/issue-28498-ugeh-ex1.rs | 2 +- tests/ui/issues/issue-28550.rs | 2 +- tests/ui/issues/issue-28561.rs | 2 +- tests/ui/issues/issue-28600.rs | 2 +- tests/ui/issues/issue-28625.rs | 2 +- tests/ui/issues/issue-28777.rs | 2 +- tests/ui/issues/issue-28828.rs | 2 +- tests/ui/issues/issue-28839.rs | 2 +- tests/ui/issues/issue-28936.rs | 2 +- tests/ui/issues/issue-2895.rs | 2 +- tests/ui/issues/issue-28983.rs | 2 +- tests/ui/issues/issue-28999.rs | 2 +- tests/ui/issues/issue-29030.rs | 2 +- tests/ui/issues/issue-29037.rs | 2 +- tests/ui/issues/issue-2904.rs | 2 +- tests/ui/issues/issue-29048.rs | 2 +- tests/ui/issues/issue-29053.rs | 2 +- tests/ui/issues/issue-29071-2.rs | 2 +- tests/ui/issues/issue-29071.rs | 2 +- tests/ui/issues/issue-29092.rs | 2 +- tests/ui/issues/issue-29147-rpass.rs | 2 +- tests/ui/issues/issue-29265.rs | 4 +- tests/ui/issues/issue-29276.rs | 2 +- tests/ui/issues/issue-2935.rs | 2 +- tests/ui/issues/issue-29466.rs | 2 +- tests/ui/issues/issue-29485.rs | 8 +- tests/ui/issues/issue-29516.rs | 2 +- tests/ui/issues/issue-29522.rs | 2 +- tests/ui/issues/issue-29540.rs | 2 +- tests/ui/issues/issue-29663.rs | 2 +- tests/ui/issues/issue-29668.rs | 2 +- tests/ui/issues/issue-29710.rs | 2 +- tests/ui/issues/issue-29740.rs | 2 +- tests/ui/issues/issue-29743.rs | 2 +- tests/ui/issues/issue-29821.rs | 2 +- tests/ui/issues/issue-29857.rs | 2 +- tests/ui/issues/issue-2989.rs | 2 +- tests/ui/issues/issue-29948.rs | 4 +- tests/ui/issues/issue-30018-panic.rs | 6 +- tests/ui/issues/issue-30081.rs | 2 +- tests/ui/issues/issue-3012-2.rs | 6 +- tests/ui/issues/issue-30123.rs | 2 +- tests/ui/issues/issue-3026.rs | 4 +- tests/ui/issues/issue-3029.rs | 6 +- tests/ui/issues/issue-3037.rs | 4 +- tests/ui/issues/issue-30371.rs | 2 +- tests/ui/issues/issue-30380.rs | 6 +- tests/ui/issues/issue-30490.rs | 8 +- tests/ui/issues/issue-3052.rs | 4 +- tests/ui/issues/issue-30530.rs | 2 +- tests/ui/issues/issue-30615.rs | 2 +- tests/ui/issues/issue-30756.rs | 2 +- tests/ui/issues/issue-30891.rs | 2 +- tests/ui/issues/issue-3091.rs | 2 +- tests/ui/issues/issue-3109.rs | 2 +- tests/ui/issues/issue-3121.rs | 2 +- tests/ui/issues/issue-31260.rs | 2 +- tests/ui/issues/issue-31267-additional.rs | 2 +- tests/ui/issues/issue-31267.rs | 2 +- tests/ui/issues/issue-31299.rs | 2 +- tests/ui/issues/issue-3136-b.rs | 6 +- tests/ui/issues/issue-3149.rs | 4 +- tests/ui/issues/issue-31702.rs | 6 +- tests/ui/issues/issue-31776.rs | 2 +- tests/ui/issues/issue-32008.rs | 2 +- .../issue-32122-1.fixed | 2 +- .../issue-32122-1.rs | 2 +- .../issue-32122-2.fixed | 2 +- .../issue-32122-2.rs | 2 +- tests/ui/issues/issue-3220.rs | 4 +- tests/ui/issues/issue-32292.rs | 2 +- tests/ui/issues/issue-32324.rs | 2 +- tests/ui/issues/issue-32377.rs | 2 +- tests/ui/issues/issue-32389.rs | 2 +- tests/ui/issues/issue-32518.rs | 10 +- tests/ui/issues/issue-32797.rs | 2 +- tests/ui/issues/issue-32805.rs | 2 +- tests/ui/issues/issue-3290.rs | 2 +- tests/ui/issues/issue-33187.rs | 2 +- tests/ui/issues/issue-33202.rs | 2 +- tests/ui/issues/issue-33241.rs | 2 +- tests/ui/issues/issue-33287.rs | 2 +- tests/ui/issues/issue-33387.rs | 2 +- tests/ui/issues/issue-33461.rs | 2 +- tests/ui/issues/issue-33687.rs | 2 +- tests/ui/issues/issue-33770.rs | 6 +- tests/ui/issues/issue-3389.rs | 2 +- tests/ui/issues/issue-33941.rs | 2 +- tests/ui/issues/issue-33992.rs | 8 +- tests/ui/issues/issue-34074.rs | 2 +- tests/ui/issues/issue-3424.rs | 2 +- tests/ui/issues/issue-3429.rs | 4 +- tests/ui/issues/issue-34418.rs | 2 +- tests/ui/issues/issue-34427.rs | 2 +- tests/ui/issues/issue-3447.rs | 2 +- tests/ui/issues/issue-34503.rs | 2 +- tests/ui/issues/issue-34569.rs | 4 +- tests/ui/issues/issue-34571.rs | 2 +- tests/ui/issues/issue-34751.rs | 2 +- tests/ui/issues/issue-34780.rs | 2 +- tests/ui/issues/issue-34796.rs | 4 +- tests/ui/issues/issue-34839.rs | 2 +- tests/ui/issues/issue-3500.rs | 4 +- tests/ui/issues/issue-3521-2.fixed | 2 +- tests/ui/issues/issue-3521-2.rs | 2 +- tests/ui/issues/issue-35423.rs | 2 +- tests/ui/issues/issue-3556.rs | 2 +- tests/ui/issues/issue-3559.rs | 2 +- tests/ui/issues/issue-35600.rs | 2 +- tests/ui/issues/issue-3563-3.rs | 2 +- tests/ui/issues/issue-3574.rs | 2 +- tests/ui/issues/issue-35815.rs | 2 +- tests/ui/issues/issue-35976.rs | 4 +- tests/ui/issues/issue-36023.rs | 2 +- .../issues/issue-36036-associated-type-layout.rs | 2 +- tests/ui/issues/issue-36075.rs | 2 +- tests/ui/issues/issue-3609.rs | 2 +- tests/ui/issues/issue-36116.rs | 2 +- tests/ui/issues/issue-36260.rs | 2 +- tests/ui/issues/issue-36278-prefix-nesting.rs | 2 +- tests/ui/issues/issue-36379.rs | 2 +- tests/ui/issues/issue-36401.rs | 2 +- tests/ui/issues/issue-36474.rs | 2 +- tests/ui/issues/issue-3656.rs | 6 +- .../issue-3668-2.fixed | 2 +- .../issue-3668-2.rs | 2 +- .../issues/issue-36744-bitcast-args-if-needed.rs | 2 +- tests/ui/issues/issue-36786-resolve-call.rs | 2 +- tests/ui/issues/issue-36816.rs | 2 +- tests/ui/issues/issue-36839.rs | 2 +- tests/ui/issues/issue-36856.rs | 4 +- tests/ui/issues/issue-36936.rs | 2 +- tests/ui/issues/issue-36954.rs | 4 +- tests/ui/issues/issue-3702.rs | 2 +- tests/ui/issues/issue-37051.rs | 2 +- tests/ui/issues/issue-37109.rs | 2 +- tests/ui/issues/issue-37131.rs | 8 +- tests/ui/issues/issue-37291/main.rs | 4 +- .../issue-37311-type-length-limit/issue-37311.rs | 6 +- tests/ui/issues/issue-3743.rs | 2 +- tests/ui/issues/issue-37510.rs | 2 +- tests/ui/issues/issue-3753.rs | 2 +- tests/ui/issues/issue-37598.rs | 2 +- tests/ui/issues/issue-37665.rs | 2 +- tests/ui/issues/issue-37686.rs | 2 +- tests/ui/issues/issue-37725.rs | 2 +- tests/ui/issues/issue-37733.rs | 2 +- tests/ui/issues/issue-38160.rs | 2 +- tests/ui/issues/issue-38190.rs | 4 +- tests/ui/issues/issue-38226.rs | 6 +- tests/ui/issues/issue-38381.rs | 2 +- tests/ui/issues/issue-38437.rs | 2 +- tests/ui/issues/issue-3847.rs | 2 +- tests/ui/issues/issue-38556.rs | 2 +- tests/ui/issues/issue-38727.rs | 2 +- tests/ui/issues/issue-3874.rs | 4 +- tests/ui/issues/issue-38763.rs | 4 +- tests/ui/issues/issue-38875/issue-38875.rs | 4 +- tests/ui/issues/issue-3888-2.rs | 4 +- tests/ui/issues/issue-38942.rs | 2 +- tests/ui/issues/issue-3895.rs | 2 +- tests/ui/issues/issue-38987.rs | 2 +- tests/ui/issues/issue-39089.rs | 2 +- tests/ui/issues/issue-39175.rs | 6 +- tests/ui/issues/issue-39367.rs | 2 +- tests/ui/issues/issue-39548.rs | 2 +- tests/ui/issues/issue-39709.rs | 2 +- tests/ui/issues/issue-3979-2.rs | 4 +- tests/ui/issues/issue-3979-generics.rs | 2 +- tests/ui/issues/issue-3979-xcrate.rs | 4 +- tests/ui/issues/issue-3979.rs | 2 +- tests/ui/issues/issue-39808.rs | 2 +- tests/ui/issues/issue-39827.rs | 2 +- tests/ui/issues/issue-3991.rs | 4 +- tests/ui/issues/issue-39984.rs | 2 +- tests/ui/issues/issue-40136.rs | 2 +- tests/ui/issues/issue-40235.rs | 2 +- tests/ui/issues/issue-4025.rs | 2 +- tests/ui/issues/issue-40350.rs | 2 +- tests/ui/issues/issue-40408.rs | 2 +- .../issue-40510-2.rs | 2 +- .../issue-40510-4.rs | 2 +- tests/ui/issues/issue-40782.fixed | 2 +- tests/ui/issues/issue-40782.rs | 2 +- tests/ui/issues/issue-40883.rs | 2 +- tests/ui/issues/issue-40951.rs | 2 +- tests/ui/issues/issue-41053.rs | 4 +- tests/ui/issues/issue-41213.rs | 2 +- tests/ui/issues/issue-41272.rs | 2 +- tests/ui/issues/issue-41298.rs | 2 +- tests/ui/issues/issue-41479.rs | 2 +- tests/ui/issues/issue-41498.rs | 2 +- tests/ui/issues/issue-41549.rs | 2 +- tests/ui/issues/issue-41604.rs | 2 +- tests/ui/issues/issue-41628.rs | 2 +- tests/ui/issues/issue-41652/issue-41652.rs | 2 +- tests/ui/issues/issue-41677.rs | 2 +- tests/ui/issues/issue-41696.rs | 2 +- tests/ui/issues/issue-41744.rs | 2 +- tests/ui/issues/issue-41849-variance-req.rs | 2 +- tests/ui/issues/issue-41888.rs | 2 +- .../issue-41936-variance-coerce-unsized-cycle.rs | 2 +- tests/ui/issues/issue-41998.rs | 2 +- tests/ui/issues/issue-42007.rs | 4 +- tests/ui/issues/issue-4208.rs | 6 +- tests/ui/issues/issue-42148.rs | 2 +- tests/ui/issues/issue-42210.rs | 4 +- tests/ui/issues/issue-4228.rs | 4 +- tests/ui/issues/issue-42453.rs | 2 +- tests/ui/issues/issue-42467.rs | 2 +- tests/ui/issues/issue-4252.rs | 2 +- tests/ui/issues/issue-42552.rs | 2 +- tests/ui/issues/issue-42956.rs | 2 +- tests/ui/issues/issue-43057.rs | 2 +- tests/ui/issues/issue-43205.rs | 2 +- tests/ui/issues/issue-43291.rs | 2 +- tests/ui/issues/issue-4333.rs | 4 +- tests/ui/issues/issue-43357.rs | 2 +- tests/ui/issues/issue-43483.rs | 2 +- tests/ui/issues/issue-43692.rs | 2 +- tests/ui/issues/issue-43806.rs | 2 +- tests/ui/issues/issue-43853.rs | 4 +- tests/ui/issues/issue-4387.rs | 4 +- tests/ui/issues/issue-43910.rs | 2 +- tests/ui/issues/issue-43923.rs | 2 +- tests/ui/issues/issue-44056.rs | 8 +- tests/ui/issues/issue-44216-add-instant.rs | 6 +- tests/ui/issues/issue-44216-add-system-time.rs | 6 +- tests/ui/issues/issue-44216-sub-instant.rs | 6 +- tests/ui/issues/issue-44216-sub-system-time.rs | 6 +- tests/ui/issues/issue-44239.fixed | 2 +- tests/ui/issues/issue-44239.rs | 2 +- tests/ui/issues/issue-44247.rs | 2 +- tests/ui/issues/issue-4464.rs | 4 +- tests/ui/issues/issue-44730.rs | 2 +- tests/ui/issues/issue-44851.rs | 2 +- tests/ui/issues/issue-4541.rs | 2 +- tests/ui/issues/issue-4542.rs | 4 +- tests/ui/issues/issue-45425.rs | 2 +- tests/ui/issues/issue-4545.rs | 6 +- tests/ui/issues/issue-45510.rs | 2 +- tests/ui/issues/issue-45562.fixed | 2 +- tests/ui/issues/issue-45562.rs | 2 +- tests/ui/issues/issue-45697-1.rs | 2 +- tests/ui/issues/issue-45697.rs | 2 +- tests/ui/issues/issue-45731.rs | 4 +- tests/ui/issues/issue-46069.rs | 2 +- ...-46756-consider-borrowing-cast-or-binexpr.fixed | 2 +- ...sue-46756-consider-borrowing-cast-or-binexpr.rs | 2 +- tests/ui/issues/issue-46855.rs | 4 +- tests/ui/issues/issue-46964.rs | 2 +- tests/ui/issues/issue-47309.rs | 4 +- tests/ui/issues/issue-4734.rs | 2 +- tests/ui/issues/issue-4735.rs | 4 +- tests/ui/issues/issue-47364.rs | 4 +- tests/ui/issues/issue-4759-1.rs | 2 +- tests/ui/issues/issue-4759.rs | 4 +- tests/ui/issues/issue-47638.rs | 2 +- tests/ui/issues/issue-47673.rs | 2 +- tests/ui/issues/issue-47703-1.rs | 2 +- tests/ui/issues/issue-47703-tuple.rs | 2 +- tests/ui/issues/issue-47703.rs | 2 +- tests/ui/issues/issue-47722.rs | 2 +- tests/ui/issues/issue-48006.rs | 2 +- tests/ui/issues/issue-48132.rs | 2 +- tests/ui/issues/issue-48159.rs | 2 +- tests/ui/issues/issue-4830.rs | 4 +- tests/ui/issues/issue-4875.rs | 4 +- tests/ui/issues/issue-48984.rs | 4 +- tests/ui/issues/issue-49298.rs | 4 +- tests/ui/issues/issue-49544.rs | 4 +- tests/ui/issues/issue-49632.rs | 2 +- .../issues/issue-49851/compiler-builtins-error.rs | 4 +- tests/ui/issues/issue-49854.rs | 2 +- tests/ui/issues/issue-49955.rs | 2 +- tests/ui/issues/issue-49973.rs | 2 +- tests/ui/issues/issue-50187.rs | 2 +- tests/ui/issues/issue-50411.rs | 4 +- tests/ui/issues/issue-50415.rs | 2 +- tests/ui/issues/issue-50442.rs | 2 +- tests/ui/issues/issue-50471.rs | 2 +- tests/ui/issues/issue-50518.rs | 2 +- tests/ui/issues/issue-50571.fixed | 2 +- tests/ui/issues/issue-50571.rs | 2 +- tests/ui/issues/issue-5067.rs | 2 +- tests/ui/issues/issue-50761.rs | 2 +- tests/ui/issues/issue-50811.rs | 2 +- .../auxiliary/lib.rs | 4 +- .../issues/issue-50865-private-impl-trait/main.rs | 4 +- tests/ui/issues/issue-51044.rs | 2 +- tests/ui/issues/issue-51655.rs | 2 +- tests/ui/issues/issue-51798.rs | 6 +- tests/ui/issues/issue-51907.rs | 2 +- tests/ui/issues/issue-5192.rs | 4 +- tests/ui/issues/issue-51947.rs | 2 +- tests/ui/issues/issue-52140/main.rs | 8 +- tests/ui/issues/issue-52141/main.rs | 8 +- tests/ui/issues/issue-5239-2.rs | 2 +- tests/ui/issues/issue-52489.rs | 6 +- tests/ui/issues/issue-52705/main.rs | 8 +- tests/ui/issues/issue-5280.rs | 2 +- tests/ui/issues/issue-5315.rs | 4 +- .../issues/issue-5321-immediates-with-bare-self.rs | 2 +- tests/ui/issues/issue-53275.rs | 2 +- tests/ui/issues/issue-53333.rs | 4 +- tests/ui/issues/issue-53419.rs | 2 +- tests/ui/issues/issue-53568.rs | 2 +- tests/ui/issues/issue-53728.rs | 2 +- tests/ui/issues/issue-53843.rs | 2 +- tests/ui/issues/issue-54094.rs | 2 +- .../issue-54462-mutable-noalias-correctness.rs | 4 +- tests/ui/issues/issue-54477-reduced-2.rs | 2 +- tests/ui/issues/issue-54696.rs | 2 +- tests/ui/issues/issue-5518.rs | 6 +- tests/ui/issues/issue-5521.rs | 4 +- tests/ui/issues/issue-55376.rs | 2 +- tests/ui/issues/issue-55380.rs | 2 +- tests/ui/issues/issue-5550.rs | 4 +- tests/ui/issues/issue-5554.rs | 4 +- tests/ui/issues/issue-5572.rs | 4 +- tests/ui/issues/issue-56128.rs | 2 +- tests/ui/issues/issue-56175.rs | 4 +- tests/ui/issues/issue-56229.rs | 2 +- tests/ui/issues/issue-56237.rs | 2 +- tests/ui/issues/issue-5666.rs | 2 +- tests/ui/issues/issue-56870.rs | 2 +- tests/ui/issues/issue-5688.rs | 2 +- tests/ui/issues/issue-56943.rs | 2 +- tests/ui/issues/issue-5708.rs | 2 +- tests/ui/issues/issue-57156.rs | 2 +- tests/ui/issues/issue-57162.rs | 2 +- tests/ui/issues/issue-5718.rs | 4 +- tests/ui/issues/issue-57198-pass.rs | 2 +- tests/ui/issues/issue-57271.rs | 2 +- .../issues/issue-57399-self-return-impl-trait.rs | 2 +- tests/ui/issues/issue-5741.rs | 4 +- tests/ui/issues/issue-5754.rs | 4 +- .../issue-57741.fixed | 2 +- .../issue-57741.rs | 2 +- tests/ui/issues/issue-57781.rs | 2 +- tests/ui/issues/issue-58212.rs | 2 +- .../issue-58375-monomorphize-default-impls.rs | 4 +- tests/ui/issues/issue-5844.rs | 2 +- tests/ui/issues/issue-58463.rs | 4 +- tests/ui/issues/issue-5884.rs | 4 +- tests/ui/issues/issue-5900.rs | 4 +- tests/ui/issues/issue-59020.rs | 6 +- tests/ui/issues/issue-5917.rs | 2 +- tests/ui/issues/issue-59326.rs | 2 +- tests/ui/issues/issue-5950.rs | 4 +- tests/ui/issues/issue-59756.fixed | 2 +- tests/ui/issues/issue-59756.rs | 4 +- tests/ui/issues/issue-5988.rs | 4 +- .../issue-5997.rs | 2 +- tests/ui/issues/issue-6117.rs | 4 +- tests/ui/issues/issue-6130.rs | 2 +- tests/ui/issues/issue-61475.rs | 2 +- tests/ui/issues/issue-6153.rs | 2 +- tests/ui/issues/issue-61894.rs | 2 +- tests/ui/issues/issue-6318.rs | 4 +- tests/ui/issues/issue-6344-let.rs | 2 +- tests/ui/issues/issue-6344-match.rs | 2 +- tests/ui/issues/issue-64430.rs | 2 +- tests/ui/issues/issue-64593.rs | 2 +- tests/ui/issues/issue-65462.rs | 2 +- tests/ui/issues/issue-6557.rs | 4 +- tests/ui/issues/issue-66308.rs | 4 +- tests/ui/issues/issue-67552.rs | 6 +- tests/ui/issues/issue-68010-large-zst-consts.rs | 2 +- tests/ui/issues/issue-68696-catch-during-unwind.rs | 2 +- tests/ui/issues/issue-6892.rs | 2 +- tests/ui/issues/issue-68951.rs | 2 +- tests/ui/issues/issue-6898.rs | 4 +- tests/ui/issues/issue-6919.rs | 6 +- .../issue-70093/issue-70093-link-directives.rs | 10 +- tests/ui/issues/issue-70093/issue-70093.rs | 10 +- tests/ui/issues/issue-7012.rs | 2 +- tests/ui/issues/issue-70673.rs | 2 +- tests/ui/issues/issue-70746.rs | 2 +- .../issue-71676-suggest-deref/issue-71676-1.fixed | 2 +- .../issue-71676-suggest-deref/issue-71676-1.rs | 2 +- tests/ui/issues/issue-7178.rs | 6 +- tests/ui/issues/issue-72002.rs | 2 +- tests/ui/issues/issue-72278.rs | 2 +- tests/ui/issues/issue-7268.rs | 4 +- .../ui/issues/issue-72933-match-stack-overflow.rs | 2 +- tests/ui/issues/issue-73112.rs | 2 +- tests/ui/issues/issue-73229.rs | 2 +- tests/ui/issues/issue-7344.rs | 4 +- tests/ui/issues/issue-74236/auxiliary/dep.rs | 2 +- tests/ui/issues/issue-74236/main.rs | 6 +- .../issues/issue-74564-if-expr-stack-overflow.rs | 2 +- tests/ui/issues/issue-7519-match-unit-in-arg.rs | 4 +- tests/ui/issues/issue-7563.rs | 2 +- tests/ui/issues/issue-75704.rs | 2 +- tests/ui/issues/issue-7575.rs | 2 +- tests/ui/issues/issue-76042.rs | 4 +- tests/ui/issues/issue-7607-2.rs | 4 +- .../issue-76077-1.fixed | 2 +- .../issue-76077-1.rs | 2 +- tests/ui/issues/issue-7660.rs | 4 +- tests/ui/issues/issue-7663.rs | 2 +- ...ssue-7673-cast-generically-implemented-trait.rs | 4 +- tests/ui/issues/issue-77218/issue-77218-2.fixed | 2 +- tests/ui/issues/issue-77218/issue-77218-2.rs | 2 +- tests/ui/issues/issue-77218/issue-77218.fixed | 2 +- tests/ui/issues/issue-77218/issue-77218.rs | 2 +- tests/ui/issues/issue-7784.rs | 2 +- tests/ui/issues/issue-78192.rs | 2 +- tests/ui/issues/issue-7899.rs | 6 +- tests/ui/issues/issue-7911.rs | 2 +- tests/ui/issues/issue-8044.rs | 6 +- tests/ui/issues/issue-81584.fixed | 2 +- tests/ui/issues/issue-81584.rs | 2 +- ...71-default-method-self-inherit-builtin-trait.rs | 4 +- tests/ui/issues/issue-81918.rs | 6 +- tests/ui/issues/issue-8248.rs | 4 +- tests/ui/issues/issue-8249.rs | 4 +- tests/ui/issues/issue-8259.rs | 6 +- tests/ui/issues/issue-83048.rs | 2 +- tests/ui/issues/issue-8391.rs | 2 +- tests/ui/issues/issue-8398.rs | 4 +- tests/ui/issues/issue-8401.rs | 6 +- tests/ui/issues/issue-8498.rs | 2 +- tests/ui/issues/issue-8506.rs | 4 +- tests/ui/issues/issue-8521.rs | 2 +- tests/ui/issues/issue-85461.rs | 8 +- tests/ui/issues/issue-8578.rs | 4 +- tests/ui/issues/issue-87199.rs | 2 +- tests/ui/issues/issue-8727.rs | 4 +- tests/ui/issues/issue-87707.rs | 10 +- tests/ui/issues/issue-8783.rs | 4 +- tests/ui/issues/issue-88150.rs | 6 +- tests/ui/issues/issue-8860.rs | 2 +- tests/ui/issues/issue-8898.rs | 2 +- tests/ui/issues/issue-9047.rs | 2 +- tests/ui/issues/issue-9110.rs | 4 +- tests/ui/issues/issue-9123.rs | 6 +- tests/ui/issues/issue-9129.rs | 2 +- tests/ui/issues/issue-91489.rs | 2 +- tests/ui/issues/issue-9155.rs | 6 +- tests/ui/issues/issue-9188.rs | 4 +- tests/ui/issues/issue-9243.rs | 2 +- tests/ui/issues/issue-9249.rs | 4 +- tests/ui/issues/issue-9259.rs | 2 +- tests/ui/issues/issue-92741.fixed | 2 +- tests/ui/issues/issue-92741.rs | 2 +- tests/ui/issues/issue-9382.rs | 4 +- tests/ui/issues/issue-9446.rs | 2 +- tests/ui/issues/issue-9719.rs | 4 +- tests/ui/issues/issue-9737.rs | 2 +- tests/ui/issues/issue-9837.rs | 2 +- tests/ui/issues/issue-9906.rs | 6 +- tests/ui/issues/issue-9918.rs | 2 +- tests/ui/issues/issue-9942.rs | 4 +- tests/ui/issues/issue-9951.rs | 4 +- tests/ui/issues/issue-9968.rs | 6 +- tests/ui/issues/issue-99838.rs | 2 +- tests/ui/item-name-overload.rs | 4 +- tests/ui/iterators/array-of-ranges.rs | 2 +- tests/ui/iterators/array.rs | 2 +- tests/ui/iterators/into-iter-on-arrays-2018.rs | 4 +- tests/ui/iterators/into-iter-on-arrays-2021.rs | 4 +- tests/ui/iterators/into-iter-on-arrays-lint.fixed | 6 +- tests/ui/iterators/into-iter-on-arrays-lint.rs | 6 +- .../into-iterator-type-inference-shift.rs | 4 +- .../iterators/invalid-iterator-chain-fixable.fixed | 2 +- .../ui/iterators/invalid-iterator-chain-fixable.rs | 2 +- .../ui/iterators/issue-58952-filter-type-length.rs | 4 +- tests/ui/iterators/iter-cloned-type-inference.rs | 2 +- tests/ui/iterators/iter-count-overflow-debug.rs | 8 +- tests/ui/iterators/iter-count-overflow-ndebug.rs | 6 +- tests/ui/iterators/iter-map-fold-type-length.rs | 2 +- tests/ui/iterators/iter-position-overflow-debug.rs | 8 +- .../ui/iterators/iter-position-overflow-ndebug.rs | 6 +- tests/ui/iterators/iter-range.rs | 2 +- tests/ui/iterators/iter-step-overflow-debug.rs | 6 +- tests/ui/iterators/iter-step-overflow-ndebug.rs | 4 +- tests/ui/iterators/iter-sum-overflow-debug.rs | 6 +- tests/ui/iterators/iter-sum-overflow-ndebug.rs | 4 +- .../iterators/iter-sum-overflow-overflow-checks.rs | 6 +- tests/ui/iterators/rsplit-clone.rs | 2 +- tests/ui/iterators/skip-count-overflow.rs | 6 +- tests/ui/json/json-and-color.rs | 2 +- tests/ui/json/json-and-error-format.rs | 2 +- tests/ui/json/json-bom-plus-crlf-multifile-aux.rs | 2 +- tests/ui/json/json-bom-plus-crlf-multifile.rs | 2 +- tests/ui/json/json-bom-plus-crlf-multifile.stderr | 8 +- tests/ui/json/json-bom-plus-crlf.rs | 2 +- tests/ui/json/json-bom-plus-crlf.stderr | 8 +- tests/ui/json/json-invalid.rs | 2 +- tests/ui/json/json-multiple.rs | 6 +- tests/ui/json/json-options.rs | 6 +- tests/ui/json/json-short.rs | 2 +- tests/ui/json/json-short.stderr | 2 +- tests/ui/kindck/kindck-inherited-copy-bound.rs | 2 +- tests/ui/kinds-in-metadata.rs | 6 +- tests/ui/label/label-beginning-with-underscore.rs | 2 +- .../ui/label/label_break_value_desugared_break.rs | 4 +- .../ui/label/label_break_value_illegal_uses.fixed | 2 +- tests/ui/label/label_break_value_illegal_uses.rs | 2 +- tests/ui/lambda-infer-unresolved.rs | 2 +- tests/ui/lang-items/duplicate.rs | 2 +- tests/ui/lang-items/issue-19660.rs | 2 +- tests/ui/lang-items/lang-item-missing.rs | 2 +- tests/ui/lang-items/required-lang-item.rs | 2 +- tests/ui/lang-items/start_lang_item_args.rs | 6 +- .../start_lang_item_with_target_feature.rs | 4 +- tests/ui/last-use-in-block.rs | 2 +- tests/ui/last-use-in-cap-clause.rs | 2 +- tests/ui/last-use-is-capture.rs | 2 +- tests/ui/late-bound-lifetimes/cross_crate_alias.rs | 4 +- .../downgraded_to_early_through_alias.rs | 2 +- tests/ui/late-bound-lifetimes/issue-36381.rs | 2 +- tests/ui/late-bound-lifetimes/issue-47511.rs | 2 +- .../late_bound_through_alias.rs | 2 +- .../ui/late-bound-lifetimes/predicate-is-global.rs | 2 +- tests/ui/layout/big-type-no-err.rs | 2 +- tests/ui/layout/debug.rs | 2 +- tests/ui/layout/enum.rs | 2 +- tests/ui/layout/hexagon-enum.rs | 4 +- .../ui/layout/issue-112048-unsizing-field-order.rs | 2 +- tests/ui/layout/issue-112048-unsizing-niche.rs | 2 +- tests/ui/layout/issue-113941.rs | 6 +- .../issue-60431-unsized-tail-behind-projection.rs | 2 +- ...sue-96158-scalarpair-payload-might-be-uninit.rs | 2 +- tests/ui/layout/issue-96185-overaligned-enum.rs | 2 +- tests/ui/layout/layout-cycle.rs | 2 +- tests/ui/layout/struct.rs | 2 +- tests/ui/layout/thin-meta-implies-thin-ptr.rs | 2 +- tests/ui/layout/thumb-enum.rs | 4 +- tests/ui/layout/too-big-with-padding.rs | 6 +- tests/ui/layout/unsafe-cell-hides-niche.rs | 6 +- tests/ui/layout/valid_range_oob.rs | 8 +- tests/ui/layout/zero-sized-array-enum-niche.rs | 2 +- tests/ui/lazy-and-or.rs | 2 +- tests/ui/lazy-type-alias-impl-trait/branches2.rs | 2 +- .../ui/lazy-type-alias-impl-trait/freeze_cycle.rs | 2 +- .../infer_cross_function.rs | 2 +- .../lifetime_inference.rs | 2 +- tests/ui/lazy-type-alias-impl-trait/nested.rs | 2 +- .../lazy-type-alias-impl-trait/opaque_vs_opaque.rs | 2 +- tests/ui/lazy-type-alias-impl-trait/recursion.rs | 2 +- tests/ui/lazy-type-alias-impl-trait/recursion2.rs | 2 +- .../unsized_sized_opaque.rs | 2 +- tests/ui/lazy-type-alias/coerce-behind-lazy.rs | 6 +- tests/ui/lazy-type-alias/enum-variant.rs | 2 +- .../extern-crate-has-eager-type-aliases.rs | 6 +- .../extern-crate-has-lazy-type-aliases.rs | 6 +- .../ui/lazy-type-alias/implied-outlives-bounds.rs | 4 +- .../ui/lazy-type-alias/leading-where-clause.fixed | 2 +- tests/ui/lazy-type-alias/leading-where-clause.rs | 2 +- .../type-alias-bounds-are-enforced.rs | 2 +- tests/ui/lazy-type-alias/variance.rs | 2 +- tests/ui/let-else/const-fn.rs | 2 +- tests/ui/let-else/issue-100103.rs | 4 +- tests/ui/let-else/issue-102317.rs | 4 +- tests/ui/let-else/issue-99975.rs | 4 +- .../let-else/let-else-binding-explicit-mut-pass.rs | 2 +- tests/ui/let-else/let-else-bindings.rs | 2 +- tests/ui/let-else/let-else-bool-binop-init.fixed | 2 +- tests/ui/let-else/let-else-bool-binop-init.rs | 2 +- tests/ui/let-else/let-else-brace-before-else.fixed | 2 +- tests/ui/let-else/let-else-brace-before-else.rs | 2 +- .../let-else/let-else-deref-coercion-annotated.rs | 2 +- tests/ui/let-else/let-else-drop-order.rs | 6 +- tests/ui/let-else/let-else-irrefutable.rs | 2 +- tests/ui/let-else/let-else-non-copy.rs | 2 +- tests/ui/let-else/let-else-ref-bindings-pass.rs | 2 +- tests/ui/let-else/let-else-run-pass.rs | 2 +- .../let-else/let-else-source-expr-nomove-pass.rs | 2 +- tests/ui/let-else/let-else-temp-borrowck.rs | 2 +- tests/ui/let-else/let-else-temporary-lifetime.rs | 4 +- tests/ui/let-else/let-else.rs | 2 +- tests/ui/lexer/lex-bare-cr-nondoc-comment.rs | 2 +- ...crlf-line-endings-string-literal-doc-comment.rs | 2 +- tests/ui/lexical-scoping.rs | 2 +- .../anonymize-unnamed-bound-vars-in-binders.rs | 2 +- tests/ui/lifetimes/auxiliary/issue-91763-aux.rs | 4 +- tests/ui/lifetimes/bare-trait-object-borrowck.rs | 2 +- tests/ui/lifetimes/bare-trait-object.rs | 2 +- .../ui/lifetimes/elided-lifetime-in-anon-const.rs | 2 +- tests/ui/lifetimes/elided-lifetime-in-param-pat.rs | 2 +- .../elided-lifetime-in-path-in-impl-Fn.rs | 2 +- .../ui/lifetimes/elided-lifetime-in-path-in-pat.rs | 2 +- ...lifetime-in-path-in-type-relative-expression.rs | 2 +- ...me-bound-on-trait-object-using-type-alias.fixed | 2 +- ...etime-bound-on-trait-object-using-type-alias.rs | 2 +- .../issue-104432-unused-lifetimes-in-expansion.rs | 2 +- tests/ui/lifetimes/issue-105227.fixed | 2 +- tests/ui/lifetimes/issue-105227.rs | 2 +- tests/ui/lifetimes/issue-105507.fixed | 2 +- tests/ui/lifetimes/issue-105507.rs | 2 +- tests/ui/lifetimes/issue-36744-without-calls.rs | 2 +- tests/ui/lifetimes/issue-54378.rs | 2 +- tests/ui/lifetimes/issue-67498.rs | 2 +- tests/ui/lifetimes/issue-69314.fixed | 4 +- tests/ui/lifetimes/issue-69314.rs | 4 +- .../lifetimes/issue-70917-lifetimes-in-fn-def.rs | 2 +- tests/ui/lifetimes/issue-76168-hr-outlives-2.rs | 4 +- tests/ui/lifetimes/issue-76168-hr-outlives-3.rs | 2 +- tests/ui/lifetimes/issue-76168-hr-outlives.rs | 4 +- tests/ui/lifetimes/issue-77175.rs | 4 +- .../lifetimes/issue-83737-binders-across-types.rs | 6 +- .../ui/lifetimes/issue-83737-erasing-bound-vars.rs | 6 +- ...3753-invalid-associated-type-supertrait-hrtb.rs | 2 +- .../lifetimes/issue-83907-invalid-fn-like-path.rs | 2 +- tests/ui/lifetimes/issue-84398.rs | 2 +- tests/ui/lifetimes/issue-84604.rs | 4 +- .../lifetimes/issue-90170-elision-mismatch.fixed | 2 +- tests/ui/lifetimes/issue-90170-elision-mismatch.rs | 2 +- tests/ui/lifetimes/issue-91763.rs | 2 +- tests/ui/lifetimes/issue-93911.rs | 4 +- .../lifetime-bound-will-change-warning.rs | 2 +- tests/ui/lifetimes/nested.rs | 2 +- ...t-introducing-and-adding-missing-lifetime.fixed | 2 +- ...gest-introducing-and-adding-missing-lifetime.rs | 2 +- tests/ui/limits/huge-array-simple-32.rs | 4 +- tests/ui/limits/huge-array-simple-64.rs | 4 +- tests/ui/limits/huge-array.rs | 2 +- tests/ui/limits/huge-enum.rs | 6 +- tests/ui/limits/huge-struct.rs | 8 +- tests/ui/limits/issue-15919-32.rs | 4 +- tests/ui/limits/issue-15919-64.rs | 4 +- tests/ui/limits/issue-17913.rs | 6 +- tests/ui/limits/issue-55878.rs | 8 +- tests/ui/limits/issue-56762.rs | 2 +- .../limits/issue-69485-var-size-diffs-too-large.rs | 6 +- tests/ui/limits/issue-75158-64.rs | 4 +- tests/ui/link-section.rs | 2 +- .../auxiliary/link-cfg-works-transitive-rlib.rs | 2 +- .../linkage-attr/common-linkage-non-zero-init.rs | 6 +- tests/ui/linkage-attr/incompatible-flavor.rs | 6 +- tests/ui/linkage-attr/issue-10755.rs | 8 +- tests/ui/linkage-attr/link-cfg-works.rs | 6 +- .../link-self-contained-consistency.rs | 8 +- ...nkage-detect-extern-generated-name-collision.rs | 6 +- ...inkage-detect-local-generated-name-collision.rs | 4 +- tests/ui/linkage-attr/linkage-import.rs | 4 +- tests/ui/linkage-attr/linkage1.rs | 12 +- tests/ui/linkage-attr/linkage2.rs | 2 +- tests/ui/linkage-attr/linkage3.rs | 2 +- tests/ui/linkage-attr/unstable-flavor.rs | 14 +- tests/ui/lint-group-denied-lint-allowed.rs | 4 +- tests/ui/lint-group-forbid-always-trumps-cli.rs | 2 +- tests/ui/lint-unknown-lints-at-crate-level.rs | 4 +- tests/ui/lint/auxiliary/add-impl.rs | 4 +- tests/ui/lint/auxiliary/stability-cfg2.rs | 2 +- tests/ui/lint/auxiliary/stability_cfg2.rs | 2 +- tests/ui/lint/bad-lint-cap.rs | 4 +- tests/ui/lint/bad-lint-cap2.rs | 2 +- tests/ui/lint/bad-lint-cap3.rs | 4 +- tests/ui/lint/clashing-extern-fn-recursion.rs | 2 +- tests/ui/lint/clashing-extern-fn-wasm.rs | 2 +- tests/ui/lint/clashing-extern-fn.rs | 4 +- tests/ui/lint/cli-lint-override.rs | 10 +- tests/ui/lint/cli-unknown-force-warn.rs | 10 +- tests/ui/lint/command-line-lint-group-allow.rs | 4 +- tests/ui/lint/command-line-lint-group-deny.rs | 2 +- tests/ui/lint/command-line-lint-group-forbid.rs | 2 +- tests/ui/lint/command-line-lint-group-warn.rs | 4 +- tests/ui/lint/command-line-register-lint-tool.rs | 4 +- .../command-line-register-unknown-lint-tool.rs | 4 +- tests/ui/lint/dead-code/alias-in-pat.rs | 2 +- .../allow-or-expect-dead_code-114557-2.rs | 2 +- .../allow-or-expect-dead_code-114557-3.rs | 2 +- .../dead-code/allow-or-expect-dead_code-114557.rs | 4 +- tests/ui/lint/dead-code/anon-const-in-pat.rs | 2 +- tests/ui/lint/dead-code/associated-type.rs | 2 +- tests/ui/lint/dead-code/const-and-self.rs | 2 +- .../ui/lint/dead-code/empty-unused-public-enum.rs | 2 +- tests/ui/lint/dead-code/enum-variants.rs | 2 +- tests/ui/lint/dead-code/in-closure.rs | 2 +- tests/ui/lint/dead-code/issue-59003.rs | 2 +- .../lint/dead-code/issue-68408-false-positive.rs | 2 +- tests/ui/lint/dead-code/issue-85071-2.rs | 2 +- tests/ui/lint/dead-code/issue-85071.rs | 2 +- tests/ui/lint/dead-code/issue-85255.rs | 2 +- tests/ui/lint/dead-code/leading-underscore.rs | 4 +- .../lint/dead-code/offset-of-correct-param-env.rs | 2 +- tests/ui/lint/dead-code/self-assign.rs | 4 +- tests/ui/lint/dead-code/trait-impl.rs | 2 +- tests/ui/lint/dead-code/type-in-foreign.rs | 2 +- tests/ui/lint/dead-code/type-in-transparent.rs | 2 +- tests/ui/lint/dead-code/unused-variant-pub.rs | 2 +- tests/ui/lint/dead-code/with-impl.rs | 2 +- tests/ui/lint/dropping_copy_types.rs | 2 +- tests/ui/lint/dropping_references.rs | 2 +- tests/ui/lint/empty-lint-attributes.rs | 2 +- tests/ui/lint/enable-unstable-lib-feature.rs | 2 +- tests/ui/lint/expansion-time-include.rs | 2 +- tests/ui/lint/expansion-time.rs | 2 +- tests/ui/lint/expr-field.rs | 2 +- tests/ui/lint/fn_must_use.rs | 2 +- tests/ui/lint/for_loop_over_fallibles.rs | 2 +- tests/ui/lint/forbid-error-capped.rs | 2 +- tests/ui/lint/forbid-group-member.rs | 2 +- tests/ui/lint/force-warn/allow-warnings.rs | 4 +- .../ui/lint/force-warn/allowed-by-default-lint.rs | 4 +- .../force-warn/allowed-cli-deny-by-default-lint.rs | 4 +- .../force-warn/allowed-deny-by-default-lint.rs | 4 +- .../allowed-group-warn-by-default-lint.rs | 4 +- .../force-warn/allowed-warn-by-default-lint.rs | 4 +- tests/ui/lint/force-warn/cap-lints-allow.rs | 4 +- .../cap-lints-warn-allowed-warn-by-default-lint.rs | 4 +- tests/ui/lint/force-warn/deny-by-default-lint.rs | 4 +- .../lint/force-warn/lint-group-allow-warnings.rs | 4 +- .../lint-group-allowed-cli-warn-by-default-lint.rs | 4 +- .../force-warn/lint-group-allowed-lint-group.rs | 4 +- .../lint-group-allowed-warn-by-default-lint.rs | 4 +- .../force-warn/warn-by-default-lint-two-modules.rs | 4 +- tests/ui/lint/force-warn/warnings-lint-group.rs | 4 +- tests/ui/lint/forgetting_copy_types.rs | 2 +- tests/ui/lint/forgetting_references.rs | 2 +- tests/ui/lint/function-item-references.rs | 2 +- tests/ui/lint/future-incompat-json-test.rs | 4 +- tests/ui/lint/future-incompat-json-test.stderr | 2 +- tests/ui/lint/future-incompat-test.rs | 4 +- tests/ui/lint/inclusive-range-pattern-syntax.fixed | 4 +- tests/ui/lint/inclusive-range-pattern-syntax.rs | 4 +- tests/ui/lint/inert-attr-macro.rs | 2 +- tests/ui/lint/internal/trivial-diagnostics.rs | 2 +- .../lint/invalid-nan-comparison-suggestion.fixed | 4 +- tests/ui/lint/invalid-nan-comparison-suggestion.rs | 4 +- tests/ui/lint/invalid-nan-comparison.rs | 2 +- tests/ui/lint/invalid_from_utf8.rs | 2 +- tests/ui/lint/invalid_value-polymorphic.rs | 4 +- tests/ui/lint/issue-101284.rs | 4 +- tests/ui/lint/issue-102705.rs | 2 +- tests/ui/lint/issue-103317.fixed | 4 +- tests/ui/lint/issue-103317.rs | 4 +- tests/ui/lint/issue-103435-extra-parentheses.fixed | 2 +- tests/ui/lint/issue-103435-extra-parentheses.rs | 2 +- tests/ui/lint/issue-104897.rs | 6 +- tests/ui/lint/issue-108155.rs | 2 +- tests/ui/lint/issue-109529.fixed | 2 +- tests/ui/lint/issue-109529.rs | 2 +- tests/ui/lint/issue-110573.rs | 2 +- tests/ui/lint/issue-112489.rs | 2 +- tests/ui/lint/issue-121070-let-range.rs | 2 +- tests/ui/lint/issue-14837.rs | 4 +- tests/ui/lint/issue-1866.rs | 4 +- tests/ui/lint/issue-19102.rs | 2 +- tests/ui/lint/issue-20343.rs | 4 +- tests/ui/lint/issue-31924-non-snake-ffi.rs | 2 +- tests/ui/lint/issue-34798.rs | 2 +- ...ue-47775-nested-macro-unnecessary-parens-arg.rs | 2 +- ...on-shorthand-field-patterns-in-pattern-macro.rs | 2 +- .../issue-54099-camel-case-underscore-types.rs | 2 +- tests/ui/lint/issue-57410-1.rs | 2 +- tests/ui/lint/issue-57410.rs | 2 +- ...sue-70819-dont-override-forbid-in-same-scope.rs | 2 +- tests/ui/lint/issue-79546-fuel-ice.rs | 4 +- tests/ui/lint/issue-80988.rs | 2 +- tests/ui/lint/issue-81218.rs | 2 +- tests/ui/lint/issue-83477.rs | 4 +- tests/ui/lint/issue-87274-paren-parent.rs | 2 +- tests/ui/lint/issue-89469.rs | 2 +- ...low-text-direction-codepoint-in-comment-lint.rs | 2 +- tests/ui/lint/known-tool-in-submodule/root.rs | 2 +- tests/ui/lint/known-tool-in-submodule/submodule.rs | 2 +- .../lint/large_assignments/copy_into_box_rc_arc.rs | 8 +- tests/ui/lint/large_assignments/copy_into_fn.rs | 2 +- tests/ui/lint/large_assignments/large_future.rs | 12 +- .../lint/large_assignments/move_into_box_rc_arc.rs | 8 +- tests/ui/lint/large_assignments/move_into_fn.rs | 2 +- .../lint/let_underscore/issue-119696-err-on-fn.rs | 2 +- .../ui/lint/let_underscore/let_underscore_drop.rs | 2 +- .../ui/lint/let_underscore/let_underscore_lock.rs | 2 +- tests/ui/lint/lint-cap-trait-bounds.rs | 4 +- tests/ui/lint/lint-cap.rs | 4 +- tests/ui/lint/lint-const-item-mutation.rs | 2 +- tests/ui/lint/lint-ctypes-113436.rs | 2 +- tests/ui/lint/lint-ctypes-113900.rs | 2 +- tests/ui/lint/lint-ctypes-66202.rs | 2 +- tests/ui/lint/lint-ctypes-73249-1.rs | 2 +- tests/ui/lint/lint-ctypes-73249-4.rs | 2 +- tests/ui/lint/lint-ctypes-73249.rs | 2 +- tests/ui/lint/lint-ctypes-73251.rs | 2 +- tests/ui/lint/lint-ctypes-73747.rs | 2 +- tests/ui/lint/lint-exceeding-bitshifts.rs | 14 +- .../lint/lint-expr-stmt-attrs-for-early-lints.rs | 2 +- tests/ui/lint/lint-ffi-safety-all-phantom.rs | 2 +- tests/ui/lint/lint-forbid-cmdline.rs | 2 +- tests/ui/lint/lint-invalid-atomic-ordering-bool.rs | 2 +- .../lint-invalid-atomic-ordering-exchange-weak.rs | 2 +- .../lint/lint-invalid-atomic-ordering-exchange.rs | 2 +- .../lint-invalid-atomic-ordering-false-positive.rs | 4 +- .../ui/lint/lint-invalid-atomic-ordering-fence.rs | 2 +- .../lint-invalid-atomic-ordering-fetch-update.rs | 2 +- tests/ui/lint/lint-invalid-atomic-ordering-int.rs | 2 +- tests/ui/lint/lint-invalid-atomic-ordering-ptr.rs | 2 +- tests/ui/lint/lint-invalid-atomic-ordering-uint.rs | 2 +- tests/ui/lint/lint-level-macro-def-mod.rs | 2 +- tests/ui/lint/lint-level-macro-def.rs | 2 +- .../lint-lowercase-static-const-pattern-rename.rs | 2 +- .../lint-missing-copy-implementations-allow.rs | 2 +- tests/ui/lint/lint-missing-doc.rs | 2 +- tests/ui/lint/lint-non-camel-case-variant.rs | 2 +- ...int-non-camel-case-with-trailing-underscores.rs | 4 +- tests/ui/lint/lint-non-snake-case-crate-2.rs | 4 +- .../lint-non-snake-case-no-lowercase-equivalent.rs | 4 +- tests/ui/lint/lint-output-format-2.rs | 4 +- tests/ui/lint/lint-output-format.rs | 4 +- tests/ui/lint/lint-pre-expansion-extern-module.rs | 6 +- .../lint/lint-pub-unreachable-for-nested-glob.rs | 2 +- tests/ui/lint/lint-qualification.fixed | 2 +- tests/ui/lint/lint-qualification.rs | 2 +- tests/ui/lint/lint-removed-cmdline-deny.rs | 8 +- tests/ui/lint/lint-removed-cmdline.rs | 8 +- tests/ui/lint/lint-renamed-cmdline-deny.rs | 12 +- tests/ui/lint/lint-renamed-cmdline.rs | 10 +- tests/ui/lint/lint-shorthand-field.fixed | 2 +- tests/ui/lint/lint-shorthand-field.rs | 2 +- tests/ui/lint/lint-stability-2.rs | 4 +- tests/ui/lint/lint-stability-deprecated.rs | 10 +- tests/ui/lint/lint-stability-fields-deprecated.rs | 2 +- tests/ui/lint/lint-stability-fields.rs | 2 +- tests/ui/lint/lint-stability.rs | 8 +- tests/ui/lint/lint-stability2.rs | 4 +- tests/ui/lint/lint-stability3.rs | 4 +- tests/ui/lint/lint-type-limits.rs | 2 +- tests/ui/lint/lint-type-limits2.rs | 2 +- tests/ui/lint/lint-type-limits3.rs | 2 +- tests/ui/lint/lint-type-overflow2.rs | 2 +- tests/ui/lint/lint-unconditional-drop-recursion.rs | 2 +- tests/ui/lint/lint-unexported-no-mangle.rs | 2 +- tests/ui/lint/lint-unknown-feature-default.rs | 2 +- tests/ui/lint/lint-unknown-feature.rs | 2 +- tests/ui/lint/lint-unknown-lint-cmdline-allow.rs | 4 +- tests/ui/lint/lint-unknown-lint-cmdline-deny.rs | 12 +- tests/ui/lint/lint-unknown-lint-cmdline.rs | 16 +- tests/ui/lint/lint-unnecessary-parens.fixed | 2 +- tests/ui/lint/lint-unnecessary-parens.rs | 2 +- .../lint/lint_pre_expansion_extern_module_aux.rs | 2 +- tests/ui/lint/lints-in-foreign-macros.rs | 4 +- .../missing-copy-implementations-negative-copy.rs | 2 +- .../missing-copy-implementations-non-exhaustive.rs | 2 +- tests/ui/lint/must_not_suspend/boxed.rs | 2 +- tests/ui/lint/must_not_suspend/dedup.rs | 2 +- .../feature-gate-must_not_suspend.rs | 2 +- tests/ui/lint/must_not_suspend/gated.rs | 4 +- tests/ui/lint/must_not_suspend/generic.rs | 4 +- tests/ui/lint/must_not_suspend/handled.rs | 4 +- tests/ui/lint/must_not_suspend/issue-89562.rs | 4 +- tests/ui/lint/must_not_suspend/mutex.rs | 2 +- tests/ui/lint/must_not_suspend/other_items.rs | 2 +- tests/ui/lint/must_not_suspend/ref.rs | 2 +- tests/ui/lint/must_not_suspend/return.rs | 2 +- tests/ui/lint/must_not_suspend/trait.rs | 2 +- tests/ui/lint/must_not_suspend/unit.rs | 2 +- tests/ui/lint/must_not_suspend/warn.rs | 4 +- tests/ui/lint/noop-method-call.fixed | 4 +- tests/ui/lint/noop-method-call.rs | 4 +- tests/ui/lint/not_found.rs | 2 +- tests/ui/lint/outer-forbid.rs | 2 +- tests/ui/lint/ptr_null_checks.rs | 2 +- tests/ui/lint/reasons-erroneous.rs | 2 +- tests/ui/lint/reasons-forbidden.rs | 2 +- tests/ui/lint/reasons.rs | 2 +- .../auxiliary/redundant-semi-proc-macro-def.rs | 4 +- .../redundant-semi-proc-macro.rs | 2 +- .../redundant-semi-proc-macro.stderr | 2 +- tests/ui/lint/reference_casting.rs | 2 +- tests/ui/lint/renamed-lints-still-apply.rs | 2 +- .../avoid_delayed_good_path_ice.rs | 2 +- .../catch_multiple_lint_triggers.rs | 2 +- .../rfc-2383-lint-reason/crate_level_expect.rs | 2 +- .../rfc-2383-lint-reason/expect_inside_macro.rs | 2 +- .../rfc-2383-lint-reason/expect_lint_from_macro.rs | 2 +- .../rfc-2383-lint-reason/expect_multiple_lints.rs | 2 +- .../rfc-2383-lint-reason/expect_on_fn_params.rs | 2 +- .../expect_tool_lint_rfc_2383.rs | 2 +- .../expect_unfulfilled_expectation.rs | 2 +- .../expect_unused_inside_impl_block.rs | 4 +- .../rfc-2383-lint-reason/expect_with_forbid.rs | 2 +- .../rfc-2383-lint-reason/expect_with_reason.rs | 2 +- .../force_warn_expected_lints_fulfilled.rs | 8 +- .../force_warn_expected_lints_unfulfilled.rs | 8 +- .../fulfilled_expectation_early_lints.rs | 2 +- .../fulfilled_expectation_late_lints.rs | 2 +- .../rfc-2383-lint-reason/multiple_expect_attrs.rs | 2 +- .../no_ice_for_partial_compiler_runs.rs | 4 +- .../no_ice_for_partial_compiler_runs.stdout | 4 +- .../root-attribute-confusion.rs | 4 +- .../lint-mixed-script-confusables-2.rs | 2 +- tests/ui/lint/rustdoc-group.rs | 4 +- .../foreign-crate.rs | 4 +- .../semicolon-in-expressions-from-macros.rs | 4 +- .../warn-semicolon-in-expressions-from-macros.rs | 2 +- tests/ui/lint/special-upper-lower-cases.rs | 2 +- tests/ui/lint/suggestions.fixed | 2 +- tests/ui/lint/suggestions.rs | 2 +- .../test-allow-dead-extern-static-no-warning.rs | 4 +- tests/ui/lint/test-inner-fn.rs | 2 +- tests/ui/lint/trivial-cast-ice.rs | 4 +- tests/ui/lint/type-overflow.rs | 2 +- .../ui/lint/unaligned_references_external_macro.rs | 2 +- tests/ui/lint/unconditional_panic_98444.rs | 2 +- tests/ui/lint/undropped_manually_drops.rs | 2 +- .../ui/lint/unknown-lints/allow-in-other-module.rs | 2 +- tests/ui/lint/unknown-lints/other.rs | 2 +- tests/ui/lint/unnecessary-extern-crate.rs | 2 +- tests/ui/lint/unreachable-async-fn.rs | 4 +- tests/ui/lint/unreachable_pub.rs | 2 +- .../unsafe_code/auxiliary/forge_unsafe_block.rs | 4 +- tests/ui/lint/unsafe_code/forge_unsafe_block.rs | 4 +- .../unused-braces-while-let-with-mutable-value.rs | 2 +- .../unused-qualification-in-derive-expansion.rs | 4 +- tests/ui/lint/unused/assoc-types.rs | 4 +- tests/ui/lint/unused/auxiliary/must-use-foreign.rs | 2 +- tests/ui/lint/unused/const-local-var.rs | 2 +- tests/ui/lint/unused/issue-103320-must-use-ops.rs | 2 +- tests/ui/lint/unused/issue-104397.rs | 2 +- .../unused/issue-117142-invalid-remove-parens.rs | 2 +- ...ssue-47390-unused-variable-in-struct-pattern.rs | 2 +- .../lint/unused/issue-54180-unused-ref-field.fixed | 2 +- .../ui/lint/unused/issue-54180-unused-ref-field.rs | 2 +- .../unused/issue-54538-unused-parens-lint.fixed | 2 +- .../lint/unused/issue-54538-unused-parens-lint.rs | 2 +- tests/ui/lint/unused/issue-70041.rs | 4 +- .../lint/unused/issue-71290-unused-paren-binop.rs | 2 +- .../unused/issue-81314-unused-span-ident.fixed | 2 +- .../lint/unused/issue-81314-unused-span-ident.rs | 2 +- tests/ui/lint/unused/issue-88519-unused-paren.rs | 2 +- tests/ui/lint/unused/issue-90807-unused-paren.rs | 2 +- tests/ui/lint/unused/lint-unused-extern-crate.rs | 10 +- tests/ui/lint/unused/lint-unused-mut-self.fixed | 2 +- tests/ui/lint/unused/lint-unused-mut-self.rs | 2 +- tests/ui/lint/unused/lint-unused-mut-variables.rs | 2 +- tests/ui/lint/unused/lint-unused-variables.rs | 4 +- tests/ui/lint/unused/must-use-block-expr.fixed | 4 +- tests/ui/lint/unused/must-use-block-expr.rs | 4 +- tests/ui/lint/unused/must-use-box-from-raw.rs | 2 +- tests/ui/lint/unused/must-use-foreign.rs | 6 +- tests/ui/lint/unused/must-use-ops.rs | 2 +- .../lint/unused/no-unused-parens-return-block.rs | 2 +- tests/ui/lint/unused/trait-alias-supertrait.rs | 2 +- tests/ui/lint/unused/unused-async.rs | 2 +- tests/ui/lint/unused/unused-attr-duplicate.rs | 4 +- tests/ui/lint/unused/unused-closure.rs | 2 +- .../unused/unused-mut-warning-captured-var.fixed | 2 +- .../lint/unused/unused-mut-warning-captured-var.rs | 2 +- tests/ui/lint/unused/unused-parens-issue-106413.rs | 2 +- tests/ui/lint/unused_braces.fixed | 4 +- tests/ui/lint/unused_braces.rs | 4 +- tests/ui/lint/unused_braces_borrow.fixed | 4 +- tests/ui/lint/unused_braces_borrow.rs | 4 +- tests/ui/lint/unused_braces_macro.rs | 2 +- tests/ui/lint/unused_import_warning_issue_45268.rs | 2 +- tests/ui/lint/unused_labels.rs | 2 +- tests/ui/lint/unused_parens_json_suggestion.fixed | 6 +- tests/ui/lint/unused_parens_json_suggestion.rs | 6 +- tests/ui/lint/unused_parens_json_suggestion.stderr | 2 +- tests/ui/lint/unused_parens_multibyte_recovery.rs | 6 +- .../unused_parens_remove_json_suggestion.fixed | 6 +- .../lint/unused_parens_remove_json_suggestion.rs | 6 +- .../unused_parens_remove_json_suggestion.stderr | 18 +- tests/ui/lint/unused_variables-issue-82488.fixed | 2 +- tests/ui/lint/unused_variables-issue-82488.rs | 2 +- tests/ui/lint/use-redundant/issue-92904.rs | 2 +- .../use-redundant/use-redundant-glob-parent.rs | 2 +- tests/ui/lint/use-redundant/use-redundant-glob.rs | 2 +- .../use-redundant-multiple-namespaces.rs | 2 +- .../lint/use-redundant/use-redundant-not-parent.rs | 2 +- tests/ui/lint/use-redundant/use-redundant.rs | 2 +- tests/ui/lint/use_suggestion_json.rs | 6 +- tests/ui/lint/use_suggestion_json.stderr | 52 +++--- tests/ui/lint/warn-ctypes-inhibit.rs | 6 +- tests/ui/lint/warn-path-statement.rs | 2 +- tests/ui/lint/wide_pointer_comparisons.rs | 2 +- tests/ui/list.rs | 4 +- tests/ui/liveness/liveness-asm.rs | 4 +- .../liveness-assign-imm-local-after-ret.rs | 4 +- tests/ui/liveness/liveness-consts.rs | 2 +- tests/ui/liveness/liveness-derive.rs | 4 +- tests/ui/liveness/liveness-upvars.rs | 4 +- tests/ui/log-err-phi.rs | 2 +- tests/ui/log-knows-the-names-of-variants.rs | 2 +- tests/ui/log-poly.rs | 2 +- tests/ui/logging-only-prints-once.rs | 6 +- tests/ui/loops/dont-suggest-break-thru-item.rs | 2 +- tests/ui/loops/for-each-loop-panic.rs | 6 +- .../ui/loops/issue-69225-SCEVAddExpr-wrap-flag.rs | 10 +- .../issue-69225-layout-repeated-checked-add.rs | 10 +- tests/ui/loops/loop-break-unsize.rs | 2 +- tests/ui/loud_ui.rs | 2 +- tests/ui/lowering/issue-96847.rs | 2 +- tests/ui/lto/all-crates.rs | 6 +- tests/ui/lto/auxiliary/debuginfo-lto-aux.rs | 2 +- tests/ui/lto/auxiliary/dylib.rs | 2 +- tests/ui/lto/auxiliary/lto-duplicate-symbols1.rs | 2 +- tests/ui/lto/auxiliary/lto-duplicate-symbols2.rs | 2 +- .../lto/auxiliary/lto-rustc-loads-linker-plugin.rs | 4 +- tests/ui/lto/auxiliary/msvc-imp-present.rs | 4 +- tests/ui/lto/auxiliary/thin-lto-inlines-aux.rs | 2 +- tests/ui/lto/auxiliary/thinlto-dylib.rs | 2 +- tests/ui/lto/debuginfo-lto.rs | 8 +- tests/ui/lto/dylib-works.rs | 4 +- tests/ui/lto/fat-lto.rs | 6 +- tests/ui/lto/issue-100772.rs | 10 +- tests/ui/lto/issue-105637.rs | 6 +- tests/ui/lto/issue-11154.rs | 6 +- tests/ui/lto/lto-and-no-bitcode-in-rlib.rs | 2 +- tests/ui/lto/lto-duplicate-symbols.rs | 14 +- tests/ui/lto/lto-many-codegen-units.rs | 6 +- tests/ui/lto/lto-opt-level-s.rs | 6 +- tests/ui/lto/lto-opt-level-z.rs | 6 +- tests/ui/lto/lto-rustc-loads-linker-plugin.rs | 8 +- tests/ui/lto/lto-still-runs-thread-dtors.rs | 8 +- tests/ui/lto/lto-thin-rustc-loads-linker-plugin.rs | 8 +- tests/ui/lto/msvc-imp-present.rs | 8 +- tests/ui/lto/thin-lto-global-allocator.rs | 4 +- tests/ui/lto/thin-lto-inlines.rs | 6 +- tests/ui/lto/thin-lto-inlines2.rs | 10 +- tests/ui/lto/weak-works.rs | 6 +- tests/ui/lub-glb/empty-binder-future-compat.rs | 2 +- tests/ui/lub-glb/empty-binders.rs | 2 +- tests/ui/lub-glb/old-lub-glb-hr-eq.rs | 2 +- tests/ui/lub-glb/old-lub-glb-hr-noteq1.rs | 4 +- tests/ui/lub-glb/old-lub-glb-hr-noteq2.rs | 6 +- tests/ui/macro_backtrace/main.rs | 6 +- tests/ui/macros/assert-as-macro.rs | 6 +- tests/ui/macros/assert-eq-macro-msg.rs | 10 +- tests/ui/macros/assert-eq-macro-panic.rs | 10 +- tests/ui/macros/assert-eq-macro-success.rs | 2 +- tests/ui/macros/assert-eq-macro-unsized.rs | 2 +- tests/ui/macros/assert-format-lazy.rs | 4 +- tests/ui/macros/assert-long-condition.rs | 8 +- tests/ui/macros/assert-macro-explicit.rs | 6 +- tests/ui/macros/assert-macro-fmt.rs | 8 +- tests/ui/macros/assert-macro-owned.rs | 8 +- tests/ui/macros/assert-macro-static.rs | 8 +- tests/ui/macros/assert-matches-macro-msg.rs | 10 +- tests/ui/macros/assert-ne-macro-msg.rs | 10 +- tests/ui/macros/assert-ne-macro-panic.rs | 10 +- tests/ui/macros/assert-ne-macro-success.rs | 2 +- tests/ui/macros/assert-ne-macro-unsized.rs | 2 +- tests/ui/macros/assert-trailing-junk.rs | 4 +- tests/ui/macros/assert.rs | 4 +- tests/ui/macros/attr-from-macro.rs | 4 +- .../ui/macros/auxiliary/foreign-crate-macro-pat.rs | 2 +- tests/ui/macros/auxiliary/hello_macro.rs | 4 +- tests/ui/macros/auxiliary/issue-100199.rs | 4 +- tests/ui/macros/auxiliary/proc_macro_def.rs | 4 +- tests/ui/macros/auxiliary/proc_macro_sequence.rs | 4 +- tests/ui/macros/bang-after-name.fixed | 2 +- tests/ui/macros/bang-after-name.rs | 2 +- tests/ui/macros/builtin-env-issue-114010.rs | 4 +- tests/ui/macros/builtin-std-paths.rs | 2 +- tests/ui/macros/colorful-write-macros.rs | 2 +- tests/ui/macros/concat-bytes.rs | 2 +- tests/ui/macros/concat-rpass.rs | 2 +- tests/ui/macros/conditional-debug-macro-on.rs | 2 +- tests/ui/macros/cross-crate-pat-span.rs | 6 +- tests/ui/macros/die-macro-2.rs | 6 +- tests/ui/macros/die-macro-expr.rs | 6 +- tests/ui/macros/die-macro-pure.rs | 6 +- tests/ui/macros/die-macro.rs | 2 +- tests/ui/macros/doc-comment.rs | 2 +- tests/ui/macros/dollar-crate-nested-encoding.rs | 4 +- tests/ui/macros/duplicate-builtin.rs | 2 +- tests/ui/macros/edition-macro-pats.rs | 4 +- tests/ui/macros/format-args-temporaries-async.rs | 4 +- .../ui/macros/format-args-temporaries-in-write.rs | 2 +- tests/ui/macros/format-args-temporaries.rs | 2 +- tests/ui/macros/html-literals.rs | 2 +- tests/ui/macros/include-single-expr-helper-1.rs | 2 +- tests/ui/macros/include-single-expr-helper.rs | 2 +- tests/ui/macros/include-single-expr.rs | 2 +- tests/ui/macros/issue-100199.rs | 2 +- tests/ui/macros/issue-112342-2.rs | 2 +- tests/ui/macros/issue-118786.rs | 2 +- tests/ui/macros/issue-19163.rs | 2 +- tests/ui/macros/issue-22463.rs | 2 +- tests/ui/macros/issue-25274.rs | 2 +- tests/ui/macros/issue-26322.rs | 2 +- tests/ui/macros/issue-2804-2.rs | 2 +- tests/ui/macros/issue-2804.rs | 2 +- tests/ui/macros/issue-33185.rs | 2 +- tests/ui/macros/issue-34171.rs | 2 +- tests/ui/macros/issue-37175.rs | 2 +- tests/ui/macros/issue-39467.rs | 2 +- tests/ui/macros/issue-40469.rs | 2 +- tests/ui/macros/issue-40770.rs | 2 +- tests/ui/macros/issue-41803.rs | 2 +- tests/ui/macros/issue-42954.fixed | 2 +- tests/ui/macros/issue-42954.rs | 2 +- tests/ui/macros/issue-44127.rs | 2 +- tests/ui/macros/issue-5060.rs | 2 +- tests/ui/macros/issue-52169.rs | 2 +- tests/ui/macros/issue-57597.rs | 2 +- tests/ui/macros/issue-63102.rs | 2 +- tests/ui/macros/issue-68058.rs | 2 +- tests/ui/macros/issue-69838-dir/bar.rs | 2 +- tests/ui/macros/issue-69838-dir/included.rs | 2 +- .../issue-69838-mods-relative-to-included-path.rs | 2 +- tests/ui/macros/issue-70446.rs | 2 +- .../macros/issue-75982-foreign-macro-weird-mod.rs | 4 +- tests/ui/macros/issue-77475.rs | 2 +- tests/ui/macros/issue-78333.rs | 2 +- .../issue-78892-substitution-in-statement-attr.rs | 2 +- tests/ui/macros/issue-81006.rs | 2 +- tests/ui/macros/issue-83340.rs | 2 +- tests/ui/macros/issue-83344.rs | 2 +- tests/ui/macros/issue-84429-matches-edition.rs | 4 +- .../macros/issue-86082-option-env-invalid-char.rs | 2 +- tests/ui/macros/issue-8709.rs | 2 +- tests/ui/macros/issue-87877.rs | 2 +- tests/ui/macros/issue-88206.rs | 2 +- tests/ui/macros/issue-88228.rs | 4 +- tests/ui/macros/issue-8851.rs | 4 +- tests/ui/macros/issue-92267.rs | 2 +- tests/ui/macros/issue-95267.rs | 2 +- tests/ui/macros/issue-95533.rs | 2 +- tests/ui/macros/issue-98466-allow.rs | 2 +- tests/ui/macros/issue-98466.fixed | 4 +- tests/ui/macros/issue-98466.rs | 4 +- tests/ui/macros/issue-98790.rs | 2 +- tests/ui/macros/issue-99261.rs | 2 +- tests/ui/macros/issue-99265.fixed | 4 +- tests/ui/macros/issue-99265.rs | 4 +- tests/ui/macros/issue-99907.fixed | 4 +- tests/ui/macros/issue-99907.rs | 4 +- tests/ui/macros/lint-trailing-macro-call.rs | 2 +- .../log_syntax-trace_macros-macro-locations.rs | 4 +- tests/ui/macros/macro-2.rs | 2 +- tests/ui/macros/macro-as-fn-body.rs | 2 +- .../ui/macros/macro-at-most-once-rep-2015-rpass.rs | 4 +- tests/ui/macros/macro-at-most-once-rep-2015.rs | 2 +- .../ui/macros/macro-at-most-once-rep-2018-rpass.rs | 4 +- tests/ui/macros/macro-at-most-once-rep-2018.rs | 2 +- tests/ui/macros/macro-attribute-expansion.rs | 2 +- tests/ui/macros/macro-attributes.rs | 2 +- tests/ui/macros/macro-block-nonterminal.rs | 2 +- tests/ui/macros/macro-comma-behavior-rpass.rs | 8 +- tests/ui/macros/macro-comma-behavior.rs | 4 +- tests/ui/macros/macro-comma-support-rpass.rs | 6 +- tests/ui/macros/macro-crate-def-only.rs | 4 +- .../ui/macros/macro-crate-nonterminal-non-root.rs | 2 +- tests/ui/macros/macro-crate-nonterminal-renamed.rs | 4 +- tests/ui/macros/macro-crate-nonterminal.rs | 4 +- tests/ui/macros/macro-crate-use.rs | 2 +- tests/ui/macros/macro-deep_expansion.rs | 2 +- tests/ui/macros/macro-def-site-super.rs | 4 +- tests/ui/macros/macro-delimiter-significance.rs | 2 +- tests/ui/macros/macro-deprecation.rs | 4 +- tests/ui/macros/macro-doc-comments.rs | 2 +- tests/ui/macros/macro-doc-escapes.rs | 2 +- tests/ui/macros/macro-doc-raw-str-hashes.rs | 2 +- tests/ui/macros/macro-expanded-include/foo/mod.rs | 2 +- tests/ui/macros/macro-expanded-include/test.rs | 4 +- tests/ui/macros/macro-export-inner-module.rs | 4 +- tests/ui/macros/macro-first-set.rs | 2 +- tests/ui/macros/macro-follow-rpass.rs | 2 +- tests/ui/macros/macro-followed-by-seq.rs | 2 +- tests/ui/macros/macro-in-expression-context.fixed | 2 +- tests/ui/macros/macro-in-expression-context.rs | 2 +- tests/ui/macros/macro-in-fn.rs | 2 +- tests/ui/macros/macro-include-items.rs | 2 +- ...ro-invocation-in-count-expr-fixed-array-type.rs | 4 +- tests/ui/macros/macro-lifetime-used-with-bound.rs | 2 +- tests/ui/macros/macro-lifetime-used-with-labels.rs | 2 +- tests/ui/macros/macro-lifetime-used-with-static.rs | 2 +- tests/ui/macros/macro-lifetime.rs | 2 +- tests/ui/macros/macro-literal.rs | 2 +- tests/ui/macros/macro-meta-items-modern.rs | 2 +- tests/ui/macros/macro-meta-items.rs | 4 +- tests/ui/macros/macro-method-issue-4621.rs | 2 +- .../macros/macro-missing-fragment-deduplication.rs | 2 +- tests/ui/macros/macro-multiple-items.rs | 2 +- tests/ui/macros/macro-named-default.rs | 2 +- .../macros/macro-nested_definition_issue-31946.rs | 2 +- tests/ui/macros/macro-nested_expr.rs | 2 +- tests/ui/macros/macro-nested_stmt_macros.rs | 2 +- tests/ui/macros/macro-nt-list.rs | 4 +- tests/ui/macros/macro-of-higher-order.rs | 2 +- .../ui/macros/macro-or-patterns-back-compat.fixed | 4 +- tests/ui/macros/macro-or-patterns-back-compat.rs | 4 +- tests/ui/macros/macro-pat-follow-2018.rs | 4 +- tests/ui/macros/macro-pat-follow.rs | 2 +- tests/ui/macros/macro-pat-neg-lit.rs | 2 +- .../macro-pat-pattern-followed-by-or-in-2021.rs | 2 +- .../ui/macros/macro-pat-pattern-followed-by-or.rs | 2 +- tests/ui/macros/macro-pat.rs | 2 +- .../macros/macro-pat2021-pattern-followed-by-or.rs | 2 +- tests/ui/macros/macro-path-prelude-pass.rs | 2 +- tests/ui/macros/macro-path-prelude-shadowing.rs | 2 +- tests/ui/macros/macro-path.rs | 2 +- tests/ui/macros/macro-pub-matcher.rs | 2 +- tests/ui/macros/macro-quote-test.rs | 4 +- tests/ui/macros/macro-reexport-removed.rs | 2 +- tests/ui/macros/macro-seq-followed-by-seq.rs | 2 +- tests/ui/macros/macro-shadowing-relaxed.rs | 4 +- tests/ui/macros/macro-shadowing.rs | 2 +- tests/ui/macros/macro-stability-rpass.rs | 4 +- tests/ui/macros/macro-stability.rs | 2 +- tests/ui/macros/macro-stmt-matchers.rs | 2 +- tests/ui/macros/macro-stmt.rs | 2 +- tests/ui/macros/macro-stmt_macro_in_expr_macro.rs | 2 +- tests/ui/macros/macro-tt-followed-by-seq.rs | 2 +- tests/ui/macros/macro-tt-matchers.rs | 2 +- tests/ui/macros/macro-use-all-and-none.rs | 4 +- tests/ui/macros/macro-use-all.rs | 4 +- tests/ui/macros/macro-use-both.rs | 4 +- tests/ui/macros/macro-use-one.rs | 4 +- tests/ui/macros/macro-use-scope.rs | 4 +- tests/ui/macros/macro-use-undef.rs | 2 +- tests/ui/macros/macro-use-wrong-name.rs | 2 +- tests/ui/macros/macro-with-attrs1.rs | 4 +- tests/ui/macros/macro-with-attrs2.rs | 2 +- .../macros/macro-with-braces-in-expr-position.rs | 4 +- tests/ui/macros/macro_with_super_2.rs | 6 +- tests/ui/macros/macros-in-extern.rs | 4 +- tests/ui/macros/macros-nonfatal-errors.rs | 2 +- tests/ui/macros/meta-variable-misuse.rs | 2 +- tests/ui/macros/missing-bang-in-decl.fixed | 2 +- tests/ui/macros/missing-bang-in-decl.rs | 2 +- tests/ui/macros/must-use-in-macro-55516.rs | 4 +- tests/ui/macros/nested-use-as.rs | 4 +- tests/ui/macros/no-std-macros.rs | 4 +- tests/ui/macros/none-delim-lookahead.rs | 2 +- tests/ui/macros/not-utf8.rs | 2 +- tests/ui/macros/out-of-order-shadowing.rs | 2 +- tests/ui/macros/panic-temporaries-2018.rs | 4 +- tests/ui/macros/panic-temporaries.rs | 4 +- tests/ui/macros/parse-complex-macro-invoc-op.rs | 4 +- tests/ui/macros/paths-in-macro-invocations.rs | 4 +- tests/ui/macros/proc_macro.rs | 6 +- tests/ui/macros/pub-item-inside-macro.rs | 4 +- tests/ui/macros/pub-method-inside-macro.rs | 4 +- tests/ui/macros/recovery-forbidden.rs | 2 +- .../all-expr-kinds.rs | 8 +- .../all-not-available-cases.rs | 8 +- ...stom-errors-does-not-create-unnecessary-code.rs | 4 +- ...ut-captures-does-not-create-unnecessary-code.rs | 8 +- .../feature-gate-generic_assert.rs | 4 +- ...non-consuming-methods-have-optimized-codegen.rs | 4 +- ...consuming-methods-have-optimized-codegen.stdout | 4 +- .../count-and-length-are-distinct.rs | 2 +- .../dollar-dollar-has-correct-behavior.rs | 2 +- .../feature-gate-macro_metavar_expr.rs | 2 +- .../rfc-3086-metavar-expr/macro-expansion.rs | 2 +- tests/ui/macros/same-sequence-span.rs | 2 +- tests/ui/macros/semi-after-macro-ty.rs | 2 +- tests/ui/macros/stmt_expr_attr_macro_parse.rs | 2 +- tests/ui/macros/stringify.rs | 6 +- tests/ui/macros/syntax-extension-cfg.rs | 4 +- tests/ui/macros/syntax-extension-source-utils.rs | 2 +- tests/ui/macros/trace-macro.rs | 4 +- tests/ui/macros/trace_faulty_macros.rs | 2 +- tests/ui/macros/try-macro.rs | 2 +- tests/ui/macros/two-macro-use.rs | 4 +- tests/ui/macros/type-macros-hlist.rs | 2 +- tests/ui/macros/type-macros-simple.rs | 2 +- .../macros/typeck-macro-interaction-issue-8852.rs | 2 +- tests/ui/macros/unimplemented-macro-panic.rs | 6 +- tests/ui/macros/unknown-builtin.rs | 2 +- tests/ui/macros/unreachable-arg.rs | 16 +- tests/ui/macros/unreachable-fmt-msg.rs | 6 +- tests/ui/macros/unreachable-format-arg.rs | 14 +- tests/ui/macros/unreachable-format-args.rs | 16 +- tests/ui/macros/unreachable-macro-panic.rs | 6 +- tests/ui/macros/unreachable-static-msg.rs | 6 +- tests/ui/macros/unreachable.rs | 6 +- tests/ui/macros/use-macro-self.rs | 4 +- tests/ui/macros/user-defined-macro-rules.rs | 2 +- .../issue-107423-unused-delim-only-one-no-pair.rs | 6 +- tests/ui/manual/manual-link-bad-form.rs | 4 +- tests/ui/manual/manual-link-bad-kind.rs | 4 +- tests/ui/manual/manual-link-bad-search-path.rs | 4 +- tests/ui/manual/manual-link-framework.rs | 8 +- tests/ui/manual/manual-link-unsupported-kind.rs | 4 +- .../marker_trait_attr/issue-61651-type-mismatch.rs | 2 +- .../overlap-doesnt-conflict-with-specialization.rs | 2 +- .../overlap-marker-trait-with-static-lifetime.rs | 2 +- ...verlap-permitted-for-annotated-marker-traits.rs | 2 +- .../overlapping-impl-1-modulo-regions.rs | 2 +- tests/ui/match/const_non_normal_zst_ref_pattern.rs | 2 +- tests/ui/match/expr-match-panic-fn.rs | 6 +- tests/ui/match/expr-match-panic.rs | 6 +- tests/ui/match/guards-parenthesized-and.rs | 2 +- tests/ui/match/guards.rs | 2 +- tests/ui/match/issue-112438.rs | 2 +- tests/ui/match/issue-113012.rs | 2 +- tests/ui/match/issue-114691.rs | 2 +- tests/ui/match/issue-115681.rs | 4 +- tests/ui/match/issue-11940.rs | 2 +- tests/ui/match/issue-18060.rs | 2 +- tests/ui/match/issue-26251.rs | 2 +- tests/ui/match/issue-26996.rs | 4 +- tests/ui/match/issue-27021.rs | 4 +- tests/ui/match/issue-33498.rs | 2 +- tests/ui/match/issue-42679.rs | 2 +- tests/ui/match/issue-46920-byte-array-patterns.rs | 2 +- tests/ui/match/issue-5530.rs | 2 +- tests/ui/match/issue-72680.rs | 2 +- tests/ui/match/issue-72896-non-partial-eq-const.rs | 2 +- tests/ui/match/issue-82392.rs | 4 +- tests/ui/match/issue-82392.stdout | 4 +- tests/ui/match/issue-84434.rs | 2 +- tests/ui/match/match-bot-panic.rs | 6 +- tests/ui/match/match-disc-bot.rs | 6 +- tests/ui/match/match-float.rs | 2 +- tests/ui/match/match-on-negative-integer-ranges.rs | 2 +- tests/ui/match/match-ref-mut-stability.rs | 2 +- tests/ui/match/match-wildcards.rs | 6 +- tests/ui/match/match_non_exhaustive.rs | 2 +- tests/ui/match/pattern-deref-miscompile.rs | 2 +- tests/ui/max-min-classes.rs | 2 +- tests/ui/maximal_mir_to_hir_coverage.rs | 4 +- tests/ui/meta/auxiliary/env.rs | 2 +- tests/ui/meta/expected-error-correct-rev.rs | 2 +- tests/ui/meta/meta-expected-error-wrong-rev.rs | 6 +- tests/ui/meta/no_std-extern-libc.rs | 2 +- tests/ui/meta/revision-bad.rs | 12 +- tests/ui/meta/revision-ok.rs | 10 +- tests/ui/meta/rustc-env.rs | 8 +- tests/ui/methods/call_method_unknown_pointee.rs | 2 +- tests/ui/methods/inherent-bound-in-probe.rs | 2 +- .../methods/method-ambig-two-traits-cross-crate.rs | 2 +- .../method-argument-inference-associated-type.rs | 2 +- .../method-call-lifetime-args-subst-index.rs | 2 +- .../method-early-bound-lifetimes-on-self.rs | 4 +- tests/ui/methods/method-lookup-order.rs | 68 +++---- tests/ui/methods/method-macro-backtrace.rs | 2 +- .../method-mut-self-modifies-mut-slice-lvalue.rs | 2 +- .../methods/method-normalize-bounds-issue-20604.rs | 4 +- .../ui/methods/method-on-ambiguous-numeric-type.rs | 2 +- .../methods/method-probe-no-guessing-dyn-trait.rs | 2 +- tests/ui/methods/method-projection.rs | 2 +- tests/ui/methods/method-recursive-blanket-impl.rs | 4 +- tests/ui/methods/method-self-arg-aux1.rs | 4 +- tests/ui/methods/method-self-arg-aux2.rs | 4 +- tests/ui/methods/method-self-arg-trait.rs | 2 +- tests/ui/methods/method-self-arg.rs | 2 +- tests/ui/methods/method-trait-object-with-hrtb.rs | 2 +- .../methods/method-two-trait-defer-resolution-1.rs | 2 +- .../methods/method-two-trait-defer-resolution-2.rs | 2 +- ...od-two-traits-distinguished-via-where-clause.rs | 4 +- tests/ui/methods/method-where-clause.rs | 2 +- tests/ui/minus-string.rs | 2 +- tests/ui/mir/alignment/addrof_alignment.rs | 4 +- tests/ui/mir/alignment/i686-pc-windows-msvc.rs | 6 +- tests/ui/mir/alignment/misaligned_lhs.rs | 10 +- tests/ui/mir/alignment/misaligned_rhs.rs | 10 +- tests/ui/mir/alignment/packed.rs | 4 +- tests/ui/mir/alignment/place_computation.rs | 4 +- tests/ui/mir/alignment/place_without_read.rs | 4 +- tests/ui/mir/alignment/two_pointers.rs | 10 +- tests/ui/mir/auxiliary/issue_76375_aux.rs | 4 +- tests/ui/mir/build-async-error-body-correctly.rs | 2 +- tests/ui/mir/checks_without_panic_impl.rs | 4 +- tests/ui/mir/debug-ref-undef.rs | 4 +- tests/ui/mir/field-projection-invariant.rs | 2 +- tests/ui/mir/field-ty-ascription-enums.rs | 2 +- tests/ui/mir/field-ty-ascription.rs | 2 +- tests/ui/mir/important-higher-ranked-regions.rs | 4 +- tests/ui/mir/inline-wrong-abi.rs | 2 +- tests/ui/mir/issue-101844.rs | 2 +- tests/ui/mir/issue-105809.rs | 4 +- tests/ui/mir/issue-106062.rs | 2 +- .../mir/issue-107678-projection-with-lifetime.rs | 2 +- tests/ui/mir/issue-107691.rs | 4 +- tests/ui/mir/issue-109004-drop-large-array.rs | 2 +- tests/ui/mir/issue-109743.rs | 4 +- tests/ui/mir/issue-29227.rs | 2 +- tests/ui/mir/issue-46845.rs | 4 +- tests/ui/mir/issue-60390.rs | 4 +- tests/ui/mir/issue-66851.rs | 4 +- tests/ui/mir/issue-66930.rs | 4 +- tests/ui/mir/issue-67639-normalization-ice.rs | 4 +- tests/ui/mir/issue-67710-inline-projection.rs | 4 +- tests/ui/mir/issue-68841.rs | 6 +- tests/ui/mir/issue-71793-inline-args-storage.rs | 4 +- tests/ui/mir/issue-73914.rs | 6 +- tests/ui/mir/issue-74739.rs | 4 +- tests/ui/mir/issue-75053.rs | 2 +- tests/ui/mir/issue-75419-validation-impl-trait.rs | 2 +- tests/ui/mir/issue-76248.rs | 4 +- tests/ui/mir/issue-76375.rs | 8 +- tests/ui/mir/issue-76740-copy-propagation.rs | 4 +- tests/ui/mir/issue-76803-branches-not-same.rs | 2 +- tests/ui/mir/issue-77002.rs | 4 +- tests/ui/mir/issue-77359-simplify-arm-identity.rs | 2 +- tests/ui/mir/issue-77911.rs | 4 +- tests/ui/mir/issue-78496.rs | 4 +- tests/ui/mir/issue-80949.rs | 2 +- tests/ui/mir/issue-89485.rs | 2 +- tests/ui/mir/issue-91745.rs | 2 +- tests/ui/mir/issue-99852.rs | 4 +- tests/ui/mir/issue-99866.rs | 2 +- tests/ui/mir/issue66339.rs | 4 +- tests/ui/mir/lint/assignment-overlap.rs | 10 +- tests/ui/mir/lint/call-overlap.rs | 10 +- tests/ui/mir/lint/no-storage.rs | 8 +- tests/ui/mir/lint/storage-live.rs | 16 +- tests/ui/mir/lint/storage-return.rs | 8 +- tests/ui/mir/mir-inlining/always-encode-mirs.rs | 6 +- .../mir-inlining/array-clone-with-generic-size.rs | 4 +- tests/ui/mir/mir-inlining/auxiliary/internal.rs | 2 +- .../ice-issue-100550-unnormalized-projection.rs | 4 +- tests/ui/mir/mir-inlining/ice-issue-45493.rs | 4 +- tests/ui/mir/mir-inlining/ice-issue-45885.rs | 4 +- tests/ui/mir/mir-inlining/ice-issue-68347.rs | 4 +- tests/ui/mir/mir-inlining/ice-issue-77306-1.rs | 4 +- tests/ui/mir/mir-inlining/ice-issue-77306-2.rs | 4 +- tests/ui/mir/mir-inlining/ice-issue-77564.rs | 4 +- .../mir-inlining/no-trait-method-issue-40473.rs | 4 +- .../mir/mir-inlining/var-debuginfo-issue-67586.rs | 4 +- tests/ui/mir/mir-typeck-normalize-fn-sig.rs | 2 +- tests/ui/mir/mir_adt_construction.rs | 2 +- tests/ui/mir/mir_ascription_coercion.rs | 2 +- tests/ui/mir/mir_assign_eval_order.rs | 2 +- tests/ui/mir/mir_augmented_assignments.rs | 2 +- tests/ui/mir/mir_autoderef.rs | 2 +- tests/ui/mir/mir_build_match_comparisons.rs | 2 +- tests/ui/mir/mir_call_with_associated_type.rs | 2 +- tests/ui/mir/mir_calls_to_shims.rs | 4 +- tests/ui/mir/mir_cast_fn_ret.rs | 2 +- tests/ui/mir/mir_codegen_array.rs | 2 +- tests/ui/mir/mir_codegen_array_2.rs | 2 +- tests/ui/mir/mir_codegen_call_converging.rs | 2 +- tests/ui/mir/mir_codegen_calls.rs | 2 +- tests/ui/mir/mir_codegen_calls_converging_drops.rs | 10 +- .../ui/mir/mir_codegen_calls_converging_drops_2.rs | 10 +- tests/ui/mir/mir_codegen_calls_diverging.rs | 6 +- tests/ui/mir/mir_codegen_calls_diverging_drops.rs | 8 +- tests/ui/mir/mir_codegen_critical_edge.rs | 2 +- tests/ui/mir/mir_codegen_spike1.rs | 2 +- tests/ui/mir/mir_codegen_ssa.rs | 4 +- tests/ui/mir/mir_codegen_switch.rs | 2 +- tests/ui/mir/mir_codegen_switchint.rs | 2 +- tests/ui/mir/mir_coercion_casts.rs | 2 +- tests/ui/mir/mir_coercions.rs | 2 +- tests/ui/mir/mir_const_prop_identity.rs | 4 +- tests/ui/mir/mir_const_prop_tuple_field_reorder.rs | 4 +- tests/ui/mir/mir_constval_adts.rs | 2 +- tests/ui/mir/mir_detects_invalid_ops.rs | 2 +- tests/ui/mir/mir_drop_order.rs | 4 +- tests/ui/mir/mir_drop_panics.rs | 8 +- tests/ui/mir/mir_dynamic_drops_1.rs | 8 +- tests/ui/mir/mir_dynamic_drops_2.rs | 6 +- tests/ui/mir/mir_dynamic_drops_3.rs | 14 +- tests/ui/mir/mir_early_return_scope.rs | 2 +- tests/ui/mir/mir_fat_ptr.rs | 2 +- tests/ui/mir/mir_fat_ptr_drop.rs | 2 +- tests/ui/mir/mir_heavy_promoted.rs | 4 +- tests/ui/mir/mir_indexing_oob_1.rs | 6 +- tests/ui/mir/mir_indexing_oob_2.rs | 6 +- tests/ui/mir/mir_indexing_oob_3.rs | 6 +- tests/ui/mir/mir_let_chains_drop_order.rs | 4 +- tests/ui/mir/mir_match_arm_guard.rs | 2 +- tests/ui/mir/mir_match_test.rs | 2 +- tests/ui/mir/mir_misc_casts.rs | 2 +- tests/ui/mir/mir_overflow_off.rs | 4 +- tests/ui/mir/mir_query_cycle.rs | 6 +- tests/ui/mir/mir_raw_fat_ptr.rs | 2 +- tests/ui/mir/mir_refs_correct.rs | 4 +- tests/ui/mir/mir_small_agg_arg.rs | 2 +- tests/ui/mir/mir_static_subtype.rs | 2 +- tests/ui/mir/mir_struct_with_assoc_ty.rs | 2 +- tests/ui/mir/mir_temp_promotions.rs | 2 +- tests/ui/mir/mir_void_return.rs | 2 +- tests/ui/mir/mir_void_return_2.rs | 2 +- tests/ui/mir/remove-zsts-query-cycle.rs | 6 +- tests/ui/mir/simplify-branch-same.rs | 2 +- tests/ui/mir/ssa-analysis-regression-50041.rs | 4 +- tests/ui/mir/ssa_call_ret.rs | 8 +- tests/ui/mir/thir-constparam-temp.rs | 2 +- tests/ui/mir/unsize-trait.rs | 2 +- tests/ui/mir/validate/critical-edge.rs | 12 +- tests/ui/mir/validate/error-body.rs | 2 +- .../issue-95978-validator-lifetime-comparison.rs | 4 +- tests/ui/mir/validate/needs-reveal-all.rs | 4 +- tests/ui/mir/validate/noncleanup-cleanup.rs | 6 +- tests/ui/mir/validate/noncleanup-resume.rs | 6 +- tests/ui/mir/validate/noncleanup-terminate.rs | 6 +- tests/ui/mir/validate/transmute_cast_sized.rs | 6 +- .../ui/mismatched_types/async-unwrap-suggestion.rs | 2 +- ...osure-arg-count-expected-type-issue-47244.fixed | 2 +- .../closure-arg-count-expected-type-issue-47244.rs | 2 +- .../closure-arg-type-mismatch-issue-45727.fixed | 2 +- .../closure-arg-type-mismatch-issue-45727.rs | 2 +- tests/ui/mismatched_types/closure-ref-114180.rs | 2 +- .../mismatched_types/dont-point-return-on-E0308.rs | 2 +- tests/ui/mismatched_types/issue-106182.fixed | 2 +- tests/ui/mismatched_types/issue-106182.rs | 2 +- .../issue-118145-unwrap-for-shorthand.fixed | 2 +- .../issue-118145-unwrap-for-shorthand.rs | 2 +- tests/ui/mismatched_types/issue-38371.fixed | 2 +- tests/ui/mismatched_types/issue-38371.rs | 2 +- .../mismatch-sugg-for-shorthand-field.fixed | 4 +- .../mismatch-sugg-for-shorthand-field.rs | 4 +- .../mismatch-ty-unwrap-expect.fixed | 2 +- .../mismatched_types/mismatch-ty-unwrap-expect.rs | 2 +- .../ui/mismatched_types/ref-pat-suggestions.fixed | 2 +- tests/ui/mismatched_types/ref-pat-suggestions.rs | 2 +- ...dding-or-removing-ref-for-binding-pattern.fixed | 2 +- ...t-adding-or-removing-ref-for-binding-pattern.rs | 2 +- ...boxed-trait-objects-instead-of-impl-trait.fixed | 2 +- ...st-boxed-trait-objects-instead-of-impl-trait.rs | 2 +- .../suggest-removing-tuple-struct-field.fixed | 2 +- .../suggest-removing-tuple-struct-field.rs | 2 +- tests/ui/missing-trait-bounds/issue-35677.fixed | 2 +- tests/ui/missing-trait-bounds/issue-35677.rs | 2 +- tests/ui/missing-trait-bounds/issue-69725.fixed | 4 +- tests/ui/missing-trait-bounds/issue-69725.rs | 4 +- .../missing-trait-bound-for-op.fixed | 2 +- .../missing-trait-bound-for-op.rs | 2 +- tests/ui/missing/missing-allocator.rs | 4 +- tests/ui/missing/missing-comma-in-match.fixed | 2 +- tests/ui/missing/missing-comma-in-match.rs | 2 +- tests/ui/missing/missing-items/m2.rs | 2 +- tests/ui/missing/missing-macro-use.rs | 2 +- tests/ui/missing/missing-main.rs | 2 +- tests/ui/missing/missing-return.rs | 2 +- tests/ui/missing_debug_impls.rs | 2 +- tests/ui/missing_non_modrs_mod/foo.rs | 2 +- tests/ui/missing_non_modrs_mod/foo_inline.rs | 2 +- tests/ui/modules/issue-107649.rs | 2 +- tests/ui/modules/issue-56411-aux.rs | 2 +- tests/ui/modules/mod-inside-fn.rs | 2 +- tests/ui/modules/mod-view-items.rs | 4 +- tests/ui/modules/mod_dir_implicit.rs | 2 +- tests/ui/modules/mod_dir_implicit_aux/mod.rs | 2 +- tests/ui/modules/mod_dir_path.rs | 2 +- tests/ui/modules/mod_dir_path2.rs | 2 +- tests/ui/modules/mod_dir_path3.rs | 2 +- tests/ui/modules/mod_dir_path_multi.rs | 2 +- tests/ui/modules/mod_dir_recursive.rs | 2 +- tests/ui/modules/mod_dir_simple.rs | 2 +- .../ui/modules/mod_dir_simple/load_another_mod.rs | 2 +- tests/ui/modules/mod_dir_simple/test.rs | 2 +- tests/ui/modules/mod_file.rs | 2 +- tests/ui/modules/mod_file_aux.rs | 4 +- tests/ui/modules/mod_file_with_path_attr.rs | 2 +- .../float-template/inst_f32.rs | 2 +- .../float-template/inst_f64.rs | 2 +- .../float-template/inst_float.rs | 2 +- tests/ui/modules/path-no-file-name.rs | 4 +- tests/ui/modules/special_module_name_ignore.rs | 2 +- .../modules_and_files_visibility/mod_file_aux.rs | 2 +- .../mod_file_disambig_aux.rs | 2 +- .../mod_file_disambig_aux/mod.rs | 2 +- tests/ui/monomorphize-abi-alignment.rs | 2 +- ...of-clone-call-on-ref-due-to-missing-bound.fixed | 2 +- ...nt-of-clone-call-on-ref-due-to-missing-bound.rs | 2 +- tests/ui/moves/issue-22536-copy-mustnt-zero.rs | 2 +- tests/ui/moves/issue-34721.fixed | 2 +- tests/ui/moves/issue-34721.rs | 2 +- tests/ui/moves/move-1-unique.rs | 2 +- tests/ui/moves/move-2-unique.rs | 2 +- tests/ui/moves/move-2.rs | 2 +- tests/ui/moves/move-3-unique.rs | 2 +- tests/ui/moves/move-4-unique.rs | 2 +- tests/ui/moves/move-4.rs | 2 +- tests/ui/moves/move-arg-2-unique.rs | 2 +- tests/ui/moves/move-arg-2.rs | 2 +- tests/ui/moves/move-arg.rs | 2 +- tests/ui/moves/move-nullary-fn.rs | 4 +- tests/ui/moves/move-out-of-field.rs | 2 +- tests/ui/moves/move-scalar.rs | 2 +- .../ui/moves/moves-based-on-type-capture-clause.rs | 4 +- tests/ui/moves/needs-clone-through-deref.fixed | 2 +- tests/ui/moves/needs-clone-through-deref.rs | 2 +- .../pin-mut-reborrow-infer-var-issue-107419.fixed | 2 +- .../pin-mut-reborrow-infer-var-issue-107419.rs | 2 +- tests/ui/moves/pin-mut-reborrow.fixed | 2 +- tests/ui/moves/pin-mut-reborrow.rs | 2 +- ...ggest-clone-when-some-obligation-is-unmet.fixed | 2 +- .../suggest-clone-when-some-obligation-is-unmet.rs | 2 +- tests/ui/moves/suggest-clone.fixed | 2 +- tests/ui/moves/suggest-clone.rs | 2 +- .../use_of_moved_value_copy_suggestions.fixed | 2 +- .../moves/use_of_moved_value_copy_suggestions.rs | 2 +- tests/ui/msvc-data-only.rs | 4 +- tests/ui/multibyte.rs | 2 +- tests/ui/multiline-comment.rs | 4 +- tests/ui/mut-function-arguments.rs | 2 +- tests/ui/mut/no-mut-lint-for-desugared-mut.rs | 2 +- tests/ui/mutual-recursion-group.rs | 4 +- tests/ui/myriad-closures.rs | 4 +- tests/ui/namespace/namespace-mix.rs | 2 +- .../namespaced-enum-glob-import-no-impls-xcrate.rs | 2 +- tests/ui/native-library-link-flags/empty-kind-1.rs | 4 +- tests/ui/native-library-link-flags/empty-kind-2.rs | 4 +- .../ui/native-library-link-flags/link-arg-error.rs | 4 +- .../modifiers-override-2.rs | 2 +- .../modifiers-override-3.rs | 4 +- .../modifiers-override.rs | 2 +- .../msvc-non-utf8-output.rs | 8 +- .../suggest-libname-only-1.rs | 8 +- .../suggest-libname-only-2.rs | 8 +- tests/ui/nested-block-comment.rs | 4 +- tests/ui/nested-class.rs | 2 +- tests/ui/nested-ty-params.rs | 2 +- tests/ui/never_type/adjust_never.rs | 2 +- tests/ui/never_type/auto-traits.rs | 2 +- tests/ui/never_type/call-fn-never-arg.rs | 2 +- tests/ui/never_type/cast-never.rs | 2 +- tests/ui/never_type/defaulted-never-note.rs | 6 +- tests/ui/never_type/dispatch_from_dyn_zst.rs | 2 +- .../never_type/diverging-fallback-control-flow.rs | 4 +- tests/ui/never_type/diverging-fallback-no-leak.rs | 4 +- .../diverging-fallback-unconstrained-return.rs | 4 +- tests/ui/never_type/exhaustive_patterns.rs | 4 +- tests/ui/never_type/expr-empty-ret.rs | 4 +- tests/ui/never_type/fallback-closure-ret.rs | 4 +- tests/ui/never_type/fallback-closure-wrap.rs | 6 +- tests/ui/never_type/impl-for-never.rs | 2 +- tests/ui/never_type/impl_trait_fallback.rs | 2 +- tests/ui/never_type/issue-44402.rs | 2 +- tests/ui/never_type/issue-5500-1.rs | 2 +- tests/ui/never_type/never-assign-dead-code.rs | 2 +- tests/ui/never_type/never-associated-type.rs | 2 +- tests/ui/never_type/never-from-impl-is-reserved.rs | 4 +- tests/ui/never_type/never-result.rs | 2 +- tests/ui/never_type/never-type-arg.rs | 2 +- .../ui/never_type/never-type-in-nested-fn-decl.rs | 2 +- tests/ui/never_type/never-type-rvalues.rs | 2 +- .../never_type/never-value-fallback-issue-66757.rs | 6 +- tests/ui/never_type/never_coercions.rs | 2 +- tests/ui/never_type/never_transmute_never.rs | 2 +- tests/ui/never_type/return-never-coerce.rs | 6 +- tests/ui/never_type/try_from.rs | 2 +- tests/ui/new-impl-syntax.rs | 2 +- tests/ui/new-import-syntax.rs | 2 +- tests/ui/new-style-constants.rs | 2 +- tests/ui/new-unicode-escapes.rs | 2 +- tests/ui/newlambdas.rs | 2 +- tests/ui/newtype-polymorphic.rs | 2 +- tests/ui/newtype.rs | 2 +- tests/ui/nll/assign-while-to-immutable.rs | 2 +- tests/ui/nll/borrow-use-issue-46875.rs | 2 +- ...k-thread-local-static-mut-borrow-outlives-fn.rs | 2 +- tests/ui/nll/capture-mut-ref.fixed | 2 +- tests/ui/nll/capture-mut-ref.rs | 2 +- ...sure-malformed-projection-input-issue-102800.rs | 2 +- .../closure-requirements/escape-argument-callee.rs | 2 +- .../ui/nll/closure-requirements/escape-argument.rs | 2 +- .../closure-requirements/escape-upvar-nested.rs | 2 +- .../nll/closure-requirements/escape-upvar-ref.rs | 2 +- .../issue-58127-mutliple-requirements.rs | 2 +- .../propagate-approximated-fail-no-postdom.rs | 2 +- .../propagate-approximated-ref.rs | 2 +- ...ted-shorter-to-static-comparing-against-free.rs | 2 +- ...gate-approximated-shorter-to-static-no-bound.rs | 2 +- ...e-approximated-shorter-to-static-wrong-bound.rs | 2 +- .../propagate-approximated-val.rs | 2 +- .../propagate-despite-same-free-region.rs | 4 +- ...opagate-fail-to-approximate-longer-no-bounds.rs | 2 +- ...gate-fail-to-approximate-longer-wrong-bounds.rs | 2 +- .../propagate-from-trait-match.rs | 2 +- .../region-lbr-anon-does-not-outlive-static.rs | 2 +- .../region-lbr-named-does-not-outlive-static.rs | 2 +- .../region-lbr1-does-not-outlive-ebr2.rs | 2 +- ...lbr1-does-outlive-lbr2-because-implied-bound.rs | 4 +- .../return-wrong-bound-region.rs | 2 +- .../type-test-subject-non-trivial-region.rs | 2 +- .../type-test-subject-opaque-1.rs | 2 +- .../type-test-subject-opaque-2.rs | 2 +- .../type-test-subject-unnamed-region.rs | 2 +- tests/ui/nll/constant.rs | 2 +- tests/ui/nll/coroutine-distinct-lifetime.rs | 2 +- tests/ui/nll/drop-may-dangle.rs | 2 +- tests/ui/nll/empty-type-predicate-2.rs | 2 +- tests/ui/nll/empty-type-predicate.rs | 2 +- tests/ui/nll/extra-unused-mut.rs | 2 +- .../nll/issue-112604-closure-output-normalize.rs | 2 +- tests/ui/nll/issue-16223.rs | 2 +- tests/ui/nll/issue-21114-ebfull.rs | 2 +- tests/ui/nll/issue-21114-kixunil.rs | 2 +- tests/ui/nll/issue-22323-temp-destruction.rs | 2 +- ...ue-24535-allow-mutable-borrow-in-match-guard.rs | 2 +- tests/ui/nll/issue-27583.rs | 2 +- tests/ui/nll/issue-30104.rs | 2 +- .../issue-32382-index-assoc-type-with-lifetime.rs | 2 +- tests/ui/nll/issue-43058.rs | 2 +- .../nll/issue-45696-long-live-borrows-in-boxes.rs | 2 +- tests/ui/nll/issue-45696-no-variant-box-recur.rs | 2 +- .../ui/nll/issue-45696-scribble-on-boxed-borrow.rs | 2 +- tests/ui/nll/issue-46589.rs | 2 +- tests/ui/nll/issue-47022.rs | 2 +- tests/ui/nll/issue-47153-generic-const.rs | 2 +- tests/ui/nll/issue-47589.rs | 2 +- tests/ui/nll/issue-48070.rs | 2 +- tests/ui/nll/issue-48179.rs | 2 +- tests/ui/nll/issue-48623-closure.rs | 2 +- tests/ui/nll/issue-48623-coroutine.rs | 2 +- tests/ui/nll/issue-50343.rs | 2 +- tests/ui/nll/issue-50461-used-mut-from-moves.rs | 2 +- tests/ui/nll/issue-50716-1.rs | 2 +- tests/ui/nll/issue-51345-2.rs | 8 +- tests/ui/nll/issue-51351.rs | 2 +- tests/ui/nll/issue-51770.rs | 2 +- tests/ui/nll/issue-52057.rs | 2 +- tests/ui/nll/issue-52078.rs | 2 +- tests/ui/nll/issue-52992.rs | 2 +- tests/ui/nll/issue-53119.rs | 6 +- tests/ui/nll/issue-53123-raw-pointer-cast.rs | 2 +- tests/ui/nll/issue-53570.rs | 2 +- tests/ui/nll/issue-54943-3.rs | 2 +- tests/ui/nll/issue-55288.rs | 2 +- tests/ui/nll/issue-55344.rs | 2 +- tests/ui/nll/issue-55651.rs | 2 +- tests/ui/nll/issue-55825-const-fn.rs | 2 +- tests/ui/nll/issue-57280-1.rs | 2 +- tests/ui/nll/issue-57280.rs | 2 +- tests/ui/nll/issue-57960.rs | 2 +- tests/ui/nll/issue-61311-normalize.rs | 2 +- tests/ui/nll/issue-61320-normalize.rs | 2 +- tests/ui/nll/issue-61424.fixed | 2 +- tests/ui/nll/issue-61424.rs | 2 +- tests/ui/nll/issue-63154-normalize.rs | 2 +- tests/ui/nll/issue-78561.rs | 2 +- .../issue-98589-closures-relate-named-regions.rs | 2 +- tests/ui/nll/lint-no-err.rs | 2 +- .../ui/nll/maybe-initialized-drop-uninitialized.rs | 2 +- .../min-choice-reject-ambiguous.rs | 2 +- tests/ui/nll/member-constraints/min-choice.rs | 2 +- .../member-constraints/nested-impl-trait-fail.rs | 2 +- .../member-constraints/nested-impl-trait-pass.rs | 2 +- .../ui/nll/missing-universe-cause-issue-114907.rs | 2 +- tests/ui/nll/mutating_references.rs | 2 +- tests/ui/nll/normalization-bounds.rs | 2 +- tests/ui/nll/polonius/assignment-kills-loans.rs | 4 +- .../nll/polonius/assignment-to-differing-field.rs | 2 +- tests/ui/nll/polonius/call-kills-loans.rs | 4 +- tests/ui/nll/polonius/issue-46589.rs | 4 +- .../location-insensitive-scopes-issue-116657.rs | 4 +- .../location-insensitive-scopes-issue-117146.rs | 4 +- .../location-insensitive-scopes-liveness.rs | 6 +- tests/ui/nll/polonius/polonius-smoke-test.rs | 2 +- tests/ui/nll/polonius/storagedead-kills-loans.rs | 4 +- tests/ui/nll/polonius/subset-relations.rs | 2 +- tests/ui/nll/process_or_insert_default.rs | 2 +- tests/ui/nll/projection-return.rs | 2 +- .../nll/promotable-mutable-zst-doesnt-conflict.rs | 2 +- tests/ui/nll/promoted-liveness.rs | 2 +- tests/ui/nll/rc-loop.rs | 2 +- tests/ui/nll/relate_tys/fn-subtype.rs | 2 +- tests/ui/nll/relate_tys/hr-fn-aaa-as-aba.rs | 2 +- tests/ui/nll/relate_tys/hr-fn-aau-eq-abu.rs | 4 +- tests/ui/nll/relate_tys/hr-fn-aba-as-aaa.rs | 4 +- .../relate_tys/impl-fn-ignore-binder-via-bottom.rs | 2 +- tests/ui/nll/relate_tys/issue-48071.rs | 2 +- tests/ui/nll/relate_tys/trait-hrtb.rs | 2 +- tests/ui/nll/relate_tys/universe-violation.rs | 2 +- tests/ui/nll/self-assign-ref-mut.rs | 2 +- tests/ui/nll/ty-outlives/impl-trait-captures.rs | 2 +- tests/ui/nll/ty-outlives/impl-trait-outlives.rs | 2 +- tests/ui/nll/ty-outlives/issue-53789-1.rs | 2 +- tests/ui/nll/ty-outlives/issue-53789-2.rs | 2 +- tests/ui/nll/ty-outlives/issue-55756.rs | 2 +- tests/ui/nll/ty-outlives/projection-body.rs | 2 +- .../nll/ty-outlives/projection-implied-bounds.rs | 2 +- .../ty-outlives/projection-no-regions-closure.rs | 2 +- .../ui/nll/ty-outlives/projection-no-regions-fn.rs | 2 +- .../ty-outlives/projection-one-region-closure.rs | 2 +- .../projection-one-region-trait-bound-closure.rs | 2 +- ...ection-one-region-trait-bound-static-closure.rs | 4 +- .../projection-two-region-trait-bound-closure.rs | 2 +- .../nll/ty-outlives/projection-where-clause-env.rs | 2 +- .../ty-outlives/projection-where-clause-trait.rs | 2 +- .../ty-param-closure-approximate-lower-bound.rs | 2 +- .../ty-param-closure-outlives-from-return-type.rs | 2 +- .../ty-param-closure-outlives-from-where-clause.rs | 2 +- .../ui/nll/ty-outlives/ty-param-implied-bounds.rs | 4 +- tests/ui/nll/unused-mut-issue-50343.fixed | 2 +- tests/ui/nll/unused-mut-issue-50343.rs | 2 +- tests/ui/nll/user-annotations/ascribed-type-wf.rs | 2 +- tests/ui/nll/user-annotations/closure-sig.rs | 2 +- tests/ui/nll/user-annotations/downcast-infer.rs | 2 +- .../nll/user-annotations/dump-adt-brace-struct.rs | 2 +- tests/ui/nll/user-annotations/dump-fn-method.rs | 2 +- .../user-annotations/issue-54570-bootstrapping.rs | 2 +- tests/ui/nll/user-annotations/issue-55219.rs | 2 +- tests/ui/nll/user-annotations/issue-55241.rs | 2 +- tests/ui/nll/user-annotations/normalization-2.rs | 2 +- .../nll/user-annotations/normalization-default.rs | 2 +- .../ui/nll/user-annotations/normalization-infer.rs | 2 +- .../ui/nll/user-annotations/normalization-self.rs | 2 +- tests/ui/nll/user-annotations/normalize-self-ty.rs | 2 +- .../user-annotations/type-annotation-with-hrtb.rs | 2 +- tests/ui/nll/vimwiki-core-regression.rs | 2 +- tests/ui/no-capture-arc.rs | 2 +- tests/ui/no-core-1.rs | 2 +- tests/ui/no-core-2.rs | 4 +- tests/ui/no-warn-on-field-replace-issue-34101.rs | 2 +- tests/ui/no_std/no-std-no-start-binary.rs | 4 +- tests/ui/no_std/no-std-unwind-binary.rs | 6 +- tests/ui/noexporttypeexe.rs | 2 +- tests/ui/non-copyable-void.rs | 2 +- tests/ui/non-fmt-panic.fixed | 8 +- tests/ui/non-fmt-panic.rs | 8 +- tests/ui/non_modrs_mods/foors_mod.rs | 4 +- .../ui/non_modrs_mods/foors_mod/inline/somename.rs | 2 +- .../ui/non_modrs_mods/foors_mod/inner_foors_mod.rs | 2 +- .../foors_mod/inner_foors_mod/innest.rs | 2 +- .../foors_mod/inner_modrs_mod/innest.rs | 2 +- .../foors_mod/inner_modrs_mod/mod.rs | 2 +- .../ui/non_modrs_mods/modrs_mod/inline/somename.rs | 2 +- .../ui/non_modrs_mods/modrs_mod/inner_foors_mod.rs | 2 +- .../modrs_mod/inner_foors_mod/innest.rs | 2 +- .../modrs_mod/inner_modrs_mod/innest.rs | 2 +- .../modrs_mod/inner_modrs_mod/mod.rs | 2 +- tests/ui/non_modrs_mods/modrs_mod/mod.rs | 2 +- tests/ui/non_modrs_mods/non_modrs_mods.rs | 2 +- .../some_crazy_attr_mod_dir/arbitrary_name.rs | 2 +- .../inner_modrs_mod/innest.rs | 2 +- .../some_crazy_attr_mod_dir/inner_modrs_mod/mod.rs | 2 +- .../non_modrs_mods_and_inline_mods.rs | 2 +- tests/ui/non_modrs_mods_and_inline_mods/x.rs | 2 +- .../ui/non_modrs_mods_and_inline_mods/x/y/z/mod.rs | 2 +- tests/ui/nonscalar-cast.fixed | 2 +- tests/ui/nonscalar-cast.rs | 2 +- tests/ui/nul-characters.rs | 2 +- tests/ui/nullable-pointer-iotareduction.rs | 2 +- tests/ui/nullable-pointer-size.rs | 2 +- .../ui/numbers-arithmetic/apfloat-modulo-wrong.rs | 4 +- tests/ui/numbers-arithmetic/arith-unsigned.rs | 2 +- tests/ui/numbers-arithmetic/div-mod.rs | 2 +- tests/ui/numbers-arithmetic/divide-by-zero.rs | 6 +- .../float-int-invalid-const-cast.rs | 2 +- .../numbers-arithmetic/float-literal-inference.rs | 2 +- tests/ui/numbers-arithmetic/float-nan.rs | 2 +- tests/ui/numbers-arithmetic/float-signature.rs | 2 +- tests/ui/numbers-arithmetic/float.rs | 2 +- tests/ui/numbers-arithmetic/float2.rs | 2 +- tests/ui/numbers-arithmetic/float_math.rs | 2 +- tests/ui/numbers-arithmetic/floatlits.rs | 2 +- tests/ui/numbers-arithmetic/i128.rs | 2 +- tests/ui/numbers-arithmetic/i32-sub.rs | 2 +- tests/ui/numbers-arithmetic/i8-incr.rs | 2 +- tests/ui/numbers-arithmetic/int-abs-overflow.rs | 8 +- tests/ui/numbers-arithmetic/int.rs | 4 +- .../ui/numbers-arithmetic/integer-literal-radix.rs | 2 +- .../integer-literal-suffix-inference-2.rs | 4 +- .../integer-literal-suffix-inference-3.rs | 2 +- .../integer-literal-suffix-inference.rs | 4 +- tests/ui/numbers-arithmetic/issue-105626.rs | 6 +- tests/ui/numbers-arithmetic/issue-8460-const.rs | 10 +- tests/ui/numbers-arithmetic/issue-8460.rs | 6 +- .../location-add-assign-overflow.rs | 6 +- .../ui/numbers-arithmetic/location-add-overflow.rs | 6 +- .../location-divide-assign-by-zero.rs | 6 +- .../numbers-arithmetic/location-divide-by-zero.rs | 6 +- .../location-mod-assign-by-zero.rs | 6 +- .../ui/numbers-arithmetic/location-mod-by-zero.rs | 6 +- .../location-mul-assign-overflow.rs | 6 +- .../ui/numbers-arithmetic/location-mul-overflow.rs | 6 +- .../location-sub-assign-overflow.rs | 6 +- .../ui/numbers-arithmetic/location-sub-overflow.rs | 6 +- tests/ui/numbers-arithmetic/mod-zero.rs | 6 +- .../next-power-of-two-overflow-debug.rs | 8 +- .../next-power-of-two-overflow-ndebug.rs | 6 +- tests/ui/numbers-arithmetic/num-wrapping.rs | 4 +- .../numeric-method-autoexport.rs | 2 +- .../overflow-attribute-works-1.rs | 4 +- .../overflow-attribute-works-2.rs | 4 +- tests/ui/numbers-arithmetic/overflowing-add.rs | 10 +- tests/ui/numbers-arithmetic/overflowing-lsh-1.rs | 4 +- tests/ui/numbers-arithmetic/overflowing-lsh-2.rs | 4 +- tests/ui/numbers-arithmetic/overflowing-lsh-3.rs | 4 +- tests/ui/numbers-arithmetic/overflowing-lsh-4.rs | 4 +- tests/ui/numbers-arithmetic/overflowing-mul.rs | 10 +- .../numbers-arithmetic/overflowing-neg-nonzero.rs | 8 +- tests/ui/numbers-arithmetic/overflowing-neg.rs | 8 +- .../numbers-arithmetic/overflowing-pow-signed.rs | 10 +- .../numbers-arithmetic/overflowing-pow-unsigned.rs | 10 +- tests/ui/numbers-arithmetic/overflowing-rsh-1.rs | 4 +- tests/ui/numbers-arithmetic/overflowing-rsh-2.rs | 4 +- tests/ui/numbers-arithmetic/overflowing-rsh-3.rs | 4 +- tests/ui/numbers-arithmetic/overflowing-rsh-4.rs | 4 +- tests/ui/numbers-arithmetic/overflowing-rsh-5.rs | 4 +- tests/ui/numbers-arithmetic/overflowing-sub.rs | 10 +- tests/ui/numbers-arithmetic/promoted_overflow.rs | 8 +- .../ui/numbers-arithmetic/promoted_overflow_opt.rs | 4 +- .../saturating-float-casts-impl.rs | 2 +- .../saturating-float-casts-wasm.rs | 6 +- .../numbers-arithmetic/saturating-float-casts.rs | 4 +- tests/ui/numbers-arithmetic/shift-near-oflo.rs | 4 +- tests/ui/numbers-arithmetic/shift-various-types.rs | 2 +- tests/ui/numbers-arithmetic/shift.rs | 2 +- .../numbers-arithmetic/signed-shift-const-eval.rs | 2 +- .../numbers-arithmetic/suggest-float-literal.fixed | 2 +- .../ui/numbers-arithmetic/suggest-float-literal.rs | 2 +- tests/ui/numbers-arithmetic/u128-as-f32.rs | 2 +- tests/ui/numbers-arithmetic/u128.rs | 2 +- tests/ui/numbers-arithmetic/u32-decr.rs | 2 +- tests/ui/numbers-arithmetic/u8-incr-decr.rs | 2 +- tests/ui/numbers-arithmetic/u8-incr.rs | 2 +- tests/ui/numbers-arithmetic/uint.rs | 4 +- .../unary-minus-suffix-inference.rs | 2 +- tests/ui/numeric/numeric-cast-binop.fixed | 2 +- tests/ui/numeric/numeric-cast-binop.rs | 2 +- tests/ui/numeric/numeric-cast.fixed | 2 +- tests/ui/numeric/numeric-cast.rs | 2 +- .../numeric-suffix/numeric-suffix-i32.fixed | 2 +- .../numeric/numeric-suffix/numeric-suffix-i32.rs | 2 +- .../numeric-suffix/numeric-suffix-i64.fixed | 2 +- .../numeric/numeric-suffix/numeric-suffix-i64.rs | 2 +- .../numeric-suffix/numeric-suffix-isize.fixed | 2 +- .../numeric/numeric-suffix/numeric-suffix-isize.rs | 2 +- .../numeric-suffix/numeric-suffix-u32.fixed | 2 +- .../numeric/numeric-suffix/numeric-suffix-u32.rs | 2 +- .../numeric-suffix/numeric-suffix-u64.fixed | 2 +- .../numeric/numeric-suffix/numeric-suffix-u64.rs | 2 +- .../numeric-suffix/numeric-suffix-usize.fixed | 2 +- .../numeric/numeric-suffix/numeric-suffix-usize.rs | 2 +- .../ui/numeric/numeric-suffix/numeric-suffix.fixed | 2 +- tests/ui/numeric/numeric-suffix/numeric-suffix.rs | 2 +- tests/ui/numeric/uppercase-base-prefix.fixed | 2 +- tests/ui/numeric/uppercase-base-prefix.rs | 2 +- .../object-lifetime-default-default-to-static.rs | 4 +- .../object-lifetime-default-dyn-binding-static.rs | 2 +- .../object-lifetime-default-from-ref-struct.rs | 4 +- .../object-lifetime-default-from-rptr-box.rs | 4 +- .../object-lifetime-default-from-rptr-mut.rs | 4 +- .../object-lifetime-default-from-rptr-struct.rs | 4 +- .../object-lifetime-default-from-rptr.rs | 4 +- .../object-lifetime-default-inferred.rs | 4 +- tests/ui/object-safety/assoc_const_bounds.rs | 2 +- tests/ui/object-safety/assoc_const_bounds_sized.rs | 2 +- .../assoc_type_bounds_implicit_sized.fixed | 2 +- .../assoc_type_bounds_implicit_sized.rs | 2 +- tests/ui/object-safety/assoc_type_bounds_sized.rs | 2 +- .../assoc_type_bounds_sized_unnecessary.rs | 2 +- tests/ui/object-safety/avoid-ice-on-warning-2.rs | 6 +- tests/ui/object-safety/avoid-ice-on-warning-3.rs | 6 +- tests/ui/object-safety/avoid-ice-on-warning.rs | 6 +- .../bare-trait-dont-suggest-dyn.new.fixed | 8 +- .../object-safety/bare-trait-dont-suggest-dyn.rs | 8 +- .../object-safety/call-when-assoc-ty-is-sized.rs | 6 +- tests/ui/object-safety/issue-102762.rs | 2 +- tests/ui/object-safety/issue-102933.rs | 2 +- tests/ui/object-safety/issue-106247.rs | 2 +- .../object-safety-associated-consts.rs | 2 +- .../object-safety/object-safety-by-value-self.rs | 2 +- tests/ui/object-safety/object-safety-generics.rs | 2 +- .../object-safety/object-safety-mentions-Self.rs | 2 +- tests/ui/object-safety/object-safety-no-static.rs | 2 +- tests/ui/object-safety/object-safety-phantom-fn.rs | 2 +- tests/ui/object-safety/object-safety-sized-2.rs | 2 +- tests/ui/object-safety/object-safety-sized.rs | 2 +- tests/ui/objects-coerce-freeze-borrored.rs | 2 +- tests/ui/offset-of/offset-of-must-use.rs | 2 +- tests/ui/offset-of/offset-of-tuple-nested.rs | 2 +- tests/ui/offset-of/offset-of-unsized.rs | 2 +- .../offset-of/offset-of-unstable-with-feature.rs | 4 +- tests/ui/offset-of/offset-of-unstable.rs | 2 +- tests/ui/on-unimplemented/no-debug.rs | 2 +- tests/ui/oom_unwind.rs | 10 +- tests/ui/op-assign-builtins-by-ref.rs | 2 +- tests/ui/opeq.rs | 2 +- tests/ui/optimization-fuel-0.rs | 4 +- tests/ui/optimization-fuel-1.rs | 4 +- tests/ui/optimization-remark.rs | 20 +- tests/ui/or-patterns/basic-switch.rs | 2 +- tests/ui/or-patterns/basic-switchint.rs | 2 +- tests/ui/or-patterns/bindings-runpass-1.rs | 2 +- tests/ui/or-patterns/bindings-runpass-2.rs | 2 +- tests/ui/or-patterns/box-patterns.rs | 2 +- tests/ui/or-patterns/consistent-bindings.rs | 4 +- tests/ui/or-patterns/const-fn.rs | 2 +- tests/ui/or-patterns/exhaustiveness-pass.rs | 2 +- tests/ui/or-patterns/fn-param-wrap-parens.fixed | 2 +- tests/ui/or-patterns/fn-param-wrap-parens.rs | 2 +- tests/ui/or-patterns/for-loop.rs | 2 +- tests/ui/or-patterns/if-let-while-let.rs | 2 +- tests/ui/or-patterns/inner-or-pat.rs | 8 +- .../or-patterns/issue-67514-irrefutable-param.rs | 2 +- .../issue-68785-irrefutable-param-with-at.rs | 2 +- ...ssue-69875-should-have-been-expanded-earlier.rs | 2 +- .../issue-70413-no-unreachable-pat-and-guard.rs | 2 +- tests/ui/or-patterns/let-pattern.rs | 2 +- tests/ui/or-patterns/macro-pat.rs | 4 +- .../ui/or-patterns/mismatched-bindings-async-fn.rs | 2 +- tests/ui/or-patterns/missing-bindings.rs | 2 +- tests/ui/or-patterns/mix-with-wild.rs | 2 +- .../or-patterns-default-binding-modes.rs | 2 +- .../or-patterns/or-patterns-syntactic-fail-2018.rs | 2 +- .../or-patterns/or-patterns-syntactic-pass-2021.rs | 4 +- tests/ui/or-patterns/or-patterns-syntactic-pass.rs | 2 +- tests/ui/or-patterns/remove-leading-vert.fixed | 2 +- tests/ui/or-patterns/remove-leading-vert.rs | 2 +- tests/ui/or-patterns/search-via-bindings.rs | 2 +- tests/ui/or-patterns/slice-patterns.rs | 2 +- tests/ui/or-patterns/struct-like.rs | 2 +- tests/ui/orphan-check-diagnostics.rs | 2 +- tests/ui/osx-frameworks.rs | 2 +- tests/ui/out-pointer-aliasing.rs | 2 +- tests/ui/output-slot-variants.rs | 4 +- tests/ui/over-constrained-vregs.rs | 2 +- tests/ui/overloaded/fixup-deref-mut.rs | 4 +- tests/ui/overloaded/issue-14958.rs | 4 +- tests/ui/overloaded/overloaded-autoderef-count.rs | 2 +- .../ui/overloaded/overloaded-autoderef-indexing.rs | 2 +- tests/ui/overloaded/overloaded-autoderef-order.rs | 2 +- tests/ui/overloaded/overloaded-autoderef-vtable.rs | 2 +- tests/ui/overloaded/overloaded-autoderef-xcrate.rs | 4 +- tests/ui/overloaded/overloaded-autoderef.rs | 2 +- .../overloaded/overloaded-calls-object-one-arg.rs | 2 +- .../overloaded/overloaded-calls-object-two-args.rs | 2 +- .../overloaded-calls-object-zero-args.rs | 2 +- .../overloaded/overloaded-calls-param-vtables.rs | 4 +- tests/ui/overloaded/overloaded-calls-simple.rs | 2 +- tests/ui/overloaded/overloaded-calls-zero-args.rs | 2 +- tests/ui/overloaded/overloaded-deref-count.rs | 2 +- tests/ui/overloaded/overloaded-deref.rs | 2 +- tests/ui/overloaded/overloaded-index-assoc-list.rs | 2 +- tests/ui/overloaded/overloaded-index-autoderef.rs | 2 +- tests/ui/overloaded/overloaded-index-in-field.rs | 2 +- tests/ui/overloaded/overloaded-index.rs | 2 +- .../overloaded_deref_with_ref_pattern.rs | 2 +- ...overloaded_deref_with_ref_pattern_issue15609.rs | 2 +- tests/ui/packed/dyn-trait.rs | 2 +- tests/ui/packed/issue-118537-field-offset-ice.rs | 2 +- tests/ui/packed/issue-118537-field-offset.rs | 2 +- tests/ui/packed/issue-46152.rs | 2 +- .../ui/packed/packed-struct-address-of-element.rs | 4 +- .../packed/packed-struct-borrow-element-64bit.rs | 4 +- tests/ui/packed/packed-struct-borrow-element.rs | 2 +- tests/ui/packed/packed-struct-drop-aligned.rs | 2 +- tests/ui/packed/packed-struct-generic-layout.rs | 2 +- tests/ui/packed/packed-struct-generic-size.rs | 2 +- tests/ui/packed/packed-struct-generic-transmute.rs | 2 +- tests/ui/packed/packed-struct-layout.rs | 2 +- tests/ui/packed/packed-struct-match.rs | 2 +- tests/ui/packed/packed-struct-optimized-enum.rs | 2 +- tests/ui/packed/packed-struct-size-xc.rs | 4 +- tests/ui/packed/packed-struct-size.rs | 2 +- tests/ui/packed/packed-struct-transmute.rs | 4 +- tests/ui/packed/packed-struct-vec.rs | 2 +- tests/ui/packed/packed-tuple-struct-layout.rs | 2 +- tests/ui/packed/packed-tuple-struct-size.rs | 2 +- .../packed-with-inference-vars-issue-61402.rs | 2 +- .../ui/panic-handler/auxiliary/some-panic-impl.rs | 2 +- .../ui/panic-handler/auxiliary/weak-lang-items.rs | 2 +- .../panic-handler/panic-handler-bad-signature-1.rs | 2 +- .../panic-handler/panic-handler-bad-signature-2.rs | 2 +- .../panic-handler/panic-handler-bad-signature-3.rs | 2 +- .../panic-handler/panic-handler-bad-signature-4.rs | 2 +- .../panic-handler/panic-handler-bad-signature-5.rs | 2 +- tests/ui/panic-handler/panic-handler-duplicate.rs | 2 +- tests/ui/panic-handler/panic-handler-missing.rs | 4 +- .../panic-handler-requires-panic-info.rs | 2 +- tests/ui/panic-handler/panic-handler-std.rs | 4 +- tests/ui/panic-handler/panic-handler-twice.rs | 4 +- .../panic-handler-with-target-feature.rs | 4 +- .../panic-handler/panic-handler-wrong-location.rs | 2 +- tests/ui/panic-handler/weak-lang-item-2.rs | 6 +- tests/ui/panic-handler/weak-lang-item.rs | 10 +- .../ui/panic-runtime/abort-link-to-unwind-dylib.rs | 14 +- .../abort-link-to-unwinding-crates.rs | 14 +- tests/ui/panic-runtime/abort.rs | 12 +- tests/ui/panic-runtime/auxiliary/depends.rs | 2 +- .../auxiliary/exit-success-if-unwind.rs | 2 +- tests/ui/panic-runtime/auxiliary/needs-abort.rs | 4 +- .../panic-runtime/auxiliary/needs-panic-runtime.rs | 2 +- tests/ui/panic-runtime/auxiliary/needs-unwind.rs | 4 +- .../panic-runtime/auxiliary/panic-runtime-abort.rs | 4 +- .../auxiliary/panic-runtime-lang-items.rs | 2 +- .../auxiliary/panic-runtime-unwind.rs | 4 +- .../auxiliary/panic-runtime-unwind2.rs | 4 +- .../auxiliary/wants-panic-runtime-abort.rs | 4 +- .../auxiliary/wants-panic-runtime-unwind.rs | 2 +- tests/ui/panic-runtime/bad-panic-flag1.rs | 4 +- tests/ui/panic-runtime/bad-panic-flag2.rs | 4 +- tests/ui/panic-runtime/incompatible-type.rs | 4 +- tests/ui/panic-runtime/link-to-abort.rs | 8 +- tests/ui/panic-runtime/link-to-unwind.rs | 4 +- tests/ui/panic-runtime/lto-abort.rs | 10 +- tests/ui/panic-runtime/lto-unwind.rs | 12 +- tests/ui/panic-runtime/need-abort-got-unwind.rs | 8 +- tests/ui/panic-runtime/need-unwind-got-abort.rs | 10 +- .../runtime-depend-on-needs-runtime.rs | 8 +- tests/ui/panic-runtime/transitive-link-a-bunch.rs | 16 +- tests/ui/panic-runtime/two-panic-runtimes.rs | 12 +- tests/ui/panic-runtime/unwind-interleaved.rs | 6 +- tests/ui/panic-runtime/unwind-rec.rs | 6 +- tests/ui/panic-runtime/unwind-rec2.rs | 6 +- .../panic-runtime/unwind-tables-target-required.rs | 8 +- tests/ui/panic-runtime/unwind-unique.rs | 6 +- tests/ui/panic-runtime/want-abort-got-unwind.rs | 10 +- tests/ui/panic-runtime/want-abort-got-unwind2.rs | 12 +- tests/ui/panic-runtime/want-unwind-got-abort.rs | 10 +- tests/ui/panic-runtime/want-unwind-got-abort2.rs | 12 +- tests/ui/panic-while-printing.rs | 4 +- tests/ui/panic_implementation-closures.rs | 2 +- tests/ui/panics/abort-on-panic.rs | 10 +- tests/ui/panics/args-panic.rs | 6 +- tests/ui/panics/default-backtrace-ice.rs | 22 +-- tests/ui/panics/doublepanic.rs | 6 +- tests/ui/panics/explicit-panic-msg.rs | 6 +- tests/ui/panics/explicit-panic.rs | 6 +- tests/ui/panics/fmt-only-once.rs | 6 +- tests/ui/panics/fmt-panic.rs | 6 +- tests/ui/panics/issue-47429-short-backtraces.rs | 30 +-- tests/ui/panics/location-detail-panic-no-column.rs | 8 +- tests/ui/panics/location-detail-panic-no-file.rs | 8 +- tests/ui/panics/location-detail-panic-no-line.rs | 8 +- .../location-detail-panic-no-location-info.rs | 8 +- tests/ui/panics/location-detail-unwrap-no-file.rs | 8 +- tests/ui/panics/main-panic.rs | 6 +- tests/ui/panics/nested_panic_caught.rs | 4 +- tests/ui/panics/panic-2021.rs | 2 +- tests/ui/panics/panic-arg.rs | 6 +- tests/ui/panics/panic-handler-chain-update-hook.rs | 6 +- tests/ui/panics/panic-handler-chain.rs | 6 +- tests/ui/panics/panic-handler-flail-wildly.rs | 6 +- tests/ui/panics/panic-handler-set-twice.rs | 6 +- tests/ui/panics/panic-in-cleanup.rs | 20 +- tests/ui/panics/panic-in-dtor-drops-fields.rs | 6 +- tests/ui/panics/panic-in-ffi.rs | 18 +- tests/ui/panics/panic-macro-any-wrapped.rs | 8 +- tests/ui/panics/panic-macro-any.rs | 8 +- tests/ui/panics/panic-macro-explicit.rs | 8 +- tests/ui/panics/panic-macro-fmt.rs | 8 +- tests/ui/panics/panic-macro-owned.rs | 8 +- tests/ui/panics/panic-macro-static.rs | 8 +- tests/ui/panics/panic-main.rs | 6 +- tests/ui/panics/panic-parens.rs | 6 +- tests/ui/panics/panic-recover-propagate.rs | 6 +- tests/ui/panics/panic-set-handler.rs | 6 +- tests/ui/panics/panic-set-unset-handler.rs | 8 +- .../panics/panic-short-backtrace-windows-x86_64.rs | 14 +- tests/ui/panics/panic-take-handler-nop.rs | 8 +- tests/ui/panics/panic-task-name-none.rs | 8 +- tests/ui/panics/panic-task-name-owned.rs | 8 +- tests/ui/panics/panic.rs | 6 +- tests/ui/panics/result-get-panic.rs | 6 +- tests/ui/panics/runtime-switch.rs | 30 +-- .../ui/panics/short-ice-remove-middle-frames-2.rs | 24 +-- tests/ui/panics/short-ice-remove-middle-frames.rs | 24 +-- tests/ui/panics/test-panic.rs | 8 +- tests/ui/panics/test-should-fail-bad-message.rs | 8 +- tests/ui/panics/test-should-panic-bad-message.rs | 8 +- tests/ui/panics/test-should-panic-no-message.rs | 8 +- tests/ui/panics/unique-panic.rs | 6 +- tests/ui/panics/while-body-panics.rs | 6 +- tests/ui/panics/while-panic.rs | 6 +- .../cache-after-waiting-issue-111528.rs | 4 +- .../export-symbols-deadlock-issue-118205-2.rs | 6 +- .../export-symbols-deadlock-issue-118205.rs | 4 +- tests/ui/parallel-rustc/hello_world.rs | 4 +- .../read-stolen-value-issue-111520.rs | 4 +- tests/ui/parser/anon-enums-are-ambiguous.rs | 2 +- .../assoc/assoc-const-underscore-syntactic-pass.rs | 2 +- tests/ui/parser/assoc/assoc-oddities-1.rs | 2 +- tests/ui/parser/assoc/assoc-oddities-2.rs | 2 +- tests/ui/parser/async-with-nonterminal-block.rs | 4 +- tests/ui/parser/attribute/attr-dangling-in-fn.rs | 2 +- tests/ui/parser/attribute/attr-dangling-in-mod.rs | 2 +- .../ui/parser/attribute/attr-unquoted-ident.fixed | 4 +- tests/ui/parser/attribute/attr-unquoted-ident.rs | 4 +- tests/ui/parser/bad-fn-ptr-qualifier.fixed | 4 +- tests/ui/parser/bad-fn-ptr-qualifier.rs | 4 +- tests/ui/parser/bad-name.rs | 2 +- tests/ui/parser/bad-recover-kw-after-impl.rs | 4 +- tests/ui/parser/bad-recover-ty-after-impl.rs | 2 +- tests/ui/parser/bastion-of-the-turbofish.rs | 2 +- tests/ui/parser/block-no-opening-brace.rs | 2 +- tests/ui/parser/bounds-obj-parens.rs | 2 +- tests/ui/parser/bounds-type.rs | 2 +- tests/ui/parser/break-in-unlabeled-block.fixed | 2 +- tests/ui/parser/break-in-unlabeled-block.rs | 2 +- tests/ui/parser/circular_modules_hello.rs | 2 +- tests/ui/parser/circular_modules_main.rs | 2 +- tests/ui/parser/class-implements-bad-trait.rs | 2 +- ...nstraints-before-generic-args-syntactic-pass.rs | 2 +- tests/ui/parser/doc-comment-in-stmt.fixed | 2 +- tests/ui/parser/doc-comment-in-stmt.rs | 2 +- tests/ui/parser/eq-gt-to-gt-eq.fixed | 2 +- tests/ui/parser/eq-gt-to-gt-eq.rs | 2 +- tests/ui/parser/expr-as-stmt.fixed | 4 +- tests/ui/parser/expr-as-stmt.rs | 4 +- .../ui/parser/extern-abi-from-mac-literal-frag.rs | 2 +- tests/ui/parser/extern-abi-raw-strings.rs | 2 +- tests/ui/parser/extern-abi-string-escaping.rs | 2 +- tests/ui/parser/extern-abi-syntactic.rs | 2 +- tests/ui/parser/extern-crate-async.rs | 2 +- tests/ui/parser/float-literals.rs | 2 +- tests/ui/parser/fn-body-optional-syntactic-pass.rs | 2 +- tests/ui/parser/fn-defined-using-def.rs | 2 +- tests/ui/parser/fn-defined-using-fun.rs | 2 +- tests/ui/parser/fn-defined-using-func.rs | 2 +- tests/ui/parser/fn-defined-using-function.rs | 2 +- tests/ui/parser/fn-header-semantic-fail.rs | 2 +- tests/ui/parser/fn-header-syntactic-pass.rs | 4 +- tests/ui/parser/fn-returns-fn-pointer.rs | 2 +- tests/ui/parser/foreign-static-syntactic-pass.rs | 2 +- tests/ui/parser/foreign-ty-syntactic-pass.rs | 2 +- tests/ui/parser/generic-param-default-in-binder.rs | 2 +- tests/ui/parser/if-block-unreachable-expr.rs | 2 +- tests/ui/parser/if-in-in.fixed | 2 +- tests/ui/parser/if-in-in.rs | 2 +- tests/ui/parser/impl-item-const-pass.rs | 2 +- tests/ui/parser/impl-item-fn-no-body-pass.rs | 2 +- tests/ui/parser/impl-item-type-no-body-pass.rs | 2 +- tests/ui/parser/impl-qpath.rs | 4 +- tests/ui/parser/import-from-path.rs | 2 +- tests/ui/parser/import-from-rename.rs | 2 +- tests/ui/parser/import-glob-path.rs | 2 +- tests/ui/parser/import-glob-rename.rs | 2 +- tests/ui/parser/increment-autofix-2.fixed | 2 +- tests/ui/parser/increment-autofix-2.rs | 2 +- tests/ui/parser/increment-autofix.fixed | 2 +- tests/ui/parser/increment-autofix.rs | 2 +- tests/ui/parser/inner-attr-in-trait-def.rs | 2 +- tests/ui/parser/intersection-patterns-1.fixed | 2 +- tests/ui/parser/intersection-patterns-1.rs | 2 +- ...ue-89971-outer-attr-following-inner-attr-ice.rs | 4 +- tests/ui/parser/issues/issue-100197-mut-let.fixed | 2 +- tests/ui/parser/issues/issue-100197-mut-let.rs | 2 +- tests/ui/parser/issues/issue-101477-enum.fixed | 2 +- tests/ui/parser/issues/issue-101477-enum.rs | 2 +- tests/ui/parser/issues/issue-101477-let.fixed | 2 +- tests/ui/parser/issues/issue-101477-let.rs | 2 +- tests/ui/parser/issues/issue-103381.fixed | 2 +- tests/ui/parser/issues/issue-103381.rs | 2 +- tests/ui/parser/issues/issue-103451.rs | 2 +- tests/ui/parser/issues/issue-10392-2.fixed | 2 +- tests/ui/parser/issues/issue-10392-2.rs | 2 +- tests/ui/parser/issues/issue-105209.rs | 2 +- tests/ui/parser/issues/issue-105366.fixed | 2 +- tests/ui/parser/issues/issue-105366.rs | 2 +- tests/ui/parser/issues/issue-105634.rs | 2 +- tests/ui/parser/issues/issue-10636-2.rs | 2 +- tests/ui/parser/issues/issue-107705.rs | 2 +- .../issues/issue-108109-fn-missing-params.fixed | 2 +- .../issues/issue-108109-fn-missing-params.rs | 2 +- .../issue-108109-fn-trait-missing-paren.fixed | 2 +- .../issues/issue-108109-fn-trait-missing-paren.rs | 2 +- tests/ui/parser/issues/issue-112188.fixed | 2 +- tests/ui/parser/issues/issue-112188.rs | 2 +- tests/ui/parser/issues/issue-113203.rs | 2 +- .../issue-115780-pat-lt-bracket-in-macro-call.rs | 2 +- tests/ui/parser/issues/issue-14303-fncall.rs | 2 +- tests/ui/parser/issues/issue-17718-parse-const.rs | 2 +- tests/ui/parser/issues/issue-17904.rs | 2 +- tests/ui/parser/issues/issue-21146.rs | 2 +- tests/ui/parser/issues/issue-21475.rs | 4 +- tests/ui/parser/issues/issue-30318.fixed | 2 +- tests/ui/parser/issues/issue-30318.rs | 2 +- tests/ui/parser/issues/issue-3036.fixed | 2 +- tests/ui/parser/issues/issue-3036.rs | 2 +- .../issues/issue-35813-postfix-after-cast.rs | 2 +- tests/ui/parser/issues/issue-46186.fixed | 2 +- tests/ui/parser/issues/issue-46186.rs | 2 +- ...e-48137-macros-cannot-interpolate-impl-items.rs | 2 +- tests/ui/parser/issues/issue-48508-aux.rs | 4 +- tests/ui/parser/issues/issue-48508.rs | 4 +- tests/ui/parser/issues/issue-48636.fixed | 2 +- tests/ui/parser/issues/issue-48636.rs | 2 +- tests/ui/parser/issues/issue-54521-1.rs | 2 +- tests/ui/parser/issues/issue-54521-2.fixed | 2 +- tests/ui/parser/issues/issue-54521-2.rs | 2 +- tests/ui/parser/issues/issue-54521-3.fixed | 2 +- tests/ui/parser/issues/issue-54521-3.rs | 2 +- tests/ui/parser/issues/issue-57684.fixed | 2 +- tests/ui/parser/issues/issue-57684.rs | 2 +- tests/ui/parser/issues/issue-57819.fixed | 2 +- tests/ui/parser/issues/issue-57819.rs | 2 +- tests/ui/parser/issues/issue-5806.rs | 4 +- .../issue-58094-missing-right-square-bracket.rs | 4 +- tests/ui/parser/issues/issue-62524.rs | 2 +- tests/ui/parser/issues/issue-62554.rs | 2 +- tests/ui/parser/issues/issue-62894.rs | 2 +- tests/ui/parser/issues/issue-62973.rs | 2 +- .../issues/issue-63115-range-pat-interpolated.rs | 2 +- tests/ui/parser/issues/issue-63116.rs | 2 +- tests/ui/parser/issues/issue-63135.rs | 4 +- .../issue-65041-empty-vis-matcher-in-enum.rs | 2 +- .../issue-65041-empty-vis-matcher-in-trait.rs | 2 +- .../issue-65846-rollback-gating-failing-matcher.rs | 2 +- tests/ui/parser/issues/issue-66473.rs | Bin 127 -> 129 bytes ...46-negative-outlives-bound-syntactic-fail.fixed | 2 +- ...67146-negative-outlives-bound-syntactic-fail.rs | 2 +- tests/ui/parser/issues/issue-68629.rs | Bin 129 -> 131 bytes tests/ui/parser/issues/issue-68730.rs | Bin 175 -> 177 bytes .../issue-68788-in-trait-item-propagation.rs | 4 +- .../issue-70050-ntliteral-accepts-negated-lit.rs | 2 +- .../issues/issue-70388-without-witness.fixed | 2 +- .../parser/issues/issue-70388-without-witness.rs | 2 +- tests/ui/parser/issues/issue-7222.rs | 4 +- tests/ui/parser/issues/issue-75599.rs | 2 +- tests/ui/parser/issues/issue-76437-async.rs | 2 +- .../issues/issue-76437-const-async-unsafe.rs | 2 +- tests/ui/parser/issues/issue-76437-const-async.rs | 2 +- tests/ui/parser/issues/issue-76437-const.rs | 2 +- .../parser/issues/issue-76437-pub-crate-unsafe.rs | 2 +- tests/ui/parser/issues/issue-76437-unsafe.rs | 2 +- tests/ui/parser/issues/issue-76597.fixed | 2 +- tests/ui/parser/issues/issue-76597.rs | 2 +- tests/ui/parser/issues/issue-81804.rs | 4 +- tests/ui/parser/issues/issue-81827.rs | 4 +- tests/ui/parser/issues/issue-83639.rs | 2 +- tests/ui/parser/issues/issue-84104.rs | 2 +- tests/ui/parser/issues/issue-84148-2.rs | 2 +- .../issues/issue-87197-missing-semicolon.fixed | 2 +- .../parser/issues/issue-87197-missing-semicolon.rs | 2 +- .../issue-87217-keyword-order/const-async-const.rs | 2 +- .../issue-87217-keyword-order/several-kw-jump.rs | 2 +- .../issue-87217-keyword-order/wrong-async.rs | 2 +- .../issue-87217-keyword-order/wrong-const.rs | 2 +- .../issue-87217-keyword-order/wrong-unsafe.rs | 2 +- .../ui/parser/issues/issue-88276-unary-plus.fixed | 2 +- tests/ui/parser/issues/issue-88276-unary-plus.rs | 2 +- .../ui/parser/issues/issue-88583-union-as-ident.rs | 2 +- tests/ui/parser/issues/issue-88770.rs | 2 +- tests/ui/parser/issues/issue-89396.fixed | 2 +- tests/ui/parser/issues/issue-89396.rs | 2 +- ...ue-89971-outer-attr-following-inner-attr-ice.rs | 2 +- ...ssue-99625-enum-struct-mutually-exclusive.fixed | 2 +- .../issue-99625-enum-struct-mutually-exclusive.rs | 2 +- .../issue-99910-const-let-mutually-exclusive.fixed | 2 +- .../issue-99910-const-let-mutually-exclusive.rs | 2 +- .../ui/parser/issues/recover-ge-as-fat-arrow.fixed | 2 +- tests/ui/parser/issues/recover-ge-as-fat-arrow.rs | 2 +- .../item-free-const-no-body-syntactic-pass.rs | 2 +- .../item-free-static-no-body-syntactic-pass.rs | 2 +- .../parser/item-free-type-bounds-syntactic-pass.rs | 2 +- tests/ui/parser/item-kw-case-mismatch.fixed | 4 +- tests/ui/parser/item-kw-case-mismatch.rs | 4 +- .../keyword-try-as-identifier-edition2018.rs | 2 +- tests/ui/parser/keyword-union-as-identifier.rs | 2 +- tests/ui/parser/kw-in-trait-bounds.rs | 2 +- tests/ui/parser/let-binop.fixed | 2 +- tests/ui/parser/let-binop.rs | 2 +- tests/ui/parser/lifetime-semicolon.fixed | 2 +- tests/ui/parser/lifetime-semicolon.rs | 2 +- tests/ui/parser/macro-braces-dot-question.rs | 2 +- tests/ui/parser/macro/macro-expand-to-field.rs | 2 +- .../mbe-bare-trait-object-maybe-trait-bound.rs | 4 +- tests/ui/parser/match-refactor-to-expr.fixed | 2 +- tests/ui/parser/match-refactor-to-expr.rs | 2 +- tests/ui/parser/mbe_missing_right_paren.rs | 2 +- tests/ui/parser/missing_right_paren.rs | 4 +- tests/ui/parser/misspelled-macro-rules.fixed | 2 +- tests/ui/parser/misspelled-macro-rules.rs | 2 +- tests/ui/parser/mod_file_not_exist.rs | 2 +- tests/ui/parser/mod_file_not_exist_windows.rs | 2 +- tests/ui/parser/mod_file_with_path_attr.rs | 2 +- tests/ui/parser/mut-patterns.rs | 2 +- tests/ui/parser/operator-associativity.rs | 2 +- tests/ui/parser/parse-assoc-type-lt.rs | 4 +- tests/ui/parser/parse-panic.rs | 2 +- tests/ui/parser/parser-unicode-whitespace.rs | 2 +- tests/ui/parser/pat-tuple-2.rs | 2 +- tests/ui/parser/public-instead-of-pub-1.fixed | 2 +- tests/ui/parser/public-instead-of-pub-1.rs | 2 +- tests/ui/parser/public-instead-of-pub-3.fixed | 2 +- tests/ui/parser/public-instead-of-pub-3.rs | 2 +- tests/ui/parser/public-instead-of-pub.fixed | 4 +- tests/ui/parser/public-instead-of-pub.rs | 4 +- tests/ui/parser/qualified-path-in-turbofish.fixed | 2 +- tests/ui/parser/qualified-path-in-turbofish.rs | 2 +- tests/ui/parser/range_inclusive.fixed | 2 +- tests/ui/parser/range_inclusive.rs | 2 +- tests/ui/parser/ranges-precedence.rs | 2 +- tests/ui/parser/raw/raw-str-in-macro-call.rs | 2 +- .../parser/recover/recover-const-async-fn-ptr.rs | 2 +- .../recover-for-loop-parens-around-head.fixed | 2 +- .../recover/recover-for-loop-parens-around-head.rs | 2 +- .../recover/recover-labeled-non-block-expr.fixed | 2 +- .../recover/recover-labeled-non-block-expr.rs | 2 +- .../recover/recover-missing-semi-before-item.fixed | 2 +- .../recover/recover-missing-semi-before-item.rs | 2 +- .../recover-parens-around-match-arm-head.fixed | 2 +- .../recover-parens-around-match-arm-head.rs | 2 +- .../parser/recover/recover-unticked-labels.fixed | 2 +- tests/ui/parser/recover/recover-unticked-labels.rs | 2 +- ...r-where-clause-before-tuple-struct-body-0.fixed | 2 +- ...over-where-clause-before-tuple-struct-body-0.rs | 2 +- .../parser/removed-syntax/removed-syntax-box.fixed | 2 +- .../ui/parser/removed-syntax/removed-syntax-box.rs | 2 +- tests/ui/parser/self-param-syntactic-pass.rs | 2 +- tests/ui/parser/semi-after-closure-in-macro.rs | 2 +- tests/ui/parser/shebang/multiline-attrib.rs | 2 +- tests/ui/parser/shebang/regular-attrib.rs | 2 +- tests/ui/parser/shebang/shebang-and-attrib.rs | 2 +- tests/ui/parser/shebang/shebang-comment.rs | 2 +- tests/ui/parser/shebang/shebang-empty.rs | 2 +- tests/ui/parser/shebang/shebang-space.rs | 2 +- tests/ui/parser/shebang/sneaky-attrib.rs | 2 +- tests/ui/parser/shebang/valid-shebang.rs | 2 +- tests/ui/parser/slowparse-bstring.rs | 2 +- tests/ui/parser/slowparse-string.rs | 2 +- .../ui/parser/stripped-nested-outline-mod-pass.rs | 2 +- ...efault-values-and-missing-field-separator.fixed | 2 +- ...t-default-values-and-missing-field-separator.rs | 2 +- tests/ui/parser/struct-filed-with-attr.fixed | 2 +- tests/ui/parser/struct-filed-with-attr.rs | 2 +- tests/ui/parser/struct-literal-in-match-guard.rs | 2 +- tests/ui/parser/suggest-assoc-const.fixed | 2 +- tests/ui/parser/suggest-assoc-const.rs | 2 +- ...removing-semicolon-after-impl-trait-items.fixed | 2 +- ...st-removing-semicolon-after-impl-trait-items.rs | 2 +- .../ui/parser/suggest-semicolon-before-array.fixed | 2 +- tests/ui/parser/suggest-semicolon-before-array.rs | 2 +- .../parser/suggest_misplaced_generics/enum.fixed | 2 +- tests/ui/parser/suggest_misplaced_generics/enum.rs | 2 +- .../fn-complex-generics.fixed | 2 +- .../fn-complex-generics.rs | 2 +- .../suggest_misplaced_generics/fn-simple.fixed | 2 +- .../parser/suggest_misplaced_generics/fn-simple.rs | 2 +- .../parser/suggest_misplaced_generics/struct.fixed | 2 +- .../ui/parser/suggest_misplaced_generics/struct.rs | 2 +- .../parser/suggest_misplaced_generics/trait.fixed | 2 +- .../ui/parser/suggest_misplaced_generics/trait.rs | 2 +- .../parser/suggest_misplaced_generics/type.fixed | 2 +- tests/ui/parser/suggest_misplaced_generics/type.rs | 2 +- tests/ui/parser/trailing-plus-in-bounds.rs | 2 +- tests/ui/parser/trailing-question-in-type.fixed | 2 +- tests/ui/parser/trailing-question-in-type.rs | 2 +- .../ui/parser/trait-item-with-defaultness-pass.rs | 2 +- tests/ui/parser/trait-object-delimiters.rs | 2 +- tests/ui/parser/trait-plusequal-splitting.rs | 2 +- tests/ui/parser/try-with-nonterminal-block.rs | 4 +- tests/ui/parser/unbalanced-doublequote.rs | 2 +- tests/ui/parser/unicode-character-literal.fixed | 2 +- tests/ui/parser/unicode-character-literal.rs | 2 +- tests/ui/parser/use-unclosed-brace.rs | 2 +- tests/ui/parser/utf16-be-without-bom.rs | Bin 125 -> 127 bytes tests/ui/parser/utf16-le-without-bom.rs | Bin 126 -> 128 bytes tests/ui/parser/utf8_idents-rpass.rs | 2 +- tests/ui/parser/variadic-ffi-syntactic-pass.rs | 2 +- tests/ui/path-lookahead.fixed | 4 +- tests/ui/path-lookahead.rs | 4 +- tests/ui/path.rs | 4 +- tests/ui/paths-containing-nul.rs | 8 +- tests/ui/pattern/bindings-after-at/bind-by-copy.rs | 2 +- .../borrowck-pat-at-and-box-pass.rs | 2 +- .../borrowck-pat-by-copy-bindings-in-at.rs | 2 +- .../borrowck-pat-ref-both-sides.rs | 2 +- tests/ui/pattern/bindings-after-at/box-patterns.rs | 2 +- .../bindings-after-at/nested-binding-mode-lint.rs | 2 +- .../pattern/bindings-after-at/nested-patterns.rs | 2 +- .../bindings-after-at/or-patterns-box-patterns.rs | 2 +- .../or-patterns-slice-patterns.rs | 2 +- tests/ui/pattern/bindings-after-at/or-patterns.rs | 2 +- .../ui/pattern/bindings-after-at/slice-patterns.rs | 2 +- tests/ui/pattern/byte-string-inference.rs | 2 +- tests/ui/pattern/ignore-all-the-things.rs | 2 +- .../incorrect-placement-of-pattern-modifiers.fixed | 2 +- .../incorrect-placement-of-pattern-modifiers.rs | 2 +- tests/ui/pattern/integer-range-binding.rs | 2 +- tests/ui/pattern/issue-10392.rs | 2 +- tests/ui/pattern/issue-106862.fixed | 2 +- tests/ui/pattern/issue-106862.rs | 2 +- tests/ui/pattern/issue-110508.rs | 2 +- tests/ui/pattern/issue-11577.rs | 2 +- tests/ui/pattern/issue-117626.rs | 2 +- tests/ui/pattern/issue-12582.rs | 2 +- tests/ui/pattern/issue-15080.rs | 2 +- tests/ui/pattern/issue-22546.rs | 2 +- tests/ui/pattern/issue-27320.rs | 2 +- tests/ui/pattern/issue-6449.rs | 2 +- tests/ui/pattern/issue-74954.rs | 2 +- tests/ui/pattern/issue-8351-1.rs | 2 +- tests/ui/pattern/issue-8351-2.rs | 2 +- .../issue-88074-pat-range-type-inference.rs | 2 +- .../borrowck-move-ref-pattern-pass.rs | 2 +- .../by-move-sub-pat-unreachable.rs | 2 +- tests/ui/pattern/move-ref-patterns/issue-53840.rs | 2 +- .../move-ref-patterns-closure-captures-pass.rs | 2 +- ...ef-patterns-default-binding-modes-fixable.fixed | 2 +- ...e-ref-patterns-default-binding-modes-fixable.rs | 2 +- .../move-ref-patterns-dynamic-semantics.rs | 2 +- tests/ui/pattern/non-structural-match-types.rs | 2 +- tests/ui/pattern/pat-tuple-field-count-cross.rs | 2 +- tests/ui/pattern/pattern-bad-ref-box-order.fixed | 2 +- tests/ui/pattern/pattern-bad-ref-box-order.rs | 2 +- tests/ui/pattern/rest-pat-syntactic.rs | 2 +- tests/ui/pattern/size-and-align.rs | 2 +- tests/ui/pattern/slice-array-infer.rs | 2 +- tests/ui/pattern/slice-patterns-nested.rs | 2 +- ...priate-missing-pattern-excluding-comments.fixed | 2 +- ...propriate-missing-pattern-excluding-comments.rs | 2 +- .../usefulness/always-inhabited-union-ref.rs | 2 +- tests/ui/pattern/usefulness/const-pat-ice.rs | 2 +- .../ui/pattern/usefulness/const-private-fields.rs | 2 +- tests/ui/pattern/usefulness/doc-hidden-fields.rs | 2 +- .../usefulness/doc-hidden-non-exhaustive.rs | 2 +- .../pattern/usefulness/empty-match-check-notes.rs | 4 +- tests/ui/pattern/usefulness/empty-match.rs | 2 +- tests/ui/pattern/usefulness/empty-types.rs | 2 +- ...8-overlapping_range_endpoints-false-positive.rs | 2 +- .../usefulness/integer-ranges/pointer-sized-int.rs | 2 +- .../pattern/usefulness/irrefutable-let-patterns.rs | 2 +- tests/ui/pattern/usefulness/irrefutable-unit.rs | 4 +- ...ue-118437-exponential-time-on-diagonal-match.rs | 2 +- tests/ui/pattern/usefulness/issue-30240-rpass.rs | 2 +- .../issue-53820-slice-pattern-large-array.rs | 2 +- ...ue-65413-constants-and-slices-exhaustiveness.rs | 2 +- tests/ui/pattern/usefulness/issue-66501.rs | 2 +- .../issue-71930-type-of-match-scrutinee.rs | 2 +- .../issue-72476-and-89393-associated-type.rs | 2 +- .../usefulness/issue-78549-ref-pat-and-str.rs | 2 +- .../usefulness/issue-80501-or-pat-and-macro.rs | 2 +- tests/ui/pattern/usefulness/issue-88747.rs | 2 +- .../ui/pattern/usefulness/match-privately-empty.rs | 2 +- .../pattern/usefulness/nested-exhaustive-match.rs | 4 +- .../usefulness/nested-non-exhaustive-enums.rs | 2 +- .../usefulness/slice-patterns-irrefutable.rs | 2 +- tests/ui/pattern/usefulness/slice_of_empty.rs | 2 +- tests/ui/pattern/usefulness/stable-gated-fields.rs | 2 +- .../ui/pattern/usefulness/stable-gated-patterns.rs | 2 +- tests/ui/pattern/usefulness/uninhabited.rs | 4 +- .../ui/pattern/usefulness/unstable-gated-fields.rs | 2 +- .../pattern/usefulness/unstable-gated-patterns.rs | 2 +- tests/ui/pin-macro/cant_access_internals.rs | 2 +- .../lifetime_errors_on_promotion_misusage.rs | 2 +- tests/ui/polymorphization/closure_in_upvar/fn.rs | 4 +- .../ui/polymorphization/closure_in_upvar/fnmut.rs | 4 +- .../ui/polymorphization/closure_in_upvar/fnonce.rs | 4 +- .../ui/polymorphization/closure_in_upvar/other.rs | 4 +- .../polymorphization/const_parameters/closures.rs | 4 +- .../polymorphization/const_parameters/functions.rs | 4 +- tests/ui/polymorphization/coroutine.rs | 4 +- tests/ui/polymorphization/drop_shims/simple.rs | 4 +- tests/ui/polymorphization/drop_shims/transitive.rs | 4 +- tests/ui/polymorphization/issue-74614.rs | 4 +- tests/ui/polymorphization/issue-74636.rs | 4 +- tests/ui/polymorphization/lifetimes.rs | 4 +- tests/ui/polymorphization/normalized_sig_types.rs | 4 +- tests/ui/polymorphization/predicates.rs | 4 +- tests/ui/polymorphization/promoted-function-1.rs | 4 +- tests/ui/polymorphization/promoted-function-2.rs | 4 +- tests/ui/polymorphization/promoted-function-3.rs | 4 +- tests/ui/polymorphization/promoted-function.rs | 4 +- tests/ui/polymorphization/symbol-ambiguity.rs | 4 +- .../ui/polymorphization/too-many-generic-params.rs | 2 +- .../polymorphization/type_parameters/closures.rs | 4 +- .../polymorphization/type_parameters/functions.rs | 4 +- tests/ui/polymorphization/unsized_cast.rs | 4 +- tests/ui/precondition-checks/misaligned-slice.rs | 10 +- tests/ui/precondition-checks/null-slice.rs | 10 +- .../out-of-bounds-get-unchecked.rs | 10 +- tests/ui/primitive-binop-lhs-mut.rs | 2 +- tests/ui/print-fuel/print-fuel.rs | 4 +- tests/ui/print-stdout-eprint-stderr.rs | 6 +- tests/ui/print_type_sizes/anonymous.rs | 4 +- tests/ui/print_type_sizes/async.rs | 8 +- tests/ui/print_type_sizes/coroutine.rs | 6 +- .../print_type_sizes/coroutine_discr_placement.rs | 6 +- tests/ui/print_type_sizes/generics.rs | 6 +- tests/ui/print_type_sizes/multiple_types.rs | 4 +- tests/ui/print_type_sizes/niche-filling.rs | 8 +- tests/ui/print_type_sizes/no_duplicates.rs | 6 +- tests/ui/print_type_sizes/packed.rs | 6 +- tests/ui/print_type_sizes/padding.rs | 4 +- tests/ui/print_type_sizes/repr-align.rs | 6 +- tests/ui/print_type_sizes/repr_int_c.rs | 4 +- tests/ui/print_type_sizes/uninhabited.rs | 6 +- tests/ui/print_type_sizes/variants.rs | 4 +- tests/ui/print_type_sizes/zero-sized-fields.rs | 6 +- tests/ui/privacy/auxiliary/ctor_aux.rs | 2 +- tests/ui/privacy/auxiliary/issue-117997.rs | 4 +- tests/ui/privacy/ctor.rs | 6 +- tests/ui/privacy/impl-privacy-xc-2.rs | 4 +- .../import-list-stem-visibility-issue-119126.rs | 4 +- tests/ui/privacy/issue-11593.rs | 2 +- tests/ui/privacy/issue-117997.rs | 4 +- tests/ui/privacy/issue-119463.rs | 2 +- tests/ui/privacy/issue-17718-const-privacy.rs | 2 +- tests/ui/privacy/issue-57264-1.rs | 4 +- tests/ui/privacy/issue-57264-2.rs | 4 +- tests/ui/privacy/issue-75907_b.rs | 2 +- tests/ui/privacy/issue-92755.rs | 4 +- tests/ui/privacy/macro-private-reexport.rs | 2 +- tests/ui/privacy/priv-impl-prim-ty.rs | 6 +- tests/ui/privacy/privacy-ns.rs | 4 +- tests/ui/privacy/privacy-reexport.rs | 6 +- tests/ui/privacy/privacy1-rpass.rs | 4 +- tests/ui/privacy/privacy2.rs | 2 +- tests/ui/privacy/privacy3.rs | 2 +- tests/ui/privacy/privacy5.rs | 2 +- tests/ui/privacy/private-bounds-locally-allowed.rs | 4 +- tests/ui/privacy/private-class-field.rs | 2 +- tests/ui/privacy/private-in-public-expr-pat.rs | 2 +- .../private-in-public-type-alias-impl-trait.rs | 2 +- tests/ui/privacy/private-in-public.rs | 2 +- tests/ui/privacy/private-inferred-type-2.rs | 2 +- tests/ui/privacy/private-inferred-type-3.rs | 16 +- tests/ui/privacy/private-method-cross-crate.rs | 2 +- tests/ui/privacy/private-method-rpass.rs | 4 +- .../ui/privacy/private-struct-field-cross-crate.rs | 2 +- tests/ui/privacy/private-type-in-interface.rs | 2 +- tests/ui/privacy/pub-extern-privacy.rs | 6 +- tests/ui/privacy/pub-priv-dep/pub-priv1.rs | 6 +- tests/ui/privacy/pub-priv-dep/std-pub.rs | 2 +- tests/ui/privacy/pub-use-xcrate.rs | 8 +- tests/ui/privacy/pub_use_mods_xcrate_exe.rs | 6 +- tests/ui/privacy/reachable-unnameable-items.rs | 6 +- .../privacy/restricted/lookup-ignores-private.rs | 2 +- tests/ui/privacy/restricted/private-in-public.rs | 2 +- tests/ui/privacy/restricted/relative-2018.rs | 2 +- tests/ui/privacy/restricted/test.rs | 2 +- .../privacy/sealed-traits/re-exported-trait.fixed | 2 +- .../ui/privacy/sealed-traits/re-exported-trait.rs | 2 +- tests/ui/privacy/suggest-making-field-public.fixed | 2 +- tests/ui/privacy/suggest-making-field-public.rs | 2 +- tests/ui/privacy/unresolved-trait-impl-item.rs | 2 +- .../ui/privacy/where-pub-type-impls-priv-trait.rs | 2 +- tests/ui/privacy/xc-private-method.rs | 2 +- tests/ui/privacy/xc-private-method2.rs | 2 +- tests/ui/proc-macro/add-impl.rs | 4 +- tests/ui/proc-macro/allowed-attr-stmt-expr.rs | 8 +- tests/ui/proc-macro/allowed-signatures.rs | 6 +- .../ui/proc-macro/ambiguous-builtin-attrs-test.rs | 4 +- tests/ui/proc-macro/ambiguous-builtin-attrs.rs | 4 +- tests/ui/proc-macro/amputate-span.fixed | 8 +- tests/ui/proc-macro/amputate-span.rs | 8 +- tests/ui/proc-macro/append-impl.rs | 4 +- tests/ui/proc-macro/attr-args.rs | 4 +- tests/ui/proc-macro/attr-cfg.rs | 6 +- tests/ui/proc-macro/attr-complex-fn.rs | 6 +- tests/ui/proc-macro/attr-invalid-exprs.rs | 2 +- tests/ui/proc-macro/attr-on-trait.rs | 4 +- tests/ui/proc-macro/attr-stmt-expr-rpass.rs | 4 +- tests/ui/proc-macro/attr-stmt-expr.rs | 6 +- tests/ui/proc-macro/attribute-after-derive.rs | 6 +- tests/ui/proc-macro/attribute-spans-preserved.rs | 2 +- tests/ui/proc-macro/attribute-with-error.rs | 2 +- tests/ui/proc-macro/attribute.rs | 4 +- tests/ui/proc-macro/attributes-included.rs | 4 +- tests/ui/proc-macro/attributes-on-definitions.rs | 4 +- tests/ui/proc-macro/attributes-on-modules-fail.rs | 2 +- tests/ui/proc-macro/attributes-on-modules.rs | 4 +- tests/ui/proc-macro/auxiliary/add-impl.rs | 4 +- tests/ui/proc-macro/auxiliary/amputate-span.rs | 4 +- tests/ui/proc-macro/auxiliary/api/mod.rs | 6 +- tests/ui/proc-macro/auxiliary/append-impl.rs | 4 +- tests/ui/proc-macro/auxiliary/assert-span-pos.rs | 4 +- tests/ui/proc-macro/auxiliary/attr-args.rs | 4 +- tests/ui/proc-macro/auxiliary/attr-cfg.rs | 4 +- tests/ui/proc-macro/auxiliary/attr-on-trait.rs | 4 +- .../proc-macro/auxiliary/attr-stmt-expr-rpass.rs | 4 +- tests/ui/proc-macro/auxiliary/attr-stmt-expr.rs | 4 +- .../auxiliary/attribute-spans-preserved.rs | 4 +- .../ui/proc-macro/auxiliary/attributes-included.rs | 4 +- .../auxiliary/attributes-on-definitions.rs | 4 +- tests/ui/proc-macro/auxiliary/bang-macro.rs | 4 +- tests/ui/proc-macro/auxiliary/bang_proc_macro2.rs | 4 +- tests/ui/proc-macro/auxiliary/builtin-attrs.rs | 4 +- tests/ui/proc-macro/auxiliary/call-deprecated.rs | 4 +- tests/ui/proc-macro/auxiliary/call-site.rs | 4 +- tests/ui/proc-macro/auxiliary/cond_plugin.rs | 4 +- .../ui/proc-macro/auxiliary/count_compound_ops.rs | 4 +- .../auxiliary/custom-attr-only-one-derive.rs | 4 +- tests/ui/proc-macro/auxiliary/custom-quote.rs | 4 +- tests/ui/proc-macro/auxiliary/derive-a.rs | 4 +- tests/ui/proc-macro/auxiliary/derive-atob.rs | 4 +- tests/ui/proc-macro/auxiliary/derive-attr-cfg.rs | 4 +- tests/ui/proc-macro/auxiliary/derive-b-rpass.rs | 4 +- tests/ui/proc-macro/auxiliary/derive-b.rs | 4 +- tests/ui/proc-macro/auxiliary/derive-bad.rs | 4 +- tests/ui/proc-macro/auxiliary/derive-clona.rs | 4 +- tests/ui/proc-macro/auxiliary/derive-ctod.rs | 4 +- tests/ui/proc-macro/auxiliary/derive-foo.rs | 4 +- .../auxiliary/derive-helper-shadowing-2.rs | 4 +- .../auxiliary/derive-helper-shadowing.rs | 4 +- tests/ui/proc-macro/auxiliary/derive-nothing.rs | 4 +- .../ui/proc-macro/auxiliary/derive-same-struct.rs | 4 +- tests/ui/proc-macro/auxiliary/derive-two-attrs.rs | 4 +- tests/ui/proc-macro/auxiliary/derive-union.rs | 4 +- tests/ui/proc-macro/auxiliary/derive-unstable-2.rs | 4 +- tests/ui/proc-macro/auxiliary/derive-unstable.rs | 4 +- tests/ui/proc-macro/auxiliary/double.rs | 4 +- tests/ui/proc-macro/auxiliary/duplicate.rs | 4 +- .../auxiliary/edition-gated-async-move-syntax.rs | 4 +- .../proc-macro/auxiliary/edition-imports-2015.rs | 6 +- tests/ui/proc-macro/auxiliary/empty-crate.rs | 4 +- tests/ui/proc-macro/auxiliary/env.rs | 4 +- tests/ui/proc-macro/auxiliary/expand-expr.rs | 4 +- .../ui/proc-macro/auxiliary/expand-with-a-macro.rs | 4 +- tests/ui/proc-macro/auxiliary/exports_no_mangle.rs | 4 +- tests/ui/proc-macro/auxiliary/first-second.rs | 4 +- .../ui/proc-macro/auxiliary/gen-lifetime-token.rs | 4 +- .../auxiliary/gen-macro-rules-hygiene.rs | 4 +- tests/ui/proc-macro/auxiliary/gen-macro-rules.rs | 4 +- .../proc-macro/auxiliary/generate-dollar-ident.rs | 4 +- tests/ui/proc-macro/auxiliary/generate-mod.rs | 8 +- .../auxiliary/hygiene_example_codegen.rs | 4 +- .../ui/proc-macro/auxiliary/invalid-punct-ident.rs | 4 +- tests/ui/proc-macro/auxiliary/is-available.rs | 4 +- tests/ui/proc-macro/auxiliary/issue-104884.rs | 4 +- tests/ui/proc-macro/auxiliary/issue-107113.rs | 4 +- tests/ui/proc-macro/auxiliary/issue-118809.rs | 4 +- tests/ui/proc-macro/auxiliary/issue-38586.rs | 4 +- tests/ui/proc-macro/auxiliary/issue-39889.rs | 4 +- tests/ui/proc-macro/auxiliary/issue-42708.rs | 4 +- tests/ui/proc-macro/auxiliary/issue-50061.rs | 4 +- tests/ui/proc-macro/auxiliary/issue-50493.rs | 4 +- tests/ui/proc-macro/auxiliary/issue-59191.rs | 6 +- tests/ui/proc-macro/auxiliary/issue-66286.rs | 4 +- tests/ui/proc-macro/auxiliary/issue-75801.rs | 4 +- tests/ui/proc-macro/auxiliary/issue-79242.rs | 4 +- tests/ui/proc-macro/auxiliary/issue-79825.rs | 4 +- tests/ui/proc-macro/auxiliary/issue-83510.rs | 4 +- tests/ui/proc-macro/auxiliary/issue-91800-macro.rs | 4 +- tests/ui/proc-macro/auxiliary/lifetimes-rpass.rs | 4 +- tests/ui/proc-macro/auxiliary/lifetimes.rs | 4 +- tests/ui/proc-macro/auxiliary/macro-only-syntax.rs | 4 +- tests/ui/proc-macro/auxiliary/make-macro.rs | 2 +- tests/ui/proc-macro/auxiliary/meta-macro.rs | 6 +- tests/ui/proc-macro/auxiliary/mixed-site-span.rs | 4 +- tests/ui/proc-macro/auxiliary/modify-ast.rs | 4 +- tests/ui/proc-macro/auxiliary/multiple-derives.rs | 4 +- tests/ui/proc-macro/auxiliary/multispan.rs | 4 +- tests/ui/proc-macro/auxiliary/negative-token.rs | 4 +- .../auxiliary/nonterminal-recollect-attr.rs | 4 +- tests/ui/proc-macro/auxiliary/not-joint.rs | 4 +- .../ui/proc-macro/auxiliary/parent-source-spans.rs | 4 +- tests/ui/proc-macro/auxiliary/print-tokens.rs | 4 +- tests/ui/proc-macro/auxiliary/proc-macro-panic.rs | 4 +- tests/ui/proc-macro/auxiliary/raw-ident.rs | 4 +- tests/ui/proc-macro/auxiliary/re-export.rs | 4 +- tests/ui/proc-macro/auxiliary/recollect.rs | 4 +- .../ui/proc-macro/auxiliary/resolved-located-at.rs | 4 +- tests/ui/proc-macro/auxiliary/span-api-tests.rs | 4 +- .../proc-macro/auxiliary/span-from-proc-macro.rs | 4 +- tests/ui/proc-macro/auxiliary/subspan.rs | 4 +- tests/ui/proc-macro/auxiliary/test-macros.rs | 4 +- tests/ui/proc-macro/auxiliary/three-equals.rs | 4 +- tests/ui/proc-macro/auxiliary/weird-hygiene.rs | 4 +- tests/ui/proc-macro/bad-projection.rs | 4 +- tests/ui/proc-macro/bang-macro.rs | 4 +- tests/ui/proc-macro/break-token-spans.rs | 2 +- tests/ui/proc-macro/call-deprecated.rs | 4 +- tests/ui/proc-macro/call-site.rs | 4 +- tests/ui/proc-macro/capture-macro-rules-invoke.rs | 6 +- tests/ui/proc-macro/capture-unglued-token.rs | 6 +- tests/ui/proc-macro/cfg-eval-inner.rs | 6 +- tests/ui/proc-macro/cfg-eval.rs | 6 +- tests/ui/proc-macro/count_compound_ops.rs | 4 +- tests/ui/proc-macro/crate-attrs-multiple.rs | 4 +- tests/ui/proc-macro/crate-var.rs | 6 +- tests/ui/proc-macro/crt-static.rs | 14 +- tests/ui/proc-macro/custom-attr-only-one-derive.rs | 4 +- .../proc-macro/debug/auxiliary/macro-dump-debug.rs | 4 +- tests/ui/proc-macro/debug/dump-debug-span-debug.rs | 6 +- tests/ui/proc-macro/debug/dump-debug.rs | 4 +- tests/ui/proc-macro/debug/dump-debug.stderr | 60 +++--- tests/ui/proc-macro/define-two.rs | 4 +- tests/ui/proc-macro/derive-attr-cfg.rs | 4 +- tests/ui/proc-macro/derive-b.rs | 4 +- tests/ui/proc-macro/derive-bad.rs | 2 +- tests/ui/proc-macro/derive-expand-order.rs | 4 +- tests/ui/proc-macro/derive-helper-configured.rs | 4 +- tests/ui/proc-macro/derive-helper-legacy-limits.rs | 4 +- .../ui/proc-macro/derive-helper-legacy-spurious.rs | 2 +- tests/ui/proc-macro/derive-helper-shadowed.rs | 6 +- tests/ui/proc-macro/derive-helper-shadowing-2.rs | 4 +- tests/ui/proc-macro/derive-helper-shadowing.rs | 6 +- tests/ui/proc-macro/derive-helper-vs-legacy.rs | 4 +- tests/ui/proc-macro/derive-in-mod.rs | 4 +- tests/ui/proc-macro/derive-multiple-with-packed.rs | 2 +- tests/ui/proc-macro/derive-same-struct.rs | 4 +- tests/ui/proc-macro/derive-still-gated.rs | 2 +- tests/ui/proc-macro/derive-test.rs | 6 +- tests/ui/proc-macro/derive-two-attrs.rs | 4 +- tests/ui/proc-macro/derive-union.rs | 4 +- tests/ui/proc-macro/disappearing-resolution.rs | 2 +- tests/ui/proc-macro/doc-comment-preserved.rs | 6 +- tests/ui/proc-macro/dollar-crate-issue-101211.rs | 6 +- tests/ui/proc-macro/dollar-crate-issue-57089.rs | 8 +- tests/ui/proc-macro/dollar-crate-issue-62325.rs | 10 +- tests/ui/proc-macro/dollar-crate.rs | 10 +- .../edition-gated-async-move-syntax-issue89699.rs | 6 +- tests/ui/proc-macro/edition-imports-2018.rs | 6 +- tests/ui/proc-macro/empty-crate.rs | 4 +- tests/ui/proc-macro/empty-where-clause.rs | 2 +- tests/ui/proc-macro/env.rs | 8 +- tests/ui/proc-macro/expand-expr.rs | 2 +- tests/ui/proc-macro/expand-to-derive.rs | 6 +- tests/ui/proc-macro/expand-to-unstable.rs | 2 +- tests/ui/proc-macro/expand-with-a-macro.rs | 6 +- tests/ui/proc-macro/export-macro.rs | 6 +- tests/ui/proc-macro/exports.rs | 4 +- .../ui/proc-macro/expr-stmt-nonterminal-tokens.rs | 4 +- .../proc-macro/expr-stmt-nonterminal-tokens.stdout | 206 ++++++++++----------- .../extern-prelude-extern-crate-proc-macro.rs | 4 +- tests/ui/proc-macro/gen-lifetime-token.rs | 4 +- tests/ui/proc-macro/gen-macro-rules-hygiene.rs | 2 +- tests/ui/proc-macro/gen-macro-rules.rs | 4 +- tests/ui/proc-macro/generate-dollar-ident.rs | 4 +- tests/ui/proc-macro/generate-mod.rs | 2 +- .../helper-attr-blocked-by-import-ambig.rs | 2 +- .../ui/proc-macro/helper-attr-blocked-by-import.rs | 4 +- tests/ui/proc-macro/hygiene_example.rs | 6 +- tests/ui/proc-macro/import.rs | 2 +- tests/ui/proc-macro/inert-attribute-order.rs | 6 +- tests/ui/proc-macro/inner-attr-non-inline-mod.rs | 10 +- tests/ui/proc-macro/inner-attrs.rs | 8 +- tests/ui/proc-macro/input-interpolated.rs | 6 +- tests/ui/proc-macro/input-interpolated.stdout | 22 +-- tests/ui/proc-macro/invalid-attributes.rs | 4 +- tests/ui/proc-macro/invalid-punct-ident-1.rs | 4 +- tests/ui/proc-macro/invalid-punct-ident-2.rs | 4 +- tests/ui/proc-macro/invalid-punct-ident-3.rs | 4 +- tests/ui/proc-macro/invalid-punct-ident-4.rs | 4 +- tests/ui/proc-macro/is-available.rs | 4 +- .../proc-macro/issue-104884-trait-impl-sugg-err.rs | 2 +- tests/ui/proc-macro/issue-107113-wrap.rs | 4 +- tests/ui/proc-macro/issue-118809.rs | 2 +- tests/ui/proc-macro/issue-36935.rs | 4 +- tests/ui/proc-macro/issue-37788.rs | 2 +- tests/ui/proc-macro/issue-38586.rs | 2 +- tests/ui/proc-macro/issue-39889.rs | 4 +- tests/ui/proc-macro/issue-42708.rs | 4 +- tests/ui/proc-macro/issue-50061.rs | 4 +- tests/ui/proc-macro/issue-50493.rs | 2 +- tests/ui/proc-macro/issue-53481.rs | 4 +- .../proc-macro/issue-59191-replace-root-with-fn.rs | 6 +- tests/ui/proc-macro/issue-66286.rs | 2 +- .../issue-73933-procedural-masquerade.rs | 4 +- .../issue-73933-procedural-masquerade.stdout | 8 +- tests/ui/proc-macro/issue-75734-pp-paren.rs | 6 +- tests/ui/proc-macro/issue-75801.rs | 2 +- tests/ui/proc-macro/issue-75930-derive-cfg.rs | 6 +- .../ui/proc-macro/issue-76182-leading-vert-pat.rs | 6 +- .../issue-76270-panic-in-libproc-macro.rs | 6 +- .../proc-macro/issue-78675-captured-inner-attrs.rs | 8 +- tests/ui/proc-macro/issue-79148.rs | 4 +- .../issue-79242-slow-retokenize-check.rs | 4 +- tests/ui/proc-macro/issue-79825.rs | 4 +- tests/ui/proc-macro/issue-80760-empty-stmt.rs | 6 +- tests/ui/proc-macro/issue-81007-item-attrs.rs | 8 +- tests/ui/proc-macro/issue-81543-item-parse-err.rs | 2 +- tests/ui/proc-macro/issue-81555.rs | 4 +- tests/ui/proc-macro/issue-83510.rs | 2 +- .../ui/proc-macro/issue-86781-bad-inner-doc.fixed | 4 +- tests/ui/proc-macro/issue-86781-bad-inner-doc.rs | 4 +- ...-suggest-fix-invalid-top-level-macro-attr.fixed | 2 +- ...566-suggest-fix-invalid-top-level-macro-attr.rs | 2 +- tests/ui/proc-macro/issue-91800.rs | 2 +- tests/ui/proc-macro/item-error.rs | 2 +- tests/ui/proc-macro/keep-expr-tokens.rs | 4 +- tests/ui/proc-macro/lifetimes-rpass.rs | 4 +- tests/ui/proc-macro/lifetimes.rs | 2 +- tests/ui/proc-macro/lints_in_proc_macros.rs | 2 +- tests/ui/proc-macro/literal-to-string.rs | 6 +- tests/ui/proc-macro/literal-to-string.stdout | 30 +-- tests/ui/proc-macro/load-panic-backtrace.rs | 12 +- tests/ui/proc-macro/load-panic.rs | 4 +- tests/ui/proc-macro/load-two.rs | 6 +- tests/ui/proc-macro/macro-brackets.rs | 2 +- tests/ui/proc-macro/macro-crate-multi-decorator.rs | 4 +- tests/ui/proc-macro/macro-namespace-reserved-2.rs | 4 +- tests/ui/proc-macro/macro-namespace-reserved.rs | 4 +- tests/ui/proc-macro/macro-quote-cond.rs | 4 +- tests/ui/proc-macro/macro-rules-derive-cfg.rs | 6 +- tests/ui/proc-macro/macro-rules-derive.rs | 2 +- tests/ui/proc-macro/macro-use-attr.rs | 4 +- tests/ui/proc-macro/macro-use-bang.rs | 4 +- tests/ui/proc-macro/macros-in-extern.rs | 6 +- tests/ui/proc-macro/macros-in-type.rs | 4 +- tests/ui/proc-macro/meta-delim.rs | 6 +- tests/ui/proc-macro/meta-macro-hygiene.rs | 16 +- tests/ui/proc-macro/meta-macro-hygiene.stdout | 16 +- tests/ui/proc-macro/meta-macro.rs | 10 +- tests/ui/proc-macro/mixed-site-span.rs | 2 +- tests/ui/proc-macro/modify-ast.rs | 4 +- tests/ui/proc-macro/module.rs | 2 +- tests/ui/proc-macro/module_with_attrs.rs | 2 +- tests/ui/proc-macro/multispan.rs | 2 +- tests/ui/proc-macro/negative-token.rs | 4 +- tests/ui/proc-macro/nested-derive-cfg.rs | 6 +- tests/ui/proc-macro/nested-item-spans.rs | 2 +- tests/ui/proc-macro/nested-macro-rules.rs | 10 +- tests/ui/proc-macro/nested-nonterminal-tokens.rs | 8 +- tests/ui/proc-macro/no-macro-use-attr.rs | 2 +- .../no-mangle-in-proc-macro-issue-111888.rs | 8 +- tests/ui/proc-macro/no-missing-docs.rs | 6 +- tests/ui/proc-macro/nodelim-groups.rs | 8 +- tests/ui/proc-macro/non-root.rs | 4 +- tests/ui/proc-macro/nonterminal-expansion.rs | 6 +- tests/ui/proc-macro/nonterminal-recollect-attr.rs | 6 +- tests/ui/proc-macro/nonterminal-token-hygiene.rs | 14 +- .../ui/proc-macro/nonterminal-token-hygiene.stdout | 14 +- tests/ui/proc-macro/not-joint.rs | 4 +- tests/ui/proc-macro/out-of-line-mod.rs | 4 +- tests/ui/proc-macro/outer/inner.rs | 2 +- tests/ui/proc-macro/panic-abort.rs | 8 +- tests/ui/proc-macro/parent-source-spans.rs | 2 +- tests/ui/proc-macro/pretty-print-hack-hide.rs | 6 +- tests/ui/proc-macro/pretty-print-hack-show.rs | 8 +- .../allsorts-rental-0.5.6/src/lib.rs | 2 +- .../pretty-print-hack/rental-0.5.5/src/lib.rs | 2 +- .../pretty-print-hack/rental-0.5.6/src/lib.rs | 2 +- tests/ui/proc-macro/pretty-print-tts.rs | 6 +- tests/ui/proc-macro/proc-macro-abi.rs | 4 +- tests/ui/proc-macro/proc-macro-attributes.rs | 2 +- tests/ui/proc-macro/proc-macro-deprecated-attr.rs | 6 +- tests/ui/proc-macro/proc-macro-gates.rs | 2 +- tests/ui/proc-macro/proc-macro-gates2.rs | 2 +- tests/ui/proc-macro/pub-at-crate-root.rs | 4 +- tests/ui/proc-macro/quote-debug.rs | 8 +- tests/ui/proc-macro/quote-debug.stdout | 8 +- tests/ui/proc-macro/raw-ident.rs | 2 +- tests/ui/proc-macro/reserved-macro-names.rs | 4 +- tests/ui/proc-macro/resolve-error.rs | 6 +- tests/ui/proc-macro/resolved-located-at.rs | 2 +- tests/ui/proc-macro/shadow.rs | 2 +- .../proc-macro/signature-proc-macro-attribute.rs | 4 +- tests/ui/proc-macro/signature-proc-macro-derive.rs | 4 +- tests/ui/proc-macro/signature-proc-macro.rs | 4 +- tests/ui/proc-macro/signature.rs | 4 +- tests/ui/proc-macro/smoke.rs | 4 +- tests/ui/proc-macro/span-absolute-posititions.rs | 2 +- tests/ui/proc-macro/span-api-tests.rs | 8 +- tests/ui/proc-macro/span-from-proc-macro.rs | 6 +- tests/ui/proc-macro/span-preservation.rs | 2 +- tests/ui/proc-macro/struct-field-macro.rs | 4 +- tests/ui/proc-macro/subspan.rs | 2 +- tests/ui/proc-macro/test-same-crate.rs | 2 +- tests/ui/proc-macro/test.rs | 6 +- tests/ui/proc-macro/three-equals.rs | 2 +- tests/ui/proc-macro/trailing-plus.rs | 6 +- tests/ui/proc-macro/trait-fn-args-2015.rs | 4 +- tests/ui/proc-macro/two-crate-types-1.rs | 6 +- tests/ui/proc-macro/two-crate-types-2.rs | 6 +- tests/ui/proc-macro/unsafe-foreign-mod.rs | 4 +- tests/ui/proc-macro/unsafe-mod.rs | 4 +- tests/ui/proc-macro/visibility-path.rs | 4 +- tests/ui/proc-macro/weird-braces.rs | 6 +- tests/ui/proc-macro/weird-hygiene.rs | 2 +- .../process-termination-blocking-io.rs | 4 +- .../process-termination-simple.rs | 4 +- tests/ui/process/core-run-destroy.rs | 12 +- tests/ui/process/fds-are-cloexec.rs | 12 +- tests/ui/process/issue-13304.rs | 6 +- tests/ui/process/issue-14456.rs | 6 +- tests/ui/process/issue-14940.rs | 6 +- tests/ui/process/issue-16272.rs | 6 +- tests/ui/process/issue-20091.rs | 6 +- tests/ui/process/multi-panic.rs | 8 +- tests/ui/process/no-stdio.rs | 8 +- tests/ui/process/nofile-limit.rs | 10 +- tests/ui/process/println-with-broken-pipe.rs | 16 +- tests/ui/process/process-envs.rs | 10 +- tests/ui/process/process-exit.rs | 6 +- tests/ui/process/process-panic-after-fork.rs | 16 +- tests/ui/process/process-remove-from-env.rs | 10 +- tests/ui/process/process-sigpipe.rs | 10 +- tests/ui/process/process-spawn-nonexistent.rs | 8 +- .../process/process-spawn-with-unicode-params.rs | 10 +- tests/ui/process/process-status-inherits-stdin.rs | 6 +- tests/ui/process/signal-exit-status.rs | 10 +- tests/ui/process/sigpipe-should-be-ignored.rs | 6 +- tests/ui/process/tls-exit-status.rs | 8 +- tests/ui/process/try-wait.rs | 6 +- tests/ui/project-cache-issue-31849.rs | 2 +- tests/ui/ptr-coercion-rpass.rs | 4 +- tests/ui/ptr_ops/issue-80309-safe.rs | 4 +- tests/ui/ptr_ops/issue-80309.rs | 4 +- ...ue-33174-restricted-type-in-public-interface.rs | 2 +- tests/ui/pub/pub-ident-fn-2.fixed | 2 +- tests/ui/pub/pub-ident-fn-2.rs | 2 +- tests/ui/pub/pub-ident-fn-with-lifetime.fixed | 2 +- tests/ui/pub/pub-ident-fn-with-lifetime.rs | 2 +- tests/ui/pub/pub-ident-fn.fixed | 2 +- tests/ui/pub/pub-ident-fn.rs | 2 +- tests/ui/pub/pub-ident-struct-4.fixed | 2 +- tests/ui/pub/pub-ident-struct-4.rs | 2 +- tests/ui/pub/pub-ident-struct.fixed | 2 +- tests/ui/pub/pub-ident-struct.rs | 2 +- tests/ui/query-system/query_depth.rs | 2 +- tests/ui/query-visibility.rs | 2 +- tests/ui/range/exclusive-range-patterns-2021.rs | 2 +- tests/ui/range/issue-54505-no-literals.fixed | 2 +- tests/ui/range/issue-54505-no-literals.rs | 2 +- tests/ui/range/issue-54505.fixed | 2 +- tests/ui/range/issue-54505.rs | 2 +- .../range/range-inclusive-pattern-precedence.fixed | 2 +- .../ui/range/range-inclusive-pattern-precedence.rs | 2 +- tests/ui/range/range_traits-4.rs | 2 +- tests/ui/range/range_traits-5.rs | 2 +- tests/ui/range/range_traits-7.rs | 2 +- tests/ui/range_inclusive.rs | 2 +- tests/ui/raw-ref-op/raw-ref-op.rs | 2 +- tests/ui/raw-ref-op/raw-ref-temp-deref.rs | 2 +- tests/ui/raw-ref-op/unusual_locations.rs | 2 +- tests/ui/raw-str.rs | Bin 847 -> 848 bytes tests/ui/reachable/expr_andand.rs | 2 +- tests/ui/reachable/expr_oror.rs | 2 +- tests/ui/reachable/foreign-priv.rs | 4 +- tests/ui/reachable/issue-11225-1.rs | 6 +- tests/ui/reachable/issue-11225-2.rs | 6 +- tests/ui/reachable/issue-11225-3.rs | 6 +- tests/ui/reachable/issue-948.rs | 6 +- .../reachable/reachable-unnameable-type-alias.rs | 2 +- tests/ui/reachable/unreachable-code-ret.rs | 2 +- tests/ui/reachable/unreachable-try-pattern.rs | 2 +- tests/ui/reachable/unreachable-variant.rs | 2 +- tests/ui/realloc-16687.rs | 2 +- tests/ui/recursion/instantiable.rs | 4 +- tests/ui/recursion/issue-83150.rs | 8 +- tests/ui/recursion/issue-86784.rs | 2 +- tests/ui/recursion/issue-95134.rs | 10 +- tests/ui/recursion/recursion.rs | 6 +- tests/ui/recursion/recursive-reexports.rs | 2 +- tests/ui/recursion_limit/issue-40003.rs | 2 +- tests/ui/recursion_limit/zero-overflow.rs | 2 +- tests/ui/reexport-test-harness-main.rs | 4 +- .../regions/closure-in-projection-issue-97405.rs | 4 +- tests/ui/regions/forall-wf-reflexive.rs | 2 +- tests/ui/regions/init-res-into-things.rs | 2 +- tests/ui/regions/issue-102374.rs | 2 +- tests/ui/regions/issue-11612.rs | 4 +- tests/ui/regions/issue-21520.rs | 4 +- tests/ui/regions/issue-24085.rs | 2 +- tests/ui/regions/issue-26448-1.rs | 2 +- tests/ui/regions/issue-26448-2.rs | 2 +- tests/ui/regions/issue-26448-3.rs | 2 +- tests/ui/regions/issue-5243.rs | 4 +- ...sue-56537-closure-uses-region-from-container.rs | 2 +- tests/ui/regions/issue-6157.rs | 4 +- tests/ui/regions/issue-72051-member-region-hang.rs | 4 +- tests/ui/regions/issue-78262.rs | 6 +- tests/ui/regions/owned-implies-static.rs | 4 +- tests/ui/regions/rcvr-borrowed-to-region.rs | 2 +- .../region-bound-extra-bound-in-inherent-impl.rs | 2 +- .../region-bound-same-bounds-in-trait-and-impl.rs | 2 +- .../region-invariant-static-error-reporting.rs | 2 +- tests/ui/regions/region-object-lifetime-1.rs | 2 +- tests/ui/regions/region-object-lifetime-3.rs | 2 +- .../regions-addr-of-interior-of-unique-box.rs | 4 +- tests/ui/regions/regions-addr-of-ret.rs | 2 +- .../ui/regions/regions-assoc-type-region-bound.rs | 4 +- .../ui/regions/regions-assoc-type-static-bound.rs | 4 +- tests/ui/regions/regions-borrow-at.rs | 2 +- tests/ui/regions/regions-borrow-evec-fixed.rs | 2 +- tests/ui/regions/regions-borrow-evec-uniq.rs | 2 +- tests/ui/regions/regions-borrow-uniq.rs | 2 +- tests/ui/regions/regions-bot.rs | 2 +- .../regions/regions-bound-lists-feature-gate-2.rs | 2 +- .../ui/regions/regions-bound-lists-feature-gate.rs | 2 +- ...s-bounded-method-type-parameters-cross-crate.rs | 2 +- ...gions-close-over-type-parameter-successfully.rs | 2 +- tests/ui/regions/regions-copy-closure.rs | 2 +- tests/ui/regions/regions-creating-enums2.rs | 4 +- tests/ui/regions/regions-creating-enums5.rs | 4 +- tests/ui/regions/regions-debruijn-of-object.rs | 4 +- tests/ui/regions/regions-dependent-addr-of.rs | 2 +- tests/ui/regions/regions-dependent-autofn.rs | 4 +- tests/ui/regions/regions-dependent-autoslice.rs | 2 +- tests/ui/regions/regions-dependent-let-ref.rs | 4 +- .../regions-early-bound-lifetime-in-assoc-fn.rs | 4 +- .../ui/regions/regions-early-bound-trait-param.rs | 2 +- .../regions-early-bound-used-in-bound-method.rs | 2 +- .../regions/regions-early-bound-used-in-bound.rs | 2 +- .../regions-early-bound-used-in-type-param.rs | 2 +- tests/ui/regions/regions-escape-into-other-fn.rs | 2 +- tests/ui/regions/regions-expl-self.rs | 4 +- tests/ui/regions/regions-fn-subtyping-2.rs | 4 +- .../regions/regions-fn-subtyping-return-static.rs | 2 +- tests/ui/regions/regions-fn-subtyping.rs | 4 +- ...-region-outlives-static-outlives-free-region.rs | 2 +- .../regions-implied-bounds-projection-gap-2.rs | 2 +- .../regions-implied-bounds-projection-gap-3.rs | 2 +- .../regions-implied-bounds-projection-gap-4.rs | 2 +- .../regions/regions-infer-borrow-scope-addr-of.rs | 2 +- .../ui/regions/regions-infer-borrow-scope-view.rs | 2 +- .../regions-infer-borrow-scope-within-loop-ok.rs | 2 +- tests/ui/regions/regions-infer-borrow-scope.rs | 2 +- tests/ui/regions/regions-infer-call-2.rs | 2 +- tests/ui/regions/regions-infer-call.rs | 2 +- .../regions-infer-contravariance-due-to-ret.rs | 2 +- .../regions-infer-reborrow-ref-mut-recurse.rs | 4 +- .../regions-infer-region-in-fn-but-not-type.rs | 4 +- tests/ui/regions/regions-infer-static-from-proc.rs | 4 +- tests/ui/regions/regions-issue-21422.rs | 4 +- tests/ui/regions/regions-issue-22246.rs | 4 +- .../regions/regions-lifetime-nonfree-late-bound.rs | 4 +- ...gions-lifetime-static-items-enclosing-scopes.rs | 2 +- tests/ui/regions/regions-link-fn-args.rs | 4 +- tests/ui/regions/regions-lub-ref-ref-rc.rs | 2 +- tests/ui/regions/regions-mock-codegen.rs | 4 +- tests/ui/regions/regions-name-undeclared.rs | 2 +- .../regions-no-bound-in-argument-cleanup.rs | 4 +- .../regions-no-variance-from-fn-generics.rs | 2 +- tests/ui/regions/regions-nullary-variant.rs | 4 +- ...egions-outlives-nominal-type-enum-region-rev.rs | 2 +- .../regions-outlives-nominal-type-enum-region.rs | 2 +- .../regions-outlives-nominal-type-enum-type-rev.rs | 2 +- .../regions-outlives-nominal-type-enum-type.rs | 2 +- ...ions-outlives-nominal-type-struct-region-rev.rs | 2 +- .../regions-outlives-nominal-type-struct-region.rs | 2 +- ...egions-outlives-nominal-type-struct-type-rev.rs | 2 +- .../regions-outlives-nominal-type-struct-type.rs | 2 +- .../regions/regions-outlives-projection-hrtype.rs | 2 +- .../regions-outlives-projection-trait-def.rs | 2 +- tests/ui/regions/regions-outlives-scalar.rs | 2 +- tests/ui/regions/regions-params.rs | 2 +- .../regions/regions-reassign-let-bound-pointer.rs | 4 +- .../regions-reassign-match-bound-pointer.rs | 4 +- tests/ui/regions/regions-refcell.rs | 2 +- ...d-regions-on-closures-to-inference-variables.rs | 2 +- .../regions/regions-return-interior-of-option.rs | 2 +- tests/ui/regions/regions-scope-chain-example.rs | 4 +- tests/ui/regions/regions-self-impls.rs | 2 +- tests/ui/regions/regions-self-in-enums.rs | 2 +- tests/ui/regions/regions-simple.rs | 2 +- tests/ui/regions/regions-static-bound-rpass.rs | 2 +- tests/ui/regions/regions-static-closure.rs | 2 +- tests/ui/regions/regions-trait-1.rs | 2 +- tests/ui/regions/regions-trait-object-1.rs | 2 +- ...ons-variance-contravariant-use-contravariant.rs | 4 +- .../regions-variance-covariant-use-covariant.rs | 4 +- .../type-param-outlives-reempty-issue-74429-2.rs | 2 +- .../type-param-outlives-reempty-issue-74429.rs | 2 +- tests/ui/regions/wf-bound-region-in-object-type.rs | 4 +- tests/ui/reify-intrinsic.rs | 2 +- tests/ui/removing-extern-crate.fixed | 8 +- tests/ui/removing-extern-crate.rs | 8 +- tests/ui/repeat-expr/infer.rs | 2 +- tests/ui/repeat-expr/repeat-expr-in-static.rs | 2 +- tests/ui/repr/16-bit-repr-c-enum.rs | 12 +- tests/ui/repr/align-with-extern-c-fn.rs | 2 +- tests/ui/repr/aligned_enum_cast.rs | 2 +- tests/ui/repr/malformed-repr-hints.rs | 2 +- tests/ui/repr/repr-align-assign.fixed | 2 +- tests/ui/repr/repr-align-assign.rs | 2 +- tests/ui/repr/repr-transparent-issue-87496.rs | 2 +- tests/ui/repr/repr-transparent-non-exhaustive.rs | 2 +- tests/ui/repr/repr_c_int_align.rs | 4 +- tests/ui/resolve/112590-2.fixed | 2 +- tests/ui/resolve/112590-2.rs | 2 +- tests/ui/resolve/auxiliary/issue-112831-aux.rs | 4 +- tests/ui/resolve/bad-env-capture.rs | 2 +- tests/ui/resolve/bad-env-capture2.rs | 2 +- tests/ui/resolve/bad-env-capture3.rs | 2 +- tests/ui/resolve/blind-item-local-shadow.rs | 2 +- .../ui/resolve/blind-item-mixed-crate-use-item.rs | 8 +- tests/ui/resolve/blind-item-mixed-use-item.rs | 4 +- tests/ui/resolve/block-with-trait-parent.rs | 2 +- tests/ui/resolve/crate-in-paths.rs | 2 +- tests/ui/resolve/derive-macro-1.rs | 4 +- tests/ui/resolve/derive-macro-2.rs | 4 +- tests/ui/resolve/editions-crate-root-2015.rs | 2 +- tests/ui/resolve/editions-crate-root-2018.rs | 2 +- tests/ui/resolve/enums-are-namespaced-xc.rs | 2 +- tests/ui/resolve/export-fully-qualified-2018.rs | 2 +- tests/ui/resolve/export-fully-qualified.rs | 2 +- tests/ui/resolve/extern-prelude-fail.rs | 4 +- tests/ui/resolve/extern-prelude.rs | 8 +- ...generic-params-from-outer-item-in-const-item.rs | 2 +- tests/ui/resolve/hidden_glob_reexports.rs | 2 +- tests/ui/resolve/issue-101749.fixed | 2 +- tests/ui/resolve/issue-101749.rs | 2 +- tests/ui/resolve/issue-111312.rs | 2 +- tests/ui/resolve/issue-111727.rs | 2 +- .../issue-112472-multi-generics-suggestion.fixed | 2 +- .../issue-112472-multi-generics-suggestion.rs | 2 +- ...-invalid-unused-qualifications-suggestion.fixed | 2 +- ...808-invalid-unused-qualifications-suggestion.rs | 2 +- ...433-invalid-unused-qualifications-suggestion.rs | 2 +- tests/ui/resolve/issue-16058.rs | 2 +- tests/ui/resolve/issue-19452.rs | 2 +- tests/ui/resolve/issue-21221-3.rs | 2 +- tests/ui/resolve/issue-21221-4.rs | 2 +- tests/ui/resolve/issue-30535.rs | 2 +- tests/ui/resolve/issue-3907-2.rs | 2 +- tests/ui/resolve/issue-3907.rs | 2 +- tests/ui/resolve/issue-55673.fixed | 2 +- tests/ui/resolve/issue-55673.rs | 2 +- tests/ui/resolve/issue-57523.rs | 2 +- .../issue-70736-async-fn-no-body-def-collector.rs | 2 +- tests/ui/resolve/issue-80079.rs | 2 +- tests/ui/resolve/issue-85671.rs | 2 +- tests/ui/resolve/macro-determinacy-non-module.rs | 2 +- tests/ui/resolve/name-collision-in-trait-fn-sig.rs | 2 +- tests/ui/resolve/no-std-1.rs | 2 +- tests/ui/resolve/no-std-2.rs | 2 +- tests/ui/resolve/no-std-3.rs | 2 +- tests/ui/resolve/pathless-extern-ok.rs | 6 +- tests/ui/resolve/privacy-struct-ctor.rs | 2 +- .../resolve-conflict-import-vs-import.fixed | 2 +- .../resolve/resolve-conflict-import-vs-import.rs | 2 +- tests/ui/resolve/resolve-hint-macro.fixed | 2 +- tests/ui/resolve/resolve-hint-macro.rs | 2 +- tests/ui/resolve/resolve-issue-2428.rs | 2 +- tests/ui/resolve/resolve-pseudo-shadowing.rs | 2 +- .../ui/resolve/suggest-constructor-cycle-error.rs | 2 +- .../suggest-import-without-clobbering-attrs.fixed | 4 +- .../suggest-import-without-clobbering-attrs.rs | 4 +- tests/ui/resolve/tool-import.rs | 2 +- .../resolve/unused-qualifications-suggestion.fixed | 2 +- .../ui/resolve/unused-qualifications-suggestion.rs | 2 +- tests/ui/resolve/use_suggestion_placement.fixed | 2 +- tests/ui/resolve/use_suggestion_placement.rs | 2 +- tests/ui/resolve/visibility-indeterminate.rs | 2 +- tests/ui/resource-assign-is-not-copy.rs | 2 +- tests/ui/resource-destruct.rs | 2 +- tests/ui/ret-bang.rs | 2 +- tests/ui/ret-non-nil.rs | 2 +- tests/ui/return-nil.rs | 4 +- tests/ui/return/return-impl-trait.fixed | 2 +- tests/ui/return/return-impl-trait.rs | 2 +- tests/ui/return/tail-expr-as-potential-return.rs | 2 +- .../120240-async-fn-never-arg.rs | 4 +- tests/ui/rfcs/rfc-0000-never_patterns/diverges.rs | 4 +- tests/ui/rfcs/rfc-0000-never_patterns/macros.rs | 8 +- tests/ui/rfcs/rfc-0000-never_patterns/typeck.rs | 6 +- .../ui/rfcs/rfc-0000-never_patterns/unreachable.rs | 4 +- .../bind-by-move-no-guards.rs | 2 +- .../former-E0008-now-pass.rs | 2 +- .../rfc-basic-examples.rs | 2 +- .../rfc-1014-2.rs | 2 +- .../rfc-1014-stdout-existential-crisis/rfc-1014.rs | 6 +- ...allow-hide-behind-direct-unsafe-ptr-embedded.rs | 2 +- .../allow-hide-behind-direct-unsafe-ptr-param.rs | 2 +- ...low-hide-behind-indirect-unsafe-ptr-embedded.rs | 2 +- .../allow-hide-behind-indirect-unsafe-ptr-param.rs | 2 +- .../allow-use-behind-cousin-variant.rs | 2 +- .../cant-hide-behind-doubly-indirect-embedded.rs | 2 +- .../cant-hide-behind-doubly-indirect-param.rs | 2 +- .../cant-hide-behind-indirect-struct-embedded.rs | 2 +- .../cant-hide-behind-indirect-struct-param.rs | 2 +- .../feature-gate.rs | 2 +- .../fn-ptr-is-structurally-matchable.rs | 2 +- ...sue-62307-match-ref-ref-forbidden-without-eq.rs | 2 +- .../issue-63479-match-fnptr.rs | 2 +- ...h-empty-array-allowed-without-eq-issue-62336.rs | 2 +- .../phantom-data-is-structurally-matchable.rs | 2 +- .../rfc1445/eq-allows-match-on-ty-in-macro.rs | 2 +- .../rfc1445/eq-allows-match.rs | 2 +- tests/ui/rfcs/rfc-1623-static/rfc1623.rs | 2 +- .../1717-dllimport/library-override.rs | 6 +- .../rfcs/rfc-1717-dllimport/missing-link-attr.rs | 4 +- .../ui/rfcs/rfc-1717-dllimport/multiple-renames.rs | 4 +- .../ui/rfcs/rfc-1717-dllimport/rename-modifiers.rs | 4 +- .../ui/rfcs/rfc-1717-dllimport/rename-to-empty.rs | 4 +- tests/ui/rfcs/rfc-1789-as-cell/from-mut.rs | 2 +- .../rfc-1857-stabilize-drop-order/drop-order.rs | 4 +- .../termination-trait-for-box-dyn-error-err.rs | 8 +- .../termination-trait-for-box-dyn-error-ok.rs | 2 +- .../termination-trait-for-empty.rs | 2 +- .../termination-trait-for-exitcode.rs | 2 +- .../termination-trait-for-impl-termination.rs | 2 +- .../termination-trait-for-never.rs | 6 +- .../termination-trait-for-result-box-error_err.rs | 8 +- .../termination-trait-for-result-box-error_ok.rs | 2 +- .../termination-trait-for-result.rs | 2 +- .../termination-trait-for-str-err.rs | 8 +- .../termination-trait-for-str-ok.rs | 2 +- .../termination-trait-in-test-should-panic.rs | 2 +- .../termination-trait-in-test.rs | 6 +- .../termination-trait-test-wrong-type.rs | 2 +- tests/ui/rfcs/rfc-2005-default-binding-mode/box.rs | 2 +- .../rfcs/rfc-2005-default-binding-mode/constref.rs | 2 +- .../rfcs/rfc-2005-default-binding-mode/enum-ok.rs | 2 +- .../rfcs/rfc-2005-default-binding-mode/for-ok.rs | 2 +- .../rfcs/rfc-2005-default-binding-mode/general.rs | 2 +- .../rfcs/rfc-2005-default-binding-mode/lit-ok.rs | 2 +- .../ui/rfcs/rfc-2005-default-binding-mode/range.rs | 2 +- .../rfc-2005-default-binding-mode/ref-region.rs | 2 +- .../rfc-2005-default-binding-mode/reset-mode.rs | 2 +- .../rfcs/rfc-2005-default-binding-mode/slice-ok.rs | 2 +- .../rfcs/rfc-2005-default-binding-mode/struct.rs | 2 +- .../rfc-2005-default-binding-mode/tuple-struct.rs | 2 +- .../ui/rfcs/rfc-2005-default-binding-mode/tuple.rs | 2 +- .../rfc-2008-non-exhaustive/borrowck-exhaustive.rs | 4 +- .../borrowck-non-exhaustive.rs | 2 +- .../rfcs/rfc-2008-non-exhaustive/enum-as-cast.rs | 2 +- tests/ui/rfcs/rfc-2008-non-exhaustive/enum.rs | 2 +- .../rfc-2008-non-exhaustive/enum_same_crate.rs | 2 +- .../improper_ctypes/extern_crate_improper.rs | 2 +- .../improper_ctypes/same_crate_proper.rs | 2 +- .../omitted-patterns-dont-lint-on-arm.rs | 4 +- .../rfc-2008-non-exhaustive/omitted-patterns.rs | 6 +- .../stable-omitted-patterns.rs | 2 +- tests/ui/rfcs/rfc-2008-non-exhaustive/struct.rs | 2 +- .../rfc-2008-non-exhaustive/structs_same_crate.rs | 2 +- .../uninhabited/coercions.rs | 2 +- .../uninhabited/indirect_match.rs | 2 +- .../indirect_match_with_exhaustive_patterns.rs | 2 +- ...ct_match_with_exhaustive_patterns_same_crate.rs | 2 +- .../uninhabited/issue-65157-repeated-match-arm.rs | 2 +- .../rfc-2008-non-exhaustive/uninhabited/match.rs | 2 +- .../uninhabited/match_with_exhaustive_patterns.rs | 2 +- .../match_with_exhaustive_patterns_same_crate.rs | 2 +- .../uninhabited/patterns.rs | 4 +- tests/ui/rfcs/rfc-2008-non-exhaustive/variant.rs | 2 +- .../variants_fictive_visibility.rs | 4 +- .../rfc-2008-non-exhaustive/variants_same_crate.rs | 2 +- .../downcast-unsafe-trait-objects.rs | 2 +- .../manual-self-impl-for-unsafe-obj.rs | 6 +- .../static-dispatch-unsafe-object.rs | 2 +- tests/ui/rfcs/rfc-2091-track-caller/call-chain.rs | 8 +- .../caller-location-fnptr-rt-ctfe-equiv.rs | 4 +- .../caller-location-intrinsic.rs | 6 +- .../rfc-2091-track-caller/const-caller-location.rs | 6 +- .../diverging-caller-location.rs | 2 +- .../rfcs/rfc-2091-track-caller/error-with-naked.rs | 2 +- .../rfc-2091-track-caller/intrinsic-wrapper.rs | 8 +- .../rfc-2091-track-caller/macro-declaration.rs | 2 +- .../rfc-2091-track-caller/mir-inlined-macro.rs | 8 +- tests/ui/rfcs/rfc-2091-track-caller/pass.rs | 6 +- .../rfc-2091-track-caller/std-panic-locations.rs | 8 +- .../track-caller-attribute.rs | 6 +- .../rfcs/rfc-2091-track-caller/track-caller-ffi.rs | 2 +- .../rfcs/rfc-2091-track-caller/tracked-closure.rs | 2 +- .../tracked-fn-ptr-with-arg.rs | 6 +- .../rfcs/rfc-2091-track-caller/tracked-fn-ptr.rs | 6 +- .../rfc-2091-track-caller/tracked-trait-impls.rs | 2 +- .../rfc-2091-track-caller/tracked-trait-obj.rs | 2 +- .../ui/rfcs/rfc-2093-infer-outlives/issue-54467.rs | 2 +- tests/ui/rfcs/rfc-2093-infer-outlives/privacy.rs | 2 +- .../non-existent-1.rs | 2 +- .../non-existent-2.rs | 2 +- .../non-existent-3.rs | 2 +- .../rfc-2126-extern-absolute-paths/not-allowed.rs | 2 +- .../single-segment.rs | 6 +- tests/ui/rfcs/rfc-2151-raw-identifiers/attr.rs | 2 +- tests/ui/rfcs/rfc-2151-raw-identifiers/basic.rs | 2 +- tests/ui/rfcs/rfc-2151-raw-identifiers/items.rs | 2 +- tests/ui/rfcs/rfc-2151-raw-identifiers/macros.rs | 2 +- tests/ui/rfcs/rfc-2175-or-if-while-let/basic.rs | 2 +- tests/ui/rfcs/rfc-2294-if-let-guard/const-expr.rs | 2 +- tests/ui/rfcs/rfc-2294-if-let-guard/drop-order.rs | 2 +- tests/ui/rfcs/rfc-2294-if-let-guard/drop-scope.rs | 2 +- .../rfcs/rfc-2294-if-let-guard/guard-lifetime-2.rs | 2 +- .../rfcs/rfc-2294-if-let-guard/loop-mutability.rs | 2 +- .../rfc-2294-if-let-guard/move-guard-if-let.rs | 2 +- .../partially-macro-expanded.rs | 2 +- tests/ui/rfcs/rfc-2294-if-let-guard/run-pass.rs | 2 +- tests/ui/rfcs/rfc-2294-if-let-guard/scope.rs | 2 +- .../scoping-consistency-async.rs | 4 +- .../rfc-2294-if-let-guard/scoping-consistency.rs | 2 +- tests/ui/rfcs/rfc-2294-if-let-guard/shadowing.rs | 2 +- .../rfcs/rfc-2294-if-let-guard/type-inference.rs | 2 +- .../rfc-2302-self-struct-ctor.rs | 2 +- .../convert-id-const-with-gate.rs | 2 +- .../dbg-macro-expected-behavior.rs | 4 +- .../rfcs/rfc-2396-target_feature-11/check-pass.rs | 4 +- .../closures-inherit-target_feature.rs | 4 +- .../feature-gate-target_feature_11.rs | 2 +- tests/ui/rfcs/rfc-2396-target_feature-11/fn-ptr.rs | 2 +- .../rfcs/rfc-2396-target_feature-11/fn-traits.rs | 2 +- .../issue-108645-target-feature-on-main.rs | 2 +- .../issue-108645-target-feature-on-start.rs | 2 +- .../issue-108655-inline-always-closure.rs | 4 +- .../rfcs/rfc-2396-target_feature-11/issue-99876.rs | 2 +- .../rfcs/rfc-2396-target_feature-11/safe-calls.rs | 2 +- .../rfcs/rfc-2396-target_feature-11/trait-impl.rs | 2 +- ...of-alignof-sizeof-pure-can-be-used-as-idents.rs | 2 +- .../rfc-2457-non-ascii-idents/idents-normalized.rs | 2 +- .../mod_file_nonascii_with_path_allowed.rs | 2 +- .../mod_inline_nonascii_allowed.rs | 2 +- .../ast-lowering-does-not-wrap-let-chains.rs | 2 +- .../rfc-2497-if-let-chains/ast-pretty-check.rs | 4 +- .../rfc-2497-if-let-chains/ast-pretty-check.stdout | 4 +- .../rfc-2497-if-let-chains/chains-without-let.rs | 2 +- .../rfc-2497-if-let-chains/irrefutable-lets.rs | 4 +- .../ui/rfcs/rfc-2497-if-let-chains/issue-88498.rs | 2 +- .../ui/rfcs/rfc-2497-if-let-chains/issue-90722.rs | 2 +- .../ui/rfcs/rfc-2497-if-let-chains/issue-92145.rs | 2 +- .../ui/rfcs/rfc-2497-if-let-chains/issue-99938.rs | 4 +- .../rfc-2497-if-let-chains/no-double-assigments.rs | 2 +- .../rfc-2497-if-let-chains/protect-precedences.rs | 2 +- .../rfc-2497-if-let-chains/then-else-blocks.rs | 2 +- .../coerce-in-base-expr.rs | 2 +- .../issue-96878.rs | 2 +- .../rfc-2565-param-attrs/auxiliary/ident-mac.rs | 4 +- .../rfc-2565-param-attrs/auxiliary/param-attrs.rs | 4 +- ...issue-64682-dropping-first-attrs-in-impl-fns.rs | 4 +- .../rfcs/rfc-2565-param-attrs/param-attrs-2018.rs | 2 +- .../rfc-2565-param-attrs/param-attrs-allowed.rs | 4 +- .../rfcs/rfc-2565-param-attrs/param-attrs-cfg.rs | 4 +- .../rfc-2565-param-attrs/param-attrs-pretty.rs | 4 +- .../proc-macro-cannot-be-used.rs | 2 +- tests/ui/rfcs/rfc-2627-raw-dylib/dlltool-failed.rs | 20 +- .../import-name-type-invalid-format.rs | 4 +- .../import-name-type-multiple.rs | 4 +- .../import-name-type-unknown-value.rs | 4 +- .../import-name-type-unsupported-link-kind.rs | 4 +- .../import-name-type-x86-only.rs | 4 +- .../ui/rfcs/rfc-2627-raw-dylib/invalid-dlltool.rs | 6 +- .../rfc-2627-raw-dylib/link-ordinal-multiple.rs | 2 +- .../rfc-2627-raw-dylib/multiple-declarations.rs | 6 +- .../rfc-2627-raw-dylib/raw-dylib-windows-only.rs | 4 +- .../ui/rfcs/rfc-2627-raw-dylib/unsupported-abi.rs | 6 +- .../assoc-type-const-bound-usage-0.rs | 6 +- .../assoc-type-const-bound-usage-1.rs | 6 +- .../call-const-trait-method-pass.rs | 2 +- .../call-generic-in-impl.rs | 2 +- .../call-generic-method-chain.rs | 2 +- .../call-generic-method-dup-bound.rs | 2 +- .../call-generic-method-nonconst-bound.rs | 2 +- .../call-generic-method-pass.rs | 2 +- tests/ui/rfcs/rfc-2632-const-trait-impl/call.rs | 2 +- .../const-and-non-const-impl.rs | 2 +- .../const-closure-parse-not-item.rs | 2 +- .../const-closure-trait-method-fail.rs | 2 +- .../const-closure-trait-method.rs | 2 +- .../rfc-2632-const-trait-impl/const-closures.rs | 2 +- .../rfc-2632-const-trait-impl/const-drop-bound.rs | 2 +- .../rfc-2632-const-trait-impl/const-drop-fail-2.rs | 2 +- .../rfc-2632-const-trait-impl/const-drop-fail.rs | 4 +- .../rfcs/rfc-2632-const-trait-impl/const-drop.rs | 4 +- .../const-fns-are-early-bound.rs | 2 +- .../const-impl-requires-const-trait.rs | 2 +- .../rfc-2632-const-trait-impl/const-impl-trait.rs | 2 +- .../const-trait-bounds-trait-objects.rs | 2 +- .../const-trait-bounds.rs | 2 +- .../const_derives/derive-const-non-const-type.rs | 2 +- .../const_derives/derive-const-use.rs | 2 +- .../const_derives/derive-const-with-params.rs | 2 +- .../cross-crate-default-method-body-is-const.rs | 4 +- .../rfcs/rfc-2632-const-trait-impl/cross-crate.rs | 6 +- .../default-method-body-is-const-body-checking.rs | 4 +- ...default-method-body-is-const-with-staged-api.rs | 2 +- .../do-not-const-check-override.rs | 2 +- .../do-not-const-check.rs | 2 +- .../const_closure-const_trait_impl-ice-113381.rs | 2 +- .../effects/effect-param-infer.rs | 2 +- .../rfc-2632-const-trait-impl/effects/fallback.rs | 2 +- .../effects/helloworld.rs | 2 +- .../ice-113375-index-out-of-bounds-generics.rs | 2 +- .../effects/infer-fallback.rs | 2 +- .../rfc-2632-const-trait-impl/effects/minicore.rs | 2 +- .../no-explicit-const-params-cross-crate.rs | 2 +- .../rfc-2632-const-trait-impl/effects/project.rs | 2 +- .../rfcs/rfc-2632-const-trait-impl/feature-gate.rs | 2 +- .../function-pointer-does-not-require-const.rs | 2 +- .../rfc-2632-const-trait-impl/generic-bound.rs | 2 +- .../impl-with-default-fn-pass.rs | 2 +- .../inherent-impl-const-bounds.rs | 2 +- .../rfcs/rfc-2632-const-trait-impl/issue-100222.rs | 4 +- .../rfcs/rfc-2632-const-trait-impl/issue-102985.rs | 2 +- .../rfcs/rfc-2632-const-trait-impl/issue-103677.rs | 2 +- .../rfcs/rfc-2632-const-trait-impl/issue-88155.rs | 2 +- .../rfcs/rfc-2632-const-trait-impl/issue-92111.rs | 2 +- .../issue-92230-wf-super-trait-env.rs | 2 +- .../match-non-const-eq.rs | 4 +- .../mbe-bare-trait-objects-const-trait-bounds.rs | 2 +- ...mbe-const-trait-bound-theoretical-regression.rs | 2 +- .../mbe-dyn-const-2015.rs | 2 +- .../rfc-2632-const-trait-impl/nested-closure.rs | 2 +- .../non-const-op-in-closure-in-const.rs | 2 +- ...st-default-bound-non-const-specialized-bound.rs | 2 +- .../const-default-const-specialized.rs | 2 +- .../specialization/default-keyword.rs | 2 +- .../issue-95186-specialize-on-tilde-const.rs | 2 +- ...e-95187-same-trait-bound-different-constness.rs | 2 +- .../non-const-default-const-specialized.rs | 2 +- .../specializing-constness-2.rs | 2 +- .../staged-api-user-crate.rs | 2 +- .../rfcs/rfc-2632-const-trait-impl/staged-api.rs | 4 +- .../static-const-trait-bound.rs | 2 +- .../rfc-2632-const-trait-impl/std-impl-gate.rs | 4 +- .../super-traits-fail-2.rs | 2 +- .../super-traits-fail-3.rs | 4 +- .../rfc-2632-const-trait-impl/super-traits-fail.rs | 4 +- .../rfcs/rfc-2632-const-trait-impl/super-traits.rs | 2 +- tests/ui/rfcs/rfc-2632-const-trait-impl/syntax.rs | 4 +- .../tilde-const-assoc-fn-in-trait-impl.rs | 2 +- .../tilde-const-inherent-assoc-const-fn.rs | 2 +- .../tilde-const-syntax.rs | 4 +- .../tilde-const-trait-assoc-tys.rs | 2 +- .../rfcs/rfc-2632-const-trait-impl/tilde-twice.rs | 2 +- .../trait-default-body-stability.rs | 2 +- .../trait-method-ptr-in-consts-ice.rs | 2 +- .../trait-where-clause-const.rs | 2 +- .../trait-where-clause-run.rs | 2 +- .../trait-where-clause-self-referential.rs | 2 +- .../rfc-3348-c-string-literals/auxiliary/count.rs | 6 +- tests/ui/rfcs/rfc-3348-c-string-literals/basic.rs | 4 +- .../edition-2015-2018-lexing.rs | 8 +- .../rfc-3348-c-string-literals/edition-spans.rs | 6 +- .../ui/rfcs/rfc-3348-c-string-literals/no-nuls.rs | Bin 1906 -> 1907 bytes .../rfcs/rfc-3348-c-string-literals/non-ascii.rs | 4 +- tests/ui/rmeta/auxiliary/rmeta-meta.rs | 4 +- tests/ui/rmeta/emit-artifact-notifications.rs | 6 +- tests/ui/rmeta/emit-metadata-obj.rs | 4 +- tests/ui/rmeta/no_optitimized_mir.rs | 6 +- tests/ui/rmeta/rmeta-lib-pass.rs | 8 +- tests/ui/rmeta/rmeta-pass.rs | 8 +- tests/ui/rmeta/rmeta-priv-warn.rs | 6 +- tests/ui/rmeta/rmeta.rs | 4 +- tests/ui/rmeta/rmeta_lib.rs | 8 +- tests/ui/rmeta/rmeta_meta_main.rs | 6 +- tests/ui/runtime/atomic-print.rs | 6 +- tests/ui/runtime/backtrace-debuginfo-aux.rs | 4 +- tests/ui/runtime/backtrace-debuginfo.rs | 14 +- tests/ui/runtime/native-print-no-runtime.rs | 2 +- tests/ui/runtime/out-of-stack.rs | 12 +- tests/ui/runtime/rt-explody-panic-payloads.rs | 8 +- tests/ui/runtime/running-with-no-runtime.rs | 6 +- tests/ui/runtime/signal-alternate-stack-cleanup.rs | 12 +- tests/ui/runtime/stdout-during-shutdown.rs | 6 +- tests/ui/rust-2018/async-ident-allowed.rs | 2 +- tests/ui/rust-2018/async-ident.fixed | 4 +- tests/ui/rust-2018/async-ident.rs | 4 +- .../auxiliary/suggestions-not-always-applicable.rs | 4 +- tests/ui/rust-2018/dyn-keyword.fixed | 4 +- tests/ui/rust-2018/dyn-keyword.rs | 4 +- tests/ui/rust-2018/dyn-trait-compatibility.rs | 2 +- .../edition-lint-fully-qualified-paths.fixed | 2 +- .../edition-lint-fully-qualified-paths.rs | 2 +- .../edition-lint-infer-outlives-macro.fixed | 6 +- .../rust-2018/edition-lint-infer-outlives-macro.rs | 6 +- .../ui/rust-2018/edition-lint-infer-outlives.fixed | 2 +- tests/ui/rust-2018/edition-lint-infer-outlives.rs | 2 +- .../edition-lint-nested-empty-paths.fixed | 2 +- .../rust-2018/edition-lint-nested-empty-paths.rs | 2 +- tests/ui/rust-2018/edition-lint-nested-paths.fixed | 2 +- tests/ui/rust-2018/edition-lint-nested-paths.rs | 2 +- tests/ui/rust-2018/edition-lint-paths-2018.rs | 8 +- tests/ui/rust-2018/edition-lint-paths.fixed | 4 +- tests/ui/rust-2018/edition-lint-paths.rs | 4 +- .../rust-2018/edition-lint-uninferable-outlives.rs | 2 +- .../rust-2018/extern-crate-idiomatic-in-2018.fixed | 8 +- .../ui/rust-2018/extern-crate-idiomatic-in-2018.rs | 8 +- tests/ui/rust-2018/extern-crate-idiomatic.fixed | 8 +- tests/ui/rust-2018/extern-crate-idiomatic.rs | 8 +- .../extern-crate-referenced-by-self-path.fixed | 6 +- .../extern-crate-referenced-by-self-path.rs | 6 +- tests/ui/rust-2018/extern-crate-rename.fixed | 4 +- tests/ui/rust-2018/extern-crate-rename.rs | 4 +- tests/ui/rust-2018/extern-crate-submod.fixed | 4 +- tests/ui/rust-2018/extern-crate-submod.rs | 4 +- tests/ui/rust-2018/future-proofing-locals.rs | 2 +- tests/ui/rust-2018/issue-51008-1.rs | 2 +- tests/ui/rust-2018/issue-51008.rs | 2 +- tests/ui/rust-2018/issue-52202-use-suggestions.rs | 2 +- tests/ui/rust-2018/issue-54006.rs | 2 +- ...issue-54400-unused-extern-crate-attr-span.fixed | 8 +- .../issue-54400-unused-extern-crate-attr-span.rs | 8 +- tests/ui/rust-2018/local-path-suggestions-2015.rs | 6 +- tests/ui/rust-2018/local-path-suggestions-2018.rs | 6 +- tests/ui/rust-2018/macro-use-warned-against.rs | 6 +- tests/ui/rust-2018/proc-macro-crate-in-paths.rs | 6 +- tests/ui/rust-2018/remove-extern-crate.fixed | 10 +- tests/ui/rust-2018/remove-extern-crate.rs | 10 +- .../suggestions-not-always-applicable.fixed | 10 +- .../rust-2018/suggestions-not-always-applicable.rs | 10 +- tests/ui/rust-2018/trait-import-suggestions.rs | 6 +- tests/ui/rust-2018/try-ident.fixed | 4 +- tests/ui/rust-2018/try-ident.rs | 4 +- tests/ui/rust-2018/try-macro.fixed | 4 +- tests/ui/rust-2018/try-macro.rs | 4 +- .../uniform-paths/ambiguity-macros-nested.rs | 2 +- .../ui/rust-2018/uniform-paths/ambiguity-macros.rs | 2 +- .../ui/rust-2018/uniform-paths/ambiguity-nested.rs | 4 +- tests/ui/rust-2018/uniform-paths/ambiguity.rs | 4 +- .../uniform-paths/auxiliary/cross-crate.rs | 2 +- .../uniform-paths/block-scoped-shadow-nested.rs | 4 +- .../rust-2018/uniform-paths/block-scoped-shadow.rs | 4 +- tests/ui/rust-2018/uniform-paths/cross-crate.rs | 4 +- tests/ui/rust-2018/uniform-paths/deadlock.rs | 4 +- tests/ui/rust-2018/uniform-paths/fn-local-enum.rs | 4 +- .../ui/rust-2018/uniform-paths/from-decl-macro.rs | 4 +- tests/ui/rust-2018/uniform-paths/issue-54253.rs | 2 +- tests/ui/rust-2018/uniform-paths/issue-55779.rs | 6 +- tests/ui/rust-2018/uniform-paths/issue-56596-2.rs | 8 +- tests/ui/rust-2018/uniform-paths/issue-56596.rs | 6 +- tests/ui/rust-2018/uniform-paths/issue-87932.rs | 4 +- tests/ui/rust-2018/uniform-paths/macro-rules.rs | 2 +- tests/ui/rust-2018/uniform-paths/prelude-fail-2.rs | 2 +- tests/ui/rust-2018/uniform-paths/prelude-fail.rs | 2 +- tests/ui/rust-2018/uniform-paths/prelude.rs | 4 +- tests/ui/rust-2018/uniform-paths/redundant.rs | 4 +- tests/ui/rust-2018/unresolved-asterisk-imports.rs | 2 +- tests/ui/rust-2021/array-into-iter-ambiguous.fixed | 6 +- tests/ui/rust-2021/array-into-iter-ambiguous.rs | 6 +- .../auxiliary/reserved-prefixes-macro-2018.rs | 6 +- .../auxiliary/reserved-prefixes-macro-2021.rs | 6 +- .../future-prelude-collision-generic-trait.fixed | 6 +- .../future-prelude-collision-generic-trait.rs | 6 +- .../future-prelude-collision-generic.fixed | 6 +- .../rust-2021/future-prelude-collision-generic.rs | 6 +- .../future-prelude-collision-imported.fixed | 6 +- .../rust-2021/future-prelude-collision-imported.rs | 6 +- .../future-prelude-collision-macros.fixed | 6 +- .../rust-2021/future-prelude-collision-macros.rs | 6 +- .../rust-2021/future-prelude-collision-shadow.rs | 2 +- .../future-prelude-collision-turbofish.fixed | 6 +- .../future-prelude-collision-turbofish.rs | 6 +- .../rust-2021/future-prelude-collision-unneeded.rs | 4 +- tests/ui/rust-2021/future-prelude-collision.fixed | 6 +- tests/ui/rust-2021/future-prelude-collision.rs | 6 +- tests/ui/rust-2021/generic-type-collision.fixed | 6 +- tests/ui/rust-2021/generic-type-collision.rs | 6 +- tests/ui/rust-2021/inherent-dyn-collision.fixed | 6 +- tests/ui/rust-2021/inherent-dyn-collision.rs | 6 +- tests/ui/rust-2021/inherent-method-collision.rs | 2 +- tests/ui/rust-2021/panic.rs | 2 +- tests/ui/rust-2021/prelude2021.rs | 4 +- .../ui/rust-2021/reserved-prefixes-migration.fixed | 6 +- tests/ui/rust-2021/reserved-prefixes-migration.rs | 6 +- .../ui/rust-2021/reserved-prefixes-via-macro-2.rs | 6 +- tests/ui/rust-2021/reserved-prefixes-via-macro.rs | 6 +- tests/ui/rust-2021/reserved-prefixes.rs | 2 +- tests/ui/rustc-rust-log.rs | 12 +- tests/ui/rustdoc/doc-alias-crate-level.rs | 2 +- tests/ui/rustdoc/doc-test-attr-pass.rs | 2 +- tests/ui/rustdoc/hidden-doc-associated-item.rs | 2 +- tests/ui/sanitize/address.rs | 14 +- tests/ui/sanitize/badfree.rs | 12 +- tests/ui/sanitize/cfg-kasan.rs | 22 +-- tests/ui/sanitize/cfg.rs | 32 ++-- tests/ui/sanitize/crt-static.rs | 4 +- tests/ui/sanitize/hwaddress.rs | 12 +- tests/ui/sanitize/incompatible.rs | 6 +- tests/ui/sanitize/inline-always.rs | 2 +- .../ui/sanitize/issue-111184-coroutine-witness.rs | 10 +- .../issue-114275-cfi-const-expr-in-arry-len.rs | 6 +- tests/ui/sanitize/issue-72154-lifetime-markers.rs | 10 +- tests/ui/sanitize/leak.rs | 10 +- tests/ui/sanitize/memory-eager.rs | 18 +- tests/ui/sanitize/memory-passing.rs | 12 +- tests/ui/sanitize/memory.rs | 18 +- .../ui/sanitize/new-llvm-pass-manager-thin-lto.rs | 20 +- ...itizer-cfi-canonical-jump-tables-require-cfi.rs | 4 +- .../sanitizer-cfi-generalize-pointers-attr-cfg.rs | 6 +- ...anitizer-cfi-generalize-pointers-require-cfi.rs | 4 +- .../sanitizer-cfi-invalid-attr-cfi-encoding.rs | 4 +- ...izer-cfi-is-incompatible-with-saniziter-kcfi.rs | 12 +- .../sanitizer-cfi-normalize-integers-attr-cfg.rs | 6 +- ...sanitizer-cfi-normalize-integers-require-cfi.rs | 4 +- tests/ui/sanitize/sanitizer-cfi-requires-lto.rs | 4 +- ...-with-rustc-lto-requires-single-codegen-unit.rs | 4 +- tests/ui/sanitize/split-lto-unit-requires-lto.rs | 4 +- tests/ui/sanitize/thread.rs | 14 +- tests/ui/sanitize/unsupported-target.rs | 6 +- tests/ui/sanitize/use-after-scope.rs | 12 +- tests/ui/self/arbitrary-self-from-method-substs.rs | 2 +- .../self/arbitrary-self-types-not-object-safe.rs | 2 +- ...ry_self_types_needing_box_or_arc_wrapping.fixed | 2 +- ...trary_self_types_needing_box_or_arc_wrapping.rs | 2 +- .../arbitrary_self_types_needing_mut_pin.fixed | 2 +- .../self/arbitrary_self_types_needing_mut_pin.rs | 2 +- tests/ui/self/arbitrary_self_types_nested.rs | 2 +- .../arbitrary_self_types_pin_lifetime-async.rs | 4 +- tests/ui/self/arbitrary_self_types_pin_lifetime.rs | 2 +- ...ary_self_types_pin_lifetime_impl_trait-async.rs | 2 +- ...trary_self_types_pin_lifetime_mismatch-async.rs | 2 +- .../arbitrary_self_types_pointers_and_wrappers.rs | 2 +- .../arbitrary_self_types_raw_pointer_struct.rs | 2 +- .../self/arbitrary_self_types_raw_pointer_trait.rs | 2 +- tests/ui/self/arbitrary_self_types_silly.rs | 2 +- .../self/arbitrary_self_types_stdlib_pointers.rs | 2 +- tests/ui/self/arbitrary_self_types_struct.rs | 2 +- tests/ui/self/arbitrary_self_types_trait.rs | 2 +- .../ui/self/arbitrary_self_types_unsized_struct.rs | 2 +- tests/ui/self/builtin-superkinds-self-type.rs | 2 +- tests/ui/self/by-value-self-in-mut-slot.rs | 2 +- tests/ui/self/elision/alias-async.rs | 4 +- tests/ui/self/elision/alias.rs | 2 +- tests/ui/self/elision/assoc-async.rs | 4 +- tests/ui/self/elision/assoc.rs | 2 +- tests/ui/self/elision/lt-alias-async.rs | 4 +- tests/ui/self/elision/lt-alias.rs | 2 +- tests/ui/self/elision/lt-assoc-async.rs | 4 +- tests/ui/self/elision/lt-assoc.rs | 2 +- tests/ui/self/elision/lt-ref-self-async.rs | 2 +- tests/ui/self/elision/lt-self-async.rs | 4 +- tests/ui/self/elision/lt-self.rs | 2 +- tests/ui/self/elision/lt-struct-async.rs | 4 +- tests/ui/self/elision/lt-struct.rs | 2 +- tests/ui/self/elision/multiple-ref-self-async.rs | 4 +- tests/ui/self/elision/multiple-ref-self.rs | 2 +- tests/ui/self/elision/ref-alias-async.rs | 4 +- tests/ui/self/elision/ref-alias.rs | 2 +- tests/ui/self/elision/ref-assoc-async.rs | 4 +- tests/ui/self/elision/ref-assoc.rs | 2 +- tests/ui/self/elision/ref-mut-alias-async.rs | 4 +- tests/ui/self/elision/ref-mut-alias.rs | 2 +- tests/ui/self/elision/ref-mut-self-async.rs | 2 +- tests/ui/self/elision/ref-mut-struct-async.rs | 2 +- tests/ui/self/elision/ref-self-async.rs | 2 +- tests/ui/self/elision/ref-struct-async.rs | 2 +- tests/ui/self/elision/self-async.rs | 4 +- tests/ui/self/elision/self.rs | 2 +- tests/ui/self/elision/struct-async.rs | 4 +- tests/ui/self/elision/struct.rs | 2 +- tests/ui/self/explicit-self-closures.rs | 4 +- tests/ui/self/explicit-self-generic.rs | 2 +- tests/ui/self/explicit-self-objects-uniq.rs | 2 +- tests/ui/self/explicit-self.rs | 2 +- tests/ui/self/explicit_self_xcrate_exe.rs | 6 +- tests/ui/self/move-self.rs | 2 +- .../self/object-safety-sized-self-by-value-self.rs | 2 +- .../object-safety-sized-self-generic-method.rs | 2 +- .../self/object-safety-sized-self-return-Self.rs | 2 +- tests/ui/self/objects-owned-object-owned-method.rs | 2 +- tests/ui/self/self-ctor-nongeneric.rs | 2 +- tests/ui/self/self-impl-2.rs | 4 +- tests/ui/self/self-in-mut-slot-default-method.rs | 2 +- tests/ui/self/self-in-mut-slot-immediate-value.rs | 2 +- tests/ui/self/self-in-typedefs.rs | 2 +- tests/ui/self/self-re-assign.rs | 2 +- tests/ui/self/self-shadowing-import.rs | 2 +- tests/ui/self/self-type-param.rs | 4 +- tests/ui/self/self_lifetime-async.rs | 4 +- tests/ui/self/self_lifetime.rs | 2 +- tests/ui/self/string-self-append.rs | 2 +- tests/ui/self/ufcs-explicit-self.rs | 2 +- tests/ui/self/uniq-self-in-mut-slot.rs | 2 +- tests/ui/self/where-for-self.rs | 2 +- tests/ui/sepcomp/auxiliary/sepcomp_lib.rs | 2 +- tests/ui/sepcomp/sepcomp-cci.rs | 6 +- tests/ui/sepcomp/sepcomp-extern.rs | 6 +- tests/ui/sepcomp/sepcomp-fns-backwards.rs | 4 +- tests/ui/sepcomp/sepcomp-fns.rs | 4 +- tests/ui/sepcomp/sepcomp-lib-lto.rs | 8 +- tests/ui/sepcomp/sepcomp-lib.rs | 4 +- tests/ui/sepcomp/sepcomp-statics.rs | 4 +- tests/ui/sepcomp/sepcomp-unwind.rs | 8 +- tests/ui/shadow-bool.rs | 2 +- tests/ui/shadowed-use-visibility.rs | 2 +- .../shell-argfiles-badquotes-windows.rs | 4 +- .../ui/shell-argfiles/shell-argfiles-badquotes.rs | 4 +- .../shell-argfiles/shell-argfiles-via-argfile.rs | 4 +- tests/ui/shell-argfiles/shell-argfiles.rs | 4 +- tests/ui/short-error-format.rs | 2 +- tests/ui/simd/array-trait.rs | 2 +- tests/ui/simd/array-type.rs | 4 +- tests/ui/simd/generics.rs | 2 +- tests/ui/simd/intrinsic/float-math-pass.rs | 6 +- tests/ui/simd/intrinsic/float-minmax-pass.rs | 4 +- tests/ui/simd/intrinsic/generic-arithmetic-2.rs | 2 +- tests/ui/simd/intrinsic/generic-arithmetic-pass.rs | 4 +- .../intrinsic/generic-arithmetic-saturating-2.rs | 4 +- .../generic-arithmetic-saturating-pass.rs | 4 +- tests/ui/simd/intrinsic/generic-as.rs | 2 +- tests/ui/simd/intrinsic/generic-bitmask-pass.rs | 6 +- tests/ui/simd/intrinsic/generic-bitmask.rs | 2 +- tests/ui/simd/intrinsic/generic-bswap-byte.rs | 2 +- tests/ui/simd/intrinsic/generic-cast-pass.rs | 4 +- .../simd/intrinsic/generic-cast-pointer-width.rs | 2 +- tests/ui/simd/intrinsic/generic-cast.rs | 2 +- tests/ui/simd/intrinsic/generic-comparison-pass.rs | 4 +- tests/ui/simd/intrinsic/generic-comparison.rs | 2 +- tests/ui/simd/intrinsic/generic-elements-pass.rs | 4 +- tests/ui/simd/intrinsic/generic-elements.rs | 2 +- tests/ui/simd/intrinsic/generic-gather-pass.rs | 4 +- tests/ui/simd/intrinsic/generic-reduction-pass.rs | 4 +- tests/ui/simd/intrinsic/generic-reduction.rs | 4 +- tests/ui/simd/intrinsic/generic-select-pass.rs | 6 +- tests/ui/simd/intrinsic/generic-select.rs | 2 +- tests/ui/simd/intrinsic/generic-shuffle.rs | 2 +- tests/ui/simd/intrinsic/inlining-issue67557-ice.rs | 4 +- tests/ui/simd/intrinsic/inlining-issue67557.rs | 4 +- tests/ui/simd/intrinsic/ptr-cast.rs | 2 +- tests/ui/simd/issue-105439.rs | 4 +- tests/ui/simd/issue-17170.rs | 2 +- tests/ui/simd/issue-32947.rs | 4 +- tests/ui/simd/issue-39720.rs | 4 +- tests/ui/simd/issue-85915-simd-ptrs.rs | 4 +- tests/ui/simd/issue-89193.rs | 2 +- tests/ui/simd/libm_std_can_float.rs | 2 +- tests/ui/simd/masked-load-store-build-fail.rs | 2 +- tests/ui/simd/masked-load-store-check-fail.rs | 2 +- tests/ui/simd/masked-load-store.rs | 2 +- tests/ui/simd/monomorphize-shuffle-index.rs | 6 +- tests/ui/simd/repr_packed.rs | 2 +- tests/ui/simd/shuffle-not-out-of-bounds.rs | 2 +- tests/ui/simd/shuffle.rs | 8 +- tests/ui/simd/simd-bitmask.rs | 4 +- tests/ui/simd/size-align.rs | 2 +- tests/ui/simd/target-feature-mixup.rs | 8 +- .../ui/simd/type-generic-monomorphisation-empty.rs | 4 +- ...-generic-monomorphisation-extern-nonnull-ptr.rs | 4 +- .../type-generic-monomorphisation-non-primitive.rs | 4 +- .../type-generic-monomorphisation-oversized.rs | 4 +- .../type-generic-monomorphisation-power-of-two.rs | 2 +- .../simd/type-generic-monomorphisation-wide-ptr.rs | 4 +- tests/ui/simd/type-generic-monomorphisation.rs | 4 +- tests/ui/simd/type-wide-ptr.rs | 4 +- tests/ui/simd/wasm-simd-indirect.rs | 2 +- tests/ui/simple_global_asm.rs | 4 +- tests/ui/single-use-lifetime/derive-eq.rs | 2 +- .../ui/single-use-lifetime/one-use-in-fn-return.rs | 2 +- tests/ui/single-use-lifetime/one-use-in-struct.rs | 2 +- .../two-uses-in-fn-argument-and-return.rs | 2 +- .../two-uses-in-fn-arguments.rs | 2 +- .../two-uses-in-inherent-impl-header.rs | 2 +- .../single-use-lifetime/two-uses-in-trait-impl.rs | 2 +- tests/ui/single-use-lifetime/zero-uses-in-fn.fixed | 2 +- tests/ui/single-use-lifetime/zero-uses-in-fn.rs | 2 +- tests/ui/sized-borrowed-pointer.rs | 4 +- tests/ui/sized-owned-pointer.rs | 4 +- tests/ui/sized/coinductive-1-gat.rs | 2 +- tests/ui/sized/coinductive-1.rs | 2 +- tests/ui/sized/coinductive-2.rs | 2 +- tests/ui/sized/recursive-type-binding.rs | 2 +- .../ui/sized/recursive-type-coercion-from-never.rs | 2 +- tests/ui/sized/recursive-type-pass.rs | 2 +- tests/ui/span/borrowck-ref-into-rvalue.fixed | 2 +- tests/ui/span/borrowck-ref-into-rvalue.rs | 2 +- ...ust-2021-incompatible-closure-captures-93117.rs | 2 +- tests/ui/span/issue-107353.rs | 4 +- tests/ui/span/issue-15480.fixed | 2 +- tests/ui/span/issue-15480.rs | 2 +- tests/ui/span/issue-24690.rs | 2 +- tests/ui/span/issue-42234-unknown-receiver-type.rs | 2 +- tests/ui/span/issue-71363.rs | 2 +- tests/ui/span/lint-unused-unsafe.rs | 2 +- tests/ui/span/macro-span-replacement.rs | 2 +- tests/ui/span/multispan-import-lint.rs | 2 +- tests/ui/span/transitive-dep-span.rs | 6 +- .../ui/span/unused-warning-point-at-identifier.rs | 2 +- tests/ui/specialization/assoc-ty-graph-cycle.rs | 2 +- tests/ui/specialization/const_trait_impl.rs | 2 +- tests/ui/specialization/cross-crate-defaults.rs | 4 +- .../ui/specialization/ctfe/default-assoc-const.rs | 2 +- tests/ui/specialization/ctfe/default-assoc-type.rs | 2 +- .../defaultimpl/allowed-cross-crate.rs | 4 +- .../ui/specialization/defaultimpl/out-of-order.rs | 2 +- .../defaultimpl/overlap-projection.rs | 2 +- tests/ui/specialization/defaultimpl/projection.rs | 2 +- ...cialization-trait-item-not-implemented-rpass.rs | 2 +- tests/ui/specialization/issue-35376.rs | 2 +- tests/ui/specialization/issue-36804.rs | 2 +- tests/ui/specialization/issue-38091-2.rs | 2 +- tests/ui/specialization/issue-39618.rs | 2 +- tests/ui/specialization/issue-40582.rs | 4 +- tests/ui/specialization/issue-43037.rs | 2 +- tests/ui/specialization/issue-45814.rs | 2 +- tests/ui/specialization/issue-50452.rs | 2 +- tests/ui/specialization/issue-63716-parse-async.rs | 4 +- tests/ui/specialization/issue-70442.rs | 2 +- .../min_specialization/allow_internal_unstable.rs | 6 +- .../impl_specialization_trait.rs | 2 +- .../implcit-well-formed-bounds.rs | 2 +- .../specialization/min_specialization/spec-iter.rs | 2 +- .../min_specialization/spec-reference.rs | 2 +- .../specialize-associated-type.rs | 2 +- .../min_specialization/specialize_on_marker.rs | 2 +- .../min_specialization/specialize_on_spec_trait.rs | 2 +- .../soundness/partial_eq_range_inclusive.rs | 2 +- .../specialization/soundness/partial_ord_slice.rs | 2 +- .../specialization-allowed-cross-crate.rs | 4 +- .../ui/specialization/specialization-assoc-fns.rs | 2 +- tests/ui/specialization/specialization-basics.rs | 2 +- .../specialization-cross-crate-no-gate.rs | 4 +- .../specialization/specialization-cross-crate.rs | 4 +- .../specialization-default-items-drop-coherence.rs | 10 +- .../specialization-default-methods.rs | 2 +- .../specialization/specialization-on-projection.rs | 2 +- .../specialization/specialization-out-of-order.rs | 2 +- .../specialization-overlap-projection.rs | 2 +- .../specialization-projection-alias.rs | 2 +- .../ui/specialization/specialization-projection.rs | 2 +- .../specialization/specialization-supertraits.rs | 2 +- ...ization-translate-projections-with-lifetimes.rs | 2 +- ...ialization-translate-projections-with-params.rs | 2 +- .../specialization-translate-projections.rs | 2 +- .../ui/specialization/transmute-specialization.rs | 2 +- tests/ui/sse2.rs | 2 +- .../stability-attribute/allow-unstable-reexport.rs | 4 +- .../allowed-through-unstable.rs | 2 +- ...const-stability-attribute-implies-no-feature.rs | 2 +- ...nst-stability-attribute-implies-using-stable.rs | 2 +- ...t-stability-attribute-implies-using-unstable.rs | 2 +- tests/ui/stability-attribute/ctor-stability.rs | 4 +- .../default-body-stability-err.rs | 2 +- .../default-body-stability-ok-enables.rs | 4 +- .../default-body-stability-ok-impls.rs | 4 +- .../generics-default-stability-trait.rs | 2 +- .../generics-default-stability-where.rs | 2 +- .../generics-default-stability.rs | 2 +- tests/ui/stability-attribute/issue-109177.rs | 2 +- tests/ui/stability-attribute/issue-28075.rs | 2 +- tests/ui/stability-attribute/issue-28388-3.rs | 2 +- .../issue-99286-stable-intrinsics.rs | 2 +- .../stability-attribute-implies-no-feature.rs | 2 +- .../stability-attribute-implies-using-stable.rs | 2 +- .../stability-attribute-implies-using-unstable.rs | 2 +- .../stability-attribute-issue-43027.rs | 2 +- .../stability-attribute-issue.rs | 2 +- ...tability-attribute-non-staged-force-unstable.rs | 2 +- tests/ui/stability-attribute/stable-in-unstable.rs | 4 +- tests/ui/stable-addr-of.rs | 2 +- tests/ui/stable-mir-print/basic_function.rs | 6 +- .../warn-stack-protector-unsupported.rs | 14 +- .../ui/static/auxiliary/static-priv-by-default.rs | 2 +- tests/ui/static/issue-24843.rs | 4 +- tests/ui/static/issue-34194.rs | 2 +- tests/ui/static/nested_item_main.rs | 4 +- tests/ui/static/refer-to-other-statics-by-value.rs | 2 +- tests/ui/static/reference-of-mut-static-safe.rs | 6 +- .../ui/static/reference-of-mut-static-unsafe-fn.rs | 2 +- tests/ui/static/reference-of-mut-static.rs | 6 +- tests/ui/static/safe-extern-statics-mut.rs | 2 +- tests/ui/static/safe-extern-statics.rs | 2 +- tests/ui/static/static-extern-type.rs | 2 +- tests/ui/static/static-priv-by-default2.rs | 2 +- tests/ui/static/static_sized_requirement.rs | 2 +- tests/ui/statics/issue-15261.rs | 4 +- tests/ui/statics/issue-17233.rs | 2 +- .../statics/issue-17718-static-unsafe-interior.rs | 4 +- tests/ui/statics/issue-44373-2.rs | 2 +- tests/ui/statics/issue-91050-1.rs | 4 +- tests/ui/statics/issue-91050-2.rs | 4 +- tests/ui/statics/recursive_interior_mut.rs | 2 +- tests/ui/statics/static-fn-inline-xc.rs | 6 +- tests/ui/statics/static-fn-trait-xc.rs | 6 +- tests/ui/statics/static-function-pointer-xc.rs | 4 +- tests/ui/statics/static-function-pointer.rs | 2 +- tests/ui/statics/static-impl.rs | 2 +- .../static-method-in-trait-with-tps-intracrate.rs | 2 +- tests/ui/statics/static-method-xcrate.rs | 4 +- tests/ui/statics/static-methods-in-traits.rs | 2 +- tests/ui/statics/static-methods-in-traits2.rs | 4 +- tests/ui/statics/static-mut-xc.rs | 4 +- tests/ui/statics/static-promotion.rs | 2 +- tests/ui/statics/static-recursive.rs | 2 +- tests/ui/stats/hir-stats.rs | 6 +- tests/ui/stats/meta-stats.rs | 6 +- tests/ui/std-backtrace.rs | 18 +- tests/ui/std/issue-81357-unsound-file-methods.rs | 4 +- tests/ui/std/slice-from-array-issue-113238.rs | 2 +- tests/ui/std/stdio-from.rs | 4 +- tests/ui/stdio-is-blocking.rs | 6 +- tests/ui/stdlib-unit-tests/builtin-clone.rs | 2 +- tests/ui/stdlib-unit-tests/eq-multidispatch.rs | 2 +- tests/ui/stdlib-unit-tests/issue-21058.rs | 2 +- tests/ui/stdlib-unit-tests/istr.rs | 2 +- .../log-knows-the-names-of-variants-in-std.rs | 2 +- tests/ui/stdlib-unit-tests/matches2021.rs | 4 +- .../minmax-stability-issue-23687.rs | 2 +- tests/ui/stdlib-unit-tests/raw-fat-ptr.rs | 2 +- tests/ui/stdlib-unit-tests/seq-compare.rs | 2 +- tests/ui/stdlib-unit-tests/volatile-fat-ptr.rs | 2 +- tests/ui/str/str-as-char.fixed | 2 +- tests/ui/str/str-as-char.rs | 2 +- tests/ui/str/str-escape.rs | 4 +- tests/ui/str/str-overrun.rs | 6 +- tests/ui/string-box-error.rs | 2 +- tests/ui/struct-ctor-mangling.rs | 2 +- tests/ui/structs-enums/align-enum.rs | 2 +- tests/ui/structs-enums/align-struct.rs | 2 +- tests/ui/structs-enums/borrow-tuple-fields.rs | 2 +- .../class-cast-to-trait-cross-crate-2.rs | 4 +- .../class-cast-to-trait-multiple-types.rs | 2 +- tests/ui/structs-enums/class-cast-to-trait.rs | 4 +- tests/ui/structs-enums/class-dtor.rs | 4 +- tests/ui/structs-enums/class-exports.rs | 2 +- .../class-impl-very-parameterized-trait.rs | 2 +- .../class-implement-trait-cross-crate.rs | 4 +- tests/ui/structs-enums/class-implement-traits.rs | 2 +- tests/ui/structs-enums/class-method-cross-crate.rs | 4 +- .../ui/structs-enums/class-methods-cross-crate.rs | 4 +- tests/ui/structs-enums/class-methods.rs | 2 +- .../class-poly-methods-cross-crate.rs | 4 +- tests/ui/structs-enums/class-poly-methods.rs | 2 +- tests/ui/structs-enums/class-separate-impl.rs | 2 +- tests/ui/structs-enums/class-str-field.rs | 4 +- tests/ui/structs-enums/class-typarams.rs | 4 +- tests/ui/structs-enums/classes-cross-crate.rs | 4 +- tests/ui/structs-enums/classes-self-referential.rs | 4 +- .../ui/structs-enums/classes-simple-cross-crate.rs | 4 +- tests/ui/structs-enums/classes-simple-method.rs | 2 +- tests/ui/structs-enums/classes-simple.rs | 2 +- tests/ui/structs-enums/classes.rs | 2 +- .../ui/structs-enums/codegen-tag-static-padding.rs | 2 +- tests/ui/structs-enums/compare-generic-enums.rs | 2 +- .../cross-crate-newtype-struct-pat.rs | 4 +- tests/ui/structs-enums/discrim-explicit-23030.rs | 2 +- tests/ui/structs-enums/empty-struct-braces.rs | 4 +- tests/ui/structs-enums/empty-tag.rs | 2 +- tests/ui/structs-enums/enum-alignment.rs | 2 +- tests/ui/structs-enums/enum-clike-ffi-as-int.rs | 2 +- tests/ui/structs-enums/enum-discr.rs | 2 +- tests/ui/structs-enums/enum-discrim-autosizing.rs | 2 +- .../ui/structs-enums/enum-discrim-manual-sizing.rs | 2 +- .../structs-enums/enum-discrim-range-overflow.rs | 4 +- tests/ui/structs-enums/enum-discrim-width-stuff.rs | 2 +- tests/ui/structs-enums/enum-disr-val-pretty.rs | 4 +- tests/ui/structs-enums/enum-export-inheritance.rs | 4 +- tests/ui/structs-enums/enum-layout-optimization.rs | 2 +- .../enum-non-c-like-repr-c-and-int.rs | 2 +- tests/ui/structs-enums/enum-non-c-like-repr-c.rs | 2 +- tests/ui/structs-enums/enum-non-c-like-repr-int.rs | 2 +- tests/ui/structs-enums/enum-null-pointer-opt.rs | 2 +- .../enum-nullable-const-null-with-fields.rs | 2 +- .../enum-nullable-simplifycfg-misopt.rs | 2 +- tests/ui/structs-enums/enum-rec/issue-17431-6.rs | 2 +- tests/ui/structs-enums/enum-univariant-repr.rs | 2 +- tests/ui/structs-enums/enum-variants.rs | 4 +- tests/ui/structs-enums/enum-vec-initializer.rs | 4 +- tests/ui/structs-enums/export-abstract-tag.rs | 4 +- tests/ui/structs-enums/export-tag-variant.rs | 4 +- tests/ui/structs-enums/expr-if-struct.rs | 2 +- tests/ui/structs-enums/expr-match-struct.rs | 2 +- tests/ui/structs-enums/field-destruction-order.rs | 2 +- tests/ui/structs-enums/foreign-struct.rs | 4 +- tests/ui/structs-enums/functional-struct-upd.rs | 2 +- tests/ui/structs-enums/issue-103869.fixed | 2 +- tests/ui/structs-enums/issue-103869.rs | 2 +- tests/ui/structs-enums/issue-1701.rs | 2 +- tests/ui/structs-enums/issue-38002.rs | 2 +- tests/ui/structs-enums/issue-50731.rs | 2 +- tests/ui/structs-enums/ivec-tag.rs | 4 +- .../module-qualified-struct-destructure.rs | 4 +- tests/ui/structs-enums/multiple-reprs.rs | 2 +- .../namespaced-enum-emulate-flat-xc.rs | 6 +- .../structs-enums/namespaced-enum-emulate-flat.rs | 4 +- .../namespaced-enum-glob-import-xcrate.rs | 6 +- .../structs-enums/namespaced-enum-glob-import.rs | 4 +- tests/ui/structs-enums/namespaced-enums-xcrate.rs | 6 +- tests/ui/structs-enums/namespaced-enums.rs | 4 +- tests/ui/structs-enums/nested-enum-same-names.rs | 4 +- tests/ui/structs-enums/newtype-struct-drop-run.rs | 2 +- tests/ui/structs-enums/newtype-struct-with-dtor.rs | 4 +- tests/ui/structs-enums/newtype-struct-xc-2.rs | 6 +- tests/ui/structs-enums/newtype-struct-xc.rs | 6 +- tests/ui/structs-enums/nonzero-enum.rs | 2 +- tests/ui/structs-enums/numeric-fields.rs | 2 +- tests/ui/structs-enums/rec-align-u32.rs | 2 +- tests/ui/structs-enums/rec-align-u64.rs | 4 +- tests/ui/structs-enums/rec-auto.rs | 2 +- tests/ui/structs-enums/rec-extend.rs | 2 +- tests/ui/structs-enums/rec-tup.rs | 2 +- tests/ui/structs-enums/rec.rs | 2 +- tests/ui/structs-enums/record-pat.rs | 2 +- tests/ui/structs-enums/resource-in-struct.rs | 2 +- tests/ui/structs-enums/simple-generic-tag.rs | 4 +- tests/ui/structs-enums/simple-match-generic-tag.rs | 2 +- tests/ui/structs-enums/small-enum-range-edge.rs | 2 +- tests/ui/structs-enums/small-enums-with-fields.rs | 2 +- tests/ui/structs-enums/struct-aliases-xcrate.rs | 4 +- tests/ui/structs-enums/struct-aliases.rs | 2 +- .../struct-destructuring-cross-crate.rs | 4 +- tests/ui/structs-enums/struct-field-shorthand.rs | 2 +- .../structs-enums/struct-like-variant-construct.rs | 4 +- .../ui/structs-enums/struct-like-variant-match.rs | 2 +- .../struct-lit-functional-no-fields.rs | 2 +- tests/ui/structs-enums/struct-literal-dtor.rs | 2 +- tests/ui/structs-enums/struct-new-as-field-name.rs | 2 +- tests/ui/structs-enums/struct-order-of-eval-1.rs | 2 +- tests/ui/structs-enums/struct-order-of-eval-2.rs | 2 +- tests/ui/structs-enums/struct-order-of-eval-3.rs | 2 +- tests/ui/structs-enums/struct-order-of-eval-4.rs | 2 +- tests/ui/structs-enums/struct-partial-move-1.rs | 2 +- tests/ui/structs-enums/struct-partial-move-2.rs | 2 +- .../structs-enums/struct-path-associated-type.rs | 2 +- tests/ui/structs-enums/struct-path-self.rs | 2 +- tests/ui/structs-enums/struct-pattern-matching.rs | 2 +- .../struct-variant-field-visibility.rs | 4 +- tests/ui/structs-enums/struct_variant_xc.rs | 6 +- tests/ui/structs-enums/struct_variant_xc_match.rs | 4 +- tests/ui/structs-enums/tag-align-dyn-u64.rs | 2 +- tests/ui/structs-enums/tag-align-dyn-variants.rs | 2 +- tests/ui/structs-enums/tag-align-shape.rs | 2 +- tests/ui/structs-enums/tag-align-u64.rs | 2 +- tests/ui/structs-enums/tag-disr-val-shape.rs | 2 +- tests/ui/structs-enums/tag-exports.rs | 4 +- tests/ui/structs-enums/tag-in-block.rs | 4 +- .../tag-variant-disr-type-mismatch.rs | 4 +- tests/ui/structs-enums/tag-variant-disr-val.rs | 2 +- tests/ui/structs-enums/tag.rs | 2 +- tests/ui/structs-enums/tuple-struct-construct.rs | 2 +- .../tuple-struct-constructor-pointer.rs | 2 +- .../ui/structs-enums/tuple-struct-destructuring.rs | 2 +- tests/ui/structs-enums/tuple-struct-matching.rs | 2 +- tests/ui/structs-enums/tuple-struct-trivial.rs | 4 +- tests/ui/structs-enums/type-sizes.rs | 2 +- tests/ui/structs-enums/uninstantiable-struct.rs | 2 +- .../ui/structs-enums/unit-like-struct-drop-run.rs | 6 +- tests/ui/structs-enums/unit-like-struct.rs | 2 +- tests/ui/structs-enums/variant-structs-trivial.rs | 4 +- tests/ui/structs/large-records.rs | 4 +- tests/ui/structs/rhs-type.rs | 6 +- tests/ui/structs/struct-duplicate-comma.fixed | 2 +- tests/ui/structs/struct-duplicate-comma.rs | 2 +- tests/ui/structs/struct-field-privacy.rs | 2 +- tests/ui/structs/struct-missing-comma.fixed | 2 +- tests/ui/structs/struct-missing-comma.rs | 2 +- tests/ui/structs/struct-record-suggestion.fixed | 2 +- tests/ui/structs/struct-record-suggestion.rs | 2 +- tests/ui/structs/struct-variant-privacy-xc.rs | 2 +- tests/ui/structs/suggest-private-fields.rs | 2 +- tests/ui/suggest-null-ptr.fixed | 2 +- tests/ui/suggest-null-ptr.rs | 2 +- tests/ui/suggestions/abi-typo.fixed | 2 +- tests/ui/suggestions/abi-typo.rs | 2 +- tests/ui/suggestions/args-instead-of-tuple.fixed | 2 +- tests/ui/suggestions/args-instead-of-tuple.rs | 2 +- ...ssed-as-arg-where-it-should-have-been-called.rs | 2 +- tests/ui/suggestions/auxiliary/issue-61963-1.rs | 4 +- tests/ui/suggestions/auxiliary/issue-61963.rs | 4 +- tests/ui/suggestions/auxiliary/issue-81839.rs | 2 +- .../suggestions/auxiliary/proc-macro-type-error.rs | 4 +- tests/ui/suggestions/bound-suggestions.fixed | 2 +- tests/ui/suggestions/bound-suggestions.rs | 2 +- tests/ui/suggestions/box-future-wrong-output.rs | 2 +- ...lone-on-unconstrained-borrowed-type-param.fixed | 2 +- .../clone-on-unconstrained-borrowed-type-param.rs | 2 +- tests/ui/suggestions/constrain-trait.fixed | 2 +- tests/ui/suggestions/constrain-trait.rs | 2 +- tests/ui/suggestions/copied-and-cloned.fixed | 2 +- tests/ui/suggestions/copied-and-cloned.rs | 2 +- .../core-std-import-order-issue-83564.rs | 2 +- tests/ui/suggestions/crate-or-module-typo.rs | 2 +- tests/ui/suggestions/derive-clone-for-eq.fixed | 2 +- tests/ui/suggestions/derive-clone-for-eq.rs | 2 +- .../hidden-child.rs | 2 +- .../hidden-parent.rs | 2 +- .../suggestions/dont-suggest-foreign-doc-hidden.rs | 4 +- .../ui/suggestions/dont-try-removing-the-field.rs | 2 +- tests/ui/suggestions/enum-method-probe.fixed | 4 +- tests/ui/suggestions/enum-method-probe.rs | 4 +- .../expected-boxed-future-isnt-pinned.rs | 2 +- tests/ui/suggestions/field-access.fixed | 2 +- tests/ui/suggestions/field-access.rs | 2 +- ...ssed-as-arg-where-it-should-have-been-called.rs | 2 +- tests/ui/suggestions/fn-trait-notation.fixed | 2 +- tests/ui/suggestions/fn-trait-notation.rs | 2 +- tests/ui/suggestions/for-i-in-vec.fixed | 2 +- tests/ui/suggestions/for-i-in-vec.rs | 2 +- tests/ui/suggestions/if-then-neeing-semi.rs | 2 +- .../suggestions/ignore-nested-field-binding.fixed | 2 +- .../ui/suggestions/ignore-nested-field-binding.rs | 2 +- .../impl-trait-missing-lifetime-gated.rs | 2 +- .../ui/suggestions/impl-trait-missing-lifetime.rs | 2 +- ...pl-trait-with-missing-trait-bounds-in-arg.fixed | 2 +- .../impl-trait-with-missing-trait-bounds-in-arg.rs | 2 +- tests/ui/suggestions/inner_type.fixed | 4 +- tests/ui/suggestions/inner_type.rs | 4 +- tests/ui/suggestions/issue-101065.fixed | 4 +- tests/ui/suggestions/issue-101065.rs | 4 +- tests/ui/suggestions/issue-102972.fixed | 2 +- tests/ui/suggestions/issue-102972.rs | 2 +- tests/ui/suggestions/issue-104961.fixed | 2 +- tests/ui/suggestions/issue-104961.rs | 2 +- .../issue-105761-suggest-self-for-closure.fixed | 2 +- .../issue-105761-suggest-self-for-closure.rs | 2 +- tests/ui/suggestions/issue-107860.rs | 2 +- tests/ui/suggestions/issue-108470.fixed | 2 +- tests/ui/suggestions/issue-108470.rs | 2 +- .../issue-114797-bad-parentheses-dyn-trait.fixed | 2 +- .../issue-114797-bad-parentheses-dyn-trait.rs | 2 +- tests/ui/suggestions/issue-116434-2021.rs | 2 +- tests/ui/suggestions/issue-52820.fixed | 2 +- tests/ui/suggestions/issue-52820.rs | 2 +- tests/ui/suggestions/issue-53692.fixed | 2 +- tests/ui/suggestions/issue-53692.rs | 2 +- tests/ui/suggestions/issue-57672.rs | 8 +- tests/ui/suggestions/issue-59819.fixed | 2 +- tests/ui/suggestions/issue-59819.rs | 2 +- tests/ui/suggestions/issue-61226.fixed | 2 +- tests/ui/suggestions/issue-61226.rs | 2 +- tests/ui/suggestions/issue-61963.rs | 4 +- tests/ui/suggestions/issue-71394-no-from-impl.rs | 8 +- tests/ui/suggestions/issue-72766.rs | 4 +- ...3-impl-trait-with-missing-bounds-on-async-fn.rs | 2 +- tests/ui/suggestions/issue-81839.rs | 4 +- tests/ui/suggestions/issue-82361.fixed | 2 +- tests/ui/suggestions/issue-82361.rs | 2 +- tests/ui/suggestions/issue-83892.fixed | 2 +- tests/ui/suggestions/issue-83892.rs | 2 +- tests/ui/suggestions/issue-83943.fixed | 2 +- tests/ui/suggestions/issue-83943.rs | 2 +- tests/ui/suggestions/issue-86667.rs | 2 +- tests/ui/suggestions/issue-89333.rs | 2 +- .../issue-90213-expected-boxfuture-self-ice.rs | 2 +- tests/ui/suggestions/issue-96223.rs | 2 +- tests/ui/suggestions/issue-96555.rs | 2 +- tests/ui/suggestions/issue-97677.fixed | 2 +- tests/ui/suggestions/issue-97677.rs | 2 +- tests/ui/suggestions/issue-97704.fixed | 4 +- tests/ui/suggestions/issue-97704.rs | 4 +- tests/ui/suggestions/issue-98500.rs | 2 +- tests/ui/suggestions/issue-98562.rs | 2 +- tests/ui/suggestions/issue-99080.rs | 2 +- tests/ui/suggestions/js-style-comparison-op.fixed | 2 +- tests/ui/suggestions/js-style-comparison-op.rs | 2 +- tests/ui/suggestions/lifetimes/issue-105544.fixed | 2 +- tests/ui/suggestions/lifetimes/issue-105544.rs | 2 +- .../missing-lifetimes-in-signature-2.fixed | 2 +- .../lifetimes/missing-lifetimes-in-signature-2.rs | 2 +- ...ssing-lifetimes-in-signature-before-const.fixed | 2 +- .../missing-lifetimes-in-signature-before-const.rs | 2 +- ...nderscore-lifetime-in-return-trait-object.fixed | 2 +- ...k-underscore-lifetime-in-return-trait-object.rs | 2 +- .../lifetimes/type-param-bound-scope.fixed | 2 +- .../lifetimes/type-param-bound-scope.rs | 2 +- .../lifetimes/type-param-missing-lifetime.fixed | 4 +- .../lifetimes/type-param-missing-lifetime.rs | 4 +- .../ui/suggestions/match-prev-arm-needing-semi.rs | 2 +- .../method-access-to-range-literal-typo.fixed | 2 +- .../method-access-to-range-literal-typo.rs | 2 +- .../missing-assoc-fn-applicable-suggestions.rs | 2 +- .../missing-assoc-type-bound-restriction.rs | 2 +- .../missing-bound-in-derive-copy-impl-2.fixed | 2 +- .../missing-bound-in-derive-copy-impl-2.rs | 2 +- .../missing-bound-in-derive-copy-impl-3.fixed | 2 +- .../missing-bound-in-derive-copy-impl-3.rs | 2 +- .../missing-bound-in-manual-copy-impl-2.fixed | 2 +- .../missing-bound-in-manual-copy-impl-2.rs | 2 +- .../missing-bound-in-manual-copy-impl.fixed | 2 +- .../missing-bound-in-manual-copy-impl.rs | 2 +- .../missing-lifetime-in-assoc-const-type.rs | 2 +- tests/ui/suggestions/missing-lifetime-specifier.rs | 6 +- tests/ui/suggestions/missing-semicolon.fixed | 2 +- tests/ui/suggestions/missing-semicolon.rs | 2 +- tests/ui/suggestions/missing-trait-item.fixed | 2 +- tests/ui/suggestions/missing-trait-item.rs | 2 +- .../missing-type-param-used-in-param.fixed | 2 +- .../missing-type-param-used-in-param.rs | 2 +- tests/ui/suggestions/negative-literal-index.fixed | 2 +- tests/ui/suggestions/negative-literal-index.rs | 2 +- tests/ui/suggestions/no-extern-crate-in-type.rs | 2 +- .../non-existent-field-present-in-subfield.fixed | 2 +- .../non-existent-field-present-in-subfield.rs | 2 +- ...nsafe-trait-should-use-self-2021-without-dyn.rs | 2 +- .../object-unsafe-trait-should-use-self-2021.rs | 2 +- ...bject-unsafe-trait-should-use-where-sized.fixed | 2 +- .../object-unsafe-trait-should-use-where-sized.rs | 2 +- ...uggest-removal-of-conversion-method-calls.fixed | 2 +- ...y-suggest-removal-of-conversion-method-calls.rs | 2 +- tests/ui/suggestions/opaque-type-error.rs | 2 +- tests/ui/suggestions/option-content-move.fixed | 2 +- tests/ui/suggestions/option-content-move.rs | 2 +- tests/ui/suggestions/pattern-slice-vec.fixed | 2 +- tests/ui/suggestions/pattern-slice-vec.rs | 2 +- tests/ui/suggestions/private-field.rs | 2 +- .../ui/suggestions/range-index-instead-of-colon.rs | 2 +- tests/ui/suggestions/raw-byte-string-prefix.rs | 2 +- tests/ui/suggestions/recover-invalid-float.fixed | 2 +- tests/ui/suggestions/recover-invalid-float.rs | 2 +- tests/ui/suggestions/ref-pattern-binding.fixed | 2 +- tests/ui/suggestions/ref-pattern-binding.rs | 2 +- tests/ui/suggestions/shadowed-lplace-method.fixed | 2 +- tests/ui/suggestions/shadowed-lplace-method.rs | 2 +- tests/ui/suggestions/silenced-binding-typo.fixed | 2 +- tests/ui/suggestions/silenced-binding-typo.rs | 2 +- .../ui/suggestions/struct-initializer-comma.fixed | 2 +- tests/ui/suggestions/struct-initializer-comma.rs | 2 +- tests/ui/suggestions/sugg-else-for-closure.fixed | 2 +- tests/ui/suggestions/sugg-else-for-closure.rs | 2 +- ...gest-adding-reference-to-trait-assoc-item.fixed | 2 +- ...suggest-adding-reference-to-trait-assoc-item.rs | 2 +- .../suggestions/suggest-assoc-fn-call-deref.fixed | 2 +- .../ui/suggestions/suggest-assoc-fn-call-deref.rs | 2 +- .../suggest-assoc-fn-call-for-impl-trait.fixed | 2 +- .../suggest-assoc-fn-call-for-impl-trait.rs | 2 +- .../suggest-assoc-fn-call-with-turbofish.fixed | 2 +- .../suggest-assoc-fn-call-with-turbofish.rs | 2 +- .../suggest-assoc-fn-call-without-receiver.fixed | 2 +- .../suggest-assoc-fn-call-without-receiver.rs | 2 +- .../suggest-blanket-impl-local-trait.rs | 2 +- tests/ui/suggestions/suggest-box.fixed | 2 +- tests/ui/suggestions/suggest-box.rs | 2 +- .../ui/suggestions/suggest-boxed-empty-block.fixed | 4 +- tests/ui/suggestions/suggest-boxed-empty-block.rs | 4 +- .../suggestions/suggest-dereferencing-index.fixed | 2 +- .../ui/suggestions/suggest-dereferencing-index.rs | 2 +- .../suggestions/suggest-field-through-deref.fixed | 2 +- .../ui/suggestions/suggest-field-through-deref.rs | 2 +- .../suggest-fn-ptr-for-fn-item-in-fn-ret.fixed | 2 +- .../suggest-fn-ptr-for-fn-item-in-fn-ret.rs | 2 +- .../suggestions/suggest-impl-trait-lifetime.fixed | 2 +- .../ui/suggestions/suggest-impl-trait-lifetime.rs | 2 +- .../suggestions/suggest-let-for-assignment.fixed | 2 +- tests/ui/suggestions/suggest-let-for-assignment.rs | 2 +- .../suggest-mut-method-for-loop-hashmap.fixed | 2 +- .../suggest-mut-method-for-loop-hashmap.rs | 2 +- .../ui/suggestions/suggest-on-bare-closure-call.rs | 2 +- tests/ui/suggestions/suggest-ref-macro.rs | 2 +- tests/ui/suggestions/suggest-remove-deref.fixed | 2 +- tests/ui/suggestions/suggest-remove-deref.rs | 2 +- tests/ui/suggestions/suggest-remove-refs-1.fixed | 2 +- tests/ui/suggestions/suggest-remove-refs-1.rs | 2 +- tests/ui/suggestions/suggest-remove-refs-2.fixed | 2 +- tests/ui/suggestions/suggest-remove-refs-2.rs | 2 +- tests/ui/suggestions/suggest-remove-refs-3.fixed | 2 +- tests/ui/suggestions/suggest-remove-refs-3.rs | 2 +- tests/ui/suggestions/suggest-remove-refs-4.fixed | 2 +- tests/ui/suggestions/suggest-remove-refs-4.rs | 2 +- tests/ui/suggestions/suggest-remove-refs-5.fixed | 2 +- tests/ui/suggestions/suggest-remove-refs-5.rs | 2 +- .../suggestions/suggest-ret-on-async-w-late.fixed | 4 +- .../ui/suggestions/suggest-ret-on-async-w-late.rs | 4 +- .../suggest-semicolon-for-fn-in-extern-block.fixed | 2 +- .../suggest-semicolon-for-fn-in-extern-block.rs | 2 +- tests/ui/suggestions/suggest-slice-swap.fixed | 2 +- tests/ui/suggestions/suggest-slice-swap.rs | 2 +- .../suggestions/suggest-std-when-using-type.fixed | 2 +- .../ui/suggestions/suggest-std-when-using-type.rs | 2 +- ...gest-swapping-self-ty-and-trait-edition-2021.rs | 2 +- .../suggestions/suggest-tryinto-edition-change.rs | 2 +- ...ssing-associated-type-restriction-fixable.fixed | 2 +- ...-missing-associated-type-restriction-fixable.rs | 2 +- tests/ui/suggestions/try-removing-the-field.rs | 2 +- .../type-ascription-instead-of-let.fixed | 2 +- .../suggestions/type-ascription-instead-of-let.rs | 2 +- .../type-ascription-instead-of-method.fixed | 2 +- .../type-ascription-instead-of-method.rs | 2 +- .../type-ascription-instead-of-path-2.fixed | 2 +- .../type-ascription-instead-of-path-2.rs | 2 +- .../type-ascription-instead-of-variant.fixed | 2 +- .../type-ascription-instead-of-variant.rs | 2 +- .../type-mismatch-struct-field-shorthand.fixed | 2 +- .../type-mismatch-struct-field-shorthand.rs | 2 +- tests/ui/suggestions/undeclared-module-alloc.rs | 2 +- .../suggestions/unsized-function-parameter.fixed | 2 +- tests/ui/suggestions/unsized-function-parameter.rs | 2 +- tests/ui/suggestions/use-placement-resolve.fixed | 4 +- tests/ui/suggestions/use-placement-resolve.rs | 4 +- tests/ui/suggestions/use-placement-typeck.fixed | 4 +- tests/ui/suggestions/use-placement-typeck.rs | 4 +- tests/ui/super-fast-paren-parsing.rs | 6 +- tests/ui/super.rs | 4 +- tests/ui/svh-add-nothing.rs | 10 +- tests/ui/svh/changing-crates.rs | 8 +- tests/ui/svh/svh-change-lit.rs | 8 +- tests/ui/svh/svh-change-significant-cfg.rs | 8 +- tests/ui/svh/svh-change-trait-bound.rs | 8 +- tests/ui/svh/svh-change-type-arg.rs | 8 +- tests/ui/svh/svh-change-type-ret.rs | 8 +- tests/ui/svh/svh-change-type-static.rs | 8 +- tests/ui/svh/svh-use-trait.rs | 8 +- tests/ui/swap-1.rs | 2 +- tests/ui/swap-overlapping.rs | 4 +- tests/ui/symbol-mangling-version/bad-value.rs | 8 +- tests/ui/symbol-mangling-version/stable.rs | 6 +- tests/ui/symbol-mangling-version/unstable.rs | 14 +- tests/ui/symbol-names/basic.rs | 8 +- tests/ui/symbol-names/const-generics-demangling.rs | 14 +- .../symbol-names/const-generics-str-demangling.rs | 6 +- .../const-generics-structural-demangling.rs | 6 +- tests/ui/symbol-names/const-generics.rs | 8 +- tests/ui/symbol-names/foreign-types.rs | 4 +- tests/ui/symbol-names/impl1.rs | 10 +- tests/ui/symbol-names/impl2.rs | 2 +- tests/ui/symbol-names/issue-53912.rs | 2 +- tests/ui/symbol-names/issue-60925.rs | 8 +- tests/ui/symbol-names/issue-75326.rs | 10 +- tests/ui/symbol-names/issue-76365.rs | 8 +- tests/ui/symbol-names/trait-objects.rs | 8 +- tests/ui/symbol-names/types.rs | 10 +- tests/ui/symbol-names/verbose.rs | 4 +- tests/ui/symbol-names/x86-stdcall.rs | 8 +- tests/ui/syntax-extension-minor.rs | 2 +- tests/ui/tag-variant-cast-non-nullary.fixed | 2 +- tests/ui/tag-variant-cast-non-nullary.rs | 2 +- tests/ui/tail-call-arg-leak.rs | 4 +- tests/ui/tail-cps.rs | 2 +- tests/ui/tail-typeck.rs | 2 +- tests/ui/target-feature/aarch64-neon-works.rs | 4 +- tests/ui/target-feature/feature-hierarchy.rs | 12 +- tests/ui/target-feature/gate.rs | 2 +- tests/ui/target-feature/invalid-attribute.rs | 2 +- tests/ui/target-feature/missing-plusminus-2.rs | 6 +- tests/ui/target-feature/missing-plusminus.rs | 4 +- tests/ui/target-feature/no-llvm-leaks.rs | 12 +- .../rust-specific-name-no-warnings.rs | 6 +- .../target-feature/similar-feature-suggestion.rs | 6 +- tests/ui/target-feature/tied-features-cli.rs | 22 +-- tests/ui/target-feature/tied-features.rs | 6 +- tests/ui/target-feature/unstable-feature.rs | 6 +- tests/ui/target-feature/wasm-safe.rs | 4 +- .../custom-test-frameworks/issue-107454.rs | 2 +- tests/ui/test-attrs/decl-macro-test.rs | 4 +- tests/ui/test-attrs/inaccessible-test-modules.rs | 2 +- tests/ui/test-attrs/issue-109816.rs | 2 +- tests/ui/test-attrs/issue-12997-1.rs | 2 +- tests/ui/test-attrs/issue-12997-2.rs | 2 +- tests/ui/test-attrs/issue-16597-empty.rs | 4 +- tests/ui/test-attrs/issue-16597.rs | 4 +- tests/ui/test-attrs/issue-20823.rs | 4 +- tests/ui/test-attrs/issue-34932.rs | 4 +- tests/ui/test-attrs/issue-36768.rs | 4 +- tests/ui/test-attrs/issue-52557.rs | 4 +- .../test-attrs/issue-53675-a-test-called-panic.rs | 4 +- tests/ui/test-attrs/run-unexported-tests.rs | 6 +- .../test-attr-non-associated-functions.rs | 2 +- tests/ui/test-attrs/test-cant-be-shadowed.rs | 6 +- tests/ui/test-attrs/test-filter-multiple.rs | 12 +- ...nature-verification-for-explicit-return-type.rs | 6 +- tests/ui/test-attrs/test-function-signature.rs | 2 +- tests/ui/test-attrs/test-main-not-dead-attr.rs | 4 +- tests/ui/test-attrs/test-main-not-dead.rs | 4 +- tests/ui/test-attrs/test-on-not-fn.rs | 2 +- tests/ui/test-attrs/test-panic-abort-disabled.rs | 14 +- tests/ui/test-attrs/test-panic-abort-nocapture.rs | 22 +-- tests/ui/test-attrs/test-panic-abort.rs | 24 +-- tests/ui/test-attrs/test-panic-while-printing.rs | 6 +- tests/ui/test-attrs/test-passed-wasm.rs | 12 +- tests/ui/test-attrs/test-passed.rs | 14 +- .../ui/test-attrs/test-runner-hides-buried-main.rs | 4 +- tests/ui/test-attrs/test-runner-hides-main.rs | 4 +- tests/ui/test-attrs/test-runner-hides-start.rs | 4 +- .../ui/test-attrs/test-should-fail-good-message.rs | 6 +- tests/ui/test-attrs/test-should-panic-attr.rs | 4 +- tests/ui/test-attrs/test-thread-capture.rs | 16 +- tests/ui/test-attrs/test-thread-nocapture.rs | 16 +- tests/ui/test-attrs/test-type.rs | 12 +- tests/ui/test-attrs/test-vs-cfg-test.rs | 4 +- tests/ui/test-attrs/test-warns-dead-code.rs | 2 +- .../ui/test-attrs/tests-listing-format-default.rs | 10 +- ...sts-listing-format-json-without-unstableopts.rs | 10 +- tests/ui/test-attrs/tests-listing-format-json.rs | 16 +- tests/ui/test-attrs/tests-listing-format-terse.rs | 10 +- tests/ui/thir-print/thir-flat-const-variant.rs | 4 +- tests/ui/thir-print/thir-flat.rs | 4 +- tests/ui/thir-print/thir-tree-match.rs | 4 +- tests/ui/thir-print/thir-tree.rs | 4 +- tests/ui/thread-local/auxiliary/tls-rlib.rs | 2 +- tests/ui/thread-local/name-collision.rs | 2 +- tests/ui/thread-local/thread-local-issue-37508.rs | 6 +- .../thread-local-static-ref-use-after-free.rs | 6 +- tests/ui/thread-local/thread-local-static.rs | 2 +- tests/ui/thread-local/tls-dylib-access.rs | 6 +- tests/ui/thread-local/tls.rs | 8 +- tests/ui/threads-sendsync/child-outlives-parent.rs | 6 +- tests/ui/threads-sendsync/clone-with-exterior.rs | 4 +- tests/ui/threads-sendsync/comm.rs | 4 +- tests/ui/threads-sendsync/eprint-on-tls-drop.rs | 6 +- tests/ui/threads-sendsync/issue-24313.rs | 6 +- tests/ui/threads-sendsync/issue-29488.rs | 4 +- tests/ui/threads-sendsync/issue-43733-2.rs | 4 +- tests/ui/threads-sendsync/issue-43733.rs | 2 +- tests/ui/threads-sendsync/issue-4446.rs | 4 +- tests/ui/threads-sendsync/issue-4448.rs | 4 +- tests/ui/threads-sendsync/issue-8827.rs | 4 +- tests/ui/threads-sendsync/issue-9396.rs | 4 +- tests/ui/threads-sendsync/mpsc_stress.rs | 6 +- .../threads-sendsync/send-is-not-static-par-for.rs | 2 +- tests/ui/threads-sendsync/send-resource.rs | 6 +- tests/ui/threads-sendsync/send-type-inference.rs | 4 +- tests/ui/threads-sendsync/send_str_hashmap.rs | 2 +- tests/ui/threads-sendsync/send_str_treemap.rs | 2 +- tests/ui/threads-sendsync/sendable-class.rs | 4 +- tests/ui/threads-sendsync/sendfn-is-a-block.rs | 2 +- .../threads-sendsync/sendfn-spawn-with-fn-arg.rs | 4 +- tests/ui/threads-sendsync/spawn-fn.rs | 4 +- tests/ui/threads-sendsync/spawn-types.rs | 4 +- tests/ui/threads-sendsync/spawn.rs | 4 +- tests/ui/threads-sendsync/spawn2.rs | 4 +- tests/ui/threads-sendsync/spawning-with-debug.rs | 8 +- .../threads-sendsync/std-sync-right-kind-impls.rs | 4 +- tests/ui/threads-sendsync/sync-send-atomics.rs | 4 +- tests/ui/threads-sendsync/sync-send-in-std.rs | 8 +- .../sync-send-iterators-in-libcollections.rs | 2 +- .../sync-send-iterators-in-libcore.rs | 4 +- tests/ui/threads-sendsync/task-comm-0.rs | 4 +- tests/ui/threads-sendsync/task-comm-1.rs | 4 +- tests/ui/threads-sendsync/task-comm-10.rs | 4 +- tests/ui/threads-sendsync/task-comm-11.rs | 6 +- tests/ui/threads-sendsync/task-comm-12.rs | 4 +- tests/ui/threads-sendsync/task-comm-13.rs | 4 +- tests/ui/threads-sendsync/task-comm-14.rs | 4 +- tests/ui/threads-sendsync/task-comm-15.rs | 6 +- tests/ui/threads-sendsync/task-comm-16.rs | 2 +- tests/ui/threads-sendsync/task-comm-17.rs | 6 +- tests/ui/threads-sendsync/task-comm-3.rs | 4 +- tests/ui/threads-sendsync/task-comm-4.rs | 2 +- tests/ui/threads-sendsync/task-comm-5.rs | 2 +- tests/ui/threads-sendsync/task-comm-6.rs | 2 +- tests/ui/threads-sendsync/task-comm-7.rs | 4 +- tests/ui/threads-sendsync/task-comm-9.rs | 4 +- tests/ui/threads-sendsync/task-comm-chan-nil.rs | 2 +- tests/ui/threads-sendsync/task-life-0.rs | 6 +- tests/ui/threads-sendsync/task-spawn-barefn.rs | 6 +- .../threads-sendsync/task-spawn-move-and-copy.rs | 4 +- tests/ui/threads-sendsync/task-stderr.rs | 6 +- tests/ui/threads-sendsync/tcp-stress.rs | 10 +- .../threads-sendsync/test-tasks-invalid-value.rs | 10 +- .../threads-sendsync/thread-local-extern-static.rs | 6 +- tests/ui/threads-sendsync/thread-local-syntax.rs | 2 +- tests/ui/threads-sendsync/threads.rs | 4 +- .../tls-dtors-are-run-in-a-static-binary.rs | 6 +- tests/ui/threads-sendsync/tls-init-on-init.rs | 4 +- tests/ui/threads-sendsync/tls-try-with.rs | 4 +- tests/ui/threads-sendsync/trivial-message.rs | 2 +- tests/ui/threads-sendsync/unwind-resource.rs | 6 +- tests/ui/threads-sendsync/yield.rs | 4 +- tests/ui/threads-sendsync/yield1.rs | 4 +- tests/ui/threads-sendsync/yield2.rs | 2 +- tests/ui/tool-attributes/diagnostic_item2.rs | 2 +- tests/ui/tool-attributes/diagnostic_item3.rs | 2 +- tests/ui/tool-attributes/duplicate-diagnostic.rs | 8 +- tests/ui/tool_lints-rpass.rs | 2 +- tests/ui/tool_lints_2018_preview.rs | 2 +- tests/ui/track-diagnostics/track.rs | 14 +- tests/ui/track-diagnostics/track2.rs | 6 +- tests/ui/track-diagnostics/track3.rs | 6 +- tests/ui/track-diagnostics/track4.rs | 6 +- tests/ui/track-diagnostics/track5.rs | 6 +- tests/ui/track-diagnostics/track6.rs | 6 +- tests/ui/trailing-comma.rs | 4 +- tests/ui/trait-bounds/issue-75961.rs | 2 +- tests/ui/trait-bounds/issue-93008.rs | 4 +- tests/ui/trait-bounds/issue-94680.rs | 2 +- tests/ui/trait-bounds/issue-94999.rs | 2 +- tests/ui/trait-bounds/issue-95640.rs | 4 +- .../restrict-assoc-type-of-generic-bound.fixed | 2 +- .../restrict-assoc-type-of-generic-bound.rs | 2 +- .../shadowed-path-in-trait-bound-suggestion.fixed | 2 +- .../shadowed-path-in-trait-bound-suggestion.rs | 2 +- tests/ui/trait-impl-bound-suggestions.fixed | 2 +- tests/ui/trait-impl-bound-suggestions.rs | 2 +- tests/ui/traits/alias/basic.rs | 2 +- tests/ui/traits/alias/bounds.rs | 2 +- tests/ui/traits/alias/cross-crate.rs | 2 +- tests/ui/traits/alias/import-cross-crate.rs | 4 +- tests/ui/traits/alias/import.rs | 2 +- .../issue-107747-do-not-assemble-supertraits.rs | 2 +- .../alias/issue-60021-assoc-method-resolve.rs | 2 +- tests/ui/traits/alias/issue-60755.rs | 2 +- .../alias/issue-72415-assoc-const-resolve.rs | 2 +- tests/ui/traits/alias/issue-75983.rs | 2 +- tests/ui/traits/alias/maybe-bound.rs | 2 +- tests/ui/traits/alias/object-wf.rs | 2 +- tests/ui/traits/alias/object.rs | 2 +- tests/ui/traits/alias/style_lint.rs | 2 +- .../suggest-trait-alias-instead-of-type.fixed | 2 +- .../alias/suggest-trait-alias-instead-of-type.rs | 2 +- tests/ui/traits/alias/syntax.rs | 2 +- tests/ui/traits/alignment-gep-tup-like-1.rs | 2 +- tests/ui/traits/anon-static-method.rs | 2 +- tests/ui/traits/anon_trait_static_method_exe.rs | 4 +- tests/ui/traits/assignability-trait.rs | 2 +- tests/ui/traits/assoc-type-in-supertrait.rs | 2 +- .../check-trait-object-bounds-2-ok.rs | 2 +- .../associated_type_bound/impl-is-shadowed.rs | 2 +- .../ui/traits/associated_type_bound/issue-51446.rs | 2 +- tests/ui/traits/astconv-cycle-between-and-type.rs | 4 +- tests/ui/traits/augmented-assignments-trait.rs | 2 +- tests/ui/traits/bound/basic.rs | 4 +- tests/ui/traits/bound/generic_trait.rs | 2 +- .../ui/traits/bound/impl-comparison-duplicates.rs | 4 +- tests/ui/traits/bound/in-arc.rs | 4 +- tests/ui/traits/bound/multiple.rs | 4 +- tests/ui/traits/bound/not-on-bare-trait-2021.rs | 2 +- .../ui/traits/bound/on-structs-and-enums-rpass.rs | 4 +- tests/ui/traits/bound/on-structs-and-enums-xc.rs | 2 +- tests/ui/traits/bound/on-structs-and-enums-xc1.rs | 2 +- tests/ui/traits/bound/recursion.rs | 4 +- tests/ui/traits/bound/same-crate-name.rs | 4 +- tests/ui/traits/bug-7183-generics.rs | 2 +- tests/ui/traits/bug-7295.rs | 4 +- tests/ui/traits/cache-issue-18209.rs | 4 +- tests/ui/traits/coercion-generic.rs | 2 +- tests/ui/traits/coercion.rs | 2 +- tests/ui/traits/composition-trivial.rs | 4 +- tests/ui/traits/conditional-dispatch.rs | 2 +- tests/ui/traits/conditional-model-fn.rs | 4 +- tests/ui/traits/conservative_impl_trait.rs | 2 +- tests/ui/traits/copy-is-not-modulo-regions.rs | 4 +- tests/ui/traits/copy-requires-self-wf.rs | 2 +- tests/ui/traits/cycle-generic-bound.rs | 4 +- tests/ui/traits/cycle-type-trait.rs | 4 +- tests/ui/traits/default-method/auxiliary/xc_2.rs | 2 +- tests/ui/traits/default-method/bound-subst.rs | 2 +- tests/ui/traits/default-method/bound-subst2.rs | 2 +- tests/ui/traits/default-method/bound-subst3.rs | 2 +- tests/ui/traits/default-method/bound-subst4.rs | 2 +- tests/ui/traits/default-method/bound.rs | 2 +- tests/ui/traits/default-method/macro.rs | 2 +- tests/ui/traits/default-method/mut.rs | 4 +- tests/ui/traits/default-method/self.rs | 2 +- tests/ui/traits/default-method/supervtable.rs | 2 +- tests/ui/traits/default-method/trivial.rs | 2 +- tests/ui/traits/default-method/xc-2.rs | 6 +- tests/ui/traits/default-method/xc.rs | 4 +- tests/ui/traits/deny-builtin-object-impl.rs | 4 +- tests/ui/traits/dyn-trait.rs | 2 +- tests/ui/traits/early-vtbl-resolution.rs | 4 +- tests/ui/traits/elaborate-type-region.rs | 2 +- .../false-ambiguity-where-clause-builtin-bound.rs | 4 +- tests/ui/traits/fmt-pointer-trait.rs | 2 +- tests/ui/traits/generic.rs | 2 +- tests/ui/traits/ice-with-dyn-pointee.rs | 2 +- tests/ui/traits/impl-2.rs | 4 +- tests/ui/traits/impl-evaluation-order.rs | 2 +- tests/ui/traits/impl-implicit-trait.rs | 4 +- tests/ui/traits/impl-inherent-prefer-over-trait.rs | 2 +- tests/ui/traits/impl-object-overlap-issue-23853.rs | 2 +- tests/ui/traits/impl.rs | 4 +- .../traits/impl_trait_as_trait_return_position.rs | 2 +- tests/ui/traits/infer-from-object-issue-26952.rs | 2 +- tests/ui/traits/inherent-method-order.rs | 2 +- tests/ui/traits/inheritance/auto-xc-2.rs | 4 +- tests/ui/traits/inheritance/auto-xc.rs | 4 +- tests/ui/traits/inheritance/auto.rs | 2 +- tests/ui/traits/inheritance/basic.rs | 2 +- .../ui/traits/inheritance/call-bound-inherited.rs | 2 +- .../ui/traits/inheritance/call-bound-inherited2.rs | 2 +- .../inheritance/cast-without-call-to-supertrait.rs | 2 +- tests/ui/traits/inheritance/cast.rs | 2 +- tests/ui/traits/inheritance/cross-trait-call-xc.rs | 4 +- tests/ui/traits/inheritance/cross-trait-call.rs | 2 +- tests/ui/traits/inheritance/diamond.rs | 2 +- tests/ui/traits/inheritance/multiple-inheritors.rs | 2 +- tests/ui/traits/inheritance/multiple-params.rs | 2 +- tests/ui/traits/inheritance/num.rs | 4 +- tests/ui/traits/inheritance/num0.rs | 4 +- tests/ui/traits/inheritance/num1.rs | 4 +- tests/ui/traits/inheritance/num2.rs | 2 +- tests/ui/traits/inheritance/num3.rs | 2 +- tests/ui/traits/inheritance/num5.rs | 4 +- tests/ui/traits/inheritance/overloading-simple.rs | 2 +- tests/ui/traits/inheritance/overloading-xc-exe.rs | 4 +- tests/ui/traits/inheritance/overloading.rs | 2 +- tests/ui/traits/inheritance/repeated-supertrait.rs | 2 +- tests/ui/traits/inheritance/self-in-supertype.rs | 2 +- tests/ui/traits/inheritance/self.rs | 2 +- tests/ui/traits/inheritance/simple.rs | 2 +- tests/ui/traits/inheritance/static.rs | 2 +- tests/ui/traits/inheritance/static2.rs | 2 +- tests/ui/traits/inheritance/subst.rs | 2 +- tests/ui/traits/inheritance/subst2.rs | 2 +- tests/ui/traits/inheritance/visibility.rs | 2 +- tests/ui/traits/issue-103563.rs | 2 +- tests/ui/traits/issue-104322.rs | 2 +- tests/ui/traits/issue-18412.rs | 2 +- tests/ui/traits/issue-22019.rs | 4 +- tests/ui/traits/issue-22110.rs | 4 +- tests/ui/traits/issue-22655.rs | 4 +- tests/ui/traits/issue-23003-overflow.rs | 2 +- tests/ui/traits/issue-23003.rs | 4 +- tests/ui/traits/issue-23825.rs | 2 +- tests/ui/traits/issue-24010.rs | 6 +- tests/ui/traits/issue-26339.rs | 2 +- tests/ui/traits/issue-33096.rs | 4 +- tests/ui/traits/issue-3683.rs | 2 +- tests/ui/traits/issue-38033.rs | 2 +- tests/ui/traits/issue-40085.rs | 2 +- tests/ui/traits/issue-4107.rs | 2 +- tests/ui/traits/issue-43132.rs | 2 +- .../issue-5008-borrowed-traitobject-method-call.rs | 2 +- tests/ui/traits/issue-52893.rs | 2 +- tests/ui/traits/issue-56202.rs | 2 +- tests/ui/traits/issue-56488.rs | 2 +- tests/ui/traits/issue-58344.rs | 2 +- tests/ui/traits/issue-59029-2.rs | 2 +- tests/ui/traits/issue-6128.rs | 2 +- tests/ui/traits/issue-6334.rs | 2 +- tests/ui/traits/issue-66768.rs | 2 +- tests/ui/traits/issue-68295.rs | 2 +- tests/ui/traits/issue-70944.rs | 2 +- tests/ui/traits/issue-72455.rs | 2 +- tests/ui/traits/issue-77982.rs | 2 +- tests/ui/traits/issue-78632.rs | 2 +- tests/ui/traits/issue-82830.rs | 2 +- tests/ui/traits/issue-84399-bad-fresh-caching.rs | 4 +- tests/ui/traits/issue-85360-eval-obligation-ice.rs | 2 +- tests/ui/traits/issue-89119.rs | 4 +- tests/ui/traits/issue-90195-2.rs | 2 +- tests/ui/traits/issue-90195.rs | 2 +- tests/ui/traits/issue-90662-projection-caching.rs | 6 +- tests/ui/traits/issue-91949-hangs-on-recursion.rs | 12 +- tests/ui/traits/issue-92292.rs | 2 +- tests/ui/traits/issue-9394-inherited-calls.rs | 2 +- tests/ui/traits/issue-95311.rs | 2 +- tests/ui/traits/issue-95898.rs | 2 +- tests/ui/traits/issue-96664.rs | 2 +- tests/ui/traits/issue-96665.rs | 2 +- .../ui/traits/issue-97695-double-trivial-bound.rs | 4 +- tests/ui/traits/item-inside-macro.rs | 2 +- tests/ui/traits/kindck-owned-contains-1.rs | 2 +- tests/ui/traits/monad.rs | 2 +- .../monomorphized-callees-with-ty-params-3314.rs | 4 +- ...ultidispatch-conditional-impl-not-considered.rs | 2 +- .../traits/multidispatch-infer-convert-target.rs | 2 +- tests/ui/traits/multidispatch1.rs | 2 +- tests/ui/traits/multidispatch2.rs | 2 +- .../opaque-type-unsatisfied-bound.rs | 2 +- .../opaque-type-unsatisfied-fn-bound.rs | 2 +- tests/ui/traits/negative-bounds/supertrait.rs | 2 +- tests/ui/traits/negative-impls/eager-mono.rs | 4 +- .../negative-impls/negated-auto-traits-rpass.rs | 2 +- .../traits/negative-impls/negative-impls-basic.rs | 2 +- .../negative-specializes-negative.rs | 2 +- .../rely-on-negative-impl-in-coherence.rs | 4 +- .../traits/next-solver/alias-bound-preference.rs | 6 +- tests/ui/traits/next-solver/alias-bound-unsound.rs | 2 +- .../next-solver/alias-eq-in-canonical-response.rs | 4 +- .../alias_eq_cant_be_furthur_normalized.rs | 4 +- ...alias_eq_dont_use_normalizes_to_if_substs_eq.rs | 4 +- .../next-solver/alias-relate/alias_eq_simple.rs | 4 +- .../alias_eq_substs_eq_not_intercrate.rs | 2 +- .../alias-relate/deeply-nested-no-hang.rs | 4 +- .../opaque-hidden-ty-is-rigid-alias.rs | 4 +- .../next-solver/alias-relate/tait-eq-proj-2.rs | 4 +- .../next-solver/alias-relate/tait-eq-proj.rs | 4 +- .../next-solver/alias-relate/tait-eq-tait.rs | 4 +- tests/ui/traits/next-solver/alias-sub.rs | 4 +- tests/ui/traits/next-solver/array-default.rs | 4 +- .../assembly/ambig-projection-self-is-ambig.rs | 4 +- .../assemble-normalizing-self-ty-impl-ambiguity.rs | 4 +- .../assembly/runaway-impl-candidate-selection.rs | 2 +- tests/ui/traits/next-solver/async.rs | 8 +- .../next-solver/auto-with-drop_tracking_mir.rs | 8 +- tests/ui/traits/next-solver/borrowck-error.rs | 2 +- .../next-solver/builtin-fn-must-return-sized.rs | 2 +- .../canonical-int-var-eq-in-response.rs | 4 +- .../next-solver/canonical-ty-var-eq-in-response.rs | 4 +- .../traits/next-solver/canonicalize-effect-var.rs | 4 +- .../cast-checks-handling-projections.rs | 4 +- .../next-solver/closure-inference-guidance.rs | 4 +- .../next-solver/closure-signature-inference-2.rs | 4 +- .../next-solver/closure-signature-inference.rs | 4 +- .../traits/next-solver/closure-substs-ambiguity.rs | 4 +- .../coerce-ambig-alias-to-rigid-alias.rs | 4 +- .../traits/next-solver/coherence/issue-102048.rs | 2 +- .../trait_ref_is_knowable-norm-overflow.rs | 2 +- .../trait_ref_is_knowable-normalization-1.rs | 4 +- .../trait_ref_is_knowable-normalization-2.rs | 4 +- .../trait_ref_is_knowable-normalization-3.rs | 4 +- .../traits/next-solver/const-param-placeholder.rs | 6 +- tests/ui/traits/next-solver/coroutine.rs | 8 +- .../coinduction/fixpoint-exponential-growth.rs | 2 +- .../coinduction/incompleteness-unstable-result.rs | 2 +- .../cycles/double-cycle-inductive-coinductive.rs | 2 +- .../cycles/fixpoint-rerun-all-cycle-heads.rs | 2 +- .../next-solver/cycles/inductive-cycle-but-err.rs | 2 +- .../next-solver/cycles/inductive-cycle-but-ok.rs | 4 +- ...tive-cycle-discarded-coinductive-constraints.rs | 4 +- .../next-solver/cycles/inductive-fixpoint-hang.rs | 2 +- .../next-solver/cycles/inductive-not-on-stack.rs | 2 +- .../cycles/leak-check-coinductive-cycle.rs | 4 +- .../ui/traits/next-solver/cycles/mixed-cycles-1.rs | 2 +- .../ui/traits/next-solver/cycles/mixed-cycles-2.rs | 2 +- .../cycles/provisional-cache-impacts-behavior.rs | 4 +- .../next-solver/cycles/provisional-result-done.rs | 4 +- ...deduce-closure-signature-after-normalization.rs | 2 +- .../ui/traits/next-solver/deduce-ty-from-object.rs | 4 +- tests/ui/traits/next-solver/dedup-regions.rs | 4 +- tests/ui/traits/next-solver/destruct.rs | 4 +- .../traits/next-solver/dont-coerce-infer-to-dyn.rs | 4 +- .../next-solver/dont-elaborate-for-projections.rs | 4 +- .../next-solver/dont-ice-on-assoc-projection.rs | 2 +- .../dont-loop-fulfill-on-region-constraints.rs | 4 +- .../next-solver/dont-normalize-proj-with-error.rs | 2 +- .../traits/next-solver/dont-remap-tait-substs.rs | 4 +- .../dont-type_of-tait-in-defining-scope.rs | 4 +- .../traits/next-solver/dyn-any-dont-prefer-impl.rs | 4 +- .../ui/traits/next-solver/elaborate-item-bounds.rs | 4 +- .../env-shadows-impls/ambig-env-no-shadow.rs | 4 +- .../discard-impls-shadowed-by-env-1.rs | 4 +- .../discard-impls-shadowed-by-env-2.rs | 6 +- .../discard-impls-shadowed-by-env-3.rs | 4 +- ...rmalizes_to_ignores_unnormalizable_candidate.rs | 2 +- .../param-candidate-shadows-project.rs | 2 +- .../next-solver/equating-projection-cyclically.rs | 4 +- ...caping-bound-vars-in-writeback-normalization.rs | 4 +- tests/ui/traits/next-solver/float-canonical.rs | 4 +- tests/ui/traits/next-solver/fn-trait-closure.rs | 4 +- tests/ui/traits/next-solver/fn-trait.rs | 2 +- .../generalize-proj-new-universe-index-1.rs | 4 +- .../generalize-proj-new-universe-index-2.rs | 4 +- .../generalize/occurs-check-nested-alias.rs | 8 +- .../traits/next-solver/higher-ranked-dyn-bounds.rs | 4 +- tests/ui/traits/next-solver/int-var-alias-eq.rs | 4 +- tests/ui/traits/next-solver/int-var-is-send.rs | 4 +- .../traits/next-solver/issue-118950-root-region.rs | 2 +- .../traits/next-solver/iter-filter-projection.rs | 4 +- .../next-solver/lazy-nested-obligations-1.rs | 4 +- .../next-solver/lazy-nested-obligations-2.rs | 4 +- .../next-solver/lazy-nested-obligations-3.rs | 4 +- .../member-constraints-in-root-universe.rs | 4 +- tests/ui/traits/next-solver/more-object-bound.rs | 2 +- .../next-solver/negative-coherence-bounds.rs | 2 +- tests/ui/traits/next-solver/nested-alias-bound.rs | 4 +- .../nested-obligations-with-bound-vars-gat.rs | 4 +- .../normalize-async-closure-in-trait.rs | 6 +- .../ui/traits/next-solver/normalize-param-env-1.rs | 4 +- .../ui/traits/next-solver/normalize-param-env-2.rs | 4 +- .../ui/traits/next-solver/normalize-param-env-3.rs | 4 +- .../ui/traits/next-solver/normalize-param-env-4.rs | 8 +- .../next-solver/normalize-path-for-method.rs | 4 +- .../next-solver/normalize-rcvr-for-inherent.rs | 4 +- .../next-solver/normalize-region-obligations.rs | 6 +- .../normalize-type-outlives-in-param-env.rs | 4 +- .../traits/next-solver/normalize-type-outlives.rs | 2 +- .../ui/traits/next-solver/normalize-unsize-rhs.rs | 4 +- .../next-solver/normalized-const-built-in-op.rs | 4 +- .../object-soundness-requires-generalization.rs | 4 +- tests/ui/traits/next-solver/object-unsafety.rs | 2 +- .../next-solver/opportunistic-region-resolve.rs | 4 +- .../overflow/exponential-trait-goals.rs | 2 +- .../ui/traits/next-solver/overflow/global-cache.rs | 2 +- .../recursion-limit-normalizes-to-constraints.rs | 4 +- .../overflow/recursion-limit-zero-issue-115351.rs | 4 +- .../overflow/recursive-self-normalization-2.rs | 2 +- .../overflow/recursive-self-normalization.rs | 2 +- tests/ui/traits/next-solver/param-discr-kind.rs | 4 +- tests/ui/traits/next-solver/pointee.rs | 4 +- tests/ui/traits/next-solver/pointer-like.rs | 2 +- .../next-solver/prefer-candidate-no-constraints.rs | 4 +- .../next-solver/prefer-param-env-on-ambiguity.rs | 4 +- .../ui/traits/next-solver/projection-discr-kind.rs | 2 +- .../projection/param-env-trait-candidate-1.rs | 4 +- .../projection/param-env-trait-candidate-2.rs | 4 +- .../ui/traits/next-solver/slice-match-byte-lit.rs | 4 +- .../traits/next-solver/specialization-transmute.rs | 2 +- .../next-solver/specialization-unconstrained.rs | 2 +- .../traits/next-solver/stall-num-var-auto-trait.rs | 6 +- .../traits/next-solver/structural-resolve-field.rs | 4 +- .../trait-upcast-lhs-needs-normalization.rs | 4 +- tests/ui/traits/next-solver/try-example.rs | 4 +- ...wo-projection-param-candidates-are-ambiguous.rs | 2 +- .../unevaluated-const-impl-trait-ref.rs | 6 +- .../traits/next-solver/unsafe-auto-trait-impl.rs | 4 +- .../next-solver/unsize-although-ambiguous.rs | 4 +- tests/ui/traits/next-solver/unsize-good.rs | 4 +- .../next-solver/unsound-region-obligation.rs | 2 +- tests/ui/traits/next-solver/upcast-right-substs.rs | 4 +- tests/ui/traits/next-solver/upcast-wrong-substs.rs | 2 +- .../next-solver/winnow-specializing-impls.rs | 4 +- tests/ui/traits/non-lifetime-via-dyn-builtin.rs | 6 +- tests/ui/traits/non_lifetime_binders/basic.rs | 2 +- .../non_lifetime_binders/bounds-on-type-binders.rs | 2 +- .../disqualifying-object-candidates.rs | 2 +- .../traits/non_lifetime_binders/drop-impl-pred.rs | 4 +- .../ui/traits/non_lifetime_binders/method-probe.rs | 2 +- .../object-lifetime-default-for-late.rs | 4 +- tests/ui/traits/non_lifetime_binders/on-rpit.rs | 2 +- .../placeholders-dont-outlive-static.rs | 4 +- .../sized-late-bound-issue-114872.rs | 2 +- .../type-match-with-late-bound.rs | 4 +- .../unifying-placeholders-in-query-response-2.rs | 6 +- .../unifying-placeholders-in-query-response.rs | 6 +- tests/ui/traits/normalize-supertrait.rs | 2 +- tests/ui/traits/object-one-type-two-traits.rs | 2 +- tests/ui/traits/object/auto-dedup.rs | 2 +- tests/ui/traits/object/bounds-cycle-1.rs | 2 +- tests/ui/traits/object/bounds-cycle-2.rs | 2 +- tests/ui/traits/object/bounds-cycle-3.rs | 2 +- tests/ui/traits/object/bounds-cycle-4.rs | 2 +- tests/ui/traits/object/exclusion.rs | 2 +- tests/ui/traits/object/generics.rs | 2 +- .../traits/object/issue-33140-traitobject-crate.rs | 2 +- tests/ui/traits/object/lifetime-first.rs | 2 +- tests/ui/traits/object/print_vtable_sizes.rs | 4 +- tests/ui/traits/object/with-lifetime-bound.rs | 2 +- .../object/with-self-in-projection-output-good.rs | 2 +- ...elf-in-projection-output-repeated-supertrait.rs | 2 +- ...ects-owned-object-borrowed-method-headerless.rs | 2 +- .../ui/traits/operator-overloading-issue-52025.rs | 4 +- .../traits/overlap-permitted-for-marker-traits.rs | 2 +- tests/ui/traits/parameterized-with-bounds.rs | 4 +- tests/ui/traits/pointee-deduction.rs | 2 +- tests/ui/traits/pointee-normalize-equate.rs | 6 +- tests/ui/traits/pointee-tail-is-generic-errors.rs | 2 +- tests/ui/traits/pointee-tail-is-generic.rs | 4 +- tests/ui/traits/principal-less-objects.rs | 2 +- tests/ui/traits/privacy.rs | 2 +- tests/ui/traits/project-modulo-regions.rs | 2 +- tests/ui/traits/region-pointer-simple.rs | 2 +- .../traits/reservation-impl/coherence-conflict.rs | 4 +- tests/ui/traits/reservation-impl/no-use.rs | 4 +- tests/ui/traits/reservation-impl/non-lattice-ok.rs | 6 +- tests/ui/traits/reservation-impl/ok.rs | 6 +- tests/ui/traits/safety-ok-cc.rs | 4 +- tests/ui/traits/safety-ok.rs | 2 +- tests/ui/traits/safety-trait-impl-cc.rs | 2 +- .../solver-cycles/inductive-canonical-cycle.rs | 2 +- tests/ui/traits/static-method-overwriting.rs | 2 +- tests/ui/traits/static-outlives-a-where-clause.rs | 2 +- .../traits/suggest-dereferences/issue-39029.fixed | 2 +- .../ui/traits/suggest-dereferences/issue-39029.rs | 2 +- .../traits/suggest-dereferences/issue-62530.fixed | 2 +- .../ui/traits/suggest-dereferences/issue-62530.rs | 2 +- .../traits/suggest-dereferences/multiple-0.fixed | 2 +- tests/ui/traits/suggest-dereferences/multiple-0.rs | 2 +- .../suggest-dereferences/root-obligation.fixed | 2 +- .../traits/suggest-dereferences/root-obligation.rs | 2 +- .../suggest-dereferencing-receiver-argument.fixed | 2 +- .../suggest-dereferencing-receiver-argument.rs | 2 +- tests/ui/traits/suggest-fully-qualified-closure.rs | 8 +- tests/ui/traits/superdefault-generics.rs | 2 +- tests/ui/traits/syntax-polarity.rs | 4 +- tests/ui/traits/to-str.rs | 2 +- .../trait-upcasting/add-supertrait-auto-traits.rs | 6 +- tests/ui/traits/trait-upcasting/basic.rs | 2 +- .../correct-supertrait-substitution.rs | 2 +- tests/ui/traits/trait-upcasting/diamond.rs | 2 +- .../ui/traits/trait-upcasting/fewer-associated.rs | 6 +- .../trait-upcasting/illegal-upcast-from-impl.rs | 4 +- .../issue-11515-upcast-fn_mut-fn.rs | 2 +- tests/ui/traits/trait-upcasting/issue-11515.rs | 4 +- tests/ui/traits/trait-upcasting/lifetime.rs | 2 +- .../migrate-lint-different-substs.rs | 2 +- .../multiple-occurrence-ambiguousity.rs | 2 +- tests/ui/traits/trait-upcasting/normalization.rs | 6 +- tests/ui/traits/trait-upcasting/replace-vptr.rs | 2 +- tests/ui/traits/trait-upcasting/struct.rs | 2 +- .../traits/trait-upcasting/type-checking-test-1.rs | 4 +- .../trait-upcasting/upcast-through-struct-tail.rs | 4 +- tests/ui/traits/trivial_impl3.rs | 2 +- tests/ui/traits/trivial_impl4.rs | 2 +- tests/ui/traits/typeclasses-eq-example-static.rs | 2 +- tests/ui/traits/typeclasses-eq-example.rs | 2 +- tests/ui/traits/ufcs-object.rs | 2 +- tests/ui/traits/unsend-future.rs | 2 +- tests/ui/traits/upcast_soundness_bug.rs | 4 +- tests/ui/traits/use-before-def.rs | 4 +- tests/ui/traits/vtable/issue-91807.rs | 4 +- tests/ui/traits/vtable/multiple-markers.rs | 2 +- tests/ui/traits/vtable/vtable-diamond.rs | 2 +- tests/ui/traits/vtable/vtable-multi-level.rs | 2 +- tests/ui/traits/vtable/vtable-multiple.rs | 2 +- tests/ui/traits/vtable/vtable-non-object-safe.rs | 2 +- tests/ui/traits/vtable/vtable-vacant.rs | 2 +- tests/ui/traits/wf-object/reverse-order.rs | 2 +- tests/ui/traits/where-clause-vs-impl.rs | 4 +- tests/ui/traits/with-bounds-default.rs | 2 +- tests/ui/traits/with-dst.rs | 2 +- .../abstraction/abstracted_assume.rs | 2 +- .../abstraction/const_generic_fn.rs | 2 +- tests/ui/transmutability/alignment/align-fail.rs | 2 +- tests/ui/transmutability/alignment/align-pass.rs | 2 +- .../arrays/should_have_correct_length.rs | 2 +- .../arrays/should_inherit_alignment.rs | 2 +- .../enums/should_order_correctly.rs | 2 +- tests/ui/transmutability/issue-110467.rs | 2 +- tests/ui/transmutability/issue-110892.rs | 2 +- tests/ui/transmutability/primitives/bool-mut.rs | 4 +- tests/ui/transmutability/primitives/bool.rs | 4 +- tests/ui/transmutability/primitives/numbers.rs | 4 +- tests/ui/transmutability/primitives/unit.rs | 4 +- .../recursive-wrapper-types-bit-compatible-mut.rs | 2 +- .../recursive-wrapper-types-bit-compatible.rs | 2 +- .../recursive-wrapper-types-bit-incompatible.rs | 2 +- .../references/recursive-wrapper-types.rs | 2 +- tests/ui/transmutability/references/u8-to-unit.rs | 2 +- .../transmutability/references/unit-to-itself.rs | 2 +- tests/ui/transmutability/references/unit-to-u8.rs | 2 +- .../structs/repr/should_handle_align.rs | 2 +- .../structs/repr/should_handle_packed.rs | 2 +- .../structs/should_order_fields_correctly.rs | 2 +- tests/ui/transmutability/unions/boolish.rs | 2 +- .../unions/repr/should_handle_align.rs | 2 +- .../unions/repr/should_handle_packed.rs | 2 +- ...d_permit_intersecting_if_validity_is_assumed.rs | 2 +- .../should_accept_if_dst_has_private_field.rs | 2 +- .../should_accept_if_dst_has_private_variant.rs | 2 +- ...d_accept_if_dst_has_tricky_unreachable_field.rs | 2 +- .../should_accept_if_dst_has_unreachable_field.rs | 2 +- .../should_accept_if_src_has_private_field.rs | 2 +- .../should_accept_if_src_has_private_variant.rs | 2 +- .../should_accept_if_src_has_unreachable_field.rs | 2 +- ...d_reject_if_dst_has_tricky_unreachable_field.rs | 2 +- tests/ui/transmute-equal-assoc-types.rs | 2 +- tests/ui/transmute-non-immediate-to-immediate.rs | 4 +- tests/ui/transmute/lifetimes.rs | 2 +- tests/ui/transmute/main.rs | 4 +- tests/ui/transmute/transmute-different-sizes.rs | 2 +- tests/ui/transmute/transmute-fat-pointers.rs | 2 +- tests/ui/transmute/transmute-impl.rs | 2 +- tests/ui/treat-err-as-bug/err.rs | 14 +- .../ui/treat-err-as-bug/panic-causes-oom-112708.rs | 10 +- tests/ui/treat-err-as-bug/span_delayed_bug.rs | 14 +- .../issue-73021-impossible-inline.rs | 6 +- ...ial-bounds-inconsistent-associated-functions.rs | 4 +- .../trivial-bounds-inconsistent-copy.rs | 2 +- .../trivial-bounds-inconsistent-projection.rs | 2 +- .../trivial-bounds-inconsistent-sized.rs | 2 +- .../trivial-bounds-inconsistent-well-formed.rs | 2 +- .../trivial-bounds/trivial-bounds-inconsistent.rs | 2 +- tests/ui/trivial-bounds/trivial-bounds-object.rs | 2 +- tests/ui/trivial_casts-rpass.rs | 2 +- tests/ui/try-block/issue-45124.rs | 4 +- tests/ui/try-block/try-block-bad-lifetime.rs | 2 +- tests/ui/try-block/try-block-bad-type.rs | 2 +- tests/ui/try-block/try-block-catch.rs | 2 +- tests/ui/try-block/try-block-in-edition2015.rs | 2 +- tests/ui/try-block/try-block-in-match-arm.rs | 4 +- tests/ui/try-block/try-block-in-match.rs | 4 +- tests/ui/try-block/try-block-in-return.rs | 4 +- tests/ui/try-block/try-block-in-while.rs | 2 +- tests/ui/try-block/try-block-maybe-bad-lifetime.rs | 2 +- tests/ui/try-block/try-block-opt-init.rs | 2 +- tests/ui/try-block/try-block-type-error.rs | 2 +- .../try-block/try-block-unreachable-code-lint.rs | 4 +- tests/ui/try-block/try-block-unused-delims.fixed | 6 +- tests/ui/try-block/try-block-unused-delims.rs | 6 +- tests/ui/try-block/try-block.rs | 4 +- .../ui/try-block/try-is-identifier-edition2015.rs | 4 +- tests/ui/try-from-int-error-partial-eq.rs | 2 +- tests/ui/try-operator-hygiene.rs | 2 +- tests/ui/try-operator.rs | 2 +- tests/ui/try-trait/try-as-monad.rs | 2 +- tests/ui/try-trait/try-on-option-diagnostics.rs | 2 +- tests/ui/try-trait/try-operator-custom.rs | 2 +- tests/ui/try-trait/try-poll.rs | 2 +- tests/ui/try-trait/yeet-for-option.rs | 2 +- tests/ui/try-trait/yeet-for-result.rs | 2 +- tests/ui/tuple/builtin.rs | 2 +- tests/ui/tuple/index-float.rs | 2 +- tests/ui/tuple/indexing-in-macro.rs | 2 +- tests/ui/tuple/nested-index.rs | 2 +- tests/ui/tuple/one-tuple.rs | 2 +- tests/ui/tuple/tup.rs | 2 +- tests/ui/tuple/tuple-index-fat-types.rs | 2 +- tests/ui/tuple/tuple-index.rs | 2 +- tests/ui/tydesc-name.rs | 2 +- .../enum-variant-generic-args-pass.rs | 2 +- tests/ui/type-alias-enum-variants/issue-57866.rs | 2 +- .../issue-61801-path-pattern-can-infer.rs | 2 +- ...ssue-63151-dead-code-lint-fields-in-patterns.rs | 2 +- .../type-alias-enum-variants-pass.rs | 2 +- tests/ui/type-alias-impl-trait/argument-types.rs | 2 +- .../type-alias-impl-trait/assoc-projection-ice.rs | 2 +- tests/ui/type-alias-impl-trait/assoc-type-const.rs | 6 +- .../type-alias-impl-trait/assoc-type-lifetime.rs | 2 +- .../associated-type-alias-impl-trait.rs | 2 +- .../associated-type-impl-trait-lifetime.rs | 2 +- .../ui/type-alias-impl-trait/auto-trait-leakage.rs | 2 +- .../auxiliary/collect_hidden_types.rs | 2 +- tests/ui/type-alias-impl-trait/bound_reduction.rs | 2 +- tests/ui/type-alias-impl-trait/bounds.rs | 2 +- tests/ui/type-alias-impl-trait/broken_mir.rs | 4 +- tests/ui/type-alias-impl-trait/closure_args.rs | 2 +- tests/ui/type-alias-impl-trait/closure_args2.rs | 2 +- tests/ui/type-alias-impl-trait/closure_infer.rs | 2 +- .../type-alias-impl-trait/closure_parent_substs.rs | 2 +- .../type-alias-impl-trait/closure_wf_outlives.rs | 2 +- tests/ui/type-alias-impl-trait/coherence.rs | 2 +- .../type-alias-impl-trait/coherence_cross_crate.rs | 2 +- .../coherence_generalization.rs | 2 +- .../type-alias-impl-trait/collect_hidden_types.rs | 6 +- tests/ui/type-alias-impl-trait/cross_crate_ice.rs | 4 +- tests/ui/type-alias-impl-trait/cross_crate_ice2.rs | 4 +- tests/ui/type-alias-impl-trait/cross_inference.rs | 6 +- .../cross_inference_pattern_bug.rs | 4 +- .../cross_inference_pattern_bug_no_type.rs | 6 +- .../type-alias-impl-trait/cross_inference_rpit.rs | 2 +- .../ui/type-alias-impl-trait/debug-ty-with-weak.rs | 4 +- .../defined-by-user-annotation.rs | 2 +- .../defining-use-submodule.rs | 2 +- .../destructure_tait-ice-113594.rs | 4 +- .../destructure_tait-layout_of-ice-113594.rs | 4 +- tests/ui/type-alias-impl-trait/destructuring.rs | 2 +- .../different_defining_uses_never_type2.rs | 2 +- .../drop-shim-relates-opaque-issue-114375.rs | 6 +- ...uplicate-lifetimes-from-rpit-containing-tait.rs | 2 +- ...plicate-lifetimes-from-rpit-containing-tait2.rs | 4 +- tests/ui/type-alias-impl-trait/field-types.rs | 2 +- tests/ui/type-alias-impl-trait/future.rs | 4 +- .../generic_duplicate_param_use10.rs | 2 +- .../generic_duplicate_param_use7.rs | 2 +- .../generic_lifetime_param.rs | 2 +- .../hidden_behind_struct_field.rs | 2 +- .../type-alias-impl-trait/higher_kinded_params.rs | 4 +- .../type-alias-impl-trait/higher_kinded_params2.rs | 2 +- .../type-alias-impl-trait/higher_kinded_params3.rs | 2 +- .../impl_trait_for_generic_tait.rs | 2 +- .../type-alias-impl-trait/impl_trait_for_tait.rs | 4 +- .../impl_trait_in_trait_defined_outside_trait3.rs | 2 +- tests/ui/type-alias-impl-trait/implied_bounds2.rs | 2 +- tests/ui/type-alias-impl-trait/implied_bounds3.rs | 2 +- .../implied_lifetime_wf_check.rs | 4 +- .../imply_bounds_from_bounds.rs | 2 +- .../indirect-recursion-issue-112047.rs | 4 +- tests/ui/type-alias-impl-trait/issue-101750.rs | 2 +- tests/ui/type-alias-impl-trait/issue-104817.rs | 4 +- tests/ui/type-alias-impl-trait/issue-109054.rs | 2 +- .../issue-53398-cyclic-types.rs | 2 +- .../issue-53678-coroutine-and-const-fn.rs | 2 +- .../issue-55099-lifetime-inference.rs | 2 +- .../issue-57188-associate-impl-capture.rs | 2 +- .../issue-57611-trait-alias.rs | 2 +- .../issue-57807-associated-type.rs | 2 +- .../issue-58662-coroutine-with-lifetime.rs | 2 +- .../issue-58662-simplified.rs | 2 +- tests/ui/type-alias-impl-trait/issue-58887.rs | 2 +- tests/ui/type-alias-impl-trait/issue-58951-2.rs | 2 +- tests/ui/type-alias-impl-trait/issue-58951.rs | 2 +- .../type-alias-impl-trait/issue-60564-working.rs | 2 +- tests/ui/type-alias-impl-trait/issue-60662.rs | 4 +- tests/ui/type-alias-impl-trait/issue-60662.stdout | 4 +- .../issue-62000-associate-impl-trait-lifetimes.rs | 2 +- .../issue-63263-closure-return.rs | 2 +- tests/ui/type-alias-impl-trait/issue-63355.rs | 2 +- .../issue-63677-type-alias-coherence.rs | 2 +- .../issue-65679-inst-opaque-ty-from-val-twice.rs | 2 +- tests/ui/type-alias-impl-trait/issue-65918.rs | 2 +- .../issue-66580-closure-coherence.rs | 2 +- .../issue-67844-nested-opaque.rs | 2 +- .../issue-69136-inner-lifetime-resolve-ok.rs | 2 +- tests/ui/type-alias-impl-trait/issue-69323.rs | 2 +- tests/ui/type-alias-impl-trait/issue-72793.rs | 4 +- .../issue-76202-trait-impl-for-tait.rs | 6 +- tests/ui/type-alias-impl-trait/issue-78450.rs | 6 +- .../issue-84660-trait-impl-for-tait.rs | 2 +- .../issue-87455-static-lifetime-ice.rs | 2 +- tests/ui/type-alias-impl-trait/issue-89686.rs | 2 +- tests/ui/type-alias-impl-trait/issue-89952.rs | 2 +- tests/ui/type-alias-impl-trait/issue-93411.rs | 4 +- .../issue-96572-unconstrained.rs | 6 +- tests/ui/type-alias-impl-trait/issue-98604.rs | 2 +- .../itiat-allow-nested-closures.rs | 4 +- .../ui/type-alias-impl-trait/match-unification.rs | 2 +- .../multiple-def-uses-in-one-fn-pass.rs | 2 +- .../type-alias-impl-trait/multiple_definitions.rs | 2 +- .../mututally-recursive-overflow.rs | 4 +- .../nested-rpit-with-lifetimes.rs | 2 +- .../nested_impl_trait_in_assoc_ty.rs | 4 +- .../ui/type-alias-impl-trait/nested_in_closure.rs | 2 +- .../nested_inference_failure.rs | 6 +- .../never_reveal_concrete_type.rs | 2 +- .../type-alias-impl-trait/normalize-alias-type.rs | 4 +- .../normalize-hidden-types.rs | 8 +- .../ui/type-alias-impl-trait/not_well_formed.fixed | 2 +- tests/ui/type-alias-impl-trait/not_well_formed.rs | 2 +- tests/ui/type-alias-impl-trait/obligation_ice.rs | 2 +- .../ui/type-alias-impl-trait/outlives-bound-var.rs | 2 +- tests/ui/type-alias-impl-trait/privacy.rs | 2 +- .../rpit_tait_equality_in_canonical_query.rs | 26 +-- .../rpit_tait_equality_in_canonical_query_2.rs | 2 +- .../ui/type-alias-impl-trait/self-referential-2.rs | 6 +- .../ui/type-alias-impl-trait/self-referential-3.rs | 2 +- .../ui/type-alias-impl-trait/self-referential-4.rs | 2 +- tests/ui/type-alias-impl-trait/self-referential.rs | 2 +- tests/ui/type-alias-impl-trait/self_implication.rs | 2 +- .../ui/type-alias-impl-trait/static-const-types.rs | 2 +- .../struct-assignment-validity.rs | 4 +- tests/ui/type-alias-impl-trait/tait-normalize.rs | 2 +- .../type-alias-impl-trait-assoc-dyn.rs | 2 +- .../type-alias-impl-trait-assoc-impl-trait.rs | 2 +- .../type-alias-impl-trait-const.rs | 2 +- .../type-alias-impl-trait-fns.rs | 2 +- .../type-alias-impl-trait-sized.rs | 2 +- .../type-alias-impl-trait-struct.rs | 2 +- .../type-alias-impl-trait-tuple.rs | 6 +- .../type-alias-impl-trait/type-alias-impl-trait.rs | 2 +- .../type-alias-impl-trait2.rs | 2 +- .../type-alias-nested-impl-trait.rs | 2 +- tests/ui/type-alias-impl-trait/type_of_a_let.rs | 6 +- .../type-alias-impl-trait/unbounded_opaque_type.rs | 2 +- .../type-alias-impl-trait/unused_generic_param.rs | 2 +- .../ui/type-alias-impl-trait/weird-return-types.rs | 4 +- tests/ui/type-alias-impl-trait/wf-check-fn-ptrs.rs | 2 +- .../wf-check-rpit-lifetimes.rs | 2 +- .../type-alias-impl-trait/wf-in-associated-type.rs | 10 +- tests/ui/type-alias-impl-trait/wf-nested.rs | 8 +- tests/ui/type-alias/issue-14933.rs | 4 +- tests/ui/type-alias/issue-37515.rs | 2 +- tests/ui/type-id-higher-rank-2.rs | 2 +- .../generalize-subtyped-variables.rs | 2 +- .../issue-113283-alllocator-trait-eq.rs | 2 +- tests/ui/type-namespace.rs | 2 +- tests/ui/type-param-constraints.rs | 4 +- tests/ui/type-param.rs | 4 +- tests/ui/type-ptr.rs | 4 +- tests/ui/type-use-i1-versus-i8.rs | 4 +- tests/ui/type/ascription/issue-47666.fixed | 2 +- tests/ui/type/ascription/issue-47666.rs | 2 +- tests/ui/type/ascription/issue-54516.fixed | 2 +- tests/ui/type/ascription/issue-54516.rs | 2 +- tests/ui/type/ascription/issue-60933.fixed | 2 +- tests/ui/type/ascription/issue-60933.rs | 2 +- ...ssue-67690-type-alias-bound-diagnostic-crash.rs | 2 +- tests/ui/type/issue-91268.rs | 2 +- tests/ui/type/issue-94187-verbose-type-name.rs | 8 +- tests/ui/type/missing-let-in-binding-2.fixed | 2 +- tests/ui/type/missing-let-in-binding-2.rs | 2 +- tests/ui/type/missing-let-in-binding.fixed | 2 +- tests/ui/type/missing-let-in-binding.rs | 2 +- tests/ui/type/subtyping-opaque-type.rs | 4 +- tests/ui/type/type-alias-bounds.rs | 2 +- tests/ui/type/type-arg-out-of-scope.rs | 2 +- tests/ui/type/type-ascription-with-fn-call.fixed | 2 +- tests/ui/type/type-ascription-with-fn-call.rs | 2 +- tests/ui/type/type-ascription.rs | 2 +- .../type-check/coerce-result-return-value.fixed | 2 +- .../type/type-check/coerce-result-return-value.rs | 2 +- .../ui/type/type-check/point-at-inference-3.fixed | 2 +- tests/ui/type/type-check/point-at-inference-3.rs | 2 +- tests/ui/type/type-check/point-at-inference.fixed | 2 +- tests/ui/type/type-check/point-at-inference.rs | 2 +- tests/ui/type/type-mismatch-same-crate-name.rs | 4 +- tests/ui/type/type-unsatisfiable.rs | 6 +- tests/ui/type/verbose.rs | 4 +- tests/ui/type_length_limit.rs | 8 +- tests/ui/typeck/assign-non-lval-derefmut.fixed | 2 +- tests/ui/typeck/assign-non-lval-derefmut.rs | 2 +- tests/ui/typeck/assign-non-lval-mut-ref.fixed | 2 +- tests/ui/typeck/assign-non-lval-mut-ref.rs | 2 +- tests/ui/typeck/auxiliary/xcrate-issue-61711-b.rs | 2 +- tests/ui/typeck/issue-100164.fixed | 2 +- tests/ui/typeck/issue-100164.rs | 2 +- tests/ui/typeck/issue-103899.rs | 8 +- tests/ui/typeck/issue-104510-ice.rs | 4 +- tests/ui/typeck/issue-107775.rs | 2 +- ...sue-110017-format-into-help-deletes-macro.fixed | 2 +- .../issue-110017-format-into-help-deletes-macro.rs | 2 +- ...sue-112007-leaked-writeln-macro-internals.fixed | 2 +- .../issue-112007-leaked-writeln-macro-internals.rs | 2 +- .../typeck/issue-112252-ptr-arithmetics-help.fixed | 2 +- .../ui/typeck/issue-112252-ptr-arithmetics-help.rs | 2 +- tests/ui/typeck/issue-116864.rs | 6 +- tests/ui/typeck/issue-18937-1.rs | 2 +- tests/ui/typeck/issue-2063-resource.rs | 2 +- tests/ui/typeck/issue-2063.rs | 2 +- tests/ui/typeck/issue-22375.rs | 2 +- tests/ui/typeck/issue-29181.rs | 2 +- tests/ui/typeck/issue-36708.rs | 2 +- tests/ui/typeck/issue-43189.rs | 6 +- tests/ui/typeck/issue-46112.rs | 4 +- ...e-55810-must-typeck-match-pats-before-guards.rs | 2 +- .../issue-61711-once-caused-rustc-inf-loop.rs | 8 +- .../issue-68590-reborrow-through-derefmut.rs | 2 +- .../issue-72225-call-fnmut-through-derefmut.rs | 2 +- .../issue-73592-borrow_mut-through-deref.fixed | 4 +- .../typeck/issue-73592-borrow_mut-through-deref.rs | 4 +- tests/ui/typeck/issue-74933.rs | 2 +- tests/ui/typeck/issue-80207-unsized-return.rs | 2 +- tests/ui/typeck/issue-81943.rs | 2 +- tests/ui/typeck/issue-82772.rs | 2 +- tests/ui/typeck/issue-86721-return-expr-ice.rs | 2 +- tests/ui/typeck/issue-88609.rs | 2 +- tests/ui/typeck/issue-88803-call-expr-method.fixed | 2 +- tests/ui/typeck/issue-88803-call-expr-method.rs | 2 +- .../typeck/issue-89044-wrapped-expr-method.fixed | 2 +- tests/ui/typeck/issue-89044-wrapped-expr-method.rs | 2 +- tests/ui/typeck/issue-89856.fixed | 2 +- tests/ui/typeck/issue-89856.rs | 2 +- tests/ui/typeck/issue-89935.rs | 2 +- .../issue-90027-async-fn-return-suggestion.rs | 2 +- .../issue-90483-inaccessible-field-adjustment.rs | 2 +- tests/ui/typeck/issue-91210-ptr-method.fixed | 2 +- tests/ui/typeck/issue-91210-ptr-method.rs | 2 +- tests/ui/typeck/issue-91328.fixed | 2 +- tests/ui/typeck/issue-91328.rs | 2 +- tests/ui/typeck/issue-91334.rs | 2 +- tests/ui/typeck/issue-91633.rs | 2 +- tests/ui/typeck/issue-92481.rs | 2 +- tests/ui/typeck/output-type-mismatch.rs | 2 +- .../ui/typeck/pin-unsound-issue-85099-derefmut.rs | 4 +- tests/ui/typeck/prim-with-args.fixed | 2 +- tests/ui/typeck/prim-with-args.rs | 2 +- tests/ui/typeck/project-cache-issue-37154.rs | 2 +- .../typeck/ptr-null-mutability-suggestions.fixed | 2 +- tests/ui/typeck/ptr-null-mutability-suggestions.rs | 2 +- tests/ui/typeck/remove-extra-argument.fixed | 2 +- tests/ui/typeck/remove-extra-argument.rs | 2 +- ...ing-missing-zero-to-floating-point-number.fixed | 2 +- ...adding-missing-zero-to-floating-point-number.rs | 2 +- .../suggest-box-on-divergent-if-else-arms.fixed | 2 +- .../suggest-box-on-divergent-if-else-arms.rs | 2 +- tests/ui/typeck/typeck-closure-to-unsafe-fn-ptr.rs | 2 +- .../typeck-default-trait-impl-assoc-type.fixed | 2 +- .../typeck/typeck-default-trait-impl-assoc-type.rs | 2 +- ...eck-default-trait-impl-cross-crate-coherence.rs | 2 +- tests/ui/typeck/typeck-fn-to-unsafe-fn-ptr.rs | 2 +- tests/ui/typeck/typeck_type_placeholder_1.rs | 2 +- tests/ui/typeck/ufcs-type-params.rs | 4 +- tests/ui/typeck/unify-return-ty.rs | 4 +- tests/ui/typeck/while-type-error.rs | 2 +- tests/ui/typeck/wrong-ret-type.rs | 2 +- tests/ui/typeid-intrinsic.rs | 6 +- tests/ui/typestate-multi-decl.rs | 2 +- tests/ui/ufcs/ufcs-polymorphic-paths.rs | 2 +- tests/ui/unboxed-closures/issue-18652.rs | 2 +- tests/ui/unboxed-closures/issue-18661.rs | 4 +- tests/ui/unboxed-closures/issue-53448.rs | 2 +- tests/ui/unboxed-closures/type-id-higher-rank.rs | 2 +- .../unboxed-closures-all-traits.rs | 2 +- .../unboxed-closures-blanket-fn-mut.rs | 2 +- .../unboxed-closures-blanket-fn.rs | 2 +- .../ui/unboxed-closures/unboxed-closures-boxed.rs | 2 +- .../ui/unboxed-closures/unboxed-closures-by-ref.rs | 2 +- .../unboxed-closures-call-fn-autoderef.rs | 2 +- .../unboxed-closures-call-sugar-autoderef.rs | 2 +- ...unboxed-closures-call-sugar-object-autoderef.rs | 2 +- .../unboxed-closures-call-sugar-object.rs | 2 +- .../unboxed-closures-counter-not-moved.rs | 2 +- .../unboxed-closures-cross-crate.rs | 4 +- .../unboxed-closures-direct-sugary-call.rs | 4 +- tests/ui/unboxed-closures/unboxed-closures-drop.rs | 2 +- .../unboxed-closures-extern-fn-hr.rs | 2 +- .../unboxed-closures/unboxed-closures-extern-fn.rs | 2 +- .../unboxed-closures-fn-as-fnmut-and-fnonce.rs | 2 +- .../unboxed-closures-fnmut-as-fnonce.rs | 2 +- .../unboxed-closures/unboxed-closures-generic.rs | 2 +- ...closures-infer-arg-types-from-expected-bound.rs | 4 +- ...es-infer-arg-types-from-expected-object-type.rs | 4 +- ...r-arg-types-w-bound-regs-from-expected-bound.rs | 4 +- .../unboxed-closures-infer-explicit-call-early.rs | 2 +- .../unboxed-closures-infer-fnmut-calling-fnmut.rs | 2 +- .../unboxed-closures-infer-fnmut-move.rs | 2 +- .../unboxed-closures-infer-fnmut.rs | 2 +- .../unboxed-closures-infer-fnonce-move.rs | 2 +- .../unboxed-closures-infer-fnonce.rs | 2 +- .../unboxed-closures-infer-kind.rs | 2 +- .../unboxed-closures-infer-recursive-fn.rs | 2 +- .../unboxed-closures-infer-upvar.rs | 2 +- .../unboxed-closures-manual-impl.rs | 2 +- .../unboxed-closures-monomorphization.rs | 2 +- ...ed-closures-move-from-projection-issue-30046.rs | 2 +- .../unboxed-closures-move-mutable.rs | 4 +- ...-closures-move-some-upvars-in-by-ref-closure.rs | 2 +- .../unboxed-closures/unboxed-closures-prelude.rs | 4 +- .../ui/unboxed-closures/unboxed-closures-simple.rs | 2 +- .../unboxed-closures-single-word-env.rs | 2 +- .../unboxed-closures-static-call-fn-once.rs | 4 +- .../unboxed-closures-sugar-object.rs | 2 +- .../unboxed-closures-unique-type-id.rs | 4 +- .../unboxed-closures/unboxed-closures-zero-args.rs | 4 +- tests/ui/underscore-imports/auxiliary/duplicate.rs | 4 +- tests/ui/underscore-imports/basic.rs | 4 +- tests/ui/underscore-imports/cycle.rs | 2 +- tests/ui/underscore-imports/duplicate.rs | 4 +- tests/ui/underscore-imports/hygiene-2.rs | 2 +- tests/ui/underscore-imports/hygiene.rs | 2 +- tests/ui/underscore-imports/intercrate.rs | 4 +- tests/ui/underscore-imports/macro-expanded.rs | 2 +- tests/ui/underscore-imports/unused-2018.rs | 2 +- ...e-clause-inherent-impl-ampersand-rust2015.fixed | 2 +- ...here-clause-inherent-impl-ampersand-rust2015.rs | 2 +- ...e-clause-inherent-impl-ampersand-rust2018.fixed | 4 +- ...here-clause-inherent-impl-ampersand-rust2018.rs | 4 +- .../where-clause-inherent-impl-underscore.rs | 4 +- .../where-clause-trait-impl-region-2015.fixed | 2 +- .../where-clause-trait-impl-region-2015.rs | 2 +- .../where-clause-trait-impl-region-2018.fixed | 4 +- .../where-clause-trait-impl-region-2018.rs | 4 +- .../where-clause-trait-impl-underscore.rs | 4 +- tests/ui/underscore-lifetimes.rs | 2 +- tests/ui/underscore-method-after-integer.rs | 2 +- tests/ui/uniform-paths/auxiliary/issue-53691.rs | 2 +- tests/ui/uniform-paths/basic-nested.rs | 4 +- tests/ui/uniform-paths/basic.rs | 4 +- tests/ui/uniform-paths/issue-53691.rs | 4 +- tests/ui/uniform-paths/macros-nested.rs | 4 +- tests/ui/uniform-paths/macros.rs | 4 +- tests/ui/uniform-paths/same-crate.rs | 4 +- tests/ui/uninhabited/diverging-guard.rs | 2 +- .../exhaustive-wo-nevertype-issue-51221.rs | 2 +- tests/ui/uninhabited/issue-107505.rs | 4 +- .../uninhabited/privately-uninhabited-dead-code.rs | 2 +- tests/ui/uninhabited/projection.rs | 2 +- tests/ui/uninhabited/uninhabited-enum-cast.rs | 2 +- tests/ui/uninhabited/uninhabited-irrefutable.rs | 2 +- tests/ui/uninit-empty-types.rs | 4 +- tests/ui/union/issue-99375.rs | 2 +- tests/ui/union/projection-as-union-type.rs | 2 +- tests/ui/union/union-align.rs | 2 +- tests/ui/union/union-backcomp.rs | 2 +- tests/ui/union/union-basic.rs | 4 +- tests/ui/union/union-const-codegen.rs | 2 +- tests/ui/union/union-const-eval-field.rs | 2 +- tests/ui/union/union-const-eval.rs | 2 +- tests/ui/union/union-derive-rpass.rs | 2 +- tests/ui/union/union-drop-assign.rs | 2 +- tests/ui/union/union-drop.rs | 2 +- tests/ui/union/union-generic-rpass.rs | 2 +- tests/ui/union/union-inherent-method.rs | 2 +- tests/ui/union/union-macro.rs | 2 +- tests/ui/union/union-manuallydrop-rpass.rs | 2 +- tests/ui/union/union-nodrop.rs | 2 +- tests/ui/union/union-nonzero.rs | 2 +- tests/ui/union/union-overwrite.rs | 2 +- tests/ui/union/union-packed.rs | 2 +- tests/ui/union/union-pat-refutability.rs | 2 +- tests/ui/union/union-trait-impl.rs | 2 +- tests/ui/union/union-transmute.rs | 2 +- tests/ui/unit.rs | 4 +- tests/ui/unknown-llvm-arg.rs | 6 +- .../allow-unknown-unstable-lint-command-line.rs | 4 +- .../allow-unknown-unstable-lint-inline.rs | 2 +- .../deny-unstable-lint-command-line.rs | 8 +- .../deny-unstable-lint-inline.rs | 2 +- .../warn-unknown-unstable-lint-command-line.rs | 8 +- .../warn-unknown-unstable-lint-inline.rs | 2 +- tests/ui/unnamed_argument_mode.rs | 4 +- tests/ui/unpretty/ast-const-trait-bound.rs | 4 +- tests/ui/unpretty/ast-const-trait-bound.stdout | 4 +- tests/ui/unpretty/avoid-crash.rs | 4 +- tests/ui/unpretty/bad-literal.rs | 4 +- tests/ui/unpretty/bad-literal.stdout | 4 +- tests/ui/unpretty/box.rs | 4 +- tests/ui/unpretty/box.stdout | 4 +- tests/ui/unpretty/flattened-format-args.rs | 4 +- tests/ui/unpretty/flattened-format-args.stdout | 4 +- tests/ui/unpretty/mir-unpretty.rs | 2 +- tests/ui/unpretty/pretty-let-else.rs | 4 +- tests/ui/unpretty/pretty-let-else.stdout | 4 +- tests/ui/unpretty/unpretty-expr-fn-arg.rs | 4 +- tests/ui/unpretty/unpretty-expr-fn-arg.stdout | 4 +- tests/ui/unreachable-code-1.rs | 2 +- tests/ui/unreachable-code.rs | 2 +- ...resolved-import-avoid-suggesting-global-path.rs | 4 +- ...d-import-suggest-disambiguated-crate-name.fixed | 8 +- ...lved-import-suggest-disambiguated-crate-name.rs | 8 +- tests/ui/unsafe/const_pat_in_layout_restricted.rs | 2 +- .../unsafe/edition-2024-unsafe_op_in_unsafe_fn.rs | 6 +- tests/ui/unsafe/inline_asm.rs | 2 +- tests/ui/unsafe/issue-106126-good-path-bug.rs | 4 +- ...-unsafe-op-in-let-under-unsafe-under-closure.rs | 2 +- tests/ui/unsafe/issue-87414-query-cycle.rs | 2 +- tests/ui/unsafe/new-unsafe-pointers.rs | 4 +- tests/ui/unsafe/ranged_ints_macro.rs | 2 +- tests/ui/unsafe/union-modification.rs | 2 +- tests/ui/unsafe/union_access_through_block.rs | 2 +- tests/ui/unsafe/union_destructure.rs | 2 +- tests/ui/unsafe/union_wild_or_wild.rs | 2 +- .../unsafe-around-compiler-generated-unsafe.rs | 2 +- .../ui/unsafe/unsafe-fn-called-from-unsafe-blk.rs | 4 +- tests/ui/unsafe/unsafe-fn-called-from-unsafe-fn.rs | 4 +- tests/ui/unsafe/unsafe-pointer-assignability.rs | 2 +- .../unsafe_op_in_unsafe_fn/edition_2024_default.rs | 6 +- .../wrapping-unsafe-block-sugg.fixed | 4 +- .../wrapping-unsafe-block-sugg.rs | 4 +- tests/ui/unsized-locals/align.rs | 2 +- tests/ui/unsized-locals/autoderef.rs | 2 +- tests/ui/unsized-locals/box-fnonce.rs | 2 +- .../by-value-trait-object-safety-rpass.rs | 2 +- .../by-value-trait-object-safety-withdefault.rs | 2 +- .../ui/unsized-locals/reference-unsized-locals.rs | 2 +- tests/ui/unsized-locals/simple-unsized-locals.rs | 2 +- tests/ui/unsized-locals/unsized-exprs-rpass.rs | 2 +- tests/ui/unsized-locals/unsized-exprs3.rs | 2 +- tests/ui/unsized-locals/unsized-index.rs | 2 +- tests/ui/unsized-locals/unsized-parameters.rs | 2 +- tests/ui/unsized/issue-115203.rs | 2 +- tests/ui/unsized/issue-115809.rs | 2 +- tests/ui/unsized/issue-40231-1.rs | 2 +- tests/ui/unsized/issue-40231-2.rs | 2 +- tests/ui/unsized/issue-71659.rs | 4 +- tests/ui/unsized/issue-75899-but-gats.rs | 2 +- tests/ui/unsized/issue-75899.rs | 6 +- tests/ui/unsized/issue-97732.rs | 2 +- tests/ui/unsized/maybe-bounds-where-cpass.rs | 2 +- tests/ui/unsized/unchanged-param.rs | 2 +- .../unsized/unsize-coerce-multiple-adt-params.rs | 2 +- tests/ui/unsized/unsized-fn-arg.fixed | 2 +- tests/ui/unsized/unsized-fn-arg.rs | 2 +- tests/ui/unsized/unsized-tuple-impls.rs | 2 +- tests/ui/unsized/unsized.rs | 2 +- tests/ui/unsized/unsized2.rs | 2 +- tests/ui/unsized/unsized3-rpass.rs | 2 +- tests/ui/unused-crate-deps/auxiliary/foo.rs | 4 +- tests/ui/unused-crate-deps/deny-attr.rs | 4 +- .../unused-crate-deps/deny-cmdline-json-silent.rs | 8 +- tests/ui/unused-crate-deps/deny-cmdline-json.rs | 6 +- tests/ui/unused-crate-deps/deny-cmdline.rs | 6 +- .../ui/unused-crate-deps/ignore-pathless-extern.rs | 8 +- tests/ui/unused-crate-deps/libfib.rs | 6 +- tests/ui/unused-crate-deps/lint-group.rs | 4 +- tests/ui/unused-crate-deps/suppress.rs | 6 +- tests/ui/unused-crate-deps/test-use-ok.rs | 8 +- tests/ui/unused-crate-deps/unused-aliases.rs | 8 +- .../ui/unused-crate-deps/use_extern_crate_2015.rs | 6 +- tests/ui/unused-crate-deps/warn-attr.rs | 6 +- tests/ui/unused-crate-deps/warn-cmdline-json.rs | 8 +- tests/ui/unused-crate-deps/warn-cmdline-static.rs | 10 +- tests/ui/unused-crate-deps/warn-cmdline.rs | 8 +- tests/ui/unused-move-capture.rs | 4 +- tests/ui/unused-move.rs | 4 +- tests/ui/unwind-abis/feature-gate-c_unwind.rs | 2 +- tests/ui/unwind-abis/ffi-unwind-calls-lint.rs | 4 +- tests/ui/unwind-no-uwtable.rs | 8 +- tests/ui/use-import-export.rs | 4 +- tests/ui/use-keyword-2.rs | 2 +- tests/ui/use-module-level-int-consts.rs | 2 +- tests/ui/use-nested-groups.rs | 2 +- .../use/auxiliary/extern-use-primitive-type-lib.rs | 2 +- tests/ui/use/issue-18986.rs | 2 +- .../use/issue-60976-extern-use-primitive-type.rs | 4 +- tests/ui/use/use-from-trait-xc.rs | 2 +- tests/ui/use/use-meta-mismatch.rs | 2 +- tests/ui/use/use.rs | 4 +- tests/ui/using-target-feature-unstable.rs | 6 +- tests/ui/utf8-bom.rs | 2 +- tests/ui/utf8_idents.rs | 2 +- .../variance-intersection-of-ref-and-opt-ref.rs | 2 +- tests/ui/variance/variance-iterators-in-libcore.rs | 2 +- .../variance-use-contravariant-struct-2.rs | 2 +- .../ui/variance/variance-use-covariant-struct-2.rs | 2 +- tests/ui/variants/variant-namespacing.rs | 2 +- tests/ui/wait-forked-but-failed-child.rs | 12 +- tests/ui/wasm/simd-to-array-80108.rs | 6 +- tests/ui/wasm/wasm-custom-section-relocations.rs | 2 +- tests/ui/wasm/wasm-hang-issue-76281.rs | 6 +- tests/ui/weak-new-uninhabited-issue-48493.rs | 2 +- tests/ui/weird-exit-code.rs | 2 +- tests/ui/weird-exprs.rs | 2 +- tests/ui/wf/hir-wf-canonicalized.rs | 2 +- tests/ui/wf/hir-wf-check-erase-regions.rs | 2 +- tests/ui/wf/issue-48638.rs | 2 +- .../wf/unnormalized-projection-guides-inference.rs | 2 +- tests/ui/wf/wf-in-where-clause-static.rs | 4 +- tests/ui/wf/wf-normalization-sized.rs | 4 +- tests/ui/where-clauses/higher-ranked-fn-type.rs | 4 +- tests/ui/where-clauses/issue-50825-1.rs | 2 +- tests/ui/where-clauses/issue-50825.rs | 2 +- .../where-clauses/self-in-where-clause-allowed.rs | 2 +- .../where-clause-bounds-inconsistency.rs | 4 +- .../where-clause-early-bound-lifetimes.rs | 4 +- .../where-clause-method-substituion-rpass.rs | 4 +- ...where-clause-placement-assoc-type-in-impl.fixed | 4 +- .../where-clause-placement-assoc-type-in-impl.rs | 4 +- ...here-clause-placement-assoc-type-in-trait.fixed | 4 +- .../where-clause-placement-assoc-type-in-trait.rs | 4 +- .../where-clause-placement-type-alias.rs | 2 +- .../where-clauses/where-clause-region-outlives.rs | 4 +- .../ui/where-clauses/where-clauses-cross-crate.rs | 4 +- tests/ui/where-clauses/where-clauses-lifetimes.rs | 4 +- tests/ui/where-clauses/where-clauses-method.rs | 2 +- .../where-clauses-unboxed-closures.rs | 4 +- tests/ui/where-clauses/where-clauses.rs | 2 +- tests/ui/windows-subsystem-invalid.rs | 2 +- tests/ui/write-fmt-errors.rs | 2 +- tests/ui/wrong-hashset-issue-42918.rs | 4 +- tests/ui/xcrate/xcrate-private-by-default.rs | 2 +- tests/ui/xcrate/xcrate-unit-struct-2.rs | 6 +- tests/ui/xcrate/xcrate-unit-struct.rs | 2 +- tests/ui/zero-sized/zero-size-type-destructors.rs | 2 +- tests/ui/zero-sized/zero-sized-binary-heap-push.rs | 2 +- tests/ui/zero-sized/zero-sized-btreemap-insert.rs | 2 +- tests/ui/zero-sized/zero-sized-linkedlist-push.rs | 2 +- tests/ui/zero-sized/zero-sized-tuple-struct.rs | 2 +- 9925 files changed, 16401 insertions(+), 16401 deletions(-) diff --git a/tests/ui/abi/abi-sysv64-arg-passing.rs b/tests/ui/abi/abi-sysv64-arg-passing.rs index c87353b93a7..04942e984a8 100644 --- a/tests/ui/abi/abi-sysv64-arg-passing.rs +++ b/tests/ui/abi/abi-sysv64-arg-passing.rs @@ -1,4 +1,4 @@ -// run-pass +//@ run-pass // Checks if the "sysv64" calling convention behaves the same as the // "C" calling convention on platforms where both should be the same @@ -24,10 +24,10 @@ // issue-62350-sysv-neg-reg-counts // struct-return -// ignore-android -// ignore-arm -// ignore-aarch64 -// ignore-windows +//@ ignore-android +//@ ignore-arm +//@ ignore-aarch64 +//@ ignore-windows // note: windows is ignored as rust_test_helpers does not have the sysv64 abi on windows diff --git a/tests/ui/abi/abi-sysv64-register-usage.rs b/tests/ui/abi/abi-sysv64-register-usage.rs index 39330693677..d2fb2ae53ac 100644 --- a/tests/ui/abi/abi-sysv64-register-usage.rs +++ b/tests/ui/abi/abi-sysv64-register-usage.rs @@ -1,11 +1,11 @@ -// run-pass +//@ run-pass // Checks if the correct registers are being used to pass arguments // when the sysv64 ABI is specified. -// ignore-android -// ignore-arm -// ignore-aarch64 -// needs-asm-support +//@ ignore-android +//@ ignore-arm +//@ ignore-aarch64 +//@ needs-asm-support #[cfg(target_arch = "x86_64")] pub extern "sysv64" fn all_the_registers( diff --git a/tests/ui/abi/anon-extern-mod.rs b/tests/ui/abi/anon-extern-mod.rs index 6c7d60d4cb0..692cb0850b9 100644 --- a/tests/ui/abi/anon-extern-mod.rs +++ b/tests/ui/abi/anon-extern-mod.rs @@ -1,6 +1,6 @@ -// run-pass -// pretty-expanded FIXME #23616 -// ignore-wasm32-bare no libc to test ffi with +//@ run-pass +//@ pretty-expanded FIXME #23616 +//@ ignore-wasm32-bare no libc to test ffi with #![feature(rustc_private)] diff --git a/tests/ui/abi/arm-unadjusted-intrinsic.rs b/tests/ui/abi/arm-unadjusted-intrinsic.rs index 33ea7927526..7a728d4b241 100644 --- a/tests/ui/abi/arm-unadjusted-intrinsic.rs +++ b/tests/ui/abi/arm-unadjusted-intrinsic.rs @@ -1,10 +1,10 @@ -// build-pass -// revisions: arm -//[arm] compile-flags: --target arm-unknown-linux-gnueabi -//[arm] needs-llvm-components: arm -// revisions: aarch64 -//[aarch64] compile-flags: --target aarch64-unknown-linux-gnu -//[aarch64] needs-llvm-components: aarch64 +//@ build-pass +//@ revisions: arm +//@[arm] compile-flags: --target arm-unknown-linux-gnueabi +//@[arm] needs-llvm-components: arm +//@ revisions: aarch64 +//@[aarch64] compile-flags: --target aarch64-unknown-linux-gnu +//@[aarch64] needs-llvm-components: aarch64 #![feature( no_core, lang_items, link_llvm_intrinsics, abi_unadjusted, repr_simd, arm_target_feature, diff --git a/tests/ui/abi/c-stack-as-value.rs b/tests/ui/abi/c-stack-as-value.rs index 5bece0ba2d1..5b9b6e566f9 100644 --- a/tests/ui/abi/c-stack-as-value.rs +++ b/tests/ui/abi/c-stack-as-value.rs @@ -1,6 +1,6 @@ -// run-pass -// pretty-expanded FIXME #23616 -// ignore-wasm32-bare no libc to test ffi with +//@ run-pass +//@ pretty-expanded FIXME #23616 +//@ ignore-wasm32-bare no libc to test ffi with #![feature(rustc_private)] diff --git a/tests/ui/abi/c-stack-returning-int64.rs b/tests/ui/abi/c-stack-returning-int64.rs index fb3cb2083e4..5caa395d7a5 100644 --- a/tests/ui/abi/c-stack-returning-int64.rs +++ b/tests/ui/abi/c-stack-returning-int64.rs @@ -1,6 +1,6 @@ -// run-pass -// ignore-wasm32-bare no libc to test with -// ignore-sgx no libc +//@ run-pass +//@ ignore-wasm32-bare no libc to test with +//@ ignore-sgx no libc #![feature(rustc_private)] diff --git a/tests/ui/abi/cabi-int-widening.rs b/tests/ui/abi/cabi-int-widening.rs index 1dbab275225..61298082449 100644 --- a/tests/ui/abi/cabi-int-widening.rs +++ b/tests/ui/abi/cabi-int-widening.rs @@ -1,5 +1,5 @@ -// run-pass -// ignore-wasm32-bare no libc to test ffi with +//@ run-pass +//@ ignore-wasm32-bare no libc to test ffi with #[link(name = "rust_test_helpers", kind = "static")] extern "C" { diff --git a/tests/ui/abi/compatibility.rs b/tests/ui/abi/compatibility.rs index c6bba7186da..911438e0d54 100644 --- a/tests/ui/abi/compatibility.rs +++ b/tests/ui/abi/compatibility.rs @@ -1,57 +1,57 @@ -// check-pass -// revisions: host -// revisions: i686 -//[i686] compile-flags: --target i686-unknown-linux-gnu -//[i686] needs-llvm-components: x86 -// revisions: x86-64 -//[x86-64] compile-flags: --target x86_64-unknown-linux-gnu -//[x86-64] needs-llvm-components: x86 -// revisions: x86-64-win -//[x86-64-win] compile-flags: --target x86_64-pc-windows-msvc -//[x86-64-win] needs-llvm-components: x86 -// revisions: arm -//[arm] compile-flags: --target arm-unknown-linux-gnueabi -//[arm] needs-llvm-components: arm -// revisions: aarch64 -//[aarch64] compile-flags: --target aarch64-unknown-linux-gnu -//[aarch64] needs-llvm-components: aarch64 -// revisions: s390x -//[s390x] compile-flags: --target s390x-unknown-linux-gnu -//[s390x] needs-llvm-components: systemz -// revisions: mips -//[mips] compile-flags: --target mips-unknown-linux-gnu -//[mips] needs-llvm-components: mips -// revisions: mips64 -//[mips64] compile-flags: --target mips64-unknown-linux-gnuabi64 -//[mips64] needs-llvm-components: mips -// revisions: sparc -//[sparc] compile-flags: --target sparc-unknown-linux-gnu -//[sparc] needs-llvm-components: sparc -// revisions: sparc64 -//[sparc64] compile-flags: --target sparc64-unknown-linux-gnu -//[sparc64] needs-llvm-components: sparc -// revisions: powerpc64 -//[powerpc64] compile-flags: --target powerpc64-unknown-linux-gnu -//[powerpc64] needs-llvm-components: powerpc -// revisions: riscv -//[riscv] compile-flags: --target riscv64gc-unknown-linux-gnu -//[riscv] needs-llvm-components: riscv -// revisions: loongarch64 -//[loongarch64] compile-flags: --target loongarch64-unknown-linux-gnu -//[loongarch64] needs-llvm-components: loongarch -//[loongarch64] min-llvm-version: 17 -// revisions: wasm -//[wasm] compile-flags: --target wasm32-unknown-unknown -//[wasm] needs-llvm-components: webassembly -// revisions: wasi -//[wasi] compile-flags: --target wasm32-wasi -//[wasi] needs-llvm-components: webassembly -// revisions: bpf -//[bpf] compile-flags: --target bpfeb-unknown-none -//[bpf] needs-llvm-components: bpf -// revisions: m68k -//[m68k] compile-flags: --target m68k-unknown-linux-gnu -//[m68k] needs-llvm-components: m68k +//@ check-pass +//@ revisions: host +//@ revisions: i686 +//@[i686] compile-flags: --target i686-unknown-linux-gnu +//@[i686] needs-llvm-components: x86 +//@ revisions: x86-64 +//@[x86-64] compile-flags: --target x86_64-unknown-linux-gnu +//@[x86-64] needs-llvm-components: x86 +//@ revisions: x86-64-win +//@[x86-64-win] compile-flags: --target x86_64-pc-windows-msvc +//@[x86-64-win] needs-llvm-components: x86 +//@ revisions: arm +//@[arm] compile-flags: --target arm-unknown-linux-gnueabi +//@[arm] needs-llvm-components: arm +//@ revisions: aarch64 +//@[aarch64] compile-flags: --target aarch64-unknown-linux-gnu +//@[aarch64] needs-llvm-components: aarch64 +//@ revisions: s390x +//@[s390x] compile-flags: --target s390x-unknown-linux-gnu +//@[s390x] needs-llvm-components: systemz +//@ revisions: mips +//@[mips] compile-flags: --target mips-unknown-linux-gnu +//@[mips] needs-llvm-components: mips +//@ revisions: mips64 +//@[mips64] compile-flags: --target mips64-unknown-linux-gnuabi64 +//@[mips64] needs-llvm-components: mips +//@ revisions: sparc +//@[sparc] compile-flags: --target sparc-unknown-linux-gnu +//@[sparc] needs-llvm-components: sparc +//@ revisions: sparc64 +//@[sparc64] compile-flags: --target sparc64-unknown-linux-gnu +//@[sparc64] needs-llvm-components: sparc +//@ revisions: powerpc64 +//@[powerpc64] compile-flags: --target powerpc64-unknown-linux-gnu +//@[powerpc64] needs-llvm-components: powerpc +//@ revisions: riscv +//@[riscv] compile-flags: --target riscv64gc-unknown-linux-gnu +//@[riscv] needs-llvm-components: riscv +//@ revisions: loongarch64 +//@[loongarch64] compile-flags: --target loongarch64-unknown-linux-gnu +//@[loongarch64] needs-llvm-components: loongarch +//@[loongarch64] min-llvm-version: 17 +//@ revisions: wasm +//@[wasm] compile-flags: --target wasm32-unknown-unknown +//@[wasm] needs-llvm-components: webassembly +//@ revisions: wasi +//@[wasi] compile-flags: --target wasm32-wasi +//@[wasi] needs-llvm-components: webassembly +//@ revisions: bpf +//@[bpf] compile-flags: --target bpfeb-unknown-none +//@[bpf] needs-llvm-components: bpf +//@ revisions: m68k +//@[m68k] compile-flags: --target m68k-unknown-linux-gnu +//@[m68k] needs-llvm-components: m68k // FIXME: disabled on nvptx64 since the target ABI fails the sanity check // see https://github.com/rust-lang/rust/issues/117480 /* revisions: nvptx64 diff --git a/tests/ui/abi/cross-crate/anon-extern-mod-cross-crate-2.rs b/tests/ui/abi/cross-crate/anon-extern-mod-cross-crate-2.rs index 77168be5374..47402acc93a 100644 --- a/tests/ui/abi/cross-crate/anon-extern-mod-cross-crate-2.rs +++ b/tests/ui/abi/cross-crate/anon-extern-mod-cross-crate-2.rs @@ -1,7 +1,7 @@ -// run-pass -// aux-build:anon-extern-mod-cross-crate-1.rs -// pretty-expanded FIXME #23616 -// ignore-wasm32-bare no libc to test ffi with +//@ run-pass +//@ aux-build:anon-extern-mod-cross-crate-1.rs +//@ pretty-expanded FIXME #23616 +//@ ignore-wasm32-bare no libc to test ffi with extern crate anonexternmod; diff --git a/tests/ui/abi/cross-crate/duplicated-external-mods.rs b/tests/ui/abi/cross-crate/duplicated-external-mods.rs index 05a279a3014..d1fc3b7c910 100644 --- a/tests/ui/abi/cross-crate/duplicated-external-mods.rs +++ b/tests/ui/abi/cross-crate/duplicated-external-mods.rs @@ -1,8 +1,8 @@ -// run-pass -// aux-build:anon-extern-mod-cross-crate-1.rs -// aux-build:anon-extern-mod-cross-crate-1.rs -// pretty-expanded FIXME #23616 -// ignore-wasm32-bare no libc to test ffi with +//@ run-pass +//@ aux-build:anon-extern-mod-cross-crate-1.rs +//@ aux-build:anon-extern-mod-cross-crate-1.rs +//@ pretty-expanded FIXME #23616 +//@ ignore-wasm32-bare no libc to test ffi with extern crate anonexternmod; diff --git a/tests/ui/abi/debug.rs b/tests/ui/abi/debug.rs index 77715ee4023..ceb88d4e9fa 100644 --- a/tests/ui/abi/debug.rs +++ b/tests/ui/abi/debug.rs @@ -1,11 +1,11 @@ -// normalize-stderr-test "(abi|pref|unadjusted_abi_align): Align\([1-8] bytes\)" -> "$1: $$SOME_ALIGN" -// normalize-stderr-test "(size): Size\([48] bytes\)" -> "$1: $$SOME_SIZE" -// normalize-stderr-test "(can_unwind): (true|false)" -> "$1: $$SOME_BOOL" -// normalize-stderr-test "(valid_range): 0\.\.=(4294967295|18446744073709551615)" -> "$1: $$FULL" +//@ normalize-stderr-test "(abi|pref|unadjusted_abi_align): Align\([1-8] bytes\)" -> "$1: $$SOME_ALIGN" +//@ normalize-stderr-test "(size): Size\([48] bytes\)" -> "$1: $$SOME_SIZE" +//@ normalize-stderr-test "(can_unwind): (true|false)" -> "$1: $$SOME_BOOL" +//@ normalize-stderr-test "(valid_range): 0\.\.=(4294967295|18446744073709551615)" -> "$1: $$FULL" // This pattern is prepared for when we account for alignment in the niche. -// normalize-stderr-test "(valid_range): [1-9]\.\.=(429496729[0-9]|1844674407370955161[0-9])" -> "$1: $$NON_NULL" +//@ normalize-stderr-test "(valid_range): [1-9]\.\.=(429496729[0-9]|1844674407370955161[0-9])" -> "$1: $$NON_NULL" // Some attributes are only computed for release builds: -// compile-flags: -O +//@ compile-flags: -O #![feature(rustc_attrs)] #![crate_type = "lib"] diff --git a/tests/ui/abi/explicit_repr_rust.rs b/tests/ui/abi/explicit_repr_rust.rs index 4f8cab3bf0e..6b131227d5b 100644 --- a/tests/ui/abi/explicit_repr_rust.rs +++ b/tests/ui/abi/explicit_repr_rust.rs @@ -1,4 +1,4 @@ -// check-pass +//@ check-pass #[repr(Rust)] struct A; diff --git a/tests/ui/abi/extern/extern-call-deep.rs b/tests/ui/abi/extern/extern-call-deep.rs index db5f2ca652f..0c549e6222b 100644 --- a/tests/ui/abi/extern/extern-call-deep.rs +++ b/tests/ui/abi/extern/extern-call-deep.rs @@ -1,6 +1,6 @@ -// run-pass -// ignore-wasm32-bare no libc to test ffi with -// ignore-emscripten blows the JS stack +//@ run-pass +//@ ignore-wasm32-bare no libc to test ffi with +//@ ignore-emscripten blows the JS stack #![feature(rustc_private)] diff --git a/tests/ui/abi/extern/extern-call-deep2.rs b/tests/ui/abi/extern/extern-call-deep2.rs index 60e8db1592e..80c492e3022 100644 --- a/tests/ui/abi/extern/extern-call-deep2.rs +++ b/tests/ui/abi/extern/extern-call-deep2.rs @@ -1,6 +1,6 @@ -// run-pass +//@ run-pass #![allow(unused_must_use)] -// ignore-emscripten no threads support +//@ ignore-emscripten no threads support #![feature(rustc_private)] extern crate libc; diff --git a/tests/ui/abi/extern/extern-call-direct.rs b/tests/ui/abi/extern/extern-call-direct.rs index 19b901d49a4..70b6eb085c3 100644 --- a/tests/ui/abi/extern/extern-call-direct.rs +++ b/tests/ui/abi/extern/extern-call-direct.rs @@ -1,4 +1,4 @@ -// run-pass +//@ run-pass // Test direct calls to extern fns. diff --git a/tests/ui/abi/extern/extern-call-indirect.rs b/tests/ui/abi/extern/extern-call-indirect.rs index 886e8f6be10..3e874e26542 100644 --- a/tests/ui/abi/extern/extern-call-indirect.rs +++ b/tests/ui/abi/extern/extern-call-indirect.rs @@ -1,5 +1,5 @@ -// run-pass -// ignore-wasm32-bare no libc to test ffi with +//@ run-pass +//@ ignore-wasm32-bare no libc to test ffi with #![feature(rustc_private)] diff --git a/tests/ui/abi/extern/extern-call-scrub.rs b/tests/ui/abi/extern/extern-call-scrub.rs index ff33cf31af8..873f5d2e774 100644 --- a/tests/ui/abi/extern/extern-call-scrub.rs +++ b/tests/ui/abi/extern/extern-call-scrub.rs @@ -1,10 +1,10 @@ -// run-pass +//@ run-pass #![allow(unused_must_use)] // This time we're testing repeatedly going up and down both stacks to // make sure the stack pointers are maintained properly in both // directions -// ignore-emscripten no threads support +//@ ignore-emscripten no threads support #![feature(rustc_private)] extern crate libc; diff --git a/tests/ui/abi/extern/extern-crosscrate.rs b/tests/ui/abi/extern/extern-crosscrate.rs index 123ce20ca26..5a4a339882d 100644 --- a/tests/ui/abi/extern/extern-crosscrate.rs +++ b/tests/ui/abi/extern/extern-crosscrate.rs @@ -1,6 +1,6 @@ -// run-pass -// aux-build:extern-crosscrate-source.rs -// ignore-wasm32-bare no libc to test ffi with +//@ run-pass +//@ aux-build:extern-crosscrate-source.rs +//@ ignore-wasm32-bare no libc to test ffi with #![feature(rustc_private)] diff --git a/tests/ui/abi/extern/extern-pass-TwoU16s.rs b/tests/ui/abi/extern/extern-pass-TwoU16s.rs index cff25511cc9..69afe7b2532 100644 --- a/tests/ui/abi/extern/extern-pass-TwoU16s.rs +++ b/tests/ui/abi/extern/extern-pass-TwoU16s.rs @@ -1,7 +1,7 @@ -// run-pass +//@ run-pass #![allow(improper_ctypes)] -// ignore-wasm32-bare no libc for ffi testing +//@ ignore-wasm32-bare no libc for ffi testing // Test a foreign function that accepts and returns a struct // by value. diff --git a/tests/ui/abi/extern/extern-pass-TwoU32s.rs b/tests/ui/abi/extern/extern-pass-TwoU32s.rs index 03a8ecf241d..ca7630fe421 100644 --- a/tests/ui/abi/extern/extern-pass-TwoU32s.rs +++ b/tests/ui/abi/extern/extern-pass-TwoU32s.rs @@ -1,7 +1,7 @@ -// run-pass +//@ run-pass #![allow(improper_ctypes)] -// ignore-wasm32-bare no libc for ffi testing +//@ ignore-wasm32-bare no libc for ffi testing // Test a foreign function that accepts and returns a struct // by value. diff --git a/tests/ui/abi/extern/extern-pass-TwoU64s.rs b/tests/ui/abi/extern/extern-pass-TwoU64s.rs index 8bbc987c821..a8f629f0906 100644 --- a/tests/ui/abi/extern/extern-pass-TwoU64s.rs +++ b/tests/ui/abi/extern/extern-pass-TwoU64s.rs @@ -1,7 +1,7 @@ -// run-pass +//@ run-pass #![allow(improper_ctypes)] -// ignore-wasm32-bare no libc for ffi testing +//@ ignore-wasm32-bare no libc for ffi testing // Test a foreign function that accepts and returns a struct // by value. diff --git a/tests/ui/abi/extern/extern-pass-TwoU8s.rs b/tests/ui/abi/extern/extern-pass-TwoU8s.rs index 55a53c250bf..2bf913e4e4f 100644 --- a/tests/ui/abi/extern/extern-pass-TwoU8s.rs +++ b/tests/ui/abi/extern/extern-pass-TwoU8s.rs @@ -1,7 +1,7 @@ -// run-pass +//@ run-pass #![allow(improper_ctypes)] -// ignore-wasm32-bare no libc for ffi testing +//@ ignore-wasm32-bare no libc for ffi testing // Test a foreign function that accepts and returns a struct // by value. diff --git a/tests/ui/abi/extern/extern-pass-char.rs b/tests/ui/abi/extern/extern-pass-char.rs index 2b10d26d1dd..a0ebd43e076 100644 --- a/tests/ui/abi/extern/extern-pass-char.rs +++ b/tests/ui/abi/extern/extern-pass-char.rs @@ -1,5 +1,5 @@ -// run-pass -// ignore-wasm32-bare no libc for ffi testing +//@ run-pass +//@ ignore-wasm32-bare no libc for ffi testing // Test a function that takes/returns a u8. diff --git a/tests/ui/abi/extern/extern-pass-double.rs b/tests/ui/abi/extern/extern-pass-double.rs index 0b556c99e8d..11e23abb782 100644 --- a/tests/ui/abi/extern/extern-pass-double.rs +++ b/tests/ui/abi/extern/extern-pass-double.rs @@ -1,5 +1,5 @@ -// run-pass -// ignore-wasm32-bare no libc for ffi testing +//@ run-pass +//@ ignore-wasm32-bare no libc for ffi testing #[link(name = "rust_test_helpers", kind = "static")] extern "C" { diff --git a/tests/ui/abi/extern/extern-pass-empty.rs b/tests/ui/abi/extern/extern-pass-empty.rs index ee974f6dbde..f168f5faa17 100644 --- a/tests/ui/abi/extern/extern-pass-empty.rs +++ b/tests/ui/abi/extern/extern-pass-empty.rs @@ -1,11 +1,11 @@ -// run-pass +//@ run-pass #![allow(improper_ctypes)] // FIXME: this test is inherently not FFI-safe. // Test a foreign function that accepts empty struct. -// pretty-expanded FIXME #23616 -// ignore-msvc -// ignore-emscripten emcc asserts on an empty struct as an argument +//@ pretty-expanded FIXME #23616 +//@ ignore-msvc +//@ ignore-emscripten emcc asserts on an empty struct as an argument #[repr(C)] struct TwoU8s { diff --git a/tests/ui/abi/extern/extern-pass-u32.rs b/tests/ui/abi/extern/extern-pass-u32.rs index c9b8d52cf5b..69570fc9358 100644 --- a/tests/ui/abi/extern/extern-pass-u32.rs +++ b/tests/ui/abi/extern/extern-pass-u32.rs @@ -1,5 +1,5 @@ -// run-pass -// ignore-wasm32-bare no libc for ffi testing +//@ run-pass +//@ ignore-wasm32-bare no libc for ffi testing // Test a function that takes/returns a u32. diff --git a/tests/ui/abi/extern/extern-pass-u64.rs b/tests/ui/abi/extern/extern-pass-u64.rs index 5103129abaa..43880b96c2d 100644 --- a/tests/ui/abi/extern/extern-pass-u64.rs +++ b/tests/ui/abi/extern/extern-pass-u64.rs @@ -1,5 +1,5 @@ -// run-pass -// ignore-wasm32-bare no libc for ffi testing +//@ run-pass +//@ ignore-wasm32-bare no libc for ffi testing // Test a call to a function that takes/returns a u64. diff --git a/tests/ui/abi/extern/extern-return-TwoU16s.rs b/tests/ui/abi/extern/extern-return-TwoU16s.rs index 2551c93a765..723933cd7e7 100644 --- a/tests/ui/abi/extern/extern-return-TwoU16s.rs +++ b/tests/ui/abi/extern/extern-return-TwoU16s.rs @@ -1,7 +1,7 @@ -// run-pass +//@ run-pass #![allow(improper_ctypes)] -// ignore-wasm32-bare no libc to test ffi with +//@ ignore-wasm32-bare no libc to test ffi with pub struct TwoU16s { one: u16, diff --git a/tests/ui/abi/extern/extern-return-TwoU32s.rs b/tests/ui/abi/extern/extern-return-TwoU32s.rs index 70a42895d91..7795e4f0401 100644 --- a/tests/ui/abi/extern/extern-return-TwoU32s.rs +++ b/tests/ui/abi/extern/extern-return-TwoU32s.rs @@ -1,7 +1,7 @@ -// run-pass +//@ run-pass #![allow(improper_ctypes)] -// ignore-wasm32-bare no libc to test ffi with +//@ ignore-wasm32-bare no libc to test ffi with pub struct TwoU32s { one: u32, diff --git a/tests/ui/abi/extern/extern-return-TwoU64s.rs b/tests/ui/abi/extern/extern-return-TwoU64s.rs index dd264fb9c19..a980b7f1cde 100644 --- a/tests/ui/abi/extern/extern-return-TwoU64s.rs +++ b/tests/ui/abi/extern/extern-return-TwoU64s.rs @@ -1,7 +1,7 @@ -// run-pass +//@ run-pass #![allow(improper_ctypes)] -// ignore-wasm32-bare no libc to test ffi with +//@ ignore-wasm32-bare no libc to test ffi with pub struct TwoU64s { one: u64, diff --git a/tests/ui/abi/extern/extern-return-TwoU8s.rs b/tests/ui/abi/extern/extern-return-TwoU8s.rs index b60387aed99..73263a9da04 100644 --- a/tests/ui/abi/extern/extern-return-TwoU8s.rs +++ b/tests/ui/abi/extern/extern-return-TwoU8s.rs @@ -1,7 +1,7 @@ -// run-pass +//@ run-pass #![allow(improper_ctypes)] -// ignore-wasm32-bare no libc to test ffi with +//@ ignore-wasm32-bare no libc to test ffi with pub struct TwoU8s { one: u8, diff --git a/tests/ui/abi/foreign/foreign-call-no-runtime.rs b/tests/ui/abi/foreign/foreign-call-no-runtime.rs index d5b90a3592b..7f847d55721 100644 --- a/tests/ui/abi/foreign/foreign-call-no-runtime.rs +++ b/tests/ui/abi/foreign/foreign-call-no-runtime.rs @@ -1,5 +1,5 @@ -// run-pass -// ignore-emscripten no threads support +//@ run-pass +//@ ignore-emscripten no threads support #![feature(rustc_private)] diff --git a/tests/ui/abi/foreign/foreign-dupe.rs b/tests/ui/abi/foreign/foreign-dupe.rs index 3c9f0f583d4..6469f5d2ce7 100644 --- a/tests/ui/abi/foreign/foreign-dupe.rs +++ b/tests/ui/abi/foreign/foreign-dupe.rs @@ -1,6 +1,6 @@ -// run-pass -// aux-build:foreign_lib.rs -// ignore-wasm32-bare no libc to test ffi with +//@ run-pass +//@ aux-build:foreign_lib.rs +//@ ignore-wasm32-bare no libc to test ffi with // Check that we can still call duplicated extern (imported) functions // which were declared in another crate. See issues #32740 and #32783. diff --git a/tests/ui/abi/foreign/foreign-fn-with-byval.rs b/tests/ui/abi/foreign/foreign-fn-with-byval.rs index e20ee0da45d..89bbf406693 100644 --- a/tests/ui/abi/foreign/foreign-fn-with-byval.rs +++ b/tests/ui/abi/foreign/foreign-fn-with-byval.rs @@ -1,7 +1,7 @@ -// run-pass +//@ run-pass #![allow(improper_ctypes, improper_ctypes_definitions)] -// ignore-wasm32-bare no libc to test ffi with +//@ ignore-wasm32-bare no libc to test ffi with #[derive(Copy, Clone)] pub struct S { diff --git a/tests/ui/abi/foreign/foreign-no-abi.rs b/tests/ui/abi/foreign/foreign-no-abi.rs index 3f4f70c99e6..84e21660f1c 100644 --- a/tests/ui/abi/foreign/foreign-no-abi.rs +++ b/tests/ui/abi/foreign/foreign-no-abi.rs @@ -1,8 +1,8 @@ -// run-pass +//@ run-pass // ABI is cdecl by default -// ignore-wasm32-bare no libc to test ffi with -// pretty-expanded FIXME #23616 +//@ ignore-wasm32-bare no libc to test ffi with +//@ pretty-expanded FIXME #23616 #![feature(rustc_private)] diff --git a/tests/ui/abi/foreign/invoke-external-foreign.rs b/tests/ui/abi/foreign/invoke-external-foreign.rs index dbd2b4ad865..5eccfaf204b 100644 --- a/tests/ui/abi/foreign/invoke-external-foreign.rs +++ b/tests/ui/abi/foreign/invoke-external-foreign.rs @@ -1,12 +1,12 @@ -// run-pass -// aux-build:foreign_lib.rs -// ignore-wasm32-bare no libc to test ffi with +//@ run-pass +//@ aux-build:foreign_lib.rs +//@ ignore-wasm32-bare no libc to test ffi with // The purpose of this test is to check that we can // successfully (and safely) invoke external, cdecl // functions from outside the crate. -// pretty-expanded FIXME #23616 +//@ pretty-expanded FIXME #23616 extern crate foreign_lib; diff --git a/tests/ui/abi/homogenous-floats-target-feature-mixup.rs b/tests/ui/abi/homogenous-floats-target-feature-mixup.rs index 4600bd090cc..34d3b91d404 100644 --- a/tests/ui/abi/homogenous-floats-target-feature-mixup.rs +++ b/tests/ui/abi/homogenous-floats-target-feature-mixup.rs @@ -4,9 +4,9 @@ // This is basically the same test as tests/ui/simd/target-feature-mixup.rs but for floats and // without #[repr(simd)] -// run-pass -// ignore-emscripten -// ignore-sgx no processes +//@ run-pass +//@ ignore-emscripten +//@ ignore-sgx no processes #![feature(avx512_target_feature)] diff --git a/tests/ui/abi/issue-28676.rs b/tests/ui/abi/issue-28676.rs index 347a840296d..2457d1d7957 100644 --- a/tests/ui/abi/issue-28676.rs +++ b/tests/ui/abi/issue-28676.rs @@ -1,8 +1,8 @@ -// run-pass +//@ run-pass #![allow(dead_code)] #![allow(improper_ctypes)] -// ignore-wasm32-bare no libc to test ffi with +//@ ignore-wasm32-bare no libc to test ffi with #[derive(Copy, Clone)] pub struct Quad { diff --git a/tests/ui/abi/issues/issue-62350-sysv-neg-reg-counts.rs b/tests/ui/abi/issues/issue-62350-sysv-neg-reg-counts.rs index 29b2405189c..21720db5143 100644 --- a/tests/ui/abi/issues/issue-62350-sysv-neg-reg-counts.rs +++ b/tests/ui/abi/issues/issue-62350-sysv-neg-reg-counts.rs @@ -1,8 +1,8 @@ -// run-pass +//@ run-pass #![allow(dead_code)] #![allow(improper_ctypes)] -// ignore-wasm32-bare no libc to test ffi with +//@ ignore-wasm32-bare no libc to test ffi with #[derive(Copy, Clone)] pub struct QuadFloats { diff --git a/tests/ui/abi/issues/issue-97463-broken-abi-leaked-uninit-data.rs b/tests/ui/abi/issues/issue-97463-broken-abi-leaked-uninit-data.rs index fba880d4f9a..316ac7a4880 100644 --- a/tests/ui/abi/issues/issue-97463-broken-abi-leaked-uninit-data.rs +++ b/tests/ui/abi/issues/issue-97463-broken-abi-leaked-uninit-data.rs @@ -1,5 +1,5 @@ -// run-pass -// ignore-wasm +//@ run-pass +//@ ignore-wasm #![allow(dead_code)] #![allow(improper_ctypes)] diff --git a/tests/ui/abi/lib-defaults.rs b/tests/ui/abi/lib-defaults.rs index cd0b0bb2321..e3caccee62c 100644 --- a/tests/ui/abi/lib-defaults.rs +++ b/tests/ui/abi/lib-defaults.rs @@ -1,9 +1,9 @@ -// run-pass -// dont-check-compiler-stderr (rust-lang/rust#54222) +//@ run-pass +//@ dont-check-compiler-stderr (rust-lang/rust#54222) -// ignore-wasm32-bare no libc to test ffi with +//@ ignore-wasm32-bare no libc to test ffi with -// compile-flags: -lrust_test_helpers +//@ compile-flags: -lrust_test_helpers #[link(name = "rust_test_helpers", kind = "static")] extern "C" { diff --git a/tests/ui/abi/mir/mir_codegen_calls_variadic.rs b/tests/ui/abi/mir/mir_codegen_calls_variadic.rs index b3392b9c607..ff515b66269 100644 --- a/tests/ui/abi/mir/mir_codegen_calls_variadic.rs +++ b/tests/ui/abi/mir/mir_codegen_calls_variadic.rs @@ -1,5 +1,5 @@ -// run-pass -// ignore-wasm32-bare no libc to test ffi with +//@ run-pass +//@ ignore-wasm32-bare no libc to test ffi with #[link(name = "rust_test_helpers", kind = "static")] extern "C" { diff --git a/tests/ui/abi/nullable-pointer-ffi-compat.rs b/tests/ui/abi/nullable-pointer-ffi-compat.rs index 0647a18c3c4..f94f838723a 100644 --- a/tests/ui/abi/nullable-pointer-ffi-compat.rs +++ b/tests/ui/abi/nullable-pointer-ffi-compat.rs @@ -1,4 +1,4 @@ -// run-pass +//@ run-pass // #11303, #11040: // This would previously crash on i686 Linux due to abi differences // between returning an Option and T, where T is a non nullable diff --git a/tests/ui/abi/numbers-arithmetic/i128-ffi.rs b/tests/ui/abi/numbers-arithmetic/i128-ffi.rs index 19edf9779f3..26d65e8bbf8 100644 --- a/tests/ui/abi/numbers-arithmetic/i128-ffi.rs +++ b/tests/ui/abi/numbers-arithmetic/i128-ffi.rs @@ -1,12 +1,12 @@ -// run-pass +//@ run-pass #![allow(improper_ctypes)] // MSVC doesn't support 128 bit integers, and other Windows // C compilers have very inconsistent views on how the ABI // should look like. -// ignore-windows -// ignore-32bit +//@ ignore-windows +//@ ignore-32bit #[link(name = "rust_test_helpers", kind = "static")] extern "C" { diff --git a/tests/ui/abi/relocation_model_pic.rs b/tests/ui/abi/relocation_model_pic.rs index cca2e8db74d..e15b47acf10 100644 --- a/tests/ui/abi/relocation_model_pic.rs +++ b/tests/ui/abi/relocation_model_pic.rs @@ -1,6 +1,6 @@ -// run-pass -// compile-flags: -C relocation-model=pic -// needs-relocation-model-pic +//@ run-pass +//@ compile-flags: -C relocation-model=pic +//@ needs-relocation-model-pic #![feature(cfg_relocation_model)] diff --git a/tests/ui/abi/riscv-discoverability-guidance.rs b/tests/ui/abi/riscv-discoverability-guidance.rs index 361ed8f3d91..a09a0edba85 100644 --- a/tests/ui/abi/riscv-discoverability-guidance.rs +++ b/tests/ui/abi/riscv-discoverability-guidance.rs @@ -1,10 +1,10 @@ // ignore-tidy-linelength -// revisions: riscv32 riscv64 +//@ revisions: riscv32 riscv64 // -// [riscv32] needs-llvm-components: riscv -// [riscv32] compile-flags: --target=riscv32i-unknown-none-elf -C target-feature=-fast-unaligned-access --crate-type=rlib -// [riscv64] needs-llvm-components: riscv -// [riscv64] compile-flags: --target=riscv64gc-unknown-none-elf -C target-feature=-fast-unaligned-access --crate-type=rlib +//@ [riscv32] needs-llvm-components: riscv +//@ [riscv32] compile-flags: --target=riscv32i-unknown-none-elf -C target-feature=-fast-unaligned-access --crate-type=rlib +//@ [riscv64] needs-llvm-components: riscv +//@ [riscv64] compile-flags: --target=riscv64gc-unknown-none-elf -C target-feature=-fast-unaligned-access --crate-type=rlib #![no_core] #![feature( no_core, diff --git a/tests/ui/abi/rustcall-generic.rs b/tests/ui/abi/rustcall-generic.rs index 6eaccc436b6..fdd419b4e3c 100644 --- a/tests/ui/abi/rustcall-generic.rs +++ b/tests/ui/abi/rustcall-generic.rs @@ -1,6 +1,6 @@ -// revisions: normal opt -// check-pass -//[opt] compile-flags: -Zmir-opt-level=3 +//@ revisions: normal opt +//@ check-pass +//@[opt] compile-flags: -Zmir-opt-level=3 #![feature(unboxed_closures, tuple_trait)] diff --git a/tests/ui/abi/segfault-no-out-of-stack.rs b/tests/ui/abi/segfault-no-out-of-stack.rs index ab2b3089485..d03cff80098 100644 --- a/tests/ui/abi/segfault-no-out-of-stack.rs +++ b/tests/ui/abi/segfault-no-out-of-stack.rs @@ -1,9 +1,9 @@ -// run-pass +//@ run-pass #![allow(unused_imports)] -// ignore-emscripten can't run commands -// ignore-sgx no processes -// ignore-fuchsia must translate zircon signal to SIGSEGV/SIGBUS, FIXME (#58590) +//@ ignore-emscripten can't run commands +//@ ignore-sgx no processes +//@ ignore-fuchsia must translate zircon signal to SIGSEGV/SIGBUS, FIXME (#58590) #![feature(rustc_private)] extern crate libc; diff --git a/tests/ui/abi/stack-probes-lto.rs b/tests/ui/abi/stack-probes-lto.rs index fb478671754..5451b72d979 100644 --- a/tests/ui/abi/stack-probes-lto.rs +++ b/tests/ui/abi/stack-probes-lto.rs @@ -1,14 +1,14 @@ -// revisions: aarch64 x32 x64 -// run-pass -//[aarch64] only-aarch64 -//[aarch64] min-llvm-version: 18 -//[x32] only-x86 -//[x64] only-x86_64 -// ignore-sgx no processes -// ignore-musl FIXME #31506 -// ignore-fuchsia no exception handler registered for segfault -// compile-flags: -C lto -// no-prefer-dynamic -// ignore-nto Crash analysis impossible at SIGSEGV in QNX Neutrino +//@ revisions: aarch64 x32 x64 +//@ run-pass +//@[aarch64] only-aarch64 +//@[aarch64] min-llvm-version: 18 +//@[x32] only-x86 +//@[x64] only-x86_64 +//@ ignore-sgx no processes +//@ ignore-musl FIXME #31506 +//@ ignore-fuchsia no exception handler registered for segfault +//@ compile-flags: -C lto +//@ no-prefer-dynamic +//@ ignore-nto Crash analysis impossible at SIGSEGV in QNX Neutrino include!("stack-probes.rs"); diff --git a/tests/ui/abi/stack-probes.rs b/tests/ui/abi/stack-probes.rs index e5c7a1a6804..32d4d6cd31e 100644 --- a/tests/ui/abi/stack-probes.rs +++ b/tests/ui/abi/stack-probes.rs @@ -1,13 +1,13 @@ -// revisions: aarch64 x32 x64 -// run-pass -//[aarch64] only-aarch64 -//[aarch64] min-llvm-version: 18 -//[x32] only-x86 -//[x64] only-x86_64 -// ignore-emscripten no processes -// ignore-sgx no processes -// ignore-fuchsia no exception handler registered for segfault -// ignore-nto Crash analysis impossible at SIGSEGV in QNX Neutrino +//@ revisions: aarch64 x32 x64 +//@ run-pass +//@[aarch64] only-aarch64 +//@[aarch64] min-llvm-version: 18 +//@[x32] only-x86 +//@[x64] only-x86_64 +//@ ignore-emscripten no processes +//@ ignore-sgx no processes +//@ ignore-fuchsia no exception handler registered for segfault +//@ ignore-nto Crash analysis impossible at SIGSEGV in QNX Neutrino use std::env; use std::mem::MaybeUninit; diff --git a/tests/ui/abi/stack-protector.rs b/tests/ui/abi/stack-protector.rs index e94aa816d90..29332861977 100644 --- a/tests/ui/abi/stack-protector.rs +++ b/tests/ui/abi/stack-protector.rs @@ -1,9 +1,9 @@ -// run-pass -// only-x86_64-unknown-linux-gnu -// revisions: ssp no-ssp -// [ssp] compile-flags: -Z stack-protector=all -// compile-flags: -C opt-level=2 -// compile-flags: -g +//@ run-pass +//@ only-x86_64-unknown-linux-gnu +//@ revisions: ssp no-ssp +//@ [ssp] compile-flags: -Z stack-protector=all +//@ compile-flags: -C opt-level=2 +//@ compile-flags: -g use std::env; use std::process::{Command, ExitStatus}; diff --git a/tests/ui/abi/statics/static-mut-foreign.rs b/tests/ui/abi/statics/static-mut-foreign.rs index eb732e7c2c3..fdd775da578 100644 --- a/tests/ui/abi/statics/static-mut-foreign.rs +++ b/tests/ui/abi/statics/static-mut-foreign.rs @@ -1,9 +1,9 @@ -// run-pass +//@ run-pass // Constants (static variables) can be used to match in patterns, but mutable // statics cannot. This ensures that there's some form of error if this is // attempted. -// ignore-wasm32-bare no libc to test ffi with +//@ ignore-wasm32-bare no libc to test ffi with #![feature(rustc_private)] diff --git a/tests/ui/abi/struct-enums/struct-return.rs b/tests/ui/abi/struct-enums/struct-return.rs index 1a7984ea5cd..b00f8d8cc2e 100644 --- a/tests/ui/abi/struct-enums/struct-return.rs +++ b/tests/ui/abi/struct-enums/struct-return.rs @@ -1,6 +1,6 @@ -// run-pass +//@ run-pass #![allow(dead_code)] -// ignore-wasm32-bare no libc to test ffi with +//@ ignore-wasm32-bare no libc to test ffi with #[repr(C)] #[derive(Copy, Clone)] diff --git a/tests/ui/abi/union/union-c-interop.rs b/tests/ui/abi/union/union-c-interop.rs index 00f04d5b7ff..508b07a9833 100644 --- a/tests/ui/abi/union/union-c-interop.rs +++ b/tests/ui/abi/union/union-c-interop.rs @@ -1,7 +1,7 @@ -// run-pass +//@ run-pass #![allow(non_snake_case)] -// ignore-wasm32-bare no libc to test ffi with +//@ ignore-wasm32-bare no libc to test ffi with #[derive(Clone, Copy)] #[repr(C)] diff --git a/tests/ui/abi/unsized-args-in-c-abi-issues-94223-115845.rs b/tests/ui/abi/unsized-args-in-c-abi-issues-94223-115845.rs index a32cc6500f8..376630b8d33 100644 --- a/tests/ui/abi/unsized-args-in-c-abi-issues-94223-115845.rs +++ b/tests/ui/abi/unsized-args-in-c-abi-issues-94223-115845.rs @@ -1,4 +1,4 @@ -// check-pass +//@ check-pass #![allow(improper_ctypes_definitions)] #![feature(unsized_tuple_coercion)] #![feature(unsized_fn_params)] diff --git a/tests/ui/abi/unsupported.rs b/tests/ui/abi/unsupported.rs index 9b99e51905d..cd7e76c7158 100644 --- a/tests/ui/abi/unsupported.rs +++ b/tests/ui/abi/unsupported.rs @@ -1,17 +1,17 @@ -// revisions: x64 i686 aarch64 arm riscv32 riscv64 +//@ revisions: x64 i686 aarch64 arm riscv32 riscv64 // -// [x64] needs-llvm-components: x86 -// [x64] compile-flags: --target=x86_64-unknown-linux-gnu --crate-type=rlib -// [i686] needs-llvm-components: x86 -// [i686] compile-flags: --target=i686-unknown-linux-gnu --crate-type=rlib -// [aarch64] needs-llvm-components: aarch64 -// [aarch64] compile-flags: --target=aarch64-unknown-linux-gnu --crate-type=rlib -// [arm] needs-llvm-components: arm -// [arm] compile-flags: --target=armv7-unknown-linux-gnueabihf --crate-type=rlib -// [riscv32] needs-llvm-components: riscv -// [riscv32] compile-flags: --target=riscv32i-unknown-none-elf --crate-type=rlib -// [riscv64] needs-llvm-components: riscv -// [riscv64] compile-flags: --target=riscv64gc-unknown-none-elf --crate-type=rlib +//@ [x64] needs-llvm-components: x86 +//@ [x64] compile-flags: --target=x86_64-unknown-linux-gnu --crate-type=rlib +//@ [i686] needs-llvm-components: x86 +//@ [i686] compile-flags: --target=i686-unknown-linux-gnu --crate-type=rlib +//@ [aarch64] needs-llvm-components: aarch64 +//@ [aarch64] compile-flags: --target=aarch64-unknown-linux-gnu --crate-type=rlib +//@ [arm] needs-llvm-components: arm +//@ [arm] compile-flags: --target=armv7-unknown-linux-gnueabihf --crate-type=rlib +//@ [riscv32] needs-llvm-components: riscv +//@ [riscv32] compile-flags: --target=riscv32i-unknown-none-elf --crate-type=rlib +//@ [riscv64] needs-llvm-components: riscv +//@ [riscv64] compile-flags: --target=riscv64gc-unknown-none-elf --crate-type=rlib #![no_core] #![feature( no_core, diff --git a/tests/ui/abi/variadic-ffi.rs b/tests/ui/abi/variadic-ffi.rs index 1862177005f..6b42f268bb9 100644 --- a/tests/ui/abi/variadic-ffi.rs +++ b/tests/ui/abi/variadic-ffi.rs @@ -1,5 +1,5 @@ -// run-pass -// ignore-wasm32-bare no libc to test ffi with +//@ run-pass +//@ ignore-wasm32-bare no libc to test ffi with #![feature(c_variadic)] use std::ffi::VaList; diff --git a/tests/ui/abi/x86stdcall.rs b/tests/ui/abi/x86stdcall.rs index d1cf1319fb0..c1bd35b80d2 100644 --- a/tests/ui/abi/x86stdcall.rs +++ b/tests/ui/abi/x86stdcall.rs @@ -1,5 +1,5 @@ -// run-pass -// only-windows +//@ run-pass +//@ only-windows // GetLastError doesn't seem to work with stack switching #[cfg(windows)] diff --git a/tests/ui/abi/x86stdcall2.rs b/tests/ui/abi/x86stdcall2.rs index 4d508ecb242..a61d0cbcfdf 100644 --- a/tests/ui/abi/x86stdcall2.rs +++ b/tests/ui/abi/x86stdcall2.rs @@ -1,5 +1,5 @@ -// run-pass -// only-windows +//@ run-pass +//@ only-windows #![allow(non_camel_case_types)] pub type HANDLE = usize; diff --git a/tests/ui/alias-uninit-value.rs b/tests/ui/alias-uninit-value.rs index 932c93245e6..3223bac1820 100644 --- a/tests/ui/alias-uninit-value.rs +++ b/tests/ui/alias-uninit-value.rs @@ -1,4 +1,4 @@ -// run-pass +//@ run-pass #![allow(non_camel_case_types)] #![allow(dead_code)] @@ -7,7 +7,7 @@ // Regression test for issue #374 -// pretty-expanded FIXME #23616 +//@ pretty-expanded FIXME #23616 enum sty { ty_nil, } diff --git a/tests/ui/alloc-error/alloc-error-handler-bad-signature-1.rs b/tests/ui/alloc-error/alloc-error-handler-bad-signature-1.rs index cd06423e3a5..a50535ab726 100644 --- a/tests/ui/alloc-error/alloc-error-handler-bad-signature-1.rs +++ b/tests/ui/alloc-error/alloc-error-handler-bad-signature-1.rs @@ -1,4 +1,4 @@ -// compile-flags:-C panic=abort +//@ compile-flags:-C panic=abort #![feature(alloc_error_handler)] #![no_std] diff --git a/tests/ui/alloc-error/alloc-error-handler-bad-signature-2.rs b/tests/ui/alloc-error/alloc-error-handler-bad-signature-2.rs index 4f76257fc72..4bd4ab4570c 100644 --- a/tests/ui/alloc-error/alloc-error-handler-bad-signature-2.rs +++ b/tests/ui/alloc-error/alloc-error-handler-bad-signature-2.rs @@ -1,4 +1,4 @@ -// compile-flags:-C panic=abort +//@ compile-flags:-C panic=abort #![feature(alloc_error_handler)] #![no_std] diff --git a/tests/ui/alloc-error/alloc-error-handler-bad-signature-3.rs b/tests/ui/alloc-error/alloc-error-handler-bad-signature-3.rs index ea9ad39a70d..f0985d74456 100644 --- a/tests/ui/alloc-error/alloc-error-handler-bad-signature-3.rs +++ b/tests/ui/alloc-error/alloc-error-handler-bad-signature-3.rs @@ -1,4 +1,4 @@ -// compile-flags:-C panic=abort +//@ compile-flags:-C panic=abort #![feature(alloc_error_handler)] #![no_std] diff --git a/tests/ui/alloc-error/default-alloc-error-hook.rs b/tests/ui/alloc-error/default-alloc-error-hook.rs index 8be09500f4e..a8a2027cc45 100644 --- a/tests/ui/alloc-error/default-alloc-error-hook.rs +++ b/tests/ui/alloc-error/default-alloc-error-hook.rs @@ -1,6 +1,6 @@ -// run-pass -// ignore-emscripten no processes -// ignore-sgx no processes +//@ run-pass +//@ ignore-emscripten no processes +//@ ignore-sgx no processes use std::alloc::{Layout, handle_alloc_error}; use std::env; diff --git a/tests/ui/allocator/auxiliary/custom-as-global.rs b/tests/ui/allocator/auxiliary/custom-as-global.rs index a5e96e77501..89e7e779b09 100644 --- a/tests/ui/allocator/auxiliary/custom-as-global.rs +++ b/tests/ui/allocator/auxiliary/custom-as-global.rs @@ -1,4 +1,4 @@ -// no-prefer-dynamic +//@ no-prefer-dynamic #![crate_type = "rlib"] diff --git a/tests/ui/allocator/auxiliary/custom.rs b/tests/ui/allocator/auxiliary/custom.rs index b0ec9ab0929..b6835307dec 100644 --- a/tests/ui/allocator/auxiliary/custom.rs +++ b/tests/ui/allocator/auxiliary/custom.rs @@ -1,4 +1,4 @@ -// no-prefer-dynamic +//@ no-prefer-dynamic #![feature(allocator_api)] #![crate_type = "rlib"] diff --git a/tests/ui/allocator/auxiliary/helper.rs b/tests/ui/allocator/auxiliary/helper.rs index 008fb3501d9..c638546a947 100644 --- a/tests/ui/allocator/auxiliary/helper.rs +++ b/tests/ui/allocator/auxiliary/helper.rs @@ -1,4 +1,4 @@ -// no-prefer-dynamic +//@ no-prefer-dynamic #![crate_type = "rlib"] #![no_std] diff --git a/tests/ui/allocator/auxiliary/system-allocator.rs b/tests/ui/allocator/auxiliary/system-allocator.rs index 97b86bbc96d..bfd04e1e0ba 100644 --- a/tests/ui/allocator/auxiliary/system-allocator.rs +++ b/tests/ui/allocator/auxiliary/system-allocator.rs @@ -1,4 +1,4 @@ -// no-prefer-dynamic +//@ no-prefer-dynamic #![crate_type = "rlib"] diff --git a/tests/ui/allocator/auxiliary/system-allocator2.rs b/tests/ui/allocator/auxiliary/system-allocator2.rs index 97b86bbc96d..bfd04e1e0ba 100644 --- a/tests/ui/allocator/auxiliary/system-allocator2.rs +++ b/tests/ui/allocator/auxiliary/system-allocator2.rs @@ -1,4 +1,4 @@ -// no-prefer-dynamic +//@ no-prefer-dynamic #![crate_type = "rlib"] diff --git a/tests/ui/allocator/custom-in-block.rs b/tests/ui/allocator/custom-in-block.rs index 12813a1fc8b..4a8501aa3d2 100644 --- a/tests/ui/allocator/custom-in-block.rs +++ b/tests/ui/allocator/custom-in-block.rs @@ -1,7 +1,7 @@ -// run-pass -// no-prefer-dynamic -// aux-build:custom.rs -// aux-build:helper.rs +//@ run-pass +//@ no-prefer-dynamic +//@ aux-build:custom.rs +//@ aux-build:helper.rs extern crate custom; extern crate helper; diff --git a/tests/ui/allocator/custom-in-submodule.rs b/tests/ui/allocator/custom-in-submodule.rs index ea341b1ac14..f9b1b5237d7 100644 --- a/tests/ui/allocator/custom-in-submodule.rs +++ b/tests/ui/allocator/custom-in-submodule.rs @@ -1,7 +1,7 @@ -// run-pass -// no-prefer-dynamic -// aux-build:custom.rs -// aux-build:helper.rs +//@ run-pass +//@ no-prefer-dynamic +//@ aux-build:custom.rs +//@ aux-build:helper.rs extern crate custom; extern crate helper; diff --git a/tests/ui/allocator/custom.rs b/tests/ui/allocator/custom.rs index 10cbc23c427..97de54dd4d6 100644 --- a/tests/ui/allocator/custom.rs +++ b/tests/ui/allocator/custom.rs @@ -1,7 +1,7 @@ -// run-pass +//@ run-pass -// aux-build:helper.rs -// no-prefer-dynamic +//@ aux-build:helper.rs +//@ no-prefer-dynamic #![feature(allocator_api)] #![feature(slice_ptr_get)] diff --git a/tests/ui/allocator/hygiene.rs b/tests/ui/allocator/hygiene.rs index 9bd8406a276..9bf04e20f18 100644 --- a/tests/ui/allocator/hygiene.rs +++ b/tests/ui/allocator/hygiene.rs @@ -1,7 +1,7 @@ -// run-pass -// no-prefer-dynamic -// aux-build:custom.rs -// aux-build:helper.rs +//@ run-pass +//@ no-prefer-dynamic +//@ aux-build:custom.rs +//@ aux-build:helper.rs #![allow(nonstandard_style)] diff --git a/tests/ui/allocator/no_std-alloc-error-handler-custom.rs b/tests/ui/allocator/no_std-alloc-error-handler-custom.rs index 2323cf46d6f..f4825a910b0 100644 --- a/tests/ui/allocator/no_std-alloc-error-handler-custom.rs +++ b/tests/ui/allocator/no_std-alloc-error-handler-custom.rs @@ -1,11 +1,11 @@ -// run-pass -// ignore-android no libc -// ignore-emscripten no libc -// ignore-sgx no libc -// ignore-wasm32 no libc -// only-linux -// compile-flags:-C panic=abort -// aux-build:helper.rs +//@ run-pass +//@ ignore-android no libc +//@ ignore-emscripten no libc +//@ ignore-sgx no libc +//@ ignore-wasm32 no libc +//@ only-linux +//@ compile-flags:-C panic=abort +//@ aux-build:helper.rs #![feature(rustc_private, lang_items)] #![feature(alloc_error_handler)] diff --git a/tests/ui/allocator/no_std-alloc-error-handler-default.rs b/tests/ui/allocator/no_std-alloc-error-handler-default.rs index 488434a9a72..1fa1797bf9c 100644 --- a/tests/ui/allocator/no_std-alloc-error-handler-default.rs +++ b/tests/ui/allocator/no_std-alloc-error-handler-default.rs @@ -1,11 +1,11 @@ -// run-pass -// ignore-android no libc -// ignore-emscripten no libc -// ignore-sgx no libc -// ignore-wasm32 no libc -// only-linux -// compile-flags:-C panic=abort -// aux-build:helper.rs +//@ run-pass +//@ ignore-android no libc +//@ ignore-emscripten no libc +//@ ignore-sgx no libc +//@ ignore-wasm32 no libc +//@ only-linux +//@ compile-flags:-C panic=abort +//@ aux-build:helper.rs #![feature(rustc_private, lang_items)] #![no_std] diff --git a/tests/ui/allocator/object-safe.rs b/tests/ui/allocator/object-safe.rs index fae7ab7fe33..1c1f4fe0bf6 100644 --- a/tests/ui/allocator/object-safe.rs +++ b/tests/ui/allocator/object-safe.rs @@ -1,4 +1,4 @@ -// run-pass +//@ run-pass // Check that `Allocator` is object safe, this allows for polymorphic allocators diff --git a/tests/ui/allocator/two-allocators2.rs b/tests/ui/allocator/two-allocators2.rs index 6dfefe19c7f..b3bb4598c77 100644 --- a/tests/ui/allocator/two-allocators2.rs +++ b/tests/ui/allocator/two-allocators2.rs @@ -1,6 +1,6 @@ -// aux-build:system-allocator.rs -// no-prefer-dynamic -// error-pattern: the `#[global_allocator]` in +//@ aux-build:system-allocator.rs +//@ no-prefer-dynamic +//@ error-pattern: the `#[global_allocator]` in extern crate system_allocator; diff --git a/tests/ui/allocator/two-allocators3.rs b/tests/ui/allocator/two-allocators3.rs index 31dea2d4478..0cb3879666d 100644 --- a/tests/ui/allocator/two-allocators3.rs +++ b/tests/ui/allocator/two-allocators3.rs @@ -1,7 +1,7 @@ -// aux-build:system-allocator.rs -// aux-build:system-allocator2.rs -// no-prefer-dynamic -// error-pattern: the `#[global_allocator]` in +//@ aux-build:system-allocator.rs +//@ aux-build:system-allocator2.rs +//@ no-prefer-dynamic +//@ error-pattern: the `#[global_allocator]` in extern crate system_allocator; diff --git a/tests/ui/allocator/xcrate-use.rs b/tests/ui/allocator/xcrate-use.rs index edd4df75e8b..5934d739813 100644 --- a/tests/ui/allocator/xcrate-use.rs +++ b/tests/ui/allocator/xcrate-use.rs @@ -1,8 +1,8 @@ -// run-pass +//@ run-pass -// aux-build:custom.rs -// aux-build:helper.rs -// no-prefer-dynamic +//@ aux-build:custom.rs +//@ aux-build:helper.rs +//@ no-prefer-dynamic #![feature(allocator_api)] #![feature(slice_ptr_get)] diff --git a/tests/ui/allocator/xcrate-use2.rs b/tests/ui/allocator/xcrate-use2.rs index d8478fb5eaa..a48b0beeb07 100644 --- a/tests/ui/allocator/xcrate-use2.rs +++ b/tests/ui/allocator/xcrate-use2.rs @@ -1,9 +1,9 @@ -// run-pass +//@ run-pass -// aux-build:custom.rs -// aux-build:custom-as-global.rs -// aux-build:helper.rs -// no-prefer-dynamic +//@ aux-build:custom.rs +//@ aux-build:custom-as-global.rs +//@ aux-build:helper.rs +//@ no-prefer-dynamic #![feature(allocator_api)] diff --git a/tests/ui/annotate-snippet/auxiliary/multispan.rs b/tests/ui/annotate-snippet/auxiliary/multispan.rs index c05d15643db..b5f1ed9b56a 100644 --- a/tests/ui/annotate-snippet/auxiliary/multispan.rs +++ b/tests/ui/annotate-snippet/auxiliary/multispan.rs @@ -1,5 +1,5 @@ -// force-host -// no-prefer-dynamic +//@ force-host +//@ no-prefer-dynamic #![crate_type = "proc-macro"] #![feature(proc_macro_diagnostic, proc_macro_span, proc_macro_def_site)] diff --git a/tests/ui/annotate-snippet/missing-type.rs b/tests/ui/annotate-snippet/missing-type.rs index f5facc16b31..ea1c2521103 100644 --- a/tests/ui/annotate-snippet/missing-type.rs +++ b/tests/ui/annotate-snippet/missing-type.rs @@ -1,5 +1,5 @@ -// compile-flags: --error-format human-annotate-rs -Z unstable-options -// error-pattern:cannot find type `Iter` in this scope +//@ compile-flags: --error-format human-annotate-rs -Z unstable-options +//@ error-pattern:cannot find type `Iter` in this scope pub fn main() { let x: Iter; diff --git a/tests/ui/annotate-snippet/multiple-files.rs b/tests/ui/annotate-snippet/multiple-files.rs index 981cdbb10a9..c67a31d8f07 100644 --- a/tests/ui/annotate-snippet/multiple-files.rs +++ b/tests/ui/annotate-snippet/multiple-files.rs @@ -1,5 +1,5 @@ -// aux-build:other_file.rs -// compile-flags: --error-format human-annotate-rs -Z unstable-options +//@ aux-build:other_file.rs +//@ compile-flags: --error-format human-annotate-rs -Z unstable-options extern crate other_file; diff --git a/tests/ui/annotate-snippet/multispan.rs b/tests/ui/annotate-snippet/multispan.rs index d7241b80364..c9ec4043e37 100644 --- a/tests/ui/annotate-snippet/multispan.rs +++ b/tests/ui/annotate-snippet/multispan.rs @@ -1,6 +1,6 @@ -// aux-build:multispan.rs -// error-pattern:hello to you, too! -// compile-flags: --error-format human-annotate-rs -Z unstable-options +//@ aux-build:multispan.rs +//@ error-pattern:hello to you, too! +//@ compile-flags: --error-format human-annotate-rs -Z unstable-options #![feature(proc_macro_hygiene)] diff --git a/tests/ui/anon-params/anon-params-denied-2018.rs b/tests/ui/anon-params/anon-params-denied-2018.rs index 95533cf3dfb..3602b401f85 100644 --- a/tests/ui/anon-params/anon-params-denied-2018.rs +++ b/tests/ui/anon-params/anon-params-denied-2018.rs @@ -1,6 +1,6 @@ // Tests that anonymous parameters are a hard error in edition 2018. -// edition:2018 +//@ edition:2018 trait T { fn foo(i32); //~ expected one of `:`, `@`, or `|`, found `)` diff --git a/tests/ui/anon-params/anon-params-deprecated.fixed b/tests/ui/anon-params/anon-params-deprecated.fixed index 8ec1d41a709..2a506d4b3e1 100644 --- a/tests/ui/anon-params/anon-params-deprecated.fixed +++ b/tests/ui/anon-params/anon-params-deprecated.fixed @@ -1,9 +1,9 @@ #![warn(anonymous_parameters)] // Test for the anonymous_parameters deprecation lint (RFC 1685) -// check-pass -// edition:2015 -// run-rustfix +//@ check-pass +//@ edition:2015 +//@ run-rustfix #[allow(dead_code)] trait T { diff --git a/tests/ui/anon-params/anon-params-deprecated.rs b/tests/ui/anon-params/anon-params-deprecated.rs index 108ba60a02f..e436760f314 100644 --- a/tests/ui/anon-params/anon-params-deprecated.rs +++ b/tests/ui/anon-params/anon-params-deprecated.rs @@ -1,9 +1,9 @@ #![warn(anonymous_parameters)] // Test for the anonymous_parameters deprecation lint (RFC 1685) -// check-pass -// edition:2015 -// run-rustfix +//@ check-pass +//@ edition:2015 +//@ run-rustfix #[allow(dead_code)] trait T { diff --git a/tests/ui/anon-params/anon-params-edition-hygiene.rs b/tests/ui/anon-params/anon-params-edition-hygiene.rs index 0b69081d4ed..607412f44c4 100644 --- a/tests/ui/anon-params/anon-params-edition-hygiene.rs +++ b/tests/ui/anon-params/anon-params-edition-hygiene.rs @@ -1,5 +1,5 @@ -// edition:2018 -// aux-build:anon-params-edition-hygiene.rs +//@ edition:2018 +//@ aux-build:anon-params-edition-hygiene.rs // This warning is still surfaced #![allow(anonymous_parameters)] diff --git a/tests/ui/anon-params/auxiliary/anon-params-edition-hygiene.rs b/tests/ui/anon-params/auxiliary/anon-params-edition-hygiene.rs index 28365655293..188f5350256 100644 --- a/tests/ui/anon-params/auxiliary/anon-params-edition-hygiene.rs +++ b/tests/ui/anon-params/auxiliary/anon-params-edition-hygiene.rs @@ -1,4 +1,4 @@ -// edition:2015 +//@ edition:2015 #[macro_export] macro_rules! generate_trait_2015_ident { diff --git a/tests/ui/argument-suggestions/issue-109425.fixed b/tests/ui/argument-suggestions/issue-109425.fixed index 143ddf99586..5d96f457c88 100644 --- a/tests/ui/argument-suggestions/issue-109425.fixed +++ b/tests/ui/argument-suggestions/issue-109425.fixed @@ -1,4 +1,4 @@ -// run-rustfix +//@ run-rustfix fn f() {} fn i(_: u32) {} diff --git a/tests/ui/argument-suggestions/issue-109425.rs b/tests/ui/argument-suggestions/issue-109425.rs index a845c419555..bb9d37ee0ff 100644 --- a/tests/ui/argument-suggestions/issue-109425.rs +++ b/tests/ui/argument-suggestions/issue-109425.rs @@ -1,4 +1,4 @@ -// run-rustfix +//@ run-rustfix fn f() {} fn i(_: u32) {} diff --git a/tests/ui/array-slice-vec/array_const_index-2.rs b/tests/ui/array-slice-vec/array_const_index-2.rs index 8ee225f5cdf..30338e0ab87 100644 --- a/tests/ui/array-slice-vec/array_const_index-2.rs +++ b/tests/ui/array-slice-vec/array_const_index-2.rs @@ -1,4 +1,4 @@ -// run-pass +//@ run-pass #![allow(dead_code)] #![allow(stable_features)] diff --git a/tests/ui/array-slice-vec/bounds-check-no-overflow.rs b/tests/ui/array-slice-vec/bounds-check-no-overflow.rs index 577853a4e91..4614df44084 100644 --- a/tests/ui/array-slice-vec/bounds-check-no-overflow.rs +++ b/tests/ui/array-slice-vec/bounds-check-no-overflow.rs @@ -1,6 +1,6 @@ -// run-fail -// error-pattern:index out of bounds -// ignore-emscripten no processes +//@ run-fail +//@ error-pattern:index out of bounds +//@ ignore-emscripten no processes use std::mem::size_of; diff --git a/tests/ui/array-slice-vec/box-of-array-of-drop-1.rs b/tests/ui/array-slice-vec/box-of-array-of-drop-1.rs index 2b3ece67b34..d64df4f7e4d 100644 --- a/tests/ui/array-slice-vec/box-of-array-of-drop-1.rs +++ b/tests/ui/array-slice-vec/box-of-array-of-drop-1.rs @@ -1,11 +1,11 @@ -// run-pass -// needs-unwind +//@ run-pass +//@ needs-unwind #![allow(overflowing_literals)] // Test that we cleanup a fixed size Box<[D; k]> properly when D has a // destructor. -// ignore-emscripten no threads support +//@ ignore-emscripten no threads support use std::thread; use std::sync::atomic::{AtomicUsize, Ordering}; diff --git a/tests/ui/array-slice-vec/box-of-array-of-drop-2.rs b/tests/ui/array-slice-vec/box-of-array-of-drop-2.rs index c0ca4587507..5ca3d60ad1d 100644 --- a/tests/ui/array-slice-vec/box-of-array-of-drop-2.rs +++ b/tests/ui/array-slice-vec/box-of-array-of-drop-2.rs @@ -1,11 +1,11 @@ -// run-pass -// needs-unwind +//@ run-pass +//@ needs-unwind #![allow(overflowing_literals)] // Test that we cleanup dynamic sized Box<[D]> properly when D has a // destructor. -// ignore-emscripten no threads support +//@ ignore-emscripten no threads support use std::thread; use std::sync::atomic::{AtomicUsize, Ordering}; diff --git a/tests/ui/array-slice-vec/byte-literals.rs b/tests/ui/array-slice-vec/byte-literals.rs index 2649c2eac33..950c118c07f 100644 --- a/tests/ui/array-slice-vec/byte-literals.rs +++ b/tests/ui/array-slice-vec/byte-literals.rs @@ -1,4 +1,4 @@ -// run-pass +//@ run-pass // diff --git a/tests/ui/array-slice-vec/cast-in-array-size.rs b/tests/ui/array-slice-vec/cast-in-array-size.rs index b112dcaef3e..cb5072564b2 100644 --- a/tests/ui/array-slice-vec/cast-in-array-size.rs +++ b/tests/ui/array-slice-vec/cast-in-array-size.rs @@ -1,8 +1,8 @@ -// run-pass +//@ run-pass // issues #10618 and #16382 -// pretty-expanded FIXME #23616 +//@ pretty-expanded FIXME #23616 const SIZE: isize = 25; diff --git a/tests/ui/array-slice-vec/check-static-slice.rs b/tests/ui/array-slice-vec/check-static-slice.rs index 1c607d13426..820a9ea4fff 100644 --- a/tests/ui/array-slice-vec/check-static-slice.rs +++ b/tests/ui/array-slice-vec/check-static-slice.rs @@ -1,4 +1,4 @@ -// run-pass +//@ run-pass // Check that the various ways of getting to a reference to a vec (both sized // and unsized) work properly. diff --git a/tests/ui/array-slice-vec/copy-out-of-array-1.rs b/tests/ui/array-slice-vec/copy-out-of-array-1.rs index c6d311148d0..894ca2f9302 100644 --- a/tests/ui/array-slice-vec/copy-out-of-array-1.rs +++ b/tests/ui/array-slice-vec/copy-out-of-array-1.rs @@ -1,4 +1,4 @@ -// run-pass +//@ run-pass // Ensure that we can copy out of a fixed-size array. // diff --git a/tests/ui/array-slice-vec/destructure-array-1.rs b/tests/ui/array-slice-vec/destructure-array-1.rs index 74d893ee5b2..09eef1dc67f 100644 --- a/tests/ui/array-slice-vec/destructure-array-1.rs +++ b/tests/ui/array-slice-vec/destructure-array-1.rs @@ -1,4 +1,4 @@ -// run-pass +//@ run-pass // Ensure that we can do a destructuring bind of a fixed-size array, // even when the element type has a destructor. diff --git a/tests/ui/array-slice-vec/dst-raw-slice.rs b/tests/ui/array-slice-vec/dst-raw-slice.rs index 371d16f093a..f1281f4e302 100644 --- a/tests/ui/array-slice-vec/dst-raw-slice.rs +++ b/tests/ui/array-slice-vec/dst-raw-slice.rs @@ -1,8 +1,8 @@ // Test bounds checking for DST raw slices -// run-fail -// error-pattern:index out of bounds -// ignore-emscripten no processes +//@ run-fail +//@ error-pattern:index out of bounds +//@ ignore-emscripten no processes #[allow(unconditional_panic)] fn main() { diff --git a/tests/ui/array-slice-vec/empty-mutable-vec.rs b/tests/ui/array-slice-vec/empty-mutable-vec.rs index 91ab280b9c7..663071bf613 100644 --- a/tests/ui/array-slice-vec/empty-mutable-vec.rs +++ b/tests/ui/array-slice-vec/empty-mutable-vec.rs @@ -1,6 +1,6 @@ -// run-pass +//@ run-pass -// pretty-expanded FIXME #23616 +//@ pretty-expanded FIXME #23616 #![allow(unused_mut)] diff --git a/tests/ui/array-slice-vec/estr-slice.rs b/tests/ui/array-slice-vec/estr-slice.rs index cd2c1722065..6cac3d721f1 100644 --- a/tests/ui/array-slice-vec/estr-slice.rs +++ b/tests/ui/array-slice-vec/estr-slice.rs @@ -1,4 +1,4 @@ -// run-pass +//@ run-pass pub fn main() { diff --git a/tests/ui/array-slice-vec/evec-slice.rs b/tests/ui/array-slice-vec/evec-slice.rs index 4bdf2dbdd6e..0ed9cd1f6f8 100644 --- a/tests/ui/array-slice-vec/evec-slice.rs +++ b/tests/ui/array-slice-vec/evec-slice.rs @@ -1,4 +1,4 @@ -// run-pass +//@ run-pass #![allow(unused_assignments)] pub fn main() { diff --git a/tests/ui/array-slice-vec/fixed_length_copy.rs b/tests/ui/array-slice-vec/fixed_length_copy.rs index f73173e8484..64f8480f8af 100644 --- a/tests/ui/array-slice-vec/fixed_length_copy.rs +++ b/tests/ui/array-slice-vec/fixed_length_copy.rs @@ -1,4 +1,4 @@ -// run-pass +//@ run-pass pub fn main() { diff --git a/tests/ui/array-slice-vec/huge-largest-array.rs b/tests/ui/array-slice-vec/huge-largest-array.rs index 9e78162c813..ff314a4ab1d 100644 --- a/tests/ui/array-slice-vec/huge-largest-array.rs +++ b/tests/ui/array-slice-vec/huge-largest-array.rs @@ -1,4 +1,4 @@ -// run-pass +//@ run-pass use std::mem::size_of; diff --git a/tests/ui/array-slice-vec/infer_array_len.rs b/tests/ui/array-slice-vec/infer_array_len.rs index 547c1f5727f..2a342681e0f 100644 --- a/tests/ui/array-slice-vec/infer_array_len.rs +++ b/tests/ui/array-slice-vec/infer_array_len.rs @@ -1,4 +1,4 @@ -// check-pass +//@ check-pass struct A; impl From for [u8; 2] { diff --git a/tests/ui/array-slice-vec/issue-15730.rs b/tests/ui/array-slice-vec/issue-15730.rs index dacffd154fc..fe9d908a1ff 100644 --- a/tests/ui/array-slice-vec/issue-15730.rs +++ b/tests/ui/array-slice-vec/issue-15730.rs @@ -1,7 +1,7 @@ -// run-pass +//@ run-pass #![allow(unused_mut)] #![allow(unused_variables)] -// pretty-expanded FIXME #23616 +//@ pretty-expanded FIXME #23616 fn main() { let mut array = [1, 2, 3]; diff --git a/tests/ui/array-slice-vec/issue-18425.rs b/tests/ui/array-slice-vec/issue-18425.rs index 354c14a756a..22345718ad8 100644 --- a/tests/ui/array-slice-vec/issue-18425.rs +++ b/tests/ui/array-slice-vec/issue-18425.rs @@ -1,8 +1,8 @@ -// run-pass +//@ run-pass // Check that codegen doesn't ICE when codegenning an array repeat // expression with a count of 1 and a non-Copy element type. -// pretty-expanded FIXME #23616 +//@ pretty-expanded FIXME #23616 fn main() { let _ = [Box::new(1_usize); 1]; diff --git a/tests/ui/array-slice-vec/ivec-pass-by-value.rs b/tests/ui/array-slice-vec/ivec-pass-by-value.rs index e22aef96330..67657859408 100644 --- a/tests/ui/array-slice-vec/ivec-pass-by-value.rs +++ b/tests/ui/array-slice-vec/ivec-pass-by-value.rs @@ -1,4 +1,4 @@ -// run-pass +//@ run-pass fn f(_a: Vec ) { } pub fn main() { f(vec![1, 2, 3, 4, 5]); } diff --git a/tests/ui/array-slice-vec/mut-vstore-expr.rs b/tests/ui/array-slice-vec/mut-vstore-expr.rs index 75b309a4839..809c001b079 100644 --- a/tests/ui/array-slice-vec/mut-vstore-expr.rs +++ b/tests/ui/array-slice-vec/mut-vstore-expr.rs @@ -1,5 +1,5 @@ -// run-pass -// pretty-expanded FIXME #23616 +//@ run-pass +//@ pretty-expanded FIXME #23616 pub fn main() { let _x: &mut [isize] = &mut [ 1, 2, 3 ]; diff --git a/tests/ui/array-slice-vec/mutability-inherits-through-fixed-length-vec.rs b/tests/ui/array-slice-vec/mutability-inherits-through-fixed-length-vec.rs index 7afb9d8461f..ca78db63ce0 100644 --- a/tests/ui/array-slice-vec/mutability-inherits-through-fixed-length-vec.rs +++ b/tests/ui/array-slice-vec/mutability-inherits-through-fixed-length-vec.rs @@ -1,4 +1,4 @@ -// run-pass +//@ run-pass fn test1() { diff --git a/tests/ui/array-slice-vec/mutable-alias-vec.rs b/tests/ui/array-slice-vec/mutable-alias-vec.rs index 98dd46824fa..870a4f12fec 100644 --- a/tests/ui/array-slice-vec/mutable-alias-vec.rs +++ b/tests/ui/array-slice-vec/mutable-alias-vec.rs @@ -1,4 +1,4 @@ -// run-pass +//@ run-pass fn grow(v: &mut Vec ) { v.push(1); diff --git a/tests/ui/array-slice-vec/nested-vec-1.rs b/tests/ui/array-slice-vec/nested-vec-1.rs index 02a3ccf46f2..60dbb5e5061 100644 --- a/tests/ui/array-slice-vec/nested-vec-1.rs +++ b/tests/ui/array-slice-vec/nested-vec-1.rs @@ -1,4 +1,4 @@ -// run-pass +//@ run-pass // Test that using the `vec!` macro nested within itself works diff --git a/tests/ui/array-slice-vec/nested-vec-2.rs b/tests/ui/array-slice-vec/nested-vec-2.rs index d4a704d767e..3897a52a1cb 100644 --- a/tests/ui/array-slice-vec/nested-vec-2.rs +++ b/tests/ui/array-slice-vec/nested-vec-2.rs @@ -1,4 +1,4 @@ -// run-pass +//@ run-pass // Test that using the `vec!` macro nested within itself works // when the contents implement Drop diff --git a/tests/ui/array-slice-vec/nested-vec-3.rs b/tests/ui/array-slice-vec/nested-vec-3.rs index b3ae683a8a6..ce61401aab4 100644 --- a/tests/ui/array-slice-vec/nested-vec-3.rs +++ b/tests/ui/array-slice-vec/nested-vec-3.rs @@ -1,8 +1,8 @@ -// run-pass -// needs-unwind +//@ run-pass +//@ needs-unwind #![allow(overflowing_literals)] -// ignore-emscripten no threads support +//@ ignore-emscripten no threads support // Test that using the `vec!` macro nested within itself works when // the contents implement Drop and we hit a panic in the middle of diff --git a/tests/ui/array-slice-vec/new-style-fixed-length-vec.rs b/tests/ui/array-slice-vec/new-style-fixed-length-vec.rs index 454f94be876..95ff2539a5d 100644 --- a/tests/ui/array-slice-vec/new-style-fixed-length-vec.rs +++ b/tests/ui/array-slice-vec/new-style-fixed-length-vec.rs @@ -1,4 +1,4 @@ -// run-pass +//@ run-pass static FOO: [isize; 3] = [1, 2, 3]; diff --git a/tests/ui/array-slice-vec/rcvr-borrowed-to-slice.rs b/tests/ui/array-slice-vec/rcvr-borrowed-to-slice.rs index 17cf7e335b9..dd767241ddb 100644 --- a/tests/ui/array-slice-vec/rcvr-borrowed-to-slice.rs +++ b/tests/ui/array-slice-vec/rcvr-borrowed-to-slice.rs @@ -1,4 +1,4 @@ -// run-pass +//@ run-pass #![allow(non_camel_case_types)] diff --git a/tests/ui/array-slice-vec/repeated-vector-syntax.rs b/tests/ui/array-slice-vec/repeated-vector-syntax.rs index 4458eb06dd5..ee6114e0dc7 100644 --- a/tests/ui/array-slice-vec/repeated-vector-syntax.rs +++ b/tests/ui/array-slice-vec/repeated-vector-syntax.rs @@ -1,4 +1,4 @@ -// run-pass +//@ run-pass pub fn main() { let x = [ [true]; 512 ]; diff --git a/tests/ui/array-slice-vec/show-boxed-slice.rs b/tests/ui/array-slice-vec/show-boxed-slice.rs index 3ae3686e423..89521eaf3fe 100644 --- a/tests/ui/array-slice-vec/show-boxed-slice.rs +++ b/tests/ui/array-slice-vec/show-boxed-slice.rs @@ -1,4 +1,4 @@ -// run-pass +//@ run-pass #[derive(Debug)] struct Foo(#[allow(dead_code)] Box<[u8]>); diff --git a/tests/ui/array-slice-vec/slice-of-zero-size-elements.rs b/tests/ui/array-slice-vec/slice-of-zero-size-elements.rs index 83b08a3db4c..7aa8a251fec 100644 --- a/tests/ui/array-slice-vec/slice-of-zero-size-elements.rs +++ b/tests/ui/array-slice-vec/slice-of-zero-size-elements.rs @@ -1,7 +1,7 @@ -// run-pass +//@ run-pass #![allow(stable_features)] -// compile-flags: -C debug-assertions +//@ compile-flags: -C debug-assertions #![feature(iter_to_slice)] diff --git a/tests/ui/array-slice-vec/slice-panic-1.rs b/tests/ui/array-slice-vec/slice-panic-1.rs index 3829078aba5..4436b633856 100644 --- a/tests/ui/array-slice-vec/slice-panic-1.rs +++ b/tests/ui/array-slice-vec/slice-panic-1.rs @@ -1,7 +1,7 @@ -// run-pass -// needs-unwind +//@ run-pass +//@ needs-unwind -// ignore-emscripten no threads support +//@ ignore-emscripten no threads support // Test that if a slicing expr[..] fails, the correct cleanups happen. diff --git a/tests/ui/array-slice-vec/slice-panic-2.rs b/tests/ui/array-slice-vec/slice-panic-2.rs index d83c611d3bb..4bd13988424 100644 --- a/tests/ui/array-slice-vec/slice-panic-2.rs +++ b/tests/ui/array-slice-vec/slice-panic-2.rs @@ -1,7 +1,7 @@ -// run-pass -// needs-unwind +//@ run-pass +//@ needs-unwind -// ignore-emscripten no threads support +//@ ignore-emscripten no threads support // Test that if a slicing expr[..] fails, the correct cleanups happen. diff --git a/tests/ui/array-slice-vec/slice.rs b/tests/ui/array-slice-vec/slice.rs index a514e202773..2adcd96f598 100644 --- a/tests/ui/array-slice-vec/slice.rs +++ b/tests/ui/array-slice-vec/slice.rs @@ -1,4 +1,4 @@ -// run-pass +//@ run-pass #![allow(unused_variables)] // Test slicing sugar. diff --git a/tests/ui/array-slice-vec/slice_binary_search.rs b/tests/ui/array-slice-vec/slice_binary_search.rs index 4d8022ecba7..1981afa7f05 100644 --- a/tests/ui/array-slice-vec/slice_binary_search.rs +++ b/tests/ui/array-slice-vec/slice_binary_search.rs @@ -1,4 +1,4 @@ -// run-pass +//@ run-pass // Test binary_search_by_key lifetime. Issue #34683 diff --git a/tests/ui/array-slice-vec/slice_is_sorted_by_borrow.rs b/tests/ui/array-slice-vec/slice_is_sorted_by_borrow.rs index 073280d0fab..31f59f8f724 100644 --- a/tests/ui/array-slice-vec/slice_is_sorted_by_borrow.rs +++ b/tests/ui/array-slice-vec/slice_is_sorted_by_borrow.rs @@ -1,4 +1,4 @@ -// check-pass +//@ check-pass // regression test for https://github.com/rust-lang/rust/issues/53485#issuecomment-885393452 #![feature(is_sorted)] diff --git a/tests/ui/array-slice-vec/subslice-patterns-const-eval-match.rs b/tests/ui/array-slice-vec/subslice-patterns-const-eval-match.rs index 5a6283e9f13..273dd500c08 100644 --- a/tests/ui/array-slice-vec/subslice-patterns-const-eval-match.rs +++ b/tests/ui/array-slice-vec/subslice-patterns-const-eval-match.rs @@ -1,6 +1,6 @@ // Test that slice subslice patterns are correctly handled in const evaluation. -// run-pass +//@ run-pass #[derive(PartialEq, Debug, Clone)] struct N(u8); diff --git a/tests/ui/array-slice-vec/subslice-patterns-const-eval.rs b/tests/ui/array-slice-vec/subslice-patterns-const-eval.rs index 0b793fa0120..4995a842008 100644 --- a/tests/ui/array-slice-vec/subslice-patterns-const-eval.rs +++ b/tests/ui/array-slice-vec/subslice-patterns-const-eval.rs @@ -1,6 +1,6 @@ // Test that array subslice patterns are correctly handled in const evaluation. -// run-pass +//@ run-pass #[derive(PartialEq, Debug, Clone)] struct N(u8); diff --git a/tests/ui/array-slice-vec/suggest-array-length.fixed b/tests/ui/array-slice-vec/suggest-array-length.fixed index 867c18a7d5e..29f85da56e5 100644 --- a/tests/ui/array-slice-vec/suggest-array-length.fixed +++ b/tests/ui/array-slice-vec/suggest-array-length.fixed @@ -1,4 +1,4 @@ -// run-rustfix +//@ run-rustfix #![allow(unused_variables, dead_code, non_upper_case_globals)] fn main() { diff --git a/tests/ui/array-slice-vec/suggest-array-length.rs b/tests/ui/array-slice-vec/suggest-array-length.rs index f66b3d4a899..82d871cf875 100644 --- a/tests/ui/array-slice-vec/suggest-array-length.rs +++ b/tests/ui/array-slice-vec/suggest-array-length.rs @@ -1,4 +1,4 @@ -// run-rustfix +//@ run-rustfix #![allow(unused_variables, dead_code, non_upper_case_globals)] fn main() { diff --git a/tests/ui/array-slice-vec/variance-vec-covariant.rs b/tests/ui/array-slice-vec/variance-vec-covariant.rs index d7e64132f89..710f7e24aa4 100644 --- a/tests/ui/array-slice-vec/variance-vec-covariant.rs +++ b/tests/ui/array-slice-vec/variance-vec-covariant.rs @@ -1,4 +1,4 @@ -// run-pass +//@ run-pass // Test that vec is now covariant in its argument type. diff --git a/tests/ui/array-slice-vec/vec-dst.rs b/tests/ui/array-slice-vec/vec-dst.rs index c58ddbc4239..39575fbfa14 100644 --- a/tests/ui/array-slice-vec/vec-dst.rs +++ b/tests/ui/array-slice-vec/vec-dst.rs @@ -1,4 +1,4 @@ -// run-pass +//@ run-pass pub fn main() { // Tests for indexing into Box<[T; n]>/& [T; n] diff --git a/tests/ui/array-slice-vec/vec-fixed-length.rs b/tests/ui/array-slice-vec/vec-fixed-length.rs index 908c39c7951..70ceb7f85bc 100644 --- a/tests/ui/array-slice-vec/vec-fixed-length.rs +++ b/tests/ui/array-slice-vec/vec-fixed-length.rs @@ -1,4 +1,4 @@ -// run-pass +//@ run-pass use std::mem::size_of; diff --git a/tests/ui/array-slice-vec/vec-late-init.rs b/tests/ui/array-slice-vec/vec-late-init.rs index 5dee3608256..039f3838ec2 100644 --- a/tests/ui/array-slice-vec/vec-late-init.rs +++ b/tests/ui/array-slice-vec/vec-late-init.rs @@ -1,4 +1,4 @@ -// run-pass +//@ run-pass #![allow(unused_mut)] diff --git a/tests/ui/array-slice-vec/vec-macro-no-std.rs b/tests/ui/array-slice-vec/vec-macro-no-std.rs index 443895f7c48..76a1b4951d6 100644 --- a/tests/ui/array-slice-vec/vec-macro-no-std.rs +++ b/tests/ui/array-slice-vec/vec-macro-no-std.rs @@ -1,6 +1,6 @@ -// run-pass +//@ run-pass -// ignore-emscripten no no_std executables +//@ ignore-emscripten no no_std executables #![feature(lang_items, start, rustc_private)] #![no_std] diff --git a/tests/ui/array-slice-vec/vec-macro-rvalue-scope.rs b/tests/ui/array-slice-vec/vec-macro-rvalue-scope.rs index bde01037181..7437de5d805 100644 --- a/tests/ui/array-slice-vec/vec-macro-rvalue-scope.rs +++ b/tests/ui/array-slice-vec/vec-macro-rvalue-scope.rs @@ -1,4 +1,4 @@ -// run-pass +//@ run-pass fn one() -> i32 { 1 } diff --git a/tests/ui/array-slice-vec/vec-macro-with-brackets.rs b/tests/ui/array-slice-vec/vec-macro-with-brackets.rs index 6c95bd50007..65ca182b615 100644 --- a/tests/ui/array-slice-vec/vec-macro-with-brackets.rs +++ b/tests/ui/array-slice-vec/vec-macro-with-brackets.rs @@ -1,7 +1,7 @@ -// run-pass +//@ run-pass #![allow(unused_variables)] -// pretty-expanded FIXME #23616 +//@ pretty-expanded FIXME #23616 macro_rules! vec [ ($($e:expr),*) => ({ diff --git a/tests/ui/array-slice-vec/vec-macro-with-trailing-comma.rs b/tests/ui/array-slice-vec/vec-macro-with-trailing-comma.rs index f7a51f9c456..eca4a1cc37f 100644 --- a/tests/ui/array-slice-vec/vec-macro-with-trailing-comma.rs +++ b/tests/ui/array-slice-vec/vec-macro-with-trailing-comma.rs @@ -1,4 +1,4 @@ -// run-pass +//@ run-pass diff --git a/tests/ui/array-slice-vec/vec-matching-autoslice.rs b/tests/ui/array-slice-vec/vec-matching-autoslice.rs index f839cd62b1a..b790cc16ec1 100644 --- a/tests/ui/array-slice-vec/vec-matching-autoslice.rs +++ b/tests/ui/array-slice-vec/vec-matching-autoslice.rs @@ -1,4 +1,4 @@ -// run-pass +//@ run-pass pub fn main() { let x = [1, 2, 3]; diff --git a/tests/ui/array-slice-vec/vec-matching-fixed.rs b/tests/ui/array-slice-vec/vec-matching-fixed.rs index fdeb7e4fda6..c7fc09ffd2a 100644 --- a/tests/ui/array-slice-vec/vec-matching-fixed.rs +++ b/tests/ui/array-slice-vec/vec-matching-fixed.rs @@ -1,4 +1,4 @@ -// run-pass +//@ run-pass fn a() { let x = [1, 2, 3]; diff --git a/tests/ui/array-slice-vec/vec-matching-fold.rs b/tests/ui/array-slice-vec/vec-matching-fold.rs index 998899271e4..a38c1606208 100644 --- a/tests/ui/array-slice-vec/vec-matching-fold.rs +++ b/tests/ui/array-slice-vec/vec-matching-fold.rs @@ -1,4 +1,4 @@ -// run-pass +//@ run-pass use std::fmt::Debug; diff --git a/tests/ui/array-slice-vec/vec-matching-legal-tail-element-borrow.rs b/tests/ui/array-slice-vec/vec-matching-legal-tail-element-borrow.rs index ed34f074a92..2493eca2c3a 100644 --- a/tests/ui/array-slice-vec/vec-matching-legal-tail-element-borrow.rs +++ b/tests/ui/array-slice-vec/vec-matching-legal-tail-element-borrow.rs @@ -1,4 +1,4 @@ -// run-pass +//@ run-pass #![allow(unused_variables)] diff --git a/tests/ui/array-slice-vec/vec-matching.rs b/tests/ui/array-slice-vec/vec-matching.rs index 7009244aa18..ea882518b64 100644 --- a/tests/ui/array-slice-vec/vec-matching.rs +++ b/tests/ui/array-slice-vec/vec-matching.rs @@ -1,4 +1,4 @@ -// run-pass +//@ run-pass fn a() { let x = [1]; diff --git a/tests/ui/array-slice-vec/vec-overrun.rs b/tests/ui/array-slice-vec/vec-overrun.rs index bdc7d507d53..10f8350869f 100644 --- a/tests/ui/array-slice-vec/vec-overrun.rs +++ b/tests/ui/array-slice-vec/vec-overrun.rs @@ -1,6 +1,6 @@ -// run-fail -// error-pattern:index out of bounds: the len is 1 but the index is 2 -// ignore-emscripten no processes +//@ run-fail +//@ error-pattern:index out of bounds: the len is 1 but the index is 2 +//@ ignore-emscripten no processes fn main() { let v: Vec = vec![10]; diff --git a/tests/ui/array-slice-vec/vec-repeat-with-cast.rs b/tests/ui/array-slice-vec/vec-repeat-with-cast.rs index 3e0e18873ab..4af38d9cf32 100644 --- a/tests/ui/array-slice-vec/vec-repeat-with-cast.rs +++ b/tests/ui/array-slice-vec/vec-repeat-with-cast.rs @@ -1,5 +1,5 @@ -// run-pass +//@ run-pass -// pretty-expanded FIXME #23616 +//@ pretty-expanded FIXME #23616 pub fn main() { let _a = [0; 1 as usize]; } diff --git a/tests/ui/array-slice-vec/vec-tail-matching.rs b/tests/ui/array-slice-vec/vec-tail-matching.rs index 5f1699227d8..aaeb05e6d77 100644 --- a/tests/ui/array-slice-vec/vec-tail-matching.rs +++ b/tests/ui/array-slice-vec/vec-tail-matching.rs @@ -1,4 +1,4 @@ -// run-pass +//@ run-pass struct Foo { string: &'static str diff --git a/tests/ui/array-slice-vec/vector-no-ann-2.rs b/tests/ui/array-slice-vec/vector-no-ann-2.rs index e2055f551ac..b130c6bc2ff 100644 --- a/tests/ui/array-slice-vec/vector-no-ann-2.rs +++ b/tests/ui/array-slice-vec/vector-no-ann-2.rs @@ -1,6 +1,6 @@ -// run-pass +//@ run-pass -// pretty-expanded FIXME #23616 +//@ pretty-expanded FIXME #23616 pub fn main() { let _quux: Box> = Box::new(Vec::new()); diff --git a/tests/ui/artificial-block.rs b/tests/ui/artificial-block.rs index 2e383e1a7c6..037163b4174 100644 --- a/tests/ui/artificial-block.rs +++ b/tests/ui/artificial-block.rs @@ -1,4 +1,4 @@ -// run-pass +//@ run-pass fn f() -> isize { { return 3; } } diff --git a/tests/ui/as-precedence.rs b/tests/ui/as-precedence.rs index feb0cb30cca..5021a3b677f 100644 --- a/tests/ui/as-precedence.rs +++ b/tests/ui/as-precedence.rs @@ -1,4 +1,4 @@ -// run-pass +//@ run-pass #[allow(unused_parens)] fn main() { diff --git a/tests/ui/asm/aarch64/bad-options.rs b/tests/ui/asm/aarch64/bad-options.rs index 6172027a2fa..33b77367a4f 100644 --- a/tests/ui/asm/aarch64/bad-options.rs +++ b/tests/ui/asm/aarch64/bad-options.rs @@ -1,4 +1,4 @@ -// only-aarch64 +//@ only-aarch64 use std::arch::{asm, global_asm}; diff --git a/tests/ui/asm/aarch64/bad-reg.rs b/tests/ui/asm/aarch64/bad-reg.rs index f71418161f2..1e54b6505db 100644 --- a/tests/ui/asm/aarch64/bad-reg.rs +++ b/tests/ui/asm/aarch64/bad-reg.rs @@ -1,5 +1,5 @@ -// only-aarch64 -// compile-flags: -C target-feature=+neon +//@ only-aarch64 +//@ compile-flags: -C target-feature=+neon #![feature(asm_const)] diff --git a/tests/ui/asm/aarch64/const.rs b/tests/ui/asm/aarch64/const.rs index 0b02c99abf6..a1fadb2115b 100644 --- a/tests/ui/asm/aarch64/const.rs +++ b/tests/ui/asm/aarch64/const.rs @@ -1,6 +1,6 @@ -// only-aarch64 -// run-pass -// needs-asm-support +//@ only-aarch64 +//@ run-pass +//@ needs-asm-support #![feature(asm_const)] diff --git a/tests/ui/asm/aarch64/duplicate-options.fixed b/tests/ui/asm/aarch64/duplicate-options.fixed index fa1dd4aef5d..b221c7c78bc 100644 --- a/tests/ui/asm/aarch64/duplicate-options.fixed +++ b/tests/ui/asm/aarch64/duplicate-options.fixed @@ -1,6 +1,6 @@ -// only-aarch64 -// needs-asm-support -// run-rustfix +//@ only-aarch64 +//@ needs-asm-support +//@ run-rustfix use std::arch::asm; diff --git a/tests/ui/asm/aarch64/duplicate-options.rs b/tests/ui/asm/aarch64/duplicate-options.rs index b2d3fe7d9a7..44a45187d2d 100644 --- a/tests/ui/asm/aarch64/duplicate-options.rs +++ b/tests/ui/asm/aarch64/duplicate-options.rs @@ -1,6 +1,6 @@ -// only-aarch64 -// needs-asm-support -// run-rustfix +//@ only-aarch64 +//@ needs-asm-support +//@ run-rustfix use std::arch::asm; diff --git a/tests/ui/asm/aarch64/interpolated-idents.rs b/tests/ui/asm/aarch64/interpolated-idents.rs index e87a8843499..3d9cf763e4d 100644 --- a/tests/ui/asm/aarch64/interpolated-idents.rs +++ b/tests/ui/asm/aarch64/interpolated-idents.rs @@ -1,5 +1,5 @@ -// only-aarch64 -// needs-asm-support +//@ only-aarch64 +//@ needs-asm-support use std::arch::asm; macro_rules! m { diff --git a/tests/ui/asm/aarch64/llvm-58384.rs b/tests/ui/asm/aarch64/llvm-58384.rs index 308f7890829..b11b2f3c0b9 100644 --- a/tests/ui/asm/aarch64/llvm-58384.rs +++ b/tests/ui/asm/aarch64/llvm-58384.rs @@ -1,6 +1,6 @@ -// only-aarch64 -// run-pass -// needs-asm-support +//@ only-aarch64 +//@ run-pass +//@ needs-asm-support // Test that we properly work around this LLVM issue: // https://github.com/llvm/llvm-project/issues/58384 diff --git a/tests/ui/asm/aarch64/may_unwind.rs b/tests/ui/asm/aarch64/may_unwind.rs index cfb75078264..a483008c364 100644 --- a/tests/ui/asm/aarch64/may_unwind.rs +++ b/tests/ui/asm/aarch64/may_unwind.rs @@ -1,7 +1,7 @@ -// only-aarch64 -// run-pass -// needs-asm-support -// needs-unwind +//@ only-aarch64 +//@ run-pass +//@ needs-asm-support +//@ needs-unwind #![feature(asm_unwind)] diff --git a/tests/ui/asm/aarch64/parse-error.rs b/tests/ui/asm/aarch64/parse-error.rs index 9b8170840bb..fbb1e08df91 100644 --- a/tests/ui/asm/aarch64/parse-error.rs +++ b/tests/ui/asm/aarch64/parse-error.rs @@ -1,4 +1,4 @@ -// only-aarch64 +//@ only-aarch64 #![feature(asm_const)] diff --git a/tests/ui/asm/aarch64/srcloc.rs b/tests/ui/asm/aarch64/srcloc.rs index dbb6cbb9437..c635fa6ba70 100644 --- a/tests/ui/asm/aarch64/srcloc.rs +++ b/tests/ui/asm/aarch64/srcloc.rs @@ -1,7 +1,7 @@ -// only-aarch64 -// build-fail -// needs-asm-support -// compile-flags: -Ccodegen-units=1 +//@ only-aarch64 +//@ build-fail +//@ needs-asm-support +//@ compile-flags: -Ccodegen-units=1 use std::arch::asm; diff --git a/tests/ui/asm/aarch64/sym.rs b/tests/ui/asm/aarch64/sym.rs index 6a6cdb00d51..87c6d5ddfdc 100644 --- a/tests/ui/asm/aarch64/sym.rs +++ b/tests/ui/asm/aarch64/sym.rs @@ -1,7 +1,7 @@ -// only-aarch64 -// only-linux -// needs-asm-support -// run-pass +//@ only-aarch64 +//@ only-linux +//@ needs-asm-support +//@ run-pass #![feature(thread_local)] diff --git a/tests/ui/asm/aarch64/type-check-2-2.rs b/tests/ui/asm/aarch64/type-check-2-2.rs index 89f2b3bb7d0..f442ce81476 100644 --- a/tests/ui/asm/aarch64/type-check-2-2.rs +++ b/tests/ui/asm/aarch64/type-check-2-2.rs @@ -1,4 +1,4 @@ -// only-aarch64 +//@ only-aarch64 #![feature(repr_simd, never_type)] diff --git a/tests/ui/asm/aarch64/type-check-2.rs b/tests/ui/asm/aarch64/type-check-2.rs index 1c71c1185d4..ba68cdd26d9 100644 --- a/tests/ui/asm/aarch64/type-check-2.rs +++ b/tests/ui/asm/aarch64/type-check-2.rs @@ -1,4 +1,4 @@ -// only-aarch64 +//@ only-aarch64 #![feature(repr_simd, never_type)] diff --git a/tests/ui/asm/aarch64/type-check-3.rs b/tests/ui/asm/aarch64/type-check-3.rs index 77524ba7aa5..3fc8e506069 100644 --- a/tests/ui/asm/aarch64/type-check-3.rs +++ b/tests/ui/asm/aarch64/type-check-3.rs @@ -1,5 +1,5 @@ -// only-aarch64 -// compile-flags: -C target-feature=+neon +//@ only-aarch64 +//@ compile-flags: -C target-feature=+neon #![feature(repr_simd, asm_const)] diff --git a/tests/ui/asm/aarch64/type-check-4.rs b/tests/ui/asm/aarch64/type-check-4.rs index a14010481fc..f00b4d4c46f 100644 --- a/tests/ui/asm/aarch64/type-check-4.rs +++ b/tests/ui/asm/aarch64/type-check-4.rs @@ -1,5 +1,5 @@ -// only-aarch64 -// compile-flags: -C target-feature=+neon +//@ only-aarch64 +//@ compile-flags: -C target-feature=+neon #![feature(repr_simd, asm_const)] diff --git a/tests/ui/asm/bad-arch.rs b/tests/ui/asm/bad-arch.rs index 3eeb76f3d00..f84b9944b36 100644 --- a/tests/ui/asm/bad-arch.rs +++ b/tests/ui/asm/bad-arch.rs @@ -1,5 +1,5 @@ -// compile-flags: --target sparc-unknown-linux-gnu -// needs-llvm-components: sparc +//@ compile-flags: --target sparc-unknown-linux-gnu +//@ needs-llvm-components: sparc #![feature(no_core, lang_items, rustc_attrs)] #![no_core] diff --git a/tests/ui/asm/bad-template.rs b/tests/ui/asm/bad-template.rs index b70da4921c2..41a906e32a4 100644 --- a/tests/ui/asm/bad-template.rs +++ b/tests/ui/asm/bad-template.rs @@ -1,10 +1,10 @@ -// revisions: x86_64 aarch64 +//@ revisions: x86_64 aarch64 -// [x86_64] compile-flags: --target x86_64-unknown-linux-gnu -// [aarch64] compile-flags: --target aarch64-unknown-linux-gnu +//@ [x86_64] compile-flags: --target x86_64-unknown-linux-gnu +//@ [aarch64] compile-flags: --target aarch64-unknown-linux-gnu -// [x86_64] needs-llvm-components: x86 -// [aarch64] needs-llvm-components: aarch64 +//@ [x86_64] needs-llvm-components: x86 +//@ [aarch64] needs-llvm-components: aarch64 #![feature(no_core, lang_items, rustc_attrs, asm_const)] #![no_core] diff --git a/tests/ui/asm/const-error.rs b/tests/ui/asm/const-error.rs index 4e14becf74b..f2cead399b6 100644 --- a/tests/ui/asm/const-error.rs +++ b/tests/ui/asm/const-error.rs @@ -1,5 +1,5 @@ -// only-x86_64 -// needs-asm-support +//@ only-x86_64 +//@ needs-asm-support #![feature(asm_const)] diff --git a/tests/ui/asm/generic-const.rs b/tests/ui/asm/generic-const.rs index caa9b7dbce6..133d093d200 100644 --- a/tests/ui/asm/generic-const.rs +++ b/tests/ui/asm/generic-const.rs @@ -1,5 +1,5 @@ -// needs-asm-support -// build-pass +//@ needs-asm-support +//@ build-pass #![feature(asm_const)] diff --git a/tests/ui/asm/inline-syntax.rs b/tests/ui/asm/inline-syntax.rs index a8c6c71b805..6da1b89ed67 100644 --- a/tests/ui/asm/inline-syntax.rs +++ b/tests/ui/asm/inline-syntax.rs @@ -1,17 +1,17 @@ -// revisions: x86_64 arm arm_llvm_18 -//[x86_64] compile-flags: --target x86_64-unknown-linux-gnu -//[x86_64] check-pass -//[x86_64] needs-llvm-components: x86 -//[arm] compile-flags: --target armv7-unknown-linux-gnueabihf -//[arm] build-fail -//[arm] needs-llvm-components: arm -//[arm] ignore-llvm-version: 18 - 99 +//@ revisions: x86_64 arm arm_llvm_18 +//@[x86_64] compile-flags: --target x86_64-unknown-linux-gnu +//@[x86_64] check-pass +//@[x86_64] needs-llvm-components: x86 +//@[arm] compile-flags: --target armv7-unknown-linux-gnueabihf +//@[arm] build-fail +//@[arm] needs-llvm-components: arm +//@[arm] ignore-llvm-version: 18 - 99 //Newer LLVM produces extra error notes. -//[arm_llvm_18] compile-flags: --target armv7-unknown-linux-gnueabihf -//[arm_llvm_18] build-fail -//[arm_llvm_18] needs-llvm-components: arm -//[arm_llvm_18] min-llvm-version: 18 -// needs-asm-support +//@[arm_llvm_18] compile-flags: --target armv7-unknown-linux-gnueabihf +//@[arm_llvm_18] build-fail +//@[arm_llvm_18] needs-llvm-components: arm +//@[arm_llvm_18] min-llvm-version: 18 +//@ needs-asm-support #![feature(no_core, lang_items, rustc_attrs)] #![crate_type = "rlib"] diff --git a/tests/ui/asm/issue-113788.rs b/tests/ui/asm/issue-113788.rs index 903b444767f..3b11e253eda 100644 --- a/tests/ui/asm/issue-113788.rs +++ b/tests/ui/asm/issue-113788.rs @@ -1,6 +1,6 @@ // test that "error: arguments for inline assembly must be copyable" doesn't show up in this code -// needs-asm-support -// only-x86_64 +//@ needs-asm-support +//@ only-x86_64 fn main() { let peb: *const PEB; //~ ERROR cannot find type `PEB` in this scope [E0412] unsafe { std::arch::asm!("mov {0}, fs:[0x30]", out(reg) peb); } diff --git a/tests/ui/asm/issue-72570.rs b/tests/ui/asm/issue-72570.rs index ac589de2303..2b0e3628de5 100644 --- a/tests/ui/asm/issue-72570.rs +++ b/tests/ui/asm/issue-72570.rs @@ -1,4 +1,4 @@ -// needs-asm-support +//@ needs-asm-support use std::arch::asm; diff --git a/tests/ui/asm/issue-85247.rs b/tests/ui/asm/issue-85247.rs index e64f5e8af52..b55b1876ac8 100644 --- a/tests/ui/asm/issue-85247.rs +++ b/tests/ui/asm/issue-85247.rs @@ -1,10 +1,10 @@ -// revisions: ropi rwpi +//@ revisions: ropi rwpi -// [ropi] compile-flags: --target armv7-unknown-linux-gnueabihf -C relocation-model=ropi -// [rwpi] compile-flags: --target armv7-unknown-linux-gnueabihf -C relocation-model=rwpi -// [ropi] needs-llvm-components: arm -// [rwpi] needs-llvm-components: arm -// [ropi] build-pass +//@ [ropi] compile-flags: --target armv7-unknown-linux-gnueabihf -C relocation-model=ropi +//@ [rwpi] compile-flags: --target armv7-unknown-linux-gnueabihf -C relocation-model=rwpi +//@ [ropi] needs-llvm-components: arm +//@ [rwpi] needs-llvm-components: arm +//@ [ropi] build-pass #![feature(no_core, lang_items, rustc_attrs)] #![no_core] diff --git a/tests/ui/asm/issue-87802.rs b/tests/ui/asm/issue-87802.rs index 5b2e636c29f..d93de9ee57f 100644 --- a/tests/ui/asm/issue-87802.rs +++ b/tests/ui/asm/issue-87802.rs @@ -1,7 +1,7 @@ -// needs-asm-support -// ignore-nvptx64 -// ignore-spirv -// ignore-wasm32 +//@ needs-asm-support +//@ ignore-nvptx64 +//@ ignore-spirv +//@ ignore-wasm32 // Make sure rustc doesn't ICE on asm! when output type is !. use std::arch::asm; diff --git a/tests/ui/asm/issue-89305.rs b/tests/ui/asm/issue-89305.rs index 05677912dff..84425c4a8f6 100644 --- a/tests/ui/asm/issue-89305.rs +++ b/tests/ui/asm/issue-89305.rs @@ -1,8 +1,8 @@ // Regression test for #89305, where a variable was erroneously reported // as both unused and possibly-uninitialized. -// check-pass -// needs-asm-support +//@ check-pass +//@ needs-asm-support #![warn(unused)] diff --git a/tests/ui/asm/issue-92378.rs b/tests/ui/asm/issue-92378.rs index 809b0d1555a..3cbdabf8134 100644 --- a/tests/ui/asm/issue-92378.rs +++ b/tests/ui/asm/issue-92378.rs @@ -1,7 +1,7 @@ -// compile-flags: --target armv5te-unknown-linux-gnueabi -// needs-llvm-components: arm -// needs-asm-support -// build-pass +//@ compile-flags: --target armv5te-unknown-linux-gnueabi +//@ needs-llvm-components: arm +//@ needs-asm-support +//@ build-pass #![feature(no_core, lang_items, rustc_attrs)] #![no_core] diff --git a/tests/ui/asm/issue-97490.rs b/tests/ui/asm/issue-97490.rs index 37862cf349c..5f364a22bc4 100644 --- a/tests/ui/asm/issue-97490.rs +++ b/tests/ui/asm/issue-97490.rs @@ -1,6 +1,6 @@ -// check-pass -// only-x86_64 -// needs-asm-support +//@ check-pass +//@ only-x86_64 +//@ needs-asm-support pub type Yes = extern "sysv64" fn(&'static u8) -> !; diff --git a/tests/ui/asm/issue-99071.rs b/tests/ui/asm/issue-99071.rs index bb6201861df..bc3f7815511 100644 --- a/tests/ui/asm/issue-99071.rs +++ b/tests/ui/asm/issue-99071.rs @@ -1,6 +1,6 @@ -// compile-flags: --target thumbv6m-none-eabi -// needs-llvm-components: arm -// needs-asm-support +//@ compile-flags: --target thumbv6m-none-eabi +//@ needs-llvm-components: arm +//@ needs-asm-support #![feature(no_core, lang_items, rustc_attrs)] #![no_core] diff --git a/tests/ui/asm/issue-99122-2.rs b/tests/ui/asm/issue-99122-2.rs index cfb9fd90a55..6ac5f059a62 100644 --- a/tests/ui/asm/issue-99122-2.rs +++ b/tests/ui/asm/issue-99122-2.rs @@ -1,6 +1,6 @@ -// check-pass -// needs-asm-support -// only-x86_64 +//@ check-pass +//@ needs-asm-support +//@ only-x86_64 // This demonstrates why we need to erase regions before sized check in intrinsicck diff --git a/tests/ui/asm/issue-99122.rs b/tests/ui/asm/issue-99122.rs index 744a563d3d1..e2675dc431d 100644 --- a/tests/ui/asm/issue-99122.rs +++ b/tests/ui/asm/issue-99122.rs @@ -1,5 +1,5 @@ -// needs-asm-support -// only-x86_64 +//@ needs-asm-support +//@ only-x86_64 pub unsafe fn test() { let pointer = 1u32 as *const _; diff --git a/tests/ui/asm/may_unwind.rs b/tests/ui/asm/may_unwind.rs index b9479c44bf1..216408b3873 100644 --- a/tests/ui/asm/may_unwind.rs +++ b/tests/ui/asm/may_unwind.rs @@ -1,5 +1,5 @@ -// run-pass -// needs-asm-support +//@ run-pass +//@ needs-asm-support #![feature(asm_unwind)] diff --git a/tests/ui/asm/naked-functions-ffi.rs b/tests/ui/asm/naked-functions-ffi.rs index c8bee504d02..93d23885b13 100644 --- a/tests/ui/asm/naked-functions-ffi.rs +++ b/tests/ui/asm/naked-functions-ffi.rs @@ -1,5 +1,5 @@ -// check-pass -// needs-asm-support +//@ check-pass +//@ needs-asm-support #![feature(naked_functions)] #![crate_type = "lib"] diff --git a/tests/ui/asm/naked-functions-unused.rs b/tests/ui/asm/naked-functions-unused.rs index 044a0e5b940..745d30e6a84 100644 --- a/tests/ui/asm/naked-functions-unused.rs +++ b/tests/ui/asm/naked-functions-unused.rs @@ -1,7 +1,7 @@ -// revisions: x86_64 aarch64 -// needs-asm-support -//[x86_64] only-x86_64 -//[aarch64] only-aarch64 +//@ revisions: x86_64 aarch64 +//@ needs-asm-support +//@[x86_64] only-x86_64 +//@[aarch64] only-aarch64 #![deny(unused)] #![feature(naked_functions)] #![crate_type = "lib"] diff --git a/tests/ui/asm/naked-functions.rs b/tests/ui/asm/naked-functions.rs index b18d01730f2..41d6393996d 100644 --- a/tests/ui/asm/naked-functions.rs +++ b/tests/ui/asm/naked-functions.rs @@ -1,7 +1,7 @@ -// needs-asm-support -// ignore-nvptx64 -// ignore-spirv -// ignore-wasm32 +//@ needs-asm-support +//@ ignore-nvptx64 +//@ ignore-spirv +//@ ignore-wasm32 #![feature(naked_functions)] #![feature(asm_const, asm_unwind)] diff --git a/tests/ui/asm/naked-invalid-attr.rs b/tests/ui/asm/naked-invalid-attr.rs index ea8f560ff5d..57edd57de99 100644 --- a/tests/ui/asm/naked-invalid-attr.rs +++ b/tests/ui/asm/naked-invalid-attr.rs @@ -1,6 +1,6 @@ // Checks that #[naked] attribute can be placed on function definitions only. // -// needs-asm-support +//@ needs-asm-support #![feature(naked_functions)] #![naked] //~ ERROR should be applied to a function definition diff --git a/tests/ui/asm/named-asm-labels.rs b/tests/ui/asm/named-asm-labels.rs index 24586b39aac..2e21d56e323 100644 --- a/tests/ui/asm/named-asm-labels.rs +++ b/tests/ui/asm/named-asm-labels.rs @@ -1,7 +1,7 @@ -// needs-asm-support -// ignore-nvptx64 -// ignore-spirv -// ignore-wasm32 +//@ needs-asm-support +//@ ignore-nvptx64 +//@ ignore-spirv +//@ ignore-wasm32 // Tests that the use of named labels in the `asm!` macro are linted against // except for in `#[naked]` fns. diff --git a/tests/ui/asm/noreturn.rs b/tests/ui/asm/noreturn.rs index 03fa087ae37..c99715e9f80 100644 --- a/tests/ui/asm/noreturn.rs +++ b/tests/ui/asm/noreturn.rs @@ -1,5 +1,5 @@ -// needs-asm-support -// check-pass +//@ needs-asm-support +//@ check-pass #![feature(never_type)] #![crate_type = "rlib"] diff --git a/tests/ui/asm/parse-error.rs b/tests/ui/asm/parse-error.rs index 9e002b1550f..6f32293511b 100644 --- a/tests/ui/asm/parse-error.rs +++ b/tests/ui/asm/parse-error.rs @@ -1,4 +1,4 @@ -// needs-asm-support +//@ needs-asm-support #![feature(asm_const)] diff --git a/tests/ui/asm/reg-conflict.rs b/tests/ui/asm/reg-conflict.rs index 983788a93cc..bdde12af6df 100644 --- a/tests/ui/asm/reg-conflict.rs +++ b/tests/ui/asm/reg-conflict.rs @@ -1,5 +1,5 @@ -// compile-flags: --target armv7-unknown-linux-gnueabihf -// needs-llvm-components: arm +//@ compile-flags: --target armv7-unknown-linux-gnueabihf +//@ needs-llvm-components: arm #![feature(no_core, lang_items, rustc_attrs)] #![no_core] diff --git a/tests/ui/asm/type-check-1.rs b/tests/ui/asm/type-check-1.rs index 59f7b36afcd..b18c487fc4b 100644 --- a/tests/ui/asm/type-check-1.rs +++ b/tests/ui/asm/type-check-1.rs @@ -1,7 +1,7 @@ -// needs-asm-support -// ignore-nvptx64 -// ignore-spirv -// ignore-wasm32 +//@ needs-asm-support +//@ ignore-nvptx64 +//@ ignore-spirv +//@ ignore-wasm32 #![feature(asm_const)] diff --git a/tests/ui/asm/type-check-4.rs b/tests/ui/asm/type-check-4.rs index 666d2c67783..0529811d3ba 100644 --- a/tests/ui/asm/type-check-4.rs +++ b/tests/ui/asm/type-check-4.rs @@ -1,7 +1,7 @@ -// needs-asm-support -// ignore-nvptx64 -// ignore-spirv -// ignore-wasm32 +//@ needs-asm-support +//@ ignore-nvptx64 +//@ ignore-spirv +//@ ignore-wasm32 use std::arch::asm; diff --git a/tests/ui/asm/unpretty-expanded.rs b/tests/ui/asm/unpretty-expanded.rs index 25cf1c3d730..1da2c7704f4 100644 --- a/tests/ui/asm/unpretty-expanded.rs +++ b/tests/ui/asm/unpretty-expanded.rs @@ -1,4 +1,4 @@ -// needs-asm-support -// check-pass -// compile-flags: -Zunpretty=expanded +//@ needs-asm-support +//@ check-pass +//@ compile-flags: -Zunpretty=expanded core::arch::global_asm!("x: .byte 42"); diff --git a/tests/ui/asm/unpretty-expanded.stdout b/tests/ui/asm/unpretty-expanded.stdout index ab1b5f45e5c..80ccd127d50 100644 --- a/tests/ui/asm/unpretty-expanded.stdout +++ b/tests/ui/asm/unpretty-expanded.stdout @@ -4,7 +4,7 @@ use ::std::prelude::rust_2015::*; #[macro_use] extern crate std; -// needs-asm-support -// check-pass -// compile-flags: -Zunpretty=expanded +//@ needs-asm-support +//@ check-pass +//@ compile-flags: -Zunpretty=expanded global_asm! ("x: .byte 42"); diff --git a/tests/ui/asm/x86_64/bad-clobber-abi.rs b/tests/ui/asm/x86_64/bad-clobber-abi.rs index ddcd2065bfe..5205a084162 100644 --- a/tests/ui/asm/x86_64/bad-clobber-abi.rs +++ b/tests/ui/asm/x86_64/bad-clobber-abi.rs @@ -1,5 +1,5 @@ -// needs-asm-support -// only-x86_64 +//@ needs-asm-support +//@ only-x86_64 use std::arch::asm; diff --git a/tests/ui/asm/x86_64/bad-options.rs b/tests/ui/asm/x86_64/bad-options.rs index f7c2cd6c505..a6d5022ecf1 100644 --- a/tests/ui/asm/x86_64/bad-options.rs +++ b/tests/ui/asm/x86_64/bad-options.rs @@ -1,4 +1,4 @@ -// only-x86_64 +//@ only-x86_64 use std::arch::{asm, global_asm}; diff --git a/tests/ui/asm/x86_64/bad-reg.rs b/tests/ui/asm/x86_64/bad-reg.rs index e19221bc04e..d41c46d57bb 100644 --- a/tests/ui/asm/x86_64/bad-reg.rs +++ b/tests/ui/asm/x86_64/bad-reg.rs @@ -1,5 +1,5 @@ -// only-x86_64 -// compile-flags: -C target-feature=+avx2 +//@ only-x86_64 +//@ compile-flags: -C target-feature=+avx2 #![feature(asm_const)] diff --git a/tests/ui/asm/x86_64/const.rs b/tests/ui/asm/x86_64/const.rs index f9a2ab6269f..817a338a5b9 100644 --- a/tests/ui/asm/x86_64/const.rs +++ b/tests/ui/asm/x86_64/const.rs @@ -1,6 +1,6 @@ -// only-x86_64 -// run-pass -// needs-asm-support +//@ only-x86_64 +//@ run-pass +//@ needs-asm-support #![feature(asm_const)] diff --git a/tests/ui/asm/x86_64/duplicate-options.fixed b/tests/ui/asm/x86_64/duplicate-options.fixed index c5f14f5f75c..38a98a30ece 100644 --- a/tests/ui/asm/x86_64/duplicate-options.fixed +++ b/tests/ui/asm/x86_64/duplicate-options.fixed @@ -1,5 +1,5 @@ -// only-x86_64 -// run-rustfix +//@ only-x86_64 +//@ run-rustfix use std::arch::{asm, global_asm}; diff --git a/tests/ui/asm/x86_64/duplicate-options.rs b/tests/ui/asm/x86_64/duplicate-options.rs index a8dce1f8d71..1f043b964de 100644 --- a/tests/ui/asm/x86_64/duplicate-options.rs +++ b/tests/ui/asm/x86_64/duplicate-options.rs @@ -1,5 +1,5 @@ -// only-x86_64 -// run-rustfix +//@ only-x86_64 +//@ run-rustfix use std::arch::{asm, global_asm}; diff --git a/tests/ui/asm/x86_64/evex512-implicit-feature.rs b/tests/ui/asm/x86_64/evex512-implicit-feature.rs index a15060857ec..ea2acd424e2 100644 --- a/tests/ui/asm/x86_64/evex512-implicit-feature.rs +++ b/tests/ui/asm/x86_64/evex512-implicit-feature.rs @@ -1,6 +1,6 @@ -// build-pass -// only-x86_64 -// compile-flags: --crate-type=lib -C target-cpu=skylake +//@ build-pass +//@ only-x86_64 +//@ compile-flags: --crate-type=lib -C target-cpu=skylake #![feature(avx512_target_feature)] #![feature(stdarch_x86_avx512)] diff --git a/tests/ui/asm/x86_64/interpolated-idents.rs b/tests/ui/asm/x86_64/interpolated-idents.rs index c05633ae885..4f349c5b213 100644 --- a/tests/ui/asm/x86_64/interpolated-idents.rs +++ b/tests/ui/asm/x86_64/interpolated-idents.rs @@ -1,4 +1,4 @@ -// only-x86_64 +//@ only-x86_64 use std::arch::asm; diff --git a/tests/ui/asm/x86_64/issue-82869.rs b/tests/ui/asm/x86_64/issue-82869.rs index 67933666eb5..5d3f417f733 100644 --- a/tests/ui/asm/x86_64/issue-82869.rs +++ b/tests/ui/asm/x86_64/issue-82869.rs @@ -1,5 +1,5 @@ -// needs-asm-support -// only-x86_64 +//@ needs-asm-support +//@ only-x86_64 // Make sure rustc doesn't ICE on asm! for a foreign architecture. #![crate_type = "rlib"] diff --git a/tests/ui/asm/x86_64/issue-89875.rs b/tests/ui/asm/x86_64/issue-89875.rs index 39c64564022..af940f05fea 100644 --- a/tests/ui/asm/x86_64/issue-89875.rs +++ b/tests/ui/asm/x86_64/issue-89875.rs @@ -1,6 +1,6 @@ -// build-pass -// needs-asm-support -// only-x86_64 +//@ build-pass +//@ needs-asm-support +//@ only-x86_64 #![feature(target_feature_11)] diff --git a/tests/ui/asm/x86_64/issue-96797.rs b/tests/ui/asm/x86_64/issue-96797.rs index 6c22c2f6c94..531e16795dd 100644 --- a/tests/ui/asm/x86_64/issue-96797.rs +++ b/tests/ui/asm/x86_64/issue-96797.rs @@ -1,8 +1,8 @@ -// build-pass -// compile-flags: -O -// needs-asm-support -// only-x86_64 -// only-linux +//@ build-pass +//@ compile-flags: -O +//@ needs-asm-support +//@ only-x86_64 +//@ only-linux // regression test for #96797 diff --git a/tests/ui/asm/x86_64/may_unwind.rs b/tests/ui/asm/x86_64/may_unwind.rs index c11f0938d0b..3b2c1edcd47 100644 --- a/tests/ui/asm/x86_64/may_unwind.rs +++ b/tests/ui/asm/x86_64/may_unwind.rs @@ -1,7 +1,7 @@ -// only-x86_64 -// run-pass -// needs-asm-support -// needs-unwind +//@ only-x86_64 +//@ run-pass +//@ needs-asm-support +//@ needs-unwind #![feature(asm_unwind)] diff --git a/tests/ui/asm/x86_64/multiple-clobber-abi.rs b/tests/ui/asm/x86_64/multiple-clobber-abi.rs index 06589431a44..bf241b9771b 100644 --- a/tests/ui/asm/x86_64/multiple-clobber-abi.rs +++ b/tests/ui/asm/x86_64/multiple-clobber-abi.rs @@ -1,6 +1,6 @@ -// run-pass -// needs-asm-support -// only-x86_64 +//@ run-pass +//@ needs-asm-support +//@ only-x86_64 // Checks that multiple clobber_abi options can be used diff --git a/tests/ui/asm/x86_64/srcloc.rs b/tests/ui/asm/x86_64/srcloc.rs index 1135ad2e1c6..2938bafe5e7 100644 --- a/tests/ui/asm/x86_64/srcloc.rs +++ b/tests/ui/asm/x86_64/srcloc.rs @@ -1,6 +1,6 @@ -// only-x86_64 -// build-fail -// compile-flags: -Ccodegen-units=1 +//@ only-x86_64 +//@ build-fail +//@ compile-flags: -Ccodegen-units=1 use std::arch::asm; diff --git a/tests/ui/asm/x86_64/sym.rs b/tests/ui/asm/x86_64/sym.rs index 93ef4f09062..0a86bd66ccb 100644 --- a/tests/ui/asm/x86_64/sym.rs +++ b/tests/ui/asm/x86_64/sym.rs @@ -1,7 +1,7 @@ -// only-x86_64 -// only-linux -// needs-asm-support -// run-pass +//@ only-x86_64 +//@ only-linux +//@ needs-asm-support +//@ run-pass #![feature(thread_local)] diff --git a/tests/ui/asm/x86_64/target-feature-attr.rs b/tests/ui/asm/x86_64/target-feature-attr.rs index 14490c3e0f2..820be132ef7 100644 --- a/tests/ui/asm/x86_64/target-feature-attr.rs +++ b/tests/ui/asm/x86_64/target-feature-attr.rs @@ -1,4 +1,4 @@ -// only-x86_64 +//@ only-x86_64 #![feature(avx512_target_feature)] diff --git a/tests/ui/asm/x86_64/type-check-2.rs b/tests/ui/asm/x86_64/type-check-2.rs index 80b29ec870f..c866f9fd8cc 100644 --- a/tests/ui/asm/x86_64/type-check-2.rs +++ b/tests/ui/asm/x86_64/type-check-2.rs @@ -1,4 +1,4 @@ -// only-x86_64 +//@ only-x86_64 #![feature(repr_simd, never_type)] diff --git a/tests/ui/asm/x86_64/type-check-3.rs b/tests/ui/asm/x86_64/type-check-3.rs index 89c849c7523..bd242af3dbc 100644 --- a/tests/ui/asm/x86_64/type-check-3.rs +++ b/tests/ui/asm/x86_64/type-check-3.rs @@ -1,5 +1,5 @@ -// only-x86_64 -// compile-flags: -C target-feature=+avx512f +//@ only-x86_64 +//@ compile-flags: -C target-feature=+avx512f #![feature(asm_const)] diff --git a/tests/ui/asm/x86_64/type-check-4.rs b/tests/ui/asm/x86_64/type-check-4.rs index d0dacda4afb..f7bf60d04df 100644 --- a/tests/ui/asm/x86_64/type-check-4.rs +++ b/tests/ui/asm/x86_64/type-check-4.rs @@ -1,5 +1,5 @@ -// only-x86_64 -// compile-flags: -C target-feature=+avx512f +//@ only-x86_64 +//@ compile-flags: -C target-feature=+avx512f #![feature(asm_const)] diff --git a/tests/ui/asm/x86_64/type-check-5.rs b/tests/ui/asm/x86_64/type-check-5.rs index 1d579ccc90e..b5b51f61168 100644 --- a/tests/ui/asm/x86_64/type-check-5.rs +++ b/tests/ui/asm/x86_64/type-check-5.rs @@ -1,4 +1,4 @@ -// only-x86_64 +//@ only-x86_64 #![feature(repr_simd, never_type)] diff --git a/tests/ui/asm/x86_64/x86_64_parse_error.rs b/tests/ui/asm/x86_64/x86_64_parse_error.rs index 715a67687d1..850033d4ce0 100644 --- a/tests/ui/asm/x86_64/x86_64_parse_error.rs +++ b/tests/ui/asm/x86_64/x86_64_parse_error.rs @@ -1,4 +1,4 @@ -// only-x86_64 +//@ only-x86_64 #![feature(asm_const)] diff --git a/tests/ui/assign-assign.rs b/tests/ui/assign-assign.rs index 9db8fb008cf..002393f5bff 100644 --- a/tests/ui/assign-assign.rs +++ b/tests/ui/assign-assign.rs @@ -1,4 +1,4 @@ -// run-pass +//@ run-pass // Issue 483 - Assignment expressions result in nil fn test_assign() { diff --git a/tests/ui/assoc-oddities-3.rs b/tests/ui/assoc-oddities-3.rs index cd025dc8bee..ffde2ccf786 100644 --- a/tests/ui/assoc-oddities-3.rs +++ b/tests/ui/assoc-oddities-3.rs @@ -1,4 +1,4 @@ -// run-pass +//@ run-pass fn that_odd_parse(c: bool, n: usize) -> u32 { let x = 2; diff --git a/tests/ui/associated-consts/assoc-const-eq-ty-alias-noninteracting.rs b/tests/ui/associated-consts/assoc-const-eq-ty-alias-noninteracting.rs index de9008bfcf9..4ff05112897 100644 --- a/tests/ui/associated-consts/assoc-const-eq-ty-alias-noninteracting.rs +++ b/tests/ui/associated-consts/assoc-const-eq-ty-alias-noninteracting.rs @@ -6,7 +6,7 @@ // FIXME(fmease): Extend this test to cover supertraits again // once #118040 is fixed. See initial version of PR #118360. -// check-pass +//@ check-pass #![feature(associated_const_equality)] diff --git a/tests/ui/associated-consts/assoc-const.rs b/tests/ui/associated-consts/assoc-const.rs index 9c7884c8073..5b272cfeb0c 100644 --- a/tests/ui/associated-consts/assoc-const.rs +++ b/tests/ui/associated-consts/assoc-const.rs @@ -1,4 +1,4 @@ -// run-pass +//@ run-pass #![feature(associated_const_equality)] #![allow(unused)] diff --git a/tests/ui/associated-consts/associated-const-const-eval.rs b/tests/ui/associated-consts/associated-const-const-eval.rs index 5a34bb97ca5..5dc94b87ff9 100644 --- a/tests/ui/associated-consts/associated-const-const-eval.rs +++ b/tests/ui/associated-consts/associated-const-const-eval.rs @@ -1,4 +1,4 @@ -// run-pass +//@ run-pass trait Foo { const NUM: usize; diff --git a/tests/ui/associated-consts/associated-const-cross-crate-const-eval.rs b/tests/ui/associated-consts/associated-const-cross-crate-const-eval.rs index 611639b84be..a9d7e2f706b 100644 --- a/tests/ui/associated-consts/associated-const-cross-crate-const-eval.rs +++ b/tests/ui/associated-consts/associated-const-cross-crate-const-eval.rs @@ -1,5 +1,5 @@ -// run-pass -// aux-build:associated-const-cc-lib.rs +//@ run-pass +//@ aux-build:associated-const-cc-lib.rs extern crate associated_const_cc_lib as foolib; diff --git a/tests/ui/associated-consts/associated-const-cross-crate-defaults.rs b/tests/ui/associated-consts/associated-const-cross-crate-defaults.rs index 92d9cffecdd..2990e507ab2 100644 --- a/tests/ui/associated-consts/associated-const-cross-crate-defaults.rs +++ b/tests/ui/associated-consts/associated-const-cross-crate-defaults.rs @@ -1,5 +1,5 @@ -// run-pass -// aux-build:associated-const-cc-lib.rs +//@ run-pass +//@ aux-build:associated-const-cc-lib.rs extern crate associated_const_cc_lib as foolib; diff --git a/tests/ui/associated-consts/associated-const-cross-crate.rs b/tests/ui/associated-consts/associated-const-cross-crate.rs index ecdc112e02d..39f5427bf77 100644 --- a/tests/ui/associated-consts/associated-const-cross-crate.rs +++ b/tests/ui/associated-consts/associated-const-cross-crate.rs @@ -1,5 +1,5 @@ -// run-pass -// aux-build:associated-const-cc-lib.rs +//@ run-pass +//@ aux-build:associated-const-cc-lib.rs extern crate associated_const_cc_lib as foolib; diff --git a/tests/ui/associated-consts/associated-const-in-global-const.rs b/tests/ui/associated-consts/associated-const-in-global-const.rs index 18d7a121558..10b8f8ebada 100644 --- a/tests/ui/associated-consts/associated-const-in-global-const.rs +++ b/tests/ui/associated-consts/associated-const-in-global-const.rs @@ -1,4 +1,4 @@ -// run-pass +//@ run-pass struct Foo; diff --git a/tests/ui/associated-consts/associated-const-inherent-impl.rs b/tests/ui/associated-consts/associated-const-inherent-impl.rs index c6d956dffe1..e8a313140a3 100644 --- a/tests/ui/associated-consts/associated-const-inherent-impl.rs +++ b/tests/ui/associated-consts/associated-const-inherent-impl.rs @@ -1,4 +1,4 @@ -// run-pass +//@ run-pass struct Foo; diff --git a/tests/ui/associated-consts/associated-const-marks-live-code.rs b/tests/ui/associated-consts/associated-const-marks-live-code.rs index 68eb4e25d33..123650cfd0b 100644 --- a/tests/ui/associated-consts/associated-const-marks-live-code.rs +++ b/tests/ui/associated-consts/associated-const-marks-live-code.rs @@ -1,4 +1,4 @@ -// run-pass +//@ run-pass #![deny(dead_code)] diff --git a/tests/ui/associated-consts/associated-const-match-patterns.rs b/tests/ui/associated-consts/associated-const-match-patterns.rs index 62c1cb983d1..df297cc390d 100644 --- a/tests/ui/associated-consts/associated-const-match-patterns.rs +++ b/tests/ui/associated-consts/associated-const-match-patterns.rs @@ -1,5 +1,5 @@ -// run-pass -// aux-build:empty-struct.rs +//@ run-pass +//@ aux-build:empty-struct.rs extern crate empty_struct; diff --git a/tests/ui/associated-consts/associated-const-outer-ty-refs.rs b/tests/ui/associated-consts/associated-const-outer-ty-refs.rs index d5e9a2bde00..460811353f0 100644 --- a/tests/ui/associated-consts/associated-const-outer-ty-refs.rs +++ b/tests/ui/associated-consts/associated-const-outer-ty-refs.rs @@ -1,4 +1,4 @@ -// check-pass +//@ check-pass trait Lattice { const BOTTOM: Self; diff --git a/tests/ui/associated-consts/associated-const-overwrite-default.rs b/tests/ui/associated-consts/associated-const-overwrite-default.rs index 445135aef2b..3838145e54f 100644 --- a/tests/ui/associated-consts/associated-const-overwrite-default.rs +++ b/tests/ui/associated-consts/associated-const-overwrite-default.rs @@ -1,4 +1,4 @@ -// run-pass +//@ run-pass trait Foo { const ID: i32 = 2; diff --git a/tests/ui/associated-consts/associated-const-public-impl.rs b/tests/ui/associated-consts/associated-const-public-impl.rs index 787bee0ff02..ee847dcc1f5 100644 --- a/tests/ui/associated-consts/associated-const-public-impl.rs +++ b/tests/ui/associated-consts/associated-const-public-impl.rs @@ -1,4 +1,4 @@ -// run-pass +//@ run-pass mod bar1 { pub use self::bar2::Foo; diff --git a/tests/ui/associated-consts/associated-const-range-match-patterns.rs b/tests/ui/associated-consts/associated-const-range-match-patterns.rs index 5276869a702..84cc4dbca9c 100644 --- a/tests/ui/associated-consts/associated-const-range-match-patterns.rs +++ b/tests/ui/associated-consts/associated-const-range-match-patterns.rs @@ -1,4 +1,4 @@ -// run-pass +//@ run-pass #![allow(dead_code, unreachable_patterns)] #![allow(ellipsis_inclusive_range_patterns)] diff --git a/tests/ui/associated-consts/associated-const-resolution-order.rs b/tests/ui/associated-consts/associated-const-resolution-order.rs index d2ccd30a6e2..3e8f15d41b9 100644 --- a/tests/ui/associated-consts/associated-const-resolution-order.rs +++ b/tests/ui/associated-consts/associated-const-resolution-order.rs @@ -1,4 +1,4 @@ -// run-pass +//@ run-pass struct MyType; diff --git a/tests/ui/associated-consts/associated-const-self-type.rs b/tests/ui/associated-consts/associated-const-self-type.rs index 36e1e4ecce7..b7d9f99e216 100644 --- a/tests/ui/associated-consts/associated-const-self-type.rs +++ b/tests/ui/associated-consts/associated-const-self-type.rs @@ -1,4 +1,4 @@ -// run-pass +//@ run-pass trait MyInt { const ONE: Self; diff --git a/tests/ui/associated-consts/associated-const-trait-bound.rs b/tests/ui/associated-consts/associated-const-trait-bound.rs index 403cdbd7ff3..6dfdbff85c0 100644 --- a/tests/ui/associated-consts/associated-const-trait-bound.rs +++ b/tests/ui/associated-consts/associated-const-trait-bound.rs @@ -1,4 +1,4 @@ -// build-pass (FIXME(62277): could be check-pass?) +//@ build-pass (FIXME(62277): could be check-pass?) trait ConstDefault { const DEFAULT: Self; diff --git a/tests/ui/associated-consts/associated-const-type-parameters.rs b/tests/ui/associated-consts/associated-const-type-parameters.rs index a233b09ff89..2ab0f2df417 100644 --- a/tests/ui/associated-consts/associated-const-type-parameters.rs +++ b/tests/ui/associated-consts/associated-const-type-parameters.rs @@ -1,4 +1,4 @@ -// run-pass +//@ run-pass trait Foo { const X: i32; diff --git a/tests/ui/associated-consts/associated-const-ufcs-infer-trait.rs b/tests/ui/associated-consts/associated-const-ufcs-infer-trait.rs index ca44c9f45fc..0fb36f103ee 100644 --- a/tests/ui/associated-consts/associated-const-ufcs-infer-trait.rs +++ b/tests/ui/associated-consts/associated-const-ufcs-infer-trait.rs @@ -1,4 +1,4 @@ -// run-pass +//@ run-pass trait Foo { const ID: i32; diff --git a/tests/ui/associated-consts/associated-const-use-default.rs b/tests/ui/associated-consts/associated-const-use-default.rs index adf36b1fff2..273db9c74af 100644 --- a/tests/ui/associated-consts/associated-const-use-default.rs +++ b/tests/ui/associated-consts/associated-const-use-default.rs @@ -1,4 +1,4 @@ -// run-pass +//@ run-pass trait Foo { const ID: i32 = 1; diff --git a/tests/ui/associated-consts/associated-const-use-impl-of-same-trait.rs b/tests/ui/associated-consts/associated-const-use-impl-of-same-trait.rs index 8f01bae4fcf..968eaf3cf14 100644 --- a/tests/ui/associated-consts/associated-const-use-impl-of-same-trait.rs +++ b/tests/ui/associated-consts/associated-const-use-impl-of-same-trait.rs @@ -1,4 +1,4 @@ -// run-pass +//@ run-pass // The main purpose of this test is to ensure that different impls of the same // trait can refer to each other without setting off the static recursion check diff --git a/tests/ui/associated-consts/associated-const.rs b/tests/ui/associated-consts/associated-const.rs index e4b1c29f371..2d9af05331d 100644 --- a/tests/ui/associated-consts/associated-const.rs +++ b/tests/ui/associated-consts/associated-const.rs @@ -1,4 +1,4 @@ -// run-pass +//@ run-pass trait Foo { const ID: i32; diff --git a/tests/ui/associated-consts/defaults-cyclic-fail.rs b/tests/ui/associated-consts/defaults-cyclic-fail.rs index 9ef0003da17..b868ef31004 100644 --- a/tests/ui/associated-consts/defaults-cyclic-fail.rs +++ b/tests/ui/associated-consts/defaults-cyclic-fail.rs @@ -1,4 +1,4 @@ -// build-fail +//@ build-fail // Cyclic assoc. const defaults don't error unless *used* trait Tr { diff --git a/tests/ui/associated-consts/defaults-cyclic-pass.rs b/tests/ui/associated-consts/defaults-cyclic-pass.rs index 82105f25f92..19ec0a6918e 100644 --- a/tests/ui/associated-consts/defaults-cyclic-pass.rs +++ b/tests/ui/associated-consts/defaults-cyclic-pass.rs @@ -1,4 +1,4 @@ -// run-pass +//@ run-pass // Cyclic assoc. const defaults don't error unless *used* trait Tr { diff --git a/tests/ui/associated-consts/defaults-not-assumed-fail.rs b/tests/ui/associated-consts/defaults-not-assumed-fail.rs index 495dfb338ae..3dc709cf633 100644 --- a/tests/ui/associated-consts/defaults-not-assumed-fail.rs +++ b/tests/ui/associated-consts/defaults-not-assumed-fail.rs @@ -1,4 +1,4 @@ -// build-fail +//@ build-fail trait Tr { const A: u8 = 255; diff --git a/tests/ui/associated-consts/defaults-not-assumed-pass.rs b/tests/ui/associated-consts/defaults-not-assumed-pass.rs index c08e05c8a30..bafaf969fb7 100644 --- a/tests/ui/associated-consts/defaults-not-assumed-pass.rs +++ b/tests/ui/associated-consts/defaults-not-assumed-pass.rs @@ -1,4 +1,4 @@ -// run-pass +//@ run-pass trait Tr { const A: u8 = 255; diff --git a/tests/ui/associated-consts/issue-110933.rs b/tests/ui/associated-consts/issue-110933.rs index aa4882ae535..efd7e13e4bc 100644 --- a/tests/ui/associated-consts/issue-110933.rs +++ b/tests/ui/associated-consts/issue-110933.rs @@ -1,4 +1,4 @@ -// check-pass +//@ check-pass #![feature(associated_const_equality)] diff --git a/tests/ui/associated-consts/issue-69020-assoc-const-arith-overflow.rs b/tests/ui/associated-consts/issue-69020-assoc-const-arith-overflow.rs index d4af6e86414..938ef83af27 100644 --- a/tests/ui/associated-consts/issue-69020-assoc-const-arith-overflow.rs +++ b/tests/ui/associated-consts/issue-69020-assoc-const-arith-overflow.rs @@ -1,7 +1,7 @@ -// revisions: noopt opt opt_with_overflow_checks -//[noopt]compile-flags: -C opt-level=0 -//[opt]compile-flags: -O -//[opt_with_overflow_checks]compile-flags: -C overflow-checks=on -O +//@ revisions: noopt opt opt_with_overflow_checks +//@[noopt]compile-flags: -C opt-level=0 +//@[opt]compile-flags: -O +//@[opt_with_overflow_checks]compile-flags: -C overflow-checks=on -O #![crate_type="lib"] diff --git a/tests/ui/associated-consts/issue-88599-ref-self.rs b/tests/ui/associated-consts/issue-88599-ref-self.rs index f1144db44ca..4150d39ed56 100644 --- a/tests/ui/associated-consts/issue-88599-ref-self.rs +++ b/tests/ui/associated-consts/issue-88599-ref-self.rs @@ -1,4 +1,4 @@ -// check-pass +//@ check-pass #![feature(generic_const_exprs)] #![allow(incomplete_features)] diff --git a/tests/ui/associated-consts/issue-93775.rs b/tests/ui/associated-consts/issue-93775.rs index db788fe6e6a..c9044e27e0e 100644 --- a/tests/ui/associated-consts/issue-93775.rs +++ b/tests/ui/associated-consts/issue-93775.rs @@ -1,4 +1,4 @@ -// build-pass +//@ build-pass // ignore-tidy-linelength // Regression for #93775, needs build-pass to test it. diff --git a/tests/ui/associated-consts/mismatched_impl_ty_1.rs b/tests/ui/associated-consts/mismatched_impl_ty_1.rs index 4dc6c2e47a9..55db10bd0e4 100644 --- a/tests/ui/associated-consts/mismatched_impl_ty_1.rs +++ b/tests/ui/associated-consts/mismatched_impl_ty_1.rs @@ -1,4 +1,4 @@ -// run-pass +//@ run-pass #![feature(generic_const_exprs)] #![allow(incomplete_features)] diff --git a/tests/ui/associated-consts/mismatched_impl_ty_2.rs b/tests/ui/associated-consts/mismatched_impl_ty_2.rs index 539becfdc7c..c6cbc69503d 100644 --- a/tests/ui/associated-consts/mismatched_impl_ty_2.rs +++ b/tests/ui/associated-consts/mismatched_impl_ty_2.rs @@ -1,4 +1,4 @@ -// run-pass +//@ run-pass trait Trait { const ASSOC: fn(&'static u32); } diff --git a/tests/ui/associated-consts/mismatched_impl_ty_3.rs b/tests/ui/associated-consts/mismatched_impl_ty_3.rs index 17bcc8fe576..7945441f1c9 100644 --- a/tests/ui/associated-consts/mismatched_impl_ty_3.rs +++ b/tests/ui/associated-consts/mismatched_impl_ty_3.rs @@ -1,4 +1,4 @@ -// run-pass +//@ run-pass trait Trait { const ASSOC: for<'a, 'b> fn(&'a u32, &'b u32); } diff --git a/tests/ui/associated-inherent-types/assoc-inherent-late-bound.rs b/tests/ui/associated-inherent-types/assoc-inherent-late-bound.rs index b6993f66fe7..9f3798b27af 100644 --- a/tests/ui/associated-inherent-types/assoc-inherent-late-bound.rs +++ b/tests/ui/associated-inherent-types/assoc-inherent-late-bound.rs @@ -1,4 +1,4 @@ -// check-pass +//@ check-pass #![feature(inherent_associated_types)] #![allow(incomplete_features)] diff --git a/tests/ui/associated-inherent-types/assoc-inherent-unstable.rs b/tests/ui/associated-inherent-types/assoc-inherent-unstable.rs index 152bb7a60a7..ddb9278bafa 100644 --- a/tests/ui/associated-inherent-types/assoc-inherent-unstable.rs +++ b/tests/ui/associated-inherent-types/assoc-inherent-unstable.rs @@ -1,5 +1,5 @@ -// aux-crate:aux=assoc-inherent-unstable.rs -// edition: 2021 +//@ aux-crate:aux=assoc-inherent-unstable.rs +//@ edition: 2021 #![feature(inherent_associated_types)] #![allow(incomplete_features)] diff --git a/tests/ui/associated-inherent-types/assoc-inherent-use.rs b/tests/ui/associated-inherent-types/assoc-inherent-use.rs index 7ae425e2aaa..c634c89a540 100644 --- a/tests/ui/associated-inherent-types/assoc-inherent-use.rs +++ b/tests/ui/associated-inherent-types/assoc-inherent-use.rs @@ -1,4 +1,4 @@ -// check-pass +//@ check-pass #![feature(inherent_associated_types)] #![allow(incomplete_features)] diff --git a/tests/ui/associated-inherent-types/bugs/cycle-iat-inside-of-adt.rs b/tests/ui/associated-inherent-types/bugs/cycle-iat-inside-of-adt.rs index 33c73c3db89..64168cb8c14 100644 --- a/tests/ui/associated-inherent-types/bugs/cycle-iat-inside-of-adt.rs +++ b/tests/ui/associated-inherent-types/bugs/cycle-iat-inside-of-adt.rs @@ -1,4 +1,4 @@ -// known-bug: #108491 +//@ known-bug: #108491 #![feature(inherent_associated_types)] #![allow(incomplete_features)] diff --git a/tests/ui/associated-inherent-types/bugs/cycle-iat-inside-of-where-predicate.rs b/tests/ui/associated-inherent-types/bugs/cycle-iat-inside-of-where-predicate.rs index 0c2a38b1173..902094b9862 100644 --- a/tests/ui/associated-inherent-types/bugs/cycle-iat-inside-of-where-predicate.rs +++ b/tests/ui/associated-inherent-types/bugs/cycle-iat-inside-of-where-predicate.rs @@ -1,4 +1,4 @@ -// known-bug: unknown +//@ known-bug: unknown #![feature(inherent_associated_types)] #![allow(incomplete_features)] diff --git a/tests/ui/associated-inherent-types/bugs/wf-check-skipped.rs b/tests/ui/associated-inherent-types/bugs/wf-check-skipped.rs index c7f66e645bb..3159500393e 100644 --- a/tests/ui/associated-inherent-types/bugs/wf-check-skipped.rs +++ b/tests/ui/associated-inherent-types/bugs/wf-check-skipped.rs @@ -1,5 +1,5 @@ -// known-bug: #100041 -// check-pass +//@ known-bug: #100041 +//@ check-pass #![feature(inherent_associated_types)] #![allow(incomplete_features)] diff --git a/tests/ui/associated-inherent-types/const-generics.rs b/tests/ui/associated-inherent-types/const-generics.rs index 5b7c00bccba..9a4e4a3db78 100644 --- a/tests/ui/associated-inherent-types/const-generics.rs +++ b/tests/ui/associated-inherent-types/const-generics.rs @@ -1,5 +1,5 @@ // Regression test for issue #109759. -// check-pass +//@ check-pass #![feature(inherent_associated_types)] #![allow(incomplete_features)] diff --git a/tests/ui/associated-inherent-types/dispatch-on-self-type-0.rs b/tests/ui/associated-inherent-types/dispatch-on-self-type-0.rs index 83be4f43b5e..ae2aa9c97ba 100644 --- a/tests/ui/associated-inherent-types/dispatch-on-self-type-0.rs +++ b/tests/ui/associated-inherent-types/dispatch-on-self-type-0.rs @@ -1,4 +1,4 @@ -// check-pass +//@ check-pass #![feature(inherent_associated_types)] #![allow(incomplete_features)] diff --git a/tests/ui/associated-inherent-types/dispatch-on-self-type-1.rs b/tests/ui/associated-inherent-types/dispatch-on-self-type-1.rs index 9b0fa8dc6f3..5fe7dd8d899 100644 --- a/tests/ui/associated-inherent-types/dispatch-on-self-type-1.rs +++ b/tests/ui/associated-inherent-types/dispatch-on-self-type-1.rs @@ -1,4 +1,4 @@ -// check-pass +//@ check-pass #![feature(inherent_associated_types, auto_traits, negative_impls)] #![allow(incomplete_features)] diff --git a/tests/ui/associated-inherent-types/former-subst-ice.rs b/tests/ui/associated-inherent-types/former-subst-ice.rs index 48390b9430b..b27a16acc4b 100644 --- a/tests/ui/associated-inherent-types/former-subst-ice.rs +++ b/tests/ui/associated-inherent-types/former-subst-ice.rs @@ -1,4 +1,4 @@ -// check-pass +//@ check-pass #![feature(inherent_associated_types)] #![allow(incomplete_features)] diff --git a/tests/ui/associated-inherent-types/generic-associated-types-bad.rs b/tests/ui/associated-inherent-types/generic-associated-types-bad.rs index f5deec422f5..fdc2a0f64e4 100644 --- a/tests/ui/associated-inherent-types/generic-associated-types-bad.rs +++ b/tests/ui/associated-inherent-types/generic-associated-types-bad.rs @@ -1,4 +1,4 @@ -// revisions: item local region +//@ revisions: item local region #![feature(inherent_associated_types)] #![allow(incomplete_features)] diff --git a/tests/ui/associated-inherent-types/generic-const-exprs.rs b/tests/ui/associated-inherent-types/generic-const-exprs.rs index a4ac0ecfa4c..2c6965edc6b 100644 --- a/tests/ui/associated-inherent-types/generic-const-exprs.rs +++ b/tests/ui/associated-inherent-types/generic-const-exprs.rs @@ -1,4 +1,4 @@ -// check-pass +//@ check-pass #![feature(inherent_associated_types, generic_const_exprs)] #![allow(incomplete_features)] diff --git a/tests/ui/associated-inherent-types/inference.rs b/tests/ui/associated-inherent-types/inference.rs index 054034b4c28..f520c610685 100644 --- a/tests/ui/associated-inherent-types/inference.rs +++ b/tests/ui/associated-inherent-types/inference.rs @@ -1,7 +1,7 @@ // Testing inference capabilities. -// check-pass -// revisions: current next -//[next] compile-flags: -Znext-solver +//@ check-pass +//@ revisions: current next +//@[next] compile-flags: -Znext-solver #![feature(inherent_associated_types)] #![allow(incomplete_features)] diff --git a/tests/ui/associated-inherent-types/issue-104260.rs b/tests/ui/associated-inherent-types/issue-104260.rs index a73cd1775b4..4a0bab2cb4b 100644 --- a/tests/ui/associated-inherent-types/issue-104260.rs +++ b/tests/ui/associated-inherent-types/issue-104260.rs @@ -1,4 +1,4 @@ -// check-pass +//@ check-pass #![feature(inherent_associated_types)] #![allow(incomplete_features)] diff --git a/tests/ui/associated-inherent-types/issue-109071.rs b/tests/ui/associated-inherent-types/issue-109071.rs index cbe8cce0924..29eef081a32 100644 --- a/tests/ui/associated-inherent-types/issue-109071.rs +++ b/tests/ui/associated-inherent-types/issue-109071.rs @@ -1,4 +1,4 @@ -// revisions: with_gate no_gate +//@ revisions: with_gate no_gate #![cfg_attr(with_gate, feature(inherent_associated_types))] #![cfg_attr(with_gate, allow(incomplete_features))] diff --git a/tests/ui/associated-inherent-types/issue-109768.rs b/tests/ui/associated-inherent-types/issue-109768.rs index 400f4f7de66..00873ccc8cf 100644 --- a/tests/ui/associated-inherent-types/issue-109768.rs +++ b/tests/ui/associated-inherent-types/issue-109768.rs @@ -1,4 +1,4 @@ -// incremental +//@ incremental struct Wrapper(T); diff --git a/tests/ui/associated-inherent-types/issue-109790.rs b/tests/ui/associated-inherent-types/issue-109790.rs index 88327f86423..ecfe2ad707f 100644 --- a/tests/ui/associated-inherent-types/issue-109790.rs +++ b/tests/ui/associated-inherent-types/issue-109790.rs @@ -1,4 +1,4 @@ -// check-pass +//@ check-pass #![feature(inherent_associated_types)] #![allow(incomplete_features)] diff --git a/tests/ui/associated-inherent-types/issue-111404-0.rs b/tests/ui/associated-inherent-types/issue-111404-0.rs index 1180577bd54..f8837b4e13d 100644 --- a/tests/ui/associated-inherent-types/issue-111404-0.rs +++ b/tests/ui/associated-inherent-types/issue-111404-0.rs @@ -1,4 +1,4 @@ -// check-pass +//@ check-pass #![feature(inherent_associated_types)] #![allow(incomplete_features)] diff --git a/tests/ui/associated-inherent-types/normalize-projection-0.rs b/tests/ui/associated-inherent-types/normalize-projection-0.rs index 50763ecddf9..2380f48dc22 100644 --- a/tests/ui/associated-inherent-types/normalize-projection-0.rs +++ b/tests/ui/associated-inherent-types/normalize-projection-0.rs @@ -1,4 +1,4 @@ -// check-pass +//@ check-pass #![feature(inherent_associated_types)] #![allow(incomplete_features)] diff --git a/tests/ui/associated-inherent-types/normalize-projection-1.rs b/tests/ui/associated-inherent-types/normalize-projection-1.rs index 2f7b2551a03..238550667ed 100644 --- a/tests/ui/associated-inherent-types/normalize-projection-1.rs +++ b/tests/ui/associated-inherent-types/normalize-projection-1.rs @@ -1,4 +1,4 @@ -// check-pass +//@ check-pass #![feature(inherent_associated_types)] #![allow(incomplete_features)] diff --git a/tests/ui/associated-inherent-types/not-found-self-type-differs-shadowing-trait-item.rs b/tests/ui/associated-inherent-types/not-found-self-type-differs-shadowing-trait-item.rs index d2efb24c666..c205cb800d2 100644 --- a/tests/ui/associated-inherent-types/not-found-self-type-differs-shadowing-trait-item.rs +++ b/tests/ui/associated-inherent-types/not-found-self-type-differs-shadowing-trait-item.rs @@ -7,7 +7,7 @@ // anyway if the IAT didn't exist. // FIXME(inherent_associated_types): Figure out which error would be more helpful here. -// revisions: shadowed uncovered +//@ revisions: shadowed uncovered struct S(T); diff --git a/tests/ui/associated-inherent-types/private-in-public.rs b/tests/ui/associated-inherent-types/private-in-public.rs index 7797a2a16a5..a950d1735c6 100644 --- a/tests/ui/associated-inherent-types/private-in-public.rs +++ b/tests/ui/associated-inherent-types/private-in-public.rs @@ -1,4 +1,4 @@ -// check-pass +//@ check-pass #![feature(inherent_associated_types)] #![allow(incomplete_features)] diff --git a/tests/ui/associated-inherent-types/substitute-params.rs b/tests/ui/associated-inherent-types/substitute-params.rs index 631340b2b4d..3ccb7028bb9 100644 --- a/tests/ui/associated-inherent-types/substitute-params.rs +++ b/tests/ui/associated-inherent-types/substitute-params.rs @@ -1,4 +1,4 @@ -// check-pass +//@ check-pass #![feature(inherent_associated_types)] #![allow(incomplete_features)] diff --git a/tests/ui/associated-inherent-types/type-alias-bounds-are-enforced.rs b/tests/ui/associated-inherent-types/type-alias-bounds-are-enforced.rs index 99769692342..5ac7e1e58b8 100644 --- a/tests/ui/associated-inherent-types/type-alias-bounds-are-enforced.rs +++ b/tests/ui/associated-inherent-types/type-alias-bounds-are-enforced.rs @@ -1,5 +1,5 @@ -// compile-flags: --crate-type=lib -// check-pass +//@ compile-flags: --crate-type=lib +//@ check-pass #![feature(inherent_associated_types)] #![allow(incomplete_features)] diff --git a/tests/ui/associated-item/ambiguous-associated-type-with-generics.fixed b/tests/ui/associated-item/ambiguous-associated-type-with-generics.fixed index 23f71520040..cb738d08a93 100644 --- a/tests/ui/associated-item/ambiguous-associated-type-with-generics.fixed +++ b/tests/ui/associated-item/ambiguous-associated-type-with-generics.fixed @@ -1,4 +1,4 @@ -// run-rustfix +//@ run-rustfix trait Trait {} trait Assoc { diff --git a/tests/ui/associated-item/ambiguous-associated-type-with-generics.rs b/tests/ui/associated-item/ambiguous-associated-type-with-generics.rs index 9c26e339a44..ecc7c657ee0 100644 --- a/tests/ui/associated-item/ambiguous-associated-type-with-generics.rs +++ b/tests/ui/associated-item/ambiguous-associated-type-with-generics.rs @@ -1,4 +1,4 @@ -// run-rustfix +//@ run-rustfix trait Trait {} trait Assoc { diff --git a/tests/ui/associated-item/associated-item-two-bounds.rs b/tests/ui/associated-item/associated-item-two-bounds.rs index 25b0d5a56bf..62d3b3d8288 100644 --- a/tests/ui/associated-item/associated-item-two-bounds.rs +++ b/tests/ui/associated-item/associated-item-two-bounds.rs @@ -1,6 +1,6 @@ // This test is a regression test for #34792 -// check-pass +//@ check-pass pub struct A; pub struct B; diff --git a/tests/ui/associated-item/issue-105449.rs b/tests/ui/associated-item/issue-105449.rs index dd14e05fd49..5ccc317562b 100644 --- a/tests/ui/associated-item/issue-105449.rs +++ b/tests/ui/associated-item/issue-105449.rs @@ -1,5 +1,5 @@ -// check-pass -// compile-flags: -C debug_assertions=yes -Zunstable-options +//@ check-pass +//@ compile-flags: -C debug_assertions=yes -Zunstable-options #[allow(dead_code)] fn problematic_function() diff --git a/tests/ui/associated-item/issue-87638.fixed b/tests/ui/associated-item/issue-87638.fixed index b689777685f..36184e78625 100644 --- a/tests/ui/associated-item/issue-87638.fixed +++ b/tests/ui/associated-item/issue-87638.fixed @@ -1,4 +1,4 @@ -// run-rustfix +//@ run-rustfix trait Trait { const FOO: usize; diff --git a/tests/ui/associated-item/issue-87638.rs b/tests/ui/associated-item/issue-87638.rs index 5a60b20fdf3..30187625ff3 100644 --- a/tests/ui/associated-item/issue-87638.rs +++ b/tests/ui/associated-item/issue-87638.rs @@ -1,4 +1,4 @@ -// run-rustfix +//@ run-rustfix trait Trait { const FOO: usize; diff --git a/tests/ui/associated-type-bounds/ambiguous-associated-type.rs b/tests/ui/associated-type-bounds/ambiguous-associated-type.rs index 9c47a003dfd..4e6d8b9dd0a 100644 --- a/tests/ui/associated-type-bounds/ambiguous-associated-type.rs +++ b/tests/ui/associated-type-bounds/ambiguous-associated-type.rs @@ -1,4 +1,4 @@ -// check-pass +//@ check-pass #![feature(associated_type_bounds)] diff --git a/tests/ui/associated-type-bounds/assoc-type-bound-through-where-clause.rs b/tests/ui/associated-type-bounds/assoc-type-bound-through-where-clause.rs index 49f11140741..e7e38369968 100644 --- a/tests/ui/associated-type-bounds/assoc-type-bound-through-where-clause.rs +++ b/tests/ui/associated-type-bounds/assoc-type-bound-through-where-clause.rs @@ -1,6 +1,6 @@ // Check that `where Self::Output: Copy` is turned into a bound on `Op::Output`. -//check-pass +//@check-pass trait Op where diff --git a/tests/ui/associated-type-bounds/associated-item-through-where-clause.rs b/tests/ui/associated-type-bounds/associated-item-through-where-clause.rs index 3eb50ab5547..b672cc76a02 100644 --- a/tests/ui/associated-type-bounds/associated-item-through-where-clause.rs +++ b/tests/ui/associated-type-bounds/associated-item-through-where-clause.rs @@ -1,4 +1,4 @@ -// check-pass +//@ check-pass trait Foo { type Item; diff --git a/tests/ui/associated-type-bounds/bad-bounds-on-assoc-in-trait.rs b/tests/ui/associated-type-bounds/bad-bounds-on-assoc-in-trait.rs index 1c48aadecce..edde549bb4b 100644 --- a/tests/ui/associated-type-bounds/bad-bounds-on-assoc-in-trait.rs +++ b/tests/ui/associated-type-bounds/bad-bounds-on-assoc-in-trait.rs @@ -1,4 +1,4 @@ -// check-pass +//@ check-pass #![feature(associated_type_bounds)] diff --git a/tests/ui/associated-type-bounds/bounds-on-assoc-in-trait.rs b/tests/ui/associated-type-bounds/bounds-on-assoc-in-trait.rs index 7bc2970ade9..dad1f644284 100644 --- a/tests/ui/associated-type-bounds/bounds-on-assoc-in-trait.rs +++ b/tests/ui/associated-type-bounds/bounds-on-assoc-in-trait.rs @@ -1,4 +1,4 @@ -// check-pass +//@ check-pass #![feature(associated_type_bounds)] diff --git a/tests/ui/associated-type-bounds/const-projection-err.rs b/tests/ui/associated-type-bounds/const-projection-err.rs index bead8563001..22f1897c07f 100644 --- a/tests/ui/associated-type-bounds/const-projection-err.rs +++ b/tests/ui/associated-type-bounds/const-projection-err.rs @@ -1,4 +1,4 @@ -// revisions: stock gce +//@ revisions: stock gce #![feature(associated_const_equality)] #![cfg_attr(gce, feature(generic_const_exprs))] diff --git a/tests/ui/associated-type-bounds/entails-sized-object-safety.rs b/tests/ui/associated-type-bounds/entails-sized-object-safety.rs index f5a9bac6e35..211c67061e6 100644 --- a/tests/ui/associated-type-bounds/entails-sized-object-safety.rs +++ b/tests/ui/associated-type-bounds/entails-sized-object-safety.rs @@ -1,4 +1,4 @@ -// build-pass (FIXME(62277): could be check-pass?) +//@ build-pass (FIXME(62277): could be check-pass?) #![feature(associated_type_bounds)] diff --git a/tests/ui/associated-type-bounds/enum-bounds.rs b/tests/ui/associated-type-bounds/enum-bounds.rs index 193f2efe199..b5087acb6b8 100644 --- a/tests/ui/associated-type-bounds/enum-bounds.rs +++ b/tests/ui/associated-type-bounds/enum-bounds.rs @@ -1,4 +1,4 @@ -// run-pass +//@ run-pass #![feature(associated_type_bounds)] #![allow(dead_code)] diff --git a/tests/ui/associated-type-bounds/fn-apit.rs b/tests/ui/associated-type-bounds/fn-apit.rs index 3c9f511338f..8e1897cc3d4 100644 --- a/tests/ui/associated-type-bounds/fn-apit.rs +++ b/tests/ui/associated-type-bounds/fn-apit.rs @@ -1,5 +1,5 @@ -// run-pass -// aux-build:fn-aux.rs +//@ run-pass +//@ aux-build:fn-aux.rs #![allow(unused)] #![feature(associated_type_bounds)] diff --git a/tests/ui/associated-type-bounds/fn-aux.rs b/tests/ui/associated-type-bounds/fn-aux.rs index 434bdbe996c..6aaa0cc895f 100644 --- a/tests/ui/associated-type-bounds/fn-aux.rs +++ b/tests/ui/associated-type-bounds/fn-aux.rs @@ -1,5 +1,5 @@ -// run-pass -// aux-build:fn-aux.rs +//@ run-pass +//@ aux-build:fn-aux.rs #![feature(associated_type_bounds)] diff --git a/tests/ui/associated-type-bounds/fn-inline.rs b/tests/ui/associated-type-bounds/fn-inline.rs index 8fa7212d627..8435cb44a9a 100644 --- a/tests/ui/associated-type-bounds/fn-inline.rs +++ b/tests/ui/associated-type-bounds/fn-inline.rs @@ -1,5 +1,5 @@ -// run-pass -// aux-build:fn-aux.rs +//@ run-pass +//@ aux-build:fn-aux.rs #![allow(unused)] #![feature(associated_type_bounds)] diff --git a/tests/ui/associated-type-bounds/fn-where.rs b/tests/ui/associated-type-bounds/fn-where.rs index 9c4f82ac991..3b6b557fb11 100644 --- a/tests/ui/associated-type-bounds/fn-where.rs +++ b/tests/ui/associated-type-bounds/fn-where.rs @@ -1,5 +1,5 @@ -// run-pass -// aux-build:fn-aux.rs +//@ run-pass +//@ aux-build:fn-aux.rs #![allow(unused)] #![feature(associated_type_bounds)] diff --git a/tests/ui/associated-type-bounds/fn-wrap-apit.rs b/tests/ui/associated-type-bounds/fn-wrap-apit.rs index 96df13e372a..4ce714d432f 100644 --- a/tests/ui/associated-type-bounds/fn-wrap-apit.rs +++ b/tests/ui/associated-type-bounds/fn-wrap-apit.rs @@ -1,5 +1,5 @@ -// run-pass -// aux-build:fn-aux.rs +//@ run-pass +//@ aux-build:fn-aux.rs #![feature(associated_type_bounds)] #![allow(dead_code)] diff --git a/tests/ui/associated-type-bounds/handle-predicates-that-can-define-assoc-type.rs b/tests/ui/associated-type-bounds/handle-predicates-that-can-define-assoc-type.rs index b1e54ec0449..a79f270da45 100644 --- a/tests/ui/associated-type-bounds/handle-predicates-that-can-define-assoc-type.rs +++ b/tests/ui/associated-type-bounds/handle-predicates-that-can-define-assoc-type.rs @@ -1,4 +1,4 @@ -// check-pass +//@ check-pass trait Foo {} trait Bar { diff --git a/tests/ui/associated-type-bounds/higher-ranked.rs b/tests/ui/associated-type-bounds/higher-ranked.rs index 2bd5f316811..9e783c4bdca 100644 --- a/tests/ui/associated-type-bounds/higher-ranked.rs +++ b/tests/ui/associated-type-bounds/higher-ranked.rs @@ -1,4 +1,4 @@ -// check-pass +//@ check-pass #![feature(associated_type_bounds)] diff --git a/tests/ui/associated-type-bounds/hrtb.rs b/tests/ui/associated-type-bounds/hrtb.rs index 7ab3836493b..73c7a1a5677 100644 --- a/tests/ui/associated-type-bounds/hrtb.rs +++ b/tests/ui/associated-type-bounds/hrtb.rs @@ -1,4 +1,4 @@ -// check-pass +//@ check-pass #![feature(associated_type_bounds)] diff --git a/tests/ui/associated-type-bounds/implied-in-supertrait.rs b/tests/ui/associated-type-bounds/implied-in-supertrait.rs index ea7e7c984da..83cb07d700a 100644 --- a/tests/ui/associated-type-bounds/implied-in-supertrait.rs +++ b/tests/ui/associated-type-bounds/implied-in-supertrait.rs @@ -1,4 +1,4 @@ -// check-pass +//@ check-pass #![feature(associated_type_bounds)] diff --git a/tests/ui/associated-type-bounds/issue-61752.rs b/tests/ui/associated-type-bounds/issue-61752.rs index f38ec640e17..22e43ea875e 100644 --- a/tests/ui/associated-type-bounds/issue-61752.rs +++ b/tests/ui/associated-type-bounds/issue-61752.rs @@ -1,4 +1,4 @@ -// check-pass +//@ check-pass #![feature(associated_type_bounds)] diff --git a/tests/ui/associated-type-bounds/issue-70292.rs b/tests/ui/associated-type-bounds/issue-70292.rs index 945d7688ce6..4b8e19904d0 100644 --- a/tests/ui/associated-type-bounds/issue-70292.rs +++ b/tests/ui/associated-type-bounds/issue-70292.rs @@ -1,4 +1,4 @@ -// check-pass +//@ check-pass #![feature(associated_type_bounds)] diff --git a/tests/ui/associated-type-bounds/issue-71443-2.rs b/tests/ui/associated-type-bounds/issue-71443-2.rs index 813dcd60ad1..bd072f44650 100644 --- a/tests/ui/associated-type-bounds/issue-71443-2.rs +++ b/tests/ui/associated-type-bounds/issue-71443-2.rs @@ -1,4 +1,4 @@ -// check-pass +//@ check-pass #![feature(associated_type_bounds)] diff --git a/tests/ui/associated-type-bounds/issue-73818.rs b/tests/ui/associated-type-bounds/issue-73818.rs index bb890f72a32..748cfbb3d8e 100644 --- a/tests/ui/associated-type-bounds/issue-73818.rs +++ b/tests/ui/associated-type-bounds/issue-73818.rs @@ -1,6 +1,6 @@ // Test that associated type bounds are correctly normalized when checking // default associated type values. -// check-pass +//@ check-pass #![allow(incomplete_features)] #![feature(specialization)] diff --git a/tests/ui/associated-type-bounds/issue-79949.rs b/tests/ui/associated-type-bounds/issue-79949.rs index 9dd37f98150..4513f0a0b62 100644 --- a/tests/ui/associated-type-bounds/issue-79949.rs +++ b/tests/ui/associated-type-bounds/issue-79949.rs @@ -1,4 +1,4 @@ -// check-pass +//@ check-pass #![allow(incomplete_features)] #![feature(associated_type_bounds)] diff --git a/tests/ui/associated-type-bounds/issue-81193.rs b/tests/ui/associated-type-bounds/issue-81193.rs index d2aa54ab951..1247f835be9 100644 --- a/tests/ui/associated-type-bounds/issue-81193.rs +++ b/tests/ui/associated-type-bounds/issue-81193.rs @@ -1,4 +1,4 @@ -// check-pass +//@ check-pass #![feature(associated_type_bounds)] diff --git a/tests/ui/associated-type-bounds/issue-83017.rs b/tests/ui/associated-type-bounds/issue-83017.rs index a02208661f1..a059b940e66 100644 --- a/tests/ui/associated-type-bounds/issue-83017.rs +++ b/tests/ui/associated-type-bounds/issue-83017.rs @@ -1,4 +1,4 @@ -// check-pass +//@ check-pass #![feature(associated_type_bounds)] diff --git a/tests/ui/associated-type-bounds/nested-bounds-dont-eliminate-alias-bounds.rs b/tests/ui/associated-type-bounds/nested-bounds-dont-eliminate-alias-bounds.rs index 05e4e323d87..ee4de509da6 100644 --- a/tests/ui/associated-type-bounds/nested-bounds-dont-eliminate-alias-bounds.rs +++ b/tests/ui/associated-type-bounds/nested-bounds-dont-eliminate-alias-bounds.rs @@ -1,4 +1,4 @@ -// check-pass +//@ check-pass #![feature(associated_type_bounds)] diff --git a/tests/ui/associated-type-bounds/order-dependent-bounds-issue-54121.rs b/tests/ui/associated-type-bounds/order-dependent-bounds-issue-54121.rs index 77e4bd4d6f5..f6d3c1adaf1 100644 --- a/tests/ui/associated-type-bounds/order-dependent-bounds-issue-54121.rs +++ b/tests/ui/associated-type-bounds/order-dependent-bounds-issue-54121.rs @@ -1,4 +1,4 @@ -// check-pass +//@ check-pass // From https://github.com/rust-lang/rust/issues/54121/ // diff --git a/tests/ui/associated-type-bounds/return-type-notation/bad-inputs-and-output.rs b/tests/ui/associated-type-bounds/return-type-notation/bad-inputs-and-output.rs index 4f332fa13d0..50a8cd8e04b 100644 --- a/tests/ui/associated-type-bounds/return-type-notation/bad-inputs-and-output.rs +++ b/tests/ui/associated-type-bounds/return-type-notation/bad-inputs-and-output.rs @@ -1,4 +1,4 @@ -// edition: 2021 +//@ edition: 2021 #![feature(return_type_notation)] //~^ WARN the feature `return_type_notation` is incomplete diff --git a/tests/ui/associated-type-bounds/return-type-notation/basic.rs b/tests/ui/associated-type-bounds/return-type-notation/basic.rs index 7f0647534f2..9755fd01c97 100644 --- a/tests/ui/associated-type-bounds/return-type-notation/basic.rs +++ b/tests/ui/associated-type-bounds/return-type-notation/basic.rs @@ -1,6 +1,6 @@ -// revisions: with without -// edition: 2021 -// [with] check-pass +//@ revisions: with without +//@ edition: 2021 +//@ [with] check-pass #![feature(return_type_notation)] //~^ WARN the feature `return_type_notation` is incomplete diff --git a/tests/ui/associated-type-bounds/return-type-notation/equality.rs b/tests/ui/associated-type-bounds/return-type-notation/equality.rs index d5a29616ac5..ae38dce1818 100644 --- a/tests/ui/associated-type-bounds/return-type-notation/equality.rs +++ b/tests/ui/associated-type-bounds/return-type-notation/equality.rs @@ -1,4 +1,4 @@ -// edition: 2021 +//@ edition: 2021 #![feature(return_type_notation)] //~^ WARN the feature `return_type_notation` is incomplete diff --git a/tests/ui/associated-type-bounds/return-type-notation/issue-120208-higher-ranked-const.rs b/tests/ui/associated-type-bounds/return-type-notation/issue-120208-higher-ranked-const.rs index 3b350e14fd9..11728b87990 100644 --- a/tests/ui/associated-type-bounds/return-type-notation/issue-120208-higher-ranked-const.rs +++ b/tests/ui/associated-type-bounds/return-type-notation/issue-120208-higher-ranked-const.rs @@ -1,4 +1,4 @@ -// edition: 2021 +//@ edition: 2021 #![feature(return_type_notation)] //~^ WARN the feature `return_type_notation` is incomplete diff --git a/tests/ui/associated-type-bounds/return-type-notation/missing.rs b/tests/ui/associated-type-bounds/return-type-notation/missing.rs index e6270ec3166..9a8b77d00b7 100644 --- a/tests/ui/associated-type-bounds/return-type-notation/missing.rs +++ b/tests/ui/associated-type-bounds/return-type-notation/missing.rs @@ -1,4 +1,4 @@ -// edition: 2021 +//@ edition: 2021 #![feature(return_type_notation)] //~^ WARN the feature `return_type_notation` is incomplete diff --git a/tests/ui/associated-type-bounds/return-type-notation/unpretty-parenthesized.rs b/tests/ui/associated-type-bounds/return-type-notation/unpretty-parenthesized.rs index 9129f37e0c6..0a98f0d2c8d 100644 --- a/tests/ui/associated-type-bounds/return-type-notation/unpretty-parenthesized.rs +++ b/tests/ui/associated-type-bounds/return-type-notation/unpretty-parenthesized.rs @@ -1,5 +1,5 @@ -// edition: 2021 -// compile-flags: -Zunpretty=expanded +//@ edition: 2021 +//@ compile-flags: -Zunpretty=expanded trait Trait { async fn method() {} diff --git a/tests/ui/associated-type-bounds/return-type-notation/unpretty-parenthesized.stdout b/tests/ui/associated-type-bounds/return-type-notation/unpretty-parenthesized.stdout index b3dea8f6eca..17c3b9580ca 100644 --- a/tests/ui/associated-type-bounds/return-type-notation/unpretty-parenthesized.stdout +++ b/tests/ui/associated-type-bounds/return-type-notation/unpretty-parenthesized.stdout @@ -3,8 +3,8 @@ use std::prelude::rust_2021::*; #[macro_use] extern crate std; -// edition: 2021 -// compile-flags: -Zunpretty=expanded +//@ edition: 2021 +//@ compile-flags: -Zunpretty=expanded trait Trait { async fn method() {} diff --git a/tests/ui/associated-type-bounds/rpit.rs b/tests/ui/associated-type-bounds/rpit.rs index 557e63b5f71..78710621cad 100644 --- a/tests/ui/associated-type-bounds/rpit.rs +++ b/tests/ui/associated-type-bounds/rpit.rs @@ -1,4 +1,4 @@ -// run-pass +//@ run-pass #![feature(associated_type_bounds)] diff --git a/tests/ui/associated-type-bounds/struct-bounds.rs b/tests/ui/associated-type-bounds/struct-bounds.rs index 2c1ce1c3785..2c46832cb99 100644 --- a/tests/ui/associated-type-bounds/struct-bounds.rs +++ b/tests/ui/associated-type-bounds/struct-bounds.rs @@ -1,4 +1,4 @@ -// run-pass +//@ run-pass #![allow(unused)] #![feature(associated_type_bounds)] diff --git a/tests/ui/associated-type-bounds/suggest-contraining-assoc-type-because-of-assoc-const.fixed b/tests/ui/associated-type-bounds/suggest-contraining-assoc-type-because-of-assoc-const.fixed index 128c7dfdda2..fadc0960f9b 100644 --- a/tests/ui/associated-type-bounds/suggest-contraining-assoc-type-because-of-assoc-const.fixed +++ b/tests/ui/associated-type-bounds/suggest-contraining-assoc-type-because-of-assoc-const.fixed @@ -1,4 +1,4 @@ -// run-rustfix +//@ run-rustfix #![allow(dead_code)] trait O { type M; diff --git a/tests/ui/associated-type-bounds/suggest-contraining-assoc-type-because-of-assoc-const.rs b/tests/ui/associated-type-bounds/suggest-contraining-assoc-type-because-of-assoc-const.rs index 6b6478419b4..5e7e2136b95 100644 --- a/tests/ui/associated-type-bounds/suggest-contraining-assoc-type-because-of-assoc-const.rs +++ b/tests/ui/associated-type-bounds/suggest-contraining-assoc-type-because-of-assoc-const.rs @@ -1,4 +1,4 @@ -// run-rustfix +//@ run-rustfix #![allow(dead_code)] trait O { type M; diff --git a/tests/ui/associated-type-bounds/supertrait-defines-ty.rs b/tests/ui/associated-type-bounds/supertrait-defines-ty.rs index b6f37cb908e..62b23b5fbab 100644 --- a/tests/ui/associated-type-bounds/supertrait-defines-ty.rs +++ b/tests/ui/associated-type-bounds/supertrait-defines-ty.rs @@ -1,4 +1,4 @@ -// check-pass +//@ check-pass // Make sure that we don't look into associated type bounds when looking for // supertraits that define an associated type. Fixes #76593. diff --git a/tests/ui/associated-type-bounds/supertrait-referencing-self.rs b/tests/ui/associated-type-bounds/supertrait-referencing-self.rs index c82ec01f4d6..bb6a2fd1035 100644 --- a/tests/ui/associated-type-bounds/supertrait-referencing-self.rs +++ b/tests/ui/associated-type-bounds/supertrait-referencing-self.rs @@ -1,4 +1,4 @@ -// check-pass +//@ check-pass trait Foo { type Bar; } diff --git a/tests/ui/associated-type-bounds/supertrait-referencing.rs b/tests/ui/associated-type-bounds/supertrait-referencing.rs index 2e97535157f..06b5489f853 100644 --- a/tests/ui/associated-type-bounds/supertrait-referencing.rs +++ b/tests/ui/associated-type-bounds/supertrait-referencing.rs @@ -1,4 +1,4 @@ -// check-pass +//@ check-pass // The goal of this test is to ensure that T: Bar // in the where clause does not cycle diff --git a/tests/ui/associated-type-bounds/supertrait-where-referencing-self.rs b/tests/ui/associated-type-bounds/supertrait-where-referencing-self.rs index 72a6be9ffc3..5b03cdf1601 100644 --- a/tests/ui/associated-type-bounds/supertrait-where-referencing-self.rs +++ b/tests/ui/associated-type-bounds/supertrait-where-referencing-self.rs @@ -1,4 +1,4 @@ -// check-pass +//@ check-pass // Test that we do not get a cycle due to // resolving `Self::Bar` in the where clauses diff --git a/tests/ui/associated-type-bounds/trait-alias-impl-trait.rs b/tests/ui/associated-type-bounds/trait-alias-impl-trait.rs index 60088e443f3..6ca9f80ccaf 100644 --- a/tests/ui/associated-type-bounds/trait-alias-impl-trait.rs +++ b/tests/ui/associated-type-bounds/trait-alias-impl-trait.rs @@ -1,4 +1,4 @@ -// run-pass +//@ run-pass #![allow(dead_code)] #![feature(associated_type_bounds)] diff --git a/tests/ui/associated-type-bounds/trait-params.rs b/tests/ui/associated-type-bounds/trait-params.rs index b0703a4ee22..6782d688126 100644 --- a/tests/ui/associated-type-bounds/trait-params.rs +++ b/tests/ui/associated-type-bounds/trait-params.rs @@ -1,4 +1,4 @@ -// build-pass (FIXME(62277): could be check-pass?) +//@ build-pass (FIXME(62277): could be check-pass?) #![feature(associated_type_bounds)] diff --git a/tests/ui/associated-type-bounds/traits-assoc-anonymized.rs b/tests/ui/associated-type-bounds/traits-assoc-anonymized.rs index a9d6eed810a..87b7ba791b3 100644 --- a/tests/ui/associated-type-bounds/traits-assoc-anonymized.rs +++ b/tests/ui/associated-type-bounds/traits-assoc-anonymized.rs @@ -1,4 +1,4 @@ -// check-pass +//@ check-pass pub struct LookupInternedStorage; diff --git a/tests/ui/associated-type-bounds/traits-assoc-type-macros.rs b/tests/ui/associated-type-bounds/traits-assoc-type-macros.rs index d854dce382f..ad5c75425da 100644 --- a/tests/ui/associated-type-bounds/traits-assoc-type-macros.rs +++ b/tests/ui/associated-type-bounds/traits-assoc-type-macros.rs @@ -1,5 +1,5 @@ -// check-pass -// incremental +//@ check-pass +//@ incremental // This test case makes sure that we can compile with incremental compilation // enabled when there are macros, traits, inheritance and associated types involved. diff --git a/tests/ui/associated-type-bounds/type-alias.rs b/tests/ui/associated-type-bounds/type-alias.rs index f74c5ff1edd..819a7656a44 100644 --- a/tests/ui/associated-type-bounds/type-alias.rs +++ b/tests/ui/associated-type-bounds/type-alias.rs @@ -1,4 +1,4 @@ -// check-pass +//@ check-pass #![feature(associated_type_bounds)] diff --git a/tests/ui/associated-type-bounds/union-bounds.rs b/tests/ui/associated-type-bounds/union-bounds.rs index 46e5aef0403..8a7ba6f5ebf 100644 --- a/tests/ui/associated-type-bounds/union-bounds.rs +++ b/tests/ui/associated-type-bounds/union-bounds.rs @@ -1,4 +1,4 @@ -// run-pass +//@ run-pass #![feature(associated_type_bounds)] diff --git a/tests/ui/associated-types/associate-type-bound-normalization.rs b/tests/ui/associated-types/associate-type-bound-normalization.rs index db092970f79..4ce6308c1b0 100644 --- a/tests/ui/associated-types/associate-type-bound-normalization.rs +++ b/tests/ui/associated-types/associate-type-bound-normalization.rs @@ -1,7 +1,7 @@ // Make sure that we normalize bounds on associated types before checking them // as candidates. -// check-pass +//@ check-pass trait Mul { type Output; diff --git a/tests/ui/associated-types/associated-item-long-paths.rs b/tests/ui/associated-types/associated-item-long-paths.rs index aad8c487c5a..6d5d403d106 100644 --- a/tests/ui/associated-types/associated-item-long-paths.rs +++ b/tests/ui/associated-types/associated-item-long-paths.rs @@ -1,4 +1,4 @@ -// run-pass +//@ run-pass use std::mem::size_of; diff --git a/tests/ui/associated-types/associated-type-destructuring-assignment.rs b/tests/ui/associated-types/associated-type-destructuring-assignment.rs index f038c9ce7ba..2ab94908b60 100644 --- a/tests/ui/associated-types/associated-type-destructuring-assignment.rs +++ b/tests/ui/associated-types/associated-type-destructuring-assignment.rs @@ -1,4 +1,4 @@ -// check-pass +//@ check-pass #![feature(more_qualified_paths)] diff --git a/tests/ui/associated-types/associated-type-struct-construction.rs b/tests/ui/associated-types/associated-type-struct-construction.rs index f8f8048fb71..422fd5a0c3a 100644 --- a/tests/ui/associated-types/associated-type-struct-construction.rs +++ b/tests/ui/associated-types/associated-type-struct-construction.rs @@ -3,7 +3,7 @@ #![feature(more_qualified_paths)] -// check-pass +//@ check-pass fn main() { let ::Assoc { br } = ::Assoc { br: 2 }; assert!(br == 2); diff --git a/tests/ui/associated-types/associated-types-basic.rs b/tests/ui/associated-types/associated-types-basic.rs index b7f6721ec4f..911073a6a32 100644 --- a/tests/ui/associated-types/associated-types-basic.rs +++ b/tests/ui/associated-types/associated-types-basic.rs @@ -1,4 +1,4 @@ -// run-pass +//@ run-pass trait Foo { type T; } diff --git a/tests/ui/associated-types/associated-types-binding-in-trait.rs b/tests/ui/associated-types/associated-types-binding-in-trait.rs index 2e42b3a2a44..50fbe515101 100644 --- a/tests/ui/associated-types/associated-types-binding-in-trait.rs +++ b/tests/ui/associated-types/associated-types-binding-in-trait.rs @@ -1,4 +1,4 @@ -// run-pass +//@ run-pass // Test a case where the associated type binding (to `bool`, in this // case) is derived from the trait definition. Issue #21636. diff --git a/tests/ui/associated-types/associated-types-binding-in-where-clause.rs b/tests/ui/associated-types/associated-types-binding-in-where-clause.rs index c54bc3cd623..ed2cebb5f7e 100644 --- a/tests/ui/associated-types/associated-types-binding-in-where-clause.rs +++ b/tests/ui/associated-types/associated-types-binding-in-where-clause.rs @@ -1,7 +1,7 @@ -// run-pass +//@ run-pass // Test equality constraints on associated types in a where clause. -// pretty-expanded FIXME #23616 +//@ pretty-expanded FIXME #23616 pub trait Foo { type A; diff --git a/tests/ui/associated-types/associated-types-bound-ambiguity.rs b/tests/ui/associated-types/associated-types-bound-ambiguity.rs index 9f179b6454e..bed8eeafd06 100644 --- a/tests/ui/associated-types/associated-types-bound-ambiguity.rs +++ b/tests/ui/associated-types/associated-types-bound-ambiguity.rs @@ -3,7 +3,7 @@ // `Self::Repr: From<_>`, which is ambiguous until we later infer `_` to // `{integer}`. -// check-pass +//@ check-pass trait PrimeField: Sized { type Repr: From + From; diff --git a/tests/ui/associated-types/associated-types-bound-failure.fixed b/tests/ui/associated-types/associated-types-bound-failure.fixed index 68ee38d16b3..f18a0aa1a9a 100644 --- a/tests/ui/associated-types/associated-types-bound-failure.fixed +++ b/tests/ui/associated-types/associated-types-bound-failure.fixed @@ -1,4 +1,4 @@ -// run-rustfix +//@ run-rustfix // Test equality constraints on associated types in a where clause. #![allow(dead_code)] diff --git a/tests/ui/associated-types/associated-types-bound-failure.rs b/tests/ui/associated-types/associated-types-bound-failure.rs index 31e073cc7a8..1c58c8a1a3c 100644 --- a/tests/ui/associated-types/associated-types-bound-failure.rs +++ b/tests/ui/associated-types/associated-types-bound-failure.rs @@ -1,4 +1,4 @@ -// run-rustfix +//@ run-rustfix // Test equality constraints on associated types in a where clause. #![allow(dead_code)] diff --git a/tests/ui/associated-types/associated-types-bound.rs b/tests/ui/associated-types/associated-types-bound.rs index 0e9a229a5e5..1a9c0bf3199 100644 --- a/tests/ui/associated-types/associated-types-bound.rs +++ b/tests/ui/associated-types/associated-types-bound.rs @@ -1,4 +1,4 @@ -// run-pass +//@ run-pass // Test equality constrai32s on associated types in a where clause. diff --git a/tests/ui/associated-types/associated-types-cc.rs b/tests/ui/associated-types/associated-types-cc.rs index 13f1d27203a..361b0cfce13 100644 --- a/tests/ui/associated-types/associated-types-cc.rs +++ b/tests/ui/associated-types/associated-types-cc.rs @@ -1,6 +1,6 @@ -// run-pass +//@ run-pass #![allow(unused_variables)] -// aux-build:associated-types-cc-lib.rs +//@ aux-build:associated-types-cc-lib.rs // Test that we are able to reference cross-crate traits that employ // associated types. diff --git a/tests/ui/associated-types/associated-types-conditional-dispatch.rs b/tests/ui/associated-types/associated-types-conditional-dispatch.rs index 70ee60517ae..d30ea66e9b9 100644 --- a/tests/ui/associated-types/associated-types-conditional-dispatch.rs +++ b/tests/ui/associated-types/associated-types-conditional-dispatch.rs @@ -1,11 +1,11 @@ -// run-pass +//@ run-pass // Test that we evaluate projection predicates to winnow out // candidates during trait selection and method resolution (#20296). // If we don't properly winnow out candidates based on the output type // `Target=[A]`, then the impl marked with `(*)` is seen to conflict // with all the others. -// pretty-expanded FIXME #23616 +//@ pretty-expanded FIXME #23616 use std::marker::PhantomData; use std::ops::Deref; diff --git a/tests/ui/associated-types/associated-types-constant-type.rs b/tests/ui/associated-types/associated-types-constant-type.rs index 1e4c113a5fb..80a99cce0a3 100644 --- a/tests/ui/associated-types/associated-types-constant-type.rs +++ b/tests/ui/associated-types/associated-types-constant-type.rs @@ -1,4 +1,4 @@ -// run-pass +//@ run-pass trait SignedUnsigned { type Opposite; diff --git a/tests/ui/associated-types/associated-types-doubleendediterator-object.rs b/tests/ui/associated-types/associated-types-doubleendediterator-object.rs index 05498ba63e9..9b1f43b53ab 100644 --- a/tests/ui/associated-types/associated-types-doubleendediterator-object.rs +++ b/tests/ui/associated-types/associated-types-doubleendediterator-object.rs @@ -1,4 +1,4 @@ -// run-pass +//@ run-pass fn pairwise_sub(mut t: Box>) -> isize { let mut result = 0; diff --git a/tests/ui/associated-types/associated-types-duplicate-binding-in-env-hrtb.rs b/tests/ui/associated-types/associated-types-duplicate-binding-in-env-hrtb.rs index 12ca100435a..e2c13716a69 100644 --- a/tests/ui/associated-types/associated-types-duplicate-binding-in-env-hrtb.rs +++ b/tests/ui/associated-types/associated-types-duplicate-binding-in-env-hrtb.rs @@ -1,10 +1,10 @@ -// run-pass +//@ run-pass #![allow(dead_code)] // Check that we do not report ambiguities when equivalent predicates // (modulo bound lifetime names) appears in the environment // twice. Issue #21965. -// pretty-expanded FIXME #23616 +//@ pretty-expanded FIXME #23616 fn foo(t: T) -> i32 where T : for<'a> Fn(&'a u8) -> i32, diff --git a/tests/ui/associated-types/associated-types-duplicate-binding-in-env.rs b/tests/ui/associated-types/associated-types-duplicate-binding-in-env.rs index 9ffccd3d8ff..d1ff4b222b7 100644 --- a/tests/ui/associated-types/associated-types-duplicate-binding-in-env.rs +++ b/tests/ui/associated-types/associated-types-duplicate-binding-in-env.rs @@ -1,9 +1,9 @@ -// run-pass +//@ run-pass #![allow(dead_code)] // Check that we do not report ambiguities when the same predicate // appears in the environment twice. Issue #21965. -// pretty-expanded FIXME #23616 +//@ pretty-expanded FIXME #23616 trait Foo { type B; diff --git a/tests/ui/associated-types/associated-types-enum-field-named.rs b/tests/ui/associated-types/associated-types-enum-field-named.rs index 896d67213e9..19fc51f4a20 100644 --- a/tests/ui/associated-types/associated-types-enum-field-named.rs +++ b/tests/ui/associated-types/associated-types-enum-field-named.rs @@ -1,4 +1,4 @@ -// run-pass +//@ run-pass // Test associated types appearing in struct-like enum variants. diff --git a/tests/ui/associated-types/associated-types-enum-field-numbered.rs b/tests/ui/associated-types/associated-types-enum-field-numbered.rs index 77ced3c0781..06ece6ce813 100644 --- a/tests/ui/associated-types/associated-types-enum-field-numbered.rs +++ b/tests/ui/associated-types/associated-types-enum-field-numbered.rs @@ -1,4 +1,4 @@ -// run-pass +//@ run-pass // Test associated types appearing in tuple-like enum variants. diff --git a/tests/ui/associated-types/associated-types-eq-obj.rs b/tests/ui/associated-types/associated-types-eq-obj.rs index c202c376c5f..1236d770b95 100644 --- a/tests/ui/associated-types/associated-types-eq-obj.rs +++ b/tests/ui/associated-types/associated-types-eq-obj.rs @@ -1,7 +1,7 @@ -// run-pass +//@ run-pass // Test equality constraints on associated types inside of an object type -// pretty-expanded FIXME #23616 +//@ pretty-expanded FIXME #23616 pub trait Foo { type A; diff --git a/tests/ui/associated-types/associated-types-for-unimpl-trait.fixed b/tests/ui/associated-types/associated-types-for-unimpl-trait.fixed index e713db025e8..bce6148f9e1 100644 --- a/tests/ui/associated-types/associated-types-for-unimpl-trait.fixed +++ b/tests/ui/associated-types/associated-types-for-unimpl-trait.fixed @@ -1,4 +1,4 @@ -// run-rustfix +//@ run-rustfix #![allow(dead_code)] #![allow(unused_variables)] diff --git a/tests/ui/associated-types/associated-types-for-unimpl-trait.rs b/tests/ui/associated-types/associated-types-for-unimpl-trait.rs index c5d7ba3a755..94c9a1ee1e6 100644 --- a/tests/ui/associated-types/associated-types-for-unimpl-trait.rs +++ b/tests/ui/associated-types/associated-types-for-unimpl-trait.rs @@ -1,4 +1,4 @@ -// run-rustfix +//@ run-rustfix #![allow(dead_code)] #![allow(unused_variables)] diff --git a/tests/ui/associated-types/associated-types-from-supertrait.rs b/tests/ui/associated-types/associated-types-from-supertrait.rs index 8f40b94c099..d0d3878ed06 100644 --- a/tests/ui/associated-types/associated-types-from-supertrait.rs +++ b/tests/ui/associated-types/associated-types-from-supertrait.rs @@ -1,4 +1,4 @@ -// run-pass +//@ run-pass trait Foo: Iterator {} trait Bar: Foo {} diff --git a/tests/ui/associated-types/associated-types-impl-redirect.rs b/tests/ui/associated-types/associated-types-impl-redirect.rs index 8fa20cdf4b7..65e6a094b77 100644 --- a/tests/ui/associated-types/associated-types-impl-redirect.rs +++ b/tests/ui/associated-types/associated-types-impl-redirect.rs @@ -1,4 +1,4 @@ -// run-pass +//@ run-pass #![allow(dead_code)] #![allow(unused_mut)] #![allow(unused_imports)] diff --git a/tests/ui/associated-types/associated-types-in-ambiguous-context.rs b/tests/ui/associated-types/associated-types-in-ambiguous-context.rs index 5d6b1b59181..98bbff794ca 100644 --- a/tests/ui/associated-types/associated-types-in-ambiguous-context.rs +++ b/tests/ui/associated-types/associated-types-in-ambiguous-context.rs @@ -1,4 +1,4 @@ -// normalize-stderr-test: "and \d+ other candidates" -> "and N other candidates" +//@ normalize-stderr-test: "and \d+ other candidates" -> "and N other candidates" trait Get { type Value; diff --git a/tests/ui/associated-types/associated-types-in-bound-type-arg.rs b/tests/ui/associated-types/associated-types-in-bound-type-arg.rs index 05e66a168d9..225b29d87bb 100644 --- a/tests/ui/associated-types/associated-types-in-bound-type-arg.rs +++ b/tests/ui/associated-types/associated-types-in-bound-type-arg.rs @@ -1,4 +1,4 @@ -// check-pass +//@ check-pass // Test the case where we resolve `C::Result` and the trait bound // itself includes a `Self::Item` shorthand. // diff --git a/tests/ui/associated-types/associated-types-in-default-method.rs b/tests/ui/associated-types/associated-types-in-default-method.rs index 80ffbf585fb..fa25c92fde5 100644 --- a/tests/ui/associated-types/associated-types-in-default-method.rs +++ b/tests/ui/associated-types/associated-types-in-default-method.rs @@ -1,4 +1,4 @@ -// run-pass +//@ run-pass trait Get { type Value; diff --git a/tests/ui/associated-types/associated-types-in-fn.rs b/tests/ui/associated-types/associated-types-in-fn.rs index 9c588a528fe..6f34f4f9a83 100644 --- a/tests/ui/associated-types/associated-types-in-fn.rs +++ b/tests/ui/associated-types/associated-types-in-fn.rs @@ -1,4 +1,4 @@ -// run-pass +//@ run-pass trait Get { type Value; diff --git a/tests/ui/associated-types/associated-types-in-impl-generics.rs b/tests/ui/associated-types/associated-types-in-impl-generics.rs index 0ddd99cbfa8..6f46cb4aaff 100644 --- a/tests/ui/associated-types/associated-types-in-impl-generics.rs +++ b/tests/ui/associated-types/associated-types-in-impl-generics.rs @@ -1,4 +1,4 @@ -// run-pass +//@ run-pass trait Get { type Value; diff --git a/tests/ui/associated-types/associated-types-in-inherent-method.rs b/tests/ui/associated-types/associated-types-in-inherent-method.rs index 1f29e966851..35f7bdc2f67 100644 --- a/tests/ui/associated-types/associated-types-in-inherent-method.rs +++ b/tests/ui/associated-types/associated-types-in-inherent-method.rs @@ -1,4 +1,4 @@ -// run-pass +//@ run-pass trait Get { type Value; diff --git a/tests/ui/associated-types/associated-types-issue-20220.rs b/tests/ui/associated-types/associated-types-issue-20220.rs index 89efce19834..90106e4c36d 100644 --- a/tests/ui/associated-types/associated-types-issue-20220.rs +++ b/tests/ui/associated-types/associated-types-issue-20220.rs @@ -1,4 +1,4 @@ -// run-pass +//@ run-pass // Test references to `Self::Item` in the trait. Issue #20220. diff --git a/tests/ui/associated-types/associated-types-issue-20371.rs b/tests/ui/associated-types/associated-types-issue-20371.rs index cbec83d45b2..32fe1ca1c00 100644 --- a/tests/ui/associated-types/associated-types-issue-20371.rs +++ b/tests/ui/associated-types/associated-types-issue-20371.rs @@ -1,8 +1,8 @@ -// check-pass +//@ check-pass // Test that we are able to have an impl that defines an associated type // before the actual trait. -// pretty-expanded FIXME #23616 +//@ pretty-expanded FIXME #23616 impl X for f64 { type Y = isize; } trait X { type Y; } diff --git a/tests/ui/associated-types/associated-types-issue-21212.rs b/tests/ui/associated-types/associated-types-issue-21212.rs index ce27eac4d0e..4d177b69bf8 100644 --- a/tests/ui/associated-types/associated-types-issue-21212.rs +++ b/tests/ui/associated-types/associated-types-issue-21212.rs @@ -1,4 +1,4 @@ -// run-pass +//@ run-pass #![allow(unused_variables)] // Regression test for #21212: an overflow occurred during trait // checking where normalizing `Self::Input` led to normalizing the diff --git a/tests/ui/associated-types/associated-types-iterator-binding.rs b/tests/ui/associated-types/associated-types-iterator-binding.rs index 7c5528c986e..720ceaa7f81 100644 --- a/tests/ui/associated-types/associated-types-iterator-binding.rs +++ b/tests/ui/associated-types/associated-types-iterator-binding.rs @@ -1,4 +1,4 @@ -// run-pass +//@ run-pass fn pairwise_sub>(mut t: T) -> isize { let mut result = 0; diff --git a/tests/ui/associated-types/associated-types-method.rs b/tests/ui/associated-types/associated-types-method.rs index 6a6456cbbec..63b2a925e9b 100644 --- a/tests/ui/associated-types/associated-types-method.rs +++ b/tests/ui/associated-types/associated-types-method.rs @@ -1,4 +1,4 @@ -// run-pass +//@ run-pass // Test that methods whose impl-trait-ref contains associated types // are supported. diff --git a/tests/ui/associated-types/associated-types-nested-projections.rs b/tests/ui/associated-types/associated-types-nested-projections.rs index 440f35c8bde..90ff170a6a7 100644 --- a/tests/ui/associated-types/associated-types-nested-projections.rs +++ b/tests/ui/associated-types/associated-types-nested-projections.rs @@ -1,8 +1,8 @@ -// run-pass +//@ run-pass #![allow(unused_variables)] // Test that we can resolve nested projection types. Issue #20666. -// pretty-expanded FIXME #23616 +//@ pretty-expanded FIXME #23616 use std::slice; diff --git a/tests/ui/associated-types/associated-types-normalize-in-bounds-binding.rs b/tests/ui/associated-types/associated-types-normalize-in-bounds-binding.rs index 7c54efb83c2..bd9b91b002e 100644 --- a/tests/ui/associated-types/associated-types-normalize-in-bounds-binding.rs +++ b/tests/ui/associated-types/associated-types-normalize-in-bounds-binding.rs @@ -1,9 +1,9 @@ -// run-pass +//@ run-pass #![allow(unused_variables)] // Test that we normalize associated types that appear in a bound that // contains a binding. Issue #21664. -// pretty-expanded FIXME #23616 +//@ pretty-expanded FIXME #23616 #![allow(dead_code)] diff --git a/tests/ui/associated-types/associated-types-normalize-in-bounds-ufcs.rs b/tests/ui/associated-types/associated-types-normalize-in-bounds-ufcs.rs index 6612598b1b8..884b1a17a2c 100644 --- a/tests/ui/associated-types/associated-types-normalize-in-bounds-ufcs.rs +++ b/tests/ui/associated-types/associated-types-normalize-in-bounds-ufcs.rs @@ -1,9 +1,9 @@ -// check-pass +//@ check-pass #![allow(unused_variables)] // Test that we normalize associated types that appear in bounds; if // we didn't, the call to `self.split2()` fails to type check. -// pretty-expanded FIXME #23616 +//@ pretty-expanded FIXME #23616 use std::marker::PhantomData; diff --git a/tests/ui/associated-types/associated-types-normalize-in-bounds.rs b/tests/ui/associated-types/associated-types-normalize-in-bounds.rs index df0a82ee7ce..8da60e1d9cb 100644 --- a/tests/ui/associated-types/associated-types-normalize-in-bounds.rs +++ b/tests/ui/associated-types/associated-types-normalize-in-bounds.rs @@ -1,9 +1,9 @@ -// check-pass +//@ check-pass #![allow(unused_variables)] // Test that we normalize associated types that appear in bounds; if // we didn't, the call to `self.split2()` fails to type check. -// pretty-expanded FIXME #23616 +//@ pretty-expanded FIXME #23616 use std::marker::PhantomData; diff --git a/tests/ui/associated-types/associated-types-normalize-unifield-struct.rs b/tests/ui/associated-types/associated-types-normalize-unifield-struct.rs index a04525dcd46..ab36240ed63 100644 --- a/tests/ui/associated-types/associated-types-normalize-unifield-struct.rs +++ b/tests/ui/associated-types/associated-types-normalize-unifield-struct.rs @@ -1,4 +1,4 @@ -// run-pass +//@ run-pass // Regression test for issue #21010: Normalize associated types in // various special paths in the `type_is_immediate` function. diff --git a/tests/ui/associated-types/associated-types-overridden-default.rs b/tests/ui/associated-types/associated-types-overridden-default.rs index 3e12c922896..3265c229529 100644 --- a/tests/ui/associated-types/associated-types-overridden-default.rs +++ b/tests/ui/associated-types/associated-types-overridden-default.rs @@ -1,4 +1,4 @@ -// check-pass +//@ check-pass // Before RFC 2532, overriding one assoc. type default required overriding all // provided defaults. diff --git a/tests/ui/associated-types/associated-types-project-from-hrtb-in-fn.fixed b/tests/ui/associated-types/associated-types-project-from-hrtb-in-fn.fixed index bca69a97677..8abef2ef569 100644 --- a/tests/ui/associated-types/associated-types-project-from-hrtb-in-fn.fixed +++ b/tests/ui/associated-types/associated-types-project-from-hrtb-in-fn.fixed @@ -1,5 +1,5 @@ #![allow(dead_code, unused_variables)] -// run-rustfix +//@ run-rustfix // Check projection of an associated type out of a higher-ranked trait-bound // in the context of a function signature. diff --git a/tests/ui/associated-types/associated-types-project-from-hrtb-in-fn.rs b/tests/ui/associated-types/associated-types-project-from-hrtb-in-fn.rs index 1e23dd8890b..f0a5a11a219 100644 --- a/tests/ui/associated-types/associated-types-project-from-hrtb-in-fn.rs +++ b/tests/ui/associated-types/associated-types-project-from-hrtb-in-fn.rs @@ -1,5 +1,5 @@ #![allow(dead_code, unused_variables)] -// run-rustfix +//@ run-rustfix // Check projection of an associated type out of a higher-ranked trait-bound // in the context of a function signature. diff --git a/tests/ui/associated-types/associated-types-project-from-hrtb-in-trait-method.fixed b/tests/ui/associated-types/associated-types-project-from-hrtb-in-trait-method.fixed index 66d8613f184..0d98af78ef4 100644 --- a/tests/ui/associated-types/associated-types-project-from-hrtb-in-trait-method.fixed +++ b/tests/ui/associated-types/associated-types-project-from-hrtb-in-trait-method.fixed @@ -1,5 +1,5 @@ #![allow(dead_code)] -// run-rustfix +//@ run-rustfix // Check projection of an associated type out of a higher-ranked trait-bound // in the context of a method definition in a trait. diff --git a/tests/ui/associated-types/associated-types-project-from-hrtb-in-trait-method.rs b/tests/ui/associated-types/associated-types-project-from-hrtb-in-trait-method.rs index 0a1b29de19e..d62e7222747 100644 --- a/tests/ui/associated-types/associated-types-project-from-hrtb-in-trait-method.rs +++ b/tests/ui/associated-types/associated-types-project-from-hrtb-in-trait-method.rs @@ -1,5 +1,5 @@ #![allow(dead_code)] -// run-rustfix +//@ run-rustfix // Check projection of an associated type out of a higher-ranked trait-bound // in the context of a method definition in a trait. diff --git a/tests/ui/associated-types/associated-types-project-from-type-param-via-bound-in-where.rs b/tests/ui/associated-types/associated-types-project-from-type-param-via-bound-in-where.rs index fc1dba97dfd..44fae6000a9 100644 --- a/tests/ui/associated-types/associated-types-project-from-type-param-via-bound-in-where.rs +++ b/tests/ui/associated-types/associated-types-project-from-type-param-via-bound-in-where.rs @@ -1,4 +1,4 @@ -// run-pass +//@ run-pass // Various uses of `T::Item` syntax where the bound that supplies // `Item` originates in a where-clause, not the declaration of // `T`. Issue #20300. diff --git a/tests/ui/associated-types/associated-types-projection-bound-ambiguity.rs b/tests/ui/associated-types/associated-types-projection-bound-ambiguity.rs index 353f82e7c6e..5b5d8881589 100644 --- a/tests/ui/associated-types/associated-types-projection-bound-ambiguity.rs +++ b/tests/ui/associated-types/associated-types-projection-bound-ambiguity.rs @@ -1,7 +1,7 @@ // Check that if we have multiple applicable projection bounds we pick one (for // backwards compatibility reasons). -// check-pass +//@ check-pass use std::ops::Mul; trait A { diff --git a/tests/ui/associated-types/associated-types-projection-bound-in-supertraits.rs b/tests/ui/associated-types/associated-types-projection-bound-in-supertraits.rs index e99d0112ec4..caa7c61365b 100644 --- a/tests/ui/associated-types/associated-types-projection-bound-in-supertraits.rs +++ b/tests/ui/associated-types/associated-types-projection-bound-in-supertraits.rs @@ -1,4 +1,4 @@ -// check-pass +//@ check-pass #![allow(unused_variables)] // Test that we correctly handle projection bounds appearing in the // supertrait list (and in conjunction with overloaded operators). In diff --git a/tests/ui/associated-types/associated-types-projection-from-known-type-in-impl.rs b/tests/ui/associated-types/associated-types-projection-from-known-type-in-impl.rs index e172c6e5611..22d9cf09090 100644 --- a/tests/ui/associated-types/associated-types-projection-from-known-type-in-impl.rs +++ b/tests/ui/associated-types/associated-types-projection-from-known-type-in-impl.rs @@ -1,4 +1,4 @@ -// run-pass +//@ run-pass // Test where the impl self type uses a projection from a constant type. diff --git a/tests/ui/associated-types/associated-types-projection-in-object-type.rs b/tests/ui/associated-types/associated-types-projection-in-object-type.rs index eec95a141f5..4cf1c256f3d 100644 --- a/tests/ui/associated-types/associated-types-projection-in-object-type.rs +++ b/tests/ui/associated-types/associated-types-projection-in-object-type.rs @@ -1,4 +1,4 @@ -// run-pass +//@ run-pass #![allow(dead_code)] #![allow(unused_imports)] // Corrected regression test for #20831. The original did not compile. @@ -6,7 +6,7 @@ // appear in associated type bindings in object types, which were not // being properly flagged. -// pretty-expanded FIXME #23616 +//@ pretty-expanded FIXME #23616 use std::ops::{Shl, Shr}; use std::cell::RefCell; diff --git a/tests/ui/associated-types/associated-types-projection-in-supertrait.rs b/tests/ui/associated-types/associated-types-projection-in-supertrait.rs index ead405fcf01..476bf5760f3 100644 --- a/tests/ui/associated-types/associated-types-projection-in-supertrait.rs +++ b/tests/ui/associated-types/associated-types-projection-in-supertrait.rs @@ -1,4 +1,4 @@ -// run-pass +//@ run-pass #![allow(dead_code)] // Test that we are handle to correctly handle a projection type // that appears in a supertrait bound. Issue #20559. diff --git a/tests/ui/associated-types/associated-types-projection-in-where-clause.rs b/tests/ui/associated-types/associated-types-projection-in-where-clause.rs index e9a26e53c3c..ed8259396d1 100644 --- a/tests/ui/associated-types/associated-types-projection-in-where-clause.rs +++ b/tests/ui/associated-types/associated-types-projection-in-where-clause.rs @@ -1,9 +1,9 @@ -// run-pass +//@ run-pass #![allow(dead_code)] #![allow(unused_variables)] // Test a where clause that uses a non-normalized projection type. -// pretty-expanded FIXME #23616 +//@ pretty-expanded FIXME #23616 trait Int { diff --git a/tests/ui/associated-types/associated-types-projection-to-unrelated-trait-in-method-without-default.fixed b/tests/ui/associated-types/associated-types-projection-to-unrelated-trait-in-method-without-default.fixed index 01f49d52ee2..cf766ffd7f1 100644 --- a/tests/ui/associated-types/associated-types-projection-to-unrelated-trait-in-method-without-default.fixed +++ b/tests/ui/associated-types/associated-types-projection-to-unrelated-trait-in-method-without-default.fixed @@ -1,4 +1,4 @@ -// run-rustfix +//@ run-rustfix // Check that we get an error when you use `::Value` in // the trait definition even if there is no default method. diff --git a/tests/ui/associated-types/associated-types-projection-to-unrelated-trait-in-method-without-default.rs b/tests/ui/associated-types/associated-types-projection-to-unrelated-trait-in-method-without-default.rs index 7068a754a12..3ea5f808de1 100644 --- a/tests/ui/associated-types/associated-types-projection-to-unrelated-trait-in-method-without-default.rs +++ b/tests/ui/associated-types/associated-types-projection-to-unrelated-trait-in-method-without-default.rs @@ -1,4 +1,4 @@ -// run-rustfix +//@ run-rustfix // Check that we get an error when you use `::Value` in // the trait definition even if there is no default method. diff --git a/tests/ui/associated-types/associated-types-projection-to-unrelated-trait.rs b/tests/ui/associated-types/associated-types-projection-to-unrelated-trait.rs index a2d6c9ff5a4..6a287e1792c 100644 --- a/tests/ui/associated-types/associated-types-projection-to-unrelated-trait.rs +++ b/tests/ui/associated-types/associated-types-projection-to-unrelated-trait.rs @@ -1,4 +1,4 @@ -// check-pass +//@ check-pass // Check that we do not get an error when you use `::Value` in // the trait definition if there is no default method and for every impl, // `Self` does implement `Get`. diff --git a/tests/ui/associated-types/associated-types-qualified-path-with-trait-with-type-parameters.rs b/tests/ui/associated-types/associated-types-qualified-path-with-trait-with-type-parameters.rs index 1768fd1687b..f0a34325196 100644 --- a/tests/ui/associated-types/associated-types-qualified-path-with-trait-with-type-parameters.rs +++ b/tests/ui/associated-types/associated-types-qualified-path-with-trait-with-type-parameters.rs @@ -1,5 +1,5 @@ -// check-pass -// pretty-expanded FIXME #23616 +//@ check-pass +//@ pretty-expanded FIXME #23616 trait Foo { type Bar; diff --git a/tests/ui/associated-types/associated-types-ref-from-struct.rs b/tests/ui/associated-types/associated-types-ref-from-struct.rs index c89f6046e6b..c16bb8651c3 100644 --- a/tests/ui/associated-types/associated-types-ref-from-struct.rs +++ b/tests/ui/associated-types/associated-types-ref-from-struct.rs @@ -1,7 +1,7 @@ -// run-pass +//@ run-pass // Test associated type references in structure fields. -// pretty-expanded FIXME #23616 +//@ pretty-expanded FIXME #23616 trait Test { type V; diff --git a/tests/ui/associated-types/associated-types-ref-in-struct-literal.rs b/tests/ui/associated-types/associated-types-ref-in-struct-literal.rs index 4a490ed0387..c39e6deaf39 100644 --- a/tests/ui/associated-types/associated-types-ref-in-struct-literal.rs +++ b/tests/ui/associated-types/associated-types-ref-in-struct-literal.rs @@ -1,4 +1,4 @@ -// run-pass +//@ run-pass // Test associated type references in a struct literal. Issue #20535. diff --git a/tests/ui/associated-types/associated-types-region-erasure-issue-20582.rs b/tests/ui/associated-types/associated-types-region-erasure-issue-20582.rs index b722506dbbf..dec3a3c9245 100644 --- a/tests/ui/associated-types/associated-types-region-erasure-issue-20582.rs +++ b/tests/ui/associated-types/associated-types-region-erasure-issue-20582.rs @@ -1,9 +1,9 @@ -// run-pass +//@ run-pass #![allow(dead_code)] // Regression test for #20582. This test caused an ICE related to // inconsistent region erasure in codegen. -// pretty-expanded FIXME #23616 +//@ pretty-expanded FIXME #23616 struct Foo<'a> { buf: &'a[u8] diff --git a/tests/ui/associated-types/associated-types-resolve-lifetime.rs b/tests/ui/associated-types/associated-types-resolve-lifetime.rs index 563d0c11822..6be2fa6f2ab 100644 --- a/tests/ui/associated-types/associated-types-resolve-lifetime.rs +++ b/tests/ui/associated-types/associated-types-resolve-lifetime.rs @@ -1,5 +1,5 @@ -// check-pass -// pretty-expanded FIXME #23616 +//@ check-pass +//@ pretty-expanded FIXME #23616 trait Get { fn get(&self) -> T; diff --git a/tests/ui/associated-types/associated-types-return.rs b/tests/ui/associated-types/associated-types-return.rs index 997a48b0379..cd4614df3e3 100644 --- a/tests/ui/associated-types/associated-types-return.rs +++ b/tests/ui/associated-types/associated-types-return.rs @@ -1,4 +1,4 @@ -// run-pass +//@ run-pass // Test equality constraints on associated types in a where clause. diff --git a/tests/ui/associated-types/associated-types-simple.rs b/tests/ui/associated-types/associated-types-simple.rs index 2e2dfd80726..ce821c25cbc 100644 --- a/tests/ui/associated-types/associated-types-simple.rs +++ b/tests/ui/associated-types/associated-types-simple.rs @@ -1,4 +1,4 @@ -// run-pass +//@ run-pass trait Get { type Value; diff --git a/tests/ui/associated-types/associated-types-stream.rs b/tests/ui/associated-types/associated-types-stream.rs index c9b302b9691..a03df341583 100644 --- a/tests/ui/associated-types/associated-types-stream.rs +++ b/tests/ui/associated-types/associated-types-stream.rs @@ -1,4 +1,4 @@ -// run-pass +//@ run-pass // Test references to the trait `Stream` in the bounds for associated // types defined on `Stream`. Issue #20551. diff --git a/tests/ui/associated-types/associated-types-struct-field-named.rs b/tests/ui/associated-types/associated-types-struct-field-named.rs index c400bf943e1..cac0049c4f9 100644 --- a/tests/ui/associated-types/associated-types-struct-field-named.rs +++ b/tests/ui/associated-types/associated-types-struct-field-named.rs @@ -1,4 +1,4 @@ -// run-pass +//@ run-pass // Test that we correctly normalize the type of a struct field // which has an associated type. diff --git a/tests/ui/associated-types/associated-types-struct-field-numbered.rs b/tests/ui/associated-types/associated-types-struct-field-numbered.rs index b71b71b25f5..98f5516e858 100644 --- a/tests/ui/associated-types/associated-types-struct-field-numbered.rs +++ b/tests/ui/associated-types/associated-types-struct-field-numbered.rs @@ -1,4 +1,4 @@ -// run-pass +//@ run-pass // Test that we correctly normalize the type of a struct field // which has an associated type. diff --git a/tests/ui/associated-types/associated-types-sugar-path.rs b/tests/ui/associated-types/associated-types-sugar-path.rs index 66f7672aa43..7b57e4a0ea0 100644 --- a/tests/ui/associated-types/associated-types-sugar-path.rs +++ b/tests/ui/associated-types/associated-types-sugar-path.rs @@ -1,4 +1,4 @@ -// run-pass +//@ run-pass #![allow(dead_code)] #![allow(unused_variables)] #![allow(unused_imports)] diff --git a/tests/ui/associated-types/associated-types-unsized.fixed b/tests/ui/associated-types/associated-types-unsized.fixed index 328c8f944e2..7c91793b520 100644 --- a/tests/ui/associated-types/associated-types-unsized.fixed +++ b/tests/ui/associated-types/associated-types-unsized.fixed @@ -1,4 +1,4 @@ -// run-rustfix +//@ run-rustfix #![allow(dead_code, unused_variables)] trait Get { diff --git a/tests/ui/associated-types/associated-types-unsized.rs b/tests/ui/associated-types/associated-types-unsized.rs index bdba4c7ff16..5cdb4a6133c 100644 --- a/tests/ui/associated-types/associated-types-unsized.rs +++ b/tests/ui/associated-types/associated-types-unsized.rs @@ -1,4 +1,4 @@ -// run-rustfix +//@ run-rustfix #![allow(dead_code, unused_variables)] trait Get { diff --git a/tests/ui/associated-types/associated-types-where-clause-impl-ambiguity.rs b/tests/ui/associated-types/associated-types-where-clause-impl-ambiguity.rs index f2a4c6e42a9..dcfa3532cdf 100644 --- a/tests/ui/associated-types/associated-types-where-clause-impl-ambiguity.rs +++ b/tests/ui/associated-types/associated-types-where-clause-impl-ambiguity.rs @@ -1,4 +1,4 @@ -// run-pass +//@ run-pass #![allow(dead_code)] #![allow(unused_imports)] // Test how resolving a projection interacts with inference. In this diff --git a/tests/ui/associated-types/bound-lifetime-constrained.rs b/tests/ui/associated-types/bound-lifetime-constrained.rs index 4e6754c865d..880d350bdf6 100644 --- a/tests/ui/associated-types/bound-lifetime-constrained.rs +++ b/tests/ui/associated-types/bound-lifetime-constrained.rs @@ -1,4 +1,4 @@ -// revisions: func object clause +//@ revisions: func object clause #![allow(dead_code)] #![feature(rustc_attrs)] diff --git a/tests/ui/associated-types/bound-lifetime-in-binding-only.rs b/tests/ui/associated-types/bound-lifetime-in-binding-only.rs index e714457ef7b..e973e58b629 100644 --- a/tests/ui/associated-types/bound-lifetime-in-binding-only.rs +++ b/tests/ui/associated-types/bound-lifetime-in-binding-only.rs @@ -1,4 +1,4 @@ -// revisions: angle paren ok elision +//@ revisions: angle paren ok elision #![allow(dead_code)] #![feature(rustc_attrs)] diff --git a/tests/ui/associated-types/bound-lifetime-in-return-only.rs b/tests/ui/associated-types/bound-lifetime-in-return-only.rs index a60ccb6c4b2..bf3aa6149cc 100644 --- a/tests/ui/associated-types/bound-lifetime-in-return-only.rs +++ b/tests/ui/associated-types/bound-lifetime-in-return-only.rs @@ -1,4 +1,4 @@ -// revisions: sig local structure ok elision +//@ revisions: sig local structure ok elision #![allow(dead_code)] #![feature(rustc_attrs)] diff --git a/tests/ui/associated-types/cache/chrono-scan.rs b/tests/ui/associated-types/cache/chrono-scan.rs index 964ddc9b625..83fdfa60d0d 100644 --- a/tests/ui/associated-types/cache/chrono-scan.rs +++ b/tests/ui/associated-types/cache/chrono-scan.rs @@ -1,4 +1,4 @@ -// check-pass +//@ check-pass #![allow(deprecated)] diff --git a/tests/ui/associated-types/cache/elision.rs b/tests/ui/associated-types/cache/elision.rs index b3e1ec8ad70..12765fc5811 100644 --- a/tests/ui/associated-types/cache/elision.rs +++ b/tests/ui/associated-types/cache/elision.rs @@ -2,7 +2,7 @@ // trait without elision (a bug in this cropped up during // bootstrapping, so this is a regression test). -// check-pass +//@ check-pass pub struct SplitWhitespace<'a> { x: &'a u8 diff --git a/tests/ui/associated-types/cache/project-fn-ret-contravariant.rs b/tests/ui/associated-types/cache/project-fn-ret-contravariant.rs index f1ea6627aab..67631557900 100644 --- a/tests/ui/associated-types/cache/project-fn-ret-contravariant.rs +++ b/tests/ui/associated-types/cache/project-fn-ret-contravariant.rs @@ -5,9 +5,9 @@ // if we do it just once. In this variant, the region `'a` is used in // an contravariant position, which affects the results. -// revisions: ok oneuse transmute krisskross -//[ok] check-pass -//[oneuse] check-pass +//@ revisions: ok oneuse transmute krisskross +//@[ok] check-pass +//@[oneuse] check-pass #![allow(dead_code, unused_variables)] diff --git a/tests/ui/associated-types/cache/project-fn-ret-invariant.rs b/tests/ui/associated-types/cache/project-fn-ret-invariant.rs index e043379133a..4ac642c0e04 100644 --- a/tests/ui/associated-types/cache/project-fn-ret-invariant.rs +++ b/tests/ui/associated-types/cache/project-fn-ret-invariant.rs @@ -4,8 +4,8 @@ // if we do it just once. In this variant, the region `'a` is used in // an invariant position, which affects the results. -// revisions: ok oneuse transmute krisskross -//[ok] check-pass +//@ revisions: ok oneuse transmute krisskross +//@[ok] check-pass #![allow(dead_code, unused_variables)] diff --git a/tests/ui/associated-types/default-associated-types.rs b/tests/ui/associated-types/default-associated-types.rs index aae70bffa38..00b14305244 100644 --- a/tests/ui/associated-types/default-associated-types.rs +++ b/tests/ui/associated-types/default-associated-types.rs @@ -1,4 +1,4 @@ -// run-pass +//@ run-pass #![feature(associated_type_defaults)] diff --git a/tests/ui/associated-types/defaults-cyclic-pass-1.rs b/tests/ui/associated-types/defaults-cyclic-pass-1.rs index 97c6e5bade2..8f73ea0fb63 100644 --- a/tests/ui/associated-types/defaults-cyclic-pass-1.rs +++ b/tests/ui/associated-types/defaults-cyclic-pass-1.rs @@ -1,4 +1,4 @@ -// check-pass +//@ check-pass #![feature(associated_type_defaults)] diff --git a/tests/ui/associated-types/defaults-cyclic-pass-2.rs b/tests/ui/associated-types/defaults-cyclic-pass-2.rs index 69315a02210..0646dbf6055 100644 --- a/tests/ui/associated-types/defaults-cyclic-pass-2.rs +++ b/tests/ui/associated-types/defaults-cyclic-pass-2.rs @@ -1,4 +1,4 @@ -// check-pass +//@ check-pass #![feature(associated_type_defaults)] diff --git a/tests/ui/associated-types/defaults-in-other-trait-items-pass.rs b/tests/ui/associated-types/defaults-in-other-trait-items-pass.rs index a3bfcd8efe2..5d66494f796 100644 --- a/tests/ui/associated-types/defaults-in-other-trait-items-pass.rs +++ b/tests/ui/associated-types/defaults-in-other-trait-items-pass.rs @@ -1,4 +1,4 @@ -// check-pass +//@ check-pass #![feature(associated_type_defaults)] diff --git a/tests/ui/associated-types/higher-ranked-projection.rs b/tests/ui/associated-types/higher-ranked-projection.rs index 7e6c509a272..443d759e80b 100644 --- a/tests/ui/associated-types/higher-ranked-projection.rs +++ b/tests/ui/associated-types/higher-ranked-projection.rs @@ -1,5 +1,5 @@ -// revisions: good bad -//[good] check-pass +//@ revisions: good bad +//@[good] check-pass trait Mirror { type Image; diff --git a/tests/ui/associated-types/impl-wf-cycle-5.fixed b/tests/ui/associated-types/impl-wf-cycle-5.fixed index 2b8f1e0d865..1c2c0811a50 100644 --- a/tests/ui/associated-types/impl-wf-cycle-5.fixed +++ b/tests/ui/associated-types/impl-wf-cycle-5.fixed @@ -1,4 +1,4 @@ -// run-rustfix +//@ run-rustfix #[allow(dead_code)] trait Baz {} diff --git a/tests/ui/associated-types/impl-wf-cycle-5.rs b/tests/ui/associated-types/impl-wf-cycle-5.rs index e6de292ca5c..88a0b762c37 100644 --- a/tests/ui/associated-types/impl-wf-cycle-5.rs +++ b/tests/ui/associated-types/impl-wf-cycle-5.rs @@ -1,4 +1,4 @@ -// run-rustfix +//@ run-rustfix #[allow(dead_code)] trait Baz {} diff --git a/tests/ui/associated-types/impl-wf-cycle-6.fixed b/tests/ui/associated-types/impl-wf-cycle-6.fixed index 5ddf1faefe0..45143be1e74 100644 --- a/tests/ui/associated-types/impl-wf-cycle-6.fixed +++ b/tests/ui/associated-types/impl-wf-cycle-6.fixed @@ -1,4 +1,4 @@ -// run-rustfix +//@ run-rustfix #[allow(dead_code)] trait Baz {} diff --git a/tests/ui/associated-types/impl-wf-cycle-6.rs b/tests/ui/associated-types/impl-wf-cycle-6.rs index 28f6deb77ce..a05ffcd6b4c 100644 --- a/tests/ui/associated-types/impl-wf-cycle-6.rs +++ b/tests/ui/associated-types/impl-wf-cycle-6.rs @@ -1,4 +1,4 @@ -// run-rustfix +//@ run-rustfix #[allow(dead_code)] trait Baz {} diff --git a/tests/ui/associated-types/issue-18655.rs b/tests/ui/associated-types/issue-18655.rs index 3d18542acdc..b163fa69296 100644 --- a/tests/ui/associated-types/issue-18655.rs +++ b/tests/ui/associated-types/issue-18655.rs @@ -1,4 +1,4 @@ -// run-pass +//@ run-pass trait Factory { type Product; fn create(&self) -> ::Product; diff --git a/tests/ui/associated-types/issue-19081.rs b/tests/ui/associated-types/issue-19081.rs index fbfe4c6f839..f502915eac3 100644 --- a/tests/ui/associated-types/issue-19081.rs +++ b/tests/ui/associated-types/issue-19081.rs @@ -1,4 +1,4 @@ -// check-pass +//@ check-pass pub trait Hasher { type State; diff --git a/tests/ui/associated-types/issue-20825-2.rs b/tests/ui/associated-types/issue-20825-2.rs index b79a2973082..d0b6fff7e38 100644 --- a/tests/ui/associated-types/issue-20825-2.rs +++ b/tests/ui/associated-types/issue-20825-2.rs @@ -1,4 +1,4 @@ -// check-pass +//@ check-pass pub trait Subscriber { type Input; } diff --git a/tests/ui/associated-types/issue-21363.rs b/tests/ui/associated-types/issue-21363.rs index acc28cb430b..0dcebafd95b 100644 --- a/tests/ui/associated-types/issue-21363.rs +++ b/tests/ui/associated-types/issue-21363.rs @@ -1,5 +1,5 @@ -// check-pass -// pretty-expanded FIXME #23616 +//@ check-pass +//@ pretty-expanded FIXME #23616 #![no_implicit_prelude] diff --git a/tests/ui/associated-types/issue-21726.rs b/tests/ui/associated-types/issue-21726.rs index b98cf216695..f014c644786 100644 --- a/tests/ui/associated-types/issue-21726.rs +++ b/tests/ui/associated-types/issue-21726.rs @@ -1,10 +1,10 @@ -// check-pass +//@ check-pass #![allow(dead_code)] // Regression test for #21726: an issue arose around the rules for // subtyping of projection types that resulted in an unconstrained // region, yielding region inference failures. -// pretty-expanded FIXME #23616 +//@ pretty-expanded FIXME #23616 fn main() { } diff --git a/tests/ui/associated-types/issue-22066.rs b/tests/ui/associated-types/issue-22066.rs index 8e8ba5dc46c..6c8339b9c09 100644 --- a/tests/ui/associated-types/issue-22066.rs +++ b/tests/ui/associated-types/issue-22066.rs @@ -1,4 +1,4 @@ -// check-pass +//@ check-pass pub trait LineFormatter<'a> { type Iter: Iterator + 'a; fn iter(&'a self, line: &'a str) -> Self::Iter; diff --git a/tests/ui/associated-types/issue-22828.rs b/tests/ui/associated-types/issue-22828.rs index adf4dd6ce75..2f65f1c2303 100644 --- a/tests/ui/associated-types/issue-22828.rs +++ b/tests/ui/associated-types/issue-22828.rs @@ -1,9 +1,9 @@ -// run-pass +//@ run-pass #![allow(dead_code)] // Test transitive analysis for associated types. Collected types // should be normalized and new obligations generated. -// pretty-expanded FIXME #23616 +//@ pretty-expanded FIXME #23616 trait Foo { type A; diff --git a/tests/ui/associated-types/issue-23208.rs b/tests/ui/associated-types/issue-23208.rs index fd4ffe5d6e1..fabcffb5cf0 100644 --- a/tests/ui/associated-types/issue-23208.rs +++ b/tests/ui/associated-types/issue-23208.rs @@ -1,4 +1,4 @@ -// run-pass +//@ run-pass trait TheTrait : TheSuperTrait<::Item> { type Item; } diff --git a/tests/ui/associated-types/issue-24159.rs b/tests/ui/associated-types/issue-24159.rs index 49753e7bf16..acd523f465d 100644 --- a/tests/ui/associated-types/issue-24159.rs +++ b/tests/ui/associated-types/issue-24159.rs @@ -1,4 +1,4 @@ -// check-pass +//@ check-pass #![allow(unused)] diff --git a/tests/ui/associated-types/issue-24204.rs b/tests/ui/associated-types/issue-24204.rs index 5a7b3459589..5ce8dfbc4d2 100644 --- a/tests/ui/associated-types/issue-24204.rs +++ b/tests/ui/associated-types/issue-24204.rs @@ -1,4 +1,4 @@ -// check-pass +//@ check-pass #![allow(dead_code)] diff --git a/tests/ui/associated-types/issue-24338.rs b/tests/ui/associated-types/issue-24338.rs index 3a2c790f852..854eeea8833 100644 --- a/tests/ui/associated-types/issue-24338.rs +++ b/tests/ui/associated-types/issue-24338.rs @@ -1,5 +1,5 @@ // -// check-pass +//@ check-pass trait DictLike<'a> { type ItemsIterator: Iterator; diff --git a/tests/ui/associated-types/issue-25339.rs b/tests/ui/associated-types/issue-25339.rs index 6f8ec700951..a18ddc2f207 100644 --- a/tests/ui/associated-types/issue-25339.rs +++ b/tests/ui/associated-types/issue-25339.rs @@ -1,4 +1,4 @@ -// run-pass +//@ run-pass #![allow(dead_code)] #![allow(unused_variables)] #![feature(associated_type_defaults)] diff --git a/tests/ui/associated-types/issue-25700-1.rs b/tests/ui/associated-types/issue-25700-1.rs index 79652dc882b..7ab82438d07 100644 --- a/tests/ui/associated-types/issue-25700-1.rs +++ b/tests/ui/associated-types/issue-25700-1.rs @@ -1,4 +1,4 @@ -// run-pass +//@ run-pass struct S(#[allow(dead_code)] Option<&'static T>); trait Tr { type Out; } diff --git a/tests/ui/associated-types/issue-25700-2.rs b/tests/ui/associated-types/issue-25700-2.rs index f745da4a5cb..7323e1e39ac 100644 --- a/tests/ui/associated-types/issue-25700-2.rs +++ b/tests/ui/associated-types/issue-25700-2.rs @@ -1,4 +1,4 @@ -// run-pass +//@ run-pass pub trait Parser { type Input; } diff --git a/tests/ui/associated-types/issue-27901.rs b/tests/ui/associated-types/issue-27901.rs index ffd90b68983..3955de2b705 100644 --- a/tests/ui/associated-types/issue-27901.rs +++ b/tests/ui/associated-types/issue-27901.rs @@ -1,4 +1,4 @@ -// run-pass +//@ run-pass trait Stream { type Item; } impl<'a> Stream for &'a str { type Item = u8; } fn f<'s>(s: &'s str) -> (&'s str, <&'s str as Stream>::Item) { diff --git a/tests/ui/associated-types/issue-28871.rs b/tests/ui/associated-types/issue-28871.rs index 210c783de79..ce0decd066d 100644 --- a/tests/ui/associated-types/issue-28871.rs +++ b/tests/ui/associated-types/issue-28871.rs @@ -1,4 +1,4 @@ -// check-pass +//@ check-pass // Regression test for #28871. The problem is that rustc encountered // two ways to project, one from a where clause and one from the where // clauses on the trait definition. (In fact, in this case, the where diff --git a/tests/ui/associated-types/issue-31597.rs b/tests/ui/associated-types/issue-31597.rs index 2872be6d6c8..4f7dcd250d1 100644 --- a/tests/ui/associated-types/issue-31597.rs +++ b/tests/ui/associated-types/issue-31597.rs @@ -1,4 +1,4 @@ -// check-pass +//@ check-pass #![allow(dead_code)] trait Make { type Out; diff --git a/tests/ui/associated-types/issue-32350.rs b/tests/ui/associated-types/issue-32350.rs index bda21eb0e0a..0edcf1d6e06 100644 --- a/tests/ui/associated-types/issue-32350.rs +++ b/tests/ui/associated-types/issue-32350.rs @@ -1,4 +1,4 @@ -// check-pass +//@ check-pass // This is another instance of the "normalizations don't work" issue with // defaulted associated types. diff --git a/tests/ui/associated-types/issue-36499.rs b/tests/ui/associated-types/issue-36499.rs index 3d6f11faff7..25f4060fa6f 100644 --- a/tests/ui/associated-types/issue-36499.rs +++ b/tests/ui/associated-types/issue-36499.rs @@ -1,4 +1,4 @@ -// error-pattern: aborting due to 1 previous error +//@ error-pattern: aborting due to 1 previous error fn main() { 2 + +2; diff --git a/tests/ui/associated-types/issue-37808.rs b/tests/ui/associated-types/issue-37808.rs index 3701c37d0c8..3022167c2df 100644 --- a/tests/ui/associated-types/issue-37808.rs +++ b/tests/ui/associated-types/issue-37808.rs @@ -1,4 +1,4 @@ -// check-pass +//@ check-pass trait Parent { type Ty; diff --git a/tests/ui/associated-types/issue-37883.rs b/tests/ui/associated-types/issue-37883.rs index d854f6af3ea..181882f251e 100644 --- a/tests/ui/associated-types/issue-37883.rs +++ b/tests/ui/associated-types/issue-37883.rs @@ -1,4 +1,4 @@ -// check-pass +//@ check-pass use std::ops::Mul; diff --git a/tests/ui/associated-types/issue-38917.rs b/tests/ui/associated-types/issue-38917.rs index 7e898851aa8..c3713106f11 100644 --- a/tests/ui/associated-types/issue-38917.rs +++ b/tests/ui/associated-types/issue-38917.rs @@ -1,4 +1,4 @@ -// check-pass +//@ check-pass use std::borrow::Borrow; diff --git a/tests/ui/associated-types/issue-39532.rs b/tests/ui/associated-types/issue-39532.rs index 52652cedec9..a0036ef860e 100644 --- a/tests/ui/associated-types/issue-39532.rs +++ b/tests/ui/associated-types/issue-39532.rs @@ -1,4 +1,4 @@ -// check-pass +//@ check-pass #![allow(unused)] diff --git a/tests/ui/associated-types/issue-40093.rs b/tests/ui/associated-types/issue-40093.rs index fd325ae1008..ae922be25d0 100644 --- a/tests/ui/associated-types/issue-40093.rs +++ b/tests/ui/associated-types/issue-40093.rs @@ -1,4 +1,4 @@ -// check-pass +//@ check-pass pub trait Test { type Item; diff --git a/tests/ui/associated-types/issue-41868.rs b/tests/ui/associated-types/issue-41868.rs index 52bbd1f5d28..279b942d0e3 100644 --- a/tests/ui/associated-types/issue-41868.rs +++ b/tests/ui/associated-types/issue-41868.rs @@ -1,4 +1,4 @@ -// check-pass +//@ check-pass // Defaulted assoc. types should normalize properly in impls that don't // override them. diff --git a/tests/ui/associated-types/issue-43475.rs b/tests/ui/associated-types/issue-43475.rs index 5f177333c93..939a9b2a6ca 100644 --- a/tests/ui/associated-types/issue-43475.rs +++ b/tests/ui/associated-types/issue-43475.rs @@ -1,4 +1,4 @@ -// check-pass +//@ check-pass trait Foo { type FooT: Foo; } impl Foo for () { type FooT = (); } diff --git a/tests/ui/associated-types/issue-47139-1.rs b/tests/ui/associated-types/issue-47139-1.rs index c55fc34346c..8c25ee118f6 100644 --- a/tests/ui/associated-types/issue-47139-1.rs +++ b/tests/ui/associated-types/issue-47139-1.rs @@ -1,4 +1,4 @@ -// run-pass +//@ run-pass // Regression test for issue #47139: // // Coherence was encountering an (unnecessary) overflow trying to diff --git a/tests/ui/associated-types/issue-47139-2.rs b/tests/ui/associated-types/issue-47139-2.rs index d2ef8942530..f99beee7f8f 100644 --- a/tests/ui/associated-types/issue-47139-2.rs +++ b/tests/ui/associated-types/issue-47139-2.rs @@ -1,4 +1,4 @@ -// run-pass +//@ run-pass // Regression test for issue #47139: // // Same as issue-47139-1.rs, but the impls of dummy are in the diff --git a/tests/ui/associated-types/issue-47385.rs b/tests/ui/associated-types/issue-47385.rs index d43d674e9c3..7627e34ba71 100644 --- a/tests/ui/associated-types/issue-47385.rs +++ b/tests/ui/associated-types/issue-47385.rs @@ -1,4 +1,4 @@ -// check-pass +//@ check-pass #![feature(associated_type_defaults)] diff --git a/tests/ui/associated-types/issue-48010.rs b/tests/ui/associated-types/issue-48010.rs index 70e30c132d0..ad37c0f82c2 100644 --- a/tests/ui/associated-types/issue-48010.rs +++ b/tests/ui/associated-types/issue-48010.rs @@ -1,4 +1,4 @@ -// check-pass +//@ check-pass #![crate_type = "lib"] diff --git a/tests/ui/associated-types/issue-48551.rs b/tests/ui/associated-types/issue-48551.rs index b95a4832bb2..8c7dfa5a479 100644 --- a/tests/ui/associated-types/issue-48551.rs +++ b/tests/ui/associated-types/issue-48551.rs @@ -1,4 +1,4 @@ -// check-pass +//@ check-pass // Regression test for #48551. Covers a case where duplicate candidates // arose during associated type projection. diff --git a/tests/ui/associated-types/issue-50301.rs b/tests/ui/associated-types/issue-50301.rs index 47ee3e7ad70..f6febf80cf5 100644 --- a/tests/ui/associated-types/issue-50301.rs +++ b/tests/ui/associated-types/issue-50301.rs @@ -1,5 +1,5 @@ // Tests that HRTBs are correctly accepted -- https://github.com/rust-lang/rust/issues/50301 -// check-pass +//@ check-pass trait Trait where for<'a> &'a Self::IntoIter: IntoIterator, diff --git a/tests/ui/associated-types/issue-54182-1.rs b/tests/ui/associated-types/issue-54182-1.rs index 1a1e98cbac2..1ebcca758c0 100644 --- a/tests/ui/associated-types/issue-54182-1.rs +++ b/tests/ui/associated-types/issue-54182-1.rs @@ -1,4 +1,4 @@ -// run-pass +//@ run-pass // Tests that the return type of trait methods is correctly normalized when // checking that a method in an impl matches the trait definition when the diff --git a/tests/ui/associated-types/issue-54182-2.rs b/tests/ui/associated-types/issue-54182-2.rs index c88c7663136..b90982b2d66 100644 --- a/tests/ui/associated-types/issue-54182-2.rs +++ b/tests/ui/associated-types/issue-54182-2.rs @@ -1,4 +1,4 @@ -// check-pass +//@ check-pass // Before RFC 2532, normalizing a defaulted assoc. type didn't work at all, // unless the impl in question overrides that type, which makes the default diff --git a/tests/ui/associated-types/issue-54467.rs b/tests/ui/associated-types/issue-54467.rs index 734bf2768c2..87fb0caf1d5 100644 --- a/tests/ui/associated-types/issue-54467.rs +++ b/tests/ui/associated-types/issue-54467.rs @@ -1,4 +1,4 @@ -// run-pass +//@ run-pass pub trait Stream { type Item; diff --git a/tests/ui/associated-types/issue-55846.rs b/tests/ui/associated-types/issue-55846.rs index bd766752360..1b29f2cccfa 100644 --- a/tests/ui/associated-types/issue-55846.rs +++ b/tests/ui/associated-types/issue-55846.rs @@ -1,4 +1,4 @@ -// run-pass +//@ run-pass // Regression test for #55846, which once caused an ICE. diff --git a/tests/ui/associated-types/issue-63591.rs b/tests/ui/associated-types/issue-63591.rs index d07c1234998..33826a24ddb 100644 --- a/tests/ui/associated-types/issue-63591.rs +++ b/tests/ui/associated-types/issue-63591.rs @@ -1,4 +1,4 @@ -// check-pass +//@ check-pass #![feature(associated_type_bounds)] #![feature(impl_trait_in_assoc_type)] diff --git a/tests/ui/associated-types/issue-64848.rs b/tests/ui/associated-types/issue-64848.rs index 77712168a0f..c107a1515aa 100644 --- a/tests/ui/associated-types/issue-64848.rs +++ b/tests/ui/associated-types/issue-64848.rs @@ -1,4 +1,4 @@ -// build-pass +//@ build-pass trait AssociatedConstant { const DATA: (); diff --git a/tests/ui/associated-types/issue-64855-2.rs b/tests/ui/associated-types/issue-64855-2.rs index 1d53bd57031..30cb37b5198 100644 --- a/tests/ui/associated-types/issue-64855-2.rs +++ b/tests/ui/associated-types/issue-64855-2.rs @@ -1,4 +1,4 @@ -// check-pass +//@ check-pass pub struct Bar<'a>(&'a Self) where Self: ; diff --git a/tests/ui/associated-types/issue-65934.rs b/tests/ui/associated-types/issue-65934.rs index e17b11c5eae..ad9dc388728 100644 --- a/tests/ui/associated-types/issue-65934.rs +++ b/tests/ui/associated-types/issue-65934.rs @@ -1,4 +1,4 @@ -// check-pass +//@ check-pass trait Trait { type Assoc; diff --git a/tests/ui/associated-types/issue-67684.rs b/tests/ui/associated-types/issue-67684.rs index c6920cf8d40..3122c670b44 100644 --- a/tests/ui/associated-types/issue-67684.rs +++ b/tests/ui/associated-types/issue-67684.rs @@ -1,10 +1,10 @@ -// revisions: check build -// [check]check-pass +//@ revisions: check build +//@ [check]check-pass // // This second configuration aims to verify that we do not ICE in ConstProp because of // normalization failure. -// [build]build-pass -// [build]compile-flags: -Zmir-opt-level=3 --emit=mir +//@ [build]build-pass +//@ [build]compile-flags: -Zmir-opt-level=3 --emit=mir #![allow(dead_code)] diff --git a/tests/ui/associated-types/issue-69398.rs b/tests/ui/associated-types/issue-69398.rs index ca3d66b1c8e..654c0f6e4b5 100644 --- a/tests/ui/associated-types/issue-69398.rs +++ b/tests/ui/associated-types/issue-69398.rs @@ -1,4 +1,4 @@ -// check-pass +//@ check-pass pub trait Foo { type Bar; diff --git a/tests/ui/associated-types/issue-71113.rs b/tests/ui/associated-types/issue-71113.rs index 48de89127f4..51429f9ee67 100644 --- a/tests/ui/associated-types/issue-71113.rs +++ b/tests/ui/associated-types/issue-71113.rs @@ -1,4 +1,4 @@ -// check-pass +//@ check-pass use std::borrow::Cow; diff --git a/tests/ui/associated-types/issue-76179.rs b/tests/ui/associated-types/issue-76179.rs index 0e086968b90..efff473c26e 100644 --- a/tests/ui/associated-types/issue-76179.rs +++ b/tests/ui/associated-types/issue-76179.rs @@ -1,4 +1,4 @@ -// check-pass +//@ check-pass #![feature(associated_type_defaults)] diff --git a/tests/ui/associated-types/issue-82079.rs b/tests/ui/associated-types/issue-82079.rs index 8b3bad707d3..a2d04c22edb 100644 --- a/tests/ui/associated-types/issue-82079.rs +++ b/tests/ui/associated-types/issue-82079.rs @@ -1,6 +1,6 @@ -// revisions: default miropt -// check-pass -//[miropt]compile-flags: -Z mir-opt-level=3 +//@ revisions: default miropt +//@ check-pass +//@[miropt]compile-flags: -Z mir-opt-level=3 // -^ This flag is for #96395 as a regression test. mod convenience_operators { diff --git a/tests/ui/associated-types/issue-88856.rs b/tests/ui/associated-types/issue-88856.rs index 7cae7c71cd2..47585a508fd 100644 --- a/tests/ui/associated-types/issue-88856.rs +++ b/tests/ui/associated-types/issue-88856.rs @@ -1,4 +1,4 @@ -// check-pass +//@ check-pass #![feature(generic_const_exprs)] #![allow(incomplete_features)] diff --git a/tests/ui/associated-types/issue-91069.rs b/tests/ui/associated-types/issue-91069.rs index 109c2eed27a..dc686c05b98 100644 --- a/tests/ui/associated-types/issue-91069.rs +++ b/tests/ui/associated-types/issue-91069.rs @@ -1,4 +1,4 @@ -// check-pass +//@ check-pass pub trait Associate { type Associated; diff --git a/tests/ui/associated-types/issue-91231.rs b/tests/ui/associated-types/issue-91231.rs index 3c1cb81f097..d1c99fd44fa 100644 --- a/tests/ui/associated-types/issue-91231.rs +++ b/tests/ui/associated-types/issue-91231.rs @@ -1,4 +1,4 @@ -// check-pass +//@ check-pass #![feature(extern_types)] #![allow(dead_code)] diff --git a/tests/ui/associated-types/issue-91234.rs b/tests/ui/associated-types/issue-91234.rs index 2f6c2d3aebd..4828155ba39 100644 --- a/tests/ui/associated-types/issue-91234.rs +++ b/tests/ui/associated-types/issue-91234.rs @@ -1,4 +1,4 @@ -// check-pass +//@ check-pass struct Struct; diff --git a/tests/ui/associated-types/normalization-debruijn-1.rs b/tests/ui/associated-types/normalization-debruijn-1.rs index a5abf1ba99d..ced2d193e69 100644 --- a/tests/ui/associated-types/normalization-debruijn-1.rs +++ b/tests/ui/associated-types/normalization-debruijn-1.rs @@ -1,5 +1,5 @@ -// build-pass -// edition:2018 +//@ build-pass +//@ edition:2018 // Regression test to ensure we handle debruijn indices correctly in projection // normalization under binders. Found in crater run for #85499 diff --git a/tests/ui/associated-types/normalization-debruijn-2.rs b/tests/ui/associated-types/normalization-debruijn-2.rs index abe248e16a1..d33ff57021f 100644 --- a/tests/ui/associated-types/normalization-debruijn-2.rs +++ b/tests/ui/associated-types/normalization-debruijn-2.rs @@ -1,5 +1,5 @@ -// build-pass -// edition:2018 +//@ build-pass +//@ edition:2018 // Regression test to ensure we handle debruijn indices correctly in projection // normalization under binders. Found in crater run for #85499 diff --git a/tests/ui/associated-types/normalization-debruijn-3.rs b/tests/ui/associated-types/normalization-debruijn-3.rs index bd9a8fcf492..f12860fe6db 100644 --- a/tests/ui/associated-types/normalization-debruijn-3.rs +++ b/tests/ui/associated-types/normalization-debruijn-3.rs @@ -1,5 +1,5 @@ -// build-pass -// edition:2018 +//@ build-pass +//@ edition:2018 // Regression test to ensure we handle debruijn indices correctly in projection // normalization under binders. Found in crater run for #85499 diff --git a/tests/ui/associated-types/normalization-generality-2.rs b/tests/ui/associated-types/normalization-generality-2.rs index d8790bb2d12..50287f9ee9b 100644 --- a/tests/ui/associated-types/normalization-generality-2.rs +++ b/tests/ui/associated-types/normalization-generality-2.rs @@ -1,4 +1,4 @@ -// build-pass +//@ build-pass // Ensures that we don't regress on "implementation is not general enough" when // normalizating under binders. Unlike `normalization-generality.rs`, this also produces diff --git a/tests/ui/associated-types/normalization-generality.rs b/tests/ui/associated-types/normalization-generality.rs index f8e3f5b58d1..35fcf53b641 100644 --- a/tests/ui/associated-types/normalization-generality.rs +++ b/tests/ui/associated-types/normalization-generality.rs @@ -1,4 +1,4 @@ -// build-pass +//@ build-pass // Ensures that we don't regress on "implementation is not general enough" when // normalizating under binders. diff --git a/tests/ui/associated-types/normalization-probe-cycle.rs b/tests/ui/associated-types/normalization-probe-cycle.rs index 9c1a488e951..c501b2f3f24 100644 --- a/tests/ui/associated-types/normalization-probe-cycle.rs +++ b/tests/ui/associated-types/normalization-probe-cycle.rs @@ -1,6 +1,6 @@ // Regression test for #77656 -// check-pass +//@ check-pass trait Value: PartialOrd {} diff --git a/tests/ui/associated-types/normalize-cycle-in-eval-no-region.rs b/tests/ui/associated-types/normalize-cycle-in-eval-no-region.rs index 0fd2c707938..60e5d594202 100644 --- a/tests/ui/associated-types/normalize-cycle-in-eval-no-region.rs +++ b/tests/ui/associated-types/normalize-cycle-in-eval-no-region.rs @@ -1,6 +1,6 @@ // Case that the fix for #74868 also allowed to compile -// check-pass +//@ check-pass trait BoxedDsl { type Output; diff --git a/tests/ui/associated-types/normalize-cycle-in-eval.rs b/tests/ui/associated-types/normalize-cycle-in-eval.rs index dff4c9051f4..6a50ee6e76f 100644 --- a/tests/ui/associated-types/normalize-cycle-in-eval.rs +++ b/tests/ui/associated-types/normalize-cycle-in-eval.rs @@ -1,6 +1,6 @@ // regression test for #74868 -// check-pass +//@ check-pass trait BoxedDsl<'a> { type Output; diff --git a/tests/ui/associated-types/object-method-numbering.rs b/tests/ui/associated-types/object-method-numbering.rs index bf80a80f406..7fe2a81bd59 100644 --- a/tests/ui/associated-types/object-method-numbering.rs +++ b/tests/ui/associated-types/object-method-numbering.rs @@ -1,4 +1,4 @@ -// run-pass +//@ run-pass // Test for using an object with an associated type binding as the // instantiation for a generic type with a bound. diff --git a/tests/ui/associated-types/object-normalization.rs b/tests/ui/associated-types/object-normalization.rs index 1f93248e10e..658905995a0 100644 --- a/tests/ui/associated-types/object-normalization.rs +++ b/tests/ui/associated-types/object-normalization.rs @@ -2,7 +2,7 @@ // Check that we normalize super predicates for object candidates. -// check-pass +//@ check-pass use std::ops::Index; diff --git a/tests/ui/associated-types/param-env-normalize-cycle.rs b/tests/ui/associated-types/param-env-normalize-cycle.rs index 12db595ed25..c50149b3443 100644 --- a/tests/ui/associated-types/param-env-normalize-cycle.rs +++ b/tests/ui/associated-types/param-env-normalize-cycle.rs @@ -9,7 +9,7 @@ // - But first we tried normalizing the whole obligation, including the // ParamEnv, which leads to a cycle error. -// check-pass +//@ check-pass trait PrivateSquareRoot {} diff --git a/tests/ui/associated-types/project-defer-unification.rs b/tests/ui/associated-types/project-defer-unification.rs index 547ff45c229..cec088496fd 100644 --- a/tests/ui/associated-types/project-defer-unification.rs +++ b/tests/ui/associated-types/project-defer-unification.rs @@ -1,4 +1,4 @@ -// run-pass +//@ run-pass #![allow(dead_code)] #![allow(unused_variables)] diff --git a/tests/ui/associated-types/project-recursion-limit-non-fatal.rs b/tests/ui/associated-types/project-recursion-limit-non-fatal.rs index 3e68b140102..614c80de512 100644 --- a/tests/ui/associated-types/project-recursion-limit-non-fatal.rs +++ b/tests/ui/associated-types/project-recursion-limit-non-fatal.rs @@ -2,7 +2,7 @@ // is non-fatal. The above code, minimised from wundergraph shows a case // where this is relied on. -// check-pass +//@ check-pass struct AlternateTable {} struct AlternateQuery {} diff --git a/tests/ui/associated-types/substs-ppaux.rs b/tests/ui/associated-types/substs-ppaux.rs index db6e7a4cf05..d32cdd24658 100644 --- a/tests/ui/associated-types/substs-ppaux.rs +++ b/tests/ui/associated-types/substs-ppaux.rs @@ -1,7 +1,7 @@ // -// revisions: verbose normal +//@ revisions: verbose normal // -//[verbose] compile-flags: -Z verbose-internals +//@[verbose] compile-flags: -Z verbose-internals trait Foo<'b, 'c, S=u32> { fn bar<'a, T>() where T: 'a {} diff --git a/tests/ui/associated-types/wf-cycle-2.rs b/tests/ui/associated-types/wf-cycle-2.rs index d7467ac2237..36f79e34f3e 100644 --- a/tests/ui/associated-types/wf-cycle-2.rs +++ b/tests/ui/associated-types/wf-cycle-2.rs @@ -1,4 +1,4 @@ -// check-pass +//@ check-pass trait IntoIt { type Item; diff --git a/tests/ui/associated-types/wf-cycle.rs b/tests/ui/associated-types/wf-cycle.rs index cf6508551a5..f54a0b523e2 100644 --- a/tests/ui/associated-types/wf-cycle.rs +++ b/tests/ui/associated-types/wf-cycle.rs @@ -1,4 +1,4 @@ -// check-pass +//@ check-pass trait A { type U: Copy; diff --git a/tests/ui/async-await/argument-patterns.rs b/tests/ui/async-await/argument-patterns.rs index b9fc1a88cee..658e8f9b907 100644 --- a/tests/ui/async-await/argument-patterns.rs +++ b/tests/ui/async-await/argument-patterns.rs @@ -1,5 +1,5 @@ -// edition:2018 -// check-pass +//@ edition:2018 +//@ check-pass #![deny(unused_mut)] diff --git a/tests/ui/async-await/async-assoc-fn-anon-lifetimes.rs b/tests/ui/async-await/async-assoc-fn-anon-lifetimes.rs index 8e08b82b9d3..28705bfc0c8 100644 --- a/tests/ui/async-await/async-assoc-fn-anon-lifetimes.rs +++ b/tests/ui/async-await/async-assoc-fn-anon-lifetimes.rs @@ -1,9 +1,9 @@ -// check-pass +//@ check-pass // Check that the anonymous lifetimes used here aren't considered to shadow one // another. Note that `async fn` is different to `fn` here because the lifetimes // are numbered by HIR lowering, rather than lifetime resolution. -// edition:2018 +//@ edition:2018 struct A<'a, 'b>(&'a &'b i32); struct B<'a>(&'a i32); diff --git a/tests/ui/async-await/async-await-let-else.rs b/tests/ui/async-await/async-await-let-else.rs index a3c7226056b..a7b4bf8903a 100644 --- a/tests/ui/async-await/async-await-let-else.rs +++ b/tests/ui/async-await/async-await-let-else.rs @@ -1,4 +1,4 @@ -// edition:2021 +//@ edition:2021 use std::rc::Rc; diff --git a/tests/ui/async-await/async-await.rs b/tests/ui/async-await/async-await.rs index 63941a79139..b3b22ab0526 100644 --- a/tests/ui/async-await/async-await.rs +++ b/tests/ui/async-await/async-await.rs @@ -1,12 +1,12 @@ -// run-pass +//@ run-pass -// revisions: default nomiropt -//[nomiropt]compile-flags: -Z mir-opt-level=0 +//@ revisions: default nomiropt +//@[nomiropt]compile-flags: -Z mir-opt-level=0 #![allow(unused)] -// edition: 2018 -// aux-build:arc_wake.rs +//@ edition: 2018 +//@ aux-build:arc_wake.rs extern crate arc_wake; diff --git a/tests/ui/async-await/async-block-control-flow-static-semantics.rs b/tests/ui/async-await/async-block-control-flow-static-semantics.rs index bc9d127931d..0ef7cb7574a 100644 --- a/tests/ui/async-await/async-block-control-flow-static-semantics.rs +++ b/tests/ui/async-await/async-block-control-flow-static-semantics.rs @@ -3,7 +3,7 @@ // 2. get targeted by `return` and not the parent function. // 3. get targeted by `?` and not the parent function. // -// edition:2018 +//@ edition:2018 fn main() {} diff --git a/tests/ui/async-await/async-borrowck-escaping-block-error.fixed b/tests/ui/async-await/async-borrowck-escaping-block-error.fixed index 605cfdfe747..0b926bcb286 100644 --- a/tests/ui/async-await/async-borrowck-escaping-block-error.fixed +++ b/tests/ui/async-await/async-borrowck-escaping-block-error.fixed @@ -1,5 +1,5 @@ -// edition:2018 -// run-rustfix +//@ edition:2018 +//@ run-rustfix fn test_boxed() -> Box> { let x = 0u32; diff --git a/tests/ui/async-await/async-borrowck-escaping-block-error.rs b/tests/ui/async-await/async-borrowck-escaping-block-error.rs index ec752c15fa2..d3e47c5579b 100644 --- a/tests/ui/async-await/async-borrowck-escaping-block-error.rs +++ b/tests/ui/async-await/async-borrowck-escaping-block-error.rs @@ -1,5 +1,5 @@ -// edition:2018 -// run-rustfix +//@ edition:2018 +//@ run-rustfix fn test_boxed() -> Box> { let x = 0u32; diff --git a/tests/ui/async-await/async-borrowck-escaping-closure-error.rs b/tests/ui/async-await/async-borrowck-escaping-closure-error.rs index 2a3e382e118..1990d0ffe2a 100644 --- a/tests/ui/async-await/async-borrowck-escaping-closure-error.rs +++ b/tests/ui/async-await/async-borrowck-escaping-closure-error.rs @@ -1,4 +1,4 @@ -// edition:2018 +//@ edition:2018 #![feature(async_closure)] fn foo() -> Box> { diff --git a/tests/ui/async-await/async-closure-matches-expr.rs b/tests/ui/async-await/async-closure-matches-expr.rs index d82fbcdc550..75ce14a4947 100644 --- a/tests/ui/async-await/async-closure-matches-expr.rs +++ b/tests/ui/async-await/async-closure-matches-expr.rs @@ -1,5 +1,5 @@ -// build-pass -// edition:2018 +//@ build-pass +//@ edition:2018 #![feature(async_closure)] diff --git a/tests/ui/async-await/async-closure.rs b/tests/ui/async-await/async-closure.rs index 12d66b19e07..77c00bbdc9f 100644 --- a/tests/ui/async-await/async-closure.rs +++ b/tests/ui/async-await/async-closure.rs @@ -1,10 +1,10 @@ -// run-pass +//@ run-pass -// revisions: default nomiropt -//[nomiropt]compile-flags: -Z mir-opt-level=0 +//@ revisions: default nomiropt +//@[nomiropt]compile-flags: -Z mir-opt-level=0 -// edition:2018 -// aux-build:arc_wake.rs +//@ edition:2018 +//@ aux-build:arc_wake.rs #![feature(async_closure)] diff --git a/tests/ui/async-await/async-closures/arg-mismatch.rs b/tests/ui/async-await/async-closures/arg-mismatch.rs index 650e13677bc..c8dddee6275 100644 --- a/tests/ui/async-await/async-closures/arg-mismatch.rs +++ b/tests/ui/async-await/async-closures/arg-mismatch.rs @@ -1,5 +1,5 @@ -// aux-build:block-on.rs -// edition:2021 +//@ aux-build:block-on.rs +//@ edition:2021 #![feature(async_closure)] diff --git a/tests/ui/async-await/async-closures/async-fn-mut-for-async-fn.rs b/tests/ui/async-await/async-closures/async-fn-mut-for-async-fn.rs index 897def791fe..5ed65425f34 100644 --- a/tests/ui/async-await/async-closures/async-fn-mut-for-async-fn.rs +++ b/tests/ui/async-await/async-closures/async-fn-mut-for-async-fn.rs @@ -1,6 +1,6 @@ -// aux-build:block-on.rs -// edition:2021 -// run-pass +//@ aux-build:block-on.rs +//@ edition:2021 +//@ run-pass #![feature(async_closure)] diff --git a/tests/ui/async-await/async-closures/async-fn-once-for-async-fn.rs b/tests/ui/async-await/async-closures/async-fn-once-for-async-fn.rs index 0e9b25e6d30..9c3b458cd3a 100644 --- a/tests/ui/async-await/async-closures/async-fn-once-for-async-fn.rs +++ b/tests/ui/async-await/async-closures/async-fn-once-for-async-fn.rs @@ -1,6 +1,6 @@ -// aux-build:block-on.rs -// edition:2021 -// run-pass +//@ aux-build:block-on.rs +//@ edition:2021 +//@ run-pass #![feature(async_closure)] diff --git a/tests/ui/async-await/async-closures/auxiliary/block-on.rs b/tests/ui/async-await/async-closures/auxiliary/block-on.rs index 902e033cfe7..dcb710fc97c 100644 --- a/tests/ui/async-await/async-closures/auxiliary/block-on.rs +++ b/tests/ui/async-await/async-closures/auxiliary/block-on.rs @@ -1,4 +1,4 @@ -// edition: 2021 +//@ edition: 2021 #![feature(async_closure, noop_waker)] diff --git a/tests/ui/async-await/async-closures/auxiliary/foreign.rs b/tests/ui/async-await/async-closures/auxiliary/foreign.rs index e11dfc22213..2c935f5e1fa 100644 --- a/tests/ui/async-await/async-closures/auxiliary/foreign.rs +++ b/tests/ui/async-await/async-closures/auxiliary/foreign.rs @@ -1,4 +1,4 @@ -// edition:2021 +//@ edition:2021 #![feature(async_closure)] diff --git a/tests/ui/async-await/async-closures/await-inference-guidance.rs b/tests/ui/async-await/async-closures/await-inference-guidance.rs index 3702915cbad..1ddc1f8d1c5 100644 --- a/tests/ui/async-await/async-closures/await-inference-guidance.rs +++ b/tests/ui/async-await/async-closures/await-inference-guidance.rs @@ -1,6 +1,6 @@ -// aux-build:block-on.rs -// edition:2021 -// run-pass +//@ aux-build:block-on.rs +//@ edition:2021 +//@ run-pass #![feature(async_closure)] diff --git a/tests/ui/async-await/async-closures/brand.rs b/tests/ui/async-await/async-closures/brand.rs index 26d2ed5a6ef..5168f3696d7 100644 --- a/tests/ui/async-await/async-closures/brand.rs +++ b/tests/ui/async-await/async-closures/brand.rs @@ -1,6 +1,6 @@ -// aux-build:block-on.rs -// edition:2021 -// build-pass +//@ aux-build:block-on.rs +//@ edition:2021 +//@ build-pass #![feature(async_closure)] diff --git a/tests/ui/async-await/async-closures/def-path.rs b/tests/ui/async-await/async-closures/def-path.rs index 87e99ddda64..70450697816 100644 --- a/tests/ui/async-await/async-closures/def-path.rs +++ b/tests/ui/async-await/async-closures/def-path.rs @@ -1,5 +1,5 @@ -// compile-flags: -Zverbose-internals -// edition:2021 +//@ compile-flags: -Zverbose-internals +//@ edition:2021 #![feature(async_closure)] diff --git a/tests/ui/async-await/async-closures/drop.rs b/tests/ui/async-await/async-closures/drop.rs index a243d20774d..2884a20f244 100644 --- a/tests/ui/async-await/async-closures/drop.rs +++ b/tests/ui/async-await/async-closures/drop.rs @@ -1,7 +1,7 @@ -// aux-build:block-on.rs -// edition:2018 -// run-pass -// check-run-results +//@ aux-build:block-on.rs +//@ edition:2018 +//@ run-pass +//@ check-run-results #![feature(async_closure)] #![allow(unused)] diff --git a/tests/ui/async-await/async-closures/foreign.rs b/tests/ui/async-await/async-closures/foreign.rs index 60fea909801..50bef9cf11d 100644 --- a/tests/ui/async-await/async-closures/foreign.rs +++ b/tests/ui/async-await/async-closures/foreign.rs @@ -1,7 +1,7 @@ -// aux-build:block-on.rs -// aux-build:foreign.rs -// edition:2021 -// build-pass +//@ aux-build:block-on.rs +//@ aux-build:foreign.rs +//@ edition:2021 +//@ build-pass #![feature(async_closure)] diff --git a/tests/ui/async-await/async-closures/higher-ranked-return.rs b/tests/ui/async-await/async-closures/higher-ranked-return.rs index d98779c6ea3..d6bea5dd103 100644 --- a/tests/ui/async-await/async-closures/higher-ranked-return.rs +++ b/tests/ui/async-await/async-closures/higher-ranked-return.rs @@ -1,7 +1,7 @@ -// aux-build:block-on.rs -// edition:2021 +//@ aux-build:block-on.rs +//@ edition:2021 -// known-bug: unknown +//@ known-bug: unknown // Borrow checking doesn't like that higher-ranked output... #![feature(async_closure)] diff --git a/tests/ui/async-await/async-closures/higher-ranked.rs b/tests/ui/async-await/async-closures/higher-ranked.rs index 17b5116cceb..5b34bfce961 100644 --- a/tests/ui/async-await/async-closures/higher-ranked.rs +++ b/tests/ui/async-await/async-closures/higher-ranked.rs @@ -1,6 +1,6 @@ -// aux-build:block-on.rs -// edition:2021 -// build-pass +//@ aux-build:block-on.rs +//@ edition:2021 +//@ build-pass #![feature(async_closure)] diff --git a/tests/ui/async-await/async-closures/is-not-fn.rs b/tests/ui/async-await/async-closures/is-not-fn.rs index 81666cada31..f877513043d 100644 --- a/tests/ui/async-await/async-closures/is-not-fn.rs +++ b/tests/ui/async-await/async-closures/is-not-fn.rs @@ -1,4 +1,4 @@ -// edition:2021 +//@ edition:2021 #![feature(async_closure)] diff --git a/tests/ui/async-await/async-closures/mangle.rs b/tests/ui/async-await/async-closures/mangle.rs index 9d231d55176..632f1657436 100644 --- a/tests/ui/async-await/async-closures/mangle.rs +++ b/tests/ui/async-await/async-closures/mangle.rs @@ -1,12 +1,12 @@ -// aux-build:block-on.rs -// edition:2021 -// build-pass -// revisions: v0 legacy -//[v0] compile-flags: -Csymbol-mangling-version=v0 -//[legacy] compile-flags: -Csymbol-mangling-version=legacy -Zunstable-options +//@ aux-build:block-on.rs +//@ edition:2021 +//@ build-pass +//@ revisions: v0 legacy +//@[v0] compile-flags: -Csymbol-mangling-version=v0 +//@[legacy] compile-flags: -Csymbol-mangling-version=legacy -Zunstable-options // FIXME(async_closures): When `fn_sig_for_fn_abi` is fixed, remove this. -// ignore-pass (test emits codegen-time warnings) +//@ ignore-pass (test emits codegen-time warnings) #![feature(async_closure, noop_waker)] diff --git a/tests/ui/async-await/async-closures/move-consuming-capture.rs b/tests/ui/async-await/async-closures/move-consuming-capture.rs index b8964c571f9..17925fc89ba 100644 --- a/tests/ui/async-await/async-closures/move-consuming-capture.rs +++ b/tests/ui/async-await/async-closures/move-consuming-capture.rs @@ -1,5 +1,5 @@ -// aux-build:block-on.rs -// edition:2021 +//@ aux-build:block-on.rs +//@ edition:2021 #![feature(async_closure)] diff --git a/tests/ui/async-await/async-closures/move-is-async-fn.rs b/tests/ui/async-await/async-closures/move-is-async-fn.rs index 943c0629541..0ccd137266d 100644 --- a/tests/ui/async-await/async-closures/move-is-async-fn.rs +++ b/tests/ui/async-await/async-closures/move-is-async-fn.rs @@ -1,6 +1,6 @@ -// aux-build:block-on.rs -// edition:2021 -// build-pass +//@ aux-build:block-on.rs +//@ edition:2021 +//@ build-pass #![feature(async_closure)] diff --git a/tests/ui/async-await/async-closures/mutate.rs b/tests/ui/async-await/async-closures/mutate.rs index cc1df5f034f..562a7271c66 100644 --- a/tests/ui/async-await/async-closures/mutate.rs +++ b/tests/ui/async-await/async-closures/mutate.rs @@ -1,6 +1,6 @@ -// aux-build:block-on.rs -// edition:2021 -// run-pass +//@ aux-build:block-on.rs +//@ edition:2021 +//@ run-pass #![feature(async_closure)] diff --git a/tests/ui/async-await/async-closures/not-fn.rs b/tests/ui/async-await/async-closures/not-fn.rs index 4505e6243e9..5322a6d5d7a 100644 --- a/tests/ui/async-await/async-closures/not-fn.rs +++ b/tests/ui/async-await/async-closures/not-fn.rs @@ -1,4 +1,4 @@ -// edition:2021 +//@ edition:2021 // FIXME(async_closures): This needs a better error message! diff --git a/tests/ui/async-await/async-closures/not-lending.rs b/tests/ui/async-await/async-closures/not-lending.rs index 90832e1a074..2e5542207cf 100644 --- a/tests/ui/async-await/async-closures/not-lending.rs +++ b/tests/ui/async-await/async-closures/not-lending.rs @@ -1,5 +1,5 @@ -// aux-build:block-on.rs -// edition:2021 +//@ aux-build:block-on.rs +//@ edition:2021 #![feature(async_closure)] diff --git a/tests/ui/async-await/async-closures/once.rs b/tests/ui/async-await/async-closures/once.rs index a1c56c5de6a..55e4cedb267 100644 --- a/tests/ui/async-await/async-closures/once.rs +++ b/tests/ui/async-await/async-closures/once.rs @@ -1,6 +1,6 @@ -// aux-build:block-on.rs -// edition:2021 -// build-pass +//@ aux-build:block-on.rs +//@ edition:2021 +//@ build-pass #![feature(async_closure)] diff --git a/tests/ui/async-await/async-closures/refd.rs b/tests/ui/async-await/async-closures/refd.rs index 7c61ff2d9bd..1d9bc1a601b 100644 --- a/tests/ui/async-await/async-closures/refd.rs +++ b/tests/ui/async-await/async-closures/refd.rs @@ -1,6 +1,6 @@ -// aux-build:block-on.rs -// edition:2021 -// build-pass +//@ aux-build:block-on.rs +//@ edition:2021 +//@ build-pass // check that `&{async-closure}` implements `AsyncFn`. diff --git a/tests/ui/async-await/async-closures/return-type-mismatch.rs b/tests/ui/async-await/async-closures/return-type-mismatch.rs index 9ad6be0b6e6..992f033180e 100644 --- a/tests/ui/async-await/async-closures/return-type-mismatch.rs +++ b/tests/ui/async-await/async-closures/return-type-mismatch.rs @@ -1,5 +1,5 @@ -// aux-build:block-on.rs -// edition:2021 +//@ aux-build:block-on.rs +//@ edition:2021 #![feature(async_closure)] diff --git a/tests/ui/async-await/async-closures/tainted-body.rs b/tests/ui/async-await/async-closures/tainted-body.rs index 62c28e7e585..e42d9d6e36a 100644 --- a/tests/ui/async-await/async-closures/tainted-body.rs +++ b/tests/ui/async-await/async-closures/tainted-body.rs @@ -1,4 +1,4 @@ -// edition:2021 +//@ edition:2021 #![feature(async_closure)] diff --git a/tests/ui/async-await/async-closures/wrong-fn-kind.rs b/tests/ui/async-await/async-closures/wrong-fn-kind.rs index 1e372deb984..7c3c7337e2e 100644 --- a/tests/ui/async-await/async-closures/wrong-fn-kind.rs +++ b/tests/ui/async-await/async-closures/wrong-fn-kind.rs @@ -1,4 +1,4 @@ -// edition:2021 +//@ edition:2021 // FIXME(async_closures): This needs a better error message! diff --git a/tests/ui/async-await/async-error-span.rs b/tests/ui/async-await/async-error-span.rs index c8127df625e..486a07d3dd1 100644 --- a/tests/ui/async-await/async-error-span.rs +++ b/tests/ui/async-await/async-error-span.rs @@ -1,4 +1,4 @@ -// edition:2018 +//@ edition:2018 // Regression test for issue #62382. diff --git a/tests/ui/async-await/async-fn-elided-impl-lifetime-parameter.rs b/tests/ui/async-await/async-fn-elided-impl-lifetime-parameter.rs index 1c369fd7415..80f8b5aaa20 100644 --- a/tests/ui/async-await/async-fn-elided-impl-lifetime-parameter.rs +++ b/tests/ui/async-await/async-fn-elided-impl-lifetime-parameter.rs @@ -3,8 +3,8 @@ // // Regression test for #63500. // -// check-pass -// edition:2018 +//@ check-pass +//@ edition:2018 struct Foo<'a>(&'a u8); diff --git a/tests/ui/async-await/async-fn-nonsend.rs b/tests/ui/async-await/async-fn-nonsend.rs index c5453b67ef5..62b28ec869f 100644 --- a/tests/ui/async-await/async-fn-nonsend.rs +++ b/tests/ui/async-await/async-fn-nonsend.rs @@ -1,5 +1,5 @@ -// edition:2018 -// compile-flags: --crate-type lib +//@ edition:2018 +//@ compile-flags: --crate-type lib use std::{cell::RefCell, fmt::Debug, rc::Rc}; diff --git a/tests/ui/async-await/async-fn-path-elision.rs b/tests/ui/async-await/async-fn-path-elision.rs index 3f1f51c20ca..7f2fb5a908a 100644 --- a/tests/ui/async-await/async-fn-path-elision.rs +++ b/tests/ui/async-await/async-fn-path-elision.rs @@ -1,4 +1,4 @@ -// edition:2018 +//@ edition:2018 struct HasLifetime<'a>(&'a bool); diff --git a/tests/ui/async-await/async-fn-send-uses-nonsend.rs b/tests/ui/async-await/async-fn-send-uses-nonsend.rs index 35d9cb15540..53016854f15 100644 --- a/tests/ui/async-await/async-fn-send-uses-nonsend.rs +++ b/tests/ui/async-await/async-fn-send-uses-nonsend.rs @@ -1,6 +1,6 @@ -// build-pass (FIXME(62277): could be check-pass?) -// edition:2018 -// compile-flags: --crate-type lib +//@ build-pass (FIXME(62277): could be check-pass?) +//@ edition:2018 +//@ compile-flags: --crate-type lib use std::{ cell::RefCell, diff --git a/tests/ui/async-await/async-fn-size-moved-locals.rs b/tests/ui/async-await/async-fn-size-moved-locals.rs index fb64bb6db63..b74c23b57c3 100644 --- a/tests/ui/async-await/async-fn-size-moved-locals.rs +++ b/tests/ui/async-await/async-fn-size-moved-locals.rs @@ -7,10 +7,10 @@ // // See issue #59123 for a full explanation. -// needs-unwind Size of Futures change on panic=abort -// run-pass +//@ needs-unwind Size of Futures change on panic=abort +//@ run-pass -// edition:2018 +//@ edition:2018 use std::future::Future; use std::pin::Pin; diff --git a/tests/ui/async-await/async-fn-size-uninit-locals.rs b/tests/ui/async-await/async-fn-size-uninit-locals.rs index fee3e27cfb8..b27d0bbd58d 100644 --- a/tests/ui/async-await/async-fn-size-uninit-locals.rs +++ b/tests/ui/async-await/async-fn-size-uninit-locals.rs @@ -4,11 +4,11 @@ // What we don't want to see is the wrong multiple of 1024 (the size of `Big`) // being reflected in the size. -// ignore-emscripten (sizes don't match) -// needs-unwind Size of Futures change on panic=abort -// run-pass +//@ ignore-emscripten (sizes don't match) +//@ needs-unwind Size of Futures change on panic=abort +//@ run-pass -// edition:2018 +//@ edition:2018 #![allow(unused_variables, unused_assignments)] diff --git a/tests/ui/async-await/async-fn-size.rs b/tests/ui/async-await/async-fn-size.rs index 0c1f3636446..805a123cc1a 100644 --- a/tests/ui/async-await/async-fn-size.rs +++ b/tests/ui/async-await/async-fn-size.rs @@ -1,6 +1,6 @@ -// run-pass -// aux-build:arc_wake.rs -// edition:2018 +//@ run-pass +//@ aux-build:arc_wake.rs +//@ edition:2018 extern crate arc_wake; diff --git a/tests/ui/async-await/async-fn/dyn-pos.rs b/tests/ui/async-await/async-fn/dyn-pos.rs index 3201fb8dbf3..e817a1b518f 100644 --- a/tests/ui/async-await/async-fn/dyn-pos.rs +++ b/tests/ui/async-await/async-fn/dyn-pos.rs @@ -1,4 +1,4 @@ -// edition:2018 +//@ edition:2018 #![feature(async_closure)] diff --git a/tests/ui/async-await/async-fn/edition-2015-not-async-bound.rs b/tests/ui/async-await/async-fn/edition-2015-not-async-bound.rs index 6436787b665..d222ddc081e 100644 --- a/tests/ui/async-await/async-fn/edition-2015-not-async-bound.rs +++ b/tests/ui/async-await/async-fn/edition-2015-not-async-bound.rs @@ -1,4 +1,4 @@ -// check-pass +//@ check-pass // Make sure that we don't eagerly recover `async ::Bound` in edition 2015. mod async { diff --git a/tests/ui/async-await/async-fn/impl-header.rs b/tests/ui/async-await/async-fn/impl-header.rs index fb1844384ae..b9ae90292bb 100644 --- a/tests/ui/async-await/async-fn/impl-header.rs +++ b/tests/ui/async-await/async-fn/impl-header.rs @@ -1,4 +1,4 @@ -// edition:2018 +//@ edition:2018 struct F; diff --git a/tests/ui/async-await/async-fn/impl-trait.rs b/tests/ui/async-await/async-fn/impl-trait.rs index 97f6696fe14..686addcb1a9 100644 --- a/tests/ui/async-await/async-fn/impl-trait.rs +++ b/tests/ui/async-await/async-fn/impl-trait.rs @@ -1,5 +1,5 @@ -// edition:2018 -// check-pass +//@ edition:2018 +//@ check-pass #![feature(async_closure, type_alias_impl_trait)] diff --git a/tests/ui/async-await/async-fn/method-call-pos.rs b/tests/ui/async-await/async-fn/method-call-pos.rs index aaa0245b986..1f06bb13650 100644 --- a/tests/ui/async-await/async-fn/method-call-pos.rs +++ b/tests/ui/async-await/async-fn/method-call-pos.rs @@ -1,4 +1,4 @@ -// edition:2018 +//@ edition:2018 fn main() { <_ as async Fn()>(|| async {}); diff --git a/tests/ui/async-await/async-fn/not-a-trait.rs b/tests/ui/async-await/async-fn/not-a-trait.rs index a8fa21e5568..0d22cbd2c07 100644 --- a/tests/ui/async-await/async-fn/not-a-trait.rs +++ b/tests/ui/async-await/async-fn/not-a-trait.rs @@ -1,4 +1,4 @@ -// edition:2018 +//@ edition:2018 #![feature(async_closure)] diff --git a/tests/ui/async-await/async-fn/simple.rs b/tests/ui/async-await/async-fn/simple.rs index 172ede7098a..e2a183a8c0b 100644 --- a/tests/ui/async-await/async-fn/simple.rs +++ b/tests/ui/async-await/async-fn/simple.rs @@ -1,5 +1,5 @@ -// edition: 2021 -// build-pass +//@ edition: 2021 +//@ build-pass #![feature(async_fn_traits)] diff --git a/tests/ui/async-await/async-fn/sugar.rs b/tests/ui/async-await/async-fn/sugar.rs index 868fb799ae4..29b6abc814a 100644 --- a/tests/ui/async-await/async-fn/sugar.rs +++ b/tests/ui/async-await/async-fn/sugar.rs @@ -1,5 +1,5 @@ -// edition: 2021 -// check-pass +//@ edition: 2021 +//@ check-pass #![feature(async_closure)] diff --git a/tests/ui/async-await/async-fn/wrong-trait.rs b/tests/ui/async-await/async-fn/wrong-trait.rs index c431a362b1e..e6fb0b46712 100644 --- a/tests/ui/async-await/async-fn/wrong-trait.rs +++ b/tests/ui/async-await/async-fn/wrong-trait.rs @@ -1,4 +1,4 @@ -// edition:2018 +//@ edition:2018 #![feature(async_closure)] diff --git a/tests/ui/async-await/async-is-unwindsafe.rs b/tests/ui/async-await/async-is-unwindsafe.rs index 56ed2847292..53009b6e741 100644 --- a/tests/ui/async-await/async-is-unwindsafe.rs +++ b/tests/ui/async-await/async-is-unwindsafe.rs @@ -1,4 +1,4 @@ -// edition:2018 +//@ edition:2018 fn is_unwindsafe(_: impl std::panic::UnwindSafe) {} diff --git a/tests/ui/async-await/async-matches-expr.rs b/tests/ui/async-await/async-matches-expr.rs index 299faa0587b..a632ffa603a 100644 --- a/tests/ui/async-await/async-matches-expr.rs +++ b/tests/ui/async-await/async-matches-expr.rs @@ -1,5 +1,5 @@ -// build-pass (FIXME(62277): could be check-pass?) -// edition:2018 +//@ build-pass (FIXME(62277): could be check-pass?) +//@ edition:2018 macro_rules! match_expr { ($x:expr) => {} diff --git a/tests/ui/async-await/async-trait-fn.rs b/tests/ui/async-await/async-trait-fn.rs index 4e5e3ba83e4..47b3b8526cf 100644 --- a/tests/ui/async-await/async-trait-fn.rs +++ b/tests/ui/async-await/async-trait-fn.rs @@ -1,5 +1,5 @@ -// edition:2018 -// check-pass +//@ edition:2018 +//@ check-pass trait T { async fn foo() {} diff --git a/tests/ui/async-await/async-unsafe-fn-call-in-safe.rs b/tests/ui/async-await/async-unsafe-fn-call-in-safe.rs index 7695853000d..81d774c10df 100644 --- a/tests/ui/async-await/async-unsafe-fn-call-in-safe.rs +++ b/tests/ui/async-await/async-unsafe-fn-call-in-safe.rs @@ -1,4 +1,4 @@ -// edition:2018 +//@ edition:2018 struct S; diff --git a/tests/ui/async-await/async-with-closure.rs b/tests/ui/async-await/async-with-closure.rs index 0b225526675..75b98b2ce03 100644 --- a/tests/ui/async-await/async-with-closure.rs +++ b/tests/ui/async-await/async-with-closure.rs @@ -1,5 +1,5 @@ -// build-pass (FIXME(62277): could be check-pass?) -// edition:2018 +//@ build-pass (FIXME(62277): could be check-pass?) +//@ edition:2018 trait MyClosure { type Args; diff --git a/tests/ui/async-await/auxiliary/arc_wake.rs b/tests/ui/async-await/auxiliary/arc_wake.rs index c21886f26f4..cdb7a4daf57 100644 --- a/tests/ui/async-await/auxiliary/arc_wake.rs +++ b/tests/ui/async-await/auxiliary/arc_wake.rs @@ -1,4 +1,4 @@ -// edition:2018 +//@ edition:2018 use std::sync::Arc; use std::task::{ diff --git a/tests/ui/async-await/auxiliary/issue-107036.rs b/tests/ui/async-await/auxiliary/issue-107036.rs index c3f6141b284..5d11dd23218 100644 --- a/tests/ui/async-await/auxiliary/issue-107036.rs +++ b/tests/ui/async-await/auxiliary/issue-107036.rs @@ -1,4 +1,4 @@ -// edition:2021 +//@ edition:2021 pub trait T {} impl T for () {} diff --git a/tests/ui/async-await/auxiliary/issue-72470-lib.rs b/tests/ui/async-await/auxiliary/issue-72470-lib.rs index 8383eba8912..5e5ddc4f594 100644 --- a/tests/ui/async-await/auxiliary/issue-72470-lib.rs +++ b/tests/ui/async-await/auxiliary/issue-72470-lib.rs @@ -1,5 +1,5 @@ -// compile-flags: -C opt-level=3 -// edition:2018 +//@ compile-flags: -C opt-level=3 +//@ edition:2018 use std::future::Future; use std::marker::PhantomData; diff --git a/tests/ui/async-await/await-into-future.rs b/tests/ui/async-await/await-into-future.rs index 8bf1385b3c5..e694c5ffc05 100644 --- a/tests/ui/async-await/await-into-future.rs +++ b/tests/ui/async-await/await-into-future.rs @@ -1,6 +1,6 @@ -// run-pass -// aux-build: issue-72470-lib.rs -// edition:2021 +//@ run-pass +//@ aux-build: issue-72470-lib.rs +//@ edition:2021 extern crate issue_72470_lib; use std::{future::{Future, IntoFuture}, pin::Pin}; diff --git a/tests/ui/async-await/await-keyword/2015-edition-warning.fixed b/tests/ui/async-await/await-keyword/2015-edition-warning.fixed index 117495e130f..4cb8017c7ee 100644 --- a/tests/ui/async-await/await-keyword/2015-edition-warning.fixed +++ b/tests/ui/async-await/await-keyword/2015-edition-warning.fixed @@ -1,4 +1,4 @@ -// run-rustfix +//@ run-rustfix #![allow(non_camel_case_types)] #![deny(keyword_idents)] diff --git a/tests/ui/async-await/await-keyword/2015-edition-warning.rs b/tests/ui/async-await/await-keyword/2015-edition-warning.rs index b3c64895c6d..d591a5af821 100644 --- a/tests/ui/async-await/await-keyword/2015-edition-warning.rs +++ b/tests/ui/async-await/await-keyword/2015-edition-warning.rs @@ -1,4 +1,4 @@ -// run-rustfix +//@ run-rustfix #![allow(non_camel_case_types)] #![deny(keyword_idents)] diff --git a/tests/ui/async-await/await-keyword/2018-edition-error-in-non-macro-position.rs b/tests/ui/async-await/await-keyword/2018-edition-error-in-non-macro-position.rs index 9e78f7c5120..519a1dc220a 100644 --- a/tests/ui/async-await/await-keyword/2018-edition-error-in-non-macro-position.rs +++ b/tests/ui/async-await/await-keyword/2018-edition-error-in-non-macro-position.rs @@ -1,4 +1,4 @@ -// edition:2018 +//@ edition:2018 #![allow(non_camel_case_types)] diff --git a/tests/ui/async-await/await-keyword/2018-edition-error.rs b/tests/ui/async-await/await-keyword/2018-edition-error.rs index 7ce52259aca..f4747ec9b8a 100644 --- a/tests/ui/async-await/await-keyword/2018-edition-error.rs +++ b/tests/ui/async-await/await-keyword/2018-edition-error.rs @@ -1,4 +1,4 @@ -// edition:2018 +//@ edition:2018 #![allow(non_camel_case_types)] mod outer_mod { diff --git a/tests/ui/async-await/await-keyword/incorrect-syntax-suggestions.rs b/tests/ui/async-await/await-keyword/incorrect-syntax-suggestions.rs index ab675d0a1a6..adfc26826c9 100644 --- a/tests/ui/async-await/await-keyword/incorrect-syntax-suggestions.rs +++ b/tests/ui/async-await/await-keyword/incorrect-syntax-suggestions.rs @@ -1,4 +1,4 @@ -// edition:2018 +//@ edition:2018 async fn bar() -> Result<(), ()> { Ok(()) diff --git a/tests/ui/async-await/await-keyword/post_expansion_error.rs b/tests/ui/async-await/await-keyword/post_expansion_error.rs index b4c899b0d02..58c85761cbc 100644 --- a/tests/ui/async-await/await-keyword/post_expansion_error.rs +++ b/tests/ui/async-await/await-keyword/post_expansion_error.rs @@ -1,4 +1,4 @@ -// edition:2018 +//@ edition:2018 macro_rules! r#await { () => { println!("Hello, world!") } diff --git a/tests/ui/async-await/await-sequence.rs b/tests/ui/async-await/await-sequence.rs index 79f68dd606c..43c2e571eab 100644 --- a/tests/ui/async-await/await-sequence.rs +++ b/tests/ui/async-await/await-sequence.rs @@ -1,5 +1,5 @@ -// edition:2021 -// build-pass +//@ edition:2021 +//@ build-pass use std::collections::HashMap; diff --git a/tests/ui/async-await/await-unsize.rs b/tests/ui/async-await/await-unsize.rs index aa09d4bdf08..95ac3abdc3a 100644 --- a/tests/ui/async-await/await-unsize.rs +++ b/tests/ui/async-await/await-unsize.rs @@ -1,7 +1,7 @@ // Regression test for #62312 -// check-pass -// edition:2018 +//@ check-pass +//@ edition:2018 async fn make_boxed_object() -> Box { Box::new(()) as _ diff --git a/tests/ui/async-await/awaiting-unsized-param.rs b/tests/ui/async-await/awaiting-unsized-param.rs index e8b18bf37f8..45611eae41f 100644 --- a/tests/ui/async-await/awaiting-unsized-param.rs +++ b/tests/ui/async-await/awaiting-unsized-param.rs @@ -1,4 +1,4 @@ -// edition: 2021 +//@ edition: 2021 #![feature(unsized_fn_params, unsized_locals)] //~^ WARN the feature `unsized_locals` is incomplete diff --git a/tests/ui/async-await/bound-normalization.rs b/tests/ui/async-await/bound-normalization.rs index 5d260682f1d..563e28d34cf 100644 --- a/tests/ui/async-await/bound-normalization.rs +++ b/tests/ui/async-await/bound-normalization.rs @@ -1,5 +1,5 @@ -// check-pass -// edition:2018 +//@ check-pass +//@ edition:2018 // See issue 60414 diff --git a/tests/ui/async-await/clone-suggestion.fixed b/tests/ui/async-await/clone-suggestion.fixed index 3514cd63df1..3a0abc84263 100644 --- a/tests/ui/async-await/clone-suggestion.fixed +++ b/tests/ui/async-await/clone-suggestion.fixed @@ -1,5 +1,5 @@ -// edition: 2021 -// run-rustfix +//@ edition: 2021 +//@ run-rustfix #![allow(unused)] diff --git a/tests/ui/async-await/clone-suggestion.rs b/tests/ui/async-await/clone-suggestion.rs index 5a4f70cbf44..cde4222ffe3 100644 --- a/tests/ui/async-await/clone-suggestion.rs +++ b/tests/ui/async-await/clone-suggestion.rs @@ -1,5 +1,5 @@ -// edition: 2021 -// run-rustfix +//@ edition: 2021 +//@ run-rustfix #![allow(unused)] diff --git a/tests/ui/async-await/conditional-and-guaranteed-initialization.rs b/tests/ui/async-await/conditional-and-guaranteed-initialization.rs index 56f4cbbd190..eecb414716c 100644 --- a/tests/ui/async-await/conditional-and-guaranteed-initialization.rs +++ b/tests/ui/async-await/conditional-and-guaranteed-initialization.rs @@ -1,6 +1,6 @@ -// check-pass -// edition:2018 -// compile-flags: --crate-type lib +//@ check-pass +//@ edition:2018 +//@ compile-flags: --crate-type lib async fn conditional_and_guaranteed_initialization(x: usize) -> usize { let y; diff --git a/tests/ui/async-await/const-async-fn-in-main.rs b/tests/ui/async-await/const-async-fn-in-main.rs index 5d1aa4d83f3..1a868c72d24 100644 --- a/tests/ui/async-await/const-async-fn-in-main.rs +++ b/tests/ui/async-await/const-async-fn-in-main.rs @@ -1,4 +1,4 @@ -// edition:2021 +//@ edition:2021 // Check what happens when a const async fn is in the main function (#102796) fn main() { diff --git a/tests/ui/async-await/coroutine-desc.rs b/tests/ui/async-await/coroutine-desc.rs index 50081201667..9a61c9719db 100644 --- a/tests/ui/async-await/coroutine-desc.rs +++ b/tests/ui/async-await/coroutine-desc.rs @@ -1,4 +1,4 @@ -// edition:2018 +//@ edition:2018 #![feature(async_closure)] use std::future::Future; diff --git a/tests/ui/async-await/coroutine-not-future.rs b/tests/ui/async-await/coroutine-not-future.rs index b18635fea39..2993f58378a 100644 --- a/tests/ui/async-await/coroutine-not-future.rs +++ b/tests/ui/async-await/coroutine-not-future.rs @@ -1,4 +1,4 @@ -// edition:2018 +//@ edition:2018 #![feature(coroutines, coroutine_trait)] use std::future::Future; diff --git a/tests/ui/async-await/debug-ice-attempted-to-add-with-overflow.rs b/tests/ui/async-await/debug-ice-attempted-to-add-with-overflow.rs index ced4434a7a7..3b16e078d93 100644 --- a/tests/ui/async-await/debug-ice-attempted-to-add-with-overflow.rs +++ b/tests/ui/async-await/debug-ice-attempted-to-add-with-overflow.rs @@ -1,5 +1,5 @@ -// check-fail -// edition:2021 +//@ check-fail +//@ edition:2021 // test for issue-114912 - debug ice: attempted to add with overflow diff --git a/tests/ui/async-await/deep-futures-are-freeze.rs b/tests/ui/async-await/deep-futures-are-freeze.rs index dd676d5e18c..c4300163db1 100644 --- a/tests/ui/async-await/deep-futures-are-freeze.rs +++ b/tests/ui/async-await/deep-futures-are-freeze.rs @@ -1,7 +1,7 @@ -// build-pass -// compile-flags: -Copt-level=s -Clto=fat -// no-prefer-dynamic -// edition: 2021 +//@ build-pass +//@ compile-flags: -Copt-level=s -Clto=fat +//@ no-prefer-dynamic +//@ edition: 2021 #![recursion_limit = "256"] diff --git a/tests/ui/async-await/default-struct-update.rs b/tests/ui/async-await/default-struct-update.rs index f4757e7cbae..8011404ed11 100644 --- a/tests/ui/async-await/default-struct-update.rs +++ b/tests/ui/async-await/default-struct-update.rs @@ -1,5 +1,5 @@ -// build-pass -// edition:2018 +//@ build-pass +//@ edition:2018 fn main() { let _ = foo(); diff --git a/tests/ui/async-await/dont-print-desugared-async.rs b/tests/ui/async-await/dont-print-desugared-async.rs index 68341a24c4e..4a87688efff 100644 --- a/tests/ui/async-await/dont-print-desugared-async.rs +++ b/tests/ui/async-await/dont-print-desugared-async.rs @@ -1,6 +1,6 @@ // Test that we don't show variables with from async fn desugaring -// edition:2018 +//@ edition:2018 async fn async_fn(&ref mut s: &[i32]) {} //~^ ERROR cannot borrow data in a `&` reference as mutable [E0596] diff --git a/tests/ui/async-await/dont-suggest-await-on-method-return-mismatch.rs b/tests/ui/async-await/dont-suggest-await-on-method-return-mismatch.rs index f2f87a90817..237410e0749 100644 --- a/tests/ui/async-await/dont-suggest-await-on-method-return-mismatch.rs +++ b/tests/ui/async-await/dont-suggest-await-on-method-return-mismatch.rs @@ -1,4 +1,4 @@ -// edition:2021 +//@ edition:2021 // Test that we do not suggest `.await` when it doesn't make sense. diff --git a/tests/ui/async-await/dont-suggest-missing-await.rs b/tests/ui/async-await/dont-suggest-missing-await.rs index a8e5b38ec1d..20e71b623a1 100644 --- a/tests/ui/async-await/dont-suggest-missing-await.rs +++ b/tests/ui/async-await/dont-suggest-missing-await.rs @@ -1,4 +1,4 @@ -// edition:2018 +//@ edition:2018 // This test ensures we don't make the suggestion in bodies that aren't `async`. diff --git a/tests/ui/async-await/drop-and-assign.rs b/tests/ui/async-await/drop-and-assign.rs index ef39033a9d4..ed8f0599958 100644 --- a/tests/ui/async-await/drop-and-assign.rs +++ b/tests/ui/async-await/drop-and-assign.rs @@ -1,5 +1,5 @@ -// edition:2021 -// build-pass +//@ edition:2021 +//@ build-pass struct A; impl Drop for A { fn drop(&mut self) {} } diff --git a/tests/ui/async-await/drop-order/auxiliary/arc_wake.rs b/tests/ui/async-await/drop-order/auxiliary/arc_wake.rs index c21886f26f4..cdb7a4daf57 100644 --- a/tests/ui/async-await/drop-order/auxiliary/arc_wake.rs +++ b/tests/ui/async-await/drop-order/auxiliary/arc_wake.rs @@ -1,4 +1,4 @@ -// edition:2018 +//@ edition:2018 use std::sync::Arc; use std::task::{ diff --git a/tests/ui/async-await/drop-order/drop-order-for-async-fn-parameters-by-ref-binding.rs b/tests/ui/async-await/drop-order/drop-order-for-async-fn-parameters-by-ref-binding.rs index 9817d377a78..ee155bd4105 100644 --- a/tests/ui/async-await/drop-order/drop-order-for-async-fn-parameters-by-ref-binding.rs +++ b/tests/ui/async-await/drop-order/drop-order-for-async-fn-parameters-by-ref-binding.rs @@ -1,6 +1,6 @@ -// aux-build:arc_wake.rs -// edition:2018 -// run-pass +//@ aux-build:arc_wake.rs +//@ edition:2018 +//@ run-pass #![allow(unused_variables)] diff --git a/tests/ui/async-await/drop-order/drop-order-for-async-fn-parameters.rs b/tests/ui/async-await/drop-order/drop-order-for-async-fn-parameters.rs index 6c10ead3690..6767e4baee8 100644 --- a/tests/ui/async-await/drop-order/drop-order-for-async-fn-parameters.rs +++ b/tests/ui/async-await/drop-order/drop-order-for-async-fn-parameters.rs @@ -1,9 +1,9 @@ -// aux-build:arc_wake.rs -// edition:2018 -// run-pass +//@ aux-build:arc_wake.rs +//@ edition:2018 +//@ run-pass -// revisions: default nomiropt -//[nomiropt]compile-flags: -Z mir-opt-level=0 +//@ revisions: default nomiropt +//@[nomiropt]compile-flags: -Z mir-opt-level=0 #![allow(unused_variables)] diff --git a/tests/ui/async-await/drop-order/drop-order-for-locals-when-cancelled.rs b/tests/ui/async-await/drop-order/drop-order-for-locals-when-cancelled.rs index 15cc9fbc81f..8b2131d07f7 100644 --- a/tests/ui/async-await/drop-order/drop-order-for-locals-when-cancelled.rs +++ b/tests/ui/async-await/drop-order/drop-order-for-locals-when-cancelled.rs @@ -1,6 +1,6 @@ -// aux-build:arc_wake.rs -// edition:2018 -// run-pass +//@ aux-build:arc_wake.rs +//@ edition:2018 +//@ run-pass #![deny(dead_code)] #![allow(unused_variables)] diff --git a/tests/ui/async-await/drop-order/drop-order-for-temporary-in-tail-return-expr.rs b/tests/ui/async-await/drop-order/drop-order-for-temporary-in-tail-return-expr.rs index edfecb91036..8174f50cdce 100644 --- a/tests/ui/async-await/drop-order/drop-order-for-temporary-in-tail-return-expr.rs +++ b/tests/ui/async-await/drop-order/drop-order-for-temporary-in-tail-return-expr.rs @@ -1,9 +1,9 @@ -// aux-build:arc_wake.rs -// edition:2018 -// run-pass +//@ aux-build:arc_wake.rs +//@ edition:2018 +//@ run-pass -// revisions: default nomiropt -//[nomiropt]compile-flags: -Z mir-opt-level=0 +//@ revisions: default nomiropt +//@[nomiropt]compile-flags: -Z mir-opt-level=0 #![allow(unused_variables)] diff --git a/tests/ui/async-await/drop-order/drop-order-locals-are-hidden.rs b/tests/ui/async-await/drop-order/drop-order-locals-are-hidden.rs index 79dedb1ba28..d4897a1caf3 100644 --- a/tests/ui/async-await/drop-order/drop-order-locals-are-hidden.rs +++ b/tests/ui/async-await/drop-order/drop-order-locals-are-hidden.rs @@ -1,4 +1,4 @@ -// edition:2018 +//@ edition:2018 async fn foobar_async(x: u32, (a, _, _c): (u32, u32, u32), _: u32, _y: u32) { assert_eq!(__arg1, (1, 2, 3)); //~ ERROR cannot find value `__arg1` in this scope [E0425] diff --git a/tests/ui/async-await/drop-order/drop-order-when-cancelled.rs b/tests/ui/async-await/drop-order/drop-order-when-cancelled.rs index cfd68bc0d23..f8afa38a0fd 100644 --- a/tests/ui/async-await/drop-order/drop-order-when-cancelled.rs +++ b/tests/ui/async-await/drop-order/drop-order-when-cancelled.rs @@ -1,9 +1,9 @@ -// aux-build:arc_wake.rs -// edition:2018 -// run-pass +//@ aux-build:arc_wake.rs +//@ edition:2018 +//@ run-pass -// revisions: default nomiropt -//[nomiropt]compile-flags: -Z mir-opt-level=0 +//@ revisions: default nomiropt +//@[nomiropt]compile-flags: -Z mir-opt-level=0 // Test that the drop order for parameters in a fn and async fn matches up. Also test that // parameters (used or unused) are not dropped until the async fn is cancelled. diff --git a/tests/ui/async-await/drop-track-bad-field-in-fru.rs b/tests/ui/async-await/drop-track-bad-field-in-fru.rs index 667b288e676..465e1d94f39 100644 --- a/tests/ui/async-await/drop-track-bad-field-in-fru.rs +++ b/tests/ui/async-await/drop-track-bad-field-in-fru.rs @@ -1,4 +1,4 @@ -// edition: 2021 +//@ edition: 2021 fn main() {} diff --git a/tests/ui/async-await/drop-track-field-assign-nonsend.rs b/tests/ui/async-await/drop-track-field-assign-nonsend.rs index 19315ef19f9..7002836ee47 100644 --- a/tests/ui/async-await/drop-track-field-assign-nonsend.rs +++ b/tests/ui/async-await/drop-track-field-assign-nonsend.rs @@ -1,5 +1,5 @@ // Derived from an ICE found in tokio-xmpp during a crater run. -// edition:2021 +//@ edition:2021 #![allow(dead_code)] diff --git a/tests/ui/async-await/drop-track-field-assign.rs b/tests/ui/async-await/drop-track-field-assign.rs index 4887eff7efa..491f80d062b 100644 --- a/tests/ui/async-await/drop-track-field-assign.rs +++ b/tests/ui/async-await/drop-track-field-assign.rs @@ -1,6 +1,6 @@ // Derived from an ICE found in tokio-xmpp during a crater run. -// edition:2021 -// build-pass +//@ edition:2021 +//@ build-pass #![allow(dead_code)] diff --git a/tests/ui/async-await/drop-tracking-unresolved-typeck-results.rs b/tests/ui/async-await/drop-tracking-unresolved-typeck-results.rs index 9f80b9c6e9f..e6c295405e2 100644 --- a/tests/ui/async-await/drop-tracking-unresolved-typeck-results.rs +++ b/tests/ui/async-await/drop-tracking-unresolved-typeck-results.rs @@ -1,5 +1,5 @@ -// incremental -// edition: 2021 +//@ incremental +//@ edition: 2021 use std::future::*; use std::marker::PhantomData; diff --git a/tests/ui/async-await/edition-deny-async-fns-2015.rs b/tests/ui/async-await/edition-deny-async-fns-2015.rs index 9059f99ba66..c9b7bb1be32 100644 --- a/tests/ui/async-await/edition-deny-async-fns-2015.rs +++ b/tests/ui/async-await/edition-deny-async-fns-2015.rs @@ -1,4 +1,4 @@ -// edition:2015 +//@ edition:2015 async fn foo() {} //~ ERROR `async fn` is not permitted in Rust 2015 diff --git a/tests/ui/async-await/expansion-in-attrs.rs b/tests/ui/async-await/expansion-in-attrs.rs index af77c3463b5..040c8d9834b 100644 --- a/tests/ui/async-await/expansion-in-attrs.rs +++ b/tests/ui/async-await/expansion-in-attrs.rs @@ -1,5 +1,5 @@ -// check-pass -// edition:2018 +//@ check-pass +//@ edition:2018 macro_rules! with_doc { ($doc: expr) => { diff --git a/tests/ui/async-await/feature-async-closure.rs b/tests/ui/async-await/feature-async-closure.rs index d07116b13a2..15108aa5a33 100644 --- a/tests/ui/async-await/feature-async-closure.rs +++ b/tests/ui/async-await/feature-async-closure.rs @@ -1,4 +1,4 @@ -// edition:2018 +//@ edition:2018 // gate-test-async_closure fn f() { diff --git a/tests/ui/async-await/feature-async-for-loop.rs b/tests/ui/async-await/feature-async-for-loop.rs index 42247dd14b0..67817cbfa5f 100644 --- a/tests/ui/async-await/feature-async-for-loop.rs +++ b/tests/ui/async-await/feature-async-for-loop.rs @@ -1,4 +1,4 @@ -// edition:2021 +//@ edition:2021 // gate-test-async_for_loop #![feature(async_iter_from_iter, async_iterator)] diff --git a/tests/ui/async-await/feature-self-return-type.rs b/tests/ui/async-await/feature-self-return-type.rs index ae6f766d247..f3a9239be2b 100644 --- a/tests/ui/async-await/feature-self-return-type.rs +++ b/tests/ui/async-await/feature-self-return-type.rs @@ -1,4 +1,4 @@ -// edition:2018 +//@ edition:2018 // This test checks that we emit the correct borrowck error when `Self` is used as a return type. // See #61949 for context. diff --git a/tests/ui/async-await/field-assign-nonsend.rs b/tests/ui/async-await/field-assign-nonsend.rs index 19315ef19f9..7002836ee47 100644 --- a/tests/ui/async-await/field-assign-nonsend.rs +++ b/tests/ui/async-await/field-assign-nonsend.rs @@ -1,5 +1,5 @@ // Derived from an ICE found in tokio-xmpp during a crater run. -// edition:2021 +//@ edition:2021 #![allow(dead_code)] diff --git a/tests/ui/async-await/field-assign.rs b/tests/ui/async-await/field-assign.rs index 4887eff7efa..491f80d062b 100644 --- a/tests/ui/async-await/field-assign.rs +++ b/tests/ui/async-await/field-assign.rs @@ -1,6 +1,6 @@ // Derived from an ICE found in tokio-xmpp during a crater run. -// edition:2021 -// build-pass +//@ edition:2021 +//@ build-pass #![allow(dead_code)] diff --git a/tests/ui/async-await/for-await-2015.rs b/tests/ui/async-await/for-await-2015.rs index c1b7c016d1f..89ff256da1d 100644 --- a/tests/ui/async-await/for-await-2015.rs +++ b/tests/ui/async-await/for-await-2015.rs @@ -1,4 +1,4 @@ -// check-pass +//@ check-pass #![feature(async_for_loop)] diff --git a/tests/ui/async-await/for-await-consumes-iter.rs b/tests/ui/async-await/for-await-consumes-iter.rs index 65bb9e88448..38dfe46c814 100644 --- a/tests/ui/async-await/for-await-consumes-iter.rs +++ b/tests/ui/async-await/for-await-consumes-iter.rs @@ -1,4 +1,4 @@ -// edition: 2021 +//@ edition: 2021 #![feature(async_iterator, async_iter_from_iter, const_waker, async_for_loop, noop_waker)] use std::future::Future; diff --git a/tests/ui/async-await/for-await-passthrough.rs b/tests/ui/async-await/for-await-passthrough.rs index b1a382958a1..3769ef60b01 100644 --- a/tests/ui/async-await/for-await-passthrough.rs +++ b/tests/ui/async-await/for-await-passthrough.rs @@ -1,6 +1,6 @@ -// run-pass -// edition: 2024 -// compile-flags: -Zunstable-options +//@ run-pass +//@ edition: 2024 +//@ compile-flags: -Zunstable-options #![feature(async_iterator, async_iter_from_iter, const_waker, async_for_loop, noop_waker, gen_blocks)] diff --git a/tests/ui/async-await/for-await.rs b/tests/ui/async-await/for-await.rs index 00dbdfb2389..acd9f01640a 100644 --- a/tests/ui/async-await/for-await.rs +++ b/tests/ui/async-await/for-await.rs @@ -1,5 +1,5 @@ -// run-pass -// edition: 2021 +//@ run-pass +//@ edition: 2021 #![feature(async_iterator, async_iter_from_iter, const_waker, async_for_loop, noop_waker)] use std::future::Future; diff --git a/tests/ui/async-await/future-contains-err-issue-115188.rs b/tests/ui/async-await/future-contains-err-issue-115188.rs index bf643c92671..686d955ac7c 100644 --- a/tests/ui/async-await/future-contains-err-issue-115188.rs +++ b/tests/ui/async-await/future-contains-err-issue-115188.rs @@ -1,4 +1,4 @@ -// edition: 2021 +//@ edition: 2021 // Makes sure we don't spew a bunch of unrelated opaque errors when the reason // for this error is just a missing struct field in `foo`. diff --git a/tests/ui/async-await/future-sizes/async-awaiting-fut.rs b/tests/ui/async-await/future-sizes/async-awaiting-fut.rs index 1816d842d6c..a3f0bdc8514 100644 --- a/tests/ui/async-await/future-sizes/async-awaiting-fut.rs +++ b/tests/ui/async-await/future-sizes/async-awaiting-fut.rs @@ -1,7 +1,7 @@ -// compile-flags: -Z print-type-sizes --crate-type lib -// edition:2021 -// build-pass -// ignore-pass +//@ compile-flags: -Z print-type-sizes --crate-type lib +//@ edition:2021 +//@ build-pass +//@ ignore-pass async fn wait() {} diff --git a/tests/ui/async-await/future-sizes/future-as-arg.rs b/tests/ui/async-await/future-sizes/future-as-arg.rs index 93c69b05254..317c17b9b3e 100644 --- a/tests/ui/async-await/future-sizes/future-as-arg.rs +++ b/tests/ui/async-await/future-sizes/future-as-arg.rs @@ -1,5 +1,5 @@ -// edition: 2021 -// run-pass +//@ edition: 2021 +//@ run-pass async fn test(_arg: [u8; 16]) {} diff --git a/tests/ui/async-await/future-sizes/large-arg.rs b/tests/ui/async-await/future-sizes/large-arg.rs index 7e7ff9d8d00..5fbae22a771 100644 --- a/tests/ui/async-await/future-sizes/large-arg.rs +++ b/tests/ui/async-await/future-sizes/large-arg.rs @@ -1,7 +1,7 @@ -// compile-flags: -Z print-type-sizes --crate-type=lib -// edition: 2021 -// build-pass -// ignore-pass +//@ compile-flags: -Z print-type-sizes --crate-type=lib +//@ edition: 2021 +//@ build-pass +//@ ignore-pass pub async fn test() { let _ = a([0u8; 1024]).await; diff --git a/tests/ui/async-await/futures-api.rs b/tests/ui/async-await/futures-api.rs index a7da058de30..66d2bf1204b 100644 --- a/tests/ui/async-await/futures-api.rs +++ b/tests/ui/async-await/futures-api.rs @@ -1,6 +1,6 @@ -// run-pass +//@ run-pass -// aux-build:arc_wake.rs +//@ aux-build:arc_wake.rs extern crate arc_wake; diff --git a/tests/ui/async-await/generics-and-bounds.rs b/tests/ui/async-await/generics-and-bounds.rs index 963b19b34a6..98ae2831843 100644 --- a/tests/ui/async-await/generics-and-bounds.rs +++ b/tests/ui/async-await/generics-and-bounds.rs @@ -1,6 +1,6 @@ -// build-pass (FIXME(62277): could be check-pass?) -// edition:2018 -// compile-flags: --crate-type lib +//@ build-pass (FIXME(62277): could be check-pass?) +//@ edition:2018 +//@ compile-flags: --crate-type lib use std::future::Future; diff --git a/tests/ui/async-await/in-trait/async-associated-types.rs b/tests/ui/async-await/in-trait/async-associated-types.rs index 8d89500477b..1f29c19de20 100644 --- a/tests/ui/async-await/in-trait/async-associated-types.rs +++ b/tests/ui/async-await/in-trait/async-associated-types.rs @@ -1,5 +1,5 @@ -// check-pass -// edition: 2021 +//@ check-pass +//@ edition: 2021 use std::fmt::Debug; diff --git a/tests/ui/async-await/in-trait/async-default-fn-overridden.rs b/tests/ui/async-await/in-trait/async-default-fn-overridden.rs index 8c01f1bddef..9b0ce8663c2 100644 --- a/tests/ui/async-await/in-trait/async-default-fn-overridden.rs +++ b/tests/ui/async-await/in-trait/async-default-fn-overridden.rs @@ -1,5 +1,5 @@ -// run-pass -// edition:2021 +//@ run-pass +//@ edition:2021 #![feature(noop_waker)] diff --git a/tests/ui/async-await/in-trait/async-example-desugared-boxed-in-trait.rs b/tests/ui/async-await/in-trait/async-example-desugared-boxed-in-trait.rs index c26f6625f00..8d3dbaf6ca1 100644 --- a/tests/ui/async-await/in-trait/async-example-desugared-boxed-in-trait.rs +++ b/tests/ui/async-await/in-trait/async-example-desugared-boxed-in-trait.rs @@ -1,4 +1,4 @@ -// edition: 2021 +//@ edition: 2021 use std::future::Future; use std::pin::Pin; diff --git a/tests/ui/async-await/in-trait/async-example-desugared-boxed.rs b/tests/ui/async-await/in-trait/async-example-desugared-boxed.rs index 69871d0dca0..1b1c858f916 100644 --- a/tests/ui/async-await/in-trait/async-example-desugared-boxed.rs +++ b/tests/ui/async-await/in-trait/async-example-desugared-boxed.rs @@ -1,5 +1,5 @@ -// edition: 2021 -// check-pass +//@ edition: 2021 +//@ check-pass use std::future::Future; use std::pin::Pin; diff --git a/tests/ui/async-await/in-trait/async-example-desugared-extra.rs b/tests/ui/async-await/in-trait/async-example-desugared-extra.rs index ce93bd62608..b4fbcb78c13 100644 --- a/tests/ui/async-await/in-trait/async-example-desugared-extra.rs +++ b/tests/ui/async-await/in-trait/async-example-desugared-extra.rs @@ -1,5 +1,5 @@ -// check-pass -// edition: 2021 +//@ check-pass +//@ edition: 2021 #![feature(lint_reasons)] diff --git a/tests/ui/async-await/in-trait/async-example-desugared-in-trait.rs b/tests/ui/async-await/in-trait/async-example-desugared-in-trait.rs index f7a351efff5..e6c8ccf53ef 100644 --- a/tests/ui/async-await/in-trait/async-example-desugared-in-trait.rs +++ b/tests/ui/async-await/in-trait/async-example-desugared-in-trait.rs @@ -1,5 +1,5 @@ -// check-pass -// edition: 2021 +//@ check-pass +//@ edition: 2021 use std::future::Future; diff --git a/tests/ui/async-await/in-trait/async-example-desugared-manual.rs b/tests/ui/async-await/in-trait/async-example-desugared-manual.rs index c6e8f1ae906..1d9a7640f54 100644 --- a/tests/ui/async-await/in-trait/async-example-desugared-manual.rs +++ b/tests/ui/async-await/in-trait/async-example-desugared-manual.rs @@ -1,5 +1,5 @@ -// edition: 2021 -// check-pass +//@ edition: 2021 +//@ check-pass use std::future::Future; use std::task::Poll; diff --git a/tests/ui/async-await/in-trait/async-example-desugared.rs b/tests/ui/async-await/in-trait/async-example-desugared.rs index 78904d87abc..149a880ad75 100644 --- a/tests/ui/async-await/in-trait/async-example-desugared.rs +++ b/tests/ui/async-await/in-trait/async-example-desugared.rs @@ -1,5 +1,5 @@ -// check-pass -// edition: 2021 +//@ check-pass +//@ edition: 2021 use std::future::Future; diff --git a/tests/ui/async-await/in-trait/async-example.rs b/tests/ui/async-await/in-trait/async-example.rs index a32f979df6b..6cdf0e96edf 100644 --- a/tests/ui/async-await/in-trait/async-example.rs +++ b/tests/ui/async-await/in-trait/async-example.rs @@ -1,5 +1,5 @@ -// check-pass -// edition: 2021 +//@ check-pass +//@ edition: 2021 trait MyTrait { #[allow(async_fn_in_trait)] diff --git a/tests/ui/async-await/in-trait/async-generics-and-bounds.rs b/tests/ui/async-await/in-trait/async-generics-and-bounds.rs index 8dc0574c757..aede820f6fd 100644 --- a/tests/ui/async-await/in-trait/async-generics-and-bounds.rs +++ b/tests/ui/async-await/in-trait/async-generics-and-bounds.rs @@ -1,6 +1,6 @@ -// check-fail -// known-bug: #102682 -// edition: 2021 +//@ check-fail +//@ known-bug: #102682 +//@ edition: 2021 use std::fmt::Debug; use std::hash::Hash; diff --git a/tests/ui/async-await/in-trait/async-generics.rs b/tests/ui/async-await/in-trait/async-generics.rs index 6004916a4e5..eedc63fa24c 100644 --- a/tests/ui/async-await/in-trait/async-generics.rs +++ b/tests/ui/async-await/in-trait/async-generics.rs @@ -1,6 +1,6 @@ -// check-fail -// known-bug: #102682 -// edition: 2021 +//@ check-fail +//@ known-bug: #102682 +//@ edition: 2021 trait MyTrait { async fn foo(&self) -> &(T, U); diff --git a/tests/ui/async-await/in-trait/async-lifetimes-and-bounds.rs b/tests/ui/async-await/in-trait/async-lifetimes-and-bounds.rs index 3721b01350d..81f70afa2a7 100644 --- a/tests/ui/async-await/in-trait/async-lifetimes-and-bounds.rs +++ b/tests/ui/async-await/in-trait/async-lifetimes-and-bounds.rs @@ -1,5 +1,5 @@ -// check-pass -// edition: 2021 +//@ check-pass +//@ edition: 2021 use std::fmt::Debug; diff --git a/tests/ui/async-await/in-trait/async-lifetimes.rs b/tests/ui/async-await/in-trait/async-lifetimes.rs index cb4b871cbe1..d7894455322 100644 --- a/tests/ui/async-await/in-trait/async-lifetimes.rs +++ b/tests/ui/async-await/in-trait/async-lifetimes.rs @@ -1,5 +1,5 @@ -// check-pass -// edition: 2021 +//@ check-pass +//@ edition: 2021 trait MyTrait<'a, 'b, T> { #[allow(async_fn_in_trait)] diff --git a/tests/ui/async-await/in-trait/async-recursive-generic.rs b/tests/ui/async-await/in-trait/async-recursive-generic.rs index 33eb2b2de13..8f91a4b2f6a 100644 --- a/tests/ui/async-await/in-trait/async-recursive-generic.rs +++ b/tests/ui/async-await/in-trait/async-recursive-generic.rs @@ -1,4 +1,4 @@ -// edition: 2021 +//@ edition: 2021 trait MyTrait { async fn foo_recursive(&self, n: usize) -> T; diff --git a/tests/ui/async-await/in-trait/async-recursive.rs b/tests/ui/async-await/in-trait/async-recursive.rs index 2534c43413e..ab22e3f1dbf 100644 --- a/tests/ui/async-await/in-trait/async-recursive.rs +++ b/tests/ui/async-await/in-trait/async-recursive.rs @@ -1,4 +1,4 @@ -// edition: 2021 +//@ edition: 2021 trait MyTrait { async fn foo_recursive(&self, n: usize) -> i32; diff --git a/tests/ui/async-await/in-trait/auxiliary/bad-region.rs b/tests/ui/async-await/in-trait/auxiliary/bad-region.rs index 02dc25aaa16..2bfd9bb3730 100644 --- a/tests/ui/async-await/in-trait/auxiliary/bad-region.rs +++ b/tests/ui/async-await/in-trait/auxiliary/bad-region.rs @@ -1,4 +1,4 @@ -// edition:2021 +//@ edition:2021 #[allow(async_fn_in_trait)] diff --git a/tests/ui/async-await/in-trait/auxiliary/foreign-async-fn.rs b/tests/ui/async-await/in-trait/auxiliary/foreign-async-fn.rs index 57c9b3ae8b3..ed5789d17a2 100644 --- a/tests/ui/async-await/in-trait/auxiliary/foreign-async-fn.rs +++ b/tests/ui/async-await/in-trait/auxiliary/foreign-async-fn.rs @@ -1,4 +1,4 @@ -// edition:2021 +//@ edition:2021 pub trait Foo { async fn test(); diff --git a/tests/ui/async-await/in-trait/bad-region.rs b/tests/ui/async-await/in-trait/bad-region.rs index 444368e21a4..5d5d8783a32 100644 --- a/tests/ui/async-await/in-trait/bad-region.rs +++ b/tests/ui/async-await/in-trait/bad-region.rs @@ -1,5 +1,5 @@ -// aux-build:bad-region.rs -// edition:2021 +//@ aux-build:bad-region.rs +//@ edition:2021 #![allow(async_fn_in_trait)] diff --git a/tests/ui/async-await/in-trait/bad-signatures.rs b/tests/ui/async-await/in-trait/bad-signatures.rs index 5adede5b5cf..57a0ccb0d18 100644 --- a/tests/ui/async-await/in-trait/bad-signatures.rs +++ b/tests/ui/async-await/in-trait/bad-signatures.rs @@ -1,4 +1,4 @@ -// edition:2021 +//@ edition:2021 trait MyTrait { diff --git a/tests/ui/async-await/in-trait/coherence-constrained.rs b/tests/ui/async-await/in-trait/coherence-constrained.rs index 82c8724ca3e..a9823327cc0 100644 --- a/tests/ui/async-await/in-trait/coherence-constrained.rs +++ b/tests/ui/async-await/in-trait/coherence-constrained.rs @@ -1,4 +1,4 @@ -// edition: 2021 +//@ edition: 2021 trait Foo { type T; diff --git a/tests/ui/async-await/in-trait/dont-project-to-specializable-projection.rs b/tests/ui/async-await/in-trait/dont-project-to-specializable-projection.rs index e2fd9f9dfea..e0901dc6886 100644 --- a/tests/ui/async-await/in-trait/dont-project-to-specializable-projection.rs +++ b/tests/ui/async-await/in-trait/dont-project-to-specializable-projection.rs @@ -1,5 +1,5 @@ -// edition: 2021 -// known-bug: #108309 +//@ edition: 2021 +//@ known-bug: #108309 #![feature(min_specialization)] #![feature(noop_waker)] diff --git a/tests/ui/async-await/in-trait/early-bound-1.rs b/tests/ui/async-await/in-trait/early-bound-1.rs index ddcb477a1dc..fd1282908ab 100644 --- a/tests/ui/async-await/in-trait/early-bound-1.rs +++ b/tests/ui/async-await/in-trait/early-bound-1.rs @@ -1,5 +1,5 @@ -// check-pass -// edition:2021 +//@ check-pass +//@ edition:2021 pub trait Foo { #[allow(async_fn_in_trait)] diff --git a/tests/ui/async-await/in-trait/early-bound-2.rs b/tests/ui/async-await/in-trait/early-bound-2.rs index 3eba5bf757f..c25835c68dd 100644 --- a/tests/ui/async-await/in-trait/early-bound-2.rs +++ b/tests/ui/async-await/in-trait/early-bound-2.rs @@ -1,5 +1,5 @@ -// check-pass -// edition:2021 +//@ check-pass +//@ edition:2021 #![allow(incomplete_features)] diff --git a/tests/ui/async-await/in-trait/fn-not-async-err.rs b/tests/ui/async-await/in-trait/fn-not-async-err.rs index ecd5737cf3c..dab100b2e22 100644 --- a/tests/ui/async-await/in-trait/fn-not-async-err.rs +++ b/tests/ui/async-await/in-trait/fn-not-async-err.rs @@ -1,4 +1,4 @@ -// edition: 2021 +//@ edition: 2021 #![allow(incomplete_features)] diff --git a/tests/ui/async-await/in-trait/fn-not-async-err2.rs b/tests/ui/async-await/in-trait/fn-not-async-err2.rs index ed626edc4c4..983d650764e 100644 --- a/tests/ui/async-await/in-trait/fn-not-async-err2.rs +++ b/tests/ui/async-await/in-trait/fn-not-async-err2.rs @@ -1,5 +1,5 @@ -// edition: 2021 -// check-pass +//@ edition: 2021 +//@ check-pass #![allow(incomplete_features)] diff --git a/tests/ui/async-await/in-trait/generics-mismatch.rs b/tests/ui/async-await/in-trait/generics-mismatch.rs index 51fdc2fe8a8..1f7095ae72b 100644 --- a/tests/ui/async-await/in-trait/generics-mismatch.rs +++ b/tests/ui/async-await/in-trait/generics-mismatch.rs @@ -1,4 +1,4 @@ -// edition: 2021 +//@ edition: 2021 #![allow(incomplete_features)] diff --git a/tests/ui/async-await/in-trait/implied-bounds.rs b/tests/ui/async-await/in-trait/implied-bounds.rs index 0d8177c8e60..eda4cf5647f 100644 --- a/tests/ui/async-await/in-trait/implied-bounds.rs +++ b/tests/ui/async-await/in-trait/implied-bounds.rs @@ -1,5 +1,5 @@ -// check-pass -// edition: 2021 +//@ check-pass +//@ edition: 2021 #![allow(incomplete_features)] diff --git a/tests/ui/async-await/in-trait/indirect-recursion-issue-112047.rs b/tests/ui/async-await/in-trait/indirect-recursion-issue-112047.rs index 4b615343a05..aa8667a00ca 100644 --- a/tests/ui/async-await/in-trait/indirect-recursion-issue-112047.rs +++ b/tests/ui/async-await/in-trait/indirect-recursion-issue-112047.rs @@ -1,7 +1,7 @@ -// edition: 2021 +//@ edition: 2021 // Test doesn't fail until monomorphization time, unfortunately. -// build-fail +//@ build-fail fn main() { let _ = async { diff --git a/tests/ui/async-await/in-trait/issue-102138.rs b/tests/ui/async-await/in-trait/issue-102138.rs index 221b830fc5f..fde5f36f39c 100644 --- a/tests/ui/async-await/in-trait/issue-102138.rs +++ b/tests/ui/async-await/in-trait/issue-102138.rs @@ -1,5 +1,5 @@ -// check-pass -// edition:2021 +//@ check-pass +//@ edition:2021 #![allow(incomplete_features)] diff --git a/tests/ui/async-await/in-trait/issue-102219.rs b/tests/ui/async-await/in-trait/issue-102219.rs index 1f32cf691eb..954e9e8bc5d 100644 --- a/tests/ui/async-await/in-trait/issue-102219.rs +++ b/tests/ui/async-await/in-trait/issue-102219.rs @@ -1,6 +1,6 @@ -// compile-flags:--crate-type=lib -// edition:2021 -// check-pass +//@ compile-flags:--crate-type=lib +//@ edition:2021 +//@ check-pass #![allow(incomplete_features)] diff --git a/tests/ui/async-await/in-trait/issue-102310.rs b/tests/ui/async-await/in-trait/issue-102310.rs index c6321dfcbe8..ea0646edd17 100644 --- a/tests/ui/async-await/in-trait/issue-102310.rs +++ b/tests/ui/async-await/in-trait/issue-102310.rs @@ -1,5 +1,5 @@ -// check-pass -// edition:2021 +//@ check-pass +//@ edition:2021 #![allow(incomplete_features)] diff --git a/tests/ui/async-await/in-trait/issue-104678.rs b/tests/ui/async-await/in-trait/issue-104678.rs index db2fa3026fc..5265c4486a1 100644 --- a/tests/ui/async-await/in-trait/issue-104678.rs +++ b/tests/ui/async-await/in-trait/issue-104678.rs @@ -1,5 +1,5 @@ -// edition:2021 -// check-pass +//@ edition:2021 +//@ check-pass #![allow(incomplete_features)] diff --git a/tests/ui/async-await/in-trait/lifetime-mismatch.rs b/tests/ui/async-await/in-trait/lifetime-mismatch.rs index b45d1758da4..df9227029d4 100644 --- a/tests/ui/async-await/in-trait/lifetime-mismatch.rs +++ b/tests/ui/async-await/in-trait/lifetime-mismatch.rs @@ -1,4 +1,4 @@ -// edition:2021 +//@ edition:2021 trait MyTrait { diff --git a/tests/ui/async-await/in-trait/missing-feature-flag.rs b/tests/ui/async-await/in-trait/missing-feature-flag.rs index 898299a7d9d..5bcbffbea48 100644 --- a/tests/ui/async-await/in-trait/missing-feature-flag.rs +++ b/tests/ui/async-await/in-trait/missing-feature-flag.rs @@ -1,4 +1,4 @@ -// edition:2018 +//@ edition:2018 #![feature(min_specialization)] diff --git a/tests/ui/async-await/in-trait/missing-send-bound.rs b/tests/ui/async-await/in-trait/missing-send-bound.rs index 596aece748d..2ad43deb687 100644 --- a/tests/ui/async-await/in-trait/missing-send-bound.rs +++ b/tests/ui/async-await/in-trait/missing-send-bound.rs @@ -1,4 +1,4 @@ -// edition:2021 +//@ edition:2021 trait Foo { diff --git a/tests/ui/async-await/in-trait/nested-rpit.rs b/tests/ui/async-await/in-trait/nested-rpit.rs index ccae08accb6..3a6b9f3760c 100644 --- a/tests/ui/async-await/in-trait/nested-rpit.rs +++ b/tests/ui/async-await/in-trait/nested-rpit.rs @@ -1,5 +1,5 @@ -// edition: 2021 -// check-pass +//@ edition: 2021 +//@ check-pass #![allow(incomplete_features)] diff --git a/tests/ui/async-await/in-trait/normalize-opaque-with-bound-vars.rs b/tests/ui/async-await/in-trait/normalize-opaque-with-bound-vars.rs index 9eb396f3202..0c1b2b70c09 100644 --- a/tests/ui/async-await/in-trait/normalize-opaque-with-bound-vars.rs +++ b/tests/ui/async-await/in-trait/normalize-opaque-with-bound-vars.rs @@ -1,6 +1,6 @@ -// build-pass -// edition:2021 -// compile-flags: -Cdebuginfo=2 +//@ build-pass +//@ edition:2021 +//@ compile-flags: -Cdebuginfo=2 // We were not normalizing opaques with escaping bound vars during codegen, // leading to later errors during debuginfo computation. diff --git a/tests/ui/async-await/in-trait/object-safety.rs b/tests/ui/async-await/in-trait/object-safety.rs index 5e5375b082b..8174a803e79 100644 --- a/tests/ui/async-await/in-trait/object-safety.rs +++ b/tests/ui/async-await/in-trait/object-safety.rs @@ -1,4 +1,4 @@ -// edition:2021 +//@ edition:2021 trait Foo { diff --git a/tests/ui/async-await/in-trait/return-not-existing-pair.rs b/tests/ui/async-await/in-trait/return-not-existing-pair.rs index 2286316dd88..68be1358f81 100644 --- a/tests/ui/async-await/in-trait/return-not-existing-pair.rs +++ b/tests/ui/async-await/in-trait/return-not-existing-pair.rs @@ -1,4 +1,4 @@ -// edition:2021 +//@ edition:2021 trait MyTrait<'a, 'b, T> { diff --git a/tests/ui/async-await/in-trait/return-not-existing-type-wrapping-rpitit.rs b/tests/ui/async-await/in-trait/return-not-existing-type-wrapping-rpitit.rs index d23ef093be1..e45fca6de77 100644 --- a/tests/ui/async-await/in-trait/return-not-existing-type-wrapping-rpitit.rs +++ b/tests/ui/async-await/in-trait/return-not-existing-type-wrapping-rpitit.rs @@ -1,4 +1,4 @@ -// edition:2021 +//@ edition:2021 struct Wrapper(T); diff --git a/tests/ui/async-await/in-trait/return-type-suggestion.rs b/tests/ui/async-await/in-trait/return-type-suggestion.rs index 2b19b24cf7a..480b5ab5bf9 100644 --- a/tests/ui/async-await/in-trait/return-type-suggestion.rs +++ b/tests/ui/async-await/in-trait/return-type-suggestion.rs @@ -1,4 +1,4 @@ -// edition: 2021 +//@ edition: 2021 trait A { diff --git a/tests/ui/async-await/in-trait/returning-possibly-unsized-self.rs b/tests/ui/async-await/in-trait/returning-possibly-unsized-self.rs index 72f02679d77..5fa82163a31 100644 --- a/tests/ui/async-await/in-trait/returning-possibly-unsized-self.rs +++ b/tests/ui/async-await/in-trait/returning-possibly-unsized-self.rs @@ -1,5 +1,5 @@ -// check-pass -// edition:2021 +//@ check-pass +//@ edition:2021 #![deny(opaque_hidden_inferred_bound)] diff --git a/tests/ui/async-await/in-trait/send-on-async-fn-in-trait.fixed b/tests/ui/async-await/in-trait/send-on-async-fn-in-trait.fixed index affe6cded8f..c69605b4c22 100644 --- a/tests/ui/async-await/in-trait/send-on-async-fn-in-trait.fixed +++ b/tests/ui/async-await/in-trait/send-on-async-fn-in-trait.fixed @@ -1,5 +1,5 @@ -// run-rustfix -// edition: 2021 +//@ run-rustfix +//@ edition: 2021 #![allow(unused)] diff --git a/tests/ui/async-await/in-trait/send-on-async-fn-in-trait.rs b/tests/ui/async-await/in-trait/send-on-async-fn-in-trait.rs index 02bfee1a25f..0025b957162 100644 --- a/tests/ui/async-await/in-trait/send-on-async-fn-in-trait.rs +++ b/tests/ui/async-await/in-trait/send-on-async-fn-in-trait.rs @@ -1,5 +1,5 @@ -// run-rustfix -// edition: 2021 +//@ run-rustfix +//@ edition: 2021 #![allow(unused)] diff --git a/tests/ui/async-await/in-trait/send-on-foreign-async-fn-in-trait.rs b/tests/ui/async-await/in-trait/send-on-foreign-async-fn-in-trait.rs index f0d750714cd..a6da3f7c81c 100644 --- a/tests/ui/async-await/in-trait/send-on-foreign-async-fn-in-trait.rs +++ b/tests/ui/async-await/in-trait/send-on-foreign-async-fn-in-trait.rs @@ -1,5 +1,5 @@ -// aux-build:foreign-async-fn.rs -// edition:2021 +//@ aux-build:foreign-async-fn.rs +//@ edition:2021 extern crate foreign_async_fn; use foreign_async_fn::Foo; diff --git a/tests/ui/async-await/in-trait/unconstrained-impl-region.rs b/tests/ui/async-await/in-trait/unconstrained-impl-region.rs index c06f9f005f1..9382c232364 100644 --- a/tests/ui/async-await/in-trait/unconstrained-impl-region.rs +++ b/tests/ui/async-await/in-trait/unconstrained-impl-region.rs @@ -1,4 +1,4 @@ -// edition: 2021 +//@ edition: 2021 pub(crate) trait Inbox { async fn next(self) -> M; diff --git a/tests/ui/async-await/in-trait/warn.rs b/tests/ui/async-await/in-trait/warn.rs index 71f3822dfb1..8cdb8887f42 100644 --- a/tests/ui/async-await/in-trait/warn.rs +++ b/tests/ui/async-await/in-trait/warn.rs @@ -1,4 +1,4 @@ -// edition: 2021 +//@ edition: 2021 #![deny(async_fn_in_trait)] diff --git a/tests/ui/async-await/incorrect-move-async-order-issue-79694.fixed b/tests/ui/async-await/incorrect-move-async-order-issue-79694.fixed index 055800d23b6..c74a32e442f 100644 --- a/tests/ui/async-await/incorrect-move-async-order-issue-79694.fixed +++ b/tests/ui/async-await/incorrect-move-async-order-issue-79694.fixed @@ -1,5 +1,5 @@ -// run-rustfix -// edition:2018 +//@ run-rustfix +//@ edition:2018 // Regression test for issue 79694 diff --git a/tests/ui/async-await/incorrect-move-async-order-issue-79694.rs b/tests/ui/async-await/incorrect-move-async-order-issue-79694.rs index e8be16516d6..81ffbacc327 100644 --- a/tests/ui/async-await/incorrect-move-async-order-issue-79694.rs +++ b/tests/ui/async-await/incorrect-move-async-order-issue-79694.rs @@ -1,5 +1,5 @@ -// run-rustfix -// edition:2018 +//@ run-rustfix +//@ edition:2018 // Regression test for issue 79694 diff --git a/tests/ui/async-await/inference_var_self_argument.rs b/tests/ui/async-await/inference_var_self_argument.rs index fd8482f86b4..f4bb8884b05 100644 --- a/tests/ui/async-await/inference_var_self_argument.rs +++ b/tests/ui/async-await/inference_var_self_argument.rs @@ -1,5 +1,5 @@ //! This is a regression test for an ICE. -// edition: 2021 +//@ edition: 2021 trait Foo { async fn foo(self: &dyn Foo) { diff --git a/tests/ui/async-await/interior-with-const-generic-expr.rs b/tests/ui/async-await/interior-with-const-generic-expr.rs index 86ba7582d38..22e1cea2238 100644 --- a/tests/ui/async-await/interior-with-const-generic-expr.rs +++ b/tests/ui/async-await/interior-with-const-generic-expr.rs @@ -1,5 +1,5 @@ -// edition:2018 -// run-pass +//@ edition:2018 +//@ run-pass #![allow(incomplete_features)] #![feature(generic_const_exprs)] diff --git a/tests/ui/async-await/issue-101715.rs b/tests/ui/async-await/issue-101715.rs index 1be5d02482e..289fc5d30f5 100644 --- a/tests/ui/async-await/issue-101715.rs +++ b/tests/ui/async-await/issue-101715.rs @@ -1,4 +1,4 @@ -// edition:2018 +//@ edition:2018 struct S; diff --git a/tests/ui/async-await/issue-105501.rs b/tests/ui/async-await/issue-105501.rs index f30d2a9d81a..30a08abeb49 100644 --- a/tests/ui/async-await/issue-105501.rs +++ b/tests/ui/async-await/issue-105501.rs @@ -1,5 +1,5 @@ -// check-pass -// edition:2018 +//@ check-pass +//@ edition:2018 // This is a regression test for https://github.com/rust-lang/rust/issues/105501. // It was minified from the published `msf-ice:0.2.1` crate which failed in a crater run. diff --git a/tests/ui/async-await/issue-107036.rs b/tests/ui/async-await/issue-107036.rs index 6a22de2c943..917eef2e5ce 100644 --- a/tests/ui/async-await/issue-107036.rs +++ b/tests/ui/async-await/issue-107036.rs @@ -1,6 +1,6 @@ -// aux-build:issue-107036.rs -// edition:2021 -// check-pass +//@ aux-build:issue-107036.rs +//@ edition:2021 +//@ check-pass extern crate issue_107036; use issue_107036::S; diff --git a/tests/ui/async-await/issue-108572.fixed b/tests/ui/async-await/issue-108572.fixed index 8f0133d97b5..0e8a7b78481 100644 --- a/tests/ui/async-await/issue-108572.fixed +++ b/tests/ui/async-await/issue-108572.fixed @@ -1,5 +1,5 @@ -// edition: 2021 -// run-rustfix +//@ edition: 2021 +//@ run-rustfix #![allow(unused_must_use, dead_code)] use std::future::Future; diff --git a/tests/ui/async-await/issue-108572.rs b/tests/ui/async-await/issue-108572.rs index 3596580763c..0861fb1f91b 100644 --- a/tests/ui/async-await/issue-108572.rs +++ b/tests/ui/async-await/issue-108572.rs @@ -1,5 +1,5 @@ -// edition: 2021 -// run-rustfix +//@ edition: 2021 +//@ run-rustfix #![allow(unused_must_use, dead_code)] use std::future::Future; diff --git a/tests/ui/async-await/issue-54239-private-type-triggers-lint.rs b/tests/ui/async-await/issue-54239-private-type-triggers-lint.rs index 16cf7ad52e4..ff825180bf8 100644 --- a/tests/ui/async-await/issue-54239-private-type-triggers-lint.rs +++ b/tests/ui/async-await/issue-54239-private-type-triggers-lint.rs @@ -1,6 +1,6 @@ // Regression test for #54239, shouldn't trigger lint. -// check-pass -// edition:2018 +//@ check-pass +//@ edition:2018 #![deny(missing_debug_implementations)] diff --git a/tests/ui/async-await/issue-60709.rs b/tests/ui/async-await/issue-60709.rs index c206f01b98f..8634d6f7768 100644 --- a/tests/ui/async-await/issue-60709.rs +++ b/tests/ui/async-await/issue-60709.rs @@ -1,8 +1,8 @@ // This used to compile the future down to ud2, due to uninhabited types being // handled incorrectly in coroutines. -// compile-flags: -Copt-level=z -Cdebuginfo=2 --edition=2018 +//@ compile-flags: -Copt-level=z -Cdebuginfo=2 --edition=2018 -// run-pass +//@ run-pass use std::future::Future; use std::task::Poll; diff --git a/tests/ui/async-await/issue-61076.rs b/tests/ui/async-await/issue-61076.rs index cf6e5b4e436..f78abfd6d0f 100644 --- a/tests/ui/async-await/issue-61076.rs +++ b/tests/ui/async-await/issue-61076.rs @@ -1,4 +1,4 @@ -// edition:2018 +//@ edition:2018 use core::future::Future; use core::pin::Pin; diff --git a/tests/ui/async-await/issue-61452.rs b/tests/ui/async-await/issue-61452.rs index 9381251ad69..718f0e9efc1 100644 --- a/tests/ui/async-await/issue-61452.rs +++ b/tests/ui/async-await/issue-61452.rs @@ -1,4 +1,4 @@ -// edition:2018 +//@ edition:2018 pub async fn f(x: Option) { x.take(); diff --git a/tests/ui/async-await/issue-61793.rs b/tests/ui/async-await/issue-61793.rs index bb861cf60b1..5fc2f069a67 100644 --- a/tests/ui/async-await/issue-61793.rs +++ b/tests/ui/async-await/issue-61793.rs @@ -3,8 +3,8 @@ // while those two fields were at the same offset (which is impossible). // That is, memory ordering of `(X, ())`, but offsets of `((), X)`. -// build-pass -// edition:2018 +//@ build-pass +//@ edition:2018 async fn foo(_: &(), _: F) {} diff --git a/tests/ui/async-await/issue-62658.rs b/tests/ui/async-await/issue-62658.rs index 8e6d070ea3f..0aaeeb68a52 100644 --- a/tests/ui/async-await/issue-62658.rs +++ b/tests/ui/async-await/issue-62658.rs @@ -1,8 +1,8 @@ // This test created a coroutine whose size was not rounded to a multiple of its // alignment. This caused an assertion error in codegen. -// build-pass -// edition:2018 +//@ build-pass +//@ edition:2018 async fn noop() {} diff --git a/tests/ui/async-await/issue-63832-await-short-temporary-lifetime-1.rs b/tests/ui/async-await/issue-63832-await-short-temporary-lifetime-1.rs index 54059b29f72..646a664ffc3 100644 --- a/tests/ui/async-await/issue-63832-await-short-temporary-lifetime-1.rs +++ b/tests/ui/async-await/issue-63832-await-short-temporary-lifetime-1.rs @@ -1,5 +1,5 @@ -// check-pass -// edition:2018 +//@ check-pass +//@ edition:2018 struct Test(String); diff --git a/tests/ui/async-await/issue-63832-await-short-temporary-lifetime.rs b/tests/ui/async-await/issue-63832-await-short-temporary-lifetime.rs index c5ea2b821ad..3a1e10cf68e 100644 --- a/tests/ui/async-await/issue-63832-await-short-temporary-lifetime.rs +++ b/tests/ui/async-await/issue-63832-await-short-temporary-lifetime.rs @@ -1,5 +1,5 @@ -// check-pass -// edition:2018 +//@ check-pass +//@ edition:2018 async fn foo(x: &[Vec]) -> u32 { 0 diff --git a/tests/ui/async-await/issue-64130-1-sync.rs b/tests/ui/async-await/issue-64130-1-sync.rs index 7769085a0db..67bb4f468be 100644 --- a/tests/ui/async-await/issue-64130-1-sync.rs +++ b/tests/ui/async-await/issue-64130-1-sync.rs @@ -1,5 +1,5 @@ #![feature(negative_impls)] -// edition:2018 +//@ edition:2018 // This tests the specialized async-await-specific error when futures don't implement an // auto trait (which is specifically Sync) due to some type that was captured. diff --git a/tests/ui/async-await/issue-64130-2-send.rs b/tests/ui/async-await/issue-64130-2-send.rs index 0195afe6b39..20a89b5d05c 100644 --- a/tests/ui/async-await/issue-64130-2-send.rs +++ b/tests/ui/async-await/issue-64130-2-send.rs @@ -1,5 +1,5 @@ #![feature(negative_impls)] -// edition:2018 +//@ edition:2018 // This tests the specialized async-await-specific error when futures don't implement an // auto trait (which is specifically Send) due to some type that was captured. diff --git a/tests/ui/async-await/issue-64130-3-other.rs b/tests/ui/async-await/issue-64130-3-other.rs index 074d67aa3fb..c7df8b6de74 100644 --- a/tests/ui/async-await/issue-64130-3-other.rs +++ b/tests/ui/async-await/issue-64130-3-other.rs @@ -1,6 +1,6 @@ #![feature(auto_traits)] #![feature(negative_impls)] -// edition:2018 +//@ edition:2018 // This tests the unspecialized async-await-specific error when futures don't implement an // auto trait (which is not Send or Sync) due to some type that was captured. diff --git a/tests/ui/async-await/issue-64130-4-async-move.rs b/tests/ui/async-await/issue-64130-4-async-move.rs index 359813f6379..3f82cdd0916 100644 --- a/tests/ui/async-await/issue-64130-4-async-move.rs +++ b/tests/ui/async-await/issue-64130-4-async-move.rs @@ -1,5 +1,5 @@ -// edition:2018 -// check-pass +//@ edition:2018 +//@ check-pass use std::any::Any; use std::future::Future; diff --git a/tests/ui/async-await/issue-64130-non-send-future-diags.rs b/tests/ui/async-await/issue-64130-non-send-future-diags.rs index b652d239153..e23b38ce8e9 100644 --- a/tests/ui/async-await/issue-64130-non-send-future-diags.rs +++ b/tests/ui/async-await/issue-64130-non-send-future-diags.rs @@ -1,4 +1,4 @@ -// edition:2018 +//@ edition:2018 #![feature(must_not_suspend)] #![allow(must_not_suspend)] diff --git a/tests/ui/async-await/issue-64391.rs b/tests/ui/async-await/issue-64391.rs index c6faad3aad0..29f1da10ded 100644 --- a/tests/ui/async-await/issue-64391.rs +++ b/tests/ui/async-await/issue-64391.rs @@ -4,8 +4,8 @@ // example. The drop order itself is directly tested in // `drop-order/drop-order-for-temporary-in-tail-return-expr.rs`. // -// check-pass -// edition:2018 +//@ check-pass +//@ edition:2018 async fn add(x: u32, y: u32) -> u32 { async { x + y }.await diff --git a/tests/ui/async-await/issue-65634-raw-ident-suggestion.rs b/tests/ui/async-await/issue-65634-raw-ident-suggestion.rs index 03dd0340c9d..ef5760f4846 100644 --- a/tests/ui/async-await/issue-65634-raw-ident-suggestion.rs +++ b/tests/ui/async-await/issue-65634-raw-ident-suggestion.rs @@ -1,5 +1,5 @@ -// revisions: edition2015 edition2018 -//[edition2018]edition:2018 +//@ revisions: edition2015 edition2018 +//@[edition2018]edition:2018 #![allow(non_camel_case_types)] diff --git a/tests/ui/async-await/issue-66312.rs b/tests/ui/async-await/issue-66312.rs index fbc58697d48..396679885ce 100644 --- a/tests/ui/async-await/issue-66312.rs +++ b/tests/ui/async-await/issue-66312.rs @@ -1,4 +1,4 @@ -// edition:2018 +//@ edition:2018 trait Test { fn is_some(self: T); //~ ERROR invalid `self` parameter type diff --git a/tests/ui/async-await/issue-66387-if-without-else.rs b/tests/ui/async-await/issue-66387-if-without-else.rs index 3ab8220b4af..00f223206d6 100644 --- a/tests/ui/async-await/issue-66387-if-without-else.rs +++ b/tests/ui/async-await/issue-66387-if-without-else.rs @@ -1,4 +1,4 @@ -// edition:2018 +//@ edition:2018 async fn f() -> i32 { if true { //~ ERROR `if` may be missing an `else` clause return 0; diff --git a/tests/ui/async-await/issue-67252-unnamed-future.rs b/tests/ui/async-await/issue-67252-unnamed-future.rs index 60717d99346..822b1bea5b1 100644 --- a/tests/ui/async-await/issue-67252-unnamed-future.rs +++ b/tests/ui/async-await/issue-67252-unnamed-future.rs @@ -1,4 +1,4 @@ -// edition:2018 +//@ edition:2018 use std::future::Future; use std::pin::Pin; use std::task::{Context, Poll}; diff --git a/tests/ui/async-await/issue-67651.rs b/tests/ui/async-await/issue-67651.rs index bd96a3b709b..7a7bf2d7b13 100644 --- a/tests/ui/async-await/issue-67651.rs +++ b/tests/ui/async-await/issue-67651.rs @@ -1,4 +1,4 @@ -// edition:2018 +//@ edition:2018 trait From { fn from(); diff --git a/tests/ui/async-await/issue-67765-async-diagnostic.rs b/tests/ui/async-await/issue-67765-async-diagnostic.rs index 5093916e73a..7fe1baef952 100644 --- a/tests/ui/async-await/issue-67765-async-diagnostic.rs +++ b/tests/ui/async-await/issue-67765-async-diagnostic.rs @@ -1,4 +1,4 @@ -// edition:2018 +//@ edition:2018 // // Regression test for issue #67765 // Tests that we point at the proper location when giving diff --git a/tests/ui/async-await/issue-68112.rs b/tests/ui/async-await/issue-68112.rs index fd6089e0c03..ad44f39ac11 100644 --- a/tests/ui/async-await/issue-68112.rs +++ b/tests/ui/async-await/issue-68112.rs @@ -1,4 +1,4 @@ -// edition:2018 +//@ edition:2018 use std::{ cell::RefCell, diff --git a/tests/ui/async-await/issue-68523-start.rs b/tests/ui/async-await/issue-68523-start.rs index 5adc28b203a..ee3baf4990c 100644 --- a/tests/ui/async-await/issue-68523-start.rs +++ b/tests/ui/async-await/issue-68523-start.rs @@ -1,4 +1,4 @@ -// edition:2018 +//@ edition:2018 #![feature(start)] diff --git a/tests/ui/async-await/issue-68523.rs b/tests/ui/async-await/issue-68523.rs index 7a67661a019..167da22b8a8 100644 --- a/tests/ui/async-await/issue-68523.rs +++ b/tests/ui/async-await/issue-68523.rs @@ -1,4 +1,4 @@ -// edition:2018 +//@ edition:2018 async fn main() -> Result { //~^ ERROR `main` function is not allowed to be `async` diff --git a/tests/ui/async-await/issue-69446-fnmut-capture.rs b/tests/ui/async-await/issue-69446-fnmut-capture.rs index 842115538c9..608f1e6cce7 100644 --- a/tests/ui/async-await/issue-69446-fnmut-capture.rs +++ b/tests/ui/async-await/issue-69446-fnmut-capture.rs @@ -1,6 +1,6 @@ // Regression test for issue #69446 - we should display // which variable is captured -// edition:2018 +//@ edition:2018 use core::future::Future; diff --git a/tests/ui/async-await/issue-70594.rs b/tests/ui/async-await/issue-70594.rs index 4c8209348b3..422248c9eba 100644 --- a/tests/ui/async-await/issue-70594.rs +++ b/tests/ui/async-await/issue-70594.rs @@ -1,4 +1,4 @@ -// edition:2018 +//@ edition:2018 async fn fun() { [1; ().await]; diff --git a/tests/ui/async-await/issue-70818.rs b/tests/ui/async-await/issue-70818.rs index 019c56eb2fa..36295a84e7a 100644 --- a/tests/ui/async-await/issue-70818.rs +++ b/tests/ui/async-await/issue-70818.rs @@ -1,4 +1,4 @@ -// edition:2018 +//@ edition:2018 use std::future::Future; fn foo(ty: T, ty1: U) -> impl Future + Send { diff --git a/tests/ui/async-await/issue-70935-complex-spans.rs b/tests/ui/async-await/issue-70935-complex-spans.rs index 81f6961840c..a74bd9890ca 100644 --- a/tests/ui/async-await/issue-70935-complex-spans.rs +++ b/tests/ui/async-await/issue-70935-complex-spans.rs @@ -1,4 +1,4 @@ -// edition:2018 +//@ edition:2018 // #70935: Check if we do not emit snippet // with newlines which lead complex diagnostics. diff --git a/tests/ui/async-await/issue-71137.rs b/tests/ui/async-await/issue-71137.rs index 7695e0325ff..551cf85047c 100644 --- a/tests/ui/async-await/issue-71137.rs +++ b/tests/ui/async-await/issue-71137.rs @@ -1,4 +1,4 @@ -// edition:2018 +//@ edition:2018 #![feature(must_not_suspend)] #![allow(must_not_suspend)] diff --git a/tests/ui/async-await/issue-72442.rs b/tests/ui/async-await/issue-72442.rs index 2280154c715..de24fc9fdcb 100644 --- a/tests/ui/async-await/issue-72442.rs +++ b/tests/ui/async-await/issue-72442.rs @@ -1,5 +1,5 @@ -// edition:2018 -// incremental +//@ edition:2018 +//@ incremental use std::fs::File; use std::future::Future; diff --git a/tests/ui/async-await/issue-72470-llvm-dominate.rs b/tests/ui/async-await/issue-72470-llvm-dominate.rs index 5bb69a07305..24f3f8bd463 100644 --- a/tests/ui/async-await/issue-72470-llvm-dominate.rs +++ b/tests/ui/async-await/issue-72470-llvm-dominate.rs @@ -1,7 +1,7 @@ -// compile-flags: -C opt-level=3 -// aux-build: issue-72470-lib.rs -// edition:2018 -// build-pass +//@ compile-flags: -C opt-level=3 +//@ aux-build: issue-72470-lib.rs +//@ edition:2018 +//@ build-pass // Regression test for issue #72470, using the minimization // in https://github.com/jonas-schievink/llvm-error diff --git a/tests/ui/async-await/issue-72590-type-error-sized.rs b/tests/ui/async-await/issue-72590-type-error-sized.rs index 00e098d43e0..a29859b6afe 100644 --- a/tests/ui/async-await/issue-72590-type-error-sized.rs +++ b/tests/ui/async-await/issue-72590-type-error-sized.rs @@ -1,6 +1,6 @@ // Regression test for issue #72590 // Tests that we don't emit a spurious "size cannot be statically determined" error -// edition:2018 +//@ edition:2018 struct Foo { foo: Nonexistent, //~ ERROR cannot find diff --git a/tests/ui/async-await/issue-73050.rs b/tests/ui/async-await/issue-73050.rs index 790f24a230b..97d2cfed8b1 100644 --- a/tests/ui/async-await/issue-73050.rs +++ b/tests/ui/async-await/issue-73050.rs @@ -1,5 +1,5 @@ -// check-pass -// edition:2018 +//@ check-pass +//@ edition:2018 #[allow(unused)] async fn foo<'a>() { diff --git a/tests/ui/async-await/issue-73137.rs b/tests/ui/async-await/issue-73137.rs index 2d16f193644..36a12a26a00 100644 --- a/tests/ui/async-await/issue-73137.rs +++ b/tests/ui/async-await/issue-73137.rs @@ -1,7 +1,7 @@ // Regression test for -// run-pass -// edition:2018 +//@ run-pass +//@ edition:2018 #![allow(dead_code)] use std::future::Future; diff --git a/tests/ui/async-await/issue-73541-1.rs b/tests/ui/async-await/issue-73541-1.rs index 7fb0d6c39ff..c962f968db2 100644 --- a/tests/ui/async-await/issue-73541-1.rs +++ b/tests/ui/async-await/issue-73541-1.rs @@ -1,4 +1,4 @@ -// edition:2018 +//@ edition:2018 fn main() { 'a: loop { diff --git a/tests/ui/async-await/issue-73541-2.rs b/tests/ui/async-await/issue-73541-2.rs index 70b4ab25376..481bbbab722 100644 --- a/tests/ui/async-await/issue-73541-2.rs +++ b/tests/ui/async-await/issue-73541-2.rs @@ -1,4 +1,4 @@ -// edition:2018 +//@ edition:2018 async fn c() { 'a: loop { diff --git a/tests/ui/async-await/issue-73741-type-err.rs b/tests/ui/async-await/issue-73741-type-err.rs index c5b9e34edf7..6f38e654a80 100644 --- a/tests/ui/async-await/issue-73741-type-err.rs +++ b/tests/ui/async-await/issue-73741-type-err.rs @@ -1,4 +1,4 @@ -// edition:2018 +//@ edition:2018 // // Regression test for issue #73741 // Ensures that we don't emit spurious errors when diff --git a/tests/ui/async-await/issue-74047.rs b/tests/ui/async-await/issue-74047.rs index 2e4f3e675c3..769772c17e7 100644 --- a/tests/ui/async-await/issue-74047.rs +++ b/tests/ui/async-await/issue-74047.rs @@ -1,4 +1,4 @@ -// edition:2018 +//@ edition:2018 use std::convert::{TryFrom, TryInto}; use std::io; diff --git a/tests/ui/async-await/issue-74072-lifetime-name-annotations.rs b/tests/ui/async-await/issue-74072-lifetime-name-annotations.rs index 904d28fb0a7..58509642b10 100644 --- a/tests/ui/async-await/issue-74072-lifetime-name-annotations.rs +++ b/tests/ui/async-await/issue-74072-lifetime-name-annotations.rs @@ -1,4 +1,4 @@ -// edition:2018 +//@ edition:2018 #![feature(async_closure)] use std::future::Future; diff --git a/tests/ui/async-await/issue-74497-lifetime-in-opaque.rs b/tests/ui/async-await/issue-74497-lifetime-in-opaque.rs index 2d765eb41be..e5b91420a13 100644 --- a/tests/ui/async-await/issue-74497-lifetime-in-opaque.rs +++ b/tests/ui/async-await/issue-74497-lifetime-in-opaque.rs @@ -1,4 +1,4 @@ -// edition:2018 +//@ edition:2018 // test that names give to anonymous lifetimes in opaque types like `impl Future` are correctly // introduced in error messages diff --git a/tests/ui/async-await/issue-75785-confusing-named-region.rs b/tests/ui/async-await/issue-75785-confusing-named-region.rs index 452614087be..527343c192b 100644 --- a/tests/ui/async-await/issue-75785-confusing-named-region.rs +++ b/tests/ui/async-await/issue-75785-confusing-named-region.rs @@ -1,4 +1,4 @@ -// edition:2018 +//@ edition:2018 // // Regression test for issue #75785 // Tests that we don't point to a confusing named diff --git a/tests/ui/async-await/issue-76547.rs b/tests/ui/async-await/issue-76547.rs index 587feb6247c..30a39c89437 100644 --- a/tests/ui/async-await/issue-76547.rs +++ b/tests/ui/async-await/issue-76547.rs @@ -1,5 +1,5 @@ // Test for diagnostic improvement issue #76547 -// edition:2018 +//@ edition:2018 use std::{ future::Future, diff --git a/tests/ui/async-await/issue-77993-2.rs b/tests/ui/async-await/issue-77993-2.rs index 4d554a0a1d0..6225eaebd03 100644 --- a/tests/ui/async-await/issue-77993-2.rs +++ b/tests/ui/async-await/issue-77993-2.rs @@ -1,4 +1,4 @@ -// edition:2018 +//@ edition:2018 async fn test() -> Result<(), Box> { macro!(); diff --git a/tests/ui/async-await/issue-78115.rs b/tests/ui/async-await/issue-78115.rs index ac18470c621..e05de4217fe 100644 --- a/tests/ui/async-await/issue-78115.rs +++ b/tests/ui/async-await/issue-78115.rs @@ -1,7 +1,7 @@ // Regression test for issue #78115: "ICE: variable should be placed in scope earlier" -// check-pass -// edition:2018 +//@ check-pass +//@ edition:2018 #[allow(dead_code)] struct Foo { diff --git a/tests/ui/async-await/issue-84841.rs b/tests/ui/async-await/issue-84841.rs index ba3a1617b9c..736dbaed7d8 100644 --- a/tests/ui/async-await/issue-84841.rs +++ b/tests/ui/async-await/issue-84841.rs @@ -1,4 +1,4 @@ -// edition:2018 +//@ edition:2018 fn main() { diff --git a/tests/ui/async-await/issue-86507.rs b/tests/ui/async-await/issue-86507.rs index 317f0317664..484122a1ddc 100644 --- a/tests/ui/async-await/issue-86507.rs +++ b/tests/ui/async-await/issue-86507.rs @@ -1,4 +1,4 @@ -// edition:2018 +//@ edition:2018 use ::core::pin::Pin; use ::core::future::Future; diff --git a/tests/ui/async-await/issue-93197.rs b/tests/ui/async-await/issue-93197.rs index 05ec013d0af..b0f5e1f0f0e 100644 --- a/tests/ui/async-await/issue-93197.rs +++ b/tests/ui/async-await/issue-93197.rs @@ -1,6 +1,6 @@ // Regression test for #93197 -// check-pass -// edition:2021 +//@ check-pass +//@ edition:2021 #![feature(try_blocks)] diff --git a/tests/ui/async-await/issue-93648.rs b/tests/ui/async-await/issue-93648.rs index b27a79a428b..062c9d97a75 100644 --- a/tests/ui/async-await/issue-93648.rs +++ b/tests/ui/async-await/issue-93648.rs @@ -1,5 +1,5 @@ -// edition:2021 -// build-pass +//@ edition:2021 +//@ build-pass fn main() { let _ = async { diff --git a/tests/ui/async-await/issue-98634.rs b/tests/ui/async-await/issue-98634.rs index 169cc7f9b21..02e869f4325 100644 --- a/tests/ui/async-await/issue-98634.rs +++ b/tests/ui/async-await/issue-98634.rs @@ -1,4 +1,4 @@ -// edition: 2021 +//@ edition: 2021 use std::{ future::Future, diff --git a/tests/ui/async-await/issues/auxiliary/issue-60674.rs b/tests/ui/async-await/issues/auxiliary/issue-60674.rs index 680c6e55e56..da11142a3a4 100644 --- a/tests/ui/async-await/issues/auxiliary/issue-60674.rs +++ b/tests/ui/async-await/issues/auxiliary/issue-60674.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/ui/async-await/issues/auxiliary/issue_67893.rs b/tests/ui/async-await/issues/auxiliary/issue_67893.rs index efde4d2864d..0591ec5dfe8 100644 --- a/tests/ui/async-await/issues/auxiliary/issue_67893.rs +++ b/tests/ui/async-await/issues/auxiliary/issue_67893.rs @@ -1,4 +1,4 @@ -// edition:2018 +//@ edition:2018 use std::sync::{Arc, Mutex}; diff --git a/tests/ui/async-await/issues/issue-102206.rs b/tests/ui/async-await/issues/issue-102206.rs index a3a2ebc5896..98da133a079 100644 --- a/tests/ui/async-await/issues/issue-102206.rs +++ b/tests/ui/async-await/issues/issue-102206.rs @@ -1,4 +1,4 @@ -// edition:2021 +//@ edition:2021 async fn foo() {} diff --git a/tests/ui/async-await/issues/issue-107280.rs b/tests/ui/async-await/issues/issue-107280.rs index 81ae9553cf0..18c1962669f 100644 --- a/tests/ui/async-await/issues/issue-107280.rs +++ b/tests/ui/async-await/issues/issue-107280.rs @@ -1,4 +1,4 @@ -// edition:2021 +//@ edition:2021 async fn foo() { inner::().await diff --git a/tests/ui/async-await/issues/issue-112225-1.rs b/tests/ui/async-await/issues/issue-112225-1.rs index e28cbee214e..531da01934f 100644 --- a/tests/ui/async-await/issues/issue-112225-1.rs +++ b/tests/ui/async-await/issues/issue-112225-1.rs @@ -1,5 +1,5 @@ -// check-pass -// edition:2021 +//@ check-pass +//@ edition:2021 use core::future::Future; diff --git a/tests/ui/async-await/issues/issue-112225-2.rs b/tests/ui/async-await/issues/issue-112225-2.rs index 50fa1a79b6b..6a4da91b147 100644 --- a/tests/ui/async-await/issues/issue-112225-2.rs +++ b/tests/ui/async-await/issues/issue-112225-2.rs @@ -1,4 +1,4 @@ -// edition:2021 +//@ edition:2021 // With the current compiler logic, we cannot have both the `112225-1` case, // and this `112225-2` case working, as the type inference depends on the evaluation diff --git a/tests/ui/async-await/issues/issue-51719.rs b/tests/ui/async-await/issues/issue-51719.rs index 1cf388cd8ab..dd47dad4533 100644 --- a/tests/ui/async-await/issues/issue-51719.rs +++ b/tests/ui/async-await/issues/issue-51719.rs @@ -1,4 +1,4 @@ -// edition:2018 +//@ edition:2018 // // Tests that the .await syntax can't be used to make a coroutine diff --git a/tests/ui/async-await/issues/issue-51751.rs b/tests/ui/async-await/issues/issue-51751.rs index bc85a96cea9..7c405e3653b 100644 --- a/tests/ui/async-await/issues/issue-51751.rs +++ b/tests/ui/async-await/issues/issue-51751.rs @@ -1,4 +1,4 @@ -// edition:2018 +//@ edition:2018 async fn inc(limit: i64) -> i64 { limit + 1 diff --git a/tests/ui/async-await/issues/issue-53249.rs b/tests/ui/async-await/issues/issue-53249.rs index 3a33af2d2ee..da86c0c7b26 100644 --- a/tests/ui/async-await/issues/issue-53249.rs +++ b/tests/ui/async-await/issues/issue-53249.rs @@ -1,5 +1,5 @@ -// check-pass -// edition:2018 +//@ check-pass +//@ edition:2018 #![feature(arbitrary_self_types)] diff --git a/tests/ui/async-await/issues/issue-54752-async-block.rs b/tests/ui/async-await/issues/issue-54752-async-block.rs index a8165ae6c32..452b6794bee 100644 --- a/tests/ui/async-await/issues/issue-54752-async-block.rs +++ b/tests/ui/async-await/issues/issue-54752-async-block.rs @@ -1,7 +1,7 @@ -// run-pass +//@ run-pass -// edition:2018 -// pp-exact +//@ edition:2018 +//@ pp-exact fn main() { let _a = (async { }); } //~^ WARNING unnecessary parentheses around assigned value diff --git a/tests/ui/async-await/issues/issue-54974.rs b/tests/ui/async-await/issues/issue-54974.rs index b602ef153e6..a8b063821e4 100644 --- a/tests/ui/async-await/issues/issue-54974.rs +++ b/tests/ui/async-await/issues/issue-54974.rs @@ -1,5 +1,5 @@ -// check-pass -// edition:2018 +//@ check-pass +//@ edition:2018 use std::sync::Arc; diff --git a/tests/ui/async-await/issues/issue-55324.rs b/tests/ui/async-await/issues/issue-55324.rs index 9ecb3b1295e..c7f7447b0ea 100644 --- a/tests/ui/async-await/issues/issue-55324.rs +++ b/tests/ui/async-await/issues/issue-55324.rs @@ -1,5 +1,5 @@ -// check-pass -// edition:2018 +//@ check-pass +//@ edition:2018 use std::future::Future; diff --git a/tests/ui/async-await/issues/issue-55809.rs b/tests/ui/async-await/issues/issue-55809.rs index 3b271775a38..07661f4c263 100644 --- a/tests/ui/async-await/issues/issue-55809.rs +++ b/tests/ui/async-await/issues/issue-55809.rs @@ -1,5 +1,5 @@ -// edition:2018 -// run-pass +//@ edition:2018 +//@ run-pass trait Foo { } diff --git a/tests/ui/async-await/issues/issue-58885.rs b/tests/ui/async-await/issues/issue-58885.rs index 11920b07243..bae92075dec 100644 --- a/tests/ui/async-await/issues/issue-58885.rs +++ b/tests/ui/async-await/issues/issue-58885.rs @@ -1,5 +1,5 @@ -// check-pass -// edition:2018 +//@ check-pass +//@ edition:2018 struct Xyz { a: u64, diff --git a/tests/ui/async-await/issues/issue-59001.rs b/tests/ui/async-await/issues/issue-59001.rs index 4ddebcf20a3..6901bd932ac 100644 --- a/tests/ui/async-await/issues/issue-59001.rs +++ b/tests/ui/async-await/issues/issue-59001.rs @@ -1,5 +1,5 @@ -// check-pass -// edition:2018 +//@ check-pass +//@ edition:2018 use std::future::Future; diff --git a/tests/ui/async-await/issues/issue-59972.rs b/tests/ui/async-await/issues/issue-59972.rs index f60ec04c31e..c30477fcd30 100644 --- a/tests/ui/async-await/issues/issue-59972.rs +++ b/tests/ui/async-await/issues/issue-59972.rs @@ -2,9 +2,9 @@ // types as entirely uninhabited, when they were in fact constructible. This // caused us to hit "unreachable" code (illegal instruction on x86). -// run-pass +//@ run-pass -// compile-flags: --edition=2018 -Aunused +//@ compile-flags: --edition=2018 -Aunused pub enum Uninhabited { } diff --git a/tests/ui/async-await/issues/issue-60518.rs b/tests/ui/async-await/issues/issue-60518.rs index 69bbdd0e83a..cf8f205a820 100644 --- a/tests/ui/async-await/issues/issue-60518.rs +++ b/tests/ui/async-await/issues/issue-60518.rs @@ -1,5 +1,5 @@ -// check-pass -// edition:2018 +//@ check-pass +//@ edition:2018 // This is a regression test to ensure that simple bindings (where replacement arguments aren't // created during async fn lowering) that have their DefId used during HIR lowering (such as impl diff --git a/tests/ui/async-await/issues/issue-60655-latebound-regions.rs b/tests/ui/async-await/issues/issue-60655-latebound-regions.rs index ee28a2733ad..4a8b5af5769 100644 --- a/tests/ui/async-await/issues/issue-60655-latebound-regions.rs +++ b/tests/ui/async-await/issues/issue-60655-latebound-regions.rs @@ -1,7 +1,7 @@ // Test that opaque `impl Trait` types are allowed to contain late-bound regions. -// check-pass -// edition:2018 +//@ check-pass +//@ edition:2018 #![feature(type_alias_impl_trait)] diff --git a/tests/ui/async-await/issues/issue-60674.rs b/tests/ui/async-await/issues/issue-60674.rs index c0e34a8df77..9def3552e67 100644 --- a/tests/ui/async-await/issues/issue-60674.rs +++ b/tests/ui/async-await/issues/issue-60674.rs @@ -1,6 +1,6 @@ -// aux-build:issue-60674.rs -// build-pass (FIXME(62277): could be check-pass?) -// edition:2018 +//@ aux-build:issue-60674.rs +//@ build-pass (FIXME(62277): could be check-pass?) +//@ edition:2018 // This is a regression test that ensures that `mut` patterns are not lost when provided as input // to a proc macro. diff --git a/tests/ui/async-await/issues/issue-61187.rs b/tests/ui/async-await/issues/issue-61187.rs index 8585a425111..ec972d6b918 100644 --- a/tests/ui/async-await/issues/issue-61187.rs +++ b/tests/ui/async-await/issues/issue-61187.rs @@ -1,4 +1,4 @@ -// edition:2018 +//@ edition:2018 fn main() {} diff --git a/tests/ui/async-await/issues/issue-61986.rs b/tests/ui/async-await/issues/issue-61986.rs index 879bc6912fc..c48c847a4e7 100644 --- a/tests/ui/async-await/issues/issue-61986.rs +++ b/tests/ui/async-await/issues/issue-61986.rs @@ -1,5 +1,5 @@ -// build-pass (FIXME(62277): could be check-pass?) -// edition:2018 +//@ build-pass (FIXME(62277): could be check-pass?) +//@ edition:2018 // // Tests that we properly handle StorageDead/StorageLives for temporaries // created in async loop bodies. diff --git a/tests/ui/async-await/issues/issue-62009-1.rs b/tests/ui/async-await/issues/issue-62009-1.rs index 51d216408d7..42cad311c08 100644 --- a/tests/ui/async-await/issues/issue-62009-1.rs +++ b/tests/ui/async-await/issues/issue-62009-1.rs @@ -1,4 +1,4 @@ -// edition:2018 +//@ edition:2018 async fn print_dur() {} diff --git a/tests/ui/async-await/issues/issue-62009-2.rs b/tests/ui/async-await/issues/issue-62009-2.rs index cb7336e6134..f7cba29a747 100644 --- a/tests/ui/async-await/issues/issue-62009-2.rs +++ b/tests/ui/async-await/issues/issue-62009-2.rs @@ -1,4 +1,4 @@ -// edition:2018 +//@ edition:2018 #![feature(async_closure)] diff --git a/tests/ui/async-await/issues/issue-62097.rs b/tests/ui/async-await/issues/issue-62097.rs index 13c72abb136..ded535acf07 100644 --- a/tests/ui/async-await/issues/issue-62097.rs +++ b/tests/ui/async-await/issues/issue-62097.rs @@ -1,4 +1,4 @@ -// edition:2018 +//@ edition:2018 async fn foo(fun: F) where F: FnOnce() + 'static diff --git a/tests/ui/async-await/issues/issue-62517-1.rs b/tests/ui/async-await/issues/issue-62517-1.rs index 4689ce36a78..f730f2ea124 100644 --- a/tests/ui/async-await/issues/issue-62517-1.rs +++ b/tests/ui/async-await/issues/issue-62517-1.rs @@ -2,8 +2,8 @@ // fn` with an `impl Trait` return that mentioned a `dyn Bar` with no // explicit lifetime bound. // -// edition:2018 -// check-pass +//@ edition:2018 +//@ check-pass trait FirstTrait {} trait SecondTrait { diff --git a/tests/ui/async-await/issues/issue-62517-2.rs b/tests/ui/async-await/issues/issue-62517-2.rs index aaf28d6c132..f2c0d125613 100644 --- a/tests/ui/async-await/issues/issue-62517-2.rs +++ b/tests/ui/async-await/issues/issue-62517-2.rs @@ -2,8 +2,8 @@ // fn` with an `impl Trait` return that mentioned a `dyn Bar` with no // explicit lifetime bound. // -// edition:2018 -// check-pass +//@ edition:2018 +//@ check-pass trait Object {} diff --git a/tests/ui/async-await/issues/issue-63388-1.rs b/tests/ui/async-await/issues/issue-63388-1.rs index 32bcbb11116..32026a22a16 100644 --- a/tests/ui/async-await/issues/issue-63388-1.rs +++ b/tests/ui/async-await/issues/issue-63388-1.rs @@ -1,4 +1,4 @@ -// edition:2018 +//@ edition:2018 struct Xyz { a: u64, diff --git a/tests/ui/async-await/issues/issue-63388-2.rs b/tests/ui/async-await/issues/issue-63388-2.rs index 90b59f96e5f..85718f41121 100644 --- a/tests/ui/async-await/issues/issue-63388-2.rs +++ b/tests/ui/async-await/issues/issue-63388-2.rs @@ -1,4 +1,4 @@ -// edition:2018 +//@ edition:2018 struct Xyz { a: u64, diff --git a/tests/ui/async-await/issues/issue-63388-3.rs b/tests/ui/async-await/issues/issue-63388-3.rs index 1a9822e02fa..13682923a94 100644 --- a/tests/ui/async-await/issues/issue-63388-3.rs +++ b/tests/ui/async-await/issues/issue-63388-3.rs @@ -1,5 +1,5 @@ -// edition:2018 -// check-pass +//@ edition:2018 +//@ check-pass struct Xyz { a: u64, diff --git a/tests/ui/async-await/issues/issue-63388-4.rs b/tests/ui/async-await/issues/issue-63388-4.rs index 58f9dacb3bc..075dd148a87 100644 --- a/tests/ui/async-await/issues/issue-63388-4.rs +++ b/tests/ui/async-await/issues/issue-63388-4.rs @@ -1,5 +1,5 @@ -// check-pass -// edition:2018 +//@ check-pass +//@ edition:2018 struct A; diff --git a/tests/ui/async-await/issues/issue-64391-2.rs b/tests/ui/async-await/issues/issue-64391-2.rs index eef2c1fb20a..54bd013df89 100644 --- a/tests/ui/async-await/issues/issue-64391-2.rs +++ b/tests/ui/async-await/issues/issue-64391-2.rs @@ -5,8 +5,8 @@ // led us to believe that the future might be dropped after `config` // had been dropped. This cannot, in fact, happen. // -// check-pass -// edition:2018 +//@ check-pass +//@ edition:2018 async fn connect() { let config = 666; diff --git a/tests/ui/async-await/issues/issue-64433.rs b/tests/ui/async-await/issues/issue-64433.rs index d900f8ed9ba..73e7e9bc3b9 100644 --- a/tests/ui/async-await/issues/issue-64433.rs +++ b/tests/ui/async-await/issues/issue-64433.rs @@ -3,8 +3,8 @@ // See issue-64391-2.rs for more details, as that was fixed by the // same PR. // -// check-pass -// edition:2018 +//@ check-pass +//@ edition:2018 #[derive(Debug)] struct A<'a> { diff --git a/tests/ui/async-await/issues/issue-64477-2.rs b/tests/ui/async-await/issues/issue-64477-2.rs index 53ec3b06566..3da415edaaf 100644 --- a/tests/ui/async-await/issues/issue-64477-2.rs +++ b/tests/ui/async-await/issues/issue-64477-2.rs @@ -6,8 +6,8 @@ // See https://github.com/rust-lang/rust/issues/64477#issuecomment-534669068 for details // and https://github.com/rust-lang/rust/issues/64477#issuecomment-531882958 for an example. // -// check-pass -// edition:2018 +//@ check-pass +//@ edition:2018 async fn foo(_: String) {} diff --git a/tests/ui/async-await/issues/issue-64477.rs b/tests/ui/async-await/issues/issue-64477.rs index 5bd52d44a58..c1c62d207d6 100644 --- a/tests/ui/async-await/issues/issue-64477.rs +++ b/tests/ui/async-await/issues/issue-64477.rs @@ -3,8 +3,8 @@ // We were incorrectly claiming that the `f(x).await` future captured // a value of type `T`, and hence that `T: Send` would have to hold. // -// check-pass -// edition:2018 +//@ check-pass +//@ edition:2018 use std::future::Future; use std::pin::Pin; diff --git a/tests/ui/async-await/issues/issue-64964.rs b/tests/ui/async-await/issues/issue-64964.rs index 6d6eff4864e..257b67521cf 100644 --- a/tests/ui/async-await/issues/issue-64964.rs +++ b/tests/ui/async-await/issues/issue-64964.rs @@ -1,7 +1,7 @@ -// check-pass -// incremental -// compile-flags: -Z query-dep-graph -// edition:2018 +//@ check-pass +//@ incremental +//@ compile-flags: -Z query-dep-graph +//@ edition:2018 // Regression test for ICE related to `await`ing in a method + incr. comp. (#64964) diff --git a/tests/ui/async-await/issues/issue-65159.rs b/tests/ui/async-await/issues/issue-65159.rs index 7197a4fb91a..781f8fe88d4 100644 --- a/tests/ui/async-await/issues/issue-65159.rs +++ b/tests/ui/async-await/issues/issue-65159.rs @@ -1,6 +1,6 @@ // Regression test for #65159. We used to ICE. // -// edition:2018 +//@ edition:2018 async fn copy() -> Result<()> //~^ ERROR enum takes 2 generic arguments diff --git a/tests/ui/async-await/issues/issue-65419/issue-65419-async-fn-resume-after-completion.rs b/tests/ui/async-await/issues/issue-65419/issue-65419-async-fn-resume-after-completion.rs index 9ed7a5d210e..a6e53c06e31 100644 --- a/tests/ui/async-await/issues/issue-65419/issue-65419-async-fn-resume-after-completion.rs +++ b/tests/ui/async-await/issues/issue-65419/issue-65419-async-fn-resume-after-completion.rs @@ -1,12 +1,12 @@ // issue 65419 - Attempting to run an async fn after completion mentions coroutines when it should // be talking about `async fn`s instead. -// run-fail -// error-pattern: thread 'main' panicked -// error-pattern: `async fn` resumed after completion -// edition:2018 -// ignore-wasm no panic or subprocess support -// ignore-emscripten no panic or subprocess support +//@ run-fail +//@ error-pattern: thread 'main' panicked +//@ error-pattern: `async fn` resumed after completion +//@ edition:2018 +//@ ignore-wasm no panic or subprocess support +//@ ignore-emscripten no panic or subprocess support #![feature(coroutines, coroutine_trait)] diff --git a/tests/ui/async-await/issues/issue-65419/issue-65419-async-fn-resume-after-panic.rs b/tests/ui/async-await/issues/issue-65419/issue-65419-async-fn-resume-after-panic.rs index 51e9a54e48a..d64184c1012 100644 --- a/tests/ui/async-await/issues/issue-65419/issue-65419-async-fn-resume-after-panic.rs +++ b/tests/ui/async-await/issues/issue-65419/issue-65419-async-fn-resume-after-panic.rs @@ -1,12 +1,12 @@ // issue 65419 - Attempting to run an async fn after completion mentions coroutines when it should // be talking about `async fn`s instead. Should also test what happens when it panics. -// run-fail -// needs-unwind -// error-pattern: thread 'main' panicked -// error-pattern: `async fn` resumed after panicking -// edition:2018 -// ignore-wasm no panic or subprocess support +//@ run-fail +//@ needs-unwind +//@ error-pattern: thread 'main' panicked +//@ error-pattern: `async fn` resumed after panicking +//@ edition:2018 +//@ ignore-wasm no panic or subprocess support #![feature(coroutines, coroutine_trait)] diff --git a/tests/ui/async-await/issues/issue-65419/issue-65419-coroutine-resume-after-completion.rs b/tests/ui/async-await/issues/issue-65419/issue-65419-coroutine-resume-after-completion.rs index e16b86f9579..7a23457e62a 100644 --- a/tests/ui/async-await/issues/issue-65419/issue-65419-coroutine-resume-after-completion.rs +++ b/tests/ui/async-await/issues/issue-65419/issue-65419-coroutine-resume-after-completion.rs @@ -2,11 +2,11 @@ // be talking about `async fn`s instead. Regression test added to make sure coroutines still // panic when resumed after completion. -// run-fail -// error-pattern:coroutine resumed after completion -// edition:2018 -// ignore-wasm no panic or subprocess support -// ignore-emscripten no panic or subprocess support +//@ run-fail +//@ error-pattern:coroutine resumed after completion +//@ edition:2018 +//@ ignore-wasm no panic or subprocess support +//@ ignore-emscripten no panic or subprocess support #![feature(coroutines, coroutine_trait)] diff --git a/tests/ui/async-await/issues/issue-65436-raw-ptr-not-send.rs b/tests/ui/async-await/issues/issue-65436-raw-ptr-not-send.rs index ef6f105f34a..12d22c330ae 100644 --- a/tests/ui/async-await/issues/issue-65436-raw-ptr-not-send.rs +++ b/tests/ui/async-await/issues/issue-65436-raw-ptr-not-send.rs @@ -1,5 +1,5 @@ -// edition:2018 -// check-pass +//@ edition:2018 +//@ check-pass struct Foo(*const u8); diff --git a/tests/ui/async-await/issues/issue-66695-static-refs.rs b/tests/ui/async-await/issues/issue-66695-static-refs.rs index 1b0e1c6c9e7..5bf92f966f4 100644 --- a/tests/ui/async-await/issues/issue-66695-static-refs.rs +++ b/tests/ui/async-await/issues/issue-66695-static-refs.rs @@ -1,5 +1,5 @@ -// build-pass -// edition:2018 +//@ build-pass +//@ edition:2018 #![feature(if_let_guard)] diff --git a/tests/ui/async-await/issues/issue-66958-non-copy-infered-type-arg.rs b/tests/ui/async-await/issues/issue-66958-non-copy-infered-type-arg.rs index b7a976a0af6..7d874398d30 100644 --- a/tests/ui/async-await/issues/issue-66958-non-copy-infered-type-arg.rs +++ b/tests/ui/async-await/issues/issue-66958-non-copy-infered-type-arg.rs @@ -1,4 +1,4 @@ -// edition:2018 +//@ edition:2018 struct Ia(S); diff --git a/tests/ui/async-await/issues/issue-67611-static-mut-refs.rs b/tests/ui/async-await/issues/issue-67611-static-mut-refs.rs index caed762691e..51e85931dbf 100644 --- a/tests/ui/async-await/issues/issue-67611-static-mut-refs.rs +++ b/tests/ui/async-await/issues/issue-67611-static-mut-refs.rs @@ -1,5 +1,5 @@ -// build-pass -// edition:2018 +//@ build-pass +//@ edition:2018 #![feature(if_let_guard)] diff --git a/tests/ui/async-await/issues/issue-67893.rs b/tests/ui/async-await/issues/issue-67893.rs index 359c75f170c..73cce38c94a 100644 --- a/tests/ui/async-await/issues/issue-67893.rs +++ b/tests/ui/async-await/issues/issue-67893.rs @@ -1,5 +1,5 @@ -// aux-build: issue_67893.rs -// edition:2018 +//@ aux-build: issue_67893.rs +//@ edition:2018 extern crate issue_67893; diff --git a/tests/ui/async-await/issues/issue-69307-nested.rs b/tests/ui/async-await/issues/issue-69307-nested.rs index b7cdf3987f1..fdffb72f64b 100644 --- a/tests/ui/async-await/issues/issue-69307-nested.rs +++ b/tests/ui/async-await/issues/issue-69307-nested.rs @@ -4,8 +4,8 @@ // expression was causing an ICE due to a failure to save/restore // state in the AST numbering pass when entering a nested body. // -// check-pass -// edition:2018 +//@ check-pass +//@ edition:2018 fn block_on(_: F) -> usize { 0 diff --git a/tests/ui/async-await/issues/issue-69307.rs b/tests/ui/async-await/issues/issue-69307.rs index 59309a7f288..b22e078a309 100644 --- a/tests/ui/async-await/issues/issue-69307.rs +++ b/tests/ui/async-await/issues/issue-69307.rs @@ -4,8 +4,8 @@ // expression was causing an ICE due to a failure to save/restore // state in the AST numbering pass when entering a nested body. // -// check-pass -// edition:2018 +//@ check-pass +//@ edition:2018 fn block_on(_: F) -> usize { 0 diff --git a/tests/ui/async-await/issues/issue-72312.rs b/tests/ui/async-await/issues/issue-72312.rs index 74122cf00a9..ba4c3910585 100644 --- a/tests/ui/async-await/issues/issue-72312.rs +++ b/tests/ui/async-await/issues/issue-72312.rs @@ -1,4 +1,4 @@ -// edition:2018 +//@ edition:2018 fn require_static(val: T) -> T { val } diff --git a/tests/ui/async-await/issues/issue-78600.rs b/tests/ui/async-await/issues/issue-78600.rs index 4303fc7952f..1326546e930 100644 --- a/tests/ui/async-await/issues/issue-78600.rs +++ b/tests/ui/async-await/issues/issue-78600.rs @@ -1,5 +1,5 @@ -// check-pass -// edition:2018 +//@ check-pass +//@ edition:2018 struct S<'a>(&'a i32); diff --git a/tests/ui/async-await/issues/issue-78654.rs b/tests/ui/async-await/issues/issue-78654.rs index cc6dc383469..eb8bf27ff83 100644 --- a/tests/ui/async-await/issues/issue-78654.rs +++ b/tests/ui/async-await/issues/issue-78654.rs @@ -1,5 +1,5 @@ -// edition:2018 -// revisions: full min +//@ edition:2018 +//@ revisions: full min #![cfg_attr(full, feature(adt_const_params))] #![cfg_attr(full, allow(incomplete_features))] diff --git a/tests/ui/async-await/issues/issue-78938-async-block.rs b/tests/ui/async-await/issues/issue-78938-async-block.rs index 36f71601985..1aeefa58e02 100644 --- a/tests/ui/async-await/issues/issue-78938-async-block.rs +++ b/tests/ui/async-await/issues/issue-78938-async-block.rs @@ -1,4 +1,4 @@ -// edition:2018 +//@ edition:2018 use std::{sync::Arc, future::Future, pin::Pin, task::{Context, Poll}}; diff --git a/tests/ui/async-await/issues/issue-95307.rs b/tests/ui/async-await/issues/issue-95307.rs index 35dce2c6217..40700c610f3 100644 --- a/tests/ui/async-await/issues/issue-95307.rs +++ b/tests/ui/async-await/issues/issue-95307.rs @@ -1,4 +1,4 @@ -// edition:2018 +//@ edition:2018 // Regression test for #95307. // The ICE occurred on all the editions, specifying edition:2018 to reduce diagnostics. diff --git a/tests/ui/async-await/issues/non-async-enclosing-span.rs b/tests/ui/async-await/issues/non-async-enclosing-span.rs index d47c2137725..3943a66c6e7 100644 --- a/tests/ui/async-await/issues/non-async-enclosing-span.rs +++ b/tests/ui/async-await/issues/non-async-enclosing-span.rs @@ -1,4 +1,4 @@ -// edition:2018 +//@ edition:2018 async fn do_the_thing() -> u8 { 8 diff --git a/tests/ui/async-await/missed-capture-issue-107414.rs b/tests/ui/async-await/missed-capture-issue-107414.rs index bb14eb74b3a..0249fd9bbb0 100644 --- a/tests/ui/async-await/missed-capture-issue-107414.rs +++ b/tests/ui/async-await/missed-capture-issue-107414.rs @@ -1,5 +1,5 @@ -// check-pass -// edition:2018 +//@ check-pass +//@ edition:2018 #![feature(if_let_guard)] diff --git a/tests/ui/async-await/missing-return-in-async-block.fixed b/tests/ui/async-await/missing-return-in-async-block.fixed index 3dbac7945b6..625079c3fbc 100644 --- a/tests/ui/async-await/missing-return-in-async-block.fixed +++ b/tests/ui/async-await/missing-return-in-async-block.fixed @@ -1,5 +1,5 @@ -// run-rustfix -// edition:2021 +//@ run-rustfix +//@ edition:2021 use std::future::Future; use std::pin::Pin; pub struct S; diff --git a/tests/ui/async-await/missing-return-in-async-block.rs b/tests/ui/async-await/missing-return-in-async-block.rs index 7d04e0e0fad..a5b03fd3c90 100644 --- a/tests/ui/async-await/missing-return-in-async-block.rs +++ b/tests/ui/async-await/missing-return-in-async-block.rs @@ -1,5 +1,5 @@ -// run-rustfix -// edition:2021 +//@ run-rustfix +//@ edition:2021 use std::future::Future; use std::pin::Pin; pub struct S; diff --git a/tests/ui/async-await/move-part-await-return-rest-struct.rs b/tests/ui/async-await/move-part-await-return-rest-struct.rs index 39ea2aae563..ee817f16ace 100644 --- a/tests/ui/async-await/move-part-await-return-rest-struct.rs +++ b/tests/ui/async-await/move-part-await-return-rest-struct.rs @@ -1,6 +1,6 @@ -// build-pass -// edition:2018 -// compile-flags: --crate-type lib +//@ build-pass +//@ edition:2018 +//@ compile-flags: --crate-type lib struct Small { x: Vec, diff --git a/tests/ui/async-await/move-part-await-return-rest-tuple.rs b/tests/ui/async-await/move-part-await-return-rest-tuple.rs index 7b958b98b41..c7c15e66fc0 100644 --- a/tests/ui/async-await/move-part-await-return-rest-tuple.rs +++ b/tests/ui/async-await/move-part-await-return-rest-tuple.rs @@ -1,6 +1,6 @@ -// build-pass -// edition:2018 -// compile-flags: --crate-type lib +//@ build-pass +//@ edition:2018 +//@ compile-flags: --crate-type lib async fn move_part_await_return_rest_tuple() -> Vec { let x = (vec![3], vec![4, 4]); diff --git a/tests/ui/async-await/multiple-lifetimes/elided.rs b/tests/ui/async-await/multiple-lifetimes/elided.rs index 8258e2eff52..954695d0aa8 100644 --- a/tests/ui/async-await/multiple-lifetimes/elided.rs +++ b/tests/ui/async-await/multiple-lifetimes/elided.rs @@ -1,5 +1,5 @@ -// edition:2018 -// run-pass +//@ edition:2018 +//@ run-pass // Test that we can use async fns with multiple arbitrary lifetimes. diff --git a/tests/ui/async-await/multiple-lifetimes/fn-ptr.rs b/tests/ui/async-await/multiple-lifetimes/fn-ptr.rs index 3912b854747..5ff06b1c3c5 100644 --- a/tests/ui/async-await/multiple-lifetimes/fn-ptr.rs +++ b/tests/ui/async-await/multiple-lifetimes/fn-ptr.rs @@ -1,5 +1,5 @@ -// edition:2018 -// run-pass +//@ edition:2018 +//@ run-pass // Test that we can use async fns with multiple arbitrary lifetimes. diff --git a/tests/ui/async-await/multiple-lifetimes/hrtb.rs b/tests/ui/async-await/multiple-lifetimes/hrtb.rs index e788ca5ff49..f9c062fc363 100644 --- a/tests/ui/async-await/multiple-lifetimes/hrtb.rs +++ b/tests/ui/async-await/multiple-lifetimes/hrtb.rs @@ -1,5 +1,5 @@ -// edition:2018 -// check-pass +//@ edition:2018 +//@ check-pass // Test that we can use async fns with multiple arbitrary lifetimes. diff --git a/tests/ui/async-await/multiple-lifetimes/member-constraints-min-choice-issue-63033.rs b/tests/ui/async-await/multiple-lifetimes/member-constraints-min-choice-issue-63033.rs index 614f1897291..c53fa274382 100644 --- a/tests/ui/async-await/multiple-lifetimes/member-constraints-min-choice-issue-63033.rs +++ b/tests/ui/async-await/multiple-lifetimes/member-constraints-min-choice-issue-63033.rs @@ -1,7 +1,7 @@ // Regression test for #63033. -// check-pass -// edition: 2018 +//@ check-pass +//@ edition: 2018 async fn test1(_: &'static u8, _: &'_ u8, _: &'_ u8) {} diff --git a/tests/ui/async-await/multiple-lifetimes/named.rs b/tests/ui/async-await/multiple-lifetimes/named.rs index e8eb98102f4..c933765c910 100644 --- a/tests/ui/async-await/multiple-lifetimes/named.rs +++ b/tests/ui/async-await/multiple-lifetimes/named.rs @@ -1,5 +1,5 @@ -// edition:2018 -// run-pass +//@ edition:2018 +//@ run-pass // Test that we can use async fns with multiple arbitrary lifetimes. diff --git a/tests/ui/async-await/multiple-lifetimes/partial-relation.rs b/tests/ui/async-await/multiple-lifetimes/partial-relation.rs index 7375cb6d3a0..8a82cc9e220 100644 --- a/tests/ui/async-await/multiple-lifetimes/partial-relation.rs +++ b/tests/ui/async-await/multiple-lifetimes/partial-relation.rs @@ -1,5 +1,5 @@ -// edition:2018 -// run-pass +//@ edition:2018 +//@ run-pass async fn lotsa_lifetimes<'a, 'b, 'c>(a: &'a u32, b: &'b u32, c: &'c u32) -> (&'a u32, &'b u32) where 'b: 'a diff --git a/tests/ui/async-await/multiple-lifetimes/ret-impl-trait-fg.rs b/tests/ui/async-await/multiple-lifetimes/ret-impl-trait-fg.rs index f1002947fb9..3c6b847caaf 100644 --- a/tests/ui/async-await/multiple-lifetimes/ret-impl-trait-fg.rs +++ b/tests/ui/async-await/multiple-lifetimes/ret-impl-trait-fg.rs @@ -1,5 +1,5 @@ -// edition:2018 -// run-pass +//@ edition:2018 +//@ run-pass // Test member constraints that appear in the `impl Trait` // return type of an async function. diff --git a/tests/ui/async-await/multiple-lifetimes/ret-impl-trait-one.rs b/tests/ui/async-await/multiple-lifetimes/ret-impl-trait-one.rs index aebc77d265e..54d55ee67ca 100644 --- a/tests/ui/async-await/multiple-lifetimes/ret-impl-trait-one.rs +++ b/tests/ui/async-await/multiple-lifetimes/ret-impl-trait-one.rs @@ -1,4 +1,4 @@ -// edition:2018 +//@ edition:2018 // Test that a feature gate is needed to use `impl Trait` as the // return type of an async. diff --git a/tests/ui/async-await/multiple-lifetimes/ret-ref.rs b/tests/ui/async-await/multiple-lifetimes/ret-ref.rs index 149c020f9cb..0d7b870d31b 100644 --- a/tests/ui/async-await/multiple-lifetimes/ret-ref.rs +++ b/tests/ui/async-await/multiple-lifetimes/ret-ref.rs @@ -1,4 +1,4 @@ -// edition:2018 +//@ edition:2018 // Test that we get the expected borrow check errors when an async // function (which takes multiple lifetimes) only returns data from diff --git a/tests/ui/async-await/multiple-lifetimes/variance.rs b/tests/ui/async-await/multiple-lifetimes/variance.rs index 6ed8bef956a..b578819c67b 100644 --- a/tests/ui/async-await/multiple-lifetimes/variance.rs +++ b/tests/ui/async-await/multiple-lifetimes/variance.rs @@ -1,5 +1,5 @@ -// edition:2018 -// run-pass +//@ edition:2018 +//@ run-pass // Test for async fn where the parameters have distinct lifetime // parameters that appear in all possible variances. diff --git a/tests/ui/async-await/mutually-recursive-async-impl-trait-type.rs b/tests/ui/async-await/mutually-recursive-async-impl-trait-type.rs index fedc814b041..645a136eeb4 100644 --- a/tests/ui/async-await/mutually-recursive-async-impl-trait-type.rs +++ b/tests/ui/async-await/mutually-recursive-async-impl-trait-type.rs @@ -1,4 +1,4 @@ -// edition:2018 +//@ edition:2018 // Test that impl trait does not allow creating recursive types that are // otherwise forbidden when using `async` and `await`. diff --git a/tests/ui/async-await/nested-in-impl.rs b/tests/ui/async-await/nested-in-impl.rs index 76ed827d597..aebcf43c427 100644 --- a/tests/ui/async-await/nested-in-impl.rs +++ b/tests/ui/async-await/nested-in-impl.rs @@ -1,8 +1,8 @@ // Test that async fn works when nested inside of // impls with lifetime parameters. // -// check-pass -// edition:2018 +//@ check-pass +//@ edition:2018 struct Foo<'a>(&'a ()); diff --git a/tests/ui/async-await/no-async-const.rs b/tests/ui/async-await/no-async-const.rs index c9941d1c5a0..c5485ebc9b6 100644 --- a/tests/ui/async-await/no-async-const.rs +++ b/tests/ui/async-await/no-async-const.rs @@ -1,5 +1,5 @@ -// edition:2018 -// compile-flags: --crate-type lib +//@ edition:2018 +//@ compile-flags: --crate-type lib pub async const fn x() {} //~^ ERROR expected one of `extern`, `fn`, or `unsafe`, found keyword `const` diff --git a/tests/ui/async-await/no-const-async.rs b/tests/ui/async-await/no-const-async.rs index b3c59734e03..937a1c4bdf7 100644 --- a/tests/ui/async-await/no-const-async.rs +++ b/tests/ui/async-await/no-const-async.rs @@ -1,5 +1,5 @@ -// edition:2018 -// compile-flags: --crate-type lib +//@ edition:2018 +//@ compile-flags: --crate-type lib pub const async fn x() {} //~^ ERROR functions cannot be both `const` and `async` diff --git a/tests/ui/async-await/no-move-across-await-struct.rs b/tests/ui/async-await/no-move-across-await-struct.rs index 51c9a42b3f4..4087b292648 100644 --- a/tests/ui/async-await/no-move-across-await-struct.rs +++ b/tests/ui/async-await/no-move-across-await-struct.rs @@ -1,5 +1,5 @@ -// edition:2018 -// compile-flags: --crate-type lib +//@ edition:2018 +//@ compile-flags: --crate-type lib async fn no_move_across_await_struct() -> Vec { let s = Small { x: vec![31], y: vec![19, 1441] }; diff --git a/tests/ui/async-await/no-move-across-await-tuple.rs b/tests/ui/async-await/no-move-across-await-tuple.rs index a656332698c..972aed87d34 100644 --- a/tests/ui/async-await/no-move-across-await-tuple.rs +++ b/tests/ui/async-await/no-move-across-await-tuple.rs @@ -1,5 +1,5 @@ -// edition:2018 -// compile-flags: --crate-type lib +//@ edition:2018 +//@ compile-flags: --crate-type lib async fn no_move_across_await_tuple() -> Vec { let x = (vec![3], vec![4, 4]); diff --git a/tests/ui/async-await/no-non-guaranteed-initialization.rs b/tests/ui/async-await/no-non-guaranteed-initialization.rs index c4d81bf83a3..f5ab5309e2d 100644 --- a/tests/ui/async-await/no-non-guaranteed-initialization.rs +++ b/tests/ui/async-await/no-non-guaranteed-initialization.rs @@ -1,5 +1,5 @@ -// edition:2018 -// compile-flags: --crate-type lib +//@ edition:2018 +//@ compile-flags: --crate-type lib async fn no_non_guaranteed_initialization(x: usize) -> usize { let y; diff --git a/tests/ui/async-await/no-params-non-move-async-closure.rs b/tests/ui/async-await/no-params-non-move-async-closure.rs index 1440d918c50..e9e43b3484a 100644 --- a/tests/ui/async-await/no-params-non-move-async-closure.rs +++ b/tests/ui/async-await/no-params-non-move-async-closure.rs @@ -1,5 +1,5 @@ -// edition:2018 -// check-pass +//@ edition:2018 +//@ check-pass #![feature(async_closure)] diff --git a/tests/ui/async-await/no-std.rs b/tests/ui/async-await/no-std.rs index 63e93cdff7e..92f7d996882 100644 --- a/tests/ui/async-await/no-std.rs +++ b/tests/ui/async-await/no-std.rs @@ -1,5 +1,5 @@ -// edition:2018 -// check-pass +//@ edition:2018 +//@ check-pass #![no_std] #![crate_type = "rlib"] diff --git a/tests/ui/async-await/no-unsafe-async.rs b/tests/ui/async-await/no-unsafe-async.rs index 7c6811d81ee..e58d878c3db 100644 --- a/tests/ui/async-await/no-unsafe-async.rs +++ b/tests/ui/async-await/no-unsafe-async.rs @@ -1,4 +1,4 @@ -// edition:2018 +//@ edition:2018 struct S; diff --git a/tests/ui/async-await/non-trivial-drop.rs b/tests/ui/async-await/non-trivial-drop.rs index 1004303d5c1..71b88124219 100644 --- a/tests/ui/async-await/non-trivial-drop.rs +++ b/tests/ui/async-await/non-trivial-drop.rs @@ -1,5 +1,5 @@ -// build-pass -// edition:2018 +//@ build-pass +//@ edition:2018 #![feature(coroutines)] diff --git a/tests/ui/async-await/normalize-output-in-signature-deduction.rs b/tests/ui/async-await/normalize-output-in-signature-deduction.rs index e07fe9e98ec..177e8625531 100644 --- a/tests/ui/async-await/normalize-output-in-signature-deduction.rs +++ b/tests/ui/async-await/normalize-output-in-signature-deduction.rs @@ -1,7 +1,7 @@ -// edition:2021 -// revisions: current next -//[next] compile-flags: -Znext-solver -// check-pass +//@ edition:2021 +//@ revisions: current next +//@[next] compile-flags: -Znext-solver +//@ check-pass #![feature(type_alias_impl_trait)] diff --git a/tests/ui/async-await/partial-drop-partial-reinit.rs b/tests/ui/async-await/partial-drop-partial-reinit.rs index 815cc916b41..36b3f2bc9ff 100644 --- a/tests/ui/async-await/partial-drop-partial-reinit.rs +++ b/tests/ui/async-await/partial-drop-partial-reinit.rs @@ -1,4 +1,4 @@ -// edition:2021 +//@ edition:2021 #![feature(negative_impls)] #![allow(unused)] diff --git a/tests/ui/async-await/partial-initialization-across-await.rs b/tests/ui/async-await/partial-initialization-across-await.rs index 7577aee3fb7..b355739f70b 100644 --- a/tests/ui/async-await/partial-initialization-across-await.rs +++ b/tests/ui/async-await/partial-initialization-across-await.rs @@ -1,7 +1,7 @@ // Test that we don't allow awaiting from an async fn while a local is partially // initialized. -// edition:2018 +//@ edition:2018 struct S { x: i32, y: i32 } struct T(i32, i32); diff --git a/tests/ui/async-await/proper-span-for-type-error.fixed b/tests/ui/async-await/proper-span-for-type-error.fixed index 7d43b575d2f..03e808fe7a6 100644 --- a/tests/ui/async-await/proper-span-for-type-error.fixed +++ b/tests/ui/async-await/proper-span-for-type-error.fixed @@ -1,5 +1,5 @@ -// edition:2021 -// run-rustfix +//@ edition:2021 +//@ run-rustfix #![allow(dead_code)] async fn a() {} diff --git a/tests/ui/async-await/proper-span-for-type-error.rs b/tests/ui/async-await/proper-span-for-type-error.rs index 00ccde1bf99..b0c8d5f9b99 100644 --- a/tests/ui/async-await/proper-span-for-type-error.rs +++ b/tests/ui/async-await/proper-span-for-type-error.rs @@ -1,5 +1,5 @@ -// edition:2021 -// run-rustfix +//@ edition:2021 +//@ run-rustfix #![allow(dead_code)] async fn a() {} diff --git a/tests/ui/async-await/recursive-async-impl-trait-type.rs b/tests/ui/async-await/recursive-async-impl-trait-type.rs index 9351ee53f07..c68f8c31ded 100644 --- a/tests/ui/async-await/recursive-async-impl-trait-type.rs +++ b/tests/ui/async-await/recursive-async-impl-trait-type.rs @@ -1,4 +1,4 @@ -// edition:2018 +//@ edition:2018 // Test that impl trait does not allow creating recursive types that are // otherwise forbidden when using `async` and `await`. diff --git a/tests/ui/async-await/repeat_count_const_in_async_fn.rs b/tests/ui/async-await/repeat_count_const_in_async_fn.rs index ebabc3fbf10..5e40df27116 100644 --- a/tests/ui/async-await/repeat_count_const_in_async_fn.rs +++ b/tests/ui/async-await/repeat_count_const_in_async_fn.rs @@ -1,6 +1,6 @@ -// check-pass -// edition:2018 -// compile-flags: --crate-type=lib +//@ check-pass +//@ edition:2018 +//@ compile-flags: --crate-type=lib pub async fn test() { const C: usize = 4; diff --git a/tests/ui/async-await/return-ty-raw-ptr-coercion.rs b/tests/ui/async-await/return-ty-raw-ptr-coercion.rs index 9fe0869cad6..b4a102e8efc 100644 --- a/tests/ui/async-await/return-ty-raw-ptr-coercion.rs +++ b/tests/ui/async-await/return-ty-raw-ptr-coercion.rs @@ -2,8 +2,8 @@ // // Also serves as a regression test for #60424. // -// edition:2018 -// check-pass +//@ edition:2018 +//@ check-pass #![allow(warnings)] diff --git a/tests/ui/async-await/return-ty-unsize-coercion.rs b/tests/ui/async-await/return-ty-unsize-coercion.rs index 93832ef7edd..5bc1644d74e 100644 --- a/tests/ui/async-await/return-ty-unsize-coercion.rs +++ b/tests/ui/async-await/return-ty-unsize-coercion.rs @@ -2,8 +2,8 @@ // // Also serves as a regression test for #60424. // -// edition:2018 -// check-pass +//@ edition:2018 +//@ check-pass #![allow(warnings)] diff --git a/tests/ui/async-await/return-type-notation/issue-110963-early.rs b/tests/ui/async-await/return-type-notation/issue-110963-early.rs index 07f2130bab5..4090912f528 100644 --- a/tests/ui/async-await/return-type-notation/issue-110963-early.rs +++ b/tests/ui/async-await/return-type-notation/issue-110963-early.rs @@ -1,5 +1,5 @@ -// edition: 2021 -// known-bug: #110963 +//@ edition: 2021 +//@ known-bug: #110963 #![feature(return_type_notation)] diff --git a/tests/ui/async-await/return-type-notation/issue-110963-late.rs b/tests/ui/async-await/return-type-notation/issue-110963-late.rs index 7533844fb43..e0e59b6c6ad 100644 --- a/tests/ui/async-await/return-type-notation/issue-110963-late.rs +++ b/tests/ui/async-await/return-type-notation/issue-110963-late.rs @@ -1,5 +1,5 @@ -// edition: 2021 -// check-pass +//@ edition: 2021 +//@ check-pass #![feature(return_type_notation)] //~^ WARN the feature `return_type_notation` is incomplete diff --git a/tests/ui/async-await/return-type-notation/normalizing-self-auto-trait-issue-109924.rs b/tests/ui/async-await/return-type-notation/normalizing-self-auto-trait-issue-109924.rs index 5341c39a975..0e167b149f3 100644 --- a/tests/ui/async-await/return-type-notation/normalizing-self-auto-trait-issue-109924.rs +++ b/tests/ui/async-await/return-type-notation/normalizing-self-auto-trait-issue-109924.rs @@ -1,7 +1,7 @@ -// check-pass -// revisions: current next -//[next] compile-flags: -Znext-solver -// edition:2021 +//@ check-pass +//@ revisions: current next +//@[next] compile-flags: -Znext-solver +//@ edition:2021 #![feature(return_type_notation)] //~^ WARN the feature `return_type_notation` is incomplete diff --git a/tests/ui/async-await/return-type-notation/rtn-implied-in-supertrait.rs b/tests/ui/async-await/return-type-notation/rtn-implied-in-supertrait.rs index 0ceb62d449a..365ca574006 100644 --- a/tests/ui/async-await/return-type-notation/rtn-implied-in-supertrait.rs +++ b/tests/ui/async-await/return-type-notation/rtn-implied-in-supertrait.rs @@ -1,5 +1,5 @@ -// edition:2021 -// check-pass +//@ edition:2021 +//@ check-pass #![feature(return_type_notation)] //~^ WARN the feature `return_type_notation` is incomplete diff --git a/tests/ui/async-await/return-type-notation/super-method-bound-ambig.rs b/tests/ui/async-await/return-type-notation/super-method-bound-ambig.rs index 73c08531599..fa647ea0bc7 100644 --- a/tests/ui/async-await/return-type-notation/super-method-bound-ambig.rs +++ b/tests/ui/async-await/return-type-notation/super-method-bound-ambig.rs @@ -1,4 +1,4 @@ -// edition:2021 +//@ edition:2021 #![feature(return_type_notation)] //~^ WARN the feature `return_type_notation` is incomplete diff --git a/tests/ui/async-await/return-type-notation/super-method-bound.rs b/tests/ui/async-await/return-type-notation/super-method-bound.rs index 6025cda2f5d..ad7ed5b283c 100644 --- a/tests/ui/async-await/return-type-notation/super-method-bound.rs +++ b/tests/ui/async-await/return-type-notation/super-method-bound.rs @@ -1,5 +1,5 @@ -// edition:2021 -// check-pass +//@ edition:2021 +//@ check-pass #![feature(return_type_notation)] //~^ WARN the feature `return_type_notation` is incomplete diff --git a/tests/ui/async-await/return-type-notation/supertrait-bound.rs b/tests/ui/async-await/return-type-notation/supertrait-bound.rs index a85596a9fee..adb286a21d2 100644 --- a/tests/ui/async-await/return-type-notation/supertrait-bound.rs +++ b/tests/ui/async-await/return-type-notation/supertrait-bound.rs @@ -1,4 +1,4 @@ -// check-pass +//@ check-pass #![feature(return_type_notation)] //~^ WARN the feature `return_type_notation` is incomplete and may not be safe to use diff --git a/tests/ui/async-await/return-type-notation/ty-or-ct-params.rs b/tests/ui/async-await/return-type-notation/ty-or-ct-params.rs index ac320cfc679..328cd8d2ad0 100644 --- a/tests/ui/async-await/return-type-notation/ty-or-ct-params.rs +++ b/tests/ui/async-await/return-type-notation/ty-or-ct-params.rs @@ -1,4 +1,4 @@ -// edition: 2021 +//@ edition: 2021 #![feature(return_type_notation)] //~^ WARN the feature `return_type_notation` is incomplete diff --git a/tests/ui/async-await/send-bound-async-closure.rs b/tests/ui/async-await/send-bound-async-closure.rs index 2ec006da359..2732fa5d466 100644 --- a/tests/ui/async-await/send-bound-async-closure.rs +++ b/tests/ui/async-await/send-bound-async-closure.rs @@ -1,5 +1,5 @@ -// edition: 2021 -// check-pass +//@ edition: 2021 +//@ check-pass // This test verifies that we do not create a query cycle when typechecking has several inference // variables that point to the same coroutine interior type. diff --git a/tests/ui/async-await/suggest-missing-await-closure.fixed b/tests/ui/async-await/suggest-missing-await-closure.fixed index febcd021842..1ec3456a265 100644 --- a/tests/ui/async-await/suggest-missing-await-closure.fixed +++ b/tests/ui/async-await/suggest-missing-await-closure.fixed @@ -1,5 +1,5 @@ -// edition:2018 -// run-rustfix +//@ edition:2018 +//@ run-rustfix #![feature(async_closure)] diff --git a/tests/ui/async-await/suggest-missing-await-closure.rs b/tests/ui/async-await/suggest-missing-await-closure.rs index faabf6ee3f1..3a448ad411b 100644 --- a/tests/ui/async-await/suggest-missing-await-closure.rs +++ b/tests/ui/async-await/suggest-missing-await-closure.rs @@ -1,5 +1,5 @@ -// edition:2018 -// run-rustfix +//@ edition:2018 +//@ run-rustfix #![feature(async_closure)] diff --git a/tests/ui/async-await/suggest-missing-await.rs b/tests/ui/async-await/suggest-missing-await.rs index 796f82e779c..96996af0bd2 100644 --- a/tests/ui/async-await/suggest-missing-await.rs +++ b/tests/ui/async-await/suggest-missing-await.rs @@ -1,4 +1,4 @@ -// edition:2018 +//@ edition:2018 fn take_u32(_x: u32) {} diff --git a/tests/ui/async-await/suggest-switching-edition-on-await-cargo.rs b/tests/ui/async-await/suggest-switching-edition-on-await-cargo.rs index 4a3195174df..e5a3d54c5d0 100644 --- a/tests/ui/async-await/suggest-switching-edition-on-await-cargo.rs +++ b/tests/ui/async-await/suggest-switching-edition-on-await-cargo.rs @@ -1,4 +1,4 @@ -// rustc-env:CARGO=/usr/bin/cargo +//@ rustc-env:CARGO=/usr/bin/cargo use std::pin::Pin; use std::future::Future; diff --git a/tests/ui/async-await/task-context-arg.rs b/tests/ui/async-await/task-context-arg.rs index 45b18d56b1c..c377fd2d145 100644 --- a/tests/ui/async-await/task-context-arg.rs +++ b/tests/ui/async-await/task-context-arg.rs @@ -1,9 +1,9 @@ // Checks that we don't get conflicting arguments in our debug info with a particular async function // structure. -// edition:2021 -// compile-flags: -Cdebuginfo=2 -// build-pass +//@ edition:2021 +//@ compile-flags: -Cdebuginfo=2 +//@ build-pass #![crate_type = "lib"] diff --git a/tests/ui/async-await/track-caller/async-block.rs b/tests/ui/async-await/track-caller/async-block.rs index 24711b966b5..900d5ef2550 100644 --- a/tests/ui/async-await/track-caller/async-block.rs +++ b/tests/ui/async-await/track-caller/async-block.rs @@ -1,5 +1,5 @@ -// edition:2021 -// revisions: afn nofeat +//@ edition:2021 +//@ revisions: afn nofeat #![feature(stmt_expr_attributes)] #![cfg_attr(afn, feature(async_fn_track_caller))] diff --git a/tests/ui/async-await/track-caller/async-closure-gate.rs b/tests/ui/async-await/track-caller/async-closure-gate.rs index 911934a2232..4b88255bc36 100644 --- a/tests/ui/async-await/track-caller/async-closure-gate.rs +++ b/tests/ui/async-await/track-caller/async-closure-gate.rs @@ -1,5 +1,5 @@ -// edition:2021 -// revisions: afn nofeat +//@ edition:2021 +//@ revisions: afn nofeat #![feature(async_closure, stmt_expr_attributes)] #![cfg_attr(afn, feature(async_fn_track_caller))] diff --git a/tests/ui/async-await/track-caller/issue-105134.rs b/tests/ui/async-await/track-caller/issue-105134.rs index 4e52b8e250b..c9f3d7e8c22 100644 --- a/tests/ui/async-await/track-caller/issue-105134.rs +++ b/tests/ui/async-await/track-caller/issue-105134.rs @@ -1,5 +1,5 @@ -// check-pass -// edition:2021 +//@ check-pass +//@ edition:2021 #[track_caller] fn f() { diff --git a/tests/ui/async-await/track-caller/panic-track-caller.rs b/tests/ui/async-await/track-caller/panic-track-caller.rs index df8290e5fff..c693a446eed 100644 --- a/tests/ui/async-await/track-caller/panic-track-caller.rs +++ b/tests/ui/async-await/track-caller/panic-track-caller.rs @@ -1,7 +1,7 @@ -// run-pass -// edition:2021 -// revisions: afn cls nofeat -// needs-unwind +//@ run-pass +//@ edition:2021 +//@ revisions: afn cls nofeat +//@ needs-unwind // gate-test-async_fn_track_caller #![feature(async_closure, stmt_expr_attributes)] #![cfg_attr(afn, feature(async_fn_track_caller))] diff --git a/tests/ui/async-await/try-on-option-in-async.rs b/tests/ui/async-await/try-on-option-in-async.rs index afaaed2ef6e..fda848141d3 100644 --- a/tests/ui/async-await/try-on-option-in-async.rs +++ b/tests/ui/async-await/try-on-option-in-async.rs @@ -1,5 +1,5 @@ #![feature(async_closure)] -// edition:2018 +//@ edition:2018 fn main() {} async fn an_async_block() -> u32 { diff --git a/tests/ui/async-await/type-parameter-send.rs b/tests/ui/async-await/type-parameter-send.rs index ab2b62aa5aa..8ca0555e096 100644 --- a/tests/ui/async-await/type-parameter-send.rs +++ b/tests/ui/async-await/type-parameter-send.rs @@ -1,6 +1,6 @@ -// check-pass -// compile-flags: --crate-type lib -// edition:2018 +//@ check-pass +//@ compile-flags: --crate-type lib +//@ edition:2018 fn assert_send(_: F) {} diff --git a/tests/ui/async-await/unnecessary-await.rs b/tests/ui/async-await/unnecessary-await.rs index 93b68f018e4..71df83fa350 100644 --- a/tests/ui/async-await/unnecessary-await.rs +++ b/tests/ui/async-await/unnecessary-await.rs @@ -1,4 +1,4 @@ -// edition:2018 +//@ edition:2018 async fn foo () { } fn bar() -> impl std::future::Future { async {} } diff --git a/tests/ui/async-await/unreachable-lint-1.rs b/tests/ui/async-await/unreachable-lint-1.rs index d63d643c4e7..b2639e2533c 100644 --- a/tests/ui/async-await/unreachable-lint-1.rs +++ b/tests/ui/async-await/unreachable-lint-1.rs @@ -1,4 +1,4 @@ -// edition:2018 +//@ edition:2018 #![deny(unreachable_code)] async fn foo() { diff --git a/tests/ui/async-await/unreachable-lint.rs b/tests/ui/async-await/unreachable-lint.rs index ca18cfde4f2..e8a58df384e 100644 --- a/tests/ui/async-await/unreachable-lint.rs +++ b/tests/ui/async-await/unreachable-lint.rs @@ -1,5 +1,5 @@ -// check-pass -// edition:2018 +//@ check-pass +//@ edition:2018 #![deny(unreachable_code)] async fn foo() { diff --git a/tests/ui/async-await/unresolved_type_param.rs b/tests/ui/async-await/unresolved_type_param.rs index dd5aa0dd077..ec874e3753f 100644 --- a/tests/ui/async-await/unresolved_type_param.rs +++ b/tests/ui/async-await/unresolved_type_param.rs @@ -1,7 +1,7 @@ // Provoke an unresolved type error (T). // Error message should pinpoint the type parameter T as needing to be bound // (rather than give a general error message) -// edition:2018 +//@ edition:2018 async fn bar() -> () {} diff --git a/tests/ui/async-await/unsized-across-await.rs b/tests/ui/async-await/unsized-across-await.rs index 32cb4f88eae..b6bd5567fb2 100644 --- a/tests/ui/async-await/unsized-across-await.rs +++ b/tests/ui/async-await/unsized-across-await.rs @@ -1,4 +1,4 @@ -// edition: 2021 +//@ edition: 2021 #![feature(unsized_locals)] //~^ WARN the feature `unsized_locals` is incomplete diff --git a/tests/ui/async-await/unused-lifetime.rs b/tests/ui/async-await/unused-lifetime.rs index 6cfd36ba9e8..5d827cf8df1 100644 --- a/tests/ui/async-await/unused-lifetime.rs +++ b/tests/ui/async-await/unused-lifetime.rs @@ -1,7 +1,7 @@ // Check "unused_lifetimes" lint on both async and sync functions // Both cases should be diagnosed the same way. -// edition:2018 +//@ edition:2018 #![deny(unused_lifetimes)] diff --git a/tests/ui/atomic-from-mut-not-available.rs b/tests/ui/atomic-from-mut-not-available.rs index bf946160075..8326187838a 100644 --- a/tests/ui/atomic-from-mut-not-available.rs +++ b/tests/ui/atomic-from-mut-not-available.rs @@ -1,5 +1,5 @@ -// only-x86 -// only-linux +//@ only-x86 +//@ only-linux fn main() { core::sync::atomic::AtomicU64::from_mut(&mut 0u64); diff --git a/tests/ui/attr-bad-crate-attr.rs b/tests/ui/attr-bad-crate-attr.rs index 89ba26dfd6f..b9100ecfb67 100644 --- a/tests/ui/attr-bad-crate-attr.rs +++ b/tests/ui/attr-bad-crate-attr.rs @@ -1,4 +1,4 @@ -// error-pattern: expected item +//@ error-pattern: expected item #![attr = "val"] #[attr = "val"] // Unterminated diff --git a/tests/ui/attr-shebang.rs b/tests/ui/attr-shebang.rs index 3b0dc096f58..67c371aeaac 100644 --- a/tests/ui/attr-shebang.rs +++ b/tests/ui/attr-shebang.rs @@ -1,4 +1,4 @@ -// run-pass +//@ run-pass #![allow(stable_features)] #![feature(rust1)] diff --git a/tests/ui/attr-start.rs b/tests/ui/attr-start.rs index 6777631484b..27cf35601fd 100644 --- a/tests/ui/attr-start.rs +++ b/tests/ui/attr-start.rs @@ -1,5 +1,5 @@ -// run-pass -// pretty-expanded FIXME #23616 +//@ run-pass +//@ pretty-expanded FIXME #23616 #![feature(start)] diff --git a/tests/ui/attributes/attr-before-view-item.rs b/tests/ui/attributes/attr-before-view-item.rs index e1588aadab6..e0e086ea476 100644 --- a/tests/ui/attributes/attr-before-view-item.rs +++ b/tests/ui/attributes/attr-before-view-item.rs @@ -1,5 +1,5 @@ -// build-pass (FIXME(62277): could be check-pass?) -// pretty-expanded FIXME #23616 +//@ build-pass (FIXME(62277): could be check-pass?) +//@ pretty-expanded FIXME #23616 #![feature(rustc_attrs)] #![feature(test)] diff --git a/tests/ui/attributes/attr-before-view-item2.rs b/tests/ui/attributes/attr-before-view-item2.rs index c1f667372f5..8d74d73fe2e 100644 --- a/tests/ui/attributes/attr-before-view-item2.rs +++ b/tests/ui/attributes/attr-before-view-item2.rs @@ -1,5 +1,5 @@ -// build-pass (FIXME(62277): could be check-pass?) -// pretty-expanded FIXME #23616 +//@ build-pass (FIXME(62277): could be check-pass?) +//@ pretty-expanded FIXME #23616 #![feature(rustc_attrs)] #![feature(test)] diff --git a/tests/ui/attributes/attr-mix-new.rs b/tests/ui/attributes/attr-mix-new.rs index 8119df0c40c..bb2bab8f267 100644 --- a/tests/ui/attributes/attr-mix-new.rs +++ b/tests/ui/attributes/attr-mix-new.rs @@ -1,5 +1,5 @@ -// build-pass (FIXME(62277): could be check-pass?) -// pretty-expanded FIXME #23616 +//@ build-pass (FIXME(62277): could be check-pass?) +//@ pretty-expanded FIXME #23616 #![feature(rustc_attrs)] diff --git a/tests/ui/attributes/auxiliary/key-value-expansion.rs b/tests/ui/attributes/auxiliary/key-value-expansion.rs index b4eb80bb516..9db82cec635 100644 --- a/tests/ui/attributes/auxiliary/key-value-expansion.rs +++ b/tests/ui/attributes/auxiliary/key-value-expansion.rs @@ -1,5 +1,5 @@ -// force-host -// no-prefer-dynamic +//@ force-host +//@ no-prefer-dynamic #![crate_type = "proc-macro"] diff --git a/tests/ui/attributes/class-attributes-1.rs b/tests/ui/attributes/class-attributes-1.rs index 027b701e591..0c8f5f324a3 100644 --- a/tests/ui/attributes/class-attributes-1.rs +++ b/tests/ui/attributes/class-attributes-1.rs @@ -1,5 +1,5 @@ -// build-pass (FIXME(62277): could be check-pass?) -// pp-exact - Make sure we actually print the attributes +//@ build-pass (FIXME(62277): could be check-pass?) +//@ pp-exact - Make sure we actually print the attributes #![feature(rustc_attrs)] diff --git a/tests/ui/attributes/class-attributes-2.rs b/tests/ui/attributes/class-attributes-2.rs index 6aba6b89427..0ec0cd22596 100644 --- a/tests/ui/attributes/class-attributes-2.rs +++ b/tests/ui/attributes/class-attributes-2.rs @@ -1,4 +1,4 @@ -// build-pass (FIXME(62277): could be check-pass?) +//@ build-pass (FIXME(62277): could be check-pass?) #![feature(rustc_attrs)] diff --git a/tests/ui/attributes/duplicated-attributes.rs b/tests/ui/attributes/duplicated-attributes.rs index 84a5abcf8b4..65cab297af7 100644 --- a/tests/ui/attributes/duplicated-attributes.rs +++ b/tests/ui/attributes/duplicated-attributes.rs @@ -2,8 +2,8 @@ // emitted. // Tests https://github.com/rust-lang/rust/issues/90979 -// check-pass -// compile-flags: --test +//@ check-pass +//@ compile-flags: --test #![feature(test)] #![feature(cfg_eval)] diff --git a/tests/ui/attributes/extented-attribute-macro-error.rs b/tests/ui/attributes/extented-attribute-macro-error.rs index 492f84f56c3..5dcb38d7da9 100644 --- a/tests/ui/attributes/extented-attribute-macro-error.rs +++ b/tests/ui/attributes/extented-attribute-macro-error.rs @@ -1,4 +1,4 @@ -// normalize-stderr-test: "couldn't read.*" -> "couldn't read the file" +//@ normalize-stderr-test: "couldn't read.*" -> "couldn't read the file" #![doc = include_str!("../not_existing_file.md")] struct Documented {} diff --git a/tests/ui/attributes/invalid_macro_export_argument.rs b/tests/ui/attributes/invalid_macro_export_argument.rs index a0ed5fd1c8f..96f66991e04 100644 --- a/tests/ui/attributes/invalid_macro_export_argument.rs +++ b/tests/ui/attributes/invalid_macro_export_argument.rs @@ -1,5 +1,5 @@ -// revisions: deny allow -//[allow] check-pass +//@ revisions: deny allow +//@[allow] check-pass #![cfg_attr(deny, deny(invalid_macro_export_arguments))] #![cfg_attr(allow, allow(invalid_macro_export_arguments))] diff --git a/tests/ui/attributes/issue-105594-invalid-attr-validation.rs b/tests/ui/attributes/issue-105594-invalid-attr-validation.rs index 096ce97ab04..bea5faf7253 100644 --- a/tests/ui/attributes/issue-105594-invalid-attr-validation.rs +++ b/tests/ui/attributes/issue-105594-invalid-attr-validation.rs @@ -1,7 +1,7 @@ // This checks that the attribute validation ICE in issue #105594 doesn't // recur. // -// ignore-thumbv8m.base-none-eabi +//@ ignore-thumbv8m.base-none-eabi #![feature(cmse_nonsecure_entry)] fn main() {} diff --git a/tests/ui/attributes/issue-115264-expr-field.rs b/tests/ui/attributes/issue-115264-expr-field.rs index f53ac4aee66..8adb68deb5b 100644 --- a/tests/ui/attributes/issue-115264-expr-field.rs +++ b/tests/ui/attributes/issue-115264-expr-field.rs @@ -2,7 +2,7 @@ // Tests that retrieving the ident of the X::foo field // in main() does not cause an ICE -// check-pass +//@ check-pass #[allow(dead_code)] struct X { diff --git a/tests/ui/attributes/issue-115264-pat-field.rs b/tests/ui/attributes/issue-115264-pat-field.rs index 8c6bbe16726..53e3b4524d6 100644 --- a/tests/ui/attributes/issue-115264-pat-field.rs +++ b/tests/ui/attributes/issue-115264-pat-field.rs @@ -2,7 +2,7 @@ // Tests that retrieving the ident of 'foo' variable in // the pattern inside main() does not cause an ICE -// check-pass +//@ check-pass struct X { foo: i32, diff --git a/tests/ui/attributes/issue-40962.rs b/tests/ui/attributes/issue-40962.rs index 7b91c06819f..bd80d31277c 100644 --- a/tests/ui/attributes/issue-40962.rs +++ b/tests/ui/attributes/issue-40962.rs @@ -1,4 +1,4 @@ -// check-pass +//@ check-pass macro_rules! m { ($i:meta) => { #[derive($i)] diff --git a/tests/ui/attributes/item-attributes.rs b/tests/ui/attributes/item-attributes.rs index c6bf6c65602..7fe7fdd9758 100644 --- a/tests/ui/attributes/item-attributes.rs +++ b/tests/ui/attributes/item-attributes.rs @@ -2,7 +2,7 @@ // for completeness since .rs files linked from .rc files support this // notation to specify their module's attributes -// check-pass +//@ check-pass #![feature(rustc_attrs)] #![rustc_dummy = "val"] diff --git a/tests/ui/attributes/key-value-expansion.rs b/tests/ui/attributes/key-value-expansion.rs index 3065c12749c..dd408ebb77e 100644 --- a/tests/ui/attributes/key-value-expansion.rs +++ b/tests/ui/attributes/key-value-expansion.rs @@ -1,7 +1,7 @@ // Regression tests for issue #55414, expansion happens in the value of a key-value attribute, // and the expanded expression is more complex than simply a macro call. -// aux-build:key-value-expansion.rs +//@ aux-build:key-value-expansion.rs #![feature(rustc_attrs)] diff --git a/tests/ui/attributes/log-backtrace.rs b/tests/ui/attributes/log-backtrace.rs index e42edf1d4af..9af1d318eb0 100644 --- a/tests/ui/attributes/log-backtrace.rs +++ b/tests/ui/attributes/log-backtrace.rs @@ -1,9 +1,9 @@ -// run-pass +//@ run-pass // // This test makes sure that log-backtrace option at least parses correctly // -// dont-check-compiler-stdout -// dont-check-compiler-stderr -// rustc-env:RUSTC_LOG=info -// rustc-env:RUSTC_LOG_BACKTRACE=rustc_metadata::creader +//@ dont-check-compiler-stdout +//@ dont-check-compiler-stderr +//@ rustc-env:RUSTC_LOG=info +//@ rustc-env:RUSTC_LOG_BACKTRACE=rustc_metadata::creader fn main() {} diff --git a/tests/ui/attributes/main-removed-2/auxiliary/tokyo.rs b/tests/ui/attributes/main-removed-2/auxiliary/tokyo.rs index 196b5be2dd0..25879d17027 100644 --- a/tests/ui/attributes/main-removed-2/auxiliary/tokyo.rs +++ b/tests/ui/attributes/main-removed-2/auxiliary/tokyo.rs @@ -1,5 +1,5 @@ -// force-host -// no-prefer-dynamic +//@ force-host +//@ no-prefer-dynamic #![crate_type = "proc-macro"] diff --git a/tests/ui/attributes/main-removed-2/main.rs b/tests/ui/attributes/main-removed-2/main.rs index e8fecf825fa..e4a3de79ec9 100644 --- a/tests/ui/attributes/main-removed-2/main.rs +++ b/tests/ui/attributes/main-removed-2/main.rs @@ -1,7 +1,7 @@ -// run-pass -// aux-build:tokyo.rs -// compile-flags:--extern tokyo -// edition:2021 +//@ run-pass +//@ aux-build:tokyo.rs +//@ compile-flags:--extern tokyo +//@ edition:2021 use tokyo::main; diff --git a/tests/ui/attributes/method-attributes.rs b/tests/ui/attributes/method-attributes.rs index 67439718bd3..4a7f042c20a 100644 --- a/tests/ui/attributes/method-attributes.rs +++ b/tests/ui/attributes/method-attributes.rs @@ -1,6 +1,6 @@ -// build-pass (FIXME(62277): could be check-pass?) -// pp-exact - Make sure we print all the attributes -// pretty-expanded FIXME #23616 +//@ build-pass (FIXME(62277): could be check-pass?) +//@ pp-exact - Make sure we print all the attributes +//@ pretty-expanded FIXME #23616 #![feature(rustc_attrs)] diff --git a/tests/ui/attributes/rustc_confusables.rs b/tests/ui/attributes/rustc_confusables.rs index 352e91d065f..a88432ead75 100644 --- a/tests/ui/attributes/rustc_confusables.rs +++ b/tests/ui/attributes/rustc_confusables.rs @@ -1,4 +1,4 @@ -// aux-build: rustc_confusables_across_crate.rs +//@ aux-build: rustc_confusables_across_crate.rs #![feature(rustc_attrs)] diff --git a/tests/ui/attributes/tool_attributes.rs b/tests/ui/attributes/tool_attributes.rs index be4a10c0ee9..fc05488e44c 100644 --- a/tests/ui/attributes/tool_attributes.rs +++ b/tests/ui/attributes/tool_attributes.rs @@ -1,4 +1,4 @@ -// run-pass +//@ run-pass // Scoped attributes should not trigger an unused attributes lint. #![deny(unused_attributes)] diff --git a/tests/ui/attributes/unix_sigpipe/unix_sigpipe-error.rs b/tests/ui/attributes/unix_sigpipe/unix_sigpipe-error.rs index 0a42a5b5ef1..ccd6c678660 100644 --- a/tests/ui/attributes/unix_sigpipe/unix_sigpipe-error.rs +++ b/tests/ui/attributes/unix_sigpipe/unix_sigpipe-error.rs @@ -1,5 +1,5 @@ -// run-pass -// aux-build:sigpipe-utils.rs +//@ run-pass +//@ aux-build:sigpipe-utils.rs #![feature(unix_sigpipe)] diff --git a/tests/ui/attributes/unix_sigpipe/unix_sigpipe-inherit.rs b/tests/ui/attributes/unix_sigpipe/unix_sigpipe-inherit.rs index 4f864807752..db3407a7d55 100644 --- a/tests/ui/attributes/unix_sigpipe/unix_sigpipe-inherit.rs +++ b/tests/ui/attributes/unix_sigpipe/unix_sigpipe-inherit.rs @@ -1,5 +1,5 @@ -// run-pass -// aux-build:sigpipe-utils.rs +//@ run-pass +//@ aux-build:sigpipe-utils.rs #![feature(unix_sigpipe)] diff --git a/tests/ui/attributes/unix_sigpipe/unix_sigpipe-not-used.rs b/tests/ui/attributes/unix_sigpipe/unix_sigpipe-not-used.rs index 100b4ce9f74..778e06cb3ef 100644 --- a/tests/ui/attributes/unix_sigpipe/unix_sigpipe-not-used.rs +++ b/tests/ui/attributes/unix_sigpipe/unix_sigpipe-not-used.rs @@ -1,5 +1,5 @@ -// run-pass -// aux-build:sigpipe-utils.rs +//@ run-pass +//@ aux-build:sigpipe-utils.rs fn main() { extern crate sigpipe_utils; diff --git a/tests/ui/attributes/unix_sigpipe/unix_sigpipe-only-feature.rs b/tests/ui/attributes/unix_sigpipe/unix_sigpipe-only-feature.rs index b5adc2e5572..6bbe4a8d0d6 100644 --- a/tests/ui/attributes/unix_sigpipe/unix_sigpipe-only-feature.rs +++ b/tests/ui/attributes/unix_sigpipe/unix_sigpipe-only-feature.rs @@ -1,5 +1,5 @@ -// run-pass -// aux-build:sigpipe-utils.rs +//@ run-pass +//@ aux-build:sigpipe-utils.rs #![feature(unix_sigpipe)] diff --git a/tests/ui/attributes/unix_sigpipe/unix_sigpipe-rustc_main.rs b/tests/ui/attributes/unix_sigpipe/unix_sigpipe-rustc_main.rs index 6befb9e9565..02a3f48f3b3 100644 --- a/tests/ui/attributes/unix_sigpipe/unix_sigpipe-rustc_main.rs +++ b/tests/ui/attributes/unix_sigpipe/unix_sigpipe-rustc_main.rs @@ -1,5 +1,5 @@ -// run-pass -// aux-build:sigpipe-utils.rs +//@ run-pass +//@ aux-build:sigpipe-utils.rs #![feature(unix_sigpipe)] #![feature(rustc_attrs)] diff --git a/tests/ui/attributes/unix_sigpipe/unix_sigpipe-sig_dfl.rs b/tests/ui/attributes/unix_sigpipe/unix_sigpipe-sig_dfl.rs index 238c0d57a68..30f2a9b1430 100644 --- a/tests/ui/attributes/unix_sigpipe/unix_sigpipe-sig_dfl.rs +++ b/tests/ui/attributes/unix_sigpipe/unix_sigpipe-sig_dfl.rs @@ -1,5 +1,5 @@ -// run-pass -// aux-build:sigpipe-utils.rs +//@ run-pass +//@ aux-build:sigpipe-utils.rs #![feature(unix_sigpipe)] diff --git a/tests/ui/attributes/unnamed-field-attributes-dup.rs b/tests/ui/attributes/unnamed-field-attributes-dup.rs index 7edfd033794..f4d7a77cd6e 100644 --- a/tests/ui/attributes/unnamed-field-attributes-dup.rs +++ b/tests/ui/attributes/unnamed-field-attributes-dup.rs @@ -1,6 +1,6 @@ // Duplicate non-builtin attributes can be used on unnamed fields. -// check-pass +//@ check-pass struct S ( #[rustfmt::skip] diff --git a/tests/ui/attributes/unnamed-field-attributes-vis.rs b/tests/ui/attributes/unnamed-field-attributes-vis.rs index d12155f6d81..dd582ab7fba 100644 --- a/tests/ui/attributes/unnamed-field-attributes-vis.rs +++ b/tests/ui/attributes/unnamed-field-attributes-vis.rs @@ -1,6 +1,6 @@ // Unnamed fields don't lose their visibility due to non-builtin attributes on them. -// check-pass +//@ check-pass mod m { pub struct S(#[rustfmt::skip] pub u8); diff --git a/tests/ui/attributes/unnamed-field-attributes.rs b/tests/ui/attributes/unnamed-field-attributes.rs index 93f364047e9..4bbc598fd68 100644 --- a/tests/ui/attributes/unnamed-field-attributes.rs +++ b/tests/ui/attributes/unnamed-field-attributes.rs @@ -1,4 +1,4 @@ -// check-pass +//@ check-pass struct S( #[rustfmt::skip] u8, diff --git a/tests/ui/attributes/unrestricted-attribute-tokens.rs b/tests/ui/attributes/unrestricted-attribute-tokens.rs index e31bc91a00a..9f91afb59bf 100644 --- a/tests/ui/attributes/unrestricted-attribute-tokens.rs +++ b/tests/ui/attributes/unrestricted-attribute-tokens.rs @@ -1,4 +1,4 @@ -// build-pass (FIXME(62277): could be check-pass?) +//@ build-pass (FIXME(62277): could be check-pass?) #![feature(rustc_attrs)] diff --git a/tests/ui/attributes/used_with_arg_no_mangle.rs b/tests/ui/attributes/used_with_arg_no_mangle.rs index d0bbe76ef3e..1470e5b691c 100644 --- a/tests/ui/attributes/used_with_arg_no_mangle.rs +++ b/tests/ui/attributes/used_with_arg_no_mangle.rs @@ -1,4 +1,4 @@ -// check-pass +//@ check-pass #![feature(used_with_arg)] diff --git a/tests/ui/attributes/variant-attributes.rs b/tests/ui/attributes/variant-attributes.rs index ffcdeb52a04..57423ad61b2 100644 --- a/tests/ui/attributes/variant-attributes.rs +++ b/tests/ui/attributes/variant-attributes.rs @@ -1,6 +1,6 @@ -// build-pass (FIXME(62277): could be check-pass?) -// pp-exact - Make sure we actually print the attributes -// pretty-expanded FIXME #23616 +//@ build-pass (FIXME(62277): could be check-pass?) +//@ pp-exact - Make sure we actually print the attributes +//@ pretty-expanded FIXME #23616 #![allow(non_camel_case_types)] #![feature(rustc_attrs)] diff --git a/tests/ui/attributes/z-crate-attr.rs b/tests/ui/attributes/z-crate-attr.rs index 1021774fc5f..119a48d5d65 100644 --- a/tests/ui/attributes/z-crate-attr.rs +++ b/tests/ui/attributes/z-crate-attr.rs @@ -1,9 +1,9 @@ -// run-pass +//@ run-pass // This test checks if an unstable feature is enabled with the -Zcrate-attr=feature(foo) flag. If // the exact feature used here is causing problems feel free to replace it with another // perma-unstable feature. -// compile-flags: -Zcrate-attr=feature(abi_unadjusted) +//@ compile-flags: -Zcrate-attr=feature(abi_unadjusted) #![allow(dead_code)] diff --git a/tests/ui/attrs-resolution.rs b/tests/ui/attrs-resolution.rs index 6809773237d..38dd3812d68 100644 --- a/tests/ui/attrs-resolution.rs +++ b/tests/ui/attrs-resolution.rs @@ -1,4 +1,4 @@ -// check-pass +//@ check-pass enum FooEnum { #[rustfmt::skip] diff --git a/tests/ui/augmented-assignments-feature-gate-cross.rs b/tests/ui/augmented-assignments-feature-gate-cross.rs index 84988feb6f5..d402d200617 100644 --- a/tests/ui/augmented-assignments-feature-gate-cross.rs +++ b/tests/ui/augmented-assignments-feature-gate-cross.rs @@ -1,5 +1,5 @@ -// run-pass -// aux-build:augmented_assignments.rs +//@ run-pass +//@ aux-build:augmented_assignments.rs extern crate augmented_assignments; diff --git a/tests/ui/augmented-assignments-rpass.rs b/tests/ui/augmented-assignments-rpass.rs index fb383cc57a6..755ecb466ce 100644 --- a/tests/ui/augmented-assignments-rpass.rs +++ b/tests/ui/augmented-assignments-rpass.rs @@ -1,4 +1,4 @@ -// run-pass +//@ run-pass #![allow(unused_imports)] #![deny(unused_assignments)] diff --git a/tests/ui/auto-instantiate.rs b/tests/ui/auto-instantiate.rs index a58b178287f..73ad5d701e1 100644 --- a/tests/ui/auto-instantiate.rs +++ b/tests/ui/auto-instantiate.rs @@ -1,4 +1,4 @@ -// run-pass +//@ run-pass #![allow(dead_code)] #[derive(Debug)] diff --git a/tests/ui/auto-traits/auto-is-contextual.rs b/tests/ui/auto-traits/auto-is-contextual.rs index a2ddd5374c0..2183a8c110c 100644 --- a/tests/ui/auto-traits/auto-is-contextual.rs +++ b/tests/ui/auto-traits/auto-is-contextual.rs @@ -1,4 +1,4 @@ -// run-pass +//@ run-pass #![allow(path_statements)] #![allow(dead_code)] diff --git a/tests/ui/auto-traits/auto-trait-projection-recursion.rs b/tests/ui/auto-traits/auto-trait-projection-recursion.rs index a36f26f02e9..31dd83ba688 100644 --- a/tests/ui/auto-traits/auto-trait-projection-recursion.rs +++ b/tests/ui/auto-traits/auto-trait-projection-recursion.rs @@ -11,7 +11,7 @@ // lowest unified region vid. This means we instead have to prove // `Box>>: Send`, which we can because auto traits are coinductive. -// check-pass +//@ check-pass // Avoid a really long error message if this regresses. #![recursion_limit="20"] diff --git a/tests/ui/auto-traits/auto-trait-validation.fixed b/tests/ui/auto-traits/auto-trait-validation.fixed index e37fed9faab..f65952e00f5 100644 --- a/tests/ui/auto-traits/auto-trait-validation.fixed +++ b/tests/ui/auto-traits/auto-trait-validation.fixed @@ -1,7 +1,7 @@ #![feature(auto_traits)] #![allow(dead_code)] -// run-rustfix +//@ run-rustfix auto trait Generic {} //~^ auto traits cannot have generic parameters [E0567] diff --git a/tests/ui/auto-traits/auto-trait-validation.rs b/tests/ui/auto-traits/auto-trait-validation.rs index e209aa13220..c83d7426e47 100644 --- a/tests/ui/auto-traits/auto-trait-validation.rs +++ b/tests/ui/auto-traits/auto-trait-validation.rs @@ -1,7 +1,7 @@ #![feature(auto_traits)] #![allow(dead_code)] -// run-rustfix +//@ run-rustfix auto trait Generic {} //~^ auto traits cannot have generic parameters [E0567] diff --git a/tests/ui/auto-traits/auto-traits.rs b/tests/ui/auto-traits/auto-traits.rs index 1e0fbcc1fdf..22b210eb3fa 100644 --- a/tests/ui/auto-traits/auto-traits.rs +++ b/tests/ui/auto-traits/auto-traits.rs @@ -1,4 +1,4 @@ -// run-pass +//@ run-pass #![allow(unused_doc_comments)] #![feature(auto_traits)] #![feature(negative_impls)] diff --git a/tests/ui/auto-traits/issue-23080-2.rs b/tests/ui/auto-traits/issue-23080-2.rs index d63cd9d5dd6..2bfddd449b9 100644 --- a/tests/ui/auto-traits/issue-23080-2.rs +++ b/tests/ui/auto-traits/issue-23080-2.rs @@ -1,5 +1,5 @@ -// revisions: current next -//[next] compile-flags: -Znext-solver +//@ revisions: current next +//@[next] compile-flags: -Znext-solver #![feature(auto_traits)] #![feature(negative_impls)] diff --git a/tests/ui/auto-traits/pre-cfg.rs b/tests/ui/auto-traits/pre-cfg.rs index e6e840dcbab..e806686f965 100644 --- a/tests/ui/auto-traits/pre-cfg.rs +++ b/tests/ui/auto-traits/pre-cfg.rs @@ -1,4 +1,4 @@ -// check-pass +//@ check-pass #[cfg(FALSE)] auto trait Foo {} diff --git a/tests/ui/autoref-autoderef/auto-ref-bounded-ty-param.rs b/tests/ui/autoref-autoderef/auto-ref-bounded-ty-param.rs index 2482e1878f5..47e2072461e 100644 --- a/tests/ui/autoref-autoderef/auto-ref-bounded-ty-param.rs +++ b/tests/ui/autoref-autoderef/auto-ref-bounded-ty-param.rs @@ -1,4 +1,4 @@ -// run-pass +//@ run-pass trait Foo { fn f(&self); } diff --git a/tests/ui/autoref-autoderef/auto-ref-sliceable.rs b/tests/ui/autoref-autoderef/auto-ref-sliceable.rs index e5f79d78051..2fa28465bdc 100644 --- a/tests/ui/autoref-autoderef/auto-ref-sliceable.rs +++ b/tests/ui/autoref-autoderef/auto-ref-sliceable.rs @@ -1,4 +1,4 @@ -// run-pass +//@ run-pass trait Pushable { diff --git a/tests/ui/autoref-autoderef/auto-ref.rs b/tests/ui/autoref-autoderef/auto-ref.rs index b77f9c34213..1109a82b8d5 100644 --- a/tests/ui/autoref-autoderef/auto-ref.rs +++ b/tests/ui/autoref-autoderef/auto-ref.rs @@ -1,4 +1,4 @@ -// run-pass +//@ run-pass struct Foo { x: isize, } diff --git a/tests/ui/autoref-autoderef/autoderef-and-borrow-method-receiver.rs b/tests/ui/autoref-autoderef/autoderef-and-borrow-method-receiver.rs index 874f4228277..b44e2a8cd37 100644 --- a/tests/ui/autoref-autoderef/autoderef-and-borrow-method-receiver.rs +++ b/tests/ui/autoref-autoderef/autoderef-and-borrow-method-receiver.rs @@ -1,6 +1,6 @@ -// run-pass +//@ run-pass #![allow(dead_code)] -// pretty-expanded FIXME #23616 +//@ pretty-expanded FIXME #23616 struct Foo { x: isize, diff --git a/tests/ui/autoref-autoderef/autoderef-method-on-trait.rs b/tests/ui/autoref-autoderef/autoderef-method-on-trait.rs index af747cc76e9..0d4052f73cf 100644 --- a/tests/ui/autoref-autoderef/autoderef-method-on-trait.rs +++ b/tests/ui/autoref-autoderef/autoderef-method-on-trait.rs @@ -1,4 +1,4 @@ -// run-pass +//@ run-pass #![allow(non_camel_case_types)] trait double { diff --git a/tests/ui/autoref-autoderef/autoderef-method-priority.rs b/tests/ui/autoref-autoderef/autoderef-method-priority.rs index 88a5140dc75..dfa048e2058 100644 --- a/tests/ui/autoref-autoderef/autoderef-method-priority.rs +++ b/tests/ui/autoref-autoderef/autoderef-method-priority.rs @@ -1,4 +1,4 @@ -// run-pass +//@ run-pass #![allow(non_camel_case_types)] trait double { diff --git a/tests/ui/autoref-autoderef/autoderef-method-twice-but-not-thrice.rs b/tests/ui/autoref-autoderef/autoderef-method-twice-but-not-thrice.rs index 3657e61d425..ace078bb1d9 100644 --- a/tests/ui/autoref-autoderef/autoderef-method-twice-but-not-thrice.rs +++ b/tests/ui/autoref-autoderef/autoderef-method-twice-but-not-thrice.rs @@ -1,4 +1,4 @@ -// run-pass +//@ run-pass #![allow(non_camel_case_types)] trait double { diff --git a/tests/ui/autoref-autoderef/autoderef-method-twice.rs b/tests/ui/autoref-autoderef/autoderef-method-twice.rs index ed86b31b8bb..719f660400e 100644 --- a/tests/ui/autoref-autoderef/autoderef-method-twice.rs +++ b/tests/ui/autoref-autoderef/autoderef-method-twice.rs @@ -1,4 +1,4 @@ -// run-pass +//@ run-pass #![allow(non_camel_case_types)] trait double { diff --git a/tests/ui/autoref-autoderef/autoderef-method.rs b/tests/ui/autoref-autoderef/autoderef-method.rs index 5b7965e9553..faefdafb4c0 100644 --- a/tests/ui/autoref-autoderef/autoderef-method.rs +++ b/tests/ui/autoref-autoderef/autoderef-method.rs @@ -1,4 +1,4 @@ -// run-pass +//@ run-pass #![allow(non_camel_case_types)] trait double { diff --git a/tests/ui/autoref-autoderef/autoderef-privacy.rs b/tests/ui/autoref-autoderef/autoderef-privacy.rs index 841be930b77..d2a217257e5 100644 --- a/tests/ui/autoref-autoderef/autoderef-privacy.rs +++ b/tests/ui/autoref-autoderef/autoderef-privacy.rs @@ -1,4 +1,4 @@ -// run-pass +//@ run-pass // Check we do not select a private method or field when computing autoderefs #![allow(unused)] diff --git a/tests/ui/autoref-autoderef/autoref-intermediate-types-issue-3585.rs b/tests/ui/autoref-autoderef/autoref-intermediate-types-issue-3585.rs index 3bdc248ff0f..e3fcb530bee 100644 --- a/tests/ui/autoref-autoderef/autoref-intermediate-types-issue-3585.rs +++ b/tests/ui/autoref-autoderef/autoref-intermediate-types-issue-3585.rs @@ -1,4 +1,4 @@ -// run-pass +//@ run-pass trait Foo { fn foo(&self) -> String; diff --git a/tests/ui/autoref-autoderef/deref-into-array.rs b/tests/ui/autoref-autoderef/deref-into-array.rs index 855a82d2f9c..519ead54de4 100644 --- a/tests/ui/autoref-autoderef/deref-into-array.rs +++ b/tests/ui/autoref-autoderef/deref-into-array.rs @@ -1,4 +1,4 @@ -// check-pass +//@ check-pass struct Test([T; 1]); diff --git a/tests/ui/auxiliary/edition-kw-macro-2015.rs b/tests/ui/auxiliary/edition-kw-macro-2015.rs index 553ba69303a..7f479fa9370 100644 --- a/tests/ui/auxiliary/edition-kw-macro-2015.rs +++ b/tests/ui/auxiliary/edition-kw-macro-2015.rs @@ -1,4 +1,4 @@ -// edition:2015 +//@ edition:2015 #[macro_export] macro_rules! produces_async { diff --git a/tests/ui/auxiliary/edition-kw-macro-2018.rs b/tests/ui/auxiliary/edition-kw-macro-2018.rs index f1f4ee28093..ba8ecc4d83b 100644 --- a/tests/ui/auxiliary/edition-kw-macro-2018.rs +++ b/tests/ui/auxiliary/edition-kw-macro-2018.rs @@ -1,4 +1,4 @@ -// edition:2018 +//@ edition:2018 #[macro_export] macro_rules! produces_async { diff --git a/tests/ui/auxiliary/issue-13560-1.rs b/tests/ui/auxiliary/issue-13560-1.rs index c3a2ae679bf..baca1567e1b 100644 --- a/tests/ui/auxiliary/issue-13560-1.rs +++ b/tests/ui/auxiliary/issue-13560-1.rs @@ -1,3 +1,3 @@ -// no-prefer-dynamic +//@ no-prefer-dynamic #![crate_type = "dylib"] diff --git a/tests/ui/auxiliary/issue-13560-2.rs b/tests/ui/auxiliary/issue-13560-2.rs index 39c261e1162..1adaf2b0379 100644 --- a/tests/ui/auxiliary/issue-13560-2.rs +++ b/tests/ui/auxiliary/issue-13560-2.rs @@ -1,3 +1,3 @@ -// no-prefer-dynamic +//@ no-prefer-dynamic #![crate_type = "rlib"] diff --git a/tests/ui/auxiliary/issue-13560-3.rs b/tests/ui/auxiliary/issue-13560-3.rs index e991bcc1a02..4aab2ddc73a 100644 --- a/tests/ui/auxiliary/issue-13560-3.rs +++ b/tests/ui/auxiliary/issue-13560-3.rs @@ -1,4 +1,4 @@ -// no-prefer-dynamic +//@ no-prefer-dynamic #![crate_type = "rlib"] diff --git a/tests/ui/auxiliary/issue-76387.rs b/tests/ui/auxiliary/issue-76387.rs index 873d2bedd4d..d540bceff93 100644 --- a/tests/ui/auxiliary/issue-76387.rs +++ b/tests/ui/auxiliary/issue-76387.rs @@ -1,4 +1,4 @@ -// compile-flags: -C opt-level=3 +//@ compile-flags: -C opt-level=3 pub struct FatPtr { ptr: *mut u8, diff --git a/tests/ui/auxiliary/msvc-data-only-lib.rs b/tests/ui/auxiliary/msvc-data-only-lib.rs index ccaa6d8edcf..b8a8f905e8b 100644 --- a/tests/ui/auxiliary/msvc-data-only-lib.rs +++ b/tests/ui/auxiliary/msvc-data-only-lib.rs @@ -1,4 +1,4 @@ -// no-prefer-dynamic +//@ no-prefer-dynamic #![crate_type = "rlib"] diff --git a/tests/ui/auxiliary/rustc-rust-log-aux.rs b/tests/ui/auxiliary/rustc-rust-log-aux.rs index daa8e9f495e..8080428d563 100644 --- a/tests/ui/auxiliary/rustc-rust-log-aux.rs +++ b/tests/ui/auxiliary/rustc-rust-log-aux.rs @@ -1 +1 @@ -// rustc-env:RUSTC_LOG=debug +//@ rustc-env:RUSTC_LOG=debug diff --git a/tests/ui/backtrace-apple-no-dsymutil.rs b/tests/ui/backtrace-apple-no-dsymutil.rs index 3844ebcfd30..9924cd13b0a 100644 --- a/tests/ui/backtrace-apple-no-dsymutil.rs +++ b/tests/ui/backtrace-apple-no-dsymutil.rs @@ -1,8 +1,8 @@ -// run-pass +//@ run-pass -// compile-flags:-Cstrip=none -// compile-flags:-g -Csplit-debuginfo=unpacked -// only-macos +//@ compile-flags:-Cstrip=none +//@ compile-flags:-g -Csplit-debuginfo=unpacked +//@ only-macos use std::process::Command; use std::str; diff --git a/tests/ui/backtrace.rs b/tests/ui/backtrace.rs index 84be333beff..5c138b75de7 100644 --- a/tests/ui/backtrace.rs +++ b/tests/ui/backtrace.rs @@ -1,12 +1,12 @@ -// run-pass -// ignore-android FIXME #17520 -// ignore-emscripten spawning processes is not supported -// ignore-openbsd no support for libbacktrace without filename -// ignore-sgx no processes -// ignore-msvc see #62897 and `backtrace-debuginfo.rs` test -// ignore-fuchsia Backtraces not symbolized -// compile-flags:-g -// compile-flags:-Cstrip=none +//@ run-pass +//@ ignore-android FIXME #17520 +//@ ignore-emscripten spawning processes is not supported +//@ ignore-openbsd no support for libbacktrace without filename +//@ ignore-sgx no processes +//@ ignore-msvc see #62897 and `backtrace-debuginfo.rs` test +//@ ignore-fuchsia Backtraces not symbolized +//@ compile-flags:-g +//@ compile-flags:-Cstrip=none use std::env; use std::process::{Command, Stdio}; diff --git a/tests/ui/bare-fn-implements-fn-mut.rs b/tests/ui/bare-fn-implements-fn-mut.rs index d6ecd6b654b..49b31f28f8a 100644 --- a/tests/ui/bare-fn-implements-fn-mut.rs +++ b/tests/ui/bare-fn-implements-fn-mut.rs @@ -1,4 +1,4 @@ -// run-pass +//@ run-pass fn call_f(mut f: F) { f(); diff --git a/tests/ui/bare-static-string.rs b/tests/ui/bare-static-string.rs index d336dc7c6a0..b71cf38cfe8 100644 --- a/tests/ui/bare-static-string.rs +++ b/tests/ui/bare-static-string.rs @@ -1,4 +1,4 @@ -// run-pass +//@ run-pass pub fn main() { let x: &'static str = "foo"; diff --git a/tests/ui/bench/issue-32062.rs b/tests/ui/bench/issue-32062.rs index 99b8b7c6012..84de427a200 100644 --- a/tests/ui/bench/issue-32062.rs +++ b/tests/ui/bench/issue-32062.rs @@ -1,6 +1,6 @@ -// run-pass +//@ run-pass -// pretty-expanded FIXME #23616 +//@ pretty-expanded FIXME #23616 fn main() { let _ = test(Some(0).into_iter()); diff --git a/tests/ui/big-literals.rs b/tests/ui/big-literals.rs index 96ea115c877..d2f447a595c 100644 --- a/tests/ui/big-literals.rs +++ b/tests/ui/big-literals.rs @@ -1,4 +1,4 @@ -// run-pass +//@ run-pass // Catch mistakes in the overflowing literals lint. #![deny(overflowing_literals)] diff --git a/tests/ui/bind-by-move.rs b/tests/ui/bind-by-move.rs index f0a9ebdd08c..99f3536e533 100644 --- a/tests/ui/bind-by-move.rs +++ b/tests/ui/bind-by-move.rs @@ -1,4 +1,4 @@ -// run-pass +//@ run-pass use std::sync::Arc; fn dispose(_x: Arc) { } diff --git a/tests/ui/binding/bind-field-short-with-modifiers.rs b/tests/ui/binding/bind-field-short-with-modifiers.rs index b271f84e9ce..1edccf0f037 100644 --- a/tests/ui/binding/bind-field-short-with-modifiers.rs +++ b/tests/ui/binding/bind-field-short-with-modifiers.rs @@ -1,4 +1,4 @@ -// run-pass +//@ run-pass #![allow(unused_assignments)] #![allow(unused_variables)] #![allow(non_shorthand_field_patterns)] diff --git a/tests/ui/binding/borrowed-ptr-pattern-2.rs b/tests/ui/binding/borrowed-ptr-pattern-2.rs index 40df85b1479..ba80cc49477 100644 --- a/tests/ui/binding/borrowed-ptr-pattern-2.rs +++ b/tests/ui/binding/borrowed-ptr-pattern-2.rs @@ -1,4 +1,4 @@ -// run-pass +//@ run-pass fn foo(s: &String) -> bool { match &**s { diff --git a/tests/ui/binding/borrowed-ptr-pattern-3.rs b/tests/ui/binding/borrowed-ptr-pattern-3.rs index f2607eee815..2e3680b76c8 100644 --- a/tests/ui/binding/borrowed-ptr-pattern-3.rs +++ b/tests/ui/binding/borrowed-ptr-pattern-3.rs @@ -1,4 +1,4 @@ -// run-pass +//@ run-pass fn foo<'r>(s: &'r usize) -> bool { match s { diff --git a/tests/ui/binding/borrowed-ptr-pattern-infallible.rs b/tests/ui/binding/borrowed-ptr-pattern-infallible.rs index 1bbc03e19ba..d41e9a343a5 100644 --- a/tests/ui/binding/borrowed-ptr-pattern-infallible.rs +++ b/tests/ui/binding/borrowed-ptr-pattern-infallible.rs @@ -1,4 +1,4 @@ -// run-pass +//@ run-pass pub fn main() { diff --git a/tests/ui/binding/borrowed-ptr-pattern-option.rs b/tests/ui/binding/borrowed-ptr-pattern-option.rs index 319b8631e8d..33fd282d832 100644 --- a/tests/ui/binding/borrowed-ptr-pattern-option.rs +++ b/tests/ui/binding/borrowed-ptr-pattern-option.rs @@ -1,4 +1,4 @@ -// run-pass +//@ run-pass fn select<'r>(x: &'r Option, y: &'r Option) -> &'r Option { match (x, y) { diff --git a/tests/ui/binding/borrowed-ptr-pattern.rs b/tests/ui/binding/borrowed-ptr-pattern.rs index d5f94ab54e3..0cdd2754e13 100644 --- a/tests/ui/binding/borrowed-ptr-pattern.rs +++ b/tests/ui/binding/borrowed-ptr-pattern.rs @@ -1,4 +1,4 @@ -// run-pass +//@ run-pass fn foo(x: &T) -> T{ match x { diff --git a/tests/ui/binding/empty-types-in-patterns.rs b/tests/ui/binding/empty-types-in-patterns.rs index 0d0dbcaf40f..48a8c419724 100644 --- a/tests/ui/binding/empty-types-in-patterns.rs +++ b/tests/ui/binding/empty-types-in-patterns.rs @@ -1,4 +1,4 @@ -// run-pass +//@ run-pass #![feature(never_type, never_type_fallback)] #![feature(exhaustive_patterns)] diff --git a/tests/ui/binding/exhaustive-bool-match-sanity.rs b/tests/ui/binding/exhaustive-bool-match-sanity.rs index f83def21060..9bdab3ad02c 100644 --- a/tests/ui/binding/exhaustive-bool-match-sanity.rs +++ b/tests/ui/binding/exhaustive-bool-match-sanity.rs @@ -1,4 +1,4 @@ -// run-pass +//@ run-pass // Issue #33540 // We previously used to generate a 3-armed boolean `SwitchInt` in the // MIR of the function `foo` below. #33583 changed rustc to diff --git a/tests/ui/binding/expr-match-generic-unique1.rs b/tests/ui/binding/expr-match-generic-unique1.rs index c5f38d81559..e4c984ec6ed 100644 --- a/tests/ui/binding/expr-match-generic-unique1.rs +++ b/tests/ui/binding/expr-match-generic-unique1.rs @@ -1,4 +1,4 @@ -// run-pass +//@ run-pass fn test_generic(expected: Box, eq: F) where F: FnOnce(Box, Box) -> bool { let actual: Box = match true { diff --git a/tests/ui/binding/expr-match-generic-unique2.rs b/tests/ui/binding/expr-match-generic-unique2.rs index 8977ca68efa..51aa22d1f30 100644 --- a/tests/ui/binding/expr-match-generic-unique2.rs +++ b/tests/ui/binding/expr-match-generic-unique2.rs @@ -1,4 +1,4 @@ -// run-pass +//@ run-pass fn test_generic(expected: T, eq: F) where F: FnOnce(T, T) -> bool { let actual: T = match true { diff --git a/tests/ui/binding/expr-match-generic.rs b/tests/ui/binding/expr-match-generic.rs index 530fc676f7c..975eec42fd0 100644 --- a/tests/ui/binding/expr-match-generic.rs +++ b/tests/ui/binding/expr-match-generic.rs @@ -1,4 +1,4 @@ -// run-pass +//@ run-pass #![allow(non_camel_case_types)] type compare = extern "Rust" fn(T, T) -> bool; diff --git a/tests/ui/binding/expr-match-panic-all.rs b/tests/ui/binding/expr-match-panic-all.rs index ac31b49a1e9..928f4d012b4 100644 --- a/tests/ui/binding/expr-match-panic-all.rs +++ b/tests/ui/binding/expr-match-panic-all.rs @@ -1,4 +1,4 @@ -// run-pass +//@ run-pass diff --git a/tests/ui/binding/expr-match-panic.rs b/tests/ui/binding/expr-match-panic.rs index 4b6b6e072c0..b3adc80cb8e 100644 --- a/tests/ui/binding/expr-match-panic.rs +++ b/tests/ui/binding/expr-match-panic.rs @@ -1,4 +1,4 @@ -// run-pass +//@ run-pass fn test_simple() { diff --git a/tests/ui/binding/expr-match-unique.rs b/tests/ui/binding/expr-match-unique.rs index eec9e1f8b4a..e22841e76f3 100644 --- a/tests/ui/binding/expr-match-unique.rs +++ b/tests/ui/binding/expr-match-unique.rs @@ -1,4 +1,4 @@ -// run-pass +//@ run-pass // Tests for match as expressions resulting in boxed types fn test_box() { diff --git a/tests/ui/binding/expr-match.rs b/tests/ui/binding/expr-match.rs index 575b38fbc95..049beaaf51b 100644 --- a/tests/ui/binding/expr-match.rs +++ b/tests/ui/binding/expr-match.rs @@ -1,4 +1,4 @@ -// run-pass +//@ run-pass diff --git a/tests/ui/binding/fat-arrow-match.rs b/tests/ui/binding/fat-arrow-match.rs index aaf5be8cf74..d9a75c62096 100644 --- a/tests/ui/binding/fat-arrow-match.rs +++ b/tests/ui/binding/fat-arrow-match.rs @@ -1,4 +1,4 @@ -// run-pass +//@ run-pass #![allow(dead_code)] #![allow(non_camel_case_types)] diff --git a/tests/ui/binding/fn-arg-incomplete-pattern-drop-order.rs b/tests/ui/binding/fn-arg-incomplete-pattern-drop-order.rs index 0450fe8abbd..1c74a6a43b8 100644 --- a/tests/ui/binding/fn-arg-incomplete-pattern-drop-order.rs +++ b/tests/ui/binding/fn-arg-incomplete-pattern-drop-order.rs @@ -1,5 +1,5 @@ -// run-pass -// needs-unwind +//@ run-pass +//@ needs-unwind // Check that partially moved from function parameters are dropped after the // named bindings that move from them. diff --git a/tests/ui/binding/fn-pattern-expected-type-2.rs b/tests/ui/binding/fn-pattern-expected-type-2.rs index 130ff3d4465..33e4d54f557 100644 --- a/tests/ui/binding/fn-pattern-expected-type-2.rs +++ b/tests/ui/binding/fn-pattern-expected-type-2.rs @@ -1,4 +1,4 @@ -// run-pass +//@ run-pass pub fn main() { let v : &[(isize,isize)] = &[ (1, 2), (3, 4), (5, 6) ]; for &(x, y) in v { diff --git a/tests/ui/binding/fn-pattern-expected-type.rs b/tests/ui/binding/fn-pattern-expected-type.rs index faeb7649636..ca61fa536dc 100644 --- a/tests/ui/binding/fn-pattern-expected-type.rs +++ b/tests/ui/binding/fn-pattern-expected-type.rs @@ -1,4 +1,4 @@ -// run-pass +//@ run-pass pub fn main() { let f = |(x, y): (isize, isize)| { diff --git a/tests/ui/binding/func-arg-incomplete-pattern.rs b/tests/ui/binding/func-arg-incomplete-pattern.rs index eb94ee48f92..010310fed8c 100644 --- a/tests/ui/binding/func-arg-incomplete-pattern.rs +++ b/tests/ui/binding/func-arg-incomplete-pattern.rs @@ -1,4 +1,4 @@ -// run-pass +//@ run-pass #![allow(dead_code)] // Test that we do not leak when the arg pattern must drop part of the // argument (in this case, the `y` field). diff --git a/tests/ui/binding/func-arg-ref-pattern.rs b/tests/ui/binding/func-arg-ref-pattern.rs index 2d75c12140b..56634544bc9 100644 --- a/tests/ui/binding/func-arg-ref-pattern.rs +++ b/tests/ui/binding/func-arg-ref-pattern.rs @@ -1,4 +1,4 @@ -// run-pass +//@ run-pass // Test argument patterns where we create refs to the inside of // boxes. Make sure that we don't free the box as we match the diff --git a/tests/ui/binding/func-arg-wild-pattern.rs b/tests/ui/binding/func-arg-wild-pattern.rs index bcd82c679a5..35cc9463aea 100644 --- a/tests/ui/binding/func-arg-wild-pattern.rs +++ b/tests/ui/binding/func-arg-wild-pattern.rs @@ -1,4 +1,4 @@ -// run-pass +//@ run-pass // Test that we can compile code that uses a `_` in function argument // patterns. diff --git a/tests/ui/binding/if-let.rs b/tests/ui/binding/if-let.rs index 28d57e92c37..495d5ce9495 100644 --- a/tests/ui/binding/if-let.rs +++ b/tests/ui/binding/if-let.rs @@ -1,4 +1,4 @@ -// run-pass +//@ run-pass #![allow(dead_code)] pub fn main() { diff --git a/tests/ui/binding/inconsistent-lifetime-mismatch.rs b/tests/ui/binding/inconsistent-lifetime-mismatch.rs index 87768c28cf4..b45c72cd9bd 100644 --- a/tests/ui/binding/inconsistent-lifetime-mismatch.rs +++ b/tests/ui/binding/inconsistent-lifetime-mismatch.rs @@ -1,6 +1,6 @@ -// run-pass +//@ run-pass #![allow(dead_code)] -// pretty-expanded FIXME #23616 +//@ pretty-expanded FIXME #23616 fn foo(_: &[&str]) {} diff --git a/tests/ui/binding/inferred-suffix-in-pattern-range.rs b/tests/ui/binding/inferred-suffix-in-pattern-range.rs index 079cc0a16db..0cffc35f344 100644 --- a/tests/ui/binding/inferred-suffix-in-pattern-range.rs +++ b/tests/ui/binding/inferred-suffix-in-pattern-range.rs @@ -1,4 +1,4 @@ -// run-pass +//@ run-pass pub fn main() { let x = 2; diff --git a/tests/ui/binding/irrefutable-if-let-without-else.fixed b/tests/ui/binding/irrefutable-if-let-without-else.fixed index 3d7f4695ca8..0485119522b 100644 --- a/tests/ui/binding/irrefutable-if-let-without-else.fixed +++ b/tests/ui/binding/irrefutable-if-let-without-else.fixed @@ -1,4 +1,4 @@ -// run-rustfix +//@ run-rustfix enum Enum { Variant(i32), } diff --git a/tests/ui/binding/irrefutable-if-let-without-else.rs b/tests/ui/binding/irrefutable-if-let-without-else.rs index 5aaf4ace3f8..a970cf1980a 100644 --- a/tests/ui/binding/irrefutable-if-let-without-else.rs +++ b/tests/ui/binding/irrefutable-if-let-without-else.rs @@ -1,4 +1,4 @@ -// run-rustfix +//@ run-rustfix enum Enum { Variant(i32), } diff --git a/tests/ui/binding/irrefutable-slice-patterns.rs b/tests/ui/binding/irrefutable-slice-patterns.rs index 048e1e5e9b4..b8b5844e1fa 100644 --- a/tests/ui/binding/irrefutable-slice-patterns.rs +++ b/tests/ui/binding/irrefutable-slice-patterns.rs @@ -1,4 +1,4 @@ -// run-pass +//@ run-pass // Regression test for #47096. diff --git a/tests/ui/binding/issue-53114-borrow-checks.rs b/tests/ui/binding/issue-53114-borrow-checks.rs index 6ab1f4f47df..032106647e0 100644 --- a/tests/ui/binding/issue-53114-borrow-checks.rs +++ b/tests/ui/binding/issue-53114-borrow-checks.rs @@ -1,4 +1,4 @@ -// check-pass +//@ check-pass // Issue #53114: NLL's borrow check had some deviations from the old borrow // checker, and both had some deviations from our ideal state. This test // captures the behavior of how `_` bindings are handled with respect to how we diff --git a/tests/ui/binding/let-assignability.rs b/tests/ui/binding/let-assignability.rs index b85f4a96a6d..dab71253364 100644 --- a/tests/ui/binding/let-assignability.rs +++ b/tests/ui/binding/let-assignability.rs @@ -1,4 +1,4 @@ -// run-pass +//@ run-pass fn f() { let a: Box<_> = Box::new(1); diff --git a/tests/ui/binding/let-destruct-ref.rs b/tests/ui/binding/let-destruct-ref.rs index 28d7294ebc8..824ac6f5f02 100644 --- a/tests/ui/binding/let-destruct-ref.rs +++ b/tests/ui/binding/let-destruct-ref.rs @@ -1,4 +1,4 @@ -// run-pass +//@ run-pass pub fn main() { let x = 3_usize; diff --git a/tests/ui/binding/let-var-hygiene.rs b/tests/ui/binding/let-var-hygiene.rs index 571207bd7d6..ef080c5ff4f 100644 --- a/tests/ui/binding/let-var-hygiene.rs +++ b/tests/ui/binding/let-var-hygiene.rs @@ -1,4 +1,4 @@ -// run-pass +//@ run-pass // shouldn't affect evaluation of $ex: macro_rules! bad_macro { diff --git a/tests/ui/binding/match-arm-statics.rs b/tests/ui/binding/match-arm-statics.rs index 5f7e357eeb2..21d0aac260d 100644 --- a/tests/ui/binding/match-arm-statics.rs +++ b/tests/ui/binding/match-arm-statics.rs @@ -1,6 +1,6 @@ -// run-pass +//@ run-pass #![allow(dead_code)] -// compile-flags: -g +//@ compile-flags: -g #[derive(PartialEq, Eq)] struct NewBool(bool); diff --git a/tests/ui/binding/match-beginning-vert.rs b/tests/ui/binding/match-beginning-vert.rs index 93c08f0b710..ac07181e063 100644 --- a/tests/ui/binding/match-beginning-vert.rs +++ b/tests/ui/binding/match-beginning-vert.rs @@ -1,4 +1,4 @@ -// run-pass +//@ run-pass #![feature(if_let_guard)] diff --git a/tests/ui/binding/match-borrowed_str.rs b/tests/ui/binding/match-borrowed_str.rs index 22782032ebf..440f2a002de 100644 --- a/tests/ui/binding/match-borrowed_str.rs +++ b/tests/ui/binding/match-borrowed_str.rs @@ -1,4 +1,4 @@ -// run-pass +//@ run-pass fn f1(ref_string: &str) -> String { match ref_string { diff --git a/tests/ui/binding/match-bot-2.rs b/tests/ui/binding/match-bot-2.rs index 95b3406f0b5..014247417a6 100644 --- a/tests/ui/binding/match-bot-2.rs +++ b/tests/ui/binding/match-bot-2.rs @@ -1,4 +1,4 @@ -// run-pass +//@ run-pass #![allow(unreachable_code)] // n.b. This was only ever failing with optimization disabled. diff --git a/tests/ui/binding/match-bot.rs b/tests/ui/binding/match-bot.rs index 5c4472c7aea..4a5b7f1315f 100644 --- a/tests/ui/binding/match-bot.rs +++ b/tests/ui/binding/match-bot.rs @@ -1,4 +1,4 @@ -// run-pass +//@ run-pass pub fn main() { let i: isize = diff --git a/tests/ui/binding/match-byte-array-patterns.rs b/tests/ui/binding/match-byte-array-patterns.rs index f0c988c01c2..f66feb4300b 100644 --- a/tests/ui/binding/match-byte-array-patterns.rs +++ b/tests/ui/binding/match-byte-array-patterns.rs @@ -1,4 +1,4 @@ -// run-pass +//@ run-pass fn main() { let buf = &[0u8; 4]; diff --git a/tests/ui/binding/match-enum-struct-0.rs b/tests/ui/binding/match-enum-struct-0.rs index e2623ece84c..6885cffadc9 100644 --- a/tests/ui/binding/match-enum-struct-0.rs +++ b/tests/ui/binding/match-enum-struct-0.rs @@ -1,4 +1,4 @@ -// run-pass +//@ run-pass #![allow(dead_code)] // regression test for issue #5625 diff --git a/tests/ui/binding/match-enum-struct-1.rs b/tests/ui/binding/match-enum-struct-1.rs index f035432ec99..57801346905 100644 --- a/tests/ui/binding/match-enum-struct-1.rs +++ b/tests/ui/binding/match-enum-struct-1.rs @@ -1,4 +1,4 @@ -// run-pass +//@ run-pass #![allow(dead_code)] enum E { diff --git a/tests/ui/binding/match-implicit-copy-unique.rs b/tests/ui/binding/match-implicit-copy-unique.rs index 74ffe2ecdb3..ab3b018e759 100644 --- a/tests/ui/binding/match-implicit-copy-unique.rs +++ b/tests/ui/binding/match-implicit-copy-unique.rs @@ -1,4 +1,4 @@ -// run-pass +//@ run-pass #![allow(non_shorthand_field_patterns)] struct Pair { a: Box, b: Box } diff --git a/tests/ui/binding/match-in-macro.rs b/tests/ui/binding/match-in-macro.rs index 0840cc4404d..1f4521f568e 100644 --- a/tests/ui/binding/match-in-macro.rs +++ b/tests/ui/binding/match-in-macro.rs @@ -1,4 +1,4 @@ -// run-pass +//@ run-pass enum Foo { B { b1: isize, bb1: isize}, diff --git a/tests/ui/binding/match-join.rs b/tests/ui/binding/match-join.rs index 60f2a458489..06ac261ec10 100644 --- a/tests/ui/binding/match-join.rs +++ b/tests/ui/binding/match-join.rs @@ -1,4 +1,4 @@ -// run-pass +//@ run-pass #![allow(unused_mut)] fn foo(y: Option) { let mut x: isize; diff --git a/tests/ui/binding/match-larger-const.rs b/tests/ui/binding/match-larger-const.rs index 6f9a353207f..4d9e587fdce 100644 --- a/tests/ui/binding/match-larger-const.rs +++ b/tests/ui/binding/match-larger-const.rs @@ -1,4 +1,4 @@ -// run-pass +//@ run-pass #[derive(Eq, PartialEq)] pub struct Data([u8; 4]); diff --git a/tests/ui/binding/match-naked-record-expr.rs b/tests/ui/binding/match-naked-record-expr.rs index c23ff8c9495..c6557cc10d6 100644 --- a/tests/ui/binding/match-naked-record-expr.rs +++ b/tests/ui/binding/match-naked-record-expr.rs @@ -1,5 +1,5 @@ -// run-pass -// pretty-expanded FIXME #23616 +//@ run-pass +//@ pretty-expanded FIXME #23616 struct X { x: isize } diff --git a/tests/ui/binding/match-naked-record.rs b/tests/ui/binding/match-naked-record.rs index f7479152ebc..24d7aec00e7 100644 --- a/tests/ui/binding/match-naked-record.rs +++ b/tests/ui/binding/match-naked-record.rs @@ -1,6 +1,6 @@ -// run-pass +//@ run-pass #![allow(dead_code)] -// pretty-expanded FIXME #23616 +//@ pretty-expanded FIXME #23616 struct X { x: isize } diff --git a/tests/ui/binding/match-path.rs b/tests/ui/binding/match-path.rs index 286214eb8ac..9bcef9914d1 100644 --- a/tests/ui/binding/match-path.rs +++ b/tests/ui/binding/match-path.rs @@ -1,9 +1,9 @@ -// run-pass +//@ run-pass #![allow(dead_code)] #![allow(non_camel_case_types)] -// pretty-expanded FIXME #23616 +//@ pretty-expanded FIXME #23616 mod m1 { pub enum foo { foo1, foo2, } diff --git a/tests/ui/binding/match-pattern-bindings.rs b/tests/ui/binding/match-pattern-bindings.rs index 4ec533677d6..f9cdaacbe3e 100644 --- a/tests/ui/binding/match-pattern-bindings.rs +++ b/tests/ui/binding/match-pattern-bindings.rs @@ -1,4 +1,4 @@ -// run-pass +//@ run-pass fn main() { let value = Some(1); diff --git a/tests/ui/binding/match-pattern-lit.rs b/tests/ui/binding/match-pattern-lit.rs index c9c6135e2e6..2c453594905 100644 --- a/tests/ui/binding/match-pattern-lit.rs +++ b/tests/ui/binding/match-pattern-lit.rs @@ -1,4 +1,4 @@ -// run-pass +//@ run-pass fn altlit(f: isize) -> isize { diff --git a/tests/ui/binding/match-pattern-no-type-params.rs b/tests/ui/binding/match-pattern-no-type-params.rs index 1fc7ddda023..f4fb3e46e92 100644 --- a/tests/ui/binding/match-pattern-no-type-params.rs +++ b/tests/ui/binding/match-pattern-no-type-params.rs @@ -1,4 +1,4 @@ -// run-pass +//@ run-pass #![allow(dead_code)] #![allow(non_camel_case_types)] diff --git a/tests/ui/binding/match-pattern-simple.rs b/tests/ui/binding/match-pattern-simple.rs index 3f56cd4796d..2e43b702fae 100644 --- a/tests/ui/binding/match-pattern-simple.rs +++ b/tests/ui/binding/match-pattern-simple.rs @@ -1,8 +1,8 @@ -// run-pass +//@ run-pass #![allow(dead_code)] -// pretty-expanded FIXME #23616 +//@ pretty-expanded FIXME #23616 fn altsimple(f: isize) { match f { _x => () } } diff --git a/tests/ui/binding/match-phi.rs b/tests/ui/binding/match-phi.rs index 92a3f6e0f7f..cfef03adaa4 100644 --- a/tests/ui/binding/match-phi.rs +++ b/tests/ui/binding/match-phi.rs @@ -1,7 +1,7 @@ -// run-pass +//@ run-pass #![allow(dead_code)] #![allow(unused_assignments)] -// pretty-expanded FIXME #23616 +//@ pretty-expanded FIXME #23616 #![allow(non_camel_case_types)] #![allow(unused_variables)] diff --git a/tests/ui/binding/match-pipe-binding.rs b/tests/ui/binding/match-pipe-binding.rs index 7d4a7c708dd..616de521ed5 100644 --- a/tests/ui/binding/match-pipe-binding.rs +++ b/tests/ui/binding/match-pipe-binding.rs @@ -1,4 +1,4 @@ -// run-pass +//@ run-pass fn test1() { // from issue 6338 diff --git a/tests/ui/binding/match-range-infer.rs b/tests/ui/binding/match-range-infer.rs index 19d1cb89d4a..aebfa037651 100644 --- a/tests/ui/binding/match-range-infer.rs +++ b/tests/ui/binding/match-range-infer.rs @@ -1,4 +1,4 @@ -// run-pass +//@ run-pass // Test that type inference for range patterns works correctly (is bi-directional). pub fn main() { diff --git a/tests/ui/binding/match-range-static.rs b/tests/ui/binding/match-range-static.rs index f01a3505ee6..478dfb3cf41 100644 --- a/tests/ui/binding/match-range-static.rs +++ b/tests/ui/binding/match-range-static.rs @@ -1,5 +1,5 @@ -// run-pass -// pretty-expanded FIXME #23616 +//@ run-pass +//@ pretty-expanded FIXME #23616 #![allow(non_upper_case_globals)] const s: isize = 1; diff --git a/tests/ui/binding/match-range.rs b/tests/ui/binding/match-range.rs index cb7b93e7cc6..a024e5e585a 100644 --- a/tests/ui/binding/match-range.rs +++ b/tests/ui/binding/match-range.rs @@ -1,4 +1,4 @@ -// run-pass +//@ run-pass #![feature(exclusive_range_pattern)] pub fn main() { diff --git a/tests/ui/binding/match-reassign.rs b/tests/ui/binding/match-reassign.rs index 19b48579cb4..bf4fb45ed92 100644 --- a/tests/ui/binding/match-reassign.rs +++ b/tests/ui/binding/match-reassign.rs @@ -1,4 +1,4 @@ -// run-pass +//@ run-pass // Regression test for #23698: The reassignment checker only cared // about the last assignment in a match arm body diff --git a/tests/ui/binding/match-ref-binding-in-guard-3256.rs b/tests/ui/binding/match-ref-binding-in-guard-3256.rs index 9075a34d410..52e2745f2d6 100644 --- a/tests/ui/binding/match-ref-binding-in-guard-3256.rs +++ b/tests/ui/binding/match-ref-binding-in-guard-3256.rs @@ -1,4 +1,4 @@ -// run-pass +//@ run-pass use std::sync::Mutex; diff --git a/tests/ui/binding/match-ref-binding-mut-option.rs b/tests/ui/binding/match-ref-binding-mut-option.rs index c25639b7213..f500e05c572 100644 --- a/tests/ui/binding/match-ref-binding-mut-option.rs +++ b/tests/ui/binding/match-ref-binding-mut-option.rs @@ -1,4 +1,4 @@ -// run-pass +//@ run-pass pub fn main() { let mut v = Some(22); diff --git a/tests/ui/binding/match-ref-binding-mut.rs b/tests/ui/binding/match-ref-binding-mut.rs index d7afd61bc8e..ab481480832 100644 --- a/tests/ui/binding/match-ref-binding-mut.rs +++ b/tests/ui/binding/match-ref-binding-mut.rs @@ -1,4 +1,4 @@ -// run-pass +//@ run-pass #![allow(non_shorthand_field_patterns)] struct Rec { diff --git a/tests/ui/binding/match-ref-binding.rs b/tests/ui/binding/match-ref-binding.rs index ac6a07eabe1..d211c455e16 100644 --- a/tests/ui/binding/match-ref-binding.rs +++ b/tests/ui/binding/match-ref-binding.rs @@ -1,4 +1,4 @@ -// run-pass +//@ run-pass fn destructure(x: Option) -> isize { match x { diff --git a/tests/ui/binding/match-ref-unsized.rs b/tests/ui/binding/match-ref-unsized.rs index 53784ebb9fc..204308dc9ec 100644 --- a/tests/ui/binding/match-ref-unsized.rs +++ b/tests/ui/binding/match-ref-unsized.rs @@ -1,4 +1,4 @@ -// run-pass +//@ run-pass // Binding unsized expressions to ref patterns pub fn main() { diff --git a/tests/ui/binding/match-str.rs b/tests/ui/binding/match-str.rs index 0ee18ea18de..0444f487b11 100644 --- a/tests/ui/binding/match-str.rs +++ b/tests/ui/binding/match-str.rs @@ -1,4 +1,4 @@ -// run-pass +//@ run-pass #![allow(dead_code)] // Issue #53 #![allow(non_camel_case_types)] diff --git a/tests/ui/binding/match-struct-0.rs b/tests/ui/binding/match-struct-0.rs index c49f3ed6178..8f7dbbd9a08 100644 --- a/tests/ui/binding/match-struct-0.rs +++ b/tests/ui/binding/match-struct-0.rs @@ -1,4 +1,4 @@ -// run-pass +//@ run-pass struct Foo{ f : isize, diff --git a/tests/ui/binding/match-tag.rs b/tests/ui/binding/match-tag.rs index 6914a1c6b6d..c2dfbbddde4 100644 --- a/tests/ui/binding/match-tag.rs +++ b/tests/ui/binding/match-tag.rs @@ -1,4 +1,4 @@ -// run-pass +//@ run-pass #![allow(unused_mut)] #![allow(non_camel_case_types)] diff --git a/tests/ui/binding/match-unique-bind.rs b/tests/ui/binding/match-unique-bind.rs index 507478983f6..02f1945f571 100644 --- a/tests/ui/binding/match-unique-bind.rs +++ b/tests/ui/binding/match-unique-bind.rs @@ -1,4 +1,4 @@ -// run-pass +//@ run-pass #![feature(box_patterns)] pub fn main() { diff --git a/tests/ui/binding/match-unsized.rs b/tests/ui/binding/match-unsized.rs index 41937a557ef..95019a6f222 100644 --- a/tests/ui/binding/match-unsized.rs +++ b/tests/ui/binding/match-unsized.rs @@ -1,4 +1,4 @@ -// run-pass +//@ run-pass fn main() { let data: &'static str = "Hello, World!"; match data { diff --git a/tests/ui/binding/match-value-binding-in-guard-3291.rs b/tests/ui/binding/match-value-binding-in-guard-3291.rs index 0d750da79e7..a1f939cadca 100644 --- a/tests/ui/binding/match-value-binding-in-guard-3291.rs +++ b/tests/ui/binding/match-value-binding-in-guard-3291.rs @@ -1,5 +1,5 @@ -// run-pass -// pretty-expanded FIXME #23616 +//@ run-pass +//@ pretty-expanded FIXME #23616 fn foo(x: Option>, b: bool) -> isize { match x { diff --git a/tests/ui/binding/match-var-hygiene.rs b/tests/ui/binding/match-var-hygiene.rs index 43740bbcf1d..b076082a5f4 100644 --- a/tests/ui/binding/match-var-hygiene.rs +++ b/tests/ui/binding/match-var-hygiene.rs @@ -1,4 +1,4 @@ -// run-pass +//@ run-pass // shouldn't affect evaluation of $ex. macro_rules! bad_macro { ($ex:expr) => ( {match 9 {_x => $ex}} diff --git a/tests/ui/binding/match-vec-alternatives.rs b/tests/ui/binding/match-vec-alternatives.rs index af95eb95df0..83e3d9bd5da 100644 --- a/tests/ui/binding/match-vec-alternatives.rs +++ b/tests/ui/binding/match-vec-alternatives.rs @@ -1,4 +1,4 @@ -// run-pass +//@ run-pass fn match_vecs<'a, T>(l1: &'a [T], l2: &'a [T]) -> &'static str { match (l1, l2) { diff --git a/tests/ui/binding/match-vec-rvalue.rs b/tests/ui/binding/match-vec-rvalue.rs index fead2254c75..f21cc37a35b 100644 --- a/tests/ui/binding/match-vec-rvalue.rs +++ b/tests/ui/binding/match-vec-rvalue.rs @@ -1,4 +1,4 @@ -// run-pass +//@ run-pass // Tests that matching rvalues with drops does not crash. diff --git a/tests/ui/binding/match-with-ret-arm.rs b/tests/ui/binding/match-with-ret-arm.rs index 58a90964121..d5e1a973ad1 100644 --- a/tests/ui/binding/match-with-ret-arm.rs +++ b/tests/ui/binding/match-with-ret-arm.rs @@ -1,4 +1,4 @@ -// run-pass +//@ run-pass pub fn main() { // sometimes we have had trouble finding // the right type for f, as we unified diff --git a/tests/ui/binding/multi-let.rs b/tests/ui/binding/multi-let.rs index 064d32a7084..7f8671a5a65 100644 --- a/tests/ui/binding/multi-let.rs +++ b/tests/ui/binding/multi-let.rs @@ -1,4 +1,4 @@ -// run-pass +//@ run-pass pub fn main() { let x = 10; diff --git a/tests/ui/binding/mut-in-ident-patterns.rs b/tests/ui/binding/mut-in-ident-patterns.rs index 1d1dd660e51..40b7e5b7398 100644 --- a/tests/ui/binding/mut-in-ident-patterns.rs +++ b/tests/ui/binding/mut-in-ident-patterns.rs @@ -1,4 +1,4 @@ -// run-pass +//@ run-pass #![allow(dead_code)] #![allow(unused_assignments)] #![allow(non_camel_case_types)] diff --git a/tests/ui/binding/nested-matchs.rs b/tests/ui/binding/nested-matchs.rs index 29490fd4888..03e688ec50e 100644 --- a/tests/ui/binding/nested-matchs.rs +++ b/tests/ui/binding/nested-matchs.rs @@ -1,4 +1,4 @@ -// run-pass +//@ run-pass #![allow(unused_mut)] // under NLL we get warning about `bar` below fn baz() -> ! { panic!(); } diff --git a/tests/ui/binding/nested-pattern.rs b/tests/ui/binding/nested-pattern.rs index 7d14c9ad9b7..c4b5824fb0a 100644 --- a/tests/ui/binding/nested-pattern.rs +++ b/tests/ui/binding/nested-pattern.rs @@ -1,4 +1,4 @@ -// run-pass +//@ run-pass #![allow(dead_code)] #![allow(non_camel_case_types)] diff --git a/tests/ui/binding/nil-pattern.rs b/tests/ui/binding/nil-pattern.rs index 268af351d08..757d701c15a 100644 --- a/tests/ui/binding/nil-pattern.rs +++ b/tests/ui/binding/nil-pattern.rs @@ -1,4 +1,4 @@ -// run-pass -// pretty-expanded FIXME #23616 +//@ run-pass +//@ pretty-expanded FIXME #23616 pub fn main() { let x = (); match x { () => { } } } diff --git a/tests/ui/binding/nullary-or-pattern.rs b/tests/ui/binding/nullary-or-pattern.rs index 7a3d9d60eda..7cd3b6ac08f 100644 --- a/tests/ui/binding/nullary-or-pattern.rs +++ b/tests/ui/binding/nullary-or-pattern.rs @@ -1,4 +1,4 @@ -// run-pass +//@ run-pass #![allow(non_camel_case_types)] enum blah { a, b, } diff --git a/tests/ui/binding/optional_comma_in_match_arm.rs b/tests/ui/binding/optional_comma_in_match_arm.rs index 71e2f07bb6b..16fc72bbac0 100644 --- a/tests/ui/binding/optional_comma_in_match_arm.rs +++ b/tests/ui/binding/optional_comma_in_match_arm.rs @@ -1,4 +1,4 @@ -// run-pass +//@ run-pass #![allow(unused_unsafe)] #![allow(while_true)] diff --git a/tests/ui/binding/or-pattern.rs b/tests/ui/binding/or-pattern.rs index 07559e414dc..943b2cae253 100644 --- a/tests/ui/binding/or-pattern.rs +++ b/tests/ui/binding/or-pattern.rs @@ -1,4 +1,4 @@ -// run-pass +//@ run-pass #![allow(non_camel_case_types)] enum blah { a(isize, isize, #[allow(dead_code)] usize), b(isize, isize), c, } diff --git a/tests/ui/binding/order-drop-with-match.rs b/tests/ui/binding/order-drop-with-match.rs index f50632ede9f..c12c5e4c627 100644 --- a/tests/ui/binding/order-drop-with-match.rs +++ b/tests/ui/binding/order-drop-with-match.rs @@ -1,4 +1,4 @@ -// run-pass +//@ run-pass // Test to make sure the destructors run in the right order. // Each destructor sets it's tag in the corresponding entry diff --git a/tests/ui/binding/pat-ranges.rs b/tests/ui/binding/pat-ranges.rs index 19b3045784f..7d43b8b5cfb 100644 --- a/tests/ui/binding/pat-ranges.rs +++ b/tests/ui/binding/pat-ranges.rs @@ -1,4 +1,4 @@ -// run-pass +//@ run-pass // Parsing of range patterns #![allow(ellipsis_inclusive_range_patterns)] diff --git a/tests/ui/binding/pat-tuple-1.rs b/tests/ui/binding/pat-tuple-1.rs index b09d4a22df0..dc2d0496f42 100644 --- a/tests/ui/binding/pat-tuple-1.rs +++ b/tests/ui/binding/pat-tuple-1.rs @@ -1,4 +1,4 @@ -// run-pass +//@ run-pass fn tuple() { let x = (1, 2, 3); match x { diff --git a/tests/ui/binding/pat-tuple-2.rs b/tests/ui/binding/pat-tuple-2.rs index 810fd264139..71dc29ada10 100644 --- a/tests/ui/binding/pat-tuple-2.rs +++ b/tests/ui/binding/pat-tuple-2.rs @@ -1,4 +1,4 @@ -// run-pass +//@ run-pass fn tuple() { let x = (1,); match x { diff --git a/tests/ui/binding/pat-tuple-3.rs b/tests/ui/binding/pat-tuple-3.rs index 9bec898611e..839e3bb3bdd 100644 --- a/tests/ui/binding/pat-tuple-3.rs +++ b/tests/ui/binding/pat-tuple-3.rs @@ -1,4 +1,4 @@ -// run-pass +//@ run-pass fn tuple() { let x = (1, 2, 3); let branch = match x { diff --git a/tests/ui/binding/pat-tuple-4.rs b/tests/ui/binding/pat-tuple-4.rs index 71a54850268..f1193568520 100644 --- a/tests/ui/binding/pat-tuple-4.rs +++ b/tests/ui/binding/pat-tuple-4.rs @@ -1,4 +1,4 @@ -// run-pass +//@ run-pass fn tuple() { let x = (1, 2, 3); match x { diff --git a/tests/ui/binding/pat-tuple-5.rs b/tests/ui/binding/pat-tuple-5.rs index c8cdd37dd85..928fc743417 100644 --- a/tests/ui/binding/pat-tuple-5.rs +++ b/tests/ui/binding/pat-tuple-5.rs @@ -1,4 +1,4 @@ -// run-pass +//@ run-pass fn tuple() { struct S; struct Z; diff --git a/tests/ui/binding/pat-tuple-6.rs b/tests/ui/binding/pat-tuple-6.rs index 877f0e4140e..7c47e836275 100644 --- a/tests/ui/binding/pat-tuple-6.rs +++ b/tests/ui/binding/pat-tuple-6.rs @@ -1,4 +1,4 @@ -// run-pass +//@ run-pass fn tuple() { let x = (1, 2, 3, 4, 5); match x { diff --git a/tests/ui/binding/pat-tuple-7.rs b/tests/ui/binding/pat-tuple-7.rs index 7835e2c352f..ad2bb7715af 100644 --- a/tests/ui/binding/pat-tuple-7.rs +++ b/tests/ui/binding/pat-tuple-7.rs @@ -1,4 +1,4 @@ -// run-pass +//@ run-pass fn main() { #[allow(unused_parens)] diff --git a/tests/ui/binding/pattern-bound-var-in-for-each.rs b/tests/ui/binding/pattern-bound-var-in-for-each.rs index 3f725cddc5b..0932e9d1959 100644 --- a/tests/ui/binding/pattern-bound-var-in-for-each.rs +++ b/tests/ui/binding/pattern-bound-var-in-for-each.rs @@ -1,4 +1,4 @@ -// run-pass +//@ run-pass // Tests that codegen_path checks whether a // pattern-bound var is an upvar (when codegenning // the for-each body) diff --git a/tests/ui/binding/pattern-in-closure.rs b/tests/ui/binding/pattern-in-closure.rs index 3ac8d57681a..928c179a8b3 100644 --- a/tests/ui/binding/pattern-in-closure.rs +++ b/tests/ui/binding/pattern-in-closure.rs @@ -1,4 +1,4 @@ -// run-pass +//@ run-pass #![allow(non_shorthand_field_patterns)] struct Foo { diff --git a/tests/ui/binding/range-inclusive-pattern-precedence.rs b/tests/ui/binding/range-inclusive-pattern-precedence.rs index 858239bb177..378ea00ee69 100644 --- a/tests/ui/binding/range-inclusive-pattern-precedence.rs +++ b/tests/ui/binding/range-inclusive-pattern-precedence.rs @@ -1,4 +1,4 @@ -// run-pass +//@ run-pass #![feature(box_patterns)] const VALUE: usize = 21; diff --git a/tests/ui/binding/shadow.rs b/tests/ui/binding/shadow.rs index 2495c8f47e7..d13737cdc13 100644 --- a/tests/ui/binding/shadow.rs +++ b/tests/ui/binding/shadow.rs @@ -1,4 +1,4 @@ -// run-pass +//@ run-pass #![allow(non_camel_case_types)] #![allow(dead_code)] diff --git a/tests/ui/binding/simple-generic-match.rs b/tests/ui/binding/simple-generic-match.rs index acac32b8231..910bab03e1f 100644 --- a/tests/ui/binding/simple-generic-match.rs +++ b/tests/ui/binding/simple-generic-match.rs @@ -1,7 +1,7 @@ -// run-pass +//@ run-pass #![allow(non_camel_case_types)] -// pretty-expanded FIXME #23616 +//@ pretty-expanded FIXME #23616 enum clam { a(#[allow(dead_code)] T), } diff --git a/tests/ui/binding/use-uninit-match.rs b/tests/ui/binding/use-uninit-match.rs index 9250dbf0c43..de55334ffc8 100644 --- a/tests/ui/binding/use-uninit-match.rs +++ b/tests/ui/binding/use-uninit-match.rs @@ -1,4 +1,4 @@ -// run-pass +//@ run-pass #![allow(dead_code)] #![allow(non_camel_case_types)] diff --git a/tests/ui/binding/use-uninit-match2.rs b/tests/ui/binding/use-uninit-match2.rs index 9102730629b..48fe449c5b3 100644 --- a/tests/ui/binding/use-uninit-match2.rs +++ b/tests/ui/binding/use-uninit-match2.rs @@ -1,4 +1,4 @@ -// run-pass +//@ run-pass #![allow(dead_code)] #![allow(unused_mut)] #![allow(non_camel_case_types)] diff --git a/tests/ui/binding/zero_sized_subslice_match.rs b/tests/ui/binding/zero_sized_subslice_match.rs index 187c2983633..6da9f9593b4 100644 --- a/tests/ui/binding/zero_sized_subslice_match.rs +++ b/tests/ui/binding/zero_sized_subslice_match.rs @@ -1,4 +1,4 @@ -// run-pass +//@ run-pass fn main() { let x = [(), ()]; diff --git a/tests/ui/binop/binary-minus-without-space.rs b/tests/ui/binop/binary-minus-without-space.rs index 2fbd5300dd1..c80c0c88fcb 100644 --- a/tests/ui/binop/binary-minus-without-space.rs +++ b/tests/ui/binop/binary-minus-without-space.rs @@ -1,4 +1,4 @@ -// run-pass +//@ run-pass // Check that issue #954 stays fixed diff --git a/tests/ui/binop/binary-op-on-double-ref.fixed b/tests/ui/binop/binary-op-on-double-ref.fixed index 586d2568c30..c471c20b0a0 100644 --- a/tests/ui/binop/binary-op-on-double-ref.fixed +++ b/tests/ui/binop/binary-op-on-double-ref.fixed @@ -1,4 +1,4 @@ -// run-rustfix +//@ run-rustfix fn main() { let v = vec![1, 2, 3, 4, 5, 6, 7, 8, 9]; let vr = v.iter().filter(|x| { diff --git a/tests/ui/binop/binary-op-on-double-ref.rs b/tests/ui/binop/binary-op-on-double-ref.rs index 48ee445466e..18b5906120a 100644 --- a/tests/ui/binop/binary-op-on-double-ref.rs +++ b/tests/ui/binop/binary-op-on-double-ref.rs @@ -1,4 +1,4 @@ -// run-rustfix +//@ run-rustfix fn main() { let v = vec![1, 2, 3, 4, 5, 6, 7, 8, 9]; let vr = v.iter().filter(|x| { diff --git a/tests/ui/binop/binary-op-on-fn-ptr-eq.rs b/tests/ui/binop/binary-op-on-fn-ptr-eq.rs index 8e20640b58d..a5ec63587f9 100644 --- a/tests/ui/binop/binary-op-on-fn-ptr-eq.rs +++ b/tests/ui/binop/binary-op-on-fn-ptr-eq.rs @@ -1,4 +1,4 @@ -// run-pass +//@ run-pass // Tests equality between supertype and subtype of a function // See the issue #91636 fn foo(_a: &str) {} diff --git a/tests/ui/binop/binop-bitxor-str.rs b/tests/ui/binop/binop-bitxor-str.rs index 3085cce3f3e..d59e46167fe 100644 --- a/tests/ui/binop/binop-bitxor-str.rs +++ b/tests/ui/binop/binop-bitxor-str.rs @@ -1,3 +1,3 @@ -// error-pattern:no implementation for `String ^ String` +//@ error-pattern:no implementation for `String ^ String` fn main() { let x = "a".to_string() ^ "b".to_string(); } diff --git a/tests/ui/binop/binop-fail-3.rs b/tests/ui/binop/binop-fail-3.rs index 49f635e0c11..b1e70a1c596 100644 --- a/tests/ui/binop/binop-fail-3.rs +++ b/tests/ui/binop/binop-fail-3.rs @@ -1,6 +1,6 @@ -// run-fail -// error-pattern:quux -// ignore-emscripten no processes +//@ run-fail +//@ error-pattern:quux +//@ ignore-emscripten no processes fn foo() -> ! { panic!("quux"); diff --git a/tests/ui/binop/binop-mul-bool.rs b/tests/ui/binop/binop-mul-bool.rs index 41494c7a017..0b4ed21a12d 100644 --- a/tests/ui/binop/binop-mul-bool.rs +++ b/tests/ui/binop/binop-mul-bool.rs @@ -1,3 +1,3 @@ -// error-pattern:cannot multiply `bool` by `bool` +//@ error-pattern:cannot multiply `bool` by `bool` fn main() { let x = true * false; } diff --git a/tests/ui/binop/binop-panic.rs b/tests/ui/binop/binop-panic.rs index 44cdfffeeb7..8dbf62a922e 100644 --- a/tests/ui/binop/binop-panic.rs +++ b/tests/ui/binop/binop-panic.rs @@ -1,6 +1,6 @@ -// run-fail -// error-pattern:quux -// ignore-emscripten no processes +//@ run-fail +//@ error-pattern:quux +//@ ignore-emscripten no processes fn my_err(s: String) -> ! { println!("{}", s); diff --git a/tests/ui/binop/binops-issue-22743.rs b/tests/ui/binop/binops-issue-22743.rs index 393ba0a56cb..d8f7d94ab41 100644 --- a/tests/ui/binop/binops-issue-22743.rs +++ b/tests/ui/binop/binops-issue-22743.rs @@ -1,4 +1,4 @@ -// run-pass +//@ run-pass use std::ops::Mul; diff --git a/tests/ui/binop/binops.rs b/tests/ui/binop/binops.rs index a7abf6087b3..0adbb49b14a 100644 --- a/tests/ui/binop/binops.rs +++ b/tests/ui/binop/binops.rs @@ -1,4 +1,4 @@ -// run-pass +//@ run-pass #![allow(non_camel_case_types)] // Binop corner cases diff --git a/tests/ui/binop/borrow-suggestion-109352.fixed b/tests/ui/binop/borrow-suggestion-109352.fixed index 3374a9d78b2..15548289155 100644 --- a/tests/ui/binop/borrow-suggestion-109352.fixed +++ b/tests/ui/binop/borrow-suggestion-109352.fixed @@ -1,4 +1,4 @@ -// run-rustfix +//@ run-rustfix struct Foo; diff --git a/tests/ui/binop/borrow-suggestion-109352.rs b/tests/ui/binop/borrow-suggestion-109352.rs index 4e8510e0de5..b01b7f04ce9 100644 --- a/tests/ui/binop/borrow-suggestion-109352.rs +++ b/tests/ui/binop/borrow-suggestion-109352.rs @@ -1,4 +1,4 @@ -// run-rustfix +//@ run-rustfix struct Foo; diff --git a/tests/ui/binop/false-binop-caused-by-missing-semi.fixed b/tests/ui/binop/false-binop-caused-by-missing-semi.fixed index b47372c9064..6ad6aa0ccef 100644 --- a/tests/ui/binop/false-binop-caused-by-missing-semi.fixed +++ b/tests/ui/binop/false-binop-caused-by-missing-semi.fixed @@ -1,4 +1,4 @@ -// run-rustfix +//@ run-rustfix fn foo() {} fn main() { let mut y = 42; diff --git a/tests/ui/binop/false-binop-caused-by-missing-semi.rs b/tests/ui/binop/false-binop-caused-by-missing-semi.rs index 14671de7e51..39270d767fe 100644 --- a/tests/ui/binop/false-binop-caused-by-missing-semi.rs +++ b/tests/ui/binop/false-binop-caused-by-missing-semi.rs @@ -1,4 +1,4 @@ -// run-rustfix +//@ run-rustfix fn foo() {} fn main() { let mut y = 42; diff --git a/tests/ui/binop/issue-25916.rs b/tests/ui/binop/issue-25916.rs index 0b415947965..c6721fab710 100644 --- a/tests/ui/binop/issue-25916.rs +++ b/tests/ui/binop/issue-25916.rs @@ -1,4 +1,4 @@ -// run-pass +//@ run-pass #![allow(unused_must_use)] fn main() { diff --git a/tests/ui/binop/operator-multidispatch.rs b/tests/ui/binop/operator-multidispatch.rs index 0d1dcfd8bdd..5ac4074b797 100644 --- a/tests/ui/binop/operator-multidispatch.rs +++ b/tests/ui/binop/operator-multidispatch.rs @@ -1,4 +1,4 @@ -// run-pass +//@ run-pass // Test that we can overload the `+` operator for points so that two // points can be added, and a point can be added to an integer. diff --git a/tests/ui/binop/operator-overloading.rs b/tests/ui/binop/operator-overloading.rs index 6b3abcbc76c..7f29856194e 100644 --- a/tests/ui/binop/operator-overloading.rs +++ b/tests/ui/binop/operator-overloading.rs @@ -1,4 +1,4 @@ -// run-pass +//@ run-pass #![allow(unused_variables)] use std::cmp; diff --git a/tests/ui/binop/structured-compare.rs b/tests/ui/binop/structured-compare.rs index 63d30c4da89..164760cd7a0 100644 --- a/tests/ui/binop/structured-compare.rs +++ b/tests/ui/binop/structured-compare.rs @@ -1,4 +1,4 @@ -// run-pass +//@ run-pass #![allow(non_camel_case_types)] diff --git a/tests/ui/bitwise.rs b/tests/ui/bitwise.rs index f79ff3c6efb..0779e7f229c 100644 --- a/tests/ui/bitwise.rs +++ b/tests/ui/bitwise.rs @@ -1,4 +1,4 @@ -// run-pass +//@ run-pass #[cfg(any(target_pointer_width = "32"))] fn target() { diff --git a/tests/ui/block-result/consider-removing-last-semi.fixed b/tests/ui/block-result/consider-removing-last-semi.fixed index 36a769fe529..80d86c80ff0 100644 --- a/tests/ui/block-result/consider-removing-last-semi.fixed +++ b/tests/ui/block-result/consider-removing-last-semi.fixed @@ -1,4 +1,4 @@ -// run-rustfix +//@ run-rustfix pub fn f() -> String { //~ ERROR mismatched types 0u8; diff --git a/tests/ui/block-result/consider-removing-last-semi.rs b/tests/ui/block-result/consider-removing-last-semi.rs index b9a73148902..6d65fb61b32 100644 --- a/tests/ui/block-result/consider-removing-last-semi.rs +++ b/tests/ui/block-result/consider-removing-last-semi.rs @@ -1,4 +1,4 @@ -// run-rustfix +//@ run-rustfix pub fn f() -> String { //~ ERROR mismatched types 0u8; diff --git a/tests/ui/borrow-by-val-method-receiver.rs b/tests/ui/borrow-by-val-method-receiver.rs index 465bef1614d..aee1108d96d 100644 --- a/tests/ui/borrow-by-val-method-receiver.rs +++ b/tests/ui/borrow-by-val-method-receiver.rs @@ -1,4 +1,4 @@ -// run-pass +//@ run-pass trait Foo { fn foo(self); diff --git a/tests/ui/borrowck/alias-liveness/escaping-bounds.rs b/tests/ui/borrowck/alias-liveness/escaping-bounds.rs index 3ccdc78e60a..3f9246f68fc 100644 --- a/tests/ui/borrowck/alias-liveness/escaping-bounds.rs +++ b/tests/ui/borrowck/alias-liveness/escaping-bounds.rs @@ -1,4 +1,4 @@ -// check-pass +//@ check-pass // Ensure that we don't ICE when an alias that has escaping bound vars is // required to be live. This is because the code that allows us to deduce an diff --git a/tests/ui/borrowck/alias-liveness/gat-static.rs b/tests/ui/borrowck/alias-liveness/gat-static.rs index 92153124af9..2fadd200e42 100644 --- a/tests/ui/borrowck/alias-liveness/gat-static.rs +++ b/tests/ui/borrowck/alias-liveness/gat-static.rs @@ -1,4 +1,4 @@ -// check-pass +//@ check-pass trait Foo { type Assoc<'a> diff --git a/tests/ui/borrowck/alias-liveness/higher-ranked-outlives-for-capture.rs b/tests/ui/borrowck/alias-liveness/higher-ranked-outlives-for-capture.rs index 1f26c7babf2..ca780d5cf26 100644 --- a/tests/ui/borrowck/alias-liveness/higher-ranked-outlives-for-capture.rs +++ b/tests/ui/borrowck/alias-liveness/higher-ranked-outlives-for-capture.rs @@ -1,4 +1,4 @@ -// known-bug: #42940 +//@ known-bug: #42940 trait Captures<'a> {} impl Captures<'_> for T {} diff --git a/tests/ui/borrowck/alias-liveness/higher-ranked.rs b/tests/ui/borrowck/alias-liveness/higher-ranked.rs index afd0d3b31e3..3af12529982 100644 --- a/tests/ui/borrowck/alias-liveness/higher-ranked.rs +++ b/tests/ui/borrowck/alias-liveness/higher-ranked.rs @@ -1,4 +1,4 @@ -// check-pass +//@ check-pass trait Captures<'a> {} impl Captures<'_> for T {} diff --git a/tests/ui/borrowck/alias-liveness/opaque-capture.rs b/tests/ui/borrowck/alias-liveness/opaque-capture.rs index f4ca2728bdb..35b7d04d2ef 100644 --- a/tests/ui/borrowck/alias-liveness/opaque-capture.rs +++ b/tests/ui/borrowck/alias-liveness/opaque-capture.rs @@ -1,4 +1,4 @@ -// check-pass +//@ check-pass // Check that opaques capturing early and late-bound vars correctly mark // regions required to be live using the item bounds. diff --git a/tests/ui/borrowck/alias-liveness/opaque-type-param.rs b/tests/ui/borrowck/alias-liveness/opaque-type-param.rs index a292463b2ac..e7309b5135f 100644 --- a/tests/ui/borrowck/alias-liveness/opaque-type-param.rs +++ b/tests/ui/borrowck/alias-liveness/opaque-type-param.rs @@ -1,4 +1,4 @@ -// known-bug: #42940 +//@ known-bug: #42940 trait Trait {} impl Trait for () {} diff --git a/tests/ui/borrowck/alias-liveness/rpit-static.rs b/tests/ui/borrowck/alias-liveness/rpit-static.rs index 45da3edb878..98209f5f3b9 100644 --- a/tests/ui/borrowck/alias-liveness/rpit-static.rs +++ b/tests/ui/borrowck/alias-liveness/rpit-static.rs @@ -1,4 +1,4 @@ -// check-pass +//@ check-pass trait Captures<'a> {} impl Captures<'_> for T {} diff --git a/tests/ui/borrowck/alias-liveness/rpitit-static.rs b/tests/ui/borrowck/alias-liveness/rpitit-static.rs index 2cc68d2bf3d..47f757c35ad 100644 --- a/tests/ui/borrowck/alias-liveness/rpitit-static.rs +++ b/tests/ui/borrowck/alias-liveness/rpitit-static.rs @@ -1,4 +1,4 @@ -// check-pass +//@ check-pass trait Foo { fn rpitit(&mut self) -> impl Sized + 'static; diff --git a/tests/ui/borrowck/alias-liveness/rtn-static.rs b/tests/ui/borrowck/alias-liveness/rtn-static.rs index 1f136b8b998..37f634a8e23 100644 --- a/tests/ui/borrowck/alias-liveness/rtn-static.rs +++ b/tests/ui/borrowck/alias-liveness/rtn-static.rs @@ -1,4 +1,4 @@ -// check-pass +//@ check-pass #![feature(return_type_notation)] //~^ WARN the feature `return_type_notation` is incomplete diff --git a/tests/ui/borrowck/assign-never-type.rs b/tests/ui/borrowck/assign-never-type.rs index 4f30ea14670..17993bfc08f 100644 --- a/tests/ui/borrowck/assign-never-type.rs +++ b/tests/ui/borrowck/assign-never-type.rs @@ -1,6 +1,6 @@ // Regression test for issue 62165 -// check-pass +//@ check-pass #![feature(never_type)] diff --git a/tests/ui/borrowck/async-reference-generality.rs b/tests/ui/borrowck/async-reference-generality.rs index 668df9ea710..9818504f66c 100644 --- a/tests/ui/borrowck/async-reference-generality.rs +++ b/tests/ui/borrowck/async-reference-generality.rs @@ -1,5 +1,5 @@ -// check-pass -// edition: 2021 +//@ check-pass +//@ edition: 2021 use std::marker::PhantomData; diff --git a/tests/ui/borrowck/borrow-raw-address-of-deref-mutability-ok.rs b/tests/ui/borrowck/borrow-raw-address-of-deref-mutability-ok.rs index e381384fe65..0dfced34c7e 100644 --- a/tests/ui/borrowck/borrow-raw-address-of-deref-mutability-ok.rs +++ b/tests/ui/borrowck/borrow-raw-address-of-deref-mutability-ok.rs @@ -1,4 +1,4 @@ -// check-pass +//@ check-pass #![feature(raw_ref_op)] diff --git a/tests/ui/borrowck/borrow-raw-address-of-mutability-ok.rs b/tests/ui/borrowck/borrow-raw-address-of-mutability-ok.rs index e1cf2dc5386..7b0232a9d45 100644 --- a/tests/ui/borrowck/borrow-raw-address-of-mutability-ok.rs +++ b/tests/ui/borrowck/borrow-raw-address-of-mutability-ok.rs @@ -1,4 +1,4 @@ -// check-pass +//@ check-pass #![feature(raw_ref_op)] diff --git a/tests/ui/borrowck/borrowck-assign-to-subfield.rs b/tests/ui/borrowck/borrowck-assign-to-subfield.rs index 050d702b625..807941d9c85 100644 --- a/tests/ui/borrowck/borrowck-assign-to-subfield.rs +++ b/tests/ui/borrowck/borrowck-assign-to-subfield.rs @@ -1,5 +1,5 @@ -// run-pass -// pretty-expanded FIXME #23616 +//@ run-pass +//@ pretty-expanded FIXME #23616 pub fn main() { struct A { diff --git a/tests/ui/borrowck/borrowck-assignment-to-static-mut.rs b/tests/ui/borrowck/borrowck-assignment-to-static-mut.rs index 72bf43da95e..3b7b1089c29 100644 --- a/tests/ui/borrowck/borrowck-assignment-to-static-mut.rs +++ b/tests/ui/borrowck/borrowck-assignment-to-static-mut.rs @@ -1,4 +1,4 @@ -// run-pass +//@ run-pass #![allow(dead_code)] // Test taken from #45641 (https://github.com/rust-lang/rust/issues/45641) diff --git a/tests/ui/borrowck/borrowck-binding-mutbl.rs b/tests/ui/borrowck/borrowck-binding-mutbl.rs index c2d2e02ec15..b7d30134b5a 100644 --- a/tests/ui/borrowck/borrowck-binding-mutbl.rs +++ b/tests/ui/borrowck/borrowck-binding-mutbl.rs @@ -1,4 +1,4 @@ -// run-pass +//@ run-pass struct F { f: Vec } diff --git a/tests/ui/borrowck/borrowck-borrow-from-expr-block.rs b/tests/ui/borrowck/borrowck-borrow-from-expr-block.rs index 24efadc3055..3718d7fd23c 100644 --- a/tests/ui/borrowck/borrowck-borrow-from-expr-block.rs +++ b/tests/ui/borrowck/borrowck-borrow-from-expr-block.rs @@ -1,4 +1,4 @@ -// run-pass +//@ run-pass fn borrow(x: &isize, f: F) where F: FnOnce(&isize) { f(x) diff --git a/tests/ui/borrowck/borrowck-borrow-of-mut-base-ptr-safe.rs b/tests/ui/borrowck/borrowck-borrow-of-mut-base-ptr-safe.rs index 5ef282c0ca0..a815253d714 100644 --- a/tests/ui/borrowck/borrowck-borrow-of-mut-base-ptr-safe.rs +++ b/tests/ui/borrowck/borrowck-borrow-of-mut-base-ptr-safe.rs @@ -1,4 +1,4 @@ -// run-pass +//@ run-pass #![allow(dead_code)] #![allow(unused_mut)] #![allow(unused_variables)] @@ -7,7 +7,7 @@ // // Example from compiler/rustc_borrowck/borrowck/README.md -// pretty-expanded FIXME #23616 +//@ pretty-expanded FIXME #23616 fn foo<'a>(mut t0: &'a mut isize, mut t1: &'a mut isize) { diff --git a/tests/ui/borrowck/borrowck-borrowed-uniq-rvalue.fixed b/tests/ui/borrowck/borrowck-borrowed-uniq-rvalue.fixed index 8bf6a2f6db3..17480cdc24d 100644 --- a/tests/ui/borrowck/borrowck-borrowed-uniq-rvalue.fixed +++ b/tests/ui/borrowck/borrowck-borrowed-uniq-rvalue.fixed @@ -1,4 +1,4 @@ -// run-rustfix +//@ run-rustfix use std::collections::HashMap; diff --git a/tests/ui/borrowck/borrowck-borrowed-uniq-rvalue.rs b/tests/ui/borrowck/borrowck-borrowed-uniq-rvalue.rs index 85481336a30..33c4c04c106 100644 --- a/tests/ui/borrowck/borrowck-borrowed-uniq-rvalue.rs +++ b/tests/ui/borrowck/borrowck-borrowed-uniq-rvalue.rs @@ -1,4 +1,4 @@ -// run-rustfix +//@ run-rustfix use std::collections::HashMap; diff --git a/tests/ui/borrowck/borrowck-box-sensitivity.rs b/tests/ui/borrowck/borrowck-box-sensitivity.rs index e880f876f91..421d6a53a17 100644 --- a/tests/ui/borrowck/borrowck-box-sensitivity.rs +++ b/tests/ui/borrowck/borrowck-box-sensitivity.rs @@ -1,7 +1,7 @@ // Test that `Box` is treated specially by borrow checking. This is the case // because NLL reverted the deicision in rust-lang/rfcs#130. -// run-pass +//@ run-pass struct A { x: Box, diff --git a/tests/ui/borrowck/borrowck-closures-slice-patterns-ok.rs b/tests/ui/borrowck/borrowck-closures-slice-patterns-ok.rs index 60128c9419d..ec01db2948a 100644 --- a/tests/ui/borrowck/borrowck-closures-slice-patterns-ok.rs +++ b/tests/ui/borrowck/borrowck-closures-slice-patterns-ok.rs @@ -3,7 +3,7 @@ #![allow(unused_variables)] #![allow(dropping_references)] -// run-pass +//@ run-pass fn arr_by_ref(x: [String; 3]) { let r = &x; diff --git a/tests/ui/borrowck/borrowck-closures-two-imm.rs b/tests/ui/borrowck/borrowck-closures-two-imm.rs index ab135194a09..f2a65ac88cf 100644 --- a/tests/ui/borrowck/borrowck-closures-two-imm.rs +++ b/tests/ui/borrowck/borrowck-closures-two-imm.rs @@ -1,4 +1,4 @@ -// run-pass +//@ run-pass // Tests that two closures can simultaneously have immutable // access to the variable, whether that immutable access be used // for direct reads or for taking immutable ref. Also check diff --git a/tests/ui/borrowck/borrowck-field-sensitivity-rpass.rs b/tests/ui/borrowck/borrowck-field-sensitivity-rpass.rs index 78e965cc4bc..d78d8a9d966 100644 --- a/tests/ui/borrowck/borrowck-field-sensitivity-rpass.rs +++ b/tests/ui/borrowck/borrowck-field-sensitivity-rpass.rs @@ -1,8 +1,8 @@ -// run-pass +//@ run-pass #![allow(unused_mut)] #![allow(unused_variables)] #![allow(dropping_copy_types)] -// pretty-expanded FIXME #23616 +//@ pretty-expanded FIXME #23616 struct A { a: isize, b: Box } struct B { a: Box, b: Box } diff --git a/tests/ui/borrowck/borrowck-fixed-length-vecs.rs b/tests/ui/borrowck/borrowck-fixed-length-vecs.rs index 126323d8d24..3441ae0e3bb 100644 --- a/tests/ui/borrowck/borrowck-fixed-length-vecs.rs +++ b/tests/ui/borrowck/borrowck-fixed-length-vecs.rs @@ -1,4 +1,4 @@ -// run-pass +//@ run-pass pub fn main() { let x = [22]; diff --git a/tests/ui/borrowck/borrowck-freeze-frozen-mut.rs b/tests/ui/borrowck/borrowck-freeze-frozen-mut.rs index 199931d6d1e..af316c16497 100644 --- a/tests/ui/borrowck/borrowck-freeze-frozen-mut.rs +++ b/tests/ui/borrowck/borrowck-freeze-frozen-mut.rs @@ -1,4 +1,4 @@ -// run-pass +//@ run-pass // Test that a `&mut` inside of an `&` is freezable. diff --git a/tests/ui/borrowck/borrowck-issue-2657-2.fixed b/tests/ui/borrowck/borrowck-issue-2657-2.fixed index 625e7c3cad5..e5aaf7d2de7 100644 --- a/tests/ui/borrowck/borrowck-issue-2657-2.fixed +++ b/tests/ui/borrowck/borrowck-issue-2657-2.fixed @@ -1,4 +1,4 @@ -// run-rustfix +//@ run-rustfix fn main() { let x: Option> = Some(Box::new(1)); diff --git a/tests/ui/borrowck/borrowck-issue-2657-2.rs b/tests/ui/borrowck/borrowck-issue-2657-2.rs index f79a846e70e..fb26239943a 100644 --- a/tests/ui/borrowck/borrowck-issue-2657-2.rs +++ b/tests/ui/borrowck/borrowck-issue-2657-2.rs @@ -1,4 +1,4 @@ -// run-rustfix +//@ run-rustfix fn main() { let x: Option> = Some(Box::new(1)); diff --git a/tests/ui/borrowck/borrowck-lend-args.rs b/tests/ui/borrowck/borrowck-lend-args.rs index d0ef2dcdd28..08a7aea1627 100644 --- a/tests/ui/borrowck/borrowck-lend-args.rs +++ b/tests/ui/borrowck/borrowck-lend-args.rs @@ -1,7 +1,7 @@ -// run-pass +//@ run-pass #![allow(dead_code)] -// pretty-expanded FIXME #23616 +//@ pretty-expanded FIXME #23616 fn borrow(_v: &isize) {} diff --git a/tests/ui/borrowck/borrowck-local-borrow.rs b/tests/ui/borrowck/borrowck-local-borrow.rs index 0aaa4e4c684..de6ee5983c8 100644 --- a/tests/ui/borrowck/borrowck-local-borrow.rs +++ b/tests/ui/borrowck/borrowck-local-borrow.rs @@ -1,6 +1,6 @@ -// run-fail -// error-pattern:panic 1 -// ignore-emscripten no processes +//@ run-fail +//@ error-pattern:panic 1 +//@ ignore-emscripten no processes fn main() { let x = 2; diff --git a/tests/ui/borrowck/borrowck-macro-interaction-issue-6304.rs b/tests/ui/borrowck/borrowck-macro-interaction-issue-6304.rs index 4e969f6ed83..af4fdc48da1 100644 --- a/tests/ui/borrowck/borrowck-macro-interaction-issue-6304.rs +++ b/tests/ui/borrowck/borrowck-macro-interaction-issue-6304.rs @@ -1,4 +1,4 @@ -// run-pass +//@ run-pass #![allow(dead_code)] #![allow(unused_variables)] #![allow(unconditional_recursion)] diff --git a/tests/ui/borrowck/borrowck-move-by-capture-ok.rs b/tests/ui/borrowck/borrowck-move-by-capture-ok.rs index e7a48ebf6ca..b466654814d 100644 --- a/tests/ui/borrowck/borrowck-move-by-capture-ok.rs +++ b/tests/ui/borrowck/borrowck-move-by-capture-ok.rs @@ -1,4 +1,4 @@ -// run-pass +//@ run-pass pub fn main() { let bar: Box<_> = Box::new(3); diff --git a/tests/ui/borrowck/borrowck-move-error-with-note.fixed b/tests/ui/borrowck/borrowck-move-error-with-note.fixed index cf6c382a692..ad98b2db414 100644 --- a/tests/ui/borrowck/borrowck-move-error-with-note.fixed +++ b/tests/ui/borrowck/borrowck-move-error-with-note.fixed @@ -1,4 +1,4 @@ -// run-rustfix +//@ run-rustfix #![allow(unused)] enum Foo { Foo1(Box, Box), diff --git a/tests/ui/borrowck/borrowck-move-error-with-note.rs b/tests/ui/borrowck/borrowck-move-error-with-note.rs index f336ac4f994..2596b321bfb 100644 --- a/tests/ui/borrowck/borrowck-move-error-with-note.rs +++ b/tests/ui/borrowck/borrowck-move-error-with-note.rs @@ -1,4 +1,4 @@ -// run-rustfix +//@ run-rustfix #![allow(unused)] enum Foo { Foo1(Box, Box), diff --git a/tests/ui/borrowck/borrowck-move-out-from-array-no-overlap-match.rs b/tests/ui/borrowck/borrowck-move-out-from-array-no-overlap-match.rs index 1e401b7e92e..a74d3175a38 100644 --- a/tests/ui/borrowck/borrowck-move-out-from-array-no-overlap-match.rs +++ b/tests/ui/borrowck/borrowck-move-out-from-array-no-overlap-match.rs @@ -1,4 +1,4 @@ -// check-pass +//@ check-pass // Due to #53114, which causes a "read" of the `_` patterns, // the borrow-checker refuses this code, while it should probably be allowed. // Once the bug is fixed, the test, which is derived from a diff --git a/tests/ui/borrowck/borrowck-move-out-from-array-no-overlap.rs b/tests/ui/borrowck/borrowck-move-out-from-array-no-overlap.rs index c91b4286b64..ec17a5afbb2 100644 --- a/tests/ui/borrowck/borrowck-move-out-from-array-no-overlap.rs +++ b/tests/ui/borrowck/borrowck-move-out-from-array-no-overlap.rs @@ -1,4 +1,4 @@ -// check-pass +//@ check-pass fn array() -> [(String, String); 3] { Default::default() diff --git a/tests/ui/borrowck/borrowck-move-out-from-array-use-no-overlap-match.rs b/tests/ui/borrowck/borrowck-move-out-from-array-use-no-overlap-match.rs index 2f6ce430b35..fc446826c34 100644 --- a/tests/ui/borrowck/borrowck-move-out-from-array-use-no-overlap-match.rs +++ b/tests/ui/borrowck/borrowck-move-out-from-array-use-no-overlap-match.rs @@ -1,4 +1,4 @@ -// check-pass +//@ check-pass // Due to #53114, which causes a "read" of the `_` patterns, // the borrow-checker refuses this code, while it should probably be allowed. // Once the bug is fixed, the test, which is derived from a diff --git a/tests/ui/borrowck/borrowck-move-out-from-array-use-no-overlap.rs b/tests/ui/borrowck/borrowck-move-out-from-array-use-no-overlap.rs index e3498cef377..3aef0b897e7 100644 --- a/tests/ui/borrowck/borrowck-move-out-from-array-use-no-overlap.rs +++ b/tests/ui/borrowck/borrowck-move-out-from-array-use-no-overlap.rs @@ -1,4 +1,4 @@ -// check-pass +//@ check-pass fn array() -> [(String, String); 3] { Default::default() diff --git a/tests/ui/borrowck/borrowck-move-out-of-overloaded-auto-deref.fixed b/tests/ui/borrowck/borrowck-move-out-of-overloaded-auto-deref.fixed index 0b7551b97af..8d5ebbc7744 100644 --- a/tests/ui/borrowck/borrowck-move-out-of-overloaded-auto-deref.fixed +++ b/tests/ui/borrowck/borrowck-move-out-of-overloaded-auto-deref.fixed @@ -1,4 +1,4 @@ -// run-rustfix +//@ run-rustfix use std::rc::Rc; pub fn main() { diff --git a/tests/ui/borrowck/borrowck-move-out-of-overloaded-auto-deref.rs b/tests/ui/borrowck/borrowck-move-out-of-overloaded-auto-deref.rs index 5cb8ceaca08..cf734fb6f68 100644 --- a/tests/ui/borrowck/borrowck-move-out-of-overloaded-auto-deref.rs +++ b/tests/ui/borrowck/borrowck-move-out-of-overloaded-auto-deref.rs @@ -1,4 +1,4 @@ -// run-rustfix +//@ run-rustfix use std::rc::Rc; pub fn main() { diff --git a/tests/ui/borrowck/borrowck-move-out-of-struct-with-dtor.fixed b/tests/ui/borrowck/borrowck-move-out-of-struct-with-dtor.fixed index c463c655938..02c455f01de 100644 --- a/tests/ui/borrowck/borrowck-move-out-of-struct-with-dtor.fixed +++ b/tests/ui/borrowck/borrowck-move-out-of-struct-with-dtor.fixed @@ -1,4 +1,4 @@ -// run-rustfix +//@ run-rustfix #![allow(unused)] struct S {f:String} impl Drop for S { diff --git a/tests/ui/borrowck/borrowck-move-out-of-struct-with-dtor.rs b/tests/ui/borrowck/borrowck-move-out-of-struct-with-dtor.rs index 93183062d61..6b20b6e465a 100644 --- a/tests/ui/borrowck/borrowck-move-out-of-struct-with-dtor.rs +++ b/tests/ui/borrowck/borrowck-move-out-of-struct-with-dtor.rs @@ -1,4 +1,4 @@ -// run-rustfix +//@ run-rustfix #![allow(unused)] struct S {f:String} impl Drop for S { diff --git a/tests/ui/borrowck/borrowck-move-out-of-tuple-struct-with-dtor.fixed b/tests/ui/borrowck/borrowck-move-out-of-tuple-struct-with-dtor.fixed index bc2ddf85fb4..75474af46ae 100644 --- a/tests/ui/borrowck/borrowck-move-out-of-tuple-struct-with-dtor.fixed +++ b/tests/ui/borrowck/borrowck-move-out-of-tuple-struct-with-dtor.fixed @@ -1,4 +1,4 @@ -// run-rustfix +//@ run-rustfix #![allow(unused)] struct S(String); impl Drop for S { diff --git a/tests/ui/borrowck/borrowck-move-out-of-tuple-struct-with-dtor.rs b/tests/ui/borrowck/borrowck-move-out-of-tuple-struct-with-dtor.rs index f050bce8740..f5b7e8a74a4 100644 --- a/tests/ui/borrowck/borrowck-move-out-of-tuple-struct-with-dtor.rs +++ b/tests/ui/borrowck/borrowck-move-out-of-tuple-struct-with-dtor.rs @@ -1,4 +1,4 @@ -// run-rustfix +//@ run-rustfix #![allow(unused)] struct S(String); impl Drop for S { diff --git a/tests/ui/borrowck/borrowck-multiple-borrows-interior-boxes.rs b/tests/ui/borrowck/borrowck-multiple-borrows-interior-boxes.rs index 96d2663500e..ab2e43c54d8 100644 --- a/tests/ui/borrowck/borrowck-multiple-borrows-interior-boxes.rs +++ b/tests/ui/borrowck/borrowck-multiple-borrows-interior-boxes.rs @@ -1,4 +1,4 @@ -// run-pass +//@ run-pass #![allow(dead_code)] #![allow(unused_variables)] // Test case from #39963. diff --git a/tests/ui/borrowck/borrowck-mut-uniq.rs b/tests/ui/borrowck/borrowck-mut-uniq.rs index 255b4995b64..fb0016ef94e 100644 --- a/tests/ui/borrowck/borrowck-mut-uniq.rs +++ b/tests/ui/borrowck/borrowck-mut-uniq.rs @@ -1,4 +1,4 @@ -// run-pass +//@ run-pass use std::mem::swap; diff --git a/tests/ui/borrowck/borrowck-mut-vec-as-imm-slice.rs b/tests/ui/borrowck/borrowck-mut-vec-as-imm-slice.rs index d2b0c01545e..51c0aa28c2f 100644 --- a/tests/ui/borrowck/borrowck-mut-vec-as-imm-slice.rs +++ b/tests/ui/borrowck/borrowck-mut-vec-as-imm-slice.rs @@ -1,4 +1,4 @@ -// run-pass +//@ run-pass fn want_slice(v: &[isize]) -> isize { diff --git a/tests/ui/borrowck/borrowck-pat-enum.rs b/tests/ui/borrowck/borrowck-pat-enum.rs index 6e51a2b2e02..7f8927c4fd8 100644 --- a/tests/ui/borrowck/borrowck-pat-enum.rs +++ b/tests/ui/borrowck/borrowck-pat-enum.rs @@ -1,4 +1,4 @@ -// run-pass +//@ run-pass #![allow(dead_code)] fn match_ref(v: Option) -> isize { diff --git a/tests/ui/borrowck/borrowck-pat-reassign-no-binding.rs b/tests/ui/borrowck/borrowck-pat-reassign-no-binding.rs index 1362fd8ce4c..656547c976a 100644 --- a/tests/ui/borrowck/borrowck-pat-reassign-no-binding.rs +++ b/tests/ui/borrowck/borrowck-pat-reassign-no-binding.rs @@ -1,4 +1,4 @@ -// run-pass +//@ run-pass pub fn main() { let mut x = None; diff --git a/tests/ui/borrowck/borrowck-rvalues-mutable.rs b/tests/ui/borrowck/borrowck-rvalues-mutable.rs index c4695c942e1..1b058707d35 100644 --- a/tests/ui/borrowck/borrowck-rvalues-mutable.rs +++ b/tests/ui/borrowck/borrowck-rvalues-mutable.rs @@ -1,4 +1,4 @@ -// run-pass +//@ run-pass struct Counter { value: usize diff --git a/tests/ui/borrowck/borrowck-scope-of-deref-issue-4666.rs b/tests/ui/borrowck/borrowck-scope-of-deref-issue-4666.rs index e89332ae31a..99f0c83cc87 100644 --- a/tests/ui/borrowck/borrowck-scope-of-deref-issue-4666.rs +++ b/tests/ui/borrowck/borrowck-scope-of-deref-issue-4666.rs @@ -1,4 +1,4 @@ -// run-pass +//@ run-pass // Tests that the scope of the pointer returned from `get()` is // limited to the deref operation itself, and does not infect the // block as a whole. diff --git a/tests/ui/borrowck/borrowck-slice-pattern-element-loan-array-no-overlap.rs b/tests/ui/borrowck/borrowck-slice-pattern-element-loan-array-no-overlap.rs index a8e56f648e2..a6261a046e6 100644 --- a/tests/ui/borrowck/borrowck-slice-pattern-element-loan-array-no-overlap.rs +++ b/tests/ui/borrowck/borrowck-slice-pattern-element-loan-array-no-overlap.rs @@ -1,4 +1,4 @@ -// check-pass +//@ check-pass fn nop(_s: &[& i32]) {} fn nop_subslice(_s: &[i32]) {} diff --git a/tests/ui/borrowck/borrowck-slice-pattern-element-loan-rpass.rs b/tests/ui/borrowck/borrowck-slice-pattern-element-loan-rpass.rs index 4367596c6ea..cfbc39fe9f4 100644 --- a/tests/ui/borrowck/borrowck-slice-pattern-element-loan-rpass.rs +++ b/tests/ui/borrowck/borrowck-slice-pattern-element-loan-rpass.rs @@ -1,4 +1,4 @@ -// run-pass +//@ run-pass fn mut_head_tail<'a, A>(v: &'a mut [A]) -> Option<(&'a mut A, &'a mut [A])> { match *v { diff --git a/tests/ui/borrowck/borrowck-slice-pattern-element-loan-slice-no-overlap.rs b/tests/ui/borrowck/borrowck-slice-pattern-element-loan-slice-no-overlap.rs index 6390dc3a91a..810b9803abd 100644 --- a/tests/ui/borrowck/borrowck-slice-pattern-element-loan-slice-no-overlap.rs +++ b/tests/ui/borrowck/borrowck-slice-pattern-element-loan-slice-no-overlap.rs @@ -1,4 +1,4 @@ -// check-pass +//@ check-pass fn nop(_s: &[& i32]) {} fn nop_subslice(_s: &[i32]) {} diff --git a/tests/ui/borrowck/borrowck-static-item-in-fn.rs b/tests/ui/borrowck/borrowck-static-item-in-fn.rs index 5f4379325a5..9cdd4c89132 100644 --- a/tests/ui/borrowck/borrowck-static-item-in-fn.rs +++ b/tests/ui/borrowck/borrowck-static-item-in-fn.rs @@ -1,8 +1,8 @@ -// run-pass +//@ run-pass #![allow(dead_code)] // Regression test for issue #7740 -// pretty-expanded FIXME #23616 +//@ pretty-expanded FIXME #23616 pub fn main() { static A: &'static char = &'A'; diff --git a/tests/ui/borrowck/borrowck-trait-lifetime.rs b/tests/ui/borrowck/borrowck-trait-lifetime.rs index 8a6dfe76d60..e43201fb10b 100644 --- a/tests/ui/borrowck/borrowck-trait-lifetime.rs +++ b/tests/ui/borrowck/borrowck-trait-lifetime.rs @@ -1,9 +1,9 @@ -// run-pass +//@ run-pass #![allow(unused_imports)] // This test verifies that casting from the same lifetime on a value // to the same lifetime on a trait succeeds. See issue #10766. -// pretty-expanded FIXME #23616 +//@ pretty-expanded FIXME #23616 #![allow(dead_code)] diff --git a/tests/ui/borrowck/borrowck-uniq-via-ref.rs b/tests/ui/borrowck/borrowck-uniq-via-ref.rs index bdf7cc57a53..d3190d66bd3 100644 --- a/tests/ui/borrowck/borrowck-uniq-via-ref.rs +++ b/tests/ui/borrowck/borrowck-uniq-via-ref.rs @@ -1,7 +1,7 @@ -// run-pass +//@ run-pass #![allow(dead_code)] -// pretty-expanded FIXME #23616 +//@ pretty-expanded FIXME #23616 struct Rec { f: Box, diff --git a/tests/ui/borrowck/borrowck-univariant-enum.rs b/tests/ui/borrowck/borrowck-univariant-enum.rs index c78e9475233..0453a921953 100644 --- a/tests/ui/borrowck/borrowck-univariant-enum.rs +++ b/tests/ui/borrowck/borrowck-univariant-enum.rs @@ -1,4 +1,4 @@ -// run-pass +//@ run-pass #![allow(non_camel_case_types)] use std::cell::Cell; diff --git a/tests/ui/borrowck/borrowck-unsafe-static-mutable-borrows.rs b/tests/ui/borrowck/borrowck-unsafe-static-mutable-borrows.rs index 1bf079e24ca..a89cad20f97 100644 --- a/tests/ui/borrowck/borrowck-unsafe-static-mutable-borrows.rs +++ b/tests/ui/borrowck/borrowck-unsafe-static-mutable-borrows.rs @@ -1,4 +1,4 @@ -// run-pass +//@ run-pass // Test file taken from issue 45129 (https://github.com/rust-lang/rust/issues/45129) diff --git a/tests/ui/borrowck/borrowck-unused-mut-locals.rs b/tests/ui/borrowck/borrowck-unused-mut-locals.rs index 23ef975cbbc..3ae51a5a977 100644 --- a/tests/ui/borrowck/borrowck-unused-mut-locals.rs +++ b/tests/ui/borrowck/borrowck-unused-mut-locals.rs @@ -1,4 +1,4 @@ -// run-pass +//@ run-pass #![allow(dead_code)] #![deny(unused_mut)] diff --git a/tests/ui/borrowck/borrowck-use-mut-borrow-rpass.rs b/tests/ui/borrowck/borrowck-use-mut-borrow-rpass.rs index 9acb1ec5e43..9649f484471 100644 --- a/tests/ui/borrowck/borrowck-use-mut-borrow-rpass.rs +++ b/tests/ui/borrowck/borrowck-use-mut-borrow-rpass.rs @@ -1,5 +1,5 @@ -// run-pass -// pretty-expanded FIXME #23616 +//@ run-pass +//@ pretty-expanded FIXME #23616 #![allow(dropping_copy_types)] diff --git a/tests/ui/borrowck/clone-span-on-try-operator.fixed b/tests/ui/borrowck/clone-span-on-try-operator.fixed index 4fad75b9a3d..59253c98079 100644 --- a/tests/ui/borrowck/clone-span-on-try-operator.fixed +++ b/tests/ui/borrowck/clone-span-on-try-operator.fixed @@ -1,4 +1,4 @@ -// run-rustfix +//@ run-rustfix #[derive(Clone)] struct Foo; diff --git a/tests/ui/borrowck/clone-span-on-try-operator.rs b/tests/ui/borrowck/clone-span-on-try-operator.rs index 031a35e2026..22d5eb6126d 100644 --- a/tests/ui/borrowck/clone-span-on-try-operator.rs +++ b/tests/ui/borrowck/clone-span-on-try-operator.rs @@ -1,4 +1,4 @@ -// run-rustfix +//@ run-rustfix #[derive(Clone)] struct Foo; diff --git a/tests/ui/borrowck/copy-suggestion-region-vid.fixed b/tests/ui/borrowck/copy-suggestion-region-vid.fixed index ec16469757a..7fe18615408 100644 --- a/tests/ui/borrowck/copy-suggestion-region-vid.fixed +++ b/tests/ui/borrowck/copy-suggestion-region-vid.fixed @@ -1,4 +1,4 @@ -// run-rustfix +//@ run-rustfix pub struct DataStruct(); pub struct HelperStruct<'n> { diff --git a/tests/ui/borrowck/copy-suggestion-region-vid.rs b/tests/ui/borrowck/copy-suggestion-region-vid.rs index f95c6b03e01..daafba71ece 100644 --- a/tests/ui/borrowck/copy-suggestion-region-vid.rs +++ b/tests/ui/borrowck/copy-suggestion-region-vid.rs @@ -1,4 +1,4 @@ -// run-rustfix +//@ run-rustfix pub struct DataStruct(); pub struct HelperStruct<'n> { diff --git a/tests/ui/borrowck/fn-item-check-trait-ref.rs b/tests/ui/borrowck/fn-item-check-trait-ref.rs index bdbb52e974f..8b193430e9e 100644 --- a/tests/ui/borrowck/fn-item-check-trait-ref.rs +++ b/tests/ui/borrowck/fn-item-check-trait-ref.rs @@ -1,7 +1,7 @@ // The method `assert_static` should be callable only for static values, // because the impl has an implied bound `where T: 'static`. -// check-fail +//@ check-fail trait AnyStatic: Sized { fn assert_static(self) {} diff --git a/tests/ui/borrowck/fn-item-check-type-params.rs b/tests/ui/borrowck/fn-item-check-type-params.rs index 805c0d00de5..d952ebe33a5 100644 --- a/tests/ui/borrowck/fn-item-check-type-params.rs +++ b/tests/ui/borrowck/fn-item-check-type-params.rs @@ -3,7 +3,7 @@ // Previously, different borrowck implementations used to disagree here. // The status of each is documented on `fn test_*`. -// check-fail +//@ check-fail use std::fmt::Display; diff --git a/tests/ui/borrowck/fsu-moves-and-copies.rs b/tests/ui/borrowck/fsu-moves-and-copies.rs index 85e0a840a19..397e4199bc0 100644 --- a/tests/ui/borrowck/fsu-moves-and-copies.rs +++ b/tests/ui/borrowck/fsu-moves-and-copies.rs @@ -1,4 +1,4 @@ -// run-pass +//@ run-pass #![allow(non_camel_case_types)] #![allow(stable_features)] diff --git a/tests/ui/borrowck/issue-103095.rs b/tests/ui/borrowck/issue-103095.rs index 0340f39243f..3c29bc76155 100644 --- a/tests/ui/borrowck/issue-103095.rs +++ b/tests/ui/borrowck/issue-103095.rs @@ -1,4 +1,4 @@ -// check-pass +//@ check-pass trait FnOnceForGenericRef: FnOnce(&T) -> Self::FnOutput { type FnOutput; diff --git a/tests/ui/borrowck/issue-103250.rs b/tests/ui/borrowck/issue-103250.rs index 46565f61ca9..92ac0dc8118 100644 --- a/tests/ui/borrowck/issue-103250.rs +++ b/tests/ui/borrowck/issue-103250.rs @@ -1,4 +1,4 @@ -// edition:2021 +//@ edition:2021 type TranslateFn = Box String>; diff --git a/tests/ui/borrowck/issue-103624.rs b/tests/ui/borrowck/issue-103624.rs index d95a40bd4a0..9196789ec63 100644 --- a/tests/ui/borrowck/issue-103624.rs +++ b/tests/ui/borrowck/issue-103624.rs @@ -1,4 +1,4 @@ -// edition:2021 +//@ edition:2021 struct StructA { b: StructB, diff --git a/tests/ui/borrowck/issue-104639-lifetime-order.rs b/tests/ui/borrowck/issue-104639-lifetime-order.rs index db1f8f8d588..9dd6e6ee643 100644 --- a/tests/ui/borrowck/issue-104639-lifetime-order.rs +++ b/tests/ui/borrowck/issue-104639-lifetime-order.rs @@ -1,5 +1,5 @@ -// edition:2018 -// check-pass +//@ edition:2018 +//@ check-pass #![allow(dead_code)] async fn fail<'a, 'b, 'c>(_: &'static str) where 'a: 'c, 'b: 'c, {} diff --git a/tests/ui/borrowck/issue-10876.rs b/tests/ui/borrowck/issue-10876.rs index 22eaa119f24..c7c52f12a4e 100644 --- a/tests/ui/borrowck/issue-10876.rs +++ b/tests/ui/borrowck/issue-10876.rs @@ -1,4 +1,4 @@ -// check-pass +//@ check-pass enum Nat { S(Box), diff --git a/tests/ui/borrowck/issue-109271-pass-self-into-closure.fixed b/tests/ui/borrowck/issue-109271-pass-self-into-closure.fixed index 4a8831dab95..6eef44d8e59 100644 --- a/tests/ui/borrowck/issue-109271-pass-self-into-closure.fixed +++ b/tests/ui/borrowck/issue-109271-pass-self-into-closure.fixed @@ -1,4 +1,4 @@ -// run-rustfix +//@ run-rustfix #![allow(unused)] struct S; diff --git a/tests/ui/borrowck/issue-109271-pass-self-into-closure.rs b/tests/ui/borrowck/issue-109271-pass-self-into-closure.rs index fcd855f862d..cd5121d7d45 100644 --- a/tests/ui/borrowck/issue-109271-pass-self-into-closure.rs +++ b/tests/ui/borrowck/issue-109271-pass-self-into-closure.rs @@ -1,4 +1,4 @@ -// run-rustfix +//@ run-rustfix #![allow(unused)] struct S; diff --git a/tests/ui/borrowck/issue-11493.fixed b/tests/ui/borrowck/issue-11493.fixed index 139bd9a0739..adf442a266a 100644 --- a/tests/ui/borrowck/issue-11493.fixed +++ b/tests/ui/borrowck/issue-11493.fixed @@ -1,4 +1,4 @@ -// run-rustfix +//@ run-rustfix fn id(x: T) -> T { x } fn main() { diff --git a/tests/ui/borrowck/issue-11493.rs b/tests/ui/borrowck/issue-11493.rs index cb77f89fb2b..d83320a2cdb 100644 --- a/tests/ui/borrowck/issue-11493.rs +++ b/tests/ui/borrowck/issue-11493.rs @@ -1,4 +1,4 @@ -// run-rustfix +//@ run-rustfix fn id(x: T) -> T { x } fn main() { diff --git a/tests/ui/borrowck/issue-115259-suggest-iter-mut.fixed b/tests/ui/borrowck/issue-115259-suggest-iter-mut.fixed index 4653fe7375d..14ac4a9ff5d 100644 --- a/tests/ui/borrowck/issue-115259-suggest-iter-mut.fixed +++ b/tests/ui/borrowck/issue-115259-suggest-iter-mut.fixed @@ -1,4 +1,4 @@ -// run-rustfix +//@ run-rustfix #![allow(unused_mut)] #![allow(dead_code)] diff --git a/tests/ui/borrowck/issue-115259-suggest-iter-mut.rs b/tests/ui/borrowck/issue-115259-suggest-iter-mut.rs index e0f6ab1321f..b0e0d8aeb56 100644 --- a/tests/ui/borrowck/issue-115259-suggest-iter-mut.rs +++ b/tests/ui/borrowck/issue-115259-suggest-iter-mut.rs @@ -1,4 +1,4 @@ -// run-rustfix +//@ run-rustfix #![allow(unused_mut)] #![allow(dead_code)] diff --git a/tests/ui/borrowck/issue-17263.rs b/tests/ui/borrowck/issue-17263.rs index 4f560b065f1..d9aab5eeef5 100644 --- a/tests/ui/borrowck/issue-17263.rs +++ b/tests/ui/borrowck/issue-17263.rs @@ -1,4 +1,4 @@ -// check-pass +//@ check-pass struct Foo { a: isize, b: isize } diff --git a/tests/ui/borrowck/issue-23338-params-outlive-temps-of-body.rs b/tests/ui/borrowck/issue-23338-params-outlive-temps-of-body.rs index d45aaa843fb..b0cab97dd2d 100644 --- a/tests/ui/borrowck/issue-23338-params-outlive-temps-of-body.rs +++ b/tests/ui/borrowck/issue-23338-params-outlive-temps-of-body.rs @@ -1,4 +1,4 @@ -// run-pass +//@ run-pass // This is largely checking that we now accept code where temp values // are borrowing from the input parameters (the `foo` case below). // diff --git a/tests/ui/borrowck/issue-28934.rs b/tests/ui/borrowck/issue-28934.rs index 1e48878f632..a3ac663c5b5 100644 --- a/tests/ui/borrowck/issue-28934.rs +++ b/tests/ui/borrowck/issue-28934.rs @@ -1,9 +1,9 @@ // Regression test: issue had to do with "givens" in region inference, // which were not being considered during the contraction phase. -// run-fail -// error-pattern:explicit panic -// ignore-emscripten no processes +//@ run-fail +//@ error-pattern:explicit panic +//@ ignore-emscripten no processes struct Parser<'i: 't, 't>(&'i u8, &'t u8); diff --git a/tests/ui/borrowck/issue-29166.rs b/tests/ui/borrowck/issue-29166.rs index ca819ba39a2..4ae4b41b7f0 100644 --- a/tests/ui/borrowck/issue-29166.rs +++ b/tests/ui/borrowck/issue-29166.rs @@ -1,4 +1,4 @@ -// run-pass +//@ run-pass // This test ensures that vec.into_iter does not overconstrain element lifetime. pub fn main() { diff --git a/tests/ui/borrowck/issue-36082.fixed b/tests/ui/borrowck/issue-36082.fixed index 8fc963a8566..2209c56048e 100644 --- a/tests/ui/borrowck/issue-36082.fixed +++ b/tests/ui/borrowck/issue-36082.fixed @@ -1,4 +1,4 @@ -// run-rustfix +//@ run-rustfix use std::cell::RefCell; fn main() { diff --git a/tests/ui/borrowck/issue-36082.rs b/tests/ui/borrowck/issue-36082.rs index 20f66b4d45d..da8b0068882 100644 --- a/tests/ui/borrowck/issue-36082.rs +++ b/tests/ui/borrowck/issue-36082.rs @@ -1,4 +1,4 @@ -// run-rustfix +//@ run-rustfix use std::cell::RefCell; fn main() { diff --git a/tests/ui/borrowck/issue-46095.rs b/tests/ui/borrowck/issue-46095.rs index 59ddb60c9f2..52a814e96eb 100644 --- a/tests/ui/borrowck/issue-46095.rs +++ b/tests/ui/borrowck/issue-46095.rs @@ -1,4 +1,4 @@ -// run-pass +//@ run-pass struct A; impl A { diff --git a/tests/ui/borrowck/issue-51348-multi-ref-mut-in-guard.rs b/tests/ui/borrowck/issue-51348-multi-ref-mut-in-guard.rs index 7d5acb95751..a6848fa8fb2 100644 --- a/tests/ui/borrowck/issue-51348-multi-ref-mut-in-guard.rs +++ b/tests/ui/borrowck/issue-51348-multi-ref-mut-in-guard.rs @@ -6,7 +6,7 @@ // trying to double check that we are matching against the right part // of the input data based on which candidate pattern actually fired. -// run-pass +//@ run-pass fn foo(x: &mut Result<(u32, u32), (u32, u32)>) -> u32 { match *x { diff --git a/tests/ui/borrowck/issue-51415.fixed b/tests/ui/borrowck/issue-51415.fixed index 92943f6c9ec..f6804e6a01e 100644 --- a/tests/ui/borrowck/issue-51415.fixed +++ b/tests/ui/borrowck/issue-51415.fixed @@ -1,4 +1,4 @@ -// run-rustfix +//@ run-rustfix // Regression test for #51415: match default bindings were failing to // see the "move out" implied by `&s` below. diff --git a/tests/ui/borrowck/issue-51415.rs b/tests/ui/borrowck/issue-51415.rs index 56ed57a61a0..b77039f7c56 100644 --- a/tests/ui/borrowck/issue-51415.rs +++ b/tests/ui/borrowck/issue-51415.rs @@ -1,4 +1,4 @@ -// run-rustfix +//@ run-rustfix // Regression test for #51415: match default bindings were failing to // see the "move out" implied by `&s` below. diff --git a/tests/ui/borrowck/issue-52967-edition-2018-needs-two-phase-borrows.rs b/tests/ui/borrowck/issue-52967-edition-2018-needs-two-phase-borrows.rs index fc8a075540b..a63fd97eaa8 100644 --- a/tests/ui/borrowck/issue-52967-edition-2018-needs-two-phase-borrows.rs +++ b/tests/ui/borrowck/issue-52967-edition-2018-needs-two-phase-borrows.rs @@ -2,10 +2,10 @@ // the initial deployment of NLL for the 2018 edition, I forgot to // turn on two-phase-borrows in addition to `-Z borrowck=migrate`. -// revisions: edition2015 edition2018 -//[edition2018]edition:2018 +//@ revisions: edition2015 edition2018 +//@[edition2018]edition:2018 -// run-pass +//@ run-pass fn the_bug() { let mut stuff = ("left", "right"); diff --git a/tests/ui/borrowck/issue-55552-ascribe-wildcard-to-structured-pattern.rs b/tests/ui/borrowck/issue-55552-ascribe-wildcard-to-structured-pattern.rs index b87ef3baa4a..800d295a754 100644 --- a/tests/ui/borrowck/issue-55552-ascribe-wildcard-to-structured-pattern.rs +++ b/tests/ui/borrowck/issue-55552-ascribe-wildcard-to-structured-pattern.rs @@ -1,4 +1,4 @@ -// check-pass +//@ check-pass // rust-lang/rust#55552: The strategy pnkfelix landed in PR #55274 // (for ensuring that NLL respects user-provided lifetime annotations) diff --git a/tests/ui/borrowck/issue-62007-assign-box.rs b/tests/ui/borrowck/issue-62007-assign-box.rs index f6fbea821b5..eb082d35f28 100644 --- a/tests/ui/borrowck/issue-62007-assign-box.rs +++ b/tests/ui/borrowck/issue-62007-assign-box.rs @@ -1,4 +1,4 @@ -// run-pass +//@ run-pass // Issue #62007: assigning over a deref projection of a box (in this // case, `*list = n;`) should be able to kill all borrows of `*list`, diff --git a/tests/ui/borrowck/issue-62007-assign-field.rs b/tests/ui/borrowck/issue-62007-assign-field.rs index 5b21c083816..d5d6e67cac6 100644 --- a/tests/ui/borrowck/issue-62007-assign-field.rs +++ b/tests/ui/borrowck/issue-62007-assign-field.rs @@ -1,4 +1,4 @@ -// run-pass +//@ run-pass // Issue #62007: assigning over a field projection (`list.0 = n;` in // this case) should be able to kill all borrows of `list.0`, so that diff --git a/tests/ui/borrowck/issue-62387-suggest-iter-mut-2.fixed b/tests/ui/borrowck/issue-62387-suggest-iter-mut-2.fixed index f02374d8e11..90d09db338f 100644 --- a/tests/ui/borrowck/issue-62387-suggest-iter-mut-2.fixed +++ b/tests/ui/borrowck/issue-62387-suggest-iter-mut-2.fixed @@ -1,4 +1,4 @@ -// run-rustfix +//@ run-rustfix #![allow(unused_mut)] #![allow(dead_code)] use std::path::PathBuf; diff --git a/tests/ui/borrowck/issue-62387-suggest-iter-mut-2.rs b/tests/ui/borrowck/issue-62387-suggest-iter-mut-2.rs index 2d0b837a946..7640898b349 100644 --- a/tests/ui/borrowck/issue-62387-suggest-iter-mut-2.rs +++ b/tests/ui/borrowck/issue-62387-suggest-iter-mut-2.rs @@ -1,4 +1,4 @@ -// run-rustfix +//@ run-rustfix #![allow(unused_mut)] #![allow(dead_code)] use std::path::PathBuf; diff --git a/tests/ui/borrowck/issue-62387-suggest-iter-mut.fixed b/tests/ui/borrowck/issue-62387-suggest-iter-mut.fixed index 8bf2625de6d..00913988ab6 100644 --- a/tests/ui/borrowck/issue-62387-suggest-iter-mut.fixed +++ b/tests/ui/borrowck/issue-62387-suggest-iter-mut.fixed @@ -1,4 +1,4 @@ -// run-rustfix +//@ run-rustfix #![allow(unused_mut)] #![allow(dead_code)] diff --git a/tests/ui/borrowck/issue-62387-suggest-iter-mut.rs b/tests/ui/borrowck/issue-62387-suggest-iter-mut.rs index 39bc30bf294..d46c5abed43 100644 --- a/tests/ui/borrowck/issue-62387-suggest-iter-mut.rs +++ b/tests/ui/borrowck/issue-62387-suggest-iter-mut.rs @@ -1,4 +1,4 @@ -// run-rustfix +//@ run-rustfix #![allow(unused_mut)] #![allow(dead_code)] diff --git a/tests/ui/borrowck/issue-70919-drop-in-loop.rs b/tests/ui/borrowck/issue-70919-drop-in-loop.rs index a8d5849a31c..be70f050111 100644 --- a/tests/ui/borrowck/issue-70919-drop-in-loop.rs +++ b/tests/ui/borrowck/issue-70919-drop-in-loop.rs @@ -2,7 +2,7 @@ // Tests that we don't emit a spurious "borrow might be used" error // when we have an explicit `drop` in a loop -// check-pass +//@ check-pass struct WrapperWithDrop<'a>(&'a mut bool); impl<'a> Drop for WrapperWithDrop<'a> { diff --git a/tests/ui/borrowck/issue-71546.rs b/tests/ui/borrowck/issue-71546.rs index 42100edeaa7..ee4e2232c70 100644 --- a/tests/ui/borrowck/issue-71546.rs +++ b/tests/ui/borrowck/issue-71546.rs @@ -2,7 +2,7 @@ // // Made to pass as part of fixing #98095. // -// check-pass +//@ check-pass pub fn serialize_as_csv(value: &V) -> Result where diff --git a/tests/ui/borrowck/issue-80772.rs b/tests/ui/borrowck/issue-80772.rs index 1b8caa3f8ac..5776fc4a2e3 100644 --- a/tests/ui/borrowck/issue-80772.rs +++ b/tests/ui/borrowck/issue-80772.rs @@ -1,4 +1,4 @@ -// check-pass +//@ check-pass trait SomeTrait {} diff --git a/tests/ui/borrowck/issue-82126-mismatched-subst-and-hir.rs b/tests/ui/borrowck/issue-82126-mismatched-subst-and-hir.rs index b52939ffc11..15be5fb3fac 100644 --- a/tests/ui/borrowck/issue-82126-mismatched-subst-and-hir.rs +++ b/tests/ui/borrowck/issue-82126-mismatched-subst-and-hir.rs @@ -1,7 +1,7 @@ // Regression test for #82126. Checks that mismatched lifetimes and types are // properly handled. -// edition:2018 +//@ edition:2018 use std::sync::Mutex; diff --git a/tests/ui/borrowck/issue-83760.fixed b/tests/ui/borrowck/issue-83760.fixed index 4544eeb6e19..9dcc0258596 100644 --- a/tests/ui/borrowck/issue-83760.fixed +++ b/tests/ui/borrowck/issue-83760.fixed @@ -1,4 +1,4 @@ -// run-rustfix +//@ run-rustfix #![allow(unused_variables, dead_code)] #[derive(Clone)] struct Struct; diff --git a/tests/ui/borrowck/issue-83760.rs b/tests/ui/borrowck/issue-83760.rs index 81bfdf0fcc7..8a4825e5607 100644 --- a/tests/ui/borrowck/issue-83760.rs +++ b/tests/ui/borrowck/issue-83760.rs @@ -1,4 +1,4 @@ -// run-rustfix +//@ run-rustfix #![allow(unused_variables, dead_code)] struct Struct; struct Struct2; diff --git a/tests/ui/borrowck/issue-83924.fixed b/tests/ui/borrowck/issue-83924.fixed index aa40da12b87..891b0bf0650 100644 --- a/tests/ui/borrowck/issue-83924.fixed +++ b/tests/ui/borrowck/issue-83924.fixed @@ -1,4 +1,4 @@ -// run-rustfix +//@ run-rustfix fn main() { let mut values = vec![10, 11, 12]; diff --git a/tests/ui/borrowck/issue-83924.rs b/tests/ui/borrowck/issue-83924.rs index 22b80fe2f38..9781f6e527b 100644 --- a/tests/ui/borrowck/issue-83924.rs +++ b/tests/ui/borrowck/issue-83924.rs @@ -1,4 +1,4 @@ -// run-rustfix +//@ run-rustfix fn main() { let mut values = vec![10, 11, 12]; diff --git a/tests/ui/borrowck/issue-93093.rs b/tests/ui/borrowck/issue-93093.rs index f4db5ecafac..e85b296c983 100644 --- a/tests/ui/borrowck/issue-93093.rs +++ b/tests/ui/borrowck/issue-93093.rs @@ -1,4 +1,4 @@ -// edition:2018 +//@ edition:2018 struct S { foo: usize, } diff --git a/tests/ui/borrowck/issue-95079-missing-move-in-nested-closure.fixed b/tests/ui/borrowck/issue-95079-missing-move-in-nested-closure.fixed index 1a08470064c..a2027fb8dee 100644 --- a/tests/ui/borrowck/issue-95079-missing-move-in-nested-closure.fixed +++ b/tests/ui/borrowck/issue-95079-missing-move-in-nested-closure.fixed @@ -1,4 +1,4 @@ -// run-rustfix +//@ run-rustfix #![allow(dead_code, path_statements)] fn foo1(s: &str) -> impl Iterator + '_ { None.into_iter() diff --git a/tests/ui/borrowck/issue-95079-missing-move-in-nested-closure.rs b/tests/ui/borrowck/issue-95079-missing-move-in-nested-closure.rs index b93292e3589..ceddf52d292 100644 --- a/tests/ui/borrowck/issue-95079-missing-move-in-nested-closure.rs +++ b/tests/ui/borrowck/issue-95079-missing-move-in-nested-closure.rs @@ -1,4 +1,4 @@ -// run-rustfix +//@ run-rustfix #![allow(dead_code, path_statements)] fn foo1(s: &str) -> impl Iterator + '_ { None.into_iter() diff --git a/tests/ui/borrowck/kindck-implicit-close-over-mut-var.rs b/tests/ui/borrowck/kindck-implicit-close-over-mut-var.rs index 5b5d86eec2c..22ed8bd3bee 100644 --- a/tests/ui/borrowck/kindck-implicit-close-over-mut-var.rs +++ b/tests/ui/borrowck/kindck-implicit-close-over-mut-var.rs @@ -1,4 +1,4 @@ -// run-pass +//@ run-pass #![allow(unused_must_use)] #![allow(dead_code)] diff --git a/tests/ui/borrowck/lazy-init.rs b/tests/ui/borrowck/lazy-init.rs index a4b5d18bb33..3728e9e4929 100644 --- a/tests/ui/borrowck/lazy-init.rs +++ b/tests/ui/borrowck/lazy-init.rs @@ -1,4 +1,4 @@ -// run-pass +//@ run-pass #![allow(unused_mut)] diff --git a/tests/ui/borrowck/let_underscore_temporary.rs b/tests/ui/borrowck/let_underscore_temporary.rs index a5ea3b3a7ab..0a24df08925 100644 --- a/tests/ui/borrowck/let_underscore_temporary.rs +++ b/tests/ui/borrowck/let_underscore_temporary.rs @@ -1,4 +1,4 @@ -// check-fail +//@ check-fail fn let_underscore(string: &Option<&str>, mut num: Option) { let _ = if let Some(s) = *string { s.len() } else { 0 }; diff --git a/tests/ui/borrowck/move-error-snippets-ext.rs b/tests/ui/borrowck/move-error-snippets-ext.rs index 27041d55d8f..f8103228cf8 100644 --- a/tests/ui/borrowck/move-error-snippets-ext.rs +++ b/tests/ui/borrowck/move-error-snippets-ext.rs @@ -1,4 +1,4 @@ -// ignore-test (auxiliary, used by other tests) +//@ ignore-test (auxiliary, used by other tests) macro_rules! aaa { ($c:ident) => {{ diff --git a/tests/ui/borrowck/move-error-snippets.rs b/tests/ui/borrowck/move-error-snippets.rs index 64f95653828..f9e97e73f5c 100644 --- a/tests/ui/borrowck/move-error-snippets.rs +++ b/tests/ui/borrowck/move-error-snippets.rs @@ -1,6 +1,6 @@ // Test that we don't ICE after trying to construct a cross-file snippet #63800. -// compile-flags: --test +//@ compile-flags: --test #[macro_use] #[path = "move-error-snippets-ext.rs"] diff --git a/tests/ui/borrowck/move-in-pattern.fixed b/tests/ui/borrowck/move-in-pattern.fixed index 145893d3343..be0a6c7b8d4 100644 --- a/tests/ui/borrowck/move-in-pattern.fixed +++ b/tests/ui/borrowck/move-in-pattern.fixed @@ -1,4 +1,4 @@ -// run-rustfix +//@ run-rustfix // Issue #63988 #[derive(Debug)] struct S; diff --git a/tests/ui/borrowck/move-in-pattern.rs b/tests/ui/borrowck/move-in-pattern.rs index 14851d0f6fc..1e88174a60f 100644 --- a/tests/ui/borrowck/move-in-pattern.rs +++ b/tests/ui/borrowck/move-in-pattern.rs @@ -1,4 +1,4 @@ -// run-rustfix +//@ run-rustfix // Issue #63988 #[derive(Debug)] struct S; diff --git a/tests/ui/borrowck/mut-borrow-in-loop-2.fixed b/tests/ui/borrowck/mut-borrow-in-loop-2.fixed index ceeba30a90f..cff3c372cdb 100644 --- a/tests/ui/borrowck/mut-borrow-in-loop-2.fixed +++ b/tests/ui/borrowck/mut-borrow-in-loop-2.fixed @@ -1,4 +1,4 @@ -// run-rustfix +//@ run-rustfix #![allow(dead_code)] struct Events(R); diff --git a/tests/ui/borrowck/mut-borrow-in-loop-2.rs b/tests/ui/borrowck/mut-borrow-in-loop-2.rs index d13fb7e5679..ba79b12042f 100644 --- a/tests/ui/borrowck/mut-borrow-in-loop-2.rs +++ b/tests/ui/borrowck/mut-borrow-in-loop-2.rs @@ -1,4 +1,4 @@ -// run-rustfix +//@ run-rustfix #![allow(dead_code)] struct Events(R); diff --git a/tests/ui/borrowck/suggest-mut-iterator.fixed b/tests/ui/borrowck/suggest-mut-iterator.fixed index 16512b8a3cd..4197b10eae5 100644 --- a/tests/ui/borrowck/suggest-mut-iterator.fixed +++ b/tests/ui/borrowck/suggest-mut-iterator.fixed @@ -1,4 +1,4 @@ -// run-rustfix +//@ run-rustfix struct Test { a: u32 } diff --git a/tests/ui/borrowck/suggest-mut-iterator.rs b/tests/ui/borrowck/suggest-mut-iterator.rs index 276edeccb22..6f6aab481fa 100644 --- a/tests/ui/borrowck/suggest-mut-iterator.rs +++ b/tests/ui/borrowck/suggest-mut-iterator.rs @@ -1,4 +1,4 @@ -// run-rustfix +//@ run-rustfix struct Test { a: u32 } diff --git a/tests/ui/borrowck/two-phase-activation-sharing-interference.rs b/tests/ui/borrowck/two-phase-activation-sharing-interference.rs index 8b880ff6416..beee9916fca 100644 --- a/tests/ui/borrowck/two-phase-activation-sharing-interference.rs +++ b/tests/ui/borrowck/two-phase-activation-sharing-interference.rs @@ -1,7 +1,7 @@ -// revisions: nll_target +//@ revisions: nll_target // The following revisions are disabled due to missing support from two-phase beyond autorefs -//[nll_beyond] compile-flags: -Z two-phase-beyond-autoref +//@[nll_beyond] compile-flags: -Z two-phase-beyond-autoref // This is an important corner case pointed out by Niko: one is // allowed to initiate a shared borrow during a reservation, but it diff --git a/tests/ui/borrowck/two-phase-allow-access-during-reservation.rs b/tests/ui/borrowck/two-phase-allow-access-during-reservation.rs index 67d0842070f..e6b2501c1eb 100644 --- a/tests/ui/borrowck/two-phase-allow-access-during-reservation.rs +++ b/tests/ui/borrowck/two-phase-allow-access-during-reservation.rs @@ -1,7 +1,7 @@ -// revisions: nll_target +//@ revisions: nll_target // The following revisions are disabled due to missing support for two_phase_beyond_autoref -//[nll_beyond] compile-flags: -Z two_phase_beyond_autoref +//@[nll_beyond] compile-flags: -Z two_phase_beyond_autoref // This is the second counter-example from Niko's blog post // smallcultfollowing.com/babysteps/blog/2017/03/01/nested-method-calls-via-two-phase-borrowing/ diff --git a/tests/ui/borrowck/two-phase-baseline.rs b/tests/ui/borrowck/two-phase-baseline.rs index 994dc823dfc..07aea5fbff6 100644 --- a/tests/ui/borrowck/two-phase-baseline.rs +++ b/tests/ui/borrowck/two-phase-baseline.rs @@ -1,4 +1,4 @@ -// run-pass +//@ run-pass // This is the "goto example" for why we want two phase borrows. diff --git a/tests/ui/borrowck/two-phase-bin-ops.rs b/tests/ui/borrowck/two-phase-bin-ops.rs index 1242ae307d3..2369c35dac9 100644 --- a/tests/ui/borrowck/two-phase-bin-ops.rs +++ b/tests/ui/borrowck/two-phase-bin-ops.rs @@ -1,4 +1,4 @@ -// run-pass +//@ run-pass use std::ops::{AddAssign, SubAssign, MulAssign, DivAssign, RemAssign}; use std::ops::{BitAndAssign, BitOrAssign, BitXorAssign, ShlAssign, ShrAssign}; diff --git a/tests/ui/borrowck/two-phase-control-flow-split-before-activation.rs b/tests/ui/borrowck/two-phase-control-flow-split-before-activation.rs index 0b20e1945e6..921e7351c0f 100644 --- a/tests/ui/borrowck/two-phase-control-flow-split-before-activation.rs +++ b/tests/ui/borrowck/two-phase-control-flow-split-before-activation.rs @@ -1,4 +1,4 @@ -// run-pass +//@ run-pass fn main() { let mut a = 0; diff --git a/tests/ui/borrowck/two-phase-method-receivers.rs b/tests/ui/borrowck/two-phase-method-receivers.rs index 6b879af5aec..147b70d0cfb 100644 --- a/tests/ui/borrowck/two-phase-method-receivers.rs +++ b/tests/ui/borrowck/two-phase-method-receivers.rs @@ -1,4 +1,4 @@ -// run-pass +//@ run-pass struct Foo<'a> { x: &'a i32 diff --git a/tests/ui/borrowck/two-phase-multiple-activations.rs b/tests/ui/borrowck/two-phase-multiple-activations.rs index 53fb71ebed4..4efb0ae28d5 100644 --- a/tests/ui/borrowck/two-phase-multiple-activations.rs +++ b/tests/ui/borrowck/two-phase-multiple-activations.rs @@ -1,4 +1,4 @@ -// run-pass +//@ run-pass use std::io::Result; diff --git a/tests/ui/borrowck/two-phase-nonrecv-autoref.rs b/tests/ui/borrowck/two-phase-nonrecv-autoref.rs index da238205b40..f52e9c2e3fd 100644 --- a/tests/ui/borrowck/two-phase-nonrecv-autoref.rs +++ b/tests/ui/borrowck/two-phase-nonrecv-autoref.rs @@ -1,6 +1,6 @@ -// revisions: base +//@ revisions: base -//[g2p]compile-flags: -Z two-phase-beyond-autoref +//@[g2p]compile-flags: -Z two-phase-beyond-autoref // the above revision is disabled until two-phase-beyond-autoref support is better // This is a test checking that when we limit two-phase borrows to diff --git a/tests/ui/borrowck/two-phase-reservation-sharing-interference-2.rs b/tests/ui/borrowck/two-phase-reservation-sharing-interference-2.rs index 27e599c6cd5..f049cde60cc 100644 --- a/tests/ui/borrowck/two-phase-reservation-sharing-interference-2.rs +++ b/tests/ui/borrowck/two-phase-reservation-sharing-interference-2.rs @@ -2,7 +2,7 @@ // accidentally allowed under migrate/nll, then linted against in migrate mode // but disallowed under NLL. Now, we accept it everywhere. -//ignore-compare-mode-polonius +//@ignore-compare-mode-polonius fn double_conflicts() { let mut v = vec![0, 1, 2]; diff --git a/tests/ui/borrowck/two-phase-reservation-sharing-interference.rs b/tests/ui/borrowck/two-phase-reservation-sharing-interference.rs index 0463e22b3c2..ac0d4f6e099 100644 --- a/tests/ui/borrowck/two-phase-reservation-sharing-interference.rs +++ b/tests/ui/borrowck/two-phase-reservation-sharing-interference.rs @@ -1,7 +1,7 @@ -// revisions: nll_target +//@ revisions: nll_target // The nll_beyond revision is disabled due to missing support from two-phase beyond autorefs -//[nll_beyond]compile-flags: -Z two-phase-beyond-autoref +//@[nll_beyond]compile-flags: -Z two-phase-beyond-autoref //[nll_beyond]should-fail // This is a corner case that the current implementation is (probably) diff --git a/tests/ui/borrowck/unboxed-closures-move-upvar-from-non-once-ref-closure.fixed b/tests/ui/borrowck/unboxed-closures-move-upvar-from-non-once-ref-closure.fixed index 85acafd88f6..8add3a5f2b6 100644 --- a/tests/ui/borrowck/unboxed-closures-move-upvar-from-non-once-ref-closure.fixed +++ b/tests/ui/borrowck/unboxed-closures-move-upvar-from-non-once-ref-closure.fixed @@ -1,4 +1,4 @@ -// run-rustfix +//@ run-rustfix // Test that a by-ref `FnMut` closure gets an error when it tries to // consume a value. diff --git a/tests/ui/borrowck/unboxed-closures-move-upvar-from-non-once-ref-closure.rs b/tests/ui/borrowck/unboxed-closures-move-upvar-from-non-once-ref-closure.rs index 4666b8a3373..1403ede4a71 100644 --- a/tests/ui/borrowck/unboxed-closures-move-upvar-from-non-once-ref-closure.rs +++ b/tests/ui/borrowck/unboxed-closures-move-upvar-from-non-once-ref-closure.rs @@ -1,4 +1,4 @@ -// run-rustfix +//@ run-rustfix // Test that a by-ref `FnMut` closure gets an error when it tries to // consume a value. diff --git a/tests/ui/box/alloc-unstable.rs b/tests/ui/box/alloc-unstable.rs index 640cadcc8e3..b8c8bc0c70a 100644 --- a/tests/ui/box/alloc-unstable.rs +++ b/tests/ui/box/alloc-unstable.rs @@ -1,4 +1,4 @@ -// run-pass +//@ run-pass #![feature(allocator_api)] fn main() { let _boxed: Box = Box::new(10); diff --git a/tests/ui/box/into-boxed-slice.rs b/tests/ui/box/into-boxed-slice.rs index 86866ac2f7e..1487cd65145 100644 --- a/tests/ui/box/into-boxed-slice.rs +++ b/tests/ui/box/into-boxed-slice.rs @@ -1,4 +1,4 @@ -// run-pass +//@ run-pass #![feature(box_into_boxed_slice)] fn main() { assert_eq!(Box::into_boxed_slice(Box::new(5u8)), Box::new([5u8]) as Box<[u8]>); diff --git a/tests/ui/box/issue-95036.rs b/tests/ui/box/issue-95036.rs index 0611fabc15c..f20f4b98437 100644 --- a/tests/ui/box/issue-95036.rs +++ b/tests/ui/box/issue-95036.rs @@ -1,5 +1,5 @@ -// compile-flags: -O -// build-pass +//@ compile-flags: -O +//@ build-pass #![feature(allocator_api)] diff --git a/tests/ui/box/large-allocator-ice.rs b/tests/ui/box/large-allocator-ice.rs index b3a882ff089..d5c7069cfb9 100644 --- a/tests/ui/box/large-allocator-ice.rs +++ b/tests/ui/box/large-allocator-ice.rs @@ -1,4 +1,4 @@ -// build-pass +//@ build-pass #![feature(allocator_api)] #![allow(unused_must_use)] diff --git a/tests/ui/box/new-box-syntax.rs b/tests/ui/box/new-box-syntax.rs index e3b1550d60b..f2899ff3dde 100644 --- a/tests/ui/box/new-box-syntax.rs +++ b/tests/ui/box/new-box-syntax.rs @@ -1,5 +1,5 @@ -// run-pass -// pretty-expanded FIXME #23616 +//@ run-pass +//@ pretty-expanded FIXME #23616 /* Any copyright is dedicated to the Public Domain. * http://creativecommons.org/publicdomain/zero/1.0/ */ diff --git a/tests/ui/box/new-box.rs b/tests/ui/box/new-box.rs index 96a3b197f46..f33620a01ef 100644 --- a/tests/ui/box/new-box.rs +++ b/tests/ui/box/new-box.rs @@ -1,4 +1,4 @@ -// run-pass +//@ run-pass fn f(x: Box) { let y: &isize = &*x; diff --git a/tests/ui/box/new.rs b/tests/ui/box/new.rs index be1a40cf779..682a998ae19 100644 --- a/tests/ui/box/new.rs +++ b/tests/ui/box/new.rs @@ -1,5 +1,5 @@ -// run-pass -// pretty-expanded FIXME #23616 +//@ run-pass +//@ pretty-expanded FIXME #23616 fn main() { let _a = Box::new(1); diff --git a/tests/ui/box/thin_align.rs b/tests/ui/box/thin_align.rs index 3c61d0090e4..d3240046b85 100644 --- a/tests/ui/box/thin_align.rs +++ b/tests/ui/box/thin_align.rs @@ -1,5 +1,5 @@ #![feature(thin_box)] -// run-pass +//@ run-pass use std::boxed::ThinBox; use std::error::Error; use std::ops::Deref; diff --git a/tests/ui/box/thin_drop.rs b/tests/ui/box/thin_drop.rs index 965613c114e..6319aeca370 100644 --- a/tests/ui/box/thin_drop.rs +++ b/tests/ui/box/thin_drop.rs @@ -1,5 +1,5 @@ #![feature(thin_box)] -// run-pass +//@ run-pass use std::boxed::ThinBox; use std::error::Error; use std::ops::Deref; diff --git a/tests/ui/box/thin_new.rs b/tests/ui/box/thin_new.rs index 53f46478be4..cba63aee9b1 100644 --- a/tests/ui/box/thin_new.rs +++ b/tests/ui/box/thin_new.rs @@ -1,5 +1,5 @@ #![feature(thin_box)] -// run-pass +//@ run-pass use std::boxed::ThinBox; use std::error::Error; use std::{fmt, mem}; diff --git a/tests/ui/box/thin_zst.rs b/tests/ui/box/thin_zst.rs index 77c400d17bb..7c62fbd799e 100644 --- a/tests/ui/box/thin_zst.rs +++ b/tests/ui/box/thin_zst.rs @@ -1,5 +1,5 @@ #![feature(thin_box)] -// run-pass +//@ run-pass use std::boxed::ThinBox; use std::error::Error; use std::{fmt, mem}; diff --git a/tests/ui/box/unit/expr-block-generic-unique1.rs b/tests/ui/box/unit/expr-block-generic-unique1.rs index 14603a2c71f..1326a1510e8 100644 --- a/tests/ui/box/unit/expr-block-generic-unique1.rs +++ b/tests/ui/box/unit/expr-block-generic-unique1.rs @@ -1,4 +1,4 @@ -// run-pass +//@ run-pass #![allow(unused_braces)] fn test_generic(expected: Box, eq: F) where T: Clone, F: FnOnce(Box, Box) -> bool { diff --git a/tests/ui/box/unit/expr-block-generic-unique2.rs b/tests/ui/box/unit/expr-block-generic-unique2.rs index 7879c144b10..204eaac4b1d 100644 --- a/tests/ui/box/unit/expr-block-generic-unique2.rs +++ b/tests/ui/box/unit/expr-block-generic-unique2.rs @@ -1,4 +1,4 @@ -// run-pass +//@ run-pass #![allow(unused_braces)] fn test_generic(expected: T, eq: F) where T: Clone, F: FnOnce(T, T) -> bool { diff --git a/tests/ui/box/unit/expr-if-unique.rs b/tests/ui/box/unit/expr-if-unique.rs index 86232683549..344c9dc4f6a 100644 --- a/tests/ui/box/unit/expr-if-unique.rs +++ b/tests/ui/box/unit/expr-if-unique.rs @@ -1,4 +1,4 @@ -// run-pass +//@ run-pass // Tests for if as expressions returning boxed types fn test_box() { diff --git a/tests/ui/box/unit/unique-assign-copy.rs b/tests/ui/box/unit/unique-assign-copy.rs index b742973ce32..f62984cca66 100644 --- a/tests/ui/box/unit/unique-assign-copy.rs +++ b/tests/ui/box/unit/unique-assign-copy.rs @@ -1,4 +1,4 @@ -// run-pass +//@ run-pass pub fn main() { let mut i: Box<_> = Box::new(1); diff --git a/tests/ui/box/unit/unique-assign-drop.rs b/tests/ui/box/unit/unique-assign-drop.rs index e7685b589ca..3d37344ae96 100644 --- a/tests/ui/box/unit/unique-assign-drop.rs +++ b/tests/ui/box/unit/unique-assign-drop.rs @@ -1,4 +1,4 @@ -// run-pass +//@ run-pass #![allow(unused_assignments)] pub fn main() { diff --git a/tests/ui/box/unit/unique-assign-generic.rs b/tests/ui/box/unit/unique-assign-generic.rs index d4932d8333a..9dc7fb8dcea 100644 --- a/tests/ui/box/unit/unique-assign-generic.rs +++ b/tests/ui/box/unit/unique-assign-generic.rs @@ -1,4 +1,4 @@ -// run-pass +//@ run-pass fn f(t: T) -> T { let t1 = t; diff --git a/tests/ui/box/unit/unique-assign.rs b/tests/ui/box/unit/unique-assign.rs index d598744f145..9a2edd80607 100644 --- a/tests/ui/box/unit/unique-assign.rs +++ b/tests/ui/box/unit/unique-assign.rs @@ -1,4 +1,4 @@ -// run-pass +//@ run-pass #![allow(unused_mut)] pub fn main() { diff --git a/tests/ui/box/unit/unique-autoderef-field.rs b/tests/ui/box/unit/unique-autoderef-field.rs index 64147e11f1c..f751801d8df 100644 --- a/tests/ui/box/unit/unique-autoderef-field.rs +++ b/tests/ui/box/unit/unique-autoderef-field.rs @@ -1,4 +1,4 @@ -// run-pass +//@ run-pass struct J { j: isize } diff --git a/tests/ui/box/unit/unique-autoderef-index.rs b/tests/ui/box/unit/unique-autoderef-index.rs index ea6598a7f6b..336b6f615b4 100644 --- a/tests/ui/box/unit/unique-autoderef-index.rs +++ b/tests/ui/box/unit/unique-autoderef-index.rs @@ -1,4 +1,4 @@ -// run-pass +//@ run-pass pub fn main() { let i: Box<_> = Box::new(vec![100]); diff --git a/tests/ui/box/unit/unique-cmp.rs b/tests/ui/box/unit/unique-cmp.rs index ee05dd5a31d..1bf3ec0bef4 100644 --- a/tests/ui/box/unit/unique-cmp.rs +++ b/tests/ui/box/unit/unique-cmp.rs @@ -1,4 +1,4 @@ -// run-pass +//@ run-pass #![allow(unused_allocation)] pub fn main() { diff --git a/tests/ui/box/unit/unique-containing-tag.rs b/tests/ui/box/unit/unique-containing-tag.rs index 6c31ae99b8e..cd88cfab425 100644 --- a/tests/ui/box/unit/unique-containing-tag.rs +++ b/tests/ui/box/unit/unique-containing-tag.rs @@ -1,8 +1,8 @@ -// run-pass +//@ run-pass #![allow(dead_code)] #![allow(non_camel_case_types)] -// pretty-expanded FIXME #23616 +//@ pretty-expanded FIXME #23616 pub fn main() { enum t { t1(isize), t2(isize), } diff --git a/tests/ui/box/unit/unique-create.rs b/tests/ui/box/unit/unique-create.rs index c566e79620a..bf3826156b1 100644 --- a/tests/ui/box/unit/unique-create.rs +++ b/tests/ui/box/unit/unique-create.rs @@ -1,6 +1,6 @@ -// run-pass +//@ run-pass #![allow(dead_code)] -// pretty-expanded FIXME #23616 +//@ pretty-expanded FIXME #23616 pub fn main() { let _: Box<_> = Box::new(100); diff --git a/tests/ui/box/unit/unique-decl-init-copy.rs b/tests/ui/box/unit/unique-decl-init-copy.rs index 5b9576fcc7a..abb1113ebdc 100644 --- a/tests/ui/box/unit/unique-decl-init-copy.rs +++ b/tests/ui/box/unit/unique-decl-init-copy.rs @@ -1,4 +1,4 @@ -// run-pass +//@ run-pass pub fn main() { let mut i: Box<_> = Box::new(1); diff --git a/tests/ui/box/unit/unique-decl-init.rs b/tests/ui/box/unit/unique-decl-init.rs index 1d70860c7ce..70aad8cf57d 100644 --- a/tests/ui/box/unit/unique-decl-init.rs +++ b/tests/ui/box/unit/unique-decl-init.rs @@ -1,4 +1,4 @@ -// run-pass +//@ run-pass pub fn main() { let i: Box<_> = Box::new(1); diff --git a/tests/ui/box/unit/unique-decl-move.rs b/tests/ui/box/unit/unique-decl-move.rs index 21187510ff0..11e94f1576d 100644 --- a/tests/ui/box/unit/unique-decl-move.rs +++ b/tests/ui/box/unit/unique-decl-move.rs @@ -1,4 +1,4 @@ -// run-pass +//@ run-pass pub fn main() { let i: Box<_> = Box::new(100); diff --git a/tests/ui/box/unit/unique-decl.rs b/tests/ui/box/unit/unique-decl.rs index 84a1b2a5b83..1ff5c9007f4 100644 --- a/tests/ui/box/unit/unique-decl.rs +++ b/tests/ui/box/unit/unique-decl.rs @@ -1,4 +1,4 @@ -// run-pass +//@ run-pass #![allow(dead_code)] diff --git a/tests/ui/box/unit/unique-deref.rs b/tests/ui/box/unit/unique-deref.rs index 33a1e9932b5..aa69a936308 100644 --- a/tests/ui/box/unit/unique-deref.rs +++ b/tests/ui/box/unit/unique-deref.rs @@ -1,4 +1,4 @@ -// run-pass +//@ run-pass pub fn main() { let i: Box<_> = Box::new(100); diff --git a/tests/ui/box/unit/unique-destructure.rs b/tests/ui/box/unit/unique-destructure.rs index 7207ac96295..2ddb3c452cd 100644 --- a/tests/ui/box/unit/unique-destructure.rs +++ b/tests/ui/box/unit/unique-destructure.rs @@ -1,4 +1,4 @@ -// run-pass +//@ run-pass #![feature(box_patterns)] struct Foo { a: isize, b: isize } diff --git a/tests/ui/box/unit/unique-drop-complex.rs b/tests/ui/box/unit/unique-drop-complex.rs index 2324f1e1a65..f23635e59cd 100644 --- a/tests/ui/box/unit/unique-drop-complex.rs +++ b/tests/ui/box/unit/unique-drop-complex.rs @@ -1,5 +1,5 @@ -// run-pass -// pretty-expanded FIXME #23616 +//@ run-pass +//@ pretty-expanded FIXME #23616 pub fn main() { let _x: Box<_> = Box::new(vec![0,0,0,0,0]); diff --git a/tests/ui/box/unit/unique-ffi-symbols.rs b/tests/ui/box/unit/unique-ffi-symbols.rs index 77b5ead2633..65a9a32b2bb 100644 --- a/tests/ui/box/unit/unique-ffi-symbols.rs +++ b/tests/ui/box/unit/unique-ffi-symbols.rs @@ -1,4 +1,4 @@ -// run-pass +//@ run-pass // We used to have a __rust_abi shim that resulted in duplicated symbols // whenever the item path wasn't enough to disambiguate between them. fn main() { diff --git a/tests/ui/box/unit/unique-fn-arg-move.rs b/tests/ui/box/unit/unique-fn-arg-move.rs index 6d42df218fb..a57e9b932f1 100644 --- a/tests/ui/box/unit/unique-fn-arg-move.rs +++ b/tests/ui/box/unit/unique-fn-arg-move.rs @@ -1,4 +1,4 @@ -// run-pass +//@ run-pass fn f(i: Box) { assert_eq!(*i, 100); diff --git a/tests/ui/box/unit/unique-fn-arg-mut.rs b/tests/ui/box/unit/unique-fn-arg-mut.rs index 01510200b11..08d1055c613 100644 --- a/tests/ui/box/unit/unique-fn-arg-mut.rs +++ b/tests/ui/box/unit/unique-fn-arg-mut.rs @@ -1,4 +1,4 @@ -// run-pass +//@ run-pass fn f(i: &mut Box) { *i = Box::new(200); diff --git a/tests/ui/box/unit/unique-fn-arg.rs b/tests/ui/box/unit/unique-fn-arg.rs index b4f3bc4b294..80bb2b61ff6 100644 --- a/tests/ui/box/unit/unique-fn-arg.rs +++ b/tests/ui/box/unit/unique-fn-arg.rs @@ -1,4 +1,4 @@ -// run-pass +//@ run-pass fn f(i: Box) { assert_eq!(*i, 100); diff --git a/tests/ui/box/unit/unique-fn-ret.rs b/tests/ui/box/unit/unique-fn-ret.rs index 773a9bce1ad..a819dc4a5ab 100644 --- a/tests/ui/box/unit/unique-fn-ret.rs +++ b/tests/ui/box/unit/unique-fn-ret.rs @@ -1,4 +1,4 @@ -// run-pass +//@ run-pass fn f() -> Box { Box::new(100) diff --git a/tests/ui/box/unit/unique-generic-assign.rs b/tests/ui/box/unit/unique-generic-assign.rs index 9c4405aa8ac..ef9c34c41a3 100644 --- a/tests/ui/box/unit/unique-generic-assign.rs +++ b/tests/ui/box/unit/unique-generic-assign.rs @@ -1,9 +1,9 @@ -// run-pass +//@ run-pass #![allow(dead_code)] // Issue #976 -// pretty-expanded FIXME #23616 +//@ pretty-expanded FIXME #23616 fn f(x: Box) { let _x2 = x; diff --git a/tests/ui/box/unit/unique-in-tag.rs b/tests/ui/box/unit/unique-in-tag.rs index 6daa06fb12d..2da5ed1b5e9 100644 --- a/tests/ui/box/unit/unique-in-tag.rs +++ b/tests/ui/box/unit/unique-in-tag.rs @@ -1,4 +1,4 @@ -// run-pass +//@ run-pass #![allow(dead_code)] #![allow(non_camel_case_types)] diff --git a/tests/ui/box/unit/unique-in-vec-copy.rs b/tests/ui/box/unit/unique-in-vec-copy.rs index ce52d15ef1a..40a0f878285 100644 --- a/tests/ui/box/unit/unique-in-vec-copy.rs +++ b/tests/ui/box/unit/unique-in-vec-copy.rs @@ -1,4 +1,4 @@ -// run-pass +//@ run-pass pub fn main() { let mut a: Vec> = vec![Box::new(10)]; diff --git a/tests/ui/box/unit/unique-in-vec.rs b/tests/ui/box/unit/unique-in-vec.rs index 1e8d05e3d26..8c6552ad163 100644 --- a/tests/ui/box/unit/unique-in-vec.rs +++ b/tests/ui/box/unit/unique-in-vec.rs @@ -1,4 +1,4 @@ -// run-pass +//@ run-pass pub fn main() { let vect : Vec> = vec![Box::new(100)]; diff --git a/tests/ui/box/unit/unique-init.rs b/tests/ui/box/unit/unique-init.rs index d19605046e1..ad2390c2ca0 100644 --- a/tests/ui/box/unit/unique-init.rs +++ b/tests/ui/box/unit/unique-init.rs @@ -1,5 +1,5 @@ -// run-pass -// pretty-expanded FIXME #23616 +//@ run-pass +//@ pretty-expanded FIXME #23616 pub fn main() { let _i: Box<_> = Box::new(100); diff --git a/tests/ui/box/unit/unique-kinds.rs b/tests/ui/box/unit/unique-kinds.rs index 1ef09d7195a..71e99277a75 100644 --- a/tests/ui/box/unit/unique-kinds.rs +++ b/tests/ui/box/unit/unique-kinds.rs @@ -1,4 +1,4 @@ -// run-pass +//@ run-pass use std::fmt::Debug; diff --git a/tests/ui/box/unit/unique-log.rs b/tests/ui/box/unit/unique-log.rs index 0715d16628f..86c8cfac814 100644 --- a/tests/ui/box/unit/unique-log.rs +++ b/tests/ui/box/unit/unique-log.rs @@ -1,4 +1,4 @@ -// run-pass +//@ run-pass pub fn main() { let i: Box<_> = Box::new(100); diff --git a/tests/ui/box/unit/unique-match-discrim.rs b/tests/ui/box/unit/unique-match-discrim.rs index 6e6d7432277..97b502004f5 100644 --- a/tests/ui/box/unit/unique-match-discrim.rs +++ b/tests/ui/box/unit/unique-match-discrim.rs @@ -1,8 +1,8 @@ -// run-pass +//@ run-pass #![allow(dead_code)] // Issue #961 -// pretty-expanded FIXME #23616 +//@ pretty-expanded FIXME #23616 fn altsimple() { match Box::new(true) { diff --git a/tests/ui/box/unit/unique-move-drop.rs b/tests/ui/box/unit/unique-move-drop.rs index c0f5d8f9053..1dff5f0bc87 100644 --- a/tests/ui/box/unit/unique-move-drop.rs +++ b/tests/ui/box/unit/unique-move-drop.rs @@ -1,4 +1,4 @@ -// run-pass +//@ run-pass #![allow(unused_variables)] diff --git a/tests/ui/box/unit/unique-move-temp.rs b/tests/ui/box/unit/unique-move-temp.rs index 103af8e1f1e..f86a2a3b7e4 100644 --- a/tests/ui/box/unit/unique-move-temp.rs +++ b/tests/ui/box/unit/unique-move-temp.rs @@ -1,4 +1,4 @@ -// run-pass +//@ run-pass #![allow(unused_mut)] pub fn main() { diff --git a/tests/ui/box/unit/unique-move.rs b/tests/ui/box/unit/unique-move.rs index 40a2718e4e5..04f7d8f051a 100644 --- a/tests/ui/box/unit/unique-move.rs +++ b/tests/ui/box/unit/unique-move.rs @@ -1,4 +1,4 @@ -// run-pass +//@ run-pass #![allow(unused_mut)] pub fn main() { diff --git a/tests/ui/box/unit/unique-mutable.rs b/tests/ui/box/unit/unique-mutable.rs index 0367c08099a..284b419f5a1 100644 --- a/tests/ui/box/unit/unique-mutable.rs +++ b/tests/ui/box/unit/unique-mutable.rs @@ -1,4 +1,4 @@ -// run-pass +//@ run-pass pub fn main() { let mut i: Box<_> = Box::new(0); diff --git a/tests/ui/box/unit/unique-object-move.rs b/tests/ui/box/unit/unique-object-move.rs index bb35a9b2d73..f30fc5c8e64 100644 --- a/tests/ui/box/unit/unique-object-move.rs +++ b/tests/ui/box/unit/unique-object-move.rs @@ -1,8 +1,8 @@ -// run-pass +//@ run-pass #![allow(dead_code)] // Issue #5192 -// pretty-expanded FIXME #23616 +//@ pretty-expanded FIXME #23616 pub trait EventLoop { fn foo(&self) {} } diff --git a/tests/ui/box/unit/unique-pat-2.rs b/tests/ui/box/unit/unique-pat-2.rs index 9c73fd2204c..85f0fbd5e4f 100644 --- a/tests/ui/box/unit/unique-pat-2.rs +++ b/tests/ui/box/unit/unique-pat-2.rs @@ -1,4 +1,4 @@ -// run-pass +//@ run-pass #![allow(dead_code)] #![allow(non_camel_case_types)] #![allow(non_shorthand_field_patterns)] diff --git a/tests/ui/box/unit/unique-pat-3.rs b/tests/ui/box/unit/unique-pat-3.rs index 2e81f898d0c..4816b5945f1 100644 --- a/tests/ui/box/unit/unique-pat-3.rs +++ b/tests/ui/box/unit/unique-pat-3.rs @@ -1,4 +1,4 @@ -// run-pass +//@ run-pass #![allow(dead_code)] #![allow(non_camel_case_types)] diff --git a/tests/ui/box/unit/unique-pat.rs b/tests/ui/box/unit/unique-pat.rs index c2474d0e772..395d06127d6 100644 --- a/tests/ui/box/unit/unique-pat.rs +++ b/tests/ui/box/unit/unique-pat.rs @@ -1,4 +1,4 @@ -// run-pass +//@ run-pass #![feature(box_patterns)] diff --git a/tests/ui/box/unit/unique-rec.rs b/tests/ui/box/unit/unique-rec.rs index 9f8ad9bb050..f13ca0c4acb 100644 --- a/tests/ui/box/unit/unique-rec.rs +++ b/tests/ui/box/unit/unique-rec.rs @@ -1,4 +1,4 @@ -// run-pass +//@ run-pass struct X { x: isize } diff --git a/tests/ui/box/unit/unique-send-2.rs b/tests/ui/box/unit/unique-send-2.rs index 23ddd2cdca2..20474fee4d8 100644 --- a/tests/ui/box/unit/unique-send-2.rs +++ b/tests/ui/box/unit/unique-send-2.rs @@ -1,6 +1,6 @@ -// run-pass +//@ run-pass #![allow(unused_must_use)] -// ignore-emscripten no threads support +//@ ignore-emscripten no threads support use std::sync::mpsc::{channel, Sender}; use std::thread; diff --git a/tests/ui/box/unit/unique-send.rs b/tests/ui/box/unit/unique-send.rs index 431cc2be5d2..f4ca2d13d09 100644 --- a/tests/ui/box/unit/unique-send.rs +++ b/tests/ui/box/unit/unique-send.rs @@ -1,4 +1,4 @@ -// run-pass +//@ run-pass use std::sync::mpsc::channel; diff --git a/tests/ui/box/unit/unique-swap.rs b/tests/ui/box/unit/unique-swap.rs index 4f33ff9a8a3..c41ff10fe56 100644 --- a/tests/ui/box/unit/unique-swap.rs +++ b/tests/ui/box/unit/unique-swap.rs @@ -1,4 +1,4 @@ -// run-pass +//@ run-pass use std::mem::swap; diff --git a/tests/ui/box/unit/unwind-unique.rs b/tests/ui/box/unit/unwind-unique.rs index 50ecf751a86..512327c9af4 100644 --- a/tests/ui/box/unit/unwind-unique.rs +++ b/tests/ui/box/unit/unwind-unique.rs @@ -1,6 +1,6 @@ -// run-pass -// needs-unwind -// ignore-emscripten no threads support +//@ run-pass +//@ needs-unwind +//@ ignore-emscripten no threads support use std::thread; diff --git a/tests/ui/btreemap/btreemap_into_iterator_lifetime.rs b/tests/ui/btreemap/btreemap_into_iterator_lifetime.rs index fda825bc65e..59909d8c0e5 100644 --- a/tests/ui/btreemap/btreemap_into_iterator_lifetime.rs +++ b/tests/ui/btreemap/btreemap_into_iterator_lifetime.rs @@ -1,4 +1,4 @@ -// check-pass +//@ check-pass use std::collections::{BTreeMap, HashMap}; diff --git a/tests/ui/builtin-clone-unwind.rs b/tests/ui/builtin-clone-unwind.rs index 16add6ff2f6..507ea045b4f 100644 --- a/tests/ui/builtin-clone-unwind.rs +++ b/tests/ui/builtin-clone-unwind.rs @@ -1,5 +1,5 @@ -// run-pass -// needs-unwind +//@ run-pass +//@ needs-unwind #![allow(unused_variables)] #![allow(unused_imports)] diff --git a/tests/ui/builtin-superkinds/builtin-superkinds-capabilities-transitive.rs b/tests/ui/builtin-superkinds/builtin-superkinds-capabilities-transitive.rs index 1f997d37122..fcb77ab0478 100644 --- a/tests/ui/builtin-superkinds/builtin-superkinds-capabilities-transitive.rs +++ b/tests/ui/builtin-superkinds/builtin-superkinds-capabilities-transitive.rs @@ -1,4 +1,4 @@ -// run-pass +//@ run-pass // Tests "transitivity" of super-builtin-kinds on traits. Here, if // we have a Foo, we know we have a Bar, and if we have a Bar, we // know we have a Send. So if we have a Foo we should know we have diff --git a/tests/ui/builtin-superkinds/builtin-superkinds-capabilities-xc.rs b/tests/ui/builtin-superkinds/builtin-superkinds-capabilities-xc.rs index 8416bb3a377..5ed2be84a56 100644 --- a/tests/ui/builtin-superkinds/builtin-superkinds-capabilities-xc.rs +++ b/tests/ui/builtin-superkinds/builtin-superkinds-capabilities-xc.rs @@ -1,5 +1,5 @@ -// run-pass -// aux-build:trait_superkinds_in_metadata.rs +//@ run-pass +//@ aux-build:trait_superkinds_in_metadata.rs // Tests "capabilities" granted by traits with super-builtin-kinds, // even when using them cross-crate. diff --git a/tests/ui/builtin-superkinds/builtin-superkinds-capabilities.rs b/tests/ui/builtin-superkinds/builtin-superkinds-capabilities.rs index e936f921a82..407b0b391b4 100644 --- a/tests/ui/builtin-superkinds/builtin-superkinds-capabilities.rs +++ b/tests/ui/builtin-superkinds/builtin-superkinds-capabilities.rs @@ -1,4 +1,4 @@ -// run-pass +//@ run-pass // Tests "capabilities" granted by traits that inherit from super- // builtin-kinds, e.g., if a trait requires Send to implement, then // at usage site of that trait, we know we have the Send capability. diff --git a/tests/ui/builtin-superkinds/builtin-superkinds-in-metadata.rs b/tests/ui/builtin-superkinds/builtin-superkinds-in-metadata.rs index b4555a1809a..af445e56fa0 100644 --- a/tests/ui/builtin-superkinds/builtin-superkinds-in-metadata.rs +++ b/tests/ui/builtin-superkinds/builtin-superkinds-in-metadata.rs @@ -1,4 +1,4 @@ -// aux-build:trait_superkinds_in_metadata.rs +//@ aux-build:trait_superkinds_in_metadata.rs // Test for traits inheriting from the builtin kinds cross-crate. // Mostly tests correctness of metadata. diff --git a/tests/ui/builtin-superkinds/builtin-superkinds-in-metadata2.rs b/tests/ui/builtin-superkinds/builtin-superkinds-in-metadata2.rs index 7e8820cb2c6..5d699a13385 100644 --- a/tests/ui/builtin-superkinds/builtin-superkinds-in-metadata2.rs +++ b/tests/ui/builtin-superkinds/builtin-superkinds-in-metadata2.rs @@ -1,8 +1,8 @@ -// check-pass +//@ check-pass #![allow(unused_imports)] -// aux-build:trait_superkinds_in_metadata.rs +//@ aux-build:trait_superkinds_in_metadata.rs // Tests (correct) usage of trait super-builtin-kinds cross-crate. diff --git a/tests/ui/builtin-superkinds/builtin-superkinds-phantom-typaram.rs b/tests/ui/builtin-superkinds/builtin-superkinds-phantom-typaram.rs index 9b80664b04e..8a2fa468577 100644 --- a/tests/ui/builtin-superkinds/builtin-superkinds-phantom-typaram.rs +++ b/tests/ui/builtin-superkinds/builtin-superkinds-phantom-typaram.rs @@ -1,11 +1,11 @@ -// run-pass +//@ run-pass #![allow(dead_code)] // Tests that even when a type parameter doesn't implement a required // super-builtin-kind of a trait, if the type parameter is never used, // the type can implement the trait anyway. -// pretty-expanded FIXME #23616 +//@ pretty-expanded FIXME #23616 use std::marker; diff --git a/tests/ui/builtin-superkinds/builtin-superkinds-simple2.rs b/tests/ui/builtin-superkinds/builtin-superkinds-simple2.rs index 50914b1de53..1354b4ac188 100644 --- a/tests/ui/builtin-superkinds/builtin-superkinds-simple2.rs +++ b/tests/ui/builtin-superkinds/builtin-superkinds-simple2.rs @@ -1,7 +1,7 @@ -// check-pass +//@ check-pass // Simple test case of implementing a trait with super-builtin-kinds. -// pretty-expanded FIXME #23616 +//@ pretty-expanded FIXME #23616 trait Foo : Send { } diff --git a/tests/ui/builtin-superkinds/builtin-superkinds-typaram.rs b/tests/ui/builtin-superkinds/builtin-superkinds-typaram.rs index 0577acc572a..15b867dd5e0 100644 --- a/tests/ui/builtin-superkinds/builtin-superkinds-typaram.rs +++ b/tests/ui/builtin-superkinds/builtin-superkinds-typaram.rs @@ -1,8 +1,8 @@ -// check-pass +//@ check-pass // Tests correct implementation of traits with super-builtin-kinds // using a bounded type parameter. -// pretty-expanded FIXME #23616 +//@ pretty-expanded FIXME #23616 trait Foo : Send { } diff --git a/tests/ui/c-variadic/issue-86053-1.rs b/tests/ui/c-variadic/issue-86053-1.rs index 49d5c0390bc..f952235be98 100644 --- a/tests/ui/c-variadic/issue-86053-1.rs +++ b/tests/ui/c-variadic/issue-86053-1.rs @@ -1,7 +1,7 @@ // Regression test for the ICE described in issue #86053. -// error-pattern:unexpected `self` parameter in function -// error-pattern:`...` must be the last argument of a C-variadic function -// error-pattern:cannot find type `F` in this scope +//@ error-pattern:unexpected `self` parameter in function +//@ error-pattern:`...` must be the last argument of a C-variadic function +//@ error-pattern:cannot find type `F` in this scope #![feature(c_variadic)] diff --git a/tests/ui/c-variadic/variadic-ffi-1.rs b/tests/ui/c-variadic/variadic-ffi-1.rs index acd8a25dc53..e41ab269211 100644 --- a/tests/ui/c-variadic/variadic-ffi-1.rs +++ b/tests/ui/c-variadic/variadic-ffi-1.rs @@ -1,5 +1,5 @@ -// needs-llvm-components: x86 -// compile-flags: --target=i686-pc-windows-msvc --crate-type=rlib +//@ needs-llvm-components: x86 +//@ compile-flags: --target=i686-pc-windows-msvc --crate-type=rlib #![no_core] #![feature(no_core, lang_items)] #[lang="sized"] diff --git a/tests/ui/c-variadic/variadic-ffi-2.rs b/tests/ui/c-variadic/variadic-ffi-2.rs index a412a58d7c5..a7261ebe936 100644 --- a/tests/ui/c-variadic/variadic-ffi-2.rs +++ b/tests/ui/c-variadic/variadic-ffi-2.rs @@ -1,4 +1,4 @@ -// ignore-arm stdcall isn't supported +//@ ignore-arm stdcall isn't supported #![feature(extended_varargs_abi_support)] fn baz(f: extern "stdcall" fn(usize, ...)) { diff --git a/tests/ui/c-variadic/variadic-unreachable-arg-error.rs b/tests/ui/c-variadic/variadic-unreachable-arg-error.rs index f60f6f3e808..e3fd24a088c 100644 --- a/tests/ui/c-variadic/variadic-unreachable-arg-error.rs +++ b/tests/ui/c-variadic/variadic-unreachable-arg-error.rs @@ -1,4 +1,4 @@ -// check-pass +//@ check-pass #![feature(c_variadic)] diff --git a/tests/ui/can-copy-pod.rs b/tests/ui/can-copy-pod.rs index e6c57ca3f71..dd4cf54040a 100644 --- a/tests/ui/can-copy-pod.rs +++ b/tests/ui/can-copy-pod.rs @@ -1,5 +1,5 @@ -// run-pass -// pretty-expanded FIXME #23616 +//@ run-pass +//@ pretty-expanded FIXME #23616 /* Any copyright is dedicated to the Public Domain. * http://creativecommons.org/publicdomain/zero/1.0/ */ diff --git a/tests/ui/cancel-clean-via-immediate-rvalue-ref.rs b/tests/ui/cancel-clean-via-immediate-rvalue-ref.rs index a0a561ab2d2..0575c29bffd 100644 --- a/tests/ui/cancel-clean-via-immediate-rvalue-ref.rs +++ b/tests/ui/cancel-clean-via-immediate-rvalue-ref.rs @@ -1,5 +1,5 @@ -// run-pass -// pretty-expanded FIXME #23616 +//@ run-pass +//@ pretty-expanded FIXME #23616 fn foo(x: &mut Box) { *x = Box::new(5); diff --git a/tests/ui/capture1.rs b/tests/ui/capture1.rs index 2938c084537..9bf6532a7d3 100644 --- a/tests/ui/capture1.rs +++ b/tests/ui/capture1.rs @@ -1,4 +1,4 @@ -// error-pattern: can't capture dynamic environment in a fn item +//@ error-pattern: can't capture dynamic environment in a fn item fn main() { let bar: isize = 5; diff --git a/tests/ui/cast/cast-does-fallback.rs b/tests/ui/cast/cast-does-fallback.rs index 770f7a31c76..553bf51a53d 100644 --- a/tests/ui/cast/cast-does-fallback.rs +++ b/tests/ui/cast/cast-does-fallback.rs @@ -1,4 +1,4 @@ -// run-pass +//@ run-pass pub fn main() { // Test that these type check correctly. diff --git a/tests/ui/cast/cast-from-nil.rs b/tests/ui/cast/cast-from-nil.rs index b5ceef76ac2..8a677603aa9 100644 --- a/tests/ui/cast/cast-from-nil.rs +++ b/tests/ui/cast/cast-from-nil.rs @@ -1,2 +1,2 @@ -// error-pattern: non-primitive cast: `()` as `u32` +//@ error-pattern: non-primitive cast: `()` as `u32` fn main() { let u = (assert!(true) as u32); } diff --git a/tests/ui/cast/cast-pointee-projection.rs b/tests/ui/cast/cast-pointee-projection.rs index f51c5f20f16..1786152699a 100644 --- a/tests/ui/cast/cast-pointee-projection.rs +++ b/tests/ui/cast/cast-pointee-projection.rs @@ -1,4 +1,4 @@ -// check-pass +//@ check-pass trait Tag<'a> { type Type: ?Sized; diff --git a/tests/ui/cast/cast-region-to-uint.rs b/tests/ui/cast/cast-region-to-uint.rs index 33ec2d27610..6f4edadafee 100644 --- a/tests/ui/cast/cast-region-to-uint.rs +++ b/tests/ui/cast/cast-region-to-uint.rs @@ -1,4 +1,4 @@ -// run-pass +//@ run-pass pub fn main() { let x: isize = 3; diff --git a/tests/ui/cast/cast-rfc0401-vtable-kinds.rs b/tests/ui/cast/cast-rfc0401-vtable-kinds.rs index be6a6bb8b17..410e15d024f 100644 --- a/tests/ui/cast/cast-rfc0401-vtable-kinds.rs +++ b/tests/ui/cast/cast-rfc0401-vtable-kinds.rs @@ -1,4 +1,4 @@ -// run-pass +//@ run-pass // Check that you can cast between different pointers to trait objects // whose vtable have the same kind (both lengths, or both trait pointers). diff --git a/tests/ui/cast/cast-rfc0401.rs b/tests/ui/cast/cast-rfc0401.rs index 424feeba0c4..f917f93a1c8 100644 --- a/tests/ui/cast/cast-rfc0401.rs +++ b/tests/ui/cast/cast-rfc0401.rs @@ -1,4 +1,4 @@ -// run-pass +//@ run-pass #![allow(dead_code)] diff --git a/tests/ui/cast/cast-to-infer-ty.rs b/tests/ui/cast/cast-to-infer-ty.rs index 053ebb621a7..d82eaa9f8ea 100644 --- a/tests/ui/cast/cast-to-infer-ty.rs +++ b/tests/ui/cast/cast-to-infer-ty.rs @@ -1,4 +1,4 @@ -// run-pass +//@ run-pass // Check that we allow a cast to `_` so long as the target type can be // inferred elsewhere. diff --git a/tests/ui/cast/cast-to-nil.rs b/tests/ui/cast/cast-to-nil.rs index 085bb09e631..d91f9a16a07 100644 --- a/tests/ui/cast/cast-to-nil.rs +++ b/tests/ui/cast/cast-to-nil.rs @@ -1,2 +1,2 @@ -// error-pattern: non-primitive cast: `u32` as `()` +//@ error-pattern: non-primitive cast: `u32` as `()` fn main() { let u = 0u32 as (); } diff --git a/tests/ui/cast/cast.rs b/tests/ui/cast/cast.rs index 218275c4d99..b9f21792816 100644 --- a/tests/ui/cast/cast.rs +++ b/tests/ui/cast/cast.rs @@ -1,4 +1,4 @@ -// run-pass +//@ run-pass #![allow(unused_assignments)] #![allow(unused_variables)] diff --git a/tests/ui/cast/codegen-object-shim.rs b/tests/ui/cast/codegen-object-shim.rs index 9a85a50ebd9..6256ab17ec6 100644 --- a/tests/ui/cast/codegen-object-shim.rs +++ b/tests/ui/cast/codegen-object-shim.rs @@ -1,4 +1,4 @@ -// run-pass +//@ run-pass fn main() { assert_eq!((ToString::to_string as fn(&(dyn ToString+'static)) -> String)(&"foo"), diff --git a/tests/ui/cast/fat-ptr-cast-rpass.rs b/tests/ui/cast/fat-ptr-cast-rpass.rs index c79468caddd..be9e29f2150 100644 --- a/tests/ui/cast/fat-ptr-cast-rpass.rs +++ b/tests/ui/cast/fat-ptr-cast-rpass.rs @@ -1,4 +1,4 @@ -// run-pass +//@ run-pass #![feature(ptr_metadata)] diff --git a/tests/ui/cast/issue-84213.fixed b/tests/ui/cast/issue-84213.fixed index b5c4a775296..a0dc4a89666 100644 --- a/tests/ui/cast/issue-84213.fixed +++ b/tests/ui/cast/issue-84213.fixed @@ -1,4 +1,4 @@ -// run-rustfix +//@ run-rustfix struct Something { pub field: u32, diff --git a/tests/ui/cast/issue-84213.rs b/tests/ui/cast/issue-84213.rs index 6eb81291abc..93b584c6d35 100644 --- a/tests/ui/cast/issue-84213.rs +++ b/tests/ui/cast/issue-84213.rs @@ -1,4 +1,4 @@ -// run-rustfix +//@ run-rustfix struct Something { pub field: u32, diff --git a/tests/ui/cast/issue-89497.fixed b/tests/ui/cast/issue-89497.fixed index 04c10a5f79e..4229199fa43 100644 --- a/tests/ui/cast/issue-89497.fixed +++ b/tests/ui/cast/issue-89497.fixed @@ -1,6 +1,6 @@ // Regression test for issue #89497. -// run-rustfix +//@ run-rustfix fn main() { let pointer: usize = &1_i32 as *const i32 as usize; diff --git a/tests/ui/cast/issue-89497.rs b/tests/ui/cast/issue-89497.rs index 76301b704c8..e934560ddab 100644 --- a/tests/ui/cast/issue-89497.rs +++ b/tests/ui/cast/issue-89497.rs @@ -1,6 +1,6 @@ // Regression test for issue #89497. -// run-rustfix +//@ run-rustfix fn main() { let pointer: usize = &1_i32 as *const i32 as usize; diff --git a/tests/ui/cast/ptr-to-ptr-different-regions.rs b/tests/ui/cast/ptr-to-ptr-different-regions.rs index 5592e613ac1..0d525edc133 100644 --- a/tests/ui/cast/ptr-to-ptr-different-regions.rs +++ b/tests/ui/cast/ptr-to-ptr-different-regions.rs @@ -1,4 +1,4 @@ -// check-pass +//@ check-pass // https://github.com/rust-lang/rust/issues/113257 diff --git a/tests/ui/cast/supported-cast.rs b/tests/ui/cast/supported-cast.rs index ff41ce6c79a..4862d7a4125 100644 --- a/tests/ui/cast/supported-cast.rs +++ b/tests/ui/cast/supported-cast.rs @@ -1,4 +1,4 @@ -// run-pass +//@ run-pass pub fn main() { let f = 1_usize as *const String; diff --git a/tests/ui/catch-unwind-bang.rs b/tests/ui/catch-unwind-bang.rs index fb3503937cb..c874c649f33 100644 --- a/tests/ui/catch-unwind-bang.rs +++ b/tests/ui/catch-unwind-bang.rs @@ -1,5 +1,5 @@ -// run-pass -// needs-unwind +//@ run-pass +//@ needs-unwind fn worker() -> ! { panic!() diff --git a/tests/ui/cfg/assume-incomplete-release/assume-incomplete.rs b/tests/ui/cfg/assume-incomplete-release/assume-incomplete.rs index 24d2dc64551..b04b1e0c326 100644 --- a/tests/ui/cfg/assume-incomplete-release/assume-incomplete.rs +++ b/tests/ui/cfg/assume-incomplete-release/assume-incomplete.rs @@ -1,7 +1,7 @@ -// run-pass -// aux-build:ver-cfg-rel.rs -// revisions: assume no_assume -// [assume]compile-flags: -Z assume-incomplete-release +//@ run-pass +//@ aux-build:ver-cfg-rel.rs +//@ revisions: assume no_assume +//@ [assume]compile-flags: -Z assume-incomplete-release #![feature(cfg_version)] diff --git a/tests/ui/cfg/assume-incomplete-release/auxiliary/ver-cfg-rel.rs b/tests/ui/cfg/assume-incomplete-release/auxiliary/ver-cfg-rel.rs index 067c620f5fe..e06ee94a1e9 100644 --- a/tests/ui/cfg/assume-incomplete-release/auxiliary/ver-cfg-rel.rs +++ b/tests/ui/cfg/assume-incomplete-release/auxiliary/ver-cfg-rel.rs @@ -1,5 +1,5 @@ -// force-host -// no-prefer-dynamic +//@ force-host +//@ no-prefer-dynamic #![crate_type = "proc-macro"] diff --git a/tests/ui/cfg/auxiliary/cfg_false_lib_no_std_before.rs b/tests/ui/cfg/auxiliary/cfg_false_lib_no_std_before.rs index 8e89545b8f4..a5c14be4c29 100644 --- a/tests/ui/cfg/auxiliary/cfg_false_lib_no_std_before.rs +++ b/tests/ui/cfg/auxiliary/cfg_false_lib_no_std_before.rs @@ -1,7 +1,7 @@ // `#![no_std]` on a fully unconfigured crate is respected if it's placed before `cfg(FALSE)`. // Therefore this crate doesn't link to libstd. -// no-prefer-dynamic +//@ no-prefer-dynamic #![no_std] #![crate_type = "lib"] diff --git a/tests/ui/cfg/cfg-attr-cfg.rs b/tests/ui/cfg/cfg-attr-cfg.rs index 61794e0bfa9..5b49966d544 100644 --- a/tests/ui/cfg/cfg-attr-cfg.rs +++ b/tests/ui/cfg/cfg-attr-cfg.rs @@ -1,8 +1,8 @@ -// run-pass +//@ run-pass // main is conditionally compiled, but the conditional compilation // is conditional too! -// pretty-expanded FIXME #23616 +//@ pretty-expanded FIXME #23616 #[cfg_attr(foo, cfg(bar))] fn main() { } diff --git a/tests/ui/cfg/cfg-attr-crate.rs b/tests/ui/cfg/cfg-attr-crate.rs index 1d70f2f84f2..7868b006e27 100644 --- a/tests/ui/cfg/cfg-attr-crate.rs +++ b/tests/ui/cfg/cfg-attr-crate.rs @@ -1,7 +1,7 @@ -// run-pass +//@ run-pass // https://github.com/rust-lang/rust/issues/21833#issuecomment-72353044 -// pretty-expanded FIXME #23616 +//@ pretty-expanded FIXME #23616 #![cfg_attr(not_used, no_core)] diff --git a/tests/ui/cfg/cfg-false-feature.rs b/tests/ui/cfg/cfg-false-feature.rs index 84c231562f1..6645f667d7e 100644 --- a/tests/ui/cfg/cfg-false-feature.rs +++ b/tests/ui/cfg/cfg-false-feature.rs @@ -1,7 +1,7 @@ // Features above `cfg(FALSE)` are in effect in a fully unconfigured crate (issue #104633). -// check-pass -// compile-flags: --crate-type lib +//@ check-pass +//@ compile-flags: --crate-type lib #![feature(decl_macro)] #![cfg(FALSE)] diff --git a/tests/ui/cfg/cfg-family.rs b/tests/ui/cfg/cfg-family.rs index c7d196a2aa6..b90656a0b41 100644 --- a/tests/ui/cfg/cfg-family.rs +++ b/tests/ui/cfg/cfg-family.rs @@ -1,7 +1,7 @@ -// build-pass -// pretty-expanded FIXME #23616 -// ignore-wasm32-bare no bare family -// ignore-sgx +//@ build-pass +//@ pretty-expanded FIXME #23616 +//@ ignore-wasm32-bare no bare family +//@ ignore-sgx #[cfg(windows)] pub fn main() { diff --git a/tests/ui/cfg/cfg-in-crate-1.rs b/tests/ui/cfg/cfg-in-crate-1.rs index e84300aa331..07e1c3727f9 100644 --- a/tests/ui/cfg/cfg-in-crate-1.rs +++ b/tests/ui/cfg/cfg-in-crate-1.rs @@ -1,5 +1,5 @@ -// run-pass -// compile-flags: --cfg bar -D warnings +//@ run-pass +//@ compile-flags: --cfg bar -D warnings #![cfg(bar)] fn main() {} diff --git a/tests/ui/cfg/cfg-macros-foo.rs b/tests/ui/cfg/cfg-macros-foo.rs index 8b112c7961b..7cdf2df5c8f 100644 --- a/tests/ui/cfg/cfg-macros-foo.rs +++ b/tests/ui/cfg/cfg-macros-foo.rs @@ -1,5 +1,5 @@ -// run-pass -// compile-flags: --cfg foo +//@ run-pass +//@ compile-flags: --cfg foo // check that cfg correctly chooses between the macro impls (see also // cfg-macros-notfoo.rs) diff --git a/tests/ui/cfg/cfg-macros-notfoo.rs b/tests/ui/cfg/cfg-macros-notfoo.rs index 292d97821cd..c47f4332aa3 100644 --- a/tests/ui/cfg/cfg-macros-notfoo.rs +++ b/tests/ui/cfg/cfg-macros-notfoo.rs @@ -1,5 +1,5 @@ -// run-pass -// compile-flags: +//@ run-pass +//@ compile-flags: // check that cfg correctly chooses between the macro impls (see also // cfg-macros-foo.rs) diff --git a/tests/ui/cfg/cfg-match-arm.rs b/tests/ui/cfg/cfg-match-arm.rs index 071008f9eb6..a41337a19a3 100644 --- a/tests/ui/cfg/cfg-match-arm.rs +++ b/tests/ui/cfg/cfg-match-arm.rs @@ -1,6 +1,6 @@ -// run-pass +//@ run-pass #![allow(dead_code)] -// pretty-expanded FIXME #23616 +//@ pretty-expanded FIXME #23616 enum Foo { Bar, diff --git a/tests/ui/cfg/cfg-method-receiver-ok.rs b/tests/ui/cfg/cfg-method-receiver-ok.rs index 61ad3b8c17a..2f4881de672 100644 --- a/tests/ui/cfg/cfg-method-receiver-ok.rs +++ b/tests/ui/cfg/cfg-method-receiver-ok.rs @@ -1,4 +1,4 @@ -// check-pass +//@ check-pass macro_rules! foo { () => { diff --git a/tests/ui/cfg/cfg-panic-abort.rs b/tests/ui/cfg/cfg-panic-abort.rs index 3853b598a7a..49adfd55c68 100644 --- a/tests/ui/cfg/cfg-panic-abort.rs +++ b/tests/ui/cfg/cfg-panic-abort.rs @@ -1,6 +1,6 @@ -// build-pass -// compile-flags: -C panic=abort -// no-prefer-dynamic +//@ build-pass +//@ compile-flags: -C panic=abort +//@ no-prefer-dynamic #[cfg(panic = "unwind")] diff --git a/tests/ui/cfg/cfg-panic.rs b/tests/ui/cfg/cfg-panic.rs index 2de72d54a48..0f1f539ebe3 100644 --- a/tests/ui/cfg/cfg-panic.rs +++ b/tests/ui/cfg/cfg-panic.rs @@ -1,6 +1,6 @@ -// build-pass -// compile-flags: -C panic=unwind -// needs-unwind +//@ build-pass +//@ compile-flags: -C panic=unwind +//@ needs-unwind #[cfg(panic = "abort")] diff --git a/tests/ui/cfg/cfg-path-error.rs b/tests/ui/cfg/cfg-path-error.rs index 5bf80bd74b8..1e52922d079 100644 --- a/tests/ui/cfg/cfg-path-error.rs +++ b/tests/ui/cfg/cfg-path-error.rs @@ -1,4 +1,4 @@ -// check-fail +//@ check-fail #[cfg(any(foo, foo::bar))] //~^ERROR `cfg` predicate key must be an identifier diff --git a/tests/ui/cfg/cfg-target-abi.rs b/tests/ui/cfg/cfg-target-abi.rs index acc570fc843..5d13337c1c3 100644 --- a/tests/ui/cfg/cfg-target-abi.rs +++ b/tests/ui/cfg/cfg-target-abi.rs @@ -1,4 +1,4 @@ -// run-pass +//@ run-pass #![feature(cfg_target_abi)] #[cfg(target_abi = "eabihf")] diff --git a/tests/ui/cfg/cfg-target-compact-errors.rs b/tests/ui/cfg/cfg-target-compact-errors.rs index bca2275b1a9..daacbb2851d 100644 --- a/tests/ui/cfg/cfg-target-compact-errors.rs +++ b/tests/ui/cfg/cfg-target-compact-errors.rs @@ -1,4 +1,4 @@ -// check-fail +//@ check-fail #![feature(cfg_target_compact)] diff --git a/tests/ui/cfg/cfg-target-compact.rs b/tests/ui/cfg/cfg-target-compact.rs index dc95a80915c..7698b363335 100644 --- a/tests/ui/cfg/cfg-target-compact.rs +++ b/tests/ui/cfg/cfg-target-compact.rs @@ -1,4 +1,4 @@ -// run-pass +//@ run-pass #![feature(cfg_target_compact)] #[cfg(target(os = "linux", pointer_width = "64"))] diff --git a/tests/ui/cfg/cfg-target-family.rs b/tests/ui/cfg/cfg-target-family.rs index 5182cdc8940..ab3be302e64 100644 --- a/tests/ui/cfg/cfg-target-family.rs +++ b/tests/ui/cfg/cfg-target-family.rs @@ -1,7 +1,7 @@ -// build-pass -// ignore-sgx +//@ build-pass +//@ ignore-sgx -// pretty-expanded FIXME #23616 +//@ pretty-expanded FIXME #23616 #[cfg(target_family = "windows")] pub fn main() {} diff --git a/tests/ui/cfg/cfg-target-vendor.rs b/tests/ui/cfg/cfg-target-vendor.rs index 7824585162e..e5de95d04e5 100644 --- a/tests/ui/cfg/cfg-target-vendor.rs +++ b/tests/ui/cfg/cfg-target-vendor.rs @@ -1,4 +1,4 @@ -// run-pass +//@ run-pass #[cfg(target_vendor = "unknown")] pub fn main() { } diff --git a/tests/ui/cfg/cfg_attr.rs b/tests/ui/cfg/cfg_attr.rs index c959e68acf9..4bd024ef5f4 100644 --- a/tests/ui/cfg/cfg_attr.rs +++ b/tests/ui/cfg/cfg_attr.rs @@ -1,5 +1,5 @@ -// run-pass -// compile-flags:--cfg set1 --cfg set2 +//@ run-pass +//@ compile-flags:--cfg set1 --cfg set2 #![allow(dead_code)] use std::fmt::Debug; diff --git a/tests/ui/cfg/cfg_false_no_std-1.rs b/tests/ui/cfg/cfg_false_no_std-1.rs index bcb49e51353..17286e219b8 100644 --- a/tests/ui/cfg/cfg_false_no_std-1.rs +++ b/tests/ui/cfg/cfg_false_no_std-1.rs @@ -1,7 +1,7 @@ // No error, panic handler is supplied by libstd linked though the empty library. -// check-pass -// aux-build: cfg_false_lib_no_std_after.rs +//@ check-pass +//@ aux-build: cfg_false_lib_no_std_after.rs #![no_std] diff --git a/tests/ui/cfg/cfg_false_no_std-2.rs b/tests/ui/cfg/cfg_false_no_std-2.rs index 0a2bfd5f68b..cd337565872 100644 --- a/tests/ui/cfg/cfg_false_no_std-2.rs +++ b/tests/ui/cfg/cfg_false_no_std-2.rs @@ -1,8 +1,8 @@ // Error, the linked empty library is `no_std` and doesn't provide a panic handler. -// dont-check-compiler-stderr -// error-pattern: `#[panic_handler]` function required, but not found -// aux-build: cfg_false_lib_no_std_before.rs +//@ dont-check-compiler-stderr +//@ error-pattern: `#[panic_handler]` function required, but not found +//@ aux-build: cfg_false_lib_no_std_before.rs #![no_std] diff --git a/tests/ui/cfg/cfg_false_no_std.rs b/tests/ui/cfg/cfg_false_no_std.rs index 4fa831715ed..910f3f8b9ae 100644 --- a/tests/ui/cfg/cfg_false_no_std.rs +++ b/tests/ui/cfg/cfg_false_no_std.rs @@ -1,7 +1,7 @@ // No error, panic handler is supplied by libstd linked though the empty library. -// check-pass -// aux-build: cfg_false_lib.rs +//@ check-pass +//@ aux-build: cfg_false_lib.rs #![no_std] diff --git a/tests/ui/cfg/cfg_inner_static.rs b/tests/ui/cfg/cfg_inner_static.rs index 45dbbcc1084..f4e2dc092f8 100644 --- a/tests/ui/cfg/cfg_inner_static.rs +++ b/tests/ui/cfg/cfg_inner_static.rs @@ -1,7 +1,7 @@ -// run-pass -// aux-build:cfg_inner_static.rs +//@ run-pass +//@ aux-build:cfg_inner_static.rs -// pretty-expanded FIXME #23616 +//@ pretty-expanded FIXME #23616 extern crate cfg_inner_static; diff --git a/tests/ui/cfg/cfg_stmt_expr.rs b/tests/ui/cfg/cfg_stmt_expr.rs index f9f4c98102c..6de5eb5c4c6 100644 --- a/tests/ui/cfg/cfg_stmt_expr.rs +++ b/tests/ui/cfg/cfg_stmt_expr.rs @@ -1,4 +1,4 @@ -// run-pass +//@ run-pass #![allow(dead_code)] #![allow(unused_mut)] #![allow(unused_variables)] diff --git a/tests/ui/cfg/cfgs-on-items.rs b/tests/ui/cfg/cfgs-on-items.rs index 9f2fc49423e..b3b38cfadb5 100644 --- a/tests/ui/cfg/cfgs-on-items.rs +++ b/tests/ui/cfg/cfgs-on-items.rs @@ -1,5 +1,5 @@ -// run-pass -// compile-flags: --cfg fooA --cfg fooB +//@ run-pass +//@ compile-flags: --cfg fooA --cfg fooB // fooA AND !bar diff --git a/tests/ui/cfg/conditional-compile-arch.rs b/tests/ui/cfg/conditional-compile-arch.rs index c6ecf480736..678b32c6a4e 100644 --- a/tests/ui/cfg/conditional-compile-arch.rs +++ b/tests/ui/cfg/conditional-compile-arch.rs @@ -1,5 +1,5 @@ -// run-pass -// pretty-expanded FIXME #23616 +//@ run-pass +//@ pretty-expanded FIXME #23616 #[cfg(target_arch = "x86")] pub fn main() { } diff --git a/tests/ui/cfg/conditional-compile.rs b/tests/ui/cfg/conditional-compile.rs index 69f4de43186..f39663adda2 100644 --- a/tests/ui/cfg/conditional-compile.rs +++ b/tests/ui/cfg/conditional-compile.rs @@ -1,4 +1,4 @@ -// run-pass +//@ run-pass #![allow(dead_code)] #![allow(non_upper_case_globals)] #![allow(non_camel_case_types)] diff --git a/tests/ui/cfg/crt-static-off-works.rs b/tests/ui/cfg/crt-static-off-works.rs index 911467ee54e..1d77dba24b1 100644 --- a/tests/ui/cfg/crt-static-off-works.rs +++ b/tests/ui/cfg/crt-static-off-works.rs @@ -1,8 +1,8 @@ -// run-pass +//@ run-pass #![allow(stable_features)] -// compile-flags:-C target-feature=-crt-static -Z unstable-options -// ignore-musl - requires changing the linker which is hard +//@ compile-flags:-C target-feature=-crt-static -Z unstable-options +//@ ignore-musl - requires changing the linker which is hard #![feature(cfg_target_feature)] diff --git a/tests/ui/cfg/crt-static-on-works.rs b/tests/ui/cfg/crt-static-on-works.rs index f89d1edd658..13b7d4bc519 100644 --- a/tests/ui/cfg/crt-static-on-works.rs +++ b/tests/ui/cfg/crt-static-on-works.rs @@ -1,6 +1,6 @@ -// run-pass -// compile-flags:-C target-feature=+crt-static -// only-msvc +//@ run-pass +//@ compile-flags:-C target-feature=+crt-static +//@ only-msvc #[cfg(target_feature = "crt-static")] fn main() {} diff --git a/tests/ui/cfg/diagnostics-cross-crate.rs b/tests/ui/cfg/diagnostics-cross-crate.rs index ad4e47b7b2e..77dd91d6c28 100644 --- a/tests/ui/cfg/diagnostics-cross-crate.rs +++ b/tests/ui/cfg/diagnostics-cross-crate.rs @@ -1,4 +1,4 @@ -// aux-build:cfged_out.rs +//@ aux-build:cfged_out.rs extern crate cfged_out; diff --git a/tests/ui/cfg/expanded-cfg.rs b/tests/ui/cfg/expanded-cfg.rs index baa161af76a..75860146e74 100644 --- a/tests/ui/cfg/expanded-cfg.rs +++ b/tests/ui/cfg/expanded-cfg.rs @@ -1,4 +1,4 @@ -// check-pass +//@ check-pass macro_rules! mac { {} => { diff --git a/tests/ui/cfg/future-compat-crate-attributes-using-cfg_attr.rs b/tests/ui/cfg/future-compat-crate-attributes-using-cfg_attr.rs index 1f23dadc432..96e326e02ad 100644 --- a/tests/ui/cfg/future-compat-crate-attributes-using-cfg_attr.rs +++ b/tests/ui/cfg/future-compat-crate-attributes-using-cfg_attr.rs @@ -1,5 +1,5 @@ -// check-fail -// compile-flags:--cfg foo +//@ check-fail +//@ compile-flags:--cfg foo #![cfg_attr(foo, crate_type="bin")] //~^ERROR `crate_type` within diff --git a/tests/ui/cfguard-run.rs b/tests/ui/cfguard-run.rs index 3c4f9a1f5ee..52ad3e3cc04 100644 --- a/tests/ui/cfguard-run.rs +++ b/tests/ui/cfguard-run.rs @@ -1,5 +1,5 @@ -// run-pass -// compile-flags: -C control-flow-guard +//@ run-pass +//@ compile-flags: -C control-flow-guard pub fn main() { println!("hello, world"); diff --git a/tests/ui/char.rs b/tests/ui/char.rs index cfb7a37af01..a7842f16fa7 100644 --- a/tests/ui/char.rs +++ b/tests/ui/char.rs @@ -1,4 +1,4 @@ -// run-pass +//@ run-pass pub fn main() { let c: char = 'x'; diff --git a/tests/ui/check-cfg/allow-at-crate-level.rs b/tests/ui/check-cfg/allow-at-crate-level.rs index 1629d2e0b67..48258b97ccc 100644 --- a/tests/ui/check-cfg/allow-at-crate-level.rs +++ b/tests/ui/check-cfg/allow-at-crate-level.rs @@ -1,7 +1,7 @@ // This test check that #![allow(unexpected_cfgs)] works with --cfg // -// check-pass -// compile-flags: --cfg=unexpected --check-cfg=cfg() -Z unstable-options +//@ check-pass +//@ compile-flags: --cfg=unexpected --check-cfg=cfg() -Z unstable-options #![allow(unexpected_cfgs)] diff --git a/tests/ui/check-cfg/allow-macro-cfg.rs b/tests/ui/check-cfg/allow-macro-cfg.rs index ea26355aca8..d3999af7766 100644 --- a/tests/ui/check-cfg/allow-macro-cfg.rs +++ b/tests/ui/check-cfg/allow-macro-cfg.rs @@ -1,7 +1,7 @@ // This test check that local #[allow(unexpected_cfgs)] works // -// check-pass -// compile-flags: --check-cfg=cfg() -Z unstable-options +//@ check-pass +//@ compile-flags: --check-cfg=cfg() -Z unstable-options #[allow(unexpected_cfgs)] fn foo() { diff --git a/tests/ui/check-cfg/allow-same-level.rs b/tests/ui/check-cfg/allow-same-level.rs index 29491e0b39e..231ad522c8d 100644 --- a/tests/ui/check-cfg/allow-same-level.rs +++ b/tests/ui/check-cfg/allow-same-level.rs @@ -1,7 +1,7 @@ // This test check that #[allow(unexpected_cfgs)] doesn't work if put on the same level // -// check-pass -// compile-flags: --check-cfg=cfg() -Z unstable-options +//@ check-pass +//@ compile-flags: --check-cfg=cfg() -Z unstable-options #[allow(unexpected_cfgs)] #[cfg(FALSE)] diff --git a/tests/ui/check-cfg/allow-top-level.rs b/tests/ui/check-cfg/allow-top-level.rs index df06f655d9a..c77a0c7c97b 100644 --- a/tests/ui/check-cfg/allow-top-level.rs +++ b/tests/ui/check-cfg/allow-top-level.rs @@ -1,7 +1,7 @@ // This test check that a top-level #![allow(unexpected_cfgs)] works // -// check-pass -// compile-flags: --check-cfg=cfg() -Z unstable-options +//@ check-pass +//@ compile-flags: --check-cfg=cfg() -Z unstable-options #![allow(unexpected_cfgs)] diff --git a/tests/ui/check-cfg/allow-upper-level.rs b/tests/ui/check-cfg/allow-upper-level.rs index bd5c97815f2..97339a887bf 100644 --- a/tests/ui/check-cfg/allow-upper-level.rs +++ b/tests/ui/check-cfg/allow-upper-level.rs @@ -1,7 +1,7 @@ // This test check that #[allow(unexpected_cfgs)] work if put on an upper level // -// check-pass -// compile-flags: --check-cfg=cfg() -Z unstable-options +//@ check-pass +//@ compile-flags: --check-cfg=cfg() -Z unstable-options #[allow(unexpected_cfgs)] mod aa { diff --git a/tests/ui/check-cfg/cargo-feature.rs b/tests/ui/check-cfg/cargo-feature.rs index 8542174d0c0..a91068ca05a 100644 --- a/tests/ui/check-cfg/cargo-feature.rs +++ b/tests/ui/check-cfg/cargo-feature.rs @@ -2,14 +2,14 @@ // suggest adding some in the Cargo.toml instead of vomitting a // list of all the expected names // -// check-pass -// revisions: some none -// rustc-env:CARGO=/usr/bin/cargo -// compile-flags: -Z unstable-options -// [none]compile-flags: --check-cfg=cfg(feature,values()) -// [some]compile-flags: --check-cfg=cfg(feature,values("bitcode")) -// [some]compile-flags: --check-cfg=cfg(CONFIG_NVME,values("y")) -// [none]error-pattern:Cargo.toml +//@ check-pass +//@ revisions: some none +//@ rustc-env:CARGO=/usr/bin/cargo +//@ compile-flags: -Z unstable-options +//@ [none]compile-flags: --check-cfg=cfg(feature,values()) +//@ [some]compile-flags: --check-cfg=cfg(feature,values("bitcode")) +//@ [some]compile-flags: --check-cfg=cfg(CONFIG_NVME,values("y")) +//@ [none]error-pattern:Cargo.toml #[cfg(feature = "serde")] //~^ WARNING unexpected `cfg` condition value diff --git a/tests/ui/check-cfg/cfg-value-for-cfg-name-duplicate.rs b/tests/ui/check-cfg/cfg-value-for-cfg-name-duplicate.rs index a6e68e1b710..35c5f2ae31c 100644 --- a/tests/ui/check-cfg/cfg-value-for-cfg-name-duplicate.rs +++ b/tests/ui/check-cfg/cfg-value-for-cfg-name-duplicate.rs @@ -1,9 +1,9 @@ // #120427 // This test checks we won't suggest more than 3 span suggestions for cfg names // -// check-pass -// compile-flags: -Z unstable-options -// compile-flags: --check-cfg=cfg(foo,values("value")) --check-cfg=cfg(bar,values("value")) --check-cfg=cfg(bee,values("value")) --check-cfg=cfg(cow,values("value")) +//@ check-pass +//@ compile-flags: -Z unstable-options +//@ compile-flags: --check-cfg=cfg(foo,values("value")) --check-cfg=cfg(bar,values("value")) --check-cfg=cfg(bee,values("value")) --check-cfg=cfg(cow,values("value")) #[cfg(value)] //~^ WARNING unexpected `cfg` condition name: `value` diff --git a/tests/ui/check-cfg/cfg-value-for-cfg-name-multiple.rs b/tests/ui/check-cfg/cfg-value-for-cfg-name-multiple.rs index edde6244ed1..6caedbe719e 100644 --- a/tests/ui/check-cfg/cfg-value-for-cfg-name-multiple.rs +++ b/tests/ui/check-cfg/cfg-value-for-cfg-name-multiple.rs @@ -1,9 +1,9 @@ // #120427 // This test checks that when a single cfg has a value for user's specified name // -// check-pass -// compile-flags: -Z unstable-options -// compile-flags: --check-cfg=cfg(foo,values("my_value")) --check-cfg=cfg(bar,values("my_value")) +//@ check-pass +//@ compile-flags: -Z unstable-options +//@ compile-flags: --check-cfg=cfg(foo,values("my_value")) --check-cfg=cfg(bar,values("my_value")) #[cfg(my_value)] //~^ WARNING unexpected `cfg` condition name: `my_value` diff --git a/tests/ui/check-cfg/cfg-value-for-cfg-name.rs b/tests/ui/check-cfg/cfg-value-for-cfg-name.rs index 7a0c345b7ca..eade190a75c 100644 --- a/tests/ui/check-cfg/cfg-value-for-cfg-name.rs +++ b/tests/ui/check-cfg/cfg-value-for-cfg-name.rs @@ -2,9 +2,9 @@ // This test checks that when a single cfg has a value for user's specified name // suggest to use `#[cfg(target_os = "linux")]` instead of `#[cfg(linux)]` // -// check-pass -// compile-flags: -Z unstable-options -// compile-flags: --check-cfg=cfg() +//@ check-pass +//@ compile-flags: -Z unstable-options +//@ compile-flags: --check-cfg=cfg() #[cfg(linux)] //~^ WARNING unexpected `cfg` condition name: `linux` diff --git a/tests/ui/check-cfg/compact-names.rs b/tests/ui/check-cfg/compact-names.rs index 4f7168255cf..6592d2acb82 100644 --- a/tests/ui/check-cfg/compact-names.rs +++ b/tests/ui/check-cfg/compact-names.rs @@ -1,7 +1,7 @@ // This test check that we correctly emit an warning for compact cfg // -// check-pass -// compile-flags: --check-cfg=cfg() -Z unstable-options +//@ check-pass +//@ compile-flags: --check-cfg=cfg() -Z unstable-options #![feature(cfg_target_compact)] diff --git a/tests/ui/check-cfg/compact-values.rs b/tests/ui/check-cfg/compact-values.rs index 80cf75d2770..8df2bf55264 100644 --- a/tests/ui/check-cfg/compact-values.rs +++ b/tests/ui/check-cfg/compact-values.rs @@ -1,7 +1,7 @@ // This test check that we correctly emit an warning for compact cfg // -// check-pass -// compile-flags: --check-cfg=cfg() -Z unstable-options +//@ check-pass +//@ compile-flags: --check-cfg=cfg() -Z unstable-options #![feature(cfg_target_compact)] diff --git a/tests/ui/check-cfg/concat-values.rs b/tests/ui/check-cfg/concat-values.rs index ad922f8c908..0b2c1949ca3 100644 --- a/tests/ui/check-cfg/concat-values.rs +++ b/tests/ui/check-cfg/concat-values.rs @@ -1,7 +1,7 @@ -// check-pass -// compile-flags: -Z unstable-options -// compile-flags: --check-cfg=cfg(my_cfg,values("foo")) --check-cfg=cfg(my_cfg,values("bar")) -// compile-flags: --check-cfg=cfg(my_cfg,values()) +//@ check-pass +//@ compile-flags: -Z unstable-options +//@ compile-flags: --check-cfg=cfg(my_cfg,values("foo")) --check-cfg=cfg(my_cfg,values("bar")) +//@ compile-flags: --check-cfg=cfg(my_cfg,values()) #[cfg(my_cfg)] //~^ WARNING unexpected `cfg` condition value diff --git a/tests/ui/check-cfg/diagnotics.rs b/tests/ui/check-cfg/diagnotics.rs index 33073f05f69..54138d15890 100644 --- a/tests/ui/check-cfg/diagnotics.rs +++ b/tests/ui/check-cfg/diagnotics.rs @@ -1,8 +1,8 @@ -// check-pass -// revisions: cargo rustc -// [rustc]unset-rustc-env:CARGO -// [cargo]rustc-env:CARGO=/usr/bin/cargo -// compile-flags: --check-cfg=cfg(feature,values("foo")) --check-cfg=cfg(no_values) -Z unstable-options +//@ check-pass +//@ revisions: cargo rustc +//@ [rustc]unset-rustc-env:CARGO +//@ [cargo]rustc-env:CARGO=/usr/bin/cargo +//@ compile-flags: --check-cfg=cfg(feature,values("foo")) --check-cfg=cfg(no_values) -Z unstable-options #[cfg(featur)] //~^ WARNING unexpected `cfg` condition name diff --git a/tests/ui/check-cfg/empty-values.rs b/tests/ui/check-cfg/empty-values.rs index 7e6ba6ae84a..07462951e1b 100644 --- a/tests/ui/check-cfg/empty-values.rs +++ b/tests/ui/check-cfg/empty-values.rs @@ -1,7 +1,7 @@ // Check that we detect unexpected value when none are allowed // -// check-pass -// compile-flags: --check-cfg=cfg(foo,values()) -Zunstable-options +//@ check-pass +//@ compile-flags: --check-cfg=cfg(foo,values()) -Zunstable-options #[cfg(foo = "foo")] //~^ WARNING unexpected `cfg` condition value diff --git a/tests/ui/check-cfg/exhaustive-names-values.rs b/tests/ui/check-cfg/exhaustive-names-values.rs index 956992a1e77..d554c19ef25 100644 --- a/tests/ui/check-cfg/exhaustive-names-values.rs +++ b/tests/ui/check-cfg/exhaustive-names-values.rs @@ -1,11 +1,11 @@ // Check warning for unexpected cfg in the code. // -// check-pass -// revisions: empty_cfg feature full -// compile-flags: -Z unstable-options -// [empty_cfg]compile-flags: --check-cfg=cfg() -// [feature]compile-flags: --check-cfg=cfg(feature,values("std")) -// [full]compile-flags: --check-cfg=cfg(feature,values("std")) --check-cfg=cfg() +//@ check-pass +//@ revisions: empty_cfg feature full +//@ compile-flags: -Z unstable-options +//@ [empty_cfg]compile-flags: --check-cfg=cfg() +//@ [feature]compile-flags: --check-cfg=cfg(feature,values("std")) +//@ [full]compile-flags: --check-cfg=cfg(feature,values("std")) --check-cfg=cfg() #[cfg(unknown_key = "value")] //~^ WARNING unexpected `cfg` condition name diff --git a/tests/ui/check-cfg/exhaustive-names.rs b/tests/ui/check-cfg/exhaustive-names.rs index 80668020699..edfb3705a7d 100644 --- a/tests/ui/check-cfg/exhaustive-names.rs +++ b/tests/ui/check-cfg/exhaustive-names.rs @@ -1,7 +1,7 @@ // Check warning for unexpected cfg // -// check-pass -// compile-flags: --check-cfg=cfg() -Z unstable-options +//@ check-pass +//@ compile-flags: --check-cfg=cfg() -Z unstable-options #[cfg(unknown_key = "value")] //~^ WARNING unexpected `cfg` condition name diff --git a/tests/ui/check-cfg/exhaustive-values.rs b/tests/ui/check-cfg/exhaustive-values.rs index 430d3b89e7a..5e65caa6aea 100644 --- a/tests/ui/check-cfg/exhaustive-values.rs +++ b/tests/ui/check-cfg/exhaustive-values.rs @@ -1,9 +1,9 @@ // Check warning for unexpected cfg value // -// check-pass -// revisions: empty_cfg without_names -// [empty_cfg]compile-flags: --check-cfg=cfg() -Z unstable-options -// [without_names]compile-flags: --check-cfg=cfg(any()) -Z unstable-options +//@ check-pass +//@ revisions: empty_cfg without_names +//@ [empty_cfg]compile-flags: --check-cfg=cfg() -Z unstable-options +//@ [without_names]compile-flags: --check-cfg=cfg(any()) -Z unstable-options #[cfg(test = "value")] //~^ WARNING unexpected `cfg` condition value diff --git a/tests/ui/check-cfg/invalid-arguments.rs b/tests/ui/check-cfg/invalid-arguments.rs index 60ba6315558..bdcc202443b 100644 --- a/tests/ui/check-cfg/invalid-arguments.rs +++ b/tests/ui/check-cfg/invalid-arguments.rs @@ -1,36 +1,36 @@ // Check that invalid --check-cfg are rejected // -// check-fail -// revisions: anything_else -// revisions: string_for_name_1 string_for_name_2 multiple_any multiple_values -// revisions: multiple_values_any not_empty_any not_empty_values_any -// revisions: values_any_missing_values values_any_before_ident ident_in_values_1 -// revisions: ident_in_values_2 unknown_meta_item_1 unknown_meta_item_2 unknown_meta_item_3 -// revisions: mixed_values_any mixed_any any_values giberich unterminated -// revisions: none_not_empty cfg_none +//@ check-fail +//@ revisions: anything_else +//@ revisions: string_for_name_1 string_for_name_2 multiple_any multiple_values +//@ revisions: multiple_values_any not_empty_any not_empty_values_any +//@ revisions: values_any_missing_values values_any_before_ident ident_in_values_1 +//@ revisions: ident_in_values_2 unknown_meta_item_1 unknown_meta_item_2 unknown_meta_item_3 +//@ revisions: mixed_values_any mixed_any any_values giberich unterminated +//@ revisions: none_not_empty cfg_none // -// compile-flags: -Z unstable-options -// [anything_else]compile-flags: --check-cfg=anything_else(...) -// [string_for_name_1]compile-flags: --check-cfg=cfg("NOT_IDENT") -// [string_for_name_2]compile-flags: --check-cfg=cfg(foo,"NOT_IDENT",bar) -// [multiple_any]compile-flags: --check-cfg=cfg(any(),any()) -// [multiple_values]compile-flags: --check-cfg=cfg(foo,values(),values()) -// [multiple_values_any]compile-flags: --check-cfg=cfg(foo,values(any(),any())) -// [not_empty_any]compile-flags: --check-cfg=cfg(any(foo)) -// [not_empty_values_any]compile-flags: --check-cfg=cfg(foo,values(any(bar))) -// [values_any_missing_values]compile-flags: --check-cfg=cfg(foo,any()) -// [values_any_before_ident]compile-flags: --check-cfg=cfg(values(any()),foo) -// [ident_in_values_1]compile-flags: --check-cfg=cfg(foo,values(bar)) -// [ident_in_values_2]compile-flags: --check-cfg=cfg(foo,values("bar",bar,"bar")) -// [unknown_meta_item_1]compile-flags: --check-cfg=abc() -// [unknown_meta_item_2]compile-flags: --check-cfg=cfg(foo,test()) -// [unknown_meta_item_3]compile-flags: --check-cfg=cfg(foo,values(test())) -// [none_not_empty]compile-flags: --check-cfg=cfg(foo,values(none("test"))) -// [mixed_values_any]compile-flags: --check-cfg=cfg(foo,values("bar",any())) -// [mixed_any]compile-flags: --check-cfg=cfg(any(),values(any())) -// [any_values]compile-flags: --check-cfg=cfg(any(),values()) -// [cfg_none]compile-flags: --check-cfg=cfg(none()) -// [giberich]compile-flags: --check-cfg=cfg(...) -// [unterminated]compile-flags: --check-cfg=cfg( +//@ compile-flags: -Z unstable-options +//@ [anything_else]compile-flags: --check-cfg=anything_else(...) +//@ [string_for_name_1]compile-flags: --check-cfg=cfg("NOT_IDENT") +//@ [string_for_name_2]compile-flags: --check-cfg=cfg(foo,"NOT_IDENT",bar) +//@ [multiple_any]compile-flags: --check-cfg=cfg(any(),any()) +//@ [multiple_values]compile-flags: --check-cfg=cfg(foo,values(),values()) +//@ [multiple_values_any]compile-flags: --check-cfg=cfg(foo,values(any(),any())) +//@ [not_empty_any]compile-flags: --check-cfg=cfg(any(foo)) +//@ [not_empty_values_any]compile-flags: --check-cfg=cfg(foo,values(any(bar))) +//@ [values_any_missing_values]compile-flags: --check-cfg=cfg(foo,any()) +//@ [values_any_before_ident]compile-flags: --check-cfg=cfg(values(any()),foo) +//@ [ident_in_values_1]compile-flags: --check-cfg=cfg(foo,values(bar)) +//@ [ident_in_values_2]compile-flags: --check-cfg=cfg(foo,values("bar",bar,"bar")) +//@ [unknown_meta_item_1]compile-flags: --check-cfg=abc() +//@ [unknown_meta_item_2]compile-flags: --check-cfg=cfg(foo,test()) +//@ [unknown_meta_item_3]compile-flags: --check-cfg=cfg(foo,values(test())) +//@ [none_not_empty]compile-flags: --check-cfg=cfg(foo,values(none("test"))) +//@ [mixed_values_any]compile-flags: --check-cfg=cfg(foo,values("bar",any())) +//@ [mixed_any]compile-flags: --check-cfg=cfg(any(),values(any())) +//@ [any_values]compile-flags: --check-cfg=cfg(any(),values()) +//@ [cfg_none]compile-flags: --check-cfg=cfg(none()) +//@ [giberich]compile-flags: --check-cfg=cfg(...) +//@ [unterminated]compile-flags: --check-cfg=cfg( fn main() {} diff --git a/tests/ui/check-cfg/mix.rs b/tests/ui/check-cfg/mix.rs index a6c3efee611..ba30bc1e69b 100644 --- a/tests/ui/check-cfg/mix.rs +++ b/tests/ui/check-cfg/mix.rs @@ -2,9 +2,9 @@ // and that no implicit cfgs is added from --cfg while also testing that // we correctly lint on the `cfg!` macro and `cfg_attr` attribute. // -// check-pass -// compile-flags: --cfg feature="bar" --cfg unknown_name -Z unstable-options -// compile-flags: --check-cfg=cfg(feature,values("foo")) +//@ check-pass +//@ compile-flags: --cfg feature="bar" --cfg unknown_name -Z unstable-options +//@ compile-flags: --check-cfg=cfg(feature,values("foo")) #[cfg(windows)] fn do_windows_stuff() {} diff --git a/tests/ui/check-cfg/no-expected-values.rs b/tests/ui/check-cfg/no-expected-values.rs index 4f8481315df..a80f9ec9776 100644 --- a/tests/ui/check-cfg/no-expected-values.rs +++ b/tests/ui/check-cfg/no-expected-values.rs @@ -1,12 +1,12 @@ // Check that we detect unexpected value when none are allowed // -// check-pass -// revisions: simple mixed empty -// compile-flags: -Z unstable-options -// compile-flags: --check-cfg=cfg(values,simple,mixed,empty) -// [simple]compile-flags: --check-cfg=cfg(test) --check-cfg=cfg(feature) -// [mixed]compile-flags: --check-cfg=cfg(test,feature) -// [empty]compile-flags: --check-cfg=cfg(test,feature,values(none())) +//@ check-pass +//@ revisions: simple mixed empty +//@ compile-flags: -Z unstable-options +//@ compile-flags: --check-cfg=cfg(values,simple,mixed,empty) +//@ [simple]compile-flags: --check-cfg=cfg(test) --check-cfg=cfg(feature) +//@ [mixed]compile-flags: --check-cfg=cfg(test,feature) +//@ [empty]compile-flags: --check-cfg=cfg(test,feature,values(none())) #[cfg(feature = "foo")] //~^ WARNING unexpected `cfg` condition value diff --git a/tests/ui/check-cfg/order-independant.rs b/tests/ui/check-cfg/order-independant.rs index 86e3cfa1d9b..9ac96d0b15b 100644 --- a/tests/ui/check-cfg/order-independant.rs +++ b/tests/ui/check-cfg/order-independant.rs @@ -1,11 +1,11 @@ -// check-pass +//@ check-pass // -// revisions: values_before values_after -// compile-flags: -Z unstable-options -// compile-flags: --check-cfg=cfg(values_before,values_after) +//@ revisions: values_before values_after +//@ compile-flags: -Z unstable-options +//@ compile-flags: --check-cfg=cfg(values_before,values_after) // -// [values_before]compile-flags: --check-cfg=cfg(a,values("b")) --check-cfg=cfg(a) -// [values_after]compile-flags: --check-cfg=cfg(a) --check-cfg=cfg(a,values("b")) +//@ [values_before]compile-flags: --check-cfg=cfg(a,values("b")) --check-cfg=cfg(a) +//@ [values_after]compile-flags: --check-cfg=cfg(a) --check-cfg=cfg(a,values("b")) #[cfg(a)] fn my_cfg() {} diff --git a/tests/ui/check-cfg/stmt-no-ice.rs b/tests/ui/check-cfg/stmt-no-ice.rs index 383e830a1b2..8a447ade068 100644 --- a/tests/ui/check-cfg/stmt-no-ice.rs +++ b/tests/ui/check-cfg/stmt-no-ice.rs @@ -1,7 +1,7 @@ // This test checks that there is no ICE with this code // -// check-pass -// compile-flags:--check-cfg=cfg() -Z unstable-options +//@ check-pass +//@ compile-flags:--check-cfg=cfg() -Z unstable-options fn main() { #[cfg(crossbeam_loom)] diff --git a/tests/ui/check-cfg/unexpected-cfg-name.rs b/tests/ui/check-cfg/unexpected-cfg-name.rs index 9fc0e28a8fe..5ea9f560ee4 100644 --- a/tests/ui/check-cfg/unexpected-cfg-name.rs +++ b/tests/ui/check-cfg/unexpected-cfg-name.rs @@ -1,7 +1,7 @@ // Check warning for unexpected configuration name // -// check-pass -// compile-flags: --check-cfg=cfg() -Z unstable-options +//@ check-pass +//@ compile-flags: --check-cfg=cfg() -Z unstable-options #[cfg(widnows)] //~^ WARNING unexpected `cfg` condition name diff --git a/tests/ui/check-cfg/unexpected-cfg-value.rs b/tests/ui/check-cfg/unexpected-cfg-value.rs index 54dce0f0de4..a4a10e503be 100644 --- a/tests/ui/check-cfg/unexpected-cfg-value.rs +++ b/tests/ui/check-cfg/unexpected-cfg-value.rs @@ -1,8 +1,8 @@ // Check for unexpected configuration value in the code. // -// check-pass -// compile-flags: --cfg=feature="rand" -Z unstable-options -// compile-flags: --check-cfg=cfg(feature,values("serde","full")) +//@ check-pass +//@ compile-flags: --cfg=feature="rand" -Z unstable-options +//@ compile-flags: --check-cfg=cfg(feature,values("serde","full")) #[cfg(feature = "sedre")] //~^ WARNING unexpected `cfg` condition value diff --git a/tests/ui/check-cfg/unknown-values.rs b/tests/ui/check-cfg/unknown-values.rs index c082a2f25ac..61ea82871b2 100644 --- a/tests/ui/check-cfg/unknown-values.rs +++ b/tests/ui/check-cfg/unknown-values.rs @@ -1,12 +1,12 @@ // Check that no warning is emitted for unknown cfg value // -// check-pass -// revisions: simple mixed with_values -// compile-flags: -Z unstable-options -// compile-flags: --check-cfg=cfg(simple,mixed,with_values) -// [simple]compile-flags: --check-cfg=cfg(foo,values(any())) -// [mixed]compile-flags: --check-cfg=cfg(foo) --check-cfg=cfg(foo,values(any())) -// [with_values]compile-flags:--check-cfg=cfg(foo,values(any())) --check-cfg=cfg(foo,values("aa")) +//@ check-pass +//@ revisions: simple mixed with_values +//@ compile-flags: -Z unstable-options +//@ compile-flags: --check-cfg=cfg(simple,mixed,with_values) +//@ [simple]compile-flags: --check-cfg=cfg(foo,values(any())) +//@ [mixed]compile-flags: --check-cfg=cfg(foo) --check-cfg=cfg(foo,values(any())) +//@ [with_values]compile-flags:--check-cfg=cfg(foo,values(any())) --check-cfg=cfg(foo,values("aa")) #[cfg(foo = "value")] pub fn f() {} diff --git a/tests/ui/check-cfg/values-none.rs b/tests/ui/check-cfg/values-none.rs index 957ed43a2e2..6a68020e418 100644 --- a/tests/ui/check-cfg/values-none.rs +++ b/tests/ui/check-cfg/values-none.rs @@ -1,12 +1,12 @@ -// check-pass +//@ check-pass // -// revisions: explicit implicit -// compile-flags: -Zunstable-options -// [explicit]compile-flags: --check-cfg=cfg(foo,values(none())) -// [implicit]compile-flags: --check-cfg=cfg(foo) -// [simple] compile-flags: --check-cfg=cfg(foo,values(none(),"too")) -// [concat_1]compile-flags: --check-cfg=cfg(foo) --check-cfg=cfg(foo,values("too")) -// [concat_2]compile-flags: --check-cfg=cfg(foo,values("too")) --check-cfg=cfg(foo) +//@ revisions: explicit implicit +//@ compile-flags: -Zunstable-options +//@ [explicit]compile-flags: --check-cfg=cfg(foo,values(none())) +//@ [implicit]compile-flags: --check-cfg=cfg(foo) +//@ [simple] compile-flags: --check-cfg=cfg(foo,values(none(),"too")) +//@ [concat_1]compile-flags: --check-cfg=cfg(foo) --check-cfg=cfg(foo,values("too")) +//@ [concat_2]compile-flags: --check-cfg=cfg(foo,values("too")) --check-cfg=cfg(foo) #[cfg(foo = "too")] //[explicit]~^ WARNING unexpected `cfg` condition value diff --git a/tests/ui/check-cfg/values-target-json.rs b/tests/ui/check-cfg/values-target-json.rs index 47ac79e0dbf..afe6e0aaffd 100644 --- a/tests/ui/check-cfg/values-target-json.rs +++ b/tests/ui/check-cfg/values-target-json.rs @@ -1,8 +1,8 @@ // This test checks that we don't lint values defined by a custom target (target json) // -// check-pass -// needs-llvm-components: x86 -// compile-flags: --crate-type=lib --check-cfg=cfg() --target={{src-base}}/check-cfg/my-awesome-platform.json -Z unstable-options +//@ check-pass +//@ needs-llvm-components: x86 +//@ compile-flags: --crate-type=lib --check-cfg=cfg() --target={{src-base}}/check-cfg/my-awesome-platform.json -Z unstable-options #![feature(lang_items, no_core, auto_traits)] #![no_core] diff --git a/tests/ui/check-cfg/well-known-names.rs b/tests/ui/check-cfg/well-known-names.rs index 32c14703d25..a0feee4225a 100644 --- a/tests/ui/check-cfg/well-known-names.rs +++ b/tests/ui/check-cfg/well-known-names.rs @@ -1,7 +1,7 @@ // This test checks that we lint on non well known names and that we don't lint on well known names // -// check-pass -// compile-flags: --check-cfg=cfg() -Z unstable-options +//@ check-pass +//@ compile-flags: --check-cfg=cfg() -Z unstable-options #[cfg(target_oz = "linux")] //~^ WARNING unexpected `cfg` condition name diff --git a/tests/ui/check-cfg/well-known-values.rs b/tests/ui/check-cfg/well-known-values.rs index 34af54ccf4a..0c55e35a993 100644 --- a/tests/ui/check-cfg/well-known-values.rs +++ b/tests/ui/check-cfg/well-known-values.rs @@ -4,8 +4,8 @@ // This test also serve as an "anti-regression" for the well known // values since the suggestion shows them. // -// check-pass -// compile-flags: --check-cfg=cfg() -Z unstable-options +//@ check-pass +//@ compile-flags: --check-cfg=cfg() -Z unstable-options #![feature(cfg_overflow_checks)] #![feature(cfg_relocation_model)] diff --git a/tests/ui/check-static-recursion-foreign.rs b/tests/ui/check-static-recursion-foreign.rs index 3072deb6c5a..418c149dcc4 100644 --- a/tests/ui/check-static-recursion-foreign.rs +++ b/tests/ui/check-static-recursion-foreign.rs @@ -1,11 +1,11 @@ -// run-pass +//@ run-pass // Static recursion check shouldn't fail when given a foreign item (#18279) -// aux-build:check_static_recursion_foreign_helper.rs -// ignore-wasm32-bare no libc to test ffi with +//@ aux-build:check_static_recursion_foreign_helper.rs +//@ ignore-wasm32-bare no libc to test ffi with -// pretty-expanded FIXME #23616 +//@ pretty-expanded FIXME #23616 #![feature(rustc_private)] diff --git a/tests/ui/cleanup-rvalue-for-scope.rs b/tests/ui/cleanup-rvalue-for-scope.rs index 38a41f3b8d7..8f5ee8723fd 100644 --- a/tests/ui/cleanup-rvalue-for-scope.rs +++ b/tests/ui/cleanup-rvalue-for-scope.rs @@ -1,4 +1,4 @@ -// run-pass +//@ run-pass #![allow(non_snake_case)] #![allow(dead_code)] diff --git a/tests/ui/cleanup-rvalue-scopes.rs b/tests/ui/cleanup-rvalue-scopes.rs index 56340e515b9..09ceda065b9 100644 --- a/tests/ui/cleanup-rvalue-scopes.rs +++ b/tests/ui/cleanup-rvalue-scopes.rs @@ -1,4 +1,4 @@ -// run-pass +//@ run-pass #![allow(unused_braces)] #![allow(non_snake_case)] #![allow(unused_variables)] diff --git a/tests/ui/cleanup-rvalue-temp-during-incomplete-alloc.rs b/tests/ui/cleanup-rvalue-temp-during-incomplete-alloc.rs index 6cd3781b760..80c5a8fe099 100644 --- a/tests/ui/cleanup-rvalue-temp-during-incomplete-alloc.rs +++ b/tests/ui/cleanup-rvalue-temp-during-incomplete-alloc.rs @@ -1,5 +1,5 @@ -// run-pass -// needs-unwind +//@ run-pass +//@ needs-unwind #![allow(unused_must_use)] #![allow(dead_code)] @@ -20,7 +20,7 @@ // It's unclear how likely such a bug is to recur, but it seems like a // scenario worth testing. -// ignore-emscripten no threads support +//@ ignore-emscripten no threads support use std::thread; diff --git a/tests/ui/cleanup-shortcircuit.rs b/tests/ui/cleanup-shortcircuit.rs index fe867ce1fbd..312491fee24 100644 --- a/tests/ui/cleanup-shortcircuit.rs +++ b/tests/ui/cleanup-shortcircuit.rs @@ -1,7 +1,7 @@ -// run-pass +//@ run-pass // Test that cleanups for the RHS of shortcircuiting operators work. -// pretty-expanded FIXME #23616 +//@ pretty-expanded FIXME #23616 #![allow(deref_nullptr)] diff --git a/tests/ui/close-over-big-then-small-data.rs b/tests/ui/close-over-big-then-small-data.rs index 429b21e8b8b..d3cb1db8886 100644 --- a/tests/ui/close-over-big-then-small-data.rs +++ b/tests/ui/close-over-big-then-small-data.rs @@ -1,4 +1,4 @@ -// run-pass +//@ run-pass #![allow(dead_code)] // If we use GEPi rather than GEP_tup_like when diff --git a/tests/ui/closure-expected-type/expect-fn-supply-fn-multiple.rs b/tests/ui/closure-expected-type/expect-fn-supply-fn-multiple.rs index 5f02e642def..f0e20d67fa6 100644 --- a/tests/ui/closure-expected-type/expect-fn-supply-fn-multiple.rs +++ b/tests/ui/closure-expected-type/expect-fn-supply-fn-multiple.rs @@ -1,4 +1,4 @@ -// build-pass (FIXME(62277): could be check-pass?) +//@ build-pass (FIXME(62277): could be check-pass?) #![allow(warnings)] diff --git a/tests/ui/closure-expected-type/expect-infer-var-supply-ty-with-bound-region.rs b/tests/ui/closure-expected-type/expect-infer-var-supply-ty-with-bound-region.rs index 0ee738c2c2f..799dc8bf089 100644 --- a/tests/ui/closure-expected-type/expect-infer-var-supply-ty-with-bound-region.rs +++ b/tests/ui/closure-expected-type/expect-infer-var-supply-ty-with-bound-region.rs @@ -1,4 +1,4 @@ -// build-pass (FIXME(62277): could be check-pass?) +//@ build-pass (FIXME(62277): could be check-pass?) fn with_closure(_: F) where F: FnOnce(A, &u32) diff --git a/tests/ui/closure-expected-type/expect-infer-var-supply-ty-with-free-region.rs b/tests/ui/closure-expected-type/expect-infer-var-supply-ty-with-free-region.rs index 15711da4b0f..e9109ddff1a 100644 --- a/tests/ui/closure-expected-type/expect-infer-var-supply-ty-with-free-region.rs +++ b/tests/ui/closure-expected-type/expect-infer-var-supply-ty-with-free-region.rs @@ -1,4 +1,4 @@ -// build-pass (FIXME(62277): could be check-pass?) +//@ build-pass (FIXME(62277): could be check-pass?) fn with_closure(_: F) where F: FnOnce(A, &u32) diff --git a/tests/ui/closure-expected-type/issue-24421.rs b/tests/ui/closure-expected-type/issue-24421.rs index 2e104b599bd..13fcf77dae6 100644 --- a/tests/ui/closure-expected-type/issue-24421.rs +++ b/tests/ui/closure-expected-type/issue-24421.rs @@ -1,4 +1,4 @@ -// check-pass +//@ check-pass fn test(f: F) {} diff --git a/tests/ui/closures/2229_closure_analysis/array_subslice.rs b/tests/ui/closures/2229_closure_analysis/array_subslice.rs index 5f244ea8936..90efaea967a 100644 --- a/tests/ui/closures/2229_closure_analysis/array_subslice.rs +++ b/tests/ui/closures/2229_closure_analysis/array_subslice.rs @@ -1,5 +1,5 @@ // regression test for #109298 -// edition: 2021 +//@ edition: 2021 pub fn subslice_array(x: [u8; 3]) { let f = || { diff --git a/tests/ui/closures/2229_closure_analysis/arrays-completely-captured.rs b/tests/ui/closures/2229_closure_analysis/arrays-completely-captured.rs index 191cb4c7236..c194cea2e37 100644 --- a/tests/ui/closures/2229_closure_analysis/arrays-completely-captured.rs +++ b/tests/ui/closures/2229_closure_analysis/arrays-completely-captured.rs @@ -1,4 +1,4 @@ -// edition:2021 +//@ edition:2021 #![feature(rustc_attrs)] // Ensure that capture analysis results in arrays being completely captured. diff --git a/tests/ui/closures/2229_closure_analysis/bad-pattern.rs b/tests/ui/closures/2229_closure_analysis/bad-pattern.rs index a7bf9b67d45..ca3540ad20d 100644 --- a/tests/ui/closures/2229_closure_analysis/bad-pattern.rs +++ b/tests/ui/closures/2229_closure_analysis/bad-pattern.rs @@ -1,5 +1,5 @@ // regression test for #108683 -// edition:2021 +//@ edition:2021 enum Refutable { A, diff --git a/tests/ui/closures/2229_closure_analysis/by_value.rs b/tests/ui/closures/2229_closure_analysis/by_value.rs index d3bde3cea63..3fa28a1c6e9 100644 --- a/tests/ui/closures/2229_closure_analysis/by_value.rs +++ b/tests/ui/closures/2229_closure_analysis/by_value.rs @@ -1,4 +1,4 @@ -// edition:2021 +//@ edition:2021 // Test that we handle derferences properly when only some of the captures are being moved with // `capture_disjoint_fields` enabled. diff --git a/tests/ui/closures/2229_closure_analysis/capture-analysis-1.rs b/tests/ui/closures/2229_closure_analysis/capture-analysis-1.rs index 1a800b6b7f2..fa1ddeb0176 100644 --- a/tests/ui/closures/2229_closure_analysis/capture-analysis-1.rs +++ b/tests/ui/closures/2229_closure_analysis/capture-analysis-1.rs @@ -1,4 +1,4 @@ -// edition:2021 +//@ edition:2021 #![feature(rustc_attrs)] diff --git a/tests/ui/closures/2229_closure_analysis/capture-analysis-2.rs b/tests/ui/closures/2229_closure_analysis/capture-analysis-2.rs index 9b1825e9042..eb342b303f9 100644 --- a/tests/ui/closures/2229_closure_analysis/capture-analysis-2.rs +++ b/tests/ui/closures/2229_closure_analysis/capture-analysis-2.rs @@ -1,4 +1,4 @@ -// edition:2021 +//@ edition:2021 #![feature(rustc_attrs)] diff --git a/tests/ui/closures/2229_closure_analysis/capture-analysis-3.rs b/tests/ui/closures/2229_closure_analysis/capture-analysis-3.rs index e9923a81bf6..e1476e415d9 100644 --- a/tests/ui/closures/2229_closure_analysis/capture-analysis-3.rs +++ b/tests/ui/closures/2229_closure_analysis/capture-analysis-3.rs @@ -1,4 +1,4 @@ -// edition:2021 +//@ edition:2021 #![feature(rustc_attrs)] diff --git a/tests/ui/closures/2229_closure_analysis/capture-analysis-4.rs b/tests/ui/closures/2229_closure_analysis/capture-analysis-4.rs index 8c1963455a5..6d53a0ac634 100644 --- a/tests/ui/closures/2229_closure_analysis/capture-analysis-4.rs +++ b/tests/ui/closures/2229_closure_analysis/capture-analysis-4.rs @@ -1,4 +1,4 @@ -// edition:2021 +//@ edition:2021 #![feature(rustc_attrs)] diff --git a/tests/ui/closures/2229_closure_analysis/capture-disjoint-field-struct.rs b/tests/ui/closures/2229_closure_analysis/capture-disjoint-field-struct.rs index 2bf127ed5e8..68703333fa8 100644 --- a/tests/ui/closures/2229_closure_analysis/capture-disjoint-field-struct.rs +++ b/tests/ui/closures/2229_closure_analysis/capture-disjoint-field-struct.rs @@ -1,4 +1,4 @@ -// edition:2021 +//@ edition:2021 #![feature(rustc_attrs)] diff --git a/tests/ui/closures/2229_closure_analysis/capture-disjoint-field-tuple.rs b/tests/ui/closures/2229_closure_analysis/capture-disjoint-field-tuple.rs index bf36de634a9..0c006ffdd72 100644 --- a/tests/ui/closures/2229_closure_analysis/capture-disjoint-field-tuple.rs +++ b/tests/ui/closures/2229_closure_analysis/capture-disjoint-field-tuple.rs @@ -1,4 +1,4 @@ -// edition:2021 +//@ edition:2021 #![feature(rustc_attrs)] diff --git a/tests/ui/closures/2229_closure_analysis/capture-enum-field.rs b/tests/ui/closures/2229_closure_analysis/capture-enum-field.rs index bbe3aa31a98..6e3da1236db 100644 --- a/tests/ui/closures/2229_closure_analysis/capture-enum-field.rs +++ b/tests/ui/closures/2229_closure_analysis/capture-enum-field.rs @@ -1,5 +1,5 @@ -// edition:2021 -// run-pass +//@ edition:2021 +//@ run-pass #[derive(Debug, PartialEq, Eq)] pub enum Color { diff --git a/tests/ui/closures/2229_closure_analysis/capture-enums.rs b/tests/ui/closures/2229_closure_analysis/capture-enums.rs index 47926e27f0c..6f973739e66 100644 --- a/tests/ui/closures/2229_closure_analysis/capture-enums.rs +++ b/tests/ui/closures/2229_closure_analysis/capture-enums.rs @@ -1,4 +1,4 @@ -// edition:2021 +//@ edition:2021 #![feature(rustc_attrs)] diff --git a/tests/ui/closures/2229_closure_analysis/deep-multilevel-struct.rs b/tests/ui/closures/2229_closure_analysis/deep-multilevel-struct.rs index 18697a79cff..5143836ad6b 100644 --- a/tests/ui/closures/2229_closure_analysis/deep-multilevel-struct.rs +++ b/tests/ui/closures/2229_closure_analysis/deep-multilevel-struct.rs @@ -1,4 +1,4 @@ -// edition:2021 +//@ edition:2021 #![feature(rustc_attrs)] #![allow(unused)] diff --git a/tests/ui/closures/2229_closure_analysis/deep-multilevel-tuple.rs b/tests/ui/closures/2229_closure_analysis/deep-multilevel-tuple.rs index 2f899f8c60a..0cb0aeb824e 100644 --- a/tests/ui/closures/2229_closure_analysis/deep-multilevel-tuple.rs +++ b/tests/ui/closures/2229_closure_analysis/deep-multilevel-tuple.rs @@ -1,4 +1,4 @@ -// edition:2021 +//@ edition:2021 #![feature(rustc_attrs)] #![allow(unused)] diff --git a/tests/ui/closures/2229_closure_analysis/destructure_patterns.rs b/tests/ui/closures/2229_closure_analysis/destructure_patterns.rs index a0b949e1351..3106c478d00 100644 --- a/tests/ui/closures/2229_closure_analysis/destructure_patterns.rs +++ b/tests/ui/closures/2229_closure_analysis/destructure_patterns.rs @@ -1,4 +1,4 @@ -// edition:2021 +//@ edition:2021 #![feature(rustc_attrs)] diff --git a/tests/ui/closures/2229_closure_analysis/diagnostics/arrays.rs b/tests/ui/closures/2229_closure_analysis/diagnostics/arrays.rs index f97e60daf43..3abc81e191e 100644 --- a/tests/ui/closures/2229_closure_analysis/diagnostics/arrays.rs +++ b/tests/ui/closures/2229_closure_analysis/diagnostics/arrays.rs @@ -1,4 +1,4 @@ -// edition:2021 +//@ edition:2021 // Test that arrays are completely captured by closures by relying on the borrow check diagnostics diff --git a/tests/ui/closures/2229_closure_analysis/diagnostics/borrowck/borrowck-1.rs b/tests/ui/closures/2229_closure_analysis/diagnostics/borrowck/borrowck-1.rs index 3664d76c203..aae56e72b05 100644 --- a/tests/ui/closures/2229_closure_analysis/diagnostics/borrowck/borrowck-1.rs +++ b/tests/ui/closures/2229_closure_analysis/diagnostics/borrowck/borrowck-1.rs @@ -1,4 +1,4 @@ -// edition:2021 +//@ edition:2021 #[derive(Debug)] struct Point { diff --git a/tests/ui/closures/2229_closure_analysis/diagnostics/borrowck/borrowck-2.rs b/tests/ui/closures/2229_closure_analysis/diagnostics/borrowck/borrowck-2.rs index ae416bab65e..f3ef014b67b 100644 --- a/tests/ui/closures/2229_closure_analysis/diagnostics/borrowck/borrowck-2.rs +++ b/tests/ui/closures/2229_closure_analysis/diagnostics/borrowck/borrowck-2.rs @@ -1,4 +1,4 @@ -// edition:2021 +//@ edition:2021 #[derive(Debug)] struct Point { diff --git a/tests/ui/closures/2229_closure_analysis/diagnostics/borrowck/borrowck-3.rs b/tests/ui/closures/2229_closure_analysis/diagnostics/borrowck/borrowck-3.rs index 00f50c33e1c..d10baf59b07 100644 --- a/tests/ui/closures/2229_closure_analysis/diagnostics/borrowck/borrowck-3.rs +++ b/tests/ui/closures/2229_closure_analysis/diagnostics/borrowck/borrowck-3.rs @@ -1,4 +1,4 @@ -// edition:2021 +//@ edition:2021 #[derive(Debug)] struct Point { diff --git a/tests/ui/closures/2229_closure_analysis/diagnostics/borrowck/borrowck-4.rs b/tests/ui/closures/2229_closure_analysis/diagnostics/borrowck/borrowck-4.rs index 16f7df1b363..c7a37a81848 100644 --- a/tests/ui/closures/2229_closure_analysis/diagnostics/borrowck/borrowck-4.rs +++ b/tests/ui/closures/2229_closure_analysis/diagnostics/borrowck/borrowck-4.rs @@ -1,4 +1,4 @@ -// edition:2021 +//@ edition:2021 #[derive(Debug)] struct Point { diff --git a/tests/ui/closures/2229_closure_analysis/diagnostics/borrowck/borrowck-closures-mut-and-imm.rs b/tests/ui/closures/2229_closure_analysis/diagnostics/borrowck/borrowck-closures-mut-and-imm.rs index 5ff7b1242db..8db7742174c 100644 --- a/tests/ui/closures/2229_closure_analysis/diagnostics/borrowck/borrowck-closures-mut-and-imm.rs +++ b/tests/ui/closures/2229_closure_analysis/diagnostics/borrowck/borrowck-closures-mut-and-imm.rs @@ -1,4 +1,4 @@ -// edition:2021 +//@ edition:2021 diff --git a/tests/ui/closures/2229_closure_analysis/diagnostics/box.rs b/tests/ui/closures/2229_closure_analysis/diagnostics/box.rs index a110fa4e2cb..746e4cb1709 100644 --- a/tests/ui/closures/2229_closure_analysis/diagnostics/box.rs +++ b/tests/ui/closures/2229_closure_analysis/diagnostics/box.rs @@ -1,4 +1,4 @@ -// edition:2021 +//@ edition:2021 // Test borrow checker when we precise capture when using boxes diff --git a/tests/ui/closures/2229_closure_analysis/diagnostics/cant-mutate-imm-borrow.rs b/tests/ui/closures/2229_closure_analysis/diagnostics/cant-mutate-imm-borrow.rs index 77effcb0065..77e3ffdc47d 100644 --- a/tests/ui/closures/2229_closure_analysis/diagnostics/cant-mutate-imm-borrow.rs +++ b/tests/ui/closures/2229_closure_analysis/diagnostics/cant-mutate-imm-borrow.rs @@ -1,4 +1,4 @@ -// edition:2021 +//@ edition:2021 // Test that if we deref an immutable borrow to access a Place, // then we can't mutate the final place. diff --git a/tests/ui/closures/2229_closure_analysis/diagnostics/cant-mutate-imm.rs b/tests/ui/closures/2229_closure_analysis/diagnostics/cant-mutate-imm.rs index 25ee9a1490e..27a64232629 100644 --- a/tests/ui/closures/2229_closure_analysis/diagnostics/cant-mutate-imm.rs +++ b/tests/ui/closures/2229_closure_analysis/diagnostics/cant-mutate-imm.rs @@ -1,4 +1,4 @@ -// edition:2021 +//@ edition:2021 // Ensure that diagnostics for mutability error (because the root variable // isn't mutable) work with `capture_disjoint_fields` enabled. diff --git a/tests/ui/closures/2229_closure_analysis/diagnostics/closure-origin-array-diagnostics.rs b/tests/ui/closures/2229_closure_analysis/diagnostics/closure-origin-array-diagnostics.rs index f3be542e40d..2a1713ab8df 100644 --- a/tests/ui/closures/2229_closure_analysis/diagnostics/closure-origin-array-diagnostics.rs +++ b/tests/ui/closures/2229_closure_analysis/diagnostics/closure-origin-array-diagnostics.rs @@ -1,4 +1,4 @@ -// edition:2021 +//@ edition:2021 // Test that array access is not stored as part of closure kind origin diff --git a/tests/ui/closures/2229_closure_analysis/diagnostics/closure-origin-multi-variant-diagnostics.rs b/tests/ui/closures/2229_closure_analysis/diagnostics/closure-origin-multi-variant-diagnostics.rs index aa85b55b15c..196ef395c40 100644 --- a/tests/ui/closures/2229_closure_analysis/diagnostics/closure-origin-multi-variant-diagnostics.rs +++ b/tests/ui/closures/2229_closure_analysis/diagnostics/closure-origin-multi-variant-diagnostics.rs @@ -1,4 +1,4 @@ -// edition:2021 +//@ edition:2021 // Check that precise paths are being reported back in the error message. diff --git a/tests/ui/closures/2229_closure_analysis/diagnostics/closure-origin-single-variant-diagnostics.rs b/tests/ui/closures/2229_closure_analysis/diagnostics/closure-origin-single-variant-diagnostics.rs index bedb103cc4c..7791c8f0784 100644 --- a/tests/ui/closures/2229_closure_analysis/diagnostics/closure-origin-single-variant-diagnostics.rs +++ b/tests/ui/closures/2229_closure_analysis/diagnostics/closure-origin-single-variant-diagnostics.rs @@ -1,4 +1,4 @@ -// edition:2021 +//@ edition:2021 enum SingleVariant { diff --git a/tests/ui/closures/2229_closure_analysis/diagnostics/closure-origin-struct-diagnostics.rs b/tests/ui/closures/2229_closure_analysis/diagnostics/closure-origin-struct-diagnostics.rs index 3277a83c4e1..8d55260c7c4 100644 --- a/tests/ui/closures/2229_closure_analysis/diagnostics/closure-origin-struct-diagnostics.rs +++ b/tests/ui/closures/2229_closure_analysis/diagnostics/closure-origin-struct-diagnostics.rs @@ -1,4 +1,4 @@ -// edition:2021 +//@ edition:2021 // Check that precise paths are being reported back in the error message. diff --git a/tests/ui/closures/2229_closure_analysis/diagnostics/closure-origin-tuple-diagnostics-1.rs b/tests/ui/closures/2229_closure_analysis/diagnostics/closure-origin-tuple-diagnostics-1.rs index dc3a57ae793..4fa6766431a 100644 --- a/tests/ui/closures/2229_closure_analysis/diagnostics/closure-origin-tuple-diagnostics-1.rs +++ b/tests/ui/closures/2229_closure_analysis/diagnostics/closure-origin-tuple-diagnostics-1.rs @@ -1,4 +1,4 @@ -// edition:2021 +//@ edition:2021 // Check that precise paths are being reported back in the error message. diff --git a/tests/ui/closures/2229_closure_analysis/diagnostics/closure-origin-tuple-diagnostics.rs b/tests/ui/closures/2229_closure_analysis/diagnostics/closure-origin-tuple-diagnostics.rs index fa1328013db..a69f23939f9 100644 --- a/tests/ui/closures/2229_closure_analysis/diagnostics/closure-origin-tuple-diagnostics.rs +++ b/tests/ui/closures/2229_closure_analysis/diagnostics/closure-origin-tuple-diagnostics.rs @@ -1,4 +1,4 @@ -// edition:2021 +//@ edition:2021 struct S(String, String); diff --git a/tests/ui/closures/2229_closure_analysis/diagnostics/liveness.rs b/tests/ui/closures/2229_closure_analysis/diagnostics/liveness.rs index 3399bc0018e..c550af21f07 100644 --- a/tests/ui/closures/2229_closure_analysis/diagnostics/liveness.rs +++ b/tests/ui/closures/2229_closure_analysis/diagnostics/liveness.rs @@ -1,6 +1,6 @@ -// edition:2021 +//@ edition:2021 -// check-pass +//@ check-pass #![allow(unreachable_code)] #![warn(unused)] #![allow(dead_code)] diff --git a/tests/ui/closures/2229_closure_analysis/diagnostics/liveness_unintentional_copy.rs b/tests/ui/closures/2229_closure_analysis/diagnostics/liveness_unintentional_copy.rs index 465c9476ba6..bcd4d1090a4 100644 --- a/tests/ui/closures/2229_closure_analysis/diagnostics/liveness_unintentional_copy.rs +++ b/tests/ui/closures/2229_closure_analysis/diagnostics/liveness_unintentional_copy.rs @@ -1,6 +1,6 @@ -// edition:2021 +//@ edition:2021 -// check-pass +//@ check-pass #![warn(unused)] #![allow(dead_code)] diff --git a/tests/ui/closures/2229_closure_analysis/diagnostics/multilevel-path.rs b/tests/ui/closures/2229_closure_analysis/diagnostics/multilevel-path.rs index fa73ff23f9c..1c25449822a 100644 --- a/tests/ui/closures/2229_closure_analysis/diagnostics/multilevel-path.rs +++ b/tests/ui/closures/2229_closure_analysis/diagnostics/multilevel-path.rs @@ -1,4 +1,4 @@ -// edition:2021 +//@ edition:2021 // Test that when a borrow checker diagnostics are emitted, it's as precise // as the capture by the closure. diff --git a/tests/ui/closures/2229_closure_analysis/diagnostics/mut_ref.rs b/tests/ui/closures/2229_closure_analysis/diagnostics/mut_ref.rs index 3d5a31e8b8e..5827eab84cd 100644 --- a/tests/ui/closures/2229_closure_analysis/diagnostics/mut_ref.rs +++ b/tests/ui/closures/2229_closure_analysis/diagnostics/mut_ref.rs @@ -1,4 +1,4 @@ -// edition:2021 +//@ edition:2021 // Test that we can't mutate a place if we need to deref an imm-borrow // to reach it. diff --git a/tests/ui/closures/2229_closure_analysis/diagnostics/repr_packed.rs b/tests/ui/closures/2229_closure_analysis/diagnostics/repr_packed.rs index c7ee90ea73f..fe5106c57af 100644 --- a/tests/ui/closures/2229_closure_analysis/diagnostics/repr_packed.rs +++ b/tests/ui/closures/2229_closure_analysis/diagnostics/repr_packed.rs @@ -1,4 +1,4 @@ -// edition:2021 +//@ edition:2021 // Given how the closure desugaring is implemented (at least at the time of writing this test), // we don't need to truncate the captured path to a reference into a packed-struct if the field diff --git a/tests/ui/closures/2229_closure_analysis/diagnostics/simple-struct-min-capture.rs b/tests/ui/closures/2229_closure_analysis/diagnostics/simple-struct-min-capture.rs index ed2d9a3de00..881810e9671 100644 --- a/tests/ui/closures/2229_closure_analysis/diagnostics/simple-struct-min-capture.rs +++ b/tests/ui/closures/2229_closure_analysis/diagnostics/simple-struct-min-capture.rs @@ -1,4 +1,4 @@ -// edition:2021 +//@ edition:2021 // Test that borrow checker error is accurate and that min capture pass of the // closure analysis is working as expected. diff --git a/tests/ui/closures/2229_closure_analysis/diagnostics/union.rs b/tests/ui/closures/2229_closure_analysis/diagnostics/union.rs index 695337ea82c..647005bc1c9 100644 --- a/tests/ui/closures/2229_closure_analysis/diagnostics/union.rs +++ b/tests/ui/closures/2229_closure_analysis/diagnostics/union.rs @@ -1,4 +1,4 @@ -// edition:2021 +//@ edition:2021 // Test that we point to the correct location that results a union being captured. // Union is special because it can't be disjointly captured. diff --git a/tests/ui/closures/2229_closure_analysis/feature-gate-capture_disjoint_fields.rs b/tests/ui/closures/2229_closure_analysis/feature-gate-capture_disjoint_fields.rs index 26990b4305f..059c248a3e8 100644 --- a/tests/ui/closures/2229_closure_analysis/feature-gate-capture_disjoint_fields.rs +++ b/tests/ui/closures/2229_closure_analysis/feature-gate-capture_disjoint_fields.rs @@ -1,4 +1,4 @@ -// edition:2021 +//@ edition:2021 #![feature(rustc_attrs)] diff --git a/tests/ui/closures/2229_closure_analysis/filter-on-struct-member.rs b/tests/ui/closures/2229_closure_analysis/filter-on-struct-member.rs index bfa3ebcd6d2..11ef92367ca 100644 --- a/tests/ui/closures/2229_closure_analysis/filter-on-struct-member.rs +++ b/tests/ui/closures/2229_closure_analysis/filter-on-struct-member.rs @@ -1,4 +1,4 @@ -// edition:2021 +//@ edition:2021 #![feature(rustc_attrs)] diff --git a/tests/ui/closures/2229_closure_analysis/issue-87378.rs b/tests/ui/closures/2229_closure_analysis/issue-87378.rs index f0707b51bbb..0a771466e1e 100644 --- a/tests/ui/closures/2229_closure_analysis/issue-87378.rs +++ b/tests/ui/closures/2229_closure_analysis/issue-87378.rs @@ -1,6 +1,6 @@ #![feature(rustc_attrs)] -// edition:2021 +//@ edition:2021 // Test that any precise capture on a union is truncated because it's unsafe to do so. diff --git a/tests/ui/closures/2229_closure_analysis/issue-87987.rs b/tests/ui/closures/2229_closure_analysis/issue-87987.rs index d26343c33cf..f79a8f1b571 100644 --- a/tests/ui/closures/2229_closure_analysis/issue-87987.rs +++ b/tests/ui/closures/2229_closure_analysis/issue-87987.rs @@ -1,5 +1,5 @@ -// run-pass -// edition:2021 +//@ run-pass +//@ edition:2021 struct Props { field_1: u32, //~ WARNING: fields `field_1` and `field_2` are never read diff --git a/tests/ui/closures/2229_closure_analysis/issue-88118-2.rs b/tests/ui/closures/2229_closure_analysis/issue-88118-2.rs index 0cfb1a55bf2..27c1eac88e5 100644 --- a/tests/ui/closures/2229_closure_analysis/issue-88118-2.rs +++ b/tests/ui/closures/2229_closure_analysis/issue-88118-2.rs @@ -1,5 +1,5 @@ -// edition:2021 -// run-pass +//@ edition:2021 +//@ run-pass #![feature(if_let_guard)] #[allow(unused_must_use)] #[allow(dead_code)] diff --git a/tests/ui/closures/2229_closure_analysis/issue-88476.rs b/tests/ui/closures/2229_closure_analysis/issue-88476.rs index 58d86283f90..7f833839d56 100644 --- a/tests/ui/closures/2229_closure_analysis/issue-88476.rs +++ b/tests/ui/closures/2229_closure_analysis/issue-88476.rs @@ -1,4 +1,4 @@ -// edition:2021 +//@ edition:2021 #![feature(rustc_attrs)] diff --git a/tests/ui/closures/2229_closure_analysis/issue-89606.rs b/tests/ui/closures/2229_closure_analysis/issue-89606.rs index 1bb6aa40f06..8c88a4b8226 100644 --- a/tests/ui/closures/2229_closure_analysis/issue-89606.rs +++ b/tests/ui/closures/2229_closure_analysis/issue-89606.rs @@ -1,9 +1,9 @@ // Regression test for #89606. Used to ICE. // -// check-pass -// revisions: twenty_eighteen twenty_twentyone -// [twenty_eighteen]compile-flags: --edition 2018 -// [twenty_twentyone]compile-flags: --edition 2021 +//@ check-pass +//@ revisions: twenty_eighteen twenty_twentyone +//@ [twenty_eighteen]compile-flags: --edition 2018 +//@ [twenty_twentyone]compile-flags: --edition 2021 struct S<'a>(Option<&'a mut i32>); diff --git a/tests/ui/closures/2229_closure_analysis/issue-90465.fixed b/tests/ui/closures/2229_closure_analysis/issue-90465.fixed index 4e0b18e7233..3bbac007b4f 100644 --- a/tests/ui/closures/2229_closure_analysis/issue-90465.fixed +++ b/tests/ui/closures/2229_closure_analysis/issue-90465.fixed @@ -1,4 +1,4 @@ -// run-rustfix +//@ run-rustfix #![deny(rust_2021_incompatible_closure_captures)] //~^ NOTE lint level is defined here diff --git a/tests/ui/closures/2229_closure_analysis/issue-90465.rs b/tests/ui/closures/2229_closure_analysis/issue-90465.rs index 466e6dbabc5..cb11832d06c 100644 --- a/tests/ui/closures/2229_closure_analysis/issue-90465.rs +++ b/tests/ui/closures/2229_closure_analysis/issue-90465.rs @@ -1,4 +1,4 @@ -// run-rustfix +//@ run-rustfix #![deny(rust_2021_incompatible_closure_captures)] //~^ NOTE lint level is defined here diff --git a/tests/ui/closures/2229_closure_analysis/issue-92724-needsdrop-query-cycle.rs b/tests/ui/closures/2229_closure_analysis/issue-92724-needsdrop-query-cycle.rs index a3b17755fac..9c5f5992adb 100644 --- a/tests/ui/closures/2229_closure_analysis/issue-92724-needsdrop-query-cycle.rs +++ b/tests/ui/closures/2229_closure_analysis/issue-92724-needsdrop-query-cycle.rs @@ -1,5 +1,5 @@ // ICEs if checking if there is a significant destructor causes a query cycle -// check-pass +//@ check-pass #![warn(rust_2021_incompatible_closure_captures)] pub struct Foo(Bar); diff --git a/tests/ui/closures/2229_closure_analysis/issue_88118.rs b/tests/ui/closures/2229_closure_analysis/issue_88118.rs index bfb487649a3..0042d51039c 100644 --- a/tests/ui/closures/2229_closure_analysis/issue_88118.rs +++ b/tests/ui/closures/2229_closure_analysis/issue_88118.rs @@ -1,6 +1,6 @@ // Regression test for #88118. Used to ICE. -// edition:2021 -// check-pass +//@ edition:2021 +//@ check-pass fn foo(handler: impl FnOnce() -> MsU + Clone + 'static) { Box::new(move |value| { diff --git a/tests/ui/closures/2229_closure_analysis/match/if-let-guards-errors.rs b/tests/ui/closures/2229_closure_analysis/match/if-let-guards-errors.rs index 17e38c033b1..e19838995ee 100644 --- a/tests/ui/closures/2229_closure_analysis/match/if-let-guards-errors.rs +++ b/tests/ui/closures/2229_closure_analysis/match/if-let-guards-errors.rs @@ -1,7 +1,7 @@ // Check the if let guards don't force capture by value -// revisions: e2018 e2021 -//[e2018] edition:2018 -//[e2021] edition:2021 +//@ revisions: e2018 e2021 +//@[e2018] edition:2018 +//@[e2021] edition:2021 #![feature(if_let_guard)] #![allow(irrefutable_let_patterns)] diff --git a/tests/ui/closures/2229_closure_analysis/match/if-let-guards.rs b/tests/ui/closures/2229_closure_analysis/match/if-let-guards.rs index fa331707be4..a629a91bb90 100644 --- a/tests/ui/closures/2229_closure_analysis/match/if-let-guards.rs +++ b/tests/ui/closures/2229_closure_analysis/match/if-let-guards.rs @@ -1,8 +1,8 @@ // Check the if let guards don't force capture by value -// revisions: e2018 e2021 -// check-pass -//[e2018] edition:2018 -//[e2021] edition:2021 +//@ revisions: e2018 e2021 +//@ check-pass +//@[e2018] edition:2018 +//@[e2021] edition:2021 #![feature(if_let_guard)] #![allow(irrefutable_let_patterns)] diff --git a/tests/ui/closures/2229_closure_analysis/match/issue-87097.rs b/tests/ui/closures/2229_closure_analysis/match/issue-87097.rs index 815fc0a719c..3b41665cb4a 100644 --- a/tests/ui/closures/2229_closure_analysis/match/issue-87097.rs +++ b/tests/ui/closures/2229_closure_analysis/match/issue-87097.rs @@ -1,5 +1,5 @@ -// run-pass -// edition:2021 +//@ run-pass +//@ edition:2021 enum Variant { A, diff --git a/tests/ui/closures/2229_closure_analysis/match/issue-87426.rs b/tests/ui/closures/2229_closure_analysis/match/issue-87426.rs index 74506979a28..e023fc363dd 100644 --- a/tests/ui/closures/2229_closure_analysis/match/issue-87426.rs +++ b/tests/ui/closures/2229_closure_analysis/match/issue-87426.rs @@ -1,5 +1,5 @@ -// run-pass -// edition:2021 +//@ run-pass +//@ edition:2021 pub fn foo() { let ref_x_ck = 123; diff --git a/tests/ui/closures/2229_closure_analysis/match/issue-87988.rs b/tests/ui/closures/2229_closure_analysis/match/issue-87988.rs index 27e7fabf11a..da57f3ff9d1 100644 --- a/tests/ui/closures/2229_closure_analysis/match/issue-87988.rs +++ b/tests/ui/closures/2229_closure_analysis/match/issue-87988.rs @@ -1,5 +1,5 @@ -// run-pass -// edition:2021 +//@ run-pass +//@ edition:2021 const LIBUSB_HOTPLUG_EVENT_DEVICE_ARRIVED: i32 = 0x01; const LIBUSB_HOTPLUG_EVENT_DEVICE_LEFT: i32 = 0x02; diff --git a/tests/ui/closures/2229_closure_analysis/match/issue-88331.rs b/tests/ui/closures/2229_closure_analysis/match/issue-88331.rs index 0a6d71c68ae..e3c1aed24cb 100644 --- a/tests/ui/closures/2229_closure_analysis/match/issue-88331.rs +++ b/tests/ui/closures/2229_closure_analysis/match/issue-88331.rs @@ -1,4 +1,4 @@ -// edition:2021 +//@ edition:2021 #[derive(Copy, Clone, PartialEq, Eq)] pub struct Opcode(pub u8); diff --git a/tests/ui/closures/2229_closure_analysis/match/match-edge-cases_1.rs b/tests/ui/closures/2229_closure_analysis/match/match-edge-cases_1.rs index 106485e04ee..840eda0513f 100644 --- a/tests/ui/closures/2229_closure_analysis/match/match-edge-cases_1.rs +++ b/tests/ui/closures/2229_closure_analysis/match/match-edge-cases_1.rs @@ -1,5 +1,5 @@ -// run-pass -// edition:2021 +//@ run-pass +//@ edition:2021 const PATTERN_REF: &str = "Hello World"; const NUMBER: i32 = 30; diff --git a/tests/ui/closures/2229_closure_analysis/match/match-edge-cases_2.rs b/tests/ui/closures/2229_closure_analysis/match/match-edge-cases_2.rs index ae724f9c3cc..a3b19708899 100644 --- a/tests/ui/closures/2229_closure_analysis/match/match-edge-cases_2.rs +++ b/tests/ui/closures/2229_closure_analysis/match/match-edge-cases_2.rs @@ -1,4 +1,4 @@ -// edition:2021 +//@ edition:2021 enum SingleVariant { A diff --git a/tests/ui/closures/2229_closure_analysis/match/non-exhaustive-match.rs b/tests/ui/closures/2229_closure_analysis/match/non-exhaustive-match.rs index 972c24c23b0..32255582718 100644 --- a/tests/ui/closures/2229_closure_analysis/match/non-exhaustive-match.rs +++ b/tests/ui/closures/2229_closure_analysis/match/non-exhaustive-match.rs @@ -1,6 +1,6 @@ -// edition:2021 +//@ edition:2021 -// aux-build:match_non_exhaustive_lib.rs +//@ aux-build:match_non_exhaustive_lib.rs /* The error message for non-exhaustive matches on non-local enums * marked as non-exhaustive should mention the fact that the enum diff --git a/tests/ui/closures/2229_closure_analysis/match/pattern-matching-should-fail.rs b/tests/ui/closures/2229_closure_analysis/match/pattern-matching-should-fail.rs index 69cf920de94..377b1ab10c4 100644 --- a/tests/ui/closures/2229_closure_analysis/match/pattern-matching-should-fail.rs +++ b/tests/ui/closures/2229_closure_analysis/match/pattern-matching-should-fail.rs @@ -1,4 +1,4 @@ -// edition:2021 +//@ edition:2021 #![feature(never_type)] diff --git a/tests/ui/closures/2229_closure_analysis/match/patterns-capture-analysis.rs b/tests/ui/closures/2229_closure_analysis/match/patterns-capture-analysis.rs index c3898afa967..8dd20fc2a74 100644 --- a/tests/ui/closures/2229_closure_analysis/match/patterns-capture-analysis.rs +++ b/tests/ui/closures/2229_closure_analysis/match/patterns-capture-analysis.rs @@ -1,4 +1,4 @@ -// edition:2021 +//@ edition:2021 #![feature(rustc_attrs)] #![feature(stmt_expr_attributes)] diff --git a/tests/ui/closures/2229_closure_analysis/migrations/auto_traits.fixed b/tests/ui/closures/2229_closure_analysis/migrations/auto_traits.fixed index e8ca5ccdc54..c1d88cbdf83 100644 --- a/tests/ui/closures/2229_closure_analysis/migrations/auto_traits.fixed +++ b/tests/ui/closures/2229_closure_analysis/migrations/auto_traits.fixed @@ -1,4 +1,4 @@ -// run-rustfix +//@ run-rustfix #![deny(rust_2021_incompatible_closure_captures)] //~^ NOTE: the lint level is defined here diff --git a/tests/ui/closures/2229_closure_analysis/migrations/auto_traits.rs b/tests/ui/closures/2229_closure_analysis/migrations/auto_traits.rs index fb464b7f1e1..6b452fcdaf1 100644 --- a/tests/ui/closures/2229_closure_analysis/migrations/auto_traits.rs +++ b/tests/ui/closures/2229_closure_analysis/migrations/auto_traits.rs @@ -1,4 +1,4 @@ -// run-rustfix +//@ run-rustfix #![deny(rust_2021_incompatible_closure_captures)] //~^ NOTE: the lint level is defined here diff --git a/tests/ui/closures/2229_closure_analysis/migrations/closure-body-macro-fragment.fixed b/tests/ui/closures/2229_closure_analysis/migrations/closure-body-macro-fragment.fixed index 9a6db588c8b..e9e16ce951b 100644 --- a/tests/ui/closures/2229_closure_analysis/migrations/closure-body-macro-fragment.fixed +++ b/tests/ui/closures/2229_closure_analysis/migrations/closure-body-macro-fragment.fixed @@ -1,6 +1,6 @@ -// run-rustfix -// edition:2018 -// check-pass +//@ run-rustfix +//@ edition:2018 +//@ check-pass #![warn(rust_2021_compatibility)] #[derive(Debug)] diff --git a/tests/ui/closures/2229_closure_analysis/migrations/closure-body-macro-fragment.rs b/tests/ui/closures/2229_closure_analysis/migrations/closure-body-macro-fragment.rs index 08cc24b4b3f..0cb5351f595 100644 --- a/tests/ui/closures/2229_closure_analysis/migrations/closure-body-macro-fragment.rs +++ b/tests/ui/closures/2229_closure_analysis/migrations/closure-body-macro-fragment.rs @@ -1,6 +1,6 @@ -// run-rustfix -// edition:2018 -// check-pass +//@ run-rustfix +//@ edition:2018 +//@ check-pass #![warn(rust_2021_compatibility)] #[derive(Debug)] diff --git a/tests/ui/closures/2229_closure_analysis/migrations/insignificant_drop.fixed b/tests/ui/closures/2229_closure_analysis/migrations/insignificant_drop.fixed index 2652bf5988e..a70926678e3 100644 --- a/tests/ui/closures/2229_closure_analysis/migrations/insignificant_drop.fixed +++ b/tests/ui/closures/2229_closure_analysis/migrations/insignificant_drop.fixed @@ -1,5 +1,5 @@ -// run-pass -// run-rustfix +//@ run-pass +//@ run-rustfix #![deny(rust_2021_incompatible_closure_captures)] #![allow(unused)] diff --git a/tests/ui/closures/2229_closure_analysis/migrations/insignificant_drop.rs b/tests/ui/closures/2229_closure_analysis/migrations/insignificant_drop.rs index 2652bf5988e..a70926678e3 100644 --- a/tests/ui/closures/2229_closure_analysis/migrations/insignificant_drop.rs +++ b/tests/ui/closures/2229_closure_analysis/migrations/insignificant_drop.rs @@ -1,5 +1,5 @@ -// run-pass -// run-rustfix +//@ run-pass +//@ run-rustfix #![deny(rust_2021_incompatible_closure_captures)] #![allow(unused)] diff --git a/tests/ui/closures/2229_closure_analysis/migrations/insignificant_drop_attr_migrations.fixed b/tests/ui/closures/2229_closure_analysis/migrations/insignificant_drop_attr_migrations.fixed index d985e3bb9ec..2784a603644 100644 --- a/tests/ui/closures/2229_closure_analysis/migrations/insignificant_drop_attr_migrations.fixed +++ b/tests/ui/closures/2229_closure_analysis/migrations/insignificant_drop_attr_migrations.fixed @@ -1,4 +1,4 @@ -// run-rustfix +//@ run-rustfix #![deny(rust_2021_incompatible_closure_captures)] //~^ NOTE: the lint level is defined here diff --git a/tests/ui/closures/2229_closure_analysis/migrations/insignificant_drop_attr_migrations.rs b/tests/ui/closures/2229_closure_analysis/migrations/insignificant_drop_attr_migrations.rs index f95d34eeb29..e5de7ba3c62 100644 --- a/tests/ui/closures/2229_closure_analysis/migrations/insignificant_drop_attr_migrations.rs +++ b/tests/ui/closures/2229_closure_analysis/migrations/insignificant_drop_attr_migrations.rs @@ -1,4 +1,4 @@ -// run-rustfix +//@ run-rustfix #![deny(rust_2021_incompatible_closure_captures)] //~^ NOTE: the lint level is defined here diff --git a/tests/ui/closures/2229_closure_analysis/migrations/insignificant_drop_attr_no_migrations.rs b/tests/ui/closures/2229_closure_analysis/migrations/insignificant_drop_attr_no_migrations.rs index 3f184a67fba..8b71e5ed1b2 100644 --- a/tests/ui/closures/2229_closure_analysis/migrations/insignificant_drop_attr_no_migrations.rs +++ b/tests/ui/closures/2229_closure_analysis/migrations/insignificant_drop_attr_no_migrations.rs @@ -1,4 +1,4 @@ -// run-pass +//@ run-pass #![deny(rust_2021_incompatible_closure_captures)] #![feature(rustc_attrs)] diff --git a/tests/ui/closures/2229_closure_analysis/migrations/issue-78720.rs b/tests/ui/closures/2229_closure_analysis/migrations/issue-78720.rs index 98f8d5d4733..3e72eec4ea8 100644 --- a/tests/ui/closures/2229_closure_analysis/migrations/issue-78720.rs +++ b/tests/ui/closures/2229_closure_analysis/migrations/issue-78720.rs @@ -1,4 +1,4 @@ -// run-pass +//@ run-pass #![warn(rust_2021_incompatible_closure_captures)] #![allow(dropping_references, dropping_copy_types)] diff --git a/tests/ui/closures/2229_closure_analysis/migrations/issue-86753.rs b/tests/ui/closures/2229_closure_analysis/migrations/issue-86753.rs index fce9cac627b..1bae9f487a1 100644 --- a/tests/ui/closures/2229_closure_analysis/migrations/issue-86753.rs +++ b/tests/ui/closures/2229_closure_analysis/migrations/issue-86753.rs @@ -1,5 +1,5 @@ -// edition:2018 -// check-pass +//@ edition:2018 +//@ check-pass #![warn(rust_2021_compatibility)] diff --git a/tests/ui/closures/2229_closure_analysis/migrations/issue-90024-adt-correct-subst.rs b/tests/ui/closures/2229_closure_analysis/migrations/issue-90024-adt-correct-subst.rs index ed8cb042b3e..64fd2f01a5d 100644 --- a/tests/ui/closures/2229_closure_analysis/migrations/issue-90024-adt-correct-subst.rs +++ b/tests/ui/closures/2229_closure_analysis/migrations/issue-90024-adt-correct-subst.rs @@ -1,5 +1,5 @@ // Test that rustc doesn't ICE as in #90024. -// check-pass +//@ check-pass // edition=2018 #![warn(rust_2021_incompatible_closure_captures)] diff --git a/tests/ui/closures/2229_closure_analysis/migrations/macro.fixed b/tests/ui/closures/2229_closure_analysis/migrations/macro.fixed index 31fe494dc79..8946642892f 100644 --- a/tests/ui/closures/2229_closure_analysis/migrations/macro.fixed +++ b/tests/ui/closures/2229_closure_analysis/migrations/macro.fixed @@ -1,4 +1,4 @@ -// run-rustfix +//@ run-rustfix // See https://github.com/rust-lang/rust/issues/87955 diff --git a/tests/ui/closures/2229_closure_analysis/migrations/macro.rs b/tests/ui/closures/2229_closure_analysis/migrations/macro.rs index 0f0c4974922..f50b985298d 100644 --- a/tests/ui/closures/2229_closure_analysis/migrations/macro.rs +++ b/tests/ui/closures/2229_closure_analysis/migrations/macro.rs @@ -1,4 +1,4 @@ -// run-rustfix +//@ run-rustfix // See https://github.com/rust-lang/rust/issues/87955 diff --git a/tests/ui/closures/2229_closure_analysis/migrations/migrations_rustfix.fixed b/tests/ui/closures/2229_closure_analysis/migrations/migrations_rustfix.fixed index ce8b6072595..b87c398da39 100644 --- a/tests/ui/closures/2229_closure_analysis/migrations/migrations_rustfix.fixed +++ b/tests/ui/closures/2229_closure_analysis/migrations/migrations_rustfix.fixed @@ -1,4 +1,4 @@ -// run-rustfix +//@ run-rustfix #![deny(rust_2021_incompatible_closure_captures)] //~^ NOTE: the lint level is defined here diff --git a/tests/ui/closures/2229_closure_analysis/migrations/migrations_rustfix.rs b/tests/ui/closures/2229_closure_analysis/migrations/migrations_rustfix.rs index 2237bebd788..5e763b0239a 100644 --- a/tests/ui/closures/2229_closure_analysis/migrations/migrations_rustfix.rs +++ b/tests/ui/closures/2229_closure_analysis/migrations/migrations_rustfix.rs @@ -1,4 +1,4 @@ -// run-rustfix +//@ run-rustfix #![deny(rust_2021_incompatible_closure_captures)] //~^ NOTE: the lint level is defined here diff --git a/tests/ui/closures/2229_closure_analysis/migrations/mir_calls_to_shims.fixed b/tests/ui/closures/2229_closure_analysis/migrations/mir_calls_to_shims.fixed index ff2244a8e31..3ff73bf4681 100644 --- a/tests/ui/closures/2229_closure_analysis/migrations/mir_calls_to_shims.fixed +++ b/tests/ui/closures/2229_closure_analysis/migrations/mir_calls_to_shims.fixed @@ -1,5 +1,5 @@ -// run-rustfix -// needs-unwind +//@ run-rustfix +//@ needs-unwind #![deny(rust_2021_incompatible_closure_captures)] //~^ NOTE: the lint level is defined here diff --git a/tests/ui/closures/2229_closure_analysis/migrations/mir_calls_to_shims.rs b/tests/ui/closures/2229_closure_analysis/migrations/mir_calls_to_shims.rs index 52e96d013a2..21f1a9515a6 100644 --- a/tests/ui/closures/2229_closure_analysis/migrations/mir_calls_to_shims.rs +++ b/tests/ui/closures/2229_closure_analysis/migrations/mir_calls_to_shims.rs @@ -1,5 +1,5 @@ -// run-rustfix -// needs-unwind +//@ run-rustfix +//@ needs-unwind #![deny(rust_2021_incompatible_closure_captures)] //~^ NOTE: the lint level is defined here diff --git a/tests/ui/closures/2229_closure_analysis/migrations/multi_diagnostics.fixed b/tests/ui/closures/2229_closure_analysis/migrations/multi_diagnostics.fixed index 7c4e5c0f9a5..8bbd7fab569 100644 --- a/tests/ui/closures/2229_closure_analysis/migrations/multi_diagnostics.fixed +++ b/tests/ui/closures/2229_closure_analysis/migrations/multi_diagnostics.fixed @@ -1,4 +1,4 @@ -// run-rustfix +//@ run-rustfix #![deny(rust_2021_incompatible_closure_captures)] //~^ NOTE: the lint level is defined here diff --git a/tests/ui/closures/2229_closure_analysis/migrations/multi_diagnostics.rs b/tests/ui/closures/2229_closure_analysis/migrations/multi_diagnostics.rs index f979db11b7e..62fe1581bac 100644 --- a/tests/ui/closures/2229_closure_analysis/migrations/multi_diagnostics.rs +++ b/tests/ui/closures/2229_closure_analysis/migrations/multi_diagnostics.rs @@ -1,4 +1,4 @@ -// run-rustfix +//@ run-rustfix #![deny(rust_2021_incompatible_closure_captures)] //~^ NOTE: the lint level is defined here diff --git a/tests/ui/closures/2229_closure_analysis/migrations/no_migrations.rs b/tests/ui/closures/2229_closure_analysis/migrations/no_migrations.rs index 8b75e226ab5..35ed8158bc2 100644 --- a/tests/ui/closures/2229_closure_analysis/migrations/no_migrations.rs +++ b/tests/ui/closures/2229_closure_analysis/migrations/no_migrations.rs @@ -1,4 +1,4 @@ -// run-pass +//@ run-pass // Set of test cases that don't need migrations diff --git a/tests/ui/closures/2229_closure_analysis/migrations/old_name.rs b/tests/ui/closures/2229_closure_analysis/migrations/old_name.rs index 16e3cca7b77..5f9e7d295ba 100644 --- a/tests/ui/closures/2229_closure_analysis/migrations/old_name.rs +++ b/tests/ui/closures/2229_closure_analysis/migrations/old_name.rs @@ -1,4 +1,4 @@ -// check-pass +//@ check-pass // Ensure that the old name for `rust_2021_incompatible_closure_captures` is still // accepted by the compiler diff --git a/tests/ui/closures/2229_closure_analysis/migrations/precise.fixed b/tests/ui/closures/2229_closure_analysis/migrations/precise.fixed index 7892a72c765..5743f9984be 100644 --- a/tests/ui/closures/2229_closure_analysis/migrations/precise.fixed +++ b/tests/ui/closures/2229_closure_analysis/migrations/precise.fixed @@ -1,4 +1,4 @@ -// run-rustfix +//@ run-rustfix #![deny(rust_2021_incompatible_closure_captures)] //~^ NOTE: the lint level is defined here diff --git a/tests/ui/closures/2229_closure_analysis/migrations/precise.rs b/tests/ui/closures/2229_closure_analysis/migrations/precise.rs index f5e99002bd0..2ddd2535c72 100644 --- a/tests/ui/closures/2229_closure_analysis/migrations/precise.rs +++ b/tests/ui/closures/2229_closure_analysis/migrations/precise.rs @@ -1,4 +1,4 @@ -// run-rustfix +//@ run-rustfix #![deny(rust_2021_incompatible_closure_captures)] //~^ NOTE: the lint level is defined here diff --git a/tests/ui/closures/2229_closure_analysis/migrations/precise_no_migrations.rs b/tests/ui/closures/2229_closure_analysis/migrations/precise_no_migrations.rs index 587d71c40fc..f46ec4b927a 100644 --- a/tests/ui/closures/2229_closure_analysis/migrations/precise_no_migrations.rs +++ b/tests/ui/closures/2229_closure_analysis/migrations/precise_no_migrations.rs @@ -1,4 +1,4 @@ -// run-pass +//@ run-pass #![deny(rust_2021_incompatible_closure_captures)] diff --git a/tests/ui/closures/2229_closure_analysis/migrations/significant_drop.fixed b/tests/ui/closures/2229_closure_analysis/migrations/significant_drop.fixed index 672aa4be686..8aa07cd5442 100644 --- a/tests/ui/closures/2229_closure_analysis/migrations/significant_drop.fixed +++ b/tests/ui/closures/2229_closure_analysis/migrations/significant_drop.fixed @@ -1,4 +1,4 @@ -// run-rustfix +//@ run-rustfix #![deny(rust_2021_incompatible_closure_captures)] //~^ NOTE: the lint level is defined here diff --git a/tests/ui/closures/2229_closure_analysis/migrations/significant_drop.rs b/tests/ui/closures/2229_closure_analysis/migrations/significant_drop.rs index 9c751064688..b53461d14df 100644 --- a/tests/ui/closures/2229_closure_analysis/migrations/significant_drop.rs +++ b/tests/ui/closures/2229_closure_analysis/migrations/significant_drop.rs @@ -1,4 +1,4 @@ -// run-rustfix +//@ run-rustfix #![deny(rust_2021_incompatible_closure_captures)] //~^ NOTE: the lint level is defined here diff --git a/tests/ui/closures/2229_closure_analysis/migrations/unpin_no_migration.rs b/tests/ui/closures/2229_closure_analysis/migrations/unpin_no_migration.rs index 39cf82053f7..8d7224a60c0 100644 --- a/tests/ui/closures/2229_closure_analysis/migrations/unpin_no_migration.rs +++ b/tests/ui/closures/2229_closure_analysis/migrations/unpin_no_migration.rs @@ -1,4 +1,4 @@ -//run-pass +//@run-pass #![deny(rust_2021_incompatible_closure_captures)] #![allow(unused_must_use)] diff --git a/tests/ui/closures/2229_closure_analysis/move_closure.rs b/tests/ui/closures/2229_closure_analysis/move_closure.rs index 31e04fa6d5c..3b7f036dfe7 100644 --- a/tests/ui/closures/2229_closure_analysis/move_closure.rs +++ b/tests/ui/closures/2229_closure_analysis/move_closure.rs @@ -1,4 +1,4 @@ -// edition:2021 +//@ edition:2021 // Test that move closures drop derefs with `capture_disjoint_fields` enabled. diff --git a/tests/ui/closures/2229_closure_analysis/multilevel-path-1.rs b/tests/ui/closures/2229_closure_analysis/multilevel-path-1.rs index 8a6ecfbb9be..2d7c26074cb 100644 --- a/tests/ui/closures/2229_closure_analysis/multilevel-path-1.rs +++ b/tests/ui/closures/2229_closure_analysis/multilevel-path-1.rs @@ -1,4 +1,4 @@ -// edition:2021 +//@ edition:2021 #![feature(rustc_attrs)] #![allow(unused)] diff --git a/tests/ui/closures/2229_closure_analysis/multilevel-path-2.rs b/tests/ui/closures/2229_closure_analysis/multilevel-path-2.rs index fff80f9c855..bcf0ed35137 100644 --- a/tests/ui/closures/2229_closure_analysis/multilevel-path-2.rs +++ b/tests/ui/closures/2229_closure_analysis/multilevel-path-2.rs @@ -1,4 +1,4 @@ -// edition:2021 +//@ edition:2021 #![feature(rustc_attrs)] #![allow(unused)] diff --git a/tests/ui/closures/2229_closure_analysis/nested-closure.rs b/tests/ui/closures/2229_closure_analysis/nested-closure.rs index a7e3ef3b39c..c481b3d853b 100644 --- a/tests/ui/closures/2229_closure_analysis/nested-closure.rs +++ b/tests/ui/closures/2229_closure_analysis/nested-closure.rs @@ -1,4 +1,4 @@ -// edition:2021 +//@ edition:2021 #![feature(rustc_attrs)] diff --git a/tests/ui/closures/2229_closure_analysis/optimization/edge_case.rs b/tests/ui/closures/2229_closure_analysis/optimization/edge_case.rs index a7686f3b08f..8df0eeb0eb4 100644 --- a/tests/ui/closures/2229_closure_analysis/optimization/edge_case.rs +++ b/tests/ui/closures/2229_closure_analysis/optimization/edge_case.rs @@ -1,4 +1,4 @@ -// edition:2021 +//@ edition:2021 #![feature(rustc_attrs)] #![allow(unused)] diff --git a/tests/ui/closures/2229_closure_analysis/optimization/edge_case_run_pass.rs b/tests/ui/closures/2229_closure_analysis/optimization/edge_case_run_pass.rs index 5496d0e5fc7..71b5a48367b 100644 --- a/tests/ui/closures/2229_closure_analysis/optimization/edge_case_run_pass.rs +++ b/tests/ui/closures/2229_closure_analysis/optimization/edge_case_run_pass.rs @@ -1,5 +1,5 @@ -// edition:2021 -// run-pass +//@ edition:2021 +//@ run-pass #![allow(unused)] #![allow(dead_code)] diff --git a/tests/ui/closures/2229_closure_analysis/path-with-array-access.rs b/tests/ui/closures/2229_closure_analysis/path-with-array-access.rs index b8e2d6651a7..2d3db4fde72 100644 --- a/tests/ui/closures/2229_closure_analysis/path-with-array-access.rs +++ b/tests/ui/closures/2229_closure_analysis/path-with-array-access.rs @@ -1,4 +1,4 @@ -// edition:2021 +//@ edition:2021 #![feature(rustc_attrs)] diff --git a/tests/ui/closures/2229_closure_analysis/preserve_field_drop_order.rs b/tests/ui/closures/2229_closure_analysis/preserve_field_drop_order.rs index 26c227a1edd..c30eaf8fb1b 100644 --- a/tests/ui/closures/2229_closure_analysis/preserve_field_drop_order.rs +++ b/tests/ui/closures/2229_closure_analysis/preserve_field_drop_order.rs @@ -1,4 +1,4 @@ -// edition:2021 +//@ edition:2021 // Tests that in cases where we individually capture all the fields of a type, // we still drop them in the order they would have been dropped in the 2018 edition. diff --git a/tests/ui/closures/2229_closure_analysis/preserve_field_drop_order2.rs b/tests/ui/closures/2229_closure_analysis/preserve_field_drop_order2.rs index 1cae776dd68..4fc2e6c903a 100644 --- a/tests/ui/closures/2229_closure_analysis/preserve_field_drop_order2.rs +++ b/tests/ui/closures/2229_closure_analysis/preserve_field_drop_order2.rs @@ -1,8 +1,8 @@ -// run-pass -// check-run-results -// revisions: twenty_eighteen twenty_twentyone -// [twenty_eighteen]compile-flags: --edition 2018 -// [twenty_twentyone]compile-flags: --edition 2021 +//@ run-pass +//@ check-run-results +//@ revisions: twenty_eighteen twenty_twentyone +//@ [twenty_eighteen]compile-flags: --edition 2018 +//@ [twenty_twentyone]compile-flags: --edition 2021 #[derive(Debug)] struct Dropable(&'static str); diff --git a/tests/ui/closures/2229_closure_analysis/repr_packed.rs b/tests/ui/closures/2229_closure_analysis/repr_packed.rs index 3ed8587783e..0dde2b12b87 100644 --- a/tests/ui/closures/2229_closure_analysis/repr_packed.rs +++ b/tests/ui/closures/2229_closure_analysis/repr_packed.rs @@ -1,4 +1,4 @@ -// edition:2021 +//@ edition:2021 #![feature(rustc_attrs)] diff --git a/tests/ui/closures/2229_closure_analysis/run_pass/box.rs b/tests/ui/closures/2229_closure_analysis/run_pass/box.rs index 73aca288faa..be8822121a5 100644 --- a/tests/ui/closures/2229_closure_analysis/run_pass/box.rs +++ b/tests/ui/closures/2229_closure_analysis/run_pass/box.rs @@ -1,5 +1,5 @@ -// edition:2021 -// run-pass +//@ edition:2021 +//@ run-pass // Test precise capture when using boxes diff --git a/tests/ui/closures/2229_closure_analysis/run_pass/by_value.rs b/tests/ui/closures/2229_closure_analysis/run_pass/by_value.rs index f8752fe1cec..b0763fd1033 100644 --- a/tests/ui/closures/2229_closure_analysis/run_pass/by_value.rs +++ b/tests/ui/closures/2229_closure_analysis/run_pass/by_value.rs @@ -1,5 +1,5 @@ -// edition:2021 -// run-pass +//@ edition:2021 +//@ run-pass // Test that ByValue captures compile successfully especially when the captures are // dereferenced within the closure. diff --git a/tests/ui/closures/2229_closure_analysis/run_pass/capture-disjoint-field-struct.rs b/tests/ui/closures/2229_closure_analysis/run_pass/capture-disjoint-field-struct.rs index 3cb1eb32952..981fa2d1240 100644 --- a/tests/ui/closures/2229_closure_analysis/run_pass/capture-disjoint-field-struct.rs +++ b/tests/ui/closures/2229_closure_analysis/run_pass/capture-disjoint-field-struct.rs @@ -1,5 +1,5 @@ -// edition:2021 -// run-pass +//@ edition:2021 +//@ run-pass // Test that we can immutably borrow field of an instance of a structure from within a closure, // while having a mutable borrow to another field of the same instance outside the closure. diff --git a/tests/ui/closures/2229_closure_analysis/run_pass/capture-disjoint-field-tuple-mut.rs b/tests/ui/closures/2229_closure_analysis/run_pass/capture-disjoint-field-tuple-mut.rs index 0f79b7ae7b8..56c97d5d8e9 100644 --- a/tests/ui/closures/2229_closure_analysis/run_pass/capture-disjoint-field-tuple-mut.rs +++ b/tests/ui/closures/2229_closure_analysis/run_pass/capture-disjoint-field-tuple-mut.rs @@ -1,5 +1,5 @@ -// edition:2021 -// run-pass +//@ edition:2021 +//@ run-pass // Test that we can mutate an element of a tuple from within a closure // while immutably borrowing another element of the same tuple outside the closure. diff --git a/tests/ui/closures/2229_closure_analysis/run_pass/capture-disjoint-field-tuple.rs b/tests/ui/closures/2229_closure_analysis/run_pass/capture-disjoint-field-tuple.rs index 81f0328b9ba..1204ea28657 100644 --- a/tests/ui/closures/2229_closure_analysis/run_pass/capture-disjoint-field-tuple.rs +++ b/tests/ui/closures/2229_closure_analysis/run_pass/capture-disjoint-field-tuple.rs @@ -1,5 +1,5 @@ -// edition:2021 -// run-pass +//@ edition:2021 +//@ run-pass // Test that we can immutably borrow an element of a tuple from within a closure, // while having a mutable borrow to another element of the same tuple outside the closure. diff --git a/tests/ui/closures/2229_closure_analysis/run_pass/capture_with_wildcard_match.rs b/tests/ui/closures/2229_closure_analysis/run_pass/capture_with_wildcard_match.rs index cea02fbe15d..787cba4b056 100644 --- a/tests/ui/closures/2229_closure_analysis/run_pass/capture_with_wildcard_match.rs +++ b/tests/ui/closures/2229_closure_analysis/run_pass/capture_with_wildcard_match.rs @@ -1,5 +1,5 @@ -// edition:2021 -//check-pass +//@ edition:2021 +//@check-pass fn test1() { let foo : [Vec; 3] = ["String".into(), "String".into(), "String".into()]; diff --git a/tests/ui/closures/2229_closure_analysis/run_pass/destructure-pattern-closure-within-closure.rs b/tests/ui/closures/2229_closure_analysis/run_pass/destructure-pattern-closure-within-closure.rs index 5c278bff90b..4fd70c0bb7e 100644 --- a/tests/ui/closures/2229_closure_analysis/run_pass/destructure-pattern-closure-within-closure.rs +++ b/tests/ui/closures/2229_closure_analysis/run_pass/destructure-pattern-closure-within-closure.rs @@ -1,5 +1,5 @@ -// edition:2021 -// check-pass +//@ edition:2021 +//@ check-pass #![warn(unused)] fn main() { diff --git a/tests/ui/closures/2229_closure_analysis/run_pass/destructure_patterns.rs b/tests/ui/closures/2229_closure_analysis/run_pass/destructure_patterns.rs index dacc2c616b8..6d6779ca6bd 100644 --- a/tests/ui/closures/2229_closure_analysis/run_pass/destructure_patterns.rs +++ b/tests/ui/closures/2229_closure_analysis/run_pass/destructure_patterns.rs @@ -1,5 +1,5 @@ -// edition:2021 -// check-pass +//@ edition:2021 +//@ check-pass #![warn(unused)] struct Point { diff --git a/tests/ui/closures/2229_closure_analysis/run_pass/disjoint-capture-in-same-closure.rs b/tests/ui/closures/2229_closure_analysis/run_pass/disjoint-capture-in-same-closure.rs index 6d4cf6fa553..671a4dbb0c7 100644 --- a/tests/ui/closures/2229_closure_analysis/run_pass/disjoint-capture-in-same-closure.rs +++ b/tests/ui/closures/2229_closure_analysis/run_pass/disjoint-capture-in-same-closure.rs @@ -1,5 +1,5 @@ -// edition:2021 -// run-pass +//@ edition:2021 +//@ run-pass // Tests that if a closure uses individual fields of the same object // then that case is handled properly. diff --git a/tests/ui/closures/2229_closure_analysis/run_pass/drop_then_use_fake_reads.rs b/tests/ui/closures/2229_closure_analysis/run_pass/drop_then_use_fake_reads.rs index b5e97ec1c1b..1d7dcf2e3c5 100644 --- a/tests/ui/closures/2229_closure_analysis/run_pass/drop_then_use_fake_reads.rs +++ b/tests/ui/closures/2229_closure_analysis/run_pass/drop_then_use_fake_reads.rs @@ -1,5 +1,5 @@ -// edition:2021 -// check-pass +//@ edition:2021 +//@ check-pass #![feature(rustc_attrs)] #![allow(dropping_references)] diff --git a/tests/ui/closures/2229_closure_analysis/run_pass/edition.rs b/tests/ui/closures/2229_closure_analysis/run_pass/edition.rs index 20bbe1d89e4..8874fc57eee 100644 --- a/tests/ui/closures/2229_closure_analysis/run_pass/edition.rs +++ b/tests/ui/closures/2229_closure_analysis/run_pass/edition.rs @@ -1,5 +1,5 @@ -// edition:2021 -// run-pass +//@ edition:2021 +//@ run-pass // Test that edition 2021 enables disjoint capture by default. diff --git a/tests/ui/closures/2229_closure_analysis/run_pass/filter-on-struct-member.rs b/tests/ui/closures/2229_closure_analysis/run_pass/filter-on-struct-member.rs index e19f5ff1bae..f0973e435f0 100644 --- a/tests/ui/closures/2229_closure_analysis/run_pass/filter-on-struct-member.rs +++ b/tests/ui/closures/2229_closure_analysis/run_pass/filter-on-struct-member.rs @@ -1,5 +1,5 @@ -// edition:2021 -// run-pass +//@ edition:2021 +//@ run-pass // Test disjoint capture within an impl block diff --git a/tests/ui/closures/2229_closure_analysis/run_pass/fru_syntax.rs b/tests/ui/closures/2229_closure_analysis/run_pass/fru_syntax.rs index 1286613cb13..c32846796f8 100644 --- a/tests/ui/closures/2229_closure_analysis/run_pass/fru_syntax.rs +++ b/tests/ui/closures/2229_closure_analysis/run_pass/fru_syntax.rs @@ -1,5 +1,5 @@ -// edition:2021 -// run-pass +//@ edition:2021 +//@ run-pass // Test that functional record update/struct update syntax works inside // a closure when the feature `capture_disjoint_fields` is enabled. diff --git a/tests/ui/closures/2229_closure_analysis/run_pass/issue-87378.rs b/tests/ui/closures/2229_closure_analysis/run_pass/issue-87378.rs index c64475fda43..60190736963 100644 --- a/tests/ui/closures/2229_closure_analysis/run_pass/issue-87378.rs +++ b/tests/ui/closures/2229_closure_analysis/run_pass/issue-87378.rs @@ -1,5 +1,5 @@ -// edition:2021 -// check-pass +//@ edition:2021 +//@ check-pass union Union { value: u64, diff --git a/tests/ui/closures/2229_closure_analysis/run_pass/issue-88372.rs b/tests/ui/closures/2229_closure_analysis/run_pass/issue-88372.rs index 25fbb6cb906..1fa272117e9 100644 --- a/tests/ui/closures/2229_closure_analysis/run_pass/issue-88372.rs +++ b/tests/ui/closures/2229_closure_analysis/run_pass/issue-88372.rs @@ -1,5 +1,5 @@ -// edition:2021 -// run-pass +//@ edition:2021 +//@ run-pass fn solve(validate: F) -> Option diff --git a/tests/ui/closures/2229_closure_analysis/run_pass/issue-88431.rs b/tests/ui/closures/2229_closure_analysis/run_pass/issue-88431.rs index 99962053077..ded9b2355e4 100644 --- a/tests/ui/closures/2229_closure_analysis/run_pass/issue-88431.rs +++ b/tests/ui/closures/2229_closure_analysis/run_pass/issue-88431.rs @@ -1,5 +1,5 @@ -// edition:2021 -// check-pass +//@ edition:2021 +//@ check-pass use std::collections::HashMap; use std::future::Future; diff --git a/tests/ui/closures/2229_closure_analysis/run_pass/issue-88476.rs b/tests/ui/closures/2229_closure_analysis/run_pass/issue-88476.rs index f44c2af803b..0abb6db4694 100644 --- a/tests/ui/closures/2229_closure_analysis/run_pass/issue-88476.rs +++ b/tests/ui/closures/2229_closure_analysis/run_pass/issue-88476.rs @@ -1,5 +1,5 @@ -// check-pass -// edition:2021 +//@ check-pass +//@ edition:2021 use std::rc::Rc; diff --git a/tests/ui/closures/2229_closure_analysis/run_pass/lit-pattern-matching-with-methods.rs b/tests/ui/closures/2229_closure_analysis/run_pass/lit-pattern-matching-with-methods.rs index a386e9f40cc..7a4d7d9a81e 100644 --- a/tests/ui/closures/2229_closure_analysis/run_pass/lit-pattern-matching-with-methods.rs +++ b/tests/ui/closures/2229_closure_analysis/run_pass/lit-pattern-matching-with-methods.rs @@ -1,5 +1,5 @@ -// edition:2021 -//check-pass +//@ edition:2021 +//@check-pass #![warn(unused)] #![feature(rustc_attrs)] #![feature(btree_extract_if)] diff --git a/tests/ui/closures/2229_closure_analysis/run_pass/move_closure.rs b/tests/ui/closures/2229_closure_analysis/run_pass/move_closure.rs index f76965bdd3f..625a6f9592a 100644 --- a/tests/ui/closures/2229_closure_analysis/run_pass/move_closure.rs +++ b/tests/ui/closures/2229_closure_analysis/run_pass/move_closure.rs @@ -1,5 +1,5 @@ -// edition:2021 -// run-pass +//@ edition:2021 +//@ run-pass // Test that move closures compile properly with `capture_disjoint_fields` enabled. diff --git a/tests/ui/closures/2229_closure_analysis/run_pass/multilevel-path-1.rs b/tests/ui/closures/2229_closure_analysis/run_pass/multilevel-path-1.rs index 624e0ff2256..683ca886021 100644 --- a/tests/ui/closures/2229_closure_analysis/run_pass/multilevel-path-1.rs +++ b/tests/ui/closures/2229_closure_analysis/run_pass/multilevel-path-1.rs @@ -1,5 +1,5 @@ -// edition:2021 -// run-pass +//@ edition:2021 +//@ run-pass // Test that closures can capture paths that are more precise than just one level // from the root variable. diff --git a/tests/ui/closures/2229_closure_analysis/run_pass/multilevel-path-2.rs b/tests/ui/closures/2229_closure_analysis/run_pass/multilevel-path-2.rs index bd8addd3781..947de10ee4a 100644 --- a/tests/ui/closures/2229_closure_analysis/run_pass/multilevel-path-2.rs +++ b/tests/ui/closures/2229_closure_analysis/run_pass/multilevel-path-2.rs @@ -1,5 +1,5 @@ -// edition:2021 -// run-pass +//@ edition:2021 +//@ run-pass #![allow(unused)] diff --git a/tests/ui/closures/2229_closure_analysis/run_pass/multilevel-path-3.rs b/tests/ui/closures/2229_closure_analysis/run_pass/multilevel-path-3.rs index 8fc0efb60b7..ac406837f90 100644 --- a/tests/ui/closures/2229_closure_analysis/run_pass/multilevel-path-3.rs +++ b/tests/ui/closures/2229_closure_analysis/run_pass/multilevel-path-3.rs @@ -1,5 +1,5 @@ -// edition:2021 -// run-pass +//@ edition:2021 +//@ run-pass #![allow(unused)] diff --git a/tests/ui/closures/2229_closure_analysis/run_pass/multivariant.rs b/tests/ui/closures/2229_closure_analysis/run_pass/multivariant.rs index bc2386e5d23..9b3f6d046b4 100644 --- a/tests/ui/closures/2229_closure_analysis/run_pass/multivariant.rs +++ b/tests/ui/closures/2229_closure_analysis/run_pass/multivariant.rs @@ -1,8 +1,8 @@ // Test precise capture of a multi-variant enum (when remaining variants are // visibly uninhabited). -// revisions: min_exhaustive_patterns exhaustive_patterns -// edition:2021 -// run-pass +//@ revisions: min_exhaustive_patterns exhaustive_patterns +//@ edition:2021 +//@ run-pass #![cfg_attr(exhaustive_patterns, feature(exhaustive_patterns))] #![cfg_attr(min_exhaustive_patterns, feature(min_exhaustive_patterns))] //[min_exhaustive_patterns]~^ WARN the feature `min_exhaustive_patterns` is incomplete diff --git a/tests/ui/closures/2229_closure_analysis/run_pass/mut_ref.rs b/tests/ui/closures/2229_closure_analysis/run_pass/mut_ref.rs index 9f0c4d96aa5..3106908c621 100644 --- a/tests/ui/closures/2229_closure_analysis/run_pass/mut_ref.rs +++ b/tests/ui/closures/2229_closure_analysis/run_pass/mut_ref.rs @@ -1,5 +1,5 @@ -// edition:2021 -// run-pass +//@ edition:2021 +//@ run-pass // Test that we can mutate a place through a mut-borrow // that is captured by the closure diff --git a/tests/ui/closures/2229_closure_analysis/run_pass/mut_ref_struct_mem.rs b/tests/ui/closures/2229_closure_analysis/run_pass/mut_ref_struct_mem.rs index a85335438a9..4897598fc53 100644 --- a/tests/ui/closures/2229_closure_analysis/run_pass/mut_ref_struct_mem.rs +++ b/tests/ui/closures/2229_closure_analysis/run_pass/mut_ref_struct_mem.rs @@ -1,5 +1,5 @@ -// edition:2021 -// run-pass +//@ edition:2021 +//@ run-pass // Test that we can mutate a place through a mut-borrow // that is captured by the closure diff --git a/tests/ui/closures/2229_closure_analysis/run_pass/nested-closure.rs b/tests/ui/closures/2229_closure_analysis/run_pass/nested-closure.rs index a80b40bb469..d0370d71610 100644 --- a/tests/ui/closures/2229_closure_analysis/run_pass/nested-closure.rs +++ b/tests/ui/closures/2229_closure_analysis/run_pass/nested-closure.rs @@ -1,5 +1,5 @@ -// edition:2021 -// run-pass +//@ edition:2021 +//@ run-pass // Test whether if we can do precise capture when using nested clsoure. diff --git a/tests/ui/closures/2229_closure_analysis/run_pass/struct-pattern-matching-with-methods.rs b/tests/ui/closures/2229_closure_analysis/run_pass/struct-pattern-matching-with-methods.rs index ed222b3148f..df42b80cfa4 100644 --- a/tests/ui/closures/2229_closure_analysis/run_pass/struct-pattern-matching-with-methods.rs +++ b/tests/ui/closures/2229_closure_analysis/run_pass/struct-pattern-matching-with-methods.rs @@ -1,5 +1,5 @@ -// edition:2021 -//check-pass +//@ edition:2021 +//@check-pass #![warn(unused)] #![allow(dead_code)] #![feature(rustc_attrs)] diff --git a/tests/ui/closures/2229_closure_analysis/run_pass/tuple-struct-pattern-matching-with-methods.rs b/tests/ui/closures/2229_closure_analysis/run_pass/tuple-struct-pattern-matching-with-methods.rs index f3f44433ccf..758e5f9d98f 100644 --- a/tests/ui/closures/2229_closure_analysis/run_pass/tuple-struct-pattern-matching-with-methods.rs +++ b/tests/ui/closures/2229_closure_analysis/run_pass/tuple-struct-pattern-matching-with-methods.rs @@ -1,5 +1,5 @@ -// edition:2021 -//check-pass +//@ edition:2021 +//@check-pass #[derive(Copy, Clone)] enum PointType { diff --git a/tests/ui/closures/2229_closure_analysis/run_pass/unsafe_ptr.rs b/tests/ui/closures/2229_closure_analysis/run_pass/unsafe_ptr.rs index 3f7ddf93f06..2af9b8d7088 100644 --- a/tests/ui/closures/2229_closure_analysis/run_pass/unsafe_ptr.rs +++ b/tests/ui/closures/2229_closure_analysis/run_pass/unsafe_ptr.rs @@ -1,5 +1,5 @@ -// edition:2021 -// run-pass +//@ edition:2021 +//@ run-pass // Test that we can use raw ptrs when using `capture_disjoint_fields`. diff --git a/tests/ui/closures/2229_closure_analysis/run_pass/use_of_mutable_borrow_and_fake_reads.rs b/tests/ui/closures/2229_closure_analysis/run_pass/use_of_mutable_borrow_and_fake_reads.rs index 0206927cc59..659ee34c6ea 100644 --- a/tests/ui/closures/2229_closure_analysis/run_pass/use_of_mutable_borrow_and_fake_reads.rs +++ b/tests/ui/closures/2229_closure_analysis/run_pass/use_of_mutable_borrow_and_fake_reads.rs @@ -1,5 +1,5 @@ -// edition:2021 -//check-pass +//@ edition:2021 +//@check-pass #![feature(rustc_attrs)] fn main() { diff --git a/tests/ui/closures/2229_closure_analysis/simple-struct-min-capture.rs b/tests/ui/closures/2229_closure_analysis/simple-struct-min-capture.rs index 03b70383e54..4b749a70577 100644 --- a/tests/ui/closures/2229_closure_analysis/simple-struct-min-capture.rs +++ b/tests/ui/closures/2229_closure_analysis/simple-struct-min-capture.rs @@ -1,4 +1,4 @@ -// edition:2021 +//@ edition:2021 #![feature(rustc_attrs)] diff --git a/tests/ui/closures/2229_closure_analysis/unique-borrows-are-invariant-1.rs b/tests/ui/closures/2229_closure_analysis/unique-borrows-are-invariant-1.rs index f21ef43fb7c..193ed98daa9 100644 --- a/tests/ui/closures/2229_closure_analysis/unique-borrows-are-invariant-1.rs +++ b/tests/ui/closures/2229_closure_analysis/unique-borrows-are-invariant-1.rs @@ -1,4 +1,4 @@ -// edition:2021 +//@ edition:2021 // regression test for #112056 diff --git a/tests/ui/closures/2229_closure_analysis/unique-borrows-are-invariant-2.rs b/tests/ui/closures/2229_closure_analysis/unique-borrows-are-invariant-2.rs index dd9d986c208..03a208b8c26 100644 --- a/tests/ui/closures/2229_closure_analysis/unique-borrows-are-invariant-2.rs +++ b/tests/ui/closures/2229_closure_analysis/unique-borrows-are-invariant-2.rs @@ -1,4 +1,4 @@ -// edition:2021 +//@ edition:2021 // regression test for #112056 diff --git a/tests/ui/closures/2229_closure_analysis/unsafe_ptr.rs b/tests/ui/closures/2229_closure_analysis/unsafe_ptr.rs index 1f87c9b9992..33d43c5f526 100644 --- a/tests/ui/closures/2229_closure_analysis/unsafe_ptr.rs +++ b/tests/ui/closures/2229_closure_analysis/unsafe_ptr.rs @@ -1,4 +1,4 @@ -// edition:2021 +//@ edition:2021 // Test that we restrict precision of a capture when we access a raw ptr, // i.e. the capture doesn't deref the raw ptr. diff --git a/tests/ui/closures/2229_closure_analysis/wild_patterns.rs b/tests/ui/closures/2229_closure_analysis/wild_patterns.rs index 12695929fce..9adf20c21d5 100644 --- a/tests/ui/closures/2229_closure_analysis/wild_patterns.rs +++ b/tests/ui/closures/2229_closure_analysis/wild_patterns.rs @@ -1,4 +1,4 @@ -// edition:2021 +//@ edition:2021 #![feature(rustc_attrs)] diff --git a/tests/ui/closures/binder/async-closure-with-binder.rs b/tests/ui/closures/binder/async-closure-with-binder.rs index 69d30f369e9..24f4e8e4175 100644 --- a/tests/ui/closures/binder/async-closure-with-binder.rs +++ b/tests/ui/closures/binder/async-closure-with-binder.rs @@ -1,5 +1,5 @@ -// edition:2021 -// check-pass +//@ edition:2021 +//@ check-pass #![feature(closure_lifetime_binder)] #![feature(async_closure)] diff --git a/tests/ui/closures/binder/bounds-on-closure-type-binders.rs b/tests/ui/closures/binder/bounds-on-closure-type-binders.rs index 099047251ca..cf53241407f 100644 --- a/tests/ui/closures/binder/bounds-on-closure-type-binders.rs +++ b/tests/ui/closures/binder/bounds-on-closure-type-binders.rs @@ -1,4 +1,4 @@ -// check-fail +//@ check-fail #![allow(incomplete_features)] #![feature(non_lifetime_binders)] diff --git a/tests/ui/closures/binder/late-bound-in-body.rs b/tests/ui/closures/binder/late-bound-in-body.rs index bb5c7552fda..335fd75d99b 100644 --- a/tests/ui/closures/binder/late-bound-in-body.rs +++ b/tests/ui/closures/binder/late-bound-in-body.rs @@ -1,4 +1,4 @@ -// check-pass +//@ check-pass #![feature(closure_lifetime_binder)] diff --git a/tests/ui/closures/binder/nested-closures-regions.rs b/tests/ui/closures/binder/nested-closures-regions.rs index 6bfc6c80b78..f1febee43bb 100644 --- a/tests/ui/closures/binder/nested-closures-regions.rs +++ b/tests/ui/closures/binder/nested-closures-regions.rs @@ -1,4 +1,4 @@ -// check-pass +//@ check-pass #![feature(closure_lifetime_binder)] #![feature(rustc_attrs)] diff --git a/tests/ui/closures/binder/nested-closures.rs b/tests/ui/closures/binder/nested-closures.rs index b3c36e7eebb..072d615cfa9 100644 --- a/tests/ui/closures/binder/nested-closures.rs +++ b/tests/ui/closures/binder/nested-closures.rs @@ -1,4 +1,4 @@ -// check-pass +//@ check-pass #![feature(closure_lifetime_binder)] diff --git a/tests/ui/closures/capture-unsized-by-move.rs b/tests/ui/closures/capture-unsized-by-move.rs index 1148e34ac67..72f6a5501e8 100644 --- a/tests/ui/closures/capture-unsized-by-move.rs +++ b/tests/ui/closures/capture-unsized-by-move.rs @@ -1,4 +1,4 @@ -// compile-flags: --crate-type=lib +//@ compile-flags: --crate-type=lib #![feature(unsized_fn_params)] diff --git a/tests/ui/closures/capture-unsized-by-ref.rs b/tests/ui/closures/capture-unsized-by-ref.rs index c9e4a5903d9..d24649858db 100644 --- a/tests/ui/closures/capture-unsized-by-ref.rs +++ b/tests/ui/closures/capture-unsized-by-ref.rs @@ -1,5 +1,5 @@ -// build-pass -// compile-flags: --crate-type=lib +//@ build-pass +//@ compile-flags: --crate-type=lib #![feature(unsized_fn_params)] diff --git a/tests/ui/closures/closure-immutable-outer-variable.fixed b/tests/ui/closures/closure-immutable-outer-variable.fixed index 1b0feede34e..ec43471fe05 100644 --- a/tests/ui/closures/closure-immutable-outer-variable.fixed +++ b/tests/ui/closures/closure-immutable-outer-variable.fixed @@ -1,4 +1,4 @@ -// run-rustfix +//@ run-rustfix // Point at the captured immutable outer variable diff --git a/tests/ui/closures/closure-immutable-outer-variable.rs b/tests/ui/closures/closure-immutable-outer-variable.rs index 50ec1c6148a..6f1fc4c210d 100644 --- a/tests/ui/closures/closure-immutable-outer-variable.rs +++ b/tests/ui/closures/closure-immutable-outer-variable.rs @@ -1,4 +1,4 @@ -// run-rustfix +//@ run-rustfix // Point at the captured immutable outer variable diff --git a/tests/ui/closures/closure_no_cap_coerce_many_check_pass.rs b/tests/ui/closures/closure_no_cap_coerce_many_check_pass.rs index ce461810ec9..75197bfc67f 100644 --- a/tests/ui/closures/closure_no_cap_coerce_many_check_pass.rs +++ b/tests/ui/closures/closure_no_cap_coerce_many_check_pass.rs @@ -1,4 +1,4 @@ -// check-pass +//@ check-pass // Ensure non-capturing Closure passes CoerceMany. fn foo(x: usize) -> usize { 0 diff --git a/tests/ui/closures/closure_no_cap_coerce_many_run_pass.rs b/tests/ui/closures/closure_no_cap_coerce_many_run_pass.rs index 3c5fe8a5502..a5fe83a22dc 100644 --- a/tests/ui/closures/closure_no_cap_coerce_many_run_pass.rs +++ b/tests/ui/closures/closure_no_cap_coerce_many_run_pass.rs @@ -1,4 +1,4 @@ -// run-pass +//@ run-pass // Ensure non-capturing Closure passing CoerceMany work correctly. fn foo(_: usize) -> usize { 0 diff --git a/tests/ui/closures/closure_no_cap_coerce_many_unsafe_1.rs b/tests/ui/closures/closure_no_cap_coerce_many_unsafe_1.rs index a6d6125a1b9..3cf3793a8c9 100644 --- a/tests/ui/closures/closure_no_cap_coerce_many_unsafe_1.rs +++ b/tests/ui/closures/closure_no_cap_coerce_many_unsafe_1.rs @@ -1,4 +1,4 @@ -// run-pass +//@ run-pass // Ensure we get correct unsafe function after coercion unsafe fn add(a: i32, b: i32) -> i32 { a + b diff --git a/tests/ui/closures/closure_promotion.rs b/tests/ui/closures/closure_promotion.rs index 47a8fc0902d..c790e423a80 100644 --- a/tests/ui/closures/closure_promotion.rs +++ b/tests/ui/closures/closure_promotion.rs @@ -1,4 +1,4 @@ -// build-pass (FIXME(62277): could be check-pass?) +//@ build-pass (FIXME(62277): could be check-pass?) fn main() { let x: &'static _ = &|| { let z = 3; z }; diff --git a/tests/ui/closures/deeply-nested_closures.rs b/tests/ui/closures/deeply-nested_closures.rs index a02684ee1de..5407702f7c5 100644 --- a/tests/ui/closures/deeply-nested_closures.rs +++ b/tests/ui/closures/deeply-nested_closures.rs @@ -1,6 +1,6 @@ // Check that this can be compiled in a reasonable time. -// build-pass +//@ build-pass fn main() { // 96 nested closures diff --git a/tests/ui/closures/diverging-closure.rs b/tests/ui/closures/diverging-closure.rs index 1213a883ef0..dda829d8af4 100644 --- a/tests/ui/closures/diverging-closure.rs +++ b/tests/ui/closures/diverging-closure.rs @@ -1,6 +1,6 @@ -// run-fail -// error-pattern:oops -// ignore-emscripten no processes +//@ run-fail +//@ error-pattern:oops +//@ ignore-emscripten no processes fn main() { let func = || -> ! { diff --git a/tests/ui/closures/infer-signature-from-impl.rs b/tests/ui/closures/infer-signature-from-impl.rs index 8b18e4ef9e7..910e004ba31 100644 --- a/tests/ui/closures/infer-signature-from-impl.rs +++ b/tests/ui/closures/infer-signature-from-impl.rs @@ -1,7 +1,7 @@ -// revisions: current next -//[next] compile-flags: -Znext-solver -//[next] known-bug: trait-system-refactor-initiative#71 -//[current] check-pass +//@ revisions: current next +//@[next] compile-flags: -Znext-solver +//@[next] known-bug: trait-system-refactor-initiative#71 +//@[current] check-pass trait Foo {} fn needs_foo(_: T) diff --git a/tests/ui/closures/issue-101696.rs b/tests/ui/closures/issue-101696.rs index 0a358bd1643..5be7f184a7a 100644 --- a/tests/ui/closures/issue-101696.rs +++ b/tests/ui/closures/issue-101696.rs @@ -1,4 +1,4 @@ -// check-pass +//@ check-pass use std::marker::PhantomData; diff --git a/tests/ui/closures/issue-102089-multiple-opaque-cast.rs b/tests/ui/closures/issue-102089-multiple-opaque-cast.rs index 043bf06a1f5..1378556d453 100644 --- a/tests/ui/closures/issue-102089-multiple-opaque-cast.rs +++ b/tests/ui/closures/issue-102089-multiple-opaque-cast.rs @@ -1,5 +1,5 @@ -// edition:2021 -// check-pass +//@ edition:2021 +//@ check-pass pub struct Example<'a, T> { a: T, diff --git a/tests/ui/closures/issue-10682.rs b/tests/ui/closures/issue-10682.rs index 72e4559d31a..25636b9063b 100644 --- a/tests/ui/closures/issue-10682.rs +++ b/tests/ui/closures/issue-10682.rs @@ -1,8 +1,8 @@ -// run-pass +//@ run-pass // Regression test for issue #10682 // Nested `proc` usage can't use outer owned data -// pretty-expanded FIXME #23616 +//@ pretty-expanded FIXME #23616 fn work(_: Box) {} fn foo(_: F) {} diff --git a/tests/ui/closures/issue-23012-supertrait-signature-inference.rs b/tests/ui/closures/issue-23012-supertrait-signature-inference.rs index 5899b703e7c..732f687309c 100644 --- a/tests/ui/closures/issue-23012-supertrait-signature-inference.rs +++ b/tests/ui/closures/issue-23012-supertrait-signature-inference.rs @@ -1,4 +1,4 @@ -// check-pass +//@ check-pass // Checks that we can infer a closure signature even if the `FnOnce` bound is // a supertrait of the obligations we have currently registered for the Ty var. diff --git a/tests/ui/closures/issue-41366.rs b/tests/ui/closures/issue-41366.rs index acc1c6ae122..e2141c0dc13 100644 --- a/tests/ui/closures/issue-41366.rs +++ b/tests/ui/closures/issue-41366.rs @@ -1,4 +1,4 @@ -// check-pass +//@ check-pass trait T<'x> { type V; diff --git a/tests/ui/closures/issue-42463.rs b/tests/ui/closures/issue-42463.rs index 51d6ea3f7a8..d09a744bd7e 100644 --- a/tests/ui/closures/issue-42463.rs +++ b/tests/ui/closures/issue-42463.rs @@ -1,4 +1,4 @@ -// run-pass +//@ run-pass use std::ops::{Deref, DerefMut}; struct CheckedDeref { diff --git a/tests/ui/closures/issue-46742.rs b/tests/ui/closures/issue-46742.rs index cd8dc486906..72e429f7ec7 100644 --- a/tests/ui/closures/issue-46742.rs +++ b/tests/ui/closures/issue-46742.rs @@ -1,4 +1,4 @@ -// check-pass +//@ check-pass fn main() { let _: i32 = (match "" { "+" => ::std::ops::Add::add, diff --git a/tests/ui/closures/issue-48109.rs b/tests/ui/closures/issue-48109.rs index ce1f2a03647..c1557dab47a 100644 --- a/tests/ui/closures/issue-48109.rs +++ b/tests/ui/closures/issue-48109.rs @@ -1,4 +1,4 @@ -// check-pass +//@ check-pass fn useful(i: usize) -> usize { i } diff --git a/tests/ui/closures/issue-68025.rs b/tests/ui/closures/issue-68025.rs index 261bfd60aae..912fe5ecc5f 100644 --- a/tests/ui/closures/issue-68025.rs +++ b/tests/ui/closures/issue-68025.rs @@ -1,4 +1,4 @@ -// check-pass +//@ check-pass fn foo(_: G, _: Box) where diff --git a/tests/ui/closures/issue-72408-nested-closures-exponential.rs b/tests/ui/closures/issue-72408-nested-closures-exponential.rs index d064ebceffd..682508f9280 100644 --- a/tests/ui/closures/issue-72408-nested-closures-exponential.rs +++ b/tests/ui/closures/issue-72408-nested-closures-exponential.rs @@ -1,5 +1,5 @@ -// build-pass -// ignore-compare-mode-next-solver (hangs) +//@ build-pass +//@ ignore-compare-mode-next-solver (hangs) // Closures include captured types twice in a type tree. // diff --git a/tests/ui/closures/issue-868.rs b/tests/ui/closures/issue-868.rs index df03b191a99..170597b4bd5 100644 --- a/tests/ui/closures/issue-868.rs +++ b/tests/ui/closures/issue-868.rs @@ -1,7 +1,7 @@ -// run-pass +//@ run-pass #![allow(unused_parens)] #![allow(unit_bindings)] -// pretty-expanded FIXME #23616 +//@ pretty-expanded FIXME #23616 fn f(g: F) -> T where F: FnOnce() -> T { g() } diff --git a/tests/ui/closures/issue-87461.rs b/tests/ui/closures/issue-87461.rs index 0151080eeb4..cc5b10c544d 100644 --- a/tests/ui/closures/issue-87461.rs +++ b/tests/ui/closures/issue-87461.rs @@ -1,6 +1,6 @@ // Regression test for #87461. -// edition:2021 +//@ edition:2021 async fn func() -> Result { let _ = async { diff --git a/tests/ui/closures/issue-87814-1.rs b/tests/ui/closures/issue-87814-1.rs index 5cf01ddf5d7..4506a8effaf 100644 --- a/tests/ui/closures/issue-87814-1.rs +++ b/tests/ui/closures/issue-87814-1.rs @@ -1,4 +1,4 @@ -// check-pass +//@ check-pass fn main() { let mut schema_all = vec![]; (0..42).for_each(|_x| match Err(()) as Result<(), _> { diff --git a/tests/ui/closures/issue-87814-2.rs b/tests/ui/closures/issue-87814-2.rs index efe77f90f06..8035adbeb03 100644 --- a/tests/ui/closures/issue-87814-2.rs +++ b/tests/ui/closures/issue-87814-2.rs @@ -1,4 +1,4 @@ -// check-pass +//@ check-pass fn main() { let mut schema_all: (Vec, Vec) = (vec![], vec![]); diff --git a/tests/ui/closures/issue-97607.rs b/tests/ui/closures/issue-97607.rs index 74c910ad0bb..6dccf8113d6 100644 --- a/tests/ui/closures/issue-97607.rs +++ b/tests/ui/closures/issue-97607.rs @@ -1,4 +1,4 @@ -// check-pass +//@ check-pass #[allow(unused)] fn test(f: F) -> Box U + 'static> diff --git a/tests/ui/closures/local-type-mix.rs b/tests/ui/closures/local-type-mix.rs index 006e6f490f0..823ceb211a3 100644 --- a/tests/ui/closures/local-type-mix.rs +++ b/tests/ui/closures/local-type-mix.rs @@ -1,5 +1,5 @@ // Check that using the parameter name in its type does not ICE. -// edition:2018 +//@ edition:2018 #![feature(async_closure)] diff --git a/tests/ui/closures/old-closure-arg-call-as.rs b/tests/ui/closures/old-closure-arg-call-as.rs index 87cf3a487bf..23def1c990e 100644 --- a/tests/ui/closures/old-closure-arg-call-as.rs +++ b/tests/ui/closures/old-closure-arg-call-as.rs @@ -1,4 +1,4 @@ -// run-pass +//@ run-pass #![allow(non_snake_case)] diff --git a/tests/ui/closures/old-closure-arg.rs b/tests/ui/closures/old-closure-arg.rs index bd1385e5c33..6d68d95f891 100644 --- a/tests/ui/closures/old-closure-arg.rs +++ b/tests/ui/closures/old-closure-arg.rs @@ -1,4 +1,4 @@ -// run-pass +//@ run-pass // Check usage and precedence of block arguments in expressions: pub fn main() { let v = vec![-1.0f64, 0.0, 1.0, 2.0, 3.0]; diff --git a/tests/ui/closures/old-closure-explicit-types.rs b/tests/ui/closures/old-closure-explicit-types.rs index 860fcc8df21..0c3a88bf871 100644 --- a/tests/ui/closures/old-closure-explicit-types.rs +++ b/tests/ui/closures/old-closure-explicit-types.rs @@ -1,4 +1,4 @@ -// run-pass +//@ run-pass pub fn main() { fn as_buf(s: String, f: F) -> T where F: FnOnce(String) -> T { f(s) } diff --git a/tests/ui/closures/old-closure-expr-precedence.rs b/tests/ui/closures/old-closure-expr-precedence.rs index 13b2fe9c3d1..e0d3633e5c3 100644 --- a/tests/ui/closures/old-closure-expr-precedence.rs +++ b/tests/ui/closures/old-closure-expr-precedence.rs @@ -1,4 +1,4 @@ -// run-pass +//@ run-pass #![allow(unused_must_use)] #![allow(unused_parens)] diff --git a/tests/ui/closures/old-closure-expression-remove-semicolon.fixed b/tests/ui/closures/old-closure-expression-remove-semicolon.fixed index 8aa9e952b99..3b1032c03a7 100644 --- a/tests/ui/closures/old-closure-expression-remove-semicolon.fixed +++ b/tests/ui/closures/old-closure-expression-remove-semicolon.fixed @@ -1,4 +1,4 @@ -// run-rustfix +//@ run-rustfix fn foo() -> i32 { 0 diff --git a/tests/ui/closures/old-closure-expression-remove-semicolon.rs b/tests/ui/closures/old-closure-expression-remove-semicolon.rs index 912c7a3314a..edff1823d09 100644 --- a/tests/ui/closures/old-closure-expression-remove-semicolon.rs +++ b/tests/ui/closures/old-closure-expression-remove-semicolon.rs @@ -1,4 +1,4 @@ -// run-rustfix +//@ run-rustfix fn foo() -> i32 { 0 diff --git a/tests/ui/closures/old-closure-fn-coerce.rs b/tests/ui/closures/old-closure-fn-coerce.rs index d993ad99459..42b4f652234 100644 --- a/tests/ui/closures/old-closure-fn-coerce.rs +++ b/tests/ui/closures/old-closure-fn-coerce.rs @@ -1,4 +1,4 @@ -// run-pass +//@ run-pass #![allow(unused_braces)] fn force(f: F) -> isize where F: FnOnce() -> isize { return f(); } diff --git a/tests/ui/closures/old-closure-iter-1.rs b/tests/ui/closures/old-closure-iter-1.rs index caf0266cff1..34d49d0e0fe 100644 --- a/tests/ui/closures/old-closure-iter-1.rs +++ b/tests/ui/closures/old-closure-iter-1.rs @@ -1,4 +1,4 @@ -// run-pass +//@ run-pass fn iter_vec(v: Vec , mut f: F) where F: FnMut(&T) { for x in &v { f(x); } } diff --git a/tests/ui/closures/old-closure-iter-2.rs b/tests/ui/closures/old-closure-iter-2.rs index e90c1ee815a..cd38892a470 100644 --- a/tests/ui/closures/old-closure-iter-2.rs +++ b/tests/ui/closures/old-closure-iter-2.rs @@ -1,4 +1,4 @@ -// run-pass +//@ run-pass fn iter_vec(v: Vec, mut f: F) where F: FnMut(&T) { for x in &v { f(x); } } diff --git a/tests/ui/closures/once-move-out-on-heap.rs b/tests/ui/closures/once-move-out-on-heap.rs index 4e2e400cec0..37e5359aec9 100644 --- a/tests/ui/closures/once-move-out-on-heap.rs +++ b/tests/ui/closures/once-move-out-on-heap.rs @@ -1,4 +1,4 @@ -// run-pass +//@ run-pass // Testing guarantees provided by once functions. diff --git a/tests/ui/closures/print/closure-print-generic-trim-off-verbose-2.rs b/tests/ui/closures/print/closure-print-generic-trim-off-verbose-2.rs index b6c7659bc72..c74a7128fbf 100644 --- a/tests/ui/closures/print/closure-print-generic-trim-off-verbose-2.rs +++ b/tests/ui/closures/print/closure-print-generic-trim-off-verbose-2.rs @@ -1,4 +1,4 @@ -// compile-flags: -Ztrim-diagnostic-paths=off -Zverbose-internals +//@ compile-flags: -Ztrim-diagnostic-paths=off -Zverbose-internals mod mod1 { pub fn f(t: T) diff --git a/tests/ui/closures/print/closure-print-generic-verbose-1.rs b/tests/ui/closures/print/closure-print-generic-verbose-1.rs index 6c631fabaa2..e24fc670709 100644 --- a/tests/ui/closures/print/closure-print-generic-verbose-1.rs +++ b/tests/ui/closures/print/closure-print-generic-verbose-1.rs @@ -1,4 +1,4 @@ -// compile-flags: -Zverbose-internals +//@ compile-flags: -Zverbose-internals fn to_fn_once(f: F) -> F { f } diff --git a/tests/ui/closures/print/closure-print-generic-verbose-2.rs b/tests/ui/closures/print/closure-print-generic-verbose-2.rs index dcf7fb2865c..9b95e2604c1 100644 --- a/tests/ui/closures/print/closure-print-generic-verbose-2.rs +++ b/tests/ui/closures/print/closure-print-generic-verbose-2.rs @@ -1,4 +1,4 @@ -// compile-flags: -Zverbose-internals +//@ compile-flags: -Zverbose-internals mod mod1 { pub fn f(t: T) diff --git a/tests/ui/closures/print/closure-print-verbose.rs b/tests/ui/closures/print/closure-print-verbose.rs index 76fe5471a60..83613639ced 100644 --- a/tests/ui/closures/print/closure-print-verbose.rs +++ b/tests/ui/closures/print/closure-print-verbose.rs @@ -1,4 +1,4 @@ -// compile-flags: -Zverbose-internals +//@ compile-flags: -Zverbose-internals // Same as closure-coerce-fn-1.rs diff --git a/tests/ui/closures/self-supertrait-bounds.rs b/tests/ui/closures/self-supertrait-bounds.rs index f4f1cea6b81..965e183ea16 100644 --- a/tests/ui/closures/self-supertrait-bounds.rs +++ b/tests/ui/closures/self-supertrait-bounds.rs @@ -1,4 +1,4 @@ -// check-pass +//@ check-pass // Makes sure that we only consider `Self` supertrait predicates while // elaborating during closure signature deduction. diff --git a/tests/ui/closures/semistatement-in-lambda.rs b/tests/ui/closures/semistatement-in-lambda.rs index ebd55e0ba02..cfefa51b93e 100644 --- a/tests/ui/closures/semistatement-in-lambda.rs +++ b/tests/ui/closures/semistatement-in-lambda.rs @@ -1,4 +1,4 @@ -// run-pass +//@ run-pass #![allow(unused_must_use)] diff --git a/tests/ui/closures/static-closures-with-nonstatic-return.rs b/tests/ui/closures/static-closures-with-nonstatic-return.rs index b5f0684bae9..13dbc3f67f4 100644 --- a/tests/ui/closures/static-closures-with-nonstatic-return.rs +++ b/tests/ui/closures/static-closures-with-nonstatic-return.rs @@ -1,5 +1,5 @@ -// check-pass -// known-bug: #84366 +//@ check-pass +//@ known-bug: #84366 // Should fail. Associated types of 'static types should be `'static`, but // argument-free closures can be `'static` and return non-`'static` types. diff --git a/tests/ui/closures/supertrait-hint-cycle-2.rs b/tests/ui/closures/supertrait-hint-cycle-2.rs index fda81b18d1e..5bf850e3ef3 100644 --- a/tests/ui/closures/supertrait-hint-cycle-2.rs +++ b/tests/ui/closures/supertrait-hint-cycle-2.rs @@ -1,4 +1,4 @@ -// check-pass +//@ check-pass trait Foo<'a> { type Input; diff --git a/tests/ui/closures/supertrait-hint-cycle-3.rs b/tests/ui/closures/supertrait-hint-cycle-3.rs index 8149474df19..4003f679fa2 100644 --- a/tests/ui/closures/supertrait-hint-cycle-3.rs +++ b/tests/ui/closures/supertrait-hint-cycle-3.rs @@ -1,4 +1,4 @@ -// check-pass +//@ check-pass trait Foo<'a> { diff --git a/tests/ui/closures/supertrait-hint-cycle.rs b/tests/ui/closures/supertrait-hint-cycle.rs index dbb06b2ef7a..52c24a414ac 100644 --- a/tests/ui/closures/supertrait-hint-cycle.rs +++ b/tests/ui/closures/supertrait-hint-cycle.rs @@ -1,5 +1,5 @@ -// edition:2021 -// check-pass +//@ edition:2021 +//@ check-pass #![feature(type_alias_impl_trait)] #![feature(closure_lifetime_binder)] diff --git a/tests/ui/closures/supertrait-hint-references-assoc-ty.rs b/tests/ui/closures/supertrait-hint-references-assoc-ty.rs index 270bf14c35e..fa74ffc5bec 100644 --- a/tests/ui/closures/supertrait-hint-references-assoc-ty.rs +++ b/tests/ui/closures/supertrait-hint-references-assoc-ty.rs @@ -1,4 +1,4 @@ -// check-pass +//@ check-pass pub trait Fn0: Fn(i32) -> Self::Out { type Out; diff --git a/tests/ui/closures/thir-unsafeck-issue-85871.rs b/tests/ui/closures/thir-unsafeck-issue-85871.rs index a4a487c4dc2..270a004f042 100644 --- a/tests/ui/closures/thir-unsafeck-issue-85871.rs +++ b/tests/ui/closures/thir-unsafeck-issue-85871.rs @@ -1,6 +1,6 @@ // Tests that no ICE occurs when a closure appears inside a node // that does not have a body when compiling with -// check-pass +//@ check-pass #![allow(dead_code)] diff --git a/tests/ui/cmse-nonsecure/cmse-nonsecure-call/params-on-registers.rs b/tests/ui/cmse-nonsecure/cmse-nonsecure-call/params-on-registers.rs index bbc039bdf5c..364d0858afb 100644 --- a/tests/ui/cmse-nonsecure/cmse-nonsecure-call/params-on-registers.rs +++ b/tests/ui/cmse-nonsecure/cmse-nonsecure-call/params-on-registers.rs @@ -1,6 +1,6 @@ -// build-pass -// compile-flags: --target thumbv8m.main-none-eabi --crate-type lib -// needs-llvm-components: arm +//@ build-pass +//@ compile-flags: --target thumbv8m.main-none-eabi --crate-type lib +//@ needs-llvm-components: arm #![feature(abi_c_cmse_nonsecure_call, no_core, lang_items, intrinsics)] #![no_core] #[lang="sized"] diff --git a/tests/ui/cmse-nonsecure/cmse-nonsecure-call/params-on-stack.rs b/tests/ui/cmse-nonsecure/cmse-nonsecure-call/params-on-stack.rs index b8112b20a54..c225a26c065 100644 --- a/tests/ui/cmse-nonsecure/cmse-nonsecure-call/params-on-stack.rs +++ b/tests/ui/cmse-nonsecure/cmse-nonsecure-call/params-on-stack.rs @@ -1,6 +1,6 @@ -// build-fail -// compile-flags: --target thumbv8m.main-none-eabi --crate-type lib -// needs-llvm-components: arm +//@ build-fail +//@ compile-flags: --target thumbv8m.main-none-eabi --crate-type lib +//@ needs-llvm-components: arm #![feature(abi_c_cmse_nonsecure_call, no_core, lang_items, intrinsics)] #![no_core] #[lang="sized"] diff --git a/tests/ui/cmse-nonsecure/cmse-nonsecure-call/wrong-abi-location-1.rs b/tests/ui/cmse-nonsecure/cmse-nonsecure-call/wrong-abi-location-1.rs index f32b3709002..3265cf4146d 100644 --- a/tests/ui/cmse-nonsecure/cmse-nonsecure-call/wrong-abi-location-1.rs +++ b/tests/ui/cmse-nonsecure/cmse-nonsecure-call/wrong-abi-location-1.rs @@ -1,5 +1,5 @@ -// compile-flags: --target thumbv8m.main-none-eabi --crate-type lib -// needs-llvm-components: arm +//@ compile-flags: --target thumbv8m.main-none-eabi --crate-type lib +//@ needs-llvm-components: arm #![feature(abi_c_cmse_nonsecure_call, lang_items, no_core)] #![no_core] #[lang="sized"] diff --git a/tests/ui/cmse-nonsecure/cmse-nonsecure-call/wrong-abi-location-2.rs b/tests/ui/cmse-nonsecure/cmse-nonsecure-call/wrong-abi-location-2.rs index 6f8bb24aa69..b47471c6ad7 100644 --- a/tests/ui/cmse-nonsecure/cmse-nonsecure-call/wrong-abi-location-2.rs +++ b/tests/ui/cmse-nonsecure/cmse-nonsecure-call/wrong-abi-location-2.rs @@ -1,5 +1,5 @@ -// compile-flags: --target thumbv8m.main-none-eabi --crate-type lib -// needs-llvm-components: arm +//@ compile-flags: --target thumbv8m.main-none-eabi --crate-type lib +//@ needs-llvm-components: arm #![feature(abi_c_cmse_nonsecure_call, lang_items, no_core)] #![no_core] #[lang="sized"] diff --git a/tests/ui/cmse-nonsecure/cmse-nonsecure-entry/params-on-registers.rs b/tests/ui/cmse-nonsecure/cmse-nonsecure-entry/params-on-registers.rs index 5591a8a5864..e197f94096d 100644 --- a/tests/ui/cmse-nonsecure/cmse-nonsecure-entry/params-on-registers.rs +++ b/tests/ui/cmse-nonsecure/cmse-nonsecure-entry/params-on-registers.rs @@ -1,6 +1,6 @@ -// build-pass -// compile-flags: --target thumbv8m.main-none-eabi --crate-type lib -// needs-llvm-components: arm +//@ build-pass +//@ compile-flags: --target thumbv8m.main-none-eabi --crate-type lib +//@ needs-llvm-components: arm #![feature(cmse_nonsecure_entry, no_core, lang_items)] #![no_core] #[lang="sized"] diff --git a/tests/ui/cmse-nonsecure/cmse-nonsecure-entry/params-on-stack.rs b/tests/ui/cmse-nonsecure/cmse-nonsecure-entry/params-on-stack.rs index 39b41dac41f..e2da3ebb6ae 100644 --- a/tests/ui/cmse-nonsecure/cmse-nonsecure-entry/params-on-stack.rs +++ b/tests/ui/cmse-nonsecure/cmse-nonsecure-entry/params-on-stack.rs @@ -1,6 +1,6 @@ -// build-fail -// compile-flags: --target thumbv8m.main-none-eabi --crate-type lib -// needs-llvm-components: arm +//@ build-fail +//@ compile-flags: --target thumbv8m.main-none-eabi --crate-type lib +//@ needs-llvm-components: arm #![feature(cmse_nonsecure_entry, no_core, lang_items)] #![no_core] #[lang="sized"] diff --git a/tests/ui/cmse-nonsecure/cmse-nonsecure-entry/trustzone-only.rs b/tests/ui/cmse-nonsecure/cmse-nonsecure-entry/trustzone-only.rs index 3783e279402..87eccb4fc6e 100644 --- a/tests/ui/cmse-nonsecure/cmse-nonsecure-entry/trustzone-only.rs +++ b/tests/ui/cmse-nonsecure/cmse-nonsecure-entry/trustzone-only.rs @@ -1,4 +1,4 @@ -// ignore-thumbv8m.main-none-eabi +//@ ignore-thumbv8m.main-none-eabi #![feature(cmse_nonsecure_entry)] #[no_mangle] diff --git a/tests/ui/cmse-nonsecure/cmse-nonsecure-entry/wrong-abi.rs b/tests/ui/cmse-nonsecure/cmse-nonsecure-entry/wrong-abi.rs index 72c14cd7a69..db4f90e9923 100644 --- a/tests/ui/cmse-nonsecure/cmse-nonsecure-entry/wrong-abi.rs +++ b/tests/ui/cmse-nonsecure/cmse-nonsecure-entry/wrong-abi.rs @@ -1,5 +1,5 @@ -// compile-flags: --target thumbv8m.main-none-eabi --crate-type lib -// needs-llvm-components: arm +//@ compile-flags: --target thumbv8m.main-none-eabi --crate-type lib +//@ needs-llvm-components: arm #![feature(cmse_nonsecure_entry, no_core, lang_items)] #![no_core] #[lang = "sized"] diff --git a/tests/ui/codegen/const-bool-bitcast.rs b/tests/ui/codegen/const-bool-bitcast.rs index 24ae76b9029..58db7859438 100644 --- a/tests/ui/codegen/const-bool-bitcast.rs +++ b/tests/ui/codegen/const-bool-bitcast.rs @@ -1,6 +1,6 @@ // This is a regression test for https://github.com/rust-lang/rust/issues/118047 -// build-pass -// compile-flags: -Zmir-opt-level=0 -Zmir-enable-passes=+DataflowConstProp +//@ build-pass +//@ compile-flags: -Zmir-opt-level=0 -Zmir-enable-passes=+DataflowConstProp #![crate_type = "lib"] diff --git a/tests/ui/codegen/freeze-on-polymorphic-projection.rs b/tests/ui/codegen/freeze-on-polymorphic-projection.rs index edc79f8fd94..f382a3780fc 100644 --- a/tests/ui/codegen/freeze-on-polymorphic-projection.rs +++ b/tests/ui/codegen/freeze-on-polymorphic-projection.rs @@ -1,5 +1,5 @@ -// build-pass -// compile-flags: -Copt-level=1 --crate-type=lib +//@ build-pass +//@ compile-flags: -Copt-level=1 --crate-type=lib #![feature(specialization)] //~^ WARN the feature `specialization` is incomplete diff --git a/tests/ui/codegen/init-large-type.rs b/tests/ui/codegen/init-large-type.rs index ce905572f2a..34b40693ab1 100644 --- a/tests/ui/codegen/init-large-type.rs +++ b/tests/ui/codegen/init-large-type.rs @@ -1,13 +1,13 @@ -// compile-flags: -O -// run-pass +//@ compile-flags: -O +//@ run-pass #![allow(unused_must_use)] // Makes sure that zero-initializing large types is reasonably fast, // Doing it incorrectly causes massive slowdown in LLVM during // optimisation. -// pretty-expanded FIXME #23616 -// ignore-emscripten no threads support +//@ pretty-expanded FIXME #23616 +//@ ignore-emscripten no threads support #![feature(intrinsics)] diff --git a/tests/ui/codegen/issue-101585-128bit-repeat.rs b/tests/ui/codegen/issue-101585-128bit-repeat.rs index c6a686597e9..18c02a33438 100644 --- a/tests/ui/codegen/issue-101585-128bit-repeat.rs +++ b/tests/ui/codegen/issue-101585-128bit-repeat.rs @@ -1,5 +1,5 @@ // Regression test for issue 101585. -// run-pass +//@ run-pass fn main() { fn min_array_ok() -> [i128; 1] { diff --git a/tests/ui/codegen/issue-16602-1.rs b/tests/ui/codegen/issue-16602-1.rs index dd64ee75b34..248050adb32 100644 --- a/tests/ui/codegen/issue-16602-1.rs +++ b/tests/ui/codegen/issue-16602-1.rs @@ -1,4 +1,4 @@ -// run-pass +//@ run-pass fn main() { let mut t = [1; 2]; t = [t[1] * 2, t[0] * 2]; diff --git a/tests/ui/codegen/issue-16602-2.rs b/tests/ui/codegen/issue-16602-2.rs index 6364630ffa9..333ea289b4a 100644 --- a/tests/ui/codegen/issue-16602-2.rs +++ b/tests/ui/codegen/issue-16602-2.rs @@ -1,4 +1,4 @@ -// run-pass +//@ run-pass struct A { pub x: u32, pub y: u32, diff --git a/tests/ui/codegen/issue-16602-3.rs b/tests/ui/codegen/issue-16602-3.rs index 2307cfb81c7..51fc4a370e2 100644 --- a/tests/ui/codegen/issue-16602-3.rs +++ b/tests/ui/codegen/issue-16602-3.rs @@ -1,4 +1,4 @@ -// run-pass +//@ run-pass #![allow(unused_variables)] #![allow(unused_assignments)] #[derive(Debug)] diff --git a/tests/ui/codegen/issue-28950.rs b/tests/ui/codegen/issue-28950.rs index 8b55f42f3f4..8e55172af6d 100644 --- a/tests/ui/codegen/issue-28950.rs +++ b/tests/ui/codegen/issue-28950.rs @@ -1,6 +1,6 @@ -// run-pass -// ignore-emscripten no threads -// compile-flags: -O +//@ run-pass +//@ ignore-emscripten no threads +//@ compile-flags: -O // Tests that the `vec!` macro does not overflow the stack when it is // given data larger than the stack. diff --git a/tests/ui/codegen/issue-55976.rs b/tests/ui/codegen/issue-55976.rs index fee54fc6206..e28d5ab114c 100644 --- a/tests/ui/codegen/issue-55976.rs +++ b/tests/ui/codegen/issue-55976.rs @@ -1,4 +1,4 @@ -// run-pass +//@ run-pass // ^-- The above is needed as this issue is related to LLVM/codegen. fn main() { diff --git a/tests/ui/codegen/issue-63787.rs b/tests/ui/codegen/issue-63787.rs index cba079b2315..b8de6d3c5c8 100644 --- a/tests/ui/codegen/issue-63787.rs +++ b/tests/ui/codegen/issue-63787.rs @@ -1,5 +1,5 @@ -// run-pass -// compile-flags: -O +//@ run-pass +//@ compile-flags: -O // Make sure that `Ref` and `RefMut` do not make false promises about aliasing, // because once they drop, their reference/pointer can alias other writes. diff --git a/tests/ui/codegen/issue-64401.rs b/tests/ui/codegen/issue-64401.rs index 53f85c63b53..02e5b8ac2ba 100644 --- a/tests/ui/codegen/issue-64401.rs +++ b/tests/ui/codegen/issue-64401.rs @@ -1,4 +1,4 @@ -// build-pass +//@ build-pass // The ICE didn't happen with `cargo check` but `cargo build`. use std::marker::PhantomData; diff --git a/tests/ui/codegen/issue-79865-llvm-miscompile.rs b/tests/ui/codegen/issue-79865-llvm-miscompile.rs index 6f994a5cb74..fbd9f0dd4fb 100644 --- a/tests/ui/codegen/issue-79865-llvm-miscompile.rs +++ b/tests/ui/codegen/issue-79865-llvm-miscompile.rs @@ -1,6 +1,6 @@ -// run-pass -// only-x86_64 -// compile-flags: -C opt-level=3 +//@ run-pass +//@ only-x86_64 +//@ compile-flags: -C opt-level=3 // Regression test for issue #79865. // The assertion will fail when compiled with Rust 1.56..=1.59 diff --git a/tests/ui/codegen/issue-82833-slice-miscompile.rs b/tests/ui/codegen/issue-82833-slice-miscompile.rs index 8cf6a3137e2..7723679dab1 100644 --- a/tests/ui/codegen/issue-82833-slice-miscompile.rs +++ b/tests/ui/codegen/issue-82833-slice-miscompile.rs @@ -1,5 +1,5 @@ -// run-pass -// compile-flags: -Ccodegen-units=1 -Cinline-threshold=0 -Clink-dead-code -Copt-level=0 -Cdebuginfo=2 +//@ run-pass +//@ compile-flags: -Ccodegen-units=1 -Cinline-threshold=0 -Clink-dead-code -Copt-level=0 -Cdebuginfo=2 // Make sure LLVM does not miscompile this. diff --git a/tests/ui/codegen/issue-82859-slice-miscompile.rs b/tests/ui/codegen/issue-82859-slice-miscompile.rs index b64eb499071..542eea0169b 100644 --- a/tests/ui/codegen/issue-82859-slice-miscompile.rs +++ b/tests/ui/codegen/issue-82859-slice-miscompile.rs @@ -1,5 +1,5 @@ -// run-pass -// compile-flags: -Copt-level=0 -Cdebuginfo=2 +//@ run-pass +//@ compile-flags: -Copt-level=0 -Cdebuginfo=2 // Make sure LLVM does not miscompile this. diff --git a/tests/ui/codegen/issue-88043-bb-does-not-have-terminator.rs b/tests/ui/codegen/issue-88043-bb-does-not-have-terminator.rs index 38dfca347c8..03ba826b186 100644 --- a/tests/ui/codegen/issue-88043-bb-does-not-have-terminator.rs +++ b/tests/ui/codegen/issue-88043-bb-does-not-have-terminator.rs @@ -1,5 +1,5 @@ -// build-pass -// compile-flags: -Copt-level=0 +//@ build-pass +//@ compile-flags: -Copt-level=0 // Regression test for #88043: LLVM crash when the RemoveZsts mir-opt pass is enabled. // We should not see the error: diff --git a/tests/ui/codegen/issue-97708.rs b/tests/ui/codegen/issue-97708.rs index 8cb28e9f1f6..bc44e579030 100644 --- a/tests/ui/codegen/issue-97708.rs +++ b/tests/ui/codegen/issue-97708.rs @@ -1,5 +1,5 @@ -// build-pass -// aux-build:issue-97708-aux.rs +//@ build-pass +//@ aux-build:issue-97708-aux.rs extern crate issue_97708_aux; use issue_97708_aux::TaskStub; diff --git a/tests/ui/codegen/issue-99551.rs b/tests/ui/codegen/issue-99551.rs index b223aff4e94..9bacbaa6edc 100644 --- a/tests/ui/codegen/issue-99551.rs +++ b/tests/ui/codegen/issue-99551.rs @@ -1,4 +1,4 @@ -// build-pass +//@ build-pass #![feature(trait_upcasting)] pub trait A {} diff --git a/tests/ui/codegen/llvm-pr32379.rs b/tests/ui/codegen/llvm-pr32379.rs index 8a1f03241b1..304a84255e2 100644 --- a/tests/ui/codegen/llvm-pr32379.rs +++ b/tests/ui/codegen/llvm-pr32379.rs @@ -1,5 +1,5 @@ -// run-pass -// aux-build:llvm_pr32379.rs +//@ run-pass +//@ aux-build:llvm_pr32379.rs // LLVM PR #32379 (https://bugs.llvm.org/show_bug.cgi?id=32379), which // applies to upstream LLVM 3.9.1, is known to cause rustc itself to be diff --git a/tests/ui/codegen/mismatched-data-layouts.rs b/tests/ui/codegen/mismatched-data-layouts.rs index 047ec155fdc..7d63895c65b 100644 --- a/tests/ui/codegen/mismatched-data-layouts.rs +++ b/tests/ui/codegen/mismatched-data-layouts.rs @@ -1,11 +1,11 @@ // This test checks that data layout mismatches emit an error. // -// build-fail -// needs-llvm-components: x86 -// compile-flags: --crate-type=lib --target={{src-base}}/codegen/mismatched-data-layout.json -Z unstable-options -// error-pattern: differs from LLVM target's -// normalize-stderr-test: "`, `[A-Za-z0-9-:]*`" -> "`, `normalized data layout`" -// normalize-stderr-test: "layout, `[A-Za-z0-9-:]*`" -> "layout, `normalized data layout`" +//@ build-fail +//@ needs-llvm-components: x86 +//@ compile-flags: --crate-type=lib --target={{src-base}}/codegen/mismatched-data-layout.json -Z unstable-options +//@ error-pattern: differs from LLVM target's +//@ normalize-stderr-test: "`, `[A-Za-z0-9-:]*`" -> "`, `normalized data layout`" +//@ normalize-stderr-test: "layout, `[A-Za-z0-9-:]*`" -> "layout, `normalized data layout`" #![feature(lang_items, no_core, auto_traits)] #![no_core] diff --git a/tests/ui/codegen/mono-impossible-2.rs b/tests/ui/codegen/mono-impossible-2.rs index 21eb2c9b2f2..d00bc1ddd5f 100644 --- a/tests/ui/codegen/mono-impossible-2.rs +++ b/tests/ui/codegen/mono-impossible-2.rs @@ -1,5 +1,5 @@ -//compile-flags: --crate-type=lib -Clink-dead-code=on -// build-pass +//@compile-flags: --crate-type=lib -Clink-dead-code=on +//@ build-pass // Make sure that we don't monomorphize the impossible method `<() as Visit>::visit`, // which does not hold under a reveal-all param env. diff --git a/tests/ui/codegen/mono-impossible.rs b/tests/ui/codegen/mono-impossible.rs index 1ea32ed2c4f..6e3c14bc7ad 100644 --- a/tests/ui/codegen/mono-impossible.rs +++ b/tests/ui/codegen/mono-impossible.rs @@ -1,5 +1,5 @@ -// compile-flags: -Clink-dead-code=on --crate-type=lib -// build-pass +//@ compile-flags: -Clink-dead-code=on --crate-type=lib +//@ build-pass // Make sure that we don't monomorphize the impossible method `<() as Visit>::visit`, // which does not hold under a reveal-all param env. diff --git a/tests/ui/codegen/overflow-during-mono.rs b/tests/ui/codegen/overflow-during-mono.rs index e45db18e407..919f1a8120e 100644 --- a/tests/ui/codegen/overflow-during-mono.rs +++ b/tests/ui/codegen/overflow-during-mono.rs @@ -1,4 +1,4 @@ -// build-fail +//@ build-fail //~^ ERROR overflow evaluating the requirement #![recursion_limit = "32"] diff --git a/tests/ui/codegen/subtyping-enforces-type-equality.rs b/tests/ui/codegen/subtyping-enforces-type-equality.rs index a5ffcb3f854..7d5228f5170 100644 --- a/tests/ui/codegen/subtyping-enforces-type-equality.rs +++ b/tests/ui/codegen/subtyping-enforces-type-equality.rs @@ -1,6 +1,6 @@ -// ignore-pass -// build-pass -// edition:2021 +//@ ignore-pass +//@ build-pass +//@ edition:2021 use std::future::Future; use std::pin::Pin; diff --git a/tests/ui/codegen/subtyping-impacts-selection-1.rs b/tests/ui/codegen/subtyping-impacts-selection-1.rs index 09e06f6d684..abce5f3783c 100644 --- a/tests/ui/codegen/subtyping-impacts-selection-1.rs +++ b/tests/ui/codegen/subtyping-impacts-selection-1.rs @@ -1,7 +1,7 @@ -// run-pass -// revisions: mir codegen -//[mir] compile-flags: -Zmir-opt-level=3 -//[codegen] compile-flags: -Zmir-opt-level=0 +//@ run-pass +//@ revisions: mir codegen +//@[mir] compile-flags: -Zmir-opt-level=3 +//@[codegen] compile-flags: -Zmir-opt-level=0 // A regression test for #107205 #![allow(coherence_leak_check)] diff --git a/tests/ui/codegen/subtyping-impacts-selection-2.rs b/tests/ui/codegen/subtyping-impacts-selection-2.rs index 921136775b7..8f87727d7f7 100644 --- a/tests/ui/codegen/subtyping-impacts-selection-2.rs +++ b/tests/ui/codegen/subtyping-impacts-selection-2.rs @@ -1,7 +1,7 @@ -// run-pass -// revisions: mir codegen -//[mir] compile-flags: -Zmir-opt-level=3 -//[codegen] compile-flags: -Zmir-opt-level=0 +//@ run-pass +//@ revisions: mir codegen +//@[mir] compile-flags: -Zmir-opt-level=3 +//@[codegen] compile-flags: -Zmir-opt-level=0 // A regression test for #107205 diff --git a/tests/ui/codegen/target-cpus.rs b/tests/ui/codegen/target-cpus.rs index 1dff3ee6011..85a940f9f74 100644 --- a/tests/ui/codegen/target-cpus.rs +++ b/tests/ui/codegen/target-cpus.rs @@ -1,4 +1,4 @@ -// needs-llvm-components: webassembly -// min-llvm-version: 17 -// compile-flags: --print=target-cpus --target=wasm32-unknown-unknown -// check-pass +//@ needs-llvm-components: webassembly +//@ min-llvm-version: 17 +//@ compile-flags: --print=target-cpus --target=wasm32-unknown-unknown +//@ check-pass diff --git a/tests/ui/codemap_tests/two_files_data.rs b/tests/ui/codemap_tests/two_files_data.rs index 6abeac0dd2e..a4e4cf7e896 100644 --- a/tests/ui/codemap_tests/two_files_data.rs +++ b/tests/ui/codemap_tests/two_files_data.rs @@ -1,4 +1,4 @@ -// ignore-test (auxiliary, used by other tests) +//@ ignore-test (auxiliary, used by other tests) trait Foo { } diff --git a/tests/ui/codemap_tests/unicode.expanded.stdout b/tests/ui/codemap_tests/unicode.expanded.stdout index d14bb42b2fd..eb53d12e94f 100644 --- a/tests/ui/codemap_tests/unicode.expanded.stdout +++ b/tests/ui/codemap_tests/unicode.expanded.stdout @@ -4,9 +4,9 @@ use ::std::prelude::rust_2015::*; #[macro_use] extern crate std; -// revisions: normal expanded -//[expanded] check-pass -//[expanded]compile-flags: -Zunpretty=expanded +//@ revisions: normal expanded +//@[expanded] check-pass +//@[expanded]compile-flags: -Zunpretty=expanded extern "路濫狼Ố́" fn foo() {} diff --git a/tests/ui/codemap_tests/unicode.rs b/tests/ui/codemap_tests/unicode.rs index 4df9a5270c3..73023e3c669 100644 --- a/tests/ui/codemap_tests/unicode.rs +++ b/tests/ui/codemap_tests/unicode.rs @@ -1,6 +1,6 @@ -// revisions: normal expanded -//[expanded] check-pass -//[expanded]compile-flags: -Zunpretty=expanded +//@ revisions: normal expanded +//@[expanded] check-pass +//@[expanded]compile-flags: -Zunpretty=expanded extern "路濫狼Ố́" fn foo() {} //[normal]~ ERROR invalid ABI diff --git a/tests/ui/codemap_tests/unicode_3.rs b/tests/ui/codemap_tests/unicode_3.rs index 34582de45cb..500c806e91d 100644 --- a/tests/ui/codemap_tests/unicode_3.rs +++ b/tests/ui/codemap_tests/unicode_3.rs @@ -1,4 +1,4 @@ -// check-pass +//@ check-pass fn main() { let s = "ZĶØAĶ‘Ķ¦Ķ’Ķ‹Ķ¤Ķ‘ĢšL̄͑͋Ĝͨ̈́̿͒̽̈́Ö́͛ͭ!Ģ"; while true { break; } //~ WARNING while_true diff --git a/tests/ui/coercion/coerce-block-tail-26978.rs b/tests/ui/coercion/coerce-block-tail-26978.rs index 01c8ab5a839..96e0cefb955 100644 --- a/tests/ui/coercion/coerce-block-tail-26978.rs +++ b/tests/ui/coercion/coerce-block-tail-26978.rs @@ -1,4 +1,4 @@ -// check-fail +//@ check-fail fn f(_: &i32) {} fn main() { diff --git a/tests/ui/coercion/coerce-block-tail-57749.rs b/tests/ui/coercion/coerce-block-tail-57749.rs index 79b5b33233b..144e12eed8e 100644 --- a/tests/ui/coercion/coerce-block-tail-57749.rs +++ b/tests/ui/coercion/coerce-block-tail-57749.rs @@ -1,4 +1,4 @@ -// check-fail +//@ check-fail use std::ops::Deref; fn main() { diff --git a/tests/ui/coercion/coerce-block-tail-83783.fixed b/tests/ui/coercion/coerce-block-tail-83783.fixed index 0df0a64ac96..2f0d1d218f3 100644 --- a/tests/ui/coercion/coerce-block-tail-83783.fixed +++ b/tests/ui/coercion/coerce-block-tail-83783.fixed @@ -1,5 +1,5 @@ -// run-rustfix -// edition:2018 +//@ run-rustfix +//@ edition:2018 fn _consume_reference(_: &T) {} async fn _foo() { diff --git a/tests/ui/coercion/coerce-block-tail-83783.rs b/tests/ui/coercion/coerce-block-tail-83783.rs index ee6036b4d67..ba124ce21db 100644 --- a/tests/ui/coercion/coerce-block-tail-83783.rs +++ b/tests/ui/coercion/coerce-block-tail-83783.rs @@ -1,5 +1,5 @@ -// run-rustfix -// edition:2018 +//@ run-rustfix +//@ edition:2018 fn _consume_reference(_: &T) {} async fn _foo() { diff --git a/tests/ui/coercion/coerce-block-tail-83850.rs b/tests/ui/coercion/coerce-block-tail-83850.rs index 77fdf999833..2d2d440c4e8 100644 --- a/tests/ui/coercion/coerce-block-tail-83850.rs +++ b/tests/ui/coercion/coerce-block-tail-83850.rs @@ -1,4 +1,4 @@ -// check-fail +//@ check-fail fn f(_: &[i32]) {} fn main() { diff --git a/tests/ui/coercion/coerce-block-tail.rs b/tests/ui/coercion/coerce-block-tail.rs index dcbcd376286..c0766df0541 100644 --- a/tests/ui/coercion/coerce-block-tail.rs +++ b/tests/ui/coercion/coerce-block-tail.rs @@ -1,4 +1,4 @@ -// check-fail +//@ check-fail fn main() { let _: &str = & { String::from("hahah")}; let _: &i32 = & { Box::new(1i32) }; diff --git a/tests/ui/coercion/coerce-expect-unsized.rs b/tests/ui/coercion/coerce-expect-unsized.rs index eeb8fe82346..ebf723be724 100644 --- a/tests/ui/coercion/coerce-expect-unsized.rs +++ b/tests/ui/coercion/coerce-expect-unsized.rs @@ -1,4 +1,4 @@ -// run-pass +//@ run-pass #![allow(unused_braces)] use std::cell::RefCell; diff --git a/tests/ui/coercion/coerce-issue-49593-box-never-windows.rs b/tests/ui/coercion/coerce-issue-49593-box-never-windows.rs index 95d3935caa9..b317841ab6e 100644 --- a/tests/ui/coercion/coerce-issue-49593-box-never-windows.rs +++ b/tests/ui/coercion/coerce-issue-49593-box-never-windows.rs @@ -1,7 +1,7 @@ -// revisions: nofallback fallback -// only-windows - the number of `Error` impls is platform-dependent -//[fallback] check-pass -//[nofallback] check-fail +//@ revisions: nofallback fallback +//@ only-windows - the number of `Error` impls is platform-dependent +//@[fallback] check-pass +//@[nofallback] check-fail #![feature(never_type)] #![cfg_attr(fallback, feature(never_type_fallback))] diff --git a/tests/ui/coercion/coerce-issue-49593-box-never.rs b/tests/ui/coercion/coerce-issue-49593-box-never.rs index 16efb65acb2..19a2c036fbc 100644 --- a/tests/ui/coercion/coerce-issue-49593-box-never.rs +++ b/tests/ui/coercion/coerce-issue-49593-box-never.rs @@ -1,7 +1,7 @@ -// revisions: nofallback fallback -// ignore-windows - the number of `Error` impls is platform-dependent -//[fallback] check-pass -//[nofallback] check-fail +//@ revisions: nofallback fallback +//@ ignore-windows - the number of `Error` impls is platform-dependent +//@[fallback] check-pass +//@[nofallback] check-fail #![feature(never_type)] #![cfg_attr(fallback, feature(never_type_fallback))] diff --git a/tests/ui/coercion/coerce-overloaded-autoderef.rs b/tests/ui/coercion/coerce-overloaded-autoderef.rs index d5484607c8b..0605f20e9a3 100644 --- a/tests/ui/coercion/coerce-overloaded-autoderef.rs +++ b/tests/ui/coercion/coerce-overloaded-autoderef.rs @@ -1,7 +1,7 @@ -// run-pass +//@ run-pass #![allow(unused_braces)] #![allow(dead_code)] -// pretty-expanded FIXME #23616 +//@ pretty-expanded FIXME #23616 use std::rc::Rc; diff --git a/tests/ui/coercion/coerce-reborrow-imm-ptr-arg.rs b/tests/ui/coercion/coerce-reborrow-imm-ptr-arg.rs index f033e1b5d2b..139c1d18d2b 100644 --- a/tests/ui/coercion/coerce-reborrow-imm-ptr-arg.rs +++ b/tests/ui/coercion/coerce-reborrow-imm-ptr-arg.rs @@ -1,6 +1,6 @@ -// run-pass +//@ run-pass #![allow(dead_code)] -// pretty-expanded FIXME #23616 +//@ pretty-expanded FIXME #23616 fn negate(x: &isize) -> isize { -*x diff --git a/tests/ui/coercion/coerce-reborrow-imm-ptr-rcvr.rs b/tests/ui/coercion/coerce-reborrow-imm-ptr-rcvr.rs index 64a365229cb..a4a197b8cd7 100644 --- a/tests/ui/coercion/coerce-reborrow-imm-ptr-rcvr.rs +++ b/tests/ui/coercion/coerce-reborrow-imm-ptr-rcvr.rs @@ -1,4 +1,4 @@ -// run-pass +//@ run-pass struct SpeechMaker { speeches: usize diff --git a/tests/ui/coercion/coerce-reborrow-imm-vec-arg.rs b/tests/ui/coercion/coerce-reborrow-imm-vec-arg.rs index c2aaae1c73e..d8edd8648c4 100644 --- a/tests/ui/coercion/coerce-reborrow-imm-vec-arg.rs +++ b/tests/ui/coercion/coerce-reborrow-imm-vec-arg.rs @@ -1,6 +1,6 @@ -// run-pass +//@ run-pass #![allow(dead_code)] -// pretty-expanded FIXME #23616 +//@ pretty-expanded FIXME #23616 fn sum(x: &[isize]) -> isize { let mut sum = 0; diff --git a/tests/ui/coercion/coerce-reborrow-imm-vec-rcvr.rs b/tests/ui/coercion/coerce-reborrow-imm-vec-rcvr.rs index 9a5652acf87..3d82692f0b3 100644 --- a/tests/ui/coercion/coerce-reborrow-imm-vec-rcvr.rs +++ b/tests/ui/coercion/coerce-reborrow-imm-vec-rcvr.rs @@ -1,4 +1,4 @@ -// run-pass +//@ run-pass fn bar(v: &mut [usize]) -> Vec { diff --git a/tests/ui/coercion/coerce-reborrow-multi-arg.rs b/tests/ui/coercion/coerce-reborrow-multi-arg.rs index 93cd0bb3e27..77e1e91bb5f 100644 --- a/tests/ui/coercion/coerce-reborrow-multi-arg.rs +++ b/tests/ui/coercion/coerce-reborrow-multi-arg.rs @@ -1,4 +1,4 @@ -// build-pass +//@ build-pass fn test(_a: T, _b: T) {} fn main() { diff --git a/tests/ui/coercion/coerce-reborrow-mut-ptr-arg.rs b/tests/ui/coercion/coerce-reborrow-mut-ptr-arg.rs index 76cd6793b3c..7a08e9fdbe5 100644 --- a/tests/ui/coercion/coerce-reborrow-mut-ptr-arg.rs +++ b/tests/ui/coercion/coerce-reborrow-mut-ptr-arg.rs @@ -1,5 +1,5 @@ -// run-pass -// pretty-expanded FIXME #23616 +//@ run-pass +//@ pretty-expanded FIXME #23616 struct SpeechMaker { speeches: usize diff --git a/tests/ui/coercion/coerce-reborrow-mut-ptr-rcvr.rs b/tests/ui/coercion/coerce-reborrow-mut-ptr-rcvr.rs index e6e7c3a51aa..fc41beb45cc 100644 --- a/tests/ui/coercion/coerce-reborrow-mut-ptr-rcvr.rs +++ b/tests/ui/coercion/coerce-reborrow-mut-ptr-rcvr.rs @@ -1,5 +1,5 @@ -// run-pass -// pretty-expanded FIXME #23616 +//@ run-pass +//@ pretty-expanded FIXME #23616 struct SpeechMaker { speeches: usize diff --git a/tests/ui/coercion/coerce-reborrow-mut-vec-arg.rs b/tests/ui/coercion/coerce-reborrow-mut-vec-arg.rs index 2635754f14d..0ff73068e59 100644 --- a/tests/ui/coercion/coerce-reborrow-mut-vec-arg.rs +++ b/tests/ui/coercion/coerce-reborrow-mut-vec-arg.rs @@ -1,4 +1,4 @@ -// run-pass +//@ run-pass fn reverse(v: &mut [usize]) { diff --git a/tests/ui/coercion/coerce-reborrow-mut-vec-rcvr.rs b/tests/ui/coercion/coerce-reborrow-mut-vec-rcvr.rs index c03336ea37a..5b6223ca8c8 100644 --- a/tests/ui/coercion/coerce-reborrow-mut-vec-rcvr.rs +++ b/tests/ui/coercion/coerce-reborrow-mut-vec-rcvr.rs @@ -1,4 +1,4 @@ -// run-pass +//@ run-pass fn bar(v: &mut [usize]) { diff --git a/tests/ui/coercion/coerce-unify-return.rs b/tests/ui/coercion/coerce-unify-return.rs index 95a7ee8fe0f..def42d9dc14 100644 --- a/tests/ui/coercion/coerce-unify-return.rs +++ b/tests/ui/coercion/coerce-unify-return.rs @@ -1,8 +1,8 @@ -// run-pass +//@ run-pass // Check that coercions unify the expected return type of a polymorphic // function call, instead of leaving the type variables as they were. -// pretty-expanded FIXME #23616 +//@ pretty-expanded FIXME #23616 struct Foo; impl Foo { diff --git a/tests/ui/coercion/coerce-unify.rs b/tests/ui/coercion/coerce-unify.rs index f1818f9bb5a..ae4088535aa 100644 --- a/tests/ui/coercion/coerce-unify.rs +++ b/tests/ui/coercion/coerce-unify.rs @@ -1,4 +1,4 @@ -// run-pass +//@ run-pass // Check that coercions can unify if-else, match arms and array elements. // Try to construct if-else chains, matches and arrays out of given expressions. diff --git a/tests/ui/coercion/coerce-unsize-subtype.rs b/tests/ui/coercion/coerce-unsize-subtype.rs index 45b53300c5b..5ef9a108892 100644 --- a/tests/ui/coercion/coerce-unsize-subtype.rs +++ b/tests/ui/coercion/coerce-unsize-subtype.rs @@ -1,6 +1,6 @@ -// run-pass +//@ run-pass #![allow(dead_code)] -// pretty-expanded FIXME #23616 +//@ pretty-expanded FIXME #23616 use std::rc::Rc; diff --git a/tests/ui/coercion/coercion-missing-tail-expected-type.fixed b/tests/ui/coercion/coercion-missing-tail-expected-type.fixed index 713e04774a0..62fff1344f2 100644 --- a/tests/ui/coercion/coercion-missing-tail-expected-type.fixed +++ b/tests/ui/coercion/coercion-missing-tail-expected-type.fixed @@ -1,5 +1,5 @@ // #41425 -- error message "mismatched types" has wrong types -// run-rustfix +//@ run-rustfix fn plus_one(x: i32) -> i32 { //~ ERROR mismatched types x + 1 diff --git a/tests/ui/coercion/coercion-missing-tail-expected-type.rs b/tests/ui/coercion/coercion-missing-tail-expected-type.rs index e14d79d8aca..894728c8109 100644 --- a/tests/ui/coercion/coercion-missing-tail-expected-type.rs +++ b/tests/ui/coercion/coercion-missing-tail-expected-type.rs @@ -1,5 +1,5 @@ // #41425 -- error message "mismatched types" has wrong types -// run-rustfix +//@ run-rustfix fn plus_one(x: i32) -> i32 { //~ ERROR mismatched types x + 1; diff --git a/tests/ui/coercion/issue-101066.rs b/tests/ui/coercion/issue-101066.rs index b658ed1e9ab..43ba5414659 100644 --- a/tests/ui/coercion/issue-101066.rs +++ b/tests/ui/coercion/issue-101066.rs @@ -1,4 +1,4 @@ -// check-pass +//@ check-pass use std::convert::TryFrom; diff --git a/tests/ui/coercion/issue-14589.rs b/tests/ui/coercion/issue-14589.rs index 6f95b30be06..b25ba3758e1 100644 --- a/tests/ui/coercion/issue-14589.rs +++ b/tests/ui/coercion/issue-14589.rs @@ -1,8 +1,8 @@ -// run-pass +//@ run-pass // All 3 expressions should work in that the argument gets // coerced to a trait object -// pretty-expanded FIXME #23616 +//@ pretty-expanded FIXME #23616 fn main() { send::>(Box::new(Output(0))); diff --git a/tests/ui/coercion/issue-26905-rpass.rs b/tests/ui/coercion/issue-26905-rpass.rs index 2d5827f476b..6ff3cbdaf99 100644 --- a/tests/ui/coercion/issue-26905-rpass.rs +++ b/tests/ui/coercion/issue-26905-rpass.rs @@ -1,4 +1,4 @@ -// run-pass +//@ run-pass #![feature(unsize, coerce_unsized)] // Verfies that PhantomData is ignored for DST coercions diff --git a/tests/ui/coercion/issue-36007.rs b/tests/ui/coercion/issue-36007.rs index 78812df870d..010ce108e4a 100644 --- a/tests/ui/coercion/issue-36007.rs +++ b/tests/ui/coercion/issue-36007.rs @@ -1,4 +1,4 @@ -// check-pass +//@ check-pass #![feature(coerce_unsized, unsize)] use std::marker::Unsize; diff --git a/tests/ui/coercion/issue-37655.rs b/tests/ui/coercion/issue-37655.rs index 416854d66f3..f282b773144 100644 --- a/tests/ui/coercion/issue-37655.rs +++ b/tests/ui/coercion/issue-37655.rs @@ -1,4 +1,4 @@ -// check-pass +//@ check-pass // Regression test for #37655. The problem was a false edge created by // coercion that wound up requiring that `'a` (in `split()`) outlive // `'b`, which shouldn't be necessary. diff --git a/tests/ui/coercion/issue-3794.rs b/tests/ui/coercion/issue-3794.rs index b1f028fbccb..f076035c3d5 100644 --- a/tests/ui/coercion/issue-3794.rs +++ b/tests/ui/coercion/issue-3794.rs @@ -1,4 +1,4 @@ -// run-pass +//@ run-pass #![allow(dead_code)] trait T { diff --git a/tests/ui/coercion/issue-39823.rs b/tests/ui/coercion/issue-39823.rs index 148cf527e7c..68554781761 100644 --- a/tests/ui/coercion/issue-39823.rs +++ b/tests/ui/coercion/issue-39823.rs @@ -1,5 +1,5 @@ -// run-pass -// aux-build:issue-39823.rs +//@ run-pass +//@ aux-build:issue-39823.rs extern crate issue_39823; use issue_39823::{RemoteC, RemoteG}; diff --git a/tests/ui/coercion/issue-88097.rs b/tests/ui/coercion/issue-88097.rs index e543e1bae92..f636323d623 100644 --- a/tests/ui/coercion/issue-88097.rs +++ b/tests/ui/coercion/issue-88097.rs @@ -2,7 +2,7 @@ // a function pointer, which caused an unnecessary error. Check that this // behavior has been fixed. -// check-pass +//@ check-pass fn peculiar() -> impl Fn(u8) -> u8 { return |x| x + 1 diff --git a/tests/ui/coercion/unsafe-coercion.rs b/tests/ui/coercion/unsafe-coercion.rs index 2478deeab0d..ca47dba9b38 100644 --- a/tests/ui/coercion/unsafe-coercion.rs +++ b/tests/ui/coercion/unsafe-coercion.rs @@ -1,4 +1,4 @@ -// run-pass +//@ run-pass // Check that safe fns are not a subtype of unsafe fns. diff --git a/tests/ui/coherence/coherence-all-remote.rs b/tests/ui/coherence/coherence-all-remote.rs index 5c3bfee822f..5c75dd1d2cd 100644 --- a/tests/ui/coherence/coherence-all-remote.rs +++ b/tests/ui/coherence/coherence-all-remote.rs @@ -1,4 +1,4 @@ -// aux-build:coherence_lib.rs +//@ aux-build:coherence_lib.rs extern crate coherence_lib as lib; use lib::Remote1; diff --git a/tests/ui/coherence/coherence-bigint-int.rs b/tests/ui/coherence/coherence-bigint-int.rs index 02945e9dade..0a9ddf5e2d1 100644 --- a/tests/ui/coherence/coherence-bigint-int.rs +++ b/tests/ui/coherence/coherence-bigint-int.rs @@ -1,7 +1,7 @@ -// run-pass -// aux-build:coherence_lib.rs +//@ run-pass +//@ aux-build:coherence_lib.rs -// pretty-expanded FIXME #23616 +//@ pretty-expanded FIXME #23616 extern crate coherence_lib as lib; use lib::Remote1; diff --git a/tests/ui/coherence/coherence-bigint-param.rs b/tests/ui/coherence/coherence-bigint-param.rs index c6543aaf67d..57e9f95dcaf 100644 --- a/tests/ui/coherence/coherence-bigint-param.rs +++ b/tests/ui/coherence/coherence-bigint-param.rs @@ -1,4 +1,4 @@ -// aux-build:coherence_lib.rs +//@ aux-build:coherence_lib.rs extern crate coherence_lib as lib; use lib::Remote1; diff --git a/tests/ui/coherence/coherence-bigint-vecint.rs b/tests/ui/coherence/coherence-bigint-vecint.rs index a5dba90be5c..6822c6c44b7 100644 --- a/tests/ui/coherence/coherence-bigint-vecint.rs +++ b/tests/ui/coherence/coherence-bigint-vecint.rs @@ -1,7 +1,7 @@ -// run-pass -// aux-build:coherence_lib.rs +//@ run-pass +//@ aux-build:coherence_lib.rs -// pretty-expanded FIXME #23616 +//@ pretty-expanded FIXME #23616 extern crate coherence_lib as lib; use lib::Remote1; diff --git a/tests/ui/coherence/coherence-blanket-conflicts-with-specific-cross-crate.rs b/tests/ui/coherence/coherence-blanket-conflicts-with-specific-cross-crate.rs index bccbac2ff16..d3253baa96d 100644 --- a/tests/ui/coherence/coherence-blanket-conflicts-with-specific-cross-crate.rs +++ b/tests/ui/coherence/coherence-blanket-conflicts-with-specific-cross-crate.rs @@ -1,4 +1,4 @@ -// aux-build:go_trait.rs +//@ aux-build:go_trait.rs extern crate go_trait; diff --git a/tests/ui/coherence/coherence-blanket.rs b/tests/ui/coherence/coherence-blanket.rs index 55fa89d7507..db10b8e654f 100644 --- a/tests/ui/coherence/coherence-blanket.rs +++ b/tests/ui/coherence/coherence-blanket.rs @@ -1,8 +1,8 @@ -// run-pass +//@ run-pass #![allow(unused_imports)] -// aux-build:coherence_lib.rs +//@ aux-build:coherence_lib.rs -// pretty-expanded FIXME #23616 +//@ pretty-expanded FIXME #23616 extern crate coherence_lib as lib; use lib::Remote1; diff --git a/tests/ui/coherence/coherence-covered-type-parameter.rs b/tests/ui/coherence/coherence-covered-type-parameter.rs index bb95c59d183..b6332a04424 100644 --- a/tests/ui/coherence/coherence-covered-type-parameter.rs +++ b/tests/ui/coherence/coherence-covered-type-parameter.rs @@ -1,8 +1,8 @@ -// run-pass +//@ run-pass #![allow(dead_code)] -// aux-build:coherence_lib.rs +//@ aux-build:coherence_lib.rs -// pretty-expanded FIXME #23616 +//@ pretty-expanded FIXME #23616 extern crate coherence_lib as lib; use lib::Remote; diff --git a/tests/ui/coherence/coherence-cow.rs b/tests/ui/coherence/coherence-cow.rs index 86a8d0963b8..af94964762a 100644 --- a/tests/ui/coherence/coherence-cow.rs +++ b/tests/ui/coherence/coherence-cow.rs @@ -1,8 +1,8 @@ -// revisions: re_a re_b re_c +//@ revisions: re_a re_b re_c #![cfg_attr(any(), re_a, re_b, re_c)] -// aux-build:coherence_lib.rs +//@ aux-build:coherence_lib.rs // Test that the `Pair` type reports an error if it contains type // parameters, even when they are covered by local types. This test diff --git a/tests/ui/coherence/coherence-cross-crate-conflict.rs b/tests/ui/coherence/coherence-cross-crate-conflict.rs index 588630957c9..bdb76375e01 100644 --- a/tests/ui/coherence/coherence-cross-crate-conflict.rs +++ b/tests/ui/coherence/coherence-cross-crate-conflict.rs @@ -1,7 +1,7 @@ // The error here is strictly due to orphan rules; the impl here // generalizes the one upstream -// aux-build:trait_impl_conflict.rs +//@ aux-build:trait_impl_conflict.rs extern crate trait_impl_conflict; use trait_impl_conflict::Foo; diff --git a/tests/ui/coherence/coherence-doesnt-use-infcx-evaluate.rs b/tests/ui/coherence/coherence-doesnt-use-infcx-evaluate.rs index 063826f1d54..7e53695f987 100644 --- a/tests/ui/coherence/coherence-doesnt-use-infcx-evaluate.rs +++ b/tests/ui/coherence/coherence-doesnt-use-infcx-evaluate.rs @@ -1,4 +1,4 @@ -// check-pass +//@ check-pass // issue: 113415 // Makes sure that coherence doesn't call any of the `predicate_may_hold`-esque fns, diff --git a/tests/ui/coherence/coherence-fundamental-trait-objects.rs b/tests/ui/coherence/coherence-fundamental-trait-objects.rs index dd127bf7f4b..82afb1b5e84 100644 --- a/tests/ui/coherence/coherence-fundamental-trait-objects.rs +++ b/tests/ui/coherence/coherence-fundamental-trait-objects.rs @@ -2,7 +2,7 @@ // treated as #[fundamental] types - the 2 meanings of #[fundamental] // are distinct. -// aux-build:coherence_fundamental_trait_lib.rs +//@ aux-build:coherence_fundamental_trait_lib.rs extern crate coherence_fundamental_trait_lib; diff --git a/tests/ui/coherence/coherence-impl-in-fn.rs b/tests/ui/coherence/coherence-impl-in-fn.rs index b9719731748..c391e87bf8d 100644 --- a/tests/ui/coherence/coherence-impl-in-fn.rs +++ b/tests/ui/coherence/coherence-impl-in-fn.rs @@ -1,4 +1,4 @@ -// run-pass +//@ run-pass #![allow(dead_code)] #![allow(non_camel_case_types)] diff --git a/tests/ui/coherence/coherence-iterator-vec-any-elem.rs b/tests/ui/coherence/coherence-iterator-vec-any-elem.rs index 43a0a5c4277..a406e4408a4 100644 --- a/tests/ui/coherence/coherence-iterator-vec-any-elem.rs +++ b/tests/ui/coherence/coherence-iterator-vec-any-elem.rs @@ -1,8 +1,8 @@ -// run-pass +//@ run-pass #![allow(dead_code)] -// aux-build:coherence_lib.rs +//@ aux-build:coherence_lib.rs -// pretty-expanded FIXME #23616 +//@ pretty-expanded FIXME #23616 extern crate coherence_lib as lib; use lib::Remote1; diff --git a/tests/ui/coherence/coherence-iterator-vec.rs b/tests/ui/coherence/coherence-iterator-vec.rs index 386fe40ac3c..29553484931 100644 --- a/tests/ui/coherence/coherence-iterator-vec.rs +++ b/tests/ui/coherence/coherence-iterator-vec.rs @@ -1,8 +1,8 @@ -// run-pass +//@ run-pass #![allow(dead_code)] -// aux-build:coherence_lib.rs +//@ aux-build:coherence_lib.rs -// pretty-expanded FIXME #23616 +//@ pretty-expanded FIXME #23616 extern crate coherence_lib as lib; use lib::Remote1; diff --git a/tests/ui/coherence/coherence-lone-type-parameter.rs b/tests/ui/coherence/coherence-lone-type-parameter.rs index 5368fef76d0..71d62cf39ef 100644 --- a/tests/ui/coherence/coherence-lone-type-parameter.rs +++ b/tests/ui/coherence/coherence-lone-type-parameter.rs @@ -1,4 +1,4 @@ -// aux-build:coherence_lib.rs +//@ aux-build:coherence_lib.rs extern crate coherence_lib as lib; use lib::Remote; diff --git a/tests/ui/coherence/coherence-multidispatch-tuple.rs b/tests/ui/coherence/coherence-multidispatch-tuple.rs index b04b2a296b5..ac7b2578d77 100644 --- a/tests/ui/coherence/coherence-multidispatch-tuple.rs +++ b/tests/ui/coherence/coherence-multidispatch-tuple.rs @@ -1,6 +1,6 @@ -// check-pass +//@ check-pass #![allow(unused_imports)] -// pretty-expanded FIXME #23616 +//@ pretty-expanded FIXME #23616 use std::fmt::Debug; use std::default::Default; diff --git a/tests/ui/coherence/coherence-negative-impls-copy.rs b/tests/ui/coherence/coherence-negative-impls-copy.rs index 7b29aade413..377d750f8ba 100644 --- a/tests/ui/coherence/coherence-negative-impls-copy.rs +++ b/tests/ui/coherence/coherence-negative-impls-copy.rs @@ -1,4 +1,4 @@ -// check-pass +//@ check-pass // regression test for issue #101836 #![feature(negative_impls, extern_types)] diff --git a/tests/ui/coherence/coherence-negative-impls-safe-rpass.rs b/tests/ui/coherence/coherence-negative-impls-safe-rpass.rs index d5306d59ed5..d69872ba8cf 100644 --- a/tests/ui/coherence/coherence-negative-impls-safe-rpass.rs +++ b/tests/ui/coherence/coherence-negative-impls-safe-rpass.rs @@ -1,6 +1,6 @@ -// run-pass +//@ run-pass #![allow(dead_code)] -// pretty-expanded FIXME #23616 +//@ pretty-expanded FIXME #23616 #![feature(negative_impls)] diff --git a/tests/ui/coherence/coherence-negative-inherent-where-bounds.rs b/tests/ui/coherence/coherence-negative-inherent-where-bounds.rs index 39ccaa6ac35..a54a8e1dc65 100644 --- a/tests/ui/coherence/coherence-negative-inherent-where-bounds.rs +++ b/tests/ui/coherence/coherence-negative-inherent-where-bounds.rs @@ -1,4 +1,4 @@ -// check-pass +//@ check-pass #![feature(negative_impls)] #![feature(rustc_attrs)] diff --git a/tests/ui/coherence/coherence-negative-inherent.rs b/tests/ui/coherence/coherence-negative-inherent.rs index a9e1acc8044..7fbad5931a8 100644 --- a/tests/ui/coherence/coherence-negative-inherent.rs +++ b/tests/ui/coherence/coherence-negative-inherent.rs @@ -1,4 +1,4 @@ -// check-pass +//@ check-pass #![feature(negative_impls)] #![feature(rustc_attrs)] diff --git a/tests/ui/coherence/coherence-negative-outlives-lifetimes.rs b/tests/ui/coherence/coherence-negative-outlives-lifetimes.rs index 531977d6dac..ae1000c6a47 100644 --- a/tests/ui/coherence/coherence-negative-outlives-lifetimes.rs +++ b/tests/ui/coherence/coherence-negative-outlives-lifetimes.rs @@ -1,6 +1,6 @@ -// revisions: stock with_negative_coherence +//@ revisions: stock with_negative_coherence -//[with_negative_coherence] known-bug: unknown +//@[with_negative_coherence] known-bug: unknown // Ideally this would work, but we don't use `&'a T` to imply that `T: 'a` // which is required for `&'a T: !MyPredicate` to hold. This is similar to the // test `negative-coherence-placeholder-region-constraints-on-unification.explicit.stderr` diff --git a/tests/ui/coherence/coherence-orphan.rs b/tests/ui/coherence/coherence-orphan.rs index 985cfe87161..c06705133c8 100644 --- a/tests/ui/coherence/coherence-orphan.rs +++ b/tests/ui/coherence/coherence-orphan.rs @@ -1,4 +1,4 @@ -// aux-build:coherence_orphan_lib.rs +//@ aux-build:coherence_orphan_lib.rs #![feature(negative_impls)] extern crate coherence_orphan_lib as lib; diff --git a/tests/ui/coherence/coherence-overlap-double-negative.rs b/tests/ui/coherence/coherence-overlap-double-negative.rs index 1ea0ddc7430..917760b0174 100644 --- a/tests/ui/coherence/coherence-overlap-double-negative.rs +++ b/tests/ui/coherence/coherence-overlap-double-negative.rs @@ -1,4 +1,4 @@ -// check-pass +//@ check-pass #![feature(negative_impls)] #![feature(with_negative_coherence)] diff --git a/tests/ui/coherence/coherence-overlap-downstream-inherent.rs b/tests/ui/coherence/coherence-overlap-downstream-inherent.rs index 94a7ecbe11f..3e90b7c7fdd 100644 --- a/tests/ui/coherence/coherence-overlap-downstream-inherent.rs +++ b/tests/ui/coherence/coherence-overlap-downstream-inherent.rs @@ -1,5 +1,5 @@ -// revisions: old next -//[next] compile-flags: -Znext-solver +//@ revisions: old next +//@[next] compile-flags: -Znext-solver // Tests that we consider `T: Sugar + Fruit` to be ambiguous, even // though no impls are found. diff --git a/tests/ui/coherence/coherence-overlap-downstream.rs b/tests/ui/coherence/coherence-overlap-downstream.rs index 171b2a32fc5..8b99296d12a 100644 --- a/tests/ui/coherence/coherence-overlap-downstream.rs +++ b/tests/ui/coherence/coherence-overlap-downstream.rs @@ -1,5 +1,5 @@ -// revisions: old next -//[next] compile-flags: -Znext-solver +//@ revisions: old next +//@[next] compile-flags: -Znext-solver // Tests that we consider `T: Sugar + Fruit` to be ambiguous, even // though no impls are found. diff --git a/tests/ui/coherence/coherence-overlap-issue-23516-inherent.rs b/tests/ui/coherence/coherence-overlap-issue-23516-inherent.rs index 6f5cc980491..53b0a40fa66 100644 --- a/tests/ui/coherence/coherence-overlap-issue-23516-inherent.rs +++ b/tests/ui/coherence/coherence-overlap-issue-23516-inherent.rs @@ -1,5 +1,5 @@ -// revisions: old next -//[next] compile-flags: -Znext-solver +//@ revisions: old next +//@[next] compile-flags: -Znext-solver // Tests that we consider `Box: !Sugar` to be ambiguous, even // though we see no impl of `Sugar` for `Box`. Therefore, an overlap diff --git a/tests/ui/coherence/coherence-overlap-issue-23516.rs b/tests/ui/coherence/coherence-overlap-issue-23516.rs index 4daaed4366f..620e00cd057 100644 --- a/tests/ui/coherence/coherence-overlap-issue-23516.rs +++ b/tests/ui/coherence/coherence-overlap-issue-23516.rs @@ -1,5 +1,5 @@ -// revisions: old next -//[next] compile-flags: -Znext-solver +//@ revisions: old next +//@[next] compile-flags: -Znext-solver // Tests that we consider `Box: !Sugar` to be ambiguous, even // though we see no impl of `Sugar` for `Box`. Therefore, an overlap diff --git a/tests/ui/coherence/coherence-overlap-negate-alias-strict.rs b/tests/ui/coherence/coherence-overlap-negate-alias-strict.rs index 48dffc921a3..4fe23fff12a 100644 --- a/tests/ui/coherence/coherence-overlap-negate-alias-strict.rs +++ b/tests/ui/coherence/coherence-overlap-negate-alias-strict.rs @@ -1,4 +1,4 @@ -// check-pass +//@ check-pass #![feature(negative_impls)] #![feature(rustc_attrs)] diff --git a/tests/ui/coherence/coherence-overlap-negate-strict.rs b/tests/ui/coherence/coherence-overlap-negate-strict.rs index 1021d87ca1b..2244c820d03 100644 --- a/tests/ui/coherence/coherence-overlap-negate-strict.rs +++ b/tests/ui/coherence/coherence-overlap-negate-strict.rs @@ -1,4 +1,4 @@ -// check-pass +//@ check-pass #![feature(negative_impls)] #![feature(rustc_attrs)] diff --git a/tests/ui/coherence/coherence-overlap-negate-use-feature-gate.rs b/tests/ui/coherence/coherence-overlap-negate-use-feature-gate.rs index a0dd881d1aa..a0ddbc36cbb 100644 --- a/tests/ui/coherence/coherence-overlap-negate-use-feature-gate.rs +++ b/tests/ui/coherence/coherence-overlap-negate-use-feature-gate.rs @@ -1,4 +1,4 @@ -// check-pass +//@ check-pass #![feature(with_negative_coherence)] diff --git a/tests/ui/coherence/coherence-overlap-negative-impls.rs b/tests/ui/coherence/coherence-overlap-negative-impls.rs index cd1df53a528..9a85d8c5a63 100644 --- a/tests/ui/coherence/coherence-overlap-negative-impls.rs +++ b/tests/ui/coherence/coherence-overlap-negative-impls.rs @@ -1,5 +1,5 @@ -// check-pass -// known-bug: #74629 +//@ check-pass +//@ known-bug: #74629 // Should fail. The `0` and `1` impls overlap, violating coherence. Eg, with // `T = Test, F = ()`, all bounds are true, making both impls applicable. diff --git a/tests/ui/coherence/coherence-overlap-negative-trait.rs b/tests/ui/coherence/coherence-overlap-negative-trait.rs index 8059d23ffd2..f026cf75d0b 100644 --- a/tests/ui/coherence/coherence-overlap-negative-trait.rs +++ b/tests/ui/coherence/coherence-overlap-negative-trait.rs @@ -1,5 +1,5 @@ -// check-pass -// aux-build:error_lib.rs +//@ check-pass +//@ aux-build:error_lib.rs // // Check that if we promise to not impl what would overlap it doesn't actually overlap diff --git a/tests/ui/coherence/coherence-overlap-negative-trait2.rs b/tests/ui/coherence/coherence-overlap-negative-trait2.rs index cc8c463b822..6b3a6fbd045 100644 --- a/tests/ui/coherence/coherence-overlap-negative-trait2.rs +++ b/tests/ui/coherence/coherence-overlap-negative-trait2.rs @@ -1,5 +1,5 @@ -// check-pass -// aux-build:option_future.rs +//@ check-pass +//@ aux-build:option_future.rs // // Check that if we promise to not impl what would overlap it doesn't actually overlap diff --git a/tests/ui/coherence/coherence-overlap-super-negative.rs b/tests/ui/coherence/coherence-overlap-super-negative.rs index d296a094a37..cca3d0ab36f 100644 --- a/tests/ui/coherence/coherence-overlap-super-negative.rs +++ b/tests/ui/coherence/coherence-overlap-super-negative.rs @@ -1,4 +1,4 @@ -// check-pass +//@ check-pass #![feature(negative_impls)] #![feature(rustc_attrs)] diff --git a/tests/ui/coherence/coherence-overlap-upstream-inherent.rs b/tests/ui/coherence/coherence-overlap-upstream-inherent.rs index 082d753debb..56cb8b0299f 100644 --- a/tests/ui/coherence/coherence-overlap-upstream-inherent.rs +++ b/tests/ui/coherence/coherence-overlap-upstream-inherent.rs @@ -1,7 +1,7 @@ // Tests that we consider `i16: Remote` to be ambiguous, even // though the upstream crate doesn't implement it for now. -// aux-build:coherence_lib.rs +//@ aux-build:coherence_lib.rs extern crate coherence_lib; diff --git a/tests/ui/coherence/coherence-overlap-upstream.rs b/tests/ui/coherence/coherence-overlap-upstream.rs index 8f1e6558b15..901d14465e2 100644 --- a/tests/ui/coherence/coherence-overlap-upstream.rs +++ b/tests/ui/coherence/coherence-overlap-upstream.rs @@ -1,7 +1,7 @@ // Tests that we consider `i16: Remote` to be ambiguous, even // though the upstream crate doesn't implement it for now. -// aux-build:coherence_lib.rs +//@ aux-build:coherence_lib.rs extern crate coherence_lib; diff --git a/tests/ui/coherence/coherence-overlap-with-regions.rs b/tests/ui/coherence/coherence-overlap-with-regions.rs index 32f01f41801..1c9758790d9 100644 --- a/tests/ui/coherence/coherence-overlap-with-regions.rs +++ b/tests/ui/coherence/coherence-overlap-with-regions.rs @@ -1,4 +1,4 @@ -// check-pass +//@ check-pass #![feature(negative_impls)] #![feature(rustc_attrs)] diff --git a/tests/ui/coherence/coherence-overlapping-pairs.rs b/tests/ui/coherence/coherence-overlapping-pairs.rs index d5d18217bd6..aa43cc10a3c 100644 --- a/tests/ui/coherence/coherence-overlapping-pairs.rs +++ b/tests/ui/coherence/coherence-overlapping-pairs.rs @@ -1,4 +1,4 @@ -// aux-build:coherence_lib.rs +//@ aux-build:coherence_lib.rs extern crate coherence_lib as lib; use lib::Remote; diff --git a/tests/ui/coherence/coherence-pair-covered-uncovered-1.rs b/tests/ui/coherence/coherence-pair-covered-uncovered-1.rs index 15868ca8686..80a62946f5e 100644 --- a/tests/ui/coherence/coherence-pair-covered-uncovered-1.rs +++ b/tests/ui/coherence/coherence-pair-covered-uncovered-1.rs @@ -1,7 +1,7 @@ // Test that the same coverage rules apply even if the local type appears in the // list of type parameters, not the self type. -// aux-build:coherence_lib.rs +//@ aux-build:coherence_lib.rs extern crate coherence_lib as lib; diff --git a/tests/ui/coherence/coherence-pair-covered-uncovered.rs b/tests/ui/coherence/coherence-pair-covered-uncovered.rs index da970572fde..3e5fceacabf 100644 --- a/tests/ui/coherence/coherence-pair-covered-uncovered.rs +++ b/tests/ui/coherence/coherence-pair-covered-uncovered.rs @@ -1,4 +1,4 @@ -// aux-build:coherence_lib.rs +//@ aux-build:coherence_lib.rs extern crate coherence_lib as lib; use lib::{Remote, Pair}; diff --git a/tests/ui/coherence/coherence-projection-ok-orphan.rs b/tests/ui/coherence/coherence-projection-ok-orphan.rs index 42b4b1912e2..b8dbe2db5a6 100644 --- a/tests/ui/coherence/coherence-projection-ok-orphan.rs +++ b/tests/ui/coherence/coherence-projection-ok-orphan.rs @@ -1,7 +1,7 @@ // Here we do not get a coherence conflict because `Baz: Iterator` // does not hold and (due to the orphan rules), we can rely on that. -// check-pass +//@ check-pass pub trait Foo

{} diff --git a/tests/ui/coherence/coherence-projection-ok.rs b/tests/ui/coherence/coherence-projection-ok.rs index 44fc02a5c20..c5c145be7e5 100644 --- a/tests/ui/coherence/coherence-projection-ok.rs +++ b/tests/ui/coherence/coherence-projection-ok.rs @@ -1,4 +1,4 @@ -// check-pass +//@ check-pass pub trait Foo

{} diff --git a/tests/ui/coherence/coherence-rfc447-constrained.rs b/tests/ui/coherence/coherence-rfc447-constrained.rs index 9d1d8688325..6d03801ab9a 100644 --- a/tests/ui/coherence/coherence-rfc447-constrained.rs +++ b/tests/ui/coherence/coherence-rfc447-constrained.rs @@ -1,4 +1,4 @@ -// run-pass +//@ run-pass // check that trait matching can handle impls whose types are only // constrained by a projection. diff --git a/tests/ui/coherence/coherence-subtyping.rs b/tests/ui/coherence/coherence-subtyping.rs index b3ed728a81c..da0cc2d0265 100644 --- a/tests/ui/coherence/coherence-subtyping.rs +++ b/tests/ui/coherence/coherence-subtyping.rs @@ -4,7 +4,7 @@ // Note: This scenario is currently accepted, but as part of the // universe transition (#56105) may eventually become an error. -// check-pass +//@ check-pass trait TheTrait { fn foo(&self) {} diff --git a/tests/ui/coherence/coherence-vec-local-2.rs b/tests/ui/coherence/coherence-vec-local-2.rs index 47df06bac6c..d5b9588d674 100644 --- a/tests/ui/coherence/coherence-vec-local-2.rs +++ b/tests/ui/coherence/coherence-vec-local-2.rs @@ -1,7 +1,7 @@ // Test that a local, generic type appearing within a // *non-fundamental* remote type like `Vec` is not considered local. -// aux-build:coherence_lib.rs +//@ aux-build:coherence_lib.rs extern crate coherence_lib as lib; use lib::Remote; diff --git a/tests/ui/coherence/coherence-vec-local.rs b/tests/ui/coherence/coherence-vec-local.rs index 130cc39d0af..2abab3312fd 100644 --- a/tests/ui/coherence/coherence-vec-local.rs +++ b/tests/ui/coherence/coherence-vec-local.rs @@ -1,7 +1,7 @@ // Test that a local type (with no type parameters) appearing within a // *non-fundamental* remote type like `Vec` is not considered local. -// aux-build:coherence_lib.rs +//@ aux-build:coherence_lib.rs extern crate coherence_lib as lib; use lib::Remote; diff --git a/tests/ui/coherence/coherence-where-clause.rs b/tests/ui/coherence/coherence-where-clause.rs index cd9a423f4ec..84b35d20b74 100644 --- a/tests/ui/coherence/coherence-where-clause.rs +++ b/tests/ui/coherence/coherence-where-clause.rs @@ -1,4 +1,4 @@ -// run-pass +//@ run-pass use std::fmt::Debug; trait MyTrait { diff --git a/tests/ui/coherence/coherence-with-coroutine.rs b/tests/ui/coherence/coherence-with-coroutine.rs index 21857d7fe66..1ba98344672 100644 --- a/tests/ui/coherence/coherence-with-coroutine.rs +++ b/tests/ui/coherence/coherence-with-coroutine.rs @@ -3,8 +3,8 @@ #![cfg_attr(specialized, feature(specialization))] #![allow(incomplete_features)] -// revisions: stock specialized -// [specialized]check-pass +//@ revisions: stock specialized +//@ [specialized]check-pass type OpaqueCoroutine = impl Sized; fn defining_use() -> OpaqueCoroutine { diff --git a/tests/ui/coherence/coherence_copy_like.rs b/tests/ui/coherence/coherence_copy_like.rs index 92af341ccb5..f10111835be 100644 --- a/tests/ui/coherence/coherence_copy_like.rs +++ b/tests/ui/coherence/coherence_copy_like.rs @@ -1,9 +1,9 @@ -// run-pass +//@ run-pass #![allow(dead_code)] // Test that we are able to introduce a negative constraint that // `MyType: !MyTrait` along with other "fundamental" wrappers. -// aux-build:coherence_copy_like_lib.rs +//@ aux-build:coherence_copy_like_lib.rs extern crate coherence_copy_like_lib as lib; diff --git a/tests/ui/coherence/coherence_copy_like_err_fundamental_struct.rs b/tests/ui/coherence/coherence_copy_like_err_fundamental_struct.rs index edee6cd7b6c..593661c8d76 100644 --- a/tests/ui/coherence/coherence_copy_like_err_fundamental_struct.rs +++ b/tests/ui/coherence/coherence_copy_like_err_fundamental_struct.rs @@ -1,8 +1,8 @@ // Test that we are able to introduce a negative constraint that // `MyType: !MyTrait` along with other "fundamental" wrappers. -// aux-build:coherence_copy_like_lib.rs -// build-pass (FIXME(62277): could be check-pass?) +//@ aux-build:coherence_copy_like_lib.rs +//@ build-pass (FIXME(62277): could be check-pass?) // skip-codgen #![allow(dead_code)] diff --git a/tests/ui/coherence/coherence_copy_like_err_fundamental_struct_ref.rs b/tests/ui/coherence/coherence_copy_like_err_fundamental_struct_ref.rs index 599c804d213..29575d4192e 100644 --- a/tests/ui/coherence/coherence_copy_like_err_fundamental_struct_ref.rs +++ b/tests/ui/coherence/coherence_copy_like_err_fundamental_struct_ref.rs @@ -1,8 +1,8 @@ // Test that we are able to introduce a negative constraint that // `MyType: !MyTrait` along with other "fundamental" wrappers. -// check-pass -// aux-build:coherence_copy_like_lib.rs +//@ check-pass +//@ aux-build:coherence_copy_like_lib.rs extern crate coherence_copy_like_lib as lib; diff --git a/tests/ui/coherence/coherence_copy_like_err_fundamental_struct_tuple.rs b/tests/ui/coherence/coherence_copy_like_err_fundamental_struct_tuple.rs index 7d851b52884..2f45ed43200 100644 --- a/tests/ui/coherence/coherence_copy_like_err_fundamental_struct_tuple.rs +++ b/tests/ui/coherence/coherence_copy_like_err_fundamental_struct_tuple.rs @@ -1,7 +1,7 @@ // Test that we are able to introduce a negative constraint that // `MyType: !MyTrait` along with other "fundamental" wrappers. -// aux-build:coherence_copy_like_lib.rs +//@ aux-build:coherence_copy_like_lib.rs extern crate coherence_copy_like_lib as lib; diff --git a/tests/ui/coherence/coherence_copy_like_err_struct.rs b/tests/ui/coherence/coherence_copy_like_err_struct.rs index fe39370c901..a58c9802240 100644 --- a/tests/ui/coherence/coherence_copy_like_err_struct.rs +++ b/tests/ui/coherence/coherence_copy_like_err_struct.rs @@ -1,4 +1,4 @@ -// aux-build:coherence_copy_like_lib.rs +//@ aux-build:coherence_copy_like_lib.rs // Test that we are able to introduce a negative constraint that // `MyType: !MyTrait` along with other "fundamental" wrappers. diff --git a/tests/ui/coherence/coherence_copy_like_err_tuple.rs b/tests/ui/coherence/coherence_copy_like_err_tuple.rs index f63e205c9f8..7985781dbf7 100644 --- a/tests/ui/coherence/coherence_copy_like_err_tuple.rs +++ b/tests/ui/coherence/coherence_copy_like_err_tuple.rs @@ -1,7 +1,7 @@ // Test that we are able to introduce a negative constraint that // `MyType: !MyTrait` along with other "fundamental" wrappers. -// aux-build:coherence_copy_like_lib.rs +//@ aux-build:coherence_copy_like_lib.rs extern crate coherence_copy_like_lib as lib; diff --git a/tests/ui/coherence/coherence_inherent_cc.rs b/tests/ui/coherence/coherence_inherent_cc.rs index 759ada248f4..662f186340b 100644 --- a/tests/ui/coherence/coherence_inherent_cc.rs +++ b/tests/ui/coherence/coherence_inherent_cc.rs @@ -1,4 +1,4 @@ -// aux-build:coherence_inherent_cc_lib.rs +//@ aux-build:coherence_inherent_cc_lib.rs // Tests that methods that implement a trait cannot be invoked // unless the trait is imported. diff --git a/tests/ui/coherence/coherence_local.rs b/tests/ui/coherence/coherence_local.rs index ea724ada702..38bbd3dd3ca 100644 --- a/tests/ui/coherence/coherence_local.rs +++ b/tests/ui/coherence/coherence_local.rs @@ -1,8 +1,8 @@ // Test that we are able to introduce a negative constraint that // `MyType: !MyTrait` along with other "fundamental" wrappers. -// check-pass -// aux-build:coherence_copy_like_lib.rs +//@ check-pass +//@ aux-build:coherence_copy_like_lib.rs extern crate coherence_copy_like_lib as lib; diff --git a/tests/ui/coherence/coherence_local_err_struct.rs b/tests/ui/coherence/coherence_local_err_struct.rs index a24038eb280..d8b2096724e 100644 --- a/tests/ui/coherence/coherence_local_err_struct.rs +++ b/tests/ui/coherence/coherence_local_err_struct.rs @@ -1,7 +1,7 @@ // Test that we are able to introduce a negative constraint that // `MyType: !MyTrait` along with other "fundamental" wrappers. -// aux-build:coherence_copy_like_lib.rs +//@ aux-build:coherence_copy_like_lib.rs #![allow(dead_code)] extern crate coherence_copy_like_lib as lib; diff --git a/tests/ui/coherence/coherence_local_err_tuple.rs b/tests/ui/coherence/coherence_local_err_tuple.rs index f4033862a3e..978099ea689 100644 --- a/tests/ui/coherence/coherence_local_err_tuple.rs +++ b/tests/ui/coherence/coherence_local_err_tuple.rs @@ -1,7 +1,7 @@ // Test that we are able to introduce a negative constraint that // `MyType: !MyTrait` along with other "fundamental" wrappers. -// aux-build:coherence_copy_like_lib.rs +//@ aux-build:coherence_copy_like_lib.rs #![allow(dead_code)] extern crate coherence_copy_like_lib as lib; diff --git a/tests/ui/coherence/coherence_local_ref.rs b/tests/ui/coherence/coherence_local_ref.rs index 2e28839c8a4..88ed6ac77d2 100644 --- a/tests/ui/coherence/coherence_local_ref.rs +++ b/tests/ui/coherence/coherence_local_ref.rs @@ -1,8 +1,8 @@ // Test that we are able to introduce a negative constraint that // `MyType: !MyTrait` along with other "fundamental" wrappers. -// check-pass -// aux-build:coherence_copy_like_lib.rs +//@ check-pass +//@ aux-build:coherence_copy_like_lib.rs extern crate coherence_copy_like_lib as lib; diff --git a/tests/ui/coherence/const-generics-orphan-check-ok.rs b/tests/ui/coherence/const-generics-orphan-check-ok.rs index 217e8aed234..14087f5c3c7 100644 --- a/tests/ui/coherence/const-generics-orphan-check-ok.rs +++ b/tests/ui/coherence/const-generics-orphan-check-ok.rs @@ -1,5 +1,5 @@ -// check-pass -// aux-build:trait-with-const-param.rs +//@ check-pass +//@ aux-build:trait-with-const-param.rs extern crate trait_with_const_param; use trait_with_const_param::*; diff --git a/tests/ui/coherence/impl-foreign-for-foreign.rs b/tests/ui/coherence/impl-foreign-for-foreign.rs index 4c0d46045e9..7f8cb9fcb0e 100644 --- a/tests/ui/coherence/impl-foreign-for-foreign.rs +++ b/tests/ui/coherence/impl-foreign-for-foreign.rs @@ -1,5 +1,5 @@ -// compile-flags:--crate-name=test -// aux-build:coherence_lib.rs +//@ compile-flags:--crate-name=test +//@ aux-build:coherence_lib.rs extern crate coherence_lib as lib; use lib::*; diff --git a/tests/ui/coherence/impl-foreign-for-foreign[foreign].rs b/tests/ui/coherence/impl-foreign-for-foreign[foreign].rs index e79f66c0e13..166fe343d52 100644 --- a/tests/ui/coherence/impl-foreign-for-foreign[foreign].rs +++ b/tests/ui/coherence/impl-foreign-for-foreign[foreign].rs @@ -1,5 +1,5 @@ -// compile-flags:--crate-name=test -// aux-build:coherence_lib.rs +//@ compile-flags:--crate-name=test +//@ aux-build:coherence_lib.rs extern crate coherence_lib as lib; use lib::*; diff --git a/tests/ui/coherence/impl-foreign-for-foreign[local].rs b/tests/ui/coherence/impl-foreign-for-foreign[local].rs index 0b1413edf37..0a586ba695c 100644 --- a/tests/ui/coherence/impl-foreign-for-foreign[local].rs +++ b/tests/ui/coherence/impl-foreign-for-foreign[local].rs @@ -1,6 +1,6 @@ -// compile-flags:--crate-name=test -// aux-build:coherence_lib.rs -// check-pass +//@ compile-flags:--crate-name=test +//@ aux-build:coherence_lib.rs +//@ check-pass extern crate coherence_lib as lib; use lib::*; diff --git a/tests/ui/coherence/impl-foreign-for-fundamental[foreign].rs b/tests/ui/coherence/impl-foreign-for-fundamental[foreign].rs index 10bdf2db8bb..983ae336a0b 100644 --- a/tests/ui/coherence/impl-foreign-for-fundamental[foreign].rs +++ b/tests/ui/coherence/impl-foreign-for-fundamental[foreign].rs @@ -1,5 +1,5 @@ -// compile-flags:--crate-name=test -// aux-build:coherence_lib.rs +//@ compile-flags:--crate-name=test +//@ aux-build:coherence_lib.rs extern crate coherence_lib as lib; use lib::*; diff --git a/tests/ui/coherence/impl-foreign-for-fundamental[local].rs b/tests/ui/coherence/impl-foreign-for-fundamental[local].rs index c3fc0e6b8a7..faad0700e56 100644 --- a/tests/ui/coherence/impl-foreign-for-fundamental[local].rs +++ b/tests/ui/coherence/impl-foreign-for-fundamental[local].rs @@ -1,6 +1,6 @@ -// compile-flags:--crate-name=test -// aux-build:coherence_lib.rs -// check-pass +//@ compile-flags:--crate-name=test +//@ aux-build:coherence_lib.rs +//@ check-pass extern crate coherence_lib as lib; use lib::*; diff --git a/tests/ui/coherence/impl-foreign-for-local.rs b/tests/ui/coherence/impl-foreign-for-local.rs index 04405bc46fb..d12929244e9 100644 --- a/tests/ui/coherence/impl-foreign-for-local.rs +++ b/tests/ui/coherence/impl-foreign-for-local.rs @@ -1,6 +1,6 @@ -// compile-flags:--crate-name=test -// aux-build:coherence_lib.rs -// check-pass +//@ compile-flags:--crate-name=test +//@ aux-build:coherence_lib.rs +//@ check-pass extern crate coherence_lib as lib; use lib::*; diff --git a/tests/ui/coherence/impl-foreign-for-locally-defined-fundamental.rs b/tests/ui/coherence/impl-foreign-for-locally-defined-fundamental.rs index bc1e18b657f..0f66314e884 100644 --- a/tests/ui/coherence/impl-foreign-for-locally-defined-fundamental.rs +++ b/tests/ui/coherence/impl-foreign-for-locally-defined-fundamental.rs @@ -1,8 +1,8 @@ #![feature(fundamental)] -// compile-flags:--crate-name=test -// aux-build:coherence_lib.rs -// check-pass +//@ compile-flags:--crate-name=test +//@ aux-build:coherence_lib.rs +//@ check-pass extern crate coherence_lib as lib; use lib::*; diff --git a/tests/ui/coherence/impl-foreign-for-locally-defined-fundamental[foreign].rs b/tests/ui/coherence/impl-foreign-for-locally-defined-fundamental[foreign].rs index 1e11789ef39..a3286777c4e 100644 --- a/tests/ui/coherence/impl-foreign-for-locally-defined-fundamental[foreign].rs +++ b/tests/ui/coherence/impl-foreign-for-locally-defined-fundamental[foreign].rs @@ -1,8 +1,8 @@ #![feature(fundamental)] -// compile-flags:--crate-name=test -// aux-build:coherence_lib.rs -// check-pass +//@ compile-flags:--crate-name=test +//@ aux-build:coherence_lib.rs +//@ check-pass extern crate coherence_lib as lib; use lib::*; diff --git a/tests/ui/coherence/impl-foreign[foreign]-for-foreign.rs b/tests/ui/coherence/impl-foreign[foreign]-for-foreign.rs index 99a399ddc63..db09a6434d2 100644 --- a/tests/ui/coherence/impl-foreign[foreign]-for-foreign.rs +++ b/tests/ui/coherence/impl-foreign[foreign]-for-foreign.rs @@ -1,5 +1,5 @@ -// compile-flags:--crate-name=test -// aux-build:coherence_lib.rs +//@ compile-flags:--crate-name=test +//@ aux-build:coherence_lib.rs extern crate coherence_lib as lib; use lib::*; diff --git a/tests/ui/coherence/impl-foreign[foreign]-for-local.rs b/tests/ui/coherence/impl-foreign[foreign]-for-local.rs index bc6595bb340..3f671a4944e 100644 --- a/tests/ui/coherence/impl-foreign[foreign]-for-local.rs +++ b/tests/ui/coherence/impl-foreign[foreign]-for-local.rs @@ -1,6 +1,6 @@ -// compile-flags:--crate-name=test -// aux-build:coherence_lib.rs -// check-pass +//@ compile-flags:--crate-name=test +//@ aux-build:coherence_lib.rs +//@ check-pass extern crate coherence_lib as lib; use lib::*; diff --git a/tests/ui/coherence/impl-foreign[fundemental[foreign]]-for-foreign.rs b/tests/ui/coherence/impl-foreign[fundemental[foreign]]-for-foreign.rs index 0476cdaffe7..379beca50ae 100644 --- a/tests/ui/coherence/impl-foreign[fundemental[foreign]]-for-foreign.rs +++ b/tests/ui/coherence/impl-foreign[fundemental[foreign]]-for-foreign.rs @@ -1,5 +1,5 @@ -// compile-flags:--crate-name=test -// aux-build:coherence_lib.rs +//@ compile-flags:--crate-name=test +//@ aux-build:coherence_lib.rs extern crate coherence_lib as lib; use lib::*; diff --git a/tests/ui/coherence/impl-foreign[fundemental[local]]-for-foreign.rs b/tests/ui/coherence/impl-foreign[fundemental[local]]-for-foreign.rs index 7b83b048548..95e3a0a9b83 100644 --- a/tests/ui/coherence/impl-foreign[fundemental[local]]-for-foreign.rs +++ b/tests/ui/coherence/impl-foreign[fundemental[local]]-for-foreign.rs @@ -1,6 +1,6 @@ -// compile-flags:--crate-name=test -// aux-build:coherence_lib.rs -// check-pass +//@ compile-flags:--crate-name=test +//@ aux-build:coherence_lib.rs +//@ check-pass extern crate coherence_lib as lib; use lib::*; diff --git a/tests/ui/coherence/impl[t]-foreign-for-foreign[t].rs b/tests/ui/coherence/impl[t]-foreign-for-foreign[t].rs index 5282de4b271..8703cc6a819 100644 --- a/tests/ui/coherence/impl[t]-foreign-for-foreign[t].rs +++ b/tests/ui/coherence/impl[t]-foreign-for-foreign[t].rs @@ -1,5 +1,5 @@ -// compile-flags:--crate-name=test -// aux-build:coherence_lib.rs +//@ compile-flags:--crate-name=test +//@ aux-build:coherence_lib.rs extern crate coherence_lib as lib; use lib::*; diff --git a/tests/ui/coherence/impl[t]-foreign-for-fundamental[t].rs b/tests/ui/coherence/impl[t]-foreign-for-fundamental[t].rs index 6f5605a2193..d9616b9adda 100644 --- a/tests/ui/coherence/impl[t]-foreign-for-fundamental[t].rs +++ b/tests/ui/coherence/impl[t]-foreign-for-fundamental[t].rs @@ -1,5 +1,5 @@ -// compile-flags:--crate-name=test -// aux-build:coherence_lib.rs +//@ compile-flags:--crate-name=test +//@ aux-build:coherence_lib.rs extern crate coherence_lib as lib; use lib::*; diff --git a/tests/ui/coherence/impl[t]-foreign[foreign[t]_local]-for-foreign.rs b/tests/ui/coherence/impl[t]-foreign[foreign[t]_local]-for-foreign.rs index 99f3ce44760..f1b9a08b44a 100644 --- a/tests/ui/coherence/impl[t]-foreign[foreign[t]_local]-for-foreign.rs +++ b/tests/ui/coherence/impl[t]-foreign[foreign[t]_local]-for-foreign.rs @@ -1,6 +1,6 @@ -// check-pass -// compile-flags:--crate-name=test -// aux-build:coherence_lib.rs +//@ check-pass +//@ compile-flags:--crate-name=test +//@ aux-build:coherence_lib.rs extern crate coherence_lib as lib; use lib::*; diff --git a/tests/ui/coherence/impl[t]-foreign[foreign]-for-fundamental[t].rs b/tests/ui/coherence/impl[t]-foreign[foreign]-for-fundamental[t].rs index 81044cd0529..9d4440ba486 100644 --- a/tests/ui/coherence/impl[t]-foreign[foreign]-for-fundamental[t].rs +++ b/tests/ui/coherence/impl[t]-foreign[foreign]-for-fundamental[t].rs @@ -1,5 +1,5 @@ -// compile-flags:--crate-name=test -// aux-build:coherence_lib.rs +//@ compile-flags:--crate-name=test +//@ aux-build:coherence_lib.rs extern crate coherence_lib as lib; use lib::*; diff --git a/tests/ui/coherence/impl[t]-foreign[foreign]-for-t.rs b/tests/ui/coherence/impl[t]-foreign[foreign]-for-t.rs index 680ba9f2226..533f0892b98 100644 --- a/tests/ui/coherence/impl[t]-foreign[foreign]-for-t.rs +++ b/tests/ui/coherence/impl[t]-foreign[foreign]-for-t.rs @@ -1,5 +1,5 @@ -// compile-flags:--crate-name=test -// aux-build:coherence_lib.rs +//@ compile-flags:--crate-name=test +//@ aux-build:coherence_lib.rs extern crate coherence_lib as lib; use lib::*; diff --git a/tests/ui/coherence/impl[t]-foreign[fundamental[t]]-for-foreign.rs b/tests/ui/coherence/impl[t]-foreign[fundamental[t]]-for-foreign.rs index fc7649085c3..02731052a6a 100644 --- a/tests/ui/coherence/impl[t]-foreign[fundamental[t]]-for-foreign.rs +++ b/tests/ui/coherence/impl[t]-foreign[fundamental[t]]-for-foreign.rs @@ -1,5 +1,5 @@ -// compile-flags:--crate-name=test -// aux-build:coherence_lib.rs +//@ compile-flags:--crate-name=test +//@ aux-build:coherence_lib.rs extern crate coherence_lib as lib; use lib::*; diff --git a/tests/ui/coherence/impl[t]-foreign[fundamental[t]]-for-fundamental[t].rs b/tests/ui/coherence/impl[t]-foreign[fundamental[t]]-for-fundamental[t].rs index 703f25dd60a..7c94fd80af2 100644 --- a/tests/ui/coherence/impl[t]-foreign[fundamental[t]]-for-fundamental[t].rs +++ b/tests/ui/coherence/impl[t]-foreign[fundamental[t]]-for-fundamental[t].rs @@ -1,5 +1,5 @@ -// compile-flags:--crate-name=test -// aux-build:coherence_lib.rs +//@ compile-flags:--crate-name=test +//@ aux-build:coherence_lib.rs extern crate coherence_lib as lib; use lib::*; diff --git a/tests/ui/coherence/impl[t]-foreign[fundamental[t]]-for-local.rs b/tests/ui/coherence/impl[t]-foreign[fundamental[t]]-for-local.rs index ec21fdd4e04..d368b870f25 100644 --- a/tests/ui/coherence/impl[t]-foreign[fundamental[t]]-for-local.rs +++ b/tests/ui/coherence/impl[t]-foreign[fundamental[t]]-for-local.rs @@ -1,6 +1,6 @@ -// compile-flags:--crate-name=test -// aux-build:coherence_lib.rs -// check-pass +//@ compile-flags:--crate-name=test +//@ aux-build:coherence_lib.rs +//@ check-pass extern crate coherence_lib as lib; use lib::*; diff --git a/tests/ui/coherence/impl[t]-foreign[fundamental[t]]-for-t.rs b/tests/ui/coherence/impl[t]-foreign[fundamental[t]]-for-t.rs index 5bdab87bf4e..d998731687c 100644 --- a/tests/ui/coherence/impl[t]-foreign[fundamental[t]]-for-t.rs +++ b/tests/ui/coherence/impl[t]-foreign[fundamental[t]]-for-t.rs @@ -1,5 +1,5 @@ -// compile-flags:--crate-name=test -// aux-build:coherence_lib.rs +//@ compile-flags:--crate-name=test +//@ aux-build:coherence_lib.rs extern crate coherence_lib as lib; use lib::*; diff --git a/tests/ui/coherence/impl[t]-foreign[fundamental[t]_local]-for-foreign.rs b/tests/ui/coherence/impl[t]-foreign[fundamental[t]_local]-for-foreign.rs index c9e3594cd34..fdda2e0133d 100644 --- a/tests/ui/coherence/impl[t]-foreign[fundamental[t]_local]-for-foreign.rs +++ b/tests/ui/coherence/impl[t]-foreign[fundamental[t]_local]-for-foreign.rs @@ -1,5 +1,5 @@ -// compile-flags:--crate-name=test -// aux-build:coherence_lib.rs +//@ compile-flags:--crate-name=test +//@ aux-build:coherence_lib.rs extern crate coherence_lib as lib; use lib::*; diff --git a/tests/ui/coherence/impl[t]-foreign[fundemental[local]]-for-foreign[t].rs b/tests/ui/coherence/impl[t]-foreign[fundemental[local]]-for-foreign[t].rs index 62e69357e3a..4dd1ee381d5 100644 --- a/tests/ui/coherence/impl[t]-foreign[fundemental[local]]-for-foreign[t].rs +++ b/tests/ui/coherence/impl[t]-foreign[fundemental[local]]-for-foreign[t].rs @@ -1,6 +1,6 @@ -// compile-flags:--crate-name=test -// aux-build:coherence_lib.rs -// check-pass +//@ compile-flags:--crate-name=test +//@ aux-build:coherence_lib.rs +//@ check-pass extern crate coherence_lib as lib; use lib::*; diff --git a/tests/ui/coherence/impl[t]-foreign[local]-for-foreign.rs b/tests/ui/coherence/impl[t]-foreign[local]-for-foreign.rs index 1fec19bbab9..d9b03971b1c 100644 --- a/tests/ui/coherence/impl[t]-foreign[local]-for-foreign.rs +++ b/tests/ui/coherence/impl[t]-foreign[local]-for-foreign.rs @@ -1,6 +1,6 @@ -// compile-flags:--crate-name=test -// aux-build:coherence_lib.rs -// check-pass +//@ compile-flags:--crate-name=test +//@ aux-build:coherence_lib.rs +//@ check-pass extern crate coherence_lib as lib; use lib::*; diff --git a/tests/ui/coherence/impl[t]-foreign[local]-for-foreign[t].rs b/tests/ui/coherence/impl[t]-foreign[local]-for-foreign[t].rs index c8ed28be6f0..de9af310556 100644 --- a/tests/ui/coherence/impl[t]-foreign[local]-for-foreign[t].rs +++ b/tests/ui/coherence/impl[t]-foreign[local]-for-foreign[t].rs @@ -1,6 +1,6 @@ -// compile-flags:--crate-name=test -// aux-build:coherence_lib.rs -// check-pass +//@ compile-flags:--crate-name=test +//@ aux-build:coherence_lib.rs +//@ check-pass extern crate coherence_lib as lib; use lib::*; diff --git a/tests/ui/coherence/impl[t]-foreign[local]-for-fundamental[foreign[t]].rs b/tests/ui/coherence/impl[t]-foreign[local]-for-fundamental[foreign[t]].rs index f9b88c6459b..497bfe9a84a 100644 --- a/tests/ui/coherence/impl[t]-foreign[local]-for-fundamental[foreign[t]].rs +++ b/tests/ui/coherence/impl[t]-foreign[local]-for-fundamental[foreign[t]].rs @@ -1,6 +1,6 @@ -// compile-flags:--crate-name=test -// aux-build:coherence_lib.rs -// check-pass +//@ compile-flags:--crate-name=test +//@ aux-build:coherence_lib.rs +//@ check-pass extern crate coherence_lib as lib; use lib::*; diff --git a/tests/ui/coherence/impl[t]-foreign[local]-for-fundamental[t].rs b/tests/ui/coherence/impl[t]-foreign[local]-for-fundamental[t].rs index 7709bd9c89b..4dd810cdcfc 100644 --- a/tests/ui/coherence/impl[t]-foreign[local]-for-fundamental[t].rs +++ b/tests/ui/coherence/impl[t]-foreign[local]-for-fundamental[t].rs @@ -1,5 +1,5 @@ -// compile-flags:--crate-name=test -// aux-build:coherence_lib.rs +//@ compile-flags:--crate-name=test +//@ aux-build:coherence_lib.rs extern crate coherence_lib as lib; use lib::*; diff --git a/tests/ui/coherence/impl[t]-foreign[local]-for-local.rs b/tests/ui/coherence/impl[t]-foreign[local]-for-local.rs index 9c14eea1be2..9c2b20527d7 100644 --- a/tests/ui/coherence/impl[t]-foreign[local]-for-local.rs +++ b/tests/ui/coherence/impl[t]-foreign[local]-for-local.rs @@ -1,6 +1,6 @@ -// compile-flags:--crate-name=test -// aux-build:coherence_lib.rs -// check-pass +//@ compile-flags:--crate-name=test +//@ aux-build:coherence_lib.rs +//@ check-pass extern crate coherence_lib as lib; use lib::*; diff --git a/tests/ui/coherence/impl[t]-foreign[local]-for-t.rs b/tests/ui/coherence/impl[t]-foreign[local]-for-t.rs index eed3a4b5c23..85322ecac4c 100644 --- a/tests/ui/coherence/impl[t]-foreign[local]-for-t.rs +++ b/tests/ui/coherence/impl[t]-foreign[local]-for-t.rs @@ -1,5 +1,5 @@ -// compile-flags:--crate-name=test -// aux-build:coherence_lib.rs +//@ compile-flags:--crate-name=test +//@ aux-build:coherence_lib.rs extern crate coherence_lib as lib; use lib::*; diff --git a/tests/ui/coherence/impl[t]-foreign[local_fundamental[t]]-for-foreign.rs b/tests/ui/coherence/impl[t]-foreign[local_fundamental[t]]-for-foreign.rs index 63c342b76f1..466e2f1665e 100644 --- a/tests/ui/coherence/impl[t]-foreign[local_fundamental[t]]-for-foreign.rs +++ b/tests/ui/coherence/impl[t]-foreign[local_fundamental[t]]-for-foreign.rs @@ -1,6 +1,6 @@ -// compile-flags:--crate-name=test -// aux-build:coherence_lib.rs -// check-pass +//@ compile-flags:--crate-name=test +//@ aux-build:coherence_lib.rs +//@ check-pass extern crate coherence_lib as lib; use lib::*; diff --git a/tests/ui/coherence/impl[t]-foreign[t]-for-foreign.rs b/tests/ui/coherence/impl[t]-foreign[t]-for-foreign.rs index 9bb37c2baab..c23a2d87a69 100644 --- a/tests/ui/coherence/impl[t]-foreign[t]-for-foreign.rs +++ b/tests/ui/coherence/impl[t]-foreign[t]-for-foreign.rs @@ -1,5 +1,5 @@ -// compile-flags:--crate-name=test -// aux-build:coherence_lib.rs +//@ compile-flags:--crate-name=test +//@ aux-build:coherence_lib.rs extern crate coherence_lib as lib; use lib::*; diff --git a/tests/ui/coherence/impl[t]-foreign[t]-for-fundamental.rs b/tests/ui/coherence/impl[t]-foreign[t]-for-fundamental.rs index 79b5aa3fc62..e9426e5127a 100644 --- a/tests/ui/coherence/impl[t]-foreign[t]-for-fundamental.rs +++ b/tests/ui/coherence/impl[t]-foreign[t]-for-fundamental.rs @@ -1,5 +1,5 @@ -// compile-flags:--crate-name=test -// aux-build:coherence_lib.rs +//@ compile-flags:--crate-name=test +//@ aux-build:coherence_lib.rs extern crate coherence_lib as lib; use lib::*; diff --git a/tests/ui/coherence/impl[t]-foreign[t]-for-local.rs b/tests/ui/coherence/impl[t]-foreign[t]-for-local.rs index bc59721c088..2976df3d41e 100644 --- a/tests/ui/coherence/impl[t]-foreign[t]-for-local.rs +++ b/tests/ui/coherence/impl[t]-foreign[t]-for-local.rs @@ -1,6 +1,6 @@ -// compile-flags:--crate-name=test -// aux-build:coherence_lib.rs -// check-pass +//@ compile-flags:--crate-name=test +//@ aux-build:coherence_lib.rs +//@ check-pass extern crate coherence_lib as lib; use lib::*; diff --git a/tests/ui/coherence/impl[t]-foreign[t]-for-t.rs b/tests/ui/coherence/impl[t]-foreign[t]-for-t.rs index bcd6b269a38..9c3e82ad762 100644 --- a/tests/ui/coherence/impl[t]-foreign[t]-for-t.rs +++ b/tests/ui/coherence/impl[t]-foreign[t]-for-t.rs @@ -1,5 +1,5 @@ -// compile-flags:--crate-name=test -// aux-build:coherence_lib.rs +//@ compile-flags:--crate-name=test +//@ aux-build:coherence_lib.rs extern crate coherence_lib as lib; use lib::*; diff --git a/tests/ui/coherence/indirect-impl-for-trait-obj-coherence.rs b/tests/ui/coherence/indirect-impl-for-trait-obj-coherence.rs index bb46498f90e..201a46a166a 100644 --- a/tests/ui/coherence/indirect-impl-for-trait-obj-coherence.rs +++ b/tests/ui/coherence/indirect-impl-for-trait-obj-coherence.rs @@ -1,5 +1,5 @@ -// check-pass -// known-bug: #57893 +//@ check-pass +//@ known-bug: #57893 // Should fail. Because we see an impl that uses a certain associated type, we // type-check assuming that impl is used. However, this conflicts with the diff --git a/tests/ui/coherence/inter-crate-ambiguity-causes-notes.rs b/tests/ui/coherence/inter-crate-ambiguity-causes-notes.rs index 0f785b4e5f6..3dead2f0d19 100644 --- a/tests/ui/coherence/inter-crate-ambiguity-causes-notes.rs +++ b/tests/ui/coherence/inter-crate-ambiguity-causes-notes.rs @@ -1,5 +1,5 @@ -// revisions: old next -//[next] compile-flags: -Znext-solver +//@ revisions: old next +//@[next] compile-flags: -Znext-solver struct S; diff --git a/tests/ui/coherence/issue-99663-2.rs b/tests/ui/coherence/issue-99663-2.rs index 10a0a568849..675e9fdfdba 100644 --- a/tests/ui/coherence/issue-99663-2.rs +++ b/tests/ui/coherence/issue-99663-2.rs @@ -1,4 +1,4 @@ -// check-pass +//@ check-pass #![feature(type_alias_impl_trait)] diff --git a/tests/ui/coherence/issue-99663.rs b/tests/ui/coherence/issue-99663.rs index a2d4d398ce1..00d15977d8f 100644 --- a/tests/ui/coherence/issue-99663.rs +++ b/tests/ui/coherence/issue-99663.rs @@ -1,4 +1,4 @@ -// check-pass +//@ check-pass #![feature(type_alias_impl_trait)] diff --git a/tests/ui/coherence/negative-coherence-considering-regions.rs b/tests/ui/coherence/negative-coherence-considering-regions.rs index a43ad19eca7..79d5ef5ca3c 100644 --- a/tests/ui/coherence/negative-coherence-considering-regions.rs +++ b/tests/ui/coherence/negative-coherence-considering-regions.rs @@ -1,5 +1,5 @@ -// revisions: any_lt static_lt -//[static_lt] check-pass +//@ revisions: any_lt static_lt +//@[static_lt] check-pass #![feature(negative_impls)] #![feature(with_negative_coherence)] diff --git a/tests/ui/coherence/negative-coherence-placeholder-region-constraints-on-unification.rs b/tests/ui/coherence/negative-coherence-placeholder-region-constraints-on-unification.rs index 26d9d84d8f0..7967002e021 100644 --- a/tests/ui/coherence/negative-coherence-placeholder-region-constraints-on-unification.rs +++ b/tests/ui/coherence/negative-coherence-placeholder-region-constraints-on-unification.rs @@ -1,5 +1,5 @@ -// revisions: explicit implicit -//[implicit] check-pass +//@ revisions: explicit implicit +//@[implicit] check-pass #![forbid(coherence_leak_check)] #![feature(negative_impls, with_negative_coherence)] diff --git a/tests/ui/coherence/normalize-for-errors.rs b/tests/ui/coherence/normalize-for-errors.rs index 30723518bce..4d98ea609e9 100644 --- a/tests/ui/coherence/normalize-for-errors.rs +++ b/tests/ui/coherence/normalize-for-errors.rs @@ -1,5 +1,5 @@ -// revisions: current next -//[next] compile-flags: -Znext-solver +//@ revisions: current next +//@[next] compile-flags: -Znext-solver struct MyType; trait MyTrait {} diff --git a/tests/ui/coherence/occurs-check/associated-type.rs b/tests/ui/coherence/occurs-check/associated-type.rs index 3df8fe10a83..ac1236c554a 100644 --- a/tests/ui/coherence/occurs-check/associated-type.rs +++ b/tests/ui/coherence/occurs-check/associated-type.rs @@ -1,5 +1,5 @@ -// revisions: old next -//[next] compile-flags: -Znext-solver +//@ revisions: old next +//@[next] compile-flags: -Znext-solver // A regression test for #105787 diff --git a/tests/ui/coherence/occurs-check/opaques.rs b/tests/ui/coherence/occurs-check/opaques.rs index 73cd42bf3f2..241a247c841 100644 --- a/tests/ui/coherence/occurs-check/opaques.rs +++ b/tests/ui/coherence/occurs-check/opaques.rs @@ -1,10 +1,10 @@ -//revisions: old next -//[next] compile-flags: -Znext-solver +//@revisions: old next +//@[next] compile-flags: -Znext-solver // A regression test for #105787 -//[old] known-bug: #105787 -//[old] check-pass +//@[old] known-bug: #105787 +//@[old] check-pass #![feature(type_alias_impl_trait)] mod defining_scope { use super::*; diff --git a/tests/ui/coherence/re-rebalance-coherence-default-generic-associated-type.rs b/tests/ui/coherence/re-rebalance-coherence-default-generic-associated-type.rs index d18e3f453c9..e33cd480ff9 100644 --- a/tests/ui/coherence/re-rebalance-coherence-default-generic-associated-type.rs +++ b/tests/ui/coherence/re-rebalance-coherence-default-generic-associated-type.rs @@ -1,5 +1,5 @@ -// run-pass -// aux-build:re_rebalance_coherence_lib-rpass.rs +//@ run-pass +//@ aux-build:re_rebalance_coherence_lib-rpass.rs #![allow(dead_code)] // check that a generic type with a default value from an associated type can be used without diff --git a/tests/ui/coherence/re-rebalance-coherence.rs b/tests/ui/coherence/re-rebalance-coherence.rs index 38d096b08e1..9c176d5b1b1 100644 --- a/tests/ui/coherence/re-rebalance-coherence.rs +++ b/tests/ui/coherence/re-rebalance-coherence.rs @@ -1,5 +1,5 @@ -// run-pass -// aux-build:re_rebalance_coherence_lib.rs +//@ run-pass +//@ aux-build:re_rebalance_coherence_lib.rs extern crate re_rebalance_coherence_lib as lib; use lib::*; diff --git a/tests/ui/coinduction/canonicalization-rerun.rs b/tests/ui/coinduction/canonicalization-rerun.rs index bbd8d802630..06085ebfe0b 100644 --- a/tests/ui/coinduction/canonicalization-rerun.rs +++ b/tests/ui/coinduction/canonicalization-rerun.rs @@ -1,6 +1,6 @@ -// check-pass -// revisions: old next -//[next] compile-flags: -Znext-solver +//@ check-pass +//@ revisions: old next +//@[next] compile-flags: -Znext-solver // If we use canonical goals during trait solving we have to reevaluate // the root goal of a cycle until we hit a fixpoint. diff --git a/tests/ui/command-line-diagnostics.rs b/tests/ui/command-line-diagnostics.rs index 248fb83a3ab..8a6cf5b8e32 100644 --- a/tests/ui/command-line-diagnostics.rs +++ b/tests/ui/command-line-diagnostics.rs @@ -1,5 +1,5 @@ // This test checks the output format without the intermediate json representation -// compile-flags: --error-format=human +//@ compile-flags: --error-format=human pub fn main() { let x = 42; diff --git a/tests/ui/command/command-argv0.rs b/tests/ui/command/command-argv0.rs index b782a4fd3d1..53649e35a89 100644 --- a/tests/ui/command/command-argv0.rs +++ b/tests/ui/command/command-argv0.rs @@ -1,8 +1,8 @@ -// run-pass +//@ run-pass -// ignore-windows - this is a unix-specific test -// ignore-emscripten no processes -// ignore-sgx no processes +//@ ignore-windows - this is a unix-specific test +//@ ignore-emscripten no processes +//@ ignore-sgx no processes use std::env; use std::os::unix::process::CommandExt; use std::process::Command; diff --git a/tests/ui/command/command-current-dir.rs b/tests/ui/command/command-current-dir.rs index 5d06fcdebc6..7186a165a96 100644 --- a/tests/ui/command/command-current-dir.rs +++ b/tests/ui/command/command-current-dir.rs @@ -1,7 +1,7 @@ -// run-pass -// ignore-emscripten no processes -// ignore-sgx no processes -// ignore-fuchsia Needs directory creation privilege +//@ run-pass +//@ ignore-emscripten no processes +//@ ignore-sgx no processes +//@ ignore-fuchsia Needs directory creation privilege use std::env; use std::fs; diff --git a/tests/ui/command/command-exec.rs b/tests/ui/command/command-exec.rs index edc33446d79..3cc5d0bbd3e 100644 --- a/tests/ui/command/command-exec.rs +++ b/tests/ui/command/command-exec.rs @@ -1,10 +1,10 @@ -// run-pass +//@ run-pass #![allow(stable_features)] -// ignore-windows - this is a unix-specific test -// ignore-emscripten no processes -// ignore-sgx no processes -// ignore-fuchsia no execvp syscall provided +//@ ignore-windows - this is a unix-specific test +//@ ignore-emscripten no processes +//@ ignore-sgx no processes +//@ ignore-fuchsia no execvp syscall provided #![feature(process_exec)] diff --git a/tests/ui/command/command-pre-exec.rs b/tests/ui/command/command-pre-exec.rs index e8a909eecc1..2f3483fad08 100644 --- a/tests/ui/command/command-pre-exec.rs +++ b/tests/ui/command/command-pre-exec.rs @@ -1,10 +1,10 @@ -// run-pass +//@ run-pass #![allow(stable_features)] -// ignore-windows - this is a unix-specific test -// ignore-emscripten no processes -// ignore-sgx no processes -// ignore-fuchsia no execvp syscall +//@ ignore-windows - this is a unix-specific test +//@ ignore-emscripten no processes +//@ ignore-sgx no processes +//@ ignore-fuchsia no execvp syscall #![feature(process_exec, rustc_private)] extern crate libc; diff --git a/tests/ui/command/command-setgroups.rs b/tests/ui/command/command-setgroups.rs index 7e321f2f0cd..f5dbf43feb5 100644 --- a/tests/ui/command/command-setgroups.rs +++ b/tests/ui/command/command-setgroups.rs @@ -1,9 +1,9 @@ -// run-pass -// ignore-windows - this is a unix-specific test -// ignore-emscripten -// ignore-sgx -// ignore-musl - returns dummy result for _SC_NGROUPS_MAX -// ignore-nto - does not have `/bin/id`, expects groups to be i32 (not u32) +//@ run-pass +//@ ignore-windows - this is a unix-specific test +//@ ignore-emscripten +//@ ignore-sgx +//@ ignore-musl - returns dummy result for _SC_NGROUPS_MAX +//@ ignore-nto - does not have `/bin/id`, expects groups to be i32 (not u32) #![feature(rustc_private)] #![feature(setgroups)] diff --git a/tests/ui/command/command-uid-gid.rs b/tests/ui/command/command-uid-gid.rs index aa4e2f5b893..7a70a0fbd76 100644 --- a/tests/ui/command/command-uid-gid.rs +++ b/tests/ui/command/command-uid-gid.rs @@ -1,8 +1,8 @@ -// run-pass -// ignore-android -// ignore-emscripten -// ignore-sgx -// ignore-fuchsia no '/bin/sh', '/bin/ls' +//@ run-pass +//@ ignore-android +//@ ignore-emscripten +//@ ignore-sgx +//@ ignore-fuchsia no '/bin/sh', '/bin/ls' #![feature(rustc_private)] diff --git a/tests/ui/command/issue-10626.rs b/tests/ui/command/issue-10626.rs index 696a2dd1657..c63edb83700 100644 --- a/tests/ui/command/issue-10626.rs +++ b/tests/ui/command/issue-10626.rs @@ -1,6 +1,6 @@ -// run-pass -// ignore-emscripten no processes -// ignore-sgx no processes +//@ run-pass +//@ ignore-emscripten no processes +//@ ignore-sgx no processes // Make sure that if a process doesn't have its stdio/stderr descriptors set up // that we don't die in a large ball of fire diff --git a/tests/ui/commandline-argfile-badutf8.rs b/tests/ui/commandline-argfile-badutf8.rs index e2984e3ca97..b3a19fa6274 100644 --- a/tests/ui/commandline-argfile-badutf8.rs +++ b/tests/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/ui/commandline-argfile-missing.rs b/tests/ui/commandline-argfile-missing.rs index 5a6465bd064..bb9644d66ce 100644 --- a/tests/ui/commandline-argfile-missing.rs +++ b/tests/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/ui/commandline-argfile.rs b/tests/ui/commandline-argfile.rs index fc1ba0c8d67..8577312a3c4 100644 --- a/tests/ui/commandline-argfile.rs +++ b/tests/ui/commandline-argfile.rs @@ -1,7 +1,7 @@ // Check to see if we can get parameters from an @argsfile file // -// build-pass -// compile-flags: --cfg cmdline_set @{{src-base}}/commandline-argfile.args +//@ build-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/ui/compiletest-self-test/compile-flags-last.rs b/tests/ui/compiletest-self-test/compile-flags-last.rs index 232df10f1a8..b78a64394b8 100644 --- a/tests/ui/compiletest-self-test/compile-flags-last.rs +++ b/tests/ui/compiletest-self-test/compile-flags-last.rs @@ -3,5 +3,5 @@ // providing it. If the compile-flags are not last, the test will fail as rustc will interpret the // next flag as the argument of this flag. // -// compile-flags: --cap-lints -// error-pattern: Argument to option 'cap-lints' missing +//@ compile-flags: --cap-lints +//@ error-pattern: Argument to option 'cap-lints' missing diff --git a/tests/ui/compiletest-self-test/ui-testing-optout.rs b/tests/ui/compiletest-self-test/ui-testing-optout.rs index 88e81158316..62920a86c3b 100644 --- a/tests/ui/compiletest-self-test/ui-testing-optout.rs +++ b/tests/ui/compiletest-self-test/ui-testing-optout.rs @@ -1,4 +1,4 @@ -// compile-flags: -Z ui-testing=no +//@ compile-flags: -Z ui-testing=no // Line number < 10 type A = B; //~ ERROR diff --git a/tests/ui/complex.rs b/tests/ui/complex.rs index 9b11ca67e47..d1da9d189ca 100644 --- a/tests/ui/complex.rs +++ b/tests/ui/complex.rs @@ -1,4 +1,4 @@ -// run-pass +//@ run-pass #![allow(unconditional_recursion)] #![allow(non_camel_case_types)] diff --git a/tests/ui/conditional-compilation/cfg-arg-invalid-1.rs b/tests/ui/conditional-compilation/cfg-arg-invalid-1.rs index 0898ca9cda4..cd181f4a49f 100644 --- a/tests/ui/conditional-compilation/cfg-arg-invalid-1.rs +++ b/tests/ui/conditional-compilation/cfg-arg-invalid-1.rs @@ -1,3 +1,3 @@ -// compile-flags: --error-format=human --cfg a(b=c) -// error-pattern: invalid `--cfg` argument: `a(b=c)` (expected `key` or `key="value"`, ensure escaping is appropriate for your shell, try 'key="value"' or key=\"value\") +//@ compile-flags: --error-format=human --cfg a(b=c) +//@ error-pattern: invalid `--cfg` argument: `a(b=c)` (expected `key` or `key="value"`, ensure escaping is appropriate for your shell, try 'key="value"' or key=\"value\") fn main() {} diff --git a/tests/ui/conditional-compilation/cfg-arg-invalid-2.rs b/tests/ui/conditional-compilation/cfg-arg-invalid-2.rs index 70e42560066..a0c16bd1f80 100644 --- a/tests/ui/conditional-compilation/cfg-arg-invalid-2.rs +++ b/tests/ui/conditional-compilation/cfg-arg-invalid-2.rs @@ -1,3 +1,3 @@ -// compile-flags: --error-format=human --cfg a{b} -// error-pattern: invalid `--cfg` argument: `a{b}` (expected `key` or `key="value"`) +//@ compile-flags: --error-format=human --cfg a{b} +//@ error-pattern: invalid `--cfg` argument: `a{b}` (expected `key` or `key="value"`) fn main() {} diff --git a/tests/ui/conditional-compilation/cfg-arg-invalid-3.rs b/tests/ui/conditional-compilation/cfg-arg-invalid-3.rs index 96ac7828c5c..c086b8d8c3f 100644 --- a/tests/ui/conditional-compilation/cfg-arg-invalid-3.rs +++ b/tests/ui/conditional-compilation/cfg-arg-invalid-3.rs @@ -1,3 +1,3 @@ -// compile-flags: --cfg a::b -// error-pattern: invalid `--cfg` argument: `a::b` (argument key must be an identifier) +//@ compile-flags: --cfg a::b +//@ error-pattern: invalid `--cfg` argument: `a::b` (argument key must be an identifier) fn main() {} diff --git a/tests/ui/conditional-compilation/cfg-arg-invalid-4.rs b/tests/ui/conditional-compilation/cfg-arg-invalid-4.rs index 2adc27eb932..30402d51852 100644 --- a/tests/ui/conditional-compilation/cfg-arg-invalid-4.rs +++ b/tests/ui/conditional-compilation/cfg-arg-invalid-4.rs @@ -1,3 +1,3 @@ -// compile-flags: --error-format=human --cfg a(b) -// error-pattern: invalid `--cfg` argument: `a(b)` (expected `key` or `key="value"`) +//@ compile-flags: --error-format=human --cfg a(b) +//@ error-pattern: invalid `--cfg` argument: `a(b)` (expected `key` or `key="value"`) fn main() {} diff --git a/tests/ui/conditional-compilation/cfg-arg-invalid-5.rs b/tests/ui/conditional-compilation/cfg-arg-invalid-5.rs index a939f451038..6f0bf8cf5fe 100644 --- a/tests/ui/conditional-compilation/cfg-arg-invalid-5.rs +++ b/tests/ui/conditional-compilation/cfg-arg-invalid-5.rs @@ -1,3 +1,3 @@ -// compile-flags: --cfg a=10 -// error-pattern: invalid `--cfg` argument: `a=10` (argument value must be a string) +//@ compile-flags: --cfg a=10 +//@ error-pattern: invalid `--cfg` argument: `a=10` (argument value must be a string) fn main() {} diff --git a/tests/ui/conditional-compilation/cfg-arg-invalid-6.rs b/tests/ui/conditional-compilation/cfg-arg-invalid-6.rs index be3ded7dd8b..e0ce66eab87 100644 --- a/tests/ui/conditional-compilation/cfg-arg-invalid-6.rs +++ b/tests/ui/conditional-compilation/cfg-arg-invalid-6.rs @@ -1,3 +1,3 @@ -// compile-flags: --error-format=human --cfg a{ -// error-pattern: invalid `--cfg` argument: `a{` (expected `key` or `key="value"`) +//@ compile-flags: --error-format=human --cfg a{ +//@ error-pattern: invalid `--cfg` argument: `a{` (expected `key` or `key="value"`) fn main() {} diff --git a/tests/ui/conditional-compilation/cfg-arg-invalid-7.rs b/tests/ui/conditional-compilation/cfg-arg-invalid-7.rs index 149142f63ae..b4344f1bca5 100644 --- a/tests/ui/conditional-compilation/cfg-arg-invalid-7.rs +++ b/tests/ui/conditional-compilation/cfg-arg-invalid-7.rs @@ -1,5 +1,5 @@ // Regression test for issue #89358. -// compile-flags: --cfg a" -// error-pattern: unterminated double quote string -// error-pattern: this error occurred on the command line +//@ compile-flags: --cfg a" +//@ error-pattern: unterminated double quote string +//@ error-pattern: this error occurred on the command line diff --git a/tests/ui/conditional-compilation/cfg-arg-invalid-8.rs b/tests/ui/conditional-compilation/cfg-arg-invalid-8.rs index 4a2f16f1133..33f8da25830 100644 --- a/tests/ui/conditional-compilation/cfg-arg-invalid-8.rs +++ b/tests/ui/conditional-compilation/cfg-arg-invalid-8.rs @@ -1,3 +1,3 @@ -// compile-flags: --error-format=human --cfg ) -// error-pattern: invalid `--cfg` argument: `)` (expected `key` or `key="value"`) +//@ compile-flags: --error-format=human --cfg ) +//@ error-pattern: invalid `--cfg` argument: `)` (expected `key` or `key="value"`) fn main() {} diff --git a/tests/ui/conditional-compilation/cfg-arg-invalid-9.rs b/tests/ui/conditional-compilation/cfg-arg-invalid-9.rs index a61989a3e9f..8ab3b101da7 100644 --- a/tests/ui/conditional-compilation/cfg-arg-invalid-9.rs +++ b/tests/ui/conditional-compilation/cfg-arg-invalid-9.rs @@ -1,4 +1,4 @@ // Test for missing quotes around value, issue #66450. -// compile-flags: --error-format=human --cfg key=value -// error-pattern: invalid `--cfg` argument: `key=value` (expected `key` or `key="value"`, ensure escaping is appropriate for your shell, try 'key="value"' or key=\"value\") +//@ compile-flags: --error-format=human --cfg key=value +//@ error-pattern: invalid `--cfg` argument: `key=value` (expected `key` or `key="value"`, ensure escaping is appropriate for your shell, try 'key="value"' or key=\"value\") fn main() {} diff --git a/tests/ui/conditional-compilation/cfg-attr-cfg-2.rs b/tests/ui/conditional-compilation/cfg-attr-cfg-2.rs index 898c5bac850..ae0afc7dfa7 100644 --- a/tests/ui/conditional-compilation/cfg-attr-cfg-2.rs +++ b/tests/ui/conditional-compilation/cfg-attr-cfg-2.rs @@ -1,6 +1,6 @@ // -// error-pattern: `main` function not found -// compile-flags: --cfg foo +//@ error-pattern: `main` function not found +//@ compile-flags: --cfg foo // main is conditionally compiled, but the conditional compilation // is conditional too! diff --git a/tests/ui/conditional-compilation/cfg-attr-crate-2.rs b/tests/ui/conditional-compilation/cfg-attr-crate-2.rs index 7dbeba53afc..710dbd8e818 100644 --- a/tests/ui/conditional-compilation/cfg-attr-crate-2.rs +++ b/tests/ui/conditional-compilation/cfg-attr-crate-2.rs @@ -1,6 +1,6 @@ // https://github.com/rust-lang/rust/issues/21833#issuecomment-72353044 -// compile-flags: --cfg broken +//@ compile-flags: --cfg broken #![crate_type = "lib"] #![cfg_attr(broken, no_core)] //~ ERROR the `#[no_core]` attribute is an experimental feature diff --git a/tests/ui/conditional-compilation/cfg-attr-empty-is-unused.rs b/tests/ui/conditional-compilation/cfg-attr-empty-is-unused.rs index 2600ec7c444..72b0db5da84 100644 --- a/tests/ui/conditional-compilation/cfg-attr-empty-is-unused.rs +++ b/tests/ui/conditional-compilation/cfg-attr-empty-is-unused.rs @@ -1,6 +1,6 @@ // Check that `#[cfg_attr($PREDICATE,)]` triggers the `unused_attribute` lint. -// compile-flags: --cfg TRUE +//@ compile-flags: --cfg TRUE #![deny(unused)] diff --git a/tests/ui/conditional-compilation/cfg-attr-multi-false.rs b/tests/ui/conditional-compilation/cfg-attr-multi-false.rs index 0c7e7cad035..cfb430ec5b2 100644 --- a/tests/ui/conditional-compilation/cfg-attr-multi-false.rs +++ b/tests/ui/conditional-compilation/cfg-attr-multi-false.rs @@ -1,7 +1,7 @@ // Test that cfg_attr doesn't emit any attributes when the // configuration variable is false. This mirrors `cfg-attr-multi-true.rs` -// build-pass (FIXME(62277): could be check-pass?) +//@ build-pass (FIXME(62277): could be check-pass?) #![warn(unused_must_use)] diff --git a/tests/ui/conditional-compilation/cfg-attr-multi-invalid-1.rs b/tests/ui/conditional-compilation/cfg-attr-multi-invalid-1.rs index 42ffb71e3d7..de2c7557a6d 100644 --- a/tests/ui/conditional-compilation/cfg-attr-multi-invalid-1.rs +++ b/tests/ui/conditional-compilation/cfg-attr-multi-invalid-1.rs @@ -1,4 +1,4 @@ -// compile-flags: --cfg broken +//@ compile-flags: --cfg broken #![crate_type = "lib"] #![cfg_attr(broken, no_core, no_std)] diff --git a/tests/ui/conditional-compilation/cfg-attr-multi-invalid-2.rs b/tests/ui/conditional-compilation/cfg-attr-multi-invalid-2.rs index 29690e2848f..e222b79c9d8 100644 --- a/tests/ui/conditional-compilation/cfg-attr-multi-invalid-2.rs +++ b/tests/ui/conditional-compilation/cfg-attr-multi-invalid-2.rs @@ -1,4 +1,4 @@ -// compile-flags: --cfg broken +//@ compile-flags: --cfg broken #![crate_type = "lib"] #![cfg_attr(broken, no_std, no_core)] diff --git a/tests/ui/conditional-compilation/cfg-attr-multi-true.rs b/tests/ui/conditional-compilation/cfg-attr-multi-true.rs index 876d8b079a1..424760c2e66 100644 --- a/tests/ui/conditional-compilation/cfg-attr-multi-true.rs +++ b/tests/ui/conditional-compilation/cfg-attr-multi-true.rs @@ -2,7 +2,7 @@ // This is done by emitting two attributes that cause new warnings, and then // triggering those warnings. -// build-pass (FIXME(62277): could be check-pass?) +//@ build-pass (FIXME(62277): could be check-pass?) #![warn(unused_must_use)] diff --git a/tests/ui/conditional-compilation/cfg-empty-codemap.rs b/tests/ui/conditional-compilation/cfg-empty-codemap.rs index c7aded7338a..d8fc0277759 100644 --- a/tests/ui/conditional-compilation/cfg-empty-codemap.rs +++ b/tests/ui/conditional-compilation/cfg-empty-codemap.rs @@ -1,8 +1,8 @@ // Tests that empty source_maps don't ICE (#23301) -// compile-flags: --error-format=human --cfg "" +//@ compile-flags: --error-format=human --cfg "" -// error-pattern: invalid `--cfg` argument: `""` (expected `key` or `key="value"`) +//@ error-pattern: invalid `--cfg` argument: `""` (expected `key` or `key="value"`) pub fn main() { } diff --git a/tests/ui/conditional-compilation/cfg-generic-params.rs b/tests/ui/conditional-compilation/cfg-generic-params.rs index 53aa3556362..76ba7f9b86e 100644 --- a/tests/ui/conditional-compilation/cfg-generic-params.rs +++ b/tests/ui/conditional-compilation/cfg-generic-params.rs @@ -1,4 +1,4 @@ -// compile-flags:--cfg yes +//@ compile-flags:--cfg yes fn f_lt<#[cfg(yes)] 'a: 'a, #[cfg(no)] T>() {} fn f_ty<#[cfg(no)] 'a: 'a, #[cfg(yes)] T>() {} diff --git a/tests/ui/conditional-compilation/cfg-in-crate-1.rs b/tests/ui/conditional-compilation/cfg-in-crate-1.rs index 8561cd83013..59be27a065e 100644 --- a/tests/ui/conditional-compilation/cfg-in-crate-1.rs +++ b/tests/ui/conditional-compilation/cfg-in-crate-1.rs @@ -1,3 +1,3 @@ -// error-pattern: `main` function not found +//@ error-pattern: `main` function not found #![cfg(bar)] diff --git a/tests/ui/conditional-compilation/cfg_accessible-bugs.rs b/tests/ui/conditional-compilation/cfg_accessible-bugs.rs index ae18bc55c4f..3bf04a7eb9b 100644 --- a/tests/ui/conditional-compilation/cfg_accessible-bugs.rs +++ b/tests/ui/conditional-compilation/cfg_accessible-bugs.rs @@ -1,6 +1,6 @@ // This test is a collection of test that should pass. // -// check-fail +//@ check-fail #![feature(cfg_accessible)] #![feature(trait_alias)] diff --git a/tests/ui/conditional-compilation/cfg_accessible-not_sure.rs b/tests/ui/conditional-compilation/cfg_accessible-not_sure.rs index 99a7949db17..e357d3c6cb5 100644 --- a/tests/ui/conditional-compilation/cfg_accessible-not_sure.rs +++ b/tests/ui/conditional-compilation/cfg_accessible-not_sure.rs @@ -1,6 +1,6 @@ -// revisions: edition2015 edition2021 -// [edition2015]compile-flags: --edition=2015 -// [edition2021]compile-flags: --edition=2021 +//@ revisions: edition2015 edition2021 +//@ [edition2015]compile-flags: --edition=2015 +//@ [edition2021]compile-flags: --edition=2021 #![feature(extern_types)] #![feature(cfg_accessible)] diff --git a/tests/ui/conditional-compilation/cfg_accessible-private.rs b/tests/ui/conditional-compilation/cfg_accessible-private.rs index 5b095675c79..5cc6175d1bb 100644 --- a/tests/ui/conditional-compilation/cfg_accessible-private.rs +++ b/tests/ui/conditional-compilation/cfg_accessible-private.rs @@ -1,4 +1,4 @@ -// check-pass +//@ check-pass #![feature(cfg_accessible)] diff --git a/tests/ui/conditional-compilation/cfg_attr_path.rs b/tests/ui/conditional-compilation/cfg_attr_path.rs index efb718b786f..00e07761977 100644 --- a/tests/ui/conditional-compilation/cfg_attr_path.rs +++ b/tests/ui/conditional-compilation/cfg_attr_path.rs @@ -1,4 +1,4 @@ -// check-pass +//@ check-pass #![deny(unused_attributes)] // c.f #35584 diff --git a/tests/ui/conditional-compilation/inner-cfg-non-inline-mod.rs b/tests/ui/conditional-compilation/inner-cfg-non-inline-mod.rs index af5a6462e8a..12911c7b7c8 100644 --- a/tests/ui/conditional-compilation/inner-cfg-non-inline-mod.rs +++ b/tests/ui/conditional-compilation/inner-cfg-non-inline-mod.rs @@ -1,4 +1,4 @@ -// check-pass +//@ check-pass mod module_with_cfg; diff --git a/tests/ui/conditional-compilation/issue-34028.rs b/tests/ui/conditional-compilation/issue-34028.rs index d761c0c823b..3ee43cb4b32 100644 --- a/tests/ui/conditional-compilation/issue-34028.rs +++ b/tests/ui/conditional-compilation/issue-34028.rs @@ -1,4 +1,4 @@ -// check-pass +//@ check-pass macro_rules! m { () => { #[cfg(any())] fn f() {} } diff --git a/tests/ui/conditional-compilation/module_with_cfg.rs b/tests/ui/conditional-compilation/module_with_cfg.rs index 55c8381cffe..778379fa6ea 100644 --- a/tests/ui/conditional-compilation/module_with_cfg.rs +++ b/tests/ui/conditional-compilation/module_with_cfg.rs @@ -1,3 +1,3 @@ -// ignore-test (auxiliary, used by other tests) +//@ ignore-test (auxiliary, used by other tests) #![cfg_attr(all(), cfg(FALSE))] diff --git a/tests/ui/conditional-compilation/test-cfg.rs b/tests/ui/conditional-compilation/test-cfg.rs index 8750bae0028..7c6c692072d 100644 --- a/tests/ui/conditional-compilation/test-cfg.rs +++ b/tests/ui/conditional-compilation/test-cfg.rs @@ -1,4 +1,4 @@ -// compile-flags: --cfg foo +//@ compile-flags: --cfg foo #[cfg(all(foo, bar))] // foo AND bar fn foo() {} diff --git a/tests/ui/const-generics/adt_const_params/const_param_ty_good.rs b/tests/ui/const-generics/adt_const_params/const_param_ty_good.rs index 100ab332a40..bce24059de8 100644 --- a/tests/ui/const-generics/adt_const_params/const_param_ty_good.rs +++ b/tests/ui/const-generics/adt_const_params/const_param_ty_good.rs @@ -1,4 +1,4 @@ -// check-pass +//@ check-pass #![allow(incomplete_features)] #![feature(adt_const_params)] use std::marker::ConstParamTy; diff --git a/tests/ui/const-generics/apit-with-const-param.rs b/tests/ui/const-generics/apit-with-const-param.rs index 2a04dc313e9..30c27f3db51 100644 --- a/tests/ui/const-generics/apit-with-const-param.rs +++ b/tests/ui/const-generics/apit-with-const-param.rs @@ -1,4 +1,4 @@ -// check-pass +//@ check-pass trait Trait {} diff --git a/tests/ui/const-generics/arg-in-pat-1.rs b/tests/ui/const-generics/arg-in-pat-1.rs index 82555084e41..bb11a02de25 100644 --- a/tests/ui/const-generics/arg-in-pat-1.rs +++ b/tests/ui/const-generics/arg-in-pat-1.rs @@ -1,4 +1,4 @@ -// check-pass +//@ check-pass enum ConstGenericEnum { Foo([i32; N]), Bar, diff --git a/tests/ui/const-generics/arg-in-pat-2.rs b/tests/ui/const-generics/arg-in-pat-2.rs index dc9e722eda8..f40437c9e78 100644 --- a/tests/ui/const-generics/arg-in-pat-2.rs +++ b/tests/ui/const-generics/arg-in-pat-2.rs @@ -1,4 +1,4 @@ -// check-pass +//@ check-pass enum Generic { Variant, } diff --git a/tests/ui/const-generics/arg-in-pat-3.rs b/tests/ui/const-generics/arg-in-pat-3.rs index 24626a3b68a..28bac3c0168 100644 --- a/tests/ui/const-generics/arg-in-pat-3.rs +++ b/tests/ui/const-generics/arg-in-pat-3.rs @@ -1,4 +1,4 @@ -// check-pass +//@ check-pass struct Foo; fn bindingp() { diff --git a/tests/ui/const-generics/array-impls/alloc-traits-impls-length-32.rs b/tests/ui/const-generics/array-impls/alloc-traits-impls-length-32.rs index b4a083636b6..dc28b86ecee 100644 --- a/tests/ui/const-generics/array-impls/alloc-traits-impls-length-32.rs +++ b/tests/ui/const-generics/array-impls/alloc-traits-impls-length-32.rs @@ -1,4 +1,4 @@ -// check-pass +//@ check-pass pub fn yes_vec_partial_eq_array() -> impl PartialEq<[B; 32]> where diff --git a/tests/ui/const-generics/array-impls/alloc-traits-impls-length-33.rs b/tests/ui/const-generics/array-impls/alloc-traits-impls-length-33.rs index 35df3278a6e..3c1fd09dc0f 100644 --- a/tests/ui/const-generics/array-impls/alloc-traits-impls-length-33.rs +++ b/tests/ui/const-generics/array-impls/alloc-traits-impls-length-33.rs @@ -1,4 +1,4 @@ -// check-pass +//@ check-pass pub fn yes_vec_partial_eq_array() -> impl PartialEq<[B; 33]> where diff --git a/tests/ui/const-generics/array-impls/alloc-types-impls-length-33.rs b/tests/ui/const-generics/array-impls/alloc-types-impls-length-33.rs index 294b405e0ed..ac64ff5d14c 100644 --- a/tests/ui/const-generics/array-impls/alloc-types-impls-length-33.rs +++ b/tests/ui/const-generics/array-impls/alloc-types-impls-length-33.rs @@ -1,4 +1,4 @@ -// check-pass +//@ check-pass use std::{convert::TryFrom, rc::Rc, sync::Arc}; diff --git a/tests/ui/const-generics/array-impls/core-traits-impls-length-32.rs b/tests/ui/const-generics/array-impls/core-traits-impls-length-32.rs index 9998bb84ca0..fa907e3cae7 100644 --- a/tests/ui/const-generics/array-impls/core-traits-impls-length-32.rs +++ b/tests/ui/const-generics/array-impls/core-traits-impls-length-32.rs @@ -1,4 +1,4 @@ -// check-pass +//@ check-pass pub fn yes_as_ref() -> impl AsRef<[u8]> { [0; 32] diff --git a/tests/ui/const-generics/array-impls/core-traits-impls-length-33.rs b/tests/ui/const-generics/array-impls/core-traits-impls-length-33.rs index c609a7c6f92..768eb6308ce 100644 --- a/tests/ui/const-generics/array-impls/core-traits-impls-length-33.rs +++ b/tests/ui/const-generics/array-impls/core-traits-impls-length-33.rs @@ -1,4 +1,4 @@ -// check-pass +//@ check-pass pub fn yes_as_ref() -> impl AsRef<[u8]> { [0; 33] diff --git a/tests/ui/const-generics/array-impls/into-iter-impls-length-32.rs b/tests/ui/const-generics/array-impls/into-iter-impls-length-32.rs index 457e5ae6049..b9e1af3690b 100644 --- a/tests/ui/const-generics/array-impls/into-iter-impls-length-32.rs +++ b/tests/ui/const-generics/array-impls/into-iter-impls-length-32.rs @@ -1,4 +1,4 @@ -// check-pass +//@ check-pass #![feature(trusted_len)] diff --git a/tests/ui/const-generics/array-impls/into-iter-impls-length-33.rs b/tests/ui/const-generics/array-impls/into-iter-impls-length-33.rs index 4f343f3f97e..17b2a709f85 100644 --- a/tests/ui/const-generics/array-impls/into-iter-impls-length-33.rs +++ b/tests/ui/const-generics/array-impls/into-iter-impls-length-33.rs @@ -1,4 +1,4 @@ -// check-pass +//@ check-pass #![feature(trusted_len)] diff --git a/tests/ui/const-generics/array-wrapper-struct-ctor.rs b/tests/ui/const-generics/array-wrapper-struct-ctor.rs index a712f691dbe..b94773562e8 100644 --- a/tests/ui/const-generics/array-wrapper-struct-ctor.rs +++ b/tests/ui/const-generics/array-wrapper-struct-ctor.rs @@ -1,4 +1,4 @@ -// run-pass +//@ run-pass #![allow(dead_code)] diff --git a/tests/ui/const-generics/associated-type-bound.rs b/tests/ui/const-generics/associated-type-bound.rs index 0a57352c10d..7ab9e8c3465 100644 --- a/tests/ui/const-generics/associated-type-bound.rs +++ b/tests/ui/const-generics/associated-type-bound.rs @@ -1,4 +1,4 @@ -// check-pass +//@ check-pass trait Bar {} trait Foo { diff --git a/tests/ui/const-generics/auxiliary/crayte.rs b/tests/ui/const-generics/auxiliary/crayte.rs index 19a8bb0f4eb..d0d44f6f96a 100644 --- a/tests/ui/const-generics/auxiliary/crayte.rs +++ b/tests/ui/const-generics/auxiliary/crayte.rs @@ -1,4 +1,4 @@ -// edition:2018 +//@ edition:2018 pub trait Foo {} struct Local; diff --git a/tests/ui/const-generics/backcompat/trait-resolution-breakage.rs b/tests/ui/const-generics/backcompat/trait-resolution-breakage.rs index df1c99e8671..2e070329a49 100644 --- a/tests/ui/const-generics/backcompat/trait-resolution-breakage.rs +++ b/tests/ui/const-generics/backcompat/trait-resolution-breakage.rs @@ -1,4 +1,4 @@ -// check-pass +//@ check-pass trait Trait { const ASSOC_CONST: usize = 0; diff --git a/tests/ui/const-generics/backcompat/unevaluated-consts.rs b/tests/ui/const-generics/backcompat/unevaluated-consts.rs index 3f90d22ae2d..ec9f35e0513 100644 --- a/tests/ui/const-generics/backcompat/unevaluated-consts.rs +++ b/tests/ui/const-generics/backcompat/unevaluated-consts.rs @@ -1,4 +1,4 @@ -// check-pass +//@ check-pass // If we allow the parent generics here without using lazy normalization // this results in a cycle error. diff --git a/tests/ui/const-generics/bad-subst-const-kind.rs b/tests/ui/const-generics/bad-subst-const-kind.rs index 376b18c15b8..ca5522a2ddf 100644 --- a/tests/ui/const-generics/bad-subst-const-kind.rs +++ b/tests/ui/const-generics/bad-subst-const-kind.rs @@ -1,4 +1,4 @@ -// incremental +//@ incremental #![crate_type = "lib"] trait Q { diff --git a/tests/ui/const-generics/broken-mir-1.rs b/tests/ui/const-generics/broken-mir-1.rs index 6b6140e3a73..67b18994785 100644 --- a/tests/ui/const-generics/broken-mir-1.rs +++ b/tests/ui/const-generics/broken-mir-1.rs @@ -1,4 +1,4 @@ -// run-pass +//@ run-pass pub trait Foo { fn foo(&self); } diff --git a/tests/ui/const-generics/broken-mir-2.rs b/tests/ui/const-generics/broken-mir-2.rs index 9d62281178c..46a714f1883 100644 --- a/tests/ui/const-generics/broken-mir-2.rs +++ b/tests/ui/const-generics/broken-mir-2.rs @@ -1,4 +1,4 @@ -// run-pass +//@ run-pass #![allow(dead_code)] diff --git a/tests/ui/const-generics/cannot-infer-type-for-const-param.rs b/tests/ui/const-generics/cannot-infer-type-for-const-param.rs index a6e767489b7..11ee6af2413 100644 --- a/tests/ui/const-generics/cannot-infer-type-for-const-param.rs +++ b/tests/ui/const-generics/cannot-infer-type-for-const-param.rs @@ -1,4 +1,4 @@ -// check-pass +//@ check-pass // This test confirms that the types can be inferred correctly for this example with const // generics. Previously this would ICE, and more recently error. diff --git a/tests/ui/const-generics/coerce_unsized_array.rs b/tests/ui/const-generics/coerce_unsized_array.rs index ffd5eb9d462..baecead30a1 100644 --- a/tests/ui/const-generics/coerce_unsized_array.rs +++ b/tests/ui/const-generics/coerce_unsized_array.rs @@ -1,4 +1,4 @@ -// run-pass +//@ run-pass fn foo(v: &[u8; N]) -> &[u8] { v } diff --git a/tests/ui/const-generics/concrete-const-as-fn-arg.rs b/tests/ui/const-generics/concrete-const-as-fn-arg.rs index 372f0433e95..5495f663e7f 100644 --- a/tests/ui/const-generics/concrete-const-as-fn-arg.rs +++ b/tests/ui/const-generics/concrete-const-as-fn-arg.rs @@ -1,5 +1,5 @@ // Test that a concrete const type i.e. A<2>, can be used as an argument type in a function -// run-pass +//@ run-pass struct A; // ok diff --git a/tests/ui/const-generics/concrete-const-impl-method.rs b/tests/ui/const-generics/concrete-const-impl-method.rs index 53c9c0ead0f..baed03d1af4 100644 --- a/tests/ui/const-generics/concrete-const-impl-method.rs +++ b/tests/ui/const-generics/concrete-const-impl-method.rs @@ -1,6 +1,6 @@ // Test that a method/associated non-method within an impl block of a concrete const type i.e. A<2>, // is callable. -// run-pass +//@ run-pass pub struct A; diff --git a/tests/ui/const-generics/condition-in-trait-const-arg.rs b/tests/ui/const-generics/condition-in-trait-const-arg.rs index 74a663a53ec..d67b7568954 100644 --- a/tests/ui/const-generics/condition-in-trait-const-arg.rs +++ b/tests/ui/const-generics/condition-in-trait-const-arg.rs @@ -1,6 +1,6 @@ // Checks that `impl Trait<{anon_const}> for Type` evaluates successfully. -// check-pass -// revisions: full min +//@ check-pass +//@ revisions: full min #![cfg_attr(full, feature(generic_const_exprs))] #![cfg_attr(full, allow(incomplete_features))] diff --git a/tests/ui/const-generics/const-arg-in-const-arg.rs b/tests/ui/const-generics/const-arg-in-const-arg.rs index c1a4c3dc348..6d30943ab7e 100644 --- a/tests/ui/const-generics/const-arg-in-const-arg.rs +++ b/tests/ui/const-generics/const-arg-in-const-arg.rs @@ -1,4 +1,4 @@ -// revisions: min +//@ revisions: min // we use a single revision because this should have a `full` revision // but right now that ICEs and I(@BoxyUwU) could not get stderr normalization to work diff --git a/tests/ui/const-generics/const-arg-in-fn.rs b/tests/ui/const-generics/const-arg-in-fn.rs index 9b225b18d73..8b4ee2a00a5 100644 --- a/tests/ui/const-generics/const-arg-in-fn.rs +++ b/tests/ui/const-generics/const-arg-in-fn.rs @@ -1,4 +1,4 @@ -// run-pass +//@ run-pass fn const_u32_identity() -> u32 { X } diff --git a/tests/ui/const-generics/const-argument-cross-crate-mismatch.rs b/tests/ui/const-generics/const-argument-cross-crate-mismatch.rs index d863d097d5c..f8af5110d27 100644 --- a/tests/ui/const-generics/const-argument-cross-crate-mismatch.rs +++ b/tests/ui/const-generics/const-argument-cross-crate-mismatch.rs @@ -1,4 +1,4 @@ -// aux-build:const_generic_lib.rs +//@ aux-build:const_generic_lib.rs extern crate const_generic_lib; diff --git a/tests/ui/const-generics/const-argument-cross-crate.rs b/tests/ui/const-generics/const-argument-cross-crate.rs index ff9cebdf7ec..a850bde4fa1 100644 --- a/tests/ui/const-generics/const-argument-cross-crate.rs +++ b/tests/ui/const-generics/const-argument-cross-crate.rs @@ -1,6 +1,6 @@ -// run-pass -// revisions: full min -// aux-build:const_generic_lib.rs +//@ run-pass +//@ revisions: full min +//@ aux-build:const_generic_lib.rs extern crate const_generic_lib; diff --git a/tests/ui/const-generics/const-argument-if-length.rs b/tests/ui/const-generics/const-argument-if-length.rs index c5ff86fbfb7..11f06613022 100644 --- a/tests/ui/const-generics/const-argument-if-length.rs +++ b/tests/ui/const-generics/const-argument-if-length.rs @@ -1,4 +1,4 @@ -// revisions: full min +//@ revisions: full min #![cfg_attr(full, feature(generic_const_exprs))] #![cfg_attr(full, allow(incomplete_features))] diff --git a/tests/ui/const-generics/const-argument-non-static-lifetime.rs b/tests/ui/const-generics/const-argument-non-static-lifetime.rs index df2f3b7918c..6267462c518 100644 --- a/tests/ui/const-generics/const-argument-non-static-lifetime.rs +++ b/tests/ui/const-generics/const-argument-non-static-lifetime.rs @@ -1,5 +1,5 @@ -// [full] check-pass -// revisions: full min +//@ [full] check-pass +//@ revisions: full min // regression test for #78180 diff --git a/tests/ui/const-generics/const-fn-with-const-param.rs b/tests/ui/const-generics/const-fn-with-const-param.rs index 161bfaab48a..86a56c1e9e7 100644 --- a/tests/ui/const-generics/const-fn-with-const-param.rs +++ b/tests/ui/const-generics/const-fn-with-const-param.rs @@ -1,5 +1,5 @@ // Checks that `const fn` with const params can be used. -// run-pass +//@ run-pass const fn const_u32_identity() -> u32 { X diff --git a/tests/ui/const-generics/const-generic-type_name.rs b/tests/ui/const-generics/const-generic-type_name.rs index bb16be9c58c..ff13034f6e5 100644 --- a/tests/ui/const-generics/const-generic-type_name.rs +++ b/tests/ui/const-generics/const-generic-type_name.rs @@ -1,4 +1,4 @@ -// run-pass +//@ run-pass #[derive(Debug)] struct S; diff --git a/tests/ui/const-generics/const-param-after-const-literal-arg.rs b/tests/ui/const-generics/const-param-after-const-literal-arg.rs index d8a0e076e0a..9caeb485695 100644 --- a/tests/ui/const-generics/const-param-after-const-literal-arg.rs +++ b/tests/ui/const-generics/const-param-after-const-literal-arg.rs @@ -1,4 +1,4 @@ -// check-pass +//@ check-pass struct Foo; diff --git a/tests/ui/const-generics/const-param-elided-lifetime.rs b/tests/ui/const-generics/const-param-elided-lifetime.rs index 45611d6bf5f..ef1eecb59be 100644 --- a/tests/ui/const-generics/const-param-elided-lifetime.rs +++ b/tests/ui/const-generics/const-param-elided-lifetime.rs @@ -2,7 +2,7 @@ // behaviour of trait bounds where `fn foo>() {}` is illegal. Though we could change // elided lifetimes within the type of a const generic parameters to be 'static, like elided // lifetimes within const/static items. -// revisions: full min +//@ revisions: full min #![cfg_attr(full, feature(adt_const_params))] #![cfg_attr(full, allow(incomplete_features))] diff --git a/tests/ui/const-generics/const-param-in-async.rs b/tests/ui/const-generics/const-param-in-async.rs index f823431e69b..a6d4b2605cd 100644 --- a/tests/ui/const-generics/const-param-in-async.rs +++ b/tests/ui/const-generics/const-param-in-async.rs @@ -1,5 +1,5 @@ -// edition:2018 -// check-pass +//@ edition:2018 +//@ check-pass async fn foo(arg: [u8; N]) -> usize { arg.len() } diff --git a/tests/ui/const-generics/const-param-type-depends-on-const-param.rs b/tests/ui/const-generics/const-param-type-depends-on-const-param.rs index 64b2acb0362..ee0e1326baa 100644 --- a/tests/ui/const-generics/const-param-type-depends-on-const-param.rs +++ b/tests/ui/const-generics/const-param-type-depends-on-const-param.rs @@ -1,4 +1,4 @@ -// revisions: full min +//@ revisions: full min #![cfg_attr(full, feature(adt_const_params))] #![cfg_attr(full, allow(incomplete_features))] diff --git a/tests/ui/const-generics/const-param-type-depends-on-type-param.rs b/tests/ui/const-generics/const-param-type-depends-on-type-param.rs index fc3aa9cbc27..1583fc4ee6c 100644 --- a/tests/ui/const-generics/const-param-type-depends-on-type-param.rs +++ b/tests/ui/const-generics/const-param-type-depends-on-type-param.rs @@ -1,4 +1,4 @@ -// revisions: full min +//@ revisions: full min #![cfg_attr(full, feature(adt_const_params))] #![cfg_attr(full, allow(incomplete_features))] diff --git a/tests/ui/const-generics/const_trait_fn-issue-88433.rs b/tests/ui/const-generics/const_trait_fn-issue-88433.rs index 88dff919206..89bcd54c461 100644 --- a/tests/ui/const-generics/const_trait_fn-issue-88433.rs +++ b/tests/ui/const-generics/const_trait_fn-issue-88433.rs @@ -1,4 +1,4 @@ -// build-pass +//@ build-pass #![feature(const_trait_impl, effects)] diff --git a/tests/ui/const-generics/core-types.rs b/tests/ui/const-generics/core-types.rs index 91410c4afdf..03b3bc172b0 100644 --- a/tests/ui/const-generics/core-types.rs +++ b/tests/ui/const-generics/core-types.rs @@ -1,6 +1,6 @@ // Check that all types allowed with `min_const_generics` work. -// run-pass -// revisions: full min +//@ run-pass +//@ revisions: full min #![cfg_attr(full, feature(adt_const_params))] #![cfg_attr(full, allow(incomplete_features))] diff --git a/tests/ui/const-generics/cross_crate_complex.rs b/tests/ui/const-generics/cross_crate_complex.rs index ebde155f776..d13b69aa0cf 100644 --- a/tests/ui/const-generics/cross_crate_complex.rs +++ b/tests/ui/const-generics/cross_crate_complex.rs @@ -1,6 +1,6 @@ -// aux-build:crayte.rs -// edition:2018 -// run-pass +//@ aux-build:crayte.rs +//@ edition:2018 +//@ run-pass extern crate crayte; use crayte::*; diff --git a/tests/ui/const-generics/defaults/complex-generic-default-expr.rs b/tests/ui/const-generics/defaults/complex-generic-default-expr.rs index 7f50d4c9f29..50fb4eb6e6c 100644 --- a/tests/ui/const-generics/defaults/complex-generic-default-expr.rs +++ b/tests/ui/const-generics/defaults/complex-generic-default-expr.rs @@ -1,5 +1,5 @@ -// revisions: full min -//[full] check-pass +//@ revisions: full min +//@[full] check-pass #![cfg_attr(full, feature(generic_const_exprs))] #![cfg_attr(full, allow(incomplete_features))] diff --git a/tests/ui/const-generics/defaults/complex-unord-param.rs b/tests/ui/const-generics/defaults/complex-unord-param.rs index aebc5975a5a..5783fc41557 100644 --- a/tests/ui/const-generics/defaults/complex-unord-param.rs +++ b/tests/ui/const-generics/defaults/complex-unord-param.rs @@ -1,4 +1,4 @@ -// run-pass +//@ run-pass // Checks a complicated usage of unordered params #![allow(dead_code)] diff --git a/tests/ui/const-generics/defaults/const-default.rs b/tests/ui/const-generics/defaults/const-default.rs index 65cb0eb14a3..01054fb755e 100644 --- a/tests/ui/const-generics/defaults/const-default.rs +++ b/tests/ui/const-generics/defaults/const-default.rs @@ -1,4 +1,4 @@ -// run-pass +//@ run-pass pub struct ConstDefault; impl ConstDefault { diff --git a/tests/ui/const-generics/defaults/const-param-as-default-value.rs b/tests/ui/const-generics/defaults/const-param-as-default-value.rs index c1c955d8758..b1f6707892c 100644 --- a/tests/ui/const-generics/defaults/const-param-as-default-value.rs +++ b/tests/ui/const-generics/defaults/const-param-as-default-value.rs @@ -1,4 +1,4 @@ -// run-pass +//@ run-pass struct Foo([u8; N], [u8; M]); fn foo() -> Foo { diff --git a/tests/ui/const-generics/defaults/const-param-in-ty-defaults.rs b/tests/ui/const-generics/defaults/const-param-in-ty-defaults.rs index 5f0cafe2ef1..1720109c6f4 100644 --- a/tests/ui/const-generics/defaults/const-param-in-ty-defaults.rs +++ b/tests/ui/const-generics/defaults/const-param-in-ty-defaults.rs @@ -1,4 +1,4 @@ -// run-pass +//@ run-pass struct Foo(T); impl Foo { diff --git a/tests/ui/const-generics/defaults/default-annotation.rs b/tests/ui/const-generics/defaults/default-annotation.rs index 587ad78e298..fbb30d43a67 100644 --- a/tests/ui/const-generics/defaults/default-annotation.rs +++ b/tests/ui/const-generics/defaults/default-annotation.rs @@ -1,4 +1,4 @@ -// run-pass +//@ run-pass #![feature(staged_api)] #![allow(incomplete_features)] // FIXME(const_generics_defaults): It seems like we aren't testing the right thing here, diff --git a/tests/ui/const-generics/defaults/default-param-wf-concrete.rs b/tests/ui/const-generics/defaults/default-param-wf-concrete.rs index aa3307b92e4..f181f582332 100644 --- a/tests/ui/const-generics/defaults/default-param-wf-concrete.rs +++ b/tests/ui/const-generics/defaults/default-param-wf-concrete.rs @@ -1,5 +1,5 @@ -// revisions: old next -//[next] compile-flags: -Znext-solver +//@ revisions: old next +//@[next] compile-flags: -Znext-solver struct Foo; //~^ ERROR evaluation of constant value failed diff --git a/tests/ui/const-generics/defaults/external.rs b/tests/ui/const-generics/defaults/external.rs index 25ec523cb54..241b5205f10 100644 --- a/tests/ui/const-generics/defaults/external.rs +++ b/tests/ui/const-generics/defaults/external.rs @@ -1,5 +1,5 @@ -// aux-build:const_defaulty.rs -// check-pass +//@ aux-build:const_defaulty.rs +//@ check-pass extern crate const_defaulty; use const_defaulty::Defaulted; diff --git a/tests/ui/const-generics/defaults/pretty-printing-ast.rs b/tests/ui/const-generics/defaults/pretty-printing-ast.rs index e202d4e86a2..20bf900d9f3 100644 --- a/tests/ui/const-generics/defaults/pretty-printing-ast.rs +++ b/tests/ui/const-generics/defaults/pretty-printing-ast.rs @@ -1,6 +1,6 @@ // Test the AST pretty printer correctly handles default values for const generics -// check-pass -// compile-flags: -Z unpretty=expanded +//@ check-pass +//@ compile-flags: -Z unpretty=expanded #![crate_type = "lib"] diff --git a/tests/ui/const-generics/defaults/pretty-printing-ast.stdout b/tests/ui/const-generics/defaults/pretty-printing-ast.stdout index 121138605f1..f1cd1451700 100644 --- a/tests/ui/const-generics/defaults/pretty-printing-ast.stdout +++ b/tests/ui/const-generics/defaults/pretty-printing-ast.stdout @@ -1,8 +1,8 @@ #![feature(prelude_import)] #![no_std] // Test the AST pretty printer correctly handles default values for const generics -// check-pass -// compile-flags: -Z unpretty=expanded +//@ check-pass +//@ compile-flags: -Z unpretty=expanded #![crate_type = "lib"] #[prelude_import] diff --git a/tests/ui/const-generics/defaults/repr-c-issue-82792.rs b/tests/ui/const-generics/defaults/repr-c-issue-82792.rs index 118da2723ac..c23187598bc 100644 --- a/tests/ui/const-generics/defaults/repr-c-issue-82792.rs +++ b/tests/ui/const-generics/defaults/repr-c-issue-82792.rs @@ -1,6 +1,6 @@ // Regression test for #82792. -// run-pass +//@ run-pass #[repr(C)] pub struct Loaf { diff --git a/tests/ui/const-generics/defaults/rp_impl_trait.rs b/tests/ui/const-generics/defaults/rp_impl_trait.rs index dde8eea4525..406efbd0f88 100644 --- a/tests/ui/const-generics/defaults/rp_impl_trait.rs +++ b/tests/ui/const-generics/defaults/rp_impl_trait.rs @@ -1,4 +1,4 @@ -// run-pass +//@ run-pass struct Uwu; trait Trait {} diff --git a/tests/ui/const-generics/defaults/simple-defaults.rs b/tests/ui/const-generics/defaults/simple-defaults.rs index 6a782d2238c..ecc8cad2684 100644 --- a/tests/ui/const-generics/defaults/simple-defaults.rs +++ b/tests/ui/const-generics/defaults/simple-defaults.rs @@ -1,4 +1,4 @@ -// run-pass +//@ run-pass // Checks that type param defaults are allowed after const params. #![allow(dead_code)] diff --git a/tests/ui/const-generics/defaults/trait_object_lt_defaults.rs b/tests/ui/const-generics/defaults/trait_object_lt_defaults.rs index a1828727ecd..39dd6cb031f 100644 --- a/tests/ui/const-generics/defaults/trait_object_lt_defaults.rs +++ b/tests/ui/const-generics/defaults/trait_object_lt_defaults.rs @@ -1,5 +1,5 @@ -// aux-build:trait_object_lt_defaults_lib.rs -// run-pass +//@ aux-build:trait_object_lt_defaults_lib.rs +//@ run-pass #![allow(dead_code)] extern crate trait_object_lt_defaults_lib; diff --git a/tests/ui/const-generics/defaults/trait_objects.rs b/tests/ui/const-generics/defaults/trait_objects.rs index 750e40313fb..d22eb34b7a2 100644 --- a/tests/ui/const-generics/defaults/trait_objects.rs +++ b/tests/ui/const-generics/defaults/trait_objects.rs @@ -1,4 +1,4 @@ -// run-pass +//@ run-pass trait Trait { fn uwu(&self) -> u8 { N diff --git a/tests/ui/const-generics/defaults/type-default-const-param-name.rs b/tests/ui/const-generics/defaults/type-default-const-param-name.rs index 405664dedc7..191b752066a 100644 --- a/tests/ui/const-generics/defaults/type-default-const-param-name.rs +++ b/tests/ui/const-generics/defaults/type-default-const-param-name.rs @@ -1,4 +1,4 @@ -// check-pass +//@ check-pass struct N; struct Foo(T); diff --git a/tests/ui/const-generics/deref-into-array-generic.rs b/tests/ui/const-generics/deref-into-array-generic.rs index 7d75af12bdf..590f9d17e34 100644 --- a/tests/ui/const-generics/deref-into-array-generic.rs +++ b/tests/ui/const-generics/deref-into-array-generic.rs @@ -1,4 +1,4 @@ -// check-pass +//@ check-pass struct Test([T; N]); diff --git a/tests/ui/const-generics/different_generic_args.rs b/tests/ui/const-generics/different_generic_args.rs index 9ee0e0747c4..045f0eaf663 100644 --- a/tests/ui/const-generics/different_generic_args.rs +++ b/tests/ui/const-generics/different_generic_args.rs @@ -1,5 +1,5 @@ // Check that types with different const arguments are different. -// revisions: full min +//@ revisions: full min #![cfg_attr(full, feature(generic_const_exprs))] #![cfg_attr(full, allow(incomplete_features))] diff --git a/tests/ui/const-generics/dyn-supertraits.rs b/tests/ui/const-generics/dyn-supertraits.rs index bb492452982..9f1705cfa9b 100644 --- a/tests/ui/const-generics/dyn-supertraits.rs +++ b/tests/ui/const-generics/dyn-supertraits.rs @@ -1,4 +1,4 @@ -// run-pass +//@ run-pass trait Foo { fn myfun(&self) -> usize; diff --git a/tests/ui/const-generics/early/const-param-hygiene.rs b/tests/ui/const-generics/early/const-param-hygiene.rs index fd4e5b409ee..76a4b8372c1 100644 --- a/tests/ui/const-generics/early/const-param-hygiene.rs +++ b/tests/ui/const-generics/early/const-param-hygiene.rs @@ -1,4 +1,4 @@ -// run-pass +//@ run-pass macro_rules! bar { ($($t:tt)*) => { impl $($t)* }; diff --git a/tests/ui/const-generics/enum-variants.rs b/tests/ui/const-generics/enum-variants.rs index 5c6c4a8efac..648c7dcbdce 100644 --- a/tests/ui/const-generics/enum-variants.rs +++ b/tests/ui/const-generics/enum-variants.rs @@ -1,4 +1,4 @@ -// check-pass +//@ check-pass enum Foo { Variant, Variant2(), diff --git a/tests/ui/const-generics/expose-default-substs-param-env.rs b/tests/ui/const-generics/expose-default-substs-param-env.rs index e40c93116af..4a92de2573d 100644 --- a/tests/ui/const-generics/expose-default-substs-param-env.rs +++ b/tests/ui/const-generics/expose-default-substs-param-env.rs @@ -1,4 +1,4 @@ -// build-pass +//@ build-pass #![feature(generic_const_exprs)] #![allow(unused_braces, incomplete_features)] diff --git a/tests/ui/const-generics/float-generic.rs b/tests/ui/const-generics/float-generic.rs index b72059b5b1c..aaf63a93d70 100644 --- a/tests/ui/const-generics/float-generic.rs +++ b/tests/ui/const-generics/float-generic.rs @@ -1,4 +1,4 @@ -// revisions: simple adt_const_params +//@ revisions: simple adt_const_params #![cfg_attr(adt_const_params, feature(adt_const_params))] #![cfg_attr(adt_const_params, allow(incomplete_features))] diff --git a/tests/ui/const-generics/fn-const-param-call.rs b/tests/ui/const-generics/fn-const-param-call.rs index dc516fb71c4..ce780143178 100644 --- a/tests/ui/const-generics/fn-const-param-call.rs +++ b/tests/ui/const-generics/fn-const-param-call.rs @@ -1,5 +1,5 @@ // Check that functions cannot be used as const parameters. -// revisions: full min +//@ revisions: full min #![cfg_attr(full, feature(adt_const_params))] #![cfg_attr(full, allow(incomplete_features))] diff --git a/tests/ui/const-generics/fn-const-param-infer.rs b/tests/ui/const-generics/fn-const-param-infer.rs index d80e18067e2..ed0bb9f7217 100644 --- a/tests/ui/const-generics/fn-const-param-infer.rs +++ b/tests/ui/const-generics/fn-const-param-infer.rs @@ -1,4 +1,4 @@ -// revisions: full min +//@ revisions: full min #![cfg_attr(full, feature(adt_const_params))] #![cfg_attr(full, allow(incomplete_features))] diff --git a/tests/ui/const-generics/fn_with_two_same_const_inputs.rs b/tests/ui/const-generics/fn_with_two_same_const_inputs.rs index f0ce093e07a..d8d97cd098b 100644 --- a/tests/ui/const-generics/fn_with_two_same_const_inputs.rs +++ b/tests/ui/const-generics/fn_with_two_same_const_inputs.rs @@ -1,4 +1,4 @@ -// check-pass +//@ check-pass #![feature(generic_const_exprs)] #![allow(incomplete_features)] diff --git a/tests/ui/const-generics/generic_arg_infer/array-repeat-expr.rs b/tests/ui/const-generics/generic_arg_infer/array-repeat-expr.rs index d3e53d7a892..34091badfa7 100644 --- a/tests/ui/const-generics/generic_arg_infer/array-repeat-expr.rs +++ b/tests/ui/const-generics/generic_arg_infer/array-repeat-expr.rs @@ -1,4 +1,4 @@ -// run-pass +//@ run-pass // To avoid having to `or` gate `_` as an expr. #![feature(generic_arg_infer)] diff --git a/tests/ui/const-generics/generic_arg_infer/dont-use-defaults.rs b/tests/ui/const-generics/generic_arg_infer/dont-use-defaults.rs index 251160a0f5f..613ea9da99d 100644 --- a/tests/ui/const-generics/generic_arg_infer/dont-use-defaults.rs +++ b/tests/ui/const-generics/generic_arg_infer/dont-use-defaults.rs @@ -1,4 +1,4 @@ -// run-pass +//@ run-pass #![feature(generic_arg_infer)] // test that we dont use defaults to aide in type inference diff --git a/tests/ui/const-generics/generic_arg_infer/infer_arg_and_const_arg.rs b/tests/ui/const-generics/generic_arg_infer/infer_arg_and_const_arg.rs index 23c8d753752..35b3fe4f435 100644 --- a/tests/ui/const-generics/generic_arg_infer/infer_arg_and_const_arg.rs +++ b/tests/ui/const-generics/generic_arg_infer/infer_arg_and_const_arg.rs @@ -1,4 +1,4 @@ -// check-pass +//@ check-pass #![feature(generic_arg_infer)] struct Foo; diff --git a/tests/ui/const-generics/generic_const_exprs/abstract-const-as-cast-1.rs b/tests/ui/const-generics/generic_const_exprs/abstract-const-as-cast-1.rs index 06f00de13a3..ff578242800 100644 --- a/tests/ui/const-generics/generic_const_exprs/abstract-const-as-cast-1.rs +++ b/tests/ui/const-generics/generic_const_exprs/abstract-const-as-cast-1.rs @@ -1,4 +1,4 @@ -// check-pass +//@ check-pass #![feature(generic_const_exprs)] #![allow(incomplete_features)] diff --git a/tests/ui/const-generics/generic_const_exprs/abstract-const-as-cast-4.rs b/tests/ui/const-generics/generic_const_exprs/abstract-const-as-cast-4.rs index 184263f899a..8df5da48346 100644 --- a/tests/ui/const-generics/generic_const_exprs/abstract-const-as-cast-4.rs +++ b/tests/ui/const-generics/generic_const_exprs/abstract-const-as-cast-4.rs @@ -1,4 +1,4 @@ -// check-pass +//@ check-pass #![feature(generic_const_exprs)] #![allow(incomplete_features)] diff --git a/tests/ui/const-generics/generic_const_exprs/array-size-in-generic-struct-param.rs b/tests/ui/const-generics/generic_const_exprs/array-size-in-generic-struct-param.rs index 33ca6dcb304..fc56742dab6 100644 --- a/tests/ui/const-generics/generic_const_exprs/array-size-in-generic-struct-param.rs +++ b/tests/ui/const-generics/generic_const_exprs/array-size-in-generic-struct-param.rs @@ -1,5 +1,5 @@ // Tests that array sizes that depend on const-params are checked using `ConstEvaluatable`. -// revisions: full min +//@ revisions: full min #![cfg_attr(full, feature(generic_const_exprs, adt_const_params))] #![cfg_attr(full, allow(incomplete_features))] diff --git a/tests/ui/const-generics/generic_const_exprs/assoc_const_unification/const_equate_assoc_consts.rs b/tests/ui/const-generics/generic_const_exprs/assoc_const_unification/const_equate_assoc_consts.rs index e8f89cb1aa2..108a630ec70 100644 --- a/tests/ui/const-generics/generic_const_exprs/assoc_const_unification/const_equate_assoc_consts.rs +++ b/tests/ui/const-generics/generic_const_exprs/assoc_const_unification/const_equate_assoc_consts.rs @@ -1,4 +1,4 @@ -// check-pass +//@ check-pass #![feature(generic_const_exprs)] #![allow(incomplete_features)] diff --git a/tests/ui/const-generics/generic_const_exprs/assoc_const_unification/dropck_unifies_assoc_consts.rs b/tests/ui/const-generics/generic_const_exprs/assoc_const_unification/dropck_unifies_assoc_consts.rs index 274caa1e993..84a1a616192 100644 --- a/tests/ui/const-generics/generic_const_exprs/assoc_const_unification/dropck_unifies_assoc_consts.rs +++ b/tests/ui/const-generics/generic_const_exprs/assoc_const_unification/dropck_unifies_assoc_consts.rs @@ -1,4 +1,4 @@ -// check-pass +//@ check-pass #![feature(generic_const_exprs)] #![allow(incomplete_features)] diff --git a/tests/ui/const-generics/generic_const_exprs/assoc_const_unification/unifies_evaluatable.rs b/tests/ui/const-generics/generic_const_exprs/assoc_const_unification/unifies_evaluatable.rs index 6597b9f2b3f..c4d96a36211 100644 --- a/tests/ui/const-generics/generic_const_exprs/assoc_const_unification/unifies_evaluatable.rs +++ b/tests/ui/const-generics/generic_const_exprs/assoc_const_unification/unifies_evaluatable.rs @@ -1,4 +1,4 @@ -// check-pass +//@ check-pass #![feature(generic_const_exprs)] #![allow(incomplete_features)] diff --git a/tests/ui/const-generics/generic_const_exprs/associated-const.rs b/tests/ui/const-generics/generic_const_exprs/associated-const.rs index a6777632254..747e4eb917f 100644 --- a/tests/ui/const-generics/generic_const_exprs/associated-const.rs +++ b/tests/ui/const-generics/generic_const_exprs/associated-const.rs @@ -1,4 +1,4 @@ -// check-pass +//@ check-pass struct Foo(T); impl Foo { const VALUE: usize = std::mem::size_of::(); diff --git a/tests/ui/const-generics/generic_const_exprs/associated-consts.rs b/tests/ui/const-generics/generic_const_exprs/associated-consts.rs index 3bc72fe7faa..5d2198f50ad 100644 --- a/tests/ui/const-generics/generic_const_exprs/associated-consts.rs +++ b/tests/ui/const-generics/generic_const_exprs/associated-consts.rs @@ -1,4 +1,4 @@ -// run-pass +//@ run-pass #![feature(generic_const_exprs)] #![allow(incomplete_features)] diff --git a/tests/ui/const-generics/generic_const_exprs/const_eval_resolve_canonical.rs b/tests/ui/const-generics/generic_const_exprs/const_eval_resolve_canonical.rs index 5874625adff..bfe31b66e5b 100644 --- a/tests/ui/const-generics/generic_const_exprs/const_eval_resolve_canonical.rs +++ b/tests/ui/const-generics/generic_const_exprs/const_eval_resolve_canonical.rs @@ -1,4 +1,4 @@ -// check-pass +//@ check-pass #![feature(generic_const_exprs)] #![allow(incomplete_features)] diff --git a/tests/ui/const-generics/generic_const_exprs/const_kind_expr/relate_ty_with_infer_1.rs b/tests/ui/const-generics/generic_const_exprs/const_kind_expr/relate_ty_with_infer_1.rs index 1e248411830..0d3158c242a 100644 --- a/tests/ui/const-generics/generic_const_exprs/const_kind_expr/relate_ty_with_infer_1.rs +++ b/tests/ui/const-generics/generic_const_exprs/const_kind_expr/relate_ty_with_infer_1.rs @@ -1,4 +1,4 @@ -// check-pass +//@ check-pass #![feature(generic_const_exprs)] #![allow(incomplete_features)] diff --git a/tests/ui/const-generics/generic_const_exprs/const_kind_expr/relate_ty_with_infer_2.rs b/tests/ui/const-generics/generic_const_exprs/const_kind_expr/relate_ty_with_infer_2.rs index 91a8a7c4a01..4333ec9f552 100644 --- a/tests/ui/const-generics/generic_const_exprs/const_kind_expr/relate_ty_with_infer_2.rs +++ b/tests/ui/const-generics/generic_const_exprs/const_kind_expr/relate_ty_with_infer_2.rs @@ -1,4 +1,4 @@ -// check-pass +//@ check-pass #![feature(inline_const, generic_const_exprs)] #![allow(incomplete_features)] use std::marker::PhantomData; diff --git a/tests/ui/const-generics/generic_const_exprs/cross_crate.rs b/tests/ui/const-generics/generic_const_exprs/cross_crate.rs index dfc69e0b068..18058b8b83d 100644 --- a/tests/ui/const-generics/generic_const_exprs/cross_crate.rs +++ b/tests/ui/const-generics/generic_const_exprs/cross_crate.rs @@ -1,5 +1,5 @@ -// aux-build:const_evaluatable_lib.rs -// run-pass +//@ aux-build:const_evaluatable_lib.rs +//@ run-pass #![feature(generic_const_exprs)] #![allow(incomplete_features)] extern crate const_evaluatable_lib; diff --git a/tests/ui/const-generics/generic_const_exprs/cross_crate_predicate.rs b/tests/ui/const-generics/generic_const_exprs/cross_crate_predicate.rs index b08fffd6922..304c176e85a 100644 --- a/tests/ui/const-generics/generic_const_exprs/cross_crate_predicate.rs +++ b/tests/ui/const-generics/generic_const_exprs/cross_crate_predicate.rs @@ -1,4 +1,4 @@ -// aux-build:const_evaluatable_lib.rs +//@ aux-build:const_evaluatable_lib.rs #![feature(generic_const_exprs)] #![allow(incomplete_features)] extern crate const_evaluatable_lib; diff --git a/tests/ui/const-generics/generic_const_exprs/dependence_lint.rs b/tests/ui/const-generics/generic_const_exprs/dependence_lint.rs index b715e07f8fa..107466cd1d9 100644 --- a/tests/ui/const-generics/generic_const_exprs/dependence_lint.rs +++ b/tests/ui/const-generics/generic_const_exprs/dependence_lint.rs @@ -1,5 +1,5 @@ -// revisions: full gce -// compile-flags: -Zdeduplicate-diagnostics=yes +//@ revisions: full gce +//@ compile-flags: -Zdeduplicate-diagnostics=yes #![cfg_attr(gce, feature(generic_const_exprs))] #![allow(incomplete_features)] diff --git a/tests/ui/const-generics/generic_const_exprs/division.rs b/tests/ui/const-generics/generic_const_exprs/division.rs index 098fa9e0447..b6b5750a48f 100644 --- a/tests/ui/const-generics/generic_const_exprs/division.rs +++ b/tests/ui/const-generics/generic_const_exprs/division.rs @@ -1,4 +1,4 @@ -// run-pass +//@ run-pass #![feature(generic_const_exprs)] #![allow(incomplete_features)] diff --git a/tests/ui/const-generics/generic_const_exprs/dont-eagerly-error-in-is-const-evaluatable.rs b/tests/ui/const-generics/generic_const_exprs/dont-eagerly-error-in-is-const-evaluatable.rs index 3543960c3eb..5290d24fc2d 100644 --- a/tests/ui/const-generics/generic_const_exprs/dont-eagerly-error-in-is-const-evaluatable.rs +++ b/tests/ui/const-generics/generic_const_exprs/dont-eagerly-error-in-is-const-evaluatable.rs @@ -1,4 +1,4 @@ -// run-pass +//@ run-pass #![feature(generic_const_exprs)] #![allow(incomplete_features)] diff --git a/tests/ui/const-generics/generic_const_exprs/drop_impl.rs b/tests/ui/const-generics/generic_const_exprs/drop_impl.rs index 077f77aa0f4..6ff158797ad 100644 --- a/tests/ui/const-generics/generic_const_exprs/drop_impl.rs +++ b/tests/ui/const-generics/generic_const_exprs/drop_impl.rs @@ -1,4 +1,4 @@ -//check-pass +//@check-pass #![feature(generic_const_exprs)] #![allow(incomplete_features)] diff --git a/tests/ui/const-generics/generic_const_exprs/elaborate-trait-pred.rs b/tests/ui/const-generics/generic_const_exprs/elaborate-trait-pred.rs index e4111157ecd..4fe7f059532 100644 --- a/tests/ui/const-generics/generic_const_exprs/elaborate-trait-pred.rs +++ b/tests/ui/const-generics/generic_const_exprs/elaborate-trait-pred.rs @@ -1,4 +1,4 @@ -// run-pass +//@ run-pass // Test that we use the elaborated predicates from traits // to satisfy const evaluatable predicates. #![feature(generic_const_exprs)] diff --git a/tests/ui/const-generics/generic_const_exprs/eval-try-unify.rs b/tests/ui/const-generics/generic_const_exprs/eval-try-unify.rs index c59d62e576d..b61d2dc1945 100644 --- a/tests/ui/const-generics/generic_const_exprs/eval-try-unify.rs +++ b/tests/ui/const-generics/generic_const_exprs/eval-try-unify.rs @@ -1,4 +1,4 @@ -// build-pass +//@ build-pass #![feature(generic_const_exprs)] //~^ WARNING the feature `generic_const_exprs` is incomplete diff --git a/tests/ui/const-generics/generic_const_exprs/evaluated-to-ambig.rs b/tests/ui/const-generics/generic_const_exprs/evaluated-to-ambig.rs index 340e35e1c65..c4523e8a794 100644 --- a/tests/ui/const-generics/generic_const_exprs/evaluated-to-ambig.rs +++ b/tests/ui/const-generics/generic_const_exprs/evaluated-to-ambig.rs @@ -1,4 +1,4 @@ -// check-pass +//@ check-pass // We previously always returned ambiguity when equating generic consts, even if they // only contain generic parameters. This is incorrect as trying to unify `N > 1` with `M > 1` diff --git a/tests/ui/const-generics/generic_const_exprs/fn_call.rs b/tests/ui/const-generics/generic_const_exprs/fn_call.rs index cbe4277df56..1a753f1566b 100644 --- a/tests/ui/const-generics/generic_const_exprs/fn_call.rs +++ b/tests/ui/const-generics/generic_const_exprs/fn_call.rs @@ -1,4 +1,4 @@ -// run-pass +//@ run-pass #![feature(generic_const_exprs)] #![allow(incomplete_features)] diff --git a/tests/ui/const-generics/generic_const_exprs/from-sig.rs b/tests/ui/const-generics/generic_const_exprs/from-sig.rs index 28de4f86467..74942041f68 100644 --- a/tests/ui/const-generics/generic_const_exprs/from-sig.rs +++ b/tests/ui/const-generics/generic_const_exprs/from-sig.rs @@ -1,4 +1,4 @@ -// run-pass +//@ run-pass #![feature(generic_const_exprs)] #![allow(incomplete_features)] diff --git a/tests/ui/const-generics/generic_const_exprs/function-call.rs b/tests/ui/const-generics/generic_const_exprs/function-call.rs index 3c866333d60..d754fcdaddc 100644 --- a/tests/ui/const-generics/generic_const_exprs/function-call.rs +++ b/tests/ui/const-generics/generic_const_exprs/function-call.rs @@ -1,5 +1,5 @@ -// check-pass -// compile-flags: -Zdeduplicate-diagnostics=yes +//@ check-pass +//@ compile-flags: -Zdeduplicate-diagnostics=yes const fn foo() -> usize { // We might instead branch on `std::mem::size_of::<*mut T>() < 8` here, diff --git a/tests/ui/const-generics/generic_const_exprs/impl-bounds.rs b/tests/ui/const-generics/generic_const_exprs/impl-bounds.rs index 7120d6ee251..d0c24579c3a 100644 --- a/tests/ui/const-generics/generic_const_exprs/impl-bounds.rs +++ b/tests/ui/const-generics/generic_const_exprs/impl-bounds.rs @@ -1,4 +1,4 @@ -// check-pass +//@ check-pass #![feature(generic_const_exprs)] #![allow(incomplete_features)] diff --git a/tests/ui/const-generics/generic_const_exprs/infer-too-generic.rs b/tests/ui/const-generics/generic_const_exprs/infer-too-generic.rs index b8058c252e7..4ebb07e32f1 100644 --- a/tests/ui/const-generics/generic_const_exprs/infer-too-generic.rs +++ b/tests/ui/const-generics/generic_const_exprs/infer-too-generic.rs @@ -1,4 +1,4 @@ -// run-pass +//@ run-pass #![feature(generic_const_exprs)] #![allow(incomplete_features)] diff --git a/tests/ui/const-generics/generic_const_exprs/inline-const-in-const-generic-defaults.rs b/tests/ui/const-generics/generic_const_exprs/inline-const-in-const-generic-defaults.rs index d81cba62754..3bc02f4c6bb 100644 --- a/tests/ui/const-generics/generic_const_exprs/inline-const-in-const-generic-defaults.rs +++ b/tests/ui/const-generics/generic_const_exprs/inline-const-in-const-generic-defaults.rs @@ -1,4 +1,4 @@ -// check-pass +//@ check-pass #![feature(generic_const_exprs)] #![feature(inline_const)] diff --git a/tests/ui/const-generics/generic_const_exprs/issue-100217.rs b/tests/ui/const-generics/generic_const_exprs/issue-100217.rs index acdc348a385..82a79b8d930 100644 --- a/tests/ui/const-generics/generic_const_exprs/issue-100217.rs +++ b/tests/ui/const-generics/generic_const_exprs/issue-100217.rs @@ -1,4 +1,4 @@ -// build-pass +//@ build-pass #![allow(incomplete_features)] #![feature(generic_const_exprs)] diff --git a/tests/ui/const-generics/generic_const_exprs/issue-100360.rs b/tests/ui/const-generics/generic_const_exprs/issue-100360.rs index 5572f1f88df..b7e677a4a1e 100644 --- a/tests/ui/const-generics/generic_const_exprs/issue-100360.rs +++ b/tests/ui/const-generics/generic_const_exprs/issue-100360.rs @@ -1,4 +1,4 @@ -// check-pass +//@ check-pass // (this requires debug assertions) #![feature(adt_const_params)] diff --git a/tests/ui/const-generics/generic_const_exprs/issue-102074.rs b/tests/ui/const-generics/generic_const_exprs/issue-102074.rs index 66d15cf1215..a8d2b7d6e49 100644 --- a/tests/ui/const-generics/generic_const_exprs/issue-102074.rs +++ b/tests/ui/const-generics/generic_const_exprs/issue-102074.rs @@ -1,4 +1,4 @@ -// check-pass +//@ check-pass // Checks that the NoopMethodCall lint doesn't call Instance::resolve on unresolved consts #![feature(generic_const_exprs)] diff --git a/tests/ui/const-generics/generic_const_exprs/issue-62504.rs b/tests/ui/const-generics/generic_const_exprs/issue-62504.rs index 6f40a9abfa7..b6a6a277843 100644 --- a/tests/ui/const-generics/generic_const_exprs/issue-62504.rs +++ b/tests/ui/const-generics/generic_const_exprs/issue-62504.rs @@ -1,4 +1,4 @@ -// revisions: full min +//@ revisions: full min #![allow(incomplete_features)] #![cfg_attr(full, feature(generic_const_exprs))] #![cfg_attr(full, allow(incomplete_features))] diff --git a/tests/ui/const-generics/generic_const_exprs/issue-72787.rs b/tests/ui/const-generics/generic_const_exprs/issue-72787.rs index 657fec2e9cb..c3208786708 100644 --- a/tests/ui/const-generics/generic_const_exprs/issue-72787.rs +++ b/tests/ui/const-generics/generic_const_exprs/issue-72787.rs @@ -1,5 +1,5 @@ -// [full] check-pass -// revisions: full min +//@ [full] check-pass +//@ revisions: full min #![cfg_attr(full, feature(generic_const_exprs))] #![cfg_attr(full, allow(incomplete_features))] diff --git a/tests/ui/const-generics/generic_const_exprs/issue-72819-generic-in-const-eval.rs b/tests/ui/const-generics/generic_const_exprs/issue-72819-generic-in-const-eval.rs index 7a5aa9e47d4..c3c598ce778 100644 --- a/tests/ui/const-generics/generic_const_exprs/issue-72819-generic-in-const-eval.rs +++ b/tests/ui/const-generics/generic_const_exprs/issue-72819-generic-in-const-eval.rs @@ -1,6 +1,6 @@ // Regression test for #72819: ICE due to failure in resolving the const generic in `Arr`'s type // bounds. -// revisions: full min +//@ revisions: full min #![cfg_attr(full, feature(generic_const_exprs))] #![cfg_attr(full, allow(incomplete_features))] diff --git a/tests/ui/const-generics/generic_const_exprs/issue-73298.rs b/tests/ui/const-generics/generic_const_exprs/issue-73298.rs index 3c59e1b790a..3e4dd2fd279 100644 --- a/tests/ui/const-generics/generic_const_exprs/issue-73298.rs +++ b/tests/ui/const-generics/generic_const_exprs/issue-73298.rs @@ -1,4 +1,4 @@ -// build-pass +//@ build-pass #![allow(incomplete_features)] #![feature(generic_const_exprs)] diff --git a/tests/ui/const-generics/generic_const_exprs/issue-73899.rs b/tests/ui/const-generics/generic_const_exprs/issue-73899.rs index d1ab1be0473..61550c03ec6 100644 --- a/tests/ui/const-generics/generic_const_exprs/issue-73899.rs +++ b/tests/ui/const-generics/generic_const_exprs/issue-73899.rs @@ -1,4 +1,4 @@ -// run-pass +//@ run-pass #![feature(generic_const_exprs)] #![allow(incomplete_features)] diff --git a/tests/ui/const-generics/generic_const_exprs/issue-74634.rs b/tests/ui/const-generics/generic_const_exprs/issue-74634.rs index cd1f7a9da68..859b4c8b1af 100644 --- a/tests/ui/const-generics/generic_const_exprs/issue-74634.rs +++ b/tests/ui/const-generics/generic_const_exprs/issue-74634.rs @@ -1,4 +1,4 @@ -// check-pass +//@ check-pass #![feature(generic_const_exprs)] #![allow(incomplete_features)] diff --git a/tests/ui/const-generics/generic_const_exprs/issue-80561-incorrect-param-env.rs b/tests/ui/const-generics/generic_const_exprs/issue-80561-incorrect-param-env.rs index 77d3c98dab9..fba82c03f11 100644 --- a/tests/ui/const-generics/generic_const_exprs/issue-80561-incorrect-param-env.rs +++ b/tests/ui/const-generics/generic_const_exprs/issue-80561-incorrect-param-env.rs @@ -1,4 +1,4 @@ -// check-pass +//@ check-pass #![feature(generic_const_exprs)] #![allow(incomplete_features)] diff --git a/tests/ui/const-generics/generic_const_exprs/issue-80742.rs b/tests/ui/const-generics/generic_const_exprs/issue-80742.rs index 5f612780f39..ddb7b5f852e 100644 --- a/tests/ui/const-generics/generic_const_exprs/issue-80742.rs +++ b/tests/ui/const-generics/generic_const_exprs/issue-80742.rs @@ -1,10 +1,10 @@ -// check-fail -// known-bug: #97477 -// failure-status: 101 -// normalize-stderr-test "note: .*\n\n" -> "" -// normalize-stderr-test "thread 'rustc' panicked.*\n" -> "" -// normalize-stderr-test "(error: internal compiler error: [^:]+):\d+:\d+: " -> "$1:LL:CC: " -// rustc-env:RUST_BACKTRACE=0 +//@ check-fail +//@ known-bug: #97477 +//@ failure-status: 101 +//@ normalize-stderr-test "note: .*\n\n" -> "" +//@ normalize-stderr-test "thread 'rustc' panicked.*\n" -> "" +//@ normalize-stderr-test "(error: internal compiler error: [^:]+):\d+:\d+: " -> "$1:LL:CC: " +//@ rustc-env:RUST_BACKTRACE=0 // This test used to cause an ICE in rustc_mir::interpret::step::eval_rvalue_into_place diff --git a/tests/ui/const-generics/generic_const_exprs/issue-82268.rs b/tests/ui/const-generics/generic_const_exprs/issue-82268.rs index d08fc5beb75..8bd7790da2f 100644 --- a/tests/ui/const-generics/generic_const_exprs/issue-82268.rs +++ b/tests/ui/const-generics/generic_const_exprs/issue-82268.rs @@ -1,4 +1,4 @@ -// build-pass +//@ build-pass #![allow(incomplete_features)] #![feature(generic_const_exprs)] diff --git a/tests/ui/const-generics/generic_const_exprs/issue-83972.rs b/tests/ui/const-generics/generic_const_exprs/issue-83972.rs index 0063719b852..cc1e35cbd18 100644 --- a/tests/ui/const-generics/generic_const_exprs/issue-83972.rs +++ b/tests/ui/const-generics/generic_const_exprs/issue-83972.rs @@ -1,4 +1,4 @@ -// build-pass +//@ build-pass #![allow(incomplete_features)] #![feature(generic_const_exprs)] diff --git a/tests/ui/const-generics/generic_const_exprs/issue-84408.rs b/tests/ui/const-generics/generic_const_exprs/issue-84408.rs index fb2e5590d21..0b2a3a5b4ef 100644 --- a/tests/ui/const-generics/generic_const_exprs/issue-84408.rs +++ b/tests/ui/const-generics/generic_const_exprs/issue-84408.rs @@ -1,5 +1,5 @@ // Regression test for #84408. -// check-pass +//@ check-pass #![feature(generic_const_exprs)] #![allow(incomplete_features)] diff --git a/tests/ui/const-generics/generic_const_exprs/issue-84669.rs b/tests/ui/const-generics/generic_const_exprs/issue-84669.rs index 3933ff20a49..4c56db72898 100644 --- a/tests/ui/const-generics/generic_const_exprs/issue-84669.rs +++ b/tests/ui/const-generics/generic_const_exprs/issue-84669.rs @@ -1,4 +1,4 @@ -// build-pass +//@ build-pass #![feature(generic_const_exprs)] #![allow(incomplete_features)] diff --git a/tests/ui/const-generics/generic_const_exprs/issue-86710.rs b/tests/ui/const-generics/generic_const_exprs/issue-86710.rs index 281b12458e3..9e6c3a4a40c 100644 --- a/tests/ui/const-generics/generic_const_exprs/issue-86710.rs +++ b/tests/ui/const-generics/generic_const_exprs/issue-86710.rs @@ -1,4 +1,4 @@ -// build-pass +//@ build-pass #![allow(incomplete_features)] #![feature(generic_const_exprs)] diff --git a/tests/ui/const-generics/generic_const_exprs/issue-89851.rs b/tests/ui/const-generics/generic_const_exprs/issue-89851.rs index cde849d9017..78189c5225c 100644 --- a/tests/ui/const-generics/generic_const_exprs/issue-89851.rs +++ b/tests/ui/const-generics/generic_const_exprs/issue-89851.rs @@ -1,4 +1,4 @@ -// check-pass +//@ check-pass // (this requires debug assertions) #![feature(adt_const_params)] diff --git a/tests/ui/const-generics/generic_const_exprs/issue-90847.rs b/tests/ui/const-generics/generic_const_exprs/issue-90847.rs index ebc6fe14123..a5d7acb2c8f 100644 --- a/tests/ui/const-generics/generic_const_exprs/issue-90847.rs +++ b/tests/ui/const-generics/generic_const_exprs/issue-90847.rs @@ -1,4 +1,4 @@ -// check-pass +//@ check-pass #![allow(incomplete_features)] #![feature(generic_const_exprs)] diff --git a/tests/ui/const-generics/generic_const_exprs/issue-94287.rs b/tests/ui/const-generics/generic_const_exprs/issue-94287.rs index 643126a4640..4b2fa1dac9b 100644 --- a/tests/ui/const-generics/generic_const_exprs/issue-94287.rs +++ b/tests/ui/const-generics/generic_const_exprs/issue-94287.rs @@ -1,5 +1,5 @@ -// aux-build:issue-94287-aux.rs -// build-fail +//@ aux-build:issue-94287-aux.rs +//@ build-fail extern crate issue_94287_aux; diff --git a/tests/ui/const-generics/generic_const_exprs/issue-94293.rs b/tests/ui/const-generics/generic_const_exprs/issue-94293.rs index 713c5d89a93..cf986f1d09d 100644 --- a/tests/ui/const-generics/generic_const_exprs/issue-94293.rs +++ b/tests/ui/const-generics/generic_const_exprs/issue-94293.rs @@ -1,4 +1,4 @@ -// check-pass +//@ check-pass #![feature(generic_const_exprs)] #![allow(incomplete_features)] diff --git a/tests/ui/const-generics/generic_const_exprs/issue-96699.rs b/tests/ui/const-generics/generic_const_exprs/issue-96699.rs index 83f329d2a2d..6afc2b7fb03 100644 --- a/tests/ui/const-generics/generic_const_exprs/issue-96699.rs +++ b/tests/ui/const-generics/generic_const_exprs/issue-96699.rs @@ -1,4 +1,4 @@ -// check-pass +//@ check-pass #![allow(dead_code, incomplete_features)] #![feature(generic_const_exprs)] diff --git a/tests/ui/const-generics/generic_const_exprs/issue-97047-ice-1.rs b/tests/ui/const-generics/generic_const_exprs/issue-97047-ice-1.rs index 67e30232e2f..5a6565fe2f1 100644 --- a/tests/ui/const-generics/generic_const_exprs/issue-97047-ice-1.rs +++ b/tests/ui/const-generics/generic_const_exprs/issue-97047-ice-1.rs @@ -1,4 +1,4 @@ -// check-pass +//@ check-pass #![feature(adt_const_params, generic_const_exprs)] //~^ WARN the feature `adt_const_params` is incomplete and may not be safe to use and/or cause compiler crashes [incomplete_features] diff --git a/tests/ui/const-generics/generic_const_exprs/issue-97047-ice-2.rs b/tests/ui/const-generics/generic_const_exprs/issue-97047-ice-2.rs index 00568a08944..1338f40208c 100644 --- a/tests/ui/const-generics/generic_const_exprs/issue-97047-ice-2.rs +++ b/tests/ui/const-generics/generic_const_exprs/issue-97047-ice-2.rs @@ -1,4 +1,4 @@ -// check-pass +//@ check-pass #![feature(adt_const_params, generic_const_exprs)] //~^ WARN the feature `adt_const_params` is incomplete and may not be safe to use and/or cause compiler crashes [incomplete_features] diff --git a/tests/ui/const-generics/generic_const_exprs/issue-99647.rs b/tests/ui/const-generics/generic_const_exprs/issue-99647.rs index f797beda8e6..a6b5eb15d6c 100644 --- a/tests/ui/const-generics/generic_const_exprs/issue-99647.rs +++ b/tests/ui/const-generics/generic_const_exprs/issue-99647.rs @@ -1,5 +1,5 @@ -// edition:2018 -// run-pass +//@ edition:2018 +//@ run-pass #![allow(incomplete_features)] #![feature(generic_const_exprs)] diff --git a/tests/ui/const-generics/generic_const_exprs/issue-99705.rs b/tests/ui/const-generics/generic_const_exprs/issue-99705.rs index 75b57b621bb..82f7cc1045c 100644 --- a/tests/ui/const-generics/generic_const_exprs/issue-99705.rs +++ b/tests/ui/const-generics/generic_const_exprs/issue-99705.rs @@ -1,4 +1,4 @@ -// check-pass +//@ check-pass #![crate_type = "lib"] #![feature(generic_const_exprs)] #![allow(incomplete_features)] diff --git a/tests/ui/const-generics/generic_const_exprs/less_than.rs b/tests/ui/const-generics/generic_const_exprs/less_than.rs index 2e9af1bf4f0..07dfe7d9687 100644 --- a/tests/ui/const-generics/generic_const_exprs/less_than.rs +++ b/tests/ui/const-generics/generic_const_exprs/less_than.rs @@ -1,4 +1,4 @@ -// run-pass +//@ run-pass #![feature(generic_const_exprs)] #![allow(incomplete_features)] diff --git a/tests/ui/const-generics/generic_const_exprs/nested-abstract-consts-1.rs b/tests/ui/const-generics/generic_const_exprs/nested-abstract-consts-1.rs index 7e5022817e4..18a06179dde 100644 --- a/tests/ui/const-generics/generic_const_exprs/nested-abstract-consts-1.rs +++ b/tests/ui/const-generics/generic_const_exprs/nested-abstract-consts-1.rs @@ -1,4 +1,4 @@ -// run-pass +//@ run-pass #![feature(generic_const_exprs)] #![allow(incomplete_features)] diff --git a/tests/ui/const-generics/generic_const_exprs/nested-abstract-consts-2.rs b/tests/ui/const-generics/generic_const_exprs/nested-abstract-consts-2.rs index 769e3ae6895..d2269bf39fe 100644 --- a/tests/ui/const-generics/generic_const_exprs/nested-abstract-consts-2.rs +++ b/tests/ui/const-generics/generic_const_exprs/nested-abstract-consts-2.rs @@ -1,4 +1,4 @@ -// run-pass +//@ run-pass #![feature(generic_const_exprs)] #![allow(incomplete_features)] diff --git a/tests/ui/const-generics/generic_const_exprs/nested_uneval_unification-1.rs b/tests/ui/const-generics/generic_const_exprs/nested_uneval_unification-1.rs index 316887e5e7f..52d1f27459c 100644 --- a/tests/ui/const-generics/generic_const_exprs/nested_uneval_unification-1.rs +++ b/tests/ui/const-generics/generic_const_exprs/nested_uneval_unification-1.rs @@ -1,4 +1,4 @@ -// run-pass +//@ run-pass #![feature(generic_const_exprs)] #![allow(incomplete_features)] diff --git a/tests/ui/const-generics/generic_const_exprs/nested_uneval_unification-2.rs b/tests/ui/const-generics/generic_const_exprs/nested_uneval_unification-2.rs index 18a99398622..65a634980c0 100644 --- a/tests/ui/const-generics/generic_const_exprs/nested_uneval_unification-2.rs +++ b/tests/ui/const-generics/generic_const_exprs/nested_uneval_unification-2.rs @@ -1,4 +1,4 @@ -// run-pass +//@ run-pass #![feature(generic_const_exprs)] #![allow(incomplete_features, unused_parens, unused_braces)] diff --git a/tests/ui/const-generics/generic_const_exprs/no_dependence.rs b/tests/ui/const-generics/generic_const_exprs/no_dependence.rs index db8dc6ed443..ea27e5ef3a8 100644 --- a/tests/ui/const-generics/generic_const_exprs/no_dependence.rs +++ b/tests/ui/const-generics/generic_const_exprs/no_dependence.rs @@ -1,4 +1,4 @@ -// check-pass +//@ check-pass #![feature(generic_const_exprs)] #![allow(incomplete_features)] diff --git a/tests/ui/const-generics/generic_const_exprs/non_local_anon_const_diagnostics.rs b/tests/ui/const-generics/generic_const_exprs/non_local_anon_const_diagnostics.rs index 1254b4435f7..12c1df0e337 100644 --- a/tests/ui/const-generics/generic_const_exprs/non_local_anon_const_diagnostics.rs +++ b/tests/ui/const-generics/generic_const_exprs/non_local_anon_const_diagnostics.rs @@ -1,4 +1,4 @@ -// aux-build:anon_const_non_local.rs +//@ aux-build:anon_const_non_local.rs #![feature(generic_const_exprs)] #![allow(incomplete_features)] diff --git a/tests/ui/const-generics/generic_const_exprs/normed_to_param_is_evaluatable.rs b/tests/ui/const-generics/generic_const_exprs/normed_to_param_is_evaluatable.rs index b37b354ae21..e7791ebae86 100644 --- a/tests/ui/const-generics/generic_const_exprs/normed_to_param_is_evaluatable.rs +++ b/tests/ui/const-generics/generic_const_exprs/normed_to_param_is_evaluatable.rs @@ -1,4 +1,4 @@ -// check-pass +//@ check-pass #![feature(generic_const_exprs)] #![allow(incomplete_features, unused_braces)] diff --git a/tests/ui/const-generics/generic_const_exprs/object-safety-ok.rs b/tests/ui/const-generics/generic_const_exprs/object-safety-ok.rs index f4c89f6235a..6220d681fe1 100644 --- a/tests/ui/const-generics/generic_const_exprs/object-safety-ok.rs +++ b/tests/ui/const-generics/generic_const_exprs/object-safety-ok.rs @@ -1,4 +1,4 @@ -// run-pass +//@ run-pass #![feature(generic_const_exprs)] #![allow(incomplete_features)] diff --git a/tests/ui/const-generics/generic_const_exprs/single-satisfied-ConstEvaluatable-in-probe.rs b/tests/ui/const-generics/generic_const_exprs/single-satisfied-ConstEvaluatable-in-probe.rs index 0ba0c5a72ef..4485ea14712 100644 --- a/tests/ui/const-generics/generic_const_exprs/single-satisfied-ConstEvaluatable-in-probe.rs +++ b/tests/ui/const-generics/generic_const_exprs/single-satisfied-ConstEvaluatable-in-probe.rs @@ -1,4 +1,4 @@ -// check-pass +//@ check-pass #![allow(incomplete_features)] #![feature(generic_const_exprs)] diff --git a/tests/ui/const-generics/generic_const_exprs/subexprs_are_const_evalutable.rs b/tests/ui/const-generics/generic_const_exprs/subexprs_are_const_evalutable.rs index d6574a3aa2f..dc883eb2c9b 100644 --- a/tests/ui/const-generics/generic_const_exprs/subexprs_are_const_evalutable.rs +++ b/tests/ui/const-generics/generic_const_exprs/subexprs_are_const_evalutable.rs @@ -1,4 +1,4 @@ -// run-pass +//@ run-pass #![feature(generic_const_exprs)] #![allow(incomplete_features)] diff --git a/tests/ui/const-generics/generic_const_exprs/ty-alias-substitution.rs b/tests/ui/const-generics/generic_const_exprs/ty-alias-substitution.rs index d058b363850..dff489d466d 100644 --- a/tests/ui/const-generics/generic_const_exprs/ty-alias-substitution.rs +++ b/tests/ui/const-generics/generic_const_exprs/ty-alias-substitution.rs @@ -1,4 +1,4 @@ -// check-pass +//@ check-pass // Test that we correctly substitute generic arguments for type aliases. #![feature(generic_const_exprs)] #![allow(incomplete_features)] diff --git a/tests/ui/const-generics/generic_const_exprs/typeid-equality-by-subtyping.rs b/tests/ui/const-generics/generic_const_exprs/typeid-equality-by-subtyping.rs index b22cab7c7ff..81be8d5c7d7 100644 --- a/tests/ui/const-generics/generic_const_exprs/typeid-equality-by-subtyping.rs +++ b/tests/ui/const-generics/generic_const_exprs/typeid-equality-by-subtyping.rs @@ -1,5 +1,5 @@ -// known-bug: #110395 -// known-bug: #97156 +//@ known-bug: #110395 +//@ known-bug: #97156 #![feature(const_type_id, const_trait_impl, generic_const_exprs)] #![allow(incomplete_features)] diff --git a/tests/ui/const-generics/generic_const_exprs/unify-op-with-fn-call.rs b/tests/ui/const-generics/generic_const_exprs/unify-op-with-fn-call.rs index ae9207cf855..2f903ea419e 100644 --- a/tests/ui/const-generics/generic_const_exprs/unify-op-with-fn-call.rs +++ b/tests/ui/const-generics/generic_const_exprs/unify-op-with-fn-call.rs @@ -1,4 +1,4 @@ -// known-bug: #110395 +//@ known-bug: #110395 #![feature(generic_const_exprs, adt_const_params, const_trait_impl)] #![allow(incomplete_features)] diff --git a/tests/ui/const-generics/generic_const_exprs/unop.rs b/tests/ui/const-generics/generic_const_exprs/unop.rs index c12fef083cc..c8eb3deba60 100644 --- a/tests/ui/const-generics/generic_const_exprs/unop.rs +++ b/tests/ui/const-generics/generic_const_exprs/unop.rs @@ -1,4 +1,4 @@ -// run-pass +//@ run-pass #![feature(generic_const_exprs)] #![allow(incomplete_features)] diff --git a/tests/ui/const-generics/generic_const_exprs/unused-complex-default-expr.rs b/tests/ui/const-generics/generic_const_exprs/unused-complex-default-expr.rs index 9580f8a7fbc..aff9826079d 100644 --- a/tests/ui/const-generics/generic_const_exprs/unused-complex-default-expr.rs +++ b/tests/ui/const-generics/generic_const_exprs/unused-complex-default-expr.rs @@ -1,4 +1,4 @@ -// check-pass +//@ check-pass #![feature(generic_const_exprs)] #![allow(incomplete_features)] struct Foo; diff --git a/tests/ui/const-generics/ice-68875.rs b/tests/ui/const-generics/ice-68875.rs index 2ef7cfdbe27..cc9546be2c9 100644 --- a/tests/ui/const-generics/ice-68875.rs +++ b/tests/ui/const-generics/ice-68875.rs @@ -1,4 +1,4 @@ -// check-fail +//@ check-fail struct DataWrapper<'a> { data: &'a [u8; Self::SIZE], //~ ERROR generic `Self` types are currently not permitted in anonymous constants diff --git a/tests/ui/const-generics/impl-const-generic-struct.rs b/tests/ui/const-generics/impl-const-generic-struct.rs index 7eb2c6a51fc..4f82cc758d9 100644 --- a/tests/ui/const-generics/impl-const-generic-struct.rs +++ b/tests/ui/const-generics/impl-const-generic-struct.rs @@ -1,4 +1,4 @@ -// run-pass +//@ run-pass struct S; impl S { diff --git a/tests/ui/const-generics/infer_arg_from_pat.rs b/tests/ui/const-generics/infer_arg_from_pat.rs index 10317a1b98f..1740bcca4ce 100644 --- a/tests/ui/const-generics/infer_arg_from_pat.rs +++ b/tests/ui/const-generics/infer_arg_from_pat.rs @@ -1,4 +1,4 @@ -// run-pass +//@ run-pass // // see issue #70529 diff --git a/tests/ui/const-generics/infer_arr_len_from_pat.rs b/tests/ui/const-generics/infer_arr_len_from_pat.rs index 40f6f5b8d55..0ad01d6144d 100644 --- a/tests/ui/const-generics/infer_arr_len_from_pat.rs +++ b/tests/ui/const-generics/infer_arr_len_from_pat.rs @@ -1,4 +1,4 @@ -// check-pass +//@ check-pass // // see issue #70529 diff --git a/tests/ui/const-generics/inhabited-assoc-ty-ice-1.rs b/tests/ui/const-generics/inhabited-assoc-ty-ice-1.rs index b4f44dac62d..a5f515f5ea2 100644 --- a/tests/ui/const-generics/inhabited-assoc-ty-ice-1.rs +++ b/tests/ui/const-generics/inhabited-assoc-ty-ice-1.rs @@ -1,4 +1,4 @@ -// run-pass +//@ run-pass #![feature(generic_const_exprs)] #![allow(incomplete_features)] diff --git a/tests/ui/const-generics/inhabited-assoc-ty-ice-2.rs b/tests/ui/const-generics/inhabited-assoc-ty-ice-2.rs index d6d0a80ab11..3613deb9cd7 100644 --- a/tests/ui/const-generics/inhabited-assoc-ty-ice-2.rs +++ b/tests/ui/const-generics/inhabited-assoc-ty-ice-2.rs @@ -1,4 +1,4 @@ -// run-pass +//@ run-pass #![feature(generic_const_exprs)] #![allow(incomplete_features)] diff --git a/tests/ui/const-generics/integer-literal-generic-arg-in-where-clause.rs b/tests/ui/const-generics/integer-literal-generic-arg-in-where-clause.rs index 2b8731ba709..0bcffcafb4f 100644 --- a/tests/ui/const-generics/integer-literal-generic-arg-in-where-clause.rs +++ b/tests/ui/const-generics/integer-literal-generic-arg-in-where-clause.rs @@ -1,4 +1,4 @@ -// check-pass +//@ check-pass fn takes_closure_of_array_3(f: F) where F: Fn([i32; 3]) { f([1, 2, 3]); diff --git a/tests/ui/const-generics/intrinsics-type_name-as-const-argument.rs b/tests/ui/const-generics/intrinsics-type_name-as-const-argument.rs index 147a00cb26b..02e6d27a27e 100644 --- a/tests/ui/const-generics/intrinsics-type_name-as-const-argument.rs +++ b/tests/ui/const-generics/intrinsics-type_name-as-const-argument.rs @@ -1,5 +1,5 @@ -// [full] check-pass -// revisions: full min +//@ [full] check-pass +//@ revisions: full min #![cfg_attr(full, allow(incomplete_features))] #![cfg_attr(full, feature(adt_const_params, generic_const_exprs))] diff --git a/tests/ui/const-generics/issue-102124.rs b/tests/ui/const-generics/issue-102124.rs index a28f198e9e0..7e59141eae3 100644 --- a/tests/ui/const-generics/issue-102124.rs +++ b/tests/ui/const-generics/issue-102124.rs @@ -1,5 +1,5 @@ -// run-pass -// compile-flags: -Zmir-opt-level=3 +//@ run-pass +//@ compile-flags: -Zmir-opt-level=3 // regression test for #102124 diff --git a/tests/ui/const-generics/issue-105689.rs b/tests/ui/const-generics/issue-105689.rs index 4237b3cad8e..6c9215d78e7 100644 --- a/tests/ui/const-generics/issue-105689.rs +++ b/tests/ui/const-generics/issue-105689.rs @@ -1,5 +1,5 @@ -// check-pass -// edition:2021 +//@ check-pass +//@ edition:2021 #![feature(generic_const_exprs)] #![allow(incomplete_features)] diff --git a/tests/ui/const-generics/issue-106419-struct-with-multiple-const-params.rs b/tests/ui/const-generics/issue-106419-struct-with-multiple-const-params.rs index 8363e5af4b6..cb0cca544a4 100644 --- a/tests/ui/const-generics/issue-106419-struct-with-multiple-const-params.rs +++ b/tests/ui/const-generics/issue-106419-struct-with-multiple-const-params.rs @@ -1,4 +1,4 @@ -// check-pass +//@ check-pass #![feature(generic_const_exprs)] #![allow(incomplete_features)] diff --git a/tests/ui/const-generics/issue-46511.rs b/tests/ui/const-generics/issue-46511.rs index 78baba818ad..a015b7a965e 100644 --- a/tests/ui/const-generics/issue-46511.rs +++ b/tests/ui/const-generics/issue-46511.rs @@ -1,4 +1,4 @@ -// check-fail +//@ check-fail struct Foo<'a> //~ ERROR parameter `'a` is never used [E0392] { diff --git a/tests/ui/const-generics/issue-70408.rs b/tests/ui/const-generics/issue-70408.rs index f7557cb492c..e74bcf945a5 100644 --- a/tests/ui/const-generics/issue-70408.rs +++ b/tests/ui/const-generics/issue-70408.rs @@ -1,4 +1,4 @@ -// build-pass +//@ build-pass #![feature(adt_const_params)] #![allow(incomplete_features)] diff --git a/tests/ui/const-generics/issue-97007.rs b/tests/ui/const-generics/issue-97007.rs index 7036834c4b1..a099c423e6d 100644 --- a/tests/ui/const-generics/issue-97007.rs +++ b/tests/ui/const-generics/issue-97007.rs @@ -1,4 +1,4 @@ -// check-pass +//@ check-pass #![feature(adt_const_params, generic_const_exprs)] #![allow(incomplete_features)] diff --git a/tests/ui/const-generics/issues/issue-105037.rs b/tests/ui/const-generics/issues/issue-105037.rs index f7d23949943..65c8cfe8103 100644 --- a/tests/ui/const-generics/issues/issue-105037.rs +++ b/tests/ui/const-generics/issues/issue-105037.rs @@ -1,4 +1,4 @@ -// run-pass +//@ run-pass #![feature(generic_const_exprs)] #![allow(incomplete_features)] #![allow(dead_code)] diff --git a/tests/ui/const-generics/issues/issue-105821.rs b/tests/ui/const-generics/issues/issue-105821.rs index 6cfabb65efb..a0a98103b2c 100644 --- a/tests/ui/const-generics/issues/issue-105821.rs +++ b/tests/ui/const-generics/issues/issue-105821.rs @@ -1,4 +1,4 @@ -// check-pass +//@ check-pass #![allow(incomplete_features)] #![feature(adt_const_params, generic_const_exprs)] diff --git a/tests/ui/const-generics/issues/issue-56445-1.rs b/tests/ui/const-generics/issues/issue-56445-1.rs index d862bf24aef..35126b3f55a 100644 --- a/tests/ui/const-generics/issues/issue-56445-1.rs +++ b/tests/ui/const-generics/issues/issue-56445-1.rs @@ -1,5 +1,5 @@ // Regression test for https://github.com/rust-lang/rust/issues/56445#issuecomment-518402995. -// revisions: full min +//@ revisions: full min #![cfg_attr(full, feature(adt_const_params))] #![cfg_attr(full, allow(incomplete_features))] #![crate_type = "lib"] diff --git a/tests/ui/const-generics/issues/issue-60818-struct-constructors.rs b/tests/ui/const-generics/issues/issue-60818-struct-constructors.rs index 0066490dfa3..8b3c8eea616 100644 --- a/tests/ui/const-generics/issues/issue-60818-struct-constructors.rs +++ b/tests/ui/const-generics/issues/issue-60818-struct-constructors.rs @@ -1,4 +1,4 @@ -// check-pass +//@ check-pass struct Generic; diff --git a/tests/ui/const-generics/issues/issue-61336-1.rs b/tests/ui/const-generics/issues/issue-61336-1.rs index beb37e63b5e..24acd6a8d72 100644 --- a/tests/ui/const-generics/issues/issue-61336-1.rs +++ b/tests/ui/const-generics/issues/issue-61336-1.rs @@ -1,4 +1,4 @@ -// build-pass +//@ build-pass fn f(x: T) -> [T; N] { [x; N] } diff --git a/tests/ui/const-generics/issues/issue-61422.rs b/tests/ui/const-generics/issues/issue-61422.rs index 0b9cf40d855..88fd8b9405c 100644 --- a/tests/ui/const-generics/issues/issue-61422.rs +++ b/tests/ui/const-generics/issues/issue-61422.rs @@ -1,4 +1,4 @@ -// check-pass +//@ check-pass use std::mem; // Neither of the uninits below are currently accepted as not UB, however, diff --git a/tests/ui/const-generics/issues/issue-61432.rs b/tests/ui/const-generics/issues/issue-61432.rs index 6192af82afb..329bf24922e 100644 --- a/tests/ui/const-generics/issues/issue-61432.rs +++ b/tests/ui/const-generics/issues/issue-61432.rs @@ -1,4 +1,4 @@ -// run-pass +//@ run-pass fn promote() { let _ = &N; diff --git a/tests/ui/const-generics/issues/issue-62187-encountered-polymorphic-const.rs b/tests/ui/const-generics/issues/issue-62187-encountered-polymorphic-const.rs index fa76aeae901..778e4a31d15 100644 --- a/tests/ui/const-generics/issues/issue-62187-encountered-polymorphic-const.rs +++ b/tests/ui/const-generics/issues/issue-62187-encountered-polymorphic-const.rs @@ -1,4 +1,4 @@ -// run-pass +//@ run-pass pub trait BitLen: Sized { const BIT_LEN: usize; } diff --git a/tests/ui/const-generics/issues/issue-62878.rs b/tests/ui/const-generics/issues/issue-62878.rs index d226551ef8a..0b5269df85e 100644 --- a/tests/ui/const-generics/issues/issue-62878.rs +++ b/tests/ui/const-generics/issues/issue-62878.rs @@ -1,4 +1,4 @@ -// revisions: full min +//@ revisions: full min #![cfg_attr(full, feature(adt_const_params, generic_arg_infer))] #![cfg_attr(full, allow(incomplete_features))] diff --git a/tests/ui/const-generics/issues/issue-63322-forbid-dyn.rs b/tests/ui/const-generics/issues/issue-63322-forbid-dyn.rs index 8bc35ab3d37..c5b83e9d529 100644 --- a/tests/ui/const-generics/issues/issue-63322-forbid-dyn.rs +++ b/tests/ui/const-generics/issues/issue-63322-forbid-dyn.rs @@ -1,4 +1,4 @@ -// revisions: full min +//@ revisions: full min #![cfg_attr(full, feature(adt_const_params))] #![cfg_attr(full, allow(incomplete_features))] diff --git a/tests/ui/const-generics/issues/issue-64519.rs b/tests/ui/const-generics/issues/issue-64519.rs index 969289b26e8..1b41a8204af 100644 --- a/tests/ui/const-generics/issues/issue-64519.rs +++ b/tests/ui/const-generics/issues/issue-64519.rs @@ -1,4 +1,4 @@ -// check-pass +//@ check-pass struct Foo { state: Option<[u8; D]>, } diff --git a/tests/ui/const-generics/issues/issue-66596-impl-trait-for-str-const-arg.rs b/tests/ui/const-generics/issues/issue-66596-impl-trait-for-str-const-arg.rs index 091419f0c52..113bf94b5cb 100644 --- a/tests/ui/const-generics/issues/issue-66596-impl-trait-for-str-const-arg.rs +++ b/tests/ui/const-generics/issues/issue-66596-impl-trait-for-str-const-arg.rs @@ -1,4 +1,4 @@ -// check-pass +//@ check-pass #![feature(adt_const_params)] #![allow(incomplete_features)] diff --git a/tests/ui/const-generics/issues/issue-66906.rs b/tests/ui/const-generics/issues/issue-66906.rs index a0b3f912207..8836da84a38 100644 --- a/tests/ui/const-generics/issues/issue-66906.rs +++ b/tests/ui/const-generics/issues/issue-66906.rs @@ -1,4 +1,4 @@ -// check-pass +//@ check-pass pub struct Tuple; diff --git a/tests/ui/const-generics/issues/issue-67185-1.rs b/tests/ui/const-generics/issues/issue-67185-1.rs index 69425b25eae..12127330cac 100644 --- a/tests/ui/const-generics/issues/issue-67185-1.rs +++ b/tests/ui/const-generics/issues/issue-67185-1.rs @@ -1,4 +1,4 @@ -// check-pass +//@ check-pass trait Baz { type Quaks; diff --git a/tests/ui/const-generics/issues/issue-67375.rs b/tests/ui/const-generics/issues/issue-67375.rs index 8b4b276bae0..5c6377bf94b 100644 --- a/tests/ui/const-generics/issues/issue-67375.rs +++ b/tests/ui/const-generics/issues/issue-67375.rs @@ -1,4 +1,4 @@ -// revisions: full min +//@ revisions: full min #![cfg_attr(full, allow(incomplete_features))] #![cfg_attr(full, feature(generic_const_exprs))] diff --git a/tests/ui/const-generics/issues/issue-67739.rs b/tests/ui/const-generics/issues/issue-67739.rs index de0eb7f509a..08bf4461d66 100644 --- a/tests/ui/const-generics/issues/issue-67739.rs +++ b/tests/ui/const-generics/issues/issue-67739.rs @@ -1,4 +1,4 @@ -// revisions: full min +//@ revisions: full min #![cfg_attr(full, feature(generic_const_exprs))] #![cfg_attr(full, allow(incomplete_features))] diff --git a/tests/ui/const-generics/issues/issue-67945-1.rs b/tests/ui/const-generics/issues/issue-67945-1.rs index 99f88bc8e10..35ee36359b6 100644 --- a/tests/ui/const-generics/issues/issue-67945-1.rs +++ b/tests/ui/const-generics/issues/issue-67945-1.rs @@ -1,4 +1,4 @@ -// revisions: full min +//@ revisions: full min #![cfg_attr(full, allow(incomplete_features))] #![cfg_attr(full, feature(generic_const_exprs))] diff --git a/tests/ui/const-generics/issues/issue-67945-2.rs b/tests/ui/const-generics/issues/issue-67945-2.rs index cbb4e14eccf..ce48b3f86a6 100644 --- a/tests/ui/const-generics/issues/issue-67945-2.rs +++ b/tests/ui/const-generics/issues/issue-67945-2.rs @@ -1,4 +1,4 @@ -// revisions: full min +//@ revisions: full min #![cfg_attr(full, allow(incomplete_features))] #![cfg_attr(full, feature(generic_const_exprs))] diff --git a/tests/ui/const-generics/issues/issue-67945-3.rs b/tests/ui/const-generics/issues/issue-67945-3.rs index fd8a393effe..d0a3a26dced 100644 --- a/tests/ui/const-generics/issues/issue-67945-3.rs +++ b/tests/ui/const-generics/issues/issue-67945-3.rs @@ -2,7 +2,7 @@ // https://github.com/rust-lang/rust/issues/67945#issuecomment-572617285 // Make sure we don't emit an E0277 error. -// revisions: full min +//@ revisions: full min #![cfg_attr(full, feature(generic_const_exprs))] #![cfg_attr(full, allow(incomplete_features))] diff --git a/tests/ui/const-generics/issues/issue-67945-4.rs b/tests/ui/const-generics/issues/issue-67945-4.rs index 9a27bf09f88..da9de87d053 100644 --- a/tests/ui/const-generics/issues/issue-67945-4.rs +++ b/tests/ui/const-generics/issues/issue-67945-4.rs @@ -1,7 +1,7 @@ // Regression test for // https://github.com/rust-lang/rust/issues/67945#issuecomment-572617285 -// revisions: full min +//@ revisions: full min #![cfg_attr(full, feature(generic_const_exprs))] #![cfg_attr(full, allow(incomplete_features))] diff --git a/tests/ui/const-generics/issues/issue-68104-print-stack-overflow.rs b/tests/ui/const-generics/issues/issue-68104-print-stack-overflow.rs index ad5710baae2..0c5e72bb878 100644 --- a/tests/ui/const-generics/issues/issue-68104-print-stack-overflow.rs +++ b/tests/ui/const-generics/issues/issue-68104-print-stack-overflow.rs @@ -1,5 +1,5 @@ -// aux-build:impl-const.rs -// run-pass +//@ aux-build:impl-const.rs +//@ run-pass #![feature(generic_const_exprs)] #![allow(incomplete_features)] diff --git a/tests/ui/const-generics/issues/issue-68366.rs b/tests/ui/const-generics/issues/issue-68366.rs index 4c2741ab433..d3e57a021a6 100644 --- a/tests/ui/const-generics/issues/issue-68366.rs +++ b/tests/ui/const-generics/issues/issue-68366.rs @@ -2,7 +2,7 @@ // The note should relate to the fact that it cannot be shown forall N that it maps 1-1 to a new // type. -// revisions: full min +//@ revisions: full min #![cfg_attr(full, feature(generic_const_exprs))] #![cfg_attr(full, allow(incomplete_features))] diff --git a/tests/ui/const-generics/issues/issue-68596.rs b/tests/ui/const-generics/issues/issue-68596.rs index c3c9141e424..9e450adf5ee 100644 --- a/tests/ui/const-generics/issues/issue-68596.rs +++ b/tests/ui/const-generics/issues/issue-68596.rs @@ -1,4 +1,4 @@ -// check-pass +//@ check-pass pub struct S(u8); impl S { diff --git a/tests/ui/const-generics/issues/issue-68615-adt.rs b/tests/ui/const-generics/issues/issue-68615-adt.rs index 3ef1ad45edf..4252bd15325 100644 --- a/tests/ui/const-generics/issues/issue-68615-adt.rs +++ b/tests/ui/const-generics/issues/issue-68615-adt.rs @@ -1,5 +1,5 @@ -// [full] check-pass -// revisions: full min +//@ [full] check-pass +//@ revisions: full min #![cfg_attr(full, feature(adt_const_params))] #![cfg_attr(full, allow(incomplete_features))] diff --git a/tests/ui/const-generics/issues/issue-68615-array.rs b/tests/ui/const-generics/issues/issue-68615-array.rs index 93477be41b5..b2f946288e8 100644 --- a/tests/ui/const-generics/issues/issue-68615-array.rs +++ b/tests/ui/const-generics/issues/issue-68615-array.rs @@ -1,5 +1,5 @@ -// [full] check-pass -// revisions: full min +//@ [full] check-pass +//@ revisions: full min #![cfg_attr(full, feature(adt_const_params))] #![cfg_attr(full, allow(incomplete_features))] diff --git a/tests/ui/const-generics/issues/issue-69654-run-pass.rs b/tests/ui/const-generics/issues/issue-69654-run-pass.rs index 21d6270b1fa..bd8f1fcddb8 100644 --- a/tests/ui/const-generics/issues/issue-69654-run-pass.rs +++ b/tests/ui/const-generics/issues/issue-69654-run-pass.rs @@ -1,4 +1,4 @@ -// run-pass +//@ run-pass trait Bar {} //~ WARN trait `Bar` is never used impl Bar for [u8; 7] {} diff --git a/tests/ui/const-generics/issues/issue-70125-1.rs b/tests/ui/const-generics/issues/issue-70125-1.rs index 0027cd46a51..d15ca957cdc 100644 --- a/tests/ui/const-generics/issues/issue-70125-1.rs +++ b/tests/ui/const-generics/issues/issue-70125-1.rs @@ -1,4 +1,4 @@ -// run-pass +//@ run-pass const L: usize = 4; diff --git a/tests/ui/const-generics/issues/issue-70125-2.rs b/tests/ui/const-generics/issues/issue-70125-2.rs index cfd5e784ec4..ec53c538ea2 100644 --- a/tests/ui/const-generics/issues/issue-70125-2.rs +++ b/tests/ui/const-generics/issues/issue-70125-2.rs @@ -1,4 +1,4 @@ -// run-pass +//@ run-pass fn main() { <()>::foo(); } diff --git a/tests/ui/const-generics/issues/issue-70167.rs b/tests/ui/const-generics/issues/issue-70167.rs index 3961941f81f..4037bd67a28 100644 --- a/tests/ui/const-generics/issues/issue-70167.rs +++ b/tests/ui/const-generics/issues/issue-70167.rs @@ -1,4 +1,4 @@ -// check-pass +//@ check-pass pub trait Trait: From<>::Item> { type Item; } diff --git a/tests/ui/const-generics/issues/issue-70180-1-stalled_on.rs b/tests/ui/const-generics/issues/issue-70180-1-stalled_on.rs index 2ec37cc3a1b..dd5e94df665 100644 --- a/tests/ui/const-generics/issues/issue-70180-1-stalled_on.rs +++ b/tests/ui/const-generics/issues/issue-70180-1-stalled_on.rs @@ -1,4 +1,4 @@ -// build-pass +//@ build-pass pub fn works() { let array/*: [_; _]*/ = default_array(); diff --git a/tests/ui/const-generics/issues/issue-70180-2-stalled_on.rs b/tests/ui/const-generics/issues/issue-70180-2-stalled_on.rs index 95e54842874..f69eee64358 100644 --- a/tests/ui/const-generics/issues/issue-70180-2-stalled_on.rs +++ b/tests/ui/const-generics/issues/issue-70180-2-stalled_on.rs @@ -1,4 +1,4 @@ -// build-pass +//@ build-pass fn works() { let array/*: [u8; _]*/ = default_byte_array(); diff --git a/tests/ui/const-generics/issues/issue-70225.rs b/tests/ui/const-generics/issues/issue-70225.rs index d458d7b2e87..dd00ac11870 100644 --- a/tests/ui/const-generics/issues/issue-70225.rs +++ b/tests/ui/const-generics/issues/issue-70225.rs @@ -1,4 +1,4 @@ -// check-pass +//@ check-pass #![deny(dead_code)] // We previously incorrectly linted `L` as unused here. diff --git a/tests/ui/const-generics/issues/issue-70273-assoc-fn.rs b/tests/ui/const-generics/issues/issue-70273-assoc-fn.rs index f02ab355f9b..6f557ca9deb 100644 --- a/tests/ui/const-generics/issues/issue-70273-assoc-fn.rs +++ b/tests/ui/const-generics/issues/issue-70273-assoc-fn.rs @@ -1,4 +1,4 @@ -// check-pass +//@ check-pass trait T { fn f(); diff --git a/tests/ui/const-generics/issues/issue-71169.rs b/tests/ui/const-generics/issues/issue-71169.rs index e4ec6b07376..fdac0974d34 100644 --- a/tests/ui/const-generics/issues/issue-71169.rs +++ b/tests/ui/const-generics/issues/issue-71169.rs @@ -1,4 +1,4 @@ -// revisions: full min +//@ revisions: full min #![cfg_attr(full, feature(adt_const_params))] #![cfg_attr(full, allow(incomplete_features))] diff --git a/tests/ui/const-generics/issues/issue-71381.rs b/tests/ui/const-generics/issues/issue-71381.rs index 75ad4545371..7f2e14944e2 100644 --- a/tests/ui/const-generics/issues/issue-71381.rs +++ b/tests/ui/const-generics/issues/issue-71381.rs @@ -1,4 +1,4 @@ -// revisions: full min +//@ revisions: full min #![cfg_attr(full, feature(adt_const_params))] #![cfg_attr(full, allow(incomplete_features))] diff --git a/tests/ui/const-generics/issues/issue-71382.rs b/tests/ui/const-generics/issues/issue-71382.rs index 4392d72e566..8878a4434c4 100644 --- a/tests/ui/const-generics/issues/issue-71382.rs +++ b/tests/ui/const-generics/issues/issue-71382.rs @@ -1,4 +1,4 @@ -// revisions: full min +//@ revisions: full min #![cfg_attr(full, feature(adt_const_params))] #![cfg_attr(full, allow(incomplete_features))] diff --git a/tests/ui/const-generics/issues/issue-71547.rs b/tests/ui/const-generics/issues/issue-71547.rs index 60776a1a985..a2cea433a44 100644 --- a/tests/ui/const-generics/issues/issue-71547.rs +++ b/tests/ui/const-generics/issues/issue-71547.rs @@ -1,4 +1,4 @@ -// check-pass +//@ check-pass #![feature(adt_const_params)] #![allow(incomplete_features)] diff --git a/tests/ui/const-generics/issues/issue-71611.rs b/tests/ui/const-generics/issues/issue-71611.rs index 92930092482..0e0c08146b2 100644 --- a/tests/ui/const-generics/issues/issue-71611.rs +++ b/tests/ui/const-generics/issues/issue-71611.rs @@ -1,4 +1,4 @@ -// revisions: full min +//@ revisions: full min #![cfg_attr(full, feature(adt_const_params))] #![cfg_attr(full, allow(incomplete_features))] diff --git a/tests/ui/const-generics/issues/issue-71986.rs b/tests/ui/const-generics/issues/issue-71986.rs index 6f0a98ead88..c97b3c59e0e 100644 --- a/tests/ui/const-generics/issues/issue-71986.rs +++ b/tests/ui/const-generics/issues/issue-71986.rs @@ -1,4 +1,4 @@ -// check-pass +//@ check-pass pub trait Foo {} pub fn bar>() {} diff --git a/tests/ui/const-generics/issues/issue-72352.rs b/tests/ui/const-generics/issues/issue-72352.rs index 0cab6e8ebfa..841ae867004 100644 --- a/tests/ui/const-generics/issues/issue-72352.rs +++ b/tests/ui/const-generics/issues/issue-72352.rs @@ -1,4 +1,4 @@ -// revisions: full min +//@ revisions: full min #![cfg_attr(full, feature(adt_const_params))] #![cfg_attr(full, allow(incomplete_features))] diff --git a/tests/ui/const-generics/issues/issue-73120.rs b/tests/ui/const-generics/issues/issue-73120.rs index 050dc9bde64..b980a34b6f4 100644 --- a/tests/ui/const-generics/issues/issue-73120.rs +++ b/tests/ui/const-generics/issues/issue-73120.rs @@ -1,5 +1,5 @@ -// check-pass -// aux-build:const_generic_issues_lib.rs +//@ check-pass +//@ aux-build:const_generic_issues_lib.rs #![feature(generic_const_exprs)] #![allow(incomplete_features)] extern crate const_generic_issues_lib as lib2; diff --git a/tests/ui/const-generics/issues/issue-73491.rs b/tests/ui/const-generics/issues/issue-73491.rs index 482dbb04daa..ad0eb7e8243 100644 --- a/tests/ui/const-generics/issues/issue-73491.rs +++ b/tests/ui/const-generics/issues/issue-73491.rs @@ -1,5 +1,5 @@ -// [full] check-pass -// revisions: full min +//@ [full] check-pass +//@ revisions: full min #![cfg_attr(full, feature(adt_const_params))] #![cfg_attr(full, allow(incomplete_features))] diff --git a/tests/ui/const-generics/issues/issue-73727-static-reference-array-const-param.rs b/tests/ui/const-generics/issues/issue-73727-static-reference-array-const-param.rs index f0d604835cb..701b3423f31 100644 --- a/tests/ui/const-generics/issues/issue-73727-static-reference-array-const-param.rs +++ b/tests/ui/const-generics/issues/issue-73727-static-reference-array-const-param.rs @@ -1,7 +1,7 @@ // Regression test for #73727 -// revisions: full min -//[full]check-pass +//@ revisions: full min +//@[full]check-pass #![cfg_attr(full, feature(adt_const_params))] #![cfg_attr(full, allow(incomplete_features))] diff --git a/tests/ui/const-generics/issues/issue-74101.rs b/tests/ui/const-generics/issues/issue-74101.rs index 4c9b2d3c634..5c50951d733 100644 --- a/tests/ui/const-generics/issues/issue-74101.rs +++ b/tests/ui/const-generics/issues/issue-74101.rs @@ -1,5 +1,5 @@ -// [full] check-pass -// revisions: full min +//@ [full] check-pass +//@ revisions: full min #![cfg_attr(full, feature(adt_const_params))] #![cfg_attr(full, allow(incomplete_features))] diff --git a/tests/ui/const-generics/issues/issue-74255.rs b/tests/ui/const-generics/issues/issue-74255.rs index 60b2fd37c44..202fa405eab 100644 --- a/tests/ui/const-generics/issues/issue-74255.rs +++ b/tests/ui/const-generics/issues/issue-74255.rs @@ -1,5 +1,5 @@ -// [full] check-pass -// revisions: full min +//@ [full] check-pass +//@ revisions: full min #![cfg_attr(full, feature(adt_const_params))] #![cfg_attr(full, allow(incomplete_features))] diff --git a/tests/ui/const-generics/issues/issue-74906.rs b/tests/ui/const-generics/issues/issue-74906.rs index cc1f2853fb2..0a37cebc023 100644 --- a/tests/ui/const-generics/issues/issue-74906.rs +++ b/tests/ui/const-generics/issues/issue-74906.rs @@ -1,5 +1,5 @@ -// edition:2018 -// check-pass +//@ edition:2018 +//@ check-pass const SIZE: usize = 16; diff --git a/tests/ui/const-generics/issues/issue-74950.rs b/tests/ui/const-generics/issues/issue-74950.rs index f1f9bd16ebe..f79676ccee8 100644 --- a/tests/ui/const-generics/issues/issue-74950.rs +++ b/tests/ui/const-generics/issues/issue-74950.rs @@ -1,5 +1,5 @@ -// [full] build-pass -// revisions: full min +//@ [full] build-pass +//@ revisions: full min #![cfg_attr(full, feature(adt_const_params))] #![cfg_attr(full, allow(incomplete_features))] diff --git a/tests/ui/const-generics/issues/issue-75047.rs b/tests/ui/const-generics/issues/issue-75047.rs index 7b6fb92bca9..549be103183 100644 --- a/tests/ui/const-generics/issues/issue-75047.rs +++ b/tests/ui/const-generics/issues/issue-75047.rs @@ -1,5 +1,5 @@ -// [full] check-pass -// revisions: full min +//@ [full] check-pass +//@ revisions: full min #![cfg_attr(full, feature(adt_const_params))] #![cfg_attr(full, allow(incomplete_features))] diff --git a/tests/ui/const-generics/issues/issue-75299.rs b/tests/ui/const-generics/issues/issue-75299.rs index 83ef09af88e..2c48dc71207 100644 --- a/tests/ui/const-generics/issues/issue-75299.rs +++ b/tests/ui/const-generics/issues/issue-75299.rs @@ -1,5 +1,5 @@ -// compile-flags: -Zmir-opt-level=4 -// run-pass +//@ compile-flags: -Zmir-opt-level=4 +//@ run-pass fn main() { fn foo() -> [u8; N] { [0; N] diff --git a/tests/ui/const-generics/issues/issue-83288.rs b/tests/ui/const-generics/issues/issue-83288.rs index a24596d242e..4260170d1ac 100644 --- a/tests/ui/const-generics/issues/issue-83288.rs +++ b/tests/ui/const-generics/issues/issue-83288.rs @@ -1,4 +1,4 @@ -// build-pass +//@ build-pass #![allow(incomplete_features)] #![feature(generic_const_exprs)] diff --git a/tests/ui/const-generics/issues/issue-85031-2.rs b/tests/ui/const-generics/issues/issue-85031-2.rs index 50dd66da6db..bd96690f995 100644 --- a/tests/ui/const-generics/issues/issue-85031-2.rs +++ b/tests/ui/const-generics/issues/issue-85031-2.rs @@ -1,5 +1,5 @@ -// check-pass -// known-bug: unknown +//@ check-pass +//@ known-bug: unknown // This should not compile, as the compiler should not know // `A - 0` is satisfied `?x - 0` if `?x` is inferred to `A`. diff --git a/tests/ui/const-generics/issues/issue-86033.rs b/tests/ui/const-generics/issues/issue-86033.rs index cf08f722fbb..a27e8d77b64 100644 --- a/tests/ui/const-generics/issues/issue-86033.rs +++ b/tests/ui/const-generics/issues/issue-86033.rs @@ -1,4 +1,4 @@ -// check-pass +//@ check-pass #![feature(generic_const_exprs)] #![allow(incomplete_features)] diff --git a/tests/ui/const-generics/issues/issue-86535-2.rs b/tests/ui/const-generics/issues/issue-86535-2.rs index 0b535fd6649..1ba3b6d5347 100644 --- a/tests/ui/const-generics/issues/issue-86535-2.rs +++ b/tests/ui/const-generics/issues/issue-86535-2.rs @@ -1,4 +1,4 @@ -// run-pass +//@ run-pass #![feature(adt_const_params, generic_const_exprs)] #![allow(incomplete_features)] diff --git a/tests/ui/const-generics/issues/issue-86535.rs b/tests/ui/const-generics/issues/issue-86535.rs index 5289c4e99dd..dd6bc88ad19 100644 --- a/tests/ui/const-generics/issues/issue-86535.rs +++ b/tests/ui/const-generics/issues/issue-86535.rs @@ -1,4 +1,4 @@ -// run-pass +//@ run-pass #![feature(adt_const_params, generic_const_exprs)] #![allow(incomplete_features, unused_variables)] diff --git a/tests/ui/const-generics/issues/issue-87076.rs b/tests/ui/const-generics/issues/issue-87076.rs index a32c1f965f8..632320fb3c5 100644 --- a/tests/ui/const-generics/issues/issue-87076.rs +++ b/tests/ui/const-generics/issues/issue-87076.rs @@ -1,4 +1,4 @@ -// build-pass +//@ build-pass #![feature(adt_const_params)] #![allow(incomplete_features)] diff --git a/tests/ui/const-generics/issues/issue-87470.rs b/tests/ui/const-generics/issues/issue-87470.rs index d60181a418a..ab2e0039e70 100644 --- a/tests/ui/const-generics/issues/issue-87470.rs +++ b/tests/ui/const-generics/issues/issue-87470.rs @@ -1,4 +1,4 @@ -// build-pass +//@ build-pass #![feature(generic_const_exprs)] #![allow(incomplete_features)] diff --git a/tests/ui/const-generics/issues/issue-87964.rs b/tests/ui/const-generics/issues/issue-87964.rs index 116686abb9e..fbaf2bcfa7a 100644 --- a/tests/ui/const-generics/issues/issue-87964.rs +++ b/tests/ui/const-generics/issues/issue-87964.rs @@ -1,4 +1,4 @@ -// build-pass +//@ build-pass #![feature(generic_const_exprs)] #![allow(incomplete_features)] diff --git a/tests/ui/const-generics/issues/issue-88119.rs b/tests/ui/const-generics/issues/issue-88119.rs index 647b0eea86d..bcbb26f0d8e 100644 --- a/tests/ui/const-generics/issues/issue-88119.rs +++ b/tests/ui/const-generics/issues/issue-88119.rs @@ -1,4 +1,4 @@ -// check-pass +//@ check-pass #![allow(incomplete_features)] #![feature(const_trait_impl, generic_const_exprs)] diff --git a/tests/ui/const-generics/issues/issue-88468.rs b/tests/ui/const-generics/issues/issue-88468.rs index 914047236ab..3c84d3d5cc2 100644 --- a/tests/ui/const-generics/issues/issue-88468.rs +++ b/tests/ui/const-generics/issues/issue-88468.rs @@ -1,4 +1,4 @@ -// check-pass +//@ check-pass #![allow(incomplete_features)] #![feature(generic_const_exprs)] diff --git a/tests/ui/const-generics/issues/issue-89146.rs b/tests/ui/const-generics/issues/issue-89146.rs index e3540f46f1e..5c65d7af6f7 100644 --- a/tests/ui/const-generics/issues/issue-89146.rs +++ b/tests/ui/const-generics/issues/issue-89146.rs @@ -1,4 +1,4 @@ -// build-pass +//@ build-pass #![allow(incomplete_features)] #![feature(generic_const_exprs)] diff --git a/tests/ui/const-generics/issues/issue-89304.rs b/tests/ui/const-generics/issues/issue-89304.rs index d544d637cc4..d5cbfc9300b 100644 --- a/tests/ui/const-generics/issues/issue-89304.rs +++ b/tests/ui/const-generics/issues/issue-89304.rs @@ -1,4 +1,4 @@ -// check-pass +//@ check-pass #![feature(generic_const_exprs)] #![allow(incomplete_features)] diff --git a/tests/ui/const-generics/issues/issue-89320.rs b/tests/ui/const-generics/issues/issue-89320.rs index afa5c8fab74..36482737704 100644 --- a/tests/ui/const-generics/issues/issue-89320.rs +++ b/tests/ui/const-generics/issues/issue-89320.rs @@ -1,4 +1,4 @@ -// build-pass +//@ build-pass #![feature(generic_const_exprs)] #![allow(incomplete_features)] diff --git a/tests/ui/const-generics/issues/issue-89334.rs b/tests/ui/const-generics/issues/issue-89334.rs index b15b7428cdd..9c2426c8936 100644 --- a/tests/ui/const-generics/issues/issue-89334.rs +++ b/tests/ui/const-generics/issues/issue-89334.rs @@ -1,4 +1,4 @@ -// build-pass +//@ build-pass #![feature(generic_const_exprs)] #![allow(unused_braces, incomplete_features)] diff --git a/tests/ui/const-generics/issues/issue-92186.rs b/tests/ui/const-generics/issues/issue-92186.rs index 9ced4667d24..73c50b6e41c 100644 --- a/tests/ui/const-generics/issues/issue-92186.rs +++ b/tests/ui/const-generics/issues/issue-92186.rs @@ -1,4 +1,4 @@ -// check-pass +//@ check-pass #![feature(generic_const_exprs)] #![allow(incomplete_features)] diff --git a/tests/ui/const-generics/issues/issue-96654.rs b/tests/ui/const-generics/issues/issue-96654.rs index 8cf786dbe40..fbbb68a7639 100644 --- a/tests/ui/const-generics/issues/issue-96654.rs +++ b/tests/ui/const-generics/issues/issue-96654.rs @@ -1,4 +1,4 @@ -// check-pass +//@ check-pass struct A {} diff --git a/tests/ui/const-generics/issues/issue-97634.rs b/tests/ui/const-generics/issues/issue-97634.rs index 422e8de6856..2bd213fc532 100644 --- a/tests/ui/const-generics/issues/issue-97634.rs +++ b/tests/ui/const-generics/issues/issue-97634.rs @@ -1,4 +1,4 @@ -// build-pass +//@ build-pass pub enum Register { Field0 = 40, diff --git a/tests/ui/const-generics/late-bound-vars/in_closure.rs b/tests/ui/const-generics/late-bound-vars/in_closure.rs index 443c755c601..88537f29dfd 100644 --- a/tests/ui/const-generics/late-bound-vars/in_closure.rs +++ b/tests/ui/const-generics/late-bound-vars/in_closure.rs @@ -1,4 +1,4 @@ -// known-bug: unknown +//@ known-bug: unknown // see comment on `tests/ui/const-generics/late-bound-vars/simple.rs` #![feature(generic_const_exprs)] diff --git a/tests/ui/const-generics/late-bound-vars/late-bound-in-return-issue-77357.rs b/tests/ui/const-generics/late-bound-vars/late-bound-in-return-issue-77357.rs index b81aa50d9a9..a5d7042dbf1 100644 --- a/tests/ui/const-generics/late-bound-vars/late-bound-in-return-issue-77357.rs +++ b/tests/ui/const-generics/late-bound-vars/late-bound-in-return-issue-77357.rs @@ -1,4 +1,4 @@ -// known-bug: unknown +//@ known-bug: unknown // see comment on `tests/ui/const-generics/late-bound-vars/simple.rs` #![feature(generic_const_exprs)] diff --git a/tests/ui/const-generics/late-bound-vars/late-bound-in-where-issue-83993.rs b/tests/ui/const-generics/late-bound-vars/late-bound-in-where-issue-83993.rs index 89f01748fc9..629e5d45428 100644 --- a/tests/ui/const-generics/late-bound-vars/late-bound-in-where-issue-83993.rs +++ b/tests/ui/const-generics/late-bound-vars/late-bound-in-where-issue-83993.rs @@ -1,4 +1,4 @@ -// known-bug: unknown +//@ known-bug: unknown // see comment on `tests/ui/const-generics/late-bound-vars/simple.rs` #![feature(generic_const_exprs)] diff --git a/tests/ui/const-generics/late-bound-vars/simple.rs b/tests/ui/const-generics/late-bound-vars/simple.rs index a562bd8cb41..73c01ce6777 100644 --- a/tests/ui/const-generics/late-bound-vars/simple.rs +++ b/tests/ui/const-generics/late-bound-vars/simple.rs @@ -1,4 +1,4 @@ -// known-bug: unknown +//@ known-bug: unknown // If we want this to compile, then we'd need to do something like RPITs do, // where nested associated constants have early-bound versions of their captured diff --git a/tests/ui/const-generics/legacy-const-generics-bad.rs b/tests/ui/const-generics/legacy-const-generics-bad.rs index 538eee337cc..3521c39fca9 100644 --- a/tests/ui/const-generics/legacy-const-generics-bad.rs +++ b/tests/ui/const-generics/legacy-const-generics-bad.rs @@ -1,4 +1,4 @@ -// aux-build:legacy-const-generics.rs +//@ aux-build:legacy-const-generics.rs extern crate legacy_const_generics; diff --git a/tests/ui/const-generics/legacy-const-generics.rs b/tests/ui/const-generics/legacy-const-generics.rs index 9abc72d98e6..9411be0e620 100644 --- a/tests/ui/const-generics/legacy-const-generics.rs +++ b/tests/ui/const-generics/legacy-const-generics.rs @@ -1,5 +1,5 @@ -// aux-build:legacy-const-generics.rs -// run-pass +//@ aux-build:legacy-const-generics.rs +//@ run-pass #![feature(rustc_attrs)] diff --git a/tests/ui/const-generics/min_const_generics/assoc_const.rs b/tests/ui/const-generics/min_const_generics/assoc_const.rs index 27e971b5b6f..ce373a74cf3 100644 --- a/tests/ui/const-generics/min_const_generics/assoc_const.rs +++ b/tests/ui/const-generics/min_const_generics/assoc_const.rs @@ -1,4 +1,4 @@ -// check-pass +//@ check-pass struct Foo; impl Foo { diff --git a/tests/ui/const-generics/min_const_generics/complex-expression.rs b/tests/ui/const-generics/min_const_generics/complex-expression.rs index 8e667aebaad..ef2cbfa73ad 100644 --- a/tests/ui/const-generics/min_const_generics/complex-expression.rs +++ b/tests/ui/const-generics/min_const_generics/complex-expression.rs @@ -1,4 +1,4 @@ -// compile-flags: -Zdeduplicate-diagnostics=yes +//@ compile-flags: -Zdeduplicate-diagnostics=yes use std::mem::size_of; fn test() {} diff --git a/tests/ui/const-generics/min_const_generics/const-evaluatable-unchecked.rs b/tests/ui/const-generics/min_const_generics/const-evaluatable-unchecked.rs index e9d868093e7..a3235e3878a 100644 --- a/tests/ui/const-generics/min_const_generics/const-evaluatable-unchecked.rs +++ b/tests/ui/const-generics/min_const_generics/const-evaluatable-unchecked.rs @@ -1,5 +1,5 @@ -// check-pass -// compile-flags: -Zdeduplicate-diagnostics=yes +//@ check-pass +//@ compile-flags: -Zdeduplicate-diagnostics=yes #![allow(dead_code)] fn foo() { diff --git a/tests/ui/const-generics/min_const_generics/const_fn_in_generics.rs b/tests/ui/const-generics/min_const_generics/const_fn_in_generics.rs index 0c10af6c43f..aac90e44208 100644 --- a/tests/ui/const-generics/min_const_generics/const_fn_in_generics.rs +++ b/tests/ui/const-generics/min_const_generics/const_fn_in_generics.rs @@ -1,4 +1,4 @@ -// run-pass +//@ run-pass const fn identity() -> u32 { T } diff --git a/tests/ui/const-generics/min_const_generics/default_trait_param.rs b/tests/ui/const-generics/min_const_generics/default_trait_param.rs index 9cd5e3279ff..dd642f9b3a0 100644 --- a/tests/ui/const-generics/min_const_generics/default_trait_param.rs +++ b/tests/ui/const-generics/min_const_generics/default_trait_param.rs @@ -1,4 +1,4 @@ -// check-pass +//@ check-pass trait Foo {} fn main() {} diff --git a/tests/ui/const-generics/min_const_generics/inferred_const.rs b/tests/ui/const-generics/min_const_generics/inferred_const.rs index 57d6941587a..0256ef732a3 100644 --- a/tests/ui/const-generics/min_const_generics/inferred_const.rs +++ b/tests/ui/const-generics/min_const_generics/inferred_const.rs @@ -1,5 +1,5 @@ #![feature(generic_arg_infer)] -// run-pass +//@ run-pass fn foo(_data: [u32; N]) -> [u32; K] { [0; K] diff --git a/tests/ui/const-generics/min_const_generics/invalid-patterns.rs b/tests/ui/const-generics/min_const_generics/invalid-patterns.rs index 13b2cca2f24..a9d2a8a5dd7 100644 --- a/tests/ui/const-generics/min_const_generics/invalid-patterns.rs +++ b/tests/ui/const-generics/min_const_generics/invalid-patterns.rs @@ -1,4 +1,4 @@ -// stderr-per-bitwidth +//@ stderr-per-bitwidth use std::mem::transmute; fn get_flag() -> Option { diff --git a/tests/ui/const-generics/min_const_generics/macro.rs b/tests/ui/const-generics/min_const_generics/macro.rs index 9b63f76987a..b7e8083a861 100644 --- a/tests/ui/const-generics/min_const_generics/macro.rs +++ b/tests/ui/const-generics/min_const_generics/macro.rs @@ -1,4 +1,4 @@ -// run-pass +//@ run-pass struct Example; macro_rules! external_macro { diff --git a/tests/ui/const-generics/min_const_generics/type_and_const_defaults.rs b/tests/ui/const-generics/min_const_generics/type_and_const_defaults.rs index fa119c59f61..9f8f63eb905 100644 --- a/tests/ui/const-generics/min_const_generics/type_and_const_defaults.rs +++ b/tests/ui/const-generics/min_const_generics/type_and_const_defaults.rs @@ -1,4 +1,4 @@ -// run-pass +//@ run-pass #![allow(dead_code)] struct Both { diff --git a/tests/ui/const-generics/nested-type.rs b/tests/ui/const-generics/nested-type.rs index ff95018065a..a9d106237b3 100644 --- a/tests/ui/const-generics/nested-type.rs +++ b/tests/ui/const-generics/nested-type.rs @@ -1,4 +1,4 @@ -// revisions: full min +//@ revisions: full min #![cfg_attr(full, feature(adt_const_params))] #![cfg_attr(full, allow(incomplete_features))] diff --git a/tests/ui/const-generics/occurs-check/bind-param.rs b/tests/ui/const-generics/occurs-check/bind-param.rs index ee4244051a1..56ddccf219c 100644 --- a/tests/ui/const-generics/occurs-check/bind-param.rs +++ b/tests/ui/const-generics/occurs-check/bind-param.rs @@ -1,4 +1,4 @@ -// build-pass +//@ build-pass #![feature(generic_const_exprs)] #![allow(incomplete_features)] diff --git a/tests/ui/const-generics/occurs-check/unify-fixpoint.rs b/tests/ui/const-generics/occurs-check/unify-fixpoint.rs index e6f8e4ad3b3..1c1ed41051d 100644 --- a/tests/ui/const-generics/occurs-check/unify-fixpoint.rs +++ b/tests/ui/const-generics/occurs-check/unify-fixpoint.rs @@ -1,4 +1,4 @@ -// check-pass +//@ check-pass #![feature(generic_const_exprs)] //~ WARN the feature `generic_const_exprs` is incomplete diff --git a/tests/ui/const-generics/overlapping_impls.rs b/tests/ui/const-generics/overlapping_impls.rs index 2ce6c4a823c..3f0bd7bf3b2 100644 --- a/tests/ui/const-generics/overlapping_impls.rs +++ b/tests/ui/const-generics/overlapping_impls.rs @@ -1,4 +1,4 @@ -// check-pass +//@ check-pass #![allow(incomplete_features)] #![feature(adt_const_params)] #![feature(generic_const_exprs)] diff --git a/tests/ui/const-generics/params-in-ct-in-ty-param-lazy-norm.rs b/tests/ui/const-generics/params-in-ct-in-ty-param-lazy-norm.rs index b24a7afabd9..2794ff3eaa9 100644 --- a/tests/ui/const-generics/params-in-ct-in-ty-param-lazy-norm.rs +++ b/tests/ui/const-generics/params-in-ct-in-ty-param-lazy-norm.rs @@ -1,4 +1,4 @@ -// revisions: full min +//@ revisions: full min #![cfg_attr(full, feature(generic_const_exprs))] #![cfg_attr(full, allow(incomplete_features))] diff --git a/tests/ui/const-generics/parent_generics_of_encoding.rs b/tests/ui/const-generics/parent_generics_of_encoding.rs index b87e3960fc9..1f9c8c5bc75 100644 --- a/tests/ui/const-generics/parent_generics_of_encoding.rs +++ b/tests/ui/const-generics/parent_generics_of_encoding.rs @@ -1,5 +1,5 @@ -// aux-build:generics_of_parent.rs -// check-pass +//@ aux-build:generics_of_parent.rs +//@ check-pass #![feature(generic_const_exprs)] #![allow(incomplete_features)] diff --git a/tests/ui/const-generics/parent_generics_of_encoding_impl_trait.rs b/tests/ui/const-generics/parent_generics_of_encoding_impl_trait.rs index 7a78e0f109c..3922aa7aa4a 100644 --- a/tests/ui/const-generics/parent_generics_of_encoding_impl_trait.rs +++ b/tests/ui/const-generics/parent_generics_of_encoding_impl_trait.rs @@ -1,4 +1,4 @@ -// aux-build:generics_of_parent_impl_trait.rs +//@ aux-build:generics_of_parent_impl_trait.rs #![feature(generic_const_exprs)] #![allow(incomplete_features)] diff --git a/tests/ui/const-generics/promotion.rs b/tests/ui/const-generics/promotion.rs index ce9a1a0feb4..7229c2570a7 100644 --- a/tests/ui/const-generics/promotion.rs +++ b/tests/ui/const-generics/promotion.rs @@ -1,4 +1,4 @@ -// run-pass +//@ run-pass // tests that promoting expressions containing const parameters is allowed. fn promotion_test() -> &'static usize { &(3 + N) diff --git a/tests/ui/const-generics/raw-ptr-const-param-deref.rs b/tests/ui/const-generics/raw-ptr-const-param-deref.rs index 65595f07dab..b7fcbb3447a 100644 --- a/tests/ui/const-generics/raw-ptr-const-param-deref.rs +++ b/tests/ui/const-generics/raw-ptr-const-param-deref.rs @@ -1,5 +1,5 @@ // Checks that pointers must not be used as the type of const params. -// revisions: full min +//@ revisions: full min #![cfg_attr(full, feature(adt_const_params))] #![cfg_attr(full, allow(incomplete_features))] diff --git a/tests/ui/const-generics/raw-ptr-const-param.rs b/tests/ui/const-generics/raw-ptr-const-param.rs index 9cc46c769e7..19d18a2f9d2 100644 --- a/tests/ui/const-generics/raw-ptr-const-param.rs +++ b/tests/ui/const-generics/raw-ptr-const-param.rs @@ -1,4 +1,4 @@ -// revisions: full min +//@ revisions: full min #![cfg_attr(full, feature(adt_const_params))] #![cfg_attr(full, allow(incomplete_features))] diff --git a/tests/ui/const-generics/slice-const-param-mismatch.rs b/tests/ui/const-generics/slice-const-param-mismatch.rs index 24c05d7bea5..733eeb69fa9 100644 --- a/tests/ui/const-generics/slice-const-param-mismatch.rs +++ b/tests/ui/const-generics/slice-const-param-mismatch.rs @@ -1,4 +1,4 @@ -// revisions: full min +//@ revisions: full min #![cfg_attr(full, feature(adt_const_params))] #![cfg_attr(full, allow(incomplete_features))] diff --git a/tests/ui/const-generics/slice-const-param.rs b/tests/ui/const-generics/slice-const-param.rs index 90c573ab365..c6c0047c929 100644 --- a/tests/ui/const-generics/slice-const-param.rs +++ b/tests/ui/const-generics/slice-const-param.rs @@ -1,4 +1,4 @@ -// run-pass +//@ run-pass #![feature(adt_const_params)] #![allow(incomplete_features)] diff --git a/tests/ui/const-generics/std/const-generics-range.rs b/tests/ui/const-generics/std/const-generics-range.rs index bda59f3ec45..f959f1e2949 100644 --- a/tests/ui/const-generics/std/const-generics-range.rs +++ b/tests/ui/const-generics/std/const-generics-range.rs @@ -1,6 +1,6 @@ -// [full] known-bug: unknown +//@ [full] known-bug: unknown -// revisions: full min +//@ revisions: full min #![cfg_attr(full, feature(adt_const_params))] #![cfg_attr(full, allow(incomplete_features))] diff --git a/tests/ui/const-generics/trait-const-args.rs b/tests/ui/const-generics/trait-const-args.rs index 2cdef3fb452..d5ce6be3553 100644 --- a/tests/ui/const-generics/trait-const-args.rs +++ b/tests/ui/const-generics/trait-const-args.rs @@ -1,4 +1,4 @@ -// check-pass +//@ check-pass struct Const; trait Foo {} diff --git a/tests/ui/const-generics/transmute-const-param-static-reference.rs b/tests/ui/const-generics/transmute-const-param-static-reference.rs index 6b443c8bd90..49541233ed1 100644 --- a/tests/ui/const-generics/transmute-const-param-static-reference.rs +++ b/tests/ui/const-generics/transmute-const-param-static-reference.rs @@ -1,5 +1,5 @@ -// revisions: full min -//[full] check-pass +//@ revisions: full min +//@[full] check-pass #![cfg_attr(full, feature(adt_const_params))] #![cfg_attr(full, allow(incomplete_features))] diff --git a/tests/ui/const-generics/transmute.rs b/tests/ui/const-generics/transmute.rs index 30560a95b5e..245fcf5670e 100644 --- a/tests/ui/const-generics/transmute.rs +++ b/tests/ui/const-generics/transmute.rs @@ -1,4 +1,4 @@ -// run-pass +//@ run-pass #![feature(generic_const_exprs)] #![feature(transmute_generic_consts)] #![allow(incomplete_features)] diff --git a/tests/ui/const-generics/transparent-maybeunit-array-wrapper.rs b/tests/ui/const-generics/transparent-maybeunit-array-wrapper.rs index 926e807feb0..419d605d0c8 100644 --- a/tests/ui/const-generics/transparent-maybeunit-array-wrapper.rs +++ b/tests/ui/const-generics/transparent-maybeunit-array-wrapper.rs @@ -1,5 +1,5 @@ -// run-pass -// revisions: full min +//@ run-pass +//@ revisions: full min #![cfg_attr(full, feature(adt_const_params))] #![cfg_attr(full, allow(incomplete_features))] diff --git a/tests/ui/const-generics/try_unify_ignore_lifetimes.rs b/tests/ui/const-generics/try_unify_ignore_lifetimes.rs index 2ae0ae70dd9..2cd6fb53c4a 100644 --- a/tests/ui/const-generics/try_unify_ignore_lifetimes.rs +++ b/tests/ui/const-generics/try_unify_ignore_lifetimes.rs @@ -1,4 +1,4 @@ -// check-pass +//@ check-pass #![feature(generic_const_exprs)] #![allow(incomplete_features)] diff --git a/tests/ui/const-generics/two_matching_preds.rs b/tests/ui/const-generics/two_matching_preds.rs index de608f73e2c..e69ca47385e 100644 --- a/tests/ui/const-generics/two_matching_preds.rs +++ b/tests/ui/const-generics/two_matching_preds.rs @@ -1,4 +1,4 @@ -// check-pass +//@ check-pass #![feature(generic_const_exprs)] #![allow(incomplete_features)] diff --git a/tests/ui/const-generics/type-after-const-ok.rs b/tests/ui/const-generics/type-after-const-ok.rs index f37b0b10233..0a336e9a14a 100644 --- a/tests/ui/const-generics/type-after-const-ok.rs +++ b/tests/ui/const-generics/type-after-const-ok.rs @@ -1,4 +1,4 @@ -// run-pass +//@ run-pass // Verifies that having generic parameters after constants is permitted #[allow(dead_code)] struct A(T); diff --git a/tests/ui/const-generics/type-dependent/const-arg-in-const-arg.rs b/tests/ui/const-generics/type-dependent/const-arg-in-const-arg.rs index e844148346f..74ac812f14e 100644 --- a/tests/ui/const-generics/type-dependent/const-arg-in-const-arg.rs +++ b/tests/ui/const-generics/type-dependent/const-arg-in-const-arg.rs @@ -1,5 +1,5 @@ -// run-pass -// revisions: full min +//@ run-pass +//@ revisions: full min #![cfg_attr(full, feature(generic_const_exprs))] #![allow(incomplete_features)] diff --git a/tests/ui/const-generics/type-dependent/issue-61936.rs b/tests/ui/const-generics/type-dependent/issue-61936.rs index 7216b25f0df..24fc4d4a62d 100644 --- a/tests/ui/const-generics/type-dependent/issue-61936.rs +++ b/tests/ui/const-generics/type-dependent/issue-61936.rs @@ -1,4 +1,4 @@ -// run-pass +//@ run-pass trait SliceExt { fn array_windows_example<'a, const N: usize>(&'a self) -> ArrayWindowsExample<'a, T, N>; diff --git a/tests/ui/const-generics/type-dependent/issue-63695.rs b/tests/ui/const-generics/type-dependent/issue-63695.rs index 08b6d4bf554..0b872dc44d9 100644 --- a/tests/ui/const-generics/type-dependent/issue-63695.rs +++ b/tests/ui/const-generics/type-dependent/issue-63695.rs @@ -1,4 +1,4 @@ -// run-pass +//@ run-pass trait T { fn test(&self) -> i32 { A } diff --git a/tests/ui/const-generics/type-dependent/issue-67144-1.rs b/tests/ui/const-generics/type-dependent/issue-67144-1.rs index 27dd51de241..ceefe9b87f6 100644 --- a/tests/ui/const-generics/type-dependent/issue-67144-1.rs +++ b/tests/ui/const-generics/type-dependent/issue-67144-1.rs @@ -1,4 +1,4 @@ -// check-pass +//@ check-pass struct X; impl X { diff --git a/tests/ui/const-generics/type-dependent/issue-67144-2.rs b/tests/ui/const-generics/type-dependent/issue-67144-2.rs index b26f551eb86..88cba64356e 100644 --- a/tests/ui/const-generics/type-dependent/issue-67144-2.rs +++ b/tests/ui/const-generics/type-dependent/issue-67144-2.rs @@ -1,4 +1,4 @@ -// check-pass +//@ check-pass struct A; struct X; diff --git a/tests/ui/const-generics/type-dependent/issue-69816.rs b/tests/ui/const-generics/type-dependent/issue-69816.rs index cbb6b398e01..a05faf2a821 100644 --- a/tests/ui/const-generics/type-dependent/issue-69816.rs +++ b/tests/ui/const-generics/type-dependent/issue-69816.rs @@ -1,4 +1,4 @@ -// run-pass +//@ run-pass trait IterExt: Sized + Iterator { fn default_for_size(self) -> [Self::Item; N] where diff --git a/tests/ui/const-generics/type-dependent/issue-70217.rs b/tests/ui/const-generics/type-dependent/issue-70217.rs index 933ca027609..3e27dc66a93 100644 --- a/tests/ui/const-generics/type-dependent/issue-70217.rs +++ b/tests/ui/const-generics/type-dependent/issue-70217.rs @@ -1,4 +1,4 @@ -// check-pass +//@ check-pass struct Struct; diff --git a/tests/ui/const-generics/type-dependent/issue-70507.rs b/tests/ui/const-generics/type-dependent/issue-70507.rs index c72d9fbec2d..56b9079ce3e 100644 --- a/tests/ui/const-generics/type-dependent/issue-70507.rs +++ b/tests/ui/const-generics/type-dependent/issue-70507.rs @@ -1,4 +1,4 @@ -// run-pass +//@ run-pass trait ConstChunksExactTrait { fn const_chunks_exact(&self) -> ConstChunksExact<'_, T, {N}>; diff --git a/tests/ui/const-generics/type-dependent/issue-70586.rs b/tests/ui/const-generics/type-dependent/issue-70586.rs index 346ac4b72cc..fe1471b1375 100644 --- a/tests/ui/const-generics/type-dependent/issue-70586.rs +++ b/tests/ui/const-generics/type-dependent/issue-70586.rs @@ -1,4 +1,4 @@ -// check-pass +//@ check-pass use std::marker::PhantomData; // This namespace is necessary for the ICE to trigger diff --git a/tests/ui/const-generics/type-dependent/issue-71348.rs b/tests/ui/const-generics/type-dependent/issue-71348.rs index 2ef2f066a6f..f349a88d124 100644 --- a/tests/ui/const-generics/type-dependent/issue-71348.rs +++ b/tests/ui/const-generics/type-dependent/issue-71348.rs @@ -1,5 +1,5 @@ -// [full] run-pass -// revisions: full min +//@ [full] run-pass +//@ revisions: full min #![cfg_attr(full, feature(adt_const_params))] #![cfg_attr(full, allow(incomplete_features))] diff --git a/tests/ui/const-generics/type-dependent/issue-71805.rs b/tests/ui/const-generics/type-dependent/issue-71805.rs index 060b899648e..27c101df107 100644 --- a/tests/ui/const-generics/type-dependent/issue-71805.rs +++ b/tests/ui/const-generics/type-dependent/issue-71805.rs @@ -1,4 +1,4 @@ -// run-pass +//@ run-pass use std::mem::MaybeUninit; trait CollectSlice<'a>: Iterator { diff --git a/tests/ui/const-generics/type-dependent/issue-73730.rs b/tests/ui/const-generics/type-dependent/issue-73730.rs index 5e1b8c63537..abba8a32613 100644 --- a/tests/ui/const-generics/type-dependent/issue-73730.rs +++ b/tests/ui/const-generics/type-dependent/issue-73730.rs @@ -1,4 +1,4 @@ -// check-pass +//@ check-pass trait Foo<'a, A>: Iterator { fn bar(&mut self) -> *const [A; N]; } diff --git a/tests/ui/const-generics/type-dependent/non-local.rs b/tests/ui/const-generics/type-dependent/non-local.rs index b755de30b9c..67e1015fc8b 100644 --- a/tests/ui/const-generics/type-dependent/non-local.rs +++ b/tests/ui/const-generics/type-dependent/non-local.rs @@ -1,5 +1,5 @@ -// aux-build:type_dependent_lib.rs -// run-pass +//@ aux-build:type_dependent_lib.rs +//@ run-pass extern crate type_dependent_lib; use type_dependent_lib::*; diff --git a/tests/ui/const-generics/type-dependent/qpath.rs b/tests/ui/const-generics/type-dependent/qpath.rs index 2d678d0acd3..88925115fe0 100644 --- a/tests/ui/const-generics/type-dependent/qpath.rs +++ b/tests/ui/const-generics/type-dependent/qpath.rs @@ -1,4 +1,4 @@ -// run-pass +//@ run-pass struct A; impl A { fn foo() -> usize { N + 1 } diff --git a/tests/ui/const-generics/type-dependent/simple.rs b/tests/ui/const-generics/type-dependent/simple.rs index 1b13133b5b9..c083b9288b3 100644 --- a/tests/ui/const-generics/type-dependent/simple.rs +++ b/tests/ui/const-generics/type-dependent/simple.rs @@ -1,4 +1,4 @@ -// run-pass +//@ run-pass struct R; impl R { diff --git a/tests/ui/const-generics/type-dependent/type-mismatch.rs b/tests/ui/const-generics/type-dependent/type-mismatch.rs index 3335ab870f4..6ed5fdca30a 100644 --- a/tests/ui/const-generics/type-dependent/type-mismatch.rs +++ b/tests/ui/const-generics/type-dependent/type-mismatch.rs @@ -1,4 +1,4 @@ -// revisions: full min +//@ revisions: full min struct R; impl R { diff --git a/tests/ui/const-generics/type_of_anon_const.rs b/tests/ui/const-generics/type_of_anon_const.rs index fb0d688a8ab..e9765d75697 100644 --- a/tests/ui/const-generics/type_of_anon_const.rs +++ b/tests/ui/const-generics/type_of_anon_const.rs @@ -1,4 +1,4 @@ -// run-pass +//@ run-pass trait T { fn l() -> usize; fn r() -> bool; diff --git a/tests/ui/const-generics/types-mismatch-const-args.rs b/tests/ui/const-generics/types-mismatch-const-args.rs index 43ef28b268f..d07accde8fc 100644 --- a/tests/ui/const-generics/types-mismatch-const-args.rs +++ b/tests/ui/const-generics/types-mismatch-const-args.rs @@ -1,4 +1,4 @@ -// revisions: full min +//@ revisions: full min #![cfg_attr(full, feature(generic_const_exprs))] #![cfg_attr(full, allow(incomplete_features))] diff --git a/tests/ui/const-generics/uninferred-consts-during-codegen-1.rs b/tests/ui/const-generics/uninferred-consts-during-codegen-1.rs index c7270e835c5..d5ce146394b 100644 --- a/tests/ui/const-generics/uninferred-consts-during-codegen-1.rs +++ b/tests/ui/const-generics/uninferred-consts-during-codegen-1.rs @@ -1,4 +1,4 @@ -// run-pass +//@ run-pass use std::fmt; diff --git a/tests/ui/const-generics/uninferred-consts-during-codegen-2.rs b/tests/ui/const-generics/uninferred-consts-during-codegen-2.rs index 191caa78f9e..f3a8c1b942e 100644 --- a/tests/ui/const-generics/uninferred-consts-during-codegen-2.rs +++ b/tests/ui/const-generics/uninferred-consts-during-codegen-2.rs @@ -1,4 +1,4 @@ -// run-pass +//@ run-pass use std::fmt; diff --git a/tests/ui/const-generics/unused-const-param.rs b/tests/ui/const-generics/unused-const-param.rs index c7f74cfac7d..41f7cec63c1 100644 --- a/tests/ui/const-generics/unused-const-param.rs +++ b/tests/ui/const-generics/unused-const-param.rs @@ -1,4 +1,4 @@ -// check-pass +//@ check-pass struct A; // ok diff --git a/tests/ui/const-generics/unused_braces.fixed b/tests/ui/const-generics/unused_braces.fixed index 4c1926387b9..45e70ade324 100644 --- a/tests/ui/const-generics/unused_braces.fixed +++ b/tests/ui/const-generics/unused_braces.fixed @@ -1,5 +1,5 @@ -// check-pass -// run-rustfix +//@ check-pass +//@ run-rustfix #![warn(unused_braces)] macro_rules! make_1 { diff --git a/tests/ui/const-generics/unused_braces.full.fixed b/tests/ui/const-generics/unused_braces.full.fixed index 46d57e0dcfc..902549b3142 100644 --- a/tests/ui/const-generics/unused_braces.full.fixed +++ b/tests/ui/const-generics/unused_braces.full.fixed @@ -1,6 +1,6 @@ -// check-pass -// run-rustfix -// revisions: full min +//@ check-pass +//@ run-rustfix +//@ revisions: full min #![cfg_attr(full, feature(const_generics))] #![cfg_attr(full, allow(incomplete_features))] diff --git a/tests/ui/const-generics/unused_braces.min.fixed b/tests/ui/const-generics/unused_braces.min.fixed index 46d57e0dcfc..902549b3142 100644 --- a/tests/ui/const-generics/unused_braces.min.fixed +++ b/tests/ui/const-generics/unused_braces.min.fixed @@ -1,6 +1,6 @@ -// check-pass -// run-rustfix -// revisions: full min +//@ check-pass +//@ run-rustfix +//@ revisions: full min #![cfg_attr(full, feature(const_generics))] #![cfg_attr(full, allow(incomplete_features))] diff --git a/tests/ui/const-generics/unused_braces.rs b/tests/ui/const-generics/unused_braces.rs index e9f15b40180..da1a4da0388 100644 --- a/tests/ui/const-generics/unused_braces.rs +++ b/tests/ui/const-generics/unused_braces.rs @@ -1,5 +1,5 @@ -// check-pass -// run-rustfix +//@ check-pass +//@ run-rustfix #![warn(unused_braces)] macro_rules! make_1 { diff --git a/tests/ui/const-generics/variant-discrimiant-no-generics.rs b/tests/ui/const-generics/variant-discrimiant-no-generics.rs index e286aa9a613..1228b917bb4 100644 --- a/tests/ui/const-generics/variant-discrimiant-no-generics.rs +++ b/tests/ui/const-generics/variant-discrimiant-no-generics.rs @@ -1,4 +1,4 @@ -// revisions: full min +//@ revisions: full min #![cfg_attr(full, feature(generic_const_exprs))] #![cfg_attr(full, allow(incomplete_features))] diff --git a/tests/ui/const-generics/where-clauses.rs b/tests/ui/const-generics/where-clauses.rs index aa3ca1cf6de..4a76f6e8ac7 100644 --- a/tests/ui/const-generics/where-clauses.rs +++ b/tests/ui/const-generics/where-clauses.rs @@ -1,4 +1,4 @@ -// check-pass +//@ check-pass trait Bar { fn bar() {} } trait Foo: Bar {} diff --git a/tests/ui/const-ptr/allowed_slices.rs b/tests/ui/const-ptr/allowed_slices.rs index 3561338a758..e5b9966c609 100644 --- a/tests/ui/const-ptr/allowed_slices.rs +++ b/tests/ui/const-ptr/allowed_slices.rs @@ -1,4 +1,4 @@ -// run-pass +//@ run-pass #![feature( slice_from_ptr_range, const_slice_from_ptr_range, diff --git a/tests/ui/const-ptr/forbidden_slices.rs b/tests/ui/const-ptr/forbidden_slices.rs index deab67f725a..85baeedf221 100644 --- a/tests/ui/const-ptr/forbidden_slices.rs +++ b/tests/ui/const-ptr/forbidden_slices.rs @@ -1,6 +1,6 @@ // Strip out raw byte dumps to make comparison platform-independent: -// normalize-stderr-test "(the raw bytes of the constant) \(size: [0-9]*, align: [0-9]*\)" -> "$1 (size: $$SIZE, align: $$ALIGN)" -// normalize-stderr-test "([0-9a-f][0-9a-f] |╾─*A(LLOC)?[0-9]+(\+[a-z0-9]+)?()?─*╼ )+ *│.*" -> "HEX_DUMP" +//@ normalize-stderr-test "(the raw bytes of the constant) \(size: [0-9]*, align: [0-9]*\)" -> "$1 (size: $$SIZE, align: $$ALIGN)" +//@ normalize-stderr-test "([0-9a-f][0-9a-f] |╾─*A(LLOC)?[0-9]+(\+[a-z0-9]+)?()?─*╼ )+ *│.*" -> "HEX_DUMP" #![feature( slice_from_ptr_range, diff --git a/tests/ui/const-ptr/out_of_bounds_read.rs b/tests/ui/const-ptr/out_of_bounds_read.rs index a371aa93c5e..312b53432b4 100644 --- a/tests/ui/const-ptr/out_of_bounds_read.rs +++ b/tests/ui/const-ptr/out_of_bounds_read.rs @@ -1,4 +1,4 @@ -// error-pattern: evaluation of constant value failed +//@ error-pattern: evaluation of constant value failed fn main() { use std::ptr; diff --git a/tests/ui/const_prop/apfloat-f64-roundtrip.rs b/tests/ui/const_prop/apfloat-f64-roundtrip.rs index 5f3ec931c82..4ad1680d292 100644 --- a/tests/ui/const_prop/apfloat-f64-roundtrip.rs +++ b/tests/ui/const_prop/apfloat-f64-roundtrip.rs @@ -1,5 +1,5 @@ -// run-pass -// compile-flags: -O -Zmir-opt-level=3 -Cno-prepopulate-passes +//@ run-pass +//@ compile-flags: -O -Zmir-opt-level=3 -Cno-prepopulate-passes // Regression test for a broken MIR optimization (issue #113407). pub fn main() { diff --git a/tests/ui/const_prop/apfloat-remainder-regression.rs b/tests/ui/const_prop/apfloat-remainder-regression.rs index 08932c333fd..f56003bbb99 100644 --- a/tests/ui/const_prop/apfloat-remainder-regression.rs +++ b/tests/ui/const_prop/apfloat-remainder-regression.rs @@ -1,5 +1,5 @@ -// run-pass -// compile-flags: -O -Zmir-opt-level=3 -Cno-prepopulate-passes +//@ run-pass +//@ compile-flags: -O -Zmir-opt-level=3 -Cno-prepopulate-passes // Regression test for a broken MIR optimization (issue #102403). pub fn f() -> f64 { diff --git a/tests/ui/const_prop/const-prop-ice.rs b/tests/ui/const_prop/const-prop-ice.rs index 5bffe020629..44c8af9ce8a 100644 --- a/tests/ui/const_prop/const-prop-ice.rs +++ b/tests/ui/const_prop/const-prop-ice.rs @@ -1,4 +1,4 @@ -// build-fail +//@ build-fail fn main() { [0; 3][3u64 as usize]; //~ ERROR this operation will panic at runtime diff --git a/tests/ui/const_prop/const-prop-ice2.rs b/tests/ui/const_prop/const-prop-ice2.rs index d533e394c06..1f28cb3106e 100644 --- a/tests/ui/const_prop/const-prop-ice2.rs +++ b/tests/ui/const_prop/const-prop-ice2.rs @@ -1,4 +1,4 @@ -// build-fail +//@ build-fail fn main() { enum Enum { One=1 } diff --git a/tests/ui/const_prop/const-prop-ice3.rs b/tests/ui/const_prop/const-prop-ice3.rs index 8ab011661e3..34b662922ae 100644 --- a/tests/ui/const_prop/const-prop-ice3.rs +++ b/tests/ui/const_prop/const-prop-ice3.rs @@ -1,4 +1,4 @@ -// run-pass (ensure that const-prop is run) +//@ run-pass (ensure that const-prop is run) struct A(T); diff --git a/tests/ui/const_prop/const-prop-overflowing-casts.rs b/tests/ui/const_prop/const-prop-overflowing-casts.rs index 8cc5b98250b..33189038a2c 100644 --- a/tests/ui/const_prop/const-prop-overflowing-casts.rs +++ b/tests/ui/const_prop/const-prop-overflowing-casts.rs @@ -1,4 +1,4 @@ -// check-pass +//@ check-pass enum Foo { Bar = -42, diff --git a/tests/ui/const_prop/dont-propagate-generic-instance-2.rs b/tests/ui/const_prop/dont-propagate-generic-instance-2.rs index e5525af23f0..768c9b3171a 100644 --- a/tests/ui/const_prop/dont-propagate-generic-instance-2.rs +++ b/tests/ui/const_prop/dont-propagate-generic-instance-2.rs @@ -1,4 +1,4 @@ -// run-pass +//@ run-pass #![feature(inline_const)] diff --git a/tests/ui/const_prop/dont-propagate-generic-instance.rs b/tests/ui/const_prop/dont-propagate-generic-instance.rs index 5994961b887..97f894dd9d7 100644 --- a/tests/ui/const_prop/dont-propagate-generic-instance.rs +++ b/tests/ui/const_prop/dont-propagate-generic-instance.rs @@ -1,4 +1,4 @@ -// run-pass +//@ run-pass // Makes sure we don't propagate generic instances of `Self: ?Sized` blanket impls. // This is relevant when we have an overlapping impl and builtin dyn instance. diff --git a/tests/ui/const_prop/ice-assert-fail-div-by-zero.rs b/tests/ui/const_prop/ice-assert-fail-div-by-zero.rs index 2afbf3432fb..b81f5177e1c 100644 --- a/tests/ui/const_prop/ice-assert-fail-div-by-zero.rs +++ b/tests/ui/const_prop/ice-assert-fail-div-by-zero.rs @@ -1,8 +1,8 @@ -// check-pass +//@ check-pass // need to emit MIR, because const prop (which emits `unconditional_panic`) only runs if // the `optimized_mir` query is run, which it isn't in check-only mode. -// compile-flags: --crate-type lib --emit=mir,link +//@ compile-flags: --crate-type lib --emit=mir,link #![warn(unconditional_panic)] diff --git a/tests/ui/const_prop/ice-issue-111353.rs b/tests/ui/const_prop/ice-issue-111353.rs index 99d1b792fea..2eba1a5e94e 100644 --- a/tests/ui/const_prop/ice-issue-111353.rs +++ b/tests/ui/const_prop/ice-issue-111353.rs @@ -1,4 +1,4 @@ -// build-pass +//@ build-pass #![crate_type = "lib"] #![feature(unsized_fn_params)] diff --git a/tests/ui/const_prop/ice-issue-96944.rs b/tests/ui/const_prop/ice-issue-96944.rs index 74baffddd8b..c6c453e938a 100644 --- a/tests/ui/const_prop/ice-issue-96944.rs +++ b/tests/ui/const_prop/ice-issue-96944.rs @@ -1,4 +1,4 @@ -// build-pass +//@ build-pass #![crate_type = "lib"] #![allow(arithmetic_overflow)] diff --git a/tests/ui/const_prop/inline_spans.rs b/tests/ui/const_prop/inline_spans.rs index 504f2781156..0126f194f69 100644 --- a/tests/ui/const_prop/inline_spans.rs +++ b/tests/ui/const_prop/inline_spans.rs @@ -1,5 +1,5 @@ -// build-pass -// compile-flags: -Zmir-opt-level=3 +//@ build-pass +//@ compile-flags: -Zmir-opt-level=3 // Overflow can't be detected by const prop // could only be detected after optimizations diff --git a/tests/ui/const_prop/inline_spans_lint_attribute.rs b/tests/ui/const_prop/inline_spans_lint_attribute.rs index 1db53d77193..b6c28922b22 100644 --- a/tests/ui/const_prop/inline_spans_lint_attribute.rs +++ b/tests/ui/const_prop/inline_spans_lint_attribute.rs @@ -1,6 +1,6 @@ // Must be build-pass, because check-pass will not run const prop and thus not emit the lint anyway. -// build-pass -// compile-flags: -Zmir-opt-level=3 +//@ build-pass +//@ compile-flags: -Zmir-opt-level=3 #![deny(warnings)] diff --git a/tests/ui/const_prop/issue-102553.rs b/tests/ui/const_prop/issue-102553.rs index 523a9d7ac72..2b04619e23b 100644 --- a/tests/ui/const_prop/issue-102553.rs +++ b/tests/ui/const_prop/issue-102553.rs @@ -1,5 +1,5 @@ -// compile-flags: --crate-type=lib -// check-pass +//@ compile-flags: --crate-type=lib +//@ check-pass pub trait Widget { fn boxed<'w>(self) -> Box + 'w> diff --git a/tests/ui/const_prop/issue-86351.rs b/tests/ui/const_prop/issue-86351.rs index b5f1e7f7449..2c9ad0c925f 100644 --- a/tests/ui/const_prop/issue-86351.rs +++ b/tests/ui/const_prop/issue-86351.rs @@ -1,5 +1,5 @@ -// compile-flags: --crate-type=lib -Zmir-opt-level=2 -// build-pass +//@ compile-flags: --crate-type=lib -Zmir-opt-level=2 +//@ build-pass // ^-- Must be build-pass, because check-pass will not run const prop. pub trait TestTrait { diff --git a/tests/ui/const_prop/overwrite_with_const_with_params.rs b/tests/ui/const_prop/overwrite_with_const_with_params.rs index 6f533919a47..9c963c5322b 100644 --- a/tests/ui/const_prop/overwrite_with_const_with_params.rs +++ b/tests/ui/const_prop/overwrite_with_const_with_params.rs @@ -1,5 +1,5 @@ -// compile-flags: -O -// run-pass +//@ compile-flags: -O +//@ run-pass // Regression test for https://github.com/rust-lang/rust/issues/118328 diff --git a/tests/ui/const_prop/unreachable-bounds.rs b/tests/ui/const_prop/unreachable-bounds.rs index 8cf98e154ea..8ed5da68220 100644 --- a/tests/ui/const_prop/unreachable-bounds.rs +++ b/tests/ui/const_prop/unreachable-bounds.rs @@ -1,5 +1,5 @@ // Use `build-pass` to ensure const-prop lint runs. -// build-pass +//@ build-pass fn main() { [()][if false { 1 } else { return }] diff --git a/tests/ui/const_prop/unreachable-overflow.rs b/tests/ui/const_prop/unreachable-overflow.rs index 2875135424d..25cc3db77fd 100644 --- a/tests/ui/const_prop/unreachable-overflow.rs +++ b/tests/ui/const_prop/unreachable-overflow.rs @@ -1,5 +1,5 @@ // Use `build-pass` to ensure const-prop lint runs. -// build-pass +//@ build-pass fn main() { let x = 2u32; diff --git a/tests/ui/const_prop/unsized-local-ice.rs b/tests/ui/const_prop/unsized-local-ice.rs index c725b3238ea..14d6eee9a2a 100644 --- a/tests/ui/const_prop/unsized-local-ice.rs +++ b/tests/ui/const_prop/unsized-local-ice.rs @@ -1,4 +1,4 @@ -// build-pass +//@ build-pass //! Regression test for . #![feature(unsized_fn_params)] diff --git a/tests/ui/consts/array-literal-index-oob.rs b/tests/ui/consts/array-literal-index-oob.rs index 67b49b1ba2b..ca56206fbdf 100644 --- a/tests/ui/consts/array-literal-index-oob.rs +++ b/tests/ui/consts/array-literal-index-oob.rs @@ -1,5 +1,5 @@ -// build-pass -// ignore-pass (test emits codegen-time warnings and verifies that they are not errors) +//@ build-pass +//@ ignore-pass (test emits codegen-time warnings and verifies that they are not errors) #![warn(unconditional_panic)] diff --git a/tests/ui/consts/array-to-slice-cast.rs b/tests/ui/consts/array-to-slice-cast.rs index 796f9d1b71f..633a356aa9e 100644 --- a/tests/ui/consts/array-to-slice-cast.rs +++ b/tests/ui/consts/array-to-slice-cast.rs @@ -1,4 +1,4 @@ -// check-pass +//@ check-pass fn main() {} diff --git a/tests/ui/consts/assoc-const.rs b/tests/ui/consts/assoc-const.rs index 021bcb40102..166a3da1518 100644 --- a/tests/ui/consts/assoc-const.rs +++ b/tests/ui/consts/assoc-const.rs @@ -1,4 +1,4 @@ -// run-pass +//@ run-pass #![allow(unused_variables)] trait Nat { diff --git a/tests/ui/consts/assoc_const_generic_impl.rs b/tests/ui/consts/assoc_const_generic_impl.rs index ba358628d15..5820a724d07 100644 --- a/tests/ui/consts/assoc_const_generic_impl.rs +++ b/tests/ui/consts/assoc_const_generic_impl.rs @@ -1,4 +1,4 @@ -// build-fail +//@ build-fail trait ZeroSized: Sized { const I_AM_ZERO_SIZED: (); diff --git a/tests/ui/consts/associated_const_generic.rs b/tests/ui/consts/associated_const_generic.rs index dee376cc17b..c385493a65d 100644 --- a/tests/ui/consts/associated_const_generic.rs +++ b/tests/ui/consts/associated_const_generic.rs @@ -1,4 +1,4 @@ -// check-pass +//@ check-pass trait TraitA { const VALUE: usize; diff --git a/tests/ui/consts/async-block.rs b/tests/ui/consts/async-block.rs index 78ec8aea724..40be4d195d4 100644 --- a/tests/ui/consts/async-block.rs +++ b/tests/ui/consts/async-block.rs @@ -1,7 +1,7 @@ // gate-test-const_async_blocks -// edition:2018 -// revisions: with_feature without_feature +//@ edition:2018 +//@ revisions: with_feature without_feature #![feature(rustc_attrs)] #![cfg_attr(with_feature, feature(const_async_blocks))] diff --git a/tests/ui/consts/bswap-const.rs b/tests/ui/consts/bswap-const.rs index 3145c21acc9..87b34fb88a5 100644 --- a/tests/ui/consts/bswap-const.rs +++ b/tests/ui/consts/bswap-const.rs @@ -1,4 +1,4 @@ -// run-pass +//@ run-pass #![feature(core_intrinsics)] diff --git a/tests/ui/consts/cast-discriminant-zst-enum.rs b/tests/ui/consts/cast-discriminant-zst-enum.rs index 2767f178fb6..c75db459c72 100644 --- a/tests/ui/consts/cast-discriminant-zst-enum.rs +++ b/tests/ui/consts/cast-discriminant-zst-enum.rs @@ -1,4 +1,4 @@ -// run-pass +//@ run-pass // Test a ZST enum whose dicriminant is ~0i128. This caused an ICE when casting to an i32. use std::hint::black_box; diff --git a/tests/ui/consts/chained-constants-stackoverflow.rs b/tests/ui/consts/chained-constants-stackoverflow.rs index a171567c5d2..0f0ce40a1ed 100644 --- a/tests/ui/consts/chained-constants-stackoverflow.rs +++ b/tests/ui/consts/chained-constants-stackoverflow.rs @@ -1,4 +1,4 @@ -// run-pass +//@ run-pass // https://github.com/rust-lang/rust/issues/34997 diff --git a/tests/ui/consts/check_const-feature-gated.rs b/tests/ui/consts/check_const-feature-gated.rs index f4faab1abc2..ef6c50ff507 100644 --- a/tests/ui/consts/check_const-feature-gated.rs +++ b/tests/ui/consts/check_const-feature-gated.rs @@ -1,4 +1,4 @@ -// run-pass +//@ run-pass const ARR: [usize; 1] = [2]; diff --git a/tests/ui/consts/closure-in-foreign-crate.rs b/tests/ui/consts/closure-in-foreign-crate.rs index fc8f480e706..701cf091045 100644 --- a/tests/ui/consts/closure-in-foreign-crate.rs +++ b/tests/ui/consts/closure-in-foreign-crate.rs @@ -1,5 +1,5 @@ -// aux-build:closure-in-foreign-crate.rs -// build-pass +//@ aux-build:closure-in-foreign-crate.rs +//@ build-pass extern crate closure_in_foreign_crate; diff --git a/tests/ui/consts/closure-structural-match-issue-90013.rs b/tests/ui/consts/closure-structural-match-issue-90013.rs index 1952ddb941e..7a5d9b69ee4 100644 --- a/tests/ui/consts/closure-structural-match-issue-90013.rs +++ b/tests/ui/consts/closure-structural-match-issue-90013.rs @@ -1,5 +1,5 @@ // Regression test for issue 90013. -// check-pass +//@ check-pass #![feature(inline_const)] fn main() { diff --git a/tests/ui/consts/const-address-of.rs b/tests/ui/consts/const-address-of.rs index ba162f2a2ba..4eb3c3840ba 100644 --- a/tests/ui/consts/const-address-of.rs +++ b/tests/ui/consts/const-address-of.rs @@ -1,4 +1,4 @@ -// check-pass +//@ check-pass #![feature(raw_ref_op)] diff --git a/tests/ui/consts/const-adt-align-mismatch.rs b/tests/ui/consts/const-adt-align-mismatch.rs index 89b3a9b744b..8faddbff30d 100644 --- a/tests/ui/consts/const-adt-align-mismatch.rs +++ b/tests/ui/consts/const-adt-align-mismatch.rs @@ -1,4 +1,4 @@ -// run-pass +//@ run-pass #![allow(dead_code)] #![allow(deprecated)] diff --git a/tests/ui/consts/const-autoderef.rs b/tests/ui/consts/const-autoderef.rs index 1c836318d32..36cbdfd4cc7 100644 --- a/tests/ui/consts/const-autoderef.rs +++ b/tests/ui/consts/const-autoderef.rs @@ -1,4 +1,4 @@ -// run-pass +//@ run-pass const A: [u8; 1] = ['h' as u8]; const B: u8 = (&A)[0]; diff --git a/tests/ui/consts/const-big-enum.rs b/tests/ui/consts/const-big-enum.rs index 2f21e8a6ddd..88d2f6172a2 100644 --- a/tests/ui/consts/const-big-enum.rs +++ b/tests/ui/consts/const-big-enum.rs @@ -1,4 +1,4 @@ -// run-pass +//@ run-pass enum Foo { Bar(u32), diff --git a/tests/ui/consts/const-binops.rs b/tests/ui/consts/const-binops.rs index d038dfeb419..546cc313327 100644 --- a/tests/ui/consts/const-binops.rs +++ b/tests/ui/consts/const-binops.rs @@ -1,4 +1,4 @@ -// run-pass +//@ run-pass macro_rules! assert_approx_eq { ($a:expr, $b:expr) => ({ diff --git a/tests/ui/consts/const-bitshift-rhs-inference.rs b/tests/ui/consts/const-bitshift-rhs-inference.rs index cf21c296cf3..23437a997e6 100644 --- a/tests/ui/consts/const-bitshift-rhs-inference.rs +++ b/tests/ui/consts/const-bitshift-rhs-inference.rs @@ -1,4 +1,4 @@ -// run-pass +//@ run-pass const RHS: u8 = 8; const IRHS: i8 = 8; const RHS16: u16 = 8; diff --git a/tests/ui/consts/const-block-const-bound.rs b/tests/ui/consts/const-block-const-bound.rs index 123e5cb1b3e..b0d5e19ad55 100644 --- a/tests/ui/consts/const-block-const-bound.rs +++ b/tests/ui/consts/const-block-const-bound.rs @@ -1,4 +1,4 @@ -// known-bug: #103507 +//@ known-bug: #103507 #![allow(unused)] #![feature(const_trait_impl, inline_const, negative_impls)] diff --git a/tests/ui/consts/const-block-cross-crate-fn.rs b/tests/ui/consts/const-block-cross-crate-fn.rs index 0ac3830d230..6094c1700fc 100644 --- a/tests/ui/consts/const-block-cross-crate-fn.rs +++ b/tests/ui/consts/const-block-cross-crate-fn.rs @@ -1,5 +1,5 @@ -// run-pass -// aux-build:cci_const_block.rs +//@ run-pass +//@ aux-build:cci_const_block.rs extern crate cci_const_block; diff --git a/tests/ui/consts/const-block-item-macro-codegen.rs b/tests/ui/consts/const-block-item-macro-codegen.rs index 7ad883686ae..ccafbcd541e 100644 --- a/tests/ui/consts/const-block-item-macro-codegen.rs +++ b/tests/ui/consts/const-block-item-macro-codegen.rs @@ -1,4 +1,4 @@ -// run-pass +//@ run-pass #![allow(dead_code)] // General test that function items in static blocks // can be generated with a macro. diff --git a/tests/ui/consts/const-block-item.rs b/tests/ui/consts/const-block-item.rs index a04f4db263b..e6d6b90290d 100644 --- a/tests/ui/consts/const-block-item.rs +++ b/tests/ui/consts/const-block-item.rs @@ -1,4 +1,4 @@ -// run-pass +//@ run-pass #![allow(unused_imports)] mod foo { diff --git a/tests/ui/consts/const-block-non-item-statement-3.rs b/tests/ui/consts/const-block-non-item-statement-3.rs index c513946d189..ba77e721c7f 100644 --- a/tests/ui/consts/const-block-non-item-statement-3.rs +++ b/tests/ui/consts/const-block-non-item-statement-3.rs @@ -1,4 +1,4 @@ -// run-pass +//@ run-pass #![allow(dead_code, unused)] type Array = [u32; { let x = 2; 5 }]; diff --git a/tests/ui/consts/const-block-non-item-statement-rpass.rs b/tests/ui/consts/const-block-non-item-statement-rpass.rs index 3e52eb50e75..a4576bd1b17 100644 --- a/tests/ui/consts/const-block-non-item-statement-rpass.rs +++ b/tests/ui/consts/const-block-non-item-statement-rpass.rs @@ -1,4 +1,4 @@ -// run-pass +//@ run-pass #![allow(dead_code, unused)] #[repr(u8)] diff --git a/tests/ui/consts/const-block-non-item-statement.rs b/tests/ui/consts/const-block-non-item-statement.rs index 07970b457a3..4cb55e3bde6 100644 --- a/tests/ui/consts/const-block-non-item-statement.rs +++ b/tests/ui/consts/const-block-non-item-statement.rs @@ -1,4 +1,4 @@ -// check-pass +//@ check-pass enum Foo { Bar = { let x = 1; 3 } diff --git a/tests/ui/consts/const-block.rs b/tests/ui/consts/const-block.rs index 40c7a7a1da9..326c86f5542 100644 --- a/tests/ui/consts/const-block.rs +++ b/tests/ui/consts/const-block.rs @@ -1,4 +1,4 @@ -// run-pass +//@ run-pass #![allow(unused_braces)] #![allow(dead_code)] #![allow(unused_unsafe)] diff --git a/tests/ui/consts/const-blocks/const-repeat.rs b/tests/ui/consts/const-blocks/const-repeat.rs index 65d02317d34..89dfbc3cbad 100644 --- a/tests/ui/consts/const-blocks/const-repeat.rs +++ b/tests/ui/consts/const-blocks/const-repeat.rs @@ -1,4 +1,4 @@ -// run-pass +//@ run-pass // Repeating a *constant* of non-Copy type (not just a constant expression) is already stable. diff --git a/tests/ui/consts/const-blocks/fn-call-in-const.rs b/tests/ui/consts/const-blocks/fn-call-in-const.rs index 20496f62712..9bf267b7de9 100644 --- a/tests/ui/consts/const-blocks/fn-call-in-const.rs +++ b/tests/ui/consts/const-blocks/fn-call-in-const.rs @@ -1,4 +1,4 @@ -// run-pass +//@ run-pass #![feature(inline_const)] #![allow(unused)] diff --git a/tests/ui/consts/const-blocks/migrate-pass.rs b/tests/ui/consts/const-blocks/migrate-pass.rs index fd66f5aa64f..308834bd646 100644 --- a/tests/ui/consts/const-blocks/migrate-pass.rs +++ b/tests/ui/consts/const-blocks/migrate-pass.rs @@ -1,4 +1,4 @@ -// check-pass +//@ check-pass #![allow(warnings)] // Some type that is not copyable. diff --git a/tests/ui/consts/const-blocks/nll-pass.rs b/tests/ui/consts/const-blocks/nll-pass.rs index fd66f5aa64f..308834bd646 100644 --- a/tests/ui/consts/const-blocks/nll-pass.rs +++ b/tests/ui/consts/const-blocks/nll-pass.rs @@ -1,4 +1,4 @@ -// check-pass +//@ check-pass #![allow(warnings)] // Some type that is not copyable. diff --git a/tests/ui/consts/const-blocks/run-pass.rs b/tests/ui/consts/const-blocks/run-pass.rs index e11f69babf7..e5c6bba40cb 100644 --- a/tests/ui/consts/const-blocks/run-pass.rs +++ b/tests/ui/consts/const-blocks/run-pass.rs @@ -1,4 +1,4 @@ -// run-pass +//@ run-pass #[derive(Debug, Eq, PartialEq)] struct Bar; diff --git a/tests/ui/consts/const-bound.rs b/tests/ui/consts/const-bound.rs index 735056a0ab0..682a2dcbbc6 100644 --- a/tests/ui/consts/const-bound.rs +++ b/tests/ui/consts/const-bound.rs @@ -1,9 +1,9 @@ -// run-pass +//@ run-pass #![allow(dead_code)] // Make sure const bounds work on things, and test that a few types // are const. -// pretty-expanded FIXME #23616 +//@ pretty-expanded FIXME #23616 fn foo(x: T) -> T { x } diff --git a/tests/ui/consts/const-byte-str-cast.rs b/tests/ui/consts/const-byte-str-cast.rs index 65d626c297f..c739e01a37a 100644 --- a/tests/ui/consts/const-byte-str-cast.rs +++ b/tests/ui/consts/const-byte-str-cast.rs @@ -1,4 +1,4 @@ -// run-pass +//@ run-pass #[deny(warnings)] pub fn main() { diff --git a/tests/ui/consts/const-cast-ptr-int.rs b/tests/ui/consts/const-cast-ptr-int.rs index 987d9616e91..68efc0c644c 100644 --- a/tests/ui/consts/const-cast-ptr-int.rs +++ b/tests/ui/consts/const-cast-ptr-int.rs @@ -1,4 +1,4 @@ -// run-pass +//@ run-pass #![allow(non_upper_case_globals)] use std::ptr; diff --git a/tests/ui/consts/const-cast.rs b/tests/ui/consts/const-cast.rs index abeb24121eb..9a4cce97e3e 100644 --- a/tests/ui/consts/const-cast.rs +++ b/tests/ui/consts/const-cast.rs @@ -1,4 +1,4 @@ -// run-pass +//@ run-pass #![allow(non_upper_case_globals)] struct TestStruct { diff --git a/tests/ui/consts/const-compare-bytes-ub.rs b/tests/ui/consts/const-compare-bytes-ub.rs index 2b4062fd22b..b357bab96a4 100644 --- a/tests/ui/consts/const-compare-bytes-ub.rs +++ b/tests/ui/consts/const-compare-bytes-ub.rs @@ -1,4 +1,4 @@ -// check-fail +//@ check-fail #![feature(core_intrinsics)] #![feature(const_intrinsic_compare_bytes)] diff --git a/tests/ui/consts/const-compare-bytes.rs b/tests/ui/consts/const-compare-bytes.rs index 74e29f81386..8596a2d9df9 100644 --- a/tests/ui/consts/const-compare-bytes.rs +++ b/tests/ui/consts/const-compare-bytes.rs @@ -1,4 +1,4 @@ -// run-pass +//@ run-pass #![feature(core_intrinsics)] #![feature(const_intrinsic_compare_bytes)] diff --git a/tests/ui/consts/const-const.rs b/tests/ui/consts/const-const.rs index 85e4a72e86d..bad2752a3af 100644 --- a/tests/ui/consts/const-const.rs +++ b/tests/ui/consts/const-const.rs @@ -1,4 +1,4 @@ -// run-pass +//@ run-pass #![allow(non_upper_case_globals)] const a: isize = 1; diff --git a/tests/ui/consts/const-contents.rs b/tests/ui/consts/const-contents.rs index 7ba3d435650..d486325796f 100644 --- a/tests/ui/consts/const-contents.rs +++ b/tests/ui/consts/const-contents.rs @@ -1,4 +1,4 @@ -// run-pass +//@ run-pass // Issue #570 #![allow(non_upper_case_globals)] diff --git a/tests/ui/consts/const-deref.rs b/tests/ui/consts/const-deref.rs index 6060d8e510e..21a5eb3b64d 100644 --- a/tests/ui/consts/const-deref.rs +++ b/tests/ui/consts/const-deref.rs @@ -1,4 +1,4 @@ -// run-pass +//@ run-pass const C: &'static isize = &1000; static D: isize = *C; diff --git a/tests/ui/consts/const-endianess.rs b/tests/ui/consts/const-endianess.rs index 936f31954d3..cfb9994843b 100644 --- a/tests/ui/consts/const-endianess.rs +++ b/tests/ui/consts/const-endianess.rs @@ -1,4 +1,4 @@ -// run-pass +//@ run-pass #![feature(test)] extern crate test; diff --git a/tests/ui/consts/const-enum-byref-self.rs b/tests/ui/consts/const-enum-byref-self.rs index b7e14bfb765..435d714ad83 100644 --- a/tests/ui/consts/const-enum-byref-self.rs +++ b/tests/ui/consts/const-enum-byref-self.rs @@ -1,4 +1,4 @@ -// run-pass +//@ run-pass #![allow(dead_code)] enum E { V, VV(isize) } diff --git a/tests/ui/consts/const-enum-byref.rs b/tests/ui/consts/const-enum-byref.rs index badf5294654..0284bb9d9ea 100644 --- a/tests/ui/consts/const-enum-byref.rs +++ b/tests/ui/consts/const-enum-byref.rs @@ -1,4 +1,4 @@ -// run-pass +//@ run-pass #![allow(dead_code)] enum E { V, VV(isize) } diff --git a/tests/ui/consts/const-enum-cast.rs b/tests/ui/consts/const-enum-cast.rs index 39968495144..adcfa7f0fe0 100644 --- a/tests/ui/consts/const-enum-cast.rs +++ b/tests/ui/consts/const-enum-cast.rs @@ -1,4 +1,4 @@ -// run-pass +//@ run-pass #![allow(non_upper_case_globals)] enum A { A1, A2 } diff --git a/tests/ui/consts/const-enum-ptr.rs b/tests/ui/consts/const-enum-ptr.rs index 84f4eb8406d..1e12c69428e 100644 --- a/tests/ui/consts/const-enum-ptr.rs +++ b/tests/ui/consts/const-enum-ptr.rs @@ -1,4 +1,4 @@ -// run-pass +//@ run-pass #![allow(dead_code)] enum E { V0, V1(isize) } diff --git a/tests/ui/consts/const-enum-struct.rs b/tests/ui/consts/const-enum-struct.rs index ee88c936188..60836a2b998 100644 --- a/tests/ui/consts/const-enum-struct.rs +++ b/tests/ui/consts/const-enum-struct.rs @@ -1,4 +1,4 @@ -// run-pass +//@ run-pass #![allow(dead_code)] enum E { V16(u16), V32(u32) } diff --git a/tests/ui/consts/const-enum-struct2.rs b/tests/ui/consts/const-enum-struct2.rs index 6dfe63d5d00..4512c93dca6 100644 --- a/tests/ui/consts/const-enum-struct2.rs +++ b/tests/ui/consts/const-enum-struct2.rs @@ -1,4 +1,4 @@ -// run-pass +//@ run-pass #![allow(dead_code)] enum E { V0, V16(u16) } diff --git a/tests/ui/consts/const-enum-structlike.rs b/tests/ui/consts/const-enum-structlike.rs index 0ea79aebce6..165dae6f5ff 100644 --- a/tests/ui/consts/const-enum-structlike.rs +++ b/tests/ui/consts/const-enum-structlike.rs @@ -1,4 +1,4 @@ -// run-pass +//@ run-pass #![allow(dead_code)] enum E { diff --git a/tests/ui/consts/const-enum-tuple.rs b/tests/ui/consts/const-enum-tuple.rs index e0363166b02..fe6b54aa793 100644 --- a/tests/ui/consts/const-enum-tuple.rs +++ b/tests/ui/consts/const-enum-tuple.rs @@ -1,4 +1,4 @@ -// run-pass +//@ run-pass #![allow(dead_code)] enum E { V16(u16), V32(u32) } diff --git a/tests/ui/consts/const-enum-tuple2.rs b/tests/ui/consts/const-enum-tuple2.rs index ef378b5995d..713209943d3 100644 --- a/tests/ui/consts/const-enum-tuple2.rs +++ b/tests/ui/consts/const-enum-tuple2.rs @@ -1,4 +1,4 @@ -// run-pass +//@ run-pass #![allow(dead_code)] enum E { V0, V16(u16) } diff --git a/tests/ui/consts/const-enum-tuplestruct.rs b/tests/ui/consts/const-enum-tuplestruct.rs index f93945c6a68..f2363bf03cd 100644 --- a/tests/ui/consts/const-enum-tuplestruct.rs +++ b/tests/ui/consts/const-enum-tuplestruct.rs @@ -1,4 +1,4 @@ -// run-pass +//@ run-pass #![allow(dead_code)] enum E { V16(u16), V32(u32) } diff --git a/tests/ui/consts/const-enum-tuplestruct2.rs b/tests/ui/consts/const-enum-tuplestruct2.rs index b8aa9a3152f..dc445323695 100644 --- a/tests/ui/consts/const-enum-tuplestruct2.rs +++ b/tests/ui/consts/const-enum-tuplestruct2.rs @@ -1,4 +1,4 @@ -// run-pass +//@ run-pass #![allow(dead_code)] enum E { V0, V16(u16) } diff --git a/tests/ui/consts/const-enum-vec-index.rs b/tests/ui/consts/const-enum-vec-index.rs index 3f155340ab5..313d35ff6e0 100644 --- a/tests/ui/consts/const-enum-vec-index.rs +++ b/tests/ui/consts/const-enum-vec-index.rs @@ -1,4 +1,4 @@ -// run-pass +//@ run-pass #[derive(Copy, Clone)] enum E { V1(isize), V0 } diff --git a/tests/ui/consts/const-enum-vec-ptr.rs b/tests/ui/consts/const-enum-vec-ptr.rs index 43ffe6570dc..3ae58dfa7b7 100644 --- a/tests/ui/consts/const-enum-vec-ptr.rs +++ b/tests/ui/consts/const-enum-vec-ptr.rs @@ -1,4 +1,4 @@ -// run-pass +//@ run-pass enum E { V1(isize), V0 } static C: &'static [E] = &[E::V0, E::V1(0xDEADBEE), E::V0]; diff --git a/tests/ui/consts/const-enum-vector.rs b/tests/ui/consts/const-enum-vector.rs index ee3739f9723..23658fa2155 100644 --- a/tests/ui/consts/const-enum-vector.rs +++ b/tests/ui/consts/const-enum-vector.rs @@ -1,4 +1,4 @@ -// run-pass +//@ run-pass enum E { V1(isize), V0 } static C: [E; 3] = [E::V0, E::V1(0xDEADBEE), E::V0]; diff --git a/tests/ui/consts/const-err-late.rs b/tests/ui/consts/const-err-late.rs index d2476e49346..6dff2c101a0 100644 --- a/tests/ui/consts/const-err-late.rs +++ b/tests/ui/consts/const-err-late.rs @@ -1,5 +1,5 @@ -// build-fail -// compile-flags: -C overflow-checks=on +//@ build-fail +//@ compile-flags: -C overflow-checks=on #![allow(arithmetic_overflow, unconditional_panic)] diff --git a/tests/ui/consts/const-err-rpass.rs b/tests/ui/consts/const-err-rpass.rs index e7fa10a2a11..b526ef76eee 100644 --- a/tests/ui/consts/const-err-rpass.rs +++ b/tests/ui/consts/const-err-rpass.rs @@ -1,4 +1,4 @@ -// run-pass +//@ run-pass #![allow(dead_code)] // check for const_err regressions diff --git a/tests/ui/consts/const-err2.rs b/tests/ui/consts/const-err2.rs index db49ec25aaa..67c85d35401 100644 --- a/tests/ui/consts/const-err2.rs +++ b/tests/ui/consts/const-err2.rs @@ -2,12 +2,12 @@ // optimized compilation and unoptimized compilation and thus would // lead to different lints being emitted -// revisions: noopt opt opt_with_overflow_checks -//[noopt]compile-flags: -C opt-level=0 -//[opt]compile-flags: -O -//[opt_with_overflow_checks]compile-flags: -C overflow-checks=on -O +//@ revisions: noopt opt opt_with_overflow_checks +//@[noopt]compile-flags: -C opt-level=0 +//@[opt]compile-flags: -O +//@[opt_with_overflow_checks]compile-flags: -C overflow-checks=on -O -// build-fail +//@ build-fail #![feature(rustc_attrs)] diff --git a/tests/ui/consts/const-eval/const-eval-query-stack.rs b/tests/ui/consts/const-eval/const-eval-query-stack.rs index 4eaff494783..53589bfd2ab 100644 --- a/tests/ui/consts/const-eval/const-eval-query-stack.rs +++ b/tests/ui/consts/const-eval/const-eval-query-stack.rs @@ -1,16 +1,16 @@ -// compile-flags: -Ztreat-err-as-bug=1 -// failure-status: 101 -// rustc-env:RUST_BACKTRACE=1 -// normalize-stderr-test "\nerror: .*unexpectedly panicked.*\n\n" -> "" -// normalize-stderr-test "note: we would appreciate a bug report.*\n\n" -> "" -// normalize-stderr-test "note: compiler flags.*\n\n" -> "" -// normalize-stderr-test "note: rustc.*running on.*\n\n" -> "" -// normalize-stderr-test "thread.*panicked.*:\n.*\n" -> "" -// normalize-stderr-test "stack backtrace:\n" -> "" -// normalize-stderr-test "\s\d{1,}: .*\n" -> "" -// normalize-stderr-test "\s at .*\n" -> "" -// normalize-stderr-test ".*note: Some details.*\n" -> "" -// normalize-stderr-test ".*omitted \d{1,} frame.*\n" -> "" +//@ compile-flags: -Ztreat-err-as-bug=1 +//@ failure-status: 101 +//@ rustc-env:RUST_BACKTRACE=1 +//@ normalize-stderr-test "\nerror: .*unexpectedly panicked.*\n\n" -> "" +//@ normalize-stderr-test "note: we would appreciate a bug report.*\n\n" -> "" +//@ normalize-stderr-test "note: compiler flags.*\n\n" -> "" +//@ normalize-stderr-test "note: rustc.*running on.*\n\n" -> "" +//@ normalize-stderr-test "thread.*panicked.*:\n.*\n" -> "" +//@ normalize-stderr-test "stack backtrace:\n" -> "" +//@ normalize-stderr-test "\s\d{1,}: .*\n" -> "" +//@ normalize-stderr-test "\s at .*\n" -> "" +//@ normalize-stderr-test ".*note: Some details.*\n" -> "" +//@ normalize-stderr-test ".*omitted \d{1,} frame.*\n" -> "" #![allow(unconditional_panic)] const X: i32 = 1 / 0; //~ERROR constant diff --git a/tests/ui/consts/const-eval/const-pointer-values-in-various-types.rs b/tests/ui/consts/const-eval/const-pointer-values-in-various-types.rs index 45eed9d842a..d6b6d427807 100644 --- a/tests/ui/consts/const-eval/const-pointer-values-in-various-types.rs +++ b/tests/ui/consts/const-eval/const-pointer-values-in-various-types.rs @@ -1,5 +1,5 @@ -// only-x86_64 -// stderr-per-bitwidth +//@ only-x86_64 +//@ stderr-per-bitwidth #[repr(C)] union Nonsense { diff --git a/tests/ui/consts/const-eval/const_fn_ptr.rs b/tests/ui/consts/const-eval/const_fn_ptr.rs index b3c677c6984..f8a2658f31e 100644 --- a/tests/ui/consts/const-eval/const_fn_ptr.rs +++ b/tests/ui/consts/const-eval/const_fn_ptr.rs @@ -1,5 +1,5 @@ -// run-pass -// compile-flags: -Zunleash-the-miri-inside-of-you +//@ run-pass +//@ compile-flags: -Zunleash-the-miri-inside-of-you fn double(x: usize) -> usize { x * 2 } const fn double_const(x: usize) -> usize { x * 2 } diff --git a/tests/ui/consts/const-eval/const_fn_ptr_fail.rs b/tests/ui/consts/const-eval/const_fn_ptr_fail.rs index 1896eba82f2..a0f804722db 100644 --- a/tests/ui/consts/const-eval/const_fn_ptr_fail.rs +++ b/tests/ui/consts/const-eval/const_fn_ptr_fail.rs @@ -1,5 +1,5 @@ -// run-pass -// compile-flags: -Zunleash-the-miri-inside-of-you +//@ run-pass +//@ compile-flags: -Zunleash-the-miri-inside-of-you #![allow(unused)] fn double(x: usize) -> usize { x * 2 } diff --git a/tests/ui/consts/const-eval/const_fn_ptr_fail2.rs b/tests/ui/consts/const-eval/const_fn_ptr_fail2.rs index b873940c4b3..87f8b52a650 100644 --- a/tests/ui/consts/const-eval/const_fn_ptr_fail2.rs +++ b/tests/ui/consts/const-eval/const_fn_ptr_fail2.rs @@ -1,4 +1,4 @@ -// compile-flags: -Zunleash-the-miri-inside-of-you +//@ compile-flags: -Zunleash-the-miri-inside-of-you fn double(x: usize) -> usize { x * 2 diff --git a/tests/ui/consts/const-eval/const_fn_target_feature.rs b/tests/ui/consts/const-eval/const_fn_target_feature.rs index 5d02ce3f21b..b56b68a5795 100644 --- a/tests/ui/consts/const-eval/const_fn_target_feature.rs +++ b/tests/ui/consts/const-eval/const_fn_target_feature.rs @@ -1,5 +1,5 @@ -// only-x86_64 -// compile-flags:-C target-feature=+ssse3 +//@ only-x86_64 +//@ compile-flags:-C target-feature=+ssse3 #![crate_type = "lib"] diff --git a/tests/ui/consts/const-eval/const_fn_target_feature_wasm.rs b/tests/ui/consts/const-eval/const_fn_target_feature_wasm.rs index c1460fdd9ec..deed09e4b2a 100644 --- a/tests/ui/consts/const-eval/const_fn_target_feature_wasm.rs +++ b/tests/ui/consts/const-eval/const_fn_target_feature_wasm.rs @@ -1,6 +1,6 @@ -// only-wasm32 -// compile-flags:-C target-feature=-simd128 -// build-pass +//@ only-wasm32 +//@ compile-flags:-C target-feature=-simd128 +//@ build-pass #![crate_type = "lib"] diff --git a/tests/ui/consts/const-eval/const_panic_2021.rs b/tests/ui/consts/const-eval/const_panic_2021.rs index 4702aa2f5f0..31a80e71b7c 100644 --- a/tests/ui/consts/const-eval/const_panic_2021.rs +++ b/tests/ui/consts/const-eval/const_panic_2021.rs @@ -1,4 +1,4 @@ -// edition:2021 +//@ edition:2021 #![crate_type = "lib"] const MSG: &str = "hello"; diff --git a/tests/ui/consts/const-eval/const_panic_stability.rs b/tests/ui/consts/const-eval/const_panic_stability.rs index 1aee6f27e27..c49f6dc6fd6 100644 --- a/tests/ui/consts/const-eval/const_panic_stability.rs +++ b/tests/ui/consts/const-eval/const_panic_stability.rs @@ -1,7 +1,7 @@ -// revisions: e2018 e2021 -//[e2018] edition:2018 -//[e2021] edition:2021 -//[e2018] check-pass +//@ revisions: e2018 e2021 +//@[e2018] edition:2018 +//@[e2021] edition:2021 +//@[e2018] check-pass #![crate_type = "lib"] #![stable(feature = "foo", since = "1.0.0")] #![feature(staged_api)] diff --git a/tests/ui/consts/const-eval/const_prop_errors.rs b/tests/ui/consts/const-eval/const_prop_errors.rs index f9a36d37943..4580944e1bc 100644 --- a/tests/ui/consts/const-eval/const_prop_errors.rs +++ b/tests/ui/consts/const-eval/const_prop_errors.rs @@ -1,4 +1,4 @@ -// check-pass +//@ check-pass pub trait Foo { fn foo(self) -> u32; diff --git a/tests/ui/consts/const-eval/const_signed_pat.rs b/tests/ui/consts/const-eval/const_signed_pat.rs index c61239bb677..822cec2eaa7 100644 --- a/tests/ui/consts/const-eval/const_signed_pat.rs +++ b/tests/ui/consts/const-eval/const_signed_pat.rs @@ -1,4 +1,4 @@ -// check-pass +//@ check-pass fn main() { const MIN: i8 = -5; diff --git a/tests/ui/consts/const-eval/dont_promote_unstable_const_fn_cross_crate.rs b/tests/ui/consts/const-eval/dont_promote_unstable_const_fn_cross_crate.rs index ea35f46807a..24b9b3123e1 100644 --- a/tests/ui/consts/const-eval/dont_promote_unstable_const_fn_cross_crate.rs +++ b/tests/ui/consts/const-eval/dont_promote_unstable_const_fn_cross_crate.rs @@ -1,4 +1,4 @@ -// aux-build:stability.rs +//@ aux-build:stability.rs extern crate stability; diff --git a/tests/ui/consts/const-eval/double_check.rs b/tests/ui/consts/const-eval/double_check.rs index 56ca0aa1f15..12738e59d7f 100644 --- a/tests/ui/consts/const-eval/double_check.rs +++ b/tests/ui/consts/const-eval/double_check.rs @@ -1,4 +1,4 @@ -// check-pass +//@ check-pass enum Foo { A = 5, diff --git a/tests/ui/consts/const-eval/double_check2.rs b/tests/ui/consts/const-eval/double_check2.rs index 81f5dde450b..228efec2879 100644 --- a/tests/ui/consts/const-eval/double_check2.rs +++ b/tests/ui/consts/const-eval/double_check2.rs @@ -1,4 +1,4 @@ -// check-pass +//@ check-pass // This test exhibits undefined behavior, but it is very expensive and complex to check for such // UB in constants. diff --git a/tests/ui/consts/const-eval/duration_conversion.rs b/tests/ui/consts/const-eval/duration_conversion.rs index 87b12937dd4..874200326e8 100644 --- a/tests/ui/consts/const-eval/duration_conversion.rs +++ b/tests/ui/consts/const-eval/duration_conversion.rs @@ -1,4 +1,4 @@ -// check-pass +//@ check-pass use std::time::Duration; diff --git a/tests/ui/consts/const-eval/enum_discr.rs b/tests/ui/consts/const-eval/enum_discr.rs index e09258f1120..d3401b36a8d 100644 --- a/tests/ui/consts/const-eval/enum_discr.rs +++ b/tests/ui/consts/const-eval/enum_discr.rs @@ -1,4 +1,4 @@ -// run-pass +//@ run-pass enum Foo { X = 42, diff --git a/tests/ui/consts/const-eval/extern_fat_pointer.rs b/tests/ui/consts/const-eval/extern_fat_pointer.rs index d91d07827dc..d03415aa269 100644 --- a/tests/ui/consts/const-eval/extern_fat_pointer.rs +++ b/tests/ui/consts/const-eval/extern_fat_pointer.rs @@ -1,4 +1,4 @@ -// check-pass +//@ check-pass #![feature(extern_types)] diff --git a/tests/ui/consts/const-eval/heap/alloc_intrinsic_nontransient.rs b/tests/ui/consts/const-eval/heap/alloc_intrinsic_nontransient.rs index 6bc5faac532..0c292ec5af7 100644 --- a/tests/ui/consts/const-eval/heap/alloc_intrinsic_nontransient.rs +++ b/tests/ui/consts/const-eval/heap/alloc_intrinsic_nontransient.rs @@ -1,4 +1,4 @@ -// run-pass +//@ run-pass #![feature(core_intrinsics)] #![feature(const_heap)] #![feature(const_mut_refs)] diff --git a/tests/ui/consts/const-eval/heap/alloc_intrinsic_transient.rs b/tests/ui/consts/const-eval/heap/alloc_intrinsic_transient.rs index 92193bb33e2..1ba20f908ea 100644 --- a/tests/ui/consts/const-eval/heap/alloc_intrinsic_transient.rs +++ b/tests/ui/consts/const-eval/heap/alloc_intrinsic_transient.rs @@ -1,4 +1,4 @@ -// run-pass +//@ run-pass #![feature(core_intrinsics)] #![feature(const_heap)] #![feature(const_mut_refs)] diff --git a/tests/ui/consts/const-eval/heap/alloc_intrinsic_uninit.rs b/tests/ui/consts/const-eval/heap/alloc_intrinsic_uninit.rs index b53c9ac7a2c..ed483bccc1f 100644 --- a/tests/ui/consts/const-eval/heap/alloc_intrinsic_uninit.rs +++ b/tests/ui/consts/const-eval/heap/alloc_intrinsic_uninit.rs @@ -1,4 +1,4 @@ -// stderr-per-bitwidth +//@ stderr-per-bitwidth // compile-test #![feature(core_intrinsics)] #![feature(const_heap)] diff --git a/tests/ui/consts/const-eval/heap/alloc_intrinsic_zero_sized.rs b/tests/ui/consts/const-eval/heap/alloc_intrinsic_zero_sized.rs index 407e69d41a0..6c4fca35626 100644 --- a/tests/ui/consts/const-eval/heap/alloc_intrinsic_zero_sized.rs +++ b/tests/ui/consts/const-eval/heap/alloc_intrinsic_zero_sized.rs @@ -1,4 +1,4 @@ -// run-pass +//@ run-pass #![feature(core_intrinsics)] #![feature(const_heap)] #![feature(inline_const)] diff --git a/tests/ui/consts/const-eval/heap/dealloc_intrinsic.rs b/tests/ui/consts/const-eval/heap/dealloc_intrinsic.rs index aac90cd54cc..345fc096ca1 100644 --- a/tests/ui/consts/const-eval/heap/dealloc_intrinsic.rs +++ b/tests/ui/consts/const-eval/heap/dealloc_intrinsic.rs @@ -1,4 +1,4 @@ -// run-pass +//@ run-pass #![feature(core_intrinsics)] #![feature(const_heap)] #![feature(const_mut_refs)] diff --git a/tests/ui/consts/const-eval/heap/dealloc_intrinsic_zero_sized.rs b/tests/ui/consts/const-eval/heap/dealloc_intrinsic_zero_sized.rs index 84fb4d2ea87..146a87862e8 100644 --- a/tests/ui/consts/const-eval/heap/dealloc_intrinsic_zero_sized.rs +++ b/tests/ui/consts/const-eval/heap/dealloc_intrinsic_zero_sized.rs @@ -1,4 +1,4 @@ -// run-pass +//@ run-pass #![feature(core_intrinsics)] #![feature(const_heap)] #![feature(inline_const)] diff --git a/tests/ui/consts/const-eval/ice-generic-assoc-const.rs b/tests/ui/consts/const-eval/ice-generic-assoc-const.rs index e514682af9c..d758435bb20 100644 --- a/tests/ui/consts/const-eval/ice-generic-assoc-const.rs +++ b/tests/ui/consts/const-eval/ice-generic-assoc-const.rs @@ -1,4 +1,4 @@ -// build-pass (tests post-monomorphisation failure) +//@ build-pass (tests post-monomorphisation failure) #![crate_type = "lib"] pub trait Nullable { diff --git a/tests/ui/consts/const-eval/ice-packed.rs b/tests/ui/consts/const-eval/ice-packed.rs index 4758a5a9d56..96be67bd7ca 100644 --- a/tests/ui/consts/const-eval/ice-packed.rs +++ b/tests/ui/consts/const-eval/ice-packed.rs @@ -1,7 +1,7 @@ // Regression test for #50356: Compiler panic when using repr(packed) // associated constant in a match arm -// check-pass +//@ check-pass #[derive(Copy, Clone, PartialEq, Eq)] #[repr(packed)] pub struct Num(u64); diff --git a/tests/ui/consts/const-eval/index-out-of-bounds-never-type.rs b/tests/ui/consts/const-eval/index-out-of-bounds-never-type.rs index bc2ea3f18fa..25ffc9cbdba 100644 --- a/tests/ui/consts/const-eval/index-out-of-bounds-never-type.rs +++ b/tests/ui/consts/const-eval/index-out-of-bounds-never-type.rs @@ -1,4 +1,4 @@ -// build-fail +//@ build-fail // Regression test for #66975 #![warn(unconditional_panic)] diff --git a/tests/ui/consts/const-eval/index_out_of_bounds_propagated.rs b/tests/ui/consts/const-eval/index_out_of_bounds_propagated.rs index 608e6e112a1..112c7415076 100644 --- a/tests/ui/consts/const-eval/index_out_of_bounds_propagated.rs +++ b/tests/ui/consts/const-eval/index_out_of_bounds_propagated.rs @@ -1,4 +1,4 @@ -// build-fail +//@ build-fail fn main() { let array = [std::env::args().len()]; diff --git a/tests/ui/consts/const-eval/infinite_loop.rs b/tests/ui/consts/const-eval/infinite_loop.rs index 9bdb9929bec..44456f1ce47 100644 --- a/tests/ui/consts/const-eval/infinite_loop.rs +++ b/tests/ui/consts/const-eval/infinite_loop.rs @@ -2,7 +2,7 @@ //! 1. we error if a const evaluation hits the deny-by-default lint limit //! 2. we do not ICE on invalid follow-up code -// compile-flags: -Z tiny-const-eval-limit +//@ compile-flags: -Z tiny-const-eval-limit fn main() { // Tests the Collatz conjecture with an incorrect base case (0 instead of 1). diff --git a/tests/ui/consts/const-eval/issue-100878.rs b/tests/ui/consts/const-eval/issue-100878.rs index bd56f854c8b..5a0bc5fc28d 100644 --- a/tests/ui/consts/const-eval/issue-100878.rs +++ b/tests/ui/consts/const-eval/issue-100878.rs @@ -1,6 +1,6 @@ // This checks that the const-eval ICE in issue #100878 does not recur. // -// build-pass +//@ build-pass #[allow(arithmetic_overflow)] pub fn bitshift_data(data: [u8; 1]) -> u8 { diff --git a/tests/ui/consts/const-eval/issue-114994-fail.rs b/tests/ui/consts/const-eval/issue-114994-fail.rs index 72350464091..1b9abec3571 100644 --- a/tests/ui/consts/const-eval/issue-114994-fail.rs +++ b/tests/ui/consts/const-eval/issue-114994-fail.rs @@ -1,7 +1,7 @@ // This checks that function pointer signatures that are referenced mutably // but contain a &mut T parameter still fail in a constant context: see issue #114994. // -// check-fail +//@ check-fail const fn use_mut_const_fn(_f: &mut fn(&mut String)) { //~ ERROR mutable references are not allowed in constant functions () diff --git a/tests/ui/consts/const-eval/issue-114994.rs b/tests/ui/consts/const-eval/issue-114994.rs index a4cb2e61e5f..5d99f265e62 100644 --- a/tests/ui/consts/const-eval/issue-114994.rs +++ b/tests/ui/consts/const-eval/issue-114994.rs @@ -1,7 +1,7 @@ // This checks that function pointer signatures containing &mut T types // work in a constant context: see issue #114994. // -// check-pass +//@ check-pass const fn use_const_fn(_f: fn(&mut String)) { () diff --git a/tests/ui/consts/const-eval/issue-44578.rs b/tests/ui/consts/const-eval/issue-44578.rs index e4dcc62302c..945bf93f8fa 100644 --- a/tests/ui/consts/const-eval/issue-44578.rs +++ b/tests/ui/consts/const-eval/issue-44578.rs @@ -1,4 +1,4 @@ -// build-fail +//@ build-fail trait Foo { const AMT: usize; diff --git a/tests/ui/consts/const-eval/issue-47971.rs b/tests/ui/consts/const-eval/issue-47971.rs index b98e76031d4..74eac963408 100644 --- a/tests/ui/consts/const-eval/issue-47971.rs +++ b/tests/ui/consts/const-eval/issue-47971.rs @@ -1,4 +1,4 @@ -// check-pass +//@ check-pass struct S(pub &'static u32, pub u32); diff --git a/tests/ui/consts/const-eval/issue-50706.rs b/tests/ui/consts/const-eval/issue-50706.rs index a13c27f2e78..a0eccb5d000 100644 --- a/tests/ui/consts/const-eval/issue-50706.rs +++ b/tests/ui/consts/const-eval/issue-50706.rs @@ -1,4 +1,4 @@ -// check-pass +//@ check-pass pub struct Stats; diff --git a/tests/ui/consts/const-eval/issue-50814-2.rs b/tests/ui/consts/const-eval/issue-50814-2.rs index 2eab93beb20..c2e2de67a65 100644 --- a/tests/ui/consts/const-eval/issue-50814-2.rs +++ b/tests/ui/consts/const-eval/issue-50814-2.rs @@ -1,6 +1,6 @@ -// build-fail -// revisions: normal mir-opt -// [mir-opt]compile-flags: -Zmir-opt-level=4 +//@ build-fail +//@ revisions: normal mir-opt +//@ [mir-opt]compile-flags: -Zmir-opt-level=4 trait C { const BOO: usize; diff --git a/tests/ui/consts/const-eval/issue-50814.rs b/tests/ui/consts/const-eval/issue-50814.rs index 374ed1d93df..ca26f51f111 100644 --- a/tests/ui/consts/const-eval/issue-50814.rs +++ b/tests/ui/consts/const-eval/issue-50814.rs @@ -1,4 +1,4 @@ -// build-fail +//@ build-fail trait Unsigned { const MAX: u8; diff --git a/tests/ui/consts/const-eval/issue-51300.rs b/tests/ui/consts/const-eval/issue-51300.rs index 8e68e8c9117..5e6ce350e60 100644 --- a/tests/ui/consts/const-eval/issue-51300.rs +++ b/tests/ui/consts/const-eval/issue-51300.rs @@ -1,4 +1,4 @@ -// check-pass +//@ check-pass // https://github.com/rust-lang/rust/issues/51300 #[derive(PartialEq, Eq, Clone, Copy)] diff --git a/tests/ui/consts/const-eval/issue-53157.rs b/tests/ui/consts/const-eval/issue-53157.rs index 850338625bc..b65cb604a04 100644 --- a/tests/ui/consts/const-eval/issue-53157.rs +++ b/tests/ui/consts/const-eval/issue-53157.rs @@ -1,4 +1,4 @@ -// check-pass +//@ check-pass macro_rules! m { () => {{ diff --git a/tests/ui/consts/const-eval/issue-53401.rs b/tests/ui/consts/const-eval/issue-53401.rs index 31c946c3cb7..8d3c15ea002 100644 --- a/tests/ui/consts/const-eval/issue-53401.rs +++ b/tests/ui/consts/const-eval/issue-53401.rs @@ -1,4 +1,4 @@ -// check-pass +//@ check-pass pub const STATIC_TRAIT: &dyn Test = &(); diff --git a/tests/ui/consts/const-eval/issue-55541.rs b/tests/ui/consts/const-eval/issue-55541.rs index fa5a493abde..21bc89c2dda 100644 --- a/tests/ui/consts/const-eval/issue-55541.rs +++ b/tests/ui/consts/const-eval/issue-55541.rs @@ -1,4 +1,4 @@ -// check-pass +//@ check-pass // Test that we can handle newtypes wrapping extern types diff --git a/tests/ui/consts/const-eval/issue-64908.rs b/tests/ui/consts/const-eval/issue-64908.rs index d2e09507284..5d5fdab790e 100644 --- a/tests/ui/consts/const-eval/issue-64908.rs +++ b/tests/ui/consts/const-eval/issue-64908.rs @@ -1,4 +1,4 @@ -// run-pass +//@ run-pass // This test verifies that the `ConstProp` pass doesn't cause an ICE when evaluating polymorphic // promoted MIR. diff --git a/tests/ui/consts/const-eval/issue-64970.rs b/tests/ui/consts/const-eval/issue-64970.rs index ba530438f9a..c7be311ce6b 100644 --- a/tests/ui/consts/const-eval/issue-64970.rs +++ b/tests/ui/consts/const-eval/issue-64970.rs @@ -1,4 +1,4 @@ -// run-pass +//@ run-pass fn main() { foo(10); diff --git a/tests/ui/consts/const-eval/issue-70804-fn-subtyping.rs b/tests/ui/consts/const-eval/issue-70804-fn-subtyping.rs index abd1d32abe2..8d96d247c19 100644 --- a/tests/ui/consts/const-eval/issue-70804-fn-subtyping.rs +++ b/tests/ui/consts/const-eval/issue-70804-fn-subtyping.rs @@ -1,4 +1,4 @@ -// check-pass +//@ check-pass const fn nested(x: (for<'a> fn(&'a ()), String)) -> (fn(&'static ()), String) { x diff --git a/tests/ui/consts/const-eval/issue-84957-const-str-as-bytes.rs b/tests/ui/consts/const-eval/issue-84957-const-str-as-bytes.rs index 7e235c4911c..885869bdab3 100644 --- a/tests/ui/consts/const-eval/issue-84957-const-str-as-bytes.rs +++ b/tests/ui/consts/const-eval/issue-84957-const-str-as-bytes.rs @@ -1,4 +1,4 @@ -// build-pass +//@ build-pass trait Foo {} diff --git a/tests/ui/consts/const-eval/issue-85155.rs b/tests/ui/consts/const-eval/issue-85155.rs index c3216d53d05..95253a0b288 100644 --- a/tests/ui/consts/const-eval/issue-85155.rs +++ b/tests/ui/consts/const-eval/issue-85155.rs @@ -8,8 +8,8 @@ // Therefore, its setup is reproduced with an aux crate, which will similarly trigger a PME // depending on the const argument value, like the `stdarch` intrinsics would. // -// aux-build: post_monomorphization_error.rs -// build-fail: this is a post-monomorphization error, it passes check runs and requires building +//@ aux-build: post_monomorphization_error.rs +//@ build-fail: this is a post-monomorphization error, it passes check runs and requires building // to actually fail. extern crate post_monomorphization_error; diff --git a/tests/ui/consts/const-eval/no_lint_for_statically_known_error.rs b/tests/ui/consts/const-eval/no_lint_for_statically_known_error.rs index 910ca3c4bcb..6dae6ff1b3d 100644 --- a/tests/ui/consts/const-eval/no_lint_for_statically_known_error.rs +++ b/tests/ui/consts/const-eval/no_lint_for_statically_known_error.rs @@ -1,4 +1,4 @@ -// check-pass +//@ check-pass // if `X` were used instead of `x`, `X - 10` would result in a lint. // This file should never produce a lint, no matter how the const diff --git a/tests/ui/consts/const-eval/nonnull_as_ref.rs b/tests/ui/consts/const-eval/nonnull_as_ref.rs index eb4683e2c30..003b28febff 100644 --- a/tests/ui/consts/const-eval/nonnull_as_ref.rs +++ b/tests/ui/consts/const-eval/nonnull_as_ref.rs @@ -1,4 +1,4 @@ -// check-pass +//@ check-pass use std::ptr::NonNull; diff --git a/tests/ui/consts/const-eval/nrvo.rs b/tests/ui/consts/const-eval/nrvo.rs index 22da96a3fc1..02288d8d60c 100644 --- a/tests/ui/consts/const-eval/nrvo.rs +++ b/tests/ui/consts/const-eval/nrvo.rs @@ -1,4 +1,4 @@ -// run-pass +//@ run-pass // When the NRVO is applied, the return place (`_0`) gets treated like a normal local. For example, // its address may be taken and it may be written to indirectly. Ensure that the const-eval diff --git a/tests/ui/consts/const-eval/panic-assoc-never-type.rs b/tests/ui/consts/const-eval/panic-assoc-never-type.rs index 88ce5b0d895..bdaa51494b9 100644 --- a/tests/ui/consts/const-eval/panic-assoc-never-type.rs +++ b/tests/ui/consts/const-eval/panic-assoc-never-type.rs @@ -1,4 +1,4 @@ -// build-fail +//@ build-fail // Regression test for #66975 #![feature(never_type)] diff --git a/tests/ui/consts/const-eval/promote-static.rs b/tests/ui/consts/const-eval/promote-static.rs index d3c663c53e9..53b5ab294d7 100644 --- a/tests/ui/consts/const-eval/promote-static.rs +++ b/tests/ui/consts/const-eval/promote-static.rs @@ -1,6 +1,6 @@ // regression test for #67609. -// check-pass +//@ check-pass static NONE: Option = None; diff --git a/tests/ui/consts/const-eval/promote_mutable_zst_mir_borrowck.rs b/tests/ui/consts/const-eval/promote_mutable_zst_mir_borrowck.rs index edda10e6e82..666bec83f62 100644 --- a/tests/ui/consts/const-eval/promote_mutable_zst_mir_borrowck.rs +++ b/tests/ui/consts/const-eval/promote_mutable_zst_mir_borrowck.rs @@ -1,4 +1,4 @@ -// check-pass +//@ check-pass pub fn main() { let y: &'static mut [u8; 0] = &mut []; diff --git a/tests/ui/consts/const-eval/promoted_errors.rs b/tests/ui/consts/const-eval/promoted_errors.rs index 5e67dc6f6c3..e806d4a3246 100644 --- a/tests/ui/consts/const-eval/promoted_errors.rs +++ b/tests/ui/consts/const-eval/promoted_errors.rs @@ -1,10 +1,10 @@ -// revisions: noopt opt opt_with_overflow_checks -//[noopt]compile-flags: -C opt-level=0 -//[opt]compile-flags: -O -//[opt_with_overflow_checks]compile-flags: -C overflow-checks=on -O +//@ revisions: noopt opt opt_with_overflow_checks +//@[noopt]compile-flags: -C opt-level=0 +//@[opt]compile-flags: -O +//@[opt_with_overflow_checks]compile-flags: -C overflow-checks=on -O -// build-pass -// ignore-pass (test emits codegen-time warnings and verifies that they are not errors) +//@ build-pass +//@ ignore-pass (test emits codegen-time warnings and verifies that they are not errors) //! This test ensures that when we promote code that fails to evaluate, the build still succeeds. diff --git a/tests/ui/consts/const-eval/raw-bytes.rs b/tests/ui/consts/const-eval/raw-bytes.rs index ae65a5cb8df..96903b322e4 100644 --- a/tests/ui/consts/const-eval/raw-bytes.rs +++ b/tests/ui/consts/const-eval/raw-bytes.rs @@ -1,7 +1,7 @@ -// stderr-per-bitwidth -// ignore-endian-big +//@ stderr-per-bitwidth +//@ ignore-endian-big // ignore-tidy-linelength -// normalize-stderr-test "╾─*ALLOC[0-9]+(\+[a-z0-9]+)?()?─*╼" -> "╾ALLOC_ID$1╼" +//@ normalize-stderr-test "╾─*ALLOC[0-9]+(\+[a-z0-9]+)?()?─*╼" -> "╾ALLOC_ID$1╼" #![feature(never_type, rustc_attrs, ptr_metadata, slice_from_ptr_range, const_slice_from_ptr_range)] #![allow(invalid_value)] diff --git a/tests/ui/consts/const-eval/ref_to_int_match.rs b/tests/ui/consts/const-eval/ref_to_int_match.rs index a2dabde25bc..c627ad97bb0 100644 --- a/tests/ui/consts/const-eval/ref_to_int_match.rs +++ b/tests/ui/consts/const-eval/ref_to_int_match.rs @@ -1,4 +1,4 @@ -// stderr-per-bitwidth +//@ stderr-per-bitwidth fn main() { let n: Int = 40; diff --git a/tests/ui/consts/const-eval/simd/insert_extract.rs b/tests/ui/consts/const-eval/simd/insert_extract.rs index 3472c05d12f..c0113904edf 100644 --- a/tests/ui/consts/const-eval/simd/insert_extract.rs +++ b/tests/ui/consts/const-eval/simd/insert_extract.rs @@ -1,4 +1,4 @@ -// run-pass +//@ run-pass #![feature(repr_simd)] #![feature(platform_intrinsics)] #![feature(staged_api)] diff --git a/tests/ui/consts/const-eval/simple_with_undef.rs b/tests/ui/consts/const-eval/simple_with_undef.rs index 1a416dd460d..990db4b29d7 100644 --- a/tests/ui/consts/const-eval/simple_with_undef.rs +++ b/tests/ui/consts/const-eval/simple_with_undef.rs @@ -1,4 +1,4 @@ -// check-pass +//@ check-pass const PARSE_BOOL: Option<&'static str> = None; static FOO: (Option<&str>, u32) = (PARSE_BOOL, 42); diff --git a/tests/ui/consts/const-eval/stable-metric/ctfe-fn-call.rs b/tests/ui/consts/const-eval/stable-metric/ctfe-fn-call.rs index a30518170ad..1e91f2c86fd 100644 --- a/tests/ui/consts/const-eval/stable-metric/ctfe-fn-call.rs +++ b/tests/ui/consts/const-eval/stable-metric/ctfe-fn-call.rs @@ -1,5 +1,5 @@ -// check-fail -// compile-flags: -Z tiny-const-eval-limit +//@ check-fail +//@ compile-flags: -Z tiny-const-eval-limit const fn foo() {} diff --git a/tests/ui/consts/const-eval/stable-metric/ctfe-labelled-loop.rs b/tests/ui/consts/const-eval/stable-metric/ctfe-labelled-loop.rs index f7cd04568be..602ca87d4cf 100644 --- a/tests/ui/consts/const-eval/stable-metric/ctfe-labelled-loop.rs +++ b/tests/ui/consts/const-eval/stable-metric/ctfe-labelled-loop.rs @@ -1,5 +1,5 @@ -// check-fail -// compile-flags: -Z tiny-const-eval-limit +//@ check-fail +//@ compile-flags: -Z tiny-const-eval-limit const fn labelled_loop(n: u32) -> u32 { let mut i = 0; diff --git a/tests/ui/consts/const-eval/stable-metric/ctfe-recursion.rs b/tests/ui/consts/const-eval/stable-metric/ctfe-recursion.rs index 56a39fc45b0..6570357063b 100644 --- a/tests/ui/consts/const-eval/stable-metric/ctfe-recursion.rs +++ b/tests/ui/consts/const-eval/stable-metric/ctfe-recursion.rs @@ -1,5 +1,5 @@ -// check-fail -// compile-flags: -Z tiny-const-eval-limit +//@ check-fail +//@ compile-flags: -Z tiny-const-eval-limit #[rustfmt::skip] const fn recurse(n: u32) -> u32 { diff --git a/tests/ui/consts/const-eval/stable-metric/ctfe-simple-loop.rs b/tests/ui/consts/const-eval/stable-metric/ctfe-simple-loop.rs index 214f33dfb36..42b93383c2b 100644 --- a/tests/ui/consts/const-eval/stable-metric/ctfe-simple-loop.rs +++ b/tests/ui/consts/const-eval/stable-metric/ctfe-simple-loop.rs @@ -1,9 +1,9 @@ -// check-pass -// revisions: warn allow +//@ check-pass +//@ revisions: warn allow #![cfg_attr(warn, warn(long_running_const_eval))] #![cfg_attr(allow, allow(long_running_const_eval))] -// compile-flags: -Z tiny-const-eval-limit +//@ compile-flags: -Z tiny-const-eval-limit const fn simple_loop(n: u32) -> u32 { let mut index = 0; while index < n { diff --git a/tests/ui/consts/const-eval/stable-metric/dominators-edge-case.rs b/tests/ui/consts/const-eval/stable-metric/dominators-edge-case.rs index 0b0f361809f..d87cf6b18d7 100644 --- a/tests/ui/consts/const-eval/stable-metric/dominators-edge-case.rs +++ b/tests/ui/consts/const-eval/stable-metric/dominators-edge-case.rs @@ -1,4 +1,4 @@ -// check-pass +//@ check-pass // // Exercising an edge case which was found during Stage 2 compilation. // Compilation would fail for this code when running the `CtfeLimit` diff --git a/tests/ui/consts/const-eval/strlen.rs b/tests/ui/consts/const-eval/strlen.rs index 7b14a523543..4ceb3b82ab3 100644 --- a/tests/ui/consts/const-eval/strlen.rs +++ b/tests/ui/consts/const-eval/strlen.rs @@ -1,4 +1,4 @@ -// run-pass +//@ run-pass const S: &str = "foo"; pub const B: &[u8] = S.as_bytes(); diff --git a/tests/ui/consts/const-eval/transmute-const.rs b/tests/ui/consts/const-eval/transmute-const.rs index d9d0a3aea07..bf25b52ed66 100644 --- a/tests/ui/consts/const-eval/transmute-const.rs +++ b/tests/ui/consts/const-eval/transmute-const.rs @@ -1,4 +1,4 @@ -// stderr-per-bitwidth +//@ stderr-per-bitwidth use std::mem; static FOO: bool = unsafe { mem::transmute(3u8) }; diff --git a/tests/ui/consts/const-eval/ub-enum.rs b/tests/ui/consts/const-eval/ub-enum.rs index c11ace612f1..71d450c014f 100644 --- a/tests/ui/consts/const-eval/ub-enum.rs +++ b/tests/ui/consts/const-eval/ub-enum.rs @@ -1,7 +1,7 @@ // Strip out raw byte dumps to make comparison platform-independent: -// normalize-stderr-test "(the raw bytes of the constant) \(size: [0-9]*, align: [0-9]*\)" -> "$1 (size: $$SIZE, align: $$ALIGN)" -// normalize-stderr-test "([0-9a-f][0-9a-f] |╾─*ALLOC[0-9]+(\+[a-z0-9]+)?()?─*╼ )+ *│.*" -> "HEX_DUMP" -// normalize-stderr-test "0x0+" -> "0x0" +//@ normalize-stderr-test "(the raw bytes of the constant) \(size: [0-9]*, align: [0-9]*\)" -> "$1 (size: $$SIZE, align: $$ALIGN)" +//@ normalize-stderr-test "([0-9a-f][0-9a-f] |╾─*ALLOC[0-9]+(\+[a-z0-9]+)?()?─*╼ )+ *│.*" -> "HEX_DUMP" +//@ normalize-stderr-test "0x0+" -> "0x0" #![feature(never_type)] #![allow(invalid_value)] diff --git a/tests/ui/consts/const-eval/ub-incorrect-vtable.rs b/tests/ui/consts/const-eval/ub-incorrect-vtable.rs index 7d1927253f2..11c3b2fe560 100644 --- a/tests/ui/consts/const-eval/ub-incorrect-vtable.rs +++ b/tests/ui/consts/const-eval/ub-incorrect-vtable.rs @@ -10,7 +10,7 @@ // ICEs as tracked by #86193. So we also use the transparent wrapper to verify proper validation // errors are emitted instead of ICEs. -// stderr-per-bitwidth +//@ stderr-per-bitwidth trait Trait {} diff --git a/tests/ui/consts/const-eval/ub-nonnull.rs b/tests/ui/consts/const-eval/ub-nonnull.rs index fe4ec4d23d0..229ce9a7df3 100644 --- a/tests/ui/consts/const-eval/ub-nonnull.rs +++ b/tests/ui/consts/const-eval/ub-nonnull.rs @@ -1,6 +1,6 @@ // Strip out raw byte dumps to make comparison platform-independent: -// normalize-stderr-test "(the raw bytes of the constant) \(size: [0-9]*, align: [0-9]*\)" -> "$1 (size: $$SIZE, align: $$ALIGN)" -// normalize-stderr-test "([0-9a-f][0-9a-f] |╾─*ALLOC[0-9]+(\+[a-z0-9]+)?─*╼ )+ *│.*" -> "HEX_DUMP" +//@ normalize-stderr-test "(the raw bytes of the constant) \(size: [0-9]*, align: [0-9]*\)" -> "$1 (size: $$SIZE, align: $$ALIGN)" +//@ normalize-stderr-test "([0-9a-f][0-9a-f] |╾─*ALLOC[0-9]+(\+[a-z0-9]+)?─*╼ )+ *│.*" -> "HEX_DUMP" #![feature(rustc_attrs, ptr_metadata)] #![allow(invalid_value)] // make sure we cannot allow away the errors tested here diff --git a/tests/ui/consts/const-eval/ub-ref-ptr.rs b/tests/ui/consts/const-eval/ub-ref-ptr.rs index 9e49e3de8bc..78dcd1c1f42 100644 --- a/tests/ui/consts/const-eval/ub-ref-ptr.rs +++ b/tests/ui/consts/const-eval/ub-ref-ptr.rs @@ -1,7 +1,7 @@ // ignore-tidy-linelength // Strip out raw byte dumps to make comparison platform-independent: -// normalize-stderr-test "(the raw bytes of the constant) \(size: [0-9]*, align: [0-9]*\)" -> "$1 (size: $$SIZE, align: $$ALIGN)" -// normalize-stderr-test "([0-9a-f][0-9a-f] |╾─*ALLOC[0-9]+(\+[a-z0-9]+)?()?─*╼ )+ *│.*" -> "HEX_DUMP" +//@ normalize-stderr-test "(the raw bytes of the constant) \(size: [0-9]*, align: [0-9]*\)" -> "$1 (size: $$SIZE, align: $$ALIGN)" +//@ normalize-stderr-test "([0-9a-f][0-9a-f] |╾─*ALLOC[0-9]+(\+[a-z0-9]+)?()?─*╼ )+ *│.*" -> "HEX_DUMP" #![allow(invalid_value)] use std::mem; diff --git a/tests/ui/consts/const-eval/ub-slice-get-unchecked.rs b/tests/ui/consts/const-eval/ub-slice-get-unchecked.rs index ebc5543b380..3800abddd42 100644 --- a/tests/ui/consts/const-eval/ub-slice-get-unchecked.rs +++ b/tests/ui/consts/const-eval/ub-slice-get-unchecked.rs @@ -1,4 +1,4 @@ -// known-bug: #110395 +//@ known-bug: #110395 #![feature(const_slice_index)] diff --git a/tests/ui/consts/const-eval/ub-uninhabit.rs b/tests/ui/consts/const-eval/ub-uninhabit.rs index 0eb9ab415d7..cd29c22262b 100644 --- a/tests/ui/consts/const-eval/ub-uninhabit.rs +++ b/tests/ui/consts/const-eval/ub-uninhabit.rs @@ -1,6 +1,6 @@ // Strip out raw byte dumps to make comparison platform-independent: -// normalize-stderr-test "(the raw bytes of the constant) \(size: [0-9]*, align: [0-9]*\)" -> "$1 (size: $$SIZE, align: $$ALIGN)" -// normalize-stderr-test "([0-9a-f][0-9a-f] |╾─*ALLOC[0-9]+(\+[a-z0-9]+)?()?─*╼ )+ *│.*" -> "HEX_DUMP" +//@ normalize-stderr-test "(the raw bytes of the constant) \(size: [0-9]*, align: [0-9]*\)" -> "$1 (size: $$SIZE, align: $$ALIGN)" +//@ normalize-stderr-test "([0-9a-f][0-9a-f] |╾─*ALLOC[0-9]+(\+[a-z0-9]+)?()?─*╼ )+ *│.*" -> "HEX_DUMP" #![feature(core_intrinsics)] #![feature(never_type)] diff --git a/tests/ui/consts/const-eval/ub-upvars.rs b/tests/ui/consts/const-eval/ub-upvars.rs index ceac5987031..817511180be 100644 --- a/tests/ui/consts/const-eval/ub-upvars.rs +++ b/tests/ui/consts/const-eval/ub-upvars.rs @@ -1,4 +1,4 @@ -// stderr-per-bitwidth +//@ stderr-per-bitwidth #![allow(invalid_value)] // make sure we cannot allow away the errors tested here use std::mem; diff --git a/tests/ui/consts/const-eval/ub-wide-ptr.rs b/tests/ui/consts/const-eval/ub-wide-ptr.rs index 3c1baab3e48..4c90d1c9840 100644 --- a/tests/ui/consts/const-eval/ub-wide-ptr.rs +++ b/tests/ui/consts/const-eval/ub-wide-ptr.rs @@ -4,10 +4,10 @@ use std::mem; // Strip out raw byte dumps to make comparison platform-independent: -// normalize-stderr-test "(the raw bytes of the constant) \(size: [0-9]*, align: [0-9]*\)" -> "$1 (size: $$SIZE, align: $$ALIGN)" -// normalize-stderr-test "([0-9a-f][0-9a-f] |╾─*ALLOC[0-9]+(\+[a-z0-9]+)?()?─*╼ )+ *│.*" -> "HEX_DUMP" -// normalize-stderr-test "offset \d+" -> "offset N" -// normalize-stderr-test "size \d+" -> "size N" +//@ normalize-stderr-test "(the raw bytes of the constant) \(size: [0-9]*, align: [0-9]*\)" -> "$1 (size: $$SIZE, align: $$ALIGN)" +//@ normalize-stderr-test "([0-9a-f][0-9a-f] |╾─*ALLOC[0-9]+(\+[a-z0-9]+)?()?─*╼ )+ *│.*" -> "HEX_DUMP" +//@ normalize-stderr-test "offset \d+" -> "offset N" +//@ normalize-stderr-test "size \d+" -> "size N" /// A newtype wrapper to prevent MIR generation from inserting reborrows that would affect the error diff --git a/tests/ui/consts/const-eval/union-ice.rs b/tests/ui/consts/const-eval/union-ice.rs index dd970a35562..1db9470912d 100644 --- a/tests/ui/consts/const-eval/union-ice.rs +++ b/tests/ui/consts/const-eval/union-ice.rs @@ -1,4 +1,4 @@ -// only-x86_64 +//@ only-x86_64 type Field1 = i32; type Field3 = i64; diff --git a/tests/ui/consts/const-eval/union-ub.rs b/tests/ui/consts/const-eval/union-ub.rs index 043870c9c25..5eb4ad4b47f 100644 --- a/tests/ui/consts/const-eval/union-ub.rs +++ b/tests/ui/consts/const-eval/union-ub.rs @@ -1,4 +1,4 @@ -// stderr-per-bitwidth +//@ stderr-per-bitwidth #[repr(C)] union DummyUnion { diff --git a/tests/ui/consts/const-eval/unused-broken-const-late.rs b/tests/ui/consts/const-eval/unused-broken-const-late.rs index a6528ec5fd6..c4916061f9e 100644 --- a/tests/ui/consts/const-eval/unused-broken-const-late.rs +++ b/tests/ui/consts/const-eval/unused-broken-const-late.rs @@ -1,5 +1,5 @@ -// build-fail -// compile-flags: -O +//@ build-fail +//@ compile-flags: -O //! Make sure we detect erroneous constants post-monomorphization even when they are unused. This is //! crucial, people rely on it for soundness. (https://github.com/rust-lang/rust/issues/112090) diff --git a/tests/ui/consts/const-eval/unused-broken-const.rs b/tests/ui/consts/const-eval/unused-broken-const.rs index 0d2776bc2e3..f7e229aa980 100644 --- a/tests/ui/consts/const-eval/unused-broken-const.rs +++ b/tests/ui/consts/const-eval/unused-broken-const.rs @@ -1,6 +1,6 @@ // make sure that an *unused* broken const triggers an error even in a check build -// compile-flags: --emit=dep-info,metadata +//@ compile-flags: --emit=dep-info,metadata const FOO: i32 = [][0]; //~^ ERROR evaluation of constant value failed diff --git a/tests/ui/consts/const-eval/valid-const.rs b/tests/ui/consts/const-eval/valid-const.rs index 5f47d1c4f5c..1c8c048ae28 100644 --- a/tests/ui/consts/const-eval/valid-const.rs +++ b/tests/ui/consts/const-eval/valid-const.rs @@ -1,4 +1,4 @@ -// check-pass +//@ check-pass // Some constants that *are* valid diff --git a/tests/ui/consts/const-eval/write-to-uninhabited-enum-variant.rs b/tests/ui/consts/const-eval/write-to-uninhabited-enum-variant.rs index cccb7879fc0..5628ae1be36 100644 --- a/tests/ui/consts/const-eval/write-to-uninhabited-enum-variant.rs +++ b/tests/ui/consts/const-eval/write-to-uninhabited-enum-variant.rs @@ -1,4 +1,4 @@ -// run-pass +//@ run-pass #![allow(dead_code)] diff --git a/tests/ui/consts/const-eval/zst_operand_eval.rs b/tests/ui/consts/const-eval/zst_operand_eval.rs index 5f7ddf7f758..e2892722e89 100644 --- a/tests/ui/consts/const-eval/zst_operand_eval.rs +++ b/tests/ui/consts/const-eval/zst_operand_eval.rs @@ -1,4 +1,4 @@ -// check-pass +//@ check-pass static ASSERT: () = [()][!(std::mem::size_of::() == 4) as usize]; diff --git a/tests/ui/consts/const-expr-addr-operator.rs b/tests/ui/consts/const-expr-addr-operator.rs index 37bf24c2fbe..f5f459bbd3e 100644 --- a/tests/ui/consts/const-expr-addr-operator.rs +++ b/tests/ui/consts/const-expr-addr-operator.rs @@ -1,5 +1,5 @@ // Encountered while testing #44614. -// build-pass (FIXME(62277): could be check-pass?) +//@ build-pass (FIXME(62277): could be check-pass?) pub fn main() { // Constant of generic type (int) diff --git a/tests/ui/consts/const-expr-in-fixed-length-vec.rs b/tests/ui/consts/const-expr-in-fixed-length-vec.rs index a9960b4552b..60b4895f5f9 100644 --- a/tests/ui/consts/const-expr-in-fixed-length-vec.rs +++ b/tests/ui/consts/const-expr-in-fixed-length-vec.rs @@ -1,8 +1,8 @@ -// run-pass +//@ run-pass // Check that constant expressions can be used for declaring the // type of a fixed length vector. -// pretty-expanded FIXME #23616 +//@ pretty-expanded FIXME #23616 pub fn main() { diff --git a/tests/ui/consts/const-expr-in-vec-repeat.rs b/tests/ui/consts/const-expr-in-vec-repeat.rs index 4eaef25059b..5345a1c4c42 100644 --- a/tests/ui/consts/const-expr-in-vec-repeat.rs +++ b/tests/ui/consts/const-expr-in-vec-repeat.rs @@ -1,7 +1,7 @@ -// run-pass +//@ run-pass // Check that constant expressions can be used in vec repeat syntax. -// pretty-expanded FIXME #23616 +//@ pretty-expanded FIXME #23616 pub fn main() { diff --git a/tests/ui/consts/const-extern-fn/const-extern-fn.rs b/tests/ui/consts/const-extern-fn/const-extern-fn.rs index 2ce2eafd545..57f5da8d0af 100644 --- a/tests/ui/consts/const-extern-fn/const-extern-fn.rs +++ b/tests/ui/consts/const-extern-fn/const-extern-fn.rs @@ -1,4 +1,4 @@ -// run-pass +//@ run-pass #![feature(const_extern_fn)] const extern "C" fn foo1(val: u8) -> u8 { diff --git a/tests/ui/consts/const-extern-function.rs b/tests/ui/consts/const-extern-function.rs index 01f487a7d75..acc438189cb 100644 --- a/tests/ui/consts/const-extern-function.rs +++ b/tests/ui/consts/const-extern-function.rs @@ -1,4 +1,4 @@ -// run-pass +//@ run-pass #![allow(non_upper_case_globals)] extern "C" fn foopy() {} diff --git a/tests/ui/consts/const-external-macro-const-err.rs b/tests/ui/consts/const-external-macro-const-err.rs index 5bd84330bb7..3cb83823f1a 100644 --- a/tests/ui/consts/const-external-macro-const-err.rs +++ b/tests/ui/consts/const-external-macro-const-err.rs @@ -1,5 +1,5 @@ -// edition:2018 -// aux-build:external_macro.rs +//@ edition:2018 +//@ aux-build:external_macro.rs // Ensure that CONST_ERR lint errors // are not silenced in external macros. diff --git a/tests/ui/consts/const-fields-and-indexing.rs b/tests/ui/consts/const-fields-and-indexing.rs index bb13bebf4e2..5dd168c565c 100644 --- a/tests/ui/consts/const-fields-and-indexing.rs +++ b/tests/ui/consts/const-fields-and-indexing.rs @@ -1,4 +1,4 @@ -// run-pass +//@ run-pass #![allow(dead_code)] #![allow(non_upper_case_globals)] diff --git a/tests/ui/consts/const-float-bits-conv.rs b/tests/ui/consts/const-float-bits-conv.rs index fd5e42ef170..ba8db4c23dc 100644 --- a/tests/ui/consts/const-float-bits-conv.rs +++ b/tests/ui/consts/const-float-bits-conv.rs @@ -1,5 +1,5 @@ -// compile-flags: -Zmir-opt-level=0 -// run-pass +//@ compile-flags: -Zmir-opt-level=0 +//@ run-pass #![feature(const_float_bits_conv)] #![feature(const_float_classify)] diff --git a/tests/ui/consts/const-float-bits-reject-conv.rs b/tests/ui/consts/const-float-bits-reject-conv.rs index c77e99abbf6..febb272869a 100644 --- a/tests/ui/consts/const-float-bits-reject-conv.rs +++ b/tests/ui/consts/const-float-bits-reject-conv.rs @@ -1,5 +1,5 @@ -// compile-flags: -Zmir-opt-level=0 -// error-pattern: cannot use f32::to_bits on a NaN +//@ compile-flags: -Zmir-opt-level=0 +//@ error-pattern: cannot use f32::to_bits on a NaN #![feature(const_float_bits_conv)] #![feature(const_float_classify)] diff --git a/tests/ui/consts/const-float-classify.rs b/tests/ui/consts/const-float-classify.rs index e8bd095ed25..44772fb7313 100644 --- a/tests/ui/consts/const-float-classify.rs +++ b/tests/ui/consts/const-float-classify.rs @@ -1,5 +1,5 @@ -// compile-flags: -Zmir-opt-level=0 -// run-pass +//@ compile-flags: -Zmir-opt-level=0 +//@ run-pass #![feature(const_float_bits_conv)] #![feature(const_float_classify)] diff --git a/tests/ui/consts/const-fn-const-eval.rs b/tests/ui/consts/const-fn-const-eval.rs index d4da990812e..25abca0fb43 100644 --- a/tests/ui/consts/const-fn-const-eval.rs +++ b/tests/ui/consts/const-fn-const-eval.rs @@ -1,4 +1,4 @@ -// run-pass +//@ run-pass #![allow(dead_code)] const fn add(x: usize, y: usize) -> usize { diff --git a/tests/ui/consts/const-fn-destructuring-arg.rs b/tests/ui/consts/const-fn-destructuring-arg.rs index ea5c9ddc7ce..c775155a96e 100644 --- a/tests/ui/consts/const-fn-destructuring-arg.rs +++ b/tests/ui/consts/const-fn-destructuring-arg.rs @@ -1,4 +1,4 @@ -// check-pass +//@ check-pass const fn i((a, b): (u32, u32)) -> u32 { a + b diff --git a/tests/ui/consts/const-fn-method.rs b/tests/ui/consts/const-fn-method.rs index 002646db92a..689b8576e4b 100644 --- a/tests/ui/consts/const-fn-method.rs +++ b/tests/ui/consts/const-fn-method.rs @@ -1,4 +1,4 @@ -// run-pass +//@ run-pass struct Foo { value: u32 } diff --git a/tests/ui/consts/const-fn-nested.rs b/tests/ui/consts/const-fn-nested.rs index ef5598bf9e7..d0edb51cb6a 100644 --- a/tests/ui/consts/const-fn-nested.rs +++ b/tests/ui/consts/const-fn-nested.rs @@ -1,4 +1,4 @@ -// run-pass +//@ run-pass // Test a call whose argument is the result of another call. const fn sub(x: u32, y: u32) -> u32 { diff --git a/tests/ui/consts/const-fn-stability-calls-3.rs b/tests/ui/consts/const-fn-stability-calls-3.rs index b831dee580c..7a9576f1f9d 100644 --- a/tests/ui/consts/const-fn-stability-calls-3.rs +++ b/tests/ui/consts/const-fn-stability-calls-3.rs @@ -1,7 +1,7 @@ // Test use of const fn from another crate without a feature gate. -// check-pass -// aux-build:const_fn_lib.rs +//@ check-pass +//@ aux-build:const_fn_lib.rs extern crate const_fn_lib; diff --git a/tests/ui/consts/const-fn-stability-calls.rs b/tests/ui/consts/const-fn-stability-calls.rs index 13867904895..b307c788a4c 100644 --- a/tests/ui/consts/const-fn-stability-calls.rs +++ b/tests/ui/consts/const-fn-stability-calls.rs @@ -1,9 +1,9 @@ -// run-pass +//@ run-pass #![allow(dead_code)] #![allow(unused_variables)] // Test use of const fn from another crate without a feature gate. -// aux-build:const_fn_lib.rs +//@ aux-build:const_fn_lib.rs extern crate const_fn_lib; diff --git a/tests/ui/consts/const-fn-type-name-any.rs b/tests/ui/consts/const-fn-type-name-any.rs index 448c4fc0446..309fb79f060 100644 --- a/tests/ui/consts/const-fn-type-name-any.rs +++ b/tests/ui/consts/const-fn-type-name-any.rs @@ -1,4 +1,4 @@ -// run-pass +//@ run-pass #![feature(const_type_name)] #![allow(dead_code)] diff --git a/tests/ui/consts/const-fn-type-name.rs b/tests/ui/consts/const-fn-type-name.rs index fd4f60cb889..5403c26b979 100644 --- a/tests/ui/consts/const-fn-type-name.rs +++ b/tests/ui/consts/const-fn-type-name.rs @@ -1,4 +1,4 @@ -// run-pass +//@ run-pass #![feature(core_intrinsics)] #![feature(const_type_name)] diff --git a/tests/ui/consts/const-fn-val.rs b/tests/ui/consts/const-fn-val.rs index e5bf4757e3a..9c0771bdd0c 100644 --- a/tests/ui/consts/const-fn-val.rs +++ b/tests/ui/consts/const-fn-val.rs @@ -1,4 +1,4 @@ -// run-pass +//@ run-pass #![allow(non_upper_case_globals)] #![allow(overflowing_literals)] diff --git a/tests/ui/consts/const-fn-zst-args.rs b/tests/ui/consts/const-fn-zst-args.rs index 82c27b37573..27ee42460d2 100644 --- a/tests/ui/consts/const-fn-zst-args.rs +++ b/tests/ui/consts/const-fn-zst-args.rs @@ -1,4 +1,4 @@ -// build-pass +//@ build-pass // Check that the evaluation of const-functions with // zero-sized types as arguments compiles successfully diff --git a/tests/ui/consts/const-fn.rs b/tests/ui/consts/const-fn.rs index 59680e6e4a8..aa9c478ea63 100644 --- a/tests/ui/consts/const-fn.rs +++ b/tests/ui/consts/const-fn.rs @@ -1,4 +1,4 @@ -// run-pass +//@ run-pass #![allow(stable_features)] // A very basic test of const fn functionality. diff --git a/tests/ui/consts/const-index-feature-gate.rs b/tests/ui/consts/const-index-feature-gate.rs index 3537a1790cc..d13a0b00d80 100644 --- a/tests/ui/consts/const-index-feature-gate.rs +++ b/tests/ui/consts/const-index-feature-gate.rs @@ -1,4 +1,4 @@ -// run-pass +//@ run-pass #![allow(dead_code)] const ARR: [usize; 1] = [2]; const ARR2: [i32; ARR[0]] = [5, 6]; diff --git a/tests/ui/consts/const-int-arithmetic-overflow.rs b/tests/ui/consts/const-int-arithmetic-overflow.rs index 6446e94513c..17fe6513eee 100644 --- a/tests/ui/consts/const-int-arithmetic-overflow.rs +++ b/tests/ui/consts/const-int-arithmetic-overflow.rs @@ -1,5 +1,5 @@ -// run-pass -// compile-flags: -O +//@ run-pass +//@ compile-flags: -O // Make sure arithmetic unary/binary ops actually return the right result, even when overflowing. // We have to put them in `const fn` and turn on optimizations to avoid overflow checks. diff --git a/tests/ui/consts/const-int-arithmetic.rs b/tests/ui/consts/const-int-arithmetic.rs index b9096648f92..1c73a76284a 100644 --- a/tests/ui/consts/const-int-arithmetic.rs +++ b/tests/ui/consts/const-int-arithmetic.rs @@ -1,4 +1,4 @@ -// run-pass +//@ run-pass macro_rules! suite { ($( diff --git a/tests/ui/consts/const-int-conversion-rpass.rs b/tests/ui/consts/const-int-conversion-rpass.rs index 4aaeeaa3885..b1cd9f19490 100644 --- a/tests/ui/consts/const-int-conversion-rpass.rs +++ b/tests/ui/consts/const-int-conversion-rpass.rs @@ -1,4 +1,4 @@ -// run-pass +//@ run-pass const REVERSE: u32 = 0x12345678_u32.reverse_bits(); const FROM_BE_BYTES: i32 = i32::from_be_bytes([0x12, 0x34, 0x56, 0x78]); diff --git a/tests/ui/consts/const-int-overflowing-rpass.rs b/tests/ui/consts/const-int-overflowing-rpass.rs index 75e77fdf1be..1eaeffc4a3b 100644 --- a/tests/ui/consts/const-int-overflowing-rpass.rs +++ b/tests/ui/consts/const-int-overflowing-rpass.rs @@ -1,4 +1,4 @@ -// run-pass +//@ run-pass const ADD_A: (u32, bool) = 5u32.overflowing_add(2); const ADD_B: (u32, bool) = u32::MAX.overflowing_add(1); diff --git a/tests/ui/consts/const-int-pow-rpass.rs b/tests/ui/consts/const-int-pow-rpass.rs index 30bcb78bcf2..df97f326f89 100644 --- a/tests/ui/consts/const-int-pow-rpass.rs +++ b/tests/ui/consts/const-int-pow-rpass.rs @@ -1,4 +1,4 @@ -// run-pass +//@ run-pass #![feature(wrapping_next_power_of_two)] diff --git a/tests/ui/consts/const-int-rotate-rpass.rs b/tests/ui/consts/const-int-rotate-rpass.rs index 14f34f76cea..c149794a2bd 100644 --- a/tests/ui/consts/const-int-rotate-rpass.rs +++ b/tests/ui/consts/const-int-rotate-rpass.rs @@ -1,4 +1,4 @@ -// run-pass +//@ run-pass const LEFT: u32 = 0x10000b3u32.rotate_left(8); const RIGHT: u32 = 0xb301u32.rotate_right(8); diff --git a/tests/ui/consts/const-int-saturating-arith.rs b/tests/ui/consts/const-int-saturating-arith.rs index 7edbdd4cec5..3e0f0e76e42 100644 --- a/tests/ui/consts/const-int-saturating-arith.rs +++ b/tests/ui/consts/const-int-saturating-arith.rs @@ -1,4 +1,4 @@ -// run-pass +//@ run-pass const INT_U32_NO: u32 = (42 as u32).saturating_add(2); const INT_U32: u32 = u32::MAX.saturating_add(1); diff --git a/tests/ui/consts/const-int-sign-rpass.rs b/tests/ui/consts/const-int-sign-rpass.rs index 63c191d4227..04664e57393 100644 --- a/tests/ui/consts/const-int-sign-rpass.rs +++ b/tests/ui/consts/const-int-sign-rpass.rs @@ -1,4 +1,4 @@ -// run-pass +//@ run-pass const NEGATIVE_A: bool = (-10i32).is_negative(); const NEGATIVE_B: bool = 10i32.is_negative(); diff --git a/tests/ui/consts/const-int-wrapping-rpass.rs b/tests/ui/consts/const-int-wrapping-rpass.rs index 225d1e9393d..f982e417e5f 100644 --- a/tests/ui/consts/const-int-wrapping-rpass.rs +++ b/tests/ui/consts/const-int-wrapping-rpass.rs @@ -1,4 +1,4 @@ -// run-pass +//@ run-pass const ADD_A: u32 = 200u32.wrapping_add(55); const ADD_B: u32 = 200u32.wrapping_add(u32::MAX); diff --git a/tests/ui/consts/const-labeled-break.rs b/tests/ui/consts/const-labeled-break.rs index 6864f7247ad..16444dfefe2 100644 --- a/tests/ui/consts/const-labeled-break.rs +++ b/tests/ui/consts/const-labeled-break.rs @@ -1,4 +1,4 @@ -// run-pass +//@ run-pass // Using labeled break in a while loop has caused an illegal instruction being // generated, and an ICE later. diff --git a/tests/ui/consts/const-len-underflow-separate-spans.rs b/tests/ui/consts/const-len-underflow-separate-spans.rs index bd37be21576..42314eed7aa 100644 --- a/tests/ui/consts/const-len-underflow-separate-spans.rs +++ b/tests/ui/consts/const-len-underflow-separate-spans.rs @@ -2,8 +2,8 @@ // spot (where the underflow occurred), while also providing the // overall context for what caused the evaluation. -// revisions: old next -//[next] compile-flags: -Znext-solver +//@ revisions: old next +//@[next] compile-flags: -Znext-solver const ONE: usize = 1; const TWO: usize = 2; diff --git a/tests/ui/consts/const-match-check.rs b/tests/ui/consts/const-match-check.rs index 60f60fa40e3..f544b5fa99e 100644 --- a/tests/ui/consts/const-match-check.rs +++ b/tests/ui/consts/const-match-check.rs @@ -1,4 +1,4 @@ -// revisions: matchck eval1 eval2 +//@ revisions: matchck eval1 eval2 #[cfg(matchck)] const X: i32 = { let 0 = 0; 0 }; diff --git a/tests/ui/consts/const-match-pattern-arm.rs b/tests/ui/consts/const-match-pattern-arm.rs index 90680c0194c..27af3cf0915 100644 --- a/tests/ui/consts/const-match-pattern-arm.rs +++ b/tests/ui/consts/const-match-pattern-arm.rs @@ -1,4 +1,4 @@ -// check-pass +//@ check-pass const _: bool = match Some(true) { Some(value) => true, diff --git a/tests/ui/consts/const-meth-pattern.rs b/tests/ui/consts/const-meth-pattern.rs index 1544d760a13..72de172222f 100644 --- a/tests/ui/consts/const-meth-pattern.rs +++ b/tests/ui/consts/const-meth-pattern.rs @@ -1,4 +1,4 @@ -// run-pass +//@ run-pass struct A; diff --git a/tests/ui/consts/const-mut-refs/const_mut_address_of.rs b/tests/ui/consts/const-mut-refs/const_mut_address_of.rs index 03b2f9e3c74..66a4ec50c11 100644 --- a/tests/ui/consts/const-mut-refs/const_mut_address_of.rs +++ b/tests/ui/consts/const-mut-refs/const_mut_address_of.rs @@ -1,4 +1,4 @@ -// check-pass +//@ check-pass #![feature(const_mut_refs)] #![feature(raw_ref_op)] diff --git a/tests/ui/consts/const-mut-refs/const_mut_refs.rs b/tests/ui/consts/const-mut-refs/const_mut_refs.rs index 96321a1defd..e4a2b78f115 100644 --- a/tests/ui/consts/const-mut-refs/const_mut_refs.rs +++ b/tests/ui/consts/const-mut-refs/const_mut_refs.rs @@ -1,4 +1,4 @@ -// check-pass +//@ check-pass #![feature(const_mut_refs)] use std::sync::Mutex; diff --git a/tests/ui/consts/const-mut-refs/mut_ref_in_final_dynamic_check.rs b/tests/ui/consts/const-mut-refs/mut_ref_in_final_dynamic_check.rs index 19f0ad8a5a4..bd4a9863c74 100644 --- a/tests/ui/consts/const-mut-refs/mut_ref_in_final_dynamic_check.rs +++ b/tests/ui/consts/const-mut-refs/mut_ref_in_final_dynamic_check.rs @@ -1,6 +1,6 @@ -// normalize-stderr-test "(the raw bytes of the constant) \(size: [0-9]*, align: [0-9]*\)" -> "$1 (size: $$SIZE, align: $$ALIGN)" -// normalize-stderr-test "( 0x[0-9a-f][0-9a-f] │)? ([0-9a-f][0-9a-f] |__ |╾─*ALLOC[0-9]+(\+[a-z0-9]+)?()?─*╼ )+ *│.*" -> " HEX_DUMP" -// normalize-stderr-test "HEX_DUMP\s*\n\s*HEX_DUMP" -> "HEX_DUMP" +//@ normalize-stderr-test "(the raw bytes of the constant) \(size: [0-9]*, align: [0-9]*\)" -> "$1 (size: $$SIZE, align: $$ALIGN)" +//@ normalize-stderr-test "( 0x[0-9a-f][0-9a-f] │)? ([0-9a-f][0-9a-f] |__ |╾─*ALLOC[0-9]+(\+[a-z0-9]+)?()?─*╼ )+ *│.*" -> " HEX_DUMP" +//@ normalize-stderr-test "HEX_DUMP\s*\n\s*HEX_DUMP" -> "HEX_DUMP" #![feature(const_mut_refs, const_refs_to_static)] #![feature(raw_ref_op)] diff --git a/tests/ui/consts/const-needs_drop.rs b/tests/ui/consts/const-needs_drop.rs index bf622e38939..a5300fc2ce3 100644 --- a/tests/ui/consts/const-needs_drop.rs +++ b/tests/ui/consts/const-needs_drop.rs @@ -1,4 +1,4 @@ -// run-pass +//@ run-pass use std::mem; diff --git a/tests/ui/consts/const-negation.rs b/tests/ui/consts/const-negation.rs index 18bcdfb0130..ef9b21cc553 100644 --- a/tests/ui/consts/const-negation.rs +++ b/tests/ui/consts/const-negation.rs @@ -1,4 +1,4 @@ -// run-pass +//@ run-pass #![allow(overflowing_literals)] fn main() { diff --git a/tests/ui/consts/const-negative.rs b/tests/ui/consts/const-negative.rs index 1cb56093628..96a271add1e 100644 --- a/tests/ui/consts/const-negative.rs +++ b/tests/ui/consts/const-negative.rs @@ -1,4 +1,4 @@ -// run-pass +//@ run-pass // Issue #358 #![allow(non_upper_case_globals)] diff --git a/tests/ui/consts/const-nullary-enum.rs b/tests/ui/consts/const-nullary-enum.rs index b6574dce6ca..f43e889e601 100644 --- a/tests/ui/consts/const-nullary-enum.rs +++ b/tests/ui/consts/const-nullary-enum.rs @@ -1,4 +1,4 @@ -// run-pass +//@ run-pass #![allow(dead_code)] enum Foo { diff --git a/tests/ui/consts/const-nullary-univariant-enum.rs b/tests/ui/consts/const-nullary-univariant-enum.rs index 51349ad3195..64385479cbf 100644 --- a/tests/ui/consts/const-nullary-univariant-enum.rs +++ b/tests/ui/consts/const-nullary-univariant-enum.rs @@ -1,4 +1,4 @@ -// run-pass +//@ run-pass #[derive(Copy, Clone)] enum Foo { diff --git a/tests/ui/consts/const-pattern-not-const-evaluable.rs b/tests/ui/consts/const-pattern-not-const-evaluable.rs index dae5343fe30..3cc0542e500 100644 --- a/tests/ui/consts/const-pattern-not-const-evaluable.rs +++ b/tests/ui/consts/const-pattern-not-const-evaluable.rs @@ -1,4 +1,4 @@ -// build-pass (FIXME(62277): could be check-pass?) +//@ build-pass (FIXME(62277): could be check-pass?) #[derive(PartialEq, Eq)] enum Cake { diff --git a/tests/ui/consts/const-pattern-variant.rs b/tests/ui/consts/const-pattern-variant.rs index 80f749ed72d..17f7b70dd59 100644 --- a/tests/ui/consts/const-pattern-variant.rs +++ b/tests/ui/consts/const-pattern-variant.rs @@ -1,4 +1,4 @@ -// run-pass +//@ run-pass #![allow(unreachable_patterns)] #[derive(PartialEq, Eq)] diff --git a/tests/ui/consts/const-ptr-nonnull-rpass.rs b/tests/ui/consts/const-ptr-nonnull-rpass.rs index 67d52ad0824..48ad72df630 100644 --- a/tests/ui/consts/const-ptr-nonnull-rpass.rs +++ b/tests/ui/consts/const-ptr-nonnull-rpass.rs @@ -1,4 +1,4 @@ -// run-pass +//@ run-pass #![feature(ptr_internals, test)] diff --git a/tests/ui/consts/const-ptr-unique-rpass.rs b/tests/ui/consts/const-ptr-unique-rpass.rs index fc13bb98bd2..db319b6ab92 100644 --- a/tests/ui/consts/const-ptr-unique-rpass.rs +++ b/tests/ui/consts/const-ptr-unique-rpass.rs @@ -1,4 +1,4 @@ -// run-pass +//@ run-pass #![feature(ptr_internals, test)] diff --git a/tests/ui/consts/const-rec-and-tup.rs b/tests/ui/consts/const-rec-and-tup.rs index 0bddaf75de8..03cc444a86b 100644 --- a/tests/ui/consts/const-rec-and-tup.rs +++ b/tests/ui/consts/const-rec-and-tup.rs @@ -1,4 +1,4 @@ -// run-pass +//@ run-pass #![allow(dead_code)] #![allow(non_upper_case_globals)] #![allow(overflowing_literals)] diff --git a/tests/ui/consts/const-region-ptrs-noncopy.rs b/tests/ui/consts/const-region-ptrs-noncopy.rs index 10b9ce896a6..84695eb5fa6 100644 --- a/tests/ui/consts/const-region-ptrs-noncopy.rs +++ b/tests/ui/consts/const-region-ptrs-noncopy.rs @@ -1,4 +1,4 @@ -// run-pass +//@ run-pass #![allow(dead_code)] #![allow(non_upper_case_globals)] diff --git a/tests/ui/consts/const-region-ptrs.rs b/tests/ui/consts/const-region-ptrs.rs index 9b94a2b1121..0fd8f4292d9 100644 --- a/tests/ui/consts/const-region-ptrs.rs +++ b/tests/ui/consts/const-region-ptrs.rs @@ -1,4 +1,4 @@ -// run-pass +//@ run-pass #![allow(non_upper_case_globals)] struct Pair<'a> { a: isize, b: &'a isize } diff --git a/tests/ui/consts/const-repeated-values.rs b/tests/ui/consts/const-repeated-values.rs index 27efb5ba2a2..9ee73bce56d 100644 --- a/tests/ui/consts/const-repeated-values.rs +++ b/tests/ui/consts/const-repeated-values.rs @@ -1,4 +1,4 @@ -// run-pass +//@ run-pass const FOO: isize = 42; enum Bar { diff --git a/tests/ui/consts/const-size_of-align_of.rs b/tests/ui/consts/const-size_of-align_of.rs index 0c63dc84a37..37f54644622 100644 --- a/tests/ui/consts/const-size_of-align_of.rs +++ b/tests/ui/consts/const-size_of-align_of.rs @@ -1,4 +1,4 @@ -// run-pass +//@ run-pass #![allow(dead_code)] use std::mem; diff --git a/tests/ui/consts/const-size_of-cycle.rs b/tests/ui/consts/const-size_of-cycle.rs index 1f56c8bd8e6..cfb2294c445 100644 --- a/tests/ui/consts/const-size_of-cycle.rs +++ b/tests/ui/consts/const-size_of-cycle.rs @@ -1,4 +1,4 @@ -// error-pattern: cycle detected +//@ error-pattern: cycle detected struct Foo { bytes: [u8; std::mem::size_of::()] diff --git a/tests/ui/consts/const-size_of_val-align_of_val.rs b/tests/ui/consts/const-size_of_val-align_of_val.rs index cd678176761..ee9dfca0170 100644 --- a/tests/ui/consts/const-size_of_val-align_of_val.rs +++ b/tests/ui/consts/const-size_of_val-align_of_val.rs @@ -1,4 +1,4 @@ -// run-pass +//@ run-pass #![feature(const_size_of_val, const_align_of_val)] #![feature(const_size_of_val_raw, const_align_of_val_raw, layout_for_ptr)] diff --git a/tests/ui/consts/const-struct-offsets.rs b/tests/ui/consts/const-struct-offsets.rs index 26a00832079..ee97fe3cab9 100644 --- a/tests/ui/consts/const-struct-offsets.rs +++ b/tests/ui/consts/const-struct-offsets.rs @@ -1,6 +1,6 @@ -// run-pass +//@ run-pass #![allow(dead_code)] -// pretty-expanded FIXME #23616 +//@ pretty-expanded FIXME #23616 #![allow(non_upper_case_globals)] enum Foo { diff --git a/tests/ui/consts/const-struct.rs b/tests/ui/consts/const-struct.rs index db397a891d6..d11f4ea77c4 100644 --- a/tests/ui/consts/const-struct.rs +++ b/tests/ui/consts/const-struct.rs @@ -1,4 +1,4 @@ -// run-pass +//@ run-pass #![allow(non_camel_case_types)] #![allow(non_upper_case_globals)] diff --git a/tests/ui/consts/const-trait-to-trait.rs b/tests/ui/consts/const-trait-to-trait.rs index 12a2999d79d..382c7613c9e 100644 --- a/tests/ui/consts/const-trait-to-trait.rs +++ b/tests/ui/consts/const-trait-to-trait.rs @@ -1,4 +1,4 @@ -// run-pass +//@ run-pass #![allow(dead_code)] #![allow(unused_variables)] // Issue #24644 - block causes a &Trait -> &Trait coercion: diff --git a/tests/ui/consts/const-try.rs b/tests/ui/consts/const-try.rs index 6b7ba8f1e32..f2d3db9be9c 100644 --- a/tests/ui/consts/const-try.rs +++ b/tests/ui/consts/const-try.rs @@ -1,4 +1,4 @@ -// known-bug: #110395 +//@ known-bug: #110395 // Demonstrates what's needed to make use of `?` in const contexts. diff --git a/tests/ui/consts/const-tuple-struct.rs b/tests/ui/consts/const-tuple-struct.rs index 0144afaaceb..1670faa70e8 100644 --- a/tests/ui/consts/const-tuple-struct.rs +++ b/tests/ui/consts/const-tuple-struct.rs @@ -1,4 +1,4 @@ -// run-pass +//@ run-pass struct Bar(isize, isize); diff --git a/tests/ui/consts/const-typeid-of-rpass.rs b/tests/ui/consts/const-typeid-of-rpass.rs index 89d57ae4f98..15ffdd1e83a 100644 --- a/tests/ui/consts/const-typeid-of-rpass.rs +++ b/tests/ui/consts/const-typeid-of-rpass.rs @@ -1,4 +1,4 @@ -// run-pass +//@ run-pass #![feature(const_type_id)] #![feature(core_intrinsics)] diff --git a/tests/ui/consts/const-unit-struct.rs b/tests/ui/consts/const-unit-struct.rs index 1c9e0e8d3c9..096cd1e8384 100644 --- a/tests/ui/consts/const-unit-struct.rs +++ b/tests/ui/consts/const-unit-struct.rs @@ -1,5 +1,5 @@ -// run-pass -// pretty-expanded FIXME #23616 +//@ run-pass +//@ pretty-expanded FIXME #23616 struct Foo; diff --git a/tests/ui/consts/const-unsafe-fn.rs b/tests/ui/consts/const-unsafe-fn.rs index 72ce73f745f..8735f79dda8 100644 --- a/tests/ui/consts/const-unsafe-fn.rs +++ b/tests/ui/consts/const-unsafe-fn.rs @@ -1,4 +1,4 @@ -// run-pass +//@ run-pass #![allow(dead_code)] // A quick test of 'unsafe const fn' functionality diff --git a/tests/ui/consts/const-unwrap.rs b/tests/ui/consts/const-unwrap.rs index 729ae535cef..bc79c7db2fc 100644 --- a/tests/ui/consts/const-unwrap.rs +++ b/tests/ui/consts/const-unwrap.rs @@ -1,4 +1,4 @@ -// check-fail +//@ check-fail #![feature(const_option)] diff --git a/tests/ui/consts/const-validation-fail-55455.rs b/tests/ui/consts/const-validation-fail-55455.rs index 583074888c9..c2f41c1850a 100644 --- a/tests/ui/consts/const-validation-fail-55455.rs +++ b/tests/ui/consts/const-validation-fail-55455.rs @@ -1,5 +1,5 @@ // https://github.com/rust-lang/rust/issues/55454 -// build-pass (FIXME(62277): could be check-pass?) +//@ build-pass (FIXME(62277): could be check-pass?) struct This(T); diff --git a/tests/ui/consts/const-variant-count.rs b/tests/ui/consts/const-variant-count.rs index 50eaeeb4685..c554c3b0ff4 100644 --- a/tests/ui/consts/const-variant-count.rs +++ b/tests/ui/consts/const-variant-count.rs @@ -1,4 +1,4 @@ -// run-pass +//@ run-pass #![allow(dead_code, enum_intrinsics_non_enums)] #![feature(variant_count)] #![feature(never_type)] diff --git a/tests/ui/consts/const-vec-of-fns.rs b/tests/ui/consts/const-vec-of-fns.rs index 6d90b066b74..a14cb06db61 100644 --- a/tests/ui/consts/const-vec-of-fns.rs +++ b/tests/ui/consts/const-vec-of-fns.rs @@ -1,5 +1,5 @@ -// run-pass -// pretty-expanded FIXME #23616 +//@ run-pass +//@ pretty-expanded FIXME #23616 #![allow(non_upper_case_globals)] /*! diff --git a/tests/ui/consts/const-vec-syntax.rs b/tests/ui/consts/const-vec-syntax.rs index 61246e44eba..5537a8cec90 100644 --- a/tests/ui/consts/const-vec-syntax.rs +++ b/tests/ui/consts/const-vec-syntax.rs @@ -1,5 +1,5 @@ -// run-pass -// pretty-expanded FIXME #23616 +//@ run-pass +//@ pretty-expanded FIXME #23616 fn f(_: &[isize]) {} diff --git a/tests/ui/consts/const-vecs-and-slices.rs b/tests/ui/consts/const-vecs-and-slices.rs index 1cdc33b7a34..4ddc5e8a8d8 100644 --- a/tests/ui/consts/const-vecs-and-slices.rs +++ b/tests/ui/consts/const-vecs-and-slices.rs @@ -1,4 +1,4 @@ -// run-pass +//@ run-pass #![allow(non_upper_case_globals)] static x : [isize; 4] = [1,2,3,4]; diff --git a/tests/ui/consts/const.rs b/tests/ui/consts/const.rs index 71fbadfa828..1f1c6e30b4a 100644 --- a/tests/ui/consts/const.rs +++ b/tests/ui/consts/const.rs @@ -1,4 +1,4 @@ -// run-pass +//@ run-pass #![allow(non_upper_case_globals)] static i: isize = 10; diff --git a/tests/ui/consts/const_cmp_type_id.rs b/tests/ui/consts/const_cmp_type_id.rs index cda811144c7..f2727142323 100644 --- a/tests/ui/consts/const_cmp_type_id.rs +++ b/tests/ui/consts/const_cmp_type_id.rs @@ -1,4 +1,4 @@ -// known-bug: #110395 +//@ known-bug: #110395 #![feature(const_type_id)] #![feature(const_trait_impl, effects)] diff --git a/tests/ui/consts/const_constructor/const-construct-call.rs b/tests/ui/consts/const_constructor/const-construct-call.rs index cb735d7b305..b875b03f00a 100644 --- a/tests/ui/consts/const_constructor/const-construct-call.rs +++ b/tests/ui/consts/const_constructor/const-construct-call.rs @@ -1,6 +1,6 @@ // Test that constructors are considered to be const fns -// run-pass +//@ run-pass // Ctor(..) is transformed to Ctor { 0: ... } in THIR lowering, so directly // calling constructors doesn't require them to be const. diff --git a/tests/ui/consts/const_constructor/const_constructor_qpath.rs b/tests/ui/consts/const_constructor/const_constructor_qpath.rs index 7c55f470fdf..a0bf5e4eae8 100644 --- a/tests/ui/consts/const_constructor/const_constructor_qpath.rs +++ b/tests/ui/consts/const_constructor/const_constructor_qpath.rs @@ -1,4 +1,4 @@ -// run-pass +//@ run-pass trait ConstDefault { const DEFAULT: Self; diff --git a/tests/ui/consts/const_discriminant.rs b/tests/ui/consts/const_discriminant.rs index 80deb0f784d..49d7af1b460 100644 --- a/tests/ui/consts/const_discriminant.rs +++ b/tests/ui/consts/const_discriminant.rs @@ -1,4 +1,4 @@ -// run-pass +//@ run-pass #![allow(dead_code)] use std::mem::{discriminant, Discriminant}; diff --git a/tests/ui/consts/const_fn_floating_point_arithmetic.rs b/tests/ui/consts/const_fn_floating_point_arithmetic.rs index 5e32482b21a..b0d0bc6b9f4 100644 --- a/tests/ui/consts/const_fn_floating_point_arithmetic.rs +++ b/tests/ui/consts/const_fn_floating_point_arithmetic.rs @@ -1,6 +1,6 @@ // gate-test-const_fn_floating_point_arithmetic -// revisions: stock gated +//@ revisions: stock gated #![feature(rustc_attrs)] #![cfg_attr(gated, feature(const_fn_floating_point_arithmetic))] diff --git a/tests/ui/consts/const_fn_return_nested_fn_ptr.rs b/tests/ui/consts/const_fn_return_nested_fn_ptr.rs index d22c789609f..8f705f32ac1 100644 --- a/tests/ui/consts/const_fn_return_nested_fn_ptr.rs +++ b/tests/ui/consts/const_fn_return_nested_fn_ptr.rs @@ -1,5 +1,5 @@ -// build-pass (FIXME(62277): could be check-pass?) -// aux-build:const_fn_lib.rs +//@ build-pass (FIXME(62277): could be check-pass?) +//@ aux-build:const_fn_lib.rs extern crate const_fn_lib; diff --git a/tests/ui/consts/const_fn_unsize.rs b/tests/ui/consts/const_fn_unsize.rs index 01da57320c2..f96a6088fd3 100644 --- a/tests/ui/consts/const_fn_unsize.rs +++ b/tests/ui/consts/const_fn_unsize.rs @@ -1,4 +1,4 @@ -// run-pass +//@ run-pass #![feature(slice_ptr_len)] use std::ptr::NonNull; diff --git a/tests/ui/consts/const_forget.rs b/tests/ui/consts/const_forget.rs index f06149f2cb9..6fc7126af1b 100644 --- a/tests/ui/consts/const_forget.rs +++ b/tests/ui/consts/const_forget.rs @@ -1,4 +1,4 @@ -// check-pass +//@ check-pass #![allow(forgetting_copy_types)] diff --git a/tests/ui/consts/const_in_pattern/accept_structural.rs b/tests/ui/consts/const_in_pattern/accept_structural.rs index 69b4e75c622..09142c56157 100644 --- a/tests/ui/consts/const_in_pattern/accept_structural.rs +++ b/tests/ui/consts/const_in_pattern/accept_structural.rs @@ -1,4 +1,4 @@ -// run-pass +//@ run-pass #![warn(indirect_structural_match)] diff --git a/tests/ui/consts/const_in_pattern/cross-crate-fail.rs b/tests/ui/consts/const_in_pattern/cross-crate-fail.rs index 69f5e66f5af..d8df2847c44 100644 --- a/tests/ui/consts/const_in_pattern/cross-crate-fail.rs +++ b/tests/ui/consts/const_in_pattern/cross-crate-fail.rs @@ -1,4 +1,4 @@ -// aux-build:consts.rs +//@ aux-build:consts.rs #![warn(indirect_structural_match)] diff --git a/tests/ui/consts/const_in_pattern/cross-crate-pass.rs b/tests/ui/consts/const_in_pattern/cross-crate-pass.rs index 1d8ecf8ae66..c18a30b3495 100644 --- a/tests/ui/consts/const_in_pattern/cross-crate-pass.rs +++ b/tests/ui/consts/const_in_pattern/cross-crate-pass.rs @@ -1,5 +1,5 @@ -// run-pass -// aux-build:consts.rs +//@ run-pass +//@ aux-build:consts.rs #![warn(indirect_structural_match)] diff --git a/tests/ui/consts/const_in_pattern/custom-eq-branch-pass.rs b/tests/ui/consts/const_in_pattern/custom-eq-branch-pass.rs index ac89b7925ff..605f4e760cd 100644 --- a/tests/ui/consts/const_in_pattern/custom-eq-branch-pass.rs +++ b/tests/ui/consts/const_in_pattern/custom-eq-branch-pass.rs @@ -1,4 +1,4 @@ -// run-pass +//@ run-pass #![warn(indirect_structural_match)] diff --git a/tests/ui/consts/const_in_pattern/issue-44333.rs b/tests/ui/consts/const_in_pattern/issue-44333.rs index aaf1edb6fe6..9adf02cbfce 100644 --- a/tests/ui/consts/const_in_pattern/issue-44333.rs +++ b/tests/ui/consts/const_in_pattern/issue-44333.rs @@ -1,4 +1,4 @@ -// run-pass +//@ run-pass #![warn(pointer_structural_match)] diff --git a/tests/ui/consts/const_in_pattern/issue-53708.rs b/tests/ui/consts/const_in_pattern/issue-53708.rs index 355ba63790f..a21afbe7c0d 100644 --- a/tests/ui/consts/const_in_pattern/issue-53708.rs +++ b/tests/ui/consts/const_in_pattern/issue-53708.rs @@ -1,4 +1,4 @@ -// check-pass +//@ check-pass // https://github.com/rust-lang/rust/issues/53708 #[derive(PartialEq, Eq)] struct S; diff --git a/tests/ui/consts/const_in_pattern/issue-62614.rs b/tests/ui/consts/const_in_pattern/issue-62614.rs index 4ea9a283618..92f76322fde 100644 --- a/tests/ui/consts/const_in_pattern/issue-62614.rs +++ b/tests/ui/consts/const_in_pattern/issue-62614.rs @@ -1,4 +1,4 @@ -// run-pass +//@ run-pass struct Sum(u32, u32); diff --git a/tests/ui/consts/const_in_pattern/issue-65466.rs b/tests/ui/consts/const_in_pattern/issue-65466.rs index d45c32e170a..048fca762d5 100644 --- a/tests/ui/consts/const_in_pattern/issue-65466.rs +++ b/tests/ui/consts/const_in_pattern/issue-65466.rs @@ -1,6 +1,6 @@ #![deny(indirect_structural_match)] -// check-pass +//@ check-pass #[derive(PartialEq, Eq)] enum O { diff --git a/tests/ui/consts/const_in_pattern/issue-73431.rs b/tests/ui/consts/const_in_pattern/issue-73431.rs index 835f502b407..4e492fc8ea5 100644 --- a/tests/ui/consts/const_in_pattern/issue-73431.rs +++ b/tests/ui/consts/const_in_pattern/issue-73431.rs @@ -1,5 +1,5 @@ -// run-pass -// unset-rustc-env:RUSTC_LOG_COLOR +//@ run-pass +//@ unset-rustc-env:RUSTC_LOG_COLOR // Regression test for https://github.com/rust-lang/rust/issues/73431. diff --git a/tests/ui/consts/const_in_pattern/null-raw-ptr-issue-119270.rs b/tests/ui/consts/const_in_pattern/null-raw-ptr-issue-119270.rs index 515c79d9457..ae2d532be7b 100644 --- a/tests/ui/consts/const_in_pattern/null-raw-ptr-issue-119270.rs +++ b/tests/ui/consts/const_in_pattern/null-raw-ptr-issue-119270.rs @@ -1,4 +1,4 @@ -// run-pass +//@ run-pass struct NoDerive(#[allow(dead_code)] i32); #[derive(PartialEq)] diff --git a/tests/ui/consts/const_in_pattern/reject_non_structural.rs b/tests/ui/consts/const_in_pattern/reject_non_structural.rs index 71d4138104d..a9b0aa5507e 100644 --- a/tests/ui/consts/const_in_pattern/reject_non_structural.rs +++ b/tests/ui/consts/const_in_pattern/reject_non_structural.rs @@ -1,4 +1,4 @@ -// compile-flags: -Zdeduplicate-diagnostics=yes +//@ compile-flags: -Zdeduplicate-diagnostics=yes // This test of structural match checking enumerates the different kinds of // const definitions, collecting cases where the const pattern is rejected. diff --git a/tests/ui/consts/const_let_assign.rs b/tests/ui/consts/const_let_assign.rs index b83acfb73cf..73580c419c0 100644 --- a/tests/ui/consts/const_let_assign.rs +++ b/tests/ui/consts/const_let_assign.rs @@ -1,4 +1,4 @@ -// check-pass +//@ check-pass struct S(i32); diff --git a/tests/ui/consts/const_let_assign2.rs b/tests/ui/consts/const_let_assign2.rs index 1c7afe0e3d6..f239507d245 100644 --- a/tests/ui/consts/const_let_assign2.rs +++ b/tests/ui/consts/const_let_assign2.rs @@ -1,4 +1,4 @@ -// check-pass +//@ check-pass pub struct AA { pub data: [u8; 10], diff --git a/tests/ui/consts/const_let_eq.rs b/tests/ui/consts/const_let_eq.rs index 818819f9ff6..cf2a38bf213 100644 --- a/tests/ui/consts/const_let_eq.rs +++ b/tests/ui/consts/const_let_eq.rs @@ -1,4 +1,4 @@ -// run-pass +//@ run-pass struct Foo(T); struct Bar { x: T } diff --git a/tests/ui/consts/const_let_eq_float.rs b/tests/ui/consts/const_let_eq_float.rs index e15f4b804f7..30d839cdc2a 100644 --- a/tests/ui/consts/const_let_eq_float.rs +++ b/tests/ui/consts/const_let_eq_float.rs @@ -1,4 +1,4 @@ -// run-pass +//@ run-pass #![feature(const_fn_floating_point_arithmetic)] diff --git a/tests/ui/consts/const_let_irrefutable.rs b/tests/ui/consts/const_let_irrefutable.rs index e889abf4abe..afd67be7805 100644 --- a/tests/ui/consts/const_let_irrefutable.rs +++ b/tests/ui/consts/const_let_irrefutable.rs @@ -1,4 +1,4 @@ -// build-pass (FIXME(62277): could be check-pass?) +//@ build-pass (FIXME(62277): could be check-pass?) fn main() {} diff --git a/tests/ui/consts/const_let_promote.rs b/tests/ui/consts/const_let_promote.rs index f4661e9e425..e04cbfc8171 100644 --- a/tests/ui/consts/const_let_promote.rs +++ b/tests/ui/consts/const_let_promote.rs @@ -1,4 +1,4 @@ -// run-pass +//@ run-pass use std::cell::Cell; diff --git a/tests/ui/consts/const_prop_slice_pat_ice.rs b/tests/ui/consts/const_prop_slice_pat_ice.rs index 60b06a497d6..edb0c509014 100644 --- a/tests/ui/consts/const_prop_slice_pat_ice.rs +++ b/tests/ui/consts/const_prop_slice_pat_ice.rs @@ -1,4 +1,4 @@ -// check-pass +//@ check-pass fn main() { match &[0, 1] as &[i32] { diff --git a/tests/ui/consts/const_refs_to_static.rs b/tests/ui/consts/const_refs_to_static.rs index f5e5ef5f699..1baa8535b2c 100644 --- a/tests/ui/consts/const_refs_to_static.rs +++ b/tests/ui/consts/const_refs_to_static.rs @@ -1,4 +1,4 @@ -// run-pass +//@ run-pass #![feature(const_refs_to_static)] static S: i32 = 0; diff --git a/tests/ui/consts/const_refs_to_static_fail.rs b/tests/ui/consts/const_refs_to_static_fail.rs index d5bcccf82d5..e001c4d6395 100644 --- a/tests/ui/consts/const_refs_to_static_fail.rs +++ b/tests/ui/consts/const_refs_to_static_fail.rs @@ -1,5 +1,5 @@ -// normalize-stderr-test "(the raw bytes of the constant) \(size: [0-9]*, align: [0-9]*\)" -> "$1 (size: $$SIZE, align: $$ALIGN)" -// normalize-stderr-test "([0-9a-f][0-9a-f] |╾─*ALLOC[0-9]+(\+[a-z0-9]+)?()?─*╼ )+ *│.*" -> "HEX_DUMP" +//@ normalize-stderr-test "(the raw bytes of the constant) \(size: [0-9]*, align: [0-9]*\)" -> "$1 (size: $$SIZE, align: $$ALIGN)" +//@ normalize-stderr-test "([0-9a-f][0-9a-f] |╾─*ALLOC[0-9]+(\+[a-z0-9]+)?()?─*╼ )+ *│.*" -> "HEX_DUMP" #![feature(const_refs_to_static, const_mut_refs, sync_unsafe_cell)] use std::cell::SyncUnsafeCell; diff --git a/tests/ui/consts/const_refs_to_static_fail_invalid.rs b/tests/ui/consts/const_refs_to_static_fail_invalid.rs index 665b876c43e..363a6da0901 100644 --- a/tests/ui/consts/const_refs_to_static_fail_invalid.rs +++ b/tests/ui/consts/const_refs_to_static_fail_invalid.rs @@ -1,5 +1,5 @@ -// normalize-stderr-test "(the raw bytes of the constant) \(size: [0-9]*, align: [0-9]*\)" -> "$1 (size: $$SIZE, align: $$ALIGN)" -// normalize-stderr-test "([0-9a-f][0-9a-f] |╾─*ALLOC[0-9]+(\+[a-z0-9]+)?()?─*╼ )+ *│.*" -> "HEX_DUMP" +//@ normalize-stderr-test "(the raw bytes of the constant) \(size: [0-9]*, align: [0-9]*\)" -> "$1 (size: $$SIZE, align: $$ALIGN)" +//@ normalize-stderr-test "([0-9a-f][0-9a-f] |╾─*ALLOC[0-9]+(\+[a-z0-9]+)?()?─*╼ )+ *│.*" -> "HEX_DUMP" #![feature(const_refs_to_static)] #![allow(static_mut_ref)] diff --git a/tests/ui/consts/const_short_circuit.rs b/tests/ui/consts/const_short_circuit.rs index 6403fbb17dd..71788977491 100644 --- a/tests/ui/consts/const_short_circuit.rs +++ b/tests/ui/consts/const_short_circuit.rs @@ -1,4 +1,4 @@ -// check-pass +//@ check-pass const _: bool = false && false; const _: bool = true && false; diff --git a/tests/ui/consts/const_unsafe_unreachable.rs b/tests/ui/consts/const_unsafe_unreachable.rs index 1c3baec5d86..2f52b48746f 100644 --- a/tests/ui/consts/const_unsafe_unreachable.rs +++ b/tests/ui/consts/const_unsafe_unreachable.rs @@ -1,4 +1,4 @@ -// run-pass +//@ run-pass const unsafe fn foo(x: bool) -> bool { match x { diff --git a/tests/ui/consts/const_unsafe_unreachable_ub.rs b/tests/ui/consts/const_unsafe_unreachable_ub.rs index b418fea617c..705e208b56d 100644 --- a/tests/ui/consts/const_unsafe_unreachable_ub.rs +++ b/tests/ui/consts/const_unsafe_unreachable_ub.rs @@ -1,4 +1,4 @@ -// error-pattern: evaluation of constant value failed +//@ error-pattern: evaluation of constant value failed const unsafe fn foo(x: bool) -> bool { match x { diff --git a/tests/ui/consts/constifconst-call-in-const-position.rs b/tests/ui/consts/constifconst-call-in-const-position.rs index fcf01d5bc71..29c967f38a7 100644 --- a/tests/ui/consts/constifconst-call-in-const-position.rs +++ b/tests/ui/consts/constifconst-call-in-const-position.rs @@ -1,4 +1,4 @@ -// known-bug: #102498 +//@ known-bug: #102498 #![feature(const_trait_impl, generic_const_exprs)] diff --git a/tests/ui/consts/consts-in-patterns.rs b/tests/ui/consts/consts-in-patterns.rs index 0295204c879..31b2f1b2151 100644 --- a/tests/ui/consts/consts-in-patterns.rs +++ b/tests/ui/consts/consts-in-patterns.rs @@ -1,4 +1,4 @@ -// run-pass +//@ run-pass const FOO: isize = 10; const BAR: isize = 3; diff --git a/tests/ui/consts/control-flow/basics.rs b/tests/ui/consts/control-flow/basics.rs index 02e5501f10c..c4e32e246f0 100644 --- a/tests/ui/consts/control-flow/basics.rs +++ b/tests/ui/consts/control-flow/basics.rs @@ -1,6 +1,6 @@ // Test basic functionality of control flow in a const context. -// run-pass +//@ run-pass const X: u32 = 4; const Y: u32 = 5; diff --git a/tests/ui/consts/control-flow/drop-fail.rs b/tests/ui/consts/control-flow/drop-fail.rs index 41341f3121e..25afe5d08d9 100644 --- a/tests/ui/consts/control-flow/drop-fail.rs +++ b/tests/ui/consts/control-flow/drop-fail.rs @@ -1,4 +1,4 @@ -// revisions: stock precise +//@ revisions: stock precise #![cfg_attr(precise, feature(const_precise_live_drops))] diff --git a/tests/ui/consts/control-flow/drop-pass.rs b/tests/ui/consts/control-flow/drop-pass.rs index 2a6d12768c3..69ecb1176d4 100644 --- a/tests/ui/consts/control-flow/drop-pass.rs +++ b/tests/ui/consts/control-flow/drop-pass.rs @@ -1,5 +1,5 @@ -// run-pass -// revisions: stock precise +//@ run-pass +//@ revisions: stock precise #![allow(unused)] #![cfg_attr(precise, feature(const_precise_live_drops))] diff --git a/tests/ui/consts/control-flow/drop-precise.rs b/tests/ui/consts/control-flow/drop-precise.rs index 4ecc5ef78dd..9f42d335187 100644 --- a/tests/ui/consts/control-flow/drop-precise.rs +++ b/tests/ui/consts/control-flow/drop-precise.rs @@ -1,4 +1,4 @@ -// run-pass +//@ run-pass // gate-test-const_precise_live_drops #![feature(const_precise_live_drops)] diff --git a/tests/ui/consts/control-flow/exhaustive-c-like-enum-match.rs b/tests/ui/consts/control-flow/exhaustive-c-like-enum-match.rs index 4320133dfdb..fbe16f72f43 100644 --- a/tests/ui/consts/control-flow/exhaustive-c-like-enum-match.rs +++ b/tests/ui/consts/control-flow/exhaustive-c-like-enum-match.rs @@ -1,6 +1,6 @@ // Test for -// check-pass +//@ check-pass enum E { A, diff --git a/tests/ui/consts/control-flow/feature-gate-const-if-match.rs b/tests/ui/consts/control-flow/feature-gate-const-if-match.rs index cb66bc75309..ccf77b411d5 100644 --- a/tests/ui/consts/control-flow/feature-gate-const-if-match.rs +++ b/tests/ui/consts/control-flow/feature-gate-const-if-match.rs @@ -1,4 +1,4 @@ -// check-pass +//@ check-pass const _: i32 = if true { 5 } else { 6 }; diff --git a/tests/ui/consts/control-flow/short-circuit-let.rs b/tests/ui/consts/control-flow/short-circuit-let.rs index 8a58d06ac87..2d1a487ee09 100644 --- a/tests/ui/consts/control-flow/short-circuit-let.rs +++ b/tests/ui/consts/control-flow/short-circuit-let.rs @@ -1,6 +1,6 @@ // `&&` and `||` were previously forbidden in constants alongside let bindings. -// run-pass +//@ run-pass const X: i32 = { let mut x = 0; diff --git a/tests/ui/consts/control-flow/short-circuit.rs b/tests/ui/consts/control-flow/short-circuit.rs index 6abe107855f..4437106edf3 100644 --- a/tests/ui/consts/control-flow/short-circuit.rs +++ b/tests/ui/consts/control-flow/short-circuit.rs @@ -1,4 +1,4 @@ -// run-pass +//@ run-pass // Test that both `&&` and `||` actually short-circuit. // Formerly, both sides were evaluated unconditionally diff --git a/tests/ui/consts/control-flow/single_variant_match_ice.rs b/tests/ui/consts/control-flow/single_variant_match_ice.rs index b59be00ffb7..aa0cdc01837 100644 --- a/tests/ui/consts/control-flow/single_variant_match_ice.rs +++ b/tests/ui/consts/control-flow/single_variant_match_ice.rs @@ -1,4 +1,4 @@ -// check-pass +//@ check-pass enum Foo { Prob, diff --git a/tests/ui/consts/cycle-static-promoted.rs b/tests/ui/consts/cycle-static-promoted.rs index 5838dc58a3a..d648d048611 100644 --- a/tests/ui/consts/cycle-static-promoted.rs +++ b/tests/ui/consts/cycle-static-promoted.rs @@ -1,4 +1,4 @@ -// check-pass +//@ check-pass struct Value { values: &'static [&'static Value], diff --git a/tests/ui/consts/deref_in_pattern.rs b/tests/ui/consts/deref_in_pattern.rs index cc47b5b49c0..eb49a3dc78f 100644 --- a/tests/ui/consts/deref_in_pattern.rs +++ b/tests/ui/consts/deref_in_pattern.rs @@ -1,4 +1,4 @@ -// run-pass +//@ run-pass // https://github.com/rust-lang/rust/issues/25574 diff --git a/tests/ui/consts/drop-maybe_uninit.rs b/tests/ui/consts/drop-maybe_uninit.rs index 2fdeae5f185..91c1c8a9260 100644 --- a/tests/ui/consts/drop-maybe_uninit.rs +++ b/tests/ui/consts/drop-maybe_uninit.rs @@ -1,4 +1,4 @@ -// build-pass +//@ build-pass pub const fn f(_: [std::mem::MaybeUninit; N]) {} diff --git a/tests/ui/consts/drop_none.rs b/tests/ui/consts/drop_none.rs index 9d98d3be874..7991f119857 100644 --- a/tests/ui/consts/drop_none.rs +++ b/tests/ui/consts/drop_none.rs @@ -1,4 +1,4 @@ -// build-pass (FIXME(62277): could be check-pass?) +//@ build-pass (FIXME(62277): could be check-pass?) #![allow(dead_code)] struct A; impl Drop for A { diff --git a/tests/ui/consts/drop_zst.rs b/tests/ui/consts/drop_zst.rs index f7c70d3978b..40c66043f9f 100644 --- a/tests/ui/consts/drop_zst.rs +++ b/tests/ui/consts/drop_zst.rs @@ -1,4 +1,4 @@ -// check-fail +//@ check-fail #![feature(const_precise_live_drops)] diff --git a/tests/ui/consts/extra-const-ub/detect-extra-ub.rs b/tests/ui/consts/extra-const-ub/detect-extra-ub.rs index 39f918379d1..d2b157e03e7 100644 --- a/tests/ui/consts/extra-const-ub/detect-extra-ub.rs +++ b/tests/ui/consts/extra-const-ub/detect-extra-ub.rs @@ -1,6 +1,6 @@ -// revisions: no_flag with_flag -// [no_flag] check-pass -// [with_flag] compile-flags: -Zextra-const-ub-checks +//@ revisions: no_flag with_flag +//@ [no_flag] check-pass +//@ [with_flag] compile-flags: -Zextra-const-ub-checks #![feature(never_type)] use std::mem::transmute; diff --git a/tests/ui/consts/extra-const-ub/issue-100771.rs b/tests/ui/consts/extra-const-ub/issue-100771.rs index a3296032841..1ae6f25f7b1 100644 --- a/tests/ui/consts/extra-const-ub/issue-100771.rs +++ b/tests/ui/consts/extra-const-ub/issue-100771.rs @@ -1,5 +1,5 @@ -// check-pass -// compile-flags: -Zextra-const-ub-checks +//@ check-pass +//@ compile-flags: -Zextra-const-ub-checks #[derive(PartialEq, Eq, Copy, Clone)] #[repr(packed)] diff --git a/tests/ui/consts/extra-const-ub/issue-101034.rs b/tests/ui/consts/extra-const-ub/issue-101034.rs index e0de705c488..cb0a0fb0d5b 100644 --- a/tests/ui/consts/extra-const-ub/issue-101034.rs +++ b/tests/ui/consts/extra-const-ub/issue-101034.rs @@ -1,5 +1,5 @@ -// check-pass -// compile-flags: -Zextra-const-ub-checks +//@ check-pass +//@ compile-flags: -Zextra-const-ub-checks #[repr(packed)] pub struct Foo { diff --git a/tests/ui/consts/fn_trait_refs.rs b/tests/ui/consts/fn_trait_refs.rs index be11ac7264a..e9444e5c094 100644 --- a/tests/ui/consts/fn_trait_refs.rs +++ b/tests/ui/consts/fn_trait_refs.rs @@ -1,4 +1,4 @@ -// known-bug: #110395 +//@ known-bug: #110395 #![feature(const_fn_trait_ref_impls)] #![feature(fn_traits)] diff --git a/tests/ui/consts/huge-values.rs b/tests/ui/consts/huge-values.rs index 70a5b10e9be..e88683ca1dc 100644 --- a/tests/ui/consts/huge-values.rs +++ b/tests/ui/consts/huge-values.rs @@ -1,5 +1,5 @@ -// build-pass -// ignore-32bit +//@ build-pass +//@ ignore-32bit // This test is a canary test that will essentially not compile in a reasonable time frame // (so it'll take hours) if any of the optimizations regress. With the optimizations, these compile diff --git a/tests/ui/consts/ice-48279.rs b/tests/ui/consts/ice-48279.rs index d1d90df240c..5316974b80a 100644 --- a/tests/ui/consts/ice-48279.rs +++ b/tests/ui/consts/ice-48279.rs @@ -1,4 +1,4 @@ -// run-pass +//@ run-pass #![allow(dead_code)] #![allow(unused_unsafe)] diff --git a/tests/ui/consts/ice-zst-static-access.rs b/tests/ui/consts/ice-zst-static-access.rs index b68e442a57c..2a4343e3eba 100644 --- a/tests/ui/consts/ice-zst-static-access.rs +++ b/tests/ui/consts/ice-zst-static-access.rs @@ -1,4 +1,4 @@ -// check-pass +//@ check-pass // This is a regression test for ICEs from // https://github.com/rust-lang/rust/issues/71612 diff --git a/tests/ui/consts/inline_asm.rs b/tests/ui/consts/inline_asm.rs index 4cd7e2717fe..20ea6a8e994 100644 --- a/tests/ui/consts/inline_asm.rs +++ b/tests/ui/consts/inline_asm.rs @@ -1,4 +1,4 @@ -// needs-asm-support +//@ needs-asm-support use std::arch::asm; diff --git a/tests/ui/consts/int_ptr_for_zst_slices.rs b/tests/ui/consts/int_ptr_for_zst_slices.rs index 34e5bb322be..c6330f4739e 100644 --- a/tests/ui/consts/int_ptr_for_zst_slices.rs +++ b/tests/ui/consts/int_ptr_for_zst_slices.rs @@ -1,4 +1,4 @@ -// check-pass +//@ check-pass const FOO: &str = unsafe { &*(1_usize as *const [u8; 0] as *const [u8] as *const str) }; diff --git a/tests/ui/consts/interior-mut-const-via-union.rs b/tests/ui/consts/interior-mut-const-via-union.rs index 4f67ec97902..20485b90bf7 100644 --- a/tests/ui/consts/interior-mut-const-via-union.rs +++ b/tests/ui/consts/interior-mut-const-via-union.rs @@ -1,8 +1,8 @@ // Check that constants with interior mutability inside unions are rejected // during validation. // -// build-fail -// stderr-per-bitwidth +//@ build-fail +//@ stderr-per-bitwidth #![feature(const_mut_refs)] use std::cell::Cell; diff --git a/tests/ui/consts/invalid_promotion.rs b/tests/ui/consts/invalid_promotion.rs index a31eaf40e0e..1a92ddf382d 100644 --- a/tests/ui/consts/invalid_promotion.rs +++ b/tests/ui/consts/invalid_promotion.rs @@ -1,6 +1,6 @@ -// build-pass (FIXME(62277): could be check-pass?) +//@ build-pass (FIXME(62277): could be check-pass?) // note this was only reproducible with lib crates -// compile-flags: --crate-type=lib +//@ compile-flags: --crate-type=lib pub struct Hz; diff --git a/tests/ui/consts/is_val_statically_known.rs b/tests/ui/consts/is_val_statically_known.rs index 7362978301a..a9059817bcc 100644 --- a/tests/ui/consts/is_val_statically_known.rs +++ b/tests/ui/consts/is_val_statically_known.rs @@ -1,4 +1,4 @@ -// run-pass +//@ run-pass #![feature(core_intrinsics, is_val_statically_known)] diff --git a/tests/ui/consts/issue-104155.rs b/tests/ui/consts/issue-104155.rs index 7b375dc0566..ed3cd9c4bdf 100644 --- a/tests/ui/consts/issue-104155.rs +++ b/tests/ui/consts/issue-104155.rs @@ -1,4 +1,4 @@ -// check-pass +//@ check-pass #![allow(forgetting_copy_types)] diff --git a/tests/ui/consts/issue-104396.rs b/tests/ui/consts/issue-104396.rs index 315b0cf0fd6..f44abc359d6 100644 --- a/tests/ui/consts/issue-104396.rs +++ b/tests/ui/consts/issue-104396.rs @@ -1,5 +1,5 @@ -// compile-flags: -Zmir-opt-level=3 -// check-pass +//@ compile-flags: -Zmir-opt-level=3 +//@ check-pass #![feature(generic_const_exprs)] //~^ WARN the feature `generic_const_exprs` is incomplete diff --git a/tests/ui/consts/issue-105536-const-val-roundtrip-ptr-eq.rs b/tests/ui/consts/issue-105536-const-val-roundtrip-ptr-eq.rs index 1615399be32..7941947f25d 100644 --- a/tests/ui/consts/issue-105536-const-val-roundtrip-ptr-eq.rs +++ b/tests/ui/consts/issue-105536-const-val-roundtrip-ptr-eq.rs @@ -1,4 +1,4 @@ -// run-pass +//@ run-pass // This does not reflect a stable guarantee (we guarantee very little for equality of pointers // around `const`), but it would be good to understand what is happening if these assertions ever diff --git a/tests/ui/consts/issue-13837.rs b/tests/ui/consts/issue-13837.rs index 645b1c0eb87..305512cc41c 100644 --- a/tests/ui/consts/issue-13837.rs +++ b/tests/ui/consts/issue-13837.rs @@ -1,6 +1,6 @@ -// check-pass +//@ check-pass #![allow(dead_code)] -// pretty-expanded FIXME #23616 +//@ pretty-expanded FIXME #23616 struct TestStruct { x: *const [isize; 2] diff --git a/tests/ui/consts/issue-13902.rs b/tests/ui/consts/issue-13902.rs index 1afde0ebe85..b14f36dd218 100644 --- a/tests/ui/consts/issue-13902.rs +++ b/tests/ui/consts/issue-13902.rs @@ -1,4 +1,4 @@ -// run-pass +//@ run-pass #![allow(dead_code)] #![allow(non_camel_case_types)] diff --git a/tests/ui/consts/issue-17074.rs b/tests/ui/consts/issue-17074.rs index 0ed81132ec6..bd62602b6ef 100644 --- a/tests/ui/consts/issue-17074.rs +++ b/tests/ui/consts/issue-17074.rs @@ -1,4 +1,4 @@ -// run-pass +//@ run-pass #![allow(dead_code)] static X2: u64 = !0 as u16 as u64; diff --git a/tests/ui/consts/issue-17718-borrow-interior.rs b/tests/ui/consts/issue-17718-borrow-interior.rs index 5861f218689..9edff0c4147 100644 --- a/tests/ui/consts/issue-17718-borrow-interior.rs +++ b/tests/ui/consts/issue-17718-borrow-interior.rs @@ -1,4 +1,4 @@ -// run-pass +//@ run-pass #![allow(dead_code)] struct S { a: usize } diff --git a/tests/ui/consts/issue-17718.rs b/tests/ui/consts/issue-17718.rs index c6341d80844..b6c676886c1 100644 --- a/tests/ui/consts/issue-17718.rs +++ b/tests/ui/consts/issue-17718.rs @@ -1,6 +1,6 @@ -// run-pass +//@ run-pass #![allow(dead_code)] -// aux-build:issue-17718-aux.rs +//@ aux-build:issue-17718-aux.rs extern crate issue_17718_aux as other; diff --git a/tests/ui/consts/issue-17756.rs b/tests/ui/consts/issue-17756.rs index 1835b177ff3..8a419e8046d 100644 --- a/tests/ui/consts/issue-17756.rs +++ b/tests/ui/consts/issue-17756.rs @@ -1,4 +1,4 @@ -// run-pass +//@ run-pass #![allow(unused_variables)] #![allow(non_upper_case_globals)] diff --git a/tests/ui/consts/issue-19244.rs b/tests/ui/consts/issue-19244.rs index 44d9748fd2a..02a109cc65c 100644 --- a/tests/ui/consts/issue-19244.rs +++ b/tests/ui/consts/issue-19244.rs @@ -1,4 +1,4 @@ -// run-pass +//@ run-pass struct MyStruct { field: usize } struct Nested { nested: MyStruct } diff --git a/tests/ui/consts/issue-21562.rs b/tests/ui/consts/issue-21562.rs index a47d739c6be..87d97e436c5 100644 --- a/tests/ui/consts/issue-21562.rs +++ b/tests/ui/consts/issue-21562.rs @@ -1,4 +1,4 @@ -// build-pass +//@ build-pass #![allow(dead_code)] #![allow(non_upper_case_globals)] diff --git a/tests/ui/consts/issue-21721.rs b/tests/ui/consts/issue-21721.rs index 4c1411e1ecf..1300c4a7884 100644 --- a/tests/ui/consts/issue-21721.rs +++ b/tests/ui/consts/issue-21721.rs @@ -1,4 +1,4 @@ -// run-pass +//@ run-pass fn main() { static NONE: Option<((), &'static u8)> = None; diff --git a/tests/ui/consts/issue-23833.rs b/tests/ui/consts/issue-23833.rs index d4128fa54e3..1d595f5e9ac 100644 --- a/tests/ui/consts/issue-23833.rs +++ b/tests/ui/consts/issue-23833.rs @@ -1,4 +1,4 @@ -// run-pass +//@ run-pass #![allow(unused_imports)] use std::fmt; diff --git a/tests/ui/consts/issue-23968-const-not-overflow.rs b/tests/ui/consts/issue-23968-const-not-overflow.rs index b9593021235..88aff296051 100644 --- a/tests/ui/consts/issue-23968-const-not-overflow.rs +++ b/tests/ui/consts/issue-23968-const-not-overflow.rs @@ -1,4 +1,4 @@ -// run-pass +//@ run-pass const U8_MAX_HALF: u8 = !0u8 / 2; const U16_MAX_HALF: u16 = !0u16 / 2; const U32_MAX_HALF: u32 = !0u32 / 2; diff --git a/tests/ui/consts/issue-27890.rs b/tests/ui/consts/issue-27890.rs index 9f85473380f..143cb58e49e 100644 --- a/tests/ui/consts/issue-27890.rs +++ b/tests/ui/consts/issue-27890.rs @@ -1,4 +1,4 @@ -// run-pass +//@ run-pass static PLUS_ONE: &'static (dyn Fn(i32) -> i32 + Sync) = (&|x: i32| { x + 1 }) as &'static (dyn Fn(i32) -> i32 + Sync); diff --git a/tests/ui/consts/issue-28822.rs b/tests/ui/consts/issue-28822.rs index 10e5d1dd0ac..07c30bcf98d 100644 --- a/tests/ui/consts/issue-28822.rs +++ b/tests/ui/consts/issue-28822.rs @@ -1,4 +1,4 @@ -// check-pass +//@ check-pass #![allow(dead_code)] fn main() {} diff --git a/tests/ui/consts/issue-29798.rs b/tests/ui/consts/issue-29798.rs index 5eff5d1915b..bdabbad6491 100644 --- a/tests/ui/consts/issue-29798.rs +++ b/tests/ui/consts/issue-29798.rs @@ -1,6 +1,6 @@ -// run-fail -// error-pattern:index out of bounds: the len is 5 but the index is 5 -// ignore-emscripten no processes +//@ run-fail +//@ error-pattern:index out of bounds: the len is 5 but the index is 5 +//@ ignore-emscripten no processes const fn test(x: usize) -> i32 { [42;5][x] diff --git a/tests/ui/consts/issue-29914-2.rs b/tests/ui/consts/issue-29914-2.rs index 626de269d95..36a82f5b950 100644 --- a/tests/ui/consts/issue-29914-2.rs +++ b/tests/ui/consts/issue-29914-2.rs @@ -1,4 +1,4 @@ -// run-pass +//@ run-pass const ARR: [usize; 5] = [5, 4, 3, 2, 1]; fn main() { diff --git a/tests/ui/consts/issue-29914-3.rs b/tests/ui/consts/issue-29914-3.rs index 1c6c64eb316..575cd30e229 100644 --- a/tests/ui/consts/issue-29914-3.rs +++ b/tests/ui/consts/issue-29914-3.rs @@ -1,4 +1,4 @@ -// run-pass +//@ run-pass const ARR: [usize; 5] = [5, 4, 3, 2, 1]; const BLA: usize = ARR[ARR[3]]; diff --git a/tests/ui/consts/issue-29914.rs b/tests/ui/consts/issue-29914.rs index 6da63664dfa..7897733c723 100644 --- a/tests/ui/consts/issue-29914.rs +++ b/tests/ui/consts/issue-29914.rs @@ -1,4 +1,4 @@ -// run-pass +//@ run-pass #![allow(stable_features)] #![feature(const_indexing)] diff --git a/tests/ui/consts/issue-29927-1.rs b/tests/ui/consts/issue-29927-1.rs index a236e491375..544737765bb 100644 --- a/tests/ui/consts/issue-29927-1.rs +++ b/tests/ui/consts/issue-29927-1.rs @@ -1,4 +1,4 @@ -// run-pass +//@ run-pass #![allow(dead_code)] const fn f() -> usize { 5 diff --git a/tests/ui/consts/issue-29927.rs b/tests/ui/consts/issue-29927.rs index 3385e4e6e94..bda5138fcd2 100644 --- a/tests/ui/consts/issue-29927.rs +++ b/tests/ui/consts/issue-29927.rs @@ -1,4 +1,4 @@ -// run-pass +//@ run-pass #![allow(dead_code)] struct A { field: usize, diff --git a/tests/ui/consts/issue-33537.rs b/tests/ui/consts/issue-33537.rs index 3539aa64776..71e3418f555 100644 --- a/tests/ui/consts/issue-33537.rs +++ b/tests/ui/consts/issue-33537.rs @@ -1,4 +1,4 @@ -// run-pass +//@ run-pass const fn foo() -> *const i8 { b"foo" as *const _ as *const i8 diff --git a/tests/ui/consts/issue-33903.rs b/tests/ui/consts/issue-33903.rs index 613aa121a47..0355f4e7046 100644 --- a/tests/ui/consts/issue-33903.rs +++ b/tests/ui/consts/issue-33903.rs @@ -1,4 +1,4 @@ -// check-pass +//@ check-pass #![allow(dead_code)] // Issue 33903: // Built-in indexing should be used even when the index is not diff --git a/tests/ui/consts/issue-3521.fixed b/tests/ui/consts/issue-3521.fixed index f76106dfff1..e091328d7d7 100644 --- a/tests/ui/consts/issue-3521.fixed +++ b/tests/ui/consts/issue-3521.fixed @@ -1,4 +1,4 @@ -// run-rustfix +//@ run-rustfix fn main() { #[allow(non_upper_case_globals)] const foo: isize = 100; diff --git a/tests/ui/consts/issue-3521.rs b/tests/ui/consts/issue-3521.rs index c425a22df91..b31c6354ba4 100644 --- a/tests/ui/consts/issue-3521.rs +++ b/tests/ui/consts/issue-3521.rs @@ -1,4 +1,4 @@ -// run-rustfix +//@ run-rustfix fn main() { #[allow(non_upper_case_globals)] let foo: isize = 100; diff --git a/tests/ui/consts/issue-37222.rs b/tests/ui/consts/issue-37222.rs index 8ea5f6b7a27..a279e786bd7 100644 --- a/tests/ui/consts/issue-37222.rs +++ b/tests/ui/consts/issue-37222.rs @@ -1,4 +1,4 @@ -// run-pass +//@ run-pass #![allow(dead_code)] #[derive(Debug, PartialEq)] enum Bar { diff --git a/tests/ui/consts/issue-37550-1.rs b/tests/ui/consts/issue-37550-1.rs index 4d00ac7fd0d..ddd247cbe25 100644 --- a/tests/ui/consts/issue-37550-1.rs +++ b/tests/ui/consts/issue-37550-1.rs @@ -1,4 +1,4 @@ -// check-pass +//@ check-pass const fn x() { let t = true; diff --git a/tests/ui/consts/issue-37550.rs b/tests/ui/consts/issue-37550.rs index 724eb28291e..332e5db7a0f 100644 --- a/tests/ui/consts/issue-37550.rs +++ b/tests/ui/consts/issue-37550.rs @@ -1,4 +1,4 @@ -// run-pass +//@ run-pass #![allow(dead_code)] #![allow(unused_variables)] diff --git a/tests/ui/consts/issue-37991.rs b/tests/ui/consts/issue-37991.rs index a6ac4d5ca2e..1b8cb5210cd 100644 --- a/tests/ui/consts/issue-37991.rs +++ b/tests/ui/consts/issue-37991.rs @@ -1,4 +1,4 @@ -// run-pass +//@ run-pass const fn foo() -> i64 { 3 diff --git a/tests/ui/consts/issue-39161-bogus-error.rs b/tests/ui/consts/issue-39161-bogus-error.rs index a954385da41..2259872caa6 100644 --- a/tests/ui/consts/issue-39161-bogus-error.rs +++ b/tests/ui/consts/issue-39161-bogus-error.rs @@ -1,4 +1,4 @@ -// check-pass +//@ check-pass pub struct X { pub a: i32, diff --git a/tests/ui/consts/issue-44255.rs b/tests/ui/consts/issue-44255.rs index 22450320432..9b1e0ffa7cb 100644 --- a/tests/ui/consts/issue-44255.rs +++ b/tests/ui/consts/issue-44255.rs @@ -1,4 +1,4 @@ -// run-pass +//@ run-pass use std::marker::PhantomData; diff --git a/tests/ui/consts/issue-46553.rs b/tests/ui/consts/issue-46553.rs index abeaf10f2b5..668f752dacb 100644 --- a/tests/ui/consts/issue-46553.rs +++ b/tests/ui/consts/issue-46553.rs @@ -1,4 +1,4 @@ -// run-pass +//@ run-pass pub struct Data { function: fn() -> T, diff --git a/tests/ui/consts/issue-47789.rs b/tests/ui/consts/issue-47789.rs index 32dd909b2e9..a6acfbb8ee6 100644 --- a/tests/ui/consts/issue-47789.rs +++ b/tests/ui/consts/issue-47789.rs @@ -1,4 +1,4 @@ -// check-pass +//@ check-pass #![allow(non_upper_case_globals)] static mut x: &'static u32 = &0; diff --git a/tests/ui/consts/issue-54348.rs b/tests/ui/consts/issue-54348.rs index 5c38d7c42f6..9710d6de838 100644 --- a/tests/ui/consts/issue-54348.rs +++ b/tests/ui/consts/issue-54348.rs @@ -1,4 +1,4 @@ -// build-fail +//@ build-fail fn main() { [1][0u64 as usize]; diff --git a/tests/ui/consts/issue-54387.rs b/tests/ui/consts/issue-54387.rs index 60e3a02f4ce..371d89ad32b 100644 --- a/tests/ui/consts/issue-54387.rs +++ b/tests/ui/consts/issue-54387.rs @@ -1,4 +1,4 @@ -// check-pass +//@ check-pass pub struct GstRc { _obj: *const (), diff --git a/tests/ui/consts/issue-54582.rs b/tests/ui/consts/issue-54582.rs index 8c50cac67f8..90866ab4ce2 100644 --- a/tests/ui/consts/issue-54582.rs +++ b/tests/ui/consts/issue-54582.rs @@ -1,4 +1,4 @@ -// run-pass +//@ run-pass pub trait Stage: Sync {} diff --git a/tests/ui/consts/issue-58435-ice-with-assoc-const.rs b/tests/ui/consts/issue-58435-ice-with-assoc-const.rs index fac727d2d7d..6b4722d349e 100644 --- a/tests/ui/consts/issue-58435-ice-with-assoc-const.rs +++ b/tests/ui/consts/issue-58435-ice-with-assoc-const.rs @@ -1,4 +1,4 @@ -// run-pass +//@ run-pass // The const-evaluator was at one point ICE'ing while trying to // evaluate the body of `fn id` during the `s.id()` call in main. diff --git a/tests/ui/consts/issue-62045.rs b/tests/ui/consts/issue-62045.rs index 5abed374a6d..5dac2a18b7b 100644 --- a/tests/ui/consts/issue-62045.rs +++ b/tests/ui/consts/issue-62045.rs @@ -1,4 +1,4 @@ -// check-pass +//@ check-pass fn main() { assert_eq!(&mut [0; 1][..], &mut []); diff --git a/tests/ui/consts/issue-63226.rs b/tests/ui/consts/issue-63226.rs index deec4499008..f8ceab33925 100644 --- a/tests/ui/consts/issue-63226.rs +++ b/tests/ui/consts/issue-63226.rs @@ -1,7 +1,7 @@ -// aux-build:issue-63226.rs -// compile-flags:--extern issue_63226 -// edition:2018 -// build-pass +//@ aux-build:issue-63226.rs +//@ compile-flags:--extern issue_63226 +//@ edition:2018 +//@ build-pass // A regression test for issue #63226. // Checks if `const fn` is marked as reachable. diff --git a/tests/ui/consts/issue-63952.rs b/tests/ui/consts/issue-63952.rs index 5c83e6f45c9..aee06f8eb04 100644 --- a/tests/ui/consts/issue-63952.rs +++ b/tests/ui/consts/issue-63952.rs @@ -1,5 +1,5 @@ // Regression test for #63952, shouldn't hang. -// stderr-per-bitwidth +//@ stderr-per-bitwidth #[repr(C)] #[derive(Copy, Clone)] diff --git a/tests/ui/consts/issue-64059.rs b/tests/ui/consts/issue-64059.rs index 02c8b725032..8bb2d0fe05a 100644 --- a/tests/ui/consts/issue-64059.rs +++ b/tests/ui/consts/issue-64059.rs @@ -1,9 +1,9 @@ -// revisions: noopt opt opt_with_overflow_checks -//[noopt]compile-flags: -C opt-level=0 -//[opt]compile-flags: -O -//[opt_with_overflow_checks]compile-flags: -C overflow-checks=on -O +//@ revisions: noopt opt opt_with_overflow_checks +//@[noopt]compile-flags: -C opt-level=0 +//@[opt]compile-flags: -O +//@[opt_with_overflow_checks]compile-flags: -C overflow-checks=on -O -// run-pass +//@ run-pass fn main() { let _ = -(-0.0); diff --git a/tests/ui/consts/issue-64506.rs b/tests/ui/consts/issue-64506.rs index 9275a8a072d..096d29cbe49 100644 --- a/tests/ui/consts/issue-64506.rs +++ b/tests/ui/consts/issue-64506.rs @@ -1,4 +1,4 @@ -// check-fail +//@ check-fail #[derive(Copy, Clone)] pub struct ChildStdin { diff --git a/tests/ui/consts/issue-65348.rs b/tests/ui/consts/issue-65348.rs index 01bf2a3fa42..1443fcbe1c1 100644 --- a/tests/ui/consts/issue-65348.rs +++ b/tests/ui/consts/issue-65348.rs @@ -1,4 +1,4 @@ -// check-pass +//@ check-pass struct Generic(T); diff --git a/tests/ui/consts/issue-66342.rs b/tests/ui/consts/issue-66342.rs index 417f6904165..0a87f789e48 100644 --- a/tests/ui/consts/issue-66342.rs +++ b/tests/ui/consts/issue-66342.rs @@ -1,5 +1,5 @@ -// check-pass -// only-x86_64 +//@ check-pass +//@ only-x86_64 // Checks that the compiler does not actually try to allocate 4 TB during compilation and OOM crash. diff --git a/tests/ui/consts/issue-66345.rs b/tests/ui/consts/issue-66345.rs index 4971d96476f..a69ce7f191a 100644 --- a/tests/ui/consts/issue-66345.rs +++ b/tests/ui/consts/issue-66345.rs @@ -1,5 +1,5 @@ -// run-pass -// compile-flags: -Z mir-opt-level=4 +//@ run-pass +//@ compile-flags: -Z mir-opt-level=4 // Checks that the compiler does not ICE when passing references to field of by-value struct // with -Z mir-opt-level=4 diff --git a/tests/ui/consts/issue-66397.rs b/tests/ui/consts/issue-66397.rs index 1b4aff43b5b..f6c8854dc78 100644 --- a/tests/ui/consts/issue-66397.rs +++ b/tests/ui/consts/issue-66397.rs @@ -1,5 +1,5 @@ -// check-pass -// only-x86_64 +//@ check-pass +//@ only-x86_64 // Checks that the compiler does not actually try to allocate 4 TB during compilation and OOM crash. diff --git a/tests/ui/consts/issue-66787.rs b/tests/ui/consts/issue-66787.rs index 612b795eb5c..142c5f65a4e 100644 --- a/tests/ui/consts/issue-66787.rs +++ b/tests/ui/consts/issue-66787.rs @@ -1,5 +1,5 @@ -// build-pass -// compile-flags: --crate-type lib +//@ build-pass +//@ compile-flags: --crate-type lib // Regression test for ICE which occurred when const propagating an enum with three variants // one of which is uninhabited. diff --git a/tests/ui/consts/issue-67529.rs b/tests/ui/consts/issue-67529.rs index dd24c2d27e2..39fca411201 100644 --- a/tests/ui/consts/issue-67529.rs +++ b/tests/ui/consts/issue-67529.rs @@ -1,5 +1,5 @@ -// compile-flags: -Z mir-opt-level=3 -// run-pass +//@ compile-flags: -Z mir-opt-level=3 +//@ run-pass struct Baz { a: T diff --git a/tests/ui/consts/issue-67640.rs b/tests/ui/consts/issue-67640.rs index 4c71a2e0224..e5b0a563935 100644 --- a/tests/ui/consts/issue-67640.rs +++ b/tests/ui/consts/issue-67640.rs @@ -1,5 +1,5 @@ -// compile-flags: -Z mir-opt-level=4 -// run-pass +//@ compile-flags: -Z mir-opt-level=4 +//@ run-pass struct X { x: isize diff --git a/tests/ui/consts/issue-67641.rs b/tests/ui/consts/issue-67641.rs index e5a74f15654..4a211bb2921 100644 --- a/tests/ui/consts/issue-67641.rs +++ b/tests/ui/consts/issue-67641.rs @@ -1,5 +1,5 @@ -// compile-flags: -Z mir-opt-level=3 -// run-pass +//@ compile-flags: -Z mir-opt-level=3 +//@ run-pass use std::cell::Cell; diff --git a/tests/ui/consts/issue-67696-const-prop-ice.rs b/tests/ui/consts/issue-67696-const-prop-ice.rs index 858035190ca..09e5ba74c33 100644 --- a/tests/ui/consts/issue-67696-const-prop-ice.rs +++ b/tests/ui/consts/issue-67696-const-prop-ice.rs @@ -1,5 +1,5 @@ -// check-pass -// compile-flags: --emit=mir,link -Zmir-opt-level=4 +//@ check-pass +//@ compile-flags: --emit=mir,link -Zmir-opt-level=4 // Checks that we don't ICE due to attempting to run const prop // on a function with unsatisifable 'where' clauses diff --git a/tests/ui/consts/issue-67862.rs b/tests/ui/consts/issue-67862.rs index b9e96a87f14..cac617fbd54 100644 --- a/tests/ui/consts/issue-67862.rs +++ b/tests/ui/consts/issue-67862.rs @@ -1,5 +1,5 @@ -// compile-flags: -Z mir-opt-level=3 -// run-pass +//@ compile-flags: -Z mir-opt-level=3 +//@ run-pass fn e220() -> (i64, i64) { #[inline(never)] diff --git a/tests/ui/consts/issue-68264-overflow.rs b/tests/ui/consts/issue-68264-overflow.rs index 8f21e0648d4..6a1d57ea67f 100644 --- a/tests/ui/consts/issue-68264-overflow.rs +++ b/tests/ui/consts/issue-68264-overflow.rs @@ -1,5 +1,5 @@ -// check-pass -// compile-flags: --emit=mir,link +//@ check-pass +//@ compile-flags: --emit=mir,link // Regression test for issue #68264 // Checks that we don't encounter overflow // when running const-prop on functions with diff --git a/tests/ui/consts/issue-68684.rs b/tests/ui/consts/issue-68684.rs index c98f199b60e..d2ba405d669 100644 --- a/tests/ui/consts/issue-68684.rs +++ b/tests/ui/consts/issue-68684.rs @@ -1,4 +1,4 @@ -// check-pass +//@ check-pass enum _Enum { A(), diff --git a/tests/ui/consts/issue-69191-ice-on-uninhabited-enum-field.rs b/tests/ui/consts/issue-69191-ice-on-uninhabited-enum-field.rs index 5b7c7be42cf..e29e1e2b19c 100644 --- a/tests/ui/consts/issue-69191-ice-on-uninhabited-enum-field.rs +++ b/tests/ui/consts/issue-69191-ice-on-uninhabited-enum-field.rs @@ -1,4 +1,4 @@ -// build-pass +//@ build-pass // // (this is deliberately *not* check-pass; I have confirmed that the bug in // question does not replicate when one uses `cargo check` alone.) diff --git a/tests/ui/consts/issue-69312.rs b/tests/ui/consts/issue-69312.rs index 413c6752079..1c0dc1f87ea 100644 --- a/tests/ui/consts/issue-69312.rs +++ b/tests/ui/consts/issue-69312.rs @@ -1,4 +1,4 @@ -// build-pass +//@ build-pass // Verify that the compiler doesn't ICE during const prop while evaluating the index operation. diff --git a/tests/ui/consts/issue-69488.rs b/tests/ui/consts/issue-69488.rs index 46546eada7a..35071999111 100644 --- a/tests/ui/consts/issue-69488.rs +++ b/tests/ui/consts/issue-69488.rs @@ -1,4 +1,4 @@ -// run-pass +//@ run-pass #![feature(const_ptr_write)] #![feature(const_mut_refs)] diff --git a/tests/ui/consts/issue-69532.rs b/tests/ui/consts/issue-69532.rs index 0a891781299..285cfe7213b 100644 --- a/tests/ui/consts/issue-69532.rs +++ b/tests/ui/consts/issue-69532.rs @@ -1,4 +1,4 @@ -// run-pass +//@ run-pass const fn make_nans() -> (f64, f64, f32, f32) { let nan1: f64 = unsafe { std::mem::transmute(0x7FF0_0001_0000_0001u64) }; diff --git a/tests/ui/consts/issue-6991.rs b/tests/ui/consts/issue-6991.rs index f00cd9aeffd..3e4a8b09f89 100644 --- a/tests/ui/consts/issue-6991.rs +++ b/tests/ui/consts/issue-6991.rs @@ -1,4 +1,4 @@ -// check-pass +//@ check-pass #![allow(dead_code)] #![allow(non_upper_case_globals)] diff --git a/tests/ui/consts/issue-70773-mir-typeck-lt-norm.rs b/tests/ui/consts/issue-70773-mir-typeck-lt-norm.rs index f82ec005a01..97462a705d5 100644 --- a/tests/ui/consts/issue-70773-mir-typeck-lt-norm.rs +++ b/tests/ui/consts/issue-70773-mir-typeck-lt-norm.rs @@ -1,4 +1,4 @@ -// run-pass +//@ run-pass const HASH_LEN: usize = 20; struct Hash(#[allow(dead_code)] [u8; HASH_LEN]); diff --git a/tests/ui/consts/issue-73976-monomorphic.rs b/tests/ui/consts/issue-73976-monomorphic.rs index a3b9510036d..561c1976051 100644 --- a/tests/ui/consts/issue-73976-monomorphic.rs +++ b/tests/ui/consts/issue-73976-monomorphic.rs @@ -1,4 +1,4 @@ -// known-bug: #110395 +//@ known-bug: #110395 // // This test is complement to the test in issue-73976-polymorphic.rs. // In that test we ensure that polymorphic use of type_id and type_name in patterns diff --git a/tests/ui/consts/issue-77062-large-zst-array.rs b/tests/ui/consts/issue-77062-large-zst-array.rs index 0566b802e75..ef5178fba95 100644 --- a/tests/ui/consts/issue-77062-large-zst-array.rs +++ b/tests/ui/consts/issue-77062-large-zst-array.rs @@ -1,4 +1,4 @@ -// build-pass +//@ build-pass fn main() { let _ = &[(); usize::MAX]; diff --git a/tests/ui/consts/issue-79137-monomorphic.rs b/tests/ui/consts/issue-79137-monomorphic.rs index 58e0c387ffb..d98982b4af6 100644 --- a/tests/ui/consts/issue-79137-monomorphic.rs +++ b/tests/ui/consts/issue-79137-monomorphic.rs @@ -1,4 +1,4 @@ -// check-pass +//@ check-pass // Verify that variant count intrinsic can still evaluate for types like `Option`. diff --git a/tests/ui/consts/issue-79152-const-array-index.rs b/tests/ui/consts/issue-79152-const-array-index.rs index 95518e1bbdb..f5471fb7482 100644 --- a/tests/ui/consts/issue-79152-const-array-index.rs +++ b/tests/ui/consts/issue-79152-const-array-index.rs @@ -1,4 +1,4 @@ -// check-pass +//@ check-pass // Regression test for issue #79152 // // Tests that we can index an array in a const function diff --git a/tests/ui/consts/issue-79690.rs b/tests/ui/consts/issue-79690.rs index 56747bf5a11..3da4cb73f11 100644 --- a/tests/ui/consts/issue-79690.rs +++ b/tests/ui/consts/issue-79690.rs @@ -1,6 +1,6 @@ -// ignore-32bit +//@ ignore-32bit // This test gives a different error on 32-bit architectures. -// stderr-per-bitwidth +//@ stderr-per-bitwidth union Transmute { t: T, diff --git a/tests/ui/consts/issue-88071.rs b/tests/ui/consts/issue-88071.rs index f58cdb5945e..327daad9b32 100644 --- a/tests/ui/consts/issue-88071.rs +++ b/tests/ui/consts/issue-88071.rs @@ -1,4 +1,4 @@ -// check-pass +//@ check-pass // // regression test for #88071 diff --git a/tests/ui/consts/issue-88649.rs b/tests/ui/consts/issue-88649.rs index 43e562b5a7d..739b97ff708 100644 --- a/tests/ui/consts/issue-88649.rs +++ b/tests/ui/consts/issue-88649.rs @@ -1,4 +1,4 @@ -// check-pass +//@ check-pass #![crate_type = "lib"] enum Foo { diff --git a/tests/ui/consts/issue-89088.rs b/tests/ui/consts/issue-89088.rs index 40cc665fb61..d0782963dfc 100644 --- a/tests/ui/consts/issue-89088.rs +++ b/tests/ui/consts/issue-89088.rs @@ -1,6 +1,6 @@ // Regression test for the ICE described in #89088. -// check-pass +//@ check-pass #![allow(indirect_structural_match)] use std::borrow::Cow; diff --git a/tests/ui/consts/issue-90762.rs b/tests/ui/consts/issue-90762.rs index 78d387386f8..db40e50d499 100644 --- a/tests/ui/consts/issue-90762.rs +++ b/tests/ui/consts/issue-90762.rs @@ -1,4 +1,4 @@ -// run-pass +//@ run-pass #![allow(unreachable_code)] use std::sync::atomic::{AtomicBool, Ordering, AtomicUsize}; diff --git a/tests/ui/consts/issue-90870.fixed b/tests/ui/consts/issue-90870.fixed index df44689efed..c125501f61c 100644 --- a/tests/ui/consts/issue-90870.fixed +++ b/tests/ui/consts/issue-90870.fixed @@ -1,6 +1,6 @@ // Regression test for issue #90870. -// run-rustfix +//@ run-rustfix #![allow(dead_code)] diff --git a/tests/ui/consts/issue-90870.rs b/tests/ui/consts/issue-90870.rs index 676ac73c64d..94254fb27f9 100644 --- a/tests/ui/consts/issue-90870.rs +++ b/tests/ui/consts/issue-90870.rs @@ -1,6 +1,6 @@ // Regression test for issue #90870. -// run-rustfix +//@ run-rustfix #![allow(dead_code)] diff --git a/tests/ui/consts/issue-91560.fixed b/tests/ui/consts/issue-91560.fixed index 41b9d95734a..b975e6ee958 100644 --- a/tests/ui/consts/issue-91560.fixed +++ b/tests/ui/consts/issue-91560.fixed @@ -1,6 +1,6 @@ // Regression test for issue #91560. -// run-rustfix +//@ run-rustfix #![allow(unused,non_upper_case_globals)] diff --git a/tests/ui/consts/issue-91560.rs b/tests/ui/consts/issue-91560.rs index 04592feb505..5e7e1cbe1e5 100644 --- a/tests/ui/consts/issue-91560.rs +++ b/tests/ui/consts/issue-91560.rs @@ -1,6 +1,6 @@ // Regression test for issue #91560. -// run-rustfix +//@ run-rustfix #![allow(unused,non_upper_case_globals)] diff --git a/tests/ui/consts/issue-94371.rs b/tests/ui/consts/issue-94371.rs index de9ff730b66..3484437e571 100644 --- a/tests/ui/consts/issue-94371.rs +++ b/tests/ui/consts/issue-94371.rs @@ -1,4 +1,4 @@ -// check-pass +//@ check-pass #![feature(const_swap)] #![feature(const_mut_refs)] diff --git a/tests/ui/consts/issue-94675.rs b/tests/ui/consts/issue-94675.rs index 2358175fe92..00f5c3251e0 100644 --- a/tests/ui/consts/issue-94675.rs +++ b/tests/ui/consts/issue-94675.rs @@ -1,4 +1,4 @@ -// known-bug: #103507 +//@ known-bug: #103507 #![feature(const_trait_impl, const_mut_refs)] diff --git a/tests/ui/consts/issue-96169.rs b/tests/ui/consts/issue-96169.rs index 14c0a1399a0..24131f7f6ac 100644 --- a/tests/ui/consts/issue-96169.rs +++ b/tests/ui/consts/issue-96169.rs @@ -1,5 +1,5 @@ -// check-pass -// compile-flags: -Zmir-opt-level=4 --emit=mir +//@ check-pass +//@ compile-flags: -Zmir-opt-level=4 --emit=mir #![allow(unused)] fn a() -> usize { 0 } diff --git a/tests/ui/consts/issue-broken-mir.rs b/tests/ui/consts/issue-broken-mir.rs index 36f0ff92104..25219f4c335 100644 --- a/tests/ui/consts/issue-broken-mir.rs +++ b/tests/ui/consts/issue-broken-mir.rs @@ -1,4 +1,4 @@ -// run-pass +//@ run-pass // https://github.com/rust-lang/rust/issues/27918 diff --git a/tests/ui/consts/issue-miri-1910.rs b/tests/ui/consts/issue-miri-1910.rs index 3798332dfd7..a66cb6b6665 100644 --- a/tests/ui/consts/issue-miri-1910.rs +++ b/tests/ui/consts/issue-miri-1910.rs @@ -1,5 +1,5 @@ -// error-pattern unable to turn pointer into raw bytes -// normalize-stderr-test: "alloc[0-9]+\+0x[a-z0-9]+" -> "ALLOC" +//@ error-pattern unable to turn pointer into raw bytes +//@ normalize-stderr-test: "alloc[0-9]+\+0x[a-z0-9]+" -> "ALLOC" const C: () = unsafe { let foo = Some(&42 as *const i32); diff --git a/tests/ui/consts/large_const_alloc.rs b/tests/ui/consts/large_const_alloc.rs index 298ed38d180..61a22216ae5 100644 --- a/tests/ui/consts/large_const_alloc.rs +++ b/tests/ui/consts/large_const_alloc.rs @@ -1,4 +1,4 @@ -// only-64bit +//@ only-64bit // on 32bit and 16bit platforms it is plausible that the maximum allocation size will succeed const FOO: () = { diff --git a/tests/ui/consts/let-irrefutable-pattern-ice-120337.rs b/tests/ui/consts/let-irrefutable-pattern-ice-120337.rs index 7da6b7ca285..e0d1d515deb 100644 --- a/tests/ui/consts/let-irrefutable-pattern-ice-120337.rs +++ b/tests/ui/consts/let-irrefutable-pattern-ice-120337.rs @@ -1,4 +1,4 @@ -// check-pass +//@ check-pass #![feature(never_type)] #[derive(Copy, Clone)] pub enum E { A(!), } diff --git a/tests/ui/consts/locals-in-const-fn.rs b/tests/ui/consts/locals-in-const-fn.rs index 95d50171a84..98f230320f6 100644 --- a/tests/ui/consts/locals-in-const-fn.rs +++ b/tests/ui/consts/locals-in-const-fn.rs @@ -1,4 +1,4 @@ -// run-pass +//@ run-pass // https://github.com/rust-lang/rust/issues/48821 diff --git a/tests/ui/consts/match-const-fn-structs.rs b/tests/ui/consts/match-const-fn-structs.rs index 5a68048c477..49bb15977b8 100644 --- a/tests/ui/consts/match-const-fn-structs.rs +++ b/tests/ui/consts/match-const-fn-structs.rs @@ -1,4 +1,4 @@ -// run-pass +//@ run-pass #![allow(unused_variables)] // https://github.com/rust-lang/rust/issues/46114 diff --git a/tests/ui/consts/min_const_fn/address_of_const.rs b/tests/ui/consts/min_const_fn/address_of_const.rs index 3db19e9cde8..4280d0745c1 100644 --- a/tests/ui/consts/min_const_fn/address_of_const.rs +++ b/tests/ui/consts/min_const_fn/address_of_const.rs @@ -1,4 +1,4 @@ -// check-pass +//@ check-pass #![feature(raw_ref_op)] diff --git a/tests/ui/consts/min_const_fn/allow_const_fn_ptr_run_pass.rs b/tests/ui/consts/min_const_fn/allow_const_fn_ptr_run_pass.rs index 2dbc424d3ba..a97eeadd92f 100644 --- a/tests/ui/consts/min_const_fn/allow_const_fn_ptr_run_pass.rs +++ b/tests/ui/consts/min_const_fn/allow_const_fn_ptr_run_pass.rs @@ -1,4 +1,4 @@ -// run-pass +//@ run-pass #![feature(rustc_allow_const_fn_unstable)] #![feature(rustc_attrs, staged_api)] diff --git a/tests/ui/consts/min_const_fn/allow_raw_ptr_dereference_const_fn.rs b/tests/ui/consts/min_const_fn/allow_raw_ptr_dereference_const_fn.rs index d2211575560..8928ad44a70 100644 --- a/tests/ui/consts/min_const_fn/allow_raw_ptr_dereference_const_fn.rs +++ b/tests/ui/consts/min_const_fn/allow_raw_ptr_dereference_const_fn.rs @@ -1,4 +1,4 @@ -// check-pass +//@ check-pass use std::ptr; diff --git a/tests/ui/consts/min_const_fn/cast_fn.rs b/tests/ui/consts/min_const_fn/cast_fn.rs index 85802a51490..8c0a109781f 100644 --- a/tests/ui/consts/min_const_fn/cast_fn.rs +++ b/tests/ui/consts/min_const_fn/cast_fn.rs @@ -1,4 +1,4 @@ -// check-pass +//@ check-pass fn main() {} diff --git a/tests/ui/consts/min_const_fn/min_const_fn_dyn.rs b/tests/ui/consts/min_const_fn/min_const_fn_dyn.rs index 36c8880093e..8335375dcfc 100644 --- a/tests/ui/consts/min_const_fn/min_const_fn_dyn.rs +++ b/tests/ui/consts/min_const_fn/min_const_fn_dyn.rs @@ -1,4 +1,4 @@ -// check-pass +//@ check-pass struct HasDyn { field: &'static dyn std::fmt::Debug, diff --git a/tests/ui/consts/min_const_fn/min_const_fn_libstd.rs b/tests/ui/consts/min_const_fn/min_const_fn_libstd.rs index cb8f74186bd..14a995aca31 100644 --- a/tests/ui/consts/min_const_fn/min_const_fn_libstd.rs +++ b/tests/ui/consts/min_const_fn/min_const_fn_libstd.rs @@ -1,4 +1,4 @@ -// build-pass (FIXME(62277): could be check-pass?) +//@ build-pass (FIXME(62277): could be check-pass?) use std::cell::UnsafeCell; use std::sync::atomic::AtomicU32; diff --git a/tests/ui/consts/min_const_fn/min_const_fn_unsafe_ok.rs b/tests/ui/consts/min_const_fn/min_const_fn_unsafe_ok.rs index 02c7970deca..06e7d6f5d70 100644 --- a/tests/ui/consts/min_const_fn/min_const_fn_unsafe_ok.rs +++ b/tests/ui/consts/min_const_fn/min_const_fn_unsafe_ok.rs @@ -1,4 +1,4 @@ -// check-pass +//@ check-pass const unsafe fn ret_i32_no_unsafe() -> i32 { 42 } const unsafe fn ret_null_ptr_no_unsafe() -> *const T { std::ptr::null() } diff --git a/tests/ui/consts/miri_unleashed/abi-mismatch.rs b/tests/ui/consts/miri_unleashed/abi-mismatch.rs index 205f7183b75..57680479a17 100644 --- a/tests/ui/consts/miri_unleashed/abi-mismatch.rs +++ b/tests/ui/consts/miri_unleashed/abi-mismatch.rs @@ -1,5 +1,5 @@ // Checks that we report ABI mismatches for "const extern fn" -// compile-flags: -Z unleash-the-miri-inside-of-you +//@ compile-flags: -Z unleash-the-miri-inside-of-you #![feature(const_extern_fn)] diff --git a/tests/ui/consts/miri_unleashed/assoc_const.rs b/tests/ui/consts/miri_unleashed/assoc_const.rs index 7bb0c1b772a..db37197f190 100644 --- a/tests/ui/consts/miri_unleashed/assoc_const.rs +++ b/tests/ui/consts/miri_unleashed/assoc_const.rs @@ -1,5 +1,5 @@ -// build-fail -// compile-flags: -Zunleash-the-miri-inside-of-you +//@ build-fail +//@ compile-flags: -Zunleash-the-miri-inside-of-you // a test demonstrating why we do need to run static const qualification on associated constants // instead of just checking the final constant diff --git a/tests/ui/consts/miri_unleashed/assoc_const_2.rs b/tests/ui/consts/miri_unleashed/assoc_const_2.rs index aad5b34606e..5490c096391 100644 --- a/tests/ui/consts/miri_unleashed/assoc_const_2.rs +++ b/tests/ui/consts/miri_unleashed/assoc_const_2.rs @@ -1,4 +1,4 @@ -// build-fail +//@ build-fail // a test demonstrating that const qualification cannot prevent monomorphization time errors diff --git a/tests/ui/consts/miri_unleashed/box.rs b/tests/ui/consts/miri_unleashed/box.rs index 39cddda2b80..89df4526b07 100644 --- a/tests/ui/consts/miri_unleashed/box.rs +++ b/tests/ui/consts/miri_unleashed/box.rs @@ -1,4 +1,4 @@ -// compile-flags: -Zunleash-the-miri-inside-of-you +//@ compile-flags: -Zunleash-the-miri-inside-of-you use std::mem::ManuallyDrop; diff --git a/tests/ui/consts/miri_unleashed/const_refers_to_static.rs b/tests/ui/consts/miri_unleashed/const_refers_to_static.rs index 212003deba3..31f89030bb3 100644 --- a/tests/ui/consts/miri_unleashed/const_refers_to_static.rs +++ b/tests/ui/consts/miri_unleashed/const_refers_to_static.rs @@ -1,6 +1,6 @@ -// compile-flags: -Zunleash-the-miri-inside-of-you -// normalize-stderr-test "(the raw bytes of the constant) \(size: [0-9]*, align: [0-9]*\)" -> "$1 (size: $$SIZE, align: $$ALIGN)" -// normalize-stderr-test "([0-9a-f][0-9a-f] |╾─*ALLOC[0-9]+(\+[a-z0-9]+)?()?─*╼ )+ *│.*" -> "HEX_DUMP" +//@ compile-flags: -Zunleash-the-miri-inside-of-you +//@ normalize-stderr-test "(the raw bytes of the constant) \(size: [0-9]*, align: [0-9]*\)" -> "$1 (size: $$SIZE, align: $$ALIGN)" +//@ normalize-stderr-test "([0-9a-f][0-9a-f] |╾─*ALLOC[0-9]+(\+[a-z0-9]+)?()?─*╼ )+ *│.*" -> "HEX_DUMP" use std::sync::atomic::AtomicUsize; use std::sync::atomic::Ordering; diff --git a/tests/ui/consts/miri_unleashed/const_refers_to_static_cross_crate.rs b/tests/ui/consts/miri_unleashed/const_refers_to_static_cross_crate.rs index 783b3d18051..6ec44aab2c1 100644 --- a/tests/ui/consts/miri_unleashed/const_refers_to_static_cross_crate.rs +++ b/tests/ui/consts/miri_unleashed/const_refers_to_static_cross_crate.rs @@ -1,7 +1,7 @@ -// compile-flags: -Zunleash-the-miri-inside-of-you -// aux-build:static_cross_crate.rs -// normalize-stderr-test "(the raw bytes of the constant) \(size: [0-9]*, align: [0-9]*\)" -> "$1 (size: $$SIZE, align: $$ALIGN)" -// normalize-stderr-test "([0-9a-f][0-9a-f] |╾─*ALLOC[0-9]+(\+[a-z0-9]+)?()?─*╼ )+ *│.*" -> "HEX_DUMP" +//@ compile-flags: -Zunleash-the-miri-inside-of-you +//@ aux-build:static_cross_crate.rs +//@ normalize-stderr-test "(the raw bytes of the constant) \(size: [0-9]*, align: [0-9]*\)" -> "$1 (size: $$SIZE, align: $$ALIGN)" +//@ normalize-stderr-test "([0-9a-f][0-9a-f] |╾─*ALLOC[0-9]+(\+[a-z0-9]+)?()?─*╼ )+ *│.*" -> "HEX_DUMP" #![feature(exclusive_range_pattern, half_open_range_patterns_in_slices)] #![allow(static_mut_ref)] diff --git a/tests/ui/consts/miri_unleashed/drop.rs b/tests/ui/consts/miri_unleashed/drop.rs index 3942e7ef734..45ade4906b8 100644 --- a/tests/ui/consts/miri_unleashed/drop.rs +++ b/tests/ui/consts/miri_unleashed/drop.rs @@ -1,5 +1,5 @@ -// compile-flags: -Zunleash-the-miri-inside-of-you -// error-pattern: calling non-const function ` as Drop>::drop` +//@ compile-flags: -Zunleash-the-miri-inside-of-you +//@ error-pattern: calling non-const function ` as Drop>::drop` use std::mem::ManuallyDrop; diff --git a/tests/ui/consts/miri_unleashed/extern-static.rs b/tests/ui/consts/miri_unleashed/extern-static.rs index 81176b3d4e9..1a523cc8e31 100644 --- a/tests/ui/consts/miri_unleashed/extern-static.rs +++ b/tests/ui/consts/miri_unleashed/extern-static.rs @@ -1,4 +1,4 @@ -// compile-flags: -Zunleash-the-miri-inside-of-you +//@ compile-flags: -Zunleash-the-miri-inside-of-you #![feature(thread_local)] #![allow(static_mut_ref)] diff --git a/tests/ui/consts/miri_unleashed/inline_asm.rs b/tests/ui/consts/miri_unleashed/inline_asm.rs index 6fd52ceb24c..8627a6bf887 100644 --- a/tests/ui/consts/miri_unleashed/inline_asm.rs +++ b/tests/ui/consts/miri_unleashed/inline_asm.rs @@ -1,5 +1,5 @@ -// compile-flags: -Zunleash-the-miri-inside-of-you -// only-x86_64 +//@ compile-flags: -Zunleash-the-miri-inside-of-you +//@ only-x86_64 use std::arch::asm; diff --git a/tests/ui/consts/miri_unleashed/mutable_references.rs b/tests/ui/consts/miri_unleashed/mutable_references.rs index 4e996464705..a361c504b5e 100644 --- a/tests/ui/consts/miri_unleashed/mutable_references.rs +++ b/tests/ui/consts/miri_unleashed/mutable_references.rs @@ -1,4 +1,4 @@ -// compile-flags: -Zunleash-the-miri-inside-of-you +//@ compile-flags: -Zunleash-the-miri-inside-of-you use std::cell::UnsafeCell; diff --git a/tests/ui/consts/miri_unleashed/mutable_references_err.rs b/tests/ui/consts/miri_unleashed/mutable_references_err.rs index 43b65f459a1..2075adad6f7 100644 --- a/tests/ui/consts/miri_unleashed/mutable_references_err.rs +++ b/tests/ui/consts/miri_unleashed/mutable_references_err.rs @@ -1,5 +1,5 @@ -// stderr-per-bitwidth -// compile-flags: -Zunleash-the-miri-inside-of-you +//@ stderr-per-bitwidth +//@ compile-flags: -Zunleash-the-miri-inside-of-you #![allow(invalid_reference_casting, static_mut_ref)] use std::sync::atomic::*; diff --git a/tests/ui/consts/miri_unleashed/mutating_global.rs b/tests/ui/consts/miri_unleashed/mutating_global.rs index 231f4af0a20..77781360374 100644 --- a/tests/ui/consts/miri_unleashed/mutating_global.rs +++ b/tests/ui/consts/miri_unleashed/mutating_global.rs @@ -1,4 +1,4 @@ -// compile-flags: -Zunleash-the-miri-inside-of-you +//@ compile-flags: -Zunleash-the-miri-inside-of-you // Make sure we cannot mutate globals. diff --git a/tests/ui/consts/miri_unleashed/non_const_fn.rs b/tests/ui/consts/miri_unleashed/non_const_fn.rs index 44ab60dcabc..d3ffb61af11 100644 --- a/tests/ui/consts/miri_unleashed/non_const_fn.rs +++ b/tests/ui/consts/miri_unleashed/non_const_fn.rs @@ -1,4 +1,4 @@ -// compile-flags: -Zunleash-the-miri-inside-of-you +//@ compile-flags: -Zunleash-the-miri-inside-of-you // A test demonstrating that we prevent calling non-const fn during CTFE. diff --git a/tests/ui/consts/miri_unleashed/ptr_arith.rs b/tests/ui/consts/miri_unleashed/ptr_arith.rs index e59c6725269..6dd8ab11e7c 100644 --- a/tests/ui/consts/miri_unleashed/ptr_arith.rs +++ b/tests/ui/consts/miri_unleashed/ptr_arith.rs @@ -1,4 +1,4 @@ -// compile-flags: -Zunleash-the-miri-inside-of-you +//@ compile-flags: -Zunleash-the-miri-inside-of-you // During CTFE, we prevent pointer-to-int casts. // Pointer comparisons are prevented in the trait system. diff --git a/tests/ui/consts/miri_unleashed/slice_eq.rs b/tests/ui/consts/miri_unleashed/slice_eq.rs index 83e10bf1213..7f07823bdc6 100644 --- a/tests/ui/consts/miri_unleashed/slice_eq.rs +++ b/tests/ui/consts/miri_unleashed/slice_eq.rs @@ -1,5 +1,5 @@ -// compile-flags: -Zunleash-the-miri-inside-of-you -// run-pass +//@ compile-flags: -Zunleash-the-miri-inside-of-you +//@ run-pass #![feature(const_raw_ptr_comparison)] diff --git a/tests/ui/consts/miri_unleashed/static-no-inner-mut.rs b/tests/ui/consts/miri_unleashed/static-no-inner-mut.rs index a4033eb5683..4219f6fa683 100644 --- a/tests/ui/consts/miri_unleashed/static-no-inner-mut.rs +++ b/tests/ui/consts/miri_unleashed/static-no-inner-mut.rs @@ -1,5 +1,5 @@ -// stderr-per-bitwidth -// compile-flags: -Zunleash-the-miri-inside-of-you +//@ stderr-per-bitwidth +//@ compile-flags: -Zunleash-the-miri-inside-of-you #![feature(const_refs_to_cell, const_mut_refs)] // All "inner" allocations that come with a `static` are interned immutably. This means it is // crucial that we do not accept any form of (interior) mutability there. diff --git a/tests/ui/consts/miri_unleashed/tls.rs b/tests/ui/consts/miri_unleashed/tls.rs index 7319a5135d3..b0c6c088361 100644 --- a/tests/ui/consts/miri_unleashed/tls.rs +++ b/tests/ui/consts/miri_unleashed/tls.rs @@ -1,4 +1,4 @@ -// compile-flags: -Zunleash-the-miri-inside-of-you +//@ compile-flags: -Zunleash-the-miri-inside-of-you #![feature(thread_local)] use std::thread; diff --git a/tests/ui/consts/missing_span_in_backtrace.rs b/tests/ui/consts/missing_span_in_backtrace.rs index 1ac3777f5fe..d45deee18fa 100644 --- a/tests/ui/consts/missing_span_in_backtrace.rs +++ b/tests/ui/consts/missing_span_in_backtrace.rs @@ -1,4 +1,4 @@ -// compile-flags: -Z ui-testing=no +//@ compile-flags: -Z ui-testing=no #![feature(const_swap)] diff --git a/tests/ui/consts/mozjs-error.rs b/tests/ui/consts/mozjs-error.rs index 7edcadbf2cb..4f07cf3e35c 100644 --- a/tests/ui/consts/mozjs-error.rs +++ b/tests/ui/consts/mozjs-error.rs @@ -1,4 +1,4 @@ -// run-pass +//@ run-pass #![allow(dead_code)] #![allow(non_upper_case_globals)] diff --git a/tests/ui/consts/non-scalar-cast.rs b/tests/ui/consts/non-scalar-cast.rs index 671366c90ec..fa0f63d8aca 100644 --- a/tests/ui/consts/non-scalar-cast.rs +++ b/tests/ui/consts/non-scalar-cast.rs @@ -1,4 +1,4 @@ -// run-pass +//@ run-pass // https://github.com/rust-lang/rust/issues/37448 diff --git a/tests/ui/consts/non-sync-references-in-const.rs b/tests/ui/consts/non-sync-references-in-const.rs index 0f668b8d469..3a8738501ec 100644 --- a/tests/ui/consts/non-sync-references-in-const.rs +++ b/tests/ui/consts/non-sync-references-in-const.rs @@ -1,5 +1,5 @@ -// check-pass -// known-bug: #49206 +//@ check-pass +//@ known-bug: #49206 // Should fail. Compiles and prints 2 identical addresses, which shows 2 threads // with the same `'static` reference to non-`Sync` struct. The problem is that diff --git a/tests/ui/consts/offset.rs b/tests/ui/consts/offset.rs index b2c663fe617..2b1db349285 100644 --- a/tests/ui/consts/offset.rs +++ b/tests/ui/consts/offset.rs @@ -1,4 +1,4 @@ -// run-pass +//@ run-pass use std::ptr; #[repr(C)] diff --git a/tests/ui/consts/offset_from.rs b/tests/ui/consts/offset_from.rs index 465147041d9..7737b5ab0b8 100644 --- a/tests/ui/consts/offset_from.rs +++ b/tests/ui/consts/offset_from.rs @@ -1,4 +1,4 @@ -// run-pass +//@ run-pass #![feature(const_ptr_sub_ptr)] #![feature(ptr_sub_ptr)] diff --git a/tests/ui/consts/offset_ub.rs b/tests/ui/consts/offset_ub.rs index db28a6c6a2b..920ecb687cf 100644 --- a/tests/ui/consts/offset_ub.rs +++ b/tests/ui/consts/offset_ub.rs @@ -1,7 +1,7 @@ use std::ptr; -// normalize-stderr-test "0x7f+" -> "0x7f..f" +//@ normalize-stderr-test "0x7f+" -> "0x7f..f" pub const BEFORE_START: *const u8 = unsafe { (&0u8 as *const u8).offset(-1) }; //~NOTE diff --git a/tests/ui/consts/packed_pattern.rs b/tests/ui/consts/packed_pattern.rs index 370fec6fbd4..11feca59bb5 100644 --- a/tests/ui/consts/packed_pattern.rs +++ b/tests/ui/consts/packed_pattern.rs @@ -1,4 +1,4 @@ -// run-pass +//@ run-pass #[derive(PartialEq, Eq, Copy, Clone)] #[repr(packed)] diff --git a/tests/ui/consts/packed_pattern2.rs b/tests/ui/consts/packed_pattern2.rs index ef68d9e513a..09f47a0c439 100644 --- a/tests/ui/consts/packed_pattern2.rs +++ b/tests/ui/consts/packed_pattern2.rs @@ -1,4 +1,4 @@ -// run-pass +//@ run-pass #[derive(PartialEq, Eq, Copy, Clone)] #[repr(packed)] diff --git a/tests/ui/consts/precise-drop-with-coverage.rs b/tests/ui/consts/precise-drop-with-coverage.rs index 275cb38693f..01618dbb779 100644 --- a/tests/ui/consts/precise-drop-with-coverage.rs +++ b/tests/ui/consts/precise-drop-with-coverage.rs @@ -1,8 +1,8 @@ // Checks that code coverage doesn't interfere with const_precise_live_drops. // Regression test for issue #93848. // -// check-pass -// compile-flags: --crate-type=lib -Cinstrument-coverage -Zno-profiler-runtime +//@ check-pass +//@ compile-flags: --crate-type=lib -Cinstrument-coverage -Zno-profiler-runtime #![feature(const_precise_live_drops)] diff --git a/tests/ui/consts/precise-drop-with-promoted.rs b/tests/ui/consts/precise-drop-with-promoted.rs index 7cbe3c4e415..633df2b2067 100644 --- a/tests/ui/consts/precise-drop-with-promoted.rs +++ b/tests/ui/consts/precise-drop-with-promoted.rs @@ -1,6 +1,6 @@ // Regression test for issue #89938. -// check-pass -// compile-flags: --crate-type=lib +//@ check-pass +//@ compile-flags: --crate-type=lib #![feature(const_precise_live_drops)] diff --git a/tests/ui/consts/promote_borrowed_field.rs b/tests/ui/consts/promote_borrowed_field.rs index c4841b46f60..1d3b4857b4c 100644 --- a/tests/ui/consts/promote_borrowed_field.rs +++ b/tests/ui/consts/promote_borrowed_field.rs @@ -1,4 +1,4 @@ -// run-pass +//@ run-pass // From https://github.com/rust-lang/rust/issues/65727 diff --git a/tests/ui/consts/promote_evaluation_unused_result.rs b/tests/ui/consts/promote_evaluation_unused_result.rs index 4eda785bb89..947965ad50c 100644 --- a/tests/ui/consts/promote_evaluation_unused_result.rs +++ b/tests/ui/consts/promote_evaluation_unused_result.rs @@ -1,4 +1,4 @@ -// build-pass (FIXME(62277): could be check-pass?) +//@ build-pass (FIXME(62277): could be check-pass?) fn main() { diff --git a/tests/ui/consts/promote_fn_calls.rs b/tests/ui/consts/promote_fn_calls.rs index 8995aaacd85..52a421ead70 100644 --- a/tests/ui/consts/promote_fn_calls.rs +++ b/tests/ui/consts/promote_fn_calls.rs @@ -1,5 +1,5 @@ -// build-pass (FIXME(62277): could be check-pass?) -// aux-build:promotable_const_fn_lib.rs +//@ build-pass (FIXME(62277): could be check-pass?) +//@ aux-build:promotable_const_fn_lib.rs extern crate promotable_const_fn_lib; diff --git a/tests/ui/consts/promote_fn_calls_std.rs b/tests/ui/consts/promote_fn_calls_std.rs index 557f6a434f4..ec8e9143af1 100644 --- a/tests/ui/consts/promote_fn_calls_std.rs +++ b/tests/ui/consts/promote_fn_calls_std.rs @@ -1,5 +1,5 @@ #![allow(deprecated, deprecated_in_future)] // can be removed if different fns are chosen -// build-pass (FIXME(62277): could be check-pass?) +//@ build-pass (FIXME(62277): could be check-pass?) fn main() { let x: &'static u8 = &u8::max_value(); diff --git a/tests/ui/consts/promoted-storage.rs b/tests/ui/consts/promoted-storage.rs index 52ef685e8f4..6f2cd6cc3d6 100644 --- a/tests/ui/consts/promoted-storage.rs +++ b/tests/ui/consts/promoted-storage.rs @@ -1,5 +1,5 @@ // Check that storage statements reset local qualification. -// check-pass +//@ check-pass use std::cell::Cell; const C: Option> = { diff --git a/tests/ui/consts/promoted-validation-55454.rs b/tests/ui/consts/promoted-validation-55454.rs index 23cae4fb57d..67bbf3fce61 100644 --- a/tests/ui/consts/promoted-validation-55454.rs +++ b/tests/ui/consts/promoted-validation-55454.rs @@ -1,5 +1,5 @@ // https://github.com/rust-lang/rust/issues/55454 -// build-pass (FIXME(62277): could be check-pass?) +//@ build-pass (FIXME(62277): could be check-pass?) #[derive(PartialEq)] struct This(T); diff --git a/tests/ui/consts/promoted_const_call.rs b/tests/ui/consts/promoted_const_call.rs index d6e48266fd3..deaa053c415 100644 --- a/tests/ui/consts/promoted_const_call.rs +++ b/tests/ui/consts/promoted_const_call.rs @@ -1,4 +1,4 @@ -// known-bug: #103507 +//@ known-bug: #103507 #![feature(const_mut_refs)] #![feature(const_trait_impl)] diff --git a/tests/ui/consts/promoted_const_call4.rs b/tests/ui/consts/promoted_const_call4.rs index bb97957179f..7a65ad86a9a 100644 --- a/tests/ui/consts/promoted_const_call4.rs +++ b/tests/ui/consts/promoted_const_call4.rs @@ -1,4 +1,4 @@ -// run-pass +//@ run-pass use std::sync::atomic::*; diff --git a/tests/ui/consts/promoted_regression.rs b/tests/ui/consts/promoted_regression.rs index d57036ae58f..26ce7321eb6 100644 --- a/tests/ui/consts/promoted_regression.rs +++ b/tests/ui/consts/promoted_regression.rs @@ -1,4 +1,4 @@ -// build-pass (FIXME(62277): could be check-pass?) +//@ build-pass (FIXME(62277): could be check-pass?) fn main() { let _ = &[("", ""); 3]; diff --git a/tests/ui/consts/promotion-mutable-ref.rs b/tests/ui/consts/promotion-mutable-ref.rs index d103c5a9d23..0bca8a8dca4 100644 --- a/tests/ui/consts/promotion-mutable-ref.rs +++ b/tests/ui/consts/promotion-mutable-ref.rs @@ -1,4 +1,4 @@ -// run-pass +//@ run-pass #![feature(const_mut_refs)] static mut TEST: i32 = { diff --git a/tests/ui/consts/promotion.rs b/tests/ui/consts/promotion.rs index e379e3aea13..783ca47d2c6 100644 --- a/tests/ui/consts/promotion.rs +++ b/tests/ui/consts/promotion.rs @@ -1,9 +1,9 @@ -// revisions: noopt opt opt_with_overflow_checks -//[noopt]compile-flags: -C opt-level=0 -//[opt]compile-flags: -O -//[opt_with_overflow_checks]compile-flags: -C overflow-checks=on -O +//@ revisions: noopt opt opt_with_overflow_checks +//@[noopt]compile-flags: -C opt-level=0 +//@[opt]compile-flags: -O +//@[opt_with_overflow_checks]compile-flags: -C overflow-checks=on -O -// build-pass +//@ build-pass const fn assert_static(_: &'static T) {} diff --git a/tests/ui/consts/ptr_comparisons.rs b/tests/ui/consts/ptr_comparisons.rs index a5b6cd9d2d4..e142ab3a754 100644 --- a/tests/ui/consts/ptr_comparisons.rs +++ b/tests/ui/consts/ptr_comparisons.rs @@ -1,5 +1,5 @@ -// compile-flags: --crate-type=lib -// check-pass +//@ compile-flags: --crate-type=lib +//@ check-pass #![feature( core_intrinsics, diff --git a/tests/ui/consts/ptr_is_null.rs b/tests/ui/consts/ptr_is_null.rs index 43b9767db16..bbf13802312 100644 --- a/tests/ui/consts/ptr_is_null.rs +++ b/tests/ui/consts/ptr_is_null.rs @@ -1,5 +1,5 @@ -// compile-flags: --crate-type=lib -// check-pass +//@ compile-flags: --crate-type=lib +//@ check-pass #![feature(const_ptr_is_null)] #![allow(useless_ptr_null_checks)] diff --git a/tests/ui/consts/qualif-indirect-mutation-fail.rs b/tests/ui/consts/qualif-indirect-mutation-fail.rs index a6d2934044a..420e32128a4 100644 --- a/tests/ui/consts/qualif-indirect-mutation-fail.rs +++ b/tests/ui/consts/qualif-indirect-mutation-fail.rs @@ -1,4 +1,4 @@ -// compile-flags: --crate-type=lib +//@ compile-flags: --crate-type=lib #![feature(const_mut_refs)] #![feature(const_precise_live_drops)] #![feature(const_swap)] diff --git a/tests/ui/consts/qualif-indirect-mutation-pass.rs b/tests/ui/consts/qualif-indirect-mutation-pass.rs index 06af6a03b8f..9d5f0d4306d 100644 --- a/tests/ui/consts/qualif-indirect-mutation-pass.rs +++ b/tests/ui/consts/qualif-indirect-mutation-pass.rs @@ -1,5 +1,5 @@ -// compile-flags: --crate-type=lib -// check-pass +//@ compile-flags: --crate-type=lib +//@ check-pass #![feature(const_mut_refs)] #![feature(const_precise_live_drops)] diff --git a/tests/ui/consts/raw-ptr-const.rs b/tests/ui/consts/raw-ptr-const.rs index 24a77db9ffc..2946c9b4a8e 100644 --- a/tests/ui/consts/raw-ptr-const.rs +++ b/tests/ui/consts/raw-ptr-const.rs @@ -1,4 +1,4 @@ -// check-pass +//@ check-pass // This is a regression test for a `span_delayed_bug` during interning when a constant // evaluates to a (non-dangling) raw pointer. diff --git a/tests/ui/consts/raw_pointer_promoted.rs b/tests/ui/consts/raw_pointer_promoted.rs index 4c62ad444a5..9bffd79709f 100644 --- a/tests/ui/consts/raw_pointer_promoted.rs +++ b/tests/ui/consts/raw_pointer_promoted.rs @@ -1,4 +1,4 @@ -// check-pass +//@ check-pass pub const FOO: &'static *const i32 = &(&0 as _); diff --git a/tests/ui/consts/recursive-zst-static.rs b/tests/ui/consts/recursive-zst-static.rs index 9311490020d..53d32254a68 100644 --- a/tests/ui/consts/recursive-zst-static.rs +++ b/tests/ui/consts/recursive-zst-static.rs @@ -1,5 +1,5 @@ -// revisions: default unleash -//[unleash]compile-flags: -Zunleash-the-miri-inside-of-you +//@ revisions: default unleash +//@[unleash]compile-flags: -Zunleash-the-miri-inside-of-you // This test ensures that we do not allow ZST statics to initialize themselves without ever // actually creating a value of that type. This is important, as the ZST may have private fields diff --git a/tests/ui/consts/references.rs b/tests/ui/consts/references.rs index d0af47a8ea8..469e4f385ba 100644 --- a/tests/ui/consts/references.rs +++ b/tests/ui/consts/references.rs @@ -1,4 +1,4 @@ -// run-pass +//@ run-pass const FOO: &[u8] = b"foo"; const BAR: &[u8] = &[1, 2, 3]; diff --git a/tests/ui/consts/refs_check_const_value_eq-issue-88876.rs b/tests/ui/consts/refs_check_const_value_eq-issue-88876.rs index 6ce9da43668..446fdc75514 100644 --- a/tests/ui/consts/refs_check_const_value_eq-issue-88876.rs +++ b/tests/ui/consts/refs_check_const_value_eq-issue-88876.rs @@ -1,4 +1,4 @@ -// check-pass +//@ check-pass #![allow(incomplete_features)] #![feature(adt_const_params)] diff --git a/tests/ui/consts/repeat_match.rs b/tests/ui/consts/repeat_match.rs index 20983184a47..e297ce01a88 100644 --- a/tests/ui/consts/repeat_match.rs +++ b/tests/ui/consts/repeat_match.rs @@ -1,4 +1,4 @@ -// run-pass +//@ run-pass // https://github.com/rust-lang/rust/issues/45044 diff --git a/tests/ui/consts/return-in-const-fn.rs b/tests/ui/consts/return-in-const-fn.rs index 077a33c081b..16e6ca7df8a 100644 --- a/tests/ui/consts/return-in-const-fn.rs +++ b/tests/ui/consts/return-in-const-fn.rs @@ -1,4 +1,4 @@ -// run-pass +//@ run-pass // https://github.com/rust-lang/rust/issues/43754 diff --git a/tests/ui/consts/rustc-impl-const-stability.rs b/tests/ui/consts/rustc-impl-const-stability.rs index 2b67c2f2cff..98c5c897138 100644 --- a/tests/ui/consts/rustc-impl-const-stability.rs +++ b/tests/ui/consts/rustc-impl-const-stability.rs @@ -1,4 +1,4 @@ -// known-bug: #110395 +//@ known-bug: #110395 #![crate_type = "lib"] #![feature(staged_api)] diff --git a/tests/ui/consts/rvalue-static-promotion.rs b/tests/ui/consts/rvalue-static-promotion.rs index f42e8b70593..e9fd30aa1ed 100644 --- a/tests/ui/consts/rvalue-static-promotion.rs +++ b/tests/ui/consts/rvalue-static-promotion.rs @@ -1,4 +1,4 @@ -// run-pass +//@ run-pass use std::cell::Cell; diff --git a/tests/ui/consts/self_normalization.rs b/tests/ui/consts/self_normalization.rs index b2a34f5877b..245f22a4955 100644 --- a/tests/ui/consts/self_normalization.rs +++ b/tests/ui/consts/self_normalization.rs @@ -1,4 +1,4 @@ -// check-pass +//@ check-pass fn testfn(_arr: &mut [(); 0]) {} diff --git a/tests/ui/consts/self_normalization2.rs b/tests/ui/consts/self_normalization2.rs index 4fca38cba30..a457c45f857 100644 --- a/tests/ui/consts/self_normalization2.rs +++ b/tests/ui/consts/self_normalization2.rs @@ -1,4 +1,4 @@ -// check-pass +//@ check-pass trait Gen { fn gen(x: Self) -> T; diff --git a/tests/ui/consts/signed_enum_discr.rs b/tests/ui/consts/signed_enum_discr.rs index 2e4395ccf22..420322486c6 100644 --- a/tests/ui/consts/signed_enum_discr.rs +++ b/tests/ui/consts/signed_enum_discr.rs @@ -1,4 +1,4 @@ -// run-pass +//@ run-pass // https://github.com/rust-lang/rust/issues/49181 diff --git a/tests/ui/consts/static-cycle-error.rs b/tests/ui/consts/static-cycle-error.rs index 9ce050aae21..b23872ed509 100644 --- a/tests/ui/consts/static-cycle-error.rs +++ b/tests/ui/consts/static-cycle-error.rs @@ -1,4 +1,4 @@ -// check-pass +//@ check-pass struct Foo { foo: Option<&'static Foo> diff --git a/tests/ui/consts/static-mut-refs.rs b/tests/ui/consts/static-mut-refs.rs index ff865da5aa8..d4ebfbbf17a 100644 --- a/tests/ui/consts/static-mut-refs.rs +++ b/tests/ui/consts/static-mut-refs.rs @@ -1,4 +1,4 @@ -// run-pass +//@ run-pass #![allow(dead_code)] // Checks that mutable static items can have mutable slices and other references diff --git a/tests/ui/consts/static-promoted-to-mutable-static.rs b/tests/ui/consts/static-promoted-to-mutable-static.rs index d49ba478dbc..1cf72781e45 100644 --- a/tests/ui/consts/static-promoted-to-mutable-static.rs +++ b/tests/ui/consts/static-promoted-to-mutable-static.rs @@ -1,4 +1,4 @@ -// check-pass +//@ check-pass #![allow(non_camel_case_types, non_upper_case_globals, static_mut_ref)] pub struct wl_interface { diff --git a/tests/ui/consts/static-raw-pointer-interning.rs b/tests/ui/consts/static-raw-pointer-interning.rs index cab60c91e16..0e915760675 100644 --- a/tests/ui/consts/static-raw-pointer-interning.rs +++ b/tests/ui/consts/static-raw-pointer-interning.rs @@ -1,4 +1,4 @@ -// run-pass +//@ run-pass static FOO: Foo = Foo { field: &42 as *const i32, diff --git a/tests/ui/consts/static-raw-pointer-interning2.rs b/tests/ui/consts/static-raw-pointer-interning2.rs index 2b915fd7cb3..b279bb2261a 100644 --- a/tests/ui/consts/static-raw-pointer-interning2.rs +++ b/tests/ui/consts/static-raw-pointer-interning2.rs @@ -1,4 +1,4 @@ -// run-pass +//@ run-pass static mut FOO: Foo = Foo { field: &mut [42] as *mut [i32] as *mut i32, diff --git a/tests/ui/consts/static_mut_containing_mut_ref.rs b/tests/ui/consts/static_mut_containing_mut_ref.rs index 495804649b1..710328d6aa7 100644 --- a/tests/ui/consts/static_mut_containing_mut_ref.rs +++ b/tests/ui/consts/static_mut_containing_mut_ref.rs @@ -1,4 +1,4 @@ -// build-pass (FIXME(62277): could be check-pass?) +//@ build-pass (FIXME(62277): could be check-pass?) #![allow(static_mut_ref)] static mut STDERR_BUFFER_SPACE: [u8; 42] = [0u8; 42]; diff --git a/tests/ui/consts/static_mut_containing_mut_ref2.rs b/tests/ui/consts/static_mut_containing_mut_ref2.rs index e60a17922fd..b5110623606 100644 --- a/tests/ui/consts/static_mut_containing_mut_ref2.rs +++ b/tests/ui/consts/static_mut_containing_mut_ref2.rs @@ -1,4 +1,4 @@ -// revisions: stock mut_refs +//@ revisions: stock mut_refs #![allow(static_mut_ref)] #![cfg_attr(mut_refs, feature(const_mut_refs))] diff --git a/tests/ui/consts/std/iter.rs b/tests/ui/consts/std/iter.rs index e9af781eb2b..cf121df0f6c 100644 --- a/tests/ui/consts/std/iter.rs +++ b/tests/ui/consts/std/iter.rs @@ -1,4 +1,4 @@ -// run-pass +//@ run-pass const I: std::iter::Empty = std::iter::empty(); diff --git a/tests/ui/consts/std/slice.rs b/tests/ui/consts/std/slice.rs index f19defc64dd..bdf1aac5df5 100644 --- a/tests/ui/consts/std/slice.rs +++ b/tests/ui/consts/std/slice.rs @@ -1,4 +1,4 @@ -// build-pass (FIXME(62277): could be check-pass?) +//@ build-pass (FIXME(62277): could be check-pass?) struct Wrap(T); unsafe impl Send for Wrap {} diff --git a/tests/ui/consts/timeout.rs b/tests/ui/consts/timeout.rs index c9094999ee2..c4fb8bab663 100644 --- a/tests/ui/consts/timeout.rs +++ b/tests/ui/consts/timeout.rs @@ -2,8 +2,8 @@ //! the const eval timeout lint and then subsequently //! ICE. -// compile-flags: --crate-type=lib -Ztiny-const-eval-limit -// error-pattern: constant evaluation is taking a long time +//@ compile-flags: --crate-type=lib -Ztiny-const-eval-limit +//@ error-pattern: constant evaluation is taking a long time static ROOK_ATTACKS_TABLE: () = { 0_u64.count_ones(); diff --git a/tests/ui/consts/trait_specialization.rs b/tests/ui/consts/trait_specialization.rs index c581ef6b0f7..f195e067b55 100644 --- a/tests/ui/consts/trait_specialization.rs +++ b/tests/ui/consts/trait_specialization.rs @@ -1,6 +1,6 @@ -// ignore-wasm32-bare which doesn't support `std::process:exit()` -// compile-flags: -Zmir-opt-level=3 -// run-pass +//@ ignore-wasm32-bare which doesn't support `std::process:exit()` +//@ compile-flags: -Zmir-opt-level=3 +//@ run-pass // Tests that specialization does not cause optimizations running on polymorphic MIR to resolve // to a `default` implementation. diff --git a/tests/ui/consts/transmute-const.rs b/tests/ui/consts/transmute-const.rs index 5044d99ec51..f03bdca29cb 100644 --- a/tests/ui/consts/transmute-const.rs +++ b/tests/ui/consts/transmute-const.rs @@ -1,4 +1,4 @@ -// run-pass +//@ run-pass use std::mem; diff --git a/tests/ui/consts/transmute-size-mismatch-before-typeck.rs b/tests/ui/consts/transmute-size-mismatch-before-typeck.rs index 936931acbe2..2ddce483564 100644 --- a/tests/ui/consts/transmute-size-mismatch-before-typeck.rs +++ b/tests/ui/consts/transmute-size-mismatch-before-typeck.rs @@ -1,7 +1,7 @@ -// normalize-stderr-64bit "64 bits" -> "word size" -// normalize-stderr-32bit "32 bits" -> "word size" -// normalize-stderr-64bit "128 bits" -> "2 * word size" -// normalize-stderr-32bit "64 bits" -> "2 * word size" +//@ normalize-stderr-64bit "64 bits" -> "word size" +//@ normalize-stderr-32bit "32 bits" -> "word size" +//@ normalize-stderr-64bit "128 bits" -> "2 * word size" +//@ normalize-stderr-32bit "64 bits" -> "2 * word size" fn main() { match &b""[..] { diff --git a/tests/ui/consts/try-operator.rs b/tests/ui/consts/try-operator.rs index ed69f492fb9..352dbeefa8a 100644 --- a/tests/ui/consts/try-operator.rs +++ b/tests/ui/consts/try-operator.rs @@ -1,4 +1,4 @@ -// known-bug: #110395 +//@ known-bug: #110395 #![feature(try_trait_v2)] #![feature(const_trait_impl)] diff --git a/tests/ui/consts/tuple-struct-constructors.rs b/tests/ui/consts/tuple-struct-constructors.rs index 1655f0eb850..8472a09844b 100644 --- a/tests/ui/consts/tuple-struct-constructors.rs +++ b/tests/ui/consts/tuple-struct-constructors.rs @@ -1,4 +1,4 @@ -// run-pass +//@ run-pass // https://github.com/rust-lang/rust/issues/41898 diff --git a/tests/ui/consts/underscore_const_names.rs b/tests/ui/consts/underscore_const_names.rs index e2ae5a9d53a..2c996d25e5c 100644 --- a/tests/ui/consts/underscore_const_names.rs +++ b/tests/ui/consts/underscore_const_names.rs @@ -1,4 +1,4 @@ -// build-pass (FIXME(62277): could be check-pass?) +//@ build-pass (FIXME(62277): could be check-pass?) #![deny(unused)] diff --git a/tests/ui/consts/uninhabited-const-issue-61744.rs b/tests/ui/consts/uninhabited-const-issue-61744.rs index ca6449cce30..6168268bfed 100644 --- a/tests/ui/consts/uninhabited-const-issue-61744.rs +++ b/tests/ui/consts/uninhabited-const-issue-61744.rs @@ -1,4 +1,4 @@ -// build-fail +//@ build-fail pub const unsafe fn fake_type() -> T { hint_unreachable() //~ ERROR evaluation of `::CONSTANT` failed diff --git a/tests/ui/consts/union_constant.rs b/tests/ui/consts/union_constant.rs index 508ff7e0ae8..f6ef235dcdd 100644 --- a/tests/ui/consts/union_constant.rs +++ b/tests/ui/consts/union_constant.rs @@ -1,4 +1,4 @@ -// build-pass (FIXME(62277): could be check-pass?) +//@ build-pass (FIXME(62277): could be check-pass?) union Uninit { _never_use: *const u8, diff --git a/tests/ui/consts/unnormalized-param-env.rs b/tests/ui/consts/unnormalized-param-env.rs index a7bbe4db992..440d92d09f3 100644 --- a/tests/ui/consts/unnormalized-param-env.rs +++ b/tests/ui/consts/unnormalized-param-env.rs @@ -1,4 +1,4 @@ -// check-pass +//@ check-pass pub trait CSpace { type Traj; diff --git a/tests/ui/consts/unstable-const-fn-in-libcore.rs b/tests/ui/consts/unstable-const-fn-in-libcore.rs index b62a74039f6..baeece40a52 100644 --- a/tests/ui/consts/unstable-const-fn-in-libcore.rs +++ b/tests/ui/consts/unstable-const-fn-in-libcore.rs @@ -1,4 +1,4 @@ -// known-bug: #110395 +//@ known-bug: #110395 // FIXME check-pass // This is a non-regression test for const-qualification of unstable items in libcore // as explained in issue #67053. diff --git a/tests/ui/consts/unstable-precise-live-drops-in-libcore.rs b/tests/ui/consts/unstable-precise-live-drops-in-libcore.rs index 619084eaa51..fb7cd905375 100644 --- a/tests/ui/consts/unstable-precise-live-drops-in-libcore.rs +++ b/tests/ui/consts/unstable-precise-live-drops-in-libcore.rs @@ -1,4 +1,4 @@ -// check-pass +//@ check-pass #![stable(feature = "core", since = "1.6.0")] #![feature(staged_api)] diff --git a/tests/ui/consts/unwind-abort.rs b/tests/ui/consts/unwind-abort.rs index 6c94fc7b98b..35db9152bd5 100644 --- a/tests/ui/consts/unwind-abort.rs +++ b/tests/ui/consts/unwind-abort.rs @@ -1,4 +1,4 @@ -// check-pass +//@ check-pass #![feature(c_unwind, const_extern_fn)] diff --git a/tests/ui/consts/validate_never_arrays.rs b/tests/ui/consts/validate_never_arrays.rs index 71c1340e5f8..aa5dbdf8233 100644 --- a/tests/ui/consts/validate_never_arrays.rs +++ b/tests/ui/consts/validate_never_arrays.rs @@ -1,6 +1,6 @@ // Strip out raw byte dumps to make comparison platform-independent: -// normalize-stderr-test "(the raw bytes of the constant) \(size: [0-9]*, align: [0-9]*\)" -> "$1 (size: $$SIZE, align: $$ALIGN)" -// normalize-stderr-test "([0-9a-f][0-9a-f] |╾─*ALLOC[0-9]+(\+[a-z0-9]+)?()?─*╼ )+ *│.*" -> "HEX_DUMP" +//@ normalize-stderr-test "(the raw bytes of the constant) \(size: [0-9]*, align: [0-9]*\)" -> "$1 (size: $$SIZE, align: $$ALIGN)" +//@ normalize-stderr-test "([0-9a-f][0-9a-f] |╾─*ALLOC[0-9]+(\+[a-z0-9]+)?()?─*╼ )+ *│.*" -> "HEX_DUMP" #![feature(never_type)] const _: &[!; 1] = unsafe { &*(1_usize as *const [!; 1]) }; //~ ERROR undefined behavior diff --git a/tests/ui/consts/write_to_mut_ref_dest.rs b/tests/ui/consts/write_to_mut_ref_dest.rs index 484ec424435..42ac2284038 100644 --- a/tests/ui/consts/write_to_mut_ref_dest.rs +++ b/tests/ui/consts/write_to_mut_ref_dest.rs @@ -1,5 +1,5 @@ -// revisions: stock mut_refs -//[mut_refs] check-pass +//@ revisions: stock mut_refs +//@[mut_refs] check-pass #![cfg_attr(mut_refs, feature(const_mut_refs))] diff --git a/tests/ui/consts/zst_no_llvm_alloc.rs b/tests/ui/consts/zst_no_llvm_alloc.rs index 2a41f708c2b..1622a199a7a 100644 --- a/tests/ui/consts/zst_no_llvm_alloc.rs +++ b/tests/ui/consts/zst_no_llvm_alloc.rs @@ -1,4 +1,4 @@ -// run-pass +//@ run-pass #[repr(align(4))] struct Foo; diff --git a/tests/ui/coroutine/addassign-yield.rs b/tests/ui/coroutine/addassign-yield.rs index 919a559f85b..8718e73512f 100644 --- a/tests/ui/coroutine/addassign-yield.rs +++ b/tests/ui/coroutine/addassign-yield.rs @@ -1,4 +1,4 @@ -// run-pass +//@ run-pass // Regression test for broken MIR error (#61442) // Due to the two possible evaluation orders for // a '+=' expression (depending on whether or not the 'AddAssign' trait diff --git a/tests/ui/coroutine/async-coroutine-issue-67158.rs b/tests/ui/coroutine/async-coroutine-issue-67158.rs index 420454656d4..14905e6b8bf 100644 --- a/tests/ui/coroutine/async-coroutine-issue-67158.rs +++ b/tests/ui/coroutine/async-coroutine-issue-67158.rs @@ -1,5 +1,5 @@ #![feature(coroutines)] -// edition:2018 +//@ edition:2018 // Regression test for #67158. fn main() { async { yield print!(":C") }; //~ ERROR `async` coroutines are not yet supported diff --git a/tests/ui/coroutine/async-gen-deduce-yield.rs b/tests/ui/coroutine/async-gen-deduce-yield.rs index 9ccc8ee41f6..aee920e9773 100644 --- a/tests/ui/coroutine/async-gen-deduce-yield.rs +++ b/tests/ui/coroutine/async-gen-deduce-yield.rs @@ -1,5 +1,5 @@ -// compile-flags: --edition 2024 -Zunstable-options -// check-pass +//@ compile-flags: --edition 2024 -Zunstable-options +//@ check-pass #![feature(async_iterator, gen_blocks)] diff --git a/tests/ui/coroutine/async-gen-yield-ty-is-unit.rs b/tests/ui/coroutine/async-gen-yield-ty-is-unit.rs index 80c0b69a6f7..62b9bafcd60 100644 --- a/tests/ui/coroutine/async-gen-yield-ty-is-unit.rs +++ b/tests/ui/coroutine/async-gen-yield-ty-is-unit.rs @@ -1,5 +1,5 @@ -// compile-flags: --edition 2024 -Zunstable-options -// check-pass +//@ compile-flags: --edition 2024 -Zunstable-options +//@ check-pass #![feature(async_iterator, gen_blocks, noop_waker)] diff --git a/tests/ui/coroutine/async_gen_fn.rs b/tests/ui/coroutine/async_gen_fn.rs index 20564106f99..9e96ecf3ea6 100644 --- a/tests/ui/coroutine/async_gen_fn.rs +++ b/tests/ui/coroutine/async_gen_fn.rs @@ -1,5 +1,5 @@ -// revisions: e2024 none -//[e2024] compile-flags: --edition 2024 -Zunstable-options +//@ revisions: e2024 none +//@[e2024] compile-flags: --edition 2024 -Zunstable-options async gen fn foo() {} //[none]~^ ERROR: `async fn` is not permitted in Rust 2015 diff --git a/tests/ui/coroutine/async_gen_fn_iter.rs b/tests/ui/coroutine/async_gen_fn_iter.rs index 604156b4d37..c4a7629f314 100644 --- a/tests/ui/coroutine/async_gen_fn_iter.rs +++ b/tests/ui/coroutine/async_gen_fn_iter.rs @@ -1,6 +1,6 @@ -// edition: 2024 -// compile-flags: -Zunstable-options -// run-pass +//@ edition: 2024 +//@ compile-flags: -Zunstable-options +//@ run-pass #![feature(gen_blocks, async_iterator)] #![feature(noop_waker)] diff --git a/tests/ui/coroutine/auxiliary/metadata-sufficient-for-layout.rs b/tests/ui/coroutine/auxiliary/metadata-sufficient-for-layout.rs index dc052185340..8af6973134a 100644 --- a/tests/ui/coroutine/auxiliary/metadata-sufficient-for-layout.rs +++ b/tests/ui/coroutine/auxiliary/metadata-sufficient-for-layout.rs @@ -1,4 +1,4 @@ -// compile-flags: --emit metadata +//@ compile-flags: --emit metadata #![feature(coroutines, coroutine_trait)] use std::marker::Unpin; diff --git a/tests/ui/coroutine/auxiliary/unwind-aux.rs b/tests/ui/coroutine/auxiliary/unwind-aux.rs index 215d6769116..ff1e8ed32cd 100644 --- a/tests/ui/coroutine/auxiliary/unwind-aux.rs +++ b/tests/ui/coroutine/auxiliary/unwind-aux.rs @@ -1,6 +1,6 @@ -// compile-flags: -Cpanic=unwind --crate-type=lib -// no-prefer-dynamic -// edition:2021 +//@ compile-flags: -Cpanic=unwind --crate-type=lib +//@ no-prefer-dynamic +//@ edition:2021 #![feature(coroutines)] pub fn run(a: T) { diff --git a/tests/ui/coroutine/borrow-in-tail-expr.rs b/tests/ui/coroutine/borrow-in-tail-expr.rs index c1497ad2911..2f0aa62019e 100644 --- a/tests/ui/coroutine/borrow-in-tail-expr.rs +++ b/tests/ui/coroutine/borrow-in-tail-expr.rs @@ -1,4 +1,4 @@ -// run-pass +//@ run-pass #![feature(coroutines)] diff --git a/tests/ui/coroutine/clone-impl-async.rs b/tests/ui/coroutine/clone-impl-async.rs index e8e82f1994d..d7ba1143b5c 100644 --- a/tests/ui/coroutine/clone-impl-async.rs +++ b/tests/ui/coroutine/clone-impl-async.rs @@ -1,4 +1,4 @@ -// edition:2021 +//@ edition:2021 // gate-test-coroutine_clone // Verifies that feature(coroutine_clone) doesn't allow async blocks to be cloned/copied. diff --git a/tests/ui/coroutine/clone-rpit.rs b/tests/ui/coroutine/clone-rpit.rs index 22a553c83d6..445d155afa9 100644 --- a/tests/ui/coroutine/clone-rpit.rs +++ b/tests/ui/coroutine/clone-rpit.rs @@ -1,7 +1,7 @@ -// revisions: current next -//[next] compile-flags: -Znext-solver -//[current] check-pass -//[next] known-bug: trait-system-refactor-initiative#82 +//@ revisions: current next +//@[next] compile-flags: -Znext-solver +//@[current] check-pass +//@[next] known-bug: trait-system-refactor-initiative#82 #![feature(coroutines, coroutine_trait, coroutine_clone)] diff --git a/tests/ui/coroutine/conditional-drop.rs b/tests/ui/coroutine/conditional-drop.rs index 634095c7acc..65d3a9e701e 100644 --- a/tests/ui/coroutine/conditional-drop.rs +++ b/tests/ui/coroutine/conditional-drop.rs @@ -1,7 +1,7 @@ -// run-pass +//@ run-pass -// revisions: default nomiropt -//[nomiropt]compile-flags: -Z mir-opt-level=0 +//@ revisions: default nomiropt +//@[nomiropt]compile-flags: -Z mir-opt-level=0 #![feature(coroutines, coroutine_trait)] diff --git a/tests/ui/coroutine/control-flow.rs b/tests/ui/coroutine/control-flow.rs index 0cb37524a6c..9070ba17856 100644 --- a/tests/ui/coroutine/control-flow.rs +++ b/tests/ui/coroutine/control-flow.rs @@ -1,7 +1,7 @@ -// run-pass +//@ run-pass -// revisions: default nomiropt -//[nomiropt]compile-flags: -Z mir-opt-level=0 +//@ revisions: default nomiropt +//@[nomiropt]compile-flags: -Z mir-opt-level=0 #![feature(coroutines, coroutine_trait)] diff --git a/tests/ui/coroutine/coroutine-resume-after-panic.rs b/tests/ui/coroutine/coroutine-resume-after-panic.rs index 5915f5ad9a9..8445bf7e635 100644 --- a/tests/ui/coroutine/coroutine-resume-after-panic.rs +++ b/tests/ui/coroutine/coroutine-resume-after-panic.rs @@ -1,7 +1,7 @@ -// run-fail -// needs-unwind -// error-pattern:coroutine resumed after panicking -// ignore-emscripten no processes +//@ run-fail +//@ needs-unwind +//@ error-pattern:coroutine resumed after panicking +//@ ignore-emscripten no processes // Test that we get the correct message for resuming a panicked coroutine. diff --git a/tests/ui/coroutine/derived-drop-parent-expr.rs b/tests/ui/coroutine/derived-drop-parent-expr.rs index 59a3e847838..f70a732c90f 100644 --- a/tests/ui/coroutine/derived-drop-parent-expr.rs +++ b/tests/ui/coroutine/derived-drop-parent-expr.rs @@ -1,4 +1,4 @@ -// build-pass +//@ build-pass //! Like drop-tracking-parent-expression, but also tests that this doesn't ICE when building MIR #![feature(coroutines)] diff --git a/tests/ui/coroutine/discriminant.rs b/tests/ui/coroutine/discriminant.rs index 0cdeb6dd678..a44d8f74746 100644 --- a/tests/ui/coroutine/discriminant.rs +++ b/tests/ui/coroutine/discriminant.rs @@ -1,7 +1,7 @@ //! Tests that coroutine discriminant sizes and ranges are chosen optimally and that they are //! reflected in the output of `mem::discriminant`. -// run-pass +//@ run-pass #![feature(coroutines, coroutine_trait, core_intrinsics, discriminant_kind)] diff --git a/tests/ui/coroutine/drop-and-replace.rs b/tests/ui/coroutine/drop-and-replace.rs index 38b757fac29..6e30d76512b 100644 --- a/tests/ui/coroutine/drop-and-replace.rs +++ b/tests/ui/coroutine/drop-and-replace.rs @@ -1,4 +1,4 @@ -// run-pass +//@ run-pass // Regression test for incorrect DropAndReplace behavior introduced in #60840 // and fixed in #61373. When combined with the optimization implemented in // #60187, this produced incorrect code for coroutines when a saved local was diff --git a/tests/ui/coroutine/drop-control-flow.rs b/tests/ui/coroutine/drop-control-flow.rs index 55d08b8d5b5..f4e8eed4f8d 100644 --- a/tests/ui/coroutine/drop-control-flow.rs +++ b/tests/ui/coroutine/drop-control-flow.rs @@ -1,4 +1,4 @@ -// build-pass +//@ build-pass // A test to ensure coroutines capture values that were conditionally dropped, // and also that values that are dropped along all paths to a yield do not get diff --git a/tests/ui/coroutine/drop-env.rs b/tests/ui/coroutine/drop-env.rs index 404c043431d..b189ab81499 100644 --- a/tests/ui/coroutine/drop-env.rs +++ b/tests/ui/coroutine/drop-env.rs @@ -1,7 +1,7 @@ -// run-pass +//@ run-pass -// revisions: default nomiropt -//[nomiropt]compile-flags: -Z mir-opt-level=0 +//@ revisions: default nomiropt +//@[nomiropt]compile-flags: -Z mir-opt-level=0 #![feature(coroutines, coroutine_trait)] #![allow(dropping_copy_types)] diff --git a/tests/ui/coroutine/drop-track-addassign-yield.rs b/tests/ui/coroutine/drop-track-addassign-yield.rs index 6c5897458ec..b1a4bd79f31 100644 --- a/tests/ui/coroutine/drop-track-addassign-yield.rs +++ b/tests/ui/coroutine/drop-track-addassign-yield.rs @@ -1,4 +1,4 @@ -// run-pass +//@ run-pass // Based on addassign-yield.rs, but with drop tracking enabled. Originally we did not implement // the fake_read callback on ExprUseVisitor which caused this case to break. diff --git a/tests/ui/coroutine/drop-tracking-yielding-in-match-guards.rs b/tests/ui/coroutine/drop-tracking-yielding-in-match-guards.rs index 622765d82aa..0f94016f11b 100644 --- a/tests/ui/coroutine/drop-tracking-yielding-in-match-guards.rs +++ b/tests/ui/coroutine/drop-tracking-yielding-in-match-guards.rs @@ -1,5 +1,5 @@ -// build-pass -// edition:2018 +//@ build-pass +//@ edition:2018 #![feature(coroutines)] diff --git a/tests/ui/coroutine/gen_block.rs b/tests/ui/coroutine/gen_block.rs index 852c7c455a6..f6a775aa661 100644 --- a/tests/ui/coroutine/gen_block.rs +++ b/tests/ui/coroutine/gen_block.rs @@ -1,5 +1,5 @@ -// revisions: e2024 none -//[e2024] compile-flags: --edition 2024 -Zunstable-options +//@ revisions: e2024 none +//@[e2024] compile-flags: --edition 2024 -Zunstable-options #![cfg_attr(e2024, feature(gen_blocks))] fn main() { diff --git a/tests/ui/coroutine/gen_block_is_coro.rs b/tests/ui/coroutine/gen_block_is_coro.rs index c66ccefba85..970646ac470 100644 --- a/tests/ui/coroutine/gen_block_is_coro.rs +++ b/tests/ui/coroutine/gen_block_is_coro.rs @@ -1,4 +1,4 @@ -//compile-flags: --edition 2024 -Zunstable-options +//@compile-flags: --edition 2024 -Zunstable-options #![feature(coroutines, coroutine_trait, gen_blocks)] use std::ops::Coroutine; diff --git a/tests/ui/coroutine/gen_block_is_iter.rs b/tests/ui/coroutine/gen_block_is_iter.rs index d43eef4a18d..396d7737132 100644 --- a/tests/ui/coroutine/gen_block_is_iter.rs +++ b/tests/ui/coroutine/gen_block_is_iter.rs @@ -1,7 +1,7 @@ -// revisions: next old -//compile-flags: --edition 2024 -Zunstable-options -//[next] compile-flags: -Znext-solver -// check-pass +//@ revisions: next old +//@compile-flags: --edition 2024 -Zunstable-options +//@[next] compile-flags: -Znext-solver +//@ check-pass #![feature(gen_blocks)] fn foo() -> impl Iterator { diff --git a/tests/ui/coroutine/gen_block_is_no_future.rs b/tests/ui/coroutine/gen_block_is_no_future.rs index 94766519738..a5bb8533719 100644 --- a/tests/ui/coroutine/gen_block_is_no_future.rs +++ b/tests/ui/coroutine/gen_block_is_no_future.rs @@ -1,4 +1,4 @@ -//compile-flags: --edition 2024 -Zunstable-options +//@compile-flags: --edition 2024 -Zunstable-options #![feature(gen_blocks)] fn foo() -> impl std::future::Future { //~ ERROR is not a future diff --git a/tests/ui/coroutine/gen_block_iterate.rs b/tests/ui/coroutine/gen_block_iterate.rs index 8e72b00d99d..a9cb5ef3e2c 100644 --- a/tests/ui/coroutine/gen_block_iterate.rs +++ b/tests/ui/coroutine/gen_block_iterate.rs @@ -1,7 +1,7 @@ -// revisions: next old -//compile-flags: --edition 2024 -Zunstable-options -//[next] compile-flags: -Znext-solver -// run-pass +//@ revisions: next old +//@compile-flags: --edition 2024 -Zunstable-options +//@[next] compile-flags: -Znext-solver +//@ run-pass #![feature(gen_blocks)] fn foo() -> impl Iterator { diff --git a/tests/ui/coroutine/gen_block_move.fixed b/tests/ui/coroutine/gen_block_move.fixed index 5c6c8062322..0327ca75f9e 100644 --- a/tests/ui/coroutine/gen_block_move.fixed +++ b/tests/ui/coroutine/gen_block_move.fixed @@ -1,5 +1,5 @@ -// compile-flags: --edition 2024 -Zunstable-options -// run-rustfix +//@ compile-flags: --edition 2024 -Zunstable-options +//@ run-rustfix #![feature(gen_blocks)] fn moved() -> impl Iterator { diff --git a/tests/ui/coroutine/gen_block_move.rs b/tests/ui/coroutine/gen_block_move.rs index abbf8132476..53d0149872a 100644 --- a/tests/ui/coroutine/gen_block_move.rs +++ b/tests/ui/coroutine/gen_block_move.rs @@ -1,5 +1,5 @@ -// compile-flags: --edition 2024 -Zunstable-options -// run-rustfix +//@ compile-flags: --edition 2024 -Zunstable-options +//@ run-rustfix #![feature(gen_blocks)] fn moved() -> impl Iterator { diff --git a/tests/ui/coroutine/gen_block_panic.rs b/tests/ui/coroutine/gen_block_panic.rs index 2da0eb512cc..ada56a5bd6f 100644 --- a/tests/ui/coroutine/gen_block_panic.rs +++ b/tests/ui/coroutine/gen_block_panic.rs @@ -1,6 +1,6 @@ -//compile-flags: --edition 2024 -Zunstable-options -// run-pass -// needs-unwind +//@compile-flags: --edition 2024 -Zunstable-options +//@ run-pass +//@ needs-unwind #![feature(gen_blocks)] fn main() { diff --git a/tests/ui/coroutine/gen_fn.rs b/tests/ui/coroutine/gen_fn.rs index e06629c5dfe..3228650f415 100644 --- a/tests/ui/coroutine/gen_fn.rs +++ b/tests/ui/coroutine/gen_fn.rs @@ -1,5 +1,5 @@ -// revisions: e2024 none -//[e2024] compile-flags: --edition 2024 -Zunstable-options +//@ revisions: e2024 none +//@[e2024] compile-flags: --edition 2024 -Zunstable-options gen fn foo() {} //[none]~^ ERROR: expected one of `#`, `async`, `const`, `default`, `extern`, `fn`, `pub`, `unsafe`, or `use`, found `gen` diff --git a/tests/ui/coroutine/gen_fn_iter.rs b/tests/ui/coroutine/gen_fn_iter.rs index da01bc96ef4..ae09d678fe3 100644 --- a/tests/ui/coroutine/gen_fn_iter.rs +++ b/tests/ui/coroutine/gen_fn_iter.rs @@ -1,6 +1,6 @@ -// edition: 2024 -// compile-flags: -Zunstable-options -// run-pass +//@ edition: 2024 +//@ compile-flags: -Zunstable-options +//@ run-pass #![feature(gen_blocks)] // make sure that a ridiculously simple gen fn works as an iterator. diff --git a/tests/ui/coroutine/gen_fn_lifetime_capture.rs b/tests/ui/coroutine/gen_fn_lifetime_capture.rs index b6a4d71e6cc..517096d092e 100644 --- a/tests/ui/coroutine/gen_fn_lifetime_capture.rs +++ b/tests/ui/coroutine/gen_fn_lifetime_capture.rs @@ -1,6 +1,6 @@ -// edition: 2024 -// compile-flags: -Zunstable-options -// check-pass +//@ edition: 2024 +//@ compile-flags: -Zunstable-options +//@ check-pass #![feature(gen_blocks)] // make sure gen fn captures lifetimes in its signature diff --git a/tests/ui/coroutine/issue-110929-coroutine-conflict-error-ice.rs b/tests/ui/coroutine/issue-110929-coroutine-conflict-error-ice.rs index ad39b71b0eb..3d372ac9110 100644 --- a/tests/ui/coroutine/issue-110929-coroutine-conflict-error-ice.rs +++ b/tests/ui/coroutine/issue-110929-coroutine-conflict-error-ice.rs @@ -1,5 +1,5 @@ -// edition:2021 -// check-pass +//@ edition:2021 +//@ check-pass #![feature(coroutines)] fn main() { diff --git a/tests/ui/coroutine/issue-44197.rs b/tests/ui/coroutine/issue-44197.rs index c0326bdae4e..e18bcc2c996 100644 --- a/tests/ui/coroutine/issue-44197.rs +++ b/tests/ui/coroutine/issue-44197.rs @@ -1,4 +1,4 @@ -// run-pass +//@ run-pass #![feature(coroutines, coroutine_trait)] diff --git a/tests/ui/coroutine/issue-52304.rs b/tests/ui/coroutine/issue-52304.rs index fed3a5f19b3..01ed181ab1d 100644 --- a/tests/ui/coroutine/issue-52304.rs +++ b/tests/ui/coroutine/issue-52304.rs @@ -1,4 +1,4 @@ -// check-pass +//@ check-pass #![feature(coroutines, coroutine_trait)] diff --git a/tests/ui/coroutine/issue-52398.rs b/tests/ui/coroutine/issue-52398.rs index 8d651d0e2ce..826ce6b9d9b 100644 --- a/tests/ui/coroutine/issue-52398.rs +++ b/tests/ui/coroutine/issue-52398.rs @@ -1,4 +1,4 @@ -// run-pass +//@ run-pass #![allow(unused_variables)] #![feature(coroutines)] diff --git a/tests/ui/coroutine/issue-53548-1.rs b/tests/ui/coroutine/issue-53548-1.rs index 4be8e95f3e7..21b71e228a9 100644 --- a/tests/ui/coroutine/issue-53548-1.rs +++ b/tests/ui/coroutine/issue-53548-1.rs @@ -2,7 +2,7 @@ // but which encountered the same ICE/error. See `issue-53548.rs` // for details. // -// check-pass +//@ check-pass use std::cell::RefCell; use std::rc::Rc; diff --git a/tests/ui/coroutine/issue-53548.rs b/tests/ui/coroutine/issue-53548.rs index bb267f74ae2..6d55994137f 100644 --- a/tests/ui/coroutine/issue-53548.rs +++ b/tests/ui/coroutine/issue-53548.rs @@ -15,7 +15,7 @@ // also analogous to what we would do for higher-ranked regions // appearing within the trait in other positions). // -// check-pass +//@ check-pass #![feature(coroutines)] diff --git a/tests/ui/coroutine/issue-57017.rs b/tests/ui/coroutine/issue-57017.rs index 4f63abbdb10..b83d916932a 100644 --- a/tests/ui/coroutine/issue-57017.rs +++ b/tests/ui/coroutine/issue-57017.rs @@ -1,4 +1,4 @@ -// build-pass +//@ build-pass #![feature(coroutines, negative_impls)] #![allow(dropping_references, dropping_copy_types)] diff --git a/tests/ui/coroutine/issue-57084.rs b/tests/ui/coroutine/issue-57084.rs index e0aeae66735..51b0c8e1de9 100644 --- a/tests/ui/coroutine/issue-57084.rs +++ b/tests/ui/coroutine/issue-57084.rs @@ -1,7 +1,7 @@ // This issue reproduces an ICE on compile (E.g. fails on 2018-12-19 nightly). // "cannot relate bound region: ReBound(DebruijnIndex(1), BrAnon(1)) <= '?1" -// run-pass -// edition:2018 +//@ run-pass +//@ edition:2018 #![feature(coroutines,coroutine_trait)] use std::ops::Coroutine; diff --git a/tests/ui/coroutine/issue-57478.rs b/tests/ui/coroutine/issue-57478.rs index 716e4c67b87..5e479aaa9c1 100644 --- a/tests/ui/coroutine/issue-57478.rs +++ b/tests/ui/coroutine/issue-57478.rs @@ -1,4 +1,4 @@ -// check-pass +//@ check-pass #![feature(negative_impls, coroutines)] diff --git a/tests/ui/coroutine/issue-58888.rs b/tests/ui/coroutine/issue-58888.rs index 9c699c7bb82..ce45f22dd6e 100644 --- a/tests/ui/coroutine/issue-58888.rs +++ b/tests/ui/coroutine/issue-58888.rs @@ -1,5 +1,5 @@ -// run-pass -// compile-flags: -g +//@ run-pass +//@ compile-flags: -g #![feature(coroutines, coroutine_trait)] diff --git a/tests/ui/coroutine/issue-61442-stmt-expr-with-drop.rs b/tests/ui/coroutine/issue-61442-stmt-expr-with-drop.rs index cff6c24a83f..6280b777201 100644 --- a/tests/ui/coroutine/issue-61442-stmt-expr-with-drop.rs +++ b/tests/ui/coroutine/issue-61442-stmt-expr-with-drop.rs @@ -1,8 +1,8 @@ // Test that we don't consider temporaries for statement expressions as live // across yields -// check-pass -// edition:2018 +//@ check-pass +//@ edition:2018 #![feature(coroutines, coroutine_trait)] diff --git a/tests/ui/coroutine/issue-62506-two_awaits.rs b/tests/ui/coroutine/issue-62506-two_awaits.rs index b50e2a45c58..62feb1bf555 100644 --- a/tests/ui/coroutine/issue-62506-two_awaits.rs +++ b/tests/ui/coroutine/issue-62506-two_awaits.rs @@ -1,8 +1,8 @@ // Output = String caused an ICE whereas Output = &'static str compiled successfully. // Broken MIR: coroutine contains type std::string::String in MIR, // but typeck only knows about {::Future, ()} -// check-pass -// edition:2018 +//@ check-pass +//@ edition:2018 use std::future::Future; diff --git a/tests/ui/coroutine/issue-69017.rs b/tests/ui/coroutine/issue-69017.rs index 7aaa1ee03c4..09bbf63a986 100644 --- a/tests/ui/coroutine/issue-69017.rs +++ b/tests/ui/coroutine/issue-69017.rs @@ -2,7 +2,7 @@ // Fails on 2020-02-08 nightly // regressed commit: https://github.com/rust-lang/rust/commit/f8fd4624474a68bd26694eff3536b9f3a127b2d3 // -// check-pass +//@ check-pass #![feature(coroutine_trait)] #![feature(coroutines)] diff --git a/tests/ui/coroutine/issue-69039.rs b/tests/ui/coroutine/issue-69039.rs index 041985e15a3..fd12414c3d8 100644 --- a/tests/ui/coroutine/issue-69039.rs +++ b/tests/ui/coroutine/issue-69039.rs @@ -1,4 +1,4 @@ -// run-pass +//@ run-pass #![feature(coroutines, coroutine_trait)] diff --git a/tests/ui/coroutine/issue-87142.rs b/tests/ui/coroutine/issue-87142.rs index b5708c4b385..f5c3805842c 100644 --- a/tests/ui/coroutine/issue-87142.rs +++ b/tests/ui/coroutine/issue-87142.rs @@ -1,5 +1,5 @@ -// compile-flags: -Cdebuginfo=2 -// build-pass +//@ compile-flags: -Cdebuginfo=2 +//@ build-pass // Regression test for #87142 // This test needs the above flags and the "lib" crate type. diff --git a/tests/ui/coroutine/issue-93161.rs b/tests/ui/coroutine/issue-93161.rs index ae8603b7c09..0c7be8407d0 100644 --- a/tests/ui/coroutine/issue-93161.rs +++ b/tests/ui/coroutine/issue-93161.rs @@ -1,5 +1,5 @@ -// edition:2021 -// run-pass +//@ edition:2021 +//@ run-pass #![feature(never_type)] diff --git a/tests/ui/coroutine/iterator-count.rs b/tests/ui/coroutine/iterator-count.rs index b7628c44ddc..bb202ab2d33 100644 --- a/tests/ui/coroutine/iterator-count.rs +++ b/tests/ui/coroutine/iterator-count.rs @@ -1,4 +1,4 @@ -// run-pass +//@ run-pass #![feature(coroutines, coroutine_trait)] diff --git a/tests/ui/coroutine/layout-error.rs b/tests/ui/coroutine/layout-error.rs index 87da60700a4..70a0248eabc 100644 --- a/tests/ui/coroutine/layout-error.rs +++ b/tests/ui/coroutine/layout-error.rs @@ -1,7 +1,7 @@ // Verifies that computing a layout of a coroutine tainted by type errors // doesn't ICE. Regression test for #80998. // -// edition:2018 +//@ edition:2018 #![feature(type_alias_impl_trait)] use std::future::Future; diff --git a/tests/ui/coroutine/live-upvar-across-yield.rs b/tests/ui/coroutine/live-upvar-across-yield.rs index 740a446e737..86c4716c951 100644 --- a/tests/ui/coroutine/live-upvar-across-yield.rs +++ b/tests/ui/coroutine/live-upvar-across-yield.rs @@ -1,4 +1,4 @@ -// run-pass +//@ run-pass #![feature(coroutines, coroutine_trait)] diff --git a/tests/ui/coroutine/match-bindings.rs b/tests/ui/coroutine/match-bindings.rs index 1a5b3cdb026..9ea1deaab36 100644 --- a/tests/ui/coroutine/match-bindings.rs +++ b/tests/ui/coroutine/match-bindings.rs @@ -1,4 +1,4 @@ -// run-pass +//@ run-pass #![allow(dead_code)] #![feature(coroutines)] diff --git a/tests/ui/coroutine/metadata-sufficient-for-layout.rs b/tests/ui/coroutine/metadata-sufficient-for-layout.rs index 434a2801597..23937e12c52 100644 --- a/tests/ui/coroutine/metadata-sufficient-for-layout.rs +++ b/tests/ui/coroutine/metadata-sufficient-for-layout.rs @@ -3,7 +3,7 @@ // // Regression test for #80998. // -// aux-build:metadata-sufficient-for-layout.rs +//@ aux-build:metadata-sufficient-for-layout.rs #![feature(type_alias_impl_trait, rustc_attrs)] #![feature(coroutine_trait)] diff --git a/tests/ui/coroutine/nested_coroutine.rs b/tests/ui/coroutine/nested_coroutine.rs index 04f4aa77153..7ff97abf4bb 100644 --- a/tests/ui/coroutine/nested_coroutine.rs +++ b/tests/ui/coroutine/nested_coroutine.rs @@ -1,4 +1,4 @@ -// run-pass +//@ run-pass #![feature(coroutines, coroutine_trait)] diff --git a/tests/ui/coroutine/niche-in-coroutine.rs b/tests/ui/coroutine/niche-in-coroutine.rs index 7ad4c6bc98a..45b920ab927 100644 --- a/tests/ui/coroutine/niche-in-coroutine.rs +++ b/tests/ui/coroutine/niche-in-coroutine.rs @@ -1,6 +1,6 @@ // Test that niche finding works with captured coroutine upvars. -// run-pass +//@ run-pass #![feature(coroutines)] diff --git a/tests/ui/coroutine/non-static-is-unpin.rs b/tests/ui/coroutine/non-static-is-unpin.rs index 238e49bbfdf..0a108d52897 100644 --- a/tests/ui/coroutine/non-static-is-unpin.rs +++ b/tests/ui/coroutine/non-static-is-unpin.rs @@ -1,6 +1,6 @@ -// revisions: current next -//[next] compile-flags: -Znext-solver -// run-pass +//@ revisions: current next +//@[next] compile-flags: -Znext-solver +//@ run-pass #![feature(coroutines, coroutine_trait)] #![allow(dropping_copy_types)] diff --git a/tests/ui/coroutine/overlap-locals.rs b/tests/ui/coroutine/overlap-locals.rs index 7c151270bb5..eea8595ed06 100644 --- a/tests/ui/coroutine/overlap-locals.rs +++ b/tests/ui/coroutine/overlap-locals.rs @@ -1,4 +1,4 @@ -// run-pass +//@ run-pass #![feature(coroutines)] diff --git a/tests/ui/coroutine/panic-drops-resume.rs b/tests/ui/coroutine/panic-drops-resume.rs index e866f216a24..6d026e6edc8 100644 --- a/tests/ui/coroutine/panic-drops-resume.rs +++ b/tests/ui/coroutine/panic-drops-resume.rs @@ -1,7 +1,7 @@ //! Tests that panics inside a coroutine will correctly drop the initial resume argument. -// run-pass -// needs-unwind +//@ run-pass +//@ needs-unwind #![feature(coroutines, coroutine_trait)] diff --git a/tests/ui/coroutine/panic-drops.rs b/tests/ui/coroutine/panic-drops.rs index 7e37279b9eb..c99abdc7246 100644 --- a/tests/ui/coroutine/panic-drops.rs +++ b/tests/ui/coroutine/panic-drops.rs @@ -1,5 +1,5 @@ -// run-pass -// needs-unwind +//@ run-pass +//@ needs-unwind #![feature(coroutines, coroutine_trait)] diff --git a/tests/ui/coroutine/panic-safe.rs b/tests/ui/coroutine/panic-safe.rs index 9aa42756544..89dd09bf520 100644 --- a/tests/ui/coroutine/panic-safe.rs +++ b/tests/ui/coroutine/panic-safe.rs @@ -1,5 +1,5 @@ -// run-pass -// needs-unwind +//@ run-pass +//@ needs-unwind #![feature(coroutines, coroutine_trait)] diff --git a/tests/ui/coroutine/partial-drop.rs b/tests/ui/coroutine/partial-drop.rs index a4347f52a70..ba13544712f 100644 --- a/tests/ui/coroutine/partial-drop.rs +++ b/tests/ui/coroutine/partial-drop.rs @@ -1,4 +1,4 @@ -// check-pass +//@ check-pass #![feature(negative_impls, coroutines)] struct Foo; diff --git a/tests/ui/coroutine/pin-box-coroutine.rs b/tests/ui/coroutine/pin-box-coroutine.rs index e348551a642..1ee6393d1d8 100644 --- a/tests/ui/coroutine/pin-box-coroutine.rs +++ b/tests/ui/coroutine/pin-box-coroutine.rs @@ -1,4 +1,4 @@ -// run-pass +//@ run-pass #![feature(coroutines, coroutine_trait)] diff --git a/tests/ui/coroutine/polymorphize-args.rs b/tests/ui/coroutine/polymorphize-args.rs index de44d667656..21aa3c7aafd 100644 --- a/tests/ui/coroutine/polymorphize-args.rs +++ b/tests/ui/coroutine/polymorphize-args.rs @@ -1,5 +1,5 @@ -// compile-flags: -Zpolymorphize=on -// build-pass +//@ compile-flags: -Zpolymorphize=on +//@ build-pass #![feature(coroutines, coroutine_trait)] diff --git a/tests/ui/coroutine/print/coroutine-print-verbose-1.rs b/tests/ui/coroutine/print/coroutine-print-verbose-1.rs index f0094aa694b..73106328618 100644 --- a/tests/ui/coroutine/print/coroutine-print-verbose-1.rs +++ b/tests/ui/coroutine/print/coroutine-print-verbose-1.rs @@ -1,4 +1,4 @@ -// compile-flags: -Zverbose-internals +//@ compile-flags: -Zverbose-internals // Same as: tests/ui/coroutine/issue-68112.stderr diff --git a/tests/ui/coroutine/print/coroutine-print-verbose-2.rs b/tests/ui/coroutine/print/coroutine-print-verbose-2.rs index 390bfc542b7..f9ea68a8cd9 100644 --- a/tests/ui/coroutine/print/coroutine-print-verbose-2.rs +++ b/tests/ui/coroutine/print/coroutine-print-verbose-2.rs @@ -1,4 +1,4 @@ -// compile-flags: -Zverbose-internals +//@ compile-flags: -Zverbose-internals // Same as test/ui/coroutine/not-send-sync.rs #![feature(coroutines)] diff --git a/tests/ui/coroutine/print/coroutine-print-verbose-3.rs b/tests/ui/coroutine/print/coroutine-print-verbose-3.rs index 49b54a4cd5b..be6dbad9e1c 100644 --- a/tests/ui/coroutine/print/coroutine-print-verbose-3.rs +++ b/tests/ui/coroutine/print/coroutine-print-verbose-3.rs @@ -1,4 +1,4 @@ -// compile-flags: -Zverbose-internals +//@ compile-flags: -Zverbose-internals #![feature(coroutines, coroutine_trait)] diff --git a/tests/ui/coroutine/reborrow-mut-upvar.rs b/tests/ui/coroutine/reborrow-mut-upvar.rs index e4f717be8b5..e1f6211baeb 100644 --- a/tests/ui/coroutine/reborrow-mut-upvar.rs +++ b/tests/ui/coroutine/reborrow-mut-upvar.rs @@ -1,4 +1,4 @@ -// run-pass +//@ run-pass #![feature(coroutines)] diff --git a/tests/ui/coroutine/reinit-in-match-guard.rs b/tests/ui/coroutine/reinit-in-match-guard.rs index 1895de1f12b..4a584204773 100644 --- a/tests/ui/coroutine/reinit-in-match-guard.rs +++ b/tests/ui/coroutine/reinit-in-match-guard.rs @@ -1,4 +1,4 @@ -// build-pass +//@ build-pass #![feature(coroutines)] diff --git a/tests/ui/coroutine/resume-after-return.rs b/tests/ui/coroutine/resume-after-return.rs index acbd8740a35..81f86de641f 100644 --- a/tests/ui/coroutine/resume-after-return.rs +++ b/tests/ui/coroutine/resume-after-return.rs @@ -1,5 +1,5 @@ -// run-pass -// needs-unwind +//@ run-pass +//@ needs-unwind #![feature(coroutines, coroutine_trait)] diff --git a/tests/ui/coroutine/resume-arg-size.rs b/tests/ui/coroutine/resume-arg-size.rs index 22bb469f941..81e96975c98 100644 --- a/tests/ui/coroutine/resume-arg-size.rs +++ b/tests/ui/coroutine/resume-arg-size.rs @@ -1,7 +1,7 @@ #![feature(coroutines)] #![allow(dropping_copy_types)] -// run-pass +//@ run-pass use std::mem::size_of_val; diff --git a/tests/ui/coroutine/resume-live-across-yield.rs b/tests/ui/coroutine/resume-live-across-yield.rs index 935e7d326be..45851411daa 100644 --- a/tests/ui/coroutine/resume-live-across-yield.rs +++ b/tests/ui/coroutine/resume-live-across-yield.rs @@ -1,4 +1,4 @@ -// run-pass +//@ run-pass #![feature(coroutines, coroutine_trait)] diff --git a/tests/ui/coroutine/return-types-diverge.rs b/tests/ui/coroutine/return-types-diverge.rs index 5f21c8cbf34..5b639eea09a 100644 --- a/tests/ui/coroutine/return-types-diverge.rs +++ b/tests/ui/coroutine/return-types-diverge.rs @@ -1,5 +1,5 @@ -// compile-flags: --edition 2024 -Zunstable-options -// check-pass +//@ compile-flags: --edition 2024 -Zunstable-options +//@ check-pass #![feature(gen_blocks)] diff --git a/tests/ui/coroutine/return-types.rs b/tests/ui/coroutine/return-types.rs index 3543d6293f7..ad2080fd88b 100644 --- a/tests/ui/coroutine/return-types.rs +++ b/tests/ui/coroutine/return-types.rs @@ -1,4 +1,4 @@ -// compile-flags: --edition 2024 -Zunstable-options +//@ compile-flags: --edition 2024 -Zunstable-options #![feature(gen_blocks)] diff --git a/tests/ui/coroutine/self_referential_gen_block.rs b/tests/ui/coroutine/self_referential_gen_block.rs index 14daa2e9c35..dccd83768c4 100644 --- a/tests/ui/coroutine/self_referential_gen_block.rs +++ b/tests/ui/coroutine/self_referential_gen_block.rs @@ -1,4 +1,4 @@ -// compile-flags: --edition 2024 -Zunstable-options +//@ compile-flags: --edition 2024 -Zunstable-options #![feature(gen_blocks)] //! This test checks that we don't allow self-referential generators diff --git a/tests/ui/coroutine/size-moved-locals.rs b/tests/ui/coroutine/size-moved-locals.rs index fa657e3b275..84cc4319070 100644 --- a/tests/ui/coroutine/size-moved-locals.rs +++ b/tests/ui/coroutine/size-moved-locals.rs @@ -1,4 +1,4 @@ -// run-pass +//@ run-pass // Test that we don't duplicate storage for a variable that is moved to another // binding. This used to happen in the presence of unwind and drop edges (see // `complex` below.) @@ -9,9 +9,9 @@ // // See issue #59123 for a full explanation. -// edition:2018 -// ignore-wasm32 issue #62807 -// needs-unwind Size of Closures change on panic=abort +//@ edition:2018 +//@ ignore-wasm32 issue #62807 +//@ needs-unwind Size of Closures change on panic=abort #![feature(coroutines, coroutine_trait)] diff --git a/tests/ui/coroutine/smoke-resume-args.rs b/tests/ui/coroutine/smoke-resume-args.rs index 752b21ba087..7d20cd2293d 100644 --- a/tests/ui/coroutine/smoke-resume-args.rs +++ b/tests/ui/coroutine/smoke-resume-args.rs @@ -1,7 +1,7 @@ -// run-pass +//@ run-pass -// revisions: default nomiropt -//[nomiropt]compile-flags: -Z mir-opt-level=0 +//@ revisions: default nomiropt +//@[nomiropt]compile-flags: -Z mir-opt-level=0 #![feature(coroutines, coroutine_trait)] diff --git a/tests/ui/coroutine/smoke.rs b/tests/ui/coroutine/smoke.rs index b74ed26865f..0ed56982c9b 100644 --- a/tests/ui/coroutine/smoke.rs +++ b/tests/ui/coroutine/smoke.rs @@ -1,10 +1,10 @@ -// run-pass +//@ run-pass -// revisions: default nomiropt -//[nomiropt]compile-flags: -Z mir-opt-level=0 +//@ revisions: default nomiropt +//@[nomiropt]compile-flags: -Z mir-opt-level=0 -// ignore-emscripten no threads support -// compile-flags: --test +//@ ignore-emscripten no threads support +//@ compile-flags: --test #![feature(coroutines, coroutine_trait)] diff --git a/tests/ui/coroutine/static-coroutine.rs b/tests/ui/coroutine/static-coroutine.rs index f9fd65b9793..9beaef3e4de 100644 --- a/tests/ui/coroutine/static-coroutine.rs +++ b/tests/ui/coroutine/static-coroutine.rs @@ -1,4 +1,4 @@ -// run-pass +//@ run-pass #![feature(coroutines, coroutine_trait)] diff --git a/tests/ui/coroutine/static-mut-reference-across-yield.rs b/tests/ui/coroutine/static-mut-reference-across-yield.rs index 0ed849e0e7d..0d8042ed852 100644 --- a/tests/ui/coroutine/static-mut-reference-across-yield.rs +++ b/tests/ui/coroutine/static-mut-reference-across-yield.rs @@ -1,4 +1,4 @@ -// build-pass +//@ build-pass #![feature(coroutines)] diff --git a/tests/ui/coroutine/static-not-unpin.rs b/tests/ui/coroutine/static-not-unpin.rs index f27183d11db..63a2b35ef7a 100644 --- a/tests/ui/coroutine/static-not-unpin.rs +++ b/tests/ui/coroutine/static-not-unpin.rs @@ -1,9 +1,9 @@ -// revisions: current next -//[next] compile-flags: -Znext-solver +//@ revisions: current next +//@[next] compile-flags: -Znext-solver #![feature(coroutines)] -// normalize-stderr-test "std::pin::Unpin" -> "std::marker::Unpin" +//@ normalize-stderr-test "std::pin::Unpin" -> "std::marker::Unpin" use std::marker::Unpin; diff --git a/tests/ui/coroutine/static-reference-across-yield.rs b/tests/ui/coroutine/static-reference-across-yield.rs index 6496d8b86cc..cf19ccb54d5 100644 --- a/tests/ui/coroutine/static-reference-across-yield.rs +++ b/tests/ui/coroutine/static-reference-across-yield.rs @@ -1,4 +1,4 @@ -// build-pass +//@ build-pass #![feature(coroutines)] static A: [i32; 5] = [1, 2, 3, 4, 5]; diff --git a/tests/ui/coroutine/too-live-local-in-immovable-gen.rs b/tests/ui/coroutine/too-live-local-in-immovable-gen.rs index 7eaa1552227..382e7ff3814 100644 --- a/tests/ui/coroutine/too-live-local-in-immovable-gen.rs +++ b/tests/ui/coroutine/too-live-local-in-immovable-gen.rs @@ -1,4 +1,4 @@ -// run-pass +//@ run-pass #![allow(unused_unsafe)] #![feature(coroutines)] diff --git a/tests/ui/coroutine/uninhabited-field.rs b/tests/ui/coroutine/uninhabited-field.rs index d9570c2fed8..79776d653b1 100644 --- a/tests/ui/coroutine/uninhabited-field.rs +++ b/tests/ui/coroutine/uninhabited-field.rs @@ -1,5 +1,5 @@ // Test that uninhabited saved local doesn't make the entire variant uninhabited. -// run-pass +//@ run-pass #![allow(unused)] #![feature(assert_matches)] #![feature(coroutine_trait)] diff --git a/tests/ui/coroutine/unresolved-ct-var.rs b/tests/ui/coroutine/unresolved-ct-var.rs index 0316385fba9..d7e3c2d3732 100644 --- a/tests/ui/coroutine/unresolved-ct-var.rs +++ b/tests/ui/coroutine/unresolved-ct-var.rs @@ -1,5 +1,5 @@ -// incremental -// edition:2021 +//@ incremental +//@ edition:2021 fn main() { let _ = async { diff --git a/tests/ui/coroutine/unwind-abort-mix.rs b/tests/ui/coroutine/unwind-abort-mix.rs index 869b3e4f433..517c6613e3d 100644 --- a/tests/ui/coroutine/unwind-abort-mix.rs +++ b/tests/ui/coroutine/unwind-abort-mix.rs @@ -1,11 +1,11 @@ // Ensure that coroutine drop glue is valid when mixing different panic // strategies. Regression test for #116953. // -// no-prefer-dynamic -// build-pass -// aux-build:unwind-aux.rs -// compile-flags: -Cpanic=abort -// needs-unwind +//@ no-prefer-dynamic +//@ build-pass +//@ aux-build:unwind-aux.rs +//@ compile-flags: -Cpanic=abort +//@ needs-unwind extern crate unwind_aux; pub fn main() { diff --git a/tests/ui/coroutine/witness-ignore-fake-reads.rs b/tests/ui/coroutine/witness-ignore-fake-reads.rs index ccf9ce8b49e..9764b00422d 100644 --- a/tests/ui/coroutine/witness-ignore-fake-reads.rs +++ b/tests/ui/coroutine/witness-ignore-fake-reads.rs @@ -1,5 +1,5 @@ -// check-pass -// edition: 2021 +//@ check-pass +//@ edition: 2021 // regression test for #117059 struct SendNotSync(*const ()); diff --git a/tests/ui/coroutine/xcrate-reachable.rs b/tests/ui/coroutine/xcrate-reachable.rs index c6328448868..2e7de649c72 100644 --- a/tests/ui/coroutine/xcrate-reachable.rs +++ b/tests/ui/coroutine/xcrate-reachable.rs @@ -1,6 +1,6 @@ -// run-pass +//@ run-pass -// aux-build:xcrate-reachable.rs +//@ aux-build:xcrate-reachable.rs #![feature(coroutine_trait)] diff --git a/tests/ui/coroutine/xcrate.rs b/tests/ui/coroutine/xcrate.rs index 4572d1cfd54..406152a0bf1 100644 --- a/tests/ui/coroutine/xcrate.rs +++ b/tests/ui/coroutine/xcrate.rs @@ -1,6 +1,6 @@ -// run-pass +//@ run-pass -// aux-build:xcrate.rs +//@ aux-build:xcrate.rs #![feature(coroutines, coroutine_trait)] diff --git a/tests/ui/coroutine/yield-in-args-rev.rs b/tests/ui/coroutine/yield-in-args-rev.rs index b22c32ccd92..b074e2bc939 100644 --- a/tests/ui/coroutine/yield-in-args-rev.rs +++ b/tests/ui/coroutine/yield-in-args-rev.rs @@ -1,4 +1,4 @@ -// run-pass +//@ run-pass #![allow(dead_code)] // Test that a borrow that occurs after a yield in the same diff --git a/tests/ui/coroutine/yield-in-initializer.rs b/tests/ui/coroutine/yield-in-initializer.rs index 5a7b3a4feaf..19218926b8a 100644 --- a/tests/ui/coroutine/yield-in-initializer.rs +++ b/tests/ui/coroutine/yield-in-initializer.rs @@ -1,4 +1,4 @@ -// run-pass +//@ run-pass #![feature(coroutines)] diff --git a/tests/ui/coroutine/yield-subtype.rs b/tests/ui/coroutine/yield-subtype.rs index 3595d449823..271f8362f17 100644 --- a/tests/ui/coroutine/yield-subtype.rs +++ b/tests/ui/coroutine/yield-subtype.rs @@ -1,4 +1,4 @@ -// run-pass +//@ run-pass #![allow(dead_code)] #![allow(dead_code)] diff --git a/tests/ui/coroutine/yielding-in-match-guards.rs b/tests/ui/coroutine/yielding-in-match-guards.rs index a9575a9e77e..6f074188728 100644 --- a/tests/ui/coroutine/yielding-in-match-guards.rs +++ b/tests/ui/coroutine/yielding-in-match-guards.rs @@ -1,5 +1,5 @@ -// build-pass -// edition:2018 +//@ build-pass +//@ edition:2018 // This test is derived from // https://github.com/rust-lang/rust/issues/72651#issuecomment-668720468 diff --git a/tests/ui/crate-leading-sep.rs b/tests/ui/crate-leading-sep.rs index fce97d9ba23..fbc940aed26 100644 --- a/tests/ui/crate-leading-sep.rs +++ b/tests/ui/crate-leading-sep.rs @@ -1,5 +1,5 @@ -// run-pass -// pretty-expanded FIXME #23616 +//@ run-pass +//@ pretty-expanded FIXME #23616 #![allow(dropping_copy_types)] diff --git a/tests/ui/crate-loading/auxiliary/crateresolve1-1.rs b/tests/ui/crate-loading/auxiliary/crateresolve1-1.rs index bd9c8483ec2..6649ffd7a2d 100644 --- a/tests/ui/crate-loading/auxiliary/crateresolve1-1.rs +++ b/tests/ui/crate-loading/auxiliary/crateresolve1-1.rs @@ -1,5 +1,5 @@ -// compile-flags:-C extra-filename=-1 -// no-prefer-dynamic +//@ compile-flags:-C extra-filename=-1 +//@ no-prefer-dynamic #![crate_name = "crateresolve1"] #![crate_type = "lib"] diff --git a/tests/ui/crate-loading/auxiliary/crateresolve1-2.rs b/tests/ui/crate-loading/auxiliary/crateresolve1-2.rs index bd0f08f45b6..63327c77668 100644 --- a/tests/ui/crate-loading/auxiliary/crateresolve1-2.rs +++ b/tests/ui/crate-loading/auxiliary/crateresolve1-2.rs @@ -1,5 +1,5 @@ -// compile-flags:-C extra-filename=-2 -// no-prefer-dynamic +//@ compile-flags:-C extra-filename=-2 +//@ no-prefer-dynamic #![crate_name = "crateresolve1"] #![crate_type = "lib"] diff --git a/tests/ui/crate-loading/auxiliary/crateresolve1-3.rs b/tests/ui/crate-loading/auxiliary/crateresolve1-3.rs index 1226c2fbb46..59ed1836990 100644 --- a/tests/ui/crate-loading/auxiliary/crateresolve1-3.rs +++ b/tests/ui/crate-loading/auxiliary/crateresolve1-3.rs @@ -1,5 +1,5 @@ -// compile-flags:-C extra-filename=-3 -// no-prefer-dynamic +//@ compile-flags:-C extra-filename=-3 +//@ no-prefer-dynamic #![crate_name = "crateresolve1"] #![crate_type = "lib"] diff --git a/tests/ui/crate-loading/auxiliary/crateresolve2-1.rs b/tests/ui/crate-loading/auxiliary/crateresolve2-1.rs index e9459ed0719..cd4fcc4084a 100644 --- a/tests/ui/crate-loading/auxiliary/crateresolve2-1.rs +++ b/tests/ui/crate-loading/auxiliary/crateresolve2-1.rs @@ -1,4 +1,4 @@ -// compile-flags:-C extra-filename=-1 --emit=metadata +//@ compile-flags:-C extra-filename=-1 --emit=metadata #![crate_name = "crateresolve2"] #![crate_type = "lib"] diff --git a/tests/ui/crate-loading/auxiliary/crateresolve2-2.rs b/tests/ui/crate-loading/auxiliary/crateresolve2-2.rs index c4541682723..b63879c063a 100644 --- a/tests/ui/crate-loading/auxiliary/crateresolve2-2.rs +++ b/tests/ui/crate-loading/auxiliary/crateresolve2-2.rs @@ -1,4 +1,4 @@ -// compile-flags:-C extra-filename=-2 --emit=metadata +//@ compile-flags:-C extra-filename=-2 --emit=metadata #![crate_name = "crateresolve2"] #![crate_type = "lib"] diff --git a/tests/ui/crate-loading/auxiliary/crateresolve2-3.rs b/tests/ui/crate-loading/auxiliary/crateresolve2-3.rs index b356db4b6fc..e43cb293a2c 100644 --- a/tests/ui/crate-loading/auxiliary/crateresolve2-3.rs +++ b/tests/ui/crate-loading/auxiliary/crateresolve2-3.rs @@ -1,4 +1,4 @@ -// compile-flags:-C extra-filename=-3 --emit=metadata +//@ compile-flags:-C extra-filename=-3 --emit=metadata #![crate_name = "crateresolve2"] #![crate_type = "lib"] diff --git a/tests/ui/crate-loading/auxiliary/proc-macro.rs b/tests/ui/crate-loading/auxiliary/proc-macro.rs index 52631de5757..ad227c069d2 100644 --- a/tests/ui/crate-loading/auxiliary/proc-macro.rs +++ b/tests/ui/crate-loading/auxiliary/proc-macro.rs @@ -1,5 +1,5 @@ -// force-host -// no-prefer-dynamic +//@ force-host +//@ no-prefer-dynamic #![crate_name = "reproduction"] #![crate_type = "proc-macro"] diff --git a/tests/ui/crate-loading/crateresolve1.rs b/tests/ui/crate-loading/crateresolve1.rs index 61a1ee263ed..2fccb744e82 100644 --- a/tests/ui/crate-loading/crateresolve1.rs +++ b/tests/ui/crate-loading/crateresolve1.rs @@ -1,10 +1,10 @@ -// aux-build:crateresolve1-1.rs -// aux-build:crateresolve1-2.rs -// aux-build:crateresolve1-3.rs +//@ aux-build:crateresolve1-1.rs +//@ aux-build:crateresolve1-2.rs +//@ aux-build:crateresolve1-3.rs -// normalize-stderr-test: "\.nll/" -> "/" -// normalize-stderr-test: "\\\?\\" -> "" -// normalize-stderr-test: "(lib)?crateresolve1-([123])\.[a-z]+" -> "libcrateresolve1-$2.somelib" +//@ normalize-stderr-test: "\.nll/" -> "/" +//@ normalize-stderr-test: "\\\?\\" -> "" +//@ normalize-stderr-test: "(lib)?crateresolve1-([123])\.[a-z]+" -> "libcrateresolve1-$2.somelib" // NOTE: This test is duplicated at `tests/ui/error-codes/E0464.rs`. diff --git a/tests/ui/crate-loading/crateresolve2.rs b/tests/ui/crate-loading/crateresolve2.rs index 0774c0dfd32..159ce04c3c4 100644 --- a/tests/ui/crate-loading/crateresolve2.rs +++ b/tests/ui/crate-loading/crateresolve2.rs @@ -1,11 +1,11 @@ -// check-fail +//@ check-fail -// aux-build:crateresolve2-1.rs -// aux-build:crateresolve2-2.rs -// aux-build:crateresolve2-3.rs +//@ aux-build:crateresolve2-1.rs +//@ aux-build:crateresolve2-2.rs +//@ aux-build:crateresolve2-3.rs -// normalize-stderr-test: "\.nll/" -> "/" -// normalize-stderr-test: "\\\?\\" -> "" +//@ normalize-stderr-test: "\.nll/" -> "/" +//@ normalize-stderr-test: "\\\?\\" -> "" extern crate crateresolve2; //~^ ERROR multiple candidates for `rmeta` dependency `crateresolve2` found diff --git a/tests/ui/crate-loading/cross-compiled-proc-macro.rs b/tests/ui/crate-loading/cross-compiled-proc-macro.rs index c1f4331438e..51431c05865 100644 --- a/tests/ui/crate-loading/cross-compiled-proc-macro.rs +++ b/tests/ui/crate-loading/cross-compiled-proc-macro.rs @@ -1,7 +1,7 @@ -// edition:2018 -// compile-flags:--extern reproduction -// aux-build:proc-macro.rs -// check-pass +//@ edition:2018 +//@ compile-flags:--extern reproduction +//@ aux-build:proc-macro.rs +//@ check-pass reproduction::mac!(); diff --git a/tests/ui/crate-loading/invalid-rlib.rs b/tests/ui/crate-loading/invalid-rlib.rs index 0997bee19bb..0b401add8e4 100644 --- a/tests/ui/crate-loading/invalid-rlib.rs +++ b/tests/ui/crate-loading/invalid-rlib.rs @@ -1,8 +1,8 @@ -// compile-flags: --crate-type lib --extern foo={{src-base}}/crate-loading/auxiliary/libfoo.rlib -// normalize-stderr-test: "failed to mmap file '.*auxiliary/libfoo.rlib':.*" -> "failed to mmap file 'auxiliary/libfoo.rlib'" +//@ compile-flags: --crate-type lib --extern foo={{src-base}}/crate-loading/auxiliary/libfoo.rlib +//@ normalize-stderr-test: "failed to mmap file '.*auxiliary/libfoo.rlib':.*" -> "failed to mmap file 'auxiliary/libfoo.rlib'" // don't emit warn logging, it's basically the same as the errors and it's annoying to normalize -// rustc-env:RUSTC_LOG=error -// edition:2018 +//@ rustc-env:RUSTC_LOG=error +//@ edition:2018 #![no_std] use ::foo; //~ ERROR invalid metadata files for crate `foo` //~| NOTE failed to mmap file diff --git a/tests/ui/crate-loading/missing-std.rs b/tests/ui/crate-loading/missing-std.rs index 400d9f6e0ba..ca9501cda3a 100644 --- a/tests/ui/crate-loading/missing-std.rs +++ b/tests/ui/crate-loading/missing-std.rs @@ -1,6 +1,6 @@ -// compile-flags: --target x86_64-unknown-uefi -// needs-llvm-components: x86 -// rustc-env:CARGO=/usr/bin/cargo +//@ compile-flags: --target x86_64-unknown-uefi +//@ needs-llvm-components: x86 +//@ rustc-env:CARGO=/usr/bin/cargo #![feature(no_core)] #![no_core] extern crate core; diff --git a/tests/ui/crate-method-reexport-grrrrrrr.rs b/tests/ui/crate-method-reexport-grrrrrrr.rs index 55e05cfb203..870c6851a66 100644 --- a/tests/ui/crate-method-reexport-grrrrrrr.rs +++ b/tests/ui/crate-method-reexport-grrrrrrr.rs @@ -1,11 +1,11 @@ -// run-pass -// pretty-expanded FIXME #23616 +//@ run-pass +//@ pretty-expanded FIXME #23616 // This is a regression test that the metadata for the // name_pool::methods impl in the other crate is reachable from this // crate. -// aux-build:crate-method-reexport-grrrrrrr2.rs +//@ aux-build:crate-method-reexport-grrrrrrr2.rs extern crate crate_method_reexport_grrrrrrr2; diff --git a/tests/ui/crate-name-attr-used.rs b/tests/ui/crate-name-attr-used.rs index ad53a53143e..8e958aa0eaa 100644 --- a/tests/ui/crate-name-attr-used.rs +++ b/tests/ui/crate-name-attr-used.rs @@ -1,7 +1,7 @@ -// run-pass -// compile-flags:--crate-name crate_name_attr_used -F unused-attributes +//@ run-pass +//@ compile-flags:--crate-name crate_name_attr_used -F unused-attributes -// pretty-expanded FIXME #23616 +//@ pretty-expanded FIXME #23616 #![crate_name = "crate_name_attr_used"] diff --git a/tests/ui/crate-name-mismatch.rs b/tests/ui/crate-name-mismatch.rs index 23ad39a6f92..7651e0f97eb 100644 --- a/tests/ui/crate-name-mismatch.rs +++ b/tests/ui/crate-name-mismatch.rs @@ -1,4 +1,4 @@ -// compile-flags: --crate-name foo +//@ compile-flags: --crate-name foo #![crate_name = "bar"] //~^ ERROR: `--crate-name` and `#[crate_name]` are required to match, but `foo` != `bar` diff --git a/tests/ui/cross-crate/cci_borrow.rs b/tests/ui/cross-crate/cci_borrow.rs index fee6b5d03a9..e132be318f4 100644 --- a/tests/ui/cross-crate/cci_borrow.rs +++ b/tests/ui/cross-crate/cci_borrow.rs @@ -1,5 +1,5 @@ -// run-pass -// aux-build:cci_borrow_lib.rs +//@ run-pass +//@ aux-build:cci_borrow_lib.rs extern crate cci_borrow_lib; use cci_borrow_lib::foo; diff --git a/tests/ui/cross-crate/cci_capture_clause.rs b/tests/ui/cross-crate/cci_capture_clause.rs index ea699b5f5ac..99736ad185d 100644 --- a/tests/ui/cross-crate/cci_capture_clause.rs +++ b/tests/ui/cross-crate/cci_capture_clause.rs @@ -1,11 +1,11 @@ -// run-pass -// aux-build:cci_capture_clause.rs +//@ run-pass +//@ aux-build:cci_capture_clause.rs // This test makes sure we can do cross-crate inlining on functions // that use capture clauses. -// pretty-expanded FIXME #23616 -// ignore-emscripten no threads support +//@ pretty-expanded FIXME #23616 +//@ ignore-emscripten no threads support extern crate cci_capture_clause; diff --git a/tests/ui/cross-crate/cci_impl_exe.rs b/tests/ui/cross-crate/cci_impl_exe.rs index b11fb23ebc8..46433222f6f 100644 --- a/tests/ui/cross-crate/cci_impl_exe.rs +++ b/tests/ui/cross-crate/cci_impl_exe.rs @@ -1,5 +1,5 @@ -// run-pass -// aux-build:cci_impl_lib.rs +//@ run-pass +//@ aux-build:cci_impl_lib.rs extern crate cci_impl_lib; use cci_impl_lib::uint_helpers; diff --git a/tests/ui/cross-crate/cci_iter_exe.rs b/tests/ui/cross-crate/cci_iter_exe.rs index 8b58d90fe4e..3ec0120a0c6 100644 --- a/tests/ui/cross-crate/cci_iter_exe.rs +++ b/tests/ui/cross-crate/cci_iter_exe.rs @@ -1,5 +1,5 @@ -// run-pass -// aux-build:cci_iter_lib.rs +//@ run-pass +//@ aux-build:cci_iter_lib.rs extern crate cci_iter_lib; diff --git a/tests/ui/cross-crate/cci_nested_exe.rs b/tests/ui/cross-crate/cci_nested_exe.rs index 1c001a2a372..6e224e05dc3 100644 --- a/tests/ui/cross-crate/cci_nested_exe.rs +++ b/tests/ui/cross-crate/cci_nested_exe.rs @@ -1,5 +1,5 @@ -// run-pass -// aux-build:cci_nested_lib.rs +//@ run-pass +//@ aux-build:cci_nested_lib.rs extern crate cci_nested_lib; diff --git a/tests/ui/cross-crate/cci_no_inline_exe.rs b/tests/ui/cross-crate/cci_no_inline_exe.rs index ffc701678d3..c23546ffe84 100644 --- a/tests/ui/cross-crate/cci_no_inline_exe.rs +++ b/tests/ui/cross-crate/cci_no_inline_exe.rs @@ -1,5 +1,5 @@ -// run-pass -// aux-build:cci_no_inline_lib.rs +//@ run-pass +//@ aux-build:cci_no_inline_lib.rs extern crate cci_no_inline_lib; use cci_no_inline_lib::iter; diff --git a/tests/ui/cross-crate/const-cross-crate-const.rs b/tests/ui/cross-crate/const-cross-crate-const.rs index 92020417ff5..ac36969083e 100644 --- a/tests/ui/cross-crate/const-cross-crate-const.rs +++ b/tests/ui/cross-crate/const-cross-crate-const.rs @@ -1,5 +1,5 @@ -// run-pass -// aux-build:cci_const.rs +//@ run-pass +//@ aux-build:cci_const.rs #![allow(non_upper_case_globals)] extern crate cci_const; diff --git a/tests/ui/cross-crate/const-cross-crate-extern.rs b/tests/ui/cross-crate/const-cross-crate-extern.rs index 3c61afd5bec..8d48a6a5206 100644 --- a/tests/ui/cross-crate/const-cross-crate-extern.rs +++ b/tests/ui/cross-crate/const-cross-crate-extern.rs @@ -1,5 +1,5 @@ -// run-pass -// aux-build:cci_const.rs +//@ run-pass +//@ aux-build:cci_const.rs #![allow(non_upper_case_globals)] extern crate cci_const; diff --git a/tests/ui/cross-crate/cross-crate-const-pat.rs b/tests/ui/cross-crate/cross-crate-const-pat.rs index e8fa8485ab2..4ff55adb804 100644 --- a/tests/ui/cross-crate/cross-crate-const-pat.rs +++ b/tests/ui/cross-crate/cross-crate-const-pat.rs @@ -1,7 +1,7 @@ -// run-pass -// aux-build:cci_const.rs +//@ run-pass +//@ aux-build:cci_const.rs -// pretty-expanded FIXME #23616 +//@ pretty-expanded FIXME #23616 extern crate cci_const; diff --git a/tests/ui/cross-crate/issue-64872/auxiliary/a_def_obj.rs b/tests/ui/cross-crate/issue-64872/auxiliary/a_def_obj.rs index 82bb95f1ef2..219957db30a 100644 --- a/tests/ui/cross-crate/issue-64872/auxiliary/a_def_obj.rs +++ b/tests/ui/cross-crate/issue-64872/auxiliary/a_def_obj.rs @@ -1,6 +1,6 @@ -// compile-flags: -C debuginfo=2 +//@ compile-flags: -C debuginfo=2 -// no-prefer-dynamic +//@ no-prefer-dynamic #![crate_type = "rlib"] pub trait Object { fn method(&self) { } } diff --git a/tests/ui/cross-crate/issue-64872/auxiliary/b_reexport_obj.rs b/tests/ui/cross-crate/issue-64872/auxiliary/b_reexport_obj.rs index 21c0274b991..62b47f9c6d2 100644 --- a/tests/ui/cross-crate/issue-64872/auxiliary/b_reexport_obj.rs +++ b/tests/ui/cross-crate/issue-64872/auxiliary/b_reexport_obj.rs @@ -1,4 +1,4 @@ -// compile-flags: -C debuginfo=2 -C prefer-dynamic +//@ compile-flags: -C debuginfo=2 -C prefer-dynamic #![crate_type="dylib"] diff --git a/tests/ui/cross-crate/issue-64872/auxiliary/c_another_vtable_for_obj.rs b/tests/ui/cross-crate/issue-64872/auxiliary/c_another_vtable_for_obj.rs index 611238f5617..a829668ef6a 100644 --- a/tests/ui/cross-crate/issue-64872/auxiliary/c_another_vtable_for_obj.rs +++ b/tests/ui/cross-crate/issue-64872/auxiliary/c_another_vtable_for_obj.rs @@ -1,5 +1,5 @@ -// no-prefer-dynamic -// compile-flags: -C debuginfo=2 +//@ no-prefer-dynamic +//@ compile-flags: -C debuginfo=2 #![crate_type="rlib"] extern crate b_reexport_obj; diff --git a/tests/ui/cross-crate/issue-64872/auxiliary/d_chain_of_rlibs_and_dylibs.rs b/tests/ui/cross-crate/issue-64872/auxiliary/d_chain_of_rlibs_and_dylibs.rs index 8d73f9b666f..cbc7c26a7ef 100644 --- a/tests/ui/cross-crate/issue-64872/auxiliary/d_chain_of_rlibs_and_dylibs.rs +++ b/tests/ui/cross-crate/issue-64872/auxiliary/d_chain_of_rlibs_and_dylibs.rs @@ -1,4 +1,4 @@ -// compile-flags: -C debuginfo=2 -C prefer-dynamic +//@ compile-flags: -C debuginfo=2 -C prefer-dynamic #![crate_type="rlib"] diff --git a/tests/ui/cross-crate/issue-64872/issue-64872.rs b/tests/ui/cross-crate/issue-64872/issue-64872.rs index 20fe2053cc7..e5104753789 100644 --- a/tests/ui/cross-crate/issue-64872/issue-64872.rs +++ b/tests/ui/cross-crate/issue-64872/issue-64872.rs @@ -1,14 +1,14 @@ -// run-pass +//@ run-pass // note that these aux-build directives must be in this order: the // later crates depend on the earlier ones. (The particular bug that // is being exercised here used to exhibit itself during the build of // `chain_of_rlibs_and_dylibs.dylib`) -// aux-build:a_def_obj.rs -// aux-build:b_reexport_obj.rs -// aux-build:c_another_vtable_for_obj.rs -// aux-build:d_chain_of_rlibs_and_dylibs.rs +//@ aux-build:a_def_obj.rs +//@ aux-build:b_reexport_obj.rs +//@ aux-build:c_another_vtable_for_obj.rs +//@ aux-build:d_chain_of_rlibs_and_dylibs.rs extern crate d_chain_of_rlibs_and_dylibs; diff --git a/tests/ui/cross-crate/moves-based-on-type-cross-crate.rs b/tests/ui/cross-crate/moves-based-on-type-cross-crate.rs index 3881e335220..640a1789cbe 100644 --- a/tests/ui/cross-crate/moves-based-on-type-cross-crate.rs +++ b/tests/ui/cross-crate/moves-based-on-type-cross-crate.rs @@ -1,7 +1,7 @@ -// run-pass -// aux-build:moves_based_on_type_lib.rs +//@ run-pass +//@ aux-build:moves_based_on_type_lib.rs -// pretty-expanded FIXME #23616 +//@ pretty-expanded FIXME #23616 extern crate moves_based_on_type_lib; use moves_based_on_type_lib::f; diff --git a/tests/ui/cross-crate/reexported-static-methods-cross-crate.rs b/tests/ui/cross-crate/reexported-static-methods-cross-crate.rs index 8c70a1ce477..6092ff8a40d 100644 --- a/tests/ui/cross-crate/reexported-static-methods-cross-crate.rs +++ b/tests/ui/cross-crate/reexported-static-methods-cross-crate.rs @@ -1,5 +1,5 @@ -// run-pass -// aux-build:reexported_static_methods.rs +//@ run-pass +//@ aux-build:reexported_static_methods.rs extern crate reexported_static_methods; diff --git a/tests/ui/cross-crate/static-array-across-crate.rs b/tests/ui/cross-crate/static-array-across-crate.rs index 0b84e0e6a3f..fecdf41c298 100644 --- a/tests/ui/cross-crate/static-array-across-crate.rs +++ b/tests/ui/cross-crate/static-array-across-crate.rs @@ -1,6 +1,6 @@ -// run-pass +//@ run-pass #![allow(dead_code)] -// aux-build:pub_static_array.rs +//@ aux-build:pub_static_array.rs extern crate pub_static_array as array; diff --git a/tests/ui/cross-crate/static-init.rs b/tests/ui/cross-crate/static-init.rs index 0b50c41fc5e..090ad5f810e 100644 --- a/tests/ui/cross-crate/static-init.rs +++ b/tests/ui/cross-crate/static-init.rs @@ -1,6 +1,6 @@ // Regression test for #84455 and #115052. -// run-pass -// aux-build:static_init_aux.rs +//@ run-pass +//@ aux-build:static_init_aux.rs extern crate static_init_aux as aux; static V: &u32 = aux::V; diff --git a/tests/ui/cross-crate/xcrate-address-insignificant.rs b/tests/ui/cross-crate/xcrate-address-insignificant.rs index 33c70650603..891fe14d9a0 100644 --- a/tests/ui/cross-crate/xcrate-address-insignificant.rs +++ b/tests/ui/cross-crate/xcrate-address-insignificant.rs @@ -1,5 +1,5 @@ -// run-pass -// aux-build:xcrate_address_insignificant.rs +//@ run-pass +//@ aux-build:xcrate_address_insignificant.rs extern crate xcrate_address_insignificant as foo; diff --git a/tests/ui/cross-crate/xcrate-associated-type-defaults.rs b/tests/ui/cross-crate/xcrate-associated-type-defaults.rs index 0f3e077d1de..04eb90afae9 100644 --- a/tests/ui/cross-crate/xcrate-associated-type-defaults.rs +++ b/tests/ui/cross-crate/xcrate-associated-type-defaults.rs @@ -1,5 +1,5 @@ -// run-pass -// aux-build:xcrate_associated_type_defaults.rs +//@ run-pass +//@ aux-build:xcrate_associated_type_defaults.rs extern crate xcrate_associated_type_defaults; use xcrate_associated_type_defaults::Foo; diff --git a/tests/ui/cross-crate/xcrate-static-addresses.rs b/tests/ui/cross-crate/xcrate-static-addresses.rs index 3c33976568e..66ac467e9ac 100644 --- a/tests/ui/cross-crate/xcrate-static-addresses.rs +++ b/tests/ui/cross-crate/xcrate-static-addresses.rs @@ -1,7 +1,7 @@ -// run-pass -// aux-build:xcrate_static_addresses.rs +//@ run-pass +//@ aux-build:xcrate_static_addresses.rs -// pretty-expanded FIXME #23616 +//@ pretty-expanded FIXME #23616 extern crate xcrate_static_addresses; diff --git a/tests/ui/cross-crate/xcrate-trait-lifetime-param.rs b/tests/ui/cross-crate/xcrate-trait-lifetime-param.rs index 1fd7eb878d9..28955e62d95 100644 --- a/tests/ui/cross-crate/xcrate-trait-lifetime-param.rs +++ b/tests/ui/cross-crate/xcrate-trait-lifetime-param.rs @@ -1,8 +1,8 @@ -// run-pass +//@ run-pass #![allow(dead_code)] -// aux-build:xcrate-trait-lifetime-param.rs +//@ aux-build:xcrate-trait-lifetime-param.rs -// pretty-expanded FIXME #23616 +//@ pretty-expanded FIXME #23616 extern crate xcrate_trait_lifetime_param as other; diff --git a/tests/ui/cross-crate/xcrate_generic_fn_nested_return.rs b/tests/ui/cross-crate/xcrate_generic_fn_nested_return.rs index 4593fec5196..dbfcdf8197a 100644 --- a/tests/ui/cross-crate/xcrate_generic_fn_nested_return.rs +++ b/tests/ui/cross-crate/xcrate_generic_fn_nested_return.rs @@ -1,5 +1,5 @@ -// run-pass -// aux-build:xcrate_generic_fn_nested_return.rs +//@ run-pass +//@ aux-build:xcrate_generic_fn_nested_return.rs extern crate xcrate_generic_fn_nested_return as test; diff --git a/tests/ui/cross/cross-crate-macro-backtrace/main.rs b/tests/ui/cross/cross-crate-macro-backtrace/main.rs index f7d4330ab19..7ef9bdfb164 100644 --- a/tests/ui/cross/cross-crate-macro-backtrace/main.rs +++ b/tests/ui/cross/cross-crate-macro-backtrace/main.rs @@ -1,4 +1,4 @@ -// aux-build:extern_macro_crate.rs +//@ aux-build:extern_macro_crate.rs #[macro_use(myprintln, myprint)] extern crate extern_macro_crate; diff --git a/tests/ui/cross/cross-file-errors/underscore.rs b/tests/ui/cross/cross-file-errors/underscore.rs index 4dd91c13ea9..9d075735393 100644 --- a/tests/ui/cross/cross-file-errors/underscore.rs +++ b/tests/ui/cross/cross-file-errors/underscore.rs @@ -1,4 +1,4 @@ -// ignore-test (auxiliary, used by other tests) +//@ ignore-test (auxiliary, used by other tests) #![crate_type = "lib"] macro_rules! underscore { diff --git a/tests/ui/custom-test-frameworks-simple.rs b/tests/ui/custom-test-frameworks-simple.rs index aee0040ef4d..3fb7de6b26b 100644 --- a/tests/ui/custom-test-frameworks-simple.rs +++ b/tests/ui/custom-test-frameworks-simple.rs @@ -1,5 +1,5 @@ -// compile-flags: --test -// run-pass +//@ compile-flags: --test +//@ run-pass #![feature(custom_test_frameworks)] #![test_runner(crate::foo_runner)] diff --git a/tests/ui/custom_test_frameworks/dynamic.rs b/tests/ui/custom_test_frameworks/dynamic.rs index 6766ec542b1..7cbc9fd5c8d 100644 --- a/tests/ui/custom_test_frameworks/dynamic.rs +++ b/tests/ui/custom_test_frameworks/dynamic.rs @@ -1,6 +1,6 @@ -// run-pass -// aux-build:dynamic_runner.rs -// compile-flags:--test +//@ run-pass +//@ aux-build:dynamic_runner.rs +//@ compile-flags:--test #![feature(custom_test_frameworks)] #![test_runner(dynamic_runner::runner)] diff --git a/tests/ui/custom_test_frameworks/full.rs b/tests/ui/custom_test_frameworks/full.rs index 8c818826857..289767b1f69 100644 --- a/tests/ui/custom_test_frameworks/full.rs +++ b/tests/ui/custom_test_frameworks/full.rs @@ -1,6 +1,6 @@ -// run-pass -// aux-build:example_runner.rs -// compile-flags:--test +//@ run-pass +//@ aux-build:example_runner.rs +//@ compile-flags:--test #![feature(custom_test_frameworks)] #![test_runner(example_runner::runner)] diff --git a/tests/ui/custom_test_frameworks/mismatch.rs b/tests/ui/custom_test_frameworks/mismatch.rs index ac850552b5b..c4773c13264 100644 --- a/tests/ui/custom_test_frameworks/mismatch.rs +++ b/tests/ui/custom_test_frameworks/mismatch.rs @@ -1,5 +1,5 @@ -// aux-build:example_runner.rs -// compile-flags:--test +//@ aux-build:example_runner.rs +//@ compile-flags:--test #![feature(custom_test_frameworks)] #![test_runner(example_runner::runner)] diff --git a/tests/ui/debuginfo/debuginfo-box-with-large-allocator.rs b/tests/ui/debuginfo/debuginfo-box-with-large-allocator.rs index 761539227a7..ac857ff34a4 100644 --- a/tests/ui/debuginfo/debuginfo-box-with-large-allocator.rs +++ b/tests/ui/debuginfo/debuginfo-box-with-large-allocator.rs @@ -1,5 +1,5 @@ -// build-pass -// compile-flags: -Cdebuginfo=2 +//@ build-pass +//@ compile-flags: -Cdebuginfo=2 // fixes issue #94725 #![feature(allocator_api)] diff --git a/tests/ui/debuginfo/debuginfo-emit-llvm-ir-and-split-debuginfo.rs b/tests/ui/debuginfo/debuginfo-emit-llvm-ir-and-split-debuginfo.rs index ff764015dc7..86117965016 100644 --- a/tests/ui/debuginfo/debuginfo-emit-llvm-ir-and-split-debuginfo.rs +++ b/tests/ui/debuginfo/debuginfo-emit-llvm-ir-and-split-debuginfo.rs @@ -1,7 +1,7 @@ -// build-pass -// only-linux +//@ build-pass +//@ only-linux // -// compile-flags: -g --emit=llvm-ir -Csplit-debuginfo=unpacked +//@ compile-flags: -g --emit=llvm-ir -Csplit-debuginfo=unpacked // // Make sure that we don't explode with an error if we don't actually end up emitting any `dwo`s, // as would be the case if we don't actually codegen anything. diff --git a/tests/ui/debuginfo/debuginfo-type-name-layout-ice-94961-1.rs b/tests/ui/debuginfo/debuginfo-type-name-layout-ice-94961-1.rs index 78bda28485d..6d70764b9f7 100644 --- a/tests/ui/debuginfo/debuginfo-type-name-layout-ice-94961-1.rs +++ b/tests/ui/debuginfo/debuginfo-type-name-layout-ice-94961-1.rs @@ -1,11 +1,11 @@ // Make sure the compiler does not ICE when trying to generate the debuginfo name of a type that // causes a layout error. See https://github.com/rust-lang/rust/issues/94961. -// compile-flags:-C debuginfo=2 -// build-fail -// error-pattern: too big for the current architecture -// normalize-stderr-64bit "18446744073709551615" -> "SIZE" -// normalize-stderr-32bit "4294967295" -> "SIZE" +//@ compile-flags:-C debuginfo=2 +//@ build-fail +//@ error-pattern: too big for the current architecture +//@ normalize-stderr-64bit "18446744073709551615" -> "SIZE" +//@ normalize-stderr-32bit "4294967295" -> "SIZE" #![crate_type = "rlib"] diff --git a/tests/ui/debuginfo/debuginfo-type-name-layout-ice-94961-2.rs b/tests/ui/debuginfo/debuginfo-type-name-layout-ice-94961-2.rs index fdc088dc0f9..a84dec10abd 100644 --- a/tests/ui/debuginfo/debuginfo-type-name-layout-ice-94961-2.rs +++ b/tests/ui/debuginfo/debuginfo-type-name-layout-ice-94961-2.rs @@ -3,11 +3,11 @@ // This version of the test already ICE'd before the commit that introduce the ICE described in // https://github.com/rust-lang/rust/issues/94961. -// compile-flags:-C debuginfo=2 -// build-fail -// error-pattern: too big for the current architecture -// normalize-stderr-64bit "18446744073709551615" -> "SIZE" -// normalize-stderr-32bit "4294967295" -> "SIZE" +//@ compile-flags:-C debuginfo=2 +//@ build-fail +//@ error-pattern: too big for the current architecture +//@ normalize-stderr-64bit "18446744073709551615" -> "SIZE" +//@ normalize-stderr-32bit "4294967295" -> "SIZE" #![crate_type = "rlib"] diff --git a/tests/ui/debuginfo/debuginfo_with_uninhabitable_field_and_unsized.rs b/tests/ui/debuginfo/debuginfo_with_uninhabitable_field_and_unsized.rs index b3f22ecf511..e082a172e35 100644 --- a/tests/ui/debuginfo/debuginfo_with_uninhabitable_field_and_unsized.rs +++ b/tests/ui/debuginfo/debuginfo_with_uninhabitable_field_and_unsized.rs @@ -1,5 +1,5 @@ -// build-pass -// compile-flags: -Cdebuginfo=2 +//@ build-pass +//@ compile-flags: -Cdebuginfo=2 // fixes issue #94149 #![allow(dead_code)] diff --git a/tests/ui/debuginfo/issue-105386-debuginfo-ub.rs b/tests/ui/debuginfo/issue-105386-debuginfo-ub.rs index 6c6eb5d4e86..7b850f32b4b 100644 --- a/tests/ui/debuginfo/issue-105386-debuginfo-ub.rs +++ b/tests/ui/debuginfo/issue-105386-debuginfo-ub.rs @@ -1,5 +1,5 @@ -// run-pass -// compile-flags: --edition 2021 -Copt-level=3 -Cdebuginfo=2 -Zmir-opt-level=3 +//@ run-pass +//@ compile-flags: --edition 2021 -Copt-level=3 -Cdebuginfo=2 -Zmir-opt-level=3 fn main() { TranslatorI.visit_pre(); diff --git a/tests/ui/debuginfo/late-bound-projection.rs b/tests/ui/debuginfo/late-bound-projection.rs index 6018078459c..988ea9f086e 100644 --- a/tests/ui/debuginfo/late-bound-projection.rs +++ b/tests/ui/debuginfo/late-bound-projection.rs @@ -1,5 +1,5 @@ -// build-pass -// compile-flags: -Cdebuginfo=2 --crate-type=rlib +//@ build-pass +//@ compile-flags: -Cdebuginfo=2 --crate-type=rlib // Fixes issue #94998 pub trait Trait {} diff --git a/tests/ui/debuginfo/sroa-fragment-debuginfo.rs b/tests/ui/debuginfo/sroa-fragment-debuginfo.rs index fc3bbb88efe..909fa4fefbd 100644 --- a/tests/ui/debuginfo/sroa-fragment-debuginfo.rs +++ b/tests/ui/debuginfo/sroa-fragment-debuginfo.rs @@ -1,8 +1,8 @@ // Verify that we do not trigger an LLVM assertion by creating zero-sized DWARF fragments. // -// build-pass -// compile-flags: -g -Zmir-opt-level=0 -Zmir-enable-passes=+ScalarReplacementOfAggregates -// compile-flags: -Cno-prepopulate-passes +//@ build-pass +//@ compile-flags: -g -Zmir-opt-level=0 -Zmir-enable-passes=+ScalarReplacementOfAggregates +//@ compile-flags: -Cno-prepopulate-passes #![crate_type = "lib"] diff --git a/tests/ui/deduplicate-diagnostics.rs b/tests/ui/deduplicate-diagnostics.rs index 7d1c4f5f838..54bd5dd5098 100644 --- a/tests/ui/deduplicate-diagnostics.rs +++ b/tests/ui/deduplicate-diagnostics.rs @@ -1,5 +1,5 @@ -// revisions: duplicate deduplicate -//[deduplicate] compile-flags: -Z deduplicate-diagnostics=yes +//@ revisions: duplicate deduplicate +//@[deduplicate] compile-flags: -Z deduplicate-diagnostics=yes #[derive(Unresolved)] //~ ERROR cannot find derive macro `Unresolved` in this scope //[duplicate]~| ERROR cannot find derive macro `Unresolved` in this scope diff --git a/tests/ui/deep.rs b/tests/ui/deep.rs index 2bb109c0e3f..5a631d068b1 100644 --- a/tests/ui/deep.rs +++ b/tests/ui/deep.rs @@ -1,5 +1,5 @@ -// run-pass -// ignore-emscripten apparently blows the stack +//@ run-pass +//@ ignore-emscripten apparently blows the stack fn f(x: isize) -> isize { if x == 1 { return 1; } else { let y: isize = 1 + f(x - 1); return y; } diff --git a/tests/ui/default-method-parsing.rs b/tests/ui/default-method-parsing.rs index 5001d58f0a4..2580a04221f 100644 --- a/tests/ui/default-method-parsing.rs +++ b/tests/ui/default-method-parsing.rs @@ -1,5 +1,5 @@ -// check-pass -// pretty-expanded FIXME #23616 +//@ check-pass +//@ pretty-expanded FIXME #23616 trait Foo { fn m(&self, _:isize) { } diff --git a/tests/ui/default-method-simple.rs b/tests/ui/default-method-simple.rs index 6f7ae6a3e0b..e5fbedfaece 100644 --- a/tests/ui/default-method-simple.rs +++ b/tests/ui/default-method-simple.rs @@ -1,4 +1,4 @@ -// run-pass +//@ run-pass #![allow(dead_code)] diff --git a/tests/ui/defaults-well-formedness.rs b/tests/ui/defaults-well-formedness.rs index 3275890616b..e5e48edad88 100644 --- a/tests/ui/defaults-well-formedness.rs +++ b/tests/ui/defaults-well-formedness.rs @@ -1,4 +1,4 @@ -// run-pass +//@ run-pass #![allow(dead_code)] trait Trait {} diff --git a/tests/ui/definition-reachable/field-method.rs b/tests/ui/definition-reachable/field-method.rs index 60e895a2f9a..d15b982a621 100644 --- a/tests/ui/definition-reachable/field-method.rs +++ b/tests/ui/definition-reachable/field-method.rs @@ -1,8 +1,8 @@ // Check that functions accessible through a field visible to a macro are // considered reachable -// aux-build:nested-fn-macro.rs -// run-pass +//@ aux-build:nested-fn-macro.rs +//@ run-pass extern crate nested_fn_macro; diff --git a/tests/ui/definition-reachable/nested-fn.rs b/tests/ui/definition-reachable/nested-fn.rs index b665b049f32..94f3520ed73 100644 --- a/tests/ui/definition-reachable/nested-fn.rs +++ b/tests/ui/definition-reachable/nested-fn.rs @@ -1,8 +1,8 @@ // Check that functions visible to macros through paths with >2 segments are // considered reachable -// aux-build:field-method-macro.rs -// run-pass +//@ aux-build:field-method-macro.rs +//@ run-pass extern crate field_method_macro; diff --git a/tests/ui/definition-reachable/private-non-types.rs b/tests/ui/definition-reachable/private-non-types.rs index a601dabcb0b..287952bf1fc 100644 --- a/tests/ui/definition-reachable/private-non-types.rs +++ b/tests/ui/definition-reachable/private-non-types.rs @@ -1,7 +1,7 @@ // Check that we don't require stability annotations for private modules, // imports and fields that are accessible to opaque macros. -// check-pass +//@ check-pass #![feature(decl_macro, staged_api)] #![stable(feature = "test", since = "1.0.0")] diff --git a/tests/ui/definition-reachable/private-types.rs b/tests/ui/definition-reachable/private-types.rs index 02c1224f4e1..a0b6c888505 100644 --- a/tests/ui/definition-reachable/private-types.rs +++ b/tests/ui/definition-reachable/private-types.rs @@ -1,6 +1,6 @@ // Check that type privacy is taken into account when considering reachability -// check-pass +//@ check-pass #![feature(decl_macro, staged_api)] #![stable(feature = "test", since = "1.0.0")] diff --git a/tests/ui/definition-reachable/private-use.rs b/tests/ui/definition-reachable/private-use.rs index 02cff0475e5..97517fcb9e2 100644 --- a/tests/ui/definition-reachable/private-use.rs +++ b/tests/ui/definition-reachable/private-use.rs @@ -1,7 +1,7 @@ // Check that private use statements can be used by -// run-pass -// aux-build:private-use-macro.rs +//@ run-pass +//@ aux-build:private-use-macro.rs extern crate private_use_macro; diff --git a/tests/ui/delegation/explicit-paths-in-traits-pass.rs b/tests/ui/delegation/explicit-paths-in-traits-pass.rs index 5c41c2ff49c..4abcc18b9b2 100644 --- a/tests/ui/delegation/explicit-paths-in-traits-pass.rs +++ b/tests/ui/delegation/explicit-paths-in-traits-pass.rs @@ -1,4 +1,4 @@ -// run-pass +//@ run-pass #![feature(fn_delegation)] //~^ WARN the feature `fn_delegation` is incomplete diff --git a/tests/ui/delegation/explicit-paths-pass.rs b/tests/ui/delegation/explicit-paths-pass.rs index 331e06d9a88..140605a2bc5 100644 --- a/tests/ui/delegation/explicit-paths-pass.rs +++ b/tests/ui/delegation/explicit-paths-pass.rs @@ -1,4 +1,4 @@ -// run-pass +//@ run-pass #![feature(fn_delegation)] //~^ WARN the feature `fn_delegation` is incomplete diff --git a/tests/ui/delegation/explicit-paths-signature-pass.rs b/tests/ui/delegation/explicit-paths-signature-pass.rs index 826107130eb..b53e5779924 100644 --- a/tests/ui/delegation/explicit-paths-signature-pass.rs +++ b/tests/ui/delegation/explicit-paths-signature-pass.rs @@ -1,4 +1,4 @@ -// run-pass +//@ run-pass #![feature(fn_delegation)] //~^ WARN the feature `fn_delegation` is incomplete diff --git a/tests/ui/delegation/parse.rs b/tests/ui/delegation/parse.rs index 791cc1630ff..5e8026c5532 100644 --- a/tests/ui/delegation/parse.rs +++ b/tests/ui/delegation/parse.rs @@ -1,4 +1,4 @@ -// check-pass +//@ check-pass #![feature(decl_macro)] #![feature(fn_delegation)] diff --git a/tests/ui/delegation/target-expr-pass.rs b/tests/ui/delegation/target-expr-pass.rs index 4ccb81c292a..1f2edf0dc13 100644 --- a/tests/ui/delegation/target-expr-pass.rs +++ b/tests/ui/delegation/target-expr-pass.rs @@ -1,4 +1,4 @@ -// run-pass +//@ run-pass #![feature(fn_delegation)] //~^ WARN the feature `fn_delegation` is incomplete diff --git a/tests/ui/dep-graph/dep-graph-assoc-type-codegen.rs b/tests/ui/dep-graph/dep-graph-assoc-type-codegen.rs index 978c1994800..9525ff2e5ef 100644 --- a/tests/ui/dep-graph/dep-graph-assoc-type-codegen.rs +++ b/tests/ui/dep-graph/dep-graph-assoc-type-codegen.rs @@ -1,8 +1,8 @@ // Test that when a trait impl changes, fns whose body uses that trait // must also be recompiled. -// incremental -// compile-flags: -Z query-dep-graph +//@ incremental +//@ compile-flags: -Z query-dep-graph #![feature(rustc_attrs)] #![allow(warnings)] diff --git a/tests/ui/dep-graph/dep-graph-caller-callee.rs b/tests/ui/dep-graph/dep-graph-caller-callee.rs index 4a3a8bb6bf9..e56cd5202e5 100644 --- a/tests/ui/dep-graph/dep-graph-caller-callee.rs +++ b/tests/ui/dep-graph/dep-graph-caller-callee.rs @@ -1,8 +1,8 @@ // Test that immediate callers have to change when callee changes, but // not callers' callers. -// incremental -// compile-flags: -Z query-dep-graph +//@ incremental +//@ compile-flags: -Z query-dep-graph #![feature(rustc_attrs)] #![allow(dead_code)] diff --git a/tests/ui/dep-graph/dep-graph-dump.rs b/tests/ui/dep-graph/dep-graph-dump.rs index cbc4def0e03..7aede27d125 100644 --- a/tests/ui/dep-graph/dep-graph-dump.rs +++ b/tests/ui/dep-graph/dep-graph-dump.rs @@ -1,6 +1,6 @@ // Test dump-dep-graph requires query-dep-graph enabled -// incremental -// compile-flags: -Z dump-dep-graph +//@ incremental +//@ compile-flags: -Z dump-dep-graph fn main() {} diff --git a/tests/ui/dep-graph/dep-graph-struct-signature.rs b/tests/ui/dep-graph/dep-graph-struct-signature.rs index fcf9f638710..5303c6d2e53 100644 --- a/tests/ui/dep-graph/dep-graph-struct-signature.rs +++ b/tests/ui/dep-graph/dep-graph-struct-signature.rs @@ -1,8 +1,8 @@ // Test cases where a changing struct appears in the signature of fns // and methods. -// incremental -// compile-flags: -Z query-dep-graph +//@ incremental +//@ compile-flags: -Z query-dep-graph #![feature(rustc_attrs)] #![allow(dead_code)] diff --git a/tests/ui/dep-graph/dep-graph-trait-impl-two-traits-same-method.rs b/tests/ui/dep-graph/dep-graph-trait-impl-two-traits-same-method.rs index 5da8df57064..b3e8e9a512e 100644 --- a/tests/ui/dep-graph/dep-graph-trait-impl-two-traits-same-method.rs +++ b/tests/ui/dep-graph/dep-graph-trait-impl-two-traits-same-method.rs @@ -1,8 +1,8 @@ // Test that adding an impl to a trait `Foo` DOES affect functions // that only use `Bar` if they have methods in common. -// incremental -// compile-flags: -Z query-dep-graph +//@ incremental +//@ compile-flags: -Z query-dep-graph #![feature(rustc_attrs)] #![allow(dead_code)] diff --git a/tests/ui/dep-graph/dep-graph-trait-impl-two-traits.rs b/tests/ui/dep-graph/dep-graph-trait-impl-two-traits.rs index 0331e75b2fe..7c612158bf0 100644 --- a/tests/ui/dep-graph/dep-graph-trait-impl-two-traits.rs +++ b/tests/ui/dep-graph/dep-graph-trait-impl-two-traits.rs @@ -1,8 +1,8 @@ // Test that adding an impl to a trait `Foo` does not affect functions // that only use `Bar`, so long as they do not have methods in common. -// incremental -// compile-flags: -Z query-dep-graph +//@ incremental +//@ compile-flags: -Z query-dep-graph #![feature(rustc_attrs)] #![allow(warnings)] diff --git a/tests/ui/dep-graph/dep-graph-trait-impl.rs b/tests/ui/dep-graph/dep-graph-trait-impl.rs index 19002965b93..38cc88e567d 100644 --- a/tests/ui/dep-graph/dep-graph-trait-impl.rs +++ b/tests/ui/dep-graph/dep-graph-trait-impl.rs @@ -1,8 +1,8 @@ // Test that when a trait impl changes, fns whose body uses that trait // must also be recompiled. -// incremental -// compile-flags: -Z query-dep-graph +//@ incremental +//@ compile-flags: -Z query-dep-graph #![feature(rustc_attrs)] #![allow(warnings)] diff --git a/tests/ui/dep-graph/dep-graph-type-alias.rs b/tests/ui/dep-graph/dep-graph-type-alias.rs index 0e1b3db1925..30cef4b27ef 100644 --- a/tests/ui/dep-graph/dep-graph-type-alias.rs +++ b/tests/ui/dep-graph/dep-graph-type-alias.rs @@ -1,7 +1,7 @@ // Test that changing what a `type` points to does not go unnoticed. -// incremental -// compile-flags: -Z query-dep-graph +//@ incremental +//@ compile-flags: -Z query-dep-graph #![feature(rustc_attrs)] #![allow(dead_code)] diff --git a/tests/ui/dep-graph/dep-graph-variance-alias.rs b/tests/ui/dep-graph/dep-graph-variance-alias.rs index 008434696d6..8a67fe6d727 100644 --- a/tests/ui/dep-graph/dep-graph-variance-alias.rs +++ b/tests/ui/dep-graph/dep-graph-variance-alias.rs @@ -1,8 +1,8 @@ // Test that changing what a `type` points to does not go unnoticed // by the variance analysis. -// incremental -// compile-flags: -Z query-dep-graph +//@ incremental +//@ compile-flags: -Z query-dep-graph #![feature(rustc_attrs)] #![allow(dead_code)] diff --git a/tests/ui/deployment-target/invalid-target.rs b/tests/ui/deployment-target/invalid-target.rs index 336624320a3..52f09ea73d7 100644 --- a/tests/ui/deployment-target/invalid-target.rs +++ b/tests/ui/deployment-target/invalid-target.rs @@ -1,4 +1,4 @@ -// compile-flags: --target x86_64-unknown-linux-gnu --print deployment-target -// needs-llvm-components: x86 +//@ compile-flags: --target x86_64-unknown-linux-gnu --print deployment-target +//@ needs-llvm-components: x86 fn main() {} diff --git a/tests/ui/deployment-target/macos-target.rs b/tests/ui/deployment-target/macos-target.rs index 701ccf4799a..be2c32e2814 100644 --- a/tests/ui/deployment-target/macos-target.rs +++ b/tests/ui/deployment-target/macos-target.rs @@ -1,7 +1,7 @@ -// only-macos -// compile-flags: --print deployment-target -// normalize-stdout-test: "\d+\." -> "$$CURRENT_MAJOR_VERSION." -// normalize-stdout-test: "\d+" -> "$$CURRENT_MINOR_VERSION" -// check-pass +//@ only-macos +//@ compile-flags: --print deployment-target +//@ normalize-stdout-test: "\d+\." -> "$$CURRENT_MAJOR_VERSION." +//@ normalize-stdout-test: "\d+" -> "$$CURRENT_MINOR_VERSION" +//@ check-pass fn main() {} diff --git a/tests/ui/deprecation-in-force-unstable.rs b/tests/ui/deprecation-in-force-unstable.rs index 4df9b802d45..6aaf29b069a 100644 --- a/tests/ui/deprecation-in-force-unstable.rs +++ b/tests/ui/deprecation-in-force-unstable.rs @@ -1,5 +1,5 @@ -// run-pass -// compile-flags:-Zforce-unstable-if-unmarked +//@ run-pass +//@ compile-flags:-Zforce-unstable-if-unmarked #[deprecated] // should work even with -Zforce-unstable-if-unmarked fn main() { } diff --git a/tests/ui/deprecation/atomic_initializers.fixed b/tests/ui/deprecation/atomic_initializers.fixed index 4fb0aeeb573..8738f744e11 100644 --- a/tests/ui/deprecation/atomic_initializers.fixed +++ b/tests/ui/deprecation/atomic_initializers.fixed @@ -1,5 +1,5 @@ -// run-rustfix -// check-pass +//@ run-rustfix +//@ check-pass #[allow(deprecated, unused_imports)] use std::sync::atomic::{AtomicIsize, ATOMIC_ISIZE_INIT}; diff --git a/tests/ui/deprecation/atomic_initializers.rs b/tests/ui/deprecation/atomic_initializers.rs index 1dcfd36d7d5..c984fa2e8d8 100644 --- a/tests/ui/deprecation/atomic_initializers.rs +++ b/tests/ui/deprecation/atomic_initializers.rs @@ -1,5 +1,5 @@ -// run-rustfix -// check-pass +//@ run-rustfix +//@ check-pass #[allow(deprecated, unused_imports)] use std::sync::atomic::{AtomicIsize, ATOMIC_ISIZE_INIT}; diff --git a/tests/ui/deprecation/deprecated-macro_escape-inner.rs b/tests/ui/deprecation/deprecated-macro_escape-inner.rs index e2957c422f6..a5e81d305ed 100644 --- a/tests/ui/deprecation/deprecated-macro_escape-inner.rs +++ b/tests/ui/deprecation/deprecated-macro_escape-inner.rs @@ -1,4 +1,4 @@ -// run-pass +//@ run-pass mod foo { #![macro_escape] //~ WARN `#[macro_escape]` is a deprecated synonym for `#[macro_use]` diff --git a/tests/ui/deprecation/deprecated-macro_escape.rs b/tests/ui/deprecation/deprecated-macro_escape.rs index 4a89b40625e..4dc19fa6b28 100644 --- a/tests/ui/deprecation/deprecated-macro_escape.rs +++ b/tests/ui/deprecation/deprecated-macro_escape.rs @@ -1,4 +1,4 @@ -// run-pass +//@ run-pass #[macro_escape] //~ WARNING `#[macro_escape]` is a deprecated synonym for `#[macro_use]` mod foo {} diff --git a/tests/ui/deprecation/deprecation-in-future.rs b/tests/ui/deprecation/deprecation-in-future.rs index fb2a9a401ed..23c7c3373b3 100644 --- a/tests/ui/deprecation/deprecation-in-future.rs +++ b/tests/ui/deprecation/deprecation-in-future.rs @@ -1,4 +1,4 @@ -// check-pass +//@ check-pass #![deny(deprecated_in_future)] diff --git a/tests/ui/deprecation/deprecation-lint-2.rs b/tests/ui/deprecation/deprecation-lint-2.rs index 16ed6d4ecd6..553b1afe45c 100644 --- a/tests/ui/deprecation/deprecation-lint-2.rs +++ b/tests/ui/deprecation/deprecation-lint-2.rs @@ -1,5 +1,5 @@ -// aux-build:deprecation-lint.rs -// error-pattern: use of deprecated function +//@ aux-build:deprecation-lint.rs +//@ error-pattern: use of deprecated function #![deny(deprecated)] diff --git a/tests/ui/deprecation/deprecation-lint-3.rs b/tests/ui/deprecation/deprecation-lint-3.rs index e6e1587daeb..f01fc924457 100644 --- a/tests/ui/deprecation/deprecation-lint-3.rs +++ b/tests/ui/deprecation/deprecation-lint-3.rs @@ -1,5 +1,5 @@ -// aux-build:deprecation-lint.rs -// error-pattern: use of deprecated function +//@ aux-build:deprecation-lint.rs +//@ error-pattern: use of deprecated function #![deny(deprecated)] #![allow(warnings)] diff --git a/tests/ui/deprecation/deprecation-lint.rs b/tests/ui/deprecation/deprecation-lint.rs index 83056feaf27..dc11a4d56a2 100644 --- a/tests/ui/deprecation/deprecation-lint.rs +++ b/tests/ui/deprecation/deprecation-lint.rs @@ -1,4 +1,4 @@ -// aux-build:deprecation-lint.rs +//@ aux-build:deprecation-lint.rs #![deny(deprecated)] #![allow(warnings)] diff --git a/tests/ui/deprecation/derive_on_deprecated.rs b/tests/ui/deprecation/derive_on_deprecated.rs index ac771ac81d1..b3d784aec37 100644 --- a/tests/ui/deprecation/derive_on_deprecated.rs +++ b/tests/ui/deprecation/derive_on_deprecated.rs @@ -1,4 +1,4 @@ -// build-pass (FIXME(62277): could be check-pass?) +//@ build-pass (FIXME(62277): could be check-pass?) #![deny(deprecated)] diff --git a/tests/ui/deprecation/derive_on_deprecated_forbidden.rs b/tests/ui/deprecation/derive_on_deprecated_forbidden.rs index 3fd43466467..c240a6938fc 100644 --- a/tests/ui/deprecation/derive_on_deprecated_forbidden.rs +++ b/tests/ui/deprecation/derive_on_deprecated_forbidden.rs @@ -1,4 +1,4 @@ -// build-pass (FIXME(62277): could be check-pass?) +//@ build-pass (FIXME(62277): could be check-pass?) #![forbid(deprecated)] diff --git a/tests/ui/deprecation/feature-gate-deprecated_suggestion.rs b/tests/ui/deprecation/feature-gate-deprecated_suggestion.rs index a2d0023e3f4..453494cf18b 100644 --- a/tests/ui/deprecation/feature-gate-deprecated_suggestion.rs +++ b/tests/ui/deprecation/feature-gate-deprecated_suggestion.rs @@ -1,4 +1,4 @@ -// compile-flags: --crate-type=lib +//@ compile-flags: --crate-type=lib #![no_implicit_prelude] diff --git a/tests/ui/deprecation/issue-84637-deprecated-associated-function.fixed b/tests/ui/deprecation/issue-84637-deprecated-associated-function.fixed index 659b5465522..a419a7f5e82 100644 --- a/tests/ui/deprecation/issue-84637-deprecated-associated-function.fixed +++ b/tests/ui/deprecation/issue-84637-deprecated-associated-function.fixed @@ -1,4 +1,4 @@ -// run-rustfix +//@ run-rustfix #![deny(deprecated)] diff --git a/tests/ui/deprecation/issue-84637-deprecated-associated-function.rs b/tests/ui/deprecation/issue-84637-deprecated-associated-function.rs index cfc6c4450b4..690554ffe19 100644 --- a/tests/ui/deprecation/issue-84637-deprecated-associated-function.rs +++ b/tests/ui/deprecation/issue-84637-deprecated-associated-function.rs @@ -1,4 +1,4 @@ -// run-rustfix +//@ run-rustfix #![deny(deprecated)] diff --git a/tests/ui/deprecation/suggestion.fixed b/tests/ui/deprecation/suggestion.fixed index d9fa2b56eee..3bb1d039d11 100644 --- a/tests/ui/deprecation/suggestion.fixed +++ b/tests/ui/deprecation/suggestion.fixed @@ -1,4 +1,4 @@ -// run-rustfix +//@ run-rustfix #![feature(staged_api)] #![feature(deprecated_suggestion)] diff --git a/tests/ui/deprecation/suggestion.rs b/tests/ui/deprecation/suggestion.rs index 9dc2eaf2555..a9de9ddfbe9 100644 --- a/tests/ui/deprecation/suggestion.rs +++ b/tests/ui/deprecation/suggestion.rs @@ -1,4 +1,4 @@ -// run-rustfix +//@ run-rustfix #![feature(staged_api)] #![feature(deprecated_suggestion)] diff --git a/tests/ui/deprecation/try-macro-suggestion.rs b/tests/ui/deprecation/try-macro-suggestion.rs index 635ceac0b19..1e477ab9c88 100644 --- a/tests/ui/deprecation/try-macro-suggestion.rs +++ b/tests/ui/deprecation/try-macro-suggestion.rs @@ -1,4 +1,4 @@ -// compile-flags: --edition 2018 +//@ compile-flags: --edition 2018 fn foo() -> Result<(), ()> { Ok(try!()); //~ ERROR use of deprecated `try` macro Ok(try!(Ok(()))) //~ ERROR use of deprecated `try` macro diff --git a/tests/ui/deref-patterns/basic.rs b/tests/ui/deref-patterns/basic.rs index 249716040a1..d76fb697f40 100644 --- a/tests/ui/deref-patterns/basic.rs +++ b/tests/ui/deref-patterns/basic.rs @@ -1,5 +1,5 @@ -// run-pass -// check-run-results +//@ run-pass +//@ check-run-results #![feature(string_deref_patterns)] fn main() { diff --git a/tests/ui/deref-patterns/default-infer.rs b/tests/ui/deref-patterns/default-infer.rs index 050b847305b..4f926175bd3 100644 --- a/tests/ui/deref-patterns/default-infer.rs +++ b/tests/ui/deref-patterns/default-infer.rs @@ -1,4 +1,4 @@ -// check-pass +//@ check-pass #![feature(string_deref_patterns)] fn main() { diff --git a/tests/ui/deref-patterns/refs.rs b/tests/ui/deref-patterns/refs.rs index 97e260d2752..c93e579bfd8 100644 --- a/tests/ui/deref-patterns/refs.rs +++ b/tests/ui/deref-patterns/refs.rs @@ -1,4 +1,4 @@ -// check-pass +//@ check-pass #![feature(string_deref_patterns)] fn foo(s: &String) -> i32 { diff --git a/tests/ui/deref-rc.rs b/tests/ui/deref-rc.rs index 9b4c63b1925..92fdd900359 100644 --- a/tests/ui/deref-rc.rs +++ b/tests/ui/deref-rc.rs @@ -1,4 +1,4 @@ -// run-pass +//@ run-pass use std::rc::Rc; diff --git a/tests/ui/deref.rs b/tests/ui/deref.rs index 0d4e08ad954..b491c517d94 100644 --- a/tests/ui/deref.rs +++ b/tests/ui/deref.rs @@ -1,5 +1,5 @@ -// run-pass -// pretty-expanded FIXME #23616 +//@ run-pass +//@ pretty-expanded FIXME #23616 pub fn main() { let x: Box = Box::new(10); diff --git a/tests/ui/derive-uninhabited-enum-38885.rs b/tests/ui/derive-uninhabited-enum-38885.rs index c11df030025..2259a542706 100644 --- a/tests/ui/derive-uninhabited-enum-38885.rs +++ b/tests/ui/derive-uninhabited-enum-38885.rs @@ -1,5 +1,5 @@ -// check-pass -// compile-flags: -Wunused +//@ check-pass +//@ compile-flags: -Wunused // ensure there are no special warnings about uninhabited types // when deriving Debug on an empty enum diff --git a/tests/ui/derives/auxiliary/derive-marker-tricky.rs b/tests/ui/derives/auxiliary/derive-marker-tricky.rs index 70345351bd0..0f1c30811a2 100644 --- a/tests/ui/derives/auxiliary/derive-marker-tricky.rs +++ b/tests/ui/derives/auxiliary/derive-marker-tricky.rs @@ -1,5 +1,5 @@ -// force-host -// no-prefer-dynamic +//@ force-host +//@ no-prefer-dynamic #![crate_type = "proc-macro"] diff --git a/tests/ui/derives/derive-Debug-use-ufcs-struct.rs b/tests/ui/derives/derive-Debug-use-ufcs-struct.rs index cb9dda84159..376d230b275 100644 --- a/tests/ui/derives/derive-Debug-use-ufcs-struct.rs +++ b/tests/ui/derives/derive-Debug-use-ufcs-struct.rs @@ -1,4 +1,4 @@ -// run-pass +//@ run-pass #![allow(warnings)] #[derive(Debug)] diff --git a/tests/ui/derives/derive-Debug-use-ufcs-tuple.rs b/tests/ui/derives/derive-Debug-use-ufcs-tuple.rs index 5f786769fe7..4061c02fcd7 100644 --- a/tests/ui/derives/derive-Debug-use-ufcs-tuple.rs +++ b/tests/ui/derives/derive-Debug-use-ufcs-tuple.rs @@ -1,4 +1,4 @@ -// run-pass +//@ run-pass #![allow(warnings)] #[derive(Debug)] diff --git a/tests/ui/derives/derive-hygiene.rs b/tests/ui/derives/derive-hygiene.rs index 4fa83c49038..0b6ab8b666b 100644 --- a/tests/ui/derives/derive-hygiene.rs +++ b/tests/ui/derives/derive-hygiene.rs @@ -1,7 +1,7 @@ // Make sure that built-in derives don't rely on the user not declaring certain // names to work properly. -// check-pass +//@ check-pass #![allow(nonstandard_style)] #![feature(decl_macro)] diff --git a/tests/ui/derives/derive-macro-const-default.rs b/tests/ui/derives/derive-macro-const-default.rs index ce80271d274..5bba29d1133 100644 --- a/tests/ui/derives/derive-macro-const-default.rs +++ b/tests/ui/derives/derive-macro-const-default.rs @@ -1,4 +1,4 @@ -// check-pass +//@ check-pass #[derive(Clone, PartialEq, Debug)] struct Example([T; N]); diff --git a/tests/ui/derives/derive-marker-tricky.rs b/tests/ui/derives/derive-marker-tricky.rs index 730ea4714c7..ad03b6c2cd2 100644 --- a/tests/ui/derives/derive-marker-tricky.rs +++ b/tests/ui/derives/derive-marker-tricky.rs @@ -1,8 +1,8 @@ // Test that `#[rustc_copy_clone_marker]` is not injected when a user-defined derive shadows // a built-in derive in non-trivial scope (e.g. in a nested module). -// check-pass -// aux-build:derive-marker-tricky.rs +//@ check-pass +//@ aux-build:derive-marker-tricky.rs extern crate derive_marker_tricky; diff --git a/tests/ui/derives/derive-multiple-with-packed.rs b/tests/ui/derives/derive-multiple-with-packed.rs index e762ee357ca..4db11d472f8 100644 --- a/tests/ui/derives/derive-multiple-with-packed.rs +++ b/tests/ui/derives/derive-multiple-with-packed.rs @@ -1,4 +1,4 @@ -// check-pass +//@ check-pass #[derive(Clone, Copy)] #[derive(Debug)] // OK, even if `Copy` is in the different `#[derive]` diff --git a/tests/ui/derives/derive-partial-ord.rs b/tests/ui/derives/derive-partial-ord.rs index 9078a7ffa4f..ae338a4c95b 100644 --- a/tests/ui/derives/derive-partial-ord.rs +++ b/tests/ui/derives/derive-partial-ord.rs @@ -1,7 +1,7 @@ // Checks that in a derived implementation of PartialOrd the lt, le, ge, gt methods are consistent // with partial_cmp. Also verifies that implementation is consistent with that for tuples. // -// run-pass +//@ run-pass #[derive(PartialEq, PartialOrd)] struct P(f64, f64); diff --git a/tests/ui/derives/derive-renamed.rs b/tests/ui/derives/derive-renamed.rs index d310e5806c5..d0297054cb2 100644 --- a/tests/ui/derives/derive-renamed.rs +++ b/tests/ui/derives/derive-renamed.rs @@ -1,5 +1,5 @@ -// check-pass -// edition:2018 +//@ check-pass +//@ edition:2018 use derive as my_derive; diff --git a/tests/ui/derives/deriving-meta-empty-trait-list.rs b/tests/ui/derives/deriving-meta-empty-trait-list.rs index 0306ce717d0..37265c8d1a8 100644 --- a/tests/ui/derives/deriving-meta-empty-trait-list.rs +++ b/tests/ui/derives/deriving-meta-empty-trait-list.rs @@ -1,4 +1,4 @@ -// check-pass +//@ check-pass #![deny(unused)] diff --git a/tests/ui/deriving/auxiliary/derive-no-std.rs b/tests/ui/deriving/auxiliary/derive-no-std.rs index 3893dc1be07..17c27153765 100644 --- a/tests/ui/deriving/auxiliary/derive-no-std.rs +++ b/tests/ui/deriving/auxiliary/derive-no-std.rs @@ -1,4 +1,4 @@ -// no-prefer-dynamic +//@ no-prefer-dynamic #![crate_type = "rlib"] #![no_std] diff --git a/tests/ui/deriving/derive-no-std.rs b/tests/ui/deriving/derive-no-std.rs index 74c73b99cb9..3683ec7ca7c 100644 --- a/tests/ui/deriving/derive-no-std.rs +++ b/tests/ui/deriving/derive-no-std.rs @@ -1,5 +1,5 @@ -// run-pass -// aux-build:derive-no-std.rs +//@ run-pass +//@ aux-build:derive-no-std.rs extern crate derive_no_std; use derive_no_std::*; diff --git a/tests/ui/deriving/derive-partialord-correctness.rs b/tests/ui/deriving/derive-partialord-correctness.rs index 36763eda169..7ccfa3d17bf 100644 --- a/tests/ui/deriving/derive-partialord-correctness.rs +++ b/tests/ui/deriving/derive-partialord-correctness.rs @@ -1,4 +1,4 @@ -// run-pass +//@ run-pass // Original issue: #49650 #[derive(PartialOrd, PartialEq)] diff --git a/tests/ui/deriving/deriving-all-codegen.rs b/tests/ui/deriving/deriving-all-codegen.rs index 51f9708d3cd..498930fc0c6 100644 --- a/tests/ui/deriving/deriving-all-codegen.rs +++ b/tests/ui/deriving/deriving-all-codegen.rs @@ -1,6 +1,6 @@ -// check-pass -// compile-flags: -Zunpretty=expanded -// edition:2021 +//@ check-pass +//@ compile-flags: -Zunpretty=expanded +//@ edition:2021 // // This test checks the code generated for all[*] the builtin derivable traits // on a variety of structs and enums. It protects against accidental changes to diff --git a/tests/ui/deriving/deriving-all-codegen.stdout b/tests/ui/deriving/deriving-all-codegen.stdout index 9c6f4d3094b..a0274527975 100644 --- a/tests/ui/deriving/deriving-all-codegen.stdout +++ b/tests/ui/deriving/deriving-all-codegen.stdout @@ -1,7 +1,7 @@ #![feature(prelude_import)] -// check-pass -// compile-flags: -Zunpretty=expanded -// edition:2021 +//@ check-pass +//@ compile-flags: -Zunpretty=expanded +//@ edition:2021 // // This test checks the code generated for all[*] the builtin derivable traits // on a variety of structs and enums. It protects against accidental changes to diff --git a/tests/ui/deriving/deriving-associated-types.rs b/tests/ui/deriving/deriving-associated-types.rs index 4b1cbe80c50..22dcd8d7cc0 100644 --- a/tests/ui/deriving/deriving-associated-types.rs +++ b/tests/ui/deriving/deriving-associated-types.rs @@ -1,4 +1,4 @@ -// run-pass +//@ run-pass pub trait DeclaredTrait { type Type; } diff --git a/tests/ui/deriving/deriving-bounds.rs b/tests/ui/deriving/deriving-bounds.rs index f3e7cf99437..45fc14420f1 100644 --- a/tests/ui/deriving/deriving-bounds.rs +++ b/tests/ui/deriving/deriving-bounds.rs @@ -1,4 +1,4 @@ -// check-pass +//@ check-pass #[derive(Copy, Clone)] struct Test; diff --git a/tests/ui/deriving/deriving-clone-array.rs b/tests/ui/deriving/deriving-clone-array.rs index 4569749df42..1ee599c8a76 100644 --- a/tests/ui/deriving/deriving-clone-array.rs +++ b/tests/ui/deriving/deriving-clone-array.rs @@ -1,4 +1,4 @@ -// run-pass +//@ run-pass #![allow(dead_code)] // test for issue #30244 diff --git a/tests/ui/deriving/deriving-clone-enum.rs b/tests/ui/deriving/deriving-clone-enum.rs index 09e74974072..59301c1d094 100644 --- a/tests/ui/deriving/deriving-clone-enum.rs +++ b/tests/ui/deriving/deriving-clone-enum.rs @@ -1,6 +1,6 @@ -// run-pass +//@ run-pass #![allow(dead_code)] -// pretty-expanded FIXME #23616 +//@ pretty-expanded FIXME #23616 #[derive(Clone)] enum E { diff --git a/tests/ui/deriving/deriving-clone-generic-enum.rs b/tests/ui/deriving/deriving-clone-generic-enum.rs index a344d7fc43a..7f0dd872ffd 100644 --- a/tests/ui/deriving/deriving-clone-generic-enum.rs +++ b/tests/ui/deriving/deriving-clone-generic-enum.rs @@ -1,6 +1,6 @@ -// run-pass +//@ run-pass #![allow(dead_code)] -// pretty-expanded FIXME #23616 +//@ pretty-expanded FIXME #23616 #[derive(Clone)] enum E { diff --git a/tests/ui/deriving/deriving-clone-generic-struct.rs b/tests/ui/deriving/deriving-clone-generic-struct.rs index 4374d1594e4..cbdfa8a7c9a 100644 --- a/tests/ui/deriving/deriving-clone-generic-struct.rs +++ b/tests/ui/deriving/deriving-clone-generic-struct.rs @@ -1,5 +1,5 @@ -// run-pass -// pretty-expanded FIXME #23616 +//@ run-pass +//@ pretty-expanded FIXME #23616 #![allow(dead_code)] diff --git a/tests/ui/deriving/deriving-clone-generic-tuple-struct.rs b/tests/ui/deriving/deriving-clone-generic-tuple-struct.rs index 331d7298216..f0bbce707f3 100644 --- a/tests/ui/deriving/deriving-clone-generic-tuple-struct.rs +++ b/tests/ui/deriving/deriving-clone-generic-tuple-struct.rs @@ -1,5 +1,5 @@ -// run-pass -// pretty-expanded FIXME #23616 +//@ run-pass +//@ pretty-expanded FIXME #23616 #[derive(Clone)] #[allow(dead_code)] diff --git a/tests/ui/deriving/deriving-clone-struct.rs b/tests/ui/deriving/deriving-clone-struct.rs index b93cbe5f8b6..b357aa82a2a 100644 --- a/tests/ui/deriving/deriving-clone-struct.rs +++ b/tests/ui/deriving/deriving-clone-struct.rs @@ -1,5 +1,5 @@ -// run-pass -// pretty-expanded FIXME #23616 +//@ run-pass +//@ pretty-expanded FIXME #23616 #![allow(dead_code)] diff --git a/tests/ui/deriving/deriving-clone-tuple-struct.rs b/tests/ui/deriving/deriving-clone-tuple-struct.rs index 7ad3f034713..727860465fc 100644 --- a/tests/ui/deriving/deriving-clone-tuple-struct.rs +++ b/tests/ui/deriving/deriving-clone-tuple-struct.rs @@ -1,5 +1,5 @@ -// run-pass -// pretty-expanded FIXME #23616 +//@ run-pass +//@ pretty-expanded FIXME #23616 #![allow(dead_code)] diff --git a/tests/ui/deriving/deriving-cmp-generic-enum.rs b/tests/ui/deriving/deriving-cmp-generic-enum.rs index 88da4bd066c..415d9a033eb 100644 --- a/tests/ui/deriving/deriving-cmp-generic-enum.rs +++ b/tests/ui/deriving/deriving-cmp-generic-enum.rs @@ -1,4 +1,4 @@ -// run-pass +//@ run-pass #[derive(PartialEq, Eq, PartialOrd, Ord)] enum E { E0, diff --git a/tests/ui/deriving/deriving-cmp-generic-struct-enum.rs b/tests/ui/deriving/deriving-cmp-generic-struct-enum.rs index eeaf2ff7efa..20980659660 100644 --- a/tests/ui/deriving/deriving-cmp-generic-struct-enum.rs +++ b/tests/ui/deriving/deriving-cmp-generic-struct-enum.rs @@ -1,4 +1,4 @@ -// run-pass +//@ run-pass #[derive(PartialEq, Eq, PartialOrd, Ord)] enum ES { ES1 { x: T }, diff --git a/tests/ui/deriving/deriving-cmp-generic-struct.rs b/tests/ui/deriving/deriving-cmp-generic-struct.rs index 538caf439c7..0f68dd48c63 100644 --- a/tests/ui/deriving/deriving-cmp-generic-struct.rs +++ b/tests/ui/deriving/deriving-cmp-generic-struct.rs @@ -1,4 +1,4 @@ -// run-pass +//@ run-pass #[derive(PartialEq, Eq, PartialOrd, Ord)] struct S { x: T, diff --git a/tests/ui/deriving/deriving-cmp-generic-tuple-struct.rs b/tests/ui/deriving/deriving-cmp-generic-tuple-struct.rs index 79f58d4565c..30dfe5d17ae 100644 --- a/tests/ui/deriving/deriving-cmp-generic-tuple-struct.rs +++ b/tests/ui/deriving/deriving-cmp-generic-tuple-struct.rs @@ -1,4 +1,4 @@ -// run-pass +//@ run-pass #[derive(PartialEq, Eq, PartialOrd, Ord)] struct TS(T,T); diff --git a/tests/ui/deriving/deriving-cmp-shortcircuit.rs b/tests/ui/deriving/deriving-cmp-shortcircuit.rs index 140373e9526..5ee5fe6cb28 100644 --- a/tests/ui/deriving/deriving-cmp-shortcircuit.rs +++ b/tests/ui/deriving/deriving-cmp-shortcircuit.rs @@ -1,4 +1,4 @@ -// run-pass +//@ run-pass // check that the derived impls for the comparison traits shortcircuit // where possible, by having a type that panics when compared as the // second element, so this passes iff the instances shortcircuit. diff --git a/tests/ui/deriving/deriving-copyclone.rs b/tests/ui/deriving/deriving-copyclone.rs index 099feceae81..4a00ae81df4 100644 --- a/tests/ui/deriving/deriving-copyclone.rs +++ b/tests/ui/deriving/deriving-copyclone.rs @@ -1,4 +1,4 @@ -// run-pass +//@ run-pass //! Test that #[derive(Copy, Clone)] produces a shallow copy //! even when a member violates RFC 1521 diff --git a/tests/ui/deriving/deriving-default-box.rs b/tests/ui/deriving/deriving-default-box.rs index b71e1149613..7dffc3e95cc 100644 --- a/tests/ui/deriving/deriving-default-box.rs +++ b/tests/ui/deriving/deriving-default-box.rs @@ -1,4 +1,4 @@ -// run-pass +//@ run-pass use std::default::Default; #[derive(Default)] diff --git a/tests/ui/deriving/deriving-default-enum.rs b/tests/ui/deriving/deriving-default-enum.rs index 1c7a501edc7..96eba258c97 100644 --- a/tests/ui/deriving/deriving-default-enum.rs +++ b/tests/ui/deriving/deriving-default-enum.rs @@ -1,4 +1,4 @@ -// run-pass +//@ run-pass // nb: does not impl Default #[derive(Debug, PartialEq)] diff --git a/tests/ui/deriving/deriving-enum-single-variant.rs b/tests/ui/deriving/deriving-enum-single-variant.rs index 1c5979c0747..dfdfef01298 100644 --- a/tests/ui/deriving/deriving-enum-single-variant.rs +++ b/tests/ui/deriving/deriving-enum-single-variant.rs @@ -1,5 +1,5 @@ -// run-pass -// pretty-expanded FIXME #23616 +//@ run-pass +//@ pretty-expanded FIXME #23616 #![allow(non_camel_case_types)] pub type task_id = isize; diff --git a/tests/ui/deriving/deriving-eq-ord-boxed-slice.rs b/tests/ui/deriving/deriving-eq-ord-boxed-slice.rs index 5b4b0983623..9a1b338ccf1 100644 --- a/tests/ui/deriving/deriving-eq-ord-boxed-slice.rs +++ b/tests/ui/deriving/deriving-eq-ord-boxed-slice.rs @@ -1,4 +1,4 @@ -// run-pass +//@ run-pass #[derive(PartialEq, PartialOrd, Eq, Ord, Debug)] struct Foo(Box<[u8]>); diff --git a/tests/ui/deriving/deriving-hash.rs b/tests/ui/deriving/deriving-hash.rs index 16738ec4ae4..738047da526 100644 --- a/tests/ui/deriving/deriving-hash.rs +++ b/tests/ui/deriving/deriving-hash.rs @@ -1,4 +1,4 @@ -// run-pass +//@ run-pass #![allow(dead_code)] #![allow(unused_imports)] #![allow(deprecated)] diff --git a/tests/ui/deriving/deriving-in-fn.rs b/tests/ui/deriving/deriving-in-fn.rs index 07f91d05973..72da2148350 100644 --- a/tests/ui/deriving/deriving-in-fn.rs +++ b/tests/ui/deriving/deriving-in-fn.rs @@ -1,4 +1,4 @@ -// run-pass +//@ run-pass #![allow(dead_code)] diff --git a/tests/ui/deriving/deriving-in-macro.rs b/tests/ui/deriving/deriving-in-macro.rs index 46e8e37838d..e86b40d30dc 100644 --- a/tests/ui/deriving/deriving-in-macro.rs +++ b/tests/ui/deriving/deriving-in-macro.rs @@ -1,5 +1,5 @@ -// run-pass -// pretty-expanded FIXME #23616 +//@ run-pass +//@ pretty-expanded FIXME #23616 #![allow(non_camel_case_types)] macro_rules! define_vec { diff --git a/tests/ui/deriving/deriving-meta-multiple.rs b/tests/ui/deriving/deriving-meta-multiple.rs index ad255be8dab..07dabd9e9c3 100644 --- a/tests/ui/deriving/deriving-meta-multiple.rs +++ b/tests/ui/deriving/deriving-meta-multiple.rs @@ -1,7 +1,7 @@ -// run-pass +//@ run-pass #![allow(unused_must_use)] #![allow(unused_imports)] -// pretty-expanded FIXME #23616 +//@ pretty-expanded FIXME #23616 #![allow(deprecated)] use std::hash::{Hash, SipHasher}; diff --git a/tests/ui/deriving/deriving-meta.rs b/tests/ui/deriving/deriving-meta.rs index f2ff4f53557..34d31d9ef9e 100644 --- a/tests/ui/deriving/deriving-meta.rs +++ b/tests/ui/deriving/deriving-meta.rs @@ -1,7 +1,7 @@ -// run-pass +//@ run-pass #![allow(unused_must_use)] #![allow(unused_imports)] -// pretty-expanded FIXME #23616 +//@ pretty-expanded FIXME #23616 #![allow(deprecated)] use std::hash::{Hash, SipHasher}; diff --git a/tests/ui/deriving/deriving-self-lifetime-totalord-totaleq.rs b/tests/ui/deriving/deriving-self-lifetime-totalord-totaleq.rs index e01b5a26fc7..0b4894e4439 100644 --- a/tests/ui/deriving/deriving-self-lifetime-totalord-totaleq.rs +++ b/tests/ui/deriving/deriving-self-lifetime-totalord-totaleq.rs @@ -1,4 +1,4 @@ -// run-pass +//@ run-pass use std::cmp::Ordering::{Less,Equal,Greater}; #[derive(PartialEq, Eq, PartialOrd, Ord)] diff --git a/tests/ui/deriving/deriving-show-2.rs b/tests/ui/deriving/deriving-show-2.rs index 13d124ed4c3..e0334314281 100644 --- a/tests/ui/deriving/deriving-show-2.rs +++ b/tests/ui/deriving/deriving-show-2.rs @@ -1,4 +1,4 @@ -// run-pass +//@ run-pass #![allow(dead_code)] use std::fmt; diff --git a/tests/ui/deriving/deriving-show.rs b/tests/ui/deriving/deriving-show.rs index eb3a8948fc8..e4e377dd90d 100644 --- a/tests/ui/deriving/deriving-show.rs +++ b/tests/ui/deriving/deriving-show.rs @@ -1,4 +1,4 @@ -// run-pass +//@ run-pass #![allow(dead_code)] #[derive(Debug)] struct Unit; diff --git a/tests/ui/deriving/deriving-via-extension-c-enum.rs b/tests/ui/deriving/deriving-via-extension-c-enum.rs index 7fa1a69d7e0..8d15257116f 100644 --- a/tests/ui/deriving/deriving-via-extension-c-enum.rs +++ b/tests/ui/deriving/deriving-via-extension-c-enum.rs @@ -1,4 +1,4 @@ -// run-pass +//@ run-pass #![allow(dead_code)] #[derive(PartialEq, Debug)] enum Foo { diff --git a/tests/ui/deriving/deriving-via-extension-enum.rs b/tests/ui/deriving/deriving-via-extension-enum.rs index 6b58fd96622..f844c8243d4 100644 --- a/tests/ui/deriving/deriving-via-extension-enum.rs +++ b/tests/ui/deriving/deriving-via-extension-enum.rs @@ -1,4 +1,4 @@ -// run-pass +//@ run-pass #![allow(dead_code)] #[derive(PartialEq, Debug)] enum Foo { diff --git a/tests/ui/deriving/deriving-via-extension-hash-enum.rs b/tests/ui/deriving/deriving-via-extension-hash-enum.rs index 2d1ca05f4fc..acd34f78187 100644 --- a/tests/ui/deriving/deriving-via-extension-hash-enum.rs +++ b/tests/ui/deriving/deriving-via-extension-hash-enum.rs @@ -1,4 +1,4 @@ -// run-pass +//@ run-pass #![allow(dead_code)] #[derive(Hash)] enum Foo { diff --git a/tests/ui/deriving/deriving-via-extension-hash-struct.rs b/tests/ui/deriving/deriving-via-extension-hash-struct.rs index c4037dc2714..ad2a84b6bf9 100644 --- a/tests/ui/deriving/deriving-via-extension-hash-struct.rs +++ b/tests/ui/deriving/deriving-via-extension-hash-struct.rs @@ -1,6 +1,6 @@ -// run-pass +//@ run-pass #![allow(dead_code)] -// pretty-expanded FIXME #23616 +//@ pretty-expanded FIXME #23616 #[derive(Hash)] struct Foo { diff --git a/tests/ui/deriving/deriving-via-extension-struct-empty.rs b/tests/ui/deriving/deriving-via-extension-struct-empty.rs index 9fb250e8470..43a60013e79 100644 --- a/tests/ui/deriving/deriving-via-extension-struct-empty.rs +++ b/tests/ui/deriving/deriving-via-extension-struct-empty.rs @@ -1,4 +1,4 @@ -// run-pass +//@ run-pass #[derive(PartialEq, Debug)] struct Foo; diff --git a/tests/ui/deriving/deriving-via-extension-struct-like-enum-variant.rs b/tests/ui/deriving/deriving-via-extension-struct-like-enum-variant.rs index b6e6f136c75..fe382c4e4b9 100644 --- a/tests/ui/deriving/deriving-via-extension-struct-like-enum-variant.rs +++ b/tests/ui/deriving/deriving-via-extension-struct-like-enum-variant.rs @@ -1,4 +1,4 @@ -// run-pass +//@ run-pass #![allow(dead_code)] #[derive(PartialEq, Debug)] enum S { diff --git a/tests/ui/deriving/deriving-via-extension-struct-tuple.rs b/tests/ui/deriving/deriving-via-extension-struct-tuple.rs index e84906c96bb..3192b85a37b 100644 --- a/tests/ui/deriving/deriving-via-extension-struct-tuple.rs +++ b/tests/ui/deriving/deriving-via-extension-struct-tuple.rs @@ -1,4 +1,4 @@ -// run-pass +//@ run-pass #[derive(PartialEq, Debug)] struct Foo(isize, isize, String); diff --git a/tests/ui/deriving/deriving-via-extension-struct.rs b/tests/ui/deriving/deriving-via-extension-struct.rs index f4d8b16a02f..4a5c3453876 100644 --- a/tests/ui/deriving/deriving-via-extension-struct.rs +++ b/tests/ui/deriving/deriving-via-extension-struct.rs @@ -1,4 +1,4 @@ -// run-pass +//@ run-pass #[derive(PartialEq, Debug)] struct Foo { x: isize, diff --git a/tests/ui/deriving/deriving-via-extension-type-params.rs b/tests/ui/deriving/deriving-via-extension-type-params.rs index a5dec8ee1ab..79ac0c31675 100644 --- a/tests/ui/deriving/deriving-via-extension-type-params.rs +++ b/tests/ui/deriving/deriving-via-extension-type-params.rs @@ -1,4 +1,4 @@ -// run-pass +//@ run-pass #[derive(PartialEq, Hash, Debug)] struct Foo { x: isize, diff --git a/tests/ui/deriving/deriving-with-helper.rs b/tests/ui/deriving/deriving-with-helper.rs index 1c30b0b6fba..c71d553c892 100644 --- a/tests/ui/deriving/deriving-with-helper.rs +++ b/tests/ui/deriving/deriving-with-helper.rs @@ -1,5 +1,5 @@ -// check-pass -// compile-flags: --crate-type=lib +//@ check-pass +//@ compile-flags: --crate-type=lib #![feature(decl_macro)] #![feature(lang_items)] diff --git a/tests/ui/deriving/deriving-with-repr-packed.rs b/tests/ui/deriving/deriving-with-repr-packed.rs index 8ce444be13f..85eae60b2f4 100644 --- a/tests/ui/deriving/deriving-with-repr-packed.rs +++ b/tests/ui/deriving/deriving-with-repr-packed.rs @@ -1,4 +1,4 @@ -// run-pass +//@ run-pass // check that derive on a packed struct does not call field // methods with a misaligned field. diff --git a/tests/ui/deriving/issue-103157.rs b/tests/ui/deriving/issue-103157.rs index 52b4c7898d8..ca069897878 100644 --- a/tests/ui/deriving/issue-103157.rs +++ b/tests/ui/deriving/issue-103157.rs @@ -1,4 +1,4 @@ -// check-fail +//@ check-fail #[derive(PartialEq, Eq)] pub enum Value { diff --git a/tests/ui/deriving/issue-15689-1.rs b/tests/ui/deriving/issue-15689-1.rs index d143926b281..c81c3359dfc 100644 --- a/tests/ui/deriving/issue-15689-1.rs +++ b/tests/ui/deriving/issue-15689-1.rs @@ -1,4 +1,4 @@ -// run-pass +//@ run-pass #[derive(PartialEq, Debug)] enum Test<'a> { diff --git a/tests/ui/deriving/issue-15689-2.rs b/tests/ui/deriving/issue-15689-2.rs index 83dcb1406f8..790c72f6d4d 100644 --- a/tests/ui/deriving/issue-15689-2.rs +++ b/tests/ui/deriving/issue-15689-2.rs @@ -1,6 +1,6 @@ -// check-pass +//@ check-pass #![allow(dead_code)] -// pretty-expanded FIXME #23616 +//@ pretty-expanded FIXME #23616 #[derive(Clone)] enum Test<'a> { diff --git a/tests/ui/deriving/issue-19358.rs b/tests/ui/deriving/issue-19358.rs index 3970a4155e9..daa1a945749 100644 --- a/tests/ui/deriving/issue-19358.rs +++ b/tests/ui/deriving/issue-19358.rs @@ -1,4 +1,4 @@ -// run-pass +//@ run-pass #![allow(dead_code)] diff --git a/tests/ui/deriving/issue-3935.rs b/tests/ui/deriving/issue-3935.rs index e98d68e0eb2..64cb6597b10 100644 --- a/tests/ui/deriving/issue-3935.rs +++ b/tests/ui/deriving/issue-3935.rs @@ -1,4 +1,4 @@ -// run-pass +//@ run-pass #[derive(PartialEq)] struct Bike { diff --git a/tests/ui/deriving/issue-58319.rs b/tests/ui/deriving/issue-58319.rs index 754f5032d16..0e847a5b54d 100644 --- a/tests/ui/deriving/issue-58319.rs +++ b/tests/ui/deriving/issue-58319.rs @@ -1,4 +1,4 @@ -// run-pass +//@ run-pass fn main() {} #[derive(Clone)] pub struct Little; diff --git a/tests/ui/deriving/issue-6341.rs b/tests/ui/deriving/issue-6341.rs index 1be1394dfae..5c2d0abfa8c 100644 --- a/tests/ui/deriving/issue-6341.rs +++ b/tests/ui/deriving/issue-6341.rs @@ -1,5 +1,5 @@ -// check-pass -// pretty-expanded FIXME #23616 +//@ check-pass +//@ pretty-expanded FIXME #23616 #[derive(PartialEq)] struct A { x: usize } diff --git a/tests/ui/deriving/issue-89188-gat-hrtb.rs b/tests/ui/deriving/issue-89188-gat-hrtb.rs index e8118f0c6e4..a7b43159f16 100644 --- a/tests/ui/deriving/issue-89188-gat-hrtb.rs +++ b/tests/ui/deriving/issue-89188-gat-hrtb.rs @@ -1,4 +1,4 @@ -// check-pass +//@ check-pass trait CallWithShim: Sized { type Shim<'s> diff --git a/tests/ui/deriving/multiple-defaults.rs b/tests/ui/deriving/multiple-defaults.rs index 2024a55200b..598d0dc0f16 100644 --- a/tests/ui/deriving/multiple-defaults.rs +++ b/tests/ui/deriving/multiple-defaults.rs @@ -1,4 +1,4 @@ -// compile-flags: --crate-type=lib +//@ compile-flags: --crate-type=lib // When we get multiple `#[default]` variants, we emit several tool-only suggestions // to remove all except one of the `#[default]`s. diff --git a/tests/ui/dest-prop/skeptic-miscompile.rs b/tests/ui/dest-prop/skeptic-miscompile.rs index 4bb61dbc7f4..a7d6d2628b9 100644 --- a/tests/ui/dest-prop/skeptic-miscompile.rs +++ b/tests/ui/dest-prop/skeptic-miscompile.rs @@ -1,6 +1,6 @@ -// run-pass +//@ run-pass -// compile-flags: -Zmir-opt-level=3 +//@ compile-flags: -Zmir-opt-level=3 trait IterExt: Iterator { fn fold_ex(mut self, init: B, mut f: F) -> B diff --git a/tests/ui/destructuring-assignment/drop-order.rs b/tests/ui/destructuring-assignment/drop-order.rs index 79671054ca7..ff126356227 100644 --- a/tests/ui/destructuring-assignment/drop-order.rs +++ b/tests/ui/destructuring-assignment/drop-order.rs @@ -1,4 +1,4 @@ -// run-pass +//@ run-pass //! Test that let bindings and destructuring assignments have consistent drop orders diff --git a/tests/ui/destructuring-assignment/nested_destructure.rs b/tests/ui/destructuring-assignment/nested_destructure.rs index 94b3a5ff9a7..b35f1ad2f1b 100644 --- a/tests/ui/destructuring-assignment/nested_destructure.rs +++ b/tests/ui/destructuring-assignment/nested_destructure.rs @@ -1,4 +1,4 @@ -// run-pass +//@ run-pass struct Struct { a: S, diff --git a/tests/ui/destructuring-assignment/slice_destructure.rs b/tests/ui/destructuring-assignment/slice_destructure.rs index 762c4b5e8ea..5af18786796 100644 --- a/tests/ui/destructuring-assignment/slice_destructure.rs +++ b/tests/ui/destructuring-assignment/slice_destructure.rs @@ -1,4 +1,4 @@ -// run-pass +//@ run-pass fn main() { let (mut a, mut b); diff --git a/tests/ui/destructuring-assignment/struct-or-enum-variant-path.rs b/tests/ui/destructuring-assignment/struct-or-enum-variant-path.rs index f82e029983b..43a1173963d 100644 --- a/tests/ui/destructuring-assignment/struct-or-enum-variant-path.rs +++ b/tests/ui/destructuring-assignment/struct-or-enum-variant-path.rs @@ -1,4 +1,4 @@ -// check-pass +//@ check-pass struct S; diff --git a/tests/ui/destructuring-assignment/struct_destructure.rs b/tests/ui/destructuring-assignment/struct_destructure.rs index 8cceaadd7b9..e021beb6db7 100644 --- a/tests/ui/destructuring-assignment/struct_destructure.rs +++ b/tests/ui/destructuring-assignment/struct_destructure.rs @@ -1,4 +1,4 @@ -// run-pass +//@ run-pass struct Struct { a: S, diff --git a/tests/ui/destructuring-assignment/tuple_destructure.rs b/tests/ui/destructuring-assignment/tuple_destructure.rs index 2a8584029d0..9c7ca106d13 100644 --- a/tests/ui/destructuring-assignment/tuple_destructure.rs +++ b/tests/ui/destructuring-assignment/tuple_destructure.rs @@ -1,4 +1,4 @@ -// run-pass +//@ run-pass fn main() { let (mut a, mut b); diff --git a/tests/ui/destructuring-assignment/tuple_struct_destructure.rs b/tests/ui/destructuring-assignment/tuple_struct_destructure.rs index 07b5f7a314e..431519c4a9d 100644 --- a/tests/ui/destructuring-assignment/tuple_struct_destructure.rs +++ b/tests/ui/destructuring-assignment/tuple_struct_destructure.rs @@ -1,4 +1,4 @@ -// run-pass +//@ run-pass struct TupleStruct(S, T); diff --git a/tests/ui/destructuring-assignment/warn-unused-duplication.rs b/tests/ui/destructuring-assignment/warn-unused-duplication.rs index 390f44b8aa5..49444a8b49f 100644 --- a/tests/ui/destructuring-assignment/warn-unused-duplication.rs +++ b/tests/ui/destructuring-assignment/warn-unused-duplication.rs @@ -1,4 +1,4 @@ -// run-pass +//@ run-pass #![warn(unused_assignments)] diff --git a/tests/ui/diagnostic-flags/colored-session-opt-error.rs b/tests/ui/diagnostic-flags/colored-session-opt-error.rs index b9f47285c14..c8568eff325 100644 --- a/tests/ui/diagnostic-flags/colored-session-opt-error.rs +++ b/tests/ui/diagnostic-flags/colored-session-opt-error.rs @@ -1,4 +1,4 @@ -// check-pass -// ignore-windows -// compile-flags: -Cremark=foo --error-format=human --color always +//@ check-pass +//@ ignore-windows +//@ compile-flags: -Cremark=foo --error-format=human --color always fn main() {} diff --git a/tests/ui/diagnostic-flags/terminal_urls.rs b/tests/ui/diagnostic-flags/terminal_urls.rs index 1f04e2aade1..3c74e992395 100644 --- a/tests/ui/diagnostic-flags/terminal_urls.rs +++ b/tests/ui/diagnostic-flags/terminal_urls.rs @@ -1,4 +1,4 @@ -// compile-flags: -Zterminal-urls=yes +//@ compile-flags: -Zterminal-urls=yes fn main() { let () = 4; //~ ERROR } diff --git a/tests/ui/diagnostic-width/E0271.rs b/tests/ui/diagnostic-width/E0271.rs index 7e6b7140855..d8cb24898ac 100644 --- a/tests/ui/diagnostic-width/E0271.rs +++ b/tests/ui/diagnostic-width/E0271.rs @@ -1,5 +1,5 @@ -// compile-flags: --diagnostic-width=40 -// normalize-stderr-test: "long-type-\d+" -> "long-type-hash" +//@ compile-flags: --diagnostic-width=40 +//@ normalize-stderr-test: "long-type-\d+" -> "long-type-hash" trait Future { type Error; } diff --git a/tests/ui/diagnostic-width/flag-human.rs b/tests/ui/diagnostic-width/flag-human.rs index 289bfbabd94..a46122ed783 100644 --- a/tests/ui/diagnostic-width/flag-human.rs +++ b/tests/ui/diagnostic-width/flag-human.rs @@ -1,4 +1,4 @@ -// compile-flags: --diagnostic-width=20 +//@ compile-flags: --diagnostic-width=20 // This test checks that `-Z output-width` effects the human error output by restricting it to an // arbitrarily low value so that the effect is visible. diff --git a/tests/ui/diagnostic-width/flag-json.rs b/tests/ui/diagnostic-width/flag-json.rs index 820f1a049e1..00778872727 100644 --- a/tests/ui/diagnostic-width/flag-json.rs +++ b/tests/ui/diagnostic-width/flag-json.rs @@ -1,5 +1,5 @@ -// compile-flags: --diagnostic-width=20 --error-format=json -// error-pattern:expected `()`, found integer +//@ compile-flags: --diagnostic-width=20 --error-format=json +//@ error-pattern:expected `()`, found integer // This test checks that `-Z output-width` effects the JSON error output by restricting it to an // arbitrarily low value so that the effect is visible. diff --git a/tests/ui/diagnostic-width/flag-json.stderr b/tests/ui/diagnostic-width/flag-json.stderr index 0a4b54ebc85..6a54f86dcee 100644 --- a/tests/ui/diagnostic-width/flag-json.stderr +++ b/tests/ui/diagnostic-width/flag-json.stderr @@ -24,7 +24,7 @@ This error occurs when an expression was used in a place where the compiler expected an expression of a different type. It can occur in several cases, the most common being when calling a function and passing an argument which has a different type than the matching type in the function declaration. -"},"level":"error","spans":[{"file_name":"$DIR/flag-json.rs","byte_start":289,"byte_end":291,"line_start":8,"line_end":8,"column_start":17,"column_end":19,"is_primary":true,"text":[{"text":" let _: () = 42;","highlight_start":17,"highlight_end":19}],"label":"expected `()`, found integer","suggested_replacement":null,"suggestion_applicability":null,"expansion":null},{"file_name":"$DIR/flag-json.rs","byte_start":284,"byte_end":286,"line_start":8,"line_end":8,"column_start":12,"column_end":14,"is_primary":false,"text":[{"text":" let _: () = 42;","highlight_start":12,"highlight_end":14}],"label":"expected due to this","suggested_replacement":null,"suggestion_applicability":null,"expansion":null}],"children":[],"rendered":"error[E0308]: mismatched types +"},"level":"error","spans":[{"file_name":"$DIR/flag-json.rs","byte_start":291,"byte_end":293,"line_start":8,"line_end":8,"column_start":17,"column_end":19,"is_primary":true,"text":[{"text":" let _: () = 42;","highlight_start":17,"highlight_end":19}],"label":"expected `()`, found integer","suggested_replacement":null,"suggestion_applicability":null,"expansion":null},{"file_name":"$DIR/flag-json.rs","byte_start":286,"byte_end":288,"line_start":8,"line_end":8,"column_start":12,"column_end":14,"is_primary":false,"text":[{"text":" let _: () = 42;","highlight_start":12,"highlight_end":14}],"label":"expected due to this","suggested_replacement":null,"suggestion_applicability":null,"expansion":null}],"children":[],"rendered":"error[E0308]: mismatched types --> $DIR/flag-json.rs:8:17 | LL | ..._: () = 42; diff --git a/tests/ui/diagnostic-width/long-E0308.rs b/tests/ui/diagnostic-width/long-E0308.rs index 0ae5e19ab2a..150164ba21b 100644 --- a/tests/ui/diagnostic-width/long-E0308.rs +++ b/tests/ui/diagnostic-width/long-E0308.rs @@ -1,5 +1,5 @@ -// compile-flags: --diagnostic-width=60 -Zwrite-long-types-to-disk=yes -// normalize-stderr-test: "long-type-\d+" -> "long-type-hash" +//@ compile-flags: --diagnostic-width=60 -Zwrite-long-types-to-disk=yes +//@ normalize-stderr-test: "long-type-\d+" -> "long-type-hash" mod a { // Force the "short path for unique types" machinery to trip up diff --git a/tests/ui/diagnostic-width/tab-column-numbers.rs b/tests/ui/diagnostic-width/tab-column-numbers.rs index 2abb0bcde95..f75fec1a700 100644 --- a/tests/ui/diagnostic-width/tab-column-numbers.rs +++ b/tests/ui/diagnostic-width/tab-column-numbers.rs @@ -1,5 +1,5 @@ // Test for #109537: ensure that column numbers are correctly generated when using hard tabs. -// aux-build:tab_column_numbers.rs +//@ aux-build:tab_column_numbers.rs // ignore-tidy-tab diff --git a/tests/ui/diagnostic_namespace/auxiliary/proc-macro-helper.rs b/tests/ui/diagnostic_namespace/auxiliary/proc-macro-helper.rs index 759c32c8453..4edae48923a 100644 --- a/tests/ui/diagnostic_namespace/auxiliary/proc-macro-helper.rs +++ b/tests/ui/diagnostic_namespace/auxiliary/proc-macro-helper.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/ui/diagnostic_namespace/can_use_the_diagnostic_name_in_other_places.rs b/tests/ui/diagnostic_namespace/can_use_the_diagnostic_name_in_other_places.rs index 08b4d68779c..9f952bf6c86 100644 --- a/tests/ui/diagnostic_namespace/can_use_the_diagnostic_name_in_other_places.rs +++ b/tests/ui/diagnostic_namespace/can_use_the_diagnostic_name_in_other_places.rs @@ -1,4 +1,4 @@ -// check-pass +//@ check-pass mod diagnostic {} diff --git a/tests/ui/diagnostic_namespace/existing_proc_macros.rs b/tests/ui/diagnostic_namespace/existing_proc_macros.rs index d6d1fb01496..2bc58aea8fc 100644 --- a/tests/ui/diagnostic_namespace/existing_proc_macros.rs +++ b/tests/ui/diagnostic_namespace/existing_proc_macros.rs @@ -1,6 +1,6 @@ #![feature(diagnostic_namespace)] -// check-pass -// aux-build:proc-macro-helper.rs +//@ check-pass +//@ aux-build:proc-macro-helper.rs extern crate proc_macro_helper; diff --git a/tests/ui/diagnostic_namespace/non_existing_attributes_accepted.rs b/tests/ui/diagnostic_namespace/non_existing_attributes_accepted.rs index 677bd5a7343..95465701bf8 100644 --- a/tests/ui/diagnostic_namespace/non_existing_attributes_accepted.rs +++ b/tests/ui/diagnostic_namespace/non_existing_attributes_accepted.rs @@ -1,5 +1,5 @@ #![feature(diagnostic_namespace)] -// check-pass +//@ check-pass #[diagnostic::non_existing_attribute] //~^WARN unknown diagnostic attribute pub trait Bar { diff --git a/tests/ui/diagnostic_namespace/on_unimplemented/error_is_shown_in_downstream_crates.rs b/tests/ui/diagnostic_namespace/on_unimplemented/error_is_shown_in_downstream_crates.rs index b39375a09f3..7eaff73dca1 100644 --- a/tests/ui/diagnostic_namespace/on_unimplemented/error_is_shown_in_downstream_crates.rs +++ b/tests/ui/diagnostic_namespace/on_unimplemented/error_is_shown_in_downstream_crates.rs @@ -1,4 +1,4 @@ -// aux-build:other.rs +//@ aux-build:other.rs extern crate other; diff --git a/tests/ui/did_you_mean/dont-suggest-doc-hidden-fields.rs b/tests/ui/did_you_mean/dont-suggest-doc-hidden-fields.rs index ffc37b260a6..bd484c633c2 100644 --- a/tests/ui/did_you_mean/dont-suggest-doc-hidden-fields.rs +++ b/tests/ui/did_you_mean/dont-suggest-doc-hidden-fields.rs @@ -1,7 +1,7 @@ // Regression test for issue #93210. -// aux-crate:doc_hidden_fields=doc-hidden-fields.rs -// edition: 2021 +//@ aux-crate:doc_hidden_fields=doc-hidden-fields.rs +//@ edition: 2021 #[derive(Default)] pub struct A { diff --git a/tests/ui/did_you_mean/issue-105225.fixed b/tests/ui/did_you_mean/issue-105225.fixed index f756be615a1..54bd254c8e4 100644 --- a/tests/ui/did_you_mean/issue-105225.fixed +++ b/tests/ui/did_you_mean/issue-105225.fixed @@ -1,4 +1,4 @@ -// run-rustfix +//@ run-rustfix fn main() { let x = "x"; diff --git a/tests/ui/did_you_mean/issue-105225.rs b/tests/ui/did_you_mean/issue-105225.rs index 91cdf0eb28f..c0a04b456ac 100644 --- a/tests/ui/did_you_mean/issue-105225.rs +++ b/tests/ui/did_you_mean/issue-105225.rs @@ -1,4 +1,4 @@ -// run-rustfix +//@ run-rustfix fn main() { let x = "x"; diff --git a/tests/ui/did_you_mean/issue-31424.rs b/tests/ui/did_you_mean/issue-31424.rs index 95ccf2a4c89..2821d5b9d8b 100644 --- a/tests/ui/did_you_mean/issue-31424.rs +++ b/tests/ui/did_you_mean/issue-31424.rs @@ -1,4 +1,4 @@ -// forbid-output: &mut mut self +//@ forbid-output: &mut mut self struct Struct; diff --git a/tests/ui/did_you_mean/issue-41679-tilde-bitwise-negation-attempt.fixed b/tests/ui/did_you_mean/issue-41679-tilde-bitwise-negation-attempt.fixed index e566ed488c9..12d1ffb5fc9 100644 --- a/tests/ui/did_you_mean/issue-41679-tilde-bitwise-negation-attempt.fixed +++ b/tests/ui/did_you_mean/issue-41679-tilde-bitwise-negation-attempt.fixed @@ -1,4 +1,4 @@ -// run-rustfix +//@ run-rustfix fn main() { let _x = !1; //~ ERROR cannot be used as a unary operator diff --git a/tests/ui/did_you_mean/issue-41679-tilde-bitwise-negation-attempt.rs b/tests/ui/did_you_mean/issue-41679-tilde-bitwise-negation-attempt.rs index 1708a80505d..6db0f2a42ac 100644 --- a/tests/ui/did_you_mean/issue-41679-tilde-bitwise-negation-attempt.rs +++ b/tests/ui/did_you_mean/issue-41679-tilde-bitwise-negation-attempt.rs @@ -1,4 +1,4 @@ -// run-rustfix +//@ run-rustfix fn main() { let _x = ~1; //~ ERROR cannot be used as a unary operator diff --git a/tests/ui/did_you_mean/issue-54109-without-witness.fixed b/tests/ui/did_you_mean/issue-54109-without-witness.fixed index 5079a37f4da..2427ccaa6f0 100644 --- a/tests/ui/did_you_mean/issue-54109-without-witness.fixed +++ b/tests/ui/did_you_mean/issue-54109-without-witness.fixed @@ -1,4 +1,4 @@ -// run-rustfix +//@ run-rustfix // This test is to check if suggestions can be applied automatically. diff --git a/tests/ui/did_you_mean/issue-54109-without-witness.rs b/tests/ui/did_you_mean/issue-54109-without-witness.rs index 00660a938d5..3f1607de053 100644 --- a/tests/ui/did_you_mean/issue-54109-without-witness.rs +++ b/tests/ui/did_you_mean/issue-54109-without-witness.rs @@ -1,4 +1,4 @@ -// run-rustfix +//@ run-rustfix // This test is to check if suggestions can be applied automatically. diff --git a/tests/ui/did_you_mean/recursion_limit_deref.rs b/tests/ui/did_you_mean/recursion_limit_deref.rs index 41bbca661dd..af4c4ddda69 100644 --- a/tests/ui/did_you_mean/recursion_limit_deref.rs +++ b/tests/ui/did_you_mean/recursion_limit_deref.rs @@ -1,7 +1,7 @@ // Test that the recursion limit can be changed and that the compiler // suggests a fix. In this case, we have a long chain of Deref impls // which will cause an overflow during the autoderef loop. -// compile-flags: -Zdeduplicate-diagnostics=yes +//@ compile-flags: -Zdeduplicate-diagnostics=yes #![allow(dead_code)] #![recursion_limit="10"] diff --git a/tests/ui/did_you_mean/replace-impl-infer-ty-from-trait.fixed b/tests/ui/did_you_mean/replace-impl-infer-ty-from-trait.fixed index eebe8d6e3f3..db18cf2ad96 100644 --- a/tests/ui/did_you_mean/replace-impl-infer-ty-from-trait.fixed +++ b/tests/ui/did_you_mean/replace-impl-infer-ty-from-trait.fixed @@ -1,4 +1,4 @@ -// run-rustfix +//@ run-rustfix #![allow(unused)] trait Foo: Sized { diff --git a/tests/ui/did_you_mean/replace-impl-infer-ty-from-trait.rs b/tests/ui/did_you_mean/replace-impl-infer-ty-from-trait.rs index aa7510821af..1217a96112d 100644 --- a/tests/ui/did_you_mean/replace-impl-infer-ty-from-trait.rs +++ b/tests/ui/did_you_mean/replace-impl-infer-ty-from-trait.rs @@ -1,4 +1,4 @@ -// run-rustfix +//@ run-rustfix #![allow(unused)] trait Foo: Sized { diff --git a/tests/ui/did_you_mean/use_instead_of_import.fixed b/tests/ui/did_you_mean/use_instead_of_import.fixed index a8aae76f4fc..c55377c593c 100644 --- a/tests/ui/did_you_mean/use_instead_of_import.fixed +++ b/tests/ui/did_you_mean/use_instead_of_import.fixed @@ -1,4 +1,4 @@ -// run-rustfix +//@ run-rustfix use std::{ //~^ ERROR expected item, found `import` diff --git a/tests/ui/did_you_mean/use_instead_of_import.rs b/tests/ui/did_you_mean/use_instead_of_import.rs index 2db7c240752..baf8783b271 100644 --- a/tests/ui/did_you_mean/use_instead_of_import.rs +++ b/tests/ui/did_you_mean/use_instead_of_import.rs @@ -1,4 +1,4 @@ -// run-rustfix +//@ run-rustfix import std::{ //~^ ERROR expected item, found `import` diff --git a/tests/ui/directory_ownership/macro_expanded_mod_helper/foo/bar.rs b/tests/ui/directory_ownership/macro_expanded_mod_helper/foo/bar.rs index 01c087dbc9e..1d832a36ef5 100644 --- a/tests/ui/directory_ownership/macro_expanded_mod_helper/foo/bar.rs +++ b/tests/ui/directory_ownership/macro_expanded_mod_helper/foo/bar.rs @@ -1 +1 @@ -// ignore-test not a test, auxiliary +//@ ignore-test not a test, auxiliary diff --git a/tests/ui/directory_ownership/macro_expanded_mod_helper/foo/mod.rs b/tests/ui/directory_ownership/macro_expanded_mod_helper/foo/mod.rs index 2ec1c8bcc9c..08349ba6747 100644 --- a/tests/ui/directory_ownership/macro_expanded_mod_helper/foo/mod.rs +++ b/tests/ui/directory_ownership/macro_expanded_mod_helper/foo/mod.rs @@ -1,3 +1,3 @@ -// ignore-test not a test, auxiliary +//@ ignore-test not a test, auxiliary mod_decl!(bar); diff --git a/tests/ui/directory_ownership/mod_file_not_owning_aux1.rs b/tests/ui/directory_ownership/mod_file_not_owning_aux1.rs index eb5e8e3e1ab..6d6884fef04 100644 --- a/tests/ui/directory_ownership/mod_file_not_owning_aux1.rs +++ b/tests/ui/directory_ownership/mod_file_not_owning_aux1.rs @@ -1,4 +1,4 @@ -// ignore-test this is not a test +//@ ignore-test this is not a test macro_rules! m { () => { mod mod_file_not_owning_aux2; } diff --git a/tests/ui/directory_ownership/mod_file_not_owning_aux2.rs b/tests/ui/directory_ownership/mod_file_not_owning_aux2.rs index 920938c4ad4..76f1c1a7276 100644 --- a/tests/ui/directory_ownership/mod_file_not_owning_aux2.rs +++ b/tests/ui/directory_ownership/mod_file_not_owning_aux2.rs @@ -1 +1 @@ -// ignore-test this is not a test +//@ ignore-test this is not a test diff --git a/tests/ui/directory_ownership/mod_file_not_owning_aux3.rs b/tests/ui/directory_ownership/mod_file_not_owning_aux3.rs index 6e4a3928956..96a5780d971 100644 --- a/tests/ui/directory_ownership/mod_file_not_owning_aux3.rs +++ b/tests/ui/directory_ownership/mod_file_not_owning_aux3.rs @@ -1,3 +1,3 @@ -// ignore-test this is not a test +//@ ignore-test this is not a test mod mod_file_not_owning_aux2; diff --git a/tests/ui/disallowed-deconstructing/disallowed-deconstructing-destructing-struct-let.fixed b/tests/ui/disallowed-deconstructing/disallowed-deconstructing-destructing-struct-let.fixed index ae0a84eea4d..4c7182b2c13 100644 --- a/tests/ui/disallowed-deconstructing/disallowed-deconstructing-destructing-struct-let.fixed +++ b/tests/ui/disallowed-deconstructing/disallowed-deconstructing-destructing-struct-let.fixed @@ -1,4 +1,4 @@ -// run-rustfix +//@ run-rustfix struct X { x: String, } diff --git a/tests/ui/disallowed-deconstructing/disallowed-deconstructing-destructing-struct-let.rs b/tests/ui/disallowed-deconstructing/disallowed-deconstructing-destructing-struct-let.rs index c8db7861068..148b4eaab20 100644 --- a/tests/ui/disallowed-deconstructing/disallowed-deconstructing-destructing-struct-let.rs +++ b/tests/ui/disallowed-deconstructing/disallowed-deconstructing-destructing-struct-let.rs @@ -1,4 +1,4 @@ -// run-rustfix +//@ run-rustfix struct X { x: String, } diff --git a/tests/ui/disallowed-deconstructing/disallowed-deconstructing-destructing-struct-match.fixed b/tests/ui/disallowed-deconstructing/disallowed-deconstructing-destructing-struct-match.fixed index c8a451efeb2..895e81c106e 100644 --- a/tests/ui/disallowed-deconstructing/disallowed-deconstructing-destructing-struct-match.fixed +++ b/tests/ui/disallowed-deconstructing/disallowed-deconstructing-destructing-struct-match.fixed @@ -1,4 +1,4 @@ -// run-rustfix +//@ run-rustfix struct X { x: String, } diff --git a/tests/ui/disallowed-deconstructing/disallowed-deconstructing-destructing-struct-match.rs b/tests/ui/disallowed-deconstructing/disallowed-deconstructing-destructing-struct-match.rs index 815567ffec3..1d83a3ed7ff 100644 --- a/tests/ui/disallowed-deconstructing/disallowed-deconstructing-destructing-struct-match.rs +++ b/tests/ui/disallowed-deconstructing/disallowed-deconstructing-destructing-struct-match.rs @@ -1,4 +1,4 @@ -// run-rustfix +//@ run-rustfix struct X { x: String, } diff --git a/tests/ui/diverging-fallback-method-chain.rs b/tests/ui/diverging-fallback-method-chain.rs index ba9f05c64e4..aa8eba1191b 100644 --- a/tests/ui/diverging-fallback-method-chain.rs +++ b/tests/ui/diverging-fallback-method-chain.rs @@ -1,4 +1,4 @@ -// run-pass +//@ run-pass #![allow(unused_imports)] // Test a regression found when building compiler. The `produce()` diff --git a/tests/ui/diverging-fallback-option.rs b/tests/ui/diverging-fallback-option.rs index 46bdfc96dbe..aa793ebd017 100644 --- a/tests/ui/diverging-fallback-option.rs +++ b/tests/ui/diverging-fallback-option.rs @@ -1,4 +1,4 @@ -// run-pass +//@ run-pass #![allow(warnings)] diff --git a/tests/ui/double-ref.rs b/tests/ui/double-ref.rs index e68b8683376..62591deb868 100644 --- a/tests/ui/double-ref.rs +++ b/tests/ui/double-ref.rs @@ -1,7 +1,7 @@ -// run-pass +//@ run-pass #![allow(dead_code)] -// pretty-expanded FIXME #23616 +//@ pretty-expanded FIXME #23616 fn check_expr() { let _: & usize = &1; diff --git a/tests/ui/drop-bounds/drop-bounds-impl-drop.rs b/tests/ui/drop-bounds/drop-bounds-impl-drop.rs index 15aebdf1bc9..9b94e04b118 100644 --- a/tests/ui/drop-bounds/drop-bounds-impl-drop.rs +++ b/tests/ui/drop-bounds/drop-bounds-impl-drop.rs @@ -1,4 +1,4 @@ -// run-pass +//@ run-pass #![deny(drop_bounds)] // As a special exemption, `impl Drop` in the return position raises no error. // This allows a convenient way to return an unnamed drop guard. diff --git a/tests/ui/drop/drop-if-let-binding.rs b/tests/ui/drop/drop-if-let-binding.rs index 9c1ac4e0c7f..9c702b6846b 100644 --- a/tests/ui/drop/drop-if-let-binding.rs +++ b/tests/ui/drop/drop-if-let-binding.rs @@ -1,6 +1,6 @@ -// build-pass +//@ build-pass // regression test for issue #88307 -// compile-flags: -C opt-level=s +//@ compile-flags: -C opt-level=s fn main() { if let Some(_val) = Option::::None {} diff --git a/tests/ui/drop/drop-on-empty-block-exit.rs b/tests/ui/drop/drop-on-empty-block-exit.rs index ef3a90a53a6..63bc403a721 100644 --- a/tests/ui/drop/drop-on-empty-block-exit.rs +++ b/tests/ui/drop/drop-on-empty-block-exit.rs @@ -1,5 +1,5 @@ -// run-pass -// pretty-expanded FIXME #23616 +//@ run-pass +//@ pretty-expanded FIXME #23616 #![allow(non_camel_case_types)] enum t { foo(Box), } diff --git a/tests/ui/drop/drop-on-ret.rs b/tests/ui/drop/drop-on-ret.rs index 290e274f305..f8ce899adf0 100644 --- a/tests/ui/drop/drop-on-ret.rs +++ b/tests/ui/drop/drop-on-ret.rs @@ -1,8 +1,8 @@ -// run-pass +//@ run-pass -// pretty-expanded FIXME #23616 +//@ pretty-expanded FIXME #23616 fn f() -> isize { if true { diff --git a/tests/ui/drop/drop-struct-as-object.rs b/tests/ui/drop/drop-struct-as-object.rs index 1aa68777042..07c8950f1b2 100644 --- a/tests/ui/drop/drop-struct-as-object.rs +++ b/tests/ui/drop/drop-struct-as-object.rs @@ -1,4 +1,4 @@ -// run-pass +//@ run-pass #![allow(unused_variables)] #![allow(non_upper_case_globals)] diff --git a/tests/ui/drop/drop-trait-enum.rs b/tests/ui/drop/drop-trait-enum.rs index d2b77650a9d..91b5bcdf730 100644 --- a/tests/ui/drop/drop-trait-enum.rs +++ b/tests/ui/drop/drop-trait-enum.rs @@ -1,9 +1,9 @@ -// run-pass +//@ run-pass #![allow(dead_code)] #![allow(unused_assignments)] #![allow(unused_variables)] -// ignore-emscripten no threads support -// needs-unwind +//@ ignore-emscripten no threads support +//@ needs-unwind use std::thread; use std::sync::mpsc::{channel, Sender}; diff --git a/tests/ui/drop/drop-trait-generic.rs b/tests/ui/drop/drop-trait-generic.rs index cdefb680c75..20876469e2f 100644 --- a/tests/ui/drop/drop-trait-generic.rs +++ b/tests/ui/drop/drop-trait-generic.rs @@ -1,4 +1,4 @@ -// run-pass +//@ run-pass #![allow(dead_code)] struct S { x: T diff --git a/tests/ui/drop/drop-trait.rs b/tests/ui/drop/drop-trait.rs index d93f7718091..b160d17cdcb 100644 --- a/tests/ui/drop/drop-trait.rs +++ b/tests/ui/drop/drop-trait.rs @@ -1,4 +1,4 @@ -// run-pass +//@ run-pass #![allow(dead_code)] struct Foo { x: isize diff --git a/tests/ui/drop/drop-uninhabited-enum.rs b/tests/ui/drop/drop-uninhabited-enum.rs index b3566f68533..f018ffa0977 100644 --- a/tests/ui/drop/drop-uninhabited-enum.rs +++ b/tests/ui/drop/drop-uninhabited-enum.rs @@ -1,7 +1,7 @@ -// run-pass +//@ run-pass #![allow(dead_code)] #![allow(unused_variables)] -// pretty-expanded FIXME #23616 +//@ pretty-expanded FIXME #23616 enum Foo { } diff --git a/tests/ui/drop/drop-with-type-ascription-1.rs b/tests/ui/drop/drop-with-type-ascription-1.rs index e5a1a48df56..fbf9eecbb13 100644 --- a/tests/ui/drop/drop-with-type-ascription-1.rs +++ b/tests/ui/drop/drop-with-type-ascription-1.rs @@ -1,4 +1,4 @@ -// run-pass +//@ run-pass fn main() { let foo = "hello".to_string(); diff --git a/tests/ui/drop/drop-with-type-ascription-2.rs b/tests/ui/drop/drop-with-type-ascription-2.rs index fb70ad48e88..68109fac31b 100644 --- a/tests/ui/drop/drop-with-type-ascription-2.rs +++ b/tests/ui/drop/drop-with-type-ascription-2.rs @@ -1,4 +1,4 @@ -// run-pass +//@ run-pass fn main() { let args = vec!["foobie", "asdf::asdf"]; diff --git a/tests/ui/drop/drop_elaboration_with_errors.rs b/tests/ui/drop/drop_elaboration_with_errors.rs index 77862762e87..35d05e6cf64 100644 --- a/tests/ui/drop/drop_elaboration_with_errors.rs +++ b/tests/ui/drop/drop_elaboration_with_errors.rs @@ -1,6 +1,6 @@ // can't use build-fail, because this also fails check-fail, but // the ICE from #120787 only reproduces on build-fail. -// compile-flags: --emit=mir +//@ compile-flags: --emit=mir #![feature(type_alias_impl_trait)] diff --git a/tests/ui/drop/drop_order.rs b/tests/ui/drop/drop_order.rs index 5ce1fd54a9e..54e9e491f78 100644 --- a/tests/ui/drop/drop_order.rs +++ b/tests/ui/drop/drop_order.rs @@ -1,5 +1,5 @@ -// run-pass -// compile-flags: -Z validate-mir +//@ run-pass +//@ compile-flags: -Z validate-mir #![feature(let_chains)] use std::cell::RefCell; diff --git a/tests/ui/drop/dropck-eyepatch-extern-crate.rs b/tests/ui/drop/dropck-eyepatch-extern-crate.rs index fecfd5edffb..86d8a7e8356 100644 --- a/tests/ui/drop/dropck-eyepatch-extern-crate.rs +++ b/tests/ui/drop/dropck-eyepatch-extern-crate.rs @@ -1,5 +1,5 @@ -// run-pass -// aux-build:dropck_eyepatch_extern_crate.rs +//@ run-pass +//@ aux-build:dropck_eyepatch_extern_crate.rs extern crate dropck_eyepatch_extern_crate as other; diff --git a/tests/ui/drop/dropck-eyepatch-manuallydrop.rs b/tests/ui/drop/dropck-eyepatch-manuallydrop.rs index ff100cd941f..9d763d155b8 100644 --- a/tests/ui/drop/dropck-eyepatch-manuallydrop.rs +++ b/tests/ui/drop/dropck-eyepatch-manuallydrop.rs @@ -1,4 +1,4 @@ -// check-pass +//@ check-pass //! This test checks that dropck knows that ManuallyDrop does not drop its field. #![feature(dropck_eyepatch)] diff --git a/tests/ui/drop/dropck-eyepatch-reorder.rs b/tests/ui/drop/dropck-eyepatch-reorder.rs index 4a56c45aa92..6b394414bae 100644 --- a/tests/ui/drop/dropck-eyepatch-reorder.rs +++ b/tests/ui/drop/dropck-eyepatch-reorder.rs @@ -1,4 +1,4 @@ -// run-pass +//@ run-pass #![feature(dropck_eyepatch)] // The point of this test is to test uses of `#[may_dangle]` attribute diff --git a/tests/ui/drop/dropck-eyepatch.rs b/tests/ui/drop/dropck-eyepatch.rs index ff5a52b906b..2f27b72da5a 100644 --- a/tests/ui/drop/dropck-eyepatch.rs +++ b/tests/ui/drop/dropck-eyepatch.rs @@ -1,4 +1,4 @@ -// run-pass +//@ run-pass #![feature(dropck_eyepatch)] // The point of this test is to illustrate that the `#[may_dangle]` diff --git a/tests/ui/drop/dropck_legal_cycles.rs b/tests/ui/drop/dropck_legal_cycles.rs index 6a0fe7784fb..8acf98a03b5 100644 --- a/tests/ui/drop/dropck_legal_cycles.rs +++ b/tests/ui/drop/dropck_legal_cycles.rs @@ -1,4 +1,4 @@ -// run-pass +//@ run-pass // This test exercises cases where cyclic structure is legal, // including when the cycles go through data-structures such // as `Vec` or `TypedArena`. diff --git a/tests/ui/drop/dynamic-drop-async.rs b/tests/ui/drop/dynamic-drop-async.rs index 8f1cc6691cd..e7a32d3c24e 100644 --- a/tests/ui/drop/dynamic-drop-async.rs +++ b/tests/ui/drop/dynamic-drop-async.rs @@ -3,9 +3,9 @@ // * The future is dropped at one of its suspend points. // * Dropping one of the values panics while dropping the future. -// run-pass -// needs-unwind -// edition:2018 +//@ run-pass +//@ needs-unwind +//@ edition:2018 #![allow(unused)] diff --git a/tests/ui/drop/dynamic-drop.rs b/tests/ui/drop/dynamic-drop.rs index 4745cceb516..f848a1a340b 100644 --- a/tests/ui/drop/dynamic-drop.rs +++ b/tests/ui/drop/dynamic-drop.rs @@ -1,5 +1,5 @@ -// run-pass -// needs-unwind +//@ run-pass +//@ needs-unwind #![feature(coroutines, coroutine_trait)] #![feature(if_let_guard)] diff --git a/tests/ui/drop/issue-100276.rs b/tests/ui/drop/issue-100276.rs index 6401a8d1481..b44710e7c3f 100644 --- a/tests/ui/drop/issue-100276.rs +++ b/tests/ui/drop/issue-100276.rs @@ -1,5 +1,5 @@ -// check-pass -// compile-flags: -Z validate-mir +//@ check-pass +//@ compile-flags: -Z validate-mir #![feature(let_chains)] fn let_chains(entry: std::io::Result) { diff --git a/tests/ui/drop/issue-10028.rs b/tests/ui/drop/issue-10028.rs index 1692470e8d1..41914254522 100644 --- a/tests/ui/drop/issue-10028.rs +++ b/tests/ui/drop/issue-10028.rs @@ -1,8 +1,8 @@ -// run-pass +//@ run-pass #![allow(dead_code)] -// aux-build:issue-10028.rs +//@ aux-build:issue-10028.rs -// pretty-expanded FIXME #23616 +//@ pretty-expanded FIXME #23616 extern crate issue_10028 as issue10028; diff --git a/tests/ui/drop/issue-103107.rs b/tests/ui/drop/issue-103107.rs index 5f447595662..01ae998d090 100644 --- a/tests/ui/drop/issue-103107.rs +++ b/tests/ui/drop/issue-103107.rs @@ -1,5 +1,5 @@ -// check-pass -// compile-flags: -Z validate-mir +//@ check-pass +//@ compile-flags: -Z validate-mir struct Foo<'a>(&'a mut u32); diff --git a/tests/ui/drop/issue-110682.rs b/tests/ui/drop/issue-110682.rs index 35f9c7e8d9b..454615a5a01 100644 --- a/tests/ui/drop/issue-110682.rs +++ b/tests/ui/drop/issue-110682.rs @@ -1,5 +1,5 @@ -// build-pass -// compile-flags: -Zmir-opt-level=3 +//@ build-pass +//@ compile-flags: -Zmir-opt-level=3 use std::fmt::Debug; use std::mem::ManuallyDrop; diff --git a/tests/ui/drop/issue-17718-const-destructors.rs b/tests/ui/drop/issue-17718-const-destructors.rs index c9a729c7b20..f32b129e359 100644 --- a/tests/ui/drop/issue-17718-const-destructors.rs +++ b/tests/ui/drop/issue-17718-const-destructors.rs @@ -1,4 +1,4 @@ -// check-pass +//@ check-pass #![allow(dead_code)] struct A; impl Drop for A { diff --git a/tests/ui/drop/issue-21486.rs b/tests/ui/drop/issue-21486.rs index 46d6ccd56bd..101cbbf38e3 100644 --- a/tests/ui/drop/issue-21486.rs +++ b/tests/ui/drop/issue-21486.rs @@ -1,4 +1,4 @@ -// run-pass +//@ run-pass #![allow(unreachable_code)] // Issue #21486: Make sure that all structures are dropped, even when // created via FRU and control-flow breaks in the middle of diff --git a/tests/ui/drop/issue-23338-ensure-param-drop-order.rs b/tests/ui/drop/issue-23338-ensure-param-drop-order.rs index 52603744c45..f283b33f645 100644 --- a/tests/ui/drop/issue-23338-ensure-param-drop-order.rs +++ b/tests/ui/drop/issue-23338-ensure-param-drop-order.rs @@ -1,4 +1,4 @@ -// run-pass +//@ run-pass #![allow(non_upper_case_globals)] // This test is ensuring that parameters are indeed dropped after diff --git a/tests/ui/drop/issue-2734.rs b/tests/ui/drop/issue-2734.rs index df4f394dc37..028f86ebb3a 100644 --- a/tests/ui/drop/issue-2734.rs +++ b/tests/ui/drop/issue-2734.rs @@ -1,8 +1,8 @@ -// run-pass +//@ run-pass #![allow(dead_code)] #![allow(non_camel_case_types)] -// pretty-expanded FIXME #23616 +//@ pretty-expanded FIXME #23616 trait hax { fn dummy(&self) { } diff --git a/tests/ui/drop/issue-2735-2.rs b/tests/ui/drop/issue-2735-2.rs index 70ebce9d35a..7a6ed6ea2f8 100644 --- a/tests/ui/drop/issue-2735-2.rs +++ b/tests/ui/drop/issue-2735-2.rs @@ -1,4 +1,4 @@ -// run-pass +//@ run-pass #![allow(non_camel_case_types)] use std::cell::Cell; diff --git a/tests/ui/drop/issue-2735-3.rs b/tests/ui/drop/issue-2735-3.rs index 23301537835..3bb4536537c 100644 --- a/tests/ui/drop/issue-2735-3.rs +++ b/tests/ui/drop/issue-2735-3.rs @@ -1,4 +1,4 @@ -// run-pass +//@ run-pass #![allow(non_camel_case_types)] use std::cell::Cell; diff --git a/tests/ui/drop/issue-2735.rs b/tests/ui/drop/issue-2735.rs index 20d3949a9f9..8fa3ac45d08 100644 --- a/tests/ui/drop/issue-2735.rs +++ b/tests/ui/drop/issue-2735.rs @@ -1,8 +1,8 @@ -// run-pass +//@ run-pass #![allow(dead_code)] #![allow(non_camel_case_types)] -// pretty-expanded FIXME #23616 +//@ pretty-expanded FIXME #23616 trait hax { fn dummy(&self) { } diff --git a/tests/ui/drop/issue-30018-nopanic.rs b/tests/ui/drop/issue-30018-nopanic.rs index 291bab2736d..9cf346b8188 100644 --- a/tests/ui/drop/issue-30018-nopanic.rs +++ b/tests/ui/drop/issue-30018-nopanic.rs @@ -1,4 +1,4 @@ -// run-pass +//@ run-pass #![allow(unreachable_code)] // More thorough regression test for Issues #30018 and #30822. This // attempts to explore different ways that array element construction diff --git a/tests/ui/drop/issue-35546.rs b/tests/ui/drop/issue-35546.rs index 004679a6240..20b2eb3b821 100644 --- a/tests/ui/drop/issue-35546.rs +++ b/tests/ui/drop/issue-35546.rs @@ -1,4 +1,4 @@ -// build-pass +//@ build-pass #![allow(dead_code)] // Regression test for #35546. Check that we are able to codegen // this. Before we had problems because of the drop glue signature diff --git a/tests/ui/drop/issue-48962.rs b/tests/ui/drop/issue-48962.rs index 80d815379be..428a6ca6cd2 100644 --- a/tests/ui/drop/issue-48962.rs +++ b/tests/ui/drop/issue-48962.rs @@ -1,4 +1,4 @@ -// run-pass +//@ run-pass #![allow(unused_must_use)] // Test that we are able to reinitialize box with moved referent static mut ORDER: [usize; 3] = [0, 0, 0]; diff --git a/tests/ui/drop/issue-90752-raw-ptr-shenanigans.rs b/tests/ui/drop/issue-90752-raw-ptr-shenanigans.rs index 4e67b35949e..bfa169fd87d 100644 --- a/tests/ui/drop/issue-90752-raw-ptr-shenanigans.rs +++ b/tests/ui/drop/issue-90752-raw-ptr-shenanigans.rs @@ -1,4 +1,4 @@ -// run-pass +//@ run-pass use std::cell::RefCell; diff --git a/tests/ui/drop/issue-90752.rs b/tests/ui/drop/issue-90752.rs index 4395e45e773..64495da7b9f 100644 --- a/tests/ui/drop/issue-90752.rs +++ b/tests/ui/drop/issue-90752.rs @@ -1,4 +1,4 @@ -// run-pass +//@ run-pass use std::cell::RefCell; diff --git a/tests/ui/drop/issue-979.rs b/tests/ui/drop/issue-979.rs index 57a99b325ad..8d98ac4df23 100644 --- a/tests/ui/drop/issue-979.rs +++ b/tests/ui/drop/issue-979.rs @@ -1,4 +1,4 @@ -// run-pass +//@ run-pass #![allow(non_camel_case_types)] use std::cell::Cell; diff --git a/tests/ui/drop/no-drop-flag-size.rs b/tests/ui/drop/no-drop-flag-size.rs index 103e70ef6ee..d0e3346fd77 100644 --- a/tests/ui/drop/no-drop-flag-size.rs +++ b/tests/ui/drop/no-drop-flag-size.rs @@ -1,4 +1,4 @@ -// run-pass +//@ run-pass #![allow(dead_code)] use std::mem::size_of; diff --git a/tests/ui/drop/nondrop-cycle.rs b/tests/ui/drop/nondrop-cycle.rs index 29070f917e4..9b32d1319c9 100644 --- a/tests/ui/drop/nondrop-cycle.rs +++ b/tests/ui/drop/nondrop-cycle.rs @@ -1,5 +1,5 @@ -// run-pass -// pretty-expanded FIXME #23616 +//@ run-pass +//@ pretty-expanded FIXME #23616 use std::cell::Cell; diff --git a/tests/ui/drop/recursion-check-on-erroneous-impl.rs b/tests/ui/drop/recursion-check-on-erroneous-impl.rs index 733c8b0b085..83dd18a406a 100644 --- a/tests/ui/drop/recursion-check-on-erroneous-impl.rs +++ b/tests/ui/drop/recursion-check-on-erroneous-impl.rs @@ -1,6 +1,6 @@ // can't use build-fail, because this also fails check-fail, but // the ICE from #120787 only reproduces on build-fail. -// compile-flags: --emit=mir +//@ compile-flags: --emit=mir struct PrintOnDrop<'a>(&'a str); diff --git a/tests/ui/drop/repeat-drop.rs b/tests/ui/drop/repeat-drop.rs index 0afb4bb11bc..b83bee8c1bf 100644 --- a/tests/ui/drop/repeat-drop.rs +++ b/tests/ui/drop/repeat-drop.rs @@ -1,5 +1,5 @@ -// run-pass -// needs-unwind +//@ run-pass +//@ needs-unwind #![allow(dropping_references, dropping_copy_types)] diff --git a/tests/ui/drop/terminate-in-initializer.rs b/tests/ui/drop/terminate-in-initializer.rs index 66f267aa7c7..23169aaf65b 100644 --- a/tests/ui/drop/terminate-in-initializer.rs +++ b/tests/ui/drop/terminate-in-initializer.rs @@ -1,6 +1,6 @@ -// run-pass -// needs-unwind -// ignore-emscripten no threads support +//@ run-pass +//@ needs-unwind +//@ ignore-emscripten no threads support // Issue #787 // Don't try to clean up uninitialized locals diff --git a/tests/ui/drop/use_inline_dtor.rs b/tests/ui/drop/use_inline_dtor.rs index ac916de4646..03f476cff2a 100644 --- a/tests/ui/drop/use_inline_dtor.rs +++ b/tests/ui/drop/use_inline_dtor.rs @@ -1,7 +1,7 @@ -// run-pass -// aux-build:inline_dtor.rs +//@ run-pass +//@ aux-build:inline_dtor.rs -// pretty-expanded FIXME #23616 +//@ pretty-expanded FIXME #23616 extern crate inline_dtor; diff --git a/tests/ui/dropck/cleanup-arm-conditional.rs b/tests/ui/dropck/cleanup-arm-conditional.rs index 38c717089c4..94b38080189 100644 --- a/tests/ui/dropck/cleanup-arm-conditional.rs +++ b/tests/ui/dropck/cleanup-arm-conditional.rs @@ -1,11 +1,11 @@ -// run-pass +//@ run-pass #![allow(stable_features)] #![allow(unused_imports)] // Test that cleanup scope for temporaries created in a match // arm is confined to the match arm itself. -// pretty-expanded FIXME #23616 +//@ pretty-expanded FIXME #23616 #![feature(os)] diff --git a/tests/ui/dropck/coroutine-liveness-1.rs b/tests/ui/dropck/coroutine-liveness-1.rs index aea4d15ad90..aa9f68a1b49 100644 --- a/tests/ui/dropck/coroutine-liveness-1.rs +++ b/tests/ui/dropck/coroutine-liveness-1.rs @@ -1,5 +1,5 @@ -// check-pass -// edition: 2021 +//@ check-pass +//@ edition: 2021 // regression test for #116242. use std::future; diff --git a/tests/ui/dropck/coroutine-liveness-2.rs b/tests/ui/dropck/coroutine-liveness-2.rs index 416a073c6b9..3ef1400a41e 100644 --- a/tests/ui/dropck/coroutine-liveness-2.rs +++ b/tests/ui/dropck/coroutine-liveness-2.rs @@ -1,5 +1,5 @@ -// check-pass -// edition: 2021 +//@ check-pass +//@ edition: 2021 // regression test found while working on #117134. use std::future; diff --git a/tests/ui/dropck/dropck-eyepatch-extern-crate.rs b/tests/ui/dropck/dropck-eyepatch-extern-crate.rs index b8f30355413..d99134ba7e4 100644 --- a/tests/ui/dropck/dropck-eyepatch-extern-crate.rs +++ b/tests/ui/dropck/dropck-eyepatch-extern-crate.rs @@ -1,4 +1,4 @@ -// aux-build:dropck_eyepatch_extern_crate.rs +//@ aux-build:dropck_eyepatch_extern_crate.rs // The point of this test is to illustrate that the `#[may_dangle]` // attribute specifically allows, in the context of a type diff --git a/tests/ui/dropck/dropck_fn_type.rs b/tests/ui/dropck/dropck_fn_type.rs index 2934217df34..0695fc8012f 100644 --- a/tests/ui/dropck/dropck_fn_type.rs +++ b/tests/ui/dropck/dropck_fn_type.rs @@ -1,4 +1,4 @@ -// run-pass +//@ run-pass //! Regression test for #58311, regarding the usage of Fn types in drop impls // All of this Drop impls should compile. diff --git a/tests/ui/dropck/dropck_traits.rs b/tests/ui/dropck/dropck_traits.rs index 98e8e88a259..6f14aa82373 100644 --- a/tests/ui/dropck/dropck_traits.rs +++ b/tests/ui/dropck/dropck_traits.rs @@ -1,4 +1,4 @@ -// run-pass +//@ run-pass //! Regression test for #34426, regarding HRTB in drop impls // All of this Drop impls should compile. diff --git a/tests/ui/dropck/explicit-drop-bounds.rs b/tests/ui/dropck/explicit-drop-bounds.rs index ab6f33c0999..6ddac4d314f 100644 --- a/tests/ui/dropck/explicit-drop-bounds.rs +++ b/tests/ui/dropck/explicit-drop-bounds.rs @@ -1,6 +1,6 @@ -// revisions: good1 good2 bad1 bad2 -//[good1] check-pass -//[good2] check-pass +//@ revisions: good1 good2 bad1 bad2 +//@[good1] check-pass +//@[good2] check-pass use std::ops::Drop; diff --git a/tests/ui/dropck/explicit-implied-outlives.rs b/tests/ui/dropck/explicit-implied-outlives.rs index fa446591f3d..aca8283068d 100644 --- a/tests/ui/dropck/explicit-implied-outlives.rs +++ b/tests/ui/dropck/explicit-implied-outlives.rs @@ -1,6 +1,6 @@ -// revisions: good1 good2 bad1 bad2 -//[good1] check-pass -//[good2] check-pass +//@ revisions: good1 good2 bad1 bad2 +//@[good1] check-pass +//@[good2] check-pass use std::ops::Drop; diff --git a/tests/ui/dropck/issue-24805-dropck-itemless.rs b/tests/ui/dropck/issue-24805-dropck-itemless.rs index 4d71389351b..8519bcc9961 100644 --- a/tests/ui/dropck/issue-24805-dropck-itemless.rs +++ b/tests/ui/dropck/issue-24805-dropck-itemless.rs @@ -1,4 +1,4 @@ -// run-pass +//@ run-pass // Check that item-less traits do not cause dropck to inject extra // region constraints. diff --git a/tests/ui/dropck/issue-28498-ugeh-with-lifetime-param.rs b/tests/ui/dropck/issue-28498-ugeh-with-lifetime-param.rs index 43c0bfb26cd..2d2e36d2bc3 100644 --- a/tests/ui/dropck/issue-28498-ugeh-with-lifetime-param.rs +++ b/tests/ui/dropck/issue-28498-ugeh-with-lifetime-param.rs @@ -1,4 +1,4 @@ -// run-pass +//@ run-pass // Demonstrate the use of the unguarded escape hatch with a lifetime param // to assert that destructor will not access any dead data. diff --git a/tests/ui/dropck/issue-28498-ugeh-with-passed-to-fn.rs b/tests/ui/dropck/issue-28498-ugeh-with-passed-to-fn.rs index d2b620f6940..06aefe73d0f 100644 --- a/tests/ui/dropck/issue-28498-ugeh-with-passed-to-fn.rs +++ b/tests/ui/dropck/issue-28498-ugeh-with-passed-to-fn.rs @@ -1,4 +1,4 @@ -// run-pass +//@ run-pass // Demonstrate the use of the unguarded escape hatch with a type param in negative position // to assert that destructor will not access any dead data. diff --git a/tests/ui/dropck/issue-28498-ugeh-with-trait-bound.rs b/tests/ui/dropck/issue-28498-ugeh-with-trait-bound.rs index 61d11cf3834..4e5a0e49a8c 100644 --- a/tests/ui/dropck/issue-28498-ugeh-with-trait-bound.rs +++ b/tests/ui/dropck/issue-28498-ugeh-with-trait-bound.rs @@ -1,4 +1,4 @@ -// run-pass +//@ run-pass // Demonstrate the use of the unguarded escape hatch with a trait bound // to assert that destructor will not access any dead data. diff --git a/tests/ui/dropck/issue-29844.rs b/tests/ui/dropck/issue-29844.rs index e08942da5e4..2538fbe257a 100644 --- a/tests/ui/dropck/issue-29844.rs +++ b/tests/ui/dropck/issue-29844.rs @@ -1,4 +1,4 @@ -// run-pass +//@ run-pass use std::sync::Arc; pub struct DescriptorSet<'a> { diff --git a/tests/ui/dropck/issue-34053.rs b/tests/ui/dropck/issue-34053.rs index fa23ae8f95b..5a26fe75eb8 100644 --- a/tests/ui/dropck/issue-34053.rs +++ b/tests/ui/dropck/issue-34053.rs @@ -1,4 +1,4 @@ -// run-pass +//@ run-pass use std::sync::atomic::{AtomicUsize, Ordering}; static DROP_COUNTER: AtomicUsize = AtomicUsize::new(0); diff --git a/tests/ui/dropck/issue-54943-1.rs b/tests/ui/dropck/issue-54943-1.rs index ec682d96081..e2aae20db90 100644 --- a/tests/ui/dropck/issue-54943-1.rs +++ b/tests/ui/dropck/issue-54943-1.rs @@ -1,7 +1,7 @@ // This test is a minimal version of an ICE in the dropck-eyepatch tests // found in the fix for #54943. -// check-pass +//@ check-pass fn foo(_t: T) { } diff --git a/tests/ui/dropck/issue-54943-2.rs b/tests/ui/dropck/issue-54943-2.rs index d400ae58db4..bf15b2a71e4 100644 --- a/tests/ui/dropck/issue-54943-2.rs +++ b/tests/ui/dropck/issue-54943-2.rs @@ -2,7 +2,7 @@ // found in the fix for #54943. In particular, this test is in unreachable // code as the initial fix for this ICE only worked if the code was reachable. -// check-pass +//@ check-pass fn foo(_t: T) { } diff --git a/tests/ui/dropck/transitive-outlives-2.rs b/tests/ui/dropck/transitive-outlives-2.rs index 87154e25d40..2a21eb66a94 100644 --- a/tests/ui/dropck/transitive-outlives-2.rs +++ b/tests/ui/dropck/transitive-outlives-2.rs @@ -1,4 +1,4 @@ -// check-pass +//@ check-pass use std::marker::PhantomData; use std::ops::Drop; diff --git a/tests/ui/dropck/transitive-outlives.rs b/tests/ui/dropck/transitive-outlives.rs index d071664abde..e96ac6faae4 100644 --- a/tests/ui/dropck/transitive-outlives.rs +++ b/tests/ui/dropck/transitive-outlives.rs @@ -1,5 +1,5 @@ -// revisions: good bad -//[good] check-pass +//@ revisions: good bad +//@[good] check-pass use std::marker::PhantomData; use std::ops::Drop; diff --git a/tests/ui/dropck/trivial-impl-bounds.rs b/tests/ui/dropck/trivial-impl-bounds.rs index a8f5d2c354b..97770d22f79 100644 --- a/tests/ui/dropck/trivial-impl-bounds.rs +++ b/tests/ui/dropck/trivial-impl-bounds.rs @@ -1,5 +1,5 @@ -// revisions: good1 good2 good3 -// check-pass +//@ revisions: good1 good2 good3 +//@ check-pass use std::ops::Drop; diff --git a/tests/ui/dupe-first-attr.rs b/tests/ui/dupe-first-attr.rs index d950743b41c..ec9e354e73d 100644 --- a/tests/ui/dupe-first-attr.rs +++ b/tests/ui/dupe-first-attr.rs @@ -1,9 +1,9 @@ -// run-pass +//@ run-pass // Regression test for a problem with the first mod attribute // being applied to every mod -// pretty-expanded FIXME #23616 +//@ pretty-expanded FIXME #23616 #[cfg(target_os = "linux")] mod hello {} diff --git a/tests/ui/duplicate/dupe-symbols-1.rs b/tests/ui/duplicate/dupe-symbols-1.rs index 28e329b56ca..f49bf44a061 100644 --- a/tests/ui/duplicate/dupe-symbols-1.rs +++ b/tests/ui/duplicate/dupe-symbols-1.rs @@ -1,4 +1,4 @@ -// build-fail +//@ build-fail // #![crate_type="rlib"] diff --git a/tests/ui/duplicate/dupe-symbols-2.rs b/tests/ui/duplicate/dupe-symbols-2.rs index e303a790baf..343c7131d1f 100644 --- a/tests/ui/duplicate/dupe-symbols-2.rs +++ b/tests/ui/duplicate/dupe-symbols-2.rs @@ -1,4 +1,4 @@ -// build-fail +//@ build-fail // #![crate_type="rlib"] diff --git a/tests/ui/duplicate/dupe-symbols-3.rs b/tests/ui/duplicate/dupe-symbols-3.rs index 1af2fe98e50..365ec182f53 100644 --- a/tests/ui/duplicate/dupe-symbols-3.rs +++ b/tests/ui/duplicate/dupe-symbols-3.rs @@ -1,4 +1,4 @@ -// build-fail +//@ build-fail // #![crate_type="rlib"] diff --git a/tests/ui/duplicate/dupe-symbols-4.rs b/tests/ui/duplicate/dupe-symbols-4.rs index de6610c3e79..a9b7d689ad4 100644 --- a/tests/ui/duplicate/dupe-symbols-4.rs +++ b/tests/ui/duplicate/dupe-symbols-4.rs @@ -1,7 +1,7 @@ -// build-fail +//@ build-fail // -// error-pattern: symbol `fail` is already defined +//@ error-pattern: symbol `fail` is already defined #![crate_type="rlib"] #![allow(warnings)] diff --git a/tests/ui/duplicate/dupe-symbols-5.rs b/tests/ui/duplicate/dupe-symbols-5.rs index ea801cef64f..2ed803c1dda 100644 --- a/tests/ui/duplicate/dupe-symbols-5.rs +++ b/tests/ui/duplicate/dupe-symbols-5.rs @@ -1,4 +1,4 @@ -// build-fail +//@ build-fail // #![crate_type="rlib"] diff --git a/tests/ui/duplicate/dupe-symbols-6.rs b/tests/ui/duplicate/dupe-symbols-6.rs index 018f4bb7f07..9841be7365a 100644 --- a/tests/ui/duplicate/dupe-symbols-6.rs +++ b/tests/ui/duplicate/dupe-symbols-6.rs @@ -1,4 +1,4 @@ -// build-fail +//@ build-fail #![crate_type="rlib"] #![allow(warnings)] diff --git a/tests/ui/duplicate/dupe-symbols-7.rs b/tests/ui/duplicate/dupe-symbols-7.rs index 4983874729c..2c75a5ffe6d 100644 --- a/tests/ui/duplicate/dupe-symbols-7.rs +++ b/tests/ui/duplicate/dupe-symbols-7.rs @@ -1,7 +1,7 @@ -// build-fail +//@ build-fail // -// error-pattern: entry symbol `main` declared multiple times +//@ error-pattern: entry symbol `main` declared multiple times #![allow(warnings)] diff --git a/tests/ui/duplicate/dupe-symbols-8.rs b/tests/ui/duplicate/dupe-symbols-8.rs index ce7fa24a9fe..fc0b1037777 100644 --- a/tests/ui/duplicate/dupe-symbols-8.rs +++ b/tests/ui/duplicate/dupe-symbols-8.rs @@ -1,5 +1,5 @@ -// build-fail -// error-pattern: entry symbol `main` declared multiple times +//@ build-fail +//@ error-pattern: entry symbol `main` declared multiple times // // See #67946. diff --git a/tests/ui/duplicate_entry_error.rs b/tests/ui/duplicate_entry_error.rs index 776ecedea7e..7ebbab47095 100644 --- a/tests/ui/duplicate_entry_error.rs +++ b/tests/ui/duplicate_entry_error.rs @@ -1,4 +1,4 @@ -// normalize-stderr-test "loaded from .*libstd-.*.rlib" -> "loaded from SYSROOT/libstd-*.rlib" +//@ normalize-stderr-test "loaded from .*libstd-.*.rlib" -> "loaded from SYSROOT/libstd-*.rlib" // note-pattern: first defined in crate `std`. // Test for issue #31788 and E0152 diff --git a/tests/ui/dyn-keyword/dyn-2015-edition-keyword-ident-lint.fixed b/tests/ui/dyn-keyword/dyn-2015-edition-keyword-ident-lint.fixed index c815080fc4a..7af94a64d39 100644 --- a/tests/ui/dyn-keyword/dyn-2015-edition-keyword-ident-lint.fixed +++ b/tests/ui/dyn-keyword/dyn-2015-edition-keyword-ident-lint.fixed @@ -4,8 +4,8 @@ // this file via `rustfix`, we want the rustfix output to be // compilable; so the macros here carefully use `dyn` "correctly." // -// edition:2015 -// run-rustfix +//@ edition:2015 +//@ run-rustfix #![allow(non_camel_case_types)] #![deny(keyword_idents)] diff --git a/tests/ui/dyn-keyword/dyn-2015-edition-keyword-ident-lint.rs b/tests/ui/dyn-keyword/dyn-2015-edition-keyword-ident-lint.rs index 6cdc7071494..bfaf351191b 100644 --- a/tests/ui/dyn-keyword/dyn-2015-edition-keyword-ident-lint.rs +++ b/tests/ui/dyn-keyword/dyn-2015-edition-keyword-ident-lint.rs @@ -4,8 +4,8 @@ // this file via `rustfix`, we want the rustfix output to be // compilable; so the macros here carefully use `dyn` "correctly." // -// edition:2015 -// run-rustfix +//@ edition:2015 +//@ run-rustfix #![allow(non_camel_case_types)] #![deny(keyword_idents)] diff --git a/tests/ui/dyn-keyword/dyn-2015-idents-in-decl-macros-unlinted.rs b/tests/ui/dyn-keyword/dyn-2015-idents-in-decl-macros-unlinted.rs index bda2ed17ecf..36af053f2ff 100644 --- a/tests/ui/dyn-keyword/dyn-2015-idents-in-decl-macros-unlinted.rs +++ b/tests/ui/dyn-keyword/dyn-2015-idents-in-decl-macros-unlinted.rs @@ -5,8 +5,8 @@ // identifier under a macro, including under the declarative `macro` // forms from macros 1.2 and macros 2.0. // -// check-pass -// edition:2015 +//@ check-pass +//@ edition:2015 #![feature(decl_macro)] #![allow(non_camel_case_types)] diff --git a/tests/ui/dyn-keyword/dyn-2015-idents-in-macros-unlinted.rs b/tests/ui/dyn-keyword/dyn-2015-idents-in-macros-unlinted.rs index 472f6b5c8e5..7c2b9396108 100644 --- a/tests/ui/dyn-keyword/dyn-2015-idents-in-macros-unlinted.rs +++ b/tests/ui/dyn-keyword/dyn-2015-idents-in-macros-unlinted.rs @@ -4,8 +4,8 @@ // We currently do not attempt to detect or fix uses of `dyn` as an // identifier under a macro. // -// check-pass -// edition:2015 +//@ check-pass +//@ edition:2015 #![allow(non_camel_case_types)] #![deny(keyword_idents)] diff --git a/tests/ui/dyn-keyword/dyn-2015-no-warnings-without-lints.rs b/tests/ui/dyn-keyword/dyn-2015-no-warnings-without-lints.rs index d6a33c08d19..5142e02d7f6 100644 --- a/tests/ui/dyn-keyword/dyn-2015-no-warnings-without-lints.rs +++ b/tests/ui/dyn-keyword/dyn-2015-no-warnings-without-lints.rs @@ -1,8 +1,8 @@ // Under the 2015 edition without the keyword_idents lint, `dyn` is // entirely acceptable as an identifier. // -// check-pass -// edition:2015 +//@ check-pass +//@ edition:2015 #![allow(non_camel_case_types)] diff --git a/tests/ui/dyn-keyword/dyn-2018-edition-lint.rs b/tests/ui/dyn-keyword/dyn-2018-edition-lint.rs index 23ca36b71e0..65b56b32756 100644 --- a/tests/ui/dyn-keyword/dyn-2018-edition-lint.rs +++ b/tests/ui/dyn-keyword/dyn-2018-edition-lint.rs @@ -1,4 +1,4 @@ -// edition:2018 +//@ edition:2018 #[deny(bare_trait_objects)] fn function(x: &SomeTrait, y: Box) { diff --git a/tests/ui/dyn-keyword/dyn-2021-edition-error.rs b/tests/ui/dyn-keyword/dyn-2021-edition-error.rs index bc1bed8a9a4..f98bf4ef5d1 100644 --- a/tests/ui/dyn-keyword/dyn-2021-edition-error.rs +++ b/tests/ui/dyn-keyword/dyn-2021-edition-error.rs @@ -1,4 +1,4 @@ -// edition:2021 +//@ edition:2021 fn function(x: &SomeTrait, y: Box) { //~^ ERROR trait objects must include the `dyn` keyword diff --git a/tests/ui/dyn-keyword/dyn-angle-brackets.fixed b/tests/ui/dyn-keyword/dyn-angle-brackets.fixed index 00069a3e7ad..bc59c2ed75e 100644 --- a/tests/ui/dyn-keyword/dyn-angle-brackets.fixed +++ b/tests/ui/dyn-keyword/dyn-angle-brackets.fixed @@ -1,6 +1,6 @@ // See https://github.com/rust-lang/rust/issues/88508 -// run-rustfix -// edition:2018 +//@ run-rustfix +//@ edition:2018 #![deny(bare_trait_objects)] #![allow(dead_code)] #![allow(unused_imports)] diff --git a/tests/ui/dyn-keyword/dyn-angle-brackets.rs b/tests/ui/dyn-keyword/dyn-angle-brackets.rs index ee5fee4cfb8..7dda7167721 100644 --- a/tests/ui/dyn-keyword/dyn-angle-brackets.rs +++ b/tests/ui/dyn-keyword/dyn-angle-brackets.rs @@ -1,6 +1,6 @@ // See https://github.com/rust-lang/rust/issues/88508 -// run-rustfix -// edition:2018 +//@ run-rustfix +//@ edition:2018 #![deny(bare_trait_objects)] #![allow(dead_code)] #![allow(unused_imports)] diff --git a/tests/ui/dyn-keyword/issue-56327-dyn-trait-in-macro-is-okay.rs b/tests/ui/dyn-keyword/issue-56327-dyn-trait-in-macro-is-okay.rs index 59e7f9a6083..b7cb7ce2fe7 100644 --- a/tests/ui/dyn-keyword/issue-56327-dyn-trait-in-macro-is-okay.rs +++ b/tests/ui/dyn-keyword/issue-56327-dyn-trait-in-macro-is-okay.rs @@ -1,5 +1,5 @@ -// check-pass -// edition:2015 +//@ check-pass +//@ edition:2015 // // rust-lang/rust#56327: Some occurrences of `dyn` within a macro are // not instances of identifiers, and thus should *not* be caught by the diff --git a/tests/ui/dyn-star/align.rs b/tests/ui/dyn-star/align.rs index 79cbaba0c78..f9ef7063231 100644 --- a/tests/ui/dyn-star/align.rs +++ b/tests/ui/dyn-star/align.rs @@ -1,4 +1,4 @@ -// revisions: normal over_aligned +//@ revisions: normal over_aligned #![feature(dyn_star)] //~^ WARN the feature `dyn_star` is incomplete and may not be safe to use and/or cause compiler crashes diff --git a/tests/ui/dyn-star/box.rs b/tests/ui/dyn-star/box.rs index 8b2f46bd1b2..a7e8e81b654 100644 --- a/tests/ui/dyn-star/box.rs +++ b/tests/ui/dyn-star/box.rs @@ -1,7 +1,7 @@ -// run-pass -// revisions: current next -//[current] compile-flags: -C opt-level=0 -//[next] compile-flags: -Znext-solver -C opt-level=0 +//@ run-pass +//@ revisions: current next +//@[current] compile-flags: -C opt-level=0 +//@[next] compile-flags: -Znext-solver -C opt-level=0 #![feature(dyn_star)] #![allow(incomplete_features)] diff --git a/tests/ui/dyn-star/check-size-at-cast-polymorphic-bad.rs b/tests/ui/dyn-star/check-size-at-cast-polymorphic-bad.rs index dffe6ae8a36..ad3391a7ad7 100644 --- a/tests/ui/dyn-star/check-size-at-cast-polymorphic-bad.rs +++ b/tests/ui/dyn-star/check-size-at-cast-polymorphic-bad.rs @@ -1,5 +1,5 @@ -// revisions: current next -//[next] compile-flags: -Znext-solver +//@ revisions: current next +//@[next] compile-flags: -Znext-solver #![feature(dyn_star)] #![allow(incomplete_features)] diff --git a/tests/ui/dyn-star/check-size-at-cast-polymorphic.rs b/tests/ui/dyn-star/check-size-at-cast-polymorphic.rs index 5c0a3d256f6..ceedbafd86b 100644 --- a/tests/ui/dyn-star/check-size-at-cast-polymorphic.rs +++ b/tests/ui/dyn-star/check-size-at-cast-polymorphic.rs @@ -1,4 +1,4 @@ -// check-pass +//@ check-pass #![feature(dyn_star)] #![allow(incomplete_features)] diff --git a/tests/ui/dyn-star/const-and-static.rs b/tests/ui/dyn-star/const-and-static.rs index 551b072abfa..cbb64261a66 100644 --- a/tests/ui/dyn-star/const-and-static.rs +++ b/tests/ui/dyn-star/const-and-static.rs @@ -1,4 +1,4 @@ -// check-pass +//@ check-pass #![feature(dyn_star)] //~^ WARN the feature `dyn_star` is incomplete diff --git a/tests/ui/dyn-star/const.rs b/tests/ui/dyn-star/const.rs index 67e3ab7ab35..036d678dc02 100644 --- a/tests/ui/dyn-star/const.rs +++ b/tests/ui/dyn-star/const.rs @@ -1,4 +1,4 @@ -// run-pass +//@ run-pass #![feature(dyn_star)] #![allow(unused, incomplete_features)] diff --git a/tests/ui/dyn-star/dispatch-on-pin-mut.rs b/tests/ui/dyn-star/dispatch-on-pin-mut.rs index 151aa9092fb..e17aef47634 100644 --- a/tests/ui/dyn-star/dispatch-on-pin-mut.rs +++ b/tests/ui/dyn-star/dispatch-on-pin-mut.rs @@ -1,6 +1,6 @@ -// run-pass -// edition:2021 -// check-run-results +//@ run-pass +//@ edition:2021 +//@ check-run-results #![feature(dyn_star)] //~^ WARN the feature `dyn_star` is incomplete and may not be safe to use and/or cause compiler crashes diff --git a/tests/ui/dyn-star/dont-unsize-coerce-dyn-star.rs b/tests/ui/dyn-star/dont-unsize-coerce-dyn-star.rs index c12b16f1605..abc66df8b36 100644 --- a/tests/ui/dyn-star/dont-unsize-coerce-dyn-star.rs +++ b/tests/ui/dyn-star/dont-unsize-coerce-dyn-star.rs @@ -1,5 +1,5 @@ -// run-pass -// check-run-results +//@ run-pass +//@ check-run-results #![feature(dyn_star)] //~^ WARN the feature `dyn_star` is incomplete and may not be safe to use and/or cause compiler crashes diff --git a/tests/ui/dyn-star/drop.rs b/tests/ui/dyn-star/drop.rs index 1acfe2f2d1c..ca86f1b5b01 100644 --- a/tests/ui/dyn-star/drop.rs +++ b/tests/ui/dyn-star/drop.rs @@ -1,5 +1,5 @@ -// run-pass -// check-run-results +//@ run-pass +//@ check-run-results #![feature(dyn_star)] #![allow(incomplete_features)] diff --git a/tests/ui/dyn-star/dyn-async-trait.rs b/tests/ui/dyn-star/dyn-async-trait.rs index 9b27133b493..a673b269910 100644 --- a/tests/ui/dyn-star/dyn-async-trait.rs +++ b/tests/ui/dyn-star/dyn-async-trait.rs @@ -1,5 +1,5 @@ -// check-pass -// edition: 2021 +//@ check-pass +//@ edition: 2021 // This test case is meant to demonstrate how close we can get to async // functions in dyn traits with the current level of dyn* support. diff --git a/tests/ui/dyn-star/dyn-star-to-dyn.rs b/tests/ui/dyn-star/dyn-star-to-dyn.rs index 1d974b7ecb2..99f673df868 100644 --- a/tests/ui/dyn-star/dyn-star-to-dyn.rs +++ b/tests/ui/dyn-star/dyn-star-to-dyn.rs @@ -1,4 +1,4 @@ -// run-pass +//@ run-pass #![feature(dyn_star)] //~^ WARN the feature `dyn_star` is incomplete and may not be safe to use and/or cause compiler crashes diff --git a/tests/ui/dyn-star/issue-102430.rs b/tests/ui/dyn-star/issue-102430.rs index 244ecda6626..4e48d5e2f5d 100644 --- a/tests/ui/dyn-star/issue-102430.rs +++ b/tests/ui/dyn-star/issue-102430.rs @@ -1,4 +1,4 @@ -// check-pass +//@ check-pass #![feature(dyn_star)] #![allow(incomplete_features)] diff --git a/tests/ui/dyn-star/make-dyn-star.rs b/tests/ui/dyn-star/make-dyn-star.rs index e5255a64ba1..24004335f06 100644 --- a/tests/ui/dyn-star/make-dyn-star.rs +++ b/tests/ui/dyn-star/make-dyn-star.rs @@ -1,4 +1,4 @@ -// run-pass +//@ run-pass #![feature(dyn_star)] #![allow(incomplete_features)] diff --git a/tests/ui/dyn-star/method.rs b/tests/ui/dyn-star/method.rs index 5a77640f0d9..0d0855eec7f 100644 --- a/tests/ui/dyn-star/method.rs +++ b/tests/ui/dyn-star/method.rs @@ -1,4 +1,4 @@ -// run-pass +//@ run-pass #![feature(dyn_star)] #![allow(incomplete_features)] diff --git a/tests/ui/dyn-star/no-explicit-dyn-star.rs b/tests/ui/dyn-star/no-explicit-dyn-star.rs index 4f726b7c6a6..0847597450e 100644 --- a/tests/ui/dyn-star/no-explicit-dyn-star.rs +++ b/tests/ui/dyn-star/no-explicit-dyn-star.rs @@ -1,4 +1,4 @@ -// aux-build:dyn-star-foreign.rs +//@ aux-build:dyn-star-foreign.rs extern crate dyn_star_foreign; diff --git a/tests/ui/dyn-star/no-implicit-dyn-star.rs b/tests/ui/dyn-star/no-implicit-dyn-star.rs index d9470e28417..7af3f9a734b 100644 --- a/tests/ui/dyn-star/no-implicit-dyn-star.rs +++ b/tests/ui/dyn-star/no-implicit-dyn-star.rs @@ -1,4 +1,4 @@ -// aux-build:dyn-star-foreign.rs +//@ aux-build:dyn-star-foreign.rs extern crate dyn_star_foreign; diff --git a/tests/ui/dyn-star/param-env-region-infer.rs b/tests/ui/dyn-star/param-env-region-infer.rs index 1e331777765..c53861065c7 100644 --- a/tests/ui/dyn-star/param-env-region-infer.rs +++ b/tests/ui/dyn-star/param-env-region-infer.rs @@ -1,5 +1,5 @@ -// revisions: current -// incremental +//@ revisions: current +//@ incremental // FIXME(-Znext-solver): THis currently results in unstable query results: // `normalizes-to(opaque, opaque)` changes from `Maybe(Ambiguous)` to `Maybe(Overflow)` diff --git a/tests/ui/dyn-star/return.rs b/tests/ui/dyn-star/return.rs index fa3d8d7d506..47d95d1d643 100644 --- a/tests/ui/dyn-star/return.rs +++ b/tests/ui/dyn-star/return.rs @@ -1,4 +1,4 @@ -// check-pass +//@ check-pass #![feature(dyn_star)] //~^ WARN the feature `dyn_star` is incomplete and may not be safe to use and/or cause compiler crashes diff --git a/tests/ui/dyn-star/syntax.rs b/tests/ui/dyn-star/syntax.rs index 618c72562b2..d4983404de2 100644 --- a/tests/ui/dyn-star/syntax.rs +++ b/tests/ui/dyn-star/syntax.rs @@ -1,6 +1,6 @@ // Make sure we can parse the `dyn* Trait` syntax // -// check-pass +//@ check-pass #![feature(dyn_star)] #![allow(incomplete_features)] diff --git a/tests/ui/dyn-star/upcast.rs b/tests/ui/dyn-star/upcast.rs index c667ac143a3..e8e89fc5101 100644 --- a/tests/ui/dyn-star/upcast.rs +++ b/tests/ui/dyn-star/upcast.rs @@ -1,4 +1,4 @@ -// known-bug: #104800 +//@ known-bug: #104800 #![feature(dyn_star, trait_upcasting)] diff --git a/tests/ui/dynamically-sized-types/dst-coerce-custom.rs b/tests/ui/dynamically-sized-types/dst-coerce-custom.rs index 24d83eb5343..fdc94d4bb86 100644 --- a/tests/ui/dynamically-sized-types/dst-coerce-custom.rs +++ b/tests/ui/dynamically-sized-types/dst-coerce-custom.rs @@ -1,4 +1,4 @@ -// run-pass +//@ run-pass // Test a very simple custom DST coercion. #![feature(unsize, coerce_unsized)] diff --git a/tests/ui/dynamically-sized-types/dst-coerce-rc.rs b/tests/ui/dynamically-sized-types/dst-coerce-rc.rs index 683fa6850fd..5ec7853a8e8 100644 --- a/tests/ui/dynamically-sized-types/dst-coerce-rc.rs +++ b/tests/ui/dynamically-sized-types/dst-coerce-rc.rs @@ -1,4 +1,4 @@ -// run-pass +//@ run-pass #![allow(unused_variables)] #![allow(stable_features)] // Test a very simple custom DST coercion. diff --git a/tests/ui/dynamically-sized-types/dst-coercions.rs b/tests/ui/dynamically-sized-types/dst-coercions.rs index 1efdf1de0e6..6b3c85cf83b 100644 --- a/tests/ui/dynamically-sized-types/dst-coercions.rs +++ b/tests/ui/dynamically-sized-types/dst-coercions.rs @@ -1,8 +1,8 @@ -// run-pass +//@ run-pass #![allow(unused_variables)] // Test coercions involving DST and/or raw pointers -// pretty-expanded FIXME #23616 +//@ pretty-expanded FIXME #23616 struct S; trait T { fn dummy(&self) { } } //~ WARN method `dummy` is never used diff --git a/tests/ui/dynamically-sized-types/dst-deref-mut.rs b/tests/ui/dynamically-sized-types/dst-deref-mut.rs index 1d62f42bd4a..c2160dbd356 100644 --- a/tests/ui/dynamically-sized-types/dst-deref-mut.rs +++ b/tests/ui/dynamically-sized-types/dst-deref-mut.rs @@ -1,4 +1,4 @@ -// run-pass +//@ run-pass // Test that a custom deref with a fat pointer return type does not ICE diff --git a/tests/ui/dynamically-sized-types/dst-deref.rs b/tests/ui/dynamically-sized-types/dst-deref.rs index 0a350bac14a..0208ce4430e 100644 --- a/tests/ui/dynamically-sized-types/dst-deref.rs +++ b/tests/ui/dynamically-sized-types/dst-deref.rs @@ -1,4 +1,4 @@ -// run-pass +//@ run-pass // Test that a custom deref with a fat pointer return type does not ICE diff --git a/tests/ui/dynamically-sized-types/dst-field-align.rs b/tests/ui/dynamically-sized-types/dst-field-align.rs index 6c338e99912..09c818da63f 100644 --- a/tests/ui/dynamically-sized-types/dst-field-align.rs +++ b/tests/ui/dynamically-sized-types/dst-field-align.rs @@ -1,4 +1,4 @@ -// run-pass +//@ run-pass #![allow(dead_code)] struct Foo { a: u16, diff --git a/tests/ui/dynamically-sized-types/dst-index.rs b/tests/ui/dynamically-sized-types/dst-index.rs index 8aa65bbfdc9..2d209ae090d 100644 --- a/tests/ui/dynamically-sized-types/dst-index.rs +++ b/tests/ui/dynamically-sized-types/dst-index.rs @@ -1,4 +1,4 @@ -// run-pass +//@ run-pass #![allow(unused_variables)] // Test that overloaded index expressions with DST result types // work and don't ICE. diff --git a/tests/ui/dynamically-sized-types/dst-irrefutable-bind.rs b/tests/ui/dynamically-sized-types/dst-irrefutable-bind.rs index 0a6c49111fe..5e352e930d8 100644 --- a/tests/ui/dynamically-sized-types/dst-irrefutable-bind.rs +++ b/tests/ui/dynamically-sized-types/dst-irrefutable-bind.rs @@ -1,4 +1,4 @@ -// run-pass +//@ run-pass #![feature(unsized_tuple_coercion)] struct Test(T); diff --git a/tests/ui/dynamically-sized-types/dst-raw.rs b/tests/ui/dynamically-sized-types/dst-raw.rs index 0893b02e74e..c32ee67dab9 100644 --- a/tests/ui/dynamically-sized-types/dst-raw.rs +++ b/tests/ui/dynamically-sized-types/dst-raw.rs @@ -1,4 +1,4 @@ -// run-pass +//@ run-pass // Test DST raw pointers diff --git a/tests/ui/dynamically-sized-types/dst-struct-sole.rs b/tests/ui/dynamically-sized-types/dst-struct-sole.rs index 6ca07fcf8da..84af98ac8ee 100644 --- a/tests/ui/dynamically-sized-types/dst-struct-sole.rs +++ b/tests/ui/dynamically-sized-types/dst-struct-sole.rs @@ -1,4 +1,4 @@ -// run-pass +//@ run-pass // As dst-struct.rs, but the unsized field is the only field in the struct. diff --git a/tests/ui/dynamically-sized-types/dst-struct.rs b/tests/ui/dynamically-sized-types/dst-struct.rs index 5da9381f837..a1670223bcd 100644 --- a/tests/ui/dynamically-sized-types/dst-struct.rs +++ b/tests/ui/dynamically-sized-types/dst-struct.rs @@ -1,4 +1,4 @@ -// run-pass +//@ run-pass struct Fat { f1: isize, diff --git a/tests/ui/dynamically-sized-types/dst-trait-tuple.rs b/tests/ui/dynamically-sized-types/dst-trait-tuple.rs index c1e45215ad8..6ab8829859b 100644 --- a/tests/ui/dynamically-sized-types/dst-trait-tuple.rs +++ b/tests/ui/dynamically-sized-types/dst-trait-tuple.rs @@ -1,4 +1,4 @@ -// run-pass +//@ run-pass #![allow(type_alias_bounds)] #![allow(unused_features)] diff --git a/tests/ui/dynamically-sized-types/dst-trait.rs b/tests/ui/dynamically-sized-types/dst-trait.rs index 7ac6f03925b..0b6bb7507e9 100644 --- a/tests/ui/dynamically-sized-types/dst-trait.rs +++ b/tests/ui/dynamically-sized-types/dst-trait.rs @@ -1,4 +1,4 @@ -// run-pass +//@ run-pass struct Fat { f1: isize, diff --git a/tests/ui/dynamically-sized-types/dst-tuple-no-reorder.rs b/tests/ui/dynamically-sized-types/dst-tuple-no-reorder.rs index 26b923f431f..ad48d88e480 100644 --- a/tests/ui/dynamically-sized-types/dst-tuple-no-reorder.rs +++ b/tests/ui/dynamically-sized-types/dst-tuple-no-reorder.rs @@ -1,4 +1,4 @@ -// run-pass +//@ run-pass #![feature(unsized_tuple_coercion)] diff --git a/tests/ui/dynamically-sized-types/dst-tuple-sole.rs b/tests/ui/dynamically-sized-types/dst-tuple-sole.rs index 606689da0c2..dc3363b9bde 100644 --- a/tests/ui/dynamically-sized-types/dst-tuple-sole.rs +++ b/tests/ui/dynamically-sized-types/dst-tuple-sole.rs @@ -1,4 +1,4 @@ -// run-pass +//@ run-pass #![allow(stable_features)] #![allow(type_alias_bounds)] diff --git a/tests/ui/dynamically-sized-types/dst-tuple-zst-offsets.rs b/tests/ui/dynamically-sized-types/dst-tuple-zst-offsets.rs index b0cefe77039..b4ee0fb4070 100644 --- a/tests/ui/dynamically-sized-types/dst-tuple-zst-offsets.rs +++ b/tests/ui/dynamically-sized-types/dst-tuple-zst-offsets.rs @@ -1,4 +1,4 @@ -// run-pass +//@ run-pass #![feature(unsized_tuple_coercion)] diff --git a/tests/ui/dynamically-sized-types/dst-tuple.rs b/tests/ui/dynamically-sized-types/dst-tuple.rs index 604ac511290..52fc69f7809 100644 --- a/tests/ui/dynamically-sized-types/dst-tuple.rs +++ b/tests/ui/dynamically-sized-types/dst-tuple.rs @@ -1,4 +1,4 @@ -// run-pass +//@ run-pass #![allow(type_alias_bounds)] #![feature(unsized_tuple_coercion)] diff --git a/tests/ui/early-ret-binop-add.rs b/tests/ui/early-ret-binop-add.rs index 2b5df52a51c..5daf79c214c 100644 --- a/tests/ui/early-ret-binop-add.rs +++ b/tests/ui/early-ret-binop-add.rs @@ -1,8 +1,8 @@ -// run-pass +//@ run-pass #![allow(dead_code)] #![allow(unreachable_code)] -// pretty-expanded FIXME #23616 +//@ pretty-expanded FIXME #23616 use std::ops::Add; diff --git a/tests/ui/editions/auxiliary/edition-imports-2015.rs b/tests/ui/editions/auxiliary/edition-imports-2015.rs index c72331ca2e1..f6fa1b2ff76 100644 --- a/tests/ui/editions/auxiliary/edition-imports-2015.rs +++ b/tests/ui/editions/auxiliary/edition-imports-2015.rs @@ -1,4 +1,4 @@ -// edition:2015 +//@ edition:2015 #[macro_export] macro_rules! gen_imports { () => { diff --git a/tests/ui/editions/auxiliary/edition-imports-2018.rs b/tests/ui/editions/auxiliary/edition-imports-2018.rs index b08dc499a0d..f53a5d72f58 100644 --- a/tests/ui/editions/auxiliary/edition-imports-2018.rs +++ b/tests/ui/editions/auxiliary/edition-imports-2018.rs @@ -1,4 +1,4 @@ -// edition:2018 +//@ edition:2018 #[macro_export] macro_rules! gen_imports { () => { diff --git a/tests/ui/editions/auxiliary/edition-kw-macro-2015.rs b/tests/ui/editions/auxiliary/edition-kw-macro-2015.rs index a4a2b156e13..913cac39d5e 100644 --- a/tests/ui/editions/auxiliary/edition-kw-macro-2015.rs +++ b/tests/ui/editions/auxiliary/edition-kw-macro-2015.rs @@ -1,4 +1,4 @@ -// edition:2015 +//@ edition:2015 #![allow(keyword_idents)] diff --git a/tests/ui/editions/auxiliary/edition-kw-macro-2018.rs b/tests/ui/editions/auxiliary/edition-kw-macro-2018.rs index 02db38103d2..6f2f4479738 100644 --- a/tests/ui/editions/auxiliary/edition-kw-macro-2018.rs +++ b/tests/ui/editions/auxiliary/edition-kw-macro-2018.rs @@ -1,4 +1,4 @@ -// edition:2018 +//@ edition:2018 #![allow(keyword_idents)] diff --git a/tests/ui/editions/dyn-trait-sugg-2021.rs b/tests/ui/editions/dyn-trait-sugg-2021.rs index de0444b63e2..d702bfb2f88 100644 --- a/tests/ui/editions/dyn-trait-sugg-2021.rs +++ b/tests/ui/editions/dyn-trait-sugg-2021.rs @@ -1,4 +1,4 @@ -// edition:2021 +//@ edition:2021 trait Foo {} diff --git a/tests/ui/editions/edition-extern-crate-allowed.rs b/tests/ui/editions/edition-extern-crate-allowed.rs index 8d142cea5de..5e07417e5aa 100644 --- a/tests/ui/editions/edition-extern-crate-allowed.rs +++ b/tests/ui/editions/edition-extern-crate-allowed.rs @@ -1,6 +1,6 @@ -// aux-build:edition-extern-crate-allowed.rs -// edition:2015 -// check-pass +//@ aux-build:edition-extern-crate-allowed.rs +//@ edition:2015 +//@ check-pass #![warn(rust_2018_idioms)] diff --git a/tests/ui/editions/edition-imports-2015.rs b/tests/ui/editions/edition-imports-2015.rs index 5ba45b19dde..5faa78465bc 100644 --- a/tests/ui/editions/edition-imports-2015.rs +++ b/tests/ui/editions/edition-imports-2015.rs @@ -1,7 +1,7 @@ -// edition:2015 -// compile-flags:--extern absolute -// aux-build:edition-imports-2018.rs -// aux-build:absolute.rs +//@ edition:2015 +//@ compile-flags:--extern absolute +//@ aux-build:edition-imports-2018.rs +//@ aux-build:absolute.rs #[macro_use] extern crate edition_imports_2018; diff --git a/tests/ui/editions/edition-imports-2018.rs b/tests/ui/editions/edition-imports-2018.rs index dcdbf0d050b..ad462a0cf82 100644 --- a/tests/ui/editions/edition-imports-2018.rs +++ b/tests/ui/editions/edition-imports-2018.rs @@ -1,5 +1,5 @@ -// edition:2018 -// aux-build:edition-imports-2015.rs +//@ edition:2018 +//@ aux-build:edition-imports-2015.rs #[macro_use] extern crate edition_imports_2015; diff --git a/tests/ui/editions/edition-imports-virtual-2015-ambiguity.rs b/tests/ui/editions/edition-imports-virtual-2015-ambiguity.rs index 3fffb30c612..8b1ee8df1db 100644 --- a/tests/ui/editions/edition-imports-virtual-2015-ambiguity.rs +++ b/tests/ui/editions/edition-imports-virtual-2015-ambiguity.rs @@ -1,7 +1,7 @@ -// check-pass -// edition:2018 -// compile-flags:--extern edition_imports_2015 -// aux-build:edition-imports-2015.rs +//@ check-pass +//@ edition:2018 +//@ compile-flags:--extern edition_imports_2015 +//@ aux-build:edition-imports-2015.rs mod edition_imports_2015 { pub struct Path; diff --git a/tests/ui/editions/edition-imports-virtual-2015-gated.rs b/tests/ui/editions/edition-imports-virtual-2015-gated.rs index 634d3e9a443..d52aeac1322 100644 --- a/tests/ui/editions/edition-imports-virtual-2015-gated.rs +++ b/tests/ui/editions/edition-imports-virtual-2015-gated.rs @@ -1,5 +1,5 @@ -// edition:2018 -// aux-build:edition-imports-2015.rs +//@ edition:2018 +//@ aux-build:edition-imports-2015.rs #[macro_use] extern crate edition_imports_2015; diff --git a/tests/ui/editions/edition-keywords-2015-2015-expansion.rs b/tests/ui/editions/edition-keywords-2015-2015-expansion.rs index b2695bea5c3..a72863e1936 100644 --- a/tests/ui/editions/edition-keywords-2015-2015-expansion.rs +++ b/tests/ui/editions/edition-keywords-2015-2015-expansion.rs @@ -1,6 +1,6 @@ -// edition:2015 -// aux-build:edition-kw-macro-2015.rs -// check-pass +//@ edition:2015 +//@ aux-build:edition-kw-macro-2015.rs +//@ check-pass #![allow(keyword_idents)] diff --git a/tests/ui/editions/edition-keywords-2015-2015-parsing.rs b/tests/ui/editions/edition-keywords-2015-2015-parsing.rs index 3574bc81515..07104bdf217 100644 --- a/tests/ui/editions/edition-keywords-2015-2015-parsing.rs +++ b/tests/ui/editions/edition-keywords-2015-2015-parsing.rs @@ -1,5 +1,5 @@ -// edition:2015 -// aux-build:edition-kw-macro-2015.rs +//@ edition:2015 +//@ aux-build:edition-kw-macro-2015.rs #[macro_use] extern crate edition_kw_macro_2015; diff --git a/tests/ui/editions/edition-keywords-2015-2015.rs b/tests/ui/editions/edition-keywords-2015-2015.rs index 77a2cb2e6de..083767e2f02 100644 --- a/tests/ui/editions/edition-keywords-2015-2015.rs +++ b/tests/ui/editions/edition-keywords-2015-2015.rs @@ -1,10 +1,10 @@ -// run-pass +//@ run-pass #![allow(unused_mut)] #![allow(unused_assignments)] #![allow(unused_variables)] -// edition:2015 -// aux-build:edition-kw-macro-2015.rs +//@ edition:2015 +//@ aux-build:edition-kw-macro-2015.rs #[macro_use] extern crate edition_kw_macro_2015; diff --git a/tests/ui/editions/edition-keywords-2015-2018-expansion.rs b/tests/ui/editions/edition-keywords-2015-2018-expansion.rs index 9f34a3887b7..1478cfdcef8 100644 --- a/tests/ui/editions/edition-keywords-2015-2018-expansion.rs +++ b/tests/ui/editions/edition-keywords-2015-2018-expansion.rs @@ -1,5 +1,5 @@ -// edition:2015 -// aux-build:edition-kw-macro-2018.rs +//@ edition:2015 +//@ aux-build:edition-kw-macro-2018.rs #[macro_use] extern crate edition_kw_macro_2018; diff --git a/tests/ui/editions/edition-keywords-2015-2018-parsing.rs b/tests/ui/editions/edition-keywords-2015-2018-parsing.rs index 49f8562a6b1..3c294f95cd2 100644 --- a/tests/ui/editions/edition-keywords-2015-2018-parsing.rs +++ b/tests/ui/editions/edition-keywords-2015-2018-parsing.rs @@ -1,5 +1,5 @@ -// edition:2015 -// aux-build:edition-kw-macro-2018.rs +//@ edition:2015 +//@ aux-build:edition-kw-macro-2018.rs #[macro_use] extern crate edition_kw_macro_2018; diff --git a/tests/ui/editions/edition-keywords-2015-2018.rs b/tests/ui/editions/edition-keywords-2015-2018.rs index a431a06bd10..26452b53d4b 100644 --- a/tests/ui/editions/edition-keywords-2015-2018.rs +++ b/tests/ui/editions/edition-keywords-2015-2018.rs @@ -1,10 +1,10 @@ -// run-pass +//@ run-pass #![allow(unused_mut)] #![allow(unused_assignments)] #![allow(unused_variables)] -// edition:2015 -// aux-build:edition-kw-macro-2018.rs +//@ edition:2015 +//@ aux-build:edition-kw-macro-2018.rs #[macro_use] extern crate edition_kw_macro_2018; diff --git a/tests/ui/editions/edition-keywords-2018-2015-expansion.rs b/tests/ui/editions/edition-keywords-2018-2015-expansion.rs index 707d8e95c14..9b423003f69 100644 --- a/tests/ui/editions/edition-keywords-2018-2015-expansion.rs +++ b/tests/ui/editions/edition-keywords-2018-2015-expansion.rs @@ -1,6 +1,6 @@ -// edition:2018 -// aux-build:edition-kw-macro-2015.rs -// check-pass +//@ edition:2018 +//@ aux-build:edition-kw-macro-2015.rs +//@ check-pass #![allow(keyword_idents)] diff --git a/tests/ui/editions/edition-keywords-2018-2015-parsing.rs b/tests/ui/editions/edition-keywords-2018-2015-parsing.rs index 8472430361f..59184543274 100644 --- a/tests/ui/editions/edition-keywords-2018-2015-parsing.rs +++ b/tests/ui/editions/edition-keywords-2018-2015-parsing.rs @@ -1,5 +1,5 @@ -// edition:2018 -// aux-build:edition-kw-macro-2015.rs +//@ edition:2018 +//@ aux-build:edition-kw-macro-2015.rs #![feature(async_closure)] diff --git a/tests/ui/editions/edition-keywords-2018-2015.rs b/tests/ui/editions/edition-keywords-2018-2015.rs index 4a02f867172..4bcb501075e 100644 --- a/tests/ui/editions/edition-keywords-2018-2015.rs +++ b/tests/ui/editions/edition-keywords-2018-2015.rs @@ -1,8 +1,8 @@ -// run-pass +//@ run-pass #![allow(unused_assignments)] -// edition:2018 -// aux-build:edition-kw-macro-2015.rs +//@ edition:2018 +//@ aux-build:edition-kw-macro-2015.rs #[macro_use] extern crate edition_kw_macro_2015; diff --git a/tests/ui/editions/edition-keywords-2018-2018-expansion.rs b/tests/ui/editions/edition-keywords-2018-2018-expansion.rs index a8e69fed695..169a0885889 100644 --- a/tests/ui/editions/edition-keywords-2018-2018-expansion.rs +++ b/tests/ui/editions/edition-keywords-2018-2018-expansion.rs @@ -1,5 +1,5 @@ -// edition:2018 -// aux-build:edition-kw-macro-2018.rs +//@ edition:2018 +//@ aux-build:edition-kw-macro-2018.rs #[macro_use] extern crate edition_kw_macro_2018; diff --git a/tests/ui/editions/edition-keywords-2018-2018-parsing.rs b/tests/ui/editions/edition-keywords-2018-2018-parsing.rs index c0d8927d059..e3eed775a5f 100644 --- a/tests/ui/editions/edition-keywords-2018-2018-parsing.rs +++ b/tests/ui/editions/edition-keywords-2018-2018-parsing.rs @@ -1,5 +1,5 @@ -// edition:2018 -// aux-build:edition-kw-macro-2018.rs +//@ edition:2018 +//@ aux-build:edition-kw-macro-2018.rs #![feature(async_closure)] diff --git a/tests/ui/editions/edition-keywords-2018-2018.rs b/tests/ui/editions/edition-keywords-2018-2018.rs index e7294326137..237203d23b5 100644 --- a/tests/ui/editions/edition-keywords-2018-2018.rs +++ b/tests/ui/editions/edition-keywords-2018-2018.rs @@ -1,8 +1,8 @@ -// run-pass +//@ run-pass #![allow(unused_assignments)] -// edition:2018 -// aux-build:edition-kw-macro-2018.rs +//@ edition:2018 +//@ aux-build:edition-kw-macro-2018.rs #[macro_use] extern crate edition_kw_macro_2018; diff --git a/tests/ui/editions/edition-raw-pointer-method-2015.rs b/tests/ui/editions/edition-raw-pointer-method-2015.rs index fcfe493c1a2..b85e70465ab 100644 --- a/tests/ui/editions/edition-raw-pointer-method-2015.rs +++ b/tests/ui/editions/edition-raw-pointer-method-2015.rs @@ -1,4 +1,4 @@ -// edition:2015 +//@ edition:2015 // tests that editions work with the tyvar warning-turned-error diff --git a/tests/ui/editions/edition-raw-pointer-method-2018.rs b/tests/ui/editions/edition-raw-pointer-method-2018.rs index 0bae65a9ae5..b346953e187 100644 --- a/tests/ui/editions/edition-raw-pointer-method-2018.rs +++ b/tests/ui/editions/edition-raw-pointer-method-2018.rs @@ -1,4 +1,4 @@ -// edition:2018 +//@ edition:2018 // tests that editions work with the tyvar warning-turned-error diff --git a/tests/ui/elided-test.rs b/tests/ui/elided-test.rs index b3f4446f189..025b75c1b5c 100644 --- a/tests/ui/elided-test.rs +++ b/tests/ui/elided-test.rs @@ -1,4 +1,4 @@ -// error-pattern: `main` function not found +//@ error-pattern: `main` function not found // Since we're not compiling a test runner this function should be elided // and the build will fail because main doesn't exist diff --git a/tests/ui/else-if.rs b/tests/ui/else-if.rs index 77d8d1abfaf..2161b28c58c 100644 --- a/tests/ui/else-if.rs +++ b/tests/ui/else-if.rs @@ -1,4 +1,4 @@ -// run-pass +//@ run-pass pub fn main() { if 1 == 2 { diff --git a/tests/ui/empty-allocation-non-null.rs b/tests/ui/empty-allocation-non-null.rs index 925bddd5edd..45035a42a5f 100644 --- a/tests/ui/empty-allocation-non-null.rs +++ b/tests/ui/empty-allocation-non-null.rs @@ -1,4 +1,4 @@ -// run-pass +//@ run-pass pub fn main() { assert!(Some(Box::new(())).is_some()); diff --git a/tests/ui/empty-allocation-rvalue-non-null.rs b/tests/ui/empty-allocation-rvalue-non-null.rs index ad0f2203106..25c36679033 100644 --- a/tests/ui/empty-allocation-rvalue-non-null.rs +++ b/tests/ui/empty-allocation-rvalue-non-null.rs @@ -1,7 +1,7 @@ -// run-pass +//@ run-pass #![allow(unused_variables)] -// pretty-expanded FIXME #23616 +//@ pretty-expanded FIXME #23616 pub fn main() { let x: () = *Box::new(()); diff --git a/tests/ui/empty-type-parameter-list.rs b/tests/ui/empty-type-parameter-list.rs index 23d09fbf281..e8d6b2a9964 100644 --- a/tests/ui/empty-type-parameter-list.rs +++ b/tests/ui/empty-type-parameter-list.rs @@ -1,4 +1,4 @@ -// run-pass +//@ run-pass // Test that empty type parameter list (<>) is synonymous with // no type parameters at all diff --git a/tests/ui/empty/empty-macro-use.rs b/tests/ui/empty/empty-macro-use.rs index 846004e661d..8f5ea7df3bd 100644 --- a/tests/ui/empty/empty-macro-use.rs +++ b/tests/ui/empty/empty-macro-use.rs @@ -1,4 +1,4 @@ -// aux-build:two_macros.rs +//@ aux-build:two_macros.rs #[macro_use()] extern crate two_macros; diff --git a/tests/ui/empty/empty-struct-braces-expr.rs b/tests/ui/empty/empty-struct-braces-expr.rs index 2aab3e7772c..c10f76b9219 100644 --- a/tests/ui/empty/empty-struct-braces-expr.rs +++ b/tests/ui/empty/empty-struct-braces-expr.rs @@ -1,6 +1,6 @@ // Can't use empty braced struct as constant or constructor function -// aux-build:empty-struct.rs +//@ aux-build:empty-struct.rs extern crate empty_struct; use empty_struct::*; diff --git a/tests/ui/empty/empty-struct-braces-pat-1.rs b/tests/ui/empty/empty-struct-braces-pat-1.rs index 9bed93f9c15..44fc00e0227 100644 --- a/tests/ui/empty/empty-struct-braces-pat-1.rs +++ b/tests/ui/empty/empty-struct-braces-pat-1.rs @@ -1,6 +1,6 @@ // Can't use empty braced struct as constant pattern -// aux-build:empty-struct.rs +//@ aux-build:empty-struct.rs extern crate empty_struct; use empty_struct::*; diff --git a/tests/ui/empty/empty-struct-braces-pat-2.rs b/tests/ui/empty/empty-struct-braces-pat-2.rs index cfe4641f356..df5a231e268 100644 --- a/tests/ui/empty/empty-struct-braces-pat-2.rs +++ b/tests/ui/empty/empty-struct-braces-pat-2.rs @@ -1,6 +1,6 @@ // Can't use empty braced struct as enum pattern -// aux-build:empty-struct.rs +//@ aux-build:empty-struct.rs extern crate empty_struct; use empty_struct::*; diff --git a/tests/ui/empty/empty-struct-braces-pat-3.rs b/tests/ui/empty/empty-struct-braces-pat-3.rs index 54d547eefcc..3f58cc6d78f 100644 --- a/tests/ui/empty/empty-struct-braces-pat-3.rs +++ b/tests/ui/empty/empty-struct-braces-pat-3.rs @@ -1,6 +1,6 @@ // Can't use empty braced struct as enum pattern -// aux-build:empty-struct.rs +//@ aux-build:empty-struct.rs extern crate empty_struct; use empty_struct::*; diff --git a/tests/ui/empty/empty-struct-tuple-pat.rs b/tests/ui/empty/empty-struct-tuple-pat.rs index 47da8a306a4..56095908fd5 100644 --- a/tests/ui/empty/empty-struct-tuple-pat.rs +++ b/tests/ui/empty/empty-struct-tuple-pat.rs @@ -1,6 +1,6 @@ // Can't use unit struct as enum pattern -// aux-build:empty-struct.rs +//@ aux-build:empty-struct.rs extern crate empty_struct; use empty_struct::*; diff --git a/tests/ui/empty/empty-struct-unit-expr.rs b/tests/ui/empty/empty-struct-unit-expr.rs index 8f3688a2a07..c71ea3bdce7 100644 --- a/tests/ui/empty/empty-struct-unit-expr.rs +++ b/tests/ui/empty/empty-struct-unit-expr.rs @@ -1,6 +1,6 @@ // Can't use unit struct as constructor function -// aux-build:empty-struct.rs +//@ aux-build:empty-struct.rs extern crate empty_struct; use empty_struct::*; diff --git a/tests/ui/empty/empty-struct-unit-pat.rs b/tests/ui/empty/empty-struct-unit-pat.rs index 44a1e9e3d93..901cf90a90a 100644 --- a/tests/ui/empty/empty-struct-unit-pat.rs +++ b/tests/ui/empty/empty-struct-unit-pat.rs @@ -1,6 +1,6 @@ // Can't use unit struct as tuple struct pattern -// aux-build:empty-struct.rs +//@ aux-build:empty-struct.rs extern crate empty_struct; use empty_struct::*; diff --git a/tests/ui/empty/issue-37026.rs b/tests/ui/empty/issue-37026.rs index fd678a717d0..2b9dfdcb0f1 100644 --- a/tests/ui/empty/issue-37026.rs +++ b/tests/ui/empty/issue-37026.rs @@ -1,4 +1,4 @@ -// aux-build:empty-struct.rs +//@ aux-build:empty-struct.rs extern crate empty_struct; diff --git a/tests/ui/empty/no-link.rs b/tests/ui/empty/no-link.rs index c80e61b4511..9f78714b769 100644 --- a/tests/ui/empty/no-link.rs +++ b/tests/ui/empty/no-link.rs @@ -1,5 +1,5 @@ -// check-pass -// aux-build:empty-struct.rs +//@ check-pass +//@ aux-build:empty-struct.rs #[no_link] extern crate empty_struct; diff --git a/tests/ui/empty_global_asm.rs b/tests/ui/empty_global_asm.rs index af13762d118..2517796ad10 100644 --- a/tests/ui/empty_global_asm.rs +++ b/tests/ui/empty_global_asm.rs @@ -1,5 +1,5 @@ -// needs-asm-support -// run-pass +//@ needs-asm-support +//@ run-pass use std::arch::global_asm; diff --git a/tests/ui/entry-point/imported_main_from_extern_crate.rs b/tests/ui/entry-point/imported_main_from_extern_crate.rs index 4fddfc44ac6..abcf2cbc05b 100644 --- a/tests/ui/entry-point/imported_main_from_extern_crate.rs +++ b/tests/ui/entry-point/imported_main_from_extern_crate.rs @@ -1,5 +1,5 @@ -// run-pass -// aux-build:main_functions.rs +//@ run-pass +//@ aux-build:main_functions.rs #![feature(imported_main)] diff --git a/tests/ui/entry-point/imported_main_from_extern_crate_wrong_type.rs b/tests/ui/entry-point/imported_main_from_extern_crate_wrong_type.rs index 0a115dd3b08..82d81a93d9d 100644 --- a/tests/ui/entry-point/imported_main_from_extern_crate_wrong_type.rs +++ b/tests/ui/entry-point/imported_main_from_extern_crate_wrong_type.rs @@ -1,4 +1,4 @@ -// aux-build:bad_main_functions.rs +//@ aux-build:bad_main_functions.rs #![feature(imported_main)] diff --git a/tests/ui/entry-point/imported_main_from_inner_mod.rs b/tests/ui/entry-point/imported_main_from_inner_mod.rs index 45750072a7f..7212dd6182c 100644 --- a/tests/ui/entry-point/imported_main_from_inner_mod.rs +++ b/tests/ui/entry-point/imported_main_from_inner_mod.rs @@ -1,4 +1,4 @@ -// run-pass +//@ run-pass #![feature(imported_main)] pub mod foo { diff --git a/tests/ui/entry-point/imported_main_unused_not_trigger_feature_gate.rs b/tests/ui/entry-point/imported_main_unused_not_trigger_feature_gate.rs index 4762fbb7c59..d0505aed865 100644 --- a/tests/ui/entry-point/imported_main_unused_not_trigger_feature_gate.rs +++ b/tests/ui/entry-point/imported_main_unused_not_trigger_feature_gate.rs @@ -1,4 +1,4 @@ -// check-pass +//@ check-pass #![feature(rustc_attrs)] #[rustc_main] diff --git a/tests/ui/enum-discriminant/actually_not_an_enum-discriminant.rs b/tests/ui/enum-discriminant/actually_not_an_enum-discriminant.rs index 6a566ab3a3d..392cc6acdcb 100644 --- a/tests/ui/enum-discriminant/actually_not_an_enum-discriminant.rs +++ b/tests/ui/enum-discriminant/actually_not_an_enum-discriminant.rs @@ -1,4 +1,4 @@ -// run-pass +//@ run-pass #![feature(core_intrinsics)] use std::intrinsics::discriminant_value; diff --git a/tests/ui/enum-discriminant/arbitrary_enum_discriminant.rs b/tests/ui/enum-discriminant/arbitrary_enum_discriminant.rs index 83e74a6e685..effb66d1f53 100644 --- a/tests/ui/enum-discriminant/arbitrary_enum_discriminant.rs +++ b/tests/ui/enum-discriminant/arbitrary_enum_discriminant.rs @@ -1,4 +1,4 @@ -// run-pass +//@ run-pass #![feature(test)] extern crate test; diff --git a/tests/ui/enum-discriminant/discr-foreign.rs b/tests/ui/enum-discriminant/discr-foreign.rs index e7123b34452..778d92fec2a 100644 --- a/tests/ui/enum-discriminant/discr-foreign.rs +++ b/tests/ui/enum-discriminant/discr-foreign.rs @@ -1,5 +1,5 @@ -// aux-build:discr-foreign-dep.rs -// build-pass +//@ aux-build:discr-foreign-dep.rs +//@ build-pass extern crate discr_foreign_dep; diff --git a/tests/ui/enum-discriminant/discriminant_size.rs b/tests/ui/enum-discriminant/discriminant_size.rs index b939a70dfc5..a3ec1b28e5c 100644 --- a/tests/ui/enum-discriminant/discriminant_size.rs +++ b/tests/ui/enum-discriminant/discriminant_size.rs @@ -1,4 +1,4 @@ -// run-pass +//@ run-pass #![feature(core_intrinsics, repr128)] //~^ WARN the feature `repr128` is incomplete diff --git a/tests/ui/enum-discriminant/discriminant_value-wrapper.rs b/tests/ui/enum-discriminant/discriminant_value-wrapper.rs index 1f6bb0cdc3a..d481ebafece 100644 --- a/tests/ui/enum-discriminant/discriminant_value-wrapper.rs +++ b/tests/ui/enum-discriminant/discriminant_value-wrapper.rs @@ -1,4 +1,4 @@ -// run-pass +//@ run-pass #![allow(enum_intrinsics_non_enums)] diff --git a/tests/ui/enum-discriminant/discriminant_value.rs b/tests/ui/enum-discriminant/discriminant_value.rs index 2864cd40da0..0d6b9166c26 100644 --- a/tests/ui/enum-discriminant/discriminant_value.rs +++ b/tests/ui/enum-discriminant/discriminant_value.rs @@ -1,4 +1,4 @@ -// run-pass +//@ run-pass #![allow(stable_features)] #![feature(core, core_intrinsics)] diff --git a/tests/ui/enum-discriminant/get_discr.rs b/tests/ui/enum-discriminant/get_discr.rs index 71eea4e0f78..d7d11274de4 100644 --- a/tests/ui/enum-discriminant/get_discr.rs +++ b/tests/ui/enum-discriminant/get_discr.rs @@ -1,4 +1,4 @@ -// run-pass +//@ run-pass // Now that there are several variations on the code generated in // `codegen_get_discr`, let's make sure the various cases yield the correct diff --git a/tests/ui/enum-discriminant/issue-104519.rs b/tests/ui/enum-discriminant/issue-104519.rs index 507c0988fcc..531eb680a4f 100644 --- a/tests/ui/enum-discriminant/issue-104519.rs +++ b/tests/ui/enum-discriminant/issue-104519.rs @@ -1,4 +1,4 @@ -// run-pass +//@ run-pass #![allow(dead_code)] enum OpenResult { diff --git a/tests/ui/enum-discriminant/issue-41394-rpass.rs b/tests/ui/enum-discriminant/issue-41394-rpass.rs index 37c6525234d..79dca59cd74 100644 --- a/tests/ui/enum-discriminant/issue-41394-rpass.rs +++ b/tests/ui/enum-discriminant/issue-41394-rpass.rs @@ -1,5 +1,5 @@ -// run-pass -// aux-build:issue-41394.rs +//@ run-pass +//@ aux-build:issue-41394.rs extern crate issue_41394 as lib; diff --git a/tests/ui/enum-discriminant/issue-43398.rs b/tests/ui/enum-discriminant/issue-43398.rs index 581db033f92..574a4b3ad5a 100644 --- a/tests/ui/enum-discriminant/issue-43398.rs +++ b/tests/ui/enum-discriminant/issue-43398.rs @@ -1,4 +1,4 @@ -// run-pass +//@ run-pass #![feature(core_intrinsics)] #![feature(repr128)] diff --git a/tests/ui/enum-discriminant/issue-46519.rs b/tests/ui/enum-discriminant/issue-46519.rs index 0567923b7fc..e5f0138c95c 100644 --- a/tests/ui/enum-discriminant/issue-46519.rs +++ b/tests/ui/enum-discriminant/issue-46519.rs @@ -1,7 +1,7 @@ -// run-pass -// compile-flags:--test -O +//@ run-pass +//@ compile-flags:--test -O -// needs-unwind +//@ needs-unwind #[test] #[should_panic(expected = "creating inhabited type")] diff --git a/tests/ui/enum-discriminant/issue-50689.rs b/tests/ui/enum-discriminant/issue-50689.rs index b49f2950020..e92d726be45 100644 --- a/tests/ui/enum-discriminant/issue-50689.rs +++ b/tests/ui/enum-discriminant/issue-50689.rs @@ -1,4 +1,4 @@ -// run-pass +//@ run-pass #![allow(unused_variables)] enum Foo { Bar = (|x: i32| { }, 42).1, diff --git a/tests/ui/enum-discriminant/issue-51582.rs b/tests/ui/enum-discriminant/issue-51582.rs index 40a70c623a7..bad165bf390 100644 --- a/tests/ui/enum-discriminant/issue-51582.rs +++ b/tests/ui/enum-discriminant/issue-51582.rs @@ -1,4 +1,4 @@ -// run-pass +//@ run-pass #![feature(core_intrinsics)] #[repr(i8)] diff --git a/tests/ui/enum-discriminant/issue-61696.rs b/tests/ui/enum-discriminant/issue-61696.rs index 8a633a916c8..d200b4410ff 100644 --- a/tests/ui/enum-discriminant/issue-61696.rs +++ b/tests/ui/enum-discriminant/issue-61696.rs @@ -1,4 +1,4 @@ -// run-pass +//@ run-pass pub enum Infallible {} diff --git a/tests/ui/enum-discriminant/issue-70509-partial_eq.rs b/tests/ui/enum-discriminant/issue-70509-partial_eq.rs index 3adac7b7262..e98532c1207 100644 --- a/tests/ui/enum-discriminant/issue-70509-partial_eq.rs +++ b/tests/ui/enum-discriminant/issue-70509-partial_eq.rs @@ -1,4 +1,4 @@ -// run-pass +//@ run-pass #![feature(repr128)] //~^ WARN the feature `repr128` is incomplete diff --git a/tests/ui/enum-discriminant/issue-90038.rs b/tests/ui/enum-discriminant/issue-90038.rs index 5e98eccd9b5..f75f1456fbb 100644 --- a/tests/ui/enum-discriminant/issue-90038.rs +++ b/tests/ui/enum-discriminant/issue-90038.rs @@ -1,4 +1,4 @@ -// run-pass +//@ run-pass #[repr(u32)] pub enum Foo { diff --git a/tests/ui/enum-discriminant/niche-prefer-zero.rs b/tests/ui/enum-discriminant/niche-prefer-zero.rs index f20607a8903..b1e2b1948f7 100644 --- a/tests/ui/enum-discriminant/niche-prefer-zero.rs +++ b/tests/ui/enum-discriminant/niche-prefer-zero.rs @@ -1,6 +1,6 @@ // Check that niche selection prefers zero. // See https://github.com/rust-lang/rust/pull/87794 -// run-pass +//@ run-pass #[repr(u8)] pub enum Size { One = 1, diff --git a/tests/ui/enum-discriminant/niche.rs b/tests/ui/enum-discriminant/niche.rs index 8d30610504f..15d227fd826 100644 --- a/tests/ui/enum-discriminant/niche.rs +++ b/tests/ui/enum-discriminant/niche.rs @@ -1,4 +1,4 @@ -// run-pass +//@ run-pass //! Make sure that we read and write enum discriminants correctly for corner cases caused //! by layout optimizations. diff --git a/tests/ui/enum-discriminant/repr128.rs b/tests/ui/enum-discriminant/repr128.rs index 00021a07b37..075ff7a7676 100644 --- a/tests/ui/enum-discriminant/repr128.rs +++ b/tests/ui/enum-discriminant/repr128.rs @@ -1,4 +1,4 @@ -// run-pass +//@ run-pass #![feature(repr128, core_intrinsics, discriminant_kind)] //~^ WARN the feature `repr128` is incomplete diff --git a/tests/ui/enum/enum-size-variance.rs b/tests/ui/enum/enum-size-variance.rs index 082bd0dcfb2..28b7fa9f746 100644 --- a/tests/ui/enum/enum-size-variance.rs +++ b/tests/ui/enum/enum-size-variance.rs @@ -1,4 +1,4 @@ -// run-pass +//@ run-pass #![warn(variant_size_differences)] #![allow(dead_code)] diff --git a/tests/ui/enum/issue-1821.rs b/tests/ui/enum/issue-1821.rs index 76ee9c3edb0..76d60962c38 100644 --- a/tests/ui/enum/issue-1821.rs +++ b/tests/ui/enum/issue-1821.rs @@ -1,11 +1,11 @@ -// check-pass +//@ check-pass #![allow(dead_code)] #![allow(non_camel_case_types)] // Issue #1821 - Don't recurse trying to typecheck this -// pretty-expanded FIXME #23616 +//@ pretty-expanded FIXME #23616 enum t { foo(Vec) diff --git a/tests/ui/enum/issue-42747.rs b/tests/ui/enum/issue-42747.rs index fec65878210..976a7f0a68c 100644 --- a/tests/ui/enum/issue-42747.rs +++ b/tests/ui/enum/issue-42747.rs @@ -1,4 +1,4 @@ -// run-pass +//@ run-pass macro_rules! fooN { ($cur:ident $prev:ty) => { #[allow(dead_code)] diff --git a/tests/ui/enum/union-in-enum.rs b/tests/ui/enum/union-in-enum.rs index 048913e25cd..90feadf0a88 100644 --- a/tests/ui/enum/union-in-enum.rs +++ b/tests/ui/enum/union-in-enum.rs @@ -5,7 +5,7 @@ #![allow(warnings)] -// check-pass +//@ check-pass enum A { union } enum B { union {} } diff --git a/tests/ui/env-args-reverse-iterator.rs b/tests/ui/env-args-reverse-iterator.rs index 7f06718c038..4971d2b30e7 100644 --- a/tests/ui/env-args-reverse-iterator.rs +++ b/tests/ui/env-args-reverse-iterator.rs @@ -1,6 +1,6 @@ -// run-pass -// ignore-emscripten no processes -// ignore-sgx no processes +//@ run-pass +//@ ignore-emscripten no processes +//@ ignore-sgx no processes use std::env::args; use std::process::Command; diff --git a/tests/ui/env-funky-keys.rs b/tests/ui/env-funky-keys.rs index 46e20d8c61f..ac6da1fefae 100644 --- a/tests/ui/env-funky-keys.rs +++ b/tests/ui/env-funky-keys.rs @@ -1,13 +1,13 @@ -// run-pass +//@ run-pass // Ignore this test on Android, because it segfaults there. -// ignore-android -// ignore-windows -// ignore-emscripten no execve -// ignore-sgx no execve -// ignore-vxworks no execve -// ignore-fuchsia no 'execve' -// no-prefer-dynamic +//@ ignore-android +//@ ignore-windows +//@ ignore-emscripten no execve +//@ ignore-sgx no execve +//@ ignore-vxworks no execve +//@ ignore-fuchsia no 'execve' +//@ no-prefer-dynamic #![feature(rustc_private)] diff --git a/tests/ui/env-null-vars.rs b/tests/ui/env-null-vars.rs index 10582a8a514..55fe8ac25ca 100644 --- a/tests/ui/env-null-vars.rs +++ b/tests/ui/env-null-vars.rs @@ -1,9 +1,9 @@ -// run-pass +//@ run-pass #![allow(unused_imports)] -// ignore-windows -// ignore-wasm32-bare no libc to test ffi with +//@ ignore-windows +//@ ignore-wasm32-bare no libc to test ffi with // issue-53200 diff --git a/tests/ui/env-vars.rs b/tests/ui/env-vars.rs index f5035bb2c69..5ca1b80f235 100644 --- a/tests/ui/env-vars.rs +++ b/tests/ui/env-vars.rs @@ -1,5 +1,5 @@ -// run-pass -// ignore-wasm32-bare no env vars +//@ run-pass +//@ ignore-wasm32-bare no env vars use std::env::*; diff --git a/tests/ui/error-codes/E0010-teach.rs b/tests/ui/error-codes/E0010-teach.rs index 798fcda2a10..146e68df14a 100644 --- a/tests/ui/error-codes/E0010-teach.rs +++ b/tests/ui/error-codes/E0010-teach.rs @@ -1,4 +1,4 @@ -// compile-flags: -Z teach +//@ compile-flags: -Z teach #![allow(warnings)] diff --git a/tests/ui/error-codes/E0026-teach.rs b/tests/ui/error-codes/E0026-teach.rs index 7c51004ffe4..9a6ba2605a7 100644 --- a/tests/ui/error-codes/E0026-teach.rs +++ b/tests/ui/error-codes/E0026-teach.rs @@ -1,4 +1,4 @@ -// compile-flags: -Z teach +//@ compile-flags: -Z teach struct Thing { x: u32, diff --git a/tests/ui/error-codes/E0029-teach.rs b/tests/ui/error-codes/E0029-teach.rs index 3ff8cb348e7..d70ba7a99c5 100644 --- a/tests/ui/error-codes/E0029-teach.rs +++ b/tests/ui/error-codes/E0029-teach.rs @@ -1,4 +1,4 @@ -// compile-flags: -Z teach +//@ compile-flags: -Z teach fn main() { let s = "hoho"; diff --git a/tests/ui/error-codes/E0030-teach.rs b/tests/ui/error-codes/E0030-teach.rs index 388064fb0fa..e1f887139e3 100644 --- a/tests/ui/error-codes/E0030-teach.rs +++ b/tests/ui/error-codes/E0030-teach.rs @@ -1,4 +1,4 @@ -// compile-flags: -Z teach +//@ compile-flags: -Z teach fn main() { match 5u32 { diff --git a/tests/ui/error-codes/E0033-teach.rs b/tests/ui/error-codes/E0033-teach.rs index 289561bad8a..0a7188881f6 100644 --- a/tests/ui/error-codes/E0033-teach.rs +++ b/tests/ui/error-codes/E0033-teach.rs @@ -1,4 +1,4 @@ -// compile-flags: -Z teach +//@ compile-flags: -Z teach trait SomeTrait { fn foo(&self); } diff --git a/tests/ui/error-codes/E0040.fixed b/tests/ui/error-codes/E0040.fixed index 139dc8f9496..22943599804 100644 --- a/tests/ui/error-codes/E0040.fixed +++ b/tests/ui/error-codes/E0040.fixed @@ -1,4 +1,4 @@ -// run-rustfix +//@ run-rustfix struct Foo { x: i32, } diff --git a/tests/ui/error-codes/E0040.rs b/tests/ui/error-codes/E0040.rs index 9ffc42d0c78..ac2ca3770f0 100644 --- a/tests/ui/error-codes/E0040.rs +++ b/tests/ui/error-codes/E0040.rs @@ -1,4 +1,4 @@ -// run-rustfix +//@ run-rustfix struct Foo { x: i32, } diff --git a/tests/ui/error-codes/E0152.rs b/tests/ui/error-codes/E0152.rs index ee8e5e6dffe..d56d4e710a4 100644 --- a/tests/ui/error-codes/E0152.rs +++ b/tests/ui/error-codes/E0152.rs @@ -1,4 +1,4 @@ -// normalize-stderr-test "loaded from .*liballoc-.*.rlib" -> "loaded from SYSROOT/liballoc-*.rlib" +//@ normalize-stderr-test "loaded from .*liballoc-.*.rlib" -> "loaded from SYSROOT/liballoc-*.rlib" #![feature(lang_items)] #[lang = "owned_box"] diff --git a/tests/ui/error-codes/E0161.rs b/tests/ui/error-codes/E0161.rs index c906e3c352d..3a9b93d2430 100644 --- a/tests/ui/error-codes/E0161.rs +++ b/tests/ui/error-codes/E0161.rs @@ -1,9 +1,9 @@ // Check that E0161 is a hard error in all possible configurations that might // affect it. -// revisions: base ul -//[base] check-fail -//[ul] check-pass +//@ revisions: base ul +//@[base] check-fail +//@[ul] check-pass #![allow(incomplete_features)] #![cfg_attr(ul, feature(unsized_locals))] diff --git a/tests/ui/error-codes/E0275.rs b/tests/ui/error-codes/E0275.rs index 95d7f85f105..889d9d8be90 100644 --- a/tests/ui/error-codes/E0275.rs +++ b/tests/ui/error-codes/E0275.rs @@ -1,4 +1,4 @@ -// normalize-stderr-test: "long-type-\d+" -> "long-type-hash" +//@ normalize-stderr-test: "long-type-\d+" -> "long-type-hash" trait Foo {} struct Bar(T); diff --git a/tests/ui/error-codes/E0311.fixed b/tests/ui/error-codes/E0311.fixed index 09ceecd0666..fd828f39a97 100644 --- a/tests/ui/error-codes/E0311.fixed +++ b/tests/ui/error-codes/E0311.fixed @@ -1,4 +1,4 @@ -// run-rustfix +//@ run-rustfix #![allow(warnings)] diff --git a/tests/ui/error-codes/E0311.rs b/tests/ui/error-codes/E0311.rs index 99e454f4d75..8d3ad0dd5e5 100644 --- a/tests/ui/error-codes/E0311.rs +++ b/tests/ui/error-codes/E0311.rs @@ -1,4 +1,4 @@ -// run-rustfix +//@ run-rustfix #![allow(warnings)] diff --git a/tests/ui/error-codes/E0435.fixed b/tests/ui/error-codes/E0435.fixed index fdf896d2dbb..74206293433 100644 --- a/tests/ui/error-codes/E0435.fixed +++ b/tests/ui/error-codes/E0435.fixed @@ -1,4 +1,4 @@ -// run-rustfix +//@ run-rustfix fn main () { #[allow(non_upper_case_globals)] const foo: usize = 42; diff --git a/tests/ui/error-codes/E0435.rs b/tests/ui/error-codes/E0435.rs index d9354efb8fd..f370b2d7cc2 100644 --- a/tests/ui/error-codes/E0435.rs +++ b/tests/ui/error-codes/E0435.rs @@ -1,4 +1,4 @@ -// run-rustfix +//@ run-rustfix fn main () { #[allow(non_upper_case_globals)] let foo: usize = 42; diff --git a/tests/ui/error-codes/E0462.rs b/tests/ui/error-codes/E0462.rs index f839ee783b5..2dd3b16394d 100644 --- a/tests/ui/error-codes/E0462.rs +++ b/tests/ui/error-codes/E0462.rs @@ -1,8 +1,8 @@ -// aux-build:found-staticlib.rs +//@ aux-build:found-staticlib.rs -// normalize-stderr-test: "\.nll/" -> "/" -// normalize-stderr-test: "\\\?\\" -> "" -// normalize-stderr-test: "(lib)?found_staticlib\.[a-z]+" -> "libfound_staticlib.somelib" +//@ normalize-stderr-test: "\.nll/" -> "/" +//@ normalize-stderr-test: "\\\?\\" -> "" +//@ normalize-stderr-test: "(lib)?found_staticlib\.[a-z]+" -> "libfound_staticlib.somelib" extern crate found_staticlib; //~ ERROR E0462 diff --git a/tests/ui/error-codes/E0464.rs b/tests/ui/error-codes/E0464.rs index 47717fbd508..4ecf21996cc 100644 --- a/tests/ui/error-codes/E0464.rs +++ b/tests/ui/error-codes/E0464.rs @@ -1,10 +1,10 @@ -// aux-build:crateresolve1-1.rs -// aux-build:crateresolve1-2.rs -// aux-build:crateresolve1-3.rs +//@ aux-build:crateresolve1-1.rs +//@ aux-build:crateresolve1-2.rs +//@ aux-build:crateresolve1-3.rs -// normalize-stderr-test: "\.nll/" -> "/" -// normalize-stderr-test: "\\\?\\" -> "" -// normalize-stderr-test: "(lib)?crateresolve1-([123])\.[a-z]+" -> "libcrateresolve1-$2.somelib" +//@ normalize-stderr-test: "\.nll/" -> "/" +//@ normalize-stderr-test: "\\\?\\" -> "" +//@ normalize-stderr-test: "(lib)?crateresolve1-([123])\.[a-z]+" -> "libcrateresolve1-$2.somelib" // NOTE: This test is duplicated from `tests/ui/crate-loading/crateresolve1.rs`. diff --git a/tests/ui/error-codes/E0476.rs b/tests/ui/error-codes/E0476.rs index d87916198c5..03656d28b2b 100644 --- a/tests/ui/error-codes/E0476.rs +++ b/tests/ui/error-codes/E0476.rs @@ -1,5 +1,5 @@ -// revisions: old next -//[next] compile-flags: -Znext-solver=coherence +//@ revisions: old next +//@[next] compile-flags: -Znext-solver=coherence #![feature(coerce_unsized)] #![feature(unsize)] diff --git a/tests/ui/error-codes/E0511.rs b/tests/ui/error-codes/E0511.rs index a52f81a6c5d..8c79bcf5a67 100644 --- a/tests/ui/error-codes/E0511.rs +++ b/tests/ui/error-codes/E0511.rs @@ -1,4 +1,4 @@ -// build-fail +//@ build-fail #![feature(platform_intrinsics)] diff --git a/tests/ui/error-codes/E0519.rs b/tests/ui/error-codes/E0519.rs index 269ffd6320d..5d38b0459e4 100644 --- a/tests/ui/error-codes/E0519.rs +++ b/tests/ui/error-codes/E0519.rs @@ -1,5 +1,5 @@ // no need to create a new aux file, we can use an existing. -// aux-build: crateresolve1-1.rs +//@ aux-build: crateresolve1-1.rs // set same metadata as `crateresolve1` #![crate_name = "crateresolve1"] diff --git a/tests/ui/error-codes/E0523.rs b/tests/ui/error-codes/E0523.rs index 47717fbd508..4ecf21996cc 100644 --- a/tests/ui/error-codes/E0523.rs +++ b/tests/ui/error-codes/E0523.rs @@ -1,10 +1,10 @@ -// aux-build:crateresolve1-1.rs -// aux-build:crateresolve1-2.rs -// aux-build:crateresolve1-3.rs +//@ aux-build:crateresolve1-1.rs +//@ aux-build:crateresolve1-2.rs +//@ aux-build:crateresolve1-3.rs -// normalize-stderr-test: "\.nll/" -> "/" -// normalize-stderr-test: "\\\?\\" -> "" -// normalize-stderr-test: "(lib)?crateresolve1-([123])\.[a-z]+" -> "libcrateresolve1-$2.somelib" +//@ normalize-stderr-test: "\.nll/" -> "/" +//@ normalize-stderr-test: "\\\?\\" -> "" +//@ normalize-stderr-test: "(lib)?crateresolve1-([123])\.[a-z]+" -> "libcrateresolve1-$2.somelib" // NOTE: This test is duplicated from `tests/ui/crate-loading/crateresolve1.rs`. diff --git a/tests/ui/error-codes/E0602.rs b/tests/ui/error-codes/E0602.rs index 77d28838a10..1849fd2d895 100644 --- a/tests/ui/error-codes/E0602.rs +++ b/tests/ui/error-codes/E0602.rs @@ -1,8 +1,8 @@ -// compile-flags:-D bogus -// check-pass +//@ compile-flags:-D bogus +//@ check-pass -// error-pattern:E0602 -// error-pattern:requested on the command line with `-D bogus` -// error-pattern:`#[warn(unknown_lints)]` on by default +//@ error-pattern:E0602 +//@ error-pattern:requested on the command line with `-D bogus` +//@ error-pattern:`#[warn(unknown_lints)]` on by default fn main() {} diff --git a/tests/ui/error-codes/E0642.fixed b/tests/ui/error-codes/E0642.fixed index fc6255e0274..1b7e0684254 100644 --- a/tests/ui/error-codes/E0642.fixed +++ b/tests/ui/error-codes/E0642.fixed @@ -1,4 +1,4 @@ -// run-rustfix +//@ run-rustfix #![allow(unused)] // for rustfix diff --git a/tests/ui/error-codes/E0642.rs b/tests/ui/error-codes/E0642.rs index 5f85f3935e1..ceac2357408 100644 --- a/tests/ui/error-codes/E0642.rs +++ b/tests/ui/error-codes/E0642.rs @@ -1,4 +1,4 @@ -// run-rustfix +//@ run-rustfix #![allow(unused)] // for rustfix diff --git a/tests/ui/error-codes/E0789.rs b/tests/ui/error-codes/E0789.rs index c0cbbcc9d2d..3acc983edc4 100644 --- a/tests/ui/error-codes/E0789.rs +++ b/tests/ui/error-codes/E0789.rs @@ -1,4 +1,4 @@ -// compile-flags: --crate-type lib +//@ compile-flags: --crate-type lib #![feature(rustc_attrs)] #![feature(staged_api)] diff --git a/tests/ui/error-codes/auxiliary/crateresolve1-1.rs b/tests/ui/error-codes/auxiliary/crateresolve1-1.rs index bd9c8483ec2..6649ffd7a2d 100644 --- a/tests/ui/error-codes/auxiliary/crateresolve1-1.rs +++ b/tests/ui/error-codes/auxiliary/crateresolve1-1.rs @@ -1,5 +1,5 @@ -// compile-flags:-C extra-filename=-1 -// no-prefer-dynamic +//@ compile-flags:-C extra-filename=-1 +//@ no-prefer-dynamic #![crate_name = "crateresolve1"] #![crate_type = "lib"] diff --git a/tests/ui/error-codes/auxiliary/crateresolve1-2.rs b/tests/ui/error-codes/auxiliary/crateresolve1-2.rs index bd0f08f45b6..63327c77668 100644 --- a/tests/ui/error-codes/auxiliary/crateresolve1-2.rs +++ b/tests/ui/error-codes/auxiliary/crateresolve1-2.rs @@ -1,5 +1,5 @@ -// compile-flags:-C extra-filename=-2 -// no-prefer-dynamic +//@ compile-flags:-C extra-filename=-2 +//@ no-prefer-dynamic #![crate_name = "crateresolve1"] #![crate_type = "lib"] diff --git a/tests/ui/error-codes/auxiliary/crateresolve1-3.rs b/tests/ui/error-codes/auxiliary/crateresolve1-3.rs index 1226c2fbb46..59ed1836990 100644 --- a/tests/ui/error-codes/auxiliary/crateresolve1-3.rs +++ b/tests/ui/error-codes/auxiliary/crateresolve1-3.rs @@ -1,5 +1,5 @@ -// compile-flags:-C extra-filename=-3 -// no-prefer-dynamic +//@ compile-flags:-C extra-filename=-3 +//@ no-prefer-dynamic #![crate_name = "crateresolve1"] #![crate_type = "lib"] diff --git a/tests/ui/error-codes/auxiliary/found-staticlib.rs b/tests/ui/error-codes/auxiliary/found-staticlib.rs index 04e2c59789d..05a3d011b67 100644 --- a/tests/ui/error-codes/auxiliary/found-staticlib.rs +++ b/tests/ui/error-codes/auxiliary/found-staticlib.rs @@ -1,4 +1,4 @@ -// no-prefer-dynamic +//@ no-prefer-dynamic #![crate_type = "staticlib"] pub fn foo() {} diff --git a/tests/ui/error-codes/e0119/complex-impl.rs b/tests/ui/error-codes/e0119/complex-impl.rs index 9149e4ce58e..8e46044d0ae 100644 --- a/tests/ui/error-codes/e0119/complex-impl.rs +++ b/tests/ui/error-codes/e0119/complex-impl.rs @@ -1,4 +1,4 @@ -// aux-build:complex_impl_support.rs +//@ aux-build:complex_impl_support.rs extern crate complex_impl_support; diff --git a/tests/ui/error-codes/e0119/issue-23563.rs b/tests/ui/error-codes/e0119/issue-23563.rs index f578560c552..7fbc7a5ad59 100644 --- a/tests/ui/error-codes/e0119/issue-23563.rs +++ b/tests/ui/error-codes/e0119/issue-23563.rs @@ -1,4 +1,4 @@ -// aux-build:issue-23563-a.rs +//@ aux-build:issue-23563-a.rs // Ref: https://github.com/rust-lang/rust/issues/23563#issuecomment-260751672 diff --git a/tests/ui/error-emitter/highlighting.rs b/tests/ui/error-emitter/highlighting.rs index fd61b2b05ff..34da2fe6b81 100644 --- a/tests/ui/error-emitter/highlighting.rs +++ b/tests/ui/error-emitter/highlighting.rs @@ -1,12 +1,12 @@ // Make sure "highlighted" code is colored purple -// compile-flags: --error-format=human --color=always -// error-pattern:for<'a>  -// edition:2018 +//@ compile-flags: --error-format=human --color=always +//@ error-pattern:for<'a>  +//@ edition:2018 -// revisions: windows not-windows -// [windows]only-windows -// [not-windows]ignore-windows +//@ revisions: windows not-windows +//@ [windows]only-windows +//@ [not-windows]ignore-windows use core::pin::Pin; use core::future::Future; diff --git a/tests/ui/error-emitter/multiline-multipart-suggestion.rs b/tests/ui/error-emitter/multiline-multipart-suggestion.rs index a06399c3458..fac8f34f59f 100644 --- a/tests/ui/error-emitter/multiline-multipart-suggestion.rs +++ b/tests/ui/error-emitter/multiline-multipart-suggestion.rs @@ -1,9 +1,9 @@ -// compile-flags: --error-format=human --color=always -// error-pattern: missing lifetime specifier +//@ compile-flags: --error-format=human --color=always +//@ error-pattern: missing lifetime specifier -// revisions: windows not-windows -// [windows]only-windows -// [not-windows]ignore-windows +//@ revisions: windows not-windows +//@ [windows]only-windows +//@ [not-windows]ignore-windows fn short(foo_bar: &Vec<&i32>) -> &i32 { &12 diff --git a/tests/ui/errors/auxiliary/remapped_dep.rs b/tests/ui/errors/auxiliary/remapped_dep.rs index f9bb7bf8987..36d4699a306 100644 --- a/tests/ui/errors/auxiliary/remapped_dep.rs +++ b/tests/ui/errors/auxiliary/remapped_dep.rs @@ -1,4 +1,4 @@ -// compile-flags: --remap-path-prefix={{src-base}}/errors/auxiliary=remapped-aux +//@ compile-flags: --remap-path-prefix={{src-base}}/errors/auxiliary=remapped-aux // no-remap-src-base: Manually remap, so the remapped path remains in .stderr file. pub struct SomeStruct {} // This line should be show as part of the error. diff --git a/tests/ui/errors/issue-104621-extern-bad-file.rs b/tests/ui/errors/issue-104621-extern-bad-file.rs index 3f13d605232..f675a4a3a4f 100644 --- a/tests/ui/errors/issue-104621-extern-bad-file.rs +++ b/tests/ui/errors/issue-104621-extern-bad-file.rs @@ -1,5 +1,5 @@ -// compile-flags: --extern foo={{src-base}}/errors/issue-104621-extern-bad-file.rs -// only-linux +//@ compile-flags: --extern foo={{src-base}}/errors/issue-104621-extern-bad-file.rs +//@ only-linux extern crate foo; //~^ ERROR extern location for foo is of an unknown type diff --git a/tests/ui/errors/issue-104621-extern-not-file.rs b/tests/ui/errors/issue-104621-extern-not-file.rs index 899e45a306b..50806df15f7 100644 --- a/tests/ui/errors/issue-104621-extern-not-file.rs +++ b/tests/ui/errors/issue-104621-extern-not-file.rs @@ -1,4 +1,4 @@ -// compile-flags: --extern foo=. +//@ compile-flags: --extern foo=. extern crate foo; //~ ERROR extern location for foo is not a file: . fn main() {} diff --git a/tests/ui/errors/issue-89280-emitter-overflow-splice-lines.rs b/tests/ui/errors/issue-89280-emitter-overflow-splice-lines.rs index a1c7af128d2..dff3d02248b 100644 --- a/tests/ui/errors/issue-89280-emitter-overflow-splice-lines.rs +++ b/tests/ui/errors/issue-89280-emitter-overflow-splice-lines.rs @@ -1,4 +1,4 @@ -// check-pass +//@ check-pass trait X { fn test(x: u32, ( diff --git a/tests/ui/errors/remap-path-prefix-macro.rs b/tests/ui/errors/remap-path-prefix-macro.rs index 0ba706b0a8f..665156027c9 100644 --- a/tests/ui/errors/remap-path-prefix-macro.rs +++ b/tests/ui/errors/remap-path-prefix-macro.rs @@ -1,10 +1,10 @@ -// run-pass -// check-run-results +//@ run-pass +//@ check-run-results -// revisions: normal with-macro-scope without-macro-scope -// compile-flags: --remap-path-prefix={{src-base}}=remapped -// [with-macro-scope]compile-flags: -Zremap-path-scope=macro,diagnostics -// [without-macro-scope]compile-flags: -Zremap-path-scope=diagnostics +//@ revisions: normal with-macro-scope without-macro-scope +//@ compile-flags: --remap-path-prefix={{src-base}}=remapped +//@ [with-macro-scope]compile-flags: -Zremap-path-scope=macro,diagnostics +//@ [without-macro-scope]compile-flags: -Zremap-path-scope=diagnostics // no-remap-src-base: Manually remap, so the remapped path remains in .stderr file. fn main() { diff --git a/tests/ui/errors/remap-path-prefix-reverse.rs b/tests/ui/errors/remap-path-prefix-reverse.rs index 71c80063c32..7743e38f50f 100644 --- a/tests/ui/errors/remap-path-prefix-reverse.rs +++ b/tests/ui/errors/remap-path-prefix-reverse.rs @@ -1,12 +1,12 @@ -// aux-build:remapped_dep.rs -// compile-flags: --remap-path-prefix={{src-base}}/errors/auxiliary=remapped-aux +//@ aux-build:remapped_dep.rs +//@ compile-flags: --remap-path-prefix={{src-base}}/errors/auxiliary=remapped-aux -// revisions: local-self remapped-self +//@ revisions: local-self remapped-self // [local-self] no-remap-src-base: The hack should work regardless of remapping. -// [remapped-self] remap-src-base +//@ [remapped-self] remap-src-base // Verify that the expected source code is shown. -// error-pattern: pub struct SomeStruct {} // This line should be show +//@ error-pattern: pub struct SomeStruct {} // This line should be show extern crate remapped_dep; diff --git a/tests/ui/errors/remap-path-prefix.rs b/tests/ui/errors/remap-path-prefix.rs index e3338c10fd7..6283a8737ff 100644 --- a/tests/ui/errors/remap-path-prefix.rs +++ b/tests/ui/errors/remap-path-prefix.rs @@ -1,15 +1,15 @@ -// revisions: normal with-diagnostic-scope without-diagnostic-scope -// compile-flags: --remap-path-prefix={{src-base}}=remapped -// [with-diagnostic-scope]compile-flags: -Zremap-path-scope=diagnostics -// [without-diagnostic-scope]compile-flags: -Zremap-path-scope=object +//@ revisions: normal with-diagnostic-scope without-diagnostic-scope +//@ compile-flags: --remap-path-prefix={{src-base}}=remapped +//@ [with-diagnostic-scope]compile-flags: -Zremap-path-scope=diagnostics +//@ [without-diagnostic-scope]compile-flags: -Zremap-path-scope=object // no-remap-src-base: Manually remap, so the remapped path remains in .stderr file. // The remapped paths are not normalized by compiletest. -// normalize-stderr-test: "\\(errors)" -> "/$1" +//@ normalize-stderr-test: "\\(errors)" -> "/$1" // The remapped paths aren't recognized by compiletest, so we // cannot use line-specific patterns. -// error-pattern: E0425 +//@ error-pattern: E0425 fn main() { // We cannot actually put an ERROR marker here because diff --git a/tests/ui/exec-env.rs b/tests/ui/exec-env.rs index d7f15bcae7d..08c5aa86467 100644 --- a/tests/ui/exec-env.rs +++ b/tests/ui/exec-env.rs @@ -1,7 +1,7 @@ -// run-pass -// exec-env:TEST_EXEC_ENV=22 -// ignore-emscripten FIXME: issue #31622 -// ignore-sgx unsupported +//@ run-pass +//@ exec-env:TEST_EXEC_ENV=22 +//@ ignore-emscripten FIXME: issue #31622 +//@ ignore-sgx unsupported use std::env; diff --git a/tests/ui/explain.rs b/tests/ui/explain.rs index 5364d92e0c4..1206c4f95eb 100644 --- a/tests/ui/explain.rs +++ b/tests/ui/explain.rs @@ -1,2 +1,2 @@ -// compile-flags: --explain E0591 -// check-pass +//@ compile-flags: --explain E0591 +//@ check-pass diff --git a/tests/ui/explicit-i-suffix.rs b/tests/ui/explicit-i-suffix.rs index 40c7e475104..29c7391521e 100644 --- a/tests/ui/explicit-i-suffix.rs +++ b/tests/ui/explicit-i-suffix.rs @@ -1,7 +1,7 @@ -// run-pass +//@ run-pass #![allow(unused_must_use)] -// pretty-expanded FIXME #23616 +//@ pretty-expanded FIXME #23616 pub fn main() { let x: isize = 8; diff --git a/tests/ui/explicit-tail-calls/become-outside.rs b/tests/ui/explicit-tail-calls/become-outside.rs index 51b4389c88f..9c90d929111 100644 --- a/tests/ui/explicit-tail-calls/become-outside.rs +++ b/tests/ui/explicit-tail-calls/become-outside.rs @@ -1,4 +1,4 @@ -// revisions: constant array +//@ revisions: constant array #![allow(incomplete_features)] #![feature(explicit_tail_calls)] diff --git a/tests/ui/explicit-tail-calls/return-lifetime-sub.rs b/tests/ui/explicit-tail-calls/return-lifetime-sub.rs index 8a3f43d4b92..1243fba9b58 100644 --- a/tests/ui/explicit-tail-calls/return-lifetime-sub.rs +++ b/tests/ui/explicit-tail-calls/return-lifetime-sub.rs @@ -1,4 +1,4 @@ -// check-pass +//@ check-pass #![allow(incomplete_features)] #![feature(explicit_tail_calls)] diff --git a/tests/ui/explicit/explicit-call-to-dtor.fixed b/tests/ui/explicit/explicit-call-to-dtor.fixed index 91a4ca608da..4c4142c7981 100644 --- a/tests/ui/explicit/explicit-call-to-dtor.fixed +++ b/tests/ui/explicit/explicit-call-to-dtor.fixed @@ -1,4 +1,4 @@ -// run-rustfix +//@ run-rustfix struct Foo { x: isize } diff --git a/tests/ui/explicit/explicit-call-to-dtor.rs b/tests/ui/explicit/explicit-call-to-dtor.rs index 0656871eb1b..262dde54c7f 100644 --- a/tests/ui/explicit/explicit-call-to-dtor.rs +++ b/tests/ui/explicit/explicit-call-to-dtor.rs @@ -1,4 +1,4 @@ -// run-rustfix +//@ run-rustfix struct Foo { x: isize } diff --git a/tests/ui/explicit/explicit-call-to-supertrait-dtor.fixed b/tests/ui/explicit/explicit-call-to-supertrait-dtor.fixed index 3c71587c8e3..57cb858aa08 100644 --- a/tests/ui/explicit/explicit-call-to-supertrait-dtor.fixed +++ b/tests/ui/explicit/explicit-call-to-supertrait-dtor.fixed @@ -1,4 +1,4 @@ -// run-rustfix +//@ run-rustfix #![allow(dead_code)] #![allow(dropping_references)] diff --git a/tests/ui/explicit/explicit-call-to-supertrait-dtor.rs b/tests/ui/explicit/explicit-call-to-supertrait-dtor.rs index 075d4cbe02b..bb29e495242 100644 --- a/tests/ui/explicit/explicit-call-to-supertrait-dtor.rs +++ b/tests/ui/explicit/explicit-call-to-supertrait-dtor.rs @@ -1,4 +1,4 @@ -// run-rustfix +//@ run-rustfix #![allow(dead_code)] #![allow(dropping_references)] diff --git a/tests/ui/explore-issue-38412.rs b/tests/ui/explore-issue-38412.rs index 46d952df771..836cb98b5b3 100644 --- a/tests/ui/explore-issue-38412.rs +++ b/tests/ui/explore-issue-38412.rs @@ -1,4 +1,4 @@ -// aux-build:pub-and-stability.rs +//@ aux-build:pub-and-stability.rs // A big point of this test is that we *declare* `unstable_declared`, // but do *not* declare `unstable_undeclared`. This way we can check diff --git a/tests/ui/expr-block-fn.rs b/tests/ui/expr-block-fn.rs index 1cac2cac0ac..1d3689eb4f3 100644 --- a/tests/ui/expr-block-fn.rs +++ b/tests/ui/expr-block-fn.rs @@ -1,4 +1,4 @@ -// run-pass +//@ run-pass fn test_fn() { fn ten() -> isize { return 10; } diff --git a/tests/ui/expr-block-generic.rs b/tests/ui/expr-block-generic.rs index 29c7c42219c..b36bda917d6 100644 --- a/tests/ui/expr-block-generic.rs +++ b/tests/ui/expr-block-generic.rs @@ -1,4 +1,4 @@ -// run-pass +//@ run-pass #![allow(unused_braces)] fn test_generic(expected: T, eq: F) where F: FnOnce(T, T) -> bool { diff --git a/tests/ui/expr-block.rs b/tests/ui/expr-block.rs index ff87595c934..bf626c9ead3 100644 --- a/tests/ui/expr-block.rs +++ b/tests/ui/expr-block.rs @@ -1,4 +1,4 @@ -// run-pass +//@ run-pass #![allow(unused_braces)] #![allow(dead_code)] diff --git a/tests/ui/expr-copy.rs b/tests/ui/expr-copy.rs index 1c6ae03810f..cfe47ff6d93 100644 --- a/tests/ui/expr-copy.rs +++ b/tests/ui/expr-copy.rs @@ -1,4 +1,4 @@ -// run-pass +//@ run-pass fn f(arg: &mut A) { arg.a = 100; diff --git a/tests/ui/expr-if-generic.rs b/tests/ui/expr-if-generic.rs index 32ed6d9bee0..ed99ee63a51 100644 --- a/tests/ui/expr-if-generic.rs +++ b/tests/ui/expr-if-generic.rs @@ -1,4 +1,4 @@ -// run-pass +//@ run-pass fn test_generic(expected: T, not_expected: T, eq: F) where T: Clone, diff --git a/tests/ui/expr-if-panic-all.rs b/tests/ui/expr-if-panic-all.rs index f915a7d9da0..2ba2a36d165 100644 --- a/tests/ui/expr-if-panic-all.rs +++ b/tests/ui/expr-if-panic-all.rs @@ -1,4 +1,4 @@ -// run-pass +//@ run-pass // When all branches of an if expression result in panic, the entire if // expression results in panic. diff --git a/tests/ui/expr-scope.rs b/tests/ui/expr-scope.rs index 9976b6814c0..57321ce2aa0 100644 --- a/tests/ui/expr-scope.rs +++ b/tests/ui/expr-scope.rs @@ -1,7 +1,7 @@ -// run-pass +//@ run-pass // Regression test for issue #762 -// pretty-expanded FIXME #23616 +//@ pretty-expanded FIXME #23616 pub fn f() { } pub fn main() { return ::f(); } diff --git a/tests/ui/expr/compound-assignment/eval-order.rs b/tests/ui/expr/compound-assignment/eval-order.rs index 658adae193e..c7940a06a89 100644 --- a/tests/ui/expr/compound-assignment/eval-order.rs +++ b/tests/ui/expr/compound-assignment/eval-order.rs @@ -1,6 +1,6 @@ // Test evaluation order of operands of the compound assignment operators -// run-pass +//@ run-pass use std::ops::AddAssign; diff --git a/tests/ui/expr/if-bot.rs b/tests/ui/expr/if-bot.rs index 0f09db530d4..82c27d57aa8 100644 --- a/tests/ui/expr/if-bot.rs +++ b/tests/ui/expr/if-bot.rs @@ -1,4 +1,4 @@ -// run-pass +//@ run-pass pub fn main() { let i: isize = if false { panic!() } else { 5 }; diff --git a/tests/ui/expr/if/attrs/builtin-if-attr.rs b/tests/ui/expr/if/attrs/builtin-if-attr.rs index 7e290661501..3c6606acdca 100644 --- a/tests/ui/expr/if/attrs/builtin-if-attr.rs +++ b/tests/ui/expr/if/attrs/builtin-if-attr.rs @@ -1,4 +1,4 @@ -// check-pass +//@ check-pass fn main() { #[allow(unused_variables)] diff --git a/tests/ui/expr/if/attrs/cfg-false-if-attr.rs b/tests/ui/expr/if/attrs/cfg-false-if-attr.rs index 1f77a1bb342..72d83215ade 100644 --- a/tests/ui/expr/if/attrs/cfg-false-if-attr.rs +++ b/tests/ui/expr/if/attrs/cfg-false-if-attr.rs @@ -1,4 +1,4 @@ -// check-pass +//@ check-pass #[cfg(FALSE)] fn simple_attr() { diff --git a/tests/ui/expr/if/attrs/gate-whole-expr.rs b/tests/ui/expr/if/attrs/gate-whole-expr.rs index 63772d54b53..bab01592c24 100644 --- a/tests/ui/expr/if/attrs/gate-whole-expr.rs +++ b/tests/ui/expr/if/attrs/gate-whole-expr.rs @@ -1,4 +1,4 @@ -// run-pass +//@ run-pass fn main() { let x = 1; diff --git a/tests/ui/expr/if/attrs/let-chains-attr.rs b/tests/ui/expr/if/attrs/let-chains-attr.rs index 2cd8731141a..b3dbd53e579 100644 --- a/tests/ui/expr/if/attrs/let-chains-attr.rs +++ b/tests/ui/expr/if/attrs/let-chains-attr.rs @@ -1,4 +1,4 @@ -// check-pass +//@ check-pass #![feature(let_chains)] diff --git a/tests/ui/expr/if/expr-if-panic-fn.rs b/tests/ui/expr/if/expr-if-panic-fn.rs index 36e49785a49..4f3d7fd48e3 100644 --- a/tests/ui/expr/if/expr-if-panic-fn.rs +++ b/tests/ui/expr/if/expr-if-panic-fn.rs @@ -1,6 +1,6 @@ -// run-fail -// error-pattern:explicit panic -// ignore-emscripten no processes +//@ run-fail +//@ error-pattern:explicit panic +//@ ignore-emscripten no processes fn f() -> ! { panic!() diff --git a/tests/ui/expr/if/expr-if-panic-pass.rs b/tests/ui/expr/if/expr-if-panic-pass.rs index 6069cd835e1..faf3cf12550 100644 --- a/tests/ui/expr/if/expr-if-panic-pass.rs +++ b/tests/ui/expr/if/expr-if-panic-pass.rs @@ -1,4 +1,4 @@ -// run-pass +//@ run-pass fn test_if_panic() { let x = if false { panic!() } else { 10 }; diff --git a/tests/ui/expr/if/expr-if-panic.rs b/tests/ui/expr/if/expr-if-panic.rs index 520ee0870ee..0b43d1d6b00 100644 --- a/tests/ui/expr/if/expr-if-panic.rs +++ b/tests/ui/expr/if/expr-if-panic.rs @@ -1,6 +1,6 @@ -// run-fail -// error-pattern:explicit panic -// ignore-emscripten no processes +//@ run-fail +//@ error-pattern:explicit panic +//@ ignore-emscripten no processes fn main() { let _x = if false { diff --git a/tests/ui/expr/if/expr-if.rs b/tests/ui/expr/if/expr-if.rs index 2b8474ff453..ae869c4b77a 100644 --- a/tests/ui/expr/if/expr-if.rs +++ b/tests/ui/expr/if/expr-if.rs @@ -1,4 +1,4 @@ -// run-pass +//@ run-pass // Tests for if as expressions fn test_if() { let rs: bool = if true { true } else { false }; assert!((rs)); } diff --git a/tests/ui/expr/if/if-check-panic.rs b/tests/ui/expr/if/if-check-panic.rs index 037cd427ccf..4b400deaca4 100644 --- a/tests/ui/expr/if/if-check-panic.rs +++ b/tests/ui/expr/if/if-check-panic.rs @@ -1,6 +1,6 @@ -// run-fail -// error-pattern:Number is odd -// ignore-emscripten no processes +//@ run-fail +//@ error-pattern:Number is odd +//@ ignore-emscripten no processes fn even(x: usize) -> bool { if x < 2 { diff --git a/tests/ui/expr/if/if-check.rs b/tests/ui/expr/if/if-check.rs index 6593225e7dd..f3fb3a59ff0 100644 --- a/tests/ui/expr/if/if-check.rs +++ b/tests/ui/expr/if/if-check.rs @@ -1,4 +1,4 @@ -// run-pass +//@ run-pass fn even(x: usize) -> bool { if x < 2 { diff --git a/tests/ui/expr/if/if-cond-bot.rs b/tests/ui/expr/if/if-cond-bot.rs index bcd11467852..ddb5559ffca 100644 --- a/tests/ui/expr/if/if-cond-bot.rs +++ b/tests/ui/expr/if/if-cond-bot.rs @@ -1,6 +1,6 @@ -// run-fail -// error-pattern:quux -// ignore-emscripten no processes +//@ run-fail +//@ error-pattern:quux +//@ ignore-emscripten no processes fn my_err(s: String) -> ! { println!("{}", s); diff --git a/tests/ui/expr/if/if-let.rs b/tests/ui/expr/if/if-let.rs index 7fdd2be955b..a21445f188a 100644 --- a/tests/ui/expr/if/if-let.rs +++ b/tests/ui/expr/if/if-let.rs @@ -1,4 +1,4 @@ -// check-pass +//@ check-pass fn macros() { macro_rules! foo { diff --git a/tests/ui/expr/if/if-loop.rs b/tests/ui/expr/if/if-loop.rs index 06d0bdf456c..f4121c92d17 100644 --- a/tests/ui/expr/if/if-loop.rs +++ b/tests/ui/expr/if/if-loop.rs @@ -1,4 +1,4 @@ -// check-pass +//@ check-pass // This used to ICE because the "if" being unreachable was not handled correctly fn err() { diff --git a/tests/ui/expr/if/if-ret.rs b/tests/ui/expr/if/if-ret.rs index 896072ce728..3aad21d34a2 100644 --- a/tests/ui/expr/if/if-ret.rs +++ b/tests/ui/expr/if/if-ret.rs @@ -1,7 +1,7 @@ -// run-pass +//@ run-pass #![allow(unused_parens)] -// pretty-expanded FIXME #23616 +//@ pretty-expanded FIXME #23616 fn foo() { if (return) { } } //~ WARNING unreachable block in `if` diff --git a/tests/ui/expr/if/if-typeck.rs b/tests/ui/expr/if/if-typeck.rs index d8c262bd6b3..ba828f11e79 100644 --- a/tests/ui/expr/if/if-typeck.rs +++ b/tests/ui/expr/if/if-typeck.rs @@ -1,4 +1,4 @@ -// error-pattern:mismatched types +//@ error-pattern:mismatched types // issue #513 fn f() { } diff --git a/tests/ui/expr/malformed_closure/missing_block_in_fn_call.fixed b/tests/ui/expr/malformed_closure/missing_block_in_fn_call.fixed index b81515cda9a..47217e05f9d 100644 --- a/tests/ui/expr/malformed_closure/missing_block_in_fn_call.fixed +++ b/tests/ui/expr/malformed_closure/missing_block_in_fn_call.fixed @@ -1,4 +1,4 @@ -// run-rustfix +//@ run-rustfix fn main() { let _ = vec![1, 2, 3].into_iter().map(|x| { let y = x; //~ ERROR expected expression, found `let` statement diff --git a/tests/ui/expr/malformed_closure/missing_block_in_fn_call.rs b/tests/ui/expr/malformed_closure/missing_block_in_fn_call.rs index e47ad562fb0..0069e834741 100644 --- a/tests/ui/expr/malformed_closure/missing_block_in_fn_call.rs +++ b/tests/ui/expr/malformed_closure/missing_block_in_fn_call.rs @@ -1,4 +1,4 @@ -// run-rustfix +//@ run-rustfix fn main() { let _ = vec![1, 2, 3].into_iter().map(|x| let y = x; //~ ERROR expected expression, found `let` statement diff --git a/tests/ui/expr/malformed_closure/missing_braces_around_block.fixed b/tests/ui/expr/malformed_closure/missing_braces_around_block.fixed index a7a9db7d977..fcc55f28f01 100644 --- a/tests/ui/expr/malformed_closure/missing_braces_around_block.fixed +++ b/tests/ui/expr/malformed_closure/missing_braces_around_block.fixed @@ -8,7 +8,7 @@ // https://github.com/rust-lang/rust/issues/88065 // https://github.com/rust-lang/rust/issues/107959 -// run-rustfix +//@ run-rustfix fn main() { // Closure with multiple expressions delimited by semicolon. diff --git a/tests/ui/expr/malformed_closure/missing_braces_around_block.rs b/tests/ui/expr/malformed_closure/missing_braces_around_block.rs index b5690b2eca7..97639d01f74 100644 --- a/tests/ui/expr/malformed_closure/missing_braces_around_block.rs +++ b/tests/ui/expr/malformed_closure/missing_braces_around_block.rs @@ -8,7 +8,7 @@ // https://github.com/rust-lang/rust/issues/88065 // https://github.com/rust-lang/rust/issues/107959 -// run-rustfix +//@ run-rustfix fn main() { // Closure with multiple expressions delimited by semicolon. diff --git a/tests/ui/expr/malformed_closure/ruby_style_closure_parse_error.fixed b/tests/ui/expr/malformed_closure/ruby_style_closure_parse_error.fixed index 8014dc87c08..9d85f95ff24 100644 --- a/tests/ui/expr/malformed_closure/ruby_style_closure_parse_error.fixed +++ b/tests/ui/expr/malformed_closure/ruby_style_closure_parse_error.fixed @@ -1,4 +1,4 @@ -// run-rustfix +//@ run-rustfix fn main() { let _ = vec![1, 2, 3].into_iter().map(|x| { let y = x; //~ ERROR expected expression, found `let` statement diff --git a/tests/ui/expr/malformed_closure/ruby_style_closure_parse_error.rs b/tests/ui/expr/malformed_closure/ruby_style_closure_parse_error.rs index 9e4aca888ad..728ea868441 100644 --- a/tests/ui/expr/malformed_closure/ruby_style_closure_parse_error.rs +++ b/tests/ui/expr/malformed_closure/ruby_style_closure_parse_error.rs @@ -1,4 +1,4 @@ -// run-rustfix +//@ run-rustfix fn main() { let _ = vec![1, 2, 3].into_iter().map({|x| let y = x; //~ ERROR expected expression, found `let` statement diff --git a/tests/ui/ext-expand-inner-exprs.rs b/tests/ui/ext-expand-inner-exprs.rs index 5bbdf5ec956..94610d0a328 100644 --- a/tests/ui/ext-expand-inner-exprs.rs +++ b/tests/ui/ext-expand-inner-exprs.rs @@ -1,4 +1,4 @@ -// run-pass +//@ run-pass static FOO : &'static str = concat!(concat!("hel", "lo"), "world"); diff --git a/tests/ui/ext-nonexistent.rs b/tests/ui/ext-nonexistent.rs index e65b1654302..a66407953a9 100644 --- a/tests/ui/ext-nonexistent.rs +++ b/tests/ui/ext-nonexistent.rs @@ -1,2 +1,2 @@ -// error-pattern:cannot find macro +//@ error-pattern:cannot find macro fn main() { iamnotanextensionthatexists!(""); } diff --git a/tests/ui/extenv/extenv-env-overload.rs b/tests/ui/extenv/extenv-env-overload.rs index 8b3b565fe83..b3497ffbc88 100644 --- a/tests/ui/extenv/extenv-env-overload.rs +++ b/tests/ui/extenv/extenv-env-overload.rs @@ -1,6 +1,6 @@ -// run-pass -// rustc-env:MY_VAR=tadam -// compile-flags: --env-set MY_VAR=123abc -Zunstable-options +//@ run-pass +//@ rustc-env:MY_VAR=tadam +//@ compile-flags: --env-set MY_VAR=123abc -Zunstable-options // This test ensures that variables provided with `--env` take precedence over // variables from environment. diff --git a/tests/ui/extenv/extenv-env.rs b/tests/ui/extenv/extenv-env.rs index 051ea214c1b..18226256b64 100644 --- a/tests/ui/extenv/extenv-env.rs +++ b/tests/ui/extenv/extenv-env.rs @@ -1,5 +1,5 @@ -// compile-flags: --env-set FOO=123abc -Zunstable-options -// run-pass +//@ compile-flags: --env-set FOO=123abc -Zunstable-options +//@ run-pass fn main() { assert_eq!(env!("FOO"), "123abc"); } diff --git a/tests/ui/extenv/extenv-not-env.rs b/tests/ui/extenv/extenv-not-env.rs index b0355e073e4..e903eab4e96 100644 --- a/tests/ui/extenv/extenv-not-env.rs +++ b/tests/ui/extenv/extenv-not-env.rs @@ -1,5 +1,5 @@ -// run-pass -// rustc-env:MY_ENV=/ +//@ run-pass +//@ rustc-env:MY_ENV=/ // Ensures that variables not defined through `--env-set` are still available. fn main() { diff --git a/tests/ui/extenv/issue-110547.rs b/tests/ui/extenv/issue-110547.rs index a6fb96ac066..2acfb2e671e 100644 --- a/tests/ui/extenv/issue-110547.rs +++ b/tests/ui/extenv/issue-110547.rs @@ -1,4 +1,4 @@ -// compile-flags: -C debug-assertions +//@ compile-flags: -C debug-assertions fn main() { env!{"\t"}; //~ ERROR not defined at compile time diff --git a/tests/ui/extern-flag/empty-extern-arg.rs b/tests/ui/extern-flag/empty-extern-arg.rs index 2f4ae7d8e70..dea68b5b1ad 100644 --- a/tests/ui/extern-flag/empty-extern-arg.rs +++ b/tests/ui/extern-flag/empty-extern-arg.rs @@ -1,6 +1,6 @@ -// compile-flags: --extern std= -// error-pattern: extern location for std does not exist -// needs-unwind since it affects the error output -// ignore-emscripten missing eh_catch_typeinfo lang item +//@ compile-flags: --extern std= +//@ error-pattern: extern location for std does not exist +//@ needs-unwind since it affects the error output +//@ ignore-emscripten missing eh_catch_typeinfo lang item fn main() {} diff --git a/tests/ui/extern-flag/force-extern.rs b/tests/ui/extern-flag/force-extern.rs index f56b5378223..f30bd3b517f 100644 --- a/tests/ui/extern-flag/force-extern.rs +++ b/tests/ui/extern-flag/force-extern.rs @@ -1,8 +1,8 @@ -// check-pass -// ignore-cross-compile (needs dylibs and compiletest doesn't have a more specific header) -// aux-crate:force:panic_handler=panic_handler.rs -// compile-flags: -Zunstable-options --crate-type dylib -// edition:2018 +//@ check-pass +//@ ignore-cross-compile (needs dylibs and compiletest doesn't have a more specific header) +//@ aux-crate:force:panic_handler=panic_handler.rs +//@ compile-flags: -Zunstable-options --crate-type dylib +//@ edition:2018 #![no_std] diff --git a/tests/ui/extern-flag/invalid-crate-name-dashed.rs b/tests/ui/extern-flag/invalid-crate-name-dashed.rs index 7f351e48b6f..b846214175e 100644 --- a/tests/ui/extern-flag/invalid-crate-name-dashed.rs +++ b/tests/ui/extern-flag/invalid-crate-name-dashed.rs @@ -1,6 +1,6 @@ -// compile-flags: --extern=my-awesome-library=libawesome.rlib -// error-pattern: crate name `my-awesome-library` passed to `--extern` is not a valid ASCII identifier -// error-pattern: consider replacing the dashes with underscores: `my_awesome_library` +//@ compile-flags: --extern=my-awesome-library=libawesome.rlib +//@ error-pattern: crate name `my-awesome-library` passed to `--extern` is not a valid ASCII identifier +//@ error-pattern: consider replacing the dashes with underscores: `my_awesome_library` // In a sense, this is a regression test for issue #113035. We no longer suggest // `pub use my-awesome-library::*;` (sic!) as we outright ban this crate name. diff --git a/tests/ui/extern-flag/invalid-crate-name-non-ascii.rs b/tests/ui/extern-flag/invalid-crate-name-non-ascii.rs index ec4a85820d1..5231503820f 100644 --- a/tests/ui/extern-flag/invalid-crate-name-non-ascii.rs +++ b/tests/ui/extern-flag/invalid-crate-name-non-ascii.rs @@ -1,4 +1,4 @@ -// compile-flags: --extern ÄÉĪ±Å£Ä“=libnon_ascii.rlib -// error-pattern: crate name `ÄÉĪ±Å£Ä“` passed to `--extern` is not a valid ASCII identifier +//@ compile-flags: --extern ÄÉĪ±Å£Ä“=libnon_ascii.rlib +//@ error-pattern: crate name `ÄÉĪ±Å£Ä“` passed to `--extern` is not a valid ASCII identifier fn main() {} diff --git a/tests/ui/extern-flag/invalid-crate-name.rs b/tests/ui/extern-flag/invalid-crate-name.rs index a26b5dd4635..c7b5b637217 100644 --- a/tests/ui/extern-flag/invalid-crate-name.rs +++ b/tests/ui/extern-flag/invalid-crate-name.rs @@ -1,4 +1,4 @@ -// compile-flags: --extern=?#1%$ -// error-pattern: crate name `?#1%$` passed to `--extern` is not a valid ASCII identifier +//@ compile-flags: --extern=?#1%$ +//@ error-pattern: crate name `?#1%$` passed to `--extern` is not a valid ASCII identifier fn main() {} diff --git a/tests/ui/extern-flag/multiple-opts.rs b/tests/ui/extern-flag/multiple-opts.rs index 3dc2f1d73f8..091064a070c 100644 --- a/tests/ui/extern-flag/multiple-opts.rs +++ b/tests/ui/extern-flag/multiple-opts.rs @@ -1,6 +1,6 @@ -// aux-crate:priv,noprelude:somedep=somedep.rs -// compile-flags: -Zunstable-options -// edition:2018 +//@ aux-crate:priv,noprelude:somedep=somedep.rs +//@ compile-flags: -Zunstable-options +//@ edition:2018 // Test for multiple options to --extern. Can't test for errors from both // options at the same time, so this only checks that noprelude is honored. diff --git a/tests/ui/extern-flag/no-force-extern.rs b/tests/ui/extern-flag/no-force-extern.rs index ce9cbfe1cd2..11d2f91c7bb 100644 --- a/tests/ui/extern-flag/no-force-extern.rs +++ b/tests/ui/extern-flag/no-force-extern.rs @@ -1,9 +1,9 @@ -// aux-crate:panic_handler=panic_handler.rs -// ignore-cross-compile (needs dylibs and compiletest doesn't have a more specific header) +//@ aux-crate:panic_handler=panic_handler.rs +//@ ignore-cross-compile (needs dylibs and compiletest doesn't have a more specific header) // compile_flags: -Zunstable-options --crate-type dylib -// error-pattern: `#[panic_handler]` function required, but not found -// dont-check-compiler-stderr -// edition: 2018 +//@ error-pattern: `#[panic_handler]` function required, but not found +//@ dont-check-compiler-stderr +//@ edition: 2018 #![no_std] diff --git a/tests/ui/extern-flag/no-nounused.rs b/tests/ui/extern-flag/no-nounused.rs index 5ec75595243..bed8006542c 100644 --- a/tests/ui/extern-flag/no-nounused.rs +++ b/tests/ui/extern-flag/no-nounused.rs @@ -1,6 +1,6 @@ -// aux-crate:somedep=somedep.rs -// compile-flags: -Zunstable-options -Dunused-crate-dependencies -// edition:2018 +//@ aux-crate:somedep=somedep.rs +//@ compile-flags: -Zunstable-options -Dunused-crate-dependencies +//@ edition:2018 fn main() { //~ ERROR external crate `somedep` unused in `no_nounused` } diff --git a/tests/ui/extern-flag/noprelude-and-prelude.rs b/tests/ui/extern-flag/noprelude-and-prelude.rs index e6a150b9e8b..e4aff216c6b 100644 --- a/tests/ui/extern-flag/noprelude-and-prelude.rs +++ b/tests/ui/extern-flag/noprelude-and-prelude.rs @@ -1,7 +1,7 @@ -// check-pass -// aux-crate:noprelude:somedep=somedep.rs -// compile-flags: -Zunstable-options --extern somedep -// edition:2018 +//@ check-pass +//@ aux-crate:noprelude:somedep=somedep.rs +//@ compile-flags: -Zunstable-options --extern somedep +//@ edition:2018 // Having a flag with `noprelude` and one without, will add to the prelude. diff --git a/tests/ui/extern-flag/noprelude-resolves.rs b/tests/ui/extern-flag/noprelude-resolves.rs index f69f552b69d..cc8041b1852 100644 --- a/tests/ui/extern-flag/noprelude-resolves.rs +++ b/tests/ui/extern-flag/noprelude-resolves.rs @@ -1,7 +1,7 @@ -// check-pass -// aux-crate:noprelude:somedep=somedep.rs -// compile-flags: -Zunstable-options -// edition:2018 +//@ check-pass +//@ aux-crate:noprelude:somedep=somedep.rs +//@ compile-flags: -Zunstable-options +//@ edition:2018 // `extern crate` can be used to add to prelude. extern crate somedep; diff --git a/tests/ui/extern-flag/noprelude.rs b/tests/ui/extern-flag/noprelude.rs index cdbf3409100..4af617a1d62 100644 --- a/tests/ui/extern-flag/noprelude.rs +++ b/tests/ui/extern-flag/noprelude.rs @@ -1,6 +1,6 @@ -// aux-crate:noprelude:somedep=somedep.rs -// compile-flags: -Zunstable-options -// edition:2018 +//@ aux-crate:noprelude:somedep=somedep.rs +//@ compile-flags: -Zunstable-options +//@ edition:2018 fn main() { somedep::somefun(); //~ ERROR failed to resolve diff --git a/tests/ui/extern-flag/nounused.rs b/tests/ui/extern-flag/nounused.rs index 2513986bbec..98f602ab404 100644 --- a/tests/ui/extern-flag/nounused.rs +++ b/tests/ui/extern-flag/nounused.rs @@ -1,7 +1,7 @@ -// check-pass -// aux-crate:nounused:somedep=somedep.rs -// compile-flags: -Zunstable-options -Dunused-crate-dependencies -// edition:2018 +//@ check-pass +//@ aux-crate:nounused:somedep=somedep.rs +//@ compile-flags: -Zunstable-options -Dunused-crate-dependencies +//@ edition:2018 fn main() { } diff --git a/tests/ui/extern-flag/public-and-private.rs b/tests/ui/extern-flag/public-and-private.rs index a3a81cbf372..d0de55d9cf5 100644 --- a/tests/ui/extern-flag/public-and-private.rs +++ b/tests/ui/extern-flag/public-and-private.rs @@ -1,6 +1,6 @@ -// aux-crate:priv:somedep=somedep.rs -// compile-flags: -Zunstable-options --extern somedep -// edition:2018 +//@ aux-crate:priv:somedep=somedep.rs +//@ compile-flags: -Zunstable-options --extern somedep +//@ edition:2018 #![deny(exported_private_dependencies)] diff --git a/tests/ui/extern-flag/redundant-force-extern.rs b/tests/ui/extern-flag/redundant-force-extern.rs index a4091616dd5..44466977c9e 100644 --- a/tests/ui/extern-flag/redundant-force-extern.rs +++ b/tests/ui/extern-flag/redundant-force-extern.rs @@ -1,8 +1,8 @@ -// check-pass -// ignore-cross-compile (needs dylibs and compiletest doesn't have a more specific header) -// aux-crate:force:panic_handler=panic_handler.rs -// compile-flags: -Zunstable-options --crate-type dylib -// edition:2018 +//@ check-pass +//@ ignore-cross-compile (needs dylibs and compiletest doesn't have a more specific header) +//@ aux-crate:force:panic_handler=panic_handler.rs +//@ compile-flags: -Zunstable-options --crate-type dylib +//@ edition:2018 #![no_std] diff --git a/tests/ui/extern/auxiliary/issue-80074-macro-2.rs b/tests/ui/extern/auxiliary/issue-80074-macro-2.rs index bc87a2b5434..a1c26d90de3 100644 --- a/tests/ui/extern/auxiliary/issue-80074-macro-2.rs +++ b/tests/ui/extern/auxiliary/issue-80074-macro-2.rs @@ -1,3 +1,3 @@ -// edition:2018 +//@ edition:2018 macro_rules! m { () => {}; } diff --git a/tests/ui/extern/auxiliary/issue-80074-macro.rs b/tests/ui/extern/auxiliary/issue-80074-macro.rs index 3e912d97715..8d8705582ed 100644 --- a/tests/ui/extern/auxiliary/issue-80074-macro.rs +++ b/tests/ui/extern/auxiliary/issue-80074-macro.rs @@ -1,4 +1,4 @@ -// edition:2018 +//@ edition:2018 macro_rules! foo_ { () => {}; } use foo_ as foo; diff --git a/tests/ui/extern/extern-1.rs b/tests/ui/extern/extern-1.rs index 66e56050172..c0f770ab9f2 100644 --- a/tests/ui/extern/extern-1.rs +++ b/tests/ui/extern/extern-1.rs @@ -1,6 +1,6 @@ -// run-pass +//@ run-pass #![allow(dead_code)] -// pretty-expanded FIXME #23616 +//@ pretty-expanded FIXME #23616 extern "C" fn f() { } diff --git a/tests/ui/extern/extern-calling-convention-test.rs b/tests/ui/extern/extern-calling-convention-test.rs index 7231a7cde85..7c533df1986 100644 --- a/tests/ui/extern/extern-calling-convention-test.rs +++ b/tests/ui/extern/extern-calling-convention-test.rs @@ -1,7 +1,7 @@ -// run-pass -// aux-build:extern_calling_convention.rs +//@ run-pass +//@ aux-build:extern_calling_convention.rs -// pretty-expanded FIXME #23616 +//@ pretty-expanded FIXME #23616 extern crate extern_calling_convention; diff --git a/tests/ui/extern/extern-compare-with-return-type.rs b/tests/ui/extern/extern-compare-with-return-type.rs index 42693d3a061..316e8b2fc73 100644 --- a/tests/ui/extern/extern-compare-with-return-type.rs +++ b/tests/ui/extern/extern-compare-with-return-type.rs @@ -1,4 +1,4 @@ -// run-pass +//@ run-pass // Tests that we can compare various kinds of extern fn signatures. #![allow(non_camel_case_types)] diff --git a/tests/ui/extern/extern-const.fixed b/tests/ui/extern/extern-const.fixed index 248efc93d00..b338a56dd78 100644 --- a/tests/ui/extern/extern-const.fixed +++ b/tests/ui/extern/extern-const.fixed @@ -4,9 +4,9 @@ // #54388: an unused reference to an undefined static may or may not // compile. To sidestep this by using one that *is* defined. -// run-rustfix -// ignore-wasm32-bare no external library to link to. -// compile-flags: -g +//@ run-rustfix +//@ ignore-wasm32-bare no external library to link to. +//@ compile-flags: -g #![feature(rustc_private)] extern crate libc; diff --git a/tests/ui/extern/extern-const.rs b/tests/ui/extern/extern-const.rs index d3b3bef6dae..1c552950afb 100644 --- a/tests/ui/extern/extern-const.rs +++ b/tests/ui/extern/extern-const.rs @@ -4,9 +4,9 @@ // #54388: an unused reference to an undefined static may or may not // compile. To sidestep this by using one that *is* defined. -// run-rustfix -// ignore-wasm32-bare no external library to link to. -// compile-flags: -g +//@ run-rustfix +//@ ignore-wasm32-bare no external library to link to. +//@ compile-flags: -g #![feature(rustc_private)] extern crate libc; diff --git a/tests/ui/extern/extern-crate-rename.rs b/tests/ui/extern/extern-crate-rename.rs index fc8afc3e134..9eeea6dc571 100644 --- a/tests/ui/extern/extern-crate-rename.rs +++ b/tests/ui/extern/extern-crate-rename.rs @@ -1,5 +1,5 @@ -// aux-build:m1.rs -// aux-build:m2.rs +//@ aux-build:m1.rs +//@ aux-build:m2.rs extern crate m1; diff --git a/tests/ui/extern/extern-foreign-crate.rs b/tests/ui/extern/extern-foreign-crate.rs index 7f774c44277..939090ab5fc 100644 --- a/tests/ui/extern/extern-foreign-crate.rs +++ b/tests/ui/extern/extern-foreign-crate.rs @@ -1,5 +1,5 @@ -// run-pass -// pretty-expanded FIXME #23616 +//@ run-pass +//@ pretty-expanded FIXME #23616 extern crate std as mystd; diff --git a/tests/ui/extern/extern-methods.rs b/tests/ui/extern/extern-methods.rs index 22792c11366..1e6f6cdad7b 100644 --- a/tests/ui/extern/extern-methods.rs +++ b/tests/ui/extern/extern-methods.rs @@ -1,5 +1,5 @@ -// run-pass -// only-x86 +//@ run-pass +//@ only-x86 trait A { extern "fastcall" fn test1(i: i32); diff --git a/tests/ui/extern/extern-mod-abi.rs b/tests/ui/extern/extern-mod-abi.rs index c543394cca0..8700a379d29 100644 --- a/tests/ui/extern/extern-mod-abi.rs +++ b/tests/ui/extern/extern-mod-abi.rs @@ -1,6 +1,6 @@ -// run-pass +//@ run-pass #![allow(dead_code)] -// pretty-expanded FIXME #23616 +//@ pretty-expanded FIXME #23616 extern "C" { fn pow(x: f64, y: f64) -> f64; diff --git a/tests/ui/extern/extern-mod-ordering-exe.rs b/tests/ui/extern/extern-mod-ordering-exe.rs index d7cc4dffb44..c735f6bae7a 100644 --- a/tests/ui/extern/extern-mod-ordering-exe.rs +++ b/tests/ui/extern/extern-mod-ordering-exe.rs @@ -1,7 +1,7 @@ -// run-pass -// aux-build:extern_mod_ordering_lib.rs +//@ run-pass +//@ aux-build:extern_mod_ordering_lib.rs -// pretty-expanded FIXME #23616 +//@ pretty-expanded FIXME #23616 extern crate extern_mod_ordering_lib; diff --git a/tests/ui/extern/extern-no-mangle.rs b/tests/ui/extern/extern-no-mangle.rs index ab7c9824af0..dba9689a075 100644 --- a/tests/ui/extern/extern-no-mangle.rs +++ b/tests/ui/extern/extern-no-mangle.rs @@ -5,7 +5,7 @@ // The previous warning only talks about a "function or static" but foreign fns/statics // are also not allowed to have #[no_mangle] -// build-pass +//@ build-pass extern "C" { #[no_mangle] diff --git a/tests/ui/extern/extern-prelude-core.rs b/tests/ui/extern/extern-prelude-core.rs index 56206425f84..ced1e5c3915 100644 --- a/tests/ui/extern/extern-prelude-core.rs +++ b/tests/ui/extern/extern-prelude-core.rs @@ -1,4 +1,4 @@ -// run-pass +//@ run-pass #![feature(lang_items, start)] #![no_std] diff --git a/tests/ui/extern/extern-prelude-no-speculative.rs b/tests/ui/extern/extern-prelude-no-speculative.rs index 3ba124159e0..949f4c8f2bf 100644 --- a/tests/ui/extern/extern-prelude-no-speculative.rs +++ b/tests/ui/extern/extern-prelude-no-speculative.rs @@ -1,6 +1,6 @@ -// run-pass +//@ run-pass #![allow(unused_variables)] -// compile-flags: --extern LooksLikeExternCrate=/path/to/nowhere +//@ compile-flags: --extern LooksLikeExternCrate=/path/to/nowhere mod m { pub struct LooksLikeExternCrate; diff --git a/tests/ui/extern/extern-prelude-std.rs b/tests/ui/extern/extern-prelude-std.rs index b5627fad960..5ded76cea7c 100644 --- a/tests/ui/extern/extern-prelude-std.rs +++ b/tests/ui/extern/extern-prelude-std.rs @@ -1,4 +1,4 @@ -// run-pass +//@ run-pass mod foo { pub fn test() { diff --git a/tests/ui/extern/extern-pub.rs b/tests/ui/extern/extern-pub.rs index 0b95045a03e..80f1e295d4d 100644 --- a/tests/ui/extern/extern-pub.rs +++ b/tests/ui/extern/extern-pub.rs @@ -1,5 +1,5 @@ -// run-pass -// pretty-expanded FIXME #23616 +//@ run-pass +//@ pretty-expanded FIXME #23616 extern "C" { pub fn free(p: *const u8); diff --git a/tests/ui/extern/extern-rust.rs b/tests/ui/extern/extern-rust.rs index 7cea8be5921..bacdc7aeecb 100644 --- a/tests/ui/extern/extern-rust.rs +++ b/tests/ui/extern/extern-rust.rs @@ -1,5 +1,5 @@ -// run-pass -// pretty-expanded FIXME #23616 +//@ run-pass +//@ pretty-expanded FIXME #23616 #[repr(C)] pub struct Foo(u32); diff --git a/tests/ui/extern/extern-take-value.rs b/tests/ui/extern/extern-take-value.rs index c09a774361f..56ed3328614 100644 --- a/tests/ui/extern/extern-take-value.rs +++ b/tests/ui/extern/extern-take-value.rs @@ -1,5 +1,5 @@ -// run-pass -// aux-build:extern-take-value.rs +//@ run-pass +//@ aux-build:extern-take-value.rs extern crate extern_take_value; diff --git a/tests/ui/extern/extern-thiscall.rs b/tests/ui/extern/extern-thiscall.rs index c491c156af5..3fa796bdbe8 100644 --- a/tests/ui/extern/extern-thiscall.rs +++ b/tests/ui/extern/extern-thiscall.rs @@ -1,5 +1,5 @@ -// run-pass -// only-x86 +//@ run-pass +//@ only-x86 trait A { extern "thiscall" fn test1(i: i32); diff --git a/tests/ui/extern/extern-types-field-offset.rs b/tests/ui/extern/extern-types-field-offset.rs index bfbc1e9bffa..e9c4bb7b230 100644 --- a/tests/ui/extern/extern-types-field-offset.rs +++ b/tests/ui/extern/extern-types-field-offset.rs @@ -1,7 +1,7 @@ -// run-fail -// check-run-results -// exec-env:RUST_BACKTRACE=0 -// normalize-stderr-test: "(core/src/panicking\.rs):[0-9]+:[0-9]+" -> "$1:$$LINE:$$COL" +//@ run-fail +//@ check-run-results +//@ exec-env:RUST_BACKTRACE=0 +//@ normalize-stderr-test: "(core/src/panicking\.rs):[0-9]+:[0-9]+" -> "$1:$$LINE:$$COL" #![feature(extern_types)] extern "C" { diff --git a/tests/ui/extern/extern-types-inherent-impl.rs b/tests/ui/extern/extern-types-inherent-impl.rs index 3f09ac7b8c3..a746c74f110 100644 --- a/tests/ui/extern/extern-types-inherent-impl.rs +++ b/tests/ui/extern/extern-types-inherent-impl.rs @@ -1,7 +1,7 @@ // Test that inherent impls can be defined for extern types. -// check-pass -// aux-build:extern-types-inherent-impl.rs +//@ check-pass +//@ aux-build:extern-types-inherent-impl.rs #![feature(extern_types)] diff --git a/tests/ui/extern/extern-types-manual-sync-send.rs b/tests/ui/extern/extern-types-manual-sync-send.rs index 87eb3f62240..2df0cd4c923 100644 --- a/tests/ui/extern/extern-types-manual-sync-send.rs +++ b/tests/ui/extern/extern-types-manual-sync-send.rs @@ -1,4 +1,4 @@ -// run-pass +//@ run-pass // Test that unsafe impl for Sync/Send can be provided for extern types. #![feature(extern_types)] diff --git a/tests/ui/extern/extern-types-pointer-cast.rs b/tests/ui/extern/extern-types-pointer-cast.rs index de6955bfaaa..78dbee77b9c 100644 --- a/tests/ui/extern/extern-types-pointer-cast.rs +++ b/tests/ui/extern/extern-types-pointer-cast.rs @@ -1,4 +1,4 @@ -// run-pass +//@ run-pass #![allow(dead_code)] // Test that pointers to extern types can be cast from/to usize, // despite being !Sized. diff --git a/tests/ui/extern/extern-types-size_of_val.rs b/tests/ui/extern/extern-types-size_of_val.rs index 4c4de873b7f..cc4d34e59fa 100644 --- a/tests/ui/extern/extern-types-size_of_val.rs +++ b/tests/ui/extern/extern-types-size_of_val.rs @@ -1,8 +1,8 @@ -// run-fail -// check-run-results -// exec-env:RUST_BACKTRACE=0 -// normalize-stderr-test: "(core/src/panicking\.rs):[0-9]+:[0-9]+" -> "$1:$$LINE:$$COL" -// revisions: size align +//@ run-fail +//@ check-run-results +//@ exec-env:RUST_BACKTRACE=0 +//@ normalize-stderr-test: "(core/src/panicking\.rs):[0-9]+:[0-9]+" -> "$1:$$LINE:$$COL" +//@ revisions: size align #![feature(extern_types)] use std::mem::{align_of_val, size_of_val}; diff --git a/tests/ui/extern/extern-types-thin-pointer.rs b/tests/ui/extern/extern-types-thin-pointer.rs index b85fc4886ab..8e5911228b2 100644 --- a/tests/ui/extern/extern-types-thin-pointer.rs +++ b/tests/ui/extern/extern-types-thin-pointer.rs @@ -1,4 +1,4 @@ -// run-pass +//@ run-pass #![allow(dead_code)] // Test that pointers and references to extern types are thin, ie they have the same size and // alignment as a pointer to (). diff --git a/tests/ui/extern/extern-types-trait-impl.rs b/tests/ui/extern/extern-types-trait-impl.rs index 656101ed535..44300b10514 100644 --- a/tests/ui/extern/extern-types-trait-impl.rs +++ b/tests/ui/extern/extern-types-trait-impl.rs @@ -1,4 +1,4 @@ -// run-pass +//@ run-pass #![allow(dead_code)] // Test that traits can be implemented for extern types. #![feature(extern_types)] diff --git a/tests/ui/extern/extern-vectorcall.rs b/tests/ui/extern/extern-vectorcall.rs index a283573c9fb..c0d872bc14b 100644 --- a/tests/ui/extern/extern-vectorcall.rs +++ b/tests/ui/extern/extern-vectorcall.rs @@ -1,7 +1,7 @@ -// run-pass -// revisions: x64 x32 -// [x64]only-x86_64 -// [x32]only-x86 +//@ run-pass +//@ revisions: x64 x32 +//@ [x64]only-x86_64 +//@ [x32]only-x86 #![feature(abi_vectorcall)] diff --git a/tests/ui/extern/extern_fat_drop.rs b/tests/ui/extern/extern_fat_drop.rs index 1cd12c2cab3..9691f562d89 100644 --- a/tests/ui/extern/extern_fat_drop.rs +++ b/tests/ui/extern/extern_fat_drop.rs @@ -1,5 +1,5 @@ -// run-pass -// aux-build:fat_drop.rs +//@ run-pass +//@ aux-build:fat_drop.rs extern crate fat_drop; diff --git a/tests/ui/extern/issue-10025.rs b/tests/ui/extern/issue-10025.rs index 4439b468525..0bdcf7c5c58 100644 --- a/tests/ui/extern/issue-10025.rs +++ b/tests/ui/extern/issue-10025.rs @@ -1,5 +1,5 @@ -// run-pass -// pretty-expanded FIXME #23616 +//@ run-pass +//@ pretty-expanded FIXME #23616 #![allow(dead_code)] unsafe extern fn foo() {} diff --git a/tests/ui/extern/issue-10763.rs b/tests/ui/extern/issue-10763.rs index 627a8c2384c..2381f22f162 100644 --- a/tests/ui/extern/issue-10763.rs +++ b/tests/ui/extern/issue-10763.rs @@ -1,6 +1,6 @@ -// build-pass +//@ build-pass #![allow(dead_code)] -// pretty-expanded FIXME #23616 +//@ pretty-expanded FIXME #23616 extern "Rust" fn foo() {} diff --git a/tests/ui/extern/issue-10764-rpass.rs b/tests/ui/extern/issue-10764-rpass.rs index 42ed1ae93b5..4de387e3d66 100644 --- a/tests/ui/extern/issue-10764-rpass.rs +++ b/tests/ui/extern/issue-10764-rpass.rs @@ -1,4 +1,4 @@ -// run-pass -// pretty-expanded FIXME #23616 +//@ run-pass +//@ pretty-expanded FIXME #23616 extern "Rust" fn main() {} diff --git a/tests/ui/extern/issue-1251.rs b/tests/ui/extern/issue-1251.rs index c2c047c7961..bf701a41f94 100644 --- a/tests/ui/extern/issue-1251.rs +++ b/tests/ui/extern/issue-1251.rs @@ -1,8 +1,8 @@ -// build-pass +//@ build-pass #![allow(unused_attributes)] #![allow(dead_code)] -// pretty-expanded FIXME #23616 -// ignore-wasm32-bare no libc to test ffi with +//@ pretty-expanded FIXME #23616 +//@ ignore-wasm32-bare no libc to test ffi with #![feature(rustc_private)] mod rustrt { diff --git a/tests/ui/extern/issue-13655.rs b/tests/ui/extern/issue-13655.rs index a47b5183f2b..824a68d59d3 100644 --- a/tests/ui/extern/issue-13655.rs +++ b/tests/ui/extern/issue-13655.rs @@ -1,4 +1,4 @@ -// run-pass +//@ run-pass #![feature(fn_traits, unboxed_closures)] struct Foo(T); diff --git a/tests/ui/extern/issue-18576.rs b/tests/ui/extern/issue-18576.rs index 389cf108b05..0a98e85e484 100644 --- a/tests/ui/extern/issue-18576.rs +++ b/tests/ui/extern/issue-18576.rs @@ -1,6 +1,6 @@ -// run-fail -// error-pattern:stop -// ignore-emscripten no processes +//@ run-fail +//@ error-pattern:stop +//@ ignore-emscripten no processes // #18576 // Make sure that calling an extern function pointer in an unreachable diff --git a/tests/ui/extern/issue-64655-allow-unwind-when-calling-panic-directly.rs b/tests/ui/extern/issue-64655-allow-unwind-when-calling-panic-directly.rs index 24fc512dfbf..e9471d207da 100644 --- a/tests/ui/extern/issue-64655-allow-unwind-when-calling-panic-directly.rs +++ b/tests/ui/extern/issue-64655-allow-unwind-when-calling-panic-directly.rs @@ -1,6 +1,6 @@ -// run-pass -// needs-unwind -// ignore-emscripten no threads support +//@ run-pass +//@ needs-unwind +//@ ignore-emscripten no threads support // rust-lang/rust#64655: with panic=unwind, a panic from a subroutine // should still run destructors as it unwinds the stack. However, @@ -13,14 +13,14 @@ // test. // LTO settings cannot be combined with -C prefer-dynamic -// no-prefer-dynamic +//@ no-prefer-dynamic // The revisions just enumerate lto settings (the opt-level appeared irrelevant in practice) -// revisions: no thin fat -//[no]compile-flags: -C lto=no -//[thin]compile-flags: -C lto=thin -//[fat]compile-flags: -C lto=fat +//@ revisions: no thin fat +//@[no]compile-flags: -C lto=no +//@[thin]compile-flags: -C lto=thin +//@[fat]compile-flags: -C lto=fat #![feature(panic_internals)] diff --git a/tests/ui/extern/issue-64655-extern-rust-must-allow-unwind.rs b/tests/ui/extern/issue-64655-extern-rust-must-allow-unwind.rs index 3b263e58cbe..9486b5f1178 100644 --- a/tests/ui/extern/issue-64655-extern-rust-must-allow-unwind.rs +++ b/tests/ui/extern/issue-64655-extern-rust-must-allow-unwind.rs @@ -1,6 +1,6 @@ -// run-pass -// needs-unwind -// ignore-emscripten no threads support +//@ run-pass +//@ needs-unwind +//@ ignore-emscripten no threads support // rust-lang/rust#64655: with panic=unwind, a panic from a subroutine // should still run destructors as it unwinds the stack. However, @@ -28,26 +28,26 @@ // the underlying bug.) // LTO settings cannot be combined with -C prefer-dynamic -// no-prefer-dynamic +//@ no-prefer-dynamic // The revisions combine each lto setting with each optimization // setting; pnkfelix observed three differing behaviors at opt-levels // 0/1/2+3 for this test, so it seems prudent to be thorough. -// revisions: no0 no1 no2 no3 thin0 thin1 thin2 thin3 fat0 fat1 fat2 fat3 - -//[no0]compile-flags: -C opt-level=0 -C lto=no -//[no1]compile-flags: -C opt-level=1 -C lto=no -//[no2]compile-flags: -C opt-level=2 -C lto=no -//[no3]compile-flags: -C opt-level=3 -C lto=no -//[thin0]compile-flags: -C opt-level=0 -C lto=thin -//[thin1]compile-flags: -C opt-level=1 -C lto=thin -//[thin2]compile-flags: -C opt-level=2 -C lto=thin -//[thin3]compile-flags: -C opt-level=3 -C lto=thin -//[fat0]compile-flags: -C opt-level=0 -C lto=fat -//[fat1]compile-flags: -C opt-level=1 -C lto=fat -//[fat2]compile-flags: -C opt-level=2 -C lto=fat -//[fat3]compile-flags: -C opt-level=3 -C lto=fat +//@ revisions: no0 no1 no2 no3 thin0 thin1 thin2 thin3 fat0 fat1 fat2 fat3 + +//@[no0]compile-flags: -C opt-level=0 -C lto=no +//@[no1]compile-flags: -C opt-level=1 -C lto=no +//@[no2]compile-flags: -C opt-level=2 -C lto=no +//@[no3]compile-flags: -C opt-level=3 -C lto=no +//@[thin0]compile-flags: -C opt-level=0 -C lto=thin +//@[thin1]compile-flags: -C opt-level=1 -C lto=thin +//@[thin2]compile-flags: -C opt-level=2 -C lto=thin +//@[thin3]compile-flags: -C opt-level=3 -C lto=thin +//@[fat0]compile-flags: -C opt-level=0 -C lto=fat +//@[fat1]compile-flags: -C opt-level=1 -C lto=fat +//@[fat2]compile-flags: -C opt-level=2 -C lto=fat +//@[fat3]compile-flags: -C opt-level=3 -C lto=fat fn main() { use std::sync::atomic::{AtomicUsize, Ordering}; diff --git a/tests/ui/extern/issue-80074.rs b/tests/ui/extern/issue-80074.rs index 6e4f176de82..ba7b55a450f 100644 --- a/tests/ui/extern/issue-80074.rs +++ b/tests/ui/extern/issue-80074.rs @@ -1,6 +1,6 @@ -// edition:2018 -// aux-crate:issue_80074=issue-80074-macro.rs -// aux-crate:issue_80074_2=issue-80074-macro-2.rs +//@ edition:2018 +//@ aux-crate:issue_80074=issue-80074-macro.rs +//@ aux-crate:issue_80074_2=issue-80074-macro-2.rs #[macro_use] extern crate issue_80074; diff --git a/tests/ui/extern/issue-95829.rs b/tests/ui/extern/issue-95829.rs index 3379148ae7b..ad4e04f7c3a 100644 --- a/tests/ui/extern/issue-95829.rs +++ b/tests/ui/extern/issue-95829.rs @@ -1,4 +1,4 @@ -// edition:2018 +//@ edition:2018 extern { async fn L() { //~ ERROR: incorrect function inside `extern` block diff --git a/tests/ui/extern/no-mangle-associated-fn.rs b/tests/ui/extern/no-mangle-associated-fn.rs index 56afd8b9092..b02435509cc 100644 --- a/tests/ui/extern/no-mangle-associated-fn.rs +++ b/tests/ui/extern/no-mangle-associated-fn.rs @@ -1,5 +1,5 @@ -// aux-build: no-mangle-associated-fn.rs -// run-pass +//@ aux-build: no-mangle-associated-fn.rs +//@ run-pass extern crate no_mangle_associated_fn; diff --git a/tests/ui/extoption_env-not-defined.rs b/tests/ui/extoption_env-not-defined.rs index 4014902ffed..90a01a80313 100644 --- a/tests/ui/extoption_env-not-defined.rs +++ b/tests/ui/extoption_env-not-defined.rs @@ -1,4 +1,4 @@ -// run-pass +//@ run-pass pub fn main() { assert!(option_env!("__HOPEFULLY_DOESNT_EXIST__").is_none()); diff --git a/tests/ui/fact.rs b/tests/ui/fact.rs index c6c2f57e75c..e94c12da013 100644 --- a/tests/ui/fact.rs +++ b/tests/ui/fact.rs @@ -1,4 +1,4 @@ -// run-pass +//@ run-pass fn f(x: isize) -> isize { // println!("in f:"); diff --git a/tests/ui/feature-gates/allow-features-empty.rs b/tests/ui/feature-gates/allow-features-empty.rs index 88a60934927..65f9be74c6c 100644 --- a/tests/ui/feature-gates/allow-features-empty.rs +++ b/tests/ui/feature-gates/allow-features-empty.rs @@ -1,4 +1,4 @@ -// compile-flags: -Z allow_features= +//@ compile-flags: -Z allow_features= // Note: This test uses rustc internal flags because they will never stabilize. #![feature(lang_items)] //~ ERROR diff --git a/tests/ui/feature-gates/allow-features.rs b/tests/ui/feature-gates/allow-features.rs index 2ce4701a818..b23759da810 100644 --- a/tests/ui/feature-gates/allow-features.rs +++ b/tests/ui/feature-gates/allow-features.rs @@ -1,4 +1,4 @@ -// compile-flags: -Z allow_features=lang_items +//@ compile-flags: -Z allow_features=lang_items // Note: This test uses rustc internal flags because they will never stabilize. #![feature(lang_items)] diff --git a/tests/ui/feature-gates/bench.rs b/tests/ui/feature-gates/bench.rs index 8de390becbe..2ce1d50fbb0 100644 --- a/tests/ui/feature-gates/bench.rs +++ b/tests/ui/feature-gates/bench.rs @@ -1,4 +1,4 @@ -// edition:2018 +//@ edition:2018 #[bench] //~ ERROR use of unstable library feature 'test' //~| WARN this was previously accepted diff --git a/tests/ui/feature-gates/env-flag.rs b/tests/ui/feature-gates/env-flag.rs index 598773cf3e4..0abc9399406 100644 --- a/tests/ui/feature-gates/env-flag.rs +++ b/tests/ui/feature-gates/env-flag.rs @@ -1,3 +1,3 @@ -// compile-flags: --env-set A=B +//@ compile-flags: --env-set A=B fn main() {} diff --git a/tests/ui/feature-gates/feature-gate-abi-avr-interrupt.rs b/tests/ui/feature-gates/feature-gate-abi-avr-interrupt.rs index 05461297afd..f37c5335deb 100644 --- a/tests/ui/feature-gates/feature-gate-abi-avr-interrupt.rs +++ b/tests/ui/feature-gates/feature-gate-abi-avr-interrupt.rs @@ -1,5 +1,5 @@ -// needs-llvm-components: avr -// compile-flags: --target=avr-unknown-gnu-atmega328 --crate-type=rlib +//@ needs-llvm-components: avr +//@ compile-flags: --target=avr-unknown-gnu-atmega328 --crate-type=rlib #![no_core] #![feature(no_core, lang_items)] #[lang="sized"] diff --git a/tests/ui/feature-gates/feature-gate-abi-msp430-interrupt.rs b/tests/ui/feature-gates/feature-gate-abi-msp430-interrupt.rs index 8b7d8066aa6..b0fb4c414d4 100644 --- a/tests/ui/feature-gates/feature-gate-abi-msp430-interrupt.rs +++ b/tests/ui/feature-gates/feature-gate-abi-msp430-interrupt.rs @@ -1,5 +1,5 @@ -// needs-llvm-components: msp430 -// compile-flags: --target=msp430-none-elf --crate-type=rlib +//@ needs-llvm-components: msp430 +//@ compile-flags: --target=msp430-none-elf --crate-type=rlib #![no_core] #![feature(no_core, lang_items)] #[lang="sized"] diff --git a/tests/ui/feature-gates/feature-gate-abi-riscv-interrupt.rs b/tests/ui/feature-gates/feature-gate-abi-riscv-interrupt.rs index 7755a46da3b..29820f8877d 100644 --- a/tests/ui/feature-gates/feature-gate-abi-riscv-interrupt.rs +++ b/tests/ui/feature-gates/feature-gate-abi-riscv-interrupt.rs @@ -1,5 +1,5 @@ -// needs-llvm-components: riscv -// compile-flags: --target=riscv32imc-unknown-none-elf --crate-type=rlib +//@ needs-llvm-components: riscv +//@ compile-flags: --target=riscv32imc-unknown-none-elf --crate-type=rlib #![no_core] #![feature(no_core, lang_items)] #[lang = "sized"] diff --git a/tests/ui/feature-gates/feature-gate-abi-x86-interrupt.rs b/tests/ui/feature-gates/feature-gate-abi-x86-interrupt.rs index 7c3e4d10d99..812ca12c7c3 100644 --- a/tests/ui/feature-gates/feature-gate-abi-x86-interrupt.rs +++ b/tests/ui/feature-gates/feature-gate-abi-x86-interrupt.rs @@ -1,5 +1,5 @@ -// needs-llvm-components: x86 -// compile-flags: --target=x86_64-unknown-linux-gnu --crate-type=rlib +//@ needs-llvm-components: x86 +//@ compile-flags: --target=x86_64-unknown-linux-gnu --crate-type=rlib #![no_core] #![feature(no_core, lang_items)] #[lang="sized"] diff --git a/tests/ui/feature-gates/feature-gate-abi.rs b/tests/ui/feature-gates/feature-gate-abi.rs index 39f98ac908b..02568b4778b 100644 --- a/tests/ui/feature-gates/feature-gate-abi.rs +++ b/tests/ui/feature-gates/feature-gate-abi.rs @@ -1,6 +1,6 @@ // gate-test-intrinsics // gate-test-platform_intrinsics -// compile-flags: --crate-type=rlib +//@ compile-flags: --crate-type=rlib #![feature(no_core, lang_items)] #![no_core] diff --git a/tests/ui/feature-gates/feature-gate-abi_ptx.rs b/tests/ui/feature-gates/feature-gate-abi_ptx.rs index e3405641ecd..83f48430281 100644 --- a/tests/ui/feature-gates/feature-gate-abi_ptx.rs +++ b/tests/ui/feature-gates/feature-gate-abi_ptx.rs @@ -1,5 +1,5 @@ -// needs-llvm-components: nvptx -// compile-flags: --target=nvptx64-nvidia-cuda --crate-type=rlib +//@ needs-llvm-components: nvptx +//@ compile-flags: --target=nvptx64-nvidia-cuda --crate-type=rlib #![no_core] #![feature(no_core, lang_items)] #[lang="sized"] diff --git a/tests/ui/feature-gates/feature-gate-alloc-error-handler.rs b/tests/ui/feature-gates/feature-gate-alloc-error-handler.rs index 78d189d20b6..2d099e24db8 100644 --- a/tests/ui/feature-gates/feature-gate-alloc-error-handler.rs +++ b/tests/ui/feature-gates/feature-gate-alloc-error-handler.rs @@ -1,4 +1,4 @@ -// compile-flags:-C panic=abort +//@ compile-flags:-C panic=abort #![no_std] #![no_main] diff --git a/tests/ui/feature-gates/feature-gate-asm_const.rs b/tests/ui/feature-gates/feature-gate-asm_const.rs index 936918a3cfc..42d5ba69222 100644 --- a/tests/ui/feature-gates/feature-gate-asm_const.rs +++ b/tests/ui/feature-gates/feature-gate-asm_const.rs @@ -1,4 +1,4 @@ -// only-x86_64 +//@ only-x86_64 use std::arch::asm; diff --git a/tests/ui/feature-gates/feature-gate-asm_experimental_arch.rs b/tests/ui/feature-gates/feature-gate-asm_experimental_arch.rs index 53e2a4d132c..a52fbbe4075 100644 --- a/tests/ui/feature-gates/feature-gate-asm_experimental_arch.rs +++ b/tests/ui/feature-gates/feature-gate-asm_experimental_arch.rs @@ -1,5 +1,5 @@ -// compile-flags: --target mips-unknown-linux-gnu -// needs-llvm-components: mips +//@ compile-flags: --target mips-unknown-linux-gnu +//@ needs-llvm-components: mips #![feature(no_core, lang_items, rustc_attrs)] #![crate_type = "rlib"] diff --git a/tests/ui/feature-gates/feature-gate-asm_unwind.rs b/tests/ui/feature-gates/feature-gate-asm_unwind.rs index df161b60081..78c1e6c9447 100644 --- a/tests/ui/feature-gates/feature-gate-asm_unwind.rs +++ b/tests/ui/feature-gates/feature-gate-asm_unwind.rs @@ -1,4 +1,4 @@ -// only-x86_64 +//@ only-x86_64 use std::arch::asm; diff --git a/tests/ui/feature-gates/feature-gate-cfg-target-thread-local.rs b/tests/ui/feature-gates/feature-gate-cfg-target-thread-local.rs index 801956c3339..3ab5a500dfd 100644 --- a/tests/ui/feature-gates/feature-gate-cfg-target-thread-local.rs +++ b/tests/ui/feature-gates/feature-gate-cfg-target-thread-local.rs @@ -1,5 +1,5 @@ -// ignore-windows -// aux-build:cfg-target-thread-local.rs +//@ ignore-windows +//@ aux-build:cfg-target-thread-local.rs #![feature(thread_local)] diff --git a/tests/ui/feature-gates/feature-gate-check-cfg.rs b/tests/ui/feature-gates/feature-gate-check-cfg.rs index 953b8e3ffce..1e0106aa748 100644 --- a/tests/ui/feature-gates/feature-gate-check-cfg.rs +++ b/tests/ui/feature-gates/feature-gate-check-cfg.rs @@ -1,3 +1,3 @@ -// compile-flags: --check-cfg "cfg()" +//@ compile-flags: --check-cfg "cfg()" fn main() {} diff --git a/tests/ui/feature-gates/feature-gate-closure_track_caller.rs b/tests/ui/feature-gates/feature-gate-closure_track_caller.rs index 58a9c84be5a..93bf83ecf53 100644 --- a/tests/ui/feature-gates/feature-gate-closure_track_caller.rs +++ b/tests/ui/feature-gates/feature-gate-closure_track_caller.rs @@ -1,4 +1,4 @@ -// edition:2021 +//@ edition:2021 #![feature(stmt_expr_attributes)] #![feature(coroutines)] diff --git a/tests/ui/feature-gates/feature-gate-const-indexing.rs b/tests/ui/feature-gates/feature-gate-const-indexing.rs index 2b1067b3489..cbdd0ba9c1d 100644 --- a/tests/ui/feature-gates/feature-gate-const-indexing.rs +++ b/tests/ui/feature-gates/feature-gate-const-indexing.rs @@ -1,4 +1,4 @@ -// build-pass (FIXME(62277): could be check-pass?) +//@ build-pass (FIXME(62277): could be check-pass?) fn main() { const ARR: [i32; 6] = [42, 43, 44, 45, 46, 47]; diff --git a/tests/ui/feature-gates/feature-gate-const_refs_to_cell.rs b/tests/ui/feature-gates/feature-gate-const_refs_to_cell.rs index 63159ed0553..bd908676c8b 100644 --- a/tests/ui/feature-gates/feature-gate-const_refs_to_cell.rs +++ b/tests/ui/feature-gates/feature-gate-const_refs_to_cell.rs @@ -1,4 +1,4 @@ -// check-pass +//@ check-pass #![feature(const_refs_to_cell)] diff --git a/tests/ui/feature-gates/feature-gate-coroutines.rs b/tests/ui/feature-gates/feature-gate-coroutines.rs index 53b58d486a8..b3df2351b68 100644 --- a/tests/ui/feature-gates/feature-gate-coroutines.rs +++ b/tests/ui/feature-gates/feature-gate-coroutines.rs @@ -1,5 +1,5 @@ -// revisions: e2024 none -//[e2024] compile-flags: --edition 2024 -Zunstable-options +//@ revisions: e2024 none +//@[e2024] compile-flags: --edition 2024 -Zunstable-options fn main() { yield true; //~ ERROR yield syntax is experimental diff --git a/tests/ui/feature-gates/feature-gate-gen_blocks.rs b/tests/ui/feature-gates/feature-gate-gen_blocks.rs index ff9a0b139c0..d9bfeac36ed 100644 --- a/tests/ui/feature-gates/feature-gate-gen_blocks.rs +++ b/tests/ui/feature-gates/feature-gate-gen_blocks.rs @@ -1,5 +1,5 @@ -// revisions: e2024 none -//[e2024] compile-flags: --edition 2024 -Zunstable-options +//@ revisions: e2024 none +//@[e2024] compile-flags: --edition 2024 -Zunstable-options fn test_gen() { gen {}; diff --git a/tests/ui/feature-gates/feature-gate-generic_arg_infer.rs b/tests/ui/feature-gates/feature-gate-generic_arg_infer.rs index be66560fd92..0473253004a 100644 --- a/tests/ui/feature-gates/feature-gate-generic_arg_infer.rs +++ b/tests/ui/feature-gates/feature-gate-generic_arg_infer.rs @@ -1,5 +1,5 @@ -// [feature] run-pass -// revisions: normal feature +//@ [feature] run-pass +//@ revisions: normal feature #![cfg_attr(feature, feature(generic_arg_infer))] diff --git a/tests/ui/feature-gates/feature-gate-multiple_supertrait_upcastable.rs b/tests/ui/feature-gates/feature-gate-multiple_supertrait_upcastable.rs index 4e296b96ca9..064a781f6c8 100644 --- a/tests/ui/feature-gates/feature-gate-multiple_supertrait_upcastable.rs +++ b/tests/ui/feature-gates/feature-gate-multiple_supertrait_upcastable.rs @@ -1,4 +1,4 @@ -// check-pass +//@ check-pass #![deny(multiple_supertrait_upcastable)] //~^ WARNING unknown lint: `multiple_supertrait_upcastable` diff --git a/tests/ui/feature-gates/feature-gate-naked_functions.rs b/tests/ui/feature-gates/feature-gate-naked_functions.rs index dc561234809..36980fd74c2 100644 --- a/tests/ui/feature-gates/feature-gate-naked_functions.rs +++ b/tests/ui/feature-gates/feature-gate-naked_functions.rs @@ -1,4 +1,4 @@ -// needs-asm-support +//@ needs-asm-support use std::arch::asm; diff --git a/tests/ui/feature-gates/feature-gate-non_exhaustive_omitted_patterns_lint.rs b/tests/ui/feature-gates/feature-gate-non_exhaustive_omitted_patterns_lint.rs index 1db3c2ccdde..3a50518576d 100644 --- a/tests/ui/feature-gates/feature-gate-non_exhaustive_omitted_patterns_lint.rs +++ b/tests/ui/feature-gates/feature-gate-non_exhaustive_omitted_patterns_lint.rs @@ -1,4 +1,4 @@ -// check-fail +//@ check-fail #![deny(non_exhaustive_omitted_patterns)] //~^ WARNING unknown lint: `non_exhaustive_omitted_patterns` diff --git a/tests/ui/feature-gates/feature-gate-proc_macro_byte_character.rs b/tests/ui/feature-gates/feature-gate-proc_macro_byte_character.rs index 0648ce0ee20..03071c351a4 100644 --- a/tests/ui/feature-gates/feature-gate-proc_macro_byte_character.rs +++ b/tests/ui/feature-gates/feature-gate-proc_macro_byte_character.rs @@ -1,4 +1,4 @@ -// force-host +//@ force-host #![crate_type = "proc-macro"] extern crate proc_macro; diff --git a/tests/ui/feature-gates/feature-gate-proc_macro_c_str_literals.rs b/tests/ui/feature-gates/feature-gate-proc_macro_c_str_literals.rs index 5554c813925..1750fe952f5 100644 --- a/tests/ui/feature-gates/feature-gate-proc_macro_c_str_literals.rs +++ b/tests/ui/feature-gates/feature-gate-proc_macro_c_str_literals.rs @@ -1,5 +1,5 @@ -// edition: 2021 -// force-host +//@ edition: 2021 +//@ force-host #![crate_type = "proc-macro"] extern crate proc_macro; diff --git a/tests/ui/feature-gates/feature-gate-public_private_dependencies.rs b/tests/ui/feature-gates/feature-gate-public_private_dependencies.rs index b8fb4b8dc19..959c9e6c20d 100644 --- a/tests/ui/feature-gates/feature-gate-public_private_dependencies.rs +++ b/tests/ui/feature-gates/feature-gate-public_private_dependencies.rs @@ -4,8 +4,8 @@ // This is due to the fact that 'public_private_dependencies' just enables // a lint, so disabling it shouldn't cause any code to stop compiling. -// run-pass -// aux-build:pub_dep.rs +//@ run-pass +//@ aux-build:pub_dep.rs // Without ![feature(public_private_dependencies)], // this should do nothing/ diff --git a/tests/ui/feature-gates/feature-gate-return_type_notation.rs b/tests/ui/feature-gates/feature-gate-return_type_notation.rs index 60ac9f8d4f1..7ae6cd0234b 100644 --- a/tests/ui/feature-gates/feature-gate-return_type_notation.rs +++ b/tests/ui/feature-gates/feature-gate-return_type_notation.rs @@ -1,7 +1,7 @@ -// edition: 2021 -// revisions: cfg no +//@ edition: 2021 +//@ revisions: cfg no -// [no] check-pass +//@ [no] check-pass // Since we're not adding new syntax, `cfg`'d out RTN must pass. diff --git a/tests/ui/feature-gates/feature-gate-simd.rs b/tests/ui/feature-gates/feature-gate-simd.rs index d01d33de289..de5f645e6fd 100644 --- a/tests/ui/feature-gates/feature-gate-simd.rs +++ b/tests/ui/feature-gates/feature-gate-simd.rs @@ -1,4 +1,4 @@ -// pretty-expanded FIXME #23616 +//@ pretty-expanded FIXME #23616 #[repr(simd)] //~ ERROR SIMD types are experimental struct RGBA { diff --git a/tests/ui/feature-gates/feature-gate-strict_provenance.rs b/tests/ui/feature-gates/feature-gate-strict_provenance.rs index 24b8369b3d8..738c8daa168 100644 --- a/tests/ui/feature-gates/feature-gate-strict_provenance.rs +++ b/tests/ui/feature-gates/feature-gate-strict_provenance.rs @@ -1,4 +1,4 @@ -// check-pass +//@ check-pass #![deny(fuzzy_provenance_casts)] //~^ WARNING unknown lint: `fuzzy_provenance_casts` diff --git a/tests/ui/feature-gates/feature-gate-test_unstable_lint.rs b/tests/ui/feature-gates/feature-gate-test_unstable_lint.rs index 3882ba9a227..8bae9ff32b4 100644 --- a/tests/ui/feature-gates/feature-gate-test_unstable_lint.rs +++ b/tests/ui/feature-gates/feature-gate-test_unstable_lint.rs @@ -1,4 +1,4 @@ -// check-pass +//@ check-pass // `test_unstable_lint` is for testing and should never be stabilized. #![allow(test_unstable_lint)] diff --git a/tests/ui/feature-gates/feature-gate-trivial_bounds-lint.rs b/tests/ui/feature-gates/feature-gate-trivial_bounds-lint.rs index 8f68d5d6dd2..32445c101d7 100644 --- a/tests/ui/feature-gates/feature-gate-trivial_bounds-lint.rs +++ b/tests/ui/feature-gates/feature-gate-trivial_bounds-lint.rs @@ -1,4 +1,4 @@ -// run-pass +//@ run-pass #![allow(unused)] #![deny(trivial_bounds)] // Ignored without the trivial_bounds feature flag. diff --git a/tests/ui/feature-gates/feature-gate-try_blocks.rs b/tests/ui/feature-gates/feature-gate-try_blocks.rs index 06cadd82c07..f565dd014de 100644 --- a/tests/ui/feature-gates/feature-gate-try_blocks.rs +++ b/tests/ui/feature-gates/feature-gate-try_blocks.rs @@ -1,4 +1,4 @@ -// compile-flags: --edition 2018 +//@ compile-flags: --edition 2018 pub fn main() { let try_result: Option<_> = try { //~ ERROR `try` expression is experimental diff --git a/tests/ui/feature-gates/feature-gate-type_alias_impl_trait.rs b/tests/ui/feature-gates/feature-gate-type_alias_impl_trait.rs index 3f49020bbea..6d17f5e837d 100644 --- a/tests/ui/feature-gates/feature-gate-type_alias_impl_trait.rs +++ b/tests/ui/feature-gates/feature-gate-type_alias_impl_trait.rs @@ -1,4 +1,4 @@ -// check-pass +//@ check-pass #![feature(type_alias_impl_trait)] use std::fmt::Debug; diff --git a/tests/ui/feature-gates/feature-gate-type_privacy_lints.rs b/tests/ui/feature-gates/feature-gate-type_privacy_lints.rs index 80e51b265db..c537fc419f6 100644 --- a/tests/ui/feature-gates/feature-gate-type_privacy_lints.rs +++ b/tests/ui/feature-gates/feature-gate-type_privacy_lints.rs @@ -1,4 +1,4 @@ -// check-pass +//@ check-pass #![warn(unnameable_types)] //~ WARN unknown lint fn main() {} diff --git a/tests/ui/feature-gates/feature-gate-unsafe_pin_internals.rs b/tests/ui/feature-gates/feature-gate-unsafe_pin_internals.rs index 594a2672d43..deb5a2f691b 100644 --- a/tests/ui/feature-gates/feature-gate-unsafe_pin_internals.rs +++ b/tests/ui/feature-gates/feature-gate-unsafe_pin_internals.rs @@ -1,4 +1,4 @@ -// edition:2018 +//@ edition:2018 #![forbid(internal_features, unsafe_code)] #![feature(unsafe_pin_internals)] //~^ ERROR the feature `unsafe_pin_internals` is internal to the compiler or standard library diff --git a/tests/ui/feature-gates/feature-gate-vectorcall.rs b/tests/ui/feature-gates/feature-gate-vectorcall.rs index 706780dfd6c..73a11a842f3 100644 --- a/tests/ui/feature-gates/feature-gate-vectorcall.rs +++ b/tests/ui/feature-gates/feature-gate-vectorcall.rs @@ -1,6 +1,6 @@ // gate-test-abi_vectorcall -// needs-llvm-components: x86 -// compile-flags: --target=i686-pc-windows-msvc --crate-type=rlib +//@ needs-llvm-components: x86 +//@ compile-flags: --target=i686-pc-windows-msvc --crate-type=rlib #![no_core] #![feature(no_core, lang_items)] #[lang="sized"] diff --git a/tests/ui/feature-gates/feature-gate-wasm_abi.rs b/tests/ui/feature-gates/feature-gate-wasm_abi.rs index 222c88daf94..da1d9300a2b 100644 --- a/tests/ui/feature-gates/feature-gate-wasm_abi.rs +++ b/tests/ui/feature-gates/feature-gate-wasm_abi.rs @@ -1,5 +1,5 @@ -// needs-llvm-components: webassembly -// compile-flags: --target=wasm32-unknown-unknown --crate-type=rlib +//@ needs-llvm-components: webassembly +//@ compile-flags: --target=wasm32-unknown-unknown --crate-type=rlib #![no_core] #![feature(no_core, lang_items)] #[lang="sized"] diff --git a/tests/ui/feature-gates/feature-gate-yeet_expr-in-cfg.rs b/tests/ui/feature-gates/feature-gate-yeet_expr-in-cfg.rs index a33bd34508c..6fe51330118 100644 --- a/tests/ui/feature-gates/feature-gate-yeet_expr-in-cfg.rs +++ b/tests/ui/feature-gates/feature-gate-yeet_expr-in-cfg.rs @@ -1,4 +1,4 @@ -// compile-flags: --edition 2021 +//@ compile-flags: --edition 2021 pub fn demo() -> Option { #[cfg(nope)] diff --git a/tests/ui/feature-gates/feature-gate-yeet_expr.rs b/tests/ui/feature-gates/feature-gate-yeet_expr.rs index 978a84cf6e5..12cc17e1cc8 100644 --- a/tests/ui/feature-gates/feature-gate-yeet_expr.rs +++ b/tests/ui/feature-gates/feature-gate-yeet_expr.rs @@ -1,4 +1,4 @@ -// compile-flags: --edition 2018 +//@ compile-flags: --edition 2018 pub fn demo() -> Option { do yeet //~ ERROR `do yeet` expression is experimental diff --git a/tests/ui/feature-gates/issue-43106-gating-of-builtin-attrs.rs b/tests/ui/feature-gates/issue-43106-gating-of-builtin-attrs.rs index 1fa315f3d21..141927b4de8 100644 --- a/tests/ui/feature-gates/issue-43106-gating-of-builtin-attrs.rs +++ b/tests/ui/feature-gates/issue-43106-gating-of-builtin-attrs.rs @@ -34,7 +34,7 @@ // inputs are handled by each, and (2.) to ease searching for related // occurrences in the source text. -// check-pass +//@ check-pass #![feature(test)] #![warn(unused_attributes, unknown_lints)] diff --git a/tests/ui/feature-gates/issue-43106-gating-of-deprecated.rs b/tests/ui/feature-gates/issue-43106-gating-of-deprecated.rs index 5e1d08dd919..61cb162e030 100644 --- a/tests/ui/feature-gates/issue-43106-gating-of-deprecated.rs +++ b/tests/ui/feature-gates/issue-43106-gating-of-deprecated.rs @@ -5,7 +5,7 @@ // // (For non-crate-level cases, see issue-43106-gating-of-builtin-attrs.rs) -// check-pass +//@ check-pass #![deprecated] diff --git a/tests/ui/feature-gates/issue-43106-gating-of-macro_escape.rs b/tests/ui/feature-gates/issue-43106-gating-of-macro_escape.rs index de00bc4cbac..f976e468b02 100644 --- a/tests/ui/feature-gates/issue-43106-gating-of-macro_escape.rs +++ b/tests/ui/feature-gates/issue-43106-gating-of-macro_escape.rs @@ -3,7 +3,7 @@ // `#![macro_escape]` is incompatible with crate-level `#![macro_use]` // already present in issue-43106-gating-of-builtin-attrs. -// check-pass +//@ check-pass #![macro_escape] //~^ WARN `#[macro_escape]` is a deprecated synonym for `#[macro_use]` diff --git a/tests/ui/feature-gates/soft-syntax-gates-with-errors.rs b/tests/ui/feature-gates/soft-syntax-gates-with-errors.rs index 49f1cba7151..2aa2ed34020 100644 --- a/tests/ui/feature-gates/soft-syntax-gates-with-errors.rs +++ b/tests/ui/feature-gates/soft-syntax-gates-with-errors.rs @@ -1,4 +1,4 @@ -// check-fail +//@ check-fail // This file is used to test the behavior of the early-pass syntax warnings. // If macro syntax is stabilized, replace with a different unstable syntax. diff --git a/tests/ui/feature-gates/soft-syntax-gates-without-errors.rs b/tests/ui/feature-gates/soft-syntax-gates-without-errors.rs index ca4ad2320f6..056c8fb04f4 100644 --- a/tests/ui/feature-gates/soft-syntax-gates-without-errors.rs +++ b/tests/ui/feature-gates/soft-syntax-gates-without-errors.rs @@ -1,4 +1,4 @@ -// check-pass +//@ check-pass // This file is used to test the behavior of the early-pass syntax warnings. // If macro syntax is stabilized, replace with a different unstable syntax. diff --git a/tests/ui/feature-gates/test-listing-format-json.rs b/tests/ui/feature-gates/test-listing-format-json.rs index 2dd0e10b521..628374c1f5b 100644 --- a/tests/ui/feature-gates/test-listing-format-json.rs +++ b/tests/ui/feature-gates/test-listing-format-json.rs @@ -1,10 +1,10 @@ -// no-prefer-dynamic -// compile-flags: --test -// run-flags: --list --format json -Zunstable-options -// run-fail -// check-run-results -// ignore-nightly -// unset-exec-env:RUSTC_BOOTSTRAP +//@ no-prefer-dynamic +//@ compile-flags: --test +//@ run-flags: --list --format json -Zunstable-options +//@ run-fail +//@ check-run-results +//@ ignore-nightly +//@ unset-exec-env:RUSTC_BOOTSTRAP #![cfg(test)] #[test] diff --git a/tests/ui/filter-block-view-items.rs b/tests/ui/filter-block-view-items.rs index e63aa91577b..edb9ce38006 100644 --- a/tests/ui/filter-block-view-items.rs +++ b/tests/ui/filter-block-view-items.rs @@ -1,5 +1,5 @@ -// run-pass -// pretty-expanded FIXME #23616 +//@ run-pass +//@ pretty-expanded FIXME #23616 pub fn main() { // Make sure that this view item is filtered out because otherwise it would diff --git a/tests/ui/fmt/auxiliary/format-string-proc-macro.rs b/tests/ui/fmt/auxiliary/format-string-proc-macro.rs index 0c39ade721f..5c00c9c0800 100644 --- a/tests/ui/fmt/auxiliary/format-string-proc-macro.rs +++ b/tests/ui/fmt/auxiliary/format-string-proc-macro.rs @@ -1,5 +1,5 @@ -// force-host -// no-prefer-dynamic +//@ force-host +//@ no-prefer-dynamic #![crate_type = "proc-macro"] diff --git a/tests/ui/fmt/format-args-capture-first-literal-is-macro.rs b/tests/ui/fmt/format-args-capture-first-literal-is-macro.rs index bf5c0dcb54d..5afd21a17e5 100644 --- a/tests/ui/fmt/format-args-capture-first-literal-is-macro.rs +++ b/tests/ui/fmt/format-args-capture-first-literal-is-macro.rs @@ -1,4 +1,4 @@ -// aux-build:format-string-proc-macro.rs +//@ aux-build:format-string-proc-macro.rs #[macro_use] extern crate format_string_proc_macro; diff --git a/tests/ui/fmt/format-args-capture-from-pm-first-arg-macro.rs b/tests/ui/fmt/format-args-capture-from-pm-first-arg-macro.rs index f67edf5e167..24531e4ece4 100644 --- a/tests/ui/fmt/format-args-capture-from-pm-first-arg-macro.rs +++ b/tests/ui/fmt/format-args-capture-from-pm-first-arg-macro.rs @@ -1,4 +1,4 @@ -// aux-build:format-string-proc-macro.rs +//@ aux-build:format-string-proc-macro.rs extern crate format_string_proc_macro; diff --git a/tests/ui/fmt/format-args-capture-issue-106408.rs b/tests/ui/fmt/format-args-capture-issue-106408.rs index 0fd195416ee..7c29e37441c 100644 --- a/tests/ui/fmt/format-args-capture-issue-106408.rs +++ b/tests/ui/fmt/format-args-capture-issue-106408.rs @@ -1,5 +1,5 @@ -// check-pass -// aux-build:format-string-proc-macro.rs +//@ check-pass +//@ aux-build:format-string-proc-macro.rs extern crate format_string_proc_macro; diff --git a/tests/ui/fmt/format-args-capture-macro-hygiene-pass.rs b/tests/ui/fmt/format-args-capture-macro-hygiene-pass.rs index 7553fcc4e01..53910afe28b 100644 --- a/tests/ui/fmt/format-args-capture-macro-hygiene-pass.rs +++ b/tests/ui/fmt/format-args-capture-macro-hygiene-pass.rs @@ -1,4 +1,4 @@ -// run-pass +//@ run-pass macro_rules! format_mbe { ($tt:tt) => { diff --git a/tests/ui/fmt/format-args-capture-macro-hygiene.rs b/tests/ui/fmt/format-args-capture-macro-hygiene.rs index b04f80ba406..2ef81f2cd42 100644 --- a/tests/ui/fmt/format-args-capture-macro-hygiene.rs +++ b/tests/ui/fmt/format-args-capture-macro-hygiene.rs @@ -1,4 +1,4 @@ -// aux-build:format-string-proc-macro.rs +//@ aux-build:format-string-proc-macro.rs #[macro_use] extern crate format_string_proc_macro; diff --git a/tests/ui/fmt/format-args-capture.rs b/tests/ui/fmt/format-args-capture.rs index 560352b5cb9..8562ae305f8 100644 --- a/tests/ui/fmt/format-args-capture.rs +++ b/tests/ui/fmt/format-args-capture.rs @@ -1,4 +1,4 @@ -// run-pass +//@ run-pass fn main() { named_argument_takes_precedence_to_captured(); diff --git a/tests/ui/fmt/format-expanded-string.rs b/tests/ui/fmt/format-expanded-string.rs index 4c716f08c71..d9b96bdece3 100644 --- a/tests/ui/fmt/format-expanded-string.rs +++ b/tests/ui/fmt/format-expanded-string.rs @@ -1,4 +1,4 @@ -// aux-build:format-string-proc-macro.rs +//@ aux-build:format-string-proc-macro.rs #[macro_use] extern crate format_string_proc_macro; diff --git a/tests/ui/fmt/format-with-yield-point.rs b/tests/ui/fmt/format-with-yield-point.rs index e484074cc9a..4622daa5b4a 100644 --- a/tests/ui/fmt/format-with-yield-point.rs +++ b/tests/ui/fmt/format-with-yield-point.rs @@ -1,5 +1,5 @@ -// check-pass -// edition:2021 +//@ check-pass +//@ edition:2021 macro_rules! m { () => { diff --git a/tests/ui/fmt/indoc-issue-106408.rs b/tests/ui/fmt/indoc-issue-106408.rs index e4e3093b590..36e5c23a394 100644 --- a/tests/ui/fmt/indoc-issue-106408.rs +++ b/tests/ui/fmt/indoc-issue-106408.rs @@ -1,5 +1,5 @@ -// aux-build:format-string-proc-macro.rs -// check-pass +//@ aux-build:format-string-proc-macro.rs +//@ check-pass extern crate format_string_proc_macro; diff --git a/tests/ui/fmt/issue-23781.rs b/tests/ui/fmt/issue-23781.rs index 220ebdb1872..49a0f0ffedc 100644 --- a/tests/ui/fmt/issue-23781.rs +++ b/tests/ui/fmt/issue-23781.rs @@ -1,4 +1,4 @@ -// run-pass +//@ run-pass use std::fmt; struct Foo; diff --git a/tests/ui/fmt/respanned-literal-issue-106191.rs b/tests/ui/fmt/respanned-literal-issue-106191.rs index 44642a10fc0..b0c0855a870 100644 --- a/tests/ui/fmt/respanned-literal-issue-106191.rs +++ b/tests/ui/fmt/respanned-literal-issue-106191.rs @@ -1,4 +1,4 @@ -// aux-build:format-string-proc-macro.rs +//@ aux-build:format-string-proc-macro.rs extern crate format_string_proc_macro; diff --git a/tests/ui/fmt/struct-field-as-captured-argument.fixed b/tests/ui/fmt/struct-field-as-captured-argument.fixed index f7244f6744f..e13af744ec8 100644 --- a/tests/ui/fmt/struct-field-as-captured-argument.fixed +++ b/tests/ui/fmt/struct-field-as-captured-argument.fixed @@ -1,4 +1,4 @@ -// run-rustfix +//@ run-rustfix #[derive(Debug)] struct Foo { diff --git a/tests/ui/fmt/struct-field-as-captured-argument.rs b/tests/ui/fmt/struct-field-as-captured-argument.rs index ab5f2552bd3..6a875a85848 100644 --- a/tests/ui/fmt/struct-field-as-captured-argument.rs +++ b/tests/ui/fmt/struct-field-as-captured-argument.rs @@ -1,4 +1,4 @@ -// run-rustfix +//@ run-rustfix #[derive(Debug)] struct Foo { diff --git a/tests/ui/fn/dyn-fn-alignment.rs b/tests/ui/fn/dyn-fn-alignment.rs index cedfd1cf2dc..136b8e6f2da 100644 --- a/tests/ui/fn/dyn-fn-alignment.rs +++ b/tests/ui/fn/dyn-fn-alignment.rs @@ -1,4 +1,4 @@ -// run-pass +//@ run-pass #![allow(dead_code)] #[repr(align(256))] diff --git a/tests/ui/fn/expr-fn-panic.rs b/tests/ui/fn/expr-fn-panic.rs index 123b57f97a4..23946b7533d 100644 --- a/tests/ui/fn/expr-fn-panic.rs +++ b/tests/ui/fn/expr-fn-panic.rs @@ -1,6 +1,6 @@ -// run-fail -// error-pattern:explicit panic -// ignore-emscripten no processes +//@ run-fail +//@ error-pattern:explicit panic +//@ ignore-emscripten no processes fn f() -> ! { panic!() diff --git a/tests/ui/fn/expr-fn.rs b/tests/ui/fn/expr-fn.rs index 253cbfd5d38..9f87583da40 100644 --- a/tests/ui/fn/expr-fn.rs +++ b/tests/ui/fn/expr-fn.rs @@ -1,4 +1,4 @@ -// run-pass +//@ run-pass #![allow(unused_braces)] fn test_int() { diff --git a/tests/ui/fn/fn-bad-block-type.rs b/tests/ui/fn/fn-bad-block-type.rs index 01dcff05881..c7ad462f143 100644 --- a/tests/ui/fn/fn-bad-block-type.rs +++ b/tests/ui/fn/fn-bad-block-type.rs @@ -1,4 +1,4 @@ -// error-pattern:mismatched types +//@ error-pattern:mismatched types fn f() -> isize { true } diff --git a/tests/ui/fn/fn-item-lifetime-bounds.rs b/tests/ui/fn/fn-item-lifetime-bounds.rs index 68a1d0ce9b0..b80b7eade23 100644 --- a/tests/ui/fn/fn-item-lifetime-bounds.rs +++ b/tests/ui/fn/fn-item-lifetime-bounds.rs @@ -1,5 +1,5 @@ -// check-pass -// known-bug: #84533 +//@ check-pass +//@ known-bug: #84533 // Should fail. Lifetimes are checked correctly when `foo` is called, but NOT // when only the lifetime parameters are instantiated. diff --git a/tests/ui/fn/fn-ptr-trait-int-float-infer-var.rs b/tests/ui/fn/fn-ptr-trait-int-float-infer-var.rs index eec7da044c0..ba6646070aa 100644 --- a/tests/ui/fn/fn-ptr-trait-int-float-infer-var.rs +++ b/tests/ui/fn/fn-ptr-trait-int-float-infer-var.rs @@ -1,4 +1,4 @@ -// check-pass +//@ check-pass trait MyCmp { fn cmp(&self) {} } diff --git a/tests/ui/fn/fn-ptr-trait.rs b/tests/ui/fn/fn-ptr-trait.rs index 45918ae5b61..3edde574c26 100644 --- a/tests/ui/fn/fn-ptr-trait.rs +++ b/tests/ui/fn/fn-ptr-trait.rs @@ -1,5 +1,5 @@ #![feature(fn_ptr_trait)] -// check-pass +//@ check-pass use std::marker::FnPtr; diff --git a/tests/ui/fn/fn-recover-return-sign.fixed b/tests/ui/fn/fn-recover-return-sign.fixed index 076be6a35a4..20dca91fdf4 100644 --- a/tests/ui/fn/fn-recover-return-sign.fixed +++ b/tests/ui/fn/fn-recover-return-sign.fixed @@ -1,4 +1,4 @@ -// run-rustfix +//@ run-rustfix #![allow(unused)] fn a() -> usize { 0 } //~^ ERROR return types are denoted using `->` diff --git a/tests/ui/fn/fn-recover-return-sign.rs b/tests/ui/fn/fn-recover-return-sign.rs index 0656023c0f8..43f1712039f 100644 --- a/tests/ui/fn/fn-recover-return-sign.rs +++ b/tests/ui/fn/fn-recover-return-sign.rs @@ -1,4 +1,4 @@ -// run-rustfix +//@ run-rustfix #![allow(unused)] fn a() => usize { 0 } //~^ ERROR return types are denoted using `->` diff --git a/tests/ui/fn/fun-call-variants.rs b/tests/ui/fn/fun-call-variants.rs index 5b83e2620d8..68e66314ef1 100644 --- a/tests/ui/fn/fun-call-variants.rs +++ b/tests/ui/fn/fun-call-variants.rs @@ -1,4 +1,4 @@ -// run-pass +//@ run-pass fn ho(f: F) -> isize where F: FnOnce(isize) -> isize { let n: isize = f(3); return n; } diff --git a/tests/ui/fn/implied-bounds-impl-header-projections.rs b/tests/ui/fn/implied-bounds-impl-header-projections.rs index 28cec805032..42f37e553df 100644 --- a/tests/ui/fn/implied-bounds-impl-header-projections.rs +++ b/tests/ui/fn/implied-bounds-impl-header-projections.rs @@ -1,5 +1,5 @@ -// check-pass -// known-bug: #100051 +//@ check-pass +//@ known-bug: #100051 // Should fail. Implied bounds from projections in impl headers can create // improper lifetimes. Variant of issue #98543 which was fixed by #99217. diff --git a/tests/ui/fn/implied-bounds-unnorm-associated-type-2.rs b/tests/ui/fn/implied-bounds-unnorm-associated-type-2.rs index 5d924555625..e26df7d89ce 100644 --- a/tests/ui/fn/implied-bounds-unnorm-associated-type-2.rs +++ b/tests/ui/fn/implied-bounds-unnorm-associated-type-2.rs @@ -1,4 +1,4 @@ -// check-fail +//@ check-fail trait Trait { type Type; diff --git a/tests/ui/fn/implied-bounds-unnorm-associated-type-3.rs b/tests/ui/fn/implied-bounds-unnorm-associated-type-3.rs index 888f74cf6b3..9b4a1e64d00 100644 --- a/tests/ui/fn/implied-bounds-unnorm-associated-type-3.rs +++ b/tests/ui/fn/implied-bounds-unnorm-associated-type-3.rs @@ -1,4 +1,4 @@ -// check-pass +//@ check-pass pub trait Yokeable<'a>: 'static { type Output: 'a; diff --git a/tests/ui/fn/implied-bounds-unnorm-associated-type.rs b/tests/ui/fn/implied-bounds-unnorm-associated-type.rs index d58d25036c5..96e18a88f4d 100644 --- a/tests/ui/fn/implied-bounds-unnorm-associated-type.rs +++ b/tests/ui/fn/implied-bounds-unnorm-associated-type.rs @@ -1,4 +1,4 @@ -// check-fail +//@ check-fail // See issue #91068. We check that the unnormalized associated types in // function signatures are implied diff --git a/tests/ui/fn/issue-3904.rs b/tests/ui/fn/issue-3904.rs index 7beb91a28d2..ea71f971199 100644 --- a/tests/ui/fn/issue-3904.rs +++ b/tests/ui/fn/issue-3904.rs @@ -1,4 +1,4 @@ -// run-pass +//@ run-pass fn example_err(prog: &str, arg: &str) { println!("{}: {}", prog, arg) } diff --git a/tests/ui/fn/keyword-order.rs b/tests/ui/fn/keyword-order.rs index 8a21db67333..fe7e3811ca8 100644 --- a/tests/ui/fn/keyword-order.rs +++ b/tests/ui/fn/keyword-order.rs @@ -1,4 +1,4 @@ -// edition:2018 +//@ edition:2018 default pub const async unsafe extern fn err() {} //~ ERROR `default` is not followed by an item //~^ ERROR expected item, found keyword `pub` diff --git a/tests/ui/fn/nested-function-names-issue-8587.rs b/tests/ui/fn/nested-function-names-issue-8587.rs index 8fafd41d9bc..a1ef0ed2c18 100644 --- a/tests/ui/fn/nested-function-names-issue-8587.rs +++ b/tests/ui/fn/nested-function-names-issue-8587.rs @@ -1,4 +1,4 @@ -// run-pass +//@ run-pass // Make sure nested functions are separate, even if they have // equal name. // diff --git a/tests/ui/fn/signature-error-reporting-under-verbose.rs b/tests/ui/fn/signature-error-reporting-under-verbose.rs index d28c8530d58..4a72da78978 100644 --- a/tests/ui/fn/signature-error-reporting-under-verbose.rs +++ b/tests/ui/fn/signature-error-reporting-under-verbose.rs @@ -1,4 +1,4 @@ -// compile-flags: -Zverbose-internals +//@ compile-flags: -Zverbose-internals fn foo(_: i32, _: i32) {} diff --git a/tests/ui/fn/suggest-return-future.rs b/tests/ui/fn/suggest-return-future.rs index 750740d9426..b86b2b1c7da 100644 --- a/tests/ui/fn/suggest-return-future.rs +++ b/tests/ui/fn/suggest-return-future.rs @@ -1,4 +1,4 @@ -// edition: 2021 +//@ edition: 2021 async fn a() -> i32 { 0 diff --git a/tests/ui/for-loop-while/auto-loop.rs b/tests/ui/for-loop-while/auto-loop.rs index f02ac43c734..5903986d62d 100644 --- a/tests/ui/for-loop-while/auto-loop.rs +++ b/tests/ui/for-loop-while/auto-loop.rs @@ -1,4 +1,4 @@ -// run-pass +//@ run-pass pub fn main() { let mut sum = 0; diff --git a/tests/ui/for-loop-while/break-value.rs b/tests/ui/for-loop-while/break-value.rs index 9fc49fa8181..1289231fc30 100644 --- a/tests/ui/for-loop-while/break-value.rs +++ b/tests/ui/for-loop-while/break-value.rs @@ -1,6 +1,6 @@ -// run-pass +//@ run-pass #![allow(unreachable_code)] -// pretty-expanded FIXME #23616 +//@ pretty-expanded FIXME #23616 fn int_id(x: isize) -> isize { return x; } diff --git a/tests/ui/for-loop-while/break.rs b/tests/ui/for-loop-while/break.rs index 427b1b7a063..77774792262 100644 --- a/tests/ui/for-loop-while/break.rs +++ b/tests/ui/for-loop-while/break.rs @@ -1,4 +1,4 @@ -// run-pass +//@ run-pass pub fn main() { let mut i = 0; diff --git a/tests/ui/for-loop-while/cleanup-rvalue-during-if-and-while.rs b/tests/ui/for-loop-while/cleanup-rvalue-during-if-and-while.rs index afc77355ab0..fef9f24d462 100644 --- a/tests/ui/for-loop-while/cleanup-rvalue-during-if-and-while.rs +++ b/tests/ui/for-loop-while/cleanup-rvalue-during-if-and-while.rs @@ -1,4 +1,4 @@ -// run-pass +//@ run-pass // This test verifies that temporaries created for `while`'s and `if` // conditions are dropped after the condition is evaluated. diff --git a/tests/ui/for-loop-while/for-destruct.rs b/tests/ui/for-loop-while/for-destruct.rs index 7ca8d4ded25..e0b082ad048 100644 --- a/tests/ui/for-loop-while/for-destruct.rs +++ b/tests/ui/for-loop-while/for-destruct.rs @@ -1,4 +1,4 @@ -// run-pass +//@ run-pass struct Pair { x: isize, y: isize } diff --git a/tests/ui/for-loop-while/for-loop-goofiness.rs b/tests/ui/for-loop-while/for-loop-goofiness.rs index 872ab168bb2..4be82f32e8a 100644 --- a/tests/ui/for-loop-while/for-loop-goofiness.rs +++ b/tests/ui/for-loop-while/for-loop-goofiness.rs @@ -1,4 +1,4 @@ -// run-pass +//@ run-pass #![allow(dead_code)] enum BogusOption { diff --git a/tests/ui/for-loop-while/for-loop-has-unit-body.rs b/tests/ui/for-loop-while/for-loop-has-unit-body.rs index eba385461b9..8a8b609b075 100644 --- a/tests/ui/for-loop-while/for-loop-has-unit-body.rs +++ b/tests/ui/for-loop-while/for-loop-has-unit-body.rs @@ -1,4 +1,4 @@ -// run-pass +//@ run-pass fn main() { // Check that the tail statement in the body unifies with something for _ in 0..3 { diff --git a/tests/ui/for-loop-while/for-loop-into-iterator.rs b/tests/ui/for-loop-while/for-loop-into-iterator.rs index 199d4ddb299..d04e80683a6 100644 --- a/tests/ui/for-loop-while/for-loop-into-iterator.rs +++ b/tests/ui/for-loop-while/for-loop-into-iterator.rs @@ -1,4 +1,4 @@ -// run-pass +//@ run-pass // Test that for loops can do what RFC #235 claims diff --git a/tests/ui/for-loop-while/for-loop-lifetime-of-unbound-values.rs b/tests/ui/for-loop-while/for-loop-lifetime-of-unbound-values.rs index 6a38764a131..fee28354b13 100644 --- a/tests/ui/for-loop-while/for-loop-lifetime-of-unbound-values.rs +++ b/tests/ui/for-loop-while/for-loop-lifetime-of-unbound-values.rs @@ -1,4 +1,4 @@ -// run-pass +//@ run-pass // Test when destructors run in a for loop. The intention is // that the value for each iteration is dropped *after* the loop // body has executed. This is true even when the value is assigned diff --git a/tests/ui/for-loop-while/for-loop-macro.rs b/tests/ui/for-loop-while/for-loop-macro.rs index 5abccd2a141..9205ab4afd0 100644 --- a/tests/ui/for-loop-while/for-loop-macro.rs +++ b/tests/ui/for-loop-while/for-loop-macro.rs @@ -1,4 +1,4 @@ -// run-pass +//@ run-pass macro_rules! var { ( $name:ident ) => ( $name ); } diff --git a/tests/ui/for-loop-while/for-loop-mut-ref-element.rs b/tests/ui/for-loop-while/for-loop-mut-ref-element.rs index a3d82ace9e2..ba240f65762 100644 --- a/tests/ui/for-loop-while/for-loop-mut-ref-element.rs +++ b/tests/ui/for-loop-while/for-loop-mut-ref-element.rs @@ -1,4 +1,4 @@ -// run-pass +//@ run-pass // Tests that for loops can bind elements as mutable references fn main() { diff --git a/tests/ui/for-loop-while/for-loop-no-std.rs b/tests/ui/for-loop-while/for-loop-no-std.rs index 65a33c5f16f..4511146dc75 100644 --- a/tests/ui/for-loop-while/for-loop-no-std.rs +++ b/tests/ui/for-loop-while/for-loop-no-std.rs @@ -1,4 +1,4 @@ -// run-pass +//@ run-pass #![allow(unused_imports)] #![feature(lang_items, start)] #![no_std] diff --git a/tests/ui/for-loop-while/for-loop-panic.rs b/tests/ui/for-loop-while/for-loop-panic.rs index ac607d6d731..6c707b06297 100644 --- a/tests/ui/for-loop-while/for-loop-panic.rs +++ b/tests/ui/for-loop-while/for-loop-panic.rs @@ -1,4 +1,4 @@ -// run-pass +//@ run-pass pub fn main() { let x: Vec = Vec::new(); for _ in &x { panic!("moop"); } } diff --git a/tests/ui/for-loop-while/for-loop-unconstrained-element-type-i32-fallback.rs b/tests/ui/for-loop-while/for-loop-unconstrained-element-type-i32-fallback.rs index a1e9b1ed87d..74ef2090b1f 100644 --- a/tests/ui/for-loop-while/for-loop-unconstrained-element-type-i32-fallback.rs +++ b/tests/ui/for-loop-while/for-loop-unconstrained-element-type-i32-fallback.rs @@ -1,4 +1,4 @@ -// run-pass +//@ run-pass // Test that the type of `sum` falls back to `i32` here, // and that the for loop desugaring doesn't interfere with // that. diff --git a/tests/ui/for-loop-while/foreach-external-iterators-break.rs b/tests/ui/for-loop-while/foreach-external-iterators-break.rs index 7de6a4f8acb..ddeb610d7e4 100644 --- a/tests/ui/for-loop-while/foreach-external-iterators-break.rs +++ b/tests/ui/for-loop-while/foreach-external-iterators-break.rs @@ -1,4 +1,4 @@ -// run-pass +//@ run-pass pub fn main() { let x = [1; 100]; diff --git a/tests/ui/for-loop-while/foreach-external-iterators-hashmap-break-restart.rs b/tests/ui/for-loop-while/foreach-external-iterators-hashmap-break-restart.rs index 5d690807e05..5afdc257901 100644 --- a/tests/ui/for-loop-while/foreach-external-iterators-hashmap-break-restart.rs +++ b/tests/ui/for-loop-while/foreach-external-iterators-hashmap-break-restart.rs @@ -1,4 +1,4 @@ -// run-pass +//@ run-pass use std::collections::HashMap; diff --git a/tests/ui/for-loop-while/foreach-external-iterators-hashmap.rs b/tests/ui/for-loop-while/foreach-external-iterators-hashmap.rs index 9f2ca05cdb6..32f0666926e 100644 --- a/tests/ui/for-loop-while/foreach-external-iterators-hashmap.rs +++ b/tests/ui/for-loop-while/foreach-external-iterators-hashmap.rs @@ -1,4 +1,4 @@ -// run-pass +//@ run-pass use std::collections::HashMap; diff --git a/tests/ui/for-loop-while/foreach-external-iterators-loop.rs b/tests/ui/for-loop-while/foreach-external-iterators-loop.rs index 78af195bc20..da7e995ca9c 100644 --- a/tests/ui/for-loop-while/foreach-external-iterators-loop.rs +++ b/tests/ui/for-loop-while/foreach-external-iterators-loop.rs @@ -1,4 +1,4 @@ -// run-pass +//@ run-pass pub fn main() { let x = [1; 100]; diff --git a/tests/ui/for-loop-while/foreach-external-iterators-nested.rs b/tests/ui/for-loop-while/foreach-external-iterators-nested.rs index 8a95f160a1a..e4fc815cc83 100644 --- a/tests/ui/for-loop-while/foreach-external-iterators-nested.rs +++ b/tests/ui/for-loop-while/foreach-external-iterators-nested.rs @@ -1,4 +1,4 @@ -// run-pass +//@ run-pass pub fn main() { let x = [1; 100]; diff --git a/tests/ui/for-loop-while/foreach-external-iterators.rs b/tests/ui/for-loop-while/foreach-external-iterators.rs index 24ecfe9b60d..8a53b4eeae3 100644 --- a/tests/ui/for-loop-while/foreach-external-iterators.rs +++ b/tests/ui/for-loop-while/foreach-external-iterators.rs @@ -1,4 +1,4 @@ -// run-pass +//@ run-pass pub fn main() { let x = [1; 100]; diff --git a/tests/ui/for-loop-while/foreach-nested.rs b/tests/ui/for-loop-while/foreach-nested.rs index bb6edbc0797..65172cd9d44 100644 --- a/tests/ui/for-loop-while/foreach-nested.rs +++ b/tests/ui/for-loop-while/foreach-nested.rs @@ -1,4 +1,4 @@ -// run-pass +//@ run-pass fn two(mut it: F) where F: FnMut(isize) { it(0); it(1); } diff --git a/tests/ui/for-loop-while/foreach-put-structured.rs b/tests/ui/for-loop-while/foreach-put-structured.rs index 3a47fcf3415..fe485f55dd8 100644 --- a/tests/ui/for-loop-while/foreach-put-structured.rs +++ b/tests/ui/for-loop-while/foreach-put-structured.rs @@ -1,4 +1,4 @@ -// run-pass +//@ run-pass fn pairs(mut it: F) where F: FnMut((isize, isize)) { diff --git a/tests/ui/for-loop-while/foreach-simple-outer-slot.rs b/tests/ui/for-loop-while/foreach-simple-outer-slot.rs index a8d42a789ba..9d4b6dc9eaa 100644 --- a/tests/ui/for-loop-while/foreach-simple-outer-slot.rs +++ b/tests/ui/for-loop-while/foreach-simple-outer-slot.rs @@ -1,4 +1,4 @@ -// run-pass +//@ run-pass diff --git a/tests/ui/for-loop-while/issue-1257.rs b/tests/ui/for-loop-while/issue-1257.rs index de5a6d35925..cdd4c806358 100644 --- a/tests/ui/for-loop-while/issue-1257.rs +++ b/tests/ui/for-loop-while/issue-1257.rs @@ -1,5 +1,5 @@ -// run-pass -// pretty-expanded FIXME #23616 +//@ run-pass +//@ pretty-expanded FIXME #23616 pub fn main () { let mut line = "".to_string(); diff --git a/tests/ui/for-loop-while/issue-2216.rs b/tests/ui/for-loop-while/issue-2216.rs index ad54107423d..f516523199c 100644 --- a/tests/ui/for-loop-while/issue-2216.rs +++ b/tests/ui/for-loop-while/issue-2216.rs @@ -1,4 +1,4 @@ -// run-pass +//@ run-pass #![allow(unreachable_code)] pub fn main() { let mut x = 0; diff --git a/tests/ui/for-loop-while/issue-51345.rs b/tests/ui/for-loop-while/issue-51345.rs index 15571e8bf5b..ec8f29b7364 100644 --- a/tests/ui/for-loop-while/issue-51345.rs +++ b/tests/ui/for-loop-while/issue-51345.rs @@ -1,4 +1,4 @@ -// run-pass +//@ run-pass #![allow(unreachable_code)] fn main() { diff --git a/tests/ui/for-loop-while/issue-69841.rs b/tests/ui/for-loop-while/issue-69841.rs index 942b99b742b..16132ce7c28 100644 --- a/tests/ui/for-loop-while/issue-69841.rs +++ b/tests/ui/for-loop-while/issue-69841.rs @@ -1,7 +1,7 @@ // This is a regression test for issue rust-lang/rust#69841, which exposed an // LLVM bug which needed a fix to be backported. -// run-pass +//@ run-pass fn main() { let buffer = [49u8, 10]; diff --git a/tests/ui/for-loop-while/label_break_value.rs b/tests/ui/for-loop-while/label_break_value.rs index 10992c50597..92242c50f45 100644 --- a/tests/ui/for-loop-while/label_break_value.rs +++ b/tests/ui/for-loop-while/label_break_value.rs @@ -1,4 +1,4 @@ -// run-pass +//@ run-pass #![allow(dead_code)] #![allow(unused_assignments)] diff --git a/tests/ui/for-loop-while/labeled-break.rs b/tests/ui/for-loop-while/labeled-break.rs index 4dacc57574f..0dfbdc02f5b 100644 --- a/tests/ui/for-loop-while/labeled-break.rs +++ b/tests/ui/for-loop-while/labeled-break.rs @@ -1,5 +1,5 @@ -// run-pass -// pretty-expanded FIXME #23616 +//@ run-pass +//@ pretty-expanded FIXME #23616 pub fn main() { 'foo: loop { diff --git a/tests/ui/for-loop-while/linear-for-loop.rs b/tests/ui/for-loop-while/linear-for-loop.rs index 3c573db1d77..4699e11608a 100644 --- a/tests/ui/for-loop-while/linear-for-loop.rs +++ b/tests/ui/for-loop-while/linear-for-loop.rs @@ -1,4 +1,4 @@ -// run-pass +//@ run-pass pub fn main() { let x = vec![1, 2, 3]; let mut y = 0; diff --git a/tests/ui/for-loop-while/liveness-assign-imm-local-after-loop.rs b/tests/ui/for-loop-while/liveness-assign-imm-local-after-loop.rs index 11b6971656f..be6dc33c8be 100644 --- a/tests/ui/for-loop-while/liveness-assign-imm-local-after-loop.rs +++ b/tests/ui/for-loop-while/liveness-assign-imm-local-after-loop.rs @@ -1,7 +1,7 @@ -// run-pass +//@ run-pass #![allow(dead_code)] #![allow(unused_assignments)] -// pretty-expanded FIXME #23616 +//@ pretty-expanded FIXME #23616 #![allow(unreachable_code)] #![allow(unused_variables)] diff --git a/tests/ui/for-loop-while/liveness-loop-break.rs b/tests/ui/for-loop-while/liveness-loop-break.rs index 60a63bccb10..57eb13f256b 100644 --- a/tests/ui/for-loop-while/liveness-loop-break.rs +++ b/tests/ui/for-loop-while/liveness-loop-break.rs @@ -1,4 +1,4 @@ -// run-pass +//@ run-pass fn test() { let v; loop { diff --git a/tests/ui/for-loop-while/liveness-move-in-loop.rs b/tests/ui/for-loop-while/liveness-move-in-loop.rs index ce73d6335cb..0ae92a78a04 100644 --- a/tests/ui/for-loop-while/liveness-move-in-loop.rs +++ b/tests/ui/for-loop-while/liveness-move-in-loop.rs @@ -1,7 +1,7 @@ -// run-pass +//@ run-pass #![allow(dead_code)] -// pretty-expanded FIXME #23616 +//@ pretty-expanded FIXME #23616 fn take(x: isize) -> isize {x} diff --git a/tests/ui/for-loop-while/long-while.rs b/tests/ui/for-loop-while/long-while.rs index 529cca7b731..6db06baa873 100644 --- a/tests/ui/for-loop-while/long-while.rs +++ b/tests/ui/for-loop-while/long-while.rs @@ -1,5 +1,5 @@ -// run-pass -// pretty-expanded FIXME #23616 +//@ run-pass +//@ pretty-expanded FIXME #23616 #![allow(unused_variables)] diff --git a/tests/ui/for-loop-while/loop-break-cont-1.rs b/tests/ui/for-loop-while/loop-break-cont-1.rs index f207746f085..236248790d5 100644 --- a/tests/ui/for-loop-while/loop-break-cont-1.rs +++ b/tests/ui/for-loop-while/loop-break-cont-1.rs @@ -1,4 +1,4 @@ -// run-pass +//@ run-pass pub fn main() { let _i = 0_usize; diff --git a/tests/ui/for-loop-while/loop-break-cont.rs b/tests/ui/for-loop-while/loop-break-cont.rs index 92d5a32c62b..04b083ec162 100644 --- a/tests/ui/for-loop-while/loop-break-cont.rs +++ b/tests/ui/for-loop-while/loop-break-cont.rs @@ -1,4 +1,4 @@ -// run-pass +//@ run-pass pub fn main() { let mut i = 0_usize; loop { diff --git a/tests/ui/for-loop-while/loop-break-value.rs b/tests/ui/for-loop-while/loop-break-value.rs index 65207fb7fb5..f46524b6d27 100644 --- a/tests/ui/for-loop-while/loop-break-value.rs +++ b/tests/ui/for-loop-while/loop-break-value.rs @@ -1,4 +1,4 @@ -// run-pass +//@ run-pass #![allow(unreachable_code)] #![feature(never_type)] diff --git a/tests/ui/for-loop-while/loop-diverges.rs b/tests/ui/for-loop-while/loop-diverges.rs index f657bf9e0b3..fdf46387795 100644 --- a/tests/ui/for-loop-while/loop-diverges.rs +++ b/tests/ui/for-loop-while/loop-diverges.rs @@ -1,6 +1,6 @@ -// run-pass +//@ run-pass #![allow(unused_parens)] -// pretty-expanded FIXME #23616 +//@ pretty-expanded FIXME #23616 /* Make sure a loop{} can be the tailexpr in the body of a diverging function */ diff --git a/tests/ui/for-loop-while/loop-label-shadowing.rs b/tests/ui/for-loop-while/loop-label-shadowing.rs index 9bedde67b78..e3dfbe65d8c 100644 --- a/tests/ui/for-loop-while/loop-label-shadowing.rs +++ b/tests/ui/for-loop-while/loop-label-shadowing.rs @@ -1,7 +1,7 @@ -// run-pass +//@ run-pass // Issue #12512. -// pretty-expanded FIXME #23616 +//@ pretty-expanded FIXME #23616 fn main() { let mut foo = Vec::new(); diff --git a/tests/ui/for-loop-while/loop-labeled-break-value.rs b/tests/ui/for-loop-while/loop-labeled-break-value.rs index cc8f826983b..0ab07ffd7e2 100644 --- a/tests/ui/for-loop-while/loop-labeled-break-value.rs +++ b/tests/ui/for-loop-while/loop-labeled-break-value.rs @@ -1,5 +1,5 @@ -// run-pass -// pretty-expanded FIXME #23616 +//@ run-pass +//@ pretty-expanded FIXME #23616 fn main() { 'outer: loop { diff --git a/tests/ui/for-loop-while/loop-no-reinit-needed-post-bot.rs b/tests/ui/for-loop-while/loop-no-reinit-needed-post-bot.rs index 1b5db20129d..531c3dc377d 100644 --- a/tests/ui/for-loop-while/loop-no-reinit-needed-post-bot.rs +++ b/tests/ui/for-loop-while/loop-no-reinit-needed-post-bot.rs @@ -1,5 +1,5 @@ -// run-pass -// pretty-expanded FIXME #23616 +//@ run-pass +//@ pretty-expanded FIXME #23616 struct S; // Ensure S is moved, not copied, on assignment. diff --git a/tests/ui/for-loop-while/loop-scope.rs b/tests/ui/for-loop-while/loop-scope.rs index 73324a3e1bd..a913b2554d2 100644 --- a/tests/ui/for-loop-while/loop-scope.rs +++ b/tests/ui/for-loop-while/loop-scope.rs @@ -1,4 +1,4 @@ -// run-pass +//@ run-pass pub fn main() { let x = vec![10, 20, 30]; diff --git a/tests/ui/for-loop-while/while-cont.rs b/tests/ui/for-loop-while/while-cont.rs index a864e8ef70a..1640b7e1803 100644 --- a/tests/ui/for-loop-while/while-cont.rs +++ b/tests/ui/for-loop-while/while-cont.rs @@ -1,4 +1,4 @@ -// run-pass +//@ run-pass // Issue #825: Should recheck the loop condition after continuing pub fn main() { let mut i = 1; diff --git a/tests/ui/for-loop-while/while-flow-graph.rs b/tests/ui/for-loop-while/while-flow-graph.rs index 1748964a7b2..9148b42a606 100644 --- a/tests/ui/for-loop-while/while-flow-graph.rs +++ b/tests/ui/for-loop-while/while-flow-graph.rs @@ -1,6 +1,6 @@ -// run-pass +//@ run-pass -// pretty-expanded FIXME #23616 +//@ pretty-expanded FIXME #23616 pub fn main() { let x: isize = 10; while x == 10 && x == 11 { let _y = 0xf00_usize; } } diff --git a/tests/ui/for-loop-while/while-label.rs b/tests/ui/for-loop-while/while-label.rs index 5abc41daf94..b0a1eea1b17 100644 --- a/tests/ui/for-loop-while/while-label.rs +++ b/tests/ui/for-loop-while/while-label.rs @@ -1,4 +1,4 @@ -// run-pass +//@ run-pass #![allow(unreachable_code)] diff --git a/tests/ui/for-loop-while/while-let-2.rs b/tests/ui/for-loop-while/while-let-2.rs index b9a49b47c8f..23abad5d2da 100644 --- a/tests/ui/for-loop-while/while-let-2.rs +++ b/tests/ui/for-loop-while/while-let-2.rs @@ -1,4 +1,4 @@ -// run-pass +//@ run-pass #[allow(dead_code)] fn macros() { diff --git a/tests/ui/for-loop-while/while-let.rs b/tests/ui/for-loop-while/while-let.rs index b9d70ff0b9d..d3a36be3743 100644 --- a/tests/ui/for-loop-while/while-let.rs +++ b/tests/ui/for-loop-while/while-let.rs @@ -1,4 +1,4 @@ -// run-pass +//@ run-pass use std::collections::BinaryHeap; diff --git a/tests/ui/for-loop-while/while-loop-constraints-2.rs b/tests/ui/for-loop-while/while-loop-constraints-2.rs index 3c5cdf06cd8..654f6769902 100644 --- a/tests/ui/for-loop-while/while-loop-constraints-2.rs +++ b/tests/ui/for-loop-while/while-loop-constraints-2.rs @@ -1,4 +1,4 @@ -// run-pass +//@ run-pass #![allow(unused_assignments)] #![allow(unused_variables)] diff --git a/tests/ui/for-loop-while/while-prelude-drop.rs b/tests/ui/for-loop-while/while-prelude-drop.rs index 947a70e1dd2..1fca90f0193 100644 --- a/tests/ui/for-loop-while/while-prelude-drop.rs +++ b/tests/ui/for-loop-while/while-prelude-drop.rs @@ -1,4 +1,4 @@ -// run-pass +//@ run-pass #![allow(non_camel_case_types)] #[derive(PartialEq)] enum t { a, b(String), } diff --git a/tests/ui/for-loop-while/while-with-break.rs b/tests/ui/for-loop-while/while-with-break.rs index a9d52dda544..56f3bb68298 100644 --- a/tests/ui/for-loop-while/while-with-break.rs +++ b/tests/ui/for-loop-while/while-with-break.rs @@ -1,4 +1,4 @@ -// run-pass +//@ run-pass pub fn main() { let mut i: isize = 90; diff --git a/tests/ui/for-loop-while/while.rs b/tests/ui/for-loop-while/while.rs index 90f718a3483..e0fb7319630 100644 --- a/tests/ui/for-loop-while/while.rs +++ b/tests/ui/for-loop-while/while.rs @@ -1,4 +1,4 @@ -// run-pass +//@ run-pass pub fn main() { diff --git a/tests/ui/for/issue-20605.rs b/tests/ui/for/issue-20605.rs index 8ae9494faf8..77d7039fa15 100644 --- a/tests/ui/for/issue-20605.rs +++ b/tests/ui/for/issue-20605.rs @@ -1,5 +1,5 @@ -// revisions: current next -//[next] compile-flags: -Znext-solver +//@ revisions: current next +//@[next] compile-flags: -Znext-solver fn changer<'a>(mut things: Box>) { for item in *things { *item = 0 } diff --git a/tests/ui/foreign/foreign-fn-linkname.rs b/tests/ui/foreign/foreign-fn-linkname.rs index d1d6e703e3d..42876937a83 100644 --- a/tests/ui/foreign/foreign-fn-linkname.rs +++ b/tests/ui/foreign/foreign-fn-linkname.rs @@ -1,6 +1,6 @@ -// run-pass -// ignore-wasm32-bare no libc to test ffi with -// ignore-sgx no libc +//@ run-pass +//@ ignore-wasm32-bare no libc to test ffi with +//@ ignore-sgx no libc // Ensure no false positive on "unused extern crate" lint #![deny(unused_extern_crates)] diff --git a/tests/ui/foreign/foreign-int-types.rs b/tests/ui/foreign/foreign-int-types.rs index 2d01d320425..d20a4c96ea0 100644 --- a/tests/ui/foreign/foreign-int-types.rs +++ b/tests/ui/foreign/foreign-int-types.rs @@ -1,4 +1,4 @@ -// run-pass +//@ run-pass #![forbid(improper_ctypes)] #![allow(dead_code)] diff --git a/tests/ui/foreign/foreign-mod-src/inner.rs b/tests/ui/foreign/foreign-mod-src/inner.rs index cf484878b07..591fb7bfaf5 100644 --- a/tests/ui/foreign/foreign-mod-src/inner.rs +++ b/tests/ui/foreign/foreign-mod-src/inner.rs @@ -1,4 +1,4 @@ -// run-pass +//@ run-pass diff --git a/tests/ui/foreign/foreign-mod-unused-const.rs b/tests/ui/foreign/foreign-mod-unused-const.rs index 7d79c30f469..2cc0a4f6018 100644 --- a/tests/ui/foreign/foreign-mod-unused-const.rs +++ b/tests/ui/foreign/foreign-mod-unused-const.rs @@ -1,6 +1,6 @@ -// run-pass +//@ run-pass #![allow(dead_code)] -// pretty-expanded FIXME #23616 +//@ pretty-expanded FIXME #23616 mod foo { extern "C" { diff --git a/tests/ui/foreign/foreign-pub-super.rs b/tests/ui/foreign/foreign-pub-super.rs index 19f9e4e339e..62a11d74fe8 100644 --- a/tests/ui/foreign/foreign-pub-super.rs +++ b/tests/ui/foreign/foreign-pub-super.rs @@ -1,5 +1,5 @@ // Test for #79487 -// check-pass +//@ check-pass #![allow(dead_code)] diff --git a/tests/ui/foreign/foreign-src/foreign.rs b/tests/ui/foreign/foreign-src/foreign.rs index 47016ad6ce7..92a127e8ccc 100644 --- a/tests/ui/foreign/foreign-src/foreign.rs +++ b/tests/ui/foreign/foreign-src/foreign.rs @@ -1,4 +1,4 @@ -// run-pass +//@ run-pass diff --git a/tests/ui/foreign/foreign-truncated-arguments.rs b/tests/ui/foreign/foreign-truncated-arguments.rs index c61c2b587b6..52906223b05 100644 --- a/tests/ui/foreign/foreign-truncated-arguments.rs +++ b/tests/ui/foreign/foreign-truncated-arguments.rs @@ -1,5 +1,5 @@ -// run-pass -// compile-flags: -O +//@ run-pass +//@ compile-flags: -O // Regression test for https://github.com/rust-lang/rust/issues/33868 #[repr(C)] diff --git a/tests/ui/foreign/foreign2.rs b/tests/ui/foreign/foreign2.rs index df431f2999c..9379a0b4bd6 100644 --- a/tests/ui/foreign/foreign2.rs +++ b/tests/ui/foreign/foreign2.rs @@ -1,7 +1,7 @@ -// run-pass +//@ run-pass #![allow(dead_code)] -// ignore-wasm32-bare no libc to test ffi with -// pretty-expanded FIXME #23616 +//@ ignore-wasm32-bare no libc to test ffi with +//@ pretty-expanded FIXME #23616 #![feature(rustc_private)] extern crate libc; diff --git a/tests/ui/foreign/issue-74120-lowering-of-ffi-block-bodies.rs b/tests/ui/foreign/issue-74120-lowering-of-ffi-block-bodies.rs index a84065e0218..7f1625c9265 100644 --- a/tests/ui/foreign/issue-74120-lowering-of-ffi-block-bodies.rs +++ b/tests/ui/foreign/issue-74120-lowering-of-ffi-block-bodies.rs @@ -1,7 +1,7 @@ // Previously this ICE'd because `fn g()` would be lowered, but the block associated with `fn f()` // wasn't. -// compile-flags: --crate-type=lib +//@ compile-flags: --crate-type=lib extern "C" { fn f() { diff --git a/tests/ui/foreign/issue-99276-same-type-lifetimes.rs b/tests/ui/foreign/issue-99276-same-type-lifetimes.rs index fce603c801f..c76d082ee9f 100644 --- a/tests/ui/foreign/issue-99276-same-type-lifetimes.rs +++ b/tests/ui/foreign/issue-99276-same-type-lifetimes.rs @@ -1,5 +1,5 @@ // Check that we do not ICE when structurally comparing types with lifetimes present. -// check-pass +//@ check-pass pub struct Record<'a> { pub args: &'a [(usize, &'a str)], diff --git a/tests/ui/foreign/nil-decl-in-foreign.rs b/tests/ui/foreign/nil-decl-in-foreign.rs index f3be948781b..355278d99da 100644 --- a/tests/ui/foreign/nil-decl-in-foreign.rs +++ b/tests/ui/foreign/nil-decl-in-foreign.rs @@ -1,9 +1,9 @@ -// run-pass +//@ run-pass #![allow(improper_ctypes)] #![allow(dead_code)] // Issue #901 -// pretty-expanded FIXME #23616 +//@ pretty-expanded FIXME #23616 mod libc { extern "C" { diff --git a/tests/ui/format-no-std.rs b/tests/ui/format-no-std.rs index c9b7651bfda..27c31f48a00 100644 --- a/tests/ui/format-no-std.rs +++ b/tests/ui/format-no-std.rs @@ -1,5 +1,5 @@ -// run-pass -// ignore-emscripten no no_std executables +//@ run-pass +//@ ignore-emscripten no no_std executables #![feature(lang_items, start)] #![no_std] diff --git a/tests/ui/fun-indirect-call.rs b/tests/ui/fun-indirect-call.rs index 49da3d83f4a..7919be07f7e 100644 --- a/tests/ui/fun-indirect-call.rs +++ b/tests/ui/fun-indirect-call.rs @@ -1,4 +1,4 @@ -// run-pass +//@ run-pass fn f() -> isize { return 42; } diff --git a/tests/ui/function-pointer/function-pointer-comparison-issue-54685.rs b/tests/ui/function-pointer/function-pointer-comparison-issue-54685.rs index 855749c14b9..2e1c863e0f4 100644 --- a/tests/ui/function-pointer/function-pointer-comparison-issue-54685.rs +++ b/tests/ui/function-pointer/function-pointer-comparison-issue-54685.rs @@ -1,5 +1,5 @@ -// compile-flags: -C opt-level=3 -// run-pass +//@ compile-flags: -C opt-level=3 +//@ run-pass fn foo(_i: i32) -> i32 { 1 diff --git a/tests/ui/function-pointer/issue-102289.rs b/tests/ui/function-pointer/issue-102289.rs index de394ca9ad6..54e76189ec6 100644 --- a/tests/ui/function-pointer/issue-102289.rs +++ b/tests/ui/function-pointer/issue-102289.rs @@ -1,4 +1,4 @@ -// check-pass +//@ check-pass pub(crate) trait Parser: Sized { type Output; diff --git a/tests/ui/function-pointer/sized-ret-with-binder.rs b/tests/ui/function-pointer/sized-ret-with-binder.rs index 104ac4d222e..4887ba5efa7 100644 --- a/tests/ui/function-pointer/sized-ret-with-binder.rs +++ b/tests/ui/function-pointer/sized-ret-with-binder.rs @@ -1,4 +1,4 @@ -// check-pass +//@ check-pass #![feature(unboxed_closures)] diff --git a/tests/ui/functions-closures/call-closure-from-overloaded-op.rs b/tests/ui/functions-closures/call-closure-from-overloaded-op.rs index 8e1c68fd77d..bf8ae119142 100644 --- a/tests/ui/functions-closures/call-closure-from-overloaded-op.rs +++ b/tests/ui/functions-closures/call-closure-from-overloaded-op.rs @@ -1,4 +1,4 @@ -// run-pass +//@ run-pass fn foo() -> isize { 22 } diff --git a/tests/ui/functions-closures/capture-clauses-boxed-closures.rs b/tests/ui/functions-closures/capture-clauses-boxed-closures.rs index bcde504635d..b666884f64a 100644 --- a/tests/ui/functions-closures/capture-clauses-boxed-closures.rs +++ b/tests/ui/functions-closures/capture-clauses-boxed-closures.rs @@ -1,4 +1,4 @@ -// run-pass +//@ run-pass fn each(x: &[T], mut f: F) where F: FnMut(&T) { for val in x { diff --git a/tests/ui/functions-closures/capture-clauses-unboxed-closures.rs b/tests/ui/functions-closures/capture-clauses-unboxed-closures.rs index 206b3d7b613..6839d99ba27 100644 --- a/tests/ui/functions-closures/capture-clauses-unboxed-closures.rs +++ b/tests/ui/functions-closures/capture-clauses-unboxed-closures.rs @@ -1,4 +1,4 @@ -// run-pass +//@ run-pass fn each<'a,T,F:FnMut(&'a T)>(x: &'a [T], mut f: F) { for val in x { f(val) diff --git a/tests/ui/functions-closures/clone-closure.rs b/tests/ui/functions-closures/clone-closure.rs index 1e725d8056d..586592bda10 100644 --- a/tests/ui/functions-closures/clone-closure.rs +++ b/tests/ui/functions-closures/clone-closure.rs @@ -1,4 +1,4 @@ -// run-pass +//@ run-pass // Check that closures implement `Clone`. #[derive(Clone)] diff --git a/tests/ui/functions-closures/closure-bounds-can-capture-chan.rs b/tests/ui/functions-closures/closure-bounds-can-capture-chan.rs index ccb2e201d7d..4f38ea02d9c 100644 --- a/tests/ui/functions-closures/closure-bounds-can-capture-chan.rs +++ b/tests/ui/functions-closures/closure-bounds-can-capture-chan.rs @@ -1,5 +1,5 @@ -// run-pass -// pretty-expanded FIXME #23616 +//@ run-pass +//@ pretty-expanded FIXME #23616 use std::sync::mpsc::channel; diff --git a/tests/ui/functions-closures/closure-expected-type/expect-infer-supply-two-infers.rs b/tests/ui/functions-closures/closure-expected-type/expect-infer-supply-two-infers.rs index 6d5a9876c37..09675d49393 100644 --- a/tests/ui/functions-closures/closure-expected-type/expect-infer-supply-two-infers.rs +++ b/tests/ui/functions-closures/closure-expected-type/expect-infer-supply-two-infers.rs @@ -1,4 +1,4 @@ -// run-pass +//@ run-pass #![allow(dead_code)] #![allow(unused_variables)] fn with_closure(_: F) diff --git a/tests/ui/functions-closures/closure-expected-type/issue-38714.rs b/tests/ui/functions-closures/closure-expected-type/issue-38714.rs index e97785b5cac..47835ad8442 100644 --- a/tests/ui/functions-closures/closure-expected-type/issue-38714.rs +++ b/tests/ui/functions-closures/closure-expected-type/issue-38714.rs @@ -1,4 +1,4 @@ -// run-pass +//@ run-pass #![allow(dead_code)] #![allow(unused_variables)] struct UsizeRef<'a> { diff --git a/tests/ui/functions-closures/closure-expected-type/supply-just-return-type.rs b/tests/ui/functions-closures/closure-expected-type/supply-just-return-type.rs index e9964531c3c..c72036e33f2 100644 --- a/tests/ui/functions-closures/closure-expected-type/supply-just-return-type.rs +++ b/tests/ui/functions-closures/closure-expected-type/supply-just-return-type.rs @@ -1,4 +1,4 @@ -// run-pass +//@ run-pass fn with_closure(f: F) -> Result where F: FnOnce(&char) -> Result, { diff --git a/tests/ui/functions-closures/closure-expected-type/supply-nothing.rs b/tests/ui/functions-closures/closure-expected-type/supply-nothing.rs index 8665cfc21a7..34c94cd7864 100644 --- a/tests/ui/functions-closures/closure-expected-type/supply-nothing.rs +++ b/tests/ui/functions-closures/closure-expected-type/supply-nothing.rs @@ -1,4 +1,4 @@ -// run-pass +//@ run-pass fn with_closure(f: F) -> u32 where F: FnOnce(&u32, &u32) -> u32 { diff --git a/tests/ui/functions-closures/closure-immediate.rs b/tests/ui/functions-closures/closure-immediate.rs index 428fc6bdef3..0bda017de5a 100644 --- a/tests/ui/functions-closures/closure-immediate.rs +++ b/tests/ui/functions-closures/closure-immediate.rs @@ -1,4 +1,4 @@ -// run-pass +//@ run-pass // After the work to reoptimize structs, it became possible for immediate logic to fail. // This test verifies that it actually works. diff --git a/tests/ui/functions-closures/closure-inference.rs b/tests/ui/functions-closures/closure-inference.rs index 1877414f099..b7ffbfdb87f 100644 --- a/tests/ui/functions-closures/closure-inference.rs +++ b/tests/ui/functions-closures/closure-inference.rs @@ -1,4 +1,4 @@ -// run-pass +//@ run-pass #![allow(unused_braces)] fn foo(i: isize) -> isize { i + 1 } diff --git a/tests/ui/functions-closures/closure-inference2.rs b/tests/ui/functions-closures/closure-inference2.rs index 4ce132e86ca..8db7016be6d 100644 --- a/tests/ui/functions-closures/closure-inference2.rs +++ b/tests/ui/functions-closures/closure-inference2.rs @@ -1,4 +1,4 @@ -// run-pass +//@ run-pass // Test a rather underspecified example: #![allow(unused_braces)] diff --git a/tests/ui/functions-closures/closure-reform.rs b/tests/ui/functions-closures/closure-reform.rs index 0bb6159ff4a..3277b7bff47 100644 --- a/tests/ui/functions-closures/closure-reform.rs +++ b/tests/ui/functions-closures/closure-reform.rs @@ -1,4 +1,4 @@ -// run-pass +//@ run-pass #![allow(unused_variables)] /* Any copyright is dedicated to the Public Domain. * http://creativecommons.org/publicdomain/zero/1.0/ */ diff --git a/tests/ui/functions-closures/closure-returning-closure.rs b/tests/ui/functions-closures/closure-returning-closure.rs index 17db81687ab..c4ec792c102 100644 --- a/tests/ui/functions-closures/closure-returning-closure.rs +++ b/tests/ui/functions-closures/closure-returning-closure.rs @@ -1,4 +1,4 @@ -// run-pass +//@ run-pass fn main() { let f = |_||x, y| x+y; assert_eq!(f(())(1, 2), 3); diff --git a/tests/ui/functions-closures/closure-to-fn-coercion.rs b/tests/ui/functions-closures/closure-to-fn-coercion.rs index 87ba488b5ae..4b66294ea7b 100644 --- a/tests/ui/functions-closures/closure-to-fn-coercion.rs +++ b/tests/ui/functions-closures/closure-to-fn-coercion.rs @@ -1,4 +1,4 @@ -// run-pass +//@ run-pass use std::mem; const FOO: fn(u8) -> u8 = |v: u8| { v }; diff --git a/tests/ui/functions-closures/closure_to_fn_coercion-expected-types.rs b/tests/ui/functions-closures/closure_to_fn_coercion-expected-types.rs index e7a9383950f..b8a11ef5a00 100644 --- a/tests/ui/functions-closures/closure_to_fn_coercion-expected-types.rs +++ b/tests/ui/functions-closures/closure_to_fn_coercion-expected-types.rs @@ -1,4 +1,4 @@ -// run-pass +//@ run-pass #![allow(unused_variables)] // Ensure that we deduce expected argument types when a `fn()` type is expected (#41755) diff --git a/tests/ui/functions-closures/copy-closure.rs b/tests/ui/functions-closures/copy-closure.rs index 72da02421b7..313d39eac3d 100644 --- a/tests/ui/functions-closures/copy-closure.rs +++ b/tests/ui/functions-closures/copy-closure.rs @@ -1,4 +1,4 @@ -// run-pass +//@ run-pass // Check that closures implement `Copy`. fn call T>(f: F) -> T { f() } diff --git a/tests/ui/functions-closures/fn-abi.rs b/tests/ui/functions-closures/fn-abi.rs index ac3a4be3346..d33158e8917 100644 --- a/tests/ui/functions-closures/fn-abi.rs +++ b/tests/ui/functions-closures/fn-abi.rs @@ -1,9 +1,9 @@ -// run-pass +//@ run-pass // Ensure that declarations and types which use `extern fn` both have the same // ABI (#9309). -// pretty-expanded FIXME #23616 -// aux-build:fn-abi.rs +//@ pretty-expanded FIXME #23616 +//@ aux-build:fn-abi.rs extern crate fn_abi; diff --git a/tests/ui/functions-closures/fn-bare-assign.rs b/tests/ui/functions-closures/fn-bare-assign.rs index f5dab3c8402..d09e0a3bd92 100644 --- a/tests/ui/functions-closures/fn-bare-assign.rs +++ b/tests/ui/functions-closures/fn-bare-assign.rs @@ -1,4 +1,4 @@ -// run-pass +//@ run-pass fn f(i: isize, called: &mut bool) { assert_eq!(i, 10); diff --git a/tests/ui/functions-closures/fn-bare-coerce-to-block.rs b/tests/ui/functions-closures/fn-bare-coerce-to-block.rs index 922e016ddc8..18015a41564 100644 --- a/tests/ui/functions-closures/fn-bare-coerce-to-block.rs +++ b/tests/ui/functions-closures/fn-bare-coerce-to-block.rs @@ -1,5 +1,5 @@ -// run-pass -// pretty-expanded FIXME #23616 +//@ run-pass +//@ pretty-expanded FIXME #23616 fn bare() {} diff --git a/tests/ui/functions-closures/fn-bare-item.rs b/tests/ui/functions-closures/fn-bare-item.rs index a6e6495a40a..a0856463bc2 100644 --- a/tests/ui/functions-closures/fn-bare-item.rs +++ b/tests/ui/functions-closures/fn-bare-item.rs @@ -1,4 +1,4 @@ -// run-pass +//@ run-pass fn f() { println!("This is a bare function"); } diff --git a/tests/ui/functions-closures/fn-bare-size.rs b/tests/ui/functions-closures/fn-bare-size.rs index 2ba56eaaed4..75725832365 100644 --- a/tests/ui/functions-closures/fn-bare-size.rs +++ b/tests/ui/functions-closures/fn-bare-size.rs @@ -1,4 +1,4 @@ -// run-pass +//@ run-pass use std::mem; diff --git a/tests/ui/functions-closures/fn-bare-spawn.rs b/tests/ui/functions-closures/fn-bare-spawn.rs index 0d46fe22087..902e5702fbf 100644 --- a/tests/ui/functions-closures/fn-bare-spawn.rs +++ b/tests/ui/functions-closures/fn-bare-spawn.rs @@ -1,4 +1,4 @@ -// run-pass +//@ run-pass // This is what the signature to spawn should look like with bare functions diff --git a/tests/ui/functions-closures/fn-coerce-field.rs b/tests/ui/functions-closures/fn-coerce-field.rs index 38bde7b9e8f..dd7be374c84 100644 --- a/tests/ui/functions-closures/fn-coerce-field.rs +++ b/tests/ui/functions-closures/fn-coerce-field.rs @@ -1,6 +1,6 @@ -// run-pass +//@ run-pass #![allow(dead_code)] -// pretty-expanded FIXME #23616 +//@ pretty-expanded FIXME #23616 #![allow(non_camel_case_types)] struct r where F: FnOnce() { diff --git a/tests/ui/functions-closures/fn-item-type-cast.rs b/tests/ui/functions-closures/fn-item-type-cast.rs index 4d50ea97b8b..ccd3364aaf5 100644 --- a/tests/ui/functions-closures/fn-item-type-cast.rs +++ b/tests/ui/functions-closures/fn-item-type-cast.rs @@ -1,4 +1,4 @@ -// run-pass +//@ run-pass #![allow(dead_code)] #![allow(unused_variables)] // Test explicit coercions from a fn item type to a fn pointer type. diff --git a/tests/ui/functions-closures/fn-item-type-coerce.rs b/tests/ui/functions-closures/fn-item-type-coerce.rs index 7a096764e45..e858f9e9e19 100644 --- a/tests/ui/functions-closures/fn-item-type-coerce.rs +++ b/tests/ui/functions-closures/fn-item-type-coerce.rs @@ -1,8 +1,8 @@ -// run-pass +//@ run-pass #![allow(unused_variables)] // Test implicit coercions from a fn item type to a fn pointer type. -// pretty-expanded FIXME #23616 +//@ pretty-expanded FIXME #23616 fn foo(x: isize) -> isize { x * 2 } fn bar(x: isize) -> isize { x * 4 } diff --git a/tests/ui/functions-closures/fn-item-type-zero-sized.rs b/tests/ui/functions-closures/fn-item-type-zero-sized.rs index bd9f1ed663d..11f817da7aa 100644 --- a/tests/ui/functions-closures/fn-item-type-zero-sized.rs +++ b/tests/ui/functions-closures/fn-item-type-zero-sized.rs @@ -1,4 +1,4 @@ -// run-pass +//@ run-pass // Test that fn item types are zero-sized. use std::mem::{size_of, size_of_val}; diff --git a/tests/ui/functions-closures/fn-lval.rs b/tests/ui/functions-closures/fn-lval.rs index 01079eea457..aa080f6b985 100644 --- a/tests/ui/functions-closures/fn-lval.rs +++ b/tests/ui/functions-closures/fn-lval.rs @@ -1,8 +1,8 @@ -// run-pass +//@ run-pass -// pretty-expanded FIXME #23616 +//@ pretty-expanded FIXME #23616 fn foo(_f: fn(isize) -> isize) { } diff --git a/tests/ui/functions-closures/fn-type-infer.rs b/tests/ui/functions-closures/fn-type-infer.rs index fe6567f22b5..b1624e476ef 100644 --- a/tests/ui/functions-closures/fn-type-infer.rs +++ b/tests/ui/functions-closures/fn-type-infer.rs @@ -1,5 +1,5 @@ -// run-pass -// pretty-expanded FIXME #23616 +//@ run-pass +//@ pretty-expanded FIXME #23616 #![allow(unused_variables)] diff --git a/tests/ui/functions-closures/implied-bounds-closure-arg-outlives.rs b/tests/ui/functions-closures/implied-bounds-closure-arg-outlives.rs index 4ac07123d9d..dfcbc037412 100644 --- a/tests/ui/functions-closures/implied-bounds-closure-arg-outlives.rs +++ b/tests/ui/functions-closures/implied-bounds-closure-arg-outlives.rs @@ -1,4 +1,4 @@ -// run-pass +//@ run-pass // Test that we are able to handle the relationships between free // regions bound in a closure callback. diff --git a/tests/ui/functions-closures/nullable-pointer-opt-closures.rs b/tests/ui/functions-closures/nullable-pointer-opt-closures.rs index 87dacfba25b..2cafe1b7aba 100644 --- a/tests/ui/functions-closures/nullable-pointer-opt-closures.rs +++ b/tests/ui/functions-closures/nullable-pointer-opt-closures.rs @@ -1,4 +1,4 @@ -// run-pass +//@ run-pass use std::mem; diff --git a/tests/ui/functions-closures/parallel-codegen-closures.rs b/tests/ui/functions-closures/parallel-codegen-closures.rs index 79759daba50..1842ac4db60 100644 --- a/tests/ui/functions-closures/parallel-codegen-closures.rs +++ b/tests/ui/functions-closures/parallel-codegen-closures.rs @@ -1,4 +1,4 @@ -// run-pass +//@ run-pass #![allow(dead_code)] #![allow(unused_variables)] #![allow(stable_features)] @@ -6,7 +6,7 @@ // Tests parallel codegen - this can fail if the symbol for the anonymous // closure in `sum` pollutes the second codegen unit from the first. -// compile-flags: -C codegen_units=2 +//@ compile-flags: -C codegen_units=2 #![feature(iter_arith)] diff --git a/tests/ui/functions-closures/return-from-closure.rs b/tests/ui/functions-closures/return-from-closure.rs index 656a95f120a..aaf6a31eb3f 100644 --- a/tests/ui/functions-closures/return-from-closure.rs +++ b/tests/ui/functions-closures/return-from-closure.rs @@ -1,4 +1,4 @@ -// run-pass +//@ run-pass #![allow(non_upper_case_globals)] // just to make sure that `return` is only returning from the closure, // not the surrounding function. diff --git a/tests/ui/generic-associated-types/anonymize-bound-vars.rs b/tests/ui/generic-associated-types/anonymize-bound-vars.rs index eb7a12412c6..37267329ac4 100644 --- a/tests/ui/generic-associated-types/anonymize-bound-vars.rs +++ b/tests/ui/generic-associated-types/anonymize-bound-vars.rs @@ -1,4 +1,4 @@ -// check-pass +//@ check-pass // // regression test for #98702 diff --git a/tests/ui/generic-associated-types/assume-gat-normalization-for-nested-goals.rs b/tests/ui/generic-associated-types/assume-gat-normalization-for-nested-goals.rs index e2d51c6649a..fade3c441ab 100644 --- a/tests/ui/generic-associated-types/assume-gat-normalization-for-nested-goals.rs +++ b/tests/ui/generic-associated-types/assume-gat-normalization-for-nested-goals.rs @@ -1,4 +1,4 @@ -// known-bug: #117606 +//@ known-bug: #117606 #![feature(associated_type_defaults)] diff --git a/tests/ui/generic-associated-types/bugs/hrtb-implied-1.rs b/tests/ui/generic-associated-types/bugs/hrtb-implied-1.rs index 5101de19d3c..b2d654b0689 100644 --- a/tests/ui/generic-associated-types/bugs/hrtb-implied-1.rs +++ b/tests/ui/generic-associated-types/bugs/hrtb-implied-1.rs @@ -1,5 +1,5 @@ -// check-fail -// known-bug: unknown +//@ check-fail +//@ known-bug: unknown // This gives us problems because `for<'a> I::Item<'a>: Debug` should mean "for // all 'a where I::Item<'a> is WF", but really means "for all 'a possible" diff --git a/tests/ui/generic-associated-types/bugs/hrtb-implied-2.rs b/tests/ui/generic-associated-types/bugs/hrtb-implied-2.rs index 3174227a7a1..b0212414b5a 100644 --- a/tests/ui/generic-associated-types/bugs/hrtb-implied-2.rs +++ b/tests/ui/generic-associated-types/bugs/hrtb-implied-2.rs @@ -1,5 +1,5 @@ -// check-fail -// known-bug: unknown +//@ check-fail +//@ known-bug: unknown // This gives us problems because `for<'a> I::Item<'a>: Debug` should mean "for // all 'a where I::Item<'a> is WF", but really means "for all 'a possible" diff --git a/tests/ui/generic-associated-types/bugs/issue-100013.rs b/tests/ui/generic-associated-types/bugs/issue-100013.rs index b13b730d5d8..994f41e9f86 100644 --- a/tests/ui/generic-associated-types/bugs/issue-100013.rs +++ b/tests/ui/generic-associated-types/bugs/issue-100013.rs @@ -1,6 +1,6 @@ -// check-fail -// known-bug: unknown -// edition: 2021 +//@ check-fail +//@ known-bug: unknown +//@ edition: 2021 // We really should accept this, but we need implied bounds between the regions // in a coroutine interior. diff --git a/tests/ui/generic-associated-types/bugs/issue-80626.rs b/tests/ui/generic-associated-types/bugs/issue-80626.rs index d6e18010f3b..a14496280c7 100644 --- a/tests/ui/generic-associated-types/bugs/issue-80626.rs +++ b/tests/ui/generic-associated-types/bugs/issue-80626.rs @@ -1,4 +1,4 @@ -// check-pass +//@ check-pass trait Allocator { type Allocated; diff --git a/tests/ui/generic-associated-types/bugs/issue-87735.rs b/tests/ui/generic-associated-types/bugs/issue-87735.rs index 80737a79899..e864ad7c815 100644 --- a/tests/ui/generic-associated-types/bugs/issue-87735.rs +++ b/tests/ui/generic-associated-types/bugs/issue-87735.rs @@ -1,5 +1,5 @@ -// check-fail -// known-bug: #87735, #88526 +//@ check-fail +//@ known-bug: #87735, #88526 // This should pass, but we need an extension of implied bounds (probably). diff --git a/tests/ui/generic-associated-types/bugs/issue-87755.rs b/tests/ui/generic-associated-types/bugs/issue-87755.rs index cda722d2f0c..493a400b982 100644 --- a/tests/ui/generic-associated-types/bugs/issue-87755.rs +++ b/tests/ui/generic-associated-types/bugs/issue-87755.rs @@ -1,5 +1,5 @@ -// check-fail -// known-bug: #87755 +//@ check-fail +//@ known-bug: #87755 // This should pass. diff --git a/tests/ui/generic-associated-types/bugs/issue-87803.rs b/tests/ui/generic-associated-types/bugs/issue-87803.rs index 56237e387ef..63773894a97 100644 --- a/tests/ui/generic-associated-types/bugs/issue-87803.rs +++ b/tests/ui/generic-associated-types/bugs/issue-87803.rs @@ -1,5 +1,5 @@ -// check-fail -// known-bug: #87803 +//@ check-fail +//@ known-bug: #87803 // This should pass, but using a type alias vs a reference directly // changes late-bound -> early-bound. diff --git a/tests/ui/generic-associated-types/bugs/issue-88382.rs b/tests/ui/generic-associated-types/bugs/issue-88382.rs index 8f8cc4523a2..4147d8e5344 100644 --- a/tests/ui/generic-associated-types/bugs/issue-88382.rs +++ b/tests/ui/generic-associated-types/bugs/issue-88382.rs @@ -1,5 +1,5 @@ -// check-fail -// known-bug: #88382 +//@ check-fail +//@ known-bug: #88382 // This should pass, but has a missed normalization due to HRTB. diff --git a/tests/ui/generic-associated-types/bugs/issue-88460.rs b/tests/ui/generic-associated-types/bugs/issue-88460.rs index 3d2b225f0cd..50a2bacb070 100644 --- a/tests/ui/generic-associated-types/bugs/issue-88460.rs +++ b/tests/ui/generic-associated-types/bugs/issue-88460.rs @@ -1,4 +1,4 @@ -// check-pass +//@ check-pass pub trait Marker {} diff --git a/tests/ui/generic-associated-types/bugs/issue-88526.rs b/tests/ui/generic-associated-types/bugs/issue-88526.rs index 99397744fa6..e2a42aefdd2 100644 --- a/tests/ui/generic-associated-types/bugs/issue-88526.rs +++ b/tests/ui/generic-associated-types/bugs/issue-88526.rs @@ -1,5 +1,5 @@ -// check-fail -// known-bug: #88526 +//@ check-fail +//@ known-bug: #88526 // This should pass, but requires more logic. diff --git a/tests/ui/generic-associated-types/bugs/issue-91762.rs b/tests/ui/generic-associated-types/bugs/issue-91762.rs index 8f2cc45509f..b4799eb12f4 100644 --- a/tests/ui/generic-associated-types/bugs/issue-91762.rs +++ b/tests/ui/generic-associated-types/bugs/issue-91762.rs @@ -1,5 +1,5 @@ -// check-fail -// known-bug: unknown +//@ check-fail +//@ known-bug: unknown // We almost certainly want this to pass, but // it's particularly difficult currently, because we need a way of specifying diff --git a/tests/ui/generic-associated-types/collections.rs b/tests/ui/generic-associated-types/collections.rs index 15f429afb02..7239d226927 100644 --- a/tests/ui/generic-associated-types/collections.rs +++ b/tests/ui/generic-associated-types/collections.rs @@ -4,7 +4,7 @@ // https://smallcultfollowing.com/babysteps/blog/2016/11/03/ // associated-type-constructors-part-2-family-traits/ -// run-pass +//@ run-pass trait Collection { type Iter<'iter>: Iterator where T: 'iter, Self: 'iter; diff --git a/tests/ui/generic-associated-types/const-generics-gat-in-trait-return-type-1.rs b/tests/ui/generic-associated-types/const-generics-gat-in-trait-return-type-1.rs index c5f9a25a6ea..3c71c87bb45 100644 --- a/tests/ui/generic-associated-types/const-generics-gat-in-trait-return-type-1.rs +++ b/tests/ui/generic-associated-types/const-generics-gat-in-trait-return-type-1.rs @@ -1,4 +1,4 @@ -// run-pass +//@ run-pass // This test unsures that with_opt_const_param returns the // def_id of the N param in the Foo::Assoc GAT. diff --git a/tests/ui/generic-associated-types/const-generics-gat-in-trait-return-type-2.rs b/tests/ui/generic-associated-types/const-generics-gat-in-trait-return-type-2.rs index cd7941ed9af..cd8ca7bb39f 100644 --- a/tests/ui/generic-associated-types/const-generics-gat-in-trait-return-type-2.rs +++ b/tests/ui/generic-associated-types/const-generics-gat-in-trait-return-type-2.rs @@ -1,4 +1,4 @@ -// run-pass +//@ run-pass // This test unsures that with_opt_const_param returns the // def_id of the N param in the Foo::Assoc GAT. diff --git a/tests/ui/generic-associated-types/const-generics-gat-in-trait-return-type-3.rs b/tests/ui/generic-associated-types/const-generics-gat-in-trait-return-type-3.rs index db61fc08005..6464e16492a 100644 --- a/tests/ui/generic-associated-types/const-generics-gat-in-trait-return-type-3.rs +++ b/tests/ui/generic-associated-types/const-generics-gat-in-trait-return-type-3.rs @@ -1,4 +1,4 @@ -// run-pass +//@ run-pass // This test unsures that with_opt_const_param returns the // def_id of the N param in the Bar::Assoc GAT. diff --git a/tests/ui/generic-associated-types/construct_with_other_type.rs b/tests/ui/generic-associated-types/construct_with_other_type.rs index 5cb07f55883..74ac8313cad 100644 --- a/tests/ui/generic-associated-types/construct_with_other_type.rs +++ b/tests/ui/generic-associated-types/construct_with_other_type.rs @@ -1,4 +1,4 @@ -// check-pass +//@ check-pass use std::ops::Deref; diff --git a/tests/ui/generic-associated-types/cross-crate-bounds.rs b/tests/ui/generic-associated-types/cross-crate-bounds.rs index 8934a07fd4e..84b903aa6ae 100644 --- a/tests/ui/generic-associated-types/cross-crate-bounds.rs +++ b/tests/ui/generic-associated-types/cross-crate-bounds.rs @@ -1,8 +1,8 @@ // regression test for #73816 // We handled bounds differently when `feature(generic_associated_types)` was enabled -// edition:2018 -// aux-build:foo_defn.rs +//@ edition:2018 +//@ aux-build:foo_defn.rs extern crate foo_defn; diff --git a/tests/ui/generic-associated-types/extended/lending_iterator.rs b/tests/ui/generic-associated-types/extended/lending_iterator.rs index 8bec78d6ecd..7cd32413001 100644 --- a/tests/ui/generic-associated-types/extended/lending_iterator.rs +++ b/tests/ui/generic-associated-types/extended/lending_iterator.rs @@ -1,6 +1,6 @@ -// revisions: base extended -//[base] check-fail -//[extended] check-pass +//@ revisions: base extended +//@[base] check-fail +//@[extended] check-pass #![cfg_attr(extended, feature(generic_associated_types_extended))] #![cfg_attr(extended, allow(incomplete_features))] diff --git a/tests/ui/generic-associated-types/extended/lending_iterator_2.rs b/tests/ui/generic-associated-types/extended/lending_iterator_2.rs index eb9c0456a1e..f4b0dae0a91 100644 --- a/tests/ui/generic-associated-types/extended/lending_iterator_2.rs +++ b/tests/ui/generic-associated-types/extended/lending_iterator_2.rs @@ -1,6 +1,6 @@ -// revisions: base extended -//[base] check-fail -//[extended] check-pass +//@ revisions: base extended +//@[base] check-fail +//@[extended] check-pass #![cfg_attr(extended, feature(generic_associated_types_extended))] #![cfg_attr(extended, allow(incomplete_features))] diff --git a/tests/ui/generic-associated-types/gat-bounds-normalize-pred.rs b/tests/ui/generic-associated-types/gat-bounds-normalize-pred.rs index b43f982283b..b0f189ca2ba 100644 --- a/tests/ui/generic-associated-types/gat-bounds-normalize-pred.rs +++ b/tests/ui/generic-associated-types/gat-bounds-normalize-pred.rs @@ -1,4 +1,4 @@ -// check-pass +//@ check-pass trait Foo { type Assoc: PartialEq>; diff --git a/tests/ui/generic-associated-types/gat-in-trait-path.rs b/tests/ui/generic-associated-types/gat-in-trait-path.rs index c1ce7d69f10..7eb0aabb333 100644 --- a/tests/ui/generic-associated-types/gat-in-trait-path.rs +++ b/tests/ui/generic-associated-types/gat-in-trait-path.rs @@ -1,6 +1,6 @@ -// revisions: base extended -//[base] check-fail -//[extended] check-pass +//@ revisions: base extended +//@[base] check-fail +//@[extended] check-pass #![feature(associated_type_defaults)] #![cfg_attr(extended, feature(generic_associated_types_extended))] diff --git a/tests/ui/generic-associated-types/generic-associated-type-bounds.rs b/tests/ui/generic-associated-types/generic-associated-type-bounds.rs index fdc5a72671c..08b0877be86 100644 --- a/tests/ui/generic-associated-types/generic-associated-type-bounds.rs +++ b/tests/ui/generic-associated-types/generic-associated-type-bounds.rs @@ -1,4 +1,4 @@ -// run-pass +//@ run-pass pub trait X { type Y<'a> where Self: 'a; diff --git a/tests/ui/generic-associated-types/higher-ranked-self-impl-requirement.rs b/tests/ui/generic-associated-types/higher-ranked-self-impl-requirement.rs index 5ef9437c968..8315e98524a 100644 --- a/tests/ui/generic-associated-types/higher-ranked-self-impl-requirement.rs +++ b/tests/ui/generic-associated-types/higher-ranked-self-impl-requirement.rs @@ -1,4 +1,4 @@ -// check-pass +//@ check-pass trait Database: for<'r> HasValueRef<'r, Database = Self> {} diff --git a/tests/ui/generic-associated-types/impl_bounds_ok.rs b/tests/ui/generic-associated-types/impl_bounds_ok.rs index 88f829ea25a..b6ea754a652 100644 --- a/tests/ui/generic-associated-types/impl_bounds_ok.rs +++ b/tests/ui/generic-associated-types/impl_bounds_ok.rs @@ -1,4 +1,4 @@ -// check-pass +//@ check-pass #![feature(associated_type_defaults)] diff --git a/tests/ui/generic-associated-types/issue-102114.rs b/tests/ui/generic-associated-types/issue-102114.rs index bb6369d7f8f..58518f3f59a 100644 --- a/tests/ui/generic-associated-types/issue-102114.rs +++ b/tests/ui/generic-associated-types/issue-102114.rs @@ -1,5 +1,5 @@ -// revisions: current next -//[next] compile-flags: -Znext-solver +//@ revisions: current next +//@[next] compile-flags: -Znext-solver trait A { type B<'b>; diff --git a/tests/ui/generic-associated-types/issue-102333.rs b/tests/ui/generic-associated-types/issue-102333.rs index 6c72563322f..809b2ad07fe 100644 --- a/tests/ui/generic-associated-types/issue-102333.rs +++ b/tests/ui/generic-associated-types/issue-102333.rs @@ -1,4 +1,4 @@ -// check-pass +//@ check-pass trait A { type T: B = ()>; diff --git a/tests/ui/generic-associated-types/issue-58694-parameter-out-of-range.rs b/tests/ui/generic-associated-types/issue-58694-parameter-out-of-range.rs index 625ccfe89e0..a1c3b35c2e7 100644 --- a/tests/ui/generic-associated-types/issue-58694-parameter-out-of-range.rs +++ b/tests/ui/generic-associated-types/issue-58694-parameter-out-of-range.rs @@ -1,4 +1,4 @@ -// check-pass +//@ check-pass trait Cert { type PublicKey<'a>: From<&'a [u8]>; diff --git a/tests/ui/generic-associated-types/issue-62326-parameter-out-of-range.rs b/tests/ui/generic-associated-types/issue-62326-parameter-out-of-range.rs index c1140bff82b..b8b8168e4df 100644 --- a/tests/ui/generic-associated-types/issue-62326-parameter-out-of-range.rs +++ b/tests/ui/generic-associated-types/issue-62326-parameter-out-of-range.rs @@ -1,4 +1,4 @@ -// check-pass +//@ check-pass trait Iterator { type Item<'a>: 'a; diff --git a/tests/ui/generic-associated-types/issue-67424.rs b/tests/ui/generic-associated-types/issue-67424.rs index b6c7c70cd83..24cce228ed3 100644 --- a/tests/ui/generic-associated-types/issue-67424.rs +++ b/tests/ui/generic-associated-types/issue-67424.rs @@ -1,4 +1,4 @@ -// check-pass +//@ check-pass // Fixed by #67160 trait Trait1 { diff --git a/tests/ui/generic-associated-types/issue-67510-pass.rs b/tests/ui/generic-associated-types/issue-67510-pass.rs index 66ce3e807a1..1596f401bbc 100644 --- a/tests/ui/generic-associated-types/issue-67510-pass.rs +++ b/tests/ui/generic-associated-types/issue-67510-pass.rs @@ -1,6 +1,6 @@ -// revisions: base extended -//[base] check-fail -//[extended] check-pass +//@ revisions: base extended +//@[base] check-fail +//@[extended] check-pass #![cfg_attr(extended, feature(generic_associated_types_extended))] #![cfg_attr(extended, allow(incomplete_features))] diff --git a/tests/ui/generic-associated-types/issue-68648-1.rs b/tests/ui/generic-associated-types/issue-68648-1.rs index 0df41bab327..9e0d46f8765 100644 --- a/tests/ui/generic-associated-types/issue-68648-1.rs +++ b/tests/ui/generic-associated-types/issue-68648-1.rs @@ -1,4 +1,4 @@ -// check-pass +//@ check-pass trait Fun { type F<'a>; diff --git a/tests/ui/generic-associated-types/issue-68649-pass.rs b/tests/ui/generic-associated-types/issue-68649-pass.rs index 77274387795..9e4384b1a54 100644 --- a/tests/ui/generic-associated-types/issue-68649-pass.rs +++ b/tests/ui/generic-associated-types/issue-68649-pass.rs @@ -1,4 +1,4 @@ -// check-pass +//@ check-pass trait Fun { type F<'a>; diff --git a/tests/ui/generic-associated-types/issue-68653.rs b/tests/ui/generic-associated-types/issue-68653.rs index 170b87cf252..318eafe74f7 100644 --- a/tests/ui/generic-associated-types/issue-68653.rs +++ b/tests/ui/generic-associated-types/issue-68653.rs @@ -1,6 +1,6 @@ // A regression test for #68653, which was fixed by #68938. -// check-pass +//@ check-pass trait Fun { type F<'a: 'a>; diff --git a/tests/ui/generic-associated-types/issue-70303.rs b/tests/ui/generic-associated-types/issue-70303.rs index 0edff5e4e33..fc88682c3c6 100644 --- a/tests/ui/generic-associated-types/issue-70303.rs +++ b/tests/ui/generic-associated-types/issue-70303.rs @@ -1,4 +1,4 @@ -// check-pass +//@ check-pass trait Document { type Cursor<'a>: DocCursor<'a> where Self: 'a; diff --git a/tests/ui/generic-associated-types/issue-76407.rs b/tests/ui/generic-associated-types/issue-76407.rs index 9556ec6da25..d610aa075ae 100644 --- a/tests/ui/generic-associated-types/issue-76407.rs +++ b/tests/ui/generic-associated-types/issue-76407.rs @@ -1,4 +1,4 @@ -// check-pass +//@ check-pass trait Marker {} diff --git a/tests/ui/generic-associated-types/issue-76535.rs b/tests/ui/generic-associated-types/issue-76535.rs index 2457a05a067..cf26b65c85f 100644 --- a/tests/ui/generic-associated-types/issue-76535.rs +++ b/tests/ui/generic-associated-types/issue-76535.rs @@ -1,4 +1,4 @@ -// revisions: base extended +//@ revisions: base extended #![cfg_attr(extended, feature(generic_associated_types_extended))] #![cfg_attr(extended, allow(incomplete_features))] diff --git a/tests/ui/generic-associated-types/issue-76826.rs b/tests/ui/generic-associated-types/issue-76826.rs index ead78453ecf..1274ad23be0 100644 --- a/tests/ui/generic-associated-types/issue-76826.rs +++ b/tests/ui/generic-associated-types/issue-76826.rs @@ -1,4 +1,4 @@ -// run-pass +//@ run-pass pub trait Iter { type Item<'a> where Self: 'a; diff --git a/tests/ui/generic-associated-types/issue-78113-lifetime-mismatch-dyn-trait-box.rs b/tests/ui/generic-associated-types/issue-78113-lifetime-mismatch-dyn-trait-box.rs index fd3b967d9d7..1c94067029d 100644 --- a/tests/ui/generic-associated-types/issue-78113-lifetime-mismatch-dyn-trait-box.rs +++ b/tests/ui/generic-associated-types/issue-78113-lifetime-mismatch-dyn-trait-box.rs @@ -1,6 +1,6 @@ // Test for diagnostics when we have mismatched lifetime due to implicit 'static lifetime in GATs -// check-fail +//@ check-fail pub trait A {} impl A for &dyn A {} diff --git a/tests/ui/generic-associated-types/issue-78671.rs b/tests/ui/generic-associated-types/issue-78671.rs index 327b0c14ae8..ce4c040644a 100644 --- a/tests/ui/generic-associated-types/issue-78671.rs +++ b/tests/ui/generic-associated-types/issue-78671.rs @@ -1,4 +1,4 @@ -// revisions: base extended +//@ revisions: base extended #![cfg_attr(extended, feature(generic_associated_types_extended))] #![cfg_attr(extended, allow(incomplete_features))] diff --git a/tests/ui/generic-associated-types/issue-79422.rs b/tests/ui/generic-associated-types/issue-79422.rs index a52dd792dda..bf61dcaee3a 100644 --- a/tests/ui/generic-associated-types/issue-79422.rs +++ b/tests/ui/generic-associated-types/issue-79422.rs @@ -1,4 +1,4 @@ -// revisions: base extended +//@ revisions: base extended #![cfg_attr(extended, feature(generic_associated_types_extended))] #![cfg_attr(extended, allow(incomplete_features))] diff --git a/tests/ui/generic-associated-types/issue-80433-reduced.rs b/tests/ui/generic-associated-types/issue-80433-reduced.rs index 44831a995c6..db169c8be0a 100644 --- a/tests/ui/generic-associated-types/issue-80433-reduced.rs +++ b/tests/ui/generic-associated-types/issue-80433-reduced.rs @@ -1,4 +1,4 @@ -// check-pass +//@ check-pass struct E {} diff --git a/tests/ui/generic-associated-types/issue-81487.rs b/tests/ui/generic-associated-types/issue-81487.rs index 0d19a75bb7f..f1108e8bc43 100644 --- a/tests/ui/generic-associated-types/issue-81487.rs +++ b/tests/ui/generic-associated-types/issue-81487.rs @@ -1,4 +1,4 @@ -// build-pass +//@ build-pass trait Trait { type Ref<'a>; diff --git a/tests/ui/generic-associated-types/issue-84931.rs b/tests/ui/generic-associated-types/issue-84931.rs index 2ef990a7a90..ed3d564c948 100644 --- a/tests/ui/generic-associated-types/issue-84931.rs +++ b/tests/ui/generic-associated-types/issue-84931.rs @@ -1,4 +1,4 @@ -// check-fail +//@ check-fail trait StreamingIter { type Item<'a> where Self: 'a; diff --git a/tests/ui/generic-associated-types/issue-85921.rs b/tests/ui/generic-associated-types/issue-85921.rs index d281ed9eedb..293ce7b816a 100644 --- a/tests/ui/generic-associated-types/issue-85921.rs +++ b/tests/ui/generic-associated-types/issue-85921.rs @@ -1,4 +1,4 @@ -// check-pass +//@ check-pass trait Trait { type Assoc<'a>; diff --git a/tests/ui/generic-associated-types/issue-86218-2.rs b/tests/ui/generic-associated-types/issue-86218-2.rs index 8a5e4a0f3cc..7066e0a211f 100644 --- a/tests/ui/generic-associated-types/issue-86218-2.rs +++ b/tests/ui/generic-associated-types/issue-86218-2.rs @@ -1,4 +1,4 @@ -// check-pass +//@ check-pass #![feature(impl_trait_in_assoc_type)] diff --git a/tests/ui/generic-associated-types/issue-86218.rs b/tests/ui/generic-associated-types/issue-86218.rs index 397a0f2c649..dba9a498a1d 100644 --- a/tests/ui/generic-associated-types/issue-86218.rs +++ b/tests/ui/generic-associated-types/issue-86218.rs @@ -1,4 +1,4 @@ -// check-pass +//@ check-pass #![feature(impl_trait_in_assoc_type)] diff --git a/tests/ui/generic-associated-types/issue-86483.rs b/tests/ui/generic-associated-types/issue-86483.rs index 70267637ae9..82ef17ca6c9 100644 --- a/tests/ui/generic-associated-types/issue-86483.rs +++ b/tests/ui/generic-associated-types/issue-86483.rs @@ -2,7 +2,7 @@ // // Made to pass as part of fixing #98095. // -// check-pass +//@ check-pass pub trait IceIce where diff --git a/tests/ui/generic-associated-types/issue-86787.rs b/tests/ui/generic-associated-types/issue-86787.rs index 5edd0a9f02f..88cdd472696 100644 --- a/tests/ui/generic-associated-types/issue-86787.rs +++ b/tests/ui/generic-associated-types/issue-86787.rs @@ -1,4 +1,4 @@ -// check-fail +//@ check-fail enum Either { Left(L), diff --git a/tests/ui/generic-associated-types/issue-87429-2.rs b/tests/ui/generic-associated-types/issue-87429-2.rs index feb43ee5aa4..31d6d6e554b 100644 --- a/tests/ui/generic-associated-types/issue-87429-2.rs +++ b/tests/ui/generic-associated-types/issue-87429-2.rs @@ -2,7 +2,7 @@ // predicates in the param env when checking that an associated type satisfies // its bounds does not cause us to not be able to use the bounds on the parameters. -// check-pass +//@ check-pass trait Family { type Member<'a, C: Eq>: for<'b> MyBound<'b, C>; diff --git a/tests/ui/generic-associated-types/issue-87429-associated-type-default.rs b/tests/ui/generic-associated-types/issue-87429-associated-type-default.rs index 2006f9bc74d..db4af2f7ed3 100644 --- a/tests/ui/generic-associated-types/issue-87429-associated-type-default.rs +++ b/tests/ui/generic-associated-types/issue-87429-associated-type-default.rs @@ -1,4 +1,4 @@ -// check-fail +//@ check-fail #![feature(associated_type_defaults)] diff --git a/tests/ui/generic-associated-types/issue-87429-specialization.rs b/tests/ui/generic-associated-types/issue-87429-specialization.rs index 6e31f1b21e5..87e91162a86 100644 --- a/tests/ui/generic-associated-types/issue-87429-specialization.rs +++ b/tests/ui/generic-associated-types/issue-87429-specialization.rs @@ -1,4 +1,4 @@ -// check-fail +//@ check-fail #![feature(specialization)] //~^ WARN incomplete diff --git a/tests/ui/generic-associated-types/issue-87429.rs b/tests/ui/generic-associated-types/issue-87429.rs index 56394823cc5..ccb43fc88f3 100644 --- a/tests/ui/generic-associated-types/issue-87429.rs +++ b/tests/ui/generic-associated-types/issue-87429.rs @@ -1,4 +1,4 @@ -// check-pass +//@ check-pass trait Family { type Member<'a>: for<'b> PartialEq>; diff --git a/tests/ui/generic-associated-types/issue-87748.rs b/tests/ui/generic-associated-types/issue-87748.rs index 6cbe3d90223..384b0ae40e3 100644 --- a/tests/ui/generic-associated-types/issue-87748.rs +++ b/tests/ui/generic-associated-types/issue-87748.rs @@ -1,7 +1,7 @@ // Checks that we properly add implied bounds from unnormalized projections in // inputs when typechecking functions. -// check-pass +//@ check-pass trait MyTrait { type Assoc<'a, 'b> where 'b: 'a; diff --git a/tests/ui/generic-associated-types/issue-87750.rs b/tests/ui/generic-associated-types/issue-87750.rs index b35657989ef..92708360529 100644 --- a/tests/ui/generic-associated-types/issue-87750.rs +++ b/tests/ui/generic-associated-types/issue-87750.rs @@ -1,4 +1,4 @@ -// check-pass +//@ check-pass trait PointerFamily { type Pointer; diff --git a/tests/ui/generic-associated-types/issue-88287.rs b/tests/ui/generic-associated-types/issue-88287.rs index 82188493d52..5d64ad8eeae 100644 --- a/tests/ui/generic-associated-types/issue-88287.rs +++ b/tests/ui/generic-associated-types/issue-88287.rs @@ -1,4 +1,4 @@ -// edition:2018 +//@ edition:2018 #![feature(type_alias_impl_trait)] diff --git a/tests/ui/generic-associated-types/issue-88360.fixed b/tests/ui/generic-associated-types/issue-88360.fixed index 6fb1e2559c0..2ebc459f197 100644 --- a/tests/ui/generic-associated-types/issue-88360.fixed +++ b/tests/ui/generic-associated-types/issue-88360.fixed @@ -1,4 +1,4 @@ -// run-rustfix +//@ run-rustfix #![allow(dead_code)] trait GatTrait { diff --git a/tests/ui/generic-associated-types/issue-88360.rs b/tests/ui/generic-associated-types/issue-88360.rs index c8f07955b61..011061dd861 100644 --- a/tests/ui/generic-associated-types/issue-88360.rs +++ b/tests/ui/generic-associated-types/issue-88360.rs @@ -1,4 +1,4 @@ -// run-rustfix +//@ run-rustfix #![allow(dead_code)] trait GatTrait { diff --git a/tests/ui/generic-associated-types/issue-88405.rs b/tests/ui/generic-associated-types/issue-88405.rs index 8dad6a89fd0..ec775c6748f 100644 --- a/tests/ui/generic-associated-types/issue-88405.rs +++ b/tests/ui/generic-associated-types/issue-88405.rs @@ -1,4 +1,4 @@ -// check-pass +//@ check-pass trait SomeTrait {} trait OtherTrait { diff --git a/tests/ui/generic-associated-types/issue-88459.rs b/tests/ui/generic-associated-types/issue-88459.rs index 07d7bc06d08..776e0f95d09 100644 --- a/tests/ui/generic-associated-types/issue-88459.rs +++ b/tests/ui/generic-associated-types/issue-88459.rs @@ -1,4 +1,4 @@ -// check-pass +//@ check-pass trait Trait { type Assoc<'a>; diff --git a/tests/ui/generic-associated-types/issue-89008.rs b/tests/ui/generic-associated-types/issue-89008.rs index 94b07e674e8..30457f2ed15 100644 --- a/tests/ui/generic-associated-types/issue-89008.rs +++ b/tests/ui/generic-associated-types/issue-89008.rs @@ -1,5 +1,5 @@ -// check-pass -// edition:2021 +//@ check-pass +//@ edition:2021 #![feature(impl_trait_in_assoc_type)] diff --git a/tests/ui/generic-associated-types/issue-89352.rs b/tests/ui/generic-associated-types/issue-89352.rs index 1896d0c87f4..5e65d0888d3 100644 --- a/tests/ui/generic-associated-types/issue-89352.rs +++ b/tests/ui/generic-associated-types/issue-89352.rs @@ -1,4 +1,4 @@ -// check-pass +//@ check-pass use std::marker::PhantomData; diff --git a/tests/ui/generic-associated-types/issue-90014-tait.rs b/tests/ui/generic-associated-types/issue-90014-tait.rs index 1ce5cd31987..69738aac0a5 100644 --- a/tests/ui/generic-associated-types/issue-90014-tait.rs +++ b/tests/ui/generic-associated-types/issue-90014-tait.rs @@ -1,8 +1,8 @@ //! This test is reporting the wrong error. We need //! more inherent associated type tests that use opaque types //! in general. Some variant of this test should compile successfully. -// known-bug: unknown -// edition:2018 +//@ known-bug: unknown +//@ edition:2018 #![feature(impl_trait_in_assoc_type, inherent_associated_types)] #![allow(incomplete_features)] diff --git a/tests/ui/generic-associated-types/issue-90014-tait2.rs b/tests/ui/generic-associated-types/issue-90014-tait2.rs index 7fb14eddc2c..4ba32011c0d 100644 --- a/tests/ui/generic-associated-types/issue-90014-tait2.rs +++ b/tests/ui/generic-associated-types/issue-90014-tait2.rs @@ -2,8 +2,8 @@ //! without respecting its binders (which would ICE). //! Unfortunately we don't even reach opaque type collection, as we ICE in typeck before that. //! See #109281 for the original report. -// edition:2018 -// error-pattern: expected generic lifetime parameter, found `'a` +//@ edition:2018 +//@ error-pattern: expected generic lifetime parameter, found `'a` #![feature(type_alias_impl_trait)] #![allow(incomplete_features)] diff --git a/tests/ui/generic-associated-types/issue-90014.rs b/tests/ui/generic-associated-types/issue-90014.rs index c4d762796e2..6a66a0c60c6 100644 --- a/tests/ui/generic-associated-types/issue-90014.rs +++ b/tests/ui/generic-associated-types/issue-90014.rs @@ -1,4 +1,4 @@ -// edition:2018 +//@ edition:2018 #![feature(impl_trait_in_assoc_type)] diff --git a/tests/ui/generic-associated-types/issue-90729.rs b/tests/ui/generic-associated-types/issue-90729.rs index bcec2e32121..7e9980a1be4 100644 --- a/tests/ui/generic-associated-types/issue-90729.rs +++ b/tests/ui/generic-associated-types/issue-90729.rs @@ -1,4 +1,4 @@ -// check-pass +//@ check-pass use std::marker::PhantomData; diff --git a/tests/ui/generic-associated-types/issue-92096.rs b/tests/ui/generic-associated-types/issue-92096.rs index e285af6660e..a34c4179584 100644 --- a/tests/ui/generic-associated-types/issue-92096.rs +++ b/tests/ui/generic-associated-types/issue-92096.rs @@ -1,4 +1,4 @@ -// edition:2018 +//@ edition:2018 use std::future::Future; diff --git a/tests/ui/generic-associated-types/issue-92280.rs b/tests/ui/generic-associated-types/issue-92280.rs index 9284beea33e..8a7eba0d2de 100644 --- a/tests/ui/generic-associated-types/issue-92280.rs +++ b/tests/ui/generic-associated-types/issue-92280.rs @@ -1,4 +1,4 @@ -// check-pass +//@ check-pass #![allow(non_camel_case_types)] diff --git a/tests/ui/generic-associated-types/issue-92954.rs b/tests/ui/generic-associated-types/issue-92954.rs index 22ce8f9fe3b..926ebd897eb 100644 --- a/tests/ui/generic-associated-types/issue-92954.rs +++ b/tests/ui/generic-associated-types/issue-92954.rs @@ -1,4 +1,4 @@ -// check-pass +//@ check-pass pub trait Foo { type Assoc<'c>; diff --git a/tests/ui/generic-associated-types/issue-93141.rs b/tests/ui/generic-associated-types/issue-93141.rs index 48c78b9c067..9472402bce3 100644 --- a/tests/ui/generic-associated-types/issue-93141.rs +++ b/tests/ui/generic-associated-types/issue-93141.rs @@ -1,4 +1,4 @@ -// check-pass +//@ check-pass pub trait Fooey: Sized { type Context<'c> where Self: 'c; diff --git a/tests/ui/generic-associated-types/issue-93262.rs b/tests/ui/generic-associated-types/issue-93262.rs index a7bcd111dff..c4a6f0dbaa0 100644 --- a/tests/ui/generic-associated-types/issue-93262.rs +++ b/tests/ui/generic-associated-types/issue-93262.rs @@ -1,4 +1,4 @@ -// check-pass +//@ check-pass pub trait Trait { type Assoc<'a> where Self: 'a; diff --git a/tests/ui/generic-associated-types/issue-93340.rs b/tests/ui/generic-associated-types/issue-93340.rs index 4662fda537b..783f8c06ebf 100644 --- a/tests/ui/generic-associated-types/issue-93340.rs +++ b/tests/ui/generic-associated-types/issue-93340.rs @@ -1,4 +1,4 @@ -// check-pass +//@ check-pass pub trait Scalar: 'static { type RefType<'a>: ScalarRef<'a>; diff --git a/tests/ui/generic-associated-types/issue-93341.rs b/tests/ui/generic-associated-types/issue-93341.rs index 737b2bbdb24..234ce8349ce 100644 --- a/tests/ui/generic-associated-types/issue-93341.rs +++ b/tests/ui/generic-associated-types/issue-93341.rs @@ -1,4 +1,4 @@ -// check-pass +//@ check-pass use std::marker::PhantomData; diff --git a/tests/ui/generic-associated-types/issue-93342.rs b/tests/ui/generic-associated-types/issue-93342.rs index d4422d5d1d7..86aa016c404 100644 --- a/tests/ui/generic-associated-types/issue-93342.rs +++ b/tests/ui/generic-associated-types/issue-93342.rs @@ -1,4 +1,4 @@ -// check-pass +//@ check-pass use std::marker::PhantomData; diff --git a/tests/ui/generic-associated-types/issue-93874.rs b/tests/ui/generic-associated-types/issue-93874.rs index 30956655ad4..a0e6ef3818d 100644 --- a/tests/ui/generic-associated-types/issue-93874.rs +++ b/tests/ui/generic-associated-types/issue-93874.rs @@ -1,4 +1,4 @@ -// check-pass +//@ check-pass pub trait Build { type Output; diff --git a/tests/ui/generic-associated-types/iterable.rs b/tests/ui/generic-associated-types/iterable.rs index 8ad351bd343..980070e580d 100644 --- a/tests/ui/generic-associated-types/iterable.rs +++ b/tests/ui/generic-associated-types/iterable.rs @@ -1,4 +1,4 @@ -// run-pass +//@ run-pass trait Iterable { type Item<'a> where Self: 'a; diff --git a/tests/ui/generic-associated-types/missing-bounds.fixed b/tests/ui/generic-associated-types/missing-bounds.fixed index 054adbffbea..703d3c1e0fb 100644 --- a/tests/ui/generic-associated-types/missing-bounds.fixed +++ b/tests/ui/generic-associated-types/missing-bounds.fixed @@ -1,4 +1,4 @@ -// run-rustfix +//@ run-rustfix use std::ops::Add; diff --git a/tests/ui/generic-associated-types/missing-bounds.rs b/tests/ui/generic-associated-types/missing-bounds.rs index ffafff5e9f5..f40b4228873 100644 --- a/tests/ui/generic-associated-types/missing-bounds.rs +++ b/tests/ui/generic-associated-types/missing-bounds.rs @@ -1,4 +1,4 @@ -// run-rustfix +//@ run-rustfix use std::ops::Add; diff --git a/tests/ui/generic-associated-types/missing-item-sugg.rs b/tests/ui/generic-associated-types/missing-item-sugg.rs index 35d573d8188..b9266f6f832 100644 --- a/tests/ui/generic-associated-types/missing-item-sugg.rs +++ b/tests/ui/generic-associated-types/missing-item-sugg.rs @@ -1,4 +1,4 @@ -// aux-build:missing-item-sugg.rs +//@ aux-build:missing-item-sugg.rs extern crate missing_item_sugg; diff --git a/tests/ui/generic-associated-types/missing-where-clause-on-trait.rs b/tests/ui/generic-associated-types/missing-where-clause-on-trait.rs index de9cad30801..c8a92466311 100644 --- a/tests/ui/generic-associated-types/missing-where-clause-on-trait.rs +++ b/tests/ui/generic-associated-types/missing-where-clause-on-trait.rs @@ -1,4 +1,4 @@ -// check-fail +//@ check-fail trait Foo { type Assoc<'a, 'b>; diff --git a/tests/ui/generic-associated-types/parse/in-trait-impl.rs b/tests/ui/generic-associated-types/parse/in-trait-impl.rs index 767098835c4..5ba42be3583 100644 --- a/tests/ui/generic-associated-types/parse/in-trait-impl.rs +++ b/tests/ui/generic-associated-types/parse/in-trait-impl.rs @@ -1,5 +1,5 @@ -// check-pass -// compile-flags: -Z parse-only +//@ check-pass +//@ compile-flags: -Z parse-only impl Baz for T where T: Foo { type Quux<'a> = ::Bar<'a, 'static>; diff --git a/tests/ui/generic-associated-types/parse/in-trait.rs b/tests/ui/generic-associated-types/parse/in-trait.rs index 6628aac3743..913eceec0da 100644 --- a/tests/ui/generic-associated-types/parse/in-trait.rs +++ b/tests/ui/generic-associated-types/parse/in-trait.rs @@ -1,5 +1,5 @@ -// check-pass -// compile-flags: -Z parse-only +//@ check-pass +//@ compile-flags: -Z parse-only use std::ops::Deref; use std::fmt::Debug; diff --git a/tests/ui/generic-associated-types/pointer_family.rs b/tests/ui/generic-associated-types/pointer_family.rs index 80827cd567b..17c2b249e15 100644 --- a/tests/ui/generic-associated-types/pointer_family.rs +++ b/tests/ui/generic-associated-types/pointer_family.rs @@ -1,4 +1,4 @@ -// check-pass +//@ check-pass use std::rc::Rc; use std::sync::Arc; diff --git a/tests/ui/generic-associated-types/self-outlives-lint.rs b/tests/ui/generic-associated-types/self-outlives-lint.rs index 0ea81b5aecb..699b3a8c509 100644 --- a/tests/ui/generic-associated-types/self-outlives-lint.rs +++ b/tests/ui/generic-associated-types/self-outlives-lint.rs @@ -1,4 +1,4 @@ -// check-fail +//@ check-fail use std::fmt::Debug; diff --git a/tests/ui/generic-associated-types/streaming_iterator.rs b/tests/ui/generic-associated-types/streaming_iterator.rs index 656fb743ee4..619bffb112e 100644 --- a/tests/ui/generic-associated-types/streaming_iterator.rs +++ b/tests/ui/generic-associated-types/streaming_iterator.rs @@ -1,4 +1,4 @@ -// run-pass +//@ run-pass use std::fmt::Display; diff --git a/tests/ui/generic-associated-types/trait-objects.rs b/tests/ui/generic-associated-types/trait-objects.rs index 674bee919bf..277ffcc1f0d 100644 --- a/tests/ui/generic-associated-types/trait-objects.rs +++ b/tests/ui/generic-associated-types/trait-objects.rs @@ -1,4 +1,4 @@ -// revisions: base extended +//@ revisions: base extended #![cfg_attr(extended, feature(generic_associated_types_extended))] #![cfg_attr(extended, allow(incomplete_features))] diff --git a/tests/ui/generic-associated-types/variance_constraints.rs b/tests/ui/generic-associated-types/variance_constraints.rs index 0e9dbb8b1be..c575e99449f 100644 --- a/tests/ui/generic-associated-types/variance_constraints.rs +++ b/tests/ui/generic-associated-types/variance_constraints.rs @@ -1,4 +1,4 @@ -// check-pass +//@ check-pass // issue #69184 trait A { diff --git a/tests/ui/generic-const-items/associated-const-equality.rs b/tests/ui/generic-const-items/associated-const-equality.rs index 785d3aa5018..3c727097e2b 100644 --- a/tests/ui/generic-const-items/associated-const-equality.rs +++ b/tests/ui/generic-const-items/associated-const-equality.rs @@ -1,4 +1,4 @@ -// check-pass +//@ check-pass #![feature(generic_const_items, associated_const_equality)] #![allow(incomplete_features)] diff --git a/tests/ui/generic-const-items/basic.rs b/tests/ui/generic-const-items/basic.rs index 73bfa803acd..31a404bac88 100644 --- a/tests/ui/generic-const-items/basic.rs +++ b/tests/ui/generic-const-items/basic.rs @@ -1,4 +1,4 @@ -// check-pass +//@ check-pass // Basic usage patterns of free & associated generic const items. diff --git a/tests/ui/generic-const-items/const-trait-impl.rs b/tests/ui/generic-const-items/const-trait-impl.rs index 04c3f3eb434..34be9fe6014 100644 --- a/tests/ui/generic-const-items/const-trait-impl.rs +++ b/tests/ui/generic-const-items/const-trait-impl.rs @@ -1,4 +1,4 @@ -// check-pass +//@ check-pass // Test that we can call methods from const trait impls inside of generic const items. diff --git a/tests/ui/generic-const-items/evaluatable-bounds.rs b/tests/ui/generic-const-items/evaluatable-bounds.rs index cdcfcf9188a..1a858f41999 100644 --- a/tests/ui/generic-const-items/evaluatable-bounds.rs +++ b/tests/ui/generic-const-items/evaluatable-bounds.rs @@ -1,7 +1,7 @@ // This is a regression test for issue #104400. -// revisions: unconstrained constrained -//[constrained] check-pass +//@ revisions: unconstrained constrained +//@[constrained] check-pass // Test that we can constrain generic const items that appear inside associated consts by // adding a (makeshift) "evaluatable"-bound to the item. diff --git a/tests/ui/generic-const-items/misplaced-where-clause.fixed b/tests/ui/generic-const-items/misplaced-where-clause.fixed index bff470c2883..078df15a5b7 100644 --- a/tests/ui/generic-const-items/misplaced-where-clause.fixed +++ b/tests/ui/generic-const-items/misplaced-where-clause.fixed @@ -1,4 +1,4 @@ -// run-rustfix +//@ run-rustfix #![feature(generic_const_items)] #![allow(incomplete_features, dead_code)] diff --git a/tests/ui/generic-const-items/misplaced-where-clause.rs b/tests/ui/generic-const-items/misplaced-where-clause.rs index b14c6d594a5..f742738a304 100644 --- a/tests/ui/generic-const-items/misplaced-where-clause.rs +++ b/tests/ui/generic-const-items/misplaced-where-clause.rs @@ -1,4 +1,4 @@ -// run-rustfix +//@ run-rustfix #![feature(generic_const_items)] #![allow(incomplete_features, dead_code)] diff --git a/tests/ui/generic-const-items/recursive.rs b/tests/ui/generic-const-items/recursive.rs index 3266b37d380..8244772168b 100644 --- a/tests/ui/generic-const-items/recursive.rs +++ b/tests/ui/generic-const-items/recursive.rs @@ -1,6 +1,6 @@ // FIXME(generic_const_items): This leads to a stack overflow in the compiler! -// known-bug: unknown -// ignore-test +//@ known-bug: unknown +//@ ignore-test #![feature(generic_const_items)] #![allow(incomplete_features)] diff --git a/tests/ui/generics/autobind.rs b/tests/ui/generics/autobind.rs index 70606a2a200..7b691f0b69c 100644 --- a/tests/ui/generics/autobind.rs +++ b/tests/ui/generics/autobind.rs @@ -1,4 +1,4 @@ -// run-pass +//@ run-pass fn f(x: Vec) -> T { return x.into_iter().next().unwrap(); } diff --git a/tests/ui/generics/foreign-generic-mismatch.rs b/tests/ui/generics/foreign-generic-mismatch.rs index 403fd73d7df..3543e3dae42 100644 --- a/tests/ui/generics/foreign-generic-mismatch.rs +++ b/tests/ui/generics/foreign-generic-mismatch.rs @@ -1,4 +1,4 @@ -// aux-build: foreign-generic-mismatch.rs +//@ aux-build: foreign-generic-mismatch.rs extern crate foreign_generic_mismatch; diff --git a/tests/ui/generics/generic-alias-unique.rs b/tests/ui/generics/generic-alias-unique.rs index fc138398634..571907ea411 100644 --- a/tests/ui/generics/generic-alias-unique.rs +++ b/tests/ui/generics/generic-alias-unique.rs @@ -1,4 +1,4 @@ -// run-pass +//@ run-pass fn id(t: T) -> T { return t; } diff --git a/tests/ui/generics/generic-default-type-params-cross-crate.rs b/tests/ui/generics/generic-default-type-params-cross-crate.rs index f798901132b..7da61572501 100644 --- a/tests/ui/generics/generic-default-type-params-cross-crate.rs +++ b/tests/ui/generics/generic-default-type-params-cross-crate.rs @@ -1,7 +1,7 @@ -// run-pass -// aux-build:default_type_params_xc.rs +//@ run-pass +//@ aux-build:default_type_params_xc.rs -// pretty-expanded FIXME #23616 +//@ pretty-expanded FIXME #23616 extern crate default_type_params_xc; diff --git a/tests/ui/generics/generic-default-type-params.rs b/tests/ui/generics/generic-default-type-params.rs index afdd301fde9..10f6c667fda 100644 --- a/tests/ui/generics/generic-default-type-params.rs +++ b/tests/ui/generics/generic-default-type-params.rs @@ -1,4 +1,4 @@ -// run-pass +//@ run-pass struct Foo { a: A } diff --git a/tests/ui/generics/generic-derived-type.rs b/tests/ui/generics/generic-derived-type.rs index c643496fa7f..94a84f7bd3e 100644 --- a/tests/ui/generics/generic-derived-type.rs +++ b/tests/ui/generics/generic-derived-type.rs @@ -1,4 +1,4 @@ -// run-pass +//@ run-pass fn g(x: X) -> X { return x; } #[derive(Clone)] diff --git a/tests/ui/generics/generic-exterior-unique.rs b/tests/ui/generics/generic-exterior-unique.rs index 10d87f9f43d..e5e3e24ae94 100644 --- a/tests/ui/generics/generic-exterior-unique.rs +++ b/tests/ui/generics/generic-exterior-unique.rs @@ -1,4 +1,4 @@ -// run-pass +//@ run-pass struct Recbox {x: Box} diff --git a/tests/ui/generics/generic-extern-mangle.rs b/tests/ui/generics/generic-extern-mangle.rs index 985a6f39cd7..80bb3217b5b 100644 --- a/tests/ui/generics/generic-extern-mangle.rs +++ b/tests/ui/generics/generic-extern-mangle.rs @@ -1,4 +1,4 @@ -// run-pass +//@ run-pass use std::ops::Add; extern "C" fn foo(a: T, b: T) -> T::Output { a + b } diff --git a/tests/ui/generics/generic-fn-infer.rs b/tests/ui/generics/generic-fn-infer.rs index 9ba4224732b..a335fbd3289 100644 --- a/tests/ui/generics/generic-fn-infer.rs +++ b/tests/ui/generics/generic-fn-infer.rs @@ -1,4 +1,4 @@ -// run-pass +//@ run-pass diff --git a/tests/ui/generics/generic-fn-twice.rs b/tests/ui/generics/generic-fn-twice.rs index 2f25fc24ced..f9e08401c6d 100644 --- a/tests/ui/generics/generic-fn-twice.rs +++ b/tests/ui/generics/generic-fn-twice.rs @@ -1,8 +1,8 @@ -// run-pass +//@ run-pass -// pretty-expanded FIXME #23616 +//@ pretty-expanded FIXME #23616 mod foomod { pub fn foo() { } diff --git a/tests/ui/generics/generic-fn-unique.rs b/tests/ui/generics/generic-fn-unique.rs index 7e246bce9a1..695ffdfd618 100644 --- a/tests/ui/generics/generic-fn-unique.rs +++ b/tests/ui/generics/generic-fn-unique.rs @@ -1,4 +1,4 @@ -// run-pass +//@ run-pass fn f(x: Box) -> Box { return x; } diff --git a/tests/ui/generics/generic-fn.rs b/tests/ui/generics/generic-fn.rs index 8038fabc1ce..55abea62e3b 100644 --- a/tests/ui/generics/generic-fn.rs +++ b/tests/ui/generics/generic-fn.rs @@ -1,4 +1,4 @@ -// run-pass +//@ run-pass #![allow(dead_code)] #![allow(unused_assignments)] diff --git a/tests/ui/generics/generic-ivec-leak.rs b/tests/ui/generics/generic-ivec-leak.rs index 7a1d10a646d..1150b7f1c83 100644 --- a/tests/ui/generics/generic-ivec-leak.rs +++ b/tests/ui/generics/generic-ivec-leak.rs @@ -1,4 +1,4 @@ -// run-pass +//@ run-pass #![allow(non_camel_case_types)] enum wrapper { wrapped(#[allow(dead_code)] T), } diff --git a/tests/ui/generics/generic-newtype-struct.rs b/tests/ui/generics/generic-newtype-struct.rs index 92523b76f98..a1d539c8c22 100644 --- a/tests/ui/generics/generic-newtype-struct.rs +++ b/tests/ui/generics/generic-newtype-struct.rs @@ -1,5 +1,5 @@ -// run-pass -// pretty-expanded FIXME #23616 +//@ run-pass +//@ pretty-expanded FIXME #23616 struct S(#[allow(dead_code)] T); diff --git a/tests/ui/generics/generic-no-mangle.fixed b/tests/ui/generics/generic-no-mangle.fixed index f51040358c0..f20ea0edaa6 100644 --- a/tests/ui/generics/generic-no-mangle.fixed +++ b/tests/ui/generics/generic-no-mangle.fixed @@ -1,4 +1,4 @@ -// run-rustfix +//@ run-rustfix #![allow(dead_code)] #![deny(no_mangle_generic_items)] diff --git a/tests/ui/generics/generic-no-mangle.rs b/tests/ui/generics/generic-no-mangle.rs index 02015331c57..2288b5bbe70 100644 --- a/tests/ui/generics/generic-no-mangle.rs +++ b/tests/ui/generics/generic-no-mangle.rs @@ -1,4 +1,4 @@ -// run-rustfix +//@ run-rustfix #![allow(dead_code)] #![deny(no_mangle_generic_items)] diff --git a/tests/ui/generics/generic-object.rs b/tests/ui/generics/generic-object.rs index 851424a11b5..ec04722f9c9 100644 --- a/tests/ui/generics/generic-object.rs +++ b/tests/ui/generics/generic-object.rs @@ -1,4 +1,4 @@ -// run-pass +//@ run-pass trait Foo { fn get(&self) -> T; diff --git a/tests/ui/generics/generic-param-attrs.rs b/tests/ui/generics/generic-param-attrs.rs index 3c5cc84c6a6..ccc87132732 100644 --- a/tests/ui/generics/generic-param-attrs.rs +++ b/tests/ui/generics/generic-param-attrs.rs @@ -1,7 +1,7 @@ // This test previously ensured that attributes on formals in generic parameter // lists are rejected without a feature gate. -// build-pass (FIXME(62277): could be check-pass?) +//@ build-pass (FIXME(62277): could be check-pass?) #![feature(rustc_attrs)] diff --git a/tests/ui/generics/generic-recursive-tag.rs b/tests/ui/generics/generic-recursive-tag.rs index 5490822975a..b5c3f6c2de8 100644 --- a/tests/ui/generics/generic-recursive-tag.rs +++ b/tests/ui/generics/generic-recursive-tag.rs @@ -1,4 +1,4 @@ -// run-pass +//@ run-pass #![allow(non_camel_case_types)] enum list { #[allow(dead_code)] cons(Box, Box>), nil, } diff --git a/tests/ui/generics/generic-static-methods.rs b/tests/ui/generics/generic-static-methods.rs index b39fa081a65..8d902cc4b1b 100644 --- a/tests/ui/generics/generic-static-methods.rs +++ b/tests/ui/generics/generic-static-methods.rs @@ -1,4 +1,4 @@ -// run-pass +//@ run-pass #![allow(non_camel_case_types)] diff --git a/tests/ui/generics/generic-tag-corruption.rs b/tests/ui/generics/generic-tag-corruption.rs index ae20a94d9fd..78fdfe4ac7f 100644 --- a/tests/ui/generics/generic-tag-corruption.rs +++ b/tests/ui/generics/generic-tag-corruption.rs @@ -1,9 +1,9 @@ -// run-pass +//@ run-pass #![allow(non_camel_case_types)] // This used to cause memory corruption in stage 0. -// pretty-expanded FIXME #23616 +//@ pretty-expanded FIXME #23616 enum thing { some(#[allow(dead_code)] K), } diff --git a/tests/ui/generics/generic-tag-local.rs b/tests/ui/generics/generic-tag-local.rs index 121ec74f8b7..e7c394efa09 100644 --- a/tests/ui/generics/generic-tag-local.rs +++ b/tests/ui/generics/generic-tag-local.rs @@ -1,7 +1,7 @@ -// run-pass +//@ run-pass #![allow(non_camel_case_types)] -// pretty-expanded FIXME #23616 +//@ pretty-expanded FIXME #23616 enum clam { a(#[allow(dead_code)] T), } diff --git a/tests/ui/generics/generic-tag-match.rs b/tests/ui/generics/generic-tag-match.rs index 09ed6a808e6..dd0291e9d87 100644 --- a/tests/ui/generics/generic-tag-match.rs +++ b/tests/ui/generics/generic-tag-match.rs @@ -1,4 +1,4 @@ -// run-pass +//@ run-pass #![allow(unused_assignments)] #![allow(non_camel_case_types)] diff --git a/tests/ui/generics/generic-tag-values.rs b/tests/ui/generics/generic-tag-values.rs index 230f477b6e9..dace5ab3465 100644 --- a/tests/ui/generics/generic-tag-values.rs +++ b/tests/ui/generics/generic-tag-values.rs @@ -1,4 +1,4 @@ -// run-pass +//@ run-pass #![allow(non_camel_case_types)] enum noption { some(T), } diff --git a/tests/ui/generics/generic-tag.rs b/tests/ui/generics/generic-tag.rs index 9e844c72552..cb46c3155a3 100644 --- a/tests/ui/generics/generic-tag.rs +++ b/tests/ui/generics/generic-tag.rs @@ -1,8 +1,8 @@ -// run-pass +//@ run-pass #![allow(unused_assignments)] #![allow(non_camel_case_types)] -// pretty-expanded FIXME #23616 +//@ pretty-expanded FIXME #23616 #![allow(unused_variables)] diff --git a/tests/ui/generics/generic-temporary.rs b/tests/ui/generics/generic-temporary.rs index b63b534d03f..6b3d258a2d2 100644 --- a/tests/ui/generics/generic-temporary.rs +++ b/tests/ui/generics/generic-temporary.rs @@ -1,4 +1,4 @@ -// run-pass +//@ run-pass fn mk() -> isize { return 1; } diff --git a/tests/ui/generics/generic-tup.rs b/tests/ui/generics/generic-tup.rs index 79ebd648cd4..905c8844202 100644 --- a/tests/ui/generics/generic-tup.rs +++ b/tests/ui/generics/generic-tup.rs @@ -1,4 +1,4 @@ -// run-pass +//@ run-pass fn get_third(t: (T, T, T)) -> T { let (_, _, x) = t; return x; } pub fn main() { diff --git a/tests/ui/generics/generic-type-synonym.rs b/tests/ui/generics/generic-type-synonym.rs index 4f181fbcc7e..879bd91cab5 100644 --- a/tests/ui/generics/generic-type-synonym.rs +++ b/tests/ui/generics/generic-type-synonym.rs @@ -1,8 +1,8 @@ -// run-pass +//@ run-pass #![allow(dead_code)] -// pretty-expanded FIXME #23616 +//@ pretty-expanded FIXME #23616 struct Foo { a: T diff --git a/tests/ui/generics/generic-type.rs b/tests/ui/generics/generic-type.rs index aa46db07eee..3640fb891de 100644 --- a/tests/ui/generics/generic-type.rs +++ b/tests/ui/generics/generic-type.rs @@ -1,4 +1,4 @@ -// run-pass +//@ run-pass diff --git a/tests/ui/generics/generic-unique.rs b/tests/ui/generics/generic-unique.rs index 2f34712ecfb..0976d7f1518 100644 --- a/tests/ui/generics/generic-unique.rs +++ b/tests/ui/generics/generic-unique.rs @@ -1,4 +1,4 @@ -// run-pass +//@ run-pass #![allow(dead_code)] struct Triple { x: T, y: T, z: T } diff --git a/tests/ui/generics/issue-1112.rs b/tests/ui/generics/issue-1112.rs index 3ba7bb21708..bf35b28bd4e 100644 --- a/tests/ui/generics/issue-1112.rs +++ b/tests/ui/generics/issue-1112.rs @@ -1,4 +1,4 @@ -// run-pass +//@ run-pass #![allow(dead_code)] // Issue #1112 // Alignment of interior pointers to dynamic-size types diff --git a/tests/ui/generics/issue-2936.rs b/tests/ui/generics/issue-2936.rs index 6b932d01d55..3874a4d0c5e 100644 --- a/tests/ui/generics/issue-2936.rs +++ b/tests/ui/generics/issue-2936.rs @@ -1,4 +1,4 @@ -// run-pass +//@ run-pass #![allow(non_camel_case_types)] trait bar { diff --git a/tests/ui/generics/issue-32498.rs b/tests/ui/generics/issue-32498.rs index 1b54401097e..b7685ac7336 100644 --- a/tests/ui/generics/issue-32498.rs +++ b/tests/ui/generics/issue-32498.rs @@ -1,4 +1,4 @@ -// run-pass +//@ run-pass #![allow(dead_code)] // Making sure that no overflow occurs. diff --git a/tests/ui/generics/issue-333.rs b/tests/ui/generics/issue-333.rs index 0753aaa0797..9f6d84a55f8 100644 --- a/tests/ui/generics/issue-333.rs +++ b/tests/ui/generics/issue-333.rs @@ -1,4 +1,4 @@ -// run-pass +//@ run-pass fn quux(x: T) -> T { let f = id::; return f(x); } diff --git a/tests/ui/generics/issue-59508.fixed b/tests/ui/generics/issue-59508.fixed index de8f47d4cff..ad0b545250f 100644 --- a/tests/ui/generics/issue-59508.fixed +++ b/tests/ui/generics/issue-59508.fixed @@ -1,4 +1,4 @@ -// run-rustfix +//@ run-rustfix #![allow(dead_code)] diff --git a/tests/ui/generics/issue-59508.rs b/tests/ui/generics/issue-59508.rs index a4c7d4ff262..f7e670865e3 100644 --- a/tests/ui/generics/issue-59508.rs +++ b/tests/ui/generics/issue-59508.rs @@ -1,4 +1,4 @@ -// run-rustfix +//@ run-rustfix #![allow(dead_code)] diff --git a/tests/ui/generics/issue-94432-garbage-ice.rs b/tests/ui/generics/issue-94432-garbage-ice.rs index 4ddb3a7e9f8..7ecf510334b 100644 --- a/tests/ui/generics/issue-94432-garbage-ice.rs +++ b/tests/ui/generics/issue-94432-garbage-ice.rs @@ -1,6 +1,6 @@ -// check-fail -// dont-check-compiler-stdout -// dont-check-compiler-stderr +//@ check-fail +//@ dont-check-compiler-stdout +//@ dont-check-compiler-stderr fnļæ½a(){fnļæ½p(){e}} //~ ERROR unknown start of token: \u{fffd} //~^ ERROR unknown start of token: \u{fffd} diff --git a/tests/ui/generics/issue-94923.rs b/tests/ui/generics/issue-94923.rs index 893bac0d5e8..686725dfe3b 100644 --- a/tests/ui/generics/issue-94923.rs +++ b/tests/ui/generics/issue-94923.rs @@ -1,6 +1,6 @@ -// run-pass +//@ run-pass // regression test for issue #94923 -// compile-flags: -C opt-level=3 +//@ compile-flags: -C opt-level=3 fn f0(mut x: usize) -> usize { for _ in 0..1000 { diff --git a/tests/ui/generics/issue-95208-ignore-qself.fixed b/tests/ui/generics/issue-95208-ignore-qself.fixed index 608b4a20fbc..0c5bffd9746 100644 --- a/tests/ui/generics/issue-95208-ignore-qself.fixed +++ b/tests/ui/generics/issue-95208-ignore-qself.fixed @@ -1,4 +1,4 @@ -// run-rustfix +//@ run-rustfix #[allow(unused)] struct Struct(T); diff --git a/tests/ui/generics/issue-95208-ignore-qself.rs b/tests/ui/generics/issue-95208-ignore-qself.rs index da7efd576d1..f294ae1d6ac 100644 --- a/tests/ui/generics/issue-95208-ignore-qself.rs +++ b/tests/ui/generics/issue-95208-ignore-qself.rs @@ -1,4 +1,4 @@ -// run-rustfix +//@ run-rustfix #[allow(unused)] struct Struct(T); diff --git a/tests/ui/generics/issue-95208.fixed b/tests/ui/generics/issue-95208.fixed index a0b1e886ca2..cd9286011e5 100644 --- a/tests/ui/generics/issue-95208.fixed +++ b/tests/ui/generics/issue-95208.fixed @@ -1,4 +1,4 @@ -// run-rustfix +//@ run-rustfix #[allow(unused)] struct Struct(T); diff --git a/tests/ui/generics/issue-95208.rs b/tests/ui/generics/issue-95208.rs index 0e3083484ff..9dd12e3a0ca 100644 --- a/tests/ui/generics/issue-95208.rs +++ b/tests/ui/generics/issue-95208.rs @@ -1,4 +1,4 @@ -// run-rustfix +//@ run-rustfix #[allow(unused)] struct Struct(T); diff --git a/tests/ui/generics/mid-path-type-params.rs b/tests/ui/generics/mid-path-type-params.rs index a8128207c80..f7dbd789079 100644 --- a/tests/ui/generics/mid-path-type-params.rs +++ b/tests/ui/generics/mid-path-type-params.rs @@ -1,7 +1,7 @@ -// run-pass +//@ run-pass #![allow(dead_code)] -// pretty-expanded FIXME #23616 +//@ pretty-expanded FIXME #23616 struct S { contents: T, diff --git a/tests/ui/generics/post_monomorphization_error_backtrace.rs b/tests/ui/generics/post_monomorphization_error_backtrace.rs index a1316688075..56155ae2bd5 100644 --- a/tests/ui/generics/post_monomorphization_error_backtrace.rs +++ b/tests/ui/generics/post_monomorphization_error_backtrace.rs @@ -1,4 +1,4 @@ -// build-fail +//@ build-fail fn assert_zst() { struct F(T); diff --git a/tests/ui/generics/type-params-in-for-each.rs b/tests/ui/generics/type-params-in-for-each.rs index 53475d28047..e98f7bbb66b 100644 --- a/tests/ui/generics/type-params-in-for-each.rs +++ b/tests/ui/generics/type-params-in-for-each.rs @@ -1,8 +1,8 @@ -// run-pass +//@ run-pass #![allow(dead_code)] -// pretty-expanded FIXME #23616 +//@ pretty-expanded FIXME #23616 struct S { a: T, diff --git a/tests/ui/global-scope.rs b/tests/ui/global-scope.rs index 944eee5afc3..33b56bca940 100644 --- a/tests/ui/global-scope.rs +++ b/tests/ui/global-scope.rs @@ -1,4 +1,4 @@ -// run-pass +//@ run-pass pub fn f() -> isize { return 1; } diff --git a/tests/ui/half-open-range-patterns/half-open-range-pats-exhaustive-pass.rs b/tests/ui/half-open-range-patterns/half-open-range-pats-exhaustive-pass.rs index 4b7eee134e4..fe2db67013e 100644 --- a/tests/ui/half-open-range-patterns/half-open-range-pats-exhaustive-pass.rs +++ b/tests/ui/half-open-range-patterns/half-open-range-pats-exhaustive-pass.rs @@ -1,4 +1,4 @@ -// check-pass +//@ check-pass // Test various exhaustive matches for `X..`, `..=X` and `..X` ranges. diff --git a/tests/ui/half-open-range-patterns/half-open-range-pats-semantics.rs b/tests/ui/half-open-range-patterns/half-open-range-pats-semantics.rs index d5af7bea543..03ff706fe6a 100644 --- a/tests/ui/half-open-range-patterns/half-open-range-pats-semantics.rs +++ b/tests/ui/half-open-range-patterns/half-open-range-pats-semantics.rs @@ -1,4 +1,4 @@ -// run-pass +//@ run-pass // Test half-open range patterns against their expression equivalents // via `.contains(...)` and make sure the dynamic semantics match. diff --git a/tests/ui/half-open-range-patterns/half-open-range-pats-syntactic-pass.rs b/tests/ui/half-open-range-patterns/half-open-range-pats-syntactic-pass.rs index 9a73e89063f..98e8b2b0462 100644 --- a/tests/ui/half-open-range-patterns/half-open-range-pats-syntactic-pass.rs +++ b/tests/ui/half-open-range-patterns/half-open-range-pats-syntactic-pass.rs @@ -1,4 +1,4 @@ -// check-pass +//@ check-pass // Test the parsing of half-open ranges. diff --git a/tests/ui/half-open-range-patterns/pat-tuple-4.rs b/tests/ui/half-open-range-patterns/pat-tuple-4.rs index 11c4ab9c5fc..95aae25ada8 100644 --- a/tests/ui/half-open-range-patterns/pat-tuple-4.rs +++ b/tests/ui/half-open-range-patterns/pat-tuple-4.rs @@ -1,4 +1,4 @@ -// check-pass +//@ check-pass #![feature(exclusive_range_pattern)] diff --git a/tests/ui/half-open-range-patterns/range_pat_interactions0.rs b/tests/ui/half-open-range-patterns/range_pat_interactions0.rs index e6d5e64a15b..7a82f9ce89a 100644 --- a/tests/ui/half-open-range-patterns/range_pat_interactions0.rs +++ b/tests/ui/half-open-range-patterns/range_pat_interactions0.rs @@ -1,4 +1,4 @@ -// run-pass +//@ run-pass #![feature(exclusive_range_pattern)] #![feature(inline_const_pat)] diff --git a/tests/ui/half-open-range-patterns/slice_pattern_syntax_problem2.rs b/tests/ui/half-open-range-patterns/slice_pattern_syntax_problem2.rs index 6e7df309491..62e67530fc7 100644 --- a/tests/ui/half-open-range-patterns/slice_pattern_syntax_problem2.rs +++ b/tests/ui/half-open-range-patterns/slice_pattern_syntax_problem2.rs @@ -1,4 +1,4 @@ -// run-pass +//@ run-pass fn main() { let xs = [13, 1, 5, 2, 3, 1, 21, 8]; diff --git a/tests/ui/hashmap/hashmap-capacity-overflow.rs b/tests/ui/hashmap/hashmap-capacity-overflow.rs index 2988af06556..91aebc3bbba 100644 --- a/tests/ui/hashmap/hashmap-capacity-overflow.rs +++ b/tests/ui/hashmap/hashmap-capacity-overflow.rs @@ -1,6 +1,6 @@ -// run-fail -// error-pattern:capacity overflow -// ignore-emscripten no processes +//@ run-fail +//@ error-pattern:capacity overflow +//@ ignore-emscripten no processes use std::collections::hash_map::HashMap; use std::mem::size_of; diff --git a/tests/ui/hashmap/hashmap-memory.rs b/tests/ui/hashmap/hashmap-memory.rs index bd364b349e2..0b1e09f5344 100644 --- a/tests/ui/hashmap/hashmap-memory.rs +++ b/tests/ui/hashmap/hashmap-memory.rs @@ -1,10 +1,10 @@ -// run-pass +//@ run-pass #![allow(improper_ctypes_definitions)] #![allow(non_camel_case_types)] #![allow(dead_code)] #![allow(unused_mut)] -// ignore-emscripten No support for threads +//@ ignore-emscripten No support for threads /** A somewhat reduced test case to expose some Valgrind issues. diff --git a/tests/ui/hello.rs b/tests/ui/hello.rs index c66b7c60fb4..d23cbb61157 100644 --- a/tests/ui/hello.rs +++ b/tests/ui/hello.rs @@ -1,11 +1,11 @@ -// run-pass -// revisions: e2015 e2018 e2021 e2024 +//@ run-pass +//@ revisions: e2015 e2018 e2021 e2024 -//[e2018] edition:2018 -//[e2021] edition:2021 -//[e2024] edition:2024 +//@[e2018] edition:2018 +//@[e2021] edition:2021 +//@[e2024] edition:2024 -//[e2024] compile-flags: -Zunstable-options +//@[e2024] compile-flags: -Zunstable-options fn main() { println!("hello"); diff --git a/tests/ui/hello_world/main.rs b/tests/ui/hello_world/main.rs index 39cb74b709b..1b687eb1373 100644 --- a/tests/ui/hello_world/main.rs +++ b/tests/ui/hello_world/main.rs @@ -1,4 +1,4 @@ -// build-pass +//@ build-pass // Test that compiling hello world succeeds with no output of any kind. diff --git a/tests/ui/higher-ranked/leak-check-in-selection.rs b/tests/ui/higher-ranked/leak-check-in-selection.rs index 5b36902ffdf..46a0dccb441 100644 --- a/tests/ui/higher-ranked/leak-check-in-selection.rs +++ b/tests/ui/higher-ranked/leak-check-in-selection.rs @@ -1,6 +1,6 @@ -// run-pass -// revisions: old next -//[next] compile-flags: -Znext-solver +//@ run-pass +//@ revisions: old next +//@[next] compile-flags: -Znext-solver #![allow(coherence_leak_check)] trait Trait: Sized { diff --git a/tests/ui/higher-ranked/subtype/hr-subtype.rs b/tests/ui/higher-ranked/subtype/hr-subtype.rs index c770e0de85c..ed9fe2d6028 100644 --- a/tests/ui/higher-ranked/subtype/hr-subtype.rs +++ b/tests/ui/higher-ranked/subtype/hr-subtype.rs @@ -2,30 +2,30 @@ #![allow(dead_code)] -// revisions: bound_a_vs_bound_a -// revisions: bound_a_vs_bound_b -// revisions: bound_inv_a_vs_bound_inv_b -// revisions: bound_co_a_vs_bound_co_b -// revisions: bound_a_vs_free_x -// revisions: free_x_vs_free_x -// revisions: free_x_vs_free_y -// revisions: free_inv_x_vs_free_inv_y -// revisions: bound_a_b_vs_bound_a -// revisions: bound_co_a_b_vs_bound_co_a -// revisions: bound_contra_a_contra_b_ret_co_a -// revisions: bound_co_a_co_b_ret_contra_a -// revisions: bound_inv_a_b_vs_bound_inv_a -// revisions: bound_a_b_ret_a_vs_bound_a_ret_a +//@ revisions: bound_a_vs_bound_a +//@ revisions: bound_a_vs_bound_b +//@ revisions: bound_inv_a_vs_bound_inv_b +//@ revisions: bound_co_a_vs_bound_co_b +//@ revisions: bound_a_vs_free_x +//@ revisions: free_x_vs_free_x +//@ revisions: free_x_vs_free_y +//@ revisions: free_inv_x_vs_free_inv_y +//@ revisions: bound_a_b_vs_bound_a +//@ revisions: bound_co_a_b_vs_bound_co_a +//@ revisions: bound_contra_a_contra_b_ret_co_a +//@ revisions: bound_co_a_co_b_ret_contra_a +//@ revisions: bound_inv_a_b_vs_bound_inv_a +//@ revisions: bound_a_b_ret_a_vs_bound_a_ret_a -//[bound_a_vs_bound_a] check-pass -//[bound_a_vs_bound_b] check-pass -//[bound_inv_a_vs_bound_inv_b] check-pass -//[bound_co_a_vs_bound_co_b] check-pass -//[free_x_vs_free_x] check-pass -//[bound_co_a_b_vs_bound_co_a] check-pass -//[bound_co_a_co_b_ret_contra_a] check-pass -//[bound_a_b_vs_bound_a] check-pass -//[bound_contra_a_contra_b_ret_co_a] check-pass +//@[bound_a_vs_bound_a] check-pass +//@[bound_a_vs_bound_b] check-pass +//@[bound_inv_a_vs_bound_inv_b] check-pass +//@[bound_co_a_vs_bound_co_b] check-pass +//@[free_x_vs_free_x] check-pass +//@[bound_co_a_b_vs_bound_co_a] check-pass +//@[bound_co_a_co_b_ret_contra_a] check-pass +//@[bound_a_b_vs_bound_a] check-pass +//@[bound_contra_a_contra_b_ret_co_a] check-pass fn gimme(_: Option) {} diff --git a/tests/ui/higher-ranked/subtype/placeholder-pattern.rs b/tests/ui/higher-ranked/subtype/placeholder-pattern.rs index 061e66e54d2..ff7028ce9b0 100644 --- a/tests/ui/higher-ranked/subtype/placeholder-pattern.rs +++ b/tests/ui/higher-ranked/subtype/placeholder-pattern.rs @@ -1,4 +1,4 @@ -// check-pass +//@ check-pass // Check that higher ranked subtyping correctly works when using // placeholder patterns. fn hr_subtype<'c>(f: for<'a, 'b> fn(&'a (), &'b ())) { diff --git a/tests/ui/higher-ranked/subtype/return-static.rs b/tests/ui/higher-ranked/subtype/return-static.rs index 6455854f34d..f1534274c86 100644 --- a/tests/ui/higher-ranked/subtype/return-static.rs +++ b/tests/ui/higher-ranked/subtype/return-static.rs @@ -1,4 +1,4 @@ -// check-pass +//@ check-pass fn make() -> T { panic!() diff --git a/tests/ui/higher-ranked/trait-bounds/complex.rs b/tests/ui/higher-ranked/trait-bounds/complex.rs index 8cdfe247e02..3a440bf15eb 100644 --- a/tests/ui/higher-ranked/trait-bounds/complex.rs +++ b/tests/ui/higher-ranked/trait-bounds/complex.rs @@ -1,4 +1,4 @@ -// check-pass +//@ check-pass trait A<'a> {} trait B<'b> {} diff --git a/tests/ui/higher-ranked/trait-bounds/fn-ptr.rs b/tests/ui/higher-ranked/trait-bounds/fn-ptr.rs index 41f24dde01a..e015db1eb64 100644 --- a/tests/ui/higher-ranked/trait-bounds/fn-ptr.rs +++ b/tests/ui/higher-ranked/trait-bounds/fn-ptr.rs @@ -1,6 +1,6 @@ -// revisions: classic next -//[next] compile-flags: -Znext-solver -//[next] check-pass +//@ revisions: classic next +//@[next] compile-flags: -Znext-solver +//@[next] check-pass fn ice() where diff --git a/tests/ui/higher-ranked/trait-bounds/future.rs b/tests/ui/higher-ranked/trait-bounds/future.rs index baeb56e5d78..9ee012c05d9 100644 --- a/tests/ui/higher-ranked/trait-bounds/future.rs +++ b/tests/ui/higher-ranked/trait-bounds/future.rs @@ -1,15 +1,15 @@ // ignore-tidy-linelength -// edition:2021 -// revisions: classic next -//[next] compile-flags: -Znext-solver -//[next] check-pass -//[classic] known-bug: #112347 -//[classic] build-fail -//[classic] failure-status: 101 -//[classic] normalize-stderr-test "note: .*\n\n" -> "" -//[classic] normalize-stderr-test "thread 'rustc' panicked.*\n.*\n" -> "" -//[classic] normalize-stderr-test "(error: internal compiler error: [^:]+):\d+:\d+: " -> "$1:LL:CC: " -//[classic] rustc-env:RUST_BACKTRACE=0 +//@ edition:2021 +//@ revisions: classic next +//@[next] compile-flags: -Znext-solver +//@[next] check-pass +//@[classic] known-bug: #112347 +//@[classic] build-fail +//@[classic] failure-status: 101 +//@[classic] normalize-stderr-test "note: .*\n\n" -> "" +//@[classic] normalize-stderr-test "thread 'rustc' panicked.*\n.*\n" -> "" +//@[classic] normalize-stderr-test "(error: internal compiler error: [^:]+):\d+:\d+: " -> "$1:LL:CC: " +//@[classic] rustc-env:RUST_BACKTRACE=0 #![feature(unboxed_closures)] diff --git a/tests/ui/higher-ranked/trait-bounds/hang-on-deeply-nested-dyn.rs b/tests/ui/higher-ranked/trait-bounds/hang-on-deeply-nested-dyn.rs index d34b7a29623..a884c94734a 100644 --- a/tests/ui/higher-ranked/trait-bounds/hang-on-deeply-nested-dyn.rs +++ b/tests/ui/higher-ranked/trait-bounds/hang-on-deeply-nested-dyn.rs @@ -1,4 +1,4 @@ -// normalize-stderr-test: "long-type-\d+" -> "long-type-hash" +//@ normalize-stderr-test: "long-type-\d+" -> "long-type-hash" fn id( f: &dyn Fn(u32), diff --git a/tests/ui/higher-ranked/trait-bounds/hrtb-binder-levels-in-object-types.rs b/tests/ui/higher-ranked/trait-bounds/hrtb-binder-levels-in-object-types.rs index cc766c0605c..5dec55d5612 100644 --- a/tests/ui/higher-ranked/trait-bounds/hrtb-binder-levels-in-object-types.rs +++ b/tests/ui/higher-ranked/trait-bounds/hrtb-binder-levels-in-object-types.rs @@ -1,4 +1,4 @@ -// run-pass +//@ run-pass #![allow(dead_code)] #![allow(unused_variables)] // Test that we handle binder levels in object types correctly. @@ -6,7 +6,7 @@ // `&Typer<'tcx>` was getting an incorrect binder level, yielding // weird compilation ICEs and so forth. -// pretty-expanded FIXME #23616 +//@ pretty-expanded FIXME #23616 trait Typer<'tcx> { fn method(&self, data: &'tcx isize) -> &'tcx isize { data } diff --git a/tests/ui/higher-ranked/trait-bounds/hrtb-debruijn-object-types-in-closures.rs b/tests/ui/higher-ranked/trait-bounds/hrtb-debruijn-object-types-in-closures.rs index 8431226a3ec..f28b0776fda 100644 --- a/tests/ui/higher-ranked/trait-bounds/hrtb-debruijn-object-types-in-closures.rs +++ b/tests/ui/higher-ranked/trait-bounds/hrtb-debruijn-object-types-in-closures.rs @@ -1,6 +1,6 @@ -// run-pass +//@ run-pass #![allow(dead_code)] -// pretty-expanded FIXME #23616 +//@ pretty-expanded FIXME #23616 trait Typer<'tcx> { fn method(&self, data: &'tcx isize) -> &'tcx isize { data } diff --git a/tests/ui/higher-ranked/trait-bounds/hrtb-exists-forall-trait-covariant.rs b/tests/ui/higher-ranked/trait-bounds/hrtb-exists-forall-trait-covariant.rs index f95496a6c3c..230a0524df4 100644 --- a/tests/ui/higher-ranked/trait-bounds/hrtb-exists-forall-trait-covariant.rs +++ b/tests/ui/higher-ranked/trait-bounds/hrtb-exists-forall-trait-covariant.rs @@ -3,7 +3,7 @@ // In particular, we test this pattern in trait solving, where it is not connected // to any part of the source code. // -// check-pass +//@ check-pass trait Trait {} diff --git a/tests/ui/higher-ranked/trait-bounds/hrtb-fn-like-trait-object.rs b/tests/ui/higher-ranked/trait-bounds/hrtb-fn-like-trait-object.rs index ff84ad9d298..4c0fe17035a 100644 --- a/tests/ui/higher-ranked/trait-bounds/hrtb-fn-like-trait-object.rs +++ b/tests/ui/higher-ranked/trait-bounds/hrtb-fn-like-trait-object.rs @@ -1,4 +1,4 @@ -// run-pass +//@ run-pass // A basic test of using a higher-ranked trait bound. diff --git a/tests/ui/higher-ranked/trait-bounds/hrtb-fn-like-trait.rs b/tests/ui/higher-ranked/trait-bounds/hrtb-fn-like-trait.rs index afab9986ce2..84af57fb215 100644 --- a/tests/ui/higher-ranked/trait-bounds/hrtb-fn-like-trait.rs +++ b/tests/ui/higher-ranked/trait-bounds/hrtb-fn-like-trait.rs @@ -1,4 +1,4 @@ -// run-pass +//@ run-pass // A basic test of using a higher-ranked trait bound. diff --git a/tests/ui/higher-ranked/trait-bounds/hrtb-opt-in-copy.rs b/tests/ui/higher-ranked/trait-bounds/hrtb-opt-in-copy.rs index 04519f11600..84e44f27227 100644 --- a/tests/ui/higher-ranked/trait-bounds/hrtb-opt-in-copy.rs +++ b/tests/ui/higher-ranked/trait-bounds/hrtb-opt-in-copy.rs @@ -1,4 +1,4 @@ -// run-pass +//@ run-pass // Test that we handle binder levels correctly when checking whether a // type can implement `Copy`. In particular, we had a bug where we failed to // liberate the late-bound regions from the impl, and thus wound up diff --git a/tests/ui/higher-ranked/trait-bounds/hrtb-parse.rs b/tests/ui/higher-ranked/trait-bounds/hrtb-parse.rs index 1fab9758c5c..0edddf9423e 100644 --- a/tests/ui/higher-ranked/trait-bounds/hrtb-parse.rs +++ b/tests/ui/higher-ranked/trait-bounds/hrtb-parse.rs @@ -1,8 +1,8 @@ -// run-pass +//@ run-pass // Test that we can parse all the various places that a `for` keyword // can appear representing universal quantification. -// pretty-expanded FIXME #23616 +//@ pretty-expanded FIXME #23616 #![allow(unused_variables)] #![allow(dead_code)] diff --git a/tests/ui/higher-ranked/trait-bounds/hrtb-precedence-of-plus-where-clause.rs b/tests/ui/higher-ranked/trait-bounds/hrtb-precedence-of-plus-where-clause.rs index 42247798f66..b49c69d90cf 100644 --- a/tests/ui/higher-ranked/trait-bounds/hrtb-precedence-of-plus-where-clause.rs +++ b/tests/ui/higher-ranked/trait-bounds/hrtb-precedence-of-plus-where-clause.rs @@ -1,7 +1,7 @@ -// run-pass +//@ run-pass #![allow(dead_code)] #![allow(unused_variables)] -// pretty-expanded FIXME #23616 +//@ pretty-expanded FIXME #23616 // Test that `F : Fn(isize) -> isize + Send` is interpreted as two // distinct bounds on `F`. diff --git a/tests/ui/higher-ranked/trait-bounds/hrtb-precedence-of-plus.rs b/tests/ui/higher-ranked/trait-bounds/hrtb-precedence-of-plus.rs index 6834c392d4e..d50fd8cb8f3 100644 --- a/tests/ui/higher-ranked/trait-bounds/hrtb-precedence-of-plus.rs +++ b/tests/ui/higher-ranked/trait-bounds/hrtb-precedence-of-plus.rs @@ -1,6 +1,6 @@ -// run-pass +//@ run-pass #![allow(dead_code)] -// pretty-expanded FIXME #23616 +//@ pretty-expanded FIXME #23616 // Test that `Fn(isize) -> isize + 'static` parses as `(Fn(isize) -> isize) + // 'static` and not `Fn(isize) -> (isize + 'static)`. The latter would diff --git a/tests/ui/higher-ranked/trait-bounds/hrtb-resolve-lifetime.rs b/tests/ui/higher-ranked/trait-bounds/hrtb-resolve-lifetime.rs index b97fdf4df50..4a0b8362d4b 100644 --- a/tests/ui/higher-ranked/trait-bounds/hrtb-resolve-lifetime.rs +++ b/tests/ui/higher-ranked/trait-bounds/hrtb-resolve-lifetime.rs @@ -1,8 +1,8 @@ -// run-pass +//@ run-pass #![allow(dead_code)] // A basic test of using a higher-ranked trait bound. -// pretty-expanded FIXME #23616 +//@ pretty-expanded FIXME #23616 trait FnLike { fn call(&self, arg: A) -> R; diff --git a/tests/ui/higher-ranked/trait-bounds/hrtb-trait-object-paren-notation.rs b/tests/ui/higher-ranked/trait-bounds/hrtb-trait-object-paren-notation.rs index d8c726cdd71..756b821eeac 100644 --- a/tests/ui/higher-ranked/trait-bounds/hrtb-trait-object-paren-notation.rs +++ b/tests/ui/higher-ranked/trait-bounds/hrtb-trait-object-paren-notation.rs @@ -1,4 +1,4 @@ -// run-pass +//@ run-pass // A basic test of using a higher-ranked trait bound. trait FnLike { diff --git a/tests/ui/higher-ranked/trait-bounds/hrtb-trait-object-passed-to-closure.rs b/tests/ui/higher-ranked/trait-bounds/hrtb-trait-object-passed-to-closure.rs index 41ebb3f5a14..255e5d68e50 100644 --- a/tests/ui/higher-ranked/trait-bounds/hrtb-trait-object-passed-to-closure.rs +++ b/tests/ui/higher-ranked/trait-bounds/hrtb-trait-object-passed-to-closure.rs @@ -1,10 +1,10 @@ -// run-pass +//@ run-pass #![allow(dead_code)] // Test that `&PrinterSupport`, which is really short for `&'a // PrinterSupport<'b>`, gets properly expanded when it appears in a // closure type. This used to result in messed up De Bruijn indices. -// pretty-expanded FIXME #23616 +//@ pretty-expanded FIXME #23616 trait PrinterSupport<'ast> { fn ast_map(&self) -> Option<&'ast usize> { None } diff --git a/tests/ui/higher-ranked/trait-bounds/hrtb-type-outlives.rs b/tests/ui/higher-ranked/trait-bounds/hrtb-type-outlives.rs index 88d396101db..b89d07ec9ca 100644 --- a/tests/ui/higher-ranked/trait-bounds/hrtb-type-outlives.rs +++ b/tests/ui/higher-ranked/trait-bounds/hrtb-type-outlives.rs @@ -1,4 +1,4 @@ -// run-pass +//@ run-pass #![allow(dead_code)] #![allow(unused_variables)] // Test what happens when a HR obligation is applied to an impl with diff --git a/tests/ui/higher-ranked/trait-bounds/hrtb-unboxed-closure-trait.rs b/tests/ui/higher-ranked/trait-bounds/hrtb-unboxed-closure-trait.rs index a4a8a5ac6cc..403c8b80601 100644 --- a/tests/ui/higher-ranked/trait-bounds/hrtb-unboxed-closure-trait.rs +++ b/tests/ui/higher-ranked/trait-bounds/hrtb-unboxed-closure-trait.rs @@ -1,4 +1,4 @@ -// run-pass +//@ run-pass // Test HRTB used with the `Fn` trait. fn foo(f: F) { diff --git a/tests/ui/higher-ranked/trait-bounds/issue-100689.rs b/tests/ui/higher-ranked/trait-bounds/issue-100689.rs index 2db7f8a354c..f405abfb2a2 100644 --- a/tests/ui/higher-ranked/trait-bounds/issue-100689.rs +++ b/tests/ui/higher-ranked/trait-bounds/issue-100689.rs @@ -1,4 +1,4 @@ -// check-pass +//@ check-pass struct Foo<'a> { foo: &'a mut usize, diff --git a/tests/ui/higher-ranked/trait-bounds/issue-102899.rs b/tests/ui/higher-ranked/trait-bounds/issue-102899.rs index 952b81584f3..b4ef75319e5 100644 --- a/tests/ui/higher-ranked/trait-bounds/issue-102899.rs +++ b/tests/ui/higher-ranked/trait-bounds/issue-102899.rs @@ -1,4 +1,4 @@ -// check-pass +//@ check-pass pub trait BufferTrait<'buffer> { type Subset<'channel> diff --git a/tests/ui/higher-ranked/trait-bounds/issue-30786.rs b/tests/ui/higher-ranked/trait-bounds/issue-30786.rs index 4a6399c8f62..ffb2b306ae7 100644 --- a/tests/ui/higher-ranked/trait-bounds/issue-30786.rs +++ b/tests/ui/higher-ranked/trait-bounds/issue-30786.rs @@ -1,4 +1,4 @@ -// normalize-stderr-test: "long-type-\d+" -> "long-type-hash" +//@ normalize-stderr-test: "long-type-\d+" -> "long-type-hash" // rust-lang/rust#30786: the use of `for<'b> &'b mut A: Stream>::Item, causing an error in MIR type // checking diff --git a/tests/ui/higher-ranked/trait-bounds/issue-39292.rs b/tests/ui/higher-ranked/trait-bounds/issue-39292.rs index 968cf08916f..5e1795a1e6a 100644 --- a/tests/ui/higher-ranked/trait-bounds/issue-39292.rs +++ b/tests/ui/higher-ranked/trait-bounds/issue-39292.rs @@ -1,4 +1,4 @@ -// run-pass +//@ run-pass // Regression test for issue #39292. The object vtable was being // incorrectly left with a null pointer. diff --git a/tests/ui/higher-ranked/trait-bounds/issue-42114.rs b/tests/ui/higher-ranked/trait-bounds/issue-42114.rs index 01515fdc9d2..94acd922373 100644 --- a/tests/ui/higher-ranked/trait-bounds/issue-42114.rs +++ b/tests/ui/higher-ranked/trait-bounds/issue-42114.rs @@ -1,4 +1,4 @@ -// check-pass +//@ check-pass fn lifetime<'a>() where diff --git a/tests/ui/higher-ranked/trait-bounds/issue-43623.rs b/tests/ui/higher-ranked/trait-bounds/issue-43623.rs index cedcf7c361c..339df5688b0 100644 --- a/tests/ui/higher-ranked/trait-bounds/issue-43623.rs +++ b/tests/ui/higher-ranked/trait-bounds/issue-43623.rs @@ -1,4 +1,4 @@ -// check-pass +//@ check-pass pub trait Trait<'a> { type Assoc; diff --git a/tests/ui/higher-ranked/trait-bounds/issue-57639.rs b/tests/ui/higher-ranked/trait-bounds/issue-57639.rs index 392e7233b56..087b5cea418 100644 --- a/tests/ui/higher-ranked/trait-bounds/issue-57639.rs +++ b/tests/ui/higher-ranked/trait-bounds/issue-57639.rs @@ -10,7 +10,7 @@ // // See [this comment on GitHub][c] for more details. // -// check-pass +//@ check-pass // // [c]: https://github.com/rust-lang/rust/issues/57639#issuecomment-455685861 diff --git a/tests/ui/higher-ranked/trait-bounds/issue-60283.rs b/tests/ui/higher-ranked/trait-bounds/issue-60283.rs index 05315b3f9f5..ce1554b3290 100644 --- a/tests/ui/higher-ranked/trait-bounds/issue-60283.rs +++ b/tests/ui/higher-ranked/trait-bounds/issue-60283.rs @@ -1,4 +1,4 @@ -// check-pass +//@ check-pass pub trait Trait<'a> { type Item; diff --git a/tests/ui/higher-ranked/trait-bounds/issue-88446.rs b/tests/ui/higher-ranked/trait-bounds/issue-88446.rs index 571b8531757..0ca8387776a 100644 --- a/tests/ui/higher-ranked/trait-bounds/issue-88446.rs +++ b/tests/ui/higher-ranked/trait-bounds/issue-88446.rs @@ -1,4 +1,4 @@ -// check-pass +//@ check-pass trait Yokeable<'a> { type Output: 'a; diff --git a/tests/ui/higher-ranked/trait-bounds/issue-88586-hr-self-outlives-in-trait-def.rs b/tests/ui/higher-ranked/trait-bounds/issue-88586-hr-self-outlives-in-trait-def.rs index 92b7c5deb81..b2917be4038 100644 --- a/tests/ui/higher-ranked/trait-bounds/issue-88586-hr-self-outlives-in-trait-def.rs +++ b/tests/ui/higher-ranked/trait-bounds/issue-88586-hr-self-outlives-in-trait-def.rs @@ -3,7 +3,7 @@ // // Made to pass as part of fixing #98095. // -// check-pass +//@ check-pass trait A where for<'a> Self: 'a, diff --git a/tests/ui/higher-ranked/trait-bounds/issue-90177.rs b/tests/ui/higher-ranked/trait-bounds/issue-90177.rs index b151a9d3ab6..669e789caf9 100644 --- a/tests/ui/higher-ranked/trait-bounds/issue-90177.rs +++ b/tests/ui/higher-ranked/trait-bounds/issue-90177.rs @@ -1,4 +1,4 @@ -// check-pass +//@ check-pass trait Base<'f> { type Assoc; diff --git a/tests/ui/higher-ranked/trait-bounds/issue-95034.rs b/tests/ui/higher-ranked/trait-bounds/issue-95034.rs index af4946a187f..53b28c2bea4 100644 --- a/tests/ui/higher-ranked/trait-bounds/issue-95034.rs +++ b/tests/ui/higher-ranked/trait-bounds/issue-95034.rs @@ -1,5 +1,5 @@ -// check-pass -// compile-flags: --edition=2021 --crate-type=lib +//@ check-pass +//@ compile-flags: --edition=2021 --crate-type=lib use std::{ future::Future, diff --git a/tests/ui/higher-ranked/trait-bounds/issue-95230.rs b/tests/ui/higher-ranked/trait-bounds/issue-95230.rs index 027644a280b..d1ca6834551 100644 --- a/tests/ui/higher-ranked/trait-bounds/issue-95230.rs +++ b/tests/ui/higher-ranked/trait-bounds/issue-95230.rs @@ -1,7 +1,7 @@ -// revisions: old next -//[next] compile-flags: -Znext-solver -//[old] check-pass -//[next] known-bug: #109764 +//@ revisions: old next +//@[next] compile-flags: -Znext-solver +//@[old] check-pass +//@[next] known-bug: #109764 pub struct Bar diff --git a/tests/ui/higher-ranked/trait-bounds/normalize-under-binder/issue-44005.rs b/tests/ui/higher-ranked/trait-bounds/normalize-under-binder/issue-44005.rs index f255eac0c4b..b4f2da3ae2d 100644 --- a/tests/ui/higher-ranked/trait-bounds/normalize-under-binder/issue-44005.rs +++ b/tests/ui/higher-ranked/trait-bounds/normalize-under-binder/issue-44005.rs @@ -1,4 +1,4 @@ -// check-pass +//@ check-pass pub trait Foo<'a> { type Bar; diff --git a/tests/ui/higher-ranked/trait-bounds/normalize-under-binder/issue-56556.rs b/tests/ui/higher-ranked/trait-bounds/normalize-under-binder/issue-56556.rs index 4d38cb19e9b..00a1c442969 100644 --- a/tests/ui/higher-ranked/trait-bounds/normalize-under-binder/issue-56556.rs +++ b/tests/ui/higher-ranked/trait-bounds/normalize-under-binder/issue-56556.rs @@ -1,4 +1,4 @@ -// check-pass +//@ check-pass fn foo(t: T) -> usize where diff --git a/tests/ui/higher-ranked/trait-bounds/normalize-under-binder/issue-62529-1.rs b/tests/ui/higher-ranked/trait-bounds/normalize-under-binder/issue-62529-1.rs index c6f29fa5908..c368f265062 100644 --- a/tests/ui/higher-ranked/trait-bounds/normalize-under-binder/issue-62529-1.rs +++ b/tests/ui/higher-ranked/trait-bounds/normalize-under-binder/issue-62529-1.rs @@ -1,4 +1,4 @@ -// check-pass +//@ check-pass // FamilyType (GAT workaround) pub trait FamilyLt<'a> { diff --git a/tests/ui/higher-ranked/trait-bounds/normalize-under-binder/issue-62529-2.rs b/tests/ui/higher-ranked/trait-bounds/normalize-under-binder/issue-62529-2.rs index 00205473291..af086750840 100644 --- a/tests/ui/higher-ranked/trait-bounds/normalize-under-binder/issue-62529-2.rs +++ b/tests/ui/higher-ranked/trait-bounds/normalize-under-binder/issue-62529-2.rs @@ -1,4 +1,4 @@ -// check-pass +//@ check-pass use std::marker::PhantomData; diff --git a/tests/ui/higher-ranked/trait-bounds/normalize-under-binder/issue-62529-4.rs b/tests/ui/higher-ranked/trait-bounds/normalize-under-binder/issue-62529-4.rs index 8c2a59868ca..5b4c561b5fe 100644 --- a/tests/ui/higher-ranked/trait-bounds/normalize-under-binder/issue-62529-4.rs +++ b/tests/ui/higher-ranked/trait-bounds/normalize-under-binder/issue-62529-4.rs @@ -1,4 +1,4 @@ -// check-pass +//@ check-pass use std::marker::PhantomData; use std::mem; diff --git a/tests/ui/higher-ranked/trait-bounds/normalize-under-binder/issue-62529-5.rs b/tests/ui/higher-ranked/trait-bounds/normalize-under-binder/issue-62529-5.rs index 03f257a029c..796ca7de790 100644 --- a/tests/ui/higher-ranked/trait-bounds/normalize-under-binder/issue-62529-5.rs +++ b/tests/ui/higher-ranked/trait-bounds/normalize-under-binder/issue-62529-5.rs @@ -1,4 +1,4 @@ -// check-pass +//@ check-pass pub struct Struct {} diff --git a/tests/ui/higher-ranked/trait-bounds/normalize-under-binder/issue-62529-6.rs b/tests/ui/higher-ranked/trait-bounds/normalize-under-binder/issue-62529-6.rs index 0ea736deeaa..09fbaf24b8e 100644 --- a/tests/ui/higher-ranked/trait-bounds/normalize-under-binder/issue-62529-6.rs +++ b/tests/ui/higher-ranked/trait-bounds/normalize-under-binder/issue-62529-6.rs @@ -1,4 +1,4 @@ -// check-pass +//@ check-pass use std::cell::RefMut; diff --git a/tests/ui/higher-ranked/trait-bounds/normalize-under-binder/issue-70120.rs b/tests/ui/higher-ranked/trait-bounds/normalize-under-binder/issue-70120.rs index 3ced40230f0..b5edc7e646d 100644 --- a/tests/ui/higher-ranked/trait-bounds/normalize-under-binder/issue-70120.rs +++ b/tests/ui/higher-ranked/trait-bounds/normalize-under-binder/issue-70120.rs @@ -1,4 +1,4 @@ -// check-pass +//@ check-pass pub trait MyTrait<'a> { type Output: 'a; diff --git a/tests/ui/higher-ranked/trait-bounds/normalize-under-binder/issue-71955.rs b/tests/ui/higher-ranked/trait-bounds/normalize-under-binder/issue-71955.rs index 1d90226a3f4..4bd3b96e475 100644 --- a/tests/ui/higher-ranked/trait-bounds/normalize-under-binder/issue-71955.rs +++ b/tests/ui/higher-ranked/trait-bounds/normalize-under-binder/issue-71955.rs @@ -1,4 +1,4 @@ -// check-fail +//@ check-fail #![feature(rustc_attrs)] trait Parser<'s> { diff --git a/tests/ui/higher-ranked/trait-bounds/normalize-under-binder/issue-74261.rs b/tests/ui/higher-ranked/trait-bounds/normalize-under-binder/issue-74261.rs index 93ccb42684c..44f071d3382 100644 --- a/tests/ui/higher-ranked/trait-bounds/normalize-under-binder/issue-74261.rs +++ b/tests/ui/higher-ranked/trait-bounds/normalize-under-binder/issue-74261.rs @@ -1,4 +1,4 @@ -// check-pass +//@ check-pass use std::marker::PhantomData; diff --git a/tests/ui/higher-ranked/trait-bounds/normalize-under-binder/issue-76956.rs b/tests/ui/higher-ranked/trait-bounds/normalize-under-binder/issue-76956.rs index 583470080a2..fe3fdab617d 100644 --- a/tests/ui/higher-ranked/trait-bounds/normalize-under-binder/issue-76956.rs +++ b/tests/ui/higher-ranked/trait-bounds/normalize-under-binder/issue-76956.rs @@ -1,4 +1,4 @@ -// check-pass +//@ check-pass use std::ops::Deref; diff --git a/tests/ui/higher-ranked/trait-bounds/normalize-under-binder/issue-80706.rs b/tests/ui/higher-ranked/trait-bounds/normalize-under-binder/issue-80706.rs index 00a866f220b..7e78138a75b 100644 --- a/tests/ui/higher-ranked/trait-bounds/normalize-under-binder/issue-80706.rs +++ b/tests/ui/higher-ranked/trait-bounds/normalize-under-binder/issue-80706.rs @@ -1,5 +1,5 @@ -// build-pass -// edition:2018 +//@ build-pass +//@ edition:2018 type BoxFuture = std::pin::Pin>>; diff --git a/tests/ui/higher-ranked/trait-bounds/normalize-under-binder/issue-80956.rs b/tests/ui/higher-ranked/trait-bounds/normalize-under-binder/issue-80956.rs index 6316ceea156..7018c240a27 100644 --- a/tests/ui/higher-ranked/trait-bounds/normalize-under-binder/issue-80956.rs +++ b/tests/ui/higher-ranked/trait-bounds/normalize-under-binder/issue-80956.rs @@ -1,4 +1,4 @@ -// check-pass +//@ check-pass trait Bar { type Type; diff --git a/tests/ui/higher-ranked/trait-bounds/normalize-under-binder/issue-81809.rs b/tests/ui/higher-ranked/trait-bounds/normalize-under-binder/issue-81809.rs index f6ab9c203b5..ced73a40d5d 100644 --- a/tests/ui/higher-ranked/trait-bounds/normalize-under-binder/issue-81809.rs +++ b/tests/ui/higher-ranked/trait-bounds/normalize-under-binder/issue-81809.rs @@ -1,4 +1,4 @@ -// check-pass +//@ check-pass pub trait Indexable { type Idx; diff --git a/tests/ui/higher-ranked/trait-bounds/normalize-under-binder/issue-89436.rs b/tests/ui/higher-ranked/trait-bounds/normalize-under-binder/issue-89436.rs index f7e467b3786..d85c6999e26 100644 --- a/tests/ui/higher-ranked/trait-bounds/normalize-under-binder/issue-89436.rs +++ b/tests/ui/higher-ranked/trait-bounds/normalize-under-binder/issue-89436.rs @@ -1,4 +1,4 @@ -// check-pass +//@ check-pass #![allow(unused)] diff --git a/tests/ui/higher-ranked/trait-bounds/normalize-under-binder/issue-90612.rs b/tests/ui/higher-ranked/trait-bounds/normalize-under-binder/issue-90612.rs index effc329456d..04f7ef7f091 100644 --- a/tests/ui/higher-ranked/trait-bounds/normalize-under-binder/issue-90612.rs +++ b/tests/ui/higher-ranked/trait-bounds/normalize-under-binder/issue-90612.rs @@ -1,4 +1,4 @@ -// check-pass +//@ check-pass use std::marker::PhantomData; diff --git a/tests/ui/higher-ranked/trait-bounds/normalize-under-binder/issue-90638.rs b/tests/ui/higher-ranked/trait-bounds/normalize-under-binder/issue-90638.rs index 628b5cba104..b3feda4a531 100644 --- a/tests/ui/higher-ranked/trait-bounds/normalize-under-binder/issue-90638.rs +++ b/tests/ui/higher-ranked/trait-bounds/normalize-under-binder/issue-90638.rs @@ -1,4 +1,4 @@ -//check-pass +//@check-pass trait Yokeable<'a>: 'static { type Output: 'a; diff --git a/tests/ui/higher-ranked/trait-bounds/normalize-under-binder/issue-90875.rs b/tests/ui/higher-ranked/trait-bounds/normalize-under-binder/issue-90875.rs index ffd6857d84a..61cc82558e8 100644 --- a/tests/ui/higher-ranked/trait-bounds/normalize-under-binder/issue-90875.rs +++ b/tests/ui/higher-ranked/trait-bounds/normalize-under-binder/issue-90875.rs @@ -1,4 +1,4 @@ -// check-pass +//@ check-pass trait Variable<'a> { type Type; diff --git a/tests/ui/higher-ranked/trait-bounds/normalize-under-binder/issue-90950.rs b/tests/ui/higher-ranked/trait-bounds/normalize-under-binder/issue-90950.rs index 7072f41066b..7bd4e2c9d54 100644 --- a/tests/ui/higher-ranked/trait-bounds/normalize-under-binder/issue-90950.rs +++ b/tests/ui/higher-ranked/trait-bounds/normalize-under-binder/issue-90950.rs @@ -1,4 +1,4 @@ -// check-pass +//@ check-pass trait Yokeable<'a>: 'static { type Output: 'a; diff --git a/tests/ui/higher-ranked/trait-bounds/normalize-under-binder/norm-before-method-resolution.rs b/tests/ui/higher-ranked/trait-bounds/normalize-under-binder/norm-before-method-resolution.rs index 58ca5b0c187..e1aa1babdbb 100644 --- a/tests/ui/higher-ranked/trait-bounds/normalize-under-binder/norm-before-method-resolution.rs +++ b/tests/ui/higher-ranked/trait-bounds/normalize-under-binder/norm-before-method-resolution.rs @@ -1,4 +1,4 @@ -// check-pass +//@ check-pass // Should pass, but we normalize and check bounds before we resolve the generics // of the function (which we know because of the return type). diff --git a/tests/ui/hygiene/assoc_ty_bindings.rs b/tests/ui/hygiene/assoc_ty_bindings.rs index a7861274932..5e42e27062f 100644 --- a/tests/ui/hygiene/assoc_ty_bindings.rs +++ b/tests/ui/hygiene/assoc_ty_bindings.rs @@ -1,4 +1,4 @@ -// check-pass +//@ check-pass #![feature(decl_macro, associated_type_defaults)] diff --git a/tests/ui/hygiene/auxiliary/def-site-async-await.rs b/tests/ui/hygiene/auxiliary/def-site-async-await.rs index f7e9b801318..41c4b871e73 100644 --- a/tests/ui/hygiene/auxiliary/def-site-async-await.rs +++ b/tests/ui/hygiene/auxiliary/def-site-async-await.rs @@ -1,4 +1,4 @@ -// edition:2018 +//@ edition:2018 extern crate opaque_hygiene; diff --git a/tests/ui/hygiene/auxiliary/opaque-hygiene.rs b/tests/ui/hygiene/auxiliary/opaque-hygiene.rs index 7730f91bd6a..b6192d653f5 100644 --- a/tests/ui/hygiene/auxiliary/opaque-hygiene.rs +++ b/tests/ui/hygiene/auxiliary/opaque-hygiene.rs @@ -1,5 +1,5 @@ -// force-host -// no-prefer-dynamic +//@ force-host +//@ no-prefer-dynamic #![feature(proc_macro_quote)] #![crate_type = "proc-macro"] diff --git a/tests/ui/hygiene/cross-crate-codegen-attrs.rs b/tests/ui/hygiene/cross-crate-codegen-attrs.rs index af6b1334387..9bd7ecf6849 100644 --- a/tests/ui/hygiene/cross-crate-codegen-attrs.rs +++ b/tests/ui/hygiene/cross-crate-codegen-attrs.rs @@ -2,8 +2,8 @@ // We used to gensym the identifiers in attributes, which stopped dependent // crates from seeing them, resulting in linker errors in cases like this one. -// run-pass -// aux-build:codegen-attrs.rs +//@ run-pass +//@ aux-build:codegen-attrs.rs extern crate codegen_attrs; diff --git a/tests/ui/hygiene/cross-crate-define-and-use.rs b/tests/ui/hygiene/cross-crate-define-and-use.rs index 62b1820235c..00d0faae8df 100644 --- a/tests/ui/hygiene/cross-crate-define-and-use.rs +++ b/tests/ui/hygiene/cross-crate-define-and-use.rs @@ -3,8 +3,8 @@ // This requires that the definition of `my_struct` preserves the hygiene // information for the tokens in its definition. -// check-pass -// aux-build:use_by_macro.rs +//@ check-pass +//@ aux-build:use_by_macro.rs extern crate use_by_macro; diff --git a/tests/ui/hygiene/cross-crate-fields.rs b/tests/ui/hygiene/cross-crate-fields.rs index 1bcd64573ac..2bdedb0cf91 100644 --- a/tests/ui/hygiene/cross-crate-fields.rs +++ b/tests/ui/hygiene/cross-crate-fields.rs @@ -1,8 +1,8 @@ // Test that fields on a struct defined in another crate are resolved correctly // their names differ only in `SyntaxContext`. -// run-pass -// aux-build:fields.rs +//@ run-pass +//@ aux-build:fields.rs extern crate fields; diff --git a/tests/ui/hygiene/cross-crate-glob-hygiene.rs b/tests/ui/hygiene/cross-crate-glob-hygiene.rs index de5576682a6..81cc6927c1d 100644 --- a/tests/ui/hygiene/cross-crate-glob-hygiene.rs +++ b/tests/ui/hygiene/cross-crate-glob-hygiene.rs @@ -3,7 +3,7 @@ // defines is only not imported because `my_struct` is defined by a macros 2.0 // macro. -// aux-build:use_by_macro.rs +//@ aux-build:use_by_macro.rs extern crate use_by_macro; diff --git a/tests/ui/hygiene/cross-crate-methods.rs b/tests/ui/hygiene/cross-crate-methods.rs index 0e6f57c33f6..fead9b16168 100644 --- a/tests/ui/hygiene/cross-crate-methods.rs +++ b/tests/ui/hygiene/cross-crate-methods.rs @@ -2,8 +2,8 @@ // names differ only in `SyntaxContext`. This also checks that any name // resolution done when monomorphizing is correct. -// run-pass -// aux-build:methods.rs +//@ run-pass +//@ aux-build:methods.rs extern crate methods; diff --git a/tests/ui/hygiene/cross-crate-name-collision.rs b/tests/ui/hygiene/cross-crate-name-collision.rs index 8f118782f23..7826d743ba5 100644 --- a/tests/ui/hygiene/cross-crate-name-collision.rs +++ b/tests/ui/hygiene/cross-crate-name-collision.rs @@ -2,8 +2,8 @@ // only differ by `SyntaxContext` do not cause name collisions when imported // in another crate. -// check-pass -// aux-build:needs_hygiene.rs +//@ check-pass +//@ aux-build:needs_hygiene.rs extern crate needs_hygiene; diff --git a/tests/ui/hygiene/cross-crate-name-hiding-2.rs b/tests/ui/hygiene/cross-crate-name-hiding-2.rs index 3eacd775c9e..2eae000b045 100644 --- a/tests/ui/hygiene/cross-crate-name-hiding-2.rs +++ b/tests/ui/hygiene/cross-crate-name-hiding-2.rs @@ -1,7 +1,7 @@ // Check that an identifier from a 2.0 macro in another crate cannot be // resolved with an identifier that's not from a macro expansion. -// aux-build:use_by_macro.rs +//@ aux-build:use_by_macro.rs extern crate use_by_macro; diff --git a/tests/ui/hygiene/cross-crate-name-hiding.rs b/tests/ui/hygiene/cross-crate-name-hiding.rs index dd76ecc5762..586e7647df7 100644 --- a/tests/ui/hygiene/cross-crate-name-hiding.rs +++ b/tests/ui/hygiene/cross-crate-name-hiding.rs @@ -1,7 +1,7 @@ // Check that an item defined by a 2.0 macro in another crate cannot be used in // another crate. -// aux-build:pub_hygiene.rs +//@ aux-build:pub_hygiene.rs extern crate pub_hygiene; diff --git a/tests/ui/hygiene/cross-crate-redefine.rs b/tests/ui/hygiene/cross-crate-redefine.rs index 3cb06b4bad8..e42c5e3de06 100644 --- a/tests/ui/hygiene/cross-crate-redefine.rs +++ b/tests/ui/hygiene/cross-crate-redefine.rs @@ -1,7 +1,7 @@ // Check that items with identical `SyntaxContext` conflict even when that // context involves a mark from another crate. -// aux-build:use_by_macro.rs +//@ aux-build:use_by_macro.rs extern crate use_by_macro; diff --git a/tests/ui/hygiene/cross-crate-variants.rs b/tests/ui/hygiene/cross-crate-variants.rs index efc73a21f16..9634cd5fdb7 100644 --- a/tests/ui/hygiene/cross-crate-variants.rs +++ b/tests/ui/hygiene/cross-crate-variants.rs @@ -1,8 +1,8 @@ // Test that variants of an enum defined in another crate are resolved // correctly when their names differ only in `SyntaxContext`. -// run-pass -// aux-build:variants.rs +//@ run-pass +//@ aux-build:variants.rs extern crate variants; diff --git a/tests/ui/hygiene/dollar-crate-modern.rs b/tests/ui/hygiene/dollar-crate-modern.rs index eb176fed87c..c08976c9260 100644 --- a/tests/ui/hygiene/dollar-crate-modern.rs +++ b/tests/ui/hygiene/dollar-crate-modern.rs @@ -1,7 +1,7 @@ // Make sure `$crate` and `crate` work in for basic cases of nested macros. -// check-pass -// aux-build:intercrate.rs +//@ check-pass +//@ aux-build:intercrate.rs #![feature(decl_macro)] diff --git a/tests/ui/hygiene/eager-from-opaque-2.rs b/tests/ui/hygiene/eager-from-opaque-2.rs index 220e5526745..e8f8a941797 100644 --- a/tests/ui/hygiene/eager-from-opaque-2.rs +++ b/tests/ui/hygiene/eager-from-opaque-2.rs @@ -1,6 +1,6 @@ // Regression test for the issue #63460. -// check-pass +//@ check-pass #[macro_export] macro_rules! separator { diff --git a/tests/ui/hygiene/eager-from-opaque.rs b/tests/ui/hygiene/eager-from-opaque.rs index 6f3215dd697..9208d30d026 100644 --- a/tests/ui/hygiene/eager-from-opaque.rs +++ b/tests/ui/hygiene/eager-from-opaque.rs @@ -1,7 +1,7 @@ // Opaque macro can eagerly expand its input without breaking its resolution. // Regression test for issue #63685. -// check-pass +//@ check-pass macro_rules! foo { () => { diff --git a/tests/ui/hygiene/extern-prelude-from-opaque-fail-2018.rs b/tests/ui/hygiene/extern-prelude-from-opaque-fail-2018.rs index 40c5eacee3b..aaf831d1983 100644 --- a/tests/ui/hygiene/extern-prelude-from-opaque-fail-2018.rs +++ b/tests/ui/hygiene/extern-prelude-from-opaque-fail-2018.rs @@ -1,4 +1,4 @@ -// edition:2018 +//@ edition:2018 #![feature(decl_macro)] macro a() { diff --git a/tests/ui/hygiene/extern-prelude-from-opaque-fail.rs b/tests/ui/hygiene/extern-prelude-from-opaque-fail.rs index f3fa2dddaef..be3102aeab0 100644 --- a/tests/ui/hygiene/extern-prelude-from-opaque-fail.rs +++ b/tests/ui/hygiene/extern-prelude-from-opaque-fail.rs @@ -1,4 +1,4 @@ -// edition:2015 +//@ edition:2015 #![feature(decl_macro)] macro a() { diff --git a/tests/ui/hygiene/format-args.rs b/tests/ui/hygiene/format-args.rs index d74889b95cc..ff08aecfd9e 100644 --- a/tests/ui/hygiene/format-args.rs +++ b/tests/ui/hygiene/format-args.rs @@ -1,4 +1,4 @@ -// check-pass +//@ check-pass #![allow(non_upper_case_globals)] #![feature(format_args_nl)] diff --git a/tests/ui/hygiene/generic_params.rs b/tests/ui/hygiene/generic_params.rs index b42152955f7..def9be3a1b6 100644 --- a/tests/ui/hygiene/generic_params.rs +++ b/tests/ui/hygiene/generic_params.rs @@ -1,6 +1,6 @@ // Ensure that generic parameters always have modern hygiene. -// check-pass +//@ check-pass #![feature(decl_macro, rustc_attrs)] diff --git a/tests/ui/hygiene/hir-res-hygiene.rs b/tests/ui/hygiene/hir-res-hygiene.rs index c26cf5fdb5b..01b346a03af 100644 --- a/tests/ui/hygiene/hir-res-hygiene.rs +++ b/tests/ui/hygiene/hir-res-hygiene.rs @@ -1,6 +1,6 @@ -// check-pass -// edition:2018 -// aux-build:not-libstd.rs +//@ check-pass +//@ edition:2018 +//@ aux-build:not-libstd.rs // Check that paths created in HIR are not affected by in scope names. diff --git a/tests/ui/hygiene/hygiene-dodging-1.rs b/tests/ui/hygiene/hygiene-dodging-1.rs index 69e47e82ba5..0a3aebd63b2 100644 --- a/tests/ui/hygiene/hygiene-dodging-1.rs +++ b/tests/ui/hygiene/hygiene-dodging-1.rs @@ -1,4 +1,4 @@ -// run-pass +//@ run-pass #![allow(unused_must_use)] mod x { diff --git a/tests/ui/hygiene/hygiene.rs b/tests/ui/hygiene/hygiene.rs index fb351cf0faf..a937e11eef6 100644 --- a/tests/ui/hygiene/hygiene.rs +++ b/tests/ui/hygiene/hygiene.rs @@ -1,4 +1,4 @@ -// run-pass +//@ run-pass #![allow(unused)] fn f() { diff --git a/tests/ui/hygiene/hygienic-labels-in-let.rs b/tests/ui/hygiene/hygienic-labels-in-let.rs index 8cf66f31a0a..14848ca382b 100644 --- a/tests/ui/hygiene/hygienic-labels-in-let.rs +++ b/tests/ui/hygiene/hygienic-labels-in-let.rs @@ -1,4 +1,4 @@ -// run-pass +//@ run-pass #![allow(unreachable_code)] #![allow(unused_labels)] diff --git a/tests/ui/hygiene/hygienic-labels.rs b/tests/ui/hygiene/hygienic-labels.rs index 6a7d81f045b..5084338f8df 100644 --- a/tests/ui/hygiene/hygienic-labels.rs +++ b/tests/ui/hygiene/hygienic-labels.rs @@ -1,4 +1,4 @@ -// run-pass +//@ run-pass #![allow(unreachable_code)] #![allow(unused_labels)] // Test that labels injected by macros do not break hygiene. diff --git a/tests/ui/hygiene/intercrate.rs b/tests/ui/hygiene/intercrate.rs index 2de62f6aff7..eacd3874c47 100644 --- a/tests/ui/hygiene/intercrate.rs +++ b/tests/ui/hygiene/intercrate.rs @@ -1,4 +1,4 @@ -// aux-build:intercrate.rs +//@ aux-build:intercrate.rs #![feature(decl_macro)] diff --git a/tests/ui/hygiene/issue-15221.rs b/tests/ui/hygiene/issue-15221.rs index 4b8319a8304..ebb1a234051 100644 --- a/tests/ui/hygiene/issue-15221.rs +++ b/tests/ui/hygiene/issue-15221.rs @@ -1,6 +1,6 @@ -// run-pass +//@ run-pass #![allow(path_statements)] -// pretty-expanded FIXME #23616 +//@ pretty-expanded FIXME #23616 macro_rules! inner { ($e:pat ) => ($e) diff --git a/tests/ui/hygiene/issue-29746.rs b/tests/ui/hygiene/issue-29746.rs index 3470a7e09ad..53833e855e5 100644 --- a/tests/ui/hygiene/issue-29746.rs +++ b/tests/ui/hygiene/issue-29746.rs @@ -1,4 +1,4 @@ -// run-pass +//@ run-pass // zip!(a1,a2,a3,a4) is equivalent to: // a1.zip(a2).zip(a3).zip(a4).map(|(((x1,x2),x3),x4)| (x1,x2,x3,x4)) macro_rules! zip { diff --git a/tests/ui/hygiene/issue-32922.rs b/tests/ui/hygiene/issue-32922.rs index 54ec44a1cf4..8027e2c3bcf 100644 --- a/tests/ui/hygiene/issue-32922.rs +++ b/tests/ui/hygiene/issue-32922.rs @@ -1,4 +1,4 @@ -// check-pass +//@ check-pass macro_rules! foo { () => { let x = 1; diff --git a/tests/ui/hygiene/issue-40847.rs b/tests/ui/hygiene/issue-40847.rs index 087b40ad6cd..c12214be06e 100644 --- a/tests/ui/hygiene/issue-40847.rs +++ b/tests/ui/hygiene/issue-40847.rs @@ -1,4 +1,4 @@ -// run-pass +//@ run-pass macro_rules! gen { ($name:ident ( $($dol:tt $var:ident)* ) $($body:tt)*) => { macro_rules! $name { diff --git a/tests/ui/hygiene/issue-44128.rs b/tests/ui/hygiene/issue-44128.rs index 5e03bdb8c5b..021d340bacf 100644 --- a/tests/ui/hygiene/issue-44128.rs +++ b/tests/ui/hygiene/issue-44128.rs @@ -1,4 +1,4 @@ -// check-pass +//@ check-pass #![allow(unused_must_use)] #![feature(decl_macro)] diff --git a/tests/ui/hygiene/issue-47311.rs b/tests/ui/hygiene/issue-47311.rs index 3f1b7397301..e12b174f82f 100644 --- a/tests/ui/hygiene/issue-47311.rs +++ b/tests/ui/hygiene/issue-47311.rs @@ -1,4 +1,4 @@ -// check-pass +//@ check-pass #![feature(decl_macro)] #![allow(unused)] diff --git a/tests/ui/hygiene/issue-47312.rs b/tests/ui/hygiene/issue-47312.rs index c8b5c36767c..8d11d3b9ce2 100644 --- a/tests/ui/hygiene/issue-47312.rs +++ b/tests/ui/hygiene/issue-47312.rs @@ -1,4 +1,4 @@ -// check-pass +//@ check-pass #![feature(decl_macro)] #![allow(unused)] diff --git a/tests/ui/hygiene/issue-61574-const-parameters.rs b/tests/ui/hygiene/issue-61574-const-parameters.rs index 3634ee004f7..040fcacd71b 100644 --- a/tests/ui/hygiene/issue-61574-const-parameters.rs +++ b/tests/ui/hygiene/issue-61574-const-parameters.rs @@ -1,7 +1,7 @@ // A more comprehensive test that const parameters have correctly implemented // hygiene -// check-pass +//@ check-pass use std::ops::Add; diff --git a/tests/ui/hygiene/issue-77523-def-site-async-await.rs b/tests/ui/hygiene/issue-77523-def-site-async-await.rs index 2af60ff6f53..102112381d3 100644 --- a/tests/ui/hygiene/issue-77523-def-site-async-await.rs +++ b/tests/ui/hygiene/issue-77523-def-site-async-await.rs @@ -1,6 +1,6 @@ -// build-pass -// aux-build:opaque-hygiene.rs -// aux-build:def-site-async-await.rs +//@ build-pass +//@ aux-build:opaque-hygiene.rs +//@ aux-build:def-site-async-await.rs // Regression test for issue #77523 // Tests that we don't ICE when an unusual combination diff --git a/tests/ui/hygiene/items.rs b/tests/ui/hygiene/items.rs index a7ed749f526..6600b35ac31 100644 --- a/tests/ui/hygiene/items.rs +++ b/tests/ui/hygiene/items.rs @@ -1,4 +1,4 @@ -// check-pass +//@ check-pass #![feature(decl_macro)] diff --git a/tests/ui/hygiene/lambda-var-hygiene.rs b/tests/ui/hygiene/lambda-var-hygiene.rs index bf06765e5dd..ff0c6e08a49 100644 --- a/tests/ui/hygiene/lambda-var-hygiene.rs +++ b/tests/ui/hygiene/lambda-var-hygiene.rs @@ -1,4 +1,4 @@ -// run-pass +//@ run-pass // shouldn't affect evaluation of $ex: macro_rules! bad_macro { ($ex:expr) => ({(|_x| { $ex }) (9) }) diff --git a/tests/ui/hygiene/legacy_interaction.rs b/tests/ui/hygiene/legacy_interaction.rs index 4d150baf5d4..277650b5450 100644 --- a/tests/ui/hygiene/legacy_interaction.rs +++ b/tests/ui/hygiene/legacy_interaction.rs @@ -1,7 +1,7 @@ -// check-pass +//@ check-pass #![allow(dead_code)] -// aux-build:legacy_interaction.rs +//@ aux-build:legacy_interaction.rs #![feature(decl_macro)] #[allow(unused)] diff --git a/tests/ui/hygiene/lexical.rs b/tests/ui/hygiene/lexical.rs index 81de974c203..eb9d5dbe42a 100644 --- a/tests/ui/hygiene/lexical.rs +++ b/tests/ui/hygiene/lexical.rs @@ -1,4 +1,4 @@ -// check-pass +//@ check-pass #![feature(decl_macro)] diff --git a/tests/ui/hygiene/local_inner_macros.rs b/tests/ui/hygiene/local_inner_macros.rs index 71ffcac40d3..cb3dbda63db 100644 --- a/tests/ui/hygiene/local_inner_macros.rs +++ b/tests/ui/hygiene/local_inner_macros.rs @@ -1,5 +1,5 @@ -// check-pass -// aux-build:local_inner_macros.rs +//@ check-pass +//@ aux-build:local_inner_macros.rs extern crate local_inner_macros; diff --git a/tests/ui/hygiene/macro-metavars-legacy.rs b/tests/ui/hygiene/macro-metavars-legacy.rs index 09070f0f561..96b6303012a 100644 --- a/tests/ui/hygiene/macro-metavars-legacy.rs +++ b/tests/ui/hygiene/macro-metavars-legacy.rs @@ -2,7 +2,7 @@ #![feature(rustc_attrs)] -// run-pass +//@ run-pass macro_rules! make_mac { ( $($dollar:tt $arg:ident),+ ) => { diff --git a/tests/ui/hygiene/macro-metavars-transparent.rs b/tests/ui/hygiene/macro-metavars-transparent.rs index e475b5728a0..3eb4a8946fe 100644 --- a/tests/ui/hygiene/macro-metavars-transparent.rs +++ b/tests/ui/hygiene/macro-metavars-transparent.rs @@ -3,7 +3,7 @@ #![feature(rustc_attrs)] -// run-pass +//@ run-pass #[rustc_macro_transparency = "transparent"] macro_rules! k { diff --git a/tests/ui/hygiene/nested-dollar-crate.rs b/tests/ui/hygiene/nested-dollar-crate.rs index e8703bc77ee..6ec4043a6e2 100644 --- a/tests/ui/hygiene/nested-dollar-crate.rs +++ b/tests/ui/hygiene/nested-dollar-crate.rs @@ -1,6 +1,6 @@ -// aux-build:nested-dollar-crate.rs -// edition:2018 -// run-pass +//@ aux-build:nested-dollar-crate.rs +//@ edition:2018 +//@ run-pass extern crate nested_dollar_crate; diff --git a/tests/ui/hygiene/no_implicit_prelude-2018.rs b/tests/ui/hygiene/no_implicit_prelude-2018.rs index 83ca28167a4..015bff87090 100644 --- a/tests/ui/hygiene/no_implicit_prelude-2018.rs +++ b/tests/ui/hygiene/no_implicit_prelude-2018.rs @@ -1,4 +1,4 @@ -// edition:2018 +//@ edition:2018 #[no_implicit_prelude] mod bar { diff --git a/tests/ui/hygiene/no_implicit_prelude-2021.rs b/tests/ui/hygiene/no_implicit_prelude-2021.rs index 0fe9ae56c65..9e793ec7c6d 100644 --- a/tests/ui/hygiene/no_implicit_prelude-2021.rs +++ b/tests/ui/hygiene/no_implicit_prelude-2021.rs @@ -1,5 +1,5 @@ -// check-pass -// edition:2021 +//@ check-pass +//@ edition:2021 #![no_implicit_prelude] diff --git a/tests/ui/hygiene/panic-location.rs b/tests/ui/hygiene/panic-location.rs index 5cf169dfb14..a98960d74b0 100644 --- a/tests/ui/hygiene/panic-location.rs +++ b/tests/ui/hygiene/panic-location.rs @@ -1,6 +1,6 @@ -// run-fail -// check-run-results -// exec-env:RUST_BACKTRACE=0 +//@ run-fail +//@ check-run-results +//@ exec-env:RUST_BACKTRACE=0 // // Regression test for issue #70963 // The captured stderr from this test reports a location diff --git a/tests/ui/hygiene/prelude-import-hygiene.rs b/tests/ui/hygiene/prelude-import-hygiene.rs index 51e7bed6580..a27c375369b 100644 --- a/tests/ui/hygiene/prelude-import-hygiene.rs +++ b/tests/ui/hygiene/prelude-import-hygiene.rs @@ -1,11 +1,11 @@ // Make sure that attribute used when injecting the prelude are resolved // hygienically. -// check-pass -// aux-build:not-libstd.rs +//@ check-pass +//@ aux-build:not-libstd.rs -//revisions: rust2015 rust2018 -//[rust2018] edition:2018 +//@revisions: rust2015 rust2018 +//@[rust2018] edition:2018 // The prelude import shouldn't see these as candidates for when it's trying to // use the built-in macros. diff --git a/tests/ui/hygiene/privacy-early.rs b/tests/ui/hygiene/privacy-early.rs index 58fc74d65a5..07680a7b9b2 100644 --- a/tests/ui/hygiene/privacy-early.rs +++ b/tests/ui/hygiene/privacy-early.rs @@ -1,4 +1,4 @@ -// edition:2018 +//@ edition:2018 #![feature(decl_macro)] diff --git a/tests/ui/hygiene/specialization.rs b/tests/ui/hygiene/specialization.rs index b8c4c1b0d58..a3bd36877cf 100644 --- a/tests/ui/hygiene/specialization.rs +++ b/tests/ui/hygiene/specialization.rs @@ -1,4 +1,4 @@ -// run-pass +//@ run-pass #![feature(decl_macro)] diff --git a/tests/ui/hygiene/stdlib-prelude-from-opaque-early.rs b/tests/ui/hygiene/stdlib-prelude-from-opaque-early.rs index c8c5c72bf95..f08693f2218 100644 --- a/tests/ui/hygiene/stdlib-prelude-from-opaque-early.rs +++ b/tests/ui/hygiene/stdlib-prelude-from-opaque-early.rs @@ -1,5 +1,5 @@ -// check-pass -// aux-build:stdlib-prelude.rs +//@ check-pass +//@ aux-build:stdlib-prelude.rs #![feature(decl_macro)] #![feature(prelude_import)] diff --git a/tests/ui/hygiene/stdlib-prelude-from-opaque-late.rs b/tests/ui/hygiene/stdlib-prelude-from-opaque-late.rs index 721bb7281c0..e392c5611ba 100644 --- a/tests/ui/hygiene/stdlib-prelude-from-opaque-late.rs +++ b/tests/ui/hygiene/stdlib-prelude-from-opaque-late.rs @@ -1,4 +1,4 @@ -// check-pass +//@ check-pass #![feature(decl_macro)] #![allow(dropping_copy_types)] diff --git a/tests/ui/hygiene/thread-local-not-in-prelude.rs b/tests/ui/hygiene/thread-local-not-in-prelude.rs index e5ed09c600b..bee9908bbbc 100644 --- a/tests/ui/hygiene/thread-local-not-in-prelude.rs +++ b/tests/ui/hygiene/thread-local-not-in-prelude.rs @@ -1,4 +1,4 @@ -// run-pass +//@ run-pass #![no_std] extern crate std; diff --git a/tests/ui/hygiene/trait_items-2.rs b/tests/ui/hygiene/trait_items-2.rs index cd9122656cd..d070d678bed 100644 --- a/tests/ui/hygiene/trait_items-2.rs +++ b/tests/ui/hygiene/trait_items-2.rs @@ -1,4 +1,4 @@ -// check-pass +//@ check-pass #![feature(decl_macro)] diff --git a/tests/ui/hygiene/traits-in-scope.rs b/tests/ui/hygiene/traits-in-scope.rs index 548bb226b71..2f391f1062e 100644 --- a/tests/ui/hygiene/traits-in-scope.rs +++ b/tests/ui/hygiene/traits-in-scope.rs @@ -2,7 +2,7 @@ // It is not clear whether this is desirable behavior or not. // It is also not clear how to prevent it if it is not desirable. -// check-pass +//@ check-pass #![feature(decl_macro)] #![feature(trait_alias)] diff --git a/tests/ui/hygiene/transparent-basic.rs b/tests/ui/hygiene/transparent-basic.rs index bfa1713e4ed..b8f67decd18 100644 --- a/tests/ui/hygiene/transparent-basic.rs +++ b/tests/ui/hygiene/transparent-basic.rs @@ -1,5 +1,5 @@ -// check-pass -// aux-build:transparent-basic.rs +//@ check-pass +//@ aux-build:transparent-basic.rs #![feature(decl_macro, rustc_attrs)] diff --git a/tests/ui/hygiene/unpretty-debug.rs b/tests/ui/hygiene/unpretty-debug.rs index 6e936bb3d83..20c909b1cbe 100644 --- a/tests/ui/hygiene/unpretty-debug.rs +++ b/tests/ui/hygiene/unpretty-debug.rs @@ -1,8 +1,8 @@ -// check-pass -// compile-flags: -Zunpretty=expanded,hygiene +//@ check-pass +//@ compile-flags: -Zunpretty=expanded,hygiene // Don't break whenever Symbol numbering changes -// normalize-stdout-test "\d+#" -> "0#" +//@ normalize-stdout-test "\d+#" -> "0#" // minimal junk #![feature(no_core)] diff --git a/tests/ui/hygiene/unpretty-debug.stdout b/tests/ui/hygiene/unpretty-debug.stdout index 3d686f95df9..cab3fe2f29b 100644 --- a/tests/ui/hygiene/unpretty-debug.stdout +++ b/tests/ui/hygiene/unpretty-debug.stdout @@ -1,8 +1,8 @@ -// check-pass -// compile-flags: -Zunpretty=expanded,hygiene +//@ check-pass +//@ compile-flags: -Zunpretty=expanded,hygiene // Don't break whenever Symbol numbering changes -// normalize-stdout-test "\d+#" -> "0#" +//@ normalize-stdout-test "\d+#" -> "0#" // minimal junk #![feature /* 0#0 */(no_core)] diff --git a/tests/ui/hygiene/wrap_unhygienic_example.rs b/tests/ui/hygiene/wrap_unhygienic_example.rs index f6b48156888..6412117b2a6 100644 --- a/tests/ui/hygiene/wrap_unhygienic_example.rs +++ b/tests/ui/hygiene/wrap_unhygienic_example.rs @@ -1,7 +1,7 @@ -// check-pass +//@ check-pass -// aux-build:my_crate.rs -// aux-build:unhygienic_example.rs +//@ aux-build:my_crate.rs +//@ aux-build:unhygienic_example.rs #![feature(decl_macro)] diff --git a/tests/ui/hygiene/xcrate.rs b/tests/ui/hygiene/xcrate.rs index 6366bebb52f..3567a4848e4 100644 --- a/tests/ui/hygiene/xcrate.rs +++ b/tests/ui/hygiene/xcrate.rs @@ -1,6 +1,6 @@ -// run-pass +//@ run-pass -// aux-build:xcrate.rs +//@ aux-build:xcrate.rs #![feature(decl_macro)] diff --git a/tests/ui/illegal-sized-bound/mutability-mismatch-arg.fixed b/tests/ui/illegal-sized-bound/mutability-mismatch-arg.fixed index 74f3c887f02..76a3b2563ca 100644 --- a/tests/ui/illegal-sized-bound/mutability-mismatch-arg.fixed +++ b/tests/ui/illegal-sized-bound/mutability-mismatch-arg.fixed @@ -1,4 +1,4 @@ -// run-rustfix +//@ run-rustfix fn test(t: &mut dyn Iterator) -> u64 { *t.min().unwrap() //~ ERROR the `min` method cannot be invoked on } diff --git a/tests/ui/illegal-sized-bound/mutability-mismatch-arg.rs b/tests/ui/illegal-sized-bound/mutability-mismatch-arg.rs index 3b02c5a5ad1..fb5c6126052 100644 --- a/tests/ui/illegal-sized-bound/mutability-mismatch-arg.rs +++ b/tests/ui/illegal-sized-bound/mutability-mismatch-arg.rs @@ -1,4 +1,4 @@ -// run-rustfix +//@ run-rustfix fn test(t: &dyn Iterator) -> u64 { *t.min().unwrap() //~ ERROR the `min` method cannot be invoked on } diff --git a/tests/ui/illegal-ufcs-drop.fixed b/tests/ui/illegal-ufcs-drop.fixed index c088c82791b..2b1c967ed1e 100644 --- a/tests/ui/illegal-ufcs-drop.fixed +++ b/tests/ui/illegal-ufcs-drop.fixed @@ -1,4 +1,4 @@ -// run-rustfix +//@ run-rustfix #![allow(dropping_references)] diff --git a/tests/ui/illegal-ufcs-drop.rs b/tests/ui/illegal-ufcs-drop.rs index 1389b112188..99dda0dab34 100644 --- a/tests/ui/illegal-ufcs-drop.rs +++ b/tests/ui/illegal-ufcs-drop.rs @@ -1,4 +1,4 @@ -// run-rustfix +//@ run-rustfix #![allow(dropping_references)] diff --git a/tests/ui/impl-header-lifetime-elision/bare_type.rs b/tests/ui/impl-header-lifetime-elision/bare_type.rs index 9af98f870d2..bf119ffe7ed 100644 --- a/tests/ui/impl-header-lifetime-elision/bare_type.rs +++ b/tests/ui/impl-header-lifetime-elision/bare_type.rs @@ -1,4 +1,4 @@ -// run-pass +//@ run-pass #![allow(dead_code)] type MyType<'a, T> = &'a T; diff --git a/tests/ui/impl-header-lifetime-elision/constant-used-as-arraylen.rs b/tests/ui/impl-header-lifetime-elision/constant-used-as-arraylen.rs index 929b82bfc43..1568eddd308 100644 --- a/tests/ui/impl-header-lifetime-elision/constant-used-as-arraylen.rs +++ b/tests/ui/impl-header-lifetime-elision/constant-used-as-arraylen.rs @@ -1,4 +1,4 @@ -// check-pass +//@ check-pass // Verify that we do not ICE when anonymous lifetimes appear inside an AnonConst. pub struct EntriesBuffer(Box<[[u8; HashesEntry::LEN]; 5]>); diff --git a/tests/ui/impl-header-lifetime-elision/explicit-and-elided-same-header.rs b/tests/ui/impl-header-lifetime-elision/explicit-and-elided-same-header.rs index 6301ac4a323..fb5f9b0aeee 100644 --- a/tests/ui/impl-header-lifetime-elision/explicit-and-elided-same-header.rs +++ b/tests/ui/impl-header-lifetime-elision/explicit-and-elided-same-header.rs @@ -1,4 +1,4 @@ -// run-pass +//@ run-pass #![allow(warnings)] diff --git a/tests/ui/impl-header-lifetime-elision/inherent-impl.rs b/tests/ui/impl-header-lifetime-elision/inherent-impl.rs index 9d7b2f2d088..da071cfcefb 100644 --- a/tests/ui/impl-header-lifetime-elision/inherent-impl.rs +++ b/tests/ui/impl-header-lifetime-elision/inherent-impl.rs @@ -1,4 +1,4 @@ -// build-pass (FIXME(62277): could be check-pass?) +//@ build-pass (FIXME(62277): could be check-pass?) struct Foo<'a>(&'a u8); diff --git a/tests/ui/impl-header-lifetime-elision/path-underscore.rs b/tests/ui/impl-header-lifetime-elision/path-underscore.rs index f39ba573384..7098f82f33f 100644 --- a/tests/ui/impl-header-lifetime-elision/path-underscore.rs +++ b/tests/ui/impl-header-lifetime-elision/path-underscore.rs @@ -1,6 +1,6 @@ // Test that `impl MyTrait for Foo<'_>` works. -// run-pass +//@ run-pass #![allow(warnings)] diff --git a/tests/ui/impl-header-lifetime-elision/ref-underscore.rs b/tests/ui/impl-header-lifetime-elision/ref-underscore.rs index 5be04d08a09..33808b2077b 100644 --- a/tests/ui/impl-header-lifetime-elision/ref-underscore.rs +++ b/tests/ui/impl-header-lifetime-elision/ref-underscore.rs @@ -1,6 +1,6 @@ // Test that `impl MyTrait for &i32` works and is equivalent to any lifetime. -// run-pass +//@ run-pass #![allow(warnings)] diff --git a/tests/ui/impl-header-lifetime-elision/trait-underscore.rs b/tests/ui/impl-header-lifetime-elision/trait-underscore.rs index 3e13b0426ec..1b90583a5cb 100644 --- a/tests/ui/impl-header-lifetime-elision/trait-underscore.rs +++ b/tests/ui/impl-header-lifetime-elision/trait-underscore.rs @@ -1,7 +1,7 @@ // Test that `impl MyTrait<'_> for &i32` is equivalent to `impl<'a, // 'b> MyTrait<'a> for &'b i32`. // -// run-pass +//@ run-pass #![allow(warnings)] diff --git a/tests/ui/impl-inherent-non-conflict.rs b/tests/ui/impl-inherent-non-conflict.rs index be524f87c9f..41ab865892a 100644 --- a/tests/ui/impl-inherent-non-conflict.rs +++ b/tests/ui/impl-inherent-non-conflict.rs @@ -1,4 +1,4 @@ -// run-pass +//@ run-pass // Ensure that a user-defined type admits multiple inherent methods // with the same name, which can be called on values that have a // precise enough type to allow distinguishing between the methods. diff --git a/tests/ui/impl-not-adjacent-to-type.rs b/tests/ui/impl-not-adjacent-to-type.rs index 97caf908387..7fc927b1d64 100644 --- a/tests/ui/impl-not-adjacent-to-type.rs +++ b/tests/ui/impl-not-adjacent-to-type.rs @@ -1,4 +1,4 @@ -// run-pass +//@ run-pass mod foo { pub struct Point { diff --git a/tests/ui/impl-privacy-xc-1.rs b/tests/ui/impl-privacy-xc-1.rs index c9f7f09c7bd..1a2af8098f5 100644 --- a/tests/ui/impl-privacy-xc-1.rs +++ b/tests/ui/impl-privacy-xc-1.rs @@ -1,7 +1,7 @@ -// run-pass -// aux-build:impl_privacy_xc_1.rs +//@ run-pass +//@ aux-build:impl_privacy_xc_1.rs -// pretty-expanded FIXME #23616 +//@ pretty-expanded FIXME #23616 extern crate impl_privacy_xc_1; diff --git a/tests/ui/impl-trait/associated-impl-trait-type-generic-trait.rs b/tests/ui/impl-trait/associated-impl-trait-type-generic-trait.rs index 0908a0bf39d..843dfcee420 100644 --- a/tests/ui/impl-trait/associated-impl-trait-type-generic-trait.rs +++ b/tests/ui/impl-trait/associated-impl-trait-type-generic-trait.rs @@ -1,5 +1,5 @@ #![feature(impl_trait_in_assoc_type)] -// build-pass (FIXME(62277): could be check-pass?) +//@ build-pass (FIXME(62277): could be check-pass?) trait Bar {} struct Dummy(U); diff --git a/tests/ui/impl-trait/associated-impl-trait-type-issue-114325.rs b/tests/ui/impl-trait/associated-impl-trait-type-issue-114325.rs index 8173f8df11b..151d183669c 100644 --- a/tests/ui/impl-trait/associated-impl-trait-type-issue-114325.rs +++ b/tests/ui/impl-trait/associated-impl-trait-type-issue-114325.rs @@ -1,8 +1,8 @@ // This is a non-regression test for issue #114325: an "unexpected unsized tail" ICE happened during // codegen, and was fixed by MIR drop tracking #107421. -// edition: 2021 -// build-pass: ICEd during codegen. +//@ edition: 2021 +//@ build-pass: ICEd during codegen. #![feature(impl_trait_in_assoc_type)] diff --git a/tests/ui/impl-trait/associated-impl-trait-type-trivial.rs b/tests/ui/impl-trait/associated-impl-trait-type-trivial.rs index b5ea90bb0c7..b310998dfdc 100644 --- a/tests/ui/impl-trait/associated-impl-trait-type-trivial.rs +++ b/tests/ui/impl-trait/associated-impl-trait-type-trivial.rs @@ -1,5 +1,5 @@ #![feature(impl_trait_in_assoc_type)] -// build-pass (FIXME(62277): could be check-pass?) +//@ build-pass (FIXME(62277): could be check-pass?) trait Bar {} struct Dummy; diff --git a/tests/ui/impl-trait/associated-impl-trait-type.rs b/tests/ui/impl-trait/associated-impl-trait-type.rs index f5981261c38..a0c2cef0fcf 100644 --- a/tests/ui/impl-trait/associated-impl-trait-type.rs +++ b/tests/ui/impl-trait/associated-impl-trait-type.rs @@ -1,5 +1,5 @@ #![feature(impl_trait_in_assoc_type)] -// build-pass (FIXME(62277): could be check-pass?) +//@ build-pass (FIXME(62277): could be check-pass?) trait Bar {} struct Dummy; diff --git a/tests/ui/impl-trait/async_scope_creep.rs b/tests/ui/impl-trait/async_scope_creep.rs index 60975439a33..0fb355c5233 100644 --- a/tests/ui/impl-trait/async_scope_creep.rs +++ b/tests/ui/impl-trait/async_scope_creep.rs @@ -1,7 +1,7 @@ #![feature(type_alias_impl_trait)] -// edition:2021 -// check-pass -// revisions: tait rpit +//@ edition:2021 +//@ check-pass +//@ revisions: tait rpit struct Pending {} diff --git a/tests/ui/impl-trait/auto-trait-coherence.rs b/tests/ui/impl-trait/auto-trait-coherence.rs index e4226b20074..0f089c5adbd 100644 --- a/tests/ui/impl-trait/auto-trait-coherence.rs +++ b/tests/ui/impl-trait/auto-trait-coherence.rs @@ -1,5 +1,5 @@ -// revisions: old next -//[next] compile-flags: -Znext-solver +//@ revisions: old next +//@[next] compile-flags: -Znext-solver // Tests that type alias impls traits do not leak auto-traits for // the purposes of coherence checking diff --git a/tests/ui/impl-trait/auto-trait-leak-rpass.rs b/tests/ui/impl-trait/auto-trait-leak-rpass.rs index 9976a018b46..55ba3e0d14e 100644 --- a/tests/ui/impl-trait/auto-trait-leak-rpass.rs +++ b/tests/ui/impl-trait/auto-trait-leak-rpass.rs @@ -1,4 +1,4 @@ -// run-pass +//@ run-pass // Fast path, main can see the concrete type returned. fn before() -> impl FnMut(i32) { diff --git a/tests/ui/impl-trait/autoderef.rs b/tests/ui/impl-trait/autoderef.rs index 48ff8be6549..afab4e980a8 100644 --- a/tests/ui/impl-trait/autoderef.rs +++ b/tests/ui/impl-trait/autoderef.rs @@ -1,6 +1,6 @@ -// revisions: current next -//[next] compile-flags: -Znext-solver -// check-pass +//@ revisions: current next +//@[next] compile-flags: -Znext-solver +//@ check-pass use std::path::Path; use std::ffi::OsStr; diff --git a/tests/ui/impl-trait/bivariant-lifetime-liveness.rs b/tests/ui/impl-trait/bivariant-lifetime-liveness.rs index fe99fe3f340..1792d8cef9f 100644 --- a/tests/ui/impl-trait/bivariant-lifetime-liveness.rs +++ b/tests/ui/impl-trait/bivariant-lifetime-liveness.rs @@ -1,4 +1,4 @@ -// check-pass +//@ check-pass // issue: 116794 // Uncaptured lifetimes should not be required to be live. diff --git a/tests/ui/impl-trait/bound-normalization-fail.rs b/tests/ui/impl-trait/bound-normalization-fail.rs index 566a4a7adcc..f6e5e6c17aa 100644 --- a/tests/ui/impl-trait/bound-normalization-fail.rs +++ b/tests/ui/impl-trait/bound-normalization-fail.rs @@ -1,4 +1,4 @@ -// edition:2018 +//@ edition:2018 // See issue 60414 diff --git a/tests/ui/impl-trait/bound-normalization-pass.rs b/tests/ui/impl-trait/bound-normalization-pass.rs index 5613c1916c6..801187b6f5e 100644 --- a/tests/ui/impl-trait/bound-normalization-pass.rs +++ b/tests/ui/impl-trait/bound-normalization-pass.rs @@ -1,6 +1,6 @@ -// check-pass -// edition:2018 -// revisions: default sa +//@ check-pass +//@ edition:2018 +//@ revisions: default sa #![feature(type_alias_impl_trait)] diff --git a/tests/ui/impl-trait/bounds_regression.rs b/tests/ui/impl-trait/bounds_regression.rs index 89b0e3c55f9..452e99b80ae 100644 --- a/tests/ui/impl-trait/bounds_regression.rs +++ b/tests/ui/impl-trait/bounds_regression.rs @@ -1,4 +1,4 @@ -// run-pass +//@ run-pass pub trait FakeCoroutine { type Yield; diff --git a/tests/ui/impl-trait/can-return-unconstrained-closure.rs b/tests/ui/impl-trait/can-return-unconstrained-closure.rs index 7ae1ac4f576..1f8bdbc5054 100644 --- a/tests/ui/impl-trait/can-return-unconstrained-closure.rs +++ b/tests/ui/impl-trait/can-return-unconstrained-closure.rs @@ -10,7 +10,7 @@ // concrete type against the bound, which forces the return type to be // `&'static i32` here. -// build-pass (FIXME(62277): could be check-pass?) +//@ build-pass (FIXME(62277): could be check-pass?) fn make_identity() -> impl Sized { |x: &'static i32| x diff --git a/tests/ui/impl-trait/closure-calling-parent-fn.rs b/tests/ui/impl-trait/closure-calling-parent-fn.rs index 9dab334a217..9f6092211b9 100644 --- a/tests/ui/impl-trait/closure-calling-parent-fn.rs +++ b/tests/ui/impl-trait/closure-calling-parent-fn.rs @@ -5,7 +5,7 @@ // `foo` and hence is treated opaquely within the closure body. This // resulted in a failed subtype relationship. // -// check-pass +//@ check-pass fn foo() -> impl Copy { || foo(); } fn bar() -> impl Copy { || bar(); } diff --git a/tests/ui/impl-trait/closure-in-impl-trait-arg.rs b/tests/ui/impl-trait/closure-in-impl-trait-arg.rs index 3cfce459e37..b522e0a816c 100644 --- a/tests/ui/impl-trait/closure-in-impl-trait-arg.rs +++ b/tests/ui/impl-trait/closure-in-impl-trait-arg.rs @@ -1,4 +1,4 @@ -// run-pass +//@ run-pass #![allow(unused_must_use)] fn bug(_: impl Iterator) {} diff --git a/tests/ui/impl-trait/closure-in-impl-trait.rs b/tests/ui/impl-trait/closure-in-impl-trait.rs index 3593a1d5c8d..7c0382ebf45 100644 --- a/tests/ui/impl-trait/closure-in-impl-trait.rs +++ b/tests/ui/impl-trait/closure-in-impl-trait.rs @@ -1,4 +1,4 @@ -// run-pass +//@ run-pass #![allow(unused_must_use)] fn bug() -> impl Iterator { std::iter::empty() diff --git a/tests/ui/impl-trait/cross-return-site-inference.rs b/tests/ui/impl-trait/cross-return-site-inference.rs index e1071b08c55..bed08a6c418 100644 --- a/tests/ui/impl-trait/cross-return-site-inference.rs +++ b/tests/ui/impl-trait/cross-return-site-inference.rs @@ -1,4 +1,4 @@ -// edition:2021 +//@ edition:2021 fn foo(b: bool) -> impl std::fmt::Debug { if b { diff --git a/tests/ui/impl-trait/deduce-signature-from-supertrait.rs b/tests/ui/impl-trait/deduce-signature-from-supertrait.rs index 7a51aac44e2..4e452994f72 100644 --- a/tests/ui/impl-trait/deduce-signature-from-supertrait.rs +++ b/tests/ui/impl-trait/deduce-signature-from-supertrait.rs @@ -1,4 +1,4 @@ -// check-pass +//@ check-pass #![feature(type_alias_impl_trait)] diff --git a/tests/ui/impl-trait/defined-by-trait-resolution.rs b/tests/ui/impl-trait/defined-by-trait-resolution.rs index 1744046ddbb..8d3b38eb9c7 100644 --- a/tests/ui/impl-trait/defined-by-trait-resolution.rs +++ b/tests/ui/impl-trait/defined-by-trait-resolution.rs @@ -1,6 +1,6 @@ //! The trait query `foo: Fn() -> u8` is a valid defining use of RPIT. -// build-pass +//@ build-pass fn returns_u8(_: impl Fn() -> u8) {} diff --git a/tests/ui/impl-trait/deprecated_annotation.rs b/tests/ui/impl-trait/deprecated_annotation.rs index f76724c8ab1..5b31ded791d 100644 --- a/tests/ui/impl-trait/deprecated_annotation.rs +++ b/tests/ui/impl-trait/deprecated_annotation.rs @@ -1,4 +1,4 @@ -// build-pass (FIXME(62277): could be check-pass?) +//@ build-pass (FIXME(62277): could be check-pass?) #![deny(warnings)] diff --git a/tests/ui/impl-trait/divergence.rs b/tests/ui/impl-trait/divergence.rs index 211f7972dbc..c243299a516 100644 --- a/tests/ui/impl-trait/divergence.rs +++ b/tests/ui/impl-trait/divergence.rs @@ -1,4 +1,4 @@ -// check-pass +//@ check-pass fn foo() -> impl MyTrait { panic!(); diff --git a/tests/ui/impl-trait/dyn-trait-elided-two-inputs-assoc.rs b/tests/ui/impl-trait/dyn-trait-elided-two-inputs-assoc.rs index 3b714157384..138aadc411c 100644 --- a/tests/ui/impl-trait/dyn-trait-elided-two-inputs-assoc.rs +++ b/tests/ui/impl-trait/dyn-trait-elided-two-inputs-assoc.rs @@ -2,7 +2,7 @@ // when there are multiple inputs. The `dyn Bar` should default to `+ // 'static`. This used to erroneously generate an error (cc #62517). // -// check-pass +//@ check-pass trait Foo { type Item: ?Sized; } trait Bar { } diff --git a/tests/ui/impl-trait/dyn-trait-elided-two-inputs-param.rs b/tests/ui/impl-trait/dyn-trait-elided-two-inputs-param.rs index e8da52aad0e..494e38c1e6a 100644 --- a/tests/ui/impl-trait/dyn-trait-elided-two-inputs-param.rs +++ b/tests/ui/impl-trait/dyn-trait-elided-two-inputs-param.rs @@ -2,7 +2,7 @@ // when there are multiple inputs. The `dyn Object` should default to `+ // 'static`. This used to erroneously generate an error (cc #62517). // -// check-pass +//@ check-pass trait Alpha {} trait Object {} diff --git a/tests/ui/impl-trait/dyn-trait-elided-two-inputs-ref-assoc.rs b/tests/ui/impl-trait/dyn-trait-elided-two-inputs-ref-assoc.rs index aad9d89fe24..2dc19b9ad68 100644 --- a/tests/ui/impl-trait/dyn-trait-elided-two-inputs-ref-assoc.rs +++ b/tests/ui/impl-trait/dyn-trait-elided-two-inputs-ref-assoc.rs @@ -2,7 +2,7 @@ // when there are multiple inputs. The `dyn Bar` should default to `+ // 'static`. This used to erroneously generate an error (cc #62517). // -// check-pass +//@ check-pass trait Foo { type Item: ?Sized; diff --git a/tests/ui/impl-trait/dyn-trait-elided-two-inputs-ref-param.rs b/tests/ui/impl-trait/dyn-trait-elided-two-inputs-ref-param.rs index 8d34c1b6c2a..662f5389eac 100644 --- a/tests/ui/impl-trait/dyn-trait-elided-two-inputs-ref-param.rs +++ b/tests/ui/impl-trait/dyn-trait-elided-two-inputs-ref-param.rs @@ -1,7 +1,7 @@ // Test that `impl Alpha` resets the object-lifetime // default to `'static`. // -// check-pass +//@ check-pass trait Alpha { fn item(&self) -> Box { diff --git a/tests/ui/impl-trait/eagerly-reveal-in-local-body.rs b/tests/ui/impl-trait/eagerly-reveal-in-local-body.rs index a08c2c8765b..1caded0592a 100644 --- a/tests/ui/impl-trait/eagerly-reveal-in-local-body.rs +++ b/tests/ui/impl-trait/eagerly-reveal-in-local-body.rs @@ -1,5 +1,5 @@ -// check-pass -// compile-flags: -Znext-solver +//@ check-pass +//@ compile-flags: -Znext-solver #![feature(type_alias_impl_trait)] diff --git a/tests/ui/impl-trait/equal-hidden-lifetimes.rs b/tests/ui/impl-trait/equal-hidden-lifetimes.rs index a6dbf3f08f2..8c48307e432 100644 --- a/tests/ui/impl-trait/equal-hidden-lifetimes.rs +++ b/tests/ui/impl-trait/equal-hidden-lifetimes.rs @@ -1,7 +1,7 @@ // Test that we consider equal regions when checking for hidden regions in // opaque types -// check-pass +//@ check-pass // `'a == 'static` so `&'a i32` is fine as the return type fn equal_regions_static<'a: 'static>(x: &'a i32) -> impl Sized { diff --git a/tests/ui/impl-trait/equality-in-canonical-query.rs b/tests/ui/impl-trait/equality-in-canonical-query.rs index 31ab94f624e..6a32f4bec76 100644 --- a/tests/ui/impl-trait/equality-in-canonical-query.rs +++ b/tests/ui/impl-trait/equality-in-canonical-query.rs @@ -1,15 +1,15 @@ // issue: #116877 -// revisions: sized clone -//[sized] check-pass -//[clone] known-bug: #108498 -//[clone] failure-status: 101 -//[clone] normalize-stderr-test: "DefId\(.*?\]::" -> "DefId(" -//[clone] normalize-stderr-test: "(?m)note: we would appreciate a bug report.*\n\n" -> "" -//[clone] normalize-stderr-test: "(?m)note: rustc.*running on.*\n\n" -> "" -//[clone] normalize-stderr-test: "(?m)note: compiler flags.*\n\n" -> "" -//[clone] normalize-stderr-test: "(?m)note: delayed at.*$" -> "" -//[clone] normalize-stderr-test: "(?m)^ *\d+: .*\n" -> "" -//[clone] normalize-stderr-test: "(?m)^ *at .*\n" -> "" +//@ revisions: sized clone +//@[sized] check-pass +//@[clone] known-bug: #108498 +//@[clone] failure-status: 101 +//@[clone] normalize-stderr-test: "DefId\(.*?\]::" -> "DefId(" +//@[clone] normalize-stderr-test: "(?m)note: we would appreciate a bug report.*\n\n" -> "" +//@[clone] normalize-stderr-test: "(?m)note: rustc.*running on.*\n\n" -> "" +//@[clone] normalize-stderr-test: "(?m)note: compiler flags.*\n\n" -> "" +//@[clone] normalize-stderr-test: "(?m)note: delayed at.*$" -> "" +//@[clone] normalize-stderr-test: "(?m)^ *\d+: .*\n" -> "" +//@[clone] normalize-stderr-test: "(?m)^ *at .*\n" -> "" #[cfg(sized)] fn rpit() -> impl Sized {} #[cfg(clone)] fn rpit() -> impl Clone {} diff --git a/tests/ui/impl-trait/equality-rpass.rs b/tests/ui/impl-trait/equality-rpass.rs index 607b4a49661..da750f4ef1b 100644 --- a/tests/ui/impl-trait/equality-rpass.rs +++ b/tests/ui/impl-trait/equality-rpass.rs @@ -1,4 +1,4 @@ -// run-pass +//@ run-pass #![feature(specialization)] //~ WARN the feature `specialization` is incomplete diff --git a/tests/ui/impl-trait/erased-regions-in-hidden-ty.rs b/tests/ui/impl-trait/erased-regions-in-hidden-ty.rs index 0458b56f95f..c73f4fc1f65 100644 --- a/tests/ui/impl-trait/erased-regions-in-hidden-ty.rs +++ b/tests/ui/impl-trait/erased-regions-in-hidden-ty.rs @@ -1,7 +1,7 @@ -// revisions: current next -// compile-flags: -Zverbose-internals -//[next] compile-flags: -Znext-solver -// normalize-stderr-test "DefId\([^\)]+\)" -> "DefId(..)" +//@ revisions: current next +//@ compile-flags: -Zverbose-internals +//@[next] compile-flags: -Znext-solver +//@ normalize-stderr-test "DefId\([^\)]+\)" -> "DefId(..)" #![feature(rustc_attrs)] #![rustc_hidden_type_of_opaques] diff --git a/tests/ui/impl-trait/example-calendar.rs b/tests/ui/impl-trait/example-calendar.rs index da45f0d133d..1dadc5dfcb3 100644 --- a/tests/ui/impl-trait/example-calendar.rs +++ b/tests/ui/impl-trait/example-calendar.rs @@ -1,4 +1,4 @@ -// run-pass +//@ run-pass #![feature(fn_traits, step_trait, diff --git a/tests/ui/impl-trait/example-st.rs b/tests/ui/impl-trait/example-st.rs index 1e6ebc52365..1581137b02c 100644 --- a/tests/ui/impl-trait/example-st.rs +++ b/tests/ui/impl-trait/example-st.rs @@ -1,4 +1,4 @@ -// run-pass +//@ run-pass struct State; type Error = (); diff --git a/tests/ui/impl-trait/explicit-generic-args-with-impl-trait/const-args.rs b/tests/ui/impl-trait/explicit-generic-args-with-impl-trait/const-args.rs index 1aa23c60823..9a5eb74bd62 100644 --- a/tests/ui/impl-trait/explicit-generic-args-with-impl-trait/const-args.rs +++ b/tests/ui/impl-trait/explicit-generic-args-with-impl-trait/const-args.rs @@ -1,4 +1,4 @@ -// check-pass +//@ check-pass trait Usizer { fn m(self) -> usize; diff --git a/tests/ui/impl-trait/explicit-generic-args-with-impl-trait/explicit-generic-args.rs b/tests/ui/impl-trait/explicit-generic-args-with-impl-trait/explicit-generic-args.rs index 99e0931ab95..a48e870e982 100644 --- a/tests/ui/impl-trait/explicit-generic-args-with-impl-trait/explicit-generic-args.rs +++ b/tests/ui/impl-trait/explicit-generic-args-with-impl-trait/explicit-generic-args.rs @@ -1,4 +1,4 @@ -// check-pass +//@ check-pass fn foo(_f: impl AsRef) {} diff --git a/tests/ui/impl-trait/explicit-generic-args-with-impl-trait/issue-87718.rs b/tests/ui/impl-trait/explicit-generic-args-with-impl-trait/issue-87718.rs index 987df499734..9218ebf86df 100644 --- a/tests/ui/impl-trait/explicit-generic-args-with-impl-trait/issue-87718.rs +++ b/tests/ui/impl-trait/explicit-generic-args-with-impl-trait/issue-87718.rs @@ -1,4 +1,4 @@ -// check-pass +//@ check-pass fn f(_: impl AsRef, _: impl AsRef) {} diff --git a/tests/ui/impl-trait/extra-impl-in-trait-impl.fixed b/tests/ui/impl-trait/extra-impl-in-trait-impl.fixed index cd4f2610d3f..886fc1d0058 100644 --- a/tests/ui/impl-trait/extra-impl-in-trait-impl.fixed +++ b/tests/ui/impl-trait/extra-impl-in-trait-impl.fixed @@ -1,4 +1,4 @@ -// run-rustfix +//@ run-rustfix struct S(T); struct S2; diff --git a/tests/ui/impl-trait/extra-impl-in-trait-impl.rs b/tests/ui/impl-trait/extra-impl-in-trait-impl.rs index 024b703e6f2..f3271993867 100644 --- a/tests/ui/impl-trait/extra-impl-in-trait-impl.rs +++ b/tests/ui/impl-trait/extra-impl-in-trait-impl.rs @@ -1,4 +1,4 @@ -// run-rustfix +//@ run-rustfix struct S(T); struct S2; diff --git a/tests/ui/impl-trait/extra-item.rs b/tests/ui/impl-trait/extra-item.rs index d82237ccecc..dab3df592f2 100644 --- a/tests/ui/impl-trait/extra-item.rs +++ b/tests/ui/impl-trait/extra-item.rs @@ -1,5 +1,5 @@ -// aux-build:extra-item.rs -// compile-flags:--extern extra_item +//@ aux-build:extra-item.rs +//@ compile-flags:--extern extra_item struct S; diff --git a/tests/ui/impl-trait/fallback.rs b/tests/ui/impl-trait/fallback.rs index 1e6eb5bb355..a2f05a47a25 100644 --- a/tests/ui/impl-trait/fallback.rs +++ b/tests/ui/impl-trait/fallback.rs @@ -1,4 +1,4 @@ -// check-pass +//@ check-pass fn take_edge_counters( x: &mut Option>, diff --git a/tests/ui/impl-trait/feature-self-return-type.rs b/tests/ui/impl-trait/feature-self-return-type.rs index 7555df1b2c7..9746777ccf3 100644 --- a/tests/ui/impl-trait/feature-self-return-type.rs +++ b/tests/ui/impl-trait/feature-self-return-type.rs @@ -1,4 +1,4 @@ -// edition:2018 +//@ edition:2018 // This test checks that we emit the correct borrowck error when `Self` or a projection is used as // a return type. See #61949 for context. diff --git a/tests/ui/impl-trait/fresh-lifetime-from-bare-trait-obj-114664.rs b/tests/ui/impl-trait/fresh-lifetime-from-bare-trait-obj-114664.rs index e1aba8eda1b..41c5b9f5074 100644 --- a/tests/ui/impl-trait/fresh-lifetime-from-bare-trait-obj-114664.rs +++ b/tests/ui/impl-trait/fresh-lifetime-from-bare-trait-obj-114664.rs @@ -1,5 +1,5 @@ -// edition:2015 -// check-pass +//@ edition:2015 +//@ check-pass // issue: 114664 fn ice() -> impl AsRef { diff --git a/tests/ui/impl-trait/generic-with-implicit-hrtb-without-dyn.rs b/tests/ui/impl-trait/generic-with-implicit-hrtb-without-dyn.rs index 55d69069afb..582386aa759 100644 --- a/tests/ui/impl-trait/generic-with-implicit-hrtb-without-dyn.rs +++ b/tests/ui/impl-trait/generic-with-implicit-hrtb-without-dyn.rs @@ -1,5 +1,5 @@ -// revisions: edition2015 edition2021 -//[edition2021]edition:2021 +//@ revisions: edition2015 edition2021 +//@[edition2021]edition:2021 #![allow(warnings)] diff --git a/tests/ui/impl-trait/hidden-type-is-opaque.rs b/tests/ui/impl-trait/hidden-type-is-opaque.rs index 72b4028d854..3111a21e209 100644 --- a/tests/ui/impl-trait/hidden-type-is-opaque.rs +++ b/tests/ui/impl-trait/hidden-type-is-opaque.rs @@ -1,4 +1,4 @@ -// check-pass +//@ check-pass #![feature(type_alias_impl_trait)] fn reify_as() -> Thunk { diff --git a/tests/ui/impl-trait/impl-subtyper.rs b/tests/ui/impl-trait/impl-subtyper.rs index 2d99cdd4f50..cd322fea661 100644 --- a/tests/ui/impl-trait/impl-subtyper.rs +++ b/tests/ui/impl-trait/impl-subtyper.rs @@ -1,4 +1,4 @@ -// check-pass +//@ check-pass #![crate_type = "lib"] fn checkpoints() -> impl Iterator { diff --git a/tests/ui/impl-trait/impl-subtyper2.rs b/tests/ui/impl-trait/impl-subtyper2.rs index 2e0acbae68b..6bac99231b8 100644 --- a/tests/ui/impl-trait/impl-subtyper2.rs +++ b/tests/ui/impl-trait/impl-subtyper2.rs @@ -1,4 +1,4 @@ -// check-pass +//@ check-pass fn ages() -> Option { None::> diff --git a/tests/ui/impl-trait/impl-trait-plus-priority.rs b/tests/ui/impl-trait/impl-trait-plus-priority.rs index dfac9c0f1ef..5441a015ac0 100644 --- a/tests/ui/impl-trait/impl-trait-plus-priority.rs +++ b/tests/ui/impl-trait/impl-trait-plus-priority.rs @@ -1,4 +1,4 @@ -// compile-flags: -Z parse-only +//@ compile-flags: -Z parse-only fn f() -> impl A + {} // OK fn f() -> impl A + B {} // OK diff --git a/tests/ui/impl-trait/impl_fn_associativity.rs b/tests/ui/impl-trait/impl_fn_associativity.rs index 71a8f9c7796..ad37a968057 100644 --- a/tests/ui/impl-trait/impl_fn_associativity.rs +++ b/tests/ui/impl-trait/impl_fn_associativity.rs @@ -1,4 +1,4 @@ -// run-pass +//@ run-pass #![feature(impl_trait_in_fn_trait_return)] use std::fmt::Debug; diff --git a/tests/ui/impl-trait/implicit-capture-late.rs b/tests/ui/impl-trait/implicit-capture-late.rs index 8bfb16760c9..986620b101b 100644 --- a/tests/ui/impl-trait/implicit-capture-late.rs +++ b/tests/ui/impl-trait/implicit-capture-late.rs @@ -1,4 +1,4 @@ -// known-bug: #117647 +//@ known-bug: #117647 #![feature(lifetime_capture_rules_2024)] #![feature(rustc_attrs)] diff --git a/tests/ui/impl-trait/in-ctfe/array-len-size-of.rs b/tests/ui/impl-trait/in-ctfe/array-len-size-of.rs index 01ba902ef0c..f309ea51683 100644 --- a/tests/ui/impl-trait/in-ctfe/array-len-size-of.rs +++ b/tests/ui/impl-trait/in-ctfe/array-len-size-of.rs @@ -1,5 +1,5 @@ //! Check that const eval can use the size of opaque types. -// check-pass +//@ check-pass use std::mem; fn returns_opaque() -> impl Sized { 0u8 diff --git a/tests/ui/impl-trait/in-ctfe/array-len.rs b/tests/ui/impl-trait/in-ctfe/array-len.rs index 73ae20495d5..bbc0a94d727 100644 --- a/tests/ui/impl-trait/in-ctfe/array-len.rs +++ b/tests/ui/impl-trait/in-ctfe/array-len.rs @@ -1,5 +1,5 @@ //! Check that array lengths can observe associated types of opaque types -// check-pass +//@ check-pass trait MyTrait: Copy { const ASSOC: usize; } diff --git a/tests/ui/impl-trait/in-ctfe/enum-discr.rs b/tests/ui/impl-trait/in-ctfe/enum-discr.rs index 8e4384adaa4..c0a4472f416 100644 --- a/tests/ui/impl-trait/in-ctfe/enum-discr.rs +++ b/tests/ui/impl-trait/in-ctfe/enum-discr.rs @@ -1,5 +1,5 @@ //! check that const eval can observe associated types of opaque types. -// check-pass +//@ check-pass trait MyTrait: Copy { const ASSOC: usize; } diff --git a/tests/ui/impl-trait/in-ctfe/fully_monomorphic_const_eval.rs b/tests/ui/impl-trait/in-ctfe/fully_monomorphic_const_eval.rs index 82a9a30a623..17233f7efc2 100644 --- a/tests/ui/impl-trait/in-ctfe/fully_monomorphic_const_eval.rs +++ b/tests/ui/impl-trait/in-ctfe/fully_monomorphic_const_eval.rs @@ -2,7 +2,7 @@ //! opaque types during const eval in order to obtain the exact type //! of associated types. -// check-pass +//@ check-pass trait MyTrait: Copy { const ASSOC: usize; diff --git a/tests/ui/impl-trait/in-ctfe/match-arm-exhaustive.rs b/tests/ui/impl-trait/in-ctfe/match-arm-exhaustive.rs index 8e3269726fc..925abe997e1 100644 --- a/tests/ui/impl-trait/in-ctfe/match-arm-exhaustive.rs +++ b/tests/ui/impl-trait/in-ctfe/match-arm-exhaustive.rs @@ -1,5 +1,5 @@ //! Check that pattern matching can observe the hidden type of opaque types. -// check-pass +//@ check-pass trait MyTrait: Copy { const ASSOC: u8; } diff --git a/tests/ui/impl-trait/in-trait/alias-bounds-when-not-wf.rs b/tests/ui/impl-trait/in-trait/alias-bounds-when-not-wf.rs index 229a918cdd2..365955166e6 100644 --- a/tests/ui/impl-trait/in-trait/alias-bounds-when-not-wf.rs +++ b/tests/ui/impl-trait/in-trait/alias-bounds-when-not-wf.rs @@ -1,4 +1,4 @@ -// compile-flags: -Znext-solver +//@ compile-flags: -Znext-solver #![feature(lazy_type_alias)] //~^ WARN the feature `lazy_type_alias` is incomplete diff --git a/tests/ui/impl-trait/in-trait/anonymize-binders-for-refine.rs b/tests/ui/impl-trait/in-trait/anonymize-binders-for-refine.rs index 09fbef2ec07..a3c4beeb469 100644 --- a/tests/ui/impl-trait/in-trait/anonymize-binders-for-refine.rs +++ b/tests/ui/impl-trait/in-trait/anonymize-binders-for-refine.rs @@ -1,5 +1,5 @@ -// compile-flags: --crate-type=lib -// check-pass +//@ compile-flags: --crate-type=lib +//@ check-pass #![deny(refining_impl_trait)] diff --git a/tests/ui/impl-trait/in-trait/assumed-wf-bounds-in-impl.rs b/tests/ui/impl-trait/in-trait/assumed-wf-bounds-in-impl.rs index afb9992de49..869d44d9e3b 100644 --- a/tests/ui/impl-trait/in-trait/assumed-wf-bounds-in-impl.rs +++ b/tests/ui/impl-trait/in-trait/assumed-wf-bounds-in-impl.rs @@ -1,5 +1,5 @@ -// check-pass -// edition: 2021 +//@ check-pass +//@ edition: 2021 // issue: 113796 diff --git a/tests/ui/impl-trait/in-trait/async-and-ret-ref.rs b/tests/ui/impl-trait/in-trait/async-and-ret-ref.rs index af6ffe83394..e991b74a0f8 100644 --- a/tests/ui/impl-trait/in-trait/async-and-ret-ref.rs +++ b/tests/ui/impl-trait/in-trait/async-and-ret-ref.rs @@ -1,4 +1,4 @@ -// edition:2021 +//@ edition:2021 // https://github.com/rust-lang/rust/issues/117547 trait T {} diff --git a/tests/ui/impl-trait/in-trait/box-coerce-span-in-default.rs b/tests/ui/impl-trait/in-trait/box-coerce-span-in-default.rs index 87eb7beb1ee..a82727bff96 100644 --- a/tests/ui/impl-trait/in-trait/box-coerce-span-in-default.rs +++ b/tests/ui/impl-trait/in-trait/box-coerce-span-in-default.rs @@ -1,4 +1,4 @@ -// check-pass +//@ check-pass struct TestA {} diff --git a/tests/ui/impl-trait/in-trait/deep-match-works.rs b/tests/ui/impl-trait/in-trait/deep-match-works.rs index 8c992743862..3978b909ed5 100644 --- a/tests/ui/impl-trait/in-trait/deep-match-works.rs +++ b/tests/ui/impl-trait/in-trait/deep-match-works.rs @@ -1,4 +1,4 @@ -// check-pass +//@ check-pass #![feature(lint_reasons)] #![allow(incomplete_features)] diff --git a/tests/ui/impl-trait/in-trait/default-body-type-err-2.rs b/tests/ui/impl-trait/in-trait/default-body-type-err-2.rs index 29bcbe16d83..9cfac895430 100644 --- a/tests/ui/impl-trait/in-trait/default-body-type-err-2.rs +++ b/tests/ui/impl-trait/in-trait/default-body-type-err-2.rs @@ -1,4 +1,4 @@ -// edition:2021 +//@ edition:2021 #![allow(incomplete_features)] diff --git a/tests/ui/impl-trait/in-trait/default-body-with-rpit.rs b/tests/ui/impl-trait/in-trait/default-body-with-rpit.rs index 1d1f555080c..508826e2f77 100644 --- a/tests/ui/impl-trait/in-trait/default-body-with-rpit.rs +++ b/tests/ui/impl-trait/in-trait/default-body-with-rpit.rs @@ -1,5 +1,5 @@ -// edition:2021 -// check-pass +//@ edition:2021 +//@ check-pass #![allow(incomplete_features)] diff --git a/tests/ui/impl-trait/in-trait/default-body.rs b/tests/ui/impl-trait/in-trait/default-body.rs index ff70f1e232d..631ee2b0843 100644 --- a/tests/ui/impl-trait/in-trait/default-body.rs +++ b/tests/ui/impl-trait/in-trait/default-body.rs @@ -1,5 +1,5 @@ -// check-pass -// edition:2021 +//@ check-pass +//@ edition:2021 #![allow(incomplete_features)] diff --git a/tests/ui/impl-trait/in-trait/default-method-binder-shifting.rs b/tests/ui/impl-trait/in-trait/default-method-binder-shifting.rs index ca41eb8bc71..282064dae2a 100644 --- a/tests/ui/impl-trait/in-trait/default-method-binder-shifting.rs +++ b/tests/ui/impl-trait/in-trait/default-method-binder-shifting.rs @@ -1,4 +1,4 @@ -// check-pass +//@ check-pass trait Trait { diff --git a/tests/ui/impl-trait/in-trait/default-method-constraint.rs b/tests/ui/impl-trait/in-trait/default-method-constraint.rs index 8ab2e2797f1..0615e5b3a15 100644 --- a/tests/ui/impl-trait/in-trait/default-method-constraint.rs +++ b/tests/ui/impl-trait/in-trait/default-method-constraint.rs @@ -1,4 +1,4 @@ -// check-pass +//@ check-pass // This didn't work in the previous default RPITIT method hack attempt diff --git a/tests/ui/impl-trait/in-trait/early.rs b/tests/ui/impl-trait/in-trait/early.rs index c4996674dd1..21d629b3ca7 100644 --- a/tests/ui/impl-trait/in-trait/early.rs +++ b/tests/ui/impl-trait/in-trait/early.rs @@ -1,5 +1,5 @@ -// check-pass -// edition:2021 +//@ check-pass +//@ edition:2021 #![allow(incomplete_features)] diff --git a/tests/ui/impl-trait/in-trait/encode.rs b/tests/ui/impl-trait/in-trait/encode.rs index 4df26b0f297..8c6a0fdb813 100644 --- a/tests/ui/impl-trait/in-trait/encode.rs +++ b/tests/ui/impl-trait/in-trait/encode.rs @@ -1,5 +1,5 @@ -// build-pass -// compile-flags: --crate-type=lib +//@ build-pass +//@ compile-flags: --crate-type=lib #![allow(incomplete_features)] diff --git a/tests/ui/impl-trait/in-trait/foreign-dyn-error.rs b/tests/ui/impl-trait/in-trait/foreign-dyn-error.rs index ecb5e62c433..600dba03b74 100644 --- a/tests/ui/impl-trait/in-trait/foreign-dyn-error.rs +++ b/tests/ui/impl-trait/in-trait/foreign-dyn-error.rs @@ -1,4 +1,4 @@ -// aux-build: rpitit.rs +//@ aux-build: rpitit.rs extern crate rpitit; diff --git a/tests/ui/impl-trait/in-trait/foreign.rs b/tests/ui/impl-trait/in-trait/foreign.rs index 6285d7786d5..e28bc9e00cb 100644 --- a/tests/ui/impl-trait/in-trait/foreign.rs +++ b/tests/ui/impl-trait/in-trait/foreign.rs @@ -1,5 +1,5 @@ -// check-pass -// aux-build: rpitit.rs +//@ check-pass +//@ aux-build: rpitit.rs #![feature(lint_reasons)] diff --git a/tests/ui/impl-trait/in-trait/gat-outlives.rs b/tests/ui/impl-trait/in-trait/gat-outlives.rs index 83dd6cfce53..eb9cac228bd 100644 --- a/tests/ui/impl-trait/in-trait/gat-outlives.rs +++ b/tests/ui/impl-trait/in-trait/gat-outlives.rs @@ -1,4 +1,4 @@ -// edition: 2021 +//@ edition: 2021 use std::future::Future; diff --git a/tests/ui/impl-trait/in-trait/issue-102301.rs b/tests/ui/impl-trait/in-trait/issue-102301.rs index 600a21b07be..2e2a38a29b2 100644 --- a/tests/ui/impl-trait/in-trait/issue-102301.rs +++ b/tests/ui/impl-trait/in-trait/issue-102301.rs @@ -1,4 +1,4 @@ -// check-pass +//@ check-pass #![allow(incomplete_features)] diff --git a/tests/ui/impl-trait/in-trait/lifetime-in-associated-trait-bound.rs b/tests/ui/impl-trait/in-trait/lifetime-in-associated-trait-bound.rs index 4073ef8ac19..e0d4f461974 100644 --- a/tests/ui/impl-trait/in-trait/lifetime-in-associated-trait-bound.rs +++ b/tests/ui/impl-trait/in-trait/lifetime-in-associated-trait-bound.rs @@ -1,4 +1,4 @@ -// check-pass +//@ check-pass #![feature(associated_type_bounds)] diff --git a/tests/ui/impl-trait/in-trait/method-signature-matches.rs b/tests/ui/impl-trait/in-trait/method-signature-matches.rs index 99ace66facb..e6ab932e18e 100644 --- a/tests/ui/impl-trait/in-trait/method-signature-matches.rs +++ b/tests/ui/impl-trait/in-trait/method-signature-matches.rs @@ -1,5 +1,5 @@ -// edition: 2021 -// revisions: mismatch mismatch_async too_many too_few lt +//@ edition: 2021 +//@ revisions: mismatch mismatch_async too_many too_few lt #![allow(incomplete_features)] diff --git a/tests/ui/impl-trait/in-trait/nested-rpitit-bounds.rs b/tests/ui/impl-trait/in-trait/nested-rpitit-bounds.rs index b97fd7d1ffe..3a173efb32d 100644 --- a/tests/ui/impl-trait/in-trait/nested-rpitit-bounds.rs +++ b/tests/ui/impl-trait/in-trait/nested-rpitit-bounds.rs @@ -1,4 +1,4 @@ -// check-pass +//@ check-pass use std::ops::Deref; diff --git a/tests/ui/impl-trait/in-trait/nested-rpitit.rs b/tests/ui/impl-trait/in-trait/nested-rpitit.rs index 58b79c99155..b19f378cdc1 100644 --- a/tests/ui/impl-trait/in-trait/nested-rpitit.rs +++ b/tests/ui/impl-trait/in-trait/nested-rpitit.rs @@ -1,4 +1,4 @@ -// check-pass +//@ check-pass #![feature(lint_reasons)] #![allow(incomplete_features)] diff --git a/tests/ui/impl-trait/in-trait/object-safety-sized.rs b/tests/ui/impl-trait/in-trait/object-safety-sized.rs index 1a23493a94d..2bd8ea646a1 100644 --- a/tests/ui/impl-trait/in-trait/object-safety-sized.rs +++ b/tests/ui/impl-trait/in-trait/object-safety-sized.rs @@ -1,6 +1,6 @@ -// check-pass -// revisions: current next -//[next] compile-flags: -Znext-solver +//@ check-pass +//@ revisions: current next +//@[next] compile-flags: -Znext-solver fn main() { diff --git a/tests/ui/impl-trait/in-trait/opaque-in-impl.rs b/tests/ui/impl-trait/in-trait/opaque-in-impl.rs index 3edd588a1b3..b0279168fde 100644 --- a/tests/ui/impl-trait/in-trait/opaque-in-impl.rs +++ b/tests/ui/impl-trait/in-trait/opaque-in-impl.rs @@ -1,4 +1,4 @@ -// check-pass +//@ check-pass #![allow(incomplete_features)] diff --git a/tests/ui/impl-trait/in-trait/opaque-variances.rs b/tests/ui/impl-trait/in-trait/opaque-variances.rs index 63e56051d1a..f0feea21f84 100644 --- a/tests/ui/impl-trait/in-trait/opaque-variances.rs +++ b/tests/ui/impl-trait/in-trait/opaque-variances.rs @@ -1,5 +1,5 @@ -// check-pass -// compile-flags: -Znext-solver +//@ check-pass +//@ compile-flags: -Znext-solver fn foo<'a: 'a>(x: &'a Vec) -> impl Sized { () diff --git a/tests/ui/impl-trait/in-trait/outlives-in-nested-rpit.rs b/tests/ui/impl-trait/in-trait/outlives-in-nested-rpit.rs index 317ff7fe853..7fbdf2e9b16 100644 --- a/tests/ui/impl-trait/in-trait/outlives-in-nested-rpit.rs +++ b/tests/ui/impl-trait/in-trait/outlives-in-nested-rpit.rs @@ -1,4 +1,4 @@ -// check-pass +//@ check-pass trait Foo { diff --git a/tests/ui/impl-trait/in-trait/placeholder-implied-bounds.rs b/tests/ui/impl-trait/in-trait/placeholder-implied-bounds.rs index 33d3487030e..f7546a05bfd 100644 --- a/tests/ui/impl-trait/in-trait/placeholder-implied-bounds.rs +++ b/tests/ui/impl-trait/in-trait/placeholder-implied-bounds.rs @@ -1,4 +1,4 @@ -// check-pass +//@ check-pass pub fn main() {} diff --git a/tests/ui/impl-trait/in-trait/reveal.rs b/tests/ui/impl-trait/in-trait/reveal.rs index cc78ce8fea2..a63e7c457d4 100644 --- a/tests/ui/impl-trait/in-trait/reveal.rs +++ b/tests/ui/impl-trait/in-trait/reveal.rs @@ -1,4 +1,4 @@ -// check-pass +//@ check-pass #![feature(lint_reasons)] #![allow(incomplete_features)] diff --git a/tests/ui/impl-trait/in-trait/signature-mismatch.rs b/tests/ui/impl-trait/in-trait/signature-mismatch.rs index d85ee5fc704..7a74281b1f2 100644 --- a/tests/ui/impl-trait/in-trait/signature-mismatch.rs +++ b/tests/ui/impl-trait/in-trait/signature-mismatch.rs @@ -1,6 +1,6 @@ -// edition:2021 -// revisions: success failure -//[success] check-pass +//@ edition:2021 +//@ revisions: success failure +//@[success] check-pass #![feature(lint_reasons)] diff --git a/tests/ui/impl-trait/in-trait/specialization-substs-remap.rs b/tests/ui/impl-trait/in-trait/specialization-substs-remap.rs index 05386632758..3ef6735de80 100644 --- a/tests/ui/impl-trait/in-trait/specialization-substs-remap.rs +++ b/tests/ui/impl-trait/in-trait/specialization-substs-remap.rs @@ -1,4 +1,4 @@ -// check-pass +//@ check-pass #![feature(specialization)] #![feature(lint_reasons)] diff --git a/tests/ui/impl-trait/in-trait/success.rs b/tests/ui/impl-trait/in-trait/success.rs index eb2349feb29..750804f7920 100644 --- a/tests/ui/impl-trait/in-trait/success.rs +++ b/tests/ui/impl-trait/in-trait/success.rs @@ -1,4 +1,4 @@ -// check-pass +//@ check-pass #![feature(lint_reasons)] #![allow(incomplete_features)] diff --git a/tests/ui/impl-trait/in-trait/suggest-missing-item.fixed b/tests/ui/impl-trait/in-trait/suggest-missing-item.fixed index ecc8488a152..6764ab002a9 100644 --- a/tests/ui/impl-trait/in-trait/suggest-missing-item.fixed +++ b/tests/ui/impl-trait/in-trait/suggest-missing-item.fixed @@ -1,5 +1,5 @@ -// edition:2021 -// run-rustfix +//@ edition:2021 +//@ run-rustfix #![allow(dead_code)] trait Trait { diff --git a/tests/ui/impl-trait/in-trait/suggest-missing-item.rs b/tests/ui/impl-trait/in-trait/suggest-missing-item.rs index 860fea07df9..99a8bfe79fd 100644 --- a/tests/ui/impl-trait/in-trait/suggest-missing-item.rs +++ b/tests/ui/impl-trait/in-trait/suggest-missing-item.rs @@ -1,5 +1,5 @@ -// edition:2021 -// run-rustfix +//@ edition:2021 +//@ run-rustfix #![allow(dead_code)] trait Trait { diff --git a/tests/ui/impl-trait/in-trait/variances-of-gat.rs b/tests/ui/impl-trait/in-trait/variances-of-gat.rs index aabb6f830ed..39a647580ef 100644 --- a/tests/ui/impl-trait/in-trait/variances-of-gat.rs +++ b/tests/ui/impl-trait/in-trait/variances-of-gat.rs @@ -1,4 +1,4 @@ -// check-pass +//@ check-pass trait Foo {} diff --git a/tests/ui/impl-trait/in-trait/where-clause.rs b/tests/ui/impl-trait/in-trait/where-clause.rs index f7f4980b730..e502f67c2b7 100644 --- a/tests/ui/impl-trait/in-trait/where-clause.rs +++ b/tests/ui/impl-trait/in-trait/where-clause.rs @@ -1,5 +1,5 @@ -// check-pass -// edition: 2021 +//@ check-pass +//@ edition: 2021 #![allow(incomplete_features)] diff --git a/tests/ui/impl-trait/issue-100187.rs b/tests/ui/impl-trait/issue-100187.rs index fc541c69629..ed693c824ad 100644 --- a/tests/ui/impl-trait/issue-100187.rs +++ b/tests/ui/impl-trait/issue-100187.rs @@ -1,4 +1,4 @@ -// check-pass +//@ check-pass trait Trait { type Ty; diff --git a/tests/ui/impl-trait/issue-102605.rs b/tests/ui/impl-trait/issue-102605.rs index 3bbdf35af8f..c04dbf47599 100644 --- a/tests/ui/impl-trait/issue-102605.rs +++ b/tests/ui/impl-trait/issue-102605.rs @@ -1,4 +1,4 @@ -// edition:2021 +//@ edition:2021 async fn foo() -> Result<(), String> { Ok(()) diff --git a/tests/ui/impl-trait/issue-103181-1.rs b/tests/ui/impl-trait/issue-103181-1.rs index 14c813cf00f..75333af58ec 100644 --- a/tests/ui/impl-trait/issue-103181-1.rs +++ b/tests/ui/impl-trait/issue-103181-1.rs @@ -1,6 +1,6 @@ -// revisions: current next -//[next] compile-flags: -Znext-solver -// edition:2021 +//@ revisions: current next +//@[next] compile-flags: -Znext-solver +//@ edition:2021 mod hyper { use std::{fmt::Debug, future::Future, marker::PhantomData, pin::Pin, task::Poll}; diff --git a/tests/ui/impl-trait/issue-103181-2.rs b/tests/ui/impl-trait/issue-103181-2.rs index b43ac45075e..72729e851e3 100644 --- a/tests/ui/impl-trait/issue-103181-2.rs +++ b/tests/ui/impl-trait/issue-103181-2.rs @@ -1,4 +1,4 @@ -// edition:2021 +//@ edition:2021 trait SendFuture: Send { type Output; diff --git a/tests/ui/impl-trait/issue-103599.rs b/tests/ui/impl-trait/issue-103599.rs index 043ae67f2e1..62741a7454c 100644 --- a/tests/ui/impl-trait/issue-103599.rs +++ b/tests/ui/impl-trait/issue-103599.rs @@ -1,4 +1,4 @@ -// check-pass +//@ check-pass trait T {} diff --git a/tests/ui/impl-trait/issue-108591.rs b/tests/ui/impl-trait/issue-108591.rs index 91ea2e9fb85..caf08024568 100644 --- a/tests/ui/impl-trait/issue-108591.rs +++ b/tests/ui/impl-trait/issue-108591.rs @@ -1,4 +1,4 @@ -// check-pass +//@ check-pass #![feature(type_alias_impl_trait)] diff --git a/tests/ui/impl-trait/issue-108592.rs b/tests/ui/impl-trait/issue-108592.rs index 953fffc4898..624bb79006e 100644 --- a/tests/ui/impl-trait/issue-108592.rs +++ b/tests/ui/impl-trait/issue-108592.rs @@ -1,4 +1,4 @@ -// check-pass +//@ check-pass #![feature(type_alias_impl_trait)] fn opaque<'a: 'a>() -> impl Sized {} diff --git a/tests/ui/impl-trait/issue-36792.rs b/tests/ui/impl-trait/issue-36792.rs index 99ae633dd0e..6682a953fa0 100644 --- a/tests/ui/impl-trait/issue-36792.rs +++ b/tests/ui/impl-trait/issue-36792.rs @@ -1,4 +1,4 @@ -// run-pass +//@ run-pass fn foo() -> impl Copy { foo } diff --git a/tests/ui/impl-trait/issue-46959.rs b/tests/ui/impl-trait/issue-46959.rs index 3611a956836..0acb293384c 100644 --- a/tests/ui/impl-trait/issue-46959.rs +++ b/tests/ui/impl-trait/issue-46959.rs @@ -1,4 +1,4 @@ -// check-pass +//@ check-pass #![deny(non_camel_case_types)] #[allow(dead_code)] diff --git a/tests/ui/impl-trait/issue-49556.rs b/tests/ui/impl-trait/issue-49556.rs index c8c172f0e2f..82275bf12b4 100644 --- a/tests/ui/impl-trait/issue-49556.rs +++ b/tests/ui/impl-trait/issue-49556.rs @@ -1,4 +1,4 @@ -// check-pass +//@ check-pass fn iter<'a>(data: &'a [usize]) -> impl Iterator + 'a { data.iter() .map( diff --git a/tests/ui/impl-trait/issue-49579.rs b/tests/ui/impl-trait/issue-49579.rs index 98de014e90b..4b2f186e38a 100644 --- a/tests/ui/impl-trait/issue-49579.rs +++ b/tests/ui/impl-trait/issue-49579.rs @@ -1,4 +1,4 @@ -// check-pass +//@ check-pass fn fibs(n: u32) -> impl Iterator { (0 .. n) diff --git a/tests/ui/impl-trait/issue-49685.rs b/tests/ui/impl-trait/issue-49685.rs index fb328d67b75..82556cc242c 100644 --- a/tests/ui/impl-trait/issue-49685.rs +++ b/tests/ui/impl-trait/issue-49685.rs @@ -1,4 +1,4 @@ -// run-pass +//@ run-pass // Regression test for #49685: drop elaboration was not revealing the // value of `impl Trait` returns, leading to an ICE. diff --git a/tests/ui/impl-trait/issue-51185.rs b/tests/ui/impl-trait/issue-51185.rs index 52a2b25539d..ddba905835f 100644 --- a/tests/ui/impl-trait/issue-51185.rs +++ b/tests/ui/impl-trait/issue-51185.rs @@ -1,4 +1,4 @@ -// run-pass +//@ run-pass fn foo() -> impl Into fn(&'a ())> { (|_| {}) as for<'a> fn(&'a ()) } diff --git a/tests/ui/impl-trait/issue-55872-2.rs b/tests/ui/impl-trait/issue-55872-2.rs index 8a96fdc5c63..caca5c69a4a 100644 --- a/tests/ui/impl-trait/issue-55872-2.rs +++ b/tests/ui/impl-trait/issue-55872-2.rs @@ -1,4 +1,4 @@ -// edition:2018 +//@ edition:2018 #![feature(impl_trait_in_assoc_type)] diff --git a/tests/ui/impl-trait/issue-55872-3.rs b/tests/ui/impl-trait/issue-55872-3.rs index 7490a130800..3f931027d9a 100644 --- a/tests/ui/impl-trait/issue-55872-3.rs +++ b/tests/ui/impl-trait/issue-55872-3.rs @@ -1,4 +1,4 @@ -// edition:2018 +//@ edition:2018 #![feature(impl_trait_in_assoc_type)] diff --git a/tests/ui/impl-trait/issue-56445.rs b/tests/ui/impl-trait/issue-56445.rs index 6dd1648c9b8..af6182d546b 100644 --- a/tests/ui/impl-trait/issue-56445.rs +++ b/tests/ui/impl-trait/issue-56445.rs @@ -1,5 +1,5 @@ // Regression test for https://github.com/rust-lang/rust/issues/56445#issuecomment-629426939 -// check-pass +//@ check-pass #![crate_type = "lib"] diff --git a/tests/ui/impl-trait/issue-68532.rs b/tests/ui/impl-trait/issue-68532.rs index 01a7af0aee4..ce653ee058f 100644 --- a/tests/ui/impl-trait/issue-68532.rs +++ b/tests/ui/impl-trait/issue-68532.rs @@ -1,4 +1,4 @@ -// check-pass +//@ check-pass pub struct A<'a>(&'a ()); diff --git a/tests/ui/impl-trait/issue-99642-2.rs b/tests/ui/impl-trait/issue-99642-2.rs index 0e88b363338..acbf3e3e2a0 100644 --- a/tests/ui/impl-trait/issue-99642-2.rs +++ b/tests/ui/impl-trait/issue-99642-2.rs @@ -1,4 +1,4 @@ -// check-pass +//@ check-pass #![feature(type_alias_impl_trait)] type Opq = impl Sized; diff --git a/tests/ui/impl-trait/issue-99642.rs b/tests/ui/impl-trait/issue-99642.rs index 75af60491e4..ed4786ae8d8 100644 --- a/tests/ui/impl-trait/issue-99642.rs +++ b/tests/ui/impl-trait/issue-99642.rs @@ -1,4 +1,4 @@ -// check-pass +//@ check-pass fn test() -> impl Iterator { Box::new(0..) as Box> diff --git a/tests/ui/impl-trait/issue-99914.rs b/tests/ui/impl-trait/issue-99914.rs index 4324a0229a6..a7858740f09 100644 --- a/tests/ui/impl-trait/issue-99914.rs +++ b/tests/ui/impl-trait/issue-99914.rs @@ -1,4 +1,4 @@ -// edition:2021 +//@ edition:2021 fn main() {} diff --git a/tests/ui/impl-trait/issues/issue-104815.rs b/tests/ui/impl-trait/issues/issue-104815.rs index 7a9826a8dff..088d7815f70 100644 --- a/tests/ui/impl-trait/issues/issue-104815.rs +++ b/tests/ui/impl-trait/issues/issue-104815.rs @@ -1,4 +1,4 @@ -// check-pass +//@ check-pass struct It; diff --git a/tests/ui/impl-trait/issues/issue-105826.rs b/tests/ui/impl-trait/issues/issue-105826.rs index 06dc2d4c8d3..e3488140dcc 100644 --- a/tests/ui/impl-trait/issues/issue-105826.rs +++ b/tests/ui/impl-trait/issues/issue-105826.rs @@ -1,4 +1,4 @@ -// check-pass +//@ check-pass use std::io::Write; diff --git a/tests/ui/impl-trait/issues/issue-42479.rs b/tests/ui/impl-trait/issues/issue-42479.rs index efc1f975d16..348f75b2fb6 100644 --- a/tests/ui/impl-trait/issues/issue-42479.rs +++ b/tests/ui/impl-trait/issues/issue-42479.rs @@ -1,4 +1,4 @@ -// check-pass +//@ check-pass use std::iter::once; diff --git a/tests/ui/impl-trait/issues/issue-49376.rs b/tests/ui/impl-trait/issues/issue-49376.rs index e4472fcc160..faf039fc352 100644 --- a/tests/ui/impl-trait/issues/issue-49376.rs +++ b/tests/ui/impl-trait/issues/issue-49376.rs @@ -1,4 +1,4 @@ -// check-pass +//@ check-pass // Tests for nested self-reference which caused a stack overflow. diff --git a/tests/ui/impl-trait/issues/issue-52128.rs b/tests/ui/impl-trait/issues/issue-52128.rs index 5afd380dd4f..2504308bb46 100644 --- a/tests/ui/impl-trait/issues/issue-52128.rs +++ b/tests/ui/impl-trait/issues/issue-52128.rs @@ -1,4 +1,4 @@ -// check-pass +//@ check-pass #![deny(warnings)] diff --git a/tests/ui/impl-trait/issues/issue-53457.rs b/tests/ui/impl-trait/issues/issue-53457.rs index 7b9c2c53aad..bb248ef7177 100644 --- a/tests/ui/impl-trait/issues/issue-53457.rs +++ b/tests/ui/impl-trait/issues/issue-53457.rs @@ -1,4 +1,4 @@ -// check-pass +//@ check-pass #![feature(type_alias_impl_trait)] type X = impl Clone; diff --git a/tests/ui/impl-trait/issues/issue-55608-captures-empty-region.rs b/tests/ui/impl-trait/issues/issue-55608-captures-empty-region.rs index 0c34c97e258..c8ac477632c 100644 --- a/tests/ui/impl-trait/issues/issue-55608-captures-empty-region.rs +++ b/tests/ui/impl-trait/issues/issue-55608-captures-empty-region.rs @@ -1,7 +1,7 @@ // This used to ICE because it creates an `impl Trait` that captures a // hidden empty region. -// check-pass +//@ check-pass fn server() -> impl FilterBase2 { segment2(|| { loop { } }).map2(|| "") diff --git a/tests/ui/impl-trait/issues/issue-57464-unexpected-regions.rs b/tests/ui/impl-trait/issues/issue-57464-unexpected-regions.rs index c4f738a34b6..3567e2368e2 100644 --- a/tests/ui/impl-trait/issues/issue-57464-unexpected-regions.rs +++ b/tests/ui/impl-trait/issues/issue-57464-unexpected-regions.rs @@ -5,7 +5,7 @@ // opaque type. As all regions are now required to outlive the bound in an // opaque type we avoid the issue here. -// check-pass +//@ check-pass struct A(F); diff --git a/tests/ui/impl-trait/issues/issue-65581.rs b/tests/ui/impl-trait/issues/issue-65581.rs index af65b79d3e8..4a9b7f74dd6 100644 --- a/tests/ui/impl-trait/issues/issue-65581.rs +++ b/tests/ui/impl-trait/issues/issue-65581.rs @@ -1,4 +1,4 @@ -// check-pass +//@ check-pass #![allow(dead_code)] diff --git a/tests/ui/impl-trait/issues/issue-77987.rs b/tests/ui/impl-trait/issues/issue-77987.rs index d29710b6f54..b77f993effc 100644 --- a/tests/ui/impl-trait/issues/issue-77987.rs +++ b/tests/ui/impl-trait/issues/issue-77987.rs @@ -1,6 +1,6 @@ #![feature(type_alias_impl_trait)] -// check-pass +//@ check-pass trait Foo {} impl Foo for U {} diff --git a/tests/ui/impl-trait/issues/issue-78722-2.rs b/tests/ui/impl-trait/issues/issue-78722-2.rs index cf5361e1e60..26181b612ed 100644 --- a/tests/ui/impl-trait/issues/issue-78722-2.rs +++ b/tests/ui/impl-trait/issues/issue-78722-2.rs @@ -1,6 +1,6 @@ //! test that we cannot register hidden types for opaque types //! declared outside an anonymous constant. -// edition:2018 +//@ edition:2018 #![feature(type_alias_impl_trait)] diff --git a/tests/ui/impl-trait/issues/issue-78722.rs b/tests/ui/impl-trait/issues/issue-78722.rs index 75ccc8d8e8a..5518c2cf12a 100644 --- a/tests/ui/impl-trait/issues/issue-78722.rs +++ b/tests/ui/impl-trait/issues/issue-78722.rs @@ -1,4 +1,4 @@ -// edition:2018 +//@ edition:2018 #![feature(type_alias_impl_trait)] diff --git a/tests/ui/impl-trait/issues/issue-83919.rs b/tests/ui/impl-trait/issues/issue-83919.rs index 4e699e7f302..705c2c4dc5e 100644 --- a/tests/ui/impl-trait/issues/issue-83919.rs +++ b/tests/ui/impl-trait/issues/issue-83919.rs @@ -1,6 +1,6 @@ #![feature(impl_trait_in_assoc_type)] -// edition:2021 +//@ edition:2021 use std::future::Future; diff --git a/tests/ui/impl-trait/issues/issue-86201.rs b/tests/ui/impl-trait/issues/issue-86201.rs index 0786e66ca8b..cde0b861160 100644 --- a/tests/ui/impl-trait/issues/issue-86201.rs +++ b/tests/ui/impl-trait/issues/issue-86201.rs @@ -1,7 +1,7 @@ #![feature(unboxed_closures)] #![feature(type_alias_impl_trait)] -// check-pass +//@ check-pass type FunType = impl Fn<()>; static STATIC_FN: FunType = some_fn; diff --git a/tests/ui/impl-trait/issues/issue-86800.rs b/tests/ui/impl-trait/issues/issue-86800.rs index 297b012d90a..ae6e198c2ad 100644 --- a/tests/ui/impl-trait/issues/issue-86800.rs +++ b/tests/ui/impl-trait/issues/issue-86800.rs @@ -1,12 +1,12 @@ #![feature(type_alias_impl_trait)] -// edition:2021 -// compile-flags:-Z treat-err-as-bug=2 -// error-pattern: due to `-Z treat-err-as-bug=2 -// failure-status:101 -// normalize-stderr-test ".*note: .*\n\n" -> "" -// normalize-stderr-test "thread 'rustc' panicked.*:\n.*\n" -> "" -// rustc-env:RUST_BACKTRACE=0 +//@ edition:2021 +//@ compile-flags:-Z treat-err-as-bug=2 +//@ error-pattern: due to `-Z treat-err-as-bug=2 +//@ failure-status:101 +//@ normalize-stderr-test ".*note: .*\n\n" -> "" +//@ normalize-stderr-test "thread 'rustc' panicked.*:\n.*\n" -> "" +//@ rustc-env:RUST_BACKTRACE=0 use std::future::Future; diff --git a/tests/ui/impl-trait/issues/issue-89312.rs b/tests/ui/impl-trait/issues/issue-89312.rs index d685a6f1201..4304e3bc1b4 100644 --- a/tests/ui/impl-trait/issues/issue-89312.rs +++ b/tests/ui/impl-trait/issues/issue-89312.rs @@ -1,6 +1,6 @@ #![feature(type_alias_impl_trait)] -// check-pass +//@ check-pass trait T { type Item; } diff --git a/tests/ui/impl-trait/issues/issue-92305.rs b/tests/ui/impl-trait/issues/issue-92305.rs index 4a89238d07e..5ecb6984cfe 100644 --- a/tests/ui/impl-trait/issues/issue-92305.rs +++ b/tests/ui/impl-trait/issues/issue-92305.rs @@ -1,4 +1,4 @@ -// edition:2021 +//@ edition:2021 use std::iter; diff --git a/tests/ui/impl-trait/issues/issue-93788.rs b/tests/ui/impl-trait/issues/issue-93788.rs index 6924931cda5..6576af0ef53 100644 --- a/tests/ui/impl-trait/issues/issue-93788.rs +++ b/tests/ui/impl-trait/issues/issue-93788.rs @@ -1,4 +1,4 @@ -// check-pass +//@ check-pass struct D; diff --git a/tests/ui/impl-trait/lifetime-ambiguity-regression.rs b/tests/ui/impl-trait/lifetime-ambiguity-regression.rs index ce6ae3786e1..6c3310a883d 100644 --- a/tests/ui/impl-trait/lifetime-ambiguity-regression.rs +++ b/tests/ui/impl-trait/lifetime-ambiguity-regression.rs @@ -4,7 +4,7 @@ //! picking either is fine, but then we'll fail an identity check of the hidden //! type and the expected hidden type. -// check-pass +//@ check-pass fn test<'a: 'b, 'b: 'a>() -> impl IntoIterator)> { None::<(_, (_, _))> diff --git a/tests/ui/impl-trait/lifetimes.rs b/tests/ui/impl-trait/lifetimes.rs index f853117a9c6..93a4801fa40 100644 --- a/tests/ui/impl-trait/lifetimes.rs +++ b/tests/ui/impl-trait/lifetimes.rs @@ -1,4 +1,4 @@ -// run-pass +//@ run-pass #![allow(warnings)] #![feature(coroutines)] diff --git a/tests/ui/impl-trait/lifetimes2.rs b/tests/ui/impl-trait/lifetimes2.rs index 834f2dc6cb5..facf2f75bc4 100644 --- a/tests/ui/impl-trait/lifetimes2.rs +++ b/tests/ui/impl-trait/lifetimes2.rs @@ -1,4 +1,4 @@ -// check-pass +//@ check-pass pub fn keys<'a>(x: &'a Result) -> impl std::fmt::Debug + 'a { match x { diff --git a/tests/ui/impl-trait/mapping-duplicated-lifetimes-issue-114597.rs b/tests/ui/impl-trait/mapping-duplicated-lifetimes-issue-114597.rs index a2dd0a9308d..d208f828694 100644 --- a/tests/ui/impl-trait/mapping-duplicated-lifetimes-issue-114597.rs +++ b/tests/ui/impl-trait/mapping-duplicated-lifetimes-issue-114597.rs @@ -1,6 +1,6 @@ -// check-pass +//@ check-pass // issue: 114597 -// edition: 2021 +//@ edition: 2021 struct A<'a> { dat: &'a (), diff --git a/tests/ui/impl-trait/multiple-lifetimes/inverse-bounds.rs b/tests/ui/impl-trait/multiple-lifetimes/inverse-bounds.rs index 5251eeee8bb..c43bf53634d 100644 --- a/tests/ui/impl-trait/multiple-lifetimes/inverse-bounds.rs +++ b/tests/ui/impl-trait/multiple-lifetimes/inverse-bounds.rs @@ -1,5 +1,5 @@ -// edition:2018 -// check-pass +//@ edition:2018 +//@ check-pass trait Trait<'a, 'b> {} impl Trait<'_, '_> for T {} diff --git a/tests/ui/impl-trait/multiple-lifetimes/multiple-lifetimes.rs b/tests/ui/impl-trait/multiple-lifetimes/multiple-lifetimes.rs index 5407fb6dd28..1e949dee16f 100644 --- a/tests/ui/impl-trait/multiple-lifetimes/multiple-lifetimes.rs +++ b/tests/ui/impl-trait/multiple-lifetimes/multiple-lifetimes.rs @@ -1,5 +1,5 @@ // Test that multiple lifetimes are allowed in impl trait types. -// build-pass (FIXME(62277): could be check-pass?) +//@ build-pass (FIXME(62277): could be check-pass?) trait X<'x>: Sized {} diff --git a/tests/ui/impl-trait/multiple-lifetimes/ordinary-bounds-pick-original-elided.rs b/tests/ui/impl-trait/multiple-lifetimes/ordinary-bounds-pick-original-elided.rs index 0bddce49b40..fd4679b3932 100644 --- a/tests/ui/impl-trait/multiple-lifetimes/ordinary-bounds-pick-original-elided.rs +++ b/tests/ui/impl-trait/multiple-lifetimes/ordinary-bounds-pick-original-elided.rs @@ -1,5 +1,5 @@ -// edition:2018 -// build-pass (FIXME(62277): could be check-pass? +//@ edition:2018 +//@ build-pass (FIXME(62277): could be check-pass? trait Trait<'a, 'b> {} impl Trait<'_, '_> for T {} diff --git a/tests/ui/impl-trait/multiple-lifetimes/ordinary-bounds-pick-original-type-alias-impl-trait.rs b/tests/ui/impl-trait/multiple-lifetimes/ordinary-bounds-pick-original-type-alias-impl-trait.rs index e363fdb36e3..6f90160866b 100644 --- a/tests/ui/impl-trait/multiple-lifetimes/ordinary-bounds-pick-original-type-alias-impl-trait.rs +++ b/tests/ui/impl-trait/multiple-lifetimes/ordinary-bounds-pick-original-type-alias-impl-trait.rs @@ -1,5 +1,5 @@ -// edition:2018 -// check-pass +//@ edition:2018 +//@ check-pass #![feature(type_alias_impl_trait)] trait Trait<'a, 'b> {} diff --git a/tests/ui/impl-trait/multiple-lifetimes/ordinary-bounds-pick-original.rs b/tests/ui/impl-trait/multiple-lifetimes/ordinary-bounds-pick-original.rs index 0f21dd5ffe5..04d7723747c 100644 --- a/tests/ui/impl-trait/multiple-lifetimes/ordinary-bounds-pick-original.rs +++ b/tests/ui/impl-trait/multiple-lifetimes/ordinary-bounds-pick-original.rs @@ -1,5 +1,5 @@ -// edition:2018 -// build-pass (FIXME(62277): could be check-pass?) +//@ edition:2018 +//@ build-pass (FIXME(62277): could be check-pass?) trait Trait<'a, 'b> {} impl Trait<'_, '_> for T {} diff --git a/tests/ui/impl-trait/multiple-lifetimes/ordinary-bounds-pick-other.rs b/tests/ui/impl-trait/multiple-lifetimes/ordinary-bounds-pick-other.rs index 13ad1f7215f..8acbc3130b9 100644 --- a/tests/ui/impl-trait/multiple-lifetimes/ordinary-bounds-pick-other.rs +++ b/tests/ui/impl-trait/multiple-lifetimes/ordinary-bounds-pick-other.rs @@ -1,5 +1,5 @@ -// edition:2018 -// build-pass (FIXME(62277): could be check-pass?) +//@ edition:2018 +//@ build-pass (FIXME(62277): could be check-pass?) trait Trait<'a, 'b> {} impl Trait<'_, '_> for T {} diff --git a/tests/ui/impl-trait/multiple-lifetimes/ordinary-bounds-unrelated.rs b/tests/ui/impl-trait/multiple-lifetimes/ordinary-bounds-unrelated.rs index c6eea5323fd..0f85eec7574 100644 --- a/tests/ui/impl-trait/multiple-lifetimes/ordinary-bounds-unrelated.rs +++ b/tests/ui/impl-trait/multiple-lifetimes/ordinary-bounds-unrelated.rs @@ -1,4 +1,4 @@ -// edition:2018 +//@ edition:2018 trait Trait<'a, 'b> {} impl Trait<'_, '_> for T {} diff --git a/tests/ui/impl-trait/multiple-lifetimes/ordinary-bounds-unsuited.rs b/tests/ui/impl-trait/multiple-lifetimes/ordinary-bounds-unsuited.rs index adcbca2a438..ef1b31f1d58 100644 --- a/tests/ui/impl-trait/multiple-lifetimes/ordinary-bounds-unsuited.rs +++ b/tests/ui/impl-trait/multiple-lifetimes/ordinary-bounds-unsuited.rs @@ -1,4 +1,4 @@ -// edition:2018 +//@ edition:2018 trait Trait<'a, 'b> {} impl Trait<'_, '_> for T {} diff --git a/tests/ui/impl-trait/needs_least_region_or_bound.rs b/tests/ui/impl-trait/needs_least_region_or_bound.rs index c4bcfe5b281..d2342ec1abd 100644 --- a/tests/ui/impl-trait/needs_least_region_or_bound.rs +++ b/tests/ui/impl-trait/needs_least_region_or_bound.rs @@ -1,4 +1,4 @@ -// check-pass +//@ check-pass trait MultiRegionTrait<'a, 'b> {} impl<'a, 'b> MultiRegionTrait<'a, 'b> for (&'a u32, &'b u32) {} diff --git a/tests/ui/impl-trait/nested-return-type.rs b/tests/ui/impl-trait/nested-return-type.rs index 7d7a084b890..86ce2a06cc0 100644 --- a/tests/ui/impl-trait/nested-return-type.rs +++ b/tests/ui/impl-trait/nested-return-type.rs @@ -1,5 +1,5 @@ // Check that nested impl Trait items work in functions with generic parameters. -// check-pass +//@ check-pass trait Captures<'a> {} diff --git a/tests/ui/impl-trait/nested-return-type2-tait.rs b/tests/ui/impl-trait/nested-return-type2-tait.rs index 089018a1cdf..7cb98cfe060 100644 --- a/tests/ui/impl-trait/nested-return-type2-tait.rs +++ b/tests/ui/impl-trait/nested-return-type2-tait.rs @@ -1,6 +1,6 @@ #![feature(type_alias_impl_trait)] -// check-pass +//@ check-pass trait Duh {} diff --git a/tests/ui/impl-trait/nested-return-type2-tait2.rs b/tests/ui/impl-trait/nested-return-type2-tait2.rs index b7fee1d91d1..574602079d4 100644 --- a/tests/ui/impl-trait/nested-return-type2-tait2.rs +++ b/tests/ui/impl-trait/nested-return-type2-tait2.rs @@ -1,4 +1,4 @@ -// check-pass +//@ check-pass #![feature(type_alias_impl_trait)] diff --git a/tests/ui/impl-trait/nested-return-type2-tait3.rs b/tests/ui/impl-trait/nested-return-type2-tait3.rs index eed5c271f88..e3429731782 100644 --- a/tests/ui/impl-trait/nested-return-type2-tait3.rs +++ b/tests/ui/impl-trait/nested-return-type2-tait3.rs @@ -1,4 +1,4 @@ -// check-pass +//@ check-pass #![feature(type_alias_impl_trait)] diff --git a/tests/ui/impl-trait/nested-return-type2.rs b/tests/ui/impl-trait/nested-return-type2.rs index e1d5511379e..f43ac23b5ed 100644 --- a/tests/ui/impl-trait/nested-return-type2.rs +++ b/tests/ui/impl-trait/nested-return-type2.rs @@ -1,5 +1,5 @@ -// check-pass -// compile-flags: -Zvalidate-mir +//@ check-pass +//@ compile-flags: -Zvalidate-mir // Using -Zvalidate-mir as a regression test for #107346. diff --git a/tests/ui/impl-trait/nested-return-type3-tait.rs b/tests/ui/impl-trait/nested-return-type3-tait.rs index 3a97e35b4c4..05759fb2697 100644 --- a/tests/ui/impl-trait/nested-return-type3-tait.rs +++ b/tests/ui/impl-trait/nested-return-type3-tait.rs @@ -1,4 +1,4 @@ -// check-pass +//@ check-pass #![feature(type_alias_impl_trait)] diff --git a/tests/ui/impl-trait/nested-return-type3-tait2.rs b/tests/ui/impl-trait/nested-return-type3-tait2.rs index 5b6f78a9896..927fa8d596b 100644 --- a/tests/ui/impl-trait/nested-return-type3-tait2.rs +++ b/tests/ui/impl-trait/nested-return-type3-tait2.rs @@ -1,4 +1,4 @@ -// check-pass +//@ check-pass #![feature(type_alias_impl_trait)] diff --git a/tests/ui/impl-trait/nested-return-type3-tait3.rs b/tests/ui/impl-trait/nested-return-type3-tait3.rs index 394d8f58110..5b3b2d2e198 100644 --- a/tests/ui/impl-trait/nested-return-type3-tait3.rs +++ b/tests/ui/impl-trait/nested-return-type3-tait3.rs @@ -1,4 +1,4 @@ -// check-pass +//@ check-pass #![feature(type_alias_impl_trait)] diff --git a/tests/ui/impl-trait/nested-return-type3.rs b/tests/ui/impl-trait/nested-return-type3.rs index 74b4dae22eb..a5b15dfc9e5 100644 --- a/tests/ui/impl-trait/nested-return-type3.rs +++ b/tests/ui/impl-trait/nested-return-type3.rs @@ -1,4 +1,4 @@ -// check-pass +//@ check-pass trait Duh {} diff --git a/tests/ui/impl-trait/nested-return-type4.rs b/tests/ui/impl-trait/nested-return-type4.rs index cec70bb1a0d..ab21166d94e 100644 --- a/tests/ui/impl-trait/nested-return-type4.rs +++ b/tests/ui/impl-trait/nested-return-type4.rs @@ -1,4 +1,4 @@ -// edition: 2021 +//@ edition: 2021 fn test<'s: 's>(s: &'s str) -> impl std::future::Future { async move { let _s = s; } diff --git a/tests/ui/impl-trait/nested-rpit-with-anonymous-lifetimes.rs b/tests/ui/impl-trait/nested-rpit-with-anonymous-lifetimes.rs index 287a030cf87..5bc0c0d4b7a 100644 --- a/tests/ui/impl-trait/nested-rpit-with-anonymous-lifetimes.rs +++ b/tests/ui/impl-trait/nested-rpit-with-anonymous-lifetimes.rs @@ -1,4 +1,4 @@ -// check-pass +//@ check-pass pub struct VecNumber<'s> { pub vec_number: Vec>, diff --git a/tests/ui/impl-trait/nesting.rs b/tests/ui/impl-trait/nesting.rs index 27bdd5fa483..27f572e8b1d 100644 --- a/tests/ui/impl-trait/nesting.rs +++ b/tests/ui/impl-trait/nesting.rs @@ -1,4 +1,4 @@ -// run-pass +//@ run-pass #![allow(dead_code)] fn foo(t: T) -> impl Into<[T; { const FOO: usize = 1; FOO }]> { diff --git a/tests/ui/impl-trait/no-method-suggested-traits.rs b/tests/ui/impl-trait/no-method-suggested-traits.rs index c8abc2d8f8e..6fc96f27a67 100644 --- a/tests/ui/impl-trait/no-method-suggested-traits.rs +++ b/tests/ui/impl-trait/no-method-suggested-traits.rs @@ -1,4 +1,4 @@ -// aux-build:no_method_suggested_traits.rs +//@ aux-build:no_method_suggested_traits.rs extern crate no_method_suggested_traits; struct Foo; diff --git a/tests/ui/impl-trait/normalize-opaque-with-bound-vars.rs b/tests/ui/impl-trait/normalize-opaque-with-bound-vars.rs index 1025c2c7e8a..4fa4402db05 100644 --- a/tests/ui/impl-trait/normalize-opaque-with-bound-vars.rs +++ b/tests/ui/impl-trait/normalize-opaque-with-bound-vars.rs @@ -1,6 +1,6 @@ -// build-pass -// edition:2021 -// compile-flags: -Cdebuginfo=2 +//@ build-pass +//@ edition:2021 +//@ compile-flags: -Cdebuginfo=2 // We were not normalizing opaques with escaping bound vars during codegen, // leading to later linker errors because of differences in mangled symbol name. diff --git a/tests/ui/impl-trait/normalize-tait-in-const.rs b/tests/ui/impl-trait/normalize-tait-in-const.rs index dd03fd3f754..ccd073b8070 100644 --- a/tests/ui/impl-trait/normalize-tait-in-const.rs +++ b/tests/ui/impl-trait/normalize-tait-in-const.rs @@ -1,4 +1,4 @@ -// known-bug: #103507 +//@ known-bug: #103507 #![feature(type_alias_impl_trait)] #![feature(const_trait_impl)] diff --git a/tests/ui/impl-trait/not_general_enough_regression_106630.rs b/tests/ui/impl-trait/not_general_enough_regression_106630.rs index 439973950f3..2a9719cfb5a 100644 --- a/tests/ui/impl-trait/not_general_enough_regression_106630.rs +++ b/tests/ui/impl-trait/not_general_enough_regression_106630.rs @@ -1,5 +1,5 @@ -// edition:2018 -// run-pass +//@ edition:2018 +//@ run-pass use std::future::Future; diff --git a/tests/ui/impl-trait/opaque-cast-field-access-in-future.rs b/tests/ui/impl-trait/opaque-cast-field-access-in-future.rs index 3e3bc09a62a..c1a4d2df284 100644 --- a/tests/ui/impl-trait/opaque-cast-field-access-in-future.rs +++ b/tests/ui/impl-trait/opaque-cast-field-access-in-future.rs @@ -1,4 +1,4 @@ -// edition: 2021 +//@ edition: 2021 use std::future::Future; diff --git a/tests/ui/impl-trait/private_unused.rs b/tests/ui/impl-trait/private_unused.rs index 92268f1861d..fa0926ee8bf 100644 --- a/tests/ui/impl-trait/private_unused.rs +++ b/tests/ui/impl-trait/private_unused.rs @@ -1,4 +1,4 @@ -// build-pass (FIXME(62277): could be check-pass?) +//@ build-pass (FIXME(62277): could be check-pass?) #[deny(warnings)] diff --git a/tests/ui/impl-trait/projection.rs b/tests/ui/impl-trait/projection.rs index b33802e2bc8..d966ef335d5 100644 --- a/tests/ui/impl-trait/projection.rs +++ b/tests/ui/impl-trait/projection.rs @@ -1,4 +1,4 @@ -// build-pass +//@ build-pass // needs to be build-pass, because it is a regression test for a mir validation failure // that only happens during codegen. diff --git a/tests/ui/impl-trait/question_mark.rs b/tests/ui/impl-trait/question_mark.rs index 7bd5cff31bb..d7c326b9e1c 100644 --- a/tests/ui/impl-trait/question_mark.rs +++ b/tests/ui/impl-trait/question_mark.rs @@ -1,4 +1,4 @@ -// check-pass +//@ check-pass use std::fmt::Debug; diff --git a/tests/ui/impl-trait/recursive-auto-trait.rs b/tests/ui/impl-trait/recursive-auto-trait.rs index d7b68144ff6..3f759837cbf 100644 --- a/tests/ui/impl-trait/recursive-auto-trait.rs +++ b/tests/ui/impl-trait/recursive-auto-trait.rs @@ -1,4 +1,4 @@ -// check-pass +//@ check-pass fn is_send(_: T) {} fn foo() -> impl Send { if false { diff --git a/tests/ui/impl-trait/recursive-coroutine-boxed.rs b/tests/ui/impl-trait/recursive-coroutine-boxed.rs index 3f677986c13..a42ae68f28e 100644 --- a/tests/ui/impl-trait/recursive-coroutine-boxed.rs +++ b/tests/ui/impl-trait/recursive-coroutine-boxed.rs @@ -1,6 +1,6 @@ -// revisions: current next -//[current] check-pass -//[next] compile-flags: -Znext-solver +//@ revisions: current next +//@[current] check-pass +//@[next] compile-flags: -Znext-solver #![feature(coroutines, coroutine_trait)] use std::ops::{Coroutine, CoroutineState}; diff --git a/tests/ui/impl-trait/recursive-coroutine-indirect.rs b/tests/ui/impl-trait/recursive-coroutine-indirect.rs index 99b6be3358f..31d22970e04 100644 --- a/tests/ui/impl-trait/recursive-coroutine-indirect.rs +++ b/tests/ui/impl-trait/recursive-coroutine-indirect.rs @@ -1,7 +1,7 @@ -// revisions: current next -//[next] compile-flags: -Znext-solver +//@ revisions: current next +//@[next] compile-flags: -Znext-solver -//[next] build-fail +//@[next] build-fail // Deeply normalizing writeback results of opaques makes this into a post-mono error :( #![feature(coroutines)] diff --git a/tests/ui/impl-trait/recursive-impl-trait-type-direct.rs b/tests/ui/impl-trait/recursive-impl-trait-type-direct.rs index 540a280f0a3..1d82f89d7a1 100644 --- a/tests/ui/impl-trait/recursive-impl-trait-type-direct.rs +++ b/tests/ui/impl-trait/recursive-impl-trait-type-direct.rs @@ -1,4 +1,4 @@ -// check-pass +//@ check-pass #![allow(unconditional_recursion)] diff --git a/tests/ui/impl-trait/recursive-type-alias-impl-trait-declaration-too-subtle-2.rs b/tests/ui/impl-trait/recursive-type-alias-impl-trait-declaration-too-subtle-2.rs index 01c933473ea..b369544782c 100644 --- a/tests/ui/impl-trait/recursive-type-alias-impl-trait-declaration-too-subtle-2.rs +++ b/tests/ui/impl-trait/recursive-type-alias-impl-trait-declaration-too-subtle-2.rs @@ -1,6 +1,6 @@ #![feature(type_alias_impl_trait)] -// check-pass +//@ check-pass type Foo = impl PartialEq<(Foo, i32)>; diff --git a/tests/ui/impl-trait/region-escape-via-bound-contravariant-closure.rs b/tests/ui/impl-trait/region-escape-via-bound-contravariant-closure.rs index 9f63a8617ba..0b31adac366 100644 --- a/tests/ui/impl-trait/region-escape-via-bound-contravariant-closure.rs +++ b/tests/ui/impl-trait/region-escape-via-bound-contravariant-closure.rs @@ -5,7 +5,7 @@ // // See https://github.com/rust-lang/rust/issues/46541 for more details. -// run-pass +//@ run-pass #![allow(dead_code)] diff --git a/tests/ui/impl-trait/region-escape-via-bound-contravariant.rs b/tests/ui/impl-trait/region-escape-via-bound-contravariant.rs index 79319dfe796..0518e1c6946 100644 --- a/tests/ui/impl-trait/region-escape-via-bound-contravariant.rs +++ b/tests/ui/impl-trait/region-escape-via-bound-contravariant.rs @@ -5,7 +5,7 @@ // // See https://github.com/rust-lang/rust/issues/46541 for more details. -// run-pass +//@ run-pass #![allow(dead_code)] diff --git a/tests/ui/impl-trait/return-position-impl-trait-minimal.rs b/tests/ui/impl-trait/return-position-impl-trait-minimal.rs index 6d3c0692970..b287cacd405 100644 --- a/tests/ui/impl-trait/return-position-impl-trait-minimal.rs +++ b/tests/ui/impl-trait/return-position-impl-trait-minimal.rs @@ -1,4 +1,4 @@ -// build-pass (FIXME(62277): could be check-pass?) +//@ build-pass (FIXME(62277): could be check-pass?) fn main() {} diff --git a/tests/ui/impl-trait/reveal-during-codegen.rs b/tests/ui/impl-trait/reveal-during-codegen.rs index 7b2ca9c33f6..996f0bb8bbf 100644 --- a/tests/ui/impl-trait/reveal-during-codegen.rs +++ b/tests/ui/impl-trait/reveal-during-codegen.rs @@ -1,6 +1,6 @@ -// build-pass -// revisions: current next -//[next] compile-flags: -Znext-solver +//@ build-pass +//@ revisions: current next +//@[next] compile-flags: -Znext-solver fn test() -> Option { Some("") diff --git a/tests/ui/impl-trait/rpit-assoc-pair-with-lifetime.rs b/tests/ui/impl-trait/rpit-assoc-pair-with-lifetime.rs index a4e603de1ac..73c8a6c0aed 100644 --- a/tests/ui/impl-trait/rpit-assoc-pair-with-lifetime.rs +++ b/tests/ui/impl-trait/rpit-assoc-pair-with-lifetime.rs @@ -1,4 +1,4 @@ -// check-pass +//@ check-pass pub fn iter<'a>(v: Vec<(u32, &'a u32)>) -> impl DoubleEndedIterator { v.into_iter() diff --git a/tests/ui/impl-trait/rpit/equal-lifetime-params-ok.rs b/tests/ui/impl-trait/rpit/equal-lifetime-params-ok.rs index 6207381c745..00583a06c4c 100644 --- a/tests/ui/impl-trait/rpit/equal-lifetime-params-ok.rs +++ b/tests/ui/impl-trait/rpit/equal-lifetime-params-ok.rs @@ -1,4 +1,4 @@ -// check-pass +//@ check-pass // related to #113916, check that using RPITs in functions with lifetime params // which are constrained to be equal compiles. diff --git a/tests/ui/impl-trait/static-lifetime-return-position-impl-trait.rs b/tests/ui/impl-trait/static-lifetime-return-position-impl-trait.rs index 91a0e0d4829..b6395258c89 100644 --- a/tests/ui/impl-trait/static-lifetime-return-position-impl-trait.rs +++ b/tests/ui/impl-trait/static-lifetime-return-position-impl-trait.rs @@ -1,4 +1,4 @@ -// check-pass +//@ check-pass #![allow(incomplete_features)] #![feature(adt_const_params)] diff --git a/tests/ui/impl-trait/trait_resolution.rs b/tests/ui/impl-trait/trait_resolution.rs index 8dcbbfd6e64..ee9853b4788 100644 --- a/tests/ui/impl-trait/trait_resolution.rs +++ b/tests/ui/impl-trait/trait_resolution.rs @@ -1,4 +1,4 @@ -// check-pass +//@ check-pass use std::fmt::Debug; diff --git a/tests/ui/impl-trait/transmute/outside-of-defining-scope.rs b/tests/ui/impl-trait/transmute/outside-of-defining-scope.rs index 7bc22ea416f..0458e4520bf 100644 --- a/tests/ui/impl-trait/transmute/outside-of-defining-scope.rs +++ b/tests/ui/impl-trait/transmute/outside-of-defining-scope.rs @@ -1,5 +1,5 @@ //! Check that typeck can observe the size of an opaque type. -// check-pass +//@ check-pass use std::mem::transmute; fn foo() -> impl Sized { 0u8 diff --git a/tests/ui/impl-trait/two_tait_defining_each_other.rs b/tests/ui/impl-trait/two_tait_defining_each_other.rs index 6a9e33500e5..0c3376b413f 100644 --- a/tests/ui/impl-trait/two_tait_defining_each_other.rs +++ b/tests/ui/impl-trait/two_tait_defining_each_other.rs @@ -1,6 +1,6 @@ -// revisions: current next -//[next] compile-flags: -Znext-solver -//[next] check-pass +//@ revisions: current next +//@[next] compile-flags: -Znext-solver +//@[next] check-pass #![feature(type_alias_impl_trait)] diff --git a/tests/ui/impl-trait/two_tait_defining_each_other2.rs b/tests/ui/impl-trait/two_tait_defining_each_other2.rs index b2f768f4dcd..229a7411951 100644 --- a/tests/ui/impl-trait/two_tait_defining_each_other2.rs +++ b/tests/ui/impl-trait/two_tait_defining_each_other2.rs @@ -1,5 +1,5 @@ -// revisions: current next -//[next] compile-flags: -Znext-solver +//@ revisions: current next +//@[next] compile-flags: -Znext-solver #![feature(type_alias_impl_trait)] type A = impl Foo; //[current]~ ERROR unconstrained opaque type diff --git a/tests/ui/impl-trait/two_tait_defining_each_other3.rs b/tests/ui/impl-trait/two_tait_defining_each_other3.rs index 55def937f48..a596860e176 100644 --- a/tests/ui/impl-trait/two_tait_defining_each_other3.rs +++ b/tests/ui/impl-trait/two_tait_defining_each_other3.rs @@ -1,6 +1,6 @@ -// revisions: current next -//[next] compile-flags: -Znext-solver -//[next] check-pass +//@ revisions: current next +//@[next] compile-flags: -Znext-solver +//@[next] check-pass #![feature(type_alias_impl_trait)] type A = impl Foo; diff --git a/tests/ui/impl-trait/type-alias-generic-param.rs b/tests/ui/impl-trait/type-alias-generic-param.rs index e4b2e412420..c418351b129 100644 --- a/tests/ui/impl-trait/type-alias-generic-param.rs +++ b/tests/ui/impl-trait/type-alias-generic-param.rs @@ -2,7 +2,7 @@ // Checks that we properly detect defining uses of opaque // types in 'item' position when generic parameters are involved // -// run-pass +//@ run-pass #![feature(impl_trait_in_assoc_type)] trait Meow { //~ WARN trait `Meow` is never used diff --git a/tests/ui/impl-trait/type-alias-impl-trait-in-fn-body.rs b/tests/ui/impl-trait/type-alias-impl-trait-in-fn-body.rs index 91be4efd56a..92699831580 100644 --- a/tests/ui/impl-trait/type-alias-impl-trait-in-fn-body.rs +++ b/tests/ui/impl-trait/type-alias-impl-trait-in-fn-body.rs @@ -1,4 +1,4 @@ -// build-pass (FIXME(62277): could be check-pass?) +//@ build-pass (FIXME(62277): could be check-pass?) #![feature(type_alias_impl_trait)] diff --git a/tests/ui/impl-trait/unactionable_diagnostic.fixed b/tests/ui/impl-trait/unactionable_diagnostic.fixed index d446512ffc2..e9ab9f2cf18 100644 --- a/tests/ui/impl-trait/unactionable_diagnostic.fixed +++ b/tests/ui/impl-trait/unactionable_diagnostic.fixed @@ -1,4 +1,4 @@ -// run-rustfix +//@ run-rustfix pub trait Trait {} diff --git a/tests/ui/impl-trait/unactionable_diagnostic.rs b/tests/ui/impl-trait/unactionable_diagnostic.rs index 76b9a62ca13..7e65650277a 100644 --- a/tests/ui/impl-trait/unactionable_diagnostic.rs +++ b/tests/ui/impl-trait/unactionable_diagnostic.rs @@ -1,4 +1,4 @@ -// run-rustfix +//@ run-rustfix pub trait Trait {} diff --git a/tests/ui/impl-trait/universal_hrtb_anon.rs b/tests/ui/impl-trait/universal_hrtb_anon.rs index 30c8d291f6a..2ac5dd7cfb2 100644 --- a/tests/ui/impl-trait/universal_hrtb_anon.rs +++ b/tests/ui/impl-trait/universal_hrtb_anon.rs @@ -1,4 +1,4 @@ -// run-pass +//@ run-pass fn hrtb(f: impl Fn(&u32) -> u32) -> u32 { f(&22) + f(&44) diff --git a/tests/ui/impl-trait/universal_hrtb_named.rs b/tests/ui/impl-trait/universal_hrtb_named.rs index 07ff5d23e0c..11088c206fb 100644 --- a/tests/ui/impl-trait/universal_hrtb_named.rs +++ b/tests/ui/impl-trait/universal_hrtb_named.rs @@ -1,4 +1,4 @@ -// run-pass +//@ run-pass fn hrtb(f: impl for<'a> Fn(&'a u32) -> &'a u32) -> u32 { f(&22) + f(&44) diff --git a/tests/ui/impl-trait/universal_in_adt_in_parameters.rs b/tests/ui/impl-trait/universal_in_adt_in_parameters.rs index a3829133dfa..751700e5331 100644 --- a/tests/ui/impl-trait/universal_in_adt_in_parameters.rs +++ b/tests/ui/impl-trait/universal_in_adt_in_parameters.rs @@ -1,4 +1,4 @@ -// run-pass +//@ run-pass use std::fmt::Display; diff --git a/tests/ui/impl-trait/universal_in_impl_trait_in_parameters.rs b/tests/ui/impl-trait/universal_in_impl_trait_in_parameters.rs index e98912d95a5..7cead0fb795 100644 --- a/tests/ui/impl-trait/universal_in_impl_trait_in_parameters.rs +++ b/tests/ui/impl-trait/universal_in_impl_trait_in_parameters.rs @@ -1,4 +1,4 @@ -// run-pass +//@ run-pass use std::fmt::Display; diff --git a/tests/ui/impl-trait/universal_in_trait_defn_parameters.rs b/tests/ui/impl-trait/universal_in_trait_defn_parameters.rs index 23c217a8f8b..0ab04ebc673 100644 --- a/tests/ui/impl-trait/universal_in_trait_defn_parameters.rs +++ b/tests/ui/impl-trait/universal_in_trait_defn_parameters.rs @@ -1,4 +1,4 @@ -// run-pass +//@ run-pass use std::fmt::Debug; diff --git a/tests/ui/impl-trait/universal_multiple_bounds.rs b/tests/ui/impl-trait/universal_multiple_bounds.rs index 40c1405c39b..006923653d0 100644 --- a/tests/ui/impl-trait/universal_multiple_bounds.rs +++ b/tests/ui/impl-trait/universal_multiple_bounds.rs @@ -1,4 +1,4 @@ -// run-pass +//@ run-pass use std::fmt::Display; diff --git a/tests/ui/impl-trait/unsafety-checking-cycle.rs b/tests/ui/impl-trait/unsafety-checking-cycle.rs index 4a5831c5b73..2306f079e5d 100644 --- a/tests/ui/impl-trait/unsafety-checking-cycle.rs +++ b/tests/ui/impl-trait/unsafety-checking-cycle.rs @@ -1,7 +1,7 @@ // Ensure that we don't get a cycle error from trying to determine whether an // opaque type implements `Freeze` in safety checking, when it doesn't matter. -// check-pass +//@ check-pass #![feature(rustc_attrs)] diff --git a/tests/ui/impl-trait/variance.rs b/tests/ui/impl-trait/variance.rs index 86da1908509..72b4a831bad 100644 --- a/tests/ui/impl-trait/variance.rs +++ b/tests/ui/impl-trait/variance.rs @@ -1,6 +1,6 @@ -// revisions: old new e2024 -//[e2024] edition: 2024 -//[e2024] compile-flags: -Z unstable-options +//@ revisions: old new e2024 +//@[e2024] edition: 2024 +//@[e2024] compile-flags: -Z unstable-options #![cfg_attr(new, feature(lifetime_capture_rules_2024))] diff --git a/tests/ui/impl-trait/wf-eval-order.rs b/tests/ui/impl-trait/wf-eval-order.rs index 8638fc2e775..695e910ef3e 100644 --- a/tests/ui/impl-trait/wf-eval-order.rs +++ b/tests/ui/impl-trait/wf-eval-order.rs @@ -1,6 +1,6 @@ // Check that we handle evaluating `wf` predicates correctly. -// check-pass +//@ check-pass struct X(T) where diff --git a/tests/ui/impl-trait/xcrate.rs b/tests/ui/impl-trait/xcrate.rs index fe106ff0557..62921fcb0c6 100644 --- a/tests/ui/impl-trait/xcrate.rs +++ b/tests/ui/impl-trait/xcrate.rs @@ -1,6 +1,6 @@ -// run-pass +//@ run-pass -// aux-build:xcrate.rs +//@ aux-build:xcrate.rs extern crate xcrate; diff --git a/tests/ui/impl-trait/xcrate_simple.rs b/tests/ui/impl-trait/xcrate_simple.rs index 2b1fc97e321..18ef20e78e0 100644 --- a/tests/ui/impl-trait/xcrate_simple.rs +++ b/tests/ui/impl-trait/xcrate_simple.rs @@ -1,6 +1,6 @@ -// run-pass +//@ run-pass -// aux-build:xcrate.rs +//@ aux-build:xcrate.rs extern crate xcrate; diff --git a/tests/ui/implied-bounds/bevy_world_query.rs b/tests/ui/implied-bounds/bevy_world_query.rs index 2e3d4e6a7c6..e36be26d003 100644 --- a/tests/ui/implied-bounds/bevy_world_query.rs +++ b/tests/ui/implied-bounds/bevy_world_query.rs @@ -1,4 +1,4 @@ -// check-pass +//@ check-pass // We currently special case bevy from erroring on incorrect implied bounds // from normalization (issue #109628). diff --git a/tests/ui/implied-bounds/gluon_salsa.rs b/tests/ui/implied-bounds/gluon_salsa.rs index cd5500cb458..368fb197909 100644 --- a/tests/ui/implied-bounds/gluon_salsa.rs +++ b/tests/ui/implied-bounds/gluon_salsa.rs @@ -1,4 +1,4 @@ -// check-pass +//@ check-pass // Found in a crater run on #118553 pub trait QueryBase { diff --git a/tests/ui/implied-bounds/hrlt-implied-trait-bounds-roundtrip.rs b/tests/ui/implied-bounds/hrlt-implied-trait-bounds-roundtrip.rs index 69847d6a8bb..0963053f578 100644 --- a/tests/ui/implied-bounds/hrlt-implied-trait-bounds-roundtrip.rs +++ b/tests/ui/implied-bounds/hrlt-implied-trait-bounds-roundtrip.rs @@ -1,4 +1,4 @@ -// check-pass +//@ check-pass struct Foo<'a>(&'a ()) where (): Trait<'a>; diff --git a/tests/ui/implied-bounds/ice-unbound-region-vars.rs b/tests/ui/implied-bounds/ice-unbound-region-vars.rs index 9e1e3feaeec..f69d4a4bf86 100644 --- a/tests/ui/implied-bounds/ice-unbound-region-vars.rs +++ b/tests/ui/implied-bounds/ice-unbound-region-vars.rs @@ -1,7 +1,7 @@ // Because of #109628, we can have unbounded region vars in implied bounds. // Make sure we don't ICE in this case! // -// check-pass +//@ check-pass pub trait MapAccess { type Error; diff --git a/tests/ui/implied-bounds/implied-bounds-entailment-wf-vars-issue-114783-1.rs b/tests/ui/implied-bounds/implied-bounds-entailment-wf-vars-issue-114783-1.rs index 9b793642d07..48d9e290ffb 100644 --- a/tests/ui/implied-bounds/implied-bounds-entailment-wf-vars-issue-114783-1.rs +++ b/tests/ui/implied-bounds/implied-bounds-entailment-wf-vars-issue-114783-1.rs @@ -1,4 +1,4 @@ -// check-pass +//@ check-pass pub trait Foo { type Error: Error; diff --git a/tests/ui/implied-bounds/implied-bounds-entailment-wf-vars-issue-114783-2.rs b/tests/ui/implied-bounds/implied-bounds-entailment-wf-vars-issue-114783-2.rs index 86b10a56c9d..739f2081132 100644 --- a/tests/ui/implied-bounds/implied-bounds-entailment-wf-vars-issue-114783-2.rs +++ b/tests/ui/implied-bounds/implied-bounds-entailment-wf-vars-issue-114783-2.rs @@ -1,4 +1,4 @@ -// check-pass +//@ check-pass trait AsBufferView { type Device; diff --git a/tests/ui/implied-bounds/implied-bounds-on-nested-references-plus-variance.rs b/tests/ui/implied-bounds/implied-bounds-on-nested-references-plus-variance.rs index 1f5562497c1..f3401f34eec 100644 --- a/tests/ui/implied-bounds/implied-bounds-on-nested-references-plus-variance.rs +++ b/tests/ui/implied-bounds/implied-bounds-on-nested-references-plus-variance.rs @@ -1,5 +1,5 @@ -// check-pass -// known-bug: #25860 +//@ check-pass +//@ known-bug: #25860 // Should fail. The combination of variance and implied bounds for nested // references allows us to infer a longer lifetime than we can prove. diff --git a/tests/ui/implied-bounds/implied-bounds-on-trait-hierarchy-2.rs b/tests/ui/implied-bounds/implied-bounds-on-trait-hierarchy-2.rs index 511a9ad9a2a..451ab44b113 100644 --- a/tests/ui/implied-bounds/implied-bounds-on-trait-hierarchy-2.rs +++ b/tests/ui/implied-bounds/implied-bounds-on-trait-hierarchy-2.rs @@ -1,5 +1,5 @@ -// check-pass -// known-bug: #84591 +//@ check-pass +//@ known-bug: #84591 trait Subtrait<'a, 'b, R>: Supertrait<'a, 'b> {} trait Supertrait<'a, 'b> { diff --git a/tests/ui/implied-bounds/implied-bounds-unconstrained-1.rs b/tests/ui/implied-bounds/implied-bounds-unconstrained-1.rs index 025e5176ff7..524f6fa9b3f 100644 --- a/tests/ui/implied-bounds/implied-bounds-unconstrained-1.rs +++ b/tests/ui/implied-bounds/implied-bounds-unconstrained-1.rs @@ -1,4 +1,4 @@ -// check-pass +//@ check-pass // Regression test for #112832. pub trait QueryDb { diff --git a/tests/ui/implied-bounds/implied-bounds-unconstrained-2.rs b/tests/ui/implied-bounds/implied-bounds-unconstrained-2.rs index 976054facee..125d31c5f9a 100644 --- a/tests/ui/implied-bounds/implied-bounds-unconstrained-2.rs +++ b/tests/ui/implied-bounds/implied-bounds-unconstrained-2.rs @@ -1,4 +1,4 @@ -// check-pass +//@ check-pass // Another minimized regression test for #112832. trait Trait { diff --git a/tests/ui/implied-bounds/implied_bounds_entailment_alias_var.rs b/tests/ui/implied-bounds/implied_bounds_entailment_alias_var.rs index e0df96b0de8..0ddb5497811 100644 --- a/tests/ui/implied-bounds/implied_bounds_entailment_alias_var.rs +++ b/tests/ui/implied-bounds/implied_bounds_entailment_alias_var.rs @@ -1,4 +1,4 @@ -// check-pass +//@ check-pass trait Data { type Elem; diff --git a/tests/ui/implied-bounds/implied_bounds_entailment_skip_non_outlives.rs b/tests/ui/implied-bounds/implied_bounds_entailment_skip_non_outlives.rs index 8dcc35a281a..0088bf0c325 100644 --- a/tests/ui/implied-bounds/implied_bounds_entailment_skip_non_outlives.rs +++ b/tests/ui/implied-bounds/implied_bounds_entailment_skip_non_outlives.rs @@ -1,4 +1,4 @@ -// check-pass +//@ check-pass // See issue #109356. We don't want a false positive to the `implied_bounds_entailment` lint. use std::borrow::Cow; diff --git a/tests/ui/implied-bounds/issue-101951.rs b/tests/ui/implied-bounds/issue-101951.rs index 108fef8a15f..cbcde9834fb 100644 --- a/tests/ui/implied-bounds/issue-101951.rs +++ b/tests/ui/implied-bounds/issue-101951.rs @@ -3,7 +3,7 @@ // This test detected that we didn't correctly resolve // inference variables when computing implied bounds. // -// check-pass +//@ check-pass pub trait BuilderFn<'a> { type Output; } diff --git a/tests/ui/implied-bounds/issue-110161.rs b/tests/ui/implied-bounds/issue-110161.rs index e52c8356b52..fecac9ec63a 100644 --- a/tests/ui/implied-bounds/issue-110161.rs +++ b/tests/ui/implied-bounds/issue-110161.rs @@ -1,7 +1,7 @@ // ICE regression relating to unconstrained lifetimes in implied // bounds. See #110161. -// compile-flags: --crate-type=lib +//@ compile-flags: --crate-type=lib trait LtTrait { type Ty; diff --git a/tests/ui/implied-bounds/normalization-nested.rs b/tests/ui/implied-bounds/normalization-nested.rs index 6ceb13e9473..4527e33a291 100644 --- a/tests/ui/implied-bounds/normalization-nested.rs +++ b/tests/ui/implied-bounds/normalization-nested.rs @@ -1,13 +1,13 @@ // Test for normalization of projections that appear in the item bounds // (versus those that appear directly in the input types). // -// revisions: param_ty lifetime param_ty_no_compat lifetime_no_compat +//@ revisions: param_ty lifetime param_ty_no_compat lifetime_no_compat -//[param_ty] check-pass -//[param_ty_no_compat] check-pass -//[lifetime_no_compat] check-pass -//[param_ty_no_compat] compile-flags: -Zno-implied-bounds-compat -//[lifetime_no_compat] compile-flags: -Zno-implied-bounds-compat +//@[param_ty] check-pass +//@[param_ty_no_compat] check-pass +//@[lifetime_no_compat] check-pass +//@[param_ty_no_compat] compile-flags: -Zno-implied-bounds-compat +//@[lifetime_no_compat] compile-flags: -Zno-implied-bounds-compat pub trait Iter { type Item; diff --git a/tests/ui/implied-bounds/normalization-placeholder-leak.rs b/tests/ui/implied-bounds/normalization-placeholder-leak.rs index 5350dcbb233..a9dfa69cfd6 100644 --- a/tests/ui/implied-bounds/normalization-placeholder-leak.rs +++ b/tests/ui/implied-bounds/normalization-placeholder-leak.rs @@ -2,9 +2,9 @@ // we incorrectly get `X: placeholder('x)`. // Make sure we ignore these bogus bounds and not use them for anything useful. // -// revisions: fail pass -// [fail] check-fail -// [pass] check-pass +//@ revisions: fail pass +//@ [fail] check-fail +//@ [pass] check-pass trait Trait { type Ty<'a> where Self: 'a; diff --git a/tests/ui/implied-bounds/normalization-preserve-equality.rs b/tests/ui/implied-bounds/normalization-preserve-equality.rs index 557c171e515..712c8ce945d 100644 --- a/tests/ui/implied-bounds/normalization-preserve-equality.rs +++ b/tests/ui/implied-bounds/normalization-preserve-equality.rs @@ -1,9 +1,9 @@ // Both revisions should pass. `borrowck` revision is a bug! // -// revisions: wfcheck borrowck -// [wfcheck] check-pass -// [borrowck] check-fail -// [borrowck] known-bug: #106569 +//@ revisions: wfcheck borrowck +//@ [wfcheck] check-pass +//@ [borrowck] check-fail +//@ [borrowck] known-bug: #106569 struct Equal<'a, 'b>(&'a &'b (), &'b &'a ()); // implies 'a == 'b diff --git a/tests/ui/implied-bounds/normalization.rs b/tests/ui/implied-bounds/normalization.rs index f776fc98a9e..656e18c7e5b 100644 --- a/tests/ui/implied-bounds/normalization.rs +++ b/tests/ui/implied-bounds/normalization.rs @@ -1,6 +1,6 @@ // Test that we get implied bounds from complex projections after normalization. -// check-pass +//@ check-pass // implementations wil ensure that // WF(>::Ty) implies T: 'a diff --git a/tests/ui/implied-bounds/trait-where-clause-implied.rs b/tests/ui/implied-bounds/trait-where-clause-implied.rs index 5f9ab66d3c8..c6596eff013 100644 --- a/tests/ui/implied-bounds/trait-where-clause-implied.rs +++ b/tests/ui/implied-bounds/trait-where-clause-implied.rs @@ -1,4 +1,4 @@ -// check-pass +//@ check-pass pub trait Trait<'a, 'b> { fn method(self, _: &'static &'static ()) diff --git a/tests/ui/imports/ambiguous-1.rs b/tests/ui/imports/ambiguous-1.rs index 2c9815864f0..d175444c0f2 100644 --- a/tests/ui/imports/ambiguous-1.rs +++ b/tests/ui/imports/ambiguous-1.rs @@ -1,4 +1,4 @@ -// check-pass +//@ check-pass // https://github.com/rust-lang/rust/pull/112743#issuecomment-1601986883 macro_rules! m { diff --git a/tests/ui/imports/ambiguous-10.rs b/tests/ui/imports/ambiguous-10.rs index 5078b734b47..7c14e3343eb 100644 --- a/tests/ui/imports/ambiguous-10.rs +++ b/tests/ui/imports/ambiguous-10.rs @@ -1,4 +1,4 @@ -// check-pass +//@ check-pass // https://github.com/rust-lang/rust/pull/113099#issuecomment-1637022296 mod a { diff --git a/tests/ui/imports/ambiguous-11.rs b/tests/ui/imports/ambiguous-11.rs index 0565b9d22ac..897b990c168 100644 --- a/tests/ui/imports/ambiguous-11.rs +++ b/tests/ui/imports/ambiguous-11.rs @@ -1,4 +1,4 @@ -// aux-build: ambiguous-11-extern.rs +//@ aux-build: ambiguous-11-extern.rs extern crate ambiguous_11_extern; diff --git a/tests/ui/imports/ambiguous-12.rs b/tests/ui/imports/ambiguous-12.rs index 6259c13572c..a033b51f709 100644 --- a/tests/ui/imports/ambiguous-12.rs +++ b/tests/ui/imports/ambiguous-12.rs @@ -1,4 +1,4 @@ -// check-pass +//@ check-pass // https://github.com/rust-lang/rust/pull/113099#issuecomment-1637022296 macro_rules! m { diff --git a/tests/ui/imports/ambiguous-13.rs b/tests/ui/imports/ambiguous-13.rs index 82f933c49ac..1ea04e05d57 100644 --- a/tests/ui/imports/ambiguous-13.rs +++ b/tests/ui/imports/ambiguous-13.rs @@ -1,4 +1,4 @@ -// check-pass +//@ check-pass // https://github.com/rust-lang/rust/pull/113099#issuecomment-1637022296 pub mod object { diff --git a/tests/ui/imports/ambiguous-14.rs b/tests/ui/imports/ambiguous-14.rs index 5e880b48c36..30d14be9d0e 100644 --- a/tests/ui/imports/ambiguous-14.rs +++ b/tests/ui/imports/ambiguous-14.rs @@ -1,4 +1,4 @@ -// check-pass +//@ check-pass // https://github.com/rust-lang/rust/issues/98467 mod a { diff --git a/tests/ui/imports/ambiguous-15.rs b/tests/ui/imports/ambiguous-15.rs index 8c75c393a41..b9e8f020d43 100644 --- a/tests/ui/imports/ambiguous-15.rs +++ b/tests/ui/imports/ambiguous-15.rs @@ -1,4 +1,4 @@ -// check-pass +//@ check-pass // https://github.com/rust-lang/rust/pull/113099#issuecomment-1638206152 mod t2 { diff --git a/tests/ui/imports/ambiguous-16.rs b/tests/ui/imports/ambiguous-16.rs index e51e30e3ed5..ed30c9d241a 100644 --- a/tests/ui/imports/ambiguous-16.rs +++ b/tests/ui/imports/ambiguous-16.rs @@ -1,4 +1,4 @@ -// check-pass +//@ check-pass // https://github.com/rust-lang/rust/pull/113099 mod framing { diff --git a/tests/ui/imports/ambiguous-17.rs b/tests/ui/imports/ambiguous-17.rs index 7d01404ce07..28c9c1cc864 100644 --- a/tests/ui/imports/ambiguous-17.rs +++ b/tests/ui/imports/ambiguous-17.rs @@ -1,4 +1,4 @@ -// check-pass +//@ check-pass // https://github.com/rust-lang/rust/pull/113099#issuecomment-1638206152 pub use evp::*; //~ WARNING ambiguous glob re-exports diff --git a/tests/ui/imports/ambiguous-2.rs b/tests/ui/imports/ambiguous-2.rs index 2918feb0591..087431485ad 100644 --- a/tests/ui/imports/ambiguous-2.rs +++ b/tests/ui/imports/ambiguous-2.rs @@ -1,5 +1,5 @@ -// check-pass -// aux-build: ../ambiguous-1.rs +//@ check-pass +//@ aux-build: ../ambiguous-1.rs // https://github.com/rust-lang/rust/pull/113099#issuecomment-1633574396 extern crate ambiguous_1; diff --git a/tests/ui/imports/ambiguous-3.rs b/tests/ui/imports/ambiguous-3.rs index 61a5b6b83fb..aa98ffe395e 100644 --- a/tests/ui/imports/ambiguous-3.rs +++ b/tests/ui/imports/ambiguous-3.rs @@ -1,4 +1,4 @@ -// check-pass +//@ check-pass // https://github.com/rust-lang/rust/issues/47525 fn main() { diff --git a/tests/ui/imports/ambiguous-4-extern.rs b/tests/ui/imports/ambiguous-4-extern.rs index 02546768e0e..a045ab3d8a5 100644 --- a/tests/ui/imports/ambiguous-4-extern.rs +++ b/tests/ui/imports/ambiguous-4-extern.rs @@ -1,4 +1,4 @@ -// check-pass +//@ check-pass // https://github.com/rust-lang/rust/pull/112743#issuecomment-1601986883 macro_rules! m { diff --git a/tests/ui/imports/ambiguous-4.rs b/tests/ui/imports/ambiguous-4.rs index 1e8f5be5a88..fcb7b5c6671 100644 --- a/tests/ui/imports/ambiguous-4.rs +++ b/tests/ui/imports/ambiguous-4.rs @@ -1,5 +1,5 @@ -// build-pass -// aux-build: ../ambiguous-4-extern.rs +//@ build-pass +//@ aux-build: ../ambiguous-4-extern.rs extern crate ambiguous_4_extern; diff --git a/tests/ui/imports/ambiguous-5.rs b/tests/ui/imports/ambiguous-5.rs index 56092246ab3..28447e10d1b 100644 --- a/tests/ui/imports/ambiguous-5.rs +++ b/tests/ui/imports/ambiguous-5.rs @@ -1,4 +1,4 @@ -// check-pass +//@ check-pass // https://github.com/rust-lang/rust/pull/113099#issuecomment-1637022296 mod a { diff --git a/tests/ui/imports/ambiguous-6.rs b/tests/ui/imports/ambiguous-6.rs index ba2623bf48a..955cdc3854f 100644 --- a/tests/ui/imports/ambiguous-6.rs +++ b/tests/ui/imports/ambiguous-6.rs @@ -1,5 +1,5 @@ -// check-pass -// edition: 2021 +//@ check-pass +//@ edition: 2021 // https://github.com/rust-lang/rust/issues/112713 pub fn foo() -> u32 { diff --git a/tests/ui/imports/ambiguous-8.rs b/tests/ui/imports/ambiguous-8.rs index d44cd9587ac..3e5131cc3ed 100644 --- a/tests/ui/imports/ambiguous-8.rs +++ b/tests/ui/imports/ambiguous-8.rs @@ -1,4 +1,4 @@ -// aux-build: ambiguous-8-extern.rs +//@ aux-build: ambiguous-8-extern.rs extern crate ambiguous_8_extern; diff --git a/tests/ui/imports/ambiguous-9.rs b/tests/ui/imports/ambiguous-9.rs index 9da2467ad9d..97321512df0 100644 --- a/tests/ui/imports/ambiguous-9.rs +++ b/tests/ui/imports/ambiguous-9.rs @@ -1,4 +1,4 @@ -// check-pass +//@ check-pass // https://github.com/rust-lang/rust/pull/113099#issuecomment-1638206152 pub mod dsl { diff --git a/tests/ui/imports/auxiliary/gensymed.rs b/tests/ui/imports/auxiliary/gensymed.rs index bbb19f5ec65..e947985c0f6 100644 --- a/tests/ui/imports/auxiliary/gensymed.rs +++ b/tests/ui/imports/auxiliary/gensymed.rs @@ -1,3 +1,3 @@ -// edition:2018 +//@ edition:2018 mod std {} diff --git a/tests/ui/imports/auxiliary/issue-114682-5-extern-2.rs b/tests/ui/imports/auxiliary/issue-114682-5-extern-2.rs index 9dbefdd531b..0c01aed7406 100644 --- a/tests/ui/imports/auxiliary/issue-114682-5-extern-2.rs +++ b/tests/ui/imports/auxiliary/issue-114682-5-extern-2.rs @@ -1,6 +1,6 @@ -// edition: 2018 -// aux-build: issue-114682-5-extern-1.rs -// compile-flags: --extern issue_114682_5_extern_1 +//@ edition: 2018 +//@ aux-build: issue-114682-5-extern-1.rs +//@ compile-flags: --extern issue_114682_5_extern_1 pub mod p { pub use crate::types::*; diff --git a/tests/ui/imports/bad-import-in-nested.rs b/tests/ui/imports/bad-import-in-nested.rs index 2e95480ad41..917380164ec 100644 --- a/tests/ui/imports/bad-import-in-nested.rs +++ b/tests/ui/imports/bad-import-in-nested.rs @@ -1,4 +1,4 @@ -// edition: 2021 +//@ edition: 2021 #![allow(unused)] diff --git a/tests/ui/imports/empty-import-prefix-pass-2015.rs b/tests/ui/imports/empty-import-prefix-pass-2015.rs index a3278007c11..32125e89813 100644 --- a/tests/ui/imports/empty-import-prefix-pass-2015.rs +++ b/tests/ui/imports/empty-import-prefix-pass-2015.rs @@ -1,5 +1,5 @@ -// check-pass -// edition:2015 +//@ check-pass +//@ edition:2015 use {}; use {{}}; diff --git a/tests/ui/imports/empty-import-prefix-pass.rs b/tests/ui/imports/empty-import-prefix-pass.rs index d76c0da4bd8..10845f32aa2 100644 --- a/tests/ui/imports/empty-import-prefix-pass.rs +++ b/tests/ui/imports/empty-import-prefix-pass.rs @@ -1,5 +1,5 @@ -// check-pass -// edition:2018 +//@ check-pass +//@ edition:2018 use {}; use {{}}; diff --git a/tests/ui/imports/export-glob-imports-target.rs b/tests/ui/imports/export-glob-imports-target.rs index 4df807ea4c9..0133e8a94b5 100644 --- a/tests/ui/imports/export-glob-imports-target.rs +++ b/tests/ui/imports/export-glob-imports-target.rs @@ -1,4 +1,4 @@ -// run-pass +//@ run-pass #![allow(non_upper_case_globals)] #![allow(dead_code)] @@ -7,7 +7,7 @@ // Modified to not use export since it's going away. --pcw -// pretty-expanded FIXME #23616 +//@ pretty-expanded FIXME #23616 mod foo { use foo::bar::*; diff --git a/tests/ui/imports/export-multi.rs b/tests/ui/imports/export-multi.rs index 02bdbe8afff..b52e952f33c 100644 --- a/tests/ui/imports/export-multi.rs +++ b/tests/ui/imports/export-multi.rs @@ -1,5 +1,5 @@ -// run-pass -// pretty-expanded FIXME #23616 +//@ run-pass +//@ pretty-expanded FIXME #23616 use m::f; use m::g; diff --git a/tests/ui/imports/extern-crate-self/extern-crate-self-macro-alias.rs b/tests/ui/imports/extern-crate-self/extern-crate-self-macro-alias.rs index 79683522888..30b98739db7 100644 --- a/tests/ui/imports/extern-crate-self/extern-crate-self-macro-alias.rs +++ b/tests/ui/imports/extern-crate-self/extern-crate-self-macro-alias.rs @@ -1,4 +1,4 @@ -// run-pass +//@ run-pass // Test that a macro can correctly expand the alias // in an `extern crate self as ALIAS` item. diff --git a/tests/ui/imports/extern-crate-self/extern-crate-self-macro-item.rs b/tests/ui/imports/extern-crate-self/extern-crate-self-macro-item.rs index 244293be726..a1feaf2e161 100644 --- a/tests/ui/imports/extern-crate-self/extern-crate-self-macro-item.rs +++ b/tests/ui/imports/extern-crate-self/extern-crate-self-macro-item.rs @@ -1,4 +1,4 @@ -// build-pass (FIXME(62277): could be check-pass?) +//@ build-pass (FIXME(62277): could be check-pass?) // Test that `extern crate self;` is accepted // syntactically as an item for use in a macro. diff --git a/tests/ui/imports/extern-crate-self/extern-crate-self-macro-self.rs b/tests/ui/imports/extern-crate-self/extern-crate-self-macro-self.rs index 009a92e8776..0b082971b80 100644 --- a/tests/ui/imports/extern-crate-self/extern-crate-self-macro-self.rs +++ b/tests/ui/imports/extern-crate-self/extern-crate-self-macro-self.rs @@ -1,4 +1,4 @@ -// run-pass +//@ run-pass // Test that a macro can correctly expand `self` in // an `extern crate self as ALIAS` item. diff --git a/tests/ui/imports/extern-crate-self/extern-crate-self-pass.rs b/tests/ui/imports/extern-crate-self/extern-crate-self-pass.rs index 9cebb622eed..0cd2a081561 100644 --- a/tests/ui/imports/extern-crate-self/extern-crate-self-pass.rs +++ b/tests/ui/imports/extern-crate-self/extern-crate-self-pass.rs @@ -1,4 +1,4 @@ -// build-pass (FIXME(62277): could be check-pass?) +//@ build-pass (FIXME(62277): could be check-pass?) extern crate self as foo; diff --git a/tests/ui/imports/extern-crate-used.rs b/tests/ui/imports/extern-crate-used.rs index 8198c1816a1..b57dd02cd80 100644 --- a/tests/ui/imports/extern-crate-used.rs +++ b/tests/ui/imports/extern-crate-used.rs @@ -1,7 +1,7 @@ // Extern crate items are marked as used if they are used // through extern prelude entries introduced by them. -// edition:2018 +//@ edition:2018 #![deny(unused_extern_crates)] diff --git a/tests/ui/imports/extern-prelude-extern-crate-absolute-expanded.rs b/tests/ui/imports/extern-prelude-extern-crate-absolute-expanded.rs index 30d87f90b30..c3ad9c42ac3 100644 --- a/tests/ui/imports/extern-prelude-extern-crate-absolute-expanded.rs +++ b/tests/ui/imports/extern-prelude-extern-crate-absolute-expanded.rs @@ -1,5 +1,5 @@ -// build-pass (FIXME(62277): could be check-pass?) -// edition:2018 +//@ build-pass (FIXME(62277): could be check-pass?) +//@ edition:2018 macro_rules! define_iso { () => { extern crate std as iso; diff --git a/tests/ui/imports/extern-prelude-extern-crate-cfg.rs b/tests/ui/imports/extern-prelude-extern-crate-cfg.rs index cfae08fccaa..346d63dabe7 100644 --- a/tests/ui/imports/extern-prelude-extern-crate-cfg.rs +++ b/tests/ui/imports/extern-prelude-extern-crate-cfg.rs @@ -1,5 +1,5 @@ -// build-pass (FIXME(62277): could be check-pass?) -// compile-flags:--cfg my_feature +//@ build-pass (FIXME(62277): could be check-pass?) +//@ compile-flags:--cfg my_feature #![no_std] diff --git a/tests/ui/imports/extern-prelude-extern-crate-fail.rs b/tests/ui/imports/extern-prelude-extern-crate-fail.rs index feb1ab09dc9..2f018851d19 100644 --- a/tests/ui/imports/extern-prelude-extern-crate-fail.rs +++ b/tests/ui/imports/extern-prelude-extern-crate-fail.rs @@ -1,5 +1,5 @@ -// aux-build:two_macros.rs -// compile-flags:--extern non_existent +//@ aux-build:two_macros.rs +//@ compile-flags:--extern non_existent mod n { extern crate two_macros; diff --git a/tests/ui/imports/extern-prelude-extern-crate-pass.rs b/tests/ui/imports/extern-prelude-extern-crate-pass.rs index c87d58f63e2..cab33735ba6 100644 --- a/tests/ui/imports/extern-prelude-extern-crate-pass.rs +++ b/tests/ui/imports/extern-prelude-extern-crate-pass.rs @@ -1,5 +1,5 @@ -// build-pass (FIXME(62277): could be check-pass?) -// aux-build:two_macros.rs +//@ build-pass (FIXME(62277): could be check-pass?) +//@ aux-build:two_macros.rs extern crate two_macros; diff --git a/tests/ui/imports/extern-prelude-extern-crate-restricted-shadowing.rs b/tests/ui/imports/extern-prelude-extern-crate-restricted-shadowing.rs index 6ff3ab73639..666b9f279ae 100644 --- a/tests/ui/imports/extern-prelude-extern-crate-restricted-shadowing.rs +++ b/tests/ui/imports/extern-prelude-extern-crate-restricted-shadowing.rs @@ -1,4 +1,4 @@ -// aux-build:two_macros.rs +//@ aux-build:two_macros.rs macro_rules! define_vec { () => { diff --git a/tests/ui/imports/extern-prelude-extern-crate-shadowing.rs b/tests/ui/imports/extern-prelude-extern-crate-shadowing.rs index 9e69a27d7c4..02e730e6533 100644 --- a/tests/ui/imports/extern-prelude-extern-crate-shadowing.rs +++ b/tests/ui/imports/extern-prelude-extern-crate-shadowing.rs @@ -1,5 +1,5 @@ -// build-pass (FIXME(62277): could be check-pass?) -// aux-build:two_macros.rs +//@ build-pass (FIXME(62277): could be check-pass?) +//@ aux-build:two_macros.rs extern crate two_macros as core; diff --git a/tests/ui/imports/extern-with-ambiguous-1.rs b/tests/ui/imports/extern-with-ambiguous-1.rs index 42c3c20686b..6d96c3fbeae 100644 --- a/tests/ui/imports/extern-with-ambiguous-1.rs +++ b/tests/ui/imports/extern-with-ambiguous-1.rs @@ -1,5 +1,5 @@ -// edition: 2021 -// aux-build: extern-with-ambiguous-1-extern.rs +//@ edition: 2021 +//@ aux-build: extern-with-ambiguous-1-extern.rs // `extern-with-ambiguous-1-extern.rs` doesn't has // ambiguous, just for compare. diff --git a/tests/ui/imports/extern-with-ambiguous-2.rs b/tests/ui/imports/extern-with-ambiguous-2.rs index b7c9cccdb64..dcab2bcc18e 100644 --- a/tests/ui/imports/extern-with-ambiguous-2.rs +++ b/tests/ui/imports/extern-with-ambiguous-2.rs @@ -1,6 +1,6 @@ -// check-pass -// edition: 2021 -// aux-build: extern-with-ambiguous-2-extern.rs +//@ check-pass +//@ edition: 2021 +//@ aux-build: extern-with-ambiguous-2-extern.rs extern crate extern_with_ambiguous_2_extern; diff --git a/tests/ui/imports/extern-with-ambiguous-3.rs b/tests/ui/imports/extern-with-ambiguous-3.rs index 44a9a2a00a4..c65fedbe2c1 100644 --- a/tests/ui/imports/extern-with-ambiguous-3.rs +++ b/tests/ui/imports/extern-with-ambiguous-3.rs @@ -1,6 +1,6 @@ -// check-pass -// edition: 2021 -// aux-build: extern-with-ambiguous-3-extern.rs +//@ check-pass +//@ edition: 2021 +//@ aux-build: extern-with-ambiguous-3-extern.rs // https://github.com/rust-lang/rust/pull/113099#issuecomment-1643974121 extern crate extern_with_ambiguous_3_extern; diff --git a/tests/ui/imports/gensymed.rs b/tests/ui/imports/gensymed.rs index 7b53f0c536a..d13a380a7ee 100644 --- a/tests/ui/imports/gensymed.rs +++ b/tests/ui/imports/gensymed.rs @@ -1,6 +1,6 @@ -// check-pass -// edition:2018 -// aux-build:gensymed.rs +//@ check-pass +//@ edition:2018 +//@ aux-build:gensymed.rs extern crate gensymed; diff --git a/tests/ui/imports/glob-conflict-cross-crate-1.rs b/tests/ui/imports/glob-conflict-cross-crate-1.rs index 832e6c888a6..5f0433d13fc 100644 --- a/tests/ui/imports/glob-conflict-cross-crate-1.rs +++ b/tests/ui/imports/glob-conflict-cross-crate-1.rs @@ -1,4 +1,4 @@ -// aux-build:glob-conflict.rs +//@ aux-build:glob-conflict.rs extern crate glob_conflict; diff --git a/tests/ui/imports/glob-conflict-cross-crate-2.rs b/tests/ui/imports/glob-conflict-cross-crate-2.rs index 6ba71ad30ac..b764685dd57 100644 --- a/tests/ui/imports/glob-conflict-cross-crate-2.rs +++ b/tests/ui/imports/glob-conflict-cross-crate-2.rs @@ -1,4 +1,4 @@ -// aux-build:glob-conflict-cross-crate-2-extern.rs +//@ aux-build:glob-conflict-cross-crate-2-extern.rs extern crate glob_conflict_cross_crate_2_extern; diff --git a/tests/ui/imports/glob-conflict-cross-crate-3.rs b/tests/ui/imports/glob-conflict-cross-crate-3.rs index 535d87d8ea2..7797b5b7c06 100644 --- a/tests/ui/imports/glob-conflict-cross-crate-3.rs +++ b/tests/ui/imports/glob-conflict-cross-crate-3.rs @@ -1,5 +1,5 @@ -// check-pass -// aux-build:glob-conflict-cross-crate-2-extern.rs +//@ check-pass +//@ aux-build:glob-conflict-cross-crate-2-extern.rs extern crate glob_conflict_cross_crate_2_extern; diff --git a/tests/ui/imports/glob-cycles.rs b/tests/ui/imports/glob-cycles.rs index f354cc885d0..066aa3b53ea 100644 --- a/tests/ui/imports/glob-cycles.rs +++ b/tests/ui/imports/glob-cycles.rs @@ -1,4 +1,4 @@ -// check-pass +//@ check-pass mod foo { pub use bar::*; diff --git a/tests/ui/imports/glob-use-std.rs b/tests/ui/imports/glob-use-std.rs index ef06cc570d5..b625543da81 100644 --- a/tests/ui/imports/glob-use-std.rs +++ b/tests/ui/imports/glob-use-std.rs @@ -1,8 +1,8 @@ // Issue #7580 -// run-fail -// error-pattern:panic works -// ignore-emscripten no processes +//@ run-fail +//@ error-pattern:panic works +//@ ignore-emscripten no processes use std::*; diff --git a/tests/ui/imports/import-after-macro-expand-1.rs b/tests/ui/imports/import-after-macro-expand-1.rs index d7a8aaf2f2e..ff21e21b629 100644 --- a/tests/ui/imports/import-after-macro-expand-1.rs +++ b/tests/ui/imports/import-after-macro-expand-1.rs @@ -1,4 +1,4 @@ -// check-pass +//@ check-pass // https://github.com/rust-lang/rust/issues/56593#issue-388659456 struct Foo; diff --git a/tests/ui/imports/import-after-macro-expand-10.rs b/tests/ui/imports/import-after-macro-expand-10.rs index b3520c42dfc..eb04936a5fe 100644 --- a/tests/ui/imports/import-after-macro-expand-10.rs +++ b/tests/ui/imports/import-after-macro-expand-10.rs @@ -1,4 +1,4 @@ -// check-pass +//@ check-pass mod b { pub mod http { diff --git a/tests/ui/imports/import-after-macro-expand-11.rs b/tests/ui/imports/import-after-macro-expand-11.rs index 2b81dfc236a..897c3001cc9 100644 --- a/tests/ui/imports/import-after-macro-expand-11.rs +++ b/tests/ui/imports/import-after-macro-expand-11.rs @@ -1,4 +1,4 @@ -// check-pass +//@ check-pass #[derive(Debug)] struct H; diff --git a/tests/ui/imports/import-after-macro-expand-12.rs b/tests/ui/imports/import-after-macro-expand-12.rs index f92e8c12fca..89442381528 100644 --- a/tests/ui/imports/import-after-macro-expand-12.rs +++ b/tests/ui/imports/import-after-macro-expand-12.rs @@ -1,4 +1,4 @@ -// check-pass +//@ check-pass // https://github.com/rust-lang/rust/issues/115377 use module::*; diff --git a/tests/ui/imports/import-after-macro-expand-13.rs b/tests/ui/imports/import-after-macro-expand-13.rs index fd640002c3e..016d897732d 100644 --- a/tests/ui/imports/import-after-macro-expand-13.rs +++ b/tests/ui/imports/import-after-macro-expand-13.rs @@ -1,4 +1,4 @@ -// check-pass +//@ check-pass // similar as `import-after-macro-expand-6.rs` use crate::a::HeaderMap; diff --git a/tests/ui/imports/import-after-macro-expand-14.rs b/tests/ui/imports/import-after-macro-expand-14.rs index 4d461a0e20c..0af312f375e 100644 --- a/tests/ui/imports/import-after-macro-expand-14.rs +++ b/tests/ui/imports/import-after-macro-expand-14.rs @@ -1,4 +1,4 @@ -// check-pass +//@ check-pass use crate::a::HeaderMap; diff --git a/tests/ui/imports/import-after-macro-expand-2.rs b/tests/ui/imports/import-after-macro-expand-2.rs index ff773fc8272..f0b5fbf02d9 100644 --- a/tests/ui/imports/import-after-macro-expand-2.rs +++ b/tests/ui/imports/import-after-macro-expand-2.rs @@ -1,4 +1,4 @@ -// check-pass +//@ check-pass // https://github.com/rust-lang/rust/issues/56593#issuecomment-1133174514 use thing::*; diff --git a/tests/ui/imports/import-after-macro-expand-3.rs b/tests/ui/imports/import-after-macro-expand-3.rs index 3babe1470fc..0043e9016a0 100644 --- a/tests/ui/imports/import-after-macro-expand-3.rs +++ b/tests/ui/imports/import-after-macro-expand-3.rs @@ -1,4 +1,4 @@ -// check-pass +//@ check-pass // similar with `import-after-macro-expand-2.rs` use thing::*; diff --git a/tests/ui/imports/import-after-macro-expand-4.rs b/tests/ui/imports/import-after-macro-expand-4.rs index fc0a232a93c..4181c414dd8 100644 --- a/tests/ui/imports/import-after-macro-expand-4.rs +++ b/tests/ui/imports/import-after-macro-expand-4.rs @@ -1,4 +1,4 @@ -// check-pass +//@ check-pass // https://github.com/rust-lang/rust/pull/113242#issuecomment-1616034904 // similar with `import-after-macro-expand-2.rs` diff --git a/tests/ui/imports/import-after-macro-expand-5.rs b/tests/ui/imports/import-after-macro-expand-5.rs index ba28b6deac7..b9c1790c5fb 100644 --- a/tests/ui/imports/import-after-macro-expand-5.rs +++ b/tests/ui/imports/import-after-macro-expand-5.rs @@ -1,5 +1,5 @@ -// edition: 2021 -// check-pass +//@ edition: 2021 +//@ check-pass // https://github.com/rust-lang/rust/issues/105235#issue-1474295873 mod abc { diff --git a/tests/ui/imports/import-after-macro-expand-6.rs b/tests/ui/imports/import-after-macro-expand-6.rs index bff8efebca6..73dce5985a8 100644 --- a/tests/ui/imports/import-after-macro-expand-6.rs +++ b/tests/ui/imports/import-after-macro-expand-6.rs @@ -1,4 +1,4 @@ -// check-pass +//@ check-pass // https://github.com/rust-lang/rust/pull/113099#issuecomment-1633574396 pub mod a { diff --git a/tests/ui/imports/import-after-macro-expand-7.rs b/tests/ui/imports/import-after-macro-expand-7.rs index 0402dfdfda7..da31f12a268 100644 --- a/tests/ui/imports/import-after-macro-expand-7.rs +++ b/tests/ui/imports/import-after-macro-expand-7.rs @@ -1,4 +1,4 @@ -// check-pass +//@ check-pass // a compared case for `import-after-macro-expand-6.rs` pub mod a { diff --git a/tests/ui/imports/import-after-macro-expand-8.rs b/tests/ui/imports/import-after-macro-expand-8.rs index e11d65effdf..f48be137114 100644 --- a/tests/ui/imports/import-after-macro-expand-8.rs +++ b/tests/ui/imports/import-after-macro-expand-8.rs @@ -1,4 +1,4 @@ -// check-pass +//@ check-pass // https://github.com/rust-lang/rust/pull/113242#issuecomment-1616034904 mod a { diff --git a/tests/ui/imports/import-after-macro-expand-9.rs b/tests/ui/imports/import-after-macro-expand-9.rs index deee42c3b84..5caac06e7b9 100644 --- a/tests/ui/imports/import-after-macro-expand-9.rs +++ b/tests/ui/imports/import-after-macro-expand-9.rs @@ -1,4 +1,4 @@ -// check-pass +//@ check-pass use crate::b::*; diff --git a/tests/ui/imports/import-crate-var.rs b/tests/ui/imports/import-crate-var.rs index aac5a15d3e6..2f3b38d5f75 100644 --- a/tests/ui/imports/import-crate-var.rs +++ b/tests/ui/imports/import-crate-var.rs @@ -1,4 +1,4 @@ -// aux-build:import_crate_var.rs +//@ aux-build:import_crate_var.rs #[macro_use] extern crate import_crate_var; diff --git a/tests/ui/imports/import-crate-with-invalid-spans/auxiliary/crate_with_invalid_spans.rs b/tests/ui/imports/import-crate-with-invalid-spans/auxiliary/crate_with_invalid_spans.rs index b76c1680bba..c0196aef702 100644 --- a/tests/ui/imports/import-crate-with-invalid-spans/auxiliary/crate_with_invalid_spans.rs +++ b/tests/ui/imports/import-crate-with-invalid-spans/auxiliary/crate_with_invalid_spans.rs @@ -1,7 +1,7 @@ #![crate_type = "rlib"] -// no-prefer-dynamic +//@ no-prefer-dynamic -// compile-flags: -g +//@ compile-flags: -g #[macro_use] mod crate_with_invalid_spans_macros; diff --git a/tests/ui/imports/import-crate-with-invalid-spans/main.rs b/tests/ui/imports/import-crate-with-invalid-spans/main.rs index 64a4deca8c3..3234cf304f7 100644 --- a/tests/ui/imports/import-crate-with-invalid-spans/main.rs +++ b/tests/ui/imports/import-crate-with-invalid-spans/main.rs @@ -1,7 +1,7 @@ -// run-pass -// aux-build:crate_with_invalid_spans.rs +//@ run-pass +//@ aux-build:crate_with_invalid_spans.rs -// pretty-expanded FIXME #23616 +//@ pretty-expanded FIXME #23616 extern crate crate_with_invalid_spans; diff --git a/tests/ui/imports/import-from.rs b/tests/ui/imports/import-from.rs index 2817977b393..c5ff4b3abc6 100644 --- a/tests/ui/imports/import-from.rs +++ b/tests/ui/imports/import-from.rs @@ -1,5 +1,5 @@ -// run-pass -// pretty-expanded FIXME #23616 +//@ run-pass +//@ pretty-expanded FIXME #23616 use spam::{ham, eggs}; diff --git a/tests/ui/imports/import-glob-0-rpass.rs b/tests/ui/imports/import-glob-0-rpass.rs index 9c6a87279a2..b29d7bceac8 100644 --- a/tests/ui/imports/import-glob-0-rpass.rs +++ b/tests/ui/imports/import-glob-0-rpass.rs @@ -1,4 +1,4 @@ -// run-pass +//@ run-pass #![allow(dead_code)] use module_of_many_things::*; use dug::too::greedily::and::too::deep::*; diff --git a/tests/ui/imports/import-glob-1.rs b/tests/ui/imports/import-glob-1.rs index fcc0b63f101..510f3814567 100644 --- a/tests/ui/imports/import-glob-1.rs +++ b/tests/ui/imports/import-glob-1.rs @@ -1,4 +1,4 @@ -// run-pass +//@ run-pass #![allow(dead_code)] #![allow(unused_imports)] // This should resolve fine. Prior to fix, the last import diff --git a/tests/ui/imports/import-glob-crate.rs b/tests/ui/imports/import-glob-crate.rs index 501392b7829..0a2ca6ef2c3 100644 --- a/tests/ui/imports/import-glob-crate.rs +++ b/tests/ui/imports/import-glob-crate.rs @@ -1,4 +1,4 @@ -// run-pass +//@ run-pass use std::mem::*; pub fn main() { diff --git a/tests/ui/imports/import-in-block.rs b/tests/ui/imports/import-in-block.rs index 19703904ece..c17e2cffa51 100644 --- a/tests/ui/imports/import-in-block.rs +++ b/tests/ui/imports/import-in-block.rs @@ -1,5 +1,5 @@ -// run-pass -// pretty-expanded FIXME #23616 +//@ run-pass +//@ pretty-expanded FIXME #23616 pub fn main() { use std::mem::replace; diff --git a/tests/ui/imports/import-loop-2.rs b/tests/ui/imports/import-loop-2.rs index 14a85dd083c..d9a56cb1378 100644 --- a/tests/ui/imports/import-loop-2.rs +++ b/tests/ui/imports/import-loop-2.rs @@ -1,4 +1,4 @@ -// error-pattern:import +//@ error-pattern:import mod a { pub use b::x; diff --git a/tests/ui/imports/import-loop.rs b/tests/ui/imports/import-loop.rs index b4878340145..1ba9e090033 100644 --- a/tests/ui/imports/import-loop.rs +++ b/tests/ui/imports/import-loop.rs @@ -1,4 +1,4 @@ -// error-pattern:import +//@ error-pattern:import use y::x; diff --git a/tests/ui/imports/import-prefix-macro.rs b/tests/ui/imports/import-prefix-macro.rs index d770bb0da80..e80f8fa9d04 100644 --- a/tests/ui/imports/import-prefix-macro.rs +++ b/tests/ui/imports/import-prefix-macro.rs @@ -1,4 +1,4 @@ -// run-pass +//@ run-pass #![allow(unused_variables)] mod a { pub mod b { diff --git a/tests/ui/imports/import-rename.rs b/tests/ui/imports/import-rename.rs index 9ad2b34b837..a53766b660c 100644 --- a/tests/ui/imports/import-rename.rs +++ b/tests/ui/imports/import-rename.rs @@ -1,4 +1,4 @@ -// run-pass +//@ run-pass #![allow(unused_variables)] use foo::{x, y as fooy}; use Maybe::{Yes as MaybeYes}; diff --git a/tests/ui/imports/import-rpass.rs b/tests/ui/imports/import-rpass.rs index de8bf626114..97c64fd9c63 100644 --- a/tests/ui/imports/import-rpass.rs +++ b/tests/ui/imports/import-rpass.rs @@ -1,4 +1,4 @@ -// run-pass +//@ run-pass mod foo { pub fn x(y: isize) { println!("{}", y); } } diff --git a/tests/ui/imports/import-trailing-comma.rs b/tests/ui/imports/import-trailing-comma.rs index f65c5c866a3..3803b56487f 100644 --- a/tests/ui/imports/import-trailing-comma.rs +++ b/tests/ui/imports/import-trailing-comma.rs @@ -1,5 +1,5 @@ -// run-pass -// pretty-expanded FIXME #23616 +//@ run-pass +//@ pretty-expanded FIXME #23616 use foo::bar::{baz, quux,}; diff --git a/tests/ui/imports/import2-rpass.rs b/tests/ui/imports/import2-rpass.rs index 7b70f799ebf..7a01d8a4b49 100644 --- a/tests/ui/imports/import2-rpass.rs +++ b/tests/ui/imports/import2-rpass.rs @@ -1,4 +1,4 @@ -// run-pass +//@ run-pass use zed::bar; diff --git a/tests/ui/imports/import3-rpass.rs b/tests/ui/imports/import3-rpass.rs index 17797aed359..4e555aa2783 100644 --- a/tests/ui/imports/import3-rpass.rs +++ b/tests/ui/imports/import3-rpass.rs @@ -1,4 +1,4 @@ -// run-pass +//@ run-pass #![allow(unused_imports)] use baz::zed; diff --git a/tests/ui/imports/import3.rs b/tests/ui/imports/import3.rs index 2c6ac9a00e1..71eea0ebb26 100644 --- a/tests/ui/imports/import3.rs +++ b/tests/ui/imports/import3.rs @@ -1,4 +1,4 @@ -// error-pattern: unresolved +//@ error-pattern: unresolved use main::bar; fn main() { println!("foo"); } diff --git a/tests/ui/imports/import4-rpass.rs b/tests/ui/imports/import4-rpass.rs index 4fda5386112..6b30fe5b977 100644 --- a/tests/ui/imports/import4-rpass.rs +++ b/tests/ui/imports/import4-rpass.rs @@ -1,4 +1,4 @@ -// run-pass +//@ run-pass use zed::bar; diff --git a/tests/ui/imports/import4.rs b/tests/ui/imports/import4.rs index ba3b7fbf535..8d727ced890 100644 --- a/tests/ui/imports/import4.rs +++ b/tests/ui/imports/import4.rs @@ -1,4 +1,4 @@ -// error-pattern: import +//@ error-pattern: import mod a { pub use b::foo; } diff --git a/tests/ui/imports/import5.rs b/tests/ui/imports/import5.rs index be2a55c2d41..96d6c62d48a 100644 --- a/tests/ui/imports/import5.rs +++ b/tests/ui/imports/import5.rs @@ -1,4 +1,4 @@ -// run-pass +//@ run-pass use foo::bar; mod foo { pub use foo::zed::bar; diff --git a/tests/ui/imports/import6.rs b/tests/ui/imports/import6.rs index e11b28531f9..8632c21e5f7 100644 --- a/tests/ui/imports/import6.rs +++ b/tests/ui/imports/import6.rs @@ -1,4 +1,4 @@ -// run-pass +//@ run-pass #![allow(unused_imports)] use foo::zed; diff --git a/tests/ui/imports/import7.rs b/tests/ui/imports/import7.rs index aca7fbdc4f5..ee1ce1a5d3e 100644 --- a/tests/ui/imports/import7.rs +++ b/tests/ui/imports/import7.rs @@ -1,4 +1,4 @@ -// run-pass +//@ run-pass #![allow(unused_imports)] use foo::zed; diff --git a/tests/ui/imports/import8.rs b/tests/ui/imports/import8.rs index 87f0986bae4..f4a588a2d74 100644 --- a/tests/ui/imports/import8.rs +++ b/tests/ui/imports/import8.rs @@ -1,4 +1,4 @@ -// run-pass +//@ run-pass use foo::x; use foo::x as z; diff --git a/tests/ui/imports/imports.rs b/tests/ui/imports/imports.rs index acb2b32b59d..a770103c212 100644 --- a/tests/ui/imports/imports.rs +++ b/tests/ui/imports/imports.rs @@ -1,4 +1,4 @@ -// run-pass +//@ run-pass #![allow(unused)] // Like other items, private imports can be imported and used non-lexically in paths. diff --git a/tests/ui/imports/issue-109148.rs b/tests/ui/imports/issue-109148.rs index 694cb494a15..9d657a87381 100644 --- a/tests/ui/imports/issue-109148.rs +++ b/tests/ui/imports/issue-109148.rs @@ -1,4 +1,4 @@ -// edition: 2021 +//@ edition: 2021 // https://github.com/rust-lang/rust/pull/111761#issuecomment-1557777314 macro_rules! m { diff --git a/tests/ui/imports/issue-113953.rs b/tests/ui/imports/issue-113953.rs index 449a074f4b5..a38bd59b439 100644 --- a/tests/ui/imports/issue-113953.rs +++ b/tests/ui/imports/issue-113953.rs @@ -1,4 +1,4 @@ -// edition: 2021 +//@ edition: 2021 use u8 as imported_u8; use unresolved as u8; //~^ ERROR unresolved import `unresolved` diff --git a/tests/ui/imports/issue-114682-2.rs b/tests/ui/imports/issue-114682-2.rs index 491105e62ef..e99bcf77ab6 100644 --- a/tests/ui/imports/issue-114682-2.rs +++ b/tests/ui/imports/issue-114682-2.rs @@ -1,4 +1,4 @@ -// aux-build: issue-114682-2-extern.rs +//@ aux-build: issue-114682-2-extern.rs // https://github.com/rust-lang/rust/pull/114682#issuecomment-1879998900 extern crate issue_114682_2_extern; diff --git a/tests/ui/imports/issue-114682-3.rs b/tests/ui/imports/issue-114682-3.rs index 0f658bfe159..6dc4df17a2d 100644 --- a/tests/ui/imports/issue-114682-3.rs +++ b/tests/ui/imports/issue-114682-3.rs @@ -1,5 +1,5 @@ -// check-pass -// aux-build: issue-114682-3-extern.rs +//@ check-pass +//@ aux-build: issue-114682-3-extern.rs // https://github.com/rust-lang/rust/pull/114682#issuecomment-1880625909 extern crate issue_114682_3_extern; diff --git a/tests/ui/imports/issue-114682-4.rs b/tests/ui/imports/issue-114682-4.rs index 97615c10410..32c2ca7b260 100644 --- a/tests/ui/imports/issue-114682-4.rs +++ b/tests/ui/imports/issue-114682-4.rs @@ -1,5 +1,5 @@ -// check-pass -// aux-build: issue-114682-4-extern.rs +//@ check-pass +//@ aux-build: issue-114682-4-extern.rs // https://github.com/rust-lang/rust/pull/114682#issuecomment-1880755441 extern crate issue_114682_4_extern; diff --git a/tests/ui/imports/issue-114682-5.rs b/tests/ui/imports/issue-114682-5.rs index eb5ac10495b..7c6132ebd6f 100644 --- a/tests/ui/imports/issue-114682-5.rs +++ b/tests/ui/imports/issue-114682-5.rs @@ -1,8 +1,8 @@ -// check-pass -// edition: 2018 -// aux-build: issue-114682-5-extern-1.rs -// aux-build: issue-114682-5-extern-2.rs -// compile-flags: --extern issue_114682_5_extern_1 +//@ check-pass +//@ edition: 2018 +//@ aux-build: issue-114682-5-extern-1.rs +//@ aux-build: issue-114682-5-extern-2.rs +//@ compile-flags: --extern issue_114682_5_extern_1 // https://github.com/rust-lang/rust/pull/114682#issuecomment-1880755441 extern crate issue_114682_5_extern_2; diff --git a/tests/ui/imports/issue-114682-6.rs b/tests/ui/imports/issue-114682-6.rs index 29a7d9e9426..d47b9f8a4e8 100644 --- a/tests/ui/imports/issue-114682-6.rs +++ b/tests/ui/imports/issue-114682-6.rs @@ -1,5 +1,5 @@ -// check-pass -// aux-build: issue-114682-6-extern.rs +//@ check-pass +//@ aux-build: issue-114682-6-extern.rs // https://github.com/rust-lang/rust/pull/114682#issuecomment-1880755441 extern crate issue_114682_6_extern; diff --git a/tests/ui/imports/issue-119369.rs b/tests/ui/imports/issue-119369.rs index 0b4dc3f4654..79615eba532 100644 --- a/tests/ui/imports/issue-119369.rs +++ b/tests/ui/imports/issue-119369.rs @@ -1,5 +1,5 @@ -// check-pass -// aux-build: issue-119369-extern.rs +//@ check-pass +//@ aux-build: issue-119369-extern.rs // https://github.com/rust-lang/rust/pull/119369#issuecomment-1874905662 diff --git a/tests/ui/imports/issue-18083.rs b/tests/ui/imports/issue-18083.rs index 36420ec142e..97c0bc83ad5 100644 --- a/tests/ui/imports/issue-18083.rs +++ b/tests/ui/imports/issue-18083.rs @@ -1,4 +1,4 @@ -// check-pass +//@ check-pass #![allow(dead_code)] #![allow(unused_imports)] // These crossed imports should resolve fine, and not block on diff --git a/tests/ui/imports/issue-24883.rs b/tests/ui/imports/issue-24883.rs index 819a20ddbda..de1000c1bad 100644 --- a/tests/ui/imports/issue-24883.rs +++ b/tests/ui/imports/issue-24883.rs @@ -1,4 +1,4 @@ -// check-pass +//@ check-pass mod a { pub mod b { pub struct Foo; } diff --git a/tests/ui/imports/issue-26873-multifile/A/B.rs b/tests/ui/imports/issue-26873-multifile/A/B.rs index ab7b0d81605..03702426e0c 100644 --- a/tests/ui/imports/issue-26873-multifile/A/B.rs +++ b/tests/ui/imports/issue-26873-multifile/A/B.rs @@ -1,4 +1,4 @@ -// run-pass +//@ run-pass use super::*; pub struct S; diff --git a/tests/ui/imports/issue-26873-multifile/A/C.rs b/tests/ui/imports/issue-26873-multifile/A/C.rs index b287283df53..eeba7cb3f2f 100644 --- a/tests/ui/imports/issue-26873-multifile/A/C.rs +++ b/tests/ui/imports/issue-26873-multifile/A/C.rs @@ -1,4 +1,4 @@ -// run-pass +//@ run-pass use super::*; use super::B::S; diff --git a/tests/ui/imports/issue-26873-multifile/A/mod.rs b/tests/ui/imports/issue-26873-multifile/A/mod.rs index 0f18772bf1b..de4d2250db3 100644 --- a/tests/ui/imports/issue-26873-multifile/A/mod.rs +++ b/tests/ui/imports/issue-26873-multifile/A/mod.rs @@ -1,4 +1,4 @@ -// run-pass +//@ run-pass pub mod B; pub mod C; diff --git a/tests/ui/imports/issue-26873-multifile/issue-26873-multifile.rs b/tests/ui/imports/issue-26873-multifile/issue-26873-multifile.rs index d369f1e71d0..2fd9210806b 100644 --- a/tests/ui/imports/issue-26873-multifile/issue-26873-multifile.rs +++ b/tests/ui/imports/issue-26873-multifile/issue-26873-multifile.rs @@ -1,4 +1,4 @@ -// run-pass +//@ run-pass #![allow(dead_code)] #![allow(unused_imports)] #![allow(non_snake_case)] diff --git a/tests/ui/imports/issue-26873-multifile/issue-26873-onefile.rs b/tests/ui/imports/issue-26873-multifile/issue-26873-onefile.rs index f06c6499eb0..603d4e0d65d 100644 --- a/tests/ui/imports/issue-26873-multifile/issue-26873-onefile.rs +++ b/tests/ui/imports/issue-26873-multifile/issue-26873-onefile.rs @@ -1,4 +1,4 @@ -// run-pass +//@ run-pass #![allow(dead_code)] #![allow(unused_imports)] #![allow(non_snake_case)] diff --git a/tests/ui/imports/issue-26873-multifile/mod.rs b/tests/ui/imports/issue-26873-multifile/mod.rs index a1ba53f9191..9c96ceb0f03 100644 --- a/tests/ui/imports/issue-26873-multifile/mod.rs +++ b/tests/ui/imports/issue-26873-multifile/mod.rs @@ -1,4 +1,4 @@ -// run-pass +//@ run-pass mod A; use self::A::*; diff --git a/tests/ui/imports/issue-26930.rs b/tests/ui/imports/issue-26930.rs index 707e71b1124..f6ce052a2c7 100644 --- a/tests/ui/imports/issue-26930.rs +++ b/tests/ui/imports/issue-26930.rs @@ -1,4 +1,4 @@ -// check-pass +//@ check-pass extern crate core; use core as core_export; diff --git a/tests/ui/imports/issue-28134.rs b/tests/ui/imports/issue-28134.rs index 0cecdf7a0ec..70d3a327c1a 100644 --- a/tests/ui/imports/issue-28134.rs +++ b/tests/ui/imports/issue-28134.rs @@ -1,4 +1,4 @@ -// compile-flags: --test +//@ compile-flags: --test #![allow(soft_unstable)] #![test] diff --git a/tests/ui/imports/issue-32119.rs b/tests/ui/imports/issue-32119.rs index 36adb5289ac..ebf0477e8cb 100644 --- a/tests/ui/imports/issue-32119.rs +++ b/tests/ui/imports/issue-32119.rs @@ -1,4 +1,4 @@ -// check-pass +//@ check-pass pub type T = (); mod foo { pub use super::T; } diff --git a/tests/ui/imports/issue-32222.rs b/tests/ui/imports/issue-32222.rs index 4ed06bff803..8c528bc0a1e 100644 --- a/tests/ui/imports/issue-32222.rs +++ b/tests/ui/imports/issue-32222.rs @@ -1,4 +1,4 @@ -// check-pass +//@ check-pass mod foo { pub fn bar() {} diff --git a/tests/ui/imports/issue-32354-suggest-import-rename.fixed b/tests/ui/imports/issue-32354-suggest-import-rename.fixed index 27f1b8964e2..d586ac0738c 100644 --- a/tests/ui/imports/issue-32354-suggest-import-rename.fixed +++ b/tests/ui/imports/issue-32354-suggest-import-rename.fixed @@ -1,4 +1,4 @@ -// run-rustfix +//@ run-rustfix #![allow(unused_imports)] diff --git a/tests/ui/imports/issue-32354-suggest-import-rename.rs b/tests/ui/imports/issue-32354-suggest-import-rename.rs index 5a7f234d5fa..868f3fe4604 100644 --- a/tests/ui/imports/issue-32354-suggest-import-rename.rs +++ b/tests/ui/imports/issue-32354-suggest-import-rename.rs @@ -1,4 +1,4 @@ -// run-rustfix +//@ run-rustfix #![allow(unused_imports)] diff --git a/tests/ui/imports/issue-36881.rs b/tests/ui/imports/issue-36881.rs index 04313872d27..4aff642ea95 100644 --- a/tests/ui/imports/issue-36881.rs +++ b/tests/ui/imports/issue-36881.rs @@ -1,4 +1,4 @@ -// aux-build:issue-36881-aux.rs +//@ aux-build:issue-36881-aux.rs fn main() { extern crate issue_36881_aux; diff --git a/tests/ui/imports/issue-45799-bad-extern-crate-rename-suggestion-formatting.fixed b/tests/ui/imports/issue-45799-bad-extern-crate-rename-suggestion-formatting.fixed index b463848ae94..bc5b72c3f72 100644 --- a/tests/ui/imports/issue-45799-bad-extern-crate-rename-suggestion-formatting.fixed +++ b/tests/ui/imports/issue-45799-bad-extern-crate-rename-suggestion-formatting.fixed @@ -1,4 +1,4 @@ -// run-rustfix +//@ run-rustfix extern crate std as other_std; fn main() {} diff --git a/tests/ui/imports/issue-45799-bad-extern-crate-rename-suggestion-formatting.rs b/tests/ui/imports/issue-45799-bad-extern-crate-rename-suggestion-formatting.rs index 1b491ac7efe..5ac7407371d 100644 --- a/tests/ui/imports/issue-45799-bad-extern-crate-rename-suggestion-formatting.rs +++ b/tests/ui/imports/issue-45799-bad-extern-crate-rename-suggestion-formatting.rs @@ -1,4 +1,4 @@ -// run-rustfix +//@ run-rustfix extern crate std; fn main() {} diff --git a/tests/ui/imports/issue-45829/rename-extern-vs-use.rs b/tests/ui/imports/issue-45829/rename-extern-vs-use.rs index aef7aa35cf5..936dfbc67d0 100644 --- a/tests/ui/imports/issue-45829/rename-extern-vs-use.rs +++ b/tests/ui/imports/issue-45829/rename-extern-vs-use.rs @@ -1,4 +1,4 @@ -// aux-build:issue-45829-b.rs +//@ aux-build:issue-45829-b.rs mod foo { pub mod bar {} diff --git a/tests/ui/imports/issue-45829/rename-extern-with-tab.rs b/tests/ui/imports/issue-45829/rename-extern-with-tab.rs index 0da8b826c90..a57bac6e841 100644 --- a/tests/ui/imports/issue-45829/rename-extern-with-tab.rs +++ b/tests/ui/imports/issue-45829/rename-extern-with-tab.rs @@ -1,5 +1,5 @@ -// aux-build:issue-45829-a.rs -// aux-build:issue-45829-b.rs +//@ aux-build:issue-45829-a.rs +//@ aux-build:issue-45829-b.rs extern crate issue_45829_a; extern crate issue_45829_b as issue_45829_a; diff --git a/tests/ui/imports/issue-45829/rename-extern.rs b/tests/ui/imports/issue-45829/rename-extern.rs index 7dbda69322e..c82a091981b 100644 --- a/tests/ui/imports/issue-45829/rename-extern.rs +++ b/tests/ui/imports/issue-45829/rename-extern.rs @@ -1,5 +1,5 @@ -// aux-build:issue-45829-a.rs -// aux-build:issue-45829-b.rs +//@ aux-build:issue-45829-a.rs +//@ aux-build:issue-45829-b.rs extern crate issue_45829_a; extern crate issue_45829_b as issue_45829_a; diff --git a/tests/ui/imports/issue-45829/rename-use-vs-extern.rs b/tests/ui/imports/issue-45829/rename-use-vs-extern.rs index 0cf3a77fd7c..42e1ed6b632 100644 --- a/tests/ui/imports/issue-45829/rename-use-vs-extern.rs +++ b/tests/ui/imports/issue-45829/rename-use-vs-extern.rs @@ -1,4 +1,4 @@ -// aux-build:issue-45829-b.rs +//@ aux-build:issue-45829-b.rs extern crate issue_45829_b; use std as issue_45829_b; diff --git a/tests/ui/imports/issue-4865-1.rs b/tests/ui/imports/issue-4865-1.rs index 68fbee37d01..1a72b1b5e3f 100644 --- a/tests/ui/imports/issue-4865-1.rs +++ b/tests/ui/imports/issue-4865-1.rs @@ -1,4 +1,4 @@ -// run-pass +//@ run-pass #![allow(unused_imports)] // This should resolve fine. // Prior to fix, the crossed imports between a and b diff --git a/tests/ui/imports/issue-4865-2.rs b/tests/ui/imports/issue-4865-2.rs index cbe1d0d32c6..746a74658dd 100644 --- a/tests/ui/imports/issue-4865-2.rs +++ b/tests/ui/imports/issue-4865-2.rs @@ -1,4 +1,4 @@ -// run-pass +//@ run-pass // Previously, this would have failed to resolve due to the circular // block between `use say` and `pub use hello::*`. // diff --git a/tests/ui/imports/issue-4865-3.rs b/tests/ui/imports/issue-4865-3.rs index 12f9bba18d8..130223558cb 100644 --- a/tests/ui/imports/issue-4865-3.rs +++ b/tests/ui/imports/issue-4865-3.rs @@ -1,4 +1,4 @@ -// run-pass +//@ run-pass #![allow(unused_imports)] // This should resolve fine even with the circular imports as // they are not `pub`. diff --git a/tests/ui/imports/issue-52891.fixed b/tests/ui/imports/issue-52891.fixed index e694b5c9b15..9faef1703ac 100644 --- a/tests/ui/imports/issue-52891.fixed +++ b/tests/ui/imports/issue-52891.fixed @@ -1,5 +1,5 @@ -// aux-build:issue-52891.rs -// run-rustfix +//@ aux-build:issue-52891.rs +//@ run-rustfix #![allow(warnings)] diff --git a/tests/ui/imports/issue-52891.rs b/tests/ui/imports/issue-52891.rs index cd4b40629ab..e5fcdf97941 100644 --- a/tests/ui/imports/issue-52891.rs +++ b/tests/ui/imports/issue-52891.rs @@ -1,5 +1,5 @@ -// aux-build:issue-52891.rs -// run-rustfix +//@ aux-build:issue-52891.rs +//@ run-rustfix #![allow(warnings)] diff --git a/tests/ui/imports/issue-53140.rs b/tests/ui/imports/issue-53140.rs index 7b4cc176806..28cfa59dd3b 100644 --- a/tests/ui/imports/issue-53140.rs +++ b/tests/ui/imports/issue-53140.rs @@ -1,4 +1,4 @@ -// check-pass +//@ check-pass mod m { pub struct S(u8); diff --git a/tests/ui/imports/issue-55811.rs b/tests/ui/imports/issue-55811.rs index 2df328cca89..51dfd45e7a3 100644 --- a/tests/ui/imports/issue-55811.rs +++ b/tests/ui/imports/issue-55811.rs @@ -1,5 +1,5 @@ -// check-pass -// aux-build:issue-55811.rs +//@ check-pass +//@ aux-build:issue-55811.rs extern crate issue_55811; diff --git a/tests/ui/imports/issue-56125.rs b/tests/ui/imports/issue-56125.rs index ec5747b4bca..4e7e7ac67c5 100644 --- a/tests/ui/imports/issue-56125.rs +++ b/tests/ui/imports/issue-56125.rs @@ -1,6 +1,6 @@ -// edition:2018 -// compile-flags:--extern issue_56125 -// aux-build:issue-56125.rs +//@ edition:2018 +//@ compile-flags:--extern issue_56125 +//@ aux-build:issue-56125.rs mod m1 { use issue_56125::last_segment::*; diff --git a/tests/ui/imports/issue-56263.rs b/tests/ui/imports/issue-56263.rs index 363781f2daf..4beb0fbf6d0 100644 --- a/tests/ui/imports/issue-56263.rs +++ b/tests/ui/imports/issue-56263.rs @@ -1,5 +1,5 @@ -// check-pass -// edition:2018 +//@ check-pass +//@ edition:2018 use ::std; diff --git a/tests/ui/imports/issue-57539.rs b/tests/ui/imports/issue-57539.rs index 90b74eb4647..d97a74291d3 100644 --- a/tests/ui/imports/issue-57539.rs +++ b/tests/ui/imports/issue-57539.rs @@ -1,4 +1,4 @@ -// edition:2018 +//@ edition:2018 mod core { use core; //~ ERROR `core` is ambiguous diff --git a/tests/ui/imports/issue-59764.rs b/tests/ui/imports/issue-59764.rs index 91b3ddcd84d..5f7a496117a 100644 --- a/tests/ui/imports/issue-59764.rs +++ b/tests/ui/imports/issue-59764.rs @@ -1,6 +1,6 @@ -// aux-build:issue-59764.rs -// compile-flags:--extern issue_59764 -// edition:2018 +//@ aux-build:issue-59764.rs +//@ compile-flags:--extern issue_59764 +//@ edition:2018 #![allow(warnings)] diff --git a/tests/ui/imports/issue-62767.rs b/tests/ui/imports/issue-62767.rs index 01184eea9b4..eb5569e003d 100644 --- a/tests/ui/imports/issue-62767.rs +++ b/tests/ui/imports/issue-62767.rs @@ -1,4 +1,4 @@ -// check-pass +//@ check-pass // Minimized case from #62767. mod m { diff --git a/tests/ui/imports/issue-68103.rs b/tests/ui/imports/issue-68103.rs index e775678fc60..6d90d23cd65 100644 --- a/tests/ui/imports/issue-68103.rs +++ b/tests/ui/imports/issue-68103.rs @@ -1,4 +1,4 @@ -// check-pass +//@ check-pass pub extern crate self as name; pub use name::name as bug; diff --git a/tests/ui/imports/issue-85992.rs b/tests/ui/imports/issue-85992.rs index d5524109144..321c3a9218d 100644 --- a/tests/ui/imports/issue-85992.rs +++ b/tests/ui/imports/issue-85992.rs @@ -1,7 +1,7 @@ -// edition: 2021 -// compile-flags: --extern issue_85992_extern_1 --extern issue_85992_extern_2 -// aux-build: issue-85992-extern-1.rs -// aux-build: issue-85992-extern-2.rs +//@ edition: 2021 +//@ compile-flags: --extern issue_85992_extern_1 --extern issue_85992_extern_2 +//@ aux-build: issue-85992-extern-1.rs +//@ aux-build: issue-85992-extern-2.rs issue_85992_extern_1::m!(); diff --git a/tests/ui/imports/issue-99695-b.fixed b/tests/ui/imports/issue-99695-b.fixed index 0e60c73b67a..0108f762400 100644 --- a/tests/ui/imports/issue-99695-b.fixed +++ b/tests/ui/imports/issue-99695-b.fixed @@ -1,4 +1,4 @@ -// run-rustfix +//@ run-rustfix #![allow(unused, nonstandard_style)] mod m { diff --git a/tests/ui/imports/issue-99695-b.rs b/tests/ui/imports/issue-99695-b.rs index 031443a1f5d..a8ff3645329 100644 --- a/tests/ui/imports/issue-99695-b.rs +++ b/tests/ui/imports/issue-99695-b.rs @@ -1,4 +1,4 @@ -// run-rustfix +//@ run-rustfix #![allow(unused, nonstandard_style)] mod m { diff --git a/tests/ui/imports/issue-99695.fixed b/tests/ui/imports/issue-99695.fixed index 6bf228b23aa..51ccd3f8c48 100644 --- a/tests/ui/imports/issue-99695.fixed +++ b/tests/ui/imports/issue-99695.fixed @@ -1,4 +1,4 @@ -// run-rustfix +//@ run-rustfix #![allow(unused, nonstandard_style)] mod m { #[macro_export] diff --git a/tests/ui/imports/issue-99695.rs b/tests/ui/imports/issue-99695.rs index f7199f1497a..a52370e0eb0 100644 --- a/tests/ui/imports/issue-99695.rs +++ b/tests/ui/imports/issue-99695.rs @@ -1,4 +1,4 @@ -// run-rustfix +//@ run-rustfix #![allow(unused, nonstandard_style)] mod m { #[macro_export] diff --git a/tests/ui/imports/local-modularized-tricky-pass-1.rs b/tests/ui/imports/local-modularized-tricky-pass-1.rs index b52ddaf8954..e809e5e4d89 100644 --- a/tests/ui/imports/local-modularized-tricky-pass-1.rs +++ b/tests/ui/imports/local-modularized-tricky-pass-1.rs @@ -1,4 +1,4 @@ -// build-pass (FIXME(62277): could be check-pass?) +//@ build-pass (FIXME(62277): could be check-pass?) macro_rules! define_exported { () => { #[macro_export] diff --git a/tests/ui/imports/local-modularized-tricky-pass-2.rs b/tests/ui/imports/local-modularized-tricky-pass-2.rs index d5efbdf78af..581bab467f5 100644 --- a/tests/ui/imports/local-modularized-tricky-pass-2.rs +++ b/tests/ui/imports/local-modularized-tricky-pass-2.rs @@ -1,4 +1,4 @@ -// check-pass +//@ check-pass // // `#[macro_export] macro_rules` that doesn't originate from macro expansions can be placed // into the root module soon enough to act as usual items and shadow globs and preludes. diff --git a/tests/ui/imports/local-modularized.rs b/tests/ui/imports/local-modularized.rs index 8eeb1cf07bb..39d0169dd79 100644 --- a/tests/ui/imports/local-modularized.rs +++ b/tests/ui/imports/local-modularized.rs @@ -1,4 +1,4 @@ -// build-pass (FIXME(62277): could be check-pass?) +//@ build-pass (FIXME(62277): could be check-pass?) #[macro_export(local_inner_macros)] macro_rules! dollar_crate_exported { diff --git a/tests/ui/imports/macro-paths.rs b/tests/ui/imports/macro-paths.rs index cc584e05a6b..916442a7c4e 100644 --- a/tests/ui/imports/macro-paths.rs +++ b/tests/ui/imports/macro-paths.rs @@ -1,4 +1,4 @@ -// aux-build:two_macros.rs +//@ aux-build:two_macros.rs extern crate two_macros; diff --git a/tests/ui/imports/macros.rs b/tests/ui/imports/macros.rs index f2a22ad620b..7f479571e5e 100644 --- a/tests/ui/imports/macros.rs +++ b/tests/ui/imports/macros.rs @@ -1,4 +1,4 @@ -// aux-build:two_macros.rs +//@ aux-build:two_macros.rs extern crate two_macros; // two identity macros `m` and `n` diff --git a/tests/ui/imports/no-pub-reexports-but-used.rs b/tests/ui/imports/no-pub-reexports-but-used.rs index 28991bde829..c0d7964ea71 100644 --- a/tests/ui/imports/no-pub-reexports-but-used.rs +++ b/tests/ui/imports/no-pub-reexports-but-used.rs @@ -1,4 +1,4 @@ -// check-pass +//@ check-pass // https://github.com/rust-lang/rust/issues/115966 mod m { diff --git a/tests/ui/imports/overlapping_pub_trait.rs b/tests/ui/imports/overlapping_pub_trait.rs index 69aba3ae9b4..cde9f7d8edb 100644 --- a/tests/ui/imports/overlapping_pub_trait.rs +++ b/tests/ui/imports/overlapping_pub_trait.rs @@ -1,4 +1,4 @@ -// aux-build:overlapping_pub_trait_source.rs +//@ aux-build:overlapping_pub_trait_source.rs /* * This crate declares two public paths, `m::Tr` and `prelude::_`. Make sure we prefer the former. diff --git a/tests/ui/imports/private-std-reexport-suggest-public.fixed b/tests/ui/imports/private-std-reexport-suggest-public.fixed index b6fd22f5d3f..6374ba00bb4 100644 --- a/tests/ui/imports/private-std-reexport-suggest-public.fixed +++ b/tests/ui/imports/private-std-reexport-suggest-public.fixed @@ -1,4 +1,4 @@ -// run-rustfix +//@ run-rustfix #![allow(unused_imports)] fn main() { use std::mem; //~ ERROR module import `mem` is private diff --git a/tests/ui/imports/private-std-reexport-suggest-public.rs b/tests/ui/imports/private-std-reexport-suggest-public.rs index 1247055af60..04ec679c4d7 100644 --- a/tests/ui/imports/private-std-reexport-suggest-public.rs +++ b/tests/ui/imports/private-std-reexport-suggest-public.rs @@ -1,4 +1,4 @@ -// run-rustfix +//@ run-rustfix #![allow(unused_imports)] fn main() { use foo::mem; //~ ERROR module import `mem` is private diff --git a/tests/ui/imports/reexport-star.rs b/tests/ui/imports/reexport-star.rs index 639ab1a0f3a..3e41f12fa2d 100644 --- a/tests/ui/imports/reexport-star.rs +++ b/tests/ui/imports/reexport-star.rs @@ -1,5 +1,5 @@ -// run-pass -// pretty-expanded FIXME #23616 +//@ run-pass +//@ pretty-expanded FIXME #23616 mod a { pub fn f() {} diff --git a/tests/ui/imports/resolve-other-libc.rs b/tests/ui/imports/resolve-other-libc.rs index 806d854ec89..d848f8260aa 100644 --- a/tests/ui/imports/resolve-other-libc.rs +++ b/tests/ui/imports/resolve-other-libc.rs @@ -1,6 +1,6 @@ // Regression test for https://github.com/rust-lang/rust/issues/26043 -// compile-flags: --extern libc=test.rlib +//@ compile-flags: --extern libc=test.rlib // The error shall NOT be something similar to the following, because it // indicates that `libc` was wrongly resolved to `libc` shipped with the diff --git a/tests/ui/imports/shadow_builtin_macros.rs b/tests/ui/imports/shadow_builtin_macros.rs index 02c27d5ce33..5a149067408 100644 --- a/tests/ui/imports/shadow_builtin_macros.rs +++ b/tests/ui/imports/shadow_builtin_macros.rs @@ -1,4 +1,4 @@ -// aux-build:two_macros.rs +//@ aux-build:two_macros.rs mod foo { extern crate two_macros; diff --git a/tests/ui/imports/unnamed_pub_trait.rs b/tests/ui/imports/unnamed_pub_trait.rs index c38fb17b976..09a01643c5e 100644 --- a/tests/ui/imports/unnamed_pub_trait.rs +++ b/tests/ui/imports/unnamed_pub_trait.rs @@ -1,4 +1,4 @@ -// aux-build:unnamed_pub_trait_source.rs +//@ aux-build:unnamed_pub_trait_source.rs /* * This crate declares an unnameable public path for our item. Make sure we don't suggest diff --git a/tests/ui/imports/unused-import-issue-87973.fixed b/tests/ui/imports/unused-import-issue-87973.fixed index 5c194d18aca..96508fa3ea2 100644 --- a/tests/ui/imports/unused-import-issue-87973.fixed +++ b/tests/ui/imports/unused-import-issue-87973.fixed @@ -1,4 +1,4 @@ -// run-rustfix +//@ run-rustfix #![deny(unused_imports)] // Check that attributes get removed too. See #87973. diff --git a/tests/ui/imports/unused-import-issue-87973.rs b/tests/ui/imports/unused-import-issue-87973.rs index c31f0f9796e..b04bec07d18 100644 --- a/tests/ui/imports/unused-import-issue-87973.rs +++ b/tests/ui/imports/unused-import-issue-87973.rs @@ -1,4 +1,4 @@ -// run-rustfix +//@ run-rustfix #![deny(unused_imports)] // Check that attributes get removed too. See #87973. diff --git a/tests/ui/imports/unused-imports-in-test-mode.rs b/tests/ui/imports/unused-imports-in-test-mode.rs index 039f59a8838..0902e7cc55c 100644 --- a/tests/ui/imports/unused-imports-in-test-mode.rs +++ b/tests/ui/imports/unused-imports-in-test-mode.rs @@ -1,4 +1,4 @@ -// compile-flags: --test +//@ compile-flags: --test #![deny(unused_imports)] diff --git a/tests/ui/imports/use-mod.rs b/tests/ui/imports/use-mod.rs index 84da2e70878..065079b21e5 100644 --- a/tests/ui/imports/use-mod.rs +++ b/tests/ui/imports/use-mod.rs @@ -1,7 +1,7 @@ -// run-pass +//@ run-pass #![allow(unused_imports)] -// pretty-expanded FIXME #23616 +//@ pretty-expanded FIXME #23616 pub use foo::bar::{self, First}; use self::bar::Second; diff --git a/tests/ui/impossible_range.fixed b/tests/ui/impossible_range.fixed index 3fd950e0dbf..423dde94f4f 100644 --- a/tests/ui/impossible_range.fixed +++ b/tests/ui/impossible_range.fixed @@ -1,4 +1,4 @@ -// run-rustfix +//@ run-rustfix // Make sure that invalid ranges generate an error during parsing, not an ICE #![allow(path_statements)] diff --git a/tests/ui/impossible_range.rs b/tests/ui/impossible_range.rs index 0fe0e17be66..002ea792fbf 100644 --- a/tests/ui/impossible_range.rs +++ b/tests/ui/impossible_range.rs @@ -1,4 +1,4 @@ -// run-rustfix +//@ run-rustfix // Make sure that invalid ranges generate an error during parsing, not an ICE #![allow(path_statements)] diff --git a/tests/ui/inc-range-pat.rs b/tests/ui/inc-range-pat.rs index 1eb7dd0aa3e..189dac4feed 100644 --- a/tests/ui/inc-range-pat.rs +++ b/tests/ui/inc-range-pat.rs @@ -1,4 +1,4 @@ -// run-pass +//@ run-pass // Test old and new syntax for inclusive range patterns. #![allow(ellipsis_inclusive_range_patterns)] diff --git a/tests/ui/include-macros/normalization.rs b/tests/ui/include-macros/normalization.rs index 889f08e606e..d503d137e55 100644 --- a/tests/ui/include-macros/normalization.rs +++ b/tests/ui/include-macros/normalization.rs @@ -1,4 +1,4 @@ -// run-pass +//@ run-pass fn main() { assert_eq!( diff --git a/tests/ui/include-macros/same-file-in-two-crates.rs b/tests/ui/include-macros/same-file-in-two-crates.rs index f49efa2cf8a..893024492b1 100644 --- a/tests/ui/include-macros/same-file-in-two-crates.rs +++ b/tests/ui/include-macros/same-file-in-two-crates.rs @@ -8,9 +8,9 @@ // // This is a regression test for https://github.com/rust-lang/rust/issues/85955. -// check-pass -// compile-flags: --crate-type=rlib -// aux-build:same-file-in-two-crates-aux.rs +//@ check-pass +//@ compile-flags: --crate-type=rlib +//@ aux-build:same-file-in-two-crates-aux.rs extern crate same_file_in_two_crates_aux; pub fn foo() -> u32 { diff --git a/tests/ui/incoherent-inherent-impls/needs-has-incoherent-impls.rs b/tests/ui/incoherent-inherent-impls/needs-has-incoherent-impls.rs index 0f7282bec5c..22ca93c0b20 100644 --- a/tests/ui/incoherent-inherent-impls/needs-has-incoherent-impls.rs +++ b/tests/ui/incoherent-inherent-impls/needs-has-incoherent-impls.rs @@ -1,4 +1,4 @@ -// aux-build:extern-crate.rs +//@ aux-build:extern-crate.rs #![feature(rustc_attrs)] extern crate extern_crate; diff --git a/tests/ui/incoherent-inherent-impls/no-attr-empty-impl.rs b/tests/ui/incoherent-inherent-impls/no-attr-empty-impl.rs index 62c249e5882..a55317041cc 100644 --- a/tests/ui/incoherent-inherent-impls/no-attr-empty-impl.rs +++ b/tests/ui/incoherent-inherent-impls/no-attr-empty-impl.rs @@ -1,4 +1,4 @@ -// aux-build:extern-crate.rs +//@ aux-build:extern-crate.rs extern crate extern_crate; impl extern_crate::StructWithAttr {} diff --git a/tests/ui/indexing/indexing-spans-caller-location.rs b/tests/ui/indexing/indexing-spans-caller-location.rs index 2652f00211d..02d8b853734 100644 --- a/tests/ui/indexing/indexing-spans-caller-location.rs +++ b/tests/ui/indexing/indexing-spans-caller-location.rs @@ -1,4 +1,4 @@ -// run-pass +//@ run-pass // Regression test for https://github.com/rust-lang/rust/issues/114388 diff --git a/tests/ui/infer-fn-tail-expr.rs b/tests/ui/infer-fn-tail-expr.rs index 413b1877a29..31b71e49bd6 100644 --- a/tests/ui/infer-fn-tail-expr.rs +++ b/tests/ui/infer-fn-tail-expr.rs @@ -1,10 +1,10 @@ -// run-pass +//@ run-pass #![allow(dead_code)] // issue #680 -// pretty-expanded FIXME #23616 +//@ pretty-expanded FIXME #23616 fn f() -> Vec { Vec::new() } diff --git a/tests/ui/inference/cannot-infer-async.rs b/tests/ui/inference/cannot-infer-async.rs index b5152d04f69..e4ab8f90e4b 100644 --- a/tests/ui/inference/cannot-infer-async.rs +++ b/tests/ui/inference/cannot-infer-async.rs @@ -1,4 +1,4 @@ -// edition:2018 +//@ edition:2018 use std::io::Error; diff --git a/tests/ui/inference/char-as-str-single.fixed b/tests/ui/inference/char-as-str-single.fixed index 1621a279f03..de27417a78d 100644 --- a/tests/ui/inference/char-as-str-single.fixed +++ b/tests/ui/inference/char-as-str-single.fixed @@ -3,7 +3,7 @@ // Testing both single-byte and multi-byte characters, as we should handle both. -// run-rustfix +//@ run-rustfix fn main() { let _: char = 'a'; //~ ERROR mismatched types diff --git a/tests/ui/inference/char-as-str-single.rs b/tests/ui/inference/char-as-str-single.rs index 2903142f159..456729a8308 100644 --- a/tests/ui/inference/char-as-str-single.rs +++ b/tests/ui/inference/char-as-str-single.rs @@ -3,7 +3,7 @@ // Testing both single-byte and multi-byte characters, as we should handle both. -// run-rustfix +//@ run-rustfix fn main() { let _: char = "a"; //~ ERROR mismatched types diff --git a/tests/ui/inference/infer-binary-operand-behind-reference.rs b/tests/ui/inference/infer-binary-operand-behind-reference.rs index 0c0a3171ee9..05b18ca104c 100644 --- a/tests/ui/inference/infer-binary-operand-behind-reference.rs +++ b/tests/ui/inference/infer-binary-operand-behind-reference.rs @@ -1,4 +1,4 @@ -// check-pass +//@ check-pass fn main() { // Test that we can infer the type of binary operands when diff --git a/tests/ui/inference/inference-variable-behind-raw-pointer.rs b/tests/ui/inference/inference-variable-behind-raw-pointer.rs index 6662e46b1c7..6a67cf593a5 100644 --- a/tests/ui/inference/inference-variable-behind-raw-pointer.rs +++ b/tests/ui/inference/inference-variable-behind-raw-pointer.rs @@ -1,4 +1,4 @@ -// check-pass +//@ check-pass // tests that the following code compiles, but produces a future-compatibility warning diff --git a/tests/ui/inference/inference_unstable.rs b/tests/ui/inference/inference_unstable.rs index ad76499591c..5a5ac66310d 100644 --- a/tests/ui/inference/inference_unstable.rs +++ b/tests/ui/inference/inference_unstable.rs @@ -1,9 +1,9 @@ // Ensures #[unstable] functions without opting in the corresponding #![feature] // will not break inference. -// aux-build:inference_unstable_iterator.rs -// aux-build:inference_unstable_itertools.rs -// run-pass +//@ aux-build:inference_unstable_iterator.rs +//@ aux-build:inference_unstable_itertools.rs +//@ run-pass extern crate inference_unstable_iterator; extern crate inference_unstable_itertools; diff --git a/tests/ui/inference/inference_unstable_featured.rs b/tests/ui/inference/inference_unstable_featured.rs index 792b29aaadc..dd8b8d6a470 100644 --- a/tests/ui/inference/inference_unstable_featured.rs +++ b/tests/ui/inference/inference_unstable_featured.rs @@ -1,8 +1,8 @@ // There should be E0034 "multiple applicable items in scope" if we opt-in for // the feature. -// aux-build:inference_unstable_iterator.rs -// aux-build:inference_unstable_itertools.rs +//@ aux-build:inference_unstable_iterator.rs +//@ aux-build:inference_unstable_itertools.rs #![feature(ipu_flatten)] diff --git a/tests/ui/inference/inference_unstable_forced.rs b/tests/ui/inference/inference_unstable_forced.rs index 649b3ed2a6f..f12db6f0164 100644 --- a/tests/ui/inference/inference_unstable_forced.rs +++ b/tests/ui/inference/inference_unstable_forced.rs @@ -1,7 +1,7 @@ // If the unstable API is the only possible solution, // still emit E0658 "use of unstable library feature". -// aux-build:inference_unstable_iterator.rs +//@ aux-build:inference_unstable_iterator.rs extern crate inference_unstable_iterator; diff --git a/tests/ui/inference/issue-113354.fixed b/tests/ui/inference/issue-113354.fixed index 804db985ae1..b9c84220764 100644 --- a/tests/ui/inference/issue-113354.fixed +++ b/tests/ui/inference/issue-113354.fixed @@ -1,4 +1,4 @@ -//run-rustfix +//@run-rustfix fn main() { let _ = || { while let Some(_) = Some(1) { } }; //~ ERROR mismatched types } diff --git a/tests/ui/inference/issue-113354.rs b/tests/ui/inference/issue-113354.rs index ec33d1f8b84..c4409a24312 100644 --- a/tests/ui/inference/issue-113354.rs +++ b/tests/ui/inference/issue-113354.rs @@ -1,4 +1,4 @@ -//run-rustfix +//@run-rustfix fn main() { let _ = || { while Some(_) = Some(1) { } }; //~ ERROR mismatched types } diff --git a/tests/ui/inference/issue-28935.rs b/tests/ui/inference/issue-28935.rs index 872822dbd0f..3f152808846 100644 --- a/tests/ui/inference/issue-28935.rs +++ b/tests/ui/inference/issue-28935.rs @@ -1,4 +1,4 @@ -// check-pass +//@ check-pass use std::cell::RefCell; diff --git a/tests/ui/inference/issue-36053.rs b/tests/ui/inference/issue-36053.rs index 8eee1c33b0e..6cc1c12a56f 100644 --- a/tests/ui/inference/issue-36053.rs +++ b/tests/ui/inference/issue-36053.rs @@ -1,4 +1,4 @@ -// run-pass +//@ run-pass // Regression test for #36053. ICE was caused due to obligations being // added to a special, dedicated fulfillment cx during a // probe. Problem seems to be related to the particular definition of diff --git a/tests/ui/inference/issue-70703.rs b/tests/ui/inference/issue-70703.rs index d90498e96ea..326859c9d03 100644 --- a/tests/ui/inference/issue-70703.rs +++ b/tests/ui/inference/issue-70703.rs @@ -1,4 +1,4 @@ -// check-pass +//@ check-pass trait Factory { type Product; diff --git a/tests/ui/inference/issue-71584.rs b/tests/ui/inference/issue-71584.rs index c96c32d5c0a..7e4d45ec4a0 100644 --- a/tests/ui/inference/issue-71584.rs +++ b/tests/ui/inference/issue-71584.rs @@ -1,4 +1,4 @@ -// ignore-windows different list of satisfying impls +//@ ignore-windows different list of satisfying impls fn main() { let n: u32 = 1; let mut d: u64 = 2; diff --git a/tests/ui/inference/issue-72616.rs b/tests/ui/inference/issue-72616.rs index 69ade1a7515..71e095cc6fc 100644 --- a/tests/ui/inference/issue-72616.rs +++ b/tests/ui/inference/issue-72616.rs @@ -1,4 +1,4 @@ -// ignore-wasm32 FIXME: ignoring wasm as it suggests slightly different impls +//@ ignore-wasm32 FIXME: ignoring wasm as it suggests slightly different impls // Regression test for #72616, it used to emit incorrect diagnostics, like: // error[E0283]: type annotations needed for `String` diff --git a/tests/ui/inference/issue-80409.rs b/tests/ui/inference/issue-80409.rs index 49c9978fe15..e54da78614f 100644 --- a/tests/ui/inference/issue-80409.rs +++ b/tests/ui/inference/issue-80409.rs @@ -2,16 +2,16 @@ // ignore-tidy-linelength -// revisions: compat no-compat -//[compat] check-pass -//[no-compat] compile-flags: -Zno-implied-bounds-compat -//[no-compat] check-fail -//[no-compat] known-bug: #80409 -//[no-compat] failure-status: 101 -//[no-compat] normalize-stderr-test "note: .*\n\n" -> "" -//[no-compat] normalize-stderr-test "thread 'rustc' panicked.*\n" -> "" -//[no-compat] normalize-stderr-test "(error: internal compiler error: [^:]+):\d+:\d+: " -> "$1:LL:CC: " -//[no-compat] rustc-env:RUST_BACKTRACE=0 +//@ revisions: compat no-compat +//@[compat] check-pass +//@[no-compat] compile-flags: -Zno-implied-bounds-compat +//@[no-compat] check-fail +//@[no-compat] known-bug: #80409 +//@[no-compat] failure-status: 101 +//@[no-compat] normalize-stderr-test "note: .*\n\n" -> "" +//@[no-compat] normalize-stderr-test "thread 'rustc' panicked.*\n" -> "" +//@[no-compat] normalize-stderr-test "(error: internal compiler error: [^:]+):\d+:\d+: " -> "$1:LL:CC: " +//@[no-compat] rustc-env:RUST_BACKTRACE=0 #![allow(unreachable_code, unused)] diff --git a/tests/ui/inference/issue-81522.rs b/tests/ui/inference/issue-81522.rs index 902f8fdde58..859e5dcfe0c 100644 --- a/tests/ui/inference/issue-81522.rs +++ b/tests/ui/inference/issue-81522.rs @@ -3,9 +3,9 @@ // suppresses the corresponding diagnostics emitted from inside them. // But note that this attribute doesn't work for macro invocations if it is appended directly. -// aux-build:inference_unstable_iterator.rs -// aux-build:inference_unstable_itertools.rs -// run-pass +//@ aux-build:inference_unstable_iterator.rs +//@ aux-build:inference_unstable_itertools.rs +//@ run-pass extern crate inference_unstable_iterator; extern crate inference_unstable_itertools; diff --git a/tests/ui/inference/lub-glb-with-unbound-infer-var.rs b/tests/ui/inference/lub-glb-with-unbound-infer-var.rs index c9e117089f5..8660b62016f 100644 --- a/tests/ui/inference/lub-glb-with-unbound-infer-var.rs +++ b/tests/ui/inference/lub-glb-with-unbound-infer-var.rs @@ -1,4 +1,4 @@ -// run-pass +//@ run-pass // Test for a specific corner case: when we compute the LUB of two fn // types and their parameters have unbound variables. In that case, we // wind up relating those two variables. This was causing an ICE in an diff --git a/tests/ui/inference/newlambdas-ret-infer.rs b/tests/ui/inference/newlambdas-ret-infer.rs index 9b629838ffd..893b62e967d 100644 --- a/tests/ui/inference/newlambdas-ret-infer.rs +++ b/tests/ui/inference/newlambdas-ret-infer.rs @@ -1,10 +1,10 @@ -// run-pass +//@ run-pass #![allow(dead_code)] // Test that the lambda kind is inferred correctly as a return // expression -// pretty-expanded FIXME #23616 +//@ pretty-expanded FIXME #23616 fn unique() -> Box { return Box::new(|| ()); } diff --git a/tests/ui/inference/newlambdas-ret-infer2.rs b/tests/ui/inference/newlambdas-ret-infer2.rs index abe31a05f22..cad8b02910b 100644 --- a/tests/ui/inference/newlambdas-ret-infer2.rs +++ b/tests/ui/inference/newlambdas-ret-infer2.rs @@ -1,10 +1,10 @@ -// run-pass +//@ run-pass #![allow(dead_code)] // Test that the lambda kind is inferred correctly as a return // expression -// pretty-expanded FIXME #23616 +//@ pretty-expanded FIXME #23616 fn unique() -> Box { Box::new(|| ()) } diff --git a/tests/ui/inference/range-type-infer.rs b/tests/ui/inference/range-type-infer.rs index f07c041717f..1b449656634 100644 --- a/tests/ui/inference/range-type-infer.rs +++ b/tests/ui/inference/range-type-infer.rs @@ -1,4 +1,4 @@ -// run-pass +//@ run-pass #![allow(unused_must_use)] // Make sure the type inference for the new range expression work as diff --git a/tests/ui/inference/simple-infer.rs b/tests/ui/inference/simple-infer.rs index 561e4fdec7c..e933299f386 100644 --- a/tests/ui/inference/simple-infer.rs +++ b/tests/ui/inference/simple-infer.rs @@ -1,4 +1,4 @@ -// run-pass +//@ run-pass #![allow(unused_mut)] diff --git a/tests/ui/inference/str-as-char.fixed b/tests/ui/inference/str-as-char.fixed index 911b067c4d1..2032723f9de 100644 --- a/tests/ui/inference/str-as-char.fixed +++ b/tests/ui/inference/str-as-char.fixed @@ -1,7 +1,7 @@ // When a char literal is used where a str should be, // suggest changing to double quotes. -// run-rustfix +//@ run-rustfix fn main() { let _: &str = "a"; //~ ERROR mismatched types diff --git a/tests/ui/inference/str-as-char.rs b/tests/ui/inference/str-as-char.rs index 832bc871a9e..7680bce03b8 100644 --- a/tests/ui/inference/str-as-char.rs +++ b/tests/ui/inference/str-as-char.rs @@ -1,7 +1,7 @@ // When a char literal is used where a str should be, // suggest changing to double quotes. -// run-rustfix +//@ run-rustfix fn main() { let _: &str = 'a'; //~ ERROR mismatched types diff --git a/tests/ui/inference/type-infer-generalize-ty-var.rs b/tests/ui/inference/type-infer-generalize-ty-var.rs index 6bf3c61ada8..8dae835a9db 100644 --- a/tests/ui/inference/type-infer-generalize-ty-var.rs +++ b/tests/ui/inference/type-infer-generalize-ty-var.rs @@ -1,6 +1,6 @@ -// check-pass -// revisions: current next -//[next] compile-flags: -Znext-solver +//@ check-pass +//@ revisions: current next +//@[next] compile-flags: -Znext-solver #![allow(non_upper_case_globals)] #![allow(dead_code)] diff --git a/tests/ui/infinite/infinite-alias.rs b/tests/ui/infinite/infinite-alias.rs index 45356f359ce..7821780a9a1 100644 --- a/tests/ui/infinite/infinite-alias.rs +++ b/tests/ui/infinite/infinite-alias.rs @@ -1,4 +1,4 @@ -// aux-build: alias.rs +//@ aux-build: alias.rs // regression test for 108160 extern crate alias; diff --git a/tests/ui/infinite/infinite-autoderef.rs b/tests/ui/infinite/infinite-autoderef.rs index cbbe1f81df8..d6956e69457 100644 --- a/tests/ui/infinite/infinite-autoderef.rs +++ b/tests/ui/infinite/infinite-autoderef.rs @@ -1,5 +1,5 @@ -// error-pattern: reached the recursion limit while auto-dereferencing -// compile-flags: -Zdeduplicate-diagnostics=yes +//@ error-pattern: reached the recursion limit while auto-dereferencing +//@ compile-flags: -Zdeduplicate-diagnostics=yes use std::ops::Deref; diff --git a/tests/ui/infinite/infinite-instantiation.rs b/tests/ui/infinite/infinite-instantiation.rs index 9b9f332ca86..ed6fe693ebf 100644 --- a/tests/ui/infinite/infinite-instantiation.rs +++ b/tests/ui/infinite/infinite-instantiation.rs @@ -1,5 +1,5 @@ -// build-fail -// normalize-stderr-test: ".nll/" -> "/" +//@ build-fail +//@ normalize-stderr-test: ".nll/" -> "/" trait ToOpt: Sized { fn to_option(&self) -> Option; diff --git a/tests/ui/infinite/infinite-type-alias-mutual-recursion.rs b/tests/ui/infinite/infinite-type-alias-mutual-recursion.rs index 90c941c634e..91cfe89e28a 100644 --- a/tests/ui/infinite/infinite-type-alias-mutual-recursion.rs +++ b/tests/ui/infinite/infinite-type-alias-mutual-recursion.rs @@ -1,4 +1,4 @@ -// revisions: feature gated +//@ revisions: feature gated #![cfg_attr(feature, feature(lazy_type_alias))] #![allow(incomplete_features)] diff --git a/tests/ui/infinite/infinite-vec-type-recursion.rs b/tests/ui/infinite/infinite-vec-type-recursion.rs index 71ab4a33013..ff270f3bf8c 100644 --- a/tests/ui/infinite/infinite-vec-type-recursion.rs +++ b/tests/ui/infinite/infinite-vec-type-recursion.rs @@ -1,4 +1,4 @@ -// revisions: feature gated +//@ revisions: feature gated #![cfg_attr(feature, feature(lazy_type_alias))] #![allow(incomplete_features)] diff --git a/tests/ui/infinite/issue-41731-infinite-macro-print.rs b/tests/ui/infinite/issue-41731-infinite-macro-print.rs index d52e6e7e9eb..7cd3ff3d629 100644 --- a/tests/ui/infinite/issue-41731-infinite-macro-print.rs +++ b/tests/ui/infinite/issue-41731-infinite-macro-print.rs @@ -1,4 +1,4 @@ -// compile-flags: -Z trace-macros +//@ compile-flags: -Z trace-macros #![recursion_limit = "5"] diff --git a/tests/ui/infinite/issue-41731-infinite-macro-println.rs b/tests/ui/infinite/issue-41731-infinite-macro-println.rs index 3c2b7ee023b..491f18dc4c6 100644 --- a/tests/ui/infinite/issue-41731-infinite-macro-println.rs +++ b/tests/ui/infinite/issue-41731-infinite-macro-println.rs @@ -1,4 +1,4 @@ -// compile-flags: -Z trace-macros +//@ compile-flags: -Z trace-macros #![recursion_limit = "5"] diff --git a/tests/ui/inherent-impls-overlap-check/auxiliary/repeat.rs b/tests/ui/inherent-impls-overlap-check/auxiliary/repeat.rs index 42ed5d19deb..a2970cb5c80 100644 --- a/tests/ui/inherent-impls-overlap-check/auxiliary/repeat.rs +++ b/tests/ui/inherent-impls-overlap-check/auxiliary/repeat.rs @@ -1,5 +1,5 @@ -// force-host -// no-prefer-dynamic +//@ force-host +//@ no-prefer-dynamic #![crate_type = "proc-macro"] diff --git a/tests/ui/inherent-impls-overlap-check/no-overlap.rs b/tests/ui/inherent-impls-overlap-check/no-overlap.rs index 450e6d4202c..85565a221ac 100644 --- a/tests/ui/inherent-impls-overlap-check/no-overlap.rs +++ b/tests/ui/inherent-impls-overlap-check/no-overlap.rs @@ -1,5 +1,5 @@ -// run-pass -// aux-build:repeat.rs +//@ run-pass +//@ aux-build:repeat.rs // This tests the allocating algo branch of the // inherent impls overlap checker. diff --git a/tests/ui/inherent-impls-overlap-check/overlap.rs b/tests/ui/inherent-impls-overlap-check/overlap.rs index 6f2801197e9..32653943698 100644 --- a/tests/ui/inherent-impls-overlap-check/overlap.rs +++ b/tests/ui/inherent-impls-overlap-check/overlap.rs @@ -1,4 +1,4 @@ -// aux-build:repeat.rs +//@ aux-build:repeat.rs #![allow(unused)] diff --git a/tests/ui/inherit-env.rs b/tests/ui/inherit-env.rs index e29fa04bbd5..e4ae8145d71 100644 --- a/tests/ui/inherit-env.rs +++ b/tests/ui/inherit-env.rs @@ -1,7 +1,7 @@ -// run-pass -// ignore-emscripten -// ignore-wasm32 -// ignore-sgx no processes +//@ run-pass +//@ ignore-emscripten +//@ ignore-wasm32 +//@ ignore-sgx no processes use std::env; use std::process::Command; diff --git a/tests/ui/inline-const/const-expr-array-init.rs b/tests/ui/inline-const/const-expr-array-init.rs index 8a92cdbc0f9..075c27c1cc9 100644 --- a/tests/ui/inline-const/const-expr-array-init.rs +++ b/tests/ui/inline-const/const-expr-array-init.rs @@ -1,4 +1,4 @@ -// build-pass +//@ build-pass #![feature(inline_const)] diff --git a/tests/ui/inline-const/const-expr-basic.rs b/tests/ui/inline-const/const-expr-basic.rs index dac46fe25ec..6a19cc656d0 100644 --- a/tests/ui/inline-const/const-expr-basic.rs +++ b/tests/ui/inline-const/const-expr-basic.rs @@ -1,4 +1,4 @@ -// run-pass +//@ run-pass #![feature(inline_const)] diff --git a/tests/ui/inline-const/const-expr-generic-err.rs b/tests/ui/inline-const/const-expr-generic-err.rs index 4e8879af54a..3c4bbcb3dc9 100644 --- a/tests/ui/inline-const/const-expr-generic-err.rs +++ b/tests/ui/inline-const/const-expr-generic-err.rs @@ -1,4 +1,4 @@ -// build-fail +//@ build-fail #![feature(inline_const)] fn foo() { diff --git a/tests/ui/inline-const/const-expr-generic.rs b/tests/ui/inline-const/const-expr-generic.rs index 3207bfa0e89..e634e1d4a47 100644 --- a/tests/ui/inline-const/const-expr-generic.rs +++ b/tests/ui/inline-const/const-expr-generic.rs @@ -1,4 +1,4 @@ -// check-pass +//@ check-pass #![feature(inline_const)] fn foo() -> usize { diff --git a/tests/ui/inline-const/const-expr-inference.rs b/tests/ui/inline-const/const-expr-inference.rs index 0d5892a74d9..f3b97d3430e 100644 --- a/tests/ui/inline-const/const-expr-inference.rs +++ b/tests/ui/inline-const/const-expr-inference.rs @@ -1,4 +1,4 @@ -// check-pass +//@ check-pass #![feature(inline_const)] diff --git a/tests/ui/inline-const/const-expr-lifetime.rs b/tests/ui/inline-const/const-expr-lifetime.rs index d883deb2845..5dac17645d7 100644 --- a/tests/ui/inline-const/const-expr-lifetime.rs +++ b/tests/ui/inline-const/const-expr-lifetime.rs @@ -1,4 +1,4 @@ -// run-pass +//@ run-pass #![feature(const_mut_refs)] #![feature(inline_const)] diff --git a/tests/ui/inline-const/const-expr-macro.rs b/tests/ui/inline-const/const-expr-macro.rs index 041f3e15a29..bf3cb3c3320 100644 --- a/tests/ui/inline-const/const-expr-macro.rs +++ b/tests/ui/inline-const/const-expr-macro.rs @@ -1,4 +1,4 @@ -// run-pass +//@ run-pass #![feature(inline_const)] diff --git a/tests/ui/inline-const/const-expr-reference.rs b/tests/ui/inline-const/const-expr-reference.rs index a54d879f69d..b3753b0d371 100644 --- a/tests/ui/inline-const/const-expr-reference.rs +++ b/tests/ui/inline-const/const-expr-reference.rs @@ -1,4 +1,4 @@ -// run-pass +//@ run-pass #![feature(inline_const)] diff --git a/tests/ui/inline-const/const-match-pat-inference.rs b/tests/ui/inline-const/const-match-pat-inference.rs index c595824833f..3d3533839bc 100644 --- a/tests/ui/inline-const/const-match-pat-inference.rs +++ b/tests/ui/inline-const/const-match-pat-inference.rs @@ -1,4 +1,4 @@ -// check-pass +//@ check-pass #![feature(inline_const_pat)] diff --git a/tests/ui/inline-const/const-match-pat-lifetime.rs b/tests/ui/inline-const/const-match-pat-lifetime.rs index 595741b101e..f909e68e7be 100644 --- a/tests/ui/inline-const/const-match-pat-lifetime.rs +++ b/tests/ui/inline-const/const-match-pat-lifetime.rs @@ -1,4 +1,4 @@ -// run-pass +//@ run-pass #![feature(const_mut_refs)] #![feature(inline_const)] diff --git a/tests/ui/inline-const/const-match-pat-range.rs b/tests/ui/inline-const/const-match-pat-range.rs index 0f9372c537f..7f51815cb77 100644 --- a/tests/ui/inline-const/const-match-pat-range.rs +++ b/tests/ui/inline-const/const-match-pat-range.rs @@ -1,4 +1,4 @@ -// build-pass +//@ build-pass #![feature(inline_const_pat, exclusive_range_pattern)] diff --git a/tests/ui/inline-const/const-match-pat.rs b/tests/ui/inline-const/const-match-pat.rs index fc4d3771458..1580ef25812 100644 --- a/tests/ui/inline-const/const-match-pat.rs +++ b/tests/ui/inline-const/const-match-pat.rs @@ -1,4 +1,4 @@ -// run-pass +//@ run-pass #![feature(inline_const_pat)] const MMIO_BIT1: u8 = 4; diff --git a/tests/ui/inline-const/elided-lifetime-being-infer-vars.rs b/tests/ui/inline-const/elided-lifetime-being-infer-vars.rs index 5661db4a253..a1c3c61484a 100644 --- a/tests/ui/inline-const/elided-lifetime-being-infer-vars.rs +++ b/tests/ui/inline-const/elided-lifetime-being-infer-vars.rs @@ -1,4 +1,4 @@ -// check-pass +//@ check-pass #![feature(inline_const)] diff --git a/tests/ui/inline-const/expr-unsafe.rs b/tests/ui/inline-const/expr-unsafe.rs index 2370c58a712..f9d1450503e 100644 --- a/tests/ui/inline-const/expr-unsafe.rs +++ b/tests/ui/inline-const/expr-unsafe.rs @@ -1,4 +1,4 @@ -// check-pass +//@ check-pass #![warn(unused_unsafe)] #![feature(inline_const)] diff --git a/tests/ui/inline-const/expr-with-block.rs b/tests/ui/inline-const/expr-with-block.rs index 391872476fc..07a1c9a10f5 100644 --- a/tests/ui/inline-const/expr-with-block.rs +++ b/tests/ui/inline-const/expr-with-block.rs @@ -1,4 +1,4 @@ -// check-pass +//@ check-pass #![feature(inline_const)] fn main() { match true { diff --git a/tests/ui/inline-const/instance-doesnt-depend-on-type.rs b/tests/ui/inline-const/instance-doesnt-depend-on-type.rs index bc739785c8b..17208a23088 100644 --- a/tests/ui/inline-const/instance-doesnt-depend-on-type.rs +++ b/tests/ui/inline-const/instance-doesnt-depend-on-type.rs @@ -1,4 +1,4 @@ -// check-pass +//@ check-pass // issue: 114660 #![feature(inline_const)] diff --git a/tests/ui/inline-const/interpolated.rs b/tests/ui/inline-const/interpolated.rs index 3fcc621c946..582900e7aa0 100644 --- a/tests/ui/inline-const/interpolated.rs +++ b/tests/ui/inline-const/interpolated.rs @@ -1,4 +1,4 @@ -// check-pass +//@ check-pass #![feature(inline_const)] diff --git a/tests/ui/inline-const/macro-with-const.rs b/tests/ui/inline-const/macro-with-const.rs index e7393166d8d..ba75a28f736 100644 --- a/tests/ui/inline-const/macro-with-const.rs +++ b/tests/ui/inline-const/macro-with-const.rs @@ -1,4 +1,4 @@ -// check-pass +//@ check-pass macro_rules! exp { (const $n:expr) => { diff --git a/tests/ui/inline-const/pat-unsafe.rs b/tests/ui/inline-const/pat-unsafe.rs index 5a90920ef3c..4b05f3a1cdd 100644 --- a/tests/ui/inline-const/pat-unsafe.rs +++ b/tests/ui/inline-const/pat-unsafe.rs @@ -1,4 +1,4 @@ -// check-pass +//@ check-pass #![warn(unused_unsafe)] #![feature(inline_const_pat)] diff --git a/tests/ui/inline-const/required-const.rs b/tests/ui/inline-const/required-const.rs index 0483410662b..3de0ab2a0c0 100644 --- a/tests/ui/inline-const/required-const.rs +++ b/tests/ui/inline-const/required-const.rs @@ -1,5 +1,5 @@ -// build-fail -// compile-flags: -Zmir-opt-level=3 +//@ build-fail +//@ compile-flags: -Zmir-opt-level=3 #![feature(inline_const)] fn foo() { diff --git a/tests/ui/inlined-main.rs b/tests/ui/inlined-main.rs index 75ff4c87dc6..731ac0dddca 100644 --- a/tests/ui/inlined-main.rs +++ b/tests/ui/inlined-main.rs @@ -1,4 +1,4 @@ -// run-pass +//@ run-pass #[inline(always)] fn main() {} diff --git a/tests/ui/inner-attrs-on-impl.rs b/tests/ui/inner-attrs-on-impl.rs index 636e8c4885e..1c94169a2e5 100644 --- a/tests/ui/inner-attrs-on-impl.rs +++ b/tests/ui/inner-attrs-on-impl.rs @@ -1,4 +1,4 @@ -// run-pass +//@ run-pass struct Foo; diff --git a/tests/ui/inner-module.rs b/tests/ui/inner-module.rs index 363f753e248..111f2cab857 100644 --- a/tests/ui/inner-module.rs +++ b/tests/ui/inner-module.rs @@ -1,4 +1,4 @@ -// run-pass +//@ run-pass mod inner { pub mod inner2 { diff --git a/tests/ui/inner-static.rs b/tests/ui/inner-static.rs index adba299ebe2..9455ec5712f 100644 --- a/tests/ui/inner-static.rs +++ b/tests/ui/inner-static.rs @@ -1,5 +1,5 @@ -// run-pass -// aux-build:inner_static.rs +//@ run-pass +//@ aux-build:inner_static.rs extern crate inner_static; diff --git a/tests/ui/instrument-coverage/bad-value.rs b/tests/ui/instrument-coverage/bad-value.rs index 1925c36aa53..34417385291 100644 --- a/tests/ui/instrument-coverage/bad-value.rs +++ b/tests/ui/instrument-coverage/bad-value.rs @@ -1,5 +1,5 @@ -// revisions: blank bad -// [blank] compile-flags: -Cinstrument-coverage= -// [bad] compile-flags: -Cinstrument-coverage=bad-value +//@ revisions: blank bad +//@ [blank] compile-flags: -Cinstrument-coverage= +//@ [bad] compile-flags: -Cinstrument-coverage=bad-value fn main() {} diff --git a/tests/ui/instrument-coverage/off-values.rs b/tests/ui/instrument-coverage/off-values.rs index 0f9a0c47425..bd13e5d7495 100644 --- a/tests/ui/instrument-coverage/off-values.rs +++ b/tests/ui/instrument-coverage/off-values.rs @@ -1,9 +1,9 @@ -// check-pass -// 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-pass +//@ 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 fn main() {} diff --git a/tests/ui/instrument-coverage/on-values.rs b/tests/ui/instrument-coverage/on-values.rs index cc54c71c656..36643c40525 100644 --- a/tests/ui/instrument-coverage/on-values.rs +++ b/tests/ui/instrument-coverage/on-values.rs @@ -1,11 +1,11 @@ -// check-pass -// 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-pass +//@ 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 fn main() {} diff --git a/tests/ui/instrument-coverage/unstable.rs b/tests/ui/instrument-coverage/unstable.rs index c16bcd0bf6d..ea2279aaf0c 100644 --- a/tests/ui/instrument-coverage/unstable.rs +++ b/tests/ui/instrument-coverage/unstable.rs @@ -1,6 +1,6 @@ -// revisions: branch except-unused-functions except-unused-generics -// [branch] compile-flags: -Cinstrument-coverage=branch -// [except-unused-functions] compile-flags: -Cinstrument-coverage=except-unused-functions -// [except-unused-generics] compile-flags: -Cinstrument-coverage=except-unused-generics +//@ revisions: branch except-unused-functions except-unused-generics +//@ [branch] compile-flags: -Cinstrument-coverage=branch +//@ [except-unused-functions] compile-flags: -Cinstrument-coverage=except-unused-functions +//@ [except-unused-generics] compile-flags: -Cinstrument-coverage=except-unused-generics fn main() {} diff --git a/tests/ui/instrument-xray/flags-always-never-1.rs b/tests/ui/instrument-xray/flags-always-never-1.rs index 4dd43439eb7..91032662e6b 100644 --- a/tests/ui/instrument-xray/flags-always-never-1.rs +++ b/tests/ui/instrument-xray/flags-always-never-1.rs @@ -1,7 +1,7 @@ // Checks that `-Z instrument-xray` does not allow `always` and `never` simultaneously. // -// needs-xray -// compile-flags: -Z instrument-xray=always,never -// error-pattern: incorrect value `always,never` for unstable option `instrument-xray` +//@ needs-xray +//@ compile-flags: -Z instrument-xray=always,never +//@ error-pattern: incorrect value `always,never` for unstable option `instrument-xray` fn main() {} diff --git a/tests/ui/instrument-xray/flags-always-never-2.rs b/tests/ui/instrument-xray/flags-always-never-2.rs index 7310aa0a0d2..dd4deaad326 100644 --- a/tests/ui/instrument-xray/flags-always-never-2.rs +++ b/tests/ui/instrument-xray/flags-always-never-2.rs @@ -1,9 +1,9 @@ // Checks that `-Z instrument-xray` allows `always` and `never` sequentially. // (The last specified setting wins, like `-Z instrument-xray=no` as well.) // -// needs-xray -// compile-flags: -Z instrument-xray=always -// compile-flags: -Z instrument-xray=never -// check-pass +//@ needs-xray +//@ compile-flags: -Z instrument-xray=always +//@ compile-flags: -Z instrument-xray=never +//@ check-pass fn main() {} diff --git a/tests/ui/instrument-xray/flags-basic.rs b/tests/ui/instrument-xray/flags-basic.rs index b97f0dd8a07..ab9b7666430 100644 --- a/tests/ui/instrument-xray/flags-basic.rs +++ b/tests/ui/instrument-xray/flags-basic.rs @@ -1,9 +1,9 @@ // Verifies basic `-Z instrument-xray` flags. // -// needs-xray -// compile-flags: -Z instrument-xray -// compile-flags: -Z instrument-xray=skip-exit -// compile-flags: -Z instrument-xray=ignore-loops,instruction-threshold=300 -// check-pass +//@ needs-xray +//@ compile-flags: -Z instrument-xray +//@ compile-flags: -Z instrument-xray=skip-exit +//@ compile-flags: -Z instrument-xray=ignore-loops,instruction-threshold=300 +//@ check-pass fn main() {} diff --git a/tests/ui/instrument-xray/flags-dupe-always.rs b/tests/ui/instrument-xray/flags-dupe-always.rs index 407f3e2aa5d..41e4f267b47 100644 --- a/tests/ui/instrument-xray/flags-dupe-always.rs +++ b/tests/ui/instrument-xray/flags-dupe-always.rs @@ -1,7 +1,7 @@ // Checks that `-Z instrument-xray` does not allow duplicates. // -// needs-xray -// compile-flags: -Z instrument-xray=always,always -// error-pattern: incorrect value `always,always` for unstable option `instrument-xray` +//@ needs-xray +//@ compile-flags: -Z instrument-xray=always,always +//@ error-pattern: incorrect value `always,always` for unstable option `instrument-xray` fn main() {} diff --git a/tests/ui/instrument-xray/flags-dupe-ignore-loops.rs b/tests/ui/instrument-xray/flags-dupe-ignore-loops.rs index 75b210a6547..ba5ea28d40b 100644 --- a/tests/ui/instrument-xray/flags-dupe-ignore-loops.rs +++ b/tests/ui/instrument-xray/flags-dupe-ignore-loops.rs @@ -1,7 +1,7 @@ // Checks that `-Z instrument-xray` does not allow duplicates. // -// needs-xray -// compile-flags: -Z instrument-xray=ignore-loops,ignore-loops -// error-pattern: incorrect value `ignore-loops,ignore-loops` for unstable option `instrument-xray` +//@ needs-xray +//@ compile-flags: -Z instrument-xray=ignore-loops,ignore-loops +//@ error-pattern: incorrect value `ignore-loops,ignore-loops` for unstable option `instrument-xray` fn main() {} diff --git a/tests/ui/instrument-xray/target-not-supported.rs b/tests/ui/instrument-xray/target-not-supported.rs index e6bdd23e8fc..cdae26f993d 100644 --- a/tests/ui/instrument-xray/target-not-supported.rs +++ b/tests/ui/instrument-xray/target-not-supported.rs @@ -1,8 +1,8 @@ // Verifies that `-Z instrument-xray` cannot be used with unsupported targets, // -// needs-llvm-components: x86 -// compile-flags: -Z instrument-xray --target x86_64-apple-darwin -// error-pattern: error: XRay instrumentation is not supported for this target +//@ needs-llvm-components: x86 +//@ compile-flags: -Z instrument-xray --target x86_64-apple-darwin +//@ error-pattern: error: XRay instrumentation is not supported for this target #![feature(no_core)] #![no_core] diff --git a/tests/ui/internal-lints/diagnostics_incorrect.rs b/tests/ui/internal-lints/diagnostics_incorrect.rs index 99f99ffcd35..c1532aa9d57 100644 --- a/tests/ui/internal-lints/diagnostics_incorrect.rs +++ b/tests/ui/internal-lints/diagnostics_incorrect.rs @@ -1,4 +1,4 @@ -// compile-flags: -Z unstable-options +//@ compile-flags: -Z unstable-options #![feature(rustc_attrs)] diff --git a/tests/ui/internal-lints/existing_doc_keyword.rs b/tests/ui/internal-lints/existing_doc_keyword.rs index 7783dc40fcf..16c350287b2 100644 --- a/tests/ui/internal-lints/existing_doc_keyword.rs +++ b/tests/ui/internal-lints/existing_doc_keyword.rs @@ -1,4 +1,4 @@ -// compile-flags: -Z unstable-options +//@ compile-flags: -Z unstable-options #![feature(rustc_private)] #![feature(rustdoc_internals)] diff --git a/tests/ui/internal-lints/query_stability_incorrect.rs b/tests/ui/internal-lints/query_stability_incorrect.rs index f478b73329e..a428611caaa 100644 --- a/tests/ui/internal-lints/query_stability_incorrect.rs +++ b/tests/ui/internal-lints/query_stability_incorrect.rs @@ -1,4 +1,4 @@ -// compile-flags: -Z unstable-options +//@ compile-flags: -Z unstable-options #![feature(rustc_attrs)] diff --git a/tests/ui/internal-lints/rustc_pass_by_value_self.rs b/tests/ui/internal-lints/rustc_pass_by_value_self.rs index 6ce67dcaf1d..d2e0e272025 100644 --- a/tests/ui/internal-lints/rustc_pass_by_value_self.rs +++ b/tests/ui/internal-lints/rustc_pass_by_value_self.rs @@ -1,4 +1,4 @@ -// compile-flags: -Z unstable-options +//@ compile-flags: -Z unstable-options // NOTE: This test doesn't actually require `fulldeps` // so we could instead use it as a `ui` test. // diff --git a/tests/ui/internal/internal-unstable-noallow.rs b/tests/ui/internal/internal-unstable-noallow.rs index 616f6668d02..9d925c86122 100644 --- a/tests/ui/internal/internal-unstable-noallow.rs +++ b/tests/ui/internal/internal-unstable-noallow.rs @@ -3,11 +3,11 @@ // cross-crate macros, and hence need to use error-pattern instead of // the // ~ form. -// aux-build:internal_unstable.rs -// error-pattern:use of unstable library feature 'function' -// error-pattern:use of unstable library feature 'struct_field' -// error-pattern:use of unstable library feature 'method' -// error-pattern:use of unstable library feature 'struct2_field' +//@ aux-build:internal_unstable.rs +//@ error-pattern:use of unstable library feature 'function' +//@ error-pattern:use of unstable library feature 'struct_field' +//@ error-pattern:use of unstable library feature 'method' +//@ error-pattern:use of unstable library feature 'struct2_field' #[macro_use] extern crate internal_unstable; diff --git a/tests/ui/internal/internal-unstable-thread-local.rs b/tests/ui/internal/internal-unstable-thread-local.rs index b9194c6b370..351ba03b1b7 100644 --- a/tests/ui/internal/internal-unstable-thread-local.rs +++ b/tests/ui/internal/internal-unstable-thread-local.rs @@ -1,4 +1,4 @@ -// aux-build:internal_unstable.rs +//@ aux-build:internal_unstable.rs #![allow(dead_code)] diff --git a/tests/ui/internal/internal-unstable.rs b/tests/ui/internal/internal-unstable.rs index a4445fefef5..35a2941633a 100644 --- a/tests/ui/internal/internal-unstable.rs +++ b/tests/ui/internal/internal-unstable.rs @@ -1,4 +1,4 @@ -// aux-build:internal_unstable.rs +//@ aux-build:internal_unstable.rs #![feature(allow_internal_unstable)] #[allow(dead_code)] diff --git a/tests/ui/intrinsics/bad-intrinsic-monomorphization.rs b/tests/ui/intrinsics/bad-intrinsic-monomorphization.rs index f36a5f1acc1..a9c92f23cdd 100644 --- a/tests/ui/intrinsics/bad-intrinsic-monomorphization.rs +++ b/tests/ui/intrinsics/bad-intrinsic-monomorphization.rs @@ -1,4 +1,4 @@ -// build-fail +//@ build-fail #![feature(repr_simd, platform_intrinsics, core_intrinsics)] #![allow(warnings)] diff --git a/tests/ui/intrinsics/const-eval-select-backtrace-std.rs b/tests/ui/intrinsics/const-eval-select-backtrace-std.rs index 1164a3a5b01..1707ed3f1bd 100644 --- a/tests/ui/intrinsics/const-eval-select-backtrace-std.rs +++ b/tests/ui/intrinsics/const-eval-select-backtrace-std.rs @@ -1,7 +1,7 @@ // See issue #100696. -// run-fail -// check-run-results -// exec-env:RUST_BACKTRACE=0 +//@ run-fail +//@ check-run-results +//@ exec-env:RUST_BACKTRACE=0 fn main() { &""[1..]; } diff --git a/tests/ui/intrinsics/const-eval-select-backtrace.rs b/tests/ui/intrinsics/const-eval-select-backtrace.rs index ef1c7c4195b..d6b1c865bdf 100644 --- a/tests/ui/intrinsics/const-eval-select-backtrace.rs +++ b/tests/ui/intrinsics/const-eval-select-backtrace.rs @@ -1,8 +1,8 @@ #![feature(core_intrinsics)] // See issue #100696. -// run-fail -// check-run-results -// exec-env:RUST_BACKTRACE=0 +//@ run-fail +//@ check-run-results +//@ exec-env:RUST_BACKTRACE=0 #[track_caller] fn uhoh() { diff --git a/tests/ui/intrinsics/const-eval-select-x86_64.rs b/tests/ui/intrinsics/const-eval-select-x86_64.rs index f3924acf0fa..5ba7a443d0b 100644 --- a/tests/ui/intrinsics/const-eval-select-x86_64.rs +++ b/tests/ui/intrinsics/const-eval-select-x86_64.rs @@ -1,5 +1,5 @@ -// run-pass -// only-x86_64 +//@ run-pass +//@ only-x86_64 #![feature(const_eval_select)] #![feature(core_intrinsics)] diff --git a/tests/ui/intrinsics/const-eval-select.rs b/tests/ui/intrinsics/const-eval-select.rs index 9ff20d3fbdd..353105cb0a1 100644 --- a/tests/ui/intrinsics/const-eval-select.rs +++ b/tests/ui/intrinsics/const-eval-select.rs @@ -1,4 +1,4 @@ -// run-pass +//@ run-pass #![feature(const_eval_select)] #![feature(core_intrinsics)] diff --git a/tests/ui/intrinsics/intrinsic-alignment.rs b/tests/ui/intrinsics/intrinsic-alignment.rs index 6f9df64417e..69ccab201e6 100644 --- a/tests/ui/intrinsics/intrinsic-alignment.rs +++ b/tests/ui/intrinsics/intrinsic-alignment.rs @@ -1,5 +1,5 @@ -// run-pass -// ignore-wasm32-bare seems not important to test here +//@ run-pass +//@ ignore-wasm32-bare seems not important to test here #![feature(intrinsics, rustc_attrs)] diff --git a/tests/ui/intrinsics/intrinsic-assume.rs b/tests/ui/intrinsics/intrinsic-assume.rs index 3c9d70cb556..38ff8e31b33 100644 --- a/tests/ui/intrinsics/intrinsic-assume.rs +++ b/tests/ui/intrinsics/intrinsic-assume.rs @@ -1,4 +1,4 @@ -// run-pass +//@ run-pass #![feature(core_intrinsics)] use std::intrinsics::assume; diff --git a/tests/ui/intrinsics/intrinsic-atomics-cc.rs b/tests/ui/intrinsics/intrinsic-atomics-cc.rs index ce3fa7b0c05..612a21a47cf 100644 --- a/tests/ui/intrinsics/intrinsic-atomics-cc.rs +++ b/tests/ui/intrinsics/intrinsic-atomics-cc.rs @@ -1,5 +1,5 @@ -// run-pass -// aux-build:cci_intrinsic.rs +//@ run-pass +//@ aux-build:cci_intrinsic.rs extern crate cci_intrinsic; diff --git a/tests/ui/intrinsics/intrinsic-atomics.rs b/tests/ui/intrinsics/intrinsic-atomics.rs index b17f4347be3..4ad267e3ddb 100644 --- a/tests/ui/intrinsics/intrinsic-atomics.rs +++ b/tests/ui/intrinsics/intrinsic-atomics.rs @@ -1,4 +1,4 @@ -// run-pass +//@ run-pass #![feature(intrinsics)] mod rusti { diff --git a/tests/ui/intrinsics/intrinsic-nearby.rs b/tests/ui/intrinsics/intrinsic-nearby.rs index 7b1d1eeaadb..990ecfc2b70 100644 --- a/tests/ui/intrinsics/intrinsic-nearby.rs +++ b/tests/ui/intrinsics/intrinsic-nearby.rs @@ -1,4 +1,4 @@ -// run-pass +//@ run-pass #![feature(core_intrinsics)] use std::intrinsics::*; diff --git a/tests/ui/intrinsics/intrinsic-raw_eq-const.rs b/tests/ui/intrinsics/intrinsic-raw_eq-const.rs index 32841f5318f..47b4e20dfbb 100644 --- a/tests/ui/intrinsics/intrinsic-raw_eq-const.rs +++ b/tests/ui/intrinsics/intrinsic-raw_eq-const.rs @@ -1,4 +1,4 @@ -// run-pass +//@ run-pass #![feature(core_intrinsics)] #![feature(const_intrinsic_raw_eq)] diff --git a/tests/ui/intrinsics/intrinsic-unreachable.rs b/tests/ui/intrinsics/intrinsic-unreachable.rs index 73dd71d482f..f4343719876 100644 --- a/tests/ui/intrinsics/intrinsic-unreachable.rs +++ b/tests/ui/intrinsics/intrinsic-unreachable.rs @@ -1,4 +1,4 @@ -// run-pass +//@ run-pass #![feature(core_intrinsics)] use std::intrinsics; diff --git a/tests/ui/intrinsics/intrinsic-volatile.rs b/tests/ui/intrinsics/intrinsic-volatile.rs index 7b2c825a208..245a716d55c 100644 --- a/tests/ui/intrinsics/intrinsic-volatile.rs +++ b/tests/ui/intrinsics/intrinsic-volatile.rs @@ -1,4 +1,4 @@ -// run-pass +//@ run-pass #![feature(core_intrinsics)] diff --git a/tests/ui/intrinsics/intrinsics-integer.rs b/tests/ui/intrinsics/intrinsics-integer.rs index 88bf42b685f..bfd7e4714fe 100644 --- a/tests/ui/intrinsics/intrinsics-integer.rs +++ b/tests/ui/intrinsics/intrinsics-integer.rs @@ -1,4 +1,4 @@ -// run-pass +//@ run-pass #![feature(intrinsics)] #![feature(rustc_attrs)] diff --git a/tests/ui/intrinsics/intrinsics-math.rs b/tests/ui/intrinsics/intrinsics-math.rs index aea9fde6915..4b1a1e871da 100644 --- a/tests/ui/intrinsics/intrinsics-math.rs +++ b/tests/ui/intrinsics/intrinsics-math.rs @@ -1,5 +1,5 @@ -// run-pass -// ignore-emscripten fma not implemented in emscripten +//@ run-pass +//@ ignore-emscripten fma not implemented in emscripten macro_rules! assert_approx_eq { ($a:expr, $b:expr) => ({ diff --git a/tests/ui/intrinsics/issue-84297-reifying-copy.rs b/tests/ui/intrinsics/issue-84297-reifying-copy.rs index 08ba9ce7ecb..6795f5d65b2 100644 --- a/tests/ui/intrinsics/issue-84297-reifying-copy.rs +++ b/tests/ui/intrinsics/issue-84297-reifying-copy.rs @@ -1,4 +1,4 @@ -// check-pass +//@ check-pass fn main() { let _unused = if true { diff --git a/tests/ui/intrinsics/non-integer-atomic.rs b/tests/ui/intrinsics/non-integer-atomic.rs index 85ea81ba679..2d1d0882084 100644 --- a/tests/ui/intrinsics/non-integer-atomic.rs +++ b/tests/ui/intrinsics/non-integer-atomic.rs @@ -1,4 +1,4 @@ -// build-fail +//@ build-fail #![feature(core_intrinsics)] #![allow(warnings)] diff --git a/tests/ui/intrinsics/panic-uninitialized-zeroed.rs b/tests/ui/intrinsics/panic-uninitialized-zeroed.rs index 6db2ebb9754..2420aec5058 100644 --- a/tests/ui/intrinsics/panic-uninitialized-zeroed.rs +++ b/tests/ui/intrinsics/panic-uninitialized-zeroed.rs @@ -1,9 +1,9 @@ -// run-pass -// revisions: default strict -// [strict]compile-flags: -Zstrict-init-checks +//@ run-pass +//@ revisions: default strict +//@ [strict]compile-flags: -Zstrict-init-checks // ignore-tidy-linelength -// ignore-emscripten spawning processes is not supported -// ignore-sgx no processes +//@ ignore-emscripten spawning processes is not supported +//@ ignore-sgx no processes // This test checks panic emitted from `mem::{uninitialized,zeroed}`. diff --git a/tests/ui/invalid-compile-flags/branch-protection-missing-pac-ret.rs b/tests/ui/invalid-compile-flags/branch-protection-missing-pac-ret.rs index 1d7ec5cba17..c0a4bcac11b 100644 --- a/tests/ui/invalid-compile-flags/branch-protection-missing-pac-ret.rs +++ b/tests/ui/invalid-compile-flags/branch-protection-missing-pac-ret.rs @@ -1,10 +1,10 @@ -// revisions: BADFLAGS BADTARGET -// [BADFLAGS] compile-flags: --target=aarch64-unknown-linux-gnu -Zbranch-protection=leaf -// [BADFLAGS] check-fail -// [BADFLAGS] needs-llvm-components: aarch64 -// [BADTARGET] compile-flags: --target=x86_64-unknown-linux-gnu -Zbranch-protection=bti -// [BADTARGET] check-fail -// [BADTARGET] needs-llvm-components: x86 +//@ revisions: BADFLAGS BADTARGET +//@ [BADFLAGS] compile-flags: --target=aarch64-unknown-linux-gnu -Zbranch-protection=leaf +//@ [BADFLAGS] check-fail +//@ [BADFLAGS] needs-llvm-components: aarch64 +//@ [BADTARGET] compile-flags: --target=x86_64-unknown-linux-gnu -Zbranch-protection=bti +//@ [BADTARGET] check-fail +//@ [BADTARGET] needs-llvm-components: x86 #![crate_type = "lib"] #![feature(no_core, lang_items)] diff --git a/tests/ui/invalid-compile-flags/codegen-option-without-group.rs b/tests/ui/invalid-compile-flags/codegen-option-without-group.rs index 7bbf47a3839..872b1b673ad 100644 --- a/tests/ui/invalid-compile-flags/codegen-option-without-group.rs +++ b/tests/ui/invalid-compile-flags/codegen-option-without-group.rs @@ -1 +1 @@ -// compile-flags: --llvm-args +//@ compile-flags: --llvm-args diff --git a/tests/ui/invalid-compile-flags/debug-option-without-group.rs b/tests/ui/invalid-compile-flags/debug-option-without-group.rs index 86e40c17854..77e73bf5f8a 100644 --- a/tests/ui/invalid-compile-flags/debug-option-without-group.rs +++ b/tests/ui/invalid-compile-flags/debug-option-without-group.rs @@ -1 +1 @@ -// compile-flags: --unpretty=hir +//@ compile-flags: --unpretty=hir diff --git a/tests/ui/invalid-compile-flags/fuel.rs b/tests/ui/invalid-compile-flags/fuel.rs index 456bc47d359..855aa858122 100644 --- a/tests/ui/invalid-compile-flags/fuel.rs +++ b/tests/ui/invalid-compile-flags/fuel.rs @@ -1,11 +1,11 @@ -// revisions: incremental threads -// dont-check-compiler-stderr +//@ revisions: incremental threads +//@ dont-check-compiler-stderr // -// [threads] compile-flags: -Zfuel=a=1 -Zthreads=2 -// [threads] error-pattern:optimization fuel is incompatible with multiple threads +//@ [threads] compile-flags: -Zfuel=a=1 -Zthreads=2 +//@ [threads] error-pattern:optimization fuel is incompatible with multiple threads // -// [incremental] incremental -// [incremental] compile-flags: -Zprint-fuel=a -// [incremental] error-pattern:optimization fuel is incompatible with incremental compilation +//@ [incremental] incremental +//@ [incremental] compile-flags: -Zprint-fuel=a +//@ [incremental] error-pattern:optimization fuel is incompatible with incremental compilation fn main() {} diff --git a/tests/ui/invalid-compile-flags/function-return/requires-x86-or-x86_64.rs b/tests/ui/invalid-compile-flags/function-return/requires-x86-or-x86_64.rs index 15a88ebdb11..6a4ecb9d839 100644 --- a/tests/ui/invalid-compile-flags/function-return/requires-x86-or-x86_64.rs +++ b/tests/ui/invalid-compile-flags/function-return/requires-x86-or-x86_64.rs @@ -1,19 +1,19 @@ -// revisions: x86 x86_64 aarch64 +//@ revisions: x86 x86_64 aarch64 -// compile-flags: -Zfunction-return=thunk-extern +//@ compile-flags: -Zfunction-return=thunk-extern -//[x86] check-pass -//[x86] needs-llvm-components: x86 -//[x86] compile-flags: --target i686-unknown-linux-gnu +//@[x86] check-pass +//@[x86] needs-llvm-components: x86 +//@[x86] compile-flags: --target i686-unknown-linux-gnu -//[x86_64] check-pass -//[x86_64] needs-llvm-components: x86 -//[x86_64] compile-flags: --target x86_64-unknown-linux-gnu +//@[x86_64] check-pass +//@[x86_64] needs-llvm-components: x86 +//@[x86_64] compile-flags: --target x86_64-unknown-linux-gnu -//[aarch64] check-fail -//[aarch64] needs-llvm-components: aarch64 -//[aarch64] compile-flags: --target aarch64-unknown-linux-gnu -//[aarch64] error-pattern: `-Zfunction-return` (except `keep`) is only supported on x86 and x86_64 +//@[aarch64] check-fail +//@[aarch64] needs-llvm-components: aarch64 +//@[aarch64] compile-flags: --target aarch64-unknown-linux-gnu +//@[aarch64] error-pattern: `-Zfunction-return` (except `keep`) is only supported on x86 and x86_64 #![feature(no_core)] #![no_core] diff --git a/tests/ui/invalid-compile-flags/function-return/thunk-extern-requires-non-large-code-model.rs b/tests/ui/invalid-compile-flags/function-return/thunk-extern-requires-non-large-code-model.rs index f925905de36..f4be36e08f0 100644 --- a/tests/ui/invalid-compile-flags/function-return/thunk-extern-requires-non-large-code-model.rs +++ b/tests/ui/invalid-compile-flags/function-return/thunk-extern-requires-non-large-code-model.rs @@ -1,20 +1,20 @@ -// revisions: small kernel medium large +//@ revisions: small kernel medium large -// needs-llvm-components: x86 -// compile-flags: --target x86_64-unknown-linux-gnu -Zfunction-return=thunk-extern +//@ needs-llvm-components: x86 +//@ compile-flags: --target x86_64-unknown-linux-gnu -Zfunction-return=thunk-extern -//[small] check-pass -//[small] compile-flags: -Ccode-model=small +//@[small] check-pass +//@[small] compile-flags: -Ccode-model=small -//[kernel] check-pass -//[kernel] compile-flags: -Ccode-model=kernel +//@[kernel] check-pass +//@[kernel] compile-flags: -Ccode-model=kernel -//[medium] check-pass -//[medium] compile-flags: -Ccode-model=medium +//@[medium] check-pass +//@[medium] compile-flags: -Ccode-model=medium -//[large] check-fail -//[large] compile-flags: -Ccode-model=large -//[large] error-pattern: `-Zfunction-return=thunk-extern` is only supported on non-large code models +//@[large] check-fail +//@[large] compile-flags: -Ccode-model=large +//@[large] error-pattern: `-Zfunction-return=thunk-extern` is only supported on non-large code models #![feature(no_core)] #![no_core] diff --git a/tests/ui/invalid-compile-flags/invalid-llvm-passes.rs b/tests/ui/invalid-compile-flags/invalid-llvm-passes.rs index ee28f5eb6d6..ddb46e59711 100644 --- a/tests/ui/invalid-compile-flags/invalid-llvm-passes.rs +++ b/tests/ui/invalid-compile-flags/invalid-llvm-passes.rs @@ -1,4 +1,4 @@ -// build-fail -// compile-flags: -Cpasses=unknown-pass +//@ build-fail +//@ compile-flags: -Cpasses=unknown-pass fn main() {} diff --git a/tests/ui/invalid/invalid-debugger-visualizer-option.rs b/tests/ui/invalid/invalid-debugger-visualizer-option.rs index 150723898bd..16e5619e8e4 100644 --- a/tests/ui/invalid/invalid-debugger-visualizer-option.rs +++ b/tests/ui/invalid/invalid-debugger-visualizer-option.rs @@ -1,5 +1,5 @@ -// normalize-stderr-test: "foo.random:.*\(" -> "foo.random: $$FILE_NOT_FOUND_MSG (" -// normalize-stderr-test: "os error \d+" -> "os error $$FILE_NOT_FOUND_CODE" +//@ normalize-stderr-test: "foo.random:.*\(" -> "foo.random: $$FILE_NOT_FOUND_MSG (" +//@ normalize-stderr-test: "os error \d+" -> "os error $$FILE_NOT_FOUND_CODE" #![debugger_visualizer(random_file = "../foo.random")] //~ ERROR invalid argument #![debugger_visualizer(natvis_file = "../foo.random")] //~ ERROR diff --git a/tests/ui/invalid/issue-114435-layout-type-err.rs b/tests/ui/invalid/issue-114435-layout-type-err.rs index a2d40593687..f68744a13c1 100644 --- a/tests/ui/invalid/issue-114435-layout-type-err.rs +++ b/tests/ui/invalid/issue-114435-layout-type-err.rs @@ -1,6 +1,6 @@ -// build-fail -// compile-flags: --crate-type lib -Cdebuginfo=2 -// error-pattern: the type has an unknown layout +//@ build-fail +//@ compile-flags: --crate-type lib -Cdebuginfo=2 +//@ error-pattern: the type has an unknown layout #![recursion_limit = "10"] macro_rules! link { diff --git a/tests/ui/io-checks/non-ice-error-on-worker-io-fail.rs b/tests/ui/io-checks/non-ice-error-on-worker-io-fail.rs index 6ec81a94306..3a80934b865 100644 --- a/tests/ui/io-checks/non-ice-error-on-worker-io-fail.rs +++ b/tests/ui/io-checks/non-ice-error-on-worker-io-fail.rs @@ -9,24 +9,24 @@ // up clobbering `/dev/null`. Instead we'll use a non-existent path, which // also used to ICE, but even root can't magically write there. -// compile-flags: -o ./does-not-exist/output +//@ compile-flags: -o ./does-not-exist/output // The error-pattern check occurs *before* normalization, and the error patterns // are wildly different between build environments. So this is a cop-out (and we // rely on the checking of the normalized stderr output as our actual // "verification" of the diagnostic). -// error-pattern: error +//@ error-pattern: error // On Mac OS X, we get an error like the below -// normalize-stderr-test "failed to write bytecode to ./does-not-exist/output.non_ice_error_on_worker_io_fail.*" -> "io error modifying ./does-not-exist/" +//@ normalize-stderr-test "failed to write bytecode to ./does-not-exist/output.non_ice_error_on_worker_io_fail.*" -> "io error modifying ./does-not-exist/" // On Linux, we get an error like the below -// normalize-stderr-test "couldn't create a temp dir.*" -> "io error modifying ./does-not-exist/" +//@ normalize-stderr-test "couldn't create a temp dir.*" -> "io error modifying ./does-not-exist/" -// ignore-windows - this is a unix-specific test -// ignore-emscripten - the file-system issues do not replicate here -// ignore-wasm - the file-system issues do not replicate here -// ignore-arm - the file-system issues do not replicate here, at least on armhf-gnu +//@ ignore-windows - this is a unix-specific test +//@ ignore-emscripten - the file-system issues do not replicate here +//@ ignore-wasm - the file-system issues do not replicate here +//@ ignore-arm - the file-system issues do not replicate here, at least on armhf-gnu #![crate_type = "lib"] diff --git a/tests/ui/issue-11881.rs b/tests/ui/issue-11881.rs index f6360db9b5f..1abe0797203 100644 --- a/tests/ui/issue-11881.rs +++ b/tests/ui/issue-11881.rs @@ -1,4 +1,4 @@ -// run-pass +//@ run-pass #![allow(unused_must_use)] #![allow(dead_code)] diff --git a/tests/ui/issue-13560.rs b/tests/ui/issue-13560.rs index 3397202bef2..6174fa9324b 100644 --- a/tests/ui/issue-13560.rs +++ b/tests/ui/issue-13560.rs @@ -1,8 +1,8 @@ -// run-pass -// ignore-cross-compile (needs dylibs and compiletest doesn't have a more specific header) -// aux-build:issue-13560-1.rs -// aux-build:issue-13560-2.rs -// aux-build:issue-13560-3.rs +//@ run-pass +//@ ignore-cross-compile (needs dylibs and compiletest doesn't have a more specific header) +//@ aux-build:issue-13560-1.rs +//@ aux-build:issue-13560-2.rs +//@ aux-build:issue-13560-3.rs // Regression test for issue #13560, the test itself is all in the dependent // libraries. The fail which previously failed to compile is the one numbered 3. diff --git a/tests/ui/issue-15924.rs b/tests/ui/issue-15924.rs index d8b3914d0d4..77e1ae697c5 100644 --- a/tests/ui/issue-15924.rs +++ b/tests/ui/issue-15924.rs @@ -1,8 +1,8 @@ -// run-pass +//@ run-pass #![allow(unused_imports)] #![allow(unused_must_use)] -// pretty-expanded FIXME #23616 +//@ pretty-expanded FIXME #23616 use std::fmt; use std::marker::PhantomData; diff --git a/tests/ui/issue-16822.rs b/tests/ui/issue-16822.rs index c611c33affd..94d89f88f47 100644 --- a/tests/ui/issue-16822.rs +++ b/tests/ui/issue-16822.rs @@ -1,5 +1,5 @@ -// run-pass -// aux-build:issue-16822.rs +//@ run-pass +//@ aux-build:issue-16822.rs extern crate issue_16822 as lib; diff --git a/tests/ui/issue-18502.rs b/tests/ui/issue-18502.rs index 2082ae7a991..3e2c37ee8aa 100644 --- a/tests/ui/issue-18502.rs +++ b/tests/ui/issue-18502.rs @@ -1,5 +1,5 @@ -// run-pass -// aux-build:issue-18502.rs +//@ run-pass +//@ aux-build:issue-18502.rs extern crate issue_18502 as fmt; diff --git a/tests/ui/issue-24106.rs b/tests/ui/issue-24106.rs index 45f0bd5b679..4f7b299b12f 100644 --- a/tests/ui/issue-24106.rs +++ b/tests/ui/issue-24106.rs @@ -1,5 +1,5 @@ -// run-pass -// aux-build:issue-24106.rs +//@ run-pass +//@ aux-build:issue-24106.rs extern crate issue_24106; diff --git a/tests/ui/issue-76387-llvm-miscompile.rs b/tests/ui/issue-76387-llvm-miscompile.rs index a7fc9da6339..d674ebb5eaf 100644 --- a/tests/ui/issue-76387-llvm-miscompile.rs +++ b/tests/ui/issue-76387-llvm-miscompile.rs @@ -1,6 +1,6 @@ -// compile-flags: -C opt-level=3 -// aux-build: issue-76387.rs -// run-pass +//@ compile-flags: -C opt-level=3 +//@ aux-build: issue-76387.rs +//@ run-pass // Regression test for issue #76387 // Tests that LLVM doesn't miscompile this diff --git a/tests/ui/issues/auxiliary/cgu_test.rs b/tests/ui/issues/auxiliary/cgu_test.rs index 5ed973164a1..1103fcb1f0b 100644 --- a/tests/ui/issues/auxiliary/cgu_test.rs +++ b/tests/ui/issues/auxiliary/cgu_test.rs @@ -1,5 +1,5 @@ -// no-prefer-dynamic -// compile-flags: --crate-type=lib +//@ no-prefer-dynamic +//@ compile-flags: --crate-type=lib pub fn id(t: T) -> T { t diff --git a/tests/ui/issues/auxiliary/cgu_test_a.rs b/tests/ui/issues/auxiliary/cgu_test_a.rs index a3dcd92012e..7998f1870b8 100644 --- a/tests/ui/issues/auxiliary/cgu_test_a.rs +++ b/tests/ui/issues/auxiliary/cgu_test_a.rs @@ -1,5 +1,5 @@ -// no-prefer-dynamic -// compile-flags: -Ccodegen-units=2 --crate-type=lib +//@ no-prefer-dynamic +//@ compile-flags: -Ccodegen-units=2 --crate-type=lib extern crate cgu_test; diff --git a/tests/ui/issues/auxiliary/cgu_test_b.rs b/tests/ui/issues/auxiliary/cgu_test_b.rs index a3dcd92012e..7998f1870b8 100644 --- a/tests/ui/issues/auxiliary/cgu_test_b.rs +++ b/tests/ui/issues/auxiliary/cgu_test_b.rs @@ -1,5 +1,5 @@ -// no-prefer-dynamic -// compile-flags: -Ccodegen-units=2 --crate-type=lib +//@ no-prefer-dynamic +//@ compile-flags: -Ccodegen-units=2 --crate-type=lib extern crate cgu_test; diff --git a/tests/ui/issues/auxiliary/issue-111011.rs b/tests/ui/issues/auxiliary/issue-111011.rs index 927134a588c..7130234f41e 100644 --- a/tests/ui/issues/auxiliary/issue-111011.rs +++ b/tests/ui/issues/auxiliary/issue-111011.rs @@ -1,6 +1,6 @@ #![feature(async_closure)] -// edition:2021 +//@ edition:2021 fn foo(x: impl FnOnce() -> Box) {} // just to make sure async closures can still be suggested for boxing. diff --git a/tests/ui/issues/auxiliary/issue-12133-dylib2.rs b/tests/ui/issues/auxiliary/issue-12133-dylib2.rs index 30de7400600..42e13ad6908 100644 --- a/tests/ui/issues/auxiliary/issue-12133-dylib2.rs +++ b/tests/ui/issues/auxiliary/issue-12133-dylib2.rs @@ -1,4 +1,4 @@ -// no-prefer-dynamic +//@ no-prefer-dynamic #![crate_type = "dylib"] diff --git a/tests/ui/issues/auxiliary/issue-12133-rlib.rs b/tests/ui/issues/auxiliary/issue-12133-rlib.rs index 39c261e1162..1adaf2b0379 100644 --- a/tests/ui/issues/auxiliary/issue-12133-rlib.rs +++ b/tests/ui/issues/auxiliary/issue-12133-rlib.rs @@ -1,3 +1,3 @@ -// no-prefer-dynamic +//@ no-prefer-dynamic #![crate_type = "rlib"] diff --git a/tests/ui/issues/auxiliary/issue-14344-1.rs b/tests/ui/issues/auxiliary/issue-14344-1.rs index 954a1e554da..b2e3ac9400e 100644 --- a/tests/ui/issues/auxiliary/issue-14344-1.rs +++ b/tests/ui/issues/auxiliary/issue-14344-1.rs @@ -1,4 +1,4 @@ -// no-prefer-dynamic +//@ no-prefer-dynamic #![crate_type = "rlib"] diff --git a/tests/ui/issues/auxiliary/issue-18913-1.rs b/tests/ui/issues/auxiliary/issue-18913-1.rs index 053c5ada5ee..caa2c707b56 100644 --- a/tests/ui/issues/auxiliary/issue-18913-1.rs +++ b/tests/ui/issues/auxiliary/issue-18913-1.rs @@ -1,4 +1,4 @@ -// no-prefer-dynamic +//@ no-prefer-dynamic #![crate_type = "rlib"] #![crate_name = "foo"] diff --git a/tests/ui/issues/auxiliary/issue-18913-2.rs b/tests/ui/issues/auxiliary/issue-18913-2.rs index 54747b45f52..802f5ab3899 100644 --- a/tests/ui/issues/auxiliary/issue-18913-2.rs +++ b/tests/ui/issues/auxiliary/issue-18913-2.rs @@ -1,4 +1,4 @@ -// no-prefer-dynamic +//@ no-prefer-dynamic #![crate_type = "rlib"] #![crate_name = "foo"] diff --git a/tests/ui/issues/auxiliary/issue-25185-1.rs b/tests/ui/issues/auxiliary/issue-25185-1.rs index e957be9c1c1..032d7d5de34 100644 --- a/tests/ui/issues/auxiliary/issue-25185-1.rs +++ b/tests/ui/issues/auxiliary/issue-25185-1.rs @@ -1,4 +1,4 @@ -// no-prefer-dynamic +//@ no-prefer-dynamic #![crate_type = "rlib"] diff --git a/tests/ui/issues/auxiliary/issue-31702-2.rs b/tests/ui/issues/auxiliary/issue-31702-2.rs index d360ae0ca7e..16300b0f5d5 100644 --- a/tests/ui/issues/auxiliary/issue-31702-2.rs +++ b/tests/ui/issues/auxiliary/issue-31702-2.rs @@ -1,4 +1,4 @@ -// compile-flags: -g +//@ compile-flags: -g extern crate issue_31702_1; diff --git a/tests/ui/issues/issue-10228.rs b/tests/ui/issues/issue-10228.rs index ebf8b436f13..7934afc7b9b 100644 --- a/tests/ui/issues/issue-10228.rs +++ b/tests/ui/issues/issue-10228.rs @@ -1,7 +1,7 @@ -// run-pass +//@ run-pass #![allow(dead_code)] #![allow(unused_variables)] -// pretty-expanded FIXME #23616 +//@ pretty-expanded FIXME #23616 enum StdioContainer { CreatePipe(bool) diff --git a/tests/ui/issues/issue-10396.rs b/tests/ui/issues/issue-10396.rs index d16ea3dc344..082216d557c 100644 --- a/tests/ui/issues/issue-10396.rs +++ b/tests/ui/issues/issue-10396.rs @@ -1,4 +1,4 @@ -// check-pass +//@ check-pass #![allow(dead_code)] #[derive(Debug)] enum Foo<'s> { diff --git a/tests/ui/issues/issue-10436.rs b/tests/ui/issues/issue-10436.rs index a7a20bad517..672aa2464dc 100644 --- a/tests/ui/issues/issue-10436.rs +++ b/tests/ui/issues/issue-10436.rs @@ -1,4 +1,4 @@ -// run-pass +//@ run-pass fn works(x: T) -> Vec { vec![x] } fn also_works(x: T) -> Vec { vec![x] } diff --git a/tests/ui/issues/issue-10456.rs b/tests/ui/issues/issue-10456.rs index 9f8d2595520..a43cc5d36f1 100644 --- a/tests/ui/issues/issue-10456.rs +++ b/tests/ui/issues/issue-10456.rs @@ -1,5 +1,5 @@ -// check-pass -// pretty-expanded FIXME #23616 +//@ check-pass +//@ pretty-expanded FIXME #23616 pub struct Foo; diff --git a/tests/ui/issues/issue-10638.rs b/tests/ui/issues/issue-10638.rs index e359669c00d..f82023f2da5 100644 --- a/tests/ui/issues/issue-10638.rs +++ b/tests/ui/issues/issue-10638.rs @@ -1,5 +1,5 @@ -// run-pass -// pretty-expanded FIXME #23616 +//@ run-pass +//@ pretty-expanded FIXME #23616 pub fn main() { //// I am not a doc comment! diff --git a/tests/ui/issues/issue-106755.rs b/tests/ui/issues/issue-106755.rs index 5eabc3bfb13..40cb83fcabc 100644 --- a/tests/ui/issues/issue-106755.rs +++ b/tests/ui/issues/issue-106755.rs @@ -1,4 +1,4 @@ -// compile-flags:-Ztranslate-lang=en_US +//@ compile-flags:-Ztranslate-lang=en_US #![feature(negative_impls)] #![feature(marker_trait_attr)] diff --git a/tests/ui/issues/issue-10683.rs b/tests/ui/issues/issue-10683.rs index dcb221f8c57..675a8323fc4 100644 --- a/tests/ui/issues/issue-10683.rs +++ b/tests/ui/issues/issue-10683.rs @@ -1,5 +1,5 @@ -// run-pass -// pretty-expanded FIXME #23616 +//@ run-pass +//@ pretty-expanded FIXME #23616 static NAME: &'static str = "hello world"; diff --git a/tests/ui/issues/issue-10718.rs b/tests/ui/issues/issue-10718.rs index a1de0cfe6ca..5d3cf2621ac 100644 --- a/tests/ui/issues/issue-10718.rs +++ b/tests/ui/issues/issue-10718.rs @@ -1,5 +1,5 @@ -// run-pass -// pretty-expanded FIXME #23616 +//@ run-pass +//@ pretty-expanded FIXME #23616 fn f(p: F) { p(); diff --git a/tests/ui/issues/issue-10734.rs b/tests/ui/issues/issue-10734.rs index 723e6ed22dd..8daa401748c 100644 --- a/tests/ui/issues/issue-10734.rs +++ b/tests/ui/issues/issue-10734.rs @@ -1,4 +1,4 @@ -// run-pass +//@ run-pass #![allow(non_upper_case_globals)] static mut drop_count: usize = 0; diff --git a/tests/ui/issues/issue-10767.rs b/tests/ui/issues/issue-10767.rs index 5670cd458f3..7d74f1e9017 100644 --- a/tests/ui/issues/issue-10767.rs +++ b/tests/ui/issues/issue-10767.rs @@ -1,5 +1,5 @@ -// run-pass -// pretty-expanded FIXME #23616 +//@ run-pass +//@ pretty-expanded FIXME #23616 pub fn main() { fn f() { diff --git a/tests/ui/issues/issue-10802.rs b/tests/ui/issues/issue-10802.rs index 99e1a92dfcc..eca701ce98c 100644 --- a/tests/ui/issues/issue-10802.rs +++ b/tests/ui/issues/issue-10802.rs @@ -1,4 +1,4 @@ -// run-pass +//@ run-pass #![allow(dead_code)] struct DroppableStruct; diff --git a/tests/ui/issues/issue-10806.rs b/tests/ui/issues/issue-10806.rs index 2f1d7bb5aaf..731edc8335d 100644 --- a/tests/ui/issues/issue-10806.rs +++ b/tests/ui/issues/issue-10806.rs @@ -1,7 +1,7 @@ -// run-pass +//@ run-pass #![allow(unused_imports)] -// pretty-expanded FIXME #23616 +//@ pretty-expanded FIXME #23616 pub fn foo() -> isize { 3 diff --git a/tests/ui/issues/issue-10853.rs b/tests/ui/issues/issue-10853.rs index 3dcabf9b165..0b0bcb710ad 100644 --- a/tests/ui/issues/issue-10853.rs +++ b/tests/ui/issues/issue-10853.rs @@ -1,5 +1,5 @@ -// check-pass -// pretty-expanded FIXME #23616 +//@ check-pass +//@ pretty-expanded FIXME #23616 #![deny(missing_docs)] #![doc="module"] diff --git a/tests/ui/issues/issue-10902.rs b/tests/ui/issues/issue-10902.rs index 162482d49ab..72f08ec3f94 100644 --- a/tests/ui/issues/issue-10902.rs +++ b/tests/ui/issues/issue-10902.rs @@ -1,6 +1,6 @@ -// check-pass +//@ check-pass #![allow(dead_code)] -// pretty-expanded FIXME #23616 +//@ pretty-expanded FIXME #23616 pub mod two_tuple { pub trait T { fn dummy(&self) { } } diff --git a/tests/ui/issues/issue-11047.rs b/tests/ui/issues/issue-11047.rs index 7a4acea4537..6e1b2856afc 100644 --- a/tests/ui/issues/issue-11047.rs +++ b/tests/ui/issues/issue-11047.rs @@ -1,4 +1,4 @@ -// run-pass +//@ run-pass // Test that static methods can be invoked on `type` aliases #![allow(unused_variables)] diff --git a/tests/ui/issues/issue-11085.rs b/tests/ui/issues/issue-11085.rs index 47c03238b55..c4a9f5f69bd 100644 --- a/tests/ui/issues/issue-11085.rs +++ b/tests/ui/issues/issue-11085.rs @@ -1,8 +1,8 @@ -// run-pass +//@ run-pass #![allow(dead_code)] -// compile-flags: --cfg foo +//@ compile-flags: --cfg foo -// pretty-expanded FIXME #23616 +//@ pretty-expanded FIXME #23616 struct Foo { #[cfg(fail)] diff --git a/tests/ui/issues/issue-11205.rs b/tests/ui/issues/issue-11205.rs index ce0951eafdd..f21a52050ff 100644 --- a/tests/ui/issues/issue-11205.rs +++ b/tests/ui/issues/issue-11205.rs @@ -1,5 +1,5 @@ -// run-pass -// pretty-expanded FIXME #23616 +//@ run-pass +//@ pretty-expanded FIXME #23616 #![allow(dead_code)] diff --git a/tests/ui/issues/issue-11224.rs b/tests/ui/issues/issue-11224.rs index e1c1df99aca..3a504604b6a 100644 --- a/tests/ui/issues/issue-11224.rs +++ b/tests/ui/issues/issue-11224.rs @@ -1,7 +1,7 @@ -// run-pass -// aux-build:issue-11224.rs +//@ run-pass +//@ aux-build:issue-11224.rs -// pretty-expanded FIXME #23616 +//@ pretty-expanded FIXME #23616 extern crate issue_11224 as unused; diff --git a/tests/ui/issues/issue-11267.rs b/tests/ui/issues/issue-11267.rs index 848ed6ac7a8..036ad1d54ed 100644 --- a/tests/ui/issues/issue-11267.rs +++ b/tests/ui/issues/issue-11267.rs @@ -1,4 +1,4 @@ -// run-pass +//@ run-pass // Tests that unary structs can be mutably borrowed. struct Empty; diff --git a/tests/ui/issues/issue-11382.rs b/tests/ui/issues/issue-11382.rs index 42a7a0d04a1..18c8c756f32 100644 --- a/tests/ui/issues/issue-11382.rs +++ b/tests/ui/issues/issue-11382.rs @@ -1,4 +1,4 @@ -// run-pass +//@ run-pass fn main() { println!("{}", 1.2); } diff --git a/tests/ui/issues/issue-11384.rs b/tests/ui/issues/issue-11384.rs index 0105b4d223e..0d1cce71958 100644 --- a/tests/ui/issues/issue-11384.rs +++ b/tests/ui/issues/issue-11384.rs @@ -1,5 +1,5 @@ -// check-pass -// pretty-expanded FIXME #23616 +//@ check-pass +//@ pretty-expanded FIXME #23616 trait Common { fn dummy(&self) { } } diff --git a/tests/ui/issues/issue-11508.rs b/tests/ui/issues/issue-11508.rs index 49868b73efa..e7ed7a9f15f 100644 --- a/tests/ui/issues/issue-11508.rs +++ b/tests/ui/issues/issue-11508.rs @@ -1,5 +1,5 @@ -// run-pass -// aux-build:issue-11508.rs +//@ run-pass +//@ aux-build:issue-11508.rs extern crate issue_11508 as rand; diff --git a/tests/ui/issues/issue-11529.rs b/tests/ui/issues/issue-11529.rs index 9a6cc8e9fe8..db7ff85d46b 100644 --- a/tests/ui/issues/issue-11529.rs +++ b/tests/ui/issues/issue-11529.rs @@ -1,7 +1,7 @@ -// run-pass -// aux-build:issue-11529.rs +//@ run-pass +//@ aux-build:issue-11529.rs -// pretty-expanded FIXME #23616 +//@ pretty-expanded FIXME #23616 extern crate issue_11529 as a; diff --git a/tests/ui/issues/issue-11552.rs b/tests/ui/issues/issue-11552.rs index 9fb9f3d2e3f..d4784e53e6b 100644 --- a/tests/ui/issues/issue-11552.rs +++ b/tests/ui/issues/issue-11552.rs @@ -1,4 +1,4 @@ -// run-pass +//@ run-pass #![feature(box_patterns)] #[derive(Clone)] diff --git a/tests/ui/issues/issue-11592.rs b/tests/ui/issues/issue-11592.rs index a4611f2f90e..cb1a92e809a 100644 --- a/tests/ui/issues/issue-11592.rs +++ b/tests/ui/issues/issue-11592.rs @@ -1,4 +1,4 @@ -// check-pass +//@ check-pass //! Ensure the private trait Bar isn't complained about. #![deny(missing_docs)] diff --git a/tests/ui/issues/issue-11677.rs b/tests/ui/issues/issue-11677.rs index be18c736f14..32e129b2c01 100644 --- a/tests/ui/issues/issue-11677.rs +++ b/tests/ui/issues/issue-11677.rs @@ -1,4 +1,4 @@ -// run-pass +//@ run-pass #![allow(unused_imports)] #![allow(dead_code)] diff --git a/tests/ui/issues/issue-11680.rs b/tests/ui/issues/issue-11680.rs index bfa8f5c5a1b..9f3dfebcc81 100644 --- a/tests/ui/issues/issue-11680.rs +++ b/tests/ui/issues/issue-11680.rs @@ -1,4 +1,4 @@ -// aux-build:issue-11680.rs +//@ aux-build:issue-11680.rs extern crate issue_11680 as other; diff --git a/tests/ui/issues/issue-11709.rs b/tests/ui/issues/issue-11709.rs index 2d6956649a2..8a11074eca8 100644 --- a/tests/ui/issues/issue-11709.rs +++ b/tests/ui/issues/issue-11709.rs @@ -1,4 +1,4 @@ -// run-pass +//@ run-pass #![allow(dead_code)] // Don't panic on blocks without results diff --git a/tests/ui/issues/issue-11740.rs b/tests/ui/issues/issue-11740.rs index c3badfd9b49..c6099c2a0c0 100644 --- a/tests/ui/issues/issue-11740.rs +++ b/tests/ui/issues/issue-11740.rs @@ -1,4 +1,4 @@ -// check-pass +//@ check-pass struct Attr { name: String, diff --git a/tests/ui/issues/issue-11820.rs b/tests/ui/issues/issue-11820.rs index dc6349b10ee..372ce2c2a16 100644 --- a/tests/ui/issues/issue-11820.rs +++ b/tests/ui/issues/issue-11820.rs @@ -1,5 +1,5 @@ -// run-pass -// pretty-expanded FIXME #23616 +//@ run-pass +//@ pretty-expanded FIXME #23616 #![allow(noop_method_call)] diff --git a/tests/ui/issues/issue-11869.rs b/tests/ui/issues/issue-11869.rs index b300f4593a7..606a0c7b9d9 100644 --- a/tests/ui/issues/issue-11869.rs +++ b/tests/ui/issues/issue-11869.rs @@ -1,6 +1,6 @@ -// check-pass +//@ check-pass #![allow(dead_code)] -// pretty-expanded FIXME #23616 +//@ pretty-expanded FIXME #23616 struct A { a: String diff --git a/tests/ui/issues/issue-11958.rs b/tests/ui/issues/issue-11958.rs index a7af01e25b4..9185c5158af 100644 --- a/tests/ui/issues/issue-11958.rs +++ b/tests/ui/issues/issue-11958.rs @@ -1,4 +1,4 @@ -// run-pass +//@ run-pass // We shouldn't need to rebind a moved upvar as mut if it's already // marked as mut diff --git a/tests/ui/issues/issue-12033.rs b/tests/ui/issues/issue-12033.rs index 9dc7573c9d3..0bf6490bafe 100644 --- a/tests/ui/issues/issue-12033.rs +++ b/tests/ui/issues/issue-12033.rs @@ -1,4 +1,4 @@ -// run-pass +//@ run-pass use std::cell::RefCell; fn main() { diff --git a/tests/ui/issues/issue-12133-1.rs b/tests/ui/issues/issue-12133-1.rs index 96ad5abd548..dc3f7f33da1 100644 --- a/tests/ui/issues/issue-12133-1.rs +++ b/tests/ui/issues/issue-12133-1.rs @@ -1,8 +1,8 @@ -// run-pass -// aux-build:issue-12133-rlib.rs -// aux-build:issue-12133-dylib.rs +//@ run-pass +//@ aux-build:issue-12133-rlib.rs +//@ aux-build:issue-12133-dylib.rs -// pretty-expanded FIXME #23616 +//@ pretty-expanded FIXME #23616 extern crate issue_12133_rlib as a; extern crate issue_12133_dylib as b; diff --git a/tests/ui/issues/issue-12133-2.rs b/tests/ui/issues/issue-12133-2.rs index 02fec65c2ed..55742a1b383 100644 --- a/tests/ui/issues/issue-12133-2.rs +++ b/tests/ui/issues/issue-12133-2.rs @@ -1,9 +1,9 @@ -// run-pass -// aux-build:issue-12133-rlib.rs -// aux-build:issue-12133-dylib.rs -// no-prefer-dynamic +//@ run-pass +//@ aux-build:issue-12133-rlib.rs +//@ aux-build:issue-12133-dylib.rs +//@ no-prefer-dynamic -// pretty-expanded FIXME #23616 +//@ pretty-expanded FIXME #23616 extern crate issue_12133_rlib as a; extern crate issue_12133_dylib as b; diff --git a/tests/ui/issues/issue-12133-3.rs b/tests/ui/issues/issue-12133-3.rs index 988b61e3baf..572337679af 100644 --- a/tests/ui/issues/issue-12133-3.rs +++ b/tests/ui/issues/issue-12133-3.rs @@ -1,12 +1,12 @@ -// run-pass -// aux-build:issue-12133-rlib.rs -// aux-build:issue-12133-dylib.rs -// aux-build:issue-12133-dylib2.rs -// ignore-emscripten no dylib support -// ignore-musl -// needs-dynamic-linking +//@ run-pass +//@ aux-build:issue-12133-rlib.rs +//@ aux-build:issue-12133-dylib.rs +//@ aux-build:issue-12133-dylib2.rs +//@ ignore-emscripten no dylib support +//@ ignore-musl +//@ needs-dynamic-linking -// pretty-expanded FIXME #23616 +//@ pretty-expanded FIXME #23616 extern crate issue_12133_dylib2 as other; diff --git a/tests/ui/issues/issue-12285.rs b/tests/ui/issues/issue-12285.rs index 24ac5d2fbbf..fe199147128 100644 --- a/tests/ui/issues/issue-12285.rs +++ b/tests/ui/issues/issue-12285.rs @@ -1,4 +1,4 @@ -// run-pass +//@ run-pass struct S; diff --git a/tests/ui/issues/issue-12612.rs b/tests/ui/issues/issue-12612.rs index d254f6941a3..0ffe7422fb3 100644 --- a/tests/ui/issues/issue-12612.rs +++ b/tests/ui/issues/issue-12612.rs @@ -1,9 +1,9 @@ -// run-pass +//@ run-pass #![allow(unused_imports)] -// aux-build:issue-12612-1.rs -// aux-build:issue-12612-2.rs +//@ aux-build:issue-12612-1.rs +//@ aux-build:issue-12612-2.rs -// pretty-expanded FIXME #23616 +//@ pretty-expanded FIXME #23616 extern crate issue_12612_1 as foo; extern crate issue_12612_2 as bar; diff --git a/tests/ui/issues/issue-12660.rs b/tests/ui/issues/issue-12660.rs index 44c492b43f0..997c10ae5cf 100644 --- a/tests/ui/issues/issue-12660.rs +++ b/tests/ui/issues/issue-12660.rs @@ -1,7 +1,7 @@ -// run-pass -// aux-build:issue-12660-aux.rs +//@ run-pass +//@ aux-build:issue-12660-aux.rs -// pretty-expanded FIXME #23616 +//@ pretty-expanded FIXME #23616 extern crate issue12660aux; diff --git a/tests/ui/issues/issue-12677.rs b/tests/ui/issues/issue-12677.rs index d0e4c17d4fa..dbc2dbc8527 100644 --- a/tests/ui/issues/issue-12677.rs +++ b/tests/ui/issues/issue-12677.rs @@ -1,4 +1,4 @@ -// run-pass +//@ run-pass fn main() { let s = "Hello"; diff --git a/tests/ui/issues/issue-12699.rs b/tests/ui/issues/issue-12699.rs index e26c2d7cde2..3222fbe00ea 100644 --- a/tests/ui/issues/issue-12699.rs +++ b/tests/ui/issues/issue-12699.rs @@ -1,6 +1,6 @@ -// run-pass -// ignore-wasm32-bare can't block the thread -// ignore-sgx not supported +//@ run-pass +//@ ignore-wasm32-bare can't block the thread +//@ ignore-sgx not supported #![allow(deprecated)] use std::thread; diff --git a/tests/ui/issues/issue-12729.rs b/tests/ui/issues/issue-12729.rs index aa0b04af28e..43e692b895a 100644 --- a/tests/ui/issues/issue-12729.rs +++ b/tests/ui/issues/issue-12729.rs @@ -1,6 +1,6 @@ -// check-pass +//@ check-pass #![allow(dead_code)] -// pretty-expanded FIXME #23616 +//@ pretty-expanded FIXME #23616 pub struct Foo; diff --git a/tests/ui/issues/issue-12744.rs b/tests/ui/issues/issue-12744.rs index e2756ec970c..eaf92d413d5 100644 --- a/tests/ui/issues/issue-12744.rs +++ b/tests/ui/issues/issue-12744.rs @@ -1,4 +1,4 @@ -// run-pass +//@ run-pass fn main() { fn test() -> Box { Box::new(1) } println!("{:?}", test()) diff --git a/tests/ui/issues/issue-12860.rs b/tests/ui/issues/issue-12860.rs index 01b642cdfcc..255f6670793 100644 --- a/tests/ui/issues/issue-12860.rs +++ b/tests/ui/issues/issue-12860.rs @@ -1,4 +1,4 @@ -// run-pass +//@ run-pass use std::collections::HashSet; #[derive(Copy, Clone, PartialEq, Eq, Hash)] diff --git a/tests/ui/issues/issue-12909.rs b/tests/ui/issues/issue-12909.rs index a68d73a004f..3af8c07d7a7 100644 --- a/tests/ui/issues/issue-12909.rs +++ b/tests/ui/issues/issue-12909.rs @@ -1,6 +1,6 @@ -// run-pass +//@ run-pass #![allow(unused_variables)] -// pretty-expanded FIXME #23616 +//@ pretty-expanded FIXME #23616 use std::collections::HashMap; diff --git a/tests/ui/issues/issue-12920.rs b/tests/ui/issues/issue-12920.rs index a0cfea055be..7f453e499d4 100644 --- a/tests/ui/issues/issue-12920.rs +++ b/tests/ui/issues/issue-12920.rs @@ -1,6 +1,6 @@ -// run-fail -// error-pattern:explicit panic -// ignore-emscripten no processes +//@ run-fail +//@ error-pattern:explicit panic +//@ ignore-emscripten no processes pub fn main() { panic!(); diff --git a/tests/ui/issues/issue-13027.rs b/tests/ui/issues/issue-13027.rs index ac0d1f11bd7..fbd1d75067b 100644 --- a/tests/ui/issues/issue-13027.rs +++ b/tests/ui/issues/issue-13027.rs @@ -1,4 +1,4 @@ -// run-pass +//@ run-pass // Tests that match expression handles overlapped literal and range // properly in the presence of guard function. diff --git a/tests/ui/issues/issue-13105.rs b/tests/ui/issues/issue-13105.rs index 15a98c77983..1ef9a6b7e33 100644 --- a/tests/ui/issues/issue-13105.rs +++ b/tests/ui/issues/issue-13105.rs @@ -1,5 +1,5 @@ -// check-pass -// pretty-expanded FIXME #23616 +//@ check-pass +//@ pretty-expanded FIXME #23616 trait Foo { #[allow(anonymous_parameters)] diff --git a/tests/ui/issues/issue-13167.rs b/tests/ui/issues/issue-13167.rs index 747f652d4af..3cf8367a678 100644 --- a/tests/ui/issues/issue-13167.rs +++ b/tests/ui/issues/issue-13167.rs @@ -1,7 +1,7 @@ -// check-pass -// pretty-expanded FIXME #23616 -// revisions: current next -//[next] compile-flags: -Znext-solver +//@ check-pass +//@ pretty-expanded FIXME #23616 +//@ revisions: current next +//@[next] compile-flags: -Znext-solver use std::slice; diff --git a/tests/ui/issues/issue-13202.rs b/tests/ui/issues/issue-13202.rs index 16debb5b6c4..89205fc7fd1 100644 --- a/tests/ui/issues/issue-13202.rs +++ b/tests/ui/issues/issue-13202.rs @@ -1,6 +1,6 @@ -// run-fail -// error-pattern:bad input -// ignore-emscripten no processes +//@ run-fail +//@ error-pattern:bad input +//@ ignore-emscripten no processes fn main() { Some("foo").unwrap_or(panic!("bad input")).to_string(); diff --git a/tests/ui/issues/issue-13204.rs b/tests/ui/issues/issue-13204.rs index 3d6aba8455a..01362f6fe61 100644 --- a/tests/ui/issues/issue-13204.rs +++ b/tests/ui/issues/issue-13204.rs @@ -1,4 +1,4 @@ -// run-pass +//@ run-pass #![allow(unused_mut)] // Test that when instantiating trait default methods, typeck handles // lifetime parameters defined on the method bound correctly. diff --git a/tests/ui/issues/issue-13214.rs b/tests/ui/issues/issue-13214.rs index 0cf8d0675e6..7144094d8c2 100644 --- a/tests/ui/issues/issue-13214.rs +++ b/tests/ui/issues/issue-13214.rs @@ -1,9 +1,9 @@ -// build-pass +//@ build-pass #![allow(dead_code)] // defining static with struct that contains enum // with &'static str variant used to cause ICE -// pretty-expanded FIXME #23616 +//@ pretty-expanded FIXME #23616 pub enum Foo { Bar, diff --git a/tests/ui/issues/issue-13259-windows-tcb-trash.rs b/tests/ui/issues/issue-13259-windows-tcb-trash.rs index 740e7780de6..803cda091b9 100644 --- a/tests/ui/issues/issue-13259-windows-tcb-trash.rs +++ b/tests/ui/issues/issue-13259-windows-tcb-trash.rs @@ -1,4 +1,4 @@ -// run-pass +//@ run-pass #![feature(rustc_private)] extern crate libc; diff --git a/tests/ui/issues/issue-13264.rs b/tests/ui/issues/issue-13264.rs index 691bb63a2fe..bf4ec388c4f 100644 --- a/tests/ui/issues/issue-13264.rs +++ b/tests/ui/issues/issue-13264.rs @@ -1,4 +1,4 @@ -// run-pass +//@ run-pass #![allow(non_camel_case_types)] #![allow(non_snake_case)] diff --git a/tests/ui/issues/issue-13323.rs b/tests/ui/issues/issue-13323.rs index 71e14d4dab5..8f334404f9a 100644 --- a/tests/ui/issues/issue-13323.rs +++ b/tests/ui/issues/issue-13323.rs @@ -1,4 +1,4 @@ -// run-pass +//@ run-pass struct StrWrap { s: String diff --git a/tests/ui/issues/issue-13405.rs b/tests/ui/issues/issue-13405.rs index 732172b23ed..b2b26ab39c5 100644 --- a/tests/ui/issues/issue-13405.rs +++ b/tests/ui/issues/issue-13405.rs @@ -1,7 +1,7 @@ -// check-pass +//@ check-pass #![allow(dead_code)] #![allow(unused_variables)] -// pretty-expanded FIXME #23616 +//@ pretty-expanded FIXME #23616 struct Foo<'a> { i: &'a bool, diff --git a/tests/ui/issues/issue-13434.rs b/tests/ui/issues/issue-13434.rs index 1b7d3e20173..caf7b632393 100644 --- a/tests/ui/issues/issue-13434.rs +++ b/tests/ui/issues/issue-13434.rs @@ -1,4 +1,4 @@ -// run-pass +//@ run-pass #[derive(Debug)] struct MyStruct; diff --git a/tests/ui/issues/issue-13482-2.rs b/tests/ui/issues/issue-13482-2.rs index b5b81dea73e..619e9d748ef 100644 --- a/tests/ui/issues/issue-13482-2.rs +++ b/tests/ui/issues/issue-13482-2.rs @@ -1,4 +1,4 @@ -// compile-flags:-Z verbose-internals +//@ compile-flags:-Z verbose-internals fn main() { let x = [1,2]; diff --git a/tests/ui/issues/issue-13507-2.rs b/tests/ui/issues/issue-13507-2.rs index 63f3589c6cc..afd88a14881 100644 --- a/tests/ui/issues/issue-13507-2.rs +++ b/tests/ui/issues/issue-13507-2.rs @@ -1,6 +1,6 @@ -// run-pass +//@ run-pass #![allow(unused_imports)] -// aux-build:issue-13507.rs +//@ aux-build:issue-13507.rs extern crate issue_13507; use issue_13507::testtypes; diff --git a/tests/ui/issues/issue-13620.rs b/tests/ui/issues/issue-13620.rs index 3c3c19df75d..0225114e6c3 100644 --- a/tests/ui/issues/issue-13620.rs +++ b/tests/ui/issues/issue-13620.rs @@ -1,8 +1,8 @@ -// run-pass -// aux-build:issue-13620-1.rs -// aux-build:issue-13620-2.rs +//@ run-pass +//@ aux-build:issue-13620-1.rs +//@ aux-build:issue-13620-2.rs -// pretty-expanded FIXME #23616 +//@ pretty-expanded FIXME #23616 extern crate issue_13620_2 as crate2; diff --git a/tests/ui/issues/issue-13665.rs b/tests/ui/issues/issue-13665.rs index a3843c65034..3d5cffa9855 100644 --- a/tests/ui/issues/issue-13665.rs +++ b/tests/ui/issues/issue-13665.rs @@ -1,5 +1,5 @@ -// run-pass -// pretty-expanded FIXME #23616 +//@ run-pass +//@ pretty-expanded FIXME #23616 fn foo<'r>() { let maybe_value_ref: Option<&'r u8> = None; diff --git a/tests/ui/issues/issue-13703.rs b/tests/ui/issues/issue-13703.rs index 424c99974b3..9748ab3719e 100644 --- a/tests/ui/issues/issue-13703.rs +++ b/tests/ui/issues/issue-13703.rs @@ -1,5 +1,5 @@ -// check-pass -// pretty-expanded FIXME #23616 +//@ check-pass +//@ pretty-expanded FIXME #23616 pub struct Foo<'a, 'b: 'a> { foo: &'a &'b isize } pub fn foo<'a, 'b>(x: Foo<'a, 'b>, _o: Option<& & ()>) { let _y = x.foo; } diff --git a/tests/ui/issues/issue-13763.rs b/tests/ui/issues/issue-13763.rs index dd5f6dbc9dc..3044c671169 100644 --- a/tests/ui/issues/issue-13763.rs +++ b/tests/ui/issues/issue-13763.rs @@ -1,6 +1,6 @@ -// run-pass +//@ run-pass #![allow(dead_code)] -// pretty-expanded FIXME #23616 +//@ pretty-expanded FIXME #23616 mod u8 { pub const BITS: usize = 8; diff --git a/tests/ui/issues/issue-13775.rs b/tests/ui/issues/issue-13775.rs index f5977effc40..1d7a40b72d3 100644 --- a/tests/ui/issues/issue-13775.rs +++ b/tests/ui/issues/issue-13775.rs @@ -1,5 +1,5 @@ -// check-pass -// pretty-expanded FIXME #23616 +//@ check-pass +//@ pretty-expanded FIXME #23616 trait Foo { #[allow(anonymous_parameters)] diff --git a/tests/ui/issues/issue-13808.rs b/tests/ui/issues/issue-13808.rs index 9f9db067bf4..91b771c6a68 100644 --- a/tests/ui/issues/issue-13808.rs +++ b/tests/ui/issues/issue-13808.rs @@ -1,7 +1,7 @@ -// run-pass +//@ run-pass #![allow(dead_code)] #![allow(unused_variables)] -// pretty-expanded FIXME #23616 +//@ pretty-expanded FIXME #23616 struct Foo<'a> { listener: Box, diff --git a/tests/ui/issues/issue-13867.rs b/tests/ui/issues/issue-13867.rs index 9510aae7753..ad7d6d66393 100644 --- a/tests/ui/issues/issue-13867.rs +++ b/tests/ui/issues/issue-13867.rs @@ -1,4 +1,4 @@ -// run-pass +//@ run-pass // Test that codegen works correctly when there are multiple refutable // patterns in match expression. diff --git a/tests/ui/issues/issue-13872.rs b/tests/ui/issues/issue-13872.rs index aade6b8367c..5589d2d4f68 100644 --- a/tests/ui/issues/issue-13872.rs +++ b/tests/ui/issues/issue-13872.rs @@ -1,9 +1,9 @@ -// run-pass -// aux-build:issue-13872-1.rs -// aux-build:issue-13872-2.rs -// aux-build:issue-13872-3.rs +//@ run-pass +//@ aux-build:issue-13872-1.rs +//@ aux-build:issue-13872-2.rs +//@ aux-build:issue-13872-3.rs -// pretty-expanded FIXME #23616 +//@ pretty-expanded FIXME #23616 extern crate issue_13872_3 as other; diff --git a/tests/ui/issues/issue-14082.rs b/tests/ui/issues/issue-14082.rs index 52b8c86802f..116002415df 100644 --- a/tests/ui/issues/issue-14082.rs +++ b/tests/ui/issues/issue-14082.rs @@ -1,5 +1,5 @@ -// check-pass -// pretty-expanded FIXME #23616 +//@ check-pass +//@ pretty-expanded FIXME #23616 #![allow(unused_imports, dead_code)] diff --git a/tests/ui/issues/issue-14229.rs b/tests/ui/issues/issue-14229.rs index 477a2c65053..eb6324da3b6 100644 --- a/tests/ui/issues/issue-14229.rs +++ b/tests/ui/issues/issue-14229.rs @@ -1,4 +1,4 @@ -// run-pass +//@ run-pass trait Foo: Sized { fn foo(self) {} } diff --git a/tests/ui/issues/issue-14254.rs b/tests/ui/issues/issue-14254.rs index 6f930837641..9175ac8f92e 100644 --- a/tests/ui/issues/issue-14254.rs +++ b/tests/ui/issues/issue-14254.rs @@ -1,5 +1,5 @@ -// check-pass -// pretty-expanded FIXME #23616 +//@ check-pass +//@ pretty-expanded FIXME #23616 trait Foo: Sized { fn bar(&self); diff --git a/tests/ui/issues/issue-14308.rs b/tests/ui/issues/issue-14308.rs index e067bcdf34a..724be160d06 100644 --- a/tests/ui/issues/issue-14308.rs +++ b/tests/ui/issues/issue-14308.rs @@ -1,4 +1,4 @@ -// run-pass +//@ run-pass struct A(isize); diff --git a/tests/ui/issues/issue-14330.rs b/tests/ui/issues/issue-14330.rs index 0844fc72045..f6461c834a5 100644 --- a/tests/ui/issues/issue-14330.rs +++ b/tests/ui/issues/issue-14330.rs @@ -1,6 +1,6 @@ -// check-pass +//@ check-pass #![allow(unused_imports)] -// pretty-expanded FIXME #23616 +//@ pretty-expanded FIXME #23616 #[macro_use] extern crate std as std2; diff --git a/tests/ui/issues/issue-14344.rs b/tests/ui/issues/issue-14344.rs index 33b1df827d3..17863c7809e 100644 --- a/tests/ui/issues/issue-14344.rs +++ b/tests/ui/issues/issue-14344.rs @@ -1,6 +1,6 @@ -// run-pass -// aux-build:issue-14344-1.rs -// aux-build:issue-14344-2.rs +//@ run-pass +//@ aux-build:issue-14344-1.rs +//@ aux-build:issue-14344-2.rs extern crate issue_14344_1; extern crate issue_14344_2; diff --git a/tests/ui/issues/issue-14382.rs b/tests/ui/issues/issue-14382.rs index b5c2362f05c..74d938783ae 100644 --- a/tests/ui/issues/issue-14382.rs +++ b/tests/ui/issues/issue-14382.rs @@ -1,4 +1,4 @@ -// run-pass +//@ run-pass #[derive(Debug)] struct Matrix4(#[allow(dead_code)] S); trait POrd {} diff --git a/tests/ui/issues/issue-14393.rs b/tests/ui/issues/issue-14393.rs index df635407af6..b7e64d6dca6 100644 --- a/tests/ui/issues/issue-14393.rs +++ b/tests/ui/issues/issue-14393.rs @@ -1,5 +1,5 @@ -// run-pass -// pretty-expanded FIXME #23616 +//@ run-pass +//@ pretty-expanded FIXME #23616 fn main() { match ("", 1_usize) { diff --git a/tests/ui/issues/issue-14399.rs b/tests/ui/issues/issue-14399.rs index 0c6c4d8dc6b..cb768f63baa 100644 --- a/tests/ui/issues/issue-14399.rs +++ b/tests/ui/issues/issue-14399.rs @@ -1,10 +1,10 @@ -// run-pass +//@ run-pass // #14399 // We'd previously ICE if we had a method call whose return // value was coerced to a trait object. (v.clone() returns Box // which is coerced to Box). -// pretty-expanded FIXME #23616 +//@ pretty-expanded FIXME #23616 #[derive(Clone)] struct B1; diff --git a/tests/ui/issues/issue-14421.rs b/tests/ui/issues/issue-14421.rs index c59bd87065f..4acbce66b6f 100644 --- a/tests/ui/issues/issue-14421.rs +++ b/tests/ui/issues/issue-14421.rs @@ -1,9 +1,9 @@ -// run-pass +//@ run-pass #![allow(non_snake_case)] -// aux-build:issue-14421.rs +//@ aux-build:issue-14421.rs -// pretty-expanded FIXME #23616 +//@ pretty-expanded FIXME #23616 extern crate issue_14421 as bug_lib; diff --git a/tests/ui/issues/issue-14422.rs b/tests/ui/issues/issue-14422.rs index b9e2065d014..ed9e72390c5 100644 --- a/tests/ui/issues/issue-14422.rs +++ b/tests/ui/issues/issue-14422.rs @@ -1,9 +1,9 @@ -// run-pass +//@ run-pass #![allow(non_snake_case)] -// aux-build:issue-14422.rs +//@ aux-build:issue-14422.rs -// pretty-expanded FIXME #23616 +//@ pretty-expanded FIXME #23616 extern crate issue_14422 as bug_lib; diff --git a/tests/ui/issues/issue-1451.rs b/tests/ui/issues/issue-1451.rs index ad8928b2043..735b766bd0c 100644 --- a/tests/ui/issues/issue-1451.rs +++ b/tests/ui/issues/issue-1451.rs @@ -1,6 +1,6 @@ -// run-pass +//@ run-pass #![allow(dead_code)] -// pretty-expanded FIXME #23616 +//@ pretty-expanded FIXME #23616 #![allow(non_snake_case)] #![allow(unused_variables)] diff --git a/tests/ui/issues/issue-1460.rs b/tests/ui/issues/issue-1460.rs index e663f7fd4c9..c201f026bca 100644 --- a/tests/ui/issues/issue-1460.rs +++ b/tests/ui/issues/issue-1460.rs @@ -1,6 +1,6 @@ -// run-pass +//@ run-pass -// pretty-expanded FIXME #23616 +//@ pretty-expanded FIXME #23616 pub fn main() { {|i: u32| if 1 == i { }}; //~ WARN unused closure that must be used diff --git a/tests/ui/issues/issue-14821.rs b/tests/ui/issues/issue-14821.rs index 00b2e3607fc..b11a885b3a0 100644 --- a/tests/ui/issues/issue-14821.rs +++ b/tests/ui/issues/issue-14821.rs @@ -1,4 +1,4 @@ -// run-pass +//@ run-pass #![allow(dead_code)] #![allow(unused_variables)] trait SomeTrait {} diff --git a/tests/ui/issues/issue-14865.rs b/tests/ui/issues/issue-14865.rs index 56e78e78f18..e0f8bfe9428 100644 --- a/tests/ui/issues/issue-14865.rs +++ b/tests/ui/issues/issue-14865.rs @@ -1,4 +1,4 @@ -// run-pass +//@ run-pass #![allow(dead_code)] enum X { diff --git a/tests/ui/issues/issue-14875.rs b/tests/ui/issues/issue-14875.rs index fca3309155d..235d255716f 100644 --- a/tests/ui/issues/issue-14875.rs +++ b/tests/ui/issues/issue-14875.rs @@ -1,5 +1,5 @@ -// run-pass -// needs-unwind +//@ run-pass +//@ needs-unwind // Check that values are not leaked when a dtor panics (#14875) diff --git a/tests/ui/issues/issue-14901.rs b/tests/ui/issues/issue-14901.rs index 5319abbdf0e..ddc12b9ef3c 100644 --- a/tests/ui/issues/issue-14901.rs +++ b/tests/ui/issues/issue-14901.rs @@ -1,4 +1,4 @@ -// check-pass +//@ check-pass pub trait Reader {} enum Wrapper<'a> { diff --git a/tests/ui/issues/issue-14919.rs b/tests/ui/issues/issue-14919.rs index 94361543354..8a8324e57ea 100644 --- a/tests/ui/issues/issue-14919.rs +++ b/tests/ui/issues/issue-14919.rs @@ -1,7 +1,7 @@ -// run-pass +//@ run-pass #![allow(unused_must_use)] #![allow(dead_code)] -// pretty-expanded FIXME #23616 +//@ pretty-expanded FIXME #23616 trait Matcher { fn next_match(&mut self) -> Option<(usize, usize)>; diff --git a/tests/ui/issues/issue-14959.rs b/tests/ui/issues/issue-14959.rs index e31a9431558..401bd82ded3 100644 --- a/tests/ui/issues/issue-14959.rs +++ b/tests/ui/issues/issue-14959.rs @@ -1,5 +1,5 @@ -// check-pass -// pretty-expanded FIXME #23616 +//@ check-pass +//@ pretty-expanded FIXME #23616 #![feature(fn_traits, unboxed_closures)] diff --git a/tests/ui/issues/issue-15043.rs b/tests/ui/issues/issue-15043.rs index 53748be8a02..b00c878086d 100644 --- a/tests/ui/issues/issue-15043.rs +++ b/tests/ui/issues/issue-15043.rs @@ -1,5 +1,5 @@ -// run-pass -// pretty-expanded FIXME #23616 +//@ run-pass +//@ pretty-expanded FIXME #23616 #![allow(warnings)] diff --git a/tests/ui/issues/issue-15063.rs b/tests/ui/issues/issue-15063.rs index 4082675129d..969dbe5fad2 100644 --- a/tests/ui/issues/issue-15063.rs +++ b/tests/ui/issues/issue-15063.rs @@ -1,4 +1,4 @@ -// run-pass +//@ run-pass #![allow(dead_code)] #![allow(unused_variables)] enum Two { A, B} diff --git a/tests/ui/issues/issue-15104.rs b/tests/ui/issues/issue-15104.rs index 47b207ea9cb..e68c94c370e 100644 --- a/tests/ui/issues/issue-15104.rs +++ b/tests/ui/issues/issue-15104.rs @@ -1,4 +1,4 @@ -// run-pass +//@ run-pass fn main() { assert_eq!(count_members(&[1, 2, 3, 4]), 4); diff --git a/tests/ui/issues/issue-15129-rpass.rs b/tests/ui/issues/issue-15129-rpass.rs index 522d0209c29..e2ddb989072 100644 --- a/tests/ui/issues/issue-15129-rpass.rs +++ b/tests/ui/issues/issue-15129-rpass.rs @@ -1,4 +1,4 @@ -// run-pass +//@ run-pass pub enum T { T1(()), diff --git a/tests/ui/issues/issue-15155.rs b/tests/ui/issues/issue-15155.rs index 7b137b4af56..3bc612be279 100644 --- a/tests/ui/issues/issue-15155.rs +++ b/tests/ui/issues/issue-15155.rs @@ -1,4 +1,4 @@ -// run-pass +//@ run-pass trait TraitWithSend: Send {} trait IndirectTraitWithSend: TraitWithSend {} diff --git a/tests/ui/issues/issue-15189.rs b/tests/ui/issues/issue-15189.rs index a9c884bdcfd..4dbe2179dd9 100644 --- a/tests/ui/issues/issue-15189.rs +++ b/tests/ui/issues/issue-15189.rs @@ -1,4 +1,4 @@ -// run-pass +//@ run-pass macro_rules! third { ($e:expr) => ({let x = 2; $e[x]}) } diff --git a/tests/ui/issues/issue-15444.rs b/tests/ui/issues/issue-15444.rs index e94afee9634..a9a33bd5de4 100644 --- a/tests/ui/issues/issue-15444.rs +++ b/tests/ui/issues/issue-15444.rs @@ -1,5 +1,5 @@ -// run-pass -// pretty-expanded FIXME #23616 +//@ run-pass +//@ pretty-expanded FIXME #23616 trait MyTrait { fn foo(&self); diff --git a/tests/ui/issues/issue-15523-big.rs b/tests/ui/issues/issue-15523-big.rs index 05414f1db72..7214a4fb1d5 100644 --- a/tests/ui/issues/issue-15523-big.rs +++ b/tests/ui/issues/issue-15523-big.rs @@ -1,4 +1,4 @@ -// run-pass +//@ run-pass // Issue 15523: derive(PartialOrd) should use the provided // discriminant values for the derived ordering. // diff --git a/tests/ui/issues/issue-15523.rs b/tests/ui/issues/issue-15523.rs index 220a34b9b0f..9fc2e51c6ab 100644 --- a/tests/ui/issues/issue-15523.rs +++ b/tests/ui/issues/issue-15523.rs @@ -1,4 +1,4 @@ -// run-pass +//@ run-pass // Issue 15523: derive(PartialOrd) should use the provided // discriminant values for the derived ordering. // diff --git a/tests/ui/issues/issue-15562.rs b/tests/ui/issues/issue-15562.rs index dc0ecd36522..faa46cd5ece 100644 --- a/tests/ui/issues/issue-15562.rs +++ b/tests/ui/issues/issue-15562.rs @@ -1,7 +1,7 @@ -// run-pass -// aux-build:issue-15562.rs +//@ run-pass +//@ aux-build:issue-15562.rs -// pretty-expanded FIXME #23616 +//@ pretty-expanded FIXME #23616 extern crate issue_15562 as i; diff --git a/tests/ui/issues/issue-15571.rs b/tests/ui/issues/issue-15571.rs index 5f228b2863e..cf17113a282 100644 --- a/tests/ui/issues/issue-15571.rs +++ b/tests/ui/issues/issue-15571.rs @@ -1,4 +1,4 @@ -// run-pass +//@ run-pass fn match_on_local() { let mut foo: Option> = Some(Box::new(5)); diff --git a/tests/ui/issues/issue-15673.rs b/tests/ui/issues/issue-15673.rs index a8733d7f157..bb61c246276 100644 --- a/tests/ui/issues/issue-15673.rs +++ b/tests/ui/issues/issue-15673.rs @@ -1,4 +1,4 @@ -// run-pass +//@ run-pass #![allow(stable_features)] #![feature(iter_arith)] diff --git a/tests/ui/issues/issue-15734.rs b/tests/ui/issues/issue-15734.rs index 77517f61813..b8d0b088a89 100644 --- a/tests/ui/issues/issue-15734.rs +++ b/tests/ui/issues/issue-15734.rs @@ -1,6 +1,6 @@ -// run-pass -// revisions: current next -//[next] compile-flags: -Znext-solver +//@ run-pass +//@ revisions: current next +//@[next] compile-flags: -Znext-solver use std::ops::Index; diff --git a/tests/ui/issues/issue-15735.rs b/tests/ui/issues/issue-15735.rs index f9ba34405f6..f5b3803f155 100644 --- a/tests/ui/issues/issue-15735.rs +++ b/tests/ui/issues/issue-15735.rs @@ -1,4 +1,4 @@ -// check-pass +//@ check-pass #![allow(dead_code)] struct A<'a> { a: &'a i32, diff --git a/tests/ui/issues/issue-15763.rs b/tests/ui/issues/issue-15763.rs index ae0863615e2..0ebadd80541 100644 --- a/tests/ui/issues/issue-15763.rs +++ b/tests/ui/issues/issue-15763.rs @@ -1,4 +1,4 @@ -// run-pass +//@ run-pass #![allow(unreachable_code)] #[derive(PartialEq, Debug)] diff --git a/tests/ui/issues/issue-15774.rs b/tests/ui/issues/issue-15774.rs index ed2235758b9..383003b2dd7 100644 --- a/tests/ui/issues/issue-15774.rs +++ b/tests/ui/issues/issue-15774.rs @@ -1,5 +1,5 @@ -// run-pass -// pretty-expanded FIXME #23616 +//@ run-pass +//@ pretty-expanded FIXME #23616 #![deny(warnings)] #![allow(unused_imports)] diff --git a/tests/ui/issues/issue-15793.rs b/tests/ui/issues/issue-15793.rs index 769012b1ba7..af92e9dfa4c 100644 --- a/tests/ui/issues/issue-15793.rs +++ b/tests/ui/issues/issue-15793.rs @@ -1,4 +1,4 @@ -// run-pass +//@ run-pass #![allow(dead_code)] enum NestedEnum { diff --git a/tests/ui/issues/issue-15858.rs b/tests/ui/issues/issue-15858.rs index e3e3c293d7a..2d4aac01fbe 100644 --- a/tests/ui/issues/issue-15858.rs +++ b/tests/ui/issues/issue-15858.rs @@ -1,4 +1,4 @@ -// run-pass +//@ run-pass static mut DROP_RAN: bool = false; trait Bar { diff --git a/tests/ui/issues/issue-16151.rs b/tests/ui/issues/issue-16151.rs index 48a14b2af7c..20a3b5a04da 100644 --- a/tests/ui/issues/issue-16151.rs +++ b/tests/ui/issues/issue-16151.rs @@ -1,4 +1,4 @@ -// run-pass +//@ run-pass use std::mem; diff --git a/tests/ui/issues/issue-16256.rs b/tests/ui/issues/issue-16256.rs index eec23437bcb..f5873331c2d 100644 --- a/tests/ui/issues/issue-16256.rs +++ b/tests/ui/issues/issue-16256.rs @@ -1,5 +1,5 @@ -// run-pass -// pretty-expanded FIXME #23616 +//@ run-pass +//@ pretty-expanded FIXME #23616 fn main() { let mut buf = Vec::new(); diff --git a/tests/ui/issues/issue-16278.rs b/tests/ui/issues/issue-16278.rs index 2f47b694ae9..0d3b4a90ce7 100644 --- a/tests/ui/issues/issue-16278.rs +++ b/tests/ui/issues/issue-16278.rs @@ -1,4 +1,4 @@ -// run-pass +//@ run-pass // ignore-tidy-cr // this file has some special \r\n endings (use xxd to see them) diff --git a/tests/ui/issues/issue-16441.rs b/tests/ui/issues/issue-16441.rs index bafa204e06b..21608cf04c3 100644 --- a/tests/ui/issues/issue-16441.rs +++ b/tests/ui/issues/issue-16441.rs @@ -1,6 +1,6 @@ -// run-pass +//@ run-pass #![allow(dead_code)] -// pretty-expanded FIXME #23616 +//@ pretty-expanded FIXME #23616 struct Empty; diff --git a/tests/ui/issues/issue-16452.rs b/tests/ui/issues/issue-16452.rs index faf9edd3b26..07dbf4729e6 100644 --- a/tests/ui/issues/issue-16452.rs +++ b/tests/ui/issues/issue-16452.rs @@ -1,6 +1,6 @@ -// run-pass +//@ run-pass #![allow(dead_code)] -// pretty-expanded FIXME #23616 +//@ pretty-expanded FIXME #23616 fn main() { if true { return } diff --git a/tests/ui/issues/issue-16492.rs b/tests/ui/issues/issue-16492.rs index 7fa808237bf..cfdba5fda35 100644 --- a/tests/ui/issues/issue-16492.rs +++ b/tests/ui/issues/issue-16492.rs @@ -1,4 +1,4 @@ -// run-pass +//@ run-pass #![allow(non_snake_case)] use std::rc::Rc; diff --git a/tests/ui/issues/issue-16530.rs b/tests/ui/issues/issue-16530.rs index 25817a2a63d..a24c6f09d39 100644 --- a/tests/ui/issues/issue-16530.rs +++ b/tests/ui/issues/issue-16530.rs @@ -1,4 +1,4 @@ -// run-pass +//@ run-pass #![allow(deprecated)] use std::hash::{SipHasher, Hasher, Hash}; diff --git a/tests/ui/issues/issue-16560.rs b/tests/ui/issues/issue-16560.rs index d5fffc7ef9b..37b536e644d 100644 --- a/tests/ui/issues/issue-16560.rs +++ b/tests/ui/issues/issue-16560.rs @@ -1,6 +1,6 @@ -// run-pass +//@ run-pass #![allow(unused_variables)] -// ignore-emscripten no threads support +//@ ignore-emscripten no threads support use std::thread; use std::mem; diff --git a/tests/ui/issues/issue-16596.rs b/tests/ui/issues/issue-16596.rs index e7a09630251..51441e8e782 100644 --- a/tests/ui/issues/issue-16596.rs +++ b/tests/ui/issues/issue-16596.rs @@ -1,4 +1,4 @@ -// check-pass +//@ check-pass #![allow(dead_code)] trait MatrixRow { fn dummy(&self) { }} diff --git a/tests/ui/issues/issue-1660.rs b/tests/ui/issues/issue-1660.rs index aa60a8d8a96..a114a908313 100644 --- a/tests/ui/issues/issue-1660.rs +++ b/tests/ui/issues/issue-1660.rs @@ -1,7 +1,7 @@ -// run-pass +//@ run-pass #![allow(non_upper_case_globals)] -// pretty-expanded FIXME #23616 +//@ pretty-expanded FIXME #23616 pub fn main() { static _x: isize = 1<<2; diff --git a/tests/ui/issues/issue-16643.rs b/tests/ui/issues/issue-16643.rs index c74a554af2e..e00978ce66a 100644 --- a/tests/ui/issues/issue-16643.rs +++ b/tests/ui/issues/issue-16643.rs @@ -1,7 +1,7 @@ -// run-pass -// aux-build:issue-16643.rs +//@ run-pass +//@ aux-build:issue-16643.rs -// pretty-expanded FIXME #23616 +//@ pretty-expanded FIXME #23616 extern crate issue_16643 as i; diff --git a/tests/ui/issues/issue-16648.rs b/tests/ui/issues/issue-16648.rs index 539f015fa28..7f3d3217bee 100644 --- a/tests/ui/issues/issue-16648.rs +++ b/tests/ui/issues/issue-16648.rs @@ -1,4 +1,4 @@ -// run-pass +//@ run-pass fn main() { let x: (isize, &[isize]) = (2, &[1, 2]); assert_eq!(match x { diff --git a/tests/ui/issues/issue-16668.rs b/tests/ui/issues/issue-16668.rs index 92efb42fe30..2b2370b0e2b 100644 --- a/tests/ui/issues/issue-16668.rs +++ b/tests/ui/issues/issue-16668.rs @@ -1,4 +1,4 @@ -// check-pass +//@ check-pass #![allow(dead_code)] struct Parser<'a, I, O> { parse: Box Result + 'a> diff --git a/tests/ui/issues/issue-16671.rs b/tests/ui/issues/issue-16671.rs index eff8e275bb5..f7f4f4348af 100644 --- a/tests/ui/issues/issue-16671.rs +++ b/tests/ui/issues/issue-16671.rs @@ -1,4 +1,4 @@ -// run-pass +//@ run-pass #![deny(warnings)] diff --git a/tests/ui/issues/issue-16725.rs b/tests/ui/issues/issue-16725.rs index 2cf8a60697d..7741f828c47 100644 --- a/tests/ui/issues/issue-16725.rs +++ b/tests/ui/issues/issue-16725.rs @@ -1,4 +1,4 @@ -// aux-build:issue-16725.rs +//@ aux-build:issue-16725.rs extern crate issue_16725 as foo; diff --git a/tests/ui/issues/issue-16739.rs b/tests/ui/issues/issue-16739.rs index b21ea4bcd78..39cc1b78fce 100644 --- a/tests/ui/issues/issue-16739.rs +++ b/tests/ui/issues/issue-16739.rs @@ -1,4 +1,4 @@ -// run-pass +//@ run-pass #![feature(unboxed_closures, fn_traits)] // Test that unboxing shim for calling rust-call ABI methods through a diff --git a/tests/ui/issues/issue-16745.rs b/tests/ui/issues/issue-16745.rs index e9137df0f1e..99c85bcffcf 100644 --- a/tests/ui/issues/issue-16745.rs +++ b/tests/ui/issues/issue-16745.rs @@ -1,4 +1,4 @@ -// run-pass +//@ run-pass fn main() { const X: u8 = 0; let out: u8 = match 0u8 { diff --git a/tests/ui/issues/issue-16774.rs b/tests/ui/issues/issue-16774.rs index 2b308ef76e4..bef7f0f975c 100644 --- a/tests/ui/issues/issue-16774.rs +++ b/tests/ui/issues/issue-16774.rs @@ -1,4 +1,4 @@ -// run-pass +//@ run-pass #![feature(box_patterns)] use std::ops::{Deref, DerefMut}; diff --git a/tests/ui/issues/issue-16783.rs b/tests/ui/issues/issue-16783.rs index 4af4031d278..a69ecb353bb 100644 --- a/tests/ui/issues/issue-16783.rs +++ b/tests/ui/issues/issue-16783.rs @@ -1,6 +1,6 @@ -// run-pass +//@ run-pass #![allow(unused_variables)] -// pretty-expanded FIXME #23616 +//@ pretty-expanded FIXME #23616 pub fn main() { let x = [1, 2, 3]; diff --git a/tests/ui/issues/issue-16819.rs b/tests/ui/issues/issue-16819.rs index cc0200904e5..320695118d5 100644 --- a/tests/ui/issues/issue-16819.rs +++ b/tests/ui/issues/issue-16819.rs @@ -1,4 +1,4 @@ -// run-pass +//@ run-pass #![allow(unused_variables)] // `#[cfg]` on struct field permits empty unusable struct diff --git a/tests/ui/issues/issue-16922-rpass.rs b/tests/ui/issues/issue-16922-rpass.rs index c3c6ff30488..6cce4179b7c 100644 --- a/tests/ui/issues/issue-16922-rpass.rs +++ b/tests/ui/issues/issue-16922-rpass.rs @@ -1,5 +1,5 @@ -// run-pass -// pretty-expanded FIXME #23616 +//@ run-pass +//@ pretty-expanded FIXME #23616 use std::any::Any; diff --git a/tests/ui/issues/issue-1696.rs b/tests/ui/issues/issue-1696.rs index b5d77df3a18..08002ad3c58 100644 --- a/tests/ui/issues/issue-1696.rs +++ b/tests/ui/issues/issue-1696.rs @@ -1,4 +1,4 @@ -// run-pass +//@ run-pass use std::collections::HashMap; pub fn main() { diff --git a/tests/ui/issues/issue-16994.rs b/tests/ui/issues/issue-16994.rs index 8d3074bcee9..fa3988e0999 100644 --- a/tests/ui/issues/issue-16994.rs +++ b/tests/ui/issues/issue-16994.rs @@ -1,4 +1,4 @@ -// check-pass +//@ check-pass fn cb<'a,T>(_x: Box, bool))) -> T>) -> T { panic!() diff --git a/tests/ui/issues/issue-17068.rs b/tests/ui/issues/issue-17068.rs index fe2c1a34bb4..af565da3366 100644 --- a/tests/ui/issues/issue-17068.rs +++ b/tests/ui/issues/issue-17068.rs @@ -1,4 +1,4 @@ -// run-pass +//@ run-pass // Test that regionck creates the right region links in the pattern // binding of a for loop diff --git a/tests/ui/issues/issue-17121.rs b/tests/ui/issues/issue-17121.rs index 1e7b9f015b9..0a788b317cd 100644 --- a/tests/ui/issues/issue-17121.rs +++ b/tests/ui/issues/issue-17121.rs @@ -1,6 +1,6 @@ -// check-pass +//@ check-pass #![allow(dead_code)] -// pretty-expanded FIXME #23616 +//@ pretty-expanded FIXME #23616 use std::fs::File; use std::io::{self, BufReader, Read}; diff --git a/tests/ui/issues/issue-17216.rs b/tests/ui/issues/issue-17216.rs index 05baa1bffdd..31b16ef3a2f 100644 --- a/tests/ui/issues/issue-17216.rs +++ b/tests/ui/issues/issue-17216.rs @@ -1,4 +1,4 @@ -// run-pass +//@ run-pass #![allow(unused_variables)] struct Leak<'a> { dropped: &'a mut bool diff --git a/tests/ui/issues/issue-17302.rs b/tests/ui/issues/issue-17302.rs index cf7a2f1b063..c499cc5281f 100644 --- a/tests/ui/issues/issue-17302.rs +++ b/tests/ui/issues/issue-17302.rs @@ -1,4 +1,4 @@ -// run-pass +//@ run-pass static mut DROPPED: [bool; 2] = [false, false]; diff --git a/tests/ui/issues/issue-17322.rs b/tests/ui/issues/issue-17322.rs index b4fc40c3f2b..71ff38a0145 100644 --- a/tests/ui/issues/issue-17322.rs +++ b/tests/ui/issues/issue-17322.rs @@ -1,5 +1,5 @@ -// run-pass -// pretty-expanded FIXME #23616 +//@ run-pass +//@ pretty-expanded FIXME #23616 use std::io::{self, Write}; diff --git a/tests/ui/issues/issue-17336.rs b/tests/ui/issues/issue-17336.rs index 97782ff9f0e..8ce2caaeaa5 100644 --- a/tests/ui/issues/issue-17336.rs +++ b/tests/ui/issues/issue-17336.rs @@ -1,4 +1,4 @@ -// build-pass +//@ build-pass #![allow(unused_must_use)] #![allow(ambiguous_wide_pointer_comparisons)] diff --git a/tests/ui/issues/issue-17351.rs b/tests/ui/issues/issue-17351.rs index 12bb8a73b7b..15bff07f6e5 100644 --- a/tests/ui/issues/issue-17351.rs +++ b/tests/ui/issues/issue-17351.rs @@ -1,5 +1,5 @@ -// run-pass -// pretty-expanded FIXME #23616 +//@ run-pass +//@ pretty-expanded FIXME #23616 trait Str { fn foo(&self) {} } //~ WARN method `foo` is never used impl Str for str {} diff --git a/tests/ui/issues/issue-17361.rs b/tests/ui/issues/issue-17361.rs index e97fc3afd1c..8e85f0791d6 100644 --- a/tests/ui/issues/issue-17361.rs +++ b/tests/ui/issues/issue-17361.rs @@ -1,7 +1,7 @@ -// run-pass +//@ run-pass // Test that astconv doesn't forget about mutability of &mut str -// pretty-expanded FIXME #23616 +//@ pretty-expanded FIXME #23616 fn main() { fn foo(_: &mut T) {} diff --git a/tests/ui/issues/issue-17450.rs b/tests/ui/issues/issue-17450.rs index 1ac0af1754b..d8b20169ee0 100644 --- a/tests/ui/issues/issue-17450.rs +++ b/tests/ui/issues/issue-17450.rs @@ -1,4 +1,4 @@ -// build-pass +//@ build-pass #![allow(dead_code, warnings)] static mut x: isize = 3; diff --git a/tests/ui/issues/issue-17503.rs b/tests/ui/issues/issue-17503.rs index 9a92c06e159..6c966b5319c 100644 --- a/tests/ui/issues/issue-17503.rs +++ b/tests/ui/issues/issue-17503.rs @@ -1,4 +1,4 @@ -// run-pass +//@ run-pass fn main() { let s: &[isize] = &[0, 1, 2, 3, 4]; let ss: &&[isize] = &s; diff --git a/tests/ui/issues/issue-17546.rs b/tests/ui/issues/issue-17546.rs index 6c62010f176..ade6335055a 100644 --- a/tests/ui/issues/issue-17546.rs +++ b/tests/ui/issues/issue-17546.rs @@ -1,4 +1,4 @@ -// ignore-sgx std::os::fortanix_sgx::usercalls::raw::Result changes compiler suggestions +//@ ignore-sgx std::os::fortanix_sgx::usercalls::raw::Result changes compiler suggestions use foo::MyEnum::Result; use foo::NoResult; // Through a re-export diff --git a/tests/ui/issues/issue-17662.rs b/tests/ui/issues/issue-17662.rs index a2683808b52..e75613e04d3 100644 --- a/tests/ui/issues/issue-17662.rs +++ b/tests/ui/issues/issue-17662.rs @@ -1,5 +1,5 @@ -// run-pass -// aux-build:issue-17662.rs +//@ run-pass +//@ aux-build:issue-17662.rs extern crate issue_17662 as i; diff --git a/tests/ui/issues/issue-17732.rs b/tests/ui/issues/issue-17732.rs index 8f63d5baef8..4bf7ee286e1 100644 --- a/tests/ui/issues/issue-17732.rs +++ b/tests/ui/issues/issue-17732.rs @@ -1,7 +1,7 @@ -// check-pass +//@ check-pass #![allow(dead_code)] #![allow(non_camel_case_types)] -// pretty-expanded FIXME #23616 +//@ pretty-expanded FIXME #23616 trait Person { type string; diff --git a/tests/ui/issues/issue-17734.rs b/tests/ui/issues/issue-17734.rs index ba8d6c21ca8..984adeece6d 100644 --- a/tests/ui/issues/issue-17734.rs +++ b/tests/ui/issues/issue-17734.rs @@ -1,4 +1,4 @@ -// run-pass +//@ run-pass // Test that generating drop glue for Box doesn't ICE diff --git a/tests/ui/issues/issue-17746.rs b/tests/ui/issues/issue-17746.rs index bab64a4b5ae..231fcb41a11 100644 --- a/tests/ui/issues/issue-17746.rs +++ b/tests/ui/issues/issue-17746.rs @@ -1,4 +1,4 @@ -// check-pass +//@ check-pass #![allow(dead_code)] // Regression test for #17746 diff --git a/tests/ui/issues/issue-17771.rs b/tests/ui/issues/issue-17771.rs index 2f6464668c2..d7c0ea3eb2a 100644 --- a/tests/ui/issues/issue-17771.rs +++ b/tests/ui/issues/issue-17771.rs @@ -1,6 +1,6 @@ -// run-pass +//@ run-pass #![allow(dead_code)] -// pretty-expanded FIXME #23616 +//@ pretty-expanded FIXME #23616 trait Aaa { fn dummy(&self) { } } diff --git a/tests/ui/issues/issue-17816.rs b/tests/ui/issues/issue-17816.rs index 7ca47d50335..da28a14685f 100644 --- a/tests/ui/issues/issue-17816.rs +++ b/tests/ui/issues/issue-17816.rs @@ -1,4 +1,4 @@ -// run-pass +//@ run-pass #![allow(unused_variables)] use std::marker::PhantomData; diff --git a/tests/ui/issues/issue-17877.rs b/tests/ui/issues/issue-17877.rs index 126e01de5ee..7df0fffa41c 100644 --- a/tests/ui/issues/issue-17877.rs +++ b/tests/ui/issues/issue-17877.rs @@ -1,4 +1,4 @@ -// run-pass +//@ run-pass fn main() { assert_eq!(match [0u8; 1024] { diff --git a/tests/ui/issues/issue-17897.rs b/tests/ui/issues/issue-17897.rs index 6873c7ccb7f..dbb560a199b 100644 --- a/tests/ui/issues/issue-17897.rs +++ b/tests/ui/issues/issue-17897.rs @@ -1,4 +1,4 @@ -// run-pass +//@ run-pass fn action(mut cb: Box usize>) -> usize { cb(1) } diff --git a/tests/ui/issues/issue-17904.rs b/tests/ui/issues/issue-17904.rs index c3f504ac1b9..5eaa306e80e 100644 --- a/tests/ui/issues/issue-17904.rs +++ b/tests/ui/issues/issue-17904.rs @@ -1,9 +1,9 @@ -// check-pass +//@ check-pass #![allow(dead_code)] // Test that we can parse where clauses on various forms of tuple // structs. -// pretty-expanded FIXME #23616 +//@ pretty-expanded FIXME #23616 struct Bar(T) where T: Copy; struct Bleh(T, U) where T: Copy, U: Sized; diff --git a/tests/ui/issues/issue-17905.rs b/tests/ui/issues/issue-17905.rs index 83cea8b4395..6238379b5a0 100644 --- a/tests/ui/issues/issue-17905.rs +++ b/tests/ui/issues/issue-17905.rs @@ -1,4 +1,4 @@ -// run-pass +//@ run-pass #[derive(Debug)] #[allow(dead_code)] diff --git a/tests/ui/issues/issue-18088.rs b/tests/ui/issues/issue-18088.rs index c557b5a6512..ba198884c63 100644 --- a/tests/ui/issues/issue-18088.rs +++ b/tests/ui/issues/issue-18088.rs @@ -1,4 +1,4 @@ -// check-pass +//@ check-pass pub trait Indexable: std::ops::Index { fn index2(&self, i: usize) -> &T { diff --git a/tests/ui/issues/issue-18110.rs b/tests/ui/issues/issue-18110.rs index 41c29e77da5..8ab9be19531 100644 --- a/tests/ui/issues/issue-18110.rs +++ b/tests/ui/issues/issue-18110.rs @@ -1,6 +1,6 @@ -// run-pass +//@ run-pass #![allow(unreachable_code)] -// pretty-expanded FIXME #23616 +//@ pretty-expanded FIXME #23616 fn main() { ({return},); diff --git a/tests/ui/issues/issue-18173.rs b/tests/ui/issues/issue-18173.rs index 010efee9f8a..a9f20e827fb 100644 --- a/tests/ui/issues/issue-18173.rs +++ b/tests/ui/issues/issue-18173.rs @@ -1,4 +1,4 @@ -// check-pass +//@ check-pass trait Foo { type T; } diff --git a/tests/ui/issues/issue-18188.rs b/tests/ui/issues/issue-18188.rs index ce166724aff..b99e6aea6bd 100644 --- a/tests/ui/issues/issue-18188.rs +++ b/tests/ui/issues/issue-18188.rs @@ -1,5 +1,5 @@ -// check-pass -// pretty-expanded FIXME #23616 +//@ check-pass +//@ pretty-expanded FIXME #23616 pub trait Promisable: Send + Sync {} impl Promisable for T {} diff --git a/tests/ui/issues/issue-18232.rs b/tests/ui/issues/issue-18232.rs index 7e6f6ef0f39..5ace2231192 100644 --- a/tests/ui/issues/issue-18232.rs +++ b/tests/ui/issues/issue-18232.rs @@ -1,5 +1,5 @@ -// run-pass -// pretty-expanded FIXME #23616 +//@ run-pass +//@ pretty-expanded FIXME #23616 struct Cursor<'a>(::std::marker::PhantomData<&'a ()>); diff --git a/tests/ui/issues/issue-18352.rs b/tests/ui/issues/issue-18352.rs index 5d93ed0646c..8b6aa82ea8c 100644 --- a/tests/ui/issues/issue-18352.rs +++ b/tests/ui/issues/issue-18352.rs @@ -1,4 +1,4 @@ -// run-pass +//@ run-pass const X: &'static str = "12345"; diff --git a/tests/ui/issues/issue-18353.rs b/tests/ui/issues/issue-18353.rs index 3d15c9980c3..a9c0b3bcdbd 100644 --- a/tests/ui/issues/issue-18353.rs +++ b/tests/ui/issues/issue-18353.rs @@ -1,9 +1,9 @@ -// run-pass +//@ run-pass #![allow(dead_code)] // Test that wrapping an unsized struct in an enum which gets optimised does // not ICE. -// pretty-expanded FIXME #23616 +//@ pretty-expanded FIXME #23616 struct Str { f: [u8] diff --git a/tests/ui/issues/issue-18389.rs b/tests/ui/issues/issue-18389.rs index 26b607f4081..0ab3f145457 100644 --- a/tests/ui/issues/issue-18389.rs +++ b/tests/ui/issues/issue-18389.rs @@ -1,4 +1,4 @@ -// check-pass +//@ check-pass use std::any::Any; use std::any::TypeId; diff --git a/tests/ui/issues/issue-18446-2.rs b/tests/ui/issues/issue-18446-2.rs index 85422d4d261..d403487c001 100644 --- a/tests/ui/issues/issue-18446-2.rs +++ b/tests/ui/issues/issue-18446-2.rs @@ -1,4 +1,4 @@ -// check-pass +//@ check-pass #![allow(dead_code)] // Test that methods in trait impls should override default methods. diff --git a/tests/ui/issues/issue-18464.rs b/tests/ui/issues/issue-18464.rs index 14d2d0a6c8d..99506471983 100644 --- a/tests/ui/issues/issue-18464.rs +++ b/tests/ui/issues/issue-18464.rs @@ -1,4 +1,4 @@ -// run-pass +//@ run-pass #![deny(dead_code)] const LOW_RANGE: char = '0'; diff --git a/tests/ui/issues/issue-18501.rs b/tests/ui/issues/issue-18501.rs index 0ca23074c55..559428d4d08 100644 --- a/tests/ui/issues/issue-18501.rs +++ b/tests/ui/issues/issue-18501.rs @@ -1,10 +1,10 @@ -// run-pass +//@ run-pass // Test that we don't ICE when inlining a function from another // crate that uses a trait method as a value due to incorrectly // translating the def ID of the trait during AST decoding. -// aux-build:issue-18501.rs -// pretty-expanded FIXME #23616 +//@ aux-build:issue-18501.rs +//@ pretty-expanded FIXME #23616 extern crate issue_18501 as issue; diff --git a/tests/ui/issues/issue-18514.rs b/tests/ui/issues/issue-18514.rs index 48e7f07418f..89f58d3988d 100644 --- a/tests/ui/issues/issue-18514.rs +++ b/tests/ui/issues/issue-18514.rs @@ -1,11 +1,11 @@ -// run-pass +//@ run-pass // Test that we don't ICE when codegenning a generic impl method from // an extern crate that contains a match expression on a local // variable place where one of the match case bodies contains an // expression that autoderefs through an overloaded generic deref // impl. -// aux-build:issue-18514.rs +//@ aux-build:issue-18514.rs extern crate issue_18514 as ice; use ice::{Tr, St}; diff --git a/tests/ui/issues/issue-18539.rs b/tests/ui/issues/issue-18539.rs index 745df26e320..eaf8294aa47 100644 --- a/tests/ui/issues/issue-18539.rs +++ b/tests/ui/issues/issue-18539.rs @@ -1,8 +1,8 @@ -// run-pass +//@ run-pass // Test that coercing bare fn's that return a zero sized type to // a closure doesn't cause an LLVM ERROR -// pretty-expanded FIXME #23616 +//@ pretty-expanded FIXME #23616 struct Foo; diff --git a/tests/ui/issues/issue-18685.rs b/tests/ui/issues/issue-18685.rs index bfe24b663f6..cea60e6f4f2 100644 --- a/tests/ui/issues/issue-18685.rs +++ b/tests/ui/issues/issue-18685.rs @@ -1,8 +1,8 @@ -// run-pass +//@ run-pass // Test that the self param space is not used in a conflicting // manner by unboxed closures within a default method on a trait -// pretty-expanded FIXME #23616 +//@ pretty-expanded FIXME #23616 trait Tr { fn foo(&self); diff --git a/tests/ui/issues/issue-18711.rs b/tests/ui/issues/issue-18711.rs index 43584187752..c62f83004ae 100644 --- a/tests/ui/issues/issue-18711.rs +++ b/tests/ui/issues/issue-18711.rs @@ -1,10 +1,10 @@ -// run-pass +//@ run-pass // Test that we don't panic on a RefCell borrow conflict in certain // code paths involving unboxed closures. -// pretty-expanded FIXME #23616 +//@ pretty-expanded FIXME #23616 -// aux-build:issue-18711.rs +//@ aux-build:issue-18711.rs extern crate issue_18711 as issue; fn main() { diff --git a/tests/ui/issues/issue-18738.rs b/tests/ui/issues/issue-18738.rs index bcc1ec03f26..d3e0965e545 100644 --- a/tests/ui/issues/issue-18738.rs +++ b/tests/ui/issues/issue-18738.rs @@ -1,4 +1,4 @@ -// check-pass +//@ check-pass #![allow(dead_code)] #[derive(Eq, PartialEq, PartialOrd, Ord)] enum Test<'a> { diff --git a/tests/ui/issues/issue-18767.rs b/tests/ui/issues/issue-18767.rs index 2a5721b7295..87762406da6 100644 --- a/tests/ui/issues/issue-18767.rs +++ b/tests/ui/issues/issue-18767.rs @@ -1,4 +1,4 @@ -// run-pass +//@ run-pass // Test that regionck uses the right memcat for patterns in for loops // and doesn't ICE. diff --git a/tests/ui/issues/issue-18804/main.rs b/tests/ui/issues/issue-18804/main.rs index 47c3f13d23c..d83fe697470 100644 --- a/tests/ui/issues/issue-18804/main.rs +++ b/tests/ui/issues/issue-18804/main.rs @@ -1,15 +1,15 @@ -// run-pass +//@ run-pass // Test for issue #18804, #[linkage] does not propagate through generic // functions. Failure results in a linker error. -// ignore-emscripten no weak symbol support -// ignore-windows no extern_weak linkage -// ignore-macos no extern_weak linkage +//@ ignore-emscripten no weak symbol support +//@ ignore-windows no extern_weak linkage +//@ ignore-macos no extern_weak linkage -// aux-build:lib.rs +//@ aux-build:lib.rs // rust-lang/rust#56772: nikic says we need this to be proper test. -// compile-flags: -C no-prepopulate-passes -C passes=name-anon-globals +//@ compile-flags: -C no-prepopulate-passes -C passes=name-anon-globals extern crate lib; diff --git a/tests/ui/issues/issue-18809.rs b/tests/ui/issues/issue-18809.rs index cc5b4a64c6d..d3ef6abc8bd 100644 --- a/tests/ui/issues/issue-18809.rs +++ b/tests/ui/issues/issue-18809.rs @@ -1,4 +1,4 @@ -// check-pass +//@ check-pass trait Tup { type T0; type T1; diff --git a/tests/ui/issues/issue-18845.rs b/tests/ui/issues/issue-18845.rs index 83fab4b5e8f..c9dc175b10a 100644 --- a/tests/ui/issues/issue-18845.rs +++ b/tests/ui/issues/issue-18845.rs @@ -1,4 +1,4 @@ -// run-pass +//@ run-pass // This used to generate invalid IR in that even if we took the // `false` branch we'd still try to free the Box from the other // arm. This was due to treating `*Box::new(9)` as an rvalue datum diff --git a/tests/ui/issues/issue-18859.rs b/tests/ui/issues/issue-18859.rs index c4575bce925..854b7ed62f0 100644 --- a/tests/ui/issues/issue-18859.rs +++ b/tests/ui/issues/issue-18859.rs @@ -1,4 +1,4 @@ -// run-pass +//@ run-pass mod foo { pub mod bar { diff --git a/tests/ui/issues/issue-18906.rs b/tests/ui/issues/issue-18906.rs index 976a9f49b9d..95ad8073955 100644 --- a/tests/ui/issues/issue-18906.rs +++ b/tests/ui/issues/issue-18906.rs @@ -1,6 +1,6 @@ -// check-pass +//@ check-pass #![allow(dead_code)] -// pretty-expanded FIXME #23616 +//@ pretty-expanded FIXME #23616 pub trait Borrow { fn borrow(&self) -> &Borrowed; diff --git a/tests/ui/issues/issue-18913.rs b/tests/ui/issues/issue-18913.rs index 27fae6d7757..7f9137d95c2 100644 --- a/tests/ui/issues/issue-18913.rs +++ b/tests/ui/issues/issue-18913.rs @@ -1,6 +1,6 @@ -// run-pass -// aux-build:issue-18913-1.rs -// aux-build:issue-18913-2.rs +//@ run-pass +//@ aux-build:issue-18913-1.rs +//@ aux-build:issue-18913-2.rs extern crate foo; diff --git a/tests/ui/issues/issue-18952.rs b/tests/ui/issues/issue-18952.rs index 56378b59e36..9fdafb1ff4a 100644 --- a/tests/ui/issues/issue-18952.rs +++ b/tests/ui/issues/issue-18952.rs @@ -1,5 +1,5 @@ // This issue tests fn_traits overloading on arity. -// run-pass +//@ run-pass #![feature(fn_traits)] #![feature(unboxed_closures)] diff --git a/tests/ui/issues/issue-18988.rs b/tests/ui/issues/issue-18988.rs index 708965d81d8..9dffe564080 100644 --- a/tests/ui/issues/issue-18988.rs +++ b/tests/ui/issues/issue-18988.rs @@ -1,4 +1,4 @@ -// check-pass +//@ check-pass #![allow(dead_code)] pub trait Foo : Send { } diff --git a/tests/ui/issues/issue-19001.rs b/tests/ui/issues/issue-19001.rs index 76c380c2fc9..51aebf88c95 100644 --- a/tests/ui/issues/issue-19001.rs +++ b/tests/ui/issues/issue-19001.rs @@ -1,4 +1,4 @@ -// run-pass +//@ run-pass #![allow(dead_code)] // check that we handle recursive arrays correctly in `type_of` diff --git a/tests/ui/issues/issue-19037.rs b/tests/ui/issues/issue-19037.rs index 74623da1454..961ef69a3b9 100644 --- a/tests/ui/issues/issue-19037.rs +++ b/tests/ui/issues/issue-19037.rs @@ -1,6 +1,6 @@ -// check-pass +//@ check-pass #![allow(dead_code)] -// pretty-expanded FIXME #23616 +//@ pretty-expanded FIXME #23616 struct Str([u8]); diff --git a/tests/ui/issues/issue-19097.rs b/tests/ui/issues/issue-19097.rs index 2f4b0d575bb..a329ba6f073 100644 --- a/tests/ui/issues/issue-19097.rs +++ b/tests/ui/issues/issue-19097.rs @@ -1,4 +1,4 @@ -// check-pass +//@ check-pass #![allow(dead_code)] // regression test for #19097 diff --git a/tests/ui/issues/issue-19098.rs b/tests/ui/issues/issue-19098.rs index 3d05f11b697..97e8ca17de1 100644 --- a/tests/ui/issues/issue-19098.rs +++ b/tests/ui/issues/issue-19098.rs @@ -1,4 +1,4 @@ -// check-pass +//@ check-pass pub trait Handler { fn handle(&self, _: &mut String); } diff --git a/tests/ui/issues/issue-19100.fixed b/tests/ui/issues/issue-19100.fixed index 029855de2de..1162490048c 100644 --- a/tests/ui/issues/issue-19100.fixed +++ b/tests/ui/issues/issue-19100.fixed @@ -1,4 +1,4 @@ -// run-rustfix +//@ run-rustfix #![allow(non_snake_case)] #![allow(dead_code)] diff --git a/tests/ui/issues/issue-19100.rs b/tests/ui/issues/issue-19100.rs index bd9e4ea5b60..fefed0daa72 100644 --- a/tests/ui/issues/issue-19100.rs +++ b/tests/ui/issues/issue-19100.rs @@ -1,4 +1,4 @@ -// run-rustfix +//@ run-rustfix #![allow(non_snake_case)] #![allow(dead_code)] diff --git a/tests/ui/issues/issue-19127.rs b/tests/ui/issues/issue-19127.rs index c847ac9e435..dd0526592e4 100644 --- a/tests/ui/issues/issue-19127.rs +++ b/tests/ui/issues/issue-19127.rs @@ -1,6 +1,6 @@ -// run-pass +//@ run-pass #![allow(unused_variables)] -// pretty-expanded FIXME #23616 +//@ pretty-expanded FIXME #23616 fn foo T>(f: F) {} fn id<'a>(input: &'a u8) -> &'a u8 { input } diff --git a/tests/ui/issues/issue-19129-1.rs b/tests/ui/issues/issue-19129-1.rs index 03a9691018a..65340b413e9 100644 --- a/tests/ui/issues/issue-19129-1.rs +++ b/tests/ui/issues/issue-19129-1.rs @@ -1,5 +1,5 @@ -// check-pass -// pretty-expanded FIXME #23616 +//@ check-pass +//@ pretty-expanded FIXME #23616 trait Trait { type Output; diff --git a/tests/ui/issues/issue-19129-2.rs b/tests/ui/issues/issue-19129-2.rs index 991d79d4159..6562c54b0b7 100644 --- a/tests/ui/issues/issue-19129-2.rs +++ b/tests/ui/issues/issue-19129-2.rs @@ -1,6 +1,6 @@ -// check-pass +//@ check-pass #![allow(unused_variables)] -// pretty-expanded FIXME #23616 +//@ pretty-expanded FIXME #23616 trait Trait { type Output; diff --git a/tests/ui/issues/issue-19135.rs b/tests/ui/issues/issue-19135.rs index 84540a3ff5f..42288511ab5 100644 --- a/tests/ui/issues/issue-19135.rs +++ b/tests/ui/issues/issue-19135.rs @@ -1,4 +1,4 @@ -// run-pass +//@ run-pass use std::marker::PhantomData; #[derive(Debug)] diff --git a/tests/ui/issues/issue-1920-absolute-paths/issue-1920-1.rs b/tests/ui/issues/issue-1920-absolute-paths/issue-1920-1.rs index 26553f56b84..763d07db2cd 100644 --- a/tests/ui/issues/issue-1920-absolute-paths/issue-1920-1.rs +++ b/tests/ui/issues/issue-1920-absolute-paths/issue-1920-1.rs @@ -1,6 +1,6 @@ //! Test that absolute path names are correct when a crate is not linked into the root namespace -// aux-build:issue-1920.rs +//@ aux-build:issue-1920.rs mod foo { pub extern crate issue_1920; diff --git a/tests/ui/issues/issue-1920-absolute-paths/issue-1920-2.rs b/tests/ui/issues/issue-1920-absolute-paths/issue-1920-2.rs index 8d4a5f66310..b5a90b2c8e8 100644 --- a/tests/ui/issues/issue-1920-absolute-paths/issue-1920-2.rs +++ b/tests/ui/issues/issue-1920-absolute-paths/issue-1920-2.rs @@ -1,6 +1,6 @@ //! Test that when a crate is linked under another name that name is used in global paths -// aux-build:issue-1920.rs +//@ aux-build:issue-1920.rs extern crate issue_1920 as bar; diff --git a/tests/ui/issues/issue-1920-absolute-paths/issue-1920-3.rs b/tests/ui/issues/issue-1920-absolute-paths/issue-1920-3.rs index 520db50f94a..372c8b1511c 100644 --- a/tests/ui/issues/issue-1920-absolute-paths/issue-1920-3.rs +++ b/tests/ui/issues/issue-1920-absolute-paths/issue-1920-3.rs @@ -1,6 +1,6 @@ //! Test that when a crate is linked multiple times that the shortest absolute path name is used -// aux-build:issue-1920.rs +//@ aux-build:issue-1920.rs mod foo { pub extern crate issue_1920; diff --git a/tests/ui/issues/issue-19293.rs b/tests/ui/issues/issue-19293.rs index b6e9e3d065a..7a971a59c3d 100644 --- a/tests/ui/issues/issue-19293.rs +++ b/tests/ui/issues/issue-19293.rs @@ -1,6 +1,6 @@ -// run-pass -// aux-build:issue-19293.rs -// pretty-expanded FIXME #23616 +//@ run-pass +//@ aux-build:issue-19293.rs +//@ pretty-expanded FIXME #23616 extern crate issue_19293; use issue_19293::{Foo, MyEnum}; diff --git a/tests/ui/issues/issue-19340-1.rs b/tests/ui/issues/issue-19340-1.rs index e3cc2daae9b..c1ba0d23b6f 100644 --- a/tests/ui/issues/issue-19340-1.rs +++ b/tests/ui/issues/issue-19340-1.rs @@ -1,8 +1,8 @@ -// run-pass +//@ run-pass #![allow(unused_variables)] -// aux-build:issue-19340-1.rs +//@ aux-build:issue-19340-1.rs -// pretty-expanded FIXME #23616 +//@ pretty-expanded FIXME #23616 extern crate issue_19340_1 as lib; diff --git a/tests/ui/issues/issue-19340-2.rs b/tests/ui/issues/issue-19340-2.rs index a222e9e4621..dd1bda78a97 100644 --- a/tests/ui/issues/issue-19340-2.rs +++ b/tests/ui/issues/issue-19340-2.rs @@ -1,6 +1,6 @@ -// run-pass +//@ run-pass #![allow(unused_variables)] -// pretty-expanded FIXME #23616 +//@ pretty-expanded FIXME #23616 enum Homura { Madoka { diff --git a/tests/ui/issues/issue-19367.rs b/tests/ui/issues/issue-19367.rs index 0699533e72b..ce8451dd2de 100644 --- a/tests/ui/issues/issue-19367.rs +++ b/tests/ui/issues/issue-19367.rs @@ -1,4 +1,4 @@ -// run-pass +//@ run-pass struct S { o: Option } diff --git a/tests/ui/issues/issue-19398.rs b/tests/ui/issues/issue-19398.rs index a9d0acaa26f..751fffb1744 100644 --- a/tests/ui/issues/issue-19398.rs +++ b/tests/ui/issues/issue-19398.rs @@ -1,5 +1,5 @@ -// check-pass -// pretty-expanded FIXME #23616 +//@ check-pass +//@ pretty-expanded FIXME #23616 trait T { unsafe extern "Rust" fn foo(&self); diff --git a/tests/ui/issues/issue-19404.rs b/tests/ui/issues/issue-19404.rs index f1cf1feb005..ff9bb1f2e03 100644 --- a/tests/ui/issues/issue-19404.rs +++ b/tests/ui/issues/issue-19404.rs @@ -1,4 +1,4 @@ -// build-pass +//@ build-pass #![allow(dead_code)] #![allow(unused_variables)] use std::any::TypeId; diff --git a/tests/ui/issues/issue-19479.rs b/tests/ui/issues/issue-19479.rs index 70bfe7213f2..2818be310be 100644 --- a/tests/ui/issues/issue-19479.rs +++ b/tests/ui/issues/issue-19479.rs @@ -1,5 +1,5 @@ -// check-pass -// pretty-expanded FIXME #23616 +//@ check-pass +//@ pretty-expanded FIXME #23616 trait Base { fn dummy(&self) { } diff --git a/tests/ui/issues/issue-19499.rs b/tests/ui/issues/issue-19499.rs index d09056ce3de..0bd70865211 100644 --- a/tests/ui/issues/issue-19499.rs +++ b/tests/ui/issues/issue-19499.rs @@ -1,4 +1,4 @@ -// run-pass +//@ run-pass #![allow(path_statements)] #![allow(unused_variables)] // Regression test for issue #19499. Due to incorrect caching of trait @@ -7,7 +7,7 @@ // reasonable examples) let to ambiguity errors about not being able // to infer sufficient type information. -// pretty-expanded FIXME #23616 +//@ pretty-expanded FIXME #23616 fn main() { let n = 0; diff --git a/tests/ui/issues/issue-19601.rs b/tests/ui/issues/issue-19601.rs index 176e6ba4106..e97819e4122 100644 --- a/tests/ui/issues/issue-19601.rs +++ b/tests/ui/issues/issue-19601.rs @@ -1,4 +1,4 @@ -// check-pass +//@ check-pass trait A {} struct B where B: A> { t: T } diff --git a/tests/ui/issues/issue-1962.fixed b/tests/ui/issues/issue-1962.fixed index 897fd172b29..f0002be4bea 100644 --- a/tests/ui/issues/issue-1962.fixed +++ b/tests/ui/issues/issue-1962.fixed @@ -1,5 +1,5 @@ -// compile-flags: -D while-true -// run-rustfix +//@ compile-flags: -D while-true +//@ run-rustfix fn main() { let mut i = 0; diff --git a/tests/ui/issues/issue-1962.rs b/tests/ui/issues/issue-1962.rs index 71e87410087..9c8fb500ba3 100644 --- a/tests/ui/issues/issue-1962.rs +++ b/tests/ui/issues/issue-1962.rs @@ -1,5 +1,5 @@ -// compile-flags: -D while-true -// run-rustfix +//@ compile-flags: -D while-true +//@ run-rustfix fn main() { let mut i = 0; diff --git a/tests/ui/issues/issue-19631.rs b/tests/ui/issues/issue-19631.rs index 694e6dcd15a..a20df9c9d4c 100644 --- a/tests/ui/issues/issue-19631.rs +++ b/tests/ui/issues/issue-19631.rs @@ -1,6 +1,6 @@ -// check-pass +//@ check-pass #![allow(dead_code)] -// pretty-expanded FIXME #23616 +//@ pretty-expanded FIXME #23616 trait PoolManager { type C; diff --git a/tests/ui/issues/issue-19632.rs b/tests/ui/issues/issue-19632.rs index 203976079fb..53e25112ecc 100644 --- a/tests/ui/issues/issue-19632.rs +++ b/tests/ui/issues/issue-19632.rs @@ -1,6 +1,6 @@ -// check-pass +//@ check-pass #![allow(dead_code)] -// pretty-expanded FIXME #23616 +//@ pretty-expanded FIXME #23616 trait PoolManager { type C; diff --git a/tests/ui/issues/issue-1974.rs b/tests/ui/issues/issue-1974.rs index 74a54a6029e..ea67b2541de 100644 --- a/tests/ui/issues/issue-1974.rs +++ b/tests/ui/issues/issue-1974.rs @@ -1,7 +1,7 @@ -// run-pass +//@ run-pass // Issue 1974 // Don't double free the condition allocation -// pretty-expanded FIXME #23616 +//@ pretty-expanded FIXME #23616 pub fn main() { let s = "hej".to_string(); diff --git a/tests/ui/issues/issue-19811-escape-unicode.rs b/tests/ui/issues/issue-19811-escape-unicode.rs index a2c50bc022d..7be77b88494 100644 --- a/tests/ui/issues/issue-19811-escape-unicode.rs +++ b/tests/ui/issues/issue-19811-escape-unicode.rs @@ -1,4 +1,4 @@ -// run-pass +//@ run-pass fn main() { let mut escaped = String::from(""); diff --git a/tests/ui/issues/issue-19850.rs b/tests/ui/issues/issue-19850.rs index 4a578c398a8..5e8ba2d4881 100644 --- a/tests/ui/issues/issue-19850.rs +++ b/tests/ui/issues/issue-19850.rs @@ -1,9 +1,9 @@ -// check-pass +//@ check-pass #![allow(unused_variables)] // Test that `::Output` and `Self::Output` are accepted as type annotations in let // bindings -// pretty-expanded FIXME #23616 +//@ pretty-expanded FIXME #23616 trait Int { fn one() -> Self; diff --git a/tests/ui/issues/issue-19982.rs b/tests/ui/issues/issue-19982.rs index 12419c109c5..4bace6d734f 100644 --- a/tests/ui/issues/issue-19982.rs +++ b/tests/ui/issues/issue-19982.rs @@ -1,4 +1,4 @@ -// check-pass +//@ check-pass #![feature(fn_traits, unboxed_closures)] diff --git a/tests/ui/issues/issue-20009.rs b/tests/ui/issues/issue-20009.rs index f289e58c50e..ed884d12834 100644 --- a/tests/ui/issues/issue-20009.rs +++ b/tests/ui/issues/issue-20009.rs @@ -1,7 +1,7 @@ -// check-pass +//@ check-pass // Check that associated types are `Sized` -// pretty-expanded FIXME #23616 +//@ pretty-expanded FIXME #23616 trait Trait { type Output; diff --git a/tests/ui/issues/issue-20055-box-trait.rs b/tests/ui/issues/issue-20055-box-trait.rs index 36f597450ad..43f1f43ba27 100644 --- a/tests/ui/issues/issue-20055-box-trait.rs +++ b/tests/ui/issues/issue-20055-box-trait.rs @@ -1,4 +1,4 @@ -// run-pass +//@ run-pass // See Issues #20055 and #21695. // We are checking here that the temporaries `Box<[i8, k]>`, for `k` diff --git a/tests/ui/issues/issue-20055-box-unsized-array.rs b/tests/ui/issues/issue-20055-box-unsized-array.rs index 1246c80651f..2663bcfb4f7 100644 --- a/tests/ui/issues/issue-20055-box-unsized-array.rs +++ b/tests/ui/issues/issue-20055-box-unsized-array.rs @@ -1,4 +1,4 @@ -// run-pass +//@ run-pass // Issue #2005: Check that boxed fixed-size arrays are properly // accounted for (namely, only deallocated if they were actually // created) when they appear as temporaries in unused arms of a match diff --git a/tests/ui/issues/issue-20174.rs b/tests/ui/issues/issue-20174.rs index 4ed5a97c172..7b49fe8c7b4 100644 --- a/tests/ui/issues/issue-20174.rs +++ b/tests/ui/issues/issue-20174.rs @@ -1,4 +1,4 @@ -// run-pass +//@ run-pass struct GradFn usize>(F); fn main() { diff --git a/tests/ui/issues/issue-20186.rs b/tests/ui/issues/issue-20186.rs index 54d68f10052..79dad71844f 100644 --- a/tests/ui/issues/issue-20186.rs +++ b/tests/ui/issues/issue-20186.rs @@ -1,4 +1,4 @@ -// check-pass +//@ check-pass #![allow(dead_code)] #![allow(unused_variables)] struct Foo; diff --git a/tests/ui/issues/issue-20313-rpass.rs b/tests/ui/issues/issue-20313-rpass.rs index 591f3659e98..66ba97b1074 100644 --- a/tests/ui/issues/issue-20313-rpass.rs +++ b/tests/ui/issues/issue-20313-rpass.rs @@ -1,6 +1,6 @@ -// run-pass +//@ run-pass #![allow(dead_code)] -// pretty-expanded FIXME #23616 +//@ pretty-expanded FIXME #23616 #![feature(link_llvm_intrinsics)] extern "C" { diff --git a/tests/ui/issues/issue-20389.rs b/tests/ui/issues/issue-20389.rs index 9bc3efcc1c4..7d3b49ee25f 100644 --- a/tests/ui/issues/issue-20389.rs +++ b/tests/ui/issues/issue-20389.rs @@ -1,8 +1,8 @@ -// run-pass +//@ run-pass #![allow(dead_code)] -// aux-build:issue-20389.rs +//@ aux-build:issue-20389.rs -// pretty-expanded FIXME #23616 +//@ pretty-expanded FIXME #23616 extern crate issue_20389; diff --git a/tests/ui/issues/issue-20396.rs b/tests/ui/issues/issue-20396.rs index 4a34f8b385f..46a06bb8e3c 100644 --- a/tests/ui/issues/issue-20396.rs +++ b/tests/ui/issues/issue-20396.rs @@ -1,5 +1,5 @@ -// check-pass -// pretty-expanded FIXME #23616 +//@ check-pass +//@ pretty-expanded FIXME #23616 #![allow(dead_code)] diff --git a/tests/ui/issues/issue-20413.rs b/tests/ui/issues/issue-20413.rs index 4de22f0c917..0f602b32fab 100644 --- a/tests/ui/issues/issue-20413.rs +++ b/tests/ui/issues/issue-20413.rs @@ -1,4 +1,4 @@ -// normalize-stderr-test: "long-type-\d+" -> "long-type-hash" +//@ normalize-stderr-test: "long-type-\d+" -> "long-type-hash" trait Foo { fn answer(self); } diff --git a/tests/ui/issues/issue-20414.rs b/tests/ui/issues/issue-20414.rs index 2496e342a2f..ea086c2fbeb 100644 --- a/tests/ui/issues/issue-20414.rs +++ b/tests/ui/issues/issue-20414.rs @@ -1,6 +1,6 @@ -// check-pass +//@ check-pass #![allow(dead_code)] -// pretty-expanded FIXME #23616 +//@ pretty-expanded FIXME #23616 trait Trait { fn method(self) -> isize; diff --git a/tests/ui/issues/issue-20427.rs b/tests/ui/issues/issue-20427.rs index cfd8b2191ac..ff84023ebf2 100644 --- a/tests/ui/issues/issue-20427.rs +++ b/tests/ui/issues/issue-20427.rs @@ -1,4 +1,4 @@ -// run-pass +//@ run-pass #![allow(dead_code)] #![allow(unused_variables)] #![allow(unused_imports)] @@ -6,7 +6,7 @@ #![allow(non_camel_case_types)] #![allow(deprecated, deprecated_in_future)] -// aux-build:i8.rs +//@ aux-build:i8.rs extern crate i8; use std::string as i16; diff --git a/tests/ui/issues/issue-20454.rs b/tests/ui/issues/issue-20454.rs index 46cae33f102..e56f2ffa371 100644 --- a/tests/ui/issues/issue-20454.rs +++ b/tests/ui/issues/issue-20454.rs @@ -1,4 +1,4 @@ -// check-pass +//@ check-pass #![allow(unused_must_use)] use std::thread; diff --git a/tests/ui/issues/issue-20544.rs b/tests/ui/issues/issue-20544.rs index 0f4d314f166..2aaae17294d 100644 --- a/tests/ui/issues/issue-20544.rs +++ b/tests/ui/issues/issue-20544.rs @@ -1,4 +1,4 @@ -// run-pass +//@ run-pass #![feature(unboxed_closures)] #![feature(fn_traits)] diff --git a/tests/ui/issues/issue-20575.rs b/tests/ui/issues/issue-20575.rs index 0ca67d9dc71..f8ff8b7d23d 100644 --- a/tests/ui/issues/issue-20575.rs +++ b/tests/ui/issues/issue-20575.rs @@ -1,7 +1,7 @@ -// run-pass +//@ run-pass // Test that overloaded calls work with zero arity closures -// pretty-expanded FIXME #23616 +//@ pretty-expanded FIXME #23616 fn main() { let functions: [Box Option<()>>; 1] = [Box::new(|| None)]; diff --git a/tests/ui/issues/issue-20644.rs b/tests/ui/issues/issue-20644.rs index a3a9ea7405f..f71e1a5ba8f 100644 --- a/tests/ui/issues/issue-20644.rs +++ b/tests/ui/issues/issue-20644.rs @@ -1,4 +1,4 @@ -// build-pass +//@ build-pass #![allow(dead_code)] #![allow(unused_imports)] #![allow(stable_features)] @@ -6,7 +6,7 @@ // A reduced version of the rustbook ice. The problem this encountered // had to do with codegen ignoring binders. -// pretty-expanded FIXME #23616 +//@ pretty-expanded FIXME #23616 #![feature(os)] diff --git a/tests/ui/issues/issue-20676.rs b/tests/ui/issues/issue-20676.rs index 2bc5034960a..b3319950b42 100644 --- a/tests/ui/issues/issue-20676.rs +++ b/tests/ui/issues/issue-20676.rs @@ -1,4 +1,4 @@ -// run-pass +//@ run-pass // Regression test for #20676. Error was that we didn't support // UFCS-style calls to a method in `Trait` where `Self` was bound to a // trait object of type `Trait`. See also `ufcs-trait-object.rs`. diff --git a/tests/ui/issues/issue-2074.rs b/tests/ui/issues/issue-2074.rs index a6bea385804..ebf0de4348c 100644 --- a/tests/ui/issues/issue-2074.rs +++ b/tests/ui/issues/issue-2074.rs @@ -1,5 +1,5 @@ -// run-pass -// pretty-expanded FIXME #23616 +//@ run-pass +//@ pretty-expanded FIXME #23616 #![allow(non_camel_case_types)] diff --git a/tests/ui/issues/issue-20763-1.rs b/tests/ui/issues/issue-20763-1.rs index 858d313fc32..ea2e696767d 100644 --- a/tests/ui/issues/issue-20763-1.rs +++ b/tests/ui/issues/issue-20763-1.rs @@ -1,6 +1,6 @@ -// check-pass +//@ check-pass #![allow(dead_code)] -// pretty-expanded FIXME #23616 +//@ pretty-expanded FIXME #23616 trait T0 { type O; diff --git a/tests/ui/issues/issue-20763-2.rs b/tests/ui/issues/issue-20763-2.rs index aa5bed209ee..149bfcb8c99 100644 --- a/tests/ui/issues/issue-20763-2.rs +++ b/tests/ui/issues/issue-20763-2.rs @@ -1,6 +1,6 @@ -// check-pass +//@ check-pass #![allow(dead_code)] -// pretty-expanded FIXME #23616 +//@ pretty-expanded FIXME #23616 trait T0 { type O; diff --git a/tests/ui/issues/issue-20797.rs b/tests/ui/issues/issue-20797.rs index ef0e72571ef..3d3160c6e85 100644 --- a/tests/ui/issues/issue-20797.rs +++ b/tests/ui/issues/issue-20797.rs @@ -1,4 +1,4 @@ -// build-pass +//@ build-pass // Regression test for #20797. diff --git a/tests/ui/issues/issue-20803.rs b/tests/ui/issues/issue-20803.rs index f657cf6cdd7..47bf52b31a0 100644 --- a/tests/ui/issues/issue-20803.rs +++ b/tests/ui/issues/issue-20803.rs @@ -1,4 +1,4 @@ -// run-pass +//@ run-pass use std::ops::Add; fn foo(x: T) -> >::Output where i32: Add { diff --git a/tests/ui/issues/issue-20847.rs b/tests/ui/issues/issue-20847.rs index 03e632263e6..364b07bf692 100644 --- a/tests/ui/issues/issue-20847.rs +++ b/tests/ui/issues/issue-20847.rs @@ -1,4 +1,4 @@ -// run-pass +//@ run-pass #![feature(fn_traits)] fn say(x: u32, y: u32) { diff --git a/tests/ui/issues/issue-20953.rs b/tests/ui/issues/issue-20953.rs index 4ec7e3195eb..936e7aec52d 100644 --- a/tests/ui/issues/issue-20953.rs +++ b/tests/ui/issues/issue-20953.rs @@ -1,4 +1,4 @@ -// run-pass +//@ run-pass #![allow(unused_mut)] #![allow(unused_variables)] fn main() { diff --git a/tests/ui/issues/issue-20971.rs b/tests/ui/issues/issue-20971.rs index 2e10418178c..377a3d9ea30 100644 --- a/tests/ui/issues/issue-20971.rs +++ b/tests/ui/issues/issue-20971.rs @@ -1,8 +1,8 @@ // Regression test for Issue #20971. -// run-fail -// error-pattern:Hello, world! -// ignore-emscripten no processes +//@ run-fail +//@ error-pattern:Hello, world! +//@ ignore-emscripten no processes pub trait Parser { type Input; diff --git a/tests/ui/issues/issue-21033.rs b/tests/ui/issues/issue-21033.rs index 91f72eb369b..4ddc7a1db58 100644 --- a/tests/ui/issues/issue-21033.rs +++ b/tests/ui/issues/issue-21033.rs @@ -1,7 +1,7 @@ -// run-pass +//@ run-pass #![allow(unused_mut)] #![allow(unused_variables)] -// pretty-expanded FIXME #23616 +//@ pretty-expanded FIXME #23616 #![feature(box_patterns)] diff --git a/tests/ui/issues/issue-21140.rs b/tests/ui/issues/issue-21140.rs index 01de901112e..fbae052d018 100644 --- a/tests/ui/issues/issue-21140.rs +++ b/tests/ui/issues/issue-21140.rs @@ -1,4 +1,4 @@ -// check-pass +//@ check-pass pub trait Trait where Self::Out: std::fmt::Display { type Out; } diff --git a/tests/ui/issues/issue-21174-2.rs b/tests/ui/issues/issue-21174-2.rs index c90f91f6a69..06f3ceaac35 100644 --- a/tests/ui/issues/issue-21174-2.rs +++ b/tests/ui/issues/issue-21174-2.rs @@ -1,4 +1,4 @@ -// check-pass +//@ check-pass #![allow(dead_code)] #![allow(unused_variables)] trait Trait<'a> { diff --git a/tests/ui/issues/issue-21202.rs b/tests/ui/issues/issue-21202.rs index 2c5f1394449..66f6ef3b83f 100644 --- a/tests/ui/issues/issue-21202.rs +++ b/tests/ui/issues/issue-21202.rs @@ -1,4 +1,4 @@ -// aux-build:issue-21202.rs +//@ aux-build:issue-21202.rs extern crate issue_21202 as crate1; diff --git a/tests/ui/issues/issue-21245.rs b/tests/ui/issues/issue-21245.rs index c8e55a0cc20..f25ebf718b1 100644 --- a/tests/ui/issues/issue-21245.rs +++ b/tests/ui/issues/issue-21245.rs @@ -1,11 +1,11 @@ -// check-pass +//@ check-pass #![allow(dead_code)] // Regression test for issue #21245. Check that we are able to infer // the types in these examples correctly. It used to be that // insufficient type propagation caused the type of the iterator to be // incorrectly unified with the `*const` type to which it is coerced. -// pretty-expanded FIXME #23616 +//@ pretty-expanded FIXME #23616 use std::ptr; diff --git a/tests/ui/issues/issue-21291.rs b/tests/ui/issues/issue-21291.rs index b351e22d862..357d5520028 100644 --- a/tests/ui/issues/issue-21291.rs +++ b/tests/ui/issues/issue-21291.rs @@ -1,5 +1,5 @@ -// run-pass -// ignore-emscripten no threads support +//@ run-pass +//@ ignore-emscripten no threads support // Regression test for unwrapping the result of `join`, issue #21291 diff --git a/tests/ui/issues/issue-21306.rs b/tests/ui/issues/issue-21306.rs index b06a475e4df..bf42e70a5bc 100644 --- a/tests/ui/issues/issue-21306.rs +++ b/tests/ui/issues/issue-21306.rs @@ -1,4 +1,4 @@ -// run-pass +//@ run-pass use std::sync::Arc; diff --git a/tests/ui/issues/issue-21361.rs b/tests/ui/issues/issue-21361.rs index c970e77abb7..6f0bafc3b1b 100644 --- a/tests/ui/issues/issue-21361.rs +++ b/tests/ui/issues/issue-21361.rs @@ -1,4 +1,4 @@ -// run-pass +//@ run-pass fn main() { let v = vec![1, 2, 3]; diff --git a/tests/ui/issues/issue-21384.rs b/tests/ui/issues/issue-21384.rs index caa99a15982..7dc531e9c2b 100644 --- a/tests/ui/issues/issue-21384.rs +++ b/tests/ui/issues/issue-21384.rs @@ -1,4 +1,4 @@ -// run-pass +//@ run-pass use ::std::ops::RangeFull; diff --git a/tests/ui/issues/issue-21400.rs b/tests/ui/issues/issue-21400.rs index 4a85158d97a..2c4bbe3d317 100644 --- a/tests/ui/issues/issue-21400.rs +++ b/tests/ui/issues/issue-21400.rs @@ -1,4 +1,4 @@ -// run-pass +//@ run-pass // Regression test for #21400 which itself was extracted from // stackoverflow.com/questions/28031155/is-my-borrow-checker-drunk/28031580 diff --git a/tests/ui/issues/issue-21402.rs b/tests/ui/issues/issue-21402.rs index d140b6162ce..28d1e1a0d77 100644 --- a/tests/ui/issues/issue-21402.rs +++ b/tests/ui/issues/issue-21402.rs @@ -1,6 +1,6 @@ -// check-pass +//@ check-pass #![allow(dead_code)] -// pretty-expanded FIXME #23616 +//@ pretty-expanded FIXME #23616 #[derive(Hash)] struct Foo { diff --git a/tests/ui/issues/issue-21622.rs b/tests/ui/issues/issue-21622.rs index 2d4cddac911..8dbc2c21ba9 100644 --- a/tests/ui/issues/issue-21622.rs +++ b/tests/ui/issues/issue-21622.rs @@ -1,4 +1,4 @@ -// check-pass +//@ check-pass #![allow(dead_code)] #![allow(unused_variables)] diff --git a/tests/ui/issues/issue-21634.rs b/tests/ui/issues/issue-21634.rs index 2731bfd767f..270a893474a 100644 --- a/tests/ui/issues/issue-21634.rs +++ b/tests/ui/issues/issue-21634.rs @@ -1,4 +1,4 @@ -// run-pass +//@ run-pass #![allow(stable_features)] #![feature(cfg_target_feature)] diff --git a/tests/ui/issues/issue-21655.rs b/tests/ui/issues/issue-21655.rs index d1cd4ec7b8a..1068b28b338 100644 --- a/tests/ui/issues/issue-21655.rs +++ b/tests/ui/issues/issue-21655.rs @@ -1,4 +1,4 @@ -// run-pass +//@ run-pass fn test(it: &mut dyn Iterator) { for x in it { diff --git a/tests/ui/issues/issue-2170-exe.rs b/tests/ui/issues/issue-2170-exe.rs index a89579706c8..9e3586afbbc 100644 --- a/tests/ui/issues/issue-2170-exe.rs +++ b/tests/ui/issues/issue-2170-exe.rs @@ -1,6 +1,6 @@ -// run-pass -// aux-build:issue-2170-lib.rs -// pretty-expanded FIXME #23616 +//@ run-pass +//@ aux-build:issue-2170-lib.rs +//@ pretty-expanded FIXME #23616 extern crate issue_2170_lib; diff --git a/tests/ui/issues/issue-21763.rs b/tests/ui/issues/issue-21763.rs index 38103ff4f9c..a349253063c 100644 --- a/tests/ui/issues/issue-21763.rs +++ b/tests/ui/issues/issue-21763.rs @@ -1,6 +1,6 @@ // Regression test for HashMap only impl'ing Send/Sync if its contents do -// normalize-stderr-test: "\S+hashbrown-\S+" -> "$$HASHBROWN_SRC_LOCATION" +//@ normalize-stderr-test: "\S+hashbrown-\S+" -> "$$HASHBROWN_SRC_LOCATION" use std::collections::HashMap; use std::rc::Rc; diff --git a/tests/ui/issues/issue-21891.rs b/tests/ui/issues/issue-21891.rs index 576f0253e63..1feb0daa2d1 100644 --- a/tests/ui/issues/issue-21891.rs +++ b/tests/ui/issues/issue-21891.rs @@ -1,8 +1,8 @@ -// build-pass +//@ build-pass #![allow(dead_code)] #![allow(non_upper_case_globals)] -// pretty-expanded FIXME #23616 +//@ pretty-expanded FIXME #23616 static foo: [usize; 3] = [1, 2, 3]; diff --git a/tests/ui/issues/issue-2190-1.rs b/tests/ui/issues/issue-2190-1.rs index e67a924b9ee..5b2890c89fb 100644 --- a/tests/ui/issues/issue-2190-1.rs +++ b/tests/ui/issues/issue-2190-1.rs @@ -1,9 +1,9 @@ -// run-pass +//@ run-pass #![allow(unused_must_use)] #![allow(non_upper_case_globals)] -// pretty-expanded FIXME #23616 -// ignore-emscripten no threads +//@ pretty-expanded FIXME #23616 +//@ ignore-emscripten no threads use std::thread::Builder; diff --git a/tests/ui/issues/issue-21909.rs b/tests/ui/issues/issue-21909.rs index 6a6cdcfee15..bbf654cb208 100644 --- a/tests/ui/issues/issue-21909.rs +++ b/tests/ui/issues/issue-21909.rs @@ -1,5 +1,5 @@ -// check-pass -// pretty-expanded FIXME #23616 +//@ check-pass +//@ pretty-expanded FIXME #23616 trait A { fn dummy(&self, arg: X); diff --git a/tests/ui/issues/issue-21922.rs b/tests/ui/issues/issue-21922.rs index 9727b2efe9a..6404ab8b7aa 100644 --- a/tests/ui/issues/issue-21922.rs +++ b/tests/ui/issues/issue-21922.rs @@ -1,4 +1,4 @@ -// run-pass +//@ run-pass use std::ops::Add; fn show(z: i32) { println!("{}", z) diff --git a/tests/ui/issues/issue-22008.rs b/tests/ui/issues/issue-22008.rs index 00425582266..b537ce8c272 100644 --- a/tests/ui/issues/issue-22008.rs +++ b/tests/ui/issues/issue-22008.rs @@ -1,4 +1,4 @@ -// run-pass +//@ run-pass pub fn main() { let command = "a"; diff --git a/tests/ui/issues/issue-22036.rs b/tests/ui/issues/issue-22036.rs index 30da2130a31..befdf7ead06 100644 --- a/tests/ui/issues/issue-22036.rs +++ b/tests/ui/issues/issue-22036.rs @@ -1,4 +1,4 @@ -// run-pass +//@ run-pass trait DigitCollection: Sized { type Iter: Iterator; diff --git a/tests/ui/issues/issue-2214.rs b/tests/ui/issues/issue-2214.rs index 1994c3515ab..3c458984204 100644 --- a/tests/ui/issues/issue-2214.rs +++ b/tests/ui/issues/issue-2214.rs @@ -1,6 +1,6 @@ -// run-pass -// ignore-wasm32-bare no libc to test ffi with -// ignore-sgx no libc +//@ run-pass +//@ ignore-wasm32-bare no libc to test ffi with +//@ ignore-sgx no libc #![feature(rustc_private)] extern crate libc; diff --git a/tests/ui/issues/issue-22258.rs b/tests/ui/issues/issue-22258.rs index 93ead5818d5..a1eb8ba14ca 100644 --- a/tests/ui/issues/issue-22258.rs +++ b/tests/ui/issues/issue-22258.rs @@ -1,4 +1,4 @@ -// run-pass +//@ run-pass use std::ops::Add; fn f(a: T, b: T) -> ::Output { diff --git a/tests/ui/issues/issue-22346.rs b/tests/ui/issues/issue-22346.rs index 5f6d9dcc9ae..42280a7ddb6 100644 --- a/tests/ui/issues/issue-22346.rs +++ b/tests/ui/issues/issue-22346.rs @@ -1,6 +1,6 @@ -// run-pass +//@ run-pass #![allow(dead_code)] -// pretty-expanded FIXME #23616 +//@ pretty-expanded FIXME #23616 // This used to cause an ICE because the retslot for the "return" had the wrong type fn testcase<'a>() -> Box + 'a> { diff --git a/tests/ui/issues/issue-22356.rs b/tests/ui/issues/issue-22356.rs index 47fad3bb909..6b0024ee0ee 100644 --- a/tests/ui/issues/issue-22356.rs +++ b/tests/ui/issues/issue-22356.rs @@ -1,7 +1,7 @@ -// check-pass +//@ check-pass #![allow(type_alias_bounds)] -// pretty-expanded FIXME #23616 +//@ pretty-expanded FIXME #23616 use std::marker::PhantomData; diff --git a/tests/ui/issues/issue-22403.rs b/tests/ui/issues/issue-22403.rs index 8d855909435..89c956913f9 100644 --- a/tests/ui/issues/issue-22403.rs +++ b/tests/ui/issues/issue-22403.rs @@ -1,4 +1,4 @@ -// run-pass +//@ run-pass fn main() { let x = Box::new([1, 2, 3]); let y = x as Box<[i32]>; diff --git a/tests/ui/issues/issue-22426.rs b/tests/ui/issues/issue-22426.rs index adf060a8292..d5254528a12 100644 --- a/tests/ui/issues/issue-22426.rs +++ b/tests/ui/issues/issue-22426.rs @@ -1,5 +1,5 @@ -// run-pass -// pretty-expanded FIXME #23616 +//@ run-pass +//@ pretty-expanded FIXME #23616 fn main() { match 42 { diff --git a/tests/ui/issues/issue-22471.rs b/tests/ui/issues/issue-22471.rs index 69879ab7fdf..a983fec05c8 100644 --- a/tests/ui/issues/issue-22471.rs +++ b/tests/ui/issues/issue-22471.rs @@ -1,4 +1,4 @@ -// check-pass +//@ check-pass #![allow(dead_code)] #![allow(type_alias_bounds)] diff --git a/tests/ui/issues/issue-22577.rs b/tests/ui/issues/issue-22577.rs index 8aca21bf10f..09857c95e1b 100644 --- a/tests/ui/issues/issue-22577.rs +++ b/tests/ui/issues/issue-22577.rs @@ -1,6 +1,6 @@ -// run-pass +//@ run-pass #![allow(dead_code)] -// pretty-expanded FIXME #23616 +//@ pretty-expanded FIXME #23616 use std::{fs, net}; diff --git a/tests/ui/issues/issue-22603.rs b/tests/ui/issues/issue-22603.rs index a83e291f999..63d5e3b2ae6 100644 --- a/tests/ui/issues/issue-22603.rs +++ b/tests/ui/issues/issue-22603.rs @@ -1,4 +1,4 @@ -// check-pass +//@ check-pass #![feature(unboxed_closures, fn_traits)] diff --git a/tests/ui/issues/issue-22629.rs b/tests/ui/issues/issue-22629.rs index 7beeb126ee4..0a75d3dd152 100644 --- a/tests/ui/issues/issue-22629.rs +++ b/tests/ui/issues/issue-22629.rs @@ -1,9 +1,9 @@ -// run-pass +//@ run-pass #![allow(unused_imports)] // Test transitive analysis for associated types. Collected types // should be normalized and new obligations generated. -// pretty-expanded FIXME #23616 +//@ pretty-expanded FIXME #23616 use std::borrow::{ToOwned, Cow}; diff --git a/tests/ui/issues/issue-22638.rs b/tests/ui/issues/issue-22638.rs index 67fd147ae23..3e04eb41b98 100644 --- a/tests/ui/issues/issue-22638.rs +++ b/tests/ui/issues/issue-22638.rs @@ -1,7 +1,7 @@ -// build-fail -// normalize-stderr-test: "<\{closure@.+`" -> "$$CLOSURE`" -// normalize-stderr-test: ".nll/" -> "/" -// ignore-compare-mode-next-solver (hangs) +//@ build-fail +//@ normalize-stderr-test: "<\{closure@.+`" -> "$$CLOSURE`" +//@ normalize-stderr-test: ".nll/" -> "/" +//@ ignore-compare-mode-next-solver (hangs) #![allow(unused)] diff --git a/tests/ui/issues/issue-22673.rs b/tests/ui/issues/issue-22673.rs index 4b9b4d6b23d..019c45dbadc 100644 --- a/tests/ui/issues/issue-22673.rs +++ b/tests/ui/issues/issue-22673.rs @@ -1,4 +1,4 @@ -// check-pass +//@ check-pass trait Expr: PartialEq { type Item; diff --git a/tests/ui/issues/issue-22777.rs b/tests/ui/issues/issue-22777.rs index 486683d12d6..56b385a1691 100644 --- a/tests/ui/issues/issue-22777.rs +++ b/tests/ui/issues/issue-22777.rs @@ -1,9 +1,9 @@ -// check-pass +//@ check-pass // This test is reduced from librustc_ast. It is just checking that we // can successfully deal with a "deep" structure, which the drop-check // was hitting a recursion limit on at one point. -// pretty-expanded FIXME #23616 +//@ pretty-expanded FIXME #23616 #![allow(non_camel_case_types)] diff --git a/tests/ui/issues/issue-22781.rs b/tests/ui/issues/issue-22781.rs index d644cec4d56..36314afd622 100644 --- a/tests/ui/issues/issue-22781.rs +++ b/tests/ui/issues/issue-22781.rs @@ -1,4 +1,4 @@ -// check-pass +//@ check-pass #![allow(unused_variables)] use std::collections::HashMap; use std::collections::hash_map::Entry::Vacant; diff --git a/tests/ui/issues/issue-22789.rs b/tests/ui/issues/issue-22789.rs index cef40753766..95ebe6baaa3 100644 --- a/tests/ui/issues/issue-22789.rs +++ b/tests/ui/issues/issue-22789.rs @@ -1,4 +1,4 @@ -// check-pass +//@ check-pass #![feature(unboxed_closures, fn_traits)] diff --git a/tests/ui/issues/issue-22814.rs b/tests/ui/issues/issue-22814.rs index 4079adfc8b6..95ddeb15b57 100644 --- a/tests/ui/issues/issue-22814.rs +++ b/tests/ui/issues/issue-22814.rs @@ -1,4 +1,4 @@ -// check-pass +//@ check-pass trait Test {} macro_rules! test { diff --git a/tests/ui/issues/issue-2284.rs b/tests/ui/issues/issue-2284.rs index 6f2c958341b..281dce913ad 100644 --- a/tests/ui/issues/issue-2284.rs +++ b/tests/ui/issues/issue-2284.rs @@ -1,6 +1,6 @@ -// run-pass +//@ run-pass #![allow(dead_code)] -// pretty-expanded FIXME #23616 +//@ pretty-expanded FIXME #23616 trait Send { fn f(&self); diff --git a/tests/ui/issues/issue-22864-1.rs b/tests/ui/issues/issue-22864-1.rs index 0fad5433d6c..3d88a2a50b4 100644 --- a/tests/ui/issues/issue-22864-1.rs +++ b/tests/ui/issues/issue-22864-1.rs @@ -1,4 +1,4 @@ -// run-pass +//@ run-pass pub fn main() { struct Fun(F); let f = Fun(|x| 3*x); diff --git a/tests/ui/issues/issue-22864-2.rs b/tests/ui/issues/issue-22864-2.rs index 4aa9e3e086b..1b702f4f509 100644 --- a/tests/ui/issues/issue-22864-2.rs +++ b/tests/ui/issues/issue-22864-2.rs @@ -1,5 +1,5 @@ -// run-pass -// ignore-emscripten no threads support +//@ run-pass +//@ ignore-emscripten no threads support pub fn main() { let f = || || 0; diff --git a/tests/ui/issues/issue-2288.rs b/tests/ui/issues/issue-2288.rs index 6fd690a4d95..f424cca79d3 100644 --- a/tests/ui/issues/issue-2288.rs +++ b/tests/ui/issues/issue-2288.rs @@ -1,4 +1,4 @@ -// run-pass +//@ run-pass #![allow(non_camel_case_types)] trait clam { diff --git a/tests/ui/issues/issue-22894.rs b/tests/ui/issues/issue-22894.rs index 93c1db914ea..e8fc680f042 100644 --- a/tests/ui/issues/issue-22894.rs +++ b/tests/ui/issues/issue-22894.rs @@ -1,4 +1,4 @@ -// build-pass +//@ build-pass #[allow(dead_code)] static X: &'static str = &*""; fn main() {} diff --git a/tests/ui/issues/issue-22933-1.rs b/tests/ui/issues/issue-22933-1.rs index 3c9aa266979..8f1f5a5048a 100644 --- a/tests/ui/issues/issue-22933-1.rs +++ b/tests/ui/issues/issue-22933-1.rs @@ -1,4 +1,4 @@ -// check-pass +//@ check-pass struct CNFParser { token: char, diff --git a/tests/ui/issues/issue-22992-2.rs b/tests/ui/issues/issue-22992-2.rs index 042af40eda6..c2edb428658 100644 --- a/tests/ui/issues/issue-22992-2.rs +++ b/tests/ui/issues/issue-22992-2.rs @@ -1,4 +1,4 @@ -// run-pass +//@ run-pass struct A(B); struct B; diff --git a/tests/ui/issues/issue-22992.rs b/tests/ui/issues/issue-22992.rs index 292a0ae298d..3bc15cc948a 100644 --- a/tests/ui/issues/issue-22992.rs +++ b/tests/ui/issues/issue-22992.rs @@ -1,4 +1,4 @@ -// run-pass +//@ run-pass struct X { val: i32 } impl std::ops::Deref for X { diff --git a/tests/ui/issues/issue-23036.rs b/tests/ui/issues/issue-23036.rs index d67f184720e..5186fccd042 100644 --- a/tests/ui/issues/issue-23036.rs +++ b/tests/ui/issues/issue-23036.rs @@ -1,4 +1,4 @@ -// run-pass +//@ run-pass use std::collections::HashMap; use std::path::Path; diff --git a/tests/ui/issues/issue-2311-2.rs b/tests/ui/issues/issue-2311-2.rs index 760d4edaa98..5a0b49a501f 100644 --- a/tests/ui/issues/issue-2311-2.rs +++ b/tests/ui/issues/issue-2311-2.rs @@ -1,4 +1,4 @@ -// check-pass +//@ check-pass #![allow(dead_code)] #![allow(non_camel_case_types)] diff --git a/tests/ui/issues/issue-2311.rs b/tests/ui/issues/issue-2311.rs index 21ff19f7f03..dc2fb394f83 100644 --- a/tests/ui/issues/issue-2311.rs +++ b/tests/ui/issues/issue-2311.rs @@ -1,7 +1,7 @@ -// check-pass +//@ check-pass #![allow(non_camel_case_types)] -// pretty-expanded FIXME #23616 +//@ pretty-expanded FIXME #23616 trait clam { fn get(self) -> A; } trait foo { diff --git a/tests/ui/issues/issue-2312.rs b/tests/ui/issues/issue-2312.rs index 8a94bcbd4cc..ecd296aac7a 100644 --- a/tests/ui/issues/issue-2312.rs +++ b/tests/ui/issues/issue-2312.rs @@ -1,4 +1,4 @@ -// check-pass +//@ check-pass #![allow(dead_code)] #![allow(non_camel_case_types)] diff --git a/tests/ui/issues/issue-23122-2.rs b/tests/ui/issues/issue-23122-2.rs index 338789c2e87..2880b956417 100644 --- a/tests/ui/issues/issue-23122-2.rs +++ b/tests/ui/issues/issue-23122-2.rs @@ -1,4 +1,4 @@ -// normalize-stderr-test: "long-type-\d+" -> "long-type-hash" +//@ normalize-stderr-test: "long-type-\d+" -> "long-type-hash" trait Next { type Next: Next; } diff --git a/tests/ui/issues/issue-2316-c.rs b/tests/ui/issues/issue-2316-c.rs index d975aa695c8..52e2995ec58 100644 --- a/tests/ui/issues/issue-2316-c.rs +++ b/tests/ui/issues/issue-2316-c.rs @@ -1,8 +1,8 @@ -// run-pass -// aux-build:issue-2316-a.rs -// aux-build:issue-2316-b.rs +//@ run-pass +//@ aux-build:issue-2316-a.rs +//@ aux-build:issue-2316-b.rs -// pretty-expanded FIXME #23616 +//@ pretty-expanded FIXME #23616 extern crate issue_2316_b; use issue_2316_b::cloth; diff --git a/tests/ui/issues/issue-23261.rs b/tests/ui/issues/issue-23261.rs index e21f86351ee..69f141e8bf8 100644 --- a/tests/ui/issues/issue-23261.rs +++ b/tests/ui/issues/issue-23261.rs @@ -1,4 +1,4 @@ -// run-pass +//@ run-pass // Matching on a DST struct should not trigger an LLVM assertion. struct Foo { diff --git a/tests/ui/issues/issue-23304-1.rs b/tests/ui/issues/issue-23304-1.rs index 1805c1c19b9..6b80646704a 100644 --- a/tests/ui/issues/issue-23304-1.rs +++ b/tests/ui/issues/issue-23304-1.rs @@ -1,4 +1,4 @@ -// run-pass +//@ run-pass #![allow(dead_code)] #[repr(u8)] diff --git a/tests/ui/issues/issue-23304-2.rs b/tests/ui/issues/issue-23304-2.rs index 6376fdb6545..17eb79e93d2 100644 --- a/tests/ui/issues/issue-23304-2.rs +++ b/tests/ui/issues/issue-23304-2.rs @@ -1,4 +1,4 @@ -// run-pass +//@ run-pass #![allow(dead_code)] enum X { A = 42 as isize } diff --git a/tests/ui/issues/issue-23311.rs b/tests/ui/issues/issue-23311.rs index 62c96840b3b..e827fa1670f 100644 --- a/tests/ui/issues/issue-23311.rs +++ b/tests/ui/issues/issue-23311.rs @@ -1,4 +1,4 @@ -// run-pass +//@ run-pass // Test that we do not ICE when pattern matching an array against a slice. diff --git a/tests/ui/issues/issue-23336.rs b/tests/ui/issues/issue-23336.rs index cd71d7eed89..e71c2af0c85 100644 --- a/tests/ui/issues/issue-23336.rs +++ b/tests/ui/issues/issue-23336.rs @@ -1,4 +1,4 @@ -// run-pass +//@ run-pass pub trait Data { fn doit(&self) {} } impl Data for T {} pub trait UnaryLogic { type D: Data; } diff --git a/tests/ui/issues/issue-23354-2.rs b/tests/ui/issues/issue-23354-2.rs index c291d8a5eaf..90de1276cc6 100644 --- a/tests/ui/issues/issue-23354-2.rs +++ b/tests/ui/issues/issue-23354-2.rs @@ -1,6 +1,6 @@ -// run-fail -// error-pattern:panic evaluated -// ignore-emscripten no processes +//@ run-fail +//@ error-pattern:panic evaluated +//@ ignore-emscripten no processes #[allow(unused_variables)] fn main() { diff --git a/tests/ui/issues/issue-23354.rs b/tests/ui/issues/issue-23354.rs index 8b7c2eef2fc..31783842dac 100644 --- a/tests/ui/issues/issue-23354.rs +++ b/tests/ui/issues/issue-23354.rs @@ -1,6 +1,6 @@ -// run-fail -// error-pattern:panic evaluated -// ignore-emscripten no processes +//@ run-fail +//@ error-pattern:panic evaluated +//@ ignore-emscripten no processes #[allow(unused_variables)] fn main() { diff --git a/tests/ui/issues/issue-23406.rs b/tests/ui/issues/issue-23406.rs index d00d5d6f944..819f0feb614 100644 --- a/tests/ui/issues/issue-23406.rs +++ b/tests/ui/issues/issue-23406.rs @@ -1,4 +1,4 @@ -// build-pass +//@ build-pass #![allow(dead_code)] trait Inner { type T; diff --git a/tests/ui/issues/issue-23433.rs b/tests/ui/issues/issue-23433.rs index d4fbbde62ff..831cdc0e467 100644 --- a/tests/ui/issues/issue-23433.rs +++ b/tests/ui/issues/issue-23433.rs @@ -1,4 +1,4 @@ -// run-pass +//@ run-pass // Don't fail if we encounter a NonNull where T is an unsized type use std::ptr::NonNull; diff --git a/tests/ui/issues/issue-23442.rs b/tests/ui/issues/issue-23442.rs index d1e4317e5b4..883c5bb511a 100644 --- a/tests/ui/issues/issue-23442.rs +++ b/tests/ui/issues/issue-23442.rs @@ -1,4 +1,4 @@ -// check-pass +//@ check-pass #![allow(dead_code)] use std::marker::PhantomData; diff --git a/tests/ui/issues/issue-23477.rs b/tests/ui/issues/issue-23477.rs index 1ce05ba390d..fa69a1d7626 100644 --- a/tests/ui/issues/issue-23477.rs +++ b/tests/ui/issues/issue-23477.rs @@ -1,5 +1,5 @@ -// build-pass -// compile-flags: -g +//@ build-pass +//@ compile-flags: -g pub struct Dst { pub a: (), diff --git a/tests/ui/issues/issue-23485.rs b/tests/ui/issues/issue-23485.rs index 07ed0f1b00d..530f0558b6c 100644 --- a/tests/ui/issues/issue-23485.rs +++ b/tests/ui/issues/issue-23485.rs @@ -1,4 +1,4 @@ -// run-pass +//@ run-pass #![allow(unused_imports)] // Test for an ICE that occurred when a default method implementation // was applied to a type that did not meet the prerequisites. The diff --git a/tests/ui/issues/issue-23491.rs b/tests/ui/issues/issue-23491.rs index efd83112353..0a2dfa4257a 100644 --- a/tests/ui/issues/issue-23491.rs +++ b/tests/ui/issues/issue-23491.rs @@ -1,4 +1,4 @@ -// run-pass +//@ run-pass #![allow(unused_variables)] struct Node(#[allow(dead_code)] T); diff --git a/tests/ui/issues/issue-23550.rs b/tests/ui/issues/issue-23550.rs index 9cce9a0a98b..0cc25596ab6 100644 --- a/tests/ui/issues/issue-23550.rs +++ b/tests/ui/issues/issue-23550.rs @@ -1,4 +1,4 @@ -// build-pass +//@ build-pass #![feature(core_intrinsics)] #![allow(warnings)] diff --git a/tests/ui/issues/issue-23611-enum-swap-in-drop.rs b/tests/ui/issues/issue-23611-enum-swap-in-drop.rs index b967e6aecdd..980a2c01f23 100644 --- a/tests/ui/issues/issue-23611-enum-swap-in-drop.rs +++ b/tests/ui/issues/issue-23611-enum-swap-in-drop.rs @@ -1,4 +1,4 @@ -// run-pass +//@ run-pass #![allow(non_upper_case_globals)] // Issue 23611: this test is ensuring that, for an instance `X` of the diff --git a/tests/ui/issues/issue-23649-1.rs b/tests/ui/issues/issue-23649-1.rs index fc0c9a605fa..1c4252b40c6 100644 --- a/tests/ui/issues/issue-23649-1.rs +++ b/tests/ui/issues/issue-23649-1.rs @@ -1,4 +1,4 @@ -// run-pass +//@ run-pass use std::mem; pub struct X([u8]); diff --git a/tests/ui/issues/issue-23649-2.rs b/tests/ui/issues/issue-23649-2.rs index ce7d8e3a755..4a953de1768 100644 --- a/tests/ui/issues/issue-23649-2.rs +++ b/tests/ui/issues/issue-23649-2.rs @@ -1,4 +1,4 @@ -// run-pass +//@ run-pass use std::collections::HashMap; use std::path::{Path, PathBuf}; diff --git a/tests/ui/issues/issue-23649-3.rs b/tests/ui/issues/issue-23649-3.rs index 8f61c71d6eb..524055d99b4 100644 --- a/tests/ui/issues/issue-23649-3.rs +++ b/tests/ui/issues/issue-23649-3.rs @@ -1,4 +1,4 @@ -// build-pass +//@ build-pass #[derive(PartialEq)] struct Slice { slice: [u8] } diff --git a/tests/ui/issues/issue-23699.rs b/tests/ui/issues/issue-23699.rs index 952548837e4..6dde2dfd930 100644 --- a/tests/ui/issues/issue-23699.rs +++ b/tests/ui/issues/issue-23699.rs @@ -1,4 +1,4 @@ -// run-pass +//@ run-pass #![allow(unused_variables)] fn gimme_a_raw_pointer(_: *const T) { } diff --git a/tests/ui/issues/issue-2380-b.rs b/tests/ui/issues/issue-2380-b.rs index d708c7b4213..722b463de09 100644 --- a/tests/ui/issues/issue-2380-b.rs +++ b/tests/ui/issues/issue-2380-b.rs @@ -1,7 +1,7 @@ -// run-pass -// aux-build:issue-2380.rs +//@ run-pass +//@ aux-build:issue-2380.rs -// pretty-expanded FIXME #23616 +//@ pretty-expanded FIXME #23616 extern crate a; diff --git a/tests/ui/issues/issue-23808.rs b/tests/ui/issues/issue-23808.rs index b10682521a4..6af0bd422e3 100644 --- a/tests/ui/issues/issue-23808.rs +++ b/tests/ui/issues/issue-23808.rs @@ -1,4 +1,4 @@ -// run-pass +//@ run-pass #![deny(dead_code)] diff --git a/tests/ui/issues/issue-2383.rs b/tests/ui/issues/issue-2383.rs index 06e61ce680b..eecbaa2562e 100644 --- a/tests/ui/issues/issue-2383.rs +++ b/tests/ui/issues/issue-2383.rs @@ -1,5 +1,5 @@ -// run-pass -// pretty-expanded FIXME #23616 +//@ run-pass +//@ pretty-expanded FIXME #23616 use std::collections::VecDeque; diff --git a/tests/ui/issues/issue-23891.rs b/tests/ui/issues/issue-23891.rs index 73467f715cb..131139470f9 100644 --- a/tests/ui/issues/issue-23891.rs +++ b/tests/ui/issues/issue-23891.rs @@ -1,4 +1,4 @@ -// run-pass +//@ run-pass macro_rules! id { ($s: pat) => ($s); } diff --git a/tests/ui/issues/issue-23898.rs b/tests/ui/issues/issue-23898.rs index 3de365675ad..0d8fd7ea4eb 100644 --- a/tests/ui/issues/issue-23898.rs +++ b/tests/ui/issues/issue-23898.rs @@ -1,4 +1,4 @@ -// run-pass +//@ run-pass #![allow(unused_parens)] #![allow(non_camel_case_types)] diff --git a/tests/ui/issues/issue-23958.rs b/tests/ui/issues/issue-23958.rs index 7e90d758600..2f1fb42a277 100644 --- a/tests/ui/issues/issue-23958.rs +++ b/tests/ui/issues/issue-23958.rs @@ -1,4 +1,4 @@ -// run-pass +//@ run-pass trait Collection where for<'a> &'a Self: IntoIterator { fn my_iter(&self) -> <&Self as IntoIterator>::IntoIter { self.into_iter() diff --git a/tests/ui/issues/issue-23992.rs b/tests/ui/issues/issue-23992.rs index 1ff44bd7f2d..08a99d357bc 100644 --- a/tests/ui/issues/issue-23992.rs +++ b/tests/ui/issues/issue-23992.rs @@ -1,4 +1,4 @@ -// run-pass +//@ run-pass pub struct Outer(T); pub struct Inner<'a> { value: &'a bool } diff --git a/tests/ui/issues/issue-24086.rs b/tests/ui/issues/issue-24086.rs index 54622afbcfc..4d2e6a7b23b 100644 --- a/tests/ui/issues/issue-24086.rs +++ b/tests/ui/issues/issue-24086.rs @@ -1,4 +1,4 @@ -// run-pass +//@ run-pass #![allow(dead_code)] #![allow(unused_mut)] #![allow(unused_variables)] diff --git a/tests/ui/issues/issue-2414-c.rs b/tests/ui/issues/issue-2414-c.rs index f6fe9798067..1437a4199dc 100644 --- a/tests/ui/issues/issue-2414-c.rs +++ b/tests/ui/issues/issue-2414-c.rs @@ -1,8 +1,8 @@ -// run-pass -// aux-build:issue-2414-a.rs -// aux-build:issue-2414-b.rs +//@ run-pass +//@ aux-build:issue-2414-a.rs +//@ aux-build:issue-2414-b.rs -// pretty-expanded FIXME #23616 +//@ pretty-expanded FIXME #23616 extern crate b; diff --git a/tests/ui/issues/issue-24161.rs b/tests/ui/issues/issue-24161.rs index f4cdd982ac6..974add43861 100644 --- a/tests/ui/issues/issue-24161.rs +++ b/tests/ui/issues/issue-24161.rs @@ -1,4 +1,4 @@ -// check-pass +//@ check-pass #![allow(dead_code)] #[derive(Copy,Clone)] struct Functions { diff --git a/tests/ui/issues/issue-24227.rs b/tests/ui/issues/issue-24227.rs index 12816c235f8..acc82bdabb5 100644 --- a/tests/ui/issues/issue-24227.rs +++ b/tests/ui/issues/issue-24227.rs @@ -1,4 +1,4 @@ -// check-pass +//@ check-pass // This resulted in an ICE. Test for future-proofing // Issue #24227 diff --git a/tests/ui/issues/issue-2428.rs b/tests/ui/issues/issue-2428.rs index 94b830de3e6..9cb02460f35 100644 --- a/tests/ui/issues/issue-2428.rs +++ b/tests/ui/issues/issue-2428.rs @@ -1,4 +1,4 @@ -// run-pass +//@ run-pass #![allow(non_upper_case_globals)] diff --git a/tests/ui/issues/issue-24308.rs b/tests/ui/issues/issue-24308.rs index 40950938fc7..976d901ccbf 100644 --- a/tests/ui/issues/issue-24308.rs +++ b/tests/ui/issues/issue-24308.rs @@ -1,4 +1,4 @@ -// run-pass +//@ run-pass pub trait Foo { fn method1() {} fn method2(); diff --git a/tests/ui/issues/issue-24353.rs b/tests/ui/issues/issue-24353.rs index f78255b7e2b..369fc238d11 100644 --- a/tests/ui/issues/issue-24353.rs +++ b/tests/ui/issues/issue-24353.rs @@ -1,4 +1,4 @@ -// run-pass +//@ run-pass #![allow(unreachable_code)] fn main() { return (); diff --git a/tests/ui/issues/issue-24389.rs b/tests/ui/issues/issue-24389.rs index 7cc7611769a..95bb2af9b25 100644 --- a/tests/ui/issues/issue-24389.rs +++ b/tests/ui/issues/issue-24389.rs @@ -1,4 +1,4 @@ -// check-pass +//@ check-pass #![allow(dead_code)] struct Foo; diff --git a/tests/ui/issues/issue-24434.rs b/tests/ui/issues/issue-24434.rs index 4c1bfc03c9a..4cf1f8b50f7 100644 --- a/tests/ui/issues/issue-24434.rs +++ b/tests/ui/issues/issue-24434.rs @@ -1,5 +1,5 @@ -// check-pass -// compile-flags:--cfg set1 +//@ check-pass +//@ compile-flags:--cfg set1 #![cfg_attr(set1, feature(rustc_attrs))] #![rustc_dummy] diff --git a/tests/ui/issues/issue-2445-b.rs b/tests/ui/issues/issue-2445-b.rs index f369eae3af3..8f52c0f47a5 100644 --- a/tests/ui/issues/issue-2445-b.rs +++ b/tests/ui/issues/issue-2445-b.rs @@ -1,8 +1,8 @@ -// run-pass +//@ run-pass #![allow(dead_code)] #![allow(non_camel_case_types)] -// pretty-expanded FIXME #23616 +//@ pretty-expanded FIXME #23616 struct c1 { x: T, diff --git a/tests/ui/issues/issue-2445.rs b/tests/ui/issues/issue-2445.rs index 5730ce16574..da82a489c1e 100644 --- a/tests/ui/issues/issue-2445.rs +++ b/tests/ui/issues/issue-2445.rs @@ -1,8 +1,8 @@ -// run-pass +//@ run-pass #![allow(dead_code)] #![allow(non_camel_case_types)] -// pretty-expanded FIXME #23616 +//@ pretty-expanded FIXME #23616 struct c1 { x: T, diff --git a/tests/ui/issues/issue-24533.rs b/tests/ui/issues/issue-24533.rs index 8592bf43072..497a72da6c2 100644 --- a/tests/ui/issues/issue-24533.rs +++ b/tests/ui/issues/issue-24533.rs @@ -1,4 +1,4 @@ -// run-pass +//@ run-pass #![allow(unused_must_use)] use std::slice::Iter; use std::io::{Error, ErrorKind, Result}; diff --git a/tests/ui/issues/issue-24589.rs b/tests/ui/issues/issue-24589.rs index 6b03e14f961..e08e06a88b8 100644 --- a/tests/ui/issues/issue-24589.rs +++ b/tests/ui/issues/issue-24589.rs @@ -1,4 +1,4 @@ -// run-pass +//@ run-pass pub struct _X([u8]); impl std::ops::Deref for _X { diff --git a/tests/ui/issues/issue-2463.rs b/tests/ui/issues/issue-2463.rs index d24a47c53d9..7650da845e3 100644 --- a/tests/ui/issues/issue-2463.rs +++ b/tests/ui/issues/issue-2463.rs @@ -1,6 +1,6 @@ -// run-pass +//@ run-pass #![allow(dead_code)] -// pretty-expanded FIXME #23616 +//@ pretty-expanded FIXME #23616 struct Pair { f: isize, g: isize } diff --git a/tests/ui/issues/issue-24687-embed-debuginfo/main.rs b/tests/ui/issues/issue-24687-embed-debuginfo/main.rs index 773792c7a3f..d1ab717264b 100644 --- a/tests/ui/issues/issue-24687-embed-debuginfo/main.rs +++ b/tests/ui/issues/issue-24687-embed-debuginfo/main.rs @@ -1,6 +1,6 @@ -// run-pass -// aux-build:issue-24687-lib.rs -// compile-flags:-g +//@ run-pass +//@ aux-build:issue-24687-lib.rs +//@ compile-flags:-g extern crate issue_24687_lib as d; diff --git a/tests/ui/issues/issue-2470-bounds-check-overflow.rs b/tests/ui/issues/issue-2470-bounds-check-overflow.rs index f0e8e185e56..241bc8fda9c 100644 --- a/tests/ui/issues/issue-2470-bounds-check-overflow.rs +++ b/tests/ui/issues/issue-2470-bounds-check-overflow.rs @@ -1,6 +1,6 @@ -// run-fail -// error-pattern:index out of bounds -// ignore-emscripten no processes +//@ run-fail +//@ error-pattern:index out of bounds +//@ ignore-emscripten no processes use std::mem; diff --git a/tests/ui/issues/issue-2472.rs b/tests/ui/issues/issue-2472.rs index c790bc2d095..afebc7b16e5 100644 --- a/tests/ui/issues/issue-2472.rs +++ b/tests/ui/issues/issue-2472.rs @@ -1,7 +1,7 @@ -// run-pass -// aux-build:issue-2472-b.rs +//@ run-pass +//@ aux-build:issue-2472-b.rs -// pretty-expanded FIXME #23616 +//@ pretty-expanded FIXME #23616 extern crate issue_2472_b; diff --git a/tests/ui/issues/issue-24779.rs b/tests/ui/issues/issue-24779.rs index f1283d0dcf5..f371828606c 100644 --- a/tests/ui/issues/issue-24779.rs +++ b/tests/ui/issues/issue-24779.rs @@ -1,4 +1,4 @@ -// run-pass +//@ run-pass fn main() { assert_eq!((||||42)()(), 42); } diff --git a/tests/ui/issues/issue-2487-a.rs b/tests/ui/issues/issue-2487-a.rs index fe12dad74f5..6cdb9f2afe2 100644 --- a/tests/ui/issues/issue-2487-a.rs +++ b/tests/ui/issues/issue-2487-a.rs @@ -1,8 +1,8 @@ -// build-pass +//@ build-pass #![allow(dead_code)] #![allow(non_camel_case_types)] -// pretty-expanded FIXME #23616 +//@ pretty-expanded FIXME #23616 struct socket { sock: isize, diff --git a/tests/ui/issues/issue-24945-repeat-dash-opts.rs b/tests/ui/issues/issue-24945-repeat-dash-opts.rs index cf3834952c6..5d8044b0a1a 100644 --- a/tests/ui/issues/issue-24945-repeat-dash-opts.rs +++ b/tests/ui/issues/issue-24945-repeat-dash-opts.rs @@ -1,8 +1,8 @@ -// run-pass +//@ run-pass // This test is just checking that we continue to accept `-g -g -O -O` // as options to the compiler. -// compile-flags:-g -g -O -O +//@ compile-flags:-g -g -O -O fn main() { assert_eq!(1, 1); diff --git a/tests/ui/issues/issue-24947.rs b/tests/ui/issues/issue-24947.rs index 23705b4c9e7..c607cb7ec89 100644 --- a/tests/ui/issues/issue-24947.rs +++ b/tests/ui/issues/issue-24947.rs @@ -1,4 +1,4 @@ -// run-pass +//@ run-pass // #24947 ICE using a trait-associated const in an array size diff --git a/tests/ui/issues/issue-24954.rs b/tests/ui/issues/issue-24954.rs index 0177dd4eae5..fe16e29d70f 100644 --- a/tests/ui/issues/issue-24954.rs +++ b/tests/ui/issues/issue-24954.rs @@ -1,4 +1,4 @@ -// run-pass +//@ run-pass macro_rules! foo { ($y:expr) => ({ $y = 2; diff --git a/tests/ui/issues/issue-2502.rs b/tests/ui/issues/issue-2502.rs index 63151002438..d857099e7b9 100644 --- a/tests/ui/issues/issue-2502.rs +++ b/tests/ui/issues/issue-2502.rs @@ -1,9 +1,9 @@ -// check-pass +//@ check-pass #![allow(dead_code)] #![allow(non_camel_case_types)] -// pretty-expanded FIXME #23616 +//@ pretty-expanded FIXME #23616 struct font<'a> { fontbuf: &'a Vec , diff --git a/tests/ui/issues/issue-25089.rs b/tests/ui/issues/issue-25089.rs index c7063b24608..ea9ab290904 100644 --- a/tests/ui/issues/issue-25089.rs +++ b/tests/ui/issues/issue-25089.rs @@ -1,6 +1,6 @@ -// run-pass -// needs-unwind -// ignore-emscripten no threads support +//@ run-pass +//@ needs-unwind +//@ ignore-emscripten no threads support use std::thread; diff --git a/tests/ui/issues/issue-25145.rs b/tests/ui/issues/issue-25145.rs index f5ae28fbbab..7edaa91d4a0 100644 --- a/tests/ui/issues/issue-25145.rs +++ b/tests/ui/issues/issue-25145.rs @@ -1,4 +1,4 @@ -// run-pass +//@ run-pass struct S; diff --git a/tests/ui/issues/issue-25180.rs b/tests/ui/issues/issue-25180.rs index 29dc07f4914..339aca03754 100644 --- a/tests/ui/issues/issue-25180.rs +++ b/tests/ui/issues/issue-25180.rs @@ -1,4 +1,4 @@ -// check-pass +//@ check-pass #![allow(dead_code)] #![allow(non_upper_case_globals)] diff --git a/tests/ui/issues/issue-25185.rs b/tests/ui/issues/issue-25185.rs index 383c9a1e9c4..ee54a21694e 100644 --- a/tests/ui/issues/issue-25185.rs +++ b/tests/ui/issues/issue-25185.rs @@ -1,7 +1,7 @@ -// run-pass -// aux-build:issue-25185-1.rs -// aux-build:issue-25185-2.rs -// ignore-wasm32-bare no libc for ffi testing +//@ run-pass +//@ aux-build:issue-25185-1.rs +//@ aux-build:issue-25185-2.rs +//@ ignore-wasm32-bare no libc for ffi testing extern crate issue_25185_2; diff --git a/tests/ui/issues/issue-2526-a.rs b/tests/ui/issues/issue-2526-a.rs index f3fdc0bd377..62e687f7f3f 100644 --- a/tests/ui/issues/issue-2526-a.rs +++ b/tests/ui/issues/issue-2526-a.rs @@ -1,7 +1,7 @@ -// run-pass -// aux-build:issue-2526.rs +//@ run-pass +//@ aux-build:issue-2526.rs -// pretty-expanded FIXME #23616 +//@ pretty-expanded FIXME #23616 #![allow(unused_imports)] diff --git a/tests/ui/issues/issue-25279.rs b/tests/ui/issues/issue-25279.rs index fdc516d3761..7d85a122e17 100644 --- a/tests/ui/issues/issue-25279.rs +++ b/tests/ui/issues/issue-25279.rs @@ -1,4 +1,4 @@ -// run-pass +//@ run-pass struct S<'a>(&'a ()); impl<'a> S<'a> { diff --git a/tests/ui/issues/issue-25343.rs b/tests/ui/issues/issue-25343.rs index 95a0bd9155d..878f2488677 100644 --- a/tests/ui/issues/issue-25343.rs +++ b/tests/ui/issues/issue-25343.rs @@ -1,4 +1,4 @@ -// run-pass +//@ run-pass #[allow(unused)] fn main() { || { diff --git a/tests/ui/issues/issue-25394.rs b/tests/ui/issues/issue-25394.rs index 2f0ae19fcb1..689c9f33af0 100644 --- a/tests/ui/issues/issue-25394.rs +++ b/tests/ui/issues/issue-25394.rs @@ -1,4 +1,4 @@ -// check-pass +//@ check-pass #![allow(dead_code)] #[derive(Debug)] struct Row([T]); diff --git a/tests/ui/issues/issue-25467.rs b/tests/ui/issues/issue-25467.rs index 31ac5f0f34b..1ba5a0ef697 100644 --- a/tests/ui/issues/issue-25467.rs +++ b/tests/ui/issues/issue-25467.rs @@ -1,6 +1,6 @@ -// run-pass +//@ run-pass #![allow(unused_variables)] -// aux-build:issue-25467.rs +//@ aux-build:issue-25467.rs pub type Issue25467BarT = (); pub type Issue25467FooT = (); diff --git a/tests/ui/issues/issue-25497.rs b/tests/ui/issues/issue-25497.rs index 25f5ab90f7f..58dcf416dbe 100644 --- a/tests/ui/issues/issue-25497.rs +++ b/tests/ui/issues/issue-25497.rs @@ -1,4 +1,4 @@ -// run-pass +//@ run-pass #[derive(Clone, Debug, PartialEq)] enum Expression { Dummy, diff --git a/tests/ui/issues/issue-2550.rs b/tests/ui/issues/issue-2550.rs index 04ec66b80d7..4fc5ba1f7b2 100644 --- a/tests/ui/issues/issue-2550.rs +++ b/tests/ui/issues/issue-2550.rs @@ -1,8 +1,8 @@ -// run-pass +//@ run-pass #![allow(dead_code)] #![allow(non_snake_case)] -// pretty-expanded FIXME #23616 +//@ pretty-expanded FIXME #23616 struct C { x: usize, diff --git a/tests/ui/issues/issue-25515.rs b/tests/ui/issues/issue-25515.rs index e7b9ea3acfc..5eaea683e21 100644 --- a/tests/ui/issues/issue-25515.rs +++ b/tests/ui/issues/issue-25515.rs @@ -1,4 +1,4 @@ -// run-pass +//@ run-pass use std::rc::Rc; struct Foo<'r>(&'r mut i32); diff --git a/tests/ui/issues/issue-25549-multiple-drop.rs b/tests/ui/issues/issue-25549-multiple-drop.rs index 25a2da707dc..1eec15a4aa2 100644 --- a/tests/ui/issues/issue-25549-multiple-drop.rs +++ b/tests/ui/issues/issue-25549-multiple-drop.rs @@ -1,4 +1,4 @@ -// run-pass +//@ run-pass #![allow(unused_variables)] struct Foo<'r>(&'r mut i32); diff --git a/tests/ui/issues/issue-25579.rs b/tests/ui/issues/issue-25579.rs index 5f5a0f4d267..f4bbb41469e 100644 --- a/tests/ui/issues/issue-25579.rs +++ b/tests/ui/issues/issue-25579.rs @@ -1,4 +1,4 @@ -// check-pass +//@ check-pass enum Sexpression { Num(()), diff --git a/tests/ui/issues/issue-25679.rs b/tests/ui/issues/issue-25679.rs index 8415eba887b..75da3becb54 100644 --- a/tests/ui/issues/issue-25679.rs +++ b/tests/ui/issues/issue-25679.rs @@ -1,4 +1,4 @@ -// run-pass +//@ run-pass trait Device { type Resources; } diff --git a/tests/ui/issues/issue-25693.rs b/tests/ui/issues/issue-25693.rs index 9af0ba100e8..3f4a2247edf 100644 --- a/tests/ui/issues/issue-25693.rs +++ b/tests/ui/issues/issue-25693.rs @@ -1,4 +1,4 @@ -// run-pass +//@ run-pass #![allow(unused_variables)] pub trait Parameters { type SelfRef; } diff --git a/tests/ui/issues/issue-25746-bool-transmute.rs b/tests/ui/issues/issue-25746-bool-transmute.rs index bc2f4a7c1b7..f8cdc980daa 100644 --- a/tests/ui/issues/issue-25746-bool-transmute.rs +++ b/tests/ui/issues/issue-25746-bool-transmute.rs @@ -1,4 +1,4 @@ -// run-pass +//@ run-pass use std::mem::transmute; fn main() { diff --git a/tests/ui/issues/issue-25757.rs b/tests/ui/issues/issue-25757.rs index ec1864d7deb..dc9c2ffaa6f 100644 --- a/tests/ui/issues/issue-25757.rs +++ b/tests/ui/issues/issue-25757.rs @@ -1,4 +1,4 @@ -// run-pass +//@ run-pass struct Foo { a: u32 } diff --git a/tests/ui/issues/issue-25810.rs b/tests/ui/issues/issue-25810.rs index f32216f3254..aa60e8afbef 100644 --- a/tests/ui/issues/issue-25810.rs +++ b/tests/ui/issues/issue-25810.rs @@ -1,4 +1,4 @@ -// run-pass +//@ run-pass fn main() { let x = X(15); let y = x.foo(); diff --git a/tests/ui/issues/issue-26095.rs b/tests/ui/issues/issue-26095.rs index 638f8f57187..34c617dc495 100644 --- a/tests/ui/issues/issue-26095.rs +++ b/tests/ui/issues/issue-26095.rs @@ -1,4 +1,4 @@ -// check-pass +//@ check-pass #![allow(dead_code)] #![allow(non_upper_case_globals)] diff --git a/tests/ui/issues/issue-2611-3.rs b/tests/ui/issues/issue-2611-3.rs index a95a748e091..c95ebae33fa 100644 --- a/tests/ui/issues/issue-2611-3.rs +++ b/tests/ui/issues/issue-2611-3.rs @@ -1,4 +1,4 @@ -// check-pass +//@ check-pass #![allow(dead_code)] // Tests that impls are allowed to have looser, more permissive bounds // than the traits require. diff --git a/tests/ui/issues/issue-26127.rs b/tests/ui/issues/issue-26127.rs index b76f1ba51a4..45f50efdccb 100644 --- a/tests/ui/issues/issue-26127.rs +++ b/tests/ui/issues/issue-26127.rs @@ -1,4 +1,4 @@ -// run-pass +//@ run-pass trait Tr { type T; } impl Tr for u8 { type T=(); } struct S(#[allow(dead_code)] I::T); diff --git a/tests/ui/issues/issue-26186.rs b/tests/ui/issues/issue-26186.rs index f93869352ea..225cfb4876a 100644 --- a/tests/ui/issues/issue-26186.rs +++ b/tests/ui/issues/issue-26186.rs @@ -1,4 +1,4 @@ -// check-pass +//@ check-pass use std::sync::Mutex; use std::cell::RefCell; use std::rc::Rc; diff --git a/tests/ui/issues/issue-26205.rs b/tests/ui/issues/issue-26205.rs index f5f39ded021..de1846e3e01 100644 --- a/tests/ui/issues/issue-26205.rs +++ b/tests/ui/issues/issue-26205.rs @@ -1,4 +1,4 @@ -// check-pass +//@ check-pass #![allow(dead_code)] use std::ops::{Deref, DerefMut}; diff --git a/tests/ui/issues/issue-2631-b.rs b/tests/ui/issues/issue-2631-b.rs index c7f6728e3f2..fb2ecd74a65 100644 --- a/tests/ui/issues/issue-2631-b.rs +++ b/tests/ui/issues/issue-2631-b.rs @@ -1,6 +1,6 @@ -// run-pass +//@ run-pass -// aux-build:issue-2631-a.rs +//@ aux-build:issue-2631-a.rs extern crate req; diff --git a/tests/ui/issues/issue-2642.rs b/tests/ui/issues/issue-2642.rs index 95c5632258e..d7d97b84799 100644 --- a/tests/ui/issues/issue-2642.rs +++ b/tests/ui/issues/issue-2642.rs @@ -1,6 +1,6 @@ -// run-pass +//@ run-pass #![allow(dead_code)] -// pretty-expanded FIXME #23616 +//@ pretty-expanded FIXME #23616 fn f() { let _x: usize = loop { loop { break; } }; diff --git a/tests/ui/issues/issue-26468.rs b/tests/ui/issues/issue-26468.rs index 71cc90e8bd1..2103b354977 100644 --- a/tests/ui/issues/issue-26468.rs +++ b/tests/ui/issues/issue-26468.rs @@ -1,4 +1,4 @@ -// run-pass +//@ run-pass #![allow(dead_code)] enum FooMode { diff --git a/tests/ui/issues/issue-26484.rs b/tests/ui/issues/issue-26484.rs index 3b40b3dd8f0..c7053505567 100644 --- a/tests/ui/issues/issue-26484.rs +++ b/tests/ui/issues/issue-26484.rs @@ -1,5 +1,5 @@ -// run-pass -// compile-flags:-g +//@ run-pass +//@ compile-flags:-g fn helper bool>(_f: F) { print!(""); diff --git a/tests/ui/issues/issue-26614.rs b/tests/ui/issues/issue-26614.rs index b8ebbdc5abc..576c7545924 100644 --- a/tests/ui/issues/issue-26614.rs +++ b/tests/ui/issues/issue-26614.rs @@ -1,4 +1,4 @@ -// check-pass +//@ check-pass trait Mirror { type It; diff --git a/tests/ui/issues/issue-26641.rs b/tests/ui/issues/issue-26641.rs index 3256b71660f..983bcbea927 100644 --- a/tests/ui/issues/issue-26641.rs +++ b/tests/ui/issues/issue-26641.rs @@ -1,4 +1,4 @@ -// run-pass +//@ run-pass struct Parser<'a>(#[allow(dead_code)] Box); fn main() { diff --git a/tests/ui/issues/issue-26646.rs b/tests/ui/issues/issue-26646.rs index 86e4bd7e8f8..b1789b1a91f 100644 --- a/tests/ui/issues/issue-26646.rs +++ b/tests/ui/issues/issue-26646.rs @@ -1,4 +1,4 @@ -// check-pass +//@ check-pass #![deny(unused_attributes)] #[repr(C)] diff --git a/tests/ui/issues/issue-26655.rs b/tests/ui/issues/issue-26655.rs index cb386c908a4..7f1858fdb7d 100644 --- a/tests/ui/issues/issue-26655.rs +++ b/tests/ui/issues/issue-26655.rs @@ -1,6 +1,6 @@ -// run-pass -// needs-unwind -// ignore-emscripten no threads support +//@ run-pass +//@ needs-unwind +//@ ignore-emscripten no threads support // Check that the destructors of simple enums are run on unwinding diff --git a/tests/ui/issues/issue-26709.rs b/tests/ui/issues/issue-26709.rs index 8a8186de5cc..5c31bd65628 100644 --- a/tests/ui/issues/issue-26709.rs +++ b/tests/ui/issues/issue-26709.rs @@ -1,4 +1,4 @@ -// run-pass +//@ run-pass struct Wrapper<'a, T: ?Sized>(&'a mut i32, #[allow(dead_code)] T); impl<'a, T: ?Sized> Drop for Wrapper<'a, T> { diff --git a/tests/ui/issues/issue-26802.rs b/tests/ui/issues/issue-26802.rs index 307a6716098..62fcc617b46 100644 --- a/tests/ui/issues/issue-26802.rs +++ b/tests/ui/issues/issue-26802.rs @@ -1,4 +1,4 @@ -// run-pass +//@ run-pass trait Foo<'a> { fn bar<'b>(&self, x: &'b u8) -> u8 where 'a: 'b { *x+7 } } diff --git a/tests/ui/issues/issue-26805.rs b/tests/ui/issues/issue-26805.rs index bcf8a673191..cf75908570a 100644 --- a/tests/ui/issues/issue-26805.rs +++ b/tests/ui/issues/issue-26805.rs @@ -1,4 +1,4 @@ -// run-pass +//@ run-pass struct NonOrd; fn main() { diff --git a/tests/ui/issues/issue-26997.rs b/tests/ui/issues/issue-26997.rs index 3653e62732d..5441dc68bae 100644 --- a/tests/ui/issues/issue-26997.rs +++ b/tests/ui/issues/issue-26997.rs @@ -1,4 +1,4 @@ -// build-pass +//@ build-pass #![allow(dead_code)] pub struct Foo { x: isize, diff --git a/tests/ui/issues/issue-27054-primitive-binary-ops.rs b/tests/ui/issues/issue-27054-primitive-binary-ops.rs index c6f925de5d7..96b0edf838e 100644 --- a/tests/ui/issues/issue-27054-primitive-binary-ops.rs +++ b/tests/ui/issues/issue-27054-primitive-binary-ops.rs @@ -1,4 +1,4 @@ -// run-pass +//@ run-pass fn main() { let x = &mut 1; assert_eq!(*x + { *x=2; 1 }, 2); diff --git a/tests/ui/issues/issue-2708.rs b/tests/ui/issues/issue-2708.rs index 4e53b9d145f..68ac4bc343c 100644 --- a/tests/ui/issues/issue-2708.rs +++ b/tests/ui/issues/issue-2708.rs @@ -1,8 +1,8 @@ -// run-pass +//@ run-pass #![allow(dead_code)] #![allow(non_snake_case)] -// pretty-expanded FIXME #23616 +//@ pretty-expanded FIXME #23616 diff --git a/tests/ui/issues/issue-27105.rs b/tests/ui/issues/issue-27105.rs index 3339af364a0..3308f3e8e01 100644 --- a/tests/ui/issues/issue-27105.rs +++ b/tests/ui/issues/issue-27105.rs @@ -1,4 +1,4 @@ -// check-pass +//@ check-pass use std::cell::RefCell; use std::rc::Rc; diff --git a/tests/ui/issues/issue-2723-b.rs b/tests/ui/issues/issue-2723-b.rs index 1910561d0ba..731e521f26f 100644 --- a/tests/ui/issues/issue-2723-b.rs +++ b/tests/ui/issues/issue-2723-b.rs @@ -1,5 +1,5 @@ -// run-pass -// aux-build:issue-2723-a.rs +//@ run-pass +//@ aux-build:issue-2723-a.rs extern crate issue_2723_a; use issue_2723_a::f; diff --git a/tests/ui/issues/issue-27240.rs b/tests/ui/issues/issue-27240.rs index b518e58d194..60d98a6725e 100644 --- a/tests/ui/issues/issue-27240.rs +++ b/tests/ui/issues/issue-27240.rs @@ -1,4 +1,4 @@ -// run-pass +//@ run-pass #![allow(unused_assignments)] #![allow(unused_variables)] use std::fmt; diff --git a/tests/ui/issues/issue-27268.rs b/tests/ui/issues/issue-27268.rs index 161e2d4d204..e8704d215e8 100644 --- a/tests/ui/issues/issue-27268.rs +++ b/tests/ui/issues/issue-27268.rs @@ -1,4 +1,4 @@ -// run-pass +//@ run-pass fn main() { const _C: &'static dyn Fn() = &||{}; } diff --git a/tests/ui/issues/issue-27281.rs b/tests/ui/issues/issue-27281.rs index 717d8b2c2aa..e76fd135dcd 100644 --- a/tests/ui/issues/issue-27281.rs +++ b/tests/ui/issues/issue-27281.rs @@ -1,4 +1,4 @@ -// check-pass +//@ check-pass pub trait Trait<'a> { type T; type U; diff --git a/tests/ui/issues/issue-27401-dropflag-reinit.rs b/tests/ui/issues/issue-27401-dropflag-reinit.rs index ab54af29bd6..b89497241e0 100644 --- a/tests/ui/issues/issue-27401-dropflag-reinit.rs +++ b/tests/ui/issues/issue-27401-dropflag-reinit.rs @@ -1,4 +1,4 @@ -// run-pass +//@ run-pass // Check that when a `let`-binding occurs in a loop, its associated // drop-flag is reinitialized (to indicate "needs-drop" at the end of diff --git a/tests/ui/issues/issue-27433.fixed b/tests/ui/issues/issue-27433.fixed index ce31f6bea4b..ff6704e393b 100644 --- a/tests/ui/issues/issue-27433.fixed +++ b/tests/ui/issues/issue-27433.fixed @@ -1,4 +1,4 @@ -// run-rustfix +//@ run-rustfix fn main() { let foo = 42u32; #[allow(unused_variables, non_snake_case)] diff --git a/tests/ui/issues/issue-27433.rs b/tests/ui/issues/issue-27433.rs index 01411a51c13..2a34b43f58d 100644 --- a/tests/ui/issues/issue-27433.rs +++ b/tests/ui/issues/issue-27433.rs @@ -1,4 +1,4 @@ -// run-rustfix +//@ run-rustfix fn main() { let foo = 42u32; #[allow(unused_variables, non_snake_case)] diff --git a/tests/ui/issues/issue-2761.rs b/tests/ui/issues/issue-2761.rs index 3ba098abbe6..b44a24e09f2 100644 --- a/tests/ui/issues/issue-2761.rs +++ b/tests/ui/issues/issue-2761.rs @@ -1,6 +1,6 @@ -// run-fail -// error-pattern:custom message -// ignore-emscripten no processes +//@ run-fail +//@ error-pattern:custom message +//@ ignore-emscripten no processes fn main() { assert!(false, "custom message"); diff --git a/tests/ui/issues/issue-27639.rs b/tests/ui/issues/issue-27639.rs index 945fbad91f6..95edcb8695e 100644 --- a/tests/ui/issues/issue-27639.rs +++ b/tests/ui/issues/issue-27639.rs @@ -1,4 +1,4 @@ -// run-pass +//@ run-pass #![allow(dead_code)] #![allow(non_upper_case_globals)] diff --git a/tests/ui/issues/issue-27697.rs b/tests/ui/issues/issue-27697.rs index 12af8a8e875..87ee190c01c 100644 --- a/tests/ui/issues/issue-27697.rs +++ b/tests/ui/issues/issue-27697.rs @@ -1,4 +1,4 @@ -// check-pass +//@ check-pass use std::ops::Deref; diff --git a/tests/ui/issues/issue-27859.rs b/tests/ui/issues/issue-27859.rs index 233670681f3..4b4d2d28575 100644 --- a/tests/ui/issues/issue-27859.rs +++ b/tests/ui/issues/issue-27859.rs @@ -1,5 +1,5 @@ -// run-pass -// ignore-wasm32 issue 42629 +//@ run-pass +//@ ignore-wasm32 issue 42629 #[inline(never)] fn foo(a: f32, b: f32) -> f32 { diff --git a/tests/ui/issues/issue-27889.rs b/tests/ui/issues/issue-27889.rs index 623416a5d00..8737f03db1a 100644 --- a/tests/ui/issues/issue-27889.rs +++ b/tests/ui/issues/issue-27889.rs @@ -1,4 +1,4 @@ -// check-pass +//@ check-pass #![allow(unused_assignments)] #![allow(unused_variables)] // Test that a field can have the same name in different variants diff --git a/tests/ui/issues/issue-27949.rs b/tests/ui/issues/issue-27949.rs index e905da72aad..e10c6008507 100644 --- a/tests/ui/issues/issue-27949.rs +++ b/tests/ui/issues/issue-27949.rs @@ -1,4 +1,4 @@ -// run-pass +//@ run-pass // // At one time, the `==` operator (and other binary operators) did not // support subtyping during type checking, and would therefore require diff --git a/tests/ui/issues/issue-27997.rs b/tests/ui/issues/issue-27997.rs index dd74cf75249..85317cec061 100644 --- a/tests/ui/issues/issue-27997.rs +++ b/tests/ui/issues/issue-27997.rs @@ -1,4 +1,4 @@ -// run-pass +//@ run-pass use std::sync::atomic::{Ordering, AtomicUsize}; use std::mem; diff --git a/tests/ui/issues/issue-28181.rs b/tests/ui/issues/issue-28181.rs index c46e131c6ac..e1cb5ba1c88 100644 --- a/tests/ui/issues/issue-28181.rs +++ b/tests/ui/issues/issue-28181.rs @@ -1,4 +1,4 @@ -// run-pass +//@ run-pass fn bar(f: F) -> usize where F: Fn([usize; 1]) -> usize { f([2]) } fn main() { diff --git a/tests/ui/issues/issue-28279.rs b/tests/ui/issues/issue-28279.rs index bab5df122c8..23814b284e9 100644 --- a/tests/ui/issues/issue-28279.rs +++ b/tests/ui/issues/issue-28279.rs @@ -1,4 +1,4 @@ -// check-pass +//@ check-pass #![allow(dead_code)] use std::rc::Rc; diff --git a/tests/ui/issues/issue-28498-must-work-ex1.rs b/tests/ui/issues/issue-28498-must-work-ex1.rs index 37234699893..813cd8645f9 100644 --- a/tests/ui/issues/issue-28498-must-work-ex1.rs +++ b/tests/ui/issues/issue-28498-must-work-ex1.rs @@ -1,4 +1,4 @@ -// run-pass +//@ run-pass // Example taken from RFC 1238 text // https://github.com/rust-lang/rfcs/blob/master/text/1238-nonparametric-dropck.md diff --git a/tests/ui/issues/issue-28498-must-work-ex2.rs b/tests/ui/issues/issue-28498-must-work-ex2.rs index ab0b7196082..98514b11636 100644 --- a/tests/ui/issues/issue-28498-must-work-ex2.rs +++ b/tests/ui/issues/issue-28498-must-work-ex2.rs @@ -1,4 +1,4 @@ -// run-pass +//@ run-pass // Example taken from RFC 1238 text // https://github.com/rust-lang/rfcs/blob/master/text/1238-nonparametric-dropck.md diff --git a/tests/ui/issues/issue-28498-ugeh-ex1.rs b/tests/ui/issues/issue-28498-ugeh-ex1.rs index ce49cf1ff99..f606d248948 100644 --- a/tests/ui/issues/issue-28498-ugeh-ex1.rs +++ b/tests/ui/issues/issue-28498-ugeh-ex1.rs @@ -1,4 +1,4 @@ -// run-pass +//@ run-pass // Example taken from RFC 1238 text diff --git a/tests/ui/issues/issue-28550.rs b/tests/ui/issues/issue-28550.rs index 95583f80515..31c7057d06f 100644 --- a/tests/ui/issues/issue-28550.rs +++ b/tests/ui/issues/issue-28550.rs @@ -1,4 +1,4 @@ -// run-pass +//@ run-pass struct AT,T>(F::Output); struct BT,T>(A); diff --git a/tests/ui/issues/issue-28561.rs b/tests/ui/issues/issue-28561.rs index beb12c36dca..f9b0ceb22fc 100644 --- a/tests/ui/issues/issue-28561.rs +++ b/tests/ui/issues/issue-28561.rs @@ -1,4 +1,4 @@ -// check-pass +//@ check-pass #[derive(Debug, Default, Eq, Hash, Ord, PartialEq, PartialOrd, Clone, Copy)] struct Array { f00: [T; 00], diff --git a/tests/ui/issues/issue-28600.rs b/tests/ui/issues/issue-28600.rs index 52db0d5fd84..a5427b94a57 100644 --- a/tests/ui/issues/issue-28600.rs +++ b/tests/ui/issues/issue-28600.rs @@ -1,4 +1,4 @@ -// build-pass +//@ build-pass // #28600 ICE: pub extern fn with parameter type &str inside struct impl struct Test; diff --git a/tests/ui/issues/issue-28625.rs b/tests/ui/issues/issue-28625.rs index 15a6a63d5ef..2f25bf8c734 100644 --- a/tests/ui/issues/issue-28625.rs +++ b/tests/ui/issues/issue-28625.rs @@ -1,4 +1,4 @@ -// normalize-stderr-test "\d+ bits" -> "N bits" +//@ normalize-stderr-test "\d+ bits" -> "N bits" trait Bar { type Bar; diff --git a/tests/ui/issues/issue-28777.rs b/tests/ui/issues/issue-28777.rs index 1f426b7185e..f67e11e3694 100644 --- a/tests/ui/issues/issue-28777.rs +++ b/tests/ui/issues/issue-28777.rs @@ -1,4 +1,4 @@ -// run-pass +//@ run-pass #![allow(unused_braces)] fn main() { let v1 = { 1 + {2} * {3} }; diff --git a/tests/ui/issues/issue-28828.rs b/tests/ui/issues/issue-28828.rs index 03968809eb7..b5d7385cf28 100644 --- a/tests/ui/issues/issue-28828.rs +++ b/tests/ui/issues/issue-28828.rs @@ -1,4 +1,4 @@ -// run-pass +//@ run-pass pub trait Foo { type Out; } diff --git a/tests/ui/issues/issue-28839.rs b/tests/ui/issues/issue-28839.rs index c086f412a28..76b0fa2d6e0 100644 --- a/tests/ui/issues/issue-28839.rs +++ b/tests/ui/issues/issue-28839.rs @@ -1,4 +1,4 @@ -// run-pass +//@ run-pass pub struct Foo; diff --git a/tests/ui/issues/issue-28936.rs b/tests/ui/issues/issue-28936.rs index da9e92c0c80..96503f0711d 100644 --- a/tests/ui/issues/issue-28936.rs +++ b/tests/ui/issues/issue-28936.rs @@ -1,4 +1,4 @@ -// check-pass +//@ check-pass pub type Session = i32; pub struct StreamParser<'a, T> { _tokens: T, diff --git a/tests/ui/issues/issue-2895.rs b/tests/ui/issues/issue-2895.rs index d8c08996bc3..6301a863753 100644 --- a/tests/ui/issues/issue-2895.rs +++ b/tests/ui/issues/issue-2895.rs @@ -1,4 +1,4 @@ -// run-pass +//@ run-pass #![allow(dead_code)] use std::mem; diff --git a/tests/ui/issues/issue-28983.rs b/tests/ui/issues/issue-28983.rs index 3db26a1ee5f..5273dab16c1 100644 --- a/tests/ui/issues/issue-28983.rs +++ b/tests/ui/issues/issue-28983.rs @@ -1,4 +1,4 @@ -// run-pass +//@ run-pass pub trait Test { type T; } impl Test for u32 { diff --git a/tests/ui/issues/issue-28999.rs b/tests/ui/issues/issue-28999.rs index cec3e25da86..572a0beff61 100644 --- a/tests/ui/issues/issue-28999.rs +++ b/tests/ui/issues/issue-28999.rs @@ -1,4 +1,4 @@ -// check-pass +//@ check-pass pub struct Xyz<'a, V> { pub v: (V, &'a u32), } diff --git a/tests/ui/issues/issue-29030.rs b/tests/ui/issues/issue-29030.rs index 723e358407f..c92853fb5dc 100644 --- a/tests/ui/issues/issue-29030.rs +++ b/tests/ui/issues/issue-29030.rs @@ -1,4 +1,4 @@ -// check-pass +//@ check-pass #![allow(dead_code)] #[derive(Debug)] struct Message<'a, P: 'a = &'a [u8]> { diff --git a/tests/ui/issues/issue-29037.rs b/tests/ui/issues/issue-29037.rs index 155ed144b3a..0e03d8e20ae 100644 --- a/tests/ui/issues/issue-29037.rs +++ b/tests/ui/issues/issue-29037.rs @@ -1,4 +1,4 @@ -// check-pass +//@ check-pass #![allow(dead_code)] // This test ensures that each pointer type `P` is covariant in `X`. diff --git a/tests/ui/issues/issue-2904.rs b/tests/ui/issues/issue-2904.rs index 73aa78f09b9..1ae3a8ad656 100644 --- a/tests/ui/issues/issue-2904.rs +++ b/tests/ui/issues/issue-2904.rs @@ -1,4 +1,4 @@ -// build-pass +//@ build-pass #![allow(unused_must_use)] #![allow(dead_code)] #![allow(unused_mut)] diff --git a/tests/ui/issues/issue-29048.rs b/tests/ui/issues/issue-29048.rs index 039f072f107..d379b67251c 100644 --- a/tests/ui/issues/issue-29048.rs +++ b/tests/ui/issues/issue-29048.rs @@ -1,4 +1,4 @@ -// check-pass +//@ check-pass pub struct Chan; pub struct ChanSelect<'c, T> { chans: Vec<(&'c Chan, T)>, diff --git a/tests/ui/issues/issue-29053.rs b/tests/ui/issues/issue-29053.rs index 34c4a0f8f3e..3b61dc11522 100644 --- a/tests/ui/issues/issue-29053.rs +++ b/tests/ui/issues/issue-29053.rs @@ -1,4 +1,4 @@ -// run-pass +//@ run-pass fn main() { let x: &'static str = "x"; diff --git a/tests/ui/issues/issue-29071-2.rs b/tests/ui/issues/issue-29071-2.rs index f27bf0261db..cad776b9842 100644 --- a/tests/ui/issues/issue-29071-2.rs +++ b/tests/ui/issues/issue-29071-2.rs @@ -1,4 +1,4 @@ -// run-pass +//@ run-pass #![allow(dead_code)] fn t1() -> u32 { let x; diff --git a/tests/ui/issues/issue-29071.rs b/tests/ui/issues/issue-29071.rs index 8bdacf2cebb..ab83914d5e8 100644 --- a/tests/ui/issues/issue-29071.rs +++ b/tests/ui/issues/issue-29071.rs @@ -1,4 +1,4 @@ -// check-pass +//@ check-pass #![allow(dead_code)] #![allow(non_upper_case_globals)] diff --git a/tests/ui/issues/issue-29092.rs b/tests/ui/issues/issue-29092.rs index f20d2a424b0..a5b2f4884f6 100644 --- a/tests/ui/issues/issue-29092.rs +++ b/tests/ui/issues/issue-29092.rs @@ -1,4 +1,4 @@ -// run-pass +//@ run-pass // Regression test for Issue #29092. // // (Possibly redundant with regression test run-pass/issue-30530.rs) diff --git a/tests/ui/issues/issue-29147-rpass.rs b/tests/ui/issues/issue-29147-rpass.rs index 439f8bb5308..7ac6a98e8e1 100644 --- a/tests/ui/issues/issue-29147-rpass.rs +++ b/tests/ui/issues/issue-29147-rpass.rs @@ -1,4 +1,4 @@ -// run-pass +//@ run-pass #![recursion_limit="1024"] #![allow(dead_code)] diff --git a/tests/ui/issues/issue-29265.rs b/tests/ui/issues/issue-29265.rs index f554c4d16c7..a3da9be3a3b 100644 --- a/tests/ui/issues/issue-29265.rs +++ b/tests/ui/issues/issue-29265.rs @@ -1,5 +1,5 @@ -// aux-build:issue-29265.rs -// check-pass +//@ aux-build:issue-29265.rs +//@ check-pass extern crate issue_29265 as lib; diff --git a/tests/ui/issues/issue-29276.rs b/tests/ui/issues/issue-29276.rs index 02b69565953..9b05e6de671 100644 --- a/tests/ui/issues/issue-29276.rs +++ b/tests/ui/issues/issue-29276.rs @@ -1,4 +1,4 @@ -// check-pass +//@ check-pass #![allow(dead_code)] struct S([u8; { struct Z; 0 }]); diff --git a/tests/ui/issues/issue-2935.rs b/tests/ui/issues/issue-2935.rs index 37f8181991c..bcc25f6187b 100644 --- a/tests/ui/issues/issue-2935.rs +++ b/tests/ui/issues/issue-2935.rs @@ -1,4 +1,4 @@ -// run-pass +//@ run-pass #![allow(dead_code)] #![allow(non_camel_case_types)] diff --git a/tests/ui/issues/issue-29466.rs b/tests/ui/issues/issue-29466.rs index f8785a63217..dbc37506a17 100644 --- a/tests/ui/issues/issue-29466.rs +++ b/tests/ui/issues/issue-29466.rs @@ -1,6 +1,6 @@ // ignore-tidy-filelength // -// run-pass +//@ run-pass #![allow(unused_variables)] diff --git a/tests/ui/issues/issue-29485.rs b/tests/ui/issues/issue-29485.rs index 8d58ee6d92c..56865d0e5db 100644 --- a/tests/ui/issues/issue-29485.rs +++ b/tests/ui/issues/issue-29485.rs @@ -1,8 +1,8 @@ -// run-pass +//@ run-pass #![allow(unused_attributes)] -// aux-build:issue-29485.rs -// needs-unwind -// ignore-emscripten no threads +//@ aux-build:issue-29485.rs +//@ needs-unwind +//@ ignore-emscripten no threads #[feature(recover)] diff --git a/tests/ui/issues/issue-29516.rs b/tests/ui/issues/issue-29516.rs index 6779d508dd6..52fd5ba8839 100644 --- a/tests/ui/issues/issue-29516.rs +++ b/tests/ui/issues/issue-29516.rs @@ -1,4 +1,4 @@ -// check-pass +//@ check-pass #![feature(auto_traits)] #![feature(negative_impls)] diff --git a/tests/ui/issues/issue-29522.rs b/tests/ui/issues/issue-29522.rs index 3d2de5ef63a..2a39ef28bdb 100644 --- a/tests/ui/issues/issue-29522.rs +++ b/tests/ui/issues/issue-29522.rs @@ -1,4 +1,4 @@ -// run-pass +//@ run-pass #![allow(unused_variables)] // check that we don't accidentally capture upvars just because their name // occurs in a path diff --git a/tests/ui/issues/issue-29540.rs b/tests/ui/issues/issue-29540.rs index c0de20822ba..6bfeae8559d 100644 --- a/tests/ui/issues/issue-29540.rs +++ b/tests/ui/issues/issue-29540.rs @@ -1,4 +1,4 @@ -// build-pass +//@ build-pass #[derive(Debug)] pub struct Config { pub name: String, diff --git a/tests/ui/issues/issue-29663.rs b/tests/ui/issues/issue-29663.rs index e2e89a8bfa3..ed512f14f4c 100644 --- a/tests/ui/issues/issue-29663.rs +++ b/tests/ui/issues/issue-29663.rs @@ -1,4 +1,4 @@ -// run-pass +//@ run-pass #![allow(stable_features)] // write_volatile causes an LLVM assert with composite types diff --git a/tests/ui/issues/issue-29668.rs b/tests/ui/issues/issue-29668.rs index 3d6c27bcda1..76b94293296 100644 --- a/tests/ui/issues/issue-29668.rs +++ b/tests/ui/issues/issue-29668.rs @@ -1,4 +1,4 @@ -// run-pass +//@ run-pass // Functions can return unnameable types mod m1 { diff --git a/tests/ui/issues/issue-29710.rs b/tests/ui/issues/issue-29710.rs index bc98d389c6e..906ffe9e77b 100644 --- a/tests/ui/issues/issue-29710.rs +++ b/tests/ui/issues/issue-29710.rs @@ -1,4 +1,4 @@ -// check-pass +//@ check-pass #![deny(unused_results)] #![allow(dead_code)] diff --git a/tests/ui/issues/issue-29740.rs b/tests/ui/issues/issue-29740.rs index 20398890baf..e26e2c882dc 100644 --- a/tests/ui/issues/issue-29740.rs +++ b/tests/ui/issues/issue-29740.rs @@ -1,4 +1,4 @@ -// check-pass +//@ check-pass #![allow(dead_code)] // Regression test for #29740. Inefficient MIR matching algorithms // generated way too much code for this sort of case, leading to OOM. diff --git a/tests/ui/issues/issue-29743.rs b/tests/ui/issues/issue-29743.rs index 250cd7e1b25..8e522a74821 100644 --- a/tests/ui/issues/issue-29743.rs +++ b/tests/ui/issues/issue-29743.rs @@ -1,4 +1,4 @@ -// check-pass +//@ check-pass fn main() { let mut i = [1, 2, 3]; diff --git a/tests/ui/issues/issue-29821.rs b/tests/ui/issues/issue-29821.rs index 54be3afb59d..508009337a5 100644 --- a/tests/ui/issues/issue-29821.rs +++ b/tests/ui/issues/issue-29821.rs @@ -1,4 +1,4 @@ -// build-pass +//@ build-pass pub trait Foo { type FooAssoc; diff --git a/tests/ui/issues/issue-29857.rs b/tests/ui/issues/issue-29857.rs index 6f4c5f45d0d..9d4c9b2935a 100644 --- a/tests/ui/issues/issue-29857.rs +++ b/tests/ui/issues/issue-29857.rs @@ -1,4 +1,4 @@ -// check-pass +//@ check-pass use std::marker::PhantomData; diff --git a/tests/ui/issues/issue-2989.rs b/tests/ui/issues/issue-2989.rs index a9586751407..fc35d190636 100644 --- a/tests/ui/issues/issue-2989.rs +++ b/tests/ui/issues/issue-2989.rs @@ -1,4 +1,4 @@ -// run-pass +//@ run-pass #![allow(non_camel_case_types)] trait methods { //~ WARN trait `methods` is never used diff --git a/tests/ui/issues/issue-29948.rs b/tests/ui/issues/issue-29948.rs index 3ed701480b5..77e1f6807d9 100644 --- a/tests/ui/issues/issue-29948.rs +++ b/tests/ui/issues/issue-29948.rs @@ -1,5 +1,5 @@ -// run-pass -// needs-unwind +//@ run-pass +//@ needs-unwind use std::panic; diff --git a/tests/ui/issues/issue-30018-panic.rs b/tests/ui/issues/issue-30018-panic.rs index cba3055a221..f5482d7c741 100644 --- a/tests/ui/issues/issue-30018-panic.rs +++ b/tests/ui/issues/issue-30018-panic.rs @@ -1,11 +1,11 @@ -// run-pass +//@ run-pass // Regression test for Issue #30018. This is very similar to the // original reported test, except that the panic is wrapped in a // spawned thread to isolate the expected error result from the // SIGTRAP injected by the drop-flag consistency checking. -// needs-unwind -// ignore-emscripten no threads support +//@ needs-unwind +//@ ignore-emscripten no threads support struct Foo; diff --git a/tests/ui/issues/issue-30081.rs b/tests/ui/issues/issue-30081.rs index e7fca96ed9e..538e89f2246 100644 --- a/tests/ui/issues/issue-30081.rs +++ b/tests/ui/issues/issue-30081.rs @@ -1,4 +1,4 @@ -// run-pass +//@ run-pass // This used to segfault #30081 pub enum Instruction { diff --git a/tests/ui/issues/issue-3012-2.rs b/tests/ui/issues/issue-3012-2.rs index 7d32c51f569..913f92fa8e2 100644 --- a/tests/ui/issues/issue-3012-2.rs +++ b/tests/ui/issues/issue-3012-2.rs @@ -1,7 +1,7 @@ -// run-pass -// aux-build:issue-3012-1.rs +//@ run-pass +//@ aux-build:issue-3012-1.rs -// pretty-expanded FIXME #23616 +//@ pretty-expanded FIXME #23616 extern crate socketlib; diff --git a/tests/ui/issues/issue-30123.rs b/tests/ui/issues/issue-30123.rs index 705355d91bf..f6511b5f290 100644 --- a/tests/ui/issues/issue-30123.rs +++ b/tests/ui/issues/issue-30123.rs @@ -1,4 +1,4 @@ -// aux-build:issue-30123-aux.rs +//@ aux-build:issue-30123-aux.rs extern crate issue_30123_aux; use issue_30123_aux::*; diff --git a/tests/ui/issues/issue-3026.rs b/tests/ui/issues/issue-3026.rs index 4619a3fe787..9d1c0f5a341 100644 --- a/tests/ui/issues/issue-3026.rs +++ b/tests/ui/issues/issue-3026.rs @@ -1,5 +1,5 @@ -// run-pass -// pretty-expanded FIXME #23616 +//@ run-pass +//@ pretty-expanded FIXME #23616 use std::collections::HashMap; diff --git a/tests/ui/issues/issue-3029.rs b/tests/ui/issues/issue-3029.rs index 43c8a0a23fb..a070578969c 100644 --- a/tests/ui/issues/issue-3029.rs +++ b/tests/ui/issues/issue-3029.rs @@ -1,6 +1,6 @@ -// run-fail -// error-pattern:so long -// ignore-emscripten no processes +//@ run-fail +//@ error-pattern:so long +//@ ignore-emscripten no processes #![allow(unreachable_code)] diff --git a/tests/ui/issues/issue-3037.rs b/tests/ui/issues/issue-3037.rs index ff4d32c2840..166f4b91cbc 100644 --- a/tests/ui/issues/issue-3037.rs +++ b/tests/ui/issues/issue-3037.rs @@ -1,6 +1,6 @@ -// run-pass +//@ run-pass #![allow(dead_code)] -// pretty-expanded FIXME #23616 +//@ pretty-expanded FIXME #23616 #![allow(non_camel_case_types)] enum what { } diff --git a/tests/ui/issues/issue-30371.rs b/tests/ui/issues/issue-30371.rs index eea548c482f..d3ac5fd9587 100644 --- a/tests/ui/issues/issue-30371.rs +++ b/tests/ui/issues/issue-30371.rs @@ -1,4 +1,4 @@ -// run-pass +//@ run-pass #![allow(unreachable_code)] #![allow(for_loops_over_fallibles)] #![deny(unused_variables)] diff --git a/tests/ui/issues/issue-30380.rs b/tests/ui/issues/issue-30380.rs index 48b329c5de1..534bb3423d0 100644 --- a/tests/ui/issues/issue-30380.rs +++ b/tests/ui/issues/issue-30380.rs @@ -1,9 +1,9 @@ // check that panics in destructors during assignment do not leave // destroyed values lying around for other destructors to observe. -// run-fail -// error-pattern:panicking destructors ftw! -// ignore-emscripten no processes +//@ run-fail +//@ error-pattern:panicking destructors ftw! +//@ ignore-emscripten no processes struct Observer<'a>(&'a mut FilledOnDrop); diff --git a/tests/ui/issues/issue-30490.rs b/tests/ui/issues/issue-30490.rs index 4f0eeac8f71..0d918bc3dd5 100644 --- a/tests/ui/issues/issue-30490.rs +++ b/tests/ui/issues/issue-30490.rs @@ -1,7 +1,7 @@ -// run-pass -// ignore-emscripten no processes -// ignore-sgx no processes -// ignore-fuchsia Child I/O swaps not privileged +//@ run-pass +//@ ignore-emscripten no processes +//@ ignore-sgx no processes +//@ ignore-fuchsia Child I/O swaps not privileged // Previously libstd would set stdio descriptors of a child process // by `dup`ing the requested descriptors to inherit directly into the diff --git a/tests/ui/issues/issue-3052.rs b/tests/ui/issues/issue-3052.rs index ee2456da3e2..4aa785e797f 100644 --- a/tests/ui/issues/issue-3052.rs +++ b/tests/ui/issues/issue-3052.rs @@ -1,6 +1,6 @@ -// run-pass +//@ run-pass #![allow(dead_code)] -// pretty-expanded FIXME #23616 +//@ pretty-expanded FIXME #23616 type Connection = Box) + 'static>; diff --git a/tests/ui/issues/issue-30530.rs b/tests/ui/issues/issue-30530.rs index 111fb8aa506..2c00e6d6768 100644 --- a/tests/ui/issues/issue-30530.rs +++ b/tests/ui/issues/issue-30530.rs @@ -1,4 +1,4 @@ -// run-pass +//@ run-pass // Regression test for Issue #30530: alloca's created for storing // intermediate scratch values during brace-less match arms need to be // initialized with their drop-flag set to "dropped" (or else we end diff --git a/tests/ui/issues/issue-30615.rs b/tests/ui/issues/issue-30615.rs index c718449d84e..6157e593ea3 100644 --- a/tests/ui/issues/issue-30615.rs +++ b/tests/ui/issues/issue-30615.rs @@ -1,4 +1,4 @@ -// run-pass +//@ run-pass fn main() { &0u8 as *const u8 as *const dyn PartialEq; &[0u8] as *const [u8; 1] as *const [u8]; diff --git a/tests/ui/issues/issue-30756.rs b/tests/ui/issues/issue-30756.rs index 836db951bb7..d103776406c 100644 --- a/tests/ui/issues/issue-30756.rs +++ b/tests/ui/issues/issue-30756.rs @@ -1,4 +1,4 @@ -// run-pass +//@ run-pass #![forbid(unsafe_code)] thread_local!(static FOO: u8 = 1); diff --git a/tests/ui/issues/issue-30891.rs b/tests/ui/issues/issue-30891.rs index 30f55e0bd64..25b7165d011 100644 --- a/tests/ui/issues/issue-30891.rs +++ b/tests/ui/issues/issue-30891.rs @@ -1,4 +1,4 @@ -// run-pass +//@ run-pass const ERROR_CONST: bool = true; fn get() -> bool { diff --git a/tests/ui/issues/issue-3091.rs b/tests/ui/issues/issue-3091.rs index 0c0a412420a..a4f9b371844 100644 --- a/tests/ui/issues/issue-3091.rs +++ b/tests/ui/issues/issue-3091.rs @@ -1,4 +1,4 @@ -// run-pass +//@ run-pass pub fn main() { let x = 1; diff --git a/tests/ui/issues/issue-3109.rs b/tests/ui/issues/issue-3109.rs index bd807cad753..89beaa22227 100644 --- a/tests/ui/issues/issue-3109.rs +++ b/tests/ui/issues/issue-3109.rs @@ -1,4 +1,4 @@ -// run-pass +//@ run-pass pub fn main() { println!("{:?}", ("hi there!", "you")); } diff --git a/tests/ui/issues/issue-3121.rs b/tests/ui/issues/issue-3121.rs index 4bf5b9b60a8..aa150f11cf4 100644 --- a/tests/ui/issues/issue-3121.rs +++ b/tests/ui/issues/issue-3121.rs @@ -1,4 +1,4 @@ -// run-pass +//@ run-pass #![allow(dead_code)] #![allow(non_camel_case_types)] diff --git a/tests/ui/issues/issue-31260.rs b/tests/ui/issues/issue-31260.rs index 4db7445b025..5e9fffb195c 100644 --- a/tests/ui/issues/issue-31260.rs +++ b/tests/ui/issues/issue-31260.rs @@ -1,4 +1,4 @@ -// check-pass +//@ check-pass #![allow(dead_code)] pub struct Struct { pub field: K, diff --git a/tests/ui/issues/issue-31267-additional.rs b/tests/ui/issues/issue-31267-additional.rs index c6e93533e7c..ef7a5002bf1 100644 --- a/tests/ui/issues/issue-31267-additional.rs +++ b/tests/ui/issues/issue-31267-additional.rs @@ -1,4 +1,4 @@ -// run-pass +//@ run-pass #[derive(Clone, Copy, Debug)] struct Bar; diff --git a/tests/ui/issues/issue-31267.rs b/tests/ui/issues/issue-31267.rs index 50843c89eb4..d6081bb8743 100644 --- a/tests/ui/issues/issue-31267.rs +++ b/tests/ui/issues/issue-31267.rs @@ -1,4 +1,4 @@ -// run-pass +//@ run-pass // Regression test for issue #31267 diff --git a/tests/ui/issues/issue-31299.rs b/tests/ui/issues/issue-31299.rs index e3c422cb97c..b01b73bf373 100644 --- a/tests/ui/issues/issue-31299.rs +++ b/tests/ui/issues/issue-31299.rs @@ -1,4 +1,4 @@ -// run-pass +//@ run-pass // Regression test for #31299. This was generating an overflow error // because of eager normalization: // diff --git a/tests/ui/issues/issue-3136-b.rs b/tests/ui/issues/issue-3136-b.rs index 33d97fe7c83..2995c96ebb9 100644 --- a/tests/ui/issues/issue-3136-b.rs +++ b/tests/ui/issues/issue-3136-b.rs @@ -1,7 +1,7 @@ -// run-pass -// aux-build:issue-3136-a.rs +//@ run-pass +//@ aux-build:issue-3136-a.rs -// pretty-expanded FIXME #23616 +//@ pretty-expanded FIXME #23616 extern crate issue_3136_a; diff --git a/tests/ui/issues/issue-3149.rs b/tests/ui/issues/issue-3149.rs index 6ab3bc846a3..b0abd5996b1 100644 --- a/tests/ui/issues/issue-3149.rs +++ b/tests/ui/issues/issue-3149.rs @@ -1,7 +1,7 @@ -// check-pass +//@ check-pass #![allow(dead_code)] #![allow(non_snake_case)] -// pretty-expanded FIXME #23616 +//@ pretty-expanded FIXME #23616 fn Matrix4(m11: T, m12: T, m13: T, m14: T, m21: T, m22: T, m23: T, m24: T, diff --git a/tests/ui/issues/issue-31702.rs b/tests/ui/issues/issue-31702.rs index 5b24eead345..1cf01f7f04e 100644 --- a/tests/ui/issues/issue-31702.rs +++ b/tests/ui/issues/issue-31702.rs @@ -1,6 +1,6 @@ -// run-pass -// aux-build:issue-31702-1.rs -// aux-build:issue-31702-2.rs +//@ run-pass +//@ aux-build:issue-31702-1.rs +//@ aux-build:issue-31702-2.rs // this test is actually entirely in the linked library crates diff --git a/tests/ui/issues/issue-31776.rs b/tests/ui/issues/issue-31776.rs index c86623ce289..632defbcf27 100644 --- a/tests/ui/issues/issue-31776.rs +++ b/tests/ui/issues/issue-31776.rs @@ -1,4 +1,4 @@ -// run-pass +//@ run-pass #![allow(dead_code)] #![allow(unused_variables)] // Various scenarios in which `pub` is required in blocks diff --git a/tests/ui/issues/issue-32008.rs b/tests/ui/issues/issue-32008.rs index 6c2e206796f..9075085bab7 100644 --- a/tests/ui/issues/issue-32008.rs +++ b/tests/ui/issues/issue-32008.rs @@ -1,4 +1,4 @@ -// run-pass +//@ run-pass #![allow(dead_code)] #![allow(unused_variables)] // Tests that binary operators allow subtyping on both the LHS and RHS, diff --git a/tests/ui/issues/issue-32122-deref-coercions-composition/issue-32122-1.fixed b/tests/ui/issues/issue-32122-deref-coercions-composition/issue-32122-1.fixed index 4fc5f64ff9a..abcef9fcbd9 100644 --- a/tests/ui/issues/issue-32122-deref-coercions-composition/issue-32122-1.fixed +++ b/tests/ui/issues/issue-32122-deref-coercions-composition/issue-32122-1.fixed @@ -1,4 +1,4 @@ -// run-rustfix +//@ run-rustfix use std::ops::Deref; struct Foo(u8); diff --git a/tests/ui/issues/issue-32122-deref-coercions-composition/issue-32122-1.rs b/tests/ui/issues/issue-32122-deref-coercions-composition/issue-32122-1.rs index 3c4859f07a2..920ec348419 100644 --- a/tests/ui/issues/issue-32122-deref-coercions-composition/issue-32122-1.rs +++ b/tests/ui/issues/issue-32122-deref-coercions-composition/issue-32122-1.rs @@ -1,4 +1,4 @@ -// run-rustfix +//@ run-rustfix use std::ops::Deref; struct Foo(u8); diff --git a/tests/ui/issues/issue-32122-deref-coercions-composition/issue-32122-2.fixed b/tests/ui/issues/issue-32122-deref-coercions-composition/issue-32122-2.fixed index cee0e592976..db406a4c3ac 100644 --- a/tests/ui/issues/issue-32122-deref-coercions-composition/issue-32122-2.fixed +++ b/tests/ui/issues/issue-32122-deref-coercions-composition/issue-32122-2.fixed @@ -1,4 +1,4 @@ -// run-rustfix +//@ run-rustfix use std::ops::Deref; struct Bar(u8); struct Foo(Bar); diff --git a/tests/ui/issues/issue-32122-deref-coercions-composition/issue-32122-2.rs b/tests/ui/issues/issue-32122-deref-coercions-composition/issue-32122-2.rs index 39e9df4224e..74242931b4e 100644 --- a/tests/ui/issues/issue-32122-deref-coercions-composition/issue-32122-2.rs +++ b/tests/ui/issues/issue-32122-deref-coercions-composition/issue-32122-2.rs @@ -1,4 +1,4 @@ -// run-rustfix +//@ run-rustfix use std::ops::Deref; struct Bar(u8); struct Foo(Bar); diff --git a/tests/ui/issues/issue-3220.rs b/tests/ui/issues/issue-3220.rs index 7dc672edb54..62a979b47c7 100644 --- a/tests/ui/issues/issue-3220.rs +++ b/tests/ui/issues/issue-3220.rs @@ -1,7 +1,7 @@ -// run-pass +//@ run-pass #![allow(dead_code)] #![allow(non_camel_case_types)] -// pretty-expanded FIXME #23616 +//@ pretty-expanded FIXME #23616 struct thing { x: isize, } diff --git a/tests/ui/issues/issue-32292.rs b/tests/ui/issues/issue-32292.rs index 99b865391de..2181dff505a 100644 --- a/tests/ui/issues/issue-32292.rs +++ b/tests/ui/issues/issue-32292.rs @@ -1,4 +1,4 @@ -// run-pass +//@ run-pass #![deny(warnings)] #[derive(Hash, Ord, PartialOrd, Eq, PartialEq, Debug, Clone, Copy)] diff --git a/tests/ui/issues/issue-32324.rs b/tests/ui/issues/issue-32324.rs index 2df547b2e0c..50ecfe993d4 100644 --- a/tests/ui/issues/issue-32324.rs +++ b/tests/ui/issues/issue-32324.rs @@ -1,4 +1,4 @@ -// check-pass +//@ check-pass #![allow(dead_code)] trait Resources { diff --git a/tests/ui/issues/issue-32377.rs b/tests/ui/issues/issue-32377.rs index 555f6abd791..6e4a7661a23 100644 --- a/tests/ui/issues/issue-32377.rs +++ b/tests/ui/issues/issue-32377.rs @@ -1,4 +1,4 @@ -// normalize-stderr-test "\d+ bits" -> "N bits" +//@ normalize-stderr-test "\d+ bits" -> "N bits" use std::mem; use std::marker::PhantomData; diff --git a/tests/ui/issues/issue-32389.rs b/tests/ui/issues/issue-32389.rs index cc94cc819d6..683c4874e8c 100644 --- a/tests/ui/issues/issue-32389.rs +++ b/tests/ui/issues/issue-32389.rs @@ -1,4 +1,4 @@ -// run-pass +//@ run-pass fn foo() -> T { loop {} } fn test() { diff --git a/tests/ui/issues/issue-32518.rs b/tests/ui/issues/issue-32518.rs index 808b40f71b3..45a882850c0 100644 --- a/tests/ui/issues/issue-32518.rs +++ b/tests/ui/issues/issue-32518.rs @@ -1,8 +1,8 @@ -// run-pass -// no-prefer-dynamic -// aux-build:cgu_test.rs -// aux-build:cgu_test_a.rs -// aux-build:cgu_test_b.rs +//@ run-pass +//@ no-prefer-dynamic +//@ aux-build:cgu_test.rs +//@ aux-build:cgu_test_a.rs +//@ aux-build:cgu_test_b.rs extern crate cgu_test_a; extern crate cgu_test_b; diff --git a/tests/ui/issues/issue-32797.rs b/tests/ui/issues/issue-32797.rs index b12b929f8fc..6711a8f9fe5 100644 --- a/tests/ui/issues/issue-32797.rs +++ b/tests/ui/issues/issue-32797.rs @@ -1,4 +1,4 @@ -// check-pass +//@ check-pass pub use bar::*; mod bar { diff --git a/tests/ui/issues/issue-32805.rs b/tests/ui/issues/issue-32805.rs index 23c19473903..717c00a248a 100644 --- a/tests/ui/issues/issue-32805.rs +++ b/tests/ui/issues/issue-32805.rs @@ -1,4 +1,4 @@ -// run-pass +//@ run-pass fn const_mir() -> f32 { 9007199791611905.0 } fn main() { diff --git a/tests/ui/issues/issue-3290.rs b/tests/ui/issues/issue-3290.rs index 7014d517f18..50c432288ce 100644 --- a/tests/ui/issues/issue-3290.rs +++ b/tests/ui/issues/issue-3290.rs @@ -1,4 +1,4 @@ -// run-pass +//@ run-pass #![allow(dead_code)] pub fn main() { diff --git a/tests/ui/issues/issue-33187.rs b/tests/ui/issues/issue-33187.rs index 8db9e005885..6a039527b3b 100644 --- a/tests/ui/issues/issue-33187.rs +++ b/tests/ui/issues/issue-33187.rs @@ -1,4 +1,4 @@ -// run-pass +//@ run-pass struct Foo(::Data); diff --git a/tests/ui/issues/issue-33202.rs b/tests/ui/issues/issue-33202.rs index 11b89ae1b47..3fef98606af 100644 --- a/tests/ui/issues/issue-33202.rs +++ b/tests/ui/issues/issue-33202.rs @@ -1,4 +1,4 @@ -// run-pass +//@ run-pass #[repr(C)] pub enum CPOption { PSome(T), diff --git a/tests/ui/issues/issue-33241.rs b/tests/ui/issues/issue-33241.rs index 5f9f1e4a742..1c497876a90 100644 --- a/tests/ui/issues/issue-33241.rs +++ b/tests/ui/issues/issue-33241.rs @@ -1,4 +1,4 @@ -// check-pass +//@ check-pass use std::fmt; diff --git a/tests/ui/issues/issue-33287.rs b/tests/ui/issues/issue-33287.rs index b3f87305781..4d0f757b7a5 100644 --- a/tests/ui/issues/issue-33287.rs +++ b/tests/ui/issues/issue-33287.rs @@ -1,4 +1,4 @@ -// build-pass +//@ build-pass #![allow(dead_code)] #![allow(unused_variables)] #![allow(unconditional_panic)] diff --git a/tests/ui/issues/issue-33387.rs b/tests/ui/issues/issue-33387.rs index 499fa7c1f27..5d323612e41 100644 --- a/tests/ui/issues/issue-33387.rs +++ b/tests/ui/issues/issue-33387.rs @@ -1,4 +1,4 @@ -// run-pass +//@ run-pass #![feature(rustc_attrs)] use std::sync::Arc; diff --git a/tests/ui/issues/issue-33461.rs b/tests/ui/issues/issue-33461.rs index 4e01d4d3061..0de05c6687a 100644 --- a/tests/ui/issues/issue-33461.rs +++ b/tests/ui/issues/issue-33461.rs @@ -1,4 +1,4 @@ -// run-pass +//@ run-pass #![allow(unused_variables)] use std::marker::PhantomData; diff --git a/tests/ui/issues/issue-33687.rs b/tests/ui/issues/issue-33687.rs index ac802ed86dc..a5693b3aca8 100644 --- a/tests/ui/issues/issue-33687.rs +++ b/tests/ui/issues/issue-33687.rs @@ -1,4 +1,4 @@ -// run-pass +//@ run-pass #![feature(unboxed_closures)] #![feature(fn_traits)] diff --git a/tests/ui/issues/issue-33770.rs b/tests/ui/issues/issue-33770.rs index f3c99015b6d..b4290955be5 100644 --- a/tests/ui/issues/issue-33770.rs +++ b/tests/ui/issues/issue-33770.rs @@ -1,6 +1,6 @@ -// run-pass -// ignore-emscripten no processes -// ignore-sgx no processes +//@ run-pass +//@ ignore-emscripten no processes +//@ ignore-sgx no processes use std::process::{Command, Stdio}; use std::env; diff --git a/tests/ui/issues/issue-3389.rs b/tests/ui/issues/issue-3389.rs index 294a07229fb..4e73a2cf001 100644 --- a/tests/ui/issues/issue-3389.rs +++ b/tests/ui/issues/issue-3389.rs @@ -1,4 +1,4 @@ -// run-pass +//@ run-pass #![allow(dead_code)] #![allow(non_camel_case_types)] diff --git a/tests/ui/issues/issue-33941.rs b/tests/ui/issues/issue-33941.rs index e3b6dcf55a7..0ad7cbe8efc 100644 --- a/tests/ui/issues/issue-33941.rs +++ b/tests/ui/issues/issue-33941.rs @@ -1,4 +1,4 @@ -// compile-flags: -Zdeduplicate-diagnostics=yes +//@ compile-flags: -Zdeduplicate-diagnostics=yes use std::collections::HashMap; diff --git a/tests/ui/issues/issue-33992.rs b/tests/ui/issues/issue-33992.rs index a6b137ba645..d1c62c830a9 100644 --- a/tests/ui/issues/issue-33992.rs +++ b/tests/ui/issues/issue-33992.rs @@ -1,7 +1,7 @@ -// run-pass -// ignore-windows -// ignore-macos -// ignore-emscripten common linkage not implemented right now +//@ run-pass +//@ ignore-windows +//@ ignore-macos +//@ ignore-emscripten common linkage not implemented right now #![feature(linkage)] diff --git a/tests/ui/issues/issue-34074.rs b/tests/ui/issues/issue-34074.rs index ca7d7b49a04..9b3dee11d9b 100644 --- a/tests/ui/issues/issue-34074.rs +++ b/tests/ui/issues/issue-34074.rs @@ -1,4 +1,4 @@ -// check-pass +//@ check-pass // Make sure several unnamed function parameters don't conflict with each other trait Tr { diff --git a/tests/ui/issues/issue-3424.rs b/tests/ui/issues/issue-3424.rs index 43d75a6525f..4d1a6521420 100644 --- a/tests/ui/issues/issue-3424.rs +++ b/tests/ui/issues/issue-3424.rs @@ -1,4 +1,4 @@ -// check-pass +//@ check-pass #![allow(dead_code)] #![allow(non_camel_case_types)] // rustc --test ignores2.rs && ./ignores2 diff --git a/tests/ui/issues/issue-3429.rs b/tests/ui/issues/issue-3429.rs index 9d94c3ff61c..38ea7df1aa0 100644 --- a/tests/ui/issues/issue-3429.rs +++ b/tests/ui/issues/issue-3429.rs @@ -1,5 +1,5 @@ -// run-pass -// pretty-expanded FIXME #23616 +//@ run-pass +//@ pretty-expanded FIXME #23616 pub fn main() { let x = 1_usize; diff --git a/tests/ui/issues/issue-34418.rs b/tests/ui/issues/issue-34418.rs index 6132f744b50..0dcefb01935 100644 --- a/tests/ui/issues/issue-34418.rs +++ b/tests/ui/issues/issue-34418.rs @@ -1,4 +1,4 @@ -// check-pass +//@ check-pass macro_rules! make_item { () => { fn f() {} } diff --git a/tests/ui/issues/issue-34427.rs b/tests/ui/issues/issue-34427.rs index a14b5b9e278..519e839ad5f 100644 --- a/tests/ui/issues/issue-34427.rs +++ b/tests/ui/issues/issue-34427.rs @@ -1,4 +1,4 @@ -// run-pass +//@ run-pass // Issue #34427: On ARM, the code in `foo` at one time was generating // a machine code instruction of the form: `str r0, [r0, rN]!` (for // some N), which is not legal because the source register and base diff --git a/tests/ui/issues/issue-3447.rs b/tests/ui/issues/issue-3447.rs index ee5b2277811..ab844b0bb90 100644 --- a/tests/ui/issues/issue-3447.rs +++ b/tests/ui/issues/issue-3447.rs @@ -1,4 +1,4 @@ -// run-pass +//@ run-pass #![allow(dead_code)] #![allow(non_snake_case)] #![allow(non_camel_case_types)] diff --git a/tests/ui/issues/issue-34503.rs b/tests/ui/issues/issue-34503.rs index d2c95d990ec..68d84bae3d8 100644 --- a/tests/ui/issues/issue-34503.rs +++ b/tests/ui/issues/issue-34503.rs @@ -1,4 +1,4 @@ -// run-pass +//@ run-pass fn main() { struct X; trait Foo { diff --git a/tests/ui/issues/issue-34569.rs b/tests/ui/issues/issue-34569.rs index 1f68560509e..25b2e7fbe16 100644 --- a/tests/ui/issues/issue-34569.rs +++ b/tests/ui/issues/issue-34569.rs @@ -1,5 +1,5 @@ -// run-pass -// compile-flags:-g +//@ run-pass +//@ compile-flags:-g // In this test we just want to make sure that the code below does not lead to // a debuginfo verification assertion during compilation. This was caused by the diff --git a/tests/ui/issues/issue-34571.rs b/tests/ui/issues/issue-34571.rs index c392f59d8da..1242a9e2b5c 100644 --- a/tests/ui/issues/issue-34571.rs +++ b/tests/ui/issues/issue-34571.rs @@ -1,4 +1,4 @@ -// run-pass +//@ run-pass #[repr(u8)] enum Foo { Foo(#[allow(dead_code)] u8), diff --git a/tests/ui/issues/issue-34751.rs b/tests/ui/issues/issue-34751.rs index 6309c0a0257..1e842049b14 100644 --- a/tests/ui/issues/issue-34751.rs +++ b/tests/ui/issues/issue-34751.rs @@ -1,4 +1,4 @@ -// check-pass +//@ check-pass #![allow(dead_code)] // #34751 ICE: 'rustc' panicked at 'assertion failed: !substs.has_regions_escaping_depth(0)' diff --git a/tests/ui/issues/issue-34780.rs b/tests/ui/issues/issue-34780.rs index fbedad35b86..ee5cc0750dc 100644 --- a/tests/ui/issues/issue-34780.rs +++ b/tests/ui/issues/issue-34780.rs @@ -1,4 +1,4 @@ -// check-pass +//@ check-pass #![allow(stable_features)] #![feature(associated_consts)] diff --git a/tests/ui/issues/issue-34796.rs b/tests/ui/issues/issue-34796.rs index 88d5c50a27d..1a417b34830 100644 --- a/tests/ui/issues/issue-34796.rs +++ b/tests/ui/issues/issue-34796.rs @@ -1,4 +1,4 @@ -// run-pass +//@ run-pass #![allow(dead_code)] // This test case exposes conditions where the encoding of a trait object type // with projection predicates would differ between this crate and the upstream @@ -8,7 +8,7 @@ // the symbol name. // The fix was to make the order in which predicates get encoded stable. -// aux-build:issue-34796-aux.rs +//@ aux-build:issue-34796-aux.rs extern crate issue_34796_aux; fn mk() -> T { loop {} } diff --git a/tests/ui/issues/issue-34839.rs b/tests/ui/issues/issue-34839.rs index 8ffed827e90..73edba5817a 100644 --- a/tests/ui/issues/issue-34839.rs +++ b/tests/ui/issues/issue-34839.rs @@ -1,4 +1,4 @@ -// check-pass +//@ check-pass trait RegularExpression: Sized { type Text; diff --git a/tests/ui/issues/issue-3500.rs b/tests/ui/issues/issue-3500.rs index 7b39cc16cab..038707ef1ec 100644 --- a/tests/ui/issues/issue-3500.rs +++ b/tests/ui/issues/issue-3500.rs @@ -1,5 +1,5 @@ -// run-pass -// pretty-expanded FIXME #23616 +//@ run-pass +//@ pretty-expanded FIXME #23616 pub fn main() { let x = &Some(1); diff --git a/tests/ui/issues/issue-3521-2.fixed b/tests/ui/issues/issue-3521-2.fixed index 140c24b9395..2a6e0829bc0 100644 --- a/tests/ui/issues/issue-3521-2.fixed +++ b/tests/ui/issues/issue-3521-2.fixed @@ -1,4 +1,4 @@ -// run-rustfix +//@ run-rustfix fn main() { let foo = 100; diff --git a/tests/ui/issues/issue-3521-2.rs b/tests/ui/issues/issue-3521-2.rs index f66efec45e5..bd822020065 100644 --- a/tests/ui/issues/issue-3521-2.rs +++ b/tests/ui/issues/issue-3521-2.rs @@ -1,4 +1,4 @@ -// run-rustfix +//@ run-rustfix fn main() { let foo = 100; diff --git a/tests/ui/issues/issue-35423.rs b/tests/ui/issues/issue-35423.rs index 202ffcc1d0d..c43d35fea78 100644 --- a/tests/ui/issues/issue-35423.rs +++ b/tests/ui/issues/issue-35423.rs @@ -1,4 +1,4 @@ -// run-pass +//@ run-pass fn main () { let x = 4; match x { diff --git a/tests/ui/issues/issue-3556.rs b/tests/ui/issues/issue-3556.rs index 3c1934ade35..72fd46e0a4a 100644 --- a/tests/ui/issues/issue-3556.rs +++ b/tests/ui/issues/issue-3556.rs @@ -1,4 +1,4 @@ -// run-pass +//@ run-pass #![allow(dead_code)] #[derive(Debug)] diff --git a/tests/ui/issues/issue-3559.rs b/tests/ui/issues/issue-3559.rs index 9d498584a9d..ffb937cf5d2 100644 --- a/tests/ui/issues/issue-3559.rs +++ b/tests/ui/issues/issue-3559.rs @@ -1,4 +1,4 @@ -// run-pass +//@ run-pass use std::collections::HashMap; fn check_strs(actual: &str, expected: &str) -> bool { diff --git a/tests/ui/issues/issue-35600.rs b/tests/ui/issues/issue-35600.rs index f0bab6010d7..40df0b6dfd8 100644 --- a/tests/ui/issues/issue-35600.rs +++ b/tests/ui/issues/issue-35600.rs @@ -1,4 +1,4 @@ -// run-pass +//@ run-pass #![allow(non_camel_case_types)] #![allow(unused_variables)] diff --git a/tests/ui/issues/issue-3563-3.rs b/tests/ui/issues/issue-3563-3.rs index 6346b82167c..a28198e7dbf 100644 --- a/tests/ui/issues/issue-3563-3.rs +++ b/tests/ui/issues/issue-3563-3.rs @@ -1,4 +1,4 @@ -// run-pass +//@ run-pass #![allow(unused_imports)] #![allow(non_snake_case)] diff --git a/tests/ui/issues/issue-3574.rs b/tests/ui/issues/issue-3574.rs index eb967577ffb..36c1e2ad93e 100644 --- a/tests/ui/issues/issue-3574.rs +++ b/tests/ui/issues/issue-3574.rs @@ -1,4 +1,4 @@ -// run-pass +//@ run-pass // rustc --test match_borrowed_str.rs.rs && ./match_borrowed_str.rs diff --git a/tests/ui/issues/issue-35815.rs b/tests/ui/issues/issue-35815.rs index 05fd1b15d43..1a09d8041e4 100644 --- a/tests/ui/issues/issue-35815.rs +++ b/tests/ui/issues/issue-35815.rs @@ -1,4 +1,4 @@ -// run-pass +//@ run-pass #![allow(dead_code)] use std::mem; diff --git a/tests/ui/issues/issue-35976.rs b/tests/ui/issues/issue-35976.rs index aa6f74cb5d4..8249da4a01d 100644 --- a/tests/ui/issues/issue-35976.rs +++ b/tests/ui/issues/issue-35976.rs @@ -1,5 +1,5 @@ -// revisions: imported unimported -//[imported] check-pass +//@ revisions: imported unimported +//@[imported] check-pass mod private { pub trait Future { diff --git a/tests/ui/issues/issue-36023.rs b/tests/ui/issues/issue-36023.rs index 64d92bf8c3c..32e8af65c7d 100644 --- a/tests/ui/issues/issue-36023.rs +++ b/tests/ui/issues/issue-36023.rs @@ -1,4 +1,4 @@ -// run-pass +//@ run-pass #![allow(unused_variables)] use std::ops::Deref; diff --git a/tests/ui/issues/issue-36036-associated-type-layout.rs b/tests/ui/issues/issue-36036-associated-type-layout.rs index 022f9a5d556..63f9927c678 100644 --- a/tests/ui/issues/issue-36036-associated-type-layout.rs +++ b/tests/ui/issues/issue-36036-associated-type-layout.rs @@ -1,4 +1,4 @@ -// run-pass +//@ run-pass // Issue 36036: computing the layout of a type composed from another // trait's associated type caused compiler to ICE when the associated // type was allowed to be unsized, even though the known instantiated diff --git a/tests/ui/issues/issue-36075.rs b/tests/ui/issues/issue-36075.rs index bc5bdc3ff9e..a563332ad78 100644 --- a/tests/ui/issues/issue-36075.rs +++ b/tests/ui/issues/issue-36075.rs @@ -1,4 +1,4 @@ -// check-pass +//@ check-pass #![allow(dead_code)] trait DeclarationParser { type Declaration; diff --git a/tests/ui/issues/issue-3609.rs b/tests/ui/issues/issue-3609.rs index 57ff12a08ce..a226e5b0136 100644 --- a/tests/ui/issues/issue-3609.rs +++ b/tests/ui/issues/issue-3609.rs @@ -1,4 +1,4 @@ -// check-pass +//@ check-pass #![allow(unused_must_use)] #![allow(dead_code)] #![allow(unused_mut)] diff --git a/tests/ui/issues/issue-36116.rs b/tests/ui/issues/issue-36116.rs index c7c70c7afe7..2313e189aff 100644 --- a/tests/ui/issues/issue-36116.rs +++ b/tests/ui/issues/issue-36116.rs @@ -1,6 +1,6 @@ // Unnecessary path disambiguator is ok -// check-pass +//@ check-pass macro_rules! m { ($p: path) => { diff --git a/tests/ui/issues/issue-36260.rs b/tests/ui/issues/issue-36260.rs index d96dc80ea71..265b0d2f802 100644 --- a/tests/ui/issues/issue-36260.rs +++ b/tests/ui/issues/issue-36260.rs @@ -1,4 +1,4 @@ -// run-pass +//@ run-pass // Make sure this compiles without getting a linker error because of missing // drop-glue because the collector missed adding drop-glue for the closure: diff --git a/tests/ui/issues/issue-36278-prefix-nesting.rs b/tests/ui/issues/issue-36278-prefix-nesting.rs index 5f476932018..3f2ca7a2460 100644 --- a/tests/ui/issues/issue-36278-prefix-nesting.rs +++ b/tests/ui/issues/issue-36278-prefix-nesting.rs @@ -1,4 +1,4 @@ -// run-pass +//@ run-pass // Issue 36278: On an unsized struct with >1 level of nontrivial // nesting, ensure we are computing dynamic size of prefix correctly. diff --git a/tests/ui/issues/issue-36379.rs b/tests/ui/issues/issue-36379.rs index 3a3e6f47067..6e275b03a70 100644 --- a/tests/ui/issues/issue-36379.rs +++ b/tests/ui/issues/issue-36379.rs @@ -1,4 +1,4 @@ -// check-pass +//@ check-pass fn _test() -> impl Default { } diff --git a/tests/ui/issues/issue-36401.rs b/tests/ui/issues/issue-36401.rs index f51197b01c7..d5aa24e7149 100644 --- a/tests/ui/issues/issue-36401.rs +++ b/tests/ui/issues/issue-36401.rs @@ -1,4 +1,4 @@ -// run-pass +//@ run-pass #[derive(Debug)] pub enum Event { Key(u8), diff --git a/tests/ui/issues/issue-36474.rs b/tests/ui/issues/issue-36474.rs index 90ee5b3cd4b..ddfa1829e3a 100644 --- a/tests/ui/issues/issue-36474.rs +++ b/tests/ui/issues/issue-36474.rs @@ -1,4 +1,4 @@ -// run-pass +//@ run-pass fn main() { remove_axis(&3, 0); } diff --git a/tests/ui/issues/issue-3656.rs b/tests/ui/issues/issue-3656.rs index 4a9f94306d5..ff3b782ade9 100644 --- a/tests/ui/issues/issue-3656.rs +++ b/tests/ui/issues/issue-3656.rs @@ -1,12 +1,12 @@ -// run-pass +//@ run-pass #![allow(dead_code)] #![allow(improper_ctypes)] // Issue #3656 // Incorrect struct size computation in the FFI, because of not taking // the alignment of elements into account. -// pretty-expanded FIXME #23616 -// ignore-wasm32-bare no libc to test with +//@ pretty-expanded FIXME #23616 +//@ ignore-wasm32-bare no libc to test with #![feature(rustc_private)] extern crate libc; diff --git a/tests/ui/issues/issue-3668-non-constant-value-in-constant/issue-3668-2.fixed b/tests/ui/issues/issue-3668-non-constant-value-in-constant/issue-3668-2.fixed index a95781c6edc..bf100755b90 100644 --- a/tests/ui/issues/issue-3668-non-constant-value-in-constant/issue-3668-2.fixed +++ b/tests/ui/issues/issue-3668-non-constant-value-in-constant/issue-3668-2.fixed @@ -1,4 +1,4 @@ -// run-rustfix +//@ run-rustfix #![allow(unused_variables, dead_code)] fn f(x:isize) { let child: isize = x + 1; diff --git a/tests/ui/issues/issue-3668-non-constant-value-in-constant/issue-3668-2.rs b/tests/ui/issues/issue-3668-non-constant-value-in-constant/issue-3668-2.rs index 8aa0897ecb4..375178172bb 100644 --- a/tests/ui/issues/issue-3668-non-constant-value-in-constant/issue-3668-2.rs +++ b/tests/ui/issues/issue-3668-non-constant-value-in-constant/issue-3668-2.rs @@ -1,4 +1,4 @@ -// run-rustfix +//@ run-rustfix #![allow(unused_variables, dead_code)] fn f(x:isize) { static child: isize = x + 1; diff --git a/tests/ui/issues/issue-36744-bitcast-args-if-needed.rs b/tests/ui/issues/issue-36744-bitcast-args-if-needed.rs index 34bbb66d979..8fcd0c3f41c 100644 --- a/tests/ui/issues/issue-36744-bitcast-args-if-needed.rs +++ b/tests/ui/issues/issue-36744-bitcast-args-if-needed.rs @@ -1,4 +1,4 @@ -// run-pass +//@ run-pass // This tests for an ICE (and, if ignored, subsequent LLVM abort) when // a lifetime-parametric fn is passed into a context whose expected // type has a differing lifetime parameterization. diff --git a/tests/ui/issues/issue-36786-resolve-call.rs b/tests/ui/issues/issue-36786-resolve-call.rs index e5341ba7dbe..de7b0e18d52 100644 --- a/tests/ui/issues/issue-36786-resolve-call.rs +++ b/tests/ui/issues/issue-36786-resolve-call.rs @@ -1,4 +1,4 @@ -// run-pass +//@ run-pass // Ensure that types that rely on obligations are autoderefed // correctly diff --git a/tests/ui/issues/issue-36816.rs b/tests/ui/issues/issue-36816.rs index 54690b43c46..d15a9c7abe1 100644 --- a/tests/ui/issues/issue-36816.rs +++ b/tests/ui/issues/issue-36816.rs @@ -1,4 +1,4 @@ -// run-pass +//@ run-pass macro_rules! m { () => { 1 } } macro_rules! n { () => { 1 + m!() } } diff --git a/tests/ui/issues/issue-36839.rs b/tests/ui/issues/issue-36839.rs index ca3d66b1c8e..654c0f6e4b5 100644 --- a/tests/ui/issues/issue-36839.rs +++ b/tests/ui/issues/issue-36839.rs @@ -1,4 +1,4 @@ -// check-pass +//@ check-pass pub trait Foo { type Bar; diff --git a/tests/ui/issues/issue-36856.rs b/tests/ui/issues/issue-36856.rs index f2dfaf3dd36..afeba012fa0 100644 --- a/tests/ui/issues/issue-36856.rs +++ b/tests/ui/issues/issue-36856.rs @@ -1,7 +1,7 @@ -// run-pass +//@ run-pass // Regression test for #36856. -// compile-flags:-g +//@ compile-flags:-g fn g() -> bool { false diff --git a/tests/ui/issues/issue-36936.rs b/tests/ui/issues/issue-36936.rs index 486a422b754..4fbac002126 100644 --- a/tests/ui/issues/issue-36936.rs +++ b/tests/ui/issues/issue-36936.rs @@ -1,4 +1,4 @@ -// run-pass +//@ run-pass // check that casts are not being treated as lexprs. fn main() { diff --git a/tests/ui/issues/issue-36954.rs b/tests/ui/issues/issue-36954.rs index 56ff9926ef1..411e99b603d 100644 --- a/tests/ui/issues/issue-36954.rs +++ b/tests/ui/issues/issue-36954.rs @@ -1,5 +1,5 @@ -// run-pass -// aux-build:issue-36954.rs +//@ run-pass +//@ aux-build:issue-36954.rs extern crate issue_36954 as lib; diff --git a/tests/ui/issues/issue-3702.rs b/tests/ui/issues/issue-3702.rs index f48d549b3eb..bb79e3a7f93 100644 --- a/tests/ui/issues/issue-3702.rs +++ b/tests/ui/issues/issue-3702.rs @@ -1,4 +1,4 @@ -// run-pass +//@ run-pass #![allow(dead_code)] pub fn main() { diff --git a/tests/ui/issues/issue-37051.rs b/tests/ui/issues/issue-37051.rs index 9cae6cf5e76..fa9cc5964fe 100644 --- a/tests/ui/issues/issue-37051.rs +++ b/tests/ui/issues/issue-37051.rs @@ -1,4 +1,4 @@ -// check-pass +//@ check-pass #![feature(associated_type_defaults)] diff --git a/tests/ui/issues/issue-37109.rs b/tests/ui/issues/issue-37109.rs index 1e57d5f95e8..5276266523d 100644 --- a/tests/ui/issues/issue-37109.rs +++ b/tests/ui/issues/issue-37109.rs @@ -1,4 +1,4 @@ -// run-pass +//@ run-pass trait ToRef<'a> { type Ref: 'a; } diff --git a/tests/ui/issues/issue-37131.rs b/tests/ui/issues/issue-37131.rs index ac2d1d1ed8b..3ea14672e23 100644 --- a/tests/ui/issues/issue-37131.rs +++ b/tests/ui/issues/issue-37131.rs @@ -1,9 +1,9 @@ // Tests that compiling for a target which is not installed will result in a helpful // error message. -// compile-flags: --target=thumbv6m-none-eabi -// ignore-arm -// needs-llvm-components: arm +//@ compile-flags: --target=thumbv6m-none-eabi +//@ ignore-arm +//@ needs-llvm-components: arm -// error-pattern:target may not be installed +//@ error-pattern:target may not be installed fn main() { } diff --git a/tests/ui/issues/issue-37291/main.rs b/tests/ui/issues/issue-37291/main.rs index 6fb6b50da20..86571353295 100644 --- a/tests/ui/issues/issue-37291/main.rs +++ b/tests/ui/issues/issue-37291/main.rs @@ -1,6 +1,6 @@ -// run-pass +//@ run-pass #![allow(unused_imports)] -// aux-build:lib.rs +//@ aux-build:lib.rs // Regression test for #37291. The problem was that the starting // environment for a specialization check was not including the diff --git a/tests/ui/issues/issue-37311-type-length-limit/issue-37311.rs b/tests/ui/issues/issue-37311-type-length-limit/issue-37311.rs index c109be00523..1646f16e1ec 100644 --- a/tests/ui/issues/issue-37311-type-length-limit/issue-37311.rs +++ b/tests/ui/issues/issue-37311-type-length-limit/issue-37311.rs @@ -1,6 +1,6 @@ -// build-fail -// normalize-stderr-test: ".nll/" -> "/" -// ignore-compare-mode-next-solver (hangs) +//@ build-fail +//@ normalize-stderr-test: ".nll/" -> "/" +//@ ignore-compare-mode-next-solver (hangs) trait Mirror { type Image; diff --git a/tests/ui/issues/issue-3743.rs b/tests/ui/issues/issue-3743.rs index 07741914f80..575445661af 100644 --- a/tests/ui/issues/issue-3743.rs +++ b/tests/ui/issues/issue-3743.rs @@ -1,4 +1,4 @@ -// run-pass +//@ run-pass // If `Mul` used an associated type for its output, this test would // work more smoothly. diff --git a/tests/ui/issues/issue-37510.rs b/tests/ui/issues/issue-37510.rs index 2081c9f7e26..62a90c5604b 100644 --- a/tests/ui/issues/issue-37510.rs +++ b/tests/ui/issues/issue-37510.rs @@ -1,4 +1,4 @@ -// check-pass +//@ check-pass fn foo(_: &mut i32) -> bool { true } diff --git a/tests/ui/issues/issue-3753.rs b/tests/ui/issues/issue-3753.rs index dc9e42bad97..a243ceab83e 100644 --- a/tests/ui/issues/issue-3753.rs +++ b/tests/ui/issues/issue-3753.rs @@ -1,4 +1,4 @@ -// run-pass +//@ run-pass // Issue #3656 // Issue Name: pub method preceded by attribute can't be parsed // Abstract: Visibility parsing failed when compiler parsing diff --git a/tests/ui/issues/issue-37598.rs b/tests/ui/issues/issue-37598.rs index 458e999c3fa..a3832c2e588 100644 --- a/tests/ui/issues/issue-37598.rs +++ b/tests/ui/issues/issue-37598.rs @@ -1,4 +1,4 @@ -// check-pass +//@ check-pass fn check(list: &[u8]) { match list { diff --git a/tests/ui/issues/issue-37665.rs b/tests/ui/issues/issue-37665.rs index 81ff478aabc..db74b1f0259 100644 --- a/tests/ui/issues/issue-37665.rs +++ b/tests/ui/issues/issue-37665.rs @@ -1,4 +1,4 @@ -// compile-flags: -Z unpretty=mir +//@ compile-flags: -Z unpretty=mir use std::path::MAIN_SEPARATOR; diff --git a/tests/ui/issues/issue-37686.rs b/tests/ui/issues/issue-37686.rs index ba58e9e9d89..5a72f2fc74c 100644 --- a/tests/ui/issues/issue-37686.rs +++ b/tests/ui/issues/issue-37686.rs @@ -1,4 +1,4 @@ -// run-pass +//@ run-pass fn main() { match (0, 0) { (usize::MIN, usize::MAX) => {} diff --git a/tests/ui/issues/issue-37725.rs b/tests/ui/issues/issue-37725.rs index 1c6df0da60c..28b4527ebb9 100644 --- a/tests/ui/issues/issue-37725.rs +++ b/tests/ui/issues/issue-37725.rs @@ -1,4 +1,4 @@ -// build-pass +//@ build-pass // compiler-opts: -Zmir-opt-level=2 #![allow(dead_code)] diff --git a/tests/ui/issues/issue-37733.rs b/tests/ui/issues/issue-37733.rs index e211e2c3336..fff42e9fc3c 100644 --- a/tests/ui/issues/issue-37733.rs +++ b/tests/ui/issues/issue-37733.rs @@ -1,4 +1,4 @@ -// build-pass +//@ build-pass #![allow(dead_code)] type A = for<> fn(); diff --git a/tests/ui/issues/issue-38160.rs b/tests/ui/issues/issue-38160.rs index 0da8b7900a8..0395aea63ee 100644 --- a/tests/ui/issues/issue-38160.rs +++ b/tests/ui/issues/issue-38160.rs @@ -1,4 +1,4 @@ -// check-pass +//@ check-pass trait MyTrait { const MY_CONST: &'static str; diff --git a/tests/ui/issues/issue-38190.rs b/tests/ui/issues/issue-38190.rs index 3bb4c7b980c..539d7f2ed3b 100644 --- a/tests/ui/issues/issue-38190.rs +++ b/tests/ui/issues/issue-38190.rs @@ -1,5 +1,5 @@ -// run-pass -// aux-build:issue-38190.rs +//@ run-pass +//@ aux-build:issue-38190.rs #[macro_use] extern crate issue_38190; diff --git a/tests/ui/issues/issue-38226.rs b/tests/ui/issues/issue-38226.rs index 3213e3618a8..d8bd9d64a7c 100644 --- a/tests/ui/issues/issue-38226.rs +++ b/tests/ui/issues/issue-38226.rs @@ -1,12 +1,12 @@ -// run-pass +//@ run-pass // This test makes sure that we don't run into a linker error because of the // middle::reachable pass missing trait methods with default impls. -// aux-build:issue-38226-aux.rs +//@ aux-build:issue-38226-aux.rs // Need -Cno-prepopulate-passes to really disable inlining, otherwise the faulty // code gets optimized out: -// compile-flags: -Cno-prepopulate-passes -Cpasses=name-anon-globals +//@ compile-flags: -Cno-prepopulate-passes -Cpasses=name-anon-globals extern crate issue_38226_aux; diff --git a/tests/ui/issues/issue-38381.rs b/tests/ui/issues/issue-38381.rs index 82d4a4e325a..a51ee78eb76 100644 --- a/tests/ui/issues/issue-38381.rs +++ b/tests/ui/issues/issue-38381.rs @@ -1,4 +1,4 @@ -// check-pass +//@ check-pass use std::ops::Deref; diff --git a/tests/ui/issues/issue-38437.rs b/tests/ui/issues/issue-38437.rs index e1412169065..2cb1a956191 100644 --- a/tests/ui/issues/issue-38437.rs +++ b/tests/ui/issues/issue-38437.rs @@ -1,4 +1,4 @@ -// run-pass +//@ run-pass #![allow(dead_code)] // Check that drop elaboration clears the "master" discriminant // drop flag even if it protects no fields. diff --git a/tests/ui/issues/issue-3847.rs b/tests/ui/issues/issue-3847.rs index 16e0b00b39a..73aaab41836 100644 --- a/tests/ui/issues/issue-3847.rs +++ b/tests/ui/issues/issue-3847.rs @@ -1,4 +1,4 @@ -// run-pass +//@ run-pass mod buildings { pub struct Tower { pub height: usize } } diff --git a/tests/ui/issues/issue-38556.rs b/tests/ui/issues/issue-38556.rs index 63fd9db08ff..b04558707e1 100644 --- a/tests/ui/issues/issue-38556.rs +++ b/tests/ui/issues/issue-38556.rs @@ -1,4 +1,4 @@ -// run-pass +//@ run-pass #![allow(dead_code)] pub struct Foo; diff --git a/tests/ui/issues/issue-38727.rs b/tests/ui/issues/issue-38727.rs index 2d418b65269..6d9c5f30e06 100644 --- a/tests/ui/issues/issue-38727.rs +++ b/tests/ui/issues/issue-38727.rs @@ -1,4 +1,4 @@ -// build-pass +//@ build-pass #![allow(dead_code)] #[repr(u64)] enum A { diff --git a/tests/ui/issues/issue-3874.rs b/tests/ui/issues/issue-3874.rs index f9553d88d24..737f2c69e1e 100644 --- a/tests/ui/issues/issue-3874.rs +++ b/tests/ui/issues/issue-3874.rs @@ -1,6 +1,6 @@ -// build-pass +//@ build-pass #![allow(dead_code)] -// pretty-expanded FIXME #23616 +//@ pretty-expanded FIXME #23616 enum PureCounter { PureCounterVariant(usize) } diff --git a/tests/ui/issues/issue-38763.rs b/tests/ui/issues/issue-38763.rs index a966cf217e1..05cd648dcfe 100644 --- a/tests/ui/issues/issue-38763.rs +++ b/tests/ui/issues/issue-38763.rs @@ -1,5 +1,5 @@ -// run-pass -// ignore-emscripten +//@ run-pass +//@ ignore-emscripten #[repr(C)] pub struct Foo(i128); diff --git a/tests/ui/issues/issue-38875/issue-38875.rs b/tests/ui/issues/issue-38875/issue-38875.rs index 124e4d6fd41..86c1d10e903 100644 --- a/tests/ui/issues/issue-38875/issue-38875.rs +++ b/tests/ui/issues/issue-38875/issue-38875.rs @@ -1,5 +1,5 @@ -// aux-build:issue-38875-b.rs -// check-pass +//@ aux-build:issue-38875-b.rs +//@ check-pass extern crate issue_38875_b; diff --git a/tests/ui/issues/issue-3888-2.rs b/tests/ui/issues/issue-3888-2.rs index d1ef914bdec..c06d20961c2 100644 --- a/tests/ui/issues/issue-3888-2.rs +++ b/tests/ui/issues/issue-3888-2.rs @@ -1,6 +1,6 @@ -// check-pass +//@ check-pass #![allow(dead_code)] -// pretty-expanded FIXME #23616 +//@ pretty-expanded FIXME #23616 fn vec_peek<'r, T>(v: &'r [T]) -> &'r [T] { &v[1..5] diff --git a/tests/ui/issues/issue-38942.rs b/tests/ui/issues/issue-38942.rs index 308bdd6e28c..3f80beb53f3 100644 --- a/tests/ui/issues/issue-38942.rs +++ b/tests/ui/issues/issue-38942.rs @@ -1,4 +1,4 @@ -// run-pass +//@ run-pass // See https://github.com/rust-lang/rust/issues/38942 #[repr(u64)] diff --git a/tests/ui/issues/issue-3895.rs b/tests/ui/issues/issue-3895.rs index c560ca60dd3..6bd173d4878 100644 --- a/tests/ui/issues/issue-3895.rs +++ b/tests/ui/issues/issue-3895.rs @@ -1,4 +1,4 @@ -// run-pass +//@ run-pass #![allow(dead_code)] pub fn main() { diff --git a/tests/ui/issues/issue-38987.rs b/tests/ui/issues/issue-38987.rs index cb4e1b0d409..713fd502791 100644 --- a/tests/ui/issues/issue-38987.rs +++ b/tests/ui/issues/issue-38987.rs @@ -1,4 +1,4 @@ -// run-pass +//@ run-pass fn main() { let _ = -0x8000_0000_0000_0000_0000_0000_0000_0000i128; } diff --git a/tests/ui/issues/issue-39089.rs b/tests/ui/issues/issue-39089.rs index c7d4f8bd320..b00b8423802 100644 --- a/tests/ui/issues/issue-39089.rs +++ b/tests/ui/issues/issue-39089.rs @@ -1,4 +1,4 @@ -// check-pass +//@ check-pass #![allow(dead_code)] fn f Sized>() {} diff --git a/tests/ui/issues/issue-39175.rs b/tests/ui/issues/issue-39175.rs index 3866e0651c3..ddba8052b5e 100644 --- a/tests/ui/issues/issue-39175.rs +++ b/tests/ui/issues/issue-39175.rs @@ -3,9 +3,9 @@ // the fix to suggested paths is not platform-dependent and will apply on // these platforms also. -// ignore-windows -// ignore-emscripten -// ignore-sgx no processes +//@ ignore-windows +//@ ignore-emscripten +//@ ignore-sgx no processes use std::process::Command; // use std::os::unix::process::CommandExt; diff --git a/tests/ui/issues/issue-39367.rs b/tests/ui/issues/issue-39367.rs index 039b47ae780..dd16d4da1bd 100644 --- a/tests/ui/issues/issue-39367.rs +++ b/tests/ui/issues/issue-39367.rs @@ -1,4 +1,4 @@ -// run-pass +//@ run-pass use std::ops::Deref; diff --git a/tests/ui/issues/issue-39548.rs b/tests/ui/issues/issue-39548.rs index 304e37bf3d6..e46114154f9 100644 --- a/tests/ui/issues/issue-39548.rs +++ b/tests/ui/issues/issue-39548.rs @@ -1,4 +1,4 @@ -// run-pass +//@ run-pass type Array = [(); ((1 < 2) == false) as usize]; fn main() { diff --git a/tests/ui/issues/issue-39709.rs b/tests/ui/issues/issue-39709.rs index 69ef2700ef3..df3286721f5 100644 --- a/tests/ui/issues/issue-39709.rs +++ b/tests/ui/issues/issue-39709.rs @@ -1,4 +1,4 @@ -// run-pass +//@ run-pass #![allow(unused_macros)] fn main() { println!("{}", { macro_rules! x { ($(t:tt)*) => {} } 33 }); diff --git a/tests/ui/issues/issue-3979-2.rs b/tests/ui/issues/issue-3979-2.rs index 4ec128a4586..620090bc3ec 100644 --- a/tests/ui/issues/issue-3979-2.rs +++ b/tests/ui/issues/issue-3979-2.rs @@ -1,5 +1,5 @@ -// check-pass -// pretty-expanded FIXME #23616 +//@ check-pass +//@ pretty-expanded FIXME #23616 trait A { fn a_method(&self); diff --git a/tests/ui/issues/issue-3979-generics.rs b/tests/ui/issues/issue-3979-generics.rs index 519de1cad6e..12f6137dd2a 100644 --- a/tests/ui/issues/issue-3979-generics.rs +++ b/tests/ui/issues/issue-3979-generics.rs @@ -1,4 +1,4 @@ -// run-pass +//@ run-pass #![allow(dead_code)] #![allow(non_snake_case)] diff --git a/tests/ui/issues/issue-3979-xcrate.rs b/tests/ui/issues/issue-3979-xcrate.rs index fcb1f55c32f..7660405929b 100644 --- a/tests/ui/issues/issue-3979-xcrate.rs +++ b/tests/ui/issues/issue-3979-xcrate.rs @@ -1,6 +1,6 @@ -// run-pass +//@ run-pass #![allow(dead_code)] -// aux-build:issue-3979-traits.rs +//@ aux-build:issue-3979-traits.rs extern crate issue_3979_traits; use issue_3979_traits::{Positioned, Movable}; diff --git a/tests/ui/issues/issue-3979.rs b/tests/ui/issues/issue-3979.rs index 72949d8c757..238df225f0f 100644 --- a/tests/ui/issues/issue-3979.rs +++ b/tests/ui/issues/issue-3979.rs @@ -1,4 +1,4 @@ -// run-pass +//@ run-pass #![allow(dead_code)] #![allow(non_snake_case)] diff --git a/tests/ui/issues/issue-39808.rs b/tests/ui/issues/issue-39808.rs index a4701367373..99e3d9b4bcd 100644 --- a/tests/ui/issues/issue-39808.rs +++ b/tests/ui/issues/issue-39808.rs @@ -1,4 +1,4 @@ -// run-pass +//@ run-pass #![allow(unreachable_code)] // Regression test for #39808. The type parameter of `Owned` was diff --git a/tests/ui/issues/issue-39827.rs b/tests/ui/issues/issue-39827.rs index 782c668c843..e3248c9e9ac 100644 --- a/tests/ui/issues/issue-39827.rs +++ b/tests/ui/issues/issue-39827.rs @@ -1,4 +1,4 @@ -// run-pass +//@ run-pass #![feature(core_intrinsics)] use std::intrinsics::{ volatile_copy_memory, volatile_store, volatile_load, diff --git a/tests/ui/issues/issue-3991.rs b/tests/ui/issues/issue-3991.rs index 4851eddf533..97bddb9250a 100644 --- a/tests/ui/issues/issue-3991.rs +++ b/tests/ui/issues/issue-3991.rs @@ -1,7 +1,7 @@ -// check-pass +//@ check-pass #![allow(dead_code)] -// pretty-expanded FIXME #23616 +//@ pretty-expanded FIXME #23616 struct HasNested { nest: Vec > , diff --git a/tests/ui/issues/issue-39984.rs b/tests/ui/issues/issue-39984.rs index 1c9ae26cab2..eff5d69bf84 100644 --- a/tests/ui/issues/issue-39984.rs +++ b/tests/ui/issues/issue-39984.rs @@ -1,4 +1,4 @@ -// check-pass +//@ check-pass #![allow(dead_code)] #![allow(unreachable_code)] // Regression test for issue #39984. diff --git a/tests/ui/issues/issue-40136.rs b/tests/ui/issues/issue-40136.rs index 29d3fc2d560..d5ccebdc85d 100644 --- a/tests/ui/issues/issue-40136.rs +++ b/tests/ui/issues/issue-40136.rs @@ -1,4 +1,4 @@ -// check-pass +//@ check-pass #![allow(dead_code)] macro_rules! m { () => { 0 } } diff --git a/tests/ui/issues/issue-40235.rs b/tests/ui/issues/issue-40235.rs index 0f799c3503f..2bdbb2f229e 100644 --- a/tests/ui/issues/issue-40235.rs +++ b/tests/ui/issues/issue-40235.rs @@ -1,4 +1,4 @@ -// run-pass +//@ run-pass #![allow(unused_variables)] fn foo() {} diff --git a/tests/ui/issues/issue-4025.rs b/tests/ui/issues/issue-4025.rs index dc534c64c60..c75421fb82f 100644 --- a/tests/ui/issues/issue-4025.rs +++ b/tests/ui/issues/issue-4025.rs @@ -1,4 +1,4 @@ -// check-pass +//@ check-pass #![allow(dead_code)] #![allow(unused_mut)] /* diff --git a/tests/ui/issues/issue-40350.rs b/tests/ui/issues/issue-40350.rs index a39a8519aa9..50d74f27b63 100644 --- a/tests/ui/issues/issue-40350.rs +++ b/tests/ui/issues/issue-40350.rs @@ -1,4 +1,4 @@ -// check-pass +//@ check-pass enum E { A = { diff --git a/tests/ui/issues/issue-40408.rs b/tests/ui/issues/issue-40408.rs index 81acc41cb83..a1c1c582181 100644 --- a/tests/ui/issues/issue-40408.rs +++ b/tests/ui/issues/issue-40408.rs @@ -1,4 +1,4 @@ -// run-pass +//@ run-pass fn main() { println!("{}", 0E+10); println!("{}", 0e+10); diff --git a/tests/ui/issues/issue-40510-captured-variable-return/issue-40510-2.rs b/tests/ui/issues/issue-40510-captured-variable-return/issue-40510-2.rs index 3ae84be0578..9ce54862265 100644 --- a/tests/ui/issues/issue-40510-captured-variable-return/issue-40510-2.rs +++ b/tests/ui/issues/issue-40510-captured-variable-return/issue-40510-2.rs @@ -1,4 +1,4 @@ -// check-pass +//@ check-pass #![allow(unused)] fn f() { diff --git a/tests/ui/issues/issue-40510-captured-variable-return/issue-40510-4.rs b/tests/ui/issues/issue-40510-captured-variable-return/issue-40510-4.rs index 48bb8d36f55..771502894f1 100644 --- a/tests/ui/issues/issue-40510-captured-variable-return/issue-40510-4.rs +++ b/tests/ui/issues/issue-40510-captured-variable-return/issue-40510-4.rs @@ -1,4 +1,4 @@ -// check-pass +//@ check-pass #![allow(unused)] fn f() { diff --git a/tests/ui/issues/issue-40782.fixed b/tests/ui/issues/issue-40782.fixed index 305a9c3292a..ff376b5a52c 100644 --- a/tests/ui/issues/issue-40782.fixed +++ b/tests/ui/issues/issue-40782.fixed @@ -1,4 +1,4 @@ -// run-rustfix +//@ run-rustfix fn main() { for _i in 0..2 { //~ ERROR missing `in` diff --git a/tests/ui/issues/issue-40782.rs b/tests/ui/issues/issue-40782.rs index 43460ec1535..28c12aec665 100644 --- a/tests/ui/issues/issue-40782.rs +++ b/tests/ui/issues/issue-40782.rs @@ -1,4 +1,4 @@ -// run-rustfix +//@ run-rustfix fn main() { for _i 0..2 { //~ ERROR missing `in` diff --git a/tests/ui/issues/issue-40883.rs b/tests/ui/issues/issue-40883.rs index 8a4aef46dd5..a4646d67c68 100644 --- a/tests/ui/issues/issue-40883.rs +++ b/tests/ui/issues/issue-40883.rs @@ -1,4 +1,4 @@ -// run-pass +//@ run-pass #![allow(dead_code)] // check that we don't have linear stack usage with multiple calls to `push` diff --git a/tests/ui/issues/issue-40951.rs b/tests/ui/issues/issue-40951.rs index 49171eba6b3..e99fe76c085 100644 --- a/tests/ui/issues/issue-40951.rs +++ b/tests/ui/issues/issue-40951.rs @@ -1,4 +1,4 @@ -// run-pass +//@ run-pass #![allow(unused_variables)] // Regression test for #40951. diff --git a/tests/ui/issues/issue-41053.rs b/tests/ui/issues/issue-41053.rs index 967edfd4415..f46bf6b4aa1 100644 --- a/tests/ui/issues/issue-41053.rs +++ b/tests/ui/issues/issue-41053.rs @@ -1,5 +1,5 @@ -// run-pass -// aux-build:issue-41053.rs +//@ run-pass +//@ aux-build:issue-41053.rs pub trait Trait { fn foo(&self) {} } diff --git a/tests/ui/issues/issue-41213.rs b/tests/ui/issues/issue-41213.rs index 5c91bf71102..97f80a99a83 100644 --- a/tests/ui/issues/issue-41213.rs +++ b/tests/ui/issues/issue-41213.rs @@ -1,4 +1,4 @@ -// run-pass +//@ run-pass #![allow(dead_code)] enum A { A1, diff --git a/tests/ui/issues/issue-41272.rs b/tests/ui/issues/issue-41272.rs index 1f4da46f894..255bbfe90a1 100644 --- a/tests/ui/issues/issue-41272.rs +++ b/tests/ui/issues/issue-41272.rs @@ -1,4 +1,4 @@ -// check-pass +//@ check-pass #![allow(dead_code)] struct Foo; diff --git a/tests/ui/issues/issue-41298.rs b/tests/ui/issues/issue-41298.rs index a1b4de39bee..60081107123 100644 --- a/tests/ui/issues/issue-41298.rs +++ b/tests/ui/issues/issue-41298.rs @@ -1,4 +1,4 @@ -// check-pass +//@ check-pass #![allow(dead_code)] struct Function { t: T, f: F } diff --git a/tests/ui/issues/issue-41479.rs b/tests/ui/issues/issue-41479.rs index 6daaf440e4b..c8ebad6c5e0 100644 --- a/tests/ui/issues/issue-41479.rs +++ b/tests/ui/issues/issue-41479.rs @@ -1,4 +1,4 @@ -// run-pass +//@ run-pass fn split(pair: (A, B)) { let _a = pair.0; let _b = pair.1; diff --git a/tests/ui/issues/issue-41498.rs b/tests/ui/issues/issue-41498.rs index ad918ecddeb..57f36b27d3c 100644 --- a/tests/ui/issues/issue-41498.rs +++ b/tests/ui/issues/issue-41498.rs @@ -1,4 +1,4 @@ -// run-pass +//@ run-pass // regression test for issue #41498. struct S; diff --git a/tests/ui/issues/issue-41549.rs b/tests/ui/issues/issue-41549.rs index d19926a541a..8f57515415c 100644 --- a/tests/ui/issues/issue-41549.rs +++ b/tests/ui/issues/issue-41549.rs @@ -1,4 +1,4 @@ -// aux-build:issue-41549.rs +//@ aux-build:issue-41549.rs extern crate issue_41549; diff --git a/tests/ui/issues/issue-41604.rs b/tests/ui/issues/issue-41604.rs index 11a1cc25b71..3cd16a2a598 100644 --- a/tests/ui/issues/issue-41604.rs +++ b/tests/ui/issues/issue-41604.rs @@ -1,4 +1,4 @@ -// run-pass +//@ run-pass struct B; impl B { diff --git a/tests/ui/issues/issue-41628.rs b/tests/ui/issues/issue-41628.rs index 92159824eb0..255e4243e01 100644 --- a/tests/ui/issues/issue-41628.rs +++ b/tests/ui/issues/issue-41628.rs @@ -1,4 +1,4 @@ -// check-pass +//@ check-pass #![deny(dead_code)] #[used] diff --git a/tests/ui/issues/issue-41652/issue-41652.rs b/tests/ui/issues/issue-41652/issue-41652.rs index d8a6f4c8d9d..34518d906a6 100644 --- a/tests/ui/issues/issue-41652/issue-41652.rs +++ b/tests/ui/issues/issue-41652/issue-41652.rs @@ -1,4 +1,4 @@ -// aux-build:issue-41652-b.rs +//@ aux-build:issue-41652-b.rs extern crate issue_41652_b; diff --git a/tests/ui/issues/issue-41677.rs b/tests/ui/issues/issue-41677.rs index afddbc799b7..211d1176363 100644 --- a/tests/ui/issues/issue-41677.rs +++ b/tests/ui/issues/issue-41677.rs @@ -1,4 +1,4 @@ -// run-pass +//@ run-pass // Regression test for #41677. The local variable was winding up with // a type `Receiver` where `?T` was unconstrained, because we // failed to enforce the WF obligations and `?T` is a bivariant type diff --git a/tests/ui/issues/issue-41696.rs b/tests/ui/issues/issue-41696.rs index d094f71942f..0b01efe7a7b 100644 --- a/tests/ui/issues/issue-41696.rs +++ b/tests/ui/issues/issue-41696.rs @@ -1,4 +1,4 @@ -// run-pass +//@ run-pass #![allow(dead_code)] #![allow(unused_variables)] #![recursion_limit = "128"] diff --git a/tests/ui/issues/issue-41744.rs b/tests/ui/issues/issue-41744.rs index dcdd1c21ee5..af360d95807 100644 --- a/tests/ui/issues/issue-41744.rs +++ b/tests/ui/issues/issue-41744.rs @@ -1,4 +1,4 @@ -// run-pass +//@ run-pass trait Tc {} impl Tc for bool {} diff --git a/tests/ui/issues/issue-41849-variance-req.rs b/tests/ui/issues/issue-41849-variance-req.rs index af081083a35..1da844ab4bf 100644 --- a/tests/ui/issues/issue-41849-variance-req.rs +++ b/tests/ui/issues/issue-41849-variance-req.rs @@ -1,4 +1,4 @@ -// run-pass +//@ run-pass #![allow(dead_code)] // Regression test for #41849. diff --git a/tests/ui/issues/issue-41888.rs b/tests/ui/issues/issue-41888.rs index 32df520f279..12d617bafc3 100644 --- a/tests/ui/issues/issue-41888.rs +++ b/tests/ui/issues/issue-41888.rs @@ -1,4 +1,4 @@ -// run-pass +//@ run-pass fn main() { let _ = g(Some(E::F(K))); } type R = Result<(), ()>; diff --git a/tests/ui/issues/issue-41936-variance-coerce-unsized-cycle.rs b/tests/ui/issues/issue-41936-variance-coerce-unsized-cycle.rs index 3d678ba041b..2a2b8841095 100644 --- a/tests/ui/issues/issue-41936-variance-coerce-unsized-cycle.rs +++ b/tests/ui/issues/issue-41936-variance-coerce-unsized-cycle.rs @@ -1,4 +1,4 @@ -// check-pass +//@ check-pass #![allow(dead_code)] // Regression test for #41936. The coerce-unsized trait check in // coherence was using subtyping, which triggered variance diff --git a/tests/ui/issues/issue-41998.rs b/tests/ui/issues/issue-41998.rs index 7696a3108d1..303bf7a5751 100644 --- a/tests/ui/issues/issue-41998.rs +++ b/tests/ui/issues/issue-41998.rs @@ -1,4 +1,4 @@ -// check-pass +//@ check-pass fn main() { diff --git a/tests/ui/issues/issue-42007.rs b/tests/ui/issues/issue-42007.rs index a477e476eb9..b8ea7e871a7 100644 --- a/tests/ui/issues/issue-42007.rs +++ b/tests/ui/issues/issue-42007.rs @@ -1,6 +1,6 @@ -// run-pass +//@ run-pass #![allow(dead_code)] -// aux-build:issue-42007-s.rs +//@ aux-build:issue-42007-s.rs extern crate issue_42007_s; diff --git a/tests/ui/issues/issue-4208.rs b/tests/ui/issues/issue-4208.rs index 3b01811a9e8..1691bec980b 100644 --- a/tests/ui/issues/issue-4208.rs +++ b/tests/ui/issues/issue-4208.rs @@ -1,8 +1,8 @@ -// run-pass +//@ run-pass #![allow(dead_code)] -// aux-build:issue-4208-cc.rs +//@ aux-build:issue-4208-cc.rs -// pretty-expanded FIXME #23616 +//@ pretty-expanded FIXME #23616 extern crate numeric; use numeric::{sin, Angle}; diff --git a/tests/ui/issues/issue-42148.rs b/tests/ui/issues/issue-42148.rs index cb8c0d6edb6..f2c4e484e5b 100644 --- a/tests/ui/issues/issue-42148.rs +++ b/tests/ui/issues/issue-42148.rs @@ -1,4 +1,4 @@ -// run-pass +//@ run-pass struct Zst; fn main() { diff --git a/tests/ui/issues/issue-42210.rs b/tests/ui/issues/issue-42210.rs index 318e3099f98..cec32c97375 100644 --- a/tests/ui/issues/issue-42210.rs +++ b/tests/ui/issues/issue-42210.rs @@ -1,7 +1,7 @@ -// run-pass +//@ run-pass // Regression test for #42210. -// compile-flags: -g +//@ compile-flags: -g trait Foo { fn foo() { } diff --git a/tests/ui/issues/issue-4228.rs b/tests/ui/issues/issue-4228.rs index 491000b6510..8ae8a84dac9 100644 --- a/tests/ui/issues/issue-4228.rs +++ b/tests/ui/issues/issue-4228.rs @@ -1,5 +1,5 @@ -// run-pass -// pretty-expanded FIXME #23616 +//@ run-pass +//@ pretty-expanded FIXME #23616 struct Foo; diff --git a/tests/ui/issues/issue-42453.rs b/tests/ui/issues/issue-42453.rs index 92fefceabc1..9ed9080e8a9 100644 --- a/tests/ui/issues/issue-42453.rs +++ b/tests/ui/issues/issue-42453.rs @@ -1,4 +1,4 @@ -// run-pass +//@ run-pass #![allow(dead_code)] #![allow(non_camel_case_types)] diff --git a/tests/ui/issues/issue-42467.rs b/tests/ui/issues/issue-42467.rs index afa1bcd13fc..6e0f294d802 100644 --- a/tests/ui/issues/issue-42467.rs +++ b/tests/ui/issues/issue-42467.rs @@ -1,4 +1,4 @@ -// check-pass +//@ check-pass #![allow(dead_code)] struct Foo(T); diff --git a/tests/ui/issues/issue-4252.rs b/tests/ui/issues/issue-4252.rs index 9b82121baa2..1939ad15f14 100644 --- a/tests/ui/issues/issue-4252.rs +++ b/tests/ui/issues/issue-4252.rs @@ -1,4 +1,4 @@ -// run-pass +//@ run-pass trait X { fn call(&self, x: &T); fn default_method(&self, x: &T) { diff --git a/tests/ui/issues/issue-42552.rs b/tests/ui/issues/issue-42552.rs index 50d28a2f0c6..998cde44be0 100644 --- a/tests/ui/issues/issue-42552.rs +++ b/tests/ui/issues/issue-42552.rs @@ -1,4 +1,4 @@ -// run-pass +//@ run-pass // Regression test for an obscure issue with the projection cache. fn into_iter(a: &I) -> Groups { diff --git a/tests/ui/issues/issue-42956.rs b/tests/ui/issues/issue-42956.rs index e6b3f9ffab7..a124ca84f3c 100644 --- a/tests/ui/issues/issue-42956.rs +++ b/tests/ui/issues/issue-42956.rs @@ -1,4 +1,4 @@ -// check-pass +//@ check-pass #![allow(dead_code)] #![allow(stable_features)] #![feature(associated_consts)] diff --git a/tests/ui/issues/issue-43057.rs b/tests/ui/issues/issue-43057.rs index 4ce52af434c..4dd1fe461f1 100644 --- a/tests/ui/issues/issue-43057.rs +++ b/tests/ui/issues/issue-43057.rs @@ -1,4 +1,4 @@ -// check-pass +//@ check-pass #![allow(unused)] macro_rules! column { diff --git a/tests/ui/issues/issue-43205.rs b/tests/ui/issues/issue-43205.rs index f47d5a347bb..9f54d4258bf 100644 --- a/tests/ui/issues/issue-43205.rs +++ b/tests/ui/issues/issue-43205.rs @@ -1,4 +1,4 @@ -// run-pass +//@ run-pass fn main() { let _ = &&[()][0]; println!("{:?}", &[(),()][1]); diff --git a/tests/ui/issues/issue-43291.rs b/tests/ui/issues/issue-43291.rs index 52b629e35c8..e3fea3c9426 100644 --- a/tests/ui/issues/issue-43291.rs +++ b/tests/ui/issues/issue-43291.rs @@ -1,4 +1,4 @@ -// run-pass +//@ run-pass pub fn main() { assert_eq!(!0usize as *const (), foo(0, 1)); assert_eq!(!0usize as *const (), (0i8 - 1) as *const ()); diff --git a/tests/ui/issues/issue-4333.rs b/tests/ui/issues/issue-4333.rs index 3df319b683f..9b45e1665be 100644 --- a/tests/ui/issues/issue-4333.rs +++ b/tests/ui/issues/issue-4333.rs @@ -1,6 +1,6 @@ -// run-pass +//@ run-pass #![allow(unused_must_use)] -// pretty-expanded FIXME #23616 +//@ pretty-expanded FIXME #23616 use std::io; diff --git a/tests/ui/issues/issue-43357.rs b/tests/ui/issues/issue-43357.rs index 474c9765595..fd20bac8040 100644 --- a/tests/ui/issues/issue-43357.rs +++ b/tests/ui/issues/issue-43357.rs @@ -1,4 +1,4 @@ -// check-pass +//@ check-pass #![allow(dead_code)] trait Trait { type Output; diff --git a/tests/ui/issues/issue-43483.rs b/tests/ui/issues/issue-43483.rs index 76dd1c2eb58..2c62671d0c7 100644 --- a/tests/ui/issues/issue-43483.rs +++ b/tests/ui/issues/issue-43483.rs @@ -1,4 +1,4 @@ -// check-pass +//@ check-pass #![allow(dead_code)] #![allow(unused_variables)] trait VecN { diff --git a/tests/ui/issues/issue-43692.rs b/tests/ui/issues/issue-43692.rs index a9999c22651..abd1f56d422 100644 --- a/tests/ui/issues/issue-43692.rs +++ b/tests/ui/issues/issue-43692.rs @@ -1,4 +1,4 @@ -// run-pass +//@ run-pass fn main() { assert_eq!('\u{10__FFFF}', '\u{10FFFF}'); assert_eq!("\u{10_F0FF__}foo\u{1_0_0_0__}", "\u{10F0FF}foo\u{1000}"); diff --git a/tests/ui/issues/issue-43806.rs b/tests/ui/issues/issue-43806.rs index 8c8cccfb2bb..7d90715bcc3 100644 --- a/tests/ui/issues/issue-43806.rs +++ b/tests/ui/issues/issue-43806.rs @@ -1,4 +1,4 @@ -// check-pass +//@ check-pass #![deny(unused_results)] diff --git a/tests/ui/issues/issue-43853.rs b/tests/ui/issues/issue-43853.rs index dd42c1e3cb8..ed07314531c 100644 --- a/tests/ui/issues/issue-43853.rs +++ b/tests/ui/issues/issue-43853.rs @@ -1,5 +1,5 @@ -// run-pass -// needs-unwind +//@ run-pass +//@ needs-unwind use std::panic; diff --git a/tests/ui/issues/issue-4387.rs b/tests/ui/issues/issue-4387.rs index 84592f16a4c..1299c4fcc3a 100644 --- a/tests/ui/issues/issue-4387.rs +++ b/tests/ui/issues/issue-4387.rs @@ -1,5 +1,5 @@ -// run-pass -// pretty-expanded FIXME #23616 +//@ run-pass +//@ pretty-expanded FIXME #23616 pub fn main() { let _foo = [0; 2*4]; diff --git a/tests/ui/issues/issue-43910.rs b/tests/ui/issues/issue-43910.rs index d8c87732930..041147dc49d 100644 --- a/tests/ui/issues/issue-43910.rs +++ b/tests/ui/issues/issue-43910.rs @@ -1,4 +1,4 @@ -// run-pass +//@ run-pass #![deny(unused_variables)] fn main() { diff --git a/tests/ui/issues/issue-43923.rs b/tests/ui/issues/issue-43923.rs index ad35a668554..4cd46b6ca60 100644 --- a/tests/ui/issues/issue-43923.rs +++ b/tests/ui/issues/issue-43923.rs @@ -1,4 +1,4 @@ -// run-pass +//@ run-pass #![allow(dead_code)] #![allow(unused_variables)] struct A { ptr: T } diff --git a/tests/ui/issues/issue-44056.rs b/tests/ui/issues/issue-44056.rs index a4903ed2cb4..12e4f018466 100644 --- a/tests/ui/issues/issue-44056.rs +++ b/tests/ui/issues/issue-44056.rs @@ -1,6 +1,6 @@ -// build-pass (FIXME(55996): should be run on targets supporting avx) -// only-x86_64 -// no-prefer-dynamic -// compile-flags: -Ctarget-feature=+avx -Clto +//@ build-pass (FIXME(55996): should be run on targets supporting avx) +//@ only-x86_64 +//@ no-prefer-dynamic +//@ compile-flags: -Ctarget-feature=+avx -Clto fn main() {} diff --git a/tests/ui/issues/issue-44216-add-instant.rs b/tests/ui/issues/issue-44216-add-instant.rs index 78cfecf2f32..1db0adedcf5 100644 --- a/tests/ui/issues/issue-44216-add-instant.rs +++ b/tests/ui/issues/issue-44216-add-instant.rs @@ -1,6 +1,6 @@ -// run-fail -// error-pattern:overflow -// ignore-emscripten no processes +//@ run-fail +//@ error-pattern:overflow +//@ ignore-emscripten no processes use std::time::{Instant, Duration}; diff --git a/tests/ui/issues/issue-44216-add-system-time.rs b/tests/ui/issues/issue-44216-add-system-time.rs index 7e9a3f802ec..207f72fade8 100644 --- a/tests/ui/issues/issue-44216-add-system-time.rs +++ b/tests/ui/issues/issue-44216-add-system-time.rs @@ -1,6 +1,6 @@ -// run-fail -// error-pattern:overflow -// ignore-emscripten no processes +//@ run-fail +//@ error-pattern:overflow +//@ ignore-emscripten no processes use std::time::{Duration, SystemTime}; diff --git a/tests/ui/issues/issue-44216-sub-instant.rs b/tests/ui/issues/issue-44216-sub-instant.rs index e40f80d449d..2457d2aaa04 100644 --- a/tests/ui/issues/issue-44216-sub-instant.rs +++ b/tests/ui/issues/issue-44216-sub-instant.rs @@ -1,6 +1,6 @@ -// run-fail -// error-pattern:overflow -// ignore-emscripten no processes +//@ run-fail +//@ error-pattern:overflow +//@ ignore-emscripten no processes use std::time::{Instant, Duration}; diff --git a/tests/ui/issues/issue-44216-sub-system-time.rs b/tests/ui/issues/issue-44216-sub-system-time.rs index 2c5a000fab6..7e33f227933 100644 --- a/tests/ui/issues/issue-44216-sub-system-time.rs +++ b/tests/ui/issues/issue-44216-sub-system-time.rs @@ -1,6 +1,6 @@ -// run-fail -// error-pattern:overflow -// ignore-emscripten no processes +//@ run-fail +//@ error-pattern:overflow +//@ ignore-emscripten no processes use std::time::{Duration, SystemTime}; diff --git a/tests/ui/issues/issue-44239.fixed b/tests/ui/issues/issue-44239.fixed index e6c29cee97d..5466726fc9d 100644 --- a/tests/ui/issues/issue-44239.fixed +++ b/tests/ui/issues/issue-44239.fixed @@ -1,4 +1,4 @@ -// run-rustfix +//@ run-rustfix #![allow(dead_code, non_upper_case_globals)] fn main() { const n: usize = 0; diff --git a/tests/ui/issues/issue-44239.rs b/tests/ui/issues/issue-44239.rs index 482ed194c7a..b07c3f6dbef 100644 --- a/tests/ui/issues/issue-44239.rs +++ b/tests/ui/issues/issue-44239.rs @@ -1,4 +1,4 @@ -// run-rustfix +//@ run-rustfix #![allow(dead_code, non_upper_case_globals)] fn main() { let n: usize = 0; diff --git a/tests/ui/issues/issue-44247.rs b/tests/ui/issues/issue-44247.rs index 3544880fade..1ddd5a6dc0b 100644 --- a/tests/ui/issues/issue-44247.rs +++ b/tests/ui/issues/issue-44247.rs @@ -1,4 +1,4 @@ -// check-pass +//@ check-pass #![allow(dead_code)] trait T { type X; diff --git a/tests/ui/issues/issue-4464.rs b/tests/ui/issues/issue-4464.rs index 7ac107150a0..a2d6ed718c2 100644 --- a/tests/ui/issues/issue-4464.rs +++ b/tests/ui/issues/issue-4464.rs @@ -1,6 +1,6 @@ -// check-pass +//@ check-pass #![allow(dead_code)] -// pretty-expanded FIXME #23616 +//@ pretty-expanded FIXME #23616 fn broken(v: &[u8], i: usize, j: usize) -> &[u8] { &v[i..j] } diff --git a/tests/ui/issues/issue-44730.rs b/tests/ui/issues/issue-44730.rs index 0493811b279..0c2af7e9f2f 100644 --- a/tests/ui/issues/issue-44730.rs +++ b/tests/ui/issues/issue-44730.rs @@ -1,4 +1,4 @@ -// check-pass +//@ check-pass //! dox #![deny(missing_docs)] diff --git a/tests/ui/issues/issue-44851.rs b/tests/ui/issues/issue-44851.rs index 23daaeb0f00..d5fe4f6746d 100644 --- a/tests/ui/issues/issue-44851.rs +++ b/tests/ui/issues/issue-44851.rs @@ -1,4 +1,4 @@ -// check-pass +//@ check-pass macro_rules! a { () => { "a" } } diff --git a/tests/ui/issues/issue-4541.rs b/tests/ui/issues/issue-4541.rs index e7f26d02151..cf6208478c4 100644 --- a/tests/ui/issues/issue-4541.rs +++ b/tests/ui/issues/issue-4541.rs @@ -1,4 +1,4 @@ -// run-pass +//@ run-pass fn parse_args() -> String { let args: Vec<_> = ::std::env::args().collect(); diff --git a/tests/ui/issues/issue-4542.rs b/tests/ui/issues/issue-4542.rs index 2386561c39d..bd63246fa33 100644 --- a/tests/ui/issues/issue-4542.rs +++ b/tests/ui/issues/issue-4542.rs @@ -1,5 +1,5 @@ -// run-pass -// pretty-expanded FIXME #23616 +//@ run-pass +//@ pretty-expanded FIXME #23616 use std::env; diff --git a/tests/ui/issues/issue-45425.rs b/tests/ui/issues/issue-45425.rs index 10ce374eada..fad8284caf5 100644 --- a/tests/ui/issues/issue-45425.rs +++ b/tests/ui/issues/issue-45425.rs @@ -1,4 +1,4 @@ -// check-pass +//@ check-pass #![allow(dead_code)] use std::ops::Add; diff --git a/tests/ui/issues/issue-4545.rs b/tests/ui/issues/issue-4545.rs index 86fcf9af21f..6a2f04e4511 100644 --- a/tests/ui/issues/issue-4545.rs +++ b/tests/ui/issues/issue-4545.rs @@ -1,7 +1,7 @@ -// run-pass -// aux-build:issue-4545.rs +//@ run-pass +//@ aux-build:issue-4545.rs -// pretty-expanded FIXME #23616 +//@ pretty-expanded FIXME #23616 extern crate issue_4545 as somelib; pub fn main() { somelib::mk::(); } diff --git a/tests/ui/issues/issue-45510.rs b/tests/ui/issues/issue-45510.rs index 9e104ce6c4f..d73218a3859 100644 --- a/tests/ui/issues/issue-45510.rs +++ b/tests/ui/issues/issue-45510.rs @@ -1,5 +1,5 @@ // Test overloaded resolution of fn_traits. -// run-pass +//@ run-pass #![feature(fn_traits)] #![feature(unboxed_closures)] diff --git a/tests/ui/issues/issue-45562.fixed b/tests/ui/issues/issue-45562.fixed index ac700fbd046..8dcdd3a541c 100644 --- a/tests/ui/issues/issue-45562.fixed +++ b/tests/ui/issues/issue-45562.fixed @@ -1,4 +1,4 @@ -// run-rustfix +//@ run-rustfix #[no_mangle] pub static RAH: usize = 5; //~^ ERROR const items should never be `#[no_mangle]` diff --git a/tests/ui/issues/issue-45562.rs b/tests/ui/issues/issue-45562.rs index eabb5a5cecf..08f6c8046dc 100644 --- a/tests/ui/issues/issue-45562.rs +++ b/tests/ui/issues/issue-45562.rs @@ -1,4 +1,4 @@ -// run-rustfix +//@ run-rustfix #[no_mangle] pub const RAH: usize = 5; //~^ ERROR const items should never be `#[no_mangle]` diff --git a/tests/ui/issues/issue-45697-1.rs b/tests/ui/issues/issue-45697-1.rs index b45f1170b86..53e55599689 100644 --- a/tests/ui/issues/issue-45697-1.rs +++ b/tests/ui/issues/issue-45697-1.rs @@ -1,7 +1,7 @@ // Test that assignments to an `&mut` pointer which is found in a // borrowed (but otherwise non-aliasable) location is illegal. -// compile-flags: -C overflow-checks=on +//@ compile-flags: -C overflow-checks=on struct S<'a> { pointer: &'a mut isize diff --git a/tests/ui/issues/issue-45697.rs b/tests/ui/issues/issue-45697.rs index db6d1d8fa2a..65392407768 100644 --- a/tests/ui/issues/issue-45697.rs +++ b/tests/ui/issues/issue-45697.rs @@ -1,7 +1,7 @@ // Test that assignments to an `&mut` pointer which is found in a // borrowed (but otherwise non-aliasable) location is illegal. -// compile-flags: -C overflow-checks=off +//@ compile-flags: -C overflow-checks=off struct S<'a> { pointer: &'a mut isize diff --git a/tests/ui/issues/issue-45731.rs b/tests/ui/issues/issue-45731.rs index d20c07276a8..8e483d08cb5 100644 --- a/tests/ui/issues/issue-45731.rs +++ b/tests/ui/issues/issue-45731.rs @@ -1,6 +1,6 @@ -// run-pass +//@ run-pass #![allow(unused_variables)] -// compile-flags:--test -g +//@ compile-flags:--test -g #[cfg(target_os = "macos")] #[test] diff --git a/tests/ui/issues/issue-46069.rs b/tests/ui/issues/issue-46069.rs index f80ea932001..adfb567d7dd 100644 --- a/tests/ui/issues/issue-46069.rs +++ b/tests/ui/issues/issue-46069.rs @@ -1,4 +1,4 @@ -// run-pass +//@ run-pass use std::iter::{Fuse, Cloned}; use std::slice::Iter; diff --git a/tests/ui/issues/issue-46756-consider-borrowing-cast-or-binexpr.fixed b/tests/ui/issues/issue-46756-consider-borrowing-cast-or-binexpr.fixed index 8668d8acd5b..d8402cdf07e 100644 --- a/tests/ui/issues/issue-46756-consider-borrowing-cast-or-binexpr.fixed +++ b/tests/ui/issues/issue-46756-consider-borrowing-cast-or-binexpr.fixed @@ -1,4 +1,4 @@ -// run-rustfix +//@ run-rustfix #![allow(unused)] diff --git a/tests/ui/issues/issue-46756-consider-borrowing-cast-or-binexpr.rs b/tests/ui/issues/issue-46756-consider-borrowing-cast-or-binexpr.rs index c8494612ca3..0e04680911c 100644 --- a/tests/ui/issues/issue-46756-consider-borrowing-cast-or-binexpr.rs +++ b/tests/ui/issues/issue-46756-consider-borrowing-cast-or-binexpr.rs @@ -1,4 +1,4 @@ -// run-rustfix +//@ run-rustfix #![allow(unused)] diff --git a/tests/ui/issues/issue-46855.rs b/tests/ui/issues/issue-46855.rs index aa6378f8594..acea242046f 100644 --- a/tests/ui/issues/issue-46855.rs +++ b/tests/ui/issues/issue-46855.rs @@ -1,6 +1,6 @@ -// run-pass +//@ run-pass #![allow(dead_code)] -// compile-flags: -Zmir-opt-level=1 +//@ compile-flags: -Zmir-opt-level=1 use std::mem; diff --git a/tests/ui/issues/issue-46964.rs b/tests/ui/issues/issue-46964.rs index 28fa92f2091..6a29d91df73 100644 --- a/tests/ui/issues/issue-46964.rs +++ b/tests/ui/issues/issue-46964.rs @@ -1,4 +1,4 @@ -// check-pass +//@ check-pass mod my_mod { #[derive(Clone, Copy, Eq, PartialEq, PartialOrd, Ord, Hash)] pub struct Name<'a> { diff --git a/tests/ui/issues/issue-47309.rs b/tests/ui/issues/issue-47309.rs index abed9687b49..99f1ccbc575 100644 --- a/tests/ui/issues/issue-47309.rs +++ b/tests/ui/issues/issue-47309.rs @@ -2,8 +2,8 @@ // instantiate a default impl of a method with lifetime parameters. // See https://github.com/rust-lang/rust/issues/47309 -// compile-flags:-Clink-dead-code -// build-pass +//@ compile-flags:-Clink-dead-code +//@ build-pass #![crate_type="rlib"] diff --git a/tests/ui/issues/issue-4734.rs b/tests/ui/issues/issue-4734.rs index 29c965d7ff5..938d7064789 100644 --- a/tests/ui/issues/issue-4734.rs +++ b/tests/ui/issues/issue-4734.rs @@ -1,4 +1,4 @@ -// run-pass +//@ run-pass #![allow(dead_code)] // Ensures that destructors are run for expressions of the form "e;" where // `e` is a type which requires a destructor. diff --git a/tests/ui/issues/issue-4735.rs b/tests/ui/issues/issue-4735.rs index 3ea4b01cd2b..1223e15b2d9 100644 --- a/tests/ui/issues/issue-4735.rs +++ b/tests/ui/issues/issue-4735.rs @@ -1,5 +1,5 @@ -// run-pass -// pretty-expanded FIXME #23616 +//@ run-pass +//@ pretty-expanded FIXME #23616 use std::mem::transmute; diff --git a/tests/ui/issues/issue-47364.rs b/tests/ui/issues/issue-47364.rs index b524354d9a1..b657b3d3bde 100644 --- a/tests/ui/issues/issue-47364.rs +++ b/tests/ui/issues/issue-47364.rs @@ -1,6 +1,6 @@ -// run-pass +//@ run-pass #![allow(unused_variables)] -// compile-flags: -C codegen-units=8 -O +//@ compile-flags: -C codegen-units=8 -O #![allow(non_snake_case)] fn main() { diff --git a/tests/ui/issues/issue-4759-1.rs b/tests/ui/issues/issue-4759-1.rs index 96fae0fecd9..7368a7b2f84 100644 --- a/tests/ui/issues/issue-4759-1.rs +++ b/tests/ui/issues/issue-4759-1.rs @@ -1,4 +1,4 @@ -// run-pass +//@ run-pass trait U { fn f(self); } impl U for isize { fn f(self) {} } pub fn main() { 4.f(); } diff --git a/tests/ui/issues/issue-4759.rs b/tests/ui/issues/issue-4759.rs index e5b9e2ed574..49fe5f92759 100644 --- a/tests/ui/issues/issue-4759.rs +++ b/tests/ui/issues/issue-4759.rs @@ -1,5 +1,5 @@ -// run-pass -// pretty-expanded FIXME #23616 +//@ run-pass +//@ pretty-expanded FIXME #23616 #![allow(non_shorthand_field_patterns)] struct T { a: Box } diff --git a/tests/ui/issues/issue-47638.rs b/tests/ui/issues/issue-47638.rs index a1ed3c36544..e5a51ce0c06 100644 --- a/tests/ui/issues/issue-47638.rs +++ b/tests/ui/issues/issue-47638.rs @@ -1,4 +1,4 @@ -// run-pass +//@ run-pass #![allow(unused_variables)] fn id<'c, 'b>(f: &'c &'b dyn Fn(&i32)) -> &'c &'b dyn Fn(&'static i32) { f diff --git a/tests/ui/issues/issue-47673.rs b/tests/ui/issues/issue-47673.rs index b5f0febfbee..d395ac677e7 100644 --- a/tests/ui/issues/issue-47673.rs +++ b/tests/ui/issues/issue-47673.rs @@ -1,4 +1,4 @@ -// check-pass +//@ check-pass #![allow(unused_imports)] use {{}, {}}; diff --git a/tests/ui/issues/issue-47703-1.rs b/tests/ui/issues/issue-47703-1.rs index 61d684c2a81..9913d1fefe0 100644 --- a/tests/ui/issues/issue-47703-1.rs +++ b/tests/ui/issues/issue-47703-1.rs @@ -1,4 +1,4 @@ -// check-pass +//@ check-pass struct AtomicRefMut<'a> { value: &'a mut i32, diff --git a/tests/ui/issues/issue-47703-tuple.rs b/tests/ui/issues/issue-47703-tuple.rs index bad187ead81..17a0da8c5f8 100644 --- a/tests/ui/issues/issue-47703-tuple.rs +++ b/tests/ui/issues/issue-47703-tuple.rs @@ -1,4 +1,4 @@ -// check-pass +//@ check-pass struct WithDrop; diff --git a/tests/ui/issues/issue-47703.rs b/tests/ui/issues/issue-47703.rs index 38be6f5d2a9..deece300987 100644 --- a/tests/ui/issues/issue-47703.rs +++ b/tests/ui/issues/issue-47703.rs @@ -1,4 +1,4 @@ -// check-pass +//@ check-pass struct MyStruct<'a> { field: &'a mut (), diff --git a/tests/ui/issues/issue-47722.rs b/tests/ui/issues/issue-47722.rs index 5645a634343..da08b8addda 100644 --- a/tests/ui/issues/issue-47722.rs +++ b/tests/ui/issues/issue-47722.rs @@ -1,4 +1,4 @@ -// check-pass +//@ check-pass // Tests that automatic coercions from &mut T to *mut T // allow borrows of T to expire immediately - essentially, that diff --git a/tests/ui/issues/issue-48006.rs b/tests/ui/issues/issue-48006.rs index cfef270e5a6..e48146d07bc 100644 --- a/tests/ui/issues/issue-48006.rs +++ b/tests/ui/issues/issue-48006.rs @@ -1,4 +1,4 @@ -// run-pass +//@ run-pass #![feature(step_trait)] diff --git a/tests/ui/issues/issue-48132.rs b/tests/ui/issues/issue-48132.rs index f564aefe78c..d8d7167a4ce 100644 --- a/tests/ui/issues/issue-48132.rs +++ b/tests/ui/issues/issue-48132.rs @@ -1,7 +1,7 @@ // Regression test for #48132. This was failing due to problems around // the projection caching and dropck type enumeration. -// run-pass +//@ run-pass #![allow(dead_code)] diff --git a/tests/ui/issues/issue-48159.rs b/tests/ui/issues/issue-48159.rs index fc8f31fb1ef..2060e708e27 100644 --- a/tests/ui/issues/issue-48159.rs +++ b/tests/ui/issues/issue-48159.rs @@ -1,4 +1,4 @@ -// run-pass +//@ run-pass #![allow(non_camel_case_types)] use std::mem; diff --git a/tests/ui/issues/issue-4830.rs b/tests/ui/issues/issue-4830.rs index a8553bd6bf3..364def61da8 100644 --- a/tests/ui/issues/issue-4830.rs +++ b/tests/ui/issues/issue-4830.rs @@ -1,7 +1,7 @@ -// check-pass +//@ check-pass #![allow(dead_code)] -// pretty-expanded FIXME #23616 +//@ pretty-expanded FIXME #23616 pub struct Scheduler { /// The event loop used to drive the scheduler and perform I/O diff --git a/tests/ui/issues/issue-4875.rs b/tests/ui/issues/issue-4875.rs index 8d361314f73..3b09331873c 100644 --- a/tests/ui/issues/issue-4875.rs +++ b/tests/ui/issues/issue-4875.rs @@ -1,8 +1,8 @@ -// run-pass +//@ run-pass #![allow(dead_code)] // regression test for issue 4875 -// pretty-expanded FIXME #23616 +//@ pretty-expanded FIXME #23616 pub struct Foo { data: T, diff --git a/tests/ui/issues/issue-48984.rs b/tests/ui/issues/issue-48984.rs index cb340f84897..0440789a480 100644 --- a/tests/ui/issues/issue-48984.rs +++ b/tests/ui/issues/issue-48984.rs @@ -1,6 +1,6 @@ -// run-pass +//@ run-pass #![allow(dead_code)] -// aux-build:issue-48984-aux.rs +//@ aux-build:issue-48984-aux.rs extern crate issue48984aux; use issue48984aux::Bar; diff --git a/tests/ui/issues/issue-49298.rs b/tests/ui/issues/issue-49298.rs index 6e58fa12ca7..b10b5b90fd7 100644 --- a/tests/ui/issues/issue-49298.rs +++ b/tests/ui/issues/issue-49298.rs @@ -1,4 +1,4 @@ -// run-pass +//@ run-pass #![feature(test)] #![allow(unused_mut)] // under NLL we get warning about `x` below: rust-lang/rust#54499 @@ -6,7 +6,7 @@ // where #54986 is implemented and #54987 is *not* implemented. For // now: just ignore it // -// ignore-test (#54987) +//@ ignore-test (#54987) // This test is checking that the space allocated for `x.1` does not // overlap with `y`. (The reason why such a thing happened at one diff --git a/tests/ui/issues/issue-49544.rs b/tests/ui/issues/issue-49544.rs index ed356275fc1..bb052501f8b 100644 --- a/tests/ui/issues/issue-49544.rs +++ b/tests/ui/issues/issue-49544.rs @@ -1,5 +1,5 @@ -// aux-build:issue-49544.rs -// check-pass +//@ aux-build:issue-49544.rs +//@ check-pass extern crate issue_49544; use issue_49544::foo; diff --git a/tests/ui/issues/issue-49632.rs b/tests/ui/issues/issue-49632.rs index 155fd0d24eb..f17891c4501 100644 --- a/tests/ui/issues/issue-49632.rs +++ b/tests/ui/issues/issue-49632.rs @@ -1,4 +1,4 @@ -// run-pass +//@ run-pass #![feature(stmt_expr_attributes)] pub fn main() { diff --git a/tests/ui/issues/issue-49851/compiler-builtins-error.rs b/tests/ui/issues/issue-49851/compiler-builtins-error.rs index 4e56cca33d6..3b62cc73f93 100644 --- a/tests/ui/issues/issue-49851/compiler-builtins-error.rs +++ b/tests/ui/issues/issue-49851/compiler-builtins-error.rs @@ -1,8 +1,8 @@ //~ ERROR can't find crate for `core` //~^ ERROR can't find crate for `compiler_builtins` -// compile-flags: --target thumbv7em-none-eabihf -// needs-llvm-components: arm +//@ compile-flags: --target thumbv7em-none-eabihf +//@ needs-llvm-components: arm #![deny(unsafe_code)] #![deny(warnings)] #![no_std] diff --git a/tests/ui/issues/issue-49854.rs b/tests/ui/issues/issue-49854.rs index 0e1db00a34c..b5a3f07dd4b 100644 --- a/tests/ui/issues/issue-49854.rs +++ b/tests/ui/issues/issue-49854.rs @@ -1,4 +1,4 @@ -// run-pass +//@ run-pass use std::ffi::OsString; fn main() { diff --git a/tests/ui/issues/issue-49955.rs b/tests/ui/issues/issue-49955.rs index f2f3ebff2db..c2f160bd6d4 100644 --- a/tests/ui/issues/issue-49955.rs +++ b/tests/ui/issues/issue-49955.rs @@ -1,4 +1,4 @@ -// run-pass +//@ run-pass const ALL_THE_NUMS: [u32; 1] = [ 1 diff --git a/tests/ui/issues/issue-49973.rs b/tests/ui/issues/issue-49973.rs index af421c52fb0..c8f7c8ea32f 100644 --- a/tests/ui/issues/issue-49973.rs +++ b/tests/ui/issues/issue-49973.rs @@ -1,4 +1,4 @@ -// run-pass +//@ run-pass #[derive(Debug)] #[repr(i32)] enum E { diff --git a/tests/ui/issues/issue-50187.rs b/tests/ui/issues/issue-50187.rs index 4b0aeaab410..7304903b954 100644 --- a/tests/ui/issues/issue-50187.rs +++ b/tests/ui/issues/issue-50187.rs @@ -1,4 +1,4 @@ -// check-pass +//@ check-pass #![feature(decl_macro)] diff --git a/tests/ui/issues/issue-50411.rs b/tests/ui/issues/issue-50411.rs index cd728b15256..7fbbadac1e2 100644 --- a/tests/ui/issues/issue-50411.rs +++ b/tests/ui/issues/issue-50411.rs @@ -3,8 +3,8 @@ // elaborate-drops invoked on it) and then try to elaboate drops a // second time. Uncool. -// compile-flags:-Zmir-opt-level=4 -// build-pass +//@ compile-flags:-Zmir-opt-level=4 +//@ build-pass fn main() { let _ = (0 .. 1).filter(|_| [1].iter().all(|_| true)).count(); diff --git a/tests/ui/issues/issue-50415.rs b/tests/ui/issues/issue-50415.rs index 151b9fe442c..5f6211eb149 100644 --- a/tests/ui/issues/issue-50415.rs +++ b/tests/ui/issues/issue-50415.rs @@ -1,4 +1,4 @@ -// run-pass +//@ run-pass fn main() { // Simplified test case let _ = || 0..=1; diff --git a/tests/ui/issues/issue-50442.rs b/tests/ui/issues/issue-50442.rs index 25c7dde7a5f..70c764f33dd 100644 --- a/tests/ui/issues/issue-50442.rs +++ b/tests/ui/issues/issue-50442.rs @@ -1,4 +1,4 @@ -// run-pass +//@ run-pass #![allow(dead_code)] enum Void {} diff --git a/tests/ui/issues/issue-50471.rs b/tests/ui/issues/issue-50471.rs index 7278c392d54..1d8bad20377 100644 --- a/tests/ui/issues/issue-50471.rs +++ b/tests/ui/issues/issue-50471.rs @@ -1,4 +1,4 @@ -// check-pass +//@ check-pass fn main() { assert!({false}); diff --git a/tests/ui/issues/issue-50518.rs b/tests/ui/issues/issue-50518.rs index 1e7b7794929..9ac0a297fef 100644 --- a/tests/ui/issues/issue-50518.rs +++ b/tests/ui/issues/issue-50518.rs @@ -1,4 +1,4 @@ -// check-pass +//@ check-pass use std::marker::PhantomData; struct Meta { diff --git a/tests/ui/issues/issue-50571.fixed b/tests/ui/issues/issue-50571.fixed index 13c830cd0d4..37ed729be81 100644 --- a/tests/ui/issues/issue-50571.fixed +++ b/tests/ui/issues/issue-50571.fixed @@ -1,4 +1,4 @@ -// run-rustfix +//@ run-rustfix #![allow(dead_code)] trait Foo { diff --git a/tests/ui/issues/issue-50571.rs b/tests/ui/issues/issue-50571.rs index 6fe13e3f707..97a042d3ec1 100644 --- a/tests/ui/issues/issue-50571.rs +++ b/tests/ui/issues/issue-50571.rs @@ -1,4 +1,4 @@ -// run-rustfix +//@ run-rustfix #![allow(dead_code)] trait Foo { diff --git a/tests/ui/issues/issue-5067.rs b/tests/ui/issues/issue-5067.rs index 5857a081596..47d07f0df01 100644 --- a/tests/ui/issues/issue-5067.rs +++ b/tests/ui/issues/issue-5067.rs @@ -3,7 +3,7 @@ // Tests that repetition matchers cannot match the empty token tree (since that would be // ambiguous). -// edition:2018 +//@ edition:2018 macro_rules! foo { ( $()* ) => {}; diff --git a/tests/ui/issues/issue-50761.rs b/tests/ui/issues/issue-50761.rs index 1bf494ba8f9..6911bfa0265 100644 --- a/tests/ui/issues/issue-50761.rs +++ b/tests/ui/issues/issue-50761.rs @@ -1,6 +1,6 @@ // Confirm that we don't accidentally divide or mod by zero in llvm_type -// build-pass +//@ build-pass mod a { pub trait A {} diff --git a/tests/ui/issues/issue-50811.rs b/tests/ui/issues/issue-50811.rs index 2a20e50fa45..aaf1c17f59b 100644 --- a/tests/ui/issues/issue-50811.rs +++ b/tests/ui/issues/issue-50811.rs @@ -1,4 +1,4 @@ -// run-pass +//@ run-pass #![feature(test)] #![allow(invalid_nan_comparisons)] diff --git a/tests/ui/issues/issue-50865-private-impl-trait/auxiliary/lib.rs b/tests/ui/issues/issue-50865-private-impl-trait/auxiliary/lib.rs index 1e20a546069..c68b6d19354 100644 --- a/tests/ui/issues/issue-50865-private-impl-trait/auxiliary/lib.rs +++ b/tests/ui/issues/issue-50865-private-impl-trait/auxiliary/lib.rs @@ -1,5 +1,5 @@ -// revisions: default miropt -//[miropt]compile-flags: -Z mir-opt-level=3 +//@ revisions: default miropt +//@[miropt]compile-flags: -Z mir-opt-level=3 // ~^ This flag is for #77668, it used to be ICE. #![crate_type = "lib"] diff --git a/tests/ui/issues/issue-50865-private-impl-trait/main.rs b/tests/ui/issues/issue-50865-private-impl-trait/main.rs index 16dfac53ad1..b951388594f 100644 --- a/tests/ui/issues/issue-50865-private-impl-trait/main.rs +++ b/tests/ui/issues/issue-50865-private-impl-trait/main.rs @@ -1,5 +1,5 @@ -// run-pass -// aux-build:lib.rs +//@ run-pass +//@ aux-build:lib.rs // Regression test for #50865. // When using generics or specifying the type directly, this example diff --git a/tests/ui/issues/issue-51044.rs b/tests/ui/issues/issue-51044.rs index 628d7876965..d7761b50b4c 100644 --- a/tests/ui/issues/issue-51044.rs +++ b/tests/ui/issues/issue-51044.rs @@ -1,4 +1,4 @@ -// run-pass +//@ run-pass // regression test for issue #50825 // Check that the feature gate normalizes associated types. diff --git a/tests/ui/issues/issue-51655.rs b/tests/ui/issues/issue-51655.rs index 36fd90dabed..05f71623d14 100644 --- a/tests/ui/issues/issue-51655.rs +++ b/tests/ui/issues/issue-51655.rs @@ -1,4 +1,4 @@ -// check-pass +//@ check-pass #![allow(dead_code)] const PATH_DOT: &[u8] = &[b'.']; diff --git a/tests/ui/issues/issue-51798.rs b/tests/ui/issues/issue-51798.rs index b075809e93a..f4d59f39952 100644 --- a/tests/ui/issues/issue-51798.rs +++ b/tests/ui/issues/issue-51798.rs @@ -1,6 +1,6 @@ -// edition:2018 -// aux-build:issue-51798.rs -// check-pass +//@ edition:2018 +//@ aux-build:issue-51798.rs +//@ check-pass extern crate issue_51798; diff --git a/tests/ui/issues/issue-51907.rs b/tests/ui/issues/issue-51907.rs index 9378f435713..bf3f629df49 100644 --- a/tests/ui/issues/issue-51907.rs +++ b/tests/ui/issues/issue-51907.rs @@ -1,4 +1,4 @@ -// run-pass +//@ run-pass trait Foo { extern "C" fn borrow(&self); extern "C" fn take(self: Box); diff --git a/tests/ui/issues/issue-5192.rs b/tests/ui/issues/issue-5192.rs index e2f835c1997..8911e7a733b 100644 --- a/tests/ui/issues/issue-5192.rs +++ b/tests/ui/issues/issue-5192.rs @@ -1,6 +1,6 @@ -// run-pass +//@ run-pass #![allow(dead_code)] -// pretty-expanded FIXME #23616 +//@ pretty-expanded FIXME #23616 pub trait EventLoop { fn dummy(&self) { } diff --git a/tests/ui/issues/issue-51947.rs b/tests/ui/issues/issue-51947.rs index c877fb8aef1..eda48aa5cf4 100644 --- a/tests/ui/issues/issue-51947.rs +++ b/tests/ui/issues/issue-51947.rs @@ -1,4 +1,4 @@ -// build-pass +//@ build-pass #![crate_type = "lib"] #![feature(linkage)] diff --git a/tests/ui/issues/issue-52140/main.rs b/tests/ui/issues/issue-52140/main.rs index aeac4340455..a7c76e68d3a 100644 --- a/tests/ui/issues/issue-52140/main.rs +++ b/tests/ui/issues/issue-52140/main.rs @@ -1,7 +1,7 @@ -// run-pass -// aux-build:some_crate.rs -// compile-flags:--extern some_crate -// edition:2018 +//@ run-pass +//@ aux-build:some_crate.rs +//@ compile-flags:--extern some_crate +//@ edition:2018 mod foo { pub use some_crate; diff --git a/tests/ui/issues/issue-52141/main.rs b/tests/ui/issues/issue-52141/main.rs index 7eea1726cf3..dc22b01ff84 100644 --- a/tests/ui/issues/issue-52141/main.rs +++ b/tests/ui/issues/issue-52141/main.rs @@ -1,7 +1,7 @@ -// run-pass -// aux-build:some_crate.rs -// compile-flags:--extern some_crate -// edition:2018 +//@ run-pass +//@ aux-build:some_crate.rs +//@ compile-flags:--extern some_crate +//@ edition:2018 use some_crate as some_name; diff --git a/tests/ui/issues/issue-5239-2.rs b/tests/ui/issues/issue-5239-2.rs index b501c6e1853..8239b06404a 100644 --- a/tests/ui/issues/issue-5239-2.rs +++ b/tests/ui/issues/issue-5239-2.rs @@ -1,4 +1,4 @@ -// run-pass +//@ run-pass // Regression test for issue #5239 diff --git a/tests/ui/issues/issue-52489.rs b/tests/ui/issues/issue-52489.rs index 8efe216989a..95a3d43105c 100644 --- a/tests/ui/issues/issue-52489.rs +++ b/tests/ui/issues/issue-52489.rs @@ -1,6 +1,6 @@ -// edition:2018 -// aux-build:issue-52489.rs -// compile-flags:--extern issue_52489 +//@ edition:2018 +//@ aux-build:issue-52489.rs +//@ compile-flags:--extern issue_52489 use issue_52489; //~^ ERROR use of unstable library feature 'issue_52489_unstable' diff --git a/tests/ui/issues/issue-52705/main.rs b/tests/ui/issues/issue-52705/main.rs index 90bb8ca7537..92bd9a279ad 100644 --- a/tests/ui/issues/issue-52705/main.rs +++ b/tests/ui/issues/issue-52705/main.rs @@ -1,8 +1,8 @@ -// run-pass +//@ run-pass #![allow(dead_code)] -// aux-build:png2.rs -// compile-flags:--extern png2 -// edition:2018 +//@ aux-build:png2.rs +//@ compile-flags:--extern png2 +//@ edition:2018 mod png { use png2 as png_ext; diff --git a/tests/ui/issues/issue-5280.rs b/tests/ui/issues/issue-5280.rs index 5c5ce6c987a..66452c36776 100644 --- a/tests/ui/issues/issue-5280.rs +++ b/tests/ui/issues/issue-5280.rs @@ -1,4 +1,4 @@ -// run-pass +//@ run-pass #![allow(dead_code)] type FontTableTag = u32; diff --git a/tests/ui/issues/issue-5315.rs b/tests/ui/issues/issue-5315.rs index 81d075a98a9..64a48b9e842 100644 --- a/tests/ui/issues/issue-5315.rs +++ b/tests/ui/issues/issue-5315.rs @@ -1,5 +1,5 @@ -// run-pass -// pretty-expanded FIXME #23616 +//@ run-pass +//@ pretty-expanded FIXME #23616 struct A(#[allow(dead_code)] bool); diff --git a/tests/ui/issues/issue-5321-immediates-with-bare-self.rs b/tests/ui/issues/issue-5321-immediates-with-bare-self.rs index 64aa2836a7d..cb35a641c5e 100644 --- a/tests/ui/issues/issue-5321-immediates-with-bare-self.rs +++ b/tests/ui/issues/issue-5321-immediates-with-bare-self.rs @@ -1,4 +1,4 @@ -// run-pass +//@ run-pass trait Fooable { fn yes(self); diff --git a/tests/ui/issues/issue-53275.rs b/tests/ui/issues/issue-53275.rs index 5ae6fb2d472..13c35c8fdaa 100644 --- a/tests/ui/issues/issue-53275.rs +++ b/tests/ui/issues/issue-53275.rs @@ -1,4 +1,4 @@ -// build-pass +//@ build-pass #![crate_type = "lib"] #![allow(unconditional_panic)] diff --git a/tests/ui/issues/issue-53333.rs b/tests/ui/issues/issue-53333.rs index ccc9971f93c..468b7d8075f 100644 --- a/tests/ui/issues/issue-53333.rs +++ b/tests/ui/issues/issue-53333.rs @@ -1,6 +1,6 @@ -// run-pass +//@ run-pass #![allow(unused_imports)] -// edition:2018 +//@ edition:2018 fn main() { use std; diff --git a/tests/ui/issues/issue-53419.rs b/tests/ui/issues/issue-53419.rs index 892ec66afec..55d41f2005d 100644 --- a/tests/ui/issues/issue-53419.rs +++ b/tests/ui/issues/issue-53419.rs @@ -1,4 +1,4 @@ -// check-pass +//@ check-pass struct Foo { bar: dyn for<'r> Fn(usize, &'r dyn FnMut()) diff --git a/tests/ui/issues/issue-53568.rs b/tests/ui/issues/issue-53568.rs index 49ae444f97e..9862d4ced12 100644 --- a/tests/ui/issues/issue-53568.rs +++ b/tests/ui/issues/issue-53568.rs @@ -1,7 +1,7 @@ // Regression test for an NLL-related ICE (#53568) -- we failed to // resolve inference variables in "custom type-ops". // -// check-pass +//@ check-pass trait Future { type Item; diff --git a/tests/ui/issues/issue-53728.rs b/tests/ui/issues/issue-53728.rs index 77b5010f776..364965228c6 100644 --- a/tests/ui/issues/issue-53728.rs +++ b/tests/ui/issues/issue-53728.rs @@ -1,4 +1,4 @@ -// run-pass +//@ run-pass #![allow(dead_code)] #[repr(u16)] diff --git a/tests/ui/issues/issue-53843.rs b/tests/ui/issues/issue-53843.rs index f305b370ce6..d4b0b1e332b 100644 --- a/tests/ui/issues/issue-53843.rs +++ b/tests/ui/issues/issue-53843.rs @@ -1,4 +1,4 @@ -// run-pass +//@ run-pass use std::ops::Deref; diff --git a/tests/ui/issues/issue-54094.rs b/tests/ui/issues/issue-54094.rs index ec38dc40e61..4ca7d1d81b6 100644 --- a/tests/ui/issues/issue-54094.rs +++ b/tests/ui/issues/issue-54094.rs @@ -1,4 +1,4 @@ -// check-pass +//@ check-pass trait Zoo { type X; } diff --git a/tests/ui/issues/issue-54462-mutable-noalias-correctness.rs b/tests/ui/issues/issue-54462-mutable-noalias-correctness.rs index 412028bdcdc..70d0bee7332 100644 --- a/tests/ui/issues/issue-54462-mutable-noalias-correctness.rs +++ b/tests/ui/issues/issue-54462-mutable-noalias-correctness.rs @@ -1,6 +1,6 @@ -// run-pass +//@ run-pass // -// compile-flags: -Ccodegen-units=1 -O +//@ compile-flags: -Ccodegen-units=1 -O fn linidx(row: usize, col: usize) -> usize { row * 1 + col * 3 diff --git a/tests/ui/issues/issue-54477-reduced-2.rs b/tests/ui/issues/issue-54477-reduced-2.rs index 199d69b4540..5f65e545182 100644 --- a/tests/ui/issues/issue-54477-reduced-2.rs +++ b/tests/ui/issues/issue-54477-reduced-2.rs @@ -1,4 +1,4 @@ -// run-pass +//@ run-pass // rust-lang/rust#54477: runtime bug in the VecDeque library that was // exposed by this test case, derived from test suite of crates.io // `collection` crate. diff --git a/tests/ui/issues/issue-54696.rs b/tests/ui/issues/issue-54696.rs index 15355d30db6..75b1824f0b3 100644 --- a/tests/ui/issues/issue-54696.rs +++ b/tests/ui/issues/issue-54696.rs @@ -1,4 +1,4 @@ -// run-pass +//@ run-pass fn main() { // We shouldn't promote this diff --git a/tests/ui/issues/issue-5518.rs b/tests/ui/issues/issue-5518.rs index 97ed9ef309d..4e1049f02fb 100644 --- a/tests/ui/issues/issue-5518.rs +++ b/tests/ui/issues/issue-5518.rs @@ -1,7 +1,7 @@ -// run-pass -// aux-build:issue-5518.rs +//@ run-pass +//@ aux-build:issue-5518.rs -// pretty-expanded FIXME #23616 +//@ pretty-expanded FIXME #23616 extern crate issue_5518 as other; diff --git a/tests/ui/issues/issue-5521.rs b/tests/ui/issues/issue-5521.rs index cafdbc39961..45896ae8128 100644 --- a/tests/ui/issues/issue-5521.rs +++ b/tests/ui/issues/issue-5521.rs @@ -1,6 +1,6 @@ -// run-pass +//@ run-pass #![allow(dead_code)] -// aux-build:issue-5521.rs +//@ aux-build:issue-5521.rs diff --git a/tests/ui/issues/issue-55376.rs b/tests/ui/issues/issue-55376.rs index 4adff2b4544..5a6862b6530 100644 --- a/tests/ui/issues/issue-55376.rs +++ b/tests/ui/issues/issue-55376.rs @@ -1,4 +1,4 @@ -// run-pass +//@ run-pass // Tests that paths in `pub(...)` don't fail HIR verification. #![allow(unused_imports)] diff --git a/tests/ui/issues/issue-55380.rs b/tests/ui/issues/issue-55380.rs index f7cb296d3b8..54894cdede0 100644 --- a/tests/ui/issues/issue-55380.rs +++ b/tests/ui/issues/issue-55380.rs @@ -1,4 +1,4 @@ -// run-pass +//@ run-pass #![feature(specialization)] //~^ WARN the feature `specialization` is incomplete diff --git a/tests/ui/issues/issue-5550.rs b/tests/ui/issues/issue-5550.rs index 6ea24747b39..e967590c650 100644 --- a/tests/ui/issues/issue-5550.rs +++ b/tests/ui/issues/issue-5550.rs @@ -1,6 +1,6 @@ -// run-pass +//@ run-pass #![allow(unused_assignments)] -// pretty-expanded FIXME #23616 +//@ pretty-expanded FIXME #23616 pub fn main() { let s: String = "foobar".to_string(); diff --git a/tests/ui/issues/issue-5554.rs b/tests/ui/issues/issue-5554.rs index afe333ed709..532d1b4092e 100644 --- a/tests/ui/issues/issue-5554.rs +++ b/tests/ui/issues/issue-5554.rs @@ -1,6 +1,6 @@ -// run-pass +//@ run-pass #![allow(dead_code)] -// pretty-expanded FIXME #23616 +//@ pretty-expanded FIXME #23616 pub struct X { diff --git a/tests/ui/issues/issue-5572.rs b/tests/ui/issues/issue-5572.rs index 175dc879dda..8a4c867f585 100644 --- a/tests/ui/issues/issue-5572.rs +++ b/tests/ui/issues/issue-5572.rs @@ -1,6 +1,6 @@ -// check-pass +//@ check-pass #![allow(dead_code)] -// pretty-expanded FIXME #23616 +//@ pretty-expanded FIXME #23616 fn foo(_t: T) { } diff --git a/tests/ui/issues/issue-56128.rs b/tests/ui/issues/issue-56128.rs index 10b50943c23..cc170f60250 100644 --- a/tests/ui/issues/issue-56128.rs +++ b/tests/ui/issues/issue-56128.rs @@ -1,7 +1,7 @@ // Regression test for #56128. When this `pub(super) use...` gets // exploded in the HIR, we were not handling ids correctly. // -// check-pass +//@ check-pass mod bar { pub(super) use self::baz::{x, y}; diff --git a/tests/ui/issues/issue-56175.rs b/tests/ui/issues/issue-56175.rs index ca1d0d4310a..daffe806a90 100644 --- a/tests/ui/issues/issue-56175.rs +++ b/tests/ui/issues/issue-56175.rs @@ -1,5 +1,5 @@ -// edition:2018 -// aux-crate:reexported_trait=reexported-trait.rs +//@ edition:2018 +//@ aux-crate:reexported_trait=reexported-trait.rs fn main() { reexported_trait::FooStruct.trait_method(); diff --git a/tests/ui/issues/issue-56229.rs b/tests/ui/issues/issue-56229.rs index 9e5897b9892..1c6dd72ed2d 100644 --- a/tests/ui/issues/issue-56229.rs +++ b/tests/ui/issues/issue-56229.rs @@ -1,4 +1,4 @@ -// check-pass +//@ check-pass trait Mirror { type Other; diff --git a/tests/ui/issues/issue-56237.rs b/tests/ui/issues/issue-56237.rs index 534b85acec8..3c0a235f3ec 100644 --- a/tests/ui/issues/issue-56237.rs +++ b/tests/ui/issues/issue-56237.rs @@ -1,4 +1,4 @@ -// run-pass +//@ run-pass use std::ops::Deref; diff --git a/tests/ui/issues/issue-5666.rs b/tests/ui/issues/issue-5666.rs index 810895b1b1b..76e2f8229a0 100644 --- a/tests/ui/issues/issue-5666.rs +++ b/tests/ui/issues/issue-5666.rs @@ -1,4 +1,4 @@ -// run-pass +//@ run-pass struct Dog { name : String diff --git a/tests/ui/issues/issue-56870.rs b/tests/ui/issues/issue-56870.rs index 137a0ede0b3..fc6deedd029 100644 --- a/tests/ui/issues/issue-56870.rs +++ b/tests/ui/issues/issue-56870.rs @@ -1,4 +1,4 @@ -// build-pass +//@ build-pass // Regression test for #56870: Internal compiler error (traits & associated consts) use std::fmt::Debug; diff --git a/tests/ui/issues/issue-5688.rs b/tests/ui/issues/issue-5688.rs index b6e364c2f40..a7db1dfb15f 100644 --- a/tests/ui/issues/issue-5688.rs +++ b/tests/ui/issues/issue-5688.rs @@ -1,4 +1,4 @@ -// run-pass +//@ run-pass /* # Corrupted initialization in the static struct diff --git a/tests/ui/issues/issue-56943.rs b/tests/ui/issues/issue-56943.rs index 8fc77abdbf5..9664567ec9e 100644 --- a/tests/ui/issues/issue-56943.rs +++ b/tests/ui/issues/issue-56943.rs @@ -1,4 +1,4 @@ -// aux-build:issue-56943.rs +//@ aux-build:issue-56943.rs extern crate issue_56943; diff --git a/tests/ui/issues/issue-5708.rs b/tests/ui/issues/issue-5708.rs index 6fe9943d368..ce9ef78ffcd 100644 --- a/tests/ui/issues/issue-5708.rs +++ b/tests/ui/issues/issue-5708.rs @@ -1,4 +1,4 @@ -// run-pass +//@ run-pass #![allow(unused_variables)] /* # ICE when returning struct with reference to trait diff --git a/tests/ui/issues/issue-57156.rs b/tests/ui/issues/issue-57156.rs index 9f5ec9f2771..12251509abd 100644 --- a/tests/ui/issues/issue-57156.rs +++ b/tests/ui/issues/issue-57156.rs @@ -1,4 +1,4 @@ -// check-pass +//@ check-pass trait Foo { type Output; diff --git a/tests/ui/issues/issue-57162.rs b/tests/ui/issues/issue-57162.rs index 65070060287..5e62d0eb010 100644 --- a/tests/ui/issues/issue-57162.rs +++ b/tests/ui/issues/issue-57162.rs @@ -1,4 +1,4 @@ -// check-pass +//@ check-pass trait Foo {} impl Foo for dyn Send {} diff --git a/tests/ui/issues/issue-5718.rs b/tests/ui/issues/issue-5718.rs index f29a1e2a060..c30061298d1 100644 --- a/tests/ui/issues/issue-5718.rs +++ b/tests/ui/issues/issue-5718.rs @@ -1,5 +1,5 @@ -// run-pass -// pretty-expanded FIXME #23616 +//@ run-pass +//@ pretty-expanded FIXME #23616 struct Element; diff --git a/tests/ui/issues/issue-57198-pass.rs b/tests/ui/issues/issue-57198-pass.rs index 3857def9824..06f30603c31 100644 --- a/tests/ui/issues/issue-57198-pass.rs +++ b/tests/ui/issues/issue-57198-pass.rs @@ -1,4 +1,4 @@ -// run-pass +//@ run-pass mod m { pub fn r#for() {} diff --git a/tests/ui/issues/issue-57271.rs b/tests/ui/issues/issue-57271.rs index f74222e3e51..20d081ecb3c 100644 --- a/tests/ui/issues/issue-57271.rs +++ b/tests/ui/issues/issue-57271.rs @@ -1,4 +1,4 @@ -// aux-build:issue-57271-lib.rs +//@ aux-build:issue-57271-lib.rs extern crate issue_57271_lib; diff --git a/tests/ui/issues/issue-57399-self-return-impl-trait.rs b/tests/ui/issues/issue-57399-self-return-impl-trait.rs index c7fe40e7b50..bcf1b18a9ff 100644 --- a/tests/ui/issues/issue-57399-self-return-impl-trait.rs +++ b/tests/ui/issues/issue-57399-self-return-impl-trait.rs @@ -1,4 +1,4 @@ -// check-pass +//@ check-pass trait T { type T; diff --git a/tests/ui/issues/issue-5741.rs b/tests/ui/issues/issue-5741.rs index b9eaf0be7fb..dad16dd39e2 100644 --- a/tests/ui/issues/issue-5741.rs +++ b/tests/ui/issues/issue-5741.rs @@ -1,5 +1,5 @@ -// run-pass -// pretty-expanded FIXME #23616 +//@ run-pass +//@ pretty-expanded FIXME #23616 #![allow(while_true)] #![allow(unreachable_code)] diff --git a/tests/ui/issues/issue-5754.rs b/tests/ui/issues/issue-5754.rs index d90816635ab..2b61da02c30 100644 --- a/tests/ui/issues/issue-5754.rs +++ b/tests/ui/issues/issue-5754.rs @@ -1,8 +1,8 @@ -// build-pass +//@ build-pass #![allow(dead_code)] #![allow(improper_ctypes)] -// pretty-expanded FIXME #23616 +//@ pretty-expanded FIXME #23616 struct TwoDoubles { r: f64, diff --git a/tests/ui/issues/issue-57741-dereference-boxed-value/issue-57741.fixed b/tests/ui/issues/issue-57741-dereference-boxed-value/issue-57741.fixed index 4cae080033c..1823f0d3d4c 100644 --- a/tests/ui/issues/issue-57741-dereference-boxed-value/issue-57741.fixed +++ b/tests/ui/issues/issue-57741-dereference-boxed-value/issue-57741.fixed @@ -1,4 +1,4 @@ -// run-rustfix +//@ run-rustfix #![allow(warnings)] diff --git a/tests/ui/issues/issue-57741-dereference-boxed-value/issue-57741.rs b/tests/ui/issues/issue-57741-dereference-boxed-value/issue-57741.rs index e2658295af7..47ab91177e0 100644 --- a/tests/ui/issues/issue-57741-dereference-boxed-value/issue-57741.rs +++ b/tests/ui/issues/issue-57741-dereference-boxed-value/issue-57741.rs @@ -1,4 +1,4 @@ -// run-rustfix +//@ run-rustfix #![allow(warnings)] diff --git a/tests/ui/issues/issue-57781.rs b/tests/ui/issues/issue-57781.rs index f5015aaf5d8..7f0d2eda9bb 100644 --- a/tests/ui/issues/issue-57781.rs +++ b/tests/ui/issues/issue-57781.rs @@ -1,4 +1,4 @@ -// run-pass +//@ run-pass use std::cell::UnsafeCell; use std::collections::HashMap; diff --git a/tests/ui/issues/issue-58212.rs b/tests/ui/issues/issue-58212.rs index 4695497c3a1..f266db603bf 100644 --- a/tests/ui/issues/issue-58212.rs +++ b/tests/ui/issues/issue-58212.rs @@ -1,4 +1,4 @@ -// check-pass +//@ check-pass trait FromUnchecked { fn from_unchecked(); diff --git a/tests/ui/issues/issue-58375-monomorphize-default-impls.rs b/tests/ui/issues/issue-58375-monomorphize-default-impls.rs index 6da6f398dfc..769a1176edd 100644 --- a/tests/ui/issues/issue-58375-monomorphize-default-impls.rs +++ b/tests/ui/issues/issue-58375-monomorphize-default-impls.rs @@ -2,8 +2,8 @@ // instantiate a default impl for DecodeUtf16<::Item> // See https://github.com/rust-lang/rust/issues/58375 -// build-pass -// compile-flags:-C link-dead-code +//@ build-pass +//@ compile-flags:-C link-dead-code #![crate_type = "rlib"] diff --git a/tests/ui/issues/issue-5844.rs b/tests/ui/issues/issue-5844.rs index 0db1ccf76d9..23021207ae1 100644 --- a/tests/ui/issues/issue-5844.rs +++ b/tests/ui/issues/issue-5844.rs @@ -1,4 +1,4 @@ -//aux-build:issue-5844-aux.rs +//@aux-build:issue-5844-aux.rs extern crate issue_5844_aux; diff --git a/tests/ui/issues/issue-58463.rs b/tests/ui/issues/issue-58463.rs index 9573c9b703a..6e4b909bc38 100644 --- a/tests/ui/issues/issue-58463.rs +++ b/tests/ui/issues/issue-58463.rs @@ -1,5 +1,5 @@ -// run-pass -// compile-flags:-C debuginfo=2 +//@ run-pass +//@ compile-flags:-C debuginfo=2 fn foo() -> impl Copy { foo diff --git a/tests/ui/issues/issue-5884.rs b/tests/ui/issues/issue-5884.rs index 991c52321bf..17cb4133632 100644 --- a/tests/ui/issues/issue-5884.rs +++ b/tests/ui/issues/issue-5884.rs @@ -1,6 +1,6 @@ -// build-pass +//@ build-pass #![allow(dead_code)] -// pretty-expanded FIXME #23616 +//@ pretty-expanded FIXME #23616 pub struct Foo { a: isize, diff --git a/tests/ui/issues/issue-5900.rs b/tests/ui/issues/issue-5900.rs index a7dc0eff43a..986a8233ef2 100644 --- a/tests/ui/issues/issue-5900.rs +++ b/tests/ui/issues/issue-5900.rs @@ -1,6 +1,6 @@ -// check-pass +//@ check-pass #![allow(dead_code)] -// pretty-expanded FIXME #23616 +//@ pretty-expanded FIXME #23616 pub mod foo { use super::Bar; diff --git a/tests/ui/issues/issue-59020.rs b/tests/ui/issues/issue-59020.rs index a2b11764a2f..5692afe811e 100644 --- a/tests/ui/issues/issue-59020.rs +++ b/tests/ui/issues/issue-59020.rs @@ -1,6 +1,6 @@ -// edition:2018 -// run-pass -// ignore-emscripten no threads support +//@ edition:2018 +//@ run-pass +//@ ignore-emscripten no threads support use std::thread; use std::time::Duration; diff --git a/tests/ui/issues/issue-5917.rs b/tests/ui/issues/issue-5917.rs index 6ab7081cf88..8e91b1052a2 100644 --- a/tests/ui/issues/issue-5917.rs +++ b/tests/ui/issues/issue-5917.rs @@ -1,4 +1,4 @@ -// run-pass +//@ run-pass #![allow(non_upper_case_globals)] struct T (&'static [isize]); diff --git a/tests/ui/issues/issue-59326.rs b/tests/ui/issues/issue-59326.rs index c0e8837749e..e9634ad9fd8 100644 --- a/tests/ui/issues/issue-59326.rs +++ b/tests/ui/issues/issue-59326.rs @@ -1,4 +1,4 @@ -// check-pass +//@ check-pass trait Service { type S; } diff --git a/tests/ui/issues/issue-5950.rs b/tests/ui/issues/issue-5950.rs index 492a9d5723a..a0822459ad1 100644 --- a/tests/ui/issues/issue-5950.rs +++ b/tests/ui/issues/issue-5950.rs @@ -1,6 +1,6 @@ -// check-pass +//@ check-pass -// pretty-expanded FIXME #23616 +//@ pretty-expanded FIXME #23616 pub use local as local_alias; diff --git a/tests/ui/issues/issue-59756.fixed b/tests/ui/issues/issue-59756.fixed index 7b55d0f17e6..954ba917626 100644 --- a/tests/ui/issues/issue-59756.fixed +++ b/tests/ui/issues/issue-59756.fixed @@ -1,4 +1,4 @@ -// run-rustfix +//@ run-rustfix #![allow(warnings)] diff --git a/tests/ui/issues/issue-59756.rs b/tests/ui/issues/issue-59756.rs index 3742f31abad..de349f43f46 100644 --- a/tests/ui/issues/issue-59756.rs +++ b/tests/ui/issues/issue-59756.rs @@ -1,5 +1,5 @@ -// run-rustfix -// ignore-test (rustfix needs multiple suggestions) +//@ run-rustfix +//@ ignore-test (rustfix needs multiple suggestions) // // FIXME: Re-enable this test once we support choosing // between multiple mutually exclusive suggestions for the same span diff --git a/tests/ui/issues/issue-5988.rs b/tests/ui/issues/issue-5988.rs index 303fb4fbc94..801a5edca08 100644 --- a/tests/ui/issues/issue-5988.rs +++ b/tests/ui/issues/issue-5988.rs @@ -1,5 +1,5 @@ -// run-pass -// pretty-expanded FIXME #23616 +//@ run-pass +//@ pretty-expanded FIXME #23616 trait B { fn f(&self); diff --git a/tests/ui/issues/issue-5997-outer-generic-parameter/issue-5997.rs b/tests/ui/issues/issue-5997-outer-generic-parameter/issue-5997.rs index 145e3a7928d..7ed8819f322 100644 --- a/tests/ui/issues/issue-5997-outer-generic-parameter/issue-5997.rs +++ b/tests/ui/issues/issue-5997-outer-generic-parameter/issue-5997.rs @@ -1,4 +1,4 @@ -// run-pass +//@ run-pass #![allow(dead_code)] fn f() -> bool { diff --git a/tests/ui/issues/issue-6117.rs b/tests/ui/issues/issue-6117.rs index 5235d53d84a..4fa99d955c9 100644 --- a/tests/ui/issues/issue-6117.rs +++ b/tests/ui/issues/issue-6117.rs @@ -1,6 +1,6 @@ -// run-pass +//@ run-pass #![allow(dead_code)] -// pretty-expanded FIXME #23616 +//@ pretty-expanded FIXME #23616 enum Either { Left(T), Right(U) } diff --git a/tests/ui/issues/issue-6130.rs b/tests/ui/issues/issue-6130.rs index a33ea686947..c675a8a41dd 100644 --- a/tests/ui/issues/issue-6130.rs +++ b/tests/ui/issues/issue-6130.rs @@ -1,4 +1,4 @@ -// run-pass +//@ run-pass pub fn main() { let i: usize = 0; diff --git a/tests/ui/issues/issue-61475.rs b/tests/ui/issues/issue-61475.rs index 680449c9ef3..ff5e109ea7c 100644 --- a/tests/ui/issues/issue-61475.rs +++ b/tests/ui/issues/issue-61475.rs @@ -1,4 +1,4 @@ -// run-pass +//@ run-pass #![allow(dead_code)] enum E { diff --git a/tests/ui/issues/issue-6153.rs b/tests/ui/issues/issue-6153.rs index 25f026f214b..cd78c85d94b 100644 --- a/tests/ui/issues/issue-6153.rs +++ b/tests/ui/issues/issue-6153.rs @@ -1,4 +1,4 @@ -// run-pass +//@ run-pass fn swap(f: F) -> Vec where F: FnOnce(Vec) -> Vec { diff --git a/tests/ui/issues/issue-61894.rs b/tests/ui/issues/issue-61894.rs index fe934bdeb60..40ad6a8d76a 100644 --- a/tests/ui/issues/issue-61894.rs +++ b/tests/ui/issues/issue-61894.rs @@ -1,4 +1,4 @@ -// run-pass +//@ run-pass #![feature(core_intrinsics)] diff --git a/tests/ui/issues/issue-6318.rs b/tests/ui/issues/issue-6318.rs index e5f245f6fb8..3b17754ffdc 100644 --- a/tests/ui/issues/issue-6318.rs +++ b/tests/ui/issues/issue-6318.rs @@ -1,5 +1,5 @@ -// run-pass -// pretty-expanded FIXME #23616 +//@ run-pass +//@ pretty-expanded FIXME #23616 pub enum Thing { A(Box) diff --git a/tests/ui/issues/issue-6344-let.rs b/tests/ui/issues/issue-6344-let.rs index a7b6a2e2d66..1e1bdfa17be 100644 --- a/tests/ui/issues/issue-6344-let.rs +++ b/tests/ui/issues/issue-6344-let.rs @@ -1,4 +1,4 @@ -// run-pass +//@ run-pass #![allow(non_shorthand_field_patterns)] struct A { x: usize } diff --git a/tests/ui/issues/issue-6344-match.rs b/tests/ui/issues/issue-6344-match.rs index 4505a34c716..9251e274383 100644 --- a/tests/ui/issues/issue-6344-match.rs +++ b/tests/ui/issues/issue-6344-match.rs @@ -1,4 +1,4 @@ -// run-pass +//@ run-pass #![allow(non_shorthand_field_patterns)] struct A { x: usize } diff --git a/tests/ui/issues/issue-64430.rs b/tests/ui/issues/issue-64430.rs index 0bc66e06e67..bc98dbf8520 100644 --- a/tests/ui/issues/issue-64430.rs +++ b/tests/ui/issues/issue-64430.rs @@ -1,4 +1,4 @@ -// compile-flags:-C panic=abort +//@ compile-flags:-C panic=abort #![no_std] pub struct Foo; diff --git a/tests/ui/issues/issue-64593.rs b/tests/ui/issues/issue-64593.rs index 9e787f638a9..e5535381006 100644 --- a/tests/ui/issues/issue-64593.rs +++ b/tests/ui/issues/issue-64593.rs @@ -1,4 +1,4 @@ -// check-pass +//@ check-pass #![deny(improper_ctypes)] pub struct Error(std::num::NonZeroU32); diff --git a/tests/ui/issues/issue-65462.rs b/tests/ui/issues/issue-65462.rs index 8c39ea531d2..e148c8aeeb2 100644 --- a/tests/ui/issues/issue-65462.rs +++ b/tests/ui/issues/issue-65462.rs @@ -1,4 +1,4 @@ -// build-pass +//@ build-pass enum Empty {} enum Enum { diff --git a/tests/ui/issues/issue-6557.rs b/tests/ui/issues/issue-6557.rs index 757e9608f1a..89ebb0610dd 100644 --- a/tests/ui/issues/issue-6557.rs +++ b/tests/ui/issues/issue-6557.rs @@ -1,6 +1,6 @@ -// check-pass +//@ check-pass #![allow(dead_code)] -// pretty-expanded FIXME #23616 +//@ pretty-expanded FIXME #23616 #![feature(box_patterns)] diff --git a/tests/ui/issues/issue-66308.rs b/tests/ui/issues/issue-66308.rs index 8460b359ae3..41f81323e6f 100644 --- a/tests/ui/issues/issue-66308.rs +++ b/tests/ui/issues/issue-66308.rs @@ -1,5 +1,5 @@ -// build-pass -// compile-flags: --crate-type lib -C opt-level=0 +//@ build-pass +//@ compile-flags: --crate-type lib -C opt-level=0 // Regression test for LLVM crash affecting Emscripten targets diff --git a/tests/ui/issues/issue-67552.rs b/tests/ui/issues/issue-67552.rs index ec1997ccd5d..26466bf838c 100644 --- a/tests/ui/issues/issue-67552.rs +++ b/tests/ui/issues/issue-67552.rs @@ -1,6 +1,6 @@ -// build-fail -// compile-flags: -Copt-level=0 -// normalize-stderr-test: ".nll/" -> "/" +//@ build-fail +//@ compile-flags: -Copt-level=0 +//@ normalize-stderr-test: ".nll/" -> "/" fn main() { rec(Empty); diff --git a/tests/ui/issues/issue-68010-large-zst-consts.rs b/tests/ui/issues/issue-68010-large-zst-consts.rs index 3277df69c02..167c92f004e 100644 --- a/tests/ui/issues/issue-68010-large-zst-consts.rs +++ b/tests/ui/issues/issue-68010-large-zst-consts.rs @@ -1,4 +1,4 @@ -// build-pass +//@ build-pass fn main() { println!("{}", [(); usize::MAX].len()); diff --git a/tests/ui/issues/issue-68696-catch-during-unwind.rs b/tests/ui/issues/issue-68696-catch-during-unwind.rs index 2b12a62d0eb..2368cccef0d 100644 --- a/tests/ui/issues/issue-68696-catch-during-unwind.rs +++ b/tests/ui/issues/issue-68696-catch-during-unwind.rs @@ -3,7 +3,7 @@ // due to incorrect assumption that a current thread is not panicking when // entering the catch_unwind. // -// run-pass +//@ run-pass use std::panic::catch_unwind; diff --git a/tests/ui/issues/issue-6892.rs b/tests/ui/issues/issue-6892.rs index a361461a4ce..aff00cf60ba 100644 --- a/tests/ui/issues/issue-6892.rs +++ b/tests/ui/issues/issue-6892.rs @@ -1,4 +1,4 @@ -// run-pass +//@ run-pass #![allow(dead_code)] // Ensures that destructors are run for expressions of the form "let _ = e;" // where `e` is a type which requires a destructor. diff --git a/tests/ui/issues/issue-68951.rs b/tests/ui/issues/issue-68951.rs index 1c1e92c5bbc..2d639a62d45 100644 --- a/tests/ui/issues/issue-68951.rs +++ b/tests/ui/issues/issue-68951.rs @@ -1,4 +1,4 @@ -// check-pass +//@ check-pass fn main() { let array = [0x42u8; 10]; diff --git a/tests/ui/issues/issue-6898.rs b/tests/ui/issues/issue-6898.rs index 44fd4bd0735..cc0fe35fc88 100644 --- a/tests/ui/issues/issue-6898.rs +++ b/tests/ui/issues/issue-6898.rs @@ -1,5 +1,5 @@ -// check-pass -// pretty-expanded FIXME #23616 +//@ check-pass +//@ pretty-expanded FIXME #23616 use std::mem; diff --git a/tests/ui/issues/issue-6919.rs b/tests/ui/issues/issue-6919.rs index 6f1e1f97708..3aa66882c19 100644 --- a/tests/ui/issues/issue-6919.rs +++ b/tests/ui/issues/issue-6919.rs @@ -1,8 +1,8 @@ -// run-pass +//@ run-pass #![allow(unused_attributes)] -// aux-build:iss.rs +//@ aux-build:iss.rs -// pretty-expanded FIXME #23616 +//@ pretty-expanded FIXME #23616 extern crate issue6919_3; diff --git a/tests/ui/issues/issue-70093/issue-70093-link-directives.rs b/tests/ui/issues/issue-70093/issue-70093-link-directives.rs index 83f9b16c408..9c60affbccd 100644 --- a/tests/ui/issues/issue-70093/issue-70093-link-directives.rs +++ b/tests/ui/issues/issue-70093/issue-70093-link-directives.rs @@ -1,8 +1,8 @@ -// run-pass -// compile-flags: -Zlink-directives=no -// ignore-windows - this will probably only work on unixish systems -// ignore-fuchsia - missing __libc_start_main for some reason (#84733) -// ignore-cross-compile - default-linker-libraries=yes doesn't play well with cross compiling +//@ run-pass +//@ compile-flags: -Zlink-directives=no +//@ ignore-windows - this will probably only work on unixish systems +//@ ignore-fuchsia - missing __libc_start_main for some reason (#84733) +//@ ignore-cross-compile - default-linker-libraries=yes doesn't play well with cross compiling #[link(name = "some-random-non-existent-library", kind = "static")] extern "C" {} diff --git a/tests/ui/issues/issue-70093/issue-70093.rs b/tests/ui/issues/issue-70093/issue-70093.rs index 86459dc904a..86974239338 100644 --- a/tests/ui/issues/issue-70093/issue-70093.rs +++ b/tests/ui/issues/issue-70093/issue-70093.rs @@ -1,8 +1,8 @@ -// run-pass -// compile-flags: -Zlink-native-libraries=no -Cdefault-linker-libraries=yes -// ignore-windows - this will probably only work on unixish systems -// ignore-fuchsia - missing __libc_start_main for some reason (#84733) -// ignore-cross-compile - default-linker-libraries=yes doesn't play well with cross compiling +//@ run-pass +//@ compile-flags: -Zlink-native-libraries=no -Cdefault-linker-libraries=yes +//@ ignore-windows - this will probably only work on unixish systems +//@ ignore-fuchsia - missing __libc_start_main for some reason (#84733) +//@ ignore-cross-compile - default-linker-libraries=yes doesn't play well with cross compiling #[link(name = "some-random-non-existent-library", kind = "static")] extern "C" {} diff --git a/tests/ui/issues/issue-7012.rs b/tests/ui/issues/issue-7012.rs index 90eba170695..69b881e2a43 100644 --- a/tests/ui/issues/issue-7012.rs +++ b/tests/ui/issues/issue-7012.rs @@ -1,4 +1,4 @@ -// run-pass +//@ run-pass #![allow(non_camel_case_types)] #![allow(non_upper_case_globals)] diff --git a/tests/ui/issues/issue-70673.rs b/tests/ui/issues/issue-70673.rs index 3561f401277..3793ee7f58b 100644 --- a/tests/ui/issues/issue-70673.rs +++ b/tests/ui/issues/issue-70673.rs @@ -1,6 +1,6 @@ // Regression test for https://github.com/rust-lang/rust/issues/70673. -// run-pass +//@ run-pass #![feature(thread_local)] diff --git a/tests/ui/issues/issue-70746.rs b/tests/ui/issues/issue-70746.rs index 8930c15f57e..e7b48550397 100644 --- a/tests/ui/issues/issue-70746.rs +++ b/tests/ui/issues/issue-70746.rs @@ -1,4 +1,4 @@ -// check-pass +//@ check-pass pub trait Trait1 { type C; diff --git a/tests/ui/issues/issue-71676-suggest-deref/issue-71676-1.fixed b/tests/ui/issues/issue-71676-suggest-deref/issue-71676-1.fixed index cbc0e8c061b..8b473de4ac2 100644 --- a/tests/ui/issues/issue-71676-suggest-deref/issue-71676-1.fixed +++ b/tests/ui/issues/issue-71676-suggest-deref/issue-71676-1.fixed @@ -1,4 +1,4 @@ -// run-rustfix +//@ run-rustfix use std::ops::Deref; use std::ops::DerefMut; struct Bar(u8); diff --git a/tests/ui/issues/issue-71676-suggest-deref/issue-71676-1.rs b/tests/ui/issues/issue-71676-suggest-deref/issue-71676-1.rs index 6e87c7174c6..38d23fb8428 100644 --- a/tests/ui/issues/issue-71676-suggest-deref/issue-71676-1.rs +++ b/tests/ui/issues/issue-71676-suggest-deref/issue-71676-1.rs @@ -1,4 +1,4 @@ -// run-rustfix +//@ run-rustfix use std::ops::Deref; use std::ops::DerefMut; struct Bar(u8); diff --git a/tests/ui/issues/issue-7178.rs b/tests/ui/issues/issue-7178.rs index 30aa736cdc6..153ce2cf057 100644 --- a/tests/ui/issues/issue-7178.rs +++ b/tests/ui/issues/issue-7178.rs @@ -1,7 +1,7 @@ -// run-pass -// aux-build:issue-7178.rs +//@ run-pass +//@ aux-build:issue-7178.rs -// pretty-expanded FIXME #23616 +//@ pretty-expanded FIXME #23616 extern crate issue_7178 as cross_crate_self; diff --git a/tests/ui/issues/issue-72002.rs b/tests/ui/issues/issue-72002.rs index 54ff89355ff..ce3463069b8 100644 --- a/tests/ui/issues/issue-72002.rs +++ b/tests/ui/issues/issue-72002.rs @@ -1,4 +1,4 @@ -// check-pass +//@ check-pass struct Indexable; impl Indexable { diff --git a/tests/ui/issues/issue-72278.rs b/tests/ui/issues/issue-72278.rs index 92fd1f73a93..2a9cd942391 100644 --- a/tests/ui/issues/issue-72278.rs +++ b/tests/ui/issues/issue-72278.rs @@ -1,4 +1,4 @@ -// run-pass +//@ run-pass #![allow(unused)] diff --git a/tests/ui/issues/issue-7268.rs b/tests/ui/issues/issue-7268.rs index 309176fb0c5..99b780bcf5c 100644 --- a/tests/ui/issues/issue-7268.rs +++ b/tests/ui/issues/issue-7268.rs @@ -1,6 +1,6 @@ -// check-pass +//@ check-pass #![allow(dead_code)] -// pretty-expanded FIXME #23616 +//@ pretty-expanded FIXME #23616 fn foo(_: T) {} diff --git a/tests/ui/issues/issue-72933-match-stack-overflow.rs b/tests/ui/issues/issue-72933-match-stack-overflow.rs index aa796bcf5a0..6d091a91081 100644 --- a/tests/ui/issues/issue-72933-match-stack-overflow.rs +++ b/tests/ui/issues/issue-72933-match-stack-overflow.rs @@ -1,4 +1,4 @@ -// build-pass +//@ build-pass // ignore-tidy-filelength #![crate_type="rlib"] diff --git a/tests/ui/issues/issue-73112.rs b/tests/ui/issues/issue-73112.rs index cc7be9c95ae..89075b75624 100644 --- a/tests/ui/issues/issue-73112.rs +++ b/tests/ui/issues/issue-73112.rs @@ -1,4 +1,4 @@ -// aux-build:issue-73112.rs +//@ aux-build:issue-73112.rs extern crate issue_73112; diff --git a/tests/ui/issues/issue-73229.rs b/tests/ui/issues/issue-73229.rs index 35346199add..6d5eec2365e 100644 --- a/tests/ui/issues/issue-73229.rs +++ b/tests/ui/issues/issue-73229.rs @@ -1,4 +1,4 @@ -// check-pass +//@ check-pass fn any() -> T { loop {} diff --git a/tests/ui/issues/issue-7344.rs b/tests/ui/issues/issue-7344.rs index f1727d0c1ae..9503037723e 100644 --- a/tests/ui/issues/issue-7344.rs +++ b/tests/ui/issues/issue-7344.rs @@ -1,6 +1,6 @@ -// run-pass +//@ run-pass #![allow(unused_must_use)] -// pretty-expanded FIXME #23616 +//@ pretty-expanded FIXME #23616 #![allow(unreachable_code)] diff --git a/tests/ui/issues/issue-74236/auxiliary/dep.rs b/tests/ui/issues/issue-74236/auxiliary/dep.rs index 45f2601d307..88c182c44da 100644 --- a/tests/ui/issues/issue-74236/auxiliary/dep.rs +++ b/tests/ui/issues/issue-74236/auxiliary/dep.rs @@ -1,4 +1,4 @@ -// edition:2018 +//@ edition:2018 mod private { pub struct Pub; } diff --git a/tests/ui/issues/issue-74236/main.rs b/tests/ui/issues/issue-74236/main.rs index daa7cfcf9a1..741d9e476b3 100644 --- a/tests/ui/issues/issue-74236/main.rs +++ b/tests/ui/issues/issue-74236/main.rs @@ -1,6 +1,6 @@ -// edition:2018 -// aux-build:dep.rs -// compile-flags:--extern dep +//@ edition:2018 +//@ aux-build:dep.rs +//@ compile-flags:--extern dep fn main() { // Trigger an error that will print the path of dep::private::Pub (as "dep::Renamed"). diff --git a/tests/ui/issues/issue-74564-if-expr-stack-overflow.rs b/tests/ui/issues/issue-74564-if-expr-stack-overflow.rs index 36e9932602f..c0ffed27e6f 100644 --- a/tests/ui/issues/issue-74564-if-expr-stack-overflow.rs +++ b/tests/ui/issues/issue-74564-if-expr-stack-overflow.rs @@ -1,4 +1,4 @@ -// build-pass +//@ build-pass // ignore-tidy-filelength #![crate_type = "rlib"] diff --git a/tests/ui/issues/issue-7519-match-unit-in-arg.rs b/tests/ui/issues/issue-7519-match-unit-in-arg.rs index 7d838cbb09b..2b5f1b7f169 100644 --- a/tests/ui/issues/issue-7519-match-unit-in-arg.rs +++ b/tests/ui/issues/issue-7519-match-unit-in-arg.rs @@ -1,5 +1,5 @@ -// run-pass -// pretty-expanded FIXME #23616 +//@ run-pass +//@ pretty-expanded FIXME #23616 /* #7519 ICE pattern matching unit in function argument diff --git a/tests/ui/issues/issue-7563.rs b/tests/ui/issues/issue-7563.rs index c62405554b4..9ee8857b999 100644 --- a/tests/ui/issues/issue-7563.rs +++ b/tests/ui/issues/issue-7563.rs @@ -1,4 +1,4 @@ -// run-pass +//@ run-pass #![allow(dead_code)] trait IDummy { fn do_nothing(&self); diff --git a/tests/ui/issues/issue-75704.rs b/tests/ui/issues/issue-75704.rs index aed7ddbcb8c..1672bf0b4c3 100644 --- a/tests/ui/issues/issue-75704.rs +++ b/tests/ui/issues/issue-75704.rs @@ -1,6 +1,6 @@ // Caused an infinite loop during SimlifyCfg MIR transform previously. // -// build-pass +//@ build-pass fn main() { loop { continue; } diff --git a/tests/ui/issues/issue-7575.rs b/tests/ui/issues/issue-7575.rs index 0074f660c4e..8b1fdf6c851 100644 --- a/tests/ui/issues/issue-7575.rs +++ b/tests/ui/issues/issue-7575.rs @@ -1,4 +1,4 @@ -// run-pass +//@ run-pass trait Foo { //~ WARN trait `Foo` is never used fn new() -> bool { false } diff --git a/tests/ui/issues/issue-76042.rs b/tests/ui/issues/issue-76042.rs index 34d5293799a..279e860459d 100644 --- a/tests/ui/issues/issue-76042.rs +++ b/tests/ui/issues/issue-76042.rs @@ -1,5 +1,5 @@ -// run-pass -// compile-flags: -Coverflow-checks=off -Ccodegen-units=1 -Copt-level=0 +//@ run-pass +//@ compile-flags: -Coverflow-checks=off -Ccodegen-units=1 -Copt-level=0 fn foo(a: i128, b: i128, s: u32) -> (i128, i128) { if s == 128 { diff --git a/tests/ui/issues/issue-7607-2.rs b/tests/ui/issues/issue-7607-2.rs index 420a0ffd3cc..654f26bf298 100644 --- a/tests/ui/issues/issue-7607-2.rs +++ b/tests/ui/issues/issue-7607-2.rs @@ -1,6 +1,6 @@ -// check-pass +//@ check-pass #![allow(dead_code)] -// pretty-expanded FIXME #23616 +//@ pretty-expanded FIXME #23616 pub mod a { pub struct Foo { a: usize } diff --git a/tests/ui/issues/issue-76077-inaccesible-private-fields/issue-76077-1.fixed b/tests/ui/issues/issue-76077-inaccesible-private-fields/issue-76077-1.fixed index 8103a7ca47d..6fde4e390fa 100644 --- a/tests/ui/issues/issue-76077-inaccesible-private-fields/issue-76077-1.fixed +++ b/tests/ui/issues/issue-76077-inaccesible-private-fields/issue-76077-1.fixed @@ -1,4 +1,4 @@ -// run-rustfix +//@ run-rustfix #![allow(dead_code, unused_variables)] pub mod foo { diff --git a/tests/ui/issues/issue-76077-inaccesible-private-fields/issue-76077-1.rs b/tests/ui/issues/issue-76077-inaccesible-private-fields/issue-76077-1.rs index 730332853c1..30a8535faf5 100644 --- a/tests/ui/issues/issue-76077-inaccesible-private-fields/issue-76077-1.rs +++ b/tests/ui/issues/issue-76077-inaccesible-private-fields/issue-76077-1.rs @@ -1,4 +1,4 @@ -// run-rustfix +//@ run-rustfix #![allow(dead_code, unused_variables)] pub mod foo { diff --git a/tests/ui/issues/issue-7660.rs b/tests/ui/issues/issue-7660.rs index ad0b8ecff39..4b0f7d84b75 100644 --- a/tests/ui/issues/issue-7660.rs +++ b/tests/ui/issues/issue-7660.rs @@ -1,9 +1,9 @@ -// run-pass +//@ run-pass #![allow(unused_variables)] // Regression test for issue 7660 // rvalue lifetime too short when equivalent `match` works -// pretty-expanded FIXME #23616 +//@ pretty-expanded FIXME #23616 use std::collections::HashMap; diff --git a/tests/ui/issues/issue-7663.rs b/tests/ui/issues/issue-7663.rs index b15e215db0f..ad52ea21127 100644 --- a/tests/ui/issues/issue-7663.rs +++ b/tests/ui/issues/issue-7663.rs @@ -1,4 +1,4 @@ -// run-pass +//@ run-pass #![allow(unused_imports, dead_code)] diff --git a/tests/ui/issues/issue-7673-cast-generically-implemented-trait.rs b/tests/ui/issues/issue-7673-cast-generically-implemented-trait.rs index c089c330839..742152b6c81 100644 --- a/tests/ui/issues/issue-7673-cast-generically-implemented-trait.rs +++ b/tests/ui/issues/issue-7673-cast-generically-implemented-trait.rs @@ -1,6 +1,6 @@ -// check-pass +//@ check-pass #![allow(dead_code)] -// pretty-expanded FIXME #23616 +//@ pretty-expanded FIXME #23616 /* diff --git a/tests/ui/issues/issue-77218/issue-77218-2.fixed b/tests/ui/issues/issue-77218/issue-77218-2.fixed index 0e835d49c6d..98d79b5da65 100644 --- a/tests/ui/issues/issue-77218/issue-77218-2.fixed +++ b/tests/ui/issues/issue-77218/issue-77218-2.fixed @@ -1,4 +1,4 @@ -// run-rustfix +//@ run-rustfix fn main() { let value = [7u8]; while let Some(0) = value.get(0) { //~ ERROR invalid left-hand side of assignment diff --git a/tests/ui/issues/issue-77218/issue-77218-2.rs b/tests/ui/issues/issue-77218/issue-77218-2.rs index 01dca1ae16c..3be38f8f721 100644 --- a/tests/ui/issues/issue-77218/issue-77218-2.rs +++ b/tests/ui/issues/issue-77218/issue-77218-2.rs @@ -1,4 +1,4 @@ -// run-rustfix +//@ run-rustfix fn main() { let value = [7u8]; while Some(0) = value.get(0) { //~ ERROR invalid left-hand side of assignment diff --git a/tests/ui/issues/issue-77218/issue-77218.fixed b/tests/ui/issues/issue-77218/issue-77218.fixed index 4907b43b9a9..6ce9dd1c2c5 100644 --- a/tests/ui/issues/issue-77218/issue-77218.fixed +++ b/tests/ui/issues/issue-77218/issue-77218.fixed @@ -1,4 +1,4 @@ -// run-rustfix +//@ run-rustfix fn main() { let value = [7u8]; while let Some(0) = value.get(0) {} //~ ERROR invalid left-hand side of assignment diff --git a/tests/ui/issues/issue-77218/issue-77218.rs b/tests/ui/issues/issue-77218/issue-77218.rs index 0ed154bf4d8..14edc065d0e 100644 --- a/tests/ui/issues/issue-77218/issue-77218.rs +++ b/tests/ui/issues/issue-77218/issue-77218.rs @@ -1,4 +1,4 @@ -// run-rustfix +//@ run-rustfix fn main() { let value = [7u8]; while Some(0) = value.get(0) {} //~ ERROR invalid left-hand side of assignment diff --git a/tests/ui/issues/issue-7784.rs b/tests/ui/issues/issue-7784.rs index b7323f09daf..90b88ae5727 100644 --- a/tests/ui/issues/issue-7784.rs +++ b/tests/ui/issues/issue-7784.rs @@ -1,4 +1,4 @@ -// run-pass +//@ run-pass use std::ops::Add; diff --git a/tests/ui/issues/issue-78192.rs b/tests/ui/issues/issue-78192.rs index b5c3001599a..bec2a82910c 100644 --- a/tests/ui/issues/issue-78192.rs +++ b/tests/ui/issues/issue-78192.rs @@ -1,4 +1,4 @@ -// run-pass +//@ run-pass #![allow(unused_assignments)] diff --git a/tests/ui/issues/issue-7899.rs b/tests/ui/issues/issue-7899.rs index fb631f83697..a2aee240da7 100644 --- a/tests/ui/issues/issue-7899.rs +++ b/tests/ui/issues/issue-7899.rs @@ -1,8 +1,8 @@ -// run-pass +//@ run-pass #![allow(unused_variables)] -// aux-build:issue-7899.rs +//@ aux-build:issue-7899.rs -// pretty-expanded FIXME #23616 +//@ pretty-expanded FIXME #23616 extern crate issue_7899 as testcrate; diff --git a/tests/ui/issues/issue-7911.rs b/tests/ui/issues/issue-7911.rs index 114574b9009..11da4df5285 100644 --- a/tests/ui/issues/issue-7911.rs +++ b/tests/ui/issues/issue-7911.rs @@ -1,4 +1,4 @@ -// run-pass +//@ run-pass // (Closes #7911) Test that we can use the same self expression // with different mutability in macro in two methods diff --git a/tests/ui/issues/issue-8044.rs b/tests/ui/issues/issue-8044.rs index 858f98b654d..b965e0bbb10 100644 --- a/tests/ui/issues/issue-8044.rs +++ b/tests/ui/issues/issue-8044.rs @@ -1,7 +1,7 @@ -// run-pass -// aux-build:issue-8044.rs +//@ run-pass +//@ aux-build:issue-8044.rs -// pretty-expanded FIXME #23616 +//@ pretty-expanded FIXME #23616 extern crate issue_8044 as minimal; use minimal::{BTree, leaf}; diff --git a/tests/ui/issues/issue-81584.fixed b/tests/ui/issues/issue-81584.fixed index 1cad59f1062..c3d33a1b4f8 100644 --- a/tests/ui/issues/issue-81584.fixed +++ b/tests/ui/issues/issue-81584.fixed @@ -1,4 +1,4 @@ -// run-rustfix +//@ run-rustfix fn main() { let _ = vec![vec![0, 1], vec![2]] .into_iter() diff --git a/tests/ui/issues/issue-81584.rs b/tests/ui/issues/issue-81584.rs index 452288db08b..27db73aaa2c 100644 --- a/tests/ui/issues/issue-81584.rs +++ b/tests/ui/issues/issue-81584.rs @@ -1,4 +1,4 @@ -// run-rustfix +//@ run-rustfix fn main() { let _ = vec![vec![0, 1], vec![2]] .into_iter() diff --git a/tests/ui/issues/issue-8171-default-method-self-inherit-builtin-trait.rs b/tests/ui/issues/issue-8171-default-method-self-inherit-builtin-trait.rs index 505e7b84b5c..88d56185f6b 100644 --- a/tests/ui/issues/issue-8171-default-method-self-inherit-builtin-trait.rs +++ b/tests/ui/issues/issue-8171-default-method-self-inherit-builtin-trait.rs @@ -1,6 +1,6 @@ -// check-pass +//@ check-pass #![allow(dead_code)] -// pretty-expanded FIXME #23616 +//@ pretty-expanded FIXME #23616 /* diff --git a/tests/ui/issues/issue-81918.rs b/tests/ui/issues/issue-81918.rs index 8938b8a6f2c..ee9721c2493 100644 --- a/tests/ui/issues/issue-81918.rs +++ b/tests/ui/issues/issue-81918.rs @@ -1,6 +1,6 @@ -// check-pass -// dont-check-compiler-stdout -// compile-flags: -Z unpretty=mir-cfg +//@ check-pass +//@ dont-check-compiler-stdout +//@ compile-flags: -Z unpretty=mir-cfg // This checks that unpretty=mir-cfg does not panic. See #81918. diff --git a/tests/ui/issues/issue-8248.rs b/tests/ui/issues/issue-8248.rs index 94b1a5203b4..c34575df368 100644 --- a/tests/ui/issues/issue-8248.rs +++ b/tests/ui/issues/issue-8248.rs @@ -1,5 +1,5 @@ -// run-pass -// pretty-expanded FIXME #23616 +//@ run-pass +//@ pretty-expanded FIXME #23616 trait A { fn dummy(&self) { } //~ WARN method `dummy` is never used diff --git a/tests/ui/issues/issue-8249.rs b/tests/ui/issues/issue-8249.rs index d09dff3a697..67a42619316 100644 --- a/tests/ui/issues/issue-8249.rs +++ b/tests/ui/issues/issue-8249.rs @@ -1,6 +1,6 @@ -// run-pass +//@ run-pass #![allow(dead_code)] -// pretty-expanded FIXME #23616 +//@ pretty-expanded FIXME #23616 trait A { fn dummy(&self) { } diff --git a/tests/ui/issues/issue-8259.rs b/tests/ui/issues/issue-8259.rs index 2802bea7fe0..f790e1a2155 100644 --- a/tests/ui/issues/issue-8259.rs +++ b/tests/ui/issues/issue-8259.rs @@ -1,10 +1,10 @@ -// run-pass +//@ run-pass #![allow(dead_code)] #![allow(non_upper_case_globals)] -// aux-build:issue-8259.rs +//@ aux-build:issue-8259.rs -// pretty-expanded FIXME #23616 +//@ pretty-expanded FIXME #23616 extern crate issue_8259 as other; static a: other::Foo<'static> = other::Foo::A; diff --git a/tests/ui/issues/issue-83048.rs b/tests/ui/issues/issue-83048.rs index 8e4fb6eae9d..6c941133a15 100644 --- a/tests/ui/issues/issue-83048.rs +++ b/tests/ui/issues/issue-83048.rs @@ -1,4 +1,4 @@ -// compile-flags: -Z unpretty=thir-tree +//@ compile-flags: -Z unpretty=thir-tree pub fn main() { break; //~ ERROR: `break` outside of a loop or labeled block [E0268] diff --git a/tests/ui/issues/issue-8391.rs b/tests/ui/issues/issue-8391.rs index 1a90369659b..20698eed18b 100644 --- a/tests/ui/issues/issue-8391.rs +++ b/tests/ui/issues/issue-8391.rs @@ -1,4 +1,4 @@ -// run-pass +//@ run-pass fn main() { let x = match Some(1) { diff --git a/tests/ui/issues/issue-8398.rs b/tests/ui/issues/issue-8398.rs index 0ef39b6a6b3..6f91b1dbb28 100644 --- a/tests/ui/issues/issue-8398.rs +++ b/tests/ui/issues/issue-8398.rs @@ -1,6 +1,6 @@ -// check-pass +//@ check-pass #![allow(dead_code)] -// pretty-expanded FIXME #23616 +//@ pretty-expanded FIXME #23616 pub trait Writer { fn write(&mut self, b: &[u8]) -> Result<(), ()>; diff --git a/tests/ui/issues/issue-8401.rs b/tests/ui/issues/issue-8401.rs index 1257bab6c0c..b72616bb28f 100644 --- a/tests/ui/issues/issue-8401.rs +++ b/tests/ui/issues/issue-8401.rs @@ -1,7 +1,7 @@ -// run-pass -// aux-build:issue-8401.rs +//@ run-pass +//@ aux-build:issue-8401.rs -// pretty-expanded FIXME #23616 +//@ pretty-expanded FIXME #23616 extern crate issue_8401; diff --git a/tests/ui/issues/issue-8498.rs b/tests/ui/issues/issue-8498.rs index e6241b76109..92904e2198f 100644 --- a/tests/ui/issues/issue-8498.rs +++ b/tests/ui/issues/issue-8498.rs @@ -1,4 +1,4 @@ -// run-pass +//@ run-pass pub fn main() { match &[(Box::new(5),Box::new(7))] { diff --git a/tests/ui/issues/issue-8506.rs b/tests/ui/issues/issue-8506.rs index cc32b89234f..48abd7efc7b 100644 --- a/tests/ui/issues/issue-8506.rs +++ b/tests/ui/issues/issue-8506.rs @@ -1,5 +1,5 @@ -// run-pass -// pretty-expanded FIXME #23616 +//@ run-pass +//@ pretty-expanded FIXME #23616 #![allow(non_upper_case_globals)] #![allow(dead_code)] diff --git a/tests/ui/issues/issue-8521.rs b/tests/ui/issues/issue-8521.rs index 15fbd4465a0..78ce85787d5 100644 --- a/tests/ui/issues/issue-8521.rs +++ b/tests/ui/issues/issue-8521.rs @@ -1,4 +1,4 @@ -// check-pass +//@ check-pass trait Foo1 {} trait A {} diff --git a/tests/ui/issues/issue-85461.rs b/tests/ui/issues/issue-85461.rs index 092105df24e..7fe7a4aa579 100644 --- a/tests/ui/issues/issue-85461.rs +++ b/tests/ui/issues/issue-85461.rs @@ -1,7 +1,7 @@ -// compile-flags: -Cinstrument-coverage -Ccodegen-units=4 --crate-type dylib -Copt-level=0 -// build-pass -// needs-profiler-support -// needs-dynamic-linking +//@ compile-flags: -Cinstrument-coverage -Ccodegen-units=4 --crate-type dylib -Copt-level=0 +//@ build-pass +//@ needs-profiler-support +//@ needs-dynamic-linking // Regression test for #85461 where MSVC sometimes fails to link instrument-coverage binaries // with dead code and #[inline(always)]. diff --git a/tests/ui/issues/issue-8578.rs b/tests/ui/issues/issue-8578.rs index 2346ef5a950..e081d7a5415 100644 --- a/tests/ui/issues/issue-8578.rs +++ b/tests/ui/issues/issue-8578.rs @@ -1,8 +1,8 @@ -// check-pass +//@ check-pass #![allow(dead_code)] #![allow(non_camel_case_types)] #![allow(non_upper_case_globals)] -// pretty-expanded FIXME #23616 +//@ pretty-expanded FIXME #23616 pub struct UninterpretedOption_NamePart { name_part: Option, diff --git a/tests/ui/issues/issue-87199.rs b/tests/ui/issues/issue-87199.rs index d16d4067673..081c45d6151 100644 --- a/tests/ui/issues/issue-87199.rs +++ b/tests/ui/issues/issue-87199.rs @@ -2,7 +2,7 @@ // other than the only supported `?Sized` would still cause the compiler // to assume that the `Sized` bound was relaxed. -// check-fail +//@ check-fail // Check that these function definitions only emit warnings, not errors fn arg(_: T) {} diff --git a/tests/ui/issues/issue-8727.rs b/tests/ui/issues/issue-8727.rs index a9b8126618f..4ef66000374 100644 --- a/tests/ui/issues/issue-8727.rs +++ b/tests/ui/issues/issue-8727.rs @@ -1,8 +1,8 @@ // Verify the compiler fails with an error on infinite function // recursions. -// build-fail -// normalize-stderr-test: ".nll/" -> "/" +//@ build-fail +//@ normalize-stderr-test: ".nll/" -> "/" fn generic() { //~ WARN function cannot return without recursing generic::>(); diff --git a/tests/ui/issues/issue-87707.rs b/tests/ui/issues/issue-87707.rs index c14e52dfe4c..a0da8a740ac 100644 --- a/tests/ui/issues/issue-87707.rs +++ b/tests/ui/issues/issue-87707.rs @@ -1,9 +1,9 @@ // test for #87707 -// edition:2018 -// run-fail -// exec-env:RUST_BACKTRACE=0 -// check-run-results -// needs-unwind uses catch_unwind +//@ edition:2018 +//@ run-fail +//@ exec-env:RUST_BACKTRACE=0 +//@ check-run-results +//@ needs-unwind uses catch_unwind use std::sync::Once; use std::panic; diff --git a/tests/ui/issues/issue-8783.rs b/tests/ui/issues/issue-8783.rs index cfffd9eb018..a7c96b69b18 100644 --- a/tests/ui/issues/issue-8783.rs +++ b/tests/ui/issues/issue-8783.rs @@ -1,6 +1,6 @@ -// run-pass +//@ run-pass #![allow(unused_variables)] -// pretty-expanded FIXME #23616 +//@ pretty-expanded FIXME #23616 struct X { pub x: usize } impl Default for X { diff --git a/tests/ui/issues/issue-88150.rs b/tests/ui/issues/issue-88150.rs index 555a38637a4..1dadba307c0 100644 --- a/tests/ui/issues/issue-88150.rs +++ b/tests/ui/issues/issue-88150.rs @@ -1,6 +1,6 @@ -// run-pass -// compile-flags:-C debuginfo=2 -// edition:2018 +//@ run-pass +//@ compile-flags:-C debuginfo=2 +//@ edition:2018 use core::marker::PhantomData; diff --git a/tests/ui/issues/issue-8860.rs b/tests/ui/issues/issue-8860.rs index b89a80c1307..67e9a276ae4 100644 --- a/tests/ui/issues/issue-8860.rs +++ b/tests/ui/issues/issue-8860.rs @@ -1,4 +1,4 @@ -// run-pass +//@ run-pass #![allow(dead_code)] static mut DROP: isize = 0; diff --git a/tests/ui/issues/issue-8898.rs b/tests/ui/issues/issue-8898.rs index 31d5ff86e7c..4447704f059 100644 --- a/tests/ui/issues/issue-8898.rs +++ b/tests/ui/issues/issue-8898.rs @@ -1,4 +1,4 @@ -// run-pass +//@ run-pass fn assert_repr_eq(obj : T, expected : String) { assert_eq!(expected, format!("{:?}", obj)); diff --git a/tests/ui/issues/issue-9047.rs b/tests/ui/issues/issue-9047.rs index fa8d75aec7a..97733588d51 100644 --- a/tests/ui/issues/issue-9047.rs +++ b/tests/ui/issues/issue-9047.rs @@ -1,4 +1,4 @@ -// run-pass +//@ run-pass #![allow(unused_mut)] #![allow(unused_variables)] fn decode() -> String { diff --git a/tests/ui/issues/issue-9110.rs b/tests/ui/issues/issue-9110.rs index cbf3c92d033..9aeda7d5b1b 100644 --- a/tests/ui/issues/issue-9110.rs +++ b/tests/ui/issues/issue-9110.rs @@ -1,6 +1,6 @@ -// check-pass +//@ check-pass #![allow(dead_code)] -// pretty-expanded FIXME #23616 +//@ pretty-expanded FIXME #23616 #![allow(non_snake_case)] macro_rules! silly_macro { diff --git a/tests/ui/issues/issue-9123.rs b/tests/ui/issues/issue-9123.rs index 8c21d06c477..e554a8c8ff2 100644 --- a/tests/ui/issues/issue-9123.rs +++ b/tests/ui/issues/issue-9123.rs @@ -1,7 +1,7 @@ -// run-pass -// aux-build:issue-9123.rs +//@ run-pass +//@ aux-build:issue-9123.rs -// pretty-expanded FIXME #23616 +//@ pretty-expanded FIXME #23616 extern crate issue_9123; diff --git a/tests/ui/issues/issue-9129.rs b/tests/ui/issues/issue-9129.rs index 5d623ed540f..3856cd133e8 100644 --- a/tests/ui/issues/issue-9129.rs +++ b/tests/ui/issues/issue-9129.rs @@ -1,4 +1,4 @@ -// run-pass +//@ run-pass #![allow(dead_code)] #![allow(non_camel_case_types)] #![allow(non_snake_case)] diff --git a/tests/ui/issues/issue-91489.rs b/tests/ui/issues/issue-91489.rs index f028a4a3c6a..0566302c481 100644 --- a/tests/ui/issues/issue-91489.rs +++ b/tests/ui/issues/issue-91489.rs @@ -1,4 +1,4 @@ -// check-pass +//@ check-pass // regression test for #91489 diff --git a/tests/ui/issues/issue-9155.rs b/tests/ui/issues/issue-9155.rs index 4b5c451e853..e177c597800 100644 --- a/tests/ui/issues/issue-9155.rs +++ b/tests/ui/issues/issue-9155.rs @@ -1,7 +1,7 @@ -// run-pass -// aux-build:issue-9155.rs +//@ run-pass +//@ aux-build:issue-9155.rs -// pretty-expanded FIXME #23616 +//@ pretty-expanded FIXME #23616 extern crate issue_9155; diff --git a/tests/ui/issues/issue-9188.rs b/tests/ui/issues/issue-9188.rs index 34e61fdf68b..df2f90a0f16 100644 --- a/tests/ui/issues/issue-9188.rs +++ b/tests/ui/issues/issue-9188.rs @@ -1,5 +1,5 @@ -// run-pass -// aux-build:issue-9188.rs +//@ run-pass +//@ aux-build:issue-9188.rs extern crate issue_9188; diff --git a/tests/ui/issues/issue-9243.rs b/tests/ui/issues/issue-9243.rs index 59fdb466285..34ae944d1d8 100644 --- a/tests/ui/issues/issue-9243.rs +++ b/tests/ui/issues/issue-9243.rs @@ -1,4 +1,4 @@ -// build-pass +//@ build-pass #![allow(dead_code)] // Regression test for issue 9243 #![allow(non_upper_case_globals)] diff --git a/tests/ui/issues/issue-9249.rs b/tests/ui/issues/issue-9249.rs index caaba668ad7..893d01637de 100644 --- a/tests/ui/issues/issue-9249.rs +++ b/tests/ui/issues/issue-9249.rs @@ -1,6 +1,6 @@ -// check-pass +//@ check-pass #![allow(dead_code)] -// pretty-expanded FIXME #23616 +//@ pretty-expanded FIXME #23616 static DATA:&'static [&'static str] = &["my string"]; fn main() { } diff --git a/tests/ui/issues/issue-9259.rs b/tests/ui/issues/issue-9259.rs index d838edbdd66..c45288f7d65 100644 --- a/tests/ui/issues/issue-9259.rs +++ b/tests/ui/issues/issue-9259.rs @@ -1,4 +1,4 @@ -// run-pass +//@ run-pass #![allow(dead_code)] struct A<'a> { diff --git a/tests/ui/issues/issue-92741.fixed b/tests/ui/issues/issue-92741.fixed index d07aeb6c029..cb37d25273f 100644 --- a/tests/ui/issues/issue-92741.fixed +++ b/tests/ui/issues/issue-92741.fixed @@ -1,4 +1,4 @@ -// run-rustfix +//@ run-rustfix fn main() {} fn _foo() -> bool { if true { true } else { false } diff --git a/tests/ui/issues/issue-92741.rs b/tests/ui/issues/issue-92741.rs index 413d5bf0478..f2e5fdafd9c 100644 --- a/tests/ui/issues/issue-92741.rs +++ b/tests/ui/issues/issue-92741.rs @@ -1,4 +1,4 @@ -// run-rustfix +//@ run-rustfix fn main() {} fn _foo() -> bool { & //~ ERROR 4:5: 6:36: mismatched types [E0308] diff --git a/tests/ui/issues/issue-9382.rs b/tests/ui/issues/issue-9382.rs index 65718343fc6..4b37e5b381f 100644 --- a/tests/ui/issues/issue-9382.rs +++ b/tests/ui/issues/issue-9382.rs @@ -1,7 +1,7 @@ -// pretty-expanded FIXME #23616 +//@ pretty-expanded FIXME #23616 -// run-pass +//@ run-pass #![allow(dead_code)] // Tests for a previous bug that occurred due to an interaction diff --git a/tests/ui/issues/issue-9446.rs b/tests/ui/issues/issue-9446.rs index e200840d290..a6ea91e8785 100644 --- a/tests/ui/issues/issue-9446.rs +++ b/tests/ui/issues/issue-9446.rs @@ -1,4 +1,4 @@ -// run-pass +//@ run-pass struct Wrapper(String); impl Wrapper { diff --git a/tests/ui/issues/issue-9719.rs b/tests/ui/issues/issue-9719.rs index e8c3c9c194a..e48c020328a 100644 --- a/tests/ui/issues/issue-9719.rs +++ b/tests/ui/issues/issue-9719.rs @@ -1,6 +1,6 @@ -// build-pass +//@ build-pass #![allow(dead_code)] -// pretty-expanded FIXME #23616 +//@ pretty-expanded FIXME #23616 mod a { pub enum Enum { diff --git a/tests/ui/issues/issue-9737.rs b/tests/ui/issues/issue-9737.rs index 7d3e0567847..a8a17e58dd6 100644 --- a/tests/ui/issues/issue-9737.rs +++ b/tests/ui/issues/issue-9737.rs @@ -1,4 +1,4 @@ -// run-pass +//@ run-pass #![allow(unused_variables)] macro_rules! f { (v: $x:expr) => ( println!("{}", $x) ) diff --git a/tests/ui/issues/issue-9837.rs b/tests/ui/issues/issue-9837.rs index 5d2c822a576..33152a5d077 100644 --- a/tests/ui/issues/issue-9837.rs +++ b/tests/ui/issues/issue-9837.rs @@ -1,4 +1,4 @@ -// run-pass +//@ run-pass const C1: i32 = 0x12345678; const C2: isize = C1 as i16 as isize; diff --git a/tests/ui/issues/issue-9906.rs b/tests/ui/issues/issue-9906.rs index a2870cf0f6e..b425df4975f 100644 --- a/tests/ui/issues/issue-9906.rs +++ b/tests/ui/issues/issue-9906.rs @@ -1,7 +1,7 @@ -// run-pass -// aux-build:issue-9906.rs +//@ run-pass +//@ aux-build:issue-9906.rs -// pretty-expanded FIXME #23616 +//@ pretty-expanded FIXME #23616 extern crate issue_9906 as testmod; diff --git a/tests/ui/issues/issue-9918.rs b/tests/ui/issues/issue-9918.rs index 63ad7040d67..017e833aefb 100644 --- a/tests/ui/issues/issue-9918.rs +++ b/tests/ui/issues/issue-9918.rs @@ -1,4 +1,4 @@ -// run-pass +//@ run-pass pub fn main() { assert_eq!((0 + 0u8) as char, '\0'); diff --git a/tests/ui/issues/issue-9942.rs b/tests/ui/issues/issue-9942.rs index f4880446526..76c90903306 100644 --- a/tests/ui/issues/issue-9942.rs +++ b/tests/ui/issues/issue-9942.rs @@ -1,5 +1,5 @@ -// run-pass -// pretty-expanded FIXME #23616 +//@ run-pass +//@ pretty-expanded FIXME #23616 pub fn main() { const S: usize = 23 as usize; [0; S]; () diff --git a/tests/ui/issues/issue-9951.rs b/tests/ui/issues/issue-9951.rs index 5db3f74efaa..42a65c701f7 100644 --- a/tests/ui/issues/issue-9951.rs +++ b/tests/ui/issues/issue-9951.rs @@ -1,5 +1,5 @@ -// run-pass -// pretty-expanded FIXME #23616 +//@ run-pass +//@ pretty-expanded FIXME #23616 #![allow(unused_variables)] diff --git a/tests/ui/issues/issue-9968.rs b/tests/ui/issues/issue-9968.rs index 3ab90d99af9..5ceea056634 100644 --- a/tests/ui/issues/issue-9968.rs +++ b/tests/ui/issues/issue-9968.rs @@ -1,7 +1,7 @@ -// run-pass -// aux-build:issue-9968.rs +//@ run-pass +//@ aux-build:issue-9968.rs -// pretty-expanded FIXME #23616 +//@ pretty-expanded FIXME #23616 extern crate issue_9968 as lib; diff --git a/tests/ui/issues/issue-99838.rs b/tests/ui/issues/issue-99838.rs index 3bddca43daa..687b47fbe71 100644 --- a/tests/ui/issues/issue-99838.rs +++ b/tests/ui/issues/issue-99838.rs @@ -1,4 +1,4 @@ -// run-pass +//@ run-pass use std::hint; diff --git a/tests/ui/item-name-overload.rs b/tests/ui/item-name-overload.rs index c8a302a2c5b..54aa470e59e 100644 --- a/tests/ui/item-name-overload.rs +++ b/tests/ui/item-name-overload.rs @@ -1,10 +1,10 @@ -// run-pass +//@ run-pass #![allow(dead_code)] -// pretty-expanded FIXME #23616 +//@ pretty-expanded FIXME #23616 mod foo { pub fn baz() { } diff --git a/tests/ui/iterators/array-of-ranges.rs b/tests/ui/iterators/array-of-ranges.rs index 037540a3e89..1ec1032940a 100644 --- a/tests/ui/iterators/array-of-ranges.rs +++ b/tests/ui/iterators/array-of-ranges.rs @@ -1,4 +1,4 @@ -// check-pass +//@ check-pass fn main() { for _ in [0..1] {} diff --git a/tests/ui/iterators/array.rs b/tests/ui/iterators/array.rs index 5985c74e11f..c83c5889967 100644 --- a/tests/ui/iterators/array.rs +++ b/tests/ui/iterators/array.rs @@ -1,4 +1,4 @@ -// check-pass +//@ check-pass fn main() { for _ in [1, 2] {} diff --git a/tests/ui/iterators/into-iter-on-arrays-2018.rs b/tests/ui/iterators/into-iter-on-arrays-2018.rs index 60995170a51..d2354405236 100644 --- a/tests/ui/iterators/into-iter-on-arrays-2018.rs +++ b/tests/ui/iterators/into-iter-on-arrays-2018.rs @@ -1,5 +1,5 @@ -// check-pass -// edition:2018 +//@ check-pass +//@ edition:2018 use std::array::IntoIter; use std::ops::Deref; diff --git a/tests/ui/iterators/into-iter-on-arrays-2021.rs b/tests/ui/iterators/into-iter-on-arrays-2021.rs index 158317efe47..1bda0ebf6cb 100644 --- a/tests/ui/iterators/into-iter-on-arrays-2021.rs +++ b/tests/ui/iterators/into-iter-on-arrays-2021.rs @@ -1,5 +1,5 @@ -// check-pass -// edition:2021 +//@ check-pass +//@ edition:2021 use std::array::IntoIter; use std::ops::Deref; diff --git a/tests/ui/iterators/into-iter-on-arrays-lint.fixed b/tests/ui/iterators/into-iter-on-arrays-lint.fixed index 5b91aaf9ea5..be754a28ffa 100644 --- a/tests/ui/iterators/into-iter-on-arrays-lint.fixed +++ b/tests/ui/iterators/into-iter-on-arrays-lint.fixed @@ -1,6 +1,6 @@ -// run-pass -// run-rustfix -// rustfix-only-machine-applicable +//@ run-pass +//@ run-rustfix +//@ rustfix-only-machine-applicable #[allow(unused_must_use, unused_allocation)] fn main() { diff --git a/tests/ui/iterators/into-iter-on-arrays-lint.rs b/tests/ui/iterators/into-iter-on-arrays-lint.rs index 25b0cef73d7..e4dddb325cd 100644 --- a/tests/ui/iterators/into-iter-on-arrays-lint.rs +++ b/tests/ui/iterators/into-iter-on-arrays-lint.rs @@ -1,6 +1,6 @@ -// run-pass -// run-rustfix -// rustfix-only-machine-applicable +//@ run-pass +//@ run-rustfix +//@ rustfix-only-machine-applicable #[allow(unused_must_use, unused_allocation)] fn main() { diff --git a/tests/ui/iterators/into-iterator-type-inference-shift.rs b/tests/ui/iterators/into-iterator-type-inference-shift.rs index 9151172fd15..b550dc27f5c 100644 --- a/tests/ui/iterators/into-iterator-type-inference-shift.rs +++ b/tests/ui/iterators/into-iterator-type-inference-shift.rs @@ -1,4 +1,4 @@ -// run-pass +//@ run-pass #![allow(unused_must_use)] #![allow(dead_code)] #![allow(unused_mut)] @@ -8,7 +8,7 @@ // propagation yet, and so we just saw a type variable, yielding an // error. -// pretty-expanded FIXME #23616 +//@ pretty-expanded FIXME #23616 trait IntoIterator { type Iter: Iterator; diff --git a/tests/ui/iterators/invalid-iterator-chain-fixable.fixed b/tests/ui/iterators/invalid-iterator-chain-fixable.fixed index 513b5bd13d8..81e532a8923 100644 --- a/tests/ui/iterators/invalid-iterator-chain-fixable.fixed +++ b/tests/ui/iterators/invalid-iterator-chain-fixable.fixed @@ -1,4 +1,4 @@ -// run-rustfix +//@ run-rustfix use std::collections::hash_set::Iter; use std::collections::HashSet; diff --git a/tests/ui/iterators/invalid-iterator-chain-fixable.rs b/tests/ui/iterators/invalid-iterator-chain-fixable.rs index 79b861702c7..06b493d5889 100644 --- a/tests/ui/iterators/invalid-iterator-chain-fixable.rs +++ b/tests/ui/iterators/invalid-iterator-chain-fixable.rs @@ -1,4 +1,4 @@ -// run-rustfix +//@ run-rustfix use std::collections::hash_set::Iter; use std::collections::HashSet; diff --git a/tests/ui/iterators/issue-58952-filter-type-length.rs b/tests/ui/iterators/issue-58952-filter-type-length.rs index 8e9cc84ec03..9904eddb598 100644 --- a/tests/ui/iterators/issue-58952-filter-type-length.rs +++ b/tests/ui/iterators/issue-58952-filter-type-length.rs @@ -1,5 +1,5 @@ -// run-pass -// ignore-compare-mode-next-solver (hangs) +//@ run-pass +//@ ignore-compare-mode-next-solver (hangs) //! This snippet causes the type length to blowup exponentially, //! so check that we don't accidentally exceed the type length limit. diff --git a/tests/ui/iterators/iter-cloned-type-inference.rs b/tests/ui/iterators/iter-cloned-type-inference.rs index 898e3371971..10f95588118 100644 --- a/tests/ui/iterators/iter-cloned-type-inference.rs +++ b/tests/ui/iterators/iter-cloned-type-inference.rs @@ -1,4 +1,4 @@ -// run-pass +//@ run-pass #![allow(stable_features)] // Test to see that the element type of .cloned() can be inferred diff --git a/tests/ui/iterators/iter-count-overflow-debug.rs b/tests/ui/iterators/iter-count-overflow-debug.rs index 8e59c11e9dc..333d3f258ad 100644 --- a/tests/ui/iterators/iter-count-overflow-debug.rs +++ b/tests/ui/iterators/iter-count-overflow-debug.rs @@ -1,7 +1,7 @@ -// run-pass -// only-32bit too impatient for 2⁶⁓ items -// needs-unwind -// compile-flags: -C debug_assertions=yes -C opt-level=3 +//@ run-pass +//@ only-32bit too impatient for 2⁶⁓ items +//@ needs-unwind +//@ compile-flags: -C debug_assertions=yes -C opt-level=3 use std::panic; diff --git a/tests/ui/iterators/iter-count-overflow-ndebug.rs b/tests/ui/iterators/iter-count-overflow-ndebug.rs index dcaaff671b2..a4d5db2221d 100644 --- a/tests/ui/iterators/iter-count-overflow-ndebug.rs +++ b/tests/ui/iterators/iter-count-overflow-ndebug.rs @@ -1,6 +1,6 @@ -// run-pass -// only-32bit too impatient for 2⁶⁓ items -// compile-flags: -C debug_assertions=no -C opt-level=3 +//@ run-pass +//@ only-32bit too impatient for 2⁶⁓ items +//@ compile-flags: -C debug_assertions=no -C opt-level=3 fn main() { assert_eq!((0..usize::MAX).by_ref().count(), usize::MAX); diff --git a/tests/ui/iterators/iter-map-fold-type-length.rs b/tests/ui/iterators/iter-map-fold-type-length.rs index 8ce4fcd8731..6444fb9dada 100644 --- a/tests/ui/iterators/iter-map-fold-type-length.rs +++ b/tests/ui/iterators/iter-map-fold-type-length.rs @@ -1,4 +1,4 @@ -// run-pass +//@ run-pass //! Check that type lengths don't explode with `Map` folds. //! //! The normal limit is a million, and this test used to exceed 1.5 million, but diff --git a/tests/ui/iterators/iter-position-overflow-debug.rs b/tests/ui/iterators/iter-position-overflow-debug.rs index 7a871e744c9..f27f2233c40 100644 --- a/tests/ui/iterators/iter-position-overflow-debug.rs +++ b/tests/ui/iterators/iter-position-overflow-debug.rs @@ -1,7 +1,7 @@ -// run-pass -// only-32bit too impatient for 2⁶⁓ items -// needs-unwind -// compile-flags: -C debug_assertions=yes -C opt-level=3 +//@ run-pass +//@ only-32bit too impatient for 2⁶⁓ items +//@ needs-unwind +//@ compile-flags: -C debug_assertions=yes -C opt-level=3 use std::panic; diff --git a/tests/ui/iterators/iter-position-overflow-ndebug.rs b/tests/ui/iterators/iter-position-overflow-ndebug.rs index e610c35599c..f15cd9ec2a2 100644 --- a/tests/ui/iterators/iter-position-overflow-ndebug.rs +++ b/tests/ui/iterators/iter-position-overflow-ndebug.rs @@ -1,6 +1,6 @@ -// run-pass -// only-32bit too impatient for 2⁶⁓ items -// compile-flags: -C debug_assertions=no -C opt-level=3 +//@ run-pass +//@ only-32bit too impatient for 2⁶⁓ items +//@ compile-flags: -C debug_assertions=no -C opt-level=3 fn main() { let n = usize::MAX as u64; diff --git a/tests/ui/iterators/iter-range.rs b/tests/ui/iterators/iter-range.rs index 993d93790e0..9594729c06c 100644 --- a/tests/ui/iterators/iter-range.rs +++ b/tests/ui/iterators/iter-range.rs @@ -1,4 +1,4 @@ -// run-pass +//@ run-pass fn range_(a: isize, b: isize, mut it: F) where F: FnMut(isize) { diff --git a/tests/ui/iterators/iter-step-overflow-debug.rs b/tests/ui/iterators/iter-step-overflow-debug.rs index 6aa349ebed2..f72e389f551 100644 --- a/tests/ui/iterators/iter-step-overflow-debug.rs +++ b/tests/ui/iterators/iter-step-overflow-debug.rs @@ -1,6 +1,6 @@ -// run-pass -// needs-unwind -// compile-flags: -C debug_assertions=yes +//@ run-pass +//@ needs-unwind +//@ compile-flags: -C debug_assertions=yes use std::panic; diff --git a/tests/ui/iterators/iter-step-overflow-ndebug.rs b/tests/ui/iterators/iter-step-overflow-ndebug.rs index 33e708769ba..509b532aaa2 100644 --- a/tests/ui/iterators/iter-step-overflow-ndebug.rs +++ b/tests/ui/iterators/iter-step-overflow-ndebug.rs @@ -1,5 +1,5 @@ -// run-pass -// compile-flags: -C debug_assertions=no +//@ run-pass +//@ compile-flags: -C debug_assertions=no fn main() { let mut it = u8::MAX..; diff --git a/tests/ui/iterators/iter-sum-overflow-debug.rs b/tests/ui/iterators/iter-sum-overflow-debug.rs index 24c764ff958..32efc925a45 100644 --- a/tests/ui/iterators/iter-sum-overflow-debug.rs +++ b/tests/ui/iterators/iter-sum-overflow-debug.rs @@ -1,6 +1,6 @@ -// run-pass -// needs-unwind -// compile-flags: -C debug_assertions=yes +//@ run-pass +//@ needs-unwind +//@ compile-flags: -C debug_assertions=yes use std::panic; diff --git a/tests/ui/iterators/iter-sum-overflow-ndebug.rs b/tests/ui/iterators/iter-sum-overflow-ndebug.rs index 69f4744cc2a..821425ea84e 100644 --- a/tests/ui/iterators/iter-sum-overflow-ndebug.rs +++ b/tests/ui/iterators/iter-sum-overflow-ndebug.rs @@ -1,5 +1,5 @@ -// run-pass -// compile-flags: -C debug_assertions=no +//@ run-pass +//@ compile-flags: -C debug_assertions=no fn main() { assert_eq!([1i32, i32::MAX].iter().sum::(), diff --git a/tests/ui/iterators/iter-sum-overflow-overflow-checks.rs b/tests/ui/iterators/iter-sum-overflow-overflow-checks.rs index be45c075d73..8fffd19e2be 100644 --- a/tests/ui/iterators/iter-sum-overflow-overflow-checks.rs +++ b/tests/ui/iterators/iter-sum-overflow-overflow-checks.rs @@ -1,6 +1,6 @@ -// run-pass -// needs-unwind -// compile-flags: -C overflow-checks +//@ run-pass +//@ needs-unwind +//@ compile-flags: -C overflow-checks use std::panic; diff --git a/tests/ui/iterators/rsplit-clone.rs b/tests/ui/iterators/rsplit-clone.rs index 911da742957..bdef21f3dd6 100644 --- a/tests/ui/iterators/rsplit-clone.rs +++ b/tests/ui/iterators/rsplit-clone.rs @@ -1,4 +1,4 @@ -// check-pass +//@ check-pass // RSplit previously required T: Clone in order to be Clone diff --git a/tests/ui/iterators/skip-count-overflow.rs b/tests/ui/iterators/skip-count-overflow.rs index 64dee3e3c8b..6f8ca7173fe 100644 --- a/tests/ui/iterators/skip-count-overflow.rs +++ b/tests/ui/iterators/skip-count-overflow.rs @@ -1,6 +1,6 @@ -// run-pass -// only-32bit too impatient for 2⁶⁓ items -// compile-flags: -C overflow-checks -C opt-level=3 +//@ run-pass +//@ only-32bit too impatient for 2⁶⁓ items +//@ compile-flags: -C overflow-checks -C opt-level=3 fn main() { let i = (0..usize::MAX).chain(0..10).skip(usize::MAX); diff --git a/tests/ui/json/json-and-color.rs b/tests/ui/json/json-and-color.rs index 6f8326fe247..e5f44cedc80 100644 --- a/tests/ui/json/json-and-color.rs +++ b/tests/ui/json/json-and-color.rs @@ -1,3 +1,3 @@ -// compile-flags: --json=artifacts --error-format=json --color never +//@ compile-flags: --json=artifacts --error-format=json --color never fn main() {} diff --git a/tests/ui/json/json-and-error-format.rs b/tests/ui/json/json-and-error-format.rs index 6e2d73c76b7..0a00106f726 100644 --- a/tests/ui/json/json-and-error-format.rs +++ b/tests/ui/json/json-and-error-format.rs @@ -1,3 +1,3 @@ -// compile-flags: --json=artifacts --error-format=short +//@ compile-flags: --json=artifacts --error-format=short fn main() {} diff --git a/tests/ui/json/json-bom-plus-crlf-multifile-aux.rs b/tests/ui/json/json-bom-plus-crlf-multifile-aux.rs index 991ea1d85d2..94b1e188ced 100644 --- a/tests/ui/json/json-bom-plus-crlf-multifile-aux.rs +++ b/tests/ui/json/json-bom-plus-crlf-multifile-aux.rs @@ -1,6 +1,6 @@ // (This line has BOM so it's ignored by compiletest for directives) // -// ignore-test Not a test. Used by other tests +//@ ignore-test Not a test. Used by other tests // ignore-tidy-cr // For easier verifying, the byte offsets in this file should match those diff --git a/tests/ui/json/json-bom-plus-crlf-multifile.rs b/tests/ui/json/json-bom-plus-crlf-multifile.rs index 9290e010403..ae608770aae 100644 --- a/tests/ui/json/json-bom-plus-crlf-multifile.rs +++ b/tests/ui/json/json-bom-plus-crlf-multifile.rs @@ -1,6 +1,6 @@ // (This line has BOM so it's ignored by compiletest for directives) // -// compile-flags: --json=diagnostic-short --error-format=json +//@ compile-flags: --json=diagnostic-short --error-format=json // ignore-tidy-cr #[path = "json-bom-plus-crlf-multifile-aux.rs"] diff --git a/tests/ui/json/json-bom-plus-crlf-multifile.stderr b/tests/ui/json/json-bom-plus-crlf-multifile.stderr index 0c6c654d60a..2ed26f9a8a5 100644 --- a/tests/ui/json/json-bom-plus-crlf-multifile.stderr +++ b/tests/ui/json/json-bom-plus-crlf-multifile.stderr @@ -24,7 +24,7 @@ This error occurs when an expression was used in a place where the compiler expected an expression of a different type. It can occur in several cases, the most common being when calling a function and passing an argument which has a different type than the matching type in the function declaration. -"},"level":"error","spans":[{"file_name":"$DIR/json-bom-plus-crlf-multifile-aux.rs","byte_start":621,"byte_end":622,"line_start":17,"line_end":17,"column_start":22,"column_end":23,"is_primary":true,"text":[{"text":" let s : String = 1; // Error in the middle of line.","highlight_start":22,"highlight_end":23}],"label":"expected `String`, found integer","suggested_replacement":null,"suggestion_applicability":null,"expansion":null},{"file_name":"$DIR/json-bom-plus-crlf-multifile-aux.rs","byte_start":612,"byte_end":618,"line_start":17,"line_end":17,"column_start":13,"column_end":19,"is_primary":false,"text":[{"text":" let s : String = 1; // Error in the middle of line.","highlight_start":13,"highlight_end":19}],"label":"expected due to this","suggested_replacement":null,"suggestion_applicability":null,"expansion":null}],"children":[{"message":"try using a conversion method","code":null,"level":"help","spans":[{"file_name":"$DIR/json-bom-plus-crlf-multifile-aux.rs","byte_start":622,"byte_end":622,"line_start":17,"line_end":17,"column_start":23,"column_end":23,"is_primary":true,"text":[{"text":" let s : String = 1; // Error in the middle of line.","highlight_start":23,"highlight_end":23}],"label":null,"suggested_replacement":".to_string()","suggestion_applicability":"MaybeIncorrect","expansion":null}],"children":[],"rendered":null}],"rendered":"$DIR/json-bom-plus-crlf-multifile-aux.rs:17:22: error[E0308]: mismatched types +"},"level":"error","spans":[{"file_name":"$DIR/json-bom-plus-crlf-multifile-aux.rs","byte_start":622,"byte_end":623,"line_start":17,"line_end":17,"column_start":22,"column_end":23,"is_primary":true,"text":[{"text":" let s : String = 1; // Error in the middle of line.","highlight_start":22,"highlight_end":23}],"label":"expected `String`, found integer","suggested_replacement":null,"suggestion_applicability":null,"expansion":null},{"file_name":"$DIR/json-bom-plus-crlf-multifile-aux.rs","byte_start":613,"byte_end":619,"line_start":17,"line_end":17,"column_start":13,"column_end":19,"is_primary":false,"text":[{"text":" let s : String = 1; // Error in the middle of line.","highlight_start":13,"highlight_end":19}],"label":"expected due to this","suggested_replacement":null,"suggestion_applicability":null,"expansion":null}],"children":[{"message":"try using a conversion method","code":null,"level":"help","spans":[{"file_name":"$DIR/json-bom-plus-crlf-multifile-aux.rs","byte_start":623,"byte_end":623,"line_start":17,"line_end":17,"column_start":23,"column_end":23,"is_primary":true,"text":[{"text":" let s : String = 1; // Error in the middle of line.","highlight_start":23,"highlight_end":23}],"label":null,"suggested_replacement":".to_string()","suggestion_applicability":"MaybeIncorrect","expansion":null}],"children":[],"rendered":null}],"rendered":"$DIR/json-bom-plus-crlf-multifile-aux.rs:17:22: error[E0308]: mismatched types "} {"$message_type":"diagnostic","message":"mismatched types","code":{"code":"E0308","explanation":"Expected type did not match the received type. @@ -52,7 +52,7 @@ This error occurs when an expression was used in a place where the compiler expected an expression of a different type. It can occur in several cases, the most common being when calling a function and passing an argument which has a different type than the matching type in the function declaration. -"},"level":"error","spans":[{"file_name":"$DIR/json-bom-plus-crlf-multifile-aux.rs","byte_start":681,"byte_end":682,"line_start":19,"line_end":19,"column_start":22,"column_end":23,"is_primary":true,"text":[{"text":" let s : String = 1","highlight_start":22,"highlight_end":23}],"label":"expected `String`, found integer","suggested_replacement":null,"suggestion_applicability":null,"expansion":null},{"file_name":"$DIR/json-bom-plus-crlf-multifile-aux.rs","byte_start":672,"byte_end":678,"line_start":19,"line_end":19,"column_start":13,"column_end":19,"is_primary":false,"text":[{"text":" let s : String = 1","highlight_start":13,"highlight_end":19}],"label":"expected due to this","suggested_replacement":null,"suggestion_applicability":null,"expansion":null}],"children":[{"message":"try using a conversion method","code":null,"level":"help","spans":[{"file_name":"$DIR/json-bom-plus-crlf-multifile-aux.rs","byte_start":682,"byte_end":682,"line_start":19,"line_end":19,"column_start":23,"column_end":23,"is_primary":true,"text":[{"text":" let s : String = 1","highlight_start":23,"highlight_end":23}],"label":null,"suggested_replacement":".to_string()","suggestion_applicability":"MaybeIncorrect","expansion":null}],"children":[],"rendered":null}],"rendered":"$DIR/json-bom-plus-crlf-multifile-aux.rs:19:22: error[E0308]: mismatched types +"},"level":"error","spans":[{"file_name":"$DIR/json-bom-plus-crlf-multifile-aux.rs","byte_start":682,"byte_end":683,"line_start":19,"line_end":19,"column_start":22,"column_end":23,"is_primary":true,"text":[{"text":" let s : String = 1","highlight_start":22,"highlight_end":23}],"label":"expected `String`, found integer","suggested_replacement":null,"suggestion_applicability":null,"expansion":null},{"file_name":"$DIR/json-bom-plus-crlf-multifile-aux.rs","byte_start":673,"byte_end":679,"line_start":19,"line_end":19,"column_start":13,"column_end":19,"is_primary":false,"text":[{"text":" let s : String = 1","highlight_start":13,"highlight_end":19}],"label":"expected due to this","suggested_replacement":null,"suggestion_applicability":null,"expansion":null}],"children":[{"message":"try using a conversion method","code":null,"level":"help","spans":[{"file_name":"$DIR/json-bom-plus-crlf-multifile-aux.rs","byte_start":683,"byte_end":683,"line_start":19,"line_end":19,"column_start":23,"column_end":23,"is_primary":true,"text":[{"text":" let s : String = 1","highlight_start":23,"highlight_end":23}],"label":null,"suggested_replacement":".to_string()","suggestion_applicability":"MaybeIncorrect","expansion":null}],"children":[],"rendered":null}],"rendered":"$DIR/json-bom-plus-crlf-multifile-aux.rs:19:22: error[E0308]: mismatched types "} {"$message_type":"diagnostic","message":"mismatched types","code":{"code":"E0308","explanation":"Expected type did not match the received type. @@ -80,7 +80,7 @@ This error occurs when an expression was used in a place where the compiler expected an expression of a different type. It can occur in several cases, the most common being when calling a function and passing an argument which has a different type than the matching type in the function declaration. -"},"level":"error","spans":[{"file_name":"$DIR/json-bom-plus-crlf-multifile-aux.rs","byte_start":745,"byte_end":746,"line_start":23,"line_end":23,"column_start":1,"column_end":2,"is_primary":true,"text":[{"text":"1; // Error after the newline.","highlight_start":1,"highlight_end":2}],"label":"expected `String`, found integer","suggested_replacement":null,"suggestion_applicability":null,"expansion":null},{"file_name":"$DIR/json-bom-plus-crlf-multifile-aux.rs","byte_start":735,"byte_end":741,"line_start":22,"line_end":22,"column_start":13,"column_end":19,"is_primary":false,"text":[{"text":" let s : String =","highlight_start":13,"highlight_end":19}],"label":"expected due to this","suggested_replacement":null,"suggestion_applicability":null,"expansion":null}],"children":[{"message":"try using a conversion method","code":null,"level":"help","spans":[{"file_name":"$DIR/json-bom-plus-crlf-multifile-aux.rs","byte_start":746,"byte_end":746,"line_start":23,"line_end":23,"column_start":2,"column_end":2,"is_primary":true,"text":[{"text":"1; // Error after the newline.","highlight_start":2,"highlight_end":2}],"label":null,"suggested_replacement":".to_string()","suggestion_applicability":"MaybeIncorrect","expansion":null}],"children":[],"rendered":null}],"rendered":"$DIR/json-bom-plus-crlf-multifile-aux.rs:23:1: error[E0308]: mismatched types +"},"level":"error","spans":[{"file_name":"$DIR/json-bom-plus-crlf-multifile-aux.rs","byte_start":746,"byte_end":747,"line_start":23,"line_end":23,"column_start":1,"column_end":2,"is_primary":true,"text":[{"text":"1; // Error after the newline.","highlight_start":1,"highlight_end":2}],"label":"expected `String`, found integer","suggested_replacement":null,"suggestion_applicability":null,"expansion":null},{"file_name":"$DIR/json-bom-plus-crlf-multifile-aux.rs","byte_start":736,"byte_end":742,"line_start":22,"line_end":22,"column_start":13,"column_end":19,"is_primary":false,"text":[{"text":" let s : String =","highlight_start":13,"highlight_end":19}],"label":"expected due to this","suggested_replacement":null,"suggestion_applicability":null,"expansion":null}],"children":[{"message":"try using a conversion method","code":null,"level":"help","spans":[{"file_name":"$DIR/json-bom-plus-crlf-multifile-aux.rs","byte_start":747,"byte_end":747,"line_start":23,"line_end":23,"column_start":2,"column_end":2,"is_primary":true,"text":[{"text":"1; // Error after the newline.","highlight_start":2,"highlight_end":2}],"label":null,"suggested_replacement":".to_string()","suggestion_applicability":"MaybeIncorrect","expansion":null}],"children":[],"rendered":null}],"rendered":"$DIR/json-bom-plus-crlf-multifile-aux.rs:23:1: error[E0308]: mismatched types "} {"$message_type":"diagnostic","message":"mismatched types","code":{"code":"E0308","explanation":"Expected type did not match the received type. @@ -108,7 +108,7 @@ This error occurs when an expression was used in a place where the compiler expected an expression of a different type. It can occur in several cases, the most common being when calling a function and passing an argument which has a different type than the matching type in the function declaration. -"},"level":"error","spans":[{"file_name":"$DIR/json-bom-plus-crlf-multifile-aux.rs","byte_start":801,"byte_end":809,"line_start":25,"line_end":26,"column_start":22,"column_end":6,"is_primary":true,"text":[{"text":" let s : String = (","highlight_start":22,"highlight_end":23},{"text":" ); // Error spanning the newline.","highlight_start":1,"highlight_end":6}],"label":"expected `String`, found `()`","suggested_replacement":null,"suggestion_applicability":null,"expansion":null},{"file_name":"$DIR/json-bom-plus-crlf-multifile-aux.rs","byte_start":792,"byte_end":798,"line_start":25,"line_end":25,"column_start":13,"column_end":19,"is_primary":false,"text":[{"text":" let s : String = (","highlight_start":13,"highlight_end":19}],"label":"expected due to this","suggested_replacement":null,"suggestion_applicability":null,"expansion":null}],"children":[],"rendered":"$DIR/json-bom-plus-crlf-multifile-aux.rs:25:22: error[E0308]: mismatched types +"},"level":"error","spans":[{"file_name":"$DIR/json-bom-plus-crlf-multifile-aux.rs","byte_start":802,"byte_end":810,"line_start":25,"line_end":26,"column_start":22,"column_end":6,"is_primary":true,"text":[{"text":" let s : String = (","highlight_start":22,"highlight_end":23},{"text":" ); // Error spanning the newline.","highlight_start":1,"highlight_end":6}],"label":"expected `String`, found `()`","suggested_replacement":null,"suggestion_applicability":null,"expansion":null},{"file_name":"$DIR/json-bom-plus-crlf-multifile-aux.rs","byte_start":793,"byte_end":799,"line_start":25,"line_end":25,"column_start":13,"column_end":19,"is_primary":false,"text":[{"text":" let s : String = (","highlight_start":13,"highlight_end":19}],"label":"expected due to this","suggested_replacement":null,"suggestion_applicability":null,"expansion":null}],"children":[],"rendered":"$DIR/json-bom-plus-crlf-multifile-aux.rs:25:22: error[E0308]: mismatched types "} {"$message_type":"diagnostic","message":"aborting due to 4 previous errors","code":null,"level":"error","spans":[],"children":[],"rendered":"error: aborting due to 4 previous errors "} diff --git a/tests/ui/json/json-bom-plus-crlf.rs b/tests/ui/json/json-bom-plus-crlf.rs index be5b7dd2a86..4a309128199 100644 --- a/tests/ui/json/json-bom-plus-crlf.rs +++ b/tests/ui/json/json-bom-plus-crlf.rs @@ -1,6 +1,6 @@ // (This line has BOM so it's ignored by compiletest for directives) // -// compile-flags: --json=diagnostic-short --error-format=json +//@ compile-flags: --json=diagnostic-short --error-format=json // ignore-tidy-cr // For easier verifying, the byte offsets in this file should match those diff --git a/tests/ui/json/json-bom-plus-crlf.stderr b/tests/ui/json/json-bom-plus-crlf.stderr index 31dbacb59e1..b5e6f658616 100644 --- a/tests/ui/json/json-bom-plus-crlf.stderr +++ b/tests/ui/json/json-bom-plus-crlf.stderr @@ -24,7 +24,7 @@ This error occurs when an expression was used in a place where the compiler expected an expression of a different type. It can occur in several cases, the most common being when calling a function and passing an argument which has a different type than the matching type in the function declaration. -"},"level":"error","spans":[{"file_name":"$DIR/json-bom-plus-crlf.rs","byte_start":606,"byte_end":607,"line_start":16,"line_end":16,"column_start":22,"column_end":23,"is_primary":true,"text":[{"text":" let s : String = 1; // Error in the middle of line.","highlight_start":22,"highlight_end":23}],"label":"expected `String`, found integer","suggested_replacement":null,"suggestion_applicability":null,"expansion":null},{"file_name":"$DIR/json-bom-plus-crlf.rs","byte_start":597,"byte_end":603,"line_start":16,"line_end":16,"column_start":13,"column_end":19,"is_primary":false,"text":[{"text":" let s : String = 1; // Error in the middle of line.","highlight_start":13,"highlight_end":19}],"label":"expected due to this","suggested_replacement":null,"suggestion_applicability":null,"expansion":null}],"children":[{"message":"try using a conversion method","code":null,"level":"help","spans":[{"file_name":"$DIR/json-bom-plus-crlf.rs","byte_start":607,"byte_end":607,"line_start":16,"line_end":16,"column_start":23,"column_end":23,"is_primary":true,"text":[{"text":" let s : String = 1; // Error in the middle of line.","highlight_start":23,"highlight_end":23}],"label":null,"suggested_replacement":".to_string()","suggestion_applicability":"MaybeIncorrect","expansion":null}],"children":[],"rendered":null}],"rendered":"$DIR/json-bom-plus-crlf.rs:16:22: error[E0308]: mismatched types +"},"level":"error","spans":[{"file_name":"$DIR/json-bom-plus-crlf.rs","byte_start":607,"byte_end":608,"line_start":16,"line_end":16,"column_start":22,"column_end":23,"is_primary":true,"text":[{"text":" let s : String = 1; // Error in the middle of line.","highlight_start":22,"highlight_end":23}],"label":"expected `String`, found integer","suggested_replacement":null,"suggestion_applicability":null,"expansion":null},{"file_name":"$DIR/json-bom-plus-crlf.rs","byte_start":598,"byte_end":604,"line_start":16,"line_end":16,"column_start":13,"column_end":19,"is_primary":false,"text":[{"text":" let s : String = 1; // Error in the middle of line.","highlight_start":13,"highlight_end":19}],"label":"expected due to this","suggested_replacement":null,"suggestion_applicability":null,"expansion":null}],"children":[{"message":"try using a conversion method","code":null,"level":"help","spans":[{"file_name":"$DIR/json-bom-plus-crlf.rs","byte_start":608,"byte_end":608,"line_start":16,"line_end":16,"column_start":23,"column_end":23,"is_primary":true,"text":[{"text":" let s : String = 1; // Error in the middle of line.","highlight_start":23,"highlight_end":23}],"label":null,"suggested_replacement":".to_string()","suggestion_applicability":"MaybeIncorrect","expansion":null}],"children":[],"rendered":null}],"rendered":"$DIR/json-bom-plus-crlf.rs:16:22: error[E0308]: mismatched types "} {"$message_type":"diagnostic","message":"mismatched types","code":{"code":"E0308","explanation":"Expected type did not match the received type. @@ -52,7 +52,7 @@ This error occurs when an expression was used in a place where the compiler expected an expression of a different type. It can occur in several cases, the most common being when calling a function and passing an argument which has a different type than the matching type in the function declaration. -"},"level":"error","spans":[{"file_name":"$DIR/json-bom-plus-crlf.rs","byte_start":666,"byte_end":667,"line_start":18,"line_end":18,"column_start":22,"column_end":23,"is_primary":true,"text":[{"text":" let s : String = 1","highlight_start":22,"highlight_end":23}],"label":"expected `String`, found integer","suggested_replacement":null,"suggestion_applicability":null,"expansion":null},{"file_name":"$DIR/json-bom-plus-crlf.rs","byte_start":657,"byte_end":663,"line_start":18,"line_end":18,"column_start":13,"column_end":19,"is_primary":false,"text":[{"text":" let s : String = 1","highlight_start":13,"highlight_end":19}],"label":"expected due to this","suggested_replacement":null,"suggestion_applicability":null,"expansion":null}],"children":[{"message":"try using a conversion method","code":null,"level":"help","spans":[{"file_name":"$DIR/json-bom-plus-crlf.rs","byte_start":667,"byte_end":667,"line_start":18,"line_end":18,"column_start":23,"column_end":23,"is_primary":true,"text":[{"text":" let s : String = 1","highlight_start":23,"highlight_end":23}],"label":null,"suggested_replacement":".to_string()","suggestion_applicability":"MaybeIncorrect","expansion":null}],"children":[],"rendered":null}],"rendered":"$DIR/json-bom-plus-crlf.rs:18:22: error[E0308]: mismatched types +"},"level":"error","spans":[{"file_name":"$DIR/json-bom-plus-crlf.rs","byte_start":667,"byte_end":668,"line_start":18,"line_end":18,"column_start":22,"column_end":23,"is_primary":true,"text":[{"text":" let s : String = 1","highlight_start":22,"highlight_end":23}],"label":"expected `String`, found integer","suggested_replacement":null,"suggestion_applicability":null,"expansion":null},{"file_name":"$DIR/json-bom-plus-crlf.rs","byte_start":658,"byte_end":664,"line_start":18,"line_end":18,"column_start":13,"column_end":19,"is_primary":false,"text":[{"text":" let s : String = 1","highlight_start":13,"highlight_end":19}],"label":"expected due to this","suggested_replacement":null,"suggestion_applicability":null,"expansion":null}],"children":[{"message":"try using a conversion method","code":null,"level":"help","spans":[{"file_name":"$DIR/json-bom-plus-crlf.rs","byte_start":668,"byte_end":668,"line_start":18,"line_end":18,"column_start":23,"column_end":23,"is_primary":true,"text":[{"text":" let s : String = 1","highlight_start":23,"highlight_end":23}],"label":null,"suggested_replacement":".to_string()","suggestion_applicability":"MaybeIncorrect","expansion":null}],"children":[],"rendered":null}],"rendered":"$DIR/json-bom-plus-crlf.rs:18:22: error[E0308]: mismatched types "} {"$message_type":"diagnostic","message":"mismatched types","code":{"code":"E0308","explanation":"Expected type did not match the received type. @@ -80,7 +80,7 @@ This error occurs when an expression was used in a place where the compiler expected an expression of a different type. It can occur in several cases, the most common being when calling a function and passing an argument which has a different type than the matching type in the function declaration. -"},"level":"error","spans":[{"file_name":"$DIR/json-bom-plus-crlf.rs","byte_start":730,"byte_end":731,"line_start":22,"line_end":22,"column_start":1,"column_end":2,"is_primary":true,"text":[{"text":"1; // Error after the newline.","highlight_start":1,"highlight_end":2}],"label":"expected `String`, found integer","suggested_replacement":null,"suggestion_applicability":null,"expansion":null},{"file_name":"$DIR/json-bom-plus-crlf.rs","byte_start":720,"byte_end":726,"line_start":21,"line_end":21,"column_start":13,"column_end":19,"is_primary":false,"text":[{"text":" let s : String =","highlight_start":13,"highlight_end":19}],"label":"expected due to this","suggested_replacement":null,"suggestion_applicability":null,"expansion":null}],"children":[{"message":"try using a conversion method","code":null,"level":"help","spans":[{"file_name":"$DIR/json-bom-plus-crlf.rs","byte_start":731,"byte_end":731,"line_start":22,"line_end":22,"column_start":2,"column_end":2,"is_primary":true,"text":[{"text":"1; // Error after the newline.","highlight_start":2,"highlight_end":2}],"label":null,"suggested_replacement":".to_string()","suggestion_applicability":"MaybeIncorrect","expansion":null}],"children":[],"rendered":null}],"rendered":"$DIR/json-bom-plus-crlf.rs:22:1: error[E0308]: mismatched types +"},"level":"error","spans":[{"file_name":"$DIR/json-bom-plus-crlf.rs","byte_start":731,"byte_end":732,"line_start":22,"line_end":22,"column_start":1,"column_end":2,"is_primary":true,"text":[{"text":"1; // Error after the newline.","highlight_start":1,"highlight_end":2}],"label":"expected `String`, found integer","suggested_replacement":null,"suggestion_applicability":null,"expansion":null},{"file_name":"$DIR/json-bom-plus-crlf.rs","byte_start":721,"byte_end":727,"line_start":21,"line_end":21,"column_start":13,"column_end":19,"is_primary":false,"text":[{"text":" let s : String =","highlight_start":13,"highlight_end":19}],"label":"expected due to this","suggested_replacement":null,"suggestion_applicability":null,"expansion":null}],"children":[{"message":"try using a conversion method","code":null,"level":"help","spans":[{"file_name":"$DIR/json-bom-plus-crlf.rs","byte_start":732,"byte_end":732,"line_start":22,"line_end":22,"column_start":2,"column_end":2,"is_primary":true,"text":[{"text":"1; // Error after the newline.","highlight_start":2,"highlight_end":2}],"label":null,"suggested_replacement":".to_string()","suggestion_applicability":"MaybeIncorrect","expansion":null}],"children":[],"rendered":null}],"rendered":"$DIR/json-bom-plus-crlf.rs:22:1: error[E0308]: mismatched types "} {"$message_type":"diagnostic","message":"mismatched types","code":{"code":"E0308","explanation":"Expected type did not match the received type. @@ -108,7 +108,7 @@ This error occurs when an expression was used in a place where the compiler expected an expression of a different type. It can occur in several cases, the most common being when calling a function and passing an argument which has a different type than the matching type in the function declaration. -"},"level":"error","spans":[{"file_name":"$DIR/json-bom-plus-crlf.rs","byte_start":786,"byte_end":794,"line_start":24,"line_end":25,"column_start":22,"column_end":6,"is_primary":true,"text":[{"text":" let s : String = (","highlight_start":22,"highlight_end":23},{"text":" ); // Error spanning the newline.","highlight_start":1,"highlight_end":6}],"label":"expected `String`, found `()`","suggested_replacement":null,"suggestion_applicability":null,"expansion":null},{"file_name":"$DIR/json-bom-plus-crlf.rs","byte_start":777,"byte_end":783,"line_start":24,"line_end":24,"column_start":13,"column_end":19,"is_primary":false,"text":[{"text":" let s : String = (","highlight_start":13,"highlight_end":19}],"label":"expected due to this","suggested_replacement":null,"suggestion_applicability":null,"expansion":null}],"children":[],"rendered":"$DIR/json-bom-plus-crlf.rs:24:22: error[E0308]: mismatched types +"},"level":"error","spans":[{"file_name":"$DIR/json-bom-plus-crlf.rs","byte_start":787,"byte_end":795,"line_start":24,"line_end":25,"column_start":22,"column_end":6,"is_primary":true,"text":[{"text":" let s : String = (","highlight_start":22,"highlight_end":23},{"text":" ); // Error spanning the newline.","highlight_start":1,"highlight_end":6}],"label":"expected `String`, found `()`","suggested_replacement":null,"suggestion_applicability":null,"expansion":null},{"file_name":"$DIR/json-bom-plus-crlf.rs","byte_start":778,"byte_end":784,"line_start":24,"line_end":24,"column_start":13,"column_end":19,"is_primary":false,"text":[{"text":" let s : String = (","highlight_start":13,"highlight_end":19}],"label":"expected due to this","suggested_replacement":null,"suggestion_applicability":null,"expansion":null}],"children":[],"rendered":"$DIR/json-bom-plus-crlf.rs:24:22: error[E0308]: mismatched types "} {"$message_type":"diagnostic","message":"aborting due to 4 previous errors","code":null,"level":"error","spans":[],"children":[],"rendered":"error: aborting due to 4 previous errors "} diff --git a/tests/ui/json/json-invalid.rs b/tests/ui/json/json-invalid.rs index 54d0dd1849a..a0d1db76d97 100644 --- a/tests/ui/json/json-invalid.rs +++ b/tests/ui/json/json-invalid.rs @@ -1,3 +1,3 @@ -// compile-flags: --json=foo --error-format=json +//@ compile-flags: --json=foo --error-format=json fn main() {} diff --git a/tests/ui/json/json-multiple.rs b/tests/ui/json/json-multiple.rs index fb126339dc2..296a60d2453 100644 --- a/tests/ui/json/json-multiple.rs +++ b/tests/ui/json/json-multiple.rs @@ -1,5 +1,5 @@ -// build-pass -// ignore-pass (different metadata emitted in different modes) -// compile-flags: --json=diagnostic-short --json artifacts --error-format=json +//@ build-pass +//@ ignore-pass (different metadata emitted in different modes) +//@ compile-flags: --json=diagnostic-short --json artifacts --error-format=json #![crate_type = "lib"] diff --git a/tests/ui/json/json-options.rs b/tests/ui/json/json-options.rs index 8b6ba131eb0..33df25e27b6 100644 --- a/tests/ui/json/json-options.rs +++ b/tests/ui/json/json-options.rs @@ -1,5 +1,5 @@ -// build-pass -// ignore-pass (different metadata emitted in different modes) -// compile-flags: --json=diagnostic-short,artifacts --error-format=json +//@ build-pass +//@ ignore-pass (different metadata emitted in different modes) +//@ compile-flags: --json=diagnostic-short,artifacts --error-format=json #![crate_type = "lib"] diff --git a/tests/ui/json/json-short.rs b/tests/ui/json/json-short.rs index 7414a55869c..1b8f0b46366 100644 --- a/tests/ui/json/json-short.rs +++ b/tests/ui/json/json-short.rs @@ -1 +1 @@ -// compile-flags: --json=diagnostic-short --error-format=json +//@ compile-flags: --json=diagnostic-short --error-format=json diff --git a/tests/ui/json/json-short.stderr b/tests/ui/json/json-short.stderr index a18bceaa6cf..a3d579cadcc 100644 --- a/tests/ui/json/json-short.stderr +++ b/tests/ui/json/json-short.stderr @@ -13,7 +13,7 @@ If you don't know the basics of Rust, you can look at the [Rust Book][rust-book] to get started. [rust-book]: https://doc.rust-lang.org/book/ -"},"level":"error","spans":[{"file_name":"$DIR/json-short.rs","byte_start":62,"byte_end":62,"line_start":1,"line_end":1,"column_start":63,"column_end":63,"is_primary":true,"text":[{"text":"// compile-flags: --json=diagnostic-short --error-format=json","highlight_start":63,"highlight_end":63}],"label":"consider adding a `main` function to `$DIR/json-short.rs`","suggested_replacement":null,"suggestion_applicability":null,"expansion":null}],"children":[],"rendered":"$DIR/json-short.rs:1:63: error[E0601]: `main` function not found in crate `json_short` +"},"level":"error","spans":[{"file_name":"$DIR/json-short.rs","byte_start":63,"byte_end":63,"line_start":1,"line_end":1,"column_start":64,"column_end":64,"is_primary":true,"text":[{"text":"//@ compile-flags: --json=diagnostic-short --error-format=json","highlight_start":64,"highlight_end":64}],"label":"consider adding a `main` function to `$DIR/json-short.rs`","suggested_replacement":null,"suggestion_applicability":null,"expansion":null}],"children":[],"rendered":"$DIR/json-short.rs:1:64: error[E0601]: `main` function not found in crate `json_short` "} {"$message_type":"diagnostic","message":"aborting due to 1 previous error","code":null,"level":"error","spans":[],"children":[],"rendered":"error: aborting due to 1 previous error "} diff --git a/tests/ui/kindck/kindck-inherited-copy-bound.rs b/tests/ui/kindck/kindck-inherited-copy-bound.rs index 87d47556bdd..c785736f42e 100644 --- a/tests/ui/kindck/kindck-inherited-copy-bound.rs +++ b/tests/ui/kindck/kindck-inherited-copy-bound.rs @@ -1,6 +1,6 @@ // Test that Copy bounds inherited by trait are checked. // -// revisions: curr object_safe_for_dispatch +//@ revisions: curr object_safe_for_dispatch #![cfg_attr(object_safe_for_dispatch, feature(object_safe_for_dispatch))] diff --git a/tests/ui/kinds-in-metadata.rs b/tests/ui/kinds-in-metadata.rs index 136037a7acf..d557f949c76 100644 --- a/tests/ui/kinds-in-metadata.rs +++ b/tests/ui/kinds-in-metadata.rs @@ -1,7 +1,7 @@ -// run-pass -// aux-build:kinds_in_metadata.rs +//@ run-pass +//@ aux-build:kinds_in_metadata.rs -// pretty-expanded FIXME #23616 +//@ pretty-expanded FIXME #23616 /* Any copyright is dedicated to the Public Domain. * http://creativecommons.org/publicdomain/zero/1.0/ */ diff --git a/tests/ui/label/label-beginning-with-underscore.rs b/tests/ui/label/label-beginning-with-underscore.rs index 4b620864aab..d5e076ddf50 100644 --- a/tests/ui/label/label-beginning-with-underscore.rs +++ b/tests/ui/label/label-beginning-with-underscore.rs @@ -1,4 +1,4 @@ -// check-pass +//@ check-pass #![deny(unused_labels)] diff --git a/tests/ui/label/label_break_value_desugared_break.rs b/tests/ui/label/label_break_value_desugared_break.rs index 70227d86933..b7e7fd47c27 100644 --- a/tests/ui/label/label_break_value_desugared_break.rs +++ b/tests/ui/label/label_break_value_desugared_break.rs @@ -1,7 +1,7 @@ -// compile-flags: --edition 2018 +//@ compile-flags: --edition 2018 #![feature(try_blocks)] -// run-pass +//@ run-pass fn main() { let _: Result<(), ()> = try { 'foo: { diff --git a/tests/ui/label/label_break_value_illegal_uses.fixed b/tests/ui/label/label_break_value_illegal_uses.fixed index fb75276b4f4..a22f7a77610 100644 --- a/tests/ui/label/label_break_value_illegal_uses.fixed +++ b/tests/ui/label/label_break_value_illegal_uses.fixed @@ -1,4 +1,4 @@ -// run-rustfix +//@ run-rustfix // These are forbidden occurrences of label-break-value diff --git a/tests/ui/label/label_break_value_illegal_uses.rs b/tests/ui/label/label_break_value_illegal_uses.rs index 3cbf41380e6..a9194c9221d 100644 --- a/tests/ui/label/label_break_value_illegal_uses.rs +++ b/tests/ui/label/label_break_value_illegal_uses.rs @@ -1,4 +1,4 @@ -// run-rustfix +//@ run-rustfix // These are forbidden occurrences of label-break-value diff --git a/tests/ui/lambda-infer-unresolved.rs b/tests/ui/lambda-infer-unresolved.rs index 9cc466b28ec..f30832044dc 100644 --- a/tests/ui/lambda-infer-unresolved.rs +++ b/tests/ui/lambda-infer-unresolved.rs @@ -1,4 +1,4 @@ -// run-pass +//@ run-pass #![allow(unused_mut)] // This should typecheck even though the type of e is not fully diff --git a/tests/ui/lang-items/duplicate.rs b/tests/ui/lang-items/duplicate.rs index f88d2354414..2b68fef87c0 100644 --- a/tests/ui/lang-items/duplicate.rs +++ b/tests/ui/lang-items/duplicate.rs @@ -1,4 +1,4 @@ -// normalize-stderr-test "loaded from .*libcore-.*.rlib" -> "loaded from SYSROOT/libcore-*.rlib" +//@ normalize-stderr-test "loaded from .*libcore-.*.rlib" -> "loaded from SYSROOT/libcore-*.rlib" #![feature(lang_items)] #[lang = "sized"] diff --git a/tests/ui/lang-items/issue-19660.rs b/tests/ui/lang-items/issue-19660.rs index 400ac310b96..aff57df7ece 100644 --- a/tests/ui/lang-items/issue-19660.rs +++ b/tests/ui/lang-items/issue-19660.rs @@ -1,4 +1,4 @@ -// error-pattern: requires `copy` lang_item +//@ error-pattern: requires `copy` lang_item #![feature(lang_items, start, no_core)] #![no_core] diff --git a/tests/ui/lang-items/lang-item-missing.rs b/tests/ui/lang-items/lang-item-missing.rs index 4e26343242e..8762594202a 100644 --- a/tests/ui/lang-items/lang-item-missing.rs +++ b/tests/ui/lang-items/lang-item-missing.rs @@ -1,7 +1,7 @@ // Test that a missing lang item (in this case `sized`) does not cause an ICE, // see #17392. -// error-pattern: requires `sized` lang_item +//@ error-pattern: requires `sized` lang_item #![feature(start, no_core)] #![no_core] diff --git a/tests/ui/lang-items/required-lang-item.rs b/tests/ui/lang-items/required-lang-item.rs index 7f8933ac2ad..495daf08dd2 100644 --- a/tests/ui/lang-items/required-lang-item.rs +++ b/tests/ui/lang-items/required-lang-item.rs @@ -1,4 +1,4 @@ -// edition: 2018 +//@ edition: 2018 #![feature(lang_items, no_core)] #![no_core] diff --git a/tests/ui/lang-items/start_lang_item_args.rs b/tests/ui/lang-items/start_lang_item_args.rs index 4a0302bcb15..5bb99e2adc8 100644 --- a/tests/ui/lang-items/start_lang_item_args.rs +++ b/tests/ui/lang-items/start_lang_item_args.rs @@ -1,6 +1,6 @@ -// check-fail -// revisions: missing_all_args missing_sigpipe_arg missing_ret start_ret too_many_args -// revisions: main_ty main_args main_ret argc argv_inner_ptr argv sigpipe +//@ check-fail +//@ revisions: missing_all_args missing_sigpipe_arg missing_ret start_ret too_many_args +//@ revisions: main_ty main_args main_ret argc argv_inner_ptr argv sigpipe #![feature(lang_items, no_core)] #![no_core] diff --git a/tests/ui/lang-items/start_lang_item_with_target_feature.rs b/tests/ui/lang-items/start_lang_item_with_target_feature.rs index 3052b7bb563..4717304c5c6 100644 --- a/tests/ui/lang-items/start_lang_item_with_target_feature.rs +++ b/tests/ui/lang-items/start_lang_item_with_target_feature.rs @@ -1,5 +1,5 @@ -// only-x86_64 -// check-fail +//@ only-x86_64 +//@ check-fail #![feature(lang_items, no_core, target_feature_11)] #![no_core] diff --git a/tests/ui/last-use-in-block.rs b/tests/ui/last-use-in-block.rs index 1ab847dcd8a..4a166b97bda 100644 --- a/tests/ui/last-use-in-block.rs +++ b/tests/ui/last-use-in-block.rs @@ -1,4 +1,4 @@ -// run-pass +//@ run-pass #![allow(dead_code)] #![allow(unused_parens)] diff --git a/tests/ui/last-use-in-cap-clause.rs b/tests/ui/last-use-in-cap-clause.rs index 98d43463287..23c263c9805 100644 --- a/tests/ui/last-use-in-cap-clause.rs +++ b/tests/ui/last-use-in-cap-clause.rs @@ -1,4 +1,4 @@ -// run-pass +//@ run-pass #![allow(dead_code)] // Make sure #1399 stays fixed diff --git a/tests/ui/last-use-is-capture.rs b/tests/ui/last-use-is-capture.rs index 1055fe7995b..6e07895f1d3 100644 --- a/tests/ui/last-use-is-capture.rs +++ b/tests/ui/last-use-is-capture.rs @@ -1,4 +1,4 @@ -// run-pass +//@ run-pass #![allow(dead_code)] // Make sure #1399 stays fixed diff --git a/tests/ui/late-bound-lifetimes/cross_crate_alias.rs b/tests/ui/late-bound-lifetimes/cross_crate_alias.rs index 4154c279243..4c2f15d2e95 100644 --- a/tests/ui/late-bound-lifetimes/cross_crate_alias.rs +++ b/tests/ui/late-bound-lifetimes/cross_crate_alias.rs @@ -1,5 +1,5 @@ -// aux-build:upstream_alias.rs -// check-pass +//@ aux-build:upstream_alias.rs +//@ check-pass extern crate upstream_alias; diff --git a/tests/ui/late-bound-lifetimes/downgraded_to_early_through_alias.rs b/tests/ui/late-bound-lifetimes/downgraded_to_early_through_alias.rs index e56a34218e2..76364f0911c 100644 --- a/tests/ui/late-bound-lifetimes/downgraded_to_early_through_alias.rs +++ b/tests/ui/late-bound-lifetimes/downgraded_to_early_through_alias.rs @@ -1,4 +1,4 @@ -// check-pass +//@ check-pass trait Gats<'a> { type Assoc; diff --git a/tests/ui/late-bound-lifetimes/issue-36381.rs b/tests/ui/late-bound-lifetimes/issue-36381.rs index 7db56f1dce8..23ab15c3116 100644 --- a/tests/ui/late-bound-lifetimes/issue-36381.rs +++ b/tests/ui/late-bound-lifetimes/issue-36381.rs @@ -1,4 +1,4 @@ -// run-pass +//@ run-pass // Regression test for #36381. The monomorphization collector was asserting that // there are no projection types, but the `<&str as // StreamOnce>::Position` projection contained a late-bound region, diff --git a/tests/ui/late-bound-lifetimes/issue-47511.rs b/tests/ui/late-bound-lifetimes/issue-47511.rs index 78944351540..94a68c7a1a6 100644 --- a/tests/ui/late-bound-lifetimes/issue-47511.rs +++ b/tests/ui/late-bound-lifetimes/issue-47511.rs @@ -1,4 +1,4 @@ -// check-pass +//@ check-pass fn f(_: X) -> X { unimplemented!() diff --git a/tests/ui/late-bound-lifetimes/late_bound_through_alias.rs b/tests/ui/late-bound-lifetimes/late_bound_through_alias.rs index 91839673c1f..719913a44d8 100644 --- a/tests/ui/late-bound-lifetimes/late_bound_through_alias.rs +++ b/tests/ui/late-bound-lifetimes/late_bound_through_alias.rs @@ -1,4 +1,4 @@ -// check-pass +//@ check-pass fn f(_: X) -> X { unimplemented!() diff --git a/tests/ui/late-bound-lifetimes/predicate-is-global.rs b/tests/ui/late-bound-lifetimes/predicate-is-global.rs index be017a3f94f..bc8eca5b9b2 100644 --- a/tests/ui/late-bound-lifetimes/predicate-is-global.rs +++ b/tests/ui/late-bound-lifetimes/predicate-is-global.rs @@ -1,4 +1,4 @@ -// check-pass +//@ check-pass trait Foo { type Assoc; diff --git a/tests/ui/layout/big-type-no-err.rs b/tests/ui/layout/big-type-no-err.rs index af8191a9cb9..cd90771a9c2 100644 --- a/tests/ui/layout/big-type-no-err.rs +++ b/tests/ui/layout/big-type-no-err.rs @@ -1,5 +1,5 @@ // Enormous types are allowed if they are never actually instantiated. -// run-pass +//@ run-pass trait Foo { type Assoc; } diff --git a/tests/ui/layout/debug.rs b/tests/ui/layout/debug.rs index 65f2f3b89af..b917cceafd5 100644 --- a/tests/ui/layout/debug.rs +++ b/tests/ui/layout/debug.rs @@ -1,4 +1,4 @@ -// normalize-stderr-test "pref: Align\([1-8] bytes\)" -> "pref: $$SOME_ALIGN" +//@ normalize-stderr-test "pref: Align\([1-8] bytes\)" -> "pref: $$SOME_ALIGN" #![feature(never_type, rustc_attrs, type_alias_impl_trait, repr_simd)] #![crate_type = "lib"] diff --git a/tests/ui/layout/enum.rs b/tests/ui/layout/enum.rs index 7ac2eaa8600..bde8450b9d5 100644 --- a/tests/ui/layout/enum.rs +++ b/tests/ui/layout/enum.rs @@ -1,4 +1,4 @@ -// normalize-stderr-test "pref: Align\([1-8] bytes\)" -> "pref: $$PREF_ALIGN" +//@ normalize-stderr-test "pref: Align\([1-8] bytes\)" -> "pref: $$PREF_ALIGN" //! Various enum layout tests. #![feature(rustc_attrs)] diff --git a/tests/ui/layout/hexagon-enum.rs b/tests/ui/layout/hexagon-enum.rs index 4c58537e309..e3a5c53671d 100644 --- a/tests/ui/layout/hexagon-enum.rs +++ b/tests/ui/layout/hexagon-enum.rs @@ -1,5 +1,5 @@ -// compile-flags: --target hexagon-unknown-linux-musl -// needs-llvm-components: hexagon +//@ compile-flags: --target hexagon-unknown-linux-musl +//@ needs-llvm-components: hexagon // // Verify that the hexagon targets implement the repr(C) for enums correctly. // diff --git a/tests/ui/layout/issue-112048-unsizing-field-order.rs b/tests/ui/layout/issue-112048-unsizing-field-order.rs index ebc4b9e98b7..7f065759b7a 100644 --- a/tests/ui/layout/issue-112048-unsizing-field-order.rs +++ b/tests/ui/layout/issue-112048-unsizing-field-order.rs @@ -1,4 +1,4 @@ -// run-pass +//@ run-pass // Check that unsizing doesn't reorder fields. diff --git a/tests/ui/layout/issue-112048-unsizing-niche.rs b/tests/ui/layout/issue-112048-unsizing-niche.rs index e59e063df99..f7669100095 100644 --- a/tests/ui/layout/issue-112048-unsizing-niche.rs +++ b/tests/ui/layout/issue-112048-unsizing-niche.rs @@ -1,4 +1,4 @@ -// run-pass +//@ run-pass // Check that unsizing does not change which field is considered for niche layout. diff --git a/tests/ui/layout/issue-113941.rs b/tests/ui/layout/issue-113941.rs index 7a54e28b350..e33141f14c8 100644 --- a/tests/ui/layout/issue-113941.rs +++ b/tests/ui/layout/issue-113941.rs @@ -1,6 +1,6 @@ -// build-pass -// revisions: normal randomize-layout -// [randomize-layout]compile-flags: -Zrandomize-layout +//@ build-pass +//@ revisions: normal randomize-layout +//@ [randomize-layout]compile-flags: -Zrandomize-layout enum Void {} diff --git a/tests/ui/layout/issue-60431-unsized-tail-behind-projection.rs b/tests/ui/layout/issue-60431-unsized-tail-behind-projection.rs index 65845d2c9fe..b6450395ac6 100644 --- a/tests/ui/layout/issue-60431-unsized-tail-behind-projection.rs +++ b/tests/ui/layout/issue-60431-unsized-tail-behind-projection.rs @@ -7,7 +7,7 @@ // the compiler would ICE when trying to figure out if `Ref` is a // dynamically-sized type (DST). -// run-pass +//@ run-pass use std::mem; diff --git a/tests/ui/layout/issue-96158-scalarpair-payload-might-be-uninit.rs b/tests/ui/layout/issue-96158-scalarpair-payload-might-be-uninit.rs index af5f5885d67..3acacc4559c 100644 --- a/tests/ui/layout/issue-96158-scalarpair-payload-might-be-uninit.rs +++ b/tests/ui/layout/issue-96158-scalarpair-payload-might-be-uninit.rs @@ -1,4 +1,4 @@ -// normalize-stderr-test "pref: Align\([1-8] bytes\)" -> "pref: $$PREF_ALIGN" +//@ normalize-stderr-test "pref: Align\([1-8] bytes\)" -> "pref: $$PREF_ALIGN" #![crate_type = "lib"] #![feature(rustc_attrs)] diff --git a/tests/ui/layout/issue-96185-overaligned-enum.rs b/tests/ui/layout/issue-96185-overaligned-enum.rs index ae1e6b012c3..3889a423906 100644 --- a/tests/ui/layout/issue-96185-overaligned-enum.rs +++ b/tests/ui/layout/issue-96185-overaligned-enum.rs @@ -1,4 +1,4 @@ -// normalize-stderr-test "pref: Align\([1-8] bytes\)" -> "pref: $$PREF_ALIGN" +//@ normalize-stderr-test "pref: Align\([1-8] bytes\)" -> "pref: $$PREF_ALIGN" #![crate_type = "lib"] #![feature(rustc_attrs)] diff --git a/tests/ui/layout/layout-cycle.rs b/tests/ui/layout/layout-cycle.rs index 85685058e49..3c930def43b 100644 --- a/tests/ui/layout/layout-cycle.rs +++ b/tests/ui/layout/layout-cycle.rs @@ -1,4 +1,4 @@ -// build-fail +//@ build-fail //~^ ERROR: a cycle occurred during layout computation //~| ERROR: cycle detected when computing layout of diff --git a/tests/ui/layout/struct.rs b/tests/ui/layout/struct.rs index e74cf5a952b..484490a5f78 100644 --- a/tests/ui/layout/struct.rs +++ b/tests/ui/layout/struct.rs @@ -1,4 +1,4 @@ -// normalize-stderr-test "pref: Align\([1-8] bytes\)" -> "pref: $$PREF_ALIGN" +//@ normalize-stderr-test "pref: Align\([1-8] bytes\)" -> "pref: $$PREF_ALIGN" //! Various struct layout tests. #![feature(rustc_attrs)] diff --git a/tests/ui/layout/thin-meta-implies-thin-ptr.rs b/tests/ui/layout/thin-meta-implies-thin-ptr.rs index 972579ea8be..1cf560b6832 100644 --- a/tests/ui/layout/thin-meta-implies-thin-ptr.rs +++ b/tests/ui/layout/thin-meta-implies-thin-ptr.rs @@ -1,4 +1,4 @@ -// check-pass +//@ check-pass #![feature(ptr_metadata)] diff --git a/tests/ui/layout/thumb-enum.rs b/tests/ui/layout/thumb-enum.rs index 3b43b1b83fa..57a9a2d8137 100644 --- a/tests/ui/layout/thumb-enum.rs +++ b/tests/ui/layout/thumb-enum.rs @@ -1,5 +1,5 @@ -// compile-flags: --target thumbv8m.main-none-eabihf -// needs-llvm-components: arm +//@ compile-flags: --target thumbv8m.main-none-eabihf +//@ needs-llvm-components: arm // // Verify that thumb targets implement the repr(C) for enums correctly. // diff --git a/tests/ui/layout/too-big-with-padding.rs b/tests/ui/layout/too-big-with-padding.rs index cf41ac872c2..76703100145 100644 --- a/tests/ui/layout/too-big-with-padding.rs +++ b/tests/ui/layout/too-big-with-padding.rs @@ -1,6 +1,6 @@ -// build-fail -// compile-flags: --target i686-unknown-linux-gnu --crate-type lib -// needs-llvm-components: x86 +//@ build-fail +//@ compile-flags: --target i686-unknown-linux-gnu --crate-type lib +//@ needs-llvm-components: x86 #![feature(no_core, lang_items)] #![allow(internal_features)] #![no_std] diff --git a/tests/ui/layout/unsafe-cell-hides-niche.rs b/tests/ui/layout/unsafe-cell-hides-niche.rs index e87c402f8f9..b3158839de0 100644 --- a/tests/ui/layout/unsafe-cell-hides-niche.rs +++ b/tests/ui/layout/unsafe-cell-hides-niche.rs @@ -3,9 +3,9 @@ // test checks that an `Option>` has the same // size in memory as an `Option>` (namely, 8 bytes). -// check-pass -// compile-flags: --crate-type=lib -// only-x86 +//@ check-pass +//@ compile-flags: --crate-type=lib +//@ only-x86 #![feature(repr_simd)] diff --git a/tests/ui/layout/valid_range_oob.rs b/tests/ui/layout/valid_range_oob.rs index 74aa47fe405..12f519ff2ca 100644 --- a/tests/ui/layout/valid_range_oob.rs +++ b/tests/ui/layout/valid_range_oob.rs @@ -1,7 +1,7 @@ -// failure-status: 101 -// normalize-stderr-test "note: .*\n\n" -> "" -// normalize-stderr-test "thread 'rustc' panicked.*\n" -> "" -// rustc-env:RUST_BACKTRACE=0 +//@ failure-status: 101 +//@ normalize-stderr-test "note: .*\n\n" -> "" +//@ normalize-stderr-test "thread 'rustc' panicked.*\n" -> "" +//@ rustc-env:RUST_BACKTRACE=0 #![feature(rustc_attrs)] diff --git a/tests/ui/layout/zero-sized-array-enum-niche.rs b/tests/ui/layout/zero-sized-array-enum-niche.rs index 23bbbfbfc58..095afc4337a 100644 --- a/tests/ui/layout/zero-sized-array-enum-niche.rs +++ b/tests/ui/layout/zero-sized-array-enum-niche.rs @@ -1,4 +1,4 @@ -// normalize-stderr-test "pref: Align\([1-8] bytes\)" -> "pref: $$PREF_ALIGN" +//@ normalize-stderr-test "pref: Align\([1-8] bytes\)" -> "pref: $$PREF_ALIGN" #![feature(rustc_attrs)] #![crate_type = "lib"] diff --git a/tests/ui/lazy-and-or.rs b/tests/ui/lazy-and-or.rs index 0b44a70a569..f9dbeb68959 100644 --- a/tests/ui/lazy-and-or.rs +++ b/tests/ui/lazy-and-or.rs @@ -1,4 +1,4 @@ -// run-pass +//@ run-pass fn incr(x: &mut isize) -> bool { *x += 1; assert!((false)); return false; } diff --git a/tests/ui/lazy-type-alias-impl-trait/branches2.rs b/tests/ui/lazy-type-alias-impl-trait/branches2.rs index 04218f5643d..467400f1c24 100644 --- a/tests/ui/lazy-type-alias-impl-trait/branches2.rs +++ b/tests/ui/lazy-type-alias-impl-trait/branches2.rs @@ -1,6 +1,6 @@ #![feature(type_alias_impl_trait)] -// check-pass +//@ check-pass type Foo = impl std::iter::FromIterator + PartialEq> + std::fmt::Debug; diff --git a/tests/ui/lazy-type-alias-impl-trait/freeze_cycle.rs b/tests/ui/lazy-type-alias-impl-trait/freeze_cycle.rs index 80aba0ba04d..3f8567c3057 100644 --- a/tests/ui/lazy-type-alias-impl-trait/freeze_cycle.rs +++ b/tests/ui/lazy-type-alias-impl-trait/freeze_cycle.rs @@ -1,4 +1,4 @@ -// check-pass +//@ check-pass #![feature(coroutine_trait, negative_impls)] diff --git a/tests/ui/lazy-type-alias-impl-trait/infer_cross_function.rs b/tests/ui/lazy-type-alias-impl-trait/infer_cross_function.rs index d07d732c785..353b67a382b 100644 --- a/tests/ui/lazy-type-alias-impl-trait/infer_cross_function.rs +++ b/tests/ui/lazy-type-alias-impl-trait/infer_cross_function.rs @@ -1,4 +1,4 @@ -// check-pass +//@ check-pass fn main() {} diff --git a/tests/ui/lazy-type-alias-impl-trait/lifetime_inference.rs b/tests/ui/lazy-type-alias-impl-trait/lifetime_inference.rs index f75a88aa8f0..a7a17d38c96 100644 --- a/tests/ui/lazy-type-alias-impl-trait/lifetime_inference.rs +++ b/tests/ui/lazy-type-alias-impl-trait/lifetime_inference.rs @@ -1,4 +1,4 @@ -// check-pass +//@ check-pass fn main() {} diff --git a/tests/ui/lazy-type-alias-impl-trait/nested.rs b/tests/ui/lazy-type-alias-impl-trait/nested.rs index f8291112739..17adbd2630c 100644 --- a/tests/ui/lazy-type-alias-impl-trait/nested.rs +++ b/tests/ui/lazy-type-alias-impl-trait/nested.rs @@ -1,4 +1,4 @@ -// check-pass +//@ check-pass fn main() {} diff --git a/tests/ui/lazy-type-alias-impl-trait/opaque_vs_opaque.rs b/tests/ui/lazy-type-alias-impl-trait/opaque_vs_opaque.rs index 8d03b5158d6..acc306ec698 100644 --- a/tests/ui/lazy-type-alias-impl-trait/opaque_vs_opaque.rs +++ b/tests/ui/lazy-type-alias-impl-trait/opaque_vs_opaque.rs @@ -1,4 +1,4 @@ -// check-pass +//@ check-pass fn main() {} diff --git a/tests/ui/lazy-type-alias-impl-trait/recursion.rs b/tests/ui/lazy-type-alias-impl-trait/recursion.rs index cf7cd5d26ca..51933560599 100644 --- a/tests/ui/lazy-type-alias-impl-trait/recursion.rs +++ b/tests/ui/lazy-type-alias-impl-trait/recursion.rs @@ -1,6 +1,6 @@ #![feature(type_alias_impl_trait)] -// check-pass +//@ check-pass type Foo = impl std::fmt::Debug; diff --git a/tests/ui/lazy-type-alias-impl-trait/recursion2.rs b/tests/ui/lazy-type-alias-impl-trait/recursion2.rs index 6b3d9ff4cde..e14da32e116 100644 --- a/tests/ui/lazy-type-alias-impl-trait/recursion2.rs +++ b/tests/ui/lazy-type-alias-impl-trait/recursion2.rs @@ -1,6 +1,6 @@ #![feature(type_alias_impl_trait)] -// check-pass +//@ check-pass type Foo = impl std::fmt::Debug; diff --git a/tests/ui/lazy-type-alias-impl-trait/unsized_sized_opaque.rs b/tests/ui/lazy-type-alias-impl-trait/unsized_sized_opaque.rs index 00710149823..9f786ff4b54 100644 --- a/tests/ui/lazy-type-alias-impl-trait/unsized_sized_opaque.rs +++ b/tests/ui/lazy-type-alias-impl-trait/unsized_sized_opaque.rs @@ -1,4 +1,4 @@ -// check-pass +//@ check-pass fn main() {} diff --git a/tests/ui/lazy-type-alias/coerce-behind-lazy.rs b/tests/ui/lazy-type-alias/coerce-behind-lazy.rs index ec9a6739975..42adfd274a3 100644 --- a/tests/ui/lazy-type-alias/coerce-behind-lazy.rs +++ b/tests/ui/lazy-type-alias/coerce-behind-lazy.rs @@ -1,6 +1,6 @@ -// check-pass -// revisions: current next -//[next] compile-flags: -Znext-solver +//@ check-pass +//@ revisions: current next +//@[next] compile-flags: -Znext-solver #![feature(lazy_type_alias)] //~^ WARN the feature `lazy_type_alias` is incomplete diff --git a/tests/ui/lazy-type-alias/enum-variant.rs b/tests/ui/lazy-type-alias/enum-variant.rs index 6d18e9eca62..d9b7dff2664 100644 --- a/tests/ui/lazy-type-alias/enum-variant.rs +++ b/tests/ui/lazy-type-alias/enum-variant.rs @@ -1,5 +1,5 @@ // Regression test for issue #113736. -// check-pass +//@ check-pass #![feature(lazy_type_alias)] //~^ WARN the feature `lazy_type_alias` is incomplete and may not be safe to use diff --git a/tests/ui/lazy-type-alias/extern-crate-has-eager-type-aliases.rs b/tests/ui/lazy-type-alias/extern-crate-has-eager-type-aliases.rs index 07389961c4c..efd77639198 100644 --- a/tests/ui/lazy-type-alias/extern-crate-has-eager-type-aliases.rs +++ b/tests/ui/lazy-type-alias/extern-crate-has-eager-type-aliases.rs @@ -1,9 +1,9 @@ // This test serves as a regression test for issue #114468 and it also ensures that we consider // type aliases from external crates that don't have `lazy_type_alias` enabled to be eager. -// aux-crate:eager=eager.rs -// edition: 2021 -// check-pass +//@ aux-crate:eager=eager.rs +//@ edition: 2021 +//@ check-pass #![feature(lazy_type_alias)] #![allow(incomplete_features)] diff --git a/tests/ui/lazy-type-alias/extern-crate-has-lazy-type-aliases.rs b/tests/ui/lazy-type-alias/extern-crate-has-lazy-type-aliases.rs index 31a19161b6c..07490ad45e0 100644 --- a/tests/ui/lazy-type-alias/extern-crate-has-lazy-type-aliases.rs +++ b/tests/ui/lazy-type-alias/extern-crate-has-lazy-type-aliases.rs @@ -1,6 +1,6 @@ -// revisions: locally_eager locally_lazy -// aux-crate:lazy=lazy.rs -// edition: 2021 +//@ revisions: locally_eager locally_lazy +//@ aux-crate:lazy=lazy.rs +//@ edition: 2021 // Test that we treat lazy type aliases from external crates as lazy independently of whether the // local crate enables `lazy_type_alias` or not. diff --git a/tests/ui/lazy-type-alias/implied-outlives-bounds.rs b/tests/ui/lazy-type-alias/implied-outlives-bounds.rs index c08e45975de..804801ed591 100644 --- a/tests/ui/lazy-type-alias/implied-outlives-bounds.rs +++ b/tests/ui/lazy-type-alias/implied-outlives-bounds.rs @@ -1,7 +1,7 @@ // Check that we imply outlives-bounds on lazy type aliases. -// revisions: pos neg -//[pos] check-pass +//@ revisions: pos neg +//@[pos] check-pass #![feature(lazy_type_alias)] #![allow(incomplete_features)] diff --git a/tests/ui/lazy-type-alias/leading-where-clause.fixed b/tests/ui/lazy-type-alias/leading-where-clause.fixed index 07ebc09b30e..885556c1efe 100644 --- a/tests/ui/lazy-type-alias/leading-where-clause.fixed +++ b/tests/ui/lazy-type-alias/leading-where-clause.fixed @@ -1,4 +1,4 @@ -// run-rustfix +//@ run-rustfix #![feature(lazy_type_alias)] #![allow(incomplete_features)] diff --git a/tests/ui/lazy-type-alias/leading-where-clause.rs b/tests/ui/lazy-type-alias/leading-where-clause.rs index 4a654293472..a0a09a2a08e 100644 --- a/tests/ui/lazy-type-alias/leading-where-clause.rs +++ b/tests/ui/lazy-type-alias/leading-where-clause.rs @@ -1,4 +1,4 @@ -// run-rustfix +//@ run-rustfix #![feature(lazy_type_alias)] #![allow(incomplete_features)] diff --git a/tests/ui/lazy-type-alias/type-alias-bounds-are-enforced.rs b/tests/ui/lazy-type-alias/type-alias-bounds-are-enforced.rs index d0abd3ebf24..f42ed64684f 100644 --- a/tests/ui/lazy-type-alias/type-alias-bounds-are-enforced.rs +++ b/tests/ui/lazy-type-alias/type-alias-bounds-are-enforced.rs @@ -1,7 +1,7 @@ // Check that we don't issue the lint `type_alias_bounds` for // lazy type aliases since the bounds are indeed enforced. -// check-pass +//@ check-pass #![feature(lazy_type_alias)] #![allow(incomplete_features)] diff --git a/tests/ui/lazy-type-alias/variance.rs b/tests/ui/lazy-type-alias/variance.rs index f83215856b8..dae2069502a 100644 --- a/tests/ui/lazy-type-alias/variance.rs +++ b/tests/ui/lazy-type-alias/variance.rs @@ -1,7 +1,7 @@ // This is a regression test for issue #114221. // Check that we compute variances for lazy type aliases. -// check-pass +//@ check-pass #![feature(lazy_type_alias)] #![allow(incomplete_features)] diff --git a/tests/ui/let-else/const-fn.rs b/tests/ui/let-else/const-fn.rs index a3921b8033f..802558719f6 100644 --- a/tests/ui/let-else/const-fn.rs +++ b/tests/ui/let-else/const-fn.rs @@ -1,4 +1,4 @@ -// run-pass +//@ run-pass // issue #101932 diff --git a/tests/ui/let-else/issue-100103.rs b/tests/ui/let-else/issue-100103.rs index f5f9b2f5f06..c90b7958ba0 100644 --- a/tests/ui/let-else/issue-100103.rs +++ b/tests/ui/let-else/issue-100103.rs @@ -1,5 +1,5 @@ -// edition:2021 -// check-pass +//@ edition:2021 +//@ check-pass #![feature(try_blocks)] diff --git a/tests/ui/let-else/issue-102317.rs b/tests/ui/let-else/issue-102317.rs index 7369b4938ee..d94410e10a8 100644 --- a/tests/ui/let-else/issue-102317.rs +++ b/tests/ui/let-else/issue-102317.rs @@ -1,6 +1,6 @@ // issue #102317 -// build-pass -// compile-flags: --edition 2021 -C opt-level=3 -Zvalidate-mir +//@ build-pass +//@ compile-flags: --edition 2021 -C opt-level=3 -Zvalidate-mir struct SegmentJob; diff --git a/tests/ui/let-else/issue-99975.rs b/tests/ui/let-else/issue-99975.rs index 5b164f347e7..244d946392f 100644 --- a/tests/ui/let-else/issue-99975.rs +++ b/tests/ui/let-else/issue-99975.rs @@ -1,5 +1,5 @@ -// run-pass -// compile-flags: -C opt-level=3 -Zvalidate-mir +//@ run-pass +//@ compile-flags: -C opt-level=3 -Zvalidate-mir diff --git a/tests/ui/let-else/let-else-binding-explicit-mut-pass.rs b/tests/ui/let-else/let-else-binding-explicit-mut-pass.rs index b0a6264a10d..2a2f4c84eea 100644 --- a/tests/ui/let-else/let-else-binding-explicit-mut-pass.rs +++ b/tests/ui/let-else/let-else-binding-explicit-mut-pass.rs @@ -1,4 +1,4 @@ -// check-pass +//@ check-pass diff --git a/tests/ui/let-else/let-else-bindings.rs b/tests/ui/let-else/let-else-bindings.rs index 53ac398b8f5..0ce4bdef031 100644 --- a/tests/ui/let-else/let-else-bindings.rs +++ b/tests/ui/let-else/let-else-bindings.rs @@ -1,4 +1,4 @@ -// run-pass +//@ run-pass // adapted from tests/ui/binding/if-let.rs #![allow(dead_code)] diff --git a/tests/ui/let-else/let-else-bool-binop-init.fixed b/tests/ui/let-else/let-else-bool-binop-init.fixed index 20e558ca909..0c8a4e45eb5 100644 --- a/tests/ui/let-else/let-else-bool-binop-init.fixed +++ b/tests/ui/let-else/let-else-bool-binop-init.fixed @@ -1,4 +1,4 @@ -// run-rustfix +//@ run-rustfix diff --git a/tests/ui/let-else/let-else-bool-binop-init.rs b/tests/ui/let-else/let-else-bool-binop-init.rs index f88179a940b..7aa585ad899 100644 --- a/tests/ui/let-else/let-else-bool-binop-init.rs +++ b/tests/ui/let-else/let-else-bool-binop-init.rs @@ -1,4 +1,4 @@ -// run-rustfix +//@ run-rustfix diff --git a/tests/ui/let-else/let-else-brace-before-else.fixed b/tests/ui/let-else/let-else-brace-before-else.fixed index 2d85e3878cc..75e8f455982 100644 --- a/tests/ui/let-else/let-else-brace-before-else.fixed +++ b/tests/ui/let-else/let-else-brace-before-else.fixed @@ -1,4 +1,4 @@ -// run-rustfix +//@ run-rustfix diff --git a/tests/ui/let-else/let-else-brace-before-else.rs b/tests/ui/let-else/let-else-brace-before-else.rs index 5c3375b3f28..d238cb7231e 100644 --- a/tests/ui/let-else/let-else-brace-before-else.rs +++ b/tests/ui/let-else/let-else-brace-before-else.rs @@ -1,4 +1,4 @@ -// run-rustfix +//@ run-rustfix diff --git a/tests/ui/let-else/let-else-deref-coercion-annotated.rs b/tests/ui/let-else/let-else-deref-coercion-annotated.rs index 60fdf825a33..ac0af172ede 100644 --- a/tests/ui/let-else/let-else-deref-coercion-annotated.rs +++ b/tests/ui/let-else/let-else-deref-coercion-annotated.rs @@ -1,4 +1,4 @@ -// check-pass +//@ check-pass // // Taken from https://github.com/rust-lang/rust/blob/6cc0a764e082d9c0abcf37a768d5889247ba13e2/compiler/rustc_typeck/src/check/_match.rs#L445-L462 // diff --git a/tests/ui/let-else/let-else-drop-order.rs b/tests/ui/let-else/let-else-drop-order.rs index e91e5de84e4..062d56659b5 100644 --- a/tests/ui/let-else/let-else-drop-order.rs +++ b/tests/ui/let-else/let-else-drop-order.rs @@ -1,6 +1,6 @@ -// run-pass -// edition:2021 -// check-run-results +//@ run-pass +//@ edition:2021 +//@ check-run-results // // Drop order tests for let else // diff --git a/tests/ui/let-else/let-else-irrefutable.rs b/tests/ui/let-else/let-else-irrefutable.rs index f4b338eb0af..f9675ff5938 100644 --- a/tests/ui/let-else/let-else-irrefutable.rs +++ b/tests/ui/let-else/let-else-irrefutable.rs @@ -1,4 +1,4 @@ -// check-pass +//@ check-pass fn main() { let x = 1 else { return }; //~ WARN irrefutable `let...else` pattern diff --git a/tests/ui/let-else/let-else-non-copy.rs b/tests/ui/let-else/let-else-non-copy.rs index 08c07dd1a43..4f59824396e 100644 --- a/tests/ui/let-else/let-else-non-copy.rs +++ b/tests/ui/let-else/let-else-non-copy.rs @@ -1,4 +1,4 @@ -// run-pass +//@ run-pass // // This is derived from a change to compiler/rustc_codegen_llvm/src/debuginfo/metadata.rs, in // preparation for adopting let-else within the compiler (thanks @est31): diff --git a/tests/ui/let-else/let-else-ref-bindings-pass.rs b/tests/ui/let-else/let-else-ref-bindings-pass.rs index 62fc65731cd..b37825bc567 100644 --- a/tests/ui/let-else/let-else-ref-bindings-pass.rs +++ b/tests/ui/let-else/let-else-ref-bindings-pass.rs @@ -1,4 +1,4 @@ -// check-pass +//@ check-pass #![allow(unused_variables)] diff --git a/tests/ui/let-else/let-else-run-pass.rs b/tests/ui/let-else/let-else-run-pass.rs index a0fb6c683f8..e0a1cd75fd7 100644 --- a/tests/ui/let-else/let-else-run-pass.rs +++ b/tests/ui/let-else/let-else-run-pass.rs @@ -1,4 +1,4 @@ -// run-pass +//@ run-pass diff --git a/tests/ui/let-else/let-else-source-expr-nomove-pass.rs b/tests/ui/let-else/let-else-source-expr-nomove-pass.rs index ee378abcf2b..ee82e45dc98 100644 --- a/tests/ui/let-else/let-else-source-expr-nomove-pass.rs +++ b/tests/ui/let-else/let-else-source-expr-nomove-pass.rs @@ -1,4 +1,4 @@ -// run-pass +//@ run-pass // issue #89688 diff --git a/tests/ui/let-else/let-else-temp-borrowck.rs b/tests/ui/let-else/let-else-temp-borrowck.rs index 6b4642d2f98..32fb8509a47 100644 --- a/tests/ui/let-else/let-else-temp-borrowck.rs +++ b/tests/ui/let-else/let-else-temp-borrowck.rs @@ -1,4 +1,4 @@ -// run-pass +//@ run-pass // // from issue #93951, where borrowck complained the temporary that `foo(&x)` was stored in was to // be dropped sometime after `x` was. It then suggested adding a semicolon that was already there. diff --git a/tests/ui/let-else/let-else-temporary-lifetime.rs b/tests/ui/let-else/let-else-temporary-lifetime.rs index c23eaa997fe..7fa2f4afc31 100644 --- a/tests/ui/let-else/let-else-temporary-lifetime.rs +++ b/tests/ui/let-else/let-else-temporary-lifetime.rs @@ -1,5 +1,5 @@ -// run-pass -// compile-flags: -Zvalidate-mir +//@ run-pass +//@ compile-flags: -Zvalidate-mir use std::fmt::Display; use std::rc::Rc; diff --git a/tests/ui/let-else/let-else.rs b/tests/ui/let-else/let-else.rs index 3505533e63f..01a92e43587 100644 --- a/tests/ui/let-else/let-else.rs +++ b/tests/ui/let-else/let-else.rs @@ -1,4 +1,4 @@ -// run-pass +//@ run-pass fn main() { let Some(x) = Some(1) else { diff --git a/tests/ui/lexer/lex-bare-cr-nondoc-comment.rs b/tests/ui/lexer/lex-bare-cr-nondoc-comment.rs index 5b528d6e1e1..f615ae7e95b 100644 --- a/tests/ui/lexer/lex-bare-cr-nondoc-comment.rs +++ b/tests/ui/lexer/lex-bare-cr-nondoc-comment.rs @@ -1,4 +1,4 @@ -// run-pass +//@ run-pass // ignore-tidy-cr // nondoc comment with bare CR: ' ' diff --git a/tests/ui/lexer/lexer-crlf-line-endings-string-literal-doc-comment.rs b/tests/ui/lexer/lexer-crlf-line-endings-string-literal-doc-comment.rs index 9ba01540aaf..b355997a4b3 100644 --- a/tests/ui/lexer/lexer-crlf-line-endings-string-literal-doc-comment.rs +++ b/tests/ui/lexer/lexer-crlf-line-endings-string-literal-doc-comment.rs @@ -1,4 +1,4 @@ -// run-pass +//@ run-pass // ignore-tidy-cr // ignore-tidy-cr (repeated again because of tidy bug) // license is ignored because tidy can't handle the CRLF here properly. diff --git a/tests/ui/lexical-scoping.rs b/tests/ui/lexical-scoping.rs index 04904958a6c..f858369f7ce 100644 --- a/tests/ui/lexical-scoping.rs +++ b/tests/ui/lexical-scoping.rs @@ -1,4 +1,4 @@ -// run-pass +//@ run-pass // Tests that items in subscopes can shadow type parameters and local variables (see issue #23880). #![allow(unused)] diff --git a/tests/ui/lifetimes/anonymize-unnamed-bound-vars-in-binders.rs b/tests/ui/lifetimes/anonymize-unnamed-bound-vars-in-binders.rs index 05e3763e9d1..da41e17c417 100644 --- a/tests/ui/lifetimes/anonymize-unnamed-bound-vars-in-binders.rs +++ b/tests/ui/lifetimes/anonymize-unnamed-bound-vars-in-binders.rs @@ -1,4 +1,4 @@ -// build-pass +//@ build-pass // issue: #115807 trait Chip: for<'a> TraitWithLifetime<'a> + SomeMarker { diff --git a/tests/ui/lifetimes/auxiliary/issue-91763-aux.rs b/tests/ui/lifetimes/auxiliary/issue-91763-aux.rs index 0335f72b784..35ef6fc019d 100644 --- a/tests/ui/lifetimes/auxiliary/issue-91763-aux.rs +++ b/tests/ui/lifetimes/auxiliary/issue-91763-aux.rs @@ -1,5 +1,5 @@ -// force-host -// no-prefer-dynamic +//@ force-host +//@ no-prefer-dynamic #![crate_type = "proc-macro"] diff --git a/tests/ui/lifetimes/bare-trait-object-borrowck.rs b/tests/ui/lifetimes/bare-trait-object-borrowck.rs index 45f5e4ae129..c54d3effffe 100644 --- a/tests/ui/lifetimes/bare-trait-object-borrowck.rs +++ b/tests/ui/lifetimes/bare-trait-object-borrowck.rs @@ -1,5 +1,5 @@ #![allow(bare_trait_objects)] -// check-pass +//@ check-pass pub struct FormatWith<'a, I, F> { sep: &'a str, /// FormatWith uses interior mutability because Display::fmt takes &self. diff --git a/tests/ui/lifetimes/bare-trait-object.rs b/tests/ui/lifetimes/bare-trait-object.rs index 9eff618c734..2feb8a880b1 100644 --- a/tests/ui/lifetimes/bare-trait-object.rs +++ b/tests/ui/lifetimes/bare-trait-object.rs @@ -1,5 +1,5 @@ // Verify that lifetime resolution correctly accounts for `Fn` bare trait objects. -// check-pass +//@ check-pass #![allow(bare_trait_objects)] // This should work as: fn next_u32(fill_buf: &mut dyn FnMut(&mut [u8])) diff --git a/tests/ui/lifetimes/elided-lifetime-in-anon-const.rs b/tests/ui/lifetimes/elided-lifetime-in-anon-const.rs index 69a7b61bab4..a6dc50a54ce 100644 --- a/tests/ui/lifetimes/elided-lifetime-in-anon-const.rs +++ b/tests/ui/lifetimes/elided-lifetime-in-anon-const.rs @@ -1,5 +1,5 @@ // Verify that elided lifetimes inside anonymous constants are not forced to be `'static`. -// check-pass +//@ check-pass fn foo() -> [(); { let a = 10_usize; diff --git a/tests/ui/lifetimes/elided-lifetime-in-param-pat.rs b/tests/ui/lifetimes/elided-lifetime-in-param-pat.rs index c1425fa4243..00730615ed6 100644 --- a/tests/ui/lifetimes/elided-lifetime-in-param-pat.rs +++ b/tests/ui/lifetimes/elided-lifetime-in-param-pat.rs @@ -1,4 +1,4 @@ -// check-pass +//@ check-pass struct S { _t: T, diff --git a/tests/ui/lifetimes/elided-lifetime-in-path-in-impl-Fn.rs b/tests/ui/lifetimes/elided-lifetime-in-path-in-impl-Fn.rs index 9c9965d8fb8..f821b83f37a 100644 --- a/tests/ui/lifetimes/elided-lifetime-in-path-in-impl-Fn.rs +++ b/tests/ui/lifetimes/elided-lifetime-in-path-in-impl-Fn.rs @@ -1,4 +1,4 @@ -// check-pass +//@ check-pass struct Foo<'a>(&'a ()); diff --git a/tests/ui/lifetimes/elided-lifetime-in-path-in-pat.rs b/tests/ui/lifetimes/elided-lifetime-in-path-in-pat.rs index ff84d251149..4011f6c9687 100644 --- a/tests/ui/lifetimes/elided-lifetime-in-path-in-pat.rs +++ b/tests/ui/lifetimes/elided-lifetime-in-path-in-pat.rs @@ -1,4 +1,4 @@ -// check-pass +//@ check-pass struct Foo<'a> { x: &'a (), diff --git a/tests/ui/lifetimes/elided-lifetime-in-path-in-type-relative-expression.rs b/tests/ui/lifetimes/elided-lifetime-in-path-in-type-relative-expression.rs index b9d2711fd9c..7797ed13b00 100644 --- a/tests/ui/lifetimes/elided-lifetime-in-path-in-type-relative-expression.rs +++ b/tests/ui/lifetimes/elided-lifetime-in-path-in-type-relative-expression.rs @@ -1,4 +1,4 @@ -// check-pass +//@ check-pass struct Sqlite {} diff --git a/tests/ui/lifetimes/issue-103582-hint-for-missing-lifetime-bound-on-trait-object-using-type-alias.fixed b/tests/ui/lifetimes/issue-103582-hint-for-missing-lifetime-bound-on-trait-object-using-type-alias.fixed index aa3bce2945b..2ceaaf0339d 100644 --- a/tests/ui/lifetimes/issue-103582-hint-for-missing-lifetime-bound-on-trait-object-using-type-alias.fixed +++ b/tests/ui/lifetimes/issue-103582-hint-for-missing-lifetime-bound-on-trait-object-using-type-alias.fixed @@ -1,4 +1,4 @@ -// run-rustfix +//@ run-rustfix trait Greeter0 { fn greet(&self); diff --git a/tests/ui/lifetimes/issue-103582-hint-for-missing-lifetime-bound-on-trait-object-using-type-alias.rs b/tests/ui/lifetimes/issue-103582-hint-for-missing-lifetime-bound-on-trait-object-using-type-alias.rs index 20c88ec6981..e7d427517b5 100644 --- a/tests/ui/lifetimes/issue-103582-hint-for-missing-lifetime-bound-on-trait-object-using-type-alias.rs +++ b/tests/ui/lifetimes/issue-103582-hint-for-missing-lifetime-bound-on-trait-object-using-type-alias.rs @@ -1,4 +1,4 @@ -// run-rustfix +//@ run-rustfix trait Greeter0 { fn greet(&self); diff --git a/tests/ui/lifetimes/issue-104432-unused-lifetimes-in-expansion.rs b/tests/ui/lifetimes/issue-104432-unused-lifetimes-in-expansion.rs index 5d5429ec895..a1d5488bbbd 100644 --- a/tests/ui/lifetimes/issue-104432-unused-lifetimes-in-expansion.rs +++ b/tests/ui/lifetimes/issue-104432-unused-lifetimes-in-expansion.rs @@ -1,4 +1,4 @@ -// check-pass +//@ check-pass #![deny(unused_lifetimes)] trait Trait2 { diff --git a/tests/ui/lifetimes/issue-105227.fixed b/tests/ui/lifetimes/issue-105227.fixed index f6ed9c82e91..ef64e1e6541 100644 --- a/tests/ui/lifetimes/issue-105227.fixed +++ b/tests/ui/lifetimes/issue-105227.fixed @@ -1,6 +1,6 @@ // Regression test for issue #105227. -// run-rustfix +//@ run-rustfix #![allow(warnings)] fn chars0<'a>(v :(&'a str, &'a str)) -> impl Iterator + 'a { //~^ HELP to declare that `impl Iterator` captures `'_`, you can introduce a named lifetime parameter `'a` diff --git a/tests/ui/lifetimes/issue-105227.rs b/tests/ui/lifetimes/issue-105227.rs index 6427a50bb87..f37765ffafa 100644 --- a/tests/ui/lifetimes/issue-105227.rs +++ b/tests/ui/lifetimes/issue-105227.rs @@ -1,6 +1,6 @@ // Regression test for issue #105227. -// run-rustfix +//@ run-rustfix #![allow(warnings)] fn chars0(v :(& str, &str)) -> impl Iterator { //~^ HELP to declare that `impl Iterator` captures `'_`, you can introduce a named lifetime parameter `'a` diff --git a/tests/ui/lifetimes/issue-105507.fixed b/tests/ui/lifetimes/issue-105507.fixed index 277ce8a77e9..177da01b154 100644 --- a/tests/ui/lifetimes/issue-105507.fixed +++ b/tests/ui/lifetimes/issue-105507.fixed @@ -1,4 +1,4 @@ -// run-rustfix +//@ run-rustfix // #![allow(warnings)] struct Wrapper<'a, T: ?Sized>(&'a T); diff --git a/tests/ui/lifetimes/issue-105507.rs b/tests/ui/lifetimes/issue-105507.rs index f46c6b6f21e..858fa19a029 100644 --- a/tests/ui/lifetimes/issue-105507.rs +++ b/tests/ui/lifetimes/issue-105507.rs @@ -1,4 +1,4 @@ -// run-rustfix +//@ run-rustfix // #![allow(warnings)] struct Wrapper<'a, T: ?Sized>(&'a T); diff --git a/tests/ui/lifetimes/issue-36744-without-calls.rs b/tests/ui/lifetimes/issue-36744-without-calls.rs index dc5dc4f13c0..def88453b6c 100644 --- a/tests/ui/lifetimes/issue-36744-without-calls.rs +++ b/tests/ui/lifetimes/issue-36744-without-calls.rs @@ -1,4 +1,4 @@ -// build-pass +//@ build-pass // Tests for an LLVM abort when storing a lifetime-parametric fn into // context that is expecting one that is not lifetime-parametric // (i.e., has no `for <'_>`). diff --git a/tests/ui/lifetimes/issue-54378.rs b/tests/ui/lifetimes/issue-54378.rs index aa42d4a7c41..b835b08d31e 100644 --- a/tests/ui/lifetimes/issue-54378.rs +++ b/tests/ui/lifetimes/issue-54378.rs @@ -1,4 +1,4 @@ -// check-pass +//@ check-pass // Regression test for #54378. diff --git a/tests/ui/lifetimes/issue-67498.rs b/tests/ui/lifetimes/issue-67498.rs index 8d88264353a..b921aabf89d 100644 --- a/tests/ui/lifetimes/issue-67498.rs +++ b/tests/ui/lifetimes/issue-67498.rs @@ -1,4 +1,4 @@ -// check-pass +//@ check-pass // Regression test for #67498. diff --git a/tests/ui/lifetimes/issue-69314.fixed b/tests/ui/lifetimes/issue-69314.fixed index 41116d4ea61..285d192b44c 100644 --- a/tests/ui/lifetimes/issue-69314.fixed +++ b/tests/ui/lifetimes/issue-69314.fixed @@ -1,5 +1,5 @@ -// run-rustfix -// edition:2021 +//@ run-rustfix +//@ edition:2021 #![allow(dead_code, unused_mut, unused_variables)] struct A {} struct Msg<'a> { diff --git a/tests/ui/lifetimes/issue-69314.rs b/tests/ui/lifetimes/issue-69314.rs index 17445341eb6..345f7785060 100644 --- a/tests/ui/lifetimes/issue-69314.rs +++ b/tests/ui/lifetimes/issue-69314.rs @@ -1,5 +1,5 @@ -// run-rustfix -// edition:2021 +//@ run-rustfix +//@ edition:2021 #![allow(dead_code, unused_mut, unused_variables)] struct A {} struct Msg<'a> { diff --git a/tests/ui/lifetimes/issue-70917-lifetimes-in-fn-def.rs b/tests/ui/lifetimes/issue-70917-lifetimes-in-fn-def.rs index b9aab27142e..1dbe4f35ca8 100644 --- a/tests/ui/lifetimes/issue-70917-lifetimes-in-fn-def.rs +++ b/tests/ui/lifetimes/issue-70917-lifetimes-in-fn-def.rs @@ -1,4 +1,4 @@ -// check-pass +//@ check-pass fn assert_static(_: T) {} diff --git a/tests/ui/lifetimes/issue-76168-hr-outlives-2.rs b/tests/ui/lifetimes/issue-76168-hr-outlives-2.rs index 348586fa26b..ab658168615 100644 --- a/tests/ui/lifetimes/issue-76168-hr-outlives-2.rs +++ b/tests/ui/lifetimes/issue-76168-hr-outlives-2.rs @@ -1,5 +1,5 @@ -// edition:2018 -// check-pass +//@ edition:2018 +//@ check-pass trait Trait { type Output; diff --git a/tests/ui/lifetimes/issue-76168-hr-outlives-3.rs b/tests/ui/lifetimes/issue-76168-hr-outlives-3.rs index 782c38200a0..03913869503 100644 --- a/tests/ui/lifetimes/issue-76168-hr-outlives-3.rs +++ b/tests/ui/lifetimes/issue-76168-hr-outlives-3.rs @@ -1,4 +1,4 @@ -// edition:2018 +//@ edition:2018 #![feature(unboxed_closures)] use std::future::Future; diff --git a/tests/ui/lifetimes/issue-76168-hr-outlives.rs b/tests/ui/lifetimes/issue-76168-hr-outlives.rs index 9366e94c90f..3a45ec8143a 100644 --- a/tests/ui/lifetimes/issue-76168-hr-outlives.rs +++ b/tests/ui/lifetimes/issue-76168-hr-outlives.rs @@ -1,5 +1,5 @@ -// edition:2018 -// check-pass +//@ edition:2018 +//@ check-pass #![feature(unboxed_closures)] use std::future::Future; diff --git a/tests/ui/lifetimes/issue-77175.rs b/tests/ui/lifetimes/issue-77175.rs index 8072691ae3c..aa4cde88571 100644 --- a/tests/ui/lifetimes/issue-77175.rs +++ b/tests/ui/lifetimes/issue-77175.rs @@ -1,6 +1,6 @@ #[deny(single_use_lifetimes)] -// edition:2018 -// check-pass +//@ edition:2018 +//@ check-pass // Prior to the fix, the compiler complained that the 'a lifetime was only used // once. This was obviously wrong since the lifetime is used twice: For the s3 diff --git a/tests/ui/lifetimes/issue-83737-binders-across-types.rs b/tests/ui/lifetimes/issue-83737-binders-across-types.rs index e130561e466..d20c84dae3f 100644 --- a/tests/ui/lifetimes/issue-83737-binders-across-types.rs +++ b/tests/ui/lifetimes/issue-83737-binders-across-types.rs @@ -1,6 +1,6 @@ -// build-pass -// compile-flags: --edition 2018 -// compile-flags: --crate-type rlib +//@ build-pass +//@ compile-flags: --edition 2018 +//@ compile-flags: --crate-type rlib use std::future::Future; diff --git a/tests/ui/lifetimes/issue-83737-erasing-bound-vars.rs b/tests/ui/lifetimes/issue-83737-erasing-bound-vars.rs index c496a3556c8..466bcdc6be0 100644 --- a/tests/ui/lifetimes/issue-83737-erasing-bound-vars.rs +++ b/tests/ui/lifetimes/issue-83737-erasing-bound-vars.rs @@ -1,6 +1,6 @@ -// build-pass -// compile-flags: --edition 2018 -// compile-flags: --crate-type rlib +//@ build-pass +//@ compile-flags: --edition 2018 +//@ compile-flags: --crate-type rlib use std::future::Future; diff --git a/tests/ui/lifetimes/issue-83753-invalid-associated-type-supertrait-hrtb.rs b/tests/ui/lifetimes/issue-83753-invalid-associated-type-supertrait-hrtb.rs index 7f0ea730dd3..a47e71afcf0 100644 --- a/tests/ui/lifetimes/issue-83753-invalid-associated-type-supertrait-hrtb.rs +++ b/tests/ui/lifetimes/issue-83753-invalid-associated-type-supertrait-hrtb.rs @@ -1,4 +1,4 @@ -// check-fail +//@ check-fail struct Foo {} impl Foo { diff --git a/tests/ui/lifetimes/issue-83907-invalid-fn-like-path.rs b/tests/ui/lifetimes/issue-83907-invalid-fn-like-path.rs index 604687ce711..4e093bb2e17 100644 --- a/tests/ui/lifetimes/issue-83907-invalid-fn-like-path.rs +++ b/tests/ui/lifetimes/issue-83907-invalid-fn-like-path.rs @@ -1,4 +1,4 @@ -// check-fail +//@ check-fail static STATIC_VAR_FIVE: &One(); //~^ cannot find type diff --git a/tests/ui/lifetimes/issue-84398.rs b/tests/ui/lifetimes/issue-84398.rs index 1912fa59b79..cc59f14e6a8 100644 --- a/tests/ui/lifetimes/issue-84398.rs +++ b/tests/ui/lifetimes/issue-84398.rs @@ -1,4 +1,4 @@ -// check-pass +//@ check-pass pub trait Deserialize<'de>: Sized {} pub trait DeserializeOwned: for<'de> Deserialize<'de> {} diff --git a/tests/ui/lifetimes/issue-84604.rs b/tests/ui/lifetimes/issue-84604.rs index b315ef05190..3f83b0c1cd3 100644 --- a/tests/ui/lifetimes/issue-84604.rs +++ b/tests/ui/lifetimes/issue-84604.rs @@ -1,5 +1,5 @@ -// run-pass -// compile-flags: -Csymbol-mangling-version=v0 +//@ run-pass +//@ compile-flags: -Csymbol-mangling-version=v0 pub fn f() {} pub trait Frob {} diff --git a/tests/ui/lifetimes/issue-90170-elision-mismatch.fixed b/tests/ui/lifetimes/issue-90170-elision-mismatch.fixed index bd85da1a763..1963b8bd907 100644 --- a/tests/ui/lifetimes/issue-90170-elision-mismatch.fixed +++ b/tests/ui/lifetimes/issue-90170-elision-mismatch.fixed @@ -1,4 +1,4 @@ -// run-rustfix +//@ run-rustfix pub fn foo<'a>(x: &mut Vec<&'a u8>, y: &'a u8) { x.push(y); } //~ ERROR lifetime may not live long enough diff --git a/tests/ui/lifetimes/issue-90170-elision-mismatch.rs b/tests/ui/lifetimes/issue-90170-elision-mismatch.rs index 3c495368bbc..c32f4d5c8be 100644 --- a/tests/ui/lifetimes/issue-90170-elision-mismatch.rs +++ b/tests/ui/lifetimes/issue-90170-elision-mismatch.rs @@ -1,4 +1,4 @@ -// run-rustfix +//@ run-rustfix pub fn foo(x: &mut Vec<&u8>, y: &u8) { x.push(y); } //~ ERROR lifetime may not live long enough diff --git a/tests/ui/lifetimes/issue-91763.rs b/tests/ui/lifetimes/issue-91763.rs index 2e8807fe639..5df69cff3be 100644 --- a/tests/ui/lifetimes/issue-91763.rs +++ b/tests/ui/lifetimes/issue-91763.rs @@ -1,4 +1,4 @@ -// aux-build:issue-91763-aux.rs +//@ aux-build:issue-91763-aux.rs #![deny(elided_lifetimes_in_paths)] diff --git a/tests/ui/lifetimes/issue-93911.rs b/tests/ui/lifetimes/issue-93911.rs index b7ccac1ee52..0452472b3e2 100644 --- a/tests/ui/lifetimes/issue-93911.rs +++ b/tests/ui/lifetimes/issue-93911.rs @@ -1,5 +1,5 @@ -// check-pass -// edition:2021 +//@ check-pass +//@ edition:2021 #![allow(dead_code)] diff --git a/tests/ui/lifetimes/lifetime-bound-will-change-warning.rs b/tests/ui/lifetimes/lifetime-bound-will-change-warning.rs index 0d030370527..98bc673be25 100644 --- a/tests/ui/lifetimes/lifetime-bound-will-change-warning.rs +++ b/tests/ui/lifetimes/lifetime-bound-will-change-warning.rs @@ -1,4 +1,4 @@ -// aux-build:lifetime_bound_will_change_warning_lib.rs +//@ aux-build:lifetime_bound_will_change_warning_lib.rs // Test that various corner cases cause an error. These are tests // that used to pass before we tweaked object defaults. diff --git a/tests/ui/lifetimes/nested.rs b/tests/ui/lifetimes/nested.rs index f3f1f2016f2..2d1b963d8d0 100644 --- a/tests/ui/lifetimes/nested.rs +++ b/tests/ui/lifetimes/nested.rs @@ -1,4 +1,4 @@ -// check-pass +//@ check-pass fn method<'a>(_i: &'a i32) { fn inner<'a>(_j: &'a f32) {} diff --git a/tests/ui/lifetimes/suggest-introducing-and-adding-missing-lifetime.fixed b/tests/ui/lifetimes/suggest-introducing-and-adding-missing-lifetime.fixed index 7c415490439..d3616c0b175 100644 --- a/tests/ui/lifetimes/suggest-introducing-and-adding-missing-lifetime.fixed +++ b/tests/ui/lifetimes/suggest-introducing-and-adding-missing-lifetime.fixed @@ -1,4 +1,4 @@ -// run-rustfix +//@ run-rustfix #![allow(warnings)] diff --git a/tests/ui/lifetimes/suggest-introducing-and-adding-missing-lifetime.rs b/tests/ui/lifetimes/suggest-introducing-and-adding-missing-lifetime.rs index d6ce112ec93..8d894600767 100644 --- a/tests/ui/lifetimes/suggest-introducing-and-adding-missing-lifetime.rs +++ b/tests/ui/lifetimes/suggest-introducing-and-adding-missing-lifetime.rs @@ -1,4 +1,4 @@ -// run-rustfix +//@ run-rustfix #![allow(warnings)] diff --git a/tests/ui/limits/huge-array-simple-32.rs b/tests/ui/limits/huge-array-simple-32.rs index f25b8887402..6ff981cd160 100644 --- a/tests/ui/limits/huge-array-simple-32.rs +++ b/tests/ui/limits/huge-array-simple-32.rs @@ -1,5 +1,5 @@ -// ignore-64bit -// build-fail +//@ ignore-64bit +//@ build-fail #![allow(arithmetic_overflow)] diff --git a/tests/ui/limits/huge-array-simple-64.rs b/tests/ui/limits/huge-array-simple-64.rs index c5778c428ae..13b284503bf 100644 --- a/tests/ui/limits/huge-array-simple-64.rs +++ b/tests/ui/limits/huge-array-simple-64.rs @@ -1,5 +1,5 @@ -// build-fail -// ignore-32bit +//@ build-fail +//@ ignore-32bit #![allow(arithmetic_overflow)] diff --git a/tests/ui/limits/huge-array.rs b/tests/ui/limits/huge-array.rs index 811cf25dd76..97cfd1ff8fb 100644 --- a/tests/ui/limits/huge-array.rs +++ b/tests/ui/limits/huge-array.rs @@ -1,4 +1,4 @@ -// build-fail +//@ build-fail fn generic(t: T) { let s: [T; 1518600000] = [t; 1518600000]; diff --git a/tests/ui/limits/huge-enum.rs b/tests/ui/limits/huge-enum.rs index dd4bae60d3e..a6e6c5b73be 100644 --- a/tests/ui/limits/huge-enum.rs +++ b/tests/ui/limits/huge-enum.rs @@ -1,6 +1,6 @@ -// build-fail -// normalize-stderr-test "std::option::Option<\[u32; \d+\]>" -> "TYPE" -// normalize-stderr-test "\[u32; \d+\]" -> "TYPE" +//@ build-fail +//@ normalize-stderr-test "std::option::Option<\[u32; \d+\]>" -> "TYPE" +//@ normalize-stderr-test "\[u32; \d+\]" -> "TYPE" #[cfg(target_pointer_width = "32")] type BIG = Option<[u32; (1<<29)-1]>; diff --git a/tests/ui/limits/huge-struct.rs b/tests/ui/limits/huge-struct.rs index 904e2774b19..c9fd56b3a57 100644 --- a/tests/ui/limits/huge-struct.rs +++ b/tests/ui/limits/huge-struct.rs @@ -1,7 +1,7 @@ -// build-fail -// normalize-stderr-test "S32" -> "SXX" -// normalize-stderr-test "S1M" -> "SXX" -// error-pattern: too big for the current +//@ build-fail +//@ normalize-stderr-test "S32" -> "SXX" +//@ normalize-stderr-test "S1M" -> "SXX" +//@ error-pattern: too big for the current struct S32 { v0: T, diff --git a/tests/ui/limits/issue-15919-32.rs b/tests/ui/limits/issue-15919-32.rs index 3254cb2c5bb..d1d1c339181 100644 --- a/tests/ui/limits/issue-15919-32.rs +++ b/tests/ui/limits/issue-15919-32.rs @@ -1,5 +1,5 @@ -// ignore-64bit -// build-fail +//@ ignore-64bit +//@ build-fail fn main() { let x = [0usize; 0xffff_ffff]; //~ ERROR too big diff --git a/tests/ui/limits/issue-15919-64.rs b/tests/ui/limits/issue-15919-64.rs index 272e8800d68..7e6200882a9 100644 --- a/tests/ui/limits/issue-15919-64.rs +++ b/tests/ui/limits/issue-15919-64.rs @@ -1,5 +1,5 @@ -// build-fail -// ignore-32bit +//@ build-fail +//@ ignore-32bit fn main() { let x = [0usize; 0xffff_ffff_ffff_ffff]; //~ ERROR too big diff --git a/tests/ui/limits/issue-17913.rs b/tests/ui/limits/issue-17913.rs index 6b37d6f0551..5df8c48c7ec 100644 --- a/tests/ui/limits/issue-17913.rs +++ b/tests/ui/limits/issue-17913.rs @@ -1,6 +1,6 @@ -// build-fail -// normalize-stderr-test "\[&usize; \d+\]" -> "[&usize; usize::MAX]" -// error-pattern: too big for the current architecture +//@ build-fail +//@ normalize-stderr-test "\[&usize; \d+\]" -> "[&usize; usize::MAX]" +//@ error-pattern: too big for the current architecture #[cfg(target_pointer_width = "64")] fn main() { diff --git a/tests/ui/limits/issue-55878.rs b/tests/ui/limits/issue-55878.rs index c1c54646db8..1372433e11a 100644 --- a/tests/ui/limits/issue-55878.rs +++ b/tests/ui/limits/issue-55878.rs @@ -1,8 +1,8 @@ -// build-fail -// normalize-stderr-64bit "18446744073709551615" -> "SIZE" -// normalize-stderr-32bit "4294967295" -> "SIZE" +//@ build-fail +//@ normalize-stderr-64bit "18446744073709551615" -> "SIZE" +//@ normalize-stderr-32bit "4294967295" -> "SIZE" -// error-pattern: are too big for the current architecture +//@ error-pattern: are too big for the current architecture fn main() { println!("Size: {}", std::mem::size_of::<[u8; u64::MAX as usize]>()); } diff --git a/tests/ui/limits/issue-56762.rs b/tests/ui/limits/issue-56762.rs index 1c7facb045d..17b3ad8b01e 100644 --- a/tests/ui/limits/issue-56762.rs +++ b/tests/ui/limits/issue-56762.rs @@ -1,4 +1,4 @@ -// only-x86_64 +//@ only-x86_64 const HUGE_SIZE: usize = !0usize / 8; diff --git a/tests/ui/limits/issue-69485-var-size-diffs-too-large.rs b/tests/ui/limits/issue-69485-var-size-diffs-too-large.rs index 2560ffe168b..9c150c119d0 100644 --- a/tests/ui/limits/issue-69485-var-size-diffs-too-large.rs +++ b/tests/ui/limits/issue-69485-var-size-diffs-too-large.rs @@ -1,6 +1,6 @@ -// build-fail -// only-x86_64 -// compile-flags: -Zmir-opt-level=0 +//@ build-fail +//@ only-x86_64 +//@ compile-flags: -Zmir-opt-level=0 fn main() { Bug::V([0; !0]); //~ ERROR are too big for the current diff --git a/tests/ui/limits/issue-75158-64.rs b/tests/ui/limits/issue-75158-64.rs index 06c209c078f..b294b147a91 100644 --- a/tests/ui/limits/issue-75158-64.rs +++ b/tests/ui/limits/issue-75158-64.rs @@ -1,7 +1,7 @@ //~ ERROR -// build-fail -// ignore-32bit +//@ build-fail +//@ ignore-32bit struct S { x: [T; !0], diff --git a/tests/ui/link-section.rs b/tests/ui/link-section.rs index 48efb07ff48..9299b4d08b2 100644 --- a/tests/ui/link-section.rs +++ b/tests/ui/link-section.rs @@ -1,4 +1,4 @@ -// run-pass +//@ run-pass #![allow(non_upper_case_globals)] #[cfg(not(target_os = "macos"))] diff --git a/tests/ui/linkage-attr/auxiliary/link-cfg-works-transitive-rlib.rs b/tests/ui/linkage-attr/auxiliary/link-cfg-works-transitive-rlib.rs index 0a296f0b2ef..49a46b202e4 100644 --- a/tests/ui/linkage-attr/auxiliary/link-cfg-works-transitive-rlib.rs +++ b/tests/ui/linkage-attr/auxiliary/link-cfg-works-transitive-rlib.rs @@ -1,4 +1,4 @@ -// no-prefer-dynamic +//@ no-prefer-dynamic #![feature(link_cfg)] #![crate_type = "rlib"] diff --git a/tests/ui/linkage-attr/common-linkage-non-zero-init.rs b/tests/ui/linkage-attr/common-linkage-non-zero-init.rs index ce8d9848e42..61eb4fb66b5 100644 --- a/tests/ui/linkage-attr/common-linkage-non-zero-init.rs +++ b/tests/ui/linkage-attr/common-linkage-non-zero-init.rs @@ -1,6 +1,6 @@ -// build-fail -// failure-status: 101 -// known-bug: #109681 +//@ build-fail +//@ failure-status: 101 +//@ known-bug: #109681 // This test verifies that we continue to hit the LLVM error for common linkage with non-zero // initializers, since it generates invalid LLVM IR. diff --git a/tests/ui/linkage-attr/incompatible-flavor.rs b/tests/ui/linkage-attr/incompatible-flavor.rs index 90c2b612f22..acf720bc97a 100644 --- a/tests/ui/linkage-attr/incompatible-flavor.rs +++ b/tests/ui/linkage-attr/incompatible-flavor.rs @@ -1,6 +1,6 @@ -// compile-flags: --target=x86_64-unknown-linux-gnu -C linker-flavor=msvc --crate-type=rlib -// error-pattern: linker flavor `msvc` is incompatible with the current target -// needs-llvm-components: +//@ compile-flags: --target=x86_64-unknown-linux-gnu -C linker-flavor=msvc --crate-type=rlib +//@ error-pattern: linker flavor `msvc` is incompatible with the current target +//@ needs-llvm-components: #![feature(no_core)] #![no_core] diff --git a/tests/ui/linkage-attr/issue-10755.rs b/tests/ui/linkage-attr/issue-10755.rs index 0df5d842cb2..58d5b5ead57 100644 --- a/tests/ui/linkage-attr/issue-10755.rs +++ b/tests/ui/linkage-attr/issue-10755.rs @@ -1,7 +1,7 @@ -// build-fail -// dont-check-compiler-stderr -// compile-flags: -C linker=llllll -// error-pattern: `llllll` +//@ build-fail +//@ dont-check-compiler-stderr +//@ compile-flags: -C linker=llllll +//@ error-pattern: `llllll` // Before, the error-pattern checked for "not found". On WSL with appendWindowsPath=true, running // in invalid command returns a PermissionDenied instead. diff --git a/tests/ui/linkage-attr/link-cfg-works.rs b/tests/ui/linkage-attr/link-cfg-works.rs index 254091ff250..7b936bc43b1 100644 --- a/tests/ui/linkage-attr/link-cfg-works.rs +++ b/tests/ui/linkage-attr/link-cfg-works.rs @@ -1,6 +1,6 @@ -// run-pass -// aux-build:link-cfg-works-transitive-rlib.rs -// aux-build:link-cfg-works-transitive-dylib.rs +//@ run-pass +//@ aux-build:link-cfg-works-transitive-rlib.rs +//@ aux-build:link-cfg-works-transitive-dylib.rs #![feature(link_cfg)] diff --git a/tests/ui/linkage-attr/link-self-contained-consistency.rs b/tests/ui/linkage-attr/link-self-contained-consistency.rs index 9be72f559a9..def63233e94 100644 --- a/tests/ui/linkage-attr/link-self-contained-consistency.rs +++ b/tests/ui/linkage-attr/link-self-contained-consistency.rs @@ -1,10 +1,10 @@ // Checks that self-contained linking components cannot be both enabled and disabled at the same // time on the CLI. -// check-fail -// revisions: one many -// [one] compile-flags: -Clink-self-contained=-linker -Clink-self-contained=+linker -Zunstable-options -// [many] compile-flags: -Clink-self-contained=+linker,+crto -Clink-self-contained=-linker,-crto -Zunstable-options +//@ check-fail +//@ revisions: one many +//@ [one] compile-flags: -Clink-self-contained=-linker -Clink-self-contained=+linker -Zunstable-options +//@ [many] compile-flags: -Clink-self-contained=+linker,+crto -Clink-self-contained=-linker,-crto -Zunstable-options // ignore-tidy-linelength fn main() {} diff --git a/tests/ui/linkage-attr/linkage-detect-extern-generated-name-collision.rs b/tests/ui/linkage-attr/linkage-detect-extern-generated-name-collision.rs index 3a0910658b7..b43df634112 100644 --- a/tests/ui/linkage-attr/linkage-detect-extern-generated-name-collision.rs +++ b/tests/ui/linkage-attr/linkage-detect-extern-generated-name-collision.rs @@ -2,10 +2,10 @@ // collision on the symbol generated for the external linkage item in // an extern crate. -// build-fail -// aux-build:def_colliding_external.rs +//@ build-fail +//@ aux-build:def_colliding_external.rs // FIXME(#83838) codegen-units=1 triggers llvm asserts -// compile-flags: -Ccodegen-units=16 +//@ compile-flags: -Ccodegen-units=16 extern crate def_colliding_external as dep1; diff --git a/tests/ui/linkage-attr/linkage-detect-local-generated-name-collision.rs b/tests/ui/linkage-attr/linkage-detect-local-generated-name-collision.rs index c1df9ccef22..df952504eef 100644 --- a/tests/ui/linkage-attr/linkage-detect-local-generated-name-collision.rs +++ b/tests/ui/linkage-attr/linkage-detect-local-generated-name-collision.rs @@ -1,6 +1,6 @@ -// build-fail +//@ build-fail // FIXME(#83838) codegen-units=1 triggers llvm asserts -// compile-flags: -Ccodegen-units=16 +//@ compile-flags: -Ccodegen-units=16 #![feature(linkage)] mod dep1 { diff --git a/tests/ui/linkage-attr/linkage-import.rs b/tests/ui/linkage-attr/linkage-import.rs index f754ddc6e08..838d1fc29a2 100644 --- a/tests/ui/linkage-attr/linkage-import.rs +++ b/tests/ui/linkage-attr/linkage-import.rs @@ -1,5 +1,5 @@ -// build-pass -// aux-build:def_external.rs +//@ build-pass +//@ aux-build:def_external.rs extern crate def_external as dep; diff --git a/tests/ui/linkage-attr/linkage1.rs b/tests/ui/linkage-attr/linkage1.rs index deab7a251cb..2edb80bf1b0 100644 --- a/tests/ui/linkage-attr/linkage1.rs +++ b/tests/ui/linkage-attr/linkage1.rs @@ -1,9 +1,9 @@ -// run-pass -// ignore-windows -// ignore-macos -// ignore-emscripten doesn't support this linkage -// ignore-sgx weak linkage not permitted -// aux-build:linkage1.rs +//@ run-pass +//@ ignore-windows +//@ ignore-macos +//@ ignore-emscripten doesn't support this linkage +//@ ignore-sgx weak linkage not permitted +//@ aux-build:linkage1.rs #![feature(linkage)] diff --git a/tests/ui/linkage-attr/linkage2.rs b/tests/ui/linkage-attr/linkage2.rs index aa42874f7ba..b1e64dabac7 100644 --- a/tests/ui/linkage-attr/linkage2.rs +++ b/tests/ui/linkage-attr/linkage2.rs @@ -1,4 +1,4 @@ -// check-fail +//@ check-fail #![feature(linkage)] diff --git a/tests/ui/linkage-attr/linkage3.rs b/tests/ui/linkage-attr/linkage3.rs index cac10af6338..f95e5eecc48 100644 --- a/tests/ui/linkage-attr/linkage3.rs +++ b/tests/ui/linkage-attr/linkage3.rs @@ -1,4 +1,4 @@ -// check-fail +//@ check-fail #![feature(linkage)] diff --git a/tests/ui/linkage-attr/unstable-flavor.rs b/tests/ui/linkage-attr/unstable-flavor.rs index c2c16b28bff..82d9dff3874 100644 --- a/tests/ui/linkage-attr/unstable-flavor.rs +++ b/tests/ui/linkage-attr/unstable-flavor.rs @@ -2,13 +2,13 @@ // unique codepath checking all unstable options (see `LinkerFlavorCli::is_unstable` and its // caller). If it passes, all the other unstable options are rejected as well. // -// revisions: bpf ptx -// [bpf] compile-flags: --target=bpfel-unknown-none -C linker-flavor=bpf --crate-type=rlib -// [bpf] error-pattern: linker flavor `bpf` is unstable, the `-Z unstable-options` flag -// [bpf] needs-llvm-components: -// [ptx] compile-flags: --target=nvptx64-nvidia-cuda -C linker-flavor=ptx --crate-type=rlib -// [ptx] error-pattern: linker flavor `ptx` is unstable, the `-Z unstable-options` flag -// [ptx] needs-llvm-components: +//@ revisions: bpf ptx +//@ [bpf] compile-flags: --target=bpfel-unknown-none -C linker-flavor=bpf --crate-type=rlib +//@ [bpf] error-pattern: linker flavor `bpf` is unstable, the `-Z unstable-options` flag +//@ [bpf] needs-llvm-components: +//@ [ptx] compile-flags: --target=nvptx64-nvidia-cuda -C linker-flavor=ptx --crate-type=rlib +//@ [ptx] error-pattern: linker flavor `ptx` is unstable, the `-Z unstable-options` flag +//@ [ptx] needs-llvm-components: #![feature(no_core)] #![no_core] diff --git a/tests/ui/lint-group-denied-lint-allowed.rs b/tests/ui/lint-group-denied-lint-allowed.rs index 8156b6ef617..86b63bb31e3 100644 --- a/tests/ui/lint-group-denied-lint-allowed.rs +++ b/tests/ui/lint-group-denied-lint-allowed.rs @@ -1,5 +1,5 @@ -// check-pass -// compile-flags: -D unused -A unused-variables +//@ check-pass +//@ compile-flags: -D unused -A unused-variables fn main() { let x = 1; diff --git a/tests/ui/lint-group-forbid-always-trumps-cli.rs b/tests/ui/lint-group-forbid-always-trumps-cli.rs index 77b792f98d5..4b63452bf5d 100644 --- a/tests/ui/lint-group-forbid-always-trumps-cli.rs +++ b/tests/ui/lint-group-forbid-always-trumps-cli.rs @@ -1,4 +1,4 @@ -// compile-flags: -F unused -A unused +//@ compile-flags: -F unused -A unused fn main() { let x = 1; diff --git a/tests/ui/lint-unknown-lints-at-crate-level.rs b/tests/ui/lint-unknown-lints-at-crate-level.rs index 61d27f1eff1..c8cf65ce93a 100644 --- a/tests/ui/lint-unknown-lints-at-crate-level.rs +++ b/tests/ui/lint-unknown-lints-at-crate-level.rs @@ -1,5 +1,5 @@ -// run-pass -// compile-flags: -D warnings -D unknown-lints +//@ run-pass +//@ compile-flags: -D warnings -D unknown-lints #![allow(unknown_lints)] #![allow(random_lint_name)] diff --git a/tests/ui/lint/auxiliary/add-impl.rs b/tests/ui/lint/auxiliary/add-impl.rs index 9d0e3068aed..7ee4a4e4fde 100644 --- a/tests/ui/lint/auxiliary/add-impl.rs +++ b/tests/ui/lint/auxiliary/add-impl.rs @@ -1,5 +1,5 @@ -// force-host -// no-prefer-dynamic +//@ force-host +//@ no-prefer-dynamic #![crate_type = "proc-macro"] diff --git a/tests/ui/lint/auxiliary/stability-cfg2.rs b/tests/ui/lint/auxiliary/stability-cfg2.rs index c995038e5a8..ed69d26a9cb 100644 --- a/tests/ui/lint/auxiliary/stability-cfg2.rs +++ b/tests/ui/lint/auxiliary/stability-cfg2.rs @@ -1,4 +1,4 @@ -// compile-flags:--cfg foo +//@ compile-flags:--cfg foo #![cfg_attr(foo, unstable(feature = "unstable_test_feature", issue = "none"))] #![cfg_attr(not(foo), stable(feature = "test_feature", since = "1.0.0"))] diff --git a/tests/ui/lint/auxiliary/stability_cfg2.rs b/tests/ui/lint/auxiliary/stability_cfg2.rs index c995038e5a8..ed69d26a9cb 100644 --- a/tests/ui/lint/auxiliary/stability_cfg2.rs +++ b/tests/ui/lint/auxiliary/stability_cfg2.rs @@ -1,4 +1,4 @@ -// compile-flags:--cfg foo +//@ compile-flags:--cfg foo #![cfg_attr(foo, unstable(feature = "unstable_test_feature", issue = "none"))] #![cfg_attr(not(foo), stable(feature = "test_feature", since = "1.0.0"))] diff --git a/tests/ui/lint/bad-lint-cap.rs b/tests/ui/lint/bad-lint-cap.rs index e65c8319d1a..aab3f723796 100644 --- a/tests/ui/lint/bad-lint-cap.rs +++ b/tests/ui/lint/bad-lint-cap.rs @@ -1,4 +1,4 @@ -// compile-flags: --cap-lints test -// error-pattern: unknown lint level: `test` +//@ compile-flags: --cap-lints test +//@ error-pattern: unknown lint level: `test` fn main() {} diff --git a/tests/ui/lint/bad-lint-cap2.rs b/tests/ui/lint/bad-lint-cap2.rs index 8bc8aca2049..193f967671d 100644 --- a/tests/ui/lint/bad-lint-cap2.rs +++ b/tests/ui/lint/bad-lint-cap2.rs @@ -1,4 +1,4 @@ -// compile-flags: --cap-lints deny +//@ compile-flags: --cap-lints deny #![warn(unused)] #![deny(warnings)] diff --git a/tests/ui/lint/bad-lint-cap3.rs b/tests/ui/lint/bad-lint-cap3.rs index c38105870e4..c0c45a21421 100644 --- a/tests/ui/lint/bad-lint-cap3.rs +++ b/tests/ui/lint/bad-lint-cap3.rs @@ -1,5 +1,5 @@ -// check-pass -// compile-flags: --cap-lints warn +//@ check-pass +//@ compile-flags: --cap-lints warn #![warn(unused)] #![deny(warnings)] diff --git a/tests/ui/lint/clashing-extern-fn-recursion.rs b/tests/ui/lint/clashing-extern-fn-recursion.rs index ab0fd0a2e70..40bef400594 100644 --- a/tests/ui/lint/clashing-extern-fn-recursion.rs +++ b/tests/ui/lint/clashing-extern-fn-recursion.rs @@ -1,4 +1,4 @@ -// check-pass +//@ check-pass // // This tests checks that clashing_extern_declarations handles types that are recursive through a // pointer or ref argument. See #75512. diff --git a/tests/ui/lint/clashing-extern-fn-wasm.rs b/tests/ui/lint/clashing-extern-fn-wasm.rs index eeb2b8eae25..862e649b474 100644 --- a/tests/ui/lint/clashing-extern-fn-wasm.rs +++ b/tests/ui/lint/clashing-extern-fn-wasm.rs @@ -1,4 +1,4 @@ -// check-pass +//@ check-pass #![crate_type = "lib"] #[cfg(target_arch = "wasm32")] diff --git a/tests/ui/lint/clashing-extern-fn.rs b/tests/ui/lint/clashing-extern-fn.rs index 9740742fbbb..ce027c82554 100644 --- a/tests/ui/lint/clashing-extern-fn.rs +++ b/tests/ui/lint/clashing-extern-fn.rs @@ -1,5 +1,5 @@ -// check-pass -// aux-build:external_extern_fn.rs +//@ check-pass +//@ aux-build:external_extern_fn.rs #![crate_type = "lib"] #![warn(clashing_extern_declarations)] diff --git a/tests/ui/lint/cli-lint-override.rs b/tests/ui/lint/cli-lint-override.rs index a0e853fc384..4b3fd0d9c01 100644 --- a/tests/ui/lint/cli-lint-override.rs +++ b/tests/ui/lint/cli-lint-override.rs @@ -1,12 +1,12 @@ // Tests that subsequent lints specified via the command line override // each other, except for ForceWarn and Forbid, which cannot be overridden. // -// revisions: warn_deny forbid_warn force_warn_deny +//@ revisions: warn_deny forbid_warn force_warn_deny // -//[warn_deny] compile-flags: --warn missing_abi --deny missing_abi -//[forbid_warn] compile-flags: --warn missing_abi --forbid missing_abi -//[force_warn_deny] compile-flags: --force-warn missing_abi --allow missing_abi -//[force_warn_deny] check-pass +//@[warn_deny] compile-flags: --warn missing_abi --deny missing_abi +//@[forbid_warn] compile-flags: --warn missing_abi --forbid missing_abi +//@[force_warn_deny] compile-flags: --force-warn missing_abi --allow missing_abi +//@[force_warn_deny] check-pass extern fn foo() {} diff --git a/tests/ui/lint/cli-unknown-force-warn.rs b/tests/ui/lint/cli-unknown-force-warn.rs index a9e4e4a6017..007f8dd8732 100644 --- a/tests/ui/lint/cli-unknown-force-warn.rs +++ b/tests/ui/lint/cli-unknown-force-warn.rs @@ -1,11 +1,11 @@ // Checks that rustc correctly errors when passed an invalid lint with // `--force-warn`. This is a regression test for issue #86958. -// check-pass -// compile-flags: --force-warn foo-qux +//@ check-pass +//@ compile-flags: --force-warn foo-qux -// error-pattern: unknown lint: `foo_qux` -// error-pattern: requested on the command line with `--force-warn foo_qux` -// error-pattern: `#[warn(unknown_lints)]` on by default +//@ error-pattern: unknown lint: `foo_qux` +//@ error-pattern: requested on the command line with `--force-warn foo_qux` +//@ error-pattern: `#[warn(unknown_lints)]` on by default fn main() {} diff --git a/tests/ui/lint/command-line-lint-group-allow.rs b/tests/ui/lint/command-line-lint-group-allow.rs index 21c0df0288f..e9e57a5e7be 100644 --- a/tests/ui/lint/command-line-lint-group-allow.rs +++ b/tests/ui/lint/command-line-lint-group-allow.rs @@ -1,5 +1,5 @@ -// compile-flags: -A bad-style -// check-pass +//@ compile-flags: -A bad-style +//@ check-pass fn main() { let _InappropriateCamelCasing = true; diff --git a/tests/ui/lint/command-line-lint-group-deny.rs b/tests/ui/lint/command-line-lint-group-deny.rs index da999f33e20..1e9cc4faaff 100644 --- a/tests/ui/lint/command-line-lint-group-deny.rs +++ b/tests/ui/lint/command-line-lint-group-deny.rs @@ -1,4 +1,4 @@ -// compile-flags: -D bad-style +//@ compile-flags: -D bad-style fn main() { let _InappropriateCamelCasing = true; //~ ERROR should have a snake diff --git a/tests/ui/lint/command-line-lint-group-forbid.rs b/tests/ui/lint/command-line-lint-group-forbid.rs index 4e5c2aca5e0..667566bd2c6 100644 --- a/tests/ui/lint/command-line-lint-group-forbid.rs +++ b/tests/ui/lint/command-line-lint-group-forbid.rs @@ -1,4 +1,4 @@ -// compile-flags: -F bad-style +//@ compile-flags: -F bad-style fn main() { let _InappropriateCamelCasing = true; //~ ERROR should have a snake diff --git a/tests/ui/lint/command-line-lint-group-warn.rs b/tests/ui/lint/command-line-lint-group-warn.rs index f4536f9c9e2..9807e95dd80 100644 --- a/tests/ui/lint/command-line-lint-group-warn.rs +++ b/tests/ui/lint/command-line-lint-group-warn.rs @@ -1,5 +1,5 @@ -// compile-flags: -W bad-style -// check-pass +//@ compile-flags: -W bad-style +//@ check-pass fn main() { let _InappropriateCamelCasing = true; diff --git a/tests/ui/lint/command-line-register-lint-tool.rs b/tests/ui/lint/command-line-register-lint-tool.rs index d6e95fd3ec4..60480718219 100644 --- a/tests/ui/lint/command-line-register-lint-tool.rs +++ b/tests/ui/lint/command-line-register-lint-tool.rs @@ -1,5 +1,5 @@ -// compile-flags: -A known_tool::foo -// check-pass +//@ compile-flags: -A known_tool::foo +//@ check-pass #![feature(register_tool)] #![register_tool(known_tool)] diff --git a/tests/ui/lint/command-line-register-unknown-lint-tool.rs b/tests/ui/lint/command-line-register-unknown-lint-tool.rs index 59fc0200095..b4e9a067fe2 100644 --- a/tests/ui/lint/command-line-register-unknown-lint-tool.rs +++ b/tests/ui/lint/command-line-register-unknown-lint-tool.rs @@ -1,4 +1,4 @@ -// compile-flags: -A unknown_tool::foo -// error-pattern: unknown lint tool: `unknown_tool` +//@ compile-flags: -A unknown_tool::foo +//@ error-pattern: unknown lint tool: `unknown_tool` fn main() {} diff --git a/tests/ui/lint/dead-code/alias-in-pat.rs b/tests/ui/lint/dead-code/alias-in-pat.rs index 69d455f3b60..f22a8f8408b 100644 --- a/tests/ui/lint/dead-code/alias-in-pat.rs +++ b/tests/ui/lint/dead-code/alias-in-pat.rs @@ -1,4 +1,4 @@ -// run-pass +//@ run-pass #![deny(dead_code)] diff --git a/tests/ui/lint/dead-code/allow-or-expect-dead_code-114557-2.rs b/tests/ui/lint/dead-code/allow-or-expect-dead_code-114557-2.rs index b71bcd0fab5..37c78bc68ed 100644 --- a/tests/ui/lint/dead-code/allow-or-expect-dead_code-114557-2.rs +++ b/tests/ui/lint/dead-code/allow-or-expect-dead_code-114557-2.rs @@ -1,4 +1,4 @@ -// check-pass +//@ check-pass // this test checks that the `dead_code` lint is *NOT* being emited // for `foo` as `foo` is being used by `main`, and so the `#[expect]` diff --git a/tests/ui/lint/dead-code/allow-or-expect-dead_code-114557-3.rs b/tests/ui/lint/dead-code/allow-or-expect-dead_code-114557-3.rs index f8a5d31a0f2..d2ead24b57c 100644 --- a/tests/ui/lint/dead-code/allow-or-expect-dead_code-114557-3.rs +++ b/tests/ui/lint/dead-code/allow-or-expect-dead_code-114557-3.rs @@ -1,4 +1,4 @@ -// check-pass +//@ check-pass // this test makes sure that the `unfulfilled_lint_expectations` lint // is being emited for `foo` as foo is not dead code, it's pub diff --git a/tests/ui/lint/dead-code/allow-or-expect-dead_code-114557.rs b/tests/ui/lint/dead-code/allow-or-expect-dead_code-114557.rs index 24fafa3d1b8..323bb06b681 100644 --- a/tests/ui/lint/dead-code/allow-or-expect-dead_code-114557.rs +++ b/tests/ui/lint/dead-code/allow-or-expect-dead_code-114557.rs @@ -1,5 +1,5 @@ -// check-pass -// revisions: allow expect +//@ check-pass +//@ revisions: allow expect // this test checks that no matter if we put #[allow(dead_code)] // or #[expect(dead_code)], no warning is being emited diff --git a/tests/ui/lint/dead-code/anon-const-in-pat.rs b/tests/ui/lint/dead-code/anon-const-in-pat.rs index 4d7fdddf246..e2d8c90edcc 100644 --- a/tests/ui/lint/dead-code/anon-const-in-pat.rs +++ b/tests/ui/lint/dead-code/anon-const-in-pat.rs @@ -1,4 +1,4 @@ -// check-pass +//@ check-pass #![feature(inline_const_pat)] #![deny(dead_code)] diff --git a/tests/ui/lint/dead-code/associated-type.rs b/tests/ui/lint/dead-code/associated-type.rs index 25106a66e7e..542a64afbf2 100644 --- a/tests/ui/lint/dead-code/associated-type.rs +++ b/tests/ui/lint/dead-code/associated-type.rs @@ -1,4 +1,4 @@ -// run-pass +//@ run-pass #![deny(dead_code)] diff --git a/tests/ui/lint/dead-code/const-and-self.rs b/tests/ui/lint/dead-code/const-and-self.rs index 5c96e4d0ecb..f2e48a58166 100644 --- a/tests/ui/lint/dead-code/const-and-self.rs +++ b/tests/ui/lint/dead-code/const-and-self.rs @@ -1,4 +1,4 @@ -// check-pass +//@ check-pass #![warn(dead_code)] diff --git a/tests/ui/lint/dead-code/empty-unused-public-enum.rs b/tests/ui/lint/dead-code/empty-unused-public-enum.rs index 15b04496ba7..4d69f26b55c 100644 --- a/tests/ui/lint/dead-code/empty-unused-public-enum.rs +++ b/tests/ui/lint/dead-code/empty-unused-public-enum.rs @@ -1,4 +1,4 @@ -// build-pass +//@ build-pass #![deny(unused)] pub enum E {} diff --git a/tests/ui/lint/dead-code/enum-variants.rs b/tests/ui/lint/dead-code/enum-variants.rs index 91c97232eed..9499ffdecd7 100644 --- a/tests/ui/lint/dead-code/enum-variants.rs +++ b/tests/ui/lint/dead-code/enum-variants.rs @@ -1,4 +1,4 @@ -// run-pass +//@ run-pass #![deny(dead_code)] diff --git a/tests/ui/lint/dead-code/in-closure.rs b/tests/ui/lint/dead-code/in-closure.rs index c55634405ed..c89ec44aebb 100644 --- a/tests/ui/lint/dead-code/in-closure.rs +++ b/tests/ui/lint/dead-code/in-closure.rs @@ -1,4 +1,4 @@ -// edition: 2021 +//@ edition: 2021 #![deny(dead_code)] diff --git a/tests/ui/lint/dead-code/issue-59003.rs b/tests/ui/lint/dead-code/issue-59003.rs index 966d6412870..e3dcaca5778 100644 --- a/tests/ui/lint/dead-code/issue-59003.rs +++ b/tests/ui/lint/dead-code/issue-59003.rs @@ -1,4 +1,4 @@ -// check-pass +//@ check-pass // Make sure we don't have any false positives about the "struct is never constructed" lint. diff --git a/tests/ui/lint/dead-code/issue-68408-false-positive.rs b/tests/ui/lint/dead-code/issue-68408-false-positive.rs index 7ee6b5d7288..88ed111c556 100644 --- a/tests/ui/lint/dead-code/issue-68408-false-positive.rs +++ b/tests/ui/lint/dead-code/issue-68408-false-positive.rs @@ -1,4 +1,4 @@ -// check-pass +//@ check-pass // Make sure we don't have any false positives here. diff --git a/tests/ui/lint/dead-code/issue-85071-2.rs b/tests/ui/lint/dead-code/issue-85071-2.rs index f0639931c84..5db87358994 100644 --- a/tests/ui/lint/dead-code/issue-85071-2.rs +++ b/tests/ui/lint/dead-code/issue-85071-2.rs @@ -2,7 +2,7 @@ // of a function, and the warning is about an unreachable definition // instead of an unreachable expression. -// check-pass +//@ check-pass #![warn(unused_variables,unreachable_code)] diff --git a/tests/ui/lint/dead-code/issue-85071.rs b/tests/ui/lint/dead-code/issue-85071.rs index d6969321cad..84f2c9fc74e 100644 --- a/tests/ui/lint/dead-code/issue-85071.rs +++ b/tests/ui/lint/dead-code/issue-85071.rs @@ -4,7 +4,7 @@ // in this regard, which led to confusing "unused variable" warnings // without an accompanying explanatory "unreachable expression" warning. -// check-pass +//@ check-pass #![warn(unused_variables,unreachable_code)] diff --git a/tests/ui/lint/dead-code/issue-85255.rs b/tests/ui/lint/dead-code/issue-85255.rs index d75a8e2dd41..cba951eef72 100644 --- a/tests/ui/lint/dead-code/issue-85255.rs +++ b/tests/ui/lint/dead-code/issue-85255.rs @@ -1,5 +1,5 @@ // Unused `pub` fields in non-`pub` structs should also trigger dead code warnings. -// check-pass +//@ check-pass #![warn(dead_code)] diff --git a/tests/ui/lint/dead-code/leading-underscore.rs b/tests/ui/lint/dead-code/leading-underscore.rs index d3582961b3e..0ef123efc24 100644 --- a/tests/ui/lint/dead-code/leading-underscore.rs +++ b/tests/ui/lint/dead-code/leading-underscore.rs @@ -1,5 +1,5 @@ -// run-pass -// pretty-expanded FIXME #23616 +//@ run-pass +//@ pretty-expanded FIXME #23616 #![deny(dead_code)] diff --git a/tests/ui/lint/dead-code/offset-of-correct-param-env.rs b/tests/ui/lint/dead-code/offset-of-correct-param-env.rs index ae81a252439..61babdeb28b 100644 --- a/tests/ui/lint/dead-code/offset-of-correct-param-env.rs +++ b/tests/ui/lint/dead-code/offset-of-correct-param-env.rs @@ -1,4 +1,4 @@ -// check-pass +//@ check-pass #![feature(offset_of_nested)] #![deny(dead_code)] diff --git a/tests/ui/lint/dead-code/self-assign.rs b/tests/ui/lint/dead-code/self-assign.rs index ea7ce98d884..072a899e1bd 100644 --- a/tests/ui/lint/dead-code/self-assign.rs +++ b/tests/ui/lint/dead-code/self-assign.rs @@ -1,9 +1,9 @@ // Test that dead code warnings are issued for superfluous assignments of // fields or variables to themselves (issue #75356). -// ignore-test FIXME(81658, 83171) +//@ ignore-test FIXME(81658, 83171) -// check-pass +//@ check-pass #![allow(unused_assignments)] #![warn(dead_code)] diff --git a/tests/ui/lint/dead-code/trait-impl.rs b/tests/ui/lint/dead-code/trait-impl.rs index 92e389a938a..ba0365b194f 100644 --- a/tests/ui/lint/dead-code/trait-impl.rs +++ b/tests/ui/lint/dead-code/trait-impl.rs @@ -1,4 +1,4 @@ -// check-pass +//@ check-pass #![deny(dead_code)] enum Foo { diff --git a/tests/ui/lint/dead-code/type-in-foreign.rs b/tests/ui/lint/dead-code/type-in-foreign.rs index b6c593f316f..f34d9245809 100644 --- a/tests/ui/lint/dead-code/type-in-foreign.rs +++ b/tests/ui/lint/dead-code/type-in-foreign.rs @@ -1,5 +1,5 @@ // Verify that we do not warn on types that are used by foreign functions. -// check-pass +//@ check-pass #![deny(dead_code)] #[repr(C)] diff --git a/tests/ui/lint/dead-code/type-in-transparent.rs b/tests/ui/lint/dead-code/type-in-transparent.rs index 5dd6f93fd03..3760bf9c0df 100644 --- a/tests/ui/lint/dead-code/type-in-transparent.rs +++ b/tests/ui/lint/dead-code/type-in-transparent.rs @@ -1,5 +1,5 @@ // Verify that we do not warn on fields that are part of transparent types. -// check-pass +//@ check-pass #![deny(dead_code)] #[repr(transparent)] diff --git a/tests/ui/lint/dead-code/unused-variant-pub.rs b/tests/ui/lint/dead-code/unused-variant-pub.rs index 3a9061340eb..c955146d60a 100644 --- a/tests/ui/lint/dead-code/unused-variant-pub.rs +++ b/tests/ui/lint/dead-code/unused-variant-pub.rs @@ -1,4 +1,4 @@ -// build-pass +//@ build-pass #![deny(unused)] pub struct F; diff --git a/tests/ui/lint/dead-code/with-impl.rs b/tests/ui/lint/dead-code/with-impl.rs index 147ec7b9e2e..8164948ef96 100644 --- a/tests/ui/lint/dead-code/with-impl.rs +++ b/tests/ui/lint/dead-code/with-impl.rs @@ -1,4 +1,4 @@ -// run-pass +//@ run-pass #![deny(dead_code)] diff --git a/tests/ui/lint/dropping_copy_types.rs b/tests/ui/lint/dropping_copy_types.rs index 2412222d6d1..ef1291325af 100644 --- a/tests/ui/lint/dropping_copy_types.rs +++ b/tests/ui/lint/dropping_copy_types.rs @@ -1,4 +1,4 @@ -// check-pass +//@ check-pass #![warn(dropping_copy_types)] diff --git a/tests/ui/lint/dropping_references.rs b/tests/ui/lint/dropping_references.rs index bb02cb75a90..7f0e7c3e35b 100644 --- a/tests/ui/lint/dropping_references.rs +++ b/tests/ui/lint/dropping_references.rs @@ -1,4 +1,4 @@ -// check-pass +//@ check-pass #![warn(dropping_references)] diff --git a/tests/ui/lint/empty-lint-attributes.rs b/tests/ui/lint/empty-lint-attributes.rs index 9a0ec253322..b12b4064990 100644 --- a/tests/ui/lint/empty-lint-attributes.rs +++ b/tests/ui/lint/empty-lint-attributes.rs @@ -1,6 +1,6 @@ #![feature(lint_reasons)] -// check-pass +//@ check-pass // Empty (and reason-only) lint attributes are legal—although we may want to // lint them in the future (Issue #55112). diff --git a/tests/ui/lint/enable-unstable-lib-feature.rs b/tests/ui/lint/enable-unstable-lib-feature.rs index aa6a973d7bd..bb554eb1309 100644 --- a/tests/ui/lint/enable-unstable-lib-feature.rs +++ b/tests/ui/lint/enable-unstable-lib-feature.rs @@ -1,6 +1,6 @@ // Test that enabling an unstable feature disables warnings -// aux-build:stability-cfg2.rs +//@ aux-build:stability-cfg2.rs #![feature(unstable_test_feature)] #![deny(non_snake_case)] // To trigger a hard error diff --git a/tests/ui/lint/expansion-time-include.rs b/tests/ui/lint/expansion-time-include.rs index 4ea89d5adff..3ecc01b045c 100644 --- a/tests/ui/lint/expansion-time-include.rs +++ b/tests/ui/lint/expansion-time-include.rs @@ -1,4 +1,4 @@ -// ignore-test auxiliary file for expansion-time.rs +//@ ignore-test auxiliary file for expansion-time.rs 1 2 diff --git a/tests/ui/lint/expansion-time.rs b/tests/ui/lint/expansion-time.rs index f23c7cb0dca..1e1f8f9e1b6 100644 --- a/tests/ui/lint/expansion-time.rs +++ b/tests/ui/lint/expansion-time.rs @@ -1,4 +1,4 @@ -// check-pass +//@ check-pass #[warn(meta_variable_misuse)] macro_rules! foo { diff --git a/tests/ui/lint/expr-field.rs b/tests/ui/lint/expr-field.rs index 638fbf521c4..1d74a311ab7 100644 --- a/tests/ui/lint/expr-field.rs +++ b/tests/ui/lint/expr-field.rs @@ -1,4 +1,4 @@ -// check-pass +//@ check-pass pub struct A { pub x: u32, diff --git a/tests/ui/lint/fn_must_use.rs b/tests/ui/lint/fn_must_use.rs index b4e9da0fc84..be18ffedabb 100644 --- a/tests/ui/lint/fn_must_use.rs +++ b/tests/ui/lint/fn_must_use.rs @@ -1,4 +1,4 @@ -// check-pass +//@ check-pass #![warn(unused_must_use)] diff --git a/tests/ui/lint/for_loop_over_fallibles.rs b/tests/ui/lint/for_loop_over_fallibles.rs index 43d71c2e808..52c3b8f2aae 100644 --- a/tests/ui/lint/for_loop_over_fallibles.rs +++ b/tests/ui/lint/for_loop_over_fallibles.rs @@ -1,4 +1,4 @@ -// check-pass +//@ check-pass fn main() { // Common diff --git a/tests/ui/lint/forbid-error-capped.rs b/tests/ui/lint/forbid-error-capped.rs index b56471a756d..f5059793edd 100644 --- a/tests/ui/lint/forbid-error-capped.rs +++ b/tests/ui/lint/forbid-error-capped.rs @@ -1,4 +1,4 @@ -// check-pass +//@ check-pass // compile-args: --cap-lints=warn -Fwarnings // This checks that the forbid attribute checking is ignored when the forbidden diff --git a/tests/ui/lint/forbid-group-member.rs b/tests/ui/lint/forbid-group-member.rs index d03e858438b..092340d57ba 100644 --- a/tests/ui/lint/forbid-group-member.rs +++ b/tests/ui/lint/forbid-group-member.rs @@ -1,7 +1,7 @@ // Check what happens when we forbid a group but // then allow a member of that group. // -// check-pass +//@ check-pass #![forbid(unused)] diff --git a/tests/ui/lint/force-warn/allow-warnings.rs b/tests/ui/lint/force-warn/allow-warnings.rs index 0199381fcbb..9dbd9b6e526 100644 --- a/tests/ui/lint/force-warn/allow-warnings.rs +++ b/tests/ui/lint/force-warn/allow-warnings.rs @@ -1,7 +1,7 @@ // --force-warn $LINT causes $LINT (which is warn-by-default) to warn // despite allowing all warnings in module -// compile-flags: --force-warn dead_code -// check-pass +//@ compile-flags: --force-warn dead_code +//@ check-pass #![allow(warnings)] diff --git a/tests/ui/lint/force-warn/allowed-by-default-lint.rs b/tests/ui/lint/force-warn/allowed-by-default-lint.rs index b24ab822d93..f0c9663c0d3 100644 --- a/tests/ui/lint/force-warn/allowed-by-default-lint.rs +++ b/tests/ui/lint/force-warn/allowed-by-default-lint.rs @@ -1,6 +1,6 @@ // --force-warn $LINT causes $LINT (which is allow-by-default) to warn -// compile-flags: --force-warn elided_lifetimes_in_paths -// check-pass +//@ compile-flags: --force-warn elided_lifetimes_in_paths +//@ check-pass struct Foo<'a> { x: &'a u32, diff --git a/tests/ui/lint/force-warn/allowed-cli-deny-by-default-lint.rs b/tests/ui/lint/force-warn/allowed-cli-deny-by-default-lint.rs index 257df13efe0..24631bdd639 100644 --- a/tests/ui/lint/force-warn/allowed-cli-deny-by-default-lint.rs +++ b/tests/ui/lint/force-warn/allowed-cli-deny-by-default-lint.rs @@ -1,7 +1,7 @@ // --force-warn $LINT causes $LINT (which is deny-by-default) to warn // despite $LINT being allowed on command line -// compile-flags: -A mutable_transmutes --force-warn mutable_transmutes -// check-pass +//@ compile-flags: -A mutable_transmutes --force-warn mutable_transmutes +//@ check-pass fn main() { unsafe { diff --git a/tests/ui/lint/force-warn/allowed-deny-by-default-lint.rs b/tests/ui/lint/force-warn/allowed-deny-by-default-lint.rs index 0d4b468c2b3..2eb5bfe80cf 100644 --- a/tests/ui/lint/force-warn/allowed-deny-by-default-lint.rs +++ b/tests/ui/lint/force-warn/allowed-deny-by-default-lint.rs @@ -1,7 +1,7 @@ // --force-warn $LINT causes $LINT (which is deny-by-default) to warn // despite $LINT being allowed in module -// compile-flags: --force-warn mutable_transmutes -// check-pass +//@ compile-flags: --force-warn mutable_transmutes +//@ check-pass #![allow(mutable_transmutes)] fn main() { diff --git a/tests/ui/lint/force-warn/allowed-group-warn-by-default-lint.rs b/tests/ui/lint/force-warn/allowed-group-warn-by-default-lint.rs index 9b1edba41aa..1d4fe7a3f0a 100644 --- a/tests/ui/lint/force-warn/allowed-group-warn-by-default-lint.rs +++ b/tests/ui/lint/force-warn/allowed-group-warn-by-default-lint.rs @@ -1,7 +1,7 @@ // --force-warn $LINT causes $LINT (which is warn-by-default) to warn // despite $LINT_GROUP (which contains $LINT) being allowed -// compile-flags: --force-warn bare_trait_objects -// check-pass +//@ compile-flags: --force-warn bare_trait_objects +//@ check-pass #![allow(rust_2018_idioms)] diff --git a/tests/ui/lint/force-warn/allowed-warn-by-default-lint.rs b/tests/ui/lint/force-warn/allowed-warn-by-default-lint.rs index 06b37286776..e8194d7caf9 100644 --- a/tests/ui/lint/force-warn/allowed-warn-by-default-lint.rs +++ b/tests/ui/lint/force-warn/allowed-warn-by-default-lint.rs @@ -1,7 +1,7 @@ // --force-warn $LINT causes $LINT (which is warn-by-default) to warn // despite $LINT being allowed in module -// compile-flags: --force-warn dead_code -// check-pass +//@ compile-flags: --force-warn dead_code +//@ check-pass #![allow(dead_code)] diff --git a/tests/ui/lint/force-warn/cap-lints-allow.rs b/tests/ui/lint/force-warn/cap-lints-allow.rs index 9609ea99431..a4492494489 100644 --- a/tests/ui/lint/force-warn/cap-lints-allow.rs +++ b/tests/ui/lint/force-warn/cap-lints-allow.rs @@ -1,7 +1,7 @@ // --force-warn $LINT casuses $LINT to warn despite --cap-lints // set to allow -// compile-flags: --cap-lints allow --force-warn bare_trait_objects -// check-pass +//@ compile-flags: --cap-lints allow --force-warn bare_trait_objects +//@ check-pass pub trait SomeTrait {} diff --git a/tests/ui/lint/force-warn/cap-lints-warn-allowed-warn-by-default-lint.rs b/tests/ui/lint/force-warn/cap-lints-warn-allowed-warn-by-default-lint.rs index e65f156bfdc..5a9d29c520d 100644 --- a/tests/ui/lint/force-warn/cap-lints-warn-allowed-warn-by-default-lint.rs +++ b/tests/ui/lint/force-warn/cap-lints-warn-allowed-warn-by-default-lint.rs @@ -1,7 +1,7 @@ // --force-warn $LINT_GROUP causes $LINT to warn despite $LINT being // allowed in module and cap-lints set to warn -// compile-flags: --cap-lints warn --force-warn rust-2021-compatibility -// check-pass +//@ compile-flags: --cap-lints warn --force-warn rust-2021-compatibility +//@ check-pass #![allow(ellipsis_inclusive_range_patterns)] pub fn f() -> bool { diff --git a/tests/ui/lint/force-warn/deny-by-default-lint.rs b/tests/ui/lint/force-warn/deny-by-default-lint.rs index c2e9377e908..c4a2da03fac 100644 --- a/tests/ui/lint/force-warn/deny-by-default-lint.rs +++ b/tests/ui/lint/force-warn/deny-by-default-lint.rs @@ -1,6 +1,6 @@ // --force-warn $LINT causes $LINT (which is deny-by-default) to warn -// compile-flags: --force-warn mutable_transmutes -// check-pass +//@ compile-flags: --force-warn mutable_transmutes +//@ check-pass fn main() { unsafe { diff --git a/tests/ui/lint/force-warn/lint-group-allow-warnings.rs b/tests/ui/lint/force-warn/lint-group-allow-warnings.rs index 4b95f4d2dfb..658f6a7266b 100644 --- a/tests/ui/lint/force-warn/lint-group-allow-warnings.rs +++ b/tests/ui/lint/force-warn/lint-group-allow-warnings.rs @@ -1,8 +1,8 @@ // --force-warn $LINT_GROUP causes $LINT in $LINT_GROUP to warn // despite all warnings being allowed in module // warn-by-default lint to warn -// compile-flags: --force-warn nonstandard_style -// check-pass +//@ compile-flags: --force-warn nonstandard_style +//@ check-pass #![allow(warnings)] diff --git a/tests/ui/lint/force-warn/lint-group-allowed-cli-warn-by-default-lint.rs b/tests/ui/lint/force-warn/lint-group-allowed-cli-warn-by-default-lint.rs index 9736027452a..2f7f64be056 100644 --- a/tests/ui/lint/force-warn/lint-group-allowed-cli-warn-by-default-lint.rs +++ b/tests/ui/lint/force-warn/lint-group-allowed-cli-warn-by-default-lint.rs @@ -1,7 +1,7 @@ // --force-warn $LINT_GROUP causes $LINT (which is warn-by-default) to warn // despite $LINT being allowed on command line -// compile-flags: -A bare-trait-objects --force-warn rust-2018-idioms -// check-pass +//@ compile-flags: -A bare-trait-objects --force-warn rust-2018-idioms +//@ check-pass pub trait SomeTrait {} diff --git a/tests/ui/lint/force-warn/lint-group-allowed-lint-group.rs b/tests/ui/lint/force-warn/lint-group-allowed-lint-group.rs index 99cad614c25..818d021e60f 100644 --- a/tests/ui/lint/force-warn/lint-group-allowed-lint-group.rs +++ b/tests/ui/lint/force-warn/lint-group-allowed-lint-group.rs @@ -1,7 +1,7 @@ // --force-warn $LINT_GROUP causes $LINT to warn despite // $LINT_GROUP being allowed in module -// compile-flags: --force-warn rust_2018_idioms -// check-pass +//@ compile-flags: --force-warn rust_2018_idioms +//@ check-pass #![allow(rust_2018_idioms)] diff --git a/tests/ui/lint/force-warn/lint-group-allowed-warn-by-default-lint.rs b/tests/ui/lint/force-warn/lint-group-allowed-warn-by-default-lint.rs index f0aacd77340..358a7a32cfe 100644 --- a/tests/ui/lint/force-warn/lint-group-allowed-warn-by-default-lint.rs +++ b/tests/ui/lint/force-warn/lint-group-allowed-warn-by-default-lint.rs @@ -1,7 +1,7 @@ // --force-warn $LINT_GROUP causes $LINT (which is warn-by-default) to warn // despite $LINT being allowed in module -// compile-flags: --force-warn rust-2018-idioms -// check-pass +//@ compile-flags: --force-warn rust-2018-idioms +//@ check-pass #![allow(bare_trait_objects)] diff --git a/tests/ui/lint/force-warn/warn-by-default-lint-two-modules.rs b/tests/ui/lint/force-warn/warn-by-default-lint-two-modules.rs index 47a480ad708..7da0960068f 100644 --- a/tests/ui/lint/force-warn/warn-by-default-lint-two-modules.rs +++ b/tests/ui/lint/force-warn/warn-by-default-lint-two-modules.rs @@ -1,7 +1,7 @@ // --force-warn $LINT causes $LINT (which is warn-by-default) to warn // despite being allowed in one submodule (but not the other) -// compile-flags: --force-warn dead_code -// check-pass +//@ compile-flags: --force-warn dead_code +//@ check-pass mod one { #![allow(dead_code)] diff --git a/tests/ui/lint/force-warn/warnings-lint-group.rs b/tests/ui/lint/force-warn/warnings-lint-group.rs index d1d4f5602f2..944070527a1 100644 --- a/tests/ui/lint/force-warn/warnings-lint-group.rs +++ b/tests/ui/lint/force-warn/warnings-lint-group.rs @@ -1,5 +1,5 @@ // --force-warn warnings is an error -// compile-flags: --force-warn warnings -// error-pattern: `warnings` lint group is not supported +//@ compile-flags: --force-warn warnings +//@ error-pattern: `warnings` lint group is not supported fn main() {} diff --git a/tests/ui/lint/forgetting_copy_types.rs b/tests/ui/lint/forgetting_copy_types.rs index 224c7bcd5f6..c0bf0bf05ef 100644 --- a/tests/ui/lint/forgetting_copy_types.rs +++ b/tests/ui/lint/forgetting_copy_types.rs @@ -1,4 +1,4 @@ -// check-pass +//@ check-pass #![warn(forgetting_copy_types)] diff --git a/tests/ui/lint/forgetting_references.rs b/tests/ui/lint/forgetting_references.rs index bd51e980031..ecfa23ee497 100644 --- a/tests/ui/lint/forgetting_references.rs +++ b/tests/ui/lint/forgetting_references.rs @@ -1,4 +1,4 @@ -// check-pass +//@ check-pass #![warn(forgetting_references)] diff --git a/tests/ui/lint/function-item-references.rs b/tests/ui/lint/function-item-references.rs index 05213f4ed4b..918d72e28a9 100644 --- a/tests/ui/lint/function-item-references.rs +++ b/tests/ui/lint/function-item-references.rs @@ -1,4 +1,4 @@ -// check-pass +//@ check-pass #![feature(c_variadic)] #![warn(function_item_references)] use std::fmt::Pointer; diff --git a/tests/ui/lint/future-incompat-json-test.rs b/tests/ui/lint/future-incompat-json-test.rs index 6ccd670294c..741c863db23 100644 --- a/tests/ui/lint/future-incompat-json-test.rs +++ b/tests/ui/lint/future-incompat-json-test.rs @@ -1,5 +1,5 @@ -// compile-flags: -Zfuture-incompat-test --json=future-incompat --error-format=json -// check-pass +//@ compile-flags: -Zfuture-incompat-test --json=future-incompat --error-format=json +//@ check-pass // The `-Zfuture-incompat-test flag causes any normal warning to be included // in the future-incompatible report. The stderr output here should mention diff --git a/tests/ui/lint/future-incompat-json-test.stderr b/tests/ui/lint/future-incompat-json-test.stderr index f33a5cab6ba..bf29b9577db 100644 --- a/tests/ui/lint/future-incompat-json-test.stderr +++ b/tests/ui/lint/future-incompat-json-test.stderr @@ -1,4 +1,4 @@ -{"$message_type":"future_incompat","future_incompat_report":[{"diagnostic":{"$message_type":"diagnostic","message":"unused variable: `x`","code":{"code":"unused_variables","explanation":null},"level":"warning","spans":[{"file_name":"$DIR/future-incompat-json-test.rs","byte_start":338,"byte_end":339,"line_start":9,"line_end":9,"column_start":9,"column_end":10,"is_primary":true,"text":[{"text":" let x = 1;","highlight_start":9,"highlight_end":10}],"label":null,"suggested_replacement":null,"suggestion_applicability":null,"expansion":null}],"children":[{"message":"if this is intentional, prefix it with an underscore","code":null,"level":"help","spans":[{"file_name":"$DIR/future-incompat-json-test.rs","byte_start":338,"byte_end":339,"line_start":9,"line_end":9,"column_start":9,"column_end":10,"is_primary":true,"text":[{"text":" let x = 1;","highlight_start":9,"highlight_end":10}],"label":null,"suggested_replacement":"_x","suggestion_applicability":"MaybeIncorrect","expansion":null}],"children":[],"rendered":null}],"rendered":"warning: unused variable: `x` +{"$message_type":"future_incompat","future_incompat_report":[{"diagnostic":{"$message_type":"diagnostic","message":"unused variable: `x`","code":{"code":"unused_variables","explanation":null},"level":"warning","spans":[{"file_name":"$DIR/future-incompat-json-test.rs","byte_start":340,"byte_end":341,"line_start":9,"line_end":9,"column_start":9,"column_end":10,"is_primary":true,"text":[{"text":" let x = 1;","highlight_start":9,"highlight_end":10}],"label":null,"suggested_replacement":null,"suggestion_applicability":null,"expansion":null}],"children":[{"message":"if this is intentional, prefix it with an underscore","code":null,"level":"help","spans":[{"file_name":"$DIR/future-incompat-json-test.rs","byte_start":340,"byte_end":341,"line_start":9,"line_end":9,"column_start":9,"column_end":10,"is_primary":true,"text":[{"text":" let x = 1;","highlight_start":9,"highlight_end":10}],"label":null,"suggested_replacement":"_x","suggestion_applicability":"MaybeIncorrect","expansion":null}],"children":[],"rendered":null}],"rendered":"warning: unused variable: `x` --> $DIR/future-incompat-json-test.rs:9:9 | LL | let x = 1; diff --git a/tests/ui/lint/future-incompat-test.rs b/tests/ui/lint/future-incompat-test.rs index c5f477cc450..e0c8da66108 100644 --- a/tests/ui/lint/future-incompat-test.rs +++ b/tests/ui/lint/future-incompat-test.rs @@ -1,5 +1,5 @@ -// compile-flags: -Zfuture-incompat-test -// check-pass +//@ compile-flags: -Zfuture-incompat-test +//@ check-pass // The `-Zfuture-incompat-test flag causes any normal warning to be included // in the future-incompatible report. The stderr output here should mention diff --git a/tests/ui/lint/inclusive-range-pattern-syntax.fixed b/tests/ui/lint/inclusive-range-pattern-syntax.fixed index bee5d4ae4b1..1c47673cfc3 100644 --- a/tests/ui/lint/inclusive-range-pattern-syntax.fixed +++ b/tests/ui/lint/inclusive-range-pattern-syntax.fixed @@ -1,5 +1,5 @@ -// check-pass -// run-rustfix +//@ check-pass +//@ run-rustfix #![warn(ellipsis_inclusive_range_patterns)] diff --git a/tests/ui/lint/inclusive-range-pattern-syntax.rs b/tests/ui/lint/inclusive-range-pattern-syntax.rs index d98c10c26c7..e6e8c1c9532 100644 --- a/tests/ui/lint/inclusive-range-pattern-syntax.rs +++ b/tests/ui/lint/inclusive-range-pattern-syntax.rs @@ -1,5 +1,5 @@ -// check-pass -// run-rustfix +//@ check-pass +//@ run-rustfix #![warn(ellipsis_inclusive_range_patterns)] diff --git a/tests/ui/lint/inert-attr-macro.rs b/tests/ui/lint/inert-attr-macro.rs index dc0bb8ac265..90303a1fc3d 100644 --- a/tests/ui/lint/inert-attr-macro.rs +++ b/tests/ui/lint/inert-attr-macro.rs @@ -1,4 +1,4 @@ -// check-pass +//@ check-pass #![warn(unused)] diff --git a/tests/ui/lint/internal/trivial-diagnostics.rs b/tests/ui/lint/internal/trivial-diagnostics.rs index e536e1164fc..b93a20a52bb 100644 --- a/tests/ui/lint/internal/trivial-diagnostics.rs +++ b/tests/ui/lint/internal/trivial-diagnostics.rs @@ -1,4 +1,4 @@ -// compile-flags: -Zunstable-options +//@ compile-flags: -Zunstable-options pub fn issue_111280() { struct_span_err(msg).emit(); //~ ERROR cannot find value `msg` diff --git a/tests/ui/lint/invalid-nan-comparison-suggestion.fixed b/tests/ui/lint/invalid-nan-comparison-suggestion.fixed index feafc6c1b8c..46b2d4e9c3f 100644 --- a/tests/ui/lint/invalid-nan-comparison-suggestion.fixed +++ b/tests/ui/lint/invalid-nan-comparison-suggestion.fixed @@ -1,5 +1,5 @@ -// check-pass -// run-rustfix +//@ check-pass +//@ run-rustfix fn main() { let x = 5f32; diff --git a/tests/ui/lint/invalid-nan-comparison-suggestion.rs b/tests/ui/lint/invalid-nan-comparison-suggestion.rs index ad5eb66e5f1..558b433d794 100644 --- a/tests/ui/lint/invalid-nan-comparison-suggestion.rs +++ b/tests/ui/lint/invalid-nan-comparison-suggestion.rs @@ -1,5 +1,5 @@ -// check-pass -// run-rustfix +//@ check-pass +//@ run-rustfix fn main() { let x = 5f32; diff --git a/tests/ui/lint/invalid-nan-comparison.rs b/tests/ui/lint/invalid-nan-comparison.rs index d7e793ca583..202a5e27e8e 100644 --- a/tests/ui/lint/invalid-nan-comparison.rs +++ b/tests/ui/lint/invalid-nan-comparison.rs @@ -1,4 +1,4 @@ -// check-pass +//@ check-pass fn main() { f32(); diff --git a/tests/ui/lint/invalid_from_utf8.rs b/tests/ui/lint/invalid_from_utf8.rs index 43ceffb71e5..e87afe9094c 100644 --- a/tests/ui/lint/invalid_from_utf8.rs +++ b/tests/ui/lint/invalid_from_utf8.rs @@ -1,4 +1,4 @@ -// check-pass +//@ check-pass #![feature(inline_const)] #![feature(concat_bytes)] diff --git a/tests/ui/lint/invalid_value-polymorphic.rs b/tests/ui/lint/invalid_value-polymorphic.rs index 98f82b792fc..6a31ac17d96 100644 --- a/tests/ui/lint/invalid_value-polymorphic.rs +++ b/tests/ui/lint/invalid_value-polymorphic.rs @@ -1,5 +1,5 @@ -// compile-flags: --crate-type=lib -Zmir-enable-passes=+InstSimplify -// build-pass +//@ compile-flags: --crate-type=lib -Zmir-enable-passes=+InstSimplify +//@ build-pass #![feature(core_intrinsics)] diff --git a/tests/ui/lint/issue-101284.rs b/tests/ui/lint/issue-101284.rs index 1381d4f1727..ab5d8587ccb 100644 --- a/tests/ui/lint/issue-101284.rs +++ b/tests/ui/lint/issue-101284.rs @@ -1,5 +1,5 @@ -// check-pass -// edition:2021 +//@ check-pass +//@ edition:2021 #![deny(rust_2021_compatibility)] pub struct Warns { diff --git a/tests/ui/lint/issue-102705.rs b/tests/ui/lint/issue-102705.rs index 5bcc8950ada..37cc3f8cc25 100644 --- a/tests/ui/lint/issue-102705.rs +++ b/tests/ui/lint/issue-102705.rs @@ -1,4 +1,4 @@ -// check-pass +//@ check-pass #![allow(opaque_hidden_inferred_bound)] #![allow(dead_code)] diff --git a/tests/ui/lint/issue-103317.fixed b/tests/ui/lint/issue-103317.fixed index 5a987423e5b..72b4b667783 100644 --- a/tests/ui/lint/issue-103317.fixed +++ b/tests/ui/lint/issue-103317.fixed @@ -1,5 +1,5 @@ -// check-pass -// run-rustfix +//@ check-pass +//@ run-rustfix #[warn(unreachable_pub)] mod inner { diff --git a/tests/ui/lint/issue-103317.rs b/tests/ui/lint/issue-103317.rs index c2ba939e13c..8333a5b9a71 100644 --- a/tests/ui/lint/issue-103317.rs +++ b/tests/ui/lint/issue-103317.rs @@ -1,5 +1,5 @@ -// check-pass -// run-rustfix +//@ check-pass +//@ run-rustfix #[warn(unreachable_pub)] mod inner { diff --git a/tests/ui/lint/issue-103435-extra-parentheses.fixed b/tests/ui/lint/issue-103435-extra-parentheses.fixed index 74b5aa06e35..4371336188c 100644 --- a/tests/ui/lint/issue-103435-extra-parentheses.fixed +++ b/tests/ui/lint/issue-103435-extra-parentheses.fixed @@ -1,4 +1,4 @@ -// run-rustfix +//@ run-rustfix #![deny(unused_parens)] fn main() { diff --git a/tests/ui/lint/issue-103435-extra-parentheses.rs b/tests/ui/lint/issue-103435-extra-parentheses.rs index cc81a64f217..c9170f32373 100644 --- a/tests/ui/lint/issue-103435-extra-parentheses.rs +++ b/tests/ui/lint/issue-103435-extra-parentheses.rs @@ -1,4 +1,4 @@ -// run-rustfix +//@ run-rustfix #![deny(unused_parens)] fn main() { diff --git a/tests/ui/lint/issue-104897.rs b/tests/ui/lint/issue-104897.rs index 2d298aff9db..3cfe94bbd22 100644 --- a/tests/ui/lint/issue-104897.rs +++ b/tests/ui/lint/issue-104897.rs @@ -1,5 +1,5 @@ -// error-pattern: this file contains an unclosed delimiter -// error-pattern: this file contains an unclosed delimiter -// error-pattern: this file contains an unclosed delimiter +//@ error-pattern: this file contains an unclosed delimiter +//@ error-pattern: this file contains an unclosed delimiter +//@ error-pattern: this file contains an unclosed delimiter fn f(){(print!(Ć” diff --git a/tests/ui/lint/issue-108155.rs b/tests/ui/lint/issue-108155.rs index 4ae0cbd92ff..1c4166136e3 100644 --- a/tests/ui/lint/issue-108155.rs +++ b/tests/ui/lint/issue-108155.rs @@ -1,4 +1,4 @@ -// check-pass +//@ check-pass // check that `deref_into_dyn_supertrait` doesn't cause ICE by eagerly converting // a cancelled lint diff --git a/tests/ui/lint/issue-109529.fixed b/tests/ui/lint/issue-109529.fixed index 5ad489073ee..d12cc81d09c 100644 --- a/tests/ui/lint/issue-109529.fixed +++ b/tests/ui/lint/issue-109529.fixed @@ -1,4 +1,4 @@ -// run-rustfix +//@ run-rustfix fn main() { for _ in 0..=255 as u8 {} //~ ERROR range endpoint is out of range diff --git a/tests/ui/lint/issue-109529.rs b/tests/ui/lint/issue-109529.rs index 383d7bc4cf3..1a3c1ff15ba 100644 --- a/tests/ui/lint/issue-109529.rs +++ b/tests/ui/lint/issue-109529.rs @@ -1,4 +1,4 @@ -// run-rustfix +//@ run-rustfix fn main() { for _ in 0..256 as u8 {} //~ ERROR range endpoint is out of range diff --git a/tests/ui/lint/issue-110573.rs b/tests/ui/lint/issue-110573.rs index d9f0868b765..d6c1b9b296d 100644 --- a/tests/ui/lint/issue-110573.rs +++ b/tests/ui/lint/issue-110573.rs @@ -1,4 +1,4 @@ -// check-pass +//@ check-pass #![deny(warnings)] diff --git a/tests/ui/lint/issue-112489.rs b/tests/ui/lint/issue-112489.rs index 559edf0e4f2..631816ca759 100644 --- a/tests/ui/lint/issue-112489.rs +++ b/tests/ui/lint/issue-112489.rs @@ -1,4 +1,4 @@ -// check-pass +//@ check-pass use std::borrow::Borrow; struct S; diff --git a/tests/ui/lint/issue-121070-let-range.rs b/tests/ui/lint/issue-121070-let-range.rs index 84598dcd258..1f575cfaca5 100644 --- a/tests/ui/lint/issue-121070-let-range.rs +++ b/tests/ui/lint/issue-121070-let-range.rs @@ -1,4 +1,4 @@ -// check-pass +//@ check-pass #![feature(let_chains)] #![allow(irrefutable_let_patterns)] diff --git a/tests/ui/lint/issue-14837.rs b/tests/ui/lint/issue-14837.rs index a83bc415002..73c63cde2ba 100644 --- a/tests/ui/lint/issue-14837.rs +++ b/tests/ui/lint/issue-14837.rs @@ -1,5 +1,5 @@ -// check-pass -// pretty-expanded FIXME #23616 +//@ check-pass +//@ pretty-expanded FIXME #23616 #[deny(dead_code)] pub enum Foo { diff --git a/tests/ui/lint/issue-1866.rs b/tests/ui/lint/issue-1866.rs index caac0c50414..386aeeb6ad0 100644 --- a/tests/ui/lint/issue-1866.rs +++ b/tests/ui/lint/issue-1866.rs @@ -1,9 +1,9 @@ -// build-pass +//@ build-pass #![allow(dead_code)] #![allow(non_camel_case_types)] #![warn(clashing_extern_declarations)] -// pretty-expanded FIXME #23616 +//@ pretty-expanded FIXME #23616 mod a { pub type rust_task = usize; diff --git a/tests/ui/lint/issue-19102.rs b/tests/ui/lint/issue-19102.rs index 1f32d10b644..0680fe6f8b6 100644 --- a/tests/ui/lint/issue-19102.rs +++ b/tests/ui/lint/issue-19102.rs @@ -1,4 +1,4 @@ -// check-pass +//@ check-pass #![allow(unused_imports)] #![deny(unused_qualifications)] diff --git a/tests/ui/lint/issue-20343.rs b/tests/ui/lint/issue-20343.rs index f0f4eccc676..24e8062b1f3 100644 --- a/tests/ui/lint/issue-20343.rs +++ b/tests/ui/lint/issue-20343.rs @@ -1,8 +1,8 @@ -// run-pass +//@ run-pass #![allow(unused_variables)] // Regression test for Issue #20343. -// pretty-expanded FIXME #23616 +//@ pretty-expanded FIXME #23616 #![deny(dead_code)] diff --git a/tests/ui/lint/issue-31924-non-snake-ffi.rs b/tests/ui/lint/issue-31924-non-snake-ffi.rs index 5b9faca4911..ade4e630fb2 100644 --- a/tests/ui/lint/issue-31924-non-snake-ffi.rs +++ b/tests/ui/lint/issue-31924-non-snake-ffi.rs @@ -1,4 +1,4 @@ -// check-pass +//@ check-pass #![deny(non_snake_case)] diff --git a/tests/ui/lint/issue-34798.rs b/tests/ui/lint/issue-34798.rs index f0d710123cd..064fc7c4ad6 100644 --- a/tests/ui/lint/issue-34798.rs +++ b/tests/ui/lint/issue-34798.rs @@ -1,4 +1,4 @@ -// run-pass +//@ run-pass #![forbid(improper_ctypes)] #![allow(dead_code)] diff --git a/tests/ui/lint/issue-47775-nested-macro-unnecessary-parens-arg.rs b/tests/ui/lint/issue-47775-nested-macro-unnecessary-parens-arg.rs index 0a951cfa91c..41cf6184929 100644 --- a/tests/ui/lint/issue-47775-nested-macro-unnecessary-parens-arg.rs +++ b/tests/ui/lint/issue-47775-nested-macro-unnecessary-parens-arg.rs @@ -1,4 +1,4 @@ -// check-pass +//@ check-pass #![warn(unused_parens)] diff --git a/tests/ui/lint/issue-49588-non-shorthand-field-patterns-in-pattern-macro.rs b/tests/ui/lint/issue-49588-non-shorthand-field-patterns-in-pattern-macro.rs index f30d7e2edcc..8e74531e776 100644 --- a/tests/ui/lint/issue-49588-non-shorthand-field-patterns-in-pattern-macro.rs +++ b/tests/ui/lint/issue-49588-non-shorthand-field-patterns-in-pattern-macro.rs @@ -1,4 +1,4 @@ -// run-pass +//@ run-pass #![allow(unused_variables)] #![deny(non_shorthand_field_patterns)] diff --git a/tests/ui/lint/issue-54099-camel-case-underscore-types.rs b/tests/ui/lint/issue-54099-camel-case-underscore-types.rs index b2bf87358a4..64e6dafd941 100644 --- a/tests/ui/lint/issue-54099-camel-case-underscore-types.rs +++ b/tests/ui/lint/issue-54099-camel-case-underscore-types.rs @@ -1,4 +1,4 @@ -// check-pass +//@ check-pass #![forbid(non_camel_case_types)] #![allow(dead_code)] diff --git a/tests/ui/lint/issue-57410-1.rs b/tests/ui/lint/issue-57410-1.rs index d825cb18008..6c0b54d74ec 100644 --- a/tests/ui/lint/issue-57410-1.rs +++ b/tests/ui/lint/issue-57410-1.rs @@ -1,4 +1,4 @@ -// check-pass +//@ check-pass // Originally from #53925. // Tests that the `unreachable_pub` lint doesn't fire for `pub self::bar::Bar`. diff --git a/tests/ui/lint/issue-57410.rs b/tests/ui/lint/issue-57410.rs index 0cf4b8068e4..ed0fbc87bfb 100644 --- a/tests/ui/lint/issue-57410.rs +++ b/tests/ui/lint/issue-57410.rs @@ -1,4 +1,4 @@ -// check-pass +//@ check-pass // Tests that the `unreachable_pub` lint doesn't fire for `pub self::imp::f`. diff --git a/tests/ui/lint/issue-70819-dont-override-forbid-in-same-scope.rs b/tests/ui/lint/issue-70819-dont-override-forbid-in-same-scope.rs index b4fc3317487..37d96129317 100644 --- a/tests/ui/lint/issue-70819-dont-override-forbid-in-same-scope.rs +++ b/tests/ui/lint/issue-70819-dont-override-forbid-in-same-scope.rs @@ -12,7 +12,7 @@ // effort for bug like this, which 1. end users are unlikely to run into in the // first place, and 2. they won't see the redundant output anyway. -// compile-flags: -Z deduplicate-diagnostics=yes +//@ compile-flags: -Z deduplicate-diagnostics=yes #![forbid(forbidden_lint_groups)] diff --git a/tests/ui/lint/issue-79546-fuel-ice.rs b/tests/ui/lint/issue-79546-fuel-ice.rs index 0e9f54088b8..dbee924d26e 100644 --- a/tests/ui/lint/issue-79546-fuel-ice.rs +++ b/tests/ui/lint/issue-79546-fuel-ice.rs @@ -1,7 +1,7 @@ // Regression test for the ICE described in #79546. -// compile-flags: --cap-lints=allow -Zfuel=issue79546=0 -// check-pass +//@ compile-flags: --cap-lints=allow -Zfuel=issue79546=0 +//@ check-pass #![crate_name="issue79546"] struct S; diff --git a/tests/ui/lint/issue-80988.rs b/tests/ui/lint/issue-80988.rs index 5b910f1d8df..80decd8e736 100644 --- a/tests/ui/lint/issue-80988.rs +++ b/tests/ui/lint/issue-80988.rs @@ -1,6 +1,6 @@ // Regression test for #80988 // -// check-pass +//@ check-pass #![forbid(warnings)] diff --git a/tests/ui/lint/issue-81218.rs b/tests/ui/lint/issue-81218.rs index f02aa9040eb..623d6488aad 100644 --- a/tests/ui/lint/issue-81218.rs +++ b/tests/ui/lint/issue-81218.rs @@ -1,6 +1,6 @@ // Regression test for #81218 // -// check-pass +//@ check-pass #![forbid(warnings)] diff --git a/tests/ui/lint/issue-83477.rs b/tests/ui/lint/issue-83477.rs index 4262a28799d..d134650f221 100644 --- a/tests/ui/lint/issue-83477.rs +++ b/tests/ui/lint/issue-83477.rs @@ -1,5 +1,5 @@ -// compile-flags: -Zunstable-options -// check-pass +//@ compile-flags: -Zunstable-options +//@ check-pass #![warn(rustc::internal)] #[allow(rustc::foo::bar::default_hash_types)] diff --git a/tests/ui/lint/issue-87274-paren-parent.rs b/tests/ui/lint/issue-87274-paren-parent.rs index 0141c5a252f..409824cc940 100644 --- a/tests/ui/lint/issue-87274-paren-parent.rs +++ b/tests/ui/lint/issue-87274-paren-parent.rs @@ -1,4 +1,4 @@ -// check-pass +//@ check-pass // Tests that we properly lint at 'paren' expressions fn foo() -> Result<(), String> { diff --git a/tests/ui/lint/issue-89469.rs b/tests/ui/lint/issue-89469.rs index 3a6ab452840..f691d6b5a92 100644 --- a/tests/ui/lint/issue-89469.rs +++ b/tests/ui/lint/issue-89469.rs @@ -1,7 +1,7 @@ // Regression test for #89469, where an extra non_snake_case warning was // reported for a shorthand field binding. -// check-pass +//@ check-pass #![deny(non_snake_case)] #[allow(non_snake_case)] diff --git a/tests/ui/lint/issue-90614-accept-allow-text-direction-codepoint-in-comment-lint.rs b/tests/ui/lint/issue-90614-accept-allow-text-direction-codepoint-in-comment-lint.rs index 425e2703c94..583dc9e2151 100644 --- a/tests/ui/lint/issue-90614-accept-allow-text-direction-codepoint-in-comment-lint.rs +++ b/tests/ui/lint/issue-90614-accept-allow-text-direction-codepoint-in-comment-lint.rs @@ -1,4 +1,4 @@ -// check-pass +//@ check-pass // Allowing the code lint should work without warning and // the text flow char in the comment should be ignored. diff --git a/tests/ui/lint/known-tool-in-submodule/root.rs b/tests/ui/lint/known-tool-in-submodule/root.rs index 80806dcbd28..dadbfa3ee9d 100644 --- a/tests/ui/lint/known-tool-in-submodule/root.rs +++ b/tests/ui/lint/known-tool-in-submodule/root.rs @@ -1,4 +1,4 @@ -// check-pass +//@ check-pass #![feature(register_tool)] #![register_tool(tool)] diff --git a/tests/ui/lint/known-tool-in-submodule/submodule.rs b/tests/ui/lint/known-tool-in-submodule/submodule.rs index bb25e10056f..0bb2b93d53b 100644 --- a/tests/ui/lint/known-tool-in-submodule/submodule.rs +++ b/tests/ui/lint/known-tool-in-submodule/submodule.rs @@ -1,4 +1,4 @@ -// ignore-test: not a test +//@ ignore-test: not a test #[allow(tool::lint)] pub fn foo() {} diff --git a/tests/ui/lint/large_assignments/copy_into_box_rc_arc.rs b/tests/ui/lint/large_assignments/copy_into_box_rc_arc.rs index 866a4d10ff5..dfa0b8015d0 100644 --- a/tests/ui/lint/large_assignments/copy_into_box_rc_arc.rs +++ b/tests/ui/lint/large_assignments/copy_into_box_rc_arc.rs @@ -1,11 +1,11 @@ #![deny(large_assignments)] #![feature(large_assignments)] #![move_size_limit = "1000"] -// build-fail -// only-64bit +//@ build-fail +//@ only-64bit -// edition:2018 -// compile-flags: -Zmir-opt-level=1 +//@ edition:2018 +//@ compile-flags: -Zmir-opt-level=1 use std::{sync::Arc, rc::Rc}; diff --git a/tests/ui/lint/large_assignments/copy_into_fn.rs b/tests/ui/lint/large_assignments/copy_into_fn.rs index ee204bf7af1..5222e833bcc 100644 --- a/tests/ui/lint/large_assignments/copy_into_fn.rs +++ b/tests/ui/lint/large_assignments/copy_into_fn.rs @@ -1,4 +1,4 @@ -// build-fail +//@ build-fail #![feature(large_assignments)] #![move_size_limit = "1000"] diff --git a/tests/ui/lint/large_assignments/large_future.rs b/tests/ui/lint/large_assignments/large_future.rs index a69ff356c6b..28c358bdbf0 100644 --- a/tests/ui/lint/large_assignments/large_future.rs +++ b/tests/ui/lint/large_assignments/large_future.rs @@ -1,13 +1,13 @@ #![deny(large_assignments)] #![cfg_attr(attribute, feature(large_assignments))] #![cfg_attr(attribute, move_size_limit = "1000")] -// build-fail -// only-64bit -// revisions: attribute option -// [option]compile-flags: -Zmove-size-limit=1000 +//@ build-fail +//@ only-64bit +//@ revisions: attribute option +//@ [option]compile-flags: -Zmove-size-limit=1000 -// edition:2018 -// compile-flags: -Zmir-opt-level=0 +//@ edition:2018 +//@ compile-flags: -Zmir-opt-level=0 fn main() { let x = async { diff --git a/tests/ui/lint/large_assignments/move_into_box_rc_arc.rs b/tests/ui/lint/large_assignments/move_into_box_rc_arc.rs index b7a70dfdda0..1f582c21dfb 100644 --- a/tests/ui/lint/large_assignments/move_into_box_rc_arc.rs +++ b/tests/ui/lint/large_assignments/move_into_box_rc_arc.rs @@ -1,11 +1,11 @@ #![deny(large_assignments)] #![feature(large_assignments)] #![move_size_limit = "1000"] -// build-fail -// only-64bit +//@ build-fail +//@ only-64bit -// edition:2018 -// compile-flags: -Zmir-opt-level=0 +//@ edition:2018 +//@ compile-flags: -Zmir-opt-level=0 use std::{sync::Arc, rc::Rc}; diff --git a/tests/ui/lint/large_assignments/move_into_fn.rs b/tests/ui/lint/large_assignments/move_into_fn.rs index 359705bfc03..73ec08fa23a 100644 --- a/tests/ui/lint/large_assignments/move_into_fn.rs +++ b/tests/ui/lint/large_assignments/move_into_fn.rs @@ -1,4 +1,4 @@ -// build-fail +//@ build-fail #![feature(large_assignments)] #![move_size_limit = "1000"] diff --git a/tests/ui/lint/let_underscore/issue-119696-err-on-fn.rs b/tests/ui/lint/let_underscore/issue-119696-err-on-fn.rs index 8e15b4da35a..b885352dfd9 100644 --- a/tests/ui/lint/let_underscore/issue-119696-err-on-fn.rs +++ b/tests/ui/lint/let_underscore/issue-119696-err-on-fn.rs @@ -1,4 +1,4 @@ -// edition: 2021 +//@ edition: 2021 #![deny(let_underscore_drop)] fn main() { diff --git a/tests/ui/lint/let_underscore/let_underscore_drop.rs b/tests/ui/lint/let_underscore/let_underscore_drop.rs index a31b18ed594..58988ec05d7 100644 --- a/tests/ui/lint/let_underscore/let_underscore_drop.rs +++ b/tests/ui/lint/let_underscore/let_underscore_drop.rs @@ -1,4 +1,4 @@ -// check-pass +//@ check-pass #![warn(let_underscore_drop)] struct NontrivialDrop; diff --git a/tests/ui/lint/let_underscore/let_underscore_lock.rs b/tests/ui/lint/let_underscore/let_underscore_lock.rs index df7e60e3940..51d81e68043 100644 --- a/tests/ui/lint/let_underscore/let_underscore_lock.rs +++ b/tests/ui/lint/let_underscore/let_underscore_lock.rs @@ -1,4 +1,4 @@ -// check-fail +//@ check-fail use std::sync::{Arc, Mutex}; struct Struct { diff --git a/tests/ui/lint/lint-cap-trait-bounds.rs b/tests/ui/lint/lint-cap-trait-bounds.rs index d9c28dd0aa6..e3806082ee1 100644 --- a/tests/ui/lint/lint-cap-trait-bounds.rs +++ b/tests/ui/lint/lint-cap-trait-bounds.rs @@ -1,7 +1,7 @@ // Regression test for https://github.com/rust-lang/rust/issues/43134 -// check-pass -// compile-flags: --cap-lints allow +//@ check-pass +//@ compile-flags: --cap-lints allow type Foo = Option; diff --git a/tests/ui/lint/lint-cap.rs b/tests/ui/lint/lint-cap.rs index 461b923ccd4..4f67a76f68f 100644 --- a/tests/ui/lint/lint-cap.rs +++ b/tests/ui/lint/lint-cap.rs @@ -1,5 +1,5 @@ -// run-pass -// compile-flags: --cap-lints allow +//@ run-pass +//@ compile-flags: --cap-lints allow #![deny(warnings)] diff --git a/tests/ui/lint/lint-const-item-mutation.rs b/tests/ui/lint/lint-const-item-mutation.rs index 4bf5e0a9e21..d51d3c39493 100644 --- a/tests/ui/lint/lint-const-item-mutation.rs +++ b/tests/ui/lint/lint-const-item-mutation.rs @@ -1,4 +1,4 @@ -// check-pass +//@ check-pass struct MyStruct { field: bool, diff --git a/tests/ui/lint/lint-ctypes-113436.rs b/tests/ui/lint/lint-ctypes-113436.rs index 4f733b5bb16..d5acdc45f92 100644 --- a/tests/ui/lint/lint-ctypes-113436.rs +++ b/tests/ui/lint/lint-ctypes-113436.rs @@ -1,4 +1,4 @@ -// check-pass +//@ check-pass #![deny(improper_ctypes_definitions)] #[repr(C)] diff --git a/tests/ui/lint/lint-ctypes-113900.rs b/tests/ui/lint/lint-ctypes-113900.rs index ac4ff1ae2df..3dd196a4094 100644 --- a/tests/ui/lint/lint-ctypes-113900.rs +++ b/tests/ui/lint/lint-ctypes-113900.rs @@ -1,4 +1,4 @@ -// check-pass +//@ check-pass // Extending `improper_ctypes` to check external-ABI fn-ptrs means that it can encounter // projections which cannot be normalized - unsurprisingly, this shouldn't crash the compiler. diff --git a/tests/ui/lint/lint-ctypes-66202.rs b/tests/ui/lint/lint-ctypes-66202.rs index ebab41d143e..e4cfa54c8d8 100644 --- a/tests/ui/lint/lint-ctypes-66202.rs +++ b/tests/ui/lint/lint-ctypes-66202.rs @@ -1,4 +1,4 @@ -// check-pass +//@ check-pass #![deny(improper_ctypes)] diff --git a/tests/ui/lint/lint-ctypes-73249-1.rs b/tests/ui/lint/lint-ctypes-73249-1.rs index cf416c3fe8b..0ca91ef294f 100644 --- a/tests/ui/lint/lint-ctypes-73249-1.rs +++ b/tests/ui/lint/lint-ctypes-73249-1.rs @@ -1,4 +1,4 @@ -// check-pass +//@ check-pass #![deny(improper_ctypes)] pub trait Foo { diff --git a/tests/ui/lint/lint-ctypes-73249-4.rs b/tests/ui/lint/lint-ctypes-73249-4.rs index 6c72bd691b1..37099c1313a 100644 --- a/tests/ui/lint/lint-ctypes-73249-4.rs +++ b/tests/ui/lint/lint-ctypes-73249-4.rs @@ -1,4 +1,4 @@ -// check-pass +//@ check-pass #![deny(improper_ctypes)] use std::marker::PhantomData; diff --git a/tests/ui/lint/lint-ctypes-73249.rs b/tests/ui/lint/lint-ctypes-73249.rs index 5b48fa9b737..c5f2318ef0a 100644 --- a/tests/ui/lint/lint-ctypes-73249.rs +++ b/tests/ui/lint/lint-ctypes-73249.rs @@ -1,4 +1,4 @@ -// check-pass +//@ check-pass #![deny(improper_ctypes)] pub trait Foo { diff --git a/tests/ui/lint/lint-ctypes-73251.rs b/tests/ui/lint/lint-ctypes-73251.rs index a00d1a75aec..68eeb67deea 100644 --- a/tests/ui/lint/lint-ctypes-73251.rs +++ b/tests/ui/lint/lint-ctypes-73251.rs @@ -1,4 +1,4 @@ -// check-pass +//@ check-pass #![feature(type_alias_impl_trait)] #![deny(improper_ctypes)] diff --git a/tests/ui/lint/lint-ctypes-73747.rs b/tests/ui/lint/lint-ctypes-73747.rs index 293ffd5c28e..a2562e3b421 100644 --- a/tests/ui/lint/lint-ctypes-73747.rs +++ b/tests/ui/lint/lint-ctypes-73747.rs @@ -1,4 +1,4 @@ -// check-pass +//@ check-pass #[repr(transparent)] struct NonNullRawComPtr { diff --git a/tests/ui/lint/lint-exceeding-bitshifts.rs b/tests/ui/lint/lint-exceeding-bitshifts.rs index 048c1aff8a9..ea9d5ce6781 100644 --- a/tests/ui/lint/lint-exceeding-bitshifts.rs +++ b/tests/ui/lint/lint-exceeding-bitshifts.rs @@ -1,10 +1,10 @@ -// revisions: noopt opt opt_with_overflow_checks -//[noopt]compile-flags: -C opt-level=0 -//[opt]compile-flags: -O -//[opt_with_overflow_checks]compile-flags: -C overflow-checks=on -O -// build-pass -// ignore-pass (test emits codegen-time warnings and verifies that they are not errors) -// normalize-stderr-test "shift left by `(64|32)_usize`, which" -> "shift left by `%BITS%`, which" +//@ revisions: noopt opt opt_with_overflow_checks +//@[noopt]compile-flags: -C opt-level=0 +//@[opt]compile-flags: -O +//@[opt_with_overflow_checks]compile-flags: -C overflow-checks=on -O +//@ build-pass +//@ ignore-pass (test emits codegen-time warnings and verifies that they are not errors) +//@ normalize-stderr-test "shift left by `(64|32)_usize`, which" -> "shift left by `%BITS%`, which" #![crate_type="lib"] #![warn(arithmetic_overflow)] diff --git a/tests/ui/lint/lint-expr-stmt-attrs-for-early-lints.rs b/tests/ui/lint/lint-expr-stmt-attrs-for-early-lints.rs index 07a32904a5e..eb110869e44 100644 --- a/tests/ui/lint/lint-expr-stmt-attrs-for-early-lints.rs +++ b/tests/ui/lint/lint-expr-stmt-attrs-for-early-lints.rs @@ -1,4 +1,4 @@ -// run-pass +//@ run-pass #![feature(stmt_expr_attributes)] #![deny(unused_parens)] diff --git a/tests/ui/lint/lint-ffi-safety-all-phantom.rs b/tests/ui/lint/lint-ffi-safety-all-phantom.rs index 7419d345800..25445c32f12 100644 --- a/tests/ui/lint/lint-ffi-safety-all-phantom.rs +++ b/tests/ui/lint/lint-ffi-safety-all-phantom.rs @@ -2,7 +2,7 @@ // It ensures that transparent types where all fields are PhantomData are marked as // FFI-safe. -// check-pass +//@ check-pass #[repr(transparent)] #[derive(Copy, Clone)] diff --git a/tests/ui/lint/lint-forbid-cmdline.rs b/tests/ui/lint/lint-forbid-cmdline.rs index 32a92e09b14..8a4eb449d3c 100644 --- a/tests/ui/lint/lint-forbid-cmdline.rs +++ b/tests/ui/lint/lint-forbid-cmdline.rs @@ -1,4 +1,4 @@ -// compile-flags: -F deprecated +//@ compile-flags: -F deprecated #[allow(deprecated)] //~ ERROR allow(deprecated) incompatible fn main() { diff --git a/tests/ui/lint/lint-invalid-atomic-ordering-bool.rs b/tests/ui/lint/lint-invalid-atomic-ordering-bool.rs index 15ceb619571..d76d02762c0 100644 --- a/tests/ui/lint/lint-invalid-atomic-ordering-bool.rs +++ b/tests/ui/lint/lint-invalid-atomic-ordering-bool.rs @@ -1,4 +1,4 @@ -// only-x86_64 +//@ only-x86_64 use std::sync::atomic::{AtomicBool, Ordering}; fn main() { diff --git a/tests/ui/lint/lint-invalid-atomic-ordering-exchange-weak.rs b/tests/ui/lint/lint-invalid-atomic-ordering-exchange-weak.rs index 63204c725c3..121843214b1 100644 --- a/tests/ui/lint/lint-invalid-atomic-ordering-exchange-weak.rs +++ b/tests/ui/lint/lint-invalid-atomic-ordering-exchange-weak.rs @@ -1,4 +1,4 @@ -// only-x86_64 +//@ only-x86_64 use std::sync::atomic::{AtomicPtr, Ordering}; fn main() { diff --git a/tests/ui/lint/lint-invalid-atomic-ordering-exchange.rs b/tests/ui/lint/lint-invalid-atomic-ordering-exchange.rs index 488d268eee8..16853a31505 100644 --- a/tests/ui/lint/lint-invalid-atomic-ordering-exchange.rs +++ b/tests/ui/lint/lint-invalid-atomic-ordering-exchange.rs @@ -1,4 +1,4 @@ -// only-x86_64 +//@ only-x86_64 use std::sync::atomic::{AtomicUsize, Ordering}; fn main() { diff --git a/tests/ui/lint/lint-invalid-atomic-ordering-false-positive.rs b/tests/ui/lint/lint-invalid-atomic-ordering-false-positive.rs index 4fb8605b452..51dbf19c72f 100644 --- a/tests/ui/lint/lint-invalid-atomic-ordering-false-positive.rs +++ b/tests/ui/lint/lint-invalid-atomic-ordering-false-positive.rs @@ -1,5 +1,5 @@ -// only-x86_64 -// check-pass +//@ only-x86_64 +//@ check-pass use std::sync::atomic::{AtomicUsize, Ordering}; trait Foo { diff --git a/tests/ui/lint/lint-invalid-atomic-ordering-fence.rs b/tests/ui/lint/lint-invalid-atomic-ordering-fence.rs index 22034472c71..30662f072d3 100644 --- a/tests/ui/lint/lint-invalid-atomic-ordering-fence.rs +++ b/tests/ui/lint/lint-invalid-atomic-ordering-fence.rs @@ -1,4 +1,4 @@ -// only-x86_64 +//@ only-x86_64 use std::sync::atomic::{compiler_fence, fence, Ordering}; fn main() { diff --git a/tests/ui/lint/lint-invalid-atomic-ordering-fetch-update.rs b/tests/ui/lint/lint-invalid-atomic-ordering-fetch-update.rs index 734b63324af..bdeacac4957 100644 --- a/tests/ui/lint/lint-invalid-atomic-ordering-fetch-update.rs +++ b/tests/ui/lint/lint-invalid-atomic-ordering-fetch-update.rs @@ -1,4 +1,4 @@ -// only-x86_64 +//@ only-x86_64 use std::sync::atomic::{AtomicIsize, Ordering}; fn main() { diff --git a/tests/ui/lint/lint-invalid-atomic-ordering-int.rs b/tests/ui/lint/lint-invalid-atomic-ordering-int.rs index 462c9670f43..7ea89433a18 100644 --- a/tests/ui/lint/lint-invalid-atomic-ordering-int.rs +++ b/tests/ui/lint/lint-invalid-atomic-ordering-int.rs @@ -1,5 +1,5 @@ // FIXME: add support for `// only-atomic` to compiletest/header.rs -// only-x86_64 +//@ only-x86_64 use std::sync::atomic::{AtomicI16, AtomicI32, AtomicI64, AtomicI8, AtomicIsize, Ordering}; fn main() { diff --git a/tests/ui/lint/lint-invalid-atomic-ordering-ptr.rs b/tests/ui/lint/lint-invalid-atomic-ordering-ptr.rs index 984f7edebd1..ae10de7b264 100644 --- a/tests/ui/lint/lint-invalid-atomic-ordering-ptr.rs +++ b/tests/ui/lint/lint-invalid-atomic-ordering-ptr.rs @@ -1,4 +1,4 @@ -// only-x86_64 +//@ only-x86_64 use std::sync::atomic::{AtomicPtr, Ordering}; fn main() { diff --git a/tests/ui/lint/lint-invalid-atomic-ordering-uint.rs b/tests/ui/lint/lint-invalid-atomic-ordering-uint.rs index 80ec3b9ee34..aa5aefe272a 100644 --- a/tests/ui/lint/lint-invalid-atomic-ordering-uint.rs +++ b/tests/ui/lint/lint-invalid-atomic-ordering-uint.rs @@ -1,4 +1,4 @@ -// only-x86_64 +//@ only-x86_64 use std::sync::atomic::{AtomicU16, AtomicU32, AtomicU64, AtomicU8, AtomicUsize, Ordering}; fn main() { diff --git a/tests/ui/lint/lint-level-macro-def-mod.rs b/tests/ui/lint/lint-level-macro-def-mod.rs index 79f7d1206df..d5335cef47b 100644 --- a/tests/ui/lint/lint-level-macro-def-mod.rs +++ b/tests/ui/lint/lint-level-macro-def-mod.rs @@ -1,7 +1,7 @@ // This checks that exported macros lint as part of their module of origin, not // the root module. // -// check-pass +//@ check-pass //! Top level documentation #![deny(missing_docs)] diff --git a/tests/ui/lint/lint-level-macro-def.rs b/tests/ui/lint/lint-level-macro-def.rs index 720f4b453ab..7b3b4b26b01 100644 --- a/tests/ui/lint/lint-level-macro-def.rs +++ b/tests/ui/lint/lint-level-macro-def.rs @@ -2,7 +2,7 @@ // // This is a regression test for issue #59306. // -// check-pass +//@ check-pass #[deny(missing_docs)] diff --git a/tests/ui/lint/lint-lowercase-static-const-pattern-rename.rs b/tests/ui/lint/lint-lowercase-static-const-pattern-rename.rs index d085db43aa9..6e1c8123836 100644 --- a/tests/ui/lint/lint-lowercase-static-const-pattern-rename.rs +++ b/tests/ui/lint/lint-lowercase-static-const-pattern-rename.rs @@ -1,4 +1,4 @@ -// check-pass +//@ check-pass // Issue #7526: lowercase static constants in patterns look like bindings // This is similar to lint-lowercase-static-const-pattern.rs, except it diff --git a/tests/ui/lint/lint-missing-copy-implementations-allow.rs b/tests/ui/lint/lint-missing-copy-implementations-allow.rs index 051a905aed6..d688dfe95ee 100644 --- a/tests/ui/lint/lint-missing-copy-implementations-allow.rs +++ b/tests/ui/lint/lint-missing-copy-implementations-allow.rs @@ -1,4 +1,4 @@ -// check-pass +//@ check-pass #![deny(missing_copy_implementations)] // Don't recommend implementing Copy on something stateful like an iterator. diff --git a/tests/ui/lint/lint-missing-doc.rs b/tests/ui/lint/lint-missing-doc.rs index b59f2212f51..0b7c99e5012 100644 --- a/tests/ui/lint/lint-missing-doc.rs +++ b/tests/ui/lint/lint-missing-doc.rs @@ -1,6 +1,6 @@ // When denying at the crate level, be sure to not get random warnings from the // injected intrinsics by the compiler. -// aux-build:missing_docs.rs +//@ aux-build:missing_docs.rs #![deny(missing_docs)] #![allow(dead_code)] #![feature(associated_type_defaults, extern_types)] diff --git a/tests/ui/lint/lint-non-camel-case-variant.rs b/tests/ui/lint/lint-non-camel-case-variant.rs index 2b1a52f25be..e31c7047238 100644 --- a/tests/ui/lint/lint-non-camel-case-variant.rs +++ b/tests/ui/lint/lint-non-camel-case-variant.rs @@ -1,4 +1,4 @@ -// check-pass +//@ check-pass #![deny(non_camel_case_types)] diff --git a/tests/ui/lint/lint-non-camel-case-with-trailing-underscores.rs b/tests/ui/lint/lint-non-camel-case-with-trailing-underscores.rs index b832e4bcd62..30091253f4d 100644 --- a/tests/ui/lint/lint-non-camel-case-with-trailing-underscores.rs +++ b/tests/ui/lint/lint-non-camel-case-with-trailing-underscores.rs @@ -1,9 +1,9 @@ -// check-pass +//@ check-pass #![allow(dead_code)] // This is ok because we often use the trailing underscore to mean 'prime' -// pretty-expanded FIXME #23616 +//@ pretty-expanded FIXME #23616 #[forbid(non_camel_case_types)] type Foo_ = isize; diff --git a/tests/ui/lint/lint-non-snake-case-crate-2.rs b/tests/ui/lint/lint-non-snake-case-crate-2.rs index 1b763a9d868..b4b816a5a57 100644 --- a/tests/ui/lint/lint-non-snake-case-crate-2.rs +++ b/tests/ui/lint/lint-non-snake-case-crate-2.rs @@ -1,5 +1,5 @@ -// compile-flags: --crate-name NonSnakeCase -// error-pattern: crate `NonSnakeCase` should have a snake case name +//@ compile-flags: --crate-name NonSnakeCase +//@ error-pattern: crate `NonSnakeCase` should have a snake case name #![deny(non_snake_case)] diff --git a/tests/ui/lint/lint-non-snake-case-no-lowercase-equivalent.rs b/tests/ui/lint/lint-non-snake-case-no-lowercase-equivalent.rs index 9f0c87dcaa6..a43d2974ff3 100644 --- a/tests/ui/lint/lint-non-snake-case-no-lowercase-equivalent.rs +++ b/tests/ui/lint/lint-non-snake-case-no-lowercase-equivalent.rs @@ -1,7 +1,7 @@ -// check-pass +//@ check-pass #![allow(dead_code)] -// pretty-expanded FIXME #23616 +//@ pretty-expanded FIXME #23616 #![deny(non_snake_case)] diff --git a/tests/ui/lint/lint-output-format-2.rs b/tests/ui/lint/lint-output-format-2.rs index 985166e095d..96d8030d574 100644 --- a/tests/ui/lint/lint-output-format-2.rs +++ b/tests/ui/lint/lint-output-format-2.rs @@ -1,7 +1,7 @@ -// aux-build:lint_output_format.rs +//@ aux-build:lint_output_format.rs #![feature(unstable_test_feature)] -// check-pass +//@ check-pass extern crate lint_output_format; use lint_output_format::{foo, bar}; diff --git a/tests/ui/lint/lint-output-format.rs b/tests/ui/lint/lint-output-format.rs index 67e8ec8f13b..0f2ff00c0cf 100644 --- a/tests/ui/lint/lint-output-format.rs +++ b/tests/ui/lint/lint-output-format.rs @@ -1,5 +1,5 @@ -// compile-flags: -F unused_features -// aux-build:lint_output_format.rs +//@ compile-flags: -F unused_features +//@ aux-build:lint_output_format.rs #![allow(deprecated)] diff --git a/tests/ui/lint/lint-pre-expansion-extern-module.rs b/tests/ui/lint/lint-pre-expansion-extern-module.rs index 30e2ed8b7a6..b76879ccbb8 100644 --- a/tests/ui/lint/lint-pre-expansion-extern-module.rs +++ b/tests/ui/lint/lint-pre-expansion-extern-module.rs @@ -1,6 +1,6 @@ -// check-pass -// compile-flags: -W rust-2018-compatibility -// error-pattern: `try` is a keyword in the 2018 edition +//@ check-pass +//@ compile-flags: -W rust-2018-compatibility +//@ error-pattern: `try` is a keyword in the 2018 edition fn main() {} diff --git a/tests/ui/lint/lint-pub-unreachable-for-nested-glob.rs b/tests/ui/lint/lint-pub-unreachable-for-nested-glob.rs index 2df6d08e7ae..c2ac9ec11cd 100644 --- a/tests/ui/lint/lint-pub-unreachable-for-nested-glob.rs +++ b/tests/ui/lint/lint-pub-unreachable-for-nested-glob.rs @@ -1,4 +1,4 @@ -// check-pass +//@ check-pass #![deny(unreachable_pub)] diff --git a/tests/ui/lint/lint-qualification.fixed b/tests/ui/lint/lint-qualification.fixed index c1449301362..18d69ef1b53 100644 --- a/tests/ui/lint/lint-qualification.fixed +++ b/tests/ui/lint/lint-qualification.fixed @@ -1,4 +1,4 @@ -// run-rustfix +//@ run-rustfix #![deny(unused_qualifications)] #![allow(deprecated)] diff --git a/tests/ui/lint/lint-qualification.rs b/tests/ui/lint/lint-qualification.rs index 80904303559..8cf3425db2f 100644 --- a/tests/ui/lint/lint-qualification.rs +++ b/tests/ui/lint/lint-qualification.rs @@ -1,4 +1,4 @@ -// run-rustfix +//@ run-rustfix #![deny(unused_qualifications)] #![allow(deprecated)] diff --git a/tests/ui/lint/lint-removed-cmdline-deny.rs b/tests/ui/lint/lint-removed-cmdline-deny.rs index 8cf91cf60eb..e56a95d292a 100644 --- a/tests/ui/lint/lint-removed-cmdline-deny.rs +++ b/tests/ui/lint/lint-removed-cmdline-deny.rs @@ -1,11 +1,11 @@ // The raw_pointer_derived lint warns about its removal // cc #30346 -// compile-flags:-D renamed-and-removed-lints -D raw_pointer_derive +//@ compile-flags:-D renamed-and-removed-lints -D raw_pointer_derive -// error-pattern:lint `raw_pointer_derive` has been removed -// error-pattern:requested on the command line with `-D raw_pointer_derive` -// error-pattern:requested on the command line with `-D renamed-and-removed-lints` +//@ error-pattern:lint `raw_pointer_derive` has been removed +//@ error-pattern:requested on the command line with `-D raw_pointer_derive` +//@ error-pattern:requested on the command line with `-D renamed-and-removed-lints` #![warn(unused)] diff --git a/tests/ui/lint/lint-removed-cmdline.rs b/tests/ui/lint/lint-removed-cmdline.rs index 34373df3a9c..3c9d3eb8e7b 100644 --- a/tests/ui/lint/lint-removed-cmdline.rs +++ b/tests/ui/lint/lint-removed-cmdline.rs @@ -1,11 +1,11 @@ // The raw_pointer_derived lint warns about its removal // cc #30346 -// compile-flags:-D raw_pointer_derive +//@ compile-flags:-D raw_pointer_derive -// error-pattern:lint `raw_pointer_derive` has been removed -// error-pattern:`#[warn(renamed_and_removed_lints)]` on by default -// error-pattern:requested on the command line with `-D raw_pointer_derive` +//@ error-pattern:lint `raw_pointer_derive` has been removed +//@ error-pattern:`#[warn(renamed_and_removed_lints)]` on by default +//@ error-pattern:requested on the command line with `-D raw_pointer_derive` #![warn(unused)] diff --git a/tests/ui/lint/lint-renamed-cmdline-deny.rs b/tests/ui/lint/lint-renamed-cmdline-deny.rs index 01629aaca80..13500d006f8 100644 --- a/tests/ui/lint/lint-renamed-cmdline-deny.rs +++ b/tests/ui/lint/lint-renamed-cmdline-deny.rs @@ -1,10 +1,10 @@ -// compile-flags:-D renamed-and-removed-lints -D bare_trait_object +//@ compile-flags:-D renamed-and-removed-lints -D bare_trait_object -// error-pattern:lint `bare_trait_object` has been renamed to `bare_trait_objects` -// error-pattern:use the new name `bare_trait_objects` -// error-pattern:requested on the command line with `-D bare_trait_object` -// error-pattern:requested on the command line with `-D renamed-and-removed-lints` -// error-pattern:unused +//@ error-pattern:lint `bare_trait_object` has been renamed to `bare_trait_objects` +//@ error-pattern:use the new name `bare_trait_objects` +//@ error-pattern:requested on the command line with `-D bare_trait_object` +//@ error-pattern:requested on the command line with `-D renamed-and-removed-lints` +//@ error-pattern:unused #[deny(unused)] fn main() { let unused = (); } diff --git a/tests/ui/lint/lint-renamed-cmdline.rs b/tests/ui/lint/lint-renamed-cmdline.rs index fba7c33311d..7adea98a609 100644 --- a/tests/ui/lint/lint-renamed-cmdline.rs +++ b/tests/ui/lint/lint-renamed-cmdline.rs @@ -1,9 +1,9 @@ -// compile-flags:-D bare_trait_object +//@ compile-flags:-D bare_trait_object -// error-pattern:lint `bare_trait_object` has been renamed to `bare_trait_objects` -// error-pattern:requested on the command line with `-D bare_trait_object` -// error-pattern:`#[warn(renamed_and_removed_lints)]` on by default -// error-pattern:unused +//@ error-pattern:lint `bare_trait_object` has been renamed to `bare_trait_objects` +//@ error-pattern:requested on the command line with `-D bare_trait_object` +//@ error-pattern:`#[warn(renamed_and_removed_lints)]` on by default +//@ error-pattern:unused #[deny(unused)] fn main() { let unused = (); } diff --git a/tests/ui/lint/lint-shorthand-field.fixed b/tests/ui/lint/lint-shorthand-field.fixed index 7cd5717bc5a..d87af58a075 100644 --- a/tests/ui/lint/lint-shorthand-field.fixed +++ b/tests/ui/lint/lint-shorthand-field.fixed @@ -1,4 +1,4 @@ -// run-rustfix +//@ run-rustfix #![allow(nonstandard_style, unused_variables, unused_mut)] #![deny(non_shorthand_field_patterns)] diff --git a/tests/ui/lint/lint-shorthand-field.rs b/tests/ui/lint/lint-shorthand-field.rs index 22de9c32545..bfe4241b6ba 100644 --- a/tests/ui/lint/lint-shorthand-field.rs +++ b/tests/ui/lint/lint-shorthand-field.rs @@ -1,4 +1,4 @@ -// run-rustfix +//@ run-rustfix #![allow(nonstandard_style, unused_variables, unused_mut)] #![deny(non_shorthand_field_patterns)] diff --git a/tests/ui/lint/lint-stability-2.rs b/tests/ui/lint/lint-stability-2.rs index 94a8d08c8fe..644b12670a6 100644 --- a/tests/ui/lint/lint-stability-2.rs +++ b/tests/ui/lint/lint-stability-2.rs @@ -1,5 +1,5 @@ -// aux-build:lint_stability.rs -// aux-build:stability_cfg1.rs +//@ aux-build:lint_stability.rs +//@ aux-build:stability_cfg1.rs #![allow(deprecated)] #![allow(dead_code)] diff --git a/tests/ui/lint/lint-stability-deprecated.rs b/tests/ui/lint/lint-stability-deprecated.rs index 80bc85ff557..b6288619a43 100644 --- a/tests/ui/lint/lint-stability-deprecated.rs +++ b/tests/ui/lint/lint-stability-deprecated.rs @@ -1,8 +1,8 @@ -// check-pass -// aux-build:lint_stability.rs -// aux-build:inherited_stability.rs -// aux-build:stability_cfg1.rs -// aux-build:stability-cfg2.rs +//@ check-pass +//@ aux-build:lint_stability.rs +//@ aux-build:inherited_stability.rs +//@ aux-build:stability_cfg1.rs +//@ aux-build:stability-cfg2.rs #![warn(deprecated)] #![feature(staged_api, unstable_test_feature)] diff --git a/tests/ui/lint/lint-stability-fields-deprecated.rs b/tests/ui/lint/lint-stability-fields-deprecated.rs index a5511966d7e..8feead7f193 100644 --- a/tests/ui/lint/lint-stability-fields-deprecated.rs +++ b/tests/ui/lint/lint-stability-fields-deprecated.rs @@ -1,4 +1,4 @@ -// aux-build:lint_stability_fields.rs +//@ aux-build:lint_stability_fields.rs #![deny(deprecated)] #![allow(dead_code)] diff --git a/tests/ui/lint/lint-stability-fields.rs b/tests/ui/lint/lint-stability-fields.rs index 51990b6eef1..6ac6798cdb1 100644 --- a/tests/ui/lint/lint-stability-fields.rs +++ b/tests/ui/lint/lint-stability-fields.rs @@ -1,4 +1,4 @@ -// aux-build:lint_stability_fields.rs +//@ aux-build:lint_stability_fields.rs #![allow(deprecated)] #![allow(dead_code)] #![feature(staged_api)] diff --git a/tests/ui/lint/lint-stability.rs b/tests/ui/lint/lint-stability.rs index d0f0e9f8071..eaf9796df6a 100644 --- a/tests/ui/lint/lint-stability.rs +++ b/tests/ui/lint/lint-stability.rs @@ -1,7 +1,7 @@ -// aux-build:lint_stability.rs -// aux-build:inherited_stability.rs -// aux-build:stability_cfg1.rs -// aux-build:stability-cfg2.rs +//@ aux-build:lint_stability.rs +//@ aux-build:inherited_stability.rs +//@ aux-build:stability_cfg1.rs +//@ aux-build:stability-cfg2.rs #![allow(deprecated)] #![allow(dead_code)] diff --git a/tests/ui/lint/lint-stability2.rs b/tests/ui/lint/lint-stability2.rs index 9ae23dac61b..254ec8f9bee 100644 --- a/tests/ui/lint/lint-stability2.rs +++ b/tests/ui/lint/lint-stability2.rs @@ -1,5 +1,5 @@ -// aux-build:lint_stability.rs -// error-pattern: use of deprecated function +//@ aux-build:lint_stability.rs +//@ error-pattern: use of deprecated function #![deny(deprecated)] diff --git a/tests/ui/lint/lint-stability3.rs b/tests/ui/lint/lint-stability3.rs index 4452846ec0a..3c5652ae030 100644 --- a/tests/ui/lint/lint-stability3.rs +++ b/tests/ui/lint/lint-stability3.rs @@ -1,5 +1,5 @@ -// aux-build:lint_stability.rs -// error-pattern: use of deprecated function +//@ aux-build:lint_stability.rs +//@ error-pattern: use of deprecated function #![deny(deprecated)] #![allow(warnings)] diff --git a/tests/ui/lint/lint-type-limits.rs b/tests/ui/lint/lint-type-limits.rs index 2b140f86964..4c4cbda7517 100644 --- a/tests/ui/lint/lint-type-limits.rs +++ b/tests/ui/lint/lint-type-limits.rs @@ -1,6 +1,6 @@ #![allow(dead_code)] -// compile-flags: -D unused-comparisons +//@ compile-flags: -D unused-comparisons fn main() { } fn foo() { diff --git a/tests/ui/lint/lint-type-limits2.rs b/tests/ui/lint/lint-type-limits2.rs index 3f90119cd89..4f268296fd9 100644 --- a/tests/ui/lint/lint-type-limits2.rs +++ b/tests/ui/lint/lint-type-limits2.rs @@ -1,7 +1,7 @@ #![allow(dead_code)] #![warn(overflowing_literals)] -// compile-flags: -D unused-comparisons +//@ compile-flags: -D unused-comparisons fn main() { } diff --git a/tests/ui/lint/lint-type-limits3.rs b/tests/ui/lint/lint-type-limits3.rs index ceecf9ab30b..1a08d75aba6 100644 --- a/tests/ui/lint/lint-type-limits3.rs +++ b/tests/ui/lint/lint-type-limits3.rs @@ -1,7 +1,7 @@ #![allow(dead_code)] #![warn(overflowing_literals)] -// compile-flags: -D unused-comparisons +//@ compile-flags: -D unused-comparisons fn main() { } fn qux() { diff --git a/tests/ui/lint/lint-type-overflow2.rs b/tests/ui/lint/lint-type-overflow2.rs index 9b1eb510bbd..f007b45b847 100644 --- a/tests/ui/lint/lint-type-overflow2.rs +++ b/tests/ui/lint/lint-type-overflow2.rs @@ -1,4 +1,4 @@ -// compile-flags: -O +//@ compile-flags: -O #![deny(overflowing_literals)] diff --git a/tests/ui/lint/lint-unconditional-drop-recursion.rs b/tests/ui/lint/lint-unconditional-drop-recursion.rs index 348cd280139..63abd8b3b6f 100644 --- a/tests/ui/lint/lint-unconditional-drop-recursion.rs +++ b/tests/ui/lint/lint-unconditional-drop-recursion.rs @@ -1,6 +1,6 @@ // Because drop recursion can only be detected after drop elaboration which // happens for codegen: -// build-fail +//@ build-fail #![deny(unconditional_recursion)] #![allow(dead_code)] diff --git a/tests/ui/lint/lint-unexported-no-mangle.rs b/tests/ui/lint/lint-unexported-no-mangle.rs index f260fc32303..63eeb3374d2 100644 --- a/tests/ui/lint/lint-unexported-no-mangle.rs +++ b/tests/ui/lint/lint-unexported-no-mangle.rs @@ -1,4 +1,4 @@ -// compile-flags:-F private_no_mangle_fns -F no_mangle_const_items -F private_no_mangle_statics +//@ compile-flags:-F private_no_mangle_fns -F no_mangle_const_items -F private_no_mangle_statics #[no_mangle] fn foo() { diff --git a/tests/ui/lint/lint-unknown-feature-default.rs b/tests/ui/lint/lint-unknown-feature-default.rs index 84a2e5a4b35..c1614e0f7ac 100644 --- a/tests/ui/lint/lint-unknown-feature-default.rs +++ b/tests/ui/lint/lint-unknown-feature-default.rs @@ -1,4 +1,4 @@ -// check-pass +//@ check-pass // Tests the default for the unused_features lint diff --git a/tests/ui/lint/lint-unknown-feature.rs b/tests/ui/lint/lint-unknown-feature.rs index 1af8d4ff842..18861746797 100644 --- a/tests/ui/lint/lint-unknown-feature.rs +++ b/tests/ui/lint/lint-unknown-feature.rs @@ -1,4 +1,4 @@ -// check-pass +//@ check-pass #![warn(unused_features)] diff --git a/tests/ui/lint/lint-unknown-lint-cmdline-allow.rs b/tests/ui/lint/lint-unknown-lint-cmdline-allow.rs index c7f8d434c04..68c5e3b1a3a 100644 --- a/tests/ui/lint/lint-unknown-lint-cmdline-allow.rs +++ b/tests/ui/lint/lint-unknown-lint-cmdline-allow.rs @@ -1,4 +1,4 @@ -// check-pass -// compile-flags:-A unknown-lints -D bogus -D dead_cod +//@ check-pass +//@ compile-flags:-A unknown-lints -D bogus -D dead_cod fn main() { } diff --git a/tests/ui/lint/lint-unknown-lint-cmdline-deny.rs b/tests/ui/lint/lint-unknown-lint-cmdline-deny.rs index 31bc2047356..c92c3999ce9 100644 --- a/tests/ui/lint/lint-unknown-lint-cmdline-deny.rs +++ b/tests/ui/lint/lint-unknown-lint-cmdline-deny.rs @@ -1,9 +1,9 @@ -// compile-flags:-D unknown-lints -D bogus -D dead_cod +//@ compile-flags:-D unknown-lints -D bogus -D dead_cod -// error-pattern:unknown lint: `bogus` -// error-pattern:requested on the command line with `-D bogus` -// error-pattern:requested on the command line with `-D dead_cod` -// error-pattern:requested on the command line with `-D unknown-lints` -// error-pattern:did you mean: `dead_code` +//@ error-pattern:unknown lint: `bogus` +//@ error-pattern:requested on the command line with `-D bogus` +//@ error-pattern:requested on the command line with `-D dead_cod` +//@ error-pattern:requested on the command line with `-D unknown-lints` +//@ error-pattern:did you mean: `dead_code` fn main() { } diff --git a/tests/ui/lint/lint-unknown-lint-cmdline.rs b/tests/ui/lint/lint-unknown-lint-cmdline.rs index 81539cb6dc1..202c617235f 100644 --- a/tests/ui/lint/lint-unknown-lint-cmdline.rs +++ b/tests/ui/lint/lint-unknown-lint-cmdline.rs @@ -1,11 +1,11 @@ -// check-pass -// compile-flags:-D bogus -D dead_cod +//@ check-pass +//@ compile-flags:-D bogus -D dead_cod -// error-pattern:unknown lint: `bogus` -// error-pattern:requested on the command line with `-D bogus` -// error-pattern:`#[warn(unknown_lints)]` on by default -// error-pattern:unknown lint: `dead_cod` -// error-pattern:requested on the command line with `-D dead_cod` -// error-pattern:did you mean: `dead_code` +//@ error-pattern:unknown lint: `bogus` +//@ error-pattern:requested on the command line with `-D bogus` +//@ error-pattern:`#[warn(unknown_lints)]` on by default +//@ error-pattern:unknown lint: `dead_cod` +//@ error-pattern:requested on the command line with `-D dead_cod` +//@ error-pattern:did you mean: `dead_code` fn main() { } diff --git a/tests/ui/lint/lint-unnecessary-parens.fixed b/tests/ui/lint/lint-unnecessary-parens.fixed index b17914da6e6..973bbd70f25 100644 --- a/tests/ui/lint/lint-unnecessary-parens.fixed +++ b/tests/ui/lint/lint-unnecessary-parens.fixed @@ -1,4 +1,4 @@ -// run-rustfix +//@ run-rustfix #![deny(unused_parens)] #![allow(while_true)] // for rustfix diff --git a/tests/ui/lint/lint-unnecessary-parens.rs b/tests/ui/lint/lint-unnecessary-parens.rs index 4cbd6562cd3..40cd61fcc2c 100644 --- a/tests/ui/lint/lint-unnecessary-parens.rs +++ b/tests/ui/lint/lint-unnecessary-parens.rs @@ -1,4 +1,4 @@ -// run-rustfix +//@ run-rustfix #![deny(unused_parens)] #![allow(while_true)] // for rustfix diff --git a/tests/ui/lint/lint_pre_expansion_extern_module_aux.rs b/tests/ui/lint/lint_pre_expansion_extern_module_aux.rs index 71dec40ea44..6e16a796ff1 100644 --- a/tests/ui/lint/lint_pre_expansion_extern_module_aux.rs +++ b/tests/ui/lint/lint_pre_expansion_extern_module_aux.rs @@ -1,3 +1,3 @@ -// ignore-test: not a test +//@ ignore-test: not a test pub fn try() {} diff --git a/tests/ui/lint/lints-in-foreign-macros.rs b/tests/ui/lint/lints-in-foreign-macros.rs index 1e8b6788a60..49e83bae642 100644 --- a/tests/ui/lint/lints-in-foreign-macros.rs +++ b/tests/ui/lint/lints-in-foreign-macros.rs @@ -1,5 +1,5 @@ -// aux-build:lints-in-foreign-macros.rs -// check-pass +//@ aux-build:lints-in-foreign-macros.rs +//@ check-pass #![warn(unused_imports)] //~ missing documentation for the crate [missing_docs] #![warn(missing_docs)] diff --git a/tests/ui/lint/missing-copy-implementations-negative-copy.rs b/tests/ui/lint/missing-copy-implementations-negative-copy.rs index b29d2209fa9..7860f54e7f3 100644 --- a/tests/ui/lint/missing-copy-implementations-negative-copy.rs +++ b/tests/ui/lint/missing-copy-implementations-negative-copy.rs @@ -1,7 +1,7 @@ // Regression test for issue #101980. // Ensure that we don't suggest impl'ing `Copy` for a type if it already impl's `!Copy`. -// check-pass +//@ check-pass #![feature(negative_impls)] #![deny(missing_copy_implementations)] diff --git a/tests/ui/lint/missing-copy-implementations-non-exhaustive.rs b/tests/ui/lint/missing-copy-implementations-non-exhaustive.rs index 2d5e90720ef..16f448674b2 100644 --- a/tests/ui/lint/missing-copy-implementations-non-exhaustive.rs +++ b/tests/ui/lint/missing-copy-implementations-non-exhaustive.rs @@ -2,7 +2,7 @@ // Ensure that we don't suggest impl'ing `Copy` for a type if it or at least one // of it's variants are marked as `non_exhaustive`. -// check-pass +//@ check-pass #![deny(missing_copy_implementations)] diff --git a/tests/ui/lint/must_not_suspend/boxed.rs b/tests/ui/lint/must_not_suspend/boxed.rs index 1f823fc559d..661bacf4585 100644 --- a/tests/ui/lint/must_not_suspend/boxed.rs +++ b/tests/ui/lint/must_not_suspend/boxed.rs @@ -1,4 +1,4 @@ -// edition:2018 +//@ edition:2018 #![feature(must_not_suspend)] #![deny(must_not_suspend)] diff --git a/tests/ui/lint/must_not_suspend/dedup.rs b/tests/ui/lint/must_not_suspend/dedup.rs index 867bdf2ec12..0fc8868e013 100644 --- a/tests/ui/lint/must_not_suspend/dedup.rs +++ b/tests/ui/lint/must_not_suspend/dedup.rs @@ -1,4 +1,4 @@ -// edition:2018 +//@ edition:2018 #![feature(must_not_suspend)] #![deny(must_not_suspend)] diff --git a/tests/ui/lint/must_not_suspend/feature-gate-must_not_suspend.rs b/tests/ui/lint/must_not_suspend/feature-gate-must_not_suspend.rs index 1554408c174..d22a3ef70c8 100644 --- a/tests/ui/lint/must_not_suspend/feature-gate-must_not_suspend.rs +++ b/tests/ui/lint/must_not_suspend/feature-gate-must_not_suspend.rs @@ -1,4 +1,4 @@ -// edition:2018 +//@ edition:2018 #[must_not_suspend = "You gotta use Umm's, ya know?"] //~ ERROR the `#[must_not_suspend]` struct Umm { diff --git a/tests/ui/lint/must_not_suspend/gated.rs b/tests/ui/lint/must_not_suspend/gated.rs index fe8192b0eaa..3c618f0a3dc 100644 --- a/tests/ui/lint/must_not_suspend/gated.rs +++ b/tests/ui/lint/must_not_suspend/gated.rs @@ -1,6 +1,6 @@ -// check-pass +//@ check-pass -// edition:2018 +//@ edition:2018 #![deny(must_not_suspend)] //~^ WARNING unknown lint: `must_not_suspend` diff --git a/tests/ui/lint/must_not_suspend/generic.rs b/tests/ui/lint/must_not_suspend/generic.rs index b3effa020c4..b9b9ae8caa2 100644 --- a/tests/ui/lint/must_not_suspend/generic.rs +++ b/tests/ui/lint/must_not_suspend/generic.rs @@ -1,5 +1,5 @@ -// edition:2018 -// run-pass +//@ edition:2018 +//@ run-pass // // this test shows a case where the lint doesn't fire in generic code #![feature(must_not_suspend)] diff --git a/tests/ui/lint/must_not_suspend/handled.rs b/tests/ui/lint/must_not_suspend/handled.rs index 8714be6449f..9274bafa415 100644 --- a/tests/ui/lint/must_not_suspend/handled.rs +++ b/tests/ui/lint/must_not_suspend/handled.rs @@ -1,5 +1,5 @@ -// edition:2018 -// run-pass +//@ edition:2018 +//@ run-pass #![feature(must_not_suspend)] #![deny(must_not_suspend)] diff --git a/tests/ui/lint/must_not_suspend/issue-89562.rs b/tests/ui/lint/must_not_suspend/issue-89562.rs index acdb36fcdab..99a54813072 100644 --- a/tests/ui/lint/must_not_suspend/issue-89562.rs +++ b/tests/ui/lint/must_not_suspend/issue-89562.rs @@ -1,5 +1,5 @@ -// edition:2018 -// run-pass +//@ edition:2018 +//@ run-pass use std::sync::Mutex; diff --git a/tests/ui/lint/must_not_suspend/mutex.rs b/tests/ui/lint/must_not_suspend/mutex.rs index 7bb895e7d36..d14f7130b4c 100644 --- a/tests/ui/lint/must_not_suspend/mutex.rs +++ b/tests/ui/lint/must_not_suspend/mutex.rs @@ -1,4 +1,4 @@ -// edition:2018 +//@ edition:2018 #![feature(must_not_suspend)] #![deny(must_not_suspend)] diff --git a/tests/ui/lint/must_not_suspend/other_items.rs b/tests/ui/lint/must_not_suspend/other_items.rs index 5aa1abb14d3..7a42a2bba03 100644 --- a/tests/ui/lint/must_not_suspend/other_items.rs +++ b/tests/ui/lint/must_not_suspend/other_items.rs @@ -1,4 +1,4 @@ -// edition:2018 +//@ edition:2018 #![feature(must_not_suspend)] #![deny(must_not_suspend)] diff --git a/tests/ui/lint/must_not_suspend/ref.rs b/tests/ui/lint/must_not_suspend/ref.rs index 3b6ef39c9fe..5cd433b41c3 100644 --- a/tests/ui/lint/must_not_suspend/ref.rs +++ b/tests/ui/lint/must_not_suspend/ref.rs @@ -1,4 +1,4 @@ -// edition:2018 +//@ edition:2018 #![feature(must_not_suspend)] #![deny(must_not_suspend)] diff --git a/tests/ui/lint/must_not_suspend/return.rs b/tests/ui/lint/must_not_suspend/return.rs index 5b1fa5e2721..a04f6a4cfb4 100644 --- a/tests/ui/lint/must_not_suspend/return.rs +++ b/tests/ui/lint/must_not_suspend/return.rs @@ -1,4 +1,4 @@ -// edition:2018 +//@ edition:2018 #![feature(must_not_suspend)] #![deny(must_not_suspend)] diff --git a/tests/ui/lint/must_not_suspend/trait.rs b/tests/ui/lint/must_not_suspend/trait.rs index 6c911cb4b0f..534fb9bfd18 100644 --- a/tests/ui/lint/must_not_suspend/trait.rs +++ b/tests/ui/lint/must_not_suspend/trait.rs @@ -1,4 +1,4 @@ -// edition:2018 +//@ edition:2018 #![feature(must_not_suspend)] #![deny(must_not_suspend)] diff --git a/tests/ui/lint/must_not_suspend/unit.rs b/tests/ui/lint/must_not_suspend/unit.rs index af4a76caa4e..e62c153df57 100644 --- a/tests/ui/lint/must_not_suspend/unit.rs +++ b/tests/ui/lint/must_not_suspend/unit.rs @@ -1,4 +1,4 @@ -// edition:2018 +//@ edition:2018 #![feature(must_not_suspend)] #![deny(must_not_suspend)] diff --git a/tests/ui/lint/must_not_suspend/warn.rs b/tests/ui/lint/must_not_suspend/warn.rs index 2d5dd01e5bf..64432e4460a 100644 --- a/tests/ui/lint/must_not_suspend/warn.rs +++ b/tests/ui/lint/must_not_suspend/warn.rs @@ -1,5 +1,5 @@ -// edition:2018 -// run-pass +//@ edition:2018 +//@ run-pass #![feature(must_not_suspend)] #![warn(must_not_suspend)] diff --git a/tests/ui/lint/noop-method-call.fixed b/tests/ui/lint/noop-method-call.fixed index 4d9834f7df6..279dc8a3cd0 100644 --- a/tests/ui/lint/noop-method-call.fixed +++ b/tests/ui/lint/noop-method-call.fixed @@ -1,5 +1,5 @@ -// check-pass -// run-rustfix +//@ check-pass +//@ run-rustfix #![feature(rustc_attrs)] #![allow(unused)] diff --git a/tests/ui/lint/noop-method-call.rs b/tests/ui/lint/noop-method-call.rs index 6242a00e033..447a4c62410 100644 --- a/tests/ui/lint/noop-method-call.rs +++ b/tests/ui/lint/noop-method-call.rs @@ -1,5 +1,5 @@ -// check-pass -// run-rustfix +//@ check-pass +//@ run-rustfix #![feature(rustc_attrs)] #![allow(unused)] diff --git a/tests/ui/lint/not_found.rs b/tests/ui/lint/not_found.rs index de120b6e084..8e79c6da152 100644 --- a/tests/ui/lint/not_found.rs +++ b/tests/ui/lint/not_found.rs @@ -1,4 +1,4 @@ -// check-pass +//@ check-pass // this tests the `unknown_lint` lint, especially the suggestions diff --git a/tests/ui/lint/outer-forbid.rs b/tests/ui/lint/outer-forbid.rs index ba330258d11..a2edf6bba01 100644 --- a/tests/ui/lint/outer-forbid.rs +++ b/tests/ui/lint/outer-forbid.rs @@ -12,7 +12,7 @@ // // The test is much cleaner if we deduplicate, though. -// compile-flags: -Z deduplicate-diagnostics=yes +//@ compile-flags: -Z deduplicate-diagnostics=yes #![forbid(unused, non_snake_case)] #![forbid(forbidden_lint_groups)] diff --git a/tests/ui/lint/ptr_null_checks.rs b/tests/ui/lint/ptr_null_checks.rs index 4925019be1e..19d328856fd 100644 --- a/tests/ui/lint/ptr_null_checks.rs +++ b/tests/ui/lint/ptr_null_checks.rs @@ -1,4 +1,4 @@ -// check-pass +//@ check-pass use std::ptr; diff --git a/tests/ui/lint/reasons-erroneous.rs b/tests/ui/lint/reasons-erroneous.rs index 7b286eb1d18..7366a03232f 100644 --- a/tests/ui/lint/reasons-erroneous.rs +++ b/tests/ui/lint/reasons-erroneous.rs @@ -1,4 +1,4 @@ -// compile-flags: -Zdeduplicate-diagnostics=yes +//@ compile-flags: -Zdeduplicate-diagnostics=yes #![feature(lint_reasons)] diff --git a/tests/ui/lint/reasons-forbidden.rs b/tests/ui/lint/reasons-forbidden.rs index 947099fdd13..0b08e7571db 100644 --- a/tests/ui/lint/reasons-forbidden.rs +++ b/tests/ui/lint/reasons-forbidden.rs @@ -8,7 +8,7 @@ // // The test is much cleaner if we deduplicate, though. -// compile-flags: -Z deduplicate-diagnostics=true +//@ compile-flags: -Z deduplicate-diagnostics=true #![forbid( unsafe_code, diff --git a/tests/ui/lint/reasons.rs b/tests/ui/lint/reasons.rs index da1c740c4a3..4c2f92af1c7 100644 --- a/tests/ui/lint/reasons.rs +++ b/tests/ui/lint/reasons.rs @@ -1,4 +1,4 @@ -// check-pass +//@ check-pass #![feature(lint_reasons)] #![warn(elided_lifetimes_in_paths, diff --git a/tests/ui/lint/redundant-semicolon/auxiliary/redundant-semi-proc-macro-def.rs b/tests/ui/lint/redundant-semicolon/auxiliary/redundant-semi-proc-macro-def.rs index 5a94ccd7468..2a58af0fedc 100644 --- a/tests/ui/lint/redundant-semicolon/auxiliary/redundant-semi-proc-macro-def.rs +++ b/tests/ui/lint/redundant-semicolon/auxiliary/redundant-semi-proc-macro-def.rs @@ -1,5 +1,5 @@ -// force-host -// no-prefer-dynamic +//@ force-host +//@ no-prefer-dynamic #![crate_type="proc-macro"] #![crate_name="redundant_semi_proc_macro"] extern crate proc_macro; diff --git a/tests/ui/lint/redundant-semicolon/redundant-semi-proc-macro.rs b/tests/ui/lint/redundant-semicolon/redundant-semi-proc-macro.rs index 08a5c6c2b63..33c7e26ba47 100644 --- a/tests/ui/lint/redundant-semicolon/redundant-semi-proc-macro.rs +++ b/tests/ui/lint/redundant-semicolon/redundant-semi-proc-macro.rs @@ -1,4 +1,4 @@ -// aux-build:redundant-semi-proc-macro-def.rs +//@ aux-build:redundant-semi-proc-macro-def.rs #![deny(redundant_semicolons)] extern crate redundant_semi_proc_macro; diff --git a/tests/ui/lint/redundant-semicolon/redundant-semi-proc-macro.stderr b/tests/ui/lint/redundant-semicolon/redundant-semi-proc-macro.stderr index e31d14c5596..d42aa1d613f 100644 --- a/tests/ui/lint/redundant-semicolon/redundant-semi-proc-macro.stderr +++ b/tests/ui/lint/redundant-semicolon/redundant-semi-proc-macro.stderr @@ -1,4 +1,4 @@ -TokenStream [Ident { ident: "fn", span: #0 bytes(198..200) }, Ident { ident: "span_preservation", span: #0 bytes(201..218) }, Group { delimiter: Parenthesis, stream: TokenStream [], span: #0 bytes(218..220) }, Group { delimiter: Brace, stream: TokenStream [Ident { ident: "let", span: #0 bytes(228..231) }, Ident { ident: "tst", span: #0 bytes(232..235) }, Punct { ch: '=', spacing: Alone, span: #0 bytes(236..237) }, Literal { kind: Integer, symbol: "123", suffix: None, span: #0 bytes(238..241) }, Punct { ch: ';', spacing: Joint, span: #0 bytes(241..242) }, Punct { ch: ';', spacing: Alone, span: #0 bytes(242..243) }, Ident { ident: "match", span: #0 bytes(289..294) }, Ident { ident: "tst", span: #0 bytes(295..298) }, Group { delimiter: Brace, stream: TokenStream [Literal { kind: Integer, symbol: "123", suffix: None, span: #0 bytes(483..486) }, Punct { ch: '=', spacing: Joint, span: #0 bytes(487..488) }, Punct { ch: '>', spacing: Alone, span: #0 bytes(488..489) }, Group { delimiter: Parenthesis, stream: TokenStream [], span: #0 bytes(490..492) }, Punct { ch: ',', spacing: Alone, span: #0 bytes(492..493) }, Ident { ident: "_", span: #0 bytes(502..503) }, Punct { ch: '=', spacing: Joint, span: #0 bytes(504..505) }, Punct { ch: '>', spacing: Alone, span: #0 bytes(505..506) }, Group { delimiter: Parenthesis, stream: TokenStream [], span: #0 bytes(507..509) }], span: #0 bytes(299..515) }, Punct { ch: ';', spacing: Joint, span: #0 bytes(515..516) }, Punct { ch: ';', spacing: Joint, span: #0 bytes(516..517) }, Punct { ch: ';', spacing: Alone, span: #0 bytes(517..518) }], span: #0 bytes(222..562) }] +TokenStream [Ident { ident: "fn", span: #0 bytes(199..201) }, Ident { ident: "span_preservation", span: #0 bytes(202..219) }, Group { delimiter: Parenthesis, stream: TokenStream [], span: #0 bytes(219..221) }, Group { delimiter: Brace, stream: TokenStream [Ident { ident: "let", span: #0 bytes(229..232) }, Ident { ident: "tst", span: #0 bytes(233..236) }, Punct { ch: '=', spacing: Alone, span: #0 bytes(237..238) }, Literal { kind: Integer, symbol: "123", suffix: None, span: #0 bytes(239..242) }, Punct { ch: ';', spacing: Joint, span: #0 bytes(242..243) }, Punct { ch: ';', spacing: Alone, span: #0 bytes(243..244) }, Ident { ident: "match", span: #0 bytes(290..295) }, Ident { ident: "tst", span: #0 bytes(296..299) }, Group { delimiter: Brace, stream: TokenStream [Literal { kind: Integer, symbol: "123", suffix: None, span: #0 bytes(484..487) }, Punct { ch: '=', spacing: Joint, span: #0 bytes(488..489) }, Punct { ch: '>', spacing: Alone, span: #0 bytes(489..490) }, Group { delimiter: Parenthesis, stream: TokenStream [], span: #0 bytes(491..493) }, Punct { ch: ',', spacing: Alone, span: #0 bytes(493..494) }, Ident { ident: "_", span: #0 bytes(503..504) }, Punct { ch: '=', spacing: Joint, span: #0 bytes(505..506) }, Punct { ch: '>', spacing: Alone, span: #0 bytes(506..507) }, Group { delimiter: Parenthesis, stream: TokenStream [], span: #0 bytes(508..510) }], span: #0 bytes(300..516) }, Punct { ch: ';', spacing: Joint, span: #0 bytes(516..517) }, Punct { ch: ';', spacing: Joint, span: #0 bytes(517..518) }, Punct { ch: ';', spacing: Alone, span: #0 bytes(518..519) }], span: #0 bytes(223..563) }] error: unnecessary trailing semicolon --> $DIR/redundant-semi-proc-macro.rs:9:19 | diff --git a/tests/ui/lint/reference_casting.rs b/tests/ui/lint/reference_casting.rs index e5d84e464fd..d6897ab7b14 100644 --- a/tests/ui/lint/reference_casting.rs +++ b/tests/ui/lint/reference_casting.rs @@ -1,4 +1,4 @@ -// check-fail +//@ check-fail extern "C" { // N.B., mutability can be easily incorrect in FFI calls -- as diff --git a/tests/ui/lint/renamed-lints-still-apply.rs b/tests/ui/lint/renamed-lints-still-apply.rs index 01cd3253672..ff448763f86 100644 --- a/tests/ui/lint/renamed-lints-still-apply.rs +++ b/tests/ui/lint/renamed-lints-still-apply.rs @@ -1,4 +1,4 @@ -// compile-flags: --crate-type lib +//@ compile-flags: --crate-type lib #![deny(single_use_lifetime)] //~^ WARNING renamed //~| NOTE `#[warn(renamed_and_removed_lints)]` on by default diff --git a/tests/ui/lint/rfc-2383-lint-reason/avoid_delayed_good_path_ice.rs b/tests/ui/lint/rfc-2383-lint-reason/avoid_delayed_good_path_ice.rs index 912e831d88a..e94755618cf 100644 --- a/tests/ui/lint/rfc-2383-lint-reason/avoid_delayed_good_path_ice.rs +++ b/tests/ui/lint/rfc-2383-lint-reason/avoid_delayed_good_path_ice.rs @@ -1,4 +1,4 @@ -// check-pass +//@ check-pass #![feature(lint_reasons)] #[expect(drop_bounds)] diff --git a/tests/ui/lint/rfc-2383-lint-reason/catch_multiple_lint_triggers.rs b/tests/ui/lint/rfc-2383-lint-reason/catch_multiple_lint_triggers.rs index 6b255b799b7..ce4b89f5d99 100644 --- a/tests/ui/lint/rfc-2383-lint-reason/catch_multiple_lint_triggers.rs +++ b/tests/ui/lint/rfc-2383-lint-reason/catch_multiple_lint_triggers.rs @@ -1,4 +1,4 @@ -// check-pass +//@ check-pass #![feature(lint_reasons)] diff --git a/tests/ui/lint/rfc-2383-lint-reason/crate_level_expect.rs b/tests/ui/lint/rfc-2383-lint-reason/crate_level_expect.rs index 9f591ba9852..8f255065125 100644 --- a/tests/ui/lint/rfc-2383-lint-reason/crate_level_expect.rs +++ b/tests/ui/lint/rfc-2383-lint-reason/crate_level_expect.rs @@ -1,4 +1,4 @@ -// check-pass +//@ check-pass #![feature(lint_reasons)] diff --git a/tests/ui/lint/rfc-2383-lint-reason/expect_inside_macro.rs b/tests/ui/lint/rfc-2383-lint-reason/expect_inside_macro.rs index b95815bc50b..7bfb84c8826 100644 --- a/tests/ui/lint/rfc-2383-lint-reason/expect_inside_macro.rs +++ b/tests/ui/lint/rfc-2383-lint-reason/expect_inside_macro.rs @@ -1,4 +1,4 @@ -// check-pass +//@ check-pass #![feature(lint_reasons)] diff --git a/tests/ui/lint/rfc-2383-lint-reason/expect_lint_from_macro.rs b/tests/ui/lint/rfc-2383-lint-reason/expect_lint_from_macro.rs index 07c60fa0c32..e6f7471b93c 100644 --- a/tests/ui/lint/rfc-2383-lint-reason/expect_lint_from_macro.rs +++ b/tests/ui/lint/rfc-2383-lint-reason/expect_lint_from_macro.rs @@ -1,4 +1,4 @@ -// check-pass +//@ check-pass #![feature(lint_reasons)] diff --git a/tests/ui/lint/rfc-2383-lint-reason/expect_multiple_lints.rs b/tests/ui/lint/rfc-2383-lint-reason/expect_multiple_lints.rs index dc9a719a3f7..1534d5f862c 100644 --- a/tests/ui/lint/rfc-2383-lint-reason/expect_multiple_lints.rs +++ b/tests/ui/lint/rfc-2383-lint-reason/expect_multiple_lints.rs @@ -1,4 +1,4 @@ -// check-pass +//@ check-pass #![feature(lint_reasons)] diff --git a/tests/ui/lint/rfc-2383-lint-reason/expect_on_fn_params.rs b/tests/ui/lint/rfc-2383-lint-reason/expect_on_fn_params.rs index 5fdb710416f..d066a2b6ba6 100644 --- a/tests/ui/lint/rfc-2383-lint-reason/expect_on_fn_params.rs +++ b/tests/ui/lint/rfc-2383-lint-reason/expect_on_fn_params.rs @@ -1,4 +1,4 @@ -// check-pass +//@ check-pass #![feature(lint_reasons)] #[warn(unused_variables)] diff --git a/tests/ui/lint/rfc-2383-lint-reason/expect_tool_lint_rfc_2383.rs b/tests/ui/lint/rfc-2383-lint-reason/expect_tool_lint_rfc_2383.rs index 82ca49461ed..7a57ab0f981 100644 --- a/tests/ui/lint/rfc-2383-lint-reason/expect_tool_lint_rfc_2383.rs +++ b/tests/ui/lint/rfc-2383-lint-reason/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/ui/lint/rfc-2383-lint-reason/expect_unfulfilled_expectation.rs b/tests/ui/lint/rfc-2383-lint-reason/expect_unfulfilled_expectation.rs index d38e6553386..577c6855fbe 100644 --- a/tests/ui/lint/rfc-2383-lint-reason/expect_unfulfilled_expectation.rs +++ b/tests/ui/lint/rfc-2383-lint-reason/expect_unfulfilled_expectation.rs @@ -1,4 +1,4 @@ -// check-pass +//@ check-pass // ignore-tidy-linelength #![feature(lint_reasons)] diff --git a/tests/ui/lint/rfc-2383-lint-reason/expect_unused_inside_impl_block.rs b/tests/ui/lint/rfc-2383-lint-reason/expect_unused_inside_impl_block.rs index 1e2ff12a206..44a715e4cdc 100644 --- a/tests/ui/lint/rfc-2383-lint-reason/expect_unused_inside_impl_block.rs +++ b/tests/ui/lint/rfc-2383-lint-reason/expect_unused_inside_impl_block.rs @@ -1,5 +1,5 @@ -// check-pass -// incremental +//@ check-pass +//@ incremental #![feature(lint_reasons)] #![warn(unused)] diff --git a/tests/ui/lint/rfc-2383-lint-reason/expect_with_forbid.rs b/tests/ui/lint/rfc-2383-lint-reason/expect_with_forbid.rs index 77cb5e88bf7..7c0ecd19010 100644 --- a/tests/ui/lint/rfc-2383-lint-reason/expect_with_forbid.rs +++ b/tests/ui/lint/rfc-2383-lint-reason/expect_with_forbid.rs @@ -1,4 +1,4 @@ -// compile-flags: -Zdeduplicate-diagnostics=yes +//@ compile-flags: -Zdeduplicate-diagnostics=yes #![feature(lint_reasons)] diff --git a/tests/ui/lint/rfc-2383-lint-reason/expect_with_reason.rs b/tests/ui/lint/rfc-2383-lint-reason/expect_with_reason.rs index b4183d98211..29e60a265da 100644 --- a/tests/ui/lint/rfc-2383-lint-reason/expect_with_reason.rs +++ b/tests/ui/lint/rfc-2383-lint-reason/expect_with_reason.rs @@ -1,4 +1,4 @@ -// check-pass +//@ check-pass #![feature(lint_reasons)] #![warn(unused)] diff --git a/tests/ui/lint/rfc-2383-lint-reason/force_warn_expected_lints_fulfilled.rs b/tests/ui/lint/rfc-2383-lint-reason/force_warn_expected_lints_fulfilled.rs index a3c3933d700..efe921b76af 100644 --- a/tests/ui/lint/rfc-2383-lint-reason/force_warn_expected_lints_fulfilled.rs +++ b/tests/ui/lint/rfc-2383-lint-reason/force_warn_expected_lints_fulfilled.rs @@ -1,7 +1,7 @@ -// compile-flags: --force-warn while_true -// compile-flags: --force-warn unused_variables -// compile-flags: --force-warn unused_mut -// check-pass +//@ compile-flags: --force-warn while_true +//@ compile-flags: --force-warn unused_variables +//@ compile-flags: --force-warn unused_mut +//@ check-pass #![feature(lint_reasons)] diff --git a/tests/ui/lint/rfc-2383-lint-reason/force_warn_expected_lints_unfulfilled.rs b/tests/ui/lint/rfc-2383-lint-reason/force_warn_expected_lints_unfulfilled.rs index 080e300232b..2751f5d8303 100644 --- a/tests/ui/lint/rfc-2383-lint-reason/force_warn_expected_lints_unfulfilled.rs +++ b/tests/ui/lint/rfc-2383-lint-reason/force_warn_expected_lints_unfulfilled.rs @@ -1,7 +1,7 @@ -// compile-flags: --force-warn while_true -// compile-flags: --force-warn unused_variables -// compile-flags: --force-warn unused_mut -// check-pass +//@ compile-flags: --force-warn while_true +//@ compile-flags: --force-warn unused_variables +//@ compile-flags: --force-warn unused_mut +//@ check-pass #![feature(lint_reasons)] diff --git a/tests/ui/lint/rfc-2383-lint-reason/fulfilled_expectation_early_lints.rs b/tests/ui/lint/rfc-2383-lint-reason/fulfilled_expectation_early_lints.rs index 6624b930e5e..545939b1369 100644 --- a/tests/ui/lint/rfc-2383-lint-reason/fulfilled_expectation_early_lints.rs +++ b/tests/ui/lint/rfc-2383-lint-reason/fulfilled_expectation_early_lints.rs @@ -1,4 +1,4 @@ -// check-pass +//@ check-pass #![feature(lint_reasons)] diff --git a/tests/ui/lint/rfc-2383-lint-reason/fulfilled_expectation_late_lints.rs b/tests/ui/lint/rfc-2383-lint-reason/fulfilled_expectation_late_lints.rs index 5d928b3cab3..9431655c41d 100644 --- a/tests/ui/lint/rfc-2383-lint-reason/fulfilled_expectation_late_lints.rs +++ b/tests/ui/lint/rfc-2383-lint-reason/fulfilled_expectation_late_lints.rs @@ -1,4 +1,4 @@ -// check-pass +//@ check-pass #![feature(lint_reasons)] #![warn(unused)] diff --git a/tests/ui/lint/rfc-2383-lint-reason/multiple_expect_attrs.rs b/tests/ui/lint/rfc-2383-lint-reason/multiple_expect_attrs.rs index 98080b4e822..f02dfdcea30 100644 --- a/tests/ui/lint/rfc-2383-lint-reason/multiple_expect_attrs.rs +++ b/tests/ui/lint/rfc-2383-lint-reason/multiple_expect_attrs.rs @@ -1,4 +1,4 @@ -// check-pass +//@ check-pass #![feature(lint_reasons)] #![warn(unused)] diff --git a/tests/ui/lint/rfc-2383-lint-reason/no_ice_for_partial_compiler_runs.rs b/tests/ui/lint/rfc-2383-lint-reason/no_ice_for_partial_compiler_runs.rs index 2b6c3c6a1fd..61333519384 100644 --- a/tests/ui/lint/rfc-2383-lint-reason/no_ice_for_partial_compiler_runs.rs +++ b/tests/ui/lint/rfc-2383-lint-reason/no_ice_for_partial_compiler_runs.rs @@ -1,6 +1,6 @@ // This ensures that ICEs like rust#94953 don't happen -// check-pass -// compile-flags: -Z unpretty=expanded +//@ check-pass +//@ compile-flags: -Z unpretty=expanded #![feature(lint_reasons)] diff --git a/tests/ui/lint/rfc-2383-lint-reason/no_ice_for_partial_compiler_runs.stdout b/tests/ui/lint/rfc-2383-lint-reason/no_ice_for_partial_compiler_runs.stdout index 0ee3a03c388..6a6b4dcff92 100644 --- a/tests/ui/lint/rfc-2383-lint-reason/no_ice_for_partial_compiler_runs.stdout +++ b/tests/ui/lint/rfc-2383-lint-reason/no_ice_for_partial_compiler_runs.stdout @@ -1,8 +1,8 @@ #![feature(prelude_import)] #![no_std] // This ensures that ICEs like rust#94953 don't happen -// check-pass -// compile-flags: -Z unpretty=expanded +//@ check-pass +//@ compile-flags: -Z unpretty=expanded #![feature(lint_reasons)] #[prelude_import] diff --git a/tests/ui/lint/rfc-2383-lint-reason/root-attribute-confusion.rs b/tests/ui/lint/rfc-2383-lint-reason/root-attribute-confusion.rs index 0cade7fef02..7b60b55eb61 100644 --- a/tests/ui/lint/rfc-2383-lint-reason/root-attribute-confusion.rs +++ b/tests/ui/lint/rfc-2383-lint-reason/root-attribute-confusion.rs @@ -1,5 +1,5 @@ -// check-pass -// compile-flags: -Dunused_attributes +//@ check-pass +//@ compile-flags: -Dunused_attributes #![deny(unused_crate_dependencies)] #![feature(lint_reasons)] diff --git a/tests/ui/lint/rfc-2457-non-ascii-idents/lint-mixed-script-confusables-2.rs b/tests/ui/lint/rfc-2457-non-ascii-idents/lint-mixed-script-confusables-2.rs index f62c8a19031..858d75f7a54 100644 --- a/tests/ui/lint/rfc-2457-non-ascii-idents/lint-mixed-script-confusables-2.rs +++ b/tests/ui/lint/rfc-2457-non-ascii-idents/lint-mixed-script-confusables-2.rs @@ -1,4 +1,4 @@ -// check-pass +//@ check-pass #![deny(mixed_script_confusables)] struct Ī‘ctuallyNotLatin; diff --git a/tests/ui/lint/rustdoc-group.rs b/tests/ui/lint/rustdoc-group.rs index 130abe4253a..0d38c94ac05 100644 --- a/tests/ui/lint/rustdoc-group.rs +++ b/tests/ui/lint/rustdoc-group.rs @@ -1,5 +1,5 @@ -// check-pass -// compile-flags: --crate-type lib +//@ check-pass +//@ compile-flags: --crate-type lib #![deny(rustdoc)] //~^ WARNING removed: use `rustdoc::all` #![deny(rustdoc::all)] // has no effect when run with rustc directly diff --git a/tests/ui/lint/semicolon-in-expressions-from-macros/foreign-crate.rs b/tests/ui/lint/semicolon-in-expressions-from-macros/foreign-crate.rs index 374506366f8..6dd9d3d4dee 100644 --- a/tests/ui/lint/semicolon-in-expressions-from-macros/foreign-crate.rs +++ b/tests/ui/lint/semicolon-in-expressions-from-macros/foreign-crate.rs @@ -1,5 +1,5 @@ -// aux-build:foreign-crate.rs -// check-pass +//@ aux-build:foreign-crate.rs +//@ check-pass extern crate foreign_crate; diff --git a/tests/ui/lint/semicolon-in-expressions-from-macros/semicolon-in-expressions-from-macros.rs b/tests/ui/lint/semicolon-in-expressions-from-macros/semicolon-in-expressions-from-macros.rs index fff380934e8..33efdb3f08d 100644 --- a/tests/ui/lint/semicolon-in-expressions-from-macros/semicolon-in-expressions-from-macros.rs +++ b/tests/ui/lint/semicolon-in-expressions-from-macros/semicolon-in-expressions-from-macros.rs @@ -1,5 +1,5 @@ -// check-pass -// edition:2018 +//@ check-pass +//@ edition:2018 #![feature(stmt_expr_attributes)] #![warn(semicolon_in_expressions_from_macros)] diff --git a/tests/ui/lint/semicolon-in-expressions-from-macros/warn-semicolon-in-expressions-from-macros.rs b/tests/ui/lint/semicolon-in-expressions-from-macros/warn-semicolon-in-expressions-from-macros.rs index 2c63311e659..05fbfec2ae5 100644 --- a/tests/ui/lint/semicolon-in-expressions-from-macros/warn-semicolon-in-expressions-from-macros.rs +++ b/tests/ui/lint/semicolon-in-expressions-from-macros/warn-semicolon-in-expressions-from-macros.rs @@ -1,4 +1,4 @@ -// check-pass +//@ check-pass // Ensure that trailing semicolons cause warnings by default macro_rules! foo { diff --git a/tests/ui/lint/special-upper-lower-cases.rs b/tests/ui/lint/special-upper-lower-cases.rs index 761be61fa07..d77ffbcbfa3 100644 --- a/tests/ui/lint/special-upper-lower-cases.rs +++ b/tests/ui/lint/special-upper-lower-cases.rs @@ -3,7 +3,7 @@ // The diagnostics don't provide meaningful suggestions for them // as we cannot convert them properly. -// check-pass +//@ check-pass #![allow(uncommon_codepoints, unused)] diff --git a/tests/ui/lint/suggestions.fixed b/tests/ui/lint/suggestions.fixed index 35851690b73..b017438a8bd 100644 --- a/tests/ui/lint/suggestions.fixed +++ b/tests/ui/lint/suggestions.fixed @@ -1,5 +1,5 @@ // ignore-tidy-tab -// run-rustfix +//@ run-rustfix #![warn(unused_mut, unused_parens)] // UI tests pass `-A unused`—see Issue #43896 diff --git a/tests/ui/lint/suggestions.rs b/tests/ui/lint/suggestions.rs index be6f0d6b30f..2419686a879 100644 --- a/tests/ui/lint/suggestions.rs +++ b/tests/ui/lint/suggestions.rs @@ -1,5 +1,5 @@ // ignore-tidy-tab -// run-rustfix +//@ run-rustfix #![warn(unused_mut, unused_parens)] // UI tests pass `-A unused`—see Issue #43896 diff --git a/tests/ui/lint/test-allow-dead-extern-static-no-warning.rs b/tests/ui/lint/test-allow-dead-extern-static-no-warning.rs index 2583e431ec1..12d92ad2ec6 100644 --- a/tests/ui/lint/test-allow-dead-extern-static-no-warning.rs +++ b/tests/ui/lint/test-allow-dead-extern-static-no-warning.rs @@ -1,5 +1,5 @@ -// run-pass -// compile-flags: --test +//@ run-pass +//@ compile-flags: --test #![deny(dead_code)] diff --git a/tests/ui/lint/test-inner-fn.rs b/tests/ui/lint/test-inner-fn.rs index d419cc6fa45..13b7f44f0b4 100644 --- a/tests/ui/lint/test-inner-fn.rs +++ b/tests/ui/lint/test-inner-fn.rs @@ -1,4 +1,4 @@ -// compile-flags: --test -D unnameable_test_items +//@ compile-flags: --test -D unnameable_test_items #[test] fn foo() { diff --git a/tests/ui/lint/trivial-cast-ice.rs b/tests/ui/lint/trivial-cast-ice.rs index f781fab2212..881301c8ef6 100644 --- a/tests/ui/lint/trivial-cast-ice.rs +++ b/tests/ui/lint/trivial-cast-ice.rs @@ -1,5 +1,5 @@ -// aux-build:trivial-cast-ice.rs -// check-pass +//@ aux-build:trivial-cast-ice.rs +//@ check-pass // Demonstrates the ICE in #102561 diff --git a/tests/ui/lint/type-overflow.rs b/tests/ui/lint/type-overflow.rs index 6234b794c1f..7239e1c9837 100644 --- a/tests/ui/lint/type-overflow.rs +++ b/tests/ui/lint/type-overflow.rs @@ -1,4 +1,4 @@ -// check-pass +//@ check-pass #![warn(overflowing_literals)] fn main() { diff --git a/tests/ui/lint/unaligned_references_external_macro.rs b/tests/ui/lint/unaligned_references_external_macro.rs index b655a2a8f63..3a97e2112a1 100644 --- a/tests/ui/lint/unaligned_references_external_macro.rs +++ b/tests/ui/lint/unaligned_references_external_macro.rs @@ -1,4 +1,4 @@ -// aux-build:unaligned_references_external_crate.rs +//@ aux-build:unaligned_references_external_crate.rs extern crate unaligned_references_external_crate; diff --git a/tests/ui/lint/unconditional_panic_98444.rs b/tests/ui/lint/unconditional_panic_98444.rs index 011fabfbbe9..56e0cf68d8a 100644 --- a/tests/ui/lint/unconditional_panic_98444.rs +++ b/tests/ui/lint/unconditional_panic_98444.rs @@ -1,4 +1,4 @@ -// build-fail +//@ build-fail fn main() { let xs: [i32; 5] = [1, 2, 3, 4, 5]; diff --git a/tests/ui/lint/undropped_manually_drops.rs b/tests/ui/lint/undropped_manually_drops.rs index 7286121a404..737bd5cd0f4 100644 --- a/tests/ui/lint/undropped_manually_drops.rs +++ b/tests/ui/lint/undropped_manually_drops.rs @@ -1,4 +1,4 @@ -// check-fail +//@ check-fail struct S; diff --git a/tests/ui/lint/unknown-lints/allow-in-other-module.rs b/tests/ui/lint/unknown-lints/allow-in-other-module.rs index 20bf0d7af03..399359c3207 100644 --- a/tests/ui/lint/unknown-lints/allow-in-other-module.rs +++ b/tests/ui/lint/unknown-lints/allow-in-other-module.rs @@ -1,4 +1,4 @@ -// check-pass +//@ check-pass // Tests that the unknown_lints lint doesn't fire for an unknown lint loaded from a separate file. // The key part is that the stderr output should be empty. diff --git a/tests/ui/lint/unknown-lints/other.rs b/tests/ui/lint/unknown-lints/other.rs index a5111c00a3e..f917bff6d60 100644 --- a/tests/ui/lint/unknown-lints/other.rs +++ b/tests/ui/lint/unknown-lints/other.rs @@ -1,4 +1,4 @@ -// ignore-test +//@ ignore-test // Companion to allow-in-other-module.rs diff --git a/tests/ui/lint/unnecessary-extern-crate.rs b/tests/ui/lint/unnecessary-extern-crate.rs index af2bd84bd53..6ca3b96758f 100644 --- a/tests/ui/lint/unnecessary-extern-crate.rs +++ b/tests/ui/lint/unnecessary-extern-crate.rs @@ -1,4 +1,4 @@ -// edition:2018 +//@ edition:2018 #![deny(unused_extern_crates)] #![feature(test, rustc_private)] diff --git a/tests/ui/lint/unreachable-async-fn.rs b/tests/ui/lint/unreachable-async-fn.rs index eedd877fe78..0a699a9ff40 100644 --- a/tests/ui/lint/unreachable-async-fn.rs +++ b/tests/ui/lint/unreachable-async-fn.rs @@ -1,5 +1,5 @@ -// check-pass -// edition:2018 +//@ check-pass +//@ edition:2018 #[allow(dead_code)] async fn foo () { // unreachable lint doesn't trigger diff --git a/tests/ui/lint/unreachable_pub.rs b/tests/ui/lint/unreachable_pub.rs index a50467ce82d..22c091e112b 100644 --- a/tests/ui/lint/unreachable_pub.rs +++ b/tests/ui/lint/unreachable_pub.rs @@ -1,4 +1,4 @@ -// check-pass +//@ check-pass #![allow(unused)] #![warn(unreachable_pub)] diff --git a/tests/ui/lint/unsafe_code/auxiliary/forge_unsafe_block.rs b/tests/ui/lint/unsafe_code/auxiliary/forge_unsafe_block.rs index 26871c98dbe..6849e9170c1 100644 --- a/tests/ui/lint/unsafe_code/auxiliary/forge_unsafe_block.rs +++ b/tests/ui/lint/unsafe_code/auxiliary/forge_unsafe_block.rs @@ -1,5 +1,5 @@ -// force-host -// no-prefer-dynamic +//@ force-host +//@ no-prefer-dynamic #![crate_type = "proc-macro"] diff --git a/tests/ui/lint/unsafe_code/forge_unsafe_block.rs b/tests/ui/lint/unsafe_code/forge_unsafe_block.rs index a1bd7b41319..6392849f915 100644 --- a/tests/ui/lint/unsafe_code/forge_unsafe_block.rs +++ b/tests/ui/lint/unsafe_code/forge_unsafe_block.rs @@ -1,5 +1,5 @@ -// check-pass -// aux-build:forge_unsafe_block.rs +//@ check-pass +//@ aux-build:forge_unsafe_block.rs #[macro_use] extern crate forge_unsafe_block; diff --git a/tests/ui/lint/unused-braces-while-let-with-mutable-value.rs b/tests/ui/lint/unused-braces-while-let-with-mutable-value.rs index ac547293c58..44a5f4fb44e 100644 --- a/tests/ui/lint/unused-braces-while-let-with-mutable-value.rs +++ b/tests/ui/lint/unused-braces-while-let-with-mutable-value.rs @@ -1,4 +1,4 @@ -// check-pass +//@ check-pass #![deny(unused_braces)] diff --git a/tests/ui/lint/unused-qualification-in-derive-expansion.rs b/tests/ui/lint/unused-qualification-in-derive-expansion.rs index c2efbf507fe..5cea9086d12 100644 --- a/tests/ui/lint/unused-qualification-in-derive-expansion.rs +++ b/tests/ui/lint/unused-qualification-in-derive-expansion.rs @@ -1,5 +1,5 @@ -// run-pass -// aux-build:add-impl.rs +//@ run-pass +//@ aux-build:add-impl.rs #![forbid(unused_qualifications)] diff --git a/tests/ui/lint/unused/assoc-types.rs b/tests/ui/lint/unused/assoc-types.rs index cebb9b4090c..62490604d83 100644 --- a/tests/ui/lint/unused/assoc-types.rs +++ b/tests/ui/lint/unused/assoc-types.rs @@ -1,5 +1,5 @@ -// edition: 2021 -// revisions: rpitit assoc_ty +//@ edition: 2021 +//@ revisions: rpitit assoc_ty #![deny(unused_must_use)] diff --git a/tests/ui/lint/unused/auxiliary/must-use-foreign.rs b/tests/ui/lint/unused/auxiliary/must-use-foreign.rs index f773f09c382..e2751eb60d6 100644 --- a/tests/ui/lint/unused/auxiliary/must-use-foreign.rs +++ b/tests/ui/lint/unused/auxiliary/must-use-foreign.rs @@ -1,4 +1,4 @@ -// edition:2021 +//@ edition:2021 use std::future::Future; diff --git a/tests/ui/lint/unused/const-local-var.rs b/tests/ui/lint/unused/const-local-var.rs index 89ca16fe003..69b697978ed 100644 --- a/tests/ui/lint/unused/const-local-var.rs +++ b/tests/ui/lint/unused/const-local-var.rs @@ -1,5 +1,5 @@ // regression test for https://github.com/rust-lang/rust/issues/69016 -// check-pass +//@ check-pass #![warn(unused)] #![deny(warnings)] diff --git a/tests/ui/lint/unused/issue-103320-must-use-ops.rs b/tests/ui/lint/unused/issue-103320-must-use-ops.rs index 597d312fa5e..5749fef4690 100644 --- a/tests/ui/lint/unused/issue-103320-must-use-ops.rs +++ b/tests/ui/lint/unused/issue-103320-must-use-ops.rs @@ -1,4 +1,4 @@ -// check-pass +//@ check-pass #![warn(unused_must_use)] #![feature(never_type)] diff --git a/tests/ui/lint/unused/issue-104397.rs b/tests/ui/lint/unused/issue-104397.rs index c17e532c17f..29a3e1b4f14 100644 --- a/tests/ui/lint/unused/issue-104397.rs +++ b/tests/ui/lint/unused/issue-104397.rs @@ -1,4 +1,4 @@ -// check-pass +//@ check-pass #![warn(unused)] #![deny(warnings)] diff --git a/tests/ui/lint/unused/issue-117142-invalid-remove-parens.rs b/tests/ui/lint/unused/issue-117142-invalid-remove-parens.rs index 8af9e6f3d95..f794ebdefec 100644 --- a/tests/ui/lint/unused/issue-117142-invalid-remove-parens.rs +++ b/tests/ui/lint/unused/issue-117142-invalid-remove-parens.rs @@ -1,4 +1,4 @@ -// check-pass +//@ check-pass #![warn(unused_parens)] fn main() { diff --git a/tests/ui/lint/unused/issue-47390-unused-variable-in-struct-pattern.rs b/tests/ui/lint/unused/issue-47390-unused-variable-in-struct-pattern.rs index 4822a9b2c7f..10a69ff6180 100644 --- a/tests/ui/lint/unused/issue-47390-unused-variable-in-struct-pattern.rs +++ b/tests/ui/lint/unused/issue-47390-unused-variable-in-struct-pattern.rs @@ -1,4 +1,4 @@ -// check-pass +//@ check-pass #![feature(box_patterns)] diff --git a/tests/ui/lint/unused/issue-54180-unused-ref-field.fixed b/tests/ui/lint/unused/issue-54180-unused-ref-field.fixed index 1350b7ca699..4af596dd7eb 100644 --- a/tests/ui/lint/unused/issue-54180-unused-ref-field.fixed +++ b/tests/ui/lint/unused/issue-54180-unused-ref-field.fixed @@ -1,4 +1,4 @@ -// run-rustfix +//@ run-rustfix #![deny(unused)] diff --git a/tests/ui/lint/unused/issue-54180-unused-ref-field.rs b/tests/ui/lint/unused/issue-54180-unused-ref-field.rs index 7b3392b609a..a96b777b1da 100644 --- a/tests/ui/lint/unused/issue-54180-unused-ref-field.rs +++ b/tests/ui/lint/unused/issue-54180-unused-ref-field.rs @@ -1,4 +1,4 @@ -// run-rustfix +//@ run-rustfix #![deny(unused)] diff --git a/tests/ui/lint/unused/issue-54538-unused-parens-lint.fixed b/tests/ui/lint/unused/issue-54538-unused-parens-lint.fixed index 9c52ca5577e..7cf4aa6cdd4 100644 --- a/tests/ui/lint/unused/issue-54538-unused-parens-lint.fixed +++ b/tests/ui/lint/unused/issue-54538-unused-parens-lint.fixed @@ -1,4 +1,4 @@ -// run-rustfix +//@ run-rustfix #![feature(box_patterns, stmt_expr_attributes, yeet_expr)] diff --git a/tests/ui/lint/unused/issue-54538-unused-parens-lint.rs b/tests/ui/lint/unused/issue-54538-unused-parens-lint.rs index 196ecf0c1bb..013255dc213 100644 --- a/tests/ui/lint/unused/issue-54538-unused-parens-lint.rs +++ b/tests/ui/lint/unused/issue-54538-unused-parens-lint.rs @@ -1,4 +1,4 @@ -// run-rustfix +//@ run-rustfix #![feature(box_patterns, stmt_expr_attributes, yeet_expr)] diff --git a/tests/ui/lint/unused/issue-70041.rs b/tests/ui/lint/unused/issue-70041.rs index 22e42295eed..817dfe82114 100644 --- a/tests/ui/lint/unused/issue-70041.rs +++ b/tests/ui/lint/unused/issue-70041.rs @@ -1,5 +1,5 @@ -// compile-flags: --edition=2018 -// run-pass +//@ compile-flags: --edition=2018 +//@ run-pass macro_rules! regex { //~^ WARN unused macro definition diff --git a/tests/ui/lint/unused/issue-71290-unused-paren-binop.rs b/tests/ui/lint/unused/issue-71290-unused-paren-binop.rs index 24d77e36d94..71c4b660604 100644 --- a/tests/ui/lint/unused/issue-71290-unused-paren-binop.rs +++ b/tests/ui/lint/unused/issue-71290-unused-paren-binop.rs @@ -1,4 +1,4 @@ -// check-pass +//@ check-pass // Make sure unused parens lint doesn't emit a false positive. // See https://github.com/rust-lang/rust/issues/71290 for details. #![deny(unused_parens)] diff --git a/tests/ui/lint/unused/issue-81314-unused-span-ident.fixed b/tests/ui/lint/unused/issue-81314-unused-span-ident.fixed index aac918f2bc8..8d64222e1b0 100644 --- a/tests/ui/lint/unused/issue-81314-unused-span-ident.fixed +++ b/tests/ui/lint/unused/issue-81314-unused-span-ident.fixed @@ -1,4 +1,4 @@ -// run-rustfix +//@ run-rustfix // Regression test for #81314: Unused variable lint should // span only the identifier and not the rest of the pattern diff --git a/tests/ui/lint/unused/issue-81314-unused-span-ident.rs b/tests/ui/lint/unused/issue-81314-unused-span-ident.rs index 78296f4258d..d90e57972ee 100644 --- a/tests/ui/lint/unused/issue-81314-unused-span-ident.rs +++ b/tests/ui/lint/unused/issue-81314-unused-span-ident.rs @@ -1,4 +1,4 @@ -// run-rustfix +//@ run-rustfix // Regression test for #81314: Unused variable lint should // span only the identifier and not the rest of the pattern diff --git a/tests/ui/lint/unused/issue-88519-unused-paren.rs b/tests/ui/lint/unused/issue-88519-unused-paren.rs index ce3d15ac183..30f5dcf2615 100644 --- a/tests/ui/lint/unused/issue-88519-unused-paren.rs +++ b/tests/ui/lint/unused/issue-88519-unused-paren.rs @@ -1,4 +1,4 @@ -// check-pass +//@ check-pass // Make sure unused parens lint doesn't emit a false positive. // See https://github.com/rust-lang/rust/issues/88519 #![deny(unused_parens)] diff --git a/tests/ui/lint/unused/issue-90807-unused-paren.rs b/tests/ui/lint/unused/issue-90807-unused-paren.rs index 4c0930f967d..dbd633041d4 100644 --- a/tests/ui/lint/unused/issue-90807-unused-paren.rs +++ b/tests/ui/lint/unused/issue-90807-unused-paren.rs @@ -1,4 +1,4 @@ -// check-pass +//@ check-pass // Make sure unused parens lint doesn't emit a false positive. // See https://github.com/rust-lang/rust/issues/90807 #![deny(unused_parens)] diff --git a/tests/ui/lint/unused/lint-unused-extern-crate.rs b/tests/ui/lint/unused/lint-unused-extern-crate.rs index 79df58b7042..58ce3a4f55c 100644 --- a/tests/ui/lint/unused/lint-unused-extern-crate.rs +++ b/tests/ui/lint/unused/lint-unused-extern-crate.rs @@ -1,8 +1,8 @@ -// aux-build:lint_unused_extern_crate.rs -// aux-build:lint_unused_extern_crate2.rs -// aux-build:lint_unused_extern_crate3.rs -// aux-build:lint_unused_extern_crate4.rs -// aux-build:lint_unused_extern_crate5.rs +//@ aux-build:lint_unused_extern_crate.rs +//@ aux-build:lint_unused_extern_crate2.rs +//@ aux-build:lint_unused_extern_crate3.rs +//@ aux-build:lint_unused_extern_crate4.rs +//@ aux-build:lint_unused_extern_crate5.rs #![deny(unused_extern_crates)] #![allow(unused_variables)] diff --git a/tests/ui/lint/unused/lint-unused-mut-self.fixed b/tests/ui/lint/unused/lint-unused-mut-self.fixed index 92ce103586c..d64facb50d3 100644 --- a/tests/ui/lint/unused/lint-unused-mut-self.fixed +++ b/tests/ui/lint/unused/lint-unused-mut-self.fixed @@ -1,4 +1,4 @@ -// run-rustfix +//@ run-rustfix #![allow(unused_assignments)] #![allow(unused_variables)] diff --git a/tests/ui/lint/unused/lint-unused-mut-self.rs b/tests/ui/lint/unused/lint-unused-mut-self.rs index 70736ce216e..6333dca34da 100644 --- a/tests/ui/lint/unused/lint-unused-mut-self.rs +++ b/tests/ui/lint/unused/lint-unused-mut-self.rs @@ -1,4 +1,4 @@ -// run-rustfix +//@ run-rustfix #![allow(unused_assignments)] #![allow(unused_variables)] diff --git a/tests/ui/lint/unused/lint-unused-mut-variables.rs b/tests/ui/lint/unused/lint-unused-mut-variables.rs index 5334ab5824d..f0c7dff666e 100644 --- a/tests/ui/lint/unused/lint-unused-mut-variables.rs +++ b/tests/ui/lint/unused/lint-unused-mut-variables.rs @@ -1,4 +1,4 @@ -// edition:2018 +//@ edition:2018 // Exercise the unused_mut attribute in some positive and negative cases diff --git a/tests/ui/lint/unused/lint-unused-variables.rs b/tests/ui/lint/unused/lint-unused-variables.rs index 621c6ef8414..84c26c334f0 100644 --- a/tests/ui/lint/unused/lint-unused-variables.rs +++ b/tests/ui/lint/unused/lint-unused-variables.rs @@ -1,5 +1,5 @@ -// compile-flags: --cfg something -// edition:2018 +//@ compile-flags: --cfg something +//@ edition:2018 #![feature(async_closure)] #![deny(unused_variables)] diff --git a/tests/ui/lint/unused/must-use-block-expr.fixed b/tests/ui/lint/unused/must-use-block-expr.fixed index 642012812bd..ab9c88a9981 100644 --- a/tests/ui/lint/unused/must-use-block-expr.fixed +++ b/tests/ui/lint/unused/must-use-block-expr.fixed @@ -1,5 +1,5 @@ -// run-rustfix -// check-pass +//@ run-rustfix +//@ check-pass #![warn(unused_must_use)] diff --git a/tests/ui/lint/unused/must-use-block-expr.rs b/tests/ui/lint/unused/must-use-block-expr.rs index e0a680aa07d..93ea3a13f4d 100644 --- a/tests/ui/lint/unused/must-use-block-expr.rs +++ b/tests/ui/lint/unused/must-use-block-expr.rs @@ -1,5 +1,5 @@ -// run-rustfix -// check-pass +//@ run-rustfix +//@ check-pass #![warn(unused_must_use)] diff --git a/tests/ui/lint/unused/must-use-box-from-raw.rs b/tests/ui/lint/unused/must-use-box-from-raw.rs index 9ea7726894c..1bc77322513 100644 --- a/tests/ui/lint/unused/must-use-box-from-raw.rs +++ b/tests/ui/lint/unused/must-use-box-from-raw.rs @@ -1,6 +1,6 @@ // #99269 -// check-pass +//@ check-pass #![warn(unused_must_use)] diff --git a/tests/ui/lint/unused/must-use-foreign.rs b/tests/ui/lint/unused/must-use-foreign.rs index 21a11058562..a1d8ad47bbf 100644 --- a/tests/ui/lint/unused/must-use-foreign.rs +++ b/tests/ui/lint/unused/must-use-foreign.rs @@ -1,6 +1,6 @@ -// edition:2021 -// aux-build:must-use-foreign.rs -// check-pass +//@ edition:2021 +//@ aux-build:must-use-foreign.rs +//@ check-pass extern crate must_use_foreign; diff --git a/tests/ui/lint/unused/must-use-ops.rs b/tests/ui/lint/unused/must-use-ops.rs index 60f877aa8b3..f61cf0fcfcb 100644 --- a/tests/ui/lint/unused/must-use-ops.rs +++ b/tests/ui/lint/unused/must-use-ops.rs @@ -1,6 +1,6 @@ // Issue #50124 - Test warning for unused operator expressions -// check-pass +//@ check-pass #![warn(unused_must_use)] #![feature(never_type)] diff --git a/tests/ui/lint/unused/no-unused-parens-return-block.rs b/tests/ui/lint/unused/no-unused-parens-return-block.rs index 37dc519a204..57e5da0a472 100644 --- a/tests/ui/lint/unused/no-unused-parens-return-block.rs +++ b/tests/ui/lint/unused/no-unused-parens-return-block.rs @@ -1,4 +1,4 @@ -// run-pass +//@ run-pass #![deny(unused_parens)] #![allow(unreachable_code)] diff --git a/tests/ui/lint/unused/trait-alias-supertrait.rs b/tests/ui/lint/unused/trait-alias-supertrait.rs index 46f00c06bf1..ed9658e5b95 100644 --- a/tests/ui/lint/unused/trait-alias-supertrait.rs +++ b/tests/ui/lint/unused/trait-alias-supertrait.rs @@ -1,4 +1,4 @@ -// check-pass +//@ check-pass // Make sure that we only consider *Self* supertrait predicates // in the `unused_must_use` lint. diff --git a/tests/ui/lint/unused/unused-async.rs b/tests/ui/lint/unused/unused-async.rs index 6355f47f037..a288e96d530 100644 --- a/tests/ui/lint/unused/unused-async.rs +++ b/tests/ui/lint/unused/unused-async.rs @@ -1,4 +1,4 @@ -// edition:2018 +//@ edition:2018 #![deny(unused_must_use)] diff --git a/tests/ui/lint/unused/unused-attr-duplicate.rs b/tests/ui/lint/unused/unused-attr-duplicate.rs index 692617eacfb..407af40654e 100644 --- a/tests/ui/lint/unused/unused-attr-duplicate.rs +++ b/tests/ui/lint/unused/unused-attr-duplicate.rs @@ -1,6 +1,6 @@ // Tests for repeating attribute warnings. -// aux-build:lint_unused_extern_crate.rs -// compile-flags:--test +//@ aux-build:lint_unused_extern_crate.rs +//@ compile-flags:--test // Not tested due to extra requirements: // - panic_handler: needs extra setup // - target_feature: platform-specific diff --git a/tests/ui/lint/unused/unused-closure.rs b/tests/ui/lint/unused/unused-closure.rs index 12ee8b3a9bb..9106edee653 100644 --- a/tests/ui/lint/unused/unused-closure.rs +++ b/tests/ui/lint/unused/unused-closure.rs @@ -1,5 +1,5 @@ // Test that closures and coroutines are "must use" types. -// edition:2018 +//@ edition:2018 #![feature(async_closure)] #![feature(coroutines)] diff --git a/tests/ui/lint/unused/unused-mut-warning-captured-var.fixed b/tests/ui/lint/unused/unused-mut-warning-captured-var.fixed index c21f18015c1..e8b6dd86403 100644 --- a/tests/ui/lint/unused/unused-mut-warning-captured-var.fixed +++ b/tests/ui/lint/unused/unused-mut-warning-captured-var.fixed @@ -1,4 +1,4 @@ -// run-rustfix +//@ run-rustfix #![forbid(unused_mut)] diff --git a/tests/ui/lint/unused/unused-mut-warning-captured-var.rs b/tests/ui/lint/unused/unused-mut-warning-captured-var.rs index 3119d83a0eb..f46c76b3f59 100644 --- a/tests/ui/lint/unused/unused-mut-warning-captured-var.rs +++ b/tests/ui/lint/unused/unused-mut-warning-captured-var.rs @@ -1,4 +1,4 @@ -// run-rustfix +//@ run-rustfix #![forbid(unused_mut)] diff --git a/tests/ui/lint/unused/unused-parens-issue-106413.rs b/tests/ui/lint/unused/unused-parens-issue-106413.rs index 7e76ab073b4..81aa41cda07 100644 --- a/tests/ui/lint/unused/unused-parens-issue-106413.rs +++ b/tests/ui/lint/unused/unused-parens-issue-106413.rs @@ -1,4 +1,4 @@ -// check-pass +//@ check-pass #![warn(unused_parens)] fn id(t: T) -> T { t } diff --git a/tests/ui/lint/unused_braces.fixed b/tests/ui/lint/unused_braces.fixed index e691fb37e6c..73658a4a939 100644 --- a/tests/ui/lint/unused_braces.fixed +++ b/tests/ui/lint/unused_braces.fixed @@ -1,5 +1,5 @@ -// check-pass -// run-rustfix +//@ check-pass +//@ run-rustfix #![warn(unused_braces, unused_parens)] #![allow(unreachable_code, unused_unsafe)] // for rustfix diff --git a/tests/ui/lint/unused_braces.rs b/tests/ui/lint/unused_braces.rs index 0d260d2cbc9..87134c73a2c 100644 --- a/tests/ui/lint/unused_braces.rs +++ b/tests/ui/lint/unused_braces.rs @@ -1,5 +1,5 @@ -// check-pass -// run-rustfix +//@ check-pass +//@ run-rustfix #![warn(unused_braces, unused_parens)] #![allow(unreachable_code, unused_unsafe)] // for rustfix diff --git a/tests/ui/lint/unused_braces_borrow.fixed b/tests/ui/lint/unused_braces_borrow.fixed index 583506f891d..b545f1bb7bb 100644 --- a/tests/ui/lint/unused_braces_borrow.fixed +++ b/tests/ui/lint/unused_braces_borrow.fixed @@ -1,5 +1,5 @@ -// check-pass -// run-rustfix +//@ check-pass +//@ run-rustfix #![warn(unused_braces)] diff --git a/tests/ui/lint/unused_braces_borrow.rs b/tests/ui/lint/unused_braces_borrow.rs index b7c529d73b9..499602182de 100644 --- a/tests/ui/lint/unused_braces_borrow.rs +++ b/tests/ui/lint/unused_braces_borrow.rs @@ -1,5 +1,5 @@ -// check-pass -// run-rustfix +//@ check-pass +//@ run-rustfix #![warn(unused_braces)] diff --git a/tests/ui/lint/unused_braces_macro.rs b/tests/ui/lint/unused_braces_macro.rs index bfee95378bf..d0b42a12ff5 100644 --- a/tests/ui/lint/unused_braces_macro.rs +++ b/tests/ui/lint/unused_braces_macro.rs @@ -1,4 +1,4 @@ -// build-pass +//@ build-pass pub fn foo () {} fn main() { diff --git a/tests/ui/lint/unused_import_warning_issue_45268.rs b/tests/ui/lint/unused_import_warning_issue_45268.rs index 7aa4d4959e7..afa946976f8 100644 --- a/tests/ui/lint/unused_import_warning_issue_45268.rs +++ b/tests/ui/lint/unused_import_warning_issue_45268.rs @@ -1,4 +1,4 @@ -// check-pass +//@ check-pass #![warn(unused_imports)] // Warning explanation here, it's OK diff --git a/tests/ui/lint/unused_labels.rs b/tests/ui/lint/unused_labels.rs index 87a5392fd30..4839e975e91 100644 --- a/tests/ui/lint/unused_labels.rs +++ b/tests/ui/lint/unused_labels.rs @@ -2,7 +2,7 @@ // should also deal with the edge cases where a label is shadowed, // within nested loops -// check-pass +//@ check-pass #![warn(unused_labels)] diff --git a/tests/ui/lint/unused_parens_json_suggestion.fixed b/tests/ui/lint/unused_parens_json_suggestion.fixed index b73197ef1bd..89fd0d86614 100644 --- a/tests/ui/lint/unused_parens_json_suggestion.fixed +++ b/tests/ui/lint/unused_parens_json_suggestion.fixed @@ -1,6 +1,6 @@ -// compile-flags: --error-format json -// error-pattern:unnecessary parentheses -// run-rustfix +//@ compile-flags: --error-format json +//@ error-pattern:unnecessary parentheses +//@ run-rustfix // The output for humans should just highlight the whole span without showing // the suggested replacement, but we also want to test that suggested diff --git a/tests/ui/lint/unused_parens_json_suggestion.rs b/tests/ui/lint/unused_parens_json_suggestion.rs index 4339655cf9d..4526084196c 100644 --- a/tests/ui/lint/unused_parens_json_suggestion.rs +++ b/tests/ui/lint/unused_parens_json_suggestion.rs @@ -1,6 +1,6 @@ -// compile-flags: --error-format json -// error-pattern:unnecessary parentheses -// run-rustfix +//@ compile-flags: --error-format json +//@ error-pattern:unnecessary parentheses +//@ run-rustfix // The output for humans should just highlight the whole span without showing // the suggested replacement, but we also want to test that suggested diff --git a/tests/ui/lint/unused_parens_json_suggestion.stderr b/tests/ui/lint/unused_parens_json_suggestion.stderr index 88f6be4236b..1f4928cd464 100644 --- a/tests/ui/lint/unused_parens_json_suggestion.stderr +++ b/tests/ui/lint/unused_parens_json_suggestion.stderr @@ -1,4 +1,4 @@ -{"$message_type":"diagnostic","message":"unnecessary parentheses around assigned value","code":{"code":"unused_parens","explanation":null},"level":"error","spans":[{"file_name":"$DIR/unused_parens_json_suggestion.rs","byte_start":618,"byte_end":619,"line_start":17,"line_end":17,"column_start":14,"column_end":15,"is_primary":true,"text":[{"text":" let _a = (1 / (2 + 3));","highlight_start":14,"highlight_end":15}],"label":null,"suggested_replacement":null,"suggestion_applicability":null,"expansion":null},{"file_name":"$DIR/unused_parens_json_suggestion.rs","byte_start":630,"byte_end":631,"line_start":17,"line_end":17,"column_start":26,"column_end":27,"is_primary":true,"text":[{"text":" let _a = (1 / (2 + 3));","highlight_start":26,"highlight_end":27}],"label":null,"suggested_replacement":null,"suggestion_applicability":null,"expansion":null}],"children":[{"message":"the lint level is defined here","code":null,"level":"note","spans":[{"file_name":"$DIR/unused_parens_json_suggestion.rs","byte_start":436,"byte_end":449,"line_start":11,"line_end":11,"column_start":9,"column_end":22,"is_primary":true,"text":[{"text":"#![deny(unused_parens)]","highlight_start":9,"highlight_end":22}],"label":null,"suggested_replacement":null,"suggestion_applicability":null,"expansion":null}],"children":[],"rendered":null},{"message":"remove these parentheses","code":null,"level":"help","spans":[{"file_name":"$DIR/unused_parens_json_suggestion.rs","byte_start":618,"byte_end":619,"line_start":17,"line_end":17,"column_start":14,"column_end":15,"is_primary":true,"text":[{"text":" let _a = (1 / (2 + 3));","highlight_start":14,"highlight_end":15}],"label":null,"suggested_replacement":"","suggestion_applicability":"MachineApplicable","expansion":null},{"file_name":"$DIR/unused_parens_json_suggestion.rs","byte_start":630,"byte_end":631,"line_start":17,"line_end":17,"column_start":26,"column_end":27,"is_primary":true,"text":[{"text":" let _a = (1 / (2 + 3));","highlight_start":26,"highlight_end":27}],"label":null,"suggested_replacement":"","suggestion_applicability":"MachineApplicable","expansion":null}],"children":[],"rendered":null}],"rendered":"error: unnecessary parentheses around assigned value +{"$message_type":"diagnostic","message":"unnecessary parentheses around assigned value","code":{"code":"unused_parens","explanation":null},"level":"error","spans":[{"file_name":"$DIR/unused_parens_json_suggestion.rs","byte_start":621,"byte_end":622,"line_start":17,"line_end":17,"column_start":14,"column_end":15,"is_primary":true,"text":[{"text":" let _a = (1 / (2 + 3));","highlight_start":14,"highlight_end":15}],"label":null,"suggested_replacement":null,"suggestion_applicability":null,"expansion":null},{"file_name":"$DIR/unused_parens_json_suggestion.rs","byte_start":633,"byte_end":634,"line_start":17,"line_end":17,"column_start":26,"column_end":27,"is_primary":true,"text":[{"text":" let _a = (1 / (2 + 3));","highlight_start":26,"highlight_end":27}],"label":null,"suggested_replacement":null,"suggestion_applicability":null,"expansion":null}],"children":[{"message":"the lint level is defined here","code":null,"level":"note","spans":[{"file_name":"$DIR/unused_parens_json_suggestion.rs","byte_start":439,"byte_end":452,"line_start":11,"line_end":11,"column_start":9,"column_end":22,"is_primary":true,"text":[{"text":"#![deny(unused_parens)]","highlight_start":9,"highlight_end":22}],"label":null,"suggested_replacement":null,"suggestion_applicability":null,"expansion":null}],"children":[],"rendered":null},{"message":"remove these parentheses","code":null,"level":"help","spans":[{"file_name":"$DIR/unused_parens_json_suggestion.rs","byte_start":621,"byte_end":622,"line_start":17,"line_end":17,"column_start":14,"column_end":15,"is_primary":true,"text":[{"text":" let _a = (1 / (2 + 3));","highlight_start":14,"highlight_end":15}],"label":null,"suggested_replacement":"","suggestion_applicability":"MachineApplicable","expansion":null},{"file_name":"$DIR/unused_parens_json_suggestion.rs","byte_start":633,"byte_end":634,"line_start":17,"line_end":17,"column_start":26,"column_end":27,"is_primary":true,"text":[{"text":" let _a = (1 / (2 + 3));","highlight_start":26,"highlight_end":27}],"label":null,"suggested_replacement":"","suggestion_applicability":"MachineApplicable","expansion":null}],"children":[],"rendered":null}],"rendered":"error: unnecessary parentheses around assigned value --> $DIR/unused_parens_json_suggestion.rs:17:14 | LL | let _a = (1 / (2 + 3)); diff --git a/tests/ui/lint/unused_parens_multibyte_recovery.rs b/tests/ui/lint/unused_parens_multibyte_recovery.rs index bc03faf3fce..630b25d192a 100644 --- a/tests/ui/lint/unused_parens_multibyte_recovery.rs +++ b/tests/ui/lint/unused_parens_multibyte_recovery.rs @@ -1,8 +1,8 @@ // ignore-tidy-trailing-newlines // -// error-pattern: this file contains an unclosed delimiter -// error-pattern: this file contains an unclosed delimiter -// error-pattern: this file contains an unclosed delimiter +//@ error-pattern: this file contains an unclosed delimiter +//@ error-pattern: this file contains an unclosed delimiter +//@ error-pattern: this file contains an unclosed delimiter // // Verify that unused parens lint does not try to create a span // which points in the middle of a multibyte character. diff --git a/tests/ui/lint/unused_parens_remove_json_suggestion.fixed b/tests/ui/lint/unused_parens_remove_json_suggestion.fixed index 39d7a1127b6..e2774d5d7e5 100644 --- a/tests/ui/lint/unused_parens_remove_json_suggestion.fixed +++ b/tests/ui/lint/unused_parens_remove_json_suggestion.fixed @@ -1,6 +1,6 @@ -// compile-flags: --error-format json -// error-pattern:unnecessary parentheses -// run-rustfix +//@ compile-flags: --error-format json +//@ error-pattern:unnecessary parentheses +//@ run-rustfix // The output for humans should just highlight the whole span without showing // the suggested replacement, but we also want to test that suggested diff --git a/tests/ui/lint/unused_parens_remove_json_suggestion.rs b/tests/ui/lint/unused_parens_remove_json_suggestion.rs index 2748bd3f73d..b3ac87178db 100644 --- a/tests/ui/lint/unused_parens_remove_json_suggestion.rs +++ b/tests/ui/lint/unused_parens_remove_json_suggestion.rs @@ -1,6 +1,6 @@ -// compile-flags: --error-format json -// error-pattern:unnecessary parentheses -// run-rustfix +//@ compile-flags: --error-format json +//@ error-pattern:unnecessary parentheses +//@ run-rustfix // The output for humans should just highlight the whole span without showing // the suggested replacement, but we also want to test that suggested diff --git a/tests/ui/lint/unused_parens_remove_json_suggestion.stderr b/tests/ui/lint/unused_parens_remove_json_suggestion.stderr index 80371c1594f..9268fc1abc4 100644 --- a/tests/ui/lint/unused_parens_remove_json_suggestion.stderr +++ b/tests/ui/lint/unused_parens_remove_json_suggestion.stderr @@ -1,4 +1,4 @@ -{"$message_type":"diagnostic","message":"unnecessary parentheses around `if` condition","code":{"code":"unused_parens","explanation":null},"level":"error","spans":[{"file_name":"$DIR/unused_parens_remove_json_suggestion.rs","byte_start":522,"byte_end":523,"line_start":18,"line_end":18,"column_start":8,"column_end":9,"is_primary":true,"text":[{"text":" if (_b) {","highlight_start":8,"highlight_end":9}],"label":null,"suggested_replacement":null,"suggestion_applicability":null,"expansion":null},{"file_name":"$DIR/unused_parens_remove_json_suggestion.rs","byte_start":525,"byte_end":526,"line_start":18,"line_end":18,"column_start":11,"column_end":12,"is_primary":true,"text":[{"text":" if (_b) {","highlight_start":11,"highlight_end":12}],"label":null,"suggested_replacement":null,"suggestion_applicability":null,"expansion":null}],"children":[{"message":"the lint level is defined here","code":null,"level":"note","spans":[{"file_name":"$DIR/unused_parens_remove_json_suggestion.rs","byte_start":436,"byte_end":449,"line_start":11,"line_end":11,"column_start":9,"column_end":22,"is_primary":true,"text":[{"text":"#![deny(unused_parens)]","highlight_start":9,"highlight_end":22}],"label":null,"suggested_replacement":null,"suggestion_applicability":null,"expansion":null}],"children":[],"rendered":null},{"message":"remove these parentheses","code":null,"level":"help","spans":[{"file_name":"$DIR/unused_parens_remove_json_suggestion.rs","byte_start":522,"byte_end":523,"line_start":18,"line_end":18,"column_start":8,"column_end":9,"is_primary":true,"text":[{"text":" if (_b) {","highlight_start":8,"highlight_end":9}],"label":null,"suggested_replacement":"","suggestion_applicability":"MachineApplicable","expansion":null},{"file_name":"$DIR/unused_parens_remove_json_suggestion.rs","byte_start":525,"byte_end":526,"line_start":18,"line_end":18,"column_start":11,"column_end":12,"is_primary":true,"text":[{"text":" if (_b) {","highlight_start":11,"highlight_end":12}],"label":null,"suggested_replacement":"","suggestion_applicability":"MachineApplicable","expansion":null}],"children":[],"rendered":null}],"rendered":"error: unnecessary parentheses around `if` condition +{"$message_type":"diagnostic","message":"unnecessary parentheses around `if` condition","code":{"code":"unused_parens","explanation":null},"level":"error","spans":[{"file_name":"$DIR/unused_parens_remove_json_suggestion.rs","byte_start":525,"byte_end":526,"line_start":18,"line_end":18,"column_start":8,"column_end":9,"is_primary":true,"text":[{"text":" if (_b) {","highlight_start":8,"highlight_end":9}],"label":null,"suggested_replacement":null,"suggestion_applicability":null,"expansion":null},{"file_name":"$DIR/unused_parens_remove_json_suggestion.rs","byte_start":528,"byte_end":529,"line_start":18,"line_end":18,"column_start":11,"column_end":12,"is_primary":true,"text":[{"text":" if (_b) {","highlight_start":11,"highlight_end":12}],"label":null,"suggested_replacement":null,"suggestion_applicability":null,"expansion":null}],"children":[{"message":"the lint level is defined here","code":null,"level":"note","spans":[{"file_name":"$DIR/unused_parens_remove_json_suggestion.rs","byte_start":439,"byte_end":452,"line_start":11,"line_end":11,"column_start":9,"column_end":22,"is_primary":true,"text":[{"text":"#![deny(unused_parens)]","highlight_start":9,"highlight_end":22}],"label":null,"suggested_replacement":null,"suggestion_applicability":null,"expansion":null}],"children":[],"rendered":null},{"message":"remove these parentheses","code":null,"level":"help","spans":[{"file_name":"$DIR/unused_parens_remove_json_suggestion.rs","byte_start":525,"byte_end":526,"line_start":18,"line_end":18,"column_start":8,"column_end":9,"is_primary":true,"text":[{"text":" if (_b) {","highlight_start":8,"highlight_end":9}],"label":null,"suggested_replacement":"","suggestion_applicability":"MachineApplicable","expansion":null},{"file_name":"$DIR/unused_parens_remove_json_suggestion.rs","byte_start":528,"byte_end":529,"line_start":18,"line_end":18,"column_start":11,"column_end":12,"is_primary":true,"text":[{"text":" if (_b) {","highlight_start":11,"highlight_end":12}],"label":null,"suggested_replacement":"","suggestion_applicability":"MachineApplicable","expansion":null}],"children":[],"rendered":null}],"rendered":"error: unnecessary parentheses around `if` condition --> $DIR/unused_parens_remove_json_suggestion.rs:18:8 | LL | if (_b) { @@ -16,7 +16,7 @@ LL + if _b { | "} -{"$message_type":"diagnostic","message":"unnecessary parentheses around `if` condition","code":{"code":"unused_parens","explanation":null},"level":"error","spans":[{"file_name":"$DIR/unused_parens_remove_json_suggestion.rs","byte_start":619,"byte_end":620,"line_start":29,"line_end":29,"column_start":7,"column_end":8,"is_primary":true,"text":[{"text":" if(c) {","highlight_start":7,"highlight_end":8}],"label":null,"suggested_replacement":null,"suggestion_applicability":null,"expansion":null},{"file_name":"$DIR/unused_parens_remove_json_suggestion.rs","byte_start":621,"byte_end":622,"line_start":29,"line_end":29,"column_start":9,"column_end":10,"is_primary":true,"text":[{"text":" if(c) {","highlight_start":9,"highlight_end":10}],"label":null,"suggested_replacement":null,"suggestion_applicability":null,"expansion":null}],"children":[{"message":"remove these parentheses","code":null,"level":"help","spans":[{"file_name":"$DIR/unused_parens_remove_json_suggestion.rs","byte_start":619,"byte_end":620,"line_start":29,"line_end":29,"column_start":7,"column_end":8,"is_primary":true,"text":[{"text":" if(c) {","highlight_start":7,"highlight_end":8}],"label":null,"suggested_replacement":" ","suggestion_applicability":"MachineApplicable","expansion":null},{"file_name":"$DIR/unused_parens_remove_json_suggestion.rs","byte_start":621,"byte_end":622,"line_start":29,"line_end":29,"column_start":9,"column_end":10,"is_primary":true,"text":[{"text":" if(c) {","highlight_start":9,"highlight_end":10}],"label":null,"suggested_replacement":"","suggestion_applicability":"MachineApplicable","expansion":null}],"children":[],"rendered":null}],"rendered":"error: unnecessary parentheses around `if` condition +{"$message_type":"diagnostic","message":"unnecessary parentheses around `if` condition","code":{"code":"unused_parens","explanation":null},"level":"error","spans":[{"file_name":"$DIR/unused_parens_remove_json_suggestion.rs","byte_start":622,"byte_end":623,"line_start":29,"line_end":29,"column_start":7,"column_end":8,"is_primary":true,"text":[{"text":" if(c) {","highlight_start":7,"highlight_end":8}],"label":null,"suggested_replacement":null,"suggestion_applicability":null,"expansion":null},{"file_name":"$DIR/unused_parens_remove_json_suggestion.rs","byte_start":624,"byte_end":625,"line_start":29,"line_end":29,"column_start":9,"column_end":10,"is_primary":true,"text":[{"text":" if(c) {","highlight_start":9,"highlight_end":10}],"label":null,"suggested_replacement":null,"suggestion_applicability":null,"expansion":null}],"children":[{"message":"remove these parentheses","code":null,"level":"help","spans":[{"file_name":"$DIR/unused_parens_remove_json_suggestion.rs","byte_start":622,"byte_end":623,"line_start":29,"line_end":29,"column_start":7,"column_end":8,"is_primary":true,"text":[{"text":" if(c) {","highlight_start":7,"highlight_end":8}],"label":null,"suggested_replacement":" ","suggestion_applicability":"MachineApplicable","expansion":null},{"file_name":"$DIR/unused_parens_remove_json_suggestion.rs","byte_start":624,"byte_end":625,"line_start":29,"line_end":29,"column_start":9,"column_end":10,"is_primary":true,"text":[{"text":" if(c) {","highlight_start":9,"highlight_end":10}],"label":null,"suggested_replacement":"","suggestion_applicability":"MachineApplicable","expansion":null}],"children":[],"rendered":null}],"rendered":"error: unnecessary parentheses around `if` condition --> $DIR/unused_parens_remove_json_suggestion.rs:29:7 | LL | if(c) { @@ -29,7 +29,7 @@ LL + if c { | "} -{"$message_type":"diagnostic","message":"unnecessary parentheses around `if` condition","code":{"code":"unused_parens","explanation":null},"level":"error","spans":[{"file_name":"$DIR/unused_parens_remove_json_suggestion.rs","byte_start":665,"byte_end":666,"line_start":33,"line_end":33,"column_start":8,"column_end":9,"is_primary":true,"text":[{"text":" if (c){","highlight_start":8,"highlight_end":9}],"label":null,"suggested_replacement":null,"suggestion_applicability":null,"expansion":null},{"file_name":"$DIR/unused_parens_remove_json_suggestion.rs","byte_start":667,"byte_end":668,"line_start":33,"line_end":33,"column_start":10,"column_end":11,"is_primary":true,"text":[{"text":" if (c){","highlight_start":10,"highlight_end":11}],"label":null,"suggested_replacement":null,"suggestion_applicability":null,"expansion":null}],"children":[{"message":"remove these parentheses","code":null,"level":"help","spans":[{"file_name":"$DIR/unused_parens_remove_json_suggestion.rs","byte_start":665,"byte_end":666,"line_start":33,"line_end":33,"column_start":8,"column_end":9,"is_primary":true,"text":[{"text":" if (c){","highlight_start":8,"highlight_end":9}],"label":null,"suggested_replacement":"","suggestion_applicability":"MachineApplicable","expansion":null},{"file_name":"$DIR/unused_parens_remove_json_suggestion.rs","byte_start":667,"byte_end":668,"line_start":33,"line_end":33,"column_start":10,"column_end":11,"is_primary":true,"text":[{"text":" if (c){","highlight_start":10,"highlight_end":11}],"label":null,"suggested_replacement":" ","suggestion_applicability":"MachineApplicable","expansion":null}],"children":[],"rendered":null}],"rendered":"error: unnecessary parentheses around `if` condition +{"$message_type":"diagnostic","message":"unnecessary parentheses around `if` condition","code":{"code":"unused_parens","explanation":null},"level":"error","spans":[{"file_name":"$DIR/unused_parens_remove_json_suggestion.rs","byte_start":668,"byte_end":669,"line_start":33,"line_end":33,"column_start":8,"column_end":9,"is_primary":true,"text":[{"text":" if (c){","highlight_start":8,"highlight_end":9}],"label":null,"suggested_replacement":null,"suggestion_applicability":null,"expansion":null},{"file_name":"$DIR/unused_parens_remove_json_suggestion.rs","byte_start":670,"byte_end":671,"line_start":33,"line_end":33,"column_start":10,"column_end":11,"is_primary":true,"text":[{"text":" if (c){","highlight_start":10,"highlight_end":11}],"label":null,"suggested_replacement":null,"suggestion_applicability":null,"expansion":null}],"children":[{"message":"remove these parentheses","code":null,"level":"help","spans":[{"file_name":"$DIR/unused_parens_remove_json_suggestion.rs","byte_start":668,"byte_end":669,"line_start":33,"line_end":33,"column_start":8,"column_end":9,"is_primary":true,"text":[{"text":" if (c){","highlight_start":8,"highlight_end":9}],"label":null,"suggested_replacement":"","suggestion_applicability":"MachineApplicable","expansion":null},{"file_name":"$DIR/unused_parens_remove_json_suggestion.rs","byte_start":670,"byte_end":671,"line_start":33,"line_end":33,"column_start":10,"column_end":11,"is_primary":true,"text":[{"text":" if (c){","highlight_start":10,"highlight_end":11}],"label":null,"suggested_replacement":" ","suggestion_applicability":"MachineApplicable","expansion":null}],"children":[],"rendered":null}],"rendered":"error: unnecessary parentheses around `if` condition --> $DIR/unused_parens_remove_json_suggestion.rs:33:8 | LL | if (c){ @@ -42,7 +42,7 @@ LL + if c { | "} -{"$message_type":"diagnostic","message":"unnecessary parentheses around `while` condition","code":{"code":"unused_parens","explanation":null},"level":"error","spans":[{"file_name":"$DIR/unused_parens_remove_json_suggestion.rs","byte_start":713,"byte_end":714,"line_start":37,"line_end":37,"column_start":11,"column_end":12,"is_primary":true,"text":[{"text":" while (false && true){","highlight_start":11,"highlight_end":12}],"label":null,"suggested_replacement":null,"suggestion_applicability":null,"expansion":null},{"file_name":"$DIR/unused_parens_remove_json_suggestion.rs","byte_start":727,"byte_end":728,"line_start":37,"line_end":37,"column_start":25,"column_end":26,"is_primary":true,"text":[{"text":" while (false && true){","highlight_start":25,"highlight_end":26}],"label":null,"suggested_replacement":null,"suggestion_applicability":null,"expansion":null}],"children":[{"message":"remove these parentheses","code":null,"level":"help","spans":[{"file_name":"$DIR/unused_parens_remove_json_suggestion.rs","byte_start":713,"byte_end":714,"line_start":37,"line_end":37,"column_start":11,"column_end":12,"is_primary":true,"text":[{"text":" while (false && true){","highlight_start":11,"highlight_end":12}],"label":null,"suggested_replacement":"","suggestion_applicability":"MachineApplicable","expansion":null},{"file_name":"$DIR/unused_parens_remove_json_suggestion.rs","byte_start":727,"byte_end":728,"line_start":37,"line_end":37,"column_start":25,"column_end":26,"is_primary":true,"text":[{"text":" while (false && true){","highlight_start":25,"highlight_end":26}],"label":null,"suggested_replacement":" ","suggestion_applicability":"MachineApplicable","expansion":null}],"children":[],"rendered":null}],"rendered":"error: unnecessary parentheses around `while` condition +{"$message_type":"diagnostic","message":"unnecessary parentheses around `while` condition","code":{"code":"unused_parens","explanation":null},"level":"error","spans":[{"file_name":"$DIR/unused_parens_remove_json_suggestion.rs","byte_start":716,"byte_end":717,"line_start":37,"line_end":37,"column_start":11,"column_end":12,"is_primary":true,"text":[{"text":" while (false && true){","highlight_start":11,"highlight_end":12}],"label":null,"suggested_replacement":null,"suggestion_applicability":null,"expansion":null},{"file_name":"$DIR/unused_parens_remove_json_suggestion.rs","byte_start":730,"byte_end":731,"line_start":37,"line_end":37,"column_start":25,"column_end":26,"is_primary":true,"text":[{"text":" while (false && true){","highlight_start":25,"highlight_end":26}],"label":null,"suggested_replacement":null,"suggestion_applicability":null,"expansion":null}],"children":[{"message":"remove these parentheses","code":null,"level":"help","spans":[{"file_name":"$DIR/unused_parens_remove_json_suggestion.rs","byte_start":716,"byte_end":717,"line_start":37,"line_end":37,"column_start":11,"column_end":12,"is_primary":true,"text":[{"text":" while (false && true){","highlight_start":11,"highlight_end":12}],"label":null,"suggested_replacement":"","suggestion_applicability":"MachineApplicable","expansion":null},{"file_name":"$DIR/unused_parens_remove_json_suggestion.rs","byte_start":730,"byte_end":731,"line_start":37,"line_end":37,"column_start":25,"column_end":26,"is_primary":true,"text":[{"text":" while (false && true){","highlight_start":25,"highlight_end":26}],"label":null,"suggested_replacement":" ","suggestion_applicability":"MachineApplicable","expansion":null}],"children":[],"rendered":null}],"rendered":"error: unnecessary parentheses around `while` condition --> $DIR/unused_parens_remove_json_suggestion.rs:37:11 | LL | while (false && true){ @@ -55,7 +55,7 @@ LL + while false && true { | "} -{"$message_type":"diagnostic","message":"unnecessary parentheses around `if` condition","code":{"code":"unused_parens","explanation":null},"level":"error","spans":[{"file_name":"$DIR/unused_parens_remove_json_suggestion.rs","byte_start":741,"byte_end":742,"line_start":38,"line_end":38,"column_start":12,"column_end":13,"is_primary":true,"text":[{"text":" if (c) {","highlight_start":12,"highlight_end":13}],"label":null,"suggested_replacement":null,"suggestion_applicability":null,"expansion":null},{"file_name":"$DIR/unused_parens_remove_json_suggestion.rs","byte_start":743,"byte_end":744,"line_start":38,"line_end":38,"column_start":14,"column_end":15,"is_primary":true,"text":[{"text":" if (c) {","highlight_start":14,"highlight_end":15}],"label":null,"suggested_replacement":null,"suggestion_applicability":null,"expansion":null}],"children":[{"message":"remove these parentheses","code":null,"level":"help","spans":[{"file_name":"$DIR/unused_parens_remove_json_suggestion.rs","byte_start":741,"byte_end":742,"line_start":38,"line_end":38,"column_start":12,"column_end":13,"is_primary":true,"text":[{"text":" if (c) {","highlight_start":12,"highlight_end":13}],"label":null,"suggested_replacement":"","suggestion_applicability":"MachineApplicable","expansion":null},{"file_name":"$DIR/unused_parens_remove_json_suggestion.rs","byte_start":743,"byte_end":744,"line_start":38,"line_end":38,"column_start":14,"column_end":15,"is_primary":true,"text":[{"text":" if (c) {","highlight_start":14,"highlight_end":15}],"label":null,"suggested_replacement":"","suggestion_applicability":"MachineApplicable","expansion":null}],"children":[],"rendered":null}],"rendered":"error: unnecessary parentheses around `if` condition +{"$message_type":"diagnostic","message":"unnecessary parentheses around `if` condition","code":{"code":"unused_parens","explanation":null},"level":"error","spans":[{"file_name":"$DIR/unused_parens_remove_json_suggestion.rs","byte_start":744,"byte_end":745,"line_start":38,"line_end":38,"column_start":12,"column_end":13,"is_primary":true,"text":[{"text":" if (c) {","highlight_start":12,"highlight_end":13}],"label":null,"suggested_replacement":null,"suggestion_applicability":null,"expansion":null},{"file_name":"$DIR/unused_parens_remove_json_suggestion.rs","byte_start":746,"byte_end":747,"line_start":38,"line_end":38,"column_start":14,"column_end":15,"is_primary":true,"text":[{"text":" if (c) {","highlight_start":14,"highlight_end":15}],"label":null,"suggested_replacement":null,"suggestion_applicability":null,"expansion":null}],"children":[{"message":"remove these parentheses","code":null,"level":"help","spans":[{"file_name":"$DIR/unused_parens_remove_json_suggestion.rs","byte_start":744,"byte_end":745,"line_start":38,"line_end":38,"column_start":12,"column_end":13,"is_primary":true,"text":[{"text":" if (c) {","highlight_start":12,"highlight_end":13}],"label":null,"suggested_replacement":"","suggestion_applicability":"MachineApplicable","expansion":null},{"file_name":"$DIR/unused_parens_remove_json_suggestion.rs","byte_start":746,"byte_end":747,"line_start":38,"line_end":38,"column_start":14,"column_end":15,"is_primary":true,"text":[{"text":" if (c) {","highlight_start":14,"highlight_end":15}],"label":null,"suggested_replacement":"","suggestion_applicability":"MachineApplicable","expansion":null}],"children":[],"rendered":null}],"rendered":"error: unnecessary parentheses around `if` condition --> $DIR/unused_parens_remove_json_suggestion.rs:38:12 | LL | if (c) { @@ -68,7 +68,7 @@ LL + if c { | "} -{"$message_type":"diagnostic","message":"unnecessary parentheses around `while` condition","code":{"code":"unused_parens","explanation":null},"level":"error","spans":[{"file_name":"$DIR/unused_parens_remove_json_suggestion.rs","byte_start":804,"byte_end":805,"line_start":44,"line_end":44,"column_start":10,"column_end":11,"is_primary":true,"text":[{"text":" while(true && false) {","highlight_start":10,"highlight_end":11}],"label":null,"suggested_replacement":null,"suggestion_applicability":null,"expansion":null},{"file_name":"$DIR/unused_parens_remove_json_suggestion.rs","byte_start":818,"byte_end":819,"line_start":44,"line_end":44,"column_start":24,"column_end":25,"is_primary":true,"text":[{"text":" while(true && false) {","highlight_start":24,"highlight_end":25}],"label":null,"suggested_replacement":null,"suggestion_applicability":null,"expansion":null}],"children":[{"message":"remove these parentheses","code":null,"level":"help","spans":[{"file_name":"$DIR/unused_parens_remove_json_suggestion.rs","byte_start":804,"byte_end":805,"line_start":44,"line_end":44,"column_start":10,"column_end":11,"is_primary":true,"text":[{"text":" while(true && false) {","highlight_start":10,"highlight_end":11}],"label":null,"suggested_replacement":" ","suggestion_applicability":"MachineApplicable","expansion":null},{"file_name":"$DIR/unused_parens_remove_json_suggestion.rs","byte_start":818,"byte_end":819,"line_start":44,"line_end":44,"column_start":24,"column_end":25,"is_primary":true,"text":[{"text":" while(true && false) {","highlight_start":24,"highlight_end":25}],"label":null,"suggested_replacement":"","suggestion_applicability":"MachineApplicable","expansion":null}],"children":[],"rendered":null}],"rendered":"error: unnecessary parentheses around `while` condition +{"$message_type":"diagnostic","message":"unnecessary parentheses around `while` condition","code":{"code":"unused_parens","explanation":null},"level":"error","spans":[{"file_name":"$DIR/unused_parens_remove_json_suggestion.rs","byte_start":807,"byte_end":808,"line_start":44,"line_end":44,"column_start":10,"column_end":11,"is_primary":true,"text":[{"text":" while(true && false) {","highlight_start":10,"highlight_end":11}],"label":null,"suggested_replacement":null,"suggestion_applicability":null,"expansion":null},{"file_name":"$DIR/unused_parens_remove_json_suggestion.rs","byte_start":821,"byte_end":822,"line_start":44,"line_end":44,"column_start":24,"column_end":25,"is_primary":true,"text":[{"text":" while(true && false) {","highlight_start":24,"highlight_end":25}],"label":null,"suggested_replacement":null,"suggestion_applicability":null,"expansion":null}],"children":[{"message":"remove these parentheses","code":null,"level":"help","spans":[{"file_name":"$DIR/unused_parens_remove_json_suggestion.rs","byte_start":807,"byte_end":808,"line_start":44,"line_end":44,"column_start":10,"column_end":11,"is_primary":true,"text":[{"text":" while(true && false) {","highlight_start":10,"highlight_end":11}],"label":null,"suggested_replacement":" ","suggestion_applicability":"MachineApplicable","expansion":null},{"file_name":"$DIR/unused_parens_remove_json_suggestion.rs","byte_start":821,"byte_end":822,"line_start":44,"line_end":44,"column_start":24,"column_end":25,"is_primary":true,"text":[{"text":" while(true && false) {","highlight_start":24,"highlight_end":25}],"label":null,"suggested_replacement":"","suggestion_applicability":"MachineApplicable","expansion":null}],"children":[],"rendered":null}],"rendered":"error: unnecessary parentheses around `while` condition --> $DIR/unused_parens_remove_json_suggestion.rs:44:10 | LL | while(true && false) { @@ -81,7 +81,7 @@ LL + while true && false { | "} -{"$message_type":"diagnostic","message":"unnecessary parentheses around `for` iterator expression","code":{"code":"unused_parens","explanation":null},"level":"error","spans":[{"file_name":"$DIR/unused_parens_remove_json_suggestion.rs","byte_start":839,"byte_end":840,"line_start":45,"line_end":45,"column_start":18,"column_end":19,"is_primary":true,"text":[{"text":" for _ in (0 .. 3){","highlight_start":18,"highlight_end":19}],"label":null,"suggested_replacement":null,"suggestion_applicability":null,"expansion":null},{"file_name":"$DIR/unused_parens_remove_json_suggestion.rs","byte_start":846,"byte_end":847,"line_start":45,"line_end":45,"column_start":25,"column_end":26,"is_primary":true,"text":[{"text":" for _ in (0 .. 3){","highlight_start":25,"highlight_end":26}],"label":null,"suggested_replacement":null,"suggestion_applicability":null,"expansion":null}],"children":[{"message":"remove these parentheses","code":null,"level":"help","spans":[{"file_name":"$DIR/unused_parens_remove_json_suggestion.rs","byte_start":839,"byte_end":840,"line_start":45,"line_end":45,"column_start":18,"column_end":19,"is_primary":true,"text":[{"text":" for _ in (0 .. 3){","highlight_start":18,"highlight_end":19}],"label":null,"suggested_replacement":"","suggestion_applicability":"MachineApplicable","expansion":null},{"file_name":"$DIR/unused_parens_remove_json_suggestion.rs","byte_start":846,"byte_end":847,"line_start":45,"line_end":45,"column_start":25,"column_end":26,"is_primary":true,"text":[{"text":" for _ in (0 .. 3){","highlight_start":25,"highlight_end":26}],"label":null,"suggested_replacement":" ","suggestion_applicability":"MachineApplicable","expansion":null}],"children":[],"rendered":null}],"rendered":"error: unnecessary parentheses around `for` iterator expression +{"$message_type":"diagnostic","message":"unnecessary parentheses around `for` iterator expression","code":{"code":"unused_parens","explanation":null},"level":"error","spans":[{"file_name":"$DIR/unused_parens_remove_json_suggestion.rs","byte_start":842,"byte_end":843,"line_start":45,"line_end":45,"column_start":18,"column_end":19,"is_primary":true,"text":[{"text":" for _ in (0 .. 3){","highlight_start":18,"highlight_end":19}],"label":null,"suggested_replacement":null,"suggestion_applicability":null,"expansion":null},{"file_name":"$DIR/unused_parens_remove_json_suggestion.rs","byte_start":849,"byte_end":850,"line_start":45,"line_end":45,"column_start":25,"column_end":26,"is_primary":true,"text":[{"text":" for _ in (0 .. 3){","highlight_start":25,"highlight_end":26}],"label":null,"suggested_replacement":null,"suggestion_applicability":null,"expansion":null}],"children":[{"message":"remove these parentheses","code":null,"level":"help","spans":[{"file_name":"$DIR/unused_parens_remove_json_suggestion.rs","byte_start":842,"byte_end":843,"line_start":45,"line_end":45,"column_start":18,"column_end":19,"is_primary":true,"text":[{"text":" for _ in (0 .. 3){","highlight_start":18,"highlight_end":19}],"label":null,"suggested_replacement":"","suggestion_applicability":"MachineApplicable","expansion":null},{"file_name":"$DIR/unused_parens_remove_json_suggestion.rs","byte_start":849,"byte_end":850,"line_start":45,"line_end":45,"column_start":25,"column_end":26,"is_primary":true,"text":[{"text":" for _ in (0 .. 3){","highlight_start":25,"highlight_end":26}],"label":null,"suggested_replacement":" ","suggestion_applicability":"MachineApplicable","expansion":null}],"children":[],"rendered":null}],"rendered":"error: unnecessary parentheses around `for` iterator expression --> $DIR/unused_parens_remove_json_suggestion.rs:45:18 | LL | for _ in (0 .. 3){ @@ -94,7 +94,7 @@ LL + for _ in 0 .. 3 { | "} -{"$message_type":"diagnostic","message":"unnecessary parentheses around `for` iterator expression","code":{"code":"unused_parens","explanation":null},"level":"error","spans":[{"file_name":"$DIR/unused_parens_remove_json_suggestion.rs","byte_start":906,"byte_end":907,"line_start":50,"line_end":50,"column_start":14,"column_end":15,"is_primary":true,"text":[{"text":" for _ in (0 .. 3) {","highlight_start":14,"highlight_end":15}],"label":null,"suggested_replacement":null,"suggestion_applicability":null,"expansion":null},{"file_name":"$DIR/unused_parens_remove_json_suggestion.rs","byte_start":913,"byte_end":914,"line_start":50,"line_end":50,"column_start":21,"column_end":22,"is_primary":true,"text":[{"text":" for _ in (0 .. 3) {","highlight_start":21,"highlight_end":22}],"label":null,"suggested_replacement":null,"suggestion_applicability":null,"expansion":null}],"children":[{"message":"remove these parentheses","code":null,"level":"help","spans":[{"file_name":"$DIR/unused_parens_remove_json_suggestion.rs","byte_start":906,"byte_end":907,"line_start":50,"line_end":50,"column_start":14,"column_end":15,"is_primary":true,"text":[{"text":" for _ in (0 .. 3) {","highlight_start":14,"highlight_end":15}],"label":null,"suggested_replacement":"","suggestion_applicability":"MachineApplicable","expansion":null},{"file_name":"$DIR/unused_parens_remove_json_suggestion.rs","byte_start":913,"byte_end":914,"line_start":50,"line_end":50,"column_start":21,"column_end":22,"is_primary":true,"text":[{"text":" for _ in (0 .. 3) {","highlight_start":21,"highlight_end":22}],"label":null,"suggested_replacement":"","suggestion_applicability":"MachineApplicable","expansion":null}],"children":[],"rendered":null}],"rendered":"error: unnecessary parentheses around `for` iterator expression +{"$message_type":"diagnostic","message":"unnecessary parentheses around `for` iterator expression","code":{"code":"unused_parens","explanation":null},"level":"error","spans":[{"file_name":"$DIR/unused_parens_remove_json_suggestion.rs","byte_start":909,"byte_end":910,"line_start":50,"line_end":50,"column_start":14,"column_end":15,"is_primary":true,"text":[{"text":" for _ in (0 .. 3) {","highlight_start":14,"highlight_end":15}],"label":null,"suggested_replacement":null,"suggestion_applicability":null,"expansion":null},{"file_name":"$DIR/unused_parens_remove_json_suggestion.rs","byte_start":916,"byte_end":917,"line_start":50,"line_end":50,"column_start":21,"column_end":22,"is_primary":true,"text":[{"text":" for _ in (0 .. 3) {","highlight_start":21,"highlight_end":22}],"label":null,"suggested_replacement":null,"suggestion_applicability":null,"expansion":null}],"children":[{"message":"remove these parentheses","code":null,"level":"help","spans":[{"file_name":"$DIR/unused_parens_remove_json_suggestion.rs","byte_start":909,"byte_end":910,"line_start":50,"line_end":50,"column_start":14,"column_end":15,"is_primary":true,"text":[{"text":" for _ in (0 .. 3) {","highlight_start":14,"highlight_end":15}],"label":null,"suggested_replacement":"","suggestion_applicability":"MachineApplicable","expansion":null},{"file_name":"$DIR/unused_parens_remove_json_suggestion.rs","byte_start":916,"byte_end":917,"line_start":50,"line_end":50,"column_start":21,"column_end":22,"is_primary":true,"text":[{"text":" for _ in (0 .. 3) {","highlight_start":21,"highlight_end":22}],"label":null,"suggested_replacement":"","suggestion_applicability":"MachineApplicable","expansion":null}],"children":[],"rendered":null}],"rendered":"error: unnecessary parentheses around `for` iterator expression --> $DIR/unused_parens_remove_json_suggestion.rs:50:14 | LL | for _ in (0 .. 3) { @@ -107,7 +107,7 @@ LL + for _ in 0 .. 3 { | "} -{"$message_type":"diagnostic","message":"unnecessary parentheses around `while` condition","code":{"code":"unused_parens","explanation":null},"level":"error","spans":[{"file_name":"$DIR/unused_parens_remove_json_suggestion.rs","byte_start":931,"byte_end":932,"line_start":51,"line_end":51,"column_start":15,"column_end":16,"is_primary":true,"text":[{"text":" while (true && false) {","highlight_start":15,"highlight_end":16}],"label":null,"suggested_replacement":null,"suggestion_applicability":null,"expansion":null},{"file_name":"$DIR/unused_parens_remove_json_suggestion.rs","byte_start":945,"byte_end":946,"line_start":51,"line_end":51,"column_start":29,"column_end":30,"is_primary":true,"text":[{"text":" while (true && false) {","highlight_start":29,"highlight_end":30}],"label":null,"suggested_replacement":null,"suggestion_applicability":null,"expansion":null}],"children":[{"message":"remove these parentheses","code":null,"level":"help","spans":[{"file_name":"$DIR/unused_parens_remove_json_suggestion.rs","byte_start":931,"byte_end":932,"line_start":51,"line_end":51,"column_start":15,"column_end":16,"is_primary":true,"text":[{"text":" while (true && false) {","highlight_start":15,"highlight_end":16}],"label":null,"suggested_replacement":"","suggestion_applicability":"MachineApplicable","expansion":null},{"file_name":"$DIR/unused_parens_remove_json_suggestion.rs","byte_start":945,"byte_end":946,"line_start":51,"line_end":51,"column_start":29,"column_end":30,"is_primary":true,"text":[{"text":" while (true && false) {","highlight_start":29,"highlight_end":30}],"label":null,"suggested_replacement":"","suggestion_applicability":"MachineApplicable","expansion":null}],"children":[],"rendered":null}],"rendered":"error: unnecessary parentheses around `while` condition +{"$message_type":"diagnostic","message":"unnecessary parentheses around `while` condition","code":{"code":"unused_parens","explanation":null},"level":"error","spans":[{"file_name":"$DIR/unused_parens_remove_json_suggestion.rs","byte_start":934,"byte_end":935,"line_start":51,"line_end":51,"column_start":15,"column_end":16,"is_primary":true,"text":[{"text":" while (true && false) {","highlight_start":15,"highlight_end":16}],"label":null,"suggested_replacement":null,"suggestion_applicability":null,"expansion":null},{"file_name":"$DIR/unused_parens_remove_json_suggestion.rs","byte_start":948,"byte_end":949,"line_start":51,"line_end":51,"column_start":29,"column_end":30,"is_primary":true,"text":[{"text":" while (true && false) {","highlight_start":29,"highlight_end":30}],"label":null,"suggested_replacement":null,"suggestion_applicability":null,"expansion":null}],"children":[{"message":"remove these parentheses","code":null,"level":"help","spans":[{"file_name":"$DIR/unused_parens_remove_json_suggestion.rs","byte_start":934,"byte_end":935,"line_start":51,"line_end":51,"column_start":15,"column_end":16,"is_primary":true,"text":[{"text":" while (true && false) {","highlight_start":15,"highlight_end":16}],"label":null,"suggested_replacement":"","suggestion_applicability":"MachineApplicable","expansion":null},{"file_name":"$DIR/unused_parens_remove_json_suggestion.rs","byte_start":948,"byte_end":949,"line_start":51,"line_end":51,"column_start":29,"column_end":30,"is_primary":true,"text":[{"text":" while (true && false) {","highlight_start":29,"highlight_end":30}],"label":null,"suggested_replacement":"","suggestion_applicability":"MachineApplicable","expansion":null}],"children":[],"rendered":null}],"rendered":"error: unnecessary parentheses around `while` condition --> $DIR/unused_parens_remove_json_suggestion.rs:51:15 | LL | while (true && false) { diff --git a/tests/ui/lint/unused_variables-issue-82488.fixed b/tests/ui/lint/unused_variables-issue-82488.fixed index 3cb2c90d0d3..e5a22a22291 100644 --- a/tests/ui/lint/unused_variables-issue-82488.fixed +++ b/tests/ui/lint/unused_variables-issue-82488.fixed @@ -1,4 +1,4 @@ -// run-rustfix +//@ run-rustfix #![deny(unused_variables)] struct Point { diff --git a/tests/ui/lint/unused_variables-issue-82488.rs b/tests/ui/lint/unused_variables-issue-82488.rs index 007b0799bbb..a0b9ac1078d 100644 --- a/tests/ui/lint/unused_variables-issue-82488.rs +++ b/tests/ui/lint/unused_variables-issue-82488.rs @@ -1,4 +1,4 @@ -// run-rustfix +//@ run-rustfix #![deny(unused_variables)] struct Point { diff --git a/tests/ui/lint/use-redundant/issue-92904.rs b/tests/ui/lint/use-redundant/issue-92904.rs index 511d9d263cf..a767ef7a772 100644 --- a/tests/ui/lint/use-redundant/issue-92904.rs +++ b/tests/ui/lint/use-redundant/issue-92904.rs @@ -1,4 +1,4 @@ -// check-pass +//@ check-pass pub struct Foo(bar::Bar); diff --git a/tests/ui/lint/use-redundant/use-redundant-glob-parent.rs b/tests/ui/lint/use-redundant/use-redundant-glob-parent.rs index 6b1e018d2dc..28d1fea98b5 100644 --- a/tests/ui/lint/use-redundant/use-redundant-glob-parent.rs +++ b/tests/ui/lint/use-redundant/use-redundant-glob-parent.rs @@ -1,4 +1,4 @@ -// check-pass +//@ check-pass #![warn(unused_imports)] pub mod bar { diff --git a/tests/ui/lint/use-redundant/use-redundant-glob.rs b/tests/ui/lint/use-redundant/use-redundant-glob.rs index bd9e51b6f59..3d3fe2579b5 100644 --- a/tests/ui/lint/use-redundant/use-redundant-glob.rs +++ b/tests/ui/lint/use-redundant/use-redundant-glob.rs @@ -1,4 +1,4 @@ -// check-pass +//@ check-pass #![warn(unused_imports)] pub mod bar { diff --git a/tests/ui/lint/use-redundant/use-redundant-multiple-namespaces.rs b/tests/ui/lint/use-redundant/use-redundant-multiple-namespaces.rs index 0fb60840f8a..7c8db645361 100644 --- a/tests/ui/lint/use-redundant/use-redundant-multiple-namespaces.rs +++ b/tests/ui/lint/use-redundant/use-redundant-multiple-namespaces.rs @@ -1,4 +1,4 @@ -// check-pass +//@ check-pass #![allow(nonstandard_style)] pub mod bar { diff --git a/tests/ui/lint/use-redundant/use-redundant-not-parent.rs b/tests/ui/lint/use-redundant/use-redundant-not-parent.rs index c97a3d34163..fd08fcc3773 100644 --- a/tests/ui/lint/use-redundant/use-redundant-not-parent.rs +++ b/tests/ui/lint/use-redundant/use-redundant-not-parent.rs @@ -1,4 +1,4 @@ -// check-pass +//@ check-pass pub mod bar { pub struct Foo(pub Bar); diff --git a/tests/ui/lint/use-redundant/use-redundant.rs b/tests/ui/lint/use-redundant/use-redundant.rs index 53315dcf638..88d3ee75a3f 100644 --- a/tests/ui/lint/use-redundant/use-redundant.rs +++ b/tests/ui/lint/use-redundant/use-redundant.rs @@ -1,4 +1,4 @@ -// check-pass +//@ check-pass #![warn(unused_imports)] use crate::foo::Bar; diff --git a/tests/ui/lint/use_suggestion_json.rs b/tests/ui/lint/use_suggestion_json.rs index 6a947f14302..1a797c71bf4 100644 --- a/tests/ui/lint/use_suggestion_json.rs +++ b/tests/ui/lint/use_suggestion_json.rs @@ -1,6 +1,6 @@ -// ignore-windows -// ignore-sgx std::os::fortanix_sgx::usercalls::alloc::Iter changes compiler suggestions -// compile-flags: --error-format pretty-json --json=diagnostic-rendered-ansi -Z unstable-options +//@ ignore-windows +//@ ignore-sgx std::os::fortanix_sgx::usercalls::alloc::Iter changes compiler suggestions +//@ compile-flags: --error-format pretty-json --json=diagnostic-rendered-ansi -Z unstable-options // The output for humans should just highlight the whole span without showing // the suggested replacement, but we also want to test that suggested diff --git a/tests/ui/lint/use_suggestion_json.stderr b/tests/ui/lint/use_suggestion_json.stderr index b3c973680b7..16fb1682d4a 100644 --- a/tests/ui/lint/use_suggestion_json.stderr +++ b/tests/ui/lint/use_suggestion_json.stderr @@ -73,8 +73,8 @@ mod foo { "spans": [ { "file_name": "$DIR/use_suggestion_json.rs", - "byte_start": 561, - "byte_end": 565, + "byte_start": 564, + "byte_end": 568, "line_start": 12, "line_end": 12, "column_start": 12, @@ -101,8 +101,8 @@ mod foo { "spans": [ { "file_name": "$DIR/use_suggestion_json.rs", - "byte_start": 538, - "byte_end": 538, + "byte_start": 541, + "byte_end": 541, "line_start": 11, "line_end": 11, "column_start": 1, @@ -124,8 +124,8 @@ mod foo { }, { "file_name": "$DIR/use_suggestion_json.rs", - "byte_start": 538, - "byte_end": 538, + "byte_start": 541, + "byte_end": 541, "line_start": 11, "line_end": 11, "column_start": 1, @@ -147,8 +147,8 @@ mod foo { }, { "file_name": "$DIR/use_suggestion_json.rs", - "byte_start": 538, - "byte_end": 538, + "byte_start": 541, + "byte_end": 541, "line_start": 11, "line_end": 11, "column_start": 1, @@ -170,8 +170,8 @@ mod foo { }, { "file_name": "$DIR/use_suggestion_json.rs", - "byte_start": 538, - "byte_end": 538, + "byte_start": 541, + "byte_end": 541, "line_start": 11, "line_end": 11, "column_start": 1, @@ -193,8 +193,8 @@ mod foo { }, { "file_name": "$DIR/use_suggestion_json.rs", - "byte_start": 538, - "byte_end": 538, + "byte_start": 541, + "byte_end": 541, "line_start": 11, "line_end": 11, "column_start": 1, @@ -216,8 +216,8 @@ mod foo { }, { "file_name": "$DIR/use_suggestion_json.rs", - "byte_start": 538, - "byte_end": 538, + "byte_start": 541, + "byte_end": 541, "line_start": 11, "line_end": 11, "column_start": 1, @@ -239,8 +239,8 @@ mod foo { }, { "file_name": "$DIR/use_suggestion_json.rs", - "byte_start": 538, - "byte_end": 538, + "byte_start": 541, + "byte_end": 541, "line_start": 11, "line_end": 11, "column_start": 1, @@ -262,8 +262,8 @@ mod foo { }, { "file_name": "$DIR/use_suggestion_json.rs", - "byte_start": 538, - "byte_end": 538, + "byte_start": 541, + "byte_end": 541, "line_start": 11, "line_end": 11, "column_start": 1, @@ -285,8 +285,8 @@ mod foo { }, { "file_name": "$DIR/use_suggestion_json.rs", - "byte_start": 538, - "byte_end": 538, + "byte_start": 541, + "byte_end": 541, "line_start": 11, "line_end": 11, "column_start": 1, @@ -308,8 +308,8 @@ mod foo { }, { "file_name": "$DIR/use_suggestion_json.rs", - "byte_start": 538, - "byte_end": 538, + "byte_start": 541, + "byte_end": 541, "line_start": 11, "line_end": 11, "column_start": 1, @@ -331,8 +331,8 @@ mod foo { }, { "file_name": "$DIR/use_suggestion_json.rs", - "byte_start": 538, - "byte_end": 538, + "byte_start": 541, + "byte_end": 541, "line_start": 11, "line_end": 11, "column_start": 1, @@ -354,8 +354,8 @@ mod foo { }, { "file_name": "$DIR/use_suggestion_json.rs", - "byte_start": 538, - "byte_end": 538, + "byte_start": 541, + "byte_end": 541, "line_start": 11, "line_end": 11, "column_start": 1, diff --git a/tests/ui/lint/warn-ctypes-inhibit.rs b/tests/ui/lint/warn-ctypes-inhibit.rs index 15d8b09d2ec..e3952dd0049 100644 --- a/tests/ui/lint/warn-ctypes-inhibit.rs +++ b/tests/ui/lint/warn-ctypes-inhibit.rs @@ -1,9 +1,9 @@ -// run-pass +//@ run-pass #![allow(dead_code)] -// compile-flags:-D improper-ctypes +//@ compile-flags:-D improper-ctypes -// pretty-expanded FIXME #23616 +//@ pretty-expanded FIXME #23616 #![allow(improper_ctypes)] mod libc { diff --git a/tests/ui/lint/warn-path-statement.rs b/tests/ui/lint/warn-path-statement.rs index 2435be623f3..dc78aeb51ed 100644 --- a/tests/ui/lint/warn-path-statement.rs +++ b/tests/ui/lint/warn-path-statement.rs @@ -1,4 +1,4 @@ -// compile-flags: -D path-statements +//@ compile-flags: -D path-statements struct Droppy; impl Drop for Droppy { diff --git a/tests/ui/lint/wide_pointer_comparisons.rs b/tests/ui/lint/wide_pointer_comparisons.rs index 961b998c956..37807776d2f 100644 --- a/tests/ui/lint/wide_pointer_comparisons.rs +++ b/tests/ui/lint/wide_pointer_comparisons.rs @@ -1,4 +1,4 @@ -// check-pass +//@ check-pass use std::rc::Rc; use std::sync::Arc; diff --git a/tests/ui/list.rs b/tests/ui/list.rs index e44c94b3219..7e5c2d8548b 100644 --- a/tests/ui/list.rs +++ b/tests/ui/list.rs @@ -1,7 +1,7 @@ -// run-pass +//@ run-pass #![allow(non_camel_case_types)] -// pretty-expanded FIXME #23616 +//@ pretty-expanded FIXME #23616 enum list { #[allow(dead_code)] cons(isize, Box), nil, } diff --git a/tests/ui/liveness/liveness-asm.rs b/tests/ui/liveness/liveness-asm.rs index ea5f033cb86..7169292b7ba 100644 --- a/tests/ui/liveness/liveness-asm.rs +++ b/tests/ui/liveness/liveness-asm.rs @@ -1,7 +1,7 @@ // Ensure inout asm! operands are marked as used by the liveness pass -// only-x86_64 -// check-pass +//@ only-x86_64 +//@ check-pass #![allow(dead_code)] #![warn(unused_assignments)] diff --git a/tests/ui/liveness/liveness-assign-imm-local-after-ret.rs b/tests/ui/liveness/liveness-assign-imm-local-after-ret.rs index b463f4368d1..298181e5529 100644 --- a/tests/ui/liveness/liveness-assign-imm-local-after-ret.rs +++ b/tests/ui/liveness/liveness-assign-imm-local-after-ret.rs @@ -1,7 +1,7 @@ -// run-pass +//@ run-pass #![allow(unreachable_code)] -// pretty-expanded FIXME #23616 +//@ pretty-expanded FIXME #23616 #![allow(dead_code)] diff --git a/tests/ui/liveness/liveness-consts.rs b/tests/ui/liveness/liveness-consts.rs index 8fe2453ca22..40d30fb9113 100644 --- a/tests/ui/liveness/liveness-consts.rs +++ b/tests/ui/liveness/liveness-consts.rs @@ -1,4 +1,4 @@ -// check-pass +//@ check-pass #![warn(unused)] #![allow(unreachable_code)] diff --git a/tests/ui/liveness/liveness-derive.rs b/tests/ui/liveness/liveness-derive.rs index 1921d0d72bc..99eb249d00d 100644 --- a/tests/ui/liveness/liveness-derive.rs +++ b/tests/ui/liveness/liveness-derive.rs @@ -1,8 +1,8 @@ // Test for interaction between #[automatically_derived] attribute used by // built-in derives and lints generated by liveness pass. // -// edition:2018 -// check-pass +//@ edition:2018 +//@ check-pass #![warn(unused)] pub trait T: Sized { diff --git a/tests/ui/liveness/liveness-upvars.rs b/tests/ui/liveness/liveness-upvars.rs index 17158dfbc6c..7898b978882 100644 --- a/tests/ui/liveness/liveness-upvars.rs +++ b/tests/ui/liveness/liveness-upvars.rs @@ -1,5 +1,5 @@ -// edition:2018 -// check-pass +//@ edition:2018 +//@ check-pass #![feature(coroutines)] #![warn(unused)] #![allow(unreachable_code)] diff --git a/tests/ui/log-err-phi.rs b/tests/ui/log-err-phi.rs index c0e04d2c973..1bb97758782 100644 --- a/tests/ui/log-err-phi.rs +++ b/tests/ui/log-err-phi.rs @@ -1,4 +1,4 @@ -// run-pass +//@ run-pass pub fn main() { if false { diff --git a/tests/ui/log-knows-the-names-of-variants.rs b/tests/ui/log-knows-the-names-of-variants.rs index cf2876b6eee..cb82cb4878a 100644 --- a/tests/ui/log-knows-the-names-of-variants.rs +++ b/tests/ui/log-knows-the-names-of-variants.rs @@ -1,4 +1,4 @@ -// run-pass +//@ run-pass #![allow(non_camel_case_types)] #![allow(dead_code)] diff --git a/tests/ui/log-poly.rs b/tests/ui/log-poly.rs index 14e1b40e168..64994a55817 100644 --- a/tests/ui/log-poly.rs +++ b/tests/ui/log-poly.rs @@ -1,4 +1,4 @@ -// run-pass +//@ run-pass #[derive(Debug)] enum Numbers { diff --git a/tests/ui/logging-only-prints-once.rs b/tests/ui/logging-only-prints-once.rs index 6d16819ceb0..75ef0a274ee 100644 --- a/tests/ui/logging-only-prints-once.rs +++ b/tests/ui/logging-only-prints-once.rs @@ -1,6 +1,6 @@ -// run-pass -// ignore-windows -// ignore-emscripten no threads support +//@ run-pass +//@ ignore-windows +//@ ignore-emscripten no threads support use std::cell::Cell; use std::fmt; diff --git a/tests/ui/loops/dont-suggest-break-thru-item.rs b/tests/ui/loops/dont-suggest-break-thru-item.rs index 308101115e5..34a9a57bfed 100644 --- a/tests/ui/loops/dont-suggest-break-thru-item.rs +++ b/tests/ui/loops/dont-suggest-break-thru-item.rs @@ -1,4 +1,4 @@ -// edition:2021 +//@ edition:2021 #![feature(inline_const)] diff --git a/tests/ui/loops/for-each-loop-panic.rs b/tests/ui/loops/for-each-loop-panic.rs index 5156999f4db..04784cac8f2 100644 --- a/tests/ui/loops/for-each-loop-panic.rs +++ b/tests/ui/loops/for-each-loop-panic.rs @@ -1,6 +1,6 @@ -// run-fail -// error-pattern:moop -// ignore-emscripten no processes +//@ run-fail +//@ error-pattern:moop +//@ ignore-emscripten no processes fn main() { for _ in 0_usize..10_usize { diff --git a/tests/ui/loops/issue-69225-SCEVAddExpr-wrap-flag.rs b/tests/ui/loops/issue-69225-SCEVAddExpr-wrap-flag.rs index 6e030f1cc48..881c9e88c46 100644 --- a/tests/ui/loops/issue-69225-SCEVAddExpr-wrap-flag.rs +++ b/tests/ui/loops/issue-69225-SCEVAddExpr-wrap-flag.rs @@ -1,8 +1,8 @@ -// run-fail -// compile-flags: -C opt-level=3 -// error-pattern: index out of bounds: the len is 0 but the index is 16777216 -// ignore-wasm no panic or subprocess support -// ignore-emscripten no panic or subprocess support +//@ run-fail +//@ compile-flags: -C opt-level=3 +//@ error-pattern: index out of bounds: the len is 0 but the index is 16777216 +//@ ignore-wasm no panic or subprocess support +//@ ignore-emscripten no panic or subprocess support fn do_test(x: usize) { let mut arr = vec![vec![0u8; 3]]; diff --git a/tests/ui/loops/issue-69225-layout-repeated-checked-add.rs b/tests/ui/loops/issue-69225-layout-repeated-checked-add.rs index 7f43e4d1a51..9a85d1b01eb 100644 --- a/tests/ui/loops/issue-69225-layout-repeated-checked-add.rs +++ b/tests/ui/loops/issue-69225-layout-repeated-checked-add.rs @@ -1,11 +1,11 @@ // Ensure we appropriately error instead of overflowing a calculation when creating a new Alloc // Layout -// run-fail -// compile-flags: -C opt-level=3 -// error-pattern: index out of bounds: the len is 0 but the index is 16777216 -// ignore-wasm no panic or subprocess support -// ignore-emscripten no panic or subprocess support +//@ run-fail +//@ compile-flags: -C opt-level=3 +//@ error-pattern: index out of bounds: the len is 0 but the index is 16777216 +//@ ignore-wasm no panic or subprocess support +//@ ignore-emscripten no panic or subprocess support fn do_test(x: usize) { let arr = vec![vec![0u8; 3]]; diff --git a/tests/ui/loops/loop-break-unsize.rs b/tests/ui/loops/loop-break-unsize.rs index 974c63cea85..634acab8d47 100644 --- a/tests/ui/loops/loop-break-unsize.rs +++ b/tests/ui/loops/loop-break-unsize.rs @@ -1,5 +1,5 @@ // Regression test for #62312 -// check-pass +//@ check-pass fn main() { let _ = loop { diff --git a/tests/ui/loud_ui.rs b/tests/ui/loud_ui.rs index 6a151fa49f8..2a73e49e172 100644 --- a/tests/ui/loud_ui.rs +++ b/tests/ui/loud_ui.rs @@ -1,4 +1,4 @@ -// should-fail +//@ should-fail // this test ensures that when we forget to use // any `//~ ERROR` comments whatsoever, that the test doesn't succeed diff --git a/tests/ui/lowering/issue-96847.rs b/tests/ui/lowering/issue-96847.rs index 2aa34c8b335..9408f6b9b4a 100644 --- a/tests/ui/lowering/issue-96847.rs +++ b/tests/ui/lowering/issue-96847.rs @@ -1,4 +1,4 @@ -// run-pass +//@ run-pass // Test that this doesn't abort during AST lowering. In #96847 it did abort // because the attribute was being lowered twice. diff --git a/tests/ui/lto/all-crates.rs b/tests/ui/lto/all-crates.rs index e910b2a9f96..ceabf9f05df 100644 --- a/tests/ui/lto/all-crates.rs +++ b/tests/ui/lto/all-crates.rs @@ -1,7 +1,7 @@ -// run-pass +//@ run-pass -// compile-flags: -Clto=thin -// no-prefer-dynamic +//@ compile-flags: -Clto=thin +//@ no-prefer-dynamic fn main() { println!("hello!"); diff --git a/tests/ui/lto/auxiliary/debuginfo-lto-aux.rs b/tests/ui/lto/auxiliary/debuginfo-lto-aux.rs index dd471154b4f..ff7a42d8797 100644 --- a/tests/ui/lto/auxiliary/debuginfo-lto-aux.rs +++ b/tests/ui/lto/auxiliary/debuginfo-lto-aux.rs @@ -1,4 +1,4 @@ -// compile-flags: -g --crate-type=rlib +//@ compile-flags: -g --crate-type=rlib pub struct StructWithLifetime<'a>(&'a i32); pub fn mk_struct_with_lt<'a>(x: &'a i32) -> StructWithLifetime<'a> { diff --git a/tests/ui/lto/auxiliary/dylib.rs b/tests/ui/lto/auxiliary/dylib.rs index e8b7f8f9f47..f4c8d0b6065 100644 --- a/tests/ui/lto/auxiliary/dylib.rs +++ b/tests/ui/lto/auxiliary/dylib.rs @@ -1,4 +1,4 @@ -// compile-flags: -Z thinlto -C codegen-units=8 +//@ compile-flags: -Z thinlto -C codegen-units=8 #[inline] pub fn foo(b: u8) { diff --git a/tests/ui/lto/auxiliary/lto-duplicate-symbols1.rs b/tests/ui/lto/auxiliary/lto-duplicate-symbols1.rs index ec6d0560357..7b518d466af 100644 --- a/tests/ui/lto/auxiliary/lto-duplicate-symbols1.rs +++ b/tests/ui/lto/auxiliary/lto-duplicate-symbols1.rs @@ -1,4 +1,4 @@ -// no-prefer-dynamic +//@ no-prefer-dynamic #![crate_type = "rlib"] diff --git a/tests/ui/lto/auxiliary/lto-duplicate-symbols2.rs b/tests/ui/lto/auxiliary/lto-duplicate-symbols2.rs index ec6d0560357..7b518d466af 100644 --- a/tests/ui/lto/auxiliary/lto-duplicate-symbols2.rs +++ b/tests/ui/lto/auxiliary/lto-duplicate-symbols2.rs @@ -1,4 +1,4 @@ -// no-prefer-dynamic +//@ no-prefer-dynamic #![crate_type = "rlib"] diff --git a/tests/ui/lto/auxiliary/lto-rustc-loads-linker-plugin.rs b/tests/ui/lto/auxiliary/lto-rustc-loads-linker-plugin.rs index d24375b2d0a..cc5665a52a1 100644 --- a/tests/ui/lto/auxiliary/lto-rustc-loads-linker-plugin.rs +++ b/tests/ui/lto/auxiliary/lto-rustc-loads-linker-plugin.rs @@ -1,5 +1,5 @@ -// compile-flags: -Clinker-plugin-lto -// no-prefer-dynamic +//@ compile-flags: -Clinker-plugin-lto +//@ no-prefer-dynamic #![crate_type = "rlib"] diff --git a/tests/ui/lto/auxiliary/msvc-imp-present.rs b/tests/ui/lto/auxiliary/msvc-imp-present.rs index 933af050a6a..55e349d3203 100644 --- a/tests/ui/lto/auxiliary/msvc-imp-present.rs +++ b/tests/ui/lto/auxiliary/msvc-imp-present.rs @@ -1,5 +1,5 @@ -// no-prefer-dynamic -// compile-flags: -Z thinlto -C codegen-units=8 -C prefer-dynamic +//@ no-prefer-dynamic +//@ compile-flags: -Z thinlto -C codegen-units=8 -C prefer-dynamic #![crate_type = "rlib"] #![crate_type = "dylib"] diff --git a/tests/ui/lto/auxiliary/thin-lto-inlines-aux.rs b/tests/ui/lto/auxiliary/thin-lto-inlines-aux.rs index 5fd3f1996dd..aae450f41ed 100644 --- a/tests/ui/lto/auxiliary/thin-lto-inlines-aux.rs +++ b/tests/ui/lto/auxiliary/thin-lto-inlines-aux.rs @@ -1,4 +1,4 @@ -// no-prefer-dynamic +//@ no-prefer-dynamic #![crate_type = "rlib"] diff --git a/tests/ui/lto/auxiliary/thinlto-dylib.rs b/tests/ui/lto/auxiliary/thinlto-dylib.rs index 9d17c35dafc..716ec2ed980 100644 --- a/tests/ui/lto/auxiliary/thinlto-dylib.rs +++ b/tests/ui/lto/auxiliary/thinlto-dylib.rs @@ -4,7 +4,7 @@ // This simulates the `rustc_driver` crate, and the main crate simulates rustc's main binary hooking // into this driver. -// compile-flags: -Zdylib-lto -C lto=thin +//@ compile-flags: -Zdylib-lto -C lto=thin use std::panic; diff --git a/tests/ui/lto/debuginfo-lto.rs b/tests/ui/lto/debuginfo-lto.rs index e4beee9e737..f189a1df056 100644 --- a/tests/ui/lto/debuginfo-lto.rs +++ b/tests/ui/lto/debuginfo-lto.rs @@ -1,12 +1,12 @@ -// run-pass +//@ run-pass // This test case makes sure that we don't run into LLVM's dreaded // "possible ODR violation" assertion when compiling with LTO + Debuginfo. // It covers cases that have traditionally been prone to cause this error. // If new cases emerge, add them to this file. -// aux-build:debuginfo-lto-aux.rs -// compile-flags: -C lto -g -// no-prefer-dynamic +//@ aux-build:debuginfo-lto-aux.rs +//@ compile-flags: -C lto -g +//@ no-prefer-dynamic extern crate debuginfo_lto_aux; diff --git a/tests/ui/lto/dylib-works.rs b/tests/ui/lto/dylib-works.rs index 9e0782b590e..51f1ac4ab14 100644 --- a/tests/ui/lto/dylib-works.rs +++ b/tests/ui/lto/dylib-works.rs @@ -1,6 +1,6 @@ -// run-pass +//@ run-pass -// aux-build:dylib.rs +//@ aux-build:dylib.rs extern crate dylib; diff --git a/tests/ui/lto/fat-lto.rs b/tests/ui/lto/fat-lto.rs index c8d8095a265..73d6801a25a 100644 --- a/tests/ui/lto/fat-lto.rs +++ b/tests/ui/lto/fat-lto.rs @@ -1,6 +1,6 @@ -// run-pass -// compile-flags: -Clto=fat -// no-prefer-dynamic +//@ run-pass +//@ compile-flags: -Clto=fat +//@ no-prefer-dynamic fn main() { println!("hello!"); diff --git a/tests/ui/lto/issue-100772.rs b/tests/ui/lto/issue-100772.rs index eeb51196236..29ec5b9bf96 100644 --- a/tests/ui/lto/issue-100772.rs +++ b/tests/ui/lto/issue-100772.rs @@ -1,8 +1,8 @@ -// build-pass -// needs-sanitizer-cfi -// compile-flags: -Ccodegen-units=1 -Clto -Ctarget-feature=-crt-static -Zsanitizer=cfi -// no-prefer-dynamic -// only-x86_64-unknown-linux-gnu +//@ build-pass +//@ needs-sanitizer-cfi +//@ compile-flags: -Ccodegen-units=1 -Clto -Ctarget-feature=-crt-static -Zsanitizer=cfi +//@ no-prefer-dynamic +//@ only-x86_64-unknown-linux-gnu #![feature(allocator_api)] diff --git a/tests/ui/lto/issue-105637.rs b/tests/ui/lto/issue-105637.rs index 0d9f0bec00f..2cc70964b4c 100644 --- a/tests/ui/lto/issue-105637.rs +++ b/tests/ui/lto/issue-105637.rs @@ -9,9 +9,9 @@ // In this test, we reproduce this setup by installing a panic hook in both the main and an LTOed // dylib: the last hook set should be the one being executed, the dylib's. -// aux-build: thinlto-dylib.rs -// run-fail -// check-run-results +//@ aux-build: thinlto-dylib.rs +//@ run-fail +//@ check-run-results extern crate thinlto_dylib; diff --git a/tests/ui/lto/issue-11154.rs b/tests/ui/lto/issue-11154.rs index e11cdc82f32..914b0b73e47 100644 --- a/tests/ui/lto/issue-11154.rs +++ b/tests/ui/lto/issue-11154.rs @@ -1,6 +1,6 @@ -// build-fail -// compile-flags: -C lto -C prefer-dynamic +//@ build-fail +//@ compile-flags: -C lto -C prefer-dynamic -// error-pattern: cannot prefer dynamic linking +//@ error-pattern: cannot prefer dynamic linking fn main() {} diff --git a/tests/ui/lto/lto-and-no-bitcode-in-rlib.rs b/tests/ui/lto/lto-and-no-bitcode-in-rlib.rs index f381240e70a..f742cd78697 100644 --- a/tests/ui/lto/lto-and-no-bitcode-in-rlib.rs +++ b/tests/ui/lto/lto-and-no-bitcode-in-rlib.rs @@ -1,3 +1,3 @@ -// compile-flags: -C lto -C embed-bitcode=no +//@ compile-flags: -C lto -C embed-bitcode=no fn main() {} diff --git a/tests/ui/lto/lto-duplicate-symbols.rs b/tests/ui/lto/lto-duplicate-symbols.rs index e540094a3ec..679d44baae7 100644 --- a/tests/ui/lto/lto-duplicate-symbols.rs +++ b/tests/ui/lto/lto-duplicate-symbols.rs @@ -1,10 +1,10 @@ -// build-fail -// aux-build:lto-duplicate-symbols1.rs -// aux-build:lto-duplicate-symbols2.rs -// error-pattern:Linking globals named 'foo': symbol multiply defined! -// compile-flags: -C lto -// no-prefer-dynamic -// normalize-stderr-test: "lto-duplicate-symbols2\.lto_duplicate_symbols2\.[0-9a-zA-Z]+-cgu" -> "lto-duplicate-symbols2.lto_duplicate_symbols2.HASH-cgu" +//@ build-fail +//@ aux-build:lto-duplicate-symbols1.rs +//@ aux-build:lto-duplicate-symbols2.rs +//@ error-pattern:Linking globals named 'foo': symbol multiply defined! +//@ compile-flags: -C lto +//@ no-prefer-dynamic +//@ normalize-stderr-test: "lto-duplicate-symbols2\.lto_duplicate_symbols2\.[0-9a-zA-Z]+-cgu" -> "lto-duplicate-symbols2.lto_duplicate_symbols2.HASH-cgu" extern crate lto_duplicate_symbols1; extern crate lto_duplicate_symbols2; diff --git a/tests/ui/lto/lto-many-codegen-units.rs b/tests/ui/lto/lto-many-codegen-units.rs index f0f461ffec8..fb6636fb815 100644 --- a/tests/ui/lto/lto-many-codegen-units.rs +++ b/tests/ui/lto/lto-many-codegen-units.rs @@ -1,6 +1,6 @@ -// run-pass -// compile-flags: -C lto -C codegen-units=8 -// no-prefer-dynamic +//@ run-pass +//@ compile-flags: -C lto -C codegen-units=8 +//@ no-prefer-dynamic fn main() { } diff --git a/tests/ui/lto/lto-opt-level-s.rs b/tests/ui/lto/lto-opt-level-s.rs index a7d9d5024d3..9b8592b47d2 100644 --- a/tests/ui/lto/lto-opt-level-s.rs +++ b/tests/ui/lto/lto-opt-level-s.rs @@ -1,6 +1,6 @@ -// compile-flags: -Clinker-plugin-lto -Copt-level=s -// build-pass -// no-prefer-dynamic +//@ compile-flags: -Clinker-plugin-lto -Copt-level=s +//@ build-pass +//@ no-prefer-dynamic #![crate_type = "rlib"] diff --git a/tests/ui/lto/lto-opt-level-z.rs b/tests/ui/lto/lto-opt-level-z.rs index bf1f5e2b263..1d063f146cb 100644 --- a/tests/ui/lto/lto-opt-level-z.rs +++ b/tests/ui/lto/lto-opt-level-z.rs @@ -1,6 +1,6 @@ -// compile-flags: -Clinker-plugin-lto -Copt-level=z -// build-pass -// no-prefer-dynamic +//@ compile-flags: -Clinker-plugin-lto -Copt-level=z +//@ build-pass +//@ no-prefer-dynamic #![crate_type = "rlib"] diff --git a/tests/ui/lto/lto-rustc-loads-linker-plugin.rs b/tests/ui/lto/lto-rustc-loads-linker-plugin.rs index 6ef1d4540b8..18e937cb29a 100644 --- a/tests/ui/lto/lto-rustc-loads-linker-plugin.rs +++ b/tests/ui/lto/lto-rustc-loads-linker-plugin.rs @@ -1,7 +1,7 @@ -// compile-flags: -C lto -// aux-build:lto-rustc-loads-linker-plugin.rs -// run-pass -// no-prefer-dynamic +//@ compile-flags: -C lto +//@ aux-build:lto-rustc-loads-linker-plugin.rs +//@ run-pass +//@ no-prefer-dynamic // This test ensures that if a dependency was compiled with // `-Clinker-plugin-lto` then we can compile with `-Clto` and still link against diff --git a/tests/ui/lto/lto-still-runs-thread-dtors.rs b/tests/ui/lto/lto-still-runs-thread-dtors.rs index 635ad783b31..a93d7cf35cc 100644 --- a/tests/ui/lto/lto-still-runs-thread-dtors.rs +++ b/tests/ui/lto/lto-still-runs-thread-dtors.rs @@ -1,7 +1,7 @@ -// run-pass -// compile-flags: -C lto -// no-prefer-dynamic -// ignore-emscripten no threads support +//@ run-pass +//@ compile-flags: -C lto +//@ no-prefer-dynamic +//@ ignore-emscripten no threads support use std::thread; diff --git a/tests/ui/lto/lto-thin-rustc-loads-linker-plugin.rs b/tests/ui/lto/lto-thin-rustc-loads-linker-plugin.rs index 4d54ce32fb5..a38d0e2b2e3 100644 --- a/tests/ui/lto/lto-thin-rustc-loads-linker-plugin.rs +++ b/tests/ui/lto/lto-thin-rustc-loads-linker-plugin.rs @@ -1,7 +1,7 @@ -// compile-flags: -C lto=thin -// aux-build:lto-rustc-loads-linker-plugin.rs -// run-pass -// no-prefer-dynamic +//@ compile-flags: -C lto=thin +//@ aux-build:lto-rustc-loads-linker-plugin.rs +//@ run-pass +//@ no-prefer-dynamic // Same as the adjacent `lto-thin-rustc-loads-linker-plugin.rs` test, only with // ThinLTO. diff --git a/tests/ui/lto/msvc-imp-present.rs b/tests/ui/lto/msvc-imp-present.rs index 5498afb2937..5125dbafe4a 100644 --- a/tests/ui/lto/msvc-imp-present.rs +++ b/tests/ui/lto/msvc-imp-present.rs @@ -1,8 +1,8 @@ -// run-pass +//@ run-pass -// aux-build:msvc-imp-present.rs -// compile-flags: -Z thinlto -C codegen-units=8 -// no-prefer-dynamic +//@ aux-build:msvc-imp-present.rs +//@ compile-flags: -Z thinlto -C codegen-units=8 +//@ no-prefer-dynamic // On MSVC we have a "hack" where we emit symbols that look like `_imp_$name` // for all exported statics. This is done because we apply `dllimport` to all diff --git a/tests/ui/lto/thin-lto-global-allocator.rs b/tests/ui/lto/thin-lto-global-allocator.rs index e00c5caf97c..4ffd850a523 100644 --- a/tests/ui/lto/thin-lto-global-allocator.rs +++ b/tests/ui/lto/thin-lto-global-allocator.rs @@ -1,5 +1,5 @@ -// run-pass -// compile-flags: -Z thinlto -C codegen-units=2 +//@ run-pass +//@ compile-flags: -Z thinlto -C codegen-units=2 #[global_allocator] static A: std::alloc::System = std::alloc::System; diff --git a/tests/ui/lto/thin-lto-inlines.rs b/tests/ui/lto/thin-lto-inlines.rs index dca7918077e..eeaae5c4c25 100644 --- a/tests/ui/lto/thin-lto-inlines.rs +++ b/tests/ui/lto/thin-lto-inlines.rs @@ -1,7 +1,7 @@ -// run-pass +//@ run-pass -// compile-flags: -Z thinlto -C codegen-units=8 -O -// ignore-emscripten can't inspect instructions on emscripten +//@ compile-flags: -Z thinlto -C codegen-units=8 -O +//@ ignore-emscripten can't inspect instructions on emscripten // We want to assert here that ThinLTO will inline across codegen units. There's // not really a great way to do that in general so we sort of hack around it by diff --git a/tests/ui/lto/thin-lto-inlines2.rs b/tests/ui/lto/thin-lto-inlines2.rs index 1eb29657c70..735557ab491 100644 --- a/tests/ui/lto/thin-lto-inlines2.rs +++ b/tests/ui/lto/thin-lto-inlines2.rs @@ -1,9 +1,9 @@ -// run-pass +//@ run-pass -// compile-flags: -C codegen-units=8 -O -C lto=thin -// aux-build:thin-lto-inlines-aux.rs -// no-prefer-dynamic -// ignore-emscripten can't inspect instructions on emscripten +//@ compile-flags: -C codegen-units=8 -O -C lto=thin +//@ aux-build:thin-lto-inlines-aux.rs +//@ no-prefer-dynamic +//@ ignore-emscripten can't inspect instructions on emscripten // We want to assert here that ThinLTO will inline across codegen units. There's // not really a great way to do that in general so we sort of hack around it by diff --git a/tests/ui/lto/weak-works.rs b/tests/ui/lto/weak-works.rs index 163a3870248..00e10b97d60 100644 --- a/tests/ui/lto/weak-works.rs +++ b/tests/ui/lto/weak-works.rs @@ -1,7 +1,7 @@ -// run-pass +//@ run-pass -// compile-flags: -C codegen-units=8 -Z thinlto -// ignore-windows +//@ compile-flags: -C codegen-units=8 -Z thinlto +//@ ignore-windows #![feature(linkage)] diff --git a/tests/ui/lub-glb/empty-binder-future-compat.rs b/tests/ui/lub-glb/empty-binder-future-compat.rs index 8700a88a36e..aae1c917d12 100644 --- a/tests/ui/lub-glb/empty-binder-future-compat.rs +++ b/tests/ui/lub-glb/empty-binder-future-compat.rs @@ -1,4 +1,4 @@ -// check-pass +//@ check-pass fn lt_in_fn_fn<'a: 'a>() -> fn(fn(&'a ())) { |_| () } diff --git a/tests/ui/lub-glb/empty-binders.rs b/tests/ui/lub-glb/empty-binders.rs index f9d07e79fda..a3a5b47e7e0 100644 --- a/tests/ui/lub-glb/empty-binders.rs +++ b/tests/ui/lub-glb/empty-binders.rs @@ -1,4 +1,4 @@ -// check-pass +//@ check-pass // // Check that computing the lub works even for empty binders. fn lt<'a: 'a>() -> &'a () { diff --git a/tests/ui/lub-glb/old-lub-glb-hr-eq.rs b/tests/ui/lub-glb/old-lub-glb-hr-eq.rs index fbf4aee0204..97062ec91af 100644 --- a/tests/ui/lub-glb/old-lub-glb-hr-eq.rs +++ b/tests/ui/lub-glb/old-lub-glb-hr-eq.rs @@ -4,7 +4,7 @@ // longer get an error, because we recognize these two types as // equivalent! // -// check-pass +//@ check-pass fn foo(x: fn(&u8, &u8), y: for<'a> fn(&'a u8, &'a u8)) { // The two types above are actually equivalent. With the older diff --git a/tests/ui/lub-glb/old-lub-glb-hr-noteq1.rs b/tests/ui/lub-glb/old-lub-glb-hr-noteq1.rs index 589119abb9b..7a49d624a05 100644 --- a/tests/ui/lub-glb/old-lub-glb-hr-noteq1.rs +++ b/tests/ui/lub-glb/old-lub-glb-hr-noteq1.rs @@ -2,8 +2,8 @@ // general than the other. Test the case where the more general type (`x`) is the first // match arm specifically. -// revisions: leak noleak -//[noleak] compile-flags:-Zno-leak-check +//@ revisions: leak noleak +//@[noleak] compile-flags:-Zno-leak-check fn foo(x: for<'a, 'b> fn(&'a u8, &'b u8) -> &'a u8, y: for<'a> fn(&'a u8, &'a u8) -> &'a u8) { // The two types above are not equivalent. With the older LUB/GLB diff --git a/tests/ui/lub-glb/old-lub-glb-hr-noteq2.rs b/tests/ui/lub-glb/old-lub-glb-hr-noteq2.rs index 9940c40da81..0efbbc3ef65 100644 --- a/tests/ui/lub-glb/old-lub-glb-hr-noteq2.rs +++ b/tests/ui/lub-glb/old-lub-glb-hr-noteq2.rs @@ -11,10 +11,10 @@ // choose to make this always in error in the future - we perform the leak check // after coercing a function pointer. -// revisions: leak noleak -//[noleak] compile-flags: -Zno-leak-check +//@ revisions: leak noleak +//@[noleak] compile-flags: -Zno-leak-check -//[noleak] check-pass +//@[noleak] check-pass fn foo(x: for<'a, 'b> fn(&'a u8, &'b u8) -> &'a u8, y: for<'a> fn(&'a u8, &'a u8) -> &'a u8) { // The two types above are not equivalent. With the older LUB/GLB diff --git a/tests/ui/macro_backtrace/main.rs b/tests/ui/macro_backtrace/main.rs index 6cee3b4cd96..e39cecb5938 100644 --- a/tests/ui/macro_backtrace/main.rs +++ b/tests/ui/macro_backtrace/main.rs @@ -1,7 +1,7 @@ // Test that the macro backtrace facility works -// aux-build:ping.rs -// revisions: default -Zmacro-backtrace -//[-Zmacro-backtrace] compile-flags: -Z macro-backtrace +//@ aux-build:ping.rs +//@ revisions: default -Zmacro-backtrace +//@[-Zmacro-backtrace] compile-flags: -Z macro-backtrace #[macro_use] extern crate ping; diff --git a/tests/ui/macros/assert-as-macro.rs b/tests/ui/macros/assert-as-macro.rs index 23c05480813..391b056292f 100644 --- a/tests/ui/macros/assert-as-macro.rs +++ b/tests/ui/macros/assert-as-macro.rs @@ -1,6 +1,6 @@ -// run-fail -// error-pattern:assertion failed: 1 == 2 -// ignore-emscripten no processes +//@ run-fail +//@ error-pattern:assertion failed: 1 == 2 +//@ ignore-emscripten no processes fn main() { assert!(1 == 2); diff --git a/tests/ui/macros/assert-eq-macro-msg.rs b/tests/ui/macros/assert-eq-macro-msg.rs index 3d921f40072..39eeefeeef9 100644 --- a/tests/ui/macros/assert-eq-macro-msg.rs +++ b/tests/ui/macros/assert-eq-macro-msg.rs @@ -1,8 +1,8 @@ -// run-fail -// error-pattern:assertion `left == right` failed: 1 + 1 definitely should be 3 -// error-pattern: left: 2 -// error-pattern: right: 3 -// ignore-emscripten no processes +//@ run-fail +//@ error-pattern:assertion `left == right` failed: 1 + 1 definitely should be 3 +//@ error-pattern: left: 2 +//@ error-pattern: right: 3 +//@ ignore-emscripten no processes fn main() { assert_eq!(1 + 1, 3, "1 + 1 definitely should be 3"); diff --git a/tests/ui/macros/assert-eq-macro-panic.rs b/tests/ui/macros/assert-eq-macro-panic.rs index 6745290cbfc..22c3a8a634f 100644 --- a/tests/ui/macros/assert-eq-macro-panic.rs +++ b/tests/ui/macros/assert-eq-macro-panic.rs @@ -1,8 +1,8 @@ -// run-fail -// error-pattern:assertion `left == right` failed -// error-pattern: left: 14 -// error-pattern: right: 15 -// ignore-emscripten no processes +//@ run-fail +//@ error-pattern:assertion `left == right` failed +//@ error-pattern: left: 14 +//@ error-pattern: right: 15 +//@ ignore-emscripten no processes fn main() { assert_eq!(14, 15); diff --git a/tests/ui/macros/assert-eq-macro-success.rs b/tests/ui/macros/assert-eq-macro-success.rs index 57858b34837..490cd9315b6 100644 --- a/tests/ui/macros/assert-eq-macro-success.rs +++ b/tests/ui/macros/assert-eq-macro-success.rs @@ -1,4 +1,4 @@ -// run-pass +//@ run-pass #[derive(PartialEq, Debug)] struct Point { x : isize } diff --git a/tests/ui/macros/assert-eq-macro-unsized.rs b/tests/ui/macros/assert-eq-macro-unsized.rs index 00823216bf6..243f04b67d7 100644 --- a/tests/ui/macros/assert-eq-macro-unsized.rs +++ b/tests/ui/macros/assert-eq-macro-unsized.rs @@ -1,4 +1,4 @@ -// run-pass +//@ run-pass pub fn main() { assert_eq!([1, 2, 3][..], vec![1, 2, 3][..]); } diff --git a/tests/ui/macros/assert-format-lazy.rs b/tests/ui/macros/assert-format-lazy.rs index c7f05d763b7..e0830660dd7 100644 --- a/tests/ui/macros/assert-format-lazy.rs +++ b/tests/ui/macros/assert-format-lazy.rs @@ -1,5 +1,5 @@ -// run-pass -// compile-flags: -C debug_assertions=yes +//@ run-pass +//@ compile-flags: -C debug_assertions=yes #[allow(unreachable_code)] fn main() { diff --git a/tests/ui/macros/assert-long-condition.rs b/tests/ui/macros/assert-long-condition.rs index 1974ec9d6db..424d566e439 100644 --- a/tests/ui/macros/assert-long-condition.rs +++ b/tests/ui/macros/assert-long-condition.rs @@ -1,7 +1,7 @@ -// run-fail -// check-run-results -// exec-env:RUST_BACKTRACE=0 -// ignore-emscripten no processes +//@ run-fail +//@ check-run-results +//@ exec-env:RUST_BACKTRACE=0 +//@ ignore-emscripten no processes // ignore-tidy-linelength fn main() { diff --git a/tests/ui/macros/assert-macro-explicit.rs b/tests/ui/macros/assert-macro-explicit.rs index 3d1a9a6b1ad..167581d2525 100644 --- a/tests/ui/macros/assert-macro-explicit.rs +++ b/tests/ui/macros/assert-macro-explicit.rs @@ -1,6 +1,6 @@ -// run-fail -// error-pattern:assertion failed: false -// ignore-emscripten no processes +//@ run-fail +//@ error-pattern:assertion failed: false +//@ ignore-emscripten no processes fn main() { assert!(false); diff --git a/tests/ui/macros/assert-macro-fmt.rs b/tests/ui/macros/assert-macro-fmt.rs index ceec53ceb9f..47554430379 100644 --- a/tests/ui/macros/assert-macro-fmt.rs +++ b/tests/ui/macros/assert-macro-fmt.rs @@ -1,7 +1,7 @@ -// run-fail -// error-pattern: panicked -// error-pattern: test-assert-fmt 42 rust -// ignore-emscripten no processes +//@ run-fail +//@ error-pattern: panicked +//@ error-pattern: test-assert-fmt 42 rust +//@ ignore-emscripten no processes fn main() { assert!(false, "test-assert-fmt {} {}", 42, "rust"); diff --git a/tests/ui/macros/assert-macro-owned.rs b/tests/ui/macros/assert-macro-owned.rs index fb4b389b80b..46a59db1390 100644 --- a/tests/ui/macros/assert-macro-owned.rs +++ b/tests/ui/macros/assert-macro-owned.rs @@ -1,7 +1,7 @@ -// run-fail -// error-pattern:panicked -// error-pattern:test-assert-owned -// ignore-emscripten no processes +//@ run-fail +//@ error-pattern:panicked +//@ error-pattern:test-assert-owned +//@ ignore-emscripten no processes #![allow(non_fmt_panics)] diff --git a/tests/ui/macros/assert-macro-static.rs b/tests/ui/macros/assert-macro-static.rs index fccc3259281..7d9e345d516 100644 --- a/tests/ui/macros/assert-macro-static.rs +++ b/tests/ui/macros/assert-macro-static.rs @@ -1,7 +1,7 @@ -// run-fail -// error-pattern:panicked -// error-pattern:test-assert-static -// ignore-emscripten no processes +//@ run-fail +//@ error-pattern:panicked +//@ error-pattern:test-assert-static +//@ ignore-emscripten no processes fn main() { assert!(false, "test-assert-static"); diff --git a/tests/ui/macros/assert-matches-macro-msg.rs b/tests/ui/macros/assert-matches-macro-msg.rs index 7af6a077843..efa4121da92 100644 --- a/tests/ui/macros/assert-matches-macro-msg.rs +++ b/tests/ui/macros/assert-matches-macro-msg.rs @@ -1,8 +1,8 @@ -// run-fail -// error-pattern:assertion `left matches right` failed: 1 + 1 definitely should be 3 -// error-pattern: left: 2 -// error-pattern: right: 3 -// ignore-emscripten no processes +//@ run-fail +//@ error-pattern:assertion `left matches right` failed: 1 + 1 definitely should be 3 +//@ error-pattern: left: 2 +//@ error-pattern: right: 3 +//@ ignore-emscripten no processes #![feature(assert_matches)] diff --git a/tests/ui/macros/assert-ne-macro-msg.rs b/tests/ui/macros/assert-ne-macro-msg.rs index adda0af88f2..0a578e1baf9 100644 --- a/tests/ui/macros/assert-ne-macro-msg.rs +++ b/tests/ui/macros/assert-ne-macro-msg.rs @@ -1,8 +1,8 @@ -// run-fail -// error-pattern:assertion `left != right` failed: 1 + 1 definitely should not be 2 -// error-pattern: left: 2 -// error-pattern: right: 2 -// ignore-emscripten no processes +//@ run-fail +//@ error-pattern:assertion `left != right` failed: 1 + 1 definitely should not be 2 +//@ error-pattern: left: 2 +//@ error-pattern: right: 2 +//@ ignore-emscripten no processes fn main() { assert_ne!(1 + 1, 2, "1 + 1 definitely should not be 2"); diff --git a/tests/ui/macros/assert-ne-macro-panic.rs b/tests/ui/macros/assert-ne-macro-panic.rs index d977473a2de..9cf5f05e9f1 100644 --- a/tests/ui/macros/assert-ne-macro-panic.rs +++ b/tests/ui/macros/assert-ne-macro-panic.rs @@ -1,8 +1,8 @@ -// run-fail -// error-pattern:assertion `left != right` failed -// error-pattern: left: 14 -// error-pattern: right: 14 -// ignore-emscripten no processes +//@ run-fail +//@ error-pattern:assertion `left != right` failed +//@ error-pattern: left: 14 +//@ error-pattern: right: 14 +//@ ignore-emscripten no processes fn main() { assert_ne!(14, 14); diff --git a/tests/ui/macros/assert-ne-macro-success.rs b/tests/ui/macros/assert-ne-macro-success.rs index 89b3a4c9d6a..4078bb07004 100644 --- a/tests/ui/macros/assert-ne-macro-success.rs +++ b/tests/ui/macros/assert-ne-macro-success.rs @@ -1,4 +1,4 @@ -// run-pass +//@ run-pass #[derive(PartialEq, Debug)] struct Point { x : isize } diff --git a/tests/ui/macros/assert-ne-macro-unsized.rs b/tests/ui/macros/assert-ne-macro-unsized.rs index e8a86e3da06..9938ac9d65b 100644 --- a/tests/ui/macros/assert-ne-macro-unsized.rs +++ b/tests/ui/macros/assert-ne-macro-unsized.rs @@ -1,4 +1,4 @@ -// run-pass +//@ run-pass pub fn main() { assert_ne!([6, 6, 6][..], vec![1, 2, 3][..]); } diff --git a/tests/ui/macros/assert-trailing-junk.rs b/tests/ui/macros/assert-trailing-junk.rs index da725e19e2a..16f68dfcf9b 100644 --- a/tests/ui/macros/assert-trailing-junk.rs +++ b/tests/ui/macros/assert-trailing-junk.rs @@ -1,5 +1,5 @@ -// revisions: with-generic-asset without-generic-asset -// [with-generic-asset] compile-flags: --cfg feature="generic_assert" +//@ revisions: with-generic-asset without-generic-asset +//@ [with-generic-asset] compile-flags: --cfg feature="generic_assert" // Ensure assert macro does not ignore trailing garbage. // diff --git a/tests/ui/macros/assert.rs b/tests/ui/macros/assert.rs index a314db907b8..4a8ea816747 100644 --- a/tests/ui/macros/assert.rs +++ b/tests/ui/macros/assert.rs @@ -1,5 +1,5 @@ -// revisions: with-generic-asset without-generic-asset -// [with-generic-asset] compile-flags: --cfg feature="generic_assert" +//@ revisions: with-generic-asset without-generic-asset +//@ [with-generic-asset] compile-flags: --cfg feature="generic_assert" fn main() { assert!(); //~ ERROR requires a boolean expression diff --git a/tests/ui/macros/attr-from-macro.rs b/tests/ui/macros/attr-from-macro.rs index bb3a5c94d41..b745599ffd4 100644 --- a/tests/ui/macros/attr-from-macro.rs +++ b/tests/ui/macros/attr-from-macro.rs @@ -1,5 +1,5 @@ -// aux-build:attr-from-macro.rs -// run-pass +//@ aux-build:attr-from-macro.rs +//@ run-pass extern crate attr_from_macro; diff --git a/tests/ui/macros/auxiliary/foreign-crate-macro-pat.rs b/tests/ui/macros/auxiliary/foreign-crate-macro-pat.rs index 26d4c96d524..1596f890bbb 100644 --- a/tests/ui/macros/auxiliary/foreign-crate-macro-pat.rs +++ b/tests/ui/macros/auxiliary/foreign-crate-macro-pat.rs @@ -1,4 +1,4 @@ -// edition:2018 +//@ edition:2018 #[macro_export] macro_rules! custom_matches { diff --git a/tests/ui/macros/auxiliary/hello_macro.rs b/tests/ui/macros/auxiliary/hello_macro.rs index a05b8d54dc1..10f474bd1b3 100644 --- a/tests/ui/macros/auxiliary/hello_macro.rs +++ b/tests/ui/macros/auxiliary/hello_macro.rs @@ -1,5 +1,5 @@ -// force-host -// no-prefer-dynamic +//@ force-host +//@ no-prefer-dynamic #![crate_type = "proc-macro"] #![feature(proc_macro_quote)] diff --git a/tests/ui/macros/auxiliary/issue-100199.rs b/tests/ui/macros/auxiliary/issue-100199.rs index 9e190b542db..9ee9a2f5039 100644 --- a/tests/ui/macros/auxiliary/issue-100199.rs +++ b/tests/ui/macros/auxiliary/issue-100199.rs @@ -1,5 +1,5 @@ -// force-host -// no-prefer-dynamic +//@ force-host +//@ no-prefer-dynamic #![crate_type = "proc-macro"] #![feature(proc_macro_quote)] diff --git a/tests/ui/macros/auxiliary/proc_macro_def.rs b/tests/ui/macros/auxiliary/proc_macro_def.rs index 0497e4ae07d..6574bf184fb 100644 --- a/tests/ui/macros/auxiliary/proc_macro_def.rs +++ b/tests/ui/macros/auxiliary/proc_macro_def.rs @@ -1,5 +1,5 @@ -// force-host -// no-prefer-dynamic +//@ force-host +//@ no-prefer-dynamic #![crate_type = "proc-macro"] #![feature(proc_macro_quote)] diff --git a/tests/ui/macros/auxiliary/proc_macro_sequence.rs b/tests/ui/macros/auxiliary/proc_macro_sequence.rs index 2f69cbc9450..de2efdfecf1 100644 --- a/tests/ui/macros/auxiliary/proc_macro_sequence.rs +++ b/tests/ui/macros/auxiliary/proc_macro_sequence.rs @@ -1,5 +1,5 @@ -// force-host -// no-prefer-dynamic +//@ force-host +//@ no-prefer-dynamic #![crate_type = "proc-macro"] #![feature(proc_macro_span, proc_macro_quote)] diff --git a/tests/ui/macros/bang-after-name.fixed b/tests/ui/macros/bang-after-name.fixed index c107ddd5d03..3cad1f9aa77 100644 --- a/tests/ui/macros/bang-after-name.fixed +++ b/tests/ui/macros/bang-after-name.fixed @@ -1,4 +1,4 @@ -// run-rustfix +//@ run-rustfix #[allow(unused_macros)] macro_rules! foo { //~ ERROR macro names aren't followed by a `!` diff --git a/tests/ui/macros/bang-after-name.rs b/tests/ui/macros/bang-after-name.rs index 7654d8c4403..26f88991050 100644 --- a/tests/ui/macros/bang-after-name.rs +++ b/tests/ui/macros/bang-after-name.rs @@ -1,4 +1,4 @@ -// run-rustfix +//@ run-rustfix #[allow(unused_macros)] macro_rules! foo! { //~ ERROR macro names aren't followed by a `!` diff --git a/tests/ui/macros/builtin-env-issue-114010.rs b/tests/ui/macros/builtin-env-issue-114010.rs index 819b8b1e8ab..29ccb79a64f 100644 --- a/tests/ui/macros/builtin-env-issue-114010.rs +++ b/tests/ui/macros/builtin-env-issue-114010.rs @@ -1,5 +1,5 @@ -// unset-rustc-env:oopsie -// unset-rustc-env:a""a +//@ unset-rustc-env:oopsie +//@ unset-rustc-env:a""a env![r#"oopsie"#]; //~^ ERROR environment variable `oopsie` not defined at compile time diff --git a/tests/ui/macros/builtin-std-paths.rs b/tests/ui/macros/builtin-std-paths.rs index 2083f9ba3dc..4612ef42487 100644 --- a/tests/ui/macros/builtin-std-paths.rs +++ b/tests/ui/macros/builtin-std-paths.rs @@ -1,4 +1,4 @@ -// check-pass +//@ check-pass #[derive( core::clone::Clone, diff --git a/tests/ui/macros/colorful-write-macros.rs b/tests/ui/macros/colorful-write-macros.rs index eb1872cc7f0..f20ca00b804 100644 --- a/tests/ui/macros/colorful-write-macros.rs +++ b/tests/ui/macros/colorful-write-macros.rs @@ -1,4 +1,4 @@ -// run-pass +//@ run-pass #![allow(dead_code)] use std::io::Write; use std::fmt; diff --git a/tests/ui/macros/concat-bytes.rs b/tests/ui/macros/concat-bytes.rs index fd8f99417ec..36227a712cc 100644 --- a/tests/ui/macros/concat-bytes.rs +++ b/tests/ui/macros/concat-bytes.rs @@ -1,4 +1,4 @@ -// run-pass +//@ run-pass #![feature(concat_bytes)] fn main() { diff --git a/tests/ui/macros/concat-rpass.rs b/tests/ui/macros/concat-rpass.rs index 0c30a39d6a2..3fbc80e0e99 100644 --- a/tests/ui/macros/concat-rpass.rs +++ b/tests/ui/macros/concat-rpass.rs @@ -1,4 +1,4 @@ -// run-pass +//@ run-pass pub fn main() { assert_eq!(format!(concat!("foo", "bar", "{}"), "baz"), "foobarbaz".to_string()); diff --git a/tests/ui/macros/conditional-debug-macro-on.rs b/tests/ui/macros/conditional-debug-macro-on.rs index 8665da89758..2b726378fba 100644 --- a/tests/ui/macros/conditional-debug-macro-on.rs +++ b/tests/ui/macros/conditional-debug-macro-on.rs @@ -1,4 +1,4 @@ -// run-pass +//@ run-pass pub fn main() { // exits early if println! evaluates its arguments, otherwise it // will hit the panic. diff --git a/tests/ui/macros/cross-crate-pat-span.rs b/tests/ui/macros/cross-crate-pat-span.rs index ed67142ce3d..cd4e791d2f9 100644 --- a/tests/ui/macros/cross-crate-pat-span.rs +++ b/tests/ui/macros/cross-crate-pat-span.rs @@ -1,6 +1,6 @@ -// edition:2021 -// check-pass -// aux-build: foreign-crate-macro-pat.rs +//@ edition:2021 +//@ check-pass +//@ aux-build: foreign-crate-macro-pat.rs // // Tests that the edition of the foreign crate is used // when determining the behavior of the `:pat` matcher. diff --git a/tests/ui/macros/die-macro-2.rs b/tests/ui/macros/die-macro-2.rs index ebbce528a18..e5456bdfca0 100644 --- a/tests/ui/macros/die-macro-2.rs +++ b/tests/ui/macros/die-macro-2.rs @@ -1,6 +1,6 @@ -// run-fail -// error-pattern:test -// ignore-emscripten no processes +//@ run-fail +//@ error-pattern:test +//@ ignore-emscripten no processes fn main() { panic!("test"); diff --git a/tests/ui/macros/die-macro-expr.rs b/tests/ui/macros/die-macro-expr.rs index c4b5f68ddf9..fb92dd66e3d 100644 --- a/tests/ui/macros/die-macro-expr.rs +++ b/tests/ui/macros/die-macro-expr.rs @@ -1,6 +1,6 @@ -// run-fail -// error-pattern:test -// ignore-emscripten no processes +//@ run-fail +//@ error-pattern:test +//@ ignore-emscripten no processes fn main() { let __isize: isize = panic!("test"); diff --git a/tests/ui/macros/die-macro-pure.rs b/tests/ui/macros/die-macro-pure.rs index 588fbe61b0e..484eed3d720 100644 --- a/tests/ui/macros/die-macro-pure.rs +++ b/tests/ui/macros/die-macro-pure.rs @@ -1,6 +1,6 @@ -// run-fail -// error-pattern:test -// ignore-emscripten no processes +//@ run-fail +//@ error-pattern:test +//@ ignore-emscripten no processes fn f() { panic!("test"); diff --git a/tests/ui/macros/die-macro.rs b/tests/ui/macros/die-macro.rs index 2a726efe822..b717eed3fb4 100644 --- a/tests/ui/macros/die-macro.rs +++ b/tests/ui/macros/die-macro.rs @@ -1,4 +1,4 @@ -// run-pass +//@ run-pass #![allow(dead_code)] // Just testing that panic!() type checks in statement or expr diff --git a/tests/ui/macros/doc-comment.rs b/tests/ui/macros/doc-comment.rs index 9de39e9b56c..577f1afa0df 100644 --- a/tests/ui/macros/doc-comment.rs +++ b/tests/ui/macros/doc-comment.rs @@ -1,4 +1,4 @@ -// check-pass +//@ check-pass // Tests that we properly handle a nested macro expansion // involving a `#[doc]` attribute #![deny(missing_docs)] diff --git a/tests/ui/macros/dollar-crate-nested-encoding.rs b/tests/ui/macros/dollar-crate-nested-encoding.rs index 5242f7830bb..b8a59339896 100644 --- a/tests/ui/macros/dollar-crate-nested-encoding.rs +++ b/tests/ui/macros/dollar-crate-nested-encoding.rs @@ -1,5 +1,5 @@ -// check-pass -// aux-build:dollar-crate-nested-encoding.rs +//@ check-pass +//@ aux-build:dollar-crate-nested-encoding.rs extern crate dollar_crate_nested_encoding; diff --git a/tests/ui/macros/duplicate-builtin.rs b/tests/ui/macros/duplicate-builtin.rs index 35f0f429059..c75782128f4 100644 --- a/tests/ui/macros/duplicate-builtin.rs +++ b/tests/ui/macros/duplicate-builtin.rs @@ -1,4 +1,4 @@ -// compile-flags:--crate-type lib +//@ compile-flags:--crate-type lib #![feature(decl_macro)] #![feature(rustc_attrs)] diff --git a/tests/ui/macros/edition-macro-pats.rs b/tests/ui/macros/edition-macro-pats.rs index 040894712a8..f5388e09c74 100644 --- a/tests/ui/macros/edition-macro-pats.rs +++ b/tests/ui/macros/edition-macro-pats.rs @@ -1,5 +1,5 @@ -// run-pass -// edition:2021 +//@ run-pass +//@ edition:2021 macro_rules! foo { (a $x:pat_param) => {}; diff --git a/tests/ui/macros/format-args-temporaries-async.rs b/tests/ui/macros/format-args-temporaries-async.rs index d959329b9fc..741844409ac 100644 --- a/tests/ui/macros/format-args-temporaries-async.rs +++ b/tests/ui/macros/format-args-temporaries-async.rs @@ -1,5 +1,5 @@ -// check-pass -// edition:2021 +//@ check-pass +//@ edition:2021 use std::fmt::{self, Display}; use std::future::Future; diff --git a/tests/ui/macros/format-args-temporaries-in-write.rs b/tests/ui/macros/format-args-temporaries-in-write.rs index 339ccbc33ac..b4c1e212221 100644 --- a/tests/ui/macros/format-args-temporaries-in-write.rs +++ b/tests/ui/macros/format-args-temporaries-in-write.rs @@ -1,4 +1,4 @@ -// check-fail +//@ check-fail use std::fmt::{self, Display}; diff --git a/tests/ui/macros/format-args-temporaries.rs b/tests/ui/macros/format-args-temporaries.rs index 1ff6e3f80d6..ad9792bc796 100644 --- a/tests/ui/macros/format-args-temporaries.rs +++ b/tests/ui/macros/format-args-temporaries.rs @@ -1,4 +1,4 @@ -// check-pass +//@ check-pass use std::fmt::{self, Display}; diff --git a/tests/ui/macros/html-literals.rs b/tests/ui/macros/html-literals.rs index e5ff425041a..b30de7b7ee6 100644 --- a/tests/ui/macros/html-literals.rs +++ b/tests/ui/macros/html-literals.rs @@ -1,4 +1,4 @@ -// run-pass +//@ run-pass #![allow(non_camel_case_types)] // A test of the macro system. Can we do HTML literals? diff --git a/tests/ui/macros/include-single-expr-helper-1.rs b/tests/ui/macros/include-single-expr-helper-1.rs index aa6380bd24d..ddeeb982f64 100644 --- a/tests/ui/macros/include-single-expr-helper-1.rs +++ b/tests/ui/macros/include-single-expr-helper-1.rs @@ -1,4 +1,4 @@ -// ignore-test auxiliary file for include-single-expr.rs +//@ ignore-test auxiliary file for include-single-expr.rs 0 diff --git a/tests/ui/macros/include-single-expr-helper.rs b/tests/ui/macros/include-single-expr-helper.rs index 84d8b69603b..e8ad9746b02 100644 --- a/tests/ui/macros/include-single-expr-helper.rs +++ b/tests/ui/macros/include-single-expr-helper.rs @@ -1,4 +1,4 @@ -// ignore-test auxiliary file for include-single-expr.rs +//@ ignore-test auxiliary file for include-single-expr.rs 0 10 diff --git a/tests/ui/macros/include-single-expr.rs b/tests/ui/macros/include-single-expr.rs index 0f4c29ec014..c501f5d97ca 100644 --- a/tests/ui/macros/include-single-expr.rs +++ b/tests/ui/macros/include-single-expr.rs @@ -1,4 +1,4 @@ -// error-pattern include macro expected single expression +//@ error-pattern include macro expected single expression fn main() { include!("include-single-expr-helper.rs"); diff --git a/tests/ui/macros/issue-100199.rs b/tests/ui/macros/issue-100199.rs index 6e50afa0759..b1bcc535d74 100644 --- a/tests/ui/macros/issue-100199.rs +++ b/tests/ui/macros/issue-100199.rs @@ -5,7 +5,7 @@ struct Foo {} // an unexpected dummy span (lo == 0 == hi) while attempting to print a // suggestion. -// aux-build: issue-100199.rs +//@ aux-build: issue-100199.rs extern crate issue_100199; diff --git a/tests/ui/macros/issue-112342-2.rs b/tests/ui/macros/issue-112342-2.rs index e797aff94d2..6387fd42435 100644 --- a/tests/ui/macros/issue-112342-2.rs +++ b/tests/ui/macros/issue-112342-2.rs @@ -1,4 +1,4 @@ -// check-pass +//@ check-pass // same as #95267, ignore doc comment although it's a bug. diff --git a/tests/ui/macros/issue-118786.rs b/tests/ui/macros/issue-118786.rs index 84af3a65113..cc6c751813b 100644 --- a/tests/ui/macros/issue-118786.rs +++ b/tests/ui/macros/issue-118786.rs @@ -1,4 +1,4 @@ -// compile-flags: --crate-type lib -O -C debug-assertions=yes +//@ compile-flags: --crate-type lib -O -C debug-assertions=yes // Regression test for issue 118786 diff --git a/tests/ui/macros/issue-19163.rs b/tests/ui/macros/issue-19163.rs index d98c5912af2..e08bd6e393b 100644 --- a/tests/ui/macros/issue-19163.rs +++ b/tests/ui/macros/issue-19163.rs @@ -1,4 +1,4 @@ -// aux-build:issue-19163.rs +//@ aux-build:issue-19163.rs #[macro_use] extern crate issue_19163; diff --git a/tests/ui/macros/issue-22463.rs b/tests/ui/macros/issue-22463.rs index 8f7b27cb9a0..efb61e9ed68 100644 --- a/tests/ui/macros/issue-22463.rs +++ b/tests/ui/macros/issue-22463.rs @@ -1,4 +1,4 @@ -// check-pass +//@ check-pass macro_rules! items { () => { type A = (); diff --git a/tests/ui/macros/issue-25274.rs b/tests/ui/macros/issue-25274.rs index 65b29bba8c8..3ed47b6a894 100644 --- a/tests/ui/macros/issue-25274.rs +++ b/tests/ui/macros/issue-25274.rs @@ -1,4 +1,4 @@ -// run-pass +//@ run-pass macro_rules! test { ( diff --git a/tests/ui/macros/issue-26322.rs b/tests/ui/macros/issue-26322.rs index c1dc80eb7c5..aaffbb081e2 100644 --- a/tests/ui/macros/issue-26322.rs +++ b/tests/ui/macros/issue-26322.rs @@ -1,4 +1,4 @@ -// run-pass +//@ run-pass #![allow(non_camel_case_types)] #![allow(non_snake_case)] diff --git a/tests/ui/macros/issue-2804-2.rs b/tests/ui/macros/issue-2804-2.rs index d02725505ac..6702f4249aa 100644 --- a/tests/ui/macros/issue-2804-2.rs +++ b/tests/ui/macros/issue-2804-2.rs @@ -1,4 +1,4 @@ -// check-pass +//@ check-pass #![allow(dead_code)] // Minimized version of issue-2804.rs. Both check that callee IDs don't // clobber the previous node ID in a macro expr diff --git a/tests/ui/macros/issue-2804.rs b/tests/ui/macros/issue-2804.rs index 571028c5e40..0b6f9487ece 100644 --- a/tests/ui/macros/issue-2804.rs +++ b/tests/ui/macros/issue-2804.rs @@ -1,4 +1,4 @@ -// run-pass +//@ run-pass #![allow(non_camel_case_types)] #![allow(dead_code)] diff --git a/tests/ui/macros/issue-33185.rs b/tests/ui/macros/issue-33185.rs index 0d6669146a6..8d7e305f1e3 100644 --- a/tests/ui/macros/issue-33185.rs +++ b/tests/ui/macros/issue-33185.rs @@ -1,4 +1,4 @@ -// run-pass +//@ run-pass #![allow(dead_code)] #[macro_export] diff --git a/tests/ui/macros/issue-34171.rs b/tests/ui/macros/issue-34171.rs index 157c58c459d..fbc2ea50097 100644 --- a/tests/ui/macros/issue-34171.rs +++ b/tests/ui/macros/issue-34171.rs @@ -1,4 +1,4 @@ -// check-pass +//@ check-pass macro_rules! null { ($i:tt) => {} } macro_rules! apply_null { diff --git a/tests/ui/macros/issue-37175.rs b/tests/ui/macros/issue-37175.rs index 9ec9d48d18b..e25ddfce6f2 100644 --- a/tests/ui/macros/issue-37175.rs +++ b/tests/ui/macros/issue-37175.rs @@ -1,4 +1,4 @@ -// run-pass +//@ run-pass macro_rules! m { (<$t:ty>) => { stringify!($t) } } fn main() { println!("{}", m!(>)); diff --git a/tests/ui/macros/issue-39467.rs b/tests/ui/macros/issue-39467.rs index 397751e4ec3..5405ec3fb3d 100644 --- a/tests/ui/macros/issue-39467.rs +++ b/tests/ui/macros/issue-39467.rs @@ -1,4 +1,4 @@ -// check-pass +//@ check-pass #![allow(dead_code)] macro_rules! expr { () => { () } } diff --git a/tests/ui/macros/issue-40469.rs b/tests/ui/macros/issue-40469.rs index 9b22aaef289..faa4c6581af 100644 --- a/tests/ui/macros/issue-40469.rs +++ b/tests/ui/macros/issue-40469.rs @@ -1,4 +1,4 @@ -// run-pass +//@ run-pass #![allow(dead_code)] diff --git a/tests/ui/macros/issue-40770.rs b/tests/ui/macros/issue-40770.rs index c9713c15798..d90294acd25 100644 --- a/tests/ui/macros/issue-40770.rs +++ b/tests/ui/macros/issue-40770.rs @@ -1,4 +1,4 @@ -// run-pass +//@ run-pass #![allow(unused_macros)] macro_rules! m { ($e:expr) => { diff --git a/tests/ui/macros/issue-41803.rs b/tests/ui/macros/issue-41803.rs index bccfdc61146..69162da12ac 100644 --- a/tests/ui/macros/issue-41803.rs +++ b/tests/ui/macros/issue-41803.rs @@ -1,4 +1,4 @@ -// run-pass +//@ run-pass #![allow(unused_macro_rules)] /// A compile-time map from identifiers to arbitrary (heterogeneous) expressions diff --git a/tests/ui/macros/issue-42954.fixed b/tests/ui/macros/issue-42954.fixed index a73054c9257..acfc36e2bff 100644 --- a/tests/ui/macros/issue-42954.fixed +++ b/tests/ui/macros/issue-42954.fixed @@ -1,4 +1,4 @@ -// run-rustfix +//@ run-rustfix #![allow(unused_must_use, unused_comparisons)] diff --git a/tests/ui/macros/issue-42954.rs b/tests/ui/macros/issue-42954.rs index 5f9b0e31da5..91362946f84 100644 --- a/tests/ui/macros/issue-42954.rs +++ b/tests/ui/macros/issue-42954.rs @@ -1,4 +1,4 @@ -// run-rustfix +//@ run-rustfix #![allow(unused_must_use, unused_comparisons)] diff --git a/tests/ui/macros/issue-44127.rs b/tests/ui/macros/issue-44127.rs index 21b2e68264a..a6e2840c7f8 100644 --- a/tests/ui/macros/issue-44127.rs +++ b/tests/ui/macros/issue-44127.rs @@ -1,4 +1,4 @@ -// run-pass +//@ run-pass #![feature(decl_macro)] diff --git a/tests/ui/macros/issue-5060.rs b/tests/ui/macros/issue-5060.rs index c4760bc029b..bca71e7e5c7 100644 --- a/tests/ui/macros/issue-5060.rs +++ b/tests/ui/macros/issue-5060.rs @@ -1,4 +1,4 @@ -// run-pass +//@ run-pass macro_rules! print_hd_tl { ($field_hd:ident, $($field_tl:ident),+) => ({ print!("{}", stringify!($field_hd)); diff --git a/tests/ui/macros/issue-52169.rs b/tests/ui/macros/issue-52169.rs index f178cd30cb4..b1a09e83ee9 100644 --- a/tests/ui/macros/issue-52169.rs +++ b/tests/ui/macros/issue-52169.rs @@ -1,4 +1,4 @@ -// run-pass +//@ run-pass #[allow(unused_macro_rules)] macro_rules! a { diff --git a/tests/ui/macros/issue-57597.rs b/tests/ui/macros/issue-57597.rs index ebeb3fe07ad..fd45f53cbd4 100644 --- a/tests/ui/macros/issue-57597.rs +++ b/tests/ui/macros/issue-57597.rs @@ -2,7 +2,7 @@ // // Make sure that nested matchers work correctly rather than causing an infinite loop or crash. -// edition:2018 +//@ edition:2018 macro_rules! foo1 { ($($($i:ident)?)+) => {}; diff --git a/tests/ui/macros/issue-63102.rs b/tests/ui/macros/issue-63102.rs index 6af5b186806..acc068cde7e 100644 --- a/tests/ui/macros/issue-63102.rs +++ b/tests/ui/macros/issue-63102.rs @@ -1,4 +1,4 @@ -// check-pass +//@ check-pass #![feature(decl_macro)] macro foo { diff --git a/tests/ui/macros/issue-68058.rs b/tests/ui/macros/issue-68058.rs index 24da2620c2e..0e6e445fd10 100644 --- a/tests/ui/macros/issue-68058.rs +++ b/tests/ui/macros/issue-68058.rs @@ -1,4 +1,4 @@ -// check-pass +//@ check-pass macro_rules! foo { ($doc: expr) => { diff --git a/tests/ui/macros/issue-69838-dir/bar.rs b/tests/ui/macros/issue-69838-dir/bar.rs index ec12f8c5cb4..4433005b85f 100644 --- a/tests/ui/macros/issue-69838-dir/bar.rs +++ b/tests/ui/macros/issue-69838-dir/bar.rs @@ -1,3 +1,3 @@ -// ignore-test -- this is an auxiliary file as part of another test. +//@ ignore-test -- this is an auxiliary file as part of another test. pub fn i_am_in_bar() {} diff --git a/tests/ui/macros/issue-69838-dir/included.rs b/tests/ui/macros/issue-69838-dir/included.rs index 9900b8fd509..11fcd3eff72 100644 --- a/tests/ui/macros/issue-69838-dir/included.rs +++ b/tests/ui/macros/issue-69838-dir/included.rs @@ -1,3 +1,3 @@ -// ignore-test -- this is an auxiliary file as part of another test. +//@ ignore-test -- this is an auxiliary file as part of another test. pub mod bar; diff --git a/tests/ui/macros/issue-69838-mods-relative-to-included-path.rs b/tests/ui/macros/issue-69838-mods-relative-to-included-path.rs index 2a4e97f0ef5..908669d337b 100644 --- a/tests/ui/macros/issue-69838-mods-relative-to-included-path.rs +++ b/tests/ui/macros/issue-69838-mods-relative-to-included-path.rs @@ -1,4 +1,4 @@ -// check-pass +//@ check-pass include!("issue-69838-dir/included.rs"); diff --git a/tests/ui/macros/issue-70446.rs b/tests/ui/macros/issue-70446.rs index 407094d55ff..35ffe3dfbfd 100644 --- a/tests/ui/macros/issue-70446.rs +++ b/tests/ui/macros/issue-70446.rs @@ -1,4 +1,4 @@ -// check-pass +//@ check-pass macro_rules! foo { ($(: $p:path)? $(: $l:lifetime)? ) => { bar! {$(: $p)? $(: $l)? } }; diff --git a/tests/ui/macros/issue-75982-foreign-macro-weird-mod.rs b/tests/ui/macros/issue-75982-foreign-macro-weird-mod.rs index e76b09d4bb9..8c3eb523ec5 100644 --- a/tests/ui/macros/issue-75982-foreign-macro-weird-mod.rs +++ b/tests/ui/macros/issue-75982-foreign-macro-weird-mod.rs @@ -1,5 +1,5 @@ -// aux-build:issue-75982.rs -// check-pass +//@ aux-build:issue-75982.rs +//@ check-pass // Regression test for issue #75982 // Tests that don't ICE when invoking a foreign macro diff --git a/tests/ui/macros/issue-77475.rs b/tests/ui/macros/issue-77475.rs index 7b32a33ea4f..b161f1eb39d 100644 --- a/tests/ui/macros/issue-77475.rs +++ b/tests/ui/macros/issue-77475.rs @@ -1,4 +1,4 @@ -// check-pass +//@ check-pass // Regression test of #77475, this used to be ICE. #![feature(decl_macro)] diff --git a/tests/ui/macros/issue-78333.rs b/tests/ui/macros/issue-78333.rs index c376f206704..faf608bd782 100644 --- a/tests/ui/macros/issue-78333.rs +++ b/tests/ui/macros/issue-78333.rs @@ -1,4 +1,4 @@ -// build-pass +//@ build-pass #![no_implicit_prelude] diff --git a/tests/ui/macros/issue-78892-substitution-in-statement-attr.rs b/tests/ui/macros/issue-78892-substitution-in-statement-attr.rs index 9d1fae7a234..bdb9f873410 100644 --- a/tests/ui/macros/issue-78892-substitution-in-statement-attr.rs +++ b/tests/ui/macros/issue-78892-substitution-in-statement-attr.rs @@ -1,4 +1,4 @@ -// check-pass +//@ check-pass // regression test for #78892 diff --git a/tests/ui/macros/issue-81006.rs b/tests/ui/macros/issue-81006.rs index 602eb597428..0fe0036765f 100644 --- a/tests/ui/macros/issue-81006.rs +++ b/tests/ui/macros/issue-81006.rs @@ -1,4 +1,4 @@ -// check-fail +//@ check-fail // First format below would cause a panic, second would generate error with incorrect span diff --git a/tests/ui/macros/issue-83340.rs b/tests/ui/macros/issue-83340.rs index d26200295cd..edf9c5612fb 100644 --- a/tests/ui/macros/issue-83340.rs +++ b/tests/ui/macros/issue-83340.rs @@ -1,4 +1,4 @@ -// check-fail +//@ check-fail fn main() { println!( diff --git a/tests/ui/macros/issue-83344.rs b/tests/ui/macros/issue-83344.rs index c5f7f723587..61ae1739095 100644 --- a/tests/ui/macros/issue-83344.rs +++ b/tests/ui/macros/issue-83344.rs @@ -1,4 +1,4 @@ -// check-fail +//@ check-fail fn main() { println!("{}\ diff --git a/tests/ui/macros/issue-84429-matches-edition.rs b/tests/ui/macros/issue-84429-matches-edition.rs index 53f134c265f..a1b146e23b6 100644 --- a/tests/ui/macros/issue-84429-matches-edition.rs +++ b/tests/ui/macros/issue-84429-matches-edition.rs @@ -1,5 +1,5 @@ -// edition:2021 -// check-pass +//@ edition:2021 +//@ check-pass // // Regression test for issue #84429 // Tests that we can properly invoke `matches!` from a 2021-edition crate. diff --git a/tests/ui/macros/issue-86082-option-env-invalid-char.rs b/tests/ui/macros/issue-86082-option-env-invalid-char.rs index b556b24d6aa..5d24ad2dcad 100644 --- a/tests/ui/macros/issue-86082-option-env-invalid-char.rs +++ b/tests/ui/macros/issue-86082-option-env-invalid-char.rs @@ -1,4 +1,4 @@ -// check-pass +//@ check-pass // // Regression test for issue #86082 // diff --git a/tests/ui/macros/issue-8709.rs b/tests/ui/macros/issue-8709.rs index ea7525d4477..afde304e821 100644 --- a/tests/ui/macros/issue-8709.rs +++ b/tests/ui/macros/issue-8709.rs @@ -1,4 +1,4 @@ -// run-pass +//@ run-pass macro_rules! sty { ($t:ty) => (stringify!($t)) diff --git a/tests/ui/macros/issue-87877.rs b/tests/ui/macros/issue-87877.rs index a40e2c5f970..79763435644 100644 --- a/tests/ui/macros/issue-87877.rs +++ b/tests/ui/macros/issue-87877.rs @@ -1,4 +1,4 @@ -// check-pass +//@ check-pass macro_rules! two_items { () => { diff --git a/tests/ui/macros/issue-88206.rs b/tests/ui/macros/issue-88206.rs index 14e2f66068b..abf58fdcbc8 100644 --- a/tests/ui/macros/issue-88206.rs +++ b/tests/ui/macros/issue-88206.rs @@ -1,4 +1,4 @@ -// compile-flags: -Z deduplicate-diagnostics=yes +//@ compile-flags: -Z deduplicate-diagnostics=yes #![warn(unused_imports)] diff --git a/tests/ui/macros/issue-88228.rs b/tests/ui/macros/issue-88228.rs index ec55a262509..48b405264fe 100644 --- a/tests/ui/macros/issue-88228.rs +++ b/tests/ui/macros/issue-88228.rs @@ -1,5 +1,5 @@ -// compile-flags: -Z deduplicate-diagnostics=yes -// edition:2018 +//@ compile-flags: -Z deduplicate-diagnostics=yes +//@ edition:2018 mod hey { //~ HELP consider importing this derive macro //~^ HELP consider importing this macro diff --git a/tests/ui/macros/issue-8851.rs b/tests/ui/macros/issue-8851.rs index faacfe5f895..4a398d15997 100644 --- a/tests/ui/macros/issue-8851.rs +++ b/tests/ui/macros/issue-8851.rs @@ -1,11 +1,11 @@ -// run-pass +//@ run-pass #![allow(dead_code)] // after fixing #9384 and implementing hygiene for match bindings, // this now fails because the insertion of the 'y' into the match // doesn't cause capture. Making this macro hygienic (as I've done) // could very well make this test case completely pointless.... -// pretty-expanded FIXME #23616 +//@ pretty-expanded FIXME #23616 enum T { A(isize), diff --git a/tests/ui/macros/issue-92267.rs b/tests/ui/macros/issue-92267.rs index f1daaeb743e..ff27717bcfa 100644 --- a/tests/ui/macros/issue-92267.rs +++ b/tests/ui/macros/issue-92267.rs @@ -1,3 +1,3 @@ -// check-fail +//@ check-fail pub fn main() { println!("šŸ¦€%%%", 0) } //~ ERROR argument never used diff --git a/tests/ui/macros/issue-95267.rs b/tests/ui/macros/issue-95267.rs index a2fe402bccf..ab003413b58 100644 --- a/tests/ui/macros/issue-95267.rs +++ b/tests/ui/macros/issue-95267.rs @@ -1,4 +1,4 @@ -// check-pass +//@ check-pass // The doc comment here is ignored. This is a bug, but #95267 showed that // existing programs rely on this behaviour, and changing it would require some diff --git a/tests/ui/macros/issue-95533.rs b/tests/ui/macros/issue-95533.rs index 905c14dc5fd..f2bdc346496 100644 --- a/tests/ui/macros/issue-95533.rs +++ b/tests/ui/macros/issue-95533.rs @@ -1,4 +1,4 @@ -// check-pass +//@ check-pass #![no_implicit_prelude] // the macro should not rely on the prelude being imported diff --git a/tests/ui/macros/issue-98466-allow.rs b/tests/ui/macros/issue-98466-allow.rs index c260148c148..2faf39749c4 100644 --- a/tests/ui/macros/issue-98466-allow.rs +++ b/tests/ui/macros/issue-98466-allow.rs @@ -1,4 +1,4 @@ -// check-pass +//@ check-pass #![allow(named_arguments_used_positionally)] fn main() { diff --git a/tests/ui/macros/issue-98466.fixed b/tests/ui/macros/issue-98466.fixed index e46e22f001f..37157706212 100644 --- a/tests/ui/macros/issue-98466.fixed +++ b/tests/ui/macros/issue-98466.fixed @@ -1,5 +1,5 @@ -// check-pass -// run-rustfix +//@ check-pass +//@ run-rustfix fn main() { let mut _x: usize; diff --git a/tests/ui/macros/issue-98466.rs b/tests/ui/macros/issue-98466.rs index 2c3b099afde..4f45605d6af 100644 --- a/tests/ui/macros/issue-98466.rs +++ b/tests/ui/macros/issue-98466.rs @@ -1,5 +1,5 @@ -// check-pass -// run-rustfix +//@ check-pass +//@ run-rustfix fn main() { let mut _x: usize; diff --git a/tests/ui/macros/issue-98790.rs b/tests/ui/macros/issue-98790.rs index 8fe6fc41d10..b489efe9ce9 100644 --- a/tests/ui/macros/issue-98790.rs +++ b/tests/ui/macros/issue-98790.rs @@ -1,4 +1,4 @@ -// run-pass +//@ run-pass macro_rules! stringify_item { ($item:item) => { diff --git a/tests/ui/macros/issue-99261.rs b/tests/ui/macros/issue-99261.rs index 40d26d08cba..7ea9974564a 100644 --- a/tests/ui/macros/issue-99261.rs +++ b/tests/ui/macros/issue-99261.rs @@ -1,4 +1,4 @@ -// check-pass +//@ check-pass #![deny(named_arguments_used_positionally)] diff --git a/tests/ui/macros/issue-99265.fixed b/tests/ui/macros/issue-99265.fixed index f3be9c6285d..06cd07362c9 100644 --- a/tests/ui/macros/issue-99265.fixed +++ b/tests/ui/macros/issue-99265.fixed @@ -1,5 +1,5 @@ -// check-pass -// run-rustfix +//@ check-pass +//@ run-rustfix fn main() { println!("{b} {a}", a=1, b=2); diff --git a/tests/ui/macros/issue-99265.rs b/tests/ui/macros/issue-99265.rs index e7cf608765b..619d265420f 100644 --- a/tests/ui/macros/issue-99265.rs +++ b/tests/ui/macros/issue-99265.rs @@ -1,5 +1,5 @@ -// check-pass -// run-rustfix +//@ check-pass +//@ run-rustfix fn main() { println!("{b} {}", a=1, b=2); diff --git a/tests/ui/macros/issue-99907.fixed b/tests/ui/macros/issue-99907.fixed index 9e0e1b80ee5..7da49b2a606 100644 --- a/tests/ui/macros/issue-99907.fixed +++ b/tests/ui/macros/issue-99907.fixed @@ -1,5 +1,5 @@ -// check-pass -// run-rustfix +//@ check-pass +//@ run-rustfix fn main() { println!("Hello {f:.1}!", f = 0.02f32); diff --git a/tests/ui/macros/issue-99907.rs b/tests/ui/macros/issue-99907.rs index eebcfc2efec..716bb99979c 100644 --- a/tests/ui/macros/issue-99907.rs +++ b/tests/ui/macros/issue-99907.rs @@ -1,5 +1,5 @@ -// check-pass -// run-rustfix +//@ check-pass +//@ run-rustfix fn main() { println!("Hello {:.1}!", f = 0.02f32); diff --git a/tests/ui/macros/lint-trailing-macro-call.rs b/tests/ui/macros/lint-trailing-macro-call.rs index f8e84756391..66dce057d0f 100644 --- a/tests/ui/macros/lint-trailing-macro-call.rs +++ b/tests/ui/macros/lint-trailing-macro-call.rs @@ -1,4 +1,4 @@ -// check-pass +//@ check-pass // // Ensures that we properly lint // a removed 'expression' resulting from a macro diff --git a/tests/ui/macros/log_syntax-trace_macros-macro-locations.rs b/tests/ui/macros/log_syntax-trace_macros-macro-locations.rs index 2d78ae6f908..85a65300eaf 100644 --- a/tests/ui/macros/log_syntax-trace_macros-macro-locations.rs +++ b/tests/ui/macros/log_syntax-trace_macros-macro-locations.rs @@ -1,5 +1,5 @@ -// run-pass -// pretty-expanded FIXME #23616 +//@ run-pass +//@ pretty-expanded FIXME #23616 #![feature(trace_macros, log_syntax)] diff --git a/tests/ui/macros/macro-2.rs b/tests/ui/macros/macro-2.rs index a315981b6a6..f28a567cd4e 100644 --- a/tests/ui/macros/macro-2.rs +++ b/tests/ui/macros/macro-2.rs @@ -1,4 +1,4 @@ -// run-pass +//@ run-pass pub fn main() { macro_rules! mylambda_tt { diff --git a/tests/ui/macros/macro-as-fn-body.rs b/tests/ui/macros/macro-as-fn-body.rs index 6781c9a9ed4..e0542edc2a5 100644 --- a/tests/ui/macros/macro-as-fn-body.rs +++ b/tests/ui/macros/macro-as-fn-body.rs @@ -1,5 +1,5 @@ // -// run-pass +//@ run-pass // // Description - ensure Interpolated blocks can act as valid function bodies // Covered cases: free functions, struct methods, and default trait functions diff --git a/tests/ui/macros/macro-at-most-once-rep-2015-rpass.rs b/tests/ui/macros/macro-at-most-once-rep-2015-rpass.rs index 66597c0acf6..c7a22c8b518 100644 --- a/tests/ui/macros/macro-at-most-once-rep-2015-rpass.rs +++ b/tests/ui/macros/macro-at-most-once-rep-2015-rpass.rs @@ -1,4 +1,4 @@ -// run-pass +//@ run-pass #![allow(unused_mut)] @@ -6,7 +6,7 @@ // then that `?` is not interpreted as a separator. In other words, `$(pat)?+` matches `pat +` // or `+` but does not match `pat` or `pat ? pat`. -// edition:2015 +//@ edition:2015 macro_rules! foo { // Check for `?`. diff --git a/tests/ui/macros/macro-at-most-once-rep-2015.rs b/tests/ui/macros/macro-at-most-once-rep-2015.rs index f68100d4557..8f2531a25ae 100644 --- a/tests/ui/macros/macro-at-most-once-rep-2015.rs +++ b/tests/ui/macros/macro-at-most-once-rep-2015.rs @@ -1,6 +1,6 @@ // Tests that `?` is a Kleene op and not a macro separator in the 2015 edition. -// edition:2015 +//@ edition:2015 macro_rules! foo { ($(a)?) => {}; diff --git a/tests/ui/macros/macro-at-most-once-rep-2018-rpass.rs b/tests/ui/macros/macro-at-most-once-rep-2018-rpass.rs index b37f3853016..0ca7e984c88 100644 --- a/tests/ui/macros/macro-at-most-once-rep-2018-rpass.rs +++ b/tests/ui/macros/macro-at-most-once-rep-2018-rpass.rs @@ -1,4 +1,4 @@ -// run-pass +//@ run-pass #![allow(unused_mut)] @@ -6,7 +6,7 @@ // then that `?` is not interpreted as a separator. In other words, `$(pat)?+` matches `pat +` // or `+` but does not match `pat` or `pat ? pat`. -// edition:2018 +//@ edition:2018 macro_rules! foo { // Check for `?`. diff --git a/tests/ui/macros/macro-at-most-once-rep-2018.rs b/tests/ui/macros/macro-at-most-once-rep-2018.rs index 886a25bbcbc..7f43055ded6 100644 --- a/tests/ui/macros/macro-at-most-once-rep-2018.rs +++ b/tests/ui/macros/macro-at-most-once-rep-2018.rs @@ -1,6 +1,6 @@ // Tests that `?` is a Kleene op and not a macro separator in the 2018 edition. -// edition:2018 +//@ edition:2018 macro_rules! foo { ($(a)?) => {}; diff --git a/tests/ui/macros/macro-attribute-expansion.rs b/tests/ui/macros/macro-attribute-expansion.rs index f01e5c44a67..be682b38865 100644 --- a/tests/ui/macros/macro-attribute-expansion.rs +++ b/tests/ui/macros/macro-attribute-expansion.rs @@ -1,4 +1,4 @@ -// run-pass +//@ run-pass macro_rules! descriptions { ($name:ident is $desc:expr) => { // Check that we will correctly expand attributes diff --git a/tests/ui/macros/macro-attributes.rs b/tests/ui/macros/macro-attributes.rs index d382e8b7197..57ba0d3bf56 100644 --- a/tests/ui/macros/macro-attributes.rs +++ b/tests/ui/macros/macro-attributes.rs @@ -1,4 +1,4 @@ -// run-pass +//@ run-pass macro_rules! compiles_fine { (#[$at:meta]) => { diff --git a/tests/ui/macros/macro-block-nonterminal.rs b/tests/ui/macros/macro-block-nonterminal.rs index a6c9dd6e187..fef4116e3ad 100644 --- a/tests/ui/macros/macro-block-nonterminal.rs +++ b/tests/ui/macros/macro-block-nonterminal.rs @@ -1,4 +1,4 @@ -// run-pass +//@ run-pass macro_rules! do_block{ ($val:block) => {$val} diff --git a/tests/ui/macros/macro-comma-behavior-rpass.rs b/tests/ui/macros/macro-comma-behavior-rpass.rs index 8406b4e78f6..14ac1dd4212 100644 --- a/tests/ui/macros/macro-comma-behavior-rpass.rs +++ b/tests/ui/macros/macro-comma-behavior-rpass.rs @@ -1,5 +1,5 @@ -// run-pass -// needs-unwind +//@ run-pass +//@ needs-unwind #![allow(unused_imports)] // Ideally, any macro call with a trailing comma should behave // identically to a call without the comma. @@ -11,8 +11,8 @@ // // There is a companion failing test. -// compile-flags: --test -C debug_assertions=yes -// revisions: std core +//@ compile-flags: --test -C debug_assertions=yes +//@ revisions: std core #![cfg_attr(core, no_std)] diff --git a/tests/ui/macros/macro-comma-behavior.rs b/tests/ui/macros/macro-comma-behavior.rs index 27d50ff3d57..f00d4d3e858 100644 --- a/tests/ui/macros/macro-comma-behavior.rs +++ b/tests/ui/macros/macro-comma-behavior.rs @@ -1,7 +1,7 @@ // Companion test to the similarly-named file in run-pass. -// compile-flags: -C debug_assertions=yes -// revisions: std core +//@ compile-flags: -C debug_assertions=yes +//@ revisions: std core #![feature(lang_items)] #![cfg_attr(core, no_std)] diff --git a/tests/ui/macros/macro-comma-support-rpass.rs b/tests/ui/macros/macro-comma-support-rpass.rs index 2f08ad3c343..724bd5af2dc 100644 --- a/tests/ui/macros/macro-comma-support-rpass.rs +++ b/tests/ui/macros/macro-comma-support-rpass.rs @@ -1,4 +1,4 @@ -// run-pass +//@ run-pass // This is meant to be a comprehensive test of invocations with/without // trailing commas (or other, similar optionally-trailing separators). // Every macro is accounted for, even those not tested in this file. @@ -9,8 +9,8 @@ // detail. -// compile-flags: --test -C debug_assertions=yes -// revisions: std core +//@ compile-flags: --test -C debug_assertions=yes +//@ revisions: std core #![cfg_attr(core, no_std)] diff --git a/tests/ui/macros/macro-crate-def-only.rs b/tests/ui/macros/macro-crate-def-only.rs index 514b33e3897..f15394df357 100644 --- a/tests/ui/macros/macro-crate-def-only.rs +++ b/tests/ui/macros/macro-crate-def-only.rs @@ -1,5 +1,5 @@ -// run-pass -// aux-build:macro_crate_def_only.rs +//@ run-pass +//@ aux-build:macro_crate_def_only.rs #[macro_use] #[no_link] diff --git a/tests/ui/macros/macro-crate-nonterminal-non-root.rs b/tests/ui/macros/macro-crate-nonterminal-non-root.rs index 67899556f8a..79d57bb9dac 100644 --- a/tests/ui/macros/macro-crate-nonterminal-non-root.rs +++ b/tests/ui/macros/macro-crate-nonterminal-non-root.rs @@ -1,4 +1,4 @@ -// aux-build:macro_crate_nonterminal.rs +//@ aux-build:macro_crate_nonterminal.rs mod foo { #[macro_use] diff --git a/tests/ui/macros/macro-crate-nonterminal-renamed.rs b/tests/ui/macros/macro-crate-nonterminal-renamed.rs index 87bd397f065..53e0b771f4a 100644 --- a/tests/ui/macros/macro-crate-nonterminal-renamed.rs +++ b/tests/ui/macros/macro-crate-nonterminal-renamed.rs @@ -1,5 +1,5 @@ -// run-pass -// aux-build:macro_crate_nonterminal.rs +//@ run-pass +//@ aux-build:macro_crate_nonterminal.rs #[macro_use] extern crate macro_crate_nonterminal as new_name; diff --git a/tests/ui/macros/macro-crate-nonterminal.rs b/tests/ui/macros/macro-crate-nonterminal.rs index 4b1056fc725..f4930e3a55c 100644 --- a/tests/ui/macros/macro-crate-nonterminal.rs +++ b/tests/ui/macros/macro-crate-nonterminal.rs @@ -1,5 +1,5 @@ -// run-pass -// aux-build:macro_crate_nonterminal.rs +//@ run-pass +//@ aux-build:macro_crate_nonterminal.rs #[macro_use] extern crate macro_crate_nonterminal; diff --git a/tests/ui/macros/macro-crate-use.rs b/tests/ui/macros/macro-crate-use.rs index 5c37cac9686..f0a5b957b77 100644 --- a/tests/ui/macros/macro-crate-use.rs +++ b/tests/ui/macros/macro-crate-use.rs @@ -1,4 +1,4 @@ -// run-pass +//@ run-pass pub fn increment(x: usize) -> usize { x + 1 diff --git a/tests/ui/macros/macro-deep_expansion.rs b/tests/ui/macros/macro-deep_expansion.rs index e13d8e1fc84..1ac466ba1ea 100644 --- a/tests/ui/macros/macro-deep_expansion.rs +++ b/tests/ui/macros/macro-deep_expansion.rs @@ -1,4 +1,4 @@ -// run-pass +//@ run-pass macro_rules! foo2 { () => { diff --git a/tests/ui/macros/macro-def-site-super.rs b/tests/ui/macros/macro-def-site-super.rs index 716a8ced5bb..4921cdd5371 100644 --- a/tests/ui/macros/macro-def-site-super.rs +++ b/tests/ui/macros/macro-def-site-super.rs @@ -1,7 +1,7 @@ // `super` in a `macro` refers to the parent module of the macro itself and not its reexport. -// check-pass -// aux-build:macro-def-site-super.rs +//@ check-pass +//@ aux-build:macro-def-site-super.rs extern crate macro_def_site_super; diff --git a/tests/ui/macros/macro-delimiter-significance.rs b/tests/ui/macros/macro-delimiter-significance.rs index 89f222b0530..8b532e19196 100644 --- a/tests/ui/macros/macro-delimiter-significance.rs +++ b/tests/ui/macros/macro-delimiter-significance.rs @@ -1,4 +1,4 @@ -// run-pass +//@ run-pass fn main() { vec![1_usize, 2, 3].len(); } diff --git a/tests/ui/macros/macro-deprecation.rs b/tests/ui/macros/macro-deprecation.rs index a7f327cf53b..27560849c68 100644 --- a/tests/ui/macros/macro-deprecation.rs +++ b/tests/ui/macros/macro-deprecation.rs @@ -1,5 +1,5 @@ -// check-pass -// aux-build:deprecated-macros.rs +//@ check-pass +//@ aux-build:deprecated-macros.rs #[macro_use] extern crate deprecated_macros; diff --git a/tests/ui/macros/macro-doc-comments.rs b/tests/ui/macros/macro-doc-comments.rs index fcc64cc0670..47740e26fb6 100644 --- a/tests/ui/macros/macro-doc-comments.rs +++ b/tests/ui/macros/macro-doc-comments.rs @@ -1,4 +1,4 @@ -// run-pass +//@ run-pass #![allow(non_snake_case)] macro_rules! doc { diff --git a/tests/ui/macros/macro-doc-escapes.rs b/tests/ui/macros/macro-doc-escapes.rs index ff5a5793b20..81c8d3383b5 100644 --- a/tests/ui/macros/macro-doc-escapes.rs +++ b/tests/ui/macros/macro-doc-escapes.rs @@ -1,4 +1,4 @@ -// run-pass +//@ run-pass // When expanding a macro, documentation attributes (including documentation comments) must be // passed "as is" without being parsed. Otherwise, some text will be incorrectly interpreted as // escape sequences, leading to an ICE. diff --git a/tests/ui/macros/macro-doc-raw-str-hashes.rs b/tests/ui/macros/macro-doc-raw-str-hashes.rs index a003bff3c04..fd6f28a0c76 100644 --- a/tests/ui/macros/macro-doc-raw-str-hashes.rs +++ b/tests/ui/macros/macro-doc-raw-str-hashes.rs @@ -1,4 +1,4 @@ -// run-pass +//@ run-pass // The number of `#`s used to wrap the documentation comment should differ regarding the content. // // Related issue: #27489 diff --git a/tests/ui/macros/macro-expanded-include/foo/mod.rs b/tests/ui/macros/macro-expanded-include/foo/mod.rs index 2e4c4c7f8a9..926d84c93e5 100644 --- a/tests/ui/macros/macro-expanded-include/foo/mod.rs +++ b/tests/ui/macros/macro-expanded-include/foo/mod.rs @@ -1,4 +1,4 @@ -// ignore-test (auxiliary, used by other tests) +//@ ignore-test (auxiliary, used by other tests) macro_rules! m { () => { include!("file.txt"); } diff --git a/tests/ui/macros/macro-expanded-include/test.rs b/tests/ui/macros/macro-expanded-include/test.rs index 20da58a7e8e..69fcb090959 100644 --- a/tests/ui/macros/macro-expanded-include/test.rs +++ b/tests/ui/macros/macro-expanded-include/test.rs @@ -1,5 +1,5 @@ -// needs-asm-support -// build-pass (FIXME(62277): could be check-pass?) +//@ needs-asm-support +//@ build-pass (FIXME(62277): could be check-pass?) #![allow(unused)] #[macro_use] diff --git a/tests/ui/macros/macro-export-inner-module.rs b/tests/ui/macros/macro-export-inner-module.rs index 1f23e90b65c..6eccc90dc67 100644 --- a/tests/ui/macros/macro-export-inner-module.rs +++ b/tests/ui/macros/macro-export-inner-module.rs @@ -1,5 +1,5 @@ -// run-pass -//aux-build:macro_export_inner_module.rs +//@ run-pass +//@aux-build:macro_export_inner_module.rs #[macro_use] #[no_link] extern crate macro_export_inner_module; diff --git a/tests/ui/macros/macro-first-set.rs b/tests/ui/macros/macro-first-set.rs index eeb1ddd84ae..0f8f26b88c2 100644 --- a/tests/ui/macros/macro-first-set.rs +++ b/tests/ui/macros/macro-first-set.rs @@ -1,4 +1,4 @@ -// run-pass +//@ run-pass #![allow(unused_macro_rules)] //{{{ issue 40569 ============================================================== diff --git a/tests/ui/macros/macro-follow-rpass.rs b/tests/ui/macros/macro-follow-rpass.rs index ca93655631f..83508879225 100644 --- a/tests/ui/macros/macro-follow-rpass.rs +++ b/tests/ui/macros/macro-follow-rpass.rs @@ -1,4 +1,4 @@ -// run-pass +//@ run-pass #![allow(unused_macros)] // Check the macro follow sets (see corresponding cfail test). diff --git a/tests/ui/macros/macro-followed-by-seq.rs b/tests/ui/macros/macro-followed-by-seq.rs index 71d59d8d31b..f4756d42088 100644 --- a/tests/ui/macros/macro-followed-by-seq.rs +++ b/tests/ui/macros/macro-followed-by-seq.rs @@ -1,4 +1,4 @@ -// run-pass +//@ run-pass #![allow(unused_macros)] // Regression test for issue #25436: check that things which can be // followed by any token also permit X* to come afterwards. diff --git a/tests/ui/macros/macro-in-expression-context.fixed b/tests/ui/macros/macro-in-expression-context.fixed index f22caf2793f..f4d04ca37bf 100644 --- a/tests/ui/macros/macro-in-expression-context.fixed +++ b/tests/ui/macros/macro-in-expression-context.fixed @@ -1,4 +1,4 @@ -// run-rustfix +//@ run-rustfix macro_rules! foo { () => { diff --git a/tests/ui/macros/macro-in-expression-context.rs b/tests/ui/macros/macro-in-expression-context.rs index 1a056e582ff..8921a056377 100644 --- a/tests/ui/macros/macro-in-expression-context.rs +++ b/tests/ui/macros/macro-in-expression-context.rs @@ -1,4 +1,4 @@ -// run-rustfix +//@ run-rustfix macro_rules! foo { () => { diff --git a/tests/ui/macros/macro-in-fn.rs b/tests/ui/macros/macro-in-fn.rs index d354fe4a7db..2ffa6b2e457 100644 --- a/tests/ui/macros/macro-in-fn.rs +++ b/tests/ui/macros/macro-in-fn.rs @@ -1,4 +1,4 @@ -// run-pass +//@ run-pass #![feature(decl_macro)] pub fn moo() { diff --git a/tests/ui/macros/macro-include-items.rs b/tests/ui/macros/macro-include-items.rs index ad6f04009b6..9423d2c4949 100644 --- a/tests/ui/macros/macro-include-items.rs +++ b/tests/ui/macros/macro-include-items.rs @@ -1,4 +1,4 @@ -// run-pass +//@ run-pass #![allow(non_camel_case_types)] diff --git a/tests/ui/macros/macro-invocation-in-count-expr-fixed-array-type.rs b/tests/ui/macros/macro-invocation-in-count-expr-fixed-array-type.rs index 8f9dcb94794..08fe2c92830 100644 --- a/tests/ui/macros/macro-invocation-in-count-expr-fixed-array-type.rs +++ b/tests/ui/macros/macro-invocation-in-count-expr-fixed-array-type.rs @@ -1,5 +1,5 @@ -// run-pass -// pretty-expanded FIXME #23616 +//@ run-pass +//@ pretty-expanded FIXME #23616 macro_rules! four { () => (4) diff --git a/tests/ui/macros/macro-lifetime-used-with-bound.rs b/tests/ui/macros/macro-lifetime-used-with-bound.rs index ea3f74c9ada..438301ecbb9 100644 --- a/tests/ui/macros/macro-lifetime-used-with-bound.rs +++ b/tests/ui/macros/macro-lifetime-used-with-bound.rs @@ -1,4 +1,4 @@ -// run-pass +//@ run-pass #![allow(unused_variables)] macro_rules! foo { ($l:lifetime, $l2:lifetime) => { diff --git a/tests/ui/macros/macro-lifetime-used-with-labels.rs b/tests/ui/macros/macro-lifetime-used-with-labels.rs index 59017da3b69..3b51b8050b3 100644 --- a/tests/ui/macros/macro-lifetime-used-with-labels.rs +++ b/tests/ui/macros/macro-lifetime-used-with-labels.rs @@ -1,4 +1,4 @@ -// run-pass +//@ run-pass #![allow(stable_features)] #![allow(unused_labels)] #![allow(unreachable_code)] diff --git a/tests/ui/macros/macro-lifetime-used-with-static.rs b/tests/ui/macros/macro-lifetime-used-with-static.rs index 8552c4b8163..a1faa512514 100644 --- a/tests/ui/macros/macro-lifetime-used-with-static.rs +++ b/tests/ui/macros/macro-lifetime-used-with-static.rs @@ -1,4 +1,4 @@ -// run-pass +//@ run-pass macro_rules! foo { ($l:lifetime) => { fn f(arg: &$l str) -> &$l str { diff --git a/tests/ui/macros/macro-lifetime.rs b/tests/ui/macros/macro-lifetime.rs index 5931fe00907..9690f40b2c3 100644 --- a/tests/ui/macros/macro-lifetime.rs +++ b/tests/ui/macros/macro-lifetime.rs @@ -1,4 +1,4 @@ -// run-pass +//@ run-pass macro_rules! foo { ($l:lifetime) => { fn f<$l>(arg: &$l str) -> &$l str { diff --git a/tests/ui/macros/macro-literal.rs b/tests/ui/macros/macro-literal.rs index 3c2e71f9c43..a3bdc6a2bf7 100644 --- a/tests/ui/macros/macro-literal.rs +++ b/tests/ui/macros/macro-literal.rs @@ -1,4 +1,4 @@ -// run-pass +//@ run-pass macro_rules! mtester { ($l:literal) => { diff --git a/tests/ui/macros/macro-meta-items-modern.rs b/tests/ui/macros/macro-meta-items-modern.rs index bc6938d4a6c..c519403c9c1 100644 --- a/tests/ui/macros/macro-meta-items-modern.rs +++ b/tests/ui/macros/macro-meta-items-modern.rs @@ -1,4 +1,4 @@ -// check-pass +//@ check-pass macro_rules! check { ($meta:meta) => () } diff --git a/tests/ui/macros/macro-meta-items.rs b/tests/ui/macros/macro-meta-items.rs index 4cbc252aebf..10c57fba244 100644 --- a/tests/ui/macros/macro-meta-items.rs +++ b/tests/ui/macros/macro-meta-items.rs @@ -1,6 +1,6 @@ -// run-pass +//@ run-pass #![allow(dead_code)] -// compile-flags: --cfg foo +//@ compile-flags: --cfg foo macro_rules! compiles_fine { ($at:meta) => { diff --git a/tests/ui/macros/macro-method-issue-4621.rs b/tests/ui/macros/macro-method-issue-4621.rs index 342fad5f62e..a35eeb257df 100644 --- a/tests/ui/macros/macro-method-issue-4621.rs +++ b/tests/ui/macros/macro-method-issue-4621.rs @@ -1,4 +1,4 @@ -// run-pass +//@ run-pass struct A; diff --git a/tests/ui/macros/macro-missing-fragment-deduplication.rs b/tests/ui/macros/macro-missing-fragment-deduplication.rs index c1e6ba74647..b77c51e055b 100644 --- a/tests/ui/macros/macro-missing-fragment-deduplication.rs +++ b/tests/ui/macros/macro-missing-fragment-deduplication.rs @@ -1,4 +1,4 @@ -// compile-flags: -Zdeduplicate-diagnostics=yes +//@ compile-flags: -Zdeduplicate-diagnostics=yes macro_rules! m { ($name) => {} diff --git a/tests/ui/macros/macro-multiple-items.rs b/tests/ui/macros/macro-multiple-items.rs index 3b6dfd9bc5e..c746d1bc518 100644 --- a/tests/ui/macros/macro-multiple-items.rs +++ b/tests/ui/macros/macro-multiple-items.rs @@ -1,4 +1,4 @@ -// run-pass +//@ run-pass macro_rules! make_foo { () => ( struct Foo; diff --git a/tests/ui/macros/macro-named-default.rs b/tests/ui/macros/macro-named-default.rs index 9b6cd191640..bca0e005083 100644 --- a/tests/ui/macros/macro-named-default.rs +++ b/tests/ui/macros/macro-named-default.rs @@ -1,4 +1,4 @@ -// run-pass +//@ run-pass macro_rules! default { ($($x:tt)*) => { $($x)* } } diff --git a/tests/ui/macros/macro-nested_definition_issue-31946.rs b/tests/ui/macros/macro-nested_definition_issue-31946.rs index a83c5b2e44f..27e803ed61b 100644 --- a/tests/ui/macros/macro-nested_definition_issue-31946.rs +++ b/tests/ui/macros/macro-nested_definition_issue-31946.rs @@ -1,4 +1,4 @@ -// run-pass +//@ run-pass fn main() { println!("{}", { macro_rules! foo { diff --git a/tests/ui/macros/macro-nested_expr.rs b/tests/ui/macros/macro-nested_expr.rs index f1433cbf4f9..291ae58c243 100644 --- a/tests/ui/macros/macro-nested_expr.rs +++ b/tests/ui/macros/macro-nested_expr.rs @@ -1,4 +1,4 @@ -// run-pass +//@ run-pass // #42164 #![feature(decl_macro)] diff --git a/tests/ui/macros/macro-nested_stmt_macros.rs b/tests/ui/macros/macro-nested_stmt_macros.rs index 5d4758a0c7b..054aa3cb293 100644 --- a/tests/ui/macros/macro-nested_stmt_macros.rs +++ b/tests/ui/macros/macro-nested_stmt_macros.rs @@ -1,4 +1,4 @@ -// run-pass +//@ run-pass macro_rules! foo { () => { struct Bar; diff --git a/tests/ui/macros/macro-nt-list.rs b/tests/ui/macros/macro-nt-list.rs index 36aa74f0825..7a6bc6a8d73 100644 --- a/tests/ui/macros/macro-nt-list.rs +++ b/tests/ui/macros/macro-nt-list.rs @@ -1,5 +1,5 @@ -// run-pass -// pretty-expanded FIXME #23616 +//@ run-pass +//@ pretty-expanded FIXME #23616 macro_rules! list { ( ($($id:ident),*) ) => (()); diff --git a/tests/ui/macros/macro-of-higher-order.rs b/tests/ui/macros/macro-of-higher-order.rs index ec551d6cdbc..4b96b5b7765 100644 --- a/tests/ui/macros/macro-of-higher-order.rs +++ b/tests/ui/macros/macro-of-higher-order.rs @@ -1,4 +1,4 @@ -// run-pass +//@ run-pass macro_rules! higher_order { (subst $lhs:tt => $rhs:tt) => ({ diff --git a/tests/ui/macros/macro-or-patterns-back-compat.fixed b/tests/ui/macros/macro-or-patterns-back-compat.fixed index b0d56e9bb1e..c16190c399a 100644 --- a/tests/ui/macros/macro-or-patterns-back-compat.fixed +++ b/tests/ui/macros/macro-or-patterns-back-compat.fixed @@ -1,5 +1,5 @@ -// run-rustfix -// aux-build:or-pattern.rs +//@ run-rustfix +//@ aux-build:or-pattern.rs #![deny(rust_2021_incompatible_or_patterns)] #![allow(unused_macros)] diff --git a/tests/ui/macros/macro-or-patterns-back-compat.rs b/tests/ui/macros/macro-or-patterns-back-compat.rs index 9e24b5106b8..ef0ffb99c1a 100644 --- a/tests/ui/macros/macro-or-patterns-back-compat.rs +++ b/tests/ui/macros/macro-or-patterns-back-compat.rs @@ -1,5 +1,5 @@ -// run-rustfix -// aux-build:or-pattern.rs +//@ run-rustfix +//@ aux-build:or-pattern.rs #![deny(rust_2021_incompatible_or_patterns)] #![allow(unused_macros)] diff --git a/tests/ui/macros/macro-pat-follow-2018.rs b/tests/ui/macros/macro-pat-follow-2018.rs index ce2911de986..6dcb841fec1 100644 --- a/tests/ui/macros/macro-pat-follow-2018.rs +++ b/tests/ui/macros/macro-pat-follow-2018.rs @@ -1,5 +1,5 @@ -// run-pass -// edition:2018 +//@ run-pass +//@ edition:2018 macro_rules! pat_bar { ($p:pat | $p2:pat) => {{ diff --git a/tests/ui/macros/macro-pat-follow.rs b/tests/ui/macros/macro-pat-follow.rs index 8e02789fdd8..830cc7c0860 100644 --- a/tests/ui/macros/macro-pat-follow.rs +++ b/tests/ui/macros/macro-pat-follow.rs @@ -1,4 +1,4 @@ -// run-pass +//@ run-pass macro_rules! pat_in { ($p:pat in $e:expr) => {{ let mut iter = $e.into_iter(); diff --git a/tests/ui/macros/macro-pat-neg-lit.rs b/tests/ui/macros/macro-pat-neg-lit.rs index 79c68fd2541..072d079fecb 100644 --- a/tests/ui/macros/macro-pat-neg-lit.rs +++ b/tests/ui/macros/macro-pat-neg-lit.rs @@ -1,4 +1,4 @@ -// run-pass +//@ run-pass macro_rules! enum_number { ($name:ident { $($variant:ident = $value:expr, )* }) => { enum $name { diff --git a/tests/ui/macros/macro-pat-pattern-followed-by-or-in-2021.rs b/tests/ui/macros/macro-pat-pattern-followed-by-or-in-2021.rs index f5a97eca21b..154d6e339a7 100644 --- a/tests/ui/macros/macro-pat-pattern-followed-by-or-in-2021.rs +++ b/tests/ui/macros/macro-pat-pattern-followed-by-or-in-2021.rs @@ -1,4 +1,4 @@ -// edition:2021 +//@ edition:2021 #![allow(unused_macros)] macro_rules! foo { ($x:pat | $y:pat) => {} } //~ ERROR `$x:pat` is followed by `|`, which is not allowed for `pat` fragments macro_rules! bar { ($($x:pat)+ | $($y:pat)+) => {} } //~ ERROR `$x:pat` is followed by `|`, which is not allowed for `pat` fragments diff --git a/tests/ui/macros/macro-pat-pattern-followed-by-or.rs b/tests/ui/macros/macro-pat-pattern-followed-by-or.rs index 54bd13d7ebc..d584e919a2a 100644 --- a/tests/ui/macros/macro-pat-pattern-followed-by-or.rs +++ b/tests/ui/macros/macro-pat-pattern-followed-by-or.rs @@ -1,4 +1,4 @@ -// run-pass +//@ run-pass #![allow(unused_macros)] macro_rules! foo { ($x:pat | $y:pat) => {} } // should be ok macro_rules! bar { ($($x:pat)+ | $($y:pat)+) => {} } // should be ok diff --git a/tests/ui/macros/macro-pat.rs b/tests/ui/macros/macro-pat.rs index baf816e53ea..5c826f84be6 100644 --- a/tests/ui/macros/macro-pat.rs +++ b/tests/ui/macros/macro-pat.rs @@ -1,4 +1,4 @@ -// run-pass +//@ run-pass macro_rules! mypat { () => ( diff --git a/tests/ui/macros/macro-pat2021-pattern-followed-by-or.rs b/tests/ui/macros/macro-pat2021-pattern-followed-by-or.rs index b4be03aaddd..c7dc5d53a98 100644 --- a/tests/ui/macros/macro-pat2021-pattern-followed-by-or.rs +++ b/tests/ui/macros/macro-pat2021-pattern-followed-by-or.rs @@ -1,4 +1,4 @@ -// edition:2021 +//@ edition:2021 #![allow(unused_macros)] macro_rules! foo { ($x:pat | $y:pat) => {} } //~ ERROR `$x:pat` is followed by `|`, which is not allowed for `pat` fragments diff --git a/tests/ui/macros/macro-path-prelude-pass.rs b/tests/ui/macros/macro-path-prelude-pass.rs index 7cf346286ea..3499a80e956 100644 --- a/tests/ui/macros/macro-path-prelude-pass.rs +++ b/tests/ui/macros/macro-path-prelude-pass.rs @@ -1,4 +1,4 @@ -// check-pass +//@ check-pass mod m { fn check() { diff --git a/tests/ui/macros/macro-path-prelude-shadowing.rs b/tests/ui/macros/macro-path-prelude-shadowing.rs index d7181200085..f18d4db3ad4 100644 --- a/tests/ui/macros/macro-path-prelude-shadowing.rs +++ b/tests/ui/macros/macro-path-prelude-shadowing.rs @@ -1,4 +1,4 @@ -// aux-build:macro-in-other-crate.rs +//@ aux-build:macro-in-other-crate.rs #![feature(decl_macro)] diff --git a/tests/ui/macros/macro-path.rs b/tests/ui/macros/macro-path.rs index 6c011c897da..f8c45439d11 100644 --- a/tests/ui/macros/macro-path.rs +++ b/tests/ui/macros/macro-path.rs @@ -1,4 +1,4 @@ -// run-pass +//@ run-pass #![allow(non_camel_case_types)] diff --git a/tests/ui/macros/macro-pub-matcher.rs b/tests/ui/macros/macro-pub-matcher.rs index 7b02a70be09..538f55cc98d 100644 --- a/tests/ui/macros/macro-pub-matcher.rs +++ b/tests/ui/macros/macro-pub-matcher.rs @@ -1,4 +1,4 @@ -// run-pass +//@ run-pass #![allow(dead_code, unused_imports, unused_macro_rules)] /** diff --git a/tests/ui/macros/macro-quote-test.rs b/tests/ui/macros/macro-quote-test.rs index 2ba61acadcb..dd7b10f6322 100644 --- a/tests/ui/macros/macro-quote-test.rs +++ b/tests/ui/macros/macro-quote-test.rs @@ -1,7 +1,7 @@ // Test that a macro can emit delimiters with nothing inside - `()`, `{}` -// run-pass -// aux-build:hello_macro.rs +//@ run-pass +//@ aux-build:hello_macro.rs extern crate hello_macro; diff --git a/tests/ui/macros/macro-reexport-removed.rs b/tests/ui/macros/macro-reexport-removed.rs index 874c94d08e0..4a054686d77 100644 --- a/tests/ui/macros/macro-reexport-removed.rs +++ b/tests/ui/macros/macro-reexport-removed.rs @@ -1,4 +1,4 @@ -// aux-build:two_macros.rs +//@ aux-build:two_macros.rs #![feature(macro_reexport)] //~ ERROR feature has been removed diff --git a/tests/ui/macros/macro-seq-followed-by-seq.rs b/tests/ui/macros/macro-seq-followed-by-seq.rs index 8f0f4fd4a0d..3661744284e 100644 --- a/tests/ui/macros/macro-seq-followed-by-seq.rs +++ b/tests/ui/macros/macro-seq-followed-by-seq.rs @@ -1,4 +1,4 @@ -// run-pass +//@ run-pass // Test of allowing two sequences repetitions in a row, // functionality added as byproduct of RFC amendment #1384 // https://github.com/rust-lang/rfcs/pull/1384 diff --git a/tests/ui/macros/macro-shadowing-relaxed.rs b/tests/ui/macros/macro-shadowing-relaxed.rs index b2a639218b9..bbb1054421d 100644 --- a/tests/ui/macros/macro-shadowing-relaxed.rs +++ b/tests/ui/macros/macro-shadowing-relaxed.rs @@ -1,5 +1,5 @@ -// build-pass (FIXME(62277): could be check-pass?) -// aux-build:macro-in-other-crate.rs +//@ build-pass (FIXME(62277): could be check-pass?) +//@ aux-build:macro-in-other-crate.rs #![feature(decl_macro)] diff --git a/tests/ui/macros/macro-shadowing.rs b/tests/ui/macros/macro-shadowing.rs index 7f956dd7d10..710e83dfb3b 100644 --- a/tests/ui/macros/macro-shadowing.rs +++ b/tests/ui/macros/macro-shadowing.rs @@ -1,4 +1,4 @@ -// aux-build:two_macros.rs +//@ aux-build:two_macros.rs #![allow(unused_macros)] diff --git a/tests/ui/macros/macro-stability-rpass.rs b/tests/ui/macros/macro-stability-rpass.rs index 2d02b95288d..25a69a5fc4c 100644 --- a/tests/ui/macros/macro-stability-rpass.rs +++ b/tests/ui/macros/macro-stability-rpass.rs @@ -1,5 +1,5 @@ -// run-pass -// aux-build:unstable-macros.rs +//@ run-pass +//@ aux-build:unstable-macros.rs #![unstable(feature = "one_two_three_testing", issue = "none")] #![feature(staged_api, unstable_macros, local_unstable)] diff --git a/tests/ui/macros/macro-stability.rs b/tests/ui/macros/macro-stability.rs index ed7618a672b..a909b14f47b 100644 --- a/tests/ui/macros/macro-stability.rs +++ b/tests/ui/macros/macro-stability.rs @@ -1,4 +1,4 @@ -// aux-build:unstable-macros.rs +//@ aux-build:unstable-macros.rs #![feature(decl_macro)] #![feature(staged_api)] diff --git a/tests/ui/macros/macro-stmt-matchers.rs b/tests/ui/macros/macro-stmt-matchers.rs index a643e50e995..2fa20972f2a 100644 --- a/tests/ui/macros/macro-stmt-matchers.rs +++ b/tests/ui/macros/macro-stmt-matchers.rs @@ -1,4 +1,4 @@ -// build-pass (FIXME(62277): could be check-pass?) +//@ build-pass (FIXME(62277): could be check-pass?) fn main() { diff --git a/tests/ui/macros/macro-stmt.rs b/tests/ui/macros/macro-stmt.rs index c9a0b879a0f..fcbd50687a7 100644 --- a/tests/ui/macros/macro-stmt.rs +++ b/tests/ui/macros/macro-stmt.rs @@ -1,4 +1,4 @@ -// run-pass +//@ run-pass macro_rules! myfn { ( $f:ident, ( $( $x:ident ),* ), $body:block ) => ( fn $f( $( $x : isize),* ) -> isize $body diff --git a/tests/ui/macros/macro-stmt_macro_in_expr_macro.rs b/tests/ui/macros/macro-stmt_macro_in_expr_macro.rs index 528d0b28bf6..8b634b4aa54 100644 --- a/tests/ui/macros/macro-stmt_macro_in_expr_macro.rs +++ b/tests/ui/macros/macro-stmt_macro_in_expr_macro.rs @@ -1,4 +1,4 @@ -// run-pass +//@ run-pass #![allow(dead_code)] macro_rules! foo { () => { diff --git a/tests/ui/macros/macro-tt-followed-by-seq.rs b/tests/ui/macros/macro-tt-followed-by-seq.rs index 67238df8524..b4ab486b236 100644 --- a/tests/ui/macros/macro-tt-followed-by-seq.rs +++ b/tests/ui/macros/macro-tt-followed-by-seq.rs @@ -1,4 +1,4 @@ -// run-pass +//@ run-pass // Regression test for issue #25436: permit token-trees to be followed // by sequences, enabling more general parsing. diff --git a/tests/ui/macros/macro-tt-matchers.rs b/tests/ui/macros/macro-tt-matchers.rs index 2ee41b0880e..004be966cb4 100644 --- a/tests/ui/macros/macro-tt-matchers.rs +++ b/tests/ui/macros/macro-tt-matchers.rs @@ -1,4 +1,4 @@ -// build-pass (FIXME(62277): could be check-pass?) +//@ build-pass (FIXME(62277): could be check-pass?) #![allow(dead_code)] macro_rules! foo { diff --git a/tests/ui/macros/macro-use-all-and-none.rs b/tests/ui/macros/macro-use-all-and-none.rs index c8bd44008b0..f1acff48403 100644 --- a/tests/ui/macros/macro-use-all-and-none.rs +++ b/tests/ui/macros/macro-use-all-and-none.rs @@ -1,5 +1,5 @@ -// run-pass -// aux-build:two_macros-rpass.rs +//@ run-pass +//@ aux-build:two_macros-rpass.rs #![warn(unused_attributes)] diff --git a/tests/ui/macros/macro-use-all.rs b/tests/ui/macros/macro-use-all.rs index 48c7b77e579..a7fd3dfa5ce 100644 --- a/tests/ui/macros/macro-use-all.rs +++ b/tests/ui/macros/macro-use-all.rs @@ -1,5 +1,5 @@ -// run-pass -// aux-build:two_macros.rs +//@ run-pass +//@ aux-build:two_macros.rs #[macro_use] extern crate two_macros; diff --git a/tests/ui/macros/macro-use-both.rs b/tests/ui/macros/macro-use-both.rs index ed5d1312f96..e49f346c8e3 100644 --- a/tests/ui/macros/macro-use-both.rs +++ b/tests/ui/macros/macro-use-both.rs @@ -1,5 +1,5 @@ -// run-pass -// aux-build:two_macros.rs +//@ run-pass +//@ aux-build:two_macros.rs #[macro_use(macro_one, macro_two)] extern crate two_macros; diff --git a/tests/ui/macros/macro-use-one.rs b/tests/ui/macros/macro-use-one.rs index f74795e68dc..2b048651ccc 100644 --- a/tests/ui/macros/macro-use-one.rs +++ b/tests/ui/macros/macro-use-one.rs @@ -1,5 +1,5 @@ -// run-pass -// aux-build:two_macros.rs +//@ run-pass +//@ aux-build:two_macros.rs #[macro_use(macro_two)] extern crate two_macros; diff --git a/tests/ui/macros/macro-use-scope.rs b/tests/ui/macros/macro-use-scope.rs index 5e58fc9c1ed..d078caa7fd1 100644 --- a/tests/ui/macros/macro-use-scope.rs +++ b/tests/ui/macros/macro-use-scope.rs @@ -1,6 +1,6 @@ -// aux-build:two_macros.rs +//@ aux-build:two_macros.rs -// build-pass (FIXME(62277): could be check-pass?) +//@ build-pass (FIXME(62277): could be check-pass?) #![allow(unused)] fn f() { diff --git a/tests/ui/macros/macro-use-undef.rs b/tests/ui/macros/macro-use-undef.rs index ae3054e7b82..8e903927565 100644 --- a/tests/ui/macros/macro-use-undef.rs +++ b/tests/ui/macros/macro-use-undef.rs @@ -1,4 +1,4 @@ -// aux-build:two_macros.rs +//@ aux-build:two_macros.rs #[macro_use(macro_two, no_way)] //~ ERROR imported macro not found extern crate two_macros; diff --git a/tests/ui/macros/macro-use-wrong-name.rs b/tests/ui/macros/macro-use-wrong-name.rs index d142b580003..b3c11e77d3b 100644 --- a/tests/ui/macros/macro-use-wrong-name.rs +++ b/tests/ui/macros/macro-use-wrong-name.rs @@ -1,4 +1,4 @@ -// aux-build:two_macros.rs +//@ aux-build:two_macros.rs #[macro_use(macro_one)] extern crate two_macros; diff --git a/tests/ui/macros/macro-with-attrs1.rs b/tests/ui/macros/macro-with-attrs1.rs index 4e943b224cd..cfd5691fe94 100644 --- a/tests/ui/macros/macro-with-attrs1.rs +++ b/tests/ui/macros/macro-with-attrs1.rs @@ -1,5 +1,5 @@ -// run-pass -// compile-flags: --cfg foo +//@ run-pass +//@ compile-flags: --cfg foo #[cfg(foo)] diff --git a/tests/ui/macros/macro-with-attrs2.rs b/tests/ui/macros/macro-with-attrs2.rs index 78c40810207..3ff26025206 100644 --- a/tests/ui/macros/macro-with-attrs2.rs +++ b/tests/ui/macros/macro-with-attrs2.rs @@ -1,4 +1,4 @@ -// run-pass +//@ run-pass #[cfg(foo)] macro_rules! foo { () => (1) } diff --git a/tests/ui/macros/macro-with-braces-in-expr-position.rs b/tests/ui/macros/macro-with-braces-in-expr-position.rs index f7d87434ded..febfa7241f2 100644 --- a/tests/ui/macros/macro-with-braces-in-expr-position.rs +++ b/tests/ui/macros/macro-with-braces-in-expr-position.rs @@ -1,6 +1,6 @@ -// run-pass +//@ run-pass #![allow(unused_must_use)] -// ignore-emscripten no threads support +//@ ignore-emscripten no threads support use std::thread; diff --git a/tests/ui/macros/macro_with_super_2.rs b/tests/ui/macros/macro_with_super_2.rs index 2901a74f612..5353405ca57 100644 --- a/tests/ui/macros/macro_with_super_2.rs +++ b/tests/ui/macros/macro_with_super_2.rs @@ -1,7 +1,7 @@ -// run-pass -// aux-build:macro_with_super_1.rs +//@ run-pass +//@ aux-build:macro_with_super_1.rs -// pretty-expanded FIXME #23616 +//@ pretty-expanded FIXME #23616 #[macro_use] extern crate macro_with_super_1; diff --git a/tests/ui/macros/macros-in-extern.rs b/tests/ui/macros/macros-in-extern.rs index 568ae3a8539..363ff5df64a 100644 --- a/tests/ui/macros/macros-in-extern.rs +++ b/tests/ui/macros/macros-in-extern.rs @@ -1,5 +1,5 @@ -// run-pass -// ignore-wasm32 +//@ run-pass +//@ ignore-wasm32 #![feature(decl_macro)] diff --git a/tests/ui/macros/macros-nonfatal-errors.rs b/tests/ui/macros/macros-nonfatal-errors.rs index ab14c35893d..20e6d705003 100644 --- a/tests/ui/macros/macros-nonfatal-errors.rs +++ b/tests/ui/macros/macros-nonfatal-errors.rs @@ -1,4 +1,4 @@ -// normalize-stderr-test: "existed:.*\(" -> "existed: $$FILE_NOT_FOUND_MSG (" +//@ normalize-stderr-test: "existed:.*\(" -> "existed: $$FILE_NOT_FOUND_MSG (" // test that errors in a (selection) of macros don't kill compilation // immediately, so that we get more errors listed at a time. diff --git a/tests/ui/macros/meta-variable-misuse.rs b/tests/ui/macros/meta-variable-misuse.rs index 99a2f940176..da733e7b74c 100644 --- a/tests/ui/macros/meta-variable-misuse.rs +++ b/tests/ui/macros/meta-variable-misuse.rs @@ -1,4 +1,4 @@ -// run-pass +//@ run-pass #![deny(meta_variable_misuse)] macro_rules! foo { diff --git a/tests/ui/macros/missing-bang-in-decl.fixed b/tests/ui/macros/missing-bang-in-decl.fixed index b1aa3298bfa..b7e49244450 100644 --- a/tests/ui/macros/missing-bang-in-decl.fixed +++ b/tests/ui/macros/missing-bang-in-decl.fixed @@ -1,4 +1,4 @@ -// run-rustfix +//@ run-rustfix #![allow(unused_macros)] diff --git a/tests/ui/macros/missing-bang-in-decl.rs b/tests/ui/macros/missing-bang-in-decl.rs index 8393f15fc52..452363997e7 100644 --- a/tests/ui/macros/missing-bang-in-decl.rs +++ b/tests/ui/macros/missing-bang-in-decl.rs @@ -1,4 +1,4 @@ -// run-rustfix +//@ run-rustfix #![allow(unused_macros)] diff --git a/tests/ui/macros/must-use-in-macro-55516.rs b/tests/ui/macros/must-use-in-macro-55516.rs index e7c3462867b..21f417d0e63 100644 --- a/tests/ui/macros/must-use-in-macro-55516.rs +++ b/tests/ui/macros/must-use-in-macro-55516.rs @@ -1,5 +1,5 @@ -// check-pass -// compile-flags: -Wunused +//@ check-pass +//@ compile-flags: -Wunused // make sure write!() can't hide its unused Result diff --git a/tests/ui/macros/nested-use-as.rs b/tests/ui/macros/nested-use-as.rs index 21aa81e8092..b4ce5328e62 100644 --- a/tests/ui/macros/nested-use-as.rs +++ b/tests/ui/macros/nested-use-as.rs @@ -1,5 +1,5 @@ -// check-pass -// edition:2018 +//@ check-pass +//@ edition:2018 // issue: https://github.com/rust-lang/rust/issues/97534 macro_rules! m { diff --git a/tests/ui/macros/no-std-macros.rs b/tests/ui/macros/no-std-macros.rs index ada643c7ac0..be0f5921598 100644 --- a/tests/ui/macros/no-std-macros.rs +++ b/tests/ui/macros/no-std-macros.rs @@ -1,5 +1,5 @@ -// compile-flags: --crate-type=lib -// check-pass +//@ compile-flags: --crate-type=lib +//@ check-pass // issue #55482 #![no_std] diff --git a/tests/ui/macros/none-delim-lookahead.rs b/tests/ui/macros/none-delim-lookahead.rs index bf4fddea14b..b604339be9b 100644 --- a/tests/ui/macros/none-delim-lookahead.rs +++ b/tests/ui/macros/none-delim-lookahead.rs @@ -1,4 +1,4 @@ -// check-pass +//@ check-pass macro_rules! make_struct { ($name:ident) => { diff --git a/tests/ui/macros/not-utf8.rs b/tests/ui/macros/not-utf8.rs index 1cb1fdcb8c9..3c433a4e27c 100644 --- a/tests/ui/macros/not-utf8.rs +++ b/tests/ui/macros/not-utf8.rs @@ -1,4 +1,4 @@ -// error-pattern: did not contain valid UTF-8 +//@ error-pattern: did not contain valid UTF-8 fn foo() { include!("not-utf8.bin") diff --git a/tests/ui/macros/out-of-order-shadowing.rs b/tests/ui/macros/out-of-order-shadowing.rs index a0d1a973764..3d26d4f2c91 100644 --- a/tests/ui/macros/out-of-order-shadowing.rs +++ b/tests/ui/macros/out-of-order-shadowing.rs @@ -1,4 +1,4 @@ -// aux-build:define-macro.rs +//@ aux-build:define-macro.rs macro_rules! bar { () => {} } define_macro!(bar); diff --git a/tests/ui/macros/panic-temporaries-2018.rs b/tests/ui/macros/panic-temporaries-2018.rs index d914df38062..aa7a7453aa7 100644 --- a/tests/ui/macros/panic-temporaries-2018.rs +++ b/tests/ui/macros/panic-temporaries-2018.rs @@ -1,5 +1,5 @@ -// check-pass -// edition:2018 +//@ check-pass +//@ edition:2018 #![allow(non_fmt_panics, unreachable_code)] diff --git a/tests/ui/macros/panic-temporaries.rs b/tests/ui/macros/panic-temporaries.rs index db65601fb73..6a0d71c9797 100644 --- a/tests/ui/macros/panic-temporaries.rs +++ b/tests/ui/macros/panic-temporaries.rs @@ -1,5 +1,5 @@ -// check-pass -// edition:2021 +//@ check-pass +//@ edition:2021 #![allow(unreachable_code)] diff --git a/tests/ui/macros/parse-complex-macro-invoc-op.rs b/tests/ui/macros/parse-complex-macro-invoc-op.rs index 10810388d20..bbb9b0270f2 100644 --- a/tests/ui/macros/parse-complex-macro-invoc-op.rs +++ b/tests/ui/macros/parse-complex-macro-invoc-op.rs @@ -1,4 +1,4 @@ -// run-pass +//@ run-pass #![allow(unused_must_use)] #![allow(dead_code)] #![allow(unused_assignments)] @@ -8,7 +8,7 @@ // Test parsing binary operators after macro invocations. -// pretty-expanded FIXME #23616 +//@ pretty-expanded FIXME #23616 #![feature(macro_rules)] diff --git a/tests/ui/macros/paths-in-macro-invocations.rs b/tests/ui/macros/paths-in-macro-invocations.rs index 622818a926f..c1b7789d6de 100644 --- a/tests/ui/macros/paths-in-macro-invocations.rs +++ b/tests/ui/macros/paths-in-macro-invocations.rs @@ -1,6 +1,6 @@ -// run-pass +//@ run-pass #![allow(dead_code)] -// aux-build:two_macros-rpass.rs +//@ aux-build:two_macros-rpass.rs extern crate two_macros_rpass as two_macros; diff --git a/tests/ui/macros/proc_macro.rs b/tests/ui/macros/proc_macro.rs index 66f9cdc5567..ce2b041c26e 100644 --- a/tests/ui/macros/proc_macro.rs +++ b/tests/ui/macros/proc_macro.rs @@ -1,6 +1,6 @@ -// run-pass -// aux-build:proc_macro_def.rs -// ignore-cross-compile +//@ run-pass +//@ aux-build:proc_macro_def.rs +//@ ignore-cross-compile extern crate proc_macro_def; diff --git a/tests/ui/macros/pub-item-inside-macro.rs b/tests/ui/macros/pub-item-inside-macro.rs index d07681453a2..b05d8539d58 100644 --- a/tests/ui/macros/pub-item-inside-macro.rs +++ b/tests/ui/macros/pub-item-inside-macro.rs @@ -1,7 +1,7 @@ -// run-pass +//@ run-pass // Issue #14660 -// pretty-expanded FIXME #23616 +//@ pretty-expanded FIXME #23616 mod bleh { macro_rules! foo { diff --git a/tests/ui/macros/pub-method-inside-macro.rs b/tests/ui/macros/pub-method-inside-macro.rs index bc918c7a4dc..c4f9acc637d 100644 --- a/tests/ui/macros/pub-method-inside-macro.rs +++ b/tests/ui/macros/pub-method-inside-macro.rs @@ -1,7 +1,7 @@ -// run-pass +//@ run-pass // Issue #17436 -// pretty-expanded FIXME #23616 +//@ pretty-expanded FIXME #23616 mod bleh { macro_rules! foo { diff --git a/tests/ui/macros/recovery-forbidden.rs b/tests/ui/macros/recovery-forbidden.rs index 5dd2619330c..dc50d8b9dd8 100644 --- a/tests/ui/macros/recovery-forbidden.rs +++ b/tests/ui/macros/recovery-forbidden.rs @@ -1,4 +1,4 @@ -// check-pass +//@ check-pass macro_rules! dont_recover_here { ($e:expr) => { diff --git a/tests/ui/macros/rfc-2011-nicer-assert-messages/all-expr-kinds.rs b/tests/ui/macros/rfc-2011-nicer-assert-messages/all-expr-kinds.rs index b1db05afd08..de7dbb9052e 100644 --- a/tests/ui/macros/rfc-2011-nicer-assert-messages/all-expr-kinds.rs +++ b/tests/ui/macros/rfc-2011-nicer-assert-messages/all-expr-kinds.rs @@ -1,8 +1,8 @@ -// edition:2021 +//@ edition:2021 // ignore-tidy-linelength -// only-x86_64 -// run-pass -// needs-unwind Asserting on contents of error message +//@ only-x86_64 +//@ run-pass +//@ needs-unwind Asserting on contents of error message #![allow(path_statements, unused_allocation)] #![feature(core_intrinsics, generic_assert)] diff --git a/tests/ui/macros/rfc-2011-nicer-assert-messages/all-not-available-cases.rs b/tests/ui/macros/rfc-2011-nicer-assert-messages/all-not-available-cases.rs index fcf4f367d04..1600fd0af3f 100644 --- a/tests/ui/macros/rfc-2011-nicer-assert-messages/all-not-available-cases.rs +++ b/tests/ui/macros/rfc-2011-nicer-assert-messages/all-not-available-cases.rs @@ -1,8 +1,8 @@ -// aux-build:common.rs +//@ aux-build:common.rs // ignore-tidy-linelength -// only-x86_64 -// run-pass -// needs-unwind Asserting on contents of error message +//@ only-x86_64 +//@ run-pass +//@ needs-unwind Asserting on contents of error message #![feature(core_intrinsics, generic_assert)] diff --git a/tests/ui/macros/rfc-2011-nicer-assert-messages/assert-with-custom-errors-does-not-create-unnecessary-code.rs b/tests/ui/macros/rfc-2011-nicer-assert-messages/assert-with-custom-errors-does-not-create-unnecessary-code.rs index c8408d16fbb..37d94830db2 100644 --- a/tests/ui/macros/rfc-2011-nicer-assert-messages/assert-with-custom-errors-does-not-create-unnecessary-code.rs +++ b/tests/ui/macros/rfc-2011-nicer-assert-messages/assert-with-custom-errors-does-not-create-unnecessary-code.rs @@ -1,5 +1,5 @@ -// compile-flags: --test -// run-pass +//@ compile-flags: --test +//@ run-pass #![feature(core_intrinsics, generic_assert)] diff --git a/tests/ui/macros/rfc-2011-nicer-assert-messages/assert-without-captures-does-not-create-unnecessary-code.rs b/tests/ui/macros/rfc-2011-nicer-assert-messages/assert-without-captures-does-not-create-unnecessary-code.rs index 0e3c14a5770..6e5f8d6cd12 100644 --- a/tests/ui/macros/rfc-2011-nicer-assert-messages/assert-without-captures-does-not-create-unnecessary-code.rs +++ b/tests/ui/macros/rfc-2011-nicer-assert-messages/assert-without-captures-does-not-create-unnecessary-code.rs @@ -1,7 +1,7 @@ -// aux-build:common.rs -// only-x86_64 -// run-pass -// needs-unwind Asserting on contents of error message +//@ aux-build:common.rs +//@ only-x86_64 +//@ run-pass +//@ needs-unwind Asserting on contents of error message #![feature(core_intrinsics, generic_assert)] diff --git a/tests/ui/macros/rfc-2011-nicer-assert-messages/feature-gate-generic_assert.rs b/tests/ui/macros/rfc-2011-nicer-assert-messages/feature-gate-generic_assert.rs index 0d2518dc253..86cc7adb90d 100644 --- a/tests/ui/macros/rfc-2011-nicer-assert-messages/feature-gate-generic_assert.rs +++ b/tests/ui/macros/rfc-2011-nicer-assert-messages/feature-gate-generic_assert.rs @@ -1,6 +1,6 @@ -// compile-flags: --test +//@ compile-flags: --test // ignore-tidy-linelength -// run-pass +//@ run-pass #![feature(core_intrinsics, generic_assert)] diff --git a/tests/ui/macros/rfc-2011-nicer-assert-messages/non-consuming-methods-have-optimized-codegen.rs b/tests/ui/macros/rfc-2011-nicer-assert-messages/non-consuming-methods-have-optimized-codegen.rs index 57b79a56b7b..cf47a1e67ae 100644 --- a/tests/ui/macros/rfc-2011-nicer-assert-messages/non-consuming-methods-have-optimized-codegen.rs +++ b/tests/ui/macros/rfc-2011-nicer-assert-messages/non-consuming-methods-have-optimized-codegen.rs @@ -1,5 +1,5 @@ -// check-pass -// compile-flags: -Z unpretty=expanded +//@ check-pass +//@ compile-flags: -Z unpretty=expanded #![feature(core_intrinsics, generic_assert)] diff --git a/tests/ui/macros/rfc-2011-nicer-assert-messages/non-consuming-methods-have-optimized-codegen.stdout b/tests/ui/macros/rfc-2011-nicer-assert-messages/non-consuming-methods-have-optimized-codegen.stdout index 66321bc35f0..8065d0dff8f 100644 --- a/tests/ui/macros/rfc-2011-nicer-assert-messages/non-consuming-methods-have-optimized-codegen.stdout +++ b/tests/ui/macros/rfc-2011-nicer-assert-messages/non-consuming-methods-have-optimized-codegen.stdout @@ -1,7 +1,7 @@ #![feature(prelude_import)] #![no_std] -// check-pass -// compile-flags: -Z unpretty=expanded +//@ check-pass +//@ compile-flags: -Z unpretty=expanded #![feature(core_intrinsics, generic_assert)] #[prelude_import] diff --git a/tests/ui/macros/rfc-3086-metavar-expr/count-and-length-are-distinct.rs b/tests/ui/macros/rfc-3086-metavar-expr/count-and-length-are-distinct.rs index 1b8ce10ccce..3a14e0c64fd 100644 --- a/tests/ui/macros/rfc-3086-metavar-expr/count-and-length-are-distinct.rs +++ b/tests/ui/macros/rfc-3086-metavar-expr/count-and-length-are-distinct.rs @@ -1,4 +1,4 @@ -// run-pass +//@ run-pass #![feature(macro_metavar_expr)] diff --git a/tests/ui/macros/rfc-3086-metavar-expr/dollar-dollar-has-correct-behavior.rs b/tests/ui/macros/rfc-3086-metavar-expr/dollar-dollar-has-correct-behavior.rs index ed94c27cf05..9b8e3216a68 100644 --- a/tests/ui/macros/rfc-3086-metavar-expr/dollar-dollar-has-correct-behavior.rs +++ b/tests/ui/macros/rfc-3086-metavar-expr/dollar-dollar-has-correct-behavior.rs @@ -1,4 +1,4 @@ -// run-pass +//@ run-pass #![feature(macro_metavar_expr)] diff --git a/tests/ui/macros/rfc-3086-metavar-expr/feature-gate-macro_metavar_expr.rs b/tests/ui/macros/rfc-3086-metavar-expr/feature-gate-macro_metavar_expr.rs index 950e70153ba..6464fd6f2fd 100644 --- a/tests/ui/macros/rfc-3086-metavar-expr/feature-gate-macro_metavar_expr.rs +++ b/tests/ui/macros/rfc-3086-metavar-expr/feature-gate-macro_metavar_expr.rs @@ -1,4 +1,4 @@ -// run-pass +//@ run-pass #![feature(macro_metavar_expr)] diff --git a/tests/ui/macros/rfc-3086-metavar-expr/macro-expansion.rs b/tests/ui/macros/rfc-3086-metavar-expr/macro-expansion.rs index 04924f0efa6..787b927c449 100644 --- a/tests/ui/macros/rfc-3086-metavar-expr/macro-expansion.rs +++ b/tests/ui/macros/rfc-3086-metavar-expr/macro-expansion.rs @@ -1,4 +1,4 @@ -// run-pass +//@ run-pass #![feature(macro_metavar_expr)] diff --git a/tests/ui/macros/same-sequence-span.rs b/tests/ui/macros/same-sequence-span.rs index e0bb4d98525..67f6b6ad1cd 100644 --- a/tests/ui/macros/same-sequence-span.rs +++ b/tests/ui/macros/same-sequence-span.rs @@ -1,4 +1,4 @@ -// aux-build:proc_macro_sequence.rs +//@ aux-build:proc_macro_sequence.rs // Regression test for issue #62831: Check that multiple sequences with the same span in the // left-hand side of a macro definition behave as if they had unique spans, and in particular that diff --git a/tests/ui/macros/semi-after-macro-ty.rs b/tests/ui/macros/semi-after-macro-ty.rs index f83ace8fada..60afc3b4450 100644 --- a/tests/ui/macros/semi-after-macro-ty.rs +++ b/tests/ui/macros/semi-after-macro-ty.rs @@ -1,4 +1,4 @@ -// run-pass +//@ run-pass macro_rules! foo { ($t:ty; $p:path;) => {} } diff --git a/tests/ui/macros/stmt_expr_attr_macro_parse.rs b/tests/ui/macros/stmt_expr_attr_macro_parse.rs index 570191d2c90..82e05a7e0e2 100644 --- a/tests/ui/macros/stmt_expr_attr_macro_parse.rs +++ b/tests/ui/macros/stmt_expr_attr_macro_parse.rs @@ -1,4 +1,4 @@ -// run-pass +//@ run-pass #![allow(unused_macro_rules)] macro_rules! m { diff --git a/tests/ui/macros/stringify.rs b/tests/ui/macros/stringify.rs index 8cef833f48d..492bd2450b1 100644 --- a/tests/ui/macros/stringify.rs +++ b/tests/ui/macros/stringify.rs @@ -1,6 +1,6 @@ -// run-pass -// edition:2021 -// compile-flags: --test +//@ run-pass +//@ edition:2021 +//@ compile-flags: --test #![allow(incomplete_features)] #![feature(async_closure)] diff --git a/tests/ui/macros/syntax-extension-cfg.rs b/tests/ui/macros/syntax-extension-cfg.rs index 2e929fc1dfa..56d869f3dc1 100644 --- a/tests/ui/macros/syntax-extension-cfg.rs +++ b/tests/ui/macros/syntax-extension-cfg.rs @@ -1,5 +1,5 @@ -// run-pass -// compile-flags: --cfg foo --cfg qux="foo" +//@ run-pass +//@ compile-flags: --cfg foo --cfg qux="foo" pub fn main() { diff --git a/tests/ui/macros/syntax-extension-source-utils.rs b/tests/ui/macros/syntax-extension-source-utils.rs index aa894c83910..a16ebdc7504 100644 --- a/tests/ui/macros/syntax-extension-source-utils.rs +++ b/tests/ui/macros/syntax-extension-source-utils.rs @@ -1,4 +1,4 @@ -// run-pass +//@ run-pass #![allow(stable_features)] diff --git a/tests/ui/macros/trace-macro.rs b/tests/ui/macros/trace-macro.rs index 576120811db..ecc6aabe8ca 100644 --- a/tests/ui/macros/trace-macro.rs +++ b/tests/ui/macros/trace-macro.rs @@ -1,5 +1,5 @@ -// compile-flags: -Z trace-macros -// build-pass (FIXME(62277): could be check-pass?) +//@ compile-flags: -Z trace-macros +//@ build-pass (FIXME(62277): could be check-pass?) fn main() { println!("Hello, World!"); diff --git a/tests/ui/macros/trace_faulty_macros.rs b/tests/ui/macros/trace_faulty_macros.rs index 00eb7593799..ec1ce1a1f92 100644 --- a/tests/ui/macros/trace_faulty_macros.rs +++ b/tests/ui/macros/trace_faulty_macros.rs @@ -1,4 +1,4 @@ -// compile-flags: -Z trace-macros +//@ compile-flags: -Z trace-macros #![recursion_limit = "4"] diff --git a/tests/ui/macros/try-macro.rs b/tests/ui/macros/try-macro.rs index 824c77d9de5..b579143583e 100644 --- a/tests/ui/macros/try-macro.rs +++ b/tests/ui/macros/try-macro.rs @@ -1,4 +1,4 @@ -// run-pass +//@ run-pass #![allow(deprecated)] // for deprecated `try!()` macro use std::num::{ParseFloatError, ParseIntError}; diff --git a/tests/ui/macros/two-macro-use.rs b/tests/ui/macros/two-macro-use.rs index 07022bb01e3..8bb3c9da305 100644 --- a/tests/ui/macros/two-macro-use.rs +++ b/tests/ui/macros/two-macro-use.rs @@ -1,5 +1,5 @@ -// run-pass -// aux-build:two_macros.rs +//@ run-pass +//@ aux-build:two_macros.rs #[macro_use(macro_one)] #[macro_use(macro_two)] diff --git a/tests/ui/macros/type-macros-hlist.rs b/tests/ui/macros/type-macros-hlist.rs index 946b5bd5d93..b36aca1576f 100644 --- a/tests/ui/macros/type-macros-hlist.rs +++ b/tests/ui/macros/type-macros-hlist.rs @@ -1,4 +1,4 @@ -// run-pass +//@ run-pass #![allow(unused_macro_rules)] use std::ops::*; diff --git a/tests/ui/macros/type-macros-simple.rs b/tests/ui/macros/type-macros-simple.rs index dd3ad2ef0ac..4d1001baf59 100644 --- a/tests/ui/macros/type-macros-simple.rs +++ b/tests/ui/macros/type-macros-simple.rs @@ -1,4 +1,4 @@ -// run-pass +//@ run-pass #![allow(dead_code)] #![allow(unused_variables)] macro_rules! Tuple { diff --git a/tests/ui/macros/typeck-macro-interaction-issue-8852.rs b/tests/ui/macros/typeck-macro-interaction-issue-8852.rs index f2b089b74b5..bdd4b058381 100644 --- a/tests/ui/macros/typeck-macro-interaction-issue-8852.rs +++ b/tests/ui/macros/typeck-macro-interaction-issue-8852.rs @@ -1,4 +1,4 @@ -// run-pass +//@ run-pass #![allow(dead_code)] enum T { diff --git a/tests/ui/macros/unimplemented-macro-panic.rs b/tests/ui/macros/unimplemented-macro-panic.rs index e7169903f8e..d3bff8ca10b 100644 --- a/tests/ui/macros/unimplemented-macro-panic.rs +++ b/tests/ui/macros/unimplemented-macro-panic.rs @@ -1,6 +1,6 @@ -// run-fail -// error-pattern:not implemented -// ignore-emscripten no processes +//@ run-fail +//@ error-pattern:not implemented +//@ ignore-emscripten no processes fn main() { unimplemented!() diff --git a/tests/ui/macros/unknown-builtin.rs b/tests/ui/macros/unknown-builtin.rs index 16f9139e647..048f5d68d34 100644 --- a/tests/ui/macros/unknown-builtin.rs +++ b/tests/ui/macros/unknown-builtin.rs @@ -1,4 +1,4 @@ -// error-pattern: attempted to define built-in macro more than once +//@ error-pattern: attempted to define built-in macro more than once #![feature(rustc_attrs)] diff --git a/tests/ui/macros/unreachable-arg.rs b/tests/ui/macros/unreachable-arg.rs index 4024bd20b79..1f0d0073486 100644 --- a/tests/ui/macros/unreachable-arg.rs +++ b/tests/ui/macros/unreachable-arg.rs @@ -1,12 +1,12 @@ -// ignore-emscripten no processes +//@ ignore-emscripten no processes -// revisions: edition_2015 edition_2021 -// [edition_2015]edition:2015 -// [edition_2021]edition:2021 -// [edition_2015]run-fail -// [edition_2021]check-fail -// [edition_2015]error-pattern:internal error: entered unreachable code: hello -// [edition_2021]error-pattern:format argument must be a string literal +//@ revisions: edition_2015 edition_2021 +//@ [edition_2015]edition:2015 +//@ [edition_2021]edition:2021 +//@ [edition_2015]run-fail +//@ [edition_2021]check-fail +//@ [edition_2015]error-pattern:internal error: entered unreachable code: hello +//@ [edition_2021]error-pattern:format argument must be a string literal #![allow(non_fmt_panics)] diff --git a/tests/ui/macros/unreachable-fmt-msg.rs b/tests/ui/macros/unreachable-fmt-msg.rs index eb17ed92711..b16394a1920 100644 --- a/tests/ui/macros/unreachable-fmt-msg.rs +++ b/tests/ui/macros/unreachable-fmt-msg.rs @@ -1,6 +1,6 @@ -// run-fail -// error-pattern:internal error: entered unreachable code: 6 is not prime -// ignore-emscripten no processes +//@ run-fail +//@ error-pattern:internal error: entered unreachable code: 6 is not prime +//@ ignore-emscripten no processes fn main() { unreachable!("{} is not {}", 6u32, "prime"); diff --git a/tests/ui/macros/unreachable-format-arg.rs b/tests/ui/macros/unreachable-format-arg.rs index ff059ad9e15..449c6bca16b 100644 --- a/tests/ui/macros/unreachable-format-arg.rs +++ b/tests/ui/macros/unreachable-format-arg.rs @@ -1,11 +1,11 @@ -// run-fail -// ignore-emscripten no processes +//@ run-fail +//@ ignore-emscripten no processes -// revisions: edition_2015 edition_2021 -// [edition_2015]edition:2015 -// [edition_2021]edition:2021 -// [edition_2015]error-pattern:internal error: entered unreachable code: x is {x} -// [edition_2021]error-pattern:internal error: entered unreachable code: x is 5 +//@ revisions: edition_2015 edition_2021 +//@ [edition_2015]edition:2015 +//@ [edition_2021]edition:2021 +//@ [edition_2015]error-pattern:internal error: entered unreachable code: x is {x} +//@ [edition_2021]error-pattern:internal error: entered unreachable code: x is 5 #![allow(non_fmt_panics)] diff --git a/tests/ui/macros/unreachable-format-args.rs b/tests/ui/macros/unreachable-format-args.rs index 04a31fc1ba3..5f8a0e9cdff 100644 --- a/tests/ui/macros/unreachable-format-args.rs +++ b/tests/ui/macros/unreachable-format-args.rs @@ -1,12 +1,12 @@ -// ignore-emscripten no processes +//@ ignore-emscripten no processes -// revisions: edition_2015 edition_2021 -// [edition_2015]edition:2015 -// [edition_2021]edition:2021 -// [edition_2015]check-fail -// [edition_2021]run-fail -// [edition_2015]error-pattern:there is no argument named `x` -// [edition_2021]error-pattern:internal error: entered unreachable code: x is 5 and y is 0 +//@ revisions: edition_2015 edition_2021 +//@ [edition_2015]edition:2015 +//@ [edition_2021]edition:2021 +//@ [edition_2015]check-fail +//@ [edition_2021]run-fail +//@ [edition_2015]error-pattern:there is no argument named `x` +//@ [edition_2021]error-pattern:internal error: entered unreachable code: x is 5 and y is 0 fn main() { let x = 5; diff --git a/tests/ui/macros/unreachable-macro-panic.rs b/tests/ui/macros/unreachable-macro-panic.rs index 55e2102e2cc..7909bcb7624 100644 --- a/tests/ui/macros/unreachable-macro-panic.rs +++ b/tests/ui/macros/unreachable-macro-panic.rs @@ -1,6 +1,6 @@ -// run-fail -// error-pattern:internal error: entered unreachable code -// ignore-emscripten no processes +//@ run-fail +//@ error-pattern:internal error: entered unreachable code +//@ ignore-emscripten no processes fn main() { unreachable!() diff --git a/tests/ui/macros/unreachable-static-msg.rs b/tests/ui/macros/unreachable-static-msg.rs index 55edf3af7d9..3e917897da4 100644 --- a/tests/ui/macros/unreachable-static-msg.rs +++ b/tests/ui/macros/unreachable-static-msg.rs @@ -1,6 +1,6 @@ -// run-fail -// error-pattern:internal error: entered unreachable code: uhoh -// ignore-emscripten no processes +//@ run-fail +//@ error-pattern:internal error: entered unreachable code: uhoh +//@ ignore-emscripten no processes fn main() { unreachable!("uhoh") diff --git a/tests/ui/macros/unreachable.rs b/tests/ui/macros/unreachable.rs index 55e2102e2cc..7909bcb7624 100644 --- a/tests/ui/macros/unreachable.rs +++ b/tests/ui/macros/unreachable.rs @@ -1,6 +1,6 @@ -// run-fail -// error-pattern:internal error: entered unreachable code -// ignore-emscripten no processes +//@ run-fail +//@ error-pattern:internal error: entered unreachable code +//@ ignore-emscripten no processes fn main() { unreachable!() diff --git a/tests/ui/macros/use-macro-self.rs b/tests/ui/macros/use-macro-self.rs index 06464ab0bc9..1d15b8386af 100644 --- a/tests/ui/macros/use-macro-self.rs +++ b/tests/ui/macros/use-macro-self.rs @@ -1,6 +1,6 @@ -// run-pass +//@ run-pass #![allow(unused_imports)] -// aux-build:use-macro-self.rs +//@ aux-build:use-macro-self.rs #[macro_use] extern crate use_macro_self; diff --git a/tests/ui/macros/user-defined-macro-rules.rs b/tests/ui/macros/user-defined-macro-rules.rs index 09e071ec454..baabe0e90c4 100644 --- a/tests/ui/macros/user-defined-macro-rules.rs +++ b/tests/ui/macros/user-defined-macro-rules.rs @@ -1,4 +1,4 @@ -// check-pass +//@ check-pass macro_rules! macro_rules { () => { struct S; } } // OK diff --git a/tests/ui/malformed/issue-107423-unused-delim-only-one-no-pair.rs b/tests/ui/malformed/issue-107423-unused-delim-only-one-no-pair.rs index 4003ee37ca1..da56fe03184 100644 --- a/tests/ui/malformed/issue-107423-unused-delim-only-one-no-pair.rs +++ b/tests/ui/malformed/issue-107423-unused-delim-only-one-no-pair.rs @@ -1,7 +1,7 @@ // check that we don't generate a span that points beyond EOF -// error-pattern: unclosed delimiter -// error-pattern: unclosed delimiter -// error-pattern: unclosed delimiter +//@ error-pattern: unclosed delimiter +//@ error-pattern: unclosed delimiter +//@ error-pattern: unclosed delimiter fn a(){{{ diff --git a/tests/ui/manual/manual-link-bad-form.rs b/tests/ui/manual/manual-link-bad-form.rs index bc9b6be0294..0f5723adec9 100644 --- a/tests/ui/manual/manual-link-bad-form.rs +++ b/tests/ui/manual/manual-link-bad-form.rs @@ -1,5 +1,5 @@ -// compile-flags:-l static= -// error-pattern: library name must not be empty +//@ compile-flags:-l static= +//@ error-pattern: library name must not be empty fn main() { } diff --git a/tests/ui/manual/manual-link-bad-kind.rs b/tests/ui/manual/manual-link-bad-kind.rs index c50a6c034b5..d070faa6574 100644 --- a/tests/ui/manual/manual-link-bad-kind.rs +++ b/tests/ui/manual/manual-link-bad-kind.rs @@ -1,5 +1,5 @@ -// compile-flags:-l bar=foo -// error-pattern: unknown library kind `bar`, expected one of: static, dylib, framework, link-arg +//@ compile-flags:-l bar=foo +//@ error-pattern: unknown library kind `bar`, expected one of: static, dylib, framework, link-arg fn main() { } diff --git a/tests/ui/manual/manual-link-bad-search-path.rs b/tests/ui/manual/manual-link-bad-search-path.rs index 0fe23b02aa9..c9ced4734fc 100644 --- a/tests/ui/manual/manual-link-bad-search-path.rs +++ b/tests/ui/manual/manual-link-bad-search-path.rs @@ -1,5 +1,5 @@ -// compile-flags:-L native= -// error-pattern: empty search path given via `-L` +//@ compile-flags:-L native= +//@ error-pattern: empty search path given via `-L` fn main() { } diff --git a/tests/ui/manual/manual-link-framework.rs b/tests/ui/manual/manual-link-framework.rs index 57c5966e960..06fd76f68df 100644 --- a/tests/ui/manual/manual-link-framework.rs +++ b/tests/ui/manual/manual-link-framework.rs @@ -1,7 +1,7 @@ -// ignore-macos -// ignore-ios -// compile-flags:-l framework=foo -// error-pattern: library kind `framework` is only supported on Apple targets +//@ ignore-macos +//@ ignore-ios +//@ compile-flags:-l framework=foo +//@ error-pattern: library kind `framework` is only supported on Apple targets fn main() { } diff --git a/tests/ui/manual/manual-link-unsupported-kind.rs b/tests/ui/manual/manual-link-unsupported-kind.rs index b8ec575a455..b5b9e3e6577 100644 --- a/tests/ui/manual/manual-link-unsupported-kind.rs +++ b/tests/ui/manual/manual-link-unsupported-kind.rs @@ -1,5 +1,5 @@ -// compile-flags:-l raw-dylib=foo -// error-pattern: unknown library kind `raw-dylib`, expected one of: static, dylib, framework, link-arg +//@ compile-flags:-l raw-dylib=foo +//@ error-pattern: unknown library kind `raw-dylib`, expected one of: static, dylib, framework, link-arg fn main() { } diff --git a/tests/ui/marker_trait_attr/issue-61651-type-mismatch.rs b/tests/ui/marker_trait_attr/issue-61651-type-mismatch.rs index 0af706615e3..2846f540b24 100644 --- a/tests/ui/marker_trait_attr/issue-61651-type-mismatch.rs +++ b/tests/ui/marker_trait_attr/issue-61651-type-mismatch.rs @@ -1,4 +1,4 @@ -// check-pass +//@ check-pass // Regression test for issue #61651 // Verifies that we don't try to constrain inference // variables due to the presence of multiple applicable diff --git a/tests/ui/marker_trait_attr/overlap-doesnt-conflict-with-specialization.rs b/tests/ui/marker_trait_attr/overlap-doesnt-conflict-with-specialization.rs index 1e413120a37..a9f0cdae1f6 100644 --- a/tests/ui/marker_trait_attr/overlap-doesnt-conflict-with-specialization.rs +++ b/tests/ui/marker_trait_attr/overlap-doesnt-conflict-with-specialization.rs @@ -1,4 +1,4 @@ -// run-pass +//@ run-pass #![feature(marker_trait_attr)] #![feature(specialization)] //~ WARN the feature `specialization` is incomplete diff --git a/tests/ui/marker_trait_attr/overlap-marker-trait-with-static-lifetime.rs b/tests/ui/marker_trait_attr/overlap-marker-trait-with-static-lifetime.rs index b9f1de7ec13..84297de364b 100644 --- a/tests/ui/marker_trait_attr/overlap-marker-trait-with-static-lifetime.rs +++ b/tests/ui/marker_trait_attr/overlap-marker-trait-with-static-lifetime.rs @@ -1,4 +1,4 @@ -// known-bug: #89515 +//@ known-bug: #89515 // // The trait solver cannot deal with ambiguous marker trait impls // if there are lifetimes involved. As we must not special-case any diff --git a/tests/ui/marker_trait_attr/overlap-permitted-for-annotated-marker-traits.rs b/tests/ui/marker_trait_attr/overlap-permitted-for-annotated-marker-traits.rs index f7654458feb..467f002699b 100644 --- a/tests/ui/marker_trait_attr/overlap-permitted-for-annotated-marker-traits.rs +++ b/tests/ui/marker_trait_attr/overlap-permitted-for-annotated-marker-traits.rs @@ -1,4 +1,4 @@ -// run-pass +//@ run-pass // Tests for RFC 1268: we allow overlapping impls of marker traits, // that is, traits with #[marker]. In this case, a type `T` is // `MyMarker` if it is either `Debug` or `Display`. diff --git a/tests/ui/marker_trait_attr/overlapping-impl-1-modulo-regions.rs b/tests/ui/marker_trait_attr/overlapping-impl-1-modulo-regions.rs index 97a814f51ee..b69b893ecc4 100644 --- a/tests/ui/marker_trait_attr/overlapping-impl-1-modulo-regions.rs +++ b/tests/ui/marker_trait_attr/overlapping-impl-1-modulo-regions.rs @@ -1,4 +1,4 @@ -// known-bug: #109481 +//@ known-bug: #109481 // // While the `T: Copy` is always applicable when checking // that the impl `impl F for T {}` is well formed, diff --git a/tests/ui/match/const_non_normal_zst_ref_pattern.rs b/tests/ui/match/const_non_normal_zst_ref_pattern.rs index a114fafb647..834b2fefaa8 100644 --- a/tests/ui/match/const_non_normal_zst_ref_pattern.rs +++ b/tests/ui/match/const_non_normal_zst_ref_pattern.rs @@ -1,4 +1,4 @@ -// check-pass +//@ check-pass const FOO: isize = 10; const ZST: &() = unsafe { std::mem::transmute(FOO) }; diff --git a/tests/ui/match/expr-match-panic-fn.rs b/tests/ui/match/expr-match-panic-fn.rs index ea471717e88..82991d20df8 100644 --- a/tests/ui/match/expr-match-panic-fn.rs +++ b/tests/ui/match/expr-match-panic-fn.rs @@ -1,6 +1,6 @@ -// run-fail -// error-pattern:explicit panic -// ignore-emscripten no processes +//@ run-fail +//@ error-pattern:explicit panic +//@ ignore-emscripten no processes fn f() -> ! { panic!() diff --git a/tests/ui/match/expr-match-panic.rs b/tests/ui/match/expr-match-panic.rs index 53f8a8bd30d..e332ba83b91 100644 --- a/tests/ui/match/expr-match-panic.rs +++ b/tests/ui/match/expr-match-panic.rs @@ -1,6 +1,6 @@ -// run-fail -// error-pattern:explicit panic -// ignore-emscripten no processes +//@ run-fail +//@ error-pattern:explicit panic +//@ ignore-emscripten no processes fn main() { let _x = match true { diff --git a/tests/ui/match/guards-parenthesized-and.rs b/tests/ui/match/guards-parenthesized-and.rs index 3a1c341f3ee..7e3b930d6e8 100644 --- a/tests/ui/match/guards-parenthesized-and.rs +++ b/tests/ui/match/guards-parenthesized-and.rs @@ -1,4 +1,4 @@ -// check-pass +//@ check-pass fn main() { let c = 1; diff --git a/tests/ui/match/guards.rs b/tests/ui/match/guards.rs index 10a4bb67387..13efdf4ef5b 100644 --- a/tests/ui/match/guards.rs +++ b/tests/ui/match/guards.rs @@ -1,4 +1,4 @@ -// run-pass +//@ run-pass #![allow(non_shorthand_field_patterns)] diff --git a/tests/ui/match/issue-112438.rs b/tests/ui/match/issue-112438.rs index 46c69d5ba9c..b2febe29210 100644 --- a/tests/ui/match/issue-112438.rs +++ b/tests/ui/match/issue-112438.rs @@ -1,4 +1,4 @@ -// run-pass +//@ run-pass #![feature(inline_const_pat)] #![allow(dead_code)] fn foo() { diff --git a/tests/ui/match/issue-113012.rs b/tests/ui/match/issue-113012.rs index da7a8b65b97..2b139829510 100644 --- a/tests/ui/match/issue-113012.rs +++ b/tests/ui/match/issue-113012.rs @@ -1,4 +1,4 @@ -// run-pass +//@ run-pass #![allow(dead_code)] struct Foo(()); diff --git a/tests/ui/match/issue-114691.rs b/tests/ui/match/issue-114691.rs index cc17d9ecf05..475f473b1c5 100644 --- a/tests/ui/match/issue-114691.rs +++ b/tests/ui/match/issue-114691.rs @@ -1,4 +1,4 @@ -// run-pass +//@ run-pass // This test used to be miscompiled by LLVM 17. #![allow(dead_code)] diff --git a/tests/ui/match/issue-115681.rs b/tests/ui/match/issue-115681.rs index c41e808e170..4c913d4ba3c 100644 --- a/tests/ui/match/issue-115681.rs +++ b/tests/ui/match/issue-115681.rs @@ -1,5 +1,5 @@ -// run-pass -// compile-flags: -C opt-level=1 +//@ run-pass +//@ compile-flags: -C opt-level=1 // Make sure LLVM does not miscompile this match. fn main() { diff --git a/tests/ui/match/issue-11940.rs b/tests/ui/match/issue-11940.rs index 6815c87edd8..8dba1a6c600 100644 --- a/tests/ui/match/issue-11940.rs +++ b/tests/ui/match/issue-11940.rs @@ -1,4 +1,4 @@ -// run-pass +//@ run-pass const TEST_STR: &'static str = "abcd"; diff --git a/tests/ui/match/issue-18060.rs b/tests/ui/match/issue-18060.rs index b5f3d0f74bc..daba393a3fa 100644 --- a/tests/ui/match/issue-18060.rs +++ b/tests/ui/match/issue-18060.rs @@ -1,4 +1,4 @@ -// run-pass +//@ run-pass // Regression test for #18060: match arms were matching in the wrong order. fn main() { diff --git a/tests/ui/match/issue-26251.rs b/tests/ui/match/issue-26251.rs index a3e26a41232..b1a81fcf209 100644 --- a/tests/ui/match/issue-26251.rs +++ b/tests/ui/match/issue-26251.rs @@ -1,4 +1,4 @@ -// run-pass +//@ run-pass #![allow(overlapping_range_endpoints)] fn main() { diff --git a/tests/ui/match/issue-26996.rs b/tests/ui/match/issue-26996.rs index 9ea4545268b..c4dfffa1c9e 100644 --- a/tests/ui/match/issue-26996.rs +++ b/tests/ui/match/issue-26996.rs @@ -1,10 +1,10 @@ -// run-pass +//@ run-pass // This test is bogus (i.e., should be check-fail) during the period // where #54986 is implemented and #54987 is *not* implemented. For // now: just ignore it // -// ignore-test (#54987) +//@ ignore-test (#54987) // This test is checking that the write to `c.0` (which has been moved out of) // won't overwrite the state in `c2`. diff --git a/tests/ui/match/issue-27021.rs b/tests/ui/match/issue-27021.rs index 9630e9a0327..b0b9000d92b 100644 --- a/tests/ui/match/issue-27021.rs +++ b/tests/ui/match/issue-27021.rs @@ -1,10 +1,10 @@ -// run-pass +//@ run-pass // This test is bogus (i.e., should be check-fail) during the period // where #54986 is implemented and #54987 is *not* implemented. For // now: just ignore it // -// ignore-test (#54987) +//@ ignore-test (#54987) // These are variants of issue-26996.rs. In all cases we are writing // into a record field that has been moved out of, and ensuring that diff --git a/tests/ui/match/issue-33498.rs b/tests/ui/match/issue-33498.rs index 9c8a97e7e6b..8d741927a41 100644 --- a/tests/ui/match/issue-33498.rs +++ b/tests/ui/match/issue-33498.rs @@ -1,4 +1,4 @@ -// run-pass +//@ run-pass #![allow(unused_variables)] pub fn main() { let x = (0, 2); diff --git a/tests/ui/match/issue-42679.rs b/tests/ui/match/issue-42679.rs index 46a0bd35d6a..d41ed43a65f 100644 --- a/tests/ui/match/issue-42679.rs +++ b/tests/ui/match/issue-42679.rs @@ -1,4 +1,4 @@ -// run-pass +//@ run-pass #![feature(box_patterns)] #[derive(Debug, PartialEq)] diff --git a/tests/ui/match/issue-46920-byte-array-patterns.rs b/tests/ui/match/issue-46920-byte-array-patterns.rs index 2a8b4bb4922..4809bda8581 100644 --- a/tests/ui/match/issue-46920-byte-array-patterns.rs +++ b/tests/ui/match/issue-46920-byte-array-patterns.rs @@ -1,4 +1,4 @@ -// run-pass +//@ run-pass const CURSOR_PARTITION_LABEL: &'static [u8] = b"partition"; const CURSOR_EVENT_TYPE_LABEL: &'static [u8] = b"event_type"; const BYTE_PATTERN: &'static [u8; 5] = b"hello"; diff --git a/tests/ui/match/issue-5530.rs b/tests/ui/match/issue-5530.rs index 72731cbb177..135955cecfb 100644 --- a/tests/ui/match/issue-5530.rs +++ b/tests/ui/match/issue-5530.rs @@ -1,4 +1,4 @@ -// run-pass +//@ run-pass #![allow(dead_code)] enum Enum { diff --git a/tests/ui/match/issue-72680.rs b/tests/ui/match/issue-72680.rs index c13cace7600..5bae1d7f266 100644 --- a/tests/ui/match/issue-72680.rs +++ b/tests/ui/match/issue-72680.rs @@ -1,4 +1,4 @@ -// run-pass +//@ run-pass fn main() { assert!(f("", 0)); diff --git a/tests/ui/match/issue-72896-non-partial-eq-const.rs b/tests/ui/match/issue-72896-non-partial-eq-const.rs index a3095f0be83..d4972714608 100644 --- a/tests/ui/match/issue-72896-non-partial-eq-const.rs +++ b/tests/ui/match/issue-72896-non-partial-eq-const.rs @@ -1,4 +1,4 @@ -// run-pass +//@ run-pass trait EnumSetType { type Repr; } diff --git a/tests/ui/match/issue-82392.rs b/tests/ui/match/issue-82392.rs index d26d883040b..6f9527fb337 100644 --- a/tests/ui/match/issue-82392.rs +++ b/tests/ui/match/issue-82392.rs @@ -1,6 +1,6 @@ // https://github.com/rust-lang/rust/issues/82329 -// compile-flags: -Zunpretty=hir,typed -// check-pass +//@ compile-flags: -Zunpretty=hir,typed +//@ check-pass pub fn main() { if true { diff --git a/tests/ui/match/issue-82392.stdout b/tests/ui/match/issue-82392.stdout index ffe73074324..8a23d906757 100644 --- a/tests/ui/match/issue-82392.stdout +++ b/tests/ui/match/issue-82392.stdout @@ -3,8 +3,8 @@ use ::std::prelude::rust_2015::*; #[macro_use] extern crate std; // https://github.com/rust-lang/rust/issues/82329 -// compile-flags: -Zunpretty=hir,typed -// check-pass +//@ compile-flags: -Zunpretty=hir,typed +//@ check-pass fn main() ({ (if (true as bool) diff --git a/tests/ui/match/issue-84434.rs b/tests/ui/match/issue-84434.rs index 423481fd5f0..785307df613 100644 --- a/tests/ui/match/issue-84434.rs +++ b/tests/ui/match/issue-84434.rs @@ -1,5 +1,5 @@ // https://github.com/rust-lang/rust/issues/84434 -// check-pass +//@ check-pass use std::path::Path; struct A { diff --git a/tests/ui/match/match-bot-panic.rs b/tests/ui/match/match-bot-panic.rs index e4a6f6d6fe4..a155b5fb3f2 100644 --- a/tests/ui/match/match-bot-panic.rs +++ b/tests/ui/match/match-bot-panic.rs @@ -1,6 +1,6 @@ -// run-fail -// error-pattern:explicit panic -// ignore-emscripten no processes +//@ run-fail +//@ error-pattern:explicit panic +//@ ignore-emscripten no processes #![allow(unreachable_code)] #![allow(unused_variables)] diff --git a/tests/ui/match/match-disc-bot.rs b/tests/ui/match/match-disc-bot.rs index 18cfd5e2395..fdb98a0accb 100644 --- a/tests/ui/match/match-disc-bot.rs +++ b/tests/ui/match/match-disc-bot.rs @@ -1,6 +1,6 @@ -// run-fail -// error-pattern:quux -// ignore-emscripten no processes +//@ run-fail +//@ error-pattern:quux +//@ ignore-emscripten no processes fn f() -> ! { panic!("quux") diff --git a/tests/ui/match/match-float.rs b/tests/ui/match/match-float.rs index 8da6a9ed204..f8514568d15 100644 --- a/tests/ui/match/match-float.rs +++ b/tests/ui/match/match-float.rs @@ -1,4 +1,4 @@ -// run-pass +//@ run-pass // Makes sure we use `==` (not bitwise) semantics for float comparison. fn main() { diff --git a/tests/ui/match/match-on-negative-integer-ranges.rs b/tests/ui/match/match-on-negative-integer-ranges.rs index 53e9ea9a577..855686f55c3 100644 --- a/tests/ui/match/match-on-negative-integer-ranges.rs +++ b/tests/ui/match/match-on-negative-integer-ranges.rs @@ -1,4 +1,4 @@ -// run-pass +//@ run-pass fn main() { assert_eq!(false, match -50_i8 { -128i8..=-101i8 => true, _ => false, }); diff --git a/tests/ui/match/match-ref-mut-stability.rs b/tests/ui/match/match-ref-mut-stability.rs index 52120360be7..90784a4f4b6 100644 --- a/tests/ui/match/match-ref-mut-stability.rs +++ b/tests/ui/match/match-ref-mut-stability.rs @@ -1,7 +1,7 @@ // Check that `ref mut` variables don't change address between the match guard // and the arm expression. -// run-pass +//@ run-pass // Test that z always point to the same temporary. fn referent_stability() { diff --git a/tests/ui/match/match-wildcards.rs b/tests/ui/match/match-wildcards.rs index 43f6e4913ac..4fddee6666e 100644 --- a/tests/ui/match/match-wildcards.rs +++ b/tests/ui/match/match-wildcards.rs @@ -1,6 +1,6 @@ -// run-fail -// error-pattern:squirrelcupcake -// ignore-emscripten no processes +//@ run-fail +//@ error-pattern:squirrelcupcake +//@ ignore-emscripten no processes fn cmp() -> isize { match (Some('a'), None::) { diff --git a/tests/ui/match/match_non_exhaustive.rs b/tests/ui/match/match_non_exhaustive.rs index f162dd60f50..25ff0942833 100644 --- a/tests/ui/match/match_non_exhaustive.rs +++ b/tests/ui/match/match_non_exhaustive.rs @@ -1,4 +1,4 @@ -// aux-build:match_non_exhaustive_lib.rs +//@ aux-build:match_non_exhaustive_lib.rs /* The error message for non-exhaustive matches on non-local enums * marked as non-exhaustive should mention the fact that the enum diff --git a/tests/ui/match/pattern-deref-miscompile.rs b/tests/ui/match/pattern-deref-miscompile.rs index caa6d184a92..dbd952252ce 100644 --- a/tests/ui/match/pattern-deref-miscompile.rs +++ b/tests/ui/match/pattern-deref-miscompile.rs @@ -1,4 +1,4 @@ -// run-pass +//@ run-pass fn main() { match b"." as &[u8] { diff --git a/tests/ui/max-min-classes.rs b/tests/ui/max-min-classes.rs index f9a39e486da..338a3156a9a 100644 --- a/tests/ui/max-min-classes.rs +++ b/tests/ui/max-min-classes.rs @@ -1,4 +1,4 @@ -// run-pass +//@ run-pass #![allow(non_snake_case)] trait Product { diff --git a/tests/ui/maximal_mir_to_hir_coverage.rs b/tests/ui/maximal_mir_to_hir_coverage.rs index 5ca54633f21..e57c83d007e 100644 --- a/tests/ui/maximal_mir_to_hir_coverage.rs +++ b/tests/ui/maximal_mir_to_hir_coverage.rs @@ -1,5 +1,5 @@ -// compile-flags: -Zmaximal-hir-to-mir-coverage -// run-pass +//@ compile-flags: -Zmaximal-hir-to-mir-coverage +//@ run-pass // Just making sure this flag is accepted and doesn't crash the compiler diff --git a/tests/ui/meta/auxiliary/env.rs b/tests/ui/meta/auxiliary/env.rs index b3644d8d594..882ed43c369 100644 --- a/tests/ui/meta/auxiliary/env.rs +++ b/tests/ui/meta/auxiliary/env.rs @@ -1,7 +1,7 @@ // Check that aux builds can also use rustc-env, but environment is configured // separately from the main test case. // -// rustc-env:COMPILETEST_BAR=bar +//@ rustc-env:COMPILETEST_BAR=bar pub fn test() { assert_eq!(option_env!("COMPILETEST_FOO"), None); diff --git a/tests/ui/meta/expected-error-correct-rev.rs b/tests/ui/meta/expected-error-correct-rev.rs index 26798c3dfc2..33837337c15 100644 --- a/tests/ui/meta/expected-error-correct-rev.rs +++ b/tests/ui/meta/expected-error-correct-rev.rs @@ -1,4 +1,4 @@ -// revisions: a +//@ revisions: a // Counterpart to `expected-error-wrong-rev.rs` diff --git a/tests/ui/meta/meta-expected-error-wrong-rev.rs b/tests/ui/meta/meta-expected-error-wrong-rev.rs index c30d4fe0a13..de276299482 100644 --- a/tests/ui/meta/meta-expected-error-wrong-rev.rs +++ b/tests/ui/meta/meta-expected-error-wrong-rev.rs @@ -1,7 +1,7 @@ -// ignore-compare-mode-polonius +//@ ignore-compare-mode-polonius -// revisions: a -// should-fail +//@ revisions: a +//@ should-fail // This is a "meta-test" of the compilertest framework itself. In // particular, it includes the right error message, but the message diff --git a/tests/ui/meta/no_std-extern-libc.rs b/tests/ui/meta/no_std-extern-libc.rs index 763ea740a27..919caf9428f 100644 --- a/tests/ui/meta/no_std-extern-libc.rs +++ b/tests/ui/meta/no_std-extern-libc.rs @@ -1,5 +1,5 @@ // Test that `download-rustc` doesn't put duplicate copies of libc in the sysroot. -// check-pass +//@ check-pass #![crate_type = "lib"] #![no_std] #![feature(rustc_private)] diff --git a/tests/ui/meta/revision-bad.rs b/tests/ui/meta/revision-bad.rs index 37ddbe99a9f..c5193b19d9e 100644 --- a/tests/ui/meta/revision-bad.rs +++ b/tests/ui/meta/revision-bad.rs @@ -1,12 +1,12 @@ // Meta test for compiletest: check that when we give the wrong error // patterns, the test fails. -// run-fail -// revisions: foo bar -// should-fail -// needs-run-enabled -//[foo] error-pattern:bar -//[bar] error-pattern:foo +//@ run-fail +//@ revisions: foo bar +//@ should-fail +//@ needs-run-enabled +//@[foo] error-pattern:bar +//@[bar] error-pattern:foo #[cfg(foo)] fn die() { diff --git a/tests/ui/meta/revision-ok.rs b/tests/ui/meta/revision-ok.rs index bbeae41b8bb..c1387f7d18e 100644 --- a/tests/ui/meta/revision-ok.rs +++ b/tests/ui/meta/revision-ok.rs @@ -1,11 +1,11 @@ // Meta test for compiletest: check that when we give the right error // patterns, the test passes. See all `revision-bad.rs`. -// run-fail -// revisions: foo bar -//[foo] error-pattern:foo -//[bar] error-pattern:bar -// ignore-emscripten no processes +//@ run-fail +//@ revisions: foo bar +//@[foo] error-pattern:foo +//@[bar] error-pattern:bar +//@ ignore-emscripten no processes #[cfg(foo)] fn die() { diff --git a/tests/ui/meta/rustc-env.rs b/tests/ui/meta/rustc-env.rs index 7d4e005be10..971f29116bc 100644 --- a/tests/ui/meta/rustc-env.rs +++ b/tests/ui/meta/rustc-env.rs @@ -1,12 +1,12 @@ // Compiletest meta test checking that rustc-env and unset-rustc-env directives // can be used to configure environment for rustc. // -// run-pass -// aux-build:env.rs -// rustc-env:COMPILETEST_FOO=foo +//@ run-pass +//@ aux-build:env.rs +//@ rustc-env:COMPILETEST_FOO=foo // // An environment variable that is likely to be set, but should be safe to unset. -// unset-rustc-env:PWD +//@ unset-rustc-env:PWD extern crate env; diff --git a/tests/ui/methods/call_method_unknown_pointee.rs b/tests/ui/methods/call_method_unknown_pointee.rs index fe4275f5367..1643b6bfa18 100644 --- a/tests/ui/methods/call_method_unknown_pointee.rs +++ b/tests/ui/methods/call_method_unknown_pointee.rs @@ -1,4 +1,4 @@ -// edition: 2018 +//@ edition: 2018 // tests that the pointee type of a raw pointer must be known to call methods on it // see also: `tests/ui/editions/edition-raw-pointer-method-2018.rs` diff --git a/tests/ui/methods/inherent-bound-in-probe.rs b/tests/ui/methods/inherent-bound-in-probe.rs index 81a99ca010e..265ef93425a 100644 --- a/tests/ui/methods/inherent-bound-in-probe.rs +++ b/tests/ui/methods/inherent-bound-in-probe.rs @@ -1,4 +1,4 @@ -// normalize-stderr-test: "long-type-\d+" -> "long-type-hash" +//@ normalize-stderr-test: "long-type-\d+" -> "long-type-hash" // Fixes #110131 // diff --git a/tests/ui/methods/method-ambig-two-traits-cross-crate.rs b/tests/ui/methods/method-ambig-two-traits-cross-crate.rs index 006e315b02c..d058c2da6f2 100644 --- a/tests/ui/methods/method-ambig-two-traits-cross-crate.rs +++ b/tests/ui/methods/method-ambig-two-traits-cross-crate.rs @@ -1,7 +1,7 @@ // Test an ambiguity scenario where one copy of the method is available // from a trait imported from another crate. -// aux-build:ambig_impl_2_lib.rs +//@ aux-build:ambig_impl_2_lib.rs extern crate ambig_impl_2_lib; use ambig_impl_2_lib::Me; trait Me2 { diff --git a/tests/ui/methods/method-argument-inference-associated-type.rs b/tests/ui/methods/method-argument-inference-associated-type.rs index 852747d06b5..a9d2bb6df8e 100644 --- a/tests/ui/methods/method-argument-inference-associated-type.rs +++ b/tests/ui/methods/method-argument-inference-associated-type.rs @@ -1,4 +1,4 @@ -// run-pass +//@ run-pass pub struct ClientMap; pub struct ClientMap2; diff --git a/tests/ui/methods/method-call-lifetime-args-subst-index.rs b/tests/ui/methods/method-call-lifetime-args-subst-index.rs index 8df58a3486e..9f323a8f77d 100644 --- a/tests/ui/methods/method-call-lifetime-args-subst-index.rs +++ b/tests/ui/methods/method-call-lifetime-args-subst-index.rs @@ -1,4 +1,4 @@ -// build-pass (FIXME(62277): could be check-pass?) +//@ build-pass (FIXME(62277): could be check-pass?) #![allow(unused)] struct S; diff --git a/tests/ui/methods/method-early-bound-lifetimes-on-self.rs b/tests/ui/methods/method-early-bound-lifetimes-on-self.rs index f2ace32c6b6..8721dd85ac7 100644 --- a/tests/ui/methods/method-early-bound-lifetimes-on-self.rs +++ b/tests/ui/methods/method-early-bound-lifetimes-on-self.rs @@ -1,8 +1,8 @@ -// run-pass +//@ run-pass // Check that we successfully handle methods where the `self` type has // an early-bound lifetime. Issue #18208. -// pretty-expanded FIXME #23616 +//@ pretty-expanded FIXME #23616 #![allow(dead_code)] diff --git a/tests/ui/methods/method-lookup-order.rs b/tests/ui/methods/method-lookup-order.rs index 5a46cf35dec..08ad6483d08 100644 --- a/tests/ui/methods/method-lookup-order.rs +++ b/tests/ui/methods/method-lookup-order.rs @@ -1,6 +1,6 @@ // ignore-tidy-linelength -// run-pass +//@ run-pass #![allow(dead_code)] // There are five cfg's below. I explored the set of all non-empty combinations @@ -16,39 +16,39 @@ // {bar_for_foo, valbar_for_et_foo}: these are higher precedent than the `&mut self` method on `Foo`, and so no case matching bx1x1x is included. // {mutbar_for_foo, valbar_for_etmut_foo} (which are lower precedent than the inherent `&mut self` method on `Foo`; e.g. b10101 *is* included. -// revisions: b00001 b00010 b00011 b00100 b00101 b00110 b00111 b01000 b01001 b01100 b01101 b10000 b10001 b10010 b10011 b10101 b10111 b11000 b11001 b11101 - -//[b00001]compile-flags: --cfg inherent_mut -//[b00010]compile-flags: --cfg bar_for_foo -//[b00011]compile-flags: --cfg inherent_mut --cfg bar_for_foo -//[b00100]compile-flags: --cfg mutbar_for_foo -//[b00101]compile-flags: --cfg inherent_mut --cfg mutbar_for_foo -//[b00110]compile-flags: --cfg bar_for_foo --cfg mutbar_for_foo -//[b00111]compile-flags: --cfg inherent_mut --cfg bar_for_foo --cfg mutbar_for_foo -//[b01000]compile-flags: --cfg valbar_for_et_foo -//[b01001]compile-flags: --cfg inherent_mut --cfg valbar_for_et_foo -//[b01010]compile-flags: --cfg bar_for_foo --cfg valbar_for_et_foo -//[b01011]compile-flags: --cfg inherent_mut --cfg bar_for_foo --cfg valbar_for_et_foo -//[b01100]compile-flags: --cfg mutbar_for_foo --cfg valbar_for_et_foo -//[b01101]compile-flags: --cfg inherent_mut --cfg mutbar_for_foo --cfg valbar_for_et_foo -//[b01110]compile-flags: --cfg bar_for_foo --cfg mutbar_for_foo --cfg valbar_for_et_foo -//[b01111]compile-flags: --cfg inherent_mut --cfg bar_for_foo --cfg mutbar_for_foo --cfg valbar_for_et_foo -//[b10000]compile-flags: --cfg valbar_for_etmut_foo -//[b10001]compile-flags: --cfg inherent_mut --cfg valbar_for_etmut_foo -//[b10010]compile-flags: --cfg bar_for_foo --cfg valbar_for_etmut_foo -//[b10011]compile-flags: --cfg inherent_mut --cfg bar_for_foo --cfg valbar_for_etmut_foo -//[b10100]compile-flags: --cfg mutbar_for_foo --cfg valbar_for_etmut_foo -//[b10101]compile-flags: --cfg inherent_mut --cfg mutbar_for_foo --cfg valbar_for_etmut_foo -//[b10110]compile-flags: --cfg bar_for_foo --cfg mutbar_for_foo --cfg valbar_for_etmut_foo -//[b10111]compile-flags: --cfg inherent_mut --cfg bar_for_foo --cfg mutbar_for_foo --cfg valbar_for_etmut_foo -//[b11000]compile-flags: --cfg valbar_for_et_foo --cfg valbar_for_etmut_foo -//[b11001]compile-flags: --cfg inherent_mut --cfg valbar_for_et_foo --cfg valbar_for_etmut_foo -//[b11010]compile-flags: --cfg bar_for_foo --cfg valbar_for_et_foo --cfg valbar_for_etmut_foo -//[b11011]compile-flags: --cfg inherent_mut --cfg bar_for_foo --cfg valbar_for_et_foo --cfg valbar_for_etmut_foo -//[b11100]compile-flags: --cfg mutbar_for_foo --cfg valbar_for_et_foo --cfg valbar_for_etmut_foo -//[b11101]compile-flags: --cfg inherent_mut --cfg mutbar_for_foo --cfg valbar_for_et_foo --cfg valbar_for_etmut_foo -//[b11110]compile-flags: --cfg bar_for_foo --cfg mutbar_for_foo --cfg valbar_for_et_foo --cfg valbar_for_etmut_foo -//[b11111]compile-flags: --cfg inherent_mut --cfg bar_for_foo --cfg mutbar_for_foo --cfg valbar_for_et_foo --cfg valbar_for_etmut_foo +//@ revisions: b00001 b00010 b00011 b00100 b00101 b00110 b00111 b01000 b01001 b01100 b01101 b10000 b10001 b10010 b10011 b10101 b10111 b11000 b11001 b11101 + +//@[b00001]compile-flags: --cfg inherent_mut +//@[b00010]compile-flags: --cfg bar_for_foo +//@[b00011]compile-flags: --cfg inherent_mut --cfg bar_for_foo +//@[b00100]compile-flags: --cfg mutbar_for_foo +//@[b00101]compile-flags: --cfg inherent_mut --cfg mutbar_for_foo +//@[b00110]compile-flags: --cfg bar_for_foo --cfg mutbar_for_foo +//@[b00111]compile-flags: --cfg inherent_mut --cfg bar_for_foo --cfg mutbar_for_foo +//@[b01000]compile-flags: --cfg valbar_for_et_foo +//@[b01001]compile-flags: --cfg inherent_mut --cfg valbar_for_et_foo +//@[b01010]compile-flags: --cfg bar_for_foo --cfg valbar_for_et_foo +//@[b01011]compile-flags: --cfg inherent_mut --cfg bar_for_foo --cfg valbar_for_et_foo +//@[b01100]compile-flags: --cfg mutbar_for_foo --cfg valbar_for_et_foo +//@[b01101]compile-flags: --cfg inherent_mut --cfg mutbar_for_foo --cfg valbar_for_et_foo +//@[b01110]compile-flags: --cfg bar_for_foo --cfg mutbar_for_foo --cfg valbar_for_et_foo +//@[b01111]compile-flags: --cfg inherent_mut --cfg bar_for_foo --cfg mutbar_for_foo --cfg valbar_for_et_foo +//@[b10000]compile-flags: --cfg valbar_for_etmut_foo +//@[b10001]compile-flags: --cfg inherent_mut --cfg valbar_for_etmut_foo +//@[b10010]compile-flags: --cfg bar_for_foo --cfg valbar_for_etmut_foo +//@[b10011]compile-flags: --cfg inherent_mut --cfg bar_for_foo --cfg valbar_for_etmut_foo +//@[b10100]compile-flags: --cfg mutbar_for_foo --cfg valbar_for_etmut_foo +//@[b10101]compile-flags: --cfg inherent_mut --cfg mutbar_for_foo --cfg valbar_for_etmut_foo +//@[b10110]compile-flags: --cfg bar_for_foo --cfg mutbar_for_foo --cfg valbar_for_etmut_foo +//@[b10111]compile-flags: --cfg inherent_mut --cfg bar_for_foo --cfg mutbar_for_foo --cfg valbar_for_etmut_foo +//@[b11000]compile-flags: --cfg valbar_for_et_foo --cfg valbar_for_etmut_foo +//@[b11001]compile-flags: --cfg inherent_mut --cfg valbar_for_et_foo --cfg valbar_for_etmut_foo +//@[b11010]compile-flags: --cfg bar_for_foo --cfg valbar_for_et_foo --cfg valbar_for_etmut_foo +//@[b11011]compile-flags: --cfg inherent_mut --cfg bar_for_foo --cfg valbar_for_et_foo --cfg valbar_for_etmut_foo +//@[b11100]compile-flags: --cfg mutbar_for_foo --cfg valbar_for_et_foo --cfg valbar_for_etmut_foo +//@[b11101]compile-flags: --cfg inherent_mut --cfg mutbar_for_foo --cfg valbar_for_et_foo --cfg valbar_for_etmut_foo +//@[b11110]compile-flags: --cfg bar_for_foo --cfg mutbar_for_foo --cfg valbar_for_et_foo --cfg valbar_for_etmut_foo +//@[b11111]compile-flags: --cfg inherent_mut --cfg bar_for_foo --cfg mutbar_for_foo --cfg valbar_for_et_foo --cfg valbar_for_etmut_foo struct Foo {} diff --git a/tests/ui/methods/method-macro-backtrace.rs b/tests/ui/methods/method-macro-backtrace.rs index 00fe32b7c15..10d7c8cfda0 100644 --- a/tests/ui/methods/method-macro-backtrace.rs +++ b/tests/ui/methods/method-macro-backtrace.rs @@ -1,4 +1,4 @@ -// forbid-output: in this expansion of +//@ forbid-output: in this expansion of macro_rules! make_method { ($name:ident) => ( fn $name(&self) { } ) diff --git a/tests/ui/methods/method-mut-self-modifies-mut-slice-lvalue.rs b/tests/ui/methods/method-mut-self-modifies-mut-slice-lvalue.rs index daff037b27b..c3454b38b45 100644 --- a/tests/ui/methods/method-mut-self-modifies-mut-slice-lvalue.rs +++ b/tests/ui/methods/method-mut-self-modifies-mut-slice-lvalue.rs @@ -1,4 +1,4 @@ -// run-pass +//@ run-pass // Test that an `&mut self` method, when invoked on a place whose // type is `&mut [u8]`, passes in a pointer to the place and not a // temporary. Issue #19147. diff --git a/tests/ui/methods/method-normalize-bounds-issue-20604.rs b/tests/ui/methods/method-normalize-bounds-issue-20604.rs index 9c0b952849e..b3979e75b61 100644 --- a/tests/ui/methods/method-normalize-bounds-issue-20604.rs +++ b/tests/ui/methods/method-normalize-bounds-issue-20604.rs @@ -1,4 +1,4 @@ -// run-pass +//@ run-pass #![allow(dead_code)] #![allow(unused_variables)] #![allow(stable_features)] @@ -9,7 +9,7 @@ // winnowing stage of method resolution failed to handle an associated // type projection. -// pretty-expanded FIXME #23616 +//@ pretty-expanded FIXME #23616 #![feature(associated_types)] diff --git a/tests/ui/methods/method-on-ambiguous-numeric-type.rs b/tests/ui/methods/method-on-ambiguous-numeric-type.rs index f42b72e9f9c..4d7d86bd354 100644 --- a/tests/ui/methods/method-on-ambiguous-numeric-type.rs +++ b/tests/ui/methods/method-on-ambiguous-numeric-type.rs @@ -1,4 +1,4 @@ -// aux-build:macro-in-other-crate.rs +//@ aux-build:macro-in-other-crate.rs #[macro_use] extern crate macro_in_other_crate; diff --git a/tests/ui/methods/method-probe-no-guessing-dyn-trait.rs b/tests/ui/methods/method-probe-no-guessing-dyn-trait.rs index 787191a26fb..b2765c4764a 100644 --- a/tests/ui/methods/method-probe-no-guessing-dyn-trait.rs +++ b/tests/ui/methods/method-probe-no-guessing-dyn-trait.rs @@ -1,4 +1,4 @@ -// run-pass +//@ run-pass // Check that method matching does not make "guesses" depending on // Deref impls that don't eventually end up being picked. diff --git a/tests/ui/methods/method-projection.rs b/tests/ui/methods/method-projection.rs index 21d983f192a..1e1090d6955 100644 --- a/tests/ui/methods/method-projection.rs +++ b/tests/ui/methods/method-projection.rs @@ -1,4 +1,4 @@ -// run-pass +//@ run-pass // Test that we can use method notation to call methods based on a // projection bound from a trait. Issue #20469. diff --git a/tests/ui/methods/method-recursive-blanket-impl.rs b/tests/ui/methods/method-recursive-blanket-impl.rs index e7e83cbec77..09bbfffcd55 100644 --- a/tests/ui/methods/method-recursive-blanket-impl.rs +++ b/tests/ui/methods/method-recursive-blanket-impl.rs @@ -1,4 +1,4 @@ -// run-pass +//@ run-pass #![allow(unused_variables)] #![allow(unused_imports)] // Test that we don't trigger on the blanket impl for all `&'a T` but @@ -6,7 +6,7 @@ // know not to stop at the blanket, we have to recursively evaluate // the `T:Foo` bound. -// pretty-expanded FIXME #23616 +//@ pretty-expanded FIXME #23616 use std::marker::Sized; diff --git a/tests/ui/methods/method-self-arg-aux1.rs b/tests/ui/methods/method-self-arg-aux1.rs index 79b70a17ca1..a0c0a4e0541 100644 --- a/tests/ui/methods/method-self-arg-aux1.rs +++ b/tests/ui/methods/method-self-arg-aux1.rs @@ -1,7 +1,7 @@ -// run-pass +//@ run-pass // Test method calls with self as an argument (cross-crate) -// aux-build:method_self_arg1.rs +//@ aux-build:method_self_arg1.rs extern crate method_self_arg1; use method_self_arg1::Foo; diff --git a/tests/ui/methods/method-self-arg-aux2.rs b/tests/ui/methods/method-self-arg-aux2.rs index 16487b54f17..d8b0d847d74 100644 --- a/tests/ui/methods/method-self-arg-aux2.rs +++ b/tests/ui/methods/method-self-arg-aux2.rs @@ -1,7 +1,7 @@ -// run-pass +//@ run-pass // Test method calls with self as an argument (cross-crate) -// aux-build:method_self_arg2.rs +//@ aux-build:method_self_arg2.rs extern crate method_self_arg2; use method_self_arg2::{Foo, Bar}; diff --git a/tests/ui/methods/method-self-arg-trait.rs b/tests/ui/methods/method-self-arg-trait.rs index ffa7a552b25..63594380753 100644 --- a/tests/ui/methods/method-self-arg-trait.rs +++ b/tests/ui/methods/method-self-arg-trait.rs @@ -1,4 +1,4 @@ -// run-pass +//@ run-pass // Test method calls with self as an argument static mut COUNT: u64 = 1; diff --git a/tests/ui/methods/method-self-arg.rs b/tests/ui/methods/method-self-arg.rs index f738fa19c85..d26b9663fd0 100644 --- a/tests/ui/methods/method-self-arg.rs +++ b/tests/ui/methods/method-self-arg.rs @@ -1,4 +1,4 @@ -// run-pass +//@ run-pass // Test method calls with self as an argument static mut COUNT: usize = 1; diff --git a/tests/ui/methods/method-trait-object-with-hrtb.rs b/tests/ui/methods/method-trait-object-with-hrtb.rs index d1bee676c2f..f22e93ec245 100644 --- a/tests/ui/methods/method-trait-object-with-hrtb.rs +++ b/tests/ui/methods/method-trait-object-with-hrtb.rs @@ -1,4 +1,4 @@ -// build-pass (FIXME(62277): could be check-pass?) +//@ build-pass (FIXME(62277): could be check-pass?) // Check that method probing ObjectCandidate works in the presence of // auto traits and/or HRTBs. diff --git a/tests/ui/methods/method-two-trait-defer-resolution-1.rs b/tests/ui/methods/method-two-trait-defer-resolution-1.rs index b768620cd3a..9130caccdf7 100644 --- a/tests/ui/methods/method-two-trait-defer-resolution-1.rs +++ b/tests/ui/methods/method-two-trait-defer-resolution-1.rs @@ -1,4 +1,4 @@ -// run-pass +//@ run-pass #![allow(non_camel_case_types)] // Test that we pick which version of `foo` to run based on the diff --git a/tests/ui/methods/method-two-trait-defer-resolution-2.rs b/tests/ui/methods/method-two-trait-defer-resolution-2.rs index d6076126732..a022fae922e 100644 --- a/tests/ui/methods/method-two-trait-defer-resolution-2.rs +++ b/tests/ui/methods/method-two-trait-defer-resolution-2.rs @@ -1,4 +1,4 @@ -// run-pass +//@ run-pass // Test that when we write `x.foo()`, we do not have to know the // complete type of `x` in order to type-check the method call. In // this case, we know that `x: Vec<_1>`, but we don't know what type diff --git a/tests/ui/methods/method-two-traits-distinguished-via-where-clause.rs b/tests/ui/methods/method-two-traits-distinguished-via-where-clause.rs index 2fd6c3bfab8..373439d2559 100644 --- a/tests/ui/methods/method-two-traits-distinguished-via-where-clause.rs +++ b/tests/ui/methods/method-two-traits-distinguished-via-where-clause.rs @@ -1,8 +1,8 @@ -// run-pass +//@ run-pass // Test that we select between traits A and B. To do that, we must // consider the `Sized` bound. -// pretty-expanded FIXME #23616 +//@ pretty-expanded FIXME #23616 trait A { //~ WARN trait `A` is never used fn foo(self); diff --git a/tests/ui/methods/method-where-clause.rs b/tests/ui/methods/method-where-clause.rs index 01692abf9b6..c9855b63d1a 100644 --- a/tests/ui/methods/method-where-clause.rs +++ b/tests/ui/methods/method-where-clause.rs @@ -1,4 +1,4 @@ -// run-pass +//@ run-pass // Test that we can use method notation to call methods based on a // where clause type, and not only type parameters. diff --git a/tests/ui/minus-string.rs b/tests/ui/minus-string.rs index 018f0ef9ac5..8d9b8d8bbf4 100644 --- a/tests/ui/minus-string.rs +++ b/tests/ui/minus-string.rs @@ -1,3 +1,3 @@ -// error-pattern:cannot apply unary operator `-` to type `String` +//@ error-pattern:cannot apply unary operator `-` to type `String` fn main() { -"foo".to_string(); } diff --git a/tests/ui/mir/alignment/addrof_alignment.rs b/tests/ui/mir/alignment/addrof_alignment.rs index f3423e97a8a..ed6638ed82b 100644 --- a/tests/ui/mir/alignment/addrof_alignment.rs +++ b/tests/ui/mir/alignment/addrof_alignment.rs @@ -1,5 +1,5 @@ -// run-pass -// compile-flags: -C debug-assertions +//@ run-pass +//@ compile-flags: -C debug-assertions struct Misalignment { a: u32, diff --git a/tests/ui/mir/alignment/i686-pc-windows-msvc.rs b/tests/ui/mir/alignment/i686-pc-windows-msvc.rs index 74ba1fde649..379f61ae818 100644 --- a/tests/ui/mir/alignment/i686-pc-windows-msvc.rs +++ b/tests/ui/mir/alignment/i686-pc-windows-msvc.rs @@ -1,6 +1,6 @@ -// run-pass -// only-i686-pc-windows-msvc -// compile-flags: -Copt-level=0 -Cdebug-assertions=yes +//@ run-pass +//@ only-i686-pc-windows-msvc +//@ compile-flags: -Copt-level=0 -Cdebug-assertions=yes // MSVC isn't sure if on 32-bit Windows its u64 type is 8-byte-aligned or 4-byte-aligned. // So this test ensures that on i686-pc-windows-msvc, we do not insert a runtime check diff --git a/tests/ui/mir/alignment/misaligned_lhs.rs b/tests/ui/mir/alignment/misaligned_lhs.rs index 97644ba8e09..5f484b8b3be 100644 --- a/tests/ui/mir/alignment/misaligned_lhs.rs +++ b/tests/ui/mir/alignment/misaligned_lhs.rs @@ -1,8 +1,8 @@ -// run-fail -// ignore-wasm32-bare: No panic messages -// ignore-i686-pc-windows-msvc: #112480 -// compile-flags: -C debug-assertions -// error-pattern: misaligned pointer dereference: address must be a multiple of 0x4 but is +//@ run-fail +//@ ignore-wasm32-bare: No panic messages +//@ ignore-i686-pc-windows-msvc: #112480 +//@ compile-flags: -C debug-assertions +//@ error-pattern: misaligned pointer dereference: address must be a multiple of 0x4 but is fn main() { let mut x = [0u32; 2]; diff --git a/tests/ui/mir/alignment/misaligned_rhs.rs b/tests/ui/mir/alignment/misaligned_rhs.rs index 8534bc71a3a..ca63a4711cd 100644 --- a/tests/ui/mir/alignment/misaligned_rhs.rs +++ b/tests/ui/mir/alignment/misaligned_rhs.rs @@ -1,8 +1,8 @@ -// run-fail -// ignore-wasm32-bare: No panic messages -// ignore-i686-pc-windows-msvc: #112480 -// compile-flags: -C debug-assertions -// error-pattern: misaligned pointer dereference: address must be a multiple of 0x4 but is +//@ run-fail +//@ ignore-wasm32-bare: No panic messages +//@ ignore-i686-pc-windows-msvc: #112480 +//@ compile-flags: -C debug-assertions +//@ error-pattern: misaligned pointer dereference: address must be a multiple of 0x4 but is fn main() { let mut x = [0u32; 2]; diff --git a/tests/ui/mir/alignment/packed.rs b/tests/ui/mir/alignment/packed.rs index 754698591e3..fe8ecc668b8 100644 --- a/tests/ui/mir/alignment/packed.rs +++ b/tests/ui/mir/alignment/packed.rs @@ -1,5 +1,5 @@ -// run-pass -// compile-flags: -C debug-assertions +//@ run-pass +//@ compile-flags: -C debug-assertions #![feature(strict_provenance, pointer_is_aligned)] diff --git a/tests/ui/mir/alignment/place_computation.rs b/tests/ui/mir/alignment/place_computation.rs index fdd4864250a..d3717db77c7 100644 --- a/tests/ui/mir/alignment/place_computation.rs +++ b/tests/ui/mir/alignment/place_computation.rs @@ -1,5 +1,5 @@ -// run-pass -// compile-flags: -C debug-assertions +//@ run-pass +//@ compile-flags: -C debug-assertions #[repr(align(8))] struct Misalignment { diff --git a/tests/ui/mir/alignment/place_without_read.rs b/tests/ui/mir/alignment/place_without_read.rs index b4be7a50f61..792666b54b1 100644 --- a/tests/ui/mir/alignment/place_without_read.rs +++ b/tests/ui/mir/alignment/place_without_read.rs @@ -1,5 +1,5 @@ -// run-pass -// compile-flags: -C debug-assertions +//@ run-pass +//@ compile-flags: -C debug-assertions fn main() { let ptr = 1 as *const u16; diff --git a/tests/ui/mir/alignment/two_pointers.rs b/tests/ui/mir/alignment/two_pointers.rs index 29af21dffc1..68bf45c6e70 100644 --- a/tests/ui/mir/alignment/two_pointers.rs +++ b/tests/ui/mir/alignment/two_pointers.rs @@ -1,8 +1,8 @@ -// run-fail -// ignore-wasm32-bare: No panic messages -// ignore-i686-pc-windows-msvc: #112480 -// compile-flags: -C debug-assertions -// error-pattern: misaligned pointer dereference: address must be a multiple of 0x4 but is +//@ run-fail +//@ ignore-wasm32-bare: No panic messages +//@ ignore-i686-pc-windows-msvc: #112480 +//@ compile-flags: -C debug-assertions +//@ error-pattern: misaligned pointer dereference: address must be a multiple of 0x4 but is fn main() { let x = [0u32; 2]; diff --git a/tests/ui/mir/auxiliary/issue_76375_aux.rs b/tests/ui/mir/auxiliary/issue_76375_aux.rs index 90f4df739f1..74bab91f6dc 100644 --- a/tests/ui/mir/auxiliary/issue_76375_aux.rs +++ b/tests/ui/mir/auxiliary/issue_76375_aux.rs @@ -1,5 +1,5 @@ -// edition:2018 -// compile-flags: -Z mir-opt-level=3 +//@ edition:2018 +//@ compile-flags: -Z mir-opt-level=3 #[inline(always)] pub fn copy_prop(s: bool) -> String { diff --git a/tests/ui/mir/build-async-error-body-correctly.rs b/tests/ui/mir/build-async-error-body-correctly.rs index 1787f80c07e..8f1a3ec8fb5 100644 --- a/tests/ui/mir/build-async-error-body-correctly.rs +++ b/tests/ui/mir/build-async-error-body-correctly.rs @@ -1,4 +1,4 @@ -// edition: 2021 +//@ edition: 2021 async fn asyncfn() { let binding = match true {}; diff --git a/tests/ui/mir/checks_without_panic_impl.rs b/tests/ui/mir/checks_without_panic_impl.rs index 04f410b77a3..0dba5784daa 100644 --- a/tests/ui/mir/checks_without_panic_impl.rs +++ b/tests/ui/mir/checks_without_panic_impl.rs @@ -2,8 +2,8 @@ // does not prevent crates without a panic_impl from compiling. // See rust-lang/rust#109996 -// build-pass -// compile-flags: -Cdebug-assertions=yes +//@ build-pass +//@ compile-flags: -Cdebug-assertions=yes #![crate_type = "lib"] diff --git a/tests/ui/mir/debug-ref-undef.rs b/tests/ui/mir/debug-ref-undef.rs index 37fd22a9dd2..b2287d94add 100644 --- a/tests/ui/mir/debug-ref-undef.rs +++ b/tests/ui/mir/debug-ref-undef.rs @@ -1,5 +1,5 @@ -// run-pass -// compile-flags: -g -O -Zmir-opt-level=0 -Zinline-mir=y -Zmir-enable-passes=+ReferencePropagation +//@ run-pass +//@ compile-flags: -g -O -Zmir-opt-level=0 -Zinline-mir=y -Zmir-enable-passes=+ReferencePropagation #![allow(dead_code)] diff --git a/tests/ui/mir/field-projection-invariant.rs b/tests/ui/mir/field-projection-invariant.rs index b5d6add043c..16b8c8354b0 100644 --- a/tests/ui/mir/field-projection-invariant.rs +++ b/tests/ui/mir/field-projection-invariant.rs @@ -1,4 +1,4 @@ -// build-pass +//@ build-pass struct Inv<'a>(&'a mut &'a ()); enum Foo { Bar, diff --git a/tests/ui/mir/field-ty-ascription-enums.rs b/tests/ui/mir/field-ty-ascription-enums.rs index 179af617090..cd25a576a50 100644 --- a/tests/ui/mir/field-ty-ascription-enums.rs +++ b/tests/ui/mir/field-ty-ascription-enums.rs @@ -1,4 +1,4 @@ -// build-pass +//@ build-pass enum Foo { Var(T), diff --git a/tests/ui/mir/field-ty-ascription.rs b/tests/ui/mir/field-ty-ascription.rs index 178c7916bc5..c5dbc4ebeb8 100644 --- a/tests/ui/mir/field-ty-ascription.rs +++ b/tests/ui/mir/field-ty-ascription.rs @@ -1,4 +1,4 @@ -// build-pass +//@ build-pass struct Foo(T); // `T` is covariant. diff --git a/tests/ui/mir/important-higher-ranked-regions.rs b/tests/ui/mir/important-higher-ranked-regions.rs index cadfb3b66f2..beb7a7928c6 100644 --- a/tests/ui/mir/important-higher-ranked-regions.rs +++ b/tests/ui/mir/important-higher-ranked-regions.rs @@ -1,5 +1,5 @@ -// check-pass -// compile-flags: -Zvalidate-mir +//@ check-pass +//@ compile-flags: -Zvalidate-mir // This test checks that bivariant parameters are handled correctly // in the mir. diff --git a/tests/ui/mir/inline-wrong-abi.rs b/tests/ui/mir/inline-wrong-abi.rs index 1f61a5dcfbe..8ef0b86a26b 100644 --- a/tests/ui/mir/inline-wrong-abi.rs +++ b/tests/ui/mir/inline-wrong-abi.rs @@ -1,4 +1,4 @@ -// compile-flags: -Zpolymorphize=on -Zinline-mir=yes -Zmir-opt-level=0 +//@ compile-flags: -Zpolymorphize=on -Zinline-mir=yes -Zmir-opt-level=0 #![feature(fn_traits, unboxed_closures)] struct Foo(T); diff --git a/tests/ui/mir/issue-101844.rs b/tests/ui/mir/issue-101844.rs index 72ceefa4f4a..d66d5c5ba50 100644 --- a/tests/ui/mir/issue-101844.rs +++ b/tests/ui/mir/issue-101844.rs @@ -1,4 +1,4 @@ -// check-pass +//@ check-pass pub trait FirstTrait { type Item; diff --git a/tests/ui/mir/issue-105809.rs b/tests/ui/mir/issue-105809.rs index 57828feef2d..e7a8fb65268 100644 --- a/tests/ui/mir/issue-105809.rs +++ b/tests/ui/mir/issue-105809.rs @@ -1,7 +1,7 @@ // Non-regression test ICE from issue #105809 and duplicates. -// build-pass: the ICE is during codegen -// compile-flags: --edition 2018 -Zmir-opt-level=1 +//@ build-pass: the ICE is during codegen +//@ compile-flags: --edition 2018 -Zmir-opt-level=1 use std::{future::Future, pin::Pin}; diff --git a/tests/ui/mir/issue-106062.rs b/tests/ui/mir/issue-106062.rs index 621ba566ee3..c088d0178d0 100644 --- a/tests/ui/mir/issue-106062.rs +++ b/tests/ui/mir/issue-106062.rs @@ -1,4 +1,4 @@ -// edition:2018 +//@ edition:2018 use std::{future::Future, marker::PhantomData}; diff --git a/tests/ui/mir/issue-107678-projection-with-lifetime.rs b/tests/ui/mir/issue-107678-projection-with-lifetime.rs index 14a45687875..4d0d2801ee9 100644 --- a/tests/ui/mir/issue-107678-projection-with-lifetime.rs +++ b/tests/ui/mir/issue-107678-projection-with-lifetime.rs @@ -1,4 +1,4 @@ -// build-pass +//@ build-pass #![crate_type = "lib"] diff --git a/tests/ui/mir/issue-107691.rs b/tests/ui/mir/issue-107691.rs index 517a172089f..0dc6e5afb55 100644 --- a/tests/ui/mir/issue-107691.rs +++ b/tests/ui/mir/issue-107691.rs @@ -1,5 +1,5 @@ -// build-pass -// compile-flags: -C opt-level=3 +//@ build-pass +//@ compile-flags: -C opt-level=3 #![crate_type = "lib"] diff --git a/tests/ui/mir/issue-109004-drop-large-array.rs b/tests/ui/mir/issue-109004-drop-large-array.rs index 5e3361cef6e..b1778954f74 100644 --- a/tests/ui/mir/issue-109004-drop-large-array.rs +++ b/tests/ui/mir/issue-109004-drop-large-array.rs @@ -1,4 +1,4 @@ -// check-pass +//@ check-pass const SZ: usize = 64_000_000; type BigDrop = [String; SZ]; diff --git a/tests/ui/mir/issue-109743.rs b/tests/ui/mir/issue-109743.rs index 73f3405e3ad..7dda1771b39 100644 --- a/tests/ui/mir/issue-109743.rs +++ b/tests/ui/mir/issue-109743.rs @@ -1,5 +1,5 @@ -// build-pass -// compile-flags: --crate-type=lib +//@ build-pass +//@ compile-flags: --crate-type=lib use std::marker::PhantomData; diff --git a/tests/ui/mir/issue-29227.rs b/tests/ui/mir/issue-29227.rs index e9dfc2840e5..4e4fbf50ceb 100644 --- a/tests/ui/mir/issue-29227.rs +++ b/tests/ui/mir/issue-29227.rs @@ -1,4 +1,4 @@ -// run-pass +//@ run-pass // ignore-tidy-linelength // Regression test for #29227. The problem here was that MIR diff --git a/tests/ui/mir/issue-46845.rs b/tests/ui/mir/issue-46845.rs index fc85b25519a..34b9f9791f3 100644 --- a/tests/ui/mir/issue-46845.rs +++ b/tests/ui/mir/issue-46845.rs @@ -1,6 +1,6 @@ -// run-pass +//@ run-pass // To work around #46855 -// compile-flags: -Z mir-opt-level=0 +//@ compile-flags: -Z mir-opt-level=0 // Regression test for the inhabitedness of unions with uninhabited variants, issue #46845 use std::mem; diff --git a/tests/ui/mir/issue-60390.rs b/tests/ui/mir/issue-60390.rs index fd9d6b46dd4..681d23ced70 100644 --- a/tests/ui/mir/issue-60390.rs +++ b/tests/ui/mir/issue-60390.rs @@ -1,5 +1,5 @@ -// check-pass -// compile-flags: --emit=mir,link +//@ check-pass +//@ compile-flags: --emit=mir,link // Regression test for #60390, this ICE requires `--emit=mir` flag. fn main() { diff --git a/tests/ui/mir/issue-66851.rs b/tests/ui/mir/issue-66851.rs index 878ad4e475a..cc92e75c6a8 100644 --- a/tests/ui/mir/issue-66851.rs +++ b/tests/ui/mir/issue-66851.rs @@ -1,8 +1,8 @@ // This used to mis-compile because the mir-opt `SimplifyArmIdentity` // did not check that the types matched up in the `Ok(r)` branch. // -// run-pass -// compile-flags: -Zmir-opt-level=3 +//@ run-pass +//@ compile-flags: -Zmir-opt-level=3 #[derive(Debug, PartialEq, Eq)] enum SpecialsRes { Res(u64) } diff --git a/tests/ui/mir/issue-66930.rs b/tests/ui/mir/issue-66930.rs index 5f9eb2bf437..411b978aec6 100644 --- a/tests/ui/mir/issue-66930.rs +++ b/tests/ui/mir/issue-66930.rs @@ -1,5 +1,5 @@ -// check-pass -// compile-flags: --emit=mir,link +//@ check-pass +//@ compile-flags: --emit=mir,link // Regression test for #66930, this ICE requires `--emit=mir` flag. static UTF8_CHAR_WIDTH: [u8; 0] = []; diff --git a/tests/ui/mir/issue-67639-normalization-ice.rs b/tests/ui/mir/issue-67639-normalization-ice.rs index 71150a80bc0..94b77475834 100644 --- a/tests/ui/mir/issue-67639-normalization-ice.rs +++ b/tests/ui/mir/issue-67639-normalization-ice.rs @@ -1,5 +1,5 @@ -// compile-flags: -Z mir-opt-level=4 -// build-pass +//@ compile-flags: -Z mir-opt-level=4 +//@ build-pass // This used to ICE in const-prop due // to an empty ParamEnv being used during normalization diff --git a/tests/ui/mir/issue-67710-inline-projection.rs b/tests/ui/mir/issue-67710-inline-projection.rs index 1ff6b4d628c..0aeb9edb292 100644 --- a/tests/ui/mir/issue-67710-inline-projection.rs +++ b/tests/ui/mir/issue-67710-inline-projection.rs @@ -1,5 +1,5 @@ -// compile-flags: -Z mir-opt-level=3 -// build-pass +//@ compile-flags: -Z mir-opt-level=3 +//@ build-pass // This used to ICE due to the inling pass not examining projections // for references to locals diff --git a/tests/ui/mir/issue-68841.rs b/tests/ui/mir/issue-68841.rs index 550bd452a80..5638449b684 100644 --- a/tests/ui/mir/issue-68841.rs +++ b/tests/ui/mir/issue-68841.rs @@ -1,6 +1,6 @@ -// compile-flags: -Z mir-opt-level=3 -// edition:2018 -// build-pass +//@ compile-flags: -Z mir-opt-level=3 +//@ edition:2018 +//@ build-pass #![feature(async_closure)] diff --git a/tests/ui/mir/issue-71793-inline-args-storage.rs b/tests/ui/mir/issue-71793-inline-args-storage.rs index 3749d5ebf81..0ed4d472373 100644 --- a/tests/ui/mir/issue-71793-inline-args-storage.rs +++ b/tests/ui/mir/issue-71793-inline-args-storage.rs @@ -2,8 +2,8 @@ // temporaries for arguments, so that they don't become part of the coroutine. // Regression test for #71793. // -// check-pass -// edition:2018 +//@ check-pass +//@ edition:2018 // compile-args: -Zmir-opt-level=3 #![crate_type = "lib"] diff --git a/tests/ui/mir/issue-73914.rs b/tests/ui/mir/issue-73914.rs index 1e99faaded4..610622f0c31 100644 --- a/tests/ui/mir/issue-73914.rs +++ b/tests/ui/mir/issue-73914.rs @@ -1,6 +1,6 @@ -// build-pass -// compile-flags:-Copt-level=0 -// edition:2018 +//@ build-pass +//@ compile-flags:-Copt-level=0 +//@ edition:2018 struct S(std::marker::PhantomData); diff --git a/tests/ui/mir/issue-74739.rs b/tests/ui/mir/issue-74739.rs index 03622358ae1..06d210e0103 100644 --- a/tests/ui/mir/issue-74739.rs +++ b/tests/ui/mir/issue-74739.rs @@ -1,5 +1,5 @@ -// compile-flags: -O -// run-pass +//@ compile-flags: -O +//@ run-pass struct Foo { x: i32, diff --git a/tests/ui/mir/issue-75053.rs b/tests/ui/mir/issue-75053.rs index cb56eaa0b13..e2ec4076b49 100644 --- a/tests/ui/mir/issue-75053.rs +++ b/tests/ui/mir/issue-75053.rs @@ -1,4 +1,4 @@ -// compile-flags: -Z mir-opt-level=3 +//@ compile-flags: -Z mir-opt-level=3 #![feature(type_alias_impl_trait, rustc_attrs)] diff --git a/tests/ui/mir/issue-75419-validation-impl-trait.rs b/tests/ui/mir/issue-75419-validation-impl-trait.rs index a8741befb0c..2bbd0916130 100644 --- a/tests/ui/mir/issue-75419-validation-impl-trait.rs +++ b/tests/ui/mir/issue-75419-validation-impl-trait.rs @@ -1,4 +1,4 @@ -// build-pass +//@ build-pass // This used to fail MIR validation due to the types on both sides of // an assignment not being equal. diff --git a/tests/ui/mir/issue-76248.rs b/tests/ui/mir/issue-76248.rs index 18473e79e86..d8a42e8fe02 100644 --- a/tests/ui/mir/issue-76248.rs +++ b/tests/ui/mir/issue-76248.rs @@ -2,8 +2,8 @@ // The root cause was a missing fold of length constant in Rvalue::Repeat. // Regression test for #76248. // -// build-pass -// compile-flags: -Zmir-opt-level=3 +//@ build-pass +//@ compile-flags: -Zmir-opt-level=3 const N: usize = 1; diff --git a/tests/ui/mir/issue-76375.rs b/tests/ui/mir/issue-76375.rs index e635caca9fd..15b1f7fa6b7 100644 --- a/tests/ui/mir/issue-76375.rs +++ b/tests/ui/mir/issue-76375.rs @@ -1,9 +1,9 @@ // Regression test for issue #76375. // -// edition:2018 -// build-pass -// compile-flags: -Z mir-opt-level=3 -// aux-build:issue_76375_aux.rs +//@ edition:2018 +//@ build-pass +//@ compile-flags: -Z mir-opt-level=3 +//@ aux-build:issue_76375_aux.rs #![crate_type = "lib"] diff --git a/tests/ui/mir/issue-76740-copy-propagation.rs b/tests/ui/mir/issue-76740-copy-propagation.rs index 1d4ec11762a..df315b17200 100644 --- a/tests/ui/mir/issue-76740-copy-propagation.rs +++ b/tests/ui/mir/issue-76740-copy-propagation.rs @@ -1,6 +1,6 @@ // Regression test for issue #76740. -// run-pass -// compile-flags: -Zmir-opt-level=4 +//@ run-pass +//@ compile-flags: -Zmir-opt-level=4 #[derive(Copy, Clone)] pub struct V([usize; 4]); diff --git a/tests/ui/mir/issue-76803-branches-not-same.rs b/tests/ui/mir/issue-76803-branches-not-same.rs index a6a57622005..ef8e3c80db8 100644 --- a/tests/ui/mir/issue-76803-branches-not-same.rs +++ b/tests/ui/mir/issue-76803-branches-not-same.rs @@ -1,4 +1,4 @@ -// run-pass +//@ run-pass #[derive(Debug, Eq, PartialEq)] pub enum Type { diff --git a/tests/ui/mir/issue-77002.rs b/tests/ui/mir/issue-77002.rs index 0c37346eaf8..bbda9976c15 100644 --- a/tests/ui/mir/issue-77002.rs +++ b/tests/ui/mir/issue-77002.rs @@ -1,5 +1,5 @@ -// compile-flags: -Zmir-opt-level=3 -Copt-level=0 -// run-pass +//@ compile-flags: -Zmir-opt-level=3 -Copt-level=0 +//@ run-pass type M = [i64; 2]; diff --git a/tests/ui/mir/issue-77359-simplify-arm-identity.rs b/tests/ui/mir/issue-77359-simplify-arm-identity.rs index e58ba50a9e5..31dd23ffa83 100644 --- a/tests/ui/mir/issue-77359-simplify-arm-identity.rs +++ b/tests/ui/mir/issue-77359-simplify-arm-identity.rs @@ -1,4 +1,4 @@ -// run-pass +//@ run-pass #![allow(dead_code)] diff --git a/tests/ui/mir/issue-77911.rs b/tests/ui/mir/issue-77911.rs index acf4c20542d..4a5fdc65330 100644 --- a/tests/ui/mir/issue-77911.rs +++ b/tests/ui/mir/issue-77911.rs @@ -1,5 +1,5 @@ -// compile-flags: -Z mir-opt-level=3 -// build-pass +//@ compile-flags: -Z mir-opt-level=3 +//@ build-pass use std::fs::File; use std::io::{BufRead, BufReader}; diff --git a/tests/ui/mir/issue-78496.rs b/tests/ui/mir/issue-78496.rs index a0d1f5a780e..74c980002cd 100644 --- a/tests/ui/mir/issue-78496.rs +++ b/tests/ui/mir/issue-78496.rs @@ -1,5 +1,5 @@ -// run-pass -// compile-flags: -Z mir-opt-level=3 -C opt-level=0 +//@ run-pass +//@ compile-flags: -Z mir-opt-level=3 -C opt-level=0 // example from #78496 pub enum E<'a> { diff --git a/tests/ui/mir/issue-80949.rs b/tests/ui/mir/issue-80949.rs index 96b63e93a9a..05e8bdc8472 100644 --- a/tests/ui/mir/issue-80949.rs +++ b/tests/ui/mir/issue-80949.rs @@ -1,4 +1,4 @@ -// build-pass +//@ build-pass trait Trait { type Item; } diff --git a/tests/ui/mir/issue-89485.rs b/tests/ui/mir/issue-89485.rs index cb507eefebb..afd05f477e5 100644 --- a/tests/ui/mir/issue-89485.rs +++ b/tests/ui/mir/issue-89485.rs @@ -1,6 +1,6 @@ // Regression test for issue #89485. -// run-pass +//@ run-pass #[derive(Debug, Eq, PartialEq)] pub enum Type { diff --git a/tests/ui/mir/issue-91745.rs b/tests/ui/mir/issue-91745.rs index ca3d66b1c8e..654c0f6e4b5 100644 --- a/tests/ui/mir/issue-91745.rs +++ b/tests/ui/mir/issue-91745.rs @@ -1,4 +1,4 @@ -// check-pass +//@ check-pass pub trait Foo { type Bar; diff --git a/tests/ui/mir/issue-99852.rs b/tests/ui/mir/issue-99852.rs index 1c675788ee9..59459c67228 100644 --- a/tests/ui/mir/issue-99852.rs +++ b/tests/ui/mir/issue-99852.rs @@ -1,5 +1,5 @@ -// check-pass -// compile-flags: -Z validate-mir +//@ check-pass +//@ compile-flags: -Z validate-mir #![feature(let_chains)] fn lambda() -> U diff --git a/tests/ui/mir/issue-99866.rs b/tests/ui/mir/issue-99866.rs index d39ae6ebf1d..ff305ff4962 100644 --- a/tests/ui/mir/issue-99866.rs +++ b/tests/ui/mir/issue-99866.rs @@ -1,4 +1,4 @@ -// check-pass +//@ check-pass pub trait Backend { type DescriptorSetLayout; } diff --git a/tests/ui/mir/issue66339.rs b/tests/ui/mir/issue66339.rs index f25afd5602d..04c98ae4d7e 100644 --- a/tests/ui/mir/issue66339.rs +++ b/tests/ui/mir/issue66339.rs @@ -1,5 +1,5 @@ -// compile-flags: -Z mir-opt-level=3 -// build-pass +//@ compile-flags: -Z mir-opt-level=3 +//@ build-pass // This used to ICE in const-prop diff --git a/tests/ui/mir/lint/assignment-overlap.rs b/tests/ui/mir/lint/assignment-overlap.rs index 0e4a11467dc..806d09cda85 100644 --- a/tests/ui/mir/lint/assignment-overlap.rs +++ b/tests/ui/mir/lint/assignment-overlap.rs @@ -1,8 +1,8 @@ -// compile-flags: --crate-type=lib -Zlint-mir -Ztreat-err-as-bug -// build-fail -// failure-status: 101 -// dont-check-compiler-stderr -// error-pattern: encountered `Assign` statement with overlapping memory +//@ compile-flags: --crate-type=lib -Zlint-mir -Ztreat-err-as-bug +//@ build-fail +//@ failure-status: 101 +//@ dont-check-compiler-stderr +//@ error-pattern: encountered `Assign` statement with overlapping memory #![feature(custom_mir, core_intrinsics)] extern crate core; use core::intrinsics::mir::*; diff --git a/tests/ui/mir/lint/call-overlap.rs b/tests/ui/mir/lint/call-overlap.rs index df38e901e73..eb806378fe5 100644 --- a/tests/ui/mir/lint/call-overlap.rs +++ b/tests/ui/mir/lint/call-overlap.rs @@ -1,8 +1,8 @@ -// compile-flags: -Zlint-mir -Ztreat-err-as-bug -// build-fail -// failure-status: 101 -// dont-check-compiler-stderr -// error-pattern: encountered overlapping memory in `Move` arguments to `Call` +//@ compile-flags: -Zlint-mir -Ztreat-err-as-bug +//@ build-fail +//@ failure-status: 101 +//@ dont-check-compiler-stderr +//@ error-pattern: encountered overlapping memory in `Move` arguments to `Call` #![feature(custom_mir, core_intrinsics)] extern crate core; use core::intrinsics::mir::*; diff --git a/tests/ui/mir/lint/no-storage.rs b/tests/ui/mir/lint/no-storage.rs index 246a0b34e5d..42dd1b963dc 100644 --- a/tests/ui/mir/lint/no-storage.rs +++ b/tests/ui/mir/lint/no-storage.rs @@ -1,7 +1,7 @@ -// compile-flags: -Zlint-mir --crate-type=lib -Ztreat-err-as-bug -// failure-status: 101 -// dont-check-compiler-stderr -// regex-error-pattern: use of local .*, which has no storage here +//@ compile-flags: -Zlint-mir --crate-type=lib -Ztreat-err-as-bug +//@ failure-status: 101 +//@ dont-check-compiler-stderr +//@ regex-error-pattern: use of local .*, which has no storage here #![feature(custom_mir, core_intrinsics)] extern crate core; use core::intrinsics::mir::*; diff --git a/tests/ui/mir/lint/storage-live.rs b/tests/ui/mir/lint/storage-live.rs index f34a2c7de37..5dea1cb3567 100644 --- a/tests/ui/mir/lint/storage-live.rs +++ b/tests/ui/mir/lint/storage-live.rs @@ -1,11 +1,11 @@ -// compile-flags: -Zlint-mir -Ztreat-err-as-bug -// failure-status: 101 -// error-pattern: broken MIR in -// error-pattern: StorageLive(_1) which already has storage here -// normalize-stderr-test "note: .*\n\n" -> "" -// normalize-stderr-test "thread 'rustc' panicked.*\n" -> "" -// normalize-stderr-test "storage_live\[....\]" -> "storage_live[HASH]" -// rustc-env:RUST_BACKTRACE=0 +//@ compile-flags: -Zlint-mir -Ztreat-err-as-bug +//@ failure-status: 101 +//@ error-pattern: broken MIR in +//@ error-pattern: StorageLive(_1) which already has storage here +//@ normalize-stderr-test "note: .*\n\n" -> "" +//@ normalize-stderr-test "thread 'rustc' panicked.*\n" -> "" +//@ normalize-stderr-test "storage_live\[....\]" -> "storage_live[HASH]" +//@ rustc-env:RUST_BACKTRACE=0 #![feature(custom_mir, core_intrinsics)] diff --git a/tests/ui/mir/lint/storage-return.rs b/tests/ui/mir/lint/storage-return.rs index 7f5700fc897..b6281d4b2a8 100644 --- a/tests/ui/mir/lint/storage-return.rs +++ b/tests/ui/mir/lint/storage-return.rs @@ -1,7 +1,7 @@ -// compile-flags: -Zlint-mir -Ztreat-err-as-bug -Zeagerly-emit-delayed-bugs -// failure-status: 101 -// dont-check-compiler-stderr -// error-pattern: has storage when returning +//@ compile-flags: -Zlint-mir -Ztreat-err-as-bug -Zeagerly-emit-delayed-bugs +//@ failure-status: 101 +//@ dont-check-compiler-stderr +//@ error-pattern: has storage when returning #![feature(custom_mir, core_intrinsics)] extern crate core; use core::intrinsics::mir::*; diff --git a/tests/ui/mir/mir-inlining/always-encode-mirs.rs b/tests/ui/mir/mir-inlining/always-encode-mirs.rs index f3731996cf2..9029ff6499b 100644 --- a/tests/ui/mir/mir-inlining/always-encode-mirs.rs +++ b/tests/ui/mir/mir-inlining/always-encode-mirs.rs @@ -2,9 +2,9 @@ // Previously we inlined function not eligible for inlining which lead to linking error: // undefined reference to `internal::S' // -// aux-build:internal.rs -// build-pass -// compile-flags: -O +//@ aux-build:internal.rs +//@ build-pass +//@ compile-flags: -O extern crate internal; fn main() { diff --git a/tests/ui/mir/mir-inlining/array-clone-with-generic-size.rs b/tests/ui/mir/mir-inlining/array-clone-with-generic-size.rs index e36e8bd746d..60f13b96ee2 100644 --- a/tests/ui/mir/mir-inlining/array-clone-with-generic-size.rs +++ b/tests/ui/mir/mir-inlining/array-clone-with-generic-size.rs @@ -1,8 +1,8 @@ // Checks that we can build a clone shim for array with generic size. // Regression test for issue #79269. // -// build-pass -// compile-flags: -Zmir-opt-level=3 -Zvalidate-mir +//@ build-pass +//@ compile-flags: -Zmir-opt-level=3 -Zvalidate-mir #[derive(Clone)] struct Array([T; N]); diff --git a/tests/ui/mir/mir-inlining/auxiliary/internal.rs b/tests/ui/mir/mir-inlining/auxiliary/internal.rs index fa0f9c2da41..580accabef4 100644 --- a/tests/ui/mir/mir-inlining/auxiliary/internal.rs +++ b/tests/ui/mir/mir-inlining/auxiliary/internal.rs @@ -1,4 +1,4 @@ -// compile-flags: -Zalways-encode-mir +//@ compile-flags: -Zalways-encode-mir static S: usize = 42; diff --git a/tests/ui/mir/mir-inlining/ice-issue-100550-unnormalized-projection.rs b/tests/ui/mir/mir-inlining/ice-issue-100550-unnormalized-projection.rs index f67b0735481..8d283e27dca 100644 --- a/tests/ui/mir/mir-inlining/ice-issue-100550-unnormalized-projection.rs +++ b/tests/ui/mir/mir-inlining/ice-issue-100550-unnormalized-projection.rs @@ -1,8 +1,8 @@ // This test verifies that we do not ICE due to MIR inlining in case of normalization failure // in a projection. // -// compile-flags: --crate-type lib -C opt-level=3 -// build-pass +//@ compile-flags: --crate-type lib -C opt-level=3 +//@ build-pass pub trait Trait { type Associated; diff --git a/tests/ui/mir/mir-inlining/ice-issue-45493.rs b/tests/ui/mir/mir-inlining/ice-issue-45493.rs index 04a23212e7b..5c7cd834c2b 100644 --- a/tests/ui/mir/mir-inlining/ice-issue-45493.rs +++ b/tests/ui/mir/mir-inlining/ice-issue-45493.rs @@ -1,5 +1,5 @@ -// run-pass -// compile-flags:-Zmir-opt-level=3 +//@ run-pass +//@ compile-flags:-Zmir-opt-level=3 trait Array { type Item; diff --git a/tests/ui/mir/mir-inlining/ice-issue-45885.rs b/tests/ui/mir/mir-inlining/ice-issue-45885.rs index 09b1279ef34..7ccafde76b8 100644 --- a/tests/ui/mir/mir-inlining/ice-issue-45885.rs +++ b/tests/ui/mir/mir-inlining/ice-issue-45885.rs @@ -1,5 +1,5 @@ -// run-pass -// compile-flags:-Zmir-opt-level=3 +//@ run-pass +//@ compile-flags:-Zmir-opt-level=3 pub enum Enum { A, diff --git a/tests/ui/mir/mir-inlining/ice-issue-68347.rs b/tests/ui/mir/mir-inlining/ice-issue-68347.rs index 7c135250940..7e2c0a9df6f 100644 --- a/tests/ui/mir/mir-inlining/ice-issue-68347.rs +++ b/tests/ui/mir/mir-inlining/ice-issue-68347.rs @@ -1,5 +1,5 @@ -// run-pass -// compile-flags:-Zmir-opt-level=3 +//@ run-pass +//@ compile-flags:-Zmir-opt-level=3 pub fn main() { let _x: fn() = handle_debug_column; } diff --git a/tests/ui/mir/mir-inlining/ice-issue-77306-1.rs b/tests/ui/mir/mir-inlining/ice-issue-77306-1.rs index ef05ff9ce03..e47fe482b3c 100644 --- a/tests/ui/mir/mir-inlining/ice-issue-77306-1.rs +++ b/tests/ui/mir/mir-inlining/ice-issue-77306-1.rs @@ -1,5 +1,5 @@ -// run-pass -// compile-flags:-Zmir-opt-level=3 +//@ run-pass +//@ compile-flags:-Zmir-opt-level=3 // Previously ICEd because we did not normalize during inlining, // see https://github.com/rust-lang/rust/pull/77306 for more discussion. diff --git a/tests/ui/mir/mir-inlining/ice-issue-77306-2.rs b/tests/ui/mir/mir-inlining/ice-issue-77306-2.rs index cb208401313..0b9e37740ea 100644 --- a/tests/ui/mir/mir-inlining/ice-issue-77306-2.rs +++ b/tests/ui/mir/mir-inlining/ice-issue-77306-2.rs @@ -1,5 +1,5 @@ -// run-pass -// compile-flags:-Zmir-opt-level=3 +//@ run-pass +//@ compile-flags:-Zmir-opt-level=3 struct Cursor {} struct TokenTree {} diff --git a/tests/ui/mir/mir-inlining/ice-issue-77564.rs b/tests/ui/mir/mir-inlining/ice-issue-77564.rs index 0d3fbfe5d1a..fce6d1d174f 100644 --- a/tests/ui/mir/mir-inlining/ice-issue-77564.rs +++ b/tests/ui/mir/mir-inlining/ice-issue-77564.rs @@ -1,5 +1,5 @@ -// run-pass -// compile-flags:-Zmir-opt-level=3 +//@ run-pass +//@ compile-flags:-Zmir-opt-level=3 use std::mem::MaybeUninit; const N: usize = 2; diff --git a/tests/ui/mir/mir-inlining/no-trait-method-issue-40473.rs b/tests/ui/mir/mir-inlining/no-trait-method-issue-40473.rs index 8b3cb703dc0..d8b05950c55 100644 --- a/tests/ui/mir/mir-inlining/no-trait-method-issue-40473.rs +++ b/tests/ui/mir/mir-inlining/no-trait-method-issue-40473.rs @@ -1,5 +1,5 @@ -// run-pass -// compile-flags:-Zmir-opt-level=3 +//@ run-pass +//@ compile-flags:-Zmir-opt-level=3 pub trait Foo { fn bar(&self) -> usize { 2 } } diff --git a/tests/ui/mir/mir-inlining/var-debuginfo-issue-67586.rs b/tests/ui/mir/mir-inlining/var-debuginfo-issue-67586.rs index e2620682679..2f916701d46 100644 --- a/tests/ui/mir/mir-inlining/var-debuginfo-issue-67586.rs +++ b/tests/ui/mir/mir-inlining/var-debuginfo-issue-67586.rs @@ -1,5 +1,5 @@ -// run-pass -// compile-flags: -Z mir-opt-level=3 -C opt-level=0 -C debuginfo=2 +//@ run-pass +//@ compile-flags: -Z mir-opt-level=3 -C opt-level=0 -C debuginfo=2 #[inline(never)] pub fn foo(bar: usize) -> usize { diff --git a/tests/ui/mir/mir-typeck-normalize-fn-sig.rs b/tests/ui/mir/mir-typeck-normalize-fn-sig.rs index bdd9321afd7..8895ab126bb 100644 --- a/tests/ui/mir/mir-typeck-normalize-fn-sig.rs +++ b/tests/ui/mir/mir-typeck-normalize-fn-sig.rs @@ -1,4 +1,4 @@ -// run-pass +//@ run-pass #![allow(unused_variables)] // This code was creating an ICE in the MIR type checker. The reason // is that we are reifying a reference to a function (`foo::<'x>`), diff --git a/tests/ui/mir/mir_adt_construction.rs b/tests/ui/mir/mir_adt_construction.rs index 9fb5896de6b..87b471806af 100644 --- a/tests/ui/mir/mir_adt_construction.rs +++ b/tests/ui/mir/mir_adt_construction.rs @@ -1,4 +1,4 @@ -// run-pass +//@ run-pass use std::fmt; #[repr(C)] diff --git a/tests/ui/mir/mir_ascription_coercion.rs b/tests/ui/mir/mir_ascription_coercion.rs index 9e04d601987..b36a2c385d0 100644 --- a/tests/ui/mir/mir_ascription_coercion.rs +++ b/tests/ui/mir/mir_ascription_coercion.rs @@ -1,4 +1,4 @@ -// run-pass +//@ run-pass // Tests that the result of type ascription has adjustments applied #![feature(type_ascription)] diff --git a/tests/ui/mir/mir_assign_eval_order.rs b/tests/ui/mir/mir_assign_eval_order.rs index 799bf7f3a12..16572daccde 100644 --- a/tests/ui/mir/mir_assign_eval_order.rs +++ b/tests/ui/mir/mir_assign_eval_order.rs @@ -1,6 +1,6 @@ // Test evaluation order of assignment expressions is right to left. -// run-pass +//@ run-pass // We would previously not finish evaluating borrow and FRU expressions before // starting on the LHS diff --git a/tests/ui/mir/mir_augmented_assignments.rs b/tests/ui/mir/mir_augmented_assignments.rs index 44454f8f417..2b7893b318d 100644 --- a/tests/ui/mir/mir_augmented_assignments.rs +++ b/tests/ui/mir/mir_augmented_assignments.rs @@ -1,4 +1,4 @@ -// run-pass +//@ run-pass use std::mem; use std::ops::{ AddAssign, BitAndAssign, BitOrAssign, BitXorAssign, DivAssign, MulAssign, RemAssign, diff --git a/tests/ui/mir/mir_autoderef.rs b/tests/ui/mir/mir_autoderef.rs index a0e615a7387..95800c68ec2 100644 --- a/tests/ui/mir/mir_autoderef.rs +++ b/tests/ui/mir/mir_autoderef.rs @@ -1,4 +1,4 @@ -// run-pass +//@ run-pass use std::ops::{Deref, DerefMut}; pub struct MyRef(u32); diff --git a/tests/ui/mir/mir_build_match_comparisons.rs b/tests/ui/mir/mir_build_match_comparisons.rs index 04570055763..a06b9efa4fc 100644 --- a/tests/ui/mir/mir_build_match_comparisons.rs +++ b/tests/ui/mir/mir_build_match_comparisons.rs @@ -1,4 +1,4 @@ -// run-pass +//@ run-pass #![allow(dead_code)] fn test1(x: i8) -> i32 { match x { diff --git a/tests/ui/mir/mir_call_with_associated_type.rs b/tests/ui/mir/mir_call_with_associated_type.rs index 7103533e1da..d88f4d504b7 100644 --- a/tests/ui/mir/mir_call_with_associated_type.rs +++ b/tests/ui/mir/mir_call_with_associated_type.rs @@ -1,4 +1,4 @@ -// run-pass +//@ run-pass trait Trait { type Type; } diff --git a/tests/ui/mir/mir_calls_to_shims.rs b/tests/ui/mir/mir_calls_to_shims.rs index 9dc0acfbfda..7a5b2182e26 100644 --- a/tests/ui/mir/mir_calls_to_shims.rs +++ b/tests/ui/mir/mir_calls_to_shims.rs @@ -1,5 +1,5 @@ -// run-pass -// needs-unwind +//@ run-pass +//@ needs-unwind #![feature(fn_traits)] #![feature(never_type)] diff --git a/tests/ui/mir/mir_cast_fn_ret.rs b/tests/ui/mir/mir_cast_fn_ret.rs index 4574dbd8529..eebc6c03f44 100644 --- a/tests/ui/mir/mir_cast_fn_ret.rs +++ b/tests/ui/mir/mir_cast_fn_ret.rs @@ -1,4 +1,4 @@ -// run-pass +//@ run-pass #[allow(improper_ctypes_definitions)] pub extern "C" fn tuple2() -> (u16, u8) { (1, 2) diff --git a/tests/ui/mir/mir_codegen_array.rs b/tests/ui/mir/mir_codegen_array.rs index 38e443d8e39..a6a56810e45 100644 --- a/tests/ui/mir/mir_codegen_array.rs +++ b/tests/ui/mir/mir_codegen_array.rs @@ -1,4 +1,4 @@ -// run-pass +//@ run-pass #![allow(unused_mut)] fn into_inner() -> [u64; 1024] { let mut x = 10 + 20; diff --git a/tests/ui/mir/mir_codegen_array_2.rs b/tests/ui/mir/mir_codegen_array_2.rs index 03d3aa5ade6..7385029ba45 100644 --- a/tests/ui/mir/mir_codegen_array_2.rs +++ b/tests/ui/mir/mir_codegen_array_2.rs @@ -1,4 +1,4 @@ -// run-pass +//@ run-pass fn into_inner(x: u64) -> [u64; 1024] { [x; 2*4*8*16] } diff --git a/tests/ui/mir/mir_codegen_call_converging.rs b/tests/ui/mir/mir_codegen_call_converging.rs index 9c340e4e036..07d3b86e4a5 100644 --- a/tests/ui/mir/mir_codegen_call_converging.rs +++ b/tests/ui/mir/mir_codegen_call_converging.rs @@ -1,4 +1,4 @@ -// run-pass +//@ run-pass fn converging_fn() -> u64 { 43 } diff --git a/tests/ui/mir/mir_codegen_calls.rs b/tests/ui/mir/mir_codegen_calls.rs index 6a5a4dace64..b0749f565da 100644 --- a/tests/ui/mir/mir_codegen_calls.rs +++ b/tests/ui/mir/mir_codegen_calls.rs @@ -1,4 +1,4 @@ -// run-pass +//@ run-pass #![feature(fn_traits, test)] extern crate test; diff --git a/tests/ui/mir/mir_codegen_calls_converging_drops.rs b/tests/ui/mir/mir_codegen_calls_converging_drops.rs index b562f930814..5c3c8b999b2 100644 --- a/tests/ui/mir/mir_codegen_calls_converging_drops.rs +++ b/tests/ui/mir/mir_codegen_calls_converging_drops.rs @@ -1,8 +1,8 @@ -// run-fail -// error-pattern:converging_fn called -// error-pattern:0 dropped -// error-pattern:exit -// ignore-emscripten no processes +//@ run-fail +//@ error-pattern:converging_fn called +//@ error-pattern:0 dropped +//@ error-pattern:exit +//@ ignore-emscripten no processes struct Droppable(u8); impl Drop for Droppable { diff --git a/tests/ui/mir/mir_codegen_calls_converging_drops_2.rs b/tests/ui/mir/mir_codegen_calls_converging_drops_2.rs index e9446da9e39..e3cb9a96de0 100644 --- a/tests/ui/mir/mir_codegen_calls_converging_drops_2.rs +++ b/tests/ui/mir/mir_codegen_calls_converging_drops_2.rs @@ -1,8 +1,8 @@ -// run-fail -// error-pattern:complex called -// error-pattern:dropped -// error-pattern:exit -// ignore-emscripten no processes +//@ run-fail +//@ error-pattern:complex called +//@ error-pattern:dropped +//@ error-pattern:exit +//@ ignore-emscripten no processes struct Droppable; impl Drop for Droppable { diff --git a/tests/ui/mir/mir_codegen_calls_diverging.rs b/tests/ui/mir/mir_codegen_calls_diverging.rs index 736d580e2da..c62527f01d3 100644 --- a/tests/ui/mir/mir_codegen_calls_diverging.rs +++ b/tests/ui/mir/mir_codegen_calls_diverging.rs @@ -1,6 +1,6 @@ -// run-fail -// error-pattern:diverging_fn called -// ignore-emscripten no processes +//@ run-fail +//@ error-pattern:diverging_fn called +//@ ignore-emscripten no processes fn diverging_fn() -> ! { panic!("diverging_fn called") diff --git a/tests/ui/mir/mir_codegen_calls_diverging_drops.rs b/tests/ui/mir/mir_codegen_calls_diverging_drops.rs index 19dba497001..b0675a6a5a0 100644 --- a/tests/ui/mir/mir_codegen_calls_diverging_drops.rs +++ b/tests/ui/mir/mir_codegen_calls_diverging_drops.rs @@ -1,7 +1,7 @@ -// run-fail -// error-pattern:diverging_fn called -// error-pattern:0 dropped -// needs-unwind this test checks that a destructor is called after panicking +//@ run-fail +//@ error-pattern:diverging_fn called +//@ error-pattern:0 dropped +//@ needs-unwind this test checks that a destructor is called after panicking struct Droppable(u8); impl Drop for Droppable { diff --git a/tests/ui/mir/mir_codegen_critical_edge.rs b/tests/ui/mir/mir_codegen_critical_edge.rs index 5c1f1c3b701..23421545c0e 100644 --- a/tests/ui/mir/mir_codegen_critical_edge.rs +++ b/tests/ui/mir/mir_codegen_critical_edge.rs @@ -1,4 +1,4 @@ -// run-pass +//@ run-pass #![allow(dead_code)] // This code produces a CFG with critical edges that, if we don't // handle properly, will cause invalid codegen. diff --git a/tests/ui/mir/mir_codegen_spike1.rs b/tests/ui/mir/mir_codegen_spike1.rs index 90bdd6b4bd7..122397766b6 100644 --- a/tests/ui/mir/mir_codegen_spike1.rs +++ b/tests/ui/mir/mir_codegen_spike1.rs @@ -1,4 +1,4 @@ -// run-pass +//@ run-pass // A simple spike test for MIR version of codegen. fn sum(x: i32, y: i32) -> i32 { diff --git a/tests/ui/mir/mir_codegen_ssa.rs b/tests/ui/mir/mir_codegen_ssa.rs index 5e2f10cefe9..bf01edcbaa8 100644 --- a/tests/ui/mir/mir_codegen_ssa.rs +++ b/tests/ui/mir/mir_codegen_ssa.rs @@ -1,5 +1,5 @@ -// build-pass -// compile-flags: --crate-type=lib +//@ build-pass +//@ compile-flags: --crate-type=lib #![feature(custom_mir, core_intrinsics)] use std::intrinsics::mir::*; diff --git a/tests/ui/mir/mir_codegen_switch.rs b/tests/ui/mir/mir_codegen_switch.rs index afdcd36f4bc..90312268f26 100644 --- a/tests/ui/mir/mir_codegen_switch.rs +++ b/tests/ui/mir/mir_codegen_switch.rs @@ -1,4 +1,4 @@ -// run-pass +//@ run-pass enum Abc { A(#[allow(dead_code)] u8), B(#[allow(dead_code)] i8), diff --git a/tests/ui/mir/mir_codegen_switchint.rs b/tests/ui/mir/mir_codegen_switchint.rs index c092a6c31b2..db0d05f6371 100644 --- a/tests/ui/mir/mir_codegen_switchint.rs +++ b/tests/ui/mir/mir_codegen_switchint.rs @@ -1,4 +1,4 @@ -// run-pass +//@ run-pass pub fn foo(x: i8) -> i32 { match x { 1 => 0, diff --git a/tests/ui/mir/mir_coercion_casts.rs b/tests/ui/mir/mir_coercion_casts.rs index 7d761181d80..bfb47d9cfa3 100644 --- a/tests/ui/mir/mir_coercion_casts.rs +++ b/tests/ui/mir/mir_coercion_casts.rs @@ -1,4 +1,4 @@ -// run-pass +//@ run-pass // Tests the coercion casts are handled properly fn main() { diff --git a/tests/ui/mir/mir_coercions.rs b/tests/ui/mir/mir_coercions.rs index f3dcc6b85fd..11230c3fbb7 100644 --- a/tests/ui/mir/mir_coercions.rs +++ b/tests/ui/mir/mir_coercions.rs @@ -1,4 +1,4 @@ -// run-pass +//@ run-pass #![feature(coerce_unsized, unsize)] use std::ops::CoerceUnsized; diff --git a/tests/ui/mir/mir_const_prop_identity.rs b/tests/ui/mir/mir_const_prop_identity.rs index 25d2202b909..acc09caa4f7 100644 --- a/tests/ui/mir/mir_const_prop_identity.rs +++ b/tests/ui/mir/mir_const_prop_identity.rs @@ -1,7 +1,7 @@ // Regression test for issue #91725. // -// run-pass -// compile-flags: -Zmir-opt-level=4 +//@ run-pass +//@ compile-flags: -Zmir-opt-level=4 fn main() { let a = true; diff --git a/tests/ui/mir/mir_const_prop_tuple_field_reorder.rs b/tests/ui/mir/mir_const_prop_tuple_field_reorder.rs index b66a85d07d3..4a22b3cfd23 100644 --- a/tests/ui/mir/mir_const_prop_tuple_field_reorder.rs +++ b/tests/ui/mir/mir_const_prop_tuple_field_reorder.rs @@ -1,5 +1,5 @@ -// compile-flags: -Z mir-opt-level=3 -// build-pass +//@ compile-flags: -Z mir-opt-level=3 +//@ build-pass #![crate_type="lib"] // This used to ICE: const-prop did not account for field reordering of scalar pairs, diff --git a/tests/ui/mir/mir_constval_adts.rs b/tests/ui/mir/mir_constval_adts.rs index ee9d73451f4..4c7d72d319d 100644 --- a/tests/ui/mir/mir_constval_adts.rs +++ b/tests/ui/mir/mir_constval_adts.rs @@ -1,4 +1,4 @@ -// run-pass +//@ run-pass #[derive(PartialEq, Debug)] struct Point { _x: i32, diff --git a/tests/ui/mir/mir_detects_invalid_ops.rs b/tests/ui/mir/mir_detects_invalid_ops.rs index 136c03cd9f1..fd156562b49 100644 --- a/tests/ui/mir/mir_detects_invalid_ops.rs +++ b/tests/ui/mir/mir_detects_invalid_ops.rs @@ -1,4 +1,4 @@ -// build-fail +//@ build-fail fn main() { divide_by_zero(); diff --git a/tests/ui/mir/mir_drop_order.rs b/tests/ui/mir/mir_drop_order.rs index 75f5b171af3..21d1054c422 100644 --- a/tests/ui/mir/mir_drop_order.rs +++ b/tests/ui/mir/mir_drop_order.rs @@ -1,5 +1,5 @@ -// run-pass -// needs-unwind +//@ run-pass +//@ needs-unwind use std::cell::RefCell; use std::panic; diff --git a/tests/ui/mir/mir_drop_panics.rs b/tests/ui/mir/mir_drop_panics.rs index 0d00426d6d2..ec846fc241b 100644 --- a/tests/ui/mir/mir_drop_panics.rs +++ b/tests/ui/mir/mir_drop_panics.rs @@ -1,7 +1,7 @@ -// run-fail -// needs-unwind -// error-pattern:panic 1 -// error-pattern:drop 2 +//@ run-fail +//@ needs-unwind +//@ error-pattern:panic 1 +//@ error-pattern:drop 2 struct Droppable(u32); impl Drop for Droppable { diff --git a/tests/ui/mir/mir_dynamic_drops_1.rs b/tests/ui/mir/mir_dynamic_drops_1.rs index 2b33b616600..ffb8cc26100 100644 --- a/tests/ui/mir/mir_dynamic_drops_1.rs +++ b/tests/ui/mir/mir_dynamic_drops_1.rs @@ -1,7 +1,7 @@ -// run-fail -// error-pattern:drop 1 -// error-pattern:drop 2 -// ignore-emscripten no processes +//@ run-fail +//@ error-pattern:drop 1 +//@ error-pattern:drop 2 +//@ ignore-emscripten no processes /// Structure which will not allow to be dropped twice. struct Droppable<'a>(&'a mut bool, u32); diff --git a/tests/ui/mir/mir_dynamic_drops_2.rs b/tests/ui/mir/mir_dynamic_drops_2.rs index c883efdabc3..dc71f414673 100644 --- a/tests/ui/mir/mir_dynamic_drops_2.rs +++ b/tests/ui/mir/mir_dynamic_drops_2.rs @@ -1,6 +1,6 @@ -// run-fail -// error-pattern:drop 1 -// ignore-emscripten no processes +//@ run-fail +//@ error-pattern:drop 1 +//@ ignore-emscripten no processes /// Structure which will not allow to be dropped twice. struct Droppable<'a>(&'a mut bool, u32); diff --git a/tests/ui/mir/mir_dynamic_drops_3.rs b/tests/ui/mir/mir_dynamic_drops_3.rs index 2bcd9fac55c..fe84502ef1d 100644 --- a/tests/ui/mir/mir_dynamic_drops_3.rs +++ b/tests/ui/mir/mir_dynamic_drops_3.rs @@ -1,10 +1,10 @@ -// run-fail -// needs-unwind -// error-pattern:unwind happens -// error-pattern:drop 3 -// error-pattern:drop 2 -// error-pattern:drop 1 -// ignore-emscripten no processes +//@ run-fail +//@ needs-unwind +//@ error-pattern:unwind happens +//@ error-pattern:drop 3 +//@ error-pattern:drop 2 +//@ error-pattern:drop 1 +//@ ignore-emscripten no processes /// Structure which will not allow to be dropped twice. struct Droppable<'a>(&'a mut bool, u32); diff --git a/tests/ui/mir/mir_early_return_scope.rs b/tests/ui/mir/mir_early_return_scope.rs index a696471c361..6dc3f8bc39b 100644 --- a/tests/ui/mir/mir_early_return_scope.rs +++ b/tests/ui/mir/mir_early_return_scope.rs @@ -1,4 +1,4 @@ -// run-pass +//@ run-pass #![allow(unused_variables)] static mut DROP: bool = false; diff --git a/tests/ui/mir/mir_fat_ptr.rs b/tests/ui/mir/mir_fat_ptr.rs index 0c07fba6e94..f2dd9e6fe40 100644 --- a/tests/ui/mir/mir_fat_ptr.rs +++ b/tests/ui/mir/mir_fat_ptr.rs @@ -1,4 +1,4 @@ -// run-pass +//@ run-pass // test that ordinary fat pointer operations work. struct Wrapper(#[allow(dead_code)] u32, T); diff --git a/tests/ui/mir/mir_fat_ptr_drop.rs b/tests/ui/mir/mir_fat_ptr_drop.rs index d865c3499b2..ff6a0d70881 100644 --- a/tests/ui/mir/mir_fat_ptr_drop.rs +++ b/tests/ui/mir/mir_fat_ptr_drop.rs @@ -1,4 +1,4 @@ -// run-pass +//@ run-pass #![allow(unused_variables)] #![allow(stable_features)] diff --git a/tests/ui/mir/mir_heavy_promoted.rs b/tests/ui/mir/mir_heavy_promoted.rs index 092299880e2..dd65f4f62a0 100644 --- a/tests/ui/mir/mir_heavy_promoted.rs +++ b/tests/ui/mir/mir_heavy_promoted.rs @@ -1,5 +1,5 @@ -// run-pass -// ignore-emscripten apparently only works in optimized mode +//@ run-pass +//@ ignore-emscripten apparently only works in optimized mode const TEST_DATA: [u8; 32 * 1024 * 1024] = [42; 32 * 1024 * 1024]; diff --git a/tests/ui/mir/mir_indexing_oob_1.rs b/tests/ui/mir/mir_indexing_oob_1.rs index 6d769b6b23a..3afc2f0b32e 100644 --- a/tests/ui/mir/mir_indexing_oob_1.rs +++ b/tests/ui/mir/mir_indexing_oob_1.rs @@ -1,6 +1,6 @@ -// run-fail -// error-pattern:index out of bounds: the len is 5 but the index is 10 -// ignore-emscripten no processes +//@ run-fail +//@ error-pattern:index out of bounds: the len is 5 but the index is 10 +//@ ignore-emscripten no processes const C: [u32; 5] = [0; 5]; diff --git a/tests/ui/mir/mir_indexing_oob_2.rs b/tests/ui/mir/mir_indexing_oob_2.rs index a9e85057015..6e7c1c83536 100644 --- a/tests/ui/mir/mir_indexing_oob_2.rs +++ b/tests/ui/mir/mir_indexing_oob_2.rs @@ -1,6 +1,6 @@ -// run-fail -// error-pattern:index out of bounds: the len is 5 but the index is 10 -// ignore-emscripten no processes +//@ run-fail +//@ error-pattern:index out of bounds: the len is 5 but the index is 10 +//@ ignore-emscripten no processes const C: &'static [u8; 5] = b"hello"; diff --git a/tests/ui/mir/mir_indexing_oob_3.rs b/tests/ui/mir/mir_indexing_oob_3.rs index 4f5cab59bfc..4012864c6ce 100644 --- a/tests/ui/mir/mir_indexing_oob_3.rs +++ b/tests/ui/mir/mir_indexing_oob_3.rs @@ -1,6 +1,6 @@ -// run-fail -// error-pattern:index out of bounds: the len is 5 but the index is 10 -// ignore-emscripten no processes +//@ run-fail +//@ error-pattern:index out of bounds: the len is 5 but the index is 10 +//@ ignore-emscripten no processes const C: &'static [u8; 5] = b"hello"; diff --git a/tests/ui/mir/mir_let_chains_drop_order.rs b/tests/ui/mir/mir_let_chains_drop_order.rs index 6471553e93f..5cbfdf2e35a 100644 --- a/tests/ui/mir/mir_let_chains_drop_order.rs +++ b/tests/ui/mir/mir_let_chains_drop_order.rs @@ -1,5 +1,5 @@ -// run-pass -// needs-unwind +//@ run-pass +//@ needs-unwind // See `mir_drop_order.rs` for more information diff --git a/tests/ui/mir/mir_match_arm_guard.rs b/tests/ui/mir/mir_match_arm_guard.rs index 65e4ed041bb..76531f0ee21 100644 --- a/tests/ui/mir/mir_match_arm_guard.rs +++ b/tests/ui/mir/mir_match_arm_guard.rs @@ -1,4 +1,4 @@ -// run-pass +//@ run-pass // #30527 - We were not generating arms with guards in certain cases. fn match_with_guard(x: Option) -> i8 { diff --git a/tests/ui/mir/mir_match_test.rs b/tests/ui/mir/mir_match_test.rs index d41a7f4a1db..925e1e6ab3d 100644 --- a/tests/ui/mir/mir_match_test.rs +++ b/tests/ui/mir/mir_match_test.rs @@ -1,7 +1,7 @@ #![feature(exclusive_range_pattern)] #![allow(overlapping_range_endpoints)] -// run-pass +//@ run-pass fn main() { let incl_range = |x, b| { diff --git a/tests/ui/mir/mir_misc_casts.rs b/tests/ui/mir/mir_misc_casts.rs index 2e7fbeee5da..35f217fceba 100644 --- a/tests/ui/mir/mir_misc_casts.rs +++ b/tests/ui/mir/mir_misc_casts.rs @@ -1,4 +1,4 @@ -// run-pass +//@ run-pass fn func(){} const STR: &'static str = "hello"; diff --git a/tests/ui/mir/mir_overflow_off.rs b/tests/ui/mir/mir_overflow_off.rs index 0098584dd26..8210dd02462 100644 --- a/tests/ui/mir/mir_overflow_off.rs +++ b/tests/ui/mir/mir_overflow_off.rs @@ -1,5 +1,5 @@ -// run-pass -// compile-flags: -C overflow-checks=off +//@ run-pass +//@ compile-flags: -C overflow-checks=off // Test that with MIR codegen, overflow checks can be // turned off, even when they're from core::ops::*. diff --git a/tests/ui/mir/mir_query_cycle.rs b/tests/ui/mir/mir_query_cycle.rs index 22d1ccb6c6e..2ad4e6a39a2 100644 --- a/tests/ui/mir/mir_query_cycle.rs +++ b/tests/ui/mir/mir_query_cycle.rs @@ -1,7 +1,7 @@ // Regression test for #121094. -// build-pass -// compile-flags: -O --crate-type=lib -// edition: 2021 +//@ build-pass +//@ compile-flags: -O --crate-type=lib +//@ edition: 2021 use std::{future::Future, pin::Pin}; pub async fn foo(count: u32) { diff --git a/tests/ui/mir/mir_raw_fat_ptr.rs b/tests/ui/mir/mir_raw_fat_ptr.rs index e141aa03aa9..a5a48587e3b 100644 --- a/tests/ui/mir/mir_raw_fat_ptr.rs +++ b/tests/ui/mir/mir_raw_fat_ptr.rs @@ -1,4 +1,4 @@ -// run-pass +//@ run-pass // check raw fat pointer ops in mir // FIXME: please improve this when we get monomorphization support diff --git a/tests/ui/mir/mir_refs_correct.rs b/tests/ui/mir/mir_refs_correct.rs index c5b57f52743..fc23c8c3631 100644 --- a/tests/ui/mir/mir_refs_correct.rs +++ b/tests/ui/mir/mir_refs_correct.rs @@ -1,5 +1,5 @@ -// run-pass -// aux-build:mir_external_refs.rs +//@ run-pass +//@ aux-build:mir_external_refs.rs extern crate mir_external_refs as ext; diff --git a/tests/ui/mir/mir_small_agg_arg.rs b/tests/ui/mir/mir_small_agg_arg.rs index 5a22a0420c5..a21c2076e17 100644 --- a/tests/ui/mir/mir_small_agg_arg.rs +++ b/tests/ui/mir/mir_small_agg_arg.rs @@ -1,4 +1,4 @@ -// run-pass +//@ run-pass #![allow(unused_variables)] fn foo((x, y): (i8, i8)) { } diff --git a/tests/ui/mir/mir_static_subtype.rs b/tests/ui/mir/mir_static_subtype.rs index d471b8f149d..ddddd65ee6b 100644 --- a/tests/ui/mir/mir_static_subtype.rs +++ b/tests/ui/mir/mir_static_subtype.rs @@ -1,4 +1,4 @@ -// run-pass +//@ run-pass // Test that subtyping the body of a static doesn't cause an ICE. fn foo(_ : &()) {} diff --git a/tests/ui/mir/mir_struct_with_assoc_ty.rs b/tests/ui/mir/mir_struct_with_assoc_ty.rs index 26d026bdfdd..54c31f1efc5 100644 --- a/tests/ui/mir/mir_struct_with_assoc_ty.rs +++ b/tests/ui/mir/mir_struct_with_assoc_ty.rs @@ -1,4 +1,4 @@ -// run-pass +//@ run-pass use std::marker::PhantomData; pub trait DataBind { diff --git a/tests/ui/mir/mir_temp_promotions.rs b/tests/ui/mir/mir_temp_promotions.rs index 845dc4c0444..cf13d70216a 100644 --- a/tests/ui/mir/mir_temp_promotions.rs +++ b/tests/ui/mir/mir_temp_promotions.rs @@ -1,4 +1,4 @@ -// run-pass +//@ run-pass fn test1(f: f32) -> bool { // test that we properly promote temporaries to allocas when a temporary is assigned to // multiple times (assignment is still happening once āˆ€ possible dataflows). diff --git a/tests/ui/mir/mir_void_return.rs b/tests/ui/mir/mir_void_return.rs index d257affc268..5f53803d446 100644 --- a/tests/ui/mir/mir_void_return.rs +++ b/tests/ui/mir/mir_void_return.rs @@ -1,4 +1,4 @@ -// run-pass +//@ run-pass fn mir() -> (){ let x = 1; let mut y = 0; diff --git a/tests/ui/mir/mir_void_return_2.rs b/tests/ui/mir/mir_void_return_2.rs index a1fb0a7db17..1e4092070f3 100644 --- a/tests/ui/mir/mir_void_return_2.rs +++ b/tests/ui/mir/mir_void_return_2.rs @@ -1,4 +1,4 @@ -// run-pass +//@ run-pass fn nil() {} fn mir(){ diff --git a/tests/ui/mir/remove-zsts-query-cycle.rs b/tests/ui/mir/remove-zsts-query-cycle.rs index bcaf8468857..a04e5001f3c 100644 --- a/tests/ui/mir/remove-zsts-query-cycle.rs +++ b/tests/ui/mir/remove-zsts-query-cycle.rs @@ -1,9 +1,9 @@ // Regression test for #88972. Used to cause a query cycle: // optimized mir -> remove zsts -> layout of a coroutine -> optimized mir. // -// edition:2018 -// compile-flags: --crate-type=lib -Zinline-mir=yes -// build-pass +//@ edition:2018 +//@ compile-flags: --crate-type=lib -Zinline-mir=yes +//@ build-pass pub async fn listen() -> Result<(), std::io::Error> { let f = do_async(); diff --git a/tests/ui/mir/simplify-branch-same.rs b/tests/ui/mir/simplify-branch-same.rs index d631c33d61f..d30f4775c72 100644 --- a/tests/ui/mir/simplify-branch-same.rs +++ b/tests/ui/mir/simplify-branch-same.rs @@ -1,5 +1,5 @@ // Regression test for SimplifyBranchSame miscompilation. -// run-pass +//@ run-pass macro_rules! m { ($a:expr, $b:expr, $c:block) => { diff --git a/tests/ui/mir/ssa-analysis-regression-50041.rs b/tests/ui/mir/ssa-analysis-regression-50041.rs index 534f1c465bb..82654c8c0b5 100644 --- a/tests/ui/mir/ssa-analysis-regression-50041.rs +++ b/tests/ui/mir/ssa-analysis-regression-50041.rs @@ -1,5 +1,5 @@ -// build-pass -// compile-flags: -Z mir-opt-level=4 +//@ build-pass +//@ compile-flags: -Z mir-opt-level=4 #![crate_type = "lib"] #![feature(lang_items)] diff --git a/tests/ui/mir/ssa_call_ret.rs b/tests/ui/mir/ssa_call_ret.rs index f8a83249225..9b2c78c737f 100644 --- a/tests/ui/mir/ssa_call_ret.rs +++ b/tests/ui/mir/ssa_call_ret.rs @@ -1,10 +1,10 @@ // Regression test for issue #117331, where variable `a` was misidentified as // being in SSA form (the definition occurs on the return edge only). // -// edition:2021 -// compile-flags: --crate-type=lib -// build-pass -// needs-unwind +//@ edition:2021 +//@ compile-flags: --crate-type=lib +//@ build-pass +//@ needs-unwind #![feature(custom_mir, core_intrinsics)] use core::intrinsics::mir::*; diff --git a/tests/ui/mir/thir-constparam-temp.rs b/tests/ui/mir/thir-constparam-temp.rs index 7eedc325d60..4ef73f35f87 100644 --- a/tests/ui/mir/thir-constparam-temp.rs +++ b/tests/ui/mir/thir-constparam-temp.rs @@ -1,4 +1,4 @@ -// build-pass +//@ build-pass #![feature(adt_const_params)] #![allow(incomplete_features)] diff --git a/tests/ui/mir/unsize-trait.rs b/tests/ui/mir/unsize-trait.rs index 45b5308c093..7d4d7103a46 100644 --- a/tests/ui/mir/unsize-trait.rs +++ b/tests/ui/mir/unsize-trait.rs @@ -1,6 +1,6 @@ // Check that the interpreter does not ICE when trying to unsize `B` to `[u8]`. // This is a `build` test to ensure that const-prop-lint runs. -// build-pass +//@ build-pass #![feature(unsize)] diff --git a/tests/ui/mir/validate/critical-edge.rs b/tests/ui/mir/validate/critical-edge.rs index 3bb732ad3f7..0a548ae8e58 100644 --- a/tests/ui/mir/validate/critical-edge.rs +++ b/tests/ui/mir/validate/critical-edge.rs @@ -1,11 +1,11 @@ // Optimized MIR shouldn't have critical call edges // -// build-fail -// edition: 2021 -// compile-flags: --crate-type=lib -// failure-status: 101 -// dont-check-compiler-stderr -// error-pattern: encountered critical edge in `Call` terminator +//@ build-fail +//@ edition: 2021 +//@ compile-flags: --crate-type=lib +//@ failure-status: 101 +//@ dont-check-compiler-stderr +//@ error-pattern: encountered critical edge in `Call` terminator #![feature(custom_mir, core_intrinsics)] use core::intrinsics::mir::*; diff --git a/tests/ui/mir/validate/error-body.rs b/tests/ui/mir/validate/error-body.rs index 5b2fbb0b046..e77867ddfd4 100644 --- a/tests/ui/mir/validate/error-body.rs +++ b/tests/ui/mir/validate/error-body.rs @@ -1,4 +1,4 @@ -// compile-flags: -Zvalidate-mir +//@ compile-flags: -Zvalidate-mir fn _test() { let x = || 45; diff --git a/tests/ui/mir/validate/issue-95978-validator-lifetime-comparison.rs b/tests/ui/mir/validate/issue-95978-validator-lifetime-comparison.rs index cd6c5bf2719..44b7fae351c 100644 --- a/tests/ui/mir/validate/issue-95978-validator-lifetime-comparison.rs +++ b/tests/ui/mir/validate/issue-95978-validator-lifetime-comparison.rs @@ -1,5 +1,5 @@ -// check-pass -// compile-flags: -Zvalidate-mir +//@ check-pass +//@ compile-flags: -Zvalidate-mir fn foo(_a: &str) {} diff --git a/tests/ui/mir/validate/needs-reveal-all.rs b/tests/ui/mir/validate/needs-reveal-all.rs index 3852daf245e..be2f5dd322f 100644 --- a/tests/ui/mir/validate/needs-reveal-all.rs +++ b/tests/ui/mir/validate/needs-reveal-all.rs @@ -5,8 +5,8 @@ // We're using these flags to run the `RevealAll` pass while making it less likely to // accidentally removing the assignment from `Foo` to `Foo`. -// compile-flags: -Zinline_mir=yes -Zmir-opt-level=0 -Zvalidate-mir -// run-pass +//@ compile-flags: -Zinline_mir=yes -Zmir-opt-level=0 -Zvalidate-mir +//@ run-pass use std::hint::black_box; diff --git a/tests/ui/mir/validate/noncleanup-cleanup.rs b/tests/ui/mir/validate/noncleanup-cleanup.rs index a14ab44257f..744e71e99b1 100644 --- a/tests/ui/mir/validate/noncleanup-cleanup.rs +++ b/tests/ui/mir/validate/noncleanup-cleanup.rs @@ -1,8 +1,8 @@ // Check that validation rejects cleanup edge to a non-cleanup block. // -// failure-status: 101 -// dont-check-compiler-stderr -// error-pattern: cleanuppad mismatch +//@ failure-status: 101 +//@ dont-check-compiler-stderr +//@ error-pattern: cleanuppad mismatch #![feature(custom_mir, core_intrinsics)] extern crate core; use core::intrinsics::mir::*; diff --git a/tests/ui/mir/validate/noncleanup-resume.rs b/tests/ui/mir/validate/noncleanup-resume.rs index e80d09bc90a..5bf6b03c9e9 100644 --- a/tests/ui/mir/validate/noncleanup-resume.rs +++ b/tests/ui/mir/validate/noncleanup-resume.rs @@ -1,8 +1,8 @@ // Check that validation rejects resume terminator in a non-cleanup block. // -// failure-status: 101 -// dont-check-compiler-stderr -// error-pattern: resume on non-cleanup block +//@ failure-status: 101 +//@ dont-check-compiler-stderr +//@ error-pattern: resume on non-cleanup block #![feature(custom_mir, core_intrinsics)] extern crate core; use core::intrinsics::mir::*; diff --git a/tests/ui/mir/validate/noncleanup-terminate.rs b/tests/ui/mir/validate/noncleanup-terminate.rs index 2a74668370d..b5bf2604cce 100644 --- a/tests/ui/mir/validate/noncleanup-terminate.rs +++ b/tests/ui/mir/validate/noncleanup-terminate.rs @@ -1,8 +1,8 @@ // Check that validation rejects terminate terminator in a non-cleanup block. // -// failure-status: 101 -// dont-check-compiler-stderr -// error-pattern: terminate on non-cleanup block +//@ failure-status: 101 +//@ dont-check-compiler-stderr +//@ error-pattern: terminate on non-cleanup block #![feature(custom_mir, core_intrinsics)] extern crate core; use core::intrinsics::mir::*; diff --git a/tests/ui/mir/validate/transmute_cast_sized.rs b/tests/ui/mir/validate/transmute_cast_sized.rs index eaaf7eb3ecd..23031bdc5d2 100644 --- a/tests/ui/mir/validate/transmute_cast_sized.rs +++ b/tests/ui/mir/validate/transmute_cast_sized.rs @@ -1,6 +1,6 @@ -// build-pass -// compile-flags: -Zvalidate-mir -// edition: 2021 +//@ build-pass +//@ compile-flags: -Zvalidate-mir +//@ edition: 2021 #![crate_type = "lib"] diff --git a/tests/ui/mismatched_types/async-unwrap-suggestion.rs b/tests/ui/mismatched_types/async-unwrap-suggestion.rs index 9698cc29ffd..67d431a5ca2 100644 --- a/tests/ui/mismatched_types/async-unwrap-suggestion.rs +++ b/tests/ui/mismatched_types/async-unwrap-suggestion.rs @@ -1,4 +1,4 @@ -// edition: 2021 +//@ edition: 2021 async fn dont_suggest() -> i32 { if false { diff --git a/tests/ui/mismatched_types/closure-arg-count-expected-type-issue-47244.fixed b/tests/ui/mismatched_types/closure-arg-count-expected-type-issue-47244.fixed index efba0543b48..7d11fab85b3 100644 --- a/tests/ui/mismatched_types/closure-arg-count-expected-type-issue-47244.fixed +++ b/tests/ui/mismatched_types/closure-arg-count-expected-type-issue-47244.fixed @@ -5,7 +5,7 @@ // saying that the type of `b` must be known, which was not very // helpful. -// run-rustfix +//@ run-rustfix use std::collections::HashMap; diff --git a/tests/ui/mismatched_types/closure-arg-count-expected-type-issue-47244.rs b/tests/ui/mismatched_types/closure-arg-count-expected-type-issue-47244.rs index 3ddb93d12f7..2f81f0a2851 100644 --- a/tests/ui/mismatched_types/closure-arg-count-expected-type-issue-47244.rs +++ b/tests/ui/mismatched_types/closure-arg-count-expected-type-issue-47244.rs @@ -5,7 +5,7 @@ // saying that the type of `b` must be known, which was not very // helpful. -// run-rustfix +//@ run-rustfix use std::collections::HashMap; diff --git a/tests/ui/mismatched_types/closure-arg-type-mismatch-issue-45727.fixed b/tests/ui/mismatched_types/closure-arg-type-mismatch-issue-45727.fixed index 6315fcca2b8..e6e3e1551e9 100644 --- a/tests/ui/mismatched_types/closure-arg-type-mismatch-issue-45727.fixed +++ b/tests/ui/mismatched_types/closure-arg-type-mismatch-issue-45727.fixed @@ -1,4 +1,4 @@ -// run-rustfix +//@ run-rustfix fn main() { let _ = (-10..=10).find(|x: &i32| x.signum() == 0); //~ ERROR type mismatch in closure arguments let _ = (-10..=10).find(|x: &i32| x.signum() == 0); //~ ERROR type mismatch in closure arguments diff --git a/tests/ui/mismatched_types/closure-arg-type-mismatch-issue-45727.rs b/tests/ui/mismatched_types/closure-arg-type-mismatch-issue-45727.rs index c12c5362efc..64e815606d4 100644 --- a/tests/ui/mismatched_types/closure-arg-type-mismatch-issue-45727.rs +++ b/tests/ui/mismatched_types/closure-arg-type-mismatch-issue-45727.rs @@ -1,4 +1,4 @@ -// run-rustfix +//@ run-rustfix fn main() { let _ = (-10..=10).find(|x: i32| x.signum() == 0); //~ ERROR type mismatch in closure arguments let _ = (-10..=10).find(|x: &&&i32| x.signum() == 0); //~ ERROR type mismatch in closure arguments diff --git a/tests/ui/mismatched_types/closure-ref-114180.rs b/tests/ui/mismatched_types/closure-ref-114180.rs index d84bdbedaf6..cdbbdd1bf44 100644 --- a/tests/ui/mismatched_types/closure-ref-114180.rs +++ b/tests/ui/mismatched_types/closure-ref-114180.rs @@ -1,4 +1,4 @@ -// check-fail +//@ check-fail fn main() { let mut v = vec![(1,)]; diff --git a/tests/ui/mismatched_types/dont-point-return-on-E0308.rs b/tests/ui/mismatched_types/dont-point-return-on-E0308.rs index f2ba610e2d1..dca917e3ba1 100644 --- a/tests/ui/mismatched_types/dont-point-return-on-E0308.rs +++ b/tests/ui/mismatched_types/dont-point-return-on-E0308.rs @@ -1,4 +1,4 @@ -// edition:2021 +//@ edition:2021 async fn f(_: &()) {} //~^ NOTE function defined here diff --git a/tests/ui/mismatched_types/issue-106182.fixed b/tests/ui/mismatched_types/issue-106182.fixed index b8ddebf6fb6..8316ab28b8b 100644 --- a/tests/ui/mismatched_types/issue-106182.fixed +++ b/tests/ui/mismatched_types/issue-106182.fixed @@ -1,4 +1,4 @@ -// run-rustfix +//@ run-rustfix struct _S(u32, Vec); diff --git a/tests/ui/mismatched_types/issue-106182.rs b/tests/ui/mismatched_types/issue-106182.rs index 6eb6df13a02..30cce11a5c8 100644 --- a/tests/ui/mismatched_types/issue-106182.rs +++ b/tests/ui/mismatched_types/issue-106182.rs @@ -1,4 +1,4 @@ -// run-rustfix +//@ run-rustfix struct _S(u32, Vec); diff --git a/tests/ui/mismatched_types/issue-118145-unwrap-for-shorthand.fixed b/tests/ui/mismatched_types/issue-118145-unwrap-for-shorthand.fixed index 15d4e393874..07caf832b25 100644 --- a/tests/ui/mismatched_types/issue-118145-unwrap-for-shorthand.fixed +++ b/tests/ui/mismatched_types/issue-118145-unwrap-for-shorthand.fixed @@ -1,4 +1,4 @@ -// run-rustfix +//@ run-rustfix #![allow(unused, dead_code)] #[derive(Clone, Copy)] diff --git a/tests/ui/mismatched_types/issue-118145-unwrap-for-shorthand.rs b/tests/ui/mismatched_types/issue-118145-unwrap-for-shorthand.rs index 8e811caa3bd..6a8729e93c7 100644 --- a/tests/ui/mismatched_types/issue-118145-unwrap-for-shorthand.rs +++ b/tests/ui/mismatched_types/issue-118145-unwrap-for-shorthand.rs @@ -1,4 +1,4 @@ -// run-rustfix +//@ run-rustfix #![allow(unused, dead_code)] #[derive(Clone, Copy)] diff --git a/tests/ui/mismatched_types/issue-38371.fixed b/tests/ui/mismatched_types/issue-38371.fixed index 0e20835bef0..0bc04b4bb81 100644 --- a/tests/ui/mismatched_types/issue-38371.fixed +++ b/tests/ui/mismatched_types/issue-38371.fixed @@ -1,4 +1,4 @@ -// run-rustfix +//@ run-rustfix // see also issue-38371-unfixable.rs #![allow(dead_code)] diff --git a/tests/ui/mismatched_types/issue-38371.rs b/tests/ui/mismatched_types/issue-38371.rs index fb9e4c173e7..cd320fd61f2 100644 --- a/tests/ui/mismatched_types/issue-38371.rs +++ b/tests/ui/mismatched_types/issue-38371.rs @@ -1,4 +1,4 @@ -// run-rustfix +//@ run-rustfix // see also issue-38371-unfixable.rs #![allow(dead_code)] diff --git a/tests/ui/mismatched_types/mismatch-sugg-for-shorthand-field.fixed b/tests/ui/mismatched_types/mismatch-sugg-for-shorthand-field.fixed index e1f929e6170..52b59cef9f0 100644 --- a/tests/ui/mismatched_types/mismatch-sugg-for-shorthand-field.fixed +++ b/tests/ui/mismatched_types/mismatch-sugg-for-shorthand-field.fixed @@ -1,5 +1,5 @@ -// run-rustfix -// edition:2021 +//@ run-rustfix +//@ edition:2021 #![allow(dead_code)] #![allow(unused_variables)] use std::future::Future; diff --git a/tests/ui/mismatched_types/mismatch-sugg-for-shorthand-field.rs b/tests/ui/mismatched_types/mismatch-sugg-for-shorthand-field.rs index 956936c925b..62b2eefa46a 100644 --- a/tests/ui/mismatched_types/mismatch-sugg-for-shorthand-field.rs +++ b/tests/ui/mismatched_types/mismatch-sugg-for-shorthand-field.rs @@ -1,5 +1,5 @@ -// run-rustfix -// edition:2021 +//@ run-rustfix +//@ edition:2021 #![allow(dead_code)] #![allow(unused_variables)] use std::future::Future; diff --git a/tests/ui/mismatched_types/mismatch-ty-unwrap-expect.fixed b/tests/ui/mismatched_types/mismatch-ty-unwrap-expect.fixed index f3f560fe530..51f73551d18 100644 --- a/tests/ui/mismatched_types/mismatch-ty-unwrap-expect.fixed +++ b/tests/ui/mismatched_types/mismatch-ty-unwrap-expect.fixed @@ -1,4 +1,4 @@ -// run-rustfix +//@ run-rustfix #![allow(unused, dead_code)] fn func() -> Option { diff --git a/tests/ui/mismatched_types/mismatch-ty-unwrap-expect.rs b/tests/ui/mismatched_types/mismatch-ty-unwrap-expect.rs index 14020e872ff..1810dc2f86f 100644 --- a/tests/ui/mismatched_types/mismatch-ty-unwrap-expect.rs +++ b/tests/ui/mismatched_types/mismatch-ty-unwrap-expect.rs @@ -1,4 +1,4 @@ -// run-rustfix +//@ run-rustfix #![allow(unused, dead_code)] fn func() -> Option { diff --git a/tests/ui/mismatched_types/ref-pat-suggestions.fixed b/tests/ui/mismatched_types/ref-pat-suggestions.fixed index d50acd1ac62..fea048eb388 100644 --- a/tests/ui/mismatched_types/ref-pat-suggestions.fixed +++ b/tests/ui/mismatched_types/ref-pat-suggestions.fixed @@ -1,4 +1,4 @@ -// run-rustfix +//@ run-rustfix fn _f0(_a: &u32) {} //~ ERROR mismatched types fn _f1(_a: &mut u32) {} //~ ERROR mismatched types diff --git a/tests/ui/mismatched_types/ref-pat-suggestions.rs b/tests/ui/mismatched_types/ref-pat-suggestions.rs index 1a77f687692..4195bad3427 100644 --- a/tests/ui/mismatched_types/ref-pat-suggestions.rs +++ b/tests/ui/mismatched_types/ref-pat-suggestions.rs @@ -1,4 +1,4 @@ -// run-rustfix +//@ run-rustfix fn _f0(&_a: u32) {} //~ ERROR mismatched types fn _f1(&mut _a: u32) {} //~ ERROR mismatched types diff --git a/tests/ui/mismatched_types/suggest-adding-or-removing-ref-for-binding-pattern.fixed b/tests/ui/mismatched_types/suggest-adding-or-removing-ref-for-binding-pattern.fixed index 56f93cfbfdc..cf923362ad8 100644 --- a/tests/ui/mismatched_types/suggest-adding-or-removing-ref-for-binding-pattern.fixed +++ b/tests/ui/mismatched_types/suggest-adding-or-removing-ref-for-binding-pattern.fixed @@ -1,4 +1,4 @@ -// run-rustfix +//@ run-rustfix #![allow(dead_code, unused_variables)] fn main() { diff --git a/tests/ui/mismatched_types/suggest-adding-or-removing-ref-for-binding-pattern.rs b/tests/ui/mismatched_types/suggest-adding-or-removing-ref-for-binding-pattern.rs index 0c33f99a42e..dc556f6576a 100644 --- a/tests/ui/mismatched_types/suggest-adding-or-removing-ref-for-binding-pattern.rs +++ b/tests/ui/mismatched_types/suggest-adding-or-removing-ref-for-binding-pattern.rs @@ -1,4 +1,4 @@ -// run-rustfix +//@ run-rustfix #![allow(dead_code, unused_variables)] fn main() { diff --git a/tests/ui/mismatched_types/suggest-boxed-trait-objects-instead-of-impl-trait.fixed b/tests/ui/mismatched_types/suggest-boxed-trait-objects-instead-of-impl-trait.fixed index f30feaed055..e1578265909 100644 --- a/tests/ui/mismatched_types/suggest-boxed-trait-objects-instead-of-impl-trait.fixed +++ b/tests/ui/mismatched_types/suggest-boxed-trait-objects-instead-of-impl-trait.fixed @@ -1,4 +1,4 @@ -// run-rustfix +//@ run-rustfix #![allow(dead_code)] diff --git a/tests/ui/mismatched_types/suggest-boxed-trait-objects-instead-of-impl-trait.rs b/tests/ui/mismatched_types/suggest-boxed-trait-objects-instead-of-impl-trait.rs index 2bd8146e289..fb920f3f944 100644 --- a/tests/ui/mismatched_types/suggest-boxed-trait-objects-instead-of-impl-trait.rs +++ b/tests/ui/mismatched_types/suggest-boxed-trait-objects-instead-of-impl-trait.rs @@ -1,4 +1,4 @@ -// run-rustfix +//@ run-rustfix #![allow(dead_code)] diff --git a/tests/ui/mismatched_types/suggest-removing-tuple-struct-field.fixed b/tests/ui/mismatched_types/suggest-removing-tuple-struct-field.fixed index b8eeb3d5cae..2a69461d378 100644 --- a/tests/ui/mismatched_types/suggest-removing-tuple-struct-field.fixed +++ b/tests/ui/mismatched_types/suggest-removing-tuple-struct-field.fixed @@ -1,4 +1,4 @@ -// run-rustfix +//@ run-rustfix macro_rules! my_wrapper { ($expr:expr) => { MyWrapper($expr) } diff --git a/tests/ui/mismatched_types/suggest-removing-tuple-struct-field.rs b/tests/ui/mismatched_types/suggest-removing-tuple-struct-field.rs index 54a13c67350..7af59f530e4 100644 --- a/tests/ui/mismatched_types/suggest-removing-tuple-struct-field.rs +++ b/tests/ui/mismatched_types/suggest-removing-tuple-struct-field.rs @@ -1,4 +1,4 @@ -// run-rustfix +//@ run-rustfix macro_rules! my_wrapper { ($expr:expr) => { MyWrapper($expr) } diff --git a/tests/ui/missing-trait-bounds/issue-35677.fixed b/tests/ui/missing-trait-bounds/issue-35677.fixed index 08174d8d8d5..6be68bb26df 100644 --- a/tests/ui/missing-trait-bounds/issue-35677.fixed +++ b/tests/ui/missing-trait-bounds/issue-35677.fixed @@ -1,4 +1,4 @@ -// run-rustfix +//@ run-rustfix #![allow(dead_code)] use std::collections::HashSet; use std::hash::Hash; diff --git a/tests/ui/missing-trait-bounds/issue-35677.rs b/tests/ui/missing-trait-bounds/issue-35677.rs index 2cb394386b8..e2d13bbe2f6 100644 --- a/tests/ui/missing-trait-bounds/issue-35677.rs +++ b/tests/ui/missing-trait-bounds/issue-35677.rs @@ -1,4 +1,4 @@ -// run-rustfix +//@ run-rustfix #![allow(dead_code)] use std::collections::HashSet; use std::hash::Hash; diff --git a/tests/ui/missing-trait-bounds/issue-69725.fixed b/tests/ui/missing-trait-bounds/issue-69725.fixed index d57badcfd8c..f23468abcb0 100644 --- a/tests/ui/missing-trait-bounds/issue-69725.fixed +++ b/tests/ui/missing-trait-bounds/issue-69725.fixed @@ -1,5 +1,5 @@ -// run-rustfix -// aux-build:issue-69725.rs +//@ run-rustfix +//@ aux-build:issue-69725.rs #![allow(dead_code)] extern crate issue_69725; diff --git a/tests/ui/missing-trait-bounds/issue-69725.rs b/tests/ui/missing-trait-bounds/issue-69725.rs index 9c88969c5cf..a51d2540b4c 100644 --- a/tests/ui/missing-trait-bounds/issue-69725.rs +++ b/tests/ui/missing-trait-bounds/issue-69725.rs @@ -1,5 +1,5 @@ -// run-rustfix -// aux-build:issue-69725.rs +//@ run-rustfix +//@ aux-build:issue-69725.rs #![allow(dead_code)] extern crate issue_69725; diff --git a/tests/ui/missing-trait-bounds/missing-trait-bound-for-op.fixed b/tests/ui/missing-trait-bounds/missing-trait-bound-for-op.fixed index 6b24375e415..c6c22a4db8b 100644 --- a/tests/ui/missing-trait-bounds/missing-trait-bound-for-op.fixed +++ b/tests/ui/missing-trait-bounds/missing-trait-bound-for-op.fixed @@ -1,4 +1,4 @@ -// run-rustfix +//@ run-rustfix pub fn foo(s: &[T], t: &[T]) { let _ = s == t; //~ ERROR binary operation `==` cannot be applied to type `&[T]` diff --git a/tests/ui/missing-trait-bounds/missing-trait-bound-for-op.rs b/tests/ui/missing-trait-bounds/missing-trait-bound-for-op.rs index df47be070c9..06d60cbeae6 100644 --- a/tests/ui/missing-trait-bounds/missing-trait-bound-for-op.rs +++ b/tests/ui/missing-trait-bounds/missing-trait-bound-for-op.rs @@ -1,4 +1,4 @@ -// run-rustfix +//@ run-rustfix pub fn foo(s: &[T], t: &[T]) { let _ = s == t; //~ ERROR binary operation `==` cannot be applied to type `&[T]` diff --git a/tests/ui/missing/missing-allocator.rs b/tests/ui/missing/missing-allocator.rs index 2dc509f2c63..3a65e657d0b 100644 --- a/tests/ui/missing/missing-allocator.rs +++ b/tests/ui/missing/missing-allocator.rs @@ -1,5 +1,5 @@ -// compile-flags: -C panic=abort -// no-prefer-dynamic +//@ compile-flags: -C panic=abort +//@ no-prefer-dynamic #![no_std] #![crate_type = "staticlib"] diff --git a/tests/ui/missing/missing-comma-in-match.fixed b/tests/ui/missing/missing-comma-in-match.fixed index f091082f35f..fe8539d3a5a 100644 --- a/tests/ui/missing/missing-comma-in-match.fixed +++ b/tests/ui/missing/missing-comma-in-match.fixed @@ -1,4 +1,4 @@ -// run-rustfix +//@ run-rustfix fn main() { match &Some(3) { diff --git a/tests/ui/missing/missing-comma-in-match.rs b/tests/ui/missing/missing-comma-in-match.rs index 54dab4e9750..e14e22d5160 100644 --- a/tests/ui/missing/missing-comma-in-match.rs +++ b/tests/ui/missing/missing-comma-in-match.rs @@ -1,4 +1,4 @@ -// run-rustfix +//@ run-rustfix fn main() { match &Some(3) { diff --git a/tests/ui/missing/missing-items/m2.rs b/tests/ui/missing/missing-items/m2.rs index c2a6914abc9..2f43e978006 100644 --- a/tests/ui/missing/missing-items/m2.rs +++ b/tests/ui/missing/missing-items/m2.rs @@ -1,4 +1,4 @@ -// aux-build:m1.rs +//@ aux-build:m1.rs extern crate m1; diff --git a/tests/ui/missing/missing-macro-use.rs b/tests/ui/missing/missing-macro-use.rs index d494c4471a3..a761c9a5ffd 100644 --- a/tests/ui/missing/missing-macro-use.rs +++ b/tests/ui/missing/missing-macro-use.rs @@ -1,4 +1,4 @@ -// aux-build:two_macros.rs +//@ aux-build:two_macros.rs extern crate two_macros; diff --git a/tests/ui/missing/missing-main.rs b/tests/ui/missing/missing-main.rs index 6ad54453309..3cafca09afb 100644 --- a/tests/ui/missing/missing-main.rs +++ b/tests/ui/missing/missing-main.rs @@ -1,2 +1,2 @@ -// error-pattern: `main` function not found +//@ error-pattern: `main` function not found fn mian() { } diff --git a/tests/ui/missing/missing-return.rs b/tests/ui/missing/missing-return.rs index 6a171753d9e..defd8a3bb78 100644 --- a/tests/ui/missing/missing-return.rs +++ b/tests/ui/missing/missing-return.rs @@ -1,4 +1,4 @@ -// error-pattern: return +//@ error-pattern: return fn f() -> isize { } diff --git a/tests/ui/missing_debug_impls.rs b/tests/ui/missing_debug_impls.rs index ccad861c037..3abc0706887 100644 --- a/tests/ui/missing_debug_impls.rs +++ b/tests/ui/missing_debug_impls.rs @@ -1,4 +1,4 @@ -// compile-flags: --crate-type lib +//@ compile-flags: --crate-type lib #![deny(missing_debug_implementations)] #![allow(unused)] diff --git a/tests/ui/missing_non_modrs_mod/foo.rs b/tests/ui/missing_non_modrs_mod/foo.rs index 4f41316c8f7..dd3e970b8c6 100644 --- a/tests/ui/missing_non_modrs_mod/foo.rs +++ b/tests/ui/missing_non_modrs_mod/foo.rs @@ -1,4 +1,4 @@ // -// ignore-test this is just a helper for the real test in this dir +//@ ignore-test this is just a helper for the real test in this dir mod missing; diff --git a/tests/ui/missing_non_modrs_mod/foo_inline.rs b/tests/ui/missing_non_modrs_mod/foo_inline.rs index df60629eca1..9d46e9bdd0c 100644 --- a/tests/ui/missing_non_modrs_mod/foo_inline.rs +++ b/tests/ui/missing_non_modrs_mod/foo_inline.rs @@ -1,4 +1,4 @@ -// ignore-test this is just a helper for the real test in this dir +//@ ignore-test this is just a helper for the real test in this dir mod inline { mod missing; diff --git a/tests/ui/modules/issue-107649.rs b/tests/ui/modules/issue-107649.rs index 71b84cd30d6..af5758d7985 100644 --- a/tests/ui/modules/issue-107649.rs +++ b/tests/ui/modules/issue-107649.rs @@ -1,4 +1,4 @@ -// compile-flags: -Z ui-testing=no +//@ compile-flags: -Z ui-testing=no #[path = "auxiliary/dummy_lib.rs"] mod lib; diff --git a/tests/ui/modules/issue-56411-aux.rs b/tests/ui/modules/issue-56411-aux.rs index c8e5a059810..60ffc479ada 100644 --- a/tests/ui/modules/issue-56411-aux.rs +++ b/tests/ui/modules/issue-56411-aux.rs @@ -1,4 +1,4 @@ -// check-pass +//@ check-pass struct T {} diff --git a/tests/ui/modules/mod-inside-fn.rs b/tests/ui/modules/mod-inside-fn.rs index 93050c8919a..645d47cee64 100644 --- a/tests/ui/modules/mod-inside-fn.rs +++ b/tests/ui/modules/mod-inside-fn.rs @@ -1,4 +1,4 @@ -// run-pass +//@ run-pass fn f() -> isize { mod m { diff --git a/tests/ui/modules/mod-view-items.rs b/tests/ui/modules/mod-view-items.rs index db2b303668b..462071b7b12 100644 --- a/tests/ui/modules/mod-view-items.rs +++ b/tests/ui/modules/mod-view-items.rs @@ -1,11 +1,11 @@ -// run-pass +//@ run-pass // Test view items inside non-file-level mods // This is a regression test for an issue where we were failing to // pretty-print such view items. If that happens again, this should // begin failing. -// pretty-expanded FIXME #23616 +//@ pretty-expanded FIXME #23616 mod m { pub fn f() -> Vec { Vec::new() } diff --git a/tests/ui/modules/mod_dir_implicit.rs b/tests/ui/modules/mod_dir_implicit.rs index 7eac90f4d9b..b99d7bcc755 100644 --- a/tests/ui/modules/mod_dir_implicit.rs +++ b/tests/ui/modules/mod_dir_implicit.rs @@ -1,4 +1,4 @@ -// run-pass +//@ run-pass mod mod_dir_implicit_aux; diff --git a/tests/ui/modules/mod_dir_implicit_aux/mod.rs b/tests/ui/modules/mod_dir_implicit_aux/mod.rs index 4f1eb85e4cc..035cbfa2822 100644 --- a/tests/ui/modules/mod_dir_implicit_aux/mod.rs +++ b/tests/ui/modules/mod_dir_implicit_aux/mod.rs @@ -1,2 +1,2 @@ -// run-pass +//@ run-pass pub fn foo() -> isize { 10 } diff --git a/tests/ui/modules/mod_dir_path.rs b/tests/ui/modules/mod_dir_path.rs index 72db8e44be3..1704d8e4a17 100644 --- a/tests/ui/modules/mod_dir_path.rs +++ b/tests/ui/modules/mod_dir_path.rs @@ -1,4 +1,4 @@ -// run-pass +//@ run-pass #![allow(unused_macros)] mod mod_dir_simple { diff --git a/tests/ui/modules/mod_dir_path2.rs b/tests/ui/modules/mod_dir_path2.rs index b4f8f1c8454..6bfef3d54a1 100644 --- a/tests/ui/modules/mod_dir_path2.rs +++ b/tests/ui/modules/mod_dir_path2.rs @@ -1,4 +1,4 @@ -// run-pass +//@ run-pass #[path = "mod_dir_simple"] mod pancakes { diff --git a/tests/ui/modules/mod_dir_path3.rs b/tests/ui/modules/mod_dir_path3.rs index 56980c01049..2f4fb8afa66 100644 --- a/tests/ui/modules/mod_dir_path3.rs +++ b/tests/ui/modules/mod_dir_path3.rs @@ -1,4 +1,4 @@ -// run-pass +//@ run-pass #[path = "mod_dir_simple"] mod pancakes { diff --git a/tests/ui/modules/mod_dir_path_multi.rs b/tests/ui/modules/mod_dir_path_multi.rs index 1c111294a33..eda94c8725b 100644 --- a/tests/ui/modules/mod_dir_path_multi.rs +++ b/tests/ui/modules/mod_dir_path_multi.rs @@ -1,4 +1,4 @@ -// run-pass +//@ run-pass #[path = "mod_dir_simple"] mod biscuits { diff --git a/tests/ui/modules/mod_dir_recursive.rs b/tests/ui/modules/mod_dir_recursive.rs index 56f26139828..a5894e2196a 100644 --- a/tests/ui/modules/mod_dir_recursive.rs +++ b/tests/ui/modules/mod_dir_recursive.rs @@ -1,4 +1,4 @@ -// run-pass +//@ run-pass // Testing that the parser for each file tracks its modules // and paths independently. The load_another_mod module should diff --git a/tests/ui/modules/mod_dir_simple.rs b/tests/ui/modules/mod_dir_simple.rs index 56f15b1d610..edc76355f0c 100644 --- a/tests/ui/modules/mod_dir_simple.rs +++ b/tests/ui/modules/mod_dir_simple.rs @@ -1,4 +1,4 @@ -// run-pass +//@ run-pass mod mod_dir_simple { pub mod test; diff --git a/tests/ui/modules/mod_dir_simple/load_another_mod.rs b/tests/ui/modules/mod_dir_simple/load_another_mod.rs index f96b546aa2f..84728a7ed75 100644 --- a/tests/ui/modules/mod_dir_simple/load_another_mod.rs +++ b/tests/ui/modules/mod_dir_simple/load_another_mod.rs @@ -1,3 +1,3 @@ -// run-pass +//@ run-pass #[path = "test.rs"] pub mod test; diff --git a/tests/ui/modules/mod_dir_simple/test.rs b/tests/ui/modules/mod_dir_simple/test.rs index 4f1eb85e4cc..035cbfa2822 100644 --- a/tests/ui/modules/mod_dir_simple/test.rs +++ b/tests/ui/modules/mod_dir_simple/test.rs @@ -1,2 +1,2 @@ -// run-pass +//@ run-pass pub fn foo() -> isize { 10 } diff --git a/tests/ui/modules/mod_file.rs b/tests/ui/modules/mod_file.rs index 7b56b99eb3a..421b7b0659d 100644 --- a/tests/ui/modules/mod_file.rs +++ b/tests/ui/modules/mod_file.rs @@ -1,4 +1,4 @@ -// run-pass +//@ run-pass // Testing that a plain .rs file can load modules from other source files diff --git a/tests/ui/modules/mod_file_aux.rs b/tests/ui/modules/mod_file_aux.rs index 6d052272eb3..f37296b3af0 100644 --- a/tests/ui/modules/mod_file_aux.rs +++ b/tests/ui/modules/mod_file_aux.rs @@ -1,4 +1,4 @@ -// run-pass -// ignore-test Not a test. Used by other tests +//@ run-pass +//@ ignore-test Not a test. Used by other tests pub fn foo() -> isize { 10 } diff --git a/tests/ui/modules/mod_file_with_path_attr.rs b/tests/ui/modules/mod_file_with_path_attr.rs index e739366954e..4a7e96fa405 100644 --- a/tests/ui/modules/mod_file_with_path_attr.rs +++ b/tests/ui/modules/mod_file_with_path_attr.rs @@ -1,4 +1,4 @@ -// run-pass +//@ run-pass // Testing that a plain .rs file can load modules from other source files diff --git a/tests/ui/modules/module-polymorphism3-files/float-template/inst_f32.rs b/tests/ui/modules/module-polymorphism3-files/float-template/inst_f32.rs index 49d2b3d4b85..29ca2d29c4a 100644 --- a/tests/ui/modules/module-polymorphism3-files/float-template/inst_f32.rs +++ b/tests/ui/modules/module-polymorphism3-files/float-template/inst_f32.rs @@ -1,3 +1,3 @@ -// run-pass +//@ run-pass pub type T = f32; diff --git a/tests/ui/modules/module-polymorphism3-files/float-template/inst_f64.rs b/tests/ui/modules/module-polymorphism3-files/float-template/inst_f64.rs index e2aad480e3d..c5bb68f4fdf 100644 --- a/tests/ui/modules/module-polymorphism3-files/float-template/inst_f64.rs +++ b/tests/ui/modules/module-polymorphism3-files/float-template/inst_f64.rs @@ -1,3 +1,3 @@ -// run-pass +//@ run-pass pub type T = f64; diff --git a/tests/ui/modules/module-polymorphism3-files/float-template/inst_float.rs b/tests/ui/modules/module-polymorphism3-files/float-template/inst_float.rs index 5828718cddc..d9bcfffca46 100644 --- a/tests/ui/modules/module-polymorphism3-files/float-template/inst_float.rs +++ b/tests/ui/modules/module-polymorphism3-files/float-template/inst_float.rs @@ -1,3 +1,3 @@ -// run-pass +//@ run-pass pub type T = float; diff --git a/tests/ui/modules/path-no-file-name.rs b/tests/ui/modules/path-no-file-name.rs index f62cd2a9eb4..c36043686fc 100644 --- a/tests/ui/modules/path-no-file-name.rs +++ b/tests/ui/modules/path-no-file-name.rs @@ -1,5 +1,5 @@ -// normalize-stderr-test: "\.:.*\(" -> ".: $$ACCESS_DENIED_MSG (" -// normalize-stderr-test: "os error \d+" -> "os error $$ACCESS_DENIED_CODE" +//@ normalize-stderr-test: "\.:.*\(" -> ".: $$ACCESS_DENIED_MSG (" +//@ normalize-stderr-test: "os error \d+" -> "os error $$ACCESS_DENIED_CODE" #[path = "."] mod m; //~ ERROR couldn't read diff --git a/tests/ui/modules/special_module_name_ignore.rs b/tests/ui/modules/special_module_name_ignore.rs index 07cea9b2b05..a602b81b319 100644 --- a/tests/ui/modules/special_module_name_ignore.rs +++ b/tests/ui/modules/special_module_name_ignore.rs @@ -1,4 +1,4 @@ -// run-pass +//@ run-pass #[path = "auxiliary/dummy_lib.rs"] mod lib; diff --git a/tests/ui/modules_and_files_visibility/mod_file_aux.rs b/tests/ui/modules_and_files_visibility/mod_file_aux.rs index 98f42c5cdb1..77390da75f8 100644 --- a/tests/ui/modules_and_files_visibility/mod_file_aux.rs +++ b/tests/ui/modules_and_files_visibility/mod_file_aux.rs @@ -1,3 +1,3 @@ -// ignore-test Not a test. Used by other tests +//@ ignore-test Not a test. Used by other tests pub fn foo() -> isize { 10 } diff --git a/tests/ui/modules_and_files_visibility/mod_file_disambig_aux.rs b/tests/ui/modules_and_files_visibility/mod_file_disambig_aux.rs index 3bf9609f4ed..e00b5629c08 100644 --- a/tests/ui/modules_and_files_visibility/mod_file_disambig_aux.rs +++ b/tests/ui/modules_and_files_visibility/mod_file_disambig_aux.rs @@ -1 +1 @@ -// ignore-test not a test. aux file +//@ ignore-test not a test. aux file diff --git a/tests/ui/modules_and_files_visibility/mod_file_disambig_aux/mod.rs b/tests/ui/modules_and_files_visibility/mod_file_disambig_aux/mod.rs index 3bf9609f4ed..e00b5629c08 100644 --- a/tests/ui/modules_and_files_visibility/mod_file_disambig_aux/mod.rs +++ b/tests/ui/modules_and_files_visibility/mod_file_disambig_aux/mod.rs @@ -1 +1 @@ -// ignore-test not a test. aux file +//@ ignore-test not a test. aux file diff --git a/tests/ui/monomorphize-abi-alignment.rs b/tests/ui/monomorphize-abi-alignment.rs index a8d8bd1d5fd..62df1aca357 100644 --- a/tests/ui/monomorphize-abi-alignment.rs +++ b/tests/ui/monomorphize-abi-alignment.rs @@ -1,4 +1,4 @@ -// run-pass +//@ run-pass #![allow(non_upper_case_globals)] #![allow(dead_code)] diff --git a/tests/ui/moves/assignment-of-clone-call-on-ref-due-to-missing-bound.fixed b/tests/ui/moves/assignment-of-clone-call-on-ref-due-to-missing-bound.fixed index e88ca6079ec..85b1853c23b 100644 --- a/tests/ui/moves/assignment-of-clone-call-on-ref-due-to-missing-bound.fixed +++ b/tests/ui/moves/assignment-of-clone-call-on-ref-due-to-missing-bound.fixed @@ -1,4 +1,4 @@ -// run-rustfix +//@ run-rustfix #![allow(unused_variables, dead_code)] use std::collections::BTreeMap; use std::collections::HashSet; diff --git a/tests/ui/moves/assignment-of-clone-call-on-ref-due-to-missing-bound.rs b/tests/ui/moves/assignment-of-clone-call-on-ref-due-to-missing-bound.rs index ba277c4a9c4..740cda470d9 100644 --- a/tests/ui/moves/assignment-of-clone-call-on-ref-due-to-missing-bound.rs +++ b/tests/ui/moves/assignment-of-clone-call-on-ref-due-to-missing-bound.rs @@ -1,4 +1,4 @@ -// run-rustfix +//@ run-rustfix #![allow(unused_variables, dead_code)] use std::collections::BTreeMap; use std::collections::HashSet; diff --git a/tests/ui/moves/issue-22536-copy-mustnt-zero.rs b/tests/ui/moves/issue-22536-copy-mustnt-zero.rs index b3fc1a56f88..5032b46c290 100644 --- a/tests/ui/moves/issue-22536-copy-mustnt-zero.rs +++ b/tests/ui/moves/issue-22536-copy-mustnt-zero.rs @@ -1,4 +1,4 @@ -// run-pass +//@ run-pass // Regression test for Issue #22536: If a type implements Copy, then // moving it must not zero the original memory. diff --git a/tests/ui/moves/issue-34721.fixed b/tests/ui/moves/issue-34721.fixed index f135ad3836e..995fd920da7 100644 --- a/tests/ui/moves/issue-34721.fixed +++ b/tests/ui/moves/issue-34721.fixed @@ -1,4 +1,4 @@ -// run-rustfix +//@ run-rustfix pub trait Foo { fn zero(self) -> Self; diff --git a/tests/ui/moves/issue-34721.rs b/tests/ui/moves/issue-34721.rs index 14dd01766aa..747b15b4e02 100644 --- a/tests/ui/moves/issue-34721.rs +++ b/tests/ui/moves/issue-34721.rs @@ -1,4 +1,4 @@ -// run-rustfix +//@ run-rustfix pub trait Foo { fn zero(self) -> Self; diff --git a/tests/ui/moves/move-1-unique.rs b/tests/ui/moves/move-1-unique.rs index f98d075d18b..c97bfaaaf1a 100644 --- a/tests/ui/moves/move-1-unique.rs +++ b/tests/ui/moves/move-1-unique.rs @@ -1,4 +1,4 @@ -// run-pass +//@ run-pass #![allow(unused_mut)] #![allow(dead_code)] diff --git a/tests/ui/moves/move-2-unique.rs b/tests/ui/moves/move-2-unique.rs index 8fda3c1c86c..2204ea95741 100644 --- a/tests/ui/moves/move-2-unique.rs +++ b/tests/ui/moves/move-2-unique.rs @@ -1,4 +1,4 @@ -// run-pass +//@ run-pass #![allow(dead_code)] struct X { x: isize, y: isize, z: isize } diff --git a/tests/ui/moves/move-2.rs b/tests/ui/moves/move-2.rs index 5e010087465..05abf5002b7 100644 --- a/tests/ui/moves/move-2.rs +++ b/tests/ui/moves/move-2.rs @@ -1,4 +1,4 @@ -// run-pass +//@ run-pass #![allow(dead_code)] struct X { x: isize, y: isize, z: isize } diff --git a/tests/ui/moves/move-3-unique.rs b/tests/ui/moves/move-3-unique.rs index 8e5df2c3ff9..e806be8d8f2 100644 --- a/tests/ui/moves/move-3-unique.rs +++ b/tests/ui/moves/move-3-unique.rs @@ -1,4 +1,4 @@ -// run-pass +//@ run-pass #![allow(unused_mut)] #![allow(dead_code)] diff --git a/tests/ui/moves/move-4-unique.rs b/tests/ui/moves/move-4-unique.rs index 24aec7ea62c..09e0f11a8b4 100644 --- a/tests/ui/moves/move-4-unique.rs +++ b/tests/ui/moves/move-4-unique.rs @@ -1,4 +1,4 @@ -// run-pass +//@ run-pass #![allow(dead_code)] struct Triple {a: isize, b: isize, c: isize} diff --git a/tests/ui/moves/move-4.rs b/tests/ui/moves/move-4.rs index 63aa031a66e..dead612358d 100644 --- a/tests/ui/moves/move-4.rs +++ b/tests/ui/moves/move-4.rs @@ -1,4 +1,4 @@ -// run-pass +//@ run-pass #![allow(dead_code)] struct Triple { a: isize, b: isize, c: isize } diff --git a/tests/ui/moves/move-arg-2-unique.rs b/tests/ui/moves/move-arg-2-unique.rs index 9622c83750d..d9a03be0ed2 100644 --- a/tests/ui/moves/move-arg-2-unique.rs +++ b/tests/ui/moves/move-arg-2-unique.rs @@ -1,4 +1,4 @@ -// run-pass +//@ run-pass fn test(foo: Box> ) { assert_eq!((*foo)[0], 10); } diff --git a/tests/ui/moves/move-arg-2.rs b/tests/ui/moves/move-arg-2.rs index 77ee06e192e..77839c11c07 100644 --- a/tests/ui/moves/move-arg-2.rs +++ b/tests/ui/moves/move-arg-2.rs @@ -1,4 +1,4 @@ -// run-pass +//@ run-pass fn test(foo: Box>) { assert_eq!((*foo)[0], 10); } diff --git a/tests/ui/moves/move-arg.rs b/tests/ui/moves/move-arg.rs index 5942cd89fd9..3a7cbb4c0f6 100644 --- a/tests/ui/moves/move-arg.rs +++ b/tests/ui/moves/move-arg.rs @@ -1,4 +1,4 @@ -// run-pass +//@ run-pass fn test(foo: isize) { assert_eq!(foo, 10); } diff --git a/tests/ui/moves/move-nullary-fn.rs b/tests/ui/moves/move-nullary-fn.rs index 14c9262c74d..8c7bcf395e7 100644 --- a/tests/ui/moves/move-nullary-fn.rs +++ b/tests/ui/moves/move-nullary-fn.rs @@ -1,6 +1,6 @@ -// run-pass +//@ run-pass // Issue #922 -// pretty-expanded FIXME #23616 +//@ pretty-expanded FIXME #23616 fn f2(_thing: F) where F: FnOnce() { } diff --git a/tests/ui/moves/move-out-of-field.rs b/tests/ui/moves/move-out-of-field.rs index 4166d8dc8e9..f4a0693daaf 100644 --- a/tests/ui/moves/move-out-of-field.rs +++ b/tests/ui/moves/move-out-of-field.rs @@ -1,4 +1,4 @@ -// run-pass +//@ run-pass struct StringBuffer { s: String, diff --git a/tests/ui/moves/move-scalar.rs b/tests/ui/moves/move-scalar.rs index 98bfeb1bc05..e8cf5632b32 100644 --- a/tests/ui/moves/move-scalar.rs +++ b/tests/ui/moves/move-scalar.rs @@ -1,4 +1,4 @@ -// run-pass +//@ run-pass #![allow(unused_mut)] pub fn main() { diff --git a/tests/ui/moves/moves-based-on-type-capture-clause.rs b/tests/ui/moves/moves-based-on-type-capture-clause.rs index 4a6a4ed281d..baf52ffb515 100644 --- a/tests/ui/moves/moves-based-on-type-capture-clause.rs +++ b/tests/ui/moves/moves-based-on-type-capture-clause.rs @@ -1,6 +1,6 @@ -// run-pass +//@ run-pass #![allow(unused_must_use)] -// ignore-emscripten no threads support +//@ ignore-emscripten no threads support use std::thread; diff --git a/tests/ui/moves/needs-clone-through-deref.fixed b/tests/ui/moves/needs-clone-through-deref.fixed index 419718175e9..43ea15d1b63 100644 --- a/tests/ui/moves/needs-clone-through-deref.fixed +++ b/tests/ui/moves/needs-clone-through-deref.fixed @@ -1,4 +1,4 @@ -// run-rustfix +//@ run-rustfix #![allow(dead_code, noop_method_call)] use std::ops::Deref; struct S(Vec); diff --git a/tests/ui/moves/needs-clone-through-deref.rs b/tests/ui/moves/needs-clone-through-deref.rs index 8116008ffe3..ca57478ba98 100644 --- a/tests/ui/moves/needs-clone-through-deref.rs +++ b/tests/ui/moves/needs-clone-through-deref.rs @@ -1,4 +1,4 @@ -// run-rustfix +//@ run-rustfix #![allow(dead_code, noop_method_call)] use std::ops::Deref; struct S(Vec); diff --git a/tests/ui/moves/pin-mut-reborrow-infer-var-issue-107419.fixed b/tests/ui/moves/pin-mut-reborrow-infer-var-issue-107419.fixed index 0b9a3bae961..82b1ae57d99 100644 --- a/tests/ui/moves/pin-mut-reborrow-infer-var-issue-107419.fixed +++ b/tests/ui/moves/pin-mut-reborrow-infer-var-issue-107419.fixed @@ -1,4 +1,4 @@ -// run-rustfix +//@ run-rustfix use std::pin::Pin; fn foo(_: &mut ()) {} diff --git a/tests/ui/moves/pin-mut-reborrow-infer-var-issue-107419.rs b/tests/ui/moves/pin-mut-reborrow-infer-var-issue-107419.rs index 0e952b06ee1..df75a8b89d5 100644 --- a/tests/ui/moves/pin-mut-reborrow-infer-var-issue-107419.rs +++ b/tests/ui/moves/pin-mut-reborrow-infer-var-issue-107419.rs @@ -1,4 +1,4 @@ -// run-rustfix +//@ run-rustfix use std::pin::Pin; fn foo(_: &mut ()) {} diff --git a/tests/ui/moves/pin-mut-reborrow.fixed b/tests/ui/moves/pin-mut-reborrow.fixed index e808186d7d4..f703cedd6c1 100644 --- a/tests/ui/moves/pin-mut-reborrow.fixed +++ b/tests/ui/moves/pin-mut-reborrow.fixed @@ -1,4 +1,4 @@ -// run-rustfix +//@ run-rustfix use std::pin::Pin; struct Foo; diff --git a/tests/ui/moves/pin-mut-reborrow.rs b/tests/ui/moves/pin-mut-reborrow.rs index fee6236ebb4..fcb9a9b95e6 100644 --- a/tests/ui/moves/pin-mut-reborrow.rs +++ b/tests/ui/moves/pin-mut-reborrow.rs @@ -1,4 +1,4 @@ -// run-rustfix +//@ run-rustfix use std::pin::Pin; struct Foo; diff --git a/tests/ui/moves/suggest-clone-when-some-obligation-is-unmet.fixed b/tests/ui/moves/suggest-clone-when-some-obligation-is-unmet.fixed index a4e219e1c9b..b3eae0b22b6 100644 --- a/tests/ui/moves/suggest-clone-when-some-obligation-is-unmet.fixed +++ b/tests/ui/moves/suggest-clone-when-some-obligation-is-unmet.fixed @@ -1,4 +1,4 @@ -// run-rustfix +//@ run-rustfix // Issue #109429 use std::collections::hash_map::DefaultHasher; use std::collections::HashMap; diff --git a/tests/ui/moves/suggest-clone-when-some-obligation-is-unmet.rs b/tests/ui/moves/suggest-clone-when-some-obligation-is-unmet.rs index efe035ebae0..2ae037d4d81 100644 --- a/tests/ui/moves/suggest-clone-when-some-obligation-is-unmet.rs +++ b/tests/ui/moves/suggest-clone-when-some-obligation-is-unmet.rs @@ -1,4 +1,4 @@ -// run-rustfix +//@ run-rustfix // Issue #109429 use std::collections::hash_map::DefaultHasher; use std::collections::HashMap; diff --git a/tests/ui/moves/suggest-clone.fixed b/tests/ui/moves/suggest-clone.fixed index 0c4a94d77e4..59276a7b96d 100644 --- a/tests/ui/moves/suggest-clone.fixed +++ b/tests/ui/moves/suggest-clone.fixed @@ -1,4 +1,4 @@ -// run-rustfix +//@ run-rustfix #[derive(Clone)] struct Foo; diff --git a/tests/ui/moves/suggest-clone.rs b/tests/ui/moves/suggest-clone.rs index 25dd9f006f9..0b3c5e283d2 100644 --- a/tests/ui/moves/suggest-clone.rs +++ b/tests/ui/moves/suggest-clone.rs @@ -1,4 +1,4 @@ -// run-rustfix +//@ run-rustfix #[derive(Clone)] struct Foo; diff --git a/tests/ui/moves/use_of_moved_value_copy_suggestions.fixed b/tests/ui/moves/use_of_moved_value_copy_suggestions.fixed index 45acf5beb12..e726c8145c3 100644 --- a/tests/ui/moves/use_of_moved_value_copy_suggestions.fixed +++ b/tests/ui/moves/use_of_moved_value_copy_suggestions.fixed @@ -1,4 +1,4 @@ -// run-rustfix +//@ run-rustfix #![allow(dead_code)] fn duplicate_t(t: T) -> (T, T) { diff --git a/tests/ui/moves/use_of_moved_value_copy_suggestions.rs b/tests/ui/moves/use_of_moved_value_copy_suggestions.rs index 0a43dd1a9a3..ee08ce0fa5b 100644 --- a/tests/ui/moves/use_of_moved_value_copy_suggestions.rs +++ b/tests/ui/moves/use_of_moved_value_copy_suggestions.rs @@ -1,4 +1,4 @@ -// run-rustfix +//@ run-rustfix #![allow(dead_code)] fn duplicate_t(t: T) -> (T, T) { diff --git a/tests/ui/msvc-data-only.rs b/tests/ui/msvc-data-only.rs index f668b0b0682..15d799085fe 100644 --- a/tests/ui/msvc-data-only.rs +++ b/tests/ui/msvc-data-only.rs @@ -1,5 +1,5 @@ -// run-pass -// aux-build:msvc-data-only-lib.rs +//@ run-pass +//@ aux-build:msvc-data-only-lib.rs extern crate msvc_data_only_lib; diff --git a/tests/ui/multibyte.rs b/tests/ui/multibyte.rs index 7e3a577f9f2..d585a791fb9 100644 --- a/tests/ui/multibyte.rs +++ b/tests/ui/multibyte.rs @@ -1,4 +1,4 @@ -// run-pass +//@ run-pass // // Test that multibyte characters don't crash the compiler diff --git a/tests/ui/multiline-comment.rs b/tests/ui/multiline-comment.rs index 01aaac28232..bf86250c1f8 100644 --- a/tests/ui/multiline-comment.rs +++ b/tests/ui/multiline-comment.rs @@ -1,5 +1,5 @@ -// run-pass -// pretty-expanded FIXME #23616 +//@ run-pass +//@ pretty-expanded FIXME #23616 /* * This is a multi-line oldcomment. diff --git a/tests/ui/mut-function-arguments.rs b/tests/ui/mut-function-arguments.rs index 1e682fc4b66..01c264fce03 100644 --- a/tests/ui/mut-function-arguments.rs +++ b/tests/ui/mut-function-arguments.rs @@ -1,4 +1,4 @@ -// run-pass +//@ run-pass fn f(mut y: Box) { *y = 5; diff --git a/tests/ui/mut/no-mut-lint-for-desugared-mut.rs b/tests/ui/mut/no-mut-lint-for-desugared-mut.rs index 419d580419f..bd570a74e0e 100644 --- a/tests/ui/mut/no-mut-lint-for-desugared-mut.rs +++ b/tests/ui/mut/no-mut-lint-for-desugared-mut.rs @@ -1,4 +1,4 @@ -// run-pass +//@ run-pass #![deny(unused_mut)] #![allow(unreachable_code)] diff --git a/tests/ui/mutual-recursion-group.rs b/tests/ui/mutual-recursion-group.rs index 86b0f1d840e..dc6d216f8d9 100644 --- a/tests/ui/mutual-recursion-group.rs +++ b/tests/ui/mutual-recursion-group.rs @@ -1,9 +1,9 @@ -// run-pass +//@ run-pass #![allow(non_camel_case_types)] #![allow(dead_code)] -// pretty-expanded FIXME #23616 +//@ pretty-expanded FIXME #23616 enum colour { red, green, blue, } diff --git a/tests/ui/myriad-closures.rs b/tests/ui/myriad-closures.rs index 310351f50cb..541d27d5de4 100644 --- a/tests/ui/myriad-closures.rs +++ b/tests/ui/myriad-closures.rs @@ -1,11 +1,11 @@ -// run-pass +//@ run-pass // This test case tests whether we can handle code bases that contain a high // number of closures, something that needs special handling in the MingGW // toolchain. // See https://github.com/rust-lang/rust/issues/34793 for more information. // Make sure we don't optimize anything away: -// compile-flags: -C no-prepopulate-passes -Cpasses=name-anon-globals +//@ compile-flags: -C no-prepopulate-passes -Cpasses=name-anon-globals // Expand something exponentially macro_rules! go_bacterial { diff --git a/tests/ui/namespace/namespace-mix.rs b/tests/ui/namespace/namespace-mix.rs index c5b30f148bd..44790b83d6e 100644 --- a/tests/ui/namespace/namespace-mix.rs +++ b/tests/ui/namespace/namespace-mix.rs @@ -1,4 +1,4 @@ -// aux-build:namespace-mix.rs +//@ aux-build:namespace-mix.rs extern crate namespace_mix; use namespace_mix::*; diff --git a/tests/ui/namespace/namespaced-enum-glob-import-no-impls-xcrate.rs b/tests/ui/namespace/namespaced-enum-glob-import-no-impls-xcrate.rs index feb94b68184..6b92f410194 100644 --- a/tests/ui/namespace/namespaced-enum-glob-import-no-impls-xcrate.rs +++ b/tests/ui/namespace/namespaced-enum-glob-import-no-impls-xcrate.rs @@ -1,4 +1,4 @@ -// aux-build:namespaced_enums.rs +//@ aux-build:namespaced_enums.rs extern crate namespaced_enums; mod m { diff --git a/tests/ui/native-library-link-flags/empty-kind-1.rs b/tests/ui/native-library-link-flags/empty-kind-1.rs index 18937856d20..d9b8d8a7f7d 100644 --- a/tests/ui/native-library-link-flags/empty-kind-1.rs +++ b/tests/ui/native-library-link-flags/empty-kind-1.rs @@ -1,6 +1,6 @@ // Unspecified kind should fail with an error -// compile-flags: -l =mylib -// error-pattern: unknown library kind ``, expected one of: static, dylib, framework, link-arg +//@ compile-flags: -l =mylib +//@ error-pattern: unknown library kind ``, expected one of: static, dylib, framework, link-arg fn main() {} diff --git a/tests/ui/native-library-link-flags/empty-kind-2.rs b/tests/ui/native-library-link-flags/empty-kind-2.rs index 851eb63fcd8..16cb3b917e4 100644 --- a/tests/ui/native-library-link-flags/empty-kind-2.rs +++ b/tests/ui/native-library-link-flags/empty-kind-2.rs @@ -1,6 +1,6 @@ // Unspecified kind should fail with an error -// compile-flags: -l :+bundle=mylib -// error-pattern: unknown library kind ``, expected one of: static, dylib, framework, link-arg +//@ compile-flags: -l :+bundle=mylib +//@ error-pattern: unknown library kind ``, expected one of: static, dylib, framework, link-arg fn main() {} diff --git a/tests/ui/native-library-link-flags/link-arg-error.rs b/tests/ui/native-library-link-flags/link-arg-error.rs index e041650d024..4defb108178 100644 --- a/tests/ui/native-library-link-flags/link-arg-error.rs +++ b/tests/ui/native-library-link-flags/link-arg-error.rs @@ -1,4 +1,4 @@ -// compile-flags: -l link-arg:+bundle=arg -Z unstable-options -// error-pattern: linking modifier `bundle` is only compatible with `static` linking kind +//@ compile-flags: -l link-arg:+bundle=arg -Z unstable-options +//@ error-pattern: linking modifier `bundle` is only compatible with `static` linking kind fn main() {} diff --git a/tests/ui/native-library-link-flags/modifiers-override-2.rs b/tests/ui/native-library-link-flags/modifiers-override-2.rs index 333f6786b0f..a462a741ac6 100644 --- a/tests/ui/native-library-link-flags/modifiers-override-2.rs +++ b/tests/ui/native-library-link-flags/modifiers-override-2.rs @@ -1,3 +1,3 @@ -// compile-flags:-lstatic:+whole-archive,-whole-archive=foo +//@ compile-flags:-lstatic:+whole-archive,-whole-archive=foo fn main() {} diff --git a/tests/ui/native-library-link-flags/modifiers-override-3.rs b/tests/ui/native-library-link-flags/modifiers-override-3.rs index b28c53c6b0a..d05735ad616 100644 --- a/tests/ui/native-library-link-flags/modifiers-override-3.rs +++ b/tests/ui/native-library-link-flags/modifiers-override-3.rs @@ -1,7 +1,7 @@ // Regression test for issue #97299, one command line library with modifiers // overrides another command line library with modifiers. -// compile-flags:-lstatic:+whole-archive=foo -lstatic:+whole-archive=foo -// error-pattern: overriding linking modifiers from command line is not supported +//@ compile-flags:-lstatic:+whole-archive=foo -lstatic:+whole-archive=foo +//@ error-pattern: overriding linking modifiers from command line is not supported fn main() {} diff --git a/tests/ui/native-library-link-flags/modifiers-override.rs b/tests/ui/native-library-link-flags/modifiers-override.rs index 42cdb5004ad..cd2d003664a 100644 --- a/tests/ui/native-library-link-flags/modifiers-override.rs +++ b/tests/ui/native-library-link-flags/modifiers-override.rs @@ -1,4 +1,4 @@ -// compile-flags:-ldylib:+as-needed=foo -lstatic=bar -Zunstable-options +//@ compile-flags:-ldylib:+as-needed=foo -lstatic=bar -Zunstable-options #[link(name = "foo")] #[link( diff --git a/tests/ui/native-library-link-flags/msvc-non-utf8-output.rs b/tests/ui/native-library-link-flags/msvc-non-utf8-output.rs index 19b9a17705b..776e3bf12ad 100644 --- a/tests/ui/native-library-link-flags/msvc-non-utf8-output.rs +++ b/tests/ui/native-library-link-flags/msvc-non-utf8-output.rs @@ -1,5 +1,5 @@ -// build-fail -// compile-flags:-C link-arg=ā¦ŗā…ˆā½Æā­ā½½ā—ƒā”½āšž -// only-msvc -// normalize-stderr-test "(?:.|\n)*(ā¦ŗā…ˆā½Æā­ā½½ā—ƒā”½āšž)(?:.|\n)*" -> "$1" +//@ build-fail +//@ compile-flags:-C link-arg=ā¦ŗā…ˆā½Æā­ā½½ā—ƒā”½āšž +//@ only-msvc +//@ normalize-stderr-test "(?:.|\n)*(ā¦ŗā…ˆā½Æā­ā½½ā—ƒā”½āšž)(?:.|\n)*" -> "$1" pub fn main() {} diff --git a/tests/ui/native-library-link-flags/suggest-libname-only-1.rs b/tests/ui/native-library-link-flags/suggest-libname-only-1.rs index abf988a7c1e..328181fb5cb 100644 --- a/tests/ui/native-library-link-flags/suggest-libname-only-1.rs +++ b/tests/ui/native-library-link-flags/suggest-libname-only-1.rs @@ -1,7 +1,7 @@ -// build-fail -// compile-flags: --crate-type rlib -// error-pattern: could not find native static library `libfoo.a` -// error-pattern: only provide the library name `foo`, not the full filename +//@ build-fail +//@ compile-flags: --crate-type rlib +//@ error-pattern: could not find native static library `libfoo.a` +//@ error-pattern: only provide the library name `foo`, not the full filename #[link(name = "libfoo.a", kind = "static")] extern { } diff --git a/tests/ui/native-library-link-flags/suggest-libname-only-2.rs b/tests/ui/native-library-link-flags/suggest-libname-only-2.rs index dfa70e56db7..7ed106e4ab4 100644 --- a/tests/ui/native-library-link-flags/suggest-libname-only-2.rs +++ b/tests/ui/native-library-link-flags/suggest-libname-only-2.rs @@ -1,7 +1,7 @@ -// build-fail -// compile-flags: --crate-type rlib -// error-pattern: could not find native static library `bar.lib` -// error-pattern: only provide the library name `bar`, not the full filename +//@ build-fail +//@ compile-flags: --crate-type rlib +//@ error-pattern: could not find native static library `bar.lib` +//@ error-pattern: only provide the library name `bar`, not the full filename #[link(name = "bar.lib", kind = "static")] extern { } diff --git a/tests/ui/nested-block-comment.rs b/tests/ui/nested-block-comment.rs index f8dfb5fa8ca..07414345c38 100644 --- a/tests/ui/nested-block-comment.rs +++ b/tests/ui/nested-block-comment.rs @@ -1,5 +1,5 @@ -// run-pass -// pretty-expanded FIXME #23616 +//@ run-pass +//@ pretty-expanded FIXME #23616 /* This test checks that nested comments are supported diff --git a/tests/ui/nested-class.rs b/tests/ui/nested-class.rs index 303273618e1..f84ab40dd1d 100644 --- a/tests/ui/nested-class.rs +++ b/tests/ui/nested-class.rs @@ -1,4 +1,4 @@ -// run-pass +//@ run-pass #![allow(non_camel_case_types)] diff --git a/tests/ui/nested-ty-params.rs b/tests/ui/nested-ty-params.rs index 25bac1ba24b..b7cedf97c91 100644 --- a/tests/ui/nested-ty-params.rs +++ b/tests/ui/nested-ty-params.rs @@ -1,4 +1,4 @@ -// error-pattern:can't use generic parameters from outer item +//@ error-pattern:can't use generic parameters from outer item fn hd(v: Vec ) -> U { fn hd1(w: [U]) -> U { return w[0]; } diff --git a/tests/ui/never_type/adjust_never.rs b/tests/ui/never_type/adjust_never.rs index 0d7d2c0ed3f..aa7ee9ef7ab 100644 --- a/tests/ui/never_type/adjust_never.rs +++ b/tests/ui/never_type/adjust_never.rs @@ -1,6 +1,6 @@ // Test that a variable of type ! can coerce to another type. -// check-pass +//@ check-pass #![feature(never_type)] diff --git a/tests/ui/never_type/auto-traits.rs b/tests/ui/never_type/auto-traits.rs index 42ede708e66..8a2b9a14586 100644 --- a/tests/ui/never_type/auto-traits.rs +++ b/tests/ui/never_type/auto-traits.rs @@ -1,4 +1,4 @@ -// check-pass +//@ check-pass #![feature(auto_traits)] #![feature(negative_impls)] diff --git a/tests/ui/never_type/call-fn-never-arg.rs b/tests/ui/never_type/call-fn-never-arg.rs index 9d355817ee8..d37f0888b2f 100644 --- a/tests/ui/never_type/call-fn-never-arg.rs +++ b/tests/ui/never_type/call-fn-never-arg.rs @@ -1,6 +1,6 @@ // Test that we can use a ! for an argument of type ! -// check-pass +//@ check-pass #![feature(never_type)] #![allow(unreachable_code)] diff --git a/tests/ui/never_type/cast-never.rs b/tests/ui/never_type/cast-never.rs index 0139ebe4640..34314fcebab 100644 --- a/tests/ui/never_type/cast-never.rs +++ b/tests/ui/never_type/cast-never.rs @@ -1,6 +1,6 @@ // Test that we can explicitly cast ! to another type -// check-pass +//@ check-pass #![feature(never_type)] diff --git a/tests/ui/never_type/defaulted-never-note.rs b/tests/ui/never_type/defaulted-never-note.rs index d30ffcd3846..f4e5273b33a 100644 --- a/tests/ui/never_type/defaulted-never-note.rs +++ b/tests/ui/never_type/defaulted-never-note.rs @@ -1,6 +1,6 @@ -// revisions: nofallback fallback -//[nofallback] run-pass -//[fallback] check-fail +//@ revisions: nofallback fallback +//@[nofallback] run-pass +//@[fallback] check-fail // We need to opt into the `never_type_fallback` feature // to trigger the requirement that this is testing. diff --git a/tests/ui/never_type/dispatch_from_dyn_zst.rs b/tests/ui/never_type/dispatch_from_dyn_zst.rs index 764f58ce9e8..d3c32b57519 100644 --- a/tests/ui/never_type/dispatch_from_dyn_zst.rs +++ b/tests/ui/never_type/dispatch_from_dyn_zst.rs @@ -1,4 +1,4 @@ -// run-pass +//@ run-pass #![feature(unsize, dispatch_from_dyn, never_type)] diff --git a/tests/ui/never_type/diverging-fallback-control-flow.rs b/tests/ui/never_type/diverging-fallback-control-flow.rs index 9f6cfc7999a..e209a990885 100644 --- a/tests/ui/never_type/diverging-fallback-control-flow.rs +++ b/tests/ui/never_type/diverging-fallback-control-flow.rs @@ -1,5 +1,5 @@ -// revisions: nofallback fallback -// run-pass +//@ revisions: nofallback fallback +//@ run-pass #![allow(dead_code)] #![allow(unused_assignments)] diff --git a/tests/ui/never_type/diverging-fallback-no-leak.rs b/tests/ui/never_type/diverging-fallback-no-leak.rs index 03478e19ddc..425437da207 100644 --- a/tests/ui/never_type/diverging-fallback-no-leak.rs +++ b/tests/ui/never_type/diverging-fallback-no-leak.rs @@ -1,5 +1,5 @@ -// revisions: nofallback fallback -//[nofallback] check-pass +//@ revisions: nofallback fallback +//@[nofallback] check-pass #![cfg_attr(fallback, feature(never_type, never_type_fallback))] diff --git a/tests/ui/never_type/diverging-fallback-unconstrained-return.rs b/tests/ui/never_type/diverging-fallback-unconstrained-return.rs index 26c8175be63..aeb6ee6e26e 100644 --- a/tests/ui/never_type/diverging-fallback-unconstrained-return.rs +++ b/tests/ui/never_type/diverging-fallback-unconstrained-return.rs @@ -4,9 +4,9 @@ // in the objc crate, where changing the fallback from `!` to `()` // resulted in unsoundness. // -// check-pass +//@ check-pass -// revisions: nofallback fallback +//@ revisions: nofallback fallback #![cfg_attr(fallback, feature(never_type, never_type_fallback))] #![allow(unit_bindings)] diff --git a/tests/ui/never_type/exhaustive_patterns.rs b/tests/ui/never_type/exhaustive_patterns.rs index 2e23fa18280..3c53ac319b4 100644 --- a/tests/ui/never_type/exhaustive_patterns.rs +++ b/tests/ui/never_type/exhaustive_patterns.rs @@ -1,5 +1,5 @@ -// check-fail -// known-bug: #104034 +//@ check-fail +//@ known-bug: #104034 #![feature(exhaustive_patterns, never_type)] diff --git a/tests/ui/never_type/expr-empty-ret.rs b/tests/ui/never_type/expr-empty-ret.rs index ce8ffaf94d0..5d315934e00 100644 --- a/tests/ui/never_type/expr-empty-ret.rs +++ b/tests/ui/never_type/expr-empty-ret.rs @@ -1,9 +1,9 @@ -// run-pass +//@ run-pass #![allow(dead_code)] // Issue #521 -// pretty-expanded FIXME #23616 +//@ pretty-expanded FIXME #23616 fn f() { let _x = match true { diff --git a/tests/ui/never_type/fallback-closure-ret.rs b/tests/ui/never_type/fallback-closure-ret.rs index 5c8ce48cbb0..dcf38e03a13 100644 --- a/tests/ui/never_type/fallback-closure-ret.rs +++ b/tests/ui/never_type/fallback-closure-ret.rs @@ -7,8 +7,8 @@ // encountering a set of obligations like `?T: Foo` and `Trait::Projection = // ?T`. In the code below, these are `R: Bar` and `Fn::Output = R`. // -// revisions: nofallback fallback -// check-pass +//@ revisions: nofallback fallback +//@ check-pass #![cfg_attr(fallback, feature(never_type_fallback))] diff --git a/tests/ui/never_type/fallback-closure-wrap.rs b/tests/ui/never_type/fallback-closure-wrap.rs index f88355bb285..27020289c68 100644 --- a/tests/ui/never_type/fallback-closure-wrap.rs +++ b/tests/ui/never_type/fallback-closure-wrap.rs @@ -6,9 +6,9 @@ // Crater did not find many cases of this occurring, but it is included for // awareness. // -// revisions: nofallback fallback -//[nofallback] check-pass -//[fallback] check-fail +//@ revisions: nofallback fallback +//@[nofallback] check-pass +//@[fallback] check-fail #![cfg_attr(fallback, feature(never_type_fallback))] diff --git a/tests/ui/never_type/impl-for-never.rs b/tests/ui/never_type/impl-for-never.rs index 9423f08858b..0da79a712d2 100644 --- a/tests/ui/never_type/impl-for-never.rs +++ b/tests/ui/never_type/impl-for-never.rs @@ -1,4 +1,4 @@ -// run-pass +//@ run-pass #![feature(never_type)] diff --git a/tests/ui/never_type/impl_trait_fallback.rs b/tests/ui/never_type/impl_trait_fallback.rs index cc9520c1b24..ce06f8f7817 100644 --- a/tests/ui/never_type/impl_trait_fallback.rs +++ b/tests/ui/never_type/impl_trait_fallback.rs @@ -1,4 +1,4 @@ -// check-pass +//@ check-pass fn main() {} diff --git a/tests/ui/never_type/issue-44402.rs b/tests/ui/never_type/issue-44402.rs index 699e480dfe7..820d1af37bf 100644 --- a/tests/ui/never_type/issue-44402.rs +++ b/tests/ui/never_type/issue-44402.rs @@ -1,4 +1,4 @@ -// check-pass +//@ check-pass #![allow(dead_code)] #![feature(never_type)] diff --git a/tests/ui/never_type/issue-5500-1.rs b/tests/ui/never_type/issue-5500-1.rs index 98d6e1a14cb..65617e36c6d 100644 --- a/tests/ui/never_type/issue-5500-1.rs +++ b/tests/ui/never_type/issue-5500-1.rs @@ -2,7 +2,7 @@ // is OK because the test is here to check that the compiler doesn't ICE (cf. // #5500). -// check-pass +//@ check-pass struct TrieMapIterator<'a> { node: &'a usize diff --git a/tests/ui/never_type/never-assign-dead-code.rs b/tests/ui/never_type/never-assign-dead-code.rs index 39df7de5a7f..2c99d3086fb 100644 --- a/tests/ui/never_type/never-assign-dead-code.rs +++ b/tests/ui/never_type/never-assign-dead-code.rs @@ -1,6 +1,6 @@ // Test that an assignment of type ! makes the rest of the block dead code. -// check-pass +//@ check-pass #![feature(never_type)] #![allow(dropping_copy_types)] diff --git a/tests/ui/never_type/never-associated-type.rs b/tests/ui/never_type/never-associated-type.rs index 3bb917c9316..f7b88f604f2 100644 --- a/tests/ui/never_type/never-associated-type.rs +++ b/tests/ui/never_type/never-associated-type.rs @@ -1,6 +1,6 @@ // Test that we can use ! as an associated type. -// check-pass +//@ check-pass #![feature(never_type)] diff --git a/tests/ui/never_type/never-from-impl-is-reserved.rs b/tests/ui/never_type/never-from-impl-is-reserved.rs index 97fac59149b..26d194144f6 100644 --- a/tests/ui/never_type/never-from-impl-is-reserved.rs +++ b/tests/ui/never_type/never-from-impl-is-reserved.rs @@ -1,7 +1,7 @@ // check that the `for T: From` impl is reserved -// revisions: current next -//[next] compile-flags: -Znext-solver=coherence +//@ revisions: current next +//@[next] compile-flags: -Znext-solver=coherence #![feature(never_type)] diff --git a/tests/ui/never_type/never-result.rs b/tests/ui/never_type/never-result.rs index 35af37910ef..bdd06ec5bd1 100644 --- a/tests/ui/never_type/never-result.rs +++ b/tests/ui/never_type/never-result.rs @@ -1,4 +1,4 @@ -// run-pass +//@ run-pass #![allow(unused_variables)] #![allow(unreachable_code)] diff --git a/tests/ui/never_type/never-type-arg.rs b/tests/ui/never_type/never-type-arg.rs index 13cd59e6aa9..10023cf4199 100644 --- a/tests/ui/never_type/never-type-arg.rs +++ b/tests/ui/never_type/never-type-arg.rs @@ -1,6 +1,6 @@ // Test that we can use ! as an argument to a trait impl. -// check-pass +//@ check-pass #![feature(never_type)] diff --git a/tests/ui/never_type/never-type-in-nested-fn-decl.rs b/tests/ui/never_type/never-type-in-nested-fn-decl.rs index df546c4717e..094d8919c2a 100644 --- a/tests/ui/never_type/never-type-in-nested-fn-decl.rs +++ b/tests/ui/never_type/never-type-in-nested-fn-decl.rs @@ -1,4 +1,4 @@ -// build-pass +//@ build-pass trait X {} diff --git a/tests/ui/never_type/never-type-rvalues.rs b/tests/ui/never_type/never-type-rvalues.rs index 9ccc73dbf92..d3f6f628e1a 100644 --- a/tests/ui/never_type/never-type-rvalues.rs +++ b/tests/ui/never_type/never-type-rvalues.rs @@ -1,4 +1,4 @@ -// run-pass +//@ run-pass #![feature(never_type)] #![allow(dead_code)] diff --git a/tests/ui/never_type/never-value-fallback-issue-66757.rs b/tests/ui/never_type/never-value-fallback-issue-66757.rs index fc6fe6eb5cc..636757c70ec 100644 --- a/tests/ui/never_type/never-value-fallback-issue-66757.rs +++ b/tests/ui/never_type/never-value-fallback-issue-66757.rs @@ -4,9 +4,9 @@ // never) and an uninferred variable (here the argument to `From`) it // doesn't fallback to `()` but rather `!`. // -// revisions: nofallback fallback -//[fallback] run-pass -//[nofallback] check-fail +//@ revisions: nofallback fallback +//@[fallback] run-pass +//@[nofallback] check-fail #![feature(never_type)] diff --git a/tests/ui/never_type/never_coercions.rs b/tests/ui/never_type/never_coercions.rs index 105c3863533..e07b0c13eb8 100644 --- a/tests/ui/never_type/never_coercions.rs +++ b/tests/ui/never_type/never_coercions.rs @@ -1,4 +1,4 @@ -// run-pass +//@ run-pass // Test that having something of type ! doesn't screw up type-checking and that it coerces to the // LUB type of the other match arms. diff --git a/tests/ui/never_type/never_transmute_never.rs b/tests/ui/never_type/never_transmute_never.rs index fce3ced9aac..b1fcffcb3b7 100644 --- a/tests/ui/never_type/never_transmute_never.rs +++ b/tests/ui/never_type/never_transmute_never.rs @@ -1,4 +1,4 @@ -// check-pass +//@ check-pass #![crate_type="lib"] diff --git a/tests/ui/never_type/return-never-coerce.rs b/tests/ui/never_type/return-never-coerce.rs index d615940eff1..559b7d0e985 100644 --- a/tests/ui/never_type/return-never-coerce.rs +++ b/tests/ui/never_type/return-never-coerce.rs @@ -1,8 +1,8 @@ // Test that ! coerces to other types. -// run-fail -// error-pattern:aah! -// ignore-emscripten no processes +//@ run-fail +//@ error-pattern:aah! +//@ ignore-emscripten no processes fn call_another_fn T>(f: F) -> T { f() diff --git a/tests/ui/never_type/try_from.rs b/tests/ui/never_type/try_from.rs index 50451576f9c..acde524e98f 100644 --- a/tests/ui/never_type/try_from.rs +++ b/tests/ui/never_type/try_from.rs @@ -1,4 +1,4 @@ -// run-pass +//@ run-pass // This test relies on `TryFrom` being blanket impl for all `T: Into` // and `TryInto` being blanket impl for all `U: TryFrom` diff --git a/tests/ui/new-impl-syntax.rs b/tests/ui/new-impl-syntax.rs index e1f2bea9afa..124d604e6a8 100644 --- a/tests/ui/new-impl-syntax.rs +++ b/tests/ui/new-impl-syntax.rs @@ -1,4 +1,4 @@ -// run-pass +//@ run-pass use std::fmt; diff --git a/tests/ui/new-import-syntax.rs b/tests/ui/new-import-syntax.rs index f132ed57ce9..547900fab61 100644 --- a/tests/ui/new-import-syntax.rs +++ b/tests/ui/new-import-syntax.rs @@ -1,4 +1,4 @@ -// run-pass +//@ run-pass pub fn main() { println!("Hello world!"); diff --git a/tests/ui/new-style-constants.rs b/tests/ui/new-style-constants.rs index 82ed7b55740..e33a2da3878 100644 --- a/tests/ui/new-style-constants.rs +++ b/tests/ui/new-style-constants.rs @@ -1,4 +1,4 @@ -// run-pass +//@ run-pass static FOO: isize = 3; diff --git a/tests/ui/new-unicode-escapes.rs b/tests/ui/new-unicode-escapes.rs index 850b0de44b7..867a50da081 100644 --- a/tests/ui/new-unicode-escapes.rs +++ b/tests/ui/new-unicode-escapes.rs @@ -1,4 +1,4 @@ -// run-pass +//@ run-pass pub fn main() { let s = "\u{2603}"; diff --git a/tests/ui/newlambdas.rs b/tests/ui/newlambdas.rs index 90de53856c0..75e851fb73a 100644 --- a/tests/ui/newlambdas.rs +++ b/tests/ui/newlambdas.rs @@ -1,4 +1,4 @@ -// run-pass +//@ run-pass // Tests for the new |args| expr lambda syntax diff --git a/tests/ui/newtype-polymorphic.rs b/tests/ui/newtype-polymorphic.rs index a6a725211ad..146d49fdf68 100644 --- a/tests/ui/newtype-polymorphic.rs +++ b/tests/ui/newtype-polymorphic.rs @@ -1,4 +1,4 @@ -// run-pass +//@ run-pass #![allow(non_camel_case_types)] diff --git a/tests/ui/newtype.rs b/tests/ui/newtype.rs index f02b66f450f..8a07c67eb4f 100644 --- a/tests/ui/newtype.rs +++ b/tests/ui/newtype.rs @@ -1,4 +1,4 @@ -// run-pass +//@ run-pass #![allow(non_camel_case_types)] #[derive(Copy, Clone)] diff --git a/tests/ui/nll/assign-while-to-immutable.rs b/tests/ui/nll/assign-while-to-immutable.rs index 24eaa8a2388..991f9c3e45c 100644 --- a/tests/ui/nll/assign-while-to-immutable.rs +++ b/tests/ui/nll/assign-while-to-immutable.rs @@ -1,7 +1,7 @@ // We used to incorrectly assign to `x` twice when generating MIR for this // function, preventing this from compiling. -// check-pass +//@ check-pass fn main() { let x: () = while false { diff --git a/tests/ui/nll/borrow-use-issue-46875.rs b/tests/ui/nll/borrow-use-issue-46875.rs index 42e28b9674b..9917fc2c86e 100644 --- a/tests/ui/nll/borrow-use-issue-46875.rs +++ b/tests/ui/nll/borrow-use-issue-46875.rs @@ -1,4 +1,4 @@ -// run-pass +//@ run-pass fn vec() { let mut _x = vec!['c']; diff --git a/tests/ui/nll/borrowck-thread-local-static-mut-borrow-outlives-fn.rs b/tests/ui/nll/borrowck-thread-local-static-mut-borrow-outlives-fn.rs index 8eb544e8ab9..fd49b232265 100644 --- a/tests/ui/nll/borrowck-thread-local-static-mut-borrow-outlives-fn.rs +++ b/tests/ui/nll/borrowck-thread-local-static-mut-borrow-outlives-fn.rs @@ -1,5 +1,5 @@ // -// run-pass +//@ run-pass // // FIXME(#54366) - We probably shouldn't allow #[thread_local] static mut to get a 'static lifetime. diff --git a/tests/ui/nll/capture-mut-ref.fixed b/tests/ui/nll/capture-mut-ref.fixed index 2dacb26b6eb..53e26633dce 100644 --- a/tests/ui/nll/capture-mut-ref.fixed +++ b/tests/ui/nll/capture-mut-ref.fixed @@ -1,4 +1,4 @@ -// run-rustfix +//@ run-rustfix // Check that capturing a mutable reference by move and assigning to its // referent doesn't make the unused mut lint think that it is mutable. diff --git a/tests/ui/nll/capture-mut-ref.rs b/tests/ui/nll/capture-mut-ref.rs index 56e01f7b776..a9cf3777a27 100644 --- a/tests/ui/nll/capture-mut-ref.rs +++ b/tests/ui/nll/capture-mut-ref.rs @@ -1,4 +1,4 @@ -// run-rustfix +//@ run-rustfix // Check that capturing a mutable reference by move and assigning to its // referent doesn't make the unused mut lint think that it is mutable. diff --git a/tests/ui/nll/closure-malformed-projection-input-issue-102800.rs b/tests/ui/nll/closure-malformed-projection-input-issue-102800.rs index 260c16c17d4..96b5c521b1b 100644 --- a/tests/ui/nll/closure-malformed-projection-input-issue-102800.rs +++ b/tests/ui/nll/closure-malformed-projection-input-issue-102800.rs @@ -4,7 +4,7 @@ // input types. Previously this was an ICE in the error path because we didn't register enough // diagnostic information to render the higher-ranked subtyping error. -// check-fail +//@ check-fail trait Trait { type Ty; diff --git a/tests/ui/nll/closure-requirements/escape-argument-callee.rs b/tests/ui/nll/closure-requirements/escape-argument-callee.rs index d643a1b2a0d..e44ea5b6209 100644 --- a/tests/ui/nll/closure-requirements/escape-argument-callee.rs +++ b/tests/ui/nll/closure-requirements/escape-argument-callee.rs @@ -12,7 +12,7 @@ // that appear free in its type (hence, we see it before the closure's // "external requirements" report). -// compile-flags:-Zverbose-internals +//@ compile-flags:-Zverbose-internals #![feature(rustc_attrs)] diff --git a/tests/ui/nll/closure-requirements/escape-argument.rs b/tests/ui/nll/closure-requirements/escape-argument.rs index 7b1e6e9c820..e90bffd2fd6 100644 --- a/tests/ui/nll/closure-requirements/escape-argument.rs +++ b/tests/ui/nll/closure-requirements/escape-argument.rs @@ -12,7 +12,7 @@ // basically checking that the MIR type checker correctly enforces the // closure signature. -// compile-flags:-Zverbose-internals +//@ compile-flags:-Zverbose-internals #![feature(rustc_attrs)] diff --git a/tests/ui/nll/closure-requirements/escape-upvar-nested.rs b/tests/ui/nll/closure-requirements/escape-upvar-nested.rs index b104bc2479e..8f0f129db01 100644 --- a/tests/ui/nll/closure-requirements/escape-upvar-nested.rs +++ b/tests/ui/nll/closure-requirements/escape-upvar-nested.rs @@ -5,7 +5,7 @@ // // except that the closure does so via a second closure. -// compile-flags:-Zverbose-internals +//@ compile-flags:-Zverbose-internals #![feature(rustc_attrs)] diff --git a/tests/ui/nll/closure-requirements/escape-upvar-ref.rs b/tests/ui/nll/closure-requirements/escape-upvar-ref.rs index 97c2d7dc291..05b1121b291 100644 --- a/tests/ui/nll/closure-requirements/escape-upvar-ref.rs +++ b/tests/ui/nll/closure-requirements/escape-upvar-ref.rs @@ -9,7 +9,7 @@ // `'b`. This relationship is propagated to the closure creator, // which reports an error. -// compile-flags:-Zverbose-internals +//@ compile-flags:-Zverbose-internals #![feature(rustc_attrs)] diff --git a/tests/ui/nll/closure-requirements/issue-58127-mutliple-requirements.rs b/tests/ui/nll/closure-requirements/issue-58127-mutliple-requirements.rs index a83ebc21f5f..02fae7639a6 100644 --- a/tests/ui/nll/closure-requirements/issue-58127-mutliple-requirements.rs +++ b/tests/ui/nll/closure-requirements/issue-58127-mutliple-requirements.rs @@ -1,4 +1,4 @@ -// check-pass +//@ check-pass // Test that we propagate region relations from closures precisely when there is // more than one non-local lower bound. diff --git a/tests/ui/nll/closure-requirements/propagate-approximated-fail-no-postdom.rs b/tests/ui/nll/closure-requirements/propagate-approximated-fail-no-postdom.rs index 31f537d19d2..5d21fa100a4 100644 --- a/tests/ui/nll/closure-requirements/propagate-approximated-fail-no-postdom.rs +++ b/tests/ui/nll/closure-requirements/propagate-approximated-fail-no-postdom.rs @@ -1,7 +1,7 @@ // Test where we fail to approximate due to demanding a postdom // relationship between our upper bounds. -// compile-flags:-Zverbose-internals +//@ compile-flags:-Zverbose-internals #![feature(rustc_attrs)] diff --git a/tests/ui/nll/closure-requirements/propagate-approximated-ref.rs b/tests/ui/nll/closure-requirements/propagate-approximated-ref.rs index 295b9cb7755..1c27e38f832 100644 --- a/tests/ui/nll/closure-requirements/propagate-approximated-ref.rs +++ b/tests/ui/nll/closure-requirements/propagate-approximated-ref.rs @@ -12,7 +12,7 @@ // Note: the use of `Cell` here is to introduce invariance. One less // variable. -// compile-flags:-Zverbose-internals +//@ compile-flags:-Zverbose-internals #![feature(rustc_attrs)] diff --git a/tests/ui/nll/closure-requirements/propagate-approximated-shorter-to-static-comparing-against-free.rs b/tests/ui/nll/closure-requirements/propagate-approximated-shorter-to-static-comparing-against-free.rs index e27a7d591e7..50eb60ecef3 100644 --- a/tests/ui/nll/closure-requirements/propagate-approximated-shorter-to-static-comparing-against-free.rs +++ b/tests/ui/nll/closure-requirements/propagate-approximated-shorter-to-static-comparing-against-free.rs @@ -2,7 +2,7 @@ // where `'x` is bound in closure type but `'a` is free. This forces // us to approximate `'x` one way or the other. -// compile-flags:-Zverbose-internals +//@ compile-flags:-Zverbose-internals #![feature(rustc_attrs)] diff --git a/tests/ui/nll/closure-requirements/propagate-approximated-shorter-to-static-no-bound.rs b/tests/ui/nll/closure-requirements/propagate-approximated-shorter-to-static-no-bound.rs index f11dc769a03..25e212a7225 100644 --- a/tests/ui/nll/closure-requirements/propagate-approximated-shorter-to-static-no-bound.rs +++ b/tests/ui/nll/closure-requirements/propagate-approximated-shorter-to-static-no-bound.rs @@ -3,7 +3,7 @@ // because `'y` is higher-ranked but we know of no relations to other // regions. Note that `'static` shows up in the stderr output as `'0`. -// compile-flags:-Zverbose-internals +//@ compile-flags:-Zverbose-internals #![feature(rustc_attrs)] diff --git a/tests/ui/nll/closure-requirements/propagate-approximated-shorter-to-static-wrong-bound.rs b/tests/ui/nll/closure-requirements/propagate-approximated-shorter-to-static-wrong-bound.rs index 5e5aa3a3cce..cda7b22362f 100644 --- a/tests/ui/nll/closure-requirements/propagate-approximated-shorter-to-static-wrong-bound.rs +++ b/tests/ui/nll/closure-requirements/propagate-approximated-shorter-to-static-wrong-bound.rs @@ -4,7 +4,7 @@ // relations to other regions. Note that `'static` shows up in the // stderr output as `'0`. -// compile-flags:-Zverbose-internals +//@ compile-flags:-Zverbose-internals #![feature(rustc_attrs)] diff --git a/tests/ui/nll/closure-requirements/propagate-approximated-val.rs b/tests/ui/nll/closure-requirements/propagate-approximated-val.rs index 83cb37516de..e7e2f157604 100644 --- a/tests/ui/nll/closure-requirements/propagate-approximated-val.rs +++ b/tests/ui/nll/closure-requirements/propagate-approximated-val.rs @@ -5,7 +5,7 @@ // relationships. In the 'main' variant, there are a number of // anonymous regions as well. -// compile-flags:-Zverbose-internals +//@ compile-flags:-Zverbose-internals #![feature(rustc_attrs)] diff --git a/tests/ui/nll/closure-requirements/propagate-despite-same-free-region.rs b/tests/ui/nll/closure-requirements/propagate-despite-same-free-region.rs index 5a25e29816d..4422c6311ee 100644 --- a/tests/ui/nll/closure-requirements/propagate-despite-same-free-region.rs +++ b/tests/ui/nll/closure-requirements/propagate-despite-same-free-region.rs @@ -3,8 +3,8 @@ // need to propagate; but in fact we do because identity of free // regions is erased. -// compile-flags:-Zverbose-internals -// check-pass +//@ compile-flags:-Zverbose-internals +//@ check-pass #![feature(rustc_attrs)] diff --git a/tests/ui/nll/closure-requirements/propagate-fail-to-approximate-longer-no-bounds.rs b/tests/ui/nll/closure-requirements/propagate-fail-to-approximate-longer-no-bounds.rs index 0fb57d47d2d..4ac5076d3f9 100644 --- a/tests/ui/nll/closure-requirements/propagate-fail-to-approximate-longer-no-bounds.rs +++ b/tests/ui/nll/closure-requirements/propagate-fail-to-approximate-longer-no-bounds.rs @@ -7,7 +7,7 @@ // as it knows of no relationships between `'x` and any // non-higher-ranked regions. -// compile-flags:-Zverbose-internals +//@ compile-flags:-Zverbose-internals #![feature(rustc_attrs)] diff --git a/tests/ui/nll/closure-requirements/propagate-fail-to-approximate-longer-wrong-bounds.rs b/tests/ui/nll/closure-requirements/propagate-fail-to-approximate-longer-wrong-bounds.rs index 3bdd923543e..2cb6ceb0c3b 100644 --- a/tests/ui/nll/closure-requirements/propagate-fail-to-approximate-longer-wrong-bounds.rs +++ b/tests/ui/nll/closure-requirements/propagate-fail-to-approximate-longer-wrong-bounds.rs @@ -7,7 +7,7 @@ // as it only knows of regions that `'x` is outlived by, and none that // `'x` outlives. -// compile-flags:-Zverbose-internals +//@ compile-flags:-Zverbose-internals #![feature(rustc_attrs)] diff --git a/tests/ui/nll/closure-requirements/propagate-from-trait-match.rs b/tests/ui/nll/closure-requirements/propagate-from-trait-match.rs index 5fe2f46ee79..2fffc17904a 100644 --- a/tests/ui/nll/closure-requirements/propagate-from-trait-match.rs +++ b/tests/ui/nll/closure-requirements/propagate-from-trait-match.rs @@ -4,7 +4,7 @@ // the same `'a` for which it implements `Trait`, which can only be the `'a` // from the function definition. -// compile-flags:-Zverbose-internals +//@ compile-flags:-Zverbose-internals #![feature(rustc_attrs)] #![allow(dead_code)] diff --git a/tests/ui/nll/closure-requirements/region-lbr-anon-does-not-outlive-static.rs b/tests/ui/nll/closure-requirements/region-lbr-anon-does-not-outlive-static.rs index 6e7db4578a0..35f2a061984 100644 --- a/tests/ui/nll/closure-requirements/region-lbr-anon-does-not-outlive-static.rs +++ b/tests/ui/nll/closure-requirements/region-lbr-anon-does-not-outlive-static.rs @@ -3,7 +3,7 @@ // a variety of errors from the older, AST-based machinery (notably // borrowck), and then we get the NLL error at the end. -// compile-flags:-Zverbose-internals +//@ compile-flags:-Zverbose-internals fn foo(x: &u32) -> &'static u32 { &*x diff --git a/tests/ui/nll/closure-requirements/region-lbr-named-does-not-outlive-static.rs b/tests/ui/nll/closure-requirements/region-lbr-named-does-not-outlive-static.rs index c1b9e249c09..559771241a5 100644 --- a/tests/ui/nll/closure-requirements/region-lbr-named-does-not-outlive-static.rs +++ b/tests/ui/nll/closure-requirements/region-lbr-named-does-not-outlive-static.rs @@ -3,7 +3,7 @@ // a variety of errors from the older, AST-based machinery (notably // borrowck), and then we get the NLL error at the end. -// compile-flags:-Zverbose-internals +//@ compile-flags:-Zverbose-internals fn foo<'a>(x: &'a u32) -> &'static u32 { &*x diff --git a/tests/ui/nll/closure-requirements/region-lbr1-does-not-outlive-ebr2.rs b/tests/ui/nll/closure-requirements/region-lbr1-does-not-outlive-ebr2.rs index 1d31c9cb5a5..19a76b4d743 100644 --- a/tests/ui/nll/closure-requirements/region-lbr1-does-not-outlive-ebr2.rs +++ b/tests/ui/nll/closure-requirements/region-lbr1-does-not-outlive-ebr2.rs @@ -3,7 +3,7 @@ // a variety of errors from the older, AST-based machinery (notably // borrowck), and then we get the NLL error at the end. -// compile-flags:-Zverbose-internals +//@ compile-flags:-Zverbose-internals fn foo<'a, 'b>(x: &'a u32, y: &'b u32) -> &'b u32 { &*x diff --git a/tests/ui/nll/closure-requirements/region-lbr1-does-outlive-lbr2-because-implied-bound.rs b/tests/ui/nll/closure-requirements/region-lbr1-does-outlive-lbr2-because-implied-bound.rs index 4e57fef167a..f0a0139ef0c 100644 --- a/tests/ui/nll/closure-requirements/region-lbr1-does-outlive-lbr2-because-implied-bound.rs +++ b/tests/ui/nll/closure-requirements/region-lbr1-does-outlive-lbr2-because-implied-bound.rs @@ -1,8 +1,8 @@ // Basic test for free regions in the NLL code. This test does not // report an error because of the (implied) bound that `'b: 'a`. -// check-pass -// compile-flags:-Zverbose-internals +//@ check-pass +//@ compile-flags:-Zverbose-internals fn foo<'a, 'b>(x: &'a &'b u32) -> &'a u32 { &**x diff --git a/tests/ui/nll/closure-requirements/return-wrong-bound-region.rs b/tests/ui/nll/closure-requirements/return-wrong-bound-region.rs index 0277715b590..7e88dc656c5 100644 --- a/tests/ui/nll/closure-requirements/return-wrong-bound-region.rs +++ b/tests/ui/nll/closure-requirements/return-wrong-bound-region.rs @@ -2,7 +2,7 @@ // the first, but actually returns the second. This should fail within // the closure. -// compile-flags:-Zverbose-internals +//@ compile-flags:-Zverbose-internals #![feature(rustc_attrs)] diff --git a/tests/ui/nll/closure-requirements/type-test-subject-non-trivial-region.rs b/tests/ui/nll/closure-requirements/type-test-subject-non-trivial-region.rs index d8772e86894..52a58ae44fd 100644 --- a/tests/ui/nll/closure-requirements/type-test-subject-non-trivial-region.rs +++ b/tests/ui/nll/closure-requirements/type-test-subject-non-trivial-region.rs @@ -1,5 +1,5 @@ // See #108639 for description. -// check-pass +//@ check-pass trait Trait { type Item<'a>: 'a; diff --git a/tests/ui/nll/closure-requirements/type-test-subject-opaque-1.rs b/tests/ui/nll/closure-requirements/type-test-subject-opaque-1.rs index fce6f2fee7f..a760de48a21 100644 --- a/tests/ui/nll/closure-requirements/type-test-subject-opaque-1.rs +++ b/tests/ui/nll/closure-requirements/type-test-subject-opaque-1.rs @@ -1,5 +1,5 @@ // Regression test for #107426. -// check-pass +//@ check-pass use std::marker::PhantomData; #[derive(Clone, Copy)] diff --git a/tests/ui/nll/closure-requirements/type-test-subject-opaque-2.rs b/tests/ui/nll/closure-requirements/type-test-subject-opaque-2.rs index 55905850f0c..788d3b229e5 100644 --- a/tests/ui/nll/closure-requirements/type-test-subject-opaque-2.rs +++ b/tests/ui/nll/closure-requirements/type-test-subject-opaque-2.rs @@ -1,5 +1,5 @@ // Resgression test for #107516. -// check-pass +//@ check-pass fn iter1<'a: 'a>() -> impl Iterator { None.into_iter() diff --git a/tests/ui/nll/closure-requirements/type-test-subject-unnamed-region.rs b/tests/ui/nll/closure-requirements/type-test-subject-unnamed-region.rs index b5a95c17009..256951d00c1 100644 --- a/tests/ui/nll/closure-requirements/type-test-subject-unnamed-region.rs +++ b/tests/ui/nll/closure-requirements/type-test-subject-unnamed-region.rs @@ -1,5 +1,5 @@ // See #108635 for description. -// check-pass +//@ check-pass trait Trait { type Item<'a>: 'a; diff --git a/tests/ui/nll/constant.rs b/tests/ui/nll/constant.rs index 47f0eadf99c..9791ec7a92b 100644 --- a/tests/ui/nll/constant.rs +++ b/tests/ui/nll/constant.rs @@ -1,7 +1,7 @@ // Test that MIR borrowck and NLL analysis can handle constants of // arbitrary types without ICEs. -// check-pass +//@ check-pass const HI: &str = "hi"; diff --git a/tests/ui/nll/coroutine-distinct-lifetime.rs b/tests/ui/nll/coroutine-distinct-lifetime.rs index 0483b8858ba..ff94a3d54b7 100644 --- a/tests/ui/nll/coroutine-distinct-lifetime.rs +++ b/tests/ui/nll/coroutine-distinct-lifetime.rs @@ -6,7 +6,7 @@ // over a yield -- because the data that is borrowed (`*x`) is not // stored on the stack. -// check-pass +//@ check-pass fn foo(x: &mut u32) { move || { diff --git a/tests/ui/nll/drop-may-dangle.rs b/tests/ui/nll/drop-may-dangle.rs index b5531c29b98..2c5e393c3b9 100644 --- a/tests/ui/nll/drop-may-dangle.rs +++ b/tests/ui/nll/drop-may-dangle.rs @@ -2,7 +2,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. -// check-pass +//@ check-pass #![allow(warnings)] #![feature(dropck_eyepatch)] diff --git a/tests/ui/nll/empty-type-predicate-2.rs b/tests/ui/nll/empty-type-predicate-2.rs index 20d6e47f753..93f1226965f 100644 --- a/tests/ui/nll/empty-type-predicate-2.rs +++ b/tests/ui/nll/empty-type-predicate-2.rs @@ -3,7 +3,7 @@ // `D::Error:` is lowered to `D::Error: ReEmpty` - check that we don't ICE in // NLL for the unexpected region. -// check-pass +//@ check-pass trait Deserializer { type Error; diff --git a/tests/ui/nll/empty-type-predicate.rs b/tests/ui/nll/empty-type-predicate.rs index d126a455dae..ad18375f047 100644 --- a/tests/ui/nll/empty-type-predicate.rs +++ b/tests/ui/nll/empty-type-predicate.rs @@ -3,7 +3,7 @@ // `dyn T:` is lowered to `dyn T: ReEmpty` - check that we don't ICE in NLL for // the unexpected region. -// check-pass +//@ check-pass trait T {} fn f() where dyn T: {} diff --git a/tests/ui/nll/extra-unused-mut.rs b/tests/ui/nll/extra-unused-mut.rs index b04e3954249..786ba98508f 100644 --- a/tests/ui/nll/extra-unused-mut.rs +++ b/tests/ui/nll/extra-unused-mut.rs @@ -1,6 +1,6 @@ // extra unused mut lint tests for #51918 -// check-pass +//@ check-pass #![feature(coroutines)] #![deny(unused_mut)] diff --git a/tests/ui/nll/issue-112604-closure-output-normalize.rs b/tests/ui/nll/issue-112604-closure-output-normalize.rs index e4c954eeb33..117e1d91e34 100644 --- a/tests/ui/nll/issue-112604-closure-output-normalize.rs +++ b/tests/ui/nll/issue-112604-closure-output-normalize.rs @@ -1,4 +1,4 @@ -//check-pass +//@check-pass use higher_kinded_types::*; mod higher_kinded_types { diff --git a/tests/ui/nll/issue-16223.rs b/tests/ui/nll/issue-16223.rs index 0ae0ed3d87f..7a510c5ad9d 100644 --- a/tests/ui/nll/issue-16223.rs +++ b/tests/ui/nll/issue-16223.rs @@ -13,7 +13,7 @@ // | // = note: move occurs because the value has type `A`, which does not implement the `Copy` trait -// check-pass +//@ check-pass #![feature(box_patterns)] diff --git a/tests/ui/nll/issue-21114-ebfull.rs b/tests/ui/nll/issue-21114-ebfull.rs index fc4a6845a4f..80478db215a 100644 --- a/tests/ui/nll/issue-21114-ebfull.rs +++ b/tests/ui/nll/issue-21114-ebfull.rs @@ -1,4 +1,4 @@ -// check-pass +//@ check-pass use std::collections::HashMap; use std::sync::Mutex; diff --git a/tests/ui/nll/issue-21114-kixunil.rs b/tests/ui/nll/issue-21114-kixunil.rs index 666f89f356d..ce6f9b5f296 100644 --- a/tests/ui/nll/issue-21114-kixunil.rs +++ b/tests/ui/nll/issue-21114-kixunil.rs @@ -1,4 +1,4 @@ -// check-pass +//@ check-pass fn from_stdin(min: u64) -> Vec { use std::io::BufRead; diff --git a/tests/ui/nll/issue-22323-temp-destruction.rs b/tests/ui/nll/issue-22323-temp-destruction.rs index 3f2ece1cf6c..b7242290e99 100644 --- a/tests/ui/nll/issue-22323-temp-destruction.rs +++ b/tests/ui/nll/issue-22323-temp-destruction.rs @@ -1,7 +1,7 @@ // rust-lang/rust#22323: regression test demonstrating that NLL // precisely tracks temporary destruction order. -// check-pass +//@ check-pass fn main() { let _s = construct().borrow().consume_borrowed(); diff --git a/tests/ui/nll/issue-24535-allow-mutable-borrow-in-match-guard.rs b/tests/ui/nll/issue-24535-allow-mutable-borrow-in-match-guard.rs index ccfc8937fd7..4e4278820f1 100644 --- a/tests/ui/nll/issue-24535-allow-mutable-borrow-in-match-guard.rs +++ b/tests/ui/nll/issue-24535-allow-mutable-borrow-in-match-guard.rs @@ -1,4 +1,4 @@ -// run-pass +//@ run-pass // This test illustrates that under NLL, we can remove our overly // conservative approach for disallowing mutations of match inputs. diff --git a/tests/ui/nll/issue-27583.rs b/tests/ui/nll/issue-27583.rs index 84c94c7c905..cdf0bd3647d 100644 --- a/tests/ui/nll/issue-27583.rs +++ b/tests/ui/nll/issue-27583.rs @@ -1,4 +1,4 @@ -// check-pass +//@ check-pass // Regression test for issue #27583. Unclear how useful this will be // going forward, since the issue in question was EXTREMELY sensitive // to compiler internals (like the precise numbering of nodes), but diff --git a/tests/ui/nll/issue-30104.rs b/tests/ui/nll/issue-30104.rs index 38850cd3fdf..5c643a221e8 100644 --- a/tests/ui/nll/issue-30104.rs +++ b/tests/ui/nll/issue-30104.rs @@ -1,6 +1,6 @@ // Regression test for #30104 -// check-pass +//@ check-pass use std::ops::{Deref, DerefMut}; diff --git a/tests/ui/nll/issue-32382-index-assoc-type-with-lifetime.rs b/tests/ui/nll/issue-32382-index-assoc-type-with-lifetime.rs index a8a8e693026..9298ff9658c 100644 --- a/tests/ui/nll/issue-32382-index-assoc-type-with-lifetime.rs +++ b/tests/ui/nll/issue-32382-index-assoc-type-with-lifetime.rs @@ -1,4 +1,4 @@ -// check-pass +//@ check-pass // rust-lang/rust#32382: Borrow checker used to complain about // `foobar_3` in the `impl` below, presumably due to some interaction diff --git a/tests/ui/nll/issue-43058.rs b/tests/ui/nll/issue-43058.rs index 227888d17d3..32f801a74f7 100644 --- a/tests/ui/nll/issue-43058.rs +++ b/tests/ui/nll/issue-43058.rs @@ -1,4 +1,4 @@ -// check-pass +//@ check-pass use std::borrow::Cow; diff --git a/tests/ui/nll/issue-45696-long-live-borrows-in-boxes.rs b/tests/ui/nll/issue-45696-long-live-borrows-in-boxes.rs index b3f655628ba..68f8749d0b9 100644 --- a/tests/ui/nll/issue-45696-long-live-borrows-in-boxes.rs +++ b/tests/ui/nll/issue-45696-long-live-borrows-in-boxes.rs @@ -1,7 +1,7 @@ // rust-lang/rust#45696: This test is checking that we can return // mutable borrows owned by boxes even when the boxes are dropped. -// run-pass +//@ run-pass // This function shows quite directly what is going on: We have a // reborrow of contents within the box. diff --git a/tests/ui/nll/issue-45696-no-variant-box-recur.rs b/tests/ui/nll/issue-45696-no-variant-box-recur.rs index 39f1607a36b..5ede76ef87b 100644 --- a/tests/ui/nll/issue-45696-no-variant-box-recur.rs +++ b/tests/ui/nll/issue-45696-no-variant-box-recur.rs @@ -3,7 +3,7 @@ // to construct but *is* possible to declare; see also issues #4287, #44933, // and #52852). -// run-pass +//@ run-pass // This test has structs and functions that are by definition unusable // all over the place, so just go ahead and allow dead_code diff --git a/tests/ui/nll/issue-45696-scribble-on-boxed-borrow.rs b/tests/ui/nll/issue-45696-scribble-on-boxed-borrow.rs index 637cf278f84..9d9fecbb9f8 100644 --- a/tests/ui/nll/issue-45696-scribble-on-boxed-borrow.rs +++ b/tests/ui/nll/issue-45696-scribble-on-boxed-borrow.rs @@ -2,7 +2,7 @@ // mutable borrows that would be scribbled over by destructors before // the return occurs. -// ignore-compare-mode-polonius +//@ ignore-compare-mode-polonius struct Scribble<'a>(&'a mut u32); diff --git a/tests/ui/nll/issue-46589.rs b/tests/ui/nll/issue-46589.rs index 0a4c20d1515..417d9cab657 100644 --- a/tests/ui/nll/issue-46589.rs +++ b/tests/ui/nll/issue-46589.rs @@ -2,7 +2,7 @@ // We will manually check it passes in Polonius tests, as we can't have a test here // which conditionally passes depending on a test revision/compile-flags. -// ignore-compare-mode-polonius +//@ ignore-compare-mode-polonius struct Foo; diff --git a/tests/ui/nll/issue-47022.rs b/tests/ui/nll/issue-47022.rs index 521643c664d..20be566e476 100644 --- a/tests/ui/nll/issue-47022.rs +++ b/tests/ui/nll/issue-47022.rs @@ -1,4 +1,4 @@ -// check-pass +//@ check-pass struct LoadedObject { bodies: Vec, diff --git a/tests/ui/nll/issue-47153-generic-const.rs b/tests/ui/nll/issue-47153-generic-const.rs index 9f4d57111bb..b8a435f37ed 100644 --- a/tests/ui/nll/issue-47153-generic-const.rs +++ b/tests/ui/nll/issue-47153-generic-const.rs @@ -1,4 +1,4 @@ -// run-pass +//@ run-pass // Regression test for #47153: constants in a generic context (such as // a trait) used to ICE. diff --git a/tests/ui/nll/issue-47589.rs b/tests/ui/nll/issue-47589.rs index 280bf081138..5d7500407a8 100644 --- a/tests/ui/nll/issue-47589.rs +++ b/tests/ui/nll/issue-47589.rs @@ -1,4 +1,4 @@ -// run-pass +//@ run-pass pub struct DescriptorSet<'a> { pub slots: Vec> diff --git a/tests/ui/nll/issue-48070.rs b/tests/ui/nll/issue-48070.rs index a9fe3521d5a..263fdce6098 100644 --- a/tests/ui/nll/issue-48070.rs +++ b/tests/ui/nll/issue-48070.rs @@ -1,4 +1,4 @@ -// run-pass +//@ run-pass struct Foo { x: u32 diff --git a/tests/ui/nll/issue-48179.rs b/tests/ui/nll/issue-48179.rs index f81203dc412..c8f775ed20b 100644 --- a/tests/ui/nll/issue-48179.rs +++ b/tests/ui/nll/issue-48179.rs @@ -1,7 +1,7 @@ // Regression test for #48132. This was failing due to problems around // the projection caching and dropck type enumeration. -// check-pass +//@ check-pass pub struct Container { value: Option, diff --git a/tests/ui/nll/issue-48623-closure.rs b/tests/ui/nll/issue-48623-closure.rs index 3f8587eed41..e781cfb1392 100644 --- a/tests/ui/nll/issue-48623-closure.rs +++ b/tests/ui/nll/issue-48623-closure.rs @@ -1,4 +1,4 @@ -// run-pass +//@ run-pass #![allow(path_statements)] #![allow(dead_code)] diff --git a/tests/ui/nll/issue-48623-coroutine.rs b/tests/ui/nll/issue-48623-coroutine.rs index bd11aaf1429..3a4a27855d9 100644 --- a/tests/ui/nll/issue-48623-coroutine.rs +++ b/tests/ui/nll/issue-48623-coroutine.rs @@ -1,4 +1,4 @@ -// run-pass +//@ run-pass #![allow(path_statements)] #![allow(dead_code)] diff --git a/tests/ui/nll/issue-50343.rs b/tests/ui/nll/issue-50343.rs index dd0afbbdfc6..d238aa8b9eb 100644 --- a/tests/ui/nll/issue-50343.rs +++ b/tests/ui/nll/issue-50343.rs @@ -1,4 +1,4 @@ -// run-pass +//@ run-pass #![deny(unused_mut)] diff --git a/tests/ui/nll/issue-50461-used-mut-from-moves.rs b/tests/ui/nll/issue-50461-used-mut-from-moves.rs index 2458b171e64..59103afa226 100644 --- a/tests/ui/nll/issue-50461-used-mut-from-moves.rs +++ b/tests/ui/nll/issue-50461-used-mut-from-moves.rs @@ -1,4 +1,4 @@ -// run-pass +//@ run-pass #![deny(unused_mut)] #![allow(dead_code)] diff --git a/tests/ui/nll/issue-50716-1.rs b/tests/ui/nll/issue-50716-1.rs index 9c3e24de46e..b8ef3ab1475 100644 --- a/tests/ui/nll/issue-50716-1.rs +++ b/tests/ui/nll/issue-50716-1.rs @@ -3,7 +3,7 @@ // bounds derived from `Sized` requirementsā€ that checks that the fixed compiler // accepts this code fragment with both AST and MIR borrow checkers. // -// check-pass +//@ check-pass struct Qey(Q); diff --git a/tests/ui/nll/issue-51345-2.rs b/tests/ui/nll/issue-51345-2.rs index 77a944a7b7e..f2501fdbab4 100644 --- a/tests/ui/nll/issue-51345-2.rs +++ b/tests/ui/nll/issue-51345-2.rs @@ -1,7 +1,7 @@ -// run-fail -// error-pattern:thread 'main' panicked -// error-pattern:explicit panic -// ignore-emscripten no processes +//@ run-fail +//@ error-pattern:thread 'main' panicked +//@ error-pattern:explicit panic +//@ ignore-emscripten no processes fn main() { let mut vec = vec![]; diff --git a/tests/ui/nll/issue-51351.rs b/tests/ui/nll/issue-51351.rs index 591d49584ee..8b9fc9d6798 100644 --- a/tests/ui/nll/issue-51351.rs +++ b/tests/ui/nll/issue-51351.rs @@ -6,7 +6,7 @@ // of the closure, as they were not present in the closure's generic // declarations otherwise. // -// check-pass +//@ check-pass fn creash<'a>() { let x: &'a () = &(); diff --git a/tests/ui/nll/issue-51770.rs b/tests/ui/nll/issue-51770.rs index 3d6bc82f115..16772516a1e 100644 --- a/tests/ui/nll/issue-51770.rs +++ b/tests/ui/nll/issue-51770.rs @@ -1,4 +1,4 @@ -// check-pass +//@ check-pass #![crate_type = "lib"] diff --git a/tests/ui/nll/issue-52057.rs b/tests/ui/nll/issue-52057.rs index 5991c1104c8..fabee5b0d97 100644 --- a/tests/ui/nll/issue-52057.rs +++ b/tests/ui/nll/issue-52057.rs @@ -2,7 +2,7 @@ // that `I: 'x` where `'x` is the lifetime of the reference `&mut Self::Input` // in `parse_first`; but to observe that, one must normalize first. // -// run-pass +//@ run-pass pub trait Parser { type Input; diff --git a/tests/ui/nll/issue-52078.rs b/tests/ui/nll/issue-52078.rs index a2bcb91acf2..3ee2d358d60 100644 --- a/tests/ui/nll/issue-52078.rs +++ b/tests/ui/nll/issue-52078.rs @@ -2,7 +2,7 @@ // between `'a` and `'b` below due to inference variables introduced // during the normalization process. // -// check-pass +//@ check-pass struct Drain<'a, T: 'a> { _marker: ::std::marker::PhantomData<&'a T>, diff --git a/tests/ui/nll/issue-52992.rs b/tests/ui/nll/issue-52992.rs index 530d1a61b31..c5f466a306d 100644 --- a/tests/ui/nll/issue-52992.rs +++ b/tests/ui/nll/issue-52992.rs @@ -2,7 +2,7 @@ // implied bounds was causing outlives relations that were not // properly handled. // -// check-pass +//@ check-pass fn main() {} diff --git a/tests/ui/nll/issue-53119.rs b/tests/ui/nll/issue-53119.rs index d19a9a0327c..e7c97c854af 100644 --- a/tests/ui/nll/issue-53119.rs +++ b/tests/ui/nll/issue-53119.rs @@ -1,6 +1,6 @@ -// check-pass -// revisions: current next -//[next] compile-flags: -Znext-solver +//@ check-pass +//@ revisions: current next +//@[next] compile-flags: -Znext-solver use std::ops::Deref; diff --git a/tests/ui/nll/issue-53123-raw-pointer-cast.rs b/tests/ui/nll/issue-53123-raw-pointer-cast.rs index 941c9eeb411..e954a2c5ff5 100644 --- a/tests/ui/nll/issue-53123-raw-pointer-cast.rs +++ b/tests/ui/nll/issue-53123-raw-pointer-cast.rs @@ -1,4 +1,4 @@ -// run-pass +//@ run-pass #![allow(unused_variables)] diff --git a/tests/ui/nll/issue-53570.rs b/tests/ui/nll/issue-53570.rs index 35860ba9c21..882ce9e1c31 100644 --- a/tests/ui/nll/issue-53570.rs +++ b/tests/ui/nll/issue-53570.rs @@ -6,7 +6,7 @@ // parameter `x` -- since `'b` cannot be expressed in the caller's // space, that got promoted th `'static`. // -// check-pass +//@ check-pass use std::cell::{RefCell, Ref}; diff --git a/tests/ui/nll/issue-54943-3.rs b/tests/ui/nll/issue-54943-3.rs index 348b48dbabb..4286273a76d 100644 --- a/tests/ui/nll/issue-54943-3.rs +++ b/tests/ui/nll/issue-54943-3.rs @@ -1,4 +1,4 @@ -// check-pass +//@ check-pass // FIXME(#54943) This test targets the scenario where proving the WF requirements requires // knowing the value of the `_` type present in the user type annotation - unfortunately, figuring // out the value of that `_` requires type-checking the surrounding code, but that code is dead, diff --git a/tests/ui/nll/issue-55288.rs b/tests/ui/nll/issue-55288.rs index aab2dc267d5..3fe6db97e0b 100644 --- a/tests/ui/nll/issue-55288.rs +++ b/tests/ui/nll/issue-55288.rs @@ -1,4 +1,4 @@ -// check-pass +//@ check-pass struct Slice(&'static [&'static [u8]]); diff --git a/tests/ui/nll/issue-55344.rs b/tests/ui/nll/issue-55344.rs index 20f18dc465d..413ff897877 100644 --- a/tests/ui/nll/issue-55344.rs +++ b/tests/ui/nll/issue-55344.rs @@ -1,4 +1,4 @@ -// check-pass +//@ check-pass #![deny(unused_mut)] diff --git a/tests/ui/nll/issue-55651.rs b/tests/ui/nll/issue-55651.rs index 75ba4827174..3ecd0b2e93d 100644 --- a/tests/ui/nll/issue-55651.rs +++ b/tests/ui/nll/issue-55651.rs @@ -1,4 +1,4 @@ -// check-pass +//@ check-pass use std::mem::ManuallyDrop; diff --git a/tests/ui/nll/issue-55825-const-fn.rs b/tests/ui/nll/issue-55825-const-fn.rs index 8aaa1981360..35e51073d0d 100644 --- a/tests/ui/nll/issue-55825-const-fn.rs +++ b/tests/ui/nll/issue-55825-const-fn.rs @@ -1,7 +1,7 @@ // Regression test for issue #55825 // Tests that we don't emit a spurious warning in NLL mode -// check-pass +//@ check-pass const fn no_dyn_trait_ret() -> &'static dyn std::fmt::Debug { &() } diff --git a/tests/ui/nll/issue-57280-1.rs b/tests/ui/nll/issue-57280-1.rs index b8979624e50..23b7f0f41c3 100644 --- a/tests/ui/nll/issue-57280-1.rs +++ b/tests/ui/nll/issue-57280-1.rs @@ -1,4 +1,4 @@ -// check-pass +//@ check-pass trait Foo<'a> { const C: &'a u32; diff --git a/tests/ui/nll/issue-57280.rs b/tests/ui/nll/issue-57280.rs index b9d336ec395..6aa60b46505 100644 --- a/tests/ui/nll/issue-57280.rs +++ b/tests/ui/nll/issue-57280.rs @@ -1,4 +1,4 @@ -// check-pass +//@ check-pass trait Foo { const BLAH: &'static str; diff --git a/tests/ui/nll/issue-57960.rs b/tests/ui/nll/issue-57960.rs index 32e45184a91..f91427a8945 100644 --- a/tests/ui/nll/issue-57960.rs +++ b/tests/ui/nll/issue-57960.rs @@ -1,4 +1,4 @@ -// run-pass +//@ run-pass #![allow(dead_code)] diff --git a/tests/ui/nll/issue-61311-normalize.rs b/tests/ui/nll/issue-61311-normalize.rs index 77d67b07a40..862be8c120d 100644 --- a/tests/ui/nll/issue-61311-normalize.rs +++ b/tests/ui/nll/issue-61311-normalize.rs @@ -1,7 +1,7 @@ // Regression test for #61311 // We would ICE after failing to normalize `Self::Proj` in the `impl` below. -// check-pass +//@ check-pass pub struct Unit; trait Obj {} diff --git a/tests/ui/nll/issue-61320-normalize.rs b/tests/ui/nll/issue-61320-normalize.rs index 095bef03f7c..e5fc1d15464 100644 --- a/tests/ui/nll/issue-61320-normalize.rs +++ b/tests/ui/nll/issue-61320-normalize.rs @@ -1,7 +1,7 @@ // Regression test for #61320 // This is the same issue as #61311, just a larger test case. -// check-pass +//@ check-pass pub struct AndThen where diff --git a/tests/ui/nll/issue-61424.fixed b/tests/ui/nll/issue-61424.fixed index 63e00c1722e..5ea9d531e24 100644 --- a/tests/ui/nll/issue-61424.fixed +++ b/tests/ui/nll/issue-61424.fixed @@ -1,4 +1,4 @@ -// run-rustfix +//@ run-rustfix #![deny(unused_mut)] diff --git a/tests/ui/nll/issue-61424.rs b/tests/ui/nll/issue-61424.rs index 3b64996c27b..9c09bd6f1d1 100644 --- a/tests/ui/nll/issue-61424.rs +++ b/tests/ui/nll/issue-61424.rs @@ -1,4 +1,4 @@ -// run-rustfix +//@ run-rustfix #![deny(unused_mut)] diff --git a/tests/ui/nll/issue-63154-normalize.rs b/tests/ui/nll/issue-63154-normalize.rs index 484c12879d3..80546cde2e9 100644 --- a/tests/ui/nll/issue-63154-normalize.rs +++ b/tests/ui/nll/issue-63154-normalize.rs @@ -4,7 +4,7 @@ // when checking call destinations and also when checking MIR // assignment statements. -// check-pass +//@ check-pass trait HasAssocType { type Inner; diff --git a/tests/ui/nll/issue-78561.rs b/tests/ui/nll/issue-78561.rs index 1a2a3ca56c8..0c7366643c9 100644 --- a/tests/ui/nll/issue-78561.rs +++ b/tests/ui/nll/issue-78561.rs @@ -1,4 +1,4 @@ -// check-pass +//@ check-pass #![feature(impl_trait_in_assoc_type)] pub trait Trait { diff --git a/tests/ui/nll/issue-98589-closures-relate-named-regions.rs b/tests/ui/nll/issue-98589-closures-relate-named-regions.rs index 6cc4340bbd7..d058abd0772 100644 --- a/tests/ui/nll/issue-98589-closures-relate-named-regions.rs +++ b/tests/ui/nll/issue-98589-closures-relate-named-regions.rs @@ -3,7 +3,7 @@ // that appears in the parent function iff `'a` is early-bound. // This made the following tests pass borrowck. -// check-fail +//@ check-fail // The bound `'a: 'a` ensures that `'a` is early-bound. fn test_early_early<'a: 'a, 'b: 'b>() { diff --git a/tests/ui/nll/lint-no-err.rs b/tests/ui/nll/lint-no-err.rs index 2d1d5cb26d3..8fc17a470ad 100644 --- a/tests/ui/nll/lint-no-err.rs +++ b/tests/ui/nll/lint-no-err.rs @@ -1,4 +1,4 @@ -// check-pass +//@ check-pass // mir borrowck previously incorrectly set `tainted_by_errors` // when buffering lints, which resulted in ICE later on, diff --git a/tests/ui/nll/maybe-initialized-drop-uninitialized.rs b/tests/ui/nll/maybe-initialized-drop-uninitialized.rs index 32e07cd148f..fcbe1eb8150 100644 --- a/tests/ui/nll/maybe-initialized-drop-uninitialized.rs +++ b/tests/ui/nll/maybe-initialized-drop-uninitialized.rs @@ -1,4 +1,4 @@ -// check-pass +//@ check-pass #![allow(warnings)] diff --git a/tests/ui/nll/member-constraints/min-choice-reject-ambiguous.rs b/tests/ui/nll/member-constraints/min-choice-reject-ambiguous.rs index 52ea0f28d69..09138095523 100644 --- a/tests/ui/nll/member-constraints/min-choice-reject-ambiguous.rs +++ b/tests/ui/nll/member-constraints/min-choice-reject-ambiguous.rs @@ -1,6 +1,6 @@ // ... continued from ./min-choice.rs -// check-fail +//@ check-fail trait Cap<'a> {} impl Cap<'_> for T {} diff --git a/tests/ui/nll/member-constraints/min-choice.rs b/tests/ui/nll/member-constraints/min-choice.rs index f4aca69e19f..4fbffeb4b2a 100644 --- a/tests/ui/nll/member-constraints/min-choice.rs +++ b/tests/ui/nll/member-constraints/min-choice.rs @@ -5,7 +5,7 @@ // We will have to exclude `['b, 'c]` because they're incomparable, // and then we should pick `'a` because we know `'static: 'a`. -// check-pass +//@ check-pass trait Cap<'a> {} impl Cap<'_> for T {} diff --git a/tests/ui/nll/member-constraints/nested-impl-trait-fail.rs b/tests/ui/nll/member-constraints/nested-impl-trait-fail.rs index ceb417f84f3..d676c967f30 100644 --- a/tests/ui/nll/member-constraints/nested-impl-trait-fail.rs +++ b/tests/ui/nll/member-constraints/nested-impl-trait-fail.rs @@ -1,6 +1,6 @@ // Nested impl-traits can impose different member constraints on the same region variable. -// check-fail +//@ check-fail trait Cap<'a> {} impl Cap<'_> for T {} diff --git a/tests/ui/nll/member-constraints/nested-impl-trait-pass.rs b/tests/ui/nll/member-constraints/nested-impl-trait-pass.rs index 4be0f02acf2..4633ad68230 100644 --- a/tests/ui/nll/member-constraints/nested-impl-trait-pass.rs +++ b/tests/ui/nll/member-constraints/nested-impl-trait-pass.rs @@ -1,6 +1,6 @@ // Nested impl-traits can impose different member constraints on the same region variable. -// check-pass +//@ check-pass trait Cap<'a> {} impl Cap<'_> for T {} diff --git a/tests/ui/nll/missing-universe-cause-issue-114907.rs b/tests/ui/nll/missing-universe-cause-issue-114907.rs index 94acdccfcf2..9c69c6bdc36 100644 --- a/tests/ui/nll/missing-universe-cause-issue-114907.rs +++ b/tests/ui/nll/missing-universe-cause-issue-114907.rs @@ -6,7 +6,7 @@ // - a custom `Drop` is needed somewhere in the type that `accept` returns, to create universes // during liveness and dropck outlives computation -// check-fail +//@ check-fail trait Role { type Inner; diff --git a/tests/ui/nll/mutating_references.rs b/tests/ui/nll/mutating_references.rs index eb46b30b6b9..262adaeaa26 100644 --- a/tests/ui/nll/mutating_references.rs +++ b/tests/ui/nll/mutating_references.rs @@ -1,4 +1,4 @@ -// run-pass +//@ run-pass struct List { value: T, diff --git a/tests/ui/nll/normalization-bounds.rs b/tests/ui/nll/normalization-bounds.rs index bb6d981e013..f7636f3ad09 100644 --- a/tests/ui/nll/normalization-bounds.rs +++ b/tests/ui/nll/normalization-bounds.rs @@ -1,6 +1,6 @@ // Check that lifetime bounds get checked the right way around with NLL enabled. -// check-pass +//@ check-pass trait Visitor<'d> { type Value; diff --git a/tests/ui/nll/polonius/assignment-kills-loans.rs b/tests/ui/nll/polonius/assignment-kills-loans.rs index 696bf61cefd..182262e5c4b 100644 --- a/tests/ui/nll/polonius/assignment-kills-loans.rs +++ b/tests/ui/nll/polonius/assignment-kills-loans.rs @@ -4,8 +4,8 @@ // facts only on simple assignments, but not projections, incorrectly causing errors to be emitted // for code accepted by NLL. They are all variations from example code in the NLL RFC. -// check-pass -// compile-flags: -Z polonius +//@ check-pass +//@ compile-flags: -Z polonius struct List { value: T, diff --git a/tests/ui/nll/polonius/assignment-to-differing-field.rs b/tests/ui/nll/polonius/assignment-to-differing-field.rs index 7ec3b9049fd..fb6c9569525 100644 --- a/tests/ui/nll/polonius/assignment-to-differing-field.rs +++ b/tests/ui/nll/polonius/assignment-to-differing-field.rs @@ -4,7 +4,7 @@ // that we do not kill too many borrows. Assignments to the `.1` // field projections should leave the borrows on `.0` intact. -// compile-flags: -Z polonius +//@ compile-flags: -Z polonius struct List { value: T, diff --git a/tests/ui/nll/polonius/call-kills-loans.rs b/tests/ui/nll/polonius/call-kills-loans.rs index f430e9211e7..c02293c9a78 100644 --- a/tests/ui/nll/polonius/call-kills-loans.rs +++ b/tests/ui/nll/polonius/call-kills-loans.rs @@ -4,8 +4,8 @@ // by NLL but was incorrectly rejected by Polonius because of these // missing `killed` facts. -// check-pass -// compile-flags: -Z polonius +//@ check-pass +//@ compile-flags: -Z polonius struct Thing; diff --git a/tests/ui/nll/polonius/issue-46589.rs b/tests/ui/nll/polonius/issue-46589.rs index 648280a1dcd..af791f7e24d 100644 --- a/tests/ui/nll/polonius/issue-46589.rs +++ b/tests/ui/nll/polonius/issue-46589.rs @@ -2,8 +2,8 @@ // As we can't have a test here which conditionally passes depending on a test // revision/compile-flags. We ensure here that it passes in Polonius mode. -// check-pass -// compile-flags: -Z polonius +//@ check-pass +//@ compile-flags: -Z polonius struct Foo; diff --git a/tests/ui/nll/polonius/location-insensitive-scopes-issue-116657.rs b/tests/ui/nll/polonius/location-insensitive-scopes-issue-116657.rs index ec17e0b093b..73626271b29 100644 --- a/tests/ui/nll/polonius/location-insensitive-scopes-issue-116657.rs +++ b/tests/ui/nll/polonius/location-insensitive-scopes-issue-116657.rs @@ -1,8 +1,8 @@ // This is a non-regression test for issue #116657, where NLL and `-Zpolonius=next` computed // different loan scopes when a member constraint was not ultimately applied. -// revisions: nll polonius -// [polonius] compile-flags: -Zpolonius=next +//@ revisions: nll polonius +//@ [polonius] compile-flags: -Zpolonius=next #![feature(impl_trait_in_assoc_type)] diff --git a/tests/ui/nll/polonius/location-insensitive-scopes-issue-117146.rs b/tests/ui/nll/polonius/location-insensitive-scopes-issue-117146.rs index c165e7a1d1a..c828a37521e 100644 --- a/tests/ui/nll/polonius/location-insensitive-scopes-issue-117146.rs +++ b/tests/ui/nll/polonius/location-insensitive-scopes-issue-117146.rs @@ -2,8 +2,8 @@ // different loan scopes when a region flowed into an SCC whose representative was an existential // region. -// revisions: nll polonius -// [polonius] compile-flags: -Zpolonius=next +//@ revisions: nll polonius +//@ [polonius] compile-flags: -Zpolonius=next fn main() { let a = (); diff --git a/tests/ui/nll/polonius/location-insensitive-scopes-liveness.rs b/tests/ui/nll/polonius/location-insensitive-scopes-liveness.rs index 5fabf31cecd..cb56c8f6deb 100644 --- a/tests/ui/nll/polonius/location-insensitive-scopes-liveness.rs +++ b/tests/ui/nll/polonius/location-insensitive-scopes-liveness.rs @@ -5,9 +5,9 @@ // than `liveness::trace`, on some specific CFGs shapes: a variable was dead during tracing but its // regions were marked live later, and live loans were not recomputed at this point. -// check-pass -// revisions: nll polonius -// [polonius] compile-flags: -Zpolonius=next +//@ check-pass +//@ revisions: nll polonius +//@ [polonius] compile-flags: -Zpolonius=next // minimized from wavefc-cli-3.0.0 fn repro1() { diff --git a/tests/ui/nll/polonius/polonius-smoke-test.rs b/tests/ui/nll/polonius/polonius-smoke-test.rs index c4344af7175..ea5cdb263f5 100644 --- a/tests/ui/nll/polonius/polonius-smoke-test.rs +++ b/tests/ui/nll/polonius/polonius-smoke-test.rs @@ -1,5 +1,5 @@ // Check that Polonius borrow check works for simple cases. -// compile-flags: -Z polonius +//@ compile-flags: -Z polonius pub fn return_ref_to_local() -> &'static i32 { let x = 0; diff --git a/tests/ui/nll/polonius/storagedead-kills-loans.rs b/tests/ui/nll/polonius/storagedead-kills-loans.rs index 669e077dea4..89cf919bb48 100644 --- a/tests/ui/nll/polonius/storagedead-kills-loans.rs +++ b/tests/ui/nll/polonius/storagedead-kills-loans.rs @@ -3,8 +3,8 @@ // is correctly accepted by NLL but was incorrectly rejected by // Polonius because of these missing `killed` facts. -// check-pass -// compile-flags: -Z polonius +//@ check-pass +//@ compile-flags: -Z polonius use std::{io, mem}; use std::io::Read; diff --git a/tests/ui/nll/polonius/subset-relations.rs b/tests/ui/nll/polonius/subset-relations.rs index f223ab177b5..3c1af1983cf 100644 --- a/tests/ui/nll/polonius/subset-relations.rs +++ b/tests/ui/nll/polonius/subset-relations.rs @@ -3,7 +3,7 @@ // two free regions outlive each other, without any evidence that this // relation holds. -// compile-flags: -Z polonius +//@ compile-flags: -Z polonius // returning `y` requires that `'b: 'a`, but it's not known to be true fn missing_subset<'a, 'b>(x: &'a u32, y: &'b u32) -> &'a u32 { diff --git a/tests/ui/nll/process_or_insert_default.rs b/tests/ui/nll/process_or_insert_default.rs index 84ac9bbd0dd..f2f1770718e 100644 --- a/tests/ui/nll/process_or_insert_default.rs +++ b/tests/ui/nll/process_or_insert_default.rs @@ -1,4 +1,4 @@ -// run-pass +//@ run-pass use std::collections::HashMap; diff --git a/tests/ui/nll/projection-return.rs b/tests/ui/nll/projection-return.rs index be141339a3f..8ca2a627ecc 100644 --- a/tests/ui/nll/projection-return.rs +++ b/tests/ui/nll/projection-return.rs @@ -1,4 +1,4 @@ -// check-pass +//@ check-pass #![feature(rustc_attrs)] diff --git a/tests/ui/nll/promotable-mutable-zst-doesnt-conflict.rs b/tests/ui/nll/promotable-mutable-zst-doesnt-conflict.rs index 3b06b0db370..0d210c024c7 100644 --- a/tests/ui/nll/promotable-mutable-zst-doesnt-conflict.rs +++ b/tests/ui/nll/promotable-mutable-zst-doesnt-conflict.rs @@ -1,7 +1,7 @@ // Check that mutable promoted length zero arrays don't check for conflicting // access -// check-pass +//@ check-pass pub fn main() { let mut x: Vec<&[i32; 0]> = Vec::new(); diff --git a/tests/ui/nll/promoted-liveness.rs b/tests/ui/nll/promoted-liveness.rs index e5a8e1e5c2f..dee95f2ef2d 100644 --- a/tests/ui/nll/promoted-liveness.rs +++ b/tests/ui/nll/promoted-liveness.rs @@ -1,7 +1,7 @@ // Test that promoted that have larger mir bodies than their containing function // don't cause an ICE. -// check-pass +//@ check-pass fn main() { &["0", "1", "2", "3", "4", "5", "6", "7"]; diff --git a/tests/ui/nll/rc-loop.rs b/tests/ui/nll/rc-loop.rs index e59303d1f78..f2c51b84394 100644 --- a/tests/ui/nll/rc-loop.rs +++ b/tests/ui/nll/rc-loop.rs @@ -1,4 +1,4 @@ -// run-pass +//@ run-pass // A test for something that NLL enables. It sometimes happens that // the `while let` pattern makes some borrows from a variable (in this diff --git a/tests/ui/nll/relate_tys/fn-subtype.rs b/tests/ui/nll/relate_tys/fn-subtype.rs index ba89fa19ca6..1926515ce18 100644 --- a/tests/ui/nll/relate_tys/fn-subtype.rs +++ b/tests/ui/nll/relate_tys/fn-subtype.rs @@ -1,6 +1,6 @@ // Test that NLL produces correct spans for higher-ranked subtyping errors. // -// compile-flags:-Zno-leak-check +//@ compile-flags:-Zno-leak-check fn main() { let x: fn(&'static ()) = |_| {}; diff --git a/tests/ui/nll/relate_tys/hr-fn-aaa-as-aba.rs b/tests/ui/nll/relate_tys/hr-fn-aaa-as-aba.rs index 7891bab092b..d2672072cd5 100644 --- a/tests/ui/nll/relate_tys/hr-fn-aaa-as-aba.rs +++ b/tests/ui/nll/relate_tys/hr-fn-aaa-as-aba.rs @@ -2,7 +2,7 @@ // function returning either argument CANNOT be upcast to one // that returns always its first argument. // -// compile-flags:-Zno-leak-check +//@ compile-flags:-Zno-leak-check fn make_it() -> for<'a> fn(&'a u32, &'a u32) -> &'a u32 { panic!() diff --git a/tests/ui/nll/relate_tys/hr-fn-aau-eq-abu.rs b/tests/ui/nll/relate_tys/hr-fn-aau-eq-abu.rs index 92730341c11..039ca1fb58d 100644 --- a/tests/ui/nll/relate_tys/hr-fn-aau-eq-abu.rs +++ b/tests/ui/nll/relate_tys/hr-fn-aau-eq-abu.rs @@ -6,8 +6,8 @@ // another -- effectively, the single lifetime `'a` is just inferred // to be the intersection of the two distinct lifetimes. // -// check-pass -// compile-flags:-Zno-leak-check +//@ check-pass +//@ compile-flags:-Zno-leak-check use std::cell::Cell; diff --git a/tests/ui/nll/relate_tys/hr-fn-aba-as-aaa.rs b/tests/ui/nll/relate_tys/hr-fn-aba-as-aaa.rs index 2e9eff59386..637c2af6183 100644 --- a/tests/ui/nll/relate_tys/hr-fn-aba-as-aaa.rs +++ b/tests/ui/nll/relate_tys/hr-fn-aba-as-aaa.rs @@ -2,8 +2,8 @@ // function returning always its first argument can be upcast to one // that returns either first or second argument. // -// check-pass -// compile-flags:-Zno-leak-check +//@ check-pass +//@ compile-flags:-Zno-leak-check #![allow(dropping_copy_types)] diff --git a/tests/ui/nll/relate_tys/impl-fn-ignore-binder-via-bottom.rs b/tests/ui/nll/relate_tys/impl-fn-ignore-binder-via-bottom.rs index 05e2ea047f6..1b2c359afc9 100644 --- a/tests/ui/nll/relate_tys/impl-fn-ignore-binder-via-bottom.rs +++ b/tests/ui/nll/relate_tys/impl-fn-ignore-binder-via-bottom.rs @@ -11,7 +11,7 @@ // // c.f. Issue #57642. // -// compile-flags:-Zno-leak-check +//@ compile-flags:-Zno-leak-check trait Y { type F; diff --git a/tests/ui/nll/relate_tys/issue-48071.rs b/tests/ui/nll/relate_tys/issue-48071.rs index 73361a0d319..9013dc77cc1 100644 --- a/tests/ui/nll/relate_tys/issue-48071.rs +++ b/tests/ui/nll/relate_tys/issue-48071.rs @@ -4,7 +4,7 @@ // placeholder region, but in NLL land it would fail because we had // rewritten `'static` to a region variable. // -// check-pass +//@ check-pass trait Foo { fn foo(&self) { } diff --git a/tests/ui/nll/relate_tys/trait-hrtb.rs b/tests/ui/nll/relate_tys/trait-hrtb.rs index 7f40e93cd87..f7e2a67356c 100644 --- a/tests/ui/nll/relate_tys/trait-hrtb.rs +++ b/tests/ui/nll/relate_tys/trait-hrtb.rs @@ -1,6 +1,6 @@ // Test that NLL generates proper error spans for trait HRTB errors // -// compile-flags:-Zno-leak-check +//@ compile-flags:-Zno-leak-check trait Foo<'a> {} diff --git a/tests/ui/nll/relate_tys/universe-violation.rs b/tests/ui/nll/relate_tys/universe-violation.rs index c5f9d4406e2..a4e6b2d18a3 100644 --- a/tests/ui/nll/relate_tys/universe-violation.rs +++ b/tests/ui/nll/relate_tys/universe-violation.rs @@ -2,7 +2,7 @@ // function returning either argument CANNOT be upcast to one // that returns always its first argument. // -// compile-flags:-Zno-leak-check +//@ compile-flags:-Zno-leak-check fn make_it() -> fn(&'static u32) -> &'static u32 { panic!() diff --git a/tests/ui/nll/self-assign-ref-mut.rs b/tests/ui/nll/self-assign-ref-mut.rs index 1ca4cf3a775..1ad005e1af3 100644 --- a/tests/ui/nll/self-assign-ref-mut.rs +++ b/tests/ui/nll/self-assign-ref-mut.rs @@ -1,6 +1,6 @@ // Check that `*y` isn't borrowed after `y = y`. -// check-pass +//@ check-pass fn main() { let mut x = 1; diff --git a/tests/ui/nll/ty-outlives/impl-trait-captures.rs b/tests/ui/nll/ty-outlives/impl-trait-captures.rs index faab2cf8bcb..57e2eb24cc1 100644 --- a/tests/ui/nll/ty-outlives/impl-trait-captures.rs +++ b/tests/ui/nll/ty-outlives/impl-trait-captures.rs @@ -1,4 +1,4 @@ -// compile-flags:-Zverbose-internals +//@ compile-flags:-Zverbose-internals #![allow(warnings)] diff --git a/tests/ui/nll/ty-outlives/impl-trait-outlives.rs b/tests/ui/nll/ty-outlives/impl-trait-outlives.rs index 2c2eb703a15..49c4e34c43a 100644 --- a/tests/ui/nll/ty-outlives/impl-trait-outlives.rs +++ b/tests/ui/nll/ty-outlives/impl-trait-outlives.rs @@ -1,4 +1,4 @@ -// compile-flags:-Zverbose-internals +//@ compile-flags:-Zverbose-internals #![allow(warnings)] diff --git a/tests/ui/nll/ty-outlives/issue-53789-1.rs b/tests/ui/nll/ty-outlives/issue-53789-1.rs index a5201d4bbe8..7672ef80a17 100644 --- a/tests/ui/nll/ty-outlives/issue-53789-1.rs +++ b/tests/ui/nll/ty-outlives/issue-53789-1.rs @@ -1,6 +1,6 @@ // Regression test for #53789. // -// check-pass +//@ check-pass use std::collections::BTreeMap; diff --git a/tests/ui/nll/ty-outlives/issue-53789-2.rs b/tests/ui/nll/ty-outlives/issue-53789-2.rs index 5109a0e4a68..5a5c9cf1c76 100644 --- a/tests/ui/nll/ty-outlives/issue-53789-2.rs +++ b/tests/ui/nll/ty-outlives/issue-53789-2.rs @@ -1,6 +1,6 @@ // Regression test for #53789. // -// check-pass +//@ check-pass use std::cmp::Ord; use std::collections::BTreeMap; diff --git a/tests/ui/nll/ty-outlives/issue-55756.rs b/tests/ui/nll/ty-outlives/issue-55756.rs index e1a3bc3c4eb..5f96b86c464 100644 --- a/tests/ui/nll/ty-outlives/issue-55756.rs +++ b/tests/ui/nll/ty-outlives/issue-55756.rs @@ -16,7 +16,7 @@ // Fixed by tweaking the solver to recognize that the constraint from // the environment duplicates one from the trait. // -// check-pass +//@ check-pass #![crate_type="lib"] diff --git a/tests/ui/nll/ty-outlives/projection-body.rs b/tests/ui/nll/ty-outlives/projection-body.rs index 722d6747102..74c80c04a99 100644 --- a/tests/ui/nll/ty-outlives/projection-body.rs +++ b/tests/ui/nll/ty-outlives/projection-body.rs @@ -1,7 +1,7 @@ // Test that when we infer the lifetime to a subset of the fn body, it // works out. // -// check-pass +//@ check-pass #![allow(dropping_references)] diff --git a/tests/ui/nll/ty-outlives/projection-implied-bounds.rs b/tests/ui/nll/ty-outlives/projection-implied-bounds.rs index 59854fe6d8a..7d983adfe88 100644 --- a/tests/ui/nll/ty-outlives/projection-implied-bounds.rs +++ b/tests/ui/nll/ty-outlives/projection-implied-bounds.rs @@ -1,7 +1,7 @@ // Test that we can deduce when projections like `T::Item` outlive the // function body. Test that this does not imply that `T: 'a` holds. -// compile-flags:-Zverbose-internals +//@ compile-flags:-Zverbose-internals use std::cell::Cell; diff --git a/tests/ui/nll/ty-outlives/projection-no-regions-closure.rs b/tests/ui/nll/ty-outlives/projection-no-regions-closure.rs index f908381d4ac..16efe1a4a9a 100644 --- a/tests/ui/nll/ty-outlives/projection-no-regions-closure.rs +++ b/tests/ui/nll/ty-outlives/projection-no-regions-closure.rs @@ -1,4 +1,4 @@ -// compile-flags:-Zverbose-internals +//@ compile-flags:-Zverbose-internals // Tests closures that propagate an outlives relationship to their // creator where the subject is a projection with no regions (` { type Output; diff --git a/tests/ui/nll/ty-outlives/projection-where-clause-trait.rs b/tests/ui/nll/ty-outlives/projection-where-clause-trait.rs index 1a40d3b4c2f..ad8cdd37baf 100644 --- a/tests/ui/nll/ty-outlives/projection-where-clause-trait.rs +++ b/tests/ui/nll/ty-outlives/projection-where-clause-trait.rs @@ -2,7 +2,7 @@ // MyTrait<'a>>::Output: 'a` outlives `'a` (because the trait says // so). // -// check-pass +//@ check-pass trait MyTrait<'a> { type Output: 'a; diff --git a/tests/ui/nll/ty-outlives/ty-param-closure-approximate-lower-bound.rs b/tests/ui/nll/ty-outlives/ty-param-closure-approximate-lower-bound.rs index 56485593c92..0583fc72eaf 100644 --- a/tests/ui/nll/ty-outlives/ty-param-closure-approximate-lower-bound.rs +++ b/tests/ui/nll/ty-outlives/ty-param-closure-approximate-lower-bound.rs @@ -1,4 +1,4 @@ -// compile-flags:-Zverbose-internals +//@ compile-flags:-Zverbose-internals #![allow(warnings)] #![feature(rustc_attrs)] diff --git a/tests/ui/nll/ty-outlives/ty-param-closure-outlives-from-return-type.rs b/tests/ui/nll/ty-outlives/ty-param-closure-outlives-from-return-type.rs index 9695400c400..9c0785cc964 100644 --- a/tests/ui/nll/ty-outlives/ty-param-closure-outlives-from-return-type.rs +++ b/tests/ui/nll/ty-outlives/ty-param-closure-outlives-from-return-type.rs @@ -1,4 +1,4 @@ -// compile-flags:-Zverbose-internals +//@ compile-flags:-Zverbose-internals #![allow(warnings)] #![feature(rustc_attrs)] diff --git a/tests/ui/nll/ty-outlives/ty-param-closure-outlives-from-where-clause.rs b/tests/ui/nll/ty-outlives/ty-param-closure-outlives-from-where-clause.rs index 9e69792d724..8f415a5fd7b 100644 --- a/tests/ui/nll/ty-outlives/ty-param-closure-outlives-from-where-clause.rs +++ b/tests/ui/nll/ty-outlives/ty-param-closure-outlives-from-where-clause.rs @@ -2,7 +2,7 @@ // `correct_region` for an explanation of how this test is setup; it's // somewhat intricate. -// compile-flags:-Zverbose-internals +//@ compile-flags:-Zverbose-internals #![allow(warnings)] #![feature(rustc_attrs)] diff --git a/tests/ui/nll/ty-outlives/ty-param-implied-bounds.rs b/tests/ui/nll/ty-outlives/ty-param-implied-bounds.rs index 145ae0d735b..520be5b91ec 100644 --- a/tests/ui/nll/ty-outlives/ty-param-implied-bounds.rs +++ b/tests/ui/nll/ty-outlives/ty-param-implied-bounds.rs @@ -1,5 +1,5 @@ -// compile-flags:-Zverbose-internals -// check-pass +//@ compile-flags:-Zverbose-internals +//@ check-pass // Test that we assume that universal types like `T` outlive the // function body. diff --git a/tests/ui/nll/unused-mut-issue-50343.fixed b/tests/ui/nll/unused-mut-issue-50343.fixed index 5632de1cd34..827a90d646f 100644 --- a/tests/ui/nll/unused-mut-issue-50343.fixed +++ b/tests/ui/nll/unused-mut-issue-50343.fixed @@ -1,4 +1,4 @@ -// run-rustfix +//@ run-rustfix #![deny(unused_mut)] #![allow(unused_variables)] // for rustfix diff --git a/tests/ui/nll/unused-mut-issue-50343.rs b/tests/ui/nll/unused-mut-issue-50343.rs index c849ac8c79e..d63823ae1f7 100644 --- a/tests/ui/nll/unused-mut-issue-50343.rs +++ b/tests/ui/nll/unused-mut-issue-50343.rs @@ -1,4 +1,4 @@ -// run-rustfix +//@ run-rustfix #![deny(unused_mut)] #![allow(unused_variables)] // for rustfix diff --git a/tests/ui/nll/user-annotations/ascribed-type-wf.rs b/tests/ui/nll/user-annotations/ascribed-type-wf.rs index 5db02c46ec3..ba79085ae86 100644 --- a/tests/ui/nll/user-annotations/ascribed-type-wf.rs +++ b/tests/ui/nll/user-annotations/ascribed-type-wf.rs @@ -1,5 +1,5 @@ // Regression test for #101350. -// check-fail +//@ check-fail trait Trait { type Ty; diff --git a/tests/ui/nll/user-annotations/closure-sig.rs b/tests/ui/nll/user-annotations/closure-sig.rs index 4dbd3fd8d81..ef2300b99b0 100644 --- a/tests/ui/nll/user-annotations/closure-sig.rs +++ b/tests/ui/nll/user-annotations/closure-sig.rs @@ -1,6 +1,6 @@ // This test fails if #104478 is fixed before #104477. -// check-pass +//@ check-pass struct Printer<'a, 'b>(&'a (), &'b ()); diff --git a/tests/ui/nll/user-annotations/downcast-infer.rs b/tests/ui/nll/user-annotations/downcast-infer.rs index b27429f4d19..0c6e0140d7a 100644 --- a/tests/ui/nll/user-annotations/downcast-infer.rs +++ b/tests/ui/nll/user-annotations/downcast-infer.rs @@ -1,4 +1,4 @@ -// check-pass +//@ check-pass // Check that we don't try to downcast `_` when type-checking the annotation. fn main() { diff --git a/tests/ui/nll/user-annotations/dump-adt-brace-struct.rs b/tests/ui/nll/user-annotations/dump-adt-brace-struct.rs index 36a16c8dcc6..9a6587a9a74 100644 --- a/tests/ui/nll/user-annotations/dump-adt-brace-struct.rs +++ b/tests/ui/nll/user-annotations/dump-adt-brace-struct.rs @@ -1,7 +1,7 @@ // Unit test for the "user substitutions" that are annotated on each // node. -// compile-flags:-Zverbose-internals +//@ compile-flags:-Zverbose-internals #![allow(warnings)] #![feature(rustc_attrs)] diff --git a/tests/ui/nll/user-annotations/dump-fn-method.rs b/tests/ui/nll/user-annotations/dump-fn-method.rs index 086b2d2f6fc..40e705ac538 100644 --- a/tests/ui/nll/user-annotations/dump-fn-method.rs +++ b/tests/ui/nll/user-annotations/dump-fn-method.rs @@ -1,7 +1,7 @@ // Unit test for the "user substitutions" that are annotated on each // node. -// compile-flags:-Zverbose-internals +//@ compile-flags:-Zverbose-internals #![feature(rustc_attrs)] diff --git a/tests/ui/nll/user-annotations/issue-54570-bootstrapping.rs b/tests/ui/nll/user-annotations/issue-54570-bootstrapping.rs index ff5b2244e48..433fa51fe09 100644 --- a/tests/ui/nll/user-annotations/issue-54570-bootstrapping.rs +++ b/tests/ui/nll/user-annotations/issue-54570-bootstrapping.rs @@ -1,4 +1,4 @@ -// check-pass +//@ check-pass // This test is reduced from a scenario pnkfelix encountered while // bootstrapping the compiler. diff --git a/tests/ui/nll/user-annotations/issue-55219.rs b/tests/ui/nll/user-annotations/issue-55219.rs index 14741366389..70ffb474041 100644 --- a/tests/ui/nll/user-annotations/issue-55219.rs +++ b/tests/ui/nll/user-annotations/issue-55219.rs @@ -3,7 +3,7 @@ // The `Self::HASH_LEN` here expands to a "self-type" where `T` is not // known. This unbound inference variable was causing an ICE. // -// check-pass +//@ check-pass pub struct Foo(T); diff --git a/tests/ui/nll/user-annotations/issue-55241.rs b/tests/ui/nll/user-annotations/issue-55241.rs index 29969c7b4c6..094f8da2452 100644 --- a/tests/ui/nll/user-annotations/issue-55241.rs +++ b/tests/ui/nll/user-annotations/issue-55241.rs @@ -5,7 +5,7 @@ // value of `_`; solving that requires having normalized, so we can // test against `C: NodeCodec` in the environment. // -// run-pass +//@ run-pass pub trait Hasher { type Out: Eq; diff --git a/tests/ui/nll/user-annotations/normalization-2.rs b/tests/ui/nll/user-annotations/normalization-2.rs index be23c3b7478..dddba2265c6 100644 --- a/tests/ui/nll/user-annotations/normalization-2.rs +++ b/tests/ui/nll/user-annotations/normalization-2.rs @@ -1,6 +1,6 @@ // Make sure we honor region constraints when normalizing type annotations. -// check-fail +//@ check-fail #![feature(more_qualified_paths)] diff --git a/tests/ui/nll/user-annotations/normalization-default.rs b/tests/ui/nll/user-annotations/normalization-default.rs index fa52e6d857f..716211e4371 100644 --- a/tests/ui/nll/user-annotations/normalization-default.rs +++ b/tests/ui/nll/user-annotations/normalization-default.rs @@ -1,4 +1,4 @@ -// check-fail +//@ check-fail trait Trait { type Assoc; } impl<'a> Trait for &'a () { type Assoc = &'a (); } diff --git a/tests/ui/nll/user-annotations/normalization-infer.rs b/tests/ui/nll/user-annotations/normalization-infer.rs index 8bfc272d4ba..574ae5650ff 100644 --- a/tests/ui/nll/user-annotations/normalization-infer.rs +++ b/tests/ui/nll/user-annotations/normalization-infer.rs @@ -1,7 +1,7 @@ // Annnotations may contain projection types with inference variables as input. // Make sure we don't get ambiguities when normalizing them. -// check-fail +//@ check-fail // Single impl. fn test1(a: A, b: B, c: C) { diff --git a/tests/ui/nll/user-annotations/normalization-self.rs b/tests/ui/nll/user-annotations/normalization-self.rs index c18760b53cf..ebe12b248e8 100644 --- a/tests/ui/nll/user-annotations/normalization-self.rs +++ b/tests/ui/nll/user-annotations/normalization-self.rs @@ -1,4 +1,4 @@ -// check-fail +//@ check-fail trait Trait { type Assoc; } impl<'a> Trait for &'a () { type Assoc = &'a (); } diff --git a/tests/ui/nll/user-annotations/normalize-self-ty.rs b/tests/ui/nll/user-annotations/normalize-self-ty.rs index df905c8786a..4ce68902d5d 100644 --- a/tests/ui/nll/user-annotations/normalize-self-ty.rs +++ b/tests/ui/nll/user-annotations/normalize-self-ty.rs @@ -2,7 +2,7 @@ // the inherent impl requires normalization to be equal to the // user-provided type. // -// check-pass +//@ check-pass trait Mirror { type Me; diff --git a/tests/ui/nll/user-annotations/type-annotation-with-hrtb.rs b/tests/ui/nll/user-annotations/type-annotation-with-hrtb.rs index 1f7c060386b..9e4234a701d 100644 --- a/tests/ui/nll/user-annotations/type-annotation-with-hrtb.rs +++ b/tests/ui/nll/user-annotations/type-annotation-with-hrtb.rs @@ -1,6 +1,6 @@ // Regression test for issue #69490 -// check-pass +//@ check-pass pub trait Trait { const S: &'static str; diff --git a/tests/ui/nll/vimwiki-core-regression.rs b/tests/ui/nll/vimwiki-core-regression.rs index 0a4ed7e0a40..f06b40a9a96 100644 --- a/tests/ui/nll/vimwiki-core-regression.rs +++ b/tests/ui/nll/vimwiki-core-regression.rs @@ -1,4 +1,4 @@ -// check-pass +//@ check-pass // // Regression test from crater run for // . diff --git a/tests/ui/no-capture-arc.rs b/tests/ui/no-capture-arc.rs index 3f0b075778b..aafb170c7e1 100644 --- a/tests/ui/no-capture-arc.rs +++ b/tests/ui/no-capture-arc.rs @@ -1,4 +1,4 @@ -// error-pattern: borrow of moved value +//@ error-pattern: borrow of moved value use std::sync::Arc; use std::thread; diff --git a/tests/ui/no-core-1.rs b/tests/ui/no-core-1.rs index 9374f546ac9..d6d2ba60445 100644 --- a/tests/ui/no-core-1.rs +++ b/tests/ui/no-core-1.rs @@ -1,4 +1,4 @@ -// run-pass +//@ run-pass #![allow(stable_features)] #![feature(no_core, core)] diff --git a/tests/ui/no-core-2.rs b/tests/ui/no-core-2.rs index b08e63dc7cf..2f55365bdd0 100644 --- a/tests/ui/no-core-2.rs +++ b/tests/ui/no-core-2.rs @@ -1,9 +1,9 @@ -// run-pass +//@ run-pass #![allow(dead_code, unused_imports)] #![feature(no_core)] #![no_core] -// edition:2018 +//@ edition:2018 extern crate std; extern crate core; diff --git a/tests/ui/no-warn-on-field-replace-issue-34101.rs b/tests/ui/no-warn-on-field-replace-issue-34101.rs index 15df6d25c5d..e1d5e9c5268 100644 --- a/tests/ui/no-warn-on-field-replace-issue-34101.rs +++ b/tests/ui/no-warn-on-field-replace-issue-34101.rs @@ -18,7 +18,7 @@ -// check-pass +//@ check-pass struct Foo(String); diff --git a/tests/ui/no_std/no-std-no-start-binary.rs b/tests/ui/no_std/no-std-no-start-binary.rs index ce1c871f6a6..5c8a0e6c0b8 100644 --- a/tests/ui/no_std/no-std-no-start-binary.rs +++ b/tests/ui/no_std/no-std-no-start-binary.rs @@ -1,5 +1,5 @@ -// compile-flags: -Cpanic=abort --emit link -// error-pattern:using `fn main` requires the standard library +//@ compile-flags: -Cpanic=abort --emit link +//@ error-pattern:using `fn main` requires the standard library // Make sure that we don't emit an error message mentioning internal lang items. diff --git a/tests/ui/no_std/no-std-unwind-binary.rs b/tests/ui/no_std/no-std-unwind-binary.rs index 7a9dfd7a48d..74c80d75c3e 100644 --- a/tests/ui/no_std/no-std-unwind-binary.rs +++ b/tests/ui/no_std/no-std-unwind-binary.rs @@ -1,6 +1,6 @@ -// error-pattern:unwinding panics are not supported without std -// needs-unwind -// compile-flags: -Cpanic=unwind +//@ error-pattern:unwinding panics are not supported without std +//@ needs-unwind +//@ compile-flags: -Cpanic=unwind // Make sure that we don't emit an error message mentioning internal lang items. diff --git a/tests/ui/noexporttypeexe.rs b/tests/ui/noexporttypeexe.rs index d473ad6c9c9..6b4402a81f0 100644 --- a/tests/ui/noexporttypeexe.rs +++ b/tests/ui/noexporttypeexe.rs @@ -1,4 +1,4 @@ -// aux-build:noexporttypelib.rs +//@ aux-build:noexporttypelib.rs extern crate noexporttypelib; diff --git a/tests/ui/non-copyable-void.rs b/tests/ui/non-copyable-void.rs index ddaaee436ae..8089f5e2218 100644 --- a/tests/ui/non-copyable-void.rs +++ b/tests/ui/non-copyable-void.rs @@ -1,4 +1,4 @@ -// ignore-wasm32-bare no libc to test ffi with +//@ ignore-wasm32-bare no libc to test ffi with #![feature(rustc_private)] diff --git a/tests/ui/non-fmt-panic.fixed b/tests/ui/non-fmt-panic.fixed index 5191f1877a9..fa9a1ad89bd 100644 --- a/tests/ui/non-fmt-panic.fixed +++ b/tests/ui/non-fmt-panic.fixed @@ -1,7 +1,7 @@ -// run-rustfix -// rustfix-only-machine-applicable -// build-pass (FIXME(62277): should be check-pass) -// aux-build:fancy-panic.rs +//@ run-rustfix +//@ rustfix-only-machine-applicable +//@ build-pass (FIXME(62277): should be check-pass) +//@ aux-build:fancy-panic.rs extern crate fancy_panic; diff --git a/tests/ui/non-fmt-panic.rs b/tests/ui/non-fmt-panic.rs index d0d06b79775..451a0c76018 100644 --- a/tests/ui/non-fmt-panic.rs +++ b/tests/ui/non-fmt-panic.rs @@ -1,7 +1,7 @@ -// run-rustfix -// rustfix-only-machine-applicable -// build-pass (FIXME(62277): should be check-pass) -// aux-build:fancy-panic.rs +//@ run-rustfix +//@ rustfix-only-machine-applicable +//@ build-pass (FIXME(62277): should be check-pass) +//@ aux-build:fancy-panic.rs extern crate fancy_panic; diff --git a/tests/ui/non_modrs_mods/foors_mod.rs b/tests/ui/non_modrs_mods/foors_mod.rs index 5bf35fbf7fb..b215e5f09e9 100644 --- a/tests/ui/non_modrs_mods/foors_mod.rs +++ b/tests/ui/non_modrs_mods/foors_mod.rs @@ -1,6 +1,6 @@ -// run-pass +//@ run-pass // -// ignore-test: not a test, used by non_modrs_mods.rs +//@ ignore-test: not a test, used by non_modrs_mods.rs pub mod inner_modrs_mod; pub mod inner_foors_mod; diff --git a/tests/ui/non_modrs_mods/foors_mod/inline/somename.rs b/tests/ui/non_modrs_mods/foors_mod/inline/somename.rs index 04585f918fd..89f86a58e4a 100644 --- a/tests/ui/non_modrs_mods/foors_mod/inline/somename.rs +++ b/tests/ui/non_modrs_mods/foors_mod/inline/somename.rs @@ -1,3 +1,3 @@ -// run-pass +//@ run-pass pub fn foo() {} diff --git a/tests/ui/non_modrs_mods/foors_mod/inner_foors_mod.rs b/tests/ui/non_modrs_mods/foors_mod/inner_foors_mod.rs index 4d8eb350bd2..cc6a1edafb4 100644 --- a/tests/ui/non_modrs_mods/foors_mod/inner_foors_mod.rs +++ b/tests/ui/non_modrs_mods/foors_mod/inner_foors_mod.rs @@ -1,3 +1,3 @@ -// run-pass +//@ run-pass pub mod innest; diff --git a/tests/ui/non_modrs_mods/foors_mod/inner_foors_mod/innest.rs b/tests/ui/non_modrs_mods/foors_mod/inner_foors_mod/innest.rs index 04585f918fd..89f86a58e4a 100644 --- a/tests/ui/non_modrs_mods/foors_mod/inner_foors_mod/innest.rs +++ b/tests/ui/non_modrs_mods/foors_mod/inner_foors_mod/innest.rs @@ -1,3 +1,3 @@ -// run-pass +//@ run-pass pub fn foo() {} diff --git a/tests/ui/non_modrs_mods/foors_mod/inner_modrs_mod/innest.rs b/tests/ui/non_modrs_mods/foors_mod/inner_modrs_mod/innest.rs index 04585f918fd..89f86a58e4a 100644 --- a/tests/ui/non_modrs_mods/foors_mod/inner_modrs_mod/innest.rs +++ b/tests/ui/non_modrs_mods/foors_mod/inner_modrs_mod/innest.rs @@ -1,3 +1,3 @@ -// run-pass +//@ run-pass pub fn foo() {} diff --git a/tests/ui/non_modrs_mods/foors_mod/inner_modrs_mod/mod.rs b/tests/ui/non_modrs_mods/foors_mod/inner_modrs_mod/mod.rs index 4d8eb350bd2..cc6a1edafb4 100644 --- a/tests/ui/non_modrs_mods/foors_mod/inner_modrs_mod/mod.rs +++ b/tests/ui/non_modrs_mods/foors_mod/inner_modrs_mod/mod.rs @@ -1,3 +1,3 @@ -// run-pass +//@ run-pass pub mod innest; diff --git a/tests/ui/non_modrs_mods/modrs_mod/inline/somename.rs b/tests/ui/non_modrs_mods/modrs_mod/inline/somename.rs index 04585f918fd..89f86a58e4a 100644 --- a/tests/ui/non_modrs_mods/modrs_mod/inline/somename.rs +++ b/tests/ui/non_modrs_mods/modrs_mod/inline/somename.rs @@ -1,3 +1,3 @@ -// run-pass +//@ run-pass pub fn foo() {} diff --git a/tests/ui/non_modrs_mods/modrs_mod/inner_foors_mod.rs b/tests/ui/non_modrs_mods/modrs_mod/inner_foors_mod.rs index 4d8eb350bd2..cc6a1edafb4 100644 --- a/tests/ui/non_modrs_mods/modrs_mod/inner_foors_mod.rs +++ b/tests/ui/non_modrs_mods/modrs_mod/inner_foors_mod.rs @@ -1,3 +1,3 @@ -// run-pass +//@ run-pass pub mod innest; diff --git a/tests/ui/non_modrs_mods/modrs_mod/inner_foors_mod/innest.rs b/tests/ui/non_modrs_mods/modrs_mod/inner_foors_mod/innest.rs index 04585f918fd..89f86a58e4a 100644 --- a/tests/ui/non_modrs_mods/modrs_mod/inner_foors_mod/innest.rs +++ b/tests/ui/non_modrs_mods/modrs_mod/inner_foors_mod/innest.rs @@ -1,3 +1,3 @@ -// run-pass +//@ run-pass pub fn foo() {} diff --git a/tests/ui/non_modrs_mods/modrs_mod/inner_modrs_mod/innest.rs b/tests/ui/non_modrs_mods/modrs_mod/inner_modrs_mod/innest.rs index 04585f918fd..89f86a58e4a 100644 --- a/tests/ui/non_modrs_mods/modrs_mod/inner_modrs_mod/innest.rs +++ b/tests/ui/non_modrs_mods/modrs_mod/inner_modrs_mod/innest.rs @@ -1,3 +1,3 @@ -// run-pass +//@ run-pass pub fn foo() {} diff --git a/tests/ui/non_modrs_mods/modrs_mod/inner_modrs_mod/mod.rs b/tests/ui/non_modrs_mods/modrs_mod/inner_modrs_mod/mod.rs index 4d8eb350bd2..cc6a1edafb4 100644 --- a/tests/ui/non_modrs_mods/modrs_mod/inner_modrs_mod/mod.rs +++ b/tests/ui/non_modrs_mods/modrs_mod/inner_modrs_mod/mod.rs @@ -1,3 +1,3 @@ -// run-pass +//@ run-pass pub mod innest; diff --git a/tests/ui/non_modrs_mods/modrs_mod/mod.rs b/tests/ui/non_modrs_mods/modrs_mod/mod.rs index c8efa66d665..9ba6566688d 100644 --- a/tests/ui/non_modrs_mods/modrs_mod/mod.rs +++ b/tests/ui/non_modrs_mods/modrs_mod/mod.rs @@ -1,4 +1,4 @@ -// run-pass +//@ run-pass pub mod inner_modrs_mod; pub mod inner_foors_mod; diff --git a/tests/ui/non_modrs_mods/non_modrs_mods.rs b/tests/ui/non_modrs_mods/non_modrs_mods.rs index b3fa390087f..acc326dd0e0 100644 --- a/tests/ui/non_modrs_mods/non_modrs_mods.rs +++ b/tests/ui/non_modrs_mods/non_modrs_mods.rs @@ -1,4 +1,4 @@ -// run-pass +//@ run-pass // pub mod modrs_mod; pub mod foors_mod; diff --git a/tests/ui/non_modrs_mods/some_crazy_attr_mod_dir/arbitrary_name.rs b/tests/ui/non_modrs_mods/some_crazy_attr_mod_dir/arbitrary_name.rs index 7d5d5b9e5ca..6ac58eae5e1 100644 --- a/tests/ui/non_modrs_mods/some_crazy_attr_mod_dir/arbitrary_name.rs +++ b/tests/ui/non_modrs_mods/some_crazy_attr_mod_dir/arbitrary_name.rs @@ -1,3 +1,3 @@ -// run-pass +//@ run-pass pub mod inner_modrs_mod; diff --git a/tests/ui/non_modrs_mods/some_crazy_attr_mod_dir/inner_modrs_mod/innest.rs b/tests/ui/non_modrs_mods/some_crazy_attr_mod_dir/inner_modrs_mod/innest.rs index 04585f918fd..89f86a58e4a 100644 --- a/tests/ui/non_modrs_mods/some_crazy_attr_mod_dir/inner_modrs_mod/innest.rs +++ b/tests/ui/non_modrs_mods/some_crazy_attr_mod_dir/inner_modrs_mod/innest.rs @@ -1,3 +1,3 @@ -// run-pass +//@ run-pass pub fn foo() {} diff --git a/tests/ui/non_modrs_mods/some_crazy_attr_mod_dir/inner_modrs_mod/mod.rs b/tests/ui/non_modrs_mods/some_crazy_attr_mod_dir/inner_modrs_mod/mod.rs index 4d8eb350bd2..cc6a1edafb4 100644 --- a/tests/ui/non_modrs_mods/some_crazy_attr_mod_dir/inner_modrs_mod/mod.rs +++ b/tests/ui/non_modrs_mods/some_crazy_attr_mod_dir/inner_modrs_mod/mod.rs @@ -1,3 +1,3 @@ -// run-pass +//@ run-pass pub mod innest; diff --git a/tests/ui/non_modrs_mods_and_inline_mods/non_modrs_mods_and_inline_mods.rs b/tests/ui/non_modrs_mods_and_inline_mods/non_modrs_mods_and_inline_mods.rs index af6585aadae..047a2e23e07 100644 --- a/tests/ui/non_modrs_mods_and_inline_mods/non_modrs_mods_and_inline_mods.rs +++ b/tests/ui/non_modrs_mods_and_inline_mods/non_modrs_mods_and_inline_mods.rs @@ -1,4 +1,4 @@ -// build-pass (FIXME(62277): could be check-pass?) +//@ build-pass (FIXME(62277): could be check-pass?) mod x; diff --git a/tests/ui/non_modrs_mods_and_inline_mods/x.rs b/tests/ui/non_modrs_mods_and_inline_mods/x.rs index a39a7c6d9b3..c4548d39fad 100644 --- a/tests/ui/non_modrs_mods_and_inline_mods/x.rs +++ b/tests/ui/non_modrs_mods_and_inline_mods/x.rs @@ -1,4 +1,4 @@ -// ignore-test: not a test +//@ ignore-test: not a test pub mod y { pub mod z; diff --git a/tests/ui/non_modrs_mods_and_inline_mods/x/y/z/mod.rs b/tests/ui/non_modrs_mods_and_inline_mods/x/y/z/mod.rs index e8442a47f2c..ec7b7de78d8 100644 --- a/tests/ui/non_modrs_mods_and_inline_mods/x/y/z/mod.rs +++ b/tests/ui/non_modrs_mods_and_inline_mods/x/y/z/mod.rs @@ -1 +1 @@ -// ignore-test: not a test +//@ ignore-test: not a test diff --git a/tests/ui/nonscalar-cast.fixed b/tests/ui/nonscalar-cast.fixed index 0a4b98469b2..f6154222ca2 100644 --- a/tests/ui/nonscalar-cast.fixed +++ b/tests/ui/nonscalar-cast.fixed @@ -1,4 +1,4 @@ -// run-rustfix +//@ run-rustfix #[derive(Debug)] struct Foo { diff --git a/tests/ui/nonscalar-cast.rs b/tests/ui/nonscalar-cast.rs index 59fcf09666b..71e7c43a1db 100644 --- a/tests/ui/nonscalar-cast.rs +++ b/tests/ui/nonscalar-cast.rs @@ -1,4 +1,4 @@ -// run-rustfix +//@ run-rustfix #[derive(Debug)] struct Foo { diff --git a/tests/ui/nul-characters.rs b/tests/ui/nul-characters.rs index 11b6e9fe376..eb83f440d3e 100644 --- a/tests/ui/nul-characters.rs +++ b/tests/ui/nul-characters.rs @@ -1,4 +1,4 @@ -// run-pass +//@ run-pass pub fn main() { diff --git a/tests/ui/nullable-pointer-iotareduction.rs b/tests/ui/nullable-pointer-iotareduction.rs index 3f3a962664e..fa837dab51b 100644 --- a/tests/ui/nullable-pointer-iotareduction.rs +++ b/tests/ui/nullable-pointer-iotareduction.rs @@ -1,4 +1,4 @@ -// run-pass +//@ run-pass // Iota-reduction is a rule in the Calculus of (Co-)Inductive Constructions, // which "says that a destructor applied to an object built from a constructor diff --git a/tests/ui/nullable-pointer-size.rs b/tests/ui/nullable-pointer-size.rs index 0384553b699..aabdfa140df 100644 --- a/tests/ui/nullable-pointer-size.rs +++ b/tests/ui/nullable-pointer-size.rs @@ -1,4 +1,4 @@ -// run-pass +//@ run-pass #![allow(dead_code)] diff --git a/tests/ui/numbers-arithmetic/apfloat-modulo-wrong.rs b/tests/ui/numbers-arithmetic/apfloat-modulo-wrong.rs index 64ff1f8b1d2..50e8974fd7c 100644 --- a/tests/ui/numbers-arithmetic/apfloat-modulo-wrong.rs +++ b/tests/ui/numbers-arithmetic/apfloat-modulo-wrong.rs @@ -1,5 +1,5 @@ -// run-pass -// check-run-results +//@ run-pass +//@ check-run-results // regression test for issue #109567 fn f() -> f64 { diff --git a/tests/ui/numbers-arithmetic/arith-unsigned.rs b/tests/ui/numbers-arithmetic/arith-unsigned.rs index ad57d9f8645..5a285ceca32 100644 --- a/tests/ui/numbers-arithmetic/arith-unsigned.rs +++ b/tests/ui/numbers-arithmetic/arith-unsigned.rs @@ -1,4 +1,4 @@ -// run-pass +//@ run-pass #![allow(unused_comparisons)] // Unsigned integer operations diff --git a/tests/ui/numbers-arithmetic/div-mod.rs b/tests/ui/numbers-arithmetic/div-mod.rs index acb92a7df73..ee654e00463 100644 --- a/tests/ui/numbers-arithmetic/div-mod.rs +++ b/tests/ui/numbers-arithmetic/div-mod.rs @@ -1,4 +1,4 @@ -// run-pass +//@ run-pass diff --git a/tests/ui/numbers-arithmetic/divide-by-zero.rs b/tests/ui/numbers-arithmetic/divide-by-zero.rs index 30e0e6c1bdd..626daf9771d 100644 --- a/tests/ui/numbers-arithmetic/divide-by-zero.rs +++ b/tests/ui/numbers-arithmetic/divide-by-zero.rs @@ -1,6 +1,6 @@ -// run-fail -// error-pattern:attempt to divide by zero -// ignore-emscripten no processes +//@ run-fail +//@ error-pattern:attempt to divide by zero +//@ ignore-emscripten no processes #[allow(unconditional_panic)] fn main() { diff --git a/tests/ui/numbers-arithmetic/float-int-invalid-const-cast.rs b/tests/ui/numbers-arithmetic/float-int-invalid-const-cast.rs index 260281d75a4..b61ca054954 100644 --- a/tests/ui/numbers-arithmetic/float-int-invalid-const-cast.rs +++ b/tests/ui/numbers-arithmetic/float-int-invalid-const-cast.rs @@ -1,4 +1,4 @@ -// run-pass +//@ run-pass // Forces evaluation of constants, triggering hard error fn force(_: T) {} diff --git a/tests/ui/numbers-arithmetic/float-literal-inference.rs b/tests/ui/numbers-arithmetic/float-literal-inference.rs index c4645e4f8ff..a643be3f0c1 100644 --- a/tests/ui/numbers-arithmetic/float-literal-inference.rs +++ b/tests/ui/numbers-arithmetic/float-literal-inference.rs @@ -1,4 +1,4 @@ -// run-pass +//@ run-pass struct S { z: f64 } diff --git a/tests/ui/numbers-arithmetic/float-nan.rs b/tests/ui/numbers-arithmetic/float-nan.rs index 0cc6473e5c4..7d1af0155da 100644 --- a/tests/ui/numbers-arithmetic/float-nan.rs +++ b/tests/ui/numbers-arithmetic/float-nan.rs @@ -1,4 +1,4 @@ -// run-pass +//@ run-pass pub fn main() { let nan: f64 = f64::NAN; diff --git a/tests/ui/numbers-arithmetic/float-signature.rs b/tests/ui/numbers-arithmetic/float-signature.rs index d47280ea2e7..a68a1d6e6f3 100644 --- a/tests/ui/numbers-arithmetic/float-signature.rs +++ b/tests/ui/numbers-arithmetic/float-signature.rs @@ -1,4 +1,4 @@ -// run-pass +//@ run-pass pub fn main() { diff --git a/tests/ui/numbers-arithmetic/float.rs b/tests/ui/numbers-arithmetic/float.rs index d55c05857b6..0b33a0e9f6c 100644 --- a/tests/ui/numbers-arithmetic/float.rs +++ b/tests/ui/numbers-arithmetic/float.rs @@ -1,4 +1,4 @@ -// run-pass +//@ run-pass pub fn main() { let pi = 3.1415927f64; println!("{}", -pi * (pi + 2.0 / pi) - pi * 5.0); diff --git a/tests/ui/numbers-arithmetic/float2.rs b/tests/ui/numbers-arithmetic/float2.rs index b1bcf8da5a3..1b7add01cc6 100644 --- a/tests/ui/numbers-arithmetic/float2.rs +++ b/tests/ui/numbers-arithmetic/float2.rs @@ -1,4 +1,4 @@ -// run-pass +//@ run-pass diff --git a/tests/ui/numbers-arithmetic/float_math.rs b/tests/ui/numbers-arithmetic/float_math.rs index a2902ee5608..2c7d8ab255a 100644 --- a/tests/ui/numbers-arithmetic/float_math.rs +++ b/tests/ui/numbers-arithmetic/float_math.rs @@ -1,4 +1,4 @@ -// run-pass +//@ run-pass #![feature(core_intrinsics)] use std::intrinsics::{fadd_fast, fsub_fast, fmul_fast, fdiv_fast, frem_fast}; diff --git a/tests/ui/numbers-arithmetic/floatlits.rs b/tests/ui/numbers-arithmetic/floatlits.rs index 07049af315b..21f19b69c49 100644 --- a/tests/ui/numbers-arithmetic/floatlits.rs +++ b/tests/ui/numbers-arithmetic/floatlits.rs @@ -1,4 +1,4 @@ -// run-pass +//@ run-pass diff --git a/tests/ui/numbers-arithmetic/i128.rs b/tests/ui/numbers-arithmetic/i128.rs index d61a1ab03b6..890701fdd31 100644 --- a/tests/ui/numbers-arithmetic/i128.rs +++ b/tests/ui/numbers-arithmetic/i128.rs @@ -1,4 +1,4 @@ -// run-pass +//@ run-pass #![allow(overflowing_literals)] #![feature(test)] diff --git a/tests/ui/numbers-arithmetic/i32-sub.rs b/tests/ui/numbers-arithmetic/i32-sub.rs index 56df772b4e1..c2aed62c966 100644 --- a/tests/ui/numbers-arithmetic/i32-sub.rs +++ b/tests/ui/numbers-arithmetic/i32-sub.rs @@ -1,4 +1,4 @@ -// run-pass +//@ run-pass diff --git a/tests/ui/numbers-arithmetic/i8-incr.rs b/tests/ui/numbers-arithmetic/i8-incr.rs index 718d259f735..a0f1becce2e 100644 --- a/tests/ui/numbers-arithmetic/i8-incr.rs +++ b/tests/ui/numbers-arithmetic/i8-incr.rs @@ -1,4 +1,4 @@ -// run-pass +//@ run-pass diff --git a/tests/ui/numbers-arithmetic/int-abs-overflow.rs b/tests/ui/numbers-arithmetic/int-abs-overflow.rs index d63ba8cb03e..e9114138048 100644 --- a/tests/ui/numbers-arithmetic/int-abs-overflow.rs +++ b/tests/ui/numbers-arithmetic/int-abs-overflow.rs @@ -1,7 +1,7 @@ -// run-pass -// compile-flags: -C overflow-checks=on -// ignore-emscripten no threads support -// needs-unwind +//@ run-pass +//@ compile-flags: -C overflow-checks=on +//@ ignore-emscripten no threads support +//@ needs-unwind use std::thread; diff --git a/tests/ui/numbers-arithmetic/int.rs b/tests/ui/numbers-arithmetic/int.rs index b496a70a6fe..edc7f729444 100644 --- a/tests/ui/numbers-arithmetic/int.rs +++ b/tests/ui/numbers-arithmetic/int.rs @@ -1,7 +1,7 @@ -// run-pass +//@ run-pass -// pretty-expanded FIXME #23616 +//@ pretty-expanded FIXME #23616 pub fn main() { let _x: isize = 10; } diff --git a/tests/ui/numbers-arithmetic/integer-literal-radix.rs b/tests/ui/numbers-arithmetic/integer-literal-radix.rs index 8f61ea17a12..ebccb023e60 100644 --- a/tests/ui/numbers-arithmetic/integer-literal-radix.rs +++ b/tests/ui/numbers-arithmetic/integer-literal-radix.rs @@ -1,4 +1,4 @@ -// run-pass +//@ run-pass pub fn main() { let a = 0xBEEF_isize; diff --git a/tests/ui/numbers-arithmetic/integer-literal-suffix-inference-2.rs b/tests/ui/numbers-arithmetic/integer-literal-suffix-inference-2.rs index 80248dc223d..406ed470458 100644 --- a/tests/ui/numbers-arithmetic/integer-literal-suffix-inference-2.rs +++ b/tests/ui/numbers-arithmetic/integer-literal-suffix-inference-2.rs @@ -1,5 +1,5 @@ -// run-pass -// pretty-expanded FIXME #23616 +//@ run-pass +//@ pretty-expanded FIXME #23616 fn foo(_: *const ()) {} diff --git a/tests/ui/numbers-arithmetic/integer-literal-suffix-inference-3.rs b/tests/ui/numbers-arithmetic/integer-literal-suffix-inference-3.rs index bec718a3c6a..8d49b21861f 100644 --- a/tests/ui/numbers-arithmetic/integer-literal-suffix-inference-3.rs +++ b/tests/ui/numbers-arithmetic/integer-literal-suffix-inference-3.rs @@ -1,4 +1,4 @@ -// run-pass +//@ run-pass fn main() { println!("{}", std::mem::size_of_val(&1)); } diff --git a/tests/ui/numbers-arithmetic/integer-literal-suffix-inference.rs b/tests/ui/numbers-arithmetic/integer-literal-suffix-inference.rs index d177ced1a69..97c10bc3c56 100644 --- a/tests/ui/numbers-arithmetic/integer-literal-suffix-inference.rs +++ b/tests/ui/numbers-arithmetic/integer-literal-suffix-inference.rs @@ -1,5 +1,5 @@ -// run-pass -// pretty-expanded FIXME #23616 +//@ run-pass +//@ pretty-expanded FIXME #23616 pub fn main() { fn id_i8(n: i8) -> i8 { n } diff --git a/tests/ui/numbers-arithmetic/issue-105626.rs b/tests/ui/numbers-arithmetic/issue-105626.rs index 5466f8e18d4..f942cf1283d 100644 --- a/tests/ui/numbers-arithmetic/issue-105626.rs +++ b/tests/ui/numbers-arithmetic/issue-105626.rs @@ -1,6 +1,6 @@ -// run-pass -// only-x86 -// compile-flags: -Ctarget-feature=+sse2 +//@ run-pass +//@ only-x86 +//@ compile-flags: -Ctarget-feature=+sse2 use std::hint::black_box; diff --git a/tests/ui/numbers-arithmetic/issue-8460-const.rs b/tests/ui/numbers-arithmetic/issue-8460-const.rs index 02e7567dafa..223c05d72d6 100644 --- a/tests/ui/numbers-arithmetic/issue-8460-const.rs +++ b/tests/ui/numbers-arithmetic/issue-8460-const.rs @@ -1,9 +1,9 @@ -// revisions: noopt opt opt_with_overflow_checks -//[noopt]compile-flags: -C opt-level=0 -//[opt]compile-flags: -O -//[opt_with_overflow_checks]compile-flags: -C overflow-checks=on -O +//@ revisions: noopt opt opt_with_overflow_checks +//@[noopt]compile-flags: -C opt-level=0 +//@[opt]compile-flags: -O +//@[opt_with_overflow_checks]compile-flags: -C overflow-checks=on -O -// build-fail +//@ build-fail use std::thread; diff --git a/tests/ui/numbers-arithmetic/issue-8460.rs b/tests/ui/numbers-arithmetic/issue-8460.rs index 77368b87e96..9d3044a7ca0 100644 --- a/tests/ui/numbers-arithmetic/issue-8460.rs +++ b/tests/ui/numbers-arithmetic/issue-8460.rs @@ -1,7 +1,7 @@ -// run-pass +//@ run-pass #![allow(unused_must_use)] -// ignore-emscripten no threads support -// needs-unwind +//@ ignore-emscripten no threads support +//@ needs-unwind #![feature(rustc_attrs)] use std::thread; diff --git a/tests/ui/numbers-arithmetic/location-add-assign-overflow.rs b/tests/ui/numbers-arithmetic/location-add-assign-overflow.rs index 2c4bdad3e91..654e54a1591 100644 --- a/tests/ui/numbers-arithmetic/location-add-assign-overflow.rs +++ b/tests/ui/numbers-arithmetic/location-add-assign-overflow.rs @@ -1,6 +1,6 @@ -// run-fail -// ignore-wasm32 -// error-pattern:location-add-assign-overflow.rs +//@ run-fail +//@ ignore-wasm32 +//@ error-pattern:location-add-assign-overflow.rs fn main() { let mut a: u8 = 255; diff --git a/tests/ui/numbers-arithmetic/location-add-overflow.rs b/tests/ui/numbers-arithmetic/location-add-overflow.rs index 085623c9bf7..65452e2c2c2 100644 --- a/tests/ui/numbers-arithmetic/location-add-overflow.rs +++ b/tests/ui/numbers-arithmetic/location-add-overflow.rs @@ -1,6 +1,6 @@ -// run-fail -// ignore-wasm32 -// error-pattern:location-add-overflow.rs +//@ run-fail +//@ ignore-wasm32 +//@ error-pattern:location-add-overflow.rs fn main() { let _: u8 = 255 + &1; diff --git a/tests/ui/numbers-arithmetic/location-divide-assign-by-zero.rs b/tests/ui/numbers-arithmetic/location-divide-assign-by-zero.rs index 21b5e7a8110..8bce8ded5da 100644 --- a/tests/ui/numbers-arithmetic/location-divide-assign-by-zero.rs +++ b/tests/ui/numbers-arithmetic/location-divide-assign-by-zero.rs @@ -1,6 +1,6 @@ -// run-fail -// ignore-wasm32 -// error-pattern:location-divide-assign-by-zero.rs +//@ run-fail +//@ ignore-wasm32 +//@ error-pattern:location-divide-assign-by-zero.rs fn main() { let mut a = 1; diff --git a/tests/ui/numbers-arithmetic/location-divide-by-zero.rs b/tests/ui/numbers-arithmetic/location-divide-by-zero.rs index 7d045fc5602..180f72eb6f4 100644 --- a/tests/ui/numbers-arithmetic/location-divide-by-zero.rs +++ b/tests/ui/numbers-arithmetic/location-divide-by-zero.rs @@ -1,6 +1,6 @@ -// run-fail -// ignore-wasm32 -// error-pattern:location-divide-by-zero.rs +//@ run-fail +//@ ignore-wasm32 +//@ error-pattern:location-divide-by-zero.rs // https://github.com/rust-lang/rust/issues/114814 diff --git a/tests/ui/numbers-arithmetic/location-mod-assign-by-zero.rs b/tests/ui/numbers-arithmetic/location-mod-assign-by-zero.rs index 88d602e4b6d..bc4377eb679 100644 --- a/tests/ui/numbers-arithmetic/location-mod-assign-by-zero.rs +++ b/tests/ui/numbers-arithmetic/location-mod-assign-by-zero.rs @@ -1,6 +1,6 @@ -// run-fail -// ignore-wasm32 -// error-pattern:location-mod-assign-by-zero.rs +//@ run-fail +//@ ignore-wasm32 +//@ error-pattern:location-mod-assign-by-zero.rs fn main() { let mut a = 1; diff --git a/tests/ui/numbers-arithmetic/location-mod-by-zero.rs b/tests/ui/numbers-arithmetic/location-mod-by-zero.rs index 4397adb75d1..2f176013db2 100644 --- a/tests/ui/numbers-arithmetic/location-mod-by-zero.rs +++ b/tests/ui/numbers-arithmetic/location-mod-by-zero.rs @@ -1,6 +1,6 @@ -// run-fail -// ignore-wasm32 -// error-pattern:location-mod-by-zero.rs +//@ run-fail +//@ ignore-wasm32 +//@ error-pattern:location-mod-by-zero.rs fn main() { let _ = 1 % &0; diff --git a/tests/ui/numbers-arithmetic/location-mul-assign-overflow.rs b/tests/ui/numbers-arithmetic/location-mul-assign-overflow.rs index b042751ded9..33de927b034 100644 --- a/tests/ui/numbers-arithmetic/location-mul-assign-overflow.rs +++ b/tests/ui/numbers-arithmetic/location-mul-assign-overflow.rs @@ -1,6 +1,6 @@ -// run-fail -// ignore-wasm32 -// error-pattern:location-mul-assign-overflow.rs +//@ run-fail +//@ ignore-wasm32 +//@ error-pattern:location-mul-assign-overflow.rs fn main() { let mut a: u8 = 255; diff --git a/tests/ui/numbers-arithmetic/location-mul-overflow.rs b/tests/ui/numbers-arithmetic/location-mul-overflow.rs index 6dd58874874..8d93406ba50 100644 --- a/tests/ui/numbers-arithmetic/location-mul-overflow.rs +++ b/tests/ui/numbers-arithmetic/location-mul-overflow.rs @@ -1,6 +1,6 @@ -// run-fail -// ignore-wasm32 -// error-pattern:location-mul-overflow.rs +//@ run-fail +//@ ignore-wasm32 +//@ error-pattern:location-mul-overflow.rs fn main() { let _: u8 = 255 * &2; diff --git a/tests/ui/numbers-arithmetic/location-sub-assign-overflow.rs b/tests/ui/numbers-arithmetic/location-sub-assign-overflow.rs index 5b92ada2e0b..1bc1a9b2d66 100644 --- a/tests/ui/numbers-arithmetic/location-sub-assign-overflow.rs +++ b/tests/ui/numbers-arithmetic/location-sub-assign-overflow.rs @@ -1,6 +1,6 @@ -// run-fail -// ignore-wasm32 -// error-pattern:location-sub-assign-overflow.rs +//@ run-fail +//@ ignore-wasm32 +//@ error-pattern:location-sub-assign-overflow.rs fn main() { let mut a: u8 = 0; diff --git a/tests/ui/numbers-arithmetic/location-sub-overflow.rs b/tests/ui/numbers-arithmetic/location-sub-overflow.rs index 2d77cb8f55e..911b2815a00 100644 --- a/tests/ui/numbers-arithmetic/location-sub-overflow.rs +++ b/tests/ui/numbers-arithmetic/location-sub-overflow.rs @@ -1,6 +1,6 @@ -// run-fail -// ignore-wasm32 -// error-pattern:location-sub-overflow.rs +//@ run-fail +//@ ignore-wasm32 +//@ error-pattern:location-sub-overflow.rs fn main() { let _: u8 = 0 - &1; diff --git a/tests/ui/numbers-arithmetic/mod-zero.rs b/tests/ui/numbers-arithmetic/mod-zero.rs index 08371639412..f3cc7c9fc88 100644 --- a/tests/ui/numbers-arithmetic/mod-zero.rs +++ b/tests/ui/numbers-arithmetic/mod-zero.rs @@ -1,6 +1,6 @@ -// run-fail -// error-pattern:attempt to calculate the remainder with a divisor of zero -// ignore-emscripten no processes +//@ run-fail +//@ error-pattern:attempt to calculate the remainder with a divisor of zero +//@ ignore-emscripten no processes #[allow(unconditional_panic)] fn main() { diff --git a/tests/ui/numbers-arithmetic/next-power-of-two-overflow-debug.rs b/tests/ui/numbers-arithmetic/next-power-of-two-overflow-debug.rs index 0e487a700b8..ef5db4995fb 100644 --- a/tests/ui/numbers-arithmetic/next-power-of-two-overflow-debug.rs +++ b/tests/ui/numbers-arithmetic/next-power-of-two-overflow-debug.rs @@ -1,7 +1,7 @@ -// run-pass -// compile-flags: -C debug_assertions=true -// needs-unwind -// ignore-emscripten dies with an LLVM error +//@ run-pass +//@ compile-flags: -C debug_assertions=true +//@ needs-unwind +//@ ignore-emscripten dies with an LLVM error use std::panic; diff --git a/tests/ui/numbers-arithmetic/next-power-of-two-overflow-ndebug.rs b/tests/ui/numbers-arithmetic/next-power-of-two-overflow-ndebug.rs index 982cd97c50a..f4cd8d0d63d 100644 --- a/tests/ui/numbers-arithmetic/next-power-of-two-overflow-ndebug.rs +++ b/tests/ui/numbers-arithmetic/next-power-of-two-overflow-ndebug.rs @@ -1,6 +1,6 @@ -// run-pass -// compile-flags: -C debug_assertions=no -// ignore-emscripten dies with an LLVM error +//@ run-pass +//@ compile-flags: -C debug_assertions=no +//@ ignore-emscripten dies with an LLVM error fn main() { for i in 129..256 { diff --git a/tests/ui/numbers-arithmetic/num-wrapping.rs b/tests/ui/numbers-arithmetic/num-wrapping.rs index 43b1059f944..0e649fd2d70 100644 --- a/tests/ui/numbers-arithmetic/num-wrapping.rs +++ b/tests/ui/numbers-arithmetic/num-wrapping.rs @@ -1,7 +1,7 @@ -// run-pass +//@ run-pass #![allow(unused_macros)] -// compile-flags: -C debug-assertions +//@ compile-flags: -C debug-assertions // // Test std::num::Wrapping for {uN, iN, usize, isize} diff --git a/tests/ui/numbers-arithmetic/numeric-method-autoexport.rs b/tests/ui/numbers-arithmetic/numeric-method-autoexport.rs index 5798c2591a0..780814941db 100644 --- a/tests/ui/numbers-arithmetic/numeric-method-autoexport.rs +++ b/tests/ui/numbers-arithmetic/numeric-method-autoexport.rs @@ -1,4 +1,4 @@ -// run-pass +//@ run-pass // This file is intended to test only that methods are automatically // reachable for each numeric type, for each exported impl, with no imports // necessary. Testing the methods of the impls is done within the source diff --git a/tests/ui/numbers-arithmetic/overflow-attribute-works-1.rs b/tests/ui/numbers-arithmetic/overflow-attribute-works-1.rs index 318be2a6401..fae5c689031 100644 --- a/tests/ui/numbers-arithmetic/overflow-attribute-works-1.rs +++ b/tests/ui/numbers-arithmetic/overflow-attribute-works-1.rs @@ -1,5 +1,5 @@ -// run-pass -// compile-flags: -C overflow_checks=true +//@ run-pass +//@ compile-flags: -C overflow_checks=true #![feature(cfg_overflow_checks)] diff --git a/tests/ui/numbers-arithmetic/overflow-attribute-works-2.rs b/tests/ui/numbers-arithmetic/overflow-attribute-works-2.rs index 0367d980a64..0af3868929a 100644 --- a/tests/ui/numbers-arithmetic/overflow-attribute-works-2.rs +++ b/tests/ui/numbers-arithmetic/overflow-attribute-works-2.rs @@ -1,5 +1,5 @@ -// run-pass -// compile-flags: -C overflow_checks=false +//@ run-pass +//@ compile-flags: -C overflow_checks=false #![feature(cfg_overflow_checks)] diff --git a/tests/ui/numbers-arithmetic/overflowing-add.rs b/tests/ui/numbers-arithmetic/overflowing-add.rs index c45b44966ed..16583f6eb74 100644 --- a/tests/ui/numbers-arithmetic/overflowing-add.rs +++ b/tests/ui/numbers-arithmetic/overflowing-add.rs @@ -1,8 +1,8 @@ -// run-fail -// error-pattern:thread 'main' panicked -// error-pattern:attempt to add with overflow -// compile-flags: -C debug-assertions -// ignore-emscripten no processes +//@ run-fail +//@ error-pattern:thread 'main' panicked +//@ error-pattern:attempt to add with overflow +//@ compile-flags: -C debug-assertions +//@ ignore-emscripten no processes #![allow(arithmetic_overflow)] diff --git a/tests/ui/numbers-arithmetic/overflowing-lsh-1.rs b/tests/ui/numbers-arithmetic/overflowing-lsh-1.rs index 7f8b0c87760..0d300709be2 100644 --- a/tests/ui/numbers-arithmetic/overflowing-lsh-1.rs +++ b/tests/ui/numbers-arithmetic/overflowing-lsh-1.rs @@ -1,5 +1,5 @@ -// build-fail -// compile-flags: -C debug-assertions +//@ build-fail +//@ compile-flags: -C debug-assertions #![deny(arithmetic_overflow)] diff --git a/tests/ui/numbers-arithmetic/overflowing-lsh-2.rs b/tests/ui/numbers-arithmetic/overflowing-lsh-2.rs index 76718ecd1fa..6d7be30d302 100644 --- a/tests/ui/numbers-arithmetic/overflowing-lsh-2.rs +++ b/tests/ui/numbers-arithmetic/overflowing-lsh-2.rs @@ -1,5 +1,5 @@ -// build-fail -// compile-flags: -C debug-assertions +//@ build-fail +//@ compile-flags: -C debug-assertions #![deny(arithmetic_overflow)] diff --git a/tests/ui/numbers-arithmetic/overflowing-lsh-3.rs b/tests/ui/numbers-arithmetic/overflowing-lsh-3.rs index b2bdd09bffb..65f536f627d 100644 --- a/tests/ui/numbers-arithmetic/overflowing-lsh-3.rs +++ b/tests/ui/numbers-arithmetic/overflowing-lsh-3.rs @@ -1,5 +1,5 @@ -// build-fail -// compile-flags: -C debug-assertions +//@ build-fail +//@ compile-flags: -C debug-assertions #![deny(arithmetic_overflow)] diff --git a/tests/ui/numbers-arithmetic/overflowing-lsh-4.rs b/tests/ui/numbers-arithmetic/overflowing-lsh-4.rs index 1042bfcb34d..f1943c0f439 100644 --- a/tests/ui/numbers-arithmetic/overflowing-lsh-4.rs +++ b/tests/ui/numbers-arithmetic/overflowing-lsh-4.rs @@ -1,5 +1,5 @@ -// build-fail -// compile-flags: -C debug-assertions +//@ build-fail +//@ compile-flags: -C debug-assertions // This function is checking that our automatic truncation does not // sidestep the overflow checking. diff --git a/tests/ui/numbers-arithmetic/overflowing-mul.rs b/tests/ui/numbers-arithmetic/overflowing-mul.rs index ec5279d321c..59575d2e86e 100644 --- a/tests/ui/numbers-arithmetic/overflowing-mul.rs +++ b/tests/ui/numbers-arithmetic/overflowing-mul.rs @@ -1,8 +1,8 @@ -// run-fail -// error-pattern:thread 'main' panicked -// error-pattern:attempt to multiply with overflow -// ignore-emscripten no processes -// compile-flags: -C debug-assertions +//@ run-fail +//@ error-pattern:thread 'main' panicked +//@ error-pattern:attempt to multiply with overflow +//@ ignore-emscripten no processes +//@ compile-flags: -C debug-assertions #![allow(arithmetic_overflow)] diff --git a/tests/ui/numbers-arithmetic/overflowing-neg-nonzero.rs b/tests/ui/numbers-arithmetic/overflowing-neg-nonzero.rs index dabb0d50cbb..dc3b6c280f3 100644 --- a/tests/ui/numbers-arithmetic/overflowing-neg-nonzero.rs +++ b/tests/ui/numbers-arithmetic/overflowing-neg-nonzero.rs @@ -1,7 +1,7 @@ -// run-fail -// error-pattern:attempt to negate with overflow -// ignore-emscripten no processes -// compile-flags: -C debug-assertions +//@ run-fail +//@ error-pattern:attempt to negate with overflow +//@ ignore-emscripten no processes +//@ compile-flags: -C debug-assertions #![allow(arithmetic_overflow)] diff --git a/tests/ui/numbers-arithmetic/overflowing-neg.rs b/tests/ui/numbers-arithmetic/overflowing-neg.rs index 53024375393..ab49662b98f 100644 --- a/tests/ui/numbers-arithmetic/overflowing-neg.rs +++ b/tests/ui/numbers-arithmetic/overflowing-neg.rs @@ -1,7 +1,7 @@ -// run-fail -// error-pattern:attempt to negate with overflow -// ignore-emscripten no processes -// compile-flags: -C debug-assertions +//@ run-fail +//@ error-pattern:attempt to negate with overflow +//@ ignore-emscripten no processes +//@ compile-flags: -C debug-assertions #![allow(arithmetic_overflow)] diff --git a/tests/ui/numbers-arithmetic/overflowing-pow-signed.rs b/tests/ui/numbers-arithmetic/overflowing-pow-signed.rs index c2c8cad5f0b..69e22c2262a 100644 --- a/tests/ui/numbers-arithmetic/overflowing-pow-signed.rs +++ b/tests/ui/numbers-arithmetic/overflowing-pow-signed.rs @@ -1,8 +1,8 @@ -// run-fail -// error-pattern:thread 'main' panicked -// error-pattern:attempt to multiply with overflow -// ignore-emscripten no processes -// compile-flags: -C debug-assertions +//@ run-fail +//@ error-pattern:thread 'main' panicked +//@ error-pattern:attempt to multiply with overflow +//@ ignore-emscripten no processes +//@ compile-flags: -C debug-assertions fn main() { let _x = 2i32.pow(1024); diff --git a/tests/ui/numbers-arithmetic/overflowing-pow-unsigned.rs b/tests/ui/numbers-arithmetic/overflowing-pow-unsigned.rs index 4a0f9abd982..f980033c480 100644 --- a/tests/ui/numbers-arithmetic/overflowing-pow-unsigned.rs +++ b/tests/ui/numbers-arithmetic/overflowing-pow-unsigned.rs @@ -1,8 +1,8 @@ -// run-fail -// error-pattern:thread 'main' panicked -// error-pattern:attempt to multiply with overflow -// ignore-emscripten no processes -// compile-flags: -C debug-assertions +//@ run-fail +//@ error-pattern:thread 'main' panicked +//@ error-pattern:attempt to multiply with overflow +//@ ignore-emscripten no processes +//@ compile-flags: -C debug-assertions fn main() { let _x = 2u32.pow(1024); diff --git a/tests/ui/numbers-arithmetic/overflowing-rsh-1.rs b/tests/ui/numbers-arithmetic/overflowing-rsh-1.rs index 80593c8656f..20971e4807e 100644 --- a/tests/ui/numbers-arithmetic/overflowing-rsh-1.rs +++ b/tests/ui/numbers-arithmetic/overflowing-rsh-1.rs @@ -1,5 +1,5 @@ -// build-fail -// compile-flags: -C debug-assertions +//@ build-fail +//@ compile-flags: -C debug-assertions #![deny(arithmetic_overflow)] diff --git a/tests/ui/numbers-arithmetic/overflowing-rsh-2.rs b/tests/ui/numbers-arithmetic/overflowing-rsh-2.rs index 917352bfce4..c9829ad2793 100644 --- a/tests/ui/numbers-arithmetic/overflowing-rsh-2.rs +++ b/tests/ui/numbers-arithmetic/overflowing-rsh-2.rs @@ -1,5 +1,5 @@ -// build-fail -// compile-flags: -C debug-assertions +//@ build-fail +//@ compile-flags: -C debug-assertions #![deny(arithmetic_overflow)] diff --git a/tests/ui/numbers-arithmetic/overflowing-rsh-3.rs b/tests/ui/numbers-arithmetic/overflowing-rsh-3.rs index 1e052990a76..e2de731e9ab 100644 --- a/tests/ui/numbers-arithmetic/overflowing-rsh-3.rs +++ b/tests/ui/numbers-arithmetic/overflowing-rsh-3.rs @@ -1,5 +1,5 @@ -// build-fail -// compile-flags: -C debug-assertions +//@ build-fail +//@ compile-flags: -C debug-assertions #![deny(arithmetic_overflow)] diff --git a/tests/ui/numbers-arithmetic/overflowing-rsh-4.rs b/tests/ui/numbers-arithmetic/overflowing-rsh-4.rs index be918becd3a..9efa1164012 100644 --- a/tests/ui/numbers-arithmetic/overflowing-rsh-4.rs +++ b/tests/ui/numbers-arithmetic/overflowing-rsh-4.rs @@ -1,5 +1,5 @@ -// build-fail -// compile-flags: -C debug-assertions +//@ build-fail +//@ compile-flags: -C debug-assertions // This function is checking that our (type-based) automatic // truncation does not sidestep the overflow checking. diff --git a/tests/ui/numbers-arithmetic/overflowing-rsh-5.rs b/tests/ui/numbers-arithmetic/overflowing-rsh-5.rs index f75e779ed15..8088ee58ea8 100644 --- a/tests/ui/numbers-arithmetic/overflowing-rsh-5.rs +++ b/tests/ui/numbers-arithmetic/overflowing-rsh-5.rs @@ -1,5 +1,5 @@ -// build-fail -// compile-flags: -C debug-assertions +//@ build-fail +//@ compile-flags: -C debug-assertions #![deny(arithmetic_overflow)] diff --git a/tests/ui/numbers-arithmetic/overflowing-sub.rs b/tests/ui/numbers-arithmetic/overflowing-sub.rs index 119d8074802..44aadf6b3e7 100644 --- a/tests/ui/numbers-arithmetic/overflowing-sub.rs +++ b/tests/ui/numbers-arithmetic/overflowing-sub.rs @@ -1,8 +1,8 @@ -// run-fail -// error-pattern:thread 'main' panicked -// error-pattern:attempt to subtract with overflow -// ignore-emscripten no processes -// compile-flags: -C debug-assertions +//@ run-fail +//@ error-pattern:thread 'main' panicked +//@ error-pattern:attempt to subtract with overflow +//@ ignore-emscripten no processes +//@ compile-flags: -C debug-assertions #![allow(arithmetic_overflow)] diff --git a/tests/ui/numbers-arithmetic/promoted_overflow.rs b/tests/ui/numbers-arithmetic/promoted_overflow.rs index ba168f773d8..96c5f3b87e1 100644 --- a/tests/ui/numbers-arithmetic/promoted_overflow.rs +++ b/tests/ui/numbers-arithmetic/promoted_overflow.rs @@ -1,12 +1,12 @@ #![allow(arithmetic_overflow)] -// run-fail -// error-pattern: overflow -// compile-flags: -C overflow-checks=yes +//@ run-fail +//@ error-pattern: overflow +//@ compile-flags: -C overflow-checks=yes // for some reason, fails to match error string on // wasm32-unknown-unknown with stripped debuginfo and symbols, // so don't strip it -// compile-flags:-Cstrip=none +//@ compile-flags:-Cstrip=none fn main() { let x: &'static u32 = &(0u32 - 1); diff --git a/tests/ui/numbers-arithmetic/promoted_overflow_opt.rs b/tests/ui/numbers-arithmetic/promoted_overflow_opt.rs index 76279e91308..7004c9a3665 100644 --- a/tests/ui/numbers-arithmetic/promoted_overflow_opt.rs +++ b/tests/ui/numbers-arithmetic/promoted_overflow_opt.rs @@ -1,6 +1,6 @@ -// run-pass +//@ run-pass -// compile-flags: -O +//@ compile-flags: -O fn main() { let x = &(0u32 - 1); diff --git a/tests/ui/numbers-arithmetic/saturating-float-casts-impl.rs b/tests/ui/numbers-arithmetic/saturating-float-casts-impl.rs index 088b2fcdd14..4b176ef5caa 100644 --- a/tests/ui/numbers-arithmetic/saturating-float-casts-impl.rs +++ b/tests/ui/numbers-arithmetic/saturating-float-casts-impl.rs @@ -1,4 +1,4 @@ -// ignore-test (auxiliary, used by other tests) +//@ ignore-test (auxiliary, used by other tests) // Tests saturating float->int casts. See u128-as-f32.rs for the opposite direction. // diff --git a/tests/ui/numbers-arithmetic/saturating-float-casts-wasm.rs b/tests/ui/numbers-arithmetic/saturating-float-casts-wasm.rs index cad05917391..8f1fe59ddc5 100644 --- a/tests/ui/numbers-arithmetic/saturating-float-casts-wasm.rs +++ b/tests/ui/numbers-arithmetic/saturating-float-casts-wasm.rs @@ -1,6 +1,6 @@ -// run-pass -// only-wasm32 -// compile-flags: -Zmir-opt-level=0 -C target-feature=+nontrapping-fptoint +//@ run-pass +//@ only-wasm32 +//@ compile-flags: -Zmir-opt-level=0 -C target-feature=+nontrapping-fptoint #![feature(test, stmt_expr_attributes)] #![deny(overflowing_literals)] diff --git a/tests/ui/numbers-arithmetic/saturating-float-casts.rs b/tests/ui/numbers-arithmetic/saturating-float-casts.rs index cc248a9bea0..3a1af09d2d4 100644 --- a/tests/ui/numbers-arithmetic/saturating-float-casts.rs +++ b/tests/ui/numbers-arithmetic/saturating-float-casts.rs @@ -1,5 +1,5 @@ -// run-pass -// compile-flags:-Zmir-opt-level=0 +//@ run-pass +//@ compile-flags:-Zmir-opt-level=0 #![feature(test, stmt_expr_attributes)] #![deny(overflowing_literals)] diff --git a/tests/ui/numbers-arithmetic/shift-near-oflo.rs b/tests/ui/numbers-arithmetic/shift-near-oflo.rs index 55006a11342..5cca31af0e3 100644 --- a/tests/ui/numbers-arithmetic/shift-near-oflo.rs +++ b/tests/ui/numbers-arithmetic/shift-near-oflo.rs @@ -1,5 +1,5 @@ -// run-pass -// compile-flags: -C debug-assertions +//@ run-pass +//@ compile-flags: -C debug-assertions // Check that we do *not* overflow on a number of edge cases. // (compare with test/run-fail/overflowing-{lsh,rsh}*.rs) diff --git a/tests/ui/numbers-arithmetic/shift-various-types.rs b/tests/ui/numbers-arithmetic/shift-various-types.rs index 473bda3d76e..f046820ad90 100644 --- a/tests/ui/numbers-arithmetic/shift-various-types.rs +++ b/tests/ui/numbers-arithmetic/shift-various-types.rs @@ -1,4 +1,4 @@ -// run-pass +//@ run-pass // Test that we can do shifts by any integral type. diff --git a/tests/ui/numbers-arithmetic/shift.rs b/tests/ui/numbers-arithmetic/shift.rs index 2fc77928ef1..beb4f293811 100644 --- a/tests/ui/numbers-arithmetic/shift.rs +++ b/tests/ui/numbers-arithmetic/shift.rs @@ -1,4 +1,4 @@ -// run-pass +//@ run-pass #![allow(non_upper_case_globals)] #![allow(overflowing_literals)] diff --git a/tests/ui/numbers-arithmetic/signed-shift-const-eval.rs b/tests/ui/numbers-arithmetic/signed-shift-const-eval.rs index 6d0462b460e..dda54e2a579 100644 --- a/tests/ui/numbers-arithmetic/signed-shift-const-eval.rs +++ b/tests/ui/numbers-arithmetic/signed-shift-const-eval.rs @@ -1,4 +1,4 @@ -// run-pass +//@ run-pass #![allow(non_camel_case_types)] diff --git a/tests/ui/numbers-arithmetic/suggest-float-literal.fixed b/tests/ui/numbers-arithmetic/suggest-float-literal.fixed index 9278262a6ff..da5f396a72c 100644 --- a/tests/ui/numbers-arithmetic/suggest-float-literal.fixed +++ b/tests/ui/numbers-arithmetic/suggest-float-literal.fixed @@ -1,4 +1,4 @@ -// run-rustfix +//@ run-rustfix #![allow(dead_code)] diff --git a/tests/ui/numbers-arithmetic/suggest-float-literal.rs b/tests/ui/numbers-arithmetic/suggest-float-literal.rs index 59e67f8d33e..4e95ca4b51e 100644 --- a/tests/ui/numbers-arithmetic/suggest-float-literal.rs +++ b/tests/ui/numbers-arithmetic/suggest-float-literal.rs @@ -1,4 +1,4 @@ -// run-rustfix +//@ run-rustfix #![allow(dead_code)] diff --git a/tests/ui/numbers-arithmetic/u128-as-f32.rs b/tests/ui/numbers-arithmetic/u128-as-f32.rs index 839ce932d9e..88579f507eb 100644 --- a/tests/ui/numbers-arithmetic/u128-as-f32.rs +++ b/tests/ui/numbers-arithmetic/u128-as-f32.rs @@ -1,4 +1,4 @@ -// run-pass +//@ run-pass #![feature(test)] #![deny(overflowing_literals)] diff --git a/tests/ui/numbers-arithmetic/u128.rs b/tests/ui/numbers-arithmetic/u128.rs index d7e28055b21..81451df6a72 100644 --- a/tests/ui/numbers-arithmetic/u128.rs +++ b/tests/ui/numbers-arithmetic/u128.rs @@ -1,4 +1,4 @@ -// run-pass +//@ run-pass #![feature(test)] diff --git a/tests/ui/numbers-arithmetic/u32-decr.rs b/tests/ui/numbers-arithmetic/u32-decr.rs index d9e09781877..2f68cf6f961 100644 --- a/tests/ui/numbers-arithmetic/u32-decr.rs +++ b/tests/ui/numbers-arithmetic/u32-decr.rs @@ -1,4 +1,4 @@ -// run-pass +//@ run-pass diff --git a/tests/ui/numbers-arithmetic/u8-incr-decr.rs b/tests/ui/numbers-arithmetic/u8-incr-decr.rs index b16ec011d06..a3b86c531f3 100644 --- a/tests/ui/numbers-arithmetic/u8-incr-decr.rs +++ b/tests/ui/numbers-arithmetic/u8-incr-decr.rs @@ -1,4 +1,4 @@ -// run-pass +//@ run-pass diff --git a/tests/ui/numbers-arithmetic/u8-incr.rs b/tests/ui/numbers-arithmetic/u8-incr.rs index 5242acf5b98..dd5d1680fac 100644 --- a/tests/ui/numbers-arithmetic/u8-incr.rs +++ b/tests/ui/numbers-arithmetic/u8-incr.rs @@ -1,4 +1,4 @@ -// run-pass +//@ run-pass diff --git a/tests/ui/numbers-arithmetic/uint.rs b/tests/ui/numbers-arithmetic/uint.rs index d219eae8f33..c64361c2726 100644 --- a/tests/ui/numbers-arithmetic/uint.rs +++ b/tests/ui/numbers-arithmetic/uint.rs @@ -1,7 +1,7 @@ -// run-pass +//@ run-pass -// pretty-expanded FIXME #23616 +//@ pretty-expanded FIXME #23616 pub fn main() { let _x: usize = 10 as usize; } diff --git a/tests/ui/numbers-arithmetic/unary-minus-suffix-inference.rs b/tests/ui/numbers-arithmetic/unary-minus-suffix-inference.rs index a4d0a849484..5e753fd257f 100644 --- a/tests/ui/numbers-arithmetic/unary-minus-suffix-inference.rs +++ b/tests/ui/numbers-arithmetic/unary-minus-suffix-inference.rs @@ -1,4 +1,4 @@ -// run-pass +//@ run-pass pub fn main() { let a = 1; diff --git a/tests/ui/numeric/numeric-cast-binop.fixed b/tests/ui/numeric/numeric-cast-binop.fixed index edb085e71d3..ca776d1b13d 100644 --- a/tests/ui/numeric/numeric-cast-binop.fixed +++ b/tests/ui/numeric/numeric-cast-binop.fixed @@ -1,4 +1,4 @@ -// run-rustfix +//@ run-rustfix // The `try_into` suggestion doesn't include this, but we do suggest it after applying it use std::convert::TryInto; diff --git a/tests/ui/numeric/numeric-cast-binop.rs b/tests/ui/numeric/numeric-cast-binop.rs index c1ed8de8ad8..498d486eb6f 100644 --- a/tests/ui/numeric/numeric-cast-binop.rs +++ b/tests/ui/numeric/numeric-cast-binop.rs @@ -1,4 +1,4 @@ -// run-rustfix +//@ run-rustfix // The `try_into` suggestion doesn't include this, but we do suggest it after applying it use std::convert::TryInto; diff --git a/tests/ui/numeric/numeric-cast.fixed b/tests/ui/numeric/numeric-cast.fixed index cf0560a1077..d5d25bbb57c 100644 --- a/tests/ui/numeric/numeric-cast.fixed +++ b/tests/ui/numeric/numeric-cast.fixed @@ -1,4 +1,4 @@ -// run-rustfix +//@ run-rustfix // The `try_into` suggestion doesn't include this, but we do suggest it after applying it use std::convert::TryInto; diff --git a/tests/ui/numeric/numeric-cast.rs b/tests/ui/numeric/numeric-cast.rs index 7bddfc50905..5a799f617e4 100644 --- a/tests/ui/numeric/numeric-cast.rs +++ b/tests/ui/numeric/numeric-cast.rs @@ -1,4 +1,4 @@ -// run-rustfix +//@ run-rustfix // The `try_into` suggestion doesn't include this, but we do suggest it after applying it use std::convert::TryInto; diff --git a/tests/ui/numeric/numeric-suffix/numeric-suffix-i32.fixed b/tests/ui/numeric/numeric-suffix/numeric-suffix-i32.fixed index 6e8c54df4b6..e3b613cc3f6 100644 --- a/tests/ui/numeric/numeric-suffix/numeric-suffix-i32.fixed +++ b/tests/ui/numeric/numeric-suffix/numeric-suffix-i32.fixed @@ -1,4 +1,4 @@ -// run-rustfix +//@ run-rustfix fn foo(_x: N) {} //~^ NOTE function defined here diff --git a/tests/ui/numeric/numeric-suffix/numeric-suffix-i32.rs b/tests/ui/numeric/numeric-suffix/numeric-suffix-i32.rs index b47b0ed02e7..3b384e76310 100644 --- a/tests/ui/numeric/numeric-suffix/numeric-suffix-i32.rs +++ b/tests/ui/numeric/numeric-suffix/numeric-suffix-i32.rs @@ -1,4 +1,4 @@ -// run-rustfix +//@ run-rustfix fn foo(_x: N) {} //~^ NOTE function defined here diff --git a/tests/ui/numeric/numeric-suffix/numeric-suffix-i64.fixed b/tests/ui/numeric/numeric-suffix/numeric-suffix-i64.fixed index 03821cd4470..0fcda6c1f80 100644 --- a/tests/ui/numeric/numeric-suffix/numeric-suffix-i64.fixed +++ b/tests/ui/numeric/numeric-suffix/numeric-suffix-i64.fixed @@ -1,4 +1,4 @@ -// run-rustfix +//@ run-rustfix fn foo(_x: N) {} //~^ NOTE function defined here diff --git a/tests/ui/numeric/numeric-suffix/numeric-suffix-i64.rs b/tests/ui/numeric/numeric-suffix/numeric-suffix-i64.rs index 629fe7e742c..9c912bc38da 100644 --- a/tests/ui/numeric/numeric-suffix/numeric-suffix-i64.rs +++ b/tests/ui/numeric/numeric-suffix/numeric-suffix-i64.rs @@ -1,4 +1,4 @@ -// run-rustfix +//@ run-rustfix fn foo(_x: N) {} //~^ NOTE function defined here diff --git a/tests/ui/numeric/numeric-suffix/numeric-suffix-isize.fixed b/tests/ui/numeric/numeric-suffix/numeric-suffix-isize.fixed index faed65ca410..23e7cf780e9 100644 --- a/tests/ui/numeric/numeric-suffix/numeric-suffix-isize.fixed +++ b/tests/ui/numeric/numeric-suffix/numeric-suffix-isize.fixed @@ -1,4 +1,4 @@ -// run-rustfix +//@ run-rustfix fn foo(_x: N) {} //~^ NOTE function defined here diff --git a/tests/ui/numeric/numeric-suffix/numeric-suffix-isize.rs b/tests/ui/numeric/numeric-suffix/numeric-suffix-isize.rs index df0b4cb6204..5d6fd4d932a 100644 --- a/tests/ui/numeric/numeric-suffix/numeric-suffix-isize.rs +++ b/tests/ui/numeric/numeric-suffix/numeric-suffix-isize.rs @@ -1,4 +1,4 @@ -// run-rustfix +//@ run-rustfix fn foo(_x: N) {} //~^ NOTE function defined here diff --git a/tests/ui/numeric/numeric-suffix/numeric-suffix-u32.fixed b/tests/ui/numeric/numeric-suffix/numeric-suffix-u32.fixed index 5955829e72c..2dd7d9aabdb 100644 --- a/tests/ui/numeric/numeric-suffix/numeric-suffix-u32.fixed +++ b/tests/ui/numeric/numeric-suffix/numeric-suffix-u32.fixed @@ -1,4 +1,4 @@ -// run-rustfix +//@ run-rustfix fn foo(_x: N) {} //~^ NOTE function defined here diff --git a/tests/ui/numeric/numeric-suffix/numeric-suffix-u32.rs b/tests/ui/numeric/numeric-suffix/numeric-suffix-u32.rs index 5c303036a79..46bbb033185 100644 --- a/tests/ui/numeric/numeric-suffix/numeric-suffix-u32.rs +++ b/tests/ui/numeric/numeric-suffix/numeric-suffix-u32.rs @@ -1,4 +1,4 @@ -// run-rustfix +//@ run-rustfix fn foo(_x: N) {} //~^ NOTE function defined here diff --git a/tests/ui/numeric/numeric-suffix/numeric-suffix-u64.fixed b/tests/ui/numeric/numeric-suffix/numeric-suffix-u64.fixed index 4623c211c1c..2dea195f098 100644 --- a/tests/ui/numeric/numeric-suffix/numeric-suffix-u64.fixed +++ b/tests/ui/numeric/numeric-suffix/numeric-suffix-u64.fixed @@ -1,4 +1,4 @@ -// run-rustfix +//@ run-rustfix fn foo(_x: N) {} //~^ NOTE function defined here diff --git a/tests/ui/numeric/numeric-suffix/numeric-suffix-u64.rs b/tests/ui/numeric/numeric-suffix/numeric-suffix-u64.rs index 3e9995c7496..6fca089b07d 100644 --- a/tests/ui/numeric/numeric-suffix/numeric-suffix-u64.rs +++ b/tests/ui/numeric/numeric-suffix/numeric-suffix-u64.rs @@ -1,4 +1,4 @@ -// run-rustfix +//@ run-rustfix fn foo(_x: N) {} //~^ NOTE function defined here diff --git a/tests/ui/numeric/numeric-suffix/numeric-suffix-usize.fixed b/tests/ui/numeric/numeric-suffix/numeric-suffix-usize.fixed index 6cb5243ca84..63422c305d3 100644 --- a/tests/ui/numeric/numeric-suffix/numeric-suffix-usize.fixed +++ b/tests/ui/numeric/numeric-suffix/numeric-suffix-usize.fixed @@ -1,4 +1,4 @@ -// run-rustfix +//@ run-rustfix fn foo(_x: N) {} //~^ NOTE function defined here diff --git a/tests/ui/numeric/numeric-suffix/numeric-suffix-usize.rs b/tests/ui/numeric/numeric-suffix/numeric-suffix-usize.rs index a2304ba26c6..4d20e4fc843 100644 --- a/tests/ui/numeric/numeric-suffix/numeric-suffix-usize.rs +++ b/tests/ui/numeric/numeric-suffix/numeric-suffix-usize.rs @@ -1,4 +1,4 @@ -// run-rustfix +//@ run-rustfix fn foo(_x: N) {} //~^ NOTE function defined here diff --git a/tests/ui/numeric/numeric-suffix/numeric-suffix.fixed b/tests/ui/numeric/numeric-suffix/numeric-suffix.fixed index 69934db217b..270afb63957 100644 --- a/tests/ui/numeric/numeric-suffix/numeric-suffix.fixed +++ b/tests/ui/numeric/numeric-suffix/numeric-suffix.fixed @@ -1,4 +1,4 @@ -// run-rustfix +//@ run-rustfix fn foo(_x: N) {} //~^ NOTE function defined here diff --git a/tests/ui/numeric/numeric-suffix/numeric-suffix.rs b/tests/ui/numeric/numeric-suffix/numeric-suffix.rs index dabf43f8204..05be58e335b 100644 --- a/tests/ui/numeric/numeric-suffix/numeric-suffix.rs +++ b/tests/ui/numeric/numeric-suffix/numeric-suffix.rs @@ -1,4 +1,4 @@ -// run-rustfix +//@ run-rustfix fn foo(_x: N) {} //~^ NOTE function defined here diff --git a/tests/ui/numeric/uppercase-base-prefix.fixed b/tests/ui/numeric/uppercase-base-prefix.fixed index 1b1c837ec50..8ddf01f73b4 100644 --- a/tests/ui/numeric/uppercase-base-prefix.fixed +++ b/tests/ui/numeric/uppercase-base-prefix.fixed @@ -1,4 +1,4 @@ -// run-rustfix +//@ run-rustfix // Checks that integers with an uppercase base prefix (0B, 0X, 0O) have a nice error #![allow(unused_variables)] diff --git a/tests/ui/numeric/uppercase-base-prefix.rs b/tests/ui/numeric/uppercase-base-prefix.rs index 233d553da65..ae423eec593 100644 --- a/tests/ui/numeric/uppercase-base-prefix.rs +++ b/tests/ui/numeric/uppercase-base-prefix.rs @@ -1,4 +1,4 @@ -// run-rustfix +//@ run-rustfix // Checks that integers with an uppercase base prefix (0B, 0X, 0O) have a nice error #![allow(unused_variables)] diff --git a/tests/ui/object-lifetime/object-lifetime-default-default-to-static.rs b/tests/ui/object-lifetime/object-lifetime-default-default-to-static.rs index 467767ae59d..edbd9f35d4d 100644 --- a/tests/ui/object-lifetime/object-lifetime-default-default-to-static.rs +++ b/tests/ui/object-lifetime/object-lifetime-default-default-to-static.rs @@ -1,8 +1,8 @@ -// run-pass +//@ run-pass // Test that `Box` is equivalent to `Box`, both in // fields and fn arguments. -// pretty-expanded FIXME #23616 +//@ pretty-expanded FIXME #23616 #![allow(dead_code)] diff --git a/tests/ui/object-lifetime/object-lifetime-default-dyn-binding-static.rs b/tests/ui/object-lifetime/object-lifetime-default-dyn-binding-static.rs index 339f3356bd7..8defe20f5f4 100644 --- a/tests/ui/object-lifetime/object-lifetime-default-dyn-binding-static.rs +++ b/tests/ui/object-lifetime/object-lifetime-default-dyn-binding-static.rs @@ -1,7 +1,7 @@ // Test that `dyn Bar` uses `'static` as the default object // lifetime bound for the type `XX`. // -// check-pass +//@ check-pass trait Foo { type Item: ?Sized; diff --git a/tests/ui/object-lifetime/object-lifetime-default-from-ref-struct.rs b/tests/ui/object-lifetime/object-lifetime-default-from-ref-struct.rs index e1a865fa503..986fc836799 100644 --- a/tests/ui/object-lifetime/object-lifetime-default-from-ref-struct.rs +++ b/tests/ui/object-lifetime/object-lifetime-default-from-ref-struct.rs @@ -1,8 +1,8 @@ -// run-pass +//@ run-pass // Test that the lifetime of the enclosing `&` is used for the object // lifetime bound. -// pretty-expanded FIXME #23616 +//@ pretty-expanded FIXME #23616 #![allow(dead_code)] diff --git a/tests/ui/object-lifetime/object-lifetime-default-from-rptr-box.rs b/tests/ui/object-lifetime/object-lifetime-default-from-rptr-box.rs index b61083078cc..3c88f2b9f37 100644 --- a/tests/ui/object-lifetime/object-lifetime-default-from-rptr-box.rs +++ b/tests/ui/object-lifetime/object-lifetime-default-from-rptr-box.rs @@ -1,8 +1,8 @@ -// run-pass +//@ run-pass // Test that the lifetime from the enclosing `&` is "inherited" // through the `Box` struct. -// pretty-expanded FIXME #23616 +//@ pretty-expanded FIXME #23616 #![allow(dead_code)] diff --git a/tests/ui/object-lifetime/object-lifetime-default-from-rptr-mut.rs b/tests/ui/object-lifetime/object-lifetime-default-from-rptr-mut.rs index a09fc03ab9b..412695f7086 100644 --- a/tests/ui/object-lifetime/object-lifetime-default-from-rptr-mut.rs +++ b/tests/ui/object-lifetime/object-lifetime-default-from-rptr-mut.rs @@ -1,8 +1,8 @@ -// run-pass +//@ run-pass // Test that the lifetime of the enclosing `&` is used for the object // lifetime bound. -// pretty-expanded FIXME #23616 +//@ pretty-expanded FIXME #23616 #![allow(dead_code)] diff --git a/tests/ui/object-lifetime/object-lifetime-default-from-rptr-struct.rs b/tests/ui/object-lifetime/object-lifetime-default-from-rptr-struct.rs index d3e92e16246..591f843a284 100644 --- a/tests/ui/object-lifetime/object-lifetime-default-from-rptr-struct.rs +++ b/tests/ui/object-lifetime/object-lifetime-default-from-rptr-struct.rs @@ -1,8 +1,8 @@ -// run-pass +//@ run-pass // Test that the lifetime from the enclosing `&` is "inherited" // through the `MyBox` struct. -// pretty-expanded FIXME #23616 +//@ pretty-expanded FIXME #23616 #![allow(dead_code)] diff --git a/tests/ui/object-lifetime/object-lifetime-default-from-rptr.rs b/tests/ui/object-lifetime/object-lifetime-default-from-rptr.rs index 5093b1c27d0..bc47b8d46a1 100644 --- a/tests/ui/object-lifetime/object-lifetime-default-from-rptr.rs +++ b/tests/ui/object-lifetime/object-lifetime-default-from-rptr.rs @@ -1,8 +1,8 @@ -// run-pass +//@ run-pass // Test that the lifetime of the enclosing `&` is used for the object // lifetime bound. -// pretty-expanded FIXME #23616 +//@ pretty-expanded FIXME #23616 #![allow(dead_code)] diff --git a/tests/ui/object-lifetime/object-lifetime-default-inferred.rs b/tests/ui/object-lifetime/object-lifetime-default-inferred.rs index 8a1156b8fc8..53b9c488645 100644 --- a/tests/ui/object-lifetime/object-lifetime-default-inferred.rs +++ b/tests/ui/object-lifetime/object-lifetime-default-inferred.rs @@ -1,8 +1,8 @@ -// run-pass +//@ run-pass // Test that even with prior inferred parameters, object lifetimes of objects after are still // valid. -// pretty-expanded FIXME #23616 +//@ pretty-expanded FIXME #23616 #![allow(dead_code)] #![feature(generic_arg_infer)] diff --git a/tests/ui/object-safety/assoc_const_bounds.rs b/tests/ui/object-safety/assoc_const_bounds.rs index bfa21fd9aea..32c4de1981b 100644 --- a/tests/ui/object-safety/assoc_const_bounds.rs +++ b/tests/ui/object-safety/assoc_const_bounds.rs @@ -1,7 +1,7 @@ #![feature(generic_const_items)] #![allow(incomplete_features, dead_code)] -// check-pass +//@ check-pass trait Foo { const BAR: bool diff --git a/tests/ui/object-safety/assoc_const_bounds_sized.rs b/tests/ui/object-safety/assoc_const_bounds_sized.rs index 87d1f06f036..1272a735e83 100644 --- a/tests/ui/object-safety/assoc_const_bounds_sized.rs +++ b/tests/ui/object-safety/assoc_const_bounds_sized.rs @@ -1,7 +1,7 @@ #![feature(generic_const_items)] #![allow(incomplete_features, dead_code)] -// check-pass +//@ check-pass trait Foo { const BAR: bool diff --git a/tests/ui/object-safety/assoc_type_bounds_implicit_sized.fixed b/tests/ui/object-safety/assoc_type_bounds_implicit_sized.fixed index 52046a8ab69..88697bad4d7 100644 --- a/tests/ui/object-safety/assoc_type_bounds_implicit_sized.fixed +++ b/tests/ui/object-safety/assoc_type_bounds_implicit_sized.fixed @@ -1,4 +1,4 @@ -// run-rustfix +//@ run-rustfix #![allow(dead_code)] trait TraitWithAType { type Item: ?Sized; diff --git a/tests/ui/object-safety/assoc_type_bounds_implicit_sized.rs b/tests/ui/object-safety/assoc_type_bounds_implicit_sized.rs index 96620c0abda..944b296aa4d 100644 --- a/tests/ui/object-safety/assoc_type_bounds_implicit_sized.rs +++ b/tests/ui/object-safety/assoc_type_bounds_implicit_sized.rs @@ -1,4 +1,4 @@ -// run-rustfix +//@ run-rustfix #![allow(dead_code)] trait TraitWithAType { type Item; diff --git a/tests/ui/object-safety/assoc_type_bounds_sized.rs b/tests/ui/object-safety/assoc_type_bounds_sized.rs index 6d10ceeb1b4..7535871afe5 100644 --- a/tests/ui/object-safety/assoc_type_bounds_sized.rs +++ b/tests/ui/object-safety/assoc_type_bounds_sized.rs @@ -1,7 +1,7 @@ //! This test checks that associated types only need to be //! mentioned in trait objects, if they don't require `Self: Sized`. -// check-pass +//@ check-pass trait Foo { type Bar diff --git a/tests/ui/object-safety/assoc_type_bounds_sized_unnecessary.rs b/tests/ui/object-safety/assoc_type_bounds_sized_unnecessary.rs index 34daa81e48e..711bed808cc 100644 --- a/tests/ui/object-safety/assoc_type_bounds_sized_unnecessary.rs +++ b/tests/ui/object-safety/assoc_type_bounds_sized_unnecessary.rs @@ -1,4 +1,4 @@ -// check-pass +//@ check-pass trait Foo { type Bar diff --git a/tests/ui/object-safety/avoid-ice-on-warning-2.rs b/tests/ui/object-safety/avoid-ice-on-warning-2.rs index eabfd31dda6..db2f4aea05b 100644 --- a/tests/ui/object-safety/avoid-ice-on-warning-2.rs +++ b/tests/ui/object-safety/avoid-ice-on-warning-2.rs @@ -1,6 +1,6 @@ -// revisions: old new -//[old] edition:2015 -//[new] edition:2021 +//@ revisions: old new +//@[old] edition:2015 +//@[new] edition:2021 fn id(f: Copy) -> usize { //~^ ERROR the trait `Copy` cannot be made into an object //~| ERROR: the size for values of type `(dyn Copy + 'static)` diff --git a/tests/ui/object-safety/avoid-ice-on-warning-3.rs b/tests/ui/object-safety/avoid-ice-on-warning-3.rs index 40563e233de..38bee8142bb 100644 --- a/tests/ui/object-safety/avoid-ice-on-warning-3.rs +++ b/tests/ui/object-safety/avoid-ice-on-warning-3.rs @@ -1,6 +1,6 @@ -// revisions: old new -//[old] edition:2015 -//[new] edition:2021 +//@ revisions: old new +//@[old] edition:2015 +//@[new] edition:2021 trait B { fn f(a: A) -> A; } //~^ ERROR the trait `A` cannot be made into an object //[old]~| WARN trait objects without an explicit `dyn` are deprecated diff --git a/tests/ui/object-safety/avoid-ice-on-warning.rs b/tests/ui/object-safety/avoid-ice-on-warning.rs index 5192da94216..b90d8911d50 100644 --- a/tests/ui/object-safety/avoid-ice-on-warning.rs +++ b/tests/ui/object-safety/avoid-ice-on-warning.rs @@ -1,6 +1,6 @@ -// revisions: old new -//[old] edition:2015 -//[new] edition:2021 +//@ revisions: old new +//@[old] edition:2015 +//@[new] edition:2021 fn call_this(f: F) : Fn(&str) + call_that {} //~^ ERROR return types are denoted using `->` //~| ERROR cannot find trait `call_that` in this scope diff --git a/tests/ui/object-safety/bare-trait-dont-suggest-dyn.new.fixed b/tests/ui/object-safety/bare-trait-dont-suggest-dyn.new.fixed index 301c36c6191..aee05f5e512 100644 --- a/tests/ui/object-safety/bare-trait-dont-suggest-dyn.new.fixed +++ b/tests/ui/object-safety/bare-trait-dont-suggest-dyn.new.fixed @@ -1,7 +1,7 @@ -// revisions: old new -//[old] edition:2015 -//[new] edition:2021 -//[new] run-rustfix +//@ revisions: old new +//@[old] edition:2015 +//@[new] edition:2021 +//@[new] run-rustfix // FIXME: the test suite tries to create a crate called `bare_trait_dont_suggest_dyn.new` #![crate_name="bare_trait_dont_suggest_dyn"] #![deny(bare_trait_objects)] diff --git a/tests/ui/object-safety/bare-trait-dont-suggest-dyn.rs b/tests/ui/object-safety/bare-trait-dont-suggest-dyn.rs index 64586b77b8c..e927b510b9d 100644 --- a/tests/ui/object-safety/bare-trait-dont-suggest-dyn.rs +++ b/tests/ui/object-safety/bare-trait-dont-suggest-dyn.rs @@ -1,7 +1,7 @@ -// revisions: old new -//[old] edition:2015 -//[new] edition:2021 -//[new] run-rustfix +//@ revisions: old new +//@[old] edition:2015 +//@[new] edition:2021 +//@[new] run-rustfix // FIXME: the test suite tries to create a crate called `bare_trait_dont_suggest_dyn.new` #![crate_name="bare_trait_dont_suggest_dyn"] #![deny(bare_trait_objects)] diff --git a/tests/ui/object-safety/call-when-assoc-ty-is-sized.rs b/tests/ui/object-safety/call-when-assoc-ty-is-sized.rs index 21dda7b8c9b..b8445849169 100644 --- a/tests/ui/object-safety/call-when-assoc-ty-is-sized.rs +++ b/tests/ui/object-safety/call-when-assoc-ty-is-sized.rs @@ -1,6 +1,6 @@ -// check-pass -// revisions: current next -//[next] compile-flags: -Znext-solver +//@ check-pass +//@ revisions: current next +//@[next] compile-flags: -Znext-solver trait Foo { type Bar<'a> diff --git a/tests/ui/object-safety/issue-102762.rs b/tests/ui/object-safety/issue-102762.rs index ed0bee5d37e..576f73e08bc 100644 --- a/tests/ui/object-safety/issue-102762.rs +++ b/tests/ui/object-safety/issue-102762.rs @@ -1,4 +1,4 @@ -// compile-flags: --crate-type=lib +//@ compile-flags: --crate-type=lib // This test checks that the `where_clauses_object_safety` lint does not cause // other object safety *hard errors* to be suppressed, because we currently // only emit one object safety error per trait... diff --git a/tests/ui/object-safety/issue-102933.rs b/tests/ui/object-safety/issue-102933.rs index 843391cffb2..aa678fea176 100644 --- a/tests/ui/object-safety/issue-102933.rs +++ b/tests/ui/object-safety/issue-102933.rs @@ -1,4 +1,4 @@ -// check-pass +//@ check-pass use std::future::Future; diff --git a/tests/ui/object-safety/issue-106247.rs b/tests/ui/object-safety/issue-106247.rs index 64bf59e5d3a..78bae568161 100644 --- a/tests/ui/object-safety/issue-106247.rs +++ b/tests/ui/object-safety/issue-106247.rs @@ -1,4 +1,4 @@ -// check-pass +//@ check-pass #![deny(where_clauses_object_safety)] diff --git a/tests/ui/object-safety/object-safety-associated-consts.rs b/tests/ui/object-safety/object-safety-associated-consts.rs index 622f3a0f92e..a090214bbb4 100644 --- a/tests/ui/object-safety/object-safety-associated-consts.rs +++ b/tests/ui/object-safety/object-safety-associated-consts.rs @@ -1,7 +1,7 @@ // Check that we correctly prevent users from making trait objects // from traits with associated consts. // -// revisions: curr object_safe_for_dispatch +//@ revisions: curr object_safe_for_dispatch #![cfg_attr(object_safe_for_dispatch, feature(object_safe_for_dispatch))] diff --git a/tests/ui/object-safety/object-safety-by-value-self.rs b/tests/ui/object-safety/object-safety-by-value-self.rs index c74a4d1cbbb..0d20032327c 100644 --- a/tests/ui/object-safety/object-safety-by-value-self.rs +++ b/tests/ui/object-safety/object-safety-by-value-self.rs @@ -1,6 +1,6 @@ // Check that a trait with by-value self is considered object-safe. -// build-pass (FIXME(62277): could be check-pass?) +//@ build-pass (FIXME(62277): could be check-pass?) #![allow(dead_code)] #![allow(trivial_casts)] diff --git a/tests/ui/object-safety/object-safety-generics.rs b/tests/ui/object-safety/object-safety-generics.rs index 4528b4ea6e0..f005a689ac4 100644 --- a/tests/ui/object-safety/object-safety-generics.rs +++ b/tests/ui/object-safety/object-safety-generics.rs @@ -1,7 +1,7 @@ // Check that we correctly prevent users from making trait objects // from traits with generic methods, unless `where Self : Sized` is // present. -// revisions: curr object_safe_for_dispatch +//@ revisions: curr object_safe_for_dispatch #![cfg_attr(object_safe_for_dispatch, feature(object_safe_for_dispatch))] diff --git a/tests/ui/object-safety/object-safety-mentions-Self.rs b/tests/ui/object-safety/object-safety-mentions-Self.rs index 91582aa6a04..1311faf97bc 100644 --- a/tests/ui/object-safety/object-safety-mentions-Self.rs +++ b/tests/ui/object-safety/object-safety-mentions-Self.rs @@ -2,7 +2,7 @@ // form traits that make use of `Self` in an argument or return // position, unless `where Self : Sized` is present.. // -// revisions: curr object_safe_for_dispatch +//@ revisions: curr object_safe_for_dispatch #![cfg_attr(object_safe_for_dispatch, feature(object_safe_for_dispatch))] diff --git a/tests/ui/object-safety/object-safety-no-static.rs b/tests/ui/object-safety/object-safety-no-static.rs index abfaa11c9e4..4f4e03d734e 100644 --- a/tests/ui/object-safety/object-safety-no-static.rs +++ b/tests/ui/object-safety/object-safety-no-static.rs @@ -1,7 +1,7 @@ // Check that we correctly prevent users from making trait objects // from traits with static methods. // -// revisions: curr object_safe_for_dispatch +//@ revisions: curr object_safe_for_dispatch #![cfg_attr(object_safe_for_dispatch, feature(object_safe_for_dispatch))] diff --git a/tests/ui/object-safety/object-safety-phantom-fn.rs b/tests/ui/object-safety/object-safety-phantom-fn.rs index 3ffeb81c1cb..1019c24859f 100644 --- a/tests/ui/object-safety/object-safety-phantom-fn.rs +++ b/tests/ui/object-safety/object-safety-phantom-fn.rs @@ -1,6 +1,6 @@ // Check that `Self` appearing in a phantom fn does not make a trait not object safe. -// build-pass (FIXME(62277): could be check-pass?) +//@ build-pass (FIXME(62277): could be check-pass?) #![allow(dead_code)] trait Baz { diff --git a/tests/ui/object-safety/object-safety-sized-2.rs b/tests/ui/object-safety/object-safety-sized-2.rs index 607b7c68f7f..cfb5d588d70 100644 --- a/tests/ui/object-safety/object-safety-sized-2.rs +++ b/tests/ui/object-safety/object-safety-sized-2.rs @@ -1,7 +1,7 @@ // Check that we correctly prevent users from making trait objects // from traits where `Self : Sized`. // -// revisions: curr object_safe_for_dispatch +//@ revisions: curr object_safe_for_dispatch #![cfg_attr(object_safe_for_dispatch, feature(object_safe_for_dispatch))] diff --git a/tests/ui/object-safety/object-safety-sized.rs b/tests/ui/object-safety/object-safety-sized.rs index ab7aa57611d..f4d6c945b33 100644 --- a/tests/ui/object-safety/object-safety-sized.rs +++ b/tests/ui/object-safety/object-safety-sized.rs @@ -1,7 +1,7 @@ // Check that we correctly prevent users from making trait objects // from traits where `Self : Sized`. // -// revisions: curr object_safe_for_dispatch +//@ revisions: curr object_safe_for_dispatch #![cfg_attr(object_safe_for_dispatch, feature(object_safe_for_dispatch))] diff --git a/tests/ui/objects-coerce-freeze-borrored.rs b/tests/ui/objects-coerce-freeze-borrored.rs index 704d77480b8..e122bb99380 100644 --- a/tests/ui/objects-coerce-freeze-borrored.rs +++ b/tests/ui/objects-coerce-freeze-borrored.rs @@ -1,4 +1,4 @@ -// run-pass +//@ run-pass // Test that we can coerce an `@Object` to an `&Object` diff --git a/tests/ui/offset-of/offset-of-must-use.rs b/tests/ui/offset-of/offset-of-must-use.rs index e4b092fcedf..f0c242891d8 100644 --- a/tests/ui/offset-of/offset-of-must-use.rs +++ b/tests/ui/offset-of/offset-of-must-use.rs @@ -1,4 +1,4 @@ -// check-pass +//@ check-pass #![warn(unused)] diff --git a/tests/ui/offset-of/offset-of-tuple-nested.rs b/tests/ui/offset-of/offset-of-tuple-nested.rs index 212176b2427..4a58b7167cb 100644 --- a/tests/ui/offset-of/offset-of-tuple-nested.rs +++ b/tests/ui/offset-of/offset-of-tuple-nested.rs @@ -1,4 +1,4 @@ -// run-pass +//@ run-pass // Test for issue #112204 -- make sure this goes through the entire compilation pipeline, // similar to why `offset-of-unsized.rs` is also build-pass diff --git a/tests/ui/offset-of/offset-of-unsized.rs b/tests/ui/offset-of/offset-of-unsized.rs index b70529ed7b8..5a84adcb9e5 100644 --- a/tests/ui/offset-of/offset-of-unsized.rs +++ b/tests/ui/offset-of/offset-of-unsized.rs @@ -1,4 +1,4 @@ -// build-pass +//@ build-pass // regression test for #112051, not in `offset-of-dst` as the issue is in codegen, // and isn't triggered in the presence of typeck errors diff --git a/tests/ui/offset-of/offset-of-unstable-with-feature.rs b/tests/ui/offset-of/offset-of-unstable-with-feature.rs index be275564a0a..c9d4f30e99a 100644 --- a/tests/ui/offset-of/offset-of-unstable-with-feature.rs +++ b/tests/ui/offset-of/offset-of-unstable-with-feature.rs @@ -1,5 +1,5 @@ -// check-pass -// aux-build:offset-of-staged-api.rs +//@ check-pass +//@ aux-build:offset-of-staged-api.rs #![feature(offset_of_nested, unstable_test_feature)] diff --git a/tests/ui/offset-of/offset-of-unstable.rs b/tests/ui/offset-of/offset-of-unstable.rs index da0882abd22..ab6f89ce52a 100644 --- a/tests/ui/offset-of/offset-of-unstable.rs +++ b/tests/ui/offset-of/offset-of-unstable.rs @@ -1,4 +1,4 @@ -// aux-build:offset-of-staged-api.rs +//@ aux-build:offset-of-staged-api.rs #![feature(offset_of_nested)] diff --git a/tests/ui/on-unimplemented/no-debug.rs b/tests/ui/on-unimplemented/no-debug.rs index bdc80c5b357..65a6a8e44b4 100644 --- a/tests/ui/on-unimplemented/no-debug.rs +++ b/tests/ui/on-unimplemented/no-debug.rs @@ -1,4 +1,4 @@ -// aux-build:no_debug.rs +//@ aux-build:no_debug.rs extern crate no_debug; diff --git a/tests/ui/oom_unwind.rs b/tests/ui/oom_unwind.rs index 21a8fb2b22b..be5e63d430b 100644 --- a/tests/ui/oom_unwind.rs +++ b/tests/ui/oom_unwind.rs @@ -1,8 +1,8 @@ -// compile-flags: -Z oom=panic -// run-pass -// no-prefer-dynamic -// needs-unwind -// only-linux +//@ compile-flags: -Z oom=panic +//@ run-pass +//@ no-prefer-dynamic +//@ needs-unwind +//@ only-linux use std::hint::black_box; use std::mem::forget; diff --git a/tests/ui/op-assign-builtins-by-ref.rs b/tests/ui/op-assign-builtins-by-ref.rs index 96853854d6c..73788da9232 100644 --- a/tests/ui/op-assign-builtins-by-ref.rs +++ b/tests/ui/op-assign-builtins-by-ref.rs @@ -1,4 +1,4 @@ -// run-pass +//@ run-pass fn main() { // test compound assignment operators with ref as right-hand side, diff --git a/tests/ui/opeq.rs b/tests/ui/opeq.rs index 9737be97fa3..956ea0684fa 100644 --- a/tests/ui/opeq.rs +++ b/tests/ui/opeq.rs @@ -1,4 +1,4 @@ -// run-pass +//@ run-pass pub fn main() { let mut x: isize = 1; diff --git a/tests/ui/optimization-fuel-0.rs b/tests/ui/optimization-fuel-0.rs index 77c727ad0f7..cbcb1d329a3 100644 --- a/tests/ui/optimization-fuel-0.rs +++ b/tests/ui/optimization-fuel-0.rs @@ -1,10 +1,10 @@ -// run-pass +//@ run-pass #![crate_name="foo"] use std::mem::size_of; -// compile-flags: -Z fuel=foo=0 +//@ compile-flags: -Z fuel=foo=0 #[allow(dead_code)] struct S1(u8, u16, u8); diff --git a/tests/ui/optimization-fuel-1.rs b/tests/ui/optimization-fuel-1.rs index 8b3d139201e..97edb0bd259 100644 --- a/tests/ui/optimization-fuel-1.rs +++ b/tests/ui/optimization-fuel-1.rs @@ -1,10 +1,10 @@ -// run-pass +//@ run-pass #![crate_name="foo"] use std::mem::size_of; -// compile-flags: -Z fuel=foo=1 +//@ compile-flags: -Z fuel=foo=1 #[allow(dead_code)] struct S1(u8, u16, u8); diff --git a/tests/ui/optimization-remark.rs b/tests/ui/optimization-remark.rs index 8fd30466f43..ebcf3b40ab2 100644 --- a/tests/ui/optimization-remark.rs +++ b/tests/ui/optimization-remark.rs @@ -1,20 +1,20 @@ -// build-pass -// ignore-pass -// revisions: all inline merge1 merge2 -// compile-flags: --crate-type=lib -Cdebuginfo=1 -Copt-level=2 +//@ build-pass +//@ ignore-pass +//@ revisions: all inline merge1 merge2 +//@ compile-flags: --crate-type=lib -Cdebuginfo=1 -Copt-level=2 // // Check that remarks can be enabled individually or with "all": // -// [all] compile-flags: -Cremark=all -// [inline] compile-flags: -Cremark=inline +//@ [all] compile-flags: -Cremark=all +//@ [inline] compile-flags: -Cremark=inline // // Check that values of -Cremark flag are accumulated: // -// [merge1] compile-flags: -Cremark=all -Cremark=giraffe -// [merge2] compile-flags: -Cremark=inline -Cremark=giraffe +//@ [merge1] compile-flags: -Cremark=all -Cremark=giraffe +//@ [merge2] compile-flags: -Cremark=inline -Cremark=giraffe // -// error-pattern: inline (missed): 'f' not inlined into 'g' -// dont-check-compiler-stderr +//@ error-pattern: inline (missed): 'f' not inlined into 'g' +//@ dont-check-compiler-stderr #[no_mangle] #[inline(never)] diff --git a/tests/ui/or-patterns/basic-switch.rs b/tests/ui/or-patterns/basic-switch.rs index 674fbc3cc99..479cddbe142 100644 --- a/tests/ui/or-patterns/basic-switch.rs +++ b/tests/ui/or-patterns/basic-switch.rs @@ -1,7 +1,7 @@ // Test basic or-patterns when the target pattern type will be lowered to a // `Switch` (an `enum`). -// run-pass +//@ run-pass #[derive(Debug)] enum Test { diff --git a/tests/ui/or-patterns/basic-switchint.rs b/tests/ui/or-patterns/basic-switchint.rs index adb902caf01..e4efef59730 100644 --- a/tests/ui/or-patterns/basic-switchint.rs +++ b/tests/ui/or-patterns/basic-switchint.rs @@ -1,7 +1,7 @@ // Test basic or-patterns when the target pattern type will be lowered to // a `SwitchInt`. This will happen when the target type is an integer. -// run-pass +//@ run-pass #[derive(Debug, PartialEq)] enum MatchArm { diff --git a/tests/ui/or-patterns/bindings-runpass-1.rs b/tests/ui/or-patterns/bindings-runpass-1.rs index 3406d5197c4..7bb34f72ecc 100644 --- a/tests/ui/or-patterns/bindings-runpass-1.rs +++ b/tests/ui/or-patterns/bindings-runpass-1.rs @@ -1,4 +1,4 @@ -// run-pass +//@ run-pass fn two_bindings(x: &((bool, bool), u8)) -> u8 { match x { diff --git a/tests/ui/or-patterns/bindings-runpass-2.rs b/tests/ui/or-patterns/bindings-runpass-2.rs index 5b9bb748c7c..657d7f1ed18 100644 --- a/tests/ui/or-patterns/bindings-runpass-2.rs +++ b/tests/ui/or-patterns/bindings-runpass-2.rs @@ -1,4 +1,4 @@ -// run-pass +//@ run-pass fn or_at(x: Result) -> u32 { match x { diff --git a/tests/ui/or-patterns/box-patterns.rs b/tests/ui/or-patterns/box-patterns.rs index 73051401c18..6a3d048f8a6 100644 --- a/tests/ui/or-patterns/box-patterns.rs +++ b/tests/ui/or-patterns/box-patterns.rs @@ -1,6 +1,6 @@ // Test or-patterns with box-patterns -// run-pass +//@ run-pass #![feature(box_patterns)] diff --git a/tests/ui/or-patterns/consistent-bindings.rs b/tests/ui/or-patterns/consistent-bindings.rs index ecae1d8a273..75cc24e3336 100644 --- a/tests/ui/or-patterns/consistent-bindings.rs +++ b/tests/ui/or-patterns/consistent-bindings.rs @@ -1,8 +1,8 @@ // Check that or-patterns with consistent bindings across arms are allowed. -// edition:2018 +//@ edition:2018 -// check-pass +//@ check-pass fn main() { // One level: diff --git a/tests/ui/or-patterns/const-fn.rs b/tests/ui/or-patterns/const-fn.rs index ca512ac7119..92894aa4d17 100644 --- a/tests/ui/or-patterns/const-fn.rs +++ b/tests/ui/or-patterns/const-fn.rs @@ -1,4 +1,4 @@ -// check-pass +//@ check-pass const fn foo((Ok(a) | Err(a)): Result) { let x = Ok(3); diff --git a/tests/ui/or-patterns/exhaustiveness-pass.rs b/tests/ui/or-patterns/exhaustiveness-pass.rs index a52e08c507d..a80c6bdec20 100644 --- a/tests/ui/or-patterns/exhaustiveness-pass.rs +++ b/tests/ui/or-patterns/exhaustiveness-pass.rs @@ -1,6 +1,6 @@ #![deny(unreachable_patterns)] -// check-pass +//@ check-pass // We wrap patterns in a tuple because top-level or-patterns were special-cased. fn main() { diff --git a/tests/ui/or-patterns/fn-param-wrap-parens.fixed b/tests/ui/or-patterns/fn-param-wrap-parens.fixed index b9490aaf9de..7b0bbd04d97 100644 --- a/tests/ui/or-patterns/fn-param-wrap-parens.fixed +++ b/tests/ui/or-patterns/fn-param-wrap-parens.fixed @@ -1,6 +1,6 @@ // Test the suggestion to wrap an or-pattern as a function parameter in parens. -// run-rustfix +//@ run-rustfix #![allow(warnings)] diff --git a/tests/ui/or-patterns/fn-param-wrap-parens.rs b/tests/ui/or-patterns/fn-param-wrap-parens.rs index 8e703d274c7..dadbb8a906a 100644 --- a/tests/ui/or-patterns/fn-param-wrap-parens.rs +++ b/tests/ui/or-patterns/fn-param-wrap-parens.rs @@ -1,6 +1,6 @@ // Test the suggestion to wrap an or-pattern as a function parameter in parens. -// run-rustfix +//@ run-rustfix #![allow(warnings)] diff --git a/tests/ui/or-patterns/for-loop.rs b/tests/ui/or-patterns/for-loop.rs index 11b61cb69f1..4fa8b766521 100644 --- a/tests/ui/or-patterns/for-loop.rs +++ b/tests/ui/or-patterns/for-loop.rs @@ -1,5 +1,5 @@ // Check that or patterns are lowered correctly in `for` loops. -// run-pass +//@ run-pass fn main() { let v = vec![Ok(2), Err(3), Ok(5)]; diff --git a/tests/ui/or-patterns/if-let-while-let.rs b/tests/ui/or-patterns/if-let-while-let.rs index 92a1bb25666..609c59f4a3e 100644 --- a/tests/ui/or-patterns/if-let-while-let.rs +++ b/tests/ui/or-patterns/if-let-while-let.rs @@ -1,5 +1,5 @@ // Check that or patterns are lowered correctly in `if let` and `while let` expressions. -// run-pass +//@ run-pass fn main() { let mut opt = Some(3); diff --git a/tests/ui/or-patterns/inner-or-pat.rs b/tests/ui/or-patterns/inner-or-pat.rs index f4cf4b0c188..ceb0a8b3f79 100644 --- a/tests/ui/or-patterns/inner-or-pat.rs +++ b/tests/ui/or-patterns/inner-or-pat.rs @@ -1,7 +1,7 @@ -// revisions: or1 or2 or3 or4 or5 -// [or1] run-pass -// [or2] run-pass -// [or5] run-pass +//@ revisions: or1 or2 or3 or4 or5 +//@ [or1] run-pass +//@ [or2] run-pass +//@ [or5] run-pass #![allow(unreachable_patterns)] #![allow(unused_variables)] diff --git a/tests/ui/or-patterns/issue-67514-irrefutable-param.rs b/tests/ui/or-patterns/issue-67514-irrefutable-param.rs index 73931def895..256366e97a8 100644 --- a/tests/ui/or-patterns/issue-67514-irrefutable-param.rs +++ b/tests/ui/or-patterns/issue-67514-irrefutable-param.rs @@ -1,6 +1,6 @@ // Check that we don't ICE for irrefutable or-patterns in function parameters -// check-pass +//@ check-pass fn foo((Some(_) | None): Option) {} diff --git a/tests/ui/or-patterns/issue-68785-irrefutable-param-with-at.rs b/tests/ui/or-patterns/issue-68785-irrefutable-param-with-at.rs index 7339a7e23f9..54970e5c34c 100644 --- a/tests/ui/or-patterns/issue-68785-irrefutable-param-with-at.rs +++ b/tests/ui/or-patterns/issue-68785-irrefutable-param-with-at.rs @@ -1,4 +1,4 @@ -// check-pass +//@ check-pass enum MyEnum { FirstCase(u8), diff --git a/tests/ui/or-patterns/issue-69875-should-have-been-expanded-earlier.rs b/tests/ui/or-patterns/issue-69875-should-have-been-expanded-earlier.rs index 408ac24f39a..fc6f9abc4ac 100644 --- a/tests/ui/or-patterns/issue-69875-should-have-been-expanded-earlier.rs +++ b/tests/ui/or-patterns/issue-69875-should-have-been-expanded-earlier.rs @@ -1,4 +1,4 @@ -// check-pass +//@ check-pass fn main() { let (0 | (1 | _)) = 0; diff --git a/tests/ui/or-patterns/issue-70413-no-unreachable-pat-and-guard.rs b/tests/ui/or-patterns/issue-70413-no-unreachable-pat-and-guard.rs index 8a3c640b10d..7d62364a6ae 100644 --- a/tests/ui/or-patterns/issue-70413-no-unreachable-pat-and-guard.rs +++ b/tests/ui/or-patterns/issue-70413-no-unreachable-pat-and-guard.rs @@ -1,4 +1,4 @@ -// check-pass +//@ check-pass #![deny(unreachable_patterns)] diff --git a/tests/ui/or-patterns/let-pattern.rs b/tests/ui/or-patterns/let-pattern.rs index 97207e83e2e..f6ec0363311 100644 --- a/tests/ui/or-patterns/let-pattern.rs +++ b/tests/ui/or-patterns/let-pattern.rs @@ -1,4 +1,4 @@ -// run-pass +//@ run-pass fn or_pat_let(x: Result) -> u32 { let (Ok(y) | Err(y)) = x; diff --git a/tests/ui/or-patterns/macro-pat.rs b/tests/ui/or-patterns/macro-pat.rs index 20d8f84c247..f5988e0b00d 100644 --- a/tests/ui/or-patterns/macro-pat.rs +++ b/tests/ui/or-patterns/macro-pat.rs @@ -1,5 +1,5 @@ -// run-pass -// edition:2021 +//@ run-pass +//@ edition:2021 use Foo::*; diff --git a/tests/ui/or-patterns/mismatched-bindings-async-fn.rs b/tests/ui/or-patterns/mismatched-bindings-async-fn.rs index d1cb73aafa0..1751a9e7be8 100644 --- a/tests/ui/or-patterns/mismatched-bindings-async-fn.rs +++ b/tests/ui/or-patterns/mismatched-bindings-async-fn.rs @@ -1,5 +1,5 @@ // Regression test for #71297 -// edition:2018 +//@ edition:2018 async fn a((x | s): String) {} //~^ ERROR variable `x` is not bound in all patterns diff --git a/tests/ui/or-patterns/missing-bindings.rs b/tests/ui/or-patterns/missing-bindings.rs index 20844c17ec1..8d1aef5d1fc 100644 --- a/tests/ui/or-patterns/missing-bindings.rs +++ b/tests/ui/or-patterns/missing-bindings.rs @@ -1,6 +1,6 @@ // This test ensures that or patterns do not allow missing bindings in any of the arms. -// edition:2018 +//@ edition:2018 #![allow(non_camel_case_types)] diff --git a/tests/ui/or-patterns/mix-with-wild.rs b/tests/ui/or-patterns/mix-with-wild.rs index d9911cda1b6..4577cba7a7d 100644 --- a/tests/ui/or-patterns/mix-with-wild.rs +++ b/tests/ui/or-patterns/mix-with-wild.rs @@ -3,7 +3,7 @@ // 1) The Wild pattern should cause the pattern to always succeed. // 2) or-patterns should work with simplifyable patterns. -// run-pass +//@ run-pass pub fn test(x: Option) -> bool { match x { diff --git a/tests/ui/or-patterns/or-patterns-default-binding-modes.rs b/tests/ui/or-patterns/or-patterns-default-binding-modes.rs index df6aab0e6a8..3ca4d50be31 100644 --- a/tests/ui/or-patterns/or-patterns-default-binding-modes.rs +++ b/tests/ui/or-patterns/or-patterns-default-binding-modes.rs @@ -1,6 +1,6 @@ // Test that or-patterns are pass-through with respect to default binding modes. -// check-pass +//@ check-pass #![allow(irrefutable_let_patterns)] #![allow(dropping_copy_types)] diff --git a/tests/ui/or-patterns/or-patterns-syntactic-fail-2018.rs b/tests/ui/or-patterns/or-patterns-syntactic-fail-2018.rs index a624cbc899f..7a94c96b79d 100644 --- a/tests/ui/or-patterns/or-patterns-syntactic-fail-2018.rs +++ b/tests/ui/or-patterns/or-patterns-syntactic-fail-2018.rs @@ -1,6 +1,6 @@ // Test that :pat doesn't accept top-level or-patterns in edition 2018. -// edition:2018 +//@ edition:2018 fn main() {} diff --git a/tests/ui/or-patterns/or-patterns-syntactic-pass-2021.rs b/tests/ui/or-patterns/or-patterns-syntactic-pass-2021.rs index c0d148d9204..040f03c08b4 100644 --- a/tests/ui/or-patterns/or-patterns-syntactic-pass-2021.rs +++ b/tests/ui/or-patterns/or-patterns-syntactic-pass-2021.rs @@ -1,7 +1,7 @@ // Tests that :pat in macros in edition 2021 allows top-level or-patterns. -// run-pass -// edition:2021 +//@ run-pass +//@ edition:2021 macro_rules! accept_pat { ($p:pat) => {}; diff --git a/tests/ui/or-patterns/or-patterns-syntactic-pass.rs b/tests/ui/or-patterns/or-patterns-syntactic-pass.rs index 92750bec8b2..6a8d0a5adb4 100644 --- a/tests/ui/or-patterns/or-patterns-syntactic-pass.rs +++ b/tests/ui/or-patterns/or-patterns-syntactic-pass.rs @@ -1,7 +1,7 @@ // Here we test all the places `|` is *syntactically* allowed. // This is not a semantic test. We only test parsing. -// check-pass +//@ check-pass fn main() {} diff --git a/tests/ui/or-patterns/remove-leading-vert.fixed b/tests/ui/or-patterns/remove-leading-vert.fixed index b1cd0a94437..8f7aab6a499 100644 --- a/tests/ui/or-patterns/remove-leading-vert.fixed +++ b/tests/ui/or-patterns/remove-leading-vert.fixed @@ -1,6 +1,6 @@ // Test the suggestion to remove a leading, or trailing `|`. -// run-rustfix +//@ run-rustfix #![allow(warnings)] diff --git a/tests/ui/or-patterns/remove-leading-vert.rs b/tests/ui/or-patterns/remove-leading-vert.rs index dc12382aa3a..2aeeb0e979f 100644 --- a/tests/ui/or-patterns/remove-leading-vert.rs +++ b/tests/ui/or-patterns/remove-leading-vert.rs @@ -1,6 +1,6 @@ // Test the suggestion to remove a leading, or trailing `|`. -// run-rustfix +//@ run-rustfix #![allow(warnings)] diff --git a/tests/ui/or-patterns/search-via-bindings.rs b/tests/ui/or-patterns/search-via-bindings.rs index d98606deda5..a760112f1d4 100644 --- a/tests/ui/or-patterns/search-via-bindings.rs +++ b/tests/ui/or-patterns/search-via-bindings.rs @@ -1,6 +1,6 @@ // Check that we expand multiple or-patterns from left to right. -// run-pass +//@ run-pass fn search(target: (bool, bool, bool)) -> u32 { let x = ((false, true), (false, true), (false, true)); diff --git a/tests/ui/or-patterns/slice-patterns.rs b/tests/ui/or-patterns/slice-patterns.rs index ed5eace0b7e..464d0b2ddda 100644 --- a/tests/ui/or-patterns/slice-patterns.rs +++ b/tests/ui/or-patterns/slice-patterns.rs @@ -1,6 +1,6 @@ // Test or-patterns with slice-patterns -// run-pass +//@ run-pass #[derive(Debug, PartialEq)] enum MatchArm { diff --git a/tests/ui/or-patterns/struct-like.rs b/tests/ui/or-patterns/struct-like.rs index 7de690d2d81..13a3c0ee0e3 100644 --- a/tests/ui/or-patterns/struct-like.rs +++ b/tests/ui/or-patterns/struct-like.rs @@ -1,4 +1,4 @@ -// run-pass +//@ run-pass #[derive(Debug)] enum Other { diff --git a/tests/ui/orphan-check-diagnostics.rs b/tests/ui/orphan-check-diagnostics.rs index c8803b9ae5d..4b6557fc9c8 100644 --- a/tests/ui/orphan-check-diagnostics.rs +++ b/tests/ui/orphan-check-diagnostics.rs @@ -1,4 +1,4 @@ -// aux-build:orphan-check-diagnostics.rs +//@ aux-build:orphan-check-diagnostics.rs // See issue #22388. diff --git a/tests/ui/osx-frameworks.rs b/tests/ui/osx-frameworks.rs index 958183ec0d7..b0d7a3a9c07 100644 --- a/tests/ui/osx-frameworks.rs +++ b/tests/ui/osx-frameworks.rs @@ -1,4 +1,4 @@ -// ignore-macos this is supposed to succeed on osx +//@ ignore-macos this is supposed to succeed on osx #[link(name = "foo", kind = "framework")] extern "C" {} diff --git a/tests/ui/out-pointer-aliasing.rs b/tests/ui/out-pointer-aliasing.rs index b28a0910179..0dfaa19fadb 100644 --- a/tests/ui/out-pointer-aliasing.rs +++ b/tests/ui/out-pointer-aliasing.rs @@ -1,4 +1,4 @@ -// run-pass +//@ run-pass #[derive(Copy, Clone)] pub struct Foo { diff --git a/tests/ui/output-slot-variants.rs b/tests/ui/output-slot-variants.rs index 7c20a2b2f94..c545b2504cb 100644 --- a/tests/ui/output-slot-variants.rs +++ b/tests/ui/output-slot-variants.rs @@ -1,9 +1,9 @@ -// run-pass +//@ run-pass #![allow(dead_code)] #![allow(unused_assignments)] #![allow(unknown_lints)] -// pretty-expanded FIXME #23616 +//@ pretty-expanded FIXME #23616 #![allow(dead_assignment)] #![allow(unused_variables)] diff --git a/tests/ui/over-constrained-vregs.rs b/tests/ui/over-constrained-vregs.rs index cc808147600..016a667e937 100644 --- a/tests/ui/over-constrained-vregs.rs +++ b/tests/ui/over-constrained-vregs.rs @@ -1,4 +1,4 @@ -// run-pass +//@ run-pass #![allow(unused_must_use)] // Regression test for issue #152. diff --git a/tests/ui/overloaded/fixup-deref-mut.rs b/tests/ui/overloaded/fixup-deref-mut.rs index 6b2fd72b895..2879554bb94 100644 --- a/tests/ui/overloaded/fixup-deref-mut.rs +++ b/tests/ui/overloaded/fixup-deref-mut.rs @@ -1,7 +1,7 @@ -// run-pass +//@ run-pass #![allow(dead_code)] -// pretty-expanded FIXME #23616 +//@ pretty-expanded FIXME #23616 use std::ops::{Deref, DerefMut}; diff --git a/tests/ui/overloaded/issue-14958.rs b/tests/ui/overloaded/issue-14958.rs index 80abf5e4e76..3df4732d9ad 100644 --- a/tests/ui/overloaded/issue-14958.rs +++ b/tests/ui/overloaded/issue-14958.rs @@ -1,5 +1,5 @@ -// run-pass -// pretty-expanded FIXME #23616 +//@ run-pass +//@ pretty-expanded FIXME #23616 #![feature(fn_traits, unboxed_closures)] diff --git a/tests/ui/overloaded/overloaded-autoderef-count.rs b/tests/ui/overloaded/overloaded-autoderef-count.rs index d58deda09f7..495ea08f077 100644 --- a/tests/ui/overloaded/overloaded-autoderef-count.rs +++ b/tests/ui/overloaded/overloaded-autoderef-count.rs @@ -1,4 +1,4 @@ -// run-pass +//@ run-pass use std::cell::Cell; use std::ops::{Deref, DerefMut}; diff --git a/tests/ui/overloaded/overloaded-autoderef-indexing.rs b/tests/ui/overloaded/overloaded-autoderef-indexing.rs index 1c8c7cca93c..0c93d19dca4 100644 --- a/tests/ui/overloaded/overloaded-autoderef-indexing.rs +++ b/tests/ui/overloaded/overloaded-autoderef-indexing.rs @@ -1,4 +1,4 @@ -// run-pass +//@ run-pass use std::ops::Deref; diff --git a/tests/ui/overloaded/overloaded-autoderef-order.rs b/tests/ui/overloaded/overloaded-autoderef-order.rs index f48bae55f5f..2ab016a1f56 100644 --- a/tests/ui/overloaded/overloaded-autoderef-order.rs +++ b/tests/ui/overloaded/overloaded-autoderef-order.rs @@ -1,4 +1,4 @@ -// run-pass +//@ run-pass #![allow(dead_code)] diff --git a/tests/ui/overloaded/overloaded-autoderef-vtable.rs b/tests/ui/overloaded/overloaded-autoderef-vtable.rs index f8e6d12088f..198993e6d75 100644 --- a/tests/ui/overloaded/overloaded-autoderef-vtable.rs +++ b/tests/ui/overloaded/overloaded-autoderef-vtable.rs @@ -1,4 +1,4 @@ -// run-pass +//@ run-pass #![allow(dead_code)] use std::ops::Deref; diff --git a/tests/ui/overloaded/overloaded-autoderef-xcrate.rs b/tests/ui/overloaded/overloaded-autoderef-xcrate.rs index d065e825cc3..82e1c07718a 100644 --- a/tests/ui/overloaded/overloaded-autoderef-xcrate.rs +++ b/tests/ui/overloaded/overloaded-autoderef-xcrate.rs @@ -1,5 +1,5 @@ -// run-pass -// aux-build:overloaded_autoderef_xc.rs +//@ run-pass +//@ aux-build:overloaded_autoderef_xc.rs extern crate overloaded_autoderef_xc; diff --git a/tests/ui/overloaded/overloaded-autoderef.rs b/tests/ui/overloaded/overloaded-autoderef.rs index cae3ec90621..a7a07449ca8 100644 --- a/tests/ui/overloaded/overloaded-autoderef.rs +++ b/tests/ui/overloaded/overloaded-autoderef.rs @@ -1,4 +1,4 @@ -// run-pass +//@ run-pass #![allow(unused_variables)] #![allow(stable_features)] diff --git a/tests/ui/overloaded/overloaded-calls-object-one-arg.rs b/tests/ui/overloaded/overloaded-calls-object-one-arg.rs index 1afab9a1ffb..0685adb4f83 100644 --- a/tests/ui/overloaded/overloaded-calls-object-one-arg.rs +++ b/tests/ui/overloaded/overloaded-calls-object-one-arg.rs @@ -1,4 +1,4 @@ -// run-pass +//@ run-pass // Tests calls to closure arguments where the closure takes 1 argument. // This is a bit tricky due to rust-call ABI. diff --git a/tests/ui/overloaded/overloaded-calls-object-two-args.rs b/tests/ui/overloaded/overloaded-calls-object-two-args.rs index 38087bc8710..6a3f7d2da55 100644 --- a/tests/ui/overloaded/overloaded-calls-object-two-args.rs +++ b/tests/ui/overloaded/overloaded-calls-object-two-args.rs @@ -1,4 +1,4 @@ -// run-pass +//@ run-pass // Tests calls to closure arguments where the closure takes 2 arguments. // This is a bit tricky due to rust-call ABI. diff --git a/tests/ui/overloaded/overloaded-calls-object-zero-args.rs b/tests/ui/overloaded/overloaded-calls-object-zero-args.rs index 9a7bfaa9bf4..e5f1895b49d 100644 --- a/tests/ui/overloaded/overloaded-calls-object-zero-args.rs +++ b/tests/ui/overloaded/overloaded-calls-object-zero-args.rs @@ -1,4 +1,4 @@ -// run-pass +//@ run-pass // Tests calls to closure arguments where the closure takes 0 arguments. // This is a bit tricky due to rust-call ABI. diff --git a/tests/ui/overloaded/overloaded-calls-param-vtables.rs b/tests/ui/overloaded/overloaded-calls-param-vtables.rs index 74ee1c17614..7b89b45eb9b 100644 --- a/tests/ui/overloaded/overloaded-calls-param-vtables.rs +++ b/tests/ui/overloaded/overloaded-calls-param-vtables.rs @@ -1,7 +1,7 @@ -// run-pass +//@ run-pass // Tests that nested vtables work with overloaded calls. -// pretty-expanded FIXME #23616 +//@ pretty-expanded FIXME #23616 #![feature(unboxed_closures, fn_traits)] diff --git a/tests/ui/overloaded/overloaded-calls-simple.rs b/tests/ui/overloaded/overloaded-calls-simple.rs index 8fed18b8e29..34b674357d8 100644 --- a/tests/ui/overloaded/overloaded-calls-simple.rs +++ b/tests/ui/overloaded/overloaded-calls-simple.rs @@ -1,4 +1,4 @@ -// run-pass +//@ run-pass #![feature(lang_items, unboxed_closures, fn_traits)] diff --git a/tests/ui/overloaded/overloaded-calls-zero-args.rs b/tests/ui/overloaded/overloaded-calls-zero-args.rs index b1237306790..79391125a4f 100644 --- a/tests/ui/overloaded/overloaded-calls-zero-args.rs +++ b/tests/ui/overloaded/overloaded-calls-zero-args.rs @@ -1,4 +1,4 @@ -// run-pass +//@ run-pass #![feature(unboxed_closures, fn_traits)] diff --git a/tests/ui/overloaded/overloaded-deref-count.rs b/tests/ui/overloaded/overloaded-deref-count.rs index d2482b12500..a51de1bccbd 100644 --- a/tests/ui/overloaded/overloaded-deref-count.rs +++ b/tests/ui/overloaded/overloaded-deref-count.rs @@ -1,4 +1,4 @@ -// run-pass +//@ run-pass use std::cell::Cell; use std::ops::{Deref, DerefMut}; diff --git a/tests/ui/overloaded/overloaded-deref.rs b/tests/ui/overloaded/overloaded-deref.rs index b08d8f3f767..f1ff16f328f 100644 --- a/tests/ui/overloaded/overloaded-deref.rs +++ b/tests/ui/overloaded/overloaded-deref.rs @@ -1,4 +1,4 @@ -// run-pass +//@ run-pass use std::cell::RefCell; use std::rc::Rc; diff --git a/tests/ui/overloaded/overloaded-index-assoc-list.rs b/tests/ui/overloaded/overloaded-index-assoc-list.rs index eb027afeacd..986acb54e3c 100644 --- a/tests/ui/overloaded/overloaded-index-assoc-list.rs +++ b/tests/ui/overloaded/overloaded-index-assoc-list.rs @@ -1,4 +1,4 @@ -// run-pass +//@ run-pass // Test overloading of the `[]` operator. In particular test that it // takes its argument *by reference*. diff --git a/tests/ui/overloaded/overloaded-index-autoderef.rs b/tests/ui/overloaded/overloaded-index-autoderef.rs index 41f9efa8c16..ab49826e9df 100644 --- a/tests/ui/overloaded/overloaded-index-autoderef.rs +++ b/tests/ui/overloaded/overloaded-index-autoderef.rs @@ -1,4 +1,4 @@ -// run-pass +//@ run-pass #![allow(stable_features)] // Test overloaded indexing combined with autoderef. diff --git a/tests/ui/overloaded/overloaded-index-in-field.rs b/tests/ui/overloaded/overloaded-index-in-field.rs index 0dc45ea8ca2..825e964b880 100644 --- a/tests/ui/overloaded/overloaded-index-in-field.rs +++ b/tests/ui/overloaded/overloaded-index-in-field.rs @@ -1,4 +1,4 @@ -// run-pass +//@ run-pass // Test using overloaded indexing when the "map" is stored in a // field. This caused problems at some point. diff --git a/tests/ui/overloaded/overloaded-index.rs b/tests/ui/overloaded/overloaded-index.rs index 5ad6d2e7004..98025e60dd7 100644 --- a/tests/ui/overloaded/overloaded-index.rs +++ b/tests/ui/overloaded/overloaded-index.rs @@ -1,4 +1,4 @@ -// run-pass +//@ run-pass use std::ops::{Index, IndexMut}; struct Foo { diff --git a/tests/ui/overloaded/overloaded_deref_with_ref_pattern.rs b/tests/ui/overloaded/overloaded_deref_with_ref_pattern.rs index c87ba6a023b..c564165141c 100644 --- a/tests/ui/overloaded/overloaded_deref_with_ref_pattern.rs +++ b/tests/ui/overloaded/overloaded_deref_with_ref_pattern.rs @@ -1,4 +1,4 @@ -// run-pass +//@ run-pass #![allow(unused_mut)] #![allow(unused_variables)] // Test that we choose Deref or DerefMut appropriately based on mutability of ref bindings (#15609). diff --git a/tests/ui/overloaded/overloaded_deref_with_ref_pattern_issue15609.rs b/tests/ui/overloaded/overloaded_deref_with_ref_pattern_issue15609.rs index 61edd2ace3a..143a9ec0447 100644 --- a/tests/ui/overloaded/overloaded_deref_with_ref_pattern_issue15609.rs +++ b/tests/ui/overloaded/overloaded_deref_with_ref_pattern_issue15609.rs @@ -1,4 +1,4 @@ -// run-pass +//@ run-pass #![allow(dead_code)] #![allow(unused_variables)] // Test that we choose Deref or DerefMut appropriately based on mutability of ref bindings (#15609). diff --git a/tests/ui/packed/dyn-trait.rs b/tests/ui/packed/dyn-trait.rs index bb73c26c18a..0c946ca4794 100644 --- a/tests/ui/packed/dyn-trait.rs +++ b/tests/ui/packed/dyn-trait.rs @@ -1,4 +1,4 @@ -// run-pass +//@ run-pass use std::ptr::addr_of; // When the unsized tail is a `dyn Trait`, its alignments is only dynamically known. This means the diff --git a/tests/ui/packed/issue-118537-field-offset-ice.rs b/tests/ui/packed/issue-118537-field-offset-ice.rs index 679d9d754e3..83bace96aac 100644 --- a/tests/ui/packed/issue-118537-field-offset-ice.rs +++ b/tests/ui/packed/issue-118537-field-offset-ice.rs @@ -1,4 +1,4 @@ -// run-pass +//@ run-pass #![feature(layout_for_ptr)] use std::mem; diff --git a/tests/ui/packed/issue-118537-field-offset.rs b/tests/ui/packed/issue-118537-field-offset.rs index cd17f767947..906b3a9f976 100644 --- a/tests/ui/packed/issue-118537-field-offset.rs +++ b/tests/ui/packed/issue-118537-field-offset.rs @@ -1,4 +1,4 @@ -// run-pass +//@ run-pass #![feature(layout_for_ptr)] use std::mem; diff --git a/tests/ui/packed/issue-46152.rs b/tests/ui/packed/issue-46152.rs index fb1c9fb78f3..e38b445107b 100644 --- a/tests/ui/packed/issue-46152.rs +++ b/tests/ui/packed/issue-46152.rs @@ -1,4 +1,4 @@ -// run-pass +//@ run-pass #![allow(dead_code)] #![allow(unused_variables)] #![feature(unsize, coerce_unsized)] diff --git a/tests/ui/packed/packed-struct-address-of-element.rs b/tests/ui/packed/packed-struct-address-of-element.rs index d86698cbf38..3fc27d4a96a 100644 --- a/tests/ui/packed/packed-struct-address-of-element.rs +++ b/tests/ui/packed/packed-struct-address-of-element.rs @@ -1,7 +1,7 @@ -// run-pass +//@ run-pass #![allow(dead_code)] #![feature(raw_ref_op)] -// ignore-emscripten weird assertion? +//@ ignore-emscripten weird assertion? #[repr(packed)] struct Foo1 { diff --git a/tests/ui/packed/packed-struct-borrow-element-64bit.rs b/tests/ui/packed/packed-struct-borrow-element-64bit.rs index 63315ea6673..81eac07eaa8 100644 --- a/tests/ui/packed/packed-struct-borrow-element-64bit.rs +++ b/tests/ui/packed/packed-struct-borrow-element-64bit.rs @@ -1,6 +1,6 @@ -// ignore-32bit (needs `usize` to be 8-aligned to reproduce all the errors below) +//@ ignore-32bit (needs `usize` to be 8-aligned to reproduce all the errors below) #![allow(dead_code)] -// ignore-emscripten weird assertion? +//@ ignore-emscripten weird assertion? #[repr(C, packed(4))] struct Foo4C { diff --git a/tests/ui/packed/packed-struct-borrow-element.rs b/tests/ui/packed/packed-struct-borrow-element.rs index 6cbeca44bbc..24dadbcec7c 100644 --- a/tests/ui/packed/packed-struct-borrow-element.rs +++ b/tests/ui/packed/packed-struct-borrow-element.rs @@ -1,5 +1,5 @@ #![allow(dead_code)] -// ignore-emscripten weird assertion? +//@ ignore-emscripten weird assertion? #[repr(packed)] struct Foo1 { diff --git a/tests/ui/packed/packed-struct-drop-aligned.rs b/tests/ui/packed/packed-struct-drop-aligned.rs index ddfc86f74d3..037b8cb78b7 100644 --- a/tests/ui/packed/packed-struct-drop-aligned.rs +++ b/tests/ui/packed/packed-struct-drop-aligned.rs @@ -1,4 +1,4 @@ -// run-pass +//@ run-pass #![feature(coroutines)] #![feature(coroutine_trait)] use std::cell::Cell; diff --git a/tests/ui/packed/packed-struct-generic-layout.rs b/tests/ui/packed/packed-struct-generic-layout.rs index e064eede4ce..c420d068506 100644 --- a/tests/ui/packed/packed-struct-generic-layout.rs +++ b/tests/ui/packed/packed-struct-generic-layout.rs @@ -1,4 +1,4 @@ -// run-pass +//@ run-pass #![allow(dead_code)] #![allow(overflowing_literals)] diff --git a/tests/ui/packed/packed-struct-generic-size.rs b/tests/ui/packed/packed-struct-generic-size.rs index 7c93e46c30c..c1cdbd1a5ce 100644 --- a/tests/ui/packed/packed-struct-generic-size.rs +++ b/tests/ui/packed/packed-struct-generic-size.rs @@ -1,4 +1,4 @@ -// run-pass +//@ run-pass #![allow(dead_code)] #![allow(unused_comparisons)] diff --git a/tests/ui/packed/packed-struct-generic-transmute.rs b/tests/ui/packed/packed-struct-generic-transmute.rs index c6264b6d2b3..ed655a1d483 100644 --- a/tests/ui/packed/packed-struct-generic-transmute.rs +++ b/tests/ui/packed/packed-struct-generic-transmute.rs @@ -3,7 +3,7 @@ // the error points to the start of the file, not the line with the // transmute -// error-pattern: cannot transmute between types of different sizes, or dependently-sized types +//@ error-pattern: cannot transmute between types of different sizes, or dependently-sized types use std::mem; diff --git a/tests/ui/packed/packed-struct-layout.rs b/tests/ui/packed/packed-struct-layout.rs index d49c222e648..8b14351c08a 100644 --- a/tests/ui/packed/packed-struct-layout.rs +++ b/tests/ui/packed/packed-struct-layout.rs @@ -1,4 +1,4 @@ -// run-pass +//@ run-pass #![allow(dead_code)] use std::mem; diff --git a/tests/ui/packed/packed-struct-match.rs b/tests/ui/packed/packed-struct-match.rs index 9a572ced717..5a6f7da3cb7 100644 --- a/tests/ui/packed/packed-struct-match.rs +++ b/tests/ui/packed/packed-struct-match.rs @@ -1,4 +1,4 @@ -// run-pass +//@ run-pass #[repr(packed)] struct Foo1 { diff --git a/tests/ui/packed/packed-struct-optimized-enum.rs b/tests/ui/packed/packed-struct-optimized-enum.rs index c3540f7619b..e76620c630d 100644 --- a/tests/ui/packed/packed-struct-optimized-enum.rs +++ b/tests/ui/packed/packed-struct-optimized-enum.rs @@ -1,4 +1,4 @@ -// run-pass +//@ run-pass #[repr(packed)] struct Packed(#[allow(dead_code)] T); diff --git a/tests/ui/packed/packed-struct-size-xc.rs b/tests/ui/packed/packed-struct-size-xc.rs index 46112d51d83..a9c95d73d56 100644 --- a/tests/ui/packed/packed-struct-size-xc.rs +++ b/tests/ui/packed/packed-struct-size-xc.rs @@ -1,5 +1,5 @@ -// run-pass -// aux-build:packed.rs +//@ run-pass +//@ aux-build:packed.rs extern crate packed; diff --git a/tests/ui/packed/packed-struct-size.rs b/tests/ui/packed/packed-struct-size.rs index c832c7cfad5..98167fc33fa 100644 --- a/tests/ui/packed/packed-struct-size.rs +++ b/tests/ui/packed/packed-struct-size.rs @@ -1,4 +1,4 @@ -// run-pass +//@ run-pass #![allow(dead_code)] #![allow(non_camel_case_types)] #![allow(non_upper_case_globals)] diff --git a/tests/ui/packed/packed-struct-transmute.rs b/tests/ui/packed/packed-struct-transmute.rs index a7d284025d7..cf7c1f2b7cd 100644 --- a/tests/ui/packed/packed-struct-transmute.rs +++ b/tests/ui/packed/packed-struct-transmute.rs @@ -3,8 +3,8 @@ // the error points to the start of the file, not the line with the // transmute -// normalize-stderr-test "\d+ bits" -> "N bits" -// error-pattern: cannot transmute between types of different sizes, or dependently-sized types +//@ normalize-stderr-test "\d+ bits" -> "N bits" +//@ error-pattern: cannot transmute between types of different sizes, or dependently-sized types use std::mem; diff --git a/tests/ui/packed/packed-struct-vec.rs b/tests/ui/packed/packed-struct-vec.rs index 18676cfc22e..cc0c3b98999 100644 --- a/tests/ui/packed/packed-struct-vec.rs +++ b/tests/ui/packed/packed-struct-vec.rs @@ -1,4 +1,4 @@ -// run-pass +//@ run-pass use std::fmt; use std::mem; diff --git a/tests/ui/packed/packed-tuple-struct-layout.rs b/tests/ui/packed/packed-tuple-struct-layout.rs index 879553142da..447639b3872 100644 --- a/tests/ui/packed/packed-tuple-struct-layout.rs +++ b/tests/ui/packed/packed-tuple-struct-layout.rs @@ -1,4 +1,4 @@ -// run-pass +//@ run-pass use std::mem; #[repr(packed)] diff --git a/tests/ui/packed/packed-tuple-struct-size.rs b/tests/ui/packed/packed-tuple-struct-size.rs index f7a3c903fca..48358513586 100644 --- a/tests/ui/packed/packed-tuple-struct-size.rs +++ b/tests/ui/packed/packed-tuple-struct-size.rs @@ -1,4 +1,4 @@ -// run-pass +//@ run-pass #![allow(dead_code)] #![allow(non_camel_case_types)] diff --git a/tests/ui/packed/packed-with-inference-vars-issue-61402.rs b/tests/ui/packed/packed-with-inference-vars-issue-61402.rs index 659864c1d9b..e726734d04a 100644 --- a/tests/ui/packed/packed-with-inference-vars-issue-61402.rs +++ b/tests/ui/packed/packed-with-inference-vars-issue-61402.rs @@ -1,4 +1,4 @@ -// run-pass +//@ run-pass // If a struct is packed and its last field has drop glue, then that // field needs to be Sized (to allow it to be destroyed out-of-place). // diff --git a/tests/ui/panic-handler/auxiliary/some-panic-impl.rs b/tests/ui/panic-handler/auxiliary/some-panic-impl.rs index 0348b3a2d76..8dacc87b08d 100644 --- a/tests/ui/panic-handler/auxiliary/some-panic-impl.rs +++ b/tests/ui/panic-handler/auxiliary/some-panic-impl.rs @@ -1,4 +1,4 @@ -// no-prefer-dynamic +//@ no-prefer-dynamic #![crate_type = "rlib"] #![no_std] diff --git a/tests/ui/panic-handler/auxiliary/weak-lang-items.rs b/tests/ui/panic-handler/auxiliary/weak-lang-items.rs index 7a698cf76ae..d457e0681c1 100644 --- a/tests/ui/panic-handler/auxiliary/weak-lang-items.rs +++ b/tests/ui/panic-handler/auxiliary/weak-lang-items.rs @@ -1,4 +1,4 @@ -// no-prefer-dynamic +//@ no-prefer-dynamic // This aux-file will require the eh_personality function to be codegen'd, but // it hasn't been defined just yet. Make sure we don't explode. diff --git a/tests/ui/panic-handler/panic-handler-bad-signature-1.rs b/tests/ui/panic-handler/panic-handler-bad-signature-1.rs index ae27db7a835..8f42f3a8897 100644 --- a/tests/ui/panic-handler/panic-handler-bad-signature-1.rs +++ b/tests/ui/panic-handler/panic-handler-bad-signature-1.rs @@ -1,4 +1,4 @@ -// compile-flags:-C panic=abort +//@ compile-flags:-C panic=abort #![no_std] #![no_main] diff --git a/tests/ui/panic-handler/panic-handler-bad-signature-2.rs b/tests/ui/panic-handler/panic-handler-bad-signature-2.rs index 3c3f1513f6f..79ad4598e10 100644 --- a/tests/ui/panic-handler/panic-handler-bad-signature-2.rs +++ b/tests/ui/panic-handler/panic-handler-bad-signature-2.rs @@ -1,4 +1,4 @@ -// compile-flags:-C panic=abort +//@ compile-flags:-C panic=abort #![no_std] #![no_main] diff --git a/tests/ui/panic-handler/panic-handler-bad-signature-3.rs b/tests/ui/panic-handler/panic-handler-bad-signature-3.rs index 9e17e32fbb4..1c6e2e2ff49 100644 --- a/tests/ui/panic-handler/panic-handler-bad-signature-3.rs +++ b/tests/ui/panic-handler/panic-handler-bad-signature-3.rs @@ -1,4 +1,4 @@ -// compile-flags:-C panic=abort +//@ compile-flags:-C panic=abort #![no_std] #![no_main] diff --git a/tests/ui/panic-handler/panic-handler-bad-signature-4.rs b/tests/ui/panic-handler/panic-handler-bad-signature-4.rs index 8240ab08326..8fc5b324014 100644 --- a/tests/ui/panic-handler/panic-handler-bad-signature-4.rs +++ b/tests/ui/panic-handler/panic-handler-bad-signature-4.rs @@ -1,4 +1,4 @@ -// compile-flags:-C panic=abort +//@ compile-flags:-C panic=abort #![no_std] #![no_main] diff --git a/tests/ui/panic-handler/panic-handler-bad-signature-5.rs b/tests/ui/panic-handler/panic-handler-bad-signature-5.rs index 97307d1b2a4..d7ee8f25b11 100644 --- a/tests/ui/panic-handler/panic-handler-bad-signature-5.rs +++ b/tests/ui/panic-handler/panic-handler-bad-signature-5.rs @@ -1,4 +1,4 @@ -// compile-flags:-C panic=abort +//@ compile-flags:-C panic=abort #![no_std] #![no_main] diff --git a/tests/ui/panic-handler/panic-handler-duplicate.rs b/tests/ui/panic-handler/panic-handler-duplicate.rs index bd99af999c7..c0a7d6aa6d7 100644 --- a/tests/ui/panic-handler/panic-handler-duplicate.rs +++ b/tests/ui/panic-handler/panic-handler-duplicate.rs @@ -1,4 +1,4 @@ -// compile-flags:-C panic=abort +//@ compile-flags:-C panic=abort #![feature(lang_items)] #![no_std] diff --git a/tests/ui/panic-handler/panic-handler-missing.rs b/tests/ui/panic-handler/panic-handler-missing.rs index 6bb062ba657..09fbd9a69cf 100644 --- a/tests/ui/panic-handler/panic-handler-missing.rs +++ b/tests/ui/panic-handler/panic-handler-missing.rs @@ -1,5 +1,5 @@ -// dont-check-compiler-stderr -// error-pattern: `#[panic_handler]` function required, but not found +//@ dont-check-compiler-stderr +//@ error-pattern: `#[panic_handler]` function required, but not found #![feature(lang_items)] #![no_main] diff --git a/tests/ui/panic-handler/panic-handler-requires-panic-info.rs b/tests/ui/panic-handler/panic-handler-requires-panic-info.rs index b59023b50e1..0b8308ba753 100644 --- a/tests/ui/panic-handler/panic-handler-requires-panic-info.rs +++ b/tests/ui/panic-handler/panic-handler-requires-panic-info.rs @@ -1,4 +1,4 @@ -// compile-flags:-C panic=abort +//@ compile-flags:-C panic=abort #![feature(lang_items)] #![feature(no_core)] diff --git a/tests/ui/panic-handler/panic-handler-std.rs b/tests/ui/panic-handler/panic-handler-std.rs index 6183c886cfa..91b3997819c 100644 --- a/tests/ui/panic-handler/panic-handler-std.rs +++ b/tests/ui/panic-handler/panic-handler-std.rs @@ -1,5 +1,5 @@ -// normalize-stderr-test "loaded from .*libstd-.*.rlib" -> "loaded from SYSROOT/libstd-*.rlib" -// error-pattern: found duplicate lang item `panic_impl` +//@ normalize-stderr-test "loaded from .*libstd-.*.rlib" -> "loaded from SYSROOT/libstd-*.rlib" +//@ error-pattern: found duplicate lang item `panic_impl` use std::panic::PanicInfo; diff --git a/tests/ui/panic-handler/panic-handler-twice.rs b/tests/ui/panic-handler/panic-handler-twice.rs index 05bef66d849..2d95a5028bf 100644 --- a/tests/ui/panic-handler/panic-handler-twice.rs +++ b/tests/ui/panic-handler/panic-handler-twice.rs @@ -1,5 +1,5 @@ -// dont-check-compiler-stderr -// aux-build:some-panic-impl.rs +//@ dont-check-compiler-stderr +//@ aux-build:some-panic-impl.rs #![feature(lang_items)] #![no_std] diff --git a/tests/ui/panic-handler/panic-handler-with-target-feature.rs b/tests/ui/panic-handler/panic-handler-with-target-feature.rs index 8ea0275d7e9..3dfdd2847bf 100644 --- a/tests/ui/panic-handler/panic-handler-with-target-feature.rs +++ b/tests/ui/panic-handler/panic-handler-with-target-feature.rs @@ -1,5 +1,5 @@ -// compile-flags:-C panic=abort -// only-x86_64 +//@ compile-flags:-C panic=abort +//@ only-x86_64 #![feature(target_feature_11)] #![no_std] diff --git a/tests/ui/panic-handler/panic-handler-wrong-location.rs b/tests/ui/panic-handler/panic-handler-wrong-location.rs index dca59101805..fc3ef401e3d 100644 --- a/tests/ui/panic-handler/panic-handler-wrong-location.rs +++ b/tests/ui/panic-handler/panic-handler-wrong-location.rs @@ -1,4 +1,4 @@ -// compile-flags:-C panic=abort +//@ compile-flags:-C panic=abort #![no_std] #![no_main] diff --git a/tests/ui/panic-handler/weak-lang-item-2.rs b/tests/ui/panic-handler/weak-lang-item-2.rs index 2cc5f23b45e..2acaff3ab71 100644 --- a/tests/ui/panic-handler/weak-lang-item-2.rs +++ b/tests/ui/panic-handler/weak-lang-item-2.rs @@ -1,7 +1,7 @@ -// run-pass -// aux-build:weak-lang-items.rs +//@ run-pass +//@ aux-build:weak-lang-items.rs -// pretty-expanded FIXME #23616 +//@ pretty-expanded FIXME #23616 extern crate weak_lang_items as other; diff --git a/tests/ui/panic-handler/weak-lang-item.rs b/tests/ui/panic-handler/weak-lang-item.rs index 296a2c1514f..605e1bdd94b 100644 --- a/tests/ui/panic-handler/weak-lang-item.rs +++ b/tests/ui/panic-handler/weak-lang-item.rs @@ -1,8 +1,8 @@ -// aux-build:weak-lang-items.rs -// error-pattern: `#[panic_handler]` function required, but not found -// error-pattern: unwinding panics are not supported without std -// needs-unwind since it affects the error output -// ignore-emscripten missing eh_catch_typeinfo lang item +//@ aux-build:weak-lang-items.rs +//@ error-pattern: `#[panic_handler]` function required, but not found +//@ error-pattern: unwinding panics are not supported without std +//@ needs-unwind since it affects the error output +//@ ignore-emscripten missing eh_catch_typeinfo lang item #![no_std] diff --git a/tests/ui/panic-runtime/abort-link-to-unwind-dylib.rs b/tests/ui/panic-runtime/abort-link-to-unwind-dylib.rs index 58a90a592c4..2939835b0f4 100644 --- a/tests/ui/panic-runtime/abort-link-to-unwind-dylib.rs +++ b/tests/ui/panic-runtime/abort-link-to-unwind-dylib.rs @@ -1,10 +1,10 @@ -// build-fail -// compile-flags:-C panic=abort -C prefer-dynamic -// needs-unwind -// ignore-musl - no dylibs here -// ignore-emscripten -// ignore-sgx no dynamic lib support -// error-pattern:`panic_unwind` is not compiled with this crate's panic strategy +//@ build-fail +//@ compile-flags:-C panic=abort -C prefer-dynamic +//@ needs-unwind +//@ ignore-musl - no dylibs here +//@ ignore-emscripten +//@ ignore-sgx no dynamic lib support +//@ error-pattern:`panic_unwind` is not compiled with this crate's panic strategy // This is a test where the local crate, compiled with `panic=abort`, links to // the standard library **dynamically** which is already linked against diff --git a/tests/ui/panic-runtime/abort-link-to-unwinding-crates.rs b/tests/ui/panic-runtime/abort-link-to-unwinding-crates.rs index 566626513ef..4f8efd6d688 100644 --- a/tests/ui/panic-runtime/abort-link-to-unwinding-crates.rs +++ b/tests/ui/panic-runtime/abort-link-to-unwinding-crates.rs @@ -1,11 +1,11 @@ -// run-pass +//@ run-pass #![allow(unused_variables)] -// compile-flags:-C panic=abort -// aux-build:exit-success-if-unwind.rs -// no-prefer-dynamic -// ignore-emscripten no processes -// ignore-sgx no processes -// ignore-macos +//@ compile-flags:-C panic=abort +//@ aux-build:exit-success-if-unwind.rs +//@ no-prefer-dynamic +//@ ignore-emscripten no processes +//@ ignore-sgx no processes +//@ ignore-macos extern crate exit_success_if_unwind; diff --git a/tests/ui/panic-runtime/abort.rs b/tests/ui/panic-runtime/abort.rs index dcc4061fde7..810e13c9762 100644 --- a/tests/ui/panic-runtime/abort.rs +++ b/tests/ui/panic-runtime/abort.rs @@ -1,10 +1,10 @@ -// run-pass +//@ run-pass #![allow(unused_variables)] -// compile-flags:-C panic=abort -// no-prefer-dynamic -// ignore-emscripten no processes -// ignore-sgx no processes -// ignore-macos +//@ compile-flags:-C panic=abort +//@ no-prefer-dynamic +//@ ignore-emscripten no processes +//@ ignore-sgx no processes +//@ ignore-macos use std::process::Command; use std::env; diff --git a/tests/ui/panic-runtime/auxiliary/depends.rs b/tests/ui/panic-runtime/auxiliary/depends.rs index e9bc2f4893e..7a35619b681 100644 --- a/tests/ui/panic-runtime/auxiliary/depends.rs +++ b/tests/ui/panic-runtime/auxiliary/depends.rs @@ -1,4 +1,4 @@ -// no-prefer-dynamic +//@ no-prefer-dynamic #![feature(panic_runtime)] #![crate_type = "rlib"] diff --git a/tests/ui/panic-runtime/auxiliary/exit-success-if-unwind.rs b/tests/ui/panic-runtime/auxiliary/exit-success-if-unwind.rs index c0e05740542..1648d10e5aa 100644 --- a/tests/ui/panic-runtime/auxiliary/exit-success-if-unwind.rs +++ b/tests/ui/panic-runtime/auxiliary/exit-success-if-unwind.rs @@ -1,4 +1,4 @@ -// no-prefer-dynamic +//@ no-prefer-dynamic #![crate_type = "rlib"] diff --git a/tests/ui/panic-runtime/auxiliary/needs-abort.rs b/tests/ui/panic-runtime/auxiliary/needs-abort.rs index 8fad49b5e9d..21f862e4b43 100644 --- a/tests/ui/panic-runtime/auxiliary/needs-abort.rs +++ b/tests/ui/panic-runtime/auxiliary/needs-abort.rs @@ -1,5 +1,5 @@ -// compile-flags:-C panic=abort -// no-prefer-dynamic +//@ compile-flags:-C panic=abort +//@ no-prefer-dynamic #![crate_type = "rlib"] #![no_std] diff --git a/tests/ui/panic-runtime/auxiliary/needs-panic-runtime.rs b/tests/ui/panic-runtime/auxiliary/needs-panic-runtime.rs index 3f030c169f6..fbafee0c241 100644 --- a/tests/ui/panic-runtime/auxiliary/needs-panic-runtime.rs +++ b/tests/ui/panic-runtime/auxiliary/needs-panic-runtime.rs @@ -1,4 +1,4 @@ -// no-prefer-dynamic +//@ no-prefer-dynamic #![feature(needs_panic_runtime)] #![crate_type = "rlib"] diff --git a/tests/ui/panic-runtime/auxiliary/needs-unwind.rs b/tests/ui/panic-runtime/auxiliary/needs-unwind.rs index ba917b52d9a..d0d20b267d4 100644 --- a/tests/ui/panic-runtime/auxiliary/needs-unwind.rs +++ b/tests/ui/panic-runtime/auxiliary/needs-unwind.rs @@ -1,5 +1,5 @@ -// compile-flags:-C panic=unwind -// no-prefer-dynamic +//@ compile-flags:-C panic=unwind +//@ no-prefer-dynamic #![crate_type = "rlib"] #![no_std] diff --git a/tests/ui/panic-runtime/auxiliary/panic-runtime-abort.rs b/tests/ui/panic-runtime/auxiliary/panic-runtime-abort.rs index c92015eeebc..36db32f281a 100644 --- a/tests/ui/panic-runtime/auxiliary/panic-runtime-abort.rs +++ b/tests/ui/panic-runtime/auxiliary/panic-runtime-abort.rs @@ -1,5 +1,5 @@ -// compile-flags:-C panic=abort -// no-prefer-dynamic +//@ compile-flags:-C panic=abort +//@ no-prefer-dynamic #![feature(panic_runtime)] #![crate_type = "rlib"] diff --git a/tests/ui/panic-runtime/auxiliary/panic-runtime-lang-items.rs b/tests/ui/panic-runtime/auxiliary/panic-runtime-lang-items.rs index b9ef2f32941..938f6bcb906 100644 --- a/tests/ui/panic-runtime/auxiliary/panic-runtime-lang-items.rs +++ b/tests/ui/panic-runtime/auxiliary/panic-runtime-lang-items.rs @@ -1,4 +1,4 @@ -// no-prefer-dynamic +//@ no-prefer-dynamic #![crate_type = "rlib"] diff --git a/tests/ui/panic-runtime/auxiliary/panic-runtime-unwind.rs b/tests/ui/panic-runtime/auxiliary/panic-runtime-unwind.rs index 2f7aed9248a..aea42d1f103 100644 --- a/tests/ui/panic-runtime/auxiliary/panic-runtime-unwind.rs +++ b/tests/ui/panic-runtime/auxiliary/panic-runtime-unwind.rs @@ -1,5 +1,5 @@ -// compile-flags:-C panic=unwind -// no-prefer-dynamic +//@ compile-flags:-C panic=unwind +//@ no-prefer-dynamic #![feature(panic_runtime)] #![crate_type = "rlib"] diff --git a/tests/ui/panic-runtime/auxiliary/panic-runtime-unwind2.rs b/tests/ui/panic-runtime/auxiliary/panic-runtime-unwind2.rs index 2f7aed9248a..aea42d1f103 100644 --- a/tests/ui/panic-runtime/auxiliary/panic-runtime-unwind2.rs +++ b/tests/ui/panic-runtime/auxiliary/panic-runtime-unwind2.rs @@ -1,5 +1,5 @@ -// compile-flags:-C panic=unwind -// no-prefer-dynamic +//@ compile-flags:-C panic=unwind +//@ no-prefer-dynamic #![feature(panic_runtime)] #![crate_type = "rlib"] diff --git a/tests/ui/panic-runtime/auxiliary/wants-panic-runtime-abort.rs b/tests/ui/panic-runtime/auxiliary/wants-panic-runtime-abort.rs index 3c0d2d6588e..cfefb050280 100644 --- a/tests/ui/panic-runtime/auxiliary/wants-panic-runtime-abort.rs +++ b/tests/ui/panic-runtime/auxiliary/wants-panic-runtime-abort.rs @@ -1,5 +1,5 @@ -// compile-flags:-C panic=abort -// no-prefer-dynamic +//@ compile-flags:-C panic=abort +//@ no-prefer-dynamic #![crate_type = "rlib"] #![no_std] diff --git a/tests/ui/panic-runtime/auxiliary/wants-panic-runtime-unwind.rs b/tests/ui/panic-runtime/auxiliary/wants-panic-runtime-unwind.rs index d5f0102196f..bae2740d306 100644 --- a/tests/ui/panic-runtime/auxiliary/wants-panic-runtime-unwind.rs +++ b/tests/ui/panic-runtime/auxiliary/wants-panic-runtime-unwind.rs @@ -1,4 +1,4 @@ -// no-prefer-dynamic +//@ no-prefer-dynamic #![crate_type = "rlib"] #![no_std] diff --git a/tests/ui/panic-runtime/bad-panic-flag1.rs b/tests/ui/panic-runtime/bad-panic-flag1.rs index 1ac6a3423ff..82b7c2f723b 100644 --- a/tests/ui/panic-runtime/bad-panic-flag1.rs +++ b/tests/ui/panic-runtime/bad-panic-flag1.rs @@ -1,4 +1,4 @@ -// compile-flags:-C panic=foo -// error-pattern:either `unwind` or `abort` was expected +//@ compile-flags:-C panic=foo +//@ error-pattern:either `unwind` or `abort` was expected fn main() {} diff --git a/tests/ui/panic-runtime/bad-panic-flag2.rs b/tests/ui/panic-runtime/bad-panic-flag2.rs index c79701c83f3..3875325deae 100644 --- a/tests/ui/panic-runtime/bad-panic-flag2.rs +++ b/tests/ui/panic-runtime/bad-panic-flag2.rs @@ -1,4 +1,4 @@ -// compile-flags:-C panic -// error-pattern:requires either `unwind` or `abort` +//@ compile-flags:-C panic +//@ error-pattern:requires either `unwind` or `abort` fn main() {} diff --git a/tests/ui/panic-runtime/incompatible-type.rs b/tests/ui/panic-runtime/incompatible-type.rs index 026364a2058..4cbcfec11c9 100644 --- a/tests/ui/panic-runtime/incompatible-type.rs +++ b/tests/ui/panic-runtime/incompatible-type.rs @@ -3,8 +3,8 @@ // // Assertion `isa(Val) && "cast() argument of incompatible type!"' failed. // -// build-pass -// compile-flags: --crate-type=lib -Ccodegen-units=1 +//@ build-pass +//@ compile-flags: --crate-type=lib -Ccodegen-units=1 #![no_std] #![panic_runtime] #![feature(panic_runtime)] diff --git a/tests/ui/panic-runtime/link-to-abort.rs b/tests/ui/panic-runtime/link-to-abort.rs index 422206c574d..2a7052616f2 100644 --- a/tests/ui/panic-runtime/link-to-abort.rs +++ b/tests/ui/panic-runtime/link-to-abort.rs @@ -1,8 +1,8 @@ -// run-pass +//@ run-pass -// compile-flags:-C panic=abort -// no-prefer-dynamic -// ignore-macos +//@ compile-flags:-C panic=abort +//@ no-prefer-dynamic +//@ ignore-macos #![feature(panic_abort)] diff --git a/tests/ui/panic-runtime/link-to-unwind.rs b/tests/ui/panic-runtime/link-to-unwind.rs index 59036ca99bd..848b27e3fcc 100644 --- a/tests/ui/panic-runtime/link-to-unwind.rs +++ b/tests/ui/panic-runtime/link-to-unwind.rs @@ -1,6 +1,6 @@ -// run-pass +//@ run-pass -// no-prefer-dynamic +//@ no-prefer-dynamic #![feature(panic_unwind)] diff --git a/tests/ui/panic-runtime/lto-abort.rs b/tests/ui/panic-runtime/lto-abort.rs index 5cc4c013235..1d2aed12b9b 100644 --- a/tests/ui/panic-runtime/lto-abort.rs +++ b/tests/ui/panic-runtime/lto-abort.rs @@ -1,9 +1,9 @@ -// run-pass +//@ run-pass #![allow(unused_variables)] -// compile-flags:-C lto -C panic=abort -// no-prefer-dynamic -// ignore-emscripten no processes -// ignore-sgx no processes +//@ compile-flags:-C lto -C panic=abort +//@ no-prefer-dynamic +//@ ignore-emscripten no processes +//@ ignore-sgx no processes use std::process::Command; use std::env; diff --git a/tests/ui/panic-runtime/lto-unwind.rs b/tests/ui/panic-runtime/lto-unwind.rs index 24048ebe008..5eab2bd56ed 100644 --- a/tests/ui/panic-runtime/lto-unwind.rs +++ b/tests/ui/panic-runtime/lto-unwind.rs @@ -1,11 +1,11 @@ -// run-pass +//@ run-pass #![allow(unused_variables)] -// compile-flags:-C lto -C panic=unwind -// needs-unwind -// no-prefer-dynamic -// ignore-emscripten no processes -// ignore-sgx no processes +//@ compile-flags:-C lto -C panic=unwind +//@ needs-unwind +//@ no-prefer-dynamic +//@ ignore-emscripten no processes +//@ ignore-sgx no processes use std::process::Command; use std::env; diff --git a/tests/ui/panic-runtime/need-abort-got-unwind.rs b/tests/ui/panic-runtime/need-abort-got-unwind.rs index e92400931d2..74b7edd968f 100644 --- a/tests/ui/panic-runtime/need-abort-got-unwind.rs +++ b/tests/ui/panic-runtime/need-abort-got-unwind.rs @@ -1,7 +1,7 @@ -// build-fail -// needs-unwind -// error-pattern:is incompatible with this crate's strategy of `unwind` -// aux-build:needs-abort.rs +//@ build-fail +//@ needs-unwind +//@ error-pattern:is incompatible with this crate's strategy of `unwind` +//@ aux-build:needs-abort.rs extern crate needs_abort; diff --git a/tests/ui/panic-runtime/need-unwind-got-abort.rs b/tests/ui/panic-runtime/need-unwind-got-abort.rs index 6752ecf90d2..6bc41509b6b 100644 --- a/tests/ui/panic-runtime/need-unwind-got-abort.rs +++ b/tests/ui/panic-runtime/need-unwind-got-abort.rs @@ -1,8 +1,8 @@ -// build-fail -// error-pattern:is incompatible with this crate's strategy of `abort` -// aux-build:needs-unwind.rs -// compile-flags:-C panic=abort -// no-prefer-dynamic +//@ build-fail +//@ error-pattern:is incompatible with this crate's strategy of `abort` +//@ aux-build:needs-unwind.rs +//@ compile-flags:-C panic=abort +//@ no-prefer-dynamic extern crate needs_unwind; diff --git a/tests/ui/panic-runtime/runtime-depend-on-needs-runtime.rs b/tests/ui/panic-runtime/runtime-depend-on-needs-runtime.rs index d57f1643e98..d0a82bd8507 100644 --- a/tests/ui/panic-runtime/runtime-depend-on-needs-runtime.rs +++ b/tests/ui/panic-runtime/runtime-depend-on-needs-runtime.rs @@ -1,7 +1,7 @@ -// dont-check-compiler-stderr -// aux-build:needs-panic-runtime.rs -// aux-build:depends.rs -// error-pattern:cannot depend on a crate that needs a panic runtime +//@ dont-check-compiler-stderr +//@ aux-build:needs-panic-runtime.rs +//@ aux-build:depends.rs +//@ error-pattern:cannot depend on a crate that needs a panic runtime extern crate depends; diff --git a/tests/ui/panic-runtime/transitive-link-a-bunch.rs b/tests/ui/panic-runtime/transitive-link-a-bunch.rs index 0e74e300f00..15557d35bc5 100644 --- a/tests/ui/panic-runtime/transitive-link-a-bunch.rs +++ b/tests/ui/panic-runtime/transitive-link-a-bunch.rs @@ -1,11 +1,11 @@ -// build-fail -// needs-unwind -// aux-build:panic-runtime-unwind.rs -// aux-build:panic-runtime-abort.rs -// aux-build:wants-panic-runtime-unwind.rs -// aux-build:wants-panic-runtime-abort.rs -// aux-build:panic-runtime-lang-items.rs -// error-pattern: is not compiled with this crate's panic strategy `unwind` +//@ build-fail +//@ needs-unwind +//@ aux-build:panic-runtime-unwind.rs +//@ aux-build:panic-runtime-abort.rs +//@ aux-build:wants-panic-runtime-unwind.rs +//@ aux-build:wants-panic-runtime-abort.rs +//@ aux-build:panic-runtime-lang-items.rs +//@ error-pattern: is not compiled with this crate's panic strategy `unwind` #![no_std] #![no_main] diff --git a/tests/ui/panic-runtime/two-panic-runtimes.rs b/tests/ui/panic-runtime/two-panic-runtimes.rs index 7ec658ebcf2..3608dca2124 100644 --- a/tests/ui/panic-runtime/two-panic-runtimes.rs +++ b/tests/ui/panic-runtime/two-panic-runtimes.rs @@ -1,9 +1,9 @@ -// build-fail -// dont-check-compiler-stderr -// error-pattern:cannot link together two panic runtimes: panic_runtime_unwind and panic_runtime_unwind2 -// aux-build:panic-runtime-unwind.rs -// aux-build:panic-runtime-unwind2.rs -// aux-build:panic-runtime-lang-items.rs +//@ build-fail +//@ dont-check-compiler-stderr +//@ error-pattern:cannot link together two panic runtimes: panic_runtime_unwind and panic_runtime_unwind2 +//@ aux-build:panic-runtime-unwind.rs +//@ aux-build:panic-runtime-unwind2.rs +//@ aux-build:panic-runtime-lang-items.rs #![no_std] #![no_main] diff --git a/tests/ui/panic-runtime/unwind-interleaved.rs b/tests/ui/panic-runtime/unwind-interleaved.rs index a8b3f349309..e5505cd893a 100644 --- a/tests/ui/panic-runtime/unwind-interleaved.rs +++ b/tests/ui/panic-runtime/unwind-interleaved.rs @@ -1,6 +1,6 @@ -// run-fail -// error-pattern:explicit panic -// ignore-emscripten no processes +//@ run-fail +//@ error-pattern:explicit panic +//@ ignore-emscripten no processes fn a() {} diff --git a/tests/ui/panic-runtime/unwind-rec.rs b/tests/ui/panic-runtime/unwind-rec.rs index a9b7ee8ec7d..d4b53c88768 100644 --- a/tests/ui/panic-runtime/unwind-rec.rs +++ b/tests/ui/panic-runtime/unwind-rec.rs @@ -1,6 +1,6 @@ -// run-fail -// error-pattern:explicit panic -// ignore-emscripten no processes +//@ run-fail +//@ error-pattern:explicit panic +//@ ignore-emscripten no processes fn build() -> Vec { panic!(); diff --git a/tests/ui/panic-runtime/unwind-rec2.rs b/tests/ui/panic-runtime/unwind-rec2.rs index a130f9e879f..6ac9a5a5805 100644 --- a/tests/ui/panic-runtime/unwind-rec2.rs +++ b/tests/ui/panic-runtime/unwind-rec2.rs @@ -1,6 +1,6 @@ -// run-fail -// error-pattern:explicit panic -// ignore-emscripten no processes +//@ run-fail +//@ error-pattern:explicit panic +//@ ignore-emscripten no processes fn build1() -> Vec { vec![0, 0, 0, 0, 0, 0, 0] diff --git a/tests/ui/panic-runtime/unwind-tables-target-required.rs b/tests/ui/panic-runtime/unwind-tables-target-required.rs index 5a90b314a6e..5c6ec19c16d 100644 --- a/tests/ui/panic-runtime/unwind-tables-target-required.rs +++ b/tests/ui/panic-runtime/unwind-tables-target-required.rs @@ -1,11 +1,11 @@ // Tests that the compiler errors if the user tries to turn off unwind tables // when they are required. // -// only-x86_64-pc-windows-msvc -// compile-flags: -C force-unwind-tables=no +//@ only-x86_64-pc-windows-msvc +//@ compile-flags: -C force-unwind-tables=no // -// dont-check-compiler-stderr -// error-pattern: target requires unwind tables, they cannot be disabled with `-C force-unwind-tables=no` +//@ dont-check-compiler-stderr +//@ error-pattern: target requires unwind tables, they cannot be disabled with `-C force-unwind-tables=no` pub fn main() { } diff --git a/tests/ui/panic-runtime/unwind-unique.rs b/tests/ui/panic-runtime/unwind-unique.rs index d66e39110ea..a6cd59690ca 100644 --- a/tests/ui/panic-runtime/unwind-unique.rs +++ b/tests/ui/panic-runtime/unwind-unique.rs @@ -1,6 +1,6 @@ -// run-fail -// error-pattern:explicit panic -// ignore-emscripten no processes +//@ run-fail +//@ error-pattern:explicit panic +//@ ignore-emscripten no processes fn failfn() { panic!(); diff --git a/tests/ui/panic-runtime/want-abort-got-unwind.rs b/tests/ui/panic-runtime/want-abort-got-unwind.rs index e33c3bcc3f0..ad9fa52f3d4 100644 --- a/tests/ui/panic-runtime/want-abort-got-unwind.rs +++ b/tests/ui/panic-runtime/want-abort-got-unwind.rs @@ -1,8 +1,8 @@ -// build-fail -// dont-check-compiler-stderr -// error-pattern:is not compiled with this crate's panic strategy `abort` -// aux-build:panic-runtime-unwind.rs -// compile-flags:-C panic=abort +//@ build-fail +//@ dont-check-compiler-stderr +//@ error-pattern:is not compiled with this crate's panic strategy `abort` +//@ aux-build:panic-runtime-unwind.rs +//@ compile-flags:-C panic=abort extern crate panic_runtime_unwind; diff --git a/tests/ui/panic-runtime/want-abort-got-unwind2.rs b/tests/ui/panic-runtime/want-abort-got-unwind2.rs index 438f1d85a28..d63161db55c 100644 --- a/tests/ui/panic-runtime/want-abort-got-unwind2.rs +++ b/tests/ui/panic-runtime/want-abort-got-unwind2.rs @@ -1,9 +1,9 @@ -// build-fail -// dont-check-compiler-stderr -// error-pattern:is not compiled with this crate's panic strategy `abort` -// aux-build:panic-runtime-unwind.rs -// aux-build:wants-panic-runtime-unwind.rs -// compile-flags:-C panic=abort +//@ build-fail +//@ dont-check-compiler-stderr +//@ error-pattern:is not compiled with this crate's panic strategy `abort` +//@ aux-build:panic-runtime-unwind.rs +//@ aux-build:wants-panic-runtime-unwind.rs +//@ compile-flags:-C panic=abort extern crate wants_panic_runtime_unwind; diff --git a/tests/ui/panic-runtime/want-unwind-got-abort.rs b/tests/ui/panic-runtime/want-unwind-got-abort.rs index b6174dc4efe..93342a09182 100644 --- a/tests/ui/panic-runtime/want-unwind-got-abort.rs +++ b/tests/ui/panic-runtime/want-unwind-got-abort.rs @@ -1,8 +1,8 @@ -// build-fail -// needs-unwind -// error-pattern:is not compiled with this crate's panic strategy `unwind` -// aux-build:panic-runtime-abort.rs -// aux-build:panic-runtime-lang-items.rs +//@ build-fail +//@ needs-unwind +//@ error-pattern:is not compiled with this crate's panic strategy `unwind` +//@ aux-build:panic-runtime-abort.rs +//@ aux-build:panic-runtime-lang-items.rs #![no_std] #![no_main] diff --git a/tests/ui/panic-runtime/want-unwind-got-abort2.rs b/tests/ui/panic-runtime/want-unwind-got-abort2.rs index b54babbeffa..ee3f221d09c 100644 --- a/tests/ui/panic-runtime/want-unwind-got-abort2.rs +++ b/tests/ui/panic-runtime/want-unwind-got-abort2.rs @@ -1,9 +1,9 @@ -// build-fail -// needs-unwind -// error-pattern:is incompatible with this crate's strategy of `unwind` -// aux-build:panic-runtime-abort.rs -// aux-build:wants-panic-runtime-abort.rs -// aux-build:panic-runtime-lang-items.rs +//@ build-fail +//@ needs-unwind +//@ error-pattern:is incompatible with this crate's strategy of `unwind` +//@ aux-build:panic-runtime-abort.rs +//@ aux-build:wants-panic-runtime-abort.rs +//@ aux-build:panic-runtime-lang-items.rs #![no_std] #![no_main] diff --git a/tests/ui/panic-while-printing.rs b/tests/ui/panic-while-printing.rs index 3abedf2a764..6505a69fef7 100644 --- a/tests/ui/panic-while-printing.rs +++ b/tests/ui/panic-while-printing.rs @@ -1,5 +1,5 @@ -// run-pass -// needs-unwind +//@ run-pass +//@ needs-unwind #![feature(internal_output_capture)] diff --git a/tests/ui/panic_implementation-closures.rs b/tests/ui/panic_implementation-closures.rs index b96125aa952..b161859bf9c 100644 --- a/tests/ui/panic_implementation-closures.rs +++ b/tests/ui/panic_implementation-closures.rs @@ -1,4 +1,4 @@ -// build-pass (FIXME(62277): could be check-pass?) +//@ build-pass (FIXME(62277): could be check-pass?) #![crate_type = "rlib"] #![no_std] diff --git a/tests/ui/panics/abort-on-panic.rs b/tests/ui/panics/abort-on-panic.rs index ff31fc24317..4929cdab1c2 100644 --- a/tests/ui/panics/abort-on-panic.rs +++ b/tests/ui/panics/abort-on-panic.rs @@ -1,6 +1,6 @@ -// run-pass -// revisions: current next -//[next] compile-flags: -Znext-solver +//@ run-pass +//@ revisions: current next +//@[next] compile-flags: -Znext-solver #![allow(unused_must_use)] #![feature(c_unwind)] @@ -8,8 +8,8 @@ // Since we mark some ABIs as "nounwind" to LLVM, we must make sure that // we never unwind through them. -// ignore-emscripten no processes -// ignore-sgx no processes +//@ ignore-emscripten no processes +//@ ignore-sgx no processes use std::io; use std::io::prelude::*; diff --git a/tests/ui/panics/args-panic.rs b/tests/ui/panics/args-panic.rs index 7636025c25b..091ced9b479 100644 --- a/tests/ui/panics/args-panic.rs +++ b/tests/ui/panics/args-panic.rs @@ -1,6 +1,6 @@ -// run-fail -// error-pattern:meep -// ignore-emscripten no processes +//@ run-fail +//@ error-pattern:meep +//@ ignore-emscripten no processes fn f(_a: isize, _b: isize, _c: Box) { panic!("moop"); diff --git a/tests/ui/panics/default-backtrace-ice.rs b/tests/ui/panics/default-backtrace-ice.rs index b40203c339d..e0e99a02895 100644 --- a/tests/ui/panics/default-backtrace-ice.rs +++ b/tests/ui/panics/default-backtrace-ice.rs @@ -1,14 +1,14 @@ -// unset-rustc-env:RUST_BACKTRACE -// compile-flags:-Z treat-err-as-bug=1 -// error-pattern:stack backtrace: -// failure-status:101 -// ignore-msvc -// normalize-stderr-test "note: .*" -> "" -// normalize-stderr-test "thread 'rustc' .*" -> "" -// normalize-stderr-test " +\d+:.*__rust_begin_short_backtrace.*" -> "(begin_short_backtrace)" -// normalize-stderr-test " +\d+:.*__rust_end_short_backtrace.*" -> "(end_short_backtrace)" -// normalize-stderr-test " +\d+:.*\n" -> "" -// normalize-stderr-test " +at .*\n" -> "" +//@ unset-rustc-env:RUST_BACKTRACE +//@ compile-flags:-Z treat-err-as-bug=1 +//@ error-pattern:stack backtrace: +//@ failure-status:101 +//@ ignore-msvc +//@ normalize-stderr-test "note: .*" -> "" +//@ normalize-stderr-test "thread 'rustc' .*" -> "" +//@ normalize-stderr-test " +\d+:.*__rust_begin_short_backtrace.*" -> "(begin_short_backtrace)" +//@ normalize-stderr-test " +\d+:.*__rust_end_short_backtrace.*" -> "(end_short_backtrace)" +//@ normalize-stderr-test " +\d+:.*\n" -> "" +//@ normalize-stderr-test " +at .*\n" -> "" // // This test makes sure that full backtraces are used for ICEs when // RUST_BACKTRACE is not set. It does this by checking for the presence of diff --git a/tests/ui/panics/doublepanic.rs b/tests/ui/panics/doublepanic.rs index c1fcc875c36..51945ea708c 100644 --- a/tests/ui/panics/doublepanic.rs +++ b/tests/ui/panics/doublepanic.rs @@ -1,8 +1,8 @@ #![allow(unreachable_code)] -// run-fail -// error-pattern:One -// ignore-emscripten no processes +//@ run-fail +//@ error-pattern:One +//@ ignore-emscripten no processes fn main() { panic!("One"); diff --git a/tests/ui/panics/explicit-panic-msg.rs b/tests/ui/panics/explicit-panic-msg.rs index 9d803578734..ef0c5b39f09 100644 --- a/tests/ui/panics/explicit-panic-msg.rs +++ b/tests/ui/panics/explicit-panic-msg.rs @@ -2,9 +2,9 @@ #![allow(unused_variables)] #![allow(non_fmt_panics)] -// run-fail -// error-pattern:wooooo -// ignore-emscripten no processes +//@ run-fail +//@ error-pattern:wooooo +//@ ignore-emscripten no processes fn main() { let mut a = 1; diff --git a/tests/ui/panics/explicit-panic.rs b/tests/ui/panics/explicit-panic.rs index 27c73d3493c..34e952ef68f 100644 --- a/tests/ui/panics/explicit-panic.rs +++ b/tests/ui/panics/explicit-panic.rs @@ -1,6 +1,6 @@ -// run-fail -// error-pattern:explicit -// ignore-emscripten no processes +//@ run-fail +//@ error-pattern:explicit +//@ ignore-emscripten no processes fn main() { panic!(); diff --git a/tests/ui/panics/fmt-only-once.rs b/tests/ui/panics/fmt-only-once.rs index 6211bf961b3..0e922afbee9 100644 --- a/tests/ui/panics/fmt-only-once.rs +++ b/tests/ui/panics/fmt-only-once.rs @@ -1,6 +1,6 @@ -// run-fail -// check-run-results -// exec-env:RUST_BACKTRACE=0 +//@ run-fail +//@ check-run-results +//@ exec-env:RUST_BACKTRACE=0 // Test that we format the panic message only once. // Regression test for https://github.com/rust-lang/rust/issues/110717 diff --git a/tests/ui/panics/fmt-panic.rs b/tests/ui/panics/fmt-panic.rs index 87fb2e6dd54..032f65cb2e4 100644 --- a/tests/ui/panics/fmt-panic.rs +++ b/tests/ui/panics/fmt-panic.rs @@ -1,6 +1,6 @@ -// run-fail -// error-pattern:meh -// ignore-emscripten no processes +//@ run-fail +//@ error-pattern:meh +//@ ignore-emscripten no processes fn main() { let str_var: String = "meh".to_string(); diff --git a/tests/ui/panics/issue-47429-short-backtraces.rs b/tests/ui/panics/issue-47429-short-backtraces.rs index 58d0fa62c34..97d2e22574a 100644 --- a/tests/ui/panics/issue-47429-short-backtraces.rs +++ b/tests/ui/panics/issue-47429-short-backtraces.rs @@ -1,23 +1,23 @@ // Regression test for #47429: short backtraces were not terminating correctly -// compile-flags: -O -// compile-flags:-Cstrip=none -// run-fail -// check-run-results -// exec-env:RUST_BACKTRACE=1 +//@ compile-flags: -O +//@ compile-flags:-Cstrip=none +//@ run-fail +//@ check-run-results +//@ exec-env:RUST_BACKTRACE=1 -// ignore-msvc see #62897 and `backtrace-debuginfo.rs` test -// ignore-android FIXME #17520 -// ignore-openbsd no support for libbacktrace without filename -// ignore-wasm no panic or subprocess support -// ignore-emscripten no panic or subprocess support -// ignore-sgx no subprocess support -// ignore-fuchsia Backtraces not symbolized +//@ ignore-msvc see #62897 and `backtrace-debuginfo.rs` test +//@ ignore-android FIXME #17520 +//@ ignore-openbsd no support for libbacktrace without filename +//@ ignore-wasm no panic or subprocess support +//@ ignore-emscripten no panic or subprocess support +//@ ignore-sgx no subprocess support +//@ ignore-fuchsia Backtraces not symbolized // NOTE(eddyb) output differs between symbol mangling schemes -// revisions: legacy v0 -// [legacy] compile-flags: -Zunstable-options -Csymbol-mangling-version=legacy -// [v0] compile-flags: -Csymbol-mangling-version=v0 +//@ revisions: legacy v0 +//@ [legacy] compile-flags: -Zunstable-options -Csymbol-mangling-version=legacy +//@ [v0] compile-flags: -Csymbol-mangling-version=v0 fn main() { panic!() diff --git a/tests/ui/panics/location-detail-panic-no-column.rs b/tests/ui/panics/location-detail-panic-no-column.rs index 7cf1bb09c92..3951b282679 100644 --- a/tests/ui/panics/location-detail-panic-no-column.rs +++ b/tests/ui/panics/location-detail-panic-no-column.rs @@ -1,7 +1,7 @@ -// run-fail -// check-run-results -// compile-flags: -Zlocation-detail=line,file -// exec-env:RUST_BACKTRACE=0 +//@ run-fail +//@ check-run-results +//@ compile-flags: -Zlocation-detail=line,file +//@ exec-env:RUST_BACKTRACE=0 fn main() { panic!("column-redacted"); diff --git a/tests/ui/panics/location-detail-panic-no-file.rs b/tests/ui/panics/location-detail-panic-no-file.rs index 9bcbf01d1c6..987aa745c85 100644 --- a/tests/ui/panics/location-detail-panic-no-file.rs +++ b/tests/ui/panics/location-detail-panic-no-file.rs @@ -1,7 +1,7 @@ -// run-fail -// check-run-results -// compile-flags: -Zlocation-detail=line,column -// exec-env:RUST_BACKTRACE=0 +//@ run-fail +//@ check-run-results +//@ compile-flags: -Zlocation-detail=line,column +//@ exec-env:RUST_BACKTRACE=0 fn main() { panic!("file-redacted"); diff --git a/tests/ui/panics/location-detail-panic-no-line.rs b/tests/ui/panics/location-detail-panic-no-line.rs index 25df092e1fb..412517722a8 100644 --- a/tests/ui/panics/location-detail-panic-no-line.rs +++ b/tests/ui/panics/location-detail-panic-no-line.rs @@ -1,7 +1,7 @@ -// run-fail -// check-run-results -// compile-flags: -Zlocation-detail=file,column -// exec-env:RUST_BACKTRACE=0 +//@ run-fail +//@ check-run-results +//@ compile-flags: -Zlocation-detail=file,column +//@ exec-env:RUST_BACKTRACE=0 fn main() { panic!("line-redacted"); diff --git a/tests/ui/panics/location-detail-panic-no-location-info.rs b/tests/ui/panics/location-detail-panic-no-location-info.rs index 7b609145bad..0a04f1ee759 100644 --- a/tests/ui/panics/location-detail-panic-no-location-info.rs +++ b/tests/ui/panics/location-detail-panic-no-location-info.rs @@ -1,7 +1,7 @@ -// run-fail -// check-run-results -// compile-flags: -Zlocation-detail=none -// exec-env:RUST_BACKTRACE=0 +//@ run-fail +//@ check-run-results +//@ compile-flags: -Zlocation-detail=none +//@ exec-env:RUST_BACKTRACE=0 fn main() { panic!("no location info"); diff --git a/tests/ui/panics/location-detail-unwrap-no-file.rs b/tests/ui/panics/location-detail-unwrap-no-file.rs index 5955d9a25ae..4398e5e0b04 100644 --- a/tests/ui/panics/location-detail-unwrap-no-file.rs +++ b/tests/ui/panics/location-detail-unwrap-no-file.rs @@ -1,7 +1,7 @@ -// run-fail -// check-run-results -// compile-flags: -Copt-level=0 -Zlocation-detail=line,column -// exec-env:RUST_BACKTRACE=0 +//@ run-fail +//@ check-run-results +//@ compile-flags: -Copt-level=0 -Zlocation-detail=line,column +//@ exec-env:RUST_BACKTRACE=0 fn main() { let opt: Option = None; diff --git a/tests/ui/panics/main-panic.rs b/tests/ui/panics/main-panic.rs index 023ab470125..b69f1656ca4 100644 --- a/tests/ui/panics/main-panic.rs +++ b/tests/ui/panics/main-panic.rs @@ -1,6 +1,6 @@ -// run-fail -// error-pattern:thread 'main' panicked at -// ignore-emscripten no processes +//@ run-fail +//@ error-pattern:thread 'main' panicked at +//@ ignore-emscripten no processes fn main() { panic!() diff --git a/tests/ui/panics/nested_panic_caught.rs b/tests/ui/panics/nested_panic_caught.rs index d43886e8095..23e4e5face9 100644 --- a/tests/ui/panics/nested_panic_caught.rs +++ b/tests/ui/panics/nested_panic_caught.rs @@ -1,5 +1,5 @@ -// run-pass -// needs-unwind +//@ run-pass +//@ needs-unwind // Checks that nested panics work correctly. diff --git a/tests/ui/panics/panic-2021.rs b/tests/ui/panics/panic-2021.rs index e606612e108..399709d5276 100644 --- a/tests/ui/panics/panic-2021.rs +++ b/tests/ui/panics/panic-2021.rs @@ -1,4 +1,4 @@ -// edition:2021 +//@ edition:2021 fn main() { panic!(123); //~ ERROR: format argument must be a string literal diff --git a/tests/ui/panics/panic-arg.rs b/tests/ui/panics/panic-arg.rs index f7c2dbb096f..10be6d5ff6c 100644 --- a/tests/ui/panics/panic-arg.rs +++ b/tests/ui/panics/panic-arg.rs @@ -1,6 +1,6 @@ -// run-fail -// error-pattern:woe -// ignore-emscripten no processes +//@ run-fail +//@ error-pattern:woe +//@ ignore-emscripten no processes fn f(a: isize) { println!("{}", a); diff --git a/tests/ui/panics/panic-handler-chain-update-hook.rs b/tests/ui/panics/panic-handler-chain-update-hook.rs index 4dd08ba4ad4..1f8fe30cfd8 100644 --- a/tests/ui/panics/panic-handler-chain-update-hook.rs +++ b/tests/ui/panics/panic-handler-chain-update-hook.rs @@ -1,8 +1,8 @@ -// run-pass -// needs-unwind +//@ run-pass +//@ needs-unwind #![allow(stable_features)] -// ignore-emscripten no threads support +//@ ignore-emscripten no threads support #![feature(std_panic)] #![feature(panic_update_hook)] diff --git a/tests/ui/panics/panic-handler-chain.rs b/tests/ui/panics/panic-handler-chain.rs index 73d6e790dff..eb23849f3ac 100644 --- a/tests/ui/panics/panic-handler-chain.rs +++ b/tests/ui/panics/panic-handler-chain.rs @@ -1,8 +1,8 @@ -// run-pass -// needs-unwind +//@ run-pass +//@ needs-unwind #![allow(stable_features)] -// ignore-emscripten no threads support +//@ ignore-emscripten no threads support #![feature(std_panic)] diff --git a/tests/ui/panics/panic-handler-flail-wildly.rs b/tests/ui/panics/panic-handler-flail-wildly.rs index 679dc7de87a..768c9d4c4c5 100644 --- a/tests/ui/panics/panic-handler-flail-wildly.rs +++ b/tests/ui/panics/panic-handler-flail-wildly.rs @@ -1,10 +1,10 @@ -// run-pass -// needs-unwind +//@ run-pass +//@ needs-unwind #![allow(stable_features)] #![allow(unused_must_use)] -// ignore-emscripten no threads support +//@ ignore-emscripten no threads support #![feature(std_panic)] diff --git a/tests/ui/panics/panic-handler-set-twice.rs b/tests/ui/panics/panic-handler-set-twice.rs index 27445302090..902e48b6541 100644 --- a/tests/ui/panics/panic-handler-set-twice.rs +++ b/tests/ui/panics/panic-handler-set-twice.rs @@ -1,11 +1,11 @@ -// run-pass -// needs-unwind +//@ run-pass +//@ needs-unwind #![allow(unused_variables)] #![allow(stable_features)] #![feature(std_panic)] -// ignore-emscripten no threads support +//@ ignore-emscripten no threads support use std::sync::atomic::{AtomicUsize, Ordering}; use std::panic; diff --git a/tests/ui/panics/panic-in-cleanup.rs b/tests/ui/panics/panic-in-cleanup.rs index 84880f1881c..c3639c7034e 100644 --- a/tests/ui/panics/panic-in-cleanup.rs +++ b/tests/ui/panics/panic-in-cleanup.rs @@ -1,13 +1,13 @@ -// run-fail -// exec-env:RUST_BACKTRACE=0 -// check-run-results -// error-pattern: panic in a destructor during cleanup -// normalize-stderr-test: "\n +[0-9]+:[^\n]+" -> "" -// normalize-stderr-test: "\n +at [^\n]+" -> "" -// normalize-stderr-test: "(core/src/panicking\.rs):[0-9]+:[0-9]+" -> "$1:$$LINE:$$COL" -// needs-unwind -// ignore-emscripten "RuntimeError" junk in output -// ignore-msvc SEH doesn't do panic-during-cleanup the same way as everyone else +//@ run-fail +//@ exec-env:RUST_BACKTRACE=0 +//@ check-run-results +//@ error-pattern: panic in a destructor during cleanup +//@ normalize-stderr-test: "\n +[0-9]+:[^\n]+" -> "" +//@ normalize-stderr-test: "\n +at [^\n]+" -> "" +//@ normalize-stderr-test: "(core/src/panicking\.rs):[0-9]+:[0-9]+" -> "$1:$$LINE:$$COL" +//@ needs-unwind +//@ ignore-emscripten "RuntimeError" junk in output +//@ ignore-msvc SEH doesn't do panic-during-cleanup the same way as everyone else struct Bomb; diff --git a/tests/ui/panics/panic-in-dtor-drops-fields.rs b/tests/ui/panics/panic-in-dtor-drops-fields.rs index c0963aa3114..4d18dc0e059 100644 --- a/tests/ui/panics/panic-in-dtor-drops-fields.rs +++ b/tests/ui/panics/panic-in-dtor-drops-fields.rs @@ -1,9 +1,9 @@ -// run-pass -// needs-unwind +//@ run-pass +//@ needs-unwind #![allow(dead_code)] #![allow(non_upper_case_globals)] -// ignore-emscripten no threads support +//@ ignore-emscripten no threads support use std::thread; diff --git a/tests/ui/panics/panic-in-ffi.rs b/tests/ui/panics/panic-in-ffi.rs index d9f1fcee855..6f54acb3e04 100644 --- a/tests/ui/panics/panic-in-ffi.rs +++ b/tests/ui/panics/panic-in-ffi.rs @@ -1,12 +1,12 @@ -// run-fail -// exec-env:RUST_BACKTRACE=0 -// check-run-results -// error-pattern: panic in a function that cannot unwind -// normalize-stderr-test: "\n +[0-9]+:[^\n]+" -> "" -// normalize-stderr-test: "\n +at [^\n]+" -> "" -// normalize-stderr-test: "(core/src/panicking\.rs):[0-9]+:[0-9]+" -> "$1:$$LINE:$$COL" -// needs-unwind -// ignore-emscripten "RuntimeError" junk in output +//@ run-fail +//@ exec-env:RUST_BACKTRACE=0 +//@ check-run-results +//@ error-pattern: panic in a function that cannot unwind +//@ normalize-stderr-test: "\n +[0-9]+:[^\n]+" -> "" +//@ normalize-stderr-test: "\n +at [^\n]+" -> "" +//@ normalize-stderr-test: "(core/src/panicking\.rs):[0-9]+:[0-9]+" -> "$1:$$LINE:$$COL" +//@ needs-unwind +//@ ignore-emscripten "RuntimeError" junk in output #![feature(c_unwind)] extern "C" fn panic_in_ffi() { diff --git a/tests/ui/panics/panic-macro-any-wrapped.rs b/tests/ui/panics/panic-macro-any-wrapped.rs index 1815a0d2c10..7c6790e35fd 100644 --- a/tests/ui/panics/panic-macro-any-wrapped.rs +++ b/tests/ui/panics/panic-macro-any-wrapped.rs @@ -1,7 +1,7 @@ -// run-fail -// error-pattern:panicked -// error-pattern:Box -// ignore-emscripten no processes +//@ run-fail +//@ error-pattern:panicked +//@ error-pattern:Box +//@ ignore-emscripten no processes #![allow(non_fmt_panics)] diff --git a/tests/ui/panics/panic-macro-any.rs b/tests/ui/panics/panic-macro-any.rs index 1bc3c336c3f..75397333fa4 100644 --- a/tests/ui/panics/panic-macro-any.rs +++ b/tests/ui/panics/panic-macro-any.rs @@ -1,7 +1,7 @@ -// run-fail -// error-pattern:panicked -// error-pattern:Box -// ignore-emscripten no processes +//@ run-fail +//@ error-pattern:panicked +//@ error-pattern:Box +//@ ignore-emscripten no processes #![allow(non_fmt_panics)] diff --git a/tests/ui/panics/panic-macro-explicit.rs b/tests/ui/panics/panic-macro-explicit.rs index b5b6c7675ac..2c7b84d99fe 100644 --- a/tests/ui/panics/panic-macro-explicit.rs +++ b/tests/ui/panics/panic-macro-explicit.rs @@ -1,7 +1,7 @@ -// run-fail -// error-pattern:panicked -// error-pattern:explicit panic -// ignore-emscripten no processes +//@ run-fail +//@ error-pattern:panicked +//@ error-pattern:explicit panic +//@ ignore-emscripten no processes fn main() { panic!(); diff --git a/tests/ui/panics/panic-macro-fmt.rs b/tests/ui/panics/panic-macro-fmt.rs index 0796d33eae0..1a63a06c75a 100644 --- a/tests/ui/panics/panic-macro-fmt.rs +++ b/tests/ui/panics/panic-macro-fmt.rs @@ -1,7 +1,7 @@ -// run-fail -// error-pattern:panicked -// error-pattern:test-fail-fmt 42 rust -// ignore-emscripten no processes +//@ run-fail +//@ error-pattern:panicked +//@ error-pattern:test-fail-fmt 42 rust +//@ ignore-emscripten no processes fn main() { panic!("test-fail-fmt {} {}", 42, "rust"); diff --git a/tests/ui/panics/panic-macro-owned.rs b/tests/ui/panics/panic-macro-owned.rs index 522c87e1c31..1878f3d52ab 100644 --- a/tests/ui/panics/panic-macro-owned.rs +++ b/tests/ui/panics/panic-macro-owned.rs @@ -1,7 +1,7 @@ -// run-fail -// error-pattern:panicked -// error-pattern:test-fail-owned -// ignore-emscripten no processes +//@ run-fail +//@ error-pattern:panicked +//@ error-pattern:test-fail-owned +//@ ignore-emscripten no processes fn main() { panic!("test-fail-owned"); diff --git a/tests/ui/panics/panic-macro-static.rs b/tests/ui/panics/panic-macro-static.rs index 06ec5b0ad30..018166e60cf 100644 --- a/tests/ui/panics/panic-macro-static.rs +++ b/tests/ui/panics/panic-macro-static.rs @@ -1,7 +1,7 @@ -// run-fail -// error-pattern:panicked -// error-pattern:test-fail-static -// ignore-emscripten no processes +//@ run-fail +//@ error-pattern:panicked +//@ error-pattern:test-fail-static +//@ ignore-emscripten no processes fn main() { panic!("test-fail-static"); diff --git a/tests/ui/panics/panic-main.rs b/tests/ui/panics/panic-main.rs index 87df7688f0b..d71fca0754e 100644 --- a/tests/ui/panics/panic-main.rs +++ b/tests/ui/panics/panic-main.rs @@ -1,6 +1,6 @@ -// run-fail -// error-pattern:moop -// ignore-emscripten no processes +//@ run-fail +//@ error-pattern:moop +//@ ignore-emscripten no processes fn main() { panic!("moop"); diff --git a/tests/ui/panics/panic-parens.rs b/tests/ui/panics/panic-parens.rs index 59ab5444649..271d0363cab 100644 --- a/tests/ui/panics/panic-parens.rs +++ b/tests/ui/panics/panic-parens.rs @@ -1,9 +1,9 @@ // Fail macros without arguments need to be disambiguated in // certain positions -// run-fail -// error-pattern:oops -// ignore-emscripten no processes +//@ run-fail +//@ error-pattern:oops +//@ ignore-emscripten no processes fn bigpanic() { while (panic!("oops")) { diff --git a/tests/ui/panics/panic-recover-propagate.rs b/tests/ui/panics/panic-recover-propagate.rs index e110d94b656..f8be86be19d 100644 --- a/tests/ui/panics/panic-recover-propagate.rs +++ b/tests/ui/panics/panic-recover-propagate.rs @@ -1,6 +1,6 @@ -// run-pass -// needs-unwind -// ignore-emscripten no threads support +//@ run-pass +//@ needs-unwind +//@ ignore-emscripten no threads support use std::sync::atomic::{AtomicUsize, Ordering}; use std::panic; diff --git a/tests/ui/panics/panic-set-handler.rs b/tests/ui/panics/panic-set-handler.rs index 3c00183e253..39286ca865b 100644 --- a/tests/ui/panics/panic-set-handler.rs +++ b/tests/ui/panics/panic-set-handler.rs @@ -1,6 +1,6 @@ -// run-fail -// error-pattern:greetings from the panic handler -// ignore-emscripten no processes +//@ run-fail +//@ error-pattern:greetings from the panic handler +//@ ignore-emscripten no processes use std::panic; diff --git a/tests/ui/panics/panic-set-unset-handler.rs b/tests/ui/panics/panic-set-unset-handler.rs index 91f69f0a69e..02f1599338b 100644 --- a/tests/ui/panics/panic-set-unset-handler.rs +++ b/tests/ui/panics/panic-set-unset-handler.rs @@ -1,7 +1,7 @@ -// run-fail -// error-pattern:thread 'main' panicked -// error-pattern:foobar -// ignore-emscripten no processes +//@ run-fail +//@ error-pattern:thread 'main' panicked +//@ error-pattern:foobar +//@ ignore-emscripten no processes use std::panic; diff --git a/tests/ui/panics/panic-short-backtrace-windows-x86_64.rs b/tests/ui/panics/panic-short-backtrace-windows-x86_64.rs index be83eb74843..70c4a5aaf2b 100644 --- a/tests/ui/panics/panic-short-backtrace-windows-x86_64.rs +++ b/tests/ui/panics/panic-short-backtrace-windows-x86_64.rs @@ -1,6 +1,6 @@ // This test has been spuriously failing a lot recently (#92000). // Ignore it until the underlying issue is fixed. -// ignore-test (#92000) +//@ ignore-test (#92000) // Regression test for #87481: short backtrace formatting cut off the entire stack trace. @@ -8,19 +8,19 @@ // is not normally limited to 1 CGU. This is important so that the `__rust_begin_short_backtrace` // and `__rust_end_short_backtrace` symbols are not marked internal to the CGU and thus will be // named in the symbol table. -// compile-flags: -O -Ccodegen-units=8 +//@ compile-flags: -O -Ccodegen-units=8 -// run-fail -// check-run-results -// exec-env:RUST_BACKTRACE=1 +//@ run-fail +//@ check-run-results +//@ exec-env:RUST_BACKTRACE=1 // We need to normalize out frame 5 because without debug info, dbghelp.dll doesn't know where CGU // internal functions like `main` start or end and so it will return whatever symbol happens // to be located near the address. -// normalize-stderr-test: "5: .*" -> "5: some Rust fn" +//@ normalize-stderr-test: "5: .*" -> "5: some Rust fn" // Backtraces are pretty broken in general on i686-pc-windows-msvc (#62897). -// only-x86_64-pc-windows-msvc +//@ only-x86_64-pc-windows-msvc fn main() { a(); diff --git a/tests/ui/panics/panic-take-handler-nop.rs b/tests/ui/panics/panic-take-handler-nop.rs index d14a3244e61..89e1d234df1 100644 --- a/tests/ui/panics/panic-take-handler-nop.rs +++ b/tests/ui/panics/panic-take-handler-nop.rs @@ -1,7 +1,7 @@ -// run-fail -// error-pattern:thread 'main' panicked -// error-pattern:foobar -// ignore-emscripten no processes +//@ run-fail +//@ error-pattern:thread 'main' panicked +//@ error-pattern:foobar +//@ ignore-emscripten no processes use std::panic; diff --git a/tests/ui/panics/panic-task-name-none.rs b/tests/ui/panics/panic-task-name-none.rs index 3fb0f3412f6..7eb974bde4c 100644 --- a/tests/ui/panics/panic-task-name-none.rs +++ b/tests/ui/panics/panic-task-name-none.rs @@ -1,7 +1,7 @@ -// run-fail -// error-pattern:thread '' panicked -// error-pattern:test -// ignore-emscripten Needs threads +//@ run-fail +//@ error-pattern:thread '' panicked +//@ error-pattern:test +//@ ignore-emscripten Needs threads use std::thread; diff --git a/tests/ui/panics/panic-task-name-owned.rs b/tests/ui/panics/panic-task-name-owned.rs index d5274ebbc4b..9a680676dc0 100644 --- a/tests/ui/panics/panic-task-name-owned.rs +++ b/tests/ui/panics/panic-task-name-owned.rs @@ -1,7 +1,7 @@ -// run-fail -// error-pattern:thread 'owned name' panicked -// error-pattern:test -// ignore-emscripten Needs threads. +//@ run-fail +//@ error-pattern:thread 'owned name' panicked +//@ error-pattern:test +//@ ignore-emscripten Needs threads. use std::thread::Builder; diff --git a/tests/ui/panics/panic.rs b/tests/ui/panics/panic.rs index b6227a582ce..b9721ac8230 100644 --- a/tests/ui/panics/panic.rs +++ b/tests/ui/panics/panic.rs @@ -1,6 +1,6 @@ -// run-fail -// error-pattern:1 == 2 -// ignore-emscripten no processes +//@ run-fail +//@ error-pattern:1 == 2 +//@ ignore-emscripten no processes fn main() { assert!(1 == 2); diff --git a/tests/ui/panics/result-get-panic.rs b/tests/ui/panics/result-get-panic.rs index 461f30b9134..d7f6dfe8406 100644 --- a/tests/ui/panics/result-get-panic.rs +++ b/tests/ui/panics/result-get-panic.rs @@ -1,6 +1,6 @@ -// run-fail -// error-pattern:called `Result::unwrap()` on an `Err` value -// ignore-emscripten no processes +//@ run-fail +//@ error-pattern:called `Result::unwrap()` on an `Err` value +//@ ignore-emscripten no processes use std::result::Result::Err; diff --git a/tests/ui/panics/runtime-switch.rs b/tests/ui/panics/runtime-switch.rs index 882340e495c..b0991321ee4 100644 --- a/tests/ui/panics/runtime-switch.rs +++ b/tests/ui/panics/runtime-switch.rs @@ -1,23 +1,23 @@ // Test for std::panic::set_backtrace_style. -// compile-flags: -O -// compile-flags:-Cstrip=none -// run-fail -// check-run-results -// exec-env:RUST_BACKTRACE=0 +//@ compile-flags: -O +//@ compile-flags:-Cstrip=none +//@ run-fail +//@ check-run-results +//@ exec-env:RUST_BACKTRACE=0 -// ignore-msvc see #62897 and `backtrace-debuginfo.rs` test -// ignore-android FIXME #17520 -// ignore-openbsd no support for libbacktrace without filename -// ignore-wasm no panic or subprocess support -// ignore-emscripten no panic or subprocess support -// ignore-sgx no subprocess support -// ignore-fuchsia Backtrace not symbolized +//@ ignore-msvc see #62897 and `backtrace-debuginfo.rs` test +//@ ignore-android FIXME #17520 +//@ ignore-openbsd no support for libbacktrace without filename +//@ ignore-wasm no panic or subprocess support +//@ ignore-emscripten no panic or subprocess support +//@ ignore-sgx no subprocess support +//@ ignore-fuchsia Backtrace not symbolized // NOTE(eddyb) output differs between symbol mangling schemes -// revisions: legacy v0 -// [legacy] compile-flags: -Zunstable-options -Csymbol-mangling-version=legacy -// [v0] compile-flags: -Csymbol-mangling-version=v0 +//@ revisions: legacy v0 +//@ [legacy] compile-flags: -Zunstable-options -Csymbol-mangling-version=legacy +//@ [v0] compile-flags: -Csymbol-mangling-version=v0 #![feature(panic_backtrace_config)] diff --git a/tests/ui/panics/short-ice-remove-middle-frames-2.rs b/tests/ui/panics/short-ice-remove-middle-frames-2.rs index 751959f55bb..15843fa6626 100644 --- a/tests/ui/panics/short-ice-remove-middle-frames-2.rs +++ b/tests/ui/panics/short-ice-remove-middle-frames-2.rs @@ -1,15 +1,15 @@ -// compile-flags:-Cstrip=none -// run-fail -// check-run-results -// exec-env:RUST_BACKTRACE=1 -// needs-unwind -// ignore-android FIXME #17520 -// ignore-wasm no panic support -// ignore-openbsd no support for libbacktrace without filename -// ignore-emscripten no panic -// ignore-sgx Backtraces not symbolized -// ignore-fuchsia Backtraces not symbolized -// ignore-msvc the `__rust_{begin,end}_short_backtrace` symbols aren't reliable. +//@ compile-flags:-Cstrip=none +//@ run-fail +//@ check-run-results +//@ exec-env:RUST_BACKTRACE=1 +//@ needs-unwind +//@ ignore-android FIXME #17520 +//@ ignore-wasm no panic support +//@ ignore-openbsd no support for libbacktrace without filename +//@ ignore-emscripten no panic +//@ ignore-sgx Backtraces not symbolized +//@ ignore-fuchsia Backtraces not symbolized +//@ ignore-msvc the `__rust_{begin,end}_short_backtrace` symbols aren't reliable. /// This test case make sure that we can have multiple pairs of `__rust_{begin,end}_short_backtrace` diff --git a/tests/ui/panics/short-ice-remove-middle-frames.rs b/tests/ui/panics/short-ice-remove-middle-frames.rs index 134e13233da..204780459b3 100644 --- a/tests/ui/panics/short-ice-remove-middle-frames.rs +++ b/tests/ui/panics/short-ice-remove-middle-frames.rs @@ -1,15 +1,15 @@ -// compile-flags:-Cstrip=none -// run-fail -// check-run-results -// exec-env:RUST_BACKTRACE=1 -// needs-unwind -// ignore-android FIXME #17520 -// ignore-wasm no panic support -// ignore-openbsd no support for libbacktrace without filename -// ignore-emscripten no panic -// ignore-sgx Backtraces not symbolized -// ignore-fuchsia Backtraces not symbolized -// ignore-msvc the `__rust_{begin,end}_short_backtrace` symbols aren't reliable. +//@ compile-flags:-Cstrip=none +//@ run-fail +//@ check-run-results +//@ exec-env:RUST_BACKTRACE=1 +//@ needs-unwind +//@ ignore-android FIXME #17520 +//@ ignore-wasm no panic support +//@ ignore-openbsd no support for libbacktrace without filename +//@ ignore-emscripten no panic +//@ ignore-sgx Backtraces not symbolized +//@ ignore-fuchsia Backtraces not symbolized +//@ ignore-msvc the `__rust_{begin,end}_short_backtrace` symbols aren't reliable. #[inline(never)] diff --git a/tests/ui/panics/test-panic.rs b/tests/ui/panics/test-panic.rs index 85c9279cdf2..29a3c4e9c9f 100644 --- a/tests/ui/panics/test-panic.rs +++ b/tests/ui/panics/test-panic.rs @@ -1,7 +1,7 @@ -// run-fail -// check-stdout -// compile-flags: --test -// ignore-emscripten +//@ run-fail +//@ check-stdout +//@ compile-flags: --test +//@ ignore-emscripten #[test] fn test_foo() { diff --git a/tests/ui/panics/test-should-fail-bad-message.rs b/tests/ui/panics/test-should-fail-bad-message.rs index 701f2677648..9d8084053cc 100644 --- a/tests/ui/panics/test-should-fail-bad-message.rs +++ b/tests/ui/panics/test-should-fail-bad-message.rs @@ -1,7 +1,7 @@ -// run-fail -// check-stdout -// compile-flags: --test -// ignore-emscripten +//@ run-fail +//@ check-stdout +//@ compile-flags: --test +//@ ignore-emscripten #[test] #[should_panic(expected = "foobar")] diff --git a/tests/ui/panics/test-should-panic-bad-message.rs b/tests/ui/panics/test-should-panic-bad-message.rs index a82c4e1440a..4f39412af5f 100644 --- a/tests/ui/panics/test-should-panic-bad-message.rs +++ b/tests/ui/panics/test-should-panic-bad-message.rs @@ -1,7 +1,7 @@ -// run-fail -// compile-flags: --test -// check-stdout -// ignore-emscripten no processes +//@ run-fail +//@ compile-flags: --test +//@ check-stdout +//@ ignore-emscripten no processes #[test] #[should_panic(expected = "foo")] diff --git a/tests/ui/panics/test-should-panic-no-message.rs b/tests/ui/panics/test-should-panic-no-message.rs index 13f67a41cdd..8bbcbe9fa59 100644 --- a/tests/ui/panics/test-should-panic-no-message.rs +++ b/tests/ui/panics/test-should-panic-no-message.rs @@ -1,7 +1,7 @@ -// run-fail -// compile-flags: --test -// check-stdout -// ignore-emscripten no processes +//@ run-fail +//@ compile-flags: --test +//@ check-stdout +//@ ignore-emscripten no processes #[test] #[should_panic(expected = "foo")] diff --git a/tests/ui/panics/unique-panic.rs b/tests/ui/panics/unique-panic.rs index ae7911e5943..63ff38b6d12 100644 --- a/tests/ui/panics/unique-panic.rs +++ b/tests/ui/panics/unique-panic.rs @@ -1,9 +1,9 @@ -// run-fail -// error-pattern: panic +//@ run-fail +//@ error-pattern: panic // for some reason, fails to match error string on // wasm32-unknown-unknown with stripped debuginfo and symbols, // so don't strip it -// compile-flags:-Cstrip=none +//@ compile-flags:-Cstrip=none fn main() { Box::new(panic!()); diff --git a/tests/ui/panics/while-body-panics.rs b/tests/ui/panics/while-body-panics.rs index 2c05eb389cc..bddcd5d50ce 100644 --- a/tests/ui/panics/while-body-panics.rs +++ b/tests/ui/panics/while-body-panics.rs @@ -1,8 +1,8 @@ #![allow(while_true)] -// run-fail -// error-pattern:quux -// ignore-emscripten no processes +//@ run-fail +//@ error-pattern:quux +//@ ignore-emscripten no processes fn main() { let _x: isize = { diff --git a/tests/ui/panics/while-panic.rs b/tests/ui/panics/while-panic.rs index 3c6ee8fa315..2961e8599c3 100644 --- a/tests/ui/panics/while-panic.rs +++ b/tests/ui/panics/while-panic.rs @@ -1,8 +1,8 @@ #![allow(while_true)] -// run-fail -// error-pattern:giraffe -// ignore-emscripten no processes +//@ run-fail +//@ error-pattern:giraffe +//@ ignore-emscripten no processes fn main() { panic!("{}", { diff --git a/tests/ui/parallel-rustc/cache-after-waiting-issue-111528.rs b/tests/ui/parallel-rustc/cache-after-waiting-issue-111528.rs index 148a59240f9..b23cb9ce917 100644 --- a/tests/ui/parallel-rustc/cache-after-waiting-issue-111528.rs +++ b/tests/ui/parallel-rustc/cache-after-waiting-issue-111528.rs @@ -1,5 +1,5 @@ -// compile-flags: -Z threads=16 -// build-fail +//@ compile-flags: -Z threads=16 +//@ build-fail #![crate_type="rlib"] #![allow(warnings)] diff --git a/tests/ui/parallel-rustc/export-symbols-deadlock-issue-118205-2.rs b/tests/ui/parallel-rustc/export-symbols-deadlock-issue-118205-2.rs index 8240b249018..024df728736 100644 --- a/tests/ui/parallel-rustc/export-symbols-deadlock-issue-118205-2.rs +++ b/tests/ui/parallel-rustc/export-symbols-deadlock-issue-118205-2.rs @@ -1,6 +1,6 @@ -// compile-flags:-C extra-filename=-1 -Z threads=16 -// no-prefer-dynamic -// build-pass +//@ compile-flags:-C extra-filename=-1 -Z threads=16 +//@ no-prefer-dynamic +//@ build-pass #![crate_name = "crateresolve1"] #![crate_type = "lib"] diff --git a/tests/ui/parallel-rustc/export-symbols-deadlock-issue-118205.rs b/tests/ui/parallel-rustc/export-symbols-deadlock-issue-118205.rs index 691c36cfc9e..3ccc1ea5f10 100644 --- a/tests/ui/parallel-rustc/export-symbols-deadlock-issue-118205.rs +++ b/tests/ui/parallel-rustc/export-symbols-deadlock-issue-118205.rs @@ -1,5 +1,5 @@ -// compile-flags: -Z threads=16 -// build-pass +//@ compile-flags: -Z threads=16 +//@ build-pass pub static GLOBAL: isize = 3; diff --git a/tests/ui/parallel-rustc/hello_world.rs b/tests/ui/parallel-rustc/hello_world.rs index 53e95c890ef..56698fe2489 100644 --- a/tests/ui/parallel-rustc/hello_world.rs +++ b/tests/ui/parallel-rustc/hello_world.rs @@ -1,5 +1,5 @@ -// compile-flags: -Z threads=8 -// run-pass +//@ compile-flags: -Z threads=8 +//@ run-pass fn main() { println!("Hello world!"); diff --git a/tests/ui/parallel-rustc/read-stolen-value-issue-111520.rs b/tests/ui/parallel-rustc/read-stolen-value-issue-111520.rs index 1907348cf09..ea8ecb67859 100644 --- a/tests/ui/parallel-rustc/read-stolen-value-issue-111520.rs +++ b/tests/ui/parallel-rustc/read-stolen-value-issue-111520.rs @@ -1,5 +1,5 @@ -// compile-flags: -Z threads=16 -// run-pass +//@ compile-flags: -Z threads=16 +//@ run-pass #[repr(transparent)] struct Sched { diff --git a/tests/ui/parser/anon-enums-are-ambiguous.rs b/tests/ui/parser/anon-enums-are-ambiguous.rs index b0173cf98e0..c6c3a6be1ef 100644 --- a/tests/ui/parser/anon-enums-are-ambiguous.rs +++ b/tests/ui/parser/anon-enums-are-ambiguous.rs @@ -1,4 +1,4 @@ -// check-pass +//@ check-pass macro_rules! test_expr { ($expr:expr) => {}; diff --git a/tests/ui/parser/assoc/assoc-const-underscore-syntactic-pass.rs b/tests/ui/parser/assoc/assoc-const-underscore-syntactic-pass.rs index 60da408c811..6c045379191 100644 --- a/tests/ui/parser/assoc/assoc-const-underscore-syntactic-pass.rs +++ b/tests/ui/parser/assoc/assoc-const-underscore-syntactic-pass.rs @@ -1,6 +1,6 @@ // All constant items (associated or otherwise) may syntactically use `_` as a name. -// check-pass +//@ check-pass fn main() {} diff --git a/tests/ui/parser/assoc/assoc-oddities-1.rs b/tests/ui/parser/assoc/assoc-oddities-1.rs index 5914805e5c1..246546ac034 100644 --- a/tests/ui/parser/assoc/assoc-oddities-1.rs +++ b/tests/ui/parser/assoc/assoc-oddities-1.rs @@ -1,4 +1,4 @@ -// compile-flags: -Z parse-only +//@ compile-flags: -Z parse-only fn main() { // following lines below parse and must not fail diff --git a/tests/ui/parser/assoc/assoc-oddities-2.rs b/tests/ui/parser/assoc/assoc-oddities-2.rs index 3d35aad7455..aee2af41d62 100644 --- a/tests/ui/parser/assoc/assoc-oddities-2.rs +++ b/tests/ui/parser/assoc/assoc-oddities-2.rs @@ -1,4 +1,4 @@ -// compile-flags: -Z parse-only +//@ compile-flags: -Z parse-only fn main() { // see assoc-oddities-1 for explanation diff --git a/tests/ui/parser/async-with-nonterminal-block.rs b/tests/ui/parser/async-with-nonterminal-block.rs index 96015fd5d82..8604bd383a1 100644 --- a/tests/ui/parser/async-with-nonterminal-block.rs +++ b/tests/ui/parser/async-with-nonterminal-block.rs @@ -1,5 +1,5 @@ -// check-pass -// edition:2021 +//@ check-pass +//@ edition:2021 macro_rules! create_async { ($body:block) => { diff --git a/tests/ui/parser/attribute/attr-dangling-in-fn.rs b/tests/ui/parser/attribute/attr-dangling-in-fn.rs index c7c45bafb0d..d59f90aed5d 100644 --- a/tests/ui/parser/attribute/attr-dangling-in-fn.rs +++ b/tests/ui/parser/attribute/attr-dangling-in-fn.rs @@ -1,4 +1,4 @@ -// error-pattern:expected statement +//@ error-pattern:expected statement fn f() { #[foo = "bar"] diff --git a/tests/ui/parser/attribute/attr-dangling-in-mod.rs b/tests/ui/parser/attribute/attr-dangling-in-mod.rs index 261ed3913af..001ac1135f6 100644 --- a/tests/ui/parser/attribute/attr-dangling-in-mod.rs +++ b/tests/ui/parser/attribute/attr-dangling-in-mod.rs @@ -1,4 +1,4 @@ -// error-pattern:expected item +//@ error-pattern:expected item fn main() { } diff --git a/tests/ui/parser/attribute/attr-unquoted-ident.fixed b/tests/ui/parser/attribute/attr-unquoted-ident.fixed index 6cdf22f7ec0..636508b5615 100644 --- a/tests/ui/parser/attribute/attr-unquoted-ident.fixed +++ b/tests/ui/parser/attribute/attr-unquoted-ident.fixed @@ -1,5 +1,5 @@ -// compile-flags: -Zdeduplicate-diagnostics=yes -// run-rustfix +//@ compile-flags: -Zdeduplicate-diagnostics=yes +//@ run-rustfix fn main() { #[cfg(key="foo")] diff --git a/tests/ui/parser/attribute/attr-unquoted-ident.rs b/tests/ui/parser/attribute/attr-unquoted-ident.rs index 75af015c9fe..9b9a9f78403 100644 --- a/tests/ui/parser/attribute/attr-unquoted-ident.rs +++ b/tests/ui/parser/attribute/attr-unquoted-ident.rs @@ -1,5 +1,5 @@ -// compile-flags: -Zdeduplicate-diagnostics=yes -// run-rustfix +//@ compile-flags: -Zdeduplicate-diagnostics=yes +//@ run-rustfix fn main() { #[cfg(key=foo)] diff --git a/tests/ui/parser/bad-fn-ptr-qualifier.fixed b/tests/ui/parser/bad-fn-ptr-qualifier.fixed index ad8e718cf88..558a27cd456 100644 --- a/tests/ui/parser/bad-fn-ptr-qualifier.fixed +++ b/tests/ui/parser/bad-fn-ptr-qualifier.fixed @@ -1,5 +1,5 @@ -// run-rustfix -// edition:2018 +//@ run-rustfix +//@ edition:2018 // Most of items are taken from ./recover-const-async-fn-ptr.rs but this is able to apply rustfix. pub type T0 = fn(); //~ ERROR an `fn` pointer type cannot be `const` diff --git a/tests/ui/parser/bad-fn-ptr-qualifier.rs b/tests/ui/parser/bad-fn-ptr-qualifier.rs index c04813dadff..9750f480935 100644 --- a/tests/ui/parser/bad-fn-ptr-qualifier.rs +++ b/tests/ui/parser/bad-fn-ptr-qualifier.rs @@ -1,5 +1,5 @@ -// run-rustfix -// edition:2018 +//@ run-rustfix +//@ edition:2018 // Most of items are taken from ./recover-const-async-fn-ptr.rs but this is able to apply rustfix. pub type T0 = const fn(); //~ ERROR an `fn` pointer type cannot be `const` diff --git a/tests/ui/parser/bad-name.rs b/tests/ui/parser/bad-name.rs index 9b42716924d..59432a1d9a5 100644 --- a/tests/ui/parser/bad-name.rs +++ b/tests/ui/parser/bad-name.rs @@ -1,4 +1,4 @@ -// error-pattern: expected +//@ error-pattern: expected fn main() { let x.y::.z foo; diff --git a/tests/ui/parser/bad-recover-kw-after-impl.rs b/tests/ui/parser/bad-recover-kw-after-impl.rs index 218cd767859..23abceaf493 100644 --- a/tests/ui/parser/bad-recover-kw-after-impl.rs +++ b/tests/ui/parser/bad-recover-kw-after-impl.rs @@ -1,6 +1,6 @@ -// check-pass +//@ check-pass -// edition:2021 +//@ edition:2021 // for the `impl` + keyword test macro_rules! impl_primitive { diff --git a/tests/ui/parser/bad-recover-ty-after-impl.rs b/tests/ui/parser/bad-recover-ty-after-impl.rs index 510e08ba091..7ea0049f8f8 100644 --- a/tests/ui/parser/bad-recover-ty-after-impl.rs +++ b/tests/ui/parser/bad-recover-ty-after-impl.rs @@ -1,4 +1,4 @@ -// check-pass +//@ check-pass macro_rules! impl_primitive { ($ty:ty) => { impl_primitive!(impl $ty); }; diff --git a/tests/ui/parser/bastion-of-the-turbofish.rs b/tests/ui/parser/bastion-of-the-turbofish.rs index 7ceea676d3a..45d4d82344b 100644 --- a/tests/ui/parser/bastion-of-the-turbofish.rs +++ b/tests/ui/parser/bastion-of-the-turbofish.rs @@ -1,4 +1,4 @@ -// check-pass +//@ check-pass // Bastion of the Turbofish // ------------------------ diff --git a/tests/ui/parser/block-no-opening-brace.rs b/tests/ui/parser/block-no-opening-brace.rs index 8a6599488b1..e90a34104e8 100644 --- a/tests/ui/parser/block-no-opening-brace.rs +++ b/tests/ui/parser/block-no-opening-brace.rs @@ -1,4 +1,4 @@ -// edition:2018 +//@ edition:2018 #![feature(try_blocks)] diff --git a/tests/ui/parser/bounds-obj-parens.rs b/tests/ui/parser/bounds-obj-parens.rs index 8c446d27d0a..eea4bccdc09 100644 --- a/tests/ui/parser/bounds-obj-parens.rs +++ b/tests/ui/parser/bounds-obj-parens.rs @@ -1,4 +1,4 @@ -// check-pass +//@ check-pass #![allow(bare_trait_objects)] diff --git a/tests/ui/parser/bounds-type.rs b/tests/ui/parser/bounds-type.rs index bd5f6105f51..a1971fa3146 100644 --- a/tests/ui/parser/bounds-type.rs +++ b/tests/ui/parser/bounds-type.rs @@ -1,4 +1,4 @@ -// compile-flags: -Z parse-only +//@ compile-flags: -Z parse-only struct S< T: 'a + Tr, // OK diff --git a/tests/ui/parser/break-in-unlabeled-block.fixed b/tests/ui/parser/break-in-unlabeled-block.fixed index 08856232521..9aeaa2de93f 100644 --- a/tests/ui/parser/break-in-unlabeled-block.fixed +++ b/tests/ui/parser/break-in-unlabeled-block.fixed @@ -1,4 +1,4 @@ -// run-rustfix +//@ run-rustfix fn main() { 'block: { break 'block (); //~ ERROR `break` outside of a loop or labeled block diff --git a/tests/ui/parser/break-in-unlabeled-block.rs b/tests/ui/parser/break-in-unlabeled-block.rs index 3e5587e9f9c..1c952f4b5f4 100644 --- a/tests/ui/parser/break-in-unlabeled-block.rs +++ b/tests/ui/parser/break-in-unlabeled-block.rs @@ -1,4 +1,4 @@ -// run-rustfix +//@ run-rustfix fn main() { { break (); //~ ERROR `break` outside of a loop or labeled block diff --git a/tests/ui/parser/circular_modules_hello.rs b/tests/ui/parser/circular_modules_hello.rs index 6968ca97b82..eb0284d8b41 100644 --- a/tests/ui/parser/circular_modules_hello.rs +++ b/tests/ui/parser/circular_modules_hello.rs @@ -1,4 +1,4 @@ -// ignore-test: this is an auxiliary file for circular-modules-main.rs +//@ ignore-test: this is an auxiliary file for circular-modules-main.rs #[path = "circular_modules_main.rs"] mod circular_modules_main; diff --git a/tests/ui/parser/circular_modules_main.rs b/tests/ui/parser/circular_modules_main.rs index d4b47efe681..d5cdff34a26 100644 --- a/tests/ui/parser/circular_modules_main.rs +++ b/tests/ui/parser/circular_modules_main.rs @@ -1,4 +1,4 @@ -// error-pattern: circular modules +//@ error-pattern: circular modules #[path = "circular_modules_hello.rs"] mod circular_modules_hello; diff --git a/tests/ui/parser/class-implements-bad-trait.rs b/tests/ui/parser/class-implements-bad-trait.rs index f2f85d0265a..152fe09b51c 100644 --- a/tests/ui/parser/class-implements-bad-trait.rs +++ b/tests/ui/parser/class-implements-bad-trait.rs @@ -1,4 +1,4 @@ -// error-pattern:nonexistent +//@ error-pattern:nonexistent class cat : nonexistent { let meows: usize; new(in_x : usize) { self.meows = in_x; } diff --git a/tests/ui/parser/constraints-before-generic-args-syntactic-pass.rs b/tests/ui/parser/constraints-before-generic-args-syntactic-pass.rs index d8346653c25..6566d8a1115 100644 --- a/tests/ui/parser/constraints-before-generic-args-syntactic-pass.rs +++ b/tests/ui/parser/constraints-before-generic-args-syntactic-pass.rs @@ -1,4 +1,4 @@ -// check-pass +//@ check-pass #[cfg(FALSE)] fn syntax() { diff --git a/tests/ui/parser/doc-comment-in-stmt.fixed b/tests/ui/parser/doc-comment-in-stmt.fixed index 4b3ecccf66c..7deaee3d9d8 100644 --- a/tests/ui/parser/doc-comment-in-stmt.fixed +++ b/tests/ui/parser/doc-comment-in-stmt.fixed @@ -1,4 +1,4 @@ -// run-rustfix +//@ run-rustfix #![allow(unused)] fn foo() -> bool { false diff --git a/tests/ui/parser/doc-comment-in-stmt.rs b/tests/ui/parser/doc-comment-in-stmt.rs index 73d08f51c66..5a0ee263871 100644 --- a/tests/ui/parser/doc-comment-in-stmt.rs +++ b/tests/ui/parser/doc-comment-in-stmt.rs @@ -1,4 +1,4 @@ -// run-rustfix +//@ run-rustfix #![allow(unused)] fn foo() -> bool { false diff --git a/tests/ui/parser/eq-gt-to-gt-eq.fixed b/tests/ui/parser/eq-gt-to-gt-eq.fixed index 44cb464fc0c..abb328399be 100644 --- a/tests/ui/parser/eq-gt-to-gt-eq.fixed +++ b/tests/ui/parser/eq-gt-to-gt-eq.fixed @@ -1,4 +1,4 @@ -// run-rustfix +//@ run-rustfix // Check that we try to correct `=>` to `>=` in conditions. #![allow(unused)] diff --git a/tests/ui/parser/eq-gt-to-gt-eq.rs b/tests/ui/parser/eq-gt-to-gt-eq.rs index dca67c89cc0..1f57fa83281 100644 --- a/tests/ui/parser/eq-gt-to-gt-eq.rs +++ b/tests/ui/parser/eq-gt-to-gt-eq.rs @@ -1,4 +1,4 @@ -// run-rustfix +//@ run-rustfix // Check that we try to correct `=>` to `>=` in conditions. #![allow(unused)] diff --git a/tests/ui/parser/expr-as-stmt.fixed b/tests/ui/parser/expr-as-stmt.fixed index b06f62794c4..0a4d62a4a0c 100644 --- a/tests/ui/parser/expr-as-stmt.fixed +++ b/tests/ui/parser/expr-as-stmt.fixed @@ -1,5 +1,5 @@ -// run-rustfix -// rustfix-only-machine-applicable +//@ run-rustfix +//@ rustfix-only-machine-applicable #![allow(unused_variables)] #![allow(dead_code)] #![allow(unused_must_use)] diff --git a/tests/ui/parser/expr-as-stmt.rs b/tests/ui/parser/expr-as-stmt.rs index b39d2b88647..99c85e65baa 100644 --- a/tests/ui/parser/expr-as-stmt.rs +++ b/tests/ui/parser/expr-as-stmt.rs @@ -1,5 +1,5 @@ -// run-rustfix -// rustfix-only-machine-applicable +//@ run-rustfix +//@ rustfix-only-machine-applicable #![allow(unused_variables)] #![allow(dead_code)] #![allow(unused_must_use)] diff --git a/tests/ui/parser/extern-abi-from-mac-literal-frag.rs b/tests/ui/parser/extern-abi-from-mac-literal-frag.rs index 8f5d7f4f7f8..a4e9134218c 100644 --- a/tests/ui/parser/extern-abi-from-mac-literal-frag.rs +++ b/tests/ui/parser/extern-abi-from-mac-literal-frag.rs @@ -1,5 +1,5 @@ #![allow(clashing_extern_declarations)] -// check-pass +//@ check-pass // In this test we check that the parser accepts an ABI string when it // comes from a macro `literal` or `expr` fragment as opposed to a hardcoded string. diff --git a/tests/ui/parser/extern-abi-raw-strings.rs b/tests/ui/parser/extern-abi-raw-strings.rs index fad855a21f6..cad7943ed62 100644 --- a/tests/ui/parser/extern-abi-raw-strings.rs +++ b/tests/ui/parser/extern-abi-raw-strings.rs @@ -1,4 +1,4 @@ -// check-pass +//@ check-pass // Check that the string literal in `extern lit` will accept raw strings. diff --git a/tests/ui/parser/extern-abi-string-escaping.rs b/tests/ui/parser/extern-abi-string-escaping.rs index 87bd31aabb6..f7bc71e34db 100644 --- a/tests/ui/parser/extern-abi-string-escaping.rs +++ b/tests/ui/parser/extern-abi-string-escaping.rs @@ -1,4 +1,4 @@ -// check-pass +//@ check-pass // Check that the string literal in `extern lit` will escapes. diff --git a/tests/ui/parser/extern-abi-syntactic.rs b/tests/ui/parser/extern-abi-syntactic.rs index 7d2bbfe8a01..d3e2ba0e2d3 100644 --- a/tests/ui/parser/extern-abi-syntactic.rs +++ b/tests/ui/parser/extern-abi-syntactic.rs @@ -1,4 +1,4 @@ -// check-pass +//@ check-pass // Check that from the grammar's point of view, // the specific set of ABIs is not part of it. diff --git a/tests/ui/parser/extern-crate-async.rs b/tests/ui/parser/extern-crate-async.rs index 6a54ac7f4a5..7c7769075b6 100644 --- a/tests/ui/parser/extern-crate-async.rs +++ b/tests/ui/parser/extern-crate-async.rs @@ -1,7 +1,7 @@ // Make sure that we don't parse `extern crate async` // the front matter of a function leading us astray. -// check-pass +//@ check-pass fn main() {} diff --git a/tests/ui/parser/float-literals.rs b/tests/ui/parser/float-literals.rs index 1e9319fd27d..d8ee59bca82 100644 --- a/tests/ui/parser/float-literals.rs +++ b/tests/ui/parser/float-literals.rs @@ -1,4 +1,4 @@ -// build-pass +//@ build-pass // ignore-tidy-linelength // Regression test for #31109 and #31407. diff --git a/tests/ui/parser/fn-body-optional-syntactic-pass.rs b/tests/ui/parser/fn-body-optional-syntactic-pass.rs index f9dbebf0bea..140471dfc77 100644 --- a/tests/ui/parser/fn-body-optional-syntactic-pass.rs +++ b/tests/ui/parser/fn-body-optional-syntactic-pass.rs @@ -1,6 +1,6 @@ // Ensures that all `fn` forms having or lacking a body are syntactically valid. -// check-pass +//@ check-pass fn main() {} diff --git a/tests/ui/parser/fn-defined-using-def.rs b/tests/ui/parser/fn-defined-using-def.rs index 21da34c47c9..7a040d5de72 100644 --- a/tests/ui/parser/fn-defined-using-def.rs +++ b/tests/ui/parser/fn-defined-using-def.rs @@ -1,5 +1,5 @@ // Check what happens when `def` is used to define a function, instead of `fn` -// edition:2021 +//@ edition:2021 #![allow(dead_code)] diff --git a/tests/ui/parser/fn-defined-using-fun.rs b/tests/ui/parser/fn-defined-using-fun.rs index 4f74605043e..b90452e3c6b 100644 --- a/tests/ui/parser/fn-defined-using-fun.rs +++ b/tests/ui/parser/fn-defined-using-fun.rs @@ -1,5 +1,5 @@ // Check what happens when `fun` is used to define a function, instead of `fn` -// edition:2021 +//@ edition:2021 #![allow(dead_code)] diff --git a/tests/ui/parser/fn-defined-using-func.rs b/tests/ui/parser/fn-defined-using-func.rs index 2dce96fdce0..a7b66c28541 100644 --- a/tests/ui/parser/fn-defined-using-func.rs +++ b/tests/ui/parser/fn-defined-using-func.rs @@ -1,5 +1,5 @@ // Check what happens when `func` is used to define a function, instead of `fn` -// edition:2021 +//@ edition:2021 #![allow(dead_code)] diff --git a/tests/ui/parser/fn-defined-using-function.rs b/tests/ui/parser/fn-defined-using-function.rs index fd8782728e2..6ea12514c47 100644 --- a/tests/ui/parser/fn-defined-using-function.rs +++ b/tests/ui/parser/fn-defined-using-function.rs @@ -1,5 +1,5 @@ // Check what happens when `function` is used to define a function, instead of `fn` -// edition:2021 +//@ edition:2021 #![allow(dead_code)] diff --git a/tests/ui/parser/fn-header-semantic-fail.rs b/tests/ui/parser/fn-header-semantic-fail.rs index f01e1c2277c..25d7c3f35fc 100644 --- a/tests/ui/parser/fn-header-semantic-fail.rs +++ b/tests/ui/parser/fn-header-semantic-fail.rs @@ -1,6 +1,6 @@ // Ensures that all `fn` forms can have all the function qualifiers syntactically. -// edition:2018 +//@ edition:2018 #![feature(const_extern_fn)] diff --git a/tests/ui/parser/fn-header-syntactic-pass.rs b/tests/ui/parser/fn-header-syntactic-pass.rs index 68f1f7901bb..065ded31b07 100644 --- a/tests/ui/parser/fn-header-syntactic-pass.rs +++ b/tests/ui/parser/fn-header-syntactic-pass.rs @@ -1,7 +1,7 @@ // Ensures that all `fn` forms can have all the function qualifiers syntactically. -// check-pass -// edition:2018 +//@ check-pass +//@ edition:2018 fn main() {} diff --git a/tests/ui/parser/fn-returns-fn-pointer.rs b/tests/ui/parser/fn-returns-fn-pointer.rs index 15590e32486..e19108bb2ca 100644 --- a/tests/ui/parser/fn-returns-fn-pointer.rs +++ b/tests/ui/parser/fn-returns-fn-pointer.rs @@ -1,4 +1,4 @@ -// check-pass +//@ check-pass // Regression test for #78507. fn foo() -> Option Option> { Some(|| Some(true)) diff --git a/tests/ui/parser/foreign-static-syntactic-pass.rs b/tests/ui/parser/foreign-static-syntactic-pass.rs index 59949634617..a76b9bab491 100644 --- a/tests/ui/parser/foreign-static-syntactic-pass.rs +++ b/tests/ui/parser/foreign-static-syntactic-pass.rs @@ -1,6 +1,6 @@ // Syntactically, a foreign static may have a body. -// check-pass +//@ check-pass fn main() {} diff --git a/tests/ui/parser/foreign-ty-syntactic-pass.rs b/tests/ui/parser/foreign-ty-syntactic-pass.rs index a746de1f14f..50bb68cd83b 100644 --- a/tests/ui/parser/foreign-ty-syntactic-pass.rs +++ b/tests/ui/parser/foreign-ty-syntactic-pass.rs @@ -1,4 +1,4 @@ -// check-pass +//@ check-pass fn main() {} diff --git a/tests/ui/parser/generic-param-default-in-binder.rs b/tests/ui/parser/generic-param-default-in-binder.rs index 78dc4186b3a..740640f43a4 100644 --- a/tests/ui/parser/generic-param-default-in-binder.rs +++ b/tests/ui/parser/generic-param-default-in-binder.rs @@ -1,7 +1,7 @@ // Check that defaults for generic parameters in `for<...>` binders are // syntactically valid. See also PR #119042. -// check-pass +//@ check-pass macro_rules! a { ($ty:ty) => {} } diff --git a/tests/ui/parser/if-block-unreachable-expr.rs b/tests/ui/parser/if-block-unreachable-expr.rs index 4063a337084..01d8f62ddfb 100644 --- a/tests/ui/parser/if-block-unreachable-expr.rs +++ b/tests/ui/parser/if-block-unreachable-expr.rs @@ -1,4 +1,4 @@ -// check-pass +//@ check-pass // This regressed from 1.20 -> 1.21 -- the condition is unreachable, // but it's still an expression, and should parse fine. diff --git a/tests/ui/parser/if-in-in.fixed b/tests/ui/parser/if-in-in.fixed index 0bb88c55936..566efbdf9f0 100644 --- a/tests/ui/parser/if-in-in.fixed +++ b/tests/ui/parser/if-in-in.fixed @@ -1,4 +1,4 @@ -// run-rustfix +//@ run-rustfix fn main() { for i in 1..2 { //~ ERROR expected iterable, found keyword `in` diff --git a/tests/ui/parser/if-in-in.rs b/tests/ui/parser/if-in-in.rs index 6c0986fe1ba..048bc03b91a 100644 --- a/tests/ui/parser/if-in-in.rs +++ b/tests/ui/parser/if-in-in.rs @@ -1,4 +1,4 @@ -// run-rustfix +//@ run-rustfix fn main() { for i in in 1..2 { //~ ERROR expected iterable, found keyword `in` diff --git a/tests/ui/parser/impl-item-const-pass.rs b/tests/ui/parser/impl-item-const-pass.rs index d1124561374..8ebdf633b5b 100644 --- a/tests/ui/parser/impl-item-const-pass.rs +++ b/tests/ui/parser/impl-item-const-pass.rs @@ -1,4 +1,4 @@ -// check-pass +//@ check-pass fn main() {} diff --git a/tests/ui/parser/impl-item-fn-no-body-pass.rs b/tests/ui/parser/impl-item-fn-no-body-pass.rs index 16b09d64e8c..5a593fe1d12 100644 --- a/tests/ui/parser/impl-item-fn-no-body-pass.rs +++ b/tests/ui/parser/impl-item-fn-no-body-pass.rs @@ -1,4 +1,4 @@ -// check-pass +//@ check-pass fn main() {} diff --git a/tests/ui/parser/impl-item-type-no-body-pass.rs b/tests/ui/parser/impl-item-type-no-body-pass.rs index 74a9c6ab7e8..039825bcc53 100644 --- a/tests/ui/parser/impl-item-type-no-body-pass.rs +++ b/tests/ui/parser/impl-item-type-no-body-pass.rs @@ -1,4 +1,4 @@ -// check-pass +//@ check-pass fn main() {} diff --git a/tests/ui/parser/impl-qpath.rs b/tests/ui/parser/impl-qpath.rs index d1f0a02041b..d7c4989b6e4 100644 --- a/tests/ui/parser/impl-qpath.rs +++ b/tests/ui/parser/impl-qpath.rs @@ -1,5 +1,5 @@ -// check-pass -// compile-flags: -Z parse-only +//@ check-pass +//@ compile-flags: -Z parse-only impl <*const u8>::AssocTy {} // OK impl ::AssocTy {} // OK diff --git a/tests/ui/parser/import-from-path.rs b/tests/ui/parser/import-from-path.rs index 3fce08259fc..54349d4971e 100644 --- a/tests/ui/parser/import-from-path.rs +++ b/tests/ui/parser/import-from-path.rs @@ -1,2 +1,2 @@ -// error-pattern:expected +//@ error-pattern:expected use foo::{bar}::baz diff --git a/tests/ui/parser/import-from-rename.rs b/tests/ui/parser/import-from-rename.rs index 27425a3c99a..f6a4bb55553 100644 --- a/tests/ui/parser/import-from-rename.rs +++ b/tests/ui/parser/import-from-rename.rs @@ -1,4 +1,4 @@ -// error-pattern:expected +//@ error-pattern:expected use foo::{bar} as baz; diff --git a/tests/ui/parser/import-glob-path.rs b/tests/ui/parser/import-glob-path.rs index de4c07aa7bb..cb854de0cff 100644 --- a/tests/ui/parser/import-glob-path.rs +++ b/tests/ui/parser/import-glob-path.rs @@ -1,2 +1,2 @@ -// error-pattern:expected +//@ error-pattern:expected use foo::*::bar diff --git a/tests/ui/parser/import-glob-rename.rs b/tests/ui/parser/import-glob-rename.rs index b9b753dcd70..899818b15b6 100644 --- a/tests/ui/parser/import-glob-rename.rs +++ b/tests/ui/parser/import-glob-rename.rs @@ -1,4 +1,4 @@ -// error-pattern:expected +//@ error-pattern:expected use foo::* as baz; diff --git a/tests/ui/parser/increment-autofix-2.fixed b/tests/ui/parser/increment-autofix-2.fixed index 580ebaf5dbb..7d40add9a30 100644 --- a/tests/ui/parser/increment-autofix-2.fixed +++ b/tests/ui/parser/increment-autofix-2.fixed @@ -1,4 +1,4 @@ -// run-rustfix +//@ run-rustfix struct Foo { bar: Bar, diff --git a/tests/ui/parser/increment-autofix-2.rs b/tests/ui/parser/increment-autofix-2.rs index ebe5fa6ca1e..27cd8fb0b1c 100644 --- a/tests/ui/parser/increment-autofix-2.rs +++ b/tests/ui/parser/increment-autofix-2.rs @@ -1,4 +1,4 @@ -// run-rustfix +//@ run-rustfix struct Foo { bar: Bar, diff --git a/tests/ui/parser/increment-autofix.fixed b/tests/ui/parser/increment-autofix.fixed index 7a426badfc2..1d2800574d8 100644 --- a/tests/ui/parser/increment-autofix.fixed +++ b/tests/ui/parser/increment-autofix.fixed @@ -1,4 +1,4 @@ -// run-rustfix +//@ run-rustfix pub fn pre_regular() { let mut i = 0; diff --git a/tests/ui/parser/increment-autofix.rs b/tests/ui/parser/increment-autofix.rs index d38603697a7..4b36e2c546a 100644 --- a/tests/ui/parser/increment-autofix.rs +++ b/tests/ui/parser/increment-autofix.rs @@ -1,4 +1,4 @@ -// run-rustfix +//@ run-rustfix pub fn pre_regular() { let mut i = 0; diff --git a/tests/ui/parser/inner-attr-in-trait-def.rs b/tests/ui/parser/inner-attr-in-trait-def.rs index 8dba6b362cd..0c6f710b1cf 100644 --- a/tests/ui/parser/inner-attr-in-trait-def.rs +++ b/tests/ui/parser/inner-attr-in-trait-def.rs @@ -1,4 +1,4 @@ -// check-pass +//@ check-pass #![deny(non_camel_case_types)] diff --git a/tests/ui/parser/intersection-patterns-1.fixed b/tests/ui/parser/intersection-patterns-1.fixed index 44773095b87..f63d57472cf 100644 --- a/tests/ui/parser/intersection-patterns-1.fixed +++ b/tests/ui/parser/intersection-patterns-1.fixed @@ -6,7 +6,7 @@ // to suggest either switching the order or note that intersection // patterns are not allowed. -// run-rustfix +//@ run-rustfix #![allow(unused_variables)] diff --git a/tests/ui/parser/intersection-patterns-1.rs b/tests/ui/parser/intersection-patterns-1.rs index 1036b9daf64..3a457659aac 100644 --- a/tests/ui/parser/intersection-patterns-1.rs +++ b/tests/ui/parser/intersection-patterns-1.rs @@ -6,7 +6,7 @@ // to suggest either switching the order or note that intersection // patterns are not allowed. -// run-rustfix +//@ run-rustfix #![allow(unused_variables)] diff --git a/tests/ui/parser/issues/auxiliary/issue-89971-outer-attr-following-inner-attr-ice.rs b/tests/ui/parser/issues/auxiliary/issue-89971-outer-attr-following-inner-attr-ice.rs index e5604b816b5..44697afcfed 100644 --- a/tests/ui/parser/issues/auxiliary/issue-89971-outer-attr-following-inner-attr-ice.rs +++ b/tests/ui/parser/issues/auxiliary/issue-89971-outer-attr-following-inner-attr-ice.rs @@ -1,5 +1,5 @@ -// force-host -// no-prefer-dynamic +//@ force-host +//@ no-prefer-dynamic #![crate_type = "proc-macro"] diff --git a/tests/ui/parser/issues/issue-100197-mut-let.fixed b/tests/ui/parser/issues/issue-100197-mut-let.fixed index 5a895622200..a7af3cb1500 100644 --- a/tests/ui/parser/issues/issue-100197-mut-let.fixed +++ b/tests/ui/parser/issues/issue-100197-mut-let.fixed @@ -1,4 +1,4 @@ -// run-rustfix +//@ run-rustfix fn main() { let mut _x = 123; diff --git a/tests/ui/parser/issues/issue-100197-mut-let.rs b/tests/ui/parser/issues/issue-100197-mut-let.rs index 71103813a6e..38ed287d14d 100644 --- a/tests/ui/parser/issues/issue-100197-mut-let.rs +++ b/tests/ui/parser/issues/issue-100197-mut-let.rs @@ -1,4 +1,4 @@ -// run-rustfix +//@ run-rustfix fn main() { mut let _x = 123; diff --git a/tests/ui/parser/issues/issue-101477-enum.fixed b/tests/ui/parser/issues/issue-101477-enum.fixed index 1dfeae22aea..92c2b7c470f 100644 --- a/tests/ui/parser/issues/issue-101477-enum.fixed +++ b/tests/ui/parser/issues/issue-101477-enum.fixed @@ -1,4 +1,4 @@ -// run-rustfix +//@ run-rustfix #[allow(dead_code)] enum Demo { diff --git a/tests/ui/parser/issues/issue-101477-enum.rs b/tests/ui/parser/issues/issue-101477-enum.rs index ea7051d69a4..21d377384d3 100644 --- a/tests/ui/parser/issues/issue-101477-enum.rs +++ b/tests/ui/parser/issues/issue-101477-enum.rs @@ -1,4 +1,4 @@ -// run-rustfix +//@ run-rustfix #[allow(dead_code)] enum Demo { diff --git a/tests/ui/parser/issues/issue-101477-let.fixed b/tests/ui/parser/issues/issue-101477-let.fixed index 9989ad81524..cbcbeb171af 100644 --- a/tests/ui/parser/issues/issue-101477-let.fixed +++ b/tests/ui/parser/issues/issue-101477-let.fixed @@ -1,4 +1,4 @@ -// run-rustfix +//@ run-rustfix fn main() { let x = 2; //~ ERROR unexpected `==` diff --git a/tests/ui/parser/issues/issue-101477-let.rs b/tests/ui/parser/issues/issue-101477-let.rs index 8b0e8bee179..edfcbbf8e8f 100644 --- a/tests/ui/parser/issues/issue-101477-let.rs +++ b/tests/ui/parser/issues/issue-101477-let.rs @@ -1,4 +1,4 @@ -// run-rustfix +//@ run-rustfix fn main() { let x == 2; //~ ERROR unexpected `==` diff --git a/tests/ui/parser/issues/issue-103381.fixed b/tests/ui/parser/issues/issue-103381.fixed index 6a9fb991097..9b63bf206a0 100644 --- a/tests/ui/parser/issues/issue-103381.fixed +++ b/tests/ui/parser/issues/issue-103381.fixed @@ -1,4 +1,4 @@ -// run-rustfix +//@ run-rustfix #![feature(let_chains)] #![allow(unused_variables)] diff --git a/tests/ui/parser/issues/issue-103381.rs b/tests/ui/parser/issues/issue-103381.rs index bf79e10103e..a44a7410aaf 100644 --- a/tests/ui/parser/issues/issue-103381.rs +++ b/tests/ui/parser/issues/issue-103381.rs @@ -1,4 +1,4 @@ -// run-rustfix +//@ run-rustfix #![feature(let_chains)] #![allow(unused_variables)] diff --git a/tests/ui/parser/issues/issue-103451.rs b/tests/ui/parser/issues/issue-103451.rs index be33213f3cb..6b0928229e9 100644 --- a/tests/ui/parser/issues/issue-103451.rs +++ b/tests/ui/parser/issues/issue-103451.rs @@ -1,4 +1,4 @@ -// error-pattern: this file contains an unclosed delimiter +//@ error-pattern: this file contains an unclosed delimiter struct R { } struct S { x: [u8; R diff --git a/tests/ui/parser/issues/issue-10392-2.fixed b/tests/ui/parser/issues/issue-10392-2.fixed index 3386fac17df..09f2627f816 100644 --- a/tests/ui/parser/issues/issue-10392-2.fixed +++ b/tests/ui/parser/issues/issue-10392-2.fixed @@ -1,4 +1,4 @@ -// run-rustfix +//@ run-rustfix pub struct A { pub foo: isize } diff --git a/tests/ui/parser/issues/issue-10392-2.rs b/tests/ui/parser/issues/issue-10392-2.rs index 30628ae31c3..7f46c12ccf2 100644 --- a/tests/ui/parser/issues/issue-10392-2.rs +++ b/tests/ui/parser/issues/issue-10392-2.rs @@ -1,4 +1,4 @@ -// run-rustfix +//@ run-rustfix pub struct A { pub foo: isize } diff --git a/tests/ui/parser/issues/issue-105209.rs b/tests/ui/parser/issues/issue-105209.rs index 6146b795de1..f4e331523bf 100644 --- a/tests/ui/parser/issues/issue-105209.rs +++ b/tests/ui/parser/issues/issue-105209.rs @@ -1,3 +1,3 @@ -// compile-flags: -Zunpretty=ast-tree +//@ compile-flags: -Zunpretty=ast-tree #![c={#![c[)x //~ ERROR mismatched closing delimiter //~ ERROR this file contains an unclosed delimiter diff --git a/tests/ui/parser/issues/issue-105366.fixed b/tests/ui/parser/issues/issue-105366.fixed index ad26643c327..7157b647524 100644 --- a/tests/ui/parser/issues/issue-105366.fixed +++ b/tests/ui/parser/issues/issue-105366.fixed @@ -1,4 +1,4 @@ -// run-rustfix +//@ run-rustfix struct Foo; diff --git a/tests/ui/parser/issues/issue-105366.rs b/tests/ui/parser/issues/issue-105366.rs index 311b6a60f1a..dc3cb8b343d 100644 --- a/tests/ui/parser/issues/issue-105366.rs +++ b/tests/ui/parser/issues/issue-105366.rs @@ -1,4 +1,4 @@ -// run-rustfix +//@ run-rustfix struct Foo; diff --git a/tests/ui/parser/issues/issue-105634.rs b/tests/ui/parser/issues/issue-105634.rs index 579aa6e5bfb..477807aed7c 100644 --- a/tests/ui/parser/issues/issue-105634.rs +++ b/tests/ui/parser/issues/issue-105634.rs @@ -1,4 +1,4 @@ -// check-pass +//@ check-pass fn main() { let _a = ..; diff --git a/tests/ui/parser/issues/issue-10636-2.rs b/tests/ui/parser/issues/issue-10636-2.rs index 80d8ef65a69..7200ea1f1dd 100644 --- a/tests/ui/parser/issues/issue-10636-2.rs +++ b/tests/ui/parser/issues/issue-10636-2.rs @@ -1,4 +1,4 @@ -// error-pattern: mismatched closing delimiter: `}` +//@ error-pattern: mismatched closing delimiter: `}` // FIXME(31528) we emit a bunch of silly errors here due to continuing past the // first one. This would be easy-ish to address by better recovery in tokenisation. diff --git a/tests/ui/parser/issues/issue-107705.rs b/tests/ui/parser/issues/issue-107705.rs index b80984fcdb0..b72b02ce3a9 100644 --- a/tests/ui/parser/issues/issue-107705.rs +++ b/tests/ui/parser/issues/issue-107705.rs @@ -1,3 +1,3 @@ -// compile-flags: -C debug-assertions +//@ compile-flags: -C debug-assertions fn f() {a(b:&, //~ ERROR this file contains an unclosed delimiter diff --git a/tests/ui/parser/issues/issue-108109-fn-missing-params.fixed b/tests/ui/parser/issues/issue-108109-fn-missing-params.fixed index b819aa810cb..bddc4719ea3 100644 --- a/tests/ui/parser/issues/issue-108109-fn-missing-params.fixed +++ b/tests/ui/parser/issues/issue-108109-fn-missing-params.fixed @@ -1,4 +1,4 @@ -// run-rustfix +//@ run-rustfix pub fn missing() -> () {} //~^ ERROR missing parameters for function definition diff --git a/tests/ui/parser/issues/issue-108109-fn-missing-params.rs b/tests/ui/parser/issues/issue-108109-fn-missing-params.rs index 01efe728081..32257bb4b5a 100644 --- a/tests/ui/parser/issues/issue-108109-fn-missing-params.rs +++ b/tests/ui/parser/issues/issue-108109-fn-missing-params.rs @@ -1,4 +1,4 @@ -// run-rustfix +//@ run-rustfix pub fn missing -> () {} //~^ ERROR missing parameters for function definition diff --git a/tests/ui/parser/issues/issue-108109-fn-trait-missing-paren.fixed b/tests/ui/parser/issues/issue-108109-fn-trait-missing-paren.fixed index eaae288864a..2c776f414e0 100644 --- a/tests/ui/parser/issues/issue-108109-fn-trait-missing-paren.fixed +++ b/tests/ui/parser/issues/issue-108109-fn-trait-missing-paren.fixed @@ -1,4 +1,4 @@ -// run-rustfix +//@ run-rustfix pub fn func() where F: FnOnce() -> () {} //~^ ERROR expected one of diff --git a/tests/ui/parser/issues/issue-108109-fn-trait-missing-paren.rs b/tests/ui/parser/issues/issue-108109-fn-trait-missing-paren.rs index ea5c71150e8..c45541e08b2 100644 --- a/tests/ui/parser/issues/issue-108109-fn-trait-missing-paren.rs +++ b/tests/ui/parser/issues/issue-108109-fn-trait-missing-paren.rs @@ -1,4 +1,4 @@ -// run-rustfix +//@ run-rustfix pub fn func() where F: FnOnce -> () {} //~^ ERROR expected one of diff --git a/tests/ui/parser/issues/issue-112188.fixed b/tests/ui/parser/issues/issue-112188.fixed index 5e73d8e38de..a4fdf5567f7 100644 --- a/tests/ui/parser/issues/issue-112188.fixed +++ b/tests/ui/parser/issues/issue-112188.fixed @@ -1,4 +1,4 @@ -// run-rustfix +//@ run-rustfix #![allow(unused)] diff --git a/tests/ui/parser/issues/issue-112188.rs b/tests/ui/parser/issues/issue-112188.rs index 27ca192e522..70c355b1610 100644 --- a/tests/ui/parser/issues/issue-112188.rs +++ b/tests/ui/parser/issues/issue-112188.rs @@ -1,4 +1,4 @@ -// run-rustfix +//@ run-rustfix #![allow(unused)] diff --git a/tests/ui/parser/issues/issue-113203.rs b/tests/ui/parser/issues/issue-113203.rs index 1103251c140..70e5003c63a 100644 --- a/tests/ui/parser/issues/issue-113203.rs +++ b/tests/ui/parser/issues/issue-113203.rs @@ -1,6 +1,6 @@ // Checks what happens when we attempt to use the await keyword as a prefix. Span // incorrectly emitted an `.await` in E0277 which does not exist -// edition:2018 +//@ edition:2018 fn main() { await {}() //~^ ERROR incorrect use of `await` diff --git a/tests/ui/parser/issues/issue-115780-pat-lt-bracket-in-macro-call.rs b/tests/ui/parser/issues/issue-115780-pat-lt-bracket-in-macro-call.rs index 3421333b8a0..7edc4ec5aee 100644 --- a/tests/ui/parser/issues/issue-115780-pat-lt-bracket-in-macro-call.rs +++ b/tests/ui/parser/issues/issue-115780-pat-lt-bracket-in-macro-call.rs @@ -3,7 +3,7 @@ // if we are inside a macro call since it can be valid input for a subsequent macro rule. // See also #103534. -// check-pass +//@ check-pass macro_rules! mdo { ($p: pat =<< $e: expr ; $( $t: tt )*) => { diff --git a/tests/ui/parser/issues/issue-14303-fncall.rs b/tests/ui/parser/issues/issue-14303-fncall.rs index afc4959f175..59d4eab06d6 100644 --- a/tests/ui/parser/issues/issue-14303-fncall.rs +++ b/tests/ui/parser/issues/issue-14303-fncall.rs @@ -1,4 +1,4 @@ -// revisions: full generic_arg +//@ revisions: full generic_arg // can't run rustfix because it doesn't handle multipart suggestions correctly // we need the above to avoid ast borrowck failure in recovered code #![cfg_attr(generic_arg, feature(generic_arg_infer))] diff --git a/tests/ui/parser/issues/issue-17718-parse-const.rs b/tests/ui/parser/issues/issue-17718-parse-const.rs index d5a5f445d5b..e24faeb7d54 100644 --- a/tests/ui/parser/issues/issue-17718-parse-const.rs +++ b/tests/ui/parser/issues/issue-17718-parse-const.rs @@ -1,4 +1,4 @@ -// run-pass +//@ run-pass const FOO: usize = 3; diff --git a/tests/ui/parser/issues/issue-17904.rs b/tests/ui/parser/issues/issue-17904.rs index 020fb41c227..6f77d4bb086 100644 --- a/tests/ui/parser/issues/issue-17904.rs +++ b/tests/ui/parser/issues/issue-17904.rs @@ -1,4 +1,4 @@ -// compile-flags: -Zparse-only +//@ compile-flags: -Zparse-only struct Baz where U: Eq(U); //This is parsed as the new Fn* style parenthesis syntax. struct Baz where U: Eq(U) -> R; // Notice this parses as well. diff --git a/tests/ui/parser/issues/issue-21146.rs b/tests/ui/parser/issues/issue-21146.rs index 19eaffc3edd..81112808b21 100644 --- a/tests/ui/parser/issues/issue-21146.rs +++ b/tests/ui/parser/issues/issue-21146.rs @@ -1,3 +1,3 @@ -// error-pattern: expected one of `!` or `::`, found `` +//@ error-pattern: expected one of `!` or `::`, found `` include!("auxiliary/issue-21146-inc.rs"); fn main() {} diff --git a/tests/ui/parser/issues/issue-21475.rs b/tests/ui/parser/issues/issue-21475.rs index b028fcae077..27248179ef4 100644 --- a/tests/ui/parser/issues/issue-21475.rs +++ b/tests/ui/parser/issues/issue-21475.rs @@ -1,6 +1,6 @@ -// run-pass +//@ run-pass #![allow(unused_imports, overlapping_range_endpoints)] -// pretty-expanded FIXME #23616 +//@ pretty-expanded FIXME #23616 use m::{START, END}; diff --git a/tests/ui/parser/issues/issue-30318.fixed b/tests/ui/parser/issues/issue-30318.fixed index 71fc82172a5..d1661be5193 100644 --- a/tests/ui/parser/issues/issue-30318.fixed +++ b/tests/ui/parser/issues/issue-30318.fixed @@ -1,4 +1,4 @@ -// run-rustfix +//@ run-rustfix #![allow(unused)] fn foo() { } diff --git a/tests/ui/parser/issues/issue-30318.rs b/tests/ui/parser/issues/issue-30318.rs index 465dca2ff82..6f055cd4f7e 100644 --- a/tests/ui/parser/issues/issue-30318.rs +++ b/tests/ui/parser/issues/issue-30318.rs @@ -1,4 +1,4 @@ -// run-rustfix +//@ run-rustfix #![allow(unused)] fn foo() { } diff --git a/tests/ui/parser/issues/issue-3036.fixed b/tests/ui/parser/issues/issue-3036.fixed index e5d5622e6fc..14f8a401647 100644 --- a/tests/ui/parser/issues/issue-3036.fixed +++ b/tests/ui/parser/issues/issue-3036.fixed @@ -1,4 +1,4 @@ -// run-rustfix +//@ run-rustfix // Testing that semicolon tokens are printed correctly in errors diff --git a/tests/ui/parser/issues/issue-3036.rs b/tests/ui/parser/issues/issue-3036.rs index 2f76fb99b22..f6ce6222d4a 100644 --- a/tests/ui/parser/issues/issue-3036.rs +++ b/tests/ui/parser/issues/issue-3036.rs @@ -1,4 +1,4 @@ -// run-rustfix +//@ run-rustfix // Testing that semicolon tokens are printed correctly in errors diff --git a/tests/ui/parser/issues/issue-35813-postfix-after-cast.rs b/tests/ui/parser/issues/issue-35813-postfix-after-cast.rs index c1c847d92d0..316c612940c 100644 --- a/tests/ui/parser/issues/issue-35813-postfix-after-cast.rs +++ b/tests/ui/parser/issues/issue-35813-postfix-after-cast.rs @@ -1,4 +1,4 @@ -// edition:2018 +//@ edition:2018 #![crate_type = "lib"] #![feature(type_ascription)] use std::future::Future; diff --git a/tests/ui/parser/issues/issue-46186.fixed b/tests/ui/parser/issues/issue-46186.fixed index 2cb5a4996ee..0165f66a4ea 100644 --- a/tests/ui/parser/issues/issue-46186.fixed +++ b/tests/ui/parser/issues/issue-46186.fixed @@ -1,4 +1,4 @@ -// run-rustfix +//@ run-rustfix pub struct Struct { pub a: usize, diff --git a/tests/ui/parser/issues/issue-46186.rs b/tests/ui/parser/issues/issue-46186.rs index 84cad38c5ec..eec478ce164 100644 --- a/tests/ui/parser/issues/issue-46186.rs +++ b/tests/ui/parser/issues/issue-46186.rs @@ -1,4 +1,4 @@ -// run-rustfix +//@ run-rustfix pub struct Struct { pub a: usize, diff --git a/tests/ui/parser/issues/issue-48137-macros-cannot-interpolate-impl-items.rs b/tests/ui/parser/issues/issue-48137-macros-cannot-interpolate-impl-items.rs index 8592f8a7287..27099f543cc 100644 --- a/tests/ui/parser/issues/issue-48137-macros-cannot-interpolate-impl-items.rs +++ b/tests/ui/parser/issues/issue-48137-macros-cannot-interpolate-impl-items.rs @@ -1,4 +1,4 @@ -// check-pass +//@ check-pass fn main() {} diff --git a/tests/ui/parser/issues/issue-48508-aux.rs b/tests/ui/parser/issues/issue-48508-aux.rs index ebdc70a04df..0f2b4427383 100644 --- a/tests/ui/parser/issues/issue-48508-aux.rs +++ b/tests/ui/parser/issues/issue-48508-aux.rs @@ -1,5 +1,5 @@ -// run-pass -// ignore-test Not a test. Used by issue-48508.rs +//@ run-pass +//@ ignore-test Not a test. Used by issue-48508.rs pub fn other() -> f64 { let µ = 1.0; diff --git a/tests/ui/parser/issues/issue-48508.rs b/tests/ui/parser/issues/issue-48508.rs index b66e09620f4..54adfce93a4 100644 --- a/tests/ui/parser/issues/issue-48508.rs +++ b/tests/ui/parser/issues/issue-48508.rs @@ -1,4 +1,4 @@ -// run-pass +//@ run-pass // Regression test for issue #48508: // // Confusion between global and local file offsets caused incorrect handling of multibyte character @@ -6,7 +6,7 @@ // when a multibyte character is at the end of a scope. The problematic code is actually in // issue-48508-aux.rs -// compile-flags:-g +//@ compile-flags:-g #![allow(uncommon_codepoints)] diff --git a/tests/ui/parser/issues/issue-48636.fixed b/tests/ui/parser/issues/issue-48636.fixed index 87c19a32d4c..921eb4ef685 100644 --- a/tests/ui/parser/issues/issue-48636.fixed +++ b/tests/ui/parser/issues/issue-48636.fixed @@ -1,4 +1,4 @@ -// run-rustfix +//@ run-rustfix #![allow(dead_code)] diff --git a/tests/ui/parser/issues/issue-48636.rs b/tests/ui/parser/issues/issue-48636.rs index 8610dc2f72e..269f11fa4a8 100644 --- a/tests/ui/parser/issues/issue-48636.rs +++ b/tests/ui/parser/issues/issue-48636.rs @@ -1,4 +1,4 @@ -// run-rustfix +//@ run-rustfix #![allow(dead_code)] diff --git a/tests/ui/parser/issues/issue-54521-1.rs b/tests/ui/parser/issues/issue-54521-1.rs index 8a682ef0a11..e80cb55eaeb 100644 --- a/tests/ui/parser/issues/issue-54521-1.rs +++ b/tests/ui/parser/issues/issue-54521-1.rs @@ -1,4 +1,4 @@ -// check-pass +//@ check-pass // This test checks that the `remove extra angle brackets` error doesn't happen for some // potential edge-cases.. diff --git a/tests/ui/parser/issues/issue-54521-2.fixed b/tests/ui/parser/issues/issue-54521-2.fixed index a91c4fe43ea..63ca4c65192 100644 --- a/tests/ui/parser/issues/issue-54521-2.fixed +++ b/tests/ui/parser/issues/issue-54521-2.fixed @@ -1,4 +1,4 @@ -// run-rustfix +//@ run-rustfix // This test checks that the following error is emitted and the suggestion works: // diff --git a/tests/ui/parser/issues/issue-54521-2.rs b/tests/ui/parser/issues/issue-54521-2.rs index 3639aac87ee..0f3d9232ca1 100644 --- a/tests/ui/parser/issues/issue-54521-2.rs +++ b/tests/ui/parser/issues/issue-54521-2.rs @@ -1,4 +1,4 @@ -// run-rustfix +//@ run-rustfix // This test checks that the following error is emitted and the suggestion works: // diff --git a/tests/ui/parser/issues/issue-54521-3.fixed b/tests/ui/parser/issues/issue-54521-3.fixed index 84ab6866cf1..47ae6b9ebc5 100644 --- a/tests/ui/parser/issues/issue-54521-3.fixed +++ b/tests/ui/parser/issues/issue-54521-3.fixed @@ -1,4 +1,4 @@ -// run-rustfix +//@ run-rustfix // This test checks that the following error is emitted and the suggestion works: // diff --git a/tests/ui/parser/issues/issue-54521-3.rs b/tests/ui/parser/issues/issue-54521-3.rs index f1d68504178..94037c82e4e 100644 --- a/tests/ui/parser/issues/issue-54521-3.rs +++ b/tests/ui/parser/issues/issue-54521-3.rs @@ -1,4 +1,4 @@ -// run-rustfix +//@ run-rustfix // This test checks that the following error is emitted and the suggestion works: // diff --git a/tests/ui/parser/issues/issue-57684.fixed b/tests/ui/parser/issues/issue-57684.fixed index 4a432206d51..a6a6493b43a 100644 --- a/tests/ui/parser/issues/issue-57684.fixed +++ b/tests/ui/parser/issues/issue-57684.fixed @@ -1,4 +1,4 @@ -// run-rustfix +//@ run-rustfix #![allow(warnings)] diff --git a/tests/ui/parser/issues/issue-57684.rs b/tests/ui/parser/issues/issue-57684.rs index 7a62785e32f..0ed52c576fe 100644 --- a/tests/ui/parser/issues/issue-57684.rs +++ b/tests/ui/parser/issues/issue-57684.rs @@ -1,4 +1,4 @@ -// run-rustfix +//@ run-rustfix #![allow(warnings)] diff --git a/tests/ui/parser/issues/issue-57819.fixed b/tests/ui/parser/issues/issue-57819.fixed index 3fab21db2d0..0321a32ee39 100644 --- a/tests/ui/parser/issues/issue-57819.fixed +++ b/tests/ui/parser/issues/issue-57819.fixed @@ -1,4 +1,4 @@ -// run-rustfix +//@ run-rustfix #![allow(warnings)] diff --git a/tests/ui/parser/issues/issue-57819.rs b/tests/ui/parser/issues/issue-57819.rs index 5cafbf439be..459e82dd2aa 100644 --- a/tests/ui/parser/issues/issue-57819.rs +++ b/tests/ui/parser/issues/issue-57819.rs @@ -1,4 +1,4 @@ -// run-rustfix +//@ run-rustfix #![allow(warnings)] diff --git a/tests/ui/parser/issues/issue-5806.rs b/tests/ui/parser/issues/issue-5806.rs index b694642a9c5..3f1b7cda931 100644 --- a/tests/ui/parser/issues/issue-5806.rs +++ b/tests/ui/parser/issues/issue-5806.rs @@ -1,5 +1,5 @@ -// normalize-stderr-test: "parser:.*\(" -> "parser: $$ACCESS_DENIED_MSG (" -// normalize-stderr-test: "os error \d+" -> "os error $$ACCESS_DENIED_CODE" +//@ normalize-stderr-test: "parser:.*\(" -> "parser: $$ACCESS_DENIED_MSG (" +//@ normalize-stderr-test: "os error \d+" -> "os error $$ACCESS_DENIED_CODE" #[path = "../parser"] mod foo; //~ ERROR couldn't read diff --git a/tests/ui/parser/issues/issue-58094-missing-right-square-bracket.rs b/tests/ui/parser/issues/issue-58094-missing-right-square-bracket.rs index a2ea8ad368b..7952d29c260 100644 --- a/tests/ui/parser/issues/issue-58094-missing-right-square-bracket.rs +++ b/tests/ui/parser/issues/issue-58094-missing-right-square-bracket.rs @@ -1,5 +1,5 @@ // Fixed in #66054. // ignore-tidy-trailing-newlines -// error-pattern: this file contains an unclosed delimiter -// error-pattern: aborting due to 1 previous error +//@ error-pattern: this file contains an unclosed delimiter +//@ error-pattern: aborting due to 1 previous error #[Š… \ No newline at end of file diff --git a/tests/ui/parser/issues/issue-62524.rs b/tests/ui/parser/issues/issue-62524.rs index dd86fc9a7f8..a219f662cf7 100644 --- a/tests/ui/parser/issues/issue-62524.rs +++ b/tests/ui/parser/issues/issue-62524.rs @@ -1,5 +1,5 @@ // ignore-tidy-trailing-newlines -// error-pattern: aborting due to 1 previous error +//@ error-pattern: aborting due to 1 previous error #![allow(uncommon_codepoints)] y![ diff --git a/tests/ui/parser/issues/issue-62554.rs b/tests/ui/parser/issues/issue-62554.rs index 4b463a17333..9f196e4b0d6 100644 --- a/tests/ui/parser/issues/issue-62554.rs +++ b/tests/ui/parser/issues/issue-62554.rs @@ -1,4 +1,4 @@ -// error-pattern:this file contains an unclosed delimiter +//@ error-pattern:this file contains an unclosed delimiter fn main() {} diff --git a/tests/ui/parser/issues/issue-62894.rs b/tests/ui/parser/issues/issue-62894.rs index 4dfa406ea2d..5b1627a2553 100644 --- a/tests/ui/parser/issues/issue-62894.rs +++ b/tests/ui/parser/issues/issue-62894.rs @@ -1,5 +1,5 @@ // Regression test for #62894, shouldn't crash. -// error-pattern: this file contains an unclosed delimiter +//@ error-pattern: this file contains an unclosed delimiter fn f() { assert_eq!(f(), (), assert_eq!(assert_eq! diff --git a/tests/ui/parser/issues/issue-62973.rs b/tests/ui/parser/issues/issue-62973.rs index 22d75457702..5c666d802fe 100644 --- a/tests/ui/parser/issues/issue-62973.rs +++ b/tests/ui/parser/issues/issue-62973.rs @@ -1,5 +1,5 @@ // ignore-tidy-trailing-newlines -// error-pattern: aborting due to 3 previous errors +//@ error-pattern: aborting due to 3 previous errors fn main() {} diff --git a/tests/ui/parser/issues/issue-63115-range-pat-interpolated.rs b/tests/ui/parser/issues/issue-63115-range-pat-interpolated.rs index b6e5091b621..d1a5f32b954 100644 --- a/tests/ui/parser/issues/issue-63115-range-pat-interpolated.rs +++ b/tests/ui/parser/issues/issue-63115-range-pat-interpolated.rs @@ -1,4 +1,4 @@ -// check-pass +//@ check-pass #![feature(exclusive_range_pattern)] diff --git a/tests/ui/parser/issues/issue-63116.rs b/tests/ui/parser/issues/issue-63116.rs index 6b9d9cdbeb1..3be9606b4ed 100644 --- a/tests/ui/parser/issues/issue-63116.rs +++ b/tests/ui/parser/issues/issue-63116.rs @@ -1,3 +1,3 @@ // fixed by #66361 -// error-pattern: aborting due to 2 previous errors +//@ error-pattern: aborting due to 2 previous errors impl W { diff --git a/tests/ui/parser/issues/issue-70388-without-witness.fixed b/tests/ui/parser/issues/issue-70388-without-witness.fixed index 58721495dcd..46d42fcaa4b 100644 --- a/tests/ui/parser/issues/issue-70388-without-witness.fixed +++ b/tests/ui/parser/issues/issue-70388-without-witness.fixed @@ -1,4 +1,4 @@ -// run-rustfix +//@ run-rustfix // This is for checking if we can apply suggestions as-is. pub struct Foo(#[allow(dead_code)] i32); diff --git a/tests/ui/parser/issues/issue-70388-without-witness.rs b/tests/ui/parser/issues/issue-70388-without-witness.rs index 2e679db5464..b7eb76a4147 100644 --- a/tests/ui/parser/issues/issue-70388-without-witness.rs +++ b/tests/ui/parser/issues/issue-70388-without-witness.rs @@ -1,4 +1,4 @@ -// run-rustfix +//@ run-rustfix // This is for checking if we can apply suggestions as-is. pub struct Foo(#[allow(dead_code)] i32); diff --git a/tests/ui/parser/issues/issue-7222.rs b/tests/ui/parser/issues/issue-7222.rs index fb18f4cd62e..6f6b34f4f48 100644 --- a/tests/ui/parser/issues/issue-7222.rs +++ b/tests/ui/parser/issues/issue-7222.rs @@ -1,5 +1,5 @@ -// run-pass -// pretty-expanded FIXME #23616 +//@ run-pass +//@ pretty-expanded FIXME #23616 pub fn main() { const FOO: f64 = 10.0; diff --git a/tests/ui/parser/issues/issue-75599.rs b/tests/ui/parser/issues/issue-75599.rs index 0857676e4ed..d36285324e0 100644 --- a/tests/ui/parser/issues/issue-75599.rs +++ b/tests/ui/parser/issues/issue-75599.rs @@ -1,4 +1,4 @@ -// check-pass +//@ check-pass #![allow(non_upper_case_globals)] const or: usize = 1; diff --git a/tests/ui/parser/issues/issue-76437-async.rs b/tests/ui/parser/issues/issue-76437-async.rs index 84ee3dd2112..497e269d634 100644 --- a/tests/ui/parser/issues/issue-76437-async.rs +++ b/tests/ui/parser/issues/issue-76437-async.rs @@ -1,4 +1,4 @@ -// edition:2018 +//@ edition:2018 mod t { async pub fn t() {} diff --git a/tests/ui/parser/issues/issue-76437-const-async-unsafe.rs b/tests/ui/parser/issues/issue-76437-const-async-unsafe.rs index f1e06e4ad89..27594a85312 100644 --- a/tests/ui/parser/issues/issue-76437-const-async-unsafe.rs +++ b/tests/ui/parser/issues/issue-76437-const-async-unsafe.rs @@ -1,4 +1,4 @@ -// edition:2018 +//@ edition:2018 mod t { const async unsafe pub fn t() {} diff --git a/tests/ui/parser/issues/issue-76437-const-async.rs b/tests/ui/parser/issues/issue-76437-const-async.rs index 3c789fdcd02..45d53c63933 100644 --- a/tests/ui/parser/issues/issue-76437-const-async.rs +++ b/tests/ui/parser/issues/issue-76437-const-async.rs @@ -1,4 +1,4 @@ -// edition:2018 +//@ edition:2018 mod t { const async pub fn t() {} diff --git a/tests/ui/parser/issues/issue-76437-const.rs b/tests/ui/parser/issues/issue-76437-const.rs index d3815a52346..c3431e3567b 100644 --- a/tests/ui/parser/issues/issue-76437-const.rs +++ b/tests/ui/parser/issues/issue-76437-const.rs @@ -1,4 +1,4 @@ -// edition:2018 +//@ edition:2018 mod t { const pub fn t() {} diff --git a/tests/ui/parser/issues/issue-76437-pub-crate-unsafe.rs b/tests/ui/parser/issues/issue-76437-pub-crate-unsafe.rs index daa1d120795..6e3039c2228 100644 --- a/tests/ui/parser/issues/issue-76437-pub-crate-unsafe.rs +++ b/tests/ui/parser/issues/issue-76437-pub-crate-unsafe.rs @@ -1,4 +1,4 @@ -// edition:2018 +//@ edition:2018 mod t { unsafe pub(crate) fn t() {} diff --git a/tests/ui/parser/issues/issue-76437-unsafe.rs b/tests/ui/parser/issues/issue-76437-unsafe.rs index 785a79a79a2..206cc3e6660 100644 --- a/tests/ui/parser/issues/issue-76437-unsafe.rs +++ b/tests/ui/parser/issues/issue-76437-unsafe.rs @@ -1,4 +1,4 @@ -// edition:2018 +//@ edition:2018 mod t { unsafe pub fn t() {} diff --git a/tests/ui/parser/issues/issue-76597.fixed b/tests/ui/parser/issues/issue-76597.fixed index 2d7a30b8361..779b4042cf4 100644 --- a/tests/ui/parser/issues/issue-76597.fixed +++ b/tests/ui/parser/issues/issue-76597.fixed @@ -1,4 +1,4 @@ -// run-rustfix +//@ run-rustfix #![allow(dead_code)] #![allow(unused_variables)] diff --git a/tests/ui/parser/issues/issue-76597.rs b/tests/ui/parser/issues/issue-76597.rs index 521b9c64b1c..d78761df18e 100644 --- a/tests/ui/parser/issues/issue-76597.rs +++ b/tests/ui/parser/issues/issue-76597.rs @@ -1,4 +1,4 @@ -// run-rustfix +//@ run-rustfix #![allow(dead_code)] #![allow(unused_variables)] diff --git a/tests/ui/parser/issues/issue-81804.rs b/tests/ui/parser/issues/issue-81804.rs index ebc4752a142..7c9e6e90582 100644 --- a/tests/ui/parser/issues/issue-81804.rs +++ b/tests/ui/parser/issues/issue-81804.rs @@ -1,5 +1,5 @@ -// error-pattern: this file contains an unclosed delimiter -// error-pattern: this file contains an unclosed delimiter +//@ error-pattern: this file contains an unclosed delimiter +//@ error-pattern: this file contains an unclosed delimiter fn main() {} diff --git a/tests/ui/parser/issues/issue-81827.rs b/tests/ui/parser/issues/issue-81827.rs index 91defd12a57..a2bd345fc05 100644 --- a/tests/ui/parser/issues/issue-81827.rs +++ b/tests/ui/parser/issues/issue-81827.rs @@ -1,5 +1,5 @@ -// error-pattern: this file contains an unclosed delimiter -// error-pattern: mismatched closing delimiter: `]` +//@ error-pattern: this file contains an unclosed delimiter +//@ error-pattern: mismatched closing delimiter: `]` #![crate_name="0"] diff --git a/tests/ui/parser/issues/issue-83639.rs b/tests/ui/parser/issues/issue-83639.rs index 6ddbedfa0bc..d22ef9b09e6 100644 --- a/tests/ui/parser/issues/issue-83639.rs +++ b/tests/ui/parser/issues/issue-83639.rs @@ -1,4 +1,4 @@ -// check-fail +//@ check-fail // ignore-tidy-tab fn main() { diff --git a/tests/ui/parser/issues/issue-84104.rs b/tests/ui/parser/issues/issue-84104.rs index 962eb69bd83..bced05e684a 100644 --- a/tests/ui/parser/issues/issue-84104.rs +++ b/tests/ui/parser/issues/issue-84104.rs @@ -1,2 +1,2 @@ -// error-pattern: this file contains an unclosed delimiter +//@ error-pattern: this file contains an unclosed delimiter #[i=i::<ŚšÜ–< diff --git a/tests/ui/parser/issues/issue-84148-2.rs b/tests/ui/parser/issues/issue-84148-2.rs index e677abde5f6..560475bd32c 100644 --- a/tests/ui/parser/issues/issue-84148-2.rs +++ b/tests/ui/parser/issues/issue-84148-2.rs @@ -1,2 +1,2 @@ -// error-pattern: this file contains an unclosed delimiter +//@ error-pattern: this file contains an unclosed delimiter fn f(t:for<>t? diff --git a/tests/ui/parser/issues/issue-87197-missing-semicolon.fixed b/tests/ui/parser/issues/issue-87197-missing-semicolon.fixed index 53f071db781..63c4515985d 100644 --- a/tests/ui/parser/issues/issue-87197-missing-semicolon.fixed +++ b/tests/ui/parser/issues/issue-87197-missing-semicolon.fixed @@ -1,4 +1,4 @@ -// run-rustfix +//@ run-rustfix // Parser should know when a semicolon is missing. // https://github.com/rust-lang/rust/issues/87197 diff --git a/tests/ui/parser/issues/issue-87197-missing-semicolon.rs b/tests/ui/parser/issues/issue-87197-missing-semicolon.rs index db0edf4529c..9a743b188c3 100644 --- a/tests/ui/parser/issues/issue-87197-missing-semicolon.rs +++ b/tests/ui/parser/issues/issue-87197-missing-semicolon.rs @@ -1,4 +1,4 @@ -// run-rustfix +//@ run-rustfix // Parser should know when a semicolon is missing. // https://github.com/rust-lang/rust/issues/87197 diff --git a/tests/ui/parser/issues/issue-87217-keyword-order/const-async-const.rs b/tests/ui/parser/issues/issue-87217-keyword-order/const-async-const.rs index 099178a7d50..694729376ba 100644 --- a/tests/ui/parser/issues/issue-87217-keyword-order/const-async-const.rs +++ b/tests/ui/parser/issues/issue-87217-keyword-order/const-async-const.rs @@ -1,4 +1,4 @@ -// edition:2018 +//@ edition:2018 // Test that even when `const` is already present, the proposed fix is to remove the second `const` diff --git a/tests/ui/parser/issues/issue-87217-keyword-order/several-kw-jump.rs b/tests/ui/parser/issues/issue-87217-keyword-order/several-kw-jump.rs index 47942662685..40f993eafbb 100644 --- a/tests/ui/parser/issues/issue-87217-keyword-order/several-kw-jump.rs +++ b/tests/ui/parser/issues/issue-87217-keyword-order/several-kw-jump.rs @@ -1,4 +1,4 @@ -// edition:2018 +//@ edition:2018 // There is an order to respect for keywords before a function: // `, const, async, unsafe, extern, ""` diff --git a/tests/ui/parser/issues/issue-87217-keyword-order/wrong-async.rs b/tests/ui/parser/issues/issue-87217-keyword-order/wrong-async.rs index 867f71c1204..c260c721346 100644 --- a/tests/ui/parser/issues/issue-87217-keyword-order/wrong-async.rs +++ b/tests/ui/parser/issues/issue-87217-keyword-order/wrong-async.rs @@ -1,4 +1,4 @@ -// edition:2018 +//@ edition:2018 // There is an order to respect for keywords before a function: // `, const, async, unsafe, extern, ""` diff --git a/tests/ui/parser/issues/issue-87217-keyword-order/wrong-const.rs b/tests/ui/parser/issues/issue-87217-keyword-order/wrong-const.rs index 9a7f28210f9..bdfe248693e 100644 --- a/tests/ui/parser/issues/issue-87217-keyword-order/wrong-const.rs +++ b/tests/ui/parser/issues/issue-87217-keyword-order/wrong-const.rs @@ -1,4 +1,4 @@ -// edition:2018 +//@ edition:2018 // There is an order to respect for keywords before a function: // `, const, async, unsafe, extern, ""` diff --git a/tests/ui/parser/issues/issue-87217-keyword-order/wrong-unsafe.rs b/tests/ui/parser/issues/issue-87217-keyword-order/wrong-unsafe.rs index 8305ff4f623..34b687a0f52 100644 --- a/tests/ui/parser/issues/issue-87217-keyword-order/wrong-unsafe.rs +++ b/tests/ui/parser/issues/issue-87217-keyword-order/wrong-unsafe.rs @@ -1,4 +1,4 @@ -// edition:2018 +//@ edition:2018 // There is an order to respect for keywords before a function: // `, const, async, unsafe, extern, ""` diff --git a/tests/ui/parser/issues/issue-88276-unary-plus.fixed b/tests/ui/parser/issues/issue-88276-unary-plus.fixed index 25b7c340f60..d991d46c097 100644 --- a/tests/ui/parser/issues/issue-88276-unary-plus.fixed +++ b/tests/ui/parser/issues/issue-88276-unary-plus.fixed @@ -1,4 +1,4 @@ -// run-rustfix +//@ run-rustfix #[allow(unused_parens)] fn main() { let _ = 1; //~ ERROR leading `+` is not supported diff --git a/tests/ui/parser/issues/issue-88276-unary-plus.rs b/tests/ui/parser/issues/issue-88276-unary-plus.rs index 11b2e9d6016..bcdf28cdb1a 100644 --- a/tests/ui/parser/issues/issue-88276-unary-plus.rs +++ b/tests/ui/parser/issues/issue-88276-unary-plus.rs @@ -1,4 +1,4 @@ -// run-rustfix +//@ run-rustfix #[allow(unused_parens)] fn main() { let _ = +1; //~ ERROR leading `+` is not supported diff --git a/tests/ui/parser/issues/issue-88583-union-as-ident.rs b/tests/ui/parser/issues/issue-88583-union-as-ident.rs index b3d66d46b1d..a18bd0aeee6 100644 --- a/tests/ui/parser/issues/issue-88583-union-as-ident.rs +++ b/tests/ui/parser/issues/issue-88583-union-as-ident.rs @@ -1,4 +1,4 @@ -// check-pass +//@ check-pass #![allow(non_camel_case_types)] diff --git a/tests/ui/parser/issues/issue-88770.rs b/tests/ui/parser/issues/issue-88770.rs index 9341415b2d9..ecc50481f65 100644 --- a/tests/ui/parser/issues/issue-88770.rs +++ b/tests/ui/parser/issues/issue-88770.rs @@ -1,6 +1,6 @@ // Regression test for the ICE described in #88770. -// error-pattern:this file contains an unclosed delimiter +//@ error-pattern:this file contains an unclosed delimiter fn m(){print!("",(c for&g u diff --git a/tests/ui/parser/issues/issue-89396.fixed b/tests/ui/parser/issues/issue-89396.fixed index 0c040ddea44..c31858d4a89 100644 --- a/tests/ui/parser/issues/issue-89396.fixed +++ b/tests/ui/parser/issues/issue-89396.fixed @@ -1,7 +1,7 @@ // Regression test for issue #89396: Try to recover from a // `=>` -> `=` or `->` typo in a match arm. -// run-rustfix +//@ run-rustfix fn main() { let opt = Some(42); diff --git a/tests/ui/parser/issues/issue-89396.rs b/tests/ui/parser/issues/issue-89396.rs index d95f666d797..b93820715fe 100644 --- a/tests/ui/parser/issues/issue-89396.rs +++ b/tests/ui/parser/issues/issue-89396.rs @@ -1,7 +1,7 @@ // Regression test for issue #89396: Try to recover from a // `=>` -> `=` or `->` typo in a match arm. -// run-rustfix +//@ run-rustfix fn main() { let opt = Some(42); diff --git a/tests/ui/parser/issues/issue-89971-outer-attr-following-inner-attr-ice.rs b/tests/ui/parser/issues/issue-89971-outer-attr-following-inner-attr-ice.rs index fe67d9822fc..51bb04dba19 100644 --- a/tests/ui/parser/issues/issue-89971-outer-attr-following-inner-attr-ice.rs +++ b/tests/ui/parser/issues/issue-89971-outer-attr-following-inner-attr-ice.rs @@ -1,4 +1,4 @@ -// aux-build:issue-89971-outer-attr-following-inner-attr-ice.rs +//@ aux-build:issue-89971-outer-attr-following-inner-attr-ice.rs #[macro_use] extern crate issue_89971_outer_attr_following_inner_attr_ice; diff --git a/tests/ui/parser/issues/issue-99625-enum-struct-mutually-exclusive.fixed b/tests/ui/parser/issues/issue-99625-enum-struct-mutually-exclusive.fixed index 4b4a416b1ac..37fa7fa54b6 100644 --- a/tests/ui/parser/issues/issue-99625-enum-struct-mutually-exclusive.fixed +++ b/tests/ui/parser/issues/issue-99625-enum-struct-mutually-exclusive.fixed @@ -1,4 +1,4 @@ -// run-rustfix +//@ run-rustfix pub enum Range { //~^ ERROR `enum` and `struct` are mutually exclusive diff --git a/tests/ui/parser/issues/issue-99625-enum-struct-mutually-exclusive.rs b/tests/ui/parser/issues/issue-99625-enum-struct-mutually-exclusive.rs index 9cc88664129..8df82be0aba 100644 --- a/tests/ui/parser/issues/issue-99625-enum-struct-mutually-exclusive.rs +++ b/tests/ui/parser/issues/issue-99625-enum-struct-mutually-exclusive.rs @@ -1,4 +1,4 @@ -// run-rustfix +//@ run-rustfix pub enum struct Range { //~^ ERROR `enum` and `struct` are mutually exclusive diff --git a/tests/ui/parser/issues/issue-99910-const-let-mutually-exclusive.fixed b/tests/ui/parser/issues/issue-99910-const-let-mutually-exclusive.fixed index 64ab6f62b77..0c8b36f6f2e 100644 --- a/tests/ui/parser/issues/issue-99910-const-let-mutually-exclusive.fixed +++ b/tests/ui/parser/issues/issue-99910-const-let-mutually-exclusive.fixed @@ -1,4 +1,4 @@ -// run-rustfix +//@ run-rustfix fn main() { const _FOO: i32 = 123; diff --git a/tests/ui/parser/issues/issue-99910-const-let-mutually-exclusive.rs b/tests/ui/parser/issues/issue-99910-const-let-mutually-exclusive.rs index 50520971ffb..55cabf533ac 100644 --- a/tests/ui/parser/issues/issue-99910-const-let-mutually-exclusive.rs +++ b/tests/ui/parser/issues/issue-99910-const-let-mutually-exclusive.rs @@ -1,4 +1,4 @@ -// run-rustfix +//@ run-rustfix fn main() { const let _FOO: i32 = 123; diff --git a/tests/ui/parser/issues/recover-ge-as-fat-arrow.fixed b/tests/ui/parser/issues/recover-ge-as-fat-arrow.fixed index 7b73dfb02df..64c06d608df 100644 --- a/tests/ui/parser/issues/recover-ge-as-fat-arrow.fixed +++ b/tests/ui/parser/issues/recover-ge-as-fat-arrow.fixed @@ -1,4 +1,4 @@ -// run-rustfix +//@ run-rustfix fn main() { match 1 { 1 => {} //~ ERROR diff --git a/tests/ui/parser/issues/recover-ge-as-fat-arrow.rs b/tests/ui/parser/issues/recover-ge-as-fat-arrow.rs index 92143fcf3f7..8ef31b230a3 100644 --- a/tests/ui/parser/issues/recover-ge-as-fat-arrow.rs +++ b/tests/ui/parser/issues/recover-ge-as-fat-arrow.rs @@ -1,4 +1,4 @@ -// run-rustfix +//@ run-rustfix fn main() { match 1 { 1 >= {} //~ ERROR diff --git a/tests/ui/parser/item-free-const-no-body-syntactic-pass.rs b/tests/ui/parser/item-free-const-no-body-syntactic-pass.rs index acfdd3c363f..4edbee54de6 100644 --- a/tests/ui/parser/item-free-const-no-body-syntactic-pass.rs +++ b/tests/ui/parser/item-free-const-no-body-syntactic-pass.rs @@ -1,6 +1,6 @@ // Syntactically, a free `const` item can omit its body. -// check-pass +//@ check-pass fn main() {} diff --git a/tests/ui/parser/item-free-static-no-body-syntactic-pass.rs b/tests/ui/parser/item-free-static-no-body-syntactic-pass.rs index db0039204d8..df5192645e1 100644 --- a/tests/ui/parser/item-free-static-no-body-syntactic-pass.rs +++ b/tests/ui/parser/item-free-static-no-body-syntactic-pass.rs @@ -1,6 +1,6 @@ // Syntactically, a free `const` item can omit its body. -// check-pass +//@ check-pass fn main() {} diff --git a/tests/ui/parser/item-free-type-bounds-syntactic-pass.rs b/tests/ui/parser/item-free-type-bounds-syntactic-pass.rs index 58fc926d08f..80de3cfc668 100644 --- a/tests/ui/parser/item-free-type-bounds-syntactic-pass.rs +++ b/tests/ui/parser/item-free-type-bounds-syntactic-pass.rs @@ -1,4 +1,4 @@ -// check-pass +//@ check-pass fn main() {} diff --git a/tests/ui/parser/item-kw-case-mismatch.fixed b/tests/ui/parser/item-kw-case-mismatch.fixed index 4b99537fbf7..f5afa482712 100644 --- a/tests/ui/parser/item-kw-case-mismatch.fixed +++ b/tests/ui/parser/item-kw-case-mismatch.fixed @@ -1,5 +1,5 @@ -// run-rustfix -// edition:2018 +//@ run-rustfix +//@ edition:2018 #![allow(unused_imports)] fn main() {} diff --git a/tests/ui/parser/item-kw-case-mismatch.rs b/tests/ui/parser/item-kw-case-mismatch.rs index b11ec93754f..ea224e08a00 100644 --- a/tests/ui/parser/item-kw-case-mismatch.rs +++ b/tests/ui/parser/item-kw-case-mismatch.rs @@ -1,5 +1,5 @@ -// run-rustfix -// edition:2018 +//@ run-rustfix +//@ edition:2018 #![allow(unused_imports)] fn main() {} diff --git a/tests/ui/parser/keyword-try-as-identifier-edition2018.rs b/tests/ui/parser/keyword-try-as-identifier-edition2018.rs index 4fa37bdb057..27452f4d45e 100644 --- a/tests/ui/parser/keyword-try-as-identifier-edition2018.rs +++ b/tests/ui/parser/keyword-try-as-identifier-edition2018.rs @@ -1,4 +1,4 @@ -// compile-flags: --edition 2018 +//@ compile-flags: --edition 2018 fn main() { let try = "foo"; //~ error: expected identifier, found reserved keyword `try` diff --git a/tests/ui/parser/keyword-union-as-identifier.rs b/tests/ui/parser/keyword-union-as-identifier.rs index 7062557d731..8b4a8944276 100644 --- a/tests/ui/parser/keyword-union-as-identifier.rs +++ b/tests/ui/parser/keyword-union-as-identifier.rs @@ -1,4 +1,4 @@ -// check-pass +//@ check-pass #![allow(non_camel_case_types)] #![allow(non_upper_case_globals)] diff --git a/tests/ui/parser/kw-in-trait-bounds.rs b/tests/ui/parser/kw-in-trait-bounds.rs index e9e85339aff..16d23672ca3 100644 --- a/tests/ui/parser/kw-in-trait-bounds.rs +++ b/tests/ui/parser/kw-in-trait-bounds.rs @@ -1,4 +1,4 @@ -// edition:2018 +//@ edition:2018 fn _f(_: impl fn(), _: &dyn fn()) //~^ ERROR expected identifier, found keyword `fn` diff --git a/tests/ui/parser/let-binop.fixed b/tests/ui/parser/let-binop.fixed index 93f7f97b04f..83eff697f89 100644 --- a/tests/ui/parser/let-binop.fixed +++ b/tests/ui/parser/let-binop.fixed @@ -1,4 +1,4 @@ -// run-rustfix +//@ run-rustfix fn main() { let a: i8 = 1; //~ ERROR can't reassign to an uninitialized variable diff --git a/tests/ui/parser/let-binop.rs b/tests/ui/parser/let-binop.rs index 2adbceae5d3..16e46cd4d6c 100644 --- a/tests/ui/parser/let-binop.rs +++ b/tests/ui/parser/let-binop.rs @@ -1,4 +1,4 @@ -// run-rustfix +//@ run-rustfix fn main() { let a: i8 *= 1; //~ ERROR can't reassign to an uninitialized variable diff --git a/tests/ui/parser/lifetime-semicolon.fixed b/tests/ui/parser/lifetime-semicolon.fixed index 482b7704695..e9b6ab54b1f 100644 --- a/tests/ui/parser/lifetime-semicolon.fixed +++ b/tests/ui/parser/lifetime-semicolon.fixed @@ -1,4 +1,4 @@ -// run-rustfix +//@ run-rustfix #![allow(unused)] struct Foo<'a, 'b> { a: &'a &'b i32 diff --git a/tests/ui/parser/lifetime-semicolon.rs b/tests/ui/parser/lifetime-semicolon.rs index 21c8b0a7f88..158c5ccdcdf 100644 --- a/tests/ui/parser/lifetime-semicolon.rs +++ b/tests/ui/parser/lifetime-semicolon.rs @@ -1,4 +1,4 @@ -// run-rustfix +//@ run-rustfix #![allow(unused)] struct Foo<'a, 'b> { a: &'a &'b i32 diff --git a/tests/ui/parser/macro-braces-dot-question.rs b/tests/ui/parser/macro-braces-dot-question.rs index 016b434a612..9b070f201b5 100644 --- a/tests/ui/parser/macro-braces-dot-question.rs +++ b/tests/ui/parser/macro-braces-dot-question.rs @@ -1,4 +1,4 @@ -// check-pass +//@ check-pass use std::io::Write; diff --git a/tests/ui/parser/macro/macro-expand-to-field.rs b/tests/ui/parser/macro/macro-expand-to-field.rs index 533511ecf5a..ccdcf013cd2 100644 --- a/tests/ui/parser/macro/macro-expand-to-field.rs +++ b/tests/ui/parser/macro/macro-expand-to-field.rs @@ -1,4 +1,4 @@ -// compile-flags: --crate-type=lib +//@ compile-flags: --crate-type=lib // https://github.com/rust-lang/rust/issues/113766 diff --git a/tests/ui/parser/macro/mbe-bare-trait-object-maybe-trait-bound.rs b/tests/ui/parser/macro/mbe-bare-trait-object-maybe-trait-bound.rs index fe062d62e5a..494e58c1ca5 100644 --- a/tests/ui/parser/macro/mbe-bare-trait-object-maybe-trait-bound.rs +++ b/tests/ui/parser/macro/mbe-bare-trait-object-maybe-trait-bound.rs @@ -3,8 +3,8 @@ // even in newer editions like Rust 2021. // Therefore the arm `?$Trait:path` shouldn't get reached. -// edition: 2021 -// check-pass +//@ edition: 2021 +//@ check-pass macro_rules! check { ($Ty:ty) => {}; diff --git a/tests/ui/parser/match-refactor-to-expr.fixed b/tests/ui/parser/match-refactor-to-expr.fixed index 423147b27aa..bee49af9c95 100644 --- a/tests/ui/parser/match-refactor-to-expr.fixed +++ b/tests/ui/parser/match-refactor-to-expr.fixed @@ -1,4 +1,4 @@ -// run-rustfix +//@ run-rustfix fn main() { let foo = diff --git a/tests/ui/parser/match-refactor-to-expr.rs b/tests/ui/parser/match-refactor-to-expr.rs index fcba5d0447e..063f534197f 100644 --- a/tests/ui/parser/match-refactor-to-expr.rs +++ b/tests/ui/parser/match-refactor-to-expr.rs @@ -1,4 +1,4 @@ -// run-rustfix +//@ run-rustfix fn main() { let foo = diff --git a/tests/ui/parser/mbe_missing_right_paren.rs b/tests/ui/parser/mbe_missing_right_paren.rs index 9a92e67da4d..9c57b0ebcfc 100644 --- a/tests/ui/parser/mbe_missing_right_paren.rs +++ b/tests/ui/parser/mbe_missing_right_paren.rs @@ -1,3 +1,3 @@ // ignore-tidy-trailing-newlines -// error-pattern: this file contains an unclosed delimiter +//@ error-pattern: this file contains an unclosed delimiter macro_rules! abc(Ų¼ \ No newline at end of file diff --git a/tests/ui/parser/missing_right_paren.rs b/tests/ui/parser/missing_right_paren.rs index cc6d30c9cac..bbf4519a713 100644 --- a/tests/ui/parser/missing_right_paren.rs +++ b/tests/ui/parser/missing_right_paren.rs @@ -1,4 +1,4 @@ // ignore-tidy-trailing-newlines -// error-pattern: this file contains an unclosed delimiter -// error-pattern: aborting due to 1 previous error +//@ error-pattern: this file contains an unclosed delimiter +//@ error-pattern: aborting due to 1 previous error fn main((Ų¼ \ No newline at end of file diff --git a/tests/ui/parser/misspelled-macro-rules.fixed b/tests/ui/parser/misspelled-macro-rules.fixed index 62be913d85f..7471a5641c2 100644 --- a/tests/ui/parser/misspelled-macro-rules.fixed +++ b/tests/ui/parser/misspelled-macro-rules.fixed @@ -1,6 +1,6 @@ // Regression test for issue #91227. -// run-rustfix +//@ run-rustfix #![allow(unused_macros)] diff --git a/tests/ui/parser/misspelled-macro-rules.rs b/tests/ui/parser/misspelled-macro-rules.rs index 4290e6e5e4c..8f63f37d3d3 100644 --- a/tests/ui/parser/misspelled-macro-rules.rs +++ b/tests/ui/parser/misspelled-macro-rules.rs @@ -1,6 +1,6 @@ // Regression test for issue #91227. -// run-rustfix +//@ run-rustfix #![allow(unused_macros)] diff --git a/tests/ui/parser/mod_file_not_exist.rs b/tests/ui/parser/mod_file_not_exist.rs index 7b079eb02dc..80a17163087 100644 --- a/tests/ui/parser/mod_file_not_exist.rs +++ b/tests/ui/parser/mod_file_not_exist.rs @@ -1,4 +1,4 @@ -// ignore-windows +//@ ignore-windows mod not_a_real_file; //~ ERROR file not found for module `not_a_real_file` //~^ HELP to create the module `not_a_real_file`, create file diff --git a/tests/ui/parser/mod_file_not_exist_windows.rs b/tests/ui/parser/mod_file_not_exist_windows.rs index 5db21e2bbc7..88780c0c24e 100644 --- a/tests/ui/parser/mod_file_not_exist_windows.rs +++ b/tests/ui/parser/mod_file_not_exist_windows.rs @@ -1,4 +1,4 @@ -// only-windows +//@ only-windows mod not_a_real_file; //~ ERROR file not found for module `not_a_real_file` //~^ HELP to create the module `not_a_real_file`, create file diff --git a/tests/ui/parser/mod_file_with_path_attr.rs b/tests/ui/parser/mod_file_with_path_attr.rs index 9450d89e5f5..e2854f3cc8d 100644 --- a/tests/ui/parser/mod_file_with_path_attr.rs +++ b/tests/ui/parser/mod_file_with_path_attr.rs @@ -1,4 +1,4 @@ -// normalize-stderr-test: "not_a_real_file.rs:.*\(" -> "not_a_real_file.rs: $$FILE_NOT_FOUND_MSG (" +//@ normalize-stderr-test: "not_a_real_file.rs:.*\(" -> "not_a_real_file.rs: $$FILE_NOT_FOUND_MSG (" #[path = "not_a_real_file.rs"] mod m; //~ ERROR not_a_real_file.rs diff --git a/tests/ui/parser/mut-patterns.rs b/tests/ui/parser/mut-patterns.rs index f2d2df0af29..b8610c4e190 100644 --- a/tests/ui/parser/mut-patterns.rs +++ b/tests/ui/parser/mut-patterns.rs @@ -1,6 +1,6 @@ // Can't put mut in non-ident pattern -// edition:2018 +//@ edition:2018 #![feature(box_patterns)] #![allow(warnings)] diff --git a/tests/ui/parser/operator-associativity.rs b/tests/ui/parser/operator-associativity.rs index 4f40c80bc4c..e6082d22cc3 100644 --- a/tests/ui/parser/operator-associativity.rs +++ b/tests/ui/parser/operator-associativity.rs @@ -1,4 +1,4 @@ -// run-pass +//@ run-pass // Testcase for issue #130, operator associativity. pub fn main() { assert_eq!(3 * 5 / 2, 7); } diff --git a/tests/ui/parser/parse-assoc-type-lt.rs b/tests/ui/parser/parse-assoc-type-lt.rs index 913fcd920bd..f1823ce96b9 100644 --- a/tests/ui/parser/parse-assoc-type-lt.rs +++ b/tests/ui/parser/parse-assoc-type-lt.rs @@ -1,5 +1,5 @@ -// check-pass -// pretty-expanded FIXME #23616 +//@ check-pass +//@ pretty-expanded FIXME #23616 trait Foo { type T; diff --git a/tests/ui/parser/parse-panic.rs b/tests/ui/parser/parse-panic.rs index aeb2ba4faa5..6ef439d4837 100644 --- a/tests/ui/parser/parse-panic.rs +++ b/tests/ui/parser/parse-panic.rs @@ -1,4 +1,4 @@ -// run-pass +//@ run-pass #![allow(dead_code)] #![allow(unreachable_code)] diff --git a/tests/ui/parser/parser-unicode-whitespace.rs b/tests/ui/parser/parser-unicode-whitespace.rs index 555cd68c3a7..0b1c3186a4f 100644 --- a/tests/ui/parser/parser-unicode-whitespace.rs +++ b/tests/ui/parser/parser-unicode-whitespace.rs @@ -1,4 +1,4 @@ -// run-pass +//@ run-pass // Beware editing: it has numerous whitespace characters which are important. // It contains one ranges from the 'PATTERN_WHITE_SPACE' property outlined in // https://unicode.org/Public/UNIDATA/PropList.txt diff --git a/tests/ui/parser/pat-tuple-2.rs b/tests/ui/parser/pat-tuple-2.rs index a8f3debd3d6..8bf2a9aa449 100644 --- a/tests/ui/parser/pat-tuple-2.rs +++ b/tests/ui/parser/pat-tuple-2.rs @@ -1,4 +1,4 @@ -// check-pass +//@ check-pass fn main() { match (0, 1, 2) { diff --git a/tests/ui/parser/public-instead-of-pub-1.fixed b/tests/ui/parser/public-instead-of-pub-1.fixed index a4fa68ba5cc..dfbd14bb575 100644 --- a/tests/ui/parser/public-instead-of-pub-1.fixed +++ b/tests/ui/parser/public-instead-of-pub-1.fixed @@ -1,5 +1,5 @@ // Checks what happens when `public` is used instead of the correct, `pub` -// run-rustfix +//@ run-rustfix pub enum Test { //~^ ERROR expected one of `!` or `::`, found keyword `enum` diff --git a/tests/ui/parser/public-instead-of-pub-1.rs b/tests/ui/parser/public-instead-of-pub-1.rs index 43565c9b1d2..a783a348be0 100644 --- a/tests/ui/parser/public-instead-of-pub-1.rs +++ b/tests/ui/parser/public-instead-of-pub-1.rs @@ -1,5 +1,5 @@ // Checks what happens when `public` is used instead of the correct, `pub` -// run-rustfix +//@ run-rustfix public enum Test { //~^ ERROR expected one of `!` or `::`, found keyword `enum` diff --git a/tests/ui/parser/public-instead-of-pub-3.fixed b/tests/ui/parser/public-instead-of-pub-3.fixed index 14f620f41e8..dd85df4009d 100644 --- a/tests/ui/parser/public-instead-of-pub-3.fixed +++ b/tests/ui/parser/public-instead-of-pub-3.fixed @@ -1,4 +1,4 @@ -// run-rustfix +//@ run-rustfix mod test { pub const X: i32 = 123; //~^ ERROR expected one of `!` or `::`, found keyword `const` diff --git a/tests/ui/parser/public-instead-of-pub-3.rs b/tests/ui/parser/public-instead-of-pub-3.rs index ee27cb1a1a8..d79647ced6f 100644 --- a/tests/ui/parser/public-instead-of-pub-3.rs +++ b/tests/ui/parser/public-instead-of-pub-3.rs @@ -1,4 +1,4 @@ -// run-rustfix +//@ run-rustfix mod test { public const X: i32 = 123; //~^ ERROR expected one of `!` or `::`, found keyword `const` diff --git a/tests/ui/parser/public-instead-of-pub.fixed b/tests/ui/parser/public-instead-of-pub.fixed index 01db609990e..69203c4afcf 100644 --- a/tests/ui/parser/public-instead-of-pub.fixed +++ b/tests/ui/parser/public-instead-of-pub.fixed @@ -1,6 +1,6 @@ // Checks what happens when `public` is used instead of the correct, `pub` -// edition:2018 -// run-rustfix +//@ edition:2018 +//@ run-rustfix pub struct X; //~^ ERROR expected one of `!` or `::`, found keyword `struct` //~^^ HELP write `pub` instead of `public` to make the item public diff --git a/tests/ui/parser/public-instead-of-pub.rs b/tests/ui/parser/public-instead-of-pub.rs index 18e0fd3af1c..9507477fcd3 100644 --- a/tests/ui/parser/public-instead-of-pub.rs +++ b/tests/ui/parser/public-instead-of-pub.rs @@ -1,6 +1,6 @@ // Checks what happens when `public` is used instead of the correct, `pub` -// edition:2018 -// run-rustfix +//@ edition:2018 +//@ run-rustfix public struct X; //~^ ERROR expected one of `!` or `::`, found keyword `struct` //~^^ HELP write `pub` instead of `public` to make the item public diff --git a/tests/ui/parser/qualified-path-in-turbofish.fixed b/tests/ui/parser/qualified-path-in-turbofish.fixed index 404d2f7762d..1cfd8db6245 100644 --- a/tests/ui/parser/qualified-path-in-turbofish.fixed +++ b/tests/ui/parser/qualified-path-in-turbofish.fixed @@ -1,4 +1,4 @@ -// run-rustfix +//@ run-rustfix trait T { type Ty; } diff --git a/tests/ui/parser/qualified-path-in-turbofish.rs b/tests/ui/parser/qualified-path-in-turbofish.rs index 2f4b2ed348b..7aec515cc3d 100644 --- a/tests/ui/parser/qualified-path-in-turbofish.rs +++ b/tests/ui/parser/qualified-path-in-turbofish.rs @@ -1,4 +1,4 @@ -// run-rustfix +//@ run-rustfix trait T { type Ty; } diff --git a/tests/ui/parser/range_inclusive.fixed b/tests/ui/parser/range_inclusive.fixed index fe23880d1d4..3f466f0cf10 100644 --- a/tests/ui/parser/range_inclusive.fixed +++ b/tests/ui/parser/range_inclusive.fixed @@ -1,4 +1,4 @@ -// run-rustfix +//@ run-rustfix // Make sure that inclusive ranges with no end point don't parse. pub fn main() { diff --git a/tests/ui/parser/range_inclusive.rs b/tests/ui/parser/range_inclusive.rs index bc6d2413d26..00ded0d0792 100644 --- a/tests/ui/parser/range_inclusive.rs +++ b/tests/ui/parser/range_inclusive.rs @@ -1,4 +1,4 @@ -// run-rustfix +//@ run-rustfix // Make sure that inclusive ranges with no end point don't parse. pub fn main() { diff --git a/tests/ui/parser/ranges-precedence.rs b/tests/ui/parser/ranges-precedence.rs index db241ed0ccd..14dd6488ff2 100644 --- a/tests/ui/parser/ranges-precedence.rs +++ b/tests/ui/parser/ranges-precedence.rs @@ -1,4 +1,4 @@ -// run-pass +//@ run-pass // Test that the precedence of ranges is correct diff --git a/tests/ui/parser/raw/raw-str-in-macro-call.rs b/tests/ui/parser/raw/raw-str-in-macro-call.rs index 462c2279f5c..fc3c34cc1dd 100644 --- a/tests/ui/parser/raw/raw-str-in-macro-call.rs +++ b/tests/ui/parser/raw/raw-str-in-macro-call.rs @@ -1,4 +1,4 @@ -// check-pass +//@ check-pass macro_rules! m1 { ($tt:tt #) => () diff --git a/tests/ui/parser/recover/recover-const-async-fn-ptr.rs b/tests/ui/parser/recover/recover-const-async-fn-ptr.rs index 25af8772ced..2d8a3858aa6 100644 --- a/tests/ui/parser/recover/recover-const-async-fn-ptr.rs +++ b/tests/ui/parser/recover/recover-const-async-fn-ptr.rs @@ -1,4 +1,4 @@ -// edition:2018 +//@ edition:2018 type T0 = const fn(); //~ ERROR an `fn` pointer type cannot be `const` type T1 = const extern "C" fn(); //~ ERROR an `fn` pointer type cannot be `const` diff --git a/tests/ui/parser/recover/recover-for-loop-parens-around-head.fixed b/tests/ui/parser/recover/recover-for-loop-parens-around-head.fixed index 6afc2d99355..7d0566632d2 100644 --- a/tests/ui/parser/recover/recover-for-loop-parens-around-head.fixed +++ b/tests/ui/parser/recover/recover-for-loop-parens-around-head.fixed @@ -1,4 +1,4 @@ -// run-rustfix +//@ run-rustfix // Here we test that the parser is able to recover in a situation like // `for ( $pat in $expr )` since that is familiar syntax in other languages. // Instead we suggest that the user writes `for $pat in $expr`. diff --git a/tests/ui/parser/recover/recover-for-loop-parens-around-head.rs b/tests/ui/parser/recover/recover-for-loop-parens-around-head.rs index b1716900c49..a8bad49fffc 100644 --- a/tests/ui/parser/recover/recover-for-loop-parens-around-head.rs +++ b/tests/ui/parser/recover/recover-for-loop-parens-around-head.rs @@ -1,4 +1,4 @@ -// run-rustfix +//@ run-rustfix // Here we test that the parser is able to recover in a situation like // `for ( $pat in $expr )` since that is familiar syntax in other languages. // Instead we suggest that the user writes `for $pat in $expr`. diff --git a/tests/ui/parser/recover/recover-labeled-non-block-expr.fixed b/tests/ui/parser/recover/recover-labeled-non-block-expr.fixed index c2e76444d11..d8ebe0869f8 100644 --- a/tests/ui/parser/recover/recover-labeled-non-block-expr.fixed +++ b/tests/ui/parser/recover/recover-labeled-non-block-expr.fixed @@ -1,4 +1,4 @@ -// run-rustfix +//@ run-rustfix fn main() { let _ = 1 + 1; //~ ERROR expected `while`, `for`, `loop` or `{` after a label diff --git a/tests/ui/parser/recover/recover-labeled-non-block-expr.rs b/tests/ui/parser/recover/recover-labeled-non-block-expr.rs index fc11c646a8c..062e39643ca 100644 --- a/tests/ui/parser/recover/recover-labeled-non-block-expr.rs +++ b/tests/ui/parser/recover/recover-labeled-non-block-expr.rs @@ -1,4 +1,4 @@ -// run-rustfix +//@ run-rustfix fn main() { let _ = 'label: 1 + 1; //~ ERROR expected `while`, `for`, `loop` or `{` after a label diff --git a/tests/ui/parser/recover/recover-missing-semi-before-item.fixed b/tests/ui/parser/recover/recover-missing-semi-before-item.fixed index acb846373cb..6f85452c6fb 100644 --- a/tests/ui/parser/recover/recover-missing-semi-before-item.fixed +++ b/tests/ui/parser/recover/recover-missing-semi-before-item.fixed @@ -1,4 +1,4 @@ -// run-rustfix +//@ run-rustfix #![allow(unused_variables, dead_code, unused_imports)] diff --git a/tests/ui/parser/recover/recover-missing-semi-before-item.rs b/tests/ui/parser/recover/recover-missing-semi-before-item.rs index ef6cfe3c4ed..f75945b55c2 100644 --- a/tests/ui/parser/recover/recover-missing-semi-before-item.rs +++ b/tests/ui/parser/recover/recover-missing-semi-before-item.rs @@ -1,4 +1,4 @@ -// run-rustfix +//@ run-rustfix #![allow(unused_variables, dead_code, unused_imports)] diff --git a/tests/ui/parser/recover/recover-parens-around-match-arm-head.fixed b/tests/ui/parser/recover/recover-parens-around-match-arm-head.fixed index 6b9b7fa882a..7e0194d5115 100644 --- a/tests/ui/parser/recover/recover-parens-around-match-arm-head.fixed +++ b/tests/ui/parser/recover/recover-parens-around-match-arm-head.fixed @@ -1,4 +1,4 @@ -// run-rustfix +//@ run-rustfix fn main() { let val = 42; let x = match val { diff --git a/tests/ui/parser/recover/recover-parens-around-match-arm-head.rs b/tests/ui/parser/recover/recover-parens-around-match-arm-head.rs index f523581e2da..d208bc7150d 100644 --- a/tests/ui/parser/recover/recover-parens-around-match-arm-head.rs +++ b/tests/ui/parser/recover/recover-parens-around-match-arm-head.rs @@ -1,4 +1,4 @@ -// run-rustfix +//@ run-rustfix fn main() { let val = 42; let x = match val { diff --git a/tests/ui/parser/recover/recover-unticked-labels.fixed b/tests/ui/parser/recover/recover-unticked-labels.fixed index 159d995b8da..f003550cbc2 100644 --- a/tests/ui/parser/recover/recover-unticked-labels.fixed +++ b/tests/ui/parser/recover/recover-unticked-labels.fixed @@ -1,4 +1,4 @@ -// run-rustfix +//@ run-rustfix fn main() { 'label: loop { break 'label }; //~ error: cannot find value `label` in this scope diff --git a/tests/ui/parser/recover/recover-unticked-labels.rs b/tests/ui/parser/recover/recover-unticked-labels.rs index 56034de6844..2b864f16b84 100644 --- a/tests/ui/parser/recover/recover-unticked-labels.rs +++ b/tests/ui/parser/recover/recover-unticked-labels.rs @@ -1,4 +1,4 @@ -// run-rustfix +//@ run-rustfix fn main() { 'label: loop { break label }; //~ error: cannot find value `label` in this scope diff --git a/tests/ui/parser/recover/recover-where-clause-before-tuple-struct-body-0.fixed b/tests/ui/parser/recover/recover-where-clause-before-tuple-struct-body-0.fixed index a09ff3e5417..a851300a982 100644 --- a/tests/ui/parser/recover/recover-where-clause-before-tuple-struct-body-0.fixed +++ b/tests/ui/parser/recover/recover-where-clause-before-tuple-struct-body-0.fixed @@ -1,5 +1,5 @@ // Regression test for issues #100790 and #106439. -// run-rustfix +//@ run-rustfix pub struct Example(#[allow(dead_code)] usize) where diff --git a/tests/ui/parser/recover/recover-where-clause-before-tuple-struct-body-0.rs b/tests/ui/parser/recover/recover-where-clause-before-tuple-struct-body-0.rs index e86f2a8acb8..10f435859f1 100644 --- a/tests/ui/parser/recover/recover-where-clause-before-tuple-struct-body-0.rs +++ b/tests/ui/parser/recover/recover-where-clause-before-tuple-struct-body-0.rs @@ -1,5 +1,5 @@ // Regression test for issues #100790 and #106439. -// run-rustfix +//@ run-rustfix pub struct Example where diff --git a/tests/ui/parser/removed-syntax/removed-syntax-box.fixed b/tests/ui/parser/removed-syntax/removed-syntax-box.fixed index 09d1304b775..8aec8c4cc43 100644 --- a/tests/ui/parser/removed-syntax/removed-syntax-box.fixed +++ b/tests/ui/parser/removed-syntax/removed-syntax-box.fixed @@ -1,4 +1,4 @@ -// run-rustfix +//@ run-rustfix fn main() { #[allow(dead_code)] diff --git a/tests/ui/parser/removed-syntax/removed-syntax-box.rs b/tests/ui/parser/removed-syntax/removed-syntax-box.rs index 1f5061b02c7..b77880e3755 100644 --- a/tests/ui/parser/removed-syntax/removed-syntax-box.rs +++ b/tests/ui/parser/removed-syntax/removed-syntax-box.rs @@ -1,4 +1,4 @@ -// run-rustfix +//@ run-rustfix fn main() { #[allow(dead_code)] diff --git a/tests/ui/parser/self-param-syntactic-pass.rs b/tests/ui/parser/self-param-syntactic-pass.rs index d7bb7863c07..c7fdc529716 100644 --- a/tests/ui/parser/self-param-syntactic-pass.rs +++ b/tests/ui/parser/self-param-syntactic-pass.rs @@ -1,7 +1,7 @@ // This test ensures that `self` is syntactically accepted in all places an `FnDecl` is parsed. // FIXME(Centril): For now closures are an exception. -// check-pass +//@ check-pass fn main() {} diff --git a/tests/ui/parser/semi-after-closure-in-macro.rs b/tests/ui/parser/semi-after-closure-in-macro.rs index 14efb6100b0..1eeb04b8833 100644 --- a/tests/ui/parser/semi-after-closure-in-macro.rs +++ b/tests/ui/parser/semi-after-closure-in-macro.rs @@ -1,4 +1,4 @@ -// check-pass +//@ check-pass // Checks that the fix in #103222 doesn't also disqualify semicolons after // closures within parentheses *in macros*, where they're totally allowed. diff --git a/tests/ui/parser/shebang/multiline-attrib.rs b/tests/ui/parser/shebang/multiline-attrib.rs index 931c94c7fba..bb083610e55 100644 --- a/tests/ui/parser/shebang/multiline-attrib.rs +++ b/tests/ui/parser/shebang/multiline-attrib.rs @@ -1,6 +1,6 @@ #! [allow(unused_variables)] -// check-pass +//@ check-pass fn main() { let x = 5; diff --git a/tests/ui/parser/shebang/regular-attrib.rs b/tests/ui/parser/shebang/regular-attrib.rs index ca8fb0830ff..aed633d3ef1 100644 --- a/tests/ui/parser/shebang/regular-attrib.rs +++ b/tests/ui/parser/shebang/regular-attrib.rs @@ -1,5 +1,5 @@ #![allow(unused_variables)] -// check-pass +//@ check-pass fn main() { let x = 5; } diff --git a/tests/ui/parser/shebang/shebang-and-attrib.rs b/tests/ui/parser/shebang/shebang-and-attrib.rs index 61b89c655a3..a66c10db532 100644 --- a/tests/ui/parser/shebang/shebang-and-attrib.rs +++ b/tests/ui/parser/shebang/shebang-and-attrib.rs @@ -1,6 +1,6 @@ #!/usr/bin/env run-cargo-script -// check-pass +//@ check-pass #![allow(unused_variables)] diff --git a/tests/ui/parser/shebang/shebang-comment.rs b/tests/ui/parser/shebang/shebang-comment.rs index 2b1ab0c574d..37bcac8b29e 100644 --- a/tests/ui/parser/shebang/shebang-comment.rs +++ b/tests/ui/parser/shebang/shebang-comment.rs @@ -1,6 +1,6 @@ #!//bin/bash -// check-pass +//@ check-pass fn main() { println!("a valid shebang (that is also a rust comment)") } diff --git a/tests/ui/parser/shebang/shebang-empty.rs b/tests/ui/parser/shebang/shebang-empty.rs index e38cc637e94..bb0df599783 100644 --- a/tests/ui/parser/shebang/shebang-empty.rs +++ b/tests/ui/parser/shebang/shebang-empty.rs @@ -1,4 +1,4 @@ #! -// check-pass +//@ check-pass fn main() {} diff --git a/tests/ui/parser/shebang/shebang-space.rs b/tests/ui/parser/shebang/shebang-space.rs index 0978b759d2a..cc58eed8b8a 100644 --- a/tests/ui/parser/shebang/shebang-space.rs +++ b/tests/ui/parser/shebang/shebang-space.rs @@ -1,5 +1,5 @@ #! -// check-pass +//@ check-pass // ignore-tidy-end-whitespace fn main() {} diff --git a/tests/ui/parser/shebang/sneaky-attrib.rs b/tests/ui/parser/shebang/sneaky-attrib.rs index b406cc3aa13..eb814c6af24 100644 --- a/tests/ui/parser/shebang/sneaky-attrib.rs +++ b/tests/ui/parser/shebang/sneaky-attrib.rs @@ -10,7 +10,7 @@ [allow(unused_variables)] -// check-pass +//@ check-pass fn main() { let x = 5; } diff --git a/tests/ui/parser/shebang/valid-shebang.rs b/tests/ui/parser/shebang/valid-shebang.rs index e480d3da3fc..e59d4074ddf 100644 --- a/tests/ui/parser/shebang/valid-shebang.rs +++ b/tests/ui/parser/shebang/valid-shebang.rs @@ -1,6 +1,6 @@ #!/usr/bin/env run-cargo-script -// check-pass +//@ check-pass fn main() { println!("Hello World!"); } diff --git a/tests/ui/parser/slowparse-bstring.rs b/tests/ui/parser/slowparse-bstring.rs index f3a6a668372..facfa8bb852 100644 --- a/tests/ui/parser/slowparse-bstring.rs +++ b/tests/ui/parser/slowparse-bstring.rs @@ -1,4 +1,4 @@ -// run-pass +//@ run-pass // ignore-tidy-linelength // Issue #16624 diff --git a/tests/ui/parser/slowparse-string.rs b/tests/ui/parser/slowparse-string.rs index 6ebc61dae78..977aa7c8766 100644 --- a/tests/ui/parser/slowparse-string.rs +++ b/tests/ui/parser/slowparse-string.rs @@ -1,4 +1,4 @@ -// run-pass +//@ run-pass // ignore-tidy-linelength // Issue #16624 diff --git a/tests/ui/parser/stripped-nested-outline-mod-pass.rs b/tests/ui/parser/stripped-nested-outline-mod-pass.rs index 1b4669a439f..8909d8ae0eb 100644 --- a/tests/ui/parser/stripped-nested-outline-mod-pass.rs +++ b/tests/ui/parser/stripped-nested-outline-mod-pass.rs @@ -1,7 +1,7 @@ // Expansion drives parsing, so conditional compilation will strip // out outline modules and we will never attempt parsing them. -// check-pass +//@ check-pass fn main() {} diff --git a/tests/ui/parser/struct-default-values-and-missing-field-separator.fixed b/tests/ui/parser/struct-default-values-and-missing-field-separator.fixed index 28191b82621..be6ed053c6e 100644 --- a/tests/ui/parser/struct-default-values-and-missing-field-separator.fixed +++ b/tests/ui/parser/struct-default-values-and-missing-field-separator.fixed @@ -1,4 +1,4 @@ -// run-rustfix +//@ run-rustfix #![allow(dead_code)] enum E { diff --git a/tests/ui/parser/struct-default-values-and-missing-field-separator.rs b/tests/ui/parser/struct-default-values-and-missing-field-separator.rs index 924cb08a990..7900d397a5d 100644 --- a/tests/ui/parser/struct-default-values-and-missing-field-separator.rs +++ b/tests/ui/parser/struct-default-values-and-missing-field-separator.rs @@ -1,4 +1,4 @@ -// run-rustfix +//@ run-rustfix #![allow(dead_code)] enum E { diff --git a/tests/ui/parser/struct-filed-with-attr.fixed b/tests/ui/parser/struct-filed-with-attr.fixed index a799ec8ca2e..38ae446166a 100644 --- a/tests/ui/parser/struct-filed-with-attr.fixed +++ b/tests/ui/parser/struct-filed-with-attr.fixed @@ -1,5 +1,5 @@ // Issue: 100461, Try to give a helpful diagnostic even when the next struct field has an attribute. -// run-rustfix +//@ run-rustfix struct Feelings { owo: bool, diff --git a/tests/ui/parser/struct-filed-with-attr.rs b/tests/ui/parser/struct-filed-with-attr.rs index bfc78e15b5b..f8eac6251e2 100644 --- a/tests/ui/parser/struct-filed-with-attr.rs +++ b/tests/ui/parser/struct-filed-with-attr.rs @@ -1,5 +1,5 @@ // Issue: 100461, Try to give a helpful diagnostic even when the next struct field has an attribute. -// run-rustfix +//@ run-rustfix struct Feelings { owo: bool diff --git a/tests/ui/parser/struct-literal-in-match-guard.rs b/tests/ui/parser/struct-literal-in-match-guard.rs index bbee60e2817..ced01e08621 100644 --- a/tests/ui/parser/struct-literal-in-match-guard.rs +++ b/tests/ui/parser/struct-literal-in-match-guard.rs @@ -1,4 +1,4 @@ -// check-pass +//@ check-pass // Unlike `if` condition, `match` guards accept struct literals. // This is detected in . diff --git a/tests/ui/parser/suggest-assoc-const.fixed b/tests/ui/parser/suggest-assoc-const.fixed index 4229135ebb2..de7f2cbaaba 100644 --- a/tests/ui/parser/suggest-assoc-const.fixed +++ b/tests/ui/parser/suggest-assoc-const.fixed @@ -1,5 +1,5 @@ // Issue: 101797, Suggest associated const for incorrect use of let in traits -// run-rustfix +//@ run-rustfix #![allow(dead_code)] trait Trait { const _X: i32; diff --git a/tests/ui/parser/suggest-assoc-const.rs b/tests/ui/parser/suggest-assoc-const.rs index 0cf695bd40a..6d0244130a9 100644 --- a/tests/ui/parser/suggest-assoc-const.rs +++ b/tests/ui/parser/suggest-assoc-const.rs @@ -1,5 +1,5 @@ // Issue: 101797, Suggest associated const for incorrect use of let in traits -// run-rustfix +//@ run-rustfix #![allow(dead_code)] trait Trait { let _X: i32; diff --git a/tests/ui/parser/suggest-removing-semicolon-after-impl-trait-items.fixed b/tests/ui/parser/suggest-removing-semicolon-after-impl-trait-items.fixed index 81ee6cdf0a7..e8785eea307 100644 --- a/tests/ui/parser/suggest-removing-semicolon-after-impl-trait-items.fixed +++ b/tests/ui/parser/suggest-removing-semicolon-after-impl-trait-items.fixed @@ -1,4 +1,4 @@ -// run-rustfix +//@ run-rustfix #![allow(dead_code)] trait Foo { diff --git a/tests/ui/parser/suggest-removing-semicolon-after-impl-trait-items.rs b/tests/ui/parser/suggest-removing-semicolon-after-impl-trait-items.rs index c8f525fc4f0..c5d7fa6412e 100644 --- a/tests/ui/parser/suggest-removing-semicolon-after-impl-trait-items.rs +++ b/tests/ui/parser/suggest-removing-semicolon-after-impl-trait-items.rs @@ -1,4 +1,4 @@ -// run-rustfix +//@ run-rustfix #![allow(dead_code)] trait Foo { diff --git a/tests/ui/parser/suggest-semicolon-before-array.fixed b/tests/ui/parser/suggest-semicolon-before-array.fixed index a06b58b2740..219e2ae28b2 100644 --- a/tests/ui/parser/suggest-semicolon-before-array.fixed +++ b/tests/ui/parser/suggest-semicolon-before-array.fixed @@ -1,4 +1,4 @@ -// run-rustfix +//@ run-rustfix #![allow(dead_code)] fn foo() {} diff --git a/tests/ui/parser/suggest-semicolon-before-array.rs b/tests/ui/parser/suggest-semicolon-before-array.rs index f601ca2aef5..382769b84c8 100644 --- a/tests/ui/parser/suggest-semicolon-before-array.rs +++ b/tests/ui/parser/suggest-semicolon-before-array.rs @@ -1,4 +1,4 @@ -// run-rustfix +//@ run-rustfix #![allow(dead_code)] fn foo() {} diff --git a/tests/ui/parser/suggest_misplaced_generics/enum.fixed b/tests/ui/parser/suggest_misplaced_generics/enum.fixed index 3332118a1e7..cd9b70323ff 100644 --- a/tests/ui/parser/suggest_misplaced_generics/enum.fixed +++ b/tests/ui/parser/suggest_misplaced_generics/enum.fixed @@ -1,5 +1,5 @@ // Issue: 103366 , Suggest fix for misplaced generic params -// run-rustfix +//@ run-rustfix #[allow(unused)] enum Foo { Variant(T) } diff --git a/tests/ui/parser/suggest_misplaced_generics/enum.rs b/tests/ui/parser/suggest_misplaced_generics/enum.rs index 5a2289c5c5a..e456347d01e 100644 --- a/tests/ui/parser/suggest_misplaced_generics/enum.rs +++ b/tests/ui/parser/suggest_misplaced_generics/enum.rs @@ -1,5 +1,5 @@ // Issue: 103366 , Suggest fix for misplaced generic params -// run-rustfix +//@ run-rustfix #[allow(unused)] enum Foo { Variant(T) } diff --git a/tests/ui/parser/suggest_misplaced_generics/fn-complex-generics.fixed b/tests/ui/parser/suggest_misplaced_generics/fn-complex-generics.fixed index 84bf64bd63c..311be359fe9 100644 --- a/tests/ui/parser/suggest_misplaced_generics/fn-complex-generics.fixed +++ b/tests/ui/parser/suggest_misplaced_generics/fn-complex-generics.fixed @@ -1,5 +1,5 @@ // Issue: 103366 , Suggest fix for misplaced generic params -// run-rustfix +//@ run-rustfix #[allow(unused)] fn f<'a, B: 'a + std::ops::Add>(_x: B) { } diff --git a/tests/ui/parser/suggest_misplaced_generics/fn-complex-generics.rs b/tests/ui/parser/suggest_misplaced_generics/fn-complex-generics.rs index d0684397e74..9af1206a24b 100644 --- a/tests/ui/parser/suggest_misplaced_generics/fn-complex-generics.rs +++ b/tests/ui/parser/suggest_misplaced_generics/fn-complex-generics.rs @@ -1,5 +1,5 @@ // Issue: 103366 , Suggest fix for misplaced generic params -// run-rustfix +//@ run-rustfix #[allow(unused)] fn<'a, B: 'a + std::ops::Add> f(_x: B) { } diff --git a/tests/ui/parser/suggest_misplaced_generics/fn-simple.fixed b/tests/ui/parser/suggest_misplaced_generics/fn-simple.fixed index cbfd5f2d39c..8d319f7e612 100644 --- a/tests/ui/parser/suggest_misplaced_generics/fn-simple.fixed +++ b/tests/ui/parser/suggest_misplaced_generics/fn-simple.fixed @@ -1,5 +1,5 @@ // Issue: 103366 , Suggest fix for misplaced generic params -// run-rustfix +//@ run-rustfix #[allow(unused)] fn id(x: T) -> T { x } diff --git a/tests/ui/parser/suggest_misplaced_generics/fn-simple.rs b/tests/ui/parser/suggest_misplaced_generics/fn-simple.rs index b207cf70d85..c8503473b56 100644 --- a/tests/ui/parser/suggest_misplaced_generics/fn-simple.rs +++ b/tests/ui/parser/suggest_misplaced_generics/fn-simple.rs @@ -1,5 +1,5 @@ // Issue: 103366 , Suggest fix for misplaced generic params -// run-rustfix +//@ run-rustfix #[allow(unused)] fn id(x: T) -> T { x } diff --git a/tests/ui/parser/suggest_misplaced_generics/struct.fixed b/tests/ui/parser/suggest_misplaced_generics/struct.fixed index fec05bdeca1..65d26601e10 100644 --- a/tests/ui/parser/suggest_misplaced_generics/struct.fixed +++ b/tests/ui/parser/suggest_misplaced_generics/struct.fixed @@ -1,5 +1,5 @@ // Issue: 103366 , Suggest fix for misplaced generic params -// run-rustfix +//@ run-rustfix #[allow(unused)] struct Foo { x: T } diff --git a/tests/ui/parser/suggest_misplaced_generics/struct.rs b/tests/ui/parser/suggest_misplaced_generics/struct.rs index 6b80150d546..013ba6e3ce5 100644 --- a/tests/ui/parser/suggest_misplaced_generics/struct.rs +++ b/tests/ui/parser/suggest_misplaced_generics/struct.rs @@ -1,5 +1,5 @@ // Issue: 103366 , Suggest fix for misplaced generic params -// run-rustfix +//@ run-rustfix #[allow(unused)] struct Foo { x: T } diff --git a/tests/ui/parser/suggest_misplaced_generics/trait.fixed b/tests/ui/parser/suggest_misplaced_generics/trait.fixed index a471a078af1..1a848ccf7f2 100644 --- a/tests/ui/parser/suggest_misplaced_generics/trait.fixed +++ b/tests/ui/parser/suggest_misplaced_generics/trait.fixed @@ -1,5 +1,5 @@ // Issue: 103366 , Suggest fix for misplaced generic params -// run-rustfix +//@ run-rustfix #[allow(unused)] trait Foo { diff --git a/tests/ui/parser/suggest_misplaced_generics/trait.rs b/tests/ui/parser/suggest_misplaced_generics/trait.rs index 55355f451f9..a6b843c6cf6 100644 --- a/tests/ui/parser/suggest_misplaced_generics/trait.rs +++ b/tests/ui/parser/suggest_misplaced_generics/trait.rs @@ -1,5 +1,5 @@ // Issue: 103366 , Suggest fix for misplaced generic params -// run-rustfix +//@ run-rustfix #[allow(unused)] trait Foo { diff --git a/tests/ui/parser/suggest_misplaced_generics/type.fixed b/tests/ui/parser/suggest_misplaced_generics/type.fixed index a97b9e66d0b..7aa223f2125 100644 --- a/tests/ui/parser/suggest_misplaced_generics/type.fixed +++ b/tests/ui/parser/suggest_misplaced_generics/type.fixed @@ -1,5 +1,5 @@ // Issue: 103366 , Suggest fix for misplaced generic params -// run-rustfix +//@ run-rustfix #[allow(unused)] type Foo = T; diff --git a/tests/ui/parser/suggest_misplaced_generics/type.rs b/tests/ui/parser/suggest_misplaced_generics/type.rs index 17e200536fa..db0d8dd22b1 100644 --- a/tests/ui/parser/suggest_misplaced_generics/type.rs +++ b/tests/ui/parser/suggest_misplaced_generics/type.rs @@ -1,5 +1,5 @@ // Issue: 103366 , Suggest fix for misplaced generic params -// run-rustfix +//@ run-rustfix #[allow(unused)] type Foo = T; diff --git a/tests/ui/parser/trailing-plus-in-bounds.rs b/tests/ui/parser/trailing-plus-in-bounds.rs index 400649bcf75..ef9bdadb282 100644 --- a/tests/ui/parser/trailing-plus-in-bounds.rs +++ b/tests/ui/parser/trailing-plus-in-bounds.rs @@ -1,4 +1,4 @@ -// check-pass +//@ check-pass #![allow(bare_trait_objects)] diff --git a/tests/ui/parser/trailing-question-in-type.fixed b/tests/ui/parser/trailing-question-in-type.fixed index 6ea24484e03..47ae66ac677 100644 --- a/tests/ui/parser/trailing-question-in-type.fixed +++ b/tests/ui/parser/trailing-question-in-type.fixed @@ -1,4 +1,4 @@ -// run-rustfix +//@ run-rustfix fn foo() -> Option { //~ ERROR invalid `?` in type let x: Option = Some(1); //~ ERROR invalid `?` in type diff --git a/tests/ui/parser/trailing-question-in-type.rs b/tests/ui/parser/trailing-question-in-type.rs index b1c508365cf..4432ec9380c 100644 --- a/tests/ui/parser/trailing-question-in-type.rs +++ b/tests/ui/parser/trailing-question-in-type.rs @@ -1,4 +1,4 @@ -// run-rustfix +//@ run-rustfix fn foo() -> i32? { //~ ERROR invalid `?` in type let x: i32? = Some(1); //~ ERROR invalid `?` in type diff --git a/tests/ui/parser/trait-item-with-defaultness-pass.rs b/tests/ui/parser/trait-item-with-defaultness-pass.rs index a6318bd99e2..c636342f6ca 100644 --- a/tests/ui/parser/trait-item-with-defaultness-pass.rs +++ b/tests/ui/parser/trait-item-with-defaultness-pass.rs @@ -1,4 +1,4 @@ -// check-pass +//@ check-pass fn main() {} diff --git a/tests/ui/parser/trait-object-delimiters.rs b/tests/ui/parser/trait-object-delimiters.rs index 240ae3084d6..84cd16c2796 100644 --- a/tests/ui/parser/trait-object-delimiters.rs +++ b/tests/ui/parser/trait-object-delimiters.rs @@ -1,4 +1,4 @@ -// edition:2018 +//@ edition:2018 fn foo1(_: &dyn Drop + AsRef) {} //~ ERROR ambiguous `+` in a type //~^ ERROR only auto traits can be used as additional traits in a trait object diff --git a/tests/ui/parser/trait-plusequal-splitting.rs b/tests/ui/parser/trait-plusequal-splitting.rs index 6ca6774507b..2824da50d0f 100644 --- a/tests/ui/parser/trait-plusequal-splitting.rs +++ b/tests/ui/parser/trait-plusequal-splitting.rs @@ -1,6 +1,6 @@ // Fixes issue where `+` in generics weren't parsed if they were part of a `+=`. -// check-pass +//@ check-pass struct Whitespace { t: T } struct TokenSplit { t: T } diff --git a/tests/ui/parser/try-with-nonterminal-block.rs b/tests/ui/parser/try-with-nonterminal-block.rs index 2a9652f2e6d..bc52dcd0e01 100644 --- a/tests/ui/parser/try-with-nonterminal-block.rs +++ b/tests/ui/parser/try-with-nonterminal-block.rs @@ -1,5 +1,5 @@ -// check-pass -// edition:2021 +//@ check-pass +//@ edition:2021 #![feature(try_blocks)] diff --git a/tests/ui/parser/unbalanced-doublequote.rs b/tests/ui/parser/unbalanced-doublequote.rs index f2131620537..d9c936186ea 100644 --- a/tests/ui/parser/unbalanced-doublequote.rs +++ b/tests/ui/parser/unbalanced-doublequote.rs @@ -1,4 +1,4 @@ -// error-pattern: unterminated double quote string +//@ error-pattern: unterminated double quote string fn main() { diff --git a/tests/ui/parser/unicode-character-literal.fixed b/tests/ui/parser/unicode-character-literal.fixed index 26ef5ffa11a..9e31890151c 100644 --- a/tests/ui/parser/unicode-character-literal.fixed +++ b/tests/ui/parser/unicode-character-literal.fixed @@ -1,7 +1,7 @@ // Regression test for #88684: Improve diagnostics for combining marks // in character literals. -// run-rustfix +//@ run-rustfix fn main() { let _spade = "ā™ ļø"; diff --git a/tests/ui/parser/unicode-character-literal.rs b/tests/ui/parser/unicode-character-literal.rs index d331522c04c..d886e5b26a5 100644 --- a/tests/ui/parser/unicode-character-literal.rs +++ b/tests/ui/parser/unicode-character-literal.rs @@ -1,7 +1,7 @@ // Regression test for #88684: Improve diagnostics for combining marks // in character literals. -// run-rustfix +//@ run-rustfix fn main() { let _spade = 'ā™ ļø'; diff --git a/tests/ui/parser/use-unclosed-brace.rs b/tests/ui/parser/use-unclosed-brace.rs index fcfe95b26f9..6679651fe47 100644 --- a/tests/ui/parser/use-unclosed-brace.rs +++ b/tests/ui/parser/use-unclosed-brace.rs @@ -1,4 +1,4 @@ -// error-pattern: this file contains an unclosed delimiter +//@ error-pattern: this file contains an unclosed delimiter use foo::{bar, baz; use std::fmt::Display; diff --git a/tests/ui/parser/utf16-be-without-bom.rs b/tests/ui/parser/utf16-be-without-bom.rs index 22aa1971787..68e89bc7c22 100644 Binary files a/tests/ui/parser/utf16-be-without-bom.rs and b/tests/ui/parser/utf16-be-without-bom.rs differ diff --git a/tests/ui/parser/utf16-le-without-bom.rs b/tests/ui/parser/utf16-le-without-bom.rs index 3c1049929e1..bdf4860d016 100644 Binary files a/tests/ui/parser/utf16-le-without-bom.rs and b/tests/ui/parser/utf16-le-without-bom.rs differ diff --git a/tests/ui/parser/utf8_idents-rpass.rs b/tests/ui/parser/utf8_idents-rpass.rs index 206744a58fd..f485f157328 100644 --- a/tests/ui/parser/utf8_idents-rpass.rs +++ b/tests/ui/parser/utf8_idents-rpass.rs @@ -1,4 +1,4 @@ -// run-pass +//@ run-pass // #![allow(non_snake_case)] diff --git a/tests/ui/parser/variadic-ffi-syntactic-pass.rs b/tests/ui/parser/variadic-ffi-syntactic-pass.rs index 3875d6af137..da81f136216 100644 --- a/tests/ui/parser/variadic-ffi-syntactic-pass.rs +++ b/tests/ui/parser/variadic-ffi-syntactic-pass.rs @@ -1,4 +1,4 @@ -// check-pass +//@ check-pass fn main() {} diff --git a/tests/ui/path-lookahead.fixed b/tests/ui/path-lookahead.fixed index 928955630e9..440b22edd7d 100644 --- a/tests/ui/path-lookahead.fixed +++ b/tests/ui/path-lookahead.fixed @@ -1,5 +1,5 @@ -// run-pass -// run-rustfix +//@ run-pass +//@ run-rustfix #![allow(dead_code)] #![warn(unused_parens)] diff --git a/tests/ui/path-lookahead.rs b/tests/ui/path-lookahead.rs index d05c75fe8d8..7eaacd6bba7 100644 --- a/tests/ui/path-lookahead.rs +++ b/tests/ui/path-lookahead.rs @@ -1,5 +1,5 @@ -// run-pass -// run-rustfix +//@ run-pass +//@ run-rustfix #![allow(dead_code)] #![warn(unused_parens)] diff --git a/tests/ui/path.rs b/tests/ui/path.rs index 4c137de82d0..cd6962ac3e0 100644 --- a/tests/ui/path.rs +++ b/tests/ui/path.rs @@ -1,5 +1,5 @@ -// run-pass -// pretty-expanded FIXME #23616 +//@ run-pass +//@ pretty-expanded FIXME #23616 mod foo { pub fn bar(_offset: usize) { } diff --git a/tests/ui/paths-containing-nul.rs b/tests/ui/paths-containing-nul.rs index cb40c4f6fbf..23ea84bc33f 100644 --- a/tests/ui/paths-containing-nul.rs +++ b/tests/ui/paths-containing-nul.rs @@ -1,9 +1,9 @@ -// run-pass +//@ run-pass #![allow(deprecated)] -// ignore-wasm32-bare no files or I/O -// ignore-emscripten no files -// ignore-sgx no files +//@ ignore-wasm32-bare no files or I/O +//@ ignore-emscripten no files +//@ ignore-sgx no files use std::fs; use std::io; diff --git a/tests/ui/pattern/bindings-after-at/bind-by-copy.rs b/tests/ui/pattern/bindings-after-at/bind-by-copy.rs index 253b2d88901..3d26b5e87d9 100644 --- a/tests/ui/pattern/bindings-after-at/bind-by-copy.rs +++ b/tests/ui/pattern/bindings-after-at/bind-by-copy.rs @@ -1,4 +1,4 @@ -// run-pass +//@ run-pass #![allow(unused)] // Test copy diff --git a/tests/ui/pattern/bindings-after-at/borrowck-pat-at-and-box-pass.rs b/tests/ui/pattern/bindings-after-at/borrowck-pat-at-and-box-pass.rs index 43b53b7cf1f..d06733bb344 100644 --- a/tests/ui/pattern/bindings-after-at/borrowck-pat-at-and-box-pass.rs +++ b/tests/ui/pattern/bindings-after-at/borrowck-pat-at-and-box-pass.rs @@ -1,4 +1,4 @@ -// check-pass +//@ check-pass // Test `@` patterns combined with `box` patterns. diff --git a/tests/ui/pattern/bindings-after-at/borrowck-pat-by-copy-bindings-in-at.rs b/tests/ui/pattern/bindings-after-at/borrowck-pat-by-copy-bindings-in-at.rs index 1df51c0edd9..1572747aaf8 100644 --- a/tests/ui/pattern/bindings-after-at/borrowck-pat-by-copy-bindings-in-at.rs +++ b/tests/ui/pattern/bindings-after-at/borrowck-pat-by-copy-bindings-in-at.rs @@ -1,4 +1,4 @@ -// check-pass +//@ check-pass // Test `Copy` bindings in the rhs of `@` patterns. diff --git a/tests/ui/pattern/bindings-after-at/borrowck-pat-ref-both-sides.rs b/tests/ui/pattern/bindings-after-at/borrowck-pat-ref-both-sides.rs index df213f688c2..1dda9e6a9b2 100644 --- a/tests/ui/pattern/bindings-after-at/borrowck-pat-ref-both-sides.rs +++ b/tests/ui/pattern/bindings-after-at/borrowck-pat-ref-both-sides.rs @@ -1,4 +1,4 @@ -// check-pass +//@ check-pass // Test that `ref` patterns may be used on both sides // of an `@` pattern according to NLL borrowck. diff --git a/tests/ui/pattern/bindings-after-at/box-patterns.rs b/tests/ui/pattern/bindings-after-at/box-patterns.rs index 9db37253c53..57110b0439a 100644 --- a/tests/ui/pattern/bindings-after-at/box-patterns.rs +++ b/tests/ui/pattern/bindings-after-at/box-patterns.rs @@ -1,6 +1,6 @@ // Test bindings-after-at with box-patterns -// run-pass +//@ run-pass #![feature(box_patterns)] diff --git a/tests/ui/pattern/bindings-after-at/nested-binding-mode-lint.rs b/tests/ui/pattern/bindings-after-at/nested-binding-mode-lint.rs index fe7d1eba1d9..b445e851634 100644 --- a/tests/ui/pattern/bindings-after-at/nested-binding-mode-lint.rs +++ b/tests/ui/pattern/bindings-after-at/nested-binding-mode-lint.rs @@ -1,4 +1,4 @@ -// check-pass +//@ check-pass #![deny(unused_mut)] diff --git a/tests/ui/pattern/bindings-after-at/nested-patterns.rs b/tests/ui/pattern/bindings-after-at/nested-patterns.rs index f06563d56cb..25537f0dd19 100644 --- a/tests/ui/pattern/bindings-after-at/nested-patterns.rs +++ b/tests/ui/pattern/bindings-after-at/nested-patterns.rs @@ -1,4 +1,4 @@ -// run-pass +//@ run-pass struct A { a: u8, b: u8 } diff --git a/tests/ui/pattern/bindings-after-at/or-patterns-box-patterns.rs b/tests/ui/pattern/bindings-after-at/or-patterns-box-patterns.rs index 383e377a5eb..f6c285634c0 100644 --- a/tests/ui/pattern/bindings-after-at/or-patterns-box-patterns.rs +++ b/tests/ui/pattern/bindings-after-at/or-patterns-box-patterns.rs @@ -1,6 +1,6 @@ // Test bindings-after-at with or-patterns and box-patterns -// run-pass +//@ run-pass #![feature(box_patterns)] diff --git a/tests/ui/pattern/bindings-after-at/or-patterns-slice-patterns.rs b/tests/ui/pattern/bindings-after-at/or-patterns-slice-patterns.rs index d315f7ee3b6..82e3f596e3e 100644 --- a/tests/ui/pattern/bindings-after-at/or-patterns-slice-patterns.rs +++ b/tests/ui/pattern/bindings-after-at/or-patterns-slice-patterns.rs @@ -1,6 +1,6 @@ // Test bindings-after-at with or-patterns and slice-patterns -// run-pass +//@ run-pass #[derive(Debug, PartialEq)] diff --git a/tests/ui/pattern/bindings-after-at/or-patterns.rs b/tests/ui/pattern/bindings-after-at/or-patterns.rs index fcc36148999..360ba9d1ad2 100644 --- a/tests/ui/pattern/bindings-after-at/or-patterns.rs +++ b/tests/ui/pattern/bindings-after-at/or-patterns.rs @@ -1,6 +1,6 @@ // Test bindings-after-at with or-patterns -// run-pass +//@ run-pass #[derive(Debug, PartialEq)] diff --git a/tests/ui/pattern/bindings-after-at/slice-patterns.rs b/tests/ui/pattern/bindings-after-at/slice-patterns.rs index 4f4c96e450b..aa03269b53f 100644 --- a/tests/ui/pattern/bindings-after-at/slice-patterns.rs +++ b/tests/ui/pattern/bindings-after-at/slice-patterns.rs @@ -1,6 +1,6 @@ // Test bindings-after-at with slice-patterns -// run-pass +//@ run-pass #[derive(Debug, PartialEq)] diff --git a/tests/ui/pattern/byte-string-inference.rs b/tests/ui/pattern/byte-string-inference.rs index b1517de6b67..c49f599bc9b 100644 --- a/tests/ui/pattern/byte-string-inference.rs +++ b/tests/ui/pattern/byte-string-inference.rs @@ -1,4 +1,4 @@ -// check-pass +//@ check-pass fn load() -> Option { todo!() diff --git a/tests/ui/pattern/ignore-all-the-things.rs b/tests/ui/pattern/ignore-all-the-things.rs index 5980e1a857f..80f016b8cec 100644 --- a/tests/ui/pattern/ignore-all-the-things.rs +++ b/tests/ui/pattern/ignore-all-the-things.rs @@ -1,4 +1,4 @@ -// run-pass +//@ run-pass #![allow(non_shorthand_field_patterns)] #![allow(dead_code)] diff --git a/tests/ui/pattern/incorrect-placement-of-pattern-modifiers.fixed b/tests/ui/pattern/incorrect-placement-of-pattern-modifiers.fixed index cf6c2a24fdf..e28208fc3b4 100644 --- a/tests/ui/pattern/incorrect-placement-of-pattern-modifiers.fixed +++ b/tests/ui/pattern/incorrect-placement-of-pattern-modifiers.fixed @@ -1,4 +1,4 @@ -// run-rustfix +//@ run-rustfix struct S { field_name: (), } diff --git a/tests/ui/pattern/incorrect-placement-of-pattern-modifiers.rs b/tests/ui/pattern/incorrect-placement-of-pattern-modifiers.rs index 98772c1188e..59bc598a197 100644 --- a/tests/ui/pattern/incorrect-placement-of-pattern-modifiers.rs +++ b/tests/ui/pattern/incorrect-placement-of-pattern-modifiers.rs @@ -1,4 +1,4 @@ -// run-rustfix +//@ run-rustfix struct S { field_name: (), } diff --git a/tests/ui/pattern/integer-range-binding.rs b/tests/ui/pattern/integer-range-binding.rs index ff065882d96..a1838c0c997 100644 --- a/tests/ui/pattern/integer-range-binding.rs +++ b/tests/ui/pattern/integer-range-binding.rs @@ -1,4 +1,4 @@ -// run-pass +//@ run-pass fn main() { let -2147483648..=2147483647 = 1; diff --git a/tests/ui/pattern/issue-10392.rs b/tests/ui/pattern/issue-10392.rs index 926fa94800e..dcbe2198ec6 100644 --- a/tests/ui/pattern/issue-10392.rs +++ b/tests/ui/pattern/issue-10392.rs @@ -1,4 +1,4 @@ -// run-pass +//@ run-pass #![allow(unused_variables)] struct A { foo: isize } diff --git a/tests/ui/pattern/issue-106862.fixed b/tests/ui/pattern/issue-106862.fixed index 9b27a61ffd0..82c6e6cfac3 100644 --- a/tests/ui/pattern/issue-106862.fixed +++ b/tests/ui/pattern/issue-106862.fixed @@ -1,4 +1,4 @@ -// run-rustfix +//@ run-rustfix #![allow(unused)] diff --git a/tests/ui/pattern/issue-106862.rs b/tests/ui/pattern/issue-106862.rs index 590430a7843..7adbd384c70 100644 --- a/tests/ui/pattern/issue-106862.rs +++ b/tests/ui/pattern/issue-106862.rs @@ -1,4 +1,4 @@ -// run-rustfix +//@ run-rustfix #![allow(unused)] diff --git a/tests/ui/pattern/issue-110508.rs b/tests/ui/pattern/issue-110508.rs index 1024ff05578..6ed0476183e 100644 --- a/tests/ui/pattern/issue-110508.rs +++ b/tests/ui/pattern/issue-110508.rs @@ -1,4 +1,4 @@ -// run-pass +//@ run-pass #[derive(PartialEq, Eq)] pub enum Foo { diff --git a/tests/ui/pattern/issue-11577.rs b/tests/ui/pattern/issue-11577.rs index 70177c5ed0d..da9720b422c 100644 --- a/tests/ui/pattern/issue-11577.rs +++ b/tests/ui/pattern/issue-11577.rs @@ -1,4 +1,4 @@ -// run-pass +//@ run-pass // Destructuring struct variants would ICE where regular structs wouldn't enum Foo { diff --git a/tests/ui/pattern/issue-117626.rs b/tests/ui/pattern/issue-117626.rs index f87147a5d88..f76f6b62222 100644 --- a/tests/ui/pattern/issue-117626.rs +++ b/tests/ui/pattern/issue-117626.rs @@ -1,4 +1,4 @@ -// check-pass +//@ check-pass #[derive(PartialEq)] struct NonMatchable; diff --git a/tests/ui/pattern/issue-12582.rs b/tests/ui/pattern/issue-12582.rs index f3366704e63..2da2163726d 100644 --- a/tests/ui/pattern/issue-12582.rs +++ b/tests/ui/pattern/issue-12582.rs @@ -1,4 +1,4 @@ -// run-pass +//@ run-pass pub fn main() { let x = 1; diff --git a/tests/ui/pattern/issue-15080.rs b/tests/ui/pattern/issue-15080.rs index 4dd6981d448..0cc550bea9c 100644 --- a/tests/ui/pattern/issue-15080.rs +++ b/tests/ui/pattern/issue-15080.rs @@ -1,4 +1,4 @@ -// run-pass +//@ run-pass fn main() { let mut x: &[_] = &[1, 2, 3, 4]; diff --git a/tests/ui/pattern/issue-22546.rs b/tests/ui/pattern/issue-22546.rs index 8a0f51d0b84..fd1d5fb6c47 100644 --- a/tests/ui/pattern/issue-22546.rs +++ b/tests/ui/pattern/issue-22546.rs @@ -1,4 +1,4 @@ -// run-pass +//@ run-pass #![allow(unused_variables)] // Parsing patterns with paths with type parameters (issue #22544) diff --git a/tests/ui/pattern/issue-27320.rs b/tests/ui/pattern/issue-27320.rs index d1aa56b915b..50c3f2afe32 100644 --- a/tests/ui/pattern/issue-27320.rs +++ b/tests/ui/pattern/issue-27320.rs @@ -1,4 +1,4 @@ -// run-pass +//@ run-pass #![allow(unused_variables)] #![allow(dead_code)] diff --git a/tests/ui/pattern/issue-6449.rs b/tests/ui/pattern/issue-6449.rs index bfd4c123208..38399a18793 100644 --- a/tests/ui/pattern/issue-6449.rs +++ b/tests/ui/pattern/issue-6449.rs @@ -1,4 +1,4 @@ -// run-pass +//@ run-pass #![allow(dead_code)] enum Foo { diff --git a/tests/ui/pattern/issue-74954.rs b/tests/ui/pattern/issue-74954.rs index 269ec3c7abe..7f998d7f216 100644 --- a/tests/ui/pattern/issue-74954.rs +++ b/tests/ui/pattern/issue-74954.rs @@ -1,4 +1,4 @@ -// check-pass +//@ check-pass fn main() { if let Some([b'@', filename @ ..]) = Some(b"@abc123") { diff --git a/tests/ui/pattern/issue-8351-1.rs b/tests/ui/pattern/issue-8351-1.rs index 139f027cb90..371d6037fef 100644 --- a/tests/ui/pattern/issue-8351-1.rs +++ b/tests/ui/pattern/issue-8351-1.rs @@ -1,4 +1,4 @@ -// run-pass +//@ run-pass #![allow(dead_code)] enum E { diff --git a/tests/ui/pattern/issue-8351-2.rs b/tests/ui/pattern/issue-8351-2.rs index bc66cbb77c0..c1b839c89b5 100644 --- a/tests/ui/pattern/issue-8351-2.rs +++ b/tests/ui/pattern/issue-8351-2.rs @@ -1,4 +1,4 @@ -// run-pass +//@ run-pass #![allow(dead_code)] enum E { diff --git a/tests/ui/pattern/issue-88074-pat-range-type-inference.rs b/tests/ui/pattern/issue-88074-pat-range-type-inference.rs index 27db7d8c7ab..ce808720411 100644 --- a/tests/ui/pattern/issue-88074-pat-range-type-inference.rs +++ b/tests/ui/pattern/issue-88074-pat-range-type-inference.rs @@ -1,4 +1,4 @@ -// check-pass +//@ check-pass trait Zero { const ZERO: Self; diff --git a/tests/ui/pattern/move-ref-patterns/borrowck-move-ref-pattern-pass.rs b/tests/ui/pattern/move-ref-patterns/borrowck-move-ref-pattern-pass.rs index 204cd3e6657..72674eb40ff 100644 --- a/tests/ui/pattern/move-ref-patterns/borrowck-move-ref-pattern-pass.rs +++ b/tests/ui/pattern/move-ref-patterns/borrowck-move-ref-pattern-pass.rs @@ -1,4 +1,4 @@ -// check-pass +//@ check-pass #![allow(dropping_references)] diff --git a/tests/ui/pattern/move-ref-patterns/by-move-sub-pat-unreachable.rs b/tests/ui/pattern/move-ref-patterns/by-move-sub-pat-unreachable.rs index ff7b625a68e..b229480971d 100644 --- a/tests/ui/pattern/move-ref-patterns/by-move-sub-pat-unreachable.rs +++ b/tests/ui/pattern/move-ref-patterns/by-move-sub-pat-unreachable.rs @@ -2,7 +2,7 @@ // happen and that code is unreachable according to borrowck, we accept this code. // In particular, we want to ensure here that an ICE does not happen, which it did originally. -// check-pass +//@ check-pass fn main() { return; diff --git a/tests/ui/pattern/move-ref-patterns/issue-53840.rs b/tests/ui/pattern/move-ref-patterns/issue-53840.rs index 80effc497ed..64b6e8f2dca 100644 --- a/tests/ui/pattern/move-ref-patterns/issue-53840.rs +++ b/tests/ui/pattern/move-ref-patterns/issue-53840.rs @@ -1,4 +1,4 @@ -// check-pass +//@ check-pass enum E { Foo(String, String, String), diff --git a/tests/ui/pattern/move-ref-patterns/move-ref-patterns-closure-captures-pass.rs b/tests/ui/pattern/move-ref-patterns/move-ref-patterns-closure-captures-pass.rs index 4de1f653db0..875fe9dba89 100644 --- a/tests/ui/pattern/move-ref-patterns/move-ref-patterns-closure-captures-pass.rs +++ b/tests/ui/pattern/move-ref-patterns/move-ref-patterns-closure-captures-pass.rs @@ -1,4 +1,4 @@ -// check-pass +//@ check-pass #![allow(dropping_references)] diff --git a/tests/ui/pattern/move-ref-patterns/move-ref-patterns-default-binding-modes-fixable.fixed b/tests/ui/pattern/move-ref-patterns/move-ref-patterns-default-binding-modes-fixable.fixed index 5f04fc83d37..2a0649ba478 100644 --- a/tests/ui/pattern/move-ref-patterns/move-ref-patterns-default-binding-modes-fixable.fixed +++ b/tests/ui/pattern/move-ref-patterns/move-ref-patterns-default-binding-modes-fixable.fixed @@ -1,4 +1,4 @@ -// run-rustfix +//@ run-rustfix #![allow(unused_variables)] fn main() { struct U; diff --git a/tests/ui/pattern/move-ref-patterns/move-ref-patterns-default-binding-modes-fixable.rs b/tests/ui/pattern/move-ref-patterns/move-ref-patterns-default-binding-modes-fixable.rs index 5dc1ae2feb5..1bb6d8e15e1 100644 --- a/tests/ui/pattern/move-ref-patterns/move-ref-patterns-default-binding-modes-fixable.rs +++ b/tests/ui/pattern/move-ref-patterns/move-ref-patterns-default-binding-modes-fixable.rs @@ -1,4 +1,4 @@ -// run-rustfix +//@ run-rustfix #![allow(unused_variables)] fn main() { struct U; diff --git a/tests/ui/pattern/move-ref-patterns/move-ref-patterns-dynamic-semantics.rs b/tests/ui/pattern/move-ref-patterns/move-ref-patterns-dynamic-semantics.rs index 1d6d9acead1..62d31f54f84 100644 --- a/tests/ui/pattern/move-ref-patterns/move-ref-patterns-dynamic-semantics.rs +++ b/tests/ui/pattern/move-ref-patterns/move-ref-patterns-dynamic-semantics.rs @@ -1,4 +1,4 @@ -// run-pass +//@ run-pass // This test checks the dynamic semantics and drop order of pattern matching // where a product pattern has both a by-move and by-ref binding. diff --git a/tests/ui/pattern/non-structural-match-types.rs b/tests/ui/pattern/non-structural-match-types.rs index 552342a1d38..dde44dfee9c 100644 --- a/tests/ui/pattern/non-structural-match-types.rs +++ b/tests/ui/pattern/non-structural-match-types.rs @@ -1,4 +1,4 @@ -// edition:2021 +//@ edition:2021 #![allow(unreachable_code)] #![feature(const_async_blocks)] diff --git a/tests/ui/pattern/pat-tuple-field-count-cross.rs b/tests/ui/pattern/pat-tuple-field-count-cross.rs index b63da4e154f..5a1f0432368 100644 --- a/tests/ui/pattern/pat-tuple-field-count-cross.rs +++ b/tests/ui/pattern/pat-tuple-field-count-cross.rs @@ -1,4 +1,4 @@ -// aux-build:declarations-for-tuple-field-count-errors.rs +//@ aux-build:declarations-for-tuple-field-count-errors.rs extern crate declarations_for_tuple_field_count_errors; diff --git a/tests/ui/pattern/pattern-bad-ref-box-order.fixed b/tests/ui/pattern/pattern-bad-ref-box-order.fixed index 8825744a08b..96b91bca63b 100644 --- a/tests/ui/pattern/pattern-bad-ref-box-order.fixed +++ b/tests/ui/pattern/pattern-bad-ref-box-order.fixed @@ -1,4 +1,4 @@ -// run-rustfix +//@ run-rustfix #![feature(box_patterns)] #![allow(dead_code)] diff --git a/tests/ui/pattern/pattern-bad-ref-box-order.rs b/tests/ui/pattern/pattern-bad-ref-box-order.rs index f3fcf0ceacf..29bf95d48b0 100644 --- a/tests/ui/pattern/pattern-bad-ref-box-order.rs +++ b/tests/ui/pattern/pattern-bad-ref-box-order.rs @@ -1,4 +1,4 @@ -// run-rustfix +//@ run-rustfix #![feature(box_patterns)] #![allow(dead_code)] diff --git a/tests/ui/pattern/rest-pat-syntactic.rs b/tests/ui/pattern/rest-pat-syntactic.rs index 4da5a2db767..1de29e69b05 100644 --- a/tests/ui/pattern/rest-pat-syntactic.rs +++ b/tests/ui/pattern/rest-pat-syntactic.rs @@ -1,7 +1,7 @@ // Here we test that `..` is allowed in all pattern locations *syntactically*. // The semantic test is in `rest-pat-semantic-disallowed.rs`. -// check-pass +//@ check-pass fn main() {} diff --git a/tests/ui/pattern/size-and-align.rs b/tests/ui/pattern/size-and-align.rs index a32b5de7292..f436ea48104 100644 --- a/tests/ui/pattern/size-and-align.rs +++ b/tests/ui/pattern/size-and-align.rs @@ -1,4 +1,4 @@ -// run-pass +//@ run-pass #![allow(non_camel_case_types)] enum clam { a(T, isize), b, } diff --git a/tests/ui/pattern/slice-array-infer.rs b/tests/ui/pattern/slice-array-infer.rs index f94a3dcfe0a..fdead488ea1 100644 --- a/tests/ui/pattern/slice-array-infer.rs +++ b/tests/ui/pattern/slice-array-infer.rs @@ -1,4 +1,4 @@ -// check-pass +//@ check-pass #![allow(unused_variables)] #![feature(generic_arg_infer)] diff --git a/tests/ui/pattern/slice-patterns-nested.rs b/tests/ui/pattern/slice-patterns-nested.rs index 077e0a13954..32b01c5572d 100644 --- a/tests/ui/pattern/slice-patterns-nested.rs +++ b/tests/ui/pattern/slice-patterns-nested.rs @@ -1,4 +1,4 @@ -// check-pass +//@ check-pass #![allow(unused_variables)] struct Zeroes; diff --git a/tests/ui/pattern/suggest-adding-appropriate-missing-pattern-excluding-comments.fixed b/tests/ui/pattern/suggest-adding-appropriate-missing-pattern-excluding-comments.fixed index b469fade3ea..db09fd1c032 100644 --- a/tests/ui/pattern/suggest-adding-appropriate-missing-pattern-excluding-comments.fixed +++ b/tests/ui/pattern/suggest-adding-appropriate-missing-pattern-excluding-comments.fixed @@ -1,4 +1,4 @@ -// run-rustfix +//@ run-rustfix fn main() { match Some(1) { //~ ERROR non-exhaustive patterns: `None` not covered diff --git a/tests/ui/pattern/suggest-adding-appropriate-missing-pattern-excluding-comments.rs b/tests/ui/pattern/suggest-adding-appropriate-missing-pattern-excluding-comments.rs index 42493a63271..7e4b60f8ff2 100644 --- a/tests/ui/pattern/suggest-adding-appropriate-missing-pattern-excluding-comments.rs +++ b/tests/ui/pattern/suggest-adding-appropriate-missing-pattern-excluding-comments.rs @@ -1,4 +1,4 @@ -// run-rustfix +//@ run-rustfix fn main() { match Some(1) { //~ ERROR non-exhaustive patterns: `None` not covered diff --git a/tests/ui/pattern/usefulness/always-inhabited-union-ref.rs b/tests/ui/pattern/usefulness/always-inhabited-union-ref.rs index 247b7f21f68..c951cb567fc 100644 --- a/tests/ui/pattern/usefulness/always-inhabited-union-ref.rs +++ b/tests/ui/pattern/usefulness/always-inhabited-union-ref.rs @@ -1,4 +1,4 @@ -// revisions: min_exhaustive_patterns exhaustive_patterns +//@ revisions: min_exhaustive_patterns exhaustive_patterns // The precise semantics of inhabitedness with respect to unions and references is currently // undecided. This test file currently checks a conservative choice. diff --git a/tests/ui/pattern/usefulness/const-pat-ice.rs b/tests/ui/pattern/usefulness/const-pat-ice.rs index abfacf3936b..69f16185676 100644 --- a/tests/ui/pattern/usefulness/const-pat-ice.rs +++ b/tests/ui/pattern/usefulness/const-pat-ice.rs @@ -1,4 +1,4 @@ -// check-pass +//@ check-pass const FOO: &&&u32 = &&&42; diff --git a/tests/ui/pattern/usefulness/const-private-fields.rs b/tests/ui/pattern/usefulness/const-private-fields.rs index 06c832ca46a..79a1d6e3ed7 100644 --- a/tests/ui/pattern/usefulness/const-private-fields.rs +++ b/tests/ui/pattern/usefulness/const-private-fields.rs @@ -1,4 +1,4 @@ -// check-pass +//@ check-pass // // Check that we don't ignore private fields in usefulness checking #![deny(unreachable_patterns)] diff --git a/tests/ui/pattern/usefulness/doc-hidden-fields.rs b/tests/ui/pattern/usefulness/doc-hidden-fields.rs index 4163b87dc85..549e0d1af55 100644 --- a/tests/ui/pattern/usefulness/doc-hidden-fields.rs +++ b/tests/ui/pattern/usefulness/doc-hidden-fields.rs @@ -1,4 +1,4 @@ -// aux-build:hidden.rs +//@ aux-build:hidden.rs extern crate hidden; diff --git a/tests/ui/pattern/usefulness/doc-hidden-non-exhaustive.rs b/tests/ui/pattern/usefulness/doc-hidden-non-exhaustive.rs index 5d4181a30f0..56842917f50 100644 --- a/tests/ui/pattern/usefulness/doc-hidden-non-exhaustive.rs +++ b/tests/ui/pattern/usefulness/doc-hidden-non-exhaustive.rs @@ -1,4 +1,4 @@ -// aux-build:hidden.rs +//@ aux-build:hidden.rs extern crate hidden; diff --git a/tests/ui/pattern/usefulness/empty-match-check-notes.rs b/tests/ui/pattern/usefulness/empty-match-check-notes.rs index c30cdfc2e4f..ea797bc7dd5 100644 --- a/tests/ui/pattern/usefulness/empty-match-check-notes.rs +++ b/tests/ui/pattern/usefulness/empty-match-check-notes.rs @@ -1,5 +1,5 @@ -// aux-build:empty.rs -// revisions: normal exhaustive_patterns +//@ aux-build:empty.rs +//@ revisions: normal exhaustive_patterns // // This tests a match with no arms on various types, and checks NOTEs. #![feature(never_type)] diff --git a/tests/ui/pattern/usefulness/empty-match.rs b/tests/ui/pattern/usefulness/empty-match.rs index 20ab702c9c8..9b22b47a12b 100644 --- a/tests/ui/pattern/usefulness/empty-match.rs +++ b/tests/ui/pattern/usefulness/empty-match.rs @@ -1,4 +1,4 @@ -// revisions: normal exhaustive_patterns +//@ revisions: normal exhaustive_patterns // // This tests a match with no arms on various types. #![feature(never_type)] diff --git a/tests/ui/pattern/usefulness/empty-types.rs b/tests/ui/pattern/usefulness/empty-types.rs index c66fd1edc19..170a663e754 100644 --- a/tests/ui/pattern/usefulness/empty-types.rs +++ b/tests/ui/pattern/usefulness/empty-types.rs @@ -1,4 +1,4 @@ -// revisions: normal min_exh_pats exhaustive_patterns +//@ revisions: normal min_exh_pats exhaustive_patterns // gate-test-min_exhaustive_patterns // // This tests correct handling of empty types in exhaustiveness checking. diff --git a/tests/ui/pattern/usefulness/integer-ranges/issue-117648-overlapping_range_endpoints-false-positive.rs b/tests/ui/pattern/usefulness/integer-ranges/issue-117648-overlapping_range_endpoints-false-positive.rs index 37fcb4b4af9..7c9ea341ddb 100644 --- a/tests/ui/pattern/usefulness/integer-ranges/issue-117648-overlapping_range_endpoints-false-positive.rs +++ b/tests/ui/pattern/usefulness/integer-ranges/issue-117648-overlapping_range_endpoints-false-positive.rs @@ -1,4 +1,4 @@ -// check-pass +//@ check-pass fn main() { match (0i8, 0i8) { (0, _) => {} diff --git a/tests/ui/pattern/usefulness/integer-ranges/pointer-sized-int.rs b/tests/ui/pattern/usefulness/integer-ranges/pointer-sized-int.rs index 3778dede721..40f086dcc71 100644 --- a/tests/ui/pattern/usefulness/integer-ranges/pointer-sized-int.rs +++ b/tests/ui/pattern/usefulness/integer-ranges/pointer-sized-int.rs @@ -1,4 +1,4 @@ -// revisions: deny +//@ revisions: deny #![feature(exclusive_range_pattern)] #![allow(overlapping_range_endpoints)] diff --git a/tests/ui/pattern/usefulness/irrefutable-let-patterns.rs b/tests/ui/pattern/usefulness/irrefutable-let-patterns.rs index d400ef0bbd6..ef90e0e6ea7 100644 --- a/tests/ui/pattern/usefulness/irrefutable-let-patterns.rs +++ b/tests/ui/pattern/usefulness/irrefutable-let-patterns.rs @@ -1,4 +1,4 @@ -// run-pass +//@ run-pass #![allow(irrefutable_let_patterns)] diff --git a/tests/ui/pattern/usefulness/irrefutable-unit.rs b/tests/ui/pattern/usefulness/irrefutable-unit.rs index dd8f03b6dbd..b4e72c0aa2a 100644 --- a/tests/ui/pattern/usefulness/irrefutable-unit.rs +++ b/tests/ui/pattern/usefulness/irrefutable-unit.rs @@ -1,5 +1,5 @@ -// run-pass -// pretty-expanded FIXME #23616 +//@ run-pass +//@ pretty-expanded FIXME #23616 pub fn main() { let ((),()) = ((),()); diff --git a/tests/ui/pattern/usefulness/issue-118437-exponential-time-on-diagonal-match.rs b/tests/ui/pattern/usefulness/issue-118437-exponential-time-on-diagonal-match.rs index 39ad2d4abf3..984feef5f47 100644 --- a/tests/ui/pattern/usefulness/issue-118437-exponential-time-on-diagonal-match.rs +++ b/tests/ui/pattern/usefulness/issue-118437-exponential-time-on-diagonal-match.rs @@ -1,4 +1,4 @@ -// check-pass +//@ check-pass struct BaseCommand { field01: bool, field02: bool, diff --git a/tests/ui/pattern/usefulness/issue-30240-rpass.rs b/tests/ui/pattern/usefulness/issue-30240-rpass.rs index ab16614fd30..c8342295b91 100644 --- a/tests/ui/pattern/usefulness/issue-30240-rpass.rs +++ b/tests/ui/pattern/usefulness/issue-30240-rpass.rs @@ -1,4 +1,4 @@ -// run-pass +//@ run-pass fn main() { let &ref a = &[0i32] as &[_]; assert_eq!(a, &[0i32] as &[_]); diff --git a/tests/ui/pattern/usefulness/issue-53820-slice-pattern-large-array.rs b/tests/ui/pattern/usefulness/issue-53820-slice-pattern-large-array.rs index 5b0482de220..e5adf153965 100644 --- a/tests/ui/pattern/usefulness/issue-53820-slice-pattern-large-array.rs +++ b/tests/ui/pattern/usefulness/issue-53820-slice-pattern-large-array.rs @@ -1,4 +1,4 @@ -// check-pass +//@ check-pass // This used to cause a stack overflow during exhaustiveness checking in the compiler. diff --git a/tests/ui/pattern/usefulness/issue-65413-constants-and-slices-exhaustiveness.rs b/tests/ui/pattern/usefulness/issue-65413-constants-and-slices-exhaustiveness.rs index 54dfa889ee3..ebe6ce0629e 100644 --- a/tests/ui/pattern/usefulness/issue-65413-constants-and-slices-exhaustiveness.rs +++ b/tests/ui/pattern/usefulness/issue-65413-constants-and-slices-exhaustiveness.rs @@ -1,4 +1,4 @@ -// check-pass +//@ check-pass #![deny(unreachable_patterns)] diff --git a/tests/ui/pattern/usefulness/issue-66501.rs b/tests/ui/pattern/usefulness/issue-66501.rs index ffcfd4ad83e..e7a36ba3463 100644 --- a/tests/ui/pattern/usefulness/issue-66501.rs +++ b/tests/ui/pattern/usefulness/issue-66501.rs @@ -1,4 +1,4 @@ -// check-pass +//@ check-pass #![allow(unreachable_patterns)] diff --git a/tests/ui/pattern/usefulness/issue-71930-type-of-match-scrutinee.rs b/tests/ui/pattern/usefulness/issue-71930-type-of-match-scrutinee.rs index e2ff9ac87ef..1db5dff3bf8 100644 --- a/tests/ui/pattern/usefulness/issue-71930-type-of-match-scrutinee.rs +++ b/tests/ui/pattern/usefulness/issue-71930-type-of-match-scrutinee.rs @@ -1,4 +1,4 @@ -// check-pass +//@ check-pass // In PR 71930, it was discovered that the code to retrieve the inferred type of a match scrutinee // was incorrect. diff --git a/tests/ui/pattern/usefulness/issue-72476-and-89393-associated-type.rs b/tests/ui/pattern/usefulness/issue-72476-and-89393-associated-type.rs index 058f4196798..96ff8ff36cd 100644 --- a/tests/ui/pattern/usefulness/issue-72476-and-89393-associated-type.rs +++ b/tests/ui/pattern/usefulness/issue-72476-and-89393-associated-type.rs @@ -1,4 +1,4 @@ -// check-pass +//@ check-pass // From https://github.com/rust-lang/rust/issues/72476 // and https://github.com/rust-lang/rust/issues/89393 diff --git a/tests/ui/pattern/usefulness/issue-78549-ref-pat-and-str.rs b/tests/ui/pattern/usefulness/issue-78549-ref-pat-and-str.rs index 2879caf2c4c..4b05a2cad81 100644 --- a/tests/ui/pattern/usefulness/issue-78549-ref-pat-and-str.rs +++ b/tests/ui/pattern/usefulness/issue-78549-ref-pat-and-str.rs @@ -1,4 +1,4 @@ -// check-pass +//@ check-pass // From https://github.com/rust-lang/rust/issues/78549 fn main() { diff --git a/tests/ui/pattern/usefulness/issue-80501-or-pat-and-macro.rs b/tests/ui/pattern/usefulness/issue-80501-or-pat-and-macro.rs index aac7d7d5385..e963d65d6c7 100644 --- a/tests/ui/pattern/usefulness/issue-80501-or-pat-and-macro.rs +++ b/tests/ui/pattern/usefulness/issue-80501-or-pat-and-macro.rs @@ -1,4 +1,4 @@ -// check-pass +//@ check-pass #![deny(unreachable_patterns)] pub enum TypeCtor { Slice, diff --git a/tests/ui/pattern/usefulness/issue-88747.rs b/tests/ui/pattern/usefulness/issue-88747.rs index 948c99f9ce9..9b04e766be8 100644 --- a/tests/ui/pattern/usefulness/issue-88747.rs +++ b/tests/ui/pattern/usefulness/issue-88747.rs @@ -1,4 +1,4 @@ -// check-pass: this used to be a stack overflow because of recursion in `usefulness.rs` +//@ check-pass: this used to be a stack overflow because of recursion in `usefulness.rs` macro_rules! long_tuple_arg { ([$($t:tt)*]#$($h:tt)*) => { diff --git a/tests/ui/pattern/usefulness/match-privately-empty.rs b/tests/ui/pattern/usefulness/match-privately-empty.rs index 67a9aa2e916..95b18e774fb 100644 --- a/tests/ui/pattern/usefulness/match-privately-empty.rs +++ b/tests/ui/pattern/usefulness/match-privately-empty.rs @@ -1,4 +1,4 @@ -// revisions: min_exhaustive_patterns exhaustive_patterns +//@ revisions: min_exhaustive_patterns exhaustive_patterns #![cfg_attr(exhaustive_patterns, feature(exhaustive_patterns))] #![cfg_attr(min_exhaustive_patterns, feature(min_exhaustive_patterns))] //[min_exhaustive_patterns]~^ WARN the feature `min_exhaustive_patterns` is incomplete diff --git a/tests/ui/pattern/usefulness/nested-exhaustive-match.rs b/tests/ui/pattern/usefulness/nested-exhaustive-match.rs index 8b2294f8432..51b05c9a111 100644 --- a/tests/ui/pattern/usefulness/nested-exhaustive-match.rs +++ b/tests/ui/pattern/usefulness/nested-exhaustive-match.rs @@ -1,6 +1,6 @@ -// run-pass +//@ run-pass #![allow(dead_code)] -// pretty-expanded FIXME #23616 +//@ pretty-expanded FIXME #23616 struct Foo { foo: bool, bar: Option, baz: isize } diff --git a/tests/ui/pattern/usefulness/nested-non-exhaustive-enums.rs b/tests/ui/pattern/usefulness/nested-non-exhaustive-enums.rs index 3a8a74d1fd6..0c512e40432 100644 --- a/tests/ui/pattern/usefulness/nested-non-exhaustive-enums.rs +++ b/tests/ui/pattern/usefulness/nested-non-exhaustive-enums.rs @@ -1,4 +1,4 @@ -// aux-build:non-exhaustive.rs +//@ aux-build:non-exhaustive.rs extern crate non_exhaustive; diff --git a/tests/ui/pattern/usefulness/slice-patterns-irrefutable.rs b/tests/ui/pattern/usefulness/slice-patterns-irrefutable.rs index cbf64e2c53d..63ae2c3d2fc 100644 --- a/tests/ui/pattern/usefulness/slice-patterns-irrefutable.rs +++ b/tests/ui/pattern/usefulness/slice-patterns-irrefutable.rs @@ -1,4 +1,4 @@ -// check-pass +//@ check-pass fn main() { let s: &[bool] = &[true; 0]; diff --git a/tests/ui/pattern/usefulness/slice_of_empty.rs b/tests/ui/pattern/usefulness/slice_of_empty.rs index 5f64dd3fecc..589c7767ad2 100644 --- a/tests/ui/pattern/usefulness/slice_of_empty.rs +++ b/tests/ui/pattern/usefulness/slice_of_empty.rs @@ -1,4 +1,4 @@ -// revisions: min_exhaustive_patterns exhaustive_patterns +//@ revisions: min_exhaustive_patterns exhaustive_patterns #![cfg_attr(exhaustive_patterns, feature(exhaustive_patterns))] #![cfg_attr(min_exhaustive_patterns, feature(min_exhaustive_patterns))] //[min_exhaustive_patterns]~^ WARN the feature `min_exhaustive_patterns` is incomplete diff --git a/tests/ui/pattern/usefulness/stable-gated-fields.rs b/tests/ui/pattern/usefulness/stable-gated-fields.rs index 90f40a8d629..61b202b77f6 100644 --- a/tests/ui/pattern/usefulness/stable-gated-fields.rs +++ b/tests/ui/pattern/usefulness/stable-gated-fields.rs @@ -1,4 +1,4 @@ -// aux-build:unstable.rs +//@ aux-build:unstable.rs extern crate unstable; diff --git a/tests/ui/pattern/usefulness/stable-gated-patterns.rs b/tests/ui/pattern/usefulness/stable-gated-patterns.rs index 03db01160dd..5ceffbf0923 100644 --- a/tests/ui/pattern/usefulness/stable-gated-patterns.rs +++ b/tests/ui/pattern/usefulness/stable-gated-patterns.rs @@ -1,4 +1,4 @@ -// aux-build:unstable.rs +//@ aux-build:unstable.rs extern crate unstable; diff --git a/tests/ui/pattern/usefulness/uninhabited.rs b/tests/ui/pattern/usefulness/uninhabited.rs index 5622808d4c7..ff7aeb263e4 100644 --- a/tests/ui/pattern/usefulness/uninhabited.rs +++ b/tests/ui/pattern/usefulness/uninhabited.rs @@ -1,5 +1,5 @@ -// check-pass -// aux-build:empty.rs +//@ check-pass +//@ aux-build:empty.rs // // This tests plays with matching and uninhabited types. This also serves as a test for the // `Ty::is_inhabited_from` function. diff --git a/tests/ui/pattern/usefulness/unstable-gated-fields.rs b/tests/ui/pattern/usefulness/unstable-gated-fields.rs index 2b473ae989b..e6a4494867a 100644 --- a/tests/ui/pattern/usefulness/unstable-gated-fields.rs +++ b/tests/ui/pattern/usefulness/unstable-gated-fields.rs @@ -1,6 +1,6 @@ #![feature(unstable_test_feature)] -// aux-build:unstable.rs +//@ aux-build:unstable.rs extern crate unstable; diff --git a/tests/ui/pattern/usefulness/unstable-gated-patterns.rs b/tests/ui/pattern/usefulness/unstable-gated-patterns.rs index 7046555e0d2..e6db495a149 100644 --- a/tests/ui/pattern/usefulness/unstable-gated-patterns.rs +++ b/tests/ui/pattern/usefulness/unstable-gated-patterns.rs @@ -1,6 +1,6 @@ #![feature(unstable_test_feature)] -// aux-build:unstable.rs +//@ aux-build:unstable.rs extern crate unstable; diff --git a/tests/ui/pin-macro/cant_access_internals.rs b/tests/ui/pin-macro/cant_access_internals.rs index 4aeb6a643d9..17fe7fa0738 100644 --- a/tests/ui/pin-macro/cant_access_internals.rs +++ b/tests/ui/pin-macro/cant_access_internals.rs @@ -1,4 +1,4 @@ -// edition:2018 +//@ edition:2018 use core::{ marker::PhantomPinned, diff --git a/tests/ui/pin-macro/lifetime_errors_on_promotion_misusage.rs b/tests/ui/pin-macro/lifetime_errors_on_promotion_misusage.rs index 59774bc753d..8a0244e8145 100644 --- a/tests/ui/pin-macro/lifetime_errors_on_promotion_misusage.rs +++ b/tests/ui/pin-macro/lifetime_errors_on_promotion_misusage.rs @@ -1,4 +1,4 @@ -// edition:2018 +//@ edition:2018 use core::{ convert::identity, diff --git a/tests/ui/polymorphization/closure_in_upvar/fn.rs b/tests/ui/polymorphization/closure_in_upvar/fn.rs index e1030858814..87f7bc9562b 100644 --- a/tests/ui/polymorphization/closure_in_upvar/fn.rs +++ b/tests/ui/polymorphization/closure_in_upvar/fn.rs @@ -1,5 +1,5 @@ -// build-pass -// compile-flags:-Zpolymorphize=on -Csymbol-mangling-version=v0 +//@ build-pass +//@ compile-flags:-Zpolymorphize=on -Csymbol-mangling-version=v0 fn foo(f: impl Fn()) { let x = |_: ()| (); diff --git a/tests/ui/polymorphization/closure_in_upvar/fnmut.rs b/tests/ui/polymorphization/closure_in_upvar/fnmut.rs index 62164ff9485..0f49c0426ee 100644 --- a/tests/ui/polymorphization/closure_in_upvar/fnmut.rs +++ b/tests/ui/polymorphization/closure_in_upvar/fnmut.rs @@ -1,5 +1,5 @@ -// build-pass -// compile-flags:-Zpolymorphize=on -Csymbol-mangling-version=v0 +//@ build-pass +//@ compile-flags:-Zpolymorphize=on -Csymbol-mangling-version=v0 fn foo(f: impl Fn()) { // Mutate an upvar from `x` so that it implements `FnMut`. diff --git a/tests/ui/polymorphization/closure_in_upvar/fnonce.rs b/tests/ui/polymorphization/closure_in_upvar/fnonce.rs index 7a364882fb8..85c7ce2ce27 100644 --- a/tests/ui/polymorphization/closure_in_upvar/fnonce.rs +++ b/tests/ui/polymorphization/closure_in_upvar/fnonce.rs @@ -1,5 +1,5 @@ -// build-pass -// compile-flags:-Zpolymorphize=on -Csymbol-mangling-version=v0 +//@ build-pass +//@ compile-flags:-Zpolymorphize=on -Csymbol-mangling-version=v0 fn foo(f: impl Fn()) { // Move a non-copy type into `x` so that it implements `FnOnce`. diff --git a/tests/ui/polymorphization/closure_in_upvar/other.rs b/tests/ui/polymorphization/closure_in_upvar/other.rs index 27d59ec8899..b008fc49af4 100644 --- a/tests/ui/polymorphization/closure_in_upvar/other.rs +++ b/tests/ui/polymorphization/closure_in_upvar/other.rs @@ -1,5 +1,5 @@ -// build-pass -// compile-flags:-Zpolymorphize=on -Csymbol-mangling-version=v0 +//@ build-pass +//@ compile-flags:-Zpolymorphize=on -Csymbol-mangling-version=v0 fn y_uses_f(f: impl Fn()) { let x = |_: ()| (); diff --git a/tests/ui/polymorphization/const_parameters/closures.rs b/tests/ui/polymorphization/const_parameters/closures.rs index 2f41beeb969..8bdb7381454 100644 --- a/tests/ui/polymorphization/const_parameters/closures.rs +++ b/tests/ui/polymorphization/const_parameters/closures.rs @@ -1,5 +1,5 @@ -// build-fail -// compile-flags:-Zpolymorphize=on +//@ build-fail +//@ compile-flags:-Zpolymorphize=on #![feature(generic_const_exprs, rustc_attrs)] //~^ WARN the feature `generic_const_exprs` is incomplete diff --git a/tests/ui/polymorphization/const_parameters/functions.rs b/tests/ui/polymorphization/const_parameters/functions.rs index cbc1b63fbc4..6535e3f081d 100644 --- a/tests/ui/polymorphization/const_parameters/functions.rs +++ b/tests/ui/polymorphization/const_parameters/functions.rs @@ -1,5 +1,5 @@ -// build-fail -// compile-flags:-Zpolymorphize=on +//@ build-fail +//@ compile-flags:-Zpolymorphize=on #![feature(generic_const_exprs, rustc_attrs)] //~^ WARN the feature `generic_const_exprs` is incomplete diff --git a/tests/ui/polymorphization/coroutine.rs b/tests/ui/polymorphization/coroutine.rs index 3f28e89e36c..a989947f787 100644 --- a/tests/ui/polymorphization/coroutine.rs +++ b/tests/ui/polymorphization/coroutine.rs @@ -1,5 +1,5 @@ -// build-fail -// compile-flags:-Zpolymorphize=on -Zinline-mir=off +//@ build-fail +//@ compile-flags:-Zpolymorphize=on -Zinline-mir=off #![feature(generic_const_exprs, coroutines, coroutine_trait, rustc_attrs)] //~^ WARN the feature `generic_const_exprs` is incomplete diff --git a/tests/ui/polymorphization/drop_shims/simple.rs b/tests/ui/polymorphization/drop_shims/simple.rs index 5f10d5e831c..e51765bf432 100644 --- a/tests/ui/polymorphization/drop_shims/simple.rs +++ b/tests/ui/polymorphization/drop_shims/simple.rs @@ -1,5 +1,5 @@ -// check-pass -// compile-flags:-Zpolymorphize=on +//@ check-pass +//@ compile-flags:-Zpolymorphize=on pub struct OnDrop(pub F); diff --git a/tests/ui/polymorphization/drop_shims/transitive.rs b/tests/ui/polymorphization/drop_shims/transitive.rs index 283b8da1329..331451e1a15 100644 --- a/tests/ui/polymorphization/drop_shims/transitive.rs +++ b/tests/ui/polymorphization/drop_shims/transitive.rs @@ -1,5 +1,5 @@ -// check-pass -// compile-flags:-Zpolymorphize=on +//@ check-pass +//@ compile-flags:-Zpolymorphize=on pub struct OnDrop(pub F); diff --git a/tests/ui/polymorphization/issue-74614.rs b/tests/ui/polymorphization/issue-74614.rs index 8b0c00b1355..3ed030b5778 100644 --- a/tests/ui/polymorphization/issue-74614.rs +++ b/tests/ui/polymorphization/issue-74614.rs @@ -1,5 +1,5 @@ -// compile-flags:-Zpolymorphize=on -// build-pass +//@ compile-flags:-Zpolymorphize=on +//@ build-pass fn test() { std::mem::size_of::(); diff --git a/tests/ui/polymorphization/issue-74636.rs b/tests/ui/polymorphization/issue-74636.rs index 4c532f451e3..b06b5fdb004 100644 --- a/tests/ui/polymorphization/issue-74636.rs +++ b/tests/ui/polymorphization/issue-74636.rs @@ -1,5 +1,5 @@ -// compile-flags:-Zpolymorphize=on -// build-pass +//@ compile-flags:-Zpolymorphize=on +//@ build-pass use std::any::TypeId; diff --git a/tests/ui/polymorphization/lifetimes.rs b/tests/ui/polymorphization/lifetimes.rs index f26df45230a..5f8aa13d61d 100644 --- a/tests/ui/polymorphization/lifetimes.rs +++ b/tests/ui/polymorphization/lifetimes.rs @@ -1,5 +1,5 @@ -// build-fail -// compile-flags:-Zpolymorphize=on +//@ build-fail +//@ compile-flags:-Zpolymorphize=on #![feature(rustc_attrs)] // This test checks that the polymorphization analysis doesn't break when the diff --git a/tests/ui/polymorphization/normalized_sig_types.rs b/tests/ui/polymorphization/normalized_sig_types.rs index d732b1071d8..c8a5b3e9295 100644 --- a/tests/ui/polymorphization/normalized_sig_types.rs +++ b/tests/ui/polymorphization/normalized_sig_types.rs @@ -1,5 +1,5 @@ -// build-pass -// compile-flags:-Zpolymorphize=on +//@ build-pass +//@ compile-flags:-Zpolymorphize=on pub trait ParallelIterator: Sized { fn drive>(_: C) { diff --git a/tests/ui/polymorphization/predicates.rs b/tests/ui/polymorphization/predicates.rs index 6a5fc2e33de..1ba68f2698e 100644 --- a/tests/ui/polymorphization/predicates.rs +++ b/tests/ui/polymorphization/predicates.rs @@ -1,5 +1,5 @@ -// build-fail -// compile-flags: -Copt-level=0 -Zpolymorphize=on +//@ build-fail +//@ compile-flags: -Copt-level=0 -Zpolymorphize=on #![feature(rustc_attrs)] diff --git a/tests/ui/polymorphization/promoted-function-1.rs b/tests/ui/polymorphization/promoted-function-1.rs index 2cd02673442..8c2ed621249 100644 --- a/tests/ui/polymorphization/promoted-function-1.rs +++ b/tests/ui/polymorphization/promoted-function-1.rs @@ -1,5 +1,5 @@ -// build-fail -// compile-flags: -Zpolymorphize=on +//@ build-fail +//@ compile-flags: -Zpolymorphize=on #![crate_type = "lib"] #![feature(rustc_attrs)] diff --git a/tests/ui/polymorphization/promoted-function-2.rs b/tests/ui/polymorphization/promoted-function-2.rs index d2d0f336812..aaae7064f37 100644 --- a/tests/ui/polymorphization/promoted-function-2.rs +++ b/tests/ui/polymorphization/promoted-function-2.rs @@ -1,5 +1,5 @@ -// build-fail -// compile-flags:-Zpolymorphize=on +//@ build-fail +//@ compile-flags:-Zpolymorphize=on #![crate_type = "lib"] #![feature(generic_const_exprs, rustc_attrs)] //~^ WARN the feature `generic_const_exprs` is incomplete diff --git a/tests/ui/polymorphization/promoted-function-3.rs b/tests/ui/polymorphization/promoted-function-3.rs index bbd991e36cc..2ac06d5a139 100644 --- a/tests/ui/polymorphization/promoted-function-3.rs +++ b/tests/ui/polymorphization/promoted-function-3.rs @@ -1,5 +1,5 @@ -// run-pass -// compile-flags: -Zpolymorphize=on -Zmir-opt-level=4 +//@ run-pass +//@ compile-flags: -Zpolymorphize=on -Zmir-opt-level=4 fn caller() -> &'static usize { callee::() diff --git a/tests/ui/polymorphization/promoted-function.rs b/tests/ui/polymorphization/promoted-function.rs index a56a8e70e4c..057daf4e757 100644 --- a/tests/ui/polymorphization/promoted-function.rs +++ b/tests/ui/polymorphization/promoted-function.rs @@ -1,5 +1,5 @@ -// run-pass -// compile-flags:-Zpolymorphize=on +//@ run-pass +//@ compile-flags:-Zpolymorphize=on fn fop() {} diff --git a/tests/ui/polymorphization/symbol-ambiguity.rs b/tests/ui/polymorphization/symbol-ambiguity.rs index 6277a902fa2..183837f9961 100644 --- a/tests/ui/polymorphization/symbol-ambiguity.rs +++ b/tests/ui/polymorphization/symbol-ambiguity.rs @@ -1,5 +1,5 @@ -// build-pass -// compile-flags: -Zpolymorphize=on -Csymbol-mangling-version=v0 +//@ build-pass +//@ compile-flags: -Zpolymorphize=on -Csymbol-mangling-version=v0 pub(crate) struct Foo<'a, I, E>(I, &'a E); diff --git a/tests/ui/polymorphization/too-many-generic-params.rs b/tests/ui/polymorphization/too-many-generic-params.rs index ec6244630fd..db160c336e0 100644 --- a/tests/ui/polymorphization/too-many-generic-params.rs +++ b/tests/ui/polymorphization/too-many-generic-params.rs @@ -1,4 +1,4 @@ -// build-pass +//@ build-pass #![feature(rustc_attrs)] // This test checks that the analysis doesn't panic when there are >64 generic parameters, but diff --git a/tests/ui/polymorphization/type_parameters/closures.rs b/tests/ui/polymorphization/type_parameters/closures.rs index 07ab1355a47..552c5cb8980 100644 --- a/tests/ui/polymorphization/type_parameters/closures.rs +++ b/tests/ui/polymorphization/type_parameters/closures.rs @@ -1,5 +1,5 @@ -// build-fail -// compile-flags:-Zpolymorphize=on +//@ build-fail +//@ compile-flags:-Zpolymorphize=on #![feature(stmt_expr_attributes, rustc_attrs)] // This test checks that the polymorphization analysis correctly detects unused type diff --git a/tests/ui/polymorphization/type_parameters/functions.rs b/tests/ui/polymorphization/type_parameters/functions.rs index aad957e1dd3..548993fbca9 100644 --- a/tests/ui/polymorphization/type_parameters/functions.rs +++ b/tests/ui/polymorphization/type_parameters/functions.rs @@ -1,5 +1,5 @@ -// build-fail -// compile-flags:-Zpolymorphize=on +//@ build-fail +//@ compile-flags:-Zpolymorphize=on #![feature(rustc_attrs)] // This test checks that the polymorphization analysis correctly detects unused type diff --git a/tests/ui/polymorphization/unsized_cast.rs b/tests/ui/polymorphization/unsized_cast.rs index b803fec2ccf..749e21f4e5b 100644 --- a/tests/ui/polymorphization/unsized_cast.rs +++ b/tests/ui/polymorphization/unsized_cast.rs @@ -1,5 +1,5 @@ -// build-fail -// compile-flags:-Zpolymorphize=on +//@ build-fail +//@ compile-flags:-Zpolymorphize=on #![feature(fn_traits, rustc_attrs, unboxed_closures)] // This test checks that the polymorphization analysis considers a closure diff --git a/tests/ui/precondition-checks/misaligned-slice.rs b/tests/ui/precondition-checks/misaligned-slice.rs index c961c800352..d105154ecd8 100644 --- a/tests/ui/precondition-checks/misaligned-slice.rs +++ b/tests/ui/precondition-checks/misaligned-slice.rs @@ -1,8 +1,8 @@ -// run-fail -// compile-flags: -Copt-level=3 -Cdebug-assertions=yes -// error-pattern: unsafe precondition(s) violated: slice::from_raw_parts -// ignore-debug -// ignore-wasm32-bare no panic messages +//@ run-fail +//@ compile-flags: -Copt-level=3 -Cdebug-assertions=yes +//@ error-pattern: unsafe precondition(s) violated: slice::from_raw_parts +//@ ignore-debug +//@ ignore-wasm32-bare no panic messages fn main() { unsafe { diff --git a/tests/ui/precondition-checks/null-slice.rs b/tests/ui/precondition-checks/null-slice.rs index 1e67e7f5fb1..4347b85875d 100644 --- a/tests/ui/precondition-checks/null-slice.rs +++ b/tests/ui/precondition-checks/null-slice.rs @@ -1,8 +1,8 @@ -// run-fail -// compile-flags: -Copt-level=3 -Cdebug-assertions=yes -// error-pattern: unsafe precondition(s) violated: slice::from_raw_parts -// ignore-debug -// ignore-wasm32-bare no panic messages +//@ run-fail +//@ compile-flags: -Copt-level=3 -Cdebug-assertions=yes +//@ error-pattern: unsafe precondition(s) violated: slice::from_raw_parts +//@ ignore-debug +//@ ignore-wasm32-bare no panic messages fn main() { unsafe { diff --git a/tests/ui/precondition-checks/out-of-bounds-get-unchecked.rs b/tests/ui/precondition-checks/out-of-bounds-get-unchecked.rs index 1366ba28f1c..7956d5e8743 100644 --- a/tests/ui/precondition-checks/out-of-bounds-get-unchecked.rs +++ b/tests/ui/precondition-checks/out-of-bounds-get-unchecked.rs @@ -1,8 +1,8 @@ -// run-fail -// compile-flags: -Copt-level=3 -Cdebug-assertions=yes -// error-pattern: unsafe precondition(s) violated: hint::assert_unchecked -// ignore-debug -// ignore-wasm32-bare no panic messages +//@ run-fail +//@ compile-flags: -Copt-level=3 -Cdebug-assertions=yes +//@ error-pattern: unsafe precondition(s) violated: hint::assert_unchecked +//@ ignore-debug +//@ ignore-wasm32-bare no panic messages fn main() { unsafe { diff --git a/tests/ui/primitive-binop-lhs-mut.rs b/tests/ui/primitive-binop-lhs-mut.rs index 4f1c456ace3..d988e2ed14f 100644 --- a/tests/ui/primitive-binop-lhs-mut.rs +++ b/tests/ui/primitive-binop-lhs-mut.rs @@ -1,4 +1,4 @@ -// run-pass +//@ run-pass fn main() { let x = Box::new(0); diff --git a/tests/ui/print-fuel/print-fuel.rs b/tests/ui/print-fuel/print-fuel.rs index f68de00b9b5..fd7e568bea7 100644 --- a/tests/ui/print-fuel/print-fuel.rs +++ b/tests/ui/print-fuel/print-fuel.rs @@ -2,8 +2,8 @@ #![allow(dead_code)] // (#55495: The --error-format is to sidestep an issue in our test harness) -// compile-flags: -C opt-level=0 --error-format human -Z print-fuel=foo -// check-pass +//@ compile-flags: -C opt-level=0 --error-format human -Z print-fuel=foo +//@ check-pass struct S1(u8, u16, u8); struct S2(u8, u16, u8); diff --git a/tests/ui/print-stdout-eprint-stderr.rs b/tests/ui/print-stdout-eprint-stderr.rs index cfa9aec8068..e676a9ad1af 100644 --- a/tests/ui/print-stdout-eprint-stderr.rs +++ b/tests/ui/print-stdout-eprint-stderr.rs @@ -1,6 +1,6 @@ -// run-pass -// ignore-emscripten spawning processes is not supported -// ignore-sgx no processes +//@ run-pass +//@ ignore-emscripten spawning processes is not supported +//@ ignore-sgx no processes use std::{env, process}; diff --git a/tests/ui/print_type_sizes/anonymous.rs b/tests/ui/print_type_sizes/anonymous.rs index 2b008ca3b3a..a3a32228088 100644 --- a/tests/ui/print_type_sizes/anonymous.rs +++ b/tests/ui/print_type_sizes/anonymous.rs @@ -1,5 +1,5 @@ -// compile-flags: -Z print-type-sizes -// build-pass +//@ compile-flags: -Z print-type-sizes +//@ build-pass // All of the types that occur in this function are uninteresting, in // that one cannot control the sizes of these types with the same sort diff --git a/tests/ui/print_type_sizes/async.rs b/tests/ui/print_type_sizes/async.rs index f38a6e674da..805bccbcf63 100644 --- a/tests/ui/print_type_sizes/async.rs +++ b/tests/ui/print_type_sizes/async.rs @@ -1,7 +1,7 @@ -// compile-flags: -Z print-type-sizes --crate-type lib -// edition:2021 -// build-pass -// ignore-pass +//@ compile-flags: -Z print-type-sizes --crate-type lib +//@ edition:2021 +//@ build-pass +//@ ignore-pass #![allow(dropping_copy_types)] diff --git a/tests/ui/print_type_sizes/coroutine.rs b/tests/ui/print_type_sizes/coroutine.rs index aae72e0f37e..61488c51f05 100644 --- a/tests/ui/print_type_sizes/coroutine.rs +++ b/tests/ui/print_type_sizes/coroutine.rs @@ -1,6 +1,6 @@ -// compile-flags: -Z print-type-sizes --crate-type=lib -// build-pass -// ignore-pass +//@ compile-flags: -Z print-type-sizes --crate-type=lib +//@ build-pass +//@ ignore-pass #![feature(coroutines, coroutine_trait)] diff --git a/tests/ui/print_type_sizes/coroutine_discr_placement.rs b/tests/ui/print_type_sizes/coroutine_discr_placement.rs index 78fe75cdeb9..4b9f67a7999 100644 --- a/tests/ui/print_type_sizes/coroutine_discr_placement.rs +++ b/tests/ui/print_type_sizes/coroutine_discr_placement.rs @@ -1,6 +1,6 @@ -// compile-flags: -Z print-type-sizes --crate-type lib -// build-pass -// ignore-pass +//@ compile-flags: -Z print-type-sizes --crate-type lib +//@ build-pass +//@ ignore-pass // Tests a coroutine that has its discriminant as the *final* field. diff --git a/tests/ui/print_type_sizes/generics.rs b/tests/ui/print_type_sizes/generics.rs index 05097087d5a..af26dc690d2 100644 --- a/tests/ui/print_type_sizes/generics.rs +++ b/tests/ui/print_type_sizes/generics.rs @@ -1,6 +1,6 @@ -// compile-flags: -Z print-type-sizes --crate-type=lib -// build-pass -// ignore-pass +//@ compile-flags: -Z print-type-sizes --crate-type=lib +//@ build-pass +//@ ignore-pass // ^-- needed because `--pass check` does not emit the output needed. // FIXME: consider using an attribute instead of side-effects. diff --git a/tests/ui/print_type_sizes/multiple_types.rs b/tests/ui/print_type_sizes/multiple_types.rs index 91590389247..bbb16687f6a 100644 --- a/tests/ui/print_type_sizes/multiple_types.rs +++ b/tests/ui/print_type_sizes/multiple_types.rs @@ -1,5 +1,5 @@ -// compile-flags: -Z print-type-sizes --crate-type=lib -// build-pass +//@ compile-flags: -Z print-type-sizes --crate-type=lib +//@ build-pass // This file illustrates that when multiple structural types occur in // a function, every one of them is included in the output. diff --git a/tests/ui/print_type_sizes/niche-filling.rs b/tests/ui/print_type_sizes/niche-filling.rs index feb9643850d..da11f0c0121 100644 --- a/tests/ui/print_type_sizes/niche-filling.rs +++ b/tests/ui/print_type_sizes/niche-filling.rs @@ -1,7 +1,7 @@ -// compile-flags: -Z print-type-sizes --crate-type lib -// ignore-debug: debug assertions will print more types -// build-pass -// ignore-pass +//@ compile-flags: -Z print-type-sizes --crate-type lib +//@ ignore-debug: debug assertions will print more types +//@ build-pass +//@ ignore-pass // ^-- needed because `--pass check` does not emit the output needed. // FIXME: consider using an attribute instead of side-effects. diff --git a/tests/ui/print_type_sizes/no_duplicates.rs b/tests/ui/print_type_sizes/no_duplicates.rs index 2ec5d9e64bf..0903fd6fa9a 100644 --- a/tests/ui/print_type_sizes/no_duplicates.rs +++ b/tests/ui/print_type_sizes/no_duplicates.rs @@ -1,6 +1,6 @@ -// compile-flags: -Z print-type-sizes --crate-type=lib -// build-pass -// ignore-pass +//@ compile-flags: -Z print-type-sizes --crate-type=lib +//@ build-pass +//@ ignore-pass // ^-- needed because `--pass check` does not emit the output needed. // FIXME: consider using an attribute instead of side-effects. diff --git a/tests/ui/print_type_sizes/packed.rs b/tests/ui/print_type_sizes/packed.rs index 5ddfe4bf4db..888fa41a759 100644 --- a/tests/ui/print_type_sizes/packed.rs +++ b/tests/ui/print_type_sizes/packed.rs @@ -1,6 +1,6 @@ -// compile-flags: -Z print-type-sizes --crate-type=lib -// build-pass -// ignore-pass +//@ compile-flags: -Z print-type-sizes --crate-type=lib +//@ build-pass +//@ ignore-pass // ^-- needed because `--pass check` does not emit the output needed. // FIXME: consider using an attribute instead of side-effects. diff --git a/tests/ui/print_type_sizes/padding.rs b/tests/ui/print_type_sizes/padding.rs index f41c677dc6c..81a5c786310 100644 --- a/tests/ui/print_type_sizes/padding.rs +++ b/tests/ui/print_type_sizes/padding.rs @@ -1,5 +1,5 @@ -// compile-flags: -Z print-type-sizes --crate-type=lib -// build-pass +//@ compile-flags: -Z print-type-sizes --crate-type=lib +//@ build-pass // This file illustrates how padding is handled: alignment // requirements can lead to the introduction of padding, either before diff --git a/tests/ui/print_type_sizes/repr-align.rs b/tests/ui/print_type_sizes/repr-align.rs index 0bd11ebc958..1b9a22dcef7 100644 --- a/tests/ui/print_type_sizes/repr-align.rs +++ b/tests/ui/print_type_sizes/repr-align.rs @@ -1,6 +1,6 @@ -// compile-flags: -Z print-type-sizes --crate-type=lib -// build-pass -// ignore-pass +//@ compile-flags: -Z print-type-sizes --crate-type=lib +//@ build-pass +//@ ignore-pass // ^-- needed because `--pass check` does not emit the output needed. // FIXME: consider using an attribute instead of side-effects. diff --git a/tests/ui/print_type_sizes/repr_int_c.rs b/tests/ui/print_type_sizes/repr_int_c.rs index 6b103776a30..f82dfcb7cfc 100644 --- a/tests/ui/print_type_sizes/repr_int_c.rs +++ b/tests/ui/print_type_sizes/repr_int_c.rs @@ -1,5 +1,5 @@ -// compile-flags: -Z print-type-sizes --crate-type=lib -// build-pass +//@ compile-flags: -Z print-type-sizes --crate-type=lib +//@ build-pass // This test makes sure that the tag is not grown for `repr(C)` or `repr(u8)` // variants (see https://github.com/rust-lang/rust/issues/50098 for the original bug). diff --git a/tests/ui/print_type_sizes/uninhabited.rs b/tests/ui/print_type_sizes/uninhabited.rs index 86fab7b500a..7cb3e5b33fa 100644 --- a/tests/ui/print_type_sizes/uninhabited.rs +++ b/tests/ui/print_type_sizes/uninhabited.rs @@ -1,6 +1,6 @@ -// compile-flags: -Z print-type-sizes --crate-type=lib -// build-pass -// ignore-pass +//@ compile-flags: -Z print-type-sizes --crate-type=lib +//@ build-pass +//@ ignore-pass // ^-- needed because `--pass check` does not emit the output needed. // FIXME: consider using an attribute instead of side-effects. diff --git a/tests/ui/print_type_sizes/variants.rs b/tests/ui/print_type_sizes/variants.rs index 5a302052026..0d0e8a0773b 100644 --- a/tests/ui/print_type_sizes/variants.rs +++ b/tests/ui/print_type_sizes/variants.rs @@ -1,5 +1,5 @@ -// compile-flags: -Z print-type-sizes --crate-type=lib -// build-pass +//@ compile-flags: -Z print-type-sizes --crate-type=lib +//@ build-pass // This file illustrates two things: // diff --git a/tests/ui/print_type_sizes/zero-sized-fields.rs b/tests/ui/print_type_sizes/zero-sized-fields.rs index 09415824d5d..b3c4b684c6e 100644 --- a/tests/ui/print_type_sizes/zero-sized-fields.rs +++ b/tests/ui/print_type_sizes/zero-sized-fields.rs @@ -1,6 +1,6 @@ -// compile-flags: -Z print-type-sizes --crate-type=lib -// build-pass -// ignore-pass +//@ compile-flags: -Z print-type-sizes --crate-type=lib +//@ build-pass +//@ ignore-pass // At one point, zero-sized fields such as those in this file were causing // incorrect output from `-Z print-type-sizes`. diff --git a/tests/ui/privacy/auxiliary/ctor_aux.rs b/tests/ui/privacy/auxiliary/ctor_aux.rs index 9c99cca9ae6..625c4a74336 100644 --- a/tests/ui/privacy/auxiliary/ctor_aux.rs +++ b/tests/ui/privacy/auxiliary/ctor_aux.rs @@ -1,4 +1,4 @@ -// edition:2021 +//@ edition:2021 //! Missing docs lint warns about undocumented exported items. //! Use the lint to additionally verify that items are reachable //! but not exported. diff --git a/tests/ui/privacy/auxiliary/issue-117997.rs b/tests/ui/privacy/auxiliary/issue-117997.rs index 6f71cc2ba35..1ad90b1cfad 100644 --- a/tests/ui/privacy/auxiliary/issue-117997.rs +++ b/tests/ui/privacy/auxiliary/issue-117997.rs @@ -1,5 +1,5 @@ -// no-prefer-dynamic -// compile-flags: --crate-type=rlib +//@ no-prefer-dynamic +//@ compile-flags: --crate-type=rlib pub use impl_mod::TraitImplementer as Implementer; diff --git a/tests/ui/privacy/ctor.rs b/tests/ui/privacy/ctor.rs index 0ec15d68ed3..aa8012faf1e 100644 --- a/tests/ui/privacy/ctor.rs +++ b/tests/ui/privacy/ctor.rs @@ -3,9 +3,9 @@ // shadowed and cannot be named directly, while their constructors are // reexported. Regression test for issue #96934. // -// aux-build:ctor_aux.rs -// edition:2021 -// build-pass +//@ aux-build:ctor_aux.rs +//@ edition:2021 +//@ build-pass extern crate ctor_aux; diff --git a/tests/ui/privacy/impl-privacy-xc-2.rs b/tests/ui/privacy/impl-privacy-xc-2.rs index 390764588fc..da345ba2072 100644 --- a/tests/ui/privacy/impl-privacy-xc-2.rs +++ b/tests/ui/privacy/impl-privacy-xc-2.rs @@ -1,5 +1,5 @@ -// run-pass -// aux-build:impl_privacy_xc_2.rs +//@ run-pass +//@ aux-build:impl_privacy_xc_2.rs extern crate impl_privacy_xc_2; diff --git a/tests/ui/privacy/import-list-stem-visibility-issue-119126.rs b/tests/ui/privacy/import-list-stem-visibility-issue-119126.rs index 21f7828fc84..c1b43c5290f 100644 --- a/tests/ui/privacy/import-list-stem-visibility-issue-119126.rs +++ b/tests/ui/privacy/import-list-stem-visibility-issue-119126.rs @@ -1,5 +1,5 @@ -// check-pass -// edition: 2018 +//@ check-pass +//@ edition: 2018 mod outer { mod inner { diff --git a/tests/ui/privacy/issue-11593.rs b/tests/ui/privacy/issue-11593.rs index 8bf034e8203..fc7174bb201 100644 --- a/tests/ui/privacy/issue-11593.rs +++ b/tests/ui/privacy/issue-11593.rs @@ -1,4 +1,4 @@ -// aux-build:private-trait-xc.rs +//@ aux-build:private-trait-xc.rs extern crate private_trait_xc; diff --git a/tests/ui/privacy/issue-117997.rs b/tests/ui/privacy/issue-117997.rs index d8284ef2997..5d2a417dccf 100644 --- a/tests/ui/privacy/issue-117997.rs +++ b/tests/ui/privacy/issue-117997.rs @@ -1,5 +1,5 @@ -// aux-build:issue-117997.rs -// build-pass +//@ aux-build:issue-117997.rs +//@ build-pass extern crate issue_117997; diff --git a/tests/ui/privacy/issue-119463.rs b/tests/ui/privacy/issue-119463.rs index e010bc9f536..7a7440a790b 100644 --- a/tests/ui/privacy/issue-119463.rs +++ b/tests/ui/privacy/issue-119463.rs @@ -1,4 +1,4 @@ -// aux-build:issue-119463-extern.rs +//@ aux-build:issue-119463-extern.rs extern crate issue_119463_extern; diff --git a/tests/ui/privacy/issue-17718-const-privacy.rs b/tests/ui/privacy/issue-17718-const-privacy.rs index 6ab3a60df87..85a5fec1617 100644 --- a/tests/ui/privacy/issue-17718-const-privacy.rs +++ b/tests/ui/privacy/issue-17718-const-privacy.rs @@ -1,4 +1,4 @@ -// aux-build:issue-17718-const-privacy.rs +//@ aux-build:issue-17718-const-privacy.rs extern crate issue_17718_const_privacy as other; diff --git a/tests/ui/privacy/issue-57264-1.rs b/tests/ui/privacy/issue-57264-1.rs index 59ebc4f54ee..27b2551f171 100644 --- a/tests/ui/privacy/issue-57264-1.rs +++ b/tests/ui/privacy/issue-57264-1.rs @@ -1,5 +1,5 @@ -// check-pass -// aux-build:issue-57264-1.rs +//@ check-pass +//@ aux-build:issue-57264-1.rs extern crate issue_57264_1; diff --git a/tests/ui/privacy/issue-57264-2.rs b/tests/ui/privacy/issue-57264-2.rs index 36ce5fd3b3e..857d73abdde 100644 --- a/tests/ui/privacy/issue-57264-2.rs +++ b/tests/ui/privacy/issue-57264-2.rs @@ -1,5 +1,5 @@ -// check-pass -// aux-build:issue-57264-2.rs +//@ check-pass +//@ aux-build:issue-57264-2.rs extern crate issue_57264_2; diff --git a/tests/ui/privacy/issue-75907_b.rs b/tests/ui/privacy/issue-75907_b.rs index fdfc5907c16..a4781e49617 100644 --- a/tests/ui/privacy/issue-75907_b.rs +++ b/tests/ui/privacy/issue-75907_b.rs @@ -1,5 +1,5 @@ // Test for diagnostic improvement issue #75907, extern crate -// aux-build:issue-75907.rs +//@ aux-build:issue-75907.rs extern crate issue_75907 as a; diff --git a/tests/ui/privacy/issue-92755.rs b/tests/ui/privacy/issue-92755.rs index 49559152b6f..dac72b36736 100644 --- a/tests/ui/privacy/issue-92755.rs +++ b/tests/ui/privacy/issue-92755.rs @@ -1,5 +1,5 @@ -// aux-build:issue-92755.rs -// build-pass +//@ aux-build:issue-92755.rs +//@ build-pass // Thank you @tmiasko for providing the content of this test! diff --git a/tests/ui/privacy/macro-private-reexport.rs b/tests/ui/privacy/macro-private-reexport.rs index d0aab528ed4..ebefde18f1f 100644 --- a/tests/ui/privacy/macro-private-reexport.rs +++ b/tests/ui/privacy/macro-private-reexport.rs @@ -1,4 +1,4 @@ -// edition:2021 +//@ edition:2021 #![feature(decl_macro)] diff --git a/tests/ui/privacy/priv-impl-prim-ty.rs b/tests/ui/privacy/priv-impl-prim-ty.rs index 5d6a6b64ed3..f4c4973f61b 100644 --- a/tests/ui/privacy/priv-impl-prim-ty.rs +++ b/tests/ui/privacy/priv-impl-prim-ty.rs @@ -1,7 +1,7 @@ -// run-pass -// aux-build:priv-impl-prim-ty.rs +//@ run-pass +//@ aux-build:priv-impl-prim-ty.rs -// pretty-expanded FIXME #23616 +//@ pretty-expanded FIXME #23616 extern crate priv_impl_prim_ty as bar; diff --git a/tests/ui/privacy/privacy-ns.rs b/tests/ui/privacy/privacy-ns.rs index c32e3f17880..10d5e722217 100644 --- a/tests/ui/privacy/privacy-ns.rs +++ b/tests/ui/privacy/privacy-ns.rs @@ -1,11 +1,11 @@ -// run-pass +//@ run-pass #![allow(non_snake_case)] // Check we do the correct privacy checks when we import a name and there is an // item with that name in both the value and type namespaces. -// pretty-expanded FIXME #23616 +//@ pretty-expanded FIXME #23616 #![allow(dead_code)] #![allow(unused_imports)] diff --git a/tests/ui/privacy/privacy-reexport.rs b/tests/ui/privacy/privacy-reexport.rs index b3ec3af04ac..df642a57372 100644 --- a/tests/ui/privacy/privacy-reexport.rs +++ b/tests/ui/privacy/privacy-reexport.rs @@ -1,7 +1,7 @@ -// run-pass -// aux-build:privacy_reexport.rs +//@ run-pass +//@ aux-build:privacy_reexport.rs -// pretty-expanded FIXME #23616 +//@ pretty-expanded FIXME #23616 extern crate privacy_reexport; diff --git a/tests/ui/privacy/privacy1-rpass.rs b/tests/ui/privacy/privacy1-rpass.rs index 4e54780dad2..10bc2492bc8 100644 --- a/tests/ui/privacy/privacy1-rpass.rs +++ b/tests/ui/privacy/privacy1-rpass.rs @@ -1,6 +1,6 @@ -// run-pass +//@ run-pass #![allow(dead_code)] -// pretty-expanded FIXME #23616 +//@ pretty-expanded FIXME #23616 pub mod test2 { // This used to generate an ICE (make sure that default functions are diff --git a/tests/ui/privacy/privacy2.rs b/tests/ui/privacy/privacy2.rs index 212bc003e07..33292a65c5d 100644 --- a/tests/ui/privacy/privacy2.rs +++ b/tests/ui/privacy/privacy2.rs @@ -1,4 +1,4 @@ -// compile-flags: -Zdeduplicate-diagnostics=yes +//@ compile-flags: -Zdeduplicate-diagnostics=yes #![feature(start, no_core)] #![no_core] // makes debugging this test *a lot* easier (during resolve) diff --git a/tests/ui/privacy/privacy3.rs b/tests/ui/privacy/privacy3.rs index 3466f5bb1d2..fb1f432410d 100644 --- a/tests/ui/privacy/privacy3.rs +++ b/tests/ui/privacy/privacy3.rs @@ -1,4 +1,4 @@ -// compile-flags: -Zdeduplicate-diagnostics=yes +//@ compile-flags: -Zdeduplicate-diagnostics=yes #![feature(start, no_core)] #![no_core] // makes debugging this test *a lot* easier (during resolve) diff --git a/tests/ui/privacy/privacy5.rs b/tests/ui/privacy/privacy5.rs index 3dc26b1955c..048189c3433 100644 --- a/tests/ui/privacy/privacy5.rs +++ b/tests/ui/privacy/privacy5.rs @@ -1,4 +1,4 @@ -// aux-build:privacy_tuple_struct.rs +//@ aux-build:privacy_tuple_struct.rs extern crate privacy_tuple_struct as other; diff --git a/tests/ui/privacy/private-bounds-locally-allowed.rs b/tests/ui/privacy/private-bounds-locally-allowed.rs index 96a007a64f6..956912249bf 100644 --- a/tests/ui/privacy/private-bounds-locally-allowed.rs +++ b/tests/ui/privacy/private-bounds-locally-allowed.rs @@ -1,5 +1,5 @@ -// check-pass -// compile-flags: --crate-type=lib +//@ check-pass +//@ compile-flags: --crate-type=lib #[allow(private_bounds)] pub trait Foo: FooImpl {} diff --git a/tests/ui/privacy/private-class-field.rs b/tests/ui/privacy/private-class-field.rs index 98e32ee0745..526cb788a12 100644 --- a/tests/ui/privacy/private-class-field.rs +++ b/tests/ui/privacy/private-class-field.rs @@ -1,4 +1,4 @@ -// run-pass +//@ run-pass #![allow(dead_code)] #![allow(non_camel_case_types)] diff --git a/tests/ui/privacy/private-in-public-expr-pat.rs b/tests/ui/privacy/private-in-public-expr-pat.rs index 5c9ecd13b09..529a8f8970f 100644 --- a/tests/ui/privacy/private-in-public-expr-pat.rs +++ b/tests/ui/privacy/private-in-public-expr-pat.rs @@ -1,6 +1,6 @@ // Patterns and expressions are not interface parts and don't produce private-in-public errors. -// build-pass (FIXME(62277): could be check-pass?) +//@ build-pass (FIXME(62277): could be check-pass?) struct Priv1(usize); struct Priv2; diff --git a/tests/ui/privacy/private-in-public-type-alias-impl-trait.rs b/tests/ui/privacy/private-in-public-type-alias-impl-trait.rs index 3fb543e9624..fd0e07fb9b4 100644 --- a/tests/ui/privacy/private-in-public-type-alias-impl-trait.rs +++ b/tests/ui/privacy/private-in-public-type-alias-impl-trait.rs @@ -1,4 +1,4 @@ -// build-pass (FIXME(62277): could be check-pass?) +//@ build-pass (FIXME(62277): could be check-pass?) #![feature(impl_trait_in_assoc_type)] #![feature(type_alias_impl_trait)] #![deny(private_interfaces, private_bounds)] diff --git a/tests/ui/privacy/private-in-public.rs b/tests/ui/privacy/private-in-public.rs index 7b8e0fbe6b6..ee101b31272 100644 --- a/tests/ui/privacy/private-in-public.rs +++ b/tests/ui/privacy/private-in-public.rs @@ -1,4 +1,4 @@ -// check-pass +//@ check-pass // Private types and traits are not allowed in public interfaces. // This test also ensures that the checks are performed even inside private modules. diff --git a/tests/ui/privacy/private-inferred-type-2.rs b/tests/ui/privacy/private-inferred-type-2.rs index 1c4c52bea28..f9cdfe23cab 100644 --- a/tests/ui/privacy/private-inferred-type-2.rs +++ b/tests/ui/privacy/private-inferred-type-2.rs @@ -1,4 +1,4 @@ -// aux-build:private-inferred-type.rs +//@ aux-build:private-inferred-type.rs #![allow(private_interfaces)] extern crate private_inferred_type as ext; diff --git a/tests/ui/privacy/private-inferred-type-3.rs b/tests/ui/privacy/private-inferred-type-3.rs index cdbdcf60b2c..7bf6bea4b0f 100644 --- a/tests/ui/privacy/private-inferred-type-3.rs +++ b/tests/ui/privacy/private-inferred-type-3.rs @@ -1,12 +1,12 @@ -// aux-build:private-inferred-type.rs +//@ aux-build:private-inferred-type.rs -// error-pattern:type `fn() {ext::priv_fn}` is private -// error-pattern:static `ext::PRIV_STATIC` is private -// error-pattern:type `ext::PrivEnum` is private -// error-pattern:type `fn() {::method}` is private -// error-pattern:type `fn(u8) -> ext::PrivTupleStruct {ext::PrivTupleStruct}` is private -// error-pattern:type `fn(u8) -> PubTupleStruct {PubTupleStruct}` is private -// error-pattern:type `for<'a> fn(&'a Pub) {Pub::::priv_method}` is private +//@ error-pattern:type `fn() {ext::priv_fn}` is private +//@ error-pattern:static `ext::PRIV_STATIC` is private +//@ error-pattern:type `ext::PrivEnum` is private +//@ error-pattern:type `fn() {::method}` is private +//@ error-pattern:type `fn(u8) -> ext::PrivTupleStruct {ext::PrivTupleStruct}` is private +//@ error-pattern:type `fn(u8) -> PubTupleStruct {PubTupleStruct}` is private +//@ error-pattern:type `for<'a> fn(&'a Pub) {Pub::::priv_method}` is private #![feature(decl_macro)] diff --git a/tests/ui/privacy/private-method-cross-crate.rs b/tests/ui/privacy/private-method-cross-crate.rs index 4da44e0682b..7a11ab5ad55 100644 --- a/tests/ui/privacy/private-method-cross-crate.rs +++ b/tests/ui/privacy/private-method-cross-crate.rs @@ -1,4 +1,4 @@ -// aux-build:cci_class_5.rs +//@ aux-build:cci_class_5.rs extern crate cci_class_5; use cci_class_5::kitties::cat; diff --git a/tests/ui/privacy/private-method-rpass.rs b/tests/ui/privacy/private-method-rpass.rs index 726944fb251..2ec29327d46 100644 --- a/tests/ui/privacy/private-method-rpass.rs +++ b/tests/ui/privacy/private-method-rpass.rs @@ -1,8 +1,8 @@ -// run-pass +//@ run-pass #![allow(dead_code)] #![allow(non_camel_case_types)] -// pretty-expanded FIXME #23616 +//@ pretty-expanded FIXME #23616 struct cat { meows : usize, diff --git a/tests/ui/privacy/private-struct-field-cross-crate.rs b/tests/ui/privacy/private-struct-field-cross-crate.rs index 301cd37b76c..fa4a4c5c6a5 100644 --- a/tests/ui/privacy/private-struct-field-cross-crate.rs +++ b/tests/ui/privacy/private-struct-field-cross-crate.rs @@ -1,4 +1,4 @@ -// aux-build:cci_class.rs +//@ aux-build:cci_class.rs extern crate cci_class; use cci_class::kitties::cat; diff --git a/tests/ui/privacy/private-type-in-interface.rs b/tests/ui/privacy/private-type-in-interface.rs index 9f55127fd16..2e8be28d76e 100644 --- a/tests/ui/privacy/private-type-in-interface.rs +++ b/tests/ui/privacy/private-type-in-interface.rs @@ -1,4 +1,4 @@ -// aux-build:private-inferred-type.rs +//@ aux-build:private-inferred-type.rs #![allow(warnings)] #![allow(private_interfaces)] diff --git a/tests/ui/privacy/pub-extern-privacy.rs b/tests/ui/privacy/pub-extern-privacy.rs index dbbbe4e3b7d..b6c18bd1ee7 100644 --- a/tests/ui/privacy/pub-extern-privacy.rs +++ b/tests/ui/privacy/pub-extern-privacy.rs @@ -1,7 +1,7 @@ -// run-pass -// ignore-wasm32-bare no libc to test ffi with +//@ run-pass +//@ ignore-wasm32-bare no libc to test ffi with -// pretty-expanded FIXME #23616 +//@ pretty-expanded FIXME #23616 use std::mem::transmute; diff --git a/tests/ui/privacy/pub-priv-dep/pub-priv1.rs b/tests/ui/privacy/pub-priv-dep/pub-priv1.rs index ec8666f93f0..f26dbb47ba5 100644 --- a/tests/ui/privacy/pub-priv-dep/pub-priv1.rs +++ b/tests/ui/privacy/pub-priv-dep/pub-priv1.rs @@ -1,6 +1,6 @@ -// aux-crate:priv:priv_dep=priv_dep.rs -// aux-build:pub_dep.rs -// compile-flags: -Zunstable-options +//@ aux-crate:priv:priv_dep=priv_dep.rs +//@ aux-build:pub_dep.rs +//@ compile-flags: -Zunstable-options #![deny(exported_private_dependencies)] // This crate is a private dependency diff --git a/tests/ui/privacy/pub-priv-dep/std-pub.rs b/tests/ui/privacy/pub-priv-dep/std-pub.rs index e25aa93a02e..348e8d10735 100644 --- a/tests/ui/privacy/pub-priv-dep/std-pub.rs +++ b/tests/ui/privacy/pub-priv-dep/std-pub.rs @@ -1,7 +1,7 @@ // The 'std' crates should always be implicitly public, // without having to pass any compiler arguments -// run-pass +//@ run-pass #![deny(exported_private_dependencies)] diff --git a/tests/ui/privacy/pub-use-xcrate.rs b/tests/ui/privacy/pub-use-xcrate.rs index e8a6e8cf182..96c650d0c68 100644 --- a/tests/ui/privacy/pub-use-xcrate.rs +++ b/tests/ui/privacy/pub-use-xcrate.rs @@ -1,8 +1,8 @@ -// run-pass -// aux-build:pub_use_xcrate1.rs -// aux-build:pub_use_xcrate2.rs +//@ run-pass +//@ aux-build:pub_use_xcrate1.rs +//@ aux-build:pub_use_xcrate2.rs -// pretty-expanded FIXME #23616 +//@ pretty-expanded FIXME #23616 extern crate pub_use_xcrate2; diff --git a/tests/ui/privacy/pub_use_mods_xcrate_exe.rs b/tests/ui/privacy/pub_use_mods_xcrate_exe.rs index f163619e7cb..12b16c8cec8 100644 --- a/tests/ui/privacy/pub_use_mods_xcrate_exe.rs +++ b/tests/ui/privacy/pub_use_mods_xcrate_exe.rs @@ -1,7 +1,7 @@ -// run-pass -// aux-build:pub_use_mods_xcrate.rs +//@ run-pass +//@ aux-build:pub_use_mods_xcrate.rs -// pretty-expanded FIXME #23616 +//@ pretty-expanded FIXME #23616 #![allow(unused_imports)] diff --git a/tests/ui/privacy/reachable-unnameable-items.rs b/tests/ui/privacy/reachable-unnameable-items.rs index 1babe011996..6ad95a77f45 100644 --- a/tests/ui/privacy/reachable-unnameable-items.rs +++ b/tests/ui/privacy/reachable-unnameable-items.rs @@ -1,6 +1,6 @@ -// run-pass -// needs-unwind -// aux-build:reachable-unnameable-items.rs +//@ run-pass +//@ needs-unwind +//@ aux-build:reachable-unnameable-items.rs extern crate reachable_unnameable_items; use reachable_unnameable_items::*; diff --git a/tests/ui/privacy/restricted/lookup-ignores-private.rs b/tests/ui/privacy/restricted/lookup-ignores-private.rs index 240ce1e2b03..7060db0092f 100644 --- a/tests/ui/privacy/restricted/lookup-ignores-private.rs +++ b/tests/ui/privacy/restricted/lookup-ignores-private.rs @@ -1,4 +1,4 @@ -// build-pass (FIXME(62277): could be check-pass?) +//@ build-pass (FIXME(62277): could be check-pass?) #![allow(warnings)] mod foo { diff --git a/tests/ui/privacy/restricted/private-in-public.rs b/tests/ui/privacy/restricted/private-in-public.rs index 80a7e6ad0a7..fa8371436b5 100644 --- a/tests/ui/privacy/restricted/private-in-public.rs +++ b/tests/ui/privacy/restricted/private-in-public.rs @@ -1,4 +1,4 @@ -// check-pass +//@ check-pass mod foo { struct Priv; mod bar { diff --git a/tests/ui/privacy/restricted/relative-2018.rs b/tests/ui/privacy/restricted/relative-2018.rs index 954169a9ffb..e4f290dec4a 100644 --- a/tests/ui/privacy/restricted/relative-2018.rs +++ b/tests/ui/privacy/restricted/relative-2018.rs @@ -1,4 +1,4 @@ -// edition:2018 +//@ edition:2018 mod m { pub(in crate) struct S1; // OK diff --git a/tests/ui/privacy/restricted/test.rs b/tests/ui/privacy/restricted/test.rs index a8c269378c2..e1d87cfcd88 100644 --- a/tests/ui/privacy/restricted/test.rs +++ b/tests/ui/privacy/restricted/test.rs @@ -1,4 +1,4 @@ -// aux-build:pub_restricted.rs +//@ aux-build:pub_restricted.rs #![allow(warnings)] extern crate pub_restricted; diff --git a/tests/ui/privacy/sealed-traits/re-exported-trait.fixed b/tests/ui/privacy/sealed-traits/re-exported-trait.fixed index 6de7b865a99..1553d689a1c 100644 --- a/tests/ui/privacy/sealed-traits/re-exported-trait.fixed +++ b/tests/ui/privacy/sealed-traits/re-exported-trait.fixed @@ -1,4 +1,4 @@ -// run-rustfix +//@ run-rustfix #![allow(dead_code)] pub mod a { diff --git a/tests/ui/privacy/sealed-traits/re-exported-trait.rs b/tests/ui/privacy/sealed-traits/re-exported-trait.rs index bf07d666dff..37eed341be1 100644 --- a/tests/ui/privacy/sealed-traits/re-exported-trait.rs +++ b/tests/ui/privacy/sealed-traits/re-exported-trait.rs @@ -1,4 +1,4 @@ -// run-rustfix +//@ run-rustfix #![allow(dead_code)] pub mod a { diff --git a/tests/ui/privacy/suggest-making-field-public.fixed b/tests/ui/privacy/suggest-making-field-public.fixed index 78e335b3db1..29dcde88ab4 100644 --- a/tests/ui/privacy/suggest-making-field-public.fixed +++ b/tests/ui/privacy/suggest-making-field-public.fixed @@ -1,4 +1,4 @@ -// run-rustfix +//@ run-rustfix mod a { pub struct A(pub String); } diff --git a/tests/ui/privacy/suggest-making-field-public.rs b/tests/ui/privacy/suggest-making-field-public.rs index b65c801d10e..c9f04757b2f 100644 --- a/tests/ui/privacy/suggest-making-field-public.rs +++ b/tests/ui/privacy/suggest-making-field-public.rs @@ -1,4 +1,4 @@ -// run-rustfix +//@ run-rustfix mod a { pub struct A(pub(self)String); } diff --git a/tests/ui/privacy/unresolved-trait-impl-item.rs b/tests/ui/privacy/unresolved-trait-impl-item.rs index fea7c462a8e..1ad6be5c197 100644 --- a/tests/ui/privacy/unresolved-trait-impl-item.rs +++ b/tests/ui/privacy/unresolved-trait-impl-item.rs @@ -1,4 +1,4 @@ -// edition:2018 +//@ edition:2018 trait MyTrait { async fn resolved(&self); diff --git a/tests/ui/privacy/where-pub-type-impls-priv-trait.rs b/tests/ui/privacy/where-pub-type-impls-priv-trait.rs index d5e797b52b3..1ebc396cdf5 100644 --- a/tests/ui/privacy/where-pub-type-impls-priv-trait.rs +++ b/tests/ui/privacy/where-pub-type-impls-priv-trait.rs @@ -1,4 +1,4 @@ -// check-pass +//@ check-pass // priv-in-pub lint tests where the private trait bounds a public type diff --git a/tests/ui/privacy/xc-private-method.rs b/tests/ui/privacy/xc-private-method.rs index f05994646b3..33747c63fa4 100644 --- a/tests/ui/privacy/xc-private-method.rs +++ b/tests/ui/privacy/xc-private-method.rs @@ -1,4 +1,4 @@ -// aux-build:xc-private-method-lib.rs +//@ aux-build:xc-private-method-lib.rs extern crate xc_private_method_lib; diff --git a/tests/ui/privacy/xc-private-method2.rs b/tests/ui/privacy/xc-private-method2.rs index f11b251082b..7976076217e 100644 --- a/tests/ui/privacy/xc-private-method2.rs +++ b/tests/ui/privacy/xc-private-method2.rs @@ -1,4 +1,4 @@ -// aux-build:xc-private-method-lib.rs +//@ aux-build:xc-private-method-lib.rs extern crate xc_private_method_lib; diff --git a/tests/ui/proc-macro/add-impl.rs b/tests/ui/proc-macro/add-impl.rs index ff2897a5e86..7780c39f0c1 100644 --- a/tests/ui/proc-macro/add-impl.rs +++ b/tests/ui/proc-macro/add-impl.rs @@ -1,5 +1,5 @@ -// run-pass -// aux-build:add-impl.rs +//@ run-pass +//@ aux-build:add-impl.rs #[macro_use] extern crate add_impl; diff --git a/tests/ui/proc-macro/allowed-attr-stmt-expr.rs b/tests/ui/proc-macro/allowed-attr-stmt-expr.rs index 25243aeef3b..c5e3ffa1672 100644 --- a/tests/ui/proc-macro/allowed-attr-stmt-expr.rs +++ b/tests/ui/proc-macro/allowed-attr-stmt-expr.rs @@ -1,7 +1,7 @@ -// aux-build:attr-stmt-expr.rs -// aux-build:test-macros.rs -// compile-flags: -Z span-debug -// check-pass +//@ aux-build:attr-stmt-expr.rs +//@ aux-build:test-macros.rs +//@ compile-flags: -Z span-debug +//@ check-pass #![feature(proc_macro_hygiene)] #![feature(stmt_expr_attributes)] diff --git a/tests/ui/proc-macro/allowed-signatures.rs b/tests/ui/proc-macro/allowed-signatures.rs index ce327901b1a..8dede3f50b5 100644 --- a/tests/ui/proc-macro/allowed-signatures.rs +++ b/tests/ui/proc-macro/allowed-signatures.rs @@ -1,6 +1,6 @@ -// check-pass -// force-host -// no-prefer-dynamic +//@ check-pass +//@ force-host +//@ no-prefer-dynamic #![crate_type = "proc-macro"] #![allow(private_interfaces)] diff --git a/tests/ui/proc-macro/ambiguous-builtin-attrs-test.rs b/tests/ui/proc-macro/ambiguous-builtin-attrs-test.rs index 6a47e50f62d..3f191cba745 100644 --- a/tests/ui/proc-macro/ambiguous-builtin-attrs-test.rs +++ b/tests/ui/proc-macro/ambiguous-builtin-attrs-test.rs @@ -1,5 +1,5 @@ -// aux-build:builtin-attrs.rs -// compile-flags:--test +//@ aux-build:builtin-attrs.rs +//@ compile-flags:--test #![feature(decl_macro, test)] diff --git a/tests/ui/proc-macro/ambiguous-builtin-attrs.rs b/tests/ui/proc-macro/ambiguous-builtin-attrs.rs index 695ea69c8e6..c82663541a7 100644 --- a/tests/ui/proc-macro/ambiguous-builtin-attrs.rs +++ b/tests/ui/proc-macro/ambiguous-builtin-attrs.rs @@ -1,5 +1,5 @@ -// edition:2018 -// aux-build:builtin-attrs.rs +//@ edition:2018 +//@ aux-build:builtin-attrs.rs #![feature(decl_macro)] //~ ERROR `feature` is ambiguous extern crate builtin_attrs; diff --git a/tests/ui/proc-macro/amputate-span.fixed b/tests/ui/proc-macro/amputate-span.fixed index 1afc3501a32..0fdaf01357c 100644 --- a/tests/ui/proc-macro/amputate-span.fixed +++ b/tests/ui/proc-macro/amputate-span.fixed @@ -1,7 +1,7 @@ -// aux-build:amputate-span.rs -// run-rustfix -// edition:2018 -// compile-flags: --extern amputate_span +//@ aux-build:amputate-span.rs +//@ run-rustfix +//@ edition:2018 +//@ compile-flags: --extern amputate_span // This test has been crafted to ensure the following things: // diff --git a/tests/ui/proc-macro/amputate-span.rs b/tests/ui/proc-macro/amputate-span.rs index 894a06dd5f6..7081660bc29 100644 --- a/tests/ui/proc-macro/amputate-span.rs +++ b/tests/ui/proc-macro/amputate-span.rs @@ -1,7 +1,7 @@ -// aux-build:amputate-span.rs -// run-rustfix -// edition:2018 -// compile-flags: --extern amputate_span +//@ aux-build:amputate-span.rs +//@ run-rustfix +//@ edition:2018 +//@ compile-flags: --extern amputate_span // This test has been crafted to ensure the following things: // diff --git a/tests/ui/proc-macro/append-impl.rs b/tests/ui/proc-macro/append-impl.rs index a4938401348..f5163e965a0 100644 --- a/tests/ui/proc-macro/append-impl.rs +++ b/tests/ui/proc-macro/append-impl.rs @@ -1,5 +1,5 @@ -// run-pass -// aux-build:append-impl.rs +//@ run-pass +//@ aux-build:append-impl.rs #![allow(warnings)] diff --git a/tests/ui/proc-macro/attr-args.rs b/tests/ui/proc-macro/attr-args.rs index 764f507abfc..ed7e96bcc89 100644 --- a/tests/ui/proc-macro/attr-args.rs +++ b/tests/ui/proc-macro/attr-args.rs @@ -1,5 +1,5 @@ -// run-pass -// aux-build:attr-args.rs +//@ run-pass +//@ aux-build:attr-args.rs #![allow(warnings)] diff --git a/tests/ui/proc-macro/attr-cfg.rs b/tests/ui/proc-macro/attr-cfg.rs index 2aed9e2e814..4679807ad79 100644 --- a/tests/ui/proc-macro/attr-cfg.rs +++ b/tests/ui/proc-macro/attr-cfg.rs @@ -1,6 +1,6 @@ -// run-pass -// aux-build:attr-cfg.rs -// revisions: foo bar +//@ run-pass +//@ aux-build:attr-cfg.rs +//@ revisions: foo bar extern crate attr_cfg; use attr_cfg::attr_cfg; diff --git a/tests/ui/proc-macro/attr-complex-fn.rs b/tests/ui/proc-macro/attr-complex-fn.rs index 47734c94fe2..7baf469d7d0 100644 --- a/tests/ui/proc-macro/attr-complex-fn.rs +++ b/tests/ui/proc-macro/attr-complex-fn.rs @@ -1,6 +1,6 @@ -// check-pass -// compile-flags: -Z span-debug --error-format human -// aux-build:test-macros.rs +//@ check-pass +//@ compile-flags: -Z span-debug --error-format human +//@ aux-build:test-macros.rs #![feature(stmt_expr_attributes)] #![feature(custom_inner_attributes)] diff --git a/tests/ui/proc-macro/attr-invalid-exprs.rs b/tests/ui/proc-macro/attr-invalid-exprs.rs index 9dcffc3405e..3d8806ee800 100644 --- a/tests/ui/proc-macro/attr-invalid-exprs.rs +++ b/tests/ui/proc-macro/attr-invalid-exprs.rs @@ -1,6 +1,6 @@ //! Attributes producing expressions in invalid locations -// aux-build:attr-stmt-expr.rs +//@ aux-build:attr-stmt-expr.rs #![feature(proc_macro_hygiene)] #![feature(stmt_expr_attributes)] diff --git a/tests/ui/proc-macro/attr-on-trait.rs b/tests/ui/proc-macro/attr-on-trait.rs index e0edee630a4..659b461f759 100644 --- a/tests/ui/proc-macro/attr-on-trait.rs +++ b/tests/ui/proc-macro/attr-on-trait.rs @@ -1,5 +1,5 @@ -// run-pass -// aux-build:attr-on-trait.rs +//@ run-pass +//@ aux-build:attr-on-trait.rs extern crate attr_on_trait; diff --git a/tests/ui/proc-macro/attr-stmt-expr-rpass.rs b/tests/ui/proc-macro/attr-stmt-expr-rpass.rs index 16b8fabfc3f..18e477f0129 100644 --- a/tests/ui/proc-macro/attr-stmt-expr-rpass.rs +++ b/tests/ui/proc-macro/attr-stmt-expr-rpass.rs @@ -1,5 +1,5 @@ -// run-pass -// aux-build:attr-stmt-expr-rpass.rs +//@ run-pass +//@ aux-build:attr-stmt-expr-rpass.rs #![feature(stmt_expr_attributes, proc_macro_hygiene)] diff --git a/tests/ui/proc-macro/attr-stmt-expr.rs b/tests/ui/proc-macro/attr-stmt-expr.rs index 0403684cda0..f33c686f284 100644 --- a/tests/ui/proc-macro/attr-stmt-expr.rs +++ b/tests/ui/proc-macro/attr-stmt-expr.rs @@ -1,6 +1,6 @@ -// aux-build:attr-stmt-expr.rs -// aux-build:test-macros.rs -// compile-flags: -Z span-debug +//@ aux-build:attr-stmt-expr.rs +//@ aux-build:test-macros.rs +//@ compile-flags: -Z span-debug #![feature(proc_macro_hygiene)] #![feature(rustc_attrs)] diff --git a/tests/ui/proc-macro/attribute-after-derive.rs b/tests/ui/proc-macro/attribute-after-derive.rs index 0f0f27bff97..3120b23e97e 100644 --- a/tests/ui/proc-macro/attribute-after-derive.rs +++ b/tests/ui/proc-macro/attribute-after-derive.rs @@ -1,9 +1,9 @@ // Macro attributes are allowed after `#[derive]` and // `#[derive]` fully configures the item for following attributes. -// check-pass -// compile-flags: -Z span-debug -// aux-build: test-macros.rs +//@ check-pass +//@ compile-flags: -Z span-debug +//@ aux-build: test-macros.rs #![no_std] // Don't load unnecessary hygiene information from std extern crate std; diff --git a/tests/ui/proc-macro/attribute-spans-preserved.rs b/tests/ui/proc-macro/attribute-spans-preserved.rs index c01fce90593..946b16a0c80 100644 --- a/tests/ui/proc-macro/attribute-spans-preserved.rs +++ b/tests/ui/proc-macro/attribute-spans-preserved.rs @@ -1,4 +1,4 @@ -// aux-build:attribute-spans-preserved.rs +//@ aux-build:attribute-spans-preserved.rs extern crate attribute_spans_preserved as foo; diff --git a/tests/ui/proc-macro/attribute-with-error.rs b/tests/ui/proc-macro/attribute-with-error.rs index aaa6c07dddb..5e81a9c7011 100644 --- a/tests/ui/proc-macro/attribute-with-error.rs +++ b/tests/ui/proc-macro/attribute-with-error.rs @@ -1,4 +1,4 @@ -// aux-build:test-macros.rs +//@ aux-build:test-macros.rs #![feature(custom_inner_attributes)] diff --git a/tests/ui/proc-macro/attribute.rs b/tests/ui/proc-macro/attribute.rs index 9e40e4d9ba6..30ed8ff8247 100644 --- a/tests/ui/proc-macro/attribute.rs +++ b/tests/ui/proc-macro/attribute.rs @@ -1,5 +1,5 @@ -// force-host -// no-prefer-dynamic +//@ force-host +//@ no-prefer-dynamic #![crate_type = "proc-macro"] diff --git a/tests/ui/proc-macro/attributes-included.rs b/tests/ui/proc-macro/attributes-included.rs index 95e8e10a3ec..47fd21fdd24 100644 --- a/tests/ui/proc-macro/attributes-included.rs +++ b/tests/ui/proc-macro/attributes-included.rs @@ -1,5 +1,5 @@ -// aux-build:attributes-included.rs -// check-pass +//@ aux-build:attributes-included.rs +//@ check-pass #![warn(unused)] diff --git a/tests/ui/proc-macro/attributes-on-definitions.rs b/tests/ui/proc-macro/attributes-on-definitions.rs index c0733c8b416..187d1be2364 100644 --- a/tests/ui/proc-macro/attributes-on-definitions.rs +++ b/tests/ui/proc-macro/attributes-on-definitions.rs @@ -1,5 +1,5 @@ -// check-pass -// aux-build:attributes-on-definitions.rs +//@ check-pass +//@ aux-build:attributes-on-definitions.rs #![forbid(unsafe_code)] diff --git a/tests/ui/proc-macro/attributes-on-modules-fail.rs b/tests/ui/proc-macro/attributes-on-modules-fail.rs index 6c30e8f4f95..9b2eb703eac 100644 --- a/tests/ui/proc-macro/attributes-on-modules-fail.rs +++ b/tests/ui/proc-macro/attributes-on-modules-fail.rs @@ -1,4 +1,4 @@ -// aux-build:test-macros.rs +//@ aux-build:test-macros.rs #[macro_use] extern crate test_macros; diff --git a/tests/ui/proc-macro/attributes-on-modules.rs b/tests/ui/proc-macro/attributes-on-modules.rs index 6c73b0bf19c..26c8d8e113b 100644 --- a/tests/ui/proc-macro/attributes-on-modules.rs +++ b/tests/ui/proc-macro/attributes-on-modules.rs @@ -1,5 +1,5 @@ -// check-pass -// aux-build:test-macros.rs +//@ check-pass +//@ aux-build:test-macros.rs #[macro_use] extern crate test_macros; diff --git a/tests/ui/proc-macro/auxiliary/add-impl.rs b/tests/ui/proc-macro/auxiliary/add-impl.rs index 741e64875b6..23a86e76ef9 100644 --- a/tests/ui/proc-macro/auxiliary/add-impl.rs +++ b/tests/ui/proc-macro/auxiliary/add-impl.rs @@ -1,5 +1,5 @@ -// force-host -// no-prefer-dynamic +//@ force-host +//@ no-prefer-dynamic #![crate_type = "proc-macro"] diff --git a/tests/ui/proc-macro/auxiliary/amputate-span.rs b/tests/ui/proc-macro/auxiliary/amputate-span.rs index 1a82119ae95..c1ab0477ba2 100644 --- a/tests/ui/proc-macro/auxiliary/amputate-span.rs +++ b/tests/ui/proc-macro/auxiliary/amputate-span.rs @@ -1,5 +1,5 @@ -// force-host -// no-prefer-dynamic +//@ force-host +//@ no-prefer-dynamic #![crate_type = "proc-macro"] diff --git a/tests/ui/proc-macro/auxiliary/api/mod.rs b/tests/ui/proc-macro/auxiliary/api/mod.rs index 5a533b9e17e..199d097336a 100644 --- a/tests/ui/proc-macro/auxiliary/api/mod.rs +++ b/tests/ui/proc-macro/auxiliary/api/mod.rs @@ -1,6 +1,6 @@ -// force-host -// no-prefer-dynamic -// edition: 2021 +//@ force-host +//@ no-prefer-dynamic +//@ edition: 2021 #![crate_type = "proc-macro"] #![crate_name = "proc_macro_api_tests"] diff --git a/tests/ui/proc-macro/auxiliary/append-impl.rs b/tests/ui/proc-macro/auxiliary/append-impl.rs index b032b133759..30657d2738e 100644 --- a/tests/ui/proc-macro/auxiliary/append-impl.rs +++ b/tests/ui/proc-macro/auxiliary/append-impl.rs @@ -1,5 +1,5 @@ -// force-host -// no-prefer-dynamic +//@ force-host +//@ no-prefer-dynamic #![crate_type = "proc-macro"] diff --git a/tests/ui/proc-macro/auxiliary/assert-span-pos.rs b/tests/ui/proc-macro/auxiliary/assert-span-pos.rs index 8126470ece9..8935ce2bc0a 100644 --- a/tests/ui/proc-macro/auxiliary/assert-span-pos.rs +++ b/tests/ui/proc-macro/auxiliary/assert-span-pos.rs @@ -1,5 +1,5 @@ -// force-host -// no-prefer-dynamic +//@ force-host +//@ no-prefer-dynamic #![feature(proc_macro_diagnostic, proc_macro_span)] #![crate_type = "proc-macro"] diff --git a/tests/ui/proc-macro/auxiliary/attr-args.rs b/tests/ui/proc-macro/auxiliary/attr-args.rs index 5f76a4484e1..1fac41c3721 100644 --- a/tests/ui/proc-macro/auxiliary/attr-args.rs +++ b/tests/ui/proc-macro/auxiliary/attr-args.rs @@ -1,5 +1,5 @@ -// force-host -// no-prefer-dynamic +//@ force-host +//@ no-prefer-dynamic #![crate_type = "proc-macro"] diff --git a/tests/ui/proc-macro/auxiliary/attr-cfg.rs b/tests/ui/proc-macro/auxiliary/attr-cfg.rs index 2f0054cc14a..3645128b509 100644 --- a/tests/ui/proc-macro/auxiliary/attr-cfg.rs +++ b/tests/ui/proc-macro/auxiliary/attr-cfg.rs @@ -1,5 +1,5 @@ -// force-host -// no-prefer-dynamic +//@ force-host +//@ no-prefer-dynamic #![crate_type = "proc-macro"] diff --git a/tests/ui/proc-macro/auxiliary/attr-on-trait.rs b/tests/ui/proc-macro/auxiliary/attr-on-trait.rs index 3787b8eeccc..c4581359da1 100644 --- a/tests/ui/proc-macro/auxiliary/attr-on-trait.rs +++ b/tests/ui/proc-macro/auxiliary/attr-on-trait.rs @@ -1,5 +1,5 @@ -// force-host -// no-prefer-dynamic +//@ force-host +//@ no-prefer-dynamic #![crate_type = "proc-macro"] diff --git a/tests/ui/proc-macro/auxiliary/attr-stmt-expr-rpass.rs b/tests/ui/proc-macro/auxiliary/attr-stmt-expr-rpass.rs index 76346d9a172..c8b7aa412b5 100644 --- a/tests/ui/proc-macro/auxiliary/attr-stmt-expr-rpass.rs +++ b/tests/ui/proc-macro/auxiliary/attr-stmt-expr-rpass.rs @@ -1,5 +1,5 @@ -// force-host -// no-prefer-dynamic +//@ force-host +//@ no-prefer-dynamic #![crate_type = "proc-macro"] diff --git a/tests/ui/proc-macro/auxiliary/attr-stmt-expr.rs b/tests/ui/proc-macro/auxiliary/attr-stmt-expr.rs index 0af62888449..888aab848d4 100644 --- a/tests/ui/proc-macro/auxiliary/attr-stmt-expr.rs +++ b/tests/ui/proc-macro/auxiliary/attr-stmt-expr.rs @@ -1,5 +1,5 @@ -// force-host -// no-prefer-dynamic +//@ force-host +//@ no-prefer-dynamic #![crate_type = "proc-macro"] diff --git a/tests/ui/proc-macro/auxiliary/attribute-spans-preserved.rs b/tests/ui/proc-macro/auxiliary/attribute-spans-preserved.rs index 4d3279584c4..d06903c2708 100644 --- a/tests/ui/proc-macro/auxiliary/attribute-spans-preserved.rs +++ b/tests/ui/proc-macro/auxiliary/attribute-spans-preserved.rs @@ -1,5 +1,5 @@ -// force-host -// no-prefer-dynamic +//@ force-host +//@ no-prefer-dynamic #![crate_type = "proc-macro"] diff --git a/tests/ui/proc-macro/auxiliary/attributes-included.rs b/tests/ui/proc-macro/auxiliary/attributes-included.rs index a5eb40b28dc..cc29818380b 100644 --- a/tests/ui/proc-macro/auxiliary/attributes-included.rs +++ b/tests/ui/proc-macro/auxiliary/attributes-included.rs @@ -1,5 +1,5 @@ -// force-host -// no-prefer-dynamic +//@ force-host +//@ no-prefer-dynamic #![crate_type = "proc-macro"] diff --git a/tests/ui/proc-macro/auxiliary/attributes-on-definitions.rs b/tests/ui/proc-macro/auxiliary/attributes-on-definitions.rs index 93a339840d6..c7e6e681da3 100644 --- a/tests/ui/proc-macro/auxiliary/attributes-on-definitions.rs +++ b/tests/ui/proc-macro/auxiliary/attributes-on-definitions.rs @@ -1,5 +1,5 @@ -// force-host -// no-prefer-dynamic +//@ force-host +//@ no-prefer-dynamic #![feature(allow_internal_unsafe)] #![feature(allow_internal_unstable)] diff --git a/tests/ui/proc-macro/auxiliary/bang-macro.rs b/tests/ui/proc-macro/auxiliary/bang-macro.rs index ff000228218..361643aa8e5 100644 --- a/tests/ui/proc-macro/auxiliary/bang-macro.rs +++ b/tests/ui/proc-macro/auxiliary/bang-macro.rs @@ -1,5 +1,5 @@ -// force-host -// no-prefer-dynamic +//@ force-host +//@ no-prefer-dynamic #![crate_type = "proc-macro"] diff --git a/tests/ui/proc-macro/auxiliary/bang_proc_macro2.rs b/tests/ui/proc-macro/auxiliary/bang_proc_macro2.rs index fcaaba6023d..3df2676ddab 100644 --- a/tests/ui/proc-macro/auxiliary/bang_proc_macro2.rs +++ b/tests/ui/proc-macro/auxiliary/bang_proc_macro2.rs @@ -1,5 +1,5 @@ -// force-host -// no-prefer-dynamic +//@ force-host +//@ no-prefer-dynamic #![crate_type = "proc-macro"] diff --git a/tests/ui/proc-macro/auxiliary/builtin-attrs.rs b/tests/ui/proc-macro/auxiliary/builtin-attrs.rs index 6edafae3985..bd634b4f41c 100644 --- a/tests/ui/proc-macro/auxiliary/builtin-attrs.rs +++ b/tests/ui/proc-macro/auxiliary/builtin-attrs.rs @@ -1,5 +1,5 @@ -// force-host -// no-prefer-dynamic +//@ force-host +//@ no-prefer-dynamic #![crate_type = "proc-macro"] diff --git a/tests/ui/proc-macro/auxiliary/call-deprecated.rs b/tests/ui/proc-macro/auxiliary/call-deprecated.rs index 2f484809a5c..8864de17ed3 100644 --- a/tests/ui/proc-macro/auxiliary/call-deprecated.rs +++ b/tests/ui/proc-macro/auxiliary/call-deprecated.rs @@ -1,5 +1,5 @@ -// force-host -// no-prefer-dynamic +//@ force-host +//@ no-prefer-dynamic #![crate_type = "proc-macro"] diff --git a/tests/ui/proc-macro/auxiliary/call-site.rs b/tests/ui/proc-macro/auxiliary/call-site.rs index e64a5a3438a..ce0fc70c1a6 100644 --- a/tests/ui/proc-macro/auxiliary/call-site.rs +++ b/tests/ui/proc-macro/auxiliary/call-site.rs @@ -1,5 +1,5 @@ -// force-host -// no-prefer-dynamic +//@ force-host +//@ no-prefer-dynamic #![crate_type = "proc-macro"] diff --git a/tests/ui/proc-macro/auxiliary/cond_plugin.rs b/tests/ui/proc-macro/auxiliary/cond_plugin.rs index 8d3c4ec239a..c6cdc8ce8ba 100644 --- a/tests/ui/proc-macro/auxiliary/cond_plugin.rs +++ b/tests/ui/proc-macro/auxiliary/cond_plugin.rs @@ -1,5 +1,5 @@ -// force-host -// no-prefer-dynamic +//@ force-host +//@ no-prefer-dynamic #![crate_type = "proc-macro"] #![feature(proc_macro_quote)] diff --git a/tests/ui/proc-macro/auxiliary/count_compound_ops.rs b/tests/ui/proc-macro/auxiliary/count_compound_ops.rs index 3a656d6485e..86c27f2d818 100644 --- a/tests/ui/proc-macro/auxiliary/count_compound_ops.rs +++ b/tests/ui/proc-macro/auxiliary/count_compound_ops.rs @@ -1,5 +1,5 @@ -// force-host -// no-prefer-dynamic +//@ force-host +//@ no-prefer-dynamic #![feature(proc_macro_quote)] #![crate_type = "proc-macro"] diff --git a/tests/ui/proc-macro/auxiliary/custom-attr-only-one-derive.rs b/tests/ui/proc-macro/auxiliary/custom-attr-only-one-derive.rs index 41f73f5963a..eab7d903e91 100644 --- a/tests/ui/proc-macro/auxiliary/custom-attr-only-one-derive.rs +++ b/tests/ui/proc-macro/auxiliary/custom-attr-only-one-derive.rs @@ -1,5 +1,5 @@ -// force-host -// no-prefer-dynamic +//@ force-host +//@ no-prefer-dynamic #![crate_type = "proc-macro"] diff --git a/tests/ui/proc-macro/auxiliary/custom-quote.rs b/tests/ui/proc-macro/auxiliary/custom-quote.rs index 3b7811748ed..88800596ce5 100644 --- a/tests/ui/proc-macro/auxiliary/custom-quote.rs +++ b/tests/ui/proc-macro/auxiliary/custom-quote.rs @@ -1,5 +1,5 @@ -// force-host -// no-prefer-dynamic +//@ force-host +//@ no-prefer-dynamic // ignore-tidy-linelength #![feature(proc_macro_quote)] diff --git a/tests/ui/proc-macro/auxiliary/derive-a.rs b/tests/ui/proc-macro/auxiliary/derive-a.rs index cd2be5fd84d..50e963a0a41 100644 --- a/tests/ui/proc-macro/auxiliary/derive-a.rs +++ b/tests/ui/proc-macro/auxiliary/derive-a.rs @@ -1,5 +1,5 @@ -// force-host -// no-prefer-dynamic +//@ force-host +//@ no-prefer-dynamic #![crate_type = "proc-macro"] diff --git a/tests/ui/proc-macro/auxiliary/derive-atob.rs b/tests/ui/proc-macro/auxiliary/derive-atob.rs index e78e5bb8f4c..8a1f81450fa 100644 --- a/tests/ui/proc-macro/auxiliary/derive-atob.rs +++ b/tests/ui/proc-macro/auxiliary/derive-atob.rs @@ -1,5 +1,5 @@ -// force-host -// no-prefer-dynamic +//@ force-host +//@ no-prefer-dynamic #![crate_type = "proc-macro"] diff --git a/tests/ui/proc-macro/auxiliary/derive-attr-cfg.rs b/tests/ui/proc-macro/auxiliary/derive-attr-cfg.rs index e7e9634e0bd..b9c0b5e6f77 100644 --- a/tests/ui/proc-macro/auxiliary/derive-attr-cfg.rs +++ b/tests/ui/proc-macro/auxiliary/derive-attr-cfg.rs @@ -1,5 +1,5 @@ -// force-host -// no-prefer-dynamic +//@ force-host +//@ no-prefer-dynamic #![crate_type = "proc-macro"] diff --git a/tests/ui/proc-macro/auxiliary/derive-b-rpass.rs b/tests/ui/proc-macro/auxiliary/derive-b-rpass.rs index 3e6af67a9f4..82f0b4f19ed 100644 --- a/tests/ui/proc-macro/auxiliary/derive-b-rpass.rs +++ b/tests/ui/proc-macro/auxiliary/derive-b-rpass.rs @@ -1,5 +1,5 @@ -// force-host -// no-prefer-dynamic +//@ force-host +//@ no-prefer-dynamic #![crate_type = "proc-macro"] diff --git a/tests/ui/proc-macro/auxiliary/derive-b.rs b/tests/ui/proc-macro/auxiliary/derive-b.rs index e7ab6c0729f..0b2cf31b059 100644 --- a/tests/ui/proc-macro/auxiliary/derive-b.rs +++ b/tests/ui/proc-macro/auxiliary/derive-b.rs @@ -1,5 +1,5 @@ -// force-host -// no-prefer-dynamic +//@ force-host +//@ no-prefer-dynamic #![crate_type = "proc-macro"] diff --git a/tests/ui/proc-macro/auxiliary/derive-bad.rs b/tests/ui/proc-macro/auxiliary/derive-bad.rs index 90bb9b1baf2..3fd2bfc4b63 100644 --- a/tests/ui/proc-macro/auxiliary/derive-bad.rs +++ b/tests/ui/proc-macro/auxiliary/derive-bad.rs @@ -1,5 +1,5 @@ -// force-host -// no-prefer-dynamic +//@ force-host +//@ no-prefer-dynamic #![crate_type = "proc-macro"] diff --git a/tests/ui/proc-macro/auxiliary/derive-clona.rs b/tests/ui/proc-macro/auxiliary/derive-clona.rs index 4a35c9d0dbb..83bcc5b08be 100644 --- a/tests/ui/proc-macro/auxiliary/derive-clona.rs +++ b/tests/ui/proc-macro/auxiliary/derive-clona.rs @@ -1,5 +1,5 @@ -// force-host -// no-prefer-dynamic +//@ force-host +//@ no-prefer-dynamic #![crate_type = "proc-macro"] diff --git a/tests/ui/proc-macro/auxiliary/derive-ctod.rs b/tests/ui/proc-macro/auxiliary/derive-ctod.rs index dbf44ed1b05..78b1b8615b0 100644 --- a/tests/ui/proc-macro/auxiliary/derive-ctod.rs +++ b/tests/ui/proc-macro/auxiliary/derive-ctod.rs @@ -1,5 +1,5 @@ -// force-host -// no-prefer-dynamic +//@ force-host +//@ no-prefer-dynamic #![crate_type = "proc-macro"] diff --git a/tests/ui/proc-macro/auxiliary/derive-foo.rs b/tests/ui/proc-macro/auxiliary/derive-foo.rs index 3ea027d4f53..5c63c3937e4 100644 --- a/tests/ui/proc-macro/auxiliary/derive-foo.rs +++ b/tests/ui/proc-macro/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/ui/proc-macro/auxiliary/derive-helper-shadowing-2.rs b/tests/ui/proc-macro/auxiliary/derive-helper-shadowing-2.rs index 370a1a2794d..d09ff6cadc5 100644 --- a/tests/ui/proc-macro/auxiliary/derive-helper-shadowing-2.rs +++ b/tests/ui/proc-macro/auxiliary/derive-helper-shadowing-2.rs @@ -1,5 +1,5 @@ -// force-host -// no-prefer-dynamic +//@ force-host +//@ no-prefer-dynamic #![crate_type = "proc-macro"] diff --git a/tests/ui/proc-macro/auxiliary/derive-helper-shadowing.rs b/tests/ui/proc-macro/auxiliary/derive-helper-shadowing.rs index 41d3a184640..d1f5b67cf85 100644 --- a/tests/ui/proc-macro/auxiliary/derive-helper-shadowing.rs +++ b/tests/ui/proc-macro/auxiliary/derive-helper-shadowing.rs @@ -1,5 +1,5 @@ -// force-host -// no-prefer-dynamic +//@ force-host +//@ no-prefer-dynamic #![crate_type = "proc-macro"] diff --git a/tests/ui/proc-macro/auxiliary/derive-nothing.rs b/tests/ui/proc-macro/auxiliary/derive-nothing.rs index b6d1e133af7..adf9b4e83fd 100644 --- a/tests/ui/proc-macro/auxiliary/derive-nothing.rs +++ b/tests/ui/proc-macro/auxiliary/derive-nothing.rs @@ -1,5 +1,5 @@ -// force-host -// no-prefer-dynamic +//@ force-host +//@ no-prefer-dynamic #![crate_type = "proc-macro"] diff --git a/tests/ui/proc-macro/auxiliary/derive-same-struct.rs b/tests/ui/proc-macro/auxiliary/derive-same-struct.rs index ce7a50d2381..bfdd71e9a15 100644 --- a/tests/ui/proc-macro/auxiliary/derive-same-struct.rs +++ b/tests/ui/proc-macro/auxiliary/derive-same-struct.rs @@ -1,5 +1,5 @@ -// force-host -// no-prefer-dynamic +//@ force-host +//@ no-prefer-dynamic #![crate_type = "proc-macro"] diff --git a/tests/ui/proc-macro/auxiliary/derive-two-attrs.rs b/tests/ui/proc-macro/auxiliary/derive-two-attrs.rs index a6f0eec126a..24a88dceb4b 100644 --- a/tests/ui/proc-macro/auxiliary/derive-two-attrs.rs +++ b/tests/ui/proc-macro/auxiliary/derive-two-attrs.rs @@ -1,5 +1,5 @@ -// force-host -// no-prefer-dynamic +//@ force-host +//@ no-prefer-dynamic #![crate_type = "proc-macro"] diff --git a/tests/ui/proc-macro/auxiliary/derive-union.rs b/tests/ui/proc-macro/auxiliary/derive-union.rs index d950e1e773c..8bf7041ebad 100644 --- a/tests/ui/proc-macro/auxiliary/derive-union.rs +++ b/tests/ui/proc-macro/auxiliary/derive-union.rs @@ -1,5 +1,5 @@ -// force-host -// no-prefer-dynamic +//@ force-host +//@ no-prefer-dynamic #![crate_type = "proc-macro"] diff --git a/tests/ui/proc-macro/auxiliary/derive-unstable-2.rs b/tests/ui/proc-macro/auxiliary/derive-unstable-2.rs index eac21b04983..f80a2cfdd99 100644 --- a/tests/ui/proc-macro/auxiliary/derive-unstable-2.rs +++ b/tests/ui/proc-macro/auxiliary/derive-unstable-2.rs @@ -1,5 +1,5 @@ -// force-host -// no-prefer-dynamic +//@ force-host +//@ no-prefer-dynamic #![crate_type = "proc-macro"] diff --git a/tests/ui/proc-macro/auxiliary/derive-unstable.rs b/tests/ui/proc-macro/auxiliary/derive-unstable.rs index 2ccd3f88200..c92df49191b 100644 --- a/tests/ui/proc-macro/auxiliary/derive-unstable.rs +++ b/tests/ui/proc-macro/auxiliary/derive-unstable.rs @@ -1,5 +1,5 @@ -// force-host -// no-prefer-dynamic +//@ force-host +//@ no-prefer-dynamic #![crate_type = "proc-macro"] diff --git a/tests/ui/proc-macro/auxiliary/double.rs b/tests/ui/proc-macro/auxiliary/double.rs index 99eb4e37546..ffde0bce245 100644 --- a/tests/ui/proc-macro/auxiliary/double.rs +++ b/tests/ui/proc-macro/auxiliary/double.rs @@ -1,5 +1,5 @@ -// force-host -// no-prefer-dynamic +//@ force-host +//@ no-prefer-dynamic #![feature(proc_macro_quote)] diff --git a/tests/ui/proc-macro/auxiliary/duplicate.rs b/tests/ui/proc-macro/auxiliary/duplicate.rs index b8f82b46f09..bcbb1c7474c 100644 --- a/tests/ui/proc-macro/auxiliary/duplicate.rs +++ b/tests/ui/proc-macro/auxiliary/duplicate.rs @@ -1,5 +1,5 @@ -// force-host -// no-prefer-dynamic +//@ force-host +//@ no-prefer-dynamic #![deny(unused)] #![crate_type = "proc-macro"] diff --git a/tests/ui/proc-macro/auxiliary/edition-gated-async-move-syntax.rs b/tests/ui/proc-macro/auxiliary/edition-gated-async-move-syntax.rs index ce7e60356f2..da6584e31e5 100644 --- a/tests/ui/proc-macro/auxiliary/edition-gated-async-move-syntax.rs +++ b/tests/ui/proc-macro/auxiliary/edition-gated-async-move-syntax.rs @@ -1,5 +1,5 @@ -// force-host -// no-prefer-dynamic +//@ force-host +//@ no-prefer-dynamic // Proc macro helper for issue #89699, used by tests/ui/proc-macro/edition-gated-async-move- // syntax-issue89699.rs, emitting an `async move` closure. This syntax is only available in diff --git a/tests/ui/proc-macro/auxiliary/edition-imports-2015.rs b/tests/ui/proc-macro/auxiliary/edition-imports-2015.rs index 27c59b805e2..c33736a74a7 100644 --- a/tests/ui/proc-macro/auxiliary/edition-imports-2015.rs +++ b/tests/ui/proc-macro/auxiliary/edition-imports-2015.rs @@ -1,6 +1,6 @@ -// edition:2015 -// force-host -// no-prefer-dynamic +//@ edition:2015 +//@ force-host +//@ no-prefer-dynamic #![crate_type = "proc-macro"] diff --git a/tests/ui/proc-macro/auxiliary/empty-crate.rs b/tests/ui/proc-macro/auxiliary/empty-crate.rs index 1cf7534b289..c502cd921cc 100644 --- a/tests/ui/proc-macro/auxiliary/empty-crate.rs +++ b/tests/ui/proc-macro/auxiliary/empty-crate.rs @@ -1,5 +1,5 @@ -// force-host -// no-prefer-dynamic +//@ force-host +//@ no-prefer-dynamic #![crate_type = "proc-macro"] #![deny(unused_variables)] diff --git a/tests/ui/proc-macro/auxiliary/env.rs b/tests/ui/proc-macro/auxiliary/env.rs index 58bcb08bf06..da9aaa5cb56 100644 --- a/tests/ui/proc-macro/auxiliary/env.rs +++ b/tests/ui/proc-macro/auxiliary/env.rs @@ -1,5 +1,5 @@ -// force-host -// no-prefer-dynamic +//@ force-host +//@ no-prefer-dynamic #![crate_type = "proc-macro"] #![feature(proc_macro_tracked_env)] diff --git a/tests/ui/proc-macro/auxiliary/expand-expr.rs b/tests/ui/proc-macro/auxiliary/expand-expr.rs index 1d6ef8a1361..68d0843be5a 100644 --- a/tests/ui/proc-macro/auxiliary/expand-expr.rs +++ b/tests/ui/proc-macro/auxiliary/expand-expr.rs @@ -1,5 +1,5 @@ -// force-host -// no-prefer-dynamic +//@ force-host +//@ no-prefer-dynamic #![crate_type = "proc-macro"] #![deny(warnings)] diff --git a/tests/ui/proc-macro/auxiliary/expand-with-a-macro.rs b/tests/ui/proc-macro/auxiliary/expand-with-a-macro.rs index 5155a4b8558..9096fd71397 100644 --- a/tests/ui/proc-macro/auxiliary/expand-with-a-macro.rs +++ b/tests/ui/proc-macro/auxiliary/expand-with-a-macro.rs @@ -1,5 +1,5 @@ -// force-host -// no-prefer-dynamic +//@ force-host +//@ no-prefer-dynamic #![crate_type = "proc-macro"] #![deny(warnings)] diff --git a/tests/ui/proc-macro/auxiliary/exports_no_mangle.rs b/tests/ui/proc-macro/auxiliary/exports_no_mangle.rs index a8a478ffc74..80236b8905b 100644 --- a/tests/ui/proc-macro/auxiliary/exports_no_mangle.rs +++ b/tests/ui/proc-macro/auxiliary/exports_no_mangle.rs @@ -1,5 +1,5 @@ -// force-host -// no-prefer-dynamic +//@ force-host +//@ no-prefer-dynamic #![crate_type="lib"] // Issue 111888: this crate (1.) is imported by a proc-macro crate and (2.) diff --git a/tests/ui/proc-macro/auxiliary/first-second.rs b/tests/ui/proc-macro/auxiliary/first-second.rs index 6331608fbe5..c8c1defa9f1 100644 --- a/tests/ui/proc-macro/auxiliary/first-second.rs +++ b/tests/ui/proc-macro/auxiliary/first-second.rs @@ -1,5 +1,5 @@ -// force-host -// no-prefer-dynamic +//@ force-host +//@ no-prefer-dynamic #![crate_type = "proc-macro"] diff --git a/tests/ui/proc-macro/auxiliary/gen-lifetime-token.rs b/tests/ui/proc-macro/auxiliary/gen-lifetime-token.rs index d1a1c584f8b..fb05c97833c 100644 --- a/tests/ui/proc-macro/auxiliary/gen-lifetime-token.rs +++ b/tests/ui/proc-macro/auxiliary/gen-lifetime-token.rs @@ -1,5 +1,5 @@ -// force-host -// no-prefer-dynamic +//@ force-host +//@ no-prefer-dynamic #![crate_type = "proc-macro"] diff --git a/tests/ui/proc-macro/auxiliary/gen-macro-rules-hygiene.rs b/tests/ui/proc-macro/auxiliary/gen-macro-rules-hygiene.rs index 548fefe76f5..9d6767dc11f 100644 --- a/tests/ui/proc-macro/auxiliary/gen-macro-rules-hygiene.rs +++ b/tests/ui/proc-macro/auxiliary/gen-macro-rules-hygiene.rs @@ -1,5 +1,5 @@ -// force-host -// no-prefer-dynamic +//@ force-host +//@ no-prefer-dynamic #![crate_type = "proc-macro"] diff --git a/tests/ui/proc-macro/auxiliary/gen-macro-rules.rs b/tests/ui/proc-macro/auxiliary/gen-macro-rules.rs index d4b67d6b0b0..d2f82c52c58 100644 --- a/tests/ui/proc-macro/auxiliary/gen-macro-rules.rs +++ b/tests/ui/proc-macro/auxiliary/gen-macro-rules.rs @@ -1,5 +1,5 @@ -// force-host -// no-prefer-dynamic +//@ force-host +//@ no-prefer-dynamic #![crate_type = "proc-macro"] diff --git a/tests/ui/proc-macro/auxiliary/generate-dollar-ident.rs b/tests/ui/proc-macro/auxiliary/generate-dollar-ident.rs index 3f3e12eed6c..855084be84d 100644 --- a/tests/ui/proc-macro/auxiliary/generate-dollar-ident.rs +++ b/tests/ui/proc-macro/auxiliary/generate-dollar-ident.rs @@ -1,5 +1,5 @@ -// force-host -// no-prefer-dynamic +//@ force-host +//@ no-prefer-dynamic #![feature(proc_macro_quote)] #![crate_type = "proc-macro"] diff --git a/tests/ui/proc-macro/auxiliary/generate-mod.rs b/tests/ui/proc-macro/auxiliary/generate-mod.rs index e950f7d62d6..2ef1faffaa6 100644 --- a/tests/ui/proc-macro/auxiliary/generate-mod.rs +++ b/tests/ui/proc-macro/auxiliary/generate-mod.rs @@ -1,7 +1,7 @@ -// run-pass -// force-host -// no-prefer-dynamic -// ignore-pass +//@ run-pass +//@ force-host +//@ no-prefer-dynamic +//@ ignore-pass #![crate_type = "proc-macro"] diff --git a/tests/ui/proc-macro/auxiliary/hygiene_example_codegen.rs b/tests/ui/proc-macro/auxiliary/hygiene_example_codegen.rs index 2bd4d33360f..e324e3f3129 100644 --- a/tests/ui/proc-macro/auxiliary/hygiene_example_codegen.rs +++ b/tests/ui/proc-macro/auxiliary/hygiene_example_codegen.rs @@ -1,5 +1,5 @@ -// force-host -// no-prefer-dynamic +//@ force-host +//@ no-prefer-dynamic #![feature(proc_macro_quote)] #![crate_type = "proc-macro"] diff --git a/tests/ui/proc-macro/auxiliary/invalid-punct-ident.rs b/tests/ui/proc-macro/auxiliary/invalid-punct-ident.rs index 518dfd0d688..19b3632dc3f 100644 --- a/tests/ui/proc-macro/auxiliary/invalid-punct-ident.rs +++ b/tests/ui/proc-macro/auxiliary/invalid-punct-ident.rs @@ -1,5 +1,5 @@ -// force-host -// no-prefer-dynamic +//@ force-host +//@ no-prefer-dynamic #![crate_type = "proc-macro"] #![feature(proc_macro_raw_ident)] diff --git a/tests/ui/proc-macro/auxiliary/is-available.rs b/tests/ui/proc-macro/auxiliary/is-available.rs index 03f5265e376..f1d0e3c78f5 100644 --- a/tests/ui/proc-macro/auxiliary/is-available.rs +++ b/tests/ui/proc-macro/auxiliary/is-available.rs @@ -1,5 +1,5 @@ -// force-host -// no-prefer-dynamic +//@ force-host +//@ no-prefer-dynamic #![crate_type = "proc-macro"] diff --git a/tests/ui/proc-macro/auxiliary/issue-104884.rs b/tests/ui/proc-macro/auxiliary/issue-104884.rs index 0de59d00573..55d0d76ad18 100644 --- a/tests/ui/proc-macro/auxiliary/issue-104884.rs +++ b/tests/ui/proc-macro/auxiliary/issue-104884.rs @@ -1,5 +1,5 @@ -// force-host -// no-prefer-dynamic +//@ force-host +//@ no-prefer-dynamic #![crate_type = "proc-macro"] diff --git a/tests/ui/proc-macro/auxiliary/issue-107113.rs b/tests/ui/proc-macro/auxiliary/issue-107113.rs index b27d3fd2fbd..5662277acce 100644 --- a/tests/ui/proc-macro/auxiliary/issue-107113.rs +++ b/tests/ui/proc-macro/auxiliary/issue-107113.rs @@ -1,5 +1,5 @@ -// force-host -// no-prefer-dynamic +//@ force-host +//@ no-prefer-dynamic #![crate_type = "proc-macro"] diff --git a/tests/ui/proc-macro/auxiliary/issue-118809.rs b/tests/ui/proc-macro/auxiliary/issue-118809.rs index 029b58c6d0c..f662f623b19 100644 --- a/tests/ui/proc-macro/auxiliary/issue-118809.rs +++ b/tests/ui/proc-macro/auxiliary/issue-118809.rs @@ -1,5 +1,5 @@ -// force-host -// no-prefer-dynamic +//@ force-host +//@ no-prefer-dynamic #![crate_type = "proc-macro"] diff --git a/tests/ui/proc-macro/auxiliary/issue-38586.rs b/tests/ui/proc-macro/auxiliary/issue-38586.rs index f3a19081c47..e2bba3e13d1 100644 --- a/tests/ui/proc-macro/auxiliary/issue-38586.rs +++ b/tests/ui/proc-macro/auxiliary/issue-38586.rs @@ -1,5 +1,5 @@ -// force-host -// no-prefer-dynamic +//@ force-host +//@ no-prefer-dynamic #![crate_type = "proc-macro"] diff --git a/tests/ui/proc-macro/auxiliary/issue-39889.rs b/tests/ui/proc-macro/auxiliary/issue-39889.rs index e7af66da797..b1659d6168e 100644 --- a/tests/ui/proc-macro/auxiliary/issue-39889.rs +++ b/tests/ui/proc-macro/auxiliary/issue-39889.rs @@ -1,5 +1,5 @@ -// force-host -// no-prefer-dynamic +//@ force-host +//@ no-prefer-dynamic #![crate_type = "proc-macro"] diff --git a/tests/ui/proc-macro/auxiliary/issue-42708.rs b/tests/ui/proc-macro/auxiliary/issue-42708.rs index dae05204b8b..ed5ba530341 100644 --- a/tests/ui/proc-macro/auxiliary/issue-42708.rs +++ b/tests/ui/proc-macro/auxiliary/issue-42708.rs @@ -1,5 +1,5 @@ -// force-host -// no-prefer-dynamic +//@ force-host +//@ no-prefer-dynamic #![crate_type = "proc-macro"] diff --git a/tests/ui/proc-macro/auxiliary/issue-50061.rs b/tests/ui/proc-macro/auxiliary/issue-50061.rs index f5fe8cabbce..9ecbb383d4b 100644 --- a/tests/ui/proc-macro/auxiliary/issue-50061.rs +++ b/tests/ui/proc-macro/auxiliary/issue-50061.rs @@ -1,5 +1,5 @@ -// force-host -// no-prefer-dynamic +//@ force-host +//@ no-prefer-dynamic #![crate_type = "proc-macro"] diff --git a/tests/ui/proc-macro/auxiliary/issue-50493.rs b/tests/ui/proc-macro/auxiliary/issue-50493.rs index f72024948a9..e9ad8600533 100644 --- a/tests/ui/proc-macro/auxiliary/issue-50493.rs +++ b/tests/ui/proc-macro/auxiliary/issue-50493.rs @@ -1,5 +1,5 @@ -// force-host -// no-prefer-dynamic +//@ force-host +//@ no-prefer-dynamic #![crate_type = "proc-macro"] diff --git a/tests/ui/proc-macro/auxiliary/issue-59191.rs b/tests/ui/proc-macro/auxiliary/issue-59191.rs index d9ee77067ec..40ba0063e43 100644 --- a/tests/ui/proc-macro/auxiliary/issue-59191.rs +++ b/tests/ui/proc-macro/auxiliary/issue-59191.rs @@ -1,6 +1,6 @@ -// edition:2018 -// force-host -// no-prefer-dynamic +//@ edition:2018 +//@ force-host +//@ no-prefer-dynamic #![crate_type = "proc-macro"] diff --git a/tests/ui/proc-macro/auxiliary/issue-66286.rs b/tests/ui/proc-macro/auxiliary/issue-66286.rs index 6217f1c7e61..d224dcda590 100644 --- a/tests/ui/proc-macro/auxiliary/issue-66286.rs +++ b/tests/ui/proc-macro/auxiliary/issue-66286.rs @@ -1,5 +1,5 @@ -// force-host -// no-prefer-dynamic +//@ force-host +//@ no-prefer-dynamic #![crate_type = "proc-macro"] diff --git a/tests/ui/proc-macro/auxiliary/issue-75801.rs b/tests/ui/proc-macro/auxiliary/issue-75801.rs index d6c031d7d4f..bd553b7ab84 100644 --- a/tests/ui/proc-macro/auxiliary/issue-75801.rs +++ b/tests/ui/proc-macro/auxiliary/issue-75801.rs @@ -1,5 +1,5 @@ -// force-host -// no-prefer-dynamic +//@ force-host +//@ no-prefer-dynamic #![crate_type = "proc-macro"] diff --git a/tests/ui/proc-macro/auxiliary/issue-79242.rs b/tests/ui/proc-macro/auxiliary/issue-79242.rs index e586980f0ad..7b24e5a2ef2 100644 --- a/tests/ui/proc-macro/auxiliary/issue-79242.rs +++ b/tests/ui/proc-macro/auxiliary/issue-79242.rs @@ -1,5 +1,5 @@ -// force-host -// no-prefer-dynamic +//@ force-host +//@ no-prefer-dynamic #![crate_type = "proc-macro"] diff --git a/tests/ui/proc-macro/auxiliary/issue-79825.rs b/tests/ui/proc-macro/auxiliary/issue-79825.rs index 69cf5904f90..4326712458b 100644 --- a/tests/ui/proc-macro/auxiliary/issue-79825.rs +++ b/tests/ui/proc-macro/auxiliary/issue-79825.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/ui/proc-macro/auxiliary/issue-83510.rs b/tests/ui/proc-macro/auxiliary/issue-83510.rs index 1d6ef3914a9..6e8e2d1f780 100644 --- a/tests/ui/proc-macro/auxiliary/issue-83510.rs +++ b/tests/ui/proc-macro/auxiliary/issue-83510.rs @@ -1,5 +1,5 @@ -// force-host -// no-prefer-dynamic +//@ force-host +//@ no-prefer-dynamic #![crate_type = "proc-macro"] diff --git a/tests/ui/proc-macro/auxiliary/issue-91800-macro.rs b/tests/ui/proc-macro/auxiliary/issue-91800-macro.rs index 958a8bed9e2..a638a33cf25 100644 --- a/tests/ui/proc-macro/auxiliary/issue-91800-macro.rs +++ b/tests/ui/proc-macro/auxiliary/issue-91800-macro.rs @@ -1,5 +1,5 @@ -// force-host -// no-prefer-dynamic +//@ force-host +//@ no-prefer-dynamic #![crate_type = "proc-macro"] diff --git a/tests/ui/proc-macro/auxiliary/lifetimes-rpass.rs b/tests/ui/proc-macro/auxiliary/lifetimes-rpass.rs index 4e5d22e6e3e..4f605ed07b3 100644 --- a/tests/ui/proc-macro/auxiliary/lifetimes-rpass.rs +++ b/tests/ui/proc-macro/auxiliary/lifetimes-rpass.rs @@ -1,5 +1,5 @@ -// force-host -// no-prefer-dynamic +//@ force-host +//@ no-prefer-dynamic #![crate_type = "proc-macro"] diff --git a/tests/ui/proc-macro/auxiliary/lifetimes.rs b/tests/ui/proc-macro/auxiliary/lifetimes.rs index 212164dd2c9..79885a92f68 100644 --- a/tests/ui/proc-macro/auxiliary/lifetimes.rs +++ b/tests/ui/proc-macro/auxiliary/lifetimes.rs @@ -1,5 +1,5 @@ -// force-host -// no-prefer-dynamic +//@ force-host +//@ no-prefer-dynamic #![crate_type = "proc-macro"] diff --git a/tests/ui/proc-macro/auxiliary/macro-only-syntax.rs b/tests/ui/proc-macro/auxiliary/macro-only-syntax.rs index 4ca3a0faa27..501a03985cb 100644 --- a/tests/ui/proc-macro/auxiliary/macro-only-syntax.rs +++ b/tests/ui/proc-macro/auxiliary/macro-only-syntax.rs @@ -1,5 +1,5 @@ -// force-host -// no-prefer-dynamic +//@ force-host +//@ no-prefer-dynamic // These are tests for syntax that is accepted by the Rust parser but // unconditionally rejected semantically after macro expansion. Attribute macros diff --git a/tests/ui/proc-macro/auxiliary/make-macro.rs b/tests/ui/proc-macro/auxiliary/make-macro.rs index 3c851b6de2a..a0db47885a1 100644 --- a/tests/ui/proc-macro/auxiliary/make-macro.rs +++ b/tests/ui/proc-macro/auxiliary/make-macro.rs @@ -1,4 +1,4 @@ -// force-host +//@ force-host #[macro_export] macro_rules! make_it { diff --git a/tests/ui/proc-macro/auxiliary/meta-macro.rs b/tests/ui/proc-macro/auxiliary/meta-macro.rs index 0a9b9887d95..cbe882c173f 100644 --- a/tests/ui/proc-macro/auxiliary/meta-macro.rs +++ b/tests/ui/proc-macro/auxiliary/meta-macro.rs @@ -1,6 +1,6 @@ -// force-host -// no-prefer-dynamic -// edition:2018 +//@ force-host +//@ no-prefer-dynamic +//@ edition:2018 #![feature(proc_macro_def_site)] #![crate_type = "proc-macro"] diff --git a/tests/ui/proc-macro/auxiliary/mixed-site-span.rs b/tests/ui/proc-macro/auxiliary/mixed-site-span.rs index c2a49870048..c143e2d40f3 100644 --- a/tests/ui/proc-macro/auxiliary/mixed-site-span.rs +++ b/tests/ui/proc-macro/auxiliary/mixed-site-span.rs @@ -1,5 +1,5 @@ -// force-host -// no-prefer-dynamic +//@ force-host +//@ no-prefer-dynamic #![feature(proc_macro_quote)] diff --git a/tests/ui/proc-macro/auxiliary/modify-ast.rs b/tests/ui/proc-macro/auxiliary/modify-ast.rs index cc582c1522c..174c588e8bf 100644 --- a/tests/ui/proc-macro/auxiliary/modify-ast.rs +++ b/tests/ui/proc-macro/auxiliary/modify-ast.rs @@ -1,5 +1,5 @@ -// force-host -// no-prefer-dynamic +//@ force-host +//@ no-prefer-dynamic #![crate_type = "proc-macro"] diff --git a/tests/ui/proc-macro/auxiliary/multiple-derives.rs b/tests/ui/proc-macro/auxiliary/multiple-derives.rs index e3f6607b2ae..84a826cf1f6 100644 --- a/tests/ui/proc-macro/auxiliary/multiple-derives.rs +++ b/tests/ui/proc-macro/auxiliary/multiple-derives.rs @@ -1,5 +1,5 @@ -// force-host -// no-prefer-dynamic +//@ force-host +//@ no-prefer-dynamic #![crate_type = "proc-macro"] diff --git a/tests/ui/proc-macro/auxiliary/multispan.rs b/tests/ui/proc-macro/auxiliary/multispan.rs index c05d15643db..b5f1ed9b56a 100644 --- a/tests/ui/proc-macro/auxiliary/multispan.rs +++ b/tests/ui/proc-macro/auxiliary/multispan.rs @@ -1,5 +1,5 @@ -// force-host -// no-prefer-dynamic +//@ force-host +//@ no-prefer-dynamic #![crate_type = "proc-macro"] #![feature(proc_macro_diagnostic, proc_macro_span, proc_macro_def_site)] diff --git a/tests/ui/proc-macro/auxiliary/negative-token.rs b/tests/ui/proc-macro/auxiliary/negative-token.rs index 8b89f2e3731..43355bfd20b 100644 --- a/tests/ui/proc-macro/auxiliary/negative-token.rs +++ b/tests/ui/proc-macro/auxiliary/negative-token.rs @@ -1,5 +1,5 @@ -// force-host -// no-prefer-dynamic +//@ force-host +//@ no-prefer-dynamic #![crate_type = "proc-macro"] diff --git a/tests/ui/proc-macro/auxiliary/nonterminal-recollect-attr.rs b/tests/ui/proc-macro/auxiliary/nonterminal-recollect-attr.rs index ea5ff466570..48ae3600192 100644 --- a/tests/ui/proc-macro/auxiliary/nonterminal-recollect-attr.rs +++ b/tests/ui/proc-macro/auxiliary/nonterminal-recollect-attr.rs @@ -1,5 +1,5 @@ -// force-host -// no-prefer-dynamic +//@ force-host +//@ no-prefer-dynamic #![crate_type = "proc-macro"] #![feature(proc_macro_quote)] diff --git a/tests/ui/proc-macro/auxiliary/not-joint.rs b/tests/ui/proc-macro/auxiliary/not-joint.rs index e6c09f7628e..5f94805361a 100644 --- a/tests/ui/proc-macro/auxiliary/not-joint.rs +++ b/tests/ui/proc-macro/auxiliary/not-joint.rs @@ -1,5 +1,5 @@ -// force-host -// no-prefer-dynamic +//@ force-host +//@ no-prefer-dynamic #![crate_type = "proc-macro"] diff --git a/tests/ui/proc-macro/auxiliary/parent-source-spans.rs b/tests/ui/proc-macro/auxiliary/parent-source-spans.rs index 594f1088332..3ec92d71332 100644 --- a/tests/ui/proc-macro/auxiliary/parent-source-spans.rs +++ b/tests/ui/proc-macro/auxiliary/parent-source-spans.rs @@ -1,5 +1,5 @@ -// force-host -// no-prefer-dynamic +//@ force-host +//@ no-prefer-dynamic #![feature(proc_macro_diagnostic, proc_macro_span)] #![crate_type = "proc-macro"] diff --git a/tests/ui/proc-macro/auxiliary/print-tokens.rs b/tests/ui/proc-macro/auxiliary/print-tokens.rs index 3a5767edb15..6d25f1f8471 100644 --- a/tests/ui/proc-macro/auxiliary/print-tokens.rs +++ b/tests/ui/proc-macro/auxiliary/print-tokens.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/ui/proc-macro/auxiliary/proc-macro-panic.rs b/tests/ui/proc-macro/auxiliary/proc-macro-panic.rs index fc15bb9c59d..cfd6464661e 100644 --- a/tests/ui/proc-macro/auxiliary/proc-macro-panic.rs +++ b/tests/ui/proc-macro/auxiliary/proc-macro-panic.rs @@ -1,5 +1,5 @@ -// force-host -// no-prefer-dynamic +//@ force-host +//@ no-prefer-dynamic #![crate_type = "proc-macro"] diff --git a/tests/ui/proc-macro/auxiliary/raw-ident.rs b/tests/ui/proc-macro/auxiliary/raw-ident.rs index 9daee21aa17..1fec6179756 100644 --- a/tests/ui/proc-macro/auxiliary/raw-ident.rs +++ b/tests/ui/proc-macro/auxiliary/raw-ident.rs @@ -1,5 +1,5 @@ -// force-host -// no-prefer-dynamic +//@ force-host +//@ no-prefer-dynamic #![crate_type = "proc-macro"] diff --git a/tests/ui/proc-macro/auxiliary/re-export.rs b/tests/ui/proc-macro/auxiliary/re-export.rs index e8e9c9d3ecb..a886015a031 100644 --- a/tests/ui/proc-macro/auxiliary/re-export.rs +++ b/tests/ui/proc-macro/auxiliary/re-export.rs @@ -1,5 +1,5 @@ -// force-host -// no-prefer-dynamic +//@ force-host +//@ no-prefer-dynamic #![crate_type = "proc-macro"] diff --git a/tests/ui/proc-macro/auxiliary/recollect.rs b/tests/ui/proc-macro/auxiliary/recollect.rs index d4494a5aff2..7db29035f71 100644 --- a/tests/ui/proc-macro/auxiliary/recollect.rs +++ b/tests/ui/proc-macro/auxiliary/recollect.rs @@ -1,5 +1,5 @@ -// force-host -// no-prefer-dynamic +//@ force-host +//@ no-prefer-dynamic #![crate_type = "proc-macro"] diff --git a/tests/ui/proc-macro/auxiliary/resolved-located-at.rs b/tests/ui/proc-macro/auxiliary/resolved-located-at.rs index db660824fbb..032d41688af 100644 --- a/tests/ui/proc-macro/auxiliary/resolved-located-at.rs +++ b/tests/ui/proc-macro/auxiliary/resolved-located-at.rs @@ -1,5 +1,5 @@ -// force-host -// no-prefer-dynamic +//@ force-host +//@ no-prefer-dynamic #![feature(proc_macro_def_site)] #![feature(proc_macro_diagnostic)] diff --git a/tests/ui/proc-macro/auxiliary/span-api-tests.rs b/tests/ui/proc-macro/auxiliary/span-api-tests.rs index ad1e770a4dc..16640a32098 100644 --- a/tests/ui/proc-macro/auxiliary/span-api-tests.rs +++ b/tests/ui/proc-macro/auxiliary/span-api-tests.rs @@ -1,5 +1,5 @@ -// force-host -// no-prefer-dynamic +//@ force-host +//@ no-prefer-dynamic #![crate_type = "proc-macro"] #![feature(proc_macro_span)] diff --git a/tests/ui/proc-macro/auxiliary/span-from-proc-macro.rs b/tests/ui/proc-macro/auxiliary/span-from-proc-macro.rs index 49292acfea7..fdcca29e177 100644 --- a/tests/ui/proc-macro/auxiliary/span-from-proc-macro.rs +++ b/tests/ui/proc-macro/auxiliary/span-from-proc-macro.rs @@ -1,5 +1,5 @@ -// force-host -// no-prefer-dynamic +//@ force-host +//@ no-prefer-dynamic #![feature(proc_macro_quote)] #![feature(proc_macro_internals)] // FIXME - this shouldn't be necessary diff --git a/tests/ui/proc-macro/auxiliary/subspan.rs b/tests/ui/proc-macro/auxiliary/subspan.rs index f92adc04023..69a9c8a9fa8 100644 --- a/tests/ui/proc-macro/auxiliary/subspan.rs +++ b/tests/ui/proc-macro/auxiliary/subspan.rs @@ -1,5 +1,5 @@ -// force-host -// no-prefer-dynamic +//@ force-host +//@ no-prefer-dynamic #![crate_type = "proc-macro"] #![feature(proc_macro_diagnostic, proc_macro_span)] diff --git a/tests/ui/proc-macro/auxiliary/test-macros.rs b/tests/ui/proc-macro/auxiliary/test-macros.rs index 7a46aee462b..69a89e94cd6 100644 --- a/tests/ui/proc-macro/auxiliary/test-macros.rs +++ b/tests/ui/proc-macro/auxiliary/test-macros.rs @@ -1,5 +1,5 @@ -// force-host -// no-prefer-dynamic +//@ force-host +//@ no-prefer-dynamic // Proc macros commonly used by tests. // `panic`/`print` -> `panic_bang`/`print_bang` to avoid conflicts with standard macros. diff --git a/tests/ui/proc-macro/auxiliary/three-equals.rs b/tests/ui/proc-macro/auxiliary/three-equals.rs index e740e86e5d0..f0ff0437a8b 100644 --- a/tests/ui/proc-macro/auxiliary/three-equals.rs +++ b/tests/ui/proc-macro/auxiliary/three-equals.rs @@ -1,5 +1,5 @@ -// force-host -// no-prefer-dynamic +//@ force-host +//@ no-prefer-dynamic #![crate_type = "proc-macro"] #![feature(proc_macro_diagnostic, proc_macro_span, proc_macro_def_site)] diff --git a/tests/ui/proc-macro/auxiliary/weird-hygiene.rs b/tests/ui/proc-macro/auxiliary/weird-hygiene.rs index 338e436df50..f401f7d55ba 100644 --- a/tests/ui/proc-macro/auxiliary/weird-hygiene.rs +++ b/tests/ui/proc-macro/auxiliary/weird-hygiene.rs @@ -1,5 +1,5 @@ -// force-host -// no-prefer-dynamic +//@ force-host +//@ no-prefer-dynamic #![crate_type = "proc-macro"] diff --git a/tests/ui/proc-macro/bad-projection.rs b/tests/ui/proc-macro/bad-projection.rs index c3ac624b600..e633191bd31 100644 --- a/tests/ui/proc-macro/bad-projection.rs +++ b/tests/ui/proc-macro/bad-projection.rs @@ -1,5 +1,5 @@ -// force-host -// no-prefer-dynamic +//@ force-host +//@ no-prefer-dynamic #![crate_type = "proc-macro"] #![allow(warnings)] diff --git a/tests/ui/proc-macro/bang-macro.rs b/tests/ui/proc-macro/bang-macro.rs index 92810791314..03d4174d652 100644 --- a/tests/ui/proc-macro/bang-macro.rs +++ b/tests/ui/proc-macro/bang-macro.rs @@ -1,5 +1,5 @@ -// run-pass -// aux-build:bang-macro.rs +//@ run-pass +//@ aux-build:bang-macro.rs extern crate bang_macro; use bang_macro::rewrite; diff --git a/tests/ui/proc-macro/break-token-spans.rs b/tests/ui/proc-macro/break-token-spans.rs index 59dc3b5043c..ae90e04e081 100644 --- a/tests/ui/proc-macro/break-token-spans.rs +++ b/tests/ui/proc-macro/break-token-spans.rs @@ -1,4 +1,4 @@ -// aux-build:test-macros.rs +//@ aux-build:test-macros.rs // Regression test for issues #68489 and #70987 // Tests that we properly break tokens in `probably_equal_for_proc_macro` // See #72306 diff --git a/tests/ui/proc-macro/call-deprecated.rs b/tests/ui/proc-macro/call-deprecated.rs index cb634671bd4..1779e33f3b1 100644 --- a/tests/ui/proc-macro/call-deprecated.rs +++ b/tests/ui/proc-macro/call-deprecated.rs @@ -1,5 +1,5 @@ -// check-pass -// aux-build:call-deprecated.rs +//@ check-pass +//@ aux-build:call-deprecated.rs extern crate call_deprecated; diff --git a/tests/ui/proc-macro/call-site.rs b/tests/ui/proc-macro/call-site.rs index 12c77250c0e..31fa78902d5 100644 --- a/tests/ui/proc-macro/call-site.rs +++ b/tests/ui/proc-macro/call-site.rs @@ -1,5 +1,5 @@ -// check-pass -// aux-build:call-site.rs +//@ check-pass +//@ aux-build:call-site.rs extern crate call_site; diff --git a/tests/ui/proc-macro/capture-macro-rules-invoke.rs b/tests/ui/proc-macro/capture-macro-rules-invoke.rs index de008a3708a..71a290c1fc0 100644 --- a/tests/ui/proc-macro/capture-macro-rules-invoke.rs +++ b/tests/ui/proc-macro/capture-macro-rules-invoke.rs @@ -1,6 +1,6 @@ -// aux-build:test-macros.rs -// check-pass -// compile-flags: -Z span-debug +//@ aux-build:test-macros.rs +//@ check-pass +//@ compile-flags: -Z span-debug #![no_std] // Don't load unnecessary hygiene information from std extern crate std; diff --git a/tests/ui/proc-macro/capture-unglued-token.rs b/tests/ui/proc-macro/capture-unglued-token.rs index 727b779776b..32286ed084c 100644 --- a/tests/ui/proc-macro/capture-unglued-token.rs +++ b/tests/ui/proc-macro/capture-unglued-token.rs @@ -1,6 +1,6 @@ -// aux-build:test-macros.rs -// compile-flags: -Z span-debug -// check-pass +//@ aux-build:test-macros.rs +//@ compile-flags: -Z span-debug +//@ check-pass // Tests that we properly handle parsing a nonterminal // where we have two consecutive angle brackets (one inside diff --git a/tests/ui/proc-macro/cfg-eval-inner.rs b/tests/ui/proc-macro/cfg-eval-inner.rs index 5fd3ca0d163..d0a6c1afa23 100644 --- a/tests/ui/proc-macro/cfg-eval-inner.rs +++ b/tests/ui/proc-macro/cfg-eval-inner.rs @@ -1,6 +1,6 @@ -// compile-flags: -Z span-debug -// aux-build:test-macros.rs -// check-pass +//@ compile-flags: -Z span-debug +//@ aux-build:test-macros.rs +//@ check-pass #![feature(cfg_eval)] #![feature(custom_inner_attributes)] diff --git a/tests/ui/proc-macro/cfg-eval.rs b/tests/ui/proc-macro/cfg-eval.rs index fa6d015e48e..bbf11949e7e 100644 --- a/tests/ui/proc-macro/cfg-eval.rs +++ b/tests/ui/proc-macro/cfg-eval.rs @@ -1,6 +1,6 @@ -// check-pass -// compile-flags: -Z span-debug -// aux-build:test-macros.rs +//@ check-pass +//@ compile-flags: -Z span-debug +//@ aux-build:test-macros.rs #![feature(cfg_eval)] #![feature(proc_macro_hygiene)] diff --git a/tests/ui/proc-macro/count_compound_ops.rs b/tests/ui/proc-macro/count_compound_ops.rs index 2cb87184488..e58c36e047d 100644 --- a/tests/ui/proc-macro/count_compound_ops.rs +++ b/tests/ui/proc-macro/count_compound_ops.rs @@ -1,5 +1,5 @@ -// run-pass -// aux-build:count_compound_ops.rs +//@ run-pass +//@ aux-build:count_compound_ops.rs extern crate count_compound_ops; use count_compound_ops::count_compound_ops; diff --git a/tests/ui/proc-macro/crate-attrs-multiple.rs b/tests/ui/proc-macro/crate-attrs-multiple.rs index 29a0eca4172..24f46b0a2fa 100644 --- a/tests/ui/proc-macro/crate-attrs-multiple.rs +++ b/tests/ui/proc-macro/crate-attrs-multiple.rs @@ -1,7 +1,7 @@ // Multiple custom crate-level attributes, both inert and active. -// check-pass -// aux-crate:test_macros=test-macros.rs +//@ check-pass +//@ aux-crate:test_macros=test-macros.rs #![feature(custom_inner_attributes)] #![feature(prelude_import)] diff --git a/tests/ui/proc-macro/crate-var.rs b/tests/ui/proc-macro/crate-var.rs index c0518e4b08c..7388ca68358 100644 --- a/tests/ui/proc-macro/crate-var.rs +++ b/tests/ui/proc-macro/crate-var.rs @@ -1,6 +1,6 @@ -// run-pass -// aux-build:double.rs -// aux-build:external-crate-var.rs +//@ run-pass +//@ aux-build:double.rs +//@ aux-build:external-crate-var.rs #![allow(unused)] diff --git a/tests/ui/proc-macro/crt-static.rs b/tests/ui/proc-macro/crt-static.rs index 78592f82709..546d30dbad7 100644 --- a/tests/ui/proc-macro/crt-static.rs +++ b/tests/ui/proc-macro/crt-static.rs @@ -1,13 +1,13 @@ // Test proc-macro crate can be built without additional RUSTFLAGS // on musl target // override -Ctarget-feature=-crt-static from compiletest -// compile-flags: --crate-type proc-macro -Ctarget-feature= -// ignore-wasm32 -// ignore-sgx no support for proc-macro crate type -// build-pass -// force-host -// no-prefer-dynamic -// needs-dynamic-linking +//@ compile-flags: --crate-type proc-macro -Ctarget-feature= +//@ ignore-wasm32 +//@ ignore-sgx no support for proc-macro crate type +//@ build-pass +//@ force-host +//@ no-prefer-dynamic +//@ needs-dynamic-linking #![crate_type = "proc-macro"] diff --git a/tests/ui/proc-macro/custom-attr-only-one-derive.rs b/tests/ui/proc-macro/custom-attr-only-one-derive.rs index 901394384d5..2616c122a65 100644 --- a/tests/ui/proc-macro/custom-attr-only-one-derive.rs +++ b/tests/ui/proc-macro/custom-attr-only-one-derive.rs @@ -1,5 +1,5 @@ -// run-pass -// aux-build:custom-attr-only-one-derive.rs +//@ run-pass +//@ aux-build:custom-attr-only-one-derive.rs #[macro_use] extern crate custom_attr_only_one_derive; diff --git a/tests/ui/proc-macro/debug/auxiliary/macro-dump-debug.rs b/tests/ui/proc-macro/debug/auxiliary/macro-dump-debug.rs index 56ad0612f74..2d7bff83681 100644 --- a/tests/ui/proc-macro/debug/auxiliary/macro-dump-debug.rs +++ b/tests/ui/proc-macro/debug/auxiliary/macro-dump-debug.rs @@ -1,5 +1,5 @@ -// force-host -// no-prefer-dynamic +//@ force-host +//@ no-prefer-dynamic #![crate_type = "proc-macro"] #![crate_name = "macro_dump_debug"] diff --git a/tests/ui/proc-macro/debug/dump-debug-span-debug.rs b/tests/ui/proc-macro/debug/dump-debug-span-debug.rs index 102bd6b7b17..d4d9199bf3b 100644 --- a/tests/ui/proc-macro/debug/dump-debug-span-debug.rs +++ b/tests/ui/proc-macro/debug/dump-debug-span-debug.rs @@ -1,6 +1,6 @@ -// run-pass -// aux-build:macro-dump-debug.rs -// compile-flags: -Z span-debug +//@ run-pass +//@ aux-build:macro-dump-debug.rs +//@ compile-flags: -Z span-debug extern crate macro_dump_debug; diff --git a/tests/ui/proc-macro/debug/dump-debug.rs b/tests/ui/proc-macro/debug/dump-debug.rs index 0ed36b690f4..7a5cc979df9 100644 --- a/tests/ui/proc-macro/debug/dump-debug.rs +++ b/tests/ui/proc-macro/debug/dump-debug.rs @@ -1,5 +1,5 @@ -// run-pass -// aux-build:macro-dump-debug.rs +//@ run-pass +//@ aux-build:macro-dump-debug.rs extern crate macro_dump_debug; use macro_dump_debug::dump_debug; diff --git a/tests/ui/proc-macro/debug/dump-debug.stderr b/tests/ui/proc-macro/debug/dump-debug.stderr index db422b6012a..6aefacacd00 100644 --- a/tests/ui/proc-macro/debug/dump-debug.stderr +++ b/tests/ui/proc-macro/debug/dump-debug.stderr @@ -1,166 +1,166 @@ -TokenStream [Ident { ident: "ident", span: #0 bytes(130..135) }, Ident { ident: "r#ident", span: #0 bytes(151..158) }, Punct { ch: ',', spacing: Alone, span: #0 bytes(176..177) }, Punct { ch: '=', spacing: Joint, span: #0 bytes(203..204) }, Punct { ch: '=', spacing: Joint, span: #0 bytes(204..205) }, Punct { ch: '>', spacing: Alone, span: #0 bytes(205..206) }, Group { delimiter: Parenthesis, stream: TokenStream [], span: #0 bytes(230..232) }, Group { delimiter: Bracket, stream: TokenStream [Ident { ident: "_", span: #0 bytes(258..259) }], span: #0 bytes(257..260) }, Literal { kind: Integer, symbol: "0", suffix: None, span: #0 bytes(315..316) }, Literal { kind: Float, symbol: "1.0", suffix: None, span: #0 bytes(321..324) }, Literal { kind: Str, symbol: "S", suffix: None, span: #0 bytes(329..332) }, Literal { kind: ByteStr, symbol: "B", suffix: None, span: #0 bytes(337..341) }, Literal { kind: StrRaw(0), symbol: "R", suffix: None, span: #0 bytes(346..350) }, Literal { kind: StrRaw(2), symbol: "R", suffix: None, span: #0 bytes(355..363) }, Literal { kind: ByteStrRaw(0), symbol: "BR", suffix: None, span: #0 bytes(368..374) }, Literal { kind: ByteStrRaw(2), symbol: "BR", suffix: None, span: #0 bytes(379..389) }, Literal { kind: Char, symbol: "C", suffix: None, span: #0 bytes(394..397) }, Literal { kind: Byte, symbol: "B", suffix: None, span: #0 bytes(402..406) }, Literal { kind: Integer, symbol: "0", suffix: Some("q"), span: #0 bytes(437..439) }, Literal { kind: Float, symbol: "1.0", suffix: Some("q"), span: #0 bytes(444..448) }, Literal { kind: Str, symbol: "S", suffix: Some("q"), span: #0 bytes(453..457) }, Literal { kind: ByteStr, symbol: "B", suffix: Some("q"), span: #0 bytes(462..467) }, Literal { kind: StrRaw(0), symbol: "R", suffix: Some("q"), span: #0 bytes(472..477) }, Literal { kind: StrRaw(2), symbol: "R", suffix: Some("q"), span: #0 bytes(482..491) }, Literal { kind: ByteStrRaw(0), symbol: "BR", suffix: Some("q"), span: #0 bytes(496..503) }, Literal { kind: ByteStrRaw(2), symbol: "BR", suffix: Some("q"), span: #0 bytes(508..519) }, Literal { kind: Char, symbol: "C", suffix: Some("q"), span: #0 bytes(524..528) }, Literal { kind: Byte, symbol: "B", suffix: Some("q"), span: #0 bytes(533..538) }] +TokenStream [Ident { ident: "ident", span: #0 bytes(132..137) }, Ident { ident: "r#ident", span: #0 bytes(153..160) }, Punct { ch: ',', spacing: Alone, span: #0 bytes(178..179) }, Punct { ch: '=', spacing: Joint, span: #0 bytes(205..206) }, Punct { ch: '=', spacing: Joint, span: #0 bytes(206..207) }, Punct { ch: '>', spacing: Alone, span: #0 bytes(207..208) }, Group { delimiter: Parenthesis, stream: TokenStream [], span: #0 bytes(232..234) }, Group { delimiter: Bracket, stream: TokenStream [Ident { ident: "_", span: #0 bytes(260..261) }], span: #0 bytes(259..262) }, Literal { kind: Integer, symbol: "0", suffix: None, span: #0 bytes(317..318) }, Literal { kind: Float, symbol: "1.0", suffix: None, span: #0 bytes(323..326) }, Literal { kind: Str, symbol: "S", suffix: None, span: #0 bytes(331..334) }, Literal { kind: ByteStr, symbol: "B", suffix: None, span: #0 bytes(339..343) }, Literal { kind: StrRaw(0), symbol: "R", suffix: None, span: #0 bytes(348..352) }, Literal { kind: StrRaw(2), symbol: "R", suffix: None, span: #0 bytes(357..365) }, Literal { kind: ByteStrRaw(0), symbol: "BR", suffix: None, span: #0 bytes(370..376) }, Literal { kind: ByteStrRaw(2), symbol: "BR", suffix: None, span: #0 bytes(381..391) }, Literal { kind: Char, symbol: "C", suffix: None, span: #0 bytes(396..399) }, Literal { kind: Byte, symbol: "B", suffix: None, span: #0 bytes(404..408) }, Literal { kind: Integer, symbol: "0", suffix: Some("q"), span: #0 bytes(439..441) }, Literal { kind: Float, symbol: "1.0", suffix: Some("q"), span: #0 bytes(446..450) }, Literal { kind: Str, symbol: "S", suffix: Some("q"), span: #0 bytes(455..459) }, Literal { kind: ByteStr, symbol: "B", suffix: Some("q"), span: #0 bytes(464..469) }, Literal { kind: StrRaw(0), symbol: "R", suffix: Some("q"), span: #0 bytes(474..479) }, Literal { kind: StrRaw(2), symbol: "R", suffix: Some("q"), span: #0 bytes(484..493) }, Literal { kind: ByteStrRaw(0), symbol: "BR", suffix: Some("q"), span: #0 bytes(498..505) }, Literal { kind: ByteStrRaw(2), symbol: "BR", suffix: Some("q"), span: #0 bytes(510..521) }, Literal { kind: Char, symbol: "C", suffix: Some("q"), span: #0 bytes(526..530) }, Literal { kind: Byte, symbol: "B", suffix: Some("q"), span: #0 bytes(535..540) }] TokenStream [ Ident { ident: "ident", - span: #0 bytes(130..135), + span: #0 bytes(132..137), }, Ident { ident: "r#ident", - span: #0 bytes(151..158), + span: #0 bytes(153..160), }, Punct { ch: ',', spacing: Alone, - span: #0 bytes(176..177), + span: #0 bytes(178..179), }, Punct { ch: '=', spacing: Joint, - span: #0 bytes(203..204), + span: #0 bytes(205..206), }, Punct { ch: '=', spacing: Joint, - span: #0 bytes(204..205), + span: #0 bytes(206..207), }, Punct { ch: '>', spacing: Alone, - span: #0 bytes(205..206), + span: #0 bytes(207..208), }, Group { delimiter: Parenthesis, stream: TokenStream [], - span: #0 bytes(230..232), + span: #0 bytes(232..234), }, Group { delimiter: Bracket, stream: TokenStream [ Ident { ident: "_", - span: #0 bytes(258..259), + span: #0 bytes(260..261), }, ], - span: #0 bytes(257..260), + span: #0 bytes(259..262), }, Literal { kind: Integer, symbol: "0", suffix: None, - span: #0 bytes(315..316), + span: #0 bytes(317..318), }, Literal { kind: Float, symbol: "1.0", suffix: None, - span: #0 bytes(321..324), + span: #0 bytes(323..326), }, Literal { kind: Str, symbol: "S", suffix: None, - span: #0 bytes(329..332), + span: #0 bytes(331..334), }, Literal { kind: ByteStr, symbol: "B", suffix: None, - span: #0 bytes(337..341), + span: #0 bytes(339..343), }, Literal { kind: StrRaw(0), symbol: "R", suffix: None, - span: #0 bytes(346..350), + span: #0 bytes(348..352), }, Literal { kind: StrRaw(2), symbol: "R", suffix: None, - span: #0 bytes(355..363), + span: #0 bytes(357..365), }, Literal { kind: ByteStrRaw(0), symbol: "BR", suffix: None, - span: #0 bytes(368..374), + span: #0 bytes(370..376), }, Literal { kind: ByteStrRaw(2), symbol: "BR", suffix: None, - span: #0 bytes(379..389), + span: #0 bytes(381..391), }, Literal { kind: Char, symbol: "C", suffix: None, - span: #0 bytes(394..397), + span: #0 bytes(396..399), }, Literal { kind: Byte, symbol: "B", suffix: None, - span: #0 bytes(402..406), + span: #0 bytes(404..408), }, Literal { kind: Integer, symbol: "0", suffix: Some("q"), - span: #0 bytes(437..439), + span: #0 bytes(439..441), }, Literal { kind: Float, symbol: "1.0", suffix: Some("q"), - span: #0 bytes(444..448), + span: #0 bytes(446..450), }, Literal { kind: Str, symbol: "S", suffix: Some("q"), - span: #0 bytes(453..457), + span: #0 bytes(455..459), }, Literal { kind: ByteStr, symbol: "B", suffix: Some("q"), - span: #0 bytes(462..467), + span: #0 bytes(464..469), }, Literal { kind: StrRaw(0), symbol: "R", suffix: Some("q"), - span: #0 bytes(472..477), + span: #0 bytes(474..479), }, Literal { kind: StrRaw(2), symbol: "R", suffix: Some("q"), - span: #0 bytes(482..491), + span: #0 bytes(484..493), }, Literal { kind: ByteStrRaw(0), symbol: "BR", suffix: Some("q"), - span: #0 bytes(496..503), + span: #0 bytes(498..505), }, Literal { kind: ByteStrRaw(2), symbol: "BR", suffix: Some("q"), - span: #0 bytes(508..519), + span: #0 bytes(510..521), }, Literal { kind: Char, symbol: "C", suffix: Some("q"), - span: #0 bytes(524..528), + span: #0 bytes(526..530), }, Literal { kind: Byte, symbol: "B", suffix: Some("q"), - span: #0 bytes(533..538), + span: #0 bytes(535..540), }, ] diff --git a/tests/ui/proc-macro/define-two.rs b/tests/ui/proc-macro/define-two.rs index b2184eae33e..27767cda306 100644 --- a/tests/ui/proc-macro/define-two.rs +++ b/tests/ui/proc-macro/define-two.rs @@ -1,5 +1,5 @@ -// force-host -// no-prefer-dynamic +//@ force-host +//@ no-prefer-dynamic #![crate_type = "proc-macro"] diff --git a/tests/ui/proc-macro/derive-attr-cfg.rs b/tests/ui/proc-macro/derive-attr-cfg.rs index 3947746286d..162be0754d9 100644 --- a/tests/ui/proc-macro/derive-attr-cfg.rs +++ b/tests/ui/proc-macro/derive-attr-cfg.rs @@ -1,7 +1,7 @@ -// run-pass +//@ run-pass #![allow(dead_code)] -// aux-build:derive-attr-cfg.rs +//@ aux-build:derive-attr-cfg.rs extern crate derive_attr_cfg; use derive_attr_cfg::Foo; diff --git a/tests/ui/proc-macro/derive-b.rs b/tests/ui/proc-macro/derive-b.rs index a026c2bd77a..6cbe1fd0a3f 100644 --- a/tests/ui/proc-macro/derive-b.rs +++ b/tests/ui/proc-macro/derive-b.rs @@ -1,5 +1,5 @@ -// run-pass -// aux-build:derive-b-rpass.rs +//@ run-pass +//@ aux-build:derive-b-rpass.rs extern crate derive_b_rpass as derive_b; diff --git a/tests/ui/proc-macro/derive-bad.rs b/tests/ui/proc-macro/derive-bad.rs index 92d35f5371a..c8f3a77ea4c 100644 --- a/tests/ui/proc-macro/derive-bad.rs +++ b/tests/ui/proc-macro/derive-bad.rs @@ -1,4 +1,4 @@ -// aux-build:derive-bad.rs +//@ aux-build:derive-bad.rs #[macro_use] extern crate derive_bad; diff --git a/tests/ui/proc-macro/derive-expand-order.rs b/tests/ui/proc-macro/derive-expand-order.rs index 0cf1ceb91de..75981f16a7f 100644 --- a/tests/ui/proc-macro/derive-expand-order.rs +++ b/tests/ui/proc-macro/derive-expand-order.rs @@ -1,5 +1,5 @@ -// run-pass -// aux-build:multiple-derives.rs +//@ run-pass +//@ aux-build:multiple-derives.rs extern crate multiple_derives; diff --git a/tests/ui/proc-macro/derive-helper-configured.rs b/tests/ui/proc-macro/derive-helper-configured.rs index 243cf685e81..74d5d827f16 100644 --- a/tests/ui/proc-macro/derive-helper-configured.rs +++ b/tests/ui/proc-macro/derive-helper-configured.rs @@ -1,8 +1,8 @@ // Derive helpers are resolved successfully inside `cfg_attr`. -// check-pass +//@ check-pass // compile-flats:--cfg TRUE -// aux-build:test-macros.rs +//@ aux-build:test-macros.rs #[macro_use] extern crate test_macros; diff --git a/tests/ui/proc-macro/derive-helper-legacy-limits.rs b/tests/ui/proc-macro/derive-helper-legacy-limits.rs index ca904900da0..ff09095a60f 100644 --- a/tests/ui/proc-macro/derive-helper-legacy-limits.rs +++ b/tests/ui/proc-macro/derive-helper-legacy-limits.rs @@ -1,8 +1,8 @@ // Support for legacy derive helpers is limited and heuristic-based // (that's exactly the reason why they are deprecated). -// edition:2018 -// aux-build:test-macros.rs +//@ edition:2018 +//@ aux-build:test-macros.rs #[macro_use] extern crate test_macros; diff --git a/tests/ui/proc-macro/derive-helper-legacy-spurious.rs b/tests/ui/proc-macro/derive-helper-legacy-spurious.rs index b484b42e566..2b5bb905e83 100644 --- a/tests/ui/proc-macro/derive-helper-legacy-spurious.rs +++ b/tests/ui/proc-macro/derive-helper-legacy-spurious.rs @@ -1,4 +1,4 @@ -// aux-build:test-macros.rs +//@ aux-build:test-macros.rs #![dummy] //~ ERROR cannot find attribute `dummy` in this scope diff --git a/tests/ui/proc-macro/derive-helper-shadowed.rs b/tests/ui/proc-macro/derive-helper-shadowed.rs index ac14ece6918..9b2a4ab6bc7 100644 --- a/tests/ui/proc-macro/derive-helper-shadowed.rs +++ b/tests/ui/proc-macro/derive-helper-shadowed.rs @@ -1,6 +1,6 @@ -// check-pass -// aux-build:test-macros.rs -// aux-build:derive-helper-shadowed-2.rs +//@ check-pass +//@ aux-build:test-macros.rs +//@ aux-build:derive-helper-shadowed-2.rs #[macro_use] extern crate test_macros; diff --git a/tests/ui/proc-macro/derive-helper-shadowing-2.rs b/tests/ui/proc-macro/derive-helper-shadowing-2.rs index 5204d72b980..dc35dd05498 100644 --- a/tests/ui/proc-macro/derive-helper-shadowing-2.rs +++ b/tests/ui/proc-macro/derive-helper-shadowing-2.rs @@ -1,8 +1,8 @@ // If a derive macro introduces a helper attribute with the same name as that macro, // then make sure that it's usable without ambiguities. -// check-pass -// aux-build:derive-helper-shadowing-2.rs +//@ check-pass +//@ aux-build:derive-helper-shadowing-2.rs #[macro_use] extern crate derive_helper_shadowing_2; diff --git a/tests/ui/proc-macro/derive-helper-shadowing.rs b/tests/ui/proc-macro/derive-helper-shadowing.rs index 4f25b4b0dca..1c66a60b294 100644 --- a/tests/ui/proc-macro/derive-helper-shadowing.rs +++ b/tests/ui/proc-macro/derive-helper-shadowing.rs @@ -1,6 +1,6 @@ -// edition:2018 -// aux-build:test-macros.rs -// aux-build:derive-helper-shadowing.rs +//@ edition:2018 +//@ aux-build:test-macros.rs +//@ aux-build:derive-helper-shadowing.rs #[macro_use] extern crate test_macros; diff --git a/tests/ui/proc-macro/derive-helper-vs-legacy.rs b/tests/ui/proc-macro/derive-helper-vs-legacy.rs index 98836bcb893..feae7adda68 100644 --- a/tests/ui/proc-macro/derive-helper-vs-legacy.rs +++ b/tests/ui/proc-macro/derive-helper-vs-legacy.rs @@ -1,5 +1,5 @@ -// check-pass -// aux-build:test-macros.rs +//@ check-pass +//@ aux-build:test-macros.rs #[macro_use] extern crate test_macros; diff --git a/tests/ui/proc-macro/derive-in-mod.rs b/tests/ui/proc-macro/derive-in-mod.rs index 96e9d93fe12..3bd70f1090d 100644 --- a/tests/ui/proc-macro/derive-in-mod.rs +++ b/tests/ui/proc-macro/derive-in-mod.rs @@ -1,5 +1,5 @@ -// check-pass -// aux-build:test-macros.rs +//@ check-pass +//@ aux-build:test-macros.rs extern crate test_macros; diff --git a/tests/ui/proc-macro/derive-multiple-with-packed.rs b/tests/ui/proc-macro/derive-multiple-with-packed.rs index 23578aa0e9f..641be4dee54 100644 --- a/tests/ui/proc-macro/derive-multiple-with-packed.rs +++ b/tests/ui/proc-macro/derive-multiple-with-packed.rs @@ -1,4 +1,4 @@ -// check-pass +//@ check-pass #[derive(Clone, Copy)] #[derive(Debug)] // OK, even if `Copy` is in the different `#[derive]` diff --git a/tests/ui/proc-macro/derive-same-struct.rs b/tests/ui/proc-macro/derive-same-struct.rs index 528b0f22a81..432476d1ebb 100644 --- a/tests/ui/proc-macro/derive-same-struct.rs +++ b/tests/ui/proc-macro/derive-same-struct.rs @@ -1,8 +1,8 @@ -// run-pass +//@ run-pass #![allow(path_statements)] #![allow(dead_code)] -// aux-build:derive-same-struct.rs +//@ aux-build:derive-same-struct.rs #[macro_use] extern crate derive_same_struct; diff --git a/tests/ui/proc-macro/derive-still-gated.rs b/tests/ui/proc-macro/derive-still-gated.rs index 3f8d6f0716b..bce7badeffe 100644 --- a/tests/ui/proc-macro/derive-still-gated.rs +++ b/tests/ui/proc-macro/derive-still-gated.rs @@ -1,4 +1,4 @@ -// aux-build:test-macros.rs +//@ aux-build:test-macros.rs #[macro_use] extern crate test_macros; diff --git a/tests/ui/proc-macro/derive-test.rs b/tests/ui/proc-macro/derive-test.rs index b81e38432e8..246588527d9 100644 --- a/tests/ui/proc-macro/derive-test.rs +++ b/tests/ui/proc-macro/derive-test.rs @@ -1,6 +1,6 @@ -// run-pass -// no-prefer-dynamic -// compile-flags: --test +//@ run-pass +//@ no-prefer-dynamic +//@ compile-flags: --test #![crate_type = "proc-macro"] diff --git a/tests/ui/proc-macro/derive-two-attrs.rs b/tests/ui/proc-macro/derive-two-attrs.rs index 08225b8e3f2..91116097665 100644 --- a/tests/ui/proc-macro/derive-two-attrs.rs +++ b/tests/ui/proc-macro/derive-two-attrs.rs @@ -1,7 +1,7 @@ -// run-pass +//@ run-pass #![allow(dead_code)] -// aux-build:derive-two-attrs.rs +//@ aux-build:derive-two-attrs.rs extern crate derive_two_attrs as foo; diff --git a/tests/ui/proc-macro/derive-union.rs b/tests/ui/proc-macro/derive-union.rs index e83eee0936a..d1e65bf4595 100644 --- a/tests/ui/proc-macro/derive-union.rs +++ b/tests/ui/proc-macro/derive-union.rs @@ -1,7 +1,7 @@ -// run-pass +//@ run-pass #![allow(unused_variables)] -// aux-build:derive-union.rs +//@ aux-build:derive-union.rs #[macro_use] extern crate derive_union; diff --git a/tests/ui/proc-macro/disappearing-resolution.rs b/tests/ui/proc-macro/disappearing-resolution.rs index 50f04b1eae1..b8bc2953576 100644 --- a/tests/ui/proc-macro/disappearing-resolution.rs +++ b/tests/ui/proc-macro/disappearing-resolution.rs @@ -1,6 +1,6 @@ // Regression test for issue #64803 (initial attribute resolution can disappear later). -// aux-build:test-macros.rs +//@ aux-build:test-macros.rs #[macro_use] extern crate test_macros; diff --git a/tests/ui/proc-macro/doc-comment-preserved.rs b/tests/ui/proc-macro/doc-comment-preserved.rs index ed8ca99bd2c..f0891e7d6a7 100644 --- a/tests/ui/proc-macro/doc-comment-preserved.rs +++ b/tests/ui/proc-macro/doc-comment-preserved.rs @@ -1,6 +1,6 @@ -// check-pass -// compile-flags: -Z span-debug -// aux-build:test-macros.rs +//@ check-pass +//@ compile-flags: -Z span-debug +//@ aux-build:test-macros.rs #![no_std] // Don't load unnecessary hygiene information from std extern crate std; diff --git a/tests/ui/proc-macro/dollar-crate-issue-101211.rs b/tests/ui/proc-macro/dollar-crate-issue-101211.rs index fc1acfd32d2..fd5768dc7d1 100644 --- a/tests/ui/proc-macro/dollar-crate-issue-101211.rs +++ b/tests/ui/proc-macro/dollar-crate-issue-101211.rs @@ -1,6 +1,6 @@ -// check-pass -// edition:2021 -// aux-build:test-macros.rs +//@ check-pass +//@ edition:2021 +//@ aux-build:test-macros.rs #![no_std] // Don't load unnecessary hygiene information from std extern crate std; diff --git a/tests/ui/proc-macro/dollar-crate-issue-57089.rs b/tests/ui/proc-macro/dollar-crate-issue-57089.rs index 27bfa099f21..d4540643e02 100644 --- a/tests/ui/proc-macro/dollar-crate-issue-57089.rs +++ b/tests/ui/proc-macro/dollar-crate-issue-57089.rs @@ -1,7 +1,7 @@ -// check-pass -// edition:2018 -// compile-flags: -Z span-debug -// aux-build:test-macros.rs +//@ check-pass +//@ edition:2018 +//@ compile-flags: -Z span-debug +//@ aux-build:test-macros.rs #![no_std] // Don't load unnecessary hygiene information from std extern crate std; diff --git a/tests/ui/proc-macro/dollar-crate-issue-62325.rs b/tests/ui/proc-macro/dollar-crate-issue-62325.rs index d828fb9fd80..ee2e0c3973d 100644 --- a/tests/ui/proc-macro/dollar-crate-issue-62325.rs +++ b/tests/ui/proc-macro/dollar-crate-issue-62325.rs @@ -1,8 +1,8 @@ -// check-pass -// edition:2018 -// compile-flags: -Z span-debug -// aux-build:test-macros.rs -// aux-build:dollar-crate-external.rs +//@ check-pass +//@ edition:2018 +//@ compile-flags: -Z span-debug +//@ aux-build:test-macros.rs +//@ aux-build:dollar-crate-external.rs #![no_std] // Don't load unnecessary hygiene information from std diff --git a/tests/ui/proc-macro/dollar-crate.rs b/tests/ui/proc-macro/dollar-crate.rs index ac27dfa1aeb..a487e77a833 100644 --- a/tests/ui/proc-macro/dollar-crate.rs +++ b/tests/ui/proc-macro/dollar-crate.rs @@ -1,8 +1,8 @@ -// check-pass -// edition:2018 -// compile-flags: -Z span-debug -// aux-build:test-macros.rs -// aux-build:dollar-crate-external.rs +//@ check-pass +//@ edition:2018 +//@ compile-flags: -Z span-debug +//@ aux-build:test-macros.rs +//@ aux-build:dollar-crate-external.rs #![no_std] // Don't load unnecessary hygiene information from std extern crate std; diff --git a/tests/ui/proc-macro/edition-gated-async-move-syntax-issue89699.rs b/tests/ui/proc-macro/edition-gated-async-move-syntax-issue89699.rs index 1a9d4601aca..0f302708537 100644 --- a/tests/ui/proc-macro/edition-gated-async-move-syntax-issue89699.rs +++ b/tests/ui/proc-macro/edition-gated-async-move-syntax-issue89699.rs @@ -1,8 +1,8 @@ -// aux-build:edition-gated-async-move-syntax.rs -// edition: 2015 +//@ aux-build:edition-gated-async-move-syntax.rs +//@ edition: 2015 // Non-regression test for issue #89699, where a proc-macro emitting syntax only available in -// edition 2018 and up (`async move`) is used on edition 2015 +//@ edition 2018 and up (`async move`) is used on edition 2015 extern crate edition_gated_async_move_syntax; diff --git a/tests/ui/proc-macro/edition-imports-2018.rs b/tests/ui/proc-macro/edition-imports-2018.rs index 76567353198..de05868ebf9 100644 --- a/tests/ui/proc-macro/edition-imports-2018.rs +++ b/tests/ui/proc-macro/edition-imports-2018.rs @@ -1,6 +1,6 @@ -// check-pass -// edition:2018 -// aux-build:edition-imports-2015.rs +//@ check-pass +//@ edition:2018 +//@ aux-build:edition-imports-2015.rs #[macro_use] extern crate edition_imports_2015; diff --git a/tests/ui/proc-macro/empty-crate.rs b/tests/ui/proc-macro/empty-crate.rs index 3e54c9feebc..ba4de590e63 100644 --- a/tests/ui/proc-macro/empty-crate.rs +++ b/tests/ui/proc-macro/empty-crate.rs @@ -1,7 +1,7 @@ -// run-pass +//@ run-pass #![allow(unused_imports)] -// aux-build:empty-crate.rs +//@ aux-build:empty-crate.rs #[macro_use] extern crate empty_crate; diff --git a/tests/ui/proc-macro/empty-where-clause.rs b/tests/ui/proc-macro/empty-where-clause.rs index 719555c092a..4e432934e3c 100644 --- a/tests/ui/proc-macro/empty-where-clause.rs +++ b/tests/ui/proc-macro/empty-where-clause.rs @@ -1,4 +1,4 @@ -// aux-build:test-macros.rs +//@ aux-build:test-macros.rs extern crate test_macros; use test_macros::recollect_attr; diff --git a/tests/ui/proc-macro/env.rs b/tests/ui/proc-macro/env.rs index c0edda4f7df..85bcf4521fe 100644 --- a/tests/ui/proc-macro/env.rs +++ b/tests/ui/proc-macro/env.rs @@ -1,7 +1,7 @@ -// aux-build:env.rs -// run-pass -// rustc-env: THE_CONST=1 -// compile-flags: -Zunstable-options --env-set THE_CONST=12 --env-set ANOTHER=4 +//@ aux-build:env.rs +//@ run-pass +//@ rustc-env: THE_CONST=1 +//@ compile-flags: -Zunstable-options --env-set THE_CONST=12 --env-set ANOTHER=4 #![crate_name = "foo"] diff --git a/tests/ui/proc-macro/expand-expr.rs b/tests/ui/proc-macro/expand-expr.rs index 89cd1d767a5..5f7375d7450 100644 --- a/tests/ui/proc-macro/expand-expr.rs +++ b/tests/ui/proc-macro/expand-expr.rs @@ -1,4 +1,4 @@ -// aux-build:expand-expr.rs +//@ aux-build:expand-expr.rs // no-remap-src-base: check_expand_expr_file!() fails when enabled. #![feature(concat_bytes)] diff --git a/tests/ui/proc-macro/expand-to-derive.rs b/tests/ui/proc-macro/expand-to-derive.rs index ff2876e8471..0b603cd4bcc 100644 --- a/tests/ui/proc-macro/expand-to-derive.rs +++ b/tests/ui/proc-macro/expand-to-derive.rs @@ -1,6 +1,6 @@ -// check-pass -// compile-flags: -Z span-debug --error-format human -// aux-build:test-macros.rs +//@ check-pass +//@ compile-flags: -Z span-debug --error-format human +//@ aux-build:test-macros.rs #![feature(rustc_attrs)] diff --git a/tests/ui/proc-macro/expand-to-unstable.rs b/tests/ui/proc-macro/expand-to-unstable.rs index 0825c1a8ecb..c4eaba6bba2 100644 --- a/tests/ui/proc-macro/expand-to-unstable.rs +++ b/tests/ui/proc-macro/expand-to-unstable.rs @@ -1,4 +1,4 @@ -// aux-build:derive-unstable.rs +//@ aux-build:derive-unstable.rs #![allow(warnings)] diff --git a/tests/ui/proc-macro/expand-with-a-macro.rs b/tests/ui/proc-macro/expand-with-a-macro.rs index 042a2836595..fcaafbbc149 100644 --- a/tests/ui/proc-macro/expand-with-a-macro.rs +++ b/tests/ui/proc-macro/expand-with-a-macro.rs @@ -1,6 +1,6 @@ -// run-pass -// needs-unwind -// aux-build:expand-with-a-macro.rs +//@ run-pass +//@ needs-unwind +//@ aux-build:expand-with-a-macro.rs #![deny(warnings)] diff --git a/tests/ui/proc-macro/export-macro.rs b/tests/ui/proc-macro/export-macro.rs index ad69fe5eed2..e6001d06f0f 100644 --- a/tests/ui/proc-macro/export-macro.rs +++ b/tests/ui/proc-macro/export-macro.rs @@ -1,7 +1,7 @@ -// error-pattern: cannot export macro_rules! macros from a `proc-macro` crate +//@ error-pattern: cannot export macro_rules! macros from a `proc-macro` crate -// force-host -// no-prefer-dynamic +//@ force-host +//@ no-prefer-dynamic #![crate_type = "proc-macro"] diff --git a/tests/ui/proc-macro/exports.rs b/tests/ui/proc-macro/exports.rs index a40c15908bc..ebe73e27ca8 100644 --- a/tests/ui/proc-macro/exports.rs +++ b/tests/ui/proc-macro/exports.rs @@ -1,5 +1,5 @@ -// force-host -// no-prefer-dynamic +//@ force-host +//@ no-prefer-dynamic #![crate_type = "proc-macro"] #![allow(warnings)] diff --git a/tests/ui/proc-macro/expr-stmt-nonterminal-tokens.rs b/tests/ui/proc-macro/expr-stmt-nonterminal-tokens.rs index d4067a33592..0b34b07edbe 100644 --- a/tests/ui/proc-macro/expr-stmt-nonterminal-tokens.rs +++ b/tests/ui/proc-macro/expr-stmt-nonterminal-tokens.rs @@ -1,5 +1,5 @@ -// check-pass -// aux-build:test-macros.rs +//@ check-pass +//@ aux-build:test-macros.rs #![feature(decl_macro)] #![feature(stmt_expr_attributes)] diff --git a/tests/ui/proc-macro/expr-stmt-nonterminal-tokens.stdout b/tests/ui/proc-macro/expr-stmt-nonterminal-tokens.stdout index ddd59b583a8..e11d2c0715c 100644 --- a/tests/ui/proc-macro/expr-stmt-nonterminal-tokens.stdout +++ b/tests/ui/proc-macro/expr-stmt-nonterminal-tokens.stdout @@ -3,39 +3,39 @@ PRINT-DERIVE DEEP-RE-COLLECTED (DISPLAY): enum E { V = { let _ = #[allow(warning PRINT-DERIVE INPUT (DEBUG): TokenStream [ Ident { ident: "enum", - span: #3 bytes(299..303), + span: #3 bytes(301..305), }, Ident { ident: "E", - span: #3 bytes(304..305), + span: #3 bytes(306..307), }, Group { delimiter: Brace, stream: TokenStream [ Ident { ident: "V", - span: #3 bytes(320..321), + span: #3 bytes(322..323), }, Punct { ch: '=', spacing: Alone, - span: #3 bytes(322..323), + span: #3 bytes(324..325), }, Group { delimiter: Brace, stream: TokenStream [ Ident { ident: "let", - span: #3 bytes(326..329), + span: #3 bytes(328..331), }, Ident { ident: "_", - span: #3 bytes(330..331), + span: #3 bytes(332..333), }, Punct { ch: '=', spacing: Alone, - span: #3 bytes(332..333), + span: #3 bytes(334..335), }, Group { delimiter: None, @@ -43,83 +43,83 @@ PRINT-DERIVE INPUT (DEBUG): TokenStream [ Punct { ch: '#', spacing: Alone, - span: #0 bytes(541..542), + span: #0 bytes(543..544), }, Group { delimiter: Bracket, stream: TokenStream [ Ident { ident: "allow", - span: #0 bytes(543..548), + span: #0 bytes(545..550), }, Group { delimiter: Parenthesis, stream: TokenStream [ Ident { ident: "warnings", - span: #0 bytes(549..557), + span: #0 bytes(551..559), }, ], - span: #0 bytes(548..558), + span: #0 bytes(550..560), }, ], - span: #0 bytes(542..559), + span: #0 bytes(544..561), }, Punct { ch: '#', spacing: Alone, - span: #0 bytes(541..542), + span: #0 bytes(543..544), }, Group { delimiter: Bracket, stream: TokenStream [ Ident { ident: "allow", - span: #0 bytes(543..548), + span: #0 bytes(545..550), }, Group { delimiter: Parenthesis, stream: TokenStream [ Ident { ident: "warnings", - span: #0 bytes(549..557), + span: #0 bytes(551..559), }, ], - span: #0 bytes(548..558), + span: #0 bytes(550..560), }, ], - span: #0 bytes(542..559), + span: #0 bytes(544..561), }, Literal { kind: Integer, symbol: "0", suffix: None, - span: #0 bytes(560..561), + span: #0 bytes(562..563), }, ], - span: #3 bytes(334..339), + span: #3 bytes(336..341), }, Punct { ch: ';', spacing: Alone, - span: #3 bytes(339..340), + span: #3 bytes(341..342), }, Literal { kind: Integer, symbol: "0", suffix: None, - span: #3 bytes(341..342), + span: #3 bytes(343..344), }, ], - span: #3 bytes(324..344), + span: #3 bytes(326..346), }, Punct { ch: ',', spacing: Alone, - span: #3 bytes(344..345), + span: #3 bytes(346..347), }, ], - span: #3 bytes(306..355), + span: #3 bytes(308..357), }, ] PRINT-DERIVE INPUT (DISPLAY): enum E { V = { let _ = { 0; }; 0 }, } @@ -127,39 +127,39 @@ PRINT-DERIVE DEEP-RE-COLLECTED (DISPLAY): enum E { V = { let _ = { 0 }; 0 }, } PRINT-DERIVE INPUT (DEBUG): TokenStream [ Ident { ident: "enum", - span: #7 bytes(423..427), + span: #7 bytes(425..429), }, Ident { ident: "E", - span: #7 bytes(428..429), + span: #7 bytes(430..431), }, Group { delimiter: Brace, stream: TokenStream [ Ident { ident: "V", - span: #7 bytes(444..445), + span: #7 bytes(446..447), }, Punct { ch: '=', spacing: Alone, - span: #7 bytes(446..447), + span: #7 bytes(448..449), }, Group { delimiter: Brace, stream: TokenStream [ Ident { ident: "let", - span: #7 bytes(450..453), + span: #7 bytes(452..455), }, Ident { ident: "_", - span: #7 bytes(454..455), + span: #7 bytes(456..457), }, Punct { ch: '=', spacing: Alone, - span: #7 bytes(456..457), + span: #7 bytes(458..459), }, Group { delimiter: Brace, @@ -171,74 +171,74 @@ PRINT-DERIVE INPUT (DEBUG): TokenStream [ kind: Integer, symbol: "0", suffix: None, - span: #0 bytes(578..579), + span: #0 bytes(580..581), }, ], - span: #7 bytes(460..465), + span: #7 bytes(462..467), }, ], - span: #7 bytes(458..467), + span: #7 bytes(460..469), }, Punct { ch: ';', spacing: Alone, - span: #7 bytes(467..468), + span: #7 bytes(469..470), }, Literal { kind: Integer, symbol: "0", suffix: None, - span: #7 bytes(469..470), + span: #7 bytes(471..472), }, ], - span: #7 bytes(448..472), + span: #7 bytes(450..474), }, Punct { ch: ',', spacing: Alone, - span: #7 bytes(472..473), + span: #7 bytes(474..475), }, ], - span: #7 bytes(430..483), + span: #7 bytes(432..485), }, ] PRINT-DERIVE INPUT (DISPLAY): enum E { V = { let _ = { {} }; 0 }, } PRINT-DERIVE INPUT (DEBUG): TokenStream [ Ident { ident: "enum", - span: #11 bytes(423..427), + span: #11 bytes(425..429), }, Ident { ident: "E", - span: #11 bytes(428..429), + span: #11 bytes(430..431), }, Group { delimiter: Brace, stream: TokenStream [ Ident { ident: "V", - span: #11 bytes(444..445), + span: #11 bytes(446..447), }, Punct { ch: '=', spacing: Alone, - span: #11 bytes(446..447), + span: #11 bytes(448..449), }, Group { delimiter: Brace, stream: TokenStream [ Ident { ident: "let", - span: #11 bytes(450..453), + span: #11 bytes(452..455), }, Ident { ident: "_", - span: #11 bytes(454..455), + span: #11 bytes(456..457), }, Punct { ch: '=', spacing: Alone, - span: #11 bytes(456..457), + span: #11 bytes(458..459), }, Group { delimiter: Brace, @@ -249,35 +249,35 @@ PRINT-DERIVE INPUT (DEBUG): TokenStream [ Group { delimiter: Brace, stream: TokenStream [], - span: #0 bytes(596..598), + span: #0 bytes(598..600), }, ], - span: #11 bytes(460..465), + span: #11 bytes(462..467), }, ], - span: #11 bytes(458..467), + span: #11 bytes(460..469), }, Punct { ch: ';', spacing: Alone, - span: #11 bytes(467..468), + span: #11 bytes(469..470), }, Literal { kind: Integer, symbol: "0", suffix: None, - span: #11 bytes(469..470), + span: #11 bytes(471..472), }, ], - span: #11 bytes(448..472), + span: #11 bytes(450..474), }, Punct { ch: ',', spacing: Alone, - span: #11 bytes(472..473), + span: #11 bytes(474..475), }, ], - span: #11 bytes(430..483), + span: #11 bytes(432..485), }, ] PRINT-DERIVE INPUT (DISPLAY): enum E { V = { let _ = { PATH; }; 0 }, } @@ -285,39 +285,39 @@ PRINT-DERIVE DEEP-RE-COLLECTED (DISPLAY): enum E { V = { let _ = { PATH }; 0 }, PRINT-DERIVE INPUT (DEBUG): TokenStream [ Ident { ident: "enum", - span: #15 bytes(423..427), + span: #15 bytes(425..429), }, Ident { ident: "E", - span: #15 bytes(428..429), + span: #15 bytes(430..431), }, Group { delimiter: Brace, stream: TokenStream [ Ident { ident: "V", - span: #15 bytes(444..445), + span: #15 bytes(446..447), }, Punct { ch: '=', spacing: Alone, - span: #15 bytes(446..447), + span: #15 bytes(448..449), }, Group { delimiter: Brace, stream: TokenStream [ Ident { ident: "let", - span: #15 bytes(450..453), + span: #15 bytes(452..455), }, Ident { ident: "_", - span: #15 bytes(454..455), + span: #15 bytes(456..457), }, Punct { ch: '=', spacing: Alone, - span: #15 bytes(456..457), + span: #15 bytes(458..459), }, Group { delimiter: Brace, @@ -327,35 +327,35 @@ PRINT-DERIVE INPUT (DEBUG): TokenStream [ stream: TokenStream [ Ident { ident: "PATH", - span: #0 bytes(615..619), + span: #0 bytes(617..621), }, ], - span: #15 bytes(460..465), + span: #15 bytes(462..467), }, ], - span: #15 bytes(458..467), + span: #15 bytes(460..469), }, Punct { ch: ';', spacing: Alone, - span: #15 bytes(467..468), + span: #15 bytes(469..470), }, Literal { kind: Integer, symbol: "0", suffix: None, - span: #15 bytes(469..470), + span: #15 bytes(471..472), }, ], - span: #15 bytes(448..472), + span: #15 bytes(450..474), }, Punct { ch: ',', spacing: Alone, - span: #15 bytes(472..473), + span: #15 bytes(474..475), }, ], - span: #15 bytes(430..483), + span: #15 bytes(432..485), }, ] PRINT-DERIVE INPUT (DISPLAY): enum E { V = { let _ = { 0 + 1; }; 0 }, } @@ -363,39 +363,39 @@ PRINT-DERIVE DEEP-RE-COLLECTED (DISPLAY): enum E { V = { let _ = { 0 + 1 }; 0 }, PRINT-DERIVE INPUT (DEBUG): TokenStream [ Ident { ident: "enum", - span: #19 bytes(423..427), + span: #19 bytes(425..429), }, Ident { ident: "E", - span: #19 bytes(428..429), + span: #19 bytes(430..431), }, Group { delimiter: Brace, stream: TokenStream [ Ident { ident: "V", - span: #19 bytes(444..445), + span: #19 bytes(446..447), }, Punct { ch: '=', spacing: Alone, - span: #19 bytes(446..447), + span: #19 bytes(448..449), }, Group { delimiter: Brace, stream: TokenStream [ Ident { ident: "let", - span: #19 bytes(450..453), + span: #19 bytes(452..455), }, Ident { ident: "_", - span: #19 bytes(454..455), + span: #19 bytes(456..457), }, Punct { ch: '=', spacing: Alone, - span: #19 bytes(456..457), + span: #19 bytes(458..459), }, Group { delimiter: Brace, @@ -407,46 +407,46 @@ PRINT-DERIVE INPUT (DEBUG): TokenStream [ kind: Integer, symbol: "0", suffix: None, - span: #0 bytes(636..637), + span: #0 bytes(638..639), }, Punct { ch: '+', spacing: Alone, - span: #0 bytes(638..639), + span: #0 bytes(640..641), }, Literal { kind: Integer, symbol: "1", suffix: None, - span: #0 bytes(640..641), + span: #0 bytes(642..643), }, ], - span: #19 bytes(460..465), + span: #19 bytes(462..467), }, ], - span: #19 bytes(458..467), + span: #19 bytes(460..469), }, Punct { ch: ';', spacing: Alone, - span: #19 bytes(467..468), + span: #19 bytes(469..470), }, Literal { kind: Integer, symbol: "0", suffix: None, - span: #19 bytes(469..470), + span: #19 bytes(471..472), }, ], - span: #19 bytes(448..472), + span: #19 bytes(450..474), }, Punct { ch: ',', spacing: Alone, - span: #19 bytes(472..473), + span: #19 bytes(474..475), }, ], - span: #19 bytes(430..483), + span: #19 bytes(432..485), }, ] PRINT-DERIVE INPUT (DISPLAY): enum E { V = { let _ = { PATH + 1; }; 0 }, } @@ -454,39 +454,39 @@ PRINT-DERIVE DEEP-RE-COLLECTED (DISPLAY): enum E { V = { let _ = { PATH + 1 }; 0 PRINT-DERIVE INPUT (DEBUG): TokenStream [ Ident { ident: "enum", - span: #23 bytes(423..427), + span: #23 bytes(425..429), }, Ident { ident: "E", - span: #23 bytes(428..429), + span: #23 bytes(430..431), }, Group { delimiter: Brace, stream: TokenStream [ Ident { ident: "V", - span: #23 bytes(444..445), + span: #23 bytes(446..447), }, Punct { ch: '=', spacing: Alone, - span: #23 bytes(446..447), + span: #23 bytes(448..449), }, Group { delimiter: Brace, stream: TokenStream [ Ident { ident: "let", - span: #23 bytes(450..453), + span: #23 bytes(452..455), }, Ident { ident: "_", - span: #23 bytes(454..455), + span: #23 bytes(456..457), }, Punct { ch: '=', spacing: Alone, - span: #23 bytes(456..457), + span: #23 bytes(458..459), }, Group { delimiter: Brace, @@ -496,45 +496,45 @@ PRINT-DERIVE INPUT (DEBUG): TokenStream [ stream: TokenStream [ Ident { ident: "PATH", - span: #0 bytes(658..662), + span: #0 bytes(660..664), }, Punct { ch: '+', spacing: Alone, - span: #0 bytes(663..664), + span: #0 bytes(665..666), }, Literal { kind: Integer, symbol: "1", suffix: None, - span: #0 bytes(665..666), + span: #0 bytes(667..668), }, ], - span: #23 bytes(460..465), + span: #23 bytes(462..467), }, ], - span: #23 bytes(458..467), + span: #23 bytes(460..469), }, Punct { ch: ';', spacing: Alone, - span: #23 bytes(467..468), + span: #23 bytes(469..470), }, Literal { kind: Integer, symbol: "0", suffix: None, - span: #23 bytes(469..470), + span: #23 bytes(471..472), }, ], - span: #23 bytes(448..472), + span: #23 bytes(450..474), }, Punct { ch: ',', spacing: Alone, - span: #23 bytes(472..473), + span: #23 bytes(474..475), }, ], - span: #23 bytes(430..483), + span: #23 bytes(432..485), }, ] diff --git a/tests/ui/proc-macro/extern-prelude-extern-crate-proc-macro.rs b/tests/ui/proc-macro/extern-prelude-extern-crate-proc-macro.rs index 38f61c36c8c..7a5f5341662 100644 --- a/tests/ui/proc-macro/extern-prelude-extern-crate-proc-macro.rs +++ b/tests/ui/proc-macro/extern-prelude-extern-crate-proc-macro.rs @@ -1,5 +1,5 @@ -// check-pass -// edition:2018 +//@ check-pass +//@ edition:2018 extern crate proc_macro; use proc_macro::TokenStream; // OK diff --git a/tests/ui/proc-macro/gen-lifetime-token.rs b/tests/ui/proc-macro/gen-lifetime-token.rs index 588bd2b76c1..d65efb5c464 100644 --- a/tests/ui/proc-macro/gen-lifetime-token.rs +++ b/tests/ui/proc-macro/gen-lifetime-token.rs @@ -1,5 +1,5 @@ -// run-pass -// aux-build:gen-lifetime-token.rs +//@ run-pass +//@ aux-build:gen-lifetime-token.rs extern crate gen_lifetime_token as bar; diff --git a/tests/ui/proc-macro/gen-macro-rules-hygiene.rs b/tests/ui/proc-macro/gen-macro-rules-hygiene.rs index 195bda82e9c..2bfbf9dccca 100644 --- a/tests/ui/proc-macro/gen-macro-rules-hygiene.rs +++ b/tests/ui/proc-macro/gen-macro-rules-hygiene.rs @@ -2,7 +2,7 @@ // Local variables and labels are hygienic, items are not hygienic. // `$crate` refers to the crate that defines `macro_rules` and not the outer transparent macro. -// aux-build:gen-macro-rules-hygiene.rs +//@ aux-build:gen-macro-rules-hygiene.rs #[macro_use] extern crate gen_macro_rules_hygiene; diff --git a/tests/ui/proc-macro/gen-macro-rules.rs b/tests/ui/proc-macro/gen-macro-rules.rs index 13ad27f9372..5f2cfc70d8e 100644 --- a/tests/ui/proc-macro/gen-macro-rules.rs +++ b/tests/ui/proc-macro/gen-macro-rules.rs @@ -1,7 +1,7 @@ // Derive macros can generate `macro_rules` items, regression test for issue #63651. -// check-pass -// aux-build:gen-macro-rules.rs +//@ check-pass +//@ aux-build:gen-macro-rules.rs extern crate gen_macro_rules as repro; diff --git a/tests/ui/proc-macro/generate-dollar-ident.rs b/tests/ui/proc-macro/generate-dollar-ident.rs index b838be9fb9f..c087a206566 100644 --- a/tests/ui/proc-macro/generate-dollar-ident.rs +++ b/tests/ui/proc-macro/generate-dollar-ident.rs @@ -1,8 +1,8 @@ // Proc macros can generate token sequence `$ IDENT` // without it being recognized as an unknown macro variable. -// check-pass -// aux-build:generate-dollar-ident.rs +//@ check-pass +//@ aux-build:generate-dollar-ident.rs extern crate generate_dollar_ident; use generate_dollar_ident::*; diff --git a/tests/ui/proc-macro/generate-mod.rs b/tests/ui/proc-macro/generate-mod.rs index 471f317edf9..ab93666f28a 100644 --- a/tests/ui/proc-macro/generate-mod.rs +++ b/tests/ui/proc-macro/generate-mod.rs @@ -1,6 +1,6 @@ // Modules generated by transparent proc macros still acts as barriers for names (issue #50504). -// aux-build:generate-mod.rs +//@ aux-build:generate-mod.rs extern crate generate_mod; diff --git a/tests/ui/proc-macro/helper-attr-blocked-by-import-ambig.rs b/tests/ui/proc-macro/helper-attr-blocked-by-import-ambig.rs index 40c42d82f68..03bb04b7786 100644 --- a/tests/ui/proc-macro/helper-attr-blocked-by-import-ambig.rs +++ b/tests/ui/proc-macro/helper-attr-blocked-by-import-ambig.rs @@ -1,4 +1,4 @@ -// aux-build:test-macros.rs +//@ aux-build:test-macros.rs #[macro_use(Empty)] extern crate test_macros; diff --git a/tests/ui/proc-macro/helper-attr-blocked-by-import.rs b/tests/ui/proc-macro/helper-attr-blocked-by-import.rs index 344323122dc..03c30783411 100644 --- a/tests/ui/proc-macro/helper-attr-blocked-by-import.rs +++ b/tests/ui/proc-macro/helper-attr-blocked-by-import.rs @@ -1,5 +1,5 @@ -// check-pass -// aux-build:test-macros.rs +//@ check-pass +//@ aux-build:test-macros.rs #[macro_use(Empty)] extern crate test_macros; diff --git a/tests/ui/proc-macro/hygiene_example.rs b/tests/ui/proc-macro/hygiene_example.rs index 346ed1207cd..6c3e1067436 100644 --- a/tests/ui/proc-macro/hygiene_example.rs +++ b/tests/ui/proc-macro/hygiene_example.rs @@ -1,6 +1,6 @@ -// check-pass -// aux-build:hygiene_example_codegen.rs -// aux-build:hygiene_example.rs +//@ check-pass +//@ aux-build:hygiene_example_codegen.rs +//@ aux-build:hygiene_example.rs extern crate hygiene_example; use hygiene_example::hello; diff --git a/tests/ui/proc-macro/import.rs b/tests/ui/proc-macro/import.rs index d1b1ff35069..53dc0f4cbed 100644 --- a/tests/ui/proc-macro/import.rs +++ b/tests/ui/proc-macro/import.rs @@ -1,4 +1,4 @@ -// aux-build:test-macros.rs +//@ aux-build:test-macros.rs extern crate test_macros; diff --git a/tests/ui/proc-macro/inert-attribute-order.rs b/tests/ui/proc-macro/inert-attribute-order.rs index f8079675641..bca4df96040 100644 --- a/tests/ui/proc-macro/inert-attribute-order.rs +++ b/tests/ui/proc-macro/inert-attribute-order.rs @@ -1,8 +1,8 @@ // Order of inert attributes, both built-in and custom is preserved during expansion. -// check-pass -// compile-flags: -Z span-debug -// aux-build:test-macros.rs +//@ check-pass +//@ compile-flags: -Z span-debug +//@ aux-build:test-macros.rs #![no_std] // Don't load unnecessary hygiene information from std extern crate std; diff --git a/tests/ui/proc-macro/inner-attr-non-inline-mod.rs b/tests/ui/proc-macro/inner-attr-non-inline-mod.rs index 30c2666df47..df006a4d7a9 100644 --- a/tests/ui/proc-macro/inner-attr-non-inline-mod.rs +++ b/tests/ui/proc-macro/inner-attr-non-inline-mod.rs @@ -1,8 +1,8 @@ -// compile-flags: -Z span-debug -// error-pattern:custom inner attributes are unstable -// error-pattern:inner macro attributes are unstable -// error-pattern:this was previously accepted -// aux-build:test-macros.rs +//@ compile-flags: -Z span-debug +//@ error-pattern:custom inner attributes are unstable +//@ error-pattern:inner macro attributes are unstable +//@ error-pattern:this was previously accepted +//@ aux-build:test-macros.rs #![no_std] // Don't load unnecessary hygiene information from std extern crate std; diff --git a/tests/ui/proc-macro/inner-attrs.rs b/tests/ui/proc-macro/inner-attrs.rs index c448294e0f6..45bb4d3c5bf 100644 --- a/tests/ui/proc-macro/inner-attrs.rs +++ b/tests/ui/proc-macro/inner-attrs.rs @@ -1,8 +1,8 @@ // gate-test-custom_inner_attributes -// compile-flags: -Z span-debug --error-format human -// error-pattern:expected non-macro inner attribute -// aux-build:test-macros.rs -// edition:2018 +//@ compile-flags: -Z span-debug --error-format human +//@ error-pattern:expected non-macro inner attribute +//@ aux-build:test-macros.rs +//@ edition:2018 #![feature(custom_inner_attributes)] #![feature(proc_macro_hygiene)] diff --git a/tests/ui/proc-macro/input-interpolated.rs b/tests/ui/proc-macro/input-interpolated.rs index 5e49e330cac..d84572a6afe 100644 --- a/tests/ui/proc-macro/input-interpolated.rs +++ b/tests/ui/proc-macro/input-interpolated.rs @@ -1,8 +1,8 @@ // Check what token streams proc macros see when interpolated tokens are passed to them as input. -// check-pass -// edition:2018 -// aux-build:test-macros.rs +//@ check-pass +//@ edition:2018 +//@ aux-build:test-macros.rs #![no_std] // Don't load unnecessary hygiene information from std extern crate std; diff --git a/tests/ui/proc-macro/input-interpolated.stdout b/tests/ui/proc-macro/input-interpolated.stdout index f2a0bc3b1aa..1bccd8806be 100644 --- a/tests/ui/proc-macro/input-interpolated.stdout +++ b/tests/ui/proc-macro/input-interpolated.stdout @@ -2,58 +2,58 @@ PRINT-BANG INPUT (DISPLAY): A PRINT-BANG INPUT (DEBUG): TokenStream [ Ident { ident: "A", - span: #0 bytes(503..504), + span: #0 bytes(506..507), }, ] PRINT-ATTR INPUT (DISPLAY): const A : u8 = 0; PRINT-ATTR INPUT (DEBUG): TokenStream [ Ident { ident: "const", - span: #3 bytes(416..421), + span: #3 bytes(419..424), }, Ident { ident: "A", - span: #0 bytes(503..504), + span: #0 bytes(506..507), }, Punct { ch: ':', spacing: Alone, - span: #3 bytes(424..425), + span: #3 bytes(427..428), }, Ident { ident: "u8", - span: #3 bytes(426..428), + span: #3 bytes(429..431), }, Punct { ch: '=', spacing: Alone, - span: #3 bytes(429..430), + span: #3 bytes(432..433), }, Literal { kind: Integer, symbol: "0", suffix: None, - span: #3 bytes(431..432), + span: #3 bytes(434..435), }, Punct { ch: ';', spacing: Alone, - span: #3 bytes(432..433), + span: #3 bytes(435..436), }, ] PRINT-DERIVE INPUT (DISPLAY): struct A {} PRINT-DERIVE INPUT (DEBUG): TokenStream [ Ident { ident: "struct", - span: #3 bytes(468..474), + span: #3 bytes(471..477), }, Ident { ident: "A", - span: #0 bytes(503..504), + span: #0 bytes(506..507), }, Group { delimiter: Brace, stream: TokenStream [], - span: #3 bytes(478..480), + span: #3 bytes(481..483), }, ] diff --git a/tests/ui/proc-macro/invalid-attributes.rs b/tests/ui/proc-macro/invalid-attributes.rs index 6bbe022c690..a70c73e9b8f 100644 --- a/tests/ui/proc-macro/invalid-attributes.rs +++ b/tests/ui/proc-macro/invalid-attributes.rs @@ -1,5 +1,5 @@ -// force-host -// no-prefer-dynamic +//@ force-host +//@ no-prefer-dynamic #![crate_type = "proc-macro"] diff --git a/tests/ui/proc-macro/invalid-punct-ident-1.rs b/tests/ui/proc-macro/invalid-punct-ident-1.rs index 9a180273772..b0f163adc02 100644 --- a/tests/ui/proc-macro/invalid-punct-ident-1.rs +++ b/tests/ui/proc-macro/invalid-punct-ident-1.rs @@ -1,5 +1,5 @@ -// aux-build:invalid-punct-ident.rs -// needs-unwind proc macro panics to report errors +//@ aux-build:invalid-punct-ident.rs +//@ needs-unwind proc macro panics to report errors #[macro_use] extern crate invalid_punct_ident; diff --git a/tests/ui/proc-macro/invalid-punct-ident-2.rs b/tests/ui/proc-macro/invalid-punct-ident-2.rs index afb6985e458..b1f7f570d3f 100644 --- a/tests/ui/proc-macro/invalid-punct-ident-2.rs +++ b/tests/ui/proc-macro/invalid-punct-ident-2.rs @@ -1,5 +1,5 @@ -// aux-build:invalid-punct-ident.rs -// needs-unwind proc macro panics to report errors +//@ aux-build:invalid-punct-ident.rs +//@ needs-unwind proc macro panics to report errors #[macro_use] extern crate invalid_punct_ident; diff --git a/tests/ui/proc-macro/invalid-punct-ident-3.rs b/tests/ui/proc-macro/invalid-punct-ident-3.rs index ff83695c562..7698d2c4b39 100644 --- a/tests/ui/proc-macro/invalid-punct-ident-3.rs +++ b/tests/ui/proc-macro/invalid-punct-ident-3.rs @@ -1,5 +1,5 @@ -// aux-build:invalid-punct-ident.rs -// needs-unwind proc macro panics to report errors +//@ aux-build:invalid-punct-ident.rs +//@ needs-unwind proc macro panics to report errors #[macro_use] extern crate invalid_punct_ident; diff --git a/tests/ui/proc-macro/invalid-punct-ident-4.rs b/tests/ui/proc-macro/invalid-punct-ident-4.rs index 2d2774bd194..042fe6c600d 100644 --- a/tests/ui/proc-macro/invalid-punct-ident-4.rs +++ b/tests/ui/proc-macro/invalid-punct-ident-4.rs @@ -1,5 +1,5 @@ -// aux-build:invalid-punct-ident.rs -// needs-unwind proc macro panics to report errors +//@ aux-build:invalid-punct-ident.rs +//@ needs-unwind proc macro panics to report errors #[macro_use] extern crate invalid_punct_ident; diff --git a/tests/ui/proc-macro/is-available.rs b/tests/ui/proc-macro/is-available.rs index b32bb61b495..36fd44b266f 100644 --- a/tests/ui/proc-macro/is-available.rs +++ b/tests/ui/proc-macro/is-available.rs @@ -1,8 +1,8 @@ -// run-pass +//@ run-pass extern crate proc_macro; -// aux-build:is-available.rs +//@ aux-build:is-available.rs extern crate is_available; fn main() { diff --git a/tests/ui/proc-macro/issue-104884-trait-impl-sugg-err.rs b/tests/ui/proc-macro/issue-104884-trait-impl-sugg-err.rs index 1e387326b2e..8567d812e4f 100644 --- a/tests/ui/proc-macro/issue-104884-trait-impl-sugg-err.rs +++ b/tests/ui/proc-macro/issue-104884-trait-impl-sugg-err.rs @@ -1,4 +1,4 @@ -// aux-build:issue-104884.rs +//@ aux-build:issue-104884.rs use std::collections::BinaryHeap; diff --git a/tests/ui/proc-macro/issue-107113-wrap.rs b/tests/ui/proc-macro/issue-107113-wrap.rs index bc5b44963f7..01bf3615acf 100644 --- a/tests/ui/proc-macro/issue-107113-wrap.rs +++ b/tests/ui/proc-macro/issue-107113-wrap.rs @@ -1,5 +1,5 @@ -// edition:2021 -// aux-build:issue-107113.rs +//@ edition:2021 +//@ aux-build:issue-107113.rs #[macro_use] extern crate issue_107113; diff --git a/tests/ui/proc-macro/issue-118809.rs b/tests/ui/proc-macro/issue-118809.rs index 732bf19c173..770b19e8172 100644 --- a/tests/ui/proc-macro/issue-118809.rs +++ b/tests/ui/proc-macro/issue-118809.rs @@ -1,4 +1,4 @@ -// aux-build: issue-118809.rs +//@ aux-build: issue-118809.rs #[macro_use] extern crate issue_118809; diff --git a/tests/ui/proc-macro/issue-36935.rs b/tests/ui/proc-macro/issue-36935.rs index 03cdfa05e6b..eb019d1e174 100644 --- a/tests/ui/proc-macro/issue-36935.rs +++ b/tests/ui/proc-macro/issue-36935.rs @@ -1,5 +1,5 @@ -// aux-build:test-macros.rs -// needs-unwind proc macro panics to report errors +//@ aux-build:test-macros.rs +//@ needs-unwind proc macro panics to report errors #[macro_use] extern crate test_macros; diff --git a/tests/ui/proc-macro/issue-37788.rs b/tests/ui/proc-macro/issue-37788.rs index 73b1f0d58c8..c32ab6b8116 100644 --- a/tests/ui/proc-macro/issue-37788.rs +++ b/tests/ui/proc-macro/issue-37788.rs @@ -1,4 +1,4 @@ -// aux-build:test-macros.rs +//@ aux-build:test-macros.rs #[macro_use] extern crate test_macros; diff --git a/tests/ui/proc-macro/issue-38586.rs b/tests/ui/proc-macro/issue-38586.rs index 24e88ed93ca..54d5d1038a6 100644 --- a/tests/ui/proc-macro/issue-38586.rs +++ b/tests/ui/proc-macro/issue-38586.rs @@ -1,4 +1,4 @@ -// aux-build:issue-38586.rs +//@ aux-build:issue-38586.rs #[macro_use] extern crate issue_38586; diff --git a/tests/ui/proc-macro/issue-39889.rs b/tests/ui/proc-macro/issue-39889.rs index 69bfb4f3cbf..687aefbc068 100644 --- a/tests/ui/proc-macro/issue-39889.rs +++ b/tests/ui/proc-macro/issue-39889.rs @@ -1,7 +1,7 @@ -// run-pass +//@ run-pass #![allow(dead_code, unused_macros)] -// aux-build:issue-39889.rs +//@ aux-build:issue-39889.rs extern crate issue_39889; use issue_39889::Issue39889; diff --git a/tests/ui/proc-macro/issue-42708.rs b/tests/ui/proc-macro/issue-42708.rs index e8f445aaaf7..27cb2f73d56 100644 --- a/tests/ui/proc-macro/issue-42708.rs +++ b/tests/ui/proc-macro/issue-42708.rs @@ -1,5 +1,5 @@ -// run-pass -// aux-build:issue-42708.rs +//@ run-pass +//@ aux-build:issue-42708.rs #![feature(decl_macro)] #![allow(unused)] diff --git a/tests/ui/proc-macro/issue-50061.rs b/tests/ui/proc-macro/issue-50061.rs index 01c6b80b46c..34999bb5070 100644 --- a/tests/ui/proc-macro/issue-50061.rs +++ b/tests/ui/proc-macro/issue-50061.rs @@ -1,7 +1,7 @@ -// run-pass +//@ run-pass #![allow(path_statements)] -// aux-build:issue-50061.rs +//@ aux-build:issue-50061.rs #![feature(decl_macro)] diff --git a/tests/ui/proc-macro/issue-50493.rs b/tests/ui/proc-macro/issue-50493.rs index ce0e0839f1d..5456eddb78d 100644 --- a/tests/ui/proc-macro/issue-50493.rs +++ b/tests/ui/proc-macro/issue-50493.rs @@ -1,4 +1,4 @@ -// aux-build:issue-50493.rs +//@ aux-build:issue-50493.rs #[macro_use] extern crate issue_50493; diff --git a/tests/ui/proc-macro/issue-53481.rs b/tests/ui/proc-macro/issue-53481.rs index 922e60a4c4f..636b8e0c0ae 100644 --- a/tests/ui/proc-macro/issue-53481.rs +++ b/tests/ui/proc-macro/issue-53481.rs @@ -1,5 +1,5 @@ -// check-pass -// aux-build:test-macros.rs +//@ check-pass +//@ aux-build:test-macros.rs #[macro_use] extern crate test_macros; diff --git a/tests/ui/proc-macro/issue-59191-replace-root-with-fn.rs b/tests/ui/proc-macro/issue-59191-replace-root-with-fn.rs index a4161d4fc3d..24e3be0ed2e 100644 --- a/tests/ui/proc-macro/issue-59191-replace-root-with-fn.rs +++ b/tests/ui/proc-macro/issue-59191-replace-root-with-fn.rs @@ -1,9 +1,9 @@ // Test that using a macro to replace the entire crate tree with a non-'mod' item errors out nicely. // `issue_59191::no_main` replaces whatever's passed in with `fn main() {}`. -// edition:2018 -// aux-crate:issue_59191=issue-59191.rs -// error-pattern: requires `sized` lang_item +//@ edition:2018 +//@ aux-crate:issue_59191=issue-59191.rs +//@ error-pattern: requires `sized` lang_item #![feature(custom_inner_attributes)] #![issue_59191::no_main] diff --git a/tests/ui/proc-macro/issue-66286.rs b/tests/ui/proc-macro/issue-66286.rs index 2a67aeab44e..3ca064768b2 100644 --- a/tests/ui/proc-macro/issue-66286.rs +++ b/tests/ui/proc-macro/issue-66286.rs @@ -1,4 +1,4 @@ -// aux-build:issue-66286.rs +//@ aux-build:issue-66286.rs // Regression test for #66286. diff --git a/tests/ui/proc-macro/issue-73933-procedural-masquerade.rs b/tests/ui/proc-macro/issue-73933-procedural-masquerade.rs index a573c6e1c0b..8f07cd34cc9 100644 --- a/tests/ui/proc-macro/issue-73933-procedural-masquerade.rs +++ b/tests/ui/proc-macro/issue-73933-procedural-masquerade.rs @@ -1,5 +1,5 @@ -// aux-build:test-macros.rs -// check-pass +//@ aux-build:test-macros.rs +//@ check-pass #[macro_use] extern crate test_macros; diff --git a/tests/ui/proc-macro/issue-73933-procedural-masquerade.stdout b/tests/ui/proc-macro/issue-73933-procedural-masquerade.stdout index 8cd981e03f1..5e39c01ab5e 100644 --- a/tests/ui/proc-macro/issue-73933-procedural-masquerade.stdout +++ b/tests/ui/proc-macro/issue-73933-procedural-masquerade.stdout @@ -2,20 +2,20 @@ PRINT-DERIVE INPUT (DISPLAY): enum ProceduralMasqueradeDummyType { Input } PRINT-DERIVE INPUT (DEBUG): TokenStream [ Ident { ident: "enum", - span: #0 bytes(100..104), + span: #0 bytes(102..106), }, Ident { ident: "ProceduralMasqueradeDummyType", - span: #0 bytes(105..134), + span: #0 bytes(107..136), }, Group { delimiter: Brace, stream: TokenStream [ Ident { ident: "Input", - span: #0 bytes(141..146), + span: #0 bytes(143..148), }, ], - span: #0 bytes(135..148), + span: #0 bytes(137..150), }, ] diff --git a/tests/ui/proc-macro/issue-75734-pp-paren.rs b/tests/ui/proc-macro/issue-75734-pp-paren.rs index faa93787d13..ab0f4f72e62 100644 --- a/tests/ui/proc-macro/issue-75734-pp-paren.rs +++ b/tests/ui/proc-macro/issue-75734-pp-paren.rs @@ -2,9 +2,9 @@ // Ensures that we don't lose tokens when pretty-printing would // normally insert extra parentheses. -// check-pass -// aux-build:test-macros.rs -// compile-flags: -Z span-debug +//@ check-pass +//@ aux-build:test-macros.rs +//@ compile-flags: -Z span-debug #![no_std] // Don't load unnecessary hygiene information from std extern crate std; diff --git a/tests/ui/proc-macro/issue-75801.rs b/tests/ui/proc-macro/issue-75801.rs index b07cde0fabd..f0a1940cb5c 100644 --- a/tests/ui/proc-macro/issue-75801.rs +++ b/tests/ui/proc-macro/issue-75801.rs @@ -1,4 +1,4 @@ -// aux-build: issue-75801.rs +//@ aux-build: issue-75801.rs // Regression test for #75801. diff --git a/tests/ui/proc-macro/issue-75930-derive-cfg.rs b/tests/ui/proc-macro/issue-75930-derive-cfg.rs index 1e37b40c954..f480de24e3e 100644 --- a/tests/ui/proc-macro/issue-75930-derive-cfg.rs +++ b/tests/ui/proc-macro/issue-75930-derive-cfg.rs @@ -1,6 +1,6 @@ -// check-pass -// compile-flags: -Z span-debug -// aux-build:test-macros.rs +//@ check-pass +//@ compile-flags: -Z span-debug +//@ aux-build:test-macros.rs // Regression test for issue #75930 // Tests that we cfg-strip all targets before invoking diff --git a/tests/ui/proc-macro/issue-76182-leading-vert-pat.rs b/tests/ui/proc-macro/issue-76182-leading-vert-pat.rs index 7d31de1d22d..dc40a1715a6 100644 --- a/tests/ui/proc-macro/issue-76182-leading-vert-pat.rs +++ b/tests/ui/proc-macro/issue-76182-leading-vert-pat.rs @@ -1,6 +1,6 @@ -// check-pass -// aux-build:test-macros.rs -// compile-flags: -Z span-debug +//@ check-pass +//@ aux-build:test-macros.rs +//@ compile-flags: -Z span-debug // // Regression test for issue #76182 // Tests that we properly handle patterns with a leading vert diff --git a/tests/ui/proc-macro/issue-76270-panic-in-libproc-macro.rs b/tests/ui/proc-macro/issue-76270-panic-in-libproc-macro.rs index 5aefec3ece0..001a09fc552 100644 --- a/tests/ui/proc-macro/issue-76270-panic-in-libproc-macro.rs +++ b/tests/ui/proc-macro/issue-76270-panic-in-libproc-macro.rs @@ -1,6 +1,6 @@ -// aux-build:proc-macro-panic.rs -// edition:2018 -// needs-unwind proc macro panics to report errors +//@ aux-build:proc-macro-panic.rs +//@ edition:2018 +//@ needs-unwind proc macro panics to report errors // Regression test for issue #76270 // Tests that we don't print an ICE message when a panic diff --git a/tests/ui/proc-macro/issue-78675-captured-inner-attrs.rs b/tests/ui/proc-macro/issue-78675-captured-inner-attrs.rs index 478809324ee..d3716b22729 100644 --- a/tests/ui/proc-macro/issue-78675-captured-inner-attrs.rs +++ b/tests/ui/proc-macro/issue-78675-captured-inner-attrs.rs @@ -1,7 +1,7 @@ -// check-pass -// edition:2018 -// compile-flags: -Z span-debug -// aux-build:test-macros.rs +//@ check-pass +//@ edition:2018 +//@ compile-flags: -Z span-debug +//@ aux-build:test-macros.rs #![no_std] // Don't load unnecessary hygiene information from std extern crate std; diff --git a/tests/ui/proc-macro/issue-79148.rs b/tests/ui/proc-macro/issue-79148.rs index 3f01187a8bf..96ee5e033e1 100644 --- a/tests/ui/proc-macro/issue-79148.rs +++ b/tests/ui/proc-macro/issue-79148.rs @@ -1,5 +1,5 @@ -// aux-build:re-export.rs -// edition:2018 +//@ aux-build:re-export.rs +//@ edition:2018 extern crate re_export; diff --git a/tests/ui/proc-macro/issue-79242-slow-retokenize-check.rs b/tests/ui/proc-macro/issue-79242-slow-retokenize-check.rs index b68f19c5dd2..d0c14d8b5d0 100644 --- a/tests/ui/proc-macro/issue-79242-slow-retokenize-check.rs +++ b/tests/ui/proc-macro/issue-79242-slow-retokenize-check.rs @@ -1,5 +1,5 @@ -// check-pass -// aux-build:issue-79242.rs +//@ check-pass +//@ aux-build:issue-79242.rs // Regression test for issue #79242 // Tests that compilation time doesn't blow up for a proc-macro diff --git a/tests/ui/proc-macro/issue-79825.rs b/tests/ui/proc-macro/issue-79825.rs index f628469ce3a..f846bb40486 100644 --- a/tests/ui/proc-macro/issue-79825.rs +++ b/tests/ui/proc-macro/issue-79825.rs @@ -1,5 +1,5 @@ -// check-pass -// aux-build:issue-79825.rs +//@ check-pass +//@ aux-build:issue-79825.rs #![feature(trait_alias)] extern crate issue_79825; diff --git a/tests/ui/proc-macro/issue-80760-empty-stmt.rs b/tests/ui/proc-macro/issue-80760-empty-stmt.rs index 86865af0b52..59244e12eb8 100644 --- a/tests/ui/proc-macro/issue-80760-empty-stmt.rs +++ b/tests/ui/proc-macro/issue-80760-empty-stmt.rs @@ -1,6 +1,6 @@ -// check-pass -// aux-build:test-macros.rs -// compile-flags: -Z span-debug +//@ check-pass +//@ aux-build:test-macros.rs +//@ compile-flags: -Z span-debug #![no_std] // Don't load unnecessary hygiene information from std extern crate std; diff --git a/tests/ui/proc-macro/issue-81007-item-attrs.rs b/tests/ui/proc-macro/issue-81007-item-attrs.rs index ea27d54ee41..ab47c9df081 100644 --- a/tests/ui/proc-macro/issue-81007-item-attrs.rs +++ b/tests/ui/proc-macro/issue-81007-item-attrs.rs @@ -1,7 +1,7 @@ -// check-pass -// edition:2018 -// compile-flags: -Z span-debug -// aux-build:test-macros.rs +//@ check-pass +//@ edition:2018 +//@ compile-flags: -Z span-debug +//@ aux-build:test-macros.rs #![feature(rustc_attrs)] diff --git a/tests/ui/proc-macro/issue-81543-item-parse-err.rs b/tests/ui/proc-macro/issue-81543-item-parse-err.rs index 027389556fe..f3c307318a0 100644 --- a/tests/ui/proc-macro/issue-81543-item-parse-err.rs +++ b/tests/ui/proc-macro/issue-81543-item-parse-err.rs @@ -1,4 +1,4 @@ -// aux-build:test-macros.rs +//@ aux-build:test-macros.rs // Regression test for issue #81543 // Tests that we emit a properly spanned error diff --git a/tests/ui/proc-macro/issue-81555.rs b/tests/ui/proc-macro/issue-81555.rs index 693f1f7dc39..7a61a31952f 100644 --- a/tests/ui/proc-macro/issue-81555.rs +++ b/tests/ui/proc-macro/issue-81555.rs @@ -1,5 +1,5 @@ -// check-pass -// aux-build:test-macros.rs +//@ check-pass +//@ aux-build:test-macros.rs #![feature(stmt_expr_attributes, proc_macro_hygiene)] extern crate test_macros; diff --git a/tests/ui/proc-macro/issue-83510.rs b/tests/ui/proc-macro/issue-83510.rs index 2b1aec4df0b..ea8a334f57c 100644 --- a/tests/ui/proc-macro/issue-83510.rs +++ b/tests/ui/proc-macro/issue-83510.rs @@ -1,4 +1,4 @@ -// aux-build: issue-83510.rs +//@ aux-build: issue-83510.rs extern crate issue_83510; diff --git a/tests/ui/proc-macro/issue-86781-bad-inner-doc.fixed b/tests/ui/proc-macro/issue-86781-bad-inner-doc.fixed index 426a5fa723f..367ad66a1a6 100644 --- a/tests/ui/proc-macro/issue-86781-bad-inner-doc.fixed +++ b/tests/ui/proc-macro/issue-86781-bad-inner-doc.fixed @@ -1,5 +1,5 @@ -// aux-build:test-macros.rs -// run-rustfix +//@ aux-build:test-macros.rs +//@ run-rustfix #[macro_use] extern crate test_macros; diff --git a/tests/ui/proc-macro/issue-86781-bad-inner-doc.rs b/tests/ui/proc-macro/issue-86781-bad-inner-doc.rs index 31e3f3c8592..c49619ef2ac 100644 --- a/tests/ui/proc-macro/issue-86781-bad-inner-doc.rs +++ b/tests/ui/proc-macro/issue-86781-bad-inner-doc.rs @@ -1,5 +1,5 @@ -// aux-build:test-macros.rs -// run-rustfix +//@ aux-build:test-macros.rs +//@ run-rustfix #[macro_use] extern crate test_macros; diff --git a/tests/ui/proc-macro/issue-89566-suggest-fix-invalid-top-level-macro-attr.fixed b/tests/ui/proc-macro/issue-89566-suggest-fix-invalid-top-level-macro-attr.fixed index a61c868ed0a..9845bf8f2b6 100644 --- a/tests/ui/proc-macro/issue-89566-suggest-fix-invalid-top-level-macro-attr.fixed +++ b/tests/ui/proc-macro/issue-89566-suggest-fix-invalid-top-level-macro-attr.fixed @@ -1,4 +1,4 @@ -// run-rustfix +//@ run-rustfix #[derive(Debug)] //~ ERROR `derive` attribute cannot be used at crate level #[allow(dead_code)] diff --git a/tests/ui/proc-macro/issue-89566-suggest-fix-invalid-top-level-macro-attr.rs b/tests/ui/proc-macro/issue-89566-suggest-fix-invalid-top-level-macro-attr.rs index 403f4470de7..edc3ab9736d 100644 --- a/tests/ui/proc-macro/issue-89566-suggest-fix-invalid-top-level-macro-attr.rs +++ b/tests/ui/proc-macro/issue-89566-suggest-fix-invalid-top-level-macro-attr.rs @@ -1,4 +1,4 @@ -// run-rustfix +//@ run-rustfix #![derive(Debug)] //~ ERROR `derive` attribute cannot be used at crate level #[allow(dead_code)] diff --git a/tests/ui/proc-macro/issue-91800.rs b/tests/ui/proc-macro/issue-91800.rs index f48c8bf72d7..b69fce4cf77 100644 --- a/tests/ui/proc-macro/issue-91800.rs +++ b/tests/ui/proc-macro/issue-91800.rs @@ -1,4 +1,4 @@ -// aux-build: issue-91800-macro.rs +//@ aux-build: issue-91800-macro.rs #[macro_use] extern crate issue_91800_macro; diff --git a/tests/ui/proc-macro/item-error.rs b/tests/ui/proc-macro/item-error.rs index 64c203e5480..f3e3eafcd8d 100644 --- a/tests/ui/proc-macro/item-error.rs +++ b/tests/ui/proc-macro/item-error.rs @@ -1,4 +1,4 @@ -// aux-build:derive-b.rs +//@ aux-build:derive-b.rs #![allow(warnings)] diff --git a/tests/ui/proc-macro/keep-expr-tokens.rs b/tests/ui/proc-macro/keep-expr-tokens.rs index 0bf889a855d..ced7fad47b9 100644 --- a/tests/ui/proc-macro/keep-expr-tokens.rs +++ b/tests/ui/proc-macro/keep-expr-tokens.rs @@ -1,5 +1,5 @@ -// aux-build:test-macros.rs -// compile-flags: -Z span-debug +//@ aux-build:test-macros.rs +//@ compile-flags: -Z span-debug #![feature(stmt_expr_attributes)] #![feature(proc_macro_hygiene)] diff --git a/tests/ui/proc-macro/lifetimes-rpass.rs b/tests/ui/proc-macro/lifetimes-rpass.rs index a1d33ddca70..a6b1f46a5d1 100644 --- a/tests/ui/proc-macro/lifetimes-rpass.rs +++ b/tests/ui/proc-macro/lifetimes-rpass.rs @@ -1,7 +1,7 @@ -// run-pass +//@ run-pass #![allow(unused_variables)] -// aux-build:lifetimes-rpass.rs +//@ aux-build:lifetimes-rpass.rs extern crate lifetimes_rpass as lifetimes; use lifetimes::*; diff --git a/tests/ui/proc-macro/lifetimes.rs b/tests/ui/proc-macro/lifetimes.rs index 5605696715e..0c5d3e2f72f 100644 --- a/tests/ui/proc-macro/lifetimes.rs +++ b/tests/ui/proc-macro/lifetimes.rs @@ -1,4 +1,4 @@ -// aux-build:lifetimes.rs +//@ aux-build:lifetimes.rs extern crate lifetimes; diff --git a/tests/ui/proc-macro/lints_in_proc_macros.rs b/tests/ui/proc-macro/lints_in_proc_macros.rs index 377a1f25b63..13ae7239a14 100644 --- a/tests/ui/proc-macro/lints_in_proc_macros.rs +++ b/tests/ui/proc-macro/lints_in_proc_macros.rs @@ -1,4 +1,4 @@ -// aux-build:bang_proc_macro2.rs +//@ aux-build:bang_proc_macro2.rs extern crate bang_proc_macro2; diff --git a/tests/ui/proc-macro/literal-to-string.rs b/tests/ui/proc-macro/literal-to-string.rs index eb009036a9a..e87315fe144 100644 --- a/tests/ui/proc-macro/literal-to-string.rs +++ b/tests/ui/proc-macro/literal-to-string.rs @@ -1,7 +1,7 @@ -// check-pass -// edition: 2021 +//@ check-pass +//@ edition: 2021 -// aux-build: print-tokens.rs +//@ aux-build: print-tokens.rs extern crate print_tokens; fn main() { diff --git a/tests/ui/proc-macro/literal-to-string.stdout b/tests/ui/proc-macro/literal-to-string.stdout index ec6427545f4..c3114265e0a 100644 --- a/tests/ui/proc-macro/literal-to-string.stdout +++ b/tests/ui/proc-macro/literal-to-string.stdout @@ -3,91 +3,91 @@ TokenStream [ kind: Integer, symbol: "1", suffix: None, - span: #0 bytes(144..145), + span: #0 bytes(147..148), }, Literal { kind: Integer, symbol: "17", suffix: Some("u8"), - span: #0 bytes(154..158), + span: #0 bytes(157..161), }, Literal { kind: Float, symbol: "42.", suffix: None, - span: #0 bytes(167..170), + span: #0 bytes(170..173), }, Literal { kind: Float, symbol: "3.14", suffix: Some("f32"), - span: #0 bytes(179..186), + span: #0 bytes(182..189), }, Literal { kind: Byte, symbol: "a", suffix: None, - span: #0 bytes(195..199), + span: #0 bytes(198..202), }, Literal { kind: Byte, symbol: "\xFF", suffix: None, - span: #0 bytes(208..215), + span: #0 bytes(211..218), }, Literal { kind: Char, symbol: "c", suffix: None, - span: #0 bytes(224..227), + span: #0 bytes(227..230), }, Literal { kind: Char, symbol: "\x32", suffix: None, - span: #0 bytes(236..242), + span: #0 bytes(239..245), }, Literal { kind: Str, symbol: "\\"str\\"", suffix: None, - span: #0 bytes(251..260), + span: #0 bytes(254..263), }, Literal { kind: StrRaw(1), symbol: "\"raw\" str", suffix: None, - span: #0 bytes(269..283), + span: #0 bytes(272..286), }, Literal { kind: StrRaw(3), symbol: "very ##\"raw\"## str", suffix: None, - span: #0 bytes(292..319), + span: #0 bytes(295..322), }, Literal { kind: ByteStr, symbol: "\\"byte\\" str", suffix: None, - span: #0 bytes(328..343), + span: #0 bytes(331..346), }, Literal { kind: ByteStrRaw(1), symbol: "\"raw\" \"byte\" str", suffix: None, - span: #0 bytes(352..374), + span: #0 bytes(355..377), }, Literal { kind: CStr, symbol: "\\"c\\" str", suffix: None, - span: #0 bytes(383..395), + span: #0 bytes(386..398), }, Literal { kind: CStrRaw(1), symbol: "\"raw\" \"c\" str", suffix: None, - span: #0 bytes(404..423), + span: #0 bytes(407..426), }, ] 1 diff --git a/tests/ui/proc-macro/load-panic-backtrace.rs b/tests/ui/proc-macro/load-panic-backtrace.rs index bcdcb704a75..56ef4e9e088 100644 --- a/tests/ui/proc-macro/load-panic-backtrace.rs +++ b/tests/ui/proc-macro/load-panic-backtrace.rs @@ -1,9 +1,9 @@ -// aux-build:test-macros.rs -// compile-flags: -Z proc-macro-backtrace -// rustc-env:RUST_BACKTRACE=0 -// normalize-stderr-test "thread '.*' panicked " -> "" -// normalize-stderr-test "note:.*RUST_BACKTRACE=1.*\n" -> "" -// needs-unwind proc macro panics to report errors +//@ aux-build:test-macros.rs +//@ compile-flags: -Z proc-macro-backtrace +//@ rustc-env:RUST_BACKTRACE=0 +//@ normalize-stderr-test "thread '.*' panicked " -> "" +//@ normalize-stderr-test "note:.*RUST_BACKTRACE=1.*\n" -> "" +//@ needs-unwind proc macro panics to report errors #[macro_use] extern crate test_macros; diff --git a/tests/ui/proc-macro/load-panic.rs b/tests/ui/proc-macro/load-panic.rs index 6ce88c400e0..50475a34226 100644 --- a/tests/ui/proc-macro/load-panic.rs +++ b/tests/ui/proc-macro/load-panic.rs @@ -1,5 +1,5 @@ -// aux-build:test-macros.rs -// needs-unwind proc macro panics to report errors +//@ aux-build:test-macros.rs +//@ needs-unwind proc macro panics to report errors #[macro_use] extern crate test_macros; diff --git a/tests/ui/proc-macro/load-two.rs b/tests/ui/proc-macro/load-two.rs index 5ce0e65452e..44fcdb056dd 100644 --- a/tests/ui/proc-macro/load-two.rs +++ b/tests/ui/proc-macro/load-two.rs @@ -1,9 +1,9 @@ -// run-pass +//@ run-pass #![allow(path_statements)] #![allow(dead_code)] -// aux-build:derive-atob.rs -// aux-build:derive-ctod.rs +//@ aux-build:derive-atob.rs +//@ aux-build:derive-ctod.rs #[macro_use] extern crate derive_atob; diff --git a/tests/ui/proc-macro/macro-brackets.rs b/tests/ui/proc-macro/macro-brackets.rs index aa0046f4582..91bd652d37b 100644 --- a/tests/ui/proc-macro/macro-brackets.rs +++ b/tests/ui/proc-macro/macro-brackets.rs @@ -1,4 +1,4 @@ -// aux-build:test-macros.rs +//@ aux-build:test-macros.rs #[macro_use] extern crate test_macros; diff --git a/tests/ui/proc-macro/macro-crate-multi-decorator.rs b/tests/ui/proc-macro/macro-crate-multi-decorator.rs index ec57dec14ed..26a2d1592ab 100644 --- a/tests/ui/proc-macro/macro-crate-multi-decorator.rs +++ b/tests/ui/proc-macro/macro-crate-multi-decorator.rs @@ -1,7 +1,7 @@ // The duplicate macro will create a copy of the item with the given identifier. -// check-pass -// aux-build:duplicate.rs +//@ check-pass +//@ aux-build:duplicate.rs #[macro_use] extern crate duplicate; diff --git a/tests/ui/proc-macro/macro-namespace-reserved-2.rs b/tests/ui/proc-macro/macro-namespace-reserved-2.rs index 470b22b4874..79f591d8cb6 100644 --- a/tests/ui/proc-macro/macro-namespace-reserved-2.rs +++ b/tests/ui/proc-macro/macro-namespace-reserved-2.rs @@ -1,5 +1,5 @@ -// force-host -// no-prefer-dynamic +//@ force-host +//@ no-prefer-dynamic #![crate_type = "proc-macro"] diff --git a/tests/ui/proc-macro/macro-namespace-reserved.rs b/tests/ui/proc-macro/macro-namespace-reserved.rs index 60d379e41ad..26eb94d800c 100644 --- a/tests/ui/proc-macro/macro-namespace-reserved.rs +++ b/tests/ui/proc-macro/macro-namespace-reserved.rs @@ -1,5 +1,5 @@ -// force-host -// no-prefer-dynamic +//@ force-host +//@ no-prefer-dynamic #![feature(decl_macro)] #![crate_type = "proc-macro"] diff --git a/tests/ui/proc-macro/macro-quote-cond.rs b/tests/ui/proc-macro/macro-quote-cond.rs index 48307f4d9ae..3658e2a28f2 100644 --- a/tests/ui/proc-macro/macro-quote-cond.rs +++ b/tests/ui/proc-macro/macro-quote-cond.rs @@ -1,5 +1,5 @@ -// run-pass -// aux-build:cond_plugin.rs +//@ run-pass +//@ aux-build:cond_plugin.rs #![allow(unused_parens)] diff --git a/tests/ui/proc-macro/macro-rules-derive-cfg.rs b/tests/ui/proc-macro/macro-rules-derive-cfg.rs index a221b9578af..68026a60be6 100644 --- a/tests/ui/proc-macro/macro-rules-derive-cfg.rs +++ b/tests/ui/proc-macro/macro-rules-derive-cfg.rs @@ -1,6 +1,6 @@ -// check-pass -// compile-flags: -Z span-debug --error-format human -// aux-build:test-macros.rs +//@ check-pass +//@ compile-flags: -Z span-debug --error-format human +//@ aux-build:test-macros.rs #![feature(rustc_attrs)] #![feature(stmt_expr_attributes)] diff --git a/tests/ui/proc-macro/macro-rules-derive.rs b/tests/ui/proc-macro/macro-rules-derive.rs index e0c40bbc734..4023a9a044a 100644 --- a/tests/ui/proc-macro/macro-rules-derive.rs +++ b/tests/ui/proc-macro/macro-rules-derive.rs @@ -1,4 +1,4 @@ -// aux-build:first-second.rs +//@ aux-build:first-second.rs extern crate first_second; use first_second::*; diff --git a/tests/ui/proc-macro/macro-use-attr.rs b/tests/ui/proc-macro/macro-use-attr.rs index d275fb6a804..fe071b26383 100644 --- a/tests/ui/proc-macro/macro-use-attr.rs +++ b/tests/ui/proc-macro/macro-use-attr.rs @@ -1,5 +1,5 @@ -// check-pass -// aux-build:test-macros.rs +//@ check-pass +//@ aux-build:test-macros.rs #[macro_use] extern crate test_macros; diff --git a/tests/ui/proc-macro/macro-use-bang.rs b/tests/ui/proc-macro/macro-use-bang.rs index e3174fd446a..f8ccba6b094 100644 --- a/tests/ui/proc-macro/macro-use-bang.rs +++ b/tests/ui/proc-macro/macro-use-bang.rs @@ -1,5 +1,5 @@ -// check-pass -// aux-build:test-macros.rs +//@ check-pass +//@ aux-build:test-macros.rs #[macro_use] extern crate test_macros; diff --git a/tests/ui/proc-macro/macros-in-extern.rs b/tests/ui/proc-macro/macros-in-extern.rs index 57e2066d83c..82ab7b506ba 100644 --- a/tests/ui/proc-macro/macros-in-extern.rs +++ b/tests/ui/proc-macro/macros-in-extern.rs @@ -1,6 +1,6 @@ -// run-pass -// aux-build:test-macros.rs -// ignore-wasm32 +//@ run-pass +//@ aux-build:test-macros.rs +//@ ignore-wasm32 #[macro_use] extern crate test_macros; diff --git a/tests/ui/proc-macro/macros-in-type.rs b/tests/ui/proc-macro/macros-in-type.rs index 19ed58eceb9..4db7cf273f7 100644 --- a/tests/ui/proc-macro/macros-in-type.rs +++ b/tests/ui/proc-macro/macros-in-type.rs @@ -1,5 +1,5 @@ -// check-pass -// aux-build:test-macros.rs +//@ check-pass +//@ aux-build:test-macros.rs #[macro_use] extern crate test_macros; diff --git a/tests/ui/proc-macro/meta-delim.rs b/tests/ui/proc-macro/meta-delim.rs index 964291bc678..1afba1fd343 100644 --- a/tests/ui/proc-macro/meta-delim.rs +++ b/tests/ui/proc-macro/meta-delim.rs @@ -1,6 +1,6 @@ -// aux-build:meta-delim.rs -// edition:2018 -// run-pass +//@ aux-build:meta-delim.rs +//@ edition:2018 +//@ run-pass // Tests that we can properly deserialize a macro with strange delimiters // See https://github.com/rust-lang/rust/pull/73569#issuecomment-650860457 diff --git a/tests/ui/proc-macro/meta-macro-hygiene.rs b/tests/ui/proc-macro/meta-macro-hygiene.rs index 72fd88e119f..9dac1030b9c 100644 --- a/tests/ui/proc-macro/meta-macro-hygiene.rs +++ b/tests/ui/proc-macro/meta-macro-hygiene.rs @@ -1,12 +1,12 @@ -// aux-build:make-macro.rs -// aux-build:meta-macro.rs -// edition:2018 -// compile-flags: -Z span-debug -Z macro-backtrace -Z unpretty=expanded,hygiene -Z trim-diagnostic-paths=no -// check-pass +//@ aux-build:make-macro.rs +//@ aux-build:meta-macro.rs +//@ edition:2018 +//@ compile-flags: -Z span-debug -Z macro-backtrace -Z unpretty=expanded,hygiene -Z trim-diagnostic-paths=no +//@ check-pass // ignore-tidy-linelength -// normalize-stdout-test "\d+#" -> "0#" -// normalize-stdout-test "expn\d{3,}" -> "expnNNN" -// normalize-stdout-test "extern crate compiler_builtins /\* \d+ \*/" -> "extern crate compiler_builtins /* NNN */" +//@ normalize-stdout-test "\d+#" -> "0#" +//@ normalize-stdout-test "expn\d{3,}" -> "expnNNN" +//@ normalize-stdout-test "extern crate compiler_builtins /\* \d+ \*/" -> "extern crate compiler_builtins /* NNN */" // // We don't care about symbol ids, so we set them all to 0 // in the stdout diff --git a/tests/ui/proc-macro/meta-macro-hygiene.stdout b/tests/ui/proc-macro/meta-macro-hygiene.stdout index 3672a3590fd..8697ba58a39 100644 --- a/tests/ui/proc-macro/meta-macro-hygiene.stdout +++ b/tests/ui/proc-macro/meta-macro-hygiene.stdout @@ -2,15 +2,15 @@ Def site: $DIR/auxiliary/make-macro.rs:7:9: 7:56 (#4) Input: TokenStream [Ident { ident: "$crate", span: $DIR/meta-macro-hygiene.rs:26:37: 26:43 (#3) }, Punct { ch: ':', spacing: Joint, span: $DIR/meta-macro-hygiene.rs:26:43: 26:44 (#3) }, Punct { ch: ':', spacing: Alone, span: $DIR/meta-macro-hygiene.rs:26:44: 26:45 (#3) }, Ident { ident: "dummy", span: $DIR/meta-macro-hygiene.rs:26:45: 26:50 (#3) }, Punct { ch: '!', spacing: Alone, span: $DIR/meta-macro-hygiene.rs:26:50: 26:51 (#3) }, Group { delimiter: Parenthesis, stream: TokenStream [], span: $DIR/meta-macro-hygiene.rs:26:51: 26:53 (#3) }] Respanned: TokenStream [Ident { ident: "$crate", span: $DIR/auxiliary/make-macro.rs:7:9: 7:56 (#4) }, Punct { ch: ':', spacing: Joint, span: $DIR/auxiliary/make-macro.rs:7:9: 7:56 (#4) }, Punct { ch: ':', spacing: Alone, span: $DIR/auxiliary/make-macro.rs:7:9: 7:56 (#4) }, Ident { ident: "dummy", span: $DIR/auxiliary/make-macro.rs:7:9: 7:56 (#4) }, Punct { ch: '!', spacing: Alone, span: $DIR/auxiliary/make-macro.rs:7:9: 7:56 (#4) }, Group { delimiter: Parenthesis, stream: TokenStream [], span: $DIR/auxiliary/make-macro.rs:7:9: 7:56 (#4) }] #![feature /* 0#0 */(prelude_import)] -// aux-build:make-macro.rs -// aux-build:meta-macro.rs -// edition:2018 -// compile-flags: -Z span-debug -Z macro-backtrace -Z unpretty=expanded,hygiene -Z trim-diagnostic-paths=no -// check-pass +//@ aux-build:make-macro.rs +//@ aux-build:meta-macro.rs +//@ edition:2018 +//@ compile-flags: -Z span-debug -Z macro-backtrace -Z unpretty=expanded,hygiene -Z trim-diagnostic-paths=no +//@ check-pass // ignore-tidy-linelength -// normalize-stdout-test "\d+#" -> "0#" -// normalize-stdout-test "expn\d{3,}" -> "expnNNN" -// normalize-stdout-test "extern crate compiler_builtins /\* \d+ \*/" -> "extern crate compiler_builtins /* NNN */" +//@ normalize-stdout-test "\d+#" -> "0#" +//@ normalize-stdout-test "expn\d{3,}" -> "expnNNN" +//@ normalize-stdout-test "extern crate compiler_builtins /\* \d+ \*/" -> "extern crate compiler_builtins /* NNN */" // // We don't care about symbol ids, so we set them all to 0 // in the stdout diff --git a/tests/ui/proc-macro/meta-macro.rs b/tests/ui/proc-macro/meta-macro.rs index dbac90382d1..abe63c60fb8 100644 --- a/tests/ui/proc-macro/meta-macro.rs +++ b/tests/ui/proc-macro/meta-macro.rs @@ -1,8 +1,8 @@ -// aux-build:make-macro.rs -// aux-build:meta-macro.rs -// edition:2018 -// compile-flags: -Z span-debug -// run-pass +//@ aux-build:make-macro.rs +//@ aux-build:meta-macro.rs +//@ edition:2018 +//@ compile-flags: -Z span-debug +//@ run-pass #![no_std] // Don't load unnecessary hygiene information from std extern crate std; diff --git a/tests/ui/proc-macro/mixed-site-span.rs b/tests/ui/proc-macro/mixed-site-span.rs index 0083846568e..bab76a8c433 100644 --- a/tests/ui/proc-macro/mixed-site-span.rs +++ b/tests/ui/proc-macro/mixed-site-span.rs @@ -1,6 +1,6 @@ // Proc macros using `mixed_site` spans exhibit usual properties of `macro_rules` hygiene. -// aux-build:mixed-site-span.rs +//@ aux-build:mixed-site-span.rs #[macro_use] extern crate mixed_site_span; diff --git a/tests/ui/proc-macro/modify-ast.rs b/tests/ui/proc-macro/modify-ast.rs index ea9bf837c24..86a7d6a7772 100644 --- a/tests/ui/proc-macro/modify-ast.rs +++ b/tests/ui/proc-macro/modify-ast.rs @@ -1,5 +1,5 @@ -// run-pass -// aux-build:modify-ast.rs +//@ run-pass +//@ aux-build:modify-ast.rs extern crate modify_ast; diff --git a/tests/ui/proc-macro/module.rs b/tests/ui/proc-macro/module.rs index a750083c607..210c05988bf 100644 --- a/tests/ui/proc-macro/module.rs +++ b/tests/ui/proc-macro/module.rs @@ -1 +1 @@ -// ignore-test (auxiliary, used by other tests) +//@ ignore-test (auxiliary, used by other tests) diff --git a/tests/ui/proc-macro/module_with_attrs.rs b/tests/ui/proc-macro/module_with_attrs.rs index 0b2604f95b6..8a4ca92e44b 100644 --- a/tests/ui/proc-macro/module_with_attrs.rs +++ b/tests/ui/proc-macro/module_with_attrs.rs @@ -1,4 +1,4 @@ -// ignore-test (auxiliary, used by other tests) +//@ ignore-test (auxiliary, used by other tests) #![rustfmt::skip] #![print_attr] diff --git a/tests/ui/proc-macro/multispan.rs b/tests/ui/proc-macro/multispan.rs index e9e0349f2c2..60f67c8c67c 100644 --- a/tests/ui/proc-macro/multispan.rs +++ b/tests/ui/proc-macro/multispan.rs @@ -1,4 +1,4 @@ -// aux-build:multispan.rs +//@ aux-build:multispan.rs extern crate multispan; diff --git a/tests/ui/proc-macro/negative-token.rs b/tests/ui/proc-macro/negative-token.rs index 2ed3cbc08cd..32408e0d936 100644 --- a/tests/ui/proc-macro/negative-token.rs +++ b/tests/ui/proc-macro/negative-token.rs @@ -1,5 +1,5 @@ -// run-pass -// aux-build:negative-token.rs +//@ run-pass +//@ aux-build:negative-token.rs extern crate negative_token; diff --git a/tests/ui/proc-macro/nested-derive-cfg.rs b/tests/ui/proc-macro/nested-derive-cfg.rs index 53cfbb7c98f..696a5024ec2 100644 --- a/tests/ui/proc-macro/nested-derive-cfg.rs +++ b/tests/ui/proc-macro/nested-derive-cfg.rs @@ -1,6 +1,6 @@ -// compile-flags: -Z span-debug --error-format human -// aux-build:test-macros.rs -// check-pass +//@ compile-flags: -Z span-debug --error-format human +//@ aux-build:test-macros.rs +//@ check-pass #![no_std] // Don't load unnecessary hygiene information from std extern crate std; diff --git a/tests/ui/proc-macro/nested-item-spans.rs b/tests/ui/proc-macro/nested-item-spans.rs index 63da170d0bb..c19af0f9796 100644 --- a/tests/ui/proc-macro/nested-item-spans.rs +++ b/tests/ui/proc-macro/nested-item-spans.rs @@ -1,4 +1,4 @@ -// aux-build:test-macros.rs +//@ aux-build:test-macros.rs #[macro_use] extern crate test_macros; diff --git a/tests/ui/proc-macro/nested-macro-rules.rs b/tests/ui/proc-macro/nested-macro-rules.rs index 25ffcfad7c7..bb25b97df50 100644 --- a/tests/ui/proc-macro/nested-macro-rules.rs +++ b/tests/ui/proc-macro/nested-macro-rules.rs @@ -1,8 +1,8 @@ -// run-pass -// aux-build:nested-macro-rules.rs -// aux-build:test-macros.rs -// compile-flags: -Z span-debug -Z macro-backtrace -// edition:2018 +//@ run-pass +//@ aux-build:nested-macro-rules.rs +//@ aux-build:test-macros.rs +//@ compile-flags: -Z span-debug -Z macro-backtrace +//@ edition:2018 #![no_std] // Don't load unnecessary hygiene information from std extern crate std; diff --git a/tests/ui/proc-macro/nested-nonterminal-tokens.rs b/tests/ui/proc-macro/nested-nonterminal-tokens.rs index 04d34e21cdc..6e28cabd2fe 100644 --- a/tests/ui/proc-macro/nested-nonterminal-tokens.rs +++ b/tests/ui/proc-macro/nested-nonterminal-tokens.rs @@ -1,7 +1,7 @@ -// check-pass -// edition:2018 -// compile-flags: -Z span-debug -// aux-build:test-macros.rs +//@ check-pass +//@ edition:2018 +//@ compile-flags: -Z span-debug +//@ aux-build:test-macros.rs // Tests that we properly pass tokens to proc-macro when nested // nonterminals are involved. diff --git a/tests/ui/proc-macro/no-macro-use-attr.rs b/tests/ui/proc-macro/no-macro-use-attr.rs index a8a8fa4e19a..ae507a31ba7 100644 --- a/tests/ui/proc-macro/no-macro-use-attr.rs +++ b/tests/ui/proc-macro/no-macro-use-attr.rs @@ -1,4 +1,4 @@ -// aux-build:test-macros.rs +//@ aux-build:test-macros.rs #![feature(rustc_attrs)] #![warn(unused_extern_crates)] diff --git a/tests/ui/proc-macro/no-mangle-in-proc-macro-issue-111888.rs b/tests/ui/proc-macro/no-mangle-in-proc-macro-issue-111888.rs index 4e5208e5058..e04d45bbd0d 100644 --- a/tests/ui/proc-macro/no-mangle-in-proc-macro-issue-111888.rs +++ b/tests/ui/proc-macro/no-mangle-in-proc-macro-issue-111888.rs @@ -1,7 +1,7 @@ -// build-pass -// force-host -// no-prefer-dynamic -// aux-build:exports_no_mangle.rs +//@ build-pass +//@ force-host +//@ no-prefer-dynamic +//@ aux-build:exports_no_mangle.rs #![crate_type = "proc-macro"] // Issue #111888: this proc-macro crate imports another crate that itself diff --git a/tests/ui/proc-macro/no-missing-docs.rs b/tests/ui/proc-macro/no-missing-docs.rs index e1e8218582f..124af9bea75 100644 --- a/tests/ui/proc-macro/no-missing-docs.rs +++ b/tests/ui/proc-macro/no-missing-docs.rs @@ -1,9 +1,9 @@ //! Verify that the `decls` module implicitly added by the compiler does not cause `missing_docs` //! warnings. -// build-pass (FIXME(62277): could be check-pass?) -// force-host -// no-prefer-dynamic +//@ build-pass (FIXME(62277): could be check-pass?) +//@ force-host +//@ no-prefer-dynamic #![crate_type = "proc-macro"] #![deny(missing_docs)] diff --git a/tests/ui/proc-macro/nodelim-groups.rs b/tests/ui/proc-macro/nodelim-groups.rs index ec301990281..f13d97aaff5 100644 --- a/tests/ui/proc-macro/nodelim-groups.rs +++ b/tests/ui/proc-macro/nodelim-groups.rs @@ -1,7 +1,7 @@ -// run-pass -// aux-build:test-macros.rs -// compile-flags: -Z span-debug -// edition:2018 +//@ run-pass +//@ aux-build:test-macros.rs +//@ compile-flags: -Z span-debug +//@ edition:2018 // // Tests the pretty-printing behavior of inserting `Invisible`-delimited groups diff --git a/tests/ui/proc-macro/non-root.rs b/tests/ui/proc-macro/non-root.rs index a7c4ac00a44..da3cd83f0fd 100644 --- a/tests/ui/proc-macro/non-root.rs +++ b/tests/ui/proc-macro/non-root.rs @@ -1,5 +1,5 @@ -// force-host -// no-prefer-dynamic +//@ force-host +//@ no-prefer-dynamic #![crate_type = "proc-macro"] diff --git a/tests/ui/proc-macro/nonterminal-expansion.rs b/tests/ui/proc-macro/nonterminal-expansion.rs index e6215587153..96ea4aef85b 100644 --- a/tests/ui/proc-macro/nonterminal-expansion.rs +++ b/tests/ui/proc-macro/nonterminal-expansion.rs @@ -1,6 +1,6 @@ -// check-pass -// compile-flags: -Z span-debug -// aux-build:test-macros.rs +//@ check-pass +//@ compile-flags: -Z span-debug +//@ aux-build:test-macros.rs #![no_std] // Don't load unnecessary hygiene information from std extern crate std; diff --git a/tests/ui/proc-macro/nonterminal-recollect-attr.rs b/tests/ui/proc-macro/nonterminal-recollect-attr.rs index 79c4ad4cd2a..7d922bafdcd 100644 --- a/tests/ui/proc-macro/nonterminal-recollect-attr.rs +++ b/tests/ui/proc-macro/nonterminal-recollect-attr.rs @@ -1,6 +1,6 @@ -// check-pass -// compile-flags: -Z span-debug -// aux-build:nonterminal-recollect-attr.rs +//@ check-pass +//@ compile-flags: -Z span-debug +//@ aux-build:nonterminal-recollect-attr.rs #![no_std] // Don't load unnecessary hygiene information from std extern crate std; diff --git a/tests/ui/proc-macro/nonterminal-token-hygiene.rs b/tests/ui/proc-macro/nonterminal-token-hygiene.rs index 1e9e90a6b6f..d1e42509584 100644 --- a/tests/ui/proc-macro/nonterminal-token-hygiene.rs +++ b/tests/ui/proc-macro/nonterminal-token-hygiene.rs @@ -1,13 +1,13 @@ // Make sure that marks from declarative macros are applied to tokens in nonterminal. -// check-pass -// compile-flags: -Z span-debug -Z macro-backtrace -Z unpretty=expanded,hygiene -// compile-flags: -Z trim-diagnostic-paths=no +//@ check-pass +//@ compile-flags: -Z span-debug -Z macro-backtrace -Z unpretty=expanded,hygiene +//@ compile-flags: -Z trim-diagnostic-paths=no // ignore-tidy-linelength -// normalize-stdout-test "\d+#" -> "0#" -// normalize-stdout-test "expn\d{3,}" -> "expnNNN" -// normalize-stdout-test "extern crate compiler_builtins /\* \d+ \*/" -> "extern crate compiler_builtins /* NNN */" -// aux-build:test-macros.rs +//@ normalize-stdout-test "\d+#" -> "0#" +//@ normalize-stdout-test "expn\d{3,}" -> "expnNNN" +//@ normalize-stdout-test "extern crate compiler_builtins /\* \d+ \*/" -> "extern crate compiler_builtins /* NNN */" +//@ aux-build:test-macros.rs #![feature(decl_macro)] #![no_std] // Don't load unnecessary hygiene information from std diff --git a/tests/ui/proc-macro/nonterminal-token-hygiene.stdout b/tests/ui/proc-macro/nonterminal-token-hygiene.stdout index cf9addb8a94..2078e59b8b4 100644 --- a/tests/ui/proc-macro/nonterminal-token-hygiene.stdout +++ b/tests/ui/proc-macro/nonterminal-token-hygiene.stdout @@ -24,14 +24,14 @@ PRINT-BANG INPUT (DEBUG): TokenStream [ #![no_std /* 0#0 */] // Make sure that marks from declarative macros are applied to tokens in nonterminal. -// check-pass -// compile-flags: -Z span-debug -Z macro-backtrace -Z unpretty=expanded,hygiene -// compile-flags: -Z trim-diagnostic-paths=no +//@ check-pass +//@ compile-flags: -Z span-debug -Z macro-backtrace -Z unpretty=expanded,hygiene +//@ compile-flags: -Z trim-diagnostic-paths=no // ignore-tidy-linelength -// normalize-stdout-test "\d+#" -> "0#" -// normalize-stdout-test "expn\d{3,}" -> "expnNNN" -// normalize-stdout-test "extern crate compiler_builtins /\* \d+ \*/" -> "extern crate compiler_builtins /* NNN */" -// aux-build:test-macros.rs +//@ normalize-stdout-test "\d+#" -> "0#" +//@ normalize-stdout-test "expn\d{3,}" -> "expnNNN" +//@ normalize-stdout-test "extern crate compiler_builtins /\* \d+ \*/" -> "extern crate compiler_builtins /* NNN */" +//@ aux-build:test-macros.rs #![feature /* 0#0 */(decl_macro)] #![no_std /* 0#0 */] diff --git a/tests/ui/proc-macro/not-joint.rs b/tests/ui/proc-macro/not-joint.rs index 30da2811ed4..16b89bc6e81 100644 --- a/tests/ui/proc-macro/not-joint.rs +++ b/tests/ui/proc-macro/not-joint.rs @@ -1,5 +1,5 @@ -// run-pass -// aux-build:not-joint.rs +//@ run-pass +//@ aux-build:not-joint.rs extern crate not_joint as bar; use bar::{tokens, nothing}; diff --git a/tests/ui/proc-macro/out-of-line-mod.rs b/tests/ui/proc-macro/out-of-line-mod.rs index 658ed6c18e0..2a4fb16a09a 100644 --- a/tests/ui/proc-macro/out-of-line-mod.rs +++ b/tests/ui/proc-macro/out-of-line-mod.rs @@ -1,7 +1,7 @@ // Out-of-line module is found on the filesystem if passed through a proc macro (issue #58818). -// check-pass -// aux-build:test-macros.rs +//@ check-pass +//@ aux-build:test-macros.rs #[macro_use] extern crate test_macros; diff --git a/tests/ui/proc-macro/outer/inner.rs b/tests/ui/proc-macro/outer/inner.rs index a750083c607..210c05988bf 100644 --- a/tests/ui/proc-macro/outer/inner.rs +++ b/tests/ui/proc-macro/outer/inner.rs @@ -1 +1 @@ -// ignore-test (auxiliary, used by other tests) +//@ ignore-test (auxiliary, used by other tests) diff --git a/tests/ui/proc-macro/panic-abort.rs b/tests/ui/proc-macro/panic-abort.rs index ad312a875e3..40d8aec5ef6 100644 --- a/tests/ui/proc-macro/panic-abort.rs +++ b/tests/ui/proc-macro/panic-abort.rs @@ -1,4 +1,4 @@ -// error-pattern: building proc macro crate with `panic=abort` may crash the compiler should the proc-macro panic -// compile-flags: --crate-type proc-macro -Cpanic=abort -// force-host -// check-pass +//@ error-pattern: building proc macro crate with `panic=abort` may crash the compiler should the proc-macro panic +//@ compile-flags: --crate-type proc-macro -Cpanic=abort +//@ force-host +//@ check-pass diff --git a/tests/ui/proc-macro/parent-source-spans.rs b/tests/ui/proc-macro/parent-source-spans.rs index 354657db4db..12a1ab1a43d 100644 --- a/tests/ui/proc-macro/parent-source-spans.rs +++ b/tests/ui/proc-macro/parent-source-spans.rs @@ -1,4 +1,4 @@ -// aux-build:parent-source-spans.rs +//@ aux-build:parent-source-spans.rs #![feature(decl_macro)] diff --git a/tests/ui/proc-macro/pretty-print-hack-hide.rs b/tests/ui/proc-macro/pretty-print-hack-hide.rs index f53e8fe8252..26db43341ab 100644 --- a/tests/ui/proc-macro/pretty-print-hack-hide.rs +++ b/tests/ui/proc-macro/pretty-print-hack-hide.rs @@ -1,6 +1,6 @@ -// aux-build:test-macros.rs -// compile-flags: -Z span-debug -// check-pass +//@ aux-build:test-macros.rs +//@ compile-flags: -Z span-debug +//@ check-pass #![no_std] // Don't load unnecessary hygiene information from std extern crate std; diff --git a/tests/ui/proc-macro/pretty-print-hack-show.rs b/tests/ui/proc-macro/pretty-print-hack-show.rs index 24a389c450e..1b6794ae698 100644 --- a/tests/ui/proc-macro/pretty-print-hack-show.rs +++ b/tests/ui/proc-macro/pretty-print-hack-show.rs @@ -1,8 +1,8 @@ -// aux-build:test-macros.rs -// compile-flags: -Z span-debug -// revisions: local remapped +//@ aux-build:test-macros.rs +//@ compile-flags: -Z span-debug +//@ revisions: local remapped // [local] no-remap-src-base: The hack should work regardless of remapping. -// [remapped] remap-src-base +//@ [remapped] remap-src-base #![no_std] // Don't load unnecessary hygiene information from std extern crate std; diff --git a/tests/ui/proc-macro/pretty-print-hack/allsorts-rental-0.5.6/src/lib.rs b/tests/ui/proc-macro/pretty-print-hack/allsorts-rental-0.5.6/src/lib.rs index 889f399a7f2..f89098f3a5e 100644 --- a/tests/ui/proc-macro/pretty-print-hack/allsorts-rental-0.5.6/src/lib.rs +++ b/tests/ui/proc-macro/pretty-print-hack/allsorts-rental-0.5.6/src/lib.rs @@ -1,4 +1,4 @@ -// ignore-test (auxiliary, used by other tests) +//@ ignore-test (auxiliary, used by other tests) #[derive(Print)] enum ProceduralMasqueradeDummyType { diff --git a/tests/ui/proc-macro/pretty-print-hack/rental-0.5.5/src/lib.rs b/tests/ui/proc-macro/pretty-print-hack/rental-0.5.5/src/lib.rs index 889f399a7f2..f89098f3a5e 100644 --- a/tests/ui/proc-macro/pretty-print-hack/rental-0.5.5/src/lib.rs +++ b/tests/ui/proc-macro/pretty-print-hack/rental-0.5.5/src/lib.rs @@ -1,4 +1,4 @@ -// ignore-test (auxiliary, used by other tests) +//@ ignore-test (auxiliary, used by other tests) #[derive(Print)] enum ProceduralMasqueradeDummyType { diff --git a/tests/ui/proc-macro/pretty-print-hack/rental-0.5.6/src/lib.rs b/tests/ui/proc-macro/pretty-print-hack/rental-0.5.6/src/lib.rs index 889f399a7f2..f89098f3a5e 100644 --- a/tests/ui/proc-macro/pretty-print-hack/rental-0.5.6/src/lib.rs +++ b/tests/ui/proc-macro/pretty-print-hack/rental-0.5.6/src/lib.rs @@ -1,4 +1,4 @@ -// ignore-test (auxiliary, used by other tests) +//@ ignore-test (auxiliary, used by other tests) #[derive(Print)] enum ProceduralMasqueradeDummyType { diff --git a/tests/ui/proc-macro/pretty-print-tts.rs b/tests/ui/proc-macro/pretty-print-tts.rs index ffe2a741551..e3240e27c2a 100644 --- a/tests/ui/proc-macro/pretty-print-tts.rs +++ b/tests/ui/proc-macro/pretty-print-tts.rs @@ -1,6 +1,6 @@ -// check-pass -// aux-build:test-macros.rs -// compile-flags: -Z span-debug +//@ check-pass +//@ aux-build:test-macros.rs +//@ compile-flags: -Z span-debug #![feature(rustc_attrs)] diff --git a/tests/ui/proc-macro/proc-macro-abi.rs b/tests/ui/proc-macro/proc-macro-abi.rs index 93a613e8b8f..188912bed92 100644 --- a/tests/ui/proc-macro/proc-macro-abi.rs +++ b/tests/ui/proc-macro/proc-macro-abi.rs @@ -1,5 +1,5 @@ -// force-host -// no-prefer-dynamic +//@ force-host +//@ no-prefer-dynamic #![crate_type = "proc-macro"] #![allow(warnings)] diff --git a/tests/ui/proc-macro/proc-macro-attributes.rs b/tests/ui/proc-macro/proc-macro-attributes.rs index 8d96381b9bd..6d5e7b67c78 100644 --- a/tests/ui/proc-macro/proc-macro-attributes.rs +++ b/tests/ui/proc-macro/proc-macro-attributes.rs @@ -1,4 +1,4 @@ -// aux-build:derive-b.rs +//@ aux-build:derive-b.rs #[macro_use] extern crate derive_b; diff --git a/tests/ui/proc-macro/proc-macro-deprecated-attr.rs b/tests/ui/proc-macro/proc-macro-deprecated-attr.rs index f1144a4a55b..5e06a1c6cf8 100644 --- a/tests/ui/proc-macro/proc-macro-deprecated-attr.rs +++ b/tests/ui/proc-macro/proc-macro-deprecated-attr.rs @@ -1,6 +1,6 @@ -// check-pass -// force-host -// no-prefer-dynamic +//@ check-pass +//@ force-host +//@ no-prefer-dynamic #![deny(deprecated)] diff --git a/tests/ui/proc-macro/proc-macro-gates.rs b/tests/ui/proc-macro/proc-macro-gates.rs index e2cf4e73987..585d9a3c9be 100644 --- a/tests/ui/proc-macro/proc-macro-gates.rs +++ b/tests/ui/proc-macro/proc-macro-gates.rs @@ -1,4 +1,4 @@ -// aux-build:test-macros.rs +//@ aux-build:test-macros.rs // gate-test-proc_macro_hygiene #![feature(stmt_expr_attributes)] diff --git a/tests/ui/proc-macro/proc-macro-gates2.rs b/tests/ui/proc-macro/proc-macro-gates2.rs index 38fbd4733d5..76d8036d8a4 100644 --- a/tests/ui/proc-macro/proc-macro-gates2.rs +++ b/tests/ui/proc-macro/proc-macro-gates2.rs @@ -1,4 +1,4 @@ -// aux-build:test-macros.rs +//@ aux-build:test-macros.rs #![feature(stmt_expr_attributes)] diff --git a/tests/ui/proc-macro/pub-at-crate-root.rs b/tests/ui/proc-macro/pub-at-crate-root.rs index 54cf333a45b..32e4999a71b 100644 --- a/tests/ui/proc-macro/pub-at-crate-root.rs +++ b/tests/ui/proc-macro/pub-at-crate-root.rs @@ -1,5 +1,5 @@ -// force-host -// no-prefer-dynamic +//@ force-host +//@ no-prefer-dynamic #![crate_type = "proc-macro"] diff --git a/tests/ui/proc-macro/quote-debug.rs b/tests/ui/proc-macro/quote-debug.rs index e0304a01405..f1593b505f9 100644 --- a/tests/ui/proc-macro/quote-debug.rs +++ b/tests/ui/proc-macro/quote-debug.rs @@ -1,7 +1,7 @@ -// check-pass -// force-host -// no-prefer-dynamic -// compile-flags: -Z unpretty=expanded +//@ check-pass +//@ force-host +//@ no-prefer-dynamic +//@ compile-flags: -Z unpretty=expanded // // This file is not actually used as a proc-macro - instead, // it's just used to show the output of the `quote!` macro diff --git a/tests/ui/proc-macro/quote-debug.stdout b/tests/ui/proc-macro/quote-debug.stdout index 9f64a1e06b9..51f34423366 100644 --- a/tests/ui/proc-macro/quote-debug.stdout +++ b/tests/ui/proc-macro/quote-debug.stdout @@ -1,9 +1,9 @@ #![feature(prelude_import)] #![no_std] -// check-pass -// force-host -// no-prefer-dynamic -// compile-flags: -Z unpretty=expanded +//@ check-pass +//@ force-host +//@ no-prefer-dynamic +//@ compile-flags: -Z unpretty=expanded // // This file is not actually used as a proc-macro - instead, // it's just used to show the output of the `quote!` macro diff --git a/tests/ui/proc-macro/raw-ident.rs b/tests/ui/proc-macro/raw-ident.rs index 03cb4571496..2ea2d3079dc 100644 --- a/tests/ui/proc-macro/raw-ident.rs +++ b/tests/ui/proc-macro/raw-ident.rs @@ -1,4 +1,4 @@ -// aux-build:raw-ident.rs +//@ aux-build:raw-ident.rs #[macro_use] extern crate raw_ident; diff --git a/tests/ui/proc-macro/reserved-macro-names.rs b/tests/ui/proc-macro/reserved-macro-names.rs index c5e71a87dfb..0cbb0c06096 100644 --- a/tests/ui/proc-macro/reserved-macro-names.rs +++ b/tests/ui/proc-macro/reserved-macro-names.rs @@ -1,5 +1,5 @@ -// force-host -// no-prefer-dynamic +//@ force-host +//@ no-prefer-dynamic #![crate_type = "proc-macro"] diff --git a/tests/ui/proc-macro/resolve-error.rs b/tests/ui/proc-macro/resolve-error.rs index ad8a5bbb0f9..2670d8884ae 100644 --- a/tests/ui/proc-macro/resolve-error.rs +++ b/tests/ui/proc-macro/resolve-error.rs @@ -1,6 +1,6 @@ -// aux-build:derive-foo.rs -// aux-build:derive-clona.rs -// aux-build:test-macros.rs +//@ aux-build:derive-foo.rs +//@ aux-build:derive-clona.rs +//@ aux-build:test-macros.rs #[macro_use] extern crate derive_foo; diff --git a/tests/ui/proc-macro/resolved-located-at.rs b/tests/ui/proc-macro/resolved-located-at.rs index b785573f203..2f906d91e6b 100644 --- a/tests/ui/proc-macro/resolved-located-at.rs +++ b/tests/ui/proc-macro/resolved-located-at.rs @@ -1,4 +1,4 @@ -// aux-build:resolved-located-at.rs +//@ aux-build:resolved-located-at.rs #[macro_use] extern crate resolved_located_at; diff --git a/tests/ui/proc-macro/shadow.rs b/tests/ui/proc-macro/shadow.rs index 61959594c79..22aecb7c05f 100644 --- a/tests/ui/proc-macro/shadow.rs +++ b/tests/ui/proc-macro/shadow.rs @@ -1,4 +1,4 @@ -// aux-build:test-macros.rs +//@ aux-build:test-macros.rs #[macro_use] extern crate test_macros; diff --git a/tests/ui/proc-macro/signature-proc-macro-attribute.rs b/tests/ui/proc-macro/signature-proc-macro-attribute.rs index fb48f748ce0..e24e7c90d37 100644 --- a/tests/ui/proc-macro/signature-proc-macro-attribute.rs +++ b/tests/ui/proc-macro/signature-proc-macro-attribute.rs @@ -1,5 +1,5 @@ -// force-host -// no-prefer-dynamic +//@ force-host +//@ no-prefer-dynamic #![crate_type = "proc-macro"] diff --git a/tests/ui/proc-macro/signature-proc-macro-derive.rs b/tests/ui/proc-macro/signature-proc-macro-derive.rs index d294b159127..4e3cb090cdc 100644 --- a/tests/ui/proc-macro/signature-proc-macro-derive.rs +++ b/tests/ui/proc-macro/signature-proc-macro-derive.rs @@ -1,5 +1,5 @@ -// force-host -// no-prefer-dynamic +//@ force-host +//@ no-prefer-dynamic #![crate_type = "proc-macro"] diff --git a/tests/ui/proc-macro/signature-proc-macro.rs b/tests/ui/proc-macro/signature-proc-macro.rs index ca2509ed84b..0c9b3e6bde7 100644 --- a/tests/ui/proc-macro/signature-proc-macro.rs +++ b/tests/ui/proc-macro/signature-proc-macro.rs @@ -1,5 +1,5 @@ -// force-host -// no-prefer-dynamic +//@ force-host +//@ no-prefer-dynamic #![crate_type = "proc-macro"] diff --git a/tests/ui/proc-macro/signature.rs b/tests/ui/proc-macro/signature.rs index 7b4982a6178..6e2e8561a83 100644 --- a/tests/ui/proc-macro/signature.rs +++ b/tests/ui/proc-macro/signature.rs @@ -1,5 +1,5 @@ -// force-host -// no-prefer-dynamic +//@ force-host +//@ no-prefer-dynamic #![crate_type = "proc-macro"] #![allow(warnings)] diff --git a/tests/ui/proc-macro/smoke.rs b/tests/ui/proc-macro/smoke.rs index 04625559b91..dc32adb2e27 100644 --- a/tests/ui/proc-macro/smoke.rs +++ b/tests/ui/proc-macro/smoke.rs @@ -1,8 +1,8 @@ -// run-pass +//@ run-pass #![allow(unused_must_use)] #![allow(path_statements)] -// aux-build:derive-a.rs +//@ aux-build:derive-a.rs #[macro_use] extern crate derive_a; diff --git a/tests/ui/proc-macro/span-absolute-posititions.rs b/tests/ui/proc-macro/span-absolute-posititions.rs index 6d70fe611c4..ddbc5902d6b 100644 --- a/tests/ui/proc-macro/span-absolute-posititions.rs +++ b/tests/ui/proc-macro/span-absolute-posititions.rs @@ -1,4 +1,4 @@ -// aux-build:assert-span-pos.rs +//@ aux-build:assert-span-pos.rs // ignore-tidy-tab extern crate assert_span_pos; diff --git a/tests/ui/proc-macro/span-api-tests.rs b/tests/ui/proc-macro/span-api-tests.rs index 7493f9cdb3d..1e00f3ad7ac 100644 --- a/tests/ui/proc-macro/span-api-tests.rs +++ b/tests/ui/proc-macro/span-api-tests.rs @@ -1,7 +1,7 @@ -// run-pass -// aux-build:span-api-tests.rs -// aux-build:span-test-macros.rs -// compile-flags: -Ztranslate-remapped-path-to-local-path=yes +//@ run-pass +//@ aux-build:span-api-tests.rs +//@ aux-build:span-test-macros.rs +//@ compile-flags: -Ztranslate-remapped-path-to-local-path=yes #[macro_use] extern crate span_test_macros; diff --git a/tests/ui/proc-macro/span-from-proc-macro.rs b/tests/ui/proc-macro/span-from-proc-macro.rs index ecff2d72587..9d851d62d12 100644 --- a/tests/ui/proc-macro/span-from-proc-macro.rs +++ b/tests/ui/proc-macro/span-from-proc-macro.rs @@ -1,6 +1,6 @@ -// aux-build:custom-quote.rs -// aux-build:span-from-proc-macro.rs -// compile-flags: -Z macro-backtrace +//@ aux-build:custom-quote.rs +//@ aux-build:span-from-proc-macro.rs +//@ compile-flags: -Z macro-backtrace #[macro_use] extern crate span_from_proc_macro; diff --git a/tests/ui/proc-macro/span-preservation.rs b/tests/ui/proc-macro/span-preservation.rs index 0c735865558..25a44505c77 100644 --- a/tests/ui/proc-macro/span-preservation.rs +++ b/tests/ui/proc-macro/span-preservation.rs @@ -1,7 +1,7 @@ // For each of these, we should get the appropriate type mismatch error message, // and the function should be echoed. -// aux-build:test-macros.rs +//@ aux-build:test-macros.rs #[macro_use] extern crate test_macros; diff --git a/tests/ui/proc-macro/struct-field-macro.rs b/tests/ui/proc-macro/struct-field-macro.rs index 460f4d9f726..b2c3dd49de9 100644 --- a/tests/ui/proc-macro/struct-field-macro.rs +++ b/tests/ui/proc-macro/struct-field-macro.rs @@ -1,7 +1,7 @@ -// run-pass +//@ run-pass #![allow(dead_code)] -// aux-build:derive-nothing.rs +//@ aux-build:derive-nothing.rs #[macro_use] extern crate derive_nothing; diff --git a/tests/ui/proc-macro/subspan.rs b/tests/ui/proc-macro/subspan.rs index a4187f9e7c2..78804cba342 100644 --- a/tests/ui/proc-macro/subspan.rs +++ b/tests/ui/proc-macro/subspan.rs @@ -1,4 +1,4 @@ -// aux-build:subspan.rs +//@ aux-build:subspan.rs extern crate subspan; diff --git a/tests/ui/proc-macro/test-same-crate.rs b/tests/ui/proc-macro/test-same-crate.rs index c13f384fa3a..3b3565c25b2 100644 --- a/tests/ui/proc-macro/test-same-crate.rs +++ b/tests/ui/proc-macro/test-same-crate.rs @@ -1,4 +1,4 @@ -// compile-flags: --test +//@ compile-flags: --test #![crate_type = "proc-macro"] extern crate proc_macro; diff --git a/tests/ui/proc-macro/test.rs b/tests/ui/proc-macro/test.rs index 2ec62072020..9e76deab9ce 100644 --- a/tests/ui/proc-macro/test.rs +++ b/tests/ui/proc-macro/test.rs @@ -1,6 +1,6 @@ -// check-pass -// aux-build:api/mod.rs -// edition: 2021 +//@ check-pass +//@ aux-build:api/mod.rs +//@ edition: 2021 //! This is for everything that *would* be a #[test] inside of libproc_macro, //! except for the fact that proc_macro objects are not capable of existing diff --git a/tests/ui/proc-macro/three-equals.rs b/tests/ui/proc-macro/three-equals.rs index 21b137c99a7..d16fc55656c 100644 --- a/tests/ui/proc-macro/three-equals.rs +++ b/tests/ui/proc-macro/three-equals.rs @@ -1,4 +1,4 @@ -// aux-build:three-equals.rs +//@ aux-build:three-equals.rs extern crate three_equals; diff --git a/tests/ui/proc-macro/trailing-plus.rs b/tests/ui/proc-macro/trailing-plus.rs index 4f61de47d85..875225c15ca 100644 --- a/tests/ui/proc-macro/trailing-plus.rs +++ b/tests/ui/proc-macro/trailing-plus.rs @@ -1,6 +1,6 @@ -// check-pass -// aux-build:test-macros.rs -// compile-flags: -Z span-debug +//@ check-pass +//@ aux-build:test-macros.rs +//@ compile-flags: -Z span-debug #![no_std] // Don't load unnecessary hygiene information from std extern crate std; diff --git a/tests/ui/proc-macro/trait-fn-args-2015.rs b/tests/ui/proc-macro/trait-fn-args-2015.rs index 6b8df78a061..389bb5b6a92 100644 --- a/tests/ui/proc-macro/trait-fn-args-2015.rs +++ b/tests/ui/proc-macro/trait-fn-args-2015.rs @@ -1,7 +1,7 @@ // Unnamed arguments in trait functions can be passed through proc macros on 2015 edition. -// check-pass -// aux-build:test-macros.rs +//@ check-pass +//@ aux-build:test-macros.rs #![allow(anonymous_parameters)] diff --git a/tests/ui/proc-macro/two-crate-types-1.rs b/tests/ui/proc-macro/two-crate-types-1.rs index 80bfd357f07..432b0a601b2 100644 --- a/tests/ui/proc-macro/two-crate-types-1.rs +++ b/tests/ui/proc-macro/two-crate-types-1.rs @@ -1,7 +1,7 @@ -// error-pattern: cannot mix `proc-macro` crate type with others +//@ error-pattern: cannot mix `proc-macro` crate type with others -// force-host -// no-prefer-dynamic +//@ force-host +//@ no-prefer-dynamic #![crate_type = "proc-macro"] #![crate_type = "rlib"] diff --git a/tests/ui/proc-macro/two-crate-types-2.rs b/tests/ui/proc-macro/two-crate-types-2.rs index 39cbf7d3b72..491c5c71d76 100644 --- a/tests/ui/proc-macro/two-crate-types-2.rs +++ b/tests/ui/proc-macro/two-crate-types-2.rs @@ -1,3 +1,3 @@ -// error-pattern: cannot mix `proc-macro` crate type with others -// compile-flags: --crate-type rlib --crate-type proc-macro -// force-host +//@ error-pattern: cannot mix `proc-macro` crate type with others +//@ compile-flags: --crate-type rlib --crate-type proc-macro +//@ force-host diff --git a/tests/ui/proc-macro/unsafe-foreign-mod.rs b/tests/ui/proc-macro/unsafe-foreign-mod.rs index 7bdfa93c21f..b863b0fc114 100644 --- a/tests/ui/proc-macro/unsafe-foreign-mod.rs +++ b/tests/ui/proc-macro/unsafe-foreign-mod.rs @@ -1,5 +1,5 @@ -// run-pass -// aux-build:macro-only-syntax.rs +//@ run-pass +//@ aux-build:macro-only-syntax.rs extern crate macro_only_syntax; diff --git a/tests/ui/proc-macro/unsafe-mod.rs b/tests/ui/proc-macro/unsafe-mod.rs index 8ff6e352c53..00ea388af93 100644 --- a/tests/ui/proc-macro/unsafe-mod.rs +++ b/tests/ui/proc-macro/unsafe-mod.rs @@ -1,5 +1,5 @@ -// run-pass -// aux-build:macro-only-syntax.rs +//@ run-pass +//@ aux-build:macro-only-syntax.rs #![feature(proc_macro_hygiene)] diff --git a/tests/ui/proc-macro/visibility-path.rs b/tests/ui/proc-macro/visibility-path.rs index a73430db2c1..7b8579890b8 100644 --- a/tests/ui/proc-macro/visibility-path.rs +++ b/tests/ui/proc-macro/visibility-path.rs @@ -1,7 +1,7 @@ // Proc macro defined with `pub(path)` doesn't ICEs due to resolving the `path` (issue #68921). -// force-host -// no-prefer-dynamic +//@ force-host +//@ no-prefer-dynamic #![crate_type = "proc-macro"] diff --git a/tests/ui/proc-macro/weird-braces.rs b/tests/ui/proc-macro/weird-braces.rs index b9a7e08f993..b17b90742b5 100644 --- a/tests/ui/proc-macro/weird-braces.rs +++ b/tests/ui/proc-macro/weird-braces.rs @@ -1,6 +1,6 @@ -// aux-build:test-macros.rs -// check-pass -// compile-flags: -Z span-debug +//@ aux-build:test-macros.rs +//@ check-pass +//@ compile-flags: -Z span-debug #![feature(custom_inner_attributes)] diff --git a/tests/ui/proc-macro/weird-hygiene.rs b/tests/ui/proc-macro/weird-hygiene.rs index 7ba3f98a7a9..8b35898a4d2 100644 --- a/tests/ui/proc-macro/weird-hygiene.rs +++ b/tests/ui/proc-macro/weird-hygiene.rs @@ -1,4 +1,4 @@ -// aux-build:weird-hygiene.rs +//@ aux-build:weird-hygiene.rs #![feature(stmt_expr_attributes)] #![feature(proc_macro_hygiene)] diff --git a/tests/ui/process-termination/process-termination-blocking-io.rs b/tests/ui/process-termination/process-termination-blocking-io.rs index b2dab5c9381..c21edff25cf 100644 --- a/tests/ui/process-termination/process-termination-blocking-io.rs +++ b/tests/ui/process-termination/process-termination-blocking-io.rs @@ -1,8 +1,8 @@ // program should terminate even if a thread is blocked on I/O. // https://github.com/fortanix/rust-sgx/issues/109 -// run-pass -// ignore-emscripten no threads support +//@ run-pass +//@ ignore-emscripten no threads support use std::{net::TcpListener, sync::mpsc, thread}; diff --git a/tests/ui/process-termination/process-termination-simple.rs b/tests/ui/process-termination/process-termination-simple.rs index 8f2e5b94c3a..63eb2c74706 100644 --- a/tests/ui/process-termination/process-termination-simple.rs +++ b/tests/ui/process-termination/process-termination-simple.rs @@ -1,7 +1,7 @@ // program should terminate when std::process::exit is called from any thread -// run-pass -// ignore-emscripten no threads support +//@ run-pass +//@ ignore-emscripten no threads support use std::{process, thread}; diff --git a/tests/ui/process/core-run-destroy.rs b/tests/ui/process/core-run-destroy.rs index d0e97bf01f3..42bb35edf3b 100644 --- a/tests/ui/process/core-run-destroy.rs +++ b/tests/ui/process/core-run-destroy.rs @@ -1,14 +1,14 @@ -// run-pass +//@ run-pass #![allow(unused_must_use)] #![allow(stable_features)] #![allow(deprecated)] #![allow(unused_imports)] -// compile-flags:--test -// ignore-emscripten no processes -// ignore-sgx no processes -// ignore-vxworks no 'cat' and 'sleep' -// ignore-fuchsia no 'cat' +//@ compile-flags:--test +//@ ignore-emscripten no processes +//@ ignore-sgx no processes +//@ ignore-vxworks no 'cat' and 'sleep' +//@ ignore-fuchsia no 'cat' // N.B., these tests kill child processes. Valgrind sees these children as leaking // memory, which makes for some *confusing* logs. That's why these are here diff --git a/tests/ui/process/fds-are-cloexec.rs b/tests/ui/process/fds-are-cloexec.rs index 4482b7032a7..a5ede2ee04d 100644 --- a/tests/ui/process/fds-are-cloexec.rs +++ b/tests/ui/process/fds-are-cloexec.rs @@ -1,9 +1,9 @@ -// run-pass -// ignore-windows -// ignore-android -// ignore-emscripten no processes -// ignore-haiku -// ignore-sgx no processes +//@ run-pass +//@ ignore-windows +//@ ignore-android +//@ ignore-emscripten no processes +//@ ignore-haiku +//@ ignore-sgx no processes #![feature(rustc_private)] diff --git a/tests/ui/process/issue-13304.rs b/tests/ui/process/issue-13304.rs index b10f6d57255..06aad569169 100644 --- a/tests/ui/process/issue-13304.rs +++ b/tests/ui/process/issue-13304.rs @@ -1,7 +1,7 @@ -// run-pass +//@ run-pass #![allow(unused_mut)] -// ignore-emscripten no processes -// ignore-sgx no processes +//@ ignore-emscripten no processes +//@ ignore-sgx no processes use std::env; use std::io::prelude::*; diff --git a/tests/ui/process/issue-14456.rs b/tests/ui/process/issue-14456.rs index 52a56eb77f7..9146588aa4b 100644 --- a/tests/ui/process/issue-14456.rs +++ b/tests/ui/process/issue-14456.rs @@ -1,7 +1,7 @@ -// run-pass +//@ run-pass #![allow(unused_mut)] -// ignore-emscripten no processes -// ignore-sgx no processes +//@ ignore-emscripten no processes +//@ ignore-sgx no processes use std::env; use std::io::prelude::*; diff --git a/tests/ui/process/issue-14940.rs b/tests/ui/process/issue-14940.rs index 98a4af0c467..3c8de7cfccc 100644 --- a/tests/ui/process/issue-14940.rs +++ b/tests/ui/process/issue-14940.rs @@ -1,6 +1,6 @@ -// run-pass -// ignore-emscripten no processes -// ignore-sgx no processes +//@ run-pass +//@ ignore-emscripten no processes +//@ ignore-sgx no processes use std::env; use std::process::Command; diff --git a/tests/ui/process/issue-16272.rs b/tests/ui/process/issue-16272.rs index 5cf3fd94928..484c3ea4116 100644 --- a/tests/ui/process/issue-16272.rs +++ b/tests/ui/process/issue-16272.rs @@ -1,6 +1,6 @@ -// run-pass -// ignore-emscripten no processes -// ignore-sgx no processes +//@ run-pass +//@ ignore-emscripten no processes +//@ ignore-sgx no processes use std::process::Command; use std::env; diff --git a/tests/ui/process/issue-20091.rs b/tests/ui/process/issue-20091.rs index 86cc79d6b42..27986277fad 100644 --- a/tests/ui/process/issue-20091.rs +++ b/tests/ui/process/issue-20091.rs @@ -1,8 +1,8 @@ -// run-pass +//@ run-pass #![allow(stable_features)] -// ignore-emscripten no processes -// ignore-sgx no processes +//@ ignore-emscripten no processes +//@ ignore-sgx no processes #![feature(os)] diff --git a/tests/ui/process/multi-panic.rs b/tests/ui/process/multi-panic.rs index c240dc18fd3..e8aa7f59f85 100644 --- a/tests/ui/process/multi-panic.rs +++ b/tests/ui/process/multi-panic.rs @@ -1,7 +1,7 @@ -// run-pass -// ignore-emscripten no processes -// ignore-sgx no processes -// needs-unwind +//@ run-pass +//@ ignore-emscripten no processes +//@ ignore-sgx no processes +//@ needs-unwind fn check_for_no_backtrace(test: std::process::Output) { assert!(!test.status.success()); diff --git a/tests/ui/process/no-stdio.rs b/tests/ui/process/no-stdio.rs index 68e6fa838b4..86e177617e5 100644 --- a/tests/ui/process/no-stdio.rs +++ b/tests/ui/process/no-stdio.rs @@ -1,7 +1,7 @@ -// run-pass -// ignore-android -// ignore-emscripten no processes -// ignore-sgx no processes +//@ run-pass +//@ ignore-android +//@ ignore-emscripten no processes +//@ ignore-sgx no processes #![feature(rustc_private)] diff --git a/tests/ui/process/nofile-limit.rs b/tests/ui/process/nofile-limit.rs index 3ddf8d6ef24..dafc982607c 100644 --- a/tests/ui/process/nofile-limit.rs +++ b/tests/ui/process/nofile-limit.rs @@ -2,11 +2,11 @@ // with RLIMIT_NOFILE resource lowered to zero. Regression // test for issue #96621. // -// run-pass -// dont-check-compiler-stderr -// only-linux -// no-prefer-dynamic -// compile-flags: -Ctarget-feature=+crt-static -Crpath=no -Crelocation-model=static +//@ run-pass +//@ dont-check-compiler-stderr +//@ only-linux +//@ no-prefer-dynamic +//@ compile-flags: -Ctarget-feature=+crt-static -Crpath=no -Crelocation-model=static #![feature(exit_status_error)] #![feature(rustc_private)] extern crate libc; diff --git a/tests/ui/process/println-with-broken-pipe.rs b/tests/ui/process/println-with-broken-pipe.rs index 47c590ce2f0..bfbea280f0b 100644 --- a/tests/ui/process/println-with-broken-pipe.rs +++ b/tests/ui/process/println-with-broken-pipe.rs @@ -1,11 +1,11 @@ -// run-pass -// check-run-results -// ignore-windows -// ignore-emscripten -// ignore-fuchsia -// ignore-horizon -// ignore-android -// normalize-stderr-test ".rs:\d+:\d+" -> ".rs:LL:CC" +//@ run-pass +//@ check-run-results +//@ ignore-windows +//@ ignore-emscripten +//@ ignore-fuchsia +//@ ignore-horizon +//@ ignore-android +//@ normalize-stderr-test ".rs:\d+:\d+" -> ".rs:LL:CC" // Test what the error message looks like when `println!()` panics because of // `std::io::ErrorKind::BrokenPipe` diff --git a/tests/ui/process/process-envs.rs b/tests/ui/process/process-envs.rs index f3a46979142..6f8a591b7d4 100644 --- a/tests/ui/process/process-envs.rs +++ b/tests/ui/process/process-envs.rs @@ -1,8 +1,8 @@ -// run-pass -// ignore-emscripten no processes -// ignore-sgx no processes -// ignore-vxworks no 'env' -// ignore-fuchsia no 'env' +//@ run-pass +//@ ignore-emscripten no processes +//@ ignore-sgx no processes +//@ ignore-vxworks no 'env' +//@ ignore-fuchsia no 'env' use std::process::Command; use std::env; diff --git a/tests/ui/process/process-exit.rs b/tests/ui/process/process-exit.rs index d193e073e7f..7cf1f2bccc3 100644 --- a/tests/ui/process/process-exit.rs +++ b/tests/ui/process/process-exit.rs @@ -1,7 +1,7 @@ -// run-pass +//@ run-pass #![allow(unused_imports)] -// ignore-emscripten no processes -// ignore-sgx no processes +//@ ignore-emscripten no processes +//@ ignore-sgx no processes use std::env; use std::process::{self, Command, Stdio}; diff --git a/tests/ui/process/process-panic-after-fork.rs b/tests/ui/process/process-panic-after-fork.rs index 7c2fc296bb0..0115dbd27ef 100644 --- a/tests/ui/process/process-panic-after-fork.rs +++ b/tests/ui/process/process-panic-after-fork.rs @@ -1,11 +1,11 @@ -// run-pass -// no-prefer-dynamic -// ignore-wasm32-bare no libc -// ignore-windows -// ignore-sgx no libc -// ignore-emscripten no processes -// ignore-sgx no processes -// ignore-fuchsia no fork +//@ run-pass +//@ no-prefer-dynamic +//@ ignore-wasm32-bare no libc +//@ ignore-windows +//@ ignore-sgx no libc +//@ ignore-emscripten no processes +//@ ignore-sgx no processes +//@ ignore-fuchsia no fork #![feature(rustc_private)] #![feature(never_type)] diff --git a/tests/ui/process/process-remove-from-env.rs b/tests/ui/process/process-remove-from-env.rs index ad027d68588..abacccf5a8a 100644 --- a/tests/ui/process/process-remove-from-env.rs +++ b/tests/ui/process/process-remove-from-env.rs @@ -1,8 +1,8 @@ -// run-pass -// ignore-emscripten no processes -// ignore-sgx no processes -// ignore-vxworks no 'env' -// ignore-fuchsia no 'env' +//@ run-pass +//@ ignore-emscripten no processes +//@ ignore-sgx no processes +//@ ignore-vxworks no 'env' +//@ ignore-fuchsia no 'env' use std::process::Command; use std::env; diff --git a/tests/ui/process/process-sigpipe.rs b/tests/ui/process/process-sigpipe.rs index 4f4db119115..64d0bbc2b41 100644 --- a/tests/ui/process/process-sigpipe.rs +++ b/tests/ui/process/process-sigpipe.rs @@ -1,8 +1,8 @@ -// run-pass +//@ run-pass #![allow(unused_imports)] #![allow(deprecated)] -// ignore-android since the dynamic linker sets a SIGPIPE handler (to do +//@ ignore-android since the dynamic linker sets a SIGPIPE handler (to do // a crash report) so inheritance is moot on the entire platform // libstd ignores SIGPIPE, and other libraries may set signal masks. @@ -13,9 +13,9 @@ // (instead of running forever), and that it does not print an error // message about a broken pipe. -// ignore-emscripten no threads support -// ignore-vxworks no 'sh' -// ignore-fuchsia no 'sh' +//@ ignore-emscripten no threads support +//@ ignore-vxworks no 'sh' +//@ ignore-fuchsia no 'sh' use std::process; use std::thread; diff --git a/tests/ui/process/process-spawn-nonexistent.rs b/tests/ui/process/process-spawn-nonexistent.rs index 9dd608986df..2f45dace2f9 100644 --- a/tests/ui/process/process-spawn-nonexistent.rs +++ b/tests/ui/process/process-spawn-nonexistent.rs @@ -1,7 +1,7 @@ -// run-pass -// ignore-emscripten no processes -// ignore-sgx no processes -// ignore-fuchsia ErrorKind not translated +//@ run-pass +//@ ignore-emscripten no processes +//@ ignore-sgx no processes +//@ ignore-fuchsia ErrorKind not translated use std::io::ErrorKind; use std::process::Command; diff --git a/tests/ui/process/process-spawn-with-unicode-params.rs b/tests/ui/process/process-spawn-with-unicode-params.rs index 16dba6292db..26b3899df96 100644 --- a/tests/ui/process/process-spawn-with-unicode-params.rs +++ b/tests/ui/process/process-spawn-with-unicode-params.rs @@ -1,5 +1,5 @@ -// run-pass -// no-prefer-dynamic +//@ run-pass +//@ no-prefer-dynamic // The test copies itself into a subdirectory with a non-ASCII name and then // runs it as a child process within the subdirectory. The parent process @@ -7,9 +7,9 @@ // non-ASCII characters. The child process ensures all the strings are // intact. -// ignore-emscripten no processes -// ignore-sgx no processes -// ignore-fuchsia Filesystem manipulation privileged +//@ ignore-emscripten no processes +//@ ignore-sgx no processes +//@ ignore-fuchsia Filesystem manipulation privileged use std::io::prelude::*; use std::io; diff --git a/tests/ui/process/process-status-inherits-stdin.rs b/tests/ui/process/process-status-inherits-stdin.rs index 7719dd9ad85..210968a6ce5 100644 --- a/tests/ui/process/process-status-inherits-stdin.rs +++ b/tests/ui/process/process-status-inherits-stdin.rs @@ -1,6 +1,6 @@ -// run-pass -// ignore-emscripten no processes -// ignore-sgx no processes +//@ run-pass +//@ ignore-emscripten no processes +//@ ignore-sgx no processes use std::env; use std::io; diff --git a/tests/ui/process/signal-exit-status.rs b/tests/ui/process/signal-exit-status.rs index 0f05f916cb9..5efef8a6121 100644 --- a/tests/ui/process/signal-exit-status.rs +++ b/tests/ui/process/signal-exit-status.rs @@ -1,8 +1,8 @@ -// run-pass -// ignore-emscripten no processes -// ignore-sgx no processes -// ignore-windows -// ignore-fuchsia code returned as ZX_TASK_RETCODE_EXCEPTION_KILL, FIXME (#58590) +//@ run-pass +//@ ignore-emscripten no processes +//@ ignore-sgx no processes +//@ ignore-windows +//@ ignore-fuchsia code returned as ZX_TASK_RETCODE_EXCEPTION_KILL, FIXME (#58590) #![feature(core_intrinsics)] diff --git a/tests/ui/process/sigpipe-should-be-ignored.rs b/tests/ui/process/sigpipe-should-be-ignored.rs index 144eeca2318..cd6bda27646 100644 --- a/tests/ui/process/sigpipe-should-be-ignored.rs +++ b/tests/ui/process/sigpipe-should-be-ignored.rs @@ -1,11 +1,11 @@ -// run-pass +//@ run-pass #![allow(unused_must_use)] // Be sure that when a SIGPIPE would have been received that the entire process // doesn't die in a ball of fire, but rather it's gracefully handled. -// ignore-emscripten no processes -// ignore-sgx no processes +//@ ignore-emscripten no processes +//@ ignore-sgx no processes use std::env; use std::io::prelude::*; diff --git a/tests/ui/process/tls-exit-status.rs b/tests/ui/process/tls-exit-status.rs index 6296e5042d2..5a81c7708fe 100644 --- a/tests/ui/process/tls-exit-status.rs +++ b/tests/ui/process/tls-exit-status.rs @@ -1,7 +1,7 @@ -// run-fail -// error-pattern:nonzero -// exec-env:RUST_NEWRT=1 -// ignore-emscripten no processes +//@ run-fail +//@ error-pattern:nonzero +//@ exec-env:RUST_NEWRT=1 +//@ ignore-emscripten no processes use std::env; diff --git a/tests/ui/process/try-wait.rs b/tests/ui/process/try-wait.rs index 692197210b1..948ce63c76c 100644 --- a/tests/ui/process/try-wait.rs +++ b/tests/ui/process/try-wait.rs @@ -1,8 +1,8 @@ -// run-pass +//@ run-pass #![allow(stable_features)] -// ignore-emscripten no processes -// ignore-sgx no processes +//@ ignore-emscripten no processes +//@ ignore-sgx no processes #![feature(process_try_wait)] diff --git a/tests/ui/project-cache-issue-31849.rs b/tests/ui/project-cache-issue-31849.rs index 07fb6abaeac..29c278171a6 100644 --- a/tests/ui/project-cache-issue-31849.rs +++ b/tests/ui/project-cache-issue-31849.rs @@ -1,4 +1,4 @@ -// run-pass +//@ run-pass // Regression test for #31849: the problem here was actually a performance // cliff, but I'm adding the test for reference. diff --git a/tests/ui/ptr-coercion-rpass.rs b/tests/ui/ptr-coercion-rpass.rs index 1c3ce33039e..5d9b907f0e4 100644 --- a/tests/ui/ptr-coercion-rpass.rs +++ b/tests/ui/ptr-coercion-rpass.rs @@ -1,9 +1,9 @@ -// run-pass +//@ run-pass #![allow(unused_variables)] // Test coercions between pointers which don't do anything fancy like unsizing. -// pretty-expanded FIXME #23616 +//@ pretty-expanded FIXME #23616 pub fn main() { // &mut -> & diff --git a/tests/ui/ptr_ops/issue-80309-safe.rs b/tests/ui/ptr_ops/issue-80309-safe.rs index 8a4ff16694b..70c27c42adf 100644 --- a/tests/ui/ptr_ops/issue-80309-safe.rs +++ b/tests/ui/ptr_ops/issue-80309-safe.rs @@ -1,5 +1,5 @@ -// run-pass -// compile-flags: -O +//@ run-pass +//@ compile-flags: -O // Regression test for issue #80309 diff --git a/tests/ui/ptr_ops/issue-80309.rs b/tests/ui/ptr_ops/issue-80309.rs index c13ce3c9cd2..c9b1af5540a 100644 --- a/tests/ui/ptr_ops/issue-80309.rs +++ b/tests/ui/ptr_ops/issue-80309.rs @@ -1,5 +1,5 @@ -// run-pass -// compile-flags: -O +//@ run-pass +//@ compile-flags: -O // Regression test for issue #80309 diff --git a/tests/ui/pub/issue-33174-restricted-type-in-public-interface.rs b/tests/ui/pub/issue-33174-restricted-type-in-public-interface.rs index 7930964c83b..9eb8857e5e9 100644 --- a/tests/ui/pub/issue-33174-restricted-type-in-public-interface.rs +++ b/tests/ui/pub/issue-33174-restricted-type-in-public-interface.rs @@ -1,4 +1,4 @@ -// check-pass +//@ check-pass #![allow(non_camel_case_types)] // genus is always capitalized diff --git a/tests/ui/pub/pub-ident-fn-2.fixed b/tests/ui/pub/pub-ident-fn-2.fixed index afd75a41f7b..d9da7374e62 100644 --- a/tests/ui/pub/pub-ident-fn-2.fixed +++ b/tests/ui/pub/pub-ident-fn-2.fixed @@ -1,4 +1,4 @@ -// run-rustfix +//@ run-rustfix pub fn foo(_s: usize) { bar() } //~^ ERROR missing `fn` for function definition diff --git a/tests/ui/pub/pub-ident-fn-2.rs b/tests/ui/pub/pub-ident-fn-2.rs index e7b86a9098d..4aeb72aef8c 100644 --- a/tests/ui/pub/pub-ident-fn-2.rs +++ b/tests/ui/pub/pub-ident-fn-2.rs @@ -1,4 +1,4 @@ -// run-rustfix +//@ run-rustfix pub foo(_s: usize) { bar() } //~^ ERROR missing `fn` for function definition diff --git a/tests/ui/pub/pub-ident-fn-with-lifetime.fixed b/tests/ui/pub/pub-ident-fn-with-lifetime.fixed index e510ace5fc1..2c0d8849cdd 100644 --- a/tests/ui/pub/pub-ident-fn-with-lifetime.fixed +++ b/tests/ui/pub/pub-ident-fn-with-lifetime.fixed @@ -1,4 +1,4 @@ -// run-rustfix +//@ run-rustfix pub fn foo<'a>(_s: &'a usize) -> bool { true } //~^ ERROR missing `fn` for function definition diff --git a/tests/ui/pub/pub-ident-fn-with-lifetime.rs b/tests/ui/pub/pub-ident-fn-with-lifetime.rs index 63e6eca1516..8cdc152f163 100644 --- a/tests/ui/pub/pub-ident-fn-with-lifetime.rs +++ b/tests/ui/pub/pub-ident-fn-with-lifetime.rs @@ -1,4 +1,4 @@ -// run-rustfix +//@ run-rustfix pub foo<'a>(_s: &'a usize) -> bool { true } //~^ ERROR missing `fn` for function definition diff --git a/tests/ui/pub/pub-ident-fn.fixed b/tests/ui/pub/pub-ident-fn.fixed index 65ed8c7b4dd..d2aea4e0690 100644 --- a/tests/ui/pub/pub-ident-fn.fixed +++ b/tests/ui/pub/pub-ident-fn.fixed @@ -1,4 +1,4 @@ -// run-rustfix +//@ run-rustfix pub fn foo(_s: usize) -> bool { true } //~^ ERROR missing `fn` for function definition diff --git a/tests/ui/pub/pub-ident-fn.rs b/tests/ui/pub/pub-ident-fn.rs index 2fe4d34fb22..899ea82ccb7 100644 --- a/tests/ui/pub/pub-ident-fn.rs +++ b/tests/ui/pub/pub-ident-fn.rs @@ -1,4 +1,4 @@ -// run-rustfix +//@ run-rustfix pub foo(_s: usize) -> bool { true } //~^ ERROR missing `fn` for function definition diff --git a/tests/ui/pub/pub-ident-struct-4.fixed b/tests/ui/pub/pub-ident-struct-4.fixed index 71c6f0a6994..5fedbb72437 100644 --- a/tests/ui/pub/pub-ident-struct-4.fixed +++ b/tests/ui/pub/pub-ident-struct-4.fixed @@ -1,4 +1,4 @@ -// run-rustfix +//@ run-rustfix pub struct T(#[allow(dead_code)] String); //~^ ERROR missing `struct` for struct definition diff --git a/tests/ui/pub/pub-ident-struct-4.rs b/tests/ui/pub/pub-ident-struct-4.rs index 971f39a8ce1..5c721c25a78 100644 --- a/tests/ui/pub/pub-ident-struct-4.rs +++ b/tests/ui/pub/pub-ident-struct-4.rs @@ -1,4 +1,4 @@ -// run-rustfix +//@ run-rustfix pub T(#[allow(dead_code)] String); //~^ ERROR missing `struct` for struct definition diff --git a/tests/ui/pub/pub-ident-struct.fixed b/tests/ui/pub/pub-ident-struct.fixed index 58cde8fd6e0..3f0610cd765 100644 --- a/tests/ui/pub/pub-ident-struct.fixed +++ b/tests/ui/pub/pub-ident-struct.fixed @@ -1,4 +1,4 @@ -// run-rustfix +//@ run-rustfix pub struct S { //~^ ERROR missing `struct` for struct definition diff --git a/tests/ui/pub/pub-ident-struct.rs b/tests/ui/pub/pub-ident-struct.rs index 3930e556e9a..6d06c406f6c 100644 --- a/tests/ui/pub/pub-ident-struct.rs +++ b/tests/ui/pub/pub-ident-struct.rs @@ -1,4 +1,4 @@ -// run-rustfix +//@ run-rustfix pub S { //~^ ERROR missing `struct` for struct definition diff --git a/tests/ui/query-system/query_depth.rs b/tests/ui/query-system/query_depth.rs index e600c1c08e5..29514b58e24 100644 --- a/tests/ui/query-system/query_depth.rs +++ b/tests/ui/query-system/query_depth.rs @@ -1,4 +1,4 @@ -// build-fail +//@ build-fail #![recursion_limit = "64"] type Byte = Option "long-type-hash" +//@ build-fail +//@ compile-flags: -Copt-level=0 +//@ normalize-stderr-test: "long-type-\d+" -> "long-type-hash" //~^^^ ERROR overflow evaluating the requirement -// ignore-compare-mode-next-solver (hangs) +//@ ignore-compare-mode-next-solver (hangs) fn main() { let mut iter = 0u8..1; diff --git a/tests/ui/recursion/issue-86784.rs b/tests/ui/recursion/issue-86784.rs index 34f4aaedb32..05873ef13d7 100644 --- a/tests/ui/recursion/issue-86784.rs +++ b/tests/ui/recursion/issue-86784.rs @@ -1,4 +1,4 @@ -// build-pass +//@ build-pass fn main() { let _temp_1 = 0; diff --git a/tests/ui/recursion/issue-95134.rs b/tests/ui/recursion/issue-95134.rs index 2f1cffa2fa9..cbf278861fa 100644 --- a/tests/ui/recursion/issue-95134.rs +++ b/tests/ui/recursion/issue-95134.rs @@ -1,8 +1,8 @@ -// build-fail -// known-bug: #95134 -// compile-flags: -Copt-level=0 -// dont-check-failure-status -// dont-check-compiler-stderr +//@ build-fail +//@ known-bug: #95134 +//@ compile-flags: -Copt-level=0 +//@ dont-check-failure-status +//@ dont-check-compiler-stderr pub fn encode_num(n: u32, mut writer: Writer) -> Result<(), Writer::Error> { if n > 15 { diff --git a/tests/ui/recursion/recursion.rs b/tests/ui/recursion/recursion.rs index b3ba0ec3a2a..074e9ed6947 100644 --- a/tests/ui/recursion/recursion.rs +++ b/tests/ui/recursion/recursion.rs @@ -1,6 +1,6 @@ -// build-fail -// compile-flags:-C overflow-checks=off -// normalize-stderr-test: ".nll/" -> "/" +//@ build-fail +//@ compile-flags:-C overflow-checks=off +//@ normalize-stderr-test: ".nll/" -> "/" enum Nil {NilValue} struct Cons {head:isize, tail:T} diff --git a/tests/ui/recursion/recursive-reexports.rs b/tests/ui/recursion/recursive-reexports.rs index 0e17f225118..26d15fb0473 100644 --- a/tests/ui/recursion/recursive-reexports.rs +++ b/tests/ui/recursion/recursive-reexports.rs @@ -1,4 +1,4 @@ -// aux-build:recursive_reexports.rs +//@ aux-build:recursive_reexports.rs extern crate recursive_reexports; diff --git a/tests/ui/recursion_limit/issue-40003.rs b/tests/ui/recursion_limit/issue-40003.rs index 01a2aaffb9e..5032d0c9db3 100644 --- a/tests/ui/recursion_limit/issue-40003.rs +++ b/tests/ui/recursion_limit/issue-40003.rs @@ -1,4 +1,4 @@ -// run-pass +//@ run-pass #![allow(unused_must_use)] fn main() { if false { test(); } diff --git a/tests/ui/recursion_limit/zero-overflow.rs b/tests/ui/recursion_limit/zero-overflow.rs index 77bd8185676..3887972a516 100644 --- a/tests/ui/recursion_limit/zero-overflow.rs +++ b/tests/ui/recursion_limit/zero-overflow.rs @@ -1,6 +1,6 @@ //~ ERROR overflow evaluating the requirement `&mut Self: DispatchFromDyn<&mut RustaceansAreAwesome> //~| HELP consider increasing the recursion limit -// build-fail +//@ build-fail #![recursion_limit = "0"] diff --git a/tests/ui/reexport-test-harness-main.rs b/tests/ui/reexport-test-harness-main.rs index 2582975e219..f79828fc7d6 100644 --- a/tests/ui/reexport-test-harness-main.rs +++ b/tests/ui/reexport-test-harness-main.rs @@ -1,5 +1,5 @@ -// run-pass -// compile-flags:--test +//@ run-pass +//@ compile-flags:--test #![reexport_test_harness_main = "test_main"] diff --git a/tests/ui/regions/closure-in-projection-issue-97405.rs b/tests/ui/regions/closure-in-projection-issue-97405.rs index 5489533972e..fd73e480865 100644 --- a/tests/ui/regions/closure-in-projection-issue-97405.rs +++ b/tests/ui/regions/closure-in-projection-issue-97405.rs @@ -3,8 +3,8 @@ // but we should be able to prove ` as Iterator>::Item: 'static` without // requiring `T: 'static` -// edition:2018 -// check-fail +//@ edition:2018 +//@ check-fail fn opaque(_: F) -> impl Iterator { b"".iter() } diff --git a/tests/ui/regions/forall-wf-reflexive.rs b/tests/ui/regions/forall-wf-reflexive.rs index 8e6b8224b31..3748ee2b8cc 100644 --- a/tests/ui/regions/forall-wf-reflexive.rs +++ b/tests/ui/regions/forall-wf-reflexive.rs @@ -1,7 +1,7 @@ // Test that we consider `for<'a> T: 'a` to be sufficient to prove // that `for<'a> T: 'a`. // -// check-pass +//@ check-pass #![allow(warnings)] diff --git a/tests/ui/regions/init-res-into-things.rs b/tests/ui/regions/init-res-into-things.rs index 7f416262dcb..64909b32919 100644 --- a/tests/ui/regions/init-res-into-things.rs +++ b/tests/ui/regions/init-res-into-things.rs @@ -1,4 +1,4 @@ -// run-pass +//@ run-pass #![allow(non_camel_case_types)] #![allow(dead_code)] diff --git a/tests/ui/regions/issue-102374.rs b/tests/ui/regions/issue-102374.rs index fd71248d9cb..db2b38334b5 100644 --- a/tests/ui/regions/issue-102374.rs +++ b/tests/ui/regions/issue-102374.rs @@ -1,4 +1,4 @@ -// normalize-stderr-test: "long-type-\d+" -> "long-type-hash" +//@ normalize-stderr-test: "long-type-\d+" -> "long-type-hash" use std::cell::Cell; #[rustfmt::skip] diff --git a/tests/ui/regions/issue-11612.rs b/tests/ui/regions/issue-11612.rs index 9f7f1cc6fc7..b95229ffa4a 100644 --- a/tests/ui/regions/issue-11612.rs +++ b/tests/ui/regions/issue-11612.rs @@ -1,10 +1,10 @@ -// check-pass +//@ check-pass #![allow(dead_code)] // #11612 // We weren't updating the auto adjustments with all the resolved // type information after type check. -// pretty-expanded FIXME #23616 +//@ pretty-expanded FIXME #23616 trait A { fn dummy(&self) { } } diff --git a/tests/ui/regions/issue-21520.rs b/tests/ui/regions/issue-21520.rs index ab4ac7237c7..4f92109ab90 100644 --- a/tests/ui/regions/issue-21520.rs +++ b/tests/ui/regions/issue-21520.rs @@ -1,9 +1,9 @@ -// check-pass +//@ check-pass #![allow(dead_code)] // Test that the requirement (in `Bar`) that `T::Bar : 'static` does // not wind up propagating to `T`. -// pretty-expanded FIXME #23616 +//@ pretty-expanded FIXME #23616 pub trait Foo { type Bar; diff --git a/tests/ui/regions/issue-24085.rs b/tests/ui/regions/issue-24085.rs index 86e94beb7e2..a45ea9a87a7 100644 --- a/tests/ui/regions/issue-24085.rs +++ b/tests/ui/regions/issue-24085.rs @@ -1,4 +1,4 @@ -// check-pass +//@ check-pass #![allow(dead_code)] // Regression test for #24085. Errors were occurring in region // inference due to the requirement that `'a:b'`, which was getting diff --git a/tests/ui/regions/issue-26448-1.rs b/tests/ui/regions/issue-26448-1.rs index 7d2d75bf2e8..0fa40709a7b 100644 --- a/tests/ui/regions/issue-26448-1.rs +++ b/tests/ui/regions/issue-26448-1.rs @@ -1,4 +1,4 @@ -// run-pass +//@ run-pass pub trait Foo { fn foo(self) -> T; diff --git a/tests/ui/regions/issue-26448-2.rs b/tests/ui/regions/issue-26448-2.rs index c60e06c3ceb..5fd1e90ebfd 100644 --- a/tests/ui/regions/issue-26448-2.rs +++ b/tests/ui/regions/issue-26448-2.rs @@ -1,4 +1,4 @@ -// check-pass +//@ check-pass pub struct Bar { items: Vec<&'static str>, diff --git a/tests/ui/regions/issue-26448-3.rs b/tests/ui/regions/issue-26448-3.rs index d48022c09fe..8b6dfb0ed40 100644 --- a/tests/ui/regions/issue-26448-3.rs +++ b/tests/ui/regions/issue-26448-3.rs @@ -1,4 +1,4 @@ -// check-pass +//@ check-pass pub struct Item { _inner: &'static str, diff --git a/tests/ui/regions/issue-5243.rs b/tests/ui/regions/issue-5243.rs index c511d45f02d..a346903d652 100644 --- a/tests/ui/regions/issue-5243.rs +++ b/tests/ui/regions/issue-5243.rs @@ -1,10 +1,10 @@ -// run-pass +//@ run-pass #![allow(dead_code)] // Check that merely having lifetime parameters is not // enough for codegen to consider this as non-monomorphic, // which led to various assertions and failures in turn. -// pretty-expanded FIXME #23616 +//@ pretty-expanded FIXME #23616 struct S<'a> { v: &'a isize diff --git a/tests/ui/regions/issue-56537-closure-uses-region-from-container.rs b/tests/ui/regions/issue-56537-closure-uses-region-from-container.rs index a8f7a41c442..601ef577079 100644 --- a/tests/ui/regions/issue-56537-closure-uses-region-from-container.rs +++ b/tests/ui/regions/issue-56537-closure-uses-region-from-container.rs @@ -8,7 +8,7 @@ // follow the same lifetime-elision rules used elsewhere. See // rust-lang/rust#56537 -// check-pass +//@ check-pass fn willy_no_annot<'w>(p: &'w str, q: &str) -> &'w str { let free_dumb = |_x| { p }; // no type annotation at all diff --git a/tests/ui/regions/issue-6157.rs b/tests/ui/regions/issue-6157.rs index b7a44ed8623..03a8c14e1a6 100644 --- a/tests/ui/regions/issue-6157.rs +++ b/tests/ui/regions/issue-6157.rs @@ -1,5 +1,5 @@ -// run-pass -// pretty-expanded FIXME #23616 +//@ run-pass +//@ pretty-expanded FIXME #23616 pub trait OpInt { fn call(&mut self, _: isize, _: isize) -> isize; } diff --git a/tests/ui/regions/issue-72051-member-region-hang.rs b/tests/ui/regions/issue-72051-member-region-hang.rs index b7340b79d68..c27d3ccbb9d 100644 --- a/tests/ui/regions/issue-72051-member-region-hang.rs +++ b/tests/ui/regions/issue-72051-member-region-hang.rs @@ -1,7 +1,7 @@ // Regression test for #72051, hang when resolving regions. -// check-pass -// edition:2018 +//@ check-pass +//@ edition:2018 pub async fn query<'a>(_: &(), _: &(), _: (&(dyn std::any::Any + 'a),) ) {} fn main() {} diff --git a/tests/ui/regions/issue-78262.rs b/tests/ui/regions/issue-78262.rs index 642dbd7f821..d31b847997e 100644 --- a/tests/ui/regions/issue-78262.rs +++ b/tests/ui/regions/issue-78262.rs @@ -1,6 +1,6 @@ -// revisions: base polonius -// ignore-compare-mode-polonius -// [polonius] compile-flags: -Z polonius +//@ revisions: base polonius +//@ ignore-compare-mode-polonius +//@ [polonius] compile-flags: -Z polonius trait TT {} diff --git a/tests/ui/regions/owned-implies-static.rs b/tests/ui/regions/owned-implies-static.rs index 2efa8cc02f4..d97e2f2d239 100644 --- a/tests/ui/regions/owned-implies-static.rs +++ b/tests/ui/regions/owned-implies-static.rs @@ -1,5 +1,5 @@ -// run-pass -// pretty-expanded FIXME #23616 +//@ run-pass +//@ pretty-expanded FIXME #23616 fn f(_x: T) {} diff --git a/tests/ui/regions/rcvr-borrowed-to-region.rs b/tests/ui/regions/rcvr-borrowed-to-region.rs index 7f32b8b91a6..7cda692772d 100644 --- a/tests/ui/regions/rcvr-borrowed-to-region.rs +++ b/tests/ui/regions/rcvr-borrowed-to-region.rs @@ -1,4 +1,4 @@ -// run-pass +//@ run-pass #![allow(non_camel_case_types)] diff --git a/tests/ui/regions/region-bound-extra-bound-in-inherent-impl.rs b/tests/ui/regions/region-bound-extra-bound-in-inherent-impl.rs index 72d82da4534..eec81921f1c 100644 --- a/tests/ui/regions/region-bound-extra-bound-in-inherent-impl.rs +++ b/tests/ui/regions/region-bound-extra-bound-in-inherent-impl.rs @@ -1,7 +1,7 @@ // Test related to #22779. In this case, the impl is an inherent impl, // so it doesn't have to match any trait, so no error results. -// check-pass +//@ check-pass #![allow(dead_code)] struct MySlice<'a, T:'a>(&'a mut [T]); diff --git a/tests/ui/regions/region-bound-same-bounds-in-trait-and-impl.rs b/tests/ui/regions/region-bound-same-bounds-in-trait-and-impl.rs index 68056370c44..e3c1f0efaf0 100644 --- a/tests/ui/regions/region-bound-same-bounds-in-trait-and-impl.rs +++ b/tests/ui/regions/region-bound-same-bounds-in-trait-and-impl.rs @@ -1,7 +1,7 @@ // Test related to #22779, but where the `'a:'b` relation // appears in the trait too. No error here. -// check-pass +//@ check-pass trait Tr<'a, T> { fn renew<'b: 'a>(self) -> &'b mut [T] where 'a: 'b; diff --git a/tests/ui/regions/region-invariant-static-error-reporting.rs b/tests/ui/regions/region-invariant-static-error-reporting.rs index c8288b5923c..9ab46a77578 100644 --- a/tests/ui/regions/region-invariant-static-error-reporting.rs +++ b/tests/ui/regions/region-invariant-static-error-reporting.rs @@ -3,7 +3,7 @@ // over time, but this test used to exhibit some pretty bogus messages // that were not remotely helpful. -// error-pattern:argument requires that `'a` must outlive `'static` +//@ error-pattern:argument requires that `'a` must outlive `'static` struct Invariant<'a>(Option<&'a mut &'a mut ()>); diff --git a/tests/ui/regions/region-object-lifetime-1.rs b/tests/ui/regions/region-object-lifetime-1.rs index ddf3be690dd..11e3c8a1a33 100644 --- a/tests/ui/regions/region-object-lifetime-1.rs +++ b/tests/ui/regions/region-object-lifetime-1.rs @@ -1,7 +1,7 @@ // Various tests related to testing how region inference works // with respect to the object receivers. -// check-pass +//@ check-pass #![allow(warnings)] trait Foo { diff --git a/tests/ui/regions/region-object-lifetime-3.rs b/tests/ui/regions/region-object-lifetime-3.rs index 0536fa2a20f..ddeeec902f1 100644 --- a/tests/ui/regions/region-object-lifetime-3.rs +++ b/tests/ui/regions/region-object-lifetime-3.rs @@ -1,7 +1,7 @@ // Various tests related to testing how region inference works // with respect to the object receivers. -// check-pass +//@ check-pass #![allow(warnings)] trait Foo { diff --git a/tests/ui/regions/regions-addr-of-interior-of-unique-box.rs b/tests/ui/regions/regions-addr-of-interior-of-unique-box.rs index 4221ebfdffb..bd3d4a1acdc 100644 --- a/tests/ui/regions/regions-addr-of-interior-of-unique-box.rs +++ b/tests/ui/regions/regions-addr-of-interior-of-unique-box.rs @@ -1,7 +1,7 @@ -// run-pass +//@ run-pass #![allow(dead_code)] -// pretty-expanded FIXME #23616 +//@ pretty-expanded FIXME #23616 struct Point { x: isize, diff --git a/tests/ui/regions/regions-addr-of-ret.rs b/tests/ui/regions/regions-addr-of-ret.rs index e5dcd6db033..bf95709848f 100644 --- a/tests/ui/regions/regions-addr-of-ret.rs +++ b/tests/ui/regions/regions-addr-of-ret.rs @@ -1,4 +1,4 @@ -// run-pass +//@ run-pass fn f(x: &isize) -> &isize { return &*x; } diff --git a/tests/ui/regions/regions-assoc-type-region-bound.rs b/tests/ui/regions/regions-assoc-type-region-bound.rs index cbb7d1726d9..1b7fdf11251 100644 --- a/tests/ui/regions/regions-assoc-type-region-bound.rs +++ b/tests/ui/regions/regions-assoc-type-region-bound.rs @@ -1,9 +1,9 @@ -// run-pass +//@ run-pass #![allow(dead_code)] // Test that the compiler considers the 'a bound declared in the // trait. Issue #20890. -// pretty-expanded FIXME #23616 +//@ pretty-expanded FIXME #23616 trait Foo<'a> { type Value: 'a; diff --git a/tests/ui/regions/regions-assoc-type-static-bound.rs b/tests/ui/regions/regions-assoc-type-static-bound.rs index 1458787ea65..9ffc66d284d 100644 --- a/tests/ui/regions/regions-assoc-type-static-bound.rs +++ b/tests/ui/regions/regions-assoc-type-static-bound.rs @@ -1,9 +1,9 @@ -// run-pass +//@ run-pass #![allow(dead_code)] // Test that the compiler considers the 'static bound declared in the // trait. Issue #20890. -// pretty-expanded FIXME #23616 +//@ pretty-expanded FIXME #23616 trait Foo { type Value: 'static; diff --git a/tests/ui/regions/regions-borrow-at.rs b/tests/ui/regions/regions-borrow-at.rs index 152abe109bc..66b56a6aee5 100644 --- a/tests/ui/regions/regions-borrow-at.rs +++ b/tests/ui/regions/regions-borrow-at.rs @@ -1,4 +1,4 @@ -// run-pass +//@ run-pass fn foo(x: &usize) -> usize { *x diff --git a/tests/ui/regions/regions-borrow-evec-fixed.rs b/tests/ui/regions/regions-borrow-evec-fixed.rs index ed828312b46..67e2c509f53 100644 --- a/tests/ui/regions/regions-borrow-evec-fixed.rs +++ b/tests/ui/regions/regions-borrow-evec-fixed.rs @@ -1,4 +1,4 @@ -// run-pass +//@ run-pass fn foo(x: &[isize]) -> isize { x[0] diff --git a/tests/ui/regions/regions-borrow-evec-uniq.rs b/tests/ui/regions/regions-borrow-evec-uniq.rs index bbf7ba79e2a..f1679a5ea66 100644 --- a/tests/ui/regions/regions-borrow-evec-uniq.rs +++ b/tests/ui/regions/regions-borrow-evec-uniq.rs @@ -1,4 +1,4 @@ -// run-pass +//@ run-pass fn foo(x: &[isize]) -> isize { diff --git a/tests/ui/regions/regions-borrow-uniq.rs b/tests/ui/regions/regions-borrow-uniq.rs index adc6b1939da..7c56828bf68 100644 --- a/tests/ui/regions/regions-borrow-uniq.rs +++ b/tests/ui/regions/regions-borrow-uniq.rs @@ -1,4 +1,4 @@ -// run-pass +//@ run-pass fn foo(x: &usize) -> usize { *x diff --git a/tests/ui/regions/regions-bot.rs b/tests/ui/regions/regions-bot.rs index 58016293640..f8fb995c83e 100644 --- a/tests/ui/regions/regions-bot.rs +++ b/tests/ui/regions/regions-bot.rs @@ -1,4 +1,4 @@ -// run-pass +//@ run-pass #![allow(dead_code)] // A very limited test of the "bottom" region diff --git a/tests/ui/regions/regions-bound-lists-feature-gate-2.rs b/tests/ui/regions/regions-bound-lists-feature-gate-2.rs index 2c750379933..f4f27a4456d 100644 --- a/tests/ui/regions/regions-bound-lists-feature-gate-2.rs +++ b/tests/ui/regions/regions-bound-lists-feature-gate-2.rs @@ -1,4 +1,4 @@ -// run-pass +//@ run-pass #![allow(dead_code)] #![allow(stable_features)] diff --git a/tests/ui/regions/regions-bound-lists-feature-gate.rs b/tests/ui/regions/regions-bound-lists-feature-gate.rs index 3815498f86f..1bc2b7dd03e 100644 --- a/tests/ui/regions/regions-bound-lists-feature-gate.rs +++ b/tests/ui/regions/regions-bound-lists-feature-gate.rs @@ -1,4 +1,4 @@ -// run-pass +//@ run-pass #![allow(dead_code)] #![allow(unused_variables)] #![allow(stable_features)] diff --git a/tests/ui/regions/regions-bounded-method-type-parameters-cross-crate.rs b/tests/ui/regions/regions-bounded-method-type-parameters-cross-crate.rs index c014b2ccf1e..33026803c81 100644 --- a/tests/ui/regions/regions-bounded-method-type-parameters-cross-crate.rs +++ b/tests/ui/regions/regions-bounded-method-type-parameters-cross-crate.rs @@ -1,4 +1,4 @@ -// aux-build:rbmtp_cross_crate_lib.rs +//@ aux-build:rbmtp_cross_crate_lib.rs // Check explicit region bounds on methods in the cross crate case. diff --git a/tests/ui/regions/regions-close-over-type-parameter-successfully.rs b/tests/ui/regions/regions-close-over-type-parameter-successfully.rs index 48aad9481bb..8662fa381c4 100644 --- a/tests/ui/regions/regions-close-over-type-parameter-successfully.rs +++ b/tests/ui/regions/regions-close-over-type-parameter-successfully.rs @@ -1,4 +1,4 @@ -// run-pass +//@ run-pass // A test where we (successfully) close over a reference into // an object. diff --git a/tests/ui/regions/regions-copy-closure.rs b/tests/ui/regions/regions-copy-closure.rs index 43640079777..7465f7424e3 100644 --- a/tests/ui/regions/regions-copy-closure.rs +++ b/tests/ui/regions/regions-copy-closure.rs @@ -1,4 +1,4 @@ -// run-pass +//@ run-pass #![allow(non_camel_case_types)] struct closure_box<'a> { diff --git a/tests/ui/regions/regions-creating-enums2.rs b/tests/ui/regions/regions-creating-enums2.rs index 7b16fb1a8e0..b81344cceec 100644 --- a/tests/ui/regions/regions-creating-enums2.rs +++ b/tests/ui/regions/regions-creating-enums2.rs @@ -1,8 +1,8 @@ -// run-pass +//@ run-pass #![allow(dead_code)] #![allow(non_camel_case_types)] -// pretty-expanded FIXME #23616 +//@ pretty-expanded FIXME #23616 enum ast<'a> { num(usize), diff --git a/tests/ui/regions/regions-creating-enums5.rs b/tests/ui/regions/regions-creating-enums5.rs index ad3d9748bf0..55793fb6202 100644 --- a/tests/ui/regions/regions-creating-enums5.rs +++ b/tests/ui/regions/regions-creating-enums5.rs @@ -1,8 +1,8 @@ -// run-pass +//@ run-pass #![allow(dead_code)] #![allow(non_camel_case_types)] -// pretty-expanded FIXME #23616 +//@ pretty-expanded FIXME #23616 enum ast<'a> { num(usize), diff --git a/tests/ui/regions/regions-debruijn-of-object.rs b/tests/ui/regions/regions-debruijn-of-object.rs index 0b5510489fb..04bedf18ef0 100644 --- a/tests/ui/regions/regions-debruijn-of-object.rs +++ b/tests/ui/regions/regions-debruijn-of-object.rs @@ -1,9 +1,9 @@ -// run-pass +//@ run-pass #![allow(dead_code)] #![allow(unused_variables)] #![allow(non_camel_case_types)] -// pretty-expanded FIXME #23616 +//@ pretty-expanded FIXME #23616 struct ctxt<'tcx> { x: &'tcx i32 diff --git a/tests/ui/regions/regions-dependent-addr-of.rs b/tests/ui/regions/regions-dependent-addr-of.rs index a6cb56e3156..12fc38a02f7 100644 --- a/tests/ui/regions/regions-dependent-addr-of.rs +++ b/tests/ui/regions/regions-dependent-addr-of.rs @@ -1,4 +1,4 @@ -// run-pass +//@ run-pass // Test lifetimes are linked properly when we create dependent region pointers. // Issue #3148. diff --git a/tests/ui/regions/regions-dependent-autofn.rs b/tests/ui/regions/regions-dependent-autofn.rs index 246dbb5563c..ccbb1219ce2 100644 --- a/tests/ui/regions/regions-dependent-autofn.rs +++ b/tests/ui/regions/regions-dependent-autofn.rs @@ -1,8 +1,8 @@ -// run-pass +//@ run-pass // Test lifetimes are linked properly when we autoslice a vector. // Issue #3148. -// pretty-expanded FIXME #23616 +//@ pretty-expanded FIXME #23616 fn subslice(v: F) -> F where F: FnOnce() { v } diff --git a/tests/ui/regions/regions-dependent-autoslice.rs b/tests/ui/regions/regions-dependent-autoslice.rs index 4c5b35ec455..3672b99151d 100644 --- a/tests/ui/regions/regions-dependent-autoslice.rs +++ b/tests/ui/regions/regions-dependent-autoslice.rs @@ -1,4 +1,4 @@ -// run-pass +//@ run-pass // Test lifetimes are linked properly when we autoslice a vector. // Issue #3148. diff --git a/tests/ui/regions/regions-dependent-let-ref.rs b/tests/ui/regions/regions-dependent-let-ref.rs index 94e3df4b3f1..f3127abafb7 100644 --- a/tests/ui/regions/regions-dependent-let-ref.rs +++ b/tests/ui/regions/regions-dependent-let-ref.rs @@ -1,8 +1,8 @@ -// run-pass +//@ run-pass // Test lifetimes are linked properly when we take reference // to interior. -// pretty-expanded FIXME #23616 +//@ pretty-expanded FIXME #23616 struct Foo(isize); pub fn main() { diff --git a/tests/ui/regions/regions-early-bound-lifetime-in-assoc-fn.rs b/tests/ui/regions/regions-early-bound-lifetime-in-assoc-fn.rs index fe50a7dd1be..1b6c3c93377 100644 --- a/tests/ui/regions/regions-early-bound-lifetime-in-assoc-fn.rs +++ b/tests/ui/regions/regions-early-bound-lifetime-in-assoc-fn.rs @@ -1,4 +1,4 @@ -// run-pass +//@ run-pass #![allow(unused_imports)] // Test that we are able to compile calls to associated fns like // `decode()` where the bound on the `Self` parameter references a @@ -6,7 +6,7 @@ // lifetime parameters must be early bound in the type of the // associated item. -// pretty-expanded FIXME #23616 +//@ pretty-expanded FIXME #23616 use std::marker; diff --git a/tests/ui/regions/regions-early-bound-trait-param.rs b/tests/ui/regions/regions-early-bound-trait-param.rs index a28bd14ba88..6d77d323b80 100644 --- a/tests/ui/regions/regions-early-bound-trait-param.rs +++ b/tests/ui/regions/regions-early-bound-trait-param.rs @@ -1,4 +1,4 @@ -// run-pass +//@ run-pass // Tests that you can use an early-bound lifetime parameter as // on of the generic parameters in a trait. diff --git a/tests/ui/regions/regions-early-bound-used-in-bound-method.rs b/tests/ui/regions/regions-early-bound-used-in-bound-method.rs index a778dae1ed3..3510d4ce939 100644 --- a/tests/ui/regions/regions-early-bound-used-in-bound-method.rs +++ b/tests/ui/regions/regions-early-bound-used-in-bound-method.rs @@ -1,4 +1,4 @@ -// run-pass +//@ run-pass // Tests that you can use a fn lifetime parameter as part of // the value for a type parameter in a bound. diff --git a/tests/ui/regions/regions-early-bound-used-in-bound.rs b/tests/ui/regions/regions-early-bound-used-in-bound.rs index 6ccc99e845d..693d6b71b27 100644 --- a/tests/ui/regions/regions-early-bound-used-in-bound.rs +++ b/tests/ui/regions/regions-early-bound-used-in-bound.rs @@ -1,4 +1,4 @@ -// run-pass +//@ run-pass // Tests that you can use a fn lifetime parameter as part of // the value for a type parameter in a bound. diff --git a/tests/ui/regions/regions-early-bound-used-in-type-param.rs b/tests/ui/regions/regions-early-bound-used-in-type-param.rs index d58c17ad9c8..24e5404c297 100644 --- a/tests/ui/regions/regions-early-bound-used-in-type-param.rs +++ b/tests/ui/regions/regions-early-bound-used-in-type-param.rs @@ -1,4 +1,4 @@ -// run-pass +//@ run-pass // Tests that you can use a fn lifetime parameter as part of // the value for a type parameter in a bound. diff --git a/tests/ui/regions/regions-escape-into-other-fn.rs b/tests/ui/regions/regions-escape-into-other-fn.rs index 65f4c1b6a64..95cdb2de8d5 100644 --- a/tests/ui/regions/regions-escape-into-other-fn.rs +++ b/tests/ui/regions/regions-escape-into-other-fn.rs @@ -1,4 +1,4 @@ -// run-pass +//@ run-pass fn foo(x: &usize) -> &usize { x } fn bar(x: &usize) -> usize { *x } diff --git a/tests/ui/regions/regions-expl-self.rs b/tests/ui/regions/regions-expl-self.rs index f7315d628a5..812201d7e52 100644 --- a/tests/ui/regions/regions-expl-self.rs +++ b/tests/ui/regions/regions-expl-self.rs @@ -1,8 +1,8 @@ -// run-pass +//@ run-pass #![allow(dead_code)] // Test that you can insert an explicit lifetime in explicit self. -// pretty-expanded FIXME #23616 +//@ pretty-expanded FIXME #23616 struct Foo { f: usize diff --git a/tests/ui/regions/regions-fn-subtyping-2.rs b/tests/ui/regions/regions-fn-subtyping-2.rs index 83949ddba3d..f5332ac1280 100644 --- a/tests/ui/regions/regions-fn-subtyping-2.rs +++ b/tests/ui/regions/regions-fn-subtyping-2.rs @@ -1,11 +1,11 @@ -// run-pass +//@ run-pass #![allow(dead_code)] // Issue #2263. // Here, `f` is a function that takes a pointer `x` and a function // `g`, where `g` requires its argument `y` to be in the same region // that `x` is in. -// pretty-expanded FIXME #23616 +//@ pretty-expanded FIXME #23616 fn has_same_region(f: Box FnMut(&'a isize, Box)>) { // `f` should be the type that `wants_same_region` wants, but diff --git a/tests/ui/regions/regions-fn-subtyping-return-static.rs b/tests/ui/regions/regions-fn-subtyping-return-static.rs index de14d5ba82a..dda1f129a33 100644 --- a/tests/ui/regions/regions-fn-subtyping-return-static.rs +++ b/tests/ui/regions/regions-fn-subtyping-return-static.rs @@ -6,7 +6,7 @@ // This can safely be considered to be an instance of `F` because all // lifetimes are sublifetimes of 'static. // -// check-pass +//@ check-pass #![allow(dead_code)] #![allow(unused_variables)] diff --git a/tests/ui/regions/regions-fn-subtyping.rs b/tests/ui/regions/regions-fn-subtyping.rs index 9570359c69e..7e264eb03d8 100644 --- a/tests/ui/regions/regions-fn-subtyping.rs +++ b/tests/ui/regions/regions-fn-subtyping.rs @@ -1,9 +1,9 @@ -// run-pass +//@ run-pass #![allow(dead_code)] #![allow(unused_assignments)] // Issue #2263. -// pretty-expanded FIXME #23616 +//@ pretty-expanded FIXME #23616 #![allow(unused_variables)] diff --git a/tests/ui/regions/regions-free-region-outlives-static-outlives-free-region.rs b/tests/ui/regions/regions-free-region-outlives-static-outlives-free-region.rs index 46462c432a8..f6a628e97f5 100644 --- a/tests/ui/regions/regions-free-region-outlives-static-outlives-free-region.rs +++ b/tests/ui/regions/regions-free-region-outlives-static-outlives-free-region.rs @@ -1,4 +1,4 @@ -// run-pass +//@ run-pass #![allow(dead_code)] // Test that we recognize that if you have // diff --git a/tests/ui/regions/regions-implied-bounds-projection-gap-2.rs b/tests/ui/regions/regions-implied-bounds-projection-gap-2.rs index a481a9cc5fe..6a15d3206ee 100644 --- a/tests/ui/regions/regions-implied-bounds-projection-gap-2.rs +++ b/tests/ui/regions/regions-implied-bounds-projection-gap-2.rs @@ -2,7 +2,7 @@ // "projection gap": in this test, we know that `T: 'x`, and that is // enough to conclude that `T::Foo: 'x`. -// check-pass +//@ check-pass #![allow(dead_code)] #![allow(unused_variables)] diff --git a/tests/ui/regions/regions-implied-bounds-projection-gap-3.rs b/tests/ui/regions/regions-implied-bounds-projection-gap-3.rs index a627cbbd88f..a183639ac3a 100644 --- a/tests/ui/regions/regions-implied-bounds-projection-gap-3.rs +++ b/tests/ui/regions/regions-implied-bounds-projection-gap-3.rs @@ -2,7 +2,7 @@ // "projection gap": in this test, we know that `T::Foo: 'x`, and that // is (naturally) enough to conclude that `T::Foo: 'x`. -// check-pass +//@ check-pass #![allow(dead_code)] #![allow(unused_variables)] diff --git a/tests/ui/regions/regions-implied-bounds-projection-gap-4.rs b/tests/ui/regions/regions-implied-bounds-projection-gap-4.rs index 5158c289340..cd8fe6b7042 100644 --- a/tests/ui/regions/regions-implied-bounds-projection-gap-4.rs +++ b/tests/ui/regions/regions-implied-bounds-projection-gap-4.rs @@ -2,7 +2,7 @@ // "projection gap": in this test, we know that `T: 'x`, and that // is (naturally) enough to conclude that `T: 'x`. -// check-pass +//@ check-pass #![allow(dead_code)] #![allow(unused_variables)] diff --git a/tests/ui/regions/regions-infer-borrow-scope-addr-of.rs b/tests/ui/regions/regions-infer-borrow-scope-addr-of.rs index 5d8ad932ed6..c46396dfbd6 100644 --- a/tests/ui/regions/regions-infer-borrow-scope-addr-of.rs +++ b/tests/ui/regions/regions-infer-borrow-scope-addr-of.rs @@ -1,4 +1,4 @@ -// run-pass +//@ run-pass use std::mem::swap; diff --git a/tests/ui/regions/regions-infer-borrow-scope-view.rs b/tests/ui/regions/regions-infer-borrow-scope-view.rs index 349b5204434..0f0c2f6cd65 100644 --- a/tests/ui/regions/regions-infer-borrow-scope-view.rs +++ b/tests/ui/regions/regions-infer-borrow-scope-view.rs @@ -1,4 +1,4 @@ -// run-pass +//@ run-pass fn view(x: &[T]) -> &[T] {x} diff --git a/tests/ui/regions/regions-infer-borrow-scope-within-loop-ok.rs b/tests/ui/regions/regions-infer-borrow-scope-within-loop-ok.rs index dca26742dac..5134256a893 100644 --- a/tests/ui/regions/regions-infer-borrow-scope-within-loop-ok.rs +++ b/tests/ui/regions/regions-infer-borrow-scope-within-loop-ok.rs @@ -1,4 +1,4 @@ -// run-pass +//@ run-pass fn borrow(x: &T) -> &T {x} diff --git a/tests/ui/regions/regions-infer-borrow-scope.rs b/tests/ui/regions/regions-infer-borrow-scope.rs index b4a050bf1ed..2f25d001083 100644 --- a/tests/ui/regions/regions-infer-borrow-scope.rs +++ b/tests/ui/regions/regions-infer-borrow-scope.rs @@ -1,4 +1,4 @@ -// run-pass +//@ run-pass #![allow(dead_code)] struct Point {x: isize, y: isize} diff --git a/tests/ui/regions/regions-infer-call-2.rs b/tests/ui/regions/regions-infer-call-2.rs index a288d2e4d6e..4f3ec222c82 100644 --- a/tests/ui/regions/regions-infer-call-2.rs +++ b/tests/ui/regions/regions-infer-call-2.rs @@ -1,4 +1,4 @@ -// run-pass +//@ run-pass fn takes_two(x: &isize, y: &isize) -> isize { *x + *y } diff --git a/tests/ui/regions/regions-infer-call.rs b/tests/ui/regions/regions-infer-call.rs index 248f9e923d3..ad48f3aa93a 100644 --- a/tests/ui/regions/regions-infer-call.rs +++ b/tests/ui/regions/regions-infer-call.rs @@ -1,4 +1,4 @@ -// run-pass +//@ run-pass fn takes_two(x: &isize, y: &isize) -> isize { *x + *y } diff --git a/tests/ui/regions/regions-infer-contravariance-due-to-ret.rs b/tests/ui/regions/regions-infer-contravariance-due-to-ret.rs index fbd89501559..1b9379fd8c8 100644 --- a/tests/ui/regions/regions-infer-contravariance-due-to-ret.rs +++ b/tests/ui/regions/regions-infer-contravariance-due-to-ret.rs @@ -1,4 +1,4 @@ -// run-pass +//@ run-pass #![allow(non_camel_case_types)] diff --git a/tests/ui/regions/regions-infer-reborrow-ref-mut-recurse.rs b/tests/ui/regions/regions-infer-reborrow-ref-mut-recurse.rs index 31a48b4adcf..f5d28a28154 100644 --- a/tests/ui/regions/regions-infer-reborrow-ref-mut-recurse.rs +++ b/tests/ui/regions/regions-infer-reborrow-ref-mut-recurse.rs @@ -1,9 +1,9 @@ -// run-pass +//@ run-pass #![allow(dead_code)] // Test an edge case in region inference: the lifetime of the borrow // of `*x` must be extended to at least 'a. -// pretty-expanded FIXME #23616 +//@ pretty-expanded FIXME #23616 fn foo<'a,'b>(x: &'a &'b mut isize) -> &'a isize { let y = &*x; // should be inferred to have type &'a &'b mut isize... diff --git a/tests/ui/regions/regions-infer-region-in-fn-but-not-type.rs b/tests/ui/regions/regions-infer-region-in-fn-but-not-type.rs index 6aa5d8217a4..165a246935f 100644 --- a/tests/ui/regions/regions-infer-region-in-fn-but-not-type.rs +++ b/tests/ui/regions/regions-infer-region-in-fn-but-not-type.rs @@ -1,4 +1,4 @@ -// run-pass +//@ run-pass #![allow(dead_code)] #![allow(unused_variables)] #![allow(non_camel_case_types)] @@ -6,7 +6,7 @@ // check that the &isize here does not cause us to think that `foo` // contains region pointers -// pretty-expanded FIXME #23616 +//@ pretty-expanded FIXME #23616 struct foo(Box); diff --git a/tests/ui/regions/regions-infer-static-from-proc.rs b/tests/ui/regions/regions-infer-static-from-proc.rs index 39501e2d697..9a130808ae8 100644 --- a/tests/ui/regions/regions-infer-static-from-proc.rs +++ b/tests/ui/regions/regions-infer-static-from-proc.rs @@ -1,11 +1,11 @@ -// run-pass +//@ run-pass #![allow(non_upper_case_globals)] // Check that the 'static bound on a proc influences lifetimes of // region variables contained within (otherwise, region inference will // give `x` a very short lifetime). -// pretty-expanded FIXME #23616 +//@ pretty-expanded FIXME #23616 static i: usize = 3; fn foo(_: F) {} diff --git a/tests/ui/regions/regions-issue-21422.rs b/tests/ui/regions/regions-issue-21422.rs index 198b7146647..54beed9b3ac 100644 --- a/tests/ui/regions/regions-issue-21422.rs +++ b/tests/ui/regions/regions-issue-21422.rs @@ -1,9 +1,9 @@ -// run-pass +//@ run-pass // Regression test for issue #21422, which was related to failing to // add inference constraints that the operands of a binary operator // should outlive the binary operation itself. -// pretty-expanded FIXME #23616 +//@ pretty-expanded FIXME #23616 pub struct P<'a> { _ptr: *const &'a u8, diff --git a/tests/ui/regions/regions-issue-22246.rs b/tests/ui/regions/regions-issue-22246.rs index 0858833678b..e3bf7b31205 100644 --- a/tests/ui/regions/regions-issue-22246.rs +++ b/tests/ui/regions/regions-issue-22246.rs @@ -1,9 +1,9 @@ -// run-pass +//@ run-pass #![allow(unused_imports)] // Regression test for issue #22246 -- we should be able to deduce // that `&'a B::Owned` implies that `B::Owned : 'a`. -// pretty-expanded FIXME #23616 +//@ pretty-expanded FIXME #23616 #![allow(dead_code)] diff --git a/tests/ui/regions/regions-lifetime-nonfree-late-bound.rs b/tests/ui/regions/regions-lifetime-nonfree-late-bound.rs index 3852a14d9f9..ee29f44ecc9 100644 --- a/tests/ui/regions/regions-lifetime-nonfree-late-bound.rs +++ b/tests/ui/regions/regions-lifetime-nonfree-late-bound.rs @@ -1,4 +1,4 @@ -// run-pass +//@ run-pass // This is a regression test for the ICE from issue #10846. // // The original issue causing the ICE: the LUB-computations during @@ -13,7 +13,7 @@ // doing region-folding, when really all clients of the region-folding // case only want to see FREE lifetime variables, not bound ones. -// pretty-expanded FIXME #23616 +//@ pretty-expanded FIXME #23616 pub fn main() { fn explicit() { diff --git a/tests/ui/regions/regions-lifetime-static-items-enclosing-scopes.rs b/tests/ui/regions/regions-lifetime-static-items-enclosing-scopes.rs index 2c455fc3563..68daf2893ef 100644 --- a/tests/ui/regions/regions-lifetime-static-items-enclosing-scopes.rs +++ b/tests/ui/regions/regions-lifetime-static-items-enclosing-scopes.rs @@ -1,4 +1,4 @@ -// run-pass +//@ run-pass #![allow(dead_code)] // This test verifies that temporary lifetime is correctly computed // for static objects in enclosing scopes. diff --git a/tests/ui/regions/regions-link-fn-args.rs b/tests/ui/regions/regions-link-fn-args.rs index 231407b226e..5fed86d5048 100644 --- a/tests/ui/regions/regions-link-fn-args.rs +++ b/tests/ui/regions/regions-link-fn-args.rs @@ -1,8 +1,8 @@ -// run-pass +//@ run-pass // Test that region inference correctly links up the regions when a // `ref` borrow occurs inside a fn argument. -// pretty-expanded FIXME #23616 +//@ pretty-expanded FIXME #23616 #![allow(dead_code)] diff --git a/tests/ui/regions/regions-lub-ref-ref-rc.rs b/tests/ui/regions/regions-lub-ref-ref-rc.rs index 96c71b084b1..d20bc739406 100644 --- a/tests/ui/regions/regions-lub-ref-ref-rc.rs +++ b/tests/ui/regions/regions-lub-ref-ref-rc.rs @@ -1,4 +1,4 @@ -// run-pass +//@ run-pass #![allow(dead_code)] // Test a corner case of LUB coercion. In this case, one arm of the // match requires a deref coercion and the other doesn't, and there diff --git a/tests/ui/regions/regions-mock-codegen.rs b/tests/ui/regions/regions-mock-codegen.rs index d5c93f81fd8..4cdbc680e6f 100644 --- a/tests/ui/regions/regions-mock-codegen.rs +++ b/tests/ui/regions/regions-mock-codegen.rs @@ -1,7 +1,7 @@ -// run-pass +//@ run-pass #![allow(dead_code)] #![allow(non_camel_case_types)] -// pretty-expanded FIXME #23616 +//@ pretty-expanded FIXME #23616 #![feature(allocator_api)] use std::alloc::{handle_alloc_error, Allocator, Global, Layout}; diff --git a/tests/ui/regions/regions-name-undeclared.rs b/tests/ui/regions/regions-name-undeclared.rs index 7b6ede19341..e4779a1853d 100644 --- a/tests/ui/regions/regions-name-undeclared.rs +++ b/tests/ui/regions/regions-name-undeclared.rs @@ -1,4 +1,4 @@ -// edition:2018 +//@ edition:2018 // Check that lifetime resolver enforces the lifetime name scoping // rules correctly in various scenarios. diff --git a/tests/ui/regions/regions-no-bound-in-argument-cleanup.rs b/tests/ui/regions/regions-no-bound-in-argument-cleanup.rs index aafab5d86b8..2c02ce670b9 100644 --- a/tests/ui/regions/regions-no-bound-in-argument-cleanup.rs +++ b/tests/ui/regions/regions-no-bound-in-argument-cleanup.rs @@ -1,5 +1,5 @@ -// run-pass -// pretty-expanded FIXME #23616 +//@ run-pass +//@ pretty-expanded FIXME #23616 use std::marker; diff --git a/tests/ui/regions/regions-no-variance-from-fn-generics.rs b/tests/ui/regions/regions-no-variance-from-fn-generics.rs index a455d4efd71..e53d7e9da60 100644 --- a/tests/ui/regions/regions-no-variance-from-fn-generics.rs +++ b/tests/ui/regions/regions-no-variance-from-fn-generics.rs @@ -1,4 +1,4 @@ -// check-pass +//@ check-pass #![allow(unused_variables)] // Issue #12856: a lifetime formal binding introduced by a generic fn // should not upset the variance inference for actual occurrences of diff --git a/tests/ui/regions/regions-nullary-variant.rs b/tests/ui/regions/regions-nullary-variant.rs index 82470af82fa..8fe0a97c61c 100644 --- a/tests/ui/regions/regions-nullary-variant.rs +++ b/tests/ui/regions/regions-nullary-variant.rs @@ -1,8 +1,8 @@ -// run-pass +//@ run-pass #![allow(dead_code)] #![allow(non_camel_case_types)] -// pretty-expanded FIXME #23616 +//@ pretty-expanded FIXME #23616 enum roption<'a> { a, b(&'a usize) diff --git a/tests/ui/regions/regions-outlives-nominal-type-enum-region-rev.rs b/tests/ui/regions/regions-outlives-nominal-type-enum-region-rev.rs index 15deaba5638..3d4a3050788 100644 --- a/tests/ui/regions/regions-outlives-nominal-type-enum-region-rev.rs +++ b/tests/ui/regions/regions-outlives-nominal-type-enum-region-rev.rs @@ -3,7 +3,7 @@ // // Rule OutlivesNominalType from RFC 1214. -// check-pass +//@ check-pass #![feature(rustc_attrs)] #![allow(dead_code)] diff --git a/tests/ui/regions/regions-outlives-nominal-type-enum-region.rs b/tests/ui/regions/regions-outlives-nominal-type-enum-region.rs index 7767c13c825..2e0d1b36ca5 100644 --- a/tests/ui/regions/regions-outlives-nominal-type-enum-region.rs +++ b/tests/ui/regions/regions-outlives-nominal-type-enum-region.rs @@ -3,7 +3,7 @@ // // Rule OutlivesNominalType from RFC 1214. -// check-pass +//@ check-pass #![feature(rustc_attrs)] #![allow(dead_code)] diff --git a/tests/ui/regions/regions-outlives-nominal-type-enum-type-rev.rs b/tests/ui/regions/regions-outlives-nominal-type-enum-type-rev.rs index 37415994210..baf7874bc1a 100644 --- a/tests/ui/regions/regions-outlives-nominal-type-enum-type-rev.rs +++ b/tests/ui/regions/regions-outlives-nominal-type-enum-type-rev.rs @@ -3,7 +3,7 @@ // // Rule OutlivesNominalType from RFC 1214. -// check-pass +//@ check-pass #![feature(rustc_attrs)] #![allow(dead_code)] diff --git a/tests/ui/regions/regions-outlives-nominal-type-enum-type.rs b/tests/ui/regions/regions-outlives-nominal-type-enum-type.rs index 2e7f198d8c7..b8392c967b1 100644 --- a/tests/ui/regions/regions-outlives-nominal-type-enum-type.rs +++ b/tests/ui/regions/regions-outlives-nominal-type-enum-type.rs @@ -3,7 +3,7 @@ // // Rule OutlivesNominalType from RFC 1214. -// check-pass +//@ check-pass #![feature(rustc_attrs)] #![allow(dead_code)] diff --git a/tests/ui/regions/regions-outlives-nominal-type-struct-region-rev.rs b/tests/ui/regions/regions-outlives-nominal-type-struct-region-rev.rs index 45155c72166..6a50248cb70 100644 --- a/tests/ui/regions/regions-outlives-nominal-type-struct-region-rev.rs +++ b/tests/ui/regions/regions-outlives-nominal-type-struct-region-rev.rs @@ -3,7 +3,7 @@ // // Rule OutlivesNominalType from RFC 1214. -// check-pass +//@ check-pass #![feature(rustc_attrs)] #![allow(dead_code)] diff --git a/tests/ui/regions/regions-outlives-nominal-type-struct-region.rs b/tests/ui/regions/regions-outlives-nominal-type-struct-region.rs index bba8b244524..17564bcbf26 100644 --- a/tests/ui/regions/regions-outlives-nominal-type-struct-region.rs +++ b/tests/ui/regions/regions-outlives-nominal-type-struct-region.rs @@ -3,7 +3,7 @@ // // Rule OutlivesNominalType from RFC 1214. -// check-pass +//@ check-pass #![feature(rustc_attrs)] #![allow(dead_code)] diff --git a/tests/ui/regions/regions-outlives-nominal-type-struct-type-rev.rs b/tests/ui/regions/regions-outlives-nominal-type-struct-type-rev.rs index 220d2e83cc0..33961de7d6a 100644 --- a/tests/ui/regions/regions-outlives-nominal-type-struct-type-rev.rs +++ b/tests/ui/regions/regions-outlives-nominal-type-struct-type-rev.rs @@ -3,7 +3,7 @@ // // Rule OutlivesNominalType from RFC 1214. -// check-pass +//@ check-pass #![feature(rustc_attrs)] #![allow(dead_code)] diff --git a/tests/ui/regions/regions-outlives-nominal-type-struct-type.rs b/tests/ui/regions/regions-outlives-nominal-type-struct-type.rs index 9ddcdb649d8..c5238086fc0 100644 --- a/tests/ui/regions/regions-outlives-nominal-type-struct-type.rs +++ b/tests/ui/regions/regions-outlives-nominal-type-struct-type.rs @@ -3,7 +3,7 @@ // // Rule OutlivesNominalType from RFC 1214. -// check-pass +//@ check-pass #![feature(rustc_attrs)] #![allow(dead_code)] diff --git a/tests/ui/regions/regions-outlives-projection-hrtype.rs b/tests/ui/regions/regions-outlives-projection-hrtype.rs index 5f9700df1cb..0fd634125d5 100644 --- a/tests/ui/regions/regions-outlives-projection-hrtype.rs +++ b/tests/ui/regions/regions-outlives-projection-hrtype.rs @@ -5,7 +5,7 @@ // `'r` is bound, that leads to badness. This test checks that // everything works. -// check-pass +//@ check-pass #![allow(dead_code)] trait TheTrait { diff --git a/tests/ui/regions/regions-outlives-projection-trait-def.rs b/tests/ui/regions/regions-outlives-projection-trait-def.rs index 5c37a585a40..a67fe8c2d50 100644 --- a/tests/ui/regions/regions-outlives-projection-trait-def.rs +++ b/tests/ui/regions/regions-outlives-projection-trait-def.rs @@ -1,7 +1,7 @@ // Test that `>::Type: 'b`, where `trait Foo<'a> { Type: // 'a; }`, does not require that `F: 'b`. -// check-pass +//@ check-pass #![allow(dead_code)] trait SomeTrait<'a> { diff --git a/tests/ui/regions/regions-outlives-scalar.rs b/tests/ui/regions/regions-outlives-scalar.rs index ce34ffcc858..9e507eaf4dc 100644 --- a/tests/ui/regions/regions-outlives-scalar.rs +++ b/tests/ui/regions/regions-outlives-scalar.rs @@ -1,7 +1,7 @@ // Test that scalar values outlive all regions. // Rule OutlivesScalar from RFC 1214. -// check-pass +//@ check-pass #![allow(dead_code)] struct Foo<'a> { diff --git a/tests/ui/regions/regions-params.rs b/tests/ui/regions/regions-params.rs index 04f3b8eaf57..46d5ac21b36 100644 --- a/tests/ui/regions/regions-params.rs +++ b/tests/ui/regions/regions-params.rs @@ -1,4 +1,4 @@ -// run-pass +//@ run-pass #![allow(unused_parens)] diff --git a/tests/ui/regions/regions-reassign-let-bound-pointer.rs b/tests/ui/regions/regions-reassign-let-bound-pointer.rs index 948b11e0f30..d2f35973511 100644 --- a/tests/ui/regions/regions-reassign-let-bound-pointer.rs +++ b/tests/ui/regions/regions-reassign-let-bound-pointer.rs @@ -1,11 +1,11 @@ -// run-pass +//@ run-pass #![allow(unused_assignments)] #![allow(unused_variables)] // Check that the type checker permits us to reassign `z` which // started out with a longer lifetime and was reassigned to a shorter // one (it should infer to be the intersection). -// pretty-expanded FIXME #23616 +//@ pretty-expanded FIXME #23616 fn foo(x: &isize) { let a = 1; diff --git a/tests/ui/regions/regions-reassign-match-bound-pointer.rs b/tests/ui/regions/regions-reassign-match-bound-pointer.rs index ca52659c4db..5e69396aa37 100644 --- a/tests/ui/regions/regions-reassign-match-bound-pointer.rs +++ b/tests/ui/regions/regions-reassign-match-bound-pointer.rs @@ -1,11 +1,11 @@ -// run-pass +//@ run-pass #![allow(unused_assignments)] #![allow(unused_variables)] // Check that the type checker permits us to reassign `z` which // started out with a longer lifetime and was reassigned to a shorter // one (it should infer to be the intersection). -// pretty-expanded FIXME #23616 +//@ pretty-expanded FIXME #23616 fn foo(x: &isize) { let a = 1; diff --git a/tests/ui/regions/regions-refcell.rs b/tests/ui/regions/regions-refcell.rs index 39ad0c53f1e..29eb5161a6c 100644 --- a/tests/ui/regions/regions-refcell.rs +++ b/tests/ui/regions/regions-refcell.rs @@ -1,4 +1,4 @@ -// run-pass +//@ run-pass // This is a regression test for something that only came up while // attempting to bootstrap librustc with new destructor lifetime // semantics. diff --git a/tests/ui/regions/regions-relate-bound-regions-on-closures-to-inference-variables.rs b/tests/ui/regions/regions-relate-bound-regions-on-closures-to-inference-variables.rs index b1bdb813ac6..8218af6bcff 100644 --- a/tests/ui/regions/regions-relate-bound-regions-on-closures-to-inference-variables.rs +++ b/tests/ui/regions/regions-relate-bound-regions-on-closures-to-inference-variables.rs @@ -1,4 +1,4 @@ -// run-pass +//@ run-pass #![allow(dead_code)] // Test that this fairly specialized, but also reasonable, pattern // typechecks. The pattern involves regions bound in closures that diff --git a/tests/ui/regions/regions-return-interior-of-option.rs b/tests/ui/regions/regions-return-interior-of-option.rs index 2dc91ec84f5..f46d926bcf4 100644 --- a/tests/ui/regions/regions-return-interior-of-option.rs +++ b/tests/ui/regions/regions-return-interior-of-option.rs @@ -1,4 +1,4 @@ -// run-pass +//@ run-pass fn get(opt: &Option) -> &T { match *opt { diff --git a/tests/ui/regions/regions-scope-chain-example.rs b/tests/ui/regions/regions-scope-chain-example.rs index 2beb20add32..01ce04b63d0 100644 --- a/tests/ui/regions/regions-scope-chain-example.rs +++ b/tests/ui/regions/regions-scope-chain-example.rs @@ -1,4 +1,4 @@ -// run-pass +//@ run-pass #![allow(dead_code)] #![allow(unused_variables)] // This is an example where the older inference algorithm failed. The @@ -9,7 +9,7 @@ // wrong path. The new algorithm avoids this problem and hence this // example typechecks correctly. -// pretty-expanded FIXME #23616 +//@ pretty-expanded FIXME #23616 enum ScopeChain<'a> { Link(Scope<'a>), diff --git a/tests/ui/regions/regions-self-impls.rs b/tests/ui/regions/regions-self-impls.rs index 80b88568e42..2a31a5f904c 100644 --- a/tests/ui/regions/regions-self-impls.rs +++ b/tests/ui/regions/regions-self-impls.rs @@ -1,4 +1,4 @@ -// run-pass +//@ run-pass #![allow(non_camel_case_types)] struct Clam<'a> { diff --git a/tests/ui/regions/regions-self-in-enums.rs b/tests/ui/regions/regions-self-in-enums.rs index c2e4b2ff10d..ff924b2866d 100644 --- a/tests/ui/regions/regions-self-in-enums.rs +++ b/tests/ui/regions/regions-self-in-enums.rs @@ -1,4 +1,4 @@ -// run-pass +//@ run-pass #![allow(unused_mut)] #![allow(non_camel_case_types)] diff --git a/tests/ui/regions/regions-simple.rs b/tests/ui/regions/regions-simple.rs index fff1b47f53f..fdf82795666 100644 --- a/tests/ui/regions/regions-simple.rs +++ b/tests/ui/regions/regions-simple.rs @@ -1,4 +1,4 @@ -// run-pass +//@ run-pass pub fn main() { let mut x: isize = 3; let y: &mut isize = &mut x; diff --git a/tests/ui/regions/regions-static-bound-rpass.rs b/tests/ui/regions/regions-static-bound-rpass.rs index e2ebb394d0a..27da42882f3 100644 --- a/tests/ui/regions/regions-static-bound-rpass.rs +++ b/tests/ui/regions/regions-static-bound-rpass.rs @@ -1,4 +1,4 @@ -// run-pass +//@ run-pass #![warn(unused_lifetimes)] diff --git a/tests/ui/regions/regions-static-closure.rs b/tests/ui/regions/regions-static-closure.rs index 09cd5622032..b2b998a4c36 100644 --- a/tests/ui/regions/regions-static-closure.rs +++ b/tests/ui/regions/regions-static-closure.rs @@ -1,4 +1,4 @@ -// run-pass +//@ run-pass #![allow(non_camel_case_types)] struct closure_box<'a> { diff --git a/tests/ui/regions/regions-trait-1.rs b/tests/ui/regions/regions-trait-1.rs index b6dab1c32e8..af6203262f2 100644 --- a/tests/ui/regions/regions-trait-1.rs +++ b/tests/ui/regions/regions-trait-1.rs @@ -1,4 +1,4 @@ -// check-pass +//@ check-pass struct Ctxt { v: usize, diff --git a/tests/ui/regions/regions-trait-object-1.rs b/tests/ui/regions/regions-trait-object-1.rs index e2520d97890..30932239d8a 100644 --- a/tests/ui/regions/regions-trait-object-1.rs +++ b/tests/ui/regions/regions-trait-object-1.rs @@ -1,4 +1,4 @@ -// run-pass +//@ run-pass // This is a regression test for something that only came up while // attempting to bootstrap librustc_ast; it is adapted from // `rustc_ast::ext::tt::generic_extension`. diff --git a/tests/ui/regions/regions-variance-contravariant-use-contravariant.rs b/tests/ui/regions/regions-variance-contravariant-use-contravariant.rs index e6377867018..b177f3a0110 100644 --- a/tests/ui/regions/regions-variance-contravariant-use-contravariant.rs +++ b/tests/ui/regions/regions-variance-contravariant-use-contravariant.rs @@ -1,4 +1,4 @@ -// run-pass +//@ run-pass #![allow(dead_code)] #![allow(unused_variables)] // Test that a type which is contravariant with respect to its region @@ -7,7 +7,7 @@ // Note: see ui/variance/variance-regions-*.rs for the tests that check that the // variance inference works in the first place. -// pretty-expanded FIXME #23616 +//@ pretty-expanded FIXME #23616 struct Contravariant<'a> { f: &'a isize diff --git a/tests/ui/regions/regions-variance-covariant-use-covariant.rs b/tests/ui/regions/regions-variance-covariant-use-covariant.rs index c5c80ce54f1..bd5959df2e1 100644 --- a/tests/ui/regions/regions-variance-covariant-use-covariant.rs +++ b/tests/ui/regions/regions-variance-covariant-use-covariant.rs @@ -1,4 +1,4 @@ -// run-pass +//@ run-pass #![allow(dead_code)] // Test that a type which is covariant with respect to its region // parameter is successful when used in a covariant way. @@ -9,7 +9,7 @@ // This is covariant with respect to 'a, meaning that // Covariant<'foo> <: Covariant<'static> because // 'foo <= 'static -// pretty-expanded FIXME #23616 +//@ pretty-expanded FIXME #23616 struct Covariant<'a> { f: extern "Rust" fn(&'a isize) diff --git a/tests/ui/regions/type-param-outlives-reempty-issue-74429-2.rs b/tests/ui/regions/type-param-outlives-reempty-issue-74429-2.rs index 5ae5ebb450e..9a61bc8ed6d 100644 --- a/tests/ui/regions/type-param-outlives-reempty-issue-74429-2.rs +++ b/tests/ui/regions/type-param-outlives-reempty-issue-74429-2.rs @@ -1,7 +1,7 @@ // Regression test for #74429, where we didn't think that a type parameter // outlived `ReEmpty`. -// check-pass +//@ check-pass use std::marker::PhantomData; use std::ptr::NonNull; diff --git a/tests/ui/regions/type-param-outlives-reempty-issue-74429.rs b/tests/ui/regions/type-param-outlives-reempty-issue-74429.rs index 0c1e9314441..2e112099a50 100644 --- a/tests/ui/regions/type-param-outlives-reempty-issue-74429.rs +++ b/tests/ui/regions/type-param-outlives-reempty-issue-74429.rs @@ -1,7 +1,7 @@ // Regression test for #74429, where we didn't think that a type parameter // outlived `ReEmpty`. -// check-pass +//@ check-pass #![allow(dropping_copy_types)] diff --git a/tests/ui/regions/wf-bound-region-in-object-type.rs b/tests/ui/regions/wf-bound-region-in-object-type.rs index 7c4dd3ec84f..caa265b4ea2 100644 --- a/tests/ui/regions/wf-bound-region-in-object-type.rs +++ b/tests/ui/regions/wf-bound-region-in-object-type.rs @@ -1,11 +1,11 @@ -// run-pass +//@ run-pass #![allow(dead_code)] #![allow(unused_variables)] // Test that the `wf` checker properly handles bound regions in object // types. Compiling this code used to trigger an ICE. -// pretty-expanded FIXME #23616 +//@ pretty-expanded FIXME #23616 pub struct Context<'tcx> { vec: &'tcx Vec diff --git a/tests/ui/reify-intrinsic.rs b/tests/ui/reify-intrinsic.rs index 9eb2f724017..00398d272be 100644 --- a/tests/ui/reify-intrinsic.rs +++ b/tests/ui/reify-intrinsic.rs @@ -1,4 +1,4 @@ -// check-fail +//@ check-fail #![feature(core_intrinsics, intrinsics)] diff --git a/tests/ui/removing-extern-crate.fixed b/tests/ui/removing-extern-crate.fixed index 8dbd0395b97..477161fba80 100644 --- a/tests/ui/removing-extern-crate.fixed +++ b/tests/ui/removing-extern-crate.fixed @@ -1,7 +1,7 @@ -// edition:2018 -// aux-build:removing-extern-crate.rs -// run-rustfix -// check-pass +//@ edition:2018 +//@ aux-build:removing-extern-crate.rs +//@ run-rustfix +//@ check-pass #![warn(rust_2018_idioms)] diff --git a/tests/ui/removing-extern-crate.rs b/tests/ui/removing-extern-crate.rs index 465e1360c2a..0b819482c71 100644 --- a/tests/ui/removing-extern-crate.rs +++ b/tests/ui/removing-extern-crate.rs @@ -1,7 +1,7 @@ -// edition:2018 -// aux-build:removing-extern-crate.rs -// run-rustfix -// check-pass +//@ edition:2018 +//@ aux-build:removing-extern-crate.rs +//@ run-rustfix +//@ check-pass #![warn(rust_2018_idioms)] diff --git a/tests/ui/repeat-expr/infer.rs b/tests/ui/repeat-expr/infer.rs index 8197713b97e..eb47b5f462f 100644 --- a/tests/ui/repeat-expr/infer.rs +++ b/tests/ui/repeat-expr/infer.rs @@ -1,4 +1,4 @@ -// check-pass +//@ check-pass #[derive(Clone, Default)] struct MaybeCopy(T); diff --git a/tests/ui/repeat-expr/repeat-expr-in-static.rs b/tests/ui/repeat-expr/repeat-expr-in-static.rs index 0b895379330..b6e61978884 100644 --- a/tests/ui/repeat-expr/repeat-expr-in-static.rs +++ b/tests/ui/repeat-expr/repeat-expr-in-static.rs @@ -1,4 +1,4 @@ -// run-pass +//@ run-pass static FOO: [isize; 4] = [32; 4]; static BAR: [isize; 4] = [32, 32, 32, 32]; diff --git a/tests/ui/repr/16-bit-repr-c-enum.rs b/tests/ui/repr/16-bit-repr-c-enum.rs index 987fd455fcc..2509416ad87 100644 --- a/tests/ui/repr/16-bit-repr-c-enum.rs +++ b/tests/ui/repr/16-bit-repr-c-enum.rs @@ -1,10 +1,10 @@ -// build-pass -// revisions: avr msp430 +//@ build-pass +//@ revisions: avr msp430 // -// [avr] needs-llvm-components: avr -// [avr] compile-flags: --target=avr-unknown-gnu-atmega328 --crate-type=rlib -// [msp430] needs-llvm-components: msp430 -// [msp430] compile-flags: --target=msp430-none-elf --crate-type=rlib +//@ [avr] needs-llvm-components: avr +//@ [avr] compile-flags: --target=avr-unknown-gnu-atmega328 --crate-type=rlib +//@ [msp430] needs-llvm-components: msp430 +//@ [msp430] compile-flags: --target=msp430-none-elf --crate-type=rlib #![feature(no_core, lang_items, intrinsics, staged_api, rustc_attrs)] #![no_core] #![crate_type = "lib"] diff --git a/tests/ui/repr/align-with-extern-c-fn.rs b/tests/ui/repr/align-with-extern-c-fn.rs index 659ef88fce6..4d17d1e8816 100644 --- a/tests/ui/repr/align-with-extern-c-fn.rs +++ b/tests/ui/repr/align-with-extern-c-fn.rs @@ -1,4 +1,4 @@ -// run-pass +//@ run-pass #![allow(stable_features)] #![allow(unused_variables)] diff --git a/tests/ui/repr/aligned_enum_cast.rs b/tests/ui/repr/aligned_enum_cast.rs index 1ddf127172e..276d8f0783a 100644 --- a/tests/ui/repr/aligned_enum_cast.rs +++ b/tests/ui/repr/aligned_enum_cast.rs @@ -1,4 +1,4 @@ -// run-pass +//@ run-pass // allows aligned custom discriminant enums to cast into other types // See the issue #92464 for more info #[allow(dead_code)] diff --git a/tests/ui/repr/malformed-repr-hints.rs b/tests/ui/repr/malformed-repr-hints.rs index 27840b5f835..09c808a041d 100644 --- a/tests/ui/repr/malformed-repr-hints.rs +++ b/tests/ui/repr/malformed-repr-hints.rs @@ -1,7 +1,7 @@ // Regression test for various ICEs inspired by // https://github.com/rust-lang/rust/issues/83921#issuecomment-814640734 -// compile-flags: -Zdeduplicate-diagnostics=yes +//@ compile-flags: -Zdeduplicate-diagnostics=yes #[repr(packed())] //~^ ERROR: incorrect `repr(packed)` attribute format diff --git a/tests/ui/repr/repr-align-assign.fixed b/tests/ui/repr/repr-align-assign.fixed index 59ca22e9728..d40fcadf57b 100644 --- a/tests/ui/repr/repr-align-assign.fixed +++ b/tests/ui/repr/repr-align-assign.fixed @@ -1,4 +1,4 @@ -// run-rustfix +//@ run-rustfix #![allow(dead_code)] diff --git a/tests/ui/repr/repr-align-assign.rs b/tests/ui/repr/repr-align-assign.rs index 6b7799297e8..3aff84a91f7 100644 --- a/tests/ui/repr/repr-align-assign.rs +++ b/tests/ui/repr/repr-align-assign.rs @@ -1,4 +1,4 @@ -// run-rustfix +//@ run-rustfix #![allow(dead_code)] diff --git a/tests/ui/repr/repr-transparent-issue-87496.rs b/tests/ui/repr/repr-transparent-issue-87496.rs index a4dd45c63f5..d512308377d 100644 --- a/tests/ui/repr/repr-transparent-issue-87496.rs +++ b/tests/ui/repr/repr-transparent-issue-87496.rs @@ -1,6 +1,6 @@ // Regression test for the ICE described in #87496. -// check-pass +//@ check-pass #[repr(transparent)] struct TransparentCustomZst(()); diff --git a/tests/ui/repr/repr-transparent-non-exhaustive.rs b/tests/ui/repr/repr-transparent-non-exhaustive.rs index 84dd3f49239..9894b89e8e4 100644 --- a/tests/ui/repr/repr-transparent-non-exhaustive.rs +++ b/tests/ui/repr/repr-transparent-non-exhaustive.rs @@ -1,6 +1,6 @@ #![deny(repr_transparent_external_private_fields)] -// aux-build: repr-transparent-non-exhaustive.rs +//@ aux-build: repr-transparent-non-exhaustive.rs extern crate repr_transparent_non_exhaustive; use repr_transparent_non_exhaustive::{ diff --git a/tests/ui/repr/repr_c_int_align.rs b/tests/ui/repr/repr_c_int_align.rs index fdd14fc2dbe..0a2a77f75ff 100644 --- a/tests/ui/repr/repr_c_int_align.rs +++ b/tests/ui/repr/repr_c_int_align.rs @@ -1,5 +1,5 @@ -// run-pass -// compile-flags: -O +//@ run-pass +//@ compile-flags: -O #![allow(dead_code)] diff --git a/tests/ui/resolve/112590-2.fixed b/tests/ui/resolve/112590-2.fixed index 3bfe81ae8d0..d88bc4b47e2 100644 --- a/tests/ui/resolve/112590-2.fixed +++ b/tests/ui/resolve/112590-2.fixed @@ -1,4 +1,4 @@ -// run-rustfix +//@ run-rustfix use std::vec; use std::sync::atomic::AtomicBool; diff --git a/tests/ui/resolve/112590-2.rs b/tests/ui/resolve/112590-2.rs index e5914cd676e..d8aaa5a6cc1 100644 --- a/tests/ui/resolve/112590-2.rs +++ b/tests/ui/resolve/112590-2.rs @@ -1,4 +1,4 @@ -// run-rustfix +//@ run-rustfix mod foo { pub mod bar { pub mod baz { diff --git a/tests/ui/resolve/auxiliary/issue-112831-aux.rs b/tests/ui/resolve/auxiliary/issue-112831-aux.rs index df436fb9929..e5c1486d8ae 100644 --- a/tests/ui/resolve/auxiliary/issue-112831-aux.rs +++ b/tests/ui/resolve/auxiliary/issue-112831-aux.rs @@ -1,5 +1,5 @@ -// force-host -// no-prefer-dynamic +//@ force-host +//@ no-prefer-dynamic #![crate_type = "proc-macro"] diff --git a/tests/ui/resolve/bad-env-capture.rs b/tests/ui/resolve/bad-env-capture.rs index 83fd2544fc8..ccd98b6ef06 100644 --- a/tests/ui/resolve/bad-env-capture.rs +++ b/tests/ui/resolve/bad-env-capture.rs @@ -1,4 +1,4 @@ -// error-pattern: can't capture dynamic environment in a fn item +//@ error-pattern: can't capture dynamic environment in a fn item fn foo() { let x: isize; fn bar() { log(debug, x); } diff --git a/tests/ui/resolve/bad-env-capture2.rs b/tests/ui/resolve/bad-env-capture2.rs index b04569c9d72..84d1832be60 100644 --- a/tests/ui/resolve/bad-env-capture2.rs +++ b/tests/ui/resolve/bad-env-capture2.rs @@ -1,4 +1,4 @@ -// error-pattern: can't capture dynamic environment in a fn item +//@ error-pattern: can't capture dynamic environment in a fn item fn foo(x: isize) { fn bar() { log(debug, x); } } diff --git a/tests/ui/resolve/bad-env-capture3.rs b/tests/ui/resolve/bad-env-capture3.rs index 62f12fd1a6d..849b84cb1ab 100644 --- a/tests/ui/resolve/bad-env-capture3.rs +++ b/tests/ui/resolve/bad-env-capture3.rs @@ -1,4 +1,4 @@ -// error-pattern: can't capture dynamic environment in a fn item +//@ error-pattern: can't capture dynamic environment in a fn item fn foo(x: isize) { fn mth() { fn bar() { log(debug, x); } diff --git a/tests/ui/resolve/blind-item-local-shadow.rs b/tests/ui/resolve/blind-item-local-shadow.rs index 942aeb6fdf4..f3e60893669 100644 --- a/tests/ui/resolve/blind-item-local-shadow.rs +++ b/tests/ui/resolve/blind-item-local-shadow.rs @@ -1,4 +1,4 @@ -// run-pass +//@ run-pass #![allow(dead_code)] #![allow(unused_imports)] diff --git a/tests/ui/resolve/blind-item-mixed-crate-use-item.rs b/tests/ui/resolve/blind-item-mixed-crate-use-item.rs index 36d8ab151e4..9869881db9a 100644 --- a/tests/ui/resolve/blind-item-mixed-crate-use-item.rs +++ b/tests/ui/resolve/blind-item-mixed-crate-use-item.rs @@ -1,8 +1,8 @@ -// run-pass -// aux-build:blind-item-mixed-crate-use-item-foo.rs -// aux-build:blind-item-mixed-crate-use-item-foo2.rs +//@ run-pass +//@ aux-build:blind-item-mixed-crate-use-item-foo.rs +//@ aux-build:blind-item-mixed-crate-use-item-foo2.rs -// pretty-expanded FIXME #23616 +//@ pretty-expanded FIXME #23616 mod m { pub fn f(_: T, _: (), _: ()) { } diff --git a/tests/ui/resolve/blind-item-mixed-use-item.rs b/tests/ui/resolve/blind-item-mixed-use-item.rs index 4a39054967b..416496f3219 100644 --- a/tests/ui/resolve/blind-item-mixed-use-item.rs +++ b/tests/ui/resolve/blind-item-mixed-use-item.rs @@ -1,5 +1,5 @@ -// run-pass -// pretty-expanded FIXME #23616 +//@ run-pass +//@ pretty-expanded FIXME #23616 mod m { pub fn f(_: T, _: ()) { } diff --git a/tests/ui/resolve/block-with-trait-parent.rs b/tests/ui/resolve/block-with-trait-parent.rs index bc86f94e921..e161b33dc25 100644 --- a/tests/ui/resolve/block-with-trait-parent.rs +++ b/tests/ui/resolve/block-with-trait-parent.rs @@ -1,4 +1,4 @@ -// check-pass +//@ check-pass trait Trait { fn method(&self) { diff --git a/tests/ui/resolve/crate-in-paths.rs b/tests/ui/resolve/crate-in-paths.rs index 7ebd259189d..fad1add40af 100644 --- a/tests/ui/resolve/crate-in-paths.rs +++ b/tests/ui/resolve/crate-in-paths.rs @@ -1,4 +1,4 @@ -// edition:2018 +//@ edition:2018 mod bar { pub(crate) struct Foo; diff --git a/tests/ui/resolve/derive-macro-1.rs b/tests/ui/resolve/derive-macro-1.rs index 90cbd903ad6..f4fbb1d2c7c 100644 --- a/tests/ui/resolve/derive-macro-1.rs +++ b/tests/ui/resolve/derive-macro-1.rs @@ -1,5 +1,5 @@ -// check-pass -// aux-build:issue-112831-aux.rs +//@ check-pass +//@ aux-build:issue-112831-aux.rs mod z { pub trait Zeroable {} diff --git a/tests/ui/resolve/derive-macro-2.rs b/tests/ui/resolve/derive-macro-2.rs index 7cecdd9e38e..126f5ae107f 100644 --- a/tests/ui/resolve/derive-macro-2.rs +++ b/tests/ui/resolve/derive-macro-2.rs @@ -1,5 +1,5 @@ -// check-pass -// aux-build:issue-112831-aux.rs +//@ check-pass +//@ aux-build:issue-112831-aux.rs extern crate issue_112831_aux; use issue_112831_aux::Zeroable; diff --git a/tests/ui/resolve/editions-crate-root-2015.rs b/tests/ui/resolve/editions-crate-root-2015.rs index 4c890e3ae69..5f764d3ceef 100644 --- a/tests/ui/resolve/editions-crate-root-2015.rs +++ b/tests/ui/resolve/editions-crate-root-2015.rs @@ -1,4 +1,4 @@ -// edition:2015 +//@ edition:2015 mod inner { fn global_inner(_: ::nonexistant::Foo) { diff --git a/tests/ui/resolve/editions-crate-root-2018.rs b/tests/ui/resolve/editions-crate-root-2018.rs index 61e4329bbb3..0e964d20f9c 100644 --- a/tests/ui/resolve/editions-crate-root-2018.rs +++ b/tests/ui/resolve/editions-crate-root-2018.rs @@ -1,4 +1,4 @@ -// edition:2018 +//@ edition:2018 mod inner { fn global_inner(_: ::nonexistant::Foo) { diff --git a/tests/ui/resolve/enums-are-namespaced-xc.rs b/tests/ui/resolve/enums-are-namespaced-xc.rs index dfc16d6ce44..7797086d4a0 100644 --- a/tests/ui/resolve/enums-are-namespaced-xc.rs +++ b/tests/ui/resolve/enums-are-namespaced-xc.rs @@ -1,4 +1,4 @@ -// aux-build:namespaced_enums.rs +//@ aux-build:namespaced_enums.rs extern crate namespaced_enums; fn main() { diff --git a/tests/ui/resolve/export-fully-qualified-2018.rs b/tests/ui/resolve/export-fully-qualified-2018.rs index afd48acb6bb..26e3044d8df 100644 --- a/tests/ui/resolve/export-fully-qualified-2018.rs +++ b/tests/ui/resolve/export-fully-qualified-2018.rs @@ -1,4 +1,4 @@ -// edition:2018 +//@ edition:2018 // In this test baz isn't resolved when called as foo.baz even though // it's called from inside foo. This is somewhat surprising and may diff --git a/tests/ui/resolve/export-fully-qualified.rs b/tests/ui/resolve/export-fully-qualified.rs index 9d4daf4cd79..6de33b7e191 100644 --- a/tests/ui/resolve/export-fully-qualified.rs +++ b/tests/ui/resolve/export-fully-qualified.rs @@ -1,4 +1,4 @@ -// edition:2015 +//@ edition:2015 // In this test baz isn't resolved when called as foo.baz even though // it's called from inside foo. This is somewhat surprising and may diff --git a/tests/ui/resolve/extern-prelude-fail.rs b/tests/ui/resolve/extern-prelude-fail.rs index 7d387025ad4..c0716f1ebf5 100644 --- a/tests/ui/resolve/extern-prelude-fail.rs +++ b/tests/ui/resolve/extern-prelude-fail.rs @@ -1,5 +1,5 @@ -// compile-flags:--extern extern_prelude -// aux-build:extern-prelude.rs +//@ compile-flags:--extern extern_prelude +//@ aux-build:extern-prelude.rs // Extern prelude names are not available by absolute paths diff --git a/tests/ui/resolve/extern-prelude.rs b/tests/ui/resolve/extern-prelude.rs index b5f1d5d35b2..3ce928745a9 100644 --- a/tests/ui/resolve/extern-prelude.rs +++ b/tests/ui/resolve/extern-prelude.rs @@ -1,7 +1,7 @@ -// build-pass (FIXME(62277): could be check-pass?) -// compile-flags:--extern extern_prelude --extern Vec -// aux-build:extern-prelude.rs -// aux-build:extern-prelude-vec.rs +//@ build-pass (FIXME(62277): could be check-pass?) +//@ compile-flags:--extern extern_prelude --extern Vec +//@ aux-build:extern-prelude.rs +//@ aux-build:extern-prelude-vec.rs fn basic() { // It works diff --git a/tests/ui/resolve/generic-params-from-outer-item-in-const-item.rs b/tests/ui/resolve/generic-params-from-outer-item-in-const-item.rs index e5647d72cba..c9a64de7f6b 100644 --- a/tests/ui/resolve/generic-params-from-outer-item-in-const-item.rs +++ b/tests/ui/resolve/generic-params-from-outer-item-in-const-item.rs @@ -2,7 +2,7 @@ // If a const item contains generic params from an outer items, only suggest // turning the const item generic if the feature `generic_const_items` is enabled. -// revisions: default generic_const_items +//@ revisions: default generic_const_items #![cfg_attr(generic_const_items, feature(generic_const_items))] #![feature(generic_const_exprs)] // only used for the test case "outer struct" diff --git a/tests/ui/resolve/hidden_glob_reexports.rs b/tests/ui/resolve/hidden_glob_reexports.rs index 102b5656245..65e248e4bd2 100644 --- a/tests/ui/resolve/hidden_glob_reexports.rs +++ b/tests/ui/resolve/hidden_glob_reexports.rs @@ -1,4 +1,4 @@ -// check-pass +//@ check-pass pub mod upstream_a { mod inner { diff --git a/tests/ui/resolve/issue-101749.fixed b/tests/ui/resolve/issue-101749.fixed index 3e5544296e4..97815793d29 100644 --- a/tests/ui/resolve/issue-101749.fixed +++ b/tests/ui/resolve/issue-101749.fixed @@ -1,4 +1,4 @@ -// run-rustfix +//@ run-rustfix struct Rectangle { width: i32, height: i32, diff --git a/tests/ui/resolve/issue-101749.rs b/tests/ui/resolve/issue-101749.rs index fd67ccab6fa..994fc86778e 100644 --- a/tests/ui/resolve/issue-101749.rs +++ b/tests/ui/resolve/issue-101749.rs @@ -1,4 +1,4 @@ -// run-rustfix +//@ run-rustfix struct Rectangle { width: i32, height: i32, diff --git a/tests/ui/resolve/issue-111312.rs b/tests/ui/resolve/issue-111312.rs index acea37b358b..68fc8573dde 100644 --- a/tests/ui/resolve/issue-111312.rs +++ b/tests/ui/resolve/issue-111312.rs @@ -1,4 +1,4 @@ -// edition: 2021 +//@ edition: 2021 trait Has { fn has() {} diff --git a/tests/ui/resolve/issue-111727.rs b/tests/ui/resolve/issue-111727.rs index 36f3081211d..740037fe434 100644 --- a/tests/ui/resolve/issue-111727.rs +++ b/tests/ui/resolve/issue-111727.rs @@ -1,4 +1,4 @@ -// edition: 2021 +//@ edition: 2021 fn main() { std::any::Any::create(); //~ ERROR diff --git a/tests/ui/resolve/issue-112472-multi-generics-suggestion.fixed b/tests/ui/resolve/issue-112472-multi-generics-suggestion.fixed index 892697493b7..4bb68e6fe68 100644 --- a/tests/ui/resolve/issue-112472-multi-generics-suggestion.fixed +++ b/tests/ui/resolve/issue-112472-multi-generics-suggestion.fixed @@ -1,4 +1,4 @@ -// run-rustfix +//@ run-rustfix use std::fmt::Debug; use std::marker::PhantomData; diff --git a/tests/ui/resolve/issue-112472-multi-generics-suggestion.rs b/tests/ui/resolve/issue-112472-multi-generics-suggestion.rs index 2b2f5f1ad8d..a8db78a378c 100644 --- a/tests/ui/resolve/issue-112472-multi-generics-suggestion.rs +++ b/tests/ui/resolve/issue-112472-multi-generics-suggestion.rs @@ -1,4 +1,4 @@ -// run-rustfix +//@ run-rustfix use std::fmt::Debug; use std::marker::PhantomData; diff --git a/tests/ui/resolve/issue-113808-invalid-unused-qualifications-suggestion.fixed b/tests/ui/resolve/issue-113808-invalid-unused-qualifications-suggestion.fixed index a7ab88fe993..8a67b20eec1 100644 --- a/tests/ui/resolve/issue-113808-invalid-unused-qualifications-suggestion.fixed +++ b/tests/ui/resolve/issue-113808-invalid-unused-qualifications-suggestion.fixed @@ -1,4 +1,4 @@ -// run-rustfix +//@ run-rustfix #![allow(dead_code)] #![deny(unused_qualifications)] diff --git a/tests/ui/resolve/issue-113808-invalid-unused-qualifications-suggestion.rs b/tests/ui/resolve/issue-113808-invalid-unused-qualifications-suggestion.rs index 05936b191ff..528edb331cf 100644 --- a/tests/ui/resolve/issue-113808-invalid-unused-qualifications-suggestion.rs +++ b/tests/ui/resolve/issue-113808-invalid-unused-qualifications-suggestion.rs @@ -1,4 +1,4 @@ -// run-rustfix +//@ run-rustfix #![allow(dead_code)] #![deny(unused_qualifications)] diff --git a/tests/ui/resolve/issue-114433-invalid-unused-qualifications-suggestion.rs b/tests/ui/resolve/issue-114433-invalid-unused-qualifications-suggestion.rs index 83349dd3350..a74e542592f 100644 --- a/tests/ui/resolve/issue-114433-invalid-unused-qualifications-suggestion.rs +++ b/tests/ui/resolve/issue-114433-invalid-unused-qualifications-suggestion.rs @@ -1,5 +1,5 @@ #![deny(unused_qualifications)] -// check-pass +//@ check-pass fn bar() { match Option::>::None { Some(v) => {} diff --git a/tests/ui/resolve/issue-16058.rs b/tests/ui/resolve/issue-16058.rs index 048aaf65fbf..608edb82f02 100644 --- a/tests/ui/resolve/issue-16058.rs +++ b/tests/ui/resolve/issue-16058.rs @@ -1,4 +1,4 @@ -// ignore-sgx std::os::fortanix_sgx::usercalls::raw::Result changes compiler suggestions +//@ ignore-sgx std::os::fortanix_sgx::usercalls::raw::Result changes compiler suggestions pub struct GslResult { pub val: f64, diff --git a/tests/ui/resolve/issue-19452.rs b/tests/ui/resolve/issue-19452.rs index 1d3aa49eac6..da83222b11a 100644 --- a/tests/ui/resolve/issue-19452.rs +++ b/tests/ui/resolve/issue-19452.rs @@ -1,4 +1,4 @@ -// aux-build:issue-19452-aux.rs +//@ aux-build:issue-19452-aux.rs extern crate issue_19452_aux; diff --git a/tests/ui/resolve/issue-21221-3.rs b/tests/ui/resolve/issue-21221-3.rs index f0c0a9fd61a..26a7a9efd0b 100644 --- a/tests/ui/resolve/issue-21221-3.rs +++ b/tests/ui/resolve/issue-21221-3.rs @@ -1,7 +1,7 @@ // testing whether the lookup mechanism picks up types // defined in the outside crate -// aux-build:issue-21221-3.rs +//@ aux-build:issue-21221-3.rs extern crate issue_21221_3; diff --git a/tests/ui/resolve/issue-21221-4.rs b/tests/ui/resolve/issue-21221-4.rs index 88d5bd06ca5..85321de579a 100644 --- a/tests/ui/resolve/issue-21221-4.rs +++ b/tests/ui/resolve/issue-21221-4.rs @@ -1,7 +1,7 @@ // testing whether the lookup mechanism picks up types // defined in the outside crate -// aux-build:issue-21221-4.rs +//@ aux-build:issue-21221-4.rs extern crate issue_21221_4; diff --git a/tests/ui/resolve/issue-30535.rs b/tests/ui/resolve/issue-30535.rs index d48f00d5aca..a971ce12362 100644 --- a/tests/ui/resolve/issue-30535.rs +++ b/tests/ui/resolve/issue-30535.rs @@ -1,4 +1,4 @@ -// aux-build:issue-30535.rs +//@ aux-build:issue-30535.rs extern crate issue_30535 as foo; diff --git a/tests/ui/resolve/issue-3907-2.rs b/tests/ui/resolve/issue-3907-2.rs index 0ebaea08e18..f261de5f402 100644 --- a/tests/ui/resolve/issue-3907-2.rs +++ b/tests/ui/resolve/issue-3907-2.rs @@ -1,4 +1,4 @@ -// aux-build:issue-3907.rs +//@ aux-build:issue-3907.rs extern crate issue_3907; diff --git a/tests/ui/resolve/issue-3907.rs b/tests/ui/resolve/issue-3907.rs index 6211de42717..fd08c360d36 100644 --- a/tests/ui/resolve/issue-3907.rs +++ b/tests/ui/resolve/issue-3907.rs @@ -1,4 +1,4 @@ -// aux-build:issue-3907.rs +//@ aux-build:issue-3907.rs extern crate issue_3907; diff --git a/tests/ui/resolve/issue-55673.fixed b/tests/ui/resolve/issue-55673.fixed index 261742a26cb..ac8e5e0187d 100644 --- a/tests/ui/resolve/issue-55673.fixed +++ b/tests/ui/resolve/issue-55673.fixed @@ -1,4 +1,4 @@ -// run-rustfix +//@ run-rustfix #![allow(dead_code)] trait Foo { type Bar; diff --git a/tests/ui/resolve/issue-55673.rs b/tests/ui/resolve/issue-55673.rs index 6ac49be141c..b9b6b6956c5 100644 --- a/tests/ui/resolve/issue-55673.rs +++ b/tests/ui/resolve/issue-55673.rs @@ -1,4 +1,4 @@ -// run-rustfix +//@ run-rustfix #![allow(dead_code)] trait Foo { type Bar; diff --git a/tests/ui/resolve/issue-57523.rs b/tests/ui/resolve/issue-57523.rs index 976238cc3bd..d55ae4b5785 100644 --- a/tests/ui/resolve/issue-57523.rs +++ b/tests/ui/resolve/issue-57523.rs @@ -1,4 +1,4 @@ -// check-pass +//@ check-pass struct S(u8); diff --git a/tests/ui/resolve/issue-70736-async-fn-no-body-def-collector.rs b/tests/ui/resolve/issue-70736-async-fn-no-body-def-collector.rs index 927ecd9aee0..d2bb0dc7631 100644 --- a/tests/ui/resolve/issue-70736-async-fn-no-body-def-collector.rs +++ b/tests/ui/resolve/issue-70736-async-fn-no-body-def-collector.rs @@ -1,4 +1,4 @@ -// edition:2018 +//@ edition:2018 async fn free(); //~ ERROR without a body diff --git a/tests/ui/resolve/issue-80079.rs b/tests/ui/resolve/issue-80079.rs index 4795ed062c8..4dc61c320ad 100644 --- a/tests/ui/resolve/issue-80079.rs +++ b/tests/ui/resolve/issue-80079.rs @@ -1,4 +1,4 @@ -// aux-build:issue-80079.rs +//@ aux-build:issue-80079.rs // using a module from another crate should not cause errors to suggest private // items in that module diff --git a/tests/ui/resolve/issue-85671.rs b/tests/ui/resolve/issue-85671.rs index 337ec307ef3..54db03f774e 100644 --- a/tests/ui/resolve/issue-85671.rs +++ b/tests/ui/resolve/issue-85671.rs @@ -1,4 +1,4 @@ -// check-pass +//@ check-pass // Some trait with a function that returns a slice: pub trait AsSlice { diff --git a/tests/ui/resolve/macro-determinacy-non-module.rs b/tests/ui/resolve/macro-determinacy-non-module.rs index 3215e0cd346..809e9f6f6c4 100644 --- a/tests/ui/resolve/macro-determinacy-non-module.rs +++ b/tests/ui/resolve/macro-determinacy-non-module.rs @@ -1,4 +1,4 @@ -// check-pass +//@ check-pass use std as line; diff --git a/tests/ui/resolve/name-collision-in-trait-fn-sig.rs b/tests/ui/resolve/name-collision-in-trait-fn-sig.rs index fba4ffa1c6e..f405ab5c59d 100644 --- a/tests/ui/resolve/name-collision-in-trait-fn-sig.rs +++ b/tests/ui/resolve/name-collision-in-trait-fn-sig.rs @@ -1,4 +1,4 @@ -// check-pass +//@ check-pass // This is currently stable behavior, which was almost accidentally made an // error in #102161 since there is no test exercising it. I am not sure if // this _should_ be the desired behavior, but at least we should know if it diff --git a/tests/ui/resolve/no-std-1.rs b/tests/ui/resolve/no-std-1.rs index 5b59e9b4eb3..57770a745e8 100644 --- a/tests/ui/resolve/no-std-1.rs +++ b/tests/ui/resolve/no-std-1.rs @@ -1,4 +1,4 @@ -// run-pass +//@ run-pass #![no_std] diff --git a/tests/ui/resolve/no-std-2.rs b/tests/ui/resolve/no-std-2.rs index 487d41649f4..e5be5edc216 100644 --- a/tests/ui/resolve/no-std-2.rs +++ b/tests/ui/resolve/no-std-2.rs @@ -1,4 +1,4 @@ -// run-pass +//@ run-pass #![no_std] diff --git a/tests/ui/resolve/no-std-3.rs b/tests/ui/resolve/no-std-3.rs index f6c4ed5794c..0dd0a6f7e35 100644 --- a/tests/ui/resolve/no-std-3.rs +++ b/tests/ui/resolve/no-std-3.rs @@ -1,4 +1,4 @@ -// run-pass +//@ run-pass #![no_std] diff --git a/tests/ui/resolve/pathless-extern-ok.rs b/tests/ui/resolve/pathless-extern-ok.rs index 0ffa5eb8940..91ef4de956d 100644 --- a/tests/ui/resolve/pathless-extern-ok.rs +++ b/tests/ui/resolve/pathless-extern-ok.rs @@ -1,6 +1,6 @@ -// edition:2018 -// compile-flags:--extern alloc -// build-pass +//@ edition:2018 +//@ compile-flags:--extern alloc +//@ build-pass // Test that `--extern alloc` will load from the sysroot without error. diff --git a/tests/ui/resolve/privacy-struct-ctor.rs b/tests/ui/resolve/privacy-struct-ctor.rs index 0eecc7f8cc5..da0e9f2fc04 100644 --- a/tests/ui/resolve/privacy-struct-ctor.rs +++ b/tests/ui/resolve/privacy-struct-ctor.rs @@ -1,4 +1,4 @@ -// aux-build:privacy-struct-ctor.rs +//@ aux-build:privacy-struct-ctor.rs extern crate privacy_struct_ctor as xcrate; diff --git a/tests/ui/resolve/resolve-conflict-import-vs-import.fixed b/tests/ui/resolve/resolve-conflict-import-vs-import.fixed index e429513b51d..2ebf2a194b8 100644 --- a/tests/ui/resolve/resolve-conflict-import-vs-import.fixed +++ b/tests/ui/resolve/resolve-conflict-import-vs-import.fixed @@ -1,4 +1,4 @@ -// run-rustfix +//@ run-rustfix #[allow(unused_imports)] use std::mem::transmute; diff --git a/tests/ui/resolve/resolve-conflict-import-vs-import.rs b/tests/ui/resolve/resolve-conflict-import-vs-import.rs index 43853117af6..53af6aea1f6 100644 --- a/tests/ui/resolve/resolve-conflict-import-vs-import.rs +++ b/tests/ui/resolve/resolve-conflict-import-vs-import.rs @@ -1,4 +1,4 @@ -// run-rustfix +//@ run-rustfix #[allow(unused_imports)] use std::mem::transmute; diff --git a/tests/ui/resolve/resolve-hint-macro.fixed b/tests/ui/resolve/resolve-hint-macro.fixed index 54e01608498..4821aef1bbd 100644 --- a/tests/ui/resolve/resolve-hint-macro.fixed +++ b/tests/ui/resolve/resolve-hint-macro.fixed @@ -1,4 +1,4 @@ -// run-rustfix +//@ run-rustfix fn main() { assert_eq!(1, 1); //~^ ERROR expected function, found macro `assert_eq` diff --git a/tests/ui/resolve/resolve-hint-macro.rs b/tests/ui/resolve/resolve-hint-macro.rs index f16e8c07553..101a7cd1515 100644 --- a/tests/ui/resolve/resolve-hint-macro.rs +++ b/tests/ui/resolve/resolve-hint-macro.rs @@ -1,4 +1,4 @@ -// run-rustfix +//@ run-rustfix fn main() { assert_eq(1, 1); //~^ ERROR expected function, found macro `assert_eq` diff --git a/tests/ui/resolve/resolve-issue-2428.rs b/tests/ui/resolve/resolve-issue-2428.rs index 5f3473e9feb..f7bb117c88f 100644 --- a/tests/ui/resolve/resolve-issue-2428.rs +++ b/tests/ui/resolve/resolve-issue-2428.rs @@ -1,4 +1,4 @@ -// run-pass +//@ run-pass #![allow(non_camel_case_types)] #![allow(non_upper_case_globals)] diff --git a/tests/ui/resolve/resolve-pseudo-shadowing.rs b/tests/ui/resolve/resolve-pseudo-shadowing.rs index 0ee0d0efad6..a5aad3c669c 100644 --- a/tests/ui/resolve/resolve-pseudo-shadowing.rs +++ b/tests/ui/resolve/resolve-pseudo-shadowing.rs @@ -1,4 +1,4 @@ -// run-pass +//@ run-pass // check that type parameters can't "shadow" qualified paths. fn check(_c: Clone) { diff --git a/tests/ui/resolve/suggest-constructor-cycle-error.rs b/tests/ui/resolve/suggest-constructor-cycle-error.rs index e36fffd97d1..c23d6788eef 100644 --- a/tests/ui/resolve/suggest-constructor-cycle-error.rs +++ b/tests/ui/resolve/suggest-constructor-cycle-error.rs @@ -1,4 +1,4 @@ -// aux-build:suggest-constructor-cycle-error.rs +//@ aux-build:suggest-constructor-cycle-error.rs // Regression test for https://github.com/rust-lang/rust/issues/119625 diff --git a/tests/ui/resolve/suggest-import-without-clobbering-attrs.fixed b/tests/ui/resolve/suggest-import-without-clobbering-attrs.fixed index fc68884fe9c..d05c0f05806 100644 --- a/tests/ui/resolve/suggest-import-without-clobbering-attrs.fixed +++ b/tests/ui/resolve/suggest-import-without-clobbering-attrs.fixed @@ -1,5 +1,5 @@ -// run-rustfix -// compile-flags: --cfg=whatever -Aunused +//@ run-rustfix +//@ compile-flags: --cfg=whatever -Aunused use y::z; #[cfg(whatever)] diff --git a/tests/ui/resolve/suggest-import-without-clobbering-attrs.rs b/tests/ui/resolve/suggest-import-without-clobbering-attrs.rs index 38a1095703b..0be2e558e42 100644 --- a/tests/ui/resolve/suggest-import-without-clobbering-attrs.rs +++ b/tests/ui/resolve/suggest-import-without-clobbering-attrs.rs @@ -1,5 +1,5 @@ -// run-rustfix -// compile-flags: --cfg=whatever -Aunused +//@ run-rustfix +//@ compile-flags: --cfg=whatever -Aunused #[cfg(whatever)] use y::Whatever; diff --git a/tests/ui/resolve/tool-import.rs b/tests/ui/resolve/tool-import.rs index 971993332f5..bde375a2c49 100644 --- a/tests/ui/resolve/tool-import.rs +++ b/tests/ui/resolve/tool-import.rs @@ -1,4 +1,4 @@ -// edition: 2018 +//@ edition: 2018 use clippy::time::Instant; //~^ `clippy` is a tool module diff --git a/tests/ui/resolve/unused-qualifications-suggestion.fixed b/tests/ui/resolve/unused-qualifications-suggestion.fixed index 0d4b9007c7b..6935f611b36 100644 --- a/tests/ui/resolve/unused-qualifications-suggestion.fixed +++ b/tests/ui/resolve/unused-qualifications-suggestion.fixed @@ -1,4 +1,4 @@ -// run-rustfix +//@ run-rustfix #![deny(unused_qualifications)] diff --git a/tests/ui/resolve/unused-qualifications-suggestion.rs b/tests/ui/resolve/unused-qualifications-suggestion.rs index f6722e96537..b3fe04ff0ea 100644 --- a/tests/ui/resolve/unused-qualifications-suggestion.rs +++ b/tests/ui/resolve/unused-qualifications-suggestion.rs @@ -1,4 +1,4 @@ -// run-rustfix +//@ run-rustfix #![deny(unused_qualifications)] diff --git a/tests/ui/resolve/use_suggestion_placement.fixed b/tests/ui/resolve/use_suggestion_placement.fixed index d1686f7fd2b..de7f946d1d9 100644 --- a/tests/ui/resolve/use_suggestion_placement.fixed +++ b/tests/ui/resolve/use_suggestion_placement.fixed @@ -1,4 +1,4 @@ -// run-rustfix +//@ run-rustfix #![allow(dead_code)] use m::A; diff --git a/tests/ui/resolve/use_suggestion_placement.rs b/tests/ui/resolve/use_suggestion_placement.rs index 5be91f27092..f761e9715a0 100644 --- a/tests/ui/resolve/use_suggestion_placement.rs +++ b/tests/ui/resolve/use_suggestion_placement.rs @@ -1,4 +1,4 @@ -// run-rustfix +//@ run-rustfix #![allow(dead_code)] macro_rules! y { diff --git a/tests/ui/resolve/visibility-indeterminate.rs b/tests/ui/resolve/visibility-indeterminate.rs index 0e1142db37d..17e5fec4701 100644 --- a/tests/ui/resolve/visibility-indeterminate.rs +++ b/tests/ui/resolve/visibility-indeterminate.rs @@ -1,4 +1,4 @@ -// edition:2018 +//@ edition:2018 foo!(); //~ ERROR cannot find macro `foo` in this scope diff --git a/tests/ui/resource-assign-is-not-copy.rs b/tests/ui/resource-assign-is-not-copy.rs index c1de139a9a9..078824cea1b 100644 --- a/tests/ui/resource-assign-is-not-copy.rs +++ b/tests/ui/resource-assign-is-not-copy.rs @@ -1,4 +1,4 @@ -// run-pass +//@ run-pass #![allow(non_camel_case_types)] use std::cell::Cell; diff --git a/tests/ui/resource-destruct.rs b/tests/ui/resource-destruct.rs index c4756a21a00..cbb17bb6ba6 100644 --- a/tests/ui/resource-destruct.rs +++ b/tests/ui/resource-destruct.rs @@ -1,4 +1,4 @@ -// run-pass +//@ run-pass #![allow(non_camel_case_types)] use std::cell::Cell; diff --git a/tests/ui/ret-bang.rs b/tests/ui/ret-bang.rs index 6618992e036..f0d529ad6a6 100644 --- a/tests/ui/ret-bang.rs +++ b/tests/ui/ret-bang.rs @@ -1,4 +1,4 @@ -// run-pass +//@ run-pass fn my_err(s: String) -> ! { println!("{}", s); panic!(); } diff --git a/tests/ui/ret-non-nil.rs b/tests/ui/ret-non-nil.rs index 86c02bf38e6..1d039ffe18c 100644 --- a/tests/ui/ret-non-nil.rs +++ b/tests/ui/ret-non-nil.rs @@ -1,4 +1,4 @@ -// error-pattern: `return;` in a function whose return type is not `()` +//@ error-pattern: `return;` in a function whose return type is not `()` fn f() { return; } diff --git a/tests/ui/return-nil.rs b/tests/ui/return-nil.rs index 4fc937f96a1..403eae260dc 100644 --- a/tests/ui/return-nil.rs +++ b/tests/ui/return-nil.rs @@ -1,5 +1,5 @@ -// run-pass -// pretty-expanded FIXME #23616 +//@ run-pass +//@ pretty-expanded FIXME #23616 fn f() { let x = (); return x; } diff --git a/tests/ui/return/return-impl-trait.fixed b/tests/ui/return/return-impl-trait.fixed index ff2b02f73ea..1dfc0fc0f3d 100644 --- a/tests/ui/return/return-impl-trait.fixed +++ b/tests/ui/return/return-impl-trait.fixed @@ -1,4 +1,4 @@ -// run-rustfix +//@ run-rustfix trait Trait {} impl Trait for () {} diff --git a/tests/ui/return/return-impl-trait.rs b/tests/ui/return/return-impl-trait.rs index e905d712f62..6b1b8a4b738 100644 --- a/tests/ui/return/return-impl-trait.rs +++ b/tests/ui/return/return-impl-trait.rs @@ -1,4 +1,4 @@ -// run-rustfix +//@ run-rustfix trait Trait {} impl Trait for () {} diff --git a/tests/ui/return/tail-expr-as-potential-return.rs b/tests/ui/return/tail-expr-as-potential-return.rs index 2046d6680dd..37dee1c19db 100644 --- a/tests/ui/return/tail-expr-as-potential-return.rs +++ b/tests/ui/return/tail-expr-as-potential-return.rs @@ -9,7 +9,7 @@ // This test was amended to also serve as a regression test for #92308, where // this suggestion would not trigger with async functions. // -// edition:2018 +//@ edition:2018 fn main() { } diff --git a/tests/ui/rfcs/rfc-0000-never_patterns/120240-async-fn-never-arg.rs b/tests/ui/rfcs/rfc-0000-never_patterns/120240-async-fn-never-arg.rs index 9150c831c89..3d92b9dcde4 100644 --- a/tests/ui/rfcs/rfc-0000-never_patterns/120240-async-fn-never-arg.rs +++ b/tests/ui/rfcs/rfc-0000-never_patterns/120240-async-fn-never-arg.rs @@ -1,5 +1,5 @@ -// edition: 2018 -// known-bug: #120240 +//@ edition: 2018 +//@ known-bug: #120240 #![feature(never_patterns)] #![allow(incomplete_features)] diff --git a/tests/ui/rfcs/rfc-0000-never_patterns/diverges.rs b/tests/ui/rfcs/rfc-0000-never_patterns/diverges.rs index 3783100b502..102539ed9d9 100644 --- a/tests/ui/rfcs/rfc-0000-never_patterns/diverges.rs +++ b/tests/ui/rfcs/rfc-0000-never_patterns/diverges.rs @@ -1,5 +1,5 @@ -// check-pass -// edition: 2018 +//@ check-pass +//@ edition: 2018 #![feature(never_patterns)] #![allow(incomplete_features)] #![deny(unreachable_patterns)] diff --git a/tests/ui/rfcs/rfc-0000-never_patterns/macros.rs b/tests/ui/rfcs/rfc-0000-never_patterns/macros.rs index 3c04b4517cb..27d113c18a3 100644 --- a/tests/ui/rfcs/rfc-0000-never_patterns/macros.rs +++ b/tests/ui/rfcs/rfc-0000-never_patterns/macros.rs @@ -1,7 +1,7 @@ -// check-pass -// revisions: e2018 e2021 -//[e2018] edition:2018 -//[e2021] edition:2021 +//@ check-pass +//@ revisions: e2018 e2021 +//@[e2018] edition:2018 +//@[e2021] edition:2021 #![feature(never_patterns)] #![allow(incomplete_features)] diff --git a/tests/ui/rfcs/rfc-0000-never_patterns/typeck.rs b/tests/ui/rfcs/rfc-0000-never_patterns/typeck.rs index 72ee4d24bb6..e8bfa9245f5 100644 --- a/tests/ui/rfcs/rfc-0000-never_patterns/typeck.rs +++ b/tests/ui/rfcs/rfc-0000-never_patterns/typeck.rs @@ -1,6 +1,6 @@ -// revisions: pass fail -//[pass] check-pass -//[fail] check-fail +//@ revisions: pass fail +//@[pass] check-pass +//@[fail] check-fail #![feature(never_patterns)] #![feature(min_exhaustive_patterns)] #![allow(incomplete_features)] diff --git a/tests/ui/rfcs/rfc-0000-never_patterns/unreachable.rs b/tests/ui/rfcs/rfc-0000-never_patterns/unreachable.rs index 0374cbdbc1f..4d20c67cf0f 100644 --- a/tests/ui/rfcs/rfc-0000-never_patterns/unreachable.rs +++ b/tests/ui/rfcs/rfc-0000-never_patterns/unreachable.rs @@ -1,5 +1,5 @@ -// revisions: normal exh_pats -//[normal] check-pass +//@ revisions: normal exh_pats +//@[normal] check-pass #![feature(never_patterns)] #![allow(incomplete_features)] #![cfg_attr(exh_pats, feature(min_exhaustive_patterns))] diff --git a/tests/ui/rfcs/rfc-0107-bind-by-move-pattern-guards/bind-by-move-no-guards.rs b/tests/ui/rfcs/rfc-0107-bind-by-move-pattern-guards/bind-by-move-no-guards.rs index 1e086160f3f..c925018bcc2 100644 --- a/tests/ui/rfcs/rfc-0107-bind-by-move-pattern-guards/bind-by-move-no-guards.rs +++ b/tests/ui/rfcs/rfc-0107-bind-by-move-pattern-guards/bind-by-move-no-guards.rs @@ -2,7 +2,7 @@ // rust-lang/rust#2329), that starts passing with this feature in // place. -// run-pass +//@ run-pass use std::sync::mpsc::channel; diff --git a/tests/ui/rfcs/rfc-0107-bind-by-move-pattern-guards/former-E0008-now-pass.rs b/tests/ui/rfcs/rfc-0107-bind-by-move-pattern-guards/former-E0008-now-pass.rs index 3161d6fbbe6..27f56958044 100644 --- a/tests/ui/rfcs/rfc-0107-bind-by-move-pattern-guards/former-E0008-now-pass.rs +++ b/tests/ui/rfcs/rfc-0107-bind-by-move-pattern-guards/former-E0008-now-pass.rs @@ -1,7 +1,7 @@ // This test used to emit E0008 but now passed since `bind_by_move_pattern_guards` // have been stabilized. -// check-pass +//@ check-pass fn main() { match Some("hi".to_string()) { diff --git a/tests/ui/rfcs/rfc-0107-bind-by-move-pattern-guards/rfc-basic-examples.rs b/tests/ui/rfcs/rfc-0107-bind-by-move-pattern-guards/rfc-basic-examples.rs index b716fc870e0..ab99deb6cb4 100644 --- a/tests/ui/rfcs/rfc-0107-bind-by-move-pattern-guards/rfc-basic-examples.rs +++ b/tests/ui/rfcs/rfc-0107-bind-by-move-pattern-guards/rfc-basic-examples.rs @@ -1,4 +1,4 @@ -// run-pass +//@ run-pass struct A { a: Box } diff --git a/tests/ui/rfcs/rfc-1014-stdout-existential-crisis/rfc-1014-2.rs b/tests/ui/rfcs/rfc-1014-stdout-existential-crisis/rfc-1014-2.rs index 7dd65701f12..4944de0b82f 100644 --- a/tests/ui/rfcs/rfc-1014-stdout-existential-crisis/rfc-1014-2.rs +++ b/tests/ui/rfcs/rfc-1014-stdout-existential-crisis/rfc-1014-2.rs @@ -1,4 +1,4 @@ -// run-pass +//@ run-pass #![allow(dead_code)] #![feature(rustc_private)] diff --git a/tests/ui/rfcs/rfc-1014-stdout-existential-crisis/rfc-1014.rs b/tests/ui/rfcs/rfc-1014-stdout-existential-crisis/rfc-1014.rs index c454dfa4eb9..1edd51dd23c 100644 --- a/tests/ui/rfcs/rfc-1014-stdout-existential-crisis/rfc-1014.rs +++ b/tests/ui/rfcs/rfc-1014-stdout-existential-crisis/rfc-1014.rs @@ -1,7 +1,7 @@ -// run-pass +//@ run-pass #![allow(dead_code)] -// ignore-wasm32-bare no libc -// ignore-sgx no libc +//@ ignore-wasm32-bare no libc +//@ ignore-sgx no libc #![feature(rustc_private)] diff --git a/tests/ui/rfcs/rfc-1445-restrict-constants-in-patterns/allow-hide-behind-direct-unsafe-ptr-embedded.rs b/tests/ui/rfcs/rfc-1445-restrict-constants-in-patterns/allow-hide-behind-direct-unsafe-ptr-embedded.rs index c95777b0ef1..22ea6f7534a 100644 --- a/tests/ui/rfcs/rfc-1445-restrict-constants-in-patterns/allow-hide-behind-direct-unsafe-ptr-embedded.rs +++ b/tests/ui/rfcs/rfc-1445-restrict-constants-in-patterns/allow-hide-behind-direct-unsafe-ptr-embedded.rs @@ -1,7 +1,7 @@ // Test explores how `#[structral_match]` behaves in tandem with // `*const` and `*mut` pointers. -// run-pass +//@ run-pass #![warn(pointer_structural_match)] diff --git a/tests/ui/rfcs/rfc-1445-restrict-constants-in-patterns/allow-hide-behind-direct-unsafe-ptr-param.rs b/tests/ui/rfcs/rfc-1445-restrict-constants-in-patterns/allow-hide-behind-direct-unsafe-ptr-param.rs index 3f663fd09f8..cd513d2aff4 100644 --- a/tests/ui/rfcs/rfc-1445-restrict-constants-in-patterns/allow-hide-behind-direct-unsafe-ptr-param.rs +++ b/tests/ui/rfcs/rfc-1445-restrict-constants-in-patterns/allow-hide-behind-direct-unsafe-ptr-param.rs @@ -1,7 +1,7 @@ // Test explores how `#[structral_match]` behaves in tandem with // `*const` and `*mut` pointers. -// run-pass +//@ run-pass #![warn(pointer_structural_match)] diff --git a/tests/ui/rfcs/rfc-1445-restrict-constants-in-patterns/allow-hide-behind-indirect-unsafe-ptr-embedded.rs b/tests/ui/rfcs/rfc-1445-restrict-constants-in-patterns/allow-hide-behind-indirect-unsafe-ptr-embedded.rs index 56b7988e0e4..9595d00876b 100644 --- a/tests/ui/rfcs/rfc-1445-restrict-constants-in-patterns/allow-hide-behind-indirect-unsafe-ptr-embedded.rs +++ b/tests/ui/rfcs/rfc-1445-restrict-constants-in-patterns/allow-hide-behind-indirect-unsafe-ptr-embedded.rs @@ -1,7 +1,7 @@ // Test explores how `#[structral_match]` behaves in tandem with // `*const` and `*mut` pointers. -// run-pass +//@ run-pass #![warn(pointer_structural_match)] diff --git a/tests/ui/rfcs/rfc-1445-restrict-constants-in-patterns/allow-hide-behind-indirect-unsafe-ptr-param.rs b/tests/ui/rfcs/rfc-1445-restrict-constants-in-patterns/allow-hide-behind-indirect-unsafe-ptr-param.rs index 3ebe3225437..9dce827a57c 100644 --- a/tests/ui/rfcs/rfc-1445-restrict-constants-in-patterns/allow-hide-behind-indirect-unsafe-ptr-param.rs +++ b/tests/ui/rfcs/rfc-1445-restrict-constants-in-patterns/allow-hide-behind-indirect-unsafe-ptr-param.rs @@ -1,7 +1,7 @@ // Test explores how `#[structral_match]` behaves in tandem with // `*const` and `*mut` pointers. -// run-pass +//@ run-pass #![warn(pointer_structural_match)] diff --git a/tests/ui/rfcs/rfc-1445-restrict-constants-in-patterns/allow-use-behind-cousin-variant.rs b/tests/ui/rfcs/rfc-1445-restrict-constants-in-patterns/allow-use-behind-cousin-variant.rs index dca8aaef150..98bfda9bddb 100644 --- a/tests/ui/rfcs/rfc-1445-restrict-constants-in-patterns/allow-use-behind-cousin-variant.rs +++ b/tests/ui/rfcs/rfc-1445-restrict-constants-in-patterns/allow-use-behind-cousin-variant.rs @@ -6,7 +6,7 @@ // to its default, so that we will not issue a diangostic even if // rust-lang/rust#62614 remains an open issue. -// run-pass +//@ run-pass struct Sum(u32, u32); diff --git a/tests/ui/rfcs/rfc-1445-restrict-constants-in-patterns/cant-hide-behind-doubly-indirect-embedded.rs b/tests/ui/rfcs/rfc-1445-restrict-constants-in-patterns/cant-hide-behind-doubly-indirect-embedded.rs index 7a853631d43..b64fbd9d49a 100644 --- a/tests/ui/rfcs/rfc-1445-restrict-constants-in-patterns/cant-hide-behind-doubly-indirect-embedded.rs +++ b/tests/ui/rfcs/rfc-1445-restrict-constants-in-patterns/cant-hide-behind-doubly-indirect-embedded.rs @@ -5,7 +5,7 @@ // // See discussion on rust-lang/rust#62307 and rust-lang/rust#62339 #![warn(indirect_structural_match)] -// run-pass +//@ run-pass struct NoDerive(#[allow(dead_code)] i32); diff --git a/tests/ui/rfcs/rfc-1445-restrict-constants-in-patterns/cant-hide-behind-doubly-indirect-param.rs b/tests/ui/rfcs/rfc-1445-restrict-constants-in-patterns/cant-hide-behind-doubly-indirect-param.rs index 3093f227e6f..be37217a7d4 100644 --- a/tests/ui/rfcs/rfc-1445-restrict-constants-in-patterns/cant-hide-behind-doubly-indirect-param.rs +++ b/tests/ui/rfcs/rfc-1445-restrict-constants-in-patterns/cant-hide-behind-doubly-indirect-param.rs @@ -5,7 +5,7 @@ // // See discussion on rust-lang/rust#62307 and rust-lang/rust#62339 #![warn(indirect_structural_match)] -// run-pass +//@ run-pass struct NoDerive(#[allow(dead_code)] i32); diff --git a/tests/ui/rfcs/rfc-1445-restrict-constants-in-patterns/cant-hide-behind-indirect-struct-embedded.rs b/tests/ui/rfcs/rfc-1445-restrict-constants-in-patterns/cant-hide-behind-indirect-struct-embedded.rs index 2b6ec850241..e26234bd455 100644 --- a/tests/ui/rfcs/rfc-1445-restrict-constants-in-patterns/cant-hide-behind-indirect-struct-embedded.rs +++ b/tests/ui/rfcs/rfc-1445-restrict-constants-in-patterns/cant-hide-behind-indirect-struct-embedded.rs @@ -5,7 +5,7 @@ // // See discussion on rust-lang/rust#62307 and rust-lang/rust#62339 #![warn(indirect_structural_match)] -// run-pass +//@ run-pass struct NoDerive(#[allow(dead_code)] i32); diff --git a/tests/ui/rfcs/rfc-1445-restrict-constants-in-patterns/cant-hide-behind-indirect-struct-param.rs b/tests/ui/rfcs/rfc-1445-restrict-constants-in-patterns/cant-hide-behind-indirect-struct-param.rs index 5738d14d97b..729f411a021 100644 --- a/tests/ui/rfcs/rfc-1445-restrict-constants-in-patterns/cant-hide-behind-indirect-struct-param.rs +++ b/tests/ui/rfcs/rfc-1445-restrict-constants-in-patterns/cant-hide-behind-indirect-struct-param.rs @@ -5,7 +5,7 @@ // // See discussion on rust-lang/rust#62307 and rust-lang/rust#62339 #![warn(indirect_structural_match)] -// run-pass +//@ run-pass struct NoDerive(#[allow(dead_code)] i32); diff --git a/tests/ui/rfcs/rfc-1445-restrict-constants-in-patterns/feature-gate.rs b/tests/ui/rfcs/rfc-1445-restrict-constants-in-patterns/feature-gate.rs index 024226a0116..839e9085440 100644 --- a/tests/ui/rfcs/rfc-1445-restrict-constants-in-patterns/feature-gate.rs +++ b/tests/ui/rfcs/rfc-1445-restrict-constants-in-patterns/feature-gate.rs @@ -2,7 +2,7 @@ // and that if a feature gate is supplied, it permits the type to be // used in a match. -// revisions: with_gate no_gate +//@ revisions: with_gate no_gate // gate-test-structural_match diff --git a/tests/ui/rfcs/rfc-1445-restrict-constants-in-patterns/fn-ptr-is-structurally-matchable.rs b/tests/ui/rfcs/rfc-1445-restrict-constants-in-patterns/fn-ptr-is-structurally-matchable.rs index e591b2a93e1..25434e0050f 100644 --- a/tests/ui/rfcs/rfc-1445-restrict-constants-in-patterns/fn-ptr-is-structurally-matchable.rs +++ b/tests/ui/rfcs/rfc-1445-restrict-constants-in-patterns/fn-ptr-is-structurally-matchable.rs @@ -1,4 +1,4 @@ -// run-pass +//@ run-pass // This file checks that fn ptrs are considered structurally matchable. // See also rust-lang/rust#63479. diff --git a/tests/ui/rfcs/rfc-1445-restrict-constants-in-patterns/issue-62307-match-ref-ref-forbidden-without-eq.rs b/tests/ui/rfcs/rfc-1445-restrict-constants-in-patterns/issue-62307-match-ref-ref-forbidden-without-eq.rs index 374e5d5acd0..81618b3b791 100644 --- a/tests/ui/rfcs/rfc-1445-restrict-constants-in-patterns/issue-62307-match-ref-ref-forbidden-without-eq.rs +++ b/tests/ui/rfcs/rfc-1445-restrict-constants-in-patterns/issue-62307-match-ref-ref-forbidden-without-eq.rs @@ -11,7 +11,7 @@ // Issue 62307 pointed out a case where the structural-match checking // was too shallow. #![warn(indirect_structural_match)] -// run-pass +//@ run-pass #[derive(Debug)] struct B(i32); diff --git a/tests/ui/rfcs/rfc-1445-restrict-constants-in-patterns/issue-63479-match-fnptr.rs b/tests/ui/rfcs/rfc-1445-restrict-constants-in-patterns/issue-63479-match-fnptr.rs index b05b8c8da1f..634aaf8115f 100644 --- a/tests/ui/rfcs/rfc-1445-restrict-constants-in-patterns/issue-63479-match-fnptr.rs +++ b/tests/ui/rfcs/rfc-1445-restrict-constants-in-patterns/issue-63479-match-fnptr.rs @@ -1,4 +1,4 @@ -// run-pass +//@ run-pass // The actual regression test from #63479. (Including this because my // first draft at fn-ptr-is-structurally-matchable.rs failed to actually diff --git a/tests/ui/rfcs/rfc-1445-restrict-constants-in-patterns/match-empty-array-allowed-without-eq-issue-62336.rs b/tests/ui/rfcs/rfc-1445-restrict-constants-in-patterns/match-empty-array-allowed-without-eq-issue-62336.rs index 7ba0f3a9e8d..ad4e0d070da 100644 --- a/tests/ui/rfcs/rfc-1445-restrict-constants-in-patterns/match-empty-array-allowed-without-eq-issue-62336.rs +++ b/tests/ui/rfcs/rfc-1445-restrict-constants-in-patterns/match-empty-array-allowed-without-eq-issue-62336.rs @@ -4,7 +4,7 @@ // // See rust-lang/rust#62336. -// run-pass +//@ run-pass #[derive(PartialEq, Debug)] struct B(i32); diff --git a/tests/ui/rfcs/rfc-1445-restrict-constants-in-patterns/phantom-data-is-structurally-matchable.rs b/tests/ui/rfcs/rfc-1445-restrict-constants-in-patterns/phantom-data-is-structurally-matchable.rs index 50f91420ce2..5307f667792 100644 --- a/tests/ui/rfcs/rfc-1445-restrict-constants-in-patterns/phantom-data-is-structurally-matchable.rs +++ b/tests/ui/rfcs/rfc-1445-restrict-constants-in-patterns/phantom-data-is-structurally-matchable.rs @@ -1,4 +1,4 @@ -// run-pass +//@ run-pass // This file checks that `PhantomData` is considered structurally matchable. diff --git a/tests/ui/rfcs/rfc-1445-restrict-constants-in-patterns/rfc1445/eq-allows-match-on-ty-in-macro.rs b/tests/ui/rfcs/rfc-1445-restrict-constants-in-patterns/rfc1445/eq-allows-match-on-ty-in-macro.rs index 17174e22c74..7250da54c6c 100644 --- a/tests/ui/rfcs/rfc-1445-restrict-constants-in-patterns/rfc1445/eq-allows-match-on-ty-in-macro.rs +++ b/tests/ui/rfcs/rfc-1445-restrict-constants-in-patterns/rfc1445/eq-allows-match-on-ty-in-macro.rs @@ -1,4 +1,4 @@ -// run-pass +//@ run-pass #![allow(dead_code)] macro_rules! foo { diff --git a/tests/ui/rfcs/rfc-1445-restrict-constants-in-patterns/rfc1445/eq-allows-match.rs b/tests/ui/rfcs/rfc-1445-restrict-constants-in-patterns/rfc1445/eq-allows-match.rs index 405a69c94bf..b297ec1b4e2 100644 --- a/tests/ui/rfcs/rfc-1445-restrict-constants-in-patterns/rfc1445/eq-allows-match.rs +++ b/tests/ui/rfcs/rfc-1445-restrict-constants-in-patterns/rfc1445/eq-allows-match.rs @@ -1,4 +1,4 @@ -// run-pass +//@ run-pass #![allow(dead_code)] #[derive(PartialEq, Eq)] diff --git a/tests/ui/rfcs/rfc-1623-static/rfc1623.rs b/tests/ui/rfcs/rfc-1623-static/rfc1623.rs index adaf25c6bbf..d85b83284fd 100644 --- a/tests/ui/rfcs/rfc-1623-static/rfc1623.rs +++ b/tests/ui/rfcs/rfc-1623-static/rfc1623.rs @@ -1,4 +1,4 @@ -// run-pass +//@ run-pass #![allow(unused_variables)] #![allow(non_upper_case_globals)] diff --git a/tests/ui/rfcs/rfc-1717-dllimport/1717-dllimport/library-override.rs b/tests/ui/rfcs/rfc-1717-dllimport/1717-dllimport/library-override.rs index 014ccac31b7..e31516a6480 100644 --- a/tests/ui/rfcs/rfc-1717-dllimport/1717-dllimport/library-override.rs +++ b/tests/ui/rfcs/rfc-1717-dllimport/1717-dllimport/library-override.rs @@ -1,6 +1,6 @@ -// run-pass -// ignore-wasm32-bare no libc to test ffi with -// compile-flags: -lstatic=wronglibrary:rust_test_helpers +//@ run-pass +//@ ignore-wasm32-bare no libc to test ffi with +//@ compile-flags: -lstatic=wronglibrary:rust_test_helpers #[link(name = "wronglibrary", kind = "dylib")] extern "C" { diff --git a/tests/ui/rfcs/rfc-1717-dllimport/missing-link-attr.rs b/tests/ui/rfcs/rfc-1717-dllimport/missing-link-attr.rs index b46d85160d1..d54b428bf22 100644 --- a/tests/ui/rfcs/rfc-1717-dllimport/missing-link-attr.rs +++ b/tests/ui/rfcs/rfc-1717-dllimport/missing-link-attr.rs @@ -1,4 +1,4 @@ -// compile-flags: -l foo:bar -// error-pattern: renaming of the library `foo` was specified +//@ compile-flags: -l foo:bar +//@ error-pattern: renaming of the library `foo` was specified #![crate_type = "lib"] diff --git a/tests/ui/rfcs/rfc-1717-dllimport/multiple-renames.rs b/tests/ui/rfcs/rfc-1717-dllimport/multiple-renames.rs index 106f196b455..ec1a246245e 100644 --- a/tests/ui/rfcs/rfc-1717-dllimport/multiple-renames.rs +++ b/tests/ui/rfcs/rfc-1717-dllimport/multiple-renames.rs @@ -1,5 +1,5 @@ -// compile-flags: -l foo:bar -l foo:baz -// error-pattern: multiple renamings were specified for library +//@ compile-flags: -l foo:bar -l foo:baz +//@ error-pattern: multiple renamings were specified for library #![crate_type = "lib"] diff --git a/tests/ui/rfcs/rfc-1717-dllimport/rename-modifiers.rs b/tests/ui/rfcs/rfc-1717-dllimport/rename-modifiers.rs index 30f4db7180e..2a13d22e22a 100644 --- a/tests/ui/rfcs/rfc-1717-dllimport/rename-modifiers.rs +++ b/tests/ui/rfcs/rfc-1717-dllimport/rename-modifiers.rs @@ -1,5 +1,5 @@ -// compile-flags: -l dylib=foo:bar -// error-pattern: overriding linking modifiers from command line is not supported +//@ compile-flags: -l dylib=foo:bar +//@ error-pattern: overriding linking modifiers from command line is not supported #![feature(native_link_modifiers_as_needed)] diff --git a/tests/ui/rfcs/rfc-1717-dllimport/rename-to-empty.rs b/tests/ui/rfcs/rfc-1717-dllimport/rename-to-empty.rs index 9356c412992..39205a11dd7 100644 --- a/tests/ui/rfcs/rfc-1717-dllimport/rename-to-empty.rs +++ b/tests/ui/rfcs/rfc-1717-dllimport/rename-to-empty.rs @@ -1,5 +1,5 @@ -// compile-flags: -l foo: -// error-pattern: an empty renaming target was specified for library +//@ compile-flags: -l foo: +//@ error-pattern: an empty renaming target was specified for library #![crate_type = "lib"] diff --git a/tests/ui/rfcs/rfc-1789-as-cell/from-mut.rs b/tests/ui/rfcs/rfc-1789-as-cell/from-mut.rs index 329fadb150f..d3b441fbe88 100644 --- a/tests/ui/rfcs/rfc-1789-as-cell/from-mut.rs +++ b/tests/ui/rfcs/rfc-1789-as-cell/from-mut.rs @@ -1,4 +1,4 @@ -// run-pass +//@ run-pass #![feature(as_array_of_cells)] diff --git a/tests/ui/rfcs/rfc-1857-stabilize-drop-order/drop-order.rs b/tests/ui/rfcs/rfc-1857-stabilize-drop-order/drop-order.rs index 4c4816c2fbc..d5f6628e0db 100644 --- a/tests/ui/rfcs/rfc-1857-stabilize-drop-order/drop-order.rs +++ b/tests/ui/rfcs/rfc-1857-stabilize-drop-order/drop-order.rs @@ -1,5 +1,5 @@ -// run-pass -// needs-unwind +//@ run-pass +//@ needs-unwind #![allow(dead_code, unreachable_code)] diff --git a/tests/ui/rfcs/rfc-1937-termination-trait/termination-trait-for-box-dyn-error-err.rs b/tests/ui/rfcs/rfc-1937-termination-trait/termination-trait-for-box-dyn-error-err.rs index 10dc6115dcb..fb6718e55b2 100644 --- a/tests/ui/rfcs/rfc-1937-termination-trait/termination-trait-for-box-dyn-error-err.rs +++ b/tests/ui/rfcs/rfc-1937-termination-trait/termination-trait-for-box-dyn-error-err.rs @@ -1,7 +1,7 @@ -// run-fail -// error-pattern:returned Box from main() -// failure-status: 1 -// ignore-emscripten no processes +//@ run-fail +//@ error-pattern:returned Box from main() +//@ failure-status: 1 +//@ ignore-emscripten no processes use std::error::Error; use std::io; diff --git a/tests/ui/rfcs/rfc-1937-termination-trait/termination-trait-for-box-dyn-error-ok.rs b/tests/ui/rfcs/rfc-1937-termination-trait/termination-trait-for-box-dyn-error-ok.rs index e98582cbce3..fd343eaeea9 100644 --- a/tests/ui/rfcs/rfc-1937-termination-trait/termination-trait-for-box-dyn-error-ok.rs +++ b/tests/ui/rfcs/rfc-1937-termination-trait/termination-trait-for-box-dyn-error-ok.rs @@ -1,4 +1,4 @@ -// run-pass +//@ run-pass use std::error::Error; fn main() -> Result<(), Box> { diff --git a/tests/ui/rfcs/rfc-1937-termination-trait/termination-trait-for-empty.rs b/tests/ui/rfcs/rfc-1937-termination-trait/termination-trait-for-empty.rs index bac695d4e79..016bccc056c 100644 --- a/tests/ui/rfcs/rfc-1937-termination-trait/termination-trait-for-empty.rs +++ b/tests/ui/rfcs/rfc-1937-termination-trait/termination-trait-for-empty.rs @@ -1,2 +1,2 @@ -// run-pass +//@ run-pass fn main() {} diff --git a/tests/ui/rfcs/rfc-1937-termination-trait/termination-trait-for-exitcode.rs b/tests/ui/rfcs/rfc-1937-termination-trait/termination-trait-for-exitcode.rs index 6d4c1562053..836370329b6 100644 --- a/tests/ui/rfcs/rfc-1937-termination-trait/termination-trait-for-exitcode.rs +++ b/tests/ui/rfcs/rfc-1937-termination-trait/termination-trait-for-exitcode.rs @@ -1,4 +1,4 @@ -// run-pass +//@ run-pass use std::process::ExitCode; diff --git a/tests/ui/rfcs/rfc-1937-termination-trait/termination-trait-for-impl-termination.rs b/tests/ui/rfcs/rfc-1937-termination-trait/termination-trait-for-impl-termination.rs index c06a135dcbc..f41684aaa98 100644 --- a/tests/ui/rfcs/rfc-1937-termination-trait/termination-trait-for-impl-termination.rs +++ b/tests/ui/rfcs/rfc-1937-termination-trait/termination-trait-for-impl-termination.rs @@ -1,3 +1,3 @@ -// run-pass +//@ run-pass fn main() -> impl std::process::Termination { } diff --git a/tests/ui/rfcs/rfc-1937-termination-trait/termination-trait-for-never.rs b/tests/ui/rfcs/rfc-1937-termination-trait/termination-trait-for-never.rs index faf2526c8d8..91be3afbe22 100644 --- a/tests/ui/rfcs/rfc-1937-termination-trait/termination-trait-for-never.rs +++ b/tests/ui/rfcs/rfc-1937-termination-trait/termination-trait-for-never.rs @@ -1,6 +1,6 @@ -// run-fail -// error-pattern:oh, dear -// ignore-emscripten no processes +//@ run-fail +//@ error-pattern:oh, dear +//@ ignore-emscripten no processes fn main() -> ! { panic!("oh, dear"); diff --git a/tests/ui/rfcs/rfc-1937-termination-trait/termination-trait-for-result-box-error_err.rs b/tests/ui/rfcs/rfc-1937-termination-trait/termination-trait-for-result-box-error_err.rs index 6a625fb05e8..f1d972b3c55 100644 --- a/tests/ui/rfcs/rfc-1937-termination-trait/termination-trait-for-result-box-error_err.rs +++ b/tests/ui/rfcs/rfc-1937-termination-trait/termination-trait-for-result-box-error_err.rs @@ -1,7 +1,7 @@ -// run-fail -// error-pattern:returned Box from main() -// failure-status: 1 -// ignore-emscripten no processes +//@ run-fail +//@ error-pattern:returned Box from main() +//@ failure-status: 1 +//@ ignore-emscripten no processes use std::io::{Error, ErrorKind}; diff --git a/tests/ui/rfcs/rfc-1937-termination-trait/termination-trait-for-result-box-error_ok.rs b/tests/ui/rfcs/rfc-1937-termination-trait/termination-trait-for-result-box-error_ok.rs index b0e932e1fe0..8a5b962e681 100644 --- a/tests/ui/rfcs/rfc-1937-termination-trait/termination-trait-for-result-box-error_ok.rs +++ b/tests/ui/rfcs/rfc-1937-termination-trait/termination-trait-for-result-box-error_ok.rs @@ -1,4 +1,4 @@ -// run-pass +//@ run-pass use std::io::Error; fn main() -> Result<(), Box> { diff --git a/tests/ui/rfcs/rfc-1937-termination-trait/termination-trait-for-result.rs b/tests/ui/rfcs/rfc-1937-termination-trait/termination-trait-for-result.rs index 30f36c24489..ce29a8239e8 100644 --- a/tests/ui/rfcs/rfc-1937-termination-trait/termination-trait-for-result.rs +++ b/tests/ui/rfcs/rfc-1937-termination-trait/termination-trait-for-result.rs @@ -1,4 +1,4 @@ -// run-pass +//@ run-pass use std::io::Error; fn main() -> Result<(), Error> { diff --git a/tests/ui/rfcs/rfc-1937-termination-trait/termination-trait-for-str-err.rs b/tests/ui/rfcs/rfc-1937-termination-trait/termination-trait-for-str-err.rs index 94f16c6fd02..acf3da2d55f 100644 --- a/tests/ui/rfcs/rfc-1937-termination-trait/termination-trait-for-str-err.rs +++ b/tests/ui/rfcs/rfc-1937-termination-trait/termination-trait-for-str-err.rs @@ -1,7 +1,7 @@ -// run-fail -// error-pattern: An error message for you -// failure-status: 1 -// ignore-emscripten no processes +//@ run-fail +//@ error-pattern: An error message for you +//@ failure-status: 1 +//@ ignore-emscripten no processes fn main() -> Result<(), &'static str> { Err("An error message for you") diff --git a/tests/ui/rfcs/rfc-1937-termination-trait/termination-trait-for-str-ok.rs b/tests/ui/rfcs/rfc-1937-termination-trait/termination-trait-for-str-ok.rs index f0591c38c00..829e4f8ee44 100644 --- a/tests/ui/rfcs/rfc-1937-termination-trait/termination-trait-for-str-ok.rs +++ b/tests/ui/rfcs/rfc-1937-termination-trait/termination-trait-for-str-ok.rs @@ -1,4 +1,4 @@ -// run-pass +//@ run-pass fn main() -> Result<(), &'static str> { Ok(()) } diff --git a/tests/ui/rfcs/rfc-1937-termination-trait/termination-trait-in-test-should-panic.rs b/tests/ui/rfcs/rfc-1937-termination-trait/termination-trait-in-test-should-panic.rs index 96808a3ed91..9ede4031bb8 100644 --- a/tests/ui/rfcs/rfc-1937-termination-trait/termination-trait-in-test-should-panic.rs +++ b/tests/ui/rfcs/rfc-1937-termination-trait/termination-trait-in-test-should-panic.rs @@ -1,4 +1,4 @@ -// compile-flags: --test +//@ compile-flags: --test #![feature(test)] diff --git a/tests/ui/rfcs/rfc-1937-termination-trait/termination-trait-in-test.rs b/tests/ui/rfcs/rfc-1937-termination-trait/termination-trait-in-test.rs index 43888ceceda..7de55d5f675 100644 --- a/tests/ui/rfcs/rfc-1937-termination-trait/termination-trait-in-test.rs +++ b/tests/ui/rfcs/rfc-1937-termination-trait/termination-trait-in-test.rs @@ -1,6 +1,6 @@ -// compile-flags: --test -// run-pass -// needs-unwind +//@ compile-flags: --test +//@ run-pass +//@ needs-unwind #![feature(test)] diff --git a/tests/ui/rfcs/rfc-1937-termination-trait/termination-trait-test-wrong-type.rs b/tests/ui/rfcs/rfc-1937-termination-trait/termination-trait-test-wrong-type.rs index 193a523aed2..7c9a4167bfb 100644 --- a/tests/ui/rfcs/rfc-1937-termination-trait/termination-trait-test-wrong-type.rs +++ b/tests/ui/rfcs/rfc-1937-termination-trait/termination-trait-test-wrong-type.rs @@ -1,4 +1,4 @@ -// compile-flags: --test +//@ compile-flags: --test use std::num::ParseFloatError; diff --git a/tests/ui/rfcs/rfc-2005-default-binding-mode/box.rs b/tests/ui/rfcs/rfc-2005-default-binding-mode/box.rs index 0d1cded36b6..de8afd95a84 100644 --- a/tests/ui/rfcs/rfc-2005-default-binding-mode/box.rs +++ b/tests/ui/rfcs/rfc-2005-default-binding-mode/box.rs @@ -1,4 +1,4 @@ -// run-pass +//@ run-pass #![allow(unreachable_patterns)] #![feature(box_patterns)] diff --git a/tests/ui/rfcs/rfc-2005-default-binding-mode/constref.rs b/tests/ui/rfcs/rfc-2005-default-binding-mode/constref.rs index d5bca6a2474..4b9fe71a88f 100644 --- a/tests/ui/rfcs/rfc-2005-default-binding-mode/constref.rs +++ b/tests/ui/rfcs/rfc-2005-default-binding-mode/constref.rs @@ -1,4 +1,4 @@ -// run-pass +//@ run-pass const CONST_REF: &[u8; 3] = b"foo"; trait Foo { diff --git a/tests/ui/rfcs/rfc-2005-default-binding-mode/enum-ok.rs b/tests/ui/rfcs/rfc-2005-default-binding-mode/enum-ok.rs index 52fbb90ed54..24f0867d095 100644 --- a/tests/ui/rfcs/rfc-2005-default-binding-mode/enum-ok.rs +++ b/tests/ui/rfcs/rfc-2005-default-binding-mode/enum-ok.rs @@ -1,4 +1,4 @@ -// run-pass +//@ run-pass enum Wrapper { Wrap(i32), } diff --git a/tests/ui/rfcs/rfc-2005-default-binding-mode/for-ok.rs b/tests/ui/rfcs/rfc-2005-default-binding-mode/for-ok.rs index a5a24a80634..56c881826af 100644 --- a/tests/ui/rfcs/rfc-2005-default-binding-mode/for-ok.rs +++ b/tests/ui/rfcs/rfc-2005-default-binding-mode/for-ok.rs @@ -1,4 +1,4 @@ -// run-pass +//@ run-pass pub fn main() { let mut tups = vec![(0u8, 1u8)]; diff --git a/tests/ui/rfcs/rfc-2005-default-binding-mode/general.rs b/tests/ui/rfcs/rfc-2005-default-binding-mode/general.rs index 0207f607be8..3090f68c72b 100644 --- a/tests/ui/rfcs/rfc-2005-default-binding-mode/general.rs +++ b/tests/ui/rfcs/rfc-2005-default-binding-mode/general.rs @@ -1,4 +1,4 @@ -// run-pass +//@ run-pass #![allow(unused_variables)] fn some_or_wildcard(r: &Option, b: &i32) { let _: &i32 = match r { diff --git a/tests/ui/rfcs/rfc-2005-default-binding-mode/lit-ok.rs b/tests/ui/rfcs/rfc-2005-default-binding-mode/lit-ok.rs index 9379753598e..e267f858eaa 100644 --- a/tests/ui/rfcs/rfc-2005-default-binding-mode/lit-ok.rs +++ b/tests/ui/rfcs/rfc-2005-default-binding-mode/lit-ok.rs @@ -1,4 +1,4 @@ -// run-pass +//@ run-pass #![allow(dead_code)] fn with_u8() { let s = 5u8; diff --git a/tests/ui/rfcs/rfc-2005-default-binding-mode/range.rs b/tests/ui/rfcs/rfc-2005-default-binding-mode/range.rs index f8abd1b96d8..8795adcdd42 100644 --- a/tests/ui/rfcs/rfc-2005-default-binding-mode/range.rs +++ b/tests/ui/rfcs/rfc-2005-default-binding-mode/range.rs @@ -1,4 +1,4 @@ -// run-pass +//@ run-pass pub fn main() { let i = 5; match &&&&i { diff --git a/tests/ui/rfcs/rfc-2005-default-binding-mode/ref-region.rs b/tests/ui/rfcs/rfc-2005-default-binding-mode/ref-region.rs index b74e45c9328..bc3e790aaae 100644 --- a/tests/ui/rfcs/rfc-2005-default-binding-mode/ref-region.rs +++ b/tests/ui/rfcs/rfc-2005-default-binding-mode/ref-region.rs @@ -1,4 +1,4 @@ -// run-pass +//@ run-pass fn foo<'a, 'b>(x: &'a &'b Option) -> &'a u32 { let x: &'a &'a Option = x; match x { diff --git a/tests/ui/rfcs/rfc-2005-default-binding-mode/reset-mode.rs b/tests/ui/rfcs/rfc-2005-default-binding-mode/reset-mode.rs index 3b9d07610d2..1d9bd4d16fc 100644 --- a/tests/ui/rfcs/rfc-2005-default-binding-mode/reset-mode.rs +++ b/tests/ui/rfcs/rfc-2005-default-binding-mode/reset-mode.rs @@ -1,4 +1,4 @@ -// run-pass +//@ run-pass // Test that we "reset" the mode as we pass through a `&` pattern. // // cc #46688 diff --git a/tests/ui/rfcs/rfc-2005-default-binding-mode/slice-ok.rs b/tests/ui/rfcs/rfc-2005-default-binding-mode/slice-ok.rs index 33229a205f4..c0b036b1c4d 100644 --- a/tests/ui/rfcs/rfc-2005-default-binding-mode/slice-ok.rs +++ b/tests/ui/rfcs/rfc-2005-default-binding-mode/slice-ok.rs @@ -1,4 +1,4 @@ -// run-pass +//@ run-pass fn slice_pat() { let sl: &[u8] = b"foo"; diff --git a/tests/ui/rfcs/rfc-2005-default-binding-mode/struct.rs b/tests/ui/rfcs/rfc-2005-default-binding-mode/struct.rs index 5a00e5b6823..8585d688a08 100644 --- a/tests/ui/rfcs/rfc-2005-default-binding-mode/struct.rs +++ b/tests/ui/rfcs/rfc-2005-default-binding-mode/struct.rs @@ -1,4 +1,4 @@ -// run-pass +//@ run-pass #[derive(Debug, PartialEq)] struct Foo { x: u8, diff --git a/tests/ui/rfcs/rfc-2005-default-binding-mode/tuple-struct.rs b/tests/ui/rfcs/rfc-2005-default-binding-mode/tuple-struct.rs index 0cf9ba1b4ca..aadc750e14e 100644 --- a/tests/ui/rfcs/rfc-2005-default-binding-mode/tuple-struct.rs +++ b/tests/ui/rfcs/rfc-2005-default-binding-mode/tuple-struct.rs @@ -1,4 +1,4 @@ -// run-pass +//@ run-pass #![allow(dead_code)] enum Foo { Bar(Option, (), (), Vec), diff --git a/tests/ui/rfcs/rfc-2005-default-binding-mode/tuple.rs b/tests/ui/rfcs/rfc-2005-default-binding-mode/tuple.rs index 4c22aa2d718..9ad95e274b7 100644 --- a/tests/ui/rfcs/rfc-2005-default-binding-mode/tuple.rs +++ b/tests/ui/rfcs/rfc-2005-default-binding-mode/tuple.rs @@ -1,4 +1,4 @@ -// run-pass +//@ run-pass pub fn main() { let foo = (Some(1), (), (), vec![2, 3]); diff --git a/tests/ui/rfcs/rfc-2008-non-exhaustive/borrowck-exhaustive.rs b/tests/ui/rfcs/rfc-2008-non-exhaustive/borrowck-exhaustive.rs index b9ff24c7624..b2ebab382bd 100644 --- a/tests/ui/rfcs/rfc-2008-non-exhaustive/borrowck-exhaustive.rs +++ b/tests/ui/rfcs/rfc-2008-non-exhaustive/borrowck-exhaustive.rs @@ -1,11 +1,11 @@ // Test that the borrow checker doesn't consider checking an exhaustive pattern // as an access. -// check-pass +//@ check-pass #![allow(dropping_references)] -// aux-build:monovariants.rs +//@ aux-build:monovariants.rs extern crate monovariants; use monovariants::ExhaustiveMonovariant; diff --git a/tests/ui/rfcs/rfc-2008-non-exhaustive/borrowck-non-exhaustive.rs b/tests/ui/rfcs/rfc-2008-non-exhaustive/borrowck-non-exhaustive.rs index 2ad92b79444..d616f5e5e89 100644 --- a/tests/ui/rfcs/rfc-2008-non-exhaustive/borrowck-non-exhaustive.rs +++ b/tests/ui/rfcs/rfc-2008-non-exhaustive/borrowck-non-exhaustive.rs @@ -1,7 +1,7 @@ // Test that the borrow checker considers `#[non_exhaustive]` when checking // whether a match contains a discriminant read. -// aux-build:monovariants.rs +//@ aux-build:monovariants.rs extern crate monovariants; use monovariants::NonExhaustiveMonovariant; diff --git a/tests/ui/rfcs/rfc-2008-non-exhaustive/enum-as-cast.rs b/tests/ui/rfcs/rfc-2008-non-exhaustive/enum-as-cast.rs index 5dce8180f59..fccfe53f40d 100644 --- a/tests/ui/rfcs/rfc-2008-non-exhaustive/enum-as-cast.rs +++ b/tests/ui/rfcs/rfc-2008-non-exhaustive/enum-as-cast.rs @@ -1,4 +1,4 @@ -// aux-build:enums.rs +//@ aux-build:enums.rs extern crate enums; diff --git a/tests/ui/rfcs/rfc-2008-non-exhaustive/enum.rs b/tests/ui/rfcs/rfc-2008-non-exhaustive/enum.rs index 9d2855f5c61..ad3a90ddeb5 100644 --- a/tests/ui/rfcs/rfc-2008-non-exhaustive/enum.rs +++ b/tests/ui/rfcs/rfc-2008-non-exhaustive/enum.rs @@ -1,4 +1,4 @@ -// aux-build:enums.rs +//@ aux-build:enums.rs extern crate enums; use enums::{EmptyNonExhaustiveEnum, NonExhaustiveEnum}; diff --git a/tests/ui/rfcs/rfc-2008-non-exhaustive/enum_same_crate.rs b/tests/ui/rfcs/rfc-2008-non-exhaustive/enum_same_crate.rs index 54e42917f52..2a89eefd461 100644 --- a/tests/ui/rfcs/rfc-2008-non-exhaustive/enum_same_crate.rs +++ b/tests/ui/rfcs/rfc-2008-non-exhaustive/enum_same_crate.rs @@ -1,4 +1,4 @@ -// run-pass +//@ run-pass #[non_exhaustive] pub enum NonExhaustiveEnum { diff --git a/tests/ui/rfcs/rfc-2008-non-exhaustive/improper_ctypes/extern_crate_improper.rs b/tests/ui/rfcs/rfc-2008-non-exhaustive/improper_ctypes/extern_crate_improper.rs index 15c0c695fca..7a9b465bb56 100644 --- a/tests/ui/rfcs/rfc-2008-non-exhaustive/improper_ctypes/extern_crate_improper.rs +++ b/tests/ui/rfcs/rfc-2008-non-exhaustive/improper_ctypes/extern_crate_improper.rs @@ -1,4 +1,4 @@ -// aux-build:types.rs +//@ aux-build:types.rs #![deny(improper_ctypes)] extern crate types; diff --git a/tests/ui/rfcs/rfc-2008-non-exhaustive/improper_ctypes/same_crate_proper.rs b/tests/ui/rfcs/rfc-2008-non-exhaustive/improper_ctypes/same_crate_proper.rs index fe4ae345d85..cf5ab5123f6 100644 --- a/tests/ui/rfcs/rfc-2008-non-exhaustive/improper_ctypes/same_crate_proper.rs +++ b/tests/ui/rfcs/rfc-2008-non-exhaustive/improper_ctypes/same_crate_proper.rs @@ -1,4 +1,4 @@ -// check-pass +//@ check-pass #![deny(improper_ctypes)] // This test checks that non-exhaustive types with `#[repr(C)]` are considered proper within diff --git a/tests/ui/rfcs/rfc-2008-non-exhaustive/omitted-patterns-dont-lint-on-arm.rs b/tests/ui/rfcs/rfc-2008-non-exhaustive/omitted-patterns-dont-lint-on-arm.rs index 33f9f56a5bb..6a76db9b1d6 100644 --- a/tests/ui/rfcs/rfc-2008-non-exhaustive/omitted-patterns-dont-lint-on-arm.rs +++ b/tests/ui/rfcs/rfc-2008-non-exhaustive/omitted-patterns-dont-lint-on-arm.rs @@ -1,9 +1,9 @@ -// revisions: normal lint +//@ revisions: normal lint // Test that putting the lint level on a match arm emits a warning, as this was previously // meaningful and is no longer. #![feature(non_exhaustive_omitted_patterns_lint)] -// aux-build:enums.rs +//@ aux-build:enums.rs extern crate enums; use enums::NonExhaustiveEnum; diff --git a/tests/ui/rfcs/rfc-2008-non-exhaustive/omitted-patterns.rs b/tests/ui/rfcs/rfc-2008-non-exhaustive/omitted-patterns.rs index a6c1dc53f8b..5809e56fb7b 100644 --- a/tests/ui/rfcs/rfc-2008-non-exhaustive/omitted-patterns.rs +++ b/tests/ui/rfcs/rfc-2008-non-exhaustive/omitted-patterns.rs @@ -3,11 +3,11 @@ #![feature(non_exhaustive_omitted_patterns_lint, unstable_test_feature)] #![deny(unreachable_patterns)] -// aux-build:enums.rs +//@ aux-build:enums.rs extern crate enums; -// aux-build:unstable.rs +//@ aux-build:unstable.rs extern crate unstable; -// aux-build:structs.rs +//@ aux-build:structs.rs extern crate structs; use enums::{ diff --git a/tests/ui/rfcs/rfc-2008-non-exhaustive/stable-omitted-patterns.rs b/tests/ui/rfcs/rfc-2008-non-exhaustive/stable-omitted-patterns.rs index 1828fdef901..6d3072f3ddd 100644 --- a/tests/ui/rfcs/rfc-2008-non-exhaustive/stable-omitted-patterns.rs +++ b/tests/ui/rfcs/rfc-2008-non-exhaustive/stable-omitted-patterns.rs @@ -3,7 +3,7 @@ #![feature(non_exhaustive_omitted_patterns_lint)] -// aux-build:unstable.rs +//@ aux-build:unstable.rs extern crate unstable; use unstable::{OnlyUnstableEnum, OnlyUnstableStruct, UnstableEnum, UnstableStruct}; diff --git a/tests/ui/rfcs/rfc-2008-non-exhaustive/struct.rs b/tests/ui/rfcs/rfc-2008-non-exhaustive/struct.rs index 07e093c152d..b3953c2e8d0 100644 --- a/tests/ui/rfcs/rfc-2008-non-exhaustive/struct.rs +++ b/tests/ui/rfcs/rfc-2008-non-exhaustive/struct.rs @@ -1,4 +1,4 @@ -// aux-build:structs.rs +//@ aux-build:structs.rs extern crate structs; use structs::{NormalStruct, UnitStruct, TupleStruct, FunctionalRecord}; diff --git a/tests/ui/rfcs/rfc-2008-non-exhaustive/structs_same_crate.rs b/tests/ui/rfcs/rfc-2008-non-exhaustive/structs_same_crate.rs index 5f76b0cb2f4..9982e88874c 100644 --- a/tests/ui/rfcs/rfc-2008-non-exhaustive/structs_same_crate.rs +++ b/tests/ui/rfcs/rfc-2008-non-exhaustive/structs_same_crate.rs @@ -1,4 +1,4 @@ -// run-pass +//@ run-pass #![allow(unused_variables)] diff --git a/tests/ui/rfcs/rfc-2008-non-exhaustive/uninhabited/coercions.rs b/tests/ui/rfcs/rfc-2008-non-exhaustive/uninhabited/coercions.rs index 80b9dc4c1c3..4804d34a920 100644 --- a/tests/ui/rfcs/rfc-2008-non-exhaustive/uninhabited/coercions.rs +++ b/tests/ui/rfcs/rfc-2008-non-exhaustive/uninhabited/coercions.rs @@ -1,4 +1,4 @@ -// aux-build:uninhabited.rs +//@ aux-build:uninhabited.rs #![feature(never_type)] extern crate uninhabited; diff --git a/tests/ui/rfcs/rfc-2008-non-exhaustive/uninhabited/indirect_match.rs b/tests/ui/rfcs/rfc-2008-non-exhaustive/uninhabited/indirect_match.rs index 98a7fdbc504..c7a7c927c0c 100644 --- a/tests/ui/rfcs/rfc-2008-non-exhaustive/uninhabited/indirect_match.rs +++ b/tests/ui/rfcs/rfc-2008-non-exhaustive/uninhabited/indirect_match.rs @@ -1,4 +1,4 @@ -// aux-build:uninhabited.rs +//@ aux-build:uninhabited.rs #![feature(never_type)] extern crate uninhabited; diff --git a/tests/ui/rfcs/rfc-2008-non-exhaustive/uninhabited/indirect_match_with_exhaustive_patterns.rs b/tests/ui/rfcs/rfc-2008-non-exhaustive/uninhabited/indirect_match_with_exhaustive_patterns.rs index be86519ecb1..b4c26ed910a 100644 --- a/tests/ui/rfcs/rfc-2008-non-exhaustive/uninhabited/indirect_match_with_exhaustive_patterns.rs +++ b/tests/ui/rfcs/rfc-2008-non-exhaustive/uninhabited/indirect_match_with_exhaustive_patterns.rs @@ -1,4 +1,4 @@ -// aux-build:uninhabited.rs +//@ aux-build:uninhabited.rs #![deny(unreachable_patterns)] #![feature(exhaustive_patterns)] #![feature(never_type)] diff --git a/tests/ui/rfcs/rfc-2008-non-exhaustive/uninhabited/indirect_match_with_exhaustive_patterns_same_crate.rs b/tests/ui/rfcs/rfc-2008-non-exhaustive/uninhabited/indirect_match_with_exhaustive_patterns_same_crate.rs index 60289aa7803..246443f029f 100644 --- a/tests/ui/rfcs/rfc-2008-non-exhaustive/uninhabited/indirect_match_with_exhaustive_patterns_same_crate.rs +++ b/tests/ui/rfcs/rfc-2008-non-exhaustive/uninhabited/indirect_match_with_exhaustive_patterns_same_crate.rs @@ -1,4 +1,4 @@ -// check-pass +//@ check-pass #![deny(unreachable_patterns)] #![feature(exhaustive_patterns)] diff --git a/tests/ui/rfcs/rfc-2008-non-exhaustive/uninhabited/issue-65157-repeated-match-arm.rs b/tests/ui/rfcs/rfc-2008-non-exhaustive/uninhabited/issue-65157-repeated-match-arm.rs index 230ac75298e..fd77fab8738 100644 --- a/tests/ui/rfcs/rfc-2008-non-exhaustive/uninhabited/issue-65157-repeated-match-arm.rs +++ b/tests/ui/rfcs/rfc-2008-non-exhaustive/uninhabited/issue-65157-repeated-match-arm.rs @@ -1,4 +1,4 @@ -// aux-build:uninhabited.rs +//@ aux-build:uninhabited.rs #![deny(unreachable_patterns)] #![feature(never_type)] diff --git a/tests/ui/rfcs/rfc-2008-non-exhaustive/uninhabited/match.rs b/tests/ui/rfcs/rfc-2008-non-exhaustive/uninhabited/match.rs index e54098d4d48..c330f3aa05c 100644 --- a/tests/ui/rfcs/rfc-2008-non-exhaustive/uninhabited/match.rs +++ b/tests/ui/rfcs/rfc-2008-non-exhaustive/uninhabited/match.rs @@ -1,4 +1,4 @@ -// aux-build:uninhabited.rs +//@ aux-build:uninhabited.rs #![feature(never_type)] extern crate uninhabited; diff --git a/tests/ui/rfcs/rfc-2008-non-exhaustive/uninhabited/match_with_exhaustive_patterns.rs b/tests/ui/rfcs/rfc-2008-non-exhaustive/uninhabited/match_with_exhaustive_patterns.rs index 900dfff652e..22cffc537bd 100644 --- a/tests/ui/rfcs/rfc-2008-non-exhaustive/uninhabited/match_with_exhaustive_patterns.rs +++ b/tests/ui/rfcs/rfc-2008-non-exhaustive/uninhabited/match_with_exhaustive_patterns.rs @@ -1,4 +1,4 @@ -// aux-build:uninhabited.rs +//@ aux-build:uninhabited.rs #![deny(unreachable_patterns)] #![feature(exhaustive_patterns)] #![feature(never_type)] diff --git a/tests/ui/rfcs/rfc-2008-non-exhaustive/uninhabited/match_with_exhaustive_patterns_same_crate.rs b/tests/ui/rfcs/rfc-2008-non-exhaustive/uninhabited/match_with_exhaustive_patterns_same_crate.rs index de5530485f3..ac346bc8361 100644 --- a/tests/ui/rfcs/rfc-2008-non-exhaustive/uninhabited/match_with_exhaustive_patterns_same_crate.rs +++ b/tests/ui/rfcs/rfc-2008-non-exhaustive/uninhabited/match_with_exhaustive_patterns_same_crate.rs @@ -1,4 +1,4 @@ -// check-pass +//@ check-pass #![deny(unreachable_patterns)] #![feature(exhaustive_patterns)] diff --git a/tests/ui/rfcs/rfc-2008-non-exhaustive/uninhabited/patterns.rs b/tests/ui/rfcs/rfc-2008-non-exhaustive/uninhabited/patterns.rs index 221b5cf6bfa..21aa562365a 100644 --- a/tests/ui/rfcs/rfc-2008-non-exhaustive/uninhabited/patterns.rs +++ b/tests/ui/rfcs/rfc-2008-non-exhaustive/uninhabited/patterns.rs @@ -1,5 +1,5 @@ -// aux-build:uninhabited.rs -// build-pass (FIXME(62277): could be check-pass?) +//@ aux-build:uninhabited.rs +//@ build-pass (FIXME(62277): could be check-pass?) #![deny(unreachable_patterns)] #![feature(exhaustive_patterns)] diff --git a/tests/ui/rfcs/rfc-2008-non-exhaustive/variant.rs b/tests/ui/rfcs/rfc-2008-non-exhaustive/variant.rs index bc346aea51c..fb9f8603e75 100644 --- a/tests/ui/rfcs/rfc-2008-non-exhaustive/variant.rs +++ b/tests/ui/rfcs/rfc-2008-non-exhaustive/variant.rs @@ -1,4 +1,4 @@ -// aux-build:variants.rs +//@ aux-build:variants.rs extern crate variants; diff --git a/tests/ui/rfcs/rfc-2008-non-exhaustive/variants_fictive_visibility.rs b/tests/ui/rfcs/rfc-2008-non-exhaustive/variants_fictive_visibility.rs index dacaf489a90..0a18b0d6de5 100644 --- a/tests/ui/rfcs/rfc-2008-non-exhaustive/variants_fictive_visibility.rs +++ b/tests/ui/rfcs/rfc-2008-non-exhaustive/variants_fictive_visibility.rs @@ -1,5 +1,5 @@ -// build-pass (FIXME(62277): could be check-pass?) -// aux-build:variants.rs +//@ build-pass (FIXME(62277): could be check-pass?) +//@ aux-build:variants.rs extern crate variants; diff --git a/tests/ui/rfcs/rfc-2008-non-exhaustive/variants_same_crate.rs b/tests/ui/rfcs/rfc-2008-non-exhaustive/variants_same_crate.rs index 5f2816ec621..7630f2753d9 100644 --- a/tests/ui/rfcs/rfc-2008-non-exhaustive/variants_same_crate.rs +++ b/tests/ui/rfcs/rfc-2008-non-exhaustive/variants_same_crate.rs @@ -1,4 +1,4 @@ -// run-pass +//@ run-pass pub enum NonExhaustiveVariants { #[non_exhaustive] Unit, diff --git a/tests/ui/rfcs/rfc-2027-object-safe-for-dispatch/downcast-unsafe-trait-objects.rs b/tests/ui/rfcs/rfc-2027-object-safe-for-dispatch/downcast-unsafe-trait-objects.rs index fa04f4b12d5..d4337dcb165 100644 --- a/tests/ui/rfcs/rfc-2027-object-safe-for-dispatch/downcast-unsafe-trait-objects.rs +++ b/tests/ui/rfcs/rfc-2027-object-safe-for-dispatch/downcast-unsafe-trait-objects.rs @@ -1,7 +1,7 @@ // Check that we if we get ahold of an object unsafe trait // object with auto traits and lifetimes, we can downcast it // -// check-pass +//@ check-pass #![feature(object_safe_for_dispatch)] diff --git a/tests/ui/rfcs/rfc-2027-object-safe-for-dispatch/manual-self-impl-for-unsafe-obj.rs b/tests/ui/rfcs/rfc-2027-object-safe-for-dispatch/manual-self-impl-for-unsafe-obj.rs index c8eee9835fe..ba09550aad5 100644 --- a/tests/ui/rfcs/rfc-2027-object-safe-for-dispatch/manual-self-impl-for-unsafe-obj.rs +++ b/tests/ui/rfcs/rfc-2027-object-safe-for-dispatch/manual-self-impl-for-unsafe-obj.rs @@ -1,8 +1,8 @@ // Check that we can manually implement an object-unsafe trait for its trait object. -// revisions: current next -//[next] compile-flags: -Znext-solver -// run-pass +//@ revisions: current next +//@[next] compile-flags: -Znext-solver +//@ run-pass #![feature(object_safe_for_dispatch)] diff --git a/tests/ui/rfcs/rfc-2027-object-safe-for-dispatch/static-dispatch-unsafe-object.rs b/tests/ui/rfcs/rfc-2027-object-safe-for-dispatch/static-dispatch-unsafe-object.rs index df97d2c1327..cbf76a6830b 100644 --- a/tests/ui/rfcs/rfc-2027-object-safe-for-dispatch/static-dispatch-unsafe-object.rs +++ b/tests/ui/rfcs/rfc-2027-object-safe-for-dispatch/static-dispatch-unsafe-object.rs @@ -1,7 +1,7 @@ // Check that we can statically dispatch methods for object // unsafe trait objects, directly and indirectly // -// check-pass +//@ check-pass #![feature(object_safe_for_dispatch)] diff --git a/tests/ui/rfcs/rfc-2091-track-caller/call-chain.rs b/tests/ui/rfcs/rfc-2091-track-caller/call-chain.rs index a8814ce2852..70cefbe29c1 100644 --- a/tests/ui/rfcs/rfc-2091-track-caller/call-chain.rs +++ b/tests/ui/rfcs/rfc-2091-track-caller/call-chain.rs @@ -1,7 +1,7 @@ -// run-pass -// revisions: default mir-opt -//[default] compile-flags: -Zinline-mir=false -//[mir-opt] compile-flags: -Zmir-opt-level=4 +//@ run-pass +//@ revisions: default mir-opt +//@[default] compile-flags: -Zinline-mir=false +//@[mir-opt] compile-flags: -Zmir-opt-level=4 use std::panic::Location; diff --git a/tests/ui/rfcs/rfc-2091-track-caller/caller-location-fnptr-rt-ctfe-equiv.rs b/tests/ui/rfcs/rfc-2091-track-caller/caller-location-fnptr-rt-ctfe-equiv.rs index a3bed707ecc..2ae8eb9c56d 100644 --- a/tests/ui/rfcs/rfc-2091-track-caller/caller-location-fnptr-rt-ctfe-equiv.rs +++ b/tests/ui/rfcs/rfc-2091-track-caller/caller-location-fnptr-rt-ctfe-equiv.rs @@ -3,8 +3,8 @@ // in turn called, results in the same output irrespective of whether // we're in a const or runtime context. -// run-pass -// compile-flags: -Z unleash-the-miri-inside-of-you +//@ run-pass +//@ compile-flags: -Z unleash-the-miri-inside-of-you #![feature(core_intrinsics, const_caller_location)] diff --git a/tests/ui/rfcs/rfc-2091-track-caller/caller-location-intrinsic.rs b/tests/ui/rfcs/rfc-2091-track-caller/caller-location-intrinsic.rs index e5754d355d9..e8c69f635fa 100644 --- a/tests/ui/rfcs/rfc-2091-track-caller/caller-location-intrinsic.rs +++ b/tests/ui/rfcs/rfc-2091-track-caller/caller-location-intrinsic.rs @@ -1,6 +1,6 @@ -// run-pass -// revisions: default mir-opt -//[mir-opt] compile-flags: -Zmir-opt-level=4 +//@ run-pass +//@ revisions: default mir-opt +//@[mir-opt] compile-flags: -Zmir-opt-level=4 #[inline(never)] #[track_caller] diff --git a/tests/ui/rfcs/rfc-2091-track-caller/const-caller-location.rs b/tests/ui/rfcs/rfc-2091-track-caller/const-caller-location.rs index 6e15cf3fe8a..2c699437c83 100644 --- a/tests/ui/rfcs/rfc-2091-track-caller/const-caller-location.rs +++ b/tests/ui/rfcs/rfc-2091-track-caller/const-caller-location.rs @@ -1,6 +1,6 @@ -// run-pass -// revisions: default mir-opt -//[mir-opt] compile-flags: -Zmir-opt-level=4 +//@ run-pass +//@ revisions: default mir-opt +//@[mir-opt] compile-flags: -Zmir-opt-level=4 #![feature(const_caller_location)] diff --git a/tests/ui/rfcs/rfc-2091-track-caller/diverging-caller-location.rs b/tests/ui/rfcs/rfc-2091-track-caller/diverging-caller-location.rs index 6681119557d..4f21814bb23 100644 --- a/tests/ui/rfcs/rfc-2091-track-caller/diverging-caller-location.rs +++ b/tests/ui/rfcs/rfc-2091-track-caller/diverging-caller-location.rs @@ -1,4 +1,4 @@ -// run-fail +//@ run-fail //! This test ensures that `#[track_caller]` can be applied directly to diverging functions, as //! the tracking issue says: https://github.com/rust-lang/rust/issues/47809#issue-292138490. diff --git a/tests/ui/rfcs/rfc-2091-track-caller/error-with-naked.rs b/tests/ui/rfcs/rfc-2091-track-caller/error-with-naked.rs index 351438a5470..6eaa7d4d9bc 100644 --- a/tests/ui/rfcs/rfc-2091-track-caller/error-with-naked.rs +++ b/tests/ui/rfcs/rfc-2091-track-caller/error-with-naked.rs @@ -1,4 +1,4 @@ -// needs-asm-support +//@ needs-asm-support #![feature(naked_functions)] use std::arch::asm; diff --git a/tests/ui/rfcs/rfc-2091-track-caller/intrinsic-wrapper.rs b/tests/ui/rfcs/rfc-2091-track-caller/intrinsic-wrapper.rs index 23d2a4b0a99..7a4cef1c2ed 100644 --- a/tests/ui/rfcs/rfc-2091-track-caller/intrinsic-wrapper.rs +++ b/tests/ui/rfcs/rfc-2091-track-caller/intrinsic-wrapper.rs @@ -1,7 +1,7 @@ -// run-pass -// revisions: default mir-opt -//[default] compile-flags: -Zinline-mir=no -//[mir-opt] compile-flags: -Zmir-opt-level=4 +//@ run-pass +//@ revisions: default mir-opt +//@[default] compile-flags: -Zinline-mir=no +//@[mir-opt] compile-flags: -Zmir-opt-level=4 macro_rules! caller_location_from_macro { () => (core::panic::Location::caller()); diff --git a/tests/ui/rfcs/rfc-2091-track-caller/macro-declaration.rs b/tests/ui/rfcs/rfc-2091-track-caller/macro-declaration.rs index 6ca09fac819..f003e40fa55 100644 --- a/tests/ui/rfcs/rfc-2091-track-caller/macro-declaration.rs +++ b/tests/ui/rfcs/rfc-2091-track-caller/macro-declaration.rs @@ -1,4 +1,4 @@ -// check-pass +//@ check-pass // See https://github.com/rust-lang/rust/issues/95151 #[track_caller] diff --git a/tests/ui/rfcs/rfc-2091-track-caller/mir-inlined-macro.rs b/tests/ui/rfcs/rfc-2091-track-caller/mir-inlined-macro.rs index a2e8eb27ede..d553be2c0b6 100644 --- a/tests/ui/rfcs/rfc-2091-track-caller/mir-inlined-macro.rs +++ b/tests/ui/rfcs/rfc-2091-track-caller/mir-inlined-macro.rs @@ -1,7 +1,7 @@ -// run-pass -// revisions: default mir-opt -//[default] compile-flags: -Zinline-mir=no -//[mir-opt] compile-flags: -Zmir-opt-level=4 +//@ run-pass +//@ revisions: default mir-opt +//@[default] compile-flags: -Zinline-mir=no +//@[mir-opt] compile-flags: -Zmir-opt-level=4 use std::panic::Location; diff --git a/tests/ui/rfcs/rfc-2091-track-caller/pass.rs b/tests/ui/rfcs/rfc-2091-track-caller/pass.rs index 1b13ea3e93c..63d06d42b1a 100644 --- a/tests/ui/rfcs/rfc-2091-track-caller/pass.rs +++ b/tests/ui/rfcs/rfc-2091-track-caller/pass.rs @@ -1,6 +1,6 @@ -// run-pass -// revisions: default mir-opt -//[mir-opt] compile-flags: -Zmir-opt-level=4 +//@ run-pass +//@ revisions: default mir-opt +//@[mir-opt] compile-flags: -Zmir-opt-level=4 #[track_caller] fn f() {} diff --git a/tests/ui/rfcs/rfc-2091-track-caller/std-panic-locations.rs b/tests/ui/rfcs/rfc-2091-track-caller/std-panic-locations.rs index f11456250d8..bd62a644785 100644 --- a/tests/ui/rfcs/rfc-2091-track-caller/std-panic-locations.rs +++ b/tests/ui/rfcs/rfc-2091-track-caller/std-panic-locations.rs @@ -1,7 +1,7 @@ -// run-pass -// needs-unwind -// revisions: default mir-opt -//[mir-opt] compile-flags: -Zmir-opt-level=4 +//@ run-pass +//@ needs-unwind +//@ revisions: default mir-opt +//@[mir-opt] compile-flags: -Zmir-opt-level=4 #![allow(unconditional_panic)] diff --git a/tests/ui/rfcs/rfc-2091-track-caller/track-caller-attribute.rs b/tests/ui/rfcs/rfc-2091-track-caller/track-caller-attribute.rs index 9d28eb9de09..ef4701335dd 100644 --- a/tests/ui/rfcs/rfc-2091-track-caller/track-caller-attribute.rs +++ b/tests/ui/rfcs/rfc-2091-track-caller/track-caller-attribute.rs @@ -1,6 +1,6 @@ -// run-pass -// revisions: default mir-opt -//[mir-opt] compile-flags: -Zmir-opt-level=4 +//@ run-pass +//@ revisions: default mir-opt +//@[mir-opt] compile-flags: -Zmir-opt-level=4 use std::panic::Location; diff --git a/tests/ui/rfcs/rfc-2091-track-caller/track-caller-ffi.rs b/tests/ui/rfcs/rfc-2091-track-caller/track-caller-ffi.rs index 5115f687c26..ee8be90d14d 100644 --- a/tests/ui/rfcs/rfc-2091-track-caller/track-caller-ffi.rs +++ b/tests/ui/rfcs/rfc-2091-track-caller/track-caller-ffi.rs @@ -1,4 +1,4 @@ -// run-pass +//@ run-pass use std::panic::Location; diff --git a/tests/ui/rfcs/rfc-2091-track-caller/tracked-closure.rs b/tests/ui/rfcs/rfc-2091-track-caller/tracked-closure.rs index 86bcf1f6f8d..d5c8a529e1e 100644 --- a/tests/ui/rfcs/rfc-2091-track-caller/tracked-closure.rs +++ b/tests/ui/rfcs/rfc-2091-track-caller/tracked-closure.rs @@ -1,4 +1,4 @@ -// run-pass +//@ run-pass #![feature(stmt_expr_attributes)] #![feature(closure_track_caller)] diff --git a/tests/ui/rfcs/rfc-2091-track-caller/tracked-fn-ptr-with-arg.rs b/tests/ui/rfcs/rfc-2091-track-caller/tracked-fn-ptr-with-arg.rs index 65881257815..b6e6ea8dd11 100644 --- a/tests/ui/rfcs/rfc-2091-track-caller/tracked-fn-ptr-with-arg.rs +++ b/tests/ui/rfcs/rfc-2091-track-caller/tracked-fn-ptr-with-arg.rs @@ -1,6 +1,6 @@ -// run-pass -// revisions: default mir-opt -//[mir-opt] compile-flags: -Zmir-opt-level=4 +//@ run-pass +//@ revisions: default mir-opt +//@[mir-opt] compile-flags: -Zmir-opt-level=4 fn pass_to_ptr_call(f: fn(T), x: T) { f(x); diff --git a/tests/ui/rfcs/rfc-2091-track-caller/tracked-fn-ptr.rs b/tests/ui/rfcs/rfc-2091-track-caller/tracked-fn-ptr.rs index 8bb4dd288f0..5505b78f17c 100644 --- a/tests/ui/rfcs/rfc-2091-track-caller/tracked-fn-ptr.rs +++ b/tests/ui/rfcs/rfc-2091-track-caller/tracked-fn-ptr.rs @@ -1,6 +1,6 @@ -// run-pass -// revisions: default mir-opt -//[mir-opt] compile-flags: -Zmir-opt-level=4 +//@ run-pass +//@ revisions: default mir-opt +//@[mir-opt] compile-flags: -Zmir-opt-level=4 fn ptr_call(f: fn()) { f(); diff --git a/tests/ui/rfcs/rfc-2091-track-caller/tracked-trait-impls.rs b/tests/ui/rfcs/rfc-2091-track-caller/tracked-trait-impls.rs index 4db4c29e53d..d5b33bfc3b1 100644 --- a/tests/ui/rfcs/rfc-2091-track-caller/tracked-trait-impls.rs +++ b/tests/ui/rfcs/rfc-2091-track-caller/tracked-trait-impls.rs @@ -1,4 +1,4 @@ -// run-pass +//@ run-pass macro_rules! assert_expansion_site_is_tracked { () => {{ diff --git a/tests/ui/rfcs/rfc-2091-track-caller/tracked-trait-obj.rs b/tests/ui/rfcs/rfc-2091-track-caller/tracked-trait-obj.rs index 06883a85790..843434bfa6e 100644 --- a/tests/ui/rfcs/rfc-2091-track-caller/tracked-trait-obj.rs +++ b/tests/ui/rfcs/rfc-2091-track-caller/tracked-trait-obj.rs @@ -1,4 +1,4 @@ -// run-pass +//@ run-pass trait Tracked { #[track_caller] diff --git a/tests/ui/rfcs/rfc-2093-infer-outlives/issue-54467.rs b/tests/ui/rfcs/rfc-2093-infer-outlives/issue-54467.rs index c712f15e324..fea6f91ff2b 100644 --- a/tests/ui/rfcs/rfc-2093-infer-outlives/issue-54467.rs +++ b/tests/ui/rfcs/rfc-2093-infer-outlives/issue-54467.rs @@ -6,7 +6,7 @@ // strange errors. This test ensures that we do not give compilation // errors. // -// check-pass +//@ check-pass trait MyIterator<'a>: Iterator where Self::Item: 'a { } diff --git a/tests/ui/rfcs/rfc-2093-infer-outlives/privacy.rs b/tests/ui/rfcs/rfc-2093-infer-outlives/privacy.rs index 180f5ac6cdc..c6ce001806d 100644 --- a/tests/ui/rfcs/rfc-2093-infer-outlives/privacy.rs +++ b/tests/ui/rfcs/rfc-2093-infer-outlives/privacy.rs @@ -3,7 +3,7 @@ // Private>::Out: 'a`, but the private trait is -- well -- private, // and hence it was not something that a pub trait could refer to. // -// run-pass +//@ run-pass #![allow(dead_code)] diff --git a/tests/ui/rfcs/rfc-2126-extern-absolute-paths/non-existent-1.rs b/tests/ui/rfcs/rfc-2126-extern-absolute-paths/non-existent-1.rs index 9c0e0bef480..60b5ded8c09 100644 --- a/tests/ui/rfcs/rfc-2126-extern-absolute-paths/non-existent-1.rs +++ b/tests/ui/rfcs/rfc-2126-extern-absolute-paths/non-existent-1.rs @@ -1,4 +1,4 @@ -// edition:2018 +//@ edition:2018 use xcrate::S; //~ ERROR unresolved import `xcrate` diff --git a/tests/ui/rfcs/rfc-2126-extern-absolute-paths/non-existent-2.rs b/tests/ui/rfcs/rfc-2126-extern-absolute-paths/non-existent-2.rs index def60feb5a6..6bbfb69800e 100644 --- a/tests/ui/rfcs/rfc-2126-extern-absolute-paths/non-existent-2.rs +++ b/tests/ui/rfcs/rfc-2126-extern-absolute-paths/non-existent-2.rs @@ -1,4 +1,4 @@ -// edition:2018 +//@ edition:2018 fn main() { let s = ::xcrate::S; diff --git a/tests/ui/rfcs/rfc-2126-extern-absolute-paths/non-existent-3.rs b/tests/ui/rfcs/rfc-2126-extern-absolute-paths/non-existent-3.rs index 486159c0e4a..846345c8468 100644 --- a/tests/ui/rfcs/rfc-2126-extern-absolute-paths/non-existent-3.rs +++ b/tests/ui/rfcs/rfc-2126-extern-absolute-paths/non-existent-3.rs @@ -1,4 +1,4 @@ -// edition:2018 +//@ edition:2018 use ycrate; //~ ERROR unresolved import `ycrate` diff --git a/tests/ui/rfcs/rfc-2126-extern-absolute-paths/not-allowed.rs b/tests/ui/rfcs/rfc-2126-extern-absolute-paths/not-allowed.rs index acb4bbebe7f..7233ca69e2e 100644 --- a/tests/ui/rfcs/rfc-2126-extern-absolute-paths/not-allowed.rs +++ b/tests/ui/rfcs/rfc-2126-extern-absolute-paths/not-allowed.rs @@ -1,4 +1,4 @@ -// edition:2018 +//@ edition:2018 // Tests that arbitrary crates (other than `core`, `std` and `meta`) // aren't allowed without `--extern`, even if they're in the sysroot. diff --git a/tests/ui/rfcs/rfc-2126-extern-absolute-paths/single-segment.rs b/tests/ui/rfcs/rfc-2126-extern-absolute-paths/single-segment.rs index 72e50d78bc2..d73558d8271 100644 --- a/tests/ui/rfcs/rfc-2126-extern-absolute-paths/single-segment.rs +++ b/tests/ui/rfcs/rfc-2126-extern-absolute-paths/single-segment.rs @@ -1,6 +1,6 @@ -// aux-build:xcrate.rs -// compile-flags:--extern xcrate -// edition:2018 +//@ aux-build:xcrate.rs +//@ compile-flags:--extern xcrate +//@ edition:2018 use crate; //~ ERROR crate root imports need to be explicitly named: `use crate as name;` use *; //~ ERROR cannot glob-import all possible crates diff --git a/tests/ui/rfcs/rfc-2151-raw-identifiers/attr.rs b/tests/ui/rfcs/rfc-2151-raw-identifiers/attr.rs index 0deb8c7f119..0c0181de035 100644 --- a/tests/ui/rfcs/rfc-2151-raw-identifiers/attr.rs +++ b/tests/ui/rfcs/rfc-2151-raw-identifiers/attr.rs @@ -1,4 +1,4 @@ -// run-pass +//@ run-pass use std::mem; #[r#repr(r#C, r#packed)] diff --git a/tests/ui/rfcs/rfc-2151-raw-identifiers/basic.rs b/tests/ui/rfcs/rfc-2151-raw-identifiers/basic.rs index f2fe59668da..2757f5057ac 100644 --- a/tests/ui/rfcs/rfc-2151-raw-identifiers/basic.rs +++ b/tests/ui/rfcs/rfc-2151-raw-identifiers/basic.rs @@ -1,4 +1,4 @@ -// run-pass +//@ run-pass fn r#fn(r#match: u32) -> u32 { r#match } diff --git a/tests/ui/rfcs/rfc-2151-raw-identifiers/items.rs b/tests/ui/rfcs/rfc-2151-raw-identifiers/items.rs index 4665225178c..5173b5ec88e 100644 --- a/tests/ui/rfcs/rfc-2151-raw-identifiers/items.rs +++ b/tests/ui/rfcs/rfc-2151-raw-identifiers/items.rs @@ -1,4 +1,4 @@ -// run-pass +//@ run-pass #[derive(Debug, PartialEq, Eq)] struct IntWrapper(u32); diff --git a/tests/ui/rfcs/rfc-2151-raw-identifiers/macros.rs b/tests/ui/rfcs/rfc-2151-raw-identifiers/macros.rs index 0ab7e17f87b..58a6f295283 100644 --- a/tests/ui/rfcs/rfc-2151-raw-identifiers/macros.rs +++ b/tests/ui/rfcs/rfc-2151-raw-identifiers/macros.rs @@ -1,4 +1,4 @@ -// run-pass +//@ run-pass #![feature(decl_macro)] macro_rules! r#struct { diff --git a/tests/ui/rfcs/rfc-2175-or-if-while-let/basic.rs b/tests/ui/rfcs/rfc-2175-or-if-while-let/basic.rs index 22f04c58f3b..57f0f848b77 100644 --- a/tests/ui/rfcs/rfc-2175-or-if-while-let/basic.rs +++ b/tests/ui/rfcs/rfc-2175-or-if-while-let/basic.rs @@ -1,4 +1,4 @@ -// run-pass +//@ run-pass #![allow(dead_code)] enum E { diff --git a/tests/ui/rfcs/rfc-2294-if-let-guard/const-expr.rs b/tests/ui/rfcs/rfc-2294-if-let-guard/const-expr.rs index 5c42c0d8bec..e5078bacb93 100644 --- a/tests/ui/rfcs/rfc-2294-if-let-guard/const-expr.rs +++ b/tests/ui/rfcs/rfc-2294-if-let-guard/const-expr.rs @@ -1,5 +1,5 @@ // Ensure if let guards can be used in constant expressions. -// build-pass +//@ build-pass #![feature(if_let_guard)] diff --git a/tests/ui/rfcs/rfc-2294-if-let-guard/drop-order.rs b/tests/ui/rfcs/rfc-2294-if-let-guard/drop-order.rs index 9bb25a66f09..801329bcc5a 100644 --- a/tests/ui/rfcs/rfc-2294-if-let-guard/drop-order.rs +++ b/tests/ui/rfcs/rfc-2294-if-let-guard/drop-order.rs @@ -2,7 +2,7 @@ // For normal guards all temporaries are dropped before the body of the arm. // For let guards temporaries live until the end of the arm. -// run-pass +//@ run-pass #![feature(if_let_guard)] #![allow(irrefutable_let_patterns)] diff --git a/tests/ui/rfcs/rfc-2294-if-let-guard/drop-scope.rs b/tests/ui/rfcs/rfc-2294-if-let-guard/drop-scope.rs index 9e6e23e8882..0578b827a47 100644 --- a/tests/ui/rfcs/rfc-2294-if-let-guard/drop-scope.rs +++ b/tests/ui/rfcs/rfc-2294-if-let-guard/drop-scope.rs @@ -1,7 +1,7 @@ // Ensure that temporaries in if-let guards live for the arm // regression test for #118593 -// check-pass +//@ check-pass #![feature(if_let_guard)] #![feature(let_chains)] diff --git a/tests/ui/rfcs/rfc-2294-if-let-guard/guard-lifetime-2.rs b/tests/ui/rfcs/rfc-2294-if-let-guard/guard-lifetime-2.rs index aa2154e3e9e..09dc4bfde35 100644 --- a/tests/ui/rfcs/rfc-2294-if-let-guard/guard-lifetime-2.rs +++ b/tests/ui/rfcs/rfc-2294-if-let-guard/guard-lifetime-2.rs @@ -1,6 +1,6 @@ // References to by-mutable-ref bindings in an if-let guard *can* be used after the guard. -// check-pass +//@ check-pass #![feature(if_let_guard)] diff --git a/tests/ui/rfcs/rfc-2294-if-let-guard/loop-mutability.rs b/tests/ui/rfcs/rfc-2294-if-let-guard/loop-mutability.rs index 349a24579a4..c13804e4534 100644 --- a/tests/ui/rfcs/rfc-2294-if-let-guard/loop-mutability.rs +++ b/tests/ui/rfcs/rfc-2294-if-let-guard/loop-mutability.rs @@ -1,4 +1,4 @@ -// check-pass +//@ check-pass #![feature(if_let_guard)] diff --git a/tests/ui/rfcs/rfc-2294-if-let-guard/move-guard-if-let.rs b/tests/ui/rfcs/rfc-2294-if-let-guard/move-guard-if-let.rs index 071b86e2e14..73bee8a6c68 100644 --- a/tests/ui/rfcs/rfc-2294-if-let-guard/move-guard-if-let.rs +++ b/tests/ui/rfcs/rfc-2294-if-let-guard/move-guard-if-let.rs @@ -1,7 +1,7 @@ // Check that borrowck knows that moves in the pattern for if-let guards // only happen when the pattern is matched. -// build-pass +//@ build-pass #![feature(if_let_guard)] #![allow(irrefutable_let_patterns)] diff --git a/tests/ui/rfcs/rfc-2294-if-let-guard/partially-macro-expanded.rs b/tests/ui/rfcs/rfc-2294-if-let-guard/partially-macro-expanded.rs index d91b3a358da..e836b0b88ff 100644 --- a/tests/ui/rfcs/rfc-2294-if-let-guard/partially-macro-expanded.rs +++ b/tests/ui/rfcs/rfc-2294-if-let-guard/partially-macro-expanded.rs @@ -1,5 +1,5 @@ // Macros can be used for (parts of) the pattern and expression in an if let guard -// check-pass +//@ check-pass #![feature(if_let_guard)] #![feature(let_chains)] diff --git a/tests/ui/rfcs/rfc-2294-if-let-guard/run-pass.rs b/tests/ui/rfcs/rfc-2294-if-let-guard/run-pass.rs index a303a0d1fce..e8a74a4ac34 100644 --- a/tests/ui/rfcs/rfc-2294-if-let-guard/run-pass.rs +++ b/tests/ui/rfcs/rfc-2294-if-let-guard/run-pass.rs @@ -1,4 +1,4 @@ -// run-pass +//@ run-pass #![feature(if_let_guard)] diff --git a/tests/ui/rfcs/rfc-2294-if-let-guard/scope.rs b/tests/ui/rfcs/rfc-2294-if-let-guard/scope.rs index 9a3520661a6..56a6fb5bfa3 100644 --- a/tests/ui/rfcs/rfc-2294-if-let-guard/scope.rs +++ b/tests/ui/rfcs/rfc-2294-if-let-guard/scope.rs @@ -1,6 +1,6 @@ // Tests for #88015 when using if let chains in match guards -//run-pass +//@run-pass #![feature(if_let_guard)] #![feature(let_chains)] diff --git a/tests/ui/rfcs/rfc-2294-if-let-guard/scoping-consistency-async.rs b/tests/ui/rfcs/rfc-2294-if-let-guard/scoping-consistency-async.rs index 86a170141f8..00eb952635a 100644 --- a/tests/ui/rfcs/rfc-2294-if-let-guard/scoping-consistency-async.rs +++ b/tests/ui/rfcs/rfc-2294-if-let-guard/scoping-consistency-async.rs @@ -1,8 +1,8 @@ // Check that temporaries in if-let guards are correctly scoped. // Regression test for #116079. -// build-pass -// edition:2018 +//@ build-pass +//@ edition:2018 // -Zvalidate-mir #![feature(if_let_guard)] diff --git a/tests/ui/rfcs/rfc-2294-if-let-guard/scoping-consistency.rs b/tests/ui/rfcs/rfc-2294-if-let-guard/scoping-consistency.rs index 37fe610637e..1a36bc5b372 100644 --- a/tests/ui/rfcs/rfc-2294-if-let-guard/scoping-consistency.rs +++ b/tests/ui/rfcs/rfc-2294-if-let-guard/scoping-consistency.rs @@ -1,6 +1,6 @@ // Check that temporaries in if-let guards are correctly scoped. -// build-pass +//@ build-pass // -Zvalidate-mir #![feature(if_let_guard)] diff --git a/tests/ui/rfcs/rfc-2294-if-let-guard/shadowing.rs b/tests/ui/rfcs/rfc-2294-if-let-guard/shadowing.rs index dba292ef9e2..32a223c9159 100644 --- a/tests/ui/rfcs/rfc-2294-if-let-guard/shadowing.rs +++ b/tests/ui/rfcs/rfc-2294-if-let-guard/shadowing.rs @@ -1,5 +1,5 @@ // Check shadowing in if let guards works as expected. -// check-pass +//@ check-pass #![feature(if_let_guard)] #![feature(let_chains)] diff --git a/tests/ui/rfcs/rfc-2294-if-let-guard/type-inference.rs b/tests/ui/rfcs/rfc-2294-if-let-guard/type-inference.rs index ef7a772e6c5..9d20709ee9b 100644 --- a/tests/ui/rfcs/rfc-2294-if-let-guard/type-inference.rs +++ b/tests/ui/rfcs/rfc-2294-if-let-guard/type-inference.rs @@ -1,4 +1,4 @@ -// check-pass +//@ check-pass #![feature(if_let_guard)] diff --git a/tests/ui/rfcs/rfc-2302-self-struct-ctor/rfc-2302-self-struct-ctor.rs b/tests/ui/rfcs/rfc-2302-self-struct-ctor/rfc-2302-self-struct-ctor.rs index 1ec20c50034..8f2cdcb6e1a 100644 --- a/tests/ui/rfcs/rfc-2302-self-struct-ctor/rfc-2302-self-struct-ctor.rs +++ b/tests/ui/rfcs/rfc-2302-self-struct-ctor/rfc-2302-self-struct-ctor.rs @@ -1,4 +1,4 @@ -// run-pass +//@ run-pass #![allow(dead_code)] diff --git a/tests/ui/rfcs/rfc-2306-convert-id/convert-id-const-with-gate.rs b/tests/ui/rfcs/rfc-2306-convert-id/convert-id-const-with-gate.rs index 762dfbe4843..30ef39038a0 100644 --- a/tests/ui/rfcs/rfc-2306-convert-id/convert-id-const-with-gate.rs +++ b/tests/ui/rfcs/rfc-2306-convert-id/convert-id-const-with-gate.rs @@ -1,6 +1,6 @@ // This test should pass since 'identity' is const fn. -// build-pass (FIXME(62277): could be check-pass?) +//@ build-pass (FIXME(62277): could be check-pass?) fn main() { const _FOO: u8 = ::std::convert::identity(42u8); diff --git a/tests/ui/rfcs/rfc-2361-dbg-macro/dbg-macro-expected-behavior.rs b/tests/ui/rfcs/rfc-2361-dbg-macro/dbg-macro-expected-behavior.rs index 542be3942b7..9f4e50679ff 100644 --- a/tests/ui/rfcs/rfc-2361-dbg-macro/dbg-macro-expected-behavior.rs +++ b/tests/ui/rfcs/rfc-2361-dbg-macro/dbg-macro-expected-behavior.rs @@ -1,5 +1,5 @@ -// run-pass -// check-run-results +//@ run-pass +//@ check-run-results // Tests ensuring that `dbg!(expr)` has the expected run-time behavior. // as well as some compile time properties we expect. diff --git a/tests/ui/rfcs/rfc-2396-target_feature-11/check-pass.rs b/tests/ui/rfcs/rfc-2396-target_feature-11/check-pass.rs index 58a2c271ecf..674cf930c0a 100644 --- a/tests/ui/rfcs/rfc-2396-target_feature-11/check-pass.rs +++ b/tests/ui/rfcs/rfc-2396-target_feature-11/check-pass.rs @@ -6,8 +6,8 @@ // unsafe contexts // - functions with `#[target_feature]` can coerce to unsafe fn pointers -// check-pass -// only-x86_64 +//@ check-pass +//@ only-x86_64 #![feature(target_feature_11)] diff --git a/tests/ui/rfcs/rfc-2396-target_feature-11/closures-inherit-target_feature.rs b/tests/ui/rfcs/rfc-2396-target_feature-11/closures-inherit-target_feature.rs index fefe100ba0e..122ef542e7d 100644 --- a/tests/ui/rfcs/rfc-2396-target_feature-11/closures-inherit-target_feature.rs +++ b/tests/ui/rfcs/rfc-2396-target_feature-11/closures-inherit-target_feature.rs @@ -1,7 +1,7 @@ // Tests #73631: closures inherit `#[target_feature]` annotations -// check-pass -// only-x86_64 +//@ check-pass +//@ only-x86_64 #![feature(target_feature_11)] diff --git a/tests/ui/rfcs/rfc-2396-target_feature-11/feature-gate-target_feature_11.rs b/tests/ui/rfcs/rfc-2396-target_feature-11/feature-gate-target_feature_11.rs index 975d7a1f694..2add6b2e186 100644 --- a/tests/ui/rfcs/rfc-2396-target_feature-11/feature-gate-target_feature_11.rs +++ b/tests/ui/rfcs/rfc-2396-target_feature-11/feature-gate-target_feature_11.rs @@ -1,4 +1,4 @@ -// only-x86_64 +//@ only-x86_64 #[target_feature(enable = "sse2")] //~ ERROR can only be applied to `unsafe` functions fn foo() {} diff --git a/tests/ui/rfcs/rfc-2396-target_feature-11/fn-ptr.rs b/tests/ui/rfcs/rfc-2396-target_feature-11/fn-ptr.rs index 3ecea5c5313..364b4d35812 100644 --- a/tests/ui/rfcs/rfc-2396-target_feature-11/fn-ptr.rs +++ b/tests/ui/rfcs/rfc-2396-target_feature-11/fn-ptr.rs @@ -1,4 +1,4 @@ -// only-x86_64 +//@ only-x86_64 #![feature(target_feature_11)] diff --git a/tests/ui/rfcs/rfc-2396-target_feature-11/fn-traits.rs b/tests/ui/rfcs/rfc-2396-target_feature-11/fn-traits.rs index a032a2ca052..3c370a1b8f3 100644 --- a/tests/ui/rfcs/rfc-2396-target_feature-11/fn-traits.rs +++ b/tests/ui/rfcs/rfc-2396-target_feature-11/fn-traits.rs @@ -1,4 +1,4 @@ -// only-x86_64 +//@ only-x86_64 #![feature(target_feature_11)] diff --git a/tests/ui/rfcs/rfc-2396-target_feature-11/issue-108645-target-feature-on-main.rs b/tests/ui/rfcs/rfc-2396-target_feature-11/issue-108645-target-feature-on-main.rs index 0d59e50264e..a1c11847867 100644 --- a/tests/ui/rfcs/rfc-2396-target_feature-11/issue-108645-target-feature-on-main.rs +++ b/tests/ui/rfcs/rfc-2396-target_feature-11/issue-108645-target-feature-on-main.rs @@ -1,4 +1,4 @@ -// only-x86_64 +//@ only-x86_64 #![feature(target_feature_11)] diff --git a/tests/ui/rfcs/rfc-2396-target_feature-11/issue-108645-target-feature-on-start.rs b/tests/ui/rfcs/rfc-2396-target_feature-11/issue-108645-target-feature-on-start.rs index 221c0416dbf..6aa8f6fd821 100644 --- a/tests/ui/rfcs/rfc-2396-target_feature-11/issue-108645-target-feature-on-start.rs +++ b/tests/ui/rfcs/rfc-2396-target_feature-11/issue-108645-target-feature-on-start.rs @@ -1,4 +1,4 @@ -// only-x86_64 +//@ only-x86_64 #![feature(start)] #![feature(target_feature_11)] diff --git a/tests/ui/rfcs/rfc-2396-target_feature-11/issue-108655-inline-always-closure.rs b/tests/ui/rfcs/rfc-2396-target_feature-11/issue-108655-inline-always-closure.rs index 115f00b3f4e..6bd810b0956 100644 --- a/tests/ui/rfcs/rfc-2396-target_feature-11/issue-108655-inline-always-closure.rs +++ b/tests/ui/rfcs/rfc-2396-target_feature-11/issue-108655-inline-always-closure.rs @@ -1,7 +1,7 @@ // Tests #108655: closures in `#[target_feature]` functions can still be marked #[inline(always)] -// check-pass -// only-x86_64 +//@ check-pass +//@ only-x86_64 #![feature(target_feature_11)] diff --git a/tests/ui/rfcs/rfc-2396-target_feature-11/issue-99876.rs b/tests/ui/rfcs/rfc-2396-target_feature-11/issue-99876.rs index 033dcdfc08d..57dac2e4adb 100644 --- a/tests/ui/rfcs/rfc-2396-target_feature-11/issue-99876.rs +++ b/tests/ui/rfcs/rfc-2396-target_feature-11/issue-99876.rs @@ -1,4 +1,4 @@ -// check-pass +//@ check-pass #![feature(target_feature_11)] diff --git a/tests/ui/rfcs/rfc-2396-target_feature-11/safe-calls.rs b/tests/ui/rfcs/rfc-2396-target_feature-11/safe-calls.rs index 788c79adc1f..c73b8d7e4d2 100644 --- a/tests/ui/rfcs/rfc-2396-target_feature-11/safe-calls.rs +++ b/tests/ui/rfcs/rfc-2396-target_feature-11/safe-calls.rs @@ -1,4 +1,4 @@ -// only-x86_64 +//@ only-x86_64 #![feature(target_feature_11)] diff --git a/tests/ui/rfcs/rfc-2396-target_feature-11/trait-impl.rs b/tests/ui/rfcs/rfc-2396-target_feature-11/trait-impl.rs index 9108f27b5f7..df575b0f6b6 100644 --- a/tests/ui/rfcs/rfc-2396-target_feature-11/trait-impl.rs +++ b/tests/ui/rfcs/rfc-2396-target_feature-11/trait-impl.rs @@ -1,4 +1,4 @@ -// only-x86_64 +//@ only-x86_64 #![feature(target_feature_11)] diff --git a/tests/ui/rfcs/rfc-2421-unreserve-pure-offsetof-sizeof-alignof/offsetof-alignof-sizeof-pure-can-be-used-as-idents.rs b/tests/ui/rfcs/rfc-2421-unreserve-pure-offsetof-sizeof-alignof/offsetof-alignof-sizeof-pure-can-be-used-as-idents.rs index 6d7bca4da24..c765ca6abb4 100644 --- a/tests/ui/rfcs/rfc-2421-unreserve-pure-offsetof-sizeof-alignof/offsetof-alignof-sizeof-pure-can-be-used-as-idents.rs +++ b/tests/ui/rfcs/rfc-2421-unreserve-pure-offsetof-sizeof-alignof/offsetof-alignof-sizeof-pure-can-be-used-as-idents.rs @@ -1,4 +1,4 @@ -// run-pass +//@ run-pass #![allow(dead_code)] #![allow(unused_variables)] // Test that removed keywords are allowed as identifiers. diff --git a/tests/ui/rfcs/rfc-2457-non-ascii-idents/idents-normalized.rs b/tests/ui/rfcs/rfc-2457-non-ascii-idents/idents-normalized.rs index 1023fee37d5..b0a3f2340eb 100644 --- a/tests/ui/rfcs/rfc-2457-non-ascii-idents/idents-normalized.rs +++ b/tests/ui/rfcs/rfc-2457-non-ascii-idents/idents-normalized.rs @@ -1,4 +1,4 @@ -// check-pass +//@ check-pass struct RĆ©sumĆ©; // ['LATIN SMALL LETTER E WITH ACUTE'] diff --git a/tests/ui/rfcs/rfc-2457-non-ascii-idents/mod_file_nonascii_with_path_allowed.rs b/tests/ui/rfcs/rfc-2457-non-ascii-idents/mod_file_nonascii_with_path_allowed.rs index 94327846d61..d7ce32cde4b 100644 --- a/tests/ui/rfcs/rfc-2457-non-ascii-idents/mod_file_nonascii_with_path_allowed.rs +++ b/tests/ui/rfcs/rfc-2457-non-ascii-idents/mod_file_nonascii_with_path_allowed.rs @@ -1,4 +1,4 @@ -// check-pass +//@ check-pass #[path="auxiliary/mod_file_nonascii_with_path_allowed-aux.rs"] mod řųśń; diff --git a/tests/ui/rfcs/rfc-2457-non-ascii-idents/mod_inline_nonascii_allowed.rs b/tests/ui/rfcs/rfc-2457-non-ascii-idents/mod_inline_nonascii_allowed.rs index e1d836b7c3e..ba7124fae39 100644 --- a/tests/ui/rfcs/rfc-2457-non-ascii-idents/mod_inline_nonascii_allowed.rs +++ b/tests/ui/rfcs/rfc-2457-non-ascii-idents/mod_inline_nonascii_allowed.rs @@ -1,4 +1,4 @@ -// check-pass +//@ check-pass mod řųśń { const IS_GREAT: bool = true; diff --git a/tests/ui/rfcs/rfc-2497-if-let-chains/ast-lowering-does-not-wrap-let-chains.rs b/tests/ui/rfcs/rfc-2497-if-let-chains/ast-lowering-does-not-wrap-let-chains.rs index d851fac8e64..e1edde6de19 100644 --- a/tests/ui/rfcs/rfc-2497-if-let-chains/ast-lowering-does-not-wrap-let-chains.rs +++ b/tests/ui/rfcs/rfc-2497-if-let-chains/ast-lowering-does-not-wrap-let-chains.rs @@ -1,4 +1,4 @@ -// run-pass +//@ run-pass #![feature(let_chains)] #![allow(irrefutable_let_patterns)] diff --git a/tests/ui/rfcs/rfc-2497-if-let-chains/ast-pretty-check.rs b/tests/ui/rfcs/rfc-2497-if-let-chains/ast-pretty-check.rs index 69bc189dd35..8d782646333 100644 --- a/tests/ui/rfcs/rfc-2497-if-let-chains/ast-pretty-check.rs +++ b/tests/ui/rfcs/rfc-2497-if-let-chains/ast-pretty-check.rs @@ -1,5 +1,5 @@ -// check-pass -// compile-flags: -Z unpretty=expanded +//@ check-pass +//@ compile-flags: -Z unpretty=expanded fn main() { if let 0 = 1 {} diff --git a/tests/ui/rfcs/rfc-2497-if-let-chains/ast-pretty-check.stdout b/tests/ui/rfcs/rfc-2497-if-let-chains/ast-pretty-check.stdout index e737ef26e9b..1c103f03c35 100644 --- a/tests/ui/rfcs/rfc-2497-if-let-chains/ast-pretty-check.stdout +++ b/tests/ui/rfcs/rfc-2497-if-let-chains/ast-pretty-check.stdout @@ -4,7 +4,7 @@ use ::std::prelude::rust_2015::*; #[macro_use] extern crate std; -// check-pass -// compile-flags: -Z unpretty=expanded +//@ check-pass +//@ compile-flags: -Z unpretty=expanded fn main() { if let 0 = 1 {} } diff --git a/tests/ui/rfcs/rfc-2497-if-let-chains/chains-without-let.rs b/tests/ui/rfcs/rfc-2497-if-let-chains/chains-without-let.rs index 2c0571a7bdd..392d29a5bfc 100644 --- a/tests/ui/rfcs/rfc-2497-if-let-chains/chains-without-let.rs +++ b/tests/ui/rfcs/rfc-2497-if-let-chains/chains-without-let.rs @@ -1,4 +1,4 @@ -// check-pass +//@ check-pass fn and_chain() { let z; diff --git a/tests/ui/rfcs/rfc-2497-if-let-chains/irrefutable-lets.rs b/tests/ui/rfcs/rfc-2497-if-let-chains/irrefutable-lets.rs index 9afb6853b36..bd4df337614 100644 --- a/tests/ui/rfcs/rfc-2497-if-let-chains/irrefutable-lets.rs +++ b/tests/ui/rfcs/rfc-2497-if-let-chains/irrefutable-lets.rs @@ -1,5 +1,5 @@ -// revisions: allowed disallowed -//[allowed] check-pass +//@ revisions: allowed disallowed +//@[allowed] check-pass #![feature(if_let_guard, let_chains)] #![cfg_attr(allowed, allow(irrefutable_let_patterns))] diff --git a/tests/ui/rfcs/rfc-2497-if-let-chains/issue-88498.rs b/tests/ui/rfcs/rfc-2497-if-let-chains/issue-88498.rs index 3eb8a9ad060..0234eef0cd0 100644 --- a/tests/ui/rfcs/rfc-2497-if-let-chains/issue-88498.rs +++ b/tests/ui/rfcs/rfc-2497-if-let-chains/issue-88498.rs @@ -1,4 +1,4 @@ -// check-pass +//@ check-pass pub enum UnOp { Not(Vec<()>), diff --git a/tests/ui/rfcs/rfc-2497-if-let-chains/issue-90722.rs b/tests/ui/rfcs/rfc-2497-if-let-chains/issue-90722.rs index 6b7d8835650..59c81d053bc 100644 --- a/tests/ui/rfcs/rfc-2497-if-let-chains/issue-90722.rs +++ b/tests/ui/rfcs/rfc-2497-if-let-chains/issue-90722.rs @@ -1,4 +1,4 @@ -// check-pass +//@ check-pass #![feature(let_chains)] diff --git a/tests/ui/rfcs/rfc-2497-if-let-chains/issue-92145.rs b/tests/ui/rfcs/rfc-2497-if-let-chains/issue-92145.rs index 7c7e31f4db4..ea4b34eacba 100644 --- a/tests/ui/rfcs/rfc-2497-if-let-chains/issue-92145.rs +++ b/tests/ui/rfcs/rfc-2497-if-let-chains/issue-92145.rs @@ -1,4 +1,4 @@ -// check-pass +//@ check-pass #![feature(let_chains)] diff --git a/tests/ui/rfcs/rfc-2497-if-let-chains/issue-99938.rs b/tests/ui/rfcs/rfc-2497-if-let-chains/issue-99938.rs index bd81ce0b19c..77756d0bee0 100644 --- a/tests/ui/rfcs/rfc-2497-if-let-chains/issue-99938.rs +++ b/tests/ui/rfcs/rfc-2497-if-let-chains/issue-99938.rs @@ -1,5 +1,5 @@ -// compile-flags: -Zvalidate-mir -C opt-level=3 -// build-pass +//@ compile-flags: -Zvalidate-mir -C opt-level=3 +//@ build-pass #![feature(let_chains)] struct TupleIter> { inner: I, diff --git a/tests/ui/rfcs/rfc-2497-if-let-chains/no-double-assigments.rs b/tests/ui/rfcs/rfc-2497-if-let-chains/no-double-assigments.rs index 6b91c455e0e..f23702d1d8c 100644 --- a/tests/ui/rfcs/rfc-2497-if-let-chains/no-double-assigments.rs +++ b/tests/ui/rfcs/rfc-2497-if-let-chains/no-double-assigments.rs @@ -1,4 +1,4 @@ -// check-pass +//@ check-pass fn main() { loop { diff --git a/tests/ui/rfcs/rfc-2497-if-let-chains/protect-precedences.rs b/tests/ui/rfcs/rfc-2497-if-let-chains/protect-precedences.rs index fcc09b159ec..59a29446f8f 100644 --- a/tests/ui/rfcs/rfc-2497-if-let-chains/protect-precedences.rs +++ b/tests/ui/rfcs/rfc-2497-if-let-chains/protect-precedences.rs @@ -1,4 +1,4 @@ -// run-pass +//@ run-pass #![allow(irrefutable_let_patterns)] diff --git a/tests/ui/rfcs/rfc-2497-if-let-chains/then-else-blocks.rs b/tests/ui/rfcs/rfc-2497-if-let-chains/then-else-blocks.rs index e061174f667..6d307be90c1 100644 --- a/tests/ui/rfcs/rfc-2497-if-let-chains/then-else-blocks.rs +++ b/tests/ui/rfcs/rfc-2497-if-let-chains/then-else-blocks.rs @@ -1,4 +1,4 @@ -// run-pass +//@ run-pass #![feature(if_let_guard, let_chains)] diff --git a/tests/ui/rfcs/rfc-2528-type-changing-struct-update/coerce-in-base-expr.rs b/tests/ui/rfcs/rfc-2528-type-changing-struct-update/coerce-in-base-expr.rs index 75e48bf4a48..02915a5dc37 100644 --- a/tests/ui/rfcs/rfc-2528-type-changing-struct-update/coerce-in-base-expr.rs +++ b/tests/ui/rfcs/rfc-2528-type-changing-struct-update/coerce-in-base-expr.rs @@ -1,4 +1,4 @@ -// check-pass +//@ check-pass #![feature(type_changing_struct_update)] #![allow(incomplete_features)] diff --git a/tests/ui/rfcs/rfc-2528-type-changing-struct-update/issue-96878.rs b/tests/ui/rfcs/rfc-2528-type-changing-struct-update/issue-96878.rs index 3dfbef0ee90..15907bc2ddb 100644 --- a/tests/ui/rfcs/rfc-2528-type-changing-struct-update/issue-96878.rs +++ b/tests/ui/rfcs/rfc-2528-type-changing-struct-update/issue-96878.rs @@ -1,4 +1,4 @@ -// check-pass +//@ check-pass #![feature(type_changing_struct_update)] #![allow(incomplete_features)] diff --git a/tests/ui/rfcs/rfc-2565-param-attrs/auxiliary/ident-mac.rs b/tests/ui/rfcs/rfc-2565-param-attrs/auxiliary/ident-mac.rs index b62cf31205f..93c2901fe66 100644 --- a/tests/ui/rfcs/rfc-2565-param-attrs/auxiliary/ident-mac.rs +++ b/tests/ui/rfcs/rfc-2565-param-attrs/auxiliary/ident-mac.rs @@ -1,5 +1,5 @@ -// force-host -// no-prefer-dynamic +//@ force-host +//@ no-prefer-dynamic #![crate_type = "proc-macro"] diff --git a/tests/ui/rfcs/rfc-2565-param-attrs/auxiliary/param-attrs.rs b/tests/ui/rfcs/rfc-2565-param-attrs/auxiliary/param-attrs.rs index 67de50a1d92..c427cf7af6d 100644 --- a/tests/ui/rfcs/rfc-2565-param-attrs/auxiliary/param-attrs.rs +++ b/tests/ui/rfcs/rfc-2565-param-attrs/auxiliary/param-attrs.rs @@ -1,5 +1,5 @@ -// force-host -// no-prefer-dynamic +//@ force-host +//@ no-prefer-dynamic #![crate_type = "proc-macro"] diff --git a/tests/ui/rfcs/rfc-2565-param-attrs/issue-64682-dropping-first-attrs-in-impl-fns.rs b/tests/ui/rfcs/rfc-2565-param-attrs/issue-64682-dropping-first-attrs-in-impl-fns.rs index 670303906d2..17b59009bb8 100644 --- a/tests/ui/rfcs/rfc-2565-param-attrs/issue-64682-dropping-first-attrs-in-impl-fns.rs +++ b/tests/ui/rfcs/rfc-2565-param-attrs/issue-64682-dropping-first-attrs-in-impl-fns.rs @@ -1,6 +1,6 @@ -// aux-build:param-attrs.rs +//@ aux-build:param-attrs.rs -// check-pass +//@ check-pass extern crate param_attrs; diff --git a/tests/ui/rfcs/rfc-2565-param-attrs/param-attrs-2018.rs b/tests/ui/rfcs/rfc-2565-param-attrs/param-attrs-2018.rs index a6f693bd5b5..af13a46564e 100644 --- a/tests/ui/rfcs/rfc-2565-param-attrs/param-attrs-2018.rs +++ b/tests/ui/rfcs/rfc-2565-param-attrs/param-attrs-2018.rs @@ -1,4 +1,4 @@ -// edition:2018 +//@ edition:2018 trait Trait2015 { fn foo(#[allow(C)] i32); } //~^ ERROR expected one of `:`, `@`, or `|`, found `)` diff --git a/tests/ui/rfcs/rfc-2565-param-attrs/param-attrs-allowed.rs b/tests/ui/rfcs/rfc-2565-param-attrs/param-attrs-allowed.rs index 2de37c859c9..e35f743d96a 100644 --- a/tests/ui/rfcs/rfc-2565-param-attrs/param-attrs-allowed.rs +++ b/tests/ui/rfcs/rfc-2565-param-attrs/param-attrs-allowed.rs @@ -1,5 +1,5 @@ -// check-pass -// compile-flags: --cfg something +//@ check-pass +//@ compile-flags: --cfg something #![deny(unused_mut)] diff --git a/tests/ui/rfcs/rfc-2565-param-attrs/param-attrs-cfg.rs b/tests/ui/rfcs/rfc-2565-param-attrs/param-attrs-cfg.rs index 14539d4b6d8..babeaf67eb2 100644 --- a/tests/ui/rfcs/rfc-2565-param-attrs/param-attrs-cfg.rs +++ b/tests/ui/rfcs/rfc-2565-param-attrs/param-attrs-cfg.rs @@ -1,5 +1,5 @@ -// compile-flags: --cfg something -// edition:2018 +//@ compile-flags: --cfg something +//@ edition:2018 #![feature(async_closure)] #![deny(unused_variables)] diff --git a/tests/ui/rfcs/rfc-2565-param-attrs/param-attrs-pretty.rs b/tests/ui/rfcs/rfc-2565-param-attrs/param-attrs-pretty.rs index 1183ac65b9a..6ed2d4fad0e 100644 --- a/tests/ui/rfcs/rfc-2565-param-attrs/param-attrs-pretty.rs +++ b/tests/ui/rfcs/rfc-2565-param-attrs/param-attrs-pretty.rs @@ -1,6 +1,6 @@ -// aux-build:param-attrs.rs +//@ aux-build:param-attrs.rs -// check-pass +//@ check-pass #![feature(c_variadic)] diff --git a/tests/ui/rfcs/rfc-2565-param-attrs/proc-macro-cannot-be-used.rs b/tests/ui/rfcs/rfc-2565-param-attrs/proc-macro-cannot-be-used.rs index 54f2f451bbe..c1e6a92e317 100644 --- a/tests/ui/rfcs/rfc-2565-param-attrs/proc-macro-cannot-be-used.rs +++ b/tests/ui/rfcs/rfc-2565-param-attrs/proc-macro-cannot-be-used.rs @@ -1,4 +1,4 @@ -// aux-build:ident-mac.rs +//@ aux-build:ident-mac.rs #![feature(c_variadic)] #![allow(anonymous_parameters)] diff --git a/tests/ui/rfcs/rfc-2627-raw-dylib/dlltool-failed.rs b/tests/ui/rfcs/rfc-2627-raw-dylib/dlltool-failed.rs index 880907b24b4..5ff3cd25e67 100644 --- a/tests/ui/rfcs/rfc-2627-raw-dylib/dlltool-failed.rs +++ b/tests/ui/rfcs/rfc-2627-raw-dylib/dlltool-failed.rs @@ -1,15 +1,15 @@ // Tests that dlltool failing to generate an import library will raise an error. -// only-gnu -// only-windows -// needs-dlltool -// compile-flags: --crate-type lib --emit link -// normalize-stderr-test: "[^ ']*/dlltool.exe" -> "$$DLLTOOL" -// normalize-stderr-test: "[^ ]*/foo.def" -> "$$DEF_FILE" -// normalize-stderr-test: "[^ ]*/foo.lib" -> "$$LIB_FILE" -// normalize-stderr-test: "-m [^ ]*" -> "$$TARGET_MACHINE" -// normalize-stderr-test: "-f [^ ]*" -> "$$ASM_FLAGS" -// normalize-stderr-test: "--temp-prefix [^ ]*/foo.dll" -> "$$TEMP_PREFIX" +//@ only-gnu +//@ only-windows +//@ needs-dlltool +//@ compile-flags: --crate-type lib --emit link +//@ normalize-stderr-test: "[^ ']*/dlltool.exe" -> "$$DLLTOOL" +//@ normalize-stderr-test: "[^ ]*/foo.def" -> "$$DEF_FILE" +//@ normalize-stderr-test: "[^ ]*/foo.lib" -> "$$LIB_FILE" +//@ normalize-stderr-test: "-m [^ ]*" -> "$$TARGET_MACHINE" +//@ normalize-stderr-test: "-f [^ ]*" -> "$$ASM_FLAGS" +//@ normalize-stderr-test: "--temp-prefix [^ ]*/foo.dll" -> "$$TEMP_PREFIX" #[link(name = "foo", kind = "raw-dylib")] extern "C" { // `@1` is an invalid name to export, as it usually indicates that something diff --git a/tests/ui/rfcs/rfc-2627-raw-dylib/import-name-type-invalid-format.rs b/tests/ui/rfcs/rfc-2627-raw-dylib/import-name-type-invalid-format.rs index 7bc44d65be9..50ad8a173ad 100644 --- a/tests/ui/rfcs/rfc-2627-raw-dylib/import-name-type-invalid-format.rs +++ b/tests/ui/rfcs/rfc-2627-raw-dylib/import-name-type-invalid-format.rs @@ -1,5 +1,5 @@ -// only-windows -// only-x86 +//@ only-windows +//@ only-x86 #[link(name = "foo", kind = "raw-dylib", import_name_type = 6)] //~^ ERROR import name type must be of the form `import_name_type = "string"` extern "C" { } diff --git a/tests/ui/rfcs/rfc-2627-raw-dylib/import-name-type-multiple.rs b/tests/ui/rfcs/rfc-2627-raw-dylib/import-name-type-multiple.rs index b96f61a26da..cf456b9b261 100644 --- a/tests/ui/rfcs/rfc-2627-raw-dylib/import-name-type-multiple.rs +++ b/tests/ui/rfcs/rfc-2627-raw-dylib/import-name-type-multiple.rs @@ -1,6 +1,6 @@ // ignore-tidy-linelength -// only-windows -// only-x86 +//@ only-windows +//@ only-x86 #[link(name = "foo", kind = "raw-dylib", import_name_type = "decorated", import_name_type = "decorated")] //~^ ERROR multiple `import_name_type` arguments in a single `#[link]` attribute extern "C" { } diff --git a/tests/ui/rfcs/rfc-2627-raw-dylib/import-name-type-unknown-value.rs b/tests/ui/rfcs/rfc-2627-raw-dylib/import-name-type-unknown-value.rs index 067e82a17fd..b3859ba1ce6 100644 --- a/tests/ui/rfcs/rfc-2627-raw-dylib/import-name-type-unknown-value.rs +++ b/tests/ui/rfcs/rfc-2627-raw-dylib/import-name-type-unknown-value.rs @@ -1,5 +1,5 @@ -// only-windows -// only-x86 +//@ only-windows +//@ only-x86 #[link(name = "foo", kind = "raw-dylib", import_name_type = "unknown")] //~^ ERROR unknown import name type `unknown`, expected one of: decorated, noprefix, undecorated extern "C" { } diff --git a/tests/ui/rfcs/rfc-2627-raw-dylib/import-name-type-unsupported-link-kind.rs b/tests/ui/rfcs/rfc-2627-raw-dylib/import-name-type-unsupported-link-kind.rs index 34e907bde83..3ead5cb1fd7 100644 --- a/tests/ui/rfcs/rfc-2627-raw-dylib/import-name-type-unsupported-link-kind.rs +++ b/tests/ui/rfcs/rfc-2627-raw-dylib/import-name-type-unsupported-link-kind.rs @@ -1,5 +1,5 @@ -// only-windows -// only-x86 +//@ only-windows +//@ only-x86 #[link(name = "foo", import_name_type = "decorated")] //~^ ERROR import name type can only be used with link kind `raw-dylib` extern "C" { } diff --git a/tests/ui/rfcs/rfc-2627-raw-dylib/import-name-type-x86-only.rs b/tests/ui/rfcs/rfc-2627-raw-dylib/import-name-type-x86-only.rs index 346ea18a8f8..ab0dcda64e6 100644 --- a/tests/ui/rfcs/rfc-2627-raw-dylib/import-name-type-x86-only.rs +++ b/tests/ui/rfcs/rfc-2627-raw-dylib/import-name-type-x86-only.rs @@ -1,5 +1,5 @@ -// only-windows -// ignore-x86 +//@ only-windows +//@ ignore-x86 #[link(name = "foo", kind = "raw-dylib", import_name_type = "decorated")] //~^ ERROR import name type is only supported on x86 extern "C" { } diff --git a/tests/ui/rfcs/rfc-2627-raw-dylib/invalid-dlltool.rs b/tests/ui/rfcs/rfc-2627-raw-dylib/invalid-dlltool.rs index a07be9d92b4..ac6a2998a47 100644 --- a/tests/ui/rfcs/rfc-2627-raw-dylib/invalid-dlltool.rs +++ b/tests/ui/rfcs/rfc-2627-raw-dylib/invalid-dlltool.rs @@ -1,8 +1,8 @@ // Tests that failing to run dlltool will raise an error. -// only-gnu -// only-windows -// compile-flags: --crate-type lib --emit link -Cdlltool=does_not_exit.exe +//@ only-gnu +//@ only-windows +//@ compile-flags: --crate-type lib --emit link -Cdlltool=does_not_exit.exe #[link(name = "foo", kind = "raw-dylib")] extern "C" { fn f(x: i32); diff --git a/tests/ui/rfcs/rfc-2627-raw-dylib/link-ordinal-multiple.rs b/tests/ui/rfcs/rfc-2627-raw-dylib/link-ordinal-multiple.rs index 8842cb94404..f5fb1649cdc 100644 --- a/tests/ui/rfcs/rfc-2627-raw-dylib/link-ordinal-multiple.rs +++ b/tests/ui/rfcs/rfc-2627-raw-dylib/link-ordinal-multiple.rs @@ -1,4 +1,4 @@ -// only-windows +//@ only-windows #[link(name = "foo", kind = "raw-dylib")] extern "C" { #[link_ordinal(1)] //~ ERROR multiple `link_ordinal` attributes diff --git a/tests/ui/rfcs/rfc-2627-raw-dylib/multiple-declarations.rs b/tests/ui/rfcs/rfc-2627-raw-dylib/multiple-declarations.rs index b4173f3b60b..bf3c5e4d435 100644 --- a/tests/ui/rfcs/rfc-2627-raw-dylib/multiple-declarations.rs +++ b/tests/ui/rfcs/rfc-2627-raw-dylib/multiple-declarations.rs @@ -1,6 +1,6 @@ -// only-x86 -// only-windows -// compile-flags: --crate-type lib --emit link +//@ only-x86 +//@ only-windows +//@ compile-flags: --crate-type lib --emit link #![allow(clashing_extern_declarations)] #[link(name = "foo", kind = "raw-dylib")] extern "C" { diff --git a/tests/ui/rfcs/rfc-2627-raw-dylib/raw-dylib-windows-only.rs b/tests/ui/rfcs/rfc-2627-raw-dylib/raw-dylib-windows-only.rs index d4c6658a330..3b982857db8 100644 --- a/tests/ui/rfcs/rfc-2627-raw-dylib/raw-dylib-windows-only.rs +++ b/tests/ui/rfcs/rfc-2627-raw-dylib/raw-dylib-windows-only.rs @@ -1,5 +1,5 @@ -// ignore-windows -// compile-flags: --crate-type lib +//@ ignore-windows +//@ compile-flags: --crate-type lib #[link(name = "foo", kind = "raw-dylib")] //~^ ERROR: link kind `raw-dylib` is only supported on Windows targets extern "C" {} diff --git a/tests/ui/rfcs/rfc-2627-raw-dylib/unsupported-abi.rs b/tests/ui/rfcs/rfc-2627-raw-dylib/unsupported-abi.rs index 2f5a23e47a7..48af6b009d3 100644 --- a/tests/ui/rfcs/rfc-2627-raw-dylib/unsupported-abi.rs +++ b/tests/ui/rfcs/rfc-2627-raw-dylib/unsupported-abi.rs @@ -1,6 +1,6 @@ -// only-x86_64 -// only-windows -// compile-flags: --crate-type lib --emit link +//@ only-x86_64 +//@ only-windows +//@ compile-flags: --crate-type lib --emit link #[link(name = "foo", kind = "raw-dylib")] extern "stdcall" { fn f(x: i32); diff --git a/tests/ui/rfcs/rfc-2632-const-trait-impl/assoc-type-const-bound-usage-0.rs b/tests/ui/rfcs/rfc-2632-const-trait-impl/assoc-type-const-bound-usage-0.rs index d8573d3af01..6b55e82629b 100644 --- a/tests/ui/rfcs/rfc-2632-const-trait-impl/assoc-type-const-bound-usage-0.rs +++ b/tests/ui/rfcs/rfc-2632-const-trait-impl/assoc-type-const-bound-usage-0.rs @@ -1,7 +1,7 @@ // FIXME(effects): Collapse the revisions into one once we support `::Proj`. -// revisions: unqualified qualified -//[unqualified] check-pass -//[qualified] known-bug: unknown +//@ revisions: unqualified qualified +//@[unqualified] check-pass +//@[qualified] known-bug: unknown #![feature(const_trait_impl, effects)] diff --git a/tests/ui/rfcs/rfc-2632-const-trait-impl/assoc-type-const-bound-usage-1.rs b/tests/ui/rfcs/rfc-2632-const-trait-impl/assoc-type-const-bound-usage-1.rs index 2190fa337b4..8213dae1369 100644 --- a/tests/ui/rfcs/rfc-2632-const-trait-impl/assoc-type-const-bound-usage-1.rs +++ b/tests/ui/rfcs/rfc-2632-const-trait-impl/assoc-type-const-bound-usage-1.rs @@ -1,7 +1,7 @@ // FIXME(effects): Collapse the revisions into one once we support `::Proj`. -// revisions: unqualified qualified -//[unqualified] check-pass -//[qualified] known-bug: unknown +//@ revisions: unqualified qualified +//@[unqualified] check-pass +//@[qualified] known-bug: unknown #![feature(const_trait_impl, effects, generic_const_exprs)] #![allow(incomplete_features)] diff --git a/tests/ui/rfcs/rfc-2632-const-trait-impl/call-const-trait-method-pass.rs b/tests/ui/rfcs/rfc-2632-const-trait-impl/call-const-trait-method-pass.rs index ae0c2e6bcfa..b854b422b3a 100644 --- a/tests/ui/rfcs/rfc-2632-const-trait-impl/call-const-trait-method-pass.rs +++ b/tests/ui/rfcs/rfc-2632-const-trait-impl/call-const-trait-method-pass.rs @@ -1,4 +1,4 @@ -// known-bug: #110395 +//@ known-bug: #110395 #![feature(const_trait_impl)] diff --git a/tests/ui/rfcs/rfc-2632-const-trait-impl/call-generic-in-impl.rs b/tests/ui/rfcs/rfc-2632-const-trait-impl/call-generic-in-impl.rs index 50c46579086..b63458b39e9 100644 --- a/tests/ui/rfcs/rfc-2632-const-trait-impl/call-generic-in-impl.rs +++ b/tests/ui/rfcs/rfc-2632-const-trait-impl/call-generic-in-impl.rs @@ -1,4 +1,4 @@ -// check-pass +//@ check-pass #![feature(const_trait_impl)] #[const_trait] diff --git a/tests/ui/rfcs/rfc-2632-const-trait-impl/call-generic-method-chain.rs b/tests/ui/rfcs/rfc-2632-const-trait-impl/call-generic-method-chain.rs index 0df370bff8d..37b2de0fd2d 100644 --- a/tests/ui/rfcs/rfc-2632-const-trait-impl/call-generic-method-chain.rs +++ b/tests/ui/rfcs/rfc-2632-const-trait-impl/call-generic-method-chain.rs @@ -1,6 +1,6 @@ //! Basic test for calling methods on generic type parameters in `const fn`. -// check-pass +//@ check-pass #![feature(const_trait_impl, effects)] diff --git a/tests/ui/rfcs/rfc-2632-const-trait-impl/call-generic-method-dup-bound.rs b/tests/ui/rfcs/rfc-2632-const-trait-impl/call-generic-method-dup-bound.rs index b0d5d068515..ea8fd005561 100644 --- a/tests/ui/rfcs/rfc-2632-const-trait-impl/call-generic-method-dup-bound.rs +++ b/tests/ui/rfcs/rfc-2632-const-trait-impl/call-generic-method-dup-bound.rs @@ -1,4 +1,4 @@ -// check-pass +//@ check-pass #![feature(const_trait_impl, effects)] diff --git a/tests/ui/rfcs/rfc-2632-const-trait-impl/call-generic-method-nonconst-bound.rs b/tests/ui/rfcs/rfc-2632-const-trait-impl/call-generic-method-nonconst-bound.rs index e197c8b73c5..9dbc2b95626 100644 --- a/tests/ui/rfcs/rfc-2632-const-trait-impl/call-generic-method-nonconst-bound.rs +++ b/tests/ui/rfcs/rfc-2632-const-trait-impl/call-generic-method-nonconst-bound.rs @@ -1,4 +1,4 @@ -// check-pass +//@ check-pass struct S; diff --git a/tests/ui/rfcs/rfc-2632-const-trait-impl/call-generic-method-pass.rs b/tests/ui/rfcs/rfc-2632-const-trait-impl/call-generic-method-pass.rs index abd5d2fdb39..55d8afa8d47 100644 --- a/tests/ui/rfcs/rfc-2632-const-trait-impl/call-generic-method-pass.rs +++ b/tests/ui/rfcs/rfc-2632-const-trait-impl/call-generic-method-pass.rs @@ -1,6 +1,6 @@ //! Basic test for calling methods on generic type parameters in `const fn`. -// check-pass +//@ check-pass #![feature(const_trait_impl, effects)] diff --git a/tests/ui/rfcs/rfc-2632-const-trait-impl/call.rs b/tests/ui/rfcs/rfc-2632-const-trait-impl/call.rs index e85976b7e1d..1150d7e1059 100644 --- a/tests/ui/rfcs/rfc-2632-const-trait-impl/call.rs +++ b/tests/ui/rfcs/rfc-2632-const-trait-impl/call.rs @@ -1,4 +1,4 @@ -// check-pass +//@ check-pass #![feature(const_closures, const_trait_impl, effects)] #![allow(incomplete_features)] diff --git a/tests/ui/rfcs/rfc-2632-const-trait-impl/const-and-non-const-impl.rs b/tests/ui/rfcs/rfc-2632-const-trait-impl/const-and-non-const-impl.rs index 9ba19e800dd..6b96fcf0ae3 100644 --- a/tests/ui/rfcs/rfc-2632-const-trait-impl/const-and-non-const-impl.rs +++ b/tests/ui/rfcs/rfc-2632-const-trait-impl/const-and-non-const-impl.rs @@ -1,4 +1,4 @@ -// known-bug: #110395 +//@ known-bug: #110395 #![feature(const_trait_impl)] diff --git a/tests/ui/rfcs/rfc-2632-const-trait-impl/const-closure-parse-not-item.rs b/tests/ui/rfcs/rfc-2632-const-trait-impl/const-closure-parse-not-item.rs index 15f062edf0e..b1b0e68b90d 100644 --- a/tests/ui/rfcs/rfc-2632-const-trait-impl/const-closure-parse-not-item.rs +++ b/tests/ui/rfcs/rfc-2632-const-trait-impl/const-closure-parse-not-item.rs @@ -1,4 +1,4 @@ -// known-bug: #110395 +//@ known-bug: #110395 // FIXME check-pass #![feature(const_trait_impl, const_closures)] diff --git a/tests/ui/rfcs/rfc-2632-const-trait-impl/const-closure-trait-method-fail.rs b/tests/ui/rfcs/rfc-2632-const-trait-impl/const-closure-trait-method-fail.rs index b4cc7a9e17e..8c6286426d3 100644 --- a/tests/ui/rfcs/rfc-2632-const-trait-impl/const-closure-trait-method-fail.rs +++ b/tests/ui/rfcs/rfc-2632-const-trait-impl/const-closure-trait-method-fail.rs @@ -1,4 +1,4 @@ -// known-bug: #110395 +//@ known-bug: #110395 #![feature(const_trait_impl)] diff --git a/tests/ui/rfcs/rfc-2632-const-trait-impl/const-closure-trait-method.rs b/tests/ui/rfcs/rfc-2632-const-trait-impl/const-closure-trait-method.rs index fd9f287250d..ebee4daefbe 100644 --- a/tests/ui/rfcs/rfc-2632-const-trait-impl/const-closure-trait-method.rs +++ b/tests/ui/rfcs/rfc-2632-const-trait-impl/const-closure-trait-method.rs @@ -1,4 +1,4 @@ -// known-bug: #110395 +//@ known-bug: #110395 // FIXME check-pass #![feature(const_trait_impl)] diff --git a/tests/ui/rfcs/rfc-2632-const-trait-impl/const-closures.rs b/tests/ui/rfcs/rfc-2632-const-trait-impl/const-closures.rs index 1fe4044d527..98f8d039cd6 100644 --- a/tests/ui/rfcs/rfc-2632-const-trait-impl/const-closures.rs +++ b/tests/ui/rfcs/rfc-2632-const-trait-impl/const-closures.rs @@ -1,4 +1,4 @@ -// known-bug: #110395 +//@ known-bug: #110395 // FIXME check-pass #![feature(const_trait_impl)] diff --git a/tests/ui/rfcs/rfc-2632-const-trait-impl/const-drop-bound.rs b/tests/ui/rfcs/rfc-2632-const-trait-impl/const-drop-bound.rs index 7f89c12804b..b0790f86ef5 100644 --- a/tests/ui/rfcs/rfc-2632-const-trait-impl/const-drop-bound.rs +++ b/tests/ui/rfcs/rfc-2632-const-trait-impl/const-drop-bound.rs @@ -1,4 +1,4 @@ -// known-bug: #110395 +//@ known-bug: #110395 // FIXME check-pass #![feature(const_trait_impl)] diff --git a/tests/ui/rfcs/rfc-2632-const-trait-impl/const-drop-fail-2.rs b/tests/ui/rfcs/rfc-2632-const-trait-impl/const-drop-fail-2.rs index 747ccbf0fab..17817a460d7 100644 --- a/tests/ui/rfcs/rfc-2632-const-trait-impl/const-drop-fail-2.rs +++ b/tests/ui/rfcs/rfc-2632-const-trait-impl/const-drop-fail-2.rs @@ -1,4 +1,4 @@ -// known-bug: #110395 +//@ known-bug: #110395 #![feature(const_trait_impl)] #![feature(const_mut_refs)] #![cfg_attr(precise, feature(const_precise_live_drops))] diff --git a/tests/ui/rfcs/rfc-2632-const-trait-impl/const-drop-fail.rs b/tests/ui/rfcs/rfc-2632-const-trait-impl/const-drop-fail.rs index 1c37648ff1c..a9640816b89 100644 --- a/tests/ui/rfcs/rfc-2632-const-trait-impl/const-drop-fail.rs +++ b/tests/ui/rfcs/rfc-2632-const-trait-impl/const-drop-fail.rs @@ -1,6 +1,6 @@ -// known-bug: #110395 +//@ known-bug: #110395 -// revisions: stock precise +//@ revisions: stock precise #![feature(const_trait_impl)] #![feature(const_mut_refs)] #![cfg_attr(precise, feature(const_precise_live_drops))] diff --git a/tests/ui/rfcs/rfc-2632-const-trait-impl/const-drop.rs b/tests/ui/rfcs/rfc-2632-const-trait-impl/const-drop.rs index 75797b1cbfe..4ab1704a9fb 100644 --- a/tests/ui/rfcs/rfc-2632-const-trait-impl/const-drop.rs +++ b/tests/ui/rfcs/rfc-2632-const-trait-impl/const-drop.rs @@ -1,6 +1,6 @@ // FIXME run-pass -// known-bug: #110395 -// revisions: stock precise +//@ known-bug: #110395 +//@ revisions: stock precise #![feature(const_trait_impl)] #![feature(const_mut_refs)] #![feature(never_type)] diff --git a/tests/ui/rfcs/rfc-2632-const-trait-impl/const-fns-are-early-bound.rs b/tests/ui/rfcs/rfc-2632-const-trait-impl/const-fns-are-early-bound.rs index f3480fcc9ee..f6bba19a19e 100644 --- a/tests/ui/rfcs/rfc-2632-const-trait-impl/const-fns-are-early-bound.rs +++ b/tests/ui/rfcs/rfc-2632-const-trait-impl/const-fns-are-early-bound.rs @@ -1,4 +1,4 @@ -// check-pass +//@ check-pass #![crate_type = "lib"] #![allow(internal_features)] diff --git a/tests/ui/rfcs/rfc-2632-const-trait-impl/const-impl-requires-const-trait.rs b/tests/ui/rfcs/rfc-2632-const-trait-impl/const-impl-requires-const-trait.rs index fc3a83876c5..bd6f476f879 100644 --- a/tests/ui/rfcs/rfc-2632-const-trait-impl/const-impl-requires-const-trait.rs +++ b/tests/ui/rfcs/rfc-2632-const-trait-impl/const-impl-requires-const-trait.rs @@ -1,4 +1,4 @@ -// known-bug: #110395 +//@ known-bug: #110395 #![feature(const_trait_impl, effects)] diff --git a/tests/ui/rfcs/rfc-2632-const-trait-impl/const-impl-trait.rs b/tests/ui/rfcs/rfc-2632-const-trait-impl/const-impl-trait.rs index 9d579e67a4b..91f1b90bdc0 100644 --- a/tests/ui/rfcs/rfc-2632-const-trait-impl/const-impl-trait.rs +++ b/tests/ui/rfcs/rfc-2632-const-trait-impl/const-impl-trait.rs @@ -1,4 +1,4 @@ -// known-bug: #110395 +//@ known-bug: #110395 // Broken until we have `&T: const Deref` impl in stdlib #![allow(incomplete_features)] diff --git a/tests/ui/rfcs/rfc-2632-const-trait-impl/const-trait-bounds-trait-objects.rs b/tests/ui/rfcs/rfc-2632-const-trait-impl/const-trait-bounds-trait-objects.rs index a00a6d48105..79719dae44f 100644 --- a/tests/ui/rfcs/rfc-2632-const-trait-impl/const-trait-bounds-trait-objects.rs +++ b/tests/ui/rfcs/rfc-2632-const-trait-impl/const-trait-bounds-trait-objects.rs @@ -1,5 +1,5 @@ #![feature(const_trait_impl, effects)] -// edition: 2021 +//@ edition: 2021 #[const_trait] trait Trait {} diff --git a/tests/ui/rfcs/rfc-2632-const-trait-impl/const-trait-bounds.rs b/tests/ui/rfcs/rfc-2632-const-trait-impl/const-trait-bounds.rs index 1ebebe632c7..cf452cf8526 100644 --- a/tests/ui/rfcs/rfc-2632-const-trait-impl/const-trait-bounds.rs +++ b/tests/ui/rfcs/rfc-2632-const-trait-impl/const-trait-bounds.rs @@ -1,4 +1,4 @@ -// check-pass +//@ check-pass #![feature(const_trait_impl, effects, generic_const_exprs)] #![allow(incomplete_features)] diff --git a/tests/ui/rfcs/rfc-2632-const-trait-impl/const_derives/derive-const-non-const-type.rs b/tests/ui/rfcs/rfc-2632-const-trait-impl/const_derives/derive-const-non-const-type.rs index ce39045d71b..5896091f8c4 100644 --- a/tests/ui/rfcs/rfc-2632-const-trait-impl/const_derives/derive-const-non-const-type.rs +++ b/tests/ui/rfcs/rfc-2632-const-trait-impl/const_derives/derive-const-non-const-type.rs @@ -1,4 +1,4 @@ -// known-bug: #110395 +//@ known-bug: #110395 #![feature(derive_const, effects)] pub struct A; diff --git a/tests/ui/rfcs/rfc-2632-const-trait-impl/const_derives/derive-const-use.rs b/tests/ui/rfcs/rfc-2632-const-trait-impl/const_derives/derive-const-use.rs index 42d7283699f..cb649b1ec79 100644 --- a/tests/ui/rfcs/rfc-2632-const-trait-impl/const_derives/derive-const-use.rs +++ b/tests/ui/rfcs/rfc-2632-const-trait-impl/const_derives/derive-const-use.rs @@ -1,4 +1,4 @@ -// known-bug: #110395 +//@ known-bug: #110395 #![feature(const_trait_impl, const_cmp, const_default_impls, derive_const, effects)] diff --git a/tests/ui/rfcs/rfc-2632-const-trait-impl/const_derives/derive-const-with-params.rs b/tests/ui/rfcs/rfc-2632-const-trait-impl/const_derives/derive-const-with-params.rs index b479c967b0d..0eb422728c6 100644 --- a/tests/ui/rfcs/rfc-2632-const-trait-impl/const_derives/derive-const-with-params.rs +++ b/tests/ui/rfcs/rfc-2632-const-trait-impl/const_derives/derive-const-with-params.rs @@ -1,4 +1,4 @@ -// check-pass +//@ check-pass #![feature(derive_const)] #![feature(const_trait_impl, effects)] diff --git a/tests/ui/rfcs/rfc-2632-const-trait-impl/cross-crate-default-method-body-is-const.rs b/tests/ui/rfcs/rfc-2632-const-trait-impl/cross-crate-default-method-body-is-const.rs index 34a0ba1e271..54e5c95c259 100644 --- a/tests/ui/rfcs/rfc-2632-const-trait-impl/cross-crate-default-method-body-is-const.rs +++ b/tests/ui/rfcs/rfc-2632-const-trait-impl/cross-crate-default-method-body-is-const.rs @@ -1,11 +1,11 @@ // This tests that `const_trait` default methods can // be called from a const context when used across crates. // -// check-pass +//@ check-pass #![feature(const_trait_impl, effects)] -// aux-build: cross-crate.rs +//@ aux-build: cross-crate.rs extern crate cross_crate; use cross_crate::*; diff --git a/tests/ui/rfcs/rfc-2632-const-trait-impl/cross-crate.rs b/tests/ui/rfcs/rfc-2632-const-trait-impl/cross-crate.rs index 95edbdc0efa..587dd70c18b 100644 --- a/tests/ui/rfcs/rfc-2632-const-trait-impl/cross-crate.rs +++ b/tests/ui/rfcs/rfc-2632-const-trait-impl/cross-crate.rs @@ -1,8 +1,8 @@ -// revisions: stock gated stocknc gatednc -// [gated] check-pass +//@ revisions: stock gated stocknc gatednc +//@ [gated] check-pass #![cfg_attr(any(gated, gatednc), feature(const_trait_impl, effects))] -// aux-build: cross-crate.rs +//@ aux-build: cross-crate.rs extern crate cross_crate; use cross_crate::*; diff --git a/tests/ui/rfcs/rfc-2632-const-trait-impl/default-method-body-is-const-body-checking.rs b/tests/ui/rfcs/rfc-2632-const-trait-impl/default-method-body-is-const-body-checking.rs index f5644c8883d..b534d23b107 100644 --- a/tests/ui/rfcs/rfc-2632-const-trait-impl/default-method-body-is-const-body-checking.rs +++ b/tests/ui/rfcs/rfc-2632-const-trait-impl/default-method-body-is-const-body-checking.rs @@ -1,5 +1,5 @@ -// known-bug: #110395 -// check-pass +//@ known-bug: #110395 +//@ check-pass #![feature(const_trait_impl)] diff --git a/tests/ui/rfcs/rfc-2632-const-trait-impl/default-method-body-is-const-with-staged-api.rs b/tests/ui/rfcs/rfc-2632-const-trait-impl/default-method-body-is-const-with-staged-api.rs index 13881e042a3..8b264ebd0e4 100644 --- a/tests/ui/rfcs/rfc-2632-const-trait-impl/default-method-body-is-const-with-staged-api.rs +++ b/tests/ui/rfcs/rfc-2632-const-trait-impl/default-method-body-is-const-with-staged-api.rs @@ -1,4 +1,4 @@ -// check-pass +//@ check-pass // This was an ICE, because the compiler ensures the // function to be const when performing const checking, diff --git a/tests/ui/rfcs/rfc-2632-const-trait-impl/do-not-const-check-override.rs b/tests/ui/rfcs/rfc-2632-const-trait-impl/do-not-const-check-override.rs index 5a0db816a2b..8b51f65fd04 100644 --- a/tests/ui/rfcs/rfc-2632-const-trait-impl/do-not-const-check-override.rs +++ b/tests/ui/rfcs/rfc-2632-const-trait-impl/do-not-const-check-override.rs @@ -1,4 +1,4 @@ -// check-pass +//@ check-pass #![feature(const_trait_impl, rustc_attrs, effects)] #[const_trait] diff --git a/tests/ui/rfcs/rfc-2632-const-trait-impl/do-not-const-check.rs b/tests/ui/rfcs/rfc-2632-const-trait-impl/do-not-const-check.rs index 3c39c53de5f..443b6385735 100644 --- a/tests/ui/rfcs/rfc-2632-const-trait-impl/do-not-const-check.rs +++ b/tests/ui/rfcs/rfc-2632-const-trait-impl/do-not-const-check.rs @@ -1,4 +1,4 @@ -// check-pass +//@ check-pass #![feature(const_trait_impl, rustc_attrs)] #[const_trait] diff --git a/tests/ui/rfcs/rfc-2632-const-trait-impl/effects/const_closure-const_trait_impl-ice-113381.rs b/tests/ui/rfcs/rfc-2632-const-trait-impl/effects/const_closure-const_trait_impl-ice-113381.rs index 7d811a2cc1f..a1c0425b24e 100644 --- a/tests/ui/rfcs/rfc-2632-const-trait-impl/effects/const_closure-const_trait_impl-ice-113381.rs +++ b/tests/ui/rfcs/rfc-2632-const-trait-impl/effects/const_closure-const_trait_impl-ice-113381.rs @@ -1,4 +1,4 @@ -// check-pass +//@ check-pass // FIXME(effects) this shouldn't pass #![feature(const_closures, const_trait_impl, effects)] #![allow(incomplete_features)] diff --git a/tests/ui/rfcs/rfc-2632-const-trait-impl/effects/effect-param-infer.rs b/tests/ui/rfcs/rfc-2632-const-trait-impl/effects/effect-param-infer.rs index e216f687913..d35e9bb7f1e 100644 --- a/tests/ui/rfcs/rfc-2632-const-trait-impl/effects/effect-param-infer.rs +++ b/tests/ui/rfcs/rfc-2632-const-trait-impl/effects/effect-param-infer.rs @@ -1,7 +1,7 @@ // Ensure that we don't get a mismatch error when inserting the host param // at the end of generic args when the generics have defaulted params. // -// check-pass +//@ check-pass #![feature(const_trait_impl, effects)] diff --git a/tests/ui/rfcs/rfc-2632-const-trait-impl/effects/fallback.rs b/tests/ui/rfcs/rfc-2632-const-trait-impl/effects/fallback.rs index da2778f6101..aa75aa9c989 100644 --- a/tests/ui/rfcs/rfc-2632-const-trait-impl/effects/fallback.rs +++ b/tests/ui/rfcs/rfc-2632-const-trait-impl/effects/fallback.rs @@ -1,4 +1,4 @@ -// check-pass +//@ check-pass #![feature(effects)] diff --git a/tests/ui/rfcs/rfc-2632-const-trait-impl/effects/helloworld.rs b/tests/ui/rfcs/rfc-2632-const-trait-impl/effects/helloworld.rs index 17f203e1565..502062a559c 100644 --- a/tests/ui/rfcs/rfc-2632-const-trait-impl/effects/helloworld.rs +++ b/tests/ui/rfcs/rfc-2632-const-trait-impl/effects/helloworld.rs @@ -1,4 +1,4 @@ -// check-pass +//@ check-pass // gate-test-effects // ^ effects doesn't have a gate so we will trick tidy into thinking this is a gate test diff --git a/tests/ui/rfcs/rfc-2632-const-trait-impl/effects/ice-113375-index-out-of-bounds-generics.rs b/tests/ui/rfcs/rfc-2632-const-trait-impl/effects/ice-113375-index-out-of-bounds-generics.rs index 1954d2942e0..53f8e3c56d7 100644 --- a/tests/ui/rfcs/rfc-2632-const-trait-impl/effects/ice-113375-index-out-of-bounds-generics.rs +++ b/tests/ui/rfcs/rfc-2632-const-trait-impl/effects/ice-113375-index-out-of-bounds-generics.rs @@ -1,4 +1,4 @@ -// check-pass +//@ check-pass // effects ice https://github.com/rust-lang/rust/issues/113375 index out of bounds diff --git a/tests/ui/rfcs/rfc-2632-const-trait-impl/effects/infer-fallback.rs b/tests/ui/rfcs/rfc-2632-const-trait-impl/effects/infer-fallback.rs index 2f474d978d3..85aabe46640 100644 --- a/tests/ui/rfcs/rfc-2632-const-trait-impl/effects/infer-fallback.rs +++ b/tests/ui/rfcs/rfc-2632-const-trait-impl/effects/infer-fallback.rs @@ -1,4 +1,4 @@ -// check-pass +//@ check-pass #![feature(const_trait_impl, effects)] const fn a() {} diff --git a/tests/ui/rfcs/rfc-2632-const-trait-impl/effects/minicore.rs b/tests/ui/rfcs/rfc-2632-const-trait-impl/effects/minicore.rs index d6a82ca3a08..5ee38078a29 100644 --- a/tests/ui/rfcs/rfc-2632-const-trait-impl/effects/minicore.rs +++ b/tests/ui/rfcs/rfc-2632-const-trait-impl/effects/minicore.rs @@ -1,4 +1,4 @@ -// check-pass +//@ check-pass #![crate_type = "lib"] #![feature(no_core, lang_items, unboxed_closures, auto_traits, intrinsics, rustc_attrs, staged_api)] diff --git a/tests/ui/rfcs/rfc-2632-const-trait-impl/effects/no-explicit-const-params-cross-crate.rs b/tests/ui/rfcs/rfc-2632-const-trait-impl/effects/no-explicit-const-params-cross-crate.rs index 8e4850197de..97052a1d09a 100644 --- a/tests/ui/rfcs/rfc-2632-const-trait-impl/effects/no-explicit-const-params-cross-crate.rs +++ b/tests/ui/rfcs/rfc-2632-const-trait-impl/effects/no-explicit-const-params-cross-crate.rs @@ -1,4 +1,4 @@ -// aux-build: cross-crate.rs +//@ aux-build: cross-crate.rs extern crate cross_crate; use cross_crate::{Bar, foo}; diff --git a/tests/ui/rfcs/rfc-2632-const-trait-impl/effects/project.rs b/tests/ui/rfcs/rfc-2632-const-trait-impl/effects/project.rs index e22eed3e0ef..0592ac2e0e7 100644 --- a/tests/ui/rfcs/rfc-2632-const-trait-impl/effects/project.rs +++ b/tests/ui/rfcs/rfc-2632-const-trait-impl/effects/project.rs @@ -1,4 +1,4 @@ -// known-bug: #110395 +//@ known-bug: #110395 // FIXME: effects #![feature(const_trait_impl, effects)] diff --git a/tests/ui/rfcs/rfc-2632-const-trait-impl/feature-gate.rs b/tests/ui/rfcs/rfc-2632-const-trait-impl/feature-gate.rs index 015d90aaf21..c36ec3538c3 100644 --- a/tests/ui/rfcs/rfc-2632-const-trait-impl/feature-gate.rs +++ b/tests/ui/rfcs/rfc-2632-const-trait-impl/feature-gate.rs @@ -1,4 +1,4 @@ -// revisions: stock gated +//@ revisions: stock gated // gate-test-const_trait_impl #![cfg_attr(gated, feature(const_trait_impl))] diff --git a/tests/ui/rfcs/rfc-2632-const-trait-impl/function-pointer-does-not-require-const.rs b/tests/ui/rfcs/rfc-2632-const-trait-impl/function-pointer-does-not-require-const.rs index 60790e29746..61826e9977e 100644 --- a/tests/ui/rfcs/rfc-2632-const-trait-impl/function-pointer-does-not-require-const.rs +++ b/tests/ui/rfcs/rfc-2632-const-trait-impl/function-pointer-does-not-require-const.rs @@ -1,4 +1,4 @@ -// check-pass +//@ check-pass #![feature(const_trait_impl)] #[const_trait] diff --git a/tests/ui/rfcs/rfc-2632-const-trait-impl/generic-bound.rs b/tests/ui/rfcs/rfc-2632-const-trait-impl/generic-bound.rs index d665c4479c9..620e3259917 100644 --- a/tests/ui/rfcs/rfc-2632-const-trait-impl/generic-bound.rs +++ b/tests/ui/rfcs/rfc-2632-const-trait-impl/generic-bound.rs @@ -1,4 +1,4 @@ -// known-bug: #110395 +//@ known-bug: #110395 #![feature(const_trait_impl)] diff --git a/tests/ui/rfcs/rfc-2632-const-trait-impl/impl-with-default-fn-pass.rs b/tests/ui/rfcs/rfc-2632-const-trait-impl/impl-with-default-fn-pass.rs index ae81421e9e1..c6fab4aabb6 100644 --- a/tests/ui/rfcs/rfc-2632-const-trait-impl/impl-with-default-fn-pass.rs +++ b/tests/ui/rfcs/rfc-2632-const-trait-impl/impl-with-default-fn-pass.rs @@ -1,4 +1,4 @@ -// check-pass +//@ check-pass #![feature(const_trait_impl)] diff --git a/tests/ui/rfcs/rfc-2632-const-trait-impl/inherent-impl-const-bounds.rs b/tests/ui/rfcs/rfc-2632-const-trait-impl/inherent-impl-const-bounds.rs index f8ac793e4c1..5ead1353bcd 100644 --- a/tests/ui/rfcs/rfc-2632-const-trait-impl/inherent-impl-const-bounds.rs +++ b/tests/ui/rfcs/rfc-2632-const-trait-impl/inherent-impl-const-bounds.rs @@ -1,4 +1,4 @@ -// check-pass +//@ check-pass #![feature(const_trait_impl)] struct S; diff --git a/tests/ui/rfcs/rfc-2632-const-trait-impl/issue-100222.rs b/tests/ui/rfcs/rfc-2632-const-trait-impl/issue-100222.rs index 9f3f38ad4bc..2a40a1b86ca 100644 --- a/tests/ui/rfcs/rfc-2632-const-trait-impl/issue-100222.rs +++ b/tests/ui/rfcs/rfc-2632-const-trait-impl/issue-100222.rs @@ -1,5 +1,5 @@ -// revisions: nn ny yn yy -// check-pass +//@ revisions: nn ny yn yy +//@ check-pass #![feature(const_trait_impl, associated_type_defaults, const_mut_refs)] #[cfg_attr(any(yn, yy), const_trait)] diff --git a/tests/ui/rfcs/rfc-2632-const-trait-impl/issue-102985.rs b/tests/ui/rfcs/rfc-2632-const-trait-impl/issue-102985.rs index df242721bc3..e5394ddd688 100644 --- a/tests/ui/rfcs/rfc-2632-const-trait-impl/issue-102985.rs +++ b/tests/ui/rfcs/rfc-2632-const-trait-impl/issue-102985.rs @@ -1,4 +1,4 @@ -// known-bug: #110395 +//@ known-bug: #110395 #![feature(const_trait_impl)] struct Bug { diff --git a/tests/ui/rfcs/rfc-2632-const-trait-impl/issue-103677.rs b/tests/ui/rfcs/rfc-2632-const-trait-impl/issue-103677.rs index d81724a3685..c032cc7a688 100644 --- a/tests/ui/rfcs/rfc-2632-const-trait-impl/issue-103677.rs +++ b/tests/ui/rfcs/rfc-2632-const-trait-impl/issue-103677.rs @@ -1,4 +1,4 @@ -// check-pass +//@ check-pass const _: fn(&String) = |s| { &*s as &str; }; diff --git a/tests/ui/rfcs/rfc-2632-const-trait-impl/issue-88155.rs b/tests/ui/rfcs/rfc-2632-const-trait-impl/issue-88155.rs index 5127ec069be..08739de8313 100644 --- a/tests/ui/rfcs/rfc-2632-const-trait-impl/issue-88155.rs +++ b/tests/ui/rfcs/rfc-2632-const-trait-impl/issue-88155.rs @@ -1,4 +1,4 @@ -// known-bug: #110395 +//@ known-bug: #110395 #![feature(const_trait_impl)] diff --git a/tests/ui/rfcs/rfc-2632-const-trait-impl/issue-92111.rs b/tests/ui/rfcs/rfc-2632-const-trait-impl/issue-92111.rs index fdb422201d2..64fa32156c3 100644 --- a/tests/ui/rfcs/rfc-2632-const-trait-impl/issue-92111.rs +++ b/tests/ui/rfcs/rfc-2632-const-trait-impl/issue-92111.rs @@ -1,6 +1,6 @@ // Regression test for #92111. // -// known-bug: #110395 +//@ known-bug: #110395 // FIXME check-pass #![feature(const_trait_impl)] diff --git a/tests/ui/rfcs/rfc-2632-const-trait-impl/issue-92230-wf-super-trait-env.rs b/tests/ui/rfcs/rfc-2632-const-trait-impl/issue-92230-wf-super-trait-env.rs index 4d346965394..825ddb6a5cd 100644 --- a/tests/ui/rfcs/rfc-2632-const-trait-impl/issue-92230-wf-super-trait-env.rs +++ b/tests/ui/rfcs/rfc-2632-const-trait-impl/issue-92230-wf-super-trait-env.rs @@ -1,6 +1,6 @@ // Regression test for #92230. // -// check-pass +//@ check-pass #![feature(const_trait_impl)] diff --git a/tests/ui/rfcs/rfc-2632-const-trait-impl/match-non-const-eq.rs b/tests/ui/rfcs/rfc-2632-const-trait-impl/match-non-const-eq.rs index d06d0d6dd10..73f8af86bd0 100644 --- a/tests/ui/rfcs/rfc-2632-const-trait-impl/match-non-const-eq.rs +++ b/tests/ui/rfcs/rfc-2632-const-trait-impl/match-non-const-eq.rs @@ -1,5 +1,5 @@ -// known-bug: #110395 -// revisions: stock gated +//@ known-bug: #110395 +//@ revisions: stock gated #![cfg_attr(gated, feature(const_trait_impl))] const fn foo(input: &'static str) { diff --git a/tests/ui/rfcs/rfc-2632-const-trait-impl/mbe-bare-trait-objects-const-trait-bounds.rs b/tests/ui/rfcs/rfc-2632-const-trait-impl/mbe-bare-trait-objects-const-trait-bounds.rs index 2304a766aaf..820d3d63b62 100644 --- a/tests/ui/rfcs/rfc-2632-const-trait-impl/mbe-bare-trait-objects-const-trait-bounds.rs +++ b/tests/ui/rfcs/rfc-2632-const-trait-impl/mbe-bare-trait-objects-const-trait-bounds.rs @@ -6,7 +6,7 @@ // `?$Trait:path` would never be reached. // See `parser/macro/mbe-bare-trait-object-maybe-trait-bound.rs`. -// check-pass +//@ check-pass macro_rules! check { ($Type:ty) => { compile_error!("ty"); }; diff --git a/tests/ui/rfcs/rfc-2632-const-trait-impl/mbe-const-trait-bound-theoretical-regression.rs b/tests/ui/rfcs/rfc-2632-const-trait-impl/mbe-const-trait-bound-theoretical-regression.rs index 9105cb6b043..99806922ba5 100644 --- a/tests/ui/rfcs/rfc-2632-const-trait-impl/mbe-const-trait-bound-theoretical-regression.rs +++ b/tests/ui/rfcs/rfc-2632-const-trait-impl/mbe-const-trait-bound-theoretical-regression.rs @@ -2,7 +2,7 @@ // introduction of const trait bounds. // Setting the edition to 2018 since we don't regress `demo! { dyn const }` in Rust <2018. -// edition:2018 +//@ edition:2018 macro_rules! demo { ($ty:ty) => { compile_error!("ty"); }; diff --git a/tests/ui/rfcs/rfc-2632-const-trait-impl/mbe-dyn-const-2015.rs b/tests/ui/rfcs/rfc-2632-const-trait-impl/mbe-dyn-const-2015.rs index 817e9ee5257..9d65a2ac302 100644 --- a/tests/ui/rfcs/rfc-2632-const-trait-impl/mbe-dyn-const-2015.rs +++ b/tests/ui/rfcs/rfc-2632-const-trait-impl/mbe-dyn-const-2015.rs @@ -1,7 +1,7 @@ // Ensure that the introduction of const trait bound didn't regress this code in Rust 2015. // See also `mbe-const-trait-bound-theoretical-regression.rs`. -// check-pass +//@ check-pass macro_rules! check { ($ty:ty) => { compile_error!("ty"); }; diff --git a/tests/ui/rfcs/rfc-2632-const-trait-impl/nested-closure.rs b/tests/ui/rfcs/rfc-2632-const-trait-impl/nested-closure.rs index 0b423b34022..d43fabcedec 100644 --- a/tests/ui/rfcs/rfc-2632-const-trait-impl/nested-closure.rs +++ b/tests/ui/rfcs/rfc-2632-const-trait-impl/nested-closure.rs @@ -1,4 +1,4 @@ -// check-pass +//@ check-pass #![feature(const_trait_impl, lazy_cell)] diff --git a/tests/ui/rfcs/rfc-2632-const-trait-impl/non-const-op-in-closure-in-const.rs b/tests/ui/rfcs/rfc-2632-const-trait-impl/non-const-op-in-closure-in-const.rs index dff8a244453..8f11c8a6e55 100644 --- a/tests/ui/rfcs/rfc-2632-const-trait-impl/non-const-op-in-closure-in-const.rs +++ b/tests/ui/rfcs/rfc-2632-const-trait-impl/non-const-op-in-closure-in-const.rs @@ -1,4 +1,4 @@ -// known-bug: #110395 +//@ known-bug: #110395 #![feature(const_trait_impl)] diff --git a/tests/ui/rfcs/rfc-2632-const-trait-impl/specialization/const-default-bound-non-const-specialized-bound.rs b/tests/ui/rfcs/rfc-2632-const-trait-impl/specialization/const-default-bound-non-const-specialized-bound.rs index 234b0dd0063..fe4df09342f 100644 --- a/tests/ui/rfcs/rfc-2632-const-trait-impl/specialization/const-default-bound-non-const-specialized-bound.rs +++ b/tests/ui/rfcs/rfc-2632-const-trait-impl/specialization/const-default-bound-non-const-specialized-bound.rs @@ -1,6 +1,6 @@ // Tests that trait bounds on specializing trait impls must be `~const` if the // same bound is present on the default impl and is `~const` there. -// check-pass +//@ check-pass // FIXME(effects) ^ should error #![feature(const_trait_impl)] diff --git a/tests/ui/rfcs/rfc-2632-const-trait-impl/specialization/const-default-const-specialized.rs b/tests/ui/rfcs/rfc-2632-const-trait-impl/specialization/const-default-const-specialized.rs index b6cb24d15fe..6153e2770a4 100644 --- a/tests/ui/rfcs/rfc-2632-const-trait-impl/specialization/const-default-const-specialized.rs +++ b/tests/ui/rfcs/rfc-2632-const-trait-impl/specialization/const-default-const-specialized.rs @@ -1,7 +1,7 @@ // Tests that a const default trait impl can be specialized by another const // trait impl and that the specializing impl will be used during const-eval. -// run-pass +//@ run-pass #![feature(const_trait_impl, effects)] #![feature(min_specialization)] diff --git a/tests/ui/rfcs/rfc-2632-const-trait-impl/specialization/default-keyword.rs b/tests/ui/rfcs/rfc-2632-const-trait-impl/specialization/default-keyword.rs index 2aac0a2b4d1..bc45a70777c 100644 --- a/tests/ui/rfcs/rfc-2632-const-trait-impl/specialization/default-keyword.rs +++ b/tests/ui/rfcs/rfc-2632-const-trait-impl/specialization/default-keyword.rs @@ -1,4 +1,4 @@ -// check-pass +//@ check-pass #![feature(const_trait_impl)] #![feature(min_specialization)] diff --git a/tests/ui/rfcs/rfc-2632-const-trait-impl/specialization/issue-95186-specialize-on-tilde-const.rs b/tests/ui/rfcs/rfc-2632-const-trait-impl/specialization/issue-95186-specialize-on-tilde-const.rs index 92d8be6bb16..d80370aee82 100644 --- a/tests/ui/rfcs/rfc-2632-const-trait-impl/specialization/issue-95186-specialize-on-tilde-const.rs +++ b/tests/ui/rfcs/rfc-2632-const-trait-impl/specialization/issue-95186-specialize-on-tilde-const.rs @@ -1,6 +1,6 @@ // Tests that `~const` trait bounds can be used to specialize const trait impls. -// check-pass +//@ check-pass #![feature(const_trait_impl)] #![feature(rustc_attrs)] diff --git a/tests/ui/rfcs/rfc-2632-const-trait-impl/specialization/issue-95187-same-trait-bound-different-constness.rs b/tests/ui/rfcs/rfc-2632-const-trait-impl/specialization/issue-95187-same-trait-bound-different-constness.rs index 51bfaf73b57..d97469edaf9 100644 --- a/tests/ui/rfcs/rfc-2632-const-trait-impl/specialization/issue-95187-same-trait-bound-different-constness.rs +++ b/tests/ui/rfcs/rfc-2632-const-trait-impl/specialization/issue-95187-same-trait-bound-different-constness.rs @@ -2,7 +2,7 @@ // `T: Foo` in the default impl for the purposes of specialization (i.e., it // does not think that the user is attempting to specialize on trait `Foo`). -// check-pass +//@ check-pass #![feature(rustc_attrs)] #![feature(min_specialization)] diff --git a/tests/ui/rfcs/rfc-2632-const-trait-impl/specialization/non-const-default-const-specialized.rs b/tests/ui/rfcs/rfc-2632-const-trait-impl/specialization/non-const-default-const-specialized.rs index 84c7926f415..fc8fc3f2a1d 100644 --- a/tests/ui/rfcs/rfc-2632-const-trait-impl/specialization/non-const-default-const-specialized.rs +++ b/tests/ui/rfcs/rfc-2632-const-trait-impl/specialization/non-const-default-const-specialized.rs @@ -1,6 +1,6 @@ // Tests that a non-const default impl can be specialized by a const trait impl, // but that the default impl cannot be used in a const context. -// known-bug: #110395 +//@ known-bug: #110395 // FIXME run-pass #![feature(const_trait_impl, effects)] diff --git a/tests/ui/rfcs/rfc-2632-const-trait-impl/specializing-constness-2.rs b/tests/ui/rfcs/rfc-2632-const-trait-impl/specializing-constness-2.rs index e0c20b819e8..5218ea92566 100644 --- a/tests/ui/rfcs/rfc-2632-const-trait-impl/specializing-constness-2.rs +++ b/tests/ui/rfcs/rfc-2632-const-trait-impl/specializing-constness-2.rs @@ -1,5 +1,5 @@ #![feature(const_trait_impl, effects, min_specialization, rustc_attrs)] -// known-bug: #110395 +//@ known-bug: #110395 #[rustc_specialization_trait] #[const_trait] pub trait Sup {} diff --git a/tests/ui/rfcs/rfc-2632-const-trait-impl/staged-api-user-crate.rs b/tests/ui/rfcs/rfc-2632-const-trait-impl/staged-api-user-crate.rs index fc0d82727b5..c4ecb8f67a1 100644 --- a/tests/ui/rfcs/rfc-2632-const-trait-impl/staged-api-user-crate.rs +++ b/tests/ui/rfcs/rfc-2632-const-trait-impl/staged-api-user-crate.rs @@ -1,4 +1,4 @@ -// aux-build: staged-api.rs +//@ aux-build: staged-api.rs extern crate staged_api; use staged_api::*; diff --git a/tests/ui/rfcs/rfc-2632-const-trait-impl/staged-api.rs b/tests/ui/rfcs/rfc-2632-const-trait-impl/staged-api.rs index 2468d51cfdd..31ca9419589 100644 --- a/tests/ui/rfcs/rfc-2632-const-trait-impl/staged-api.rs +++ b/tests/ui/rfcs/rfc-2632-const-trait-impl/staged-api.rs @@ -1,11 +1,11 @@ -// revisions: stable unstable +//@ revisions: stable unstable #![cfg_attr(unstable, feature(unstable))] // The feature from the ./auxiliary/staged-api.rs file. #![feature(const_trait_impl, effects)] #![feature(staged_api)] #![stable(feature = "rust1", since = "1.0.0")] -// aux-build: staged-api.rs +//@ aux-build: staged-api.rs extern crate staged_api; use staged_api::*; diff --git a/tests/ui/rfcs/rfc-2632-const-trait-impl/static-const-trait-bound.rs b/tests/ui/rfcs/rfc-2632-const-trait-impl/static-const-trait-bound.rs index 4520a36960c..062067f8e85 100644 --- a/tests/ui/rfcs/rfc-2632-const-trait-impl/static-const-trait-bound.rs +++ b/tests/ui/rfcs/rfc-2632-const-trait-impl/static-const-trait-bound.rs @@ -1,4 +1,4 @@ -// check-pass +//@ check-pass pub struct S T = fn() -> T> { f: F, x: Option, diff --git a/tests/ui/rfcs/rfc-2632-const-trait-impl/std-impl-gate.rs b/tests/ui/rfcs/rfc-2632-const-trait-impl/std-impl-gate.rs index e9e5e0235df..a9e2ff06290 100644 --- a/tests/ui/rfcs/rfc-2632-const-trait-impl/std-impl-gate.rs +++ b/tests/ui/rfcs/rfc-2632-const-trait-impl/std-impl-gate.rs @@ -1,7 +1,7 @@ // This tests feature gates for const impls in the standard library. -// revisions: stock gated -//[gated] known-bug: #110395 +//@ revisions: stock gated +//@[gated] known-bug: #110395 #![cfg_attr(gated, feature(const_trait_impl, const_default_impls))] diff --git a/tests/ui/rfcs/rfc-2632-const-trait-impl/super-traits-fail-2.rs b/tests/ui/rfcs/rfc-2632-const-trait-impl/super-traits-fail-2.rs index 120399f0c78..6d57a4f5798 100644 --- a/tests/ui/rfcs/rfc-2632-const-trait-impl/super-traits-fail-2.rs +++ b/tests/ui/rfcs/rfc-2632-const-trait-impl/super-traits-fail-2.rs @@ -1,5 +1,5 @@ #![feature(const_trait_impl, effects)] -// revisions: yy yn ny nn +//@ revisions: yy yn ny nn #[cfg_attr(any(yy, yn), const_trait)] trait Foo { diff --git a/tests/ui/rfcs/rfc-2632-const-trait-impl/super-traits-fail-3.rs b/tests/ui/rfcs/rfc-2632-const-trait-impl/super-traits-fail-3.rs index 745668c4dd4..1e02a135100 100644 --- a/tests/ui/rfcs/rfc-2632-const-trait-impl/super-traits-fail-3.rs +++ b/tests/ui/rfcs/rfc-2632-const-trait-impl/super-traits-fail-3.rs @@ -1,7 +1,7 @@ #![feature(const_trait_impl, effects)] -// revisions: yy yn ny nn -//[yy] check-pass +//@ revisions: yy yn ny nn +//@[yy] check-pass #[cfg_attr(any(yy, yn), const_trait)] trait Foo { diff --git a/tests/ui/rfcs/rfc-2632-const-trait-impl/super-traits-fail.rs b/tests/ui/rfcs/rfc-2632-const-trait-impl/super-traits-fail.rs index b3853def721..0bbf2dabffe 100644 --- a/tests/ui/rfcs/rfc-2632-const-trait-impl/super-traits-fail.rs +++ b/tests/ui/rfcs/rfc-2632-const-trait-impl/super-traits-fail.rs @@ -1,5 +1,5 @@ -// check-pass -// known-bug: #110395 +//@ check-pass +//@ known-bug: #110395 #![feature(const_trait_impl)] diff --git a/tests/ui/rfcs/rfc-2632-const-trait-impl/super-traits.rs b/tests/ui/rfcs/rfc-2632-const-trait-impl/super-traits.rs index 92becf7c4af..0515380564d 100644 --- a/tests/ui/rfcs/rfc-2632-const-trait-impl/super-traits.rs +++ b/tests/ui/rfcs/rfc-2632-const-trait-impl/super-traits.rs @@ -1,4 +1,4 @@ -// check-pass +//@ check-pass #![feature(const_trait_impl, effects)] #[const_trait] diff --git a/tests/ui/rfcs/rfc-2632-const-trait-impl/syntax.rs b/tests/ui/rfcs/rfc-2632-const-trait-impl/syntax.rs index 7ac2458e399..1064713ac59 100644 --- a/tests/ui/rfcs/rfc-2632-const-trait-impl/syntax.rs +++ b/tests/ui/rfcs/rfc-2632-const-trait-impl/syntax.rs @@ -1,5 +1,5 @@ -// compile-flags: -Z parse-only -// check-pass +//@ compile-flags: -Z parse-only +//@ check-pass #![feature(const_trait_bound_opt_out)] #![feature(const_trait_impl)] diff --git a/tests/ui/rfcs/rfc-2632-const-trait-impl/tilde-const-assoc-fn-in-trait-impl.rs b/tests/ui/rfcs/rfc-2632-const-trait-impl/tilde-const-assoc-fn-in-trait-impl.rs index a848b6d2fc9..ad0f10f7ee8 100644 --- a/tests/ui/rfcs/rfc-2632-const-trait-impl/tilde-const-assoc-fn-in-trait-impl.rs +++ b/tests/ui/rfcs/rfc-2632-const-trait-impl/tilde-const-assoc-fn-in-trait-impl.rs @@ -1,5 +1,5 @@ // Regression test for issue #119700. -// check-pass +//@ check-pass #![feature(const_trait_impl, effects)] diff --git a/tests/ui/rfcs/rfc-2632-const-trait-impl/tilde-const-inherent-assoc-const-fn.rs b/tests/ui/rfcs/rfc-2632-const-trait-impl/tilde-const-inherent-assoc-const-fn.rs index bfd9fe42e67..5c8f5f4db3b 100644 --- a/tests/ui/rfcs/rfc-2632-const-trait-impl/tilde-const-inherent-assoc-const-fn.rs +++ b/tests/ui/rfcs/rfc-2632-const-trait-impl/tilde-const-inherent-assoc-const-fn.rs @@ -1,4 +1,4 @@ -// check-pass +//@ check-pass #![feature(const_trait_impl, effects)] #[const_trait] diff --git a/tests/ui/rfcs/rfc-2632-const-trait-impl/tilde-const-syntax.rs b/tests/ui/rfcs/rfc-2632-const-trait-impl/tilde-const-syntax.rs index 9b3c2cf2a3b..496f97b5e24 100644 --- a/tests/ui/rfcs/rfc-2632-const-trait-impl/tilde-const-syntax.rs +++ b/tests/ui/rfcs/rfc-2632-const-trait-impl/tilde-const-syntax.rs @@ -1,5 +1,5 @@ -// compile-flags: -Z parse-only -// check-pass +//@ compile-flags: -Z parse-only +//@ check-pass #![feature(const_trait_impl)] diff --git a/tests/ui/rfcs/rfc-2632-const-trait-impl/tilde-const-trait-assoc-tys.rs b/tests/ui/rfcs/rfc-2632-const-trait-impl/tilde-const-trait-assoc-tys.rs index 4c383fe1506..b4006783082 100644 --- a/tests/ui/rfcs/rfc-2632-const-trait-impl/tilde-const-trait-assoc-tys.rs +++ b/tests/ui/rfcs/rfc-2632-const-trait-impl/tilde-const-trait-assoc-tys.rs @@ -1,4 +1,4 @@ -// check-pass +//@ check-pass #![feature(const_trait_impl, effects)] #[const_trait] diff --git a/tests/ui/rfcs/rfc-2632-const-trait-impl/tilde-twice.rs b/tests/ui/rfcs/rfc-2632-const-trait-impl/tilde-twice.rs index 06e4ede8b5e..c3f9f8e6764 100644 --- a/tests/ui/rfcs/rfc-2632-const-trait-impl/tilde-twice.rs +++ b/tests/ui/rfcs/rfc-2632-const-trait-impl/tilde-twice.rs @@ -1,4 +1,4 @@ -// compile-flags: -Z parse-only +//@ compile-flags: -Z parse-only #![feature(const_trait_impl)] diff --git a/tests/ui/rfcs/rfc-2632-const-trait-impl/trait-default-body-stability.rs b/tests/ui/rfcs/rfc-2632-const-trait-impl/trait-default-body-stability.rs index aa3b09ec966..f41e70c99ff 100644 --- a/tests/ui/rfcs/rfc-2632-const-trait-impl/trait-default-body-stability.rs +++ b/tests/ui/rfcs/rfc-2632-const-trait-impl/trait-default-body-stability.rs @@ -1,4 +1,4 @@ -// known-bug: #110395 +//@ known-bug: #110395 #![feature(staged_api)] #![feature(const_trait_impl, effects)] diff --git a/tests/ui/rfcs/rfc-2632-const-trait-impl/trait-method-ptr-in-consts-ice.rs b/tests/ui/rfcs/rfc-2632-const-trait-impl/trait-method-ptr-in-consts-ice.rs index 7d7cb967c66..8a901cc60fd 100644 --- a/tests/ui/rfcs/rfc-2632-const-trait-impl/trait-method-ptr-in-consts-ice.rs +++ b/tests/ui/rfcs/rfc-2632-const-trait-impl/trait-method-ptr-in-consts-ice.rs @@ -1,4 +1,4 @@ -// check-pass +//@ check-pass struct LazyLock { data: (Option, fn() -> T), diff --git a/tests/ui/rfcs/rfc-2632-const-trait-impl/trait-where-clause-const.rs b/tests/ui/rfcs/rfc-2632-const-trait-impl/trait-where-clause-const.rs index 94be3ff46ac..364ddfcc8dd 100644 --- a/tests/ui/rfcs/rfc-2632-const-trait-impl/trait-where-clause-const.rs +++ b/tests/ui/rfcs/rfc-2632-const-trait-impl/trait-where-clause-const.rs @@ -2,7 +2,7 @@ // Checking the validity of traits' where clauses happen at a later stage. // (`rustc_const_eval` instead of `rustc_hir_analysis`) Therefore one file as a // test is not enough. -// known-bug: #110395 +//@ known-bug: #110395 // FIXME check-pass #![feature(const_trait_impl, effects)] diff --git a/tests/ui/rfcs/rfc-2632-const-trait-impl/trait-where-clause-run.rs b/tests/ui/rfcs/rfc-2632-const-trait-impl/trait-where-clause-run.rs index 5439f859a03..65e605a4a2f 100644 --- a/tests/ui/rfcs/rfc-2632-const-trait-impl/trait-where-clause-run.rs +++ b/tests/ui/rfcs/rfc-2632-const-trait-impl/trait-where-clause-run.rs @@ -1,4 +1,4 @@ -// run-pass +//@ run-pass #![feature(const_trait_impl, effects)] diff --git a/tests/ui/rfcs/rfc-2632-const-trait-impl/trait-where-clause-self-referential.rs b/tests/ui/rfcs/rfc-2632-const-trait-impl/trait-where-clause-self-referential.rs index c578813b846..18d0267fed3 100644 --- a/tests/ui/rfcs/rfc-2632-const-trait-impl/trait-where-clause-self-referential.rs +++ b/tests/ui/rfcs/rfc-2632-const-trait-impl/trait-where-clause-self-referential.rs @@ -1,4 +1,4 @@ -// check-pass +//@ check-pass #![feature(const_trait_impl, effects)] diff --git a/tests/ui/rfcs/rfc-3348-c-string-literals/auxiliary/count.rs b/tests/ui/rfcs/rfc-3348-c-string-literals/auxiliary/count.rs index 0907061d64a..e7c560a2c35 100644 --- a/tests/ui/rfcs/rfc-3348-c-string-literals/auxiliary/count.rs +++ b/tests/ui/rfcs/rfc-3348-c-string-literals/auxiliary/count.rs @@ -1,6 +1,6 @@ -// force-host -// edition: 2018 -// no-prefer-dynamic +//@ force-host +//@ edition: 2018 +//@ no-prefer-dynamic #![crate_type = "proc-macro"] extern crate proc_macro; diff --git a/tests/ui/rfcs/rfc-3348-c-string-literals/basic.rs b/tests/ui/rfcs/rfc-3348-c-string-literals/basic.rs index 5609dc51a67..5908887c4c7 100644 --- a/tests/ui/rfcs/rfc-3348-c-string-literals/basic.rs +++ b/tests/ui/rfcs/rfc-3348-c-string-literals/basic.rs @@ -1,5 +1,5 @@ -// run-pass -// edition: 2021 +//@ run-pass +//@ edition: 2021 fn main() { assert_eq!(b"test\0", c"test".to_bytes_with_nul()); diff --git a/tests/ui/rfcs/rfc-3348-c-string-literals/edition-2015-2018-lexing.rs b/tests/ui/rfcs/rfc-3348-c-string-literals/edition-2015-2018-lexing.rs index 2a4cd600426..a503f2bf7a8 100644 --- a/tests/ui/rfcs/rfc-3348-c-string-literals/edition-2015-2018-lexing.rs +++ b/tests/ui/rfcs/rfc-3348-c-string-literals/edition-2015-2018-lexing.rs @@ -1,9 +1,9 @@ // Regression test for issue #113235. -// check-pass -// revisions: edition2015 edition2018 -//[edition2015] edition: 2015 -//[edition2018] edition: 2018 +//@ check-pass +//@ revisions: edition2015 edition2018 +//@[edition2015] edition: 2015 +//@[edition2018] edition: 2018 // Make sure that in pre-2021 editions we continue to parse the snippet // `c"hello"` as an identifier followed by a (normal) string literal and diff --git a/tests/ui/rfcs/rfc-3348-c-string-literals/edition-spans.rs b/tests/ui/rfcs/rfc-3348-c-string-literals/edition-spans.rs index b3557c71b74..57c1ba05560 100644 --- a/tests/ui/rfcs/rfc-3348-c-string-literals/edition-spans.rs +++ b/tests/ui/rfcs/rfc-3348-c-string-literals/edition-spans.rs @@ -3,10 +3,10 @@ // // adapted from tests/ui/rust-2021/reserved-prefixes-via-macro.rs -// edition: 2021 -// check-pass +//@ edition: 2021 +//@ check-pass -// aux-build: count.rs +//@ aux-build: count.rs extern crate count; const _: () = { diff --git a/tests/ui/rfcs/rfc-3348-c-string-literals/no-nuls.rs b/tests/ui/rfcs/rfc-3348-c-string-literals/no-nuls.rs index 2f9ca09f3a5..a082521f4b5 100644 Binary files a/tests/ui/rfcs/rfc-3348-c-string-literals/no-nuls.rs and b/tests/ui/rfcs/rfc-3348-c-string-literals/no-nuls.rs differ diff --git a/tests/ui/rfcs/rfc-3348-c-string-literals/non-ascii.rs b/tests/ui/rfcs/rfc-3348-c-string-literals/non-ascii.rs index 8a5f514db7f..4b18fa39743 100644 --- a/tests/ui/rfcs/rfc-3348-c-string-literals/non-ascii.rs +++ b/tests/ui/rfcs/rfc-3348-c-string-literals/non-ascii.rs @@ -1,5 +1,5 @@ -// run-pass -// edition: 2021 +//@ run-pass +//@ edition: 2021 fn main() { assert_eq!( diff --git a/tests/ui/rmeta/auxiliary/rmeta-meta.rs b/tests/ui/rmeta/auxiliary/rmeta-meta.rs index 6d435049527..f26a97e2ebe 100644 --- a/tests/ui/rmeta/auxiliary/rmeta-meta.rs +++ b/tests/ui/rmeta/auxiliary/rmeta-meta.rs @@ -1,5 +1,5 @@ -// no-prefer-dynamic -// compile-flags: --emit=metadata +//@ no-prefer-dynamic +//@ compile-flags: --emit=metadata #![crate_type="rlib"] diff --git a/tests/ui/rmeta/emit-artifact-notifications.rs b/tests/ui/rmeta/emit-artifact-notifications.rs index 984a7fabb66..693f406683d 100644 --- a/tests/ui/rmeta/emit-artifact-notifications.rs +++ b/tests/ui/rmeta/emit-artifact-notifications.rs @@ -1,6 +1,6 @@ -// compile-flags:--emit=metadata --error-format=json --json artifacts -// build-pass -// ignore-pass +//@ compile-flags:--emit=metadata --error-format=json --json artifacts +//@ build-pass +//@ ignore-pass // ^-- needed because `--pass check` does not emit the output needed. // A very basic test for the emission of artifact notifications in JSON output. diff --git a/tests/ui/rmeta/emit-metadata-obj.rs b/tests/ui/rmeta/emit-metadata-obj.rs index 334c7cc5b81..b39b7cb0dac 100644 --- a/tests/ui/rmeta/emit-metadata-obj.rs +++ b/tests/ui/rmeta/emit-metadata-obj.rs @@ -1,5 +1,5 @@ -// compile-flags:--emit=metadata,obj -// build-pass +//@ compile-flags:--emit=metadata,obj +//@ build-pass // A test for the emission of metadata + obj and other metadata + non-link // combinations. See issue #81117. diff --git a/tests/ui/rmeta/no_optitimized_mir.rs b/tests/ui/rmeta/no_optitimized_mir.rs index c503005f16b..7d2e1b87215 100644 --- a/tests/ui/rmeta/no_optitimized_mir.rs +++ b/tests/ui/rmeta/no_optitimized_mir.rs @@ -1,6 +1,6 @@ -// aux-build:rmeta-meta.rs -// no-prefer-dynamic -// build-fail +//@ aux-build:rmeta-meta.rs +//@ no-prefer-dynamic +//@ build-fail // Check that we do not ICE when we need optimized MIR but it is missing. diff --git a/tests/ui/rmeta/rmeta-lib-pass.rs b/tests/ui/rmeta/rmeta-lib-pass.rs index fdd0516e4d6..386fea5556c 100644 --- a/tests/ui/rmeta/rmeta-lib-pass.rs +++ b/tests/ui/rmeta/rmeta-lib-pass.rs @@ -1,7 +1,7 @@ -// compile-flags: --emit=metadata -// aux-build:rmeta-rlib.rs -// no-prefer-dynamic -// build-pass (FIXME(62277): could be check-pass?) +//@ compile-flags: --emit=metadata +//@ aux-build:rmeta-rlib.rs +//@ no-prefer-dynamic +//@ build-pass (FIXME(62277): could be check-pass?) // Check that building a metadata crate works with a dependent, rlib crate. // This is a cfail test since there is no executable to run. diff --git a/tests/ui/rmeta/rmeta-pass.rs b/tests/ui/rmeta/rmeta-pass.rs index 4f0db23f47d..34b9166a984 100644 --- a/tests/ui/rmeta/rmeta-pass.rs +++ b/tests/ui/rmeta/rmeta-pass.rs @@ -1,7 +1,7 @@ -// compile-flags: --emit=metadata -// aux-build:rmeta-meta.rs -// no-prefer-dynamic -// build-pass (FIXME(62277): could be check-pass?) +//@ compile-flags: --emit=metadata +//@ aux-build:rmeta-meta.rs +//@ no-prefer-dynamic +//@ build-pass (FIXME(62277): could be check-pass?) // Check that building a metadata crate works with a dependent, metadata-only // crate. diff --git a/tests/ui/rmeta/rmeta-priv-warn.rs b/tests/ui/rmeta/rmeta-priv-warn.rs index 430c1f06f43..d41eb95ba3f 100644 --- a/tests/ui/rmeta/rmeta-priv-warn.rs +++ b/tests/ui/rmeta/rmeta-priv-warn.rs @@ -1,6 +1,6 @@ -// compile-flags: --emit=metadata -// no-prefer-dynamic -// build-pass (FIXME(62277): could be check-pass?) +//@ compile-flags: --emit=metadata +//@ no-prefer-dynamic +//@ build-pass (FIXME(62277): could be check-pass?) #[deny(warnings)] diff --git a/tests/ui/rmeta/rmeta.rs b/tests/ui/rmeta/rmeta.rs index 63ed236505e..4d8cff8e60e 100644 --- a/tests/ui/rmeta/rmeta.rs +++ b/tests/ui/rmeta/rmeta.rs @@ -1,5 +1,5 @@ -// no-prefer-dynamic -// compile-flags: --emit=metadata +//@ no-prefer-dynamic +//@ compile-flags: --emit=metadata // Check that building a metadata crate finds an error. diff --git a/tests/ui/rmeta/rmeta_lib.rs b/tests/ui/rmeta/rmeta_lib.rs index fa6826450c9..1be4ee8de79 100644 --- a/tests/ui/rmeta/rmeta_lib.rs +++ b/tests/ui/rmeta/rmeta_lib.rs @@ -1,7 +1,7 @@ -// build-fail -// aux-build:rmeta-meta.rs -// no-prefer-dynamic -// error-pattern: crate `rmeta_meta` required to be available in rlib format, but was not found +//@ build-fail +//@ aux-build:rmeta-meta.rs +//@ no-prefer-dynamic +//@ error-pattern: crate `rmeta_meta` required to be available in rlib format, but was not found // Check that building a non-metadata crate fails if a dependent crate is // metadata-only. diff --git a/tests/ui/rmeta/rmeta_meta_main.rs b/tests/ui/rmeta/rmeta_meta_main.rs index 839f350d741..0dfafffe770 100644 --- a/tests/ui/rmeta/rmeta_meta_main.rs +++ b/tests/ui/rmeta/rmeta_meta_main.rs @@ -1,6 +1,6 @@ -// compile-flags: --emit=metadata -// aux-build:rmeta-meta.rs -// no-prefer-dynamic +//@ compile-flags: --emit=metadata +//@ aux-build:rmeta-meta.rs +//@ no-prefer-dynamic // Check that building a metadata crate finds an error with a dependent, // metadata-only crate. diff --git a/tests/ui/runtime/atomic-print.rs b/tests/ui/runtime/atomic-print.rs index fe57910530f..aa3183885bf 100644 --- a/tests/ui/runtime/atomic-print.rs +++ b/tests/ui/runtime/atomic-print.rs @@ -1,9 +1,9 @@ -// run-pass +//@ run-pass #![allow(unused_must_use)] #![allow(deprecated)] -// ignore-emscripten no threads support -// ignore-sgx no processes +//@ ignore-emscripten no threads support +//@ ignore-sgx no processes use std::{env, fmt, process, sync, thread}; diff --git a/tests/ui/runtime/backtrace-debuginfo-aux.rs b/tests/ui/runtime/backtrace-debuginfo-aux.rs index 1411bcf89e8..24180ed2196 100644 --- a/tests/ui/runtime/backtrace-debuginfo-aux.rs +++ b/tests/ui/runtime/backtrace-debuginfo-aux.rs @@ -1,5 +1,5 @@ -// run-pass -// ignore-test: not a test, used by backtrace-debuginfo.rs to test file!() +//@ run-pass +//@ ignore-test: not a test, used by backtrace-debuginfo.rs to test file!() #[inline(never)] pub fn callback(f: F) where F: FnOnce((&'static str, u32)) { diff --git a/tests/ui/runtime/backtrace-debuginfo.rs b/tests/ui/runtime/backtrace-debuginfo.rs index 5d233b38dbe..49f153fabda 100644 --- a/tests/ui/runtime/backtrace-debuginfo.rs +++ b/tests/ui/runtime/backtrace-debuginfo.rs @@ -1,4 +1,4 @@ -// run-pass +//@ run-pass // We disable tail merging here because it can't preserve debuginfo and thus // potentially breaks the backtraces. Also, subtle changes can decide whether // tail merging succeeds, so the test might work today but fail tomorrow due to a @@ -6,12 +6,12 @@ // Unfortunately, LLVM has no "disable" option for this, so we have to set // "enable" to 0 instead. -// compile-flags:-g -Copt-level=0 -Cllvm-args=-enable-tail-merge=0 -// compile-flags:-Cforce-frame-pointers=yes -// compile-flags:-Cstrip=none -// ignore-emscripten spawning processes is not supported -// ignore-sgx no processes -// ignore-fuchsia Backtrace not symbolized, trace different line alignment +//@ compile-flags:-g -Copt-level=0 -Cllvm-args=-enable-tail-merge=0 +//@ compile-flags:-Cforce-frame-pointers=yes +//@ compile-flags:-Cstrip=none +//@ ignore-emscripten spawning processes is not supported +//@ ignore-sgx no processes +//@ ignore-fuchsia Backtrace not symbolized, trace different line alignment use std::env; diff --git a/tests/ui/runtime/native-print-no-runtime.rs b/tests/ui/runtime/native-print-no-runtime.rs index f17c9fa6ca9..f0ed7d97b2c 100644 --- a/tests/ui/runtime/native-print-no-runtime.rs +++ b/tests/ui/runtime/native-print-no-runtime.rs @@ -1,4 +1,4 @@ -// run-pass +//@ run-pass #![feature(start)] diff --git a/tests/ui/runtime/out-of-stack.rs b/tests/ui/runtime/out-of-stack.rs index ff45ace7857..e8e0e847a8e 100644 --- a/tests/ui/runtime/out-of-stack.rs +++ b/tests/ui/runtime/out-of-stack.rs @@ -1,12 +1,12 @@ -// run-pass +//@ run-pass #![allow(unused_must_use)] #![allow(unconditional_recursion)] -// ignore-android: FIXME (#20004) -// ignore-emscripten no processes -// ignore-sgx no processes -// ignore-fuchsia must translate zircon signal to SIGABRT, FIXME (#58590) -// ignore-nto no stack overflow handler used (no alternate stack available) +//@ ignore-android: FIXME (#20004) +//@ ignore-emscripten no processes +//@ ignore-sgx no processes +//@ ignore-fuchsia must translate zircon signal to SIGABRT, FIXME (#58590) +//@ ignore-nto no stack overflow handler used (no alternate stack available) #![feature(core_intrinsics)] #![feature(rustc_private)] diff --git a/tests/ui/runtime/rt-explody-panic-payloads.rs b/tests/ui/runtime/rt-explody-panic-payloads.rs index 755d3df42de..bd3624a8aee 100644 --- a/tests/ui/runtime/rt-explody-panic-payloads.rs +++ b/tests/ui/runtime/rt-explody-panic-payloads.rs @@ -1,7 +1,7 @@ -// run-pass -// needs-unwind -// ignore-emscripten no processes -// ignore-sgx no processes +//@ run-pass +//@ needs-unwind +//@ ignore-emscripten no processes +//@ ignore-sgx no processes use std::env; use std::process::Command; diff --git a/tests/ui/runtime/running-with-no-runtime.rs b/tests/ui/runtime/running-with-no-runtime.rs index c321e86dc18..8430e826dc3 100644 --- a/tests/ui/runtime/running-with-no-runtime.rs +++ b/tests/ui/runtime/running-with-no-runtime.rs @@ -1,6 +1,6 @@ -// run-pass -// ignore-emscripten spawning processes is not supported -// ignore-sgx no processes +//@ run-pass +//@ ignore-emscripten spawning processes is not supported +//@ ignore-sgx no processes #![feature(start)] diff --git a/tests/ui/runtime/signal-alternate-stack-cleanup.rs b/tests/ui/runtime/signal-alternate-stack-cleanup.rs index 37c602ae0b0..3b7bb0d505d 100644 --- a/tests/ui/runtime/signal-alternate-stack-cleanup.rs +++ b/tests/ui/runtime/signal-alternate-stack-cleanup.rs @@ -1,13 +1,13 @@ -// run-pass +//@ run-pass // Previously memory for alternate signal stack have been unmapped during // main thread exit while still being in use by signal handlers. This test // triggers this situation by sending signal from atexit handler. // -// ignore-wasm32-bare no libc -// ignore-windows -// ignore-sgx no libc -// ignore-vxworks no SIGWINCH in user space -// ignore-nto no SA_ONSTACK +//@ ignore-wasm32-bare no libc +//@ ignore-windows +//@ ignore-sgx no libc +//@ ignore-vxworks no SIGWINCH in user space +//@ ignore-nto no SA_ONSTACK #![feature(rustc_private)] extern crate libc; diff --git a/tests/ui/runtime/stdout-during-shutdown.rs b/tests/ui/runtime/stdout-during-shutdown.rs index a6cf812ca64..8549f5d8eb6 100644 --- a/tests/ui/runtime/stdout-during-shutdown.rs +++ b/tests/ui/runtime/stdout-during-shutdown.rs @@ -1,6 +1,6 @@ -// run-pass -// check-run-results -// ignore-emscripten +//@ run-pass +//@ check-run-results +//@ ignore-emscripten // Emscripten doesn't flush its own stdout buffers on exit, which would fail // this test. So this test is disabled on this platform. diff --git a/tests/ui/rust-2018/async-ident-allowed.rs b/tests/ui/rust-2018/async-ident-allowed.rs index 8efcfbb7074..342fafc67e2 100644 --- a/tests/ui/rust-2018/async-ident-allowed.rs +++ b/tests/ui/rust-2018/async-ident-allowed.rs @@ -1,4 +1,4 @@ -// edition:2015 +//@ edition:2015 #![deny(rust_2018_compatibility)] diff --git a/tests/ui/rust-2018/async-ident.fixed b/tests/ui/rust-2018/async-ident.fixed index e909c79070c..4e31f674435 100644 --- a/tests/ui/rust-2018/async-ident.fixed +++ b/tests/ui/rust-2018/async-ident.fixed @@ -1,8 +1,8 @@ #![allow(dead_code, unused_variables, unused_macro_rules, bad_style)] #![deny(keyword_idents)] -// edition:2015 -// run-rustfix +//@ edition:2015 +//@ run-rustfix fn r#async() {} //~ ERROR async //~^ WARN this is accepted in the current edition diff --git a/tests/ui/rust-2018/async-ident.rs b/tests/ui/rust-2018/async-ident.rs index 2bfbc3871d1..4c5134a2923 100644 --- a/tests/ui/rust-2018/async-ident.rs +++ b/tests/ui/rust-2018/async-ident.rs @@ -1,8 +1,8 @@ #![allow(dead_code, unused_variables, unused_macro_rules, bad_style)] #![deny(keyword_idents)] -// edition:2015 -// run-rustfix +//@ edition:2015 +//@ run-rustfix fn async() {} //~ ERROR async //~^ WARN this is accepted in the current edition diff --git a/tests/ui/rust-2018/auxiliary/suggestions-not-always-applicable.rs b/tests/ui/rust-2018/auxiliary/suggestions-not-always-applicable.rs index 7472443dcee..d8e5eb884cf 100644 --- a/tests/ui/rust-2018/auxiliary/suggestions-not-always-applicable.rs +++ b/tests/ui/rust-2018/auxiliary/suggestions-not-always-applicable.rs @@ -1,5 +1,5 @@ -// force-host -// no-prefer-dynamic +//@ force-host +//@ no-prefer-dynamic #![crate_type = "proc-macro"] diff --git a/tests/ui/rust-2018/dyn-keyword.fixed b/tests/ui/rust-2018/dyn-keyword.fixed index 044824cbbd3..e0233382e85 100644 --- a/tests/ui/rust-2018/dyn-keyword.fixed +++ b/tests/ui/rust-2018/dyn-keyword.fixed @@ -1,5 +1,5 @@ -// edition:2015 -// run-rustfix +//@ edition:2015 +//@ run-rustfix #![allow(unused_variables)] #![deny(keyword_idents)] diff --git a/tests/ui/rust-2018/dyn-keyword.rs b/tests/ui/rust-2018/dyn-keyword.rs index 5989cfa1c79..876e83b5e89 100644 --- a/tests/ui/rust-2018/dyn-keyword.rs +++ b/tests/ui/rust-2018/dyn-keyword.rs @@ -1,5 +1,5 @@ -// edition:2015 -// run-rustfix +//@ edition:2015 +//@ run-rustfix #![allow(unused_variables)] #![deny(keyword_idents)] diff --git a/tests/ui/rust-2018/dyn-trait-compatibility.rs b/tests/ui/rust-2018/dyn-trait-compatibility.rs index 377c85fef49..6ffc3f8d379 100644 --- a/tests/ui/rust-2018/dyn-trait-compatibility.rs +++ b/tests/ui/rust-2018/dyn-trait-compatibility.rs @@ -1,4 +1,4 @@ -// edition:2018 +//@ edition:2018 type A0 = dyn; type A1 = dyn::dyn; //~ERROR expected identifier, found keyword `dyn` diff --git a/tests/ui/rust-2018/edition-lint-fully-qualified-paths.fixed b/tests/ui/rust-2018/edition-lint-fully-qualified-paths.fixed index 3bfa6d2c254..fbe415e2e10 100644 --- a/tests/ui/rust-2018/edition-lint-fully-qualified-paths.fixed +++ b/tests/ui/rust-2018/edition-lint-fully-qualified-paths.fixed @@ -1,4 +1,4 @@ -// run-rustfix +//@ run-rustfix #![deny(absolute_paths_not_starting_with_crate)] diff --git a/tests/ui/rust-2018/edition-lint-fully-qualified-paths.rs b/tests/ui/rust-2018/edition-lint-fully-qualified-paths.rs index 14039626545..72a212453cd 100644 --- a/tests/ui/rust-2018/edition-lint-fully-qualified-paths.rs +++ b/tests/ui/rust-2018/edition-lint-fully-qualified-paths.rs @@ -1,4 +1,4 @@ -// run-rustfix +//@ run-rustfix #![deny(absolute_paths_not_starting_with_crate)] diff --git a/tests/ui/rust-2018/edition-lint-infer-outlives-macro.fixed b/tests/ui/rust-2018/edition-lint-infer-outlives-macro.fixed index 8cdb08e81b9..38d8a36bcdf 100644 --- a/tests/ui/rust-2018/edition-lint-infer-outlives-macro.fixed +++ b/tests/ui/rust-2018/edition-lint-infer-outlives-macro.fixed @@ -1,6 +1,6 @@ -// edition:2018 -// aux-build:edition-lint-infer-outlives-macro.rs -// run-rustfix +//@ edition:2018 +//@ aux-build:edition-lint-infer-outlives-macro.rs +//@ run-rustfix #![deny(explicit_outlives_requirements)] #![allow(dead_code)] diff --git a/tests/ui/rust-2018/edition-lint-infer-outlives-macro.rs b/tests/ui/rust-2018/edition-lint-infer-outlives-macro.rs index 647906c2dc2..60eedf7b069 100644 --- a/tests/ui/rust-2018/edition-lint-infer-outlives-macro.rs +++ b/tests/ui/rust-2018/edition-lint-infer-outlives-macro.rs @@ -1,6 +1,6 @@ -// edition:2018 -// aux-build:edition-lint-infer-outlives-macro.rs -// run-rustfix +//@ edition:2018 +//@ aux-build:edition-lint-infer-outlives-macro.rs +//@ run-rustfix #![deny(explicit_outlives_requirements)] #![allow(dead_code)] diff --git a/tests/ui/rust-2018/edition-lint-infer-outlives.fixed b/tests/ui/rust-2018/edition-lint-infer-outlives.fixed index 5058d61b588..c4948051c18 100644 --- a/tests/ui/rust-2018/edition-lint-infer-outlives.fixed +++ b/tests/ui/rust-2018/edition-lint-infer-outlives.fixed @@ -1,4 +1,4 @@ -// run-rustfix +//@ run-rustfix #![allow(unused)] #![deny(explicit_outlives_requirements)] diff --git a/tests/ui/rust-2018/edition-lint-infer-outlives.rs b/tests/ui/rust-2018/edition-lint-infer-outlives.rs index 3f63cb8e900..c80e91ca12c 100644 --- a/tests/ui/rust-2018/edition-lint-infer-outlives.rs +++ b/tests/ui/rust-2018/edition-lint-infer-outlives.rs @@ -1,4 +1,4 @@ -// run-rustfix +//@ run-rustfix #![allow(unused)] #![deny(explicit_outlives_requirements)] diff --git a/tests/ui/rust-2018/edition-lint-nested-empty-paths.fixed b/tests/ui/rust-2018/edition-lint-nested-empty-paths.fixed index fd23e9f5562..7ec421099c7 100644 --- a/tests/ui/rust-2018/edition-lint-nested-empty-paths.fixed +++ b/tests/ui/rust-2018/edition-lint-nested-empty-paths.fixed @@ -1,4 +1,4 @@ -// run-rustfix +//@ run-rustfix #![deny(absolute_paths_not_starting_with_crate)] #![allow(unused_imports)] diff --git a/tests/ui/rust-2018/edition-lint-nested-empty-paths.rs b/tests/ui/rust-2018/edition-lint-nested-empty-paths.rs index f3fb012a584..135908c8aef 100644 --- a/tests/ui/rust-2018/edition-lint-nested-empty-paths.rs +++ b/tests/ui/rust-2018/edition-lint-nested-empty-paths.rs @@ -1,4 +1,4 @@ -// run-rustfix +//@ run-rustfix #![deny(absolute_paths_not_starting_with_crate)] #![allow(unused_imports)] diff --git a/tests/ui/rust-2018/edition-lint-nested-paths.fixed b/tests/ui/rust-2018/edition-lint-nested-paths.fixed index 0e47e70bb02..742732ebc49 100644 --- a/tests/ui/rust-2018/edition-lint-nested-paths.fixed +++ b/tests/ui/rust-2018/edition-lint-nested-paths.fixed @@ -1,4 +1,4 @@ -// run-rustfix +//@ run-rustfix #![deny(absolute_paths_not_starting_with_crate)] diff --git a/tests/ui/rust-2018/edition-lint-nested-paths.rs b/tests/ui/rust-2018/edition-lint-nested-paths.rs index d261c10e36d..861ca521bb7 100644 --- a/tests/ui/rust-2018/edition-lint-nested-paths.rs +++ b/tests/ui/rust-2018/edition-lint-nested-paths.rs @@ -1,4 +1,4 @@ -// run-rustfix +//@ run-rustfix #![deny(absolute_paths_not_starting_with_crate)] diff --git a/tests/ui/rust-2018/edition-lint-paths-2018.rs b/tests/ui/rust-2018/edition-lint-paths-2018.rs index 2005d8f4d79..bd304b9ad62 100644 --- a/tests/ui/rust-2018/edition-lint-paths-2018.rs +++ b/tests/ui/rust-2018/edition-lint-paths-2018.rs @@ -1,7 +1,7 @@ -// build-pass (FIXME(62277): could be check-pass?) -// edition:2018 -// compile-flags:--extern edition_lint_paths -// aux-build:edition-lint-paths.rs +//@ build-pass (FIXME(62277): could be check-pass?) +//@ edition:2018 +//@ compile-flags:--extern edition_lint_paths +//@ aux-build:edition-lint-paths.rs #![deny(absolute_paths_not_starting_with_crate)] diff --git a/tests/ui/rust-2018/edition-lint-paths.fixed b/tests/ui/rust-2018/edition-lint-paths.fixed index 5057453c926..014bf91886f 100644 --- a/tests/ui/rust-2018/edition-lint-paths.fixed +++ b/tests/ui/rust-2018/edition-lint-paths.fixed @@ -1,5 +1,5 @@ -// aux-build:edition-lint-paths.rs -// run-rustfix +//@ aux-build:edition-lint-paths.rs +//@ run-rustfix #![deny(absolute_paths_not_starting_with_crate)] #![allow(unused)] diff --git a/tests/ui/rust-2018/edition-lint-paths.rs b/tests/ui/rust-2018/edition-lint-paths.rs index 2c4a070ce83..0ecd090c1df 100644 --- a/tests/ui/rust-2018/edition-lint-paths.rs +++ b/tests/ui/rust-2018/edition-lint-paths.rs @@ -1,5 +1,5 @@ -// aux-build:edition-lint-paths.rs -// run-rustfix +//@ aux-build:edition-lint-paths.rs +//@ run-rustfix #![deny(absolute_paths_not_starting_with_crate)] #![allow(unused)] diff --git a/tests/ui/rust-2018/edition-lint-uninferable-outlives.rs b/tests/ui/rust-2018/edition-lint-uninferable-outlives.rs index 950ad1f5046..2f50c68c55b 100644 --- a/tests/ui/rust-2018/edition-lint-uninferable-outlives.rs +++ b/tests/ui/rust-2018/edition-lint-uninferable-outlives.rs @@ -1,4 +1,4 @@ -// build-pass (FIXME(62277): could be check-pass?) +//@ build-pass (FIXME(62277): could be check-pass?) #![allow(unused)] #![deny(explicit_outlives_requirements)] diff --git a/tests/ui/rust-2018/extern-crate-idiomatic-in-2018.fixed b/tests/ui/rust-2018/extern-crate-idiomatic-in-2018.fixed index e51ce5d1d5b..fcab56ac819 100644 --- a/tests/ui/rust-2018/extern-crate-idiomatic-in-2018.fixed +++ b/tests/ui/rust-2018/extern-crate-idiomatic-in-2018.fixed @@ -1,7 +1,7 @@ -// aux-build:edition-lint-paths.rs -// run-rustfix -// compile-flags:--extern edition_lint_paths -// edition:2018 +//@ aux-build:edition-lint-paths.rs +//@ run-rustfix +//@ compile-flags:--extern edition_lint_paths +//@ edition:2018 // The "normal case". Ideally we would remove the `extern crate` here, // but we don't. diff --git a/tests/ui/rust-2018/extern-crate-idiomatic-in-2018.rs b/tests/ui/rust-2018/extern-crate-idiomatic-in-2018.rs index debbf085d61..717e1a03982 100644 --- a/tests/ui/rust-2018/extern-crate-idiomatic-in-2018.rs +++ b/tests/ui/rust-2018/extern-crate-idiomatic-in-2018.rs @@ -1,7 +1,7 @@ -// aux-build:edition-lint-paths.rs -// run-rustfix -// compile-flags:--extern edition_lint_paths -// edition:2018 +//@ aux-build:edition-lint-paths.rs +//@ run-rustfix +//@ compile-flags:--extern edition_lint_paths +//@ edition:2018 // The "normal case". Ideally we would remove the `extern crate` here, // but we don't. diff --git a/tests/ui/rust-2018/extern-crate-idiomatic.fixed b/tests/ui/rust-2018/extern-crate-idiomatic.fixed index 6a0639099b1..9d7492fd1d0 100644 --- a/tests/ui/rust-2018/extern-crate-idiomatic.fixed +++ b/tests/ui/rust-2018/extern-crate-idiomatic.fixed @@ -1,7 +1,7 @@ -// run-pass -// aux-build:edition-lint-paths.rs -// compile-flags:--extern edition_lint_paths -// run-rustfix +//@ run-pass +//@ aux-build:edition-lint-paths.rs +//@ compile-flags:--extern edition_lint_paths +//@ run-rustfix // The "normal case". Ideally we would remove the `extern crate` here, // but we don't. diff --git a/tests/ui/rust-2018/extern-crate-idiomatic.rs b/tests/ui/rust-2018/extern-crate-idiomatic.rs index 6a0639099b1..9d7492fd1d0 100644 --- a/tests/ui/rust-2018/extern-crate-idiomatic.rs +++ b/tests/ui/rust-2018/extern-crate-idiomatic.rs @@ -1,7 +1,7 @@ -// run-pass -// aux-build:edition-lint-paths.rs -// compile-flags:--extern edition_lint_paths -// run-rustfix +//@ run-pass +//@ aux-build:edition-lint-paths.rs +//@ compile-flags:--extern edition_lint_paths +//@ run-rustfix // The "normal case". Ideally we would remove the `extern crate` here, // but we don't. diff --git a/tests/ui/rust-2018/extern-crate-referenced-by-self-path.fixed b/tests/ui/rust-2018/extern-crate-referenced-by-self-path.fixed index c4a3dd9415c..8be9c004952 100644 --- a/tests/ui/rust-2018/extern-crate-referenced-by-self-path.fixed +++ b/tests/ui/rust-2018/extern-crate-referenced-by-self-path.fixed @@ -1,6 +1,6 @@ -// run-pass -// aux-build:edition-lint-paths.rs -// run-rustfix +//@ run-pass +//@ aux-build:edition-lint-paths.rs +//@ run-rustfix // Oddball: `edition_lint_paths` is accessed via this `self` path // rather than being accessed directly. Unless we rewrite that path, diff --git a/tests/ui/rust-2018/extern-crate-referenced-by-self-path.rs b/tests/ui/rust-2018/extern-crate-referenced-by-self-path.rs index c4a3dd9415c..8be9c004952 100644 --- a/tests/ui/rust-2018/extern-crate-referenced-by-self-path.rs +++ b/tests/ui/rust-2018/extern-crate-referenced-by-self-path.rs @@ -1,6 +1,6 @@ -// run-pass -// aux-build:edition-lint-paths.rs -// run-rustfix +//@ run-pass +//@ aux-build:edition-lint-paths.rs +//@ run-rustfix // Oddball: `edition_lint_paths` is accessed via this `self` path // rather than being accessed directly. Unless we rewrite that path, diff --git a/tests/ui/rust-2018/extern-crate-rename.fixed b/tests/ui/rust-2018/extern-crate-rename.fixed index 5e2bf64a2e2..36b52802990 100644 --- a/tests/ui/rust-2018/extern-crate-rename.fixed +++ b/tests/ui/rust-2018/extern-crate-rename.fixed @@ -1,5 +1,5 @@ -// aux-build:edition-lint-paths.rs -// run-rustfix +//@ aux-build:edition-lint-paths.rs +//@ run-rustfix // Oddball: crate is renamed, making it harder for us to rewrite // paths. We don't (and we leave the `extern crate` in place). diff --git a/tests/ui/rust-2018/extern-crate-rename.rs b/tests/ui/rust-2018/extern-crate-rename.rs index 290fcd6b7db..725e3aaa072 100644 --- a/tests/ui/rust-2018/extern-crate-rename.rs +++ b/tests/ui/rust-2018/extern-crate-rename.rs @@ -1,5 +1,5 @@ -// aux-build:edition-lint-paths.rs -// run-rustfix +//@ aux-build:edition-lint-paths.rs +//@ run-rustfix // Oddball: crate is renamed, making it harder for us to rewrite // paths. We don't (and we leave the `extern crate` in place). diff --git a/tests/ui/rust-2018/extern-crate-submod.fixed b/tests/ui/rust-2018/extern-crate-submod.fixed index dd31710414c..dc864d87039 100644 --- a/tests/ui/rust-2018/extern-crate-submod.fixed +++ b/tests/ui/rust-2018/extern-crate-submod.fixed @@ -1,5 +1,5 @@ -// aux-build:edition-lint-paths.rs -// run-rustfix +//@ aux-build:edition-lint-paths.rs +//@ run-rustfix // Oddball: extern crate appears in a submodule, making it harder for // us to rewrite paths. We don't (and we leave the `extern crate` in diff --git a/tests/ui/rust-2018/extern-crate-submod.rs b/tests/ui/rust-2018/extern-crate-submod.rs index cb0cd7a8331..f15bc6bced8 100644 --- a/tests/ui/rust-2018/extern-crate-submod.rs +++ b/tests/ui/rust-2018/extern-crate-submod.rs @@ -1,5 +1,5 @@ -// aux-build:edition-lint-paths.rs -// run-rustfix +//@ aux-build:edition-lint-paths.rs +//@ run-rustfix // Oddball: extern crate appears in a submodule, making it harder for // us to rewrite paths. We don't (and we leave the `extern crate` in diff --git a/tests/ui/rust-2018/future-proofing-locals.rs b/tests/ui/rust-2018/future-proofing-locals.rs index 2c388cf3713..77c704dfeda 100644 --- a/tests/ui/rust-2018/future-proofing-locals.rs +++ b/tests/ui/rust-2018/future-proofing-locals.rs @@ -1,4 +1,4 @@ -// edition:2018 +//@ edition:2018 #![allow(non_camel_case_types)] #![allow(unused_imports)] diff --git a/tests/ui/rust-2018/issue-51008-1.rs b/tests/ui/rust-2018/issue-51008-1.rs index 67dfbf64601..8ecbd6f9d37 100644 --- a/tests/ui/rust-2018/issue-51008-1.rs +++ b/tests/ui/rust-2018/issue-51008-1.rs @@ -2,7 +2,7 @@ // being incorrectly considered part of the "elided lifetimes" from // the impl. // -// check-pass +//@ check-pass trait A { diff --git a/tests/ui/rust-2018/issue-51008.rs b/tests/ui/rust-2018/issue-51008.rs index f9e4bc14ec8..e04e6cf30b8 100644 --- a/tests/ui/rust-2018/issue-51008.rs +++ b/tests/ui/rust-2018/issue-51008.rs @@ -2,7 +2,7 @@ // being incorrectly considered part of the "elided lifetimes" from // the impl. // -// check-pass +//@ check-pass trait A { diff --git a/tests/ui/rust-2018/issue-52202-use-suggestions.rs b/tests/ui/rust-2018/issue-52202-use-suggestions.rs index 1c0426808c7..ce9a5edf007 100644 --- a/tests/ui/rust-2018/issue-52202-use-suggestions.rs +++ b/tests/ui/rust-2018/issue-52202-use-suggestions.rs @@ -1,4 +1,4 @@ -// edition:2018 +//@ edition:2018 // The local `use` suggestion should start with `crate::` (but the // standard-library suggestions should not, obviously). diff --git a/tests/ui/rust-2018/issue-54006.rs b/tests/ui/rust-2018/issue-54006.rs index 6f929731c76..277f658026b 100644 --- a/tests/ui/rust-2018/issue-54006.rs +++ b/tests/ui/rust-2018/issue-54006.rs @@ -1,4 +1,4 @@ -// edition:2018 +//@ edition:2018 #![no_std] #![crate_type = "lib"] diff --git a/tests/ui/rust-2018/issue-54400-unused-extern-crate-attr-span.fixed b/tests/ui/rust-2018/issue-54400-unused-extern-crate-attr-span.fixed index d592438009a..2625cdc8b48 100644 --- a/tests/ui/rust-2018/issue-54400-unused-extern-crate-attr-span.fixed +++ b/tests/ui/rust-2018/issue-54400-unused-extern-crate-attr-span.fixed @@ -1,7 +1,7 @@ -// aux-build:edition-lint-paths.rs -// run-rustfix -// compile-flags:--extern edition_lint_paths --cfg blandiloquence -// edition:2018 +//@ aux-build:edition-lint-paths.rs +//@ run-rustfix +//@ compile-flags:--extern edition_lint_paths --cfg blandiloquence +//@ edition:2018 #![deny(rust_2018_idioms)] #![allow(dead_code)] diff --git a/tests/ui/rust-2018/issue-54400-unused-extern-crate-attr-span.rs b/tests/ui/rust-2018/issue-54400-unused-extern-crate-attr-span.rs index a948baee53c..eff03c6fbe6 100644 --- a/tests/ui/rust-2018/issue-54400-unused-extern-crate-attr-span.rs +++ b/tests/ui/rust-2018/issue-54400-unused-extern-crate-attr-span.rs @@ -1,7 +1,7 @@ -// aux-build:edition-lint-paths.rs -// run-rustfix -// compile-flags:--extern edition_lint_paths --cfg blandiloquence -// edition:2018 +//@ aux-build:edition-lint-paths.rs +//@ run-rustfix +//@ compile-flags:--extern edition_lint_paths --cfg blandiloquence +//@ edition:2018 #![deny(rust_2018_idioms)] #![allow(dead_code)] diff --git a/tests/ui/rust-2018/local-path-suggestions-2015.rs b/tests/ui/rust-2018/local-path-suggestions-2015.rs index 32e9c0c3366..378b112c40c 100644 --- a/tests/ui/rust-2018/local-path-suggestions-2015.rs +++ b/tests/ui/rust-2018/local-path-suggestions-2015.rs @@ -1,6 +1,6 @@ -// aux-build:baz.rs -// compile-flags:--extern baz -// edition:2015 +//@ aux-build:baz.rs +//@ compile-flags:--extern baz +//@ edition:2015 // This test exists to demonstrate the behaviour of the import suggestions // from the `local-path-suggestions-2018.rs` test when not using the 2018 edition. diff --git a/tests/ui/rust-2018/local-path-suggestions-2018.rs b/tests/ui/rust-2018/local-path-suggestions-2018.rs index 5eafbb2c2fc..bdf83ad8b8f 100644 --- a/tests/ui/rust-2018/local-path-suggestions-2018.rs +++ b/tests/ui/rust-2018/local-path-suggestions-2018.rs @@ -1,6 +1,6 @@ -// aux-build:baz.rs -// compile-flags:--extern baz -// edition:2018 +//@ aux-build:baz.rs +//@ compile-flags:--extern baz +//@ edition:2018 mod foo { pub type Bar = u32; diff --git a/tests/ui/rust-2018/macro-use-warned-against.rs b/tests/ui/rust-2018/macro-use-warned-against.rs index 72f2868e0bf..1e78acf201d 100644 --- a/tests/ui/rust-2018/macro-use-warned-against.rs +++ b/tests/ui/rust-2018/macro-use-warned-against.rs @@ -1,6 +1,6 @@ -// aux-build:macro-use-warned-against.rs -// aux-build:macro-use-warned-against2.rs -// check-pass +//@ aux-build:macro-use-warned-against.rs +//@ aux-build:macro-use-warned-against2.rs +//@ check-pass #![warn(macro_use_extern_crate, unused)] diff --git a/tests/ui/rust-2018/proc-macro-crate-in-paths.rs b/tests/ui/rust-2018/proc-macro-crate-in-paths.rs index 37e00a3936e..ce29fc51a4f 100644 --- a/tests/ui/rust-2018/proc-macro-crate-in-paths.rs +++ b/tests/ui/rust-2018/proc-macro-crate-in-paths.rs @@ -1,6 +1,6 @@ -// build-pass (FIXME(62277): could be check-pass?) -// force-host -// no-prefer-dynamic +//@ build-pass (FIXME(62277): could be check-pass?) +//@ force-host +//@ no-prefer-dynamic #![crate_type = "proc-macro"] #![deny(rust_2018_compatibility)] diff --git a/tests/ui/rust-2018/remove-extern-crate.fixed b/tests/ui/rust-2018/remove-extern-crate.fixed index 209b91af1dd..f025ccfeaeb 100644 --- a/tests/ui/rust-2018/remove-extern-crate.fixed +++ b/tests/ui/rust-2018/remove-extern-crate.fixed @@ -1,8 +1,8 @@ -// run-rustfix -// edition:2018 -// check-pass -// aux-build:remove-extern-crate.rs -// compile-flags:--extern remove_extern_crate +//@ run-rustfix +//@ edition:2018 +//@ check-pass +//@ aux-build:remove-extern-crate.rs +//@ compile-flags:--extern remove_extern_crate #![warn(rust_2018_idioms)] #![allow(dropping_copy_types)] diff --git a/tests/ui/rust-2018/remove-extern-crate.rs b/tests/ui/rust-2018/remove-extern-crate.rs index ef3c2db696a..0312964d5f6 100644 --- a/tests/ui/rust-2018/remove-extern-crate.rs +++ b/tests/ui/rust-2018/remove-extern-crate.rs @@ -1,8 +1,8 @@ -// run-rustfix -// edition:2018 -// check-pass -// aux-build:remove-extern-crate.rs -// compile-flags:--extern remove_extern_crate +//@ run-rustfix +//@ edition:2018 +//@ check-pass +//@ aux-build:remove-extern-crate.rs +//@ compile-flags:--extern remove_extern_crate #![warn(rust_2018_idioms)] #![allow(dropping_copy_types)] diff --git a/tests/ui/rust-2018/suggestions-not-always-applicable.fixed b/tests/ui/rust-2018/suggestions-not-always-applicable.fixed index d9e39a3b748..f94bf2d66d3 100644 --- a/tests/ui/rust-2018/suggestions-not-always-applicable.fixed +++ b/tests/ui/rust-2018/suggestions-not-always-applicable.fixed @@ -1,8 +1,8 @@ -// aux-build:suggestions-not-always-applicable.rs -// edition:2015 -// run-rustfix -// rustfix-only-machine-applicable -// check-pass +//@ aux-build:suggestions-not-always-applicable.rs +//@ edition:2015 +//@ run-rustfix +//@ rustfix-only-machine-applicable +//@ check-pass #![warn(rust_2018_compatibility)] diff --git a/tests/ui/rust-2018/suggestions-not-always-applicable.rs b/tests/ui/rust-2018/suggestions-not-always-applicable.rs index d9e39a3b748..f94bf2d66d3 100644 --- a/tests/ui/rust-2018/suggestions-not-always-applicable.rs +++ b/tests/ui/rust-2018/suggestions-not-always-applicable.rs @@ -1,8 +1,8 @@ -// aux-build:suggestions-not-always-applicable.rs -// edition:2015 -// run-rustfix -// rustfix-only-machine-applicable -// check-pass +//@ aux-build:suggestions-not-always-applicable.rs +//@ edition:2015 +//@ run-rustfix +//@ rustfix-only-machine-applicable +//@ check-pass #![warn(rust_2018_compatibility)] diff --git a/tests/ui/rust-2018/trait-import-suggestions.rs b/tests/ui/rust-2018/trait-import-suggestions.rs index 900b3d09334..5a5eeacedfc 100644 --- a/tests/ui/rust-2018/trait-import-suggestions.rs +++ b/tests/ui/rust-2018/trait-import-suggestions.rs @@ -1,6 +1,6 @@ -// edition:2018 -// aux-build:trait-import-suggestions.rs -// compile-flags:--extern trait_import_suggestions +//@ edition:2018 +//@ aux-build:trait-import-suggestions.rs +//@ compile-flags:--extern trait_import_suggestions mod foo { mod foobar { diff --git a/tests/ui/rust-2018/try-ident.fixed b/tests/ui/rust-2018/try-ident.fixed index 985348665c9..b1c446e1022 100644 --- a/tests/ui/rust-2018/try-ident.fixed +++ b/tests/ui/rust-2018/try-ident.fixed @@ -1,5 +1,5 @@ -// run-rustfix -// check-pass +//@ run-rustfix +//@ check-pass #![warn(rust_2018_compatibility)] diff --git a/tests/ui/rust-2018/try-ident.rs b/tests/ui/rust-2018/try-ident.rs index 2c02b75960e..8e62f698e25 100644 --- a/tests/ui/rust-2018/try-ident.rs +++ b/tests/ui/rust-2018/try-ident.rs @@ -1,5 +1,5 @@ -// run-rustfix -// check-pass +//@ run-rustfix +//@ check-pass #![warn(rust_2018_compatibility)] diff --git a/tests/ui/rust-2018/try-macro.fixed b/tests/ui/rust-2018/try-macro.fixed index 3308870f654..98c48d6b96f 100644 --- a/tests/ui/rust-2018/try-macro.fixed +++ b/tests/ui/rust-2018/try-macro.fixed @@ -1,7 +1,7 @@ // Test that `try!` macros are rewritten. -// run-rustfix -// check-pass +//@ run-rustfix +//@ check-pass #![warn(rust_2018_compatibility)] #![allow(dead_code)] diff --git a/tests/ui/rust-2018/try-macro.rs b/tests/ui/rust-2018/try-macro.rs index 69e87a1ff62..99480b2a3ec 100644 --- a/tests/ui/rust-2018/try-macro.rs +++ b/tests/ui/rust-2018/try-macro.rs @@ -1,7 +1,7 @@ // Test that `try!` macros are rewritten. -// run-rustfix -// check-pass +//@ run-rustfix +//@ check-pass #![warn(rust_2018_compatibility)] #![allow(dead_code)] diff --git a/tests/ui/rust-2018/uniform-paths/ambiguity-macros-nested.rs b/tests/ui/rust-2018/uniform-paths/ambiguity-macros-nested.rs index 678b4774dba..f864779d9e5 100644 --- a/tests/ui/rust-2018/uniform-paths/ambiguity-macros-nested.rs +++ b/tests/ui/rust-2018/uniform-paths/ambiguity-macros-nested.rs @@ -1,4 +1,4 @@ -// edition:2018 +//@ edition:2018 // This test is similar to `ambiguity-macros.rs`, but nested in a module. diff --git a/tests/ui/rust-2018/uniform-paths/ambiguity-macros.rs b/tests/ui/rust-2018/uniform-paths/ambiguity-macros.rs index 56ea726d73e..afa7f632945 100644 --- a/tests/ui/rust-2018/uniform-paths/ambiguity-macros.rs +++ b/tests/ui/rust-2018/uniform-paths/ambiguity-macros.rs @@ -1,4 +1,4 @@ -// edition:2018 +//@ edition:2018 // This test is similar to `ambiguity.rs`, but with macros defining local items. diff --git a/tests/ui/rust-2018/uniform-paths/ambiguity-nested.rs b/tests/ui/rust-2018/uniform-paths/ambiguity-nested.rs index 0ef580d7aa5..adff2bf63f5 100644 --- a/tests/ui/rust-2018/uniform-paths/ambiguity-nested.rs +++ b/tests/ui/rust-2018/uniform-paths/ambiguity-nested.rs @@ -1,5 +1,5 @@ -// check-pass -// edition:2018 +//@ check-pass +//@ edition:2018 // This test is similar to `ambiguity.rs`, but nested in a module. diff --git a/tests/ui/rust-2018/uniform-paths/ambiguity.rs b/tests/ui/rust-2018/uniform-paths/ambiguity.rs index 890e8b7b3c0..241bb1f25ac 100644 --- a/tests/ui/rust-2018/uniform-paths/ambiguity.rs +++ b/tests/ui/rust-2018/uniform-paths/ambiguity.rs @@ -1,5 +1,5 @@ -// check-pass -// edition:2018 +//@ check-pass +//@ edition:2018 #![allow(non_camel_case_types)] diff --git a/tests/ui/rust-2018/uniform-paths/auxiliary/cross-crate.rs b/tests/ui/rust-2018/uniform-paths/auxiliary/cross-crate.rs index 4aa5d187000..90a08496599 100644 --- a/tests/ui/rust-2018/uniform-paths/auxiliary/cross-crate.rs +++ b/tests/ui/rust-2018/uniform-paths/auxiliary/cross-crate.rs @@ -1,4 +1,4 @@ -// edition:2018 +//@ edition:2018 pub use ignore as built_in_attr; pub use u8 as built_in_type; diff --git a/tests/ui/rust-2018/uniform-paths/block-scoped-shadow-nested.rs b/tests/ui/rust-2018/uniform-paths/block-scoped-shadow-nested.rs index 4cba0949802..e0702cfe159 100644 --- a/tests/ui/rust-2018/uniform-paths/block-scoped-shadow-nested.rs +++ b/tests/ui/rust-2018/uniform-paths/block-scoped-shadow-nested.rs @@ -1,5 +1,5 @@ -// check-pass -// edition:2018 +//@ check-pass +//@ edition:2018 mod my { pub mod sub { diff --git a/tests/ui/rust-2018/uniform-paths/block-scoped-shadow.rs b/tests/ui/rust-2018/uniform-paths/block-scoped-shadow.rs index c902d133e7c..1ea1ee05323 100644 --- a/tests/ui/rust-2018/uniform-paths/block-scoped-shadow.rs +++ b/tests/ui/rust-2018/uniform-paths/block-scoped-shadow.rs @@ -1,5 +1,5 @@ -// check-pass -// edition:2018 +//@ check-pass +//@ edition:2018 #![allow(non_camel_case_types)] diff --git a/tests/ui/rust-2018/uniform-paths/cross-crate.rs b/tests/ui/rust-2018/uniform-paths/cross-crate.rs index 0ca7fa37a30..de03866219c 100644 --- a/tests/ui/rust-2018/uniform-paths/cross-crate.rs +++ b/tests/ui/rust-2018/uniform-paths/cross-crate.rs @@ -1,5 +1,5 @@ -// edition:2018 -// aux-build:cross-crate.rs +//@ edition:2018 +//@ aux-build:cross-crate.rs extern crate cross_crate; use cross_crate::*; diff --git a/tests/ui/rust-2018/uniform-paths/deadlock.rs b/tests/ui/rust-2018/uniform-paths/deadlock.rs index 2427bde6d18..4011ba3ee28 100644 --- a/tests/ui/rust-2018/uniform-paths/deadlock.rs +++ b/tests/ui/rust-2018/uniform-paths/deadlock.rs @@ -1,5 +1,5 @@ -// edition:2018 -// compile-flags:--extern foo --extern bar +//@ edition:2018 +//@ compile-flags:--extern foo --extern bar use bar::foo; //~ ERROR can't find crate for `bar` use foo::bar; //~ ERROR can't find crate for `foo` diff --git a/tests/ui/rust-2018/uniform-paths/fn-local-enum.rs b/tests/ui/rust-2018/uniform-paths/fn-local-enum.rs index c6525869b02..49b92090722 100644 --- a/tests/ui/rust-2018/uniform-paths/fn-local-enum.rs +++ b/tests/ui/rust-2018/uniform-paths/fn-local-enum.rs @@ -1,5 +1,5 @@ -// build-pass (FIXME(62277): could be check-pass?) -// edition:2018 +//@ build-pass (FIXME(62277): could be check-pass?) +//@ edition:2018 fn main() { enum E { A, B, C } diff --git a/tests/ui/rust-2018/uniform-paths/from-decl-macro.rs b/tests/ui/rust-2018/uniform-paths/from-decl-macro.rs index 9af520a0769..9dcdbb0bce9 100644 --- a/tests/ui/rust-2018/uniform-paths/from-decl-macro.rs +++ b/tests/ui/rust-2018/uniform-paths/from-decl-macro.rs @@ -1,5 +1,5 @@ -// build-pass (FIXME(62277): could be check-pass?) -// edition:2018 +//@ build-pass (FIXME(62277): could be check-pass?) +//@ edition:2018 #![feature(decl_macro)] diff --git a/tests/ui/rust-2018/uniform-paths/issue-54253.rs b/tests/ui/rust-2018/uniform-paths/issue-54253.rs index 7db469945e0..c6a1da9250f 100644 --- a/tests/ui/rust-2018/uniform-paths/issue-54253.rs +++ b/tests/ui/rust-2018/uniform-paths/issue-54253.rs @@ -1,4 +1,4 @@ -// edition:2018 +//@ edition:2018 // Dummy import that previously introduced uniform path canaries. use std; diff --git a/tests/ui/rust-2018/uniform-paths/issue-55779.rs b/tests/ui/rust-2018/uniform-paths/issue-55779.rs index 0af17a89b17..350ab324682 100644 --- a/tests/ui/rust-2018/uniform-paths/issue-55779.rs +++ b/tests/ui/rust-2018/uniform-paths/issue-55779.rs @@ -1,6 +1,6 @@ -// run-pass -// edition:2018 -// aux-crate:issue_55779_extern_trait=issue-55779-extern-trait.rs +//@ run-pass +//@ edition:2018 +//@ aux-crate:issue_55779_extern_trait=issue-55779-extern-trait.rs use issue_55779_extern_trait::Trait; diff --git a/tests/ui/rust-2018/uniform-paths/issue-56596-2.rs b/tests/ui/rust-2018/uniform-paths/issue-56596-2.rs index 9ea7e496d2b..d349e620efb 100644 --- a/tests/ui/rust-2018/uniform-paths/issue-56596-2.rs +++ b/tests/ui/rust-2018/uniform-paths/issue-56596-2.rs @@ -1,7 +1,7 @@ -// check-pass -// edition:2018 -// compile-flags: --extern issue_56596_2 -// aux-build:issue-56596-2.rs +//@ check-pass +//@ edition:2018 +//@ compile-flags: --extern issue_56596_2 +//@ aux-build:issue-56596-2.rs mod m { use core::any; diff --git a/tests/ui/rust-2018/uniform-paths/issue-56596.rs b/tests/ui/rust-2018/uniform-paths/issue-56596.rs index ec5bb656ad4..c1b5d9fad72 100644 --- a/tests/ui/rust-2018/uniform-paths/issue-56596.rs +++ b/tests/ui/rust-2018/uniform-paths/issue-56596.rs @@ -1,6 +1,6 @@ -// edition:2018 -// compile-flags: --extern issue_56596 -// aux-build:issue-56596.rs +//@ edition:2018 +//@ compile-flags: --extern issue_56596 +//@ aux-build:issue-56596.rs mod m { pub mod issue_56596 {} diff --git a/tests/ui/rust-2018/uniform-paths/issue-87932.rs b/tests/ui/rust-2018/uniform-paths/issue-87932.rs index 70a641d8a47..d24d4b8b482 100644 --- a/tests/ui/rust-2018/uniform-paths/issue-87932.rs +++ b/tests/ui/rust-2018/uniform-paths/issue-87932.rs @@ -1,5 +1,5 @@ -// edition:2018 -// aux-crate:issue_87932_a=issue-87932-a.rs +//@ edition:2018 +//@ aux-crate:issue_87932_a=issue-87932-a.rs pub struct A {} diff --git a/tests/ui/rust-2018/uniform-paths/macro-rules.rs b/tests/ui/rust-2018/uniform-paths/macro-rules.rs index 1084f5e8b34..72a1a4116a6 100644 --- a/tests/ui/rust-2018/uniform-paths/macro-rules.rs +++ b/tests/ui/rust-2018/uniform-paths/macro-rules.rs @@ -1,4 +1,4 @@ -// edition:2018 +//@ edition:2018 #![feature(decl_macro)] diff --git a/tests/ui/rust-2018/uniform-paths/prelude-fail-2.rs b/tests/ui/rust-2018/uniform-paths/prelude-fail-2.rs index 44da71de085..e26807daec9 100644 --- a/tests/ui/rust-2018/uniform-paths/prelude-fail-2.rs +++ b/tests/ui/rust-2018/uniform-paths/prelude-fail-2.rs @@ -1,4 +1,4 @@ -// edition:2018 +//@ edition:2018 // Built-in attribute use inline as imported_inline; diff --git a/tests/ui/rust-2018/uniform-paths/prelude-fail.rs b/tests/ui/rust-2018/uniform-paths/prelude-fail.rs index 48c33d720dc..ae2606102bc 100644 --- a/tests/ui/rust-2018/uniform-paths/prelude-fail.rs +++ b/tests/ui/rust-2018/uniform-paths/prelude-fail.rs @@ -1,4 +1,4 @@ -// edition:2018 +//@ edition:2018 // Tool attribute use rustfmt::skip as imported_rustfmt_skip; //~ ERROR unresolved import `rustfmt` diff --git a/tests/ui/rust-2018/uniform-paths/prelude.rs b/tests/ui/rust-2018/uniform-paths/prelude.rs index 65763614ce0..20195541e38 100644 --- a/tests/ui/rust-2018/uniform-paths/prelude.rs +++ b/tests/ui/rust-2018/uniform-paths/prelude.rs @@ -1,5 +1,5 @@ -// build-pass (FIXME(62277): could be check-pass?) -// edition:2018 +//@ build-pass (FIXME(62277): could be check-pass?) +//@ edition:2018 // Macro imported with `#[macro_use] extern crate` use vec as imported_vec; diff --git a/tests/ui/rust-2018/uniform-paths/redundant.rs b/tests/ui/rust-2018/uniform-paths/redundant.rs index fd7fc7fbd41..c7eca0c9e00 100644 --- a/tests/ui/rust-2018/uniform-paths/redundant.rs +++ b/tests/ui/rust-2018/uniform-paths/redundant.rs @@ -1,5 +1,5 @@ -// run-pass -// edition:2018 +//@ run-pass +//@ edition:2018 use std; use std::io; diff --git a/tests/ui/rust-2018/unresolved-asterisk-imports.rs b/tests/ui/rust-2018/unresolved-asterisk-imports.rs index ad1064570c7..809f1dbc6d2 100644 --- a/tests/ui/rust-2018/unresolved-asterisk-imports.rs +++ b/tests/ui/rust-2018/unresolved-asterisk-imports.rs @@ -1,4 +1,4 @@ -// edition:2018 +//@ edition:2018 use not_existing_crate::*; //~ ERROR unresolved import `not_existing_crate use std as foo; diff --git a/tests/ui/rust-2021/array-into-iter-ambiguous.fixed b/tests/ui/rust-2021/array-into-iter-ambiguous.fixed index 76f661baed7..2d5aeb266c1 100644 --- a/tests/ui/rust-2021/array-into-iter-ambiguous.fixed +++ b/tests/ui/rust-2021/array-into-iter-ambiguous.fixed @@ -1,7 +1,7 @@ // See https://github.com/rust-lang/rust/issues/88475 -// run-rustfix -// edition:2018 -// check-pass +//@ run-rustfix +//@ edition:2018 +//@ check-pass #![warn(array_into_iter)] #![allow(unused)] diff --git a/tests/ui/rust-2021/array-into-iter-ambiguous.rs b/tests/ui/rust-2021/array-into-iter-ambiguous.rs index 83fbf8f6c21..b2fe27e064a 100644 --- a/tests/ui/rust-2021/array-into-iter-ambiguous.rs +++ b/tests/ui/rust-2021/array-into-iter-ambiguous.rs @@ -1,7 +1,7 @@ // See https://github.com/rust-lang/rust/issues/88475 -// run-rustfix -// edition:2018 -// check-pass +//@ run-rustfix +//@ edition:2018 +//@ check-pass #![warn(array_into_iter)] #![allow(unused)] diff --git a/tests/ui/rust-2021/auxiliary/reserved-prefixes-macro-2018.rs b/tests/ui/rust-2021/auxiliary/reserved-prefixes-macro-2018.rs index eb301e5e1be..1273969c4af 100644 --- a/tests/ui/rust-2021/auxiliary/reserved-prefixes-macro-2018.rs +++ b/tests/ui/rust-2021/auxiliary/reserved-prefixes-macro-2018.rs @@ -1,6 +1,6 @@ -// force-host -// edition:2018 -// no-prefer-dynamic +//@ force-host +//@ edition:2018 +//@ no-prefer-dynamic #![crate_type = "proc-macro"] diff --git a/tests/ui/rust-2021/auxiliary/reserved-prefixes-macro-2021.rs b/tests/ui/rust-2021/auxiliary/reserved-prefixes-macro-2021.rs index 691bfdc15c3..b68701a5165 100644 --- a/tests/ui/rust-2021/auxiliary/reserved-prefixes-macro-2021.rs +++ b/tests/ui/rust-2021/auxiliary/reserved-prefixes-macro-2021.rs @@ -1,6 +1,6 @@ -// force-host -// edition:2021 -// no-prefer-dynamic +//@ force-host +//@ edition:2021 +//@ no-prefer-dynamic #![crate_type = "proc-macro"] diff --git a/tests/ui/rust-2021/future-prelude-collision-generic-trait.fixed b/tests/ui/rust-2021/future-prelude-collision-generic-trait.fixed index a1b6f5b16ba..ea104011873 100644 --- a/tests/ui/rust-2021/future-prelude-collision-generic-trait.fixed +++ b/tests/ui/rust-2021/future-prelude-collision-generic-trait.fixed @@ -1,7 +1,7 @@ // See https://github.com/rust-lang/rust/issues/88470 -// run-rustfix -// edition:2018 -// check-pass +//@ run-rustfix +//@ edition:2018 +//@ check-pass #![warn(rust_2021_prelude_collisions)] #![allow(dead_code)] #![allow(unused_imports)] diff --git a/tests/ui/rust-2021/future-prelude-collision-generic-trait.rs b/tests/ui/rust-2021/future-prelude-collision-generic-trait.rs index 142ba552002..ce7dd2fdac7 100644 --- a/tests/ui/rust-2021/future-prelude-collision-generic-trait.rs +++ b/tests/ui/rust-2021/future-prelude-collision-generic-trait.rs @@ -1,7 +1,7 @@ // See https://github.com/rust-lang/rust/issues/88470 -// run-rustfix -// edition:2018 -// check-pass +//@ run-rustfix +//@ edition:2018 +//@ check-pass #![warn(rust_2021_prelude_collisions)] #![allow(dead_code)] #![allow(unused_imports)] diff --git a/tests/ui/rust-2021/future-prelude-collision-generic.fixed b/tests/ui/rust-2021/future-prelude-collision-generic.fixed index 1bb9ba37774..3546b1aef6c 100644 --- a/tests/ui/rust-2021/future-prelude-collision-generic.fixed +++ b/tests/ui/rust-2021/future-prelude-collision-generic.fixed @@ -1,7 +1,7 @@ // test for https://github.com/rust-lang/rust/issues/86940 -// run-rustfix -// edition:2018 -// check-pass +//@ run-rustfix +//@ edition:2018 +//@ check-pass #![warn(rust_2021_prelude_collisions)] #![allow(dead_code)] #![allow(unused_imports)] diff --git a/tests/ui/rust-2021/future-prelude-collision-generic.rs b/tests/ui/rust-2021/future-prelude-collision-generic.rs index d7f8affc61a..1ae5e8fce23 100644 --- a/tests/ui/rust-2021/future-prelude-collision-generic.rs +++ b/tests/ui/rust-2021/future-prelude-collision-generic.rs @@ -1,7 +1,7 @@ // test for https://github.com/rust-lang/rust/issues/86940 -// run-rustfix -// edition:2018 -// check-pass +//@ run-rustfix +//@ edition:2018 +//@ check-pass #![warn(rust_2021_prelude_collisions)] #![allow(dead_code)] #![allow(unused_imports)] diff --git a/tests/ui/rust-2021/future-prelude-collision-imported.fixed b/tests/ui/rust-2021/future-prelude-collision-imported.fixed index 15ccff7496e..e69896ed569 100644 --- a/tests/ui/rust-2021/future-prelude-collision-imported.fixed +++ b/tests/ui/rust-2021/future-prelude-collision-imported.fixed @@ -1,6 +1,6 @@ -// run-rustfix -// edition:2018 -// check-pass +//@ run-rustfix +//@ edition:2018 +//@ check-pass #![warn(rust_2021_prelude_collisions)] #![allow(dead_code)] #![allow(unused_imports)] diff --git a/tests/ui/rust-2021/future-prelude-collision-imported.rs b/tests/ui/rust-2021/future-prelude-collision-imported.rs index cdffcaf7545..4c29031b835 100644 --- a/tests/ui/rust-2021/future-prelude-collision-imported.rs +++ b/tests/ui/rust-2021/future-prelude-collision-imported.rs @@ -1,6 +1,6 @@ -// run-rustfix -// edition:2018 -// check-pass +//@ run-rustfix +//@ edition:2018 +//@ check-pass #![warn(rust_2021_prelude_collisions)] #![allow(dead_code)] #![allow(unused_imports)] diff --git a/tests/ui/rust-2021/future-prelude-collision-macros.fixed b/tests/ui/rust-2021/future-prelude-collision-macros.fixed index a97dc176e1b..f5a548a2501 100644 --- a/tests/ui/rust-2021/future-prelude-collision-macros.fixed +++ b/tests/ui/rust-2021/future-prelude-collision-macros.fixed @@ -1,6 +1,6 @@ -// run-rustfix -// edition:2018 -// check-pass +//@ run-rustfix +//@ edition:2018 +//@ check-pass #![warn(rust_2021_prelude_collisions)] #![allow(unreachable_code)] diff --git a/tests/ui/rust-2021/future-prelude-collision-macros.rs b/tests/ui/rust-2021/future-prelude-collision-macros.rs index 82484b5b368..46265356f46 100644 --- a/tests/ui/rust-2021/future-prelude-collision-macros.rs +++ b/tests/ui/rust-2021/future-prelude-collision-macros.rs @@ -1,6 +1,6 @@ -// run-rustfix -// edition:2018 -// check-pass +//@ run-rustfix +//@ edition:2018 +//@ check-pass #![warn(rust_2021_prelude_collisions)] #![allow(unreachable_code)] diff --git a/tests/ui/rust-2021/future-prelude-collision-shadow.rs b/tests/ui/rust-2021/future-prelude-collision-shadow.rs index 27891a8d11d..556d646e013 100644 --- a/tests/ui/rust-2021/future-prelude-collision-shadow.rs +++ b/tests/ui/rust-2021/future-prelude-collision-shadow.rs @@ -1,4 +1,4 @@ -// edition:2018 +//@ edition:2018 #![warn(rust_2021_prelude_collisions)] #![allow(dead_code)] #![allow(unused_imports)] diff --git a/tests/ui/rust-2021/future-prelude-collision-turbofish.fixed b/tests/ui/rust-2021/future-prelude-collision-turbofish.fixed index 3e76fced774..591fa32efab 100644 --- a/tests/ui/rust-2021/future-prelude-collision-turbofish.fixed +++ b/tests/ui/rust-2021/future-prelude-collision-turbofish.fixed @@ -1,7 +1,7 @@ // See https://github.com/rust-lang/rust/issues/88442 -// run-rustfix -// edition:2018 -// check-pass +//@ run-rustfix +//@ edition:2018 +//@ check-pass #![allow(unused)] #![warn(rust_2021_prelude_collisions)] diff --git a/tests/ui/rust-2021/future-prelude-collision-turbofish.rs b/tests/ui/rust-2021/future-prelude-collision-turbofish.rs index abb292ef992..a7033ab87c9 100644 --- a/tests/ui/rust-2021/future-prelude-collision-turbofish.rs +++ b/tests/ui/rust-2021/future-prelude-collision-turbofish.rs @@ -1,7 +1,7 @@ // See https://github.com/rust-lang/rust/issues/88442 -// run-rustfix -// edition:2018 -// check-pass +//@ run-rustfix +//@ edition:2018 +//@ check-pass #![allow(unused)] #![warn(rust_2021_prelude_collisions)] diff --git a/tests/ui/rust-2021/future-prelude-collision-unneeded.rs b/tests/ui/rust-2021/future-prelude-collision-unneeded.rs index 247d5884b86..b97dc1bc042 100644 --- a/tests/ui/rust-2021/future-prelude-collision-unneeded.rs +++ b/tests/ui/rust-2021/future-prelude-collision-unneeded.rs @@ -1,5 +1,5 @@ -// edition:2018 -// check-pass +//@ edition:2018 +//@ check-pass #![allow(unused)] #![deny(rust_2021_prelude_collisions)] diff --git a/tests/ui/rust-2021/future-prelude-collision.fixed b/tests/ui/rust-2021/future-prelude-collision.fixed index 43b0ec1c3e6..37c56400c3e 100644 --- a/tests/ui/rust-2021/future-prelude-collision.fixed +++ b/tests/ui/rust-2021/future-prelude-collision.fixed @@ -1,6 +1,6 @@ -// run-rustfix -// edition:2018 -// check-pass +//@ run-rustfix +//@ edition:2018 +//@ check-pass #![warn(rust_2021_prelude_collisions)] trait TryIntoU32 { diff --git a/tests/ui/rust-2021/future-prelude-collision.rs b/tests/ui/rust-2021/future-prelude-collision.rs index 4c7a47ffbe2..067c62f4d9e 100644 --- a/tests/ui/rust-2021/future-prelude-collision.rs +++ b/tests/ui/rust-2021/future-prelude-collision.rs @@ -1,6 +1,6 @@ -// run-rustfix -// edition:2018 -// check-pass +//@ run-rustfix +//@ edition:2018 +//@ check-pass #![warn(rust_2021_prelude_collisions)] trait TryIntoU32 { diff --git a/tests/ui/rust-2021/generic-type-collision.fixed b/tests/ui/rust-2021/generic-type-collision.fixed index feba7d19b66..a0a53e92d26 100644 --- a/tests/ui/rust-2021/generic-type-collision.fixed +++ b/tests/ui/rust-2021/generic-type-collision.fixed @@ -1,6 +1,6 @@ -// check-pass -// run-rustfix -// edition 2018 +//@ check-pass +//@ run-rustfix +//@ edition 2018 #![warn(rust_2021_prelude_collisions)] trait MyTrait { diff --git a/tests/ui/rust-2021/generic-type-collision.rs b/tests/ui/rust-2021/generic-type-collision.rs index 335e7e520a4..16c3967287d 100644 --- a/tests/ui/rust-2021/generic-type-collision.rs +++ b/tests/ui/rust-2021/generic-type-collision.rs @@ -1,6 +1,6 @@ -// check-pass -// run-rustfix -// edition 2018 +//@ check-pass +//@ run-rustfix +//@ edition 2018 #![warn(rust_2021_prelude_collisions)] trait MyTrait { diff --git a/tests/ui/rust-2021/inherent-dyn-collision.fixed b/tests/ui/rust-2021/inherent-dyn-collision.fixed index 5789a90393b..f5702613af0 100644 --- a/tests/ui/rust-2021/inherent-dyn-collision.fixed +++ b/tests/ui/rust-2021/inherent-dyn-collision.fixed @@ -1,9 +1,9 @@ // Test case where the method we want is an inherent method on a // dyn Trait. In that case, the fix is to insert `*` on the receiver. // -// check-pass -// run-rustfix -// edition:2018 +//@ check-pass +//@ run-rustfix +//@ edition:2018 #![warn(rust_2021_prelude_collisions)] diff --git a/tests/ui/rust-2021/inherent-dyn-collision.rs b/tests/ui/rust-2021/inherent-dyn-collision.rs index a3893c033e9..0bcb34e5708 100644 --- a/tests/ui/rust-2021/inherent-dyn-collision.rs +++ b/tests/ui/rust-2021/inherent-dyn-collision.rs @@ -1,9 +1,9 @@ // Test case where the method we want is an inherent method on a // dyn Trait. In that case, the fix is to insert `*` on the receiver. // -// check-pass -// run-rustfix -// edition:2018 +//@ check-pass +//@ run-rustfix +//@ edition:2018 #![warn(rust_2021_prelude_collisions)] diff --git a/tests/ui/rust-2021/inherent-method-collision.rs b/tests/ui/rust-2021/inherent-method-collision.rs index 507105207d6..1dad62eb13c 100644 --- a/tests/ui/rust-2021/inherent-method-collision.rs +++ b/tests/ui/rust-2021/inherent-method-collision.rs @@ -1,6 +1,6 @@ // Test that we do NOT warn for inherent methods invoked via `T::` form. // -// check-pass +//@ check-pass #![deny(rust_2021_prelude_collisions)] diff --git a/tests/ui/rust-2021/panic.rs b/tests/ui/rust-2021/panic.rs index 394fc3c8f82..77221bfa34e 100644 --- a/tests/ui/rust-2021/panic.rs +++ b/tests/ui/rust-2021/panic.rs @@ -1,4 +1,4 @@ -// edition:2021 +//@ edition:2021 fn main() { debug_assert!(false, 123); diff --git a/tests/ui/rust-2021/prelude2021.rs b/tests/ui/rust-2021/prelude2021.rs index a63b6fcf262..274b6437efa 100644 --- a/tests/ui/rust-2021/prelude2021.rs +++ b/tests/ui/rust-2021/prelude2021.rs @@ -1,5 +1,5 @@ -// check-pass -// edition:2021 +//@ check-pass +//@ edition:2021 fn main() { let _: u16 = 123i32.try_into().unwrap(); diff --git a/tests/ui/rust-2021/reserved-prefixes-migration.fixed b/tests/ui/rust-2021/reserved-prefixes-migration.fixed index eed2f313abe..399ff1c75ba 100644 --- a/tests/ui/rust-2021/reserved-prefixes-migration.fixed +++ b/tests/ui/rust-2021/reserved-prefixes-migration.fixed @@ -1,6 +1,6 @@ -// check-pass -// run-rustfix -// edition:2018 +//@ check-pass +//@ run-rustfix +//@ edition:2018 #![warn(rust_2021_prefixes_incompatible_syntax)] diff --git a/tests/ui/rust-2021/reserved-prefixes-migration.rs b/tests/ui/rust-2021/reserved-prefixes-migration.rs index 0565db793df..5adb9a00e3a 100644 --- a/tests/ui/rust-2021/reserved-prefixes-migration.rs +++ b/tests/ui/rust-2021/reserved-prefixes-migration.rs @@ -1,6 +1,6 @@ -// check-pass -// run-rustfix -// edition:2018 +//@ check-pass +//@ run-rustfix +//@ edition:2018 #![warn(rust_2021_prefixes_incompatible_syntax)] diff --git a/tests/ui/rust-2021/reserved-prefixes-via-macro-2.rs b/tests/ui/rust-2021/reserved-prefixes-via-macro-2.rs index 74f20660613..b64761b55e9 100644 --- a/tests/ui/rust-2021/reserved-prefixes-via-macro-2.rs +++ b/tests/ui/rust-2021/reserved-prefixes-via-macro-2.rs @@ -1,6 +1,6 @@ -// edition:2018 -// aux-build:reserved-prefixes-macro-2018.rs -// aux-build:reserved-prefixes-macro-2021.rs +//@ edition:2018 +//@ aux-build:reserved-prefixes-macro-2018.rs +//@ aux-build:reserved-prefixes-macro-2021.rs extern crate reserved_prefixes_macro_2018 as m2018; extern crate reserved_prefixes_macro_2021 as m2021; diff --git a/tests/ui/rust-2021/reserved-prefixes-via-macro.rs b/tests/ui/rust-2021/reserved-prefixes-via-macro.rs index 110b6d64ccc..85f894d7f79 100644 --- a/tests/ui/rust-2021/reserved-prefixes-via-macro.rs +++ b/tests/ui/rust-2021/reserved-prefixes-via-macro.rs @@ -1,6 +1,6 @@ -// run-pass -// edition:2021 -// aux-build:reserved-prefixes-macro-2018.rs +//@ run-pass +//@ edition:2021 +//@ aux-build:reserved-prefixes-macro-2018.rs extern crate reserved_prefixes_macro_2018 as m2018; diff --git a/tests/ui/rust-2021/reserved-prefixes.rs b/tests/ui/rust-2021/reserved-prefixes.rs index 1994f25b6a5..aa76f0e0dad 100644 --- a/tests/ui/rust-2021/reserved-prefixes.rs +++ b/tests/ui/rust-2021/reserved-prefixes.rs @@ -1,4 +1,4 @@ -// edition:2021 +//@ edition:2021 macro_rules! demo2 { ( $a:tt $b:tt ) => { println!("two tokens") }; diff --git a/tests/ui/rustc-rust-log.rs b/tests/ui/rustc-rust-log.rs index 52e7dcf4499..299b6c40a56 100644 --- a/tests/ui/rustc-rust-log.rs +++ b/tests/ui/rustc-rust-log.rs @@ -1,11 +1,11 @@ -// run-pass +//@ run-pass // 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 -// compile-flags: --error-format human -// aux-build: rustc-rust-log-aux.rs -// rustc-env:RUSTC_LOG=debug +//@ dont-check-compiler-stdout +//@ dont-check-compiler-stderr +//@ compile-flags: --error-format human +//@ aux-build: rustc-rust-log-aux.rs +//@ rustc-env:RUSTC_LOG=debug fn main() {} diff --git a/tests/ui/rustdoc/doc-alias-crate-level.rs b/tests/ui/rustdoc/doc-alias-crate-level.rs index c7783aae5ea..7bbfb72900a 100644 --- a/tests/ui/rustdoc/doc-alias-crate-level.rs +++ b/tests/ui/rustdoc/doc-alias-crate-level.rs @@ -1,4 +1,4 @@ -// compile-flags: -Zdeduplicate-diagnostics=no +//@ compile-flags: -Zdeduplicate-diagnostics=no #![crate_type = "lib"] diff --git a/tests/ui/rustdoc/doc-test-attr-pass.rs b/tests/ui/rustdoc/doc-test-attr-pass.rs index 7884addd15f..f0120b7c2d0 100644 --- a/tests/ui/rustdoc/doc-test-attr-pass.rs +++ b/tests/ui/rustdoc/doc-test-attr-pass.rs @@ -1,4 +1,4 @@ -// check-pass +//@ check-pass #![crate_type = "lib"] #![deny(invalid_doc_attributes)] diff --git a/tests/ui/rustdoc/hidden-doc-associated-item.rs b/tests/ui/rustdoc/hidden-doc-associated-item.rs index d431f9e899c..beb7628b5e0 100644 --- a/tests/ui/rustdoc/hidden-doc-associated-item.rs +++ b/tests/ui/rustdoc/hidden-doc-associated-item.rs @@ -1,4 +1,4 @@ -// check-pass +//@ check-pass // See issue #85526. // This test should produce no warnings. diff --git a/tests/ui/sanitize/address.rs b/tests/ui/sanitize/address.rs index 1faab1fd2fc..7a5e767687c 100644 --- a/tests/ui/sanitize/address.rs +++ b/tests/ui/sanitize/address.rs @@ -1,12 +1,12 @@ -// needs-sanitizer-support -// needs-sanitizer-address -// ignore-cross-compile +//@ needs-sanitizer-support +//@ needs-sanitizer-address +//@ ignore-cross-compile // -// compile-flags: -Z sanitizer=address -O -g +//@ compile-flags: -Z sanitizer=address -O -g // -// run-fail -// error-pattern: AddressSanitizer: stack-buffer-overflow -// error-pattern: 'xs' (line 14) <== Memory access at offset +//@ run-fail +//@ error-pattern: AddressSanitizer: stack-buffer-overflow +//@ error-pattern: 'xs' (line 14) <== Memory access at offset use std::hint::black_box; diff --git a/tests/ui/sanitize/badfree.rs b/tests/ui/sanitize/badfree.rs index 4a230e11d95..ecbb58eba00 100644 --- a/tests/ui/sanitize/badfree.rs +++ b/tests/ui/sanitize/badfree.rs @@ -1,11 +1,11 @@ -// needs-sanitizer-support -// needs-sanitizer-address -// ignore-cross-compile +//@ needs-sanitizer-support +//@ needs-sanitizer-address +//@ ignore-cross-compile // -// compile-flags: -Z sanitizer=address -O +//@ compile-flags: -Z sanitizer=address -O // -// run-fail -// regex-error-pattern: AddressSanitizer: (SEGV|attempting free on address which was not malloc) +//@ run-fail +//@ regex-error-pattern: AddressSanitizer: (SEGV|attempting free on address which was not malloc) use std::ffi::c_void; diff --git a/tests/ui/sanitize/cfg-kasan.rs b/tests/ui/sanitize/cfg-kasan.rs index fb9a6f549ce..394bf216581 100644 --- a/tests/ui/sanitize/cfg-kasan.rs +++ b/tests/ui/sanitize/cfg-kasan.rs @@ -1,17 +1,17 @@ // Verifies that when compiling with -Zsanitizer=kernel-address, // the `#[cfg(sanitize = "address")]` attribute is configured. -// check-pass -// compile-flags: -Zsanitizer=kernel-address --cfg kernel_address -// 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 +//@ check-pass +//@ compile-flags: -Zsanitizer=kernel-address --cfg kernel_address +//@ 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(cfg_sanitize, no_core, lang_items)] diff --git a/tests/ui/sanitize/cfg.rs b/tests/ui/sanitize/cfg.rs index 761c646ec88..942141bd3fe 100644 --- a/tests/ui/sanitize/cfg.rs +++ b/tests/ui/sanitize/cfg.rs @@ -1,22 +1,22 @@ // Verifies that when compiling with -Zsanitizer=option, // the `#[cfg(sanitize = "option")]` attribute is configured. -// check-pass -// revisions: address cfi kcfi leak memory thread -//compile-flags: -Ctarget-feature=-crt-static -//[address]needs-sanitizer-address -//[address]compile-flags: -Zsanitizer=address --cfg address -//[cfi]needs-sanitizer-cfi -//[cfi]compile-flags: -Zsanitizer=cfi --cfg cfi -//[cfi]compile-flags: -Clto -Ccodegen-units=1 -//[kcfi]needs-llvm-components: x86 -//[kcfi]compile-flags: -Zsanitizer=kcfi --cfg kcfi --target x86_64-unknown-none -//[leak]needs-sanitizer-leak -//[leak]compile-flags: -Zsanitizer=leak --cfg leak -//[memory]needs-sanitizer-memory -//[memory]compile-flags: -Zsanitizer=memory --cfg memory -//[thread]needs-sanitizer-thread -//[thread]compile-flags: -Zsanitizer=thread --cfg thread +//@ check-pass +//@ revisions: address cfi kcfi leak memory thread +//@compile-flags: -Ctarget-feature=-crt-static +//@[address]needs-sanitizer-address +//@[address]compile-flags: -Zsanitizer=address --cfg address +//@[cfi]needs-sanitizer-cfi +//@[cfi]compile-flags: -Zsanitizer=cfi --cfg cfi +//@[cfi]compile-flags: -Clto -Ccodegen-units=1 +//@[kcfi]needs-llvm-components: x86 +//@[kcfi]compile-flags: -Zsanitizer=kcfi --cfg kcfi --target x86_64-unknown-none +//@[leak]needs-sanitizer-leak +//@[leak]compile-flags: -Zsanitizer=leak --cfg leak +//@[memory]needs-sanitizer-memory +//@[memory]compile-flags: -Zsanitizer=memory --cfg memory +//@[thread]needs-sanitizer-thread +//@[thread]compile-flags: -Zsanitizer=thread --cfg thread #![feature(cfg_sanitize, no_core, lang_items)] #![crate_type="lib"] diff --git a/tests/ui/sanitize/crt-static.rs b/tests/ui/sanitize/crt-static.rs index 7a6b9eda3fa..c24faeca3dc 100644 --- a/tests/ui/sanitize/crt-static.rs +++ b/tests/ui/sanitize/crt-static.rs @@ -1,5 +1,5 @@ -// compile-flags: -Z sanitizer=address -C target-feature=+crt-static --target x86_64-unknown-linux-gnu -// needs-llvm-components: x86 +//@ compile-flags: -Z sanitizer=address -C target-feature=+crt-static --target x86_64-unknown-linux-gnu +//@ needs-llvm-components: x86 #![feature(no_core)] #![no_core] diff --git a/tests/ui/sanitize/hwaddress.rs b/tests/ui/sanitize/hwaddress.rs index f9b37a155aa..e5939eb734b 100644 --- a/tests/ui/sanitize/hwaddress.rs +++ b/tests/ui/sanitize/hwaddress.rs @@ -1,14 +1,14 @@ -// needs-sanitizer-support -// needs-sanitizer-hwaddress +//@ needs-sanitizer-support +//@ needs-sanitizer-hwaddress // // FIXME(#83706): this test triggers errors on aarch64-gnu -// ignore-aarch64-unknown-linux-gnu +//@ ignore-aarch64-unknown-linux-gnu // // FIXME(#83989): codegen-units=1 triggers linker errors on aarch64-gnu -// compile-flags: -Z sanitizer=hwaddress -O -g -C codegen-units=16 +//@ compile-flags: -Z sanitizer=hwaddress -O -g -C codegen-units=16 // -// run-fail -// error-pattern: HWAddressSanitizer: tag-mismatch +//@ run-fail +//@ error-pattern: HWAddressSanitizer: tag-mismatch use std::hint::black_box; diff --git a/tests/ui/sanitize/incompatible.rs b/tests/ui/sanitize/incompatible.rs index bcafc2891fd..d000abb26ac 100644 --- a/tests/ui/sanitize/incompatible.rs +++ b/tests/ui/sanitize/incompatible.rs @@ -1,6 +1,6 @@ -// compile-flags: -Z sanitizer=address -Z sanitizer=memory --target x86_64-unknown-linux-gnu -// needs-llvm-components: x86 -// error-pattern: error: `-Zsanitizer=address` is incompatible with `-Zsanitizer=memory` +//@ compile-flags: -Z sanitizer=address -Z sanitizer=memory --target x86_64-unknown-linux-gnu +//@ needs-llvm-components: x86 +//@ error-pattern: error: `-Zsanitizer=address` is incompatible with `-Zsanitizer=memory` #![feature(no_core)] #![no_core] diff --git a/tests/ui/sanitize/inline-always.rs b/tests/ui/sanitize/inline-always.rs index 52dc5578180..d92daee3026 100644 --- a/tests/ui/sanitize/inline-always.rs +++ b/tests/ui/sanitize/inline-always.rs @@ -1,4 +1,4 @@ -// check-pass +//@ check-pass #![feature(no_sanitize)] diff --git a/tests/ui/sanitize/issue-111184-coroutine-witness.rs b/tests/ui/sanitize/issue-111184-coroutine-witness.rs index dffb739f203..e5b1e032257 100644 --- a/tests/ui/sanitize/issue-111184-coroutine-witness.rs +++ b/tests/ui/sanitize/issue-111184-coroutine-witness.rs @@ -1,11 +1,11 @@ // Regression test for issue 111184, where ty::CoroutineWitness were not expected to occur in // encode_ty and caused the compiler to ICE. // -// needs-sanitizer-cfi -// compile-flags: -Ccodegen-units=1 -Clto -Ctarget-feature=-crt-static -Zsanitizer=cfi --edition=2021 -// no-prefer-dynamic -// only-x86_64-unknown-linux-gnu -// build-pass +//@ needs-sanitizer-cfi +//@ compile-flags: -Ccodegen-units=1 -Clto -Ctarget-feature=-crt-static -Zsanitizer=cfi --edition=2021 +//@ no-prefer-dynamic +//@ only-x86_64-unknown-linux-gnu +//@ build-pass use std::future::Future; diff --git a/tests/ui/sanitize/issue-114275-cfi-const-expr-in-arry-len.rs b/tests/ui/sanitize/issue-114275-cfi-const-expr-in-arry-len.rs index 8f870be1372..b1b7487fa2a 100644 --- a/tests/ui/sanitize/issue-114275-cfi-const-expr-in-arry-len.rs +++ b/tests/ui/sanitize/issue-114275-cfi-const-expr-in-arry-len.rs @@ -1,9 +1,9 @@ // Regression test for issue 114275 `typeid::typeid_itanium_cxx_abi::transform_ty` // was expecting array type lengths to be evaluated, this was causing an ICE. // -// build-pass -// compile-flags: -Ccodegen-units=1 -Clto -Zsanitizer=cfi -Ctarget-feature=-crt-static -// needs-sanitizer-cfi +//@ build-pass +//@ compile-flags: -Ccodegen-units=1 -Clto -Zsanitizer=cfi -Ctarget-feature=-crt-static +//@ needs-sanitizer-cfi #![crate_type = "lib"] diff --git a/tests/ui/sanitize/issue-72154-lifetime-markers.rs b/tests/ui/sanitize/issue-72154-lifetime-markers.rs index 3d9c51daa65..aa0c19db9a1 100644 --- a/tests/ui/sanitize/issue-72154-lifetime-markers.rs +++ b/tests/ui/sanitize/issue-72154-lifetime-markers.rs @@ -3,12 +3,12 @@ // always inliner pass not to insert them. This eventually lead to a // miscompilation which was subsequently detected by AddressSanitizer as UB. // -// needs-sanitizer-support -// needs-sanitizer-address -// ignore-cross-compile +//@ needs-sanitizer-support +//@ needs-sanitizer-address +//@ ignore-cross-compile // -// compile-flags: -Copt-level=0 -Zsanitizer=address -// run-pass +//@ compile-flags: -Copt-level=0 -Zsanitizer=address +//@ run-pass pub struct Wrap { pub t: [usize; 1] diff --git a/tests/ui/sanitize/leak.rs b/tests/ui/sanitize/leak.rs index cbb44ae8acd..65915ec24b7 100644 --- a/tests/ui/sanitize/leak.rs +++ b/tests/ui/sanitize/leak.rs @@ -1,10 +1,10 @@ -// needs-sanitizer-support -// needs-sanitizer-leak +//@ needs-sanitizer-support +//@ needs-sanitizer-leak // -// compile-flags: -Z sanitizer=leak -O +//@ compile-flags: -Z sanitizer=leak -O // -// run-fail -// error-pattern: LeakSanitizer: detected memory leaks +//@ run-fail +//@ error-pattern: LeakSanitizer: detected memory leaks use std::hint::black_box; use std::mem; diff --git a/tests/ui/sanitize/memory-eager.rs b/tests/ui/sanitize/memory-eager.rs index 0e992b4a5eb..9e7889fa1bc 100644 --- a/tests/ui/sanitize/memory-eager.rs +++ b/tests/ui/sanitize/memory-eager.rs @@ -1,15 +1,15 @@ -// needs-sanitizer-support -// needs-sanitizer-memory +//@ needs-sanitizer-support +//@ needs-sanitizer-memory // -// revisions: unoptimized optimized +//@ revisions: unoptimized optimized // -// [optimized]compile-flags: -Z sanitizer=memory -Zsanitizer-memory-track-origins -O -// [unoptimized]compile-flags: -Z sanitizer=memory -Zsanitizer-memory-track-origins +//@ [optimized]compile-flags: -Z sanitizer=memory -Zsanitizer-memory-track-origins -O +//@ [unoptimized]compile-flags: -Z sanitizer=memory -Zsanitizer-memory-track-origins // -// run-fail -// error-pattern: MemorySanitizer: use-of-uninitialized-value -// error-pattern: Uninitialized value was created by an allocation -// error-pattern: in the stack frame +//@ run-fail +//@ error-pattern: MemorySanitizer: use-of-uninitialized-value +//@ error-pattern: Uninitialized value was created by an allocation +//@ error-pattern: in the stack frame // // This test case intentionally limits the usage of the std, // since it will be linked with an uninstrumented version of it. diff --git a/tests/ui/sanitize/memory-passing.rs b/tests/ui/sanitize/memory-passing.rs index 6d9b70ad6b1..c8ab64bfaf8 100644 --- a/tests/ui/sanitize/memory-passing.rs +++ b/tests/ui/sanitize/memory-passing.rs @@ -1,12 +1,12 @@ -// needs-sanitizer-support -// needs-sanitizer-memory +//@ needs-sanitizer-support +//@ needs-sanitizer-memory // -// revisions: unoptimized optimized +//@ revisions: unoptimized optimized // -// [optimized]compile-flags: -Z sanitizer=memory -Zsanitizer-memory-track-origins -O -// [unoptimized]compile-flags: -Z sanitizer=memory -Zsanitizer-memory-track-origins +//@ [optimized]compile-flags: -Z sanitizer=memory -Zsanitizer-memory-track-origins -O +//@ [unoptimized]compile-flags: -Z sanitizer=memory -Zsanitizer-memory-track-origins // -// run-pass +//@ run-pass // // This test case intentionally limits the usage of the std, // since it will be linked with an uninstrumented version of it. diff --git a/tests/ui/sanitize/memory.rs b/tests/ui/sanitize/memory.rs index 1a9ac3a4f3c..bd2d6771749 100644 --- a/tests/ui/sanitize/memory.rs +++ b/tests/ui/sanitize/memory.rs @@ -1,15 +1,15 @@ -// needs-sanitizer-support -// needs-sanitizer-memory +//@ needs-sanitizer-support +//@ needs-sanitizer-memory // -// revisions: unoptimized optimized +//@ revisions: unoptimized optimized // -// [optimized]compile-flags: -Z sanitizer=memory -Zsanitizer-memory-track-origins -O -// [unoptimized]compile-flags: -Z sanitizer=memory -Zsanitizer-memory-track-origins +//@ [optimized]compile-flags: -Z sanitizer=memory -Zsanitizer-memory-track-origins -O +//@ [unoptimized]compile-flags: -Z sanitizer=memory -Zsanitizer-memory-track-origins // -// run-fail -// error-pattern: MemorySanitizer: use-of-uninitialized-value -// error-pattern: Uninitialized value was created by an allocation -// error-pattern: in the stack frame +//@ run-fail +//@ error-pattern: MemorySanitizer: use-of-uninitialized-value +//@ error-pattern: Uninitialized value was created by an allocation +//@ error-pattern: in the stack frame // // This test case intentionally limits the usage of the std, // since it will be linked with an uninstrumented version of it. diff --git a/tests/ui/sanitize/new-llvm-pass-manager-thin-lto.rs b/tests/ui/sanitize/new-llvm-pass-manager-thin-lto.rs index 052a40598a8..b7dd4a43782 100644 --- a/tests/ui/sanitize/new-llvm-pass-manager-thin-lto.rs +++ b/tests/ui/sanitize/new-llvm-pass-manager-thin-lto.rs @@ -2,17 +2,17 @@ // being run when compiling with new LLVM pass manager and ThinLTO. // Note: The issue occurred only on non-zero opt-level. // -// needs-sanitizer-support -// needs-sanitizer-address -// ignore-cross-compile +//@ needs-sanitizer-support +//@ needs-sanitizer-address +//@ ignore-cross-compile // -// no-prefer-dynamic -// revisions: opt0 opt1 -// compile-flags: -Zsanitizer=address -Clto=thin -//[opt0]compile-flags: -Copt-level=0 -//[opt1]compile-flags: -Copt-level=1 -// run-fail -// error-pattern: ERROR: AddressSanitizer: stack-use-after-scope +//@ no-prefer-dynamic +//@ revisions: opt0 opt1 +//@ compile-flags: -Zsanitizer=address -Clto=thin +//@[opt0]compile-flags: -Copt-level=0 +//@[opt1]compile-flags: -Copt-level=1 +//@ run-fail +//@ error-pattern: ERROR: AddressSanitizer: stack-use-after-scope static mut P: *mut usize = std::ptr::null_mut(); diff --git a/tests/ui/sanitize/sanitizer-cfi-canonical-jump-tables-require-cfi.rs b/tests/ui/sanitize/sanitizer-cfi-canonical-jump-tables-require-cfi.rs index 462a3f661ef..10c5bf6ea5e 100644 --- a/tests/ui/sanitize/sanitizer-cfi-canonical-jump-tables-require-cfi.rs +++ b/tests/ui/sanitize/sanitizer-cfi-canonical-jump-tables-require-cfi.rs @@ -1,7 +1,7 @@ // Verifies that `-Zsanitizer-cfi-canonical-jump-tables` requires `-Zsanitizer=cfi`. // -// needs-sanitizer-cfi -// compile-flags: -Cno-prepopulate-passes -Ctarget-feature=-crt-static -Zsanitizer-cfi-canonical-jump-tables=false +//@ needs-sanitizer-cfi +//@ compile-flags: -Cno-prepopulate-passes -Ctarget-feature=-crt-static -Zsanitizer-cfi-canonical-jump-tables=false #![feature(no_core)] #![no_core] diff --git a/tests/ui/sanitize/sanitizer-cfi-generalize-pointers-attr-cfg.rs b/tests/ui/sanitize/sanitizer-cfi-generalize-pointers-attr-cfg.rs index 5b8de5c219e..d46002c69fd 100644 --- a/tests/ui/sanitize/sanitizer-cfi-generalize-pointers-attr-cfg.rs +++ b/tests/ui/sanitize/sanitizer-cfi-generalize-pointers-attr-cfg.rs @@ -1,9 +1,9 @@ // Verifies that when compiling with `-Zsanitizer-cfi-generalize-pointers` the // `#[cfg(sanitizer_cfi_generalize_pointers)]` attribute is configured. // -// needs-sanitizer-cfi -// check-pass -// compile-flags: -Clto -Cno-prepopulate-passes -Ctarget-feature=-crt-static -Zsanitizer=cfi -Zsanitizer-cfi-generalize-pointers +//@ needs-sanitizer-cfi +//@ check-pass +//@ compile-flags: -Clto -Cno-prepopulate-passes -Ctarget-feature=-crt-static -Zsanitizer=cfi -Zsanitizer-cfi-generalize-pointers #![feature(cfg_sanitizer_cfi)] diff --git a/tests/ui/sanitize/sanitizer-cfi-generalize-pointers-require-cfi.rs b/tests/ui/sanitize/sanitizer-cfi-generalize-pointers-require-cfi.rs index f31b8bde7ae..8ba13bd3639 100644 --- a/tests/ui/sanitize/sanitizer-cfi-generalize-pointers-require-cfi.rs +++ b/tests/ui/sanitize/sanitizer-cfi-generalize-pointers-require-cfi.rs @@ -1,8 +1,8 @@ // Verifies that `-Zsanitizer-cfi-generalize-pointers` requires `-Zsanitizer=cfi` or // `-Zsanitizer=kcfi`. // -// needs-sanitizer-cfi -// compile-flags: -Clto -Cno-prepopulate-passes -Ctarget-feature=-crt-static -Zsanitizer-cfi-generalize-pointers +//@ needs-sanitizer-cfi +//@ compile-flags: -Clto -Cno-prepopulate-passes -Ctarget-feature=-crt-static -Zsanitizer-cfi-generalize-pointers #![feature(no_core)] #![no_core] diff --git a/tests/ui/sanitize/sanitizer-cfi-invalid-attr-cfi-encoding.rs b/tests/ui/sanitize/sanitizer-cfi-invalid-attr-cfi-encoding.rs index fe044f50a21..7ef6bd2f0ac 100644 --- a/tests/ui/sanitize/sanitizer-cfi-invalid-attr-cfi-encoding.rs +++ b/tests/ui/sanitize/sanitizer-cfi-invalid-attr-cfi-encoding.rs @@ -1,7 +1,7 @@ // Verifies that invalid user-defined CFI encodings can't be used. // -// 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 #![feature(cfi_encoding, no_core)] #![no_core] diff --git a/tests/ui/sanitize/sanitizer-cfi-is-incompatible-with-saniziter-kcfi.rs b/tests/ui/sanitize/sanitizer-cfi-is-incompatible-with-saniziter-kcfi.rs index 9a5b0f38990..c628709d7a1 100644 --- a/tests/ui/sanitize/sanitizer-cfi-is-incompatible-with-saniziter-kcfi.rs +++ b/tests/ui/sanitize/sanitizer-cfi-is-incompatible-with-saniziter-kcfi.rs @@ -1,11 +1,11 @@ // Verifies that `-Zsanitizer=cfi` is incompatible with `-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: -Clto -Cno-prepopulate-passes -Ctarget-feature=-crt-static -Zsanitizer=cfi -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: -Clto -Cno-prepopulate-passes -Ctarget-feature=-crt-static -Zsanitizer=cfi -Zsanitizer=kcfi #![feature(no_core)] #![no_core] diff --git a/tests/ui/sanitize/sanitizer-cfi-normalize-integers-attr-cfg.rs b/tests/ui/sanitize/sanitizer-cfi-normalize-integers-attr-cfg.rs index 4972ccf3167..24c2c2c13da 100644 --- a/tests/ui/sanitize/sanitizer-cfi-normalize-integers-attr-cfg.rs +++ b/tests/ui/sanitize/sanitizer-cfi-normalize-integers-attr-cfg.rs @@ -1,9 +1,9 @@ // Verifies that when compiling with `-Zsanitizer-cfi-normalize-integers` the // `#[cfg(sanitizer_cfi_normalize_integers)]` attribute is configured. // -// needs-sanitizer-cfi -// check-pass -// compile-flags: -Clto -Cno-prepopulate-passes -Ctarget-feature=-crt-static -Zsanitizer=cfi -Zsanitizer-cfi-normalize-integers +//@ needs-sanitizer-cfi +//@ check-pass +//@ compile-flags: -Clto -Cno-prepopulate-passes -Ctarget-feature=-crt-static -Zsanitizer=cfi -Zsanitizer-cfi-normalize-integers #![feature(cfg_sanitizer_cfi)] diff --git a/tests/ui/sanitize/sanitizer-cfi-normalize-integers-require-cfi.rs b/tests/ui/sanitize/sanitizer-cfi-normalize-integers-require-cfi.rs index b25a60d3494..a7ecefbf7ef 100644 --- a/tests/ui/sanitize/sanitizer-cfi-normalize-integers-require-cfi.rs +++ b/tests/ui/sanitize/sanitizer-cfi-normalize-integers-require-cfi.rs @@ -1,8 +1,8 @@ // Verifies that `-Zsanitizer-cfi-normalize-integers` requires `-Zsanitizer=cfi` or // `-Zsanitizer=kcfi` // -// needs-sanitizer-cfi -// compile-flags: -Clto -Cno-prepopulate-passes -Ctarget-feature=-crt-static -Zsanitizer-cfi-normalize-integers +//@ needs-sanitizer-cfi +//@ compile-flags: -Clto -Cno-prepopulate-passes -Ctarget-feature=-crt-static -Zsanitizer-cfi-normalize-integers #![feature(no_core)] #![no_core] diff --git a/tests/ui/sanitize/sanitizer-cfi-requires-lto.rs b/tests/ui/sanitize/sanitizer-cfi-requires-lto.rs index e9a49dd3ff1..5a34f696e05 100644 --- a/tests/ui/sanitize/sanitizer-cfi-requires-lto.rs +++ b/tests/ui/sanitize/sanitizer-cfi-requires-lto.rs @@ -1,7 +1,7 @@ // Verifies that `-Zsanitizer=cfi` requires `-Clto` or `-Clinker-plugin-lto`. // -// needs-sanitizer-cfi -// compile-flags: -Cno-prepopulate-passes -Ctarget-feature=-crt-static -Zsanitizer=cfi +//@ needs-sanitizer-cfi +//@ compile-flags: -Cno-prepopulate-passes -Ctarget-feature=-crt-static -Zsanitizer=cfi #![feature(no_core)] #![no_core] diff --git a/tests/ui/sanitize/sanitizer-cfi-with-rustc-lto-requires-single-codegen-unit.rs b/tests/ui/sanitize/sanitizer-cfi-with-rustc-lto-requires-single-codegen-unit.rs index a13c12c1787..954e4ec3b85 100644 --- a/tests/ui/sanitize/sanitizer-cfi-with-rustc-lto-requires-single-codegen-unit.rs +++ b/tests/ui/sanitize/sanitizer-cfi-with-rustc-lto-requires-single-codegen-unit.rs @@ -1,7 +1,7 @@ // Verifies that `-Zsanitizer=cfi` with `-Clto` or `-Clto=thin` requires `-Ccodegen-units=1`. // -// needs-sanitizer-cfi -// compile-flags: -Ccodegen-units=2 -Clto -Ctarget-feature=-crt-static -Zsanitizer=cfi +//@ needs-sanitizer-cfi +//@ compile-flags: -Ccodegen-units=2 -Clto -Ctarget-feature=-crt-static -Zsanitizer=cfi #![feature(no_core)] #![no_core] diff --git a/tests/ui/sanitize/split-lto-unit-requires-lto.rs b/tests/ui/sanitize/split-lto-unit-requires-lto.rs index 3c497260e85..35e610f0307 100644 --- a/tests/ui/sanitize/split-lto-unit-requires-lto.rs +++ b/tests/ui/sanitize/split-lto-unit-requires-lto.rs @@ -1,7 +1,7 @@ // Verifies that `-Zsplit-lto-unit` requires `-Clto`, `-Clto=thin`, or `-Clinker-plugin-lto`. // -// needs-sanitizer-cfi -// compile-flags: -Cno-prepopulate-passes -Ctarget-feature=-crt-static -Zsplit-lto-unit +//@ needs-sanitizer-cfi +//@ compile-flags: -Cno-prepopulate-passes -Ctarget-feature=-crt-static -Zsplit-lto-unit #![feature(no_core)] #![no_core] diff --git a/tests/ui/sanitize/thread.rs b/tests/ui/sanitize/thread.rs index c70cf5accc0..9d9ad6ee518 100644 --- a/tests/ui/sanitize/thread.rs +++ b/tests/ui/sanitize/thread.rs @@ -10,15 +10,15 @@ // is necessary to make the test robust. Without the barrier data race detection // would occasionally fail, making test flaky. // -// needs-sanitizer-support -// needs-sanitizer-thread +//@ needs-sanitizer-support +//@ needs-sanitizer-thread // -// compile-flags: -Z sanitizer=thread -O +//@ compile-flags: -Z sanitizer=thread -O // -// run-fail -// error-pattern: WARNING: ThreadSanitizer: data race -// error-pattern: Location is heap block of size 4 -// error-pattern: allocated by main thread +//@ run-fail +//@ error-pattern: WARNING: ThreadSanitizer: data race +//@ error-pattern: Location is heap block of size 4 +//@ error-pattern: allocated by main thread #![feature(raw_ref_op)] #![feature(rustc_private)] diff --git a/tests/ui/sanitize/unsupported-target.rs b/tests/ui/sanitize/unsupported-target.rs index 9f29c76353b..7c7dc24b5d9 100644 --- a/tests/ui/sanitize/unsupported-target.rs +++ b/tests/ui/sanitize/unsupported-target.rs @@ -1,6 +1,6 @@ -// compile-flags: -Z sanitizer=leak --target i686-unknown-linux-gnu -// needs-llvm-components: x86 -// error-pattern: error: leak sanitizer is not supported for this target +//@ compile-flags: -Z sanitizer=leak --target i686-unknown-linux-gnu +//@ needs-llvm-components: x86 +//@ error-pattern: error: leak sanitizer is not supported for this target #![feature(no_core)] #![no_core] #![no_main] diff --git a/tests/ui/sanitize/use-after-scope.rs b/tests/ui/sanitize/use-after-scope.rs index de63eea194b..4d7f6f6c2f2 100644 --- a/tests/ui/sanitize/use-after-scope.rs +++ b/tests/ui/sanitize/use-after-scope.rs @@ -1,10 +1,10 @@ -// needs-sanitizer-support -// needs-sanitizer-address -// ignore-cross-compile +//@ needs-sanitizer-support +//@ needs-sanitizer-address +//@ ignore-cross-compile // -// compile-flags: -Zsanitizer=address -// run-fail -// error-pattern: ERROR: AddressSanitizer: stack-use-after-scope +//@ compile-flags: -Zsanitizer=address +//@ run-fail +//@ error-pattern: ERROR: AddressSanitizer: stack-use-after-scope static mut P: *mut usize = std::ptr::null_mut(); diff --git a/tests/ui/self/arbitrary-self-from-method-substs.rs b/tests/ui/self/arbitrary-self-from-method-substs.rs index 004445dc327..99977ed9b8c 100644 --- a/tests/ui/self/arbitrary-self-from-method-substs.rs +++ b/tests/ui/self/arbitrary-self-from-method-substs.rs @@ -1,4 +1,4 @@ -// revisions: default feature +//@ revisions: default feature #![cfg_attr(feature, feature(arbitrary_self_types))] use std::ops::Deref; diff --git a/tests/ui/self/arbitrary-self-types-not-object-safe.rs b/tests/ui/self/arbitrary-self-types-not-object-safe.rs index 40e8df3395f..0053eb5f739 100644 --- a/tests/ui/self/arbitrary-self-types-not-object-safe.rs +++ b/tests/ui/self/arbitrary-self-types-not-object-safe.rs @@ -1,4 +1,4 @@ -// revisions: curr object_safe_for_dispatch +//@ revisions: curr object_safe_for_dispatch #![cfg_attr(object_safe_for_dispatch, feature(object_safe_for_dispatch))] diff --git a/tests/ui/self/arbitrary_self_types_needing_box_or_arc_wrapping.fixed b/tests/ui/self/arbitrary_self_types_needing_box_or_arc_wrapping.fixed index 6a94b85b9ba..1d80f539773 100644 --- a/tests/ui/self/arbitrary_self_types_needing_box_or_arc_wrapping.fixed +++ b/tests/ui/self/arbitrary_self_types_needing_box_or_arc_wrapping.fixed @@ -1,4 +1,4 @@ -// run-rustfix +//@ run-rustfix #![allow(dead_code)] mod first { trait Foo { fn m(self: Box); } diff --git a/tests/ui/self/arbitrary_self_types_needing_box_or_arc_wrapping.rs b/tests/ui/self/arbitrary_self_types_needing_box_or_arc_wrapping.rs index fa480b1f72b..a9930da204d 100644 --- a/tests/ui/self/arbitrary_self_types_needing_box_or_arc_wrapping.rs +++ b/tests/ui/self/arbitrary_self_types_needing_box_or_arc_wrapping.rs @@ -1,4 +1,4 @@ -// run-rustfix +//@ run-rustfix #![allow(dead_code)] mod first { trait Foo { fn m(self: Box); } diff --git a/tests/ui/self/arbitrary_self_types_needing_mut_pin.fixed b/tests/ui/self/arbitrary_self_types_needing_mut_pin.fixed index a400a1672a4..8064ff2f20b 100644 --- a/tests/ui/self/arbitrary_self_types_needing_mut_pin.fixed +++ b/tests/ui/self/arbitrary_self_types_needing_mut_pin.fixed @@ -1,4 +1,4 @@ -// run-rustfix +//@ run-rustfix use std::pin::Pin; struct S; diff --git a/tests/ui/self/arbitrary_self_types_needing_mut_pin.rs b/tests/ui/self/arbitrary_self_types_needing_mut_pin.rs index d15676a623d..dce5ab8e088 100644 --- a/tests/ui/self/arbitrary_self_types_needing_mut_pin.rs +++ b/tests/ui/self/arbitrary_self_types_needing_mut_pin.rs @@ -1,4 +1,4 @@ -// run-rustfix +//@ run-rustfix use std::pin::Pin; struct S; diff --git a/tests/ui/self/arbitrary_self_types_nested.rs b/tests/ui/self/arbitrary_self_types_nested.rs index 680196fbb92..4ec3d4038e3 100644 --- a/tests/ui/self/arbitrary_self_types_nested.rs +++ b/tests/ui/self/arbitrary_self_types_nested.rs @@ -1,4 +1,4 @@ -// run-pass +//@ run-pass use { std::{ diff --git a/tests/ui/self/arbitrary_self_types_pin_lifetime-async.rs b/tests/ui/self/arbitrary_self_types_pin_lifetime-async.rs index f3474bc1f9f..67d092791da 100644 --- a/tests/ui/self/arbitrary_self_types_pin_lifetime-async.rs +++ b/tests/ui/self/arbitrary_self_types_pin_lifetime-async.rs @@ -1,5 +1,5 @@ -// check-pass -// edition:2018 +//@ check-pass +//@ edition:2018 use std::pin::Pin; use std::task::{Context, Poll}; diff --git a/tests/ui/self/arbitrary_self_types_pin_lifetime.rs b/tests/ui/self/arbitrary_self_types_pin_lifetime.rs index 30020138812..8fbfecb8e6b 100644 --- a/tests/ui/self/arbitrary_self_types_pin_lifetime.rs +++ b/tests/ui/self/arbitrary_self_types_pin_lifetime.rs @@ -1,4 +1,4 @@ -// check-pass +//@ check-pass use std::pin::Pin; use std::task::{Context, Poll}; diff --git a/tests/ui/self/arbitrary_self_types_pin_lifetime_impl_trait-async.rs b/tests/ui/self/arbitrary_self_types_pin_lifetime_impl_trait-async.rs index a1e7f4aa875..43ad360e196 100644 --- a/tests/ui/self/arbitrary_self_types_pin_lifetime_impl_trait-async.rs +++ b/tests/ui/self/arbitrary_self_types_pin_lifetime_impl_trait-async.rs @@ -1,4 +1,4 @@ -// edition:2018 +//@ edition:2018 use std::pin::Pin; diff --git a/tests/ui/self/arbitrary_self_types_pin_lifetime_mismatch-async.rs b/tests/ui/self/arbitrary_self_types_pin_lifetime_mismatch-async.rs index a2b7f080568..b5a8992542b 100644 --- a/tests/ui/self/arbitrary_self_types_pin_lifetime_mismatch-async.rs +++ b/tests/ui/self/arbitrary_self_types_pin_lifetime_mismatch-async.rs @@ -1,4 +1,4 @@ -// edition:2018 +//@ edition:2018 use std::pin::Pin; diff --git a/tests/ui/self/arbitrary_self_types_pointers_and_wrappers.rs b/tests/ui/self/arbitrary_self_types_pointers_and_wrappers.rs index 91aacedfc57..d7149002e7b 100644 --- a/tests/ui/self/arbitrary_self_types_pointers_and_wrappers.rs +++ b/tests/ui/self/arbitrary_self_types_pointers_and_wrappers.rs @@ -1,4 +1,4 @@ -// run-pass +//@ run-pass #![feature(arbitrary_self_types, unsize, coerce_unsized, dispatch_from_dyn)] #![feature(rustc_attrs)] diff --git a/tests/ui/self/arbitrary_self_types_raw_pointer_struct.rs b/tests/ui/self/arbitrary_self_types_raw_pointer_struct.rs index 0eab7617f7a..1f45d91847f 100644 --- a/tests/ui/self/arbitrary_self_types_raw_pointer_struct.rs +++ b/tests/ui/self/arbitrary_self_types_raw_pointer_struct.rs @@ -1,4 +1,4 @@ -// run-pass +//@ run-pass #![feature(arbitrary_self_types)] use std::rc::Rc; diff --git a/tests/ui/self/arbitrary_self_types_raw_pointer_trait.rs b/tests/ui/self/arbitrary_self_types_raw_pointer_trait.rs index 0a9370e6f5a..43f596659b9 100644 --- a/tests/ui/self/arbitrary_self_types_raw_pointer_trait.rs +++ b/tests/ui/self/arbitrary_self_types_raw_pointer_trait.rs @@ -1,4 +1,4 @@ -// run-pass +//@ run-pass #![feature(arbitrary_self_types)] use std::ptr; diff --git a/tests/ui/self/arbitrary_self_types_silly.rs b/tests/ui/self/arbitrary_self_types_silly.rs index fb5f9012b18..94726bd69cc 100644 --- a/tests/ui/self/arbitrary_self_types_silly.rs +++ b/tests/ui/self/arbitrary_self_types_silly.rs @@ -1,4 +1,4 @@ -// run-pass +//@ run-pass #![feature(arbitrary_self_types)] struct Foo; diff --git a/tests/ui/self/arbitrary_self_types_stdlib_pointers.rs b/tests/ui/self/arbitrary_self_types_stdlib_pointers.rs index 29563fbbd86..4b8a21f7648 100644 --- a/tests/ui/self/arbitrary_self_types_stdlib_pointers.rs +++ b/tests/ui/self/arbitrary_self_types_stdlib_pointers.rs @@ -1,4 +1,4 @@ -// run-pass +//@ run-pass #![feature(arbitrary_self_types)] #![feature(rustc_attrs)] diff --git a/tests/ui/self/arbitrary_self_types_struct.rs b/tests/ui/self/arbitrary_self_types_struct.rs index 905ad83b659..b9769622a33 100644 --- a/tests/ui/self/arbitrary_self_types_struct.rs +++ b/tests/ui/self/arbitrary_self_types_struct.rs @@ -1,4 +1,4 @@ -// run-pass +//@ run-pass use std::rc::Rc; diff --git a/tests/ui/self/arbitrary_self_types_trait.rs b/tests/ui/self/arbitrary_self_types_trait.rs index c4651ec7177..83d39d0beb4 100644 --- a/tests/ui/self/arbitrary_self_types_trait.rs +++ b/tests/ui/self/arbitrary_self_types_trait.rs @@ -1,4 +1,4 @@ -// run-pass +//@ run-pass #![allow(unused_allocation)] use std::rc::Rc; diff --git a/tests/ui/self/arbitrary_self_types_unsized_struct.rs b/tests/ui/self/arbitrary_self_types_unsized_struct.rs index d43f3132890..d6e1e78c827 100644 --- a/tests/ui/self/arbitrary_self_types_unsized_struct.rs +++ b/tests/ui/self/arbitrary_self_types_unsized_struct.rs @@ -1,4 +1,4 @@ -// run-pass +//@ run-pass use std::rc::Rc; diff --git a/tests/ui/self/builtin-superkinds-self-type.rs b/tests/ui/self/builtin-superkinds-self-type.rs index c56542bb468..d8e98c9c142 100644 --- a/tests/ui/self/builtin-superkinds-self-type.rs +++ b/tests/ui/self/builtin-superkinds-self-type.rs @@ -1,4 +1,4 @@ -// run-pass +//@ run-pass // Tests the ability for the Self type in default methods to use // capabilities granted by builtin kinds as supertraits. diff --git a/tests/ui/self/by-value-self-in-mut-slot.rs b/tests/ui/self/by-value-self-in-mut-slot.rs index 267afd1dcad..fd7b0a8e21f 100644 --- a/tests/ui/self/by-value-self-in-mut-slot.rs +++ b/tests/ui/self/by-value-self-in-mut-slot.rs @@ -1,4 +1,4 @@ -// run-pass +//@ run-pass struct X { a: isize diff --git a/tests/ui/self/elision/alias-async.rs b/tests/ui/self/elision/alias-async.rs index 7c0dd068623..fbdc8b9023a 100644 --- a/tests/ui/self/elision/alias-async.rs +++ b/tests/ui/self/elision/alias-async.rs @@ -1,5 +1,5 @@ -// check-pass -// edition:2018 +//@ check-pass +//@ edition:2018 #![allow(non_snake_case)] diff --git a/tests/ui/self/elision/alias.rs b/tests/ui/self/elision/alias.rs index 0c801d70232..6041c7cbf36 100644 --- a/tests/ui/self/elision/alias.rs +++ b/tests/ui/self/elision/alias.rs @@ -1,4 +1,4 @@ -// check-pass +//@ check-pass #![allow(non_snake_case)] diff --git a/tests/ui/self/elision/assoc-async.rs b/tests/ui/self/elision/assoc-async.rs index 363b7fc2aae..0fb4eb898de 100644 --- a/tests/ui/self/elision/assoc-async.rs +++ b/tests/ui/self/elision/assoc-async.rs @@ -1,5 +1,5 @@ -// check-pass -// edition:2018 +//@ check-pass +//@ edition:2018 #![allow(non_snake_case)] diff --git a/tests/ui/self/elision/assoc.rs b/tests/ui/self/elision/assoc.rs index fa39a2b478b..72237d7f52a 100644 --- a/tests/ui/self/elision/assoc.rs +++ b/tests/ui/self/elision/assoc.rs @@ -1,4 +1,4 @@ -// check-pass +//@ check-pass #![allow(non_snake_case)] diff --git a/tests/ui/self/elision/lt-alias-async.rs b/tests/ui/self/elision/lt-alias-async.rs index 3a6f8471e66..fb3bc573ae1 100644 --- a/tests/ui/self/elision/lt-alias-async.rs +++ b/tests/ui/self/elision/lt-alias-async.rs @@ -1,5 +1,5 @@ -// check-pass -// edition:2018 +//@ check-pass +//@ edition:2018 #![allow(non_snake_case)] diff --git a/tests/ui/self/elision/lt-alias.rs b/tests/ui/self/elision/lt-alias.rs index bbba88e4e5b..85958182cb6 100644 --- a/tests/ui/self/elision/lt-alias.rs +++ b/tests/ui/self/elision/lt-alias.rs @@ -1,4 +1,4 @@ -// check-pass +//@ check-pass #![allow(non_snake_case)] diff --git a/tests/ui/self/elision/lt-assoc-async.rs b/tests/ui/self/elision/lt-assoc-async.rs index 0d3ff630d14..180998a166a 100644 --- a/tests/ui/self/elision/lt-assoc-async.rs +++ b/tests/ui/self/elision/lt-assoc-async.rs @@ -1,5 +1,5 @@ -// check-pass -// edition:2018 +//@ check-pass +//@ edition:2018 #![allow(non_snake_case)] diff --git a/tests/ui/self/elision/lt-assoc.rs b/tests/ui/self/elision/lt-assoc.rs index 8f354313536..31868d9ce5e 100644 --- a/tests/ui/self/elision/lt-assoc.rs +++ b/tests/ui/self/elision/lt-assoc.rs @@ -1,4 +1,4 @@ -// check-pass +//@ check-pass #![allow(non_snake_case)] diff --git a/tests/ui/self/elision/lt-ref-self-async.rs b/tests/ui/self/elision/lt-ref-self-async.rs index a2325ba7fa6..8eb4a48a9c9 100644 --- a/tests/ui/self/elision/lt-ref-self-async.rs +++ b/tests/ui/self/elision/lt-ref-self-async.rs @@ -1,4 +1,4 @@ -// edition:2018 +//@ edition:2018 #![allow(non_snake_case)] diff --git a/tests/ui/self/elision/lt-self-async.rs b/tests/ui/self/elision/lt-self-async.rs index 4cedaf79da3..bdb0e80784e 100644 --- a/tests/ui/self/elision/lt-self-async.rs +++ b/tests/ui/self/elision/lt-self-async.rs @@ -1,5 +1,5 @@ -// check-pass -// edition:2018 +//@ check-pass +//@ edition:2018 #![allow(non_snake_case)] diff --git a/tests/ui/self/elision/lt-self.rs b/tests/ui/self/elision/lt-self.rs index cf74f892b8f..f9a288b0955 100644 --- a/tests/ui/self/elision/lt-self.rs +++ b/tests/ui/self/elision/lt-self.rs @@ -1,4 +1,4 @@ -// check-pass +//@ check-pass #![allow(non_snake_case)] diff --git a/tests/ui/self/elision/lt-struct-async.rs b/tests/ui/self/elision/lt-struct-async.rs index abbee7fdfcb..ffce3029fc7 100644 --- a/tests/ui/self/elision/lt-struct-async.rs +++ b/tests/ui/self/elision/lt-struct-async.rs @@ -1,5 +1,5 @@ -// check-pass -// edition:2018 +//@ check-pass +//@ edition:2018 #![allow(non_snake_case)] diff --git a/tests/ui/self/elision/lt-struct.rs b/tests/ui/self/elision/lt-struct.rs index 799c6c079b3..c0fc45c1b8b 100644 --- a/tests/ui/self/elision/lt-struct.rs +++ b/tests/ui/self/elision/lt-struct.rs @@ -1,4 +1,4 @@ -// check-pass +//@ check-pass #![allow(non_snake_case)] diff --git a/tests/ui/self/elision/multiple-ref-self-async.rs b/tests/ui/self/elision/multiple-ref-self-async.rs index be073c6edba..fb77f91396c 100644 --- a/tests/ui/self/elision/multiple-ref-self-async.rs +++ b/tests/ui/self/elision/multiple-ref-self-async.rs @@ -1,5 +1,5 @@ -// check-pass -// edition:2018 +//@ check-pass +//@ edition:2018 #![feature(arbitrary_self_types)] #![allow(non_snake_case)] diff --git a/tests/ui/self/elision/multiple-ref-self.rs b/tests/ui/self/elision/multiple-ref-self.rs index f39613d0c90..01d6bb47c04 100644 --- a/tests/ui/self/elision/multiple-ref-self.rs +++ b/tests/ui/self/elision/multiple-ref-self.rs @@ -1,4 +1,4 @@ -// check-pass +//@ check-pass #![feature(arbitrary_self_types)] #![allow(non_snake_case)] diff --git a/tests/ui/self/elision/ref-alias-async.rs b/tests/ui/self/elision/ref-alias-async.rs index 15f16525b6b..ac0abb89bcf 100644 --- a/tests/ui/self/elision/ref-alias-async.rs +++ b/tests/ui/self/elision/ref-alias-async.rs @@ -1,5 +1,5 @@ -// edition:2018 -// check-pass +//@ edition:2018 +//@ check-pass #![allow(non_snake_case)] diff --git a/tests/ui/self/elision/ref-alias.rs b/tests/ui/self/elision/ref-alias.rs index 341f5b52df0..c8552c4a06d 100644 --- a/tests/ui/self/elision/ref-alias.rs +++ b/tests/ui/self/elision/ref-alias.rs @@ -1,4 +1,4 @@ -// check-pass +//@ check-pass #![allow(non_snake_case)] diff --git a/tests/ui/self/elision/ref-assoc-async.rs b/tests/ui/self/elision/ref-assoc-async.rs index ad10d8ba4f4..2af4f13a41b 100644 --- a/tests/ui/self/elision/ref-assoc-async.rs +++ b/tests/ui/self/elision/ref-assoc-async.rs @@ -1,5 +1,5 @@ -// edition:2018 -// check-pass +//@ edition:2018 +//@ check-pass #![allow(non_snake_case)] diff --git a/tests/ui/self/elision/ref-assoc.rs b/tests/ui/self/elision/ref-assoc.rs index 2f02cb5f3c8..8dc78d31d39 100644 --- a/tests/ui/self/elision/ref-assoc.rs +++ b/tests/ui/self/elision/ref-assoc.rs @@ -1,4 +1,4 @@ -// check-pass +//@ check-pass #![allow(non_snake_case)] diff --git a/tests/ui/self/elision/ref-mut-alias-async.rs b/tests/ui/self/elision/ref-mut-alias-async.rs index 2c3f971d26e..4de52fa96a3 100644 --- a/tests/ui/self/elision/ref-mut-alias-async.rs +++ b/tests/ui/self/elision/ref-mut-alias-async.rs @@ -1,5 +1,5 @@ -// edition:2018 -// check-pass +//@ edition:2018 +//@ check-pass #![allow(non_snake_case)] diff --git a/tests/ui/self/elision/ref-mut-alias.rs b/tests/ui/self/elision/ref-mut-alias.rs index ce1ab3ffcca..026a96bf29f 100644 --- a/tests/ui/self/elision/ref-mut-alias.rs +++ b/tests/ui/self/elision/ref-mut-alias.rs @@ -1,4 +1,4 @@ -// check-pass +//@ check-pass #![allow(non_snake_case)] diff --git a/tests/ui/self/elision/ref-mut-self-async.rs b/tests/ui/self/elision/ref-mut-self-async.rs index e07bc85643c..3c80951a666 100644 --- a/tests/ui/self/elision/ref-mut-self-async.rs +++ b/tests/ui/self/elision/ref-mut-self-async.rs @@ -1,4 +1,4 @@ -// edition:2018 +//@ edition:2018 #![allow(non_snake_case)] diff --git a/tests/ui/self/elision/ref-mut-struct-async.rs b/tests/ui/self/elision/ref-mut-struct-async.rs index 392bf1d6be3..24a95672795 100644 --- a/tests/ui/self/elision/ref-mut-struct-async.rs +++ b/tests/ui/self/elision/ref-mut-struct-async.rs @@ -1,4 +1,4 @@ -// edition:2018 +//@ edition:2018 #![allow(non_snake_case)] diff --git a/tests/ui/self/elision/ref-self-async.rs b/tests/ui/self/elision/ref-self-async.rs index b0133ec1b61..1f3e670d3d1 100644 --- a/tests/ui/self/elision/ref-self-async.rs +++ b/tests/ui/self/elision/ref-self-async.rs @@ -1,4 +1,4 @@ -// edition:2018 +//@ edition:2018 #![allow(non_snake_case)] #![feature(arbitrary_self_types)] diff --git a/tests/ui/self/elision/ref-struct-async.rs b/tests/ui/self/elision/ref-struct-async.rs index 0be74874515..b3317bc5522 100644 --- a/tests/ui/self/elision/ref-struct-async.rs +++ b/tests/ui/self/elision/ref-struct-async.rs @@ -1,4 +1,4 @@ -// edition:2018 +//@ edition:2018 #![allow(non_snake_case)] diff --git a/tests/ui/self/elision/self-async.rs b/tests/ui/self/elision/self-async.rs index eb01cfc9768..244ad5edfcc 100644 --- a/tests/ui/self/elision/self-async.rs +++ b/tests/ui/self/elision/self-async.rs @@ -1,5 +1,5 @@ -// check-pass -// edition:2018 +//@ check-pass +//@ edition:2018 #![allow(non_snake_case)] diff --git a/tests/ui/self/elision/self.rs b/tests/ui/self/elision/self.rs index 574b7e7c9b3..d8c20c7e381 100644 --- a/tests/ui/self/elision/self.rs +++ b/tests/ui/self/elision/self.rs @@ -1,4 +1,4 @@ -// check-pass +//@ check-pass #![allow(non_snake_case)] diff --git a/tests/ui/self/elision/struct-async.rs b/tests/ui/self/elision/struct-async.rs index e018e0daf96..708ddabc39f 100644 --- a/tests/ui/self/elision/struct-async.rs +++ b/tests/ui/self/elision/struct-async.rs @@ -1,5 +1,5 @@ -// check-pass -// edition:2018 +//@ check-pass +//@ edition:2018 #![allow(non_snake_case)] diff --git a/tests/ui/self/elision/struct.rs b/tests/ui/self/elision/struct.rs index d1ac99d13be..fd3c9b2dea8 100644 --- a/tests/ui/self/elision/struct.rs +++ b/tests/ui/self/elision/struct.rs @@ -1,4 +1,4 @@ -// check-pass +//@ check-pass #![allow(non_snake_case)] diff --git a/tests/ui/self/explicit-self-closures.rs b/tests/ui/self/explicit-self-closures.rs index b409dfd7a1e..ea85caa22ce 100644 --- a/tests/ui/self/explicit-self-closures.rs +++ b/tests/ui/self/explicit-self-closures.rs @@ -1,8 +1,8 @@ -// build-pass (FIXME(62277): could be check-pass?) +//@ build-pass (FIXME(62277): could be check-pass?) #![allow(dead_code)] // Test to make sure that explicit self params work inside closures -// pretty-expanded FIXME #23616 +//@ pretty-expanded FIXME #23616 struct Box { x: usize diff --git a/tests/ui/self/explicit-self-generic.rs b/tests/ui/self/explicit-self-generic.rs index 8f6bed3b0cd..b4ef8b2a29a 100644 --- a/tests/ui/self/explicit-self-generic.rs +++ b/tests/ui/self/explicit-self-generic.rs @@ -1,4 +1,4 @@ -// run-pass +//@ run-pass #![allow(dead_code)] #[derive(Copy, Clone)] diff --git a/tests/ui/self/explicit-self-objects-uniq.rs b/tests/ui/self/explicit-self-objects-uniq.rs index 250ea12e57c..fc43a35f271 100644 --- a/tests/ui/self/explicit-self-objects-uniq.rs +++ b/tests/ui/self/explicit-self-objects-uniq.rs @@ -1,4 +1,4 @@ -// run-pass +//@ run-pass trait Foo { fn f(self: Box); diff --git a/tests/ui/self/explicit-self.rs b/tests/ui/self/explicit-self.rs index 873c3621a3b..f85fe739b9f 100644 --- a/tests/ui/self/explicit-self.rs +++ b/tests/ui/self/explicit-self.rs @@ -1,4 +1,4 @@ -// run-pass +//@ run-pass #![allow(dead_code)] #![allow(non_camel_case_types)] #![allow(non_upper_case_globals)] diff --git a/tests/ui/self/explicit_self_xcrate_exe.rs b/tests/ui/self/explicit_self_xcrate_exe.rs index c3796f73ab5..f9daf91bdfa 100644 --- a/tests/ui/self/explicit_self_xcrate_exe.rs +++ b/tests/ui/self/explicit_self_xcrate_exe.rs @@ -1,7 +1,7 @@ -// run-pass -// aux-build:explicit_self_xcrate.rs +//@ run-pass +//@ aux-build:explicit_self_xcrate.rs -// pretty-expanded FIXME #23616 +//@ pretty-expanded FIXME #23616 extern crate explicit_self_xcrate; use explicit_self_xcrate::{Foo, Bar}; diff --git a/tests/ui/self/move-self.rs b/tests/ui/self/move-self.rs index 66032780b81..94310382dd0 100644 --- a/tests/ui/self/move-self.rs +++ b/tests/ui/self/move-self.rs @@ -1,4 +1,4 @@ -// run-pass +//@ run-pass struct S { x: String } diff --git a/tests/ui/self/object-safety-sized-self-by-value-self.rs b/tests/ui/self/object-safety-sized-self-by-value-self.rs index 43b1d8b9149..d902812eb9a 100644 --- a/tests/ui/self/object-safety-sized-self-by-value-self.rs +++ b/tests/ui/self/object-safety-sized-self-by-value-self.rs @@ -1,4 +1,4 @@ -// run-pass +//@ run-pass #![allow(unused_mut)] // Check that a trait is still object-safe (and usable) if it has // methods with by-value self so long as they require `Self : Sized`. diff --git a/tests/ui/self/object-safety-sized-self-generic-method.rs b/tests/ui/self/object-safety-sized-self-generic-method.rs index e0b0526a333..7a2ebd2cb79 100644 --- a/tests/ui/self/object-safety-sized-self-generic-method.rs +++ b/tests/ui/self/object-safety-sized-self-generic-method.rs @@ -1,4 +1,4 @@ -// run-pass +//@ run-pass #![allow(unused_variables)] // Check that a trait is still object-safe (and usable) if it has // generic methods so long as they require `Self : Sized`. diff --git a/tests/ui/self/object-safety-sized-self-return-Self.rs b/tests/ui/self/object-safety-sized-self-return-Self.rs index 222c7543945..9fc3f856772 100644 --- a/tests/ui/self/object-safety-sized-self-return-Self.rs +++ b/tests/ui/self/object-safety-sized-self-return-Self.rs @@ -1,4 +1,4 @@ -// run-pass +//@ run-pass // Check that a trait is still object-safe (and usable) if it has // methods that return `Self` so long as they require `Self : Sized`. diff --git a/tests/ui/self/objects-owned-object-owned-method.rs b/tests/ui/self/objects-owned-object-owned-method.rs index 15677a5185c..8d9dda126d5 100644 --- a/tests/ui/self/objects-owned-object-owned-method.rs +++ b/tests/ui/self/objects-owned-object-owned-method.rs @@ -1,4 +1,4 @@ -// run-pass +//@ run-pass // Test invoked `&self` methods on owned objects where the values // closed over contain managed values. This implies that the boxes // will have headers that must be skipped over. diff --git a/tests/ui/self/self-ctor-nongeneric.rs b/tests/ui/self/self-ctor-nongeneric.rs index 0ae7f8da4b4..0594e87a0a4 100644 --- a/tests/ui/self/self-ctor-nongeneric.rs +++ b/tests/ui/self/self-ctor-nongeneric.rs @@ -1,5 +1,5 @@ // `Self` as a constructor is currently allowed when the outer item is not generic. -// check-pass +//@ check-pass struct S0(usize); diff --git a/tests/ui/self/self-impl-2.rs b/tests/ui/self/self-impl-2.rs index 7eed3f056a2..8c09f1ef756 100644 --- a/tests/ui/self/self-impl-2.rs +++ b/tests/ui/self/self-impl-2.rs @@ -1,9 +1,9 @@ -// run-pass +//@ run-pass #![allow(dead_code)] #![allow(unused_variables)] // Test that we can use `Self` types in impls in the expected way. -// pretty-expanded FIXME #23616 +//@ pretty-expanded FIXME #23616 struct Foo; diff --git a/tests/ui/self/self-in-mut-slot-default-method.rs b/tests/ui/self/self-in-mut-slot-default-method.rs index 45e122c8d77..4aab19d28f4 100644 --- a/tests/ui/self/self-in-mut-slot-default-method.rs +++ b/tests/ui/self/self-in-mut-slot-default-method.rs @@ -1,4 +1,4 @@ -// run-pass +//@ run-pass struct X { a: isize diff --git a/tests/ui/self/self-in-mut-slot-immediate-value.rs b/tests/ui/self/self-in-mut-slot-immediate-value.rs index 60865304f1c..79d7b4df63f 100644 --- a/tests/ui/self/self-in-mut-slot-immediate-value.rs +++ b/tests/ui/self/self-in-mut-slot-immediate-value.rs @@ -1,4 +1,4 @@ -// run-pass +//@ run-pass // Assert that `mut self` on an immediate value doesn't // allow mutating the original - issue #10615. diff --git a/tests/ui/self/self-in-typedefs.rs b/tests/ui/self/self-in-typedefs.rs index 81e557d53a6..786f176c019 100644 --- a/tests/ui/self/self-in-typedefs.rs +++ b/tests/ui/self/self-in-typedefs.rs @@ -1,4 +1,4 @@ -// build-pass (FIXME(62277): could be check-pass?) +//@ build-pass (FIXME(62277): could be check-pass?) #![allow(dead_code)] use std::mem::ManuallyDrop; diff --git a/tests/ui/self/self-re-assign.rs b/tests/ui/self/self-re-assign.rs index 9595ebf9601..a66dedb587b 100644 --- a/tests/ui/self/self-re-assign.rs +++ b/tests/ui/self/self-re-assign.rs @@ -1,4 +1,4 @@ -// run-pass +//@ run-pass // Ensure assigning an owned or managed variable to itself works. In particular, // that we do not glue_drop before we glue_take (#3290). diff --git a/tests/ui/self/self-shadowing-import.rs b/tests/ui/self/self-shadowing-import.rs index 1d60c6c2276..85574daad5f 100644 --- a/tests/ui/self/self-shadowing-import.rs +++ b/tests/ui/self/self-shadowing-import.rs @@ -1,4 +1,4 @@ -// run-pass +//@ run-pass mod a { pub mod b { diff --git a/tests/ui/self/self-type-param.rs b/tests/ui/self/self-type-param.rs index 5eb8c3622e4..0b123de2531 100644 --- a/tests/ui/self/self-type-param.rs +++ b/tests/ui/self/self-type-param.rs @@ -1,6 +1,6 @@ -// build-pass (FIXME(62277): could be check-pass?) +//@ build-pass (FIXME(62277): could be check-pass?) #![allow(dead_code)] -// pretty-expanded FIXME #23616 +//@ pretty-expanded FIXME #23616 trait MyTrait { fn f(&self) -> Self; diff --git a/tests/ui/self/self_lifetime-async.rs b/tests/ui/self/self_lifetime-async.rs index c3c6e56582d..7d6eb3f5eaf 100644 --- a/tests/ui/self/self_lifetime-async.rs +++ b/tests/ui/self/self_lifetime-async.rs @@ -1,5 +1,5 @@ -// check-pass -// edition:2018 +//@ check-pass +//@ edition:2018 struct Foo<'a>(&'a ()); impl<'a> Foo<'a> { diff --git a/tests/ui/self/self_lifetime.rs b/tests/ui/self/self_lifetime.rs index f04bd83ab6e..3f655b960b1 100644 --- a/tests/ui/self/self_lifetime.rs +++ b/tests/ui/self/self_lifetime.rs @@ -1,4 +1,4 @@ -// check-pass +//@ check-pass // https://github.com/rust-lang/rust/pull/60944#issuecomment-495346120 diff --git a/tests/ui/self/string-self-append.rs b/tests/ui/self/string-self-append.rs index e63dc0090cb..dea81392d79 100644 --- a/tests/ui/self/string-self-append.rs +++ b/tests/ui/self/string-self-append.rs @@ -1,4 +1,4 @@ -// run-pass +//@ run-pass pub fn main() { // Make sure we properly handle repeated self-appends. let mut a: String = "A".to_string(); diff --git a/tests/ui/self/ufcs-explicit-self.rs b/tests/ui/self/ufcs-explicit-self.rs index d83af14d354..5e6e2d2c93c 100644 --- a/tests/ui/self/ufcs-explicit-self.rs +++ b/tests/ui/self/ufcs-explicit-self.rs @@ -1,4 +1,4 @@ -// run-pass +//@ run-pass #![allow(dead_code)] #[derive(Copy, Clone)] diff --git a/tests/ui/self/uniq-self-in-mut-slot.rs b/tests/ui/self/uniq-self-in-mut-slot.rs index 71e57d8c1fa..6d087b7356f 100644 --- a/tests/ui/self/uniq-self-in-mut-slot.rs +++ b/tests/ui/self/uniq-self-in-mut-slot.rs @@ -1,4 +1,4 @@ -// run-pass +//@ run-pass struct X { a: isize diff --git a/tests/ui/self/where-for-self.rs b/tests/ui/self/where-for-self.rs index 76c592dc49b..9b4e8325664 100644 --- a/tests/ui/self/where-for-self.rs +++ b/tests/ui/self/where-for-self.rs @@ -1,4 +1,4 @@ -// run-pass +//@ run-pass // Test that we can quantify lifetimes outside a constraint (i.e., including // the self type) in a where clause. diff --git a/tests/ui/sepcomp/auxiliary/sepcomp_lib.rs b/tests/ui/sepcomp/auxiliary/sepcomp_lib.rs index 1536228c265..59efb3f790b 100644 --- a/tests/ui/sepcomp/auxiliary/sepcomp_lib.rs +++ b/tests/ui/sepcomp/auxiliary/sepcomp_lib.rs @@ -1,4 +1,4 @@ -// compile-flags: -C codegen-units=3 --crate-type=rlib,dylib -g +//@ compile-flags: -C codegen-units=3 --crate-type=rlib,dylib -g pub mod a { pub fn one() -> usize { diff --git a/tests/ui/sepcomp/sepcomp-cci.rs b/tests/ui/sepcomp/sepcomp-cci.rs index 02bbab30e9c..66b0edda9a9 100644 --- a/tests/ui/sepcomp/sepcomp-cci.rs +++ b/tests/ui/sepcomp/sepcomp-cci.rs @@ -1,6 +1,6 @@ -// run-pass -// compile-flags: -C codegen-units=3 -// aux-build:sepcomp_cci_lib.rs +//@ run-pass +//@ compile-flags: -C codegen-units=3 +//@ aux-build:sepcomp_cci_lib.rs // Test accessing cross-crate inlined items from multiple compilation units. diff --git a/tests/ui/sepcomp/sepcomp-extern.rs b/tests/ui/sepcomp/sepcomp-extern.rs index 6323bf664fc..6acd3a1eede 100644 --- a/tests/ui/sepcomp/sepcomp-extern.rs +++ b/tests/ui/sepcomp/sepcomp-extern.rs @@ -1,6 +1,6 @@ -// run-pass -// compile-flags: -C codegen-units=3 -// aux-build:sepcomp-extern-lib.rs +//@ run-pass +//@ compile-flags: -C codegen-units=3 +//@ aux-build:sepcomp-extern-lib.rs // Test accessing external items from multiple compilation units. diff --git a/tests/ui/sepcomp/sepcomp-fns-backwards.rs b/tests/ui/sepcomp/sepcomp-fns-backwards.rs index f56769e2b8c..35326d19d6e 100644 --- a/tests/ui/sepcomp/sepcomp-fns-backwards.rs +++ b/tests/ui/sepcomp/sepcomp-fns-backwards.rs @@ -1,6 +1,6 @@ -// run-pass +//@ run-pass #![allow(dead_code)] -// compile-flags: -C codegen-units=3 +//@ compile-flags: -C codegen-units=3 // Test references to items that haven't been codegened yet. diff --git a/tests/ui/sepcomp/sepcomp-fns.rs b/tests/ui/sepcomp/sepcomp-fns.rs index a432c89606e..399193e69b6 100644 --- a/tests/ui/sepcomp/sepcomp-fns.rs +++ b/tests/ui/sepcomp/sepcomp-fns.rs @@ -1,5 +1,5 @@ -// run-pass -// compile-flags: -C codegen-units=3 +//@ run-pass +//@ compile-flags: -C codegen-units=3 // Test basic separate compilation functionality. The functions should be able // to call each other even though they will be placed in different compilation diff --git a/tests/ui/sepcomp/sepcomp-lib-lto.rs b/tests/ui/sepcomp/sepcomp-lib-lto.rs index 164ae79c254..2166a8fd031 100644 --- a/tests/ui/sepcomp/sepcomp-lib-lto.rs +++ b/tests/ui/sepcomp/sepcomp-lib-lto.rs @@ -1,10 +1,10 @@ -// run-pass +//@ run-pass // Check that we can use `-C lto` when linking against libraries that were // separately compiled. -// aux-build:sepcomp_lib.rs -// compile-flags: -C lto -g -// no-prefer-dynamic +//@ aux-build:sepcomp_lib.rs +//@ compile-flags: -C lto -g +//@ no-prefer-dynamic extern crate sepcomp_lib; use sepcomp_lib::a::one; diff --git a/tests/ui/sepcomp/sepcomp-lib.rs b/tests/ui/sepcomp/sepcomp-lib.rs index 728dc078b7e..70948e6d643 100644 --- a/tests/ui/sepcomp/sepcomp-lib.rs +++ b/tests/ui/sepcomp/sepcomp-lib.rs @@ -1,5 +1,5 @@ -// run-pass -// aux-build:sepcomp_lib.rs +//@ run-pass +//@ aux-build:sepcomp_lib.rs // Test linking against a library built with -C codegen-units > 1 diff --git a/tests/ui/sepcomp/sepcomp-statics.rs b/tests/ui/sepcomp/sepcomp-statics.rs index 5457c8a0ae9..580bb628da6 100644 --- a/tests/ui/sepcomp/sepcomp-statics.rs +++ b/tests/ui/sepcomp/sepcomp-statics.rs @@ -1,6 +1,6 @@ -// run-pass +//@ run-pass #![allow(dead_code)] -// compile-flags: -C codegen-units=3 +//@ compile-flags: -C codegen-units=3 // Test references to static items across compilation units. diff --git a/tests/ui/sepcomp/sepcomp-unwind.rs b/tests/ui/sepcomp/sepcomp-unwind.rs index a59e25a273e..6a40b5ccc12 100644 --- a/tests/ui/sepcomp/sepcomp-unwind.rs +++ b/tests/ui/sepcomp/sepcomp-unwind.rs @@ -1,8 +1,8 @@ -// run-pass -// needs-unwind +//@ run-pass +//@ needs-unwind #![allow(dead_code)] -// compile-flags: -C codegen-units=3 -// ignore-emscripten no threads support +//@ compile-flags: -C codegen-units=3 +//@ ignore-emscripten no threads support // Test unwinding through multiple compilation units. diff --git a/tests/ui/shadow-bool.rs b/tests/ui/shadow-bool.rs index f290a329eaa..8cba2c1710b 100644 --- a/tests/ui/shadow-bool.rs +++ b/tests/ui/shadow-bool.rs @@ -1,4 +1,4 @@ -// check-pass +//@ check-pass mod bar { pub trait QueryId { diff --git a/tests/ui/shadowed-use-visibility.rs b/tests/ui/shadowed-use-visibility.rs index 350fbfeaeb5..66181267f98 100644 --- a/tests/ui/shadowed-use-visibility.rs +++ b/tests/ui/shadowed-use-visibility.rs @@ -1,4 +1,4 @@ -// run-pass +//@ run-pass #![allow(unused_imports)] mod foo { diff --git a/tests/ui/shell-argfiles/shell-argfiles-badquotes-windows.rs b/tests/ui/shell-argfiles/shell-argfiles-badquotes-windows.rs index 800735cf3a7..ef90937b221 100644 --- a/tests/ui/shell-argfiles/shell-argfiles-badquotes-windows.rs +++ b/tests/ui/shell-argfiles/shell-argfiles-badquotes-windows.rs @@ -4,8 +4,8 @@ // separators. This test uses backslash as the path separator for the command // line arguments and is only run on windows. // -// only-windows -// compile-flags: --cfg cmdline_set -Z shell-argfiles @shell:{{src-base}}\shell-argfiles\shell-argfiles-badquotes.args +//@ only-windows +//@ compile-flags: --cfg cmdline_set -Z shell-argfiles @shell:{{src-base}}\shell-argfiles\shell-argfiles-badquotes.args fn main() { } diff --git a/tests/ui/shell-argfiles/shell-argfiles-badquotes.rs b/tests/ui/shell-argfiles/shell-argfiles-badquotes.rs index f9160143a04..1edb69c3f2b 100644 --- a/tests/ui/shell-argfiles/shell-argfiles-badquotes.rs +++ b/tests/ui/shell-argfiles/shell-argfiles-badquotes.rs @@ -5,8 +5,8 @@ // the path separator for the command line arguments that is only run on // windows. // -// ignore-windows -// compile-flags: --cfg cmdline_set -Z shell-argfiles @shell:{{src-base}}/shell-argfiles/shell-argfiles-badquotes.args +//@ ignore-windows +//@ compile-flags: --cfg cmdline_set -Z shell-argfiles @shell:{{src-base}}/shell-argfiles/shell-argfiles-badquotes.args fn main() { } diff --git a/tests/ui/shell-argfiles/shell-argfiles-via-argfile.rs b/tests/ui/shell-argfiles/shell-argfiles-via-argfile.rs index d71e3218f53..b907fd3bbc7 100644 --- a/tests/ui/shell-argfiles/shell-argfiles-via-argfile.rs +++ b/tests/ui/shell-argfiles/shell-argfiles-via-argfile.rs @@ -1,7 +1,7 @@ // Check to see if we can get parameters from an @argsfile file // -// build-pass -// compile-flags: @{{src-base}}/shell-argfiles/shell-argfiles-via-argfile.args @shell:{{src-base}}/shell-argfiles/shell-argfiles-via-argfile-shell.args +//@ build-pass +//@ compile-flags: @{{src-base}}/shell-argfiles/shell-argfiles-via-argfile.args @shell:{{src-base}}/shell-argfiles/shell-argfiles-via-argfile-shell.args #[cfg(not(shell_args_set))] compile_error!("shell_args_set not set"); diff --git a/tests/ui/shell-argfiles/shell-argfiles.rs b/tests/ui/shell-argfiles/shell-argfiles.rs index 9bc252ea628..f9ebef68f5a 100644 --- a/tests/ui/shell-argfiles/shell-argfiles.rs +++ b/tests/ui/shell-argfiles/shell-argfiles.rs @@ -1,7 +1,7 @@ // Check to see if we can get parameters from an @argsfile file // -// build-pass -// compile-flags: --cfg cmdline_set -Z shell-argfiles @shell:{{src-base}}/shell-argfiles/shell-argfiles.args +//@ build-pass +//@ compile-flags: --cfg cmdline_set -Z shell-argfiles @shell:{{src-base}}/shell-argfiles/shell-argfiles.args #[cfg(not(cmdline_set))] compile_error!("cmdline_set not set"); diff --git a/tests/ui/short-error-format.rs b/tests/ui/short-error-format.rs index acba4674a4d..719870a04fb 100644 --- a/tests/ui/short-error-format.rs +++ b/tests/ui/short-error-format.rs @@ -1,4 +1,4 @@ -// compile-flags: --error-format=short +//@ compile-flags: --error-format=short fn foo(_: u32) {} diff --git a/tests/ui/simd/array-trait.rs b/tests/ui/simd/array-trait.rs index 27a7df17d66..bf1e219460f 100644 --- a/tests/ui/simd/array-trait.rs +++ b/tests/ui/simd/array-trait.rs @@ -2,7 +2,7 @@ #![allow(dead_code)] -// pretty-expanded FIXME #23616 +//@ pretty-expanded FIXME #23616 #![feature(repr_simd, platform_intrinsics, generic_const_exprs)] #![allow(non_camel_case_types, incomplete_features)] diff --git a/tests/ui/simd/array-type.rs b/tests/ui/simd/array-type.rs index 7d66395a3c8..c9f5ed0d031 100644 --- a/tests/ui/simd/array-type.rs +++ b/tests/ui/simd/array-type.rs @@ -1,7 +1,7 @@ -// run-pass +//@ run-pass #![allow(dead_code)] -// pretty-expanded FIXME #23616 +//@ pretty-expanded FIXME #23616 #![feature(repr_simd, platform_intrinsics)] diff --git a/tests/ui/simd/generics.rs b/tests/ui/simd/generics.rs index fa9d35ee4df..9b54de809ed 100644 --- a/tests/ui/simd/generics.rs +++ b/tests/ui/simd/generics.rs @@ -1,4 +1,4 @@ -// run-pass +//@ run-pass #![allow(non_camel_case_types)] #![feature(repr_simd, platform_intrinsics)] diff --git a/tests/ui/simd/intrinsic/float-math-pass.rs b/tests/ui/simd/intrinsic/float-math-pass.rs index 7a4f7466559..c1ba50a910b 100644 --- a/tests/ui/simd/intrinsic/float-math-pass.rs +++ b/tests/ui/simd/intrinsic/float-math-pass.rs @@ -1,6 +1,6 @@ -// run-pass -// ignore-emscripten -// ignore-android +//@ run-pass +//@ ignore-emscripten +//@ ignore-android // FIXME: this test fails on arm-android because the NDK version 14 is too old. // It needs at least version 18. We disable it on all android build bots because diff --git a/tests/ui/simd/intrinsic/float-minmax-pass.rs b/tests/ui/simd/intrinsic/float-minmax-pass.rs index 968b074b6ef..a773c79dbe9 100644 --- a/tests/ui/simd/intrinsic/float-minmax-pass.rs +++ b/tests/ui/simd/intrinsic/float-minmax-pass.rs @@ -1,5 +1,5 @@ -// run-pass -// ignore-emscripten +//@ run-pass +//@ ignore-emscripten // Test that the simd_f{min,max} intrinsics produce the correct results. diff --git a/tests/ui/simd/intrinsic/generic-arithmetic-2.rs b/tests/ui/simd/intrinsic/generic-arithmetic-2.rs index 62fb5238bbd..b337a77c24c 100644 --- a/tests/ui/simd/intrinsic/generic-arithmetic-2.rs +++ b/tests/ui/simd/intrinsic/generic-arithmetic-2.rs @@ -1,4 +1,4 @@ -// build-fail +//@ build-fail #![feature(repr_simd, platform_intrinsics)] #![allow(non_camel_case_types)] diff --git a/tests/ui/simd/intrinsic/generic-arithmetic-pass.rs b/tests/ui/simd/intrinsic/generic-arithmetic-pass.rs index f021ee4710a..fa54228bbcf 100644 --- a/tests/ui/simd/intrinsic/generic-arithmetic-pass.rs +++ b/tests/ui/simd/intrinsic/generic-arithmetic-pass.rs @@ -1,6 +1,6 @@ -// run-pass +//@ run-pass #![allow(non_camel_case_types)] -// ignore-emscripten FIXME(#45351) hits an LLVM assert +//@ ignore-emscripten FIXME(#45351) hits an LLVM assert #![feature(repr_simd, platform_intrinsics)] #[repr(simd)] diff --git a/tests/ui/simd/intrinsic/generic-arithmetic-saturating-2.rs b/tests/ui/simd/intrinsic/generic-arithmetic-saturating-2.rs index 9736d1b964d..b31a604cb14 100644 --- a/tests/ui/simd/intrinsic/generic-arithmetic-saturating-2.rs +++ b/tests/ui/simd/intrinsic/generic-arithmetic-saturating-2.rs @@ -1,5 +1,5 @@ -// build-fail -// ignore-emscripten +//@ build-fail +//@ ignore-emscripten #![feature(repr_simd, platform_intrinsics)] #![allow(non_camel_case_types)] #[repr(simd)] diff --git a/tests/ui/simd/intrinsic/generic-arithmetic-saturating-pass.rs b/tests/ui/simd/intrinsic/generic-arithmetic-saturating-pass.rs index c11d14b99d4..1a4ba3659c1 100644 --- a/tests/ui/simd/intrinsic/generic-arithmetic-saturating-pass.rs +++ b/tests/ui/simd/intrinsic/generic-arithmetic-saturating-pass.rs @@ -1,5 +1,5 @@ -// run-pass -// ignore-emscripten +//@ run-pass +//@ ignore-emscripten #![allow(non_camel_case_types)] #![feature(repr_simd, platform_intrinsics)] diff --git a/tests/ui/simd/intrinsic/generic-as.rs b/tests/ui/simd/intrinsic/generic-as.rs index a975190a2fa..807cd927734 100644 --- a/tests/ui/simd/intrinsic/generic-as.rs +++ b/tests/ui/simd/intrinsic/generic-as.rs @@ -1,4 +1,4 @@ -// run-pass +//@ run-pass #![feature(repr_simd, platform_intrinsics)] diff --git a/tests/ui/simd/intrinsic/generic-bitmask-pass.rs b/tests/ui/simd/intrinsic/generic-bitmask-pass.rs index 8c436841b44..3063a0a4a3a 100644 --- a/tests/ui/simd/intrinsic/generic-bitmask-pass.rs +++ b/tests/ui/simd/intrinsic/generic-bitmask-pass.rs @@ -1,8 +1,8 @@ -// run-pass +//@ run-pass #![allow(non_camel_case_types)] -// ignore-emscripten -// ignore-endian-big behavior of simd_bitmask is endian-specific +//@ ignore-emscripten +//@ ignore-endian-big behavior of simd_bitmask is endian-specific // Test that the simd_bitmask intrinsic produces correct results. diff --git a/tests/ui/simd/intrinsic/generic-bitmask.rs b/tests/ui/simd/intrinsic/generic-bitmask.rs index 9a23dae77b9..f1bda34a85e 100644 --- a/tests/ui/simd/intrinsic/generic-bitmask.rs +++ b/tests/ui/simd/intrinsic/generic-bitmask.rs @@ -1,4 +1,4 @@ -// build-fail +//@ build-fail // Test that the simd_bitmask intrinsic produces ok-ish error // messages when misused. diff --git a/tests/ui/simd/intrinsic/generic-bswap-byte.rs b/tests/ui/simd/intrinsic/generic-bswap-byte.rs index 13fc942c25a..d86db6601b2 100644 --- a/tests/ui/simd/intrinsic/generic-bswap-byte.rs +++ b/tests/ui/simd/intrinsic/generic-bswap-byte.rs @@ -1,4 +1,4 @@ -// run-pass +//@ run-pass #![feature(repr_simd, platform_intrinsics)] #![allow(non_camel_case_types)] diff --git a/tests/ui/simd/intrinsic/generic-cast-pass.rs b/tests/ui/simd/intrinsic/generic-cast-pass.rs index 89436c83e25..24ec910f534 100644 --- a/tests/ui/simd/intrinsic/generic-cast-pass.rs +++ b/tests/ui/simd/intrinsic/generic-cast-pass.rs @@ -1,5 +1,5 @@ -// run-pass -// ignore-emscripten FIXME(#45351) hits an LLVM assert +//@ run-pass +//@ ignore-emscripten FIXME(#45351) hits an LLVM assert #![feature(repr_simd, platform_intrinsics)] diff --git a/tests/ui/simd/intrinsic/generic-cast-pointer-width.rs b/tests/ui/simd/intrinsic/generic-cast-pointer-width.rs index b9382310deb..ade52086bc4 100644 --- a/tests/ui/simd/intrinsic/generic-cast-pointer-width.rs +++ b/tests/ui/simd/intrinsic/generic-cast-pointer-width.rs @@ -1,4 +1,4 @@ -// run-pass +//@ run-pass #![feature(repr_simd, platform_intrinsics)] extern "platform-intrinsic" { diff --git a/tests/ui/simd/intrinsic/generic-cast.rs b/tests/ui/simd/intrinsic/generic-cast.rs index 4f4fa06b002..9488d9a42ab 100644 --- a/tests/ui/simd/intrinsic/generic-cast.rs +++ b/tests/ui/simd/intrinsic/generic-cast.rs @@ -1,4 +1,4 @@ -// build-fail +//@ build-fail #![feature(repr_simd, platform_intrinsics)] diff --git a/tests/ui/simd/intrinsic/generic-comparison-pass.rs b/tests/ui/simd/intrinsic/generic-comparison-pass.rs index 103132c18ae..083236387e4 100644 --- a/tests/ui/simd/intrinsic/generic-comparison-pass.rs +++ b/tests/ui/simd/intrinsic/generic-comparison-pass.rs @@ -1,5 +1,5 @@ -// run-pass -// ignore-emscripten FIXME(#45351) hits an LLVM assert +//@ run-pass +//@ ignore-emscripten FIXME(#45351) hits an LLVM assert #![feature(repr_simd, platform_intrinsics, concat_idents)] #![allow(non_camel_case_types)] diff --git a/tests/ui/simd/intrinsic/generic-comparison.rs b/tests/ui/simd/intrinsic/generic-comparison.rs index 3cd38042f0f..710e660d9cb 100644 --- a/tests/ui/simd/intrinsic/generic-comparison.rs +++ b/tests/ui/simd/intrinsic/generic-comparison.rs @@ -1,4 +1,4 @@ -// build-fail +//@ build-fail #![feature(repr_simd, platform_intrinsics)] diff --git a/tests/ui/simd/intrinsic/generic-elements-pass.rs b/tests/ui/simd/intrinsic/generic-elements-pass.rs index 905c3b8d3cc..e3b527fa4fe 100644 --- a/tests/ui/simd/intrinsic/generic-elements-pass.rs +++ b/tests/ui/simd/intrinsic/generic-elements-pass.rs @@ -1,5 +1,5 @@ -// run-pass -// ignore-emscripten FIXME(#45351) hits an LLVM assert +//@ run-pass +//@ ignore-emscripten FIXME(#45351) hits an LLVM assert #![feature(repr_simd, platform_intrinsics)] #![feature(inline_const)] diff --git a/tests/ui/simd/intrinsic/generic-elements.rs b/tests/ui/simd/intrinsic/generic-elements.rs index 6ba93e46f75..a8ee4cf3965 100644 --- a/tests/ui/simd/intrinsic/generic-elements.rs +++ b/tests/ui/simd/intrinsic/generic-elements.rs @@ -1,4 +1,4 @@ -// build-fail +//@ build-fail #![feature(repr_simd, platform_intrinsics, rustc_attrs, adt_const_params)] #![allow(incomplete_features)] diff --git a/tests/ui/simd/intrinsic/generic-gather-pass.rs b/tests/ui/simd/intrinsic/generic-gather-pass.rs index 7d4b3dbd7b4..ca9e9de2afa 100644 --- a/tests/ui/simd/intrinsic/generic-gather-pass.rs +++ b/tests/ui/simd/intrinsic/generic-gather-pass.rs @@ -1,5 +1,5 @@ -// run-pass -// ignore-emscripten +//@ run-pass +//@ ignore-emscripten // Test that the simd_{gather,scatter} intrinsics produce the correct results. diff --git a/tests/ui/simd/intrinsic/generic-reduction-pass.rs b/tests/ui/simd/intrinsic/generic-reduction-pass.rs index 4a54afee807..4928ea7bac7 100644 --- a/tests/ui/simd/intrinsic/generic-reduction-pass.rs +++ b/tests/ui/simd/intrinsic/generic-reduction-pass.rs @@ -1,7 +1,7 @@ -// run-pass +//@ run-pass #![allow(non_camel_case_types)] -// ignore-emscripten +//@ ignore-emscripten // Test that the simd_reduce_{op} intrinsics produce the correct results. diff --git a/tests/ui/simd/intrinsic/generic-reduction.rs b/tests/ui/simd/intrinsic/generic-reduction.rs index ede4b26d19c..5e3debb411e 100644 --- a/tests/ui/simd/intrinsic/generic-reduction.rs +++ b/tests/ui/simd/intrinsic/generic-reduction.rs @@ -1,5 +1,5 @@ -// build-fail -// ignore-emscripten +//@ build-fail +//@ ignore-emscripten // Test that the simd_reduce_{op} intrinsics produce ok-ish error // messages when misused. diff --git a/tests/ui/simd/intrinsic/generic-select-pass.rs b/tests/ui/simd/intrinsic/generic-select-pass.rs index b850cf9750a..df8a89e26c9 100644 --- a/tests/ui/simd/intrinsic/generic-select-pass.rs +++ b/tests/ui/simd/intrinsic/generic-select-pass.rs @@ -1,8 +1,8 @@ -// run-pass +//@ run-pass #![allow(non_camel_case_types)] -// ignore-emscripten -// ignore-endian-big behavior of simd_select_bitmask is endian-specific +//@ ignore-emscripten +//@ ignore-endian-big behavior of simd_select_bitmask is endian-specific // Test that the simd_select intrinsics produces correct results. diff --git a/tests/ui/simd/intrinsic/generic-select.rs b/tests/ui/simd/intrinsic/generic-select.rs index 248e82ea21c..ab963ed942f 100644 --- a/tests/ui/simd/intrinsic/generic-select.rs +++ b/tests/ui/simd/intrinsic/generic-select.rs @@ -1,4 +1,4 @@ -// build-fail +//@ build-fail // Test that the simd_select intrinsic produces ok-ish error // messages when misused. diff --git a/tests/ui/simd/intrinsic/generic-shuffle.rs b/tests/ui/simd/intrinsic/generic-shuffle.rs index 9611780ac07..db814f02c8b 100644 --- a/tests/ui/simd/intrinsic/generic-shuffle.rs +++ b/tests/ui/simd/intrinsic/generic-shuffle.rs @@ -1,4 +1,4 @@ -// build-fail +//@ build-fail // Test that the simd_shuffle intrinsic produces ok-ish error // messages when misused. diff --git a/tests/ui/simd/intrinsic/inlining-issue67557-ice.rs b/tests/ui/simd/intrinsic/inlining-issue67557-ice.rs index 5ca684a9d78..5b49f4f7203 100644 --- a/tests/ui/simd/intrinsic/inlining-issue67557-ice.rs +++ b/tests/ui/simd/intrinsic/inlining-issue67557-ice.rs @@ -1,8 +1,8 @@ // This used to cause an ICE for an internal index out of range due to simd_shuffle_indices being // passed the wrong Instance, causing issues with inlining. See #67557. // -// run-pass -// compile-flags: -Zmir-opt-level=4 +//@ run-pass +//@ compile-flags: -Zmir-opt-level=4 #![feature(platform_intrinsics, repr_simd)] extern "platform-intrinsic" { diff --git a/tests/ui/simd/intrinsic/inlining-issue67557.rs b/tests/ui/simd/intrinsic/inlining-issue67557.rs index 5633ad70cd3..3d6284ef1c6 100644 --- a/tests/ui/simd/intrinsic/inlining-issue67557.rs +++ b/tests/ui/simd/intrinsic/inlining-issue67557.rs @@ -1,8 +1,8 @@ // This used to cause assert_10_13 to unexpectingly fail, due to simd_shuffle_indices being passed // the wrong Instance, causing issues with inlining. See #67557. // -// run-pass -// compile-flags: -Zmir-opt-level=4 +//@ run-pass +//@ compile-flags: -Zmir-opt-level=4 #![feature(platform_intrinsics, repr_simd)] extern "platform-intrinsic" { diff --git a/tests/ui/simd/intrinsic/ptr-cast.rs b/tests/ui/simd/intrinsic/ptr-cast.rs index 1d13720bcd3..109e1d0039a 100644 --- a/tests/ui/simd/intrinsic/ptr-cast.rs +++ b/tests/ui/simd/intrinsic/ptr-cast.rs @@ -1,4 +1,4 @@ -// run-pass +//@ run-pass #![feature(repr_simd, platform_intrinsics)] diff --git a/tests/ui/simd/issue-105439.rs b/tests/ui/simd/issue-105439.rs index 35ca76e989b..3eb137e4ee7 100644 --- a/tests/ui/simd/issue-105439.rs +++ b/tests/ui/simd/issue-105439.rs @@ -1,5 +1,5 @@ -// run-pass -// compile-flags: -O -Zverify-llvm-ir +//@ run-pass +//@ compile-flags: -O -Zverify-llvm-ir #![feature(repr_simd)] #![feature(platform_intrinsics)] diff --git a/tests/ui/simd/issue-17170.rs b/tests/ui/simd/issue-17170.rs index 8d70dacdc90..abfc1c25ffb 100644 --- a/tests/ui/simd/issue-17170.rs +++ b/tests/ui/simd/issue-17170.rs @@ -1,4 +1,4 @@ -// run-pass +//@ run-pass #![feature(repr_simd)] #[repr(simd)] diff --git a/tests/ui/simd/issue-32947.rs b/tests/ui/simd/issue-32947.rs index b07def21e88..bccca25c52b 100644 --- a/tests/ui/simd/issue-32947.rs +++ b/tests/ui/simd/issue-32947.rs @@ -1,5 +1,5 @@ -// run-pass -// ignore-emscripten FIXME(#45351) +//@ run-pass +//@ ignore-emscripten FIXME(#45351) #![feature(repr_simd, test)] diff --git a/tests/ui/simd/issue-39720.rs b/tests/ui/simd/issue-39720.rs index 8cf841f9371..ea6e893b79d 100644 --- a/tests/ui/simd/issue-39720.rs +++ b/tests/ui/simd/issue-39720.rs @@ -1,5 +1,5 @@ -// run-pass -// ignore-emscripten FIXME(#45351) +//@ run-pass +//@ ignore-emscripten FIXME(#45351) #![feature(repr_simd, platform_intrinsics)] diff --git a/tests/ui/simd/issue-85915-simd-ptrs.rs b/tests/ui/simd/issue-85915-simd-ptrs.rs index 6fe415545f8..96ac76f0590 100644 --- a/tests/ui/simd/issue-85915-simd-ptrs.rs +++ b/tests/ui/simd/issue-85915-simd-ptrs.rs @@ -1,5 +1,5 @@ -// run-pass -// ignore-emscripten +//@ run-pass +//@ ignore-emscripten // Short form of the generic gather/scatter tests, // verifying simd([*const T; N]) and simd([*mut T; N]) pass typeck and work. diff --git a/tests/ui/simd/issue-89193.rs b/tests/ui/simd/issue-89193.rs index cd24d6675b2..f34242e7bf8 100644 --- a/tests/ui/simd/issue-89193.rs +++ b/tests/ui/simd/issue-89193.rs @@ -1,4 +1,4 @@ -// run-pass +//@ run-pass // Test that simd gather instructions on slice of usize don't cause crash // See issue #89183 - https://github.com/rust-lang/rust/issues/89193 diff --git a/tests/ui/simd/libm_std_can_float.rs b/tests/ui/simd/libm_std_can_float.rs index 78bd0c14022..520b7d09ae9 100644 --- a/tests/ui/simd/libm_std_can_float.rs +++ b/tests/ui/simd/libm_std_can_float.rs @@ -1,4 +1,4 @@ -// run-pass +//@ run-pass // This is the converse of the other libm test. #![feature(portable_simd)] diff --git a/tests/ui/simd/masked-load-store-build-fail.rs b/tests/ui/simd/masked-load-store-build-fail.rs index 9b79b3bd6ea..7b414dfcc93 100644 --- a/tests/ui/simd/masked-load-store-build-fail.rs +++ b/tests/ui/simd/masked-load-store-build-fail.rs @@ -1,4 +1,4 @@ -// build-fail +//@ build-fail #![feature(repr_simd, platform_intrinsics)] extern "platform-intrinsic" { diff --git a/tests/ui/simd/masked-load-store-check-fail.rs b/tests/ui/simd/masked-load-store-check-fail.rs index d4b35e211c8..a86979d8faf 100644 --- a/tests/ui/simd/masked-load-store-check-fail.rs +++ b/tests/ui/simd/masked-load-store-check-fail.rs @@ -1,4 +1,4 @@ -// check-fail +//@ check-fail #![feature(repr_simd, platform_intrinsics)] extern "platform-intrinsic" { diff --git a/tests/ui/simd/masked-load-store.rs b/tests/ui/simd/masked-load-store.rs index 74ee652ec6e..b2f5490727f 100644 --- a/tests/ui/simd/masked-load-store.rs +++ b/tests/ui/simd/masked-load-store.rs @@ -1,4 +1,4 @@ -// run-pass +//@ run-pass #![feature(repr_simd, platform_intrinsics)] extern "platform-intrinsic" { diff --git a/tests/ui/simd/monomorphize-shuffle-index.rs b/tests/ui/simd/monomorphize-shuffle-index.rs index db7953f06dd..052f0eec472 100644 --- a/tests/ui/simd/monomorphize-shuffle-index.rs +++ b/tests/ui/simd/monomorphize-shuffle-index.rs @@ -1,6 +1,6 @@ -//[old]run-pass -//[generic_with_fn]run-pass -// revisions: old generic generic_with_fn +//@[old]run-pass +//@[generic_with_fn]run-pass +//@ revisions: old generic generic_with_fn #![feature(repr_simd, platform_intrinsics, adt_const_params, generic_const_exprs)] #![allow(incomplete_features)] diff --git a/tests/ui/simd/repr_packed.rs b/tests/ui/simd/repr_packed.rs index df2d59a58b8..395751e86f1 100644 --- a/tests/ui/simd/repr_packed.rs +++ b/tests/ui/simd/repr_packed.rs @@ -1,4 +1,4 @@ -// run-pass +//@ run-pass #![feature(repr_simd, platform_intrinsics)] #![allow(non_camel_case_types)] diff --git a/tests/ui/simd/shuffle-not-out-of-bounds.rs b/tests/ui/simd/shuffle-not-out-of-bounds.rs index 18939bcc5b4..158e9956435 100644 --- a/tests/ui/simd/shuffle-not-out-of-bounds.rs +++ b/tests/ui/simd/shuffle-not-out-of-bounds.rs @@ -1,4 +1,4 @@ -// build-fail +//@ build-fail #![allow(non_camel_case_types)] #![feature(repr_simd, platform_intrinsics)] diff --git a/tests/ui/simd/shuffle.rs b/tests/ui/simd/shuffle.rs index 838e31f8e41..5022afc5b49 100644 --- a/tests/ui/simd/shuffle.rs +++ b/tests/ui/simd/shuffle.rs @@ -1,7 +1,7 @@ -// run-pass -// revisions: opt noopt -//[noopt] compile-flags: -Copt-level=0 -//[opt] compile-flags: -O +//@ run-pass +//@ revisions: opt noopt +//@[noopt] compile-flags: -Copt-level=0 +//@[opt] compile-flags: -O #![feature(repr_simd, platform_intrinsics)] #![allow(incomplete_features)] #![feature(adt_const_params)] diff --git a/tests/ui/simd/simd-bitmask.rs b/tests/ui/simd/simd-bitmask.rs index 14ee2e741bd..a3717c9e21a 100644 --- a/tests/ui/simd/simd-bitmask.rs +++ b/tests/ui/simd/simd-bitmask.rs @@ -1,5 +1,5 @@ -//run-pass -//ignore-endian-big behavior of simd_select_bitmask is endian-specific +//@run-pass +//@ignore-endian-big behavior of simd_select_bitmask is endian-specific #![feature(repr_simd, platform_intrinsics)] extern "platform-intrinsic" { diff --git a/tests/ui/simd/size-align.rs b/tests/ui/simd/size-align.rs index 0afa4947225..ff23ea5980b 100644 --- a/tests/ui/simd/size-align.rs +++ b/tests/ui/simd/size-align.rs @@ -1,4 +1,4 @@ -// run-pass +//@ run-pass #![allow(deprecated)] diff --git a/tests/ui/simd/target-feature-mixup.rs b/tests/ui/simd/target-feature-mixup.rs index 5dd163715eb..7148fc509de 100644 --- a/tests/ui/simd/target-feature-mixup.rs +++ b/tests/ui/simd/target-feature-mixup.rs @@ -1,11 +1,11 @@ -// run-pass +//@ run-pass #![allow(unused_variables)] #![allow(stable_features)] #![allow(overflowing_literals)] -// ignore-emscripten -// ignore-sgx no processes -// ignore-fuchsia must translate zircon signal to SIGILL, FIXME (#58590) +//@ ignore-emscripten +//@ ignore-sgx no processes +//@ ignore-fuchsia must translate zircon signal to SIGILL, FIXME (#58590) #![feature(repr_simd, target_feature, cfg_target_feature)] #![feature(avx512_target_feature)] diff --git a/tests/ui/simd/type-generic-monomorphisation-empty.rs b/tests/ui/simd/type-generic-monomorphisation-empty.rs index 2bf6641e9c9..38c5581105d 100644 --- a/tests/ui/simd/type-generic-monomorphisation-empty.rs +++ b/tests/ui/simd/type-generic-monomorphisation-empty.rs @@ -1,8 +1,8 @@ -// build-fail +//@ build-fail #![feature(repr_simd, platform_intrinsics)] -// error-pattern:monomorphising SIMD type `Simd<0>` of zero length +//@ error-pattern:monomorphising SIMD type `Simd<0>` of zero length #[repr(simd)] struct Simd([f32; N]); diff --git a/tests/ui/simd/type-generic-monomorphisation-extern-nonnull-ptr.rs b/tests/ui/simd/type-generic-monomorphisation-extern-nonnull-ptr.rs index ae321c974b9..dbe2d9ddd54 100644 --- a/tests/ui/simd/type-generic-monomorphisation-extern-nonnull-ptr.rs +++ b/tests/ui/simd/type-generic-monomorphisation-extern-nonnull-ptr.rs @@ -1,5 +1,5 @@ -// run-pass -// ignore-emscripten +//@ run-pass +//@ ignore-emscripten #![feature(extern_types)] #![feature(repr_simd)] diff --git a/tests/ui/simd/type-generic-monomorphisation-non-primitive.rs b/tests/ui/simd/type-generic-monomorphisation-non-primitive.rs index 0bc73b15580..a2f6998c6d9 100644 --- a/tests/ui/simd/type-generic-monomorphisation-non-primitive.rs +++ b/tests/ui/simd/type-generic-monomorphisation-non-primitive.rs @@ -1,10 +1,10 @@ -// build-fail +//@ build-fail #![feature(repr_simd)] struct E; -// error-pattern:monomorphising SIMD type `S` with a non-primitive-scalar (integer/float/pointer) element type `E` +//@ error-pattern:monomorphising SIMD type `S` with a non-primitive-scalar (integer/float/pointer) element type `E` #[repr(simd)] struct S([T; 4]); diff --git a/tests/ui/simd/type-generic-monomorphisation-oversized.rs b/tests/ui/simd/type-generic-monomorphisation-oversized.rs index a7dc482f3cb..53f66f1d596 100644 --- a/tests/ui/simd/type-generic-monomorphisation-oversized.rs +++ b/tests/ui/simd/type-generic-monomorphisation-oversized.rs @@ -1,8 +1,8 @@ -// build-fail +//@ build-fail #![feature(repr_simd, platform_intrinsics)] -// error-pattern:monomorphising SIMD type `Simd<65536>` of length greater than 32768 +//@ error-pattern:monomorphising SIMD type `Simd<65536>` of length greater than 32768 #[repr(simd)] struct Simd([f32; N]); diff --git a/tests/ui/simd/type-generic-monomorphisation-power-of-two.rs b/tests/ui/simd/type-generic-monomorphisation-power-of-two.rs index 9b645d363e9..26269335bc4 100644 --- a/tests/ui/simd/type-generic-monomorphisation-power-of-two.rs +++ b/tests/ui/simd/type-generic-monomorphisation-power-of-two.rs @@ -1,4 +1,4 @@ -// run-pass +//@ run-pass #![feature(repr_simd, platform_intrinsics)] diff --git a/tests/ui/simd/type-generic-monomorphisation-wide-ptr.rs b/tests/ui/simd/type-generic-monomorphisation-wide-ptr.rs index 3e02b08ce5d..564118e9b13 100644 --- a/tests/ui/simd/type-generic-monomorphisation-wide-ptr.rs +++ b/tests/ui/simd/type-generic-monomorphisation-wide-ptr.rs @@ -1,8 +1,8 @@ -// build-fail +//@ build-fail #![feature(repr_simd)] -// error-pattern:monomorphising SIMD type `S<[*mut [u8]; 4]>` with a non-primitive-scalar (integer/float/pointer) element type `*mut [u8]` +//@ error-pattern:monomorphising SIMD type `S<[*mut [u8]; 4]>` with a non-primitive-scalar (integer/float/pointer) element type `*mut [u8]` #[repr(simd)] struct S(T); diff --git a/tests/ui/simd/type-generic-monomorphisation.rs b/tests/ui/simd/type-generic-monomorphisation.rs index 12f9d65d77a..90ddd1dde0f 100644 --- a/tests/ui/simd/type-generic-monomorphisation.rs +++ b/tests/ui/simd/type-generic-monomorphisation.rs @@ -1,9 +1,9 @@ -// build-fail +//@ build-fail #![feature(repr_simd, platform_intrinsics)] -// error-pattern:monomorphising SIMD type `Simd2` with a non-primitive-scalar (integer/float/pointer) element type `X` +//@ error-pattern:monomorphising SIMD type `Simd2` with a non-primitive-scalar (integer/float/pointer) element type `X` struct X(Vec); #[repr(simd)] diff --git a/tests/ui/simd/type-wide-ptr.rs b/tests/ui/simd/type-wide-ptr.rs index 88f62a07ea0..41d9fac26ad 100644 --- a/tests/ui/simd/type-wide-ptr.rs +++ b/tests/ui/simd/type-wide-ptr.rs @@ -1,8 +1,8 @@ -// build-fail +//@ build-fail #![feature(repr_simd)] -// error-pattern:monomorphising SIMD type `S` with a non-primitive-scalar (integer/float/pointer) element type `*mut [u8]` +//@ error-pattern:monomorphising SIMD type `S` with a non-primitive-scalar (integer/float/pointer) element type `*mut [u8]` #[repr(simd)] struct S([*mut [u8]; 4]); diff --git a/tests/ui/simd/wasm-simd-indirect.rs b/tests/ui/simd/wasm-simd-indirect.rs index 88f92fce2b2..f713f0307f8 100644 --- a/tests/ui/simd/wasm-simd-indirect.rs +++ b/tests/ui/simd/wasm-simd-indirect.rs @@ -1,4 +1,4 @@ -// build-pass +//@ build-pass #[cfg(target_arch = "wasm32")] fn main() { diff --git a/tests/ui/simple_global_asm.rs b/tests/ui/simple_global_asm.rs index c3b2f2e0bc4..9b193b3e44c 100644 --- a/tests/ui/simple_global_asm.rs +++ b/tests/ui/simple_global_asm.rs @@ -1,5 +1,5 @@ -// run-pass -// needs-asm-support +//@ run-pass +//@ needs-asm-support #![feature(naked_functions)] #![allow(dead_code)] diff --git a/tests/ui/single-use-lifetime/derive-eq.rs b/tests/ui/single-use-lifetime/derive-eq.rs index e5bdfc55dd6..e9a3e91554a 100644 --- a/tests/ui/single-use-lifetime/derive-eq.rs +++ b/tests/ui/single-use-lifetime/derive-eq.rs @@ -1,4 +1,4 @@ -// check-pass +//@ check-pass #![deny(single_use_lifetimes)] diff --git a/tests/ui/single-use-lifetime/one-use-in-fn-return.rs b/tests/ui/single-use-lifetime/one-use-in-fn-return.rs index 1ade01eed36..818705c9bf5 100644 --- a/tests/ui/single-use-lifetime/one-use-in-fn-return.rs +++ b/tests/ui/single-use-lifetime/one-use-in-fn-return.rs @@ -5,7 +5,7 @@ // (Normally, using `'static` would be preferred, but there are // times when that is not what you want.) -// check-pass +//@ check-pass #![deny(single_use_lifetimes)] diff --git a/tests/ui/single-use-lifetime/one-use-in-struct.rs b/tests/ui/single-use-lifetime/one-use-in-struct.rs index 9cad942e7a2..1c46e37099f 100644 --- a/tests/ui/single-use-lifetime/one-use-in-struct.rs +++ b/tests/ui/single-use-lifetime/one-use-in-struct.rs @@ -2,7 +2,7 @@ // even when they are only used once (since to not use a named // lifetime is illegal!) // -// check-pass +//@ check-pass // Use forbid to verify that `automatically_derived` is handled correctly. #![forbid(single_use_lifetimes)] diff --git a/tests/ui/single-use-lifetime/two-uses-in-fn-argument-and-return.rs b/tests/ui/single-use-lifetime/two-uses-in-fn-argument-and-return.rs index f80f3f63c66..93575dccd4d 100644 --- a/tests/ui/single-use-lifetime/two-uses-in-fn-argument-and-return.rs +++ b/tests/ui/single-use-lifetime/two-uses-in-fn-argument-and-return.rs @@ -1,7 +1,7 @@ // Test that we DO NOT warn when lifetime name is used in // both the argument and return. // -// check-pass +//@ check-pass #![deny(single_use_lifetimes)] #![allow(dead_code)] diff --git a/tests/ui/single-use-lifetime/two-uses-in-fn-arguments.rs b/tests/ui/single-use-lifetime/two-uses-in-fn-arguments.rs index 51724ebf898..38d7fb0657c 100644 --- a/tests/ui/single-use-lifetime/two-uses-in-fn-arguments.rs +++ b/tests/ui/single-use-lifetime/two-uses-in-fn-arguments.rs @@ -1,7 +1,7 @@ // Test that we DO NOT warn when lifetime name is used multiple // arguments, or more than once in a single argument. // -// check-pass +//@ check-pass #![deny(single_use_lifetimes)] #![allow(dead_code)] diff --git a/tests/ui/single-use-lifetime/two-uses-in-inherent-impl-header.rs b/tests/ui/single-use-lifetime/two-uses-in-inherent-impl-header.rs index 125a395db3b..6be28e6c9a8 100644 --- a/tests/ui/single-use-lifetime/two-uses-in-inherent-impl-header.rs +++ b/tests/ui/single-use-lifetime/two-uses-in-inherent-impl-header.rs @@ -1,6 +1,6 @@ // Test that we DO NOT warn for a lifetime used twice in an impl. // -// check-pass +//@ check-pass #![deny(single_use_lifetimes)] #![allow(dead_code)] diff --git a/tests/ui/single-use-lifetime/two-uses-in-trait-impl.rs b/tests/ui/single-use-lifetime/two-uses-in-trait-impl.rs index 16431a39fd0..1f0da77baee 100644 --- a/tests/ui/single-use-lifetime/two-uses-in-trait-impl.rs +++ b/tests/ui/single-use-lifetime/two-uses-in-trait-impl.rs @@ -1,7 +1,7 @@ // Test that we DO NOT warn for a lifetime on an impl used in both // header and in an associated type. // -// check-pass +//@ check-pass #![deny(single_use_lifetimes)] #![allow(dead_code)] diff --git a/tests/ui/single-use-lifetime/zero-uses-in-fn.fixed b/tests/ui/single-use-lifetime/zero-uses-in-fn.fixed index 0f26a975a37..22f16296412 100644 --- a/tests/ui/single-use-lifetime/zero-uses-in-fn.fixed +++ b/tests/ui/single-use-lifetime/zero-uses-in-fn.fixed @@ -1,4 +1,4 @@ -// run-rustfix +//@ run-rustfix // Test that we DO warn when lifetime name is not used at all. diff --git a/tests/ui/single-use-lifetime/zero-uses-in-fn.rs b/tests/ui/single-use-lifetime/zero-uses-in-fn.rs index 7f9504fe5a9..d6950b7e1b4 100644 --- a/tests/ui/single-use-lifetime/zero-uses-in-fn.rs +++ b/tests/ui/single-use-lifetime/zero-uses-in-fn.rs @@ -1,4 +1,4 @@ -// run-rustfix +//@ run-rustfix // Test that we DO warn when lifetime name is not used at all. diff --git a/tests/ui/sized-borrowed-pointer.rs b/tests/ui/sized-borrowed-pointer.rs index 319b8026954..f1635531e4e 100644 --- a/tests/ui/sized-borrowed-pointer.rs +++ b/tests/ui/sized-borrowed-pointer.rs @@ -1,9 +1,9 @@ -// run-pass +//@ run-pass #![allow(dead_code)] // Possibly-dynamic size of typaram should be cleared at pointer boundary. -// pretty-expanded FIXME #23616 +//@ pretty-expanded FIXME #23616 fn bar() { } fn foo() { bar::<&T>() } diff --git a/tests/ui/sized-owned-pointer.rs b/tests/ui/sized-owned-pointer.rs index 2abf0a1e0c2..48f870de9ae 100644 --- a/tests/ui/sized-owned-pointer.rs +++ b/tests/ui/sized-owned-pointer.rs @@ -1,10 +1,10 @@ -// run-pass +//@ run-pass #![allow(dead_code)] // Possibly-dynamic size of typaram should be cleared at pointer boundary. -// pretty-expanded FIXME #23616 +//@ pretty-expanded FIXME #23616 fn bar() { } fn foo() { bar::>() } diff --git a/tests/ui/sized/coinductive-1-gat.rs b/tests/ui/sized/coinductive-1-gat.rs index cdf70920f00..ad284f724c4 100644 --- a/tests/ui/sized/coinductive-1-gat.rs +++ b/tests/ui/sized/coinductive-1-gat.rs @@ -1,4 +1,4 @@ -// check-pass +//@ check-pass struct Node(C::Assoc::); trait Trait { diff --git a/tests/ui/sized/coinductive-1.rs b/tests/ui/sized/coinductive-1.rs index 7bcd0f1fdaf..3c1ee557af7 100644 --- a/tests/ui/sized/coinductive-1.rs +++ b/tests/ui/sized/coinductive-1.rs @@ -1,4 +1,4 @@ -// check-pass +//@ check-pass struct Node>(C::Assoc); trait Trait { diff --git a/tests/ui/sized/coinductive-2.rs b/tests/ui/sized/coinductive-2.rs index 43a5a28f710..277dd8c878a 100644 --- a/tests/ui/sized/coinductive-2.rs +++ b/tests/ui/sized/coinductive-2.rs @@ -1,4 +1,4 @@ -// run-pass +//@ run-pass struct Node> { _children: C::Collection, } diff --git a/tests/ui/sized/recursive-type-binding.rs b/tests/ui/sized/recursive-type-binding.rs index 7d95417a6ff..52de04afd66 100644 --- a/tests/ui/sized/recursive-type-binding.rs +++ b/tests/ui/sized/recursive-type-binding.rs @@ -1,4 +1,4 @@ -// build-fail +//@ build-fail //~^ ERROR cycle detected when computing layout of `Foo<()>` trait A { type Assoc: ?Sized; } diff --git a/tests/ui/sized/recursive-type-coercion-from-never.rs b/tests/ui/sized/recursive-type-coercion-from-never.rs index a1b65463731..7bd87ae06c5 100644 --- a/tests/ui/sized/recursive-type-coercion-from-never.rs +++ b/tests/ui/sized/recursive-type-coercion-from-never.rs @@ -1,4 +1,4 @@ -// build-fail +//@ build-fail //~^ ERROR cycle detected when computing layout of `Foo<()>` // Regression test for a stack overflow: https://github.com/rust-lang/rust/issues/113197 diff --git a/tests/ui/sized/recursive-type-pass.rs b/tests/ui/sized/recursive-type-pass.rs index cd6805967e5..bffca39ffcb 100644 --- a/tests/ui/sized/recursive-type-pass.rs +++ b/tests/ui/sized/recursive-type-pass.rs @@ -1,4 +1,4 @@ -// check-pass +//@ check-pass trait A { type Assoc; } impl A for () { diff --git a/tests/ui/span/borrowck-ref-into-rvalue.fixed b/tests/ui/span/borrowck-ref-into-rvalue.fixed index 51f65e5345d..9521a53e6bc 100644 --- a/tests/ui/span/borrowck-ref-into-rvalue.fixed +++ b/tests/ui/span/borrowck-ref-into-rvalue.fixed @@ -1,4 +1,4 @@ -// run-rustfix +//@ run-rustfix fn main() { let msg; let binding = Some("Hello".to_string()); diff --git a/tests/ui/span/borrowck-ref-into-rvalue.rs b/tests/ui/span/borrowck-ref-into-rvalue.rs index 7b09fad927f..1002e20987c 100644 --- a/tests/ui/span/borrowck-ref-into-rvalue.rs +++ b/tests/ui/span/borrowck-ref-into-rvalue.rs @@ -1,4 +1,4 @@ -// run-rustfix +//@ run-rustfix fn main() { let msg; match Some("Hello".to_string()) { diff --git a/tests/ui/span/drop-location-span-error-rust-2021-incompatible-closure-captures-93117.rs b/tests/ui/span/drop-location-span-error-rust-2021-incompatible-closure-captures-93117.rs index f20024e759a..4522a627053 100644 --- a/tests/ui/span/drop-location-span-error-rust-2021-incompatible-closure-captures-93117.rs +++ b/tests/ui/span/drop-location-span-error-rust-2021-incompatible-closure-captures-93117.rs @@ -1,4 +1,4 @@ -// compile-flags: -Wrust-2021-incompatible-closure-captures +//@ compile-flags: -Wrust-2021-incompatible-closure-captures pub struct A {} diff --git a/tests/ui/span/issue-107353.rs b/tests/ui/span/issue-107353.rs index 943f7f0eb19..6919c95058f 100644 --- a/tests/ui/span/issue-107353.rs +++ b/tests/ui/span/issue-107353.rs @@ -1,7 +1,7 @@ // ignore-tidy-linelength // Verify that span interning correctly handles having a span of exactly MAX_LEN length. -// compile-flags: --crate-type=lib -// check-pass +//@ compile-flags: --crate-type=lib +//@ check-pass #![allow(dead_code)] fn a<'a, T>() -> &'a T { diff --git a/tests/ui/span/issue-15480.fixed b/tests/ui/span/issue-15480.fixed index e6d1a4dd328..4a86769cc79 100644 --- a/tests/ui/span/issue-15480.fixed +++ b/tests/ui/span/issue-15480.fixed @@ -1,4 +1,4 @@ -// run-rustfix +//@ run-rustfix fn id(x: T) -> T { x } fn main() { diff --git a/tests/ui/span/issue-15480.rs b/tests/ui/span/issue-15480.rs index 916ce4b1edb..753961d7186 100644 --- a/tests/ui/span/issue-15480.rs +++ b/tests/ui/span/issue-15480.rs @@ -1,4 +1,4 @@ -// run-rustfix +//@ run-rustfix fn id(x: T) -> T { x } fn main() { diff --git a/tests/ui/span/issue-24690.rs b/tests/ui/span/issue-24690.rs index 2b7349c5503..a0d35513394 100644 --- a/tests/ui/span/issue-24690.rs +++ b/tests/ui/span/issue-24690.rs @@ -1,7 +1,7 @@ //! A test to ensure that helpful `note` messages aren't emitted more often //! than necessary. -// check-pass +//@ check-pass // Although there are three warnings, we should only get two "lint level defined // here" notes pointing at the `warnings` span, one for each error type. diff --git a/tests/ui/span/issue-42234-unknown-receiver-type.rs b/tests/ui/span/issue-42234-unknown-receiver-type.rs index fd53121204c..53d1e3eed82 100644 --- a/tests/ui/span/issue-42234-unknown-receiver-type.rs +++ b/tests/ui/span/issue-42234-unknown-receiver-type.rs @@ -1,4 +1,4 @@ -// revisions: full generic_arg +//@ revisions: full generic_arg #![cfg_attr(generic_arg, feature(generic_arg_infer))] // When the type of a method call's receiver is unknown, the span should point diff --git a/tests/ui/span/issue-71363.rs b/tests/ui/span/issue-71363.rs index 8014f379625..f186e0526a4 100644 --- a/tests/ui/span/issue-71363.rs +++ b/tests/ui/span/issue-71363.rs @@ -1,4 +1,4 @@ -// compile-flags: -Z ui-testing=no +//@ compile-flags: -Z ui-testing=no struct MyError; impl std::error::Error for MyError {} diff --git a/tests/ui/span/lint-unused-unsafe.rs b/tests/ui/span/lint-unused-unsafe.rs index 94bdd114007..f008b0abe9f 100644 --- a/tests/ui/span/lint-unused-unsafe.rs +++ b/tests/ui/span/lint-unused-unsafe.rs @@ -1,7 +1,7 @@ // Exercise the unused_unsafe attribute in some positive and negative cases -// edition:2018 +//@ edition:2018 #![allow(dead_code)] #![deny(unused_unsafe)] diff --git a/tests/ui/span/macro-span-replacement.rs b/tests/ui/span/macro-span-replacement.rs index 66973c58d35..e6fcfa4c709 100644 --- a/tests/ui/span/macro-span-replacement.rs +++ b/tests/ui/span/macro-span-replacement.rs @@ -1,4 +1,4 @@ -// check-pass +//@ check-pass #![warn(unused)] diff --git a/tests/ui/span/multispan-import-lint.rs b/tests/ui/span/multispan-import-lint.rs index 3ce7f2ce35d..3bfb8f89aff 100644 --- a/tests/ui/span/multispan-import-lint.rs +++ b/tests/ui/span/multispan-import-lint.rs @@ -1,4 +1,4 @@ -// check-pass +//@ check-pass #![warn(unused)] diff --git a/tests/ui/span/transitive-dep-span.rs b/tests/ui/span/transitive-dep-span.rs index 2d46f74ad9b..deaf0738e24 100644 --- a/tests/ui/span/transitive-dep-span.rs +++ b/tests/ui/span/transitive-dep-span.rs @@ -4,9 +4,9 @@ // The order of these next lines is important, since we need // transitive_dep_two.rs to be able to reference transitive_dep_three.rs // -// aux-build: transitive_dep_three.rs -// aux-build: transitive_dep_two.rs -// compile-flags: -Z macro-backtrace +//@ aux-build: transitive_dep_three.rs +//@ aux-build: transitive_dep_two.rs +//@ compile-flags: -Z macro-backtrace extern crate transitive_dep_two; diff --git a/tests/ui/span/unused-warning-point-at-identifier.rs b/tests/ui/span/unused-warning-point-at-identifier.rs index af4834503cd..8a075850063 100644 --- a/tests/ui/span/unused-warning-point-at-identifier.rs +++ b/tests/ui/span/unused-warning-point-at-identifier.rs @@ -1,4 +1,4 @@ -// run-pass +//@ run-pass #![warn(unused)] diff --git a/tests/ui/specialization/assoc-ty-graph-cycle.rs b/tests/ui/specialization/assoc-ty-graph-cycle.rs index bec8cc187b4..083b03028f0 100644 --- a/tests/ui/specialization/assoc-ty-graph-cycle.rs +++ b/tests/ui/specialization/assoc-ty-graph-cycle.rs @@ -1,4 +1,4 @@ -// check-pass +//@ check-pass // Make sure we don't crash with a cycle error during coherence. diff --git a/tests/ui/specialization/const_trait_impl.rs b/tests/ui/specialization/const_trait_impl.rs index b1ec58c3df3..d842601a6b7 100644 --- a/tests/ui/specialization/const_trait_impl.rs +++ b/tests/ui/specialization/const_trait_impl.rs @@ -1,4 +1,4 @@ -// known-bug: #110395 +//@ known-bug: #110395 #![feature(const_trait_impl, min_specialization, rustc_attrs)] diff --git a/tests/ui/specialization/cross-crate-defaults.rs b/tests/ui/specialization/cross-crate-defaults.rs index fc28d0c815e..c9204461e20 100644 --- a/tests/ui/specialization/cross-crate-defaults.rs +++ b/tests/ui/specialization/cross-crate-defaults.rs @@ -1,6 +1,6 @@ -// run-pass +//@ run-pass -// aux-build:cross_crates_defaults.rs +//@ aux-build:cross_crates_defaults.rs #![feature(specialization)] //~ WARN the feature `specialization` is incomplete diff --git a/tests/ui/specialization/ctfe/default-assoc-const.rs b/tests/ui/specialization/ctfe/default-assoc-const.rs index bb3b735caa3..083aedece51 100644 --- a/tests/ui/specialization/ctfe/default-assoc-const.rs +++ b/tests/ui/specialization/ctfe/default-assoc-const.rs @@ -1,5 +1,5 @@ //! Regression test for revealing associated types through specialization during const eval. -// check-pass +//@ check-pass #![feature(specialization)] //~^ WARNING the feature `specialization` is incomplete and may not be safe to use diff --git a/tests/ui/specialization/ctfe/default-assoc-type.rs b/tests/ui/specialization/ctfe/default-assoc-type.rs index 3624a0f160c..0ceba2dc497 100644 --- a/tests/ui/specialization/ctfe/default-assoc-type.rs +++ b/tests/ui/specialization/ctfe/default-assoc-type.rs @@ -1,6 +1,6 @@ //! Regression test showing that we can access associated types during const eval, //! even if they rely on specialization. -// check-pass +//@ check-pass #![feature(specialization)] //~^ WARNING the feature `specialization` is incomplete and may not be safe to use diff --git a/tests/ui/specialization/defaultimpl/allowed-cross-crate.rs b/tests/ui/specialization/defaultimpl/allowed-cross-crate.rs index 5d67160eb96..697a62ca547 100644 --- a/tests/ui/specialization/defaultimpl/allowed-cross-crate.rs +++ b/tests/ui/specialization/defaultimpl/allowed-cross-crate.rs @@ -1,9 +1,9 @@ -// run-pass +//@ run-pass #![allow(dead_code)] #![allow(unused_variables)] #![allow(unused_imports)] -// aux-build:go_trait.rs +//@ aux-build:go_trait.rs #![feature(specialization)] //~ WARN the feature `specialization` is incomplete diff --git a/tests/ui/specialization/defaultimpl/out-of-order.rs b/tests/ui/specialization/defaultimpl/out-of-order.rs index 94b3905178f..2274946df69 100644 --- a/tests/ui/specialization/defaultimpl/out-of-order.rs +++ b/tests/ui/specialization/defaultimpl/out-of-order.rs @@ -1,4 +1,4 @@ -// check-pass +//@ check-pass // Test that you can list the more specific impl before the more general one. diff --git a/tests/ui/specialization/defaultimpl/overlap-projection.rs b/tests/ui/specialization/defaultimpl/overlap-projection.rs index 46f54c466a8..da466e6671c 100644 --- a/tests/ui/specialization/defaultimpl/overlap-projection.rs +++ b/tests/ui/specialization/defaultimpl/overlap-projection.rs @@ -1,4 +1,4 @@ -// check-pass +//@ check-pass // Test that impls on projected self types can resolve overlap, even when the // projections involve specialization, so long as the associated type is diff --git a/tests/ui/specialization/defaultimpl/projection.rs b/tests/ui/specialization/defaultimpl/projection.rs index f19c55b043b..7a77c76a5ac 100644 --- a/tests/ui/specialization/defaultimpl/projection.rs +++ b/tests/ui/specialization/defaultimpl/projection.rs @@ -1,4 +1,4 @@ -// run-pass +//@ run-pass #![allow(dead_code)] #![feature(specialization)] //~ WARN the feature `specialization` is incomplete diff --git a/tests/ui/specialization/defaultimpl/specialization-trait-item-not-implemented-rpass.rs b/tests/ui/specialization/defaultimpl/specialization-trait-item-not-implemented-rpass.rs index 89fef5b5ef9..eb4ecf24a30 100644 --- a/tests/ui/specialization/defaultimpl/specialization-trait-item-not-implemented-rpass.rs +++ b/tests/ui/specialization/defaultimpl/specialization-trait-item-not-implemented-rpass.rs @@ -1,4 +1,4 @@ -// run-pass +//@ run-pass // Tests that we can combine a default impl that supplies one method with a // full impl that supplies the other, and they can invoke one another. diff --git a/tests/ui/specialization/issue-35376.rs b/tests/ui/specialization/issue-35376.rs index cc35213b93d..786f22967eb 100644 --- a/tests/ui/specialization/issue-35376.rs +++ b/tests/ui/specialization/issue-35376.rs @@ -1,4 +1,4 @@ -// check-pass +//@ check-pass #![feature(specialization)] //~^ WARN the feature `specialization` is incomplete diff --git a/tests/ui/specialization/issue-36804.rs b/tests/ui/specialization/issue-36804.rs index 89350602f36..5ed0c1aaf20 100644 --- a/tests/ui/specialization/issue-36804.rs +++ b/tests/ui/specialization/issue-36804.rs @@ -1,4 +1,4 @@ -// check-pass +//@ check-pass #![feature(specialization)] //~ WARN the feature `specialization` is incomplete pub struct Cloned(I); diff --git a/tests/ui/specialization/issue-38091-2.rs b/tests/ui/specialization/issue-38091-2.rs index 9ed0b240d0a..da276031378 100644 --- a/tests/ui/specialization/issue-38091-2.rs +++ b/tests/ui/specialization/issue-38091-2.rs @@ -1,4 +1,4 @@ -// build-fail +//@ build-fail //~^ ERROR overflow evaluating the requirement `i32: Check` #![feature(specialization)] diff --git a/tests/ui/specialization/issue-39618.rs b/tests/ui/specialization/issue-39618.rs index 72630ee9c70..5b9b012e665 100644 --- a/tests/ui/specialization/issue-39618.rs +++ b/tests/ui/specialization/issue-39618.rs @@ -2,7 +2,7 @@ // FIXME(JohnTitor): Centril pointed out this looks suspicions, we should revisit here. // More context: https://github.com/rust-lang/rust/pull/69192#discussion_r379846796 -// check-pass +//@ check-pass #![feature(specialization)] //~ WARN the feature `specialization` is incomplete diff --git a/tests/ui/specialization/issue-40582.rs b/tests/ui/specialization/issue-40582.rs index 9805933553d..61b8c4cd295 100644 --- a/tests/ui/specialization/issue-40582.rs +++ b/tests/ui/specialization/issue-40582.rs @@ -1,5 +1,5 @@ -// check-pass -// known-bug: #40582 +//@ check-pass +//@ known-bug: #40582 // Should fail. Should not be possible to implement `make_static`. diff --git a/tests/ui/specialization/issue-43037.rs b/tests/ui/specialization/issue-43037.rs index a1e3f998b23..fb9a581369e 100644 --- a/tests/ui/specialization/issue-43037.rs +++ b/tests/ui/specialization/issue-43037.rs @@ -1,4 +1,4 @@ -// revisions: current negative +//@ revisions: current negative #![feature(specialization)] #![cfg_attr(negative, feature(with_negative_coherence))] #![allow(incomplete_features)] diff --git a/tests/ui/specialization/issue-45814.rs b/tests/ui/specialization/issue-45814.rs index 832d734d945..233583bd89b 100644 --- a/tests/ui/specialization/issue-45814.rs +++ b/tests/ui/specialization/issue-45814.rs @@ -1,4 +1,4 @@ -// revisions: current negative +//@ revisions: current negative #![feature(specialization)] #![cfg_attr(negative, feature(with_negative_coherence))] #![allow(incomplete_features)] diff --git a/tests/ui/specialization/issue-50452.rs b/tests/ui/specialization/issue-50452.rs index 29fc12066e8..c379825feda 100644 --- a/tests/ui/specialization/issue-50452.rs +++ b/tests/ui/specialization/issue-50452.rs @@ -1,4 +1,4 @@ -// run-pass +//@ run-pass #![feature(specialization)] //~ WARN the feature `specialization` is incomplete diff --git a/tests/ui/specialization/issue-63716-parse-async.rs b/tests/ui/specialization/issue-63716-parse-async.rs index 10f185c3351..3314b4e20f9 100644 --- a/tests/ui/specialization/issue-63716-parse-async.rs +++ b/tests/ui/specialization/issue-63716-parse-async.rs @@ -1,8 +1,8 @@ // Ensure that `default async fn` will parse. // See issue #63716 for details. -// check-pass -// edition:2018 +//@ check-pass +//@ edition:2018 #![feature(specialization)] //~ WARN the feature `specialization` is incomplete diff --git a/tests/ui/specialization/issue-70442.rs b/tests/ui/specialization/issue-70442.rs index d41b5355c2c..fb82b0db09b 100644 --- a/tests/ui/specialization/issue-70442.rs +++ b/tests/ui/specialization/issue-70442.rs @@ -1,6 +1,6 @@ #![feature(specialization)] //~ WARN the feature `specialization` is incomplete -// check-pass +//@ check-pass trait Trait { type Assoc; diff --git a/tests/ui/specialization/min_specialization/allow_internal_unstable.rs b/tests/ui/specialization/min_specialization/allow_internal_unstable.rs index 8f3677d9769..efc509c5eac 100644 --- a/tests/ui/specialization/min_specialization/allow_internal_unstable.rs +++ b/tests/ui/specialization/min_specialization/allow_internal_unstable.rs @@ -1,11 +1,11 @@ -// check-pass +//@ check-pass // test for #119950 -// compile-flags: --crate-type lib +//@ compile-flags: --crate-type lib #![allow(internal_features)] #![feature(allow_internal_unstable)] -// aux-build:specialization-trait.rs +//@ aux-build:specialization-trait.rs extern crate specialization_trait; #[allow_internal_unstable(min_specialization)] diff --git a/tests/ui/specialization/min_specialization/impl_specialization_trait.rs b/tests/ui/specialization/min_specialization/impl_specialization_trait.rs index 723ed71c3e9..efc8491de31 100644 --- a/tests/ui/specialization/min_specialization/impl_specialization_trait.rs +++ b/tests/ui/specialization/min_specialization/impl_specialization_trait.rs @@ -2,7 +2,7 @@ // gate-test-min_specialization -// aux-build:specialization-trait.rs +//@ aux-build:specialization-trait.rs extern crate specialization_trait; diff --git a/tests/ui/specialization/min_specialization/implcit-well-formed-bounds.rs b/tests/ui/specialization/min_specialization/implcit-well-formed-bounds.rs index 98d7f919435..403ab182674 100644 --- a/tests/ui/specialization/min_specialization/implcit-well-formed-bounds.rs +++ b/tests/ui/specialization/min_specialization/implcit-well-formed-bounds.rs @@ -1,7 +1,7 @@ // Test that specializing on the well-formed predicates of the trait and // self-type of an impl is allowed. -// check-pass +//@ check-pass #![feature(min_specialization)] diff --git a/tests/ui/specialization/min_specialization/spec-iter.rs b/tests/ui/specialization/min_specialization/spec-iter.rs index e17e9dd5f13..f579cd02ad6 100644 --- a/tests/ui/specialization/min_specialization/spec-iter.rs +++ b/tests/ui/specialization/min_specialization/spec-iter.rs @@ -1,7 +1,7 @@ // Check that we can specialize on a concrete iterator type. This requires us // to consider which parameters in the parent impl are constrained. -// check-pass +//@ check-pass #![feature(min_specialization)] diff --git a/tests/ui/specialization/min_specialization/spec-reference.rs b/tests/ui/specialization/min_specialization/spec-reference.rs index 377889e2cca..f6cf6b21b0f 100644 --- a/tests/ui/specialization/min_specialization/spec-reference.rs +++ b/tests/ui/specialization/min_specialization/spec-reference.rs @@ -1,6 +1,6 @@ // Check that lifetime parameters are allowed in specializing impls. -// check-pass +//@ check-pass #![feature(min_specialization)] diff --git a/tests/ui/specialization/min_specialization/specialize-associated-type.rs b/tests/ui/specialization/min_specialization/specialize-associated-type.rs index c4960b0c28e..20a5a7476c7 100644 --- a/tests/ui/specialization/min_specialization/specialize-associated-type.rs +++ b/tests/ui/specialization/min_specialization/specialize-associated-type.rs @@ -1,6 +1,6 @@ // Another regression test for #109815. -// check-pass +//@ check-pass #![feature(min_specialization)] #![feature(rustc_attrs)] diff --git a/tests/ui/specialization/min_specialization/specialize_on_marker.rs b/tests/ui/specialization/min_specialization/specialize_on_marker.rs index 4219bd13b18..f7bc057d3ba 100644 --- a/tests/ui/specialization/min_specialization/specialize_on_marker.rs +++ b/tests/ui/specialization/min_specialization/specialize_on_marker.rs @@ -1,7 +1,7 @@ // Test that specializing on a `rustc_unsafe_specialization_marker` trait is // allowed. -// check-pass +//@ check-pass #![feature(min_specialization)] #![feature(rustc_attrs)] diff --git a/tests/ui/specialization/min_specialization/specialize_on_spec_trait.rs b/tests/ui/specialization/min_specialization/specialize_on_spec_trait.rs index abbab5c23db..4d67f0a30e9 100644 --- a/tests/ui/specialization/min_specialization/specialize_on_spec_trait.rs +++ b/tests/ui/specialization/min_specialization/specialize_on_spec_trait.rs @@ -1,6 +1,6 @@ // Test that specializing on a `rustc_specialization_trait` trait is allowed. -// check-pass +//@ check-pass #![feature(min_specialization)] #![feature(rustc_attrs)] diff --git a/tests/ui/specialization/soundness/partial_eq_range_inclusive.rs b/tests/ui/specialization/soundness/partial_eq_range_inclusive.rs index 923dec892e0..e53cdfdf705 100644 --- a/tests/ui/specialization/soundness/partial_eq_range_inclusive.rs +++ b/tests/ui/specialization/soundness/partial_eq_range_inclusive.rs @@ -1,4 +1,4 @@ -// run-pass +//@ run-pass use std::cell::RefCell; use std::cmp::Ordering; diff --git a/tests/ui/specialization/soundness/partial_ord_slice.rs b/tests/ui/specialization/soundness/partial_ord_slice.rs index b9e80a48d33..7fd0d386a74 100644 --- a/tests/ui/specialization/soundness/partial_ord_slice.rs +++ b/tests/ui/specialization/soundness/partial_ord_slice.rs @@ -1,6 +1,6 @@ // Check that we aren't using unsound specialization in slice comparisons. -// run-pass +//@ run-pass use std::cell::Cell; use std::cmp::Ordering; diff --git a/tests/ui/specialization/specialization-allowed-cross-crate.rs b/tests/ui/specialization/specialization-allowed-cross-crate.rs index 5d67160eb96..697a62ca547 100644 --- a/tests/ui/specialization/specialization-allowed-cross-crate.rs +++ b/tests/ui/specialization/specialization-allowed-cross-crate.rs @@ -1,9 +1,9 @@ -// run-pass +//@ run-pass #![allow(dead_code)] #![allow(unused_variables)] #![allow(unused_imports)] -// aux-build:go_trait.rs +//@ aux-build:go_trait.rs #![feature(specialization)] //~ WARN the feature `specialization` is incomplete diff --git a/tests/ui/specialization/specialization-assoc-fns.rs b/tests/ui/specialization/specialization-assoc-fns.rs index cbfcb4719f6..75f0b0d2485 100644 --- a/tests/ui/specialization/specialization-assoc-fns.rs +++ b/tests/ui/specialization/specialization-assoc-fns.rs @@ -1,4 +1,4 @@ -// run-pass +//@ run-pass // Test that non-method associated functions can be specialized diff --git a/tests/ui/specialization/specialization-basics.rs b/tests/ui/specialization/specialization-basics.rs index 721c934dbfa..dc320b2b91f 100644 --- a/tests/ui/specialization/specialization-basics.rs +++ b/tests/ui/specialization/specialization-basics.rs @@ -1,4 +1,4 @@ -// run-pass +//@ run-pass #![feature(specialization)] //~ WARN the feature `specialization` is incomplete diff --git a/tests/ui/specialization/specialization-cross-crate-no-gate.rs b/tests/ui/specialization/specialization-cross-crate-no-gate.rs index f744b16de7a..ec14c75f790 100644 --- a/tests/ui/specialization/specialization-cross-crate-no-gate.rs +++ b/tests/ui/specialization/specialization-cross-crate-no-gate.rs @@ -1,8 +1,8 @@ -// run-pass +//@ run-pass // Test that specialization works even if only the upstream crate enables it -// aux-build:specialization_cross_crate.rs +//@ aux-build:specialization_cross_crate.rs extern crate specialization_cross_crate; diff --git a/tests/ui/specialization/specialization-cross-crate.rs b/tests/ui/specialization/specialization-cross-crate.rs index 4b2ac07378d..6daf48b6d9b 100644 --- a/tests/ui/specialization/specialization-cross-crate.rs +++ b/tests/ui/specialization/specialization-cross-crate.rs @@ -1,6 +1,6 @@ -// run-pass +//@ run-pass -// aux-build:specialization_cross_crate.rs +//@ aux-build:specialization_cross_crate.rs #![feature(specialization)] //~ WARN the feature `specialization` is incomplete diff --git a/tests/ui/specialization/specialization-default-items-drop-coherence.rs b/tests/ui/specialization/specialization-default-items-drop-coherence.rs index 87eb5d90def..fad041f2ee1 100644 --- a/tests/ui/specialization/specialization-default-items-drop-coherence.rs +++ b/tests/ui/specialization/specialization-default-items-drop-coherence.rs @@ -1,8 +1,8 @@ -// revisions: classic coherence next -//[next] compile-flags: -Znext-solver -//[coherence] compile-flags: -Znext-solver=coherence -//[classic] check-pass -//[classic] known-bug: #105782 +//@ revisions: classic coherence next +//@[next] compile-flags: -Znext-solver +//@[coherence] compile-flags: -Znext-solver=coherence +//@[classic] check-pass +//@[classic] known-bug: #105782 // Should fail. Default items completely drop candidates instead of ambiguity, // which is unsound during coherence, since coherence requires completeness. diff --git a/tests/ui/specialization/specialization-default-methods.rs b/tests/ui/specialization/specialization-default-methods.rs index dcf68afa945..7058c039e46 100644 --- a/tests/ui/specialization/specialization-default-methods.rs +++ b/tests/ui/specialization/specialization-default-methods.rs @@ -1,4 +1,4 @@ -// run-pass +//@ run-pass #![feature(specialization)] //~ WARN the feature `specialization` is incomplete diff --git a/tests/ui/specialization/specialization-on-projection.rs b/tests/ui/specialization/specialization-on-projection.rs index be8dcc4232e..876439ca0a7 100644 --- a/tests/ui/specialization/specialization-on-projection.rs +++ b/tests/ui/specialization/specialization-on-projection.rs @@ -1,4 +1,4 @@ -// run-pass +//@ run-pass #![allow(dead_code)] #![feature(specialization)] //~ WARN the feature `specialization` is incomplete diff --git a/tests/ui/specialization/specialization-out-of-order.rs b/tests/ui/specialization/specialization-out-of-order.rs index 66e6c3c9eab..4f4d40f43d4 100644 --- a/tests/ui/specialization/specialization-out-of-order.rs +++ b/tests/ui/specialization/specialization-out-of-order.rs @@ -1,4 +1,4 @@ -// check-pass +//@ check-pass // Test that you can list the more specific impl before the more general one. diff --git a/tests/ui/specialization/specialization-overlap-projection.rs b/tests/ui/specialization/specialization-overlap-projection.rs index cd21eab24c0..66951b9d50c 100644 --- a/tests/ui/specialization/specialization-overlap-projection.rs +++ b/tests/ui/specialization/specialization-overlap-projection.rs @@ -1,4 +1,4 @@ -// check-pass +//@ check-pass // Test that impls on projected self types can resolve overlap, even when the // projections involve specialization, so long as the associated type is diff --git a/tests/ui/specialization/specialization-projection-alias.rs b/tests/ui/specialization/specialization-projection-alias.rs index f1f0b47bb65..73d6115af00 100644 --- a/tests/ui/specialization/specialization-projection-alias.rs +++ b/tests/ui/specialization/specialization-projection-alias.rs @@ -1,4 +1,4 @@ -// run-pass +//@ run-pass #![allow(dead_code)] #![allow(unused_variables)] diff --git a/tests/ui/specialization/specialization-projection.rs b/tests/ui/specialization/specialization-projection.rs index 78afe7a9495..b3efa6f39dd 100644 --- a/tests/ui/specialization/specialization-projection.rs +++ b/tests/ui/specialization/specialization-projection.rs @@ -1,4 +1,4 @@ -// run-pass +//@ run-pass #![allow(dead_code)] #![feature(specialization)] //~ WARN the feature `specialization` is incomplete diff --git a/tests/ui/specialization/specialization-supertraits.rs b/tests/ui/specialization/specialization-supertraits.rs index d0c9dbb1d40..cb4cfef4bdd 100644 --- a/tests/ui/specialization/specialization-supertraits.rs +++ b/tests/ui/specialization/specialization-supertraits.rs @@ -1,4 +1,4 @@ -// check-pass +//@ check-pass #![feature(specialization)] //~ WARN the feature `specialization` is incomplete diff --git a/tests/ui/specialization/specialization-translate-projections-with-lifetimes.rs b/tests/ui/specialization/specialization-translate-projections-with-lifetimes.rs index f06afc8ba41..75d9a0d8ad0 100644 --- a/tests/ui/specialization/specialization-translate-projections-with-lifetimes.rs +++ b/tests/ui/specialization/specialization-translate-projections-with-lifetimes.rs @@ -1,4 +1,4 @@ -// run-pass +//@ run-pass #![feature(specialization)] //~ WARN the feature `specialization` is incomplete diff --git a/tests/ui/specialization/specialization-translate-projections-with-params.rs b/tests/ui/specialization/specialization-translate-projections-with-params.rs index 62d63590a66..330f51877ab 100644 --- a/tests/ui/specialization/specialization-translate-projections-with-params.rs +++ b/tests/ui/specialization/specialization-translate-projections-with-params.rs @@ -1,4 +1,4 @@ -// run-pass +//@ run-pass // Ensure that provided items are inherited properly even when impls vary in // type parameters *and* rely on projections, and the type parameters are input diff --git a/tests/ui/specialization/specialization-translate-projections.rs b/tests/ui/specialization/specialization-translate-projections.rs index a9753376135..01c7619b065 100644 --- a/tests/ui/specialization/specialization-translate-projections.rs +++ b/tests/ui/specialization/specialization-translate-projections.rs @@ -1,4 +1,4 @@ -// run-pass +//@ run-pass // Ensure that provided items are inherited properly even when impls vary in // type parameters *and* rely on projections. diff --git a/tests/ui/specialization/transmute-specialization.rs b/tests/ui/specialization/transmute-specialization.rs index 499334d983b..a896c14e637 100644 --- a/tests/ui/specialization/transmute-specialization.rs +++ b/tests/ui/specialization/transmute-specialization.rs @@ -1,4 +1,4 @@ -// run-pass +//@ run-pass #![feature(specialization)] //~ WARN the feature `specialization` is incomplete diff --git a/tests/ui/sse2.rs b/tests/ui/sse2.rs index 172f4079821..fa6d79713b4 100644 --- a/tests/ui/sse2.rs +++ b/tests/ui/sse2.rs @@ -1,4 +1,4 @@ -// run-pass +//@ run-pass #![allow(stable_features)] #![feature(cfg_target_feature)] diff --git a/tests/ui/stability-attribute/allow-unstable-reexport.rs b/tests/ui/stability-attribute/allow-unstable-reexport.rs index 937913954a7..d2f1593c31a 100644 --- a/tests/ui/stability-attribute/allow-unstable-reexport.rs +++ b/tests/ui/stability-attribute/allow-unstable-reexport.rs @@ -1,8 +1,8 @@ // Allow an unstable re-export without requiring a feature gate. // #94972 -// aux-build:lint-stability.rs -// aux-build:lint-stability-reexport.rs +//@ aux-build:lint-stability.rs +//@ aux-build:lint-stability-reexport.rs #![feature(staged_api)] #![stable(feature = "lint_stability", since = "1.0.0")] diff --git a/tests/ui/stability-attribute/allowed-through-unstable.rs b/tests/ui/stability-attribute/allowed-through-unstable.rs index ff0228e4da6..6bce5c87ddb 100644 --- a/tests/ui/stability-attribute/allowed-through-unstable.rs +++ b/tests/ui/stability-attribute/allowed-through-unstable.rs @@ -1,6 +1,6 @@ // Test for new `#[rustc_allowed_through_unstable_modules]` attribute // -// aux-build:allowed-through-unstable-core.rs +//@ aux-build:allowed-through-unstable-core.rs #![crate_type = "lib"] extern crate allowed_through_unstable_core; diff --git a/tests/ui/stability-attribute/const-stability-attribute-implies-no-feature.rs b/tests/ui/stability-attribute/const-stability-attribute-implies-no-feature.rs index 47e8d2b3609..2ff5ec6f225 100644 --- a/tests/ui/stability-attribute/const-stability-attribute-implies-no-feature.rs +++ b/tests/ui/stability-attribute/const-stability-attribute-implies-no-feature.rs @@ -1,4 +1,4 @@ -// aux-build:const-stability-attribute-implies.rs +//@ aux-build:const-stability-attribute-implies.rs #![crate_type = "lib"] // Tests that despite the `const_foobar` feature being implied by now-stable feature `const_foo`, diff --git a/tests/ui/stability-attribute/const-stability-attribute-implies-using-stable.rs b/tests/ui/stability-attribute/const-stability-attribute-implies-using-stable.rs index ffaa171d8a5..bc15710b025 100644 --- a/tests/ui/stability-attribute/const-stability-attribute-implies-using-stable.rs +++ b/tests/ui/stability-attribute/const-stability-attribute-implies-using-stable.rs @@ -1,4 +1,4 @@ -// aux-build:const-stability-attribute-implies.rs +//@ aux-build:const-stability-attribute-implies.rs #![crate_type = "lib"] #![deny(stable_features)] #![feature(const_foo)] diff --git a/tests/ui/stability-attribute/const-stability-attribute-implies-using-unstable.rs b/tests/ui/stability-attribute/const-stability-attribute-implies-using-unstable.rs index 2061c5c75bd..b06a6471587 100644 --- a/tests/ui/stability-attribute/const-stability-attribute-implies-using-unstable.rs +++ b/tests/ui/stability-attribute/const-stability-attribute-implies-using-unstable.rs @@ -1,4 +1,4 @@ -// aux-build:const-stability-attribute-implies.rs +//@ aux-build:const-stability-attribute-implies.rs #![crate_type = "lib"] #![deny(stable_features)] #![feature(const_foo)] diff --git a/tests/ui/stability-attribute/ctor-stability.rs b/tests/ui/stability-attribute/ctor-stability.rs index fcab0cb1099..db6df9a79d8 100644 --- a/tests/ui/stability-attribute/ctor-stability.rs +++ b/tests/ui/stability-attribute/ctor-stability.rs @@ -1,5 +1,5 @@ -// aux-build:ctor-stability.rs -// check-pass +//@ aux-build:ctor-stability.rs +//@ check-pass extern crate ctor_stability; diff --git a/tests/ui/stability-attribute/default-body-stability-err.rs b/tests/ui/stability-attribute/default-body-stability-err.rs index d1a3597687d..58451666859 100644 --- a/tests/ui/stability-attribute/default-body-stability-err.rs +++ b/tests/ui/stability-attribute/default-body-stability-err.rs @@ -1,4 +1,4 @@ -// aux-build:default_body.rs +//@ aux-build:default_body.rs #![crate_type = "lib"] extern crate default_body; diff --git a/tests/ui/stability-attribute/default-body-stability-ok-enables.rs b/tests/ui/stability-attribute/default-body-stability-ok-enables.rs index bdc7522f48d..6fdf1052e5b 100644 --- a/tests/ui/stability-attribute/default-body-stability-ok-enables.rs +++ b/tests/ui/stability-attribute/default-body-stability-ok-enables.rs @@ -1,5 +1,5 @@ -// check-pass -// aux-build:default_body.rs +//@ check-pass +//@ aux-build:default_body.rs #![crate_type = "lib"] #![feature(fun_default_body, eq_default_body, constant_default_body)] diff --git a/tests/ui/stability-attribute/default-body-stability-ok-impls.rs b/tests/ui/stability-attribute/default-body-stability-ok-impls.rs index b29d45256bf..ab30bd7b73b 100644 --- a/tests/ui/stability-attribute/default-body-stability-ok-impls.rs +++ b/tests/ui/stability-attribute/default-body-stability-ok-impls.rs @@ -1,5 +1,5 @@ -// check-pass -// aux-build:default_body.rs +//@ check-pass +//@ aux-build:default_body.rs #![crate_type = "lib"] extern crate default_body; diff --git a/tests/ui/stability-attribute/generics-default-stability-trait.rs b/tests/ui/stability-attribute/generics-default-stability-trait.rs index d436088e426..ba8ee143d4a 100644 --- a/tests/ui/stability-attribute/generics-default-stability-trait.rs +++ b/tests/ui/stability-attribute/generics-default-stability-trait.rs @@ -1,4 +1,4 @@ -// aux-build:unstable_generic_param.rs +//@ aux-build:unstable_generic_param.rs #![feature(unstable_default6)] extern crate unstable_generic_param; diff --git a/tests/ui/stability-attribute/generics-default-stability-where.rs b/tests/ui/stability-attribute/generics-default-stability-where.rs index 142de12e152..f8a2fb4873a 100644 --- a/tests/ui/stability-attribute/generics-default-stability-where.rs +++ b/tests/ui/stability-attribute/generics-default-stability-where.rs @@ -1,4 +1,4 @@ -// aux-build:unstable_generic_param.rs +//@ aux-build:unstable_generic_param.rs extern crate unstable_generic_param; diff --git a/tests/ui/stability-attribute/generics-default-stability.rs b/tests/ui/stability-attribute/generics-default-stability.rs index 300cc34d63d..abd45b651ee 100644 --- a/tests/ui/stability-attribute/generics-default-stability.rs +++ b/tests/ui/stability-attribute/generics-default-stability.rs @@ -1,4 +1,4 @@ -// aux-build:unstable_generic_param.rs +//@ aux-build:unstable_generic_param.rs #![feature(unstable_default6)] extern crate unstable_generic_param; diff --git a/tests/ui/stability-attribute/issue-109177.rs b/tests/ui/stability-attribute/issue-109177.rs index 6d052779c6d..52880a43bcc 100644 --- a/tests/ui/stability-attribute/issue-109177.rs +++ b/tests/ui/stability-attribute/issue-109177.rs @@ -1,4 +1,4 @@ -// aux-build: similar-unstable-method.rs +//@ aux-build: similar-unstable-method.rs extern crate similar_unstable_method; diff --git a/tests/ui/stability-attribute/issue-28075.rs b/tests/ui/stability-attribute/issue-28075.rs index 6b4ea46f361..8fc2ffe3dc9 100644 --- a/tests/ui/stability-attribute/issue-28075.rs +++ b/tests/ui/stability-attribute/issue-28075.rs @@ -1,6 +1,6 @@ // Unstable entities should be caught in import lists -// aux-build:lint-stability.rs +//@ aux-build:lint-stability.rs #![allow(warnings)] diff --git a/tests/ui/stability-attribute/issue-28388-3.rs b/tests/ui/stability-attribute/issue-28388-3.rs index 7ba99350121..2f61146f6e3 100644 --- a/tests/ui/stability-attribute/issue-28388-3.rs +++ b/tests/ui/stability-attribute/issue-28388-3.rs @@ -1,6 +1,6 @@ // Prefix in imports with empty braces should be resolved and checked privacy, stability, etc. -// aux-build:lint-stability.rs +//@ aux-build:lint-stability.rs extern crate lint_stability; diff --git a/tests/ui/stability-attribute/issue-99286-stable-intrinsics.rs b/tests/ui/stability-attribute/issue-99286-stable-intrinsics.rs index b9eee992266..b76603740ff 100644 --- a/tests/ui/stability-attribute/issue-99286-stable-intrinsics.rs +++ b/tests/ui/stability-attribute/issue-99286-stable-intrinsics.rs @@ -1,4 +1,4 @@ -// check-pass +//@ check-pass // // Regression test for issue #99286 // Tests that stabilized intrinsics are accessible diff --git a/tests/ui/stability-attribute/stability-attribute-implies-no-feature.rs b/tests/ui/stability-attribute/stability-attribute-implies-no-feature.rs index 947f9f73eff..47f885a43d6 100644 --- a/tests/ui/stability-attribute/stability-attribute-implies-no-feature.rs +++ b/tests/ui/stability-attribute/stability-attribute-implies-no-feature.rs @@ -1,4 +1,4 @@ -// aux-build:stability-attribute-implies.rs +//@ aux-build:stability-attribute-implies.rs // Tests that despite the `foobar` feature being implied by now-stable feature `foo`, if `foobar` // isn't allowed in this crate then an error will be emitted. diff --git a/tests/ui/stability-attribute/stability-attribute-implies-using-stable.rs b/tests/ui/stability-attribute/stability-attribute-implies-using-stable.rs index 1a2d8e271de..447ae744b53 100644 --- a/tests/ui/stability-attribute/stability-attribute-implies-using-stable.rs +++ b/tests/ui/stability-attribute/stability-attribute-implies-using-stable.rs @@ -1,4 +1,4 @@ -// aux-build:stability-attribute-implies.rs +//@ aux-build:stability-attribute-implies.rs #![deny(stable_features)] #![feature(foo)] //~^ ERROR the feature `foo` has been partially stabilized since 1.62.0 and is succeeded by the feature `foobar` diff --git a/tests/ui/stability-attribute/stability-attribute-implies-using-unstable.rs b/tests/ui/stability-attribute/stability-attribute-implies-using-unstable.rs index 3c73c5abf3b..7f380bc5440 100644 --- a/tests/ui/stability-attribute/stability-attribute-implies-using-unstable.rs +++ b/tests/ui/stability-attribute/stability-attribute-implies-using-unstable.rs @@ -1,4 +1,4 @@ -// aux-build:stability-attribute-implies.rs +//@ aux-build:stability-attribute-implies.rs #![deny(stable_features)] #![feature(foo)] //~^ ERROR the feature `foo` has been partially stabilized since 1.62.0 and is succeeded by the feature `foobar` diff --git a/tests/ui/stability-attribute/stability-attribute-issue-43027.rs b/tests/ui/stability-attribute/stability-attribute-issue-43027.rs index 810fbef7b38..532e888b045 100644 --- a/tests/ui/stability-attribute/stability-attribute-issue-43027.rs +++ b/tests/ui/stability-attribute/stability-attribute-issue-43027.rs @@ -1,4 +1,4 @@ -// check-pass +//@ check-pass #![feature(staged_api)] #![stable(feature = "test", since = "3.3.3")] diff --git a/tests/ui/stability-attribute/stability-attribute-issue.rs b/tests/ui/stability-attribute/stability-attribute-issue.rs index cda1aff133f..2d25c0c8bd7 100644 --- a/tests/ui/stability-attribute/stability-attribute-issue.rs +++ b/tests/ui/stability-attribute/stability-attribute-issue.rs @@ -1,4 +1,4 @@ -// aux-build:stability_attribute_issue.rs +//@ aux-build:stability_attribute_issue.rs #![deny(deprecated)] extern crate stability_attribute_issue; diff --git a/tests/ui/stability-attribute/stability-attribute-non-staged-force-unstable.rs b/tests/ui/stability-attribute/stability-attribute-non-staged-force-unstable.rs index f61acc8aac5..e7d3b67506a 100644 --- a/tests/ui/stability-attribute/stability-attribute-non-staged-force-unstable.rs +++ b/tests/ui/stability-attribute/stability-attribute-non-staged-force-unstable.rs @@ -1,4 +1,4 @@ -// compile-flags:-Zforce-unstable-if-unmarked +//@ compile-flags:-Zforce-unstable-if-unmarked #[unstable()] //~ ERROR: stability attributes may not be used #[stable()] //~ ERROR: stability attributes may not be used diff --git a/tests/ui/stability-attribute/stable-in-unstable.rs b/tests/ui/stability-attribute/stable-in-unstable.rs index 226367c3992..d10845d49a3 100644 --- a/tests/ui/stability-attribute/stable-in-unstable.rs +++ b/tests/ui/stability-attribute/stable-in-unstable.rs @@ -5,8 +5,8 @@ // This is necessary to support moving items from `std` into `core` or `alloc` unstably while still // exporting the original stable interface in `std`, such as moving `Error` into `core`. // -// aux-build:stable-in-unstable-core.rs -// aux-build:stable-in-unstable-std.rs +//@ aux-build:stable-in-unstable-core.rs +//@ aux-build:stable-in-unstable-std.rs #![crate_type = "lib"] extern crate stable_in_unstable_core; diff --git a/tests/ui/stable-addr-of.rs b/tests/ui/stable-addr-of.rs index 99839166e30..e330a4853ce 100644 --- a/tests/ui/stable-addr-of.rs +++ b/tests/ui/stable-addr-of.rs @@ -1,4 +1,4 @@ -// run-pass +//@ run-pass // Issue #2040 diff --git a/tests/ui/stable-mir-print/basic_function.rs b/tests/ui/stable-mir-print/basic_function.rs index 6394edcbb78..9b27a56dab1 100644 --- a/tests/ui/stable-mir-print/basic_function.rs +++ b/tests/ui/stable-mir-print/basic_function.rs @@ -1,6 +1,6 @@ -// compile-flags: -Z unpretty=stable-mir -Z mir-opt-level=3 -// check-pass -// only-x86_64 +//@ compile-flags: -Z unpretty=stable-mir -Z mir-opt-level=3 +//@ check-pass +//@ only-x86_64 fn foo(i:i32) -> i32 { i + 1 diff --git a/tests/ui/stack-protector/warn-stack-protector-unsupported.rs b/tests/ui/stack-protector/warn-stack-protector-unsupported.rs index 6df5d3cd5ae..9205d4052ad 100644 --- a/tests/ui/stack-protector/warn-stack-protector-unsupported.rs +++ b/tests/ui/stack-protector/warn-stack-protector-unsupported.rs @@ -1,10 +1,10 @@ -// build-pass -// revisions: all strong basic -// compile-flags: --target nvptx64-nvidia-cuda -// needs-llvm-components: nvptx -// [all] compile-flags: -Z stack-protector=all -// [strong] compile-flags: -Z stack-protector=strong -// [basic] compile-flags: -Z stack-protector=basic +//@ build-pass +//@ revisions: all strong basic +//@ compile-flags: --target nvptx64-nvidia-cuda +//@ needs-llvm-components: nvptx +//@ [all] compile-flags: -Z stack-protector=all +//@ [strong] compile-flags: -Z stack-protector=strong +//@ [basic] compile-flags: -Z stack-protector=basic #![crate_type = "lib"] #![feature(no_core, lang_items)] diff --git a/tests/ui/static/auxiliary/static-priv-by-default.rs b/tests/ui/static/auxiliary/static-priv-by-default.rs index 41f368f46d6..f36f87c5736 100644 --- a/tests/ui/static/auxiliary/static-priv-by-default.rs +++ b/tests/ui/static/auxiliary/static-priv-by-default.rs @@ -1,4 +1,4 @@ -// aux-build:static_priv_by_default.rs +//@ aux-build:static_priv_by_default.rs extern crate static_priv_by_default; diff --git a/tests/ui/static/issue-24843.rs b/tests/ui/static/issue-24843.rs index 0b3397e210d..3ed2403aba6 100644 --- a/tests/ui/static/issue-24843.rs +++ b/tests/ui/static/issue-24843.rs @@ -1,5 +1,5 @@ -// aux-build: issue_24843.rs -// check-pass +//@ aux-build: issue_24843.rs +//@ check-pass extern crate issue_24843; diff --git a/tests/ui/static/issue-34194.rs b/tests/ui/static/issue-34194.rs index 6dce556e9e3..e3faa567b2a 100644 --- a/tests/ui/static/issue-34194.rs +++ b/tests/ui/static/issue-34194.rs @@ -1,4 +1,4 @@ -// build-pass +//@ build-pass #![allow(dead_code)] struct A { diff --git a/tests/ui/static/nested_item_main.rs b/tests/ui/static/nested_item_main.rs index 2fe00aede00..6793d8eae1b 100644 --- a/tests/ui/static/nested_item_main.rs +++ b/tests/ui/static/nested_item_main.rs @@ -1,5 +1,5 @@ -// run-pass -// aux-build:nested_item.rs +//@ run-pass +//@ aux-build:nested_item.rs extern crate nested_item; diff --git a/tests/ui/static/refer-to-other-statics-by-value.rs b/tests/ui/static/refer-to-other-statics-by-value.rs index 90f1980f858..4285b4cc0a9 100644 --- a/tests/ui/static/refer-to-other-statics-by-value.rs +++ b/tests/ui/static/refer-to-other-statics-by-value.rs @@ -1,4 +1,4 @@ -// run-pass +//@ run-pass static A: usize = 42; static B: usize = A; diff --git a/tests/ui/static/reference-of-mut-static-safe.rs b/tests/ui/static/reference-of-mut-static-safe.rs index 5cb1a03bef5..d113d0ee48d 100644 --- a/tests/ui/static/reference-of-mut-static-safe.rs +++ b/tests/ui/static/reference-of-mut-static-safe.rs @@ -1,7 +1,7 @@ -// revisions: e2021 e2024 +//@ revisions: e2021 e2024 -// [e2021] edition:2021 -// [e2024] compile-flags: --edition 2024 -Z unstable-options +//@ [e2021] edition:2021 +//@ [e2024] compile-flags: --edition 2024 -Z unstable-options fn main() { static mut X: i32 = 1; diff --git a/tests/ui/static/reference-of-mut-static-unsafe-fn.rs b/tests/ui/static/reference-of-mut-static-unsafe-fn.rs index 6b1e77850e5..8f3b3eb7745 100644 --- a/tests/ui/static/reference-of-mut-static-unsafe-fn.rs +++ b/tests/ui/static/reference-of-mut-static-unsafe-fn.rs @@ -1,4 +1,4 @@ -// compile-flags: --edition 2024 -Z unstable-options +//@ compile-flags: --edition 2024 -Z unstable-options fn main() {} diff --git a/tests/ui/static/reference-of-mut-static.rs b/tests/ui/static/reference-of-mut-static.rs index 01a3b1fbd9b..166303f0257 100644 --- a/tests/ui/static/reference-of-mut-static.rs +++ b/tests/ui/static/reference-of-mut-static.rs @@ -1,7 +1,7 @@ -// revisions: e2021 e2024 +//@ revisions: e2021 e2024 -// [e2021] edition:2021 -// [e2024] compile-flags: --edition 2024 -Z unstable-options +//@ [e2021] edition:2021 +//@ [e2024] compile-flags: --edition 2024 -Z unstable-options #![deny(static_mut_ref)] diff --git a/tests/ui/static/safe-extern-statics-mut.rs b/tests/ui/static/safe-extern-statics-mut.rs index 1c0662e0a6c..8aa0b47a311 100644 --- a/tests/ui/static/safe-extern-statics-mut.rs +++ b/tests/ui/static/safe-extern-statics-mut.rs @@ -1,4 +1,4 @@ -// aux-build:extern-statics.rs +//@ aux-build:extern-statics.rs extern crate extern_statics; use extern_statics::*; diff --git a/tests/ui/static/safe-extern-statics.rs b/tests/ui/static/safe-extern-statics.rs index 6fa4c4aaca5..f46a7922829 100644 --- a/tests/ui/static/safe-extern-statics.rs +++ b/tests/ui/static/safe-extern-statics.rs @@ -1,4 +1,4 @@ -// aux-build:extern-statics.rs +//@ aux-build:extern-statics.rs extern crate extern_statics; use extern_statics::*; diff --git a/tests/ui/static/static-extern-type.rs b/tests/ui/static/static-extern-type.rs index 4fa48fa133b..8b022a5c31c 100644 --- a/tests/ui/static/static-extern-type.rs +++ b/tests/ui/static/static-extern-type.rs @@ -1,4 +1,4 @@ -// build-pass (FIXME(62277): could be check-pass?) +//@ build-pass (FIXME(62277): could be check-pass?) #![feature(extern_types)] pub mod a { diff --git a/tests/ui/static/static-priv-by-default2.rs b/tests/ui/static/static-priv-by-default2.rs index bbbdb253b1e..f6b05366a95 100644 --- a/tests/ui/static/static-priv-by-default2.rs +++ b/tests/ui/static/static-priv-by-default2.rs @@ -1,4 +1,4 @@ -// aux-build:static_priv_by_default.rs +//@ aux-build:static_priv_by_default.rs extern crate static_priv_by_default; diff --git a/tests/ui/static/static_sized_requirement.rs b/tests/ui/static/static_sized_requirement.rs index 3943b260854..80f93dea054 100644 --- a/tests/ui/static/static_sized_requirement.rs +++ b/tests/ui/static/static_sized_requirement.rs @@ -1,4 +1,4 @@ -// build-pass (FIXME(62277): could be check-pass?) +//@ build-pass (FIXME(62277): could be check-pass?) #![feature(no_core, lang_items)] #![no_core] diff --git a/tests/ui/statics/issue-15261.rs b/tests/ui/statics/issue-15261.rs index 14422329b7d..71eeb2a6d26 100644 --- a/tests/ui/statics/issue-15261.rs +++ b/tests/ui/statics/issue-15261.rs @@ -1,8 +1,8 @@ -// build-pass +//@ build-pass #![allow(dead_code)] #![allow(non_upper_case_globals)] -// pretty-expanded FIXME #23616 +//@ pretty-expanded FIXME #23616 static mut n_mut: usize = 0; diff --git a/tests/ui/statics/issue-17233.rs b/tests/ui/statics/issue-17233.rs index 54a12fdf8e8..199bafdc7fe 100644 --- a/tests/ui/statics/issue-17233.rs +++ b/tests/ui/statics/issue-17233.rs @@ -1,4 +1,4 @@ -// run-pass +//@ run-pass const X1: &'static [u8] = &[b'1']; const X2: &'static [u8] = b"1"; diff --git a/tests/ui/statics/issue-17718-static-unsafe-interior.rs b/tests/ui/statics/issue-17718-static-unsafe-interior.rs index 65a8713ba05..82d5ec8db46 100644 --- a/tests/ui/statics/issue-17718-static-unsafe-interior.rs +++ b/tests/ui/statics/issue-17718-static-unsafe-interior.rs @@ -1,8 +1,8 @@ -// run-pass +//@ run-pass #![allow(dead_code)] #![allow(unused_variables)] #![allow(unused_imports)] -// pretty-expanded FIXME #23616 +//@ pretty-expanded FIXME #23616 use std::marker; use std::cell::UnsafeCell; diff --git a/tests/ui/statics/issue-44373-2.rs b/tests/ui/statics/issue-44373-2.rs index 194ce1dca77..030ddbc563a 100644 --- a/tests/ui/statics/issue-44373-2.rs +++ b/tests/ui/statics/issue-44373-2.rs @@ -1,4 +1,4 @@ -// check-pass +//@ check-pass #![allow(dead_code)] struct Foo(bool); diff --git a/tests/ui/statics/issue-91050-1.rs b/tests/ui/statics/issue-91050-1.rs index c6268dba567..014e877558e 100644 --- a/tests/ui/statics/issue-91050-1.rs +++ b/tests/ui/statics/issue-91050-1.rs @@ -1,5 +1,5 @@ -// build-pass -// compile-flags: --crate-type=rlib --emit=llvm-ir -Cno-prepopulate-passes +//@ build-pass +//@ compile-flags: --crate-type=rlib --emit=llvm-ir -Cno-prepopulate-passes // This test declares globals by the same name with different types, which // caused problems because Module::getOrInsertGlobal would return a Constant* diff --git a/tests/ui/statics/issue-91050-2.rs b/tests/ui/statics/issue-91050-2.rs index 2ff954d15ca..9198cf85380 100644 --- a/tests/ui/statics/issue-91050-2.rs +++ b/tests/ui/statics/issue-91050-2.rs @@ -1,5 +1,5 @@ -// build-pass -// compile-flags: --crate-type=rlib --emit=llvm-ir -Cno-prepopulate-passes +//@ build-pass +//@ compile-flags: --crate-type=rlib --emit=llvm-ir -Cno-prepopulate-passes // This is a variant of issue-91050-1.rs -- see there for an explanation. diff --git a/tests/ui/statics/recursive_interior_mut.rs b/tests/ui/statics/recursive_interior_mut.rs index 7e3083909d5..43e9d0c5091 100644 --- a/tests/ui/statics/recursive_interior_mut.rs +++ b/tests/ui/statics/recursive_interior_mut.rs @@ -1,4 +1,4 @@ -// check-pass +//@ check-pass use std::cell::Cell; use std::ptr::NonNull; diff --git a/tests/ui/statics/static-fn-inline-xc.rs b/tests/ui/statics/static-fn-inline-xc.rs index a400b9c8d56..fe230f04d3d 100644 --- a/tests/ui/statics/static-fn-inline-xc.rs +++ b/tests/ui/statics/static-fn-inline-xc.rs @@ -1,7 +1,7 @@ -// run-pass -// aux-build:static_fn_inline_xc_aux.rs +//@ run-pass +//@ aux-build:static_fn_inline_xc_aux.rs -// pretty-expanded FIXME #23616 +//@ pretty-expanded FIXME #23616 extern crate static_fn_inline_xc_aux as mycore; diff --git a/tests/ui/statics/static-fn-trait-xc.rs b/tests/ui/statics/static-fn-trait-xc.rs index 1d3126128c9..78810eb5645 100644 --- a/tests/ui/statics/static-fn-trait-xc.rs +++ b/tests/ui/statics/static-fn-trait-xc.rs @@ -1,7 +1,7 @@ -// run-pass -// aux-build:static_fn_trait_xc_aux.rs +//@ run-pass +//@ aux-build:static_fn_trait_xc_aux.rs -// pretty-expanded FIXME #23616 +//@ pretty-expanded FIXME #23616 extern crate static_fn_trait_xc_aux as mycore; diff --git a/tests/ui/statics/static-function-pointer-xc.rs b/tests/ui/statics/static-function-pointer-xc.rs index 2d063a751ca..4f03592cd6b 100644 --- a/tests/ui/statics/static-function-pointer-xc.rs +++ b/tests/ui/statics/static-function-pointer-xc.rs @@ -1,5 +1,5 @@ -// run-pass -// aux-build:static-function-pointer-aux.rs +//@ run-pass +//@ aux-build:static-function-pointer-aux.rs extern crate static_function_pointer_aux as aux; diff --git a/tests/ui/statics/static-function-pointer.rs b/tests/ui/statics/static-function-pointer.rs index 6c52dfecdec..d42c9c467bf 100644 --- a/tests/ui/statics/static-function-pointer.rs +++ b/tests/ui/statics/static-function-pointer.rs @@ -1,4 +1,4 @@ -// run-pass +//@ run-pass fn f(x: isize) -> isize { x } fn g(x: isize) -> isize { 2 * x } diff --git a/tests/ui/statics/static-impl.rs b/tests/ui/statics/static-impl.rs index 9e2db7e0caf..37f3cd13133 100644 --- a/tests/ui/statics/static-impl.rs +++ b/tests/ui/statics/static-impl.rs @@ -1,4 +1,4 @@ -// run-pass +//@ run-pass #![allow(non_camel_case_types)] diff --git a/tests/ui/statics/static-method-in-trait-with-tps-intracrate.rs b/tests/ui/statics/static-method-in-trait-with-tps-intracrate.rs index cd3ccfee06f..374964d0813 100644 --- a/tests/ui/statics/static-method-in-trait-with-tps-intracrate.rs +++ b/tests/ui/statics/static-method-in-trait-with-tps-intracrate.rs @@ -1,4 +1,4 @@ -// run-pass +//@ run-pass #![allow(dead_code)] trait Deserializer { diff --git a/tests/ui/statics/static-method-xcrate.rs b/tests/ui/statics/static-method-xcrate.rs index 1d1cb381095..a1d40f24e37 100644 --- a/tests/ui/statics/static-method-xcrate.rs +++ b/tests/ui/statics/static-method-xcrate.rs @@ -1,5 +1,5 @@ -// run-pass -// aux-build:static-methods-crate.rs +//@ run-pass +//@ aux-build:static-methods-crate.rs extern crate static_methods_crate; diff --git a/tests/ui/statics/static-methods-in-traits.rs b/tests/ui/statics/static-methods-in-traits.rs index ff76d4e4a20..87f274b9de8 100644 --- a/tests/ui/statics/static-methods-in-traits.rs +++ b/tests/ui/statics/static-methods-in-traits.rs @@ -1,4 +1,4 @@ -// run-pass +//@ run-pass mod a { pub trait Foo { diff --git a/tests/ui/statics/static-methods-in-traits2.rs b/tests/ui/statics/static-methods-in-traits2.rs index 2c43ff6a788..dbb7120d543 100644 --- a/tests/ui/statics/static-methods-in-traits2.rs +++ b/tests/ui/statics/static-methods-in-traits2.rs @@ -1,5 +1,5 @@ -// run-pass -// pretty-expanded FIXME #23616 +//@ run-pass +//@ pretty-expanded FIXME #23616 pub trait Number: NumConv { fn from(n: T) -> Self; diff --git a/tests/ui/statics/static-mut-xc.rs b/tests/ui/statics/static-mut-xc.rs index 2fc265e02ea..75a4faed83d 100644 --- a/tests/ui/statics/static-mut-xc.rs +++ b/tests/ui/statics/static-mut-xc.rs @@ -1,11 +1,11 @@ -// run-pass +//@ run-pass #![allow(non_upper_case_globals)] // Constants (static variables) can be used to match in patterns, but mutable // statics cannot. This ensures that there's some form of error if this is // attempted. -// aux-build:static_mut_xc.rs +//@ aux-build:static_mut_xc.rs extern crate static_mut_xc; diff --git a/tests/ui/statics/static-promotion.rs b/tests/ui/statics/static-promotion.rs index b9eff469177..24f5df091d3 100644 --- a/tests/ui/statics/static-promotion.rs +++ b/tests/ui/statics/static-promotion.rs @@ -1,4 +1,4 @@ -// run-pass +//@ run-pass // Use of global static variables in literal values should be allowed for // promotion. diff --git a/tests/ui/statics/static-recursive.rs b/tests/ui/statics/static-recursive.rs index 216beb0206d..f504e2a79f0 100644 --- a/tests/ui/statics/static-recursive.rs +++ b/tests/ui/statics/static-recursive.rs @@ -1,4 +1,4 @@ -// run-pass +//@ run-pass static mut S: *const u8 = unsafe { &S as *const *const u8 as *const u8 }; //~^ WARN shared reference of mutable static is discouraged [static_mut_ref] diff --git a/tests/ui/stats/hir-stats.rs b/tests/ui/stats/hir-stats.rs index 9bb87026b64..249413d80e8 100644 --- a/tests/ui/stats/hir-stats.rs +++ b/tests/ui/stats/hir-stats.rs @@ -1,6 +1,6 @@ -// check-pass -// compile-flags: -Zhir-stats -// only-x86_64 +//@ check-pass +//@ compile-flags: -Zhir-stats +//@ only-x86_64 // Type layouts sometimes change. When that happens, until the next bootstrap // bump occurs, stage1 and stage2 will give different outputs for this test. diff --git a/tests/ui/stats/meta-stats.rs b/tests/ui/stats/meta-stats.rs index 2d38e088286..5176dd0f467 100644 --- a/tests/ui/stats/meta-stats.rs +++ b/tests/ui/stats/meta-stats.rs @@ -1,6 +1,6 @@ -// build-pass -// dont-check-compiler-stderr -// compile-flags: -Zmeta-stats +//@ build-pass +//@ dont-check-compiler-stderr +//@ compile-flags: -Zmeta-stats #![crate_type = "lib"] diff --git a/tests/ui/std-backtrace.rs b/tests/ui/std-backtrace.rs index 59574b471dd..141847d958d 100644 --- a/tests/ui/std-backtrace.rs +++ b/tests/ui/std-backtrace.rs @@ -1,12 +1,12 @@ -// run-pass -// ignore-android FIXME #17520 -// ignore-emscripten spawning processes is not supported -// ignore-openbsd no support for libbacktrace without filename -// ignore-sgx no processes -// ignore-msvc see #62897 and `backtrace-debuginfo.rs` test -// ignore-fuchsia Backtraces not symbolized -// compile-flags:-g -// compile-flags:-Cstrip=none +//@ run-pass +//@ ignore-android FIXME #17520 +//@ ignore-emscripten spawning processes is not supported +//@ ignore-openbsd no support for libbacktrace without filename +//@ ignore-sgx no processes +//@ ignore-msvc see #62897 and `backtrace-debuginfo.rs` test +//@ ignore-fuchsia Backtraces not symbolized +//@ compile-flags:-g +//@ compile-flags:-Cstrip=none use std::env; use std::process::Command; diff --git a/tests/ui/std/issue-81357-unsound-file-methods.rs b/tests/ui/std/issue-81357-unsound-file-methods.rs index fdf1150f8d2..838df40c32d 100644 --- a/tests/ui/std/issue-81357-unsound-file-methods.rs +++ b/tests/ui/std/issue-81357-unsound-file-methods.rs @@ -1,5 +1,5 @@ -// run-fail -// only-windows +//@ run-fail +//@ only-windows fn main() { use std::fs; diff --git a/tests/ui/std/slice-from-array-issue-113238.rs b/tests/ui/std/slice-from-array-issue-113238.rs index e9e1bfb8db3..44f2d7a9478 100644 --- a/tests/ui/std/slice-from-array-issue-113238.rs +++ b/tests/ui/std/slice-from-array-issue-113238.rs @@ -1,4 +1,4 @@ -// check-pass +//@ check-pass // This intends to use the unsizing coercion from array to slice, but it only // works if we resolve `<&[u8]>::from` as the reflexive `From for T`. In diff --git a/tests/ui/std/stdio-from.rs b/tests/ui/std/stdio-from.rs index fef9f27fcdf..f3d2cec2d0b 100644 --- a/tests/ui/std/stdio-from.rs +++ b/tests/ui/std/stdio-from.rs @@ -1,5 +1,5 @@ -// run-pass -// ignore-cross-compile +//@ run-pass +//@ ignore-cross-compile use std::env; use std::fs::File; diff --git a/tests/ui/stdio-is-blocking.rs b/tests/ui/stdio-is-blocking.rs index 4b67dbf79e0..438fb06c426 100644 --- a/tests/ui/stdio-is-blocking.rs +++ b/tests/ui/stdio-is-blocking.rs @@ -1,6 +1,6 @@ -// run-pass -// ignore-emscripten no processes -// ignore-sgx no processes +//@ run-pass +//@ ignore-emscripten no processes +//@ ignore-sgx no processes use std::env; use std::io::prelude::*; diff --git a/tests/ui/stdlib-unit-tests/builtin-clone.rs b/tests/ui/stdlib-unit-tests/builtin-clone.rs index 0874d5bc390..47c00ede0e9 100644 --- a/tests/ui/stdlib-unit-tests/builtin-clone.rs +++ b/tests/ui/stdlib-unit-tests/builtin-clone.rs @@ -1,4 +1,4 @@ -// run-pass +//@ run-pass // Test that `Clone` is correctly implemented for builtin types. // Also test that cloning an array or a tuple is done right, i.e. // each component is cloned. diff --git a/tests/ui/stdlib-unit-tests/eq-multidispatch.rs b/tests/ui/stdlib-unit-tests/eq-multidispatch.rs index 69d83f496b3..4a991624e34 100644 --- a/tests/ui/stdlib-unit-tests/eq-multidispatch.rs +++ b/tests/ui/stdlib-unit-tests/eq-multidispatch.rs @@ -1,4 +1,4 @@ -// run-pass +//@ run-pass #[derive(PartialEq, Debug)] struct Bar; diff --git a/tests/ui/stdlib-unit-tests/issue-21058.rs b/tests/ui/stdlib-unit-tests/issue-21058.rs index 6facf0b2dd5..0e04f1e21b8 100644 --- a/tests/ui/stdlib-unit-tests/issue-21058.rs +++ b/tests/ui/stdlib-unit-tests/issue-21058.rs @@ -1,4 +1,4 @@ -// run-pass +//@ run-pass #![allow(dead_code)] use std::fmt::Debug; diff --git a/tests/ui/stdlib-unit-tests/istr.rs b/tests/ui/stdlib-unit-tests/istr.rs index 219b47789b8..f6298919425 100644 --- a/tests/ui/stdlib-unit-tests/istr.rs +++ b/tests/ui/stdlib-unit-tests/istr.rs @@ -1,4 +1,4 @@ -// run-pass +//@ run-pass fn test_stack_assign() { let s: String = "a".to_string(); diff --git a/tests/ui/stdlib-unit-tests/log-knows-the-names-of-variants-in-std.rs b/tests/ui/stdlib-unit-tests/log-knows-the-names-of-variants-in-std.rs index c5a40edbeef..8f351b2b40b 100644 --- a/tests/ui/stdlib-unit-tests/log-knows-the-names-of-variants-in-std.rs +++ b/tests/ui/stdlib-unit-tests/log-knows-the-names-of-variants-in-std.rs @@ -1,4 +1,4 @@ -// run-pass +//@ run-pass #![allow(non_camel_case_types)] #![allow(dead_code)] diff --git a/tests/ui/stdlib-unit-tests/matches2021.rs b/tests/ui/stdlib-unit-tests/matches2021.rs index 9143a8cdd59..78c8be73213 100644 --- a/tests/ui/stdlib-unit-tests/matches2021.rs +++ b/tests/ui/stdlib-unit-tests/matches2021.rs @@ -1,5 +1,5 @@ -// run-pass -// edition:2021 +//@ run-pass +//@ edition:2021 // regression test for https://github.com/rust-lang/rust/pull/85678 diff --git a/tests/ui/stdlib-unit-tests/minmax-stability-issue-23687.rs b/tests/ui/stdlib-unit-tests/minmax-stability-issue-23687.rs index 7fbffb8fa98..bf42347df0b 100644 --- a/tests/ui/stdlib-unit-tests/minmax-stability-issue-23687.rs +++ b/tests/ui/stdlib-unit-tests/minmax-stability-issue-23687.rs @@ -1,4 +1,4 @@ -// run-pass +//@ run-pass use std::fmt::Debug; use std::cmp::{self, Ordering}; diff --git a/tests/ui/stdlib-unit-tests/raw-fat-ptr.rs b/tests/ui/stdlib-unit-tests/raw-fat-ptr.rs index 4a8289cb242..51876d0bf15 100644 --- a/tests/ui/stdlib-unit-tests/raw-fat-ptr.rs +++ b/tests/ui/stdlib-unit-tests/raw-fat-ptr.rs @@ -1,4 +1,4 @@ -// run-pass +//@ run-pass // check raw fat pointer ops use std::mem; diff --git a/tests/ui/stdlib-unit-tests/seq-compare.rs b/tests/ui/stdlib-unit-tests/seq-compare.rs index 4078326b559..1be0569e17c 100644 --- a/tests/ui/stdlib-unit-tests/seq-compare.rs +++ b/tests/ui/stdlib-unit-tests/seq-compare.rs @@ -1,4 +1,4 @@ -// run-pass +//@ run-pass pub fn main() { assert!(("hello".to_string() < "hellr".to_string())); diff --git a/tests/ui/stdlib-unit-tests/volatile-fat-ptr.rs b/tests/ui/stdlib-unit-tests/volatile-fat-ptr.rs index f73e7e1c391..ef227a9134d 100644 --- a/tests/ui/stdlib-unit-tests/volatile-fat-ptr.rs +++ b/tests/ui/stdlib-unit-tests/volatile-fat-ptr.rs @@ -1,4 +1,4 @@ -// run-pass +//@ run-pass #![allow(stable_features)] #![feature(volatile)] diff --git a/tests/ui/str/str-as-char.fixed b/tests/ui/str/str-as-char.fixed index 42bbef83917..b85f86e0615 100644 --- a/tests/ui/str/str-as-char.fixed +++ b/tests/ui/str/str-as-char.fixed @@ -1,4 +1,4 @@ -// run-rustfix +//@ run-rustfix fn main() { println!("ā—ā—"); //~ ERROR character literal may only contain one codepoint diff --git a/tests/ui/str/str-as-char.rs b/tests/ui/str/str-as-char.rs index 09b9dfc590d..b815083fada 100644 --- a/tests/ui/str/str-as-char.rs +++ b/tests/ui/str/str-as-char.rs @@ -1,4 +1,4 @@ -// run-rustfix +//@ run-rustfix fn main() { println!('ā—ā—'); //~ ERROR character literal may only contain one codepoint diff --git a/tests/ui/str/str-escape.rs b/tests/ui/str/str-escape.rs index 89a82171063..6902fe50662 100644 --- a/tests/ui/str/str-escape.rs +++ b/tests/ui/str/str-escape.rs @@ -1,6 +1,6 @@ -// check-pass +//@ check-pass // ignore-tidy-tab -// edition: 2021 +//@ edition: 2021 fn main() { let s = "\ diff --git a/tests/ui/str/str-overrun.rs b/tests/ui/str/str-overrun.rs index a3ec8941322..b8e245475da 100644 --- a/tests/ui/str/str-overrun.rs +++ b/tests/ui/str/str-overrun.rs @@ -1,6 +1,6 @@ -// run-fail -// error-pattern:index out of bounds: the len is 5 but the index is 5 -// ignore-emscripten no processes +//@ run-fail +//@ error-pattern:index out of bounds: the len is 5 but the index is 5 +//@ ignore-emscripten no processes fn main() { let s: String = "hello".to_string(); diff --git a/tests/ui/string-box-error.rs b/tests/ui/string-box-error.rs index 11a5bd07c3b..9a7cd81ee04 100644 --- a/tests/ui/string-box-error.rs +++ b/tests/ui/string-box-error.rs @@ -1,4 +1,4 @@ -// run-pass +//@ run-pass // Ensure that both `Box` and `Box` can be // obtained from `String`. diff --git a/tests/ui/struct-ctor-mangling.rs b/tests/ui/struct-ctor-mangling.rs index 159e21d2863..f32cbb7aaae 100644 --- a/tests/ui/struct-ctor-mangling.rs +++ b/tests/ui/struct-ctor-mangling.rs @@ -1,4 +1,4 @@ -// run-pass +//@ run-pass fn size_of_val(_: &T) -> usize { std::mem::size_of::() diff --git a/tests/ui/structs-enums/align-enum.rs b/tests/ui/structs-enums/align-enum.rs index fa872caa3b4..ff80a19211c 100644 --- a/tests/ui/structs-enums/align-enum.rs +++ b/tests/ui/structs-enums/align-enum.rs @@ -1,4 +1,4 @@ -// run-pass +//@ run-pass #![allow(dead_code)] use std::mem; diff --git a/tests/ui/structs-enums/align-struct.rs b/tests/ui/structs-enums/align-struct.rs index 54092542f98..3d8dad6e324 100644 --- a/tests/ui/structs-enums/align-struct.rs +++ b/tests/ui/structs-enums/align-struct.rs @@ -1,4 +1,4 @@ -// run-pass +//@ run-pass #![allow(dead_code, unused_allocation)] use std::mem; diff --git a/tests/ui/structs-enums/borrow-tuple-fields.rs b/tests/ui/structs-enums/borrow-tuple-fields.rs index b1d8f91646b..6db583b09a1 100644 --- a/tests/ui/structs-enums/borrow-tuple-fields.rs +++ b/tests/ui/structs-enums/borrow-tuple-fields.rs @@ -1,4 +1,4 @@ -// run-pass +//@ run-pass struct Foo(isize, isize); diff --git a/tests/ui/structs-enums/class-cast-to-trait-cross-crate-2.rs b/tests/ui/structs-enums/class-cast-to-trait-cross-crate-2.rs index 989f0a275f7..d4caa19135e 100644 --- a/tests/ui/structs-enums/class-cast-to-trait-cross-crate-2.rs +++ b/tests/ui/structs-enums/class-cast-to-trait-cross-crate-2.rs @@ -1,5 +1,5 @@ -// run-pass -// aux-build:cci_class_cast.rs +//@ run-pass +//@ aux-build:cci_class_cast.rs extern crate cci_class_cast; diff --git a/tests/ui/structs-enums/class-cast-to-trait-multiple-types.rs b/tests/ui/structs-enums/class-cast-to-trait-multiple-types.rs index ca35a615d21..658e9d2117d 100644 --- a/tests/ui/structs-enums/class-cast-to-trait-multiple-types.rs +++ b/tests/ui/structs-enums/class-cast-to-trait-multiple-types.rs @@ -1,4 +1,4 @@ -// run-pass +//@ run-pass #![allow(non_camel_case_types)] #![allow(dead_code)] diff --git a/tests/ui/structs-enums/class-cast-to-trait.rs b/tests/ui/structs-enums/class-cast-to-trait.rs index 1019bb30015..bbbde34ec09 100644 --- a/tests/ui/structs-enums/class-cast-to-trait.rs +++ b/tests/ui/structs-enums/class-cast-to-trait.rs @@ -1,9 +1,9 @@ -// run-pass +//@ run-pass #![allow(dead_code)] #![allow(unused_mut)] #![allow(non_camel_case_types)] -// ignore-freebsd FIXME fails on BSD +//@ ignore-freebsd FIXME fails on BSD trait noisy { diff --git a/tests/ui/structs-enums/class-dtor.rs b/tests/ui/structs-enums/class-dtor.rs index 583a5e24098..ee6220b6fa4 100644 --- a/tests/ui/structs-enums/class-dtor.rs +++ b/tests/ui/structs-enums/class-dtor.rs @@ -1,8 +1,8 @@ -// run-pass +//@ run-pass #![allow(dead_code)] #![allow(non_camel_case_types)] -// pretty-expanded FIXME #23616 +//@ pretty-expanded FIXME #23616 struct cat { done : extern "C" fn(usize), diff --git a/tests/ui/structs-enums/class-exports.rs b/tests/ui/structs-enums/class-exports.rs index ee20887cbfb..53d0e3db6f5 100644 --- a/tests/ui/structs-enums/class-exports.rs +++ b/tests/ui/structs-enums/class-exports.rs @@ -1,4 +1,4 @@ -// run-pass +//@ run-pass #![allow(dead_code)] #![allow(non_camel_case_types)] diff --git a/tests/ui/structs-enums/class-impl-very-parameterized-trait.rs b/tests/ui/structs-enums/class-impl-very-parameterized-trait.rs index 5e7830296da..0b37192fc3b 100644 --- a/tests/ui/structs-enums/class-impl-very-parameterized-trait.rs +++ b/tests/ui/structs-enums/class-impl-very-parameterized-trait.rs @@ -1,4 +1,4 @@ -// run-pass +//@ run-pass #![allow(dead_code)] #![allow(non_camel_case_types)] diff --git a/tests/ui/structs-enums/class-implement-trait-cross-crate.rs b/tests/ui/structs-enums/class-implement-trait-cross-crate.rs index 31b79517566..7a5969451cb 100644 --- a/tests/ui/structs-enums/class-implement-trait-cross-crate.rs +++ b/tests/ui/structs-enums/class-implement-trait-cross-crate.rs @@ -1,8 +1,8 @@ -// run-pass +//@ run-pass #![allow(dead_code)] #![allow(non_camel_case_types)] -// aux-build:cci_class_trait.rs +//@ aux-build:cci_class_trait.rs extern crate cci_class_trait; use cci_class_trait::animals::noisy; diff --git a/tests/ui/structs-enums/class-implement-traits.rs b/tests/ui/structs-enums/class-implement-traits.rs index 732aa146ce4..04a7b706edb 100644 --- a/tests/ui/structs-enums/class-implement-traits.rs +++ b/tests/ui/structs-enums/class-implement-traits.rs @@ -1,4 +1,4 @@ -// run-pass +//@ run-pass #![allow(non_camel_case_types)] #![allow(dead_code)] diff --git a/tests/ui/structs-enums/class-method-cross-crate.rs b/tests/ui/structs-enums/class-method-cross-crate.rs index 519f0685fdf..f73999a2450 100644 --- a/tests/ui/structs-enums/class-method-cross-crate.rs +++ b/tests/ui/structs-enums/class-method-cross-crate.rs @@ -1,5 +1,5 @@ -// run-pass -// aux-build:cci_class_2.rs +//@ run-pass +//@ aux-build:cci_class_2.rs extern crate cci_class_2; use cci_class_2::kitties::cat; diff --git a/tests/ui/structs-enums/class-methods-cross-crate.rs b/tests/ui/structs-enums/class-methods-cross-crate.rs index c342af31351..b2c48248a67 100644 --- a/tests/ui/structs-enums/class-methods-cross-crate.rs +++ b/tests/ui/structs-enums/class-methods-cross-crate.rs @@ -1,5 +1,5 @@ -// run-pass -// aux-build:cci_class_3.rs +//@ run-pass +//@ aux-build:cci_class_3.rs extern crate cci_class_3; use cci_class_3::kitties::cat; diff --git a/tests/ui/structs-enums/class-methods.rs b/tests/ui/structs-enums/class-methods.rs index 83f4a5fd39e..b0dbbbec522 100644 --- a/tests/ui/structs-enums/class-methods.rs +++ b/tests/ui/structs-enums/class-methods.rs @@ -1,4 +1,4 @@ -// run-pass +//@ run-pass #![allow(non_camel_case_types)] diff --git a/tests/ui/structs-enums/class-poly-methods-cross-crate.rs b/tests/ui/structs-enums/class-poly-methods-cross-crate.rs index 0307ba78d02..dc99de95456 100644 --- a/tests/ui/structs-enums/class-poly-methods-cross-crate.rs +++ b/tests/ui/structs-enums/class-poly-methods-cross-crate.rs @@ -1,5 +1,5 @@ -// run-pass -// aux-build:cci_class_6.rs +//@ run-pass +//@ aux-build:cci_class_6.rs extern crate cci_class_6; use cci_class_6::kitties::cat; diff --git a/tests/ui/structs-enums/class-poly-methods.rs b/tests/ui/structs-enums/class-poly-methods.rs index da2870b58a4..28374a68ad4 100644 --- a/tests/ui/structs-enums/class-poly-methods.rs +++ b/tests/ui/structs-enums/class-poly-methods.rs @@ -1,4 +1,4 @@ -// run-pass +//@ run-pass #![allow(dead_code)] #![allow(non_camel_case_types)] diff --git a/tests/ui/structs-enums/class-separate-impl.rs b/tests/ui/structs-enums/class-separate-impl.rs index 3d6da1cc280..2768e284c17 100644 --- a/tests/ui/structs-enums/class-separate-impl.rs +++ b/tests/ui/structs-enums/class-separate-impl.rs @@ -1,4 +1,4 @@ -// run-pass +//@ run-pass #![allow(dead_code)] #![allow(non_camel_case_types)] diff --git a/tests/ui/structs-enums/class-str-field.rs b/tests/ui/structs-enums/class-str-field.rs index a3dc66aab12..a33a635344e 100644 --- a/tests/ui/structs-enums/class-str-field.rs +++ b/tests/ui/structs-enums/class-str-field.rs @@ -1,8 +1,8 @@ -// run-pass +//@ run-pass #![allow(dead_code)] #![allow(non_camel_case_types)] -// pretty-expanded FIXME #23616 +//@ pretty-expanded FIXME #23616 struct cat { diff --git a/tests/ui/structs-enums/class-typarams.rs b/tests/ui/structs-enums/class-typarams.rs index 4b2d4b12ec9..01cfa47024f 100644 --- a/tests/ui/structs-enums/class-typarams.rs +++ b/tests/ui/structs-enums/class-typarams.rs @@ -1,8 +1,8 @@ -// run-pass +//@ run-pass #![allow(dead_code)] #![allow(non_camel_case_types)] -// pretty-expanded FIXME #23616 +//@ pretty-expanded FIXME #23616 use std::marker::PhantomData; diff --git a/tests/ui/structs-enums/classes-cross-crate.rs b/tests/ui/structs-enums/classes-cross-crate.rs index ca362c7a7d8..0160d3fd85c 100644 --- a/tests/ui/structs-enums/classes-cross-crate.rs +++ b/tests/ui/structs-enums/classes-cross-crate.rs @@ -1,5 +1,5 @@ -// run-pass -// aux-build:cci_class_4.rs +//@ run-pass +//@ aux-build:cci_class_4.rs extern crate cci_class_4; use cci_class_4::kitties::cat; diff --git a/tests/ui/structs-enums/classes-self-referential.rs b/tests/ui/structs-enums/classes-self-referential.rs index 27d6ebf2c2a..35696a9cff9 100644 --- a/tests/ui/structs-enums/classes-self-referential.rs +++ b/tests/ui/structs-enums/classes-self-referential.rs @@ -1,9 +1,9 @@ -// run-pass +//@ run-pass #![allow(dead_code)] #![allow(non_camel_case_types)] -// pretty-expanded FIXME #23616 +//@ pretty-expanded FIXME #23616 struct kitten { cat: Option, diff --git a/tests/ui/structs-enums/classes-simple-cross-crate.rs b/tests/ui/structs-enums/classes-simple-cross-crate.rs index 6ff0970c0f0..1548f768b6f 100644 --- a/tests/ui/structs-enums/classes-simple-cross-crate.rs +++ b/tests/ui/structs-enums/classes-simple-cross-crate.rs @@ -1,5 +1,5 @@ -// run-pass -// aux-build:cci_class.rs +//@ run-pass +//@ aux-build:cci_class.rs extern crate cci_class; use cci_class::kitties::cat; diff --git a/tests/ui/structs-enums/classes-simple-method.rs b/tests/ui/structs-enums/classes-simple-method.rs index f3d98337dba..562fd590981 100644 --- a/tests/ui/structs-enums/classes-simple-method.rs +++ b/tests/ui/structs-enums/classes-simple-method.rs @@ -1,4 +1,4 @@ -// run-pass +//@ run-pass #![allow(dead_code)] #![allow(non_camel_case_types)] diff --git a/tests/ui/structs-enums/classes-simple.rs b/tests/ui/structs-enums/classes-simple.rs index 568fbb29f0d..d870a3101f1 100644 --- a/tests/ui/structs-enums/classes-simple.rs +++ b/tests/ui/structs-enums/classes-simple.rs @@ -1,4 +1,4 @@ -// run-pass +//@ run-pass #![allow(dead_code)] #![allow(non_camel_case_types)] diff --git a/tests/ui/structs-enums/classes.rs b/tests/ui/structs-enums/classes.rs index 51d84b9091d..d1c1922f4b5 100644 --- a/tests/ui/structs-enums/classes.rs +++ b/tests/ui/structs-enums/classes.rs @@ -1,4 +1,4 @@ -// run-pass +//@ run-pass #![allow(dead_code)] #![allow(non_camel_case_types)] diff --git a/tests/ui/structs-enums/codegen-tag-static-padding.rs b/tests/ui/structs-enums/codegen-tag-static-padding.rs index 8aa087c018b..7fe5367f358 100644 --- a/tests/ui/structs-enums/codegen-tag-static-padding.rs +++ b/tests/ui/structs-enums/codegen-tag-static-padding.rs @@ -1,4 +1,4 @@ -// run-pass +//@ run-pass #![allow(non_upper_case_globals)] // Issue #13186 diff --git a/tests/ui/structs-enums/compare-generic-enums.rs b/tests/ui/structs-enums/compare-generic-enums.rs index 84f953b1f8e..243cb4a21f5 100644 --- a/tests/ui/structs-enums/compare-generic-enums.rs +++ b/tests/ui/structs-enums/compare-generic-enums.rs @@ -1,4 +1,4 @@ -// run-pass +//@ run-pass #![allow(non_camel_case_types)] diff --git a/tests/ui/structs-enums/cross-crate-newtype-struct-pat.rs b/tests/ui/structs-enums/cross-crate-newtype-struct-pat.rs index eabffc16170..e66042ec83c 100644 --- a/tests/ui/structs-enums/cross-crate-newtype-struct-pat.rs +++ b/tests/ui/structs-enums/cross-crate-newtype-struct-pat.rs @@ -1,5 +1,5 @@ -// run-pass -// aux-build:newtype_struct_xc.rs +//@ run-pass +//@ aux-build:newtype_struct_xc.rs extern crate newtype_struct_xc; diff --git a/tests/ui/structs-enums/discrim-explicit-23030.rs b/tests/ui/structs-enums/discrim-explicit-23030.rs index e17025e9e88..1d3a8cd6b9e 100644 --- a/tests/ui/structs-enums/discrim-explicit-23030.rs +++ b/tests/ui/structs-enums/discrim-explicit-23030.rs @@ -1,4 +1,4 @@ -// run-pass +//@ run-pass // Issue 23030: Workaround overflowing discriminant // with explicit assignments. diff --git a/tests/ui/structs-enums/empty-struct-braces.rs b/tests/ui/structs-enums/empty-struct-braces.rs index 0663687c958..0449fb51af5 100644 --- a/tests/ui/structs-enums/empty-struct-braces.rs +++ b/tests/ui/structs-enums/empty-struct-braces.rs @@ -1,11 +1,11 @@ -// run-pass +//@ run-pass #![allow(unused_variables)] #![allow(non_upper_case_globals)] // Empty struct defined with braces add names into type namespace // Empty struct defined without braces add names into both type and value namespaces -// aux-build:empty-struct.rs +//@ aux-build:empty-struct.rs extern crate empty_struct; use empty_struct::*; diff --git a/tests/ui/structs-enums/empty-tag.rs b/tests/ui/structs-enums/empty-tag.rs index 271ab72c74f..5c3e6717306 100644 --- a/tests/ui/structs-enums/empty-tag.rs +++ b/tests/ui/structs-enums/empty-tag.rs @@ -1,4 +1,4 @@ -// run-pass +//@ run-pass #![allow(unused_braces)] #![allow(non_camel_case_types)] diff --git a/tests/ui/structs-enums/enum-alignment.rs b/tests/ui/structs-enums/enum-alignment.rs index 108dfe2e62d..bb779b1e0cd 100644 --- a/tests/ui/structs-enums/enum-alignment.rs +++ b/tests/ui/structs-enums/enum-alignment.rs @@ -1,4 +1,4 @@ -// run-pass +//@ run-pass #![allow(dead_code)] #![allow(deprecated)] diff --git a/tests/ui/structs-enums/enum-clike-ffi-as-int.rs b/tests/ui/structs-enums/enum-clike-ffi-as-int.rs index e2b2b43dee3..39b34903090 100644 --- a/tests/ui/structs-enums/enum-clike-ffi-as-int.rs +++ b/tests/ui/structs-enums/enum-clike-ffi-as-int.rs @@ -1,4 +1,4 @@ -// run-pass +//@ run-pass #![allow(dead_code)] /*! diff --git a/tests/ui/structs-enums/enum-discr.rs b/tests/ui/structs-enums/enum-discr.rs index bdd6df82d0f..51c3e9ec27c 100644 --- a/tests/ui/structs-enums/enum-discr.rs +++ b/tests/ui/structs-enums/enum-discr.rs @@ -1,4 +1,4 @@ -// run-pass +//@ run-pass #![allow(dead_code)] enum Animal { diff --git a/tests/ui/structs-enums/enum-discrim-autosizing.rs b/tests/ui/structs-enums/enum-discrim-autosizing.rs index f68fdda6053..a6ade028f0c 100644 --- a/tests/ui/structs-enums/enum-discrim-autosizing.rs +++ b/tests/ui/structs-enums/enum-discrim-autosizing.rs @@ -1,4 +1,4 @@ -// run-pass +//@ run-pass #![allow(dead_code)] #![allow(overflowing_literals)] diff --git a/tests/ui/structs-enums/enum-discrim-manual-sizing.rs b/tests/ui/structs-enums/enum-discrim-manual-sizing.rs index c8b362c9917..e41ff78cb65 100644 --- a/tests/ui/structs-enums/enum-discrim-manual-sizing.rs +++ b/tests/ui/structs-enums/enum-discrim-manual-sizing.rs @@ -1,4 +1,4 @@ -// run-pass +//@ run-pass #![allow(dead_code)] use std::mem::{size_of, align_of}; diff --git a/tests/ui/structs-enums/enum-discrim-range-overflow.rs b/tests/ui/structs-enums/enum-discrim-range-overflow.rs index 9c4c61e684b..51cabd10e30 100644 --- a/tests/ui/structs-enums/enum-discrim-range-overflow.rs +++ b/tests/ui/structs-enums/enum-discrim-range-overflow.rs @@ -1,7 +1,7 @@ -// run-pass +//@ run-pass #![allow(overflowing_literals)] -// pretty-expanded FIXME #23616 +//@ pretty-expanded FIXME #23616 pub enum E64 { H64 = 0x7FFF_FFFF_FFFF_FFFF, diff --git a/tests/ui/structs-enums/enum-discrim-width-stuff.rs b/tests/ui/structs-enums/enum-discrim-width-stuff.rs index f278ae2d0a8..98948f8b3df 100644 --- a/tests/ui/structs-enums/enum-discrim-width-stuff.rs +++ b/tests/ui/structs-enums/enum-discrim-width-stuff.rs @@ -1,4 +1,4 @@ -// run-pass +//@ run-pass #![allow(overflowing_literals)] #![allow(dead_code)] diff --git a/tests/ui/structs-enums/enum-disr-val-pretty.rs b/tests/ui/structs-enums/enum-disr-val-pretty.rs index ef1333e0eeb..f889460e5e2 100644 --- a/tests/ui/structs-enums/enum-disr-val-pretty.rs +++ b/tests/ui/structs-enums/enum-disr-val-pretty.rs @@ -1,6 +1,6 @@ -// run-pass +//@ run-pass #![allow(non_camel_case_types)] -// pp-exact +//@ pp-exact enum color { red = 1, green, blue, imaginary = -1, } diff --git a/tests/ui/structs-enums/enum-export-inheritance.rs b/tests/ui/structs-enums/enum-export-inheritance.rs index 6a36a004a7c..5bb689260c2 100644 --- a/tests/ui/structs-enums/enum-export-inheritance.rs +++ b/tests/ui/structs-enums/enum-export-inheritance.rs @@ -1,6 +1,6 @@ -// run-pass +//@ run-pass #![allow(dead_code)] -// pretty-expanded FIXME #23616 +//@ pretty-expanded FIXME #23616 mod a { pub enum Foo { diff --git a/tests/ui/structs-enums/enum-layout-optimization.rs b/tests/ui/structs-enums/enum-layout-optimization.rs index 05d297906c3..56055e952ce 100644 --- a/tests/ui/structs-enums/enum-layout-optimization.rs +++ b/tests/ui/structs-enums/enum-layout-optimization.rs @@ -1,4 +1,4 @@ -// run-pass +//@ run-pass // Test that we will do various size optimizations to enum layout, but // *not* if `#[repr(u8)]` or `#[repr(C)]` is passed. See also #40029. diff --git a/tests/ui/structs-enums/enum-non-c-like-repr-c-and-int.rs b/tests/ui/structs-enums/enum-non-c-like-repr-c-and-int.rs index 7d15d607dd6..142d0ee3287 100644 --- a/tests/ui/structs-enums/enum-non-c-like-repr-c-and-int.rs +++ b/tests/ui/structs-enums/enum-non-c-like-repr-c-and-int.rs @@ -1,4 +1,4 @@ -// run-pass +//@ run-pass // This test deserializes an enum in-place by transmuting to a union that // should have the same layout, and manipulating the tag and payloads // independently. This verifies that `repr(some_int)` has a stable representation, diff --git a/tests/ui/structs-enums/enum-non-c-like-repr-c.rs b/tests/ui/structs-enums/enum-non-c-like-repr-c.rs index fc9efdeca7d..15c9784dbb9 100644 --- a/tests/ui/structs-enums/enum-non-c-like-repr-c.rs +++ b/tests/ui/structs-enums/enum-non-c-like-repr-c.rs @@ -1,4 +1,4 @@ -// run-pass +//@ run-pass // This test deserializes an enum in-place by transmuting to a union that // should have the same layout, and manipulating the tag and payloads // independently. This verifies that `repr(some_int)` has a stable representation, diff --git a/tests/ui/structs-enums/enum-non-c-like-repr-int.rs b/tests/ui/structs-enums/enum-non-c-like-repr-int.rs index f9e96c1a0f4..64338b2aba7 100644 --- a/tests/ui/structs-enums/enum-non-c-like-repr-int.rs +++ b/tests/ui/structs-enums/enum-non-c-like-repr-int.rs @@ -1,4 +1,4 @@ -// run-pass +//@ run-pass // This test deserializes an enum in-place by transmuting to a union that // should have the same layout, and manipulating the tag and payloads // independently. This verifies that `repr(some_int)` has a stable representation, diff --git a/tests/ui/structs-enums/enum-null-pointer-opt.rs b/tests/ui/structs-enums/enum-null-pointer-opt.rs index 21564eeec29..6f8c8168968 100644 --- a/tests/ui/structs-enums/enum-null-pointer-opt.rs +++ b/tests/ui/structs-enums/enum-null-pointer-opt.rs @@ -1,4 +1,4 @@ -// run-pass +//@ run-pass #![feature(transparent_unions)] use std::mem::size_of; diff --git a/tests/ui/structs-enums/enum-nullable-const-null-with-fields.rs b/tests/ui/structs-enums/enum-nullable-const-null-with-fields.rs index 1d52d44d169..e76afa49f5e 100644 --- a/tests/ui/structs-enums/enum-nullable-const-null-with-fields.rs +++ b/tests/ui/structs-enums/enum-nullable-const-null-with-fields.rs @@ -1,4 +1,4 @@ -// run-pass +//@ run-pass static C: Result<(), Box> = Ok(()); diff --git a/tests/ui/structs-enums/enum-nullable-simplifycfg-misopt.rs b/tests/ui/structs-enums/enum-nullable-simplifycfg-misopt.rs index 4bd7ee45dfe..be8e00fa1bb 100644 --- a/tests/ui/structs-enums/enum-nullable-simplifycfg-misopt.rs +++ b/tests/ui/structs-enums/enum-nullable-simplifycfg-misopt.rs @@ -1,4 +1,4 @@ -// run-pass +//@ run-pass /*! * This is a regression test for a bug in LLVM, fixed in upstream r179587, diff --git a/tests/ui/structs-enums/enum-rec/issue-17431-6.rs b/tests/ui/structs-enums/enum-rec/issue-17431-6.rs index 20231dc83db..d8343704f12 100644 --- a/tests/ui/structs-enums/enum-rec/issue-17431-6.rs +++ b/tests/ui/structs-enums/enum-rec/issue-17431-6.rs @@ -1,4 +1,4 @@ -// ignore-macos: cycle error does not appear on apple +//@ ignore-macos: cycle error does not appear on apple use std::sync::Mutex; diff --git a/tests/ui/structs-enums/enum-univariant-repr.rs b/tests/ui/structs-enums/enum-univariant-repr.rs index 1e0f6788778..b77b66b4f58 100644 --- a/tests/ui/structs-enums/enum-univariant-repr.rs +++ b/tests/ui/structs-enums/enum-univariant-repr.rs @@ -1,4 +1,4 @@ -// run-pass +//@ run-pass use std::mem; diff --git a/tests/ui/structs-enums/enum-variants.rs b/tests/ui/structs-enums/enum-variants.rs index 9ac5aae726a..1f5206b8de5 100644 --- a/tests/ui/structs-enums/enum-variants.rs +++ b/tests/ui/structs-enums/enum-variants.rs @@ -1,7 +1,7 @@ -// run-pass +//@ run-pass #![allow(dead_code)] #![allow(unused_assignments)] -// pretty-expanded FIXME #23616 +//@ pretty-expanded FIXME #23616 #![allow(unused_variables)] diff --git a/tests/ui/structs-enums/enum-vec-initializer.rs b/tests/ui/structs-enums/enum-vec-initializer.rs index 42ee8ba971e..2fa77ec6ecd 100644 --- a/tests/ui/structs-enums/enum-vec-initializer.rs +++ b/tests/ui/structs-enums/enum-vec-initializer.rs @@ -1,5 +1,5 @@ -// run-pass -// pretty-expanded FIXME #23616 +//@ run-pass +//@ pretty-expanded FIXME #23616 enum Flopsy { Bunny = 2 diff --git a/tests/ui/structs-enums/export-abstract-tag.rs b/tests/ui/structs-enums/export-abstract-tag.rs index 76ac73321d3..ff36fa95903 100644 --- a/tests/ui/structs-enums/export-abstract-tag.rs +++ b/tests/ui/structs-enums/export-abstract-tag.rs @@ -1,10 +1,10 @@ -// run-pass +//@ run-pass #![allow(non_camel_case_types)] // We can export tags without exporting the variants to create a simple // sort of ADT. -// pretty-expanded FIXME #23616 +//@ pretty-expanded FIXME #23616 mod foo { pub enum t { t1, } diff --git a/tests/ui/structs-enums/export-tag-variant.rs b/tests/ui/structs-enums/export-tag-variant.rs index 52e0aba0979..bd762a0166e 100644 --- a/tests/ui/structs-enums/export-tag-variant.rs +++ b/tests/ui/structs-enums/export-tag-variant.rs @@ -1,6 +1,6 @@ -// run-pass +//@ run-pass #![allow(non_camel_case_types)] -// pretty-expanded FIXME #23616 +//@ pretty-expanded FIXME #23616 mod foo { pub enum t { t1, } diff --git a/tests/ui/structs-enums/expr-if-struct.rs b/tests/ui/structs-enums/expr-if-struct.rs index e62d47c6f5d..c9fc682ab01 100644 --- a/tests/ui/structs-enums/expr-if-struct.rs +++ b/tests/ui/structs-enums/expr-if-struct.rs @@ -1,4 +1,4 @@ -// run-pass +//@ run-pass #![allow(non_camel_case_types)] diff --git a/tests/ui/structs-enums/expr-match-struct.rs b/tests/ui/structs-enums/expr-match-struct.rs index f0e8d897274..3ebd8321846 100644 --- a/tests/ui/structs-enums/expr-match-struct.rs +++ b/tests/ui/structs-enums/expr-match-struct.rs @@ -1,4 +1,4 @@ -// run-pass +//@ run-pass #![allow(non_camel_case_types)] diff --git a/tests/ui/structs-enums/field-destruction-order.rs b/tests/ui/structs-enums/field-destruction-order.rs index a75a742d90f..b496dcc6e3a 100644 --- a/tests/ui/structs-enums/field-destruction-order.rs +++ b/tests/ui/structs-enums/field-destruction-order.rs @@ -1,4 +1,4 @@ -// run-pass +//@ run-pass #![allow(dead_code)] #![allow(non_upper_case_globals)] diff --git a/tests/ui/structs-enums/foreign-struct.rs b/tests/ui/structs-enums/foreign-struct.rs index 00a23b354a9..4f2e413ab40 100644 --- a/tests/ui/structs-enums/foreign-struct.rs +++ b/tests/ui/structs-enums/foreign-struct.rs @@ -1,10 +1,10 @@ -// run-pass +//@ run-pass #![allow(dead_code)] #![allow(non_camel_case_types)] // Passing enums by value -// pretty-expanded FIXME #23616 +//@ pretty-expanded FIXME #23616 pub enum void {} diff --git a/tests/ui/structs-enums/functional-struct-upd.rs b/tests/ui/structs-enums/functional-struct-upd.rs index 68ff73a0805..4128db0ab9e 100644 --- a/tests/ui/structs-enums/functional-struct-upd.rs +++ b/tests/ui/structs-enums/functional-struct-upd.rs @@ -1,4 +1,4 @@ -// run-pass +//@ run-pass #![allow(dead_code)] diff --git a/tests/ui/structs-enums/issue-103869.fixed b/tests/ui/structs-enums/issue-103869.fixed index 49fe32c7109..074d7519392 100644 --- a/tests/ui/structs-enums/issue-103869.fixed +++ b/tests/ui/structs-enums/issue-103869.fixed @@ -1,4 +1,4 @@ -// run-rustfix +//@ run-rustfix struct VecOrMap { //~^ HELP: perhaps you meant to use `struct` here diff --git a/tests/ui/structs-enums/issue-103869.rs b/tests/ui/structs-enums/issue-103869.rs index 729079e0501..fe23d2d5191 100644 --- a/tests/ui/structs-enums/issue-103869.rs +++ b/tests/ui/structs-enums/issue-103869.rs @@ -1,4 +1,4 @@ -// run-rustfix +//@ run-rustfix enum VecOrMap { //~^ HELP: perhaps you meant to use `struct` here diff --git a/tests/ui/structs-enums/issue-1701.rs b/tests/ui/structs-enums/issue-1701.rs index bae32a77765..7888e082240 100644 --- a/tests/ui/structs-enums/issue-1701.rs +++ b/tests/ui/structs-enums/issue-1701.rs @@ -1,4 +1,4 @@ -// run-pass +//@ run-pass #![allow(dead_code)] #![allow(non_camel_case_types)] diff --git a/tests/ui/structs-enums/issue-38002.rs b/tests/ui/structs-enums/issue-38002.rs index fdb31fc44a1..5ed70dbbb7f 100644 --- a/tests/ui/structs-enums/issue-38002.rs +++ b/tests/ui/structs-enums/issue-38002.rs @@ -1,4 +1,4 @@ -// run-pass +//@ run-pass #![allow(dead_code)] // Check that constant ADTs are codegened OK, part k of N. diff --git a/tests/ui/structs-enums/issue-50731.rs b/tests/ui/structs-enums/issue-50731.rs index 209c1e1279b..c00ef6d5f74 100644 --- a/tests/ui/structs-enums/issue-50731.rs +++ b/tests/ui/structs-enums/issue-50731.rs @@ -1,4 +1,4 @@ -// run-pass +//@ run-pass enum Void {} fn foo(_: Result<(Void, u32), (Void, String)>) {} fn main() { diff --git a/tests/ui/structs-enums/ivec-tag.rs b/tests/ui/structs-enums/ivec-tag.rs index c39368a2bb8..9185a0cbb6e 100644 --- a/tests/ui/structs-enums/ivec-tag.rs +++ b/tests/ui/structs-enums/ivec-tag.rs @@ -1,6 +1,6 @@ -// run-pass +//@ run-pass #![allow(unused_must_use)] -// ignore-emscripten no threads support +//@ ignore-emscripten no threads support use std::thread; use std::sync::mpsc::{channel, Sender}; diff --git a/tests/ui/structs-enums/module-qualified-struct-destructure.rs b/tests/ui/structs-enums/module-qualified-struct-destructure.rs index 57be37cdf2b..b90acb1b98c 100644 --- a/tests/ui/structs-enums/module-qualified-struct-destructure.rs +++ b/tests/ui/structs-enums/module-qualified-struct-destructure.rs @@ -1,5 +1,5 @@ -// run-pass -// pretty-expanded FIXME #23616 +//@ run-pass +//@ pretty-expanded FIXME #23616 mod m { pub struct S { diff --git a/tests/ui/structs-enums/multiple-reprs.rs b/tests/ui/structs-enums/multiple-reprs.rs index 4be503a0ef4..1528db126ae 100644 --- a/tests/ui/structs-enums/multiple-reprs.rs +++ b/tests/ui/structs-enums/multiple-reprs.rs @@ -1,4 +1,4 @@ -// run-pass +//@ run-pass #![allow(dead_code)] diff --git a/tests/ui/structs-enums/namespaced-enum-emulate-flat-xc.rs b/tests/ui/structs-enums/namespaced-enum-emulate-flat-xc.rs index 30cf645821d..ea56faef09c 100644 --- a/tests/ui/structs-enums/namespaced-enum-emulate-flat-xc.rs +++ b/tests/ui/structs-enums/namespaced-enum-emulate-flat-xc.rs @@ -1,9 +1,9 @@ -// run-pass +//@ run-pass #![allow(non_camel_case_types)] -// aux-build:namespaced_enum_emulate_flat.rs +//@ aux-build:namespaced_enum_emulate_flat.rs -// pretty-expanded FIXME #23616 +//@ pretty-expanded FIXME #23616 extern crate namespaced_enum_emulate_flat; diff --git a/tests/ui/structs-enums/namespaced-enum-emulate-flat.rs b/tests/ui/structs-enums/namespaced-enum-emulate-flat.rs index f6c395059ed..4a6352b328a 100644 --- a/tests/ui/structs-enums/namespaced-enum-emulate-flat.rs +++ b/tests/ui/structs-enums/namespaced-enum-emulate-flat.rs @@ -1,6 +1,6 @@ -// run-pass +//@ run-pass #![allow(dead_code)] -// pretty-expanded FIXME #23616 +//@ pretty-expanded FIXME #23616 pub use Foo::*; use nest::{Bar, D, E, F}; diff --git a/tests/ui/structs-enums/namespaced-enum-glob-import-xcrate.rs b/tests/ui/structs-enums/namespaced-enum-glob-import-xcrate.rs index d2ccadea007..4e58c1f717f 100644 --- a/tests/ui/structs-enums/namespaced-enum-glob-import-xcrate.rs +++ b/tests/ui/structs-enums/namespaced-enum-glob-import-xcrate.rs @@ -1,7 +1,7 @@ -// run-pass -// aux-build:namespaced_enums.rs +//@ run-pass +//@ aux-build:namespaced_enums.rs -// pretty-expanded FIXME #23616 +//@ pretty-expanded FIXME #23616 extern crate namespaced_enums; diff --git a/tests/ui/structs-enums/namespaced-enum-glob-import.rs b/tests/ui/structs-enums/namespaced-enum-glob-import.rs index f36ac69dc08..d02ee5a122d 100644 --- a/tests/ui/structs-enums/namespaced-enum-glob-import.rs +++ b/tests/ui/structs-enums/namespaced-enum-glob-import.rs @@ -1,6 +1,6 @@ -// run-pass +//@ run-pass #![allow(dead_code)] -// pretty-expanded FIXME #23616 +//@ pretty-expanded FIXME #23616 mod m2 { pub enum Foo { diff --git a/tests/ui/structs-enums/namespaced-enums-xcrate.rs b/tests/ui/structs-enums/namespaced-enums-xcrate.rs index 5e10c3ec1d0..b5655e68a47 100644 --- a/tests/ui/structs-enums/namespaced-enums-xcrate.rs +++ b/tests/ui/structs-enums/namespaced-enums-xcrate.rs @@ -1,7 +1,7 @@ -// run-pass -// aux-build:namespaced_enums.rs +//@ run-pass +//@ aux-build:namespaced_enums.rs -// pretty-expanded FIXME #23616 +//@ pretty-expanded FIXME #23616 extern crate namespaced_enums; diff --git a/tests/ui/structs-enums/namespaced-enums.rs b/tests/ui/structs-enums/namespaced-enums.rs index 6a2602501a5..1ce9319b8ec 100644 --- a/tests/ui/structs-enums/namespaced-enums.rs +++ b/tests/ui/structs-enums/namespaced-enums.rs @@ -1,6 +1,6 @@ -// run-pass +//@ run-pass #![allow(dead_code)] -// pretty-expanded FIXME #23616 +//@ pretty-expanded FIXME #23616 enum Foo { A, diff --git a/tests/ui/structs-enums/nested-enum-same-names.rs b/tests/ui/structs-enums/nested-enum-same-names.rs index 111b9ba9477..e24073c38e9 100644 --- a/tests/ui/structs-enums/nested-enum-same-names.rs +++ b/tests/ui/structs-enums/nested-enum-same-names.rs @@ -1,6 +1,6 @@ -// run-pass +//@ run-pass #![allow(dead_code)] -// pretty-expanded FIXME #23616 +//@ pretty-expanded FIXME #23616 /* diff --git a/tests/ui/structs-enums/newtype-struct-drop-run.rs b/tests/ui/structs-enums/newtype-struct-drop-run.rs index 0754f318701..8df34de3d84 100644 --- a/tests/ui/structs-enums/newtype-struct-drop-run.rs +++ b/tests/ui/structs-enums/newtype-struct-drop-run.rs @@ -1,4 +1,4 @@ -// run-pass +//@ run-pass // Make sure the destructor is run for newtype structs. use std::cell::Cell; diff --git a/tests/ui/structs-enums/newtype-struct-with-dtor.rs b/tests/ui/structs-enums/newtype-struct-with-dtor.rs index f73b492dfcf..19672e41c9a 100644 --- a/tests/ui/structs-enums/newtype-struct-with-dtor.rs +++ b/tests/ui/structs-enums/newtype-struct-with-dtor.rs @@ -1,7 +1,7 @@ -// run-pass +//@ run-pass #![allow(unused_unsafe)] #![allow(unused_variables)] -// pretty-expanded FIXME #23616 +//@ pretty-expanded FIXME #23616 pub struct Fd(u32); diff --git a/tests/ui/structs-enums/newtype-struct-xc-2.rs b/tests/ui/structs-enums/newtype-struct-xc-2.rs index 40837321be2..e83025346d7 100644 --- a/tests/ui/structs-enums/newtype-struct-xc-2.rs +++ b/tests/ui/structs-enums/newtype-struct-xc-2.rs @@ -1,7 +1,7 @@ -// run-pass -// aux-build:newtype_struct_xc.rs +//@ run-pass +//@ aux-build:newtype_struct_xc.rs -// pretty-expanded FIXME #23616 +//@ pretty-expanded FIXME #23616 extern crate newtype_struct_xc; use newtype_struct_xc::Au; diff --git a/tests/ui/structs-enums/newtype-struct-xc.rs b/tests/ui/structs-enums/newtype-struct-xc.rs index 0c6466d97fc..6f90cfe8e4a 100644 --- a/tests/ui/structs-enums/newtype-struct-xc.rs +++ b/tests/ui/structs-enums/newtype-struct-xc.rs @@ -1,7 +1,7 @@ -// run-pass -// aux-build:newtype_struct_xc.rs +//@ run-pass +//@ aux-build:newtype_struct_xc.rs -// pretty-expanded FIXME #23616 +//@ pretty-expanded FIXME #23616 extern crate newtype_struct_xc; diff --git a/tests/ui/structs-enums/nonzero-enum.rs b/tests/ui/structs-enums/nonzero-enum.rs index 15b571be563..40abcdc78e5 100644 --- a/tests/ui/structs-enums/nonzero-enum.rs +++ b/tests/ui/structs-enums/nonzero-enum.rs @@ -1,4 +1,4 @@ -// run-pass +//@ run-pass #![allow(dead_code)] use std::mem::size_of; diff --git a/tests/ui/structs-enums/numeric-fields.rs b/tests/ui/structs-enums/numeric-fields.rs index 6ff3afc3870..3b610f4aaef 100644 --- a/tests/ui/structs-enums/numeric-fields.rs +++ b/tests/ui/structs-enums/numeric-fields.rs @@ -1,4 +1,4 @@ -// run-pass +//@ run-pass struct S(u8, u16); fn main() { diff --git a/tests/ui/structs-enums/rec-align-u32.rs b/tests/ui/structs-enums/rec-align-u32.rs index b3c323d2a29..9cd2a988871 100644 --- a/tests/ui/structs-enums/rec-align-u32.rs +++ b/tests/ui/structs-enums/rec-align-u32.rs @@ -1,4 +1,4 @@ -// run-pass +//@ run-pass #![allow(dead_code)] #![allow(unused_unsafe)] // Issue #2303 diff --git a/tests/ui/structs-enums/rec-align-u64.rs b/tests/ui/structs-enums/rec-align-u64.rs index de008bcc01d..e4b02fa0c58 100644 --- a/tests/ui/structs-enums/rec-align-u64.rs +++ b/tests/ui/structs-enums/rec-align-u64.rs @@ -1,7 +1,7 @@ -// run-pass +//@ run-pass #![allow(dead_code)] #![allow(unused_unsafe)] -// ignore-wasm32-bare seems unimportant to test +//@ ignore-wasm32-bare seems unimportant to test // Issue #2303 diff --git a/tests/ui/structs-enums/rec-auto.rs b/tests/ui/structs-enums/rec-auto.rs index c2ef13ede4c..bf2e37a189b 100644 --- a/tests/ui/structs-enums/rec-auto.rs +++ b/tests/ui/structs-enums/rec-auto.rs @@ -1,4 +1,4 @@ -// run-pass +//@ run-pass diff --git a/tests/ui/structs-enums/rec-extend.rs b/tests/ui/structs-enums/rec-extend.rs index 4c91cd1850e..2141523ce9e 100644 --- a/tests/ui/structs-enums/rec-extend.rs +++ b/tests/ui/structs-enums/rec-extend.rs @@ -1,4 +1,4 @@ -// run-pass +//@ run-pass diff --git a/tests/ui/structs-enums/rec-tup.rs b/tests/ui/structs-enums/rec-tup.rs index b85d28fdf03..941733056eb 100644 --- a/tests/ui/structs-enums/rec-tup.rs +++ b/tests/ui/structs-enums/rec-tup.rs @@ -1,4 +1,4 @@ -// run-pass +//@ run-pass #![allow(non_camel_case_types)] diff --git a/tests/ui/structs-enums/rec.rs b/tests/ui/structs-enums/rec.rs index 82c84ebd6ff..734bd523497 100644 --- a/tests/ui/structs-enums/rec.rs +++ b/tests/ui/structs-enums/rec.rs @@ -1,4 +1,4 @@ -// run-pass +//@ run-pass #[derive(Copy, Clone)] struct Rect {x: isize, y: isize, w: isize, h: isize} diff --git a/tests/ui/structs-enums/record-pat.rs b/tests/ui/structs-enums/record-pat.rs index 1acaf2a32c2..1959f9bc320 100644 --- a/tests/ui/structs-enums/record-pat.rs +++ b/tests/ui/structs-enums/record-pat.rs @@ -1,4 +1,4 @@ -// run-pass +//@ run-pass #![allow(non_camel_case_types)] #![allow(non_shorthand_field_patterns)] diff --git a/tests/ui/structs-enums/resource-in-struct.rs b/tests/ui/structs-enums/resource-in-struct.rs index 267ad6b4a86..0614b6c3622 100644 --- a/tests/ui/structs-enums/resource-in-struct.rs +++ b/tests/ui/structs-enums/resource-in-struct.rs @@ -1,4 +1,4 @@ -// run-pass +//@ run-pass #![allow(non_camel_case_types)] // Ensures that class dtors run if the object is inside an enum diff --git a/tests/ui/structs-enums/simple-generic-tag.rs b/tests/ui/structs-enums/simple-generic-tag.rs index dbd2834d468..59521a446f4 100644 --- a/tests/ui/structs-enums/simple-generic-tag.rs +++ b/tests/ui/structs-enums/simple-generic-tag.rs @@ -1,10 +1,10 @@ -// run-pass +//@ run-pass #![allow(dead_code)] #![allow(non_camel_case_types)] -// pretty-expanded FIXME #23616 +//@ pretty-expanded FIXME #23616 enum clam { a(T), } diff --git a/tests/ui/structs-enums/simple-match-generic-tag.rs b/tests/ui/structs-enums/simple-match-generic-tag.rs index 762fd49ad24..47a2d1054e0 100644 --- a/tests/ui/structs-enums/simple-match-generic-tag.rs +++ b/tests/ui/structs-enums/simple-match-generic-tag.rs @@ -1,4 +1,4 @@ -// run-pass +//@ run-pass #![allow(dead_code)] #![allow(non_camel_case_types)] diff --git a/tests/ui/structs-enums/small-enum-range-edge.rs b/tests/ui/structs-enums/small-enum-range-edge.rs index 30612947963..6ffd0f101cd 100644 --- a/tests/ui/structs-enums/small-enum-range-edge.rs +++ b/tests/ui/structs-enums/small-enum-range-edge.rs @@ -1,4 +1,4 @@ -// run-pass +//@ run-pass #![allow(non_upper_case_globals)] // Tests the range assertion wraparound case when reading discriminants. diff --git a/tests/ui/structs-enums/small-enums-with-fields.rs b/tests/ui/structs-enums/small-enums-with-fields.rs index 565ec1bd45d..d38fb5165e0 100644 --- a/tests/ui/structs-enums/small-enums-with-fields.rs +++ b/tests/ui/structs-enums/small-enums-with-fields.rs @@ -1,4 +1,4 @@ -// run-pass +//@ run-pass use std::mem::size_of; #[derive(PartialEq, Debug)] diff --git a/tests/ui/structs-enums/struct-aliases-xcrate.rs b/tests/ui/structs-enums/struct-aliases-xcrate.rs index ffe7b22f809..fc9ce1a1015 100644 --- a/tests/ui/structs-enums/struct-aliases-xcrate.rs +++ b/tests/ui/structs-enums/struct-aliases-xcrate.rs @@ -1,8 +1,8 @@ -// run-pass +//@ run-pass #![allow(unused_imports)] #![allow(non_shorthand_field_patterns)] -// aux-build:xcrate_struct_aliases.rs +//@ aux-build:xcrate_struct_aliases.rs extern crate xcrate_struct_aliases; diff --git a/tests/ui/structs-enums/struct-aliases.rs b/tests/ui/structs-enums/struct-aliases.rs index b7aeed7bc39..6b5f55a9d16 100644 --- a/tests/ui/structs-enums/struct-aliases.rs +++ b/tests/ui/structs-enums/struct-aliases.rs @@ -1,4 +1,4 @@ -// run-pass +//@ run-pass #![allow(non_shorthand_field_patterns)] use std::mem; diff --git a/tests/ui/structs-enums/struct-destructuring-cross-crate.rs b/tests/ui/structs-enums/struct-destructuring-cross-crate.rs index 19e0a0bbdd2..df740bdb310 100644 --- a/tests/ui/structs-enums/struct-destructuring-cross-crate.rs +++ b/tests/ui/structs-enums/struct-destructuring-cross-crate.rs @@ -1,5 +1,5 @@ -// run-pass -// aux-build:struct_destructuring_cross_crate.rs +//@ run-pass +//@ aux-build:struct_destructuring_cross_crate.rs extern crate struct_destructuring_cross_crate; diff --git a/tests/ui/structs-enums/struct-field-shorthand.rs b/tests/ui/structs-enums/struct-field-shorthand.rs index ed650c68364..7d78bccc0ae 100644 --- a/tests/ui/structs-enums/struct-field-shorthand.rs +++ b/tests/ui/structs-enums/struct-field-shorthand.rs @@ -1,4 +1,4 @@ -// run-pass +//@ run-pass struct Foo { x: i32, y: bool, diff --git a/tests/ui/structs-enums/struct-like-variant-construct.rs b/tests/ui/structs-enums/struct-like-variant-construct.rs index 60fc7ce394c..5a49d715b21 100644 --- a/tests/ui/structs-enums/struct-like-variant-construct.rs +++ b/tests/ui/structs-enums/struct-like-variant-construct.rs @@ -1,6 +1,6 @@ -// run-pass +//@ run-pass #![allow(dead_code)] -// pretty-expanded FIXME #23616 +//@ pretty-expanded FIXME #23616 enum Foo { Bar { diff --git a/tests/ui/structs-enums/struct-like-variant-match.rs b/tests/ui/structs-enums/struct-like-variant-match.rs index ade1a697037..9af0c105394 100644 --- a/tests/ui/structs-enums/struct-like-variant-match.rs +++ b/tests/ui/structs-enums/struct-like-variant-match.rs @@ -1,4 +1,4 @@ -// run-pass +//@ run-pass #![allow(non_shorthand_field_patterns)] enum Foo { diff --git a/tests/ui/structs-enums/struct-lit-functional-no-fields.rs b/tests/ui/structs-enums/struct-lit-functional-no-fields.rs index f19604e951c..0eb716da4f0 100644 --- a/tests/ui/structs-enums/struct-lit-functional-no-fields.rs +++ b/tests/ui/structs-enums/struct-lit-functional-no-fields.rs @@ -1,4 +1,4 @@ -// run-pass +//@ run-pass #[derive(Debug,PartialEq,Clone)] struct Foo { bar: T, diff --git a/tests/ui/structs-enums/struct-literal-dtor.rs b/tests/ui/structs-enums/struct-literal-dtor.rs index 6d1b1dfb9b6..30b1f113938 100644 --- a/tests/ui/structs-enums/struct-literal-dtor.rs +++ b/tests/ui/structs-enums/struct-literal-dtor.rs @@ -1,4 +1,4 @@ -// run-pass +//@ run-pass #![allow(non_camel_case_types)] struct foo { diff --git a/tests/ui/structs-enums/struct-new-as-field-name.rs b/tests/ui/structs-enums/struct-new-as-field-name.rs index 641fc3c5867..1f776b40f52 100644 --- a/tests/ui/structs-enums/struct-new-as-field-name.rs +++ b/tests/ui/structs-enums/struct-new-as-field-name.rs @@ -1,4 +1,4 @@ -// run-pass +//@ run-pass struct Foo { new: isize, diff --git a/tests/ui/structs-enums/struct-order-of-eval-1.rs b/tests/ui/structs-enums/struct-order-of-eval-1.rs index f3fe9953856..25cdabcc03c 100644 --- a/tests/ui/structs-enums/struct-order-of-eval-1.rs +++ b/tests/ui/structs-enums/struct-order-of-eval-1.rs @@ -1,4 +1,4 @@ -// run-pass +//@ run-pass #![allow(dead_code)] struct S { f0: String, f1: isize } diff --git a/tests/ui/structs-enums/struct-order-of-eval-2.rs b/tests/ui/structs-enums/struct-order-of-eval-2.rs index a4e0edc97c6..eb425e62d8e 100644 --- a/tests/ui/structs-enums/struct-order-of-eval-2.rs +++ b/tests/ui/structs-enums/struct-order-of-eval-2.rs @@ -1,4 +1,4 @@ -// run-pass +//@ run-pass #![allow(dead_code)] struct S { diff --git a/tests/ui/structs-enums/struct-order-of-eval-3.rs b/tests/ui/structs-enums/struct-order-of-eval-3.rs index 60887f8d05a..d0ce498ac4f 100644 --- a/tests/ui/structs-enums/struct-order-of-eval-3.rs +++ b/tests/ui/structs-enums/struct-order-of-eval-3.rs @@ -1,4 +1,4 @@ -// run-pass +//@ run-pass // Checks that functional-record-update order-of-eval is as expected // even when no Drop-implementations are involved. diff --git a/tests/ui/structs-enums/struct-order-of-eval-4.rs b/tests/ui/structs-enums/struct-order-of-eval-4.rs index 547df631846..0ad22296ba6 100644 --- a/tests/ui/structs-enums/struct-order-of-eval-4.rs +++ b/tests/ui/structs-enums/struct-order-of-eval-4.rs @@ -1,4 +1,4 @@ -// run-pass +//@ run-pass // Checks that struct-literal expression order-of-eval is as expected // even when no Drop-implementations are involved. diff --git a/tests/ui/structs-enums/struct-partial-move-1.rs b/tests/ui/structs-enums/struct-partial-move-1.rs index c1570159388..9494922b7d7 100644 --- a/tests/ui/structs-enums/struct-partial-move-1.rs +++ b/tests/ui/structs-enums/struct-partial-move-1.rs @@ -1,4 +1,4 @@ -// run-pass +//@ run-pass #[derive(PartialEq, Debug)] pub struct Partial { x: T, y: T } diff --git a/tests/ui/structs-enums/struct-partial-move-2.rs b/tests/ui/structs-enums/struct-partial-move-2.rs index 4315e5c29f3..2c29f528554 100644 --- a/tests/ui/structs-enums/struct-partial-move-2.rs +++ b/tests/ui/structs-enums/struct-partial-move-2.rs @@ -1,4 +1,4 @@ -// run-pass +//@ run-pass #[derive(PartialEq, Debug)] pub struct Partial { x: T, y: T } diff --git a/tests/ui/structs-enums/struct-path-associated-type.rs b/tests/ui/structs-enums/struct-path-associated-type.rs index 2235dfe4b84..158c2ed7dda 100644 --- a/tests/ui/structs-enums/struct-path-associated-type.rs +++ b/tests/ui/structs-enums/struct-path-associated-type.rs @@ -1,4 +1,4 @@ -// run-pass +//@ run-pass #![allow(dead_code)] struct S { a: T, diff --git a/tests/ui/structs-enums/struct-path-self.rs b/tests/ui/structs-enums/struct-path-self.rs index e7a59858f57..0906b4f3240 100644 --- a/tests/ui/structs-enums/struct-path-self.rs +++ b/tests/ui/structs-enums/struct-path-self.rs @@ -1,4 +1,4 @@ -// run-pass +//@ run-pass use std::ops::Add; struct S { diff --git a/tests/ui/structs-enums/struct-pattern-matching.rs b/tests/ui/structs-enums/struct-pattern-matching.rs index 89361bf2455..96325fc3c14 100644 --- a/tests/ui/structs-enums/struct-pattern-matching.rs +++ b/tests/ui/structs-enums/struct-pattern-matching.rs @@ -1,4 +1,4 @@ -// run-pass +//@ run-pass #![allow(non_shorthand_field_patterns)] struct Foo { diff --git a/tests/ui/structs-enums/struct-variant-field-visibility.rs b/tests/ui/structs-enums/struct-variant-field-visibility.rs index 7896c829a6e..02d1ceb0513 100644 --- a/tests/ui/structs-enums/struct-variant-field-visibility.rs +++ b/tests/ui/structs-enums/struct-variant-field-visibility.rs @@ -1,6 +1,6 @@ -// run-pass +//@ run-pass #![allow(dead_code)] -// pretty-expanded FIXME #23616 +//@ pretty-expanded FIXME #23616 mod foo { pub enum Foo { diff --git a/tests/ui/structs-enums/struct_variant_xc.rs b/tests/ui/structs-enums/struct_variant_xc.rs index 9c8d1a69a3e..4723f229185 100644 --- a/tests/ui/structs-enums/struct_variant_xc.rs +++ b/tests/ui/structs-enums/struct_variant_xc.rs @@ -1,6 +1,6 @@ -// run-pass -// aux-build:struct_variant_xc_aux.rs -// pretty-expanded FIXME #23616 +//@ run-pass +//@ aux-build:struct_variant_xc_aux.rs +//@ pretty-expanded FIXME #23616 extern crate struct_variant_xc_aux; diff --git a/tests/ui/structs-enums/struct_variant_xc_match.rs b/tests/ui/structs-enums/struct_variant_xc_match.rs index 5358d13faa9..b802034ef6d 100644 --- a/tests/ui/structs-enums/struct_variant_xc_match.rs +++ b/tests/ui/structs-enums/struct_variant_xc_match.rs @@ -1,5 +1,5 @@ -// run-pass -// aux-build:struct_variant_xc_aux.rs +//@ run-pass +//@ aux-build:struct_variant_xc_aux.rs extern crate struct_variant_xc_aux; diff --git a/tests/ui/structs-enums/tag-align-dyn-u64.rs b/tests/ui/structs-enums/tag-align-dyn-u64.rs index 3f7a5e3e511..5e7d918b4fb 100644 --- a/tests/ui/structs-enums/tag-align-dyn-u64.rs +++ b/tests/ui/structs-enums/tag-align-dyn-u64.rs @@ -1,4 +1,4 @@ -// run-pass +//@ run-pass #![allow(dead_code)] #![allow(deprecated)] diff --git a/tests/ui/structs-enums/tag-align-dyn-variants.rs b/tests/ui/structs-enums/tag-align-dyn-variants.rs index 4d075b04c97..c0574f3354e 100644 --- a/tests/ui/structs-enums/tag-align-dyn-variants.rs +++ b/tests/ui/structs-enums/tag-align-dyn-variants.rs @@ -1,4 +1,4 @@ -// run-pass +//@ run-pass #![allow(dead_code)] #![allow(deprecated)] #![allow(non_snake_case)] diff --git a/tests/ui/structs-enums/tag-align-shape.rs b/tests/ui/structs-enums/tag-align-shape.rs index ce599582378..6e62250e0d5 100644 --- a/tests/ui/structs-enums/tag-align-shape.rs +++ b/tests/ui/structs-enums/tag-align-shape.rs @@ -1,4 +1,4 @@ -// run-pass +//@ run-pass #![allow(non_camel_case_types)] #![allow(dead_code)] diff --git a/tests/ui/structs-enums/tag-align-u64.rs b/tests/ui/structs-enums/tag-align-u64.rs index 684b27cd030..8ab9f242822 100644 --- a/tests/ui/structs-enums/tag-align-u64.rs +++ b/tests/ui/structs-enums/tag-align-u64.rs @@ -1,4 +1,4 @@ -// run-pass +//@ run-pass #![allow(dead_code)] #![allow(deprecated)] diff --git a/tests/ui/structs-enums/tag-disr-val-shape.rs b/tests/ui/structs-enums/tag-disr-val-shape.rs index 51052626c30..996b87c4a3a 100644 --- a/tests/ui/structs-enums/tag-disr-val-shape.rs +++ b/tests/ui/structs-enums/tag-disr-val-shape.rs @@ -1,4 +1,4 @@ -// run-pass +//@ run-pass #![allow(dead_code)] #![allow(non_camel_case_types)] diff --git a/tests/ui/structs-enums/tag-exports.rs b/tests/ui/structs-enums/tag-exports.rs index 1bcb7d35da3..a01b951e675 100644 --- a/tests/ui/structs-enums/tag-exports.rs +++ b/tests/ui/structs-enums/tag-exports.rs @@ -1,8 +1,8 @@ -// run-pass +//@ run-pass #![allow(dead_code)] #![allow(non_camel_case_types)] -// pretty-expanded FIXME #23616 +//@ pretty-expanded FIXME #23616 use alder::*; diff --git a/tests/ui/structs-enums/tag-in-block.rs b/tests/ui/structs-enums/tag-in-block.rs index 03d4dd9b0ab..944a611c71a 100644 --- a/tests/ui/structs-enums/tag-in-block.rs +++ b/tests/ui/structs-enums/tag-in-block.rs @@ -1,10 +1,10 @@ -// run-pass +//@ run-pass #![allow(dead_code)] #![allow(non_camel_case_types)] -// pretty-expanded FIXME #23616 +//@ pretty-expanded FIXME #23616 fn foo() { fn zed(_z: bar) { } diff --git a/tests/ui/structs-enums/tag-variant-disr-type-mismatch.rs b/tests/ui/structs-enums/tag-variant-disr-type-mismatch.rs index 3f59db38310..9205ac81650 100644 --- a/tests/ui/structs-enums/tag-variant-disr-type-mismatch.rs +++ b/tests/ui/structs-enums/tag-variant-disr-type-mismatch.rs @@ -1,8 +1,8 @@ -// run-pass +//@ run-pass #![allow(dead_code)] #![allow(non_camel_case_types)] -// pretty-expanded FIXME #23616 +//@ pretty-expanded FIXME #23616 enum color { red = 1, diff --git a/tests/ui/structs-enums/tag-variant-disr-val.rs b/tests/ui/structs-enums/tag-variant-disr-val.rs index 297d85c5886..bd34c3a1eb5 100644 --- a/tests/ui/structs-enums/tag-variant-disr-val.rs +++ b/tests/ui/structs-enums/tag-variant-disr-val.rs @@ -1,4 +1,4 @@ -// run-pass +//@ run-pass #![allow(non_camel_case_types)] use color::{red, green, blue, black, white, imaginary, purple, orange}; diff --git a/tests/ui/structs-enums/tag.rs b/tests/ui/structs-enums/tag.rs index 5fcd64b7cd1..16e6b2341cf 100644 --- a/tests/ui/structs-enums/tag.rs +++ b/tests/ui/structs-enums/tag.rs @@ -1,4 +1,4 @@ -// run-pass +//@ run-pass #![allow(unused_parens)] #![allow(non_camel_case_types)] diff --git a/tests/ui/structs-enums/tuple-struct-construct.rs b/tests/ui/structs-enums/tuple-struct-construct.rs index dc7cbaffddb..4243bccb4eb 100644 --- a/tests/ui/structs-enums/tuple-struct-construct.rs +++ b/tests/ui/structs-enums/tuple-struct-construct.rs @@ -1,4 +1,4 @@ -// run-pass +//@ run-pass #[allow(dead_code)] #[derive(Debug)] struct Foo(isize, isize); diff --git a/tests/ui/structs-enums/tuple-struct-constructor-pointer.rs b/tests/ui/structs-enums/tuple-struct-constructor-pointer.rs index 23f06516323..18a59841e9f 100644 --- a/tests/ui/structs-enums/tuple-struct-constructor-pointer.rs +++ b/tests/ui/structs-enums/tuple-struct-constructor-pointer.rs @@ -1,4 +1,4 @@ -// run-pass +//@ run-pass #[derive(PartialEq, Debug)] struct Foo(isize); #[derive(PartialEq, Debug)] diff --git a/tests/ui/structs-enums/tuple-struct-destructuring.rs b/tests/ui/structs-enums/tuple-struct-destructuring.rs index dff87ead033..5213052dd7a 100644 --- a/tests/ui/structs-enums/tuple-struct-destructuring.rs +++ b/tests/ui/structs-enums/tuple-struct-destructuring.rs @@ -1,4 +1,4 @@ -// run-pass +//@ run-pass struct Foo(isize, isize); pub fn main() { diff --git a/tests/ui/structs-enums/tuple-struct-matching.rs b/tests/ui/structs-enums/tuple-struct-matching.rs index 432be1d1f7a..a5436624c65 100644 --- a/tests/ui/structs-enums/tuple-struct-matching.rs +++ b/tests/ui/structs-enums/tuple-struct-matching.rs @@ -1,4 +1,4 @@ -// run-pass +//@ run-pass struct Foo(isize, isize); pub fn main() { diff --git a/tests/ui/structs-enums/tuple-struct-trivial.rs b/tests/ui/structs-enums/tuple-struct-trivial.rs index c8651fd29de..329f80a462e 100644 --- a/tests/ui/structs-enums/tuple-struct-trivial.rs +++ b/tests/ui/structs-enums/tuple-struct-trivial.rs @@ -1,6 +1,6 @@ -// run-pass +//@ run-pass #![allow(dead_code)] -// pretty-expanded FIXME #23616 +//@ pretty-expanded FIXME #23616 struct Foo(isize, isize, isize); diff --git a/tests/ui/structs-enums/type-sizes.rs b/tests/ui/structs-enums/type-sizes.rs index 490d6a2f918..92060e3cade 100644 --- a/tests/ui/structs-enums/type-sizes.rs +++ b/tests/ui/structs-enums/type-sizes.rs @@ -1,4 +1,4 @@ -// run-pass +//@ run-pass #![allow(non_camel_case_types)] #![allow(dead_code)] diff --git a/tests/ui/structs-enums/uninstantiable-struct.rs b/tests/ui/structs-enums/uninstantiable-struct.rs index 15f2fc424bb..97bc7d8414e 100644 --- a/tests/ui/structs-enums/uninstantiable-struct.rs +++ b/tests/ui/structs-enums/uninstantiable-struct.rs @@ -1,4 +1,4 @@ -// run-pass +//@ run-pass pub struct Z(#[allow(dead_code)] &'static Z); pub fn main() {} diff --git a/tests/ui/structs-enums/unit-like-struct-drop-run.rs b/tests/ui/structs-enums/unit-like-struct-drop-run.rs index 1e9c269a4d3..02d14265f3e 100644 --- a/tests/ui/structs-enums/unit-like-struct-drop-run.rs +++ b/tests/ui/structs-enums/unit-like-struct-drop-run.rs @@ -1,6 +1,6 @@ -// run-pass -// needs-unwind -// ignore-emscripten no threads support +//@ run-pass +//@ needs-unwind +//@ ignore-emscripten no threads support // Make sure the destructor is run for unit-like structs. diff --git a/tests/ui/structs-enums/unit-like-struct.rs b/tests/ui/structs-enums/unit-like-struct.rs index 636ec992667..8a2f500676e 100644 --- a/tests/ui/structs-enums/unit-like-struct.rs +++ b/tests/ui/structs-enums/unit-like-struct.rs @@ -1,4 +1,4 @@ -// run-pass +//@ run-pass struct Foo; pub fn main() { diff --git a/tests/ui/structs-enums/variant-structs-trivial.rs b/tests/ui/structs-enums/variant-structs-trivial.rs index 31fa610a69d..8ca86fa35ee 100644 --- a/tests/ui/structs-enums/variant-structs-trivial.rs +++ b/tests/ui/structs-enums/variant-structs-trivial.rs @@ -1,6 +1,6 @@ -// run-pass +//@ run-pass #![allow(dead_code)] -// pretty-expanded FIXME #23616 +//@ pretty-expanded FIXME #23616 enum Foo { Bar { x: isize }, diff --git a/tests/ui/structs/large-records.rs b/tests/ui/structs/large-records.rs index 7f850a94e89..c78b6259667 100644 --- a/tests/ui/structs/large-records.rs +++ b/tests/ui/structs/large-records.rs @@ -1,11 +1,11 @@ -// run-pass +//@ run-pass #![allow(dead_code)] -// pretty-expanded FIXME #23616 +//@ pretty-expanded FIXME #23616 struct Large {a: isize, b: isize, diff --git a/tests/ui/structs/rhs-type.rs b/tests/ui/structs/rhs-type.rs index c48e7c08ed2..fde5c16a068 100644 --- a/tests/ui/structs/rhs-type.rs +++ b/tests/ui/structs/rhs-type.rs @@ -1,9 +1,9 @@ // Tests that codegen treats the rhs of pth's decl // as a _|_-typed thing, not a str-typed thing -// run-fail -// error-pattern:bye -// ignore-emscripten no processes +//@ run-fail +//@ error-pattern:bye +//@ ignore-emscripten no processes #![allow(unreachable_code)] #![allow(unused_variables)] diff --git a/tests/ui/structs/struct-duplicate-comma.fixed b/tests/ui/structs/struct-duplicate-comma.fixed index c804cf57aba..2f40f960975 100644 --- a/tests/ui/structs/struct-duplicate-comma.fixed +++ b/tests/ui/structs/struct-duplicate-comma.fixed @@ -1,4 +1,4 @@ -// run-rustfix +//@ run-rustfix // Issue #50974 pub struct Foo { diff --git a/tests/ui/structs/struct-duplicate-comma.rs b/tests/ui/structs/struct-duplicate-comma.rs index db2e7cb3d05..5982cea93f5 100644 --- a/tests/ui/structs/struct-duplicate-comma.rs +++ b/tests/ui/structs/struct-duplicate-comma.rs @@ -1,4 +1,4 @@ -// run-rustfix +//@ run-rustfix // Issue #50974 pub struct Foo { diff --git a/tests/ui/structs/struct-field-privacy.rs b/tests/ui/structs/struct-field-privacy.rs index 898ca475cb1..d70dd5c7005 100644 --- a/tests/ui/structs/struct-field-privacy.rs +++ b/tests/ui/structs/struct-field-privacy.rs @@ -1,4 +1,4 @@ -// aux-build:struct_field_privacy.rs +//@ aux-build:struct_field_privacy.rs extern crate struct_field_privacy as xc; diff --git a/tests/ui/structs/struct-missing-comma.fixed b/tests/ui/structs/struct-missing-comma.fixed index a28179ba241..800128f503b 100644 --- a/tests/ui/structs/struct-missing-comma.fixed +++ b/tests/ui/structs/struct-missing-comma.fixed @@ -1,5 +1,5 @@ // Issue #50636 -// run-rustfix +//@ run-rustfix pub struct S { pub foo: u32, //~ expected `,`, or `}`, found keyword `pub` diff --git a/tests/ui/structs/struct-missing-comma.rs b/tests/ui/structs/struct-missing-comma.rs index b6d6c9b8f87..b9d8c9eb303 100644 --- a/tests/ui/structs/struct-missing-comma.rs +++ b/tests/ui/structs/struct-missing-comma.rs @@ -1,5 +1,5 @@ // Issue #50636 -// run-rustfix +//@ run-rustfix pub struct S { pub foo: u32 //~ expected `,`, or `}`, found keyword `pub` diff --git a/tests/ui/structs/struct-record-suggestion.fixed b/tests/ui/structs/struct-record-suggestion.fixed index d93a62185b3..25112380704 100644 --- a/tests/ui/structs/struct-record-suggestion.fixed +++ b/tests/ui/structs/struct-record-suggestion.fixed @@ -1,4 +1,4 @@ -// run-rustfix +//@ run-rustfix #[derive(Debug, Default, Eq, PartialEq)] struct A { b: u32, diff --git a/tests/ui/structs/struct-record-suggestion.rs b/tests/ui/structs/struct-record-suggestion.rs index f0fd1c94e9a..9c4be68153a 100644 --- a/tests/ui/structs/struct-record-suggestion.rs +++ b/tests/ui/structs/struct-record-suggestion.rs @@ -1,4 +1,4 @@ -// run-rustfix +//@ run-rustfix #[derive(Debug, Default, Eq, PartialEq)] struct A { b: u32, diff --git a/tests/ui/structs/struct-variant-privacy-xc.rs b/tests/ui/structs/struct-variant-privacy-xc.rs index 763ab952738..729ce11f442 100644 --- a/tests/ui/structs/struct-variant-privacy-xc.rs +++ b/tests/ui/structs/struct-variant-privacy-xc.rs @@ -1,4 +1,4 @@ -// aux-build:struct_variant_privacy.rs +//@ aux-build:struct_variant_privacy.rs extern crate struct_variant_privacy; fn f(b: struct_variant_privacy::Bar) { diff --git a/tests/ui/structs/suggest-private-fields.rs b/tests/ui/structs/suggest-private-fields.rs index 8267a82fe2a..b3bae58a6e4 100644 --- a/tests/ui/structs/suggest-private-fields.rs +++ b/tests/ui/structs/suggest-private-fields.rs @@ -1,4 +1,4 @@ -// aux-build:struct_field_privacy.rs +//@ aux-build:struct_field_privacy.rs extern crate struct_field_privacy as xc; diff --git a/tests/ui/suggest-null-ptr.fixed b/tests/ui/suggest-null-ptr.fixed index 40f900c7d30..55c90859c83 100644 --- a/tests/ui/suggest-null-ptr.fixed +++ b/tests/ui/suggest-null-ptr.fixed @@ -1,4 +1,4 @@ -// run-rustfix +//@ run-rustfix // Suggest providing a std::ptr::null{,_mut}() to a function that takes in a raw // pointer if a literal 0 was provided by the user. diff --git a/tests/ui/suggest-null-ptr.rs b/tests/ui/suggest-null-ptr.rs index 19b595bf769..f4f1269d512 100644 --- a/tests/ui/suggest-null-ptr.rs +++ b/tests/ui/suggest-null-ptr.rs @@ -1,4 +1,4 @@ -// run-rustfix +//@ run-rustfix // Suggest providing a std::ptr::null{,_mut}() to a function that takes in a raw // pointer if a literal 0 was provided by the user. diff --git a/tests/ui/suggestions/abi-typo.fixed b/tests/ui/suggestions/abi-typo.fixed index 04d265865f0..44fa80f6338 100644 --- a/tests/ui/suggestions/abi-typo.fixed +++ b/tests/ui/suggestions/abi-typo.fixed @@ -1,4 +1,4 @@ -// run-rustfix +//@ run-rustfix extern "cdecl" fn cdedl() {} //~ ERROR invalid ABI fn main() { diff --git a/tests/ui/suggestions/abi-typo.rs b/tests/ui/suggestions/abi-typo.rs index 6d80db522eb..3d5c23e0f23 100644 --- a/tests/ui/suggestions/abi-typo.rs +++ b/tests/ui/suggestions/abi-typo.rs @@ -1,4 +1,4 @@ -// run-rustfix +//@ run-rustfix extern "cdedl" fn cdedl() {} //~ ERROR invalid ABI fn main() { diff --git a/tests/ui/suggestions/args-instead-of-tuple.fixed b/tests/ui/suggestions/args-instead-of-tuple.fixed index f913995d7e2..7d38e62e89f 100644 --- a/tests/ui/suggestions/args-instead-of-tuple.fixed +++ b/tests/ui/suggestions/args-instead-of-tuple.fixed @@ -1,7 +1,7 @@ // Test suggesting tuples where bare arguments may have been passed // See issue #86481 for details. -// run-rustfix +//@ run-rustfix fn main() { let _: Result<(i32, i8), ()> = Ok((1, 2)); diff --git a/tests/ui/suggestions/args-instead-of-tuple.rs b/tests/ui/suggestions/args-instead-of-tuple.rs index 1c65407b395..026d6464955 100644 --- a/tests/ui/suggestions/args-instead-of-tuple.rs +++ b/tests/ui/suggestions/args-instead-of-tuple.rs @@ -1,7 +1,7 @@ // Test suggesting tuples where bare arguments may have been passed // See issue #86481 for details. -// run-rustfix +//@ run-rustfix fn main() { let _: Result<(i32, i8), ()> = Ok(1, 2); diff --git a/tests/ui/suggestions/async-fn-ctor-passed-as-arg-where-it-should-have-been-called.rs b/tests/ui/suggestions/async-fn-ctor-passed-as-arg-where-it-should-have-been-called.rs index 156162c9027..11ed167b44a 100644 --- a/tests/ui/suggestions/async-fn-ctor-passed-as-arg-where-it-should-have-been-called.rs +++ b/tests/ui/suggestions/async-fn-ctor-passed-as-arg-where-it-should-have-been-called.rs @@ -1,4 +1,4 @@ -// edition:2018 +//@ edition:2018 #![feature(async_closure)] use std::future::Future; diff --git a/tests/ui/suggestions/auxiliary/issue-61963-1.rs b/tests/ui/suggestions/auxiliary/issue-61963-1.rs index 6c2df7e84e0..33e5f9db2c3 100644 --- a/tests/ui/suggestions/auxiliary/issue-61963-1.rs +++ b/tests/ui/suggestions/auxiliary/issue-61963-1.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/ui/suggestions/auxiliary/issue-61963.rs b/tests/ui/suggestions/auxiliary/issue-61963.rs index e86f1610ab0..bfea8061c4b 100644 --- a/tests/ui/suggestions/auxiliary/issue-61963.rs +++ b/tests/ui/suggestions/auxiliary/issue-61963.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/ui/suggestions/auxiliary/issue-81839.rs b/tests/ui/suggestions/auxiliary/issue-81839.rs index 5683c45adf2..cf1d33c3a56 100644 --- a/tests/ui/suggestions/auxiliary/issue-81839.rs +++ b/tests/ui/suggestions/auxiliary/issue-81839.rs @@ -1,4 +1,4 @@ -// edition:2018 +//@ edition:2018 pub struct Test {} diff --git a/tests/ui/suggestions/auxiliary/proc-macro-type-error.rs b/tests/ui/suggestions/auxiliary/proc-macro-type-error.rs index d71747f9687..aebc5a6aaa9 100644 --- a/tests/ui/suggestions/auxiliary/proc-macro-type-error.rs +++ b/tests/ui/suggestions/auxiliary/proc-macro-type-error.rs @@ -1,5 +1,5 @@ -// force-host -// no-prefer-dynamic +//@ force-host +//@ no-prefer-dynamic #![crate_type = "proc-macro"] #![feature(proc_macro_quote)] diff --git a/tests/ui/suggestions/bound-suggestions.fixed b/tests/ui/suggestions/bound-suggestions.fixed index ef61fb9ad32..565cd26b649 100644 --- a/tests/ui/suggestions/bound-suggestions.fixed +++ b/tests/ui/suggestions/bound-suggestions.fixed @@ -1,4 +1,4 @@ -// run-rustfix +//@ run-rustfix #[allow(unused)] use std::fmt::Debug; diff --git a/tests/ui/suggestions/bound-suggestions.rs b/tests/ui/suggestions/bound-suggestions.rs index 6d17fae6a08..fb547c27e1d 100644 --- a/tests/ui/suggestions/bound-suggestions.rs +++ b/tests/ui/suggestions/bound-suggestions.rs @@ -1,4 +1,4 @@ -// run-rustfix +//@ run-rustfix #[allow(unused)] use std::fmt::Debug; diff --git a/tests/ui/suggestions/box-future-wrong-output.rs b/tests/ui/suggestions/box-future-wrong-output.rs index d49819fcb14..2d45f1b6a51 100644 --- a/tests/ui/suggestions/box-future-wrong-output.rs +++ b/tests/ui/suggestions/box-future-wrong-output.rs @@ -1,5 +1,5 @@ // Issue #72117 -// edition:2018 +//@ edition:2018 use core::future::Future; use core::pin::Pin; diff --git a/tests/ui/suggestions/clone-on-unconstrained-borrowed-type-param.fixed b/tests/ui/suggestions/clone-on-unconstrained-borrowed-type-param.fixed index 4f9e93a47ed..b9fc798949c 100644 --- a/tests/ui/suggestions/clone-on-unconstrained-borrowed-type-param.fixed +++ b/tests/ui/suggestions/clone-on-unconstrained-borrowed-type-param.fixed @@ -1,4 +1,4 @@ -// run-rustfix +//@ run-rustfix fn wat(t: &T) -> T { t.clone() //~ ERROR E0308 } diff --git a/tests/ui/suggestions/clone-on-unconstrained-borrowed-type-param.rs b/tests/ui/suggestions/clone-on-unconstrained-borrowed-type-param.rs index 89b077d671a..d5222be0d20 100644 --- a/tests/ui/suggestions/clone-on-unconstrained-borrowed-type-param.rs +++ b/tests/ui/suggestions/clone-on-unconstrained-borrowed-type-param.rs @@ -1,4 +1,4 @@ -// run-rustfix +//@ run-rustfix fn wat(t: &T) -> T { t.clone() //~ ERROR E0308 } diff --git a/tests/ui/suggestions/constrain-trait.fixed b/tests/ui/suggestions/constrain-trait.fixed index f7360efe4c5..d32747bf2cc 100644 --- a/tests/ui/suggestions/constrain-trait.fixed +++ b/tests/ui/suggestions/constrain-trait.fixed @@ -1,4 +1,4 @@ -// run-rustfix +//@ run-rustfix // check-only #![allow(dead_code)] diff --git a/tests/ui/suggestions/constrain-trait.rs b/tests/ui/suggestions/constrain-trait.rs index 799100669b6..3fa537a305d 100644 --- a/tests/ui/suggestions/constrain-trait.rs +++ b/tests/ui/suggestions/constrain-trait.rs @@ -1,4 +1,4 @@ -// run-rustfix +//@ run-rustfix // check-only #![allow(dead_code)] diff --git a/tests/ui/suggestions/copied-and-cloned.fixed b/tests/ui/suggestions/copied-and-cloned.fixed index 4cecf9e26f9..b6228ebd25e 100644 --- a/tests/ui/suggestions/copied-and-cloned.fixed +++ b/tests/ui/suggestions/copied-and-cloned.fixed @@ -1,4 +1,4 @@ -// run-rustfix +//@ run-rustfix fn expect(_: T) {} diff --git a/tests/ui/suggestions/copied-and-cloned.rs b/tests/ui/suggestions/copied-and-cloned.rs index a79928c50d5..f88d430351d 100644 --- a/tests/ui/suggestions/copied-and-cloned.rs +++ b/tests/ui/suggestions/copied-and-cloned.rs @@ -1,4 +1,4 @@ -// run-rustfix +//@ run-rustfix fn expect(_: T) {} diff --git a/tests/ui/suggestions/core-std-import-order-issue-83564.rs b/tests/ui/suggestions/core-std-import-order-issue-83564.rs index b7fe5af7bf8..2cf1983858a 100644 --- a/tests/ui/suggestions/core-std-import-order-issue-83564.rs +++ b/tests/ui/suggestions/core-std-import-order-issue-83564.rs @@ -1,4 +1,4 @@ -// edition:2018 +//@ edition:2018 // This is a regression test for #83564. // For some reason, Rust 2018 or higher is required to reproduce the bug. diff --git a/tests/ui/suggestions/crate-or-module-typo.rs b/tests/ui/suggestions/crate-or-module-typo.rs index b12ad495e9f..dbc0605c76b 100644 --- a/tests/ui/suggestions/crate-or-module-typo.rs +++ b/tests/ui/suggestions/crate-or-module-typo.rs @@ -1,4 +1,4 @@ -// edition:2018 +//@ edition:2018 use st::cell::Cell; //~ ERROR failed to resolve: use of undeclared crate or module `st` diff --git a/tests/ui/suggestions/derive-clone-for-eq.fixed b/tests/ui/suggestions/derive-clone-for-eq.fixed index a74487019ad..4dc362f9478 100644 --- a/tests/ui/suggestions/derive-clone-for-eq.fixed +++ b/tests/ui/suggestions/derive-clone-for-eq.fixed @@ -1,4 +1,4 @@ -// run-rustfix +//@ run-rustfix // https://github.com/rust-lang/rust/issues/79076 #[derive(Clone, Eq)] //~ ERROR [E0277] diff --git a/tests/ui/suggestions/derive-clone-for-eq.rs b/tests/ui/suggestions/derive-clone-for-eq.rs index 99956ed9879..b3635000f16 100644 --- a/tests/ui/suggestions/derive-clone-for-eq.rs +++ b/tests/ui/suggestions/derive-clone-for-eq.rs @@ -1,4 +1,4 @@ -// run-rustfix +//@ run-rustfix // https://github.com/rust-lang/rust/issues/79076 #[derive(Clone, Eq)] //~ ERROR [E0277] diff --git a/tests/ui/suggestions/dont-suggest-doc-hidden-variant-for-enum/hidden-child.rs b/tests/ui/suggestions/dont-suggest-doc-hidden-variant-for-enum/hidden-child.rs index 38dabc9d71f..cec66214978 100644 --- a/tests/ui/suggestions/dont-suggest-doc-hidden-variant-for-enum/hidden-child.rs +++ b/tests/ui/suggestions/dont-suggest-doc-hidden-variant-for-enum/hidden-child.rs @@ -1,4 +1,4 @@ -// aux-build:hidden-child.rs +//@ aux-build:hidden-child.rs // FIXME(compiler-errors): This currently suggests the wrong thing. // UI test exists to track the problem. diff --git a/tests/ui/suggestions/dont-suggest-doc-hidden-variant-for-enum/hidden-parent.rs b/tests/ui/suggestions/dont-suggest-doc-hidden-variant-for-enum/hidden-parent.rs index 4d96d6c16cb..1c752755777 100644 --- a/tests/ui/suggestions/dont-suggest-doc-hidden-variant-for-enum/hidden-parent.rs +++ b/tests/ui/suggestions/dont-suggest-doc-hidden-variant-for-enum/hidden-parent.rs @@ -1,4 +1,4 @@ -// aux-build:hidden-parent.rs +//@ aux-build:hidden-parent.rs extern crate hidden_parent; diff --git a/tests/ui/suggestions/dont-suggest-foreign-doc-hidden.rs b/tests/ui/suggestions/dont-suggest-foreign-doc-hidden.rs index 779a0c43c02..281975dcc2f 100644 --- a/tests/ui/suggestions/dont-suggest-foreign-doc-hidden.rs +++ b/tests/ui/suggestions/dont-suggest-foreign-doc-hidden.rs @@ -1,5 +1,5 @@ -// aux-build:hidden-struct.rs -// compile-flags: --crate-type lib +//@ aux-build:hidden-struct.rs +//@ compile-flags: --crate-type lib extern crate hidden_struct; diff --git a/tests/ui/suggestions/dont-try-removing-the-field.rs b/tests/ui/suggestions/dont-try-removing-the-field.rs index 948aa2b94d9..80bb15441d4 100644 --- a/tests/ui/suggestions/dont-try-removing-the-field.rs +++ b/tests/ui/suggestions/dont-try-removing-the-field.rs @@ -1,4 +1,4 @@ -// run-pass +//@ run-pass #![allow(dead_code)] diff --git a/tests/ui/suggestions/enum-method-probe.fixed b/tests/ui/suggestions/enum-method-probe.fixed index 6499c92bc6f..611be9911d9 100644 --- a/tests/ui/suggestions/enum-method-probe.fixed +++ b/tests/ui/suggestions/enum-method-probe.fixed @@ -1,5 +1,5 @@ -// compile-flags: --edition=2021 -// run-rustfix +//@ compile-flags: --edition=2021 +//@ run-rustfix #![allow(unused)] diff --git a/tests/ui/suggestions/enum-method-probe.rs b/tests/ui/suggestions/enum-method-probe.rs index 18ea8ed8a58..e183ebd25f2 100644 --- a/tests/ui/suggestions/enum-method-probe.rs +++ b/tests/ui/suggestions/enum-method-probe.rs @@ -1,5 +1,5 @@ -// compile-flags: --edition=2021 -// run-rustfix +//@ compile-flags: --edition=2021 +//@ run-rustfix #![allow(unused)] diff --git a/tests/ui/suggestions/expected-boxed-future-isnt-pinned.rs b/tests/ui/suggestions/expected-boxed-future-isnt-pinned.rs index 7e9c5492d1a..495a62d4fdd 100644 --- a/tests/ui/suggestions/expected-boxed-future-isnt-pinned.rs +++ b/tests/ui/suggestions/expected-boxed-future-isnt-pinned.rs @@ -1,4 +1,4 @@ -// edition:2018 +//@ edition:2018 #![allow(dead_code)] use std::future::Future; use std::pin::Pin; diff --git a/tests/ui/suggestions/field-access.fixed b/tests/ui/suggestions/field-access.fixed index ed9aef6e374..e2ef2493a7b 100644 --- a/tests/ui/suggestions/field-access.fixed +++ b/tests/ui/suggestions/field-access.fixed @@ -1,4 +1,4 @@ -// run-rustfix +//@ run-rustfix #![allow(dead_code)] struct A { diff --git a/tests/ui/suggestions/field-access.rs b/tests/ui/suggestions/field-access.rs index d80488e8a45..d189ba6d2dd 100644 --- a/tests/ui/suggestions/field-access.rs +++ b/tests/ui/suggestions/field-access.rs @@ -1,4 +1,4 @@ -// run-rustfix +//@ run-rustfix #![allow(dead_code)] struct A { diff --git a/tests/ui/suggestions/fn-ctor-passed-as-arg-where-it-should-have-been-called.rs b/tests/ui/suggestions/fn-ctor-passed-as-arg-where-it-should-have-been-called.rs index 4303e5c5405..156f37f9e69 100644 --- a/tests/ui/suggestions/fn-ctor-passed-as-arg-where-it-should-have-been-called.rs +++ b/tests/ui/suggestions/fn-ctor-passed-as-arg-where-it-should-have-been-called.rs @@ -1,4 +1,4 @@ -// edition:2018 +//@ edition:2018 trait T { type O; } diff --git a/tests/ui/suggestions/fn-trait-notation.fixed b/tests/ui/suggestions/fn-trait-notation.fixed index fcf00a17002..18494d2fd86 100644 --- a/tests/ui/suggestions/fn-trait-notation.fixed +++ b/tests/ui/suggestions/fn-trait-notation.fixed @@ -1,4 +1,4 @@ -// run-rustfix +//@ run-rustfix fn e0658(f: F, g: G, h: H) -> i32 where F: Fn(i32) -> i32, //~ ERROR E0658 diff --git a/tests/ui/suggestions/fn-trait-notation.rs b/tests/ui/suggestions/fn-trait-notation.rs index 715bcf71d47..ef0b52c9aa3 100644 --- a/tests/ui/suggestions/fn-trait-notation.rs +++ b/tests/ui/suggestions/fn-trait-notation.rs @@ -1,4 +1,4 @@ -// run-rustfix +//@ run-rustfix fn e0658(f: F, g: G, h: H) -> i32 where F: Fn, //~ ERROR E0658 diff --git a/tests/ui/suggestions/for-i-in-vec.fixed b/tests/ui/suggestions/for-i-in-vec.fixed index 4f2007befff..f266e80bcfa 100644 --- a/tests/ui/suggestions/for-i-in-vec.fixed +++ b/tests/ui/suggestions/for-i-in-vec.fixed @@ -1,4 +1,4 @@ -// run-rustfix +//@ run-rustfix #![allow(dead_code)] struct Foo { diff --git a/tests/ui/suggestions/for-i-in-vec.rs b/tests/ui/suggestions/for-i-in-vec.rs index 55fc7ad4e37..6aee44bb982 100644 --- a/tests/ui/suggestions/for-i-in-vec.rs +++ b/tests/ui/suggestions/for-i-in-vec.rs @@ -1,4 +1,4 @@ -// run-rustfix +//@ run-rustfix #![allow(dead_code)] struct Foo { diff --git a/tests/ui/suggestions/if-then-neeing-semi.rs b/tests/ui/suggestions/if-then-neeing-semi.rs index a4eefb41508..0c1da656055 100644 --- a/tests/ui/suggestions/if-then-neeing-semi.rs +++ b/tests/ui/suggestions/if-then-neeing-semi.rs @@ -1,4 +1,4 @@ -// edition:2018 +//@ edition:2018 fn dummy() -> i32 { 42 diff --git a/tests/ui/suggestions/ignore-nested-field-binding.fixed b/tests/ui/suggestions/ignore-nested-field-binding.fixed index 1dc44838e8b..c594fcb1186 100644 --- a/tests/ui/suggestions/ignore-nested-field-binding.fixed +++ b/tests/ui/suggestions/ignore-nested-field-binding.fixed @@ -1,7 +1,7 @@ // Regression test for #88403, where prefixing with an underscore was // erroneously suggested for a nested shorthand struct field binding. -// run-rustfix +//@ run-rustfix #![allow(unused)] #![forbid(unused_variables)] diff --git a/tests/ui/suggestions/ignore-nested-field-binding.rs b/tests/ui/suggestions/ignore-nested-field-binding.rs index 6dc0263ec9f..34815f9d5b9 100644 --- a/tests/ui/suggestions/ignore-nested-field-binding.rs +++ b/tests/ui/suggestions/ignore-nested-field-binding.rs @@ -1,7 +1,7 @@ // Regression test for #88403, where prefixing with an underscore was // erroneously suggested for a nested shorthand struct field binding. -// run-rustfix +//@ run-rustfix #![allow(unused)] #![forbid(unused_variables)] diff --git a/tests/ui/suggestions/impl-trait-missing-lifetime-gated.rs b/tests/ui/suggestions/impl-trait-missing-lifetime-gated.rs index afde5ee97d7..735efe89cba 100644 --- a/tests/ui/suggestions/impl-trait-missing-lifetime-gated.rs +++ b/tests/ui/suggestions/impl-trait-missing-lifetime-gated.rs @@ -1,4 +1,4 @@ -// edition:2021 +//@ edition:2021 // gate-test-anonymous_lifetime_in_impl_trait // Verify the behaviour of `feature(anonymous_lifetime_in_impl_trait)`. diff --git a/tests/ui/suggestions/impl-trait-missing-lifetime.rs b/tests/ui/suggestions/impl-trait-missing-lifetime.rs index b03d6161493..12dc0e8216b 100644 --- a/tests/ui/suggestions/impl-trait-missing-lifetime.rs +++ b/tests/ui/suggestions/impl-trait-missing-lifetime.rs @@ -1,4 +1,4 @@ -// edition:2021 +//@ edition:2021 #![feature(anonymous_lifetime_in_impl_trait)] diff --git a/tests/ui/suggestions/impl-trait-with-missing-trait-bounds-in-arg.fixed b/tests/ui/suggestions/impl-trait-with-missing-trait-bounds-in-arg.fixed index 5109511f95a..232d1dd8138 100644 --- a/tests/ui/suggestions/impl-trait-with-missing-trait-bounds-in-arg.fixed +++ b/tests/ui/suggestions/impl-trait-with-missing-trait-bounds-in-arg.fixed @@ -1,4 +1,4 @@ -// run-rustfix +//@ run-rustfix trait Foo {} diff --git a/tests/ui/suggestions/impl-trait-with-missing-trait-bounds-in-arg.rs b/tests/ui/suggestions/impl-trait-with-missing-trait-bounds-in-arg.rs index cd05b773861..ab25b362fed 100644 --- a/tests/ui/suggestions/impl-trait-with-missing-trait-bounds-in-arg.rs +++ b/tests/ui/suggestions/impl-trait-with-missing-trait-bounds-in-arg.rs @@ -1,4 +1,4 @@ -// run-rustfix +//@ run-rustfix trait Foo {} diff --git a/tests/ui/suggestions/inner_type.fixed b/tests/ui/suggestions/inner_type.fixed index 7af7391ca85..cfea66b57ec 100644 --- a/tests/ui/suggestions/inner_type.fixed +++ b/tests/ui/suggestions/inner_type.fixed @@ -1,5 +1,5 @@ -// compile-flags: --edition=2021 -// run-rustfix +//@ compile-flags: --edition=2021 +//@ run-rustfix pub struct Struct { pub p: T, diff --git a/tests/ui/suggestions/inner_type.rs b/tests/ui/suggestions/inner_type.rs index 4aca5071625..5fedf3f256e 100644 --- a/tests/ui/suggestions/inner_type.rs +++ b/tests/ui/suggestions/inner_type.rs @@ -1,5 +1,5 @@ -// compile-flags: --edition=2021 -// run-rustfix +//@ compile-flags: --edition=2021 +//@ run-rustfix pub struct Struct { pub p: T, diff --git a/tests/ui/suggestions/issue-101065.fixed b/tests/ui/suggestions/issue-101065.fixed index 88c716cc86c..96290be9648 100644 --- a/tests/ui/suggestions/issue-101065.fixed +++ b/tests/ui/suggestions/issue-101065.fixed @@ -1,5 +1,5 @@ -// check-fail -// run-rustfix +//@ check-fail +//@ run-rustfix enum FakeResult { Ok(T) diff --git a/tests/ui/suggestions/issue-101065.rs b/tests/ui/suggestions/issue-101065.rs index 2715f102708..46017286c30 100644 --- a/tests/ui/suggestions/issue-101065.rs +++ b/tests/ui/suggestions/issue-101065.rs @@ -1,5 +1,5 @@ -// check-fail -// run-rustfix +//@ check-fail +//@ run-rustfix enum FakeResult { Ok(T) diff --git a/tests/ui/suggestions/issue-102972.fixed b/tests/ui/suggestions/issue-102972.fixed index ebd73b2dc14..7e78b53b80c 100644 --- a/tests/ui/suggestions/issue-102972.fixed +++ b/tests/ui/suggestions/issue-102972.fixed @@ -1,4 +1,4 @@ -// run-rustfix +//@ run-rustfix fn test1() { let mut chars = "Hello".chars(); diff --git a/tests/ui/suggestions/issue-102972.rs b/tests/ui/suggestions/issue-102972.rs index 1f8e9776759..a2bc6169a5e 100644 --- a/tests/ui/suggestions/issue-102972.rs +++ b/tests/ui/suggestions/issue-102972.rs @@ -1,4 +1,4 @@ -// run-rustfix +//@ run-rustfix fn test1() { let mut chars = "Hello".chars(); diff --git a/tests/ui/suggestions/issue-104961.fixed b/tests/ui/suggestions/issue-104961.fixed index 36917cf3395..a4047def341 100644 --- a/tests/ui/suggestions/issue-104961.fixed +++ b/tests/ui/suggestions/issue-104961.fixed @@ -1,4 +1,4 @@ -// run-rustfix +//@ run-rustfix fn foo(x: &str) -> bool { x.starts_with(&("hi".to_string() + " you")) diff --git a/tests/ui/suggestions/issue-104961.rs b/tests/ui/suggestions/issue-104961.rs index 25a8e0c45e8..9d02f570c84 100644 --- a/tests/ui/suggestions/issue-104961.rs +++ b/tests/ui/suggestions/issue-104961.rs @@ -1,4 +1,4 @@ -// run-rustfix +//@ run-rustfix fn foo(x: &str) -> bool { x.starts_with("hi".to_string() + " you") diff --git a/tests/ui/suggestions/issue-105761-suggest-self-for-closure.fixed b/tests/ui/suggestions/issue-105761-suggest-self-for-closure.fixed index 78e48364bba..434cc8470e5 100644 --- a/tests/ui/suggestions/issue-105761-suggest-self-for-closure.fixed +++ b/tests/ui/suggestions/issue-105761-suggest-self-for-closure.fixed @@ -1,4 +1,4 @@ -//run-rustfix +//@run-rustfix #![allow(unused)] struct S; diff --git a/tests/ui/suggestions/issue-105761-suggest-self-for-closure.rs b/tests/ui/suggestions/issue-105761-suggest-self-for-closure.rs index 6d8a9ffc12d..90d5f3c5c5f 100644 --- a/tests/ui/suggestions/issue-105761-suggest-self-for-closure.rs +++ b/tests/ui/suggestions/issue-105761-suggest-self-for-closure.rs @@ -1,4 +1,4 @@ -//run-rustfix +//@run-rustfix #![allow(unused)] struct S; diff --git a/tests/ui/suggestions/issue-107860.rs b/tests/ui/suggestions/issue-107860.rs index a6449cd44d0..0b7b8bc65bf 100644 --- a/tests/ui/suggestions/issue-107860.rs +++ b/tests/ui/suggestions/issue-107860.rs @@ -1,4 +1,4 @@ -// edition: 2021 +//@ edition: 2021 async fn str(T: &str) -> &str { &str } //~^ ERROR mismatched types diff --git a/tests/ui/suggestions/issue-108470.fixed b/tests/ui/suggestions/issue-108470.fixed index 9d15c4a8fcb..acc18185c14 100644 --- a/tests/ui/suggestions/issue-108470.fixed +++ b/tests/ui/suggestions/issue-108470.fixed @@ -1,4 +1,4 @@ -// run-rustfix +//@ run-rustfix #![allow(dead_code)] struct Foo { diff --git a/tests/ui/suggestions/issue-108470.rs b/tests/ui/suggestions/issue-108470.rs index bda39085d4d..54b6a5213bd 100644 --- a/tests/ui/suggestions/issue-108470.rs +++ b/tests/ui/suggestions/issue-108470.rs @@ -1,4 +1,4 @@ -// run-rustfix +//@ run-rustfix #![allow(dead_code)] struct Foo { diff --git a/tests/ui/suggestions/issue-114797-bad-parentheses-dyn-trait.fixed b/tests/ui/suggestions/issue-114797-bad-parentheses-dyn-trait.fixed index 57387936a4c..e072c476c6b 100644 --- a/tests/ui/suggestions/issue-114797-bad-parentheses-dyn-trait.fixed +++ b/tests/ui/suggestions/issue-114797-bad-parentheses-dyn-trait.fixed @@ -1,4 +1,4 @@ -//run-rustfix +//@run-rustfix #![allow(dead_code)] trait Trait {} diff --git a/tests/ui/suggestions/issue-114797-bad-parentheses-dyn-trait.rs b/tests/ui/suggestions/issue-114797-bad-parentheses-dyn-trait.rs index 8a1939bcfe9..88995141426 100644 --- a/tests/ui/suggestions/issue-114797-bad-parentheses-dyn-trait.rs +++ b/tests/ui/suggestions/issue-114797-bad-parentheses-dyn-trait.rs @@ -1,4 +1,4 @@ -//run-rustfix +//@run-rustfix #![allow(dead_code)] trait Trait {} diff --git a/tests/ui/suggestions/issue-116434-2021.rs b/tests/ui/suggestions/issue-116434-2021.rs index e7159bc2f3c..6feba3dc6c1 100644 --- a/tests/ui/suggestions/issue-116434-2021.rs +++ b/tests/ui/suggestions/issue-116434-2021.rs @@ -1,4 +1,4 @@ -// edition:2021 +//@ edition:2021 trait Foo { type Clone; diff --git a/tests/ui/suggestions/issue-52820.fixed b/tests/ui/suggestions/issue-52820.fixed index 514690de4d0..4c4593cf3b9 100644 --- a/tests/ui/suggestions/issue-52820.fixed +++ b/tests/ui/suggestions/issue-52820.fixed @@ -1,4 +1,4 @@ -// run-rustfix +//@ run-rustfix #![allow(dead_code)] struct Bravery { diff --git a/tests/ui/suggestions/issue-52820.rs b/tests/ui/suggestions/issue-52820.rs index 17cd9224c57..605775fe0be 100644 --- a/tests/ui/suggestions/issue-52820.rs +++ b/tests/ui/suggestions/issue-52820.rs @@ -1,4 +1,4 @@ -// run-rustfix +//@ run-rustfix #![allow(dead_code)] struct Bravery { diff --git a/tests/ui/suggestions/issue-53692.fixed b/tests/ui/suggestions/issue-53692.fixed index 35a677b4761..b6cb95047cc 100644 --- a/tests/ui/suggestions/issue-53692.fixed +++ b/tests/ui/suggestions/issue-53692.fixed @@ -1,4 +1,4 @@ -// run-rustfix +//@ run-rustfix #![allow(unused_variables)] fn main() { diff --git a/tests/ui/suggestions/issue-53692.rs b/tests/ui/suggestions/issue-53692.rs index 6f6707be5f6..e11317b2cf3 100644 --- a/tests/ui/suggestions/issue-53692.rs +++ b/tests/ui/suggestions/issue-53692.rs @@ -1,4 +1,4 @@ -// run-rustfix +//@ run-rustfix #![allow(unused_variables)] fn main() { diff --git a/tests/ui/suggestions/issue-57672.rs b/tests/ui/suggestions/issue-57672.rs index ee999d83ec2..a6e12996125 100644 --- a/tests/ui/suggestions/issue-57672.rs +++ b/tests/ui/suggestions/issue-57672.rs @@ -1,7 +1,7 @@ -// aux-build:foo.rs -// compile-flags:--extern foo -// check-pass -// edition:2018 +//@ aux-build:foo.rs +//@ compile-flags:--extern foo +//@ check-pass +//@ edition:2018 #![deny(unused_extern_crates)] diff --git a/tests/ui/suggestions/issue-59819.fixed b/tests/ui/suggestions/issue-59819.fixed index 644d2a4e41b..61a9a4a68aa 100644 --- a/tests/ui/suggestions/issue-59819.fixed +++ b/tests/ui/suggestions/issue-59819.fixed @@ -1,4 +1,4 @@ -// run-rustfix +//@ run-rustfix #![allow(warnings)] diff --git a/tests/ui/suggestions/issue-59819.rs b/tests/ui/suggestions/issue-59819.rs index 8e8ff8372e8..cb0daecccac 100644 --- a/tests/ui/suggestions/issue-59819.rs +++ b/tests/ui/suggestions/issue-59819.rs @@ -1,4 +1,4 @@ -// run-rustfix +//@ run-rustfix #![allow(warnings)] diff --git a/tests/ui/suggestions/issue-61226.fixed b/tests/ui/suggestions/issue-61226.fixed index 6e9d74344bc..597ee9fe293 100644 --- a/tests/ui/suggestions/issue-61226.fixed +++ b/tests/ui/suggestions/issue-61226.fixed @@ -1,4 +1,4 @@ -// run-rustfix +//@ run-rustfix struct X {} fn main() { let _ = vec![X {}]; //… diff --git a/tests/ui/suggestions/issue-61226.rs b/tests/ui/suggestions/issue-61226.rs index 695fe73418a..5c5e3876630 100644 --- a/tests/ui/suggestions/issue-61226.rs +++ b/tests/ui/suggestions/issue-61226.rs @@ -1,4 +1,4 @@ -// run-rustfix +//@ run-rustfix struct X {} fn main() { let _ = vec![X]; //… diff --git a/tests/ui/suggestions/issue-61963.rs b/tests/ui/suggestions/issue-61963.rs index d31ed01b191..de82700d7e4 100644 --- a/tests/ui/suggestions/issue-61963.rs +++ b/tests/ui/suggestions/issue-61963.rs @@ -1,5 +1,5 @@ -// aux-build:issue-61963.rs -// aux-build:issue-61963-1.rs +//@ aux-build:issue-61963.rs +//@ aux-build:issue-61963-1.rs #![deny(bare_trait_objects)] #[macro_use] diff --git a/tests/ui/suggestions/issue-71394-no-from-impl.rs b/tests/ui/suggestions/issue-71394-no-from-impl.rs index 63f12a91282..c295a72c7bd 100644 --- a/tests/ui/suggestions/issue-71394-no-from-impl.rs +++ b/tests/ui/suggestions/issue-71394-no-from-impl.rs @@ -1,7 +1,7 @@ -// ignore-wasm -// ignore-msvc -// ignore-emscripten -// ignore-uwp +//@ ignore-wasm +//@ ignore-msvc +//@ ignore-emscripten +//@ ignore-uwp fn main() { let data: &[u8] = &[0; 10]; diff --git a/tests/ui/suggestions/issue-72766.rs b/tests/ui/suggestions/issue-72766.rs index c54be7f5dff..b9b93f22d9c 100644 --- a/tests/ui/suggestions/issue-72766.rs +++ b/tests/ui/suggestions/issue-72766.rs @@ -1,5 +1,5 @@ -// edition:2018 -// incremental +//@ edition:2018 +//@ incremental pub struct SadGirl; diff --git a/tests/ui/suggestions/issue-79843-impl-trait-with-missing-bounds-on-async-fn.rs b/tests/ui/suggestions/issue-79843-impl-trait-with-missing-bounds-on-async-fn.rs index 3cd6d336e13..3c1ad85911d 100644 --- a/tests/ui/suggestions/issue-79843-impl-trait-with-missing-bounds-on-async-fn.rs +++ b/tests/ui/suggestions/issue-79843-impl-trait-with-missing-bounds-on-async-fn.rs @@ -2,7 +2,7 @@ // fn with a named type parameter in order to add bounds, the suggested function // signature should be well-formed. // -// edition:2018 +//@ edition:2018 trait Foo { type Bar; diff --git a/tests/ui/suggestions/issue-81839.rs b/tests/ui/suggestions/issue-81839.rs index 0b9b7aefe73..3971aa9fe84 100644 --- a/tests/ui/suggestions/issue-81839.rs +++ b/tests/ui/suggestions/issue-81839.rs @@ -1,5 +1,5 @@ -// aux-build:issue-81839.rs -// edition:2018 +//@ aux-build:issue-81839.rs +//@ edition:2018 extern crate issue_81839; diff --git a/tests/ui/suggestions/issue-82361.fixed b/tests/ui/suggestions/issue-82361.fixed index d72de982bf9..1eacb2f9247 100644 --- a/tests/ui/suggestions/issue-82361.fixed +++ b/tests/ui/suggestions/issue-82361.fixed @@ -1,4 +1,4 @@ -// run-rustfix +//@ run-rustfix fn main() { let a: usize = 123; diff --git a/tests/ui/suggestions/issue-82361.rs b/tests/ui/suggestions/issue-82361.rs index c068f6d22b4..d68b8ed28a4 100644 --- a/tests/ui/suggestions/issue-82361.rs +++ b/tests/ui/suggestions/issue-82361.rs @@ -1,4 +1,4 @@ -// run-rustfix +//@ run-rustfix fn main() { let a: usize = 123; diff --git a/tests/ui/suggestions/issue-83892.fixed b/tests/ui/suggestions/issue-83892.fixed index dd093a7a0e3..b9a622c62f6 100644 --- a/tests/ui/suggestions/issue-83892.fixed +++ b/tests/ui/suggestions/issue-83892.fixed @@ -1,4 +1,4 @@ -// run-rustfix +//@ run-rustfix fn func() -> u8 { 0 diff --git a/tests/ui/suggestions/issue-83892.rs b/tests/ui/suggestions/issue-83892.rs index 1d56ecee868..b10dcf96eda 100644 --- a/tests/ui/suggestions/issue-83892.rs +++ b/tests/ui/suggestions/issue-83892.rs @@ -1,4 +1,4 @@ -// run-rustfix +//@ run-rustfix fn func() -> u8 { 0 diff --git a/tests/ui/suggestions/issue-83943.fixed b/tests/ui/suggestions/issue-83943.fixed index e0d4ee29ebf..f0ff26c4466 100644 --- a/tests/ui/suggestions/issue-83943.fixed +++ b/tests/ui/suggestions/issue-83943.fixed @@ -1,4 +1,4 @@ -// run-rustfix +//@ run-rustfix fn main() { if true { diff --git a/tests/ui/suggestions/issue-83943.rs b/tests/ui/suggestions/issue-83943.rs index 68d50c1775c..b51f3aa189f 100644 --- a/tests/ui/suggestions/issue-83943.rs +++ b/tests/ui/suggestions/issue-83943.rs @@ -1,4 +1,4 @@ -// run-rustfix +//@ run-rustfix fn main() { if true { diff --git a/tests/ui/suggestions/issue-86667.rs b/tests/ui/suggestions/issue-86667.rs index b1a7e6e9665..8c18a879238 100644 --- a/tests/ui/suggestions/issue-86667.rs +++ b/tests/ui/suggestions/issue-86667.rs @@ -1,7 +1,7 @@ // Regression test for #86667, where a garbled suggestion was issued for // a missing named lifetime parameter. -// compile-flags: --edition 2018 +//@ compile-flags: --edition 2018 async fn a(s1: &str, s2: &str) -> &str { //~^ ERROR: missing lifetime specifier [E0106] diff --git a/tests/ui/suggestions/issue-89333.rs b/tests/ui/suggestions/issue-89333.rs index 03ed28ede21..e1c4750761b 100644 --- a/tests/ui/suggestions/issue-89333.rs +++ b/tests/ui/suggestions/issue-89333.rs @@ -1,4 +1,4 @@ -// check-fail +//@ check-fail // Ensure we don't error when emitting trait bound not satisfied when self type // has late bound var diff --git a/tests/ui/suggestions/issue-90213-expected-boxfuture-self-ice.rs b/tests/ui/suggestions/issue-90213-expected-boxfuture-self-ice.rs index 1e36b2fabf2..f78d4e35545 100644 --- a/tests/ui/suggestions/issue-90213-expected-boxfuture-self-ice.rs +++ b/tests/ui/suggestions/issue-90213-expected-boxfuture-self-ice.rs @@ -1,5 +1,5 @@ // Checks that we do not ICE when comparing `Self` to `Pin` -// edition:2021 +//@ edition:2021 struct S; diff --git a/tests/ui/suggestions/issue-96223.rs b/tests/ui/suggestions/issue-96223.rs index 85667bb849b..ab9acf7b4b2 100644 --- a/tests/ui/suggestions/issue-96223.rs +++ b/tests/ui/suggestions/issue-96223.rs @@ -1,5 +1,5 @@ // Previously ICEd because we didn't properly track binders in suggestions -// check-fail +//@ check-fail pub trait Foo<'de>: Sized {} diff --git a/tests/ui/suggestions/issue-96555.rs b/tests/ui/suggestions/issue-96555.rs index 9f0a047c6e9..11fdc7a55ed 100644 --- a/tests/ui/suggestions/issue-96555.rs +++ b/tests/ui/suggestions/issue-96555.rs @@ -1,4 +1,4 @@ -// edition:2018 +//@ edition:2018 async fn f() { m::f1().await; //~ ERROR `()` is not a future diff --git a/tests/ui/suggestions/issue-97677.fixed b/tests/ui/suggestions/issue-97677.fixed index 1e7569fa451..255910487d4 100644 --- a/tests/ui/suggestions/issue-97677.fixed +++ b/tests/ui/suggestions/issue-97677.fixed @@ -1,4 +1,4 @@ -// run-rustfix +//@ run-rustfix fn add_ten>(n: N) -> N { n + 10 diff --git a/tests/ui/suggestions/issue-97677.rs b/tests/ui/suggestions/issue-97677.rs index 2abf2af3384..a7772a9bf9a 100644 --- a/tests/ui/suggestions/issue-97677.rs +++ b/tests/ui/suggestions/issue-97677.rs @@ -1,4 +1,4 @@ -// run-rustfix +//@ run-rustfix fn add_ten(n: N) -> N { n + 10 diff --git a/tests/ui/suggestions/issue-97704.fixed b/tests/ui/suggestions/issue-97704.fixed index c42bdfff5f9..6347ef1ba84 100644 --- a/tests/ui/suggestions/issue-97704.fixed +++ b/tests/ui/suggestions/issue-97704.fixed @@ -1,5 +1,5 @@ -// edition:2021 -// run-rustfix +//@ edition:2021 +//@ run-rustfix #![allow(unused)] diff --git a/tests/ui/suggestions/issue-97704.rs b/tests/ui/suggestions/issue-97704.rs index 5dfee6cac60..2be27aaf173 100644 --- a/tests/ui/suggestions/issue-97704.rs +++ b/tests/ui/suggestions/issue-97704.rs @@ -1,5 +1,5 @@ -// edition:2021 -// run-rustfix +//@ edition:2021 +//@ run-rustfix #![allow(unused)] diff --git a/tests/ui/suggestions/issue-98500.rs b/tests/ui/suggestions/issue-98500.rs index a2717fd9206..b6fd9e7c23f 100644 --- a/tests/ui/suggestions/issue-98500.rs +++ b/tests/ui/suggestions/issue-98500.rs @@ -1,4 +1,4 @@ -// aux-build:not-object-safe.rs +//@ aux-build:not-object-safe.rs extern crate not_object_safe; diff --git a/tests/ui/suggestions/issue-98562.rs b/tests/ui/suggestions/issue-98562.rs index de04050d593..443537ba39d 100644 --- a/tests/ui/suggestions/issue-98562.rs +++ b/tests/ui/suggestions/issue-98562.rs @@ -1,4 +1,4 @@ -// aux-build:extern-issue-98562.rs +//@ aux-build:extern-issue-98562.rs extern crate extern_issue_98562; use extern_issue_98562::TraitA; diff --git a/tests/ui/suggestions/issue-99080.rs b/tests/ui/suggestions/issue-99080.rs index 91f574f35b8..ecafdd6303d 100644 --- a/tests/ui/suggestions/issue-99080.rs +++ b/tests/ui/suggestions/issue-99080.rs @@ -1,4 +1,4 @@ -// aux-build:meow.rs +//@ aux-build:meow.rs extern crate meow; diff --git a/tests/ui/suggestions/js-style-comparison-op.fixed b/tests/ui/suggestions/js-style-comparison-op.fixed index f7e977b918d..0dd61ea7aaa 100644 --- a/tests/ui/suggestions/js-style-comparison-op.fixed +++ b/tests/ui/suggestions/js-style-comparison-op.fixed @@ -1,4 +1,4 @@ -// run-rustfix +//@ run-rustfix fn main() { if 1 == 1 { //~ ERROR invalid comparison operator `===` println!("yup!"); diff --git a/tests/ui/suggestions/js-style-comparison-op.rs b/tests/ui/suggestions/js-style-comparison-op.rs index c89c1052ed9..621571aa40e 100644 --- a/tests/ui/suggestions/js-style-comparison-op.rs +++ b/tests/ui/suggestions/js-style-comparison-op.rs @@ -1,4 +1,4 @@ -// run-rustfix +//@ run-rustfix fn main() { if 1 === 1 { //~ ERROR invalid comparison operator `===` println!("yup!"); diff --git a/tests/ui/suggestions/lifetimes/issue-105544.fixed b/tests/ui/suggestions/lifetimes/issue-105544.fixed index c92114e1812..ad8f2e7f104 100644 --- a/tests/ui/suggestions/lifetimes/issue-105544.fixed +++ b/tests/ui/suggestions/lifetimes/issue-105544.fixed @@ -1,4 +1,4 @@ -// run-rustfix +//@ run-rustfix #![allow(warnings)] diff --git a/tests/ui/suggestions/lifetimes/issue-105544.rs b/tests/ui/suggestions/lifetimes/issue-105544.rs index bbd0f097f84..d7d164b2a2e 100644 --- a/tests/ui/suggestions/lifetimes/issue-105544.rs +++ b/tests/ui/suggestions/lifetimes/issue-105544.rs @@ -1,4 +1,4 @@ -// run-rustfix +//@ run-rustfix #![allow(warnings)] diff --git a/tests/ui/suggestions/lifetimes/missing-lifetimes-in-signature-2.fixed b/tests/ui/suggestions/lifetimes/missing-lifetimes-in-signature-2.fixed index 474986283fc..9e88814d939 100644 --- a/tests/ui/suggestions/lifetimes/missing-lifetimes-in-signature-2.fixed +++ b/tests/ui/suggestions/lifetimes/missing-lifetimes-in-signature-2.fixed @@ -1,5 +1,5 @@ // Regression test for #81650 -// run-rustfix +//@ run-rustfix #![allow(warnings)] diff --git a/tests/ui/suggestions/lifetimes/missing-lifetimes-in-signature-2.rs b/tests/ui/suggestions/lifetimes/missing-lifetimes-in-signature-2.rs index 99c8e9626af..366e4f8eb8a 100644 --- a/tests/ui/suggestions/lifetimes/missing-lifetimes-in-signature-2.rs +++ b/tests/ui/suggestions/lifetimes/missing-lifetimes-in-signature-2.rs @@ -1,5 +1,5 @@ // Regression test for #81650 -// run-rustfix +//@ run-rustfix #![allow(warnings)] diff --git a/tests/ui/suggestions/lifetimes/missing-lifetimes-in-signature-before-const.fixed b/tests/ui/suggestions/lifetimes/missing-lifetimes-in-signature-before-const.fixed index 3c06f4f88c1..7ad2d60a684 100644 --- a/tests/ui/suggestions/lifetimes/missing-lifetimes-in-signature-before-const.fixed +++ b/tests/ui/suggestions/lifetimes/missing-lifetimes-in-signature-before-const.fixed @@ -1,4 +1,4 @@ -// run-rustfix +//@ run-rustfix // https://github.com/rust-lang/rust/issues/95616 fn buggy_const<'a, const N: usize>(_a: &'a Option<[u8; N]>, _f: &'a str) -> &'a str { //~ERROR [E0106] diff --git a/tests/ui/suggestions/lifetimes/missing-lifetimes-in-signature-before-const.rs b/tests/ui/suggestions/lifetimes/missing-lifetimes-in-signature-before-const.rs index 110468cbbc5..2274c78f114 100644 --- a/tests/ui/suggestions/lifetimes/missing-lifetimes-in-signature-before-const.rs +++ b/tests/ui/suggestions/lifetimes/missing-lifetimes-in-signature-before-const.rs @@ -1,4 +1,4 @@ -// run-rustfix +//@ run-rustfix // https://github.com/rust-lang/rust/issues/95616 fn buggy_const(_a: &Option<[u8; N]>, _f: &str) -> &str { //~ERROR [E0106] diff --git a/tests/ui/suggestions/lifetimes/suggest-using-tick-underscore-lifetime-in-return-trait-object.fixed b/tests/ui/suggestions/lifetimes/suggest-using-tick-underscore-lifetime-in-return-trait-object.fixed index 84315ad9173..3187b27634b 100644 --- a/tests/ui/suggestions/lifetimes/suggest-using-tick-underscore-lifetime-in-return-trait-object.fixed +++ b/tests/ui/suggestions/lifetimes/suggest-using-tick-underscore-lifetime-in-return-trait-object.fixed @@ -1,4 +1,4 @@ -// run-rustfix +//@ run-rustfix use std::any::Any; fn foo(value: &T) -> Box { diff --git a/tests/ui/suggestions/lifetimes/suggest-using-tick-underscore-lifetime-in-return-trait-object.rs b/tests/ui/suggestions/lifetimes/suggest-using-tick-underscore-lifetime-in-return-trait-object.rs index fa7e72ff2a7..1ffeda67f8a 100644 --- a/tests/ui/suggestions/lifetimes/suggest-using-tick-underscore-lifetime-in-return-trait-object.rs +++ b/tests/ui/suggestions/lifetimes/suggest-using-tick-underscore-lifetime-in-return-trait-object.rs @@ -1,4 +1,4 @@ -// run-rustfix +//@ run-rustfix use std::any::Any; fn foo(value: &T) -> Box { diff --git a/tests/ui/suggestions/lifetimes/type-param-bound-scope.fixed b/tests/ui/suggestions/lifetimes/type-param-bound-scope.fixed index d4a8381fcb1..2c1e3ad005c 100644 --- a/tests/ui/suggestions/lifetimes/type-param-bound-scope.fixed +++ b/tests/ui/suggestions/lifetimes/type-param-bound-scope.fixed @@ -1,6 +1,6 @@ // Make sure we suggest the bound `T: 'a` in the correct scope: // trait, impl or associated fn. -// run-rustfix +//@ run-rustfix #![allow(dead_code)] struct Inv<'a>(#[allow(dead_code)] Option<*mut &'a u8>); diff --git a/tests/ui/suggestions/lifetimes/type-param-bound-scope.rs b/tests/ui/suggestions/lifetimes/type-param-bound-scope.rs index dc43e2df6dd..3840a453661 100644 --- a/tests/ui/suggestions/lifetimes/type-param-bound-scope.rs +++ b/tests/ui/suggestions/lifetimes/type-param-bound-scope.rs @@ -1,6 +1,6 @@ // Make sure we suggest the bound `T: 'a` in the correct scope: // trait, impl or associated fn. -// run-rustfix +//@ run-rustfix #![allow(dead_code)] struct Inv<'a>(#[allow(dead_code)] Option<*mut &'a u8>); diff --git a/tests/ui/suggestions/lifetimes/type-param-missing-lifetime.fixed b/tests/ui/suggestions/lifetimes/type-param-missing-lifetime.fixed index e30c556457e..862659ee44b 100644 --- a/tests/ui/suggestions/lifetimes/type-param-missing-lifetime.fixed +++ b/tests/ui/suggestions/lifetimes/type-param-missing-lifetime.fixed @@ -1,6 +1,6 @@ // We want to suggest a bound `T: 'a` but `'a` is elided, -// run-rustfix -// edition: 2018 +//@ run-rustfix +//@ edition: 2018 #![allow(dead_code)] struct Inv<'a>(Option<*mut &'a u8>); diff --git a/tests/ui/suggestions/lifetimes/type-param-missing-lifetime.rs b/tests/ui/suggestions/lifetimes/type-param-missing-lifetime.rs index 85f08808b73..2d41235c73e 100644 --- a/tests/ui/suggestions/lifetimes/type-param-missing-lifetime.rs +++ b/tests/ui/suggestions/lifetimes/type-param-missing-lifetime.rs @@ -1,6 +1,6 @@ // We want to suggest a bound `T: 'a` but `'a` is elided, -// run-rustfix -// edition: 2018 +//@ run-rustfix +//@ edition: 2018 #![allow(dead_code)] struct Inv<'a>(Option<*mut &'a u8>); diff --git a/tests/ui/suggestions/match-prev-arm-needing-semi.rs b/tests/ui/suggestions/match-prev-arm-needing-semi.rs index 11463c453d4..f7a2a7436bb 100644 --- a/tests/ui/suggestions/match-prev-arm-needing-semi.rs +++ b/tests/ui/suggestions/match-prev-arm-needing-semi.rs @@ -1,4 +1,4 @@ -// edition:2018 +//@ edition:2018 fn dummy() -> i32 { 42 } diff --git a/tests/ui/suggestions/method-access-to-range-literal-typo.fixed b/tests/ui/suggestions/method-access-to-range-literal-typo.fixed index 13601eef6c2..7b1c2b4740f 100644 --- a/tests/ui/suggestions/method-access-to-range-literal-typo.fixed +++ b/tests/ui/suggestions/method-access-to-range-literal-typo.fixed @@ -1,4 +1,4 @@ -// run-rustfix +//@ run-rustfix #![allow(unused)] diff --git a/tests/ui/suggestions/method-access-to-range-literal-typo.rs b/tests/ui/suggestions/method-access-to-range-literal-typo.rs index fdcd6425d32..a4c07d1bb7d 100644 --- a/tests/ui/suggestions/method-access-to-range-literal-typo.rs +++ b/tests/ui/suggestions/method-access-to-range-literal-typo.rs @@ -1,4 +1,4 @@ -// run-rustfix +//@ run-rustfix #![allow(unused)] diff --git a/tests/ui/suggestions/missing-assoc-fn-applicable-suggestions.rs b/tests/ui/suggestions/missing-assoc-fn-applicable-suggestions.rs index 11e0c9a3a72..ebe7e4574ca 100644 --- a/tests/ui/suggestions/missing-assoc-fn-applicable-suggestions.rs +++ b/tests/ui/suggestions/missing-assoc-fn-applicable-suggestions.rs @@ -1,4 +1,4 @@ -// aux-build:missing-assoc-fn-applicable-suggestions.rs +//@ aux-build:missing-assoc-fn-applicable-suggestions.rs extern crate missing_assoc_fn_applicable_suggestions; use missing_assoc_fn_applicable_suggestions::TraitA; diff --git a/tests/ui/suggestions/missing-assoc-type-bound-restriction.rs b/tests/ui/suggestions/missing-assoc-type-bound-restriction.rs index 4954a8a6965..be8f4e565b8 100644 --- a/tests/ui/suggestions/missing-assoc-type-bound-restriction.rs +++ b/tests/ui/suggestions/missing-assoc-type-bound-restriction.rs @@ -1,4 +1,4 @@ -// check-pass +//@ check-pass trait Parent { type Ty; diff --git a/tests/ui/suggestions/missing-bound-in-derive-copy-impl-2.fixed b/tests/ui/suggestions/missing-bound-in-derive-copy-impl-2.fixed index 269ebd2b75a..99433f73320 100644 --- a/tests/ui/suggestions/missing-bound-in-derive-copy-impl-2.fixed +++ b/tests/ui/suggestions/missing-bound-in-derive-copy-impl-2.fixed @@ -1,4 +1,4 @@ -// run-rustfix +//@ run-rustfix use std::fmt::Debug; #[derive(Debug, Copy, Clone)] diff --git a/tests/ui/suggestions/missing-bound-in-derive-copy-impl-2.rs b/tests/ui/suggestions/missing-bound-in-derive-copy-impl-2.rs index e9455f918bc..c0777e0817f 100644 --- a/tests/ui/suggestions/missing-bound-in-derive-copy-impl-2.rs +++ b/tests/ui/suggestions/missing-bound-in-derive-copy-impl-2.rs @@ -1,4 +1,4 @@ -// run-rustfix +//@ run-rustfix use std::fmt::Debug; #[derive(Debug, Copy, Clone)] diff --git a/tests/ui/suggestions/missing-bound-in-derive-copy-impl-3.fixed b/tests/ui/suggestions/missing-bound-in-derive-copy-impl-3.fixed index 8a91e2d5f0d..6da3e351ffb 100644 --- a/tests/ui/suggestions/missing-bound-in-derive-copy-impl-3.fixed +++ b/tests/ui/suggestions/missing-bound-in-derive-copy-impl-3.fixed @@ -1,4 +1,4 @@ -//run-rustfix +//@run-rustfix use std::fmt::Debug; #[derive(Debug, Copy, Clone)] diff --git a/tests/ui/suggestions/missing-bound-in-derive-copy-impl-3.rs b/tests/ui/suggestions/missing-bound-in-derive-copy-impl-3.rs index c10f9d46010..8550a4d7247 100644 --- a/tests/ui/suggestions/missing-bound-in-derive-copy-impl-3.rs +++ b/tests/ui/suggestions/missing-bound-in-derive-copy-impl-3.rs @@ -1,4 +1,4 @@ -//run-rustfix +//@run-rustfix use std::fmt::Debug; #[derive(Debug, Copy, Clone)] diff --git a/tests/ui/suggestions/missing-bound-in-manual-copy-impl-2.fixed b/tests/ui/suggestions/missing-bound-in-manual-copy-impl-2.fixed index 90bc10d34c6..00ca0c41654 100644 --- a/tests/ui/suggestions/missing-bound-in-manual-copy-impl-2.fixed +++ b/tests/ui/suggestions/missing-bound-in-manual-copy-impl-2.fixed @@ -1,4 +1,4 @@ -// run-rustfix +//@ run-rustfix #![allow(dead_code)] #[derive(Clone)] diff --git a/tests/ui/suggestions/missing-bound-in-manual-copy-impl-2.rs b/tests/ui/suggestions/missing-bound-in-manual-copy-impl-2.rs index 34673852a9b..cdd92e3001d 100644 --- a/tests/ui/suggestions/missing-bound-in-manual-copy-impl-2.rs +++ b/tests/ui/suggestions/missing-bound-in-manual-copy-impl-2.rs @@ -1,4 +1,4 @@ -// run-rustfix +//@ run-rustfix #![allow(dead_code)] #[derive(Clone)] diff --git a/tests/ui/suggestions/missing-bound-in-manual-copy-impl.fixed b/tests/ui/suggestions/missing-bound-in-manual-copy-impl.fixed index ff84e42c947..0382358fbbe 100644 --- a/tests/ui/suggestions/missing-bound-in-manual-copy-impl.fixed +++ b/tests/ui/suggestions/missing-bound-in-manual-copy-impl.fixed @@ -1,4 +1,4 @@ -// run-rustfix +//@ run-rustfix #![allow(dead_code)] #[derive(Clone)] diff --git a/tests/ui/suggestions/missing-bound-in-manual-copy-impl.rs b/tests/ui/suggestions/missing-bound-in-manual-copy-impl.rs index 35d0a9dda79..10c5a0d084b 100644 --- a/tests/ui/suggestions/missing-bound-in-manual-copy-impl.rs +++ b/tests/ui/suggestions/missing-bound-in-manual-copy-impl.rs @@ -1,4 +1,4 @@ -// run-rustfix +//@ run-rustfix #![allow(dead_code)] #[derive(Clone)] diff --git a/tests/ui/suggestions/missing-lifetime-in-assoc-const-type.rs b/tests/ui/suggestions/missing-lifetime-in-assoc-const-type.rs index 2a8b4c3c044..f36a6567e42 100644 --- a/tests/ui/suggestions/missing-lifetime-in-assoc-const-type.rs +++ b/tests/ui/suggestions/missing-lifetime-in-assoc-const-type.rs @@ -1,4 +1,4 @@ -// revisions: default generic_const_items +//@ revisions: default generic_const_items #![cfg_attr(generic_const_items, feature(generic_const_items), allow(incomplete_features))] diff --git a/tests/ui/suggestions/missing-lifetime-specifier.rs b/tests/ui/suggestions/missing-lifetime-specifier.rs index 85dd6a5635a..3fa7f75f862 100644 --- a/tests/ui/suggestions/missing-lifetime-specifier.rs +++ b/tests/ui/suggestions/missing-lifetime-specifier.rs @@ -1,7 +1,7 @@ // different number of duplicated diagnostics on different targets -// only-x86_64 -// only-linux -// compile-flags: -Zdeduplicate-diagnostics=yes +//@ only-x86_64 +//@ only-linux +//@ compile-flags: -Zdeduplicate-diagnostics=yes #![allow(bare_trait_objects)] use std::cell::RefCell; diff --git a/tests/ui/suggestions/missing-semicolon.fixed b/tests/ui/suggestions/missing-semicolon.fixed index df355f0b007..82c284a54c2 100644 --- a/tests/ui/suggestions/missing-semicolon.fixed +++ b/tests/ui/suggestions/missing-semicolon.fixed @@ -1,4 +1,4 @@ -// run-rustfix +//@ run-rustfix #![allow(dead_code, unused_variables, path_statements)] fn a() { let x = 5; diff --git a/tests/ui/suggestions/missing-semicolon.rs b/tests/ui/suggestions/missing-semicolon.rs index 12ef3d33e5f..2e38381d108 100644 --- a/tests/ui/suggestions/missing-semicolon.rs +++ b/tests/ui/suggestions/missing-semicolon.rs @@ -1,4 +1,4 @@ -// run-rustfix +//@ run-rustfix #![allow(dead_code, unused_variables, path_statements)] fn a() { let x = 5; diff --git a/tests/ui/suggestions/missing-trait-item.fixed b/tests/ui/suggestions/missing-trait-item.fixed index ded4ec19760..b79a7a51f07 100644 --- a/tests/ui/suggestions/missing-trait-item.fixed +++ b/tests/ui/suggestions/missing-trait-item.fixed @@ -1,4 +1,4 @@ -// run-rustfix +//@ run-rustfix #![allow(dead_code)] trait T { diff --git a/tests/ui/suggestions/missing-trait-item.rs b/tests/ui/suggestions/missing-trait-item.rs index de8974037ac..43111c01c75 100644 --- a/tests/ui/suggestions/missing-trait-item.rs +++ b/tests/ui/suggestions/missing-trait-item.rs @@ -1,4 +1,4 @@ -// run-rustfix +//@ run-rustfix #![allow(dead_code)] trait T { diff --git a/tests/ui/suggestions/missing-type-param-used-in-param.fixed b/tests/ui/suggestions/missing-type-param-used-in-param.fixed index be439403104..3763ce53007 100644 --- a/tests/ui/suggestions/missing-type-param-used-in-param.fixed +++ b/tests/ui/suggestions/missing-type-param-used-in-param.fixed @@ -1,4 +1,4 @@ -// run-rustfix +//@ run-rustfix fn two_type_params(_: B) {} diff --git a/tests/ui/suggestions/missing-type-param-used-in-param.rs b/tests/ui/suggestions/missing-type-param-used-in-param.rs index d444998d35b..1d4f9bf94c8 100644 --- a/tests/ui/suggestions/missing-type-param-used-in-param.rs +++ b/tests/ui/suggestions/missing-type-param-used-in-param.rs @@ -1,4 +1,4 @@ -// run-rustfix +//@ run-rustfix fn two_type_params(_: B) {} diff --git a/tests/ui/suggestions/negative-literal-index.fixed b/tests/ui/suggestions/negative-literal-index.fixed index e52714cf97f..54949fb6a09 100644 --- a/tests/ui/suggestions/negative-literal-index.fixed +++ b/tests/ui/suggestions/negative-literal-index.fixed @@ -1,4 +1,4 @@ -// run-rustfix +//@ run-rustfix use std::ops::Index; struct X; diff --git a/tests/ui/suggestions/negative-literal-index.rs b/tests/ui/suggestions/negative-literal-index.rs index d88b66e679e..8b460b523b3 100644 --- a/tests/ui/suggestions/negative-literal-index.rs +++ b/tests/ui/suggestions/negative-literal-index.rs @@ -1,4 +1,4 @@ -// run-rustfix +//@ run-rustfix use std::ops::Index; struct X; diff --git a/tests/ui/suggestions/no-extern-crate-in-type.rs b/tests/ui/suggestions/no-extern-crate-in-type.rs index bb93ef4549d..a8681189176 100644 --- a/tests/ui/suggestions/no-extern-crate-in-type.rs +++ b/tests/ui/suggestions/no-extern-crate-in-type.rs @@ -1,4 +1,4 @@ -// aux-build:foo.rs +//@ aux-build:foo.rs extern crate foo; diff --git a/tests/ui/suggestions/non-existent-field-present-in-subfield.fixed b/tests/ui/suggestions/non-existent-field-present-in-subfield.fixed index e58b4e6ca4d..2b4ecbf0ca5 100644 --- a/tests/ui/suggestions/non-existent-field-present-in-subfield.fixed +++ b/tests/ui/suggestions/non-existent-field-present-in-subfield.fixed @@ -1,4 +1,4 @@ -// run-rustfix +//@ run-rustfix struct Foo { first: Bar, diff --git a/tests/ui/suggestions/non-existent-field-present-in-subfield.rs b/tests/ui/suggestions/non-existent-field-present-in-subfield.rs index 7e273ac23d8..8638e50f479 100644 --- a/tests/ui/suggestions/non-existent-field-present-in-subfield.rs +++ b/tests/ui/suggestions/non-existent-field-present-in-subfield.rs @@ -1,4 +1,4 @@ -// run-rustfix +//@ run-rustfix struct Foo { first: Bar, diff --git a/tests/ui/suggestions/object-unsafe-trait-should-use-self-2021-without-dyn.rs b/tests/ui/suggestions/object-unsafe-trait-should-use-self-2021-without-dyn.rs index dbdfde6dd50..37afab6b643 100644 --- a/tests/ui/suggestions/object-unsafe-trait-should-use-self-2021-without-dyn.rs +++ b/tests/ui/suggestions/object-unsafe-trait-should-use-self-2021-without-dyn.rs @@ -1,4 +1,4 @@ -// edition:2021 +//@ edition:2021 #![allow(bare_trait_objects)] trait A: Sized { fn f(a: A) -> A; diff --git a/tests/ui/suggestions/object-unsafe-trait-should-use-self-2021.rs b/tests/ui/suggestions/object-unsafe-trait-should-use-self-2021.rs index a598e883f3f..4ab10f40eb6 100644 --- a/tests/ui/suggestions/object-unsafe-trait-should-use-self-2021.rs +++ b/tests/ui/suggestions/object-unsafe-trait-should-use-self-2021.rs @@ -1,4 +1,4 @@ -// edition:2021 +//@ edition:2021 #![allow(bare_trait_objects)] trait A: Sized { fn f(a: dyn A) -> dyn A; diff --git a/tests/ui/suggestions/object-unsafe-trait-should-use-where-sized.fixed b/tests/ui/suggestions/object-unsafe-trait-should-use-where-sized.fixed index 69487c565c9..fd9b78934c7 100644 --- a/tests/ui/suggestions/object-unsafe-trait-should-use-where-sized.fixed +++ b/tests/ui/suggestions/object-unsafe-trait-should-use-where-sized.fixed @@ -1,4 +1,4 @@ -// run-rustfix +//@ run-rustfix #![allow(unused_variables, dead_code)] trait Trait { diff --git a/tests/ui/suggestions/object-unsafe-trait-should-use-where-sized.rs b/tests/ui/suggestions/object-unsafe-trait-should-use-where-sized.rs index 38d9aea16eb..e4aa0d89239 100644 --- a/tests/ui/suggestions/object-unsafe-trait-should-use-where-sized.rs +++ b/tests/ui/suggestions/object-unsafe-trait-should-use-where-sized.rs @@ -1,4 +1,4 @@ -// run-rustfix +//@ run-rustfix #![allow(unused_variables, dead_code)] trait Trait { diff --git a/tests/ui/suggestions/only-suggest-removal-of-conversion-method-calls.fixed b/tests/ui/suggestions/only-suggest-removal-of-conversion-method-calls.fixed index 570d91d949b..226e408f545 100644 --- a/tests/ui/suggestions/only-suggest-removal-of-conversion-method-calls.fixed +++ b/tests/ui/suggestions/only-suggest-removal-of-conversion-method-calls.fixed @@ -1,4 +1,4 @@ -// run-rustfix +//@ run-rustfix use std::io::stdin; fn get_name() -> String { diff --git a/tests/ui/suggestions/only-suggest-removal-of-conversion-method-calls.rs b/tests/ui/suggestions/only-suggest-removal-of-conversion-method-calls.rs index 93e8c0af032..be382d61d38 100644 --- a/tests/ui/suggestions/only-suggest-removal-of-conversion-method-calls.rs +++ b/tests/ui/suggestions/only-suggest-removal-of-conversion-method-calls.rs @@ -1,4 +1,4 @@ -// run-rustfix +//@ run-rustfix use std::io::stdin; fn get_name() -> String { diff --git a/tests/ui/suggestions/opaque-type-error.rs b/tests/ui/suggestions/opaque-type-error.rs index 5e114740314..e9dbceae6c6 100644 --- a/tests/ui/suggestions/opaque-type-error.rs +++ b/tests/ui/suggestions/opaque-type-error.rs @@ -1,4 +1,4 @@ -// edition:2018 +//@ edition:2018 use core::future::Future; async fn base_thing() -> Result<(), ()> { diff --git a/tests/ui/suggestions/option-content-move.fixed b/tests/ui/suggestions/option-content-move.fixed index 5e79cf71d82..fbed486cef7 100644 --- a/tests/ui/suggestions/option-content-move.fixed +++ b/tests/ui/suggestions/option-content-move.fixed @@ -1,4 +1,4 @@ -// run-rustfix +//@ run-rustfix pub struct LipogramCorpora { selections: Vec<(char, Option)>, } diff --git a/tests/ui/suggestions/option-content-move.rs b/tests/ui/suggestions/option-content-move.rs index 58efbe71f27..90d05c74399 100644 --- a/tests/ui/suggestions/option-content-move.rs +++ b/tests/ui/suggestions/option-content-move.rs @@ -1,4 +1,4 @@ -// run-rustfix +//@ run-rustfix pub struct LipogramCorpora { selections: Vec<(char, Option)>, } diff --git a/tests/ui/suggestions/pattern-slice-vec.fixed b/tests/ui/suggestions/pattern-slice-vec.fixed index f8144641f3c..b49c33e0b70 100644 --- a/tests/ui/suggestions/pattern-slice-vec.fixed +++ b/tests/ui/suggestions/pattern-slice-vec.fixed @@ -1,6 +1,6 @@ // Regression test for #87017. -// run-rustfix +//@ run-rustfix fn main() { fn foo() -> Vec { vec![1, 2, 3] } diff --git a/tests/ui/suggestions/pattern-slice-vec.rs b/tests/ui/suggestions/pattern-slice-vec.rs index 444687c8578..2c4b115973f 100644 --- a/tests/ui/suggestions/pattern-slice-vec.rs +++ b/tests/ui/suggestions/pattern-slice-vec.rs @@ -1,6 +1,6 @@ // Regression test for #87017. -// run-rustfix +//@ run-rustfix fn main() { fn foo() -> Vec { vec![1, 2, 3] } diff --git a/tests/ui/suggestions/private-field.rs b/tests/ui/suggestions/private-field.rs index 1cc4d2a4d06..47e1859cd2b 100644 --- a/tests/ui/suggestions/private-field.rs +++ b/tests/ui/suggestions/private-field.rs @@ -1,4 +1,4 @@ -// compile-flags: --crate-type lib +//@ compile-flags: --crate-type lib pub struct S { pub val: string::MyString, } diff --git a/tests/ui/suggestions/range-index-instead-of-colon.rs b/tests/ui/suggestions/range-index-instead-of-colon.rs index 3267527ecf2..0594d4f4c9c 100644 --- a/tests/ui/suggestions/range-index-instead-of-colon.rs +++ b/tests/ui/suggestions/range-index-instead-of-colon.rs @@ -1,4 +1,4 @@ -// edition:2021 +//@ edition:2021 fn main() { &[1, 2, 3][1:2]; diff --git a/tests/ui/suggestions/raw-byte-string-prefix.rs b/tests/ui/suggestions/raw-byte-string-prefix.rs index 576561c315c..2d339898a48 100644 --- a/tests/ui/suggestions/raw-byte-string-prefix.rs +++ b/tests/ui/suggestions/raw-byte-string-prefix.rs @@ -1,6 +1,6 @@ // `br` and `rb` are easy to confuse; check that we issue a suggestion to help. -// edition:2021 +//@ edition:2021 fn main() { rb"abc"; diff --git a/tests/ui/suggestions/recover-invalid-float.fixed b/tests/ui/suggestions/recover-invalid-float.fixed index 62389ba6120..e9b67b1df26 100644 --- a/tests/ui/suggestions/recover-invalid-float.fixed +++ b/tests/ui/suggestions/recover-invalid-float.fixed @@ -1,4 +1,4 @@ -// run-rustfix +//@ run-rustfix fn main() { let _: f32 = 0.3; diff --git a/tests/ui/suggestions/recover-invalid-float.rs b/tests/ui/suggestions/recover-invalid-float.rs index a5a7efe5e76..c0aea0a78a6 100644 --- a/tests/ui/suggestions/recover-invalid-float.rs +++ b/tests/ui/suggestions/recover-invalid-float.rs @@ -1,4 +1,4 @@ -// run-rustfix +//@ run-rustfix fn main() { let _: f32 = .3; diff --git a/tests/ui/suggestions/ref-pattern-binding.fixed b/tests/ui/suggestions/ref-pattern-binding.fixed index c36040eeca3..d46546cd104 100644 --- a/tests/ui/suggestions/ref-pattern-binding.fixed +++ b/tests/ui/suggestions/ref-pattern-binding.fixed @@ -1,4 +1,4 @@ -// run-rustfix +//@ run-rustfix #![allow(unused)] struct S { diff --git a/tests/ui/suggestions/ref-pattern-binding.rs b/tests/ui/suggestions/ref-pattern-binding.rs index c0d4feb0330..06d56ae206b 100644 --- a/tests/ui/suggestions/ref-pattern-binding.rs +++ b/tests/ui/suggestions/ref-pattern-binding.rs @@ -1,4 +1,4 @@ -// run-rustfix +//@ run-rustfix #![allow(unused)] struct S { diff --git a/tests/ui/suggestions/shadowed-lplace-method.fixed b/tests/ui/suggestions/shadowed-lplace-method.fixed index 740ac77ee0c..87db01a3b23 100644 --- a/tests/ui/suggestions/shadowed-lplace-method.fixed +++ b/tests/ui/suggestions/shadowed-lplace-method.fixed @@ -1,4 +1,4 @@ -// run-rustfix +//@ run-rustfix #![allow(unused_imports)] use std::borrow::BorrowMut; use std::cell::RefCell; diff --git a/tests/ui/suggestions/shadowed-lplace-method.rs b/tests/ui/suggestions/shadowed-lplace-method.rs index 6bf12879e6f..01cc58bf784 100644 --- a/tests/ui/suggestions/shadowed-lplace-method.rs +++ b/tests/ui/suggestions/shadowed-lplace-method.rs @@ -1,4 +1,4 @@ -// run-rustfix +//@ run-rustfix #![allow(unused_imports)] use std::borrow::BorrowMut; use std::cell::RefCell; diff --git a/tests/ui/suggestions/silenced-binding-typo.fixed b/tests/ui/suggestions/silenced-binding-typo.fixed index e0f9e31bef3..aa688c88250 100644 --- a/tests/ui/suggestions/silenced-binding-typo.fixed +++ b/tests/ui/suggestions/silenced-binding-typo.fixed @@ -1,4 +1,4 @@ -// run-rustfix +//@ run-rustfix fn main() { let x = 42; //~ HELP let _y = x; //~ ERROR diff --git a/tests/ui/suggestions/silenced-binding-typo.rs b/tests/ui/suggestions/silenced-binding-typo.rs index 6cadd5a93a7..ea49834b9e8 100644 --- a/tests/ui/suggestions/silenced-binding-typo.rs +++ b/tests/ui/suggestions/silenced-binding-typo.rs @@ -1,4 +1,4 @@ -// run-rustfix +//@ run-rustfix fn main() { let _x = 42; //~ HELP let _y = x; //~ ERROR diff --git a/tests/ui/suggestions/struct-initializer-comma.fixed b/tests/ui/suggestions/struct-initializer-comma.fixed index 6a4ee39b16d..556bfbca58d 100644 --- a/tests/ui/suggestions/struct-initializer-comma.fixed +++ b/tests/ui/suggestions/struct-initializer-comma.fixed @@ -1,4 +1,4 @@ -// run-rustfix +//@ run-rustfix pub struct Foo { pub first: bool, diff --git a/tests/ui/suggestions/struct-initializer-comma.rs b/tests/ui/suggestions/struct-initializer-comma.rs index c137f059418..7b93bf187b8 100644 --- a/tests/ui/suggestions/struct-initializer-comma.rs +++ b/tests/ui/suggestions/struct-initializer-comma.rs @@ -1,4 +1,4 @@ -// run-rustfix +//@ run-rustfix pub struct Foo { pub first: bool, diff --git a/tests/ui/suggestions/sugg-else-for-closure.fixed b/tests/ui/suggestions/sugg-else-for-closure.fixed index cf381d9da8b..f701c403799 100644 --- a/tests/ui/suggestions/sugg-else-for-closure.fixed +++ b/tests/ui/suggestions/sugg-else-for-closure.fixed @@ -1,4 +1,4 @@ -// run-rustfix +//@ run-rustfix fn main() { let x = "com.example.app"; diff --git a/tests/ui/suggestions/sugg-else-for-closure.rs b/tests/ui/suggestions/sugg-else-for-closure.rs index 540ced91fc9..d97467e4d3e 100644 --- a/tests/ui/suggestions/sugg-else-for-closure.rs +++ b/tests/ui/suggestions/sugg-else-for-closure.rs @@ -1,4 +1,4 @@ -// run-rustfix +//@ run-rustfix fn main() { let x = "com.example.app"; diff --git a/tests/ui/suggestions/suggest-adding-reference-to-trait-assoc-item.fixed b/tests/ui/suggestions/suggest-adding-reference-to-trait-assoc-item.fixed index e9b8a9caa48..3b739312942 100644 --- a/tests/ui/suggestions/suggest-adding-reference-to-trait-assoc-item.fixed +++ b/tests/ui/suggestions/suggest-adding-reference-to-trait-assoc-item.fixed @@ -1,4 +1,4 @@ -// run-rustfix +//@ run-rustfix #![allow(unused_variables)] fn foo(foo: &mut usize) { diff --git a/tests/ui/suggestions/suggest-adding-reference-to-trait-assoc-item.rs b/tests/ui/suggestions/suggest-adding-reference-to-trait-assoc-item.rs index 5fae21cccef..7fc870946b9 100644 --- a/tests/ui/suggestions/suggest-adding-reference-to-trait-assoc-item.rs +++ b/tests/ui/suggestions/suggest-adding-reference-to-trait-assoc-item.rs @@ -1,4 +1,4 @@ -// run-rustfix +//@ run-rustfix #![allow(unused_variables)] fn foo(foo: &mut usize) { diff --git a/tests/ui/suggestions/suggest-assoc-fn-call-deref.fixed b/tests/ui/suggestions/suggest-assoc-fn-call-deref.fixed index 8d96cf590c3..782822fff54 100644 --- a/tests/ui/suggestions/suggest-assoc-fn-call-deref.fixed +++ b/tests/ui/suggestions/suggest-assoc-fn-call-deref.fixed @@ -1,4 +1,4 @@ -// run-rustfix +//@ run-rustfix #![allow(unused)] diff --git a/tests/ui/suggestions/suggest-assoc-fn-call-deref.rs b/tests/ui/suggestions/suggest-assoc-fn-call-deref.rs index 186901f75a8..e9856e808c5 100644 --- a/tests/ui/suggestions/suggest-assoc-fn-call-deref.rs +++ b/tests/ui/suggestions/suggest-assoc-fn-call-deref.rs @@ -1,4 +1,4 @@ -// run-rustfix +//@ run-rustfix #![allow(unused)] diff --git a/tests/ui/suggestions/suggest-assoc-fn-call-for-impl-trait.fixed b/tests/ui/suggestions/suggest-assoc-fn-call-for-impl-trait.fixed index 86ac07a93a3..b4d7c6054fa 100644 --- a/tests/ui/suggestions/suggest-assoc-fn-call-for-impl-trait.fixed +++ b/tests/ui/suggestions/suggest-assoc-fn-call-for-impl-trait.fixed @@ -1,4 +1,4 @@ -// run-rustfix +//@ run-rustfix struct A { diff --git a/tests/ui/suggestions/suggest-assoc-fn-call-for-impl-trait.rs b/tests/ui/suggestions/suggest-assoc-fn-call-for-impl-trait.rs index 9a57ffb7740..d99386336af 100644 --- a/tests/ui/suggestions/suggest-assoc-fn-call-for-impl-trait.rs +++ b/tests/ui/suggestions/suggest-assoc-fn-call-for-impl-trait.rs @@ -1,4 +1,4 @@ -// run-rustfix +//@ run-rustfix struct A { diff --git a/tests/ui/suggestions/suggest-assoc-fn-call-with-turbofish.fixed b/tests/ui/suggestions/suggest-assoc-fn-call-with-turbofish.fixed index 02dd0715c80..9518a203d02 100644 --- a/tests/ui/suggestions/suggest-assoc-fn-call-with-turbofish.fixed +++ b/tests/ui/suggestions/suggest-assoc-fn-call-with-turbofish.fixed @@ -1,4 +1,4 @@ -// run-rustfix +//@ run-rustfix struct GenericAssocMethod(T); diff --git a/tests/ui/suggestions/suggest-assoc-fn-call-with-turbofish.rs b/tests/ui/suggestions/suggest-assoc-fn-call-with-turbofish.rs index 1d0ca8e780a..a84dc5e7797 100644 --- a/tests/ui/suggestions/suggest-assoc-fn-call-with-turbofish.rs +++ b/tests/ui/suggestions/suggest-assoc-fn-call-with-turbofish.rs @@ -1,4 +1,4 @@ -// run-rustfix +//@ run-rustfix struct GenericAssocMethod(T); diff --git a/tests/ui/suggestions/suggest-assoc-fn-call-without-receiver.fixed b/tests/ui/suggestions/suggest-assoc-fn-call-without-receiver.fixed index 61f06d802b6..3ce9aff92fc 100644 --- a/tests/ui/suggestions/suggest-assoc-fn-call-without-receiver.fixed +++ b/tests/ui/suggestions/suggest-assoc-fn-call-without-receiver.fixed @@ -1,4 +1,4 @@ -// run-rustfix +//@ run-rustfix struct A {} diff --git a/tests/ui/suggestions/suggest-assoc-fn-call-without-receiver.rs b/tests/ui/suggestions/suggest-assoc-fn-call-without-receiver.rs index 07e614f0c15..cd27ce9fe86 100644 --- a/tests/ui/suggestions/suggest-assoc-fn-call-without-receiver.rs +++ b/tests/ui/suggestions/suggest-assoc-fn-call-without-receiver.rs @@ -1,4 +1,4 @@ -// run-rustfix +//@ run-rustfix struct A {} diff --git a/tests/ui/suggestions/suggest-blanket-impl-local-trait.rs b/tests/ui/suggestions/suggest-blanket-impl-local-trait.rs index 14fef1b5248..76300c6a3f4 100644 --- a/tests/ui/suggestions/suggest-blanket-impl-local-trait.rs +++ b/tests/ui/suggestions/suggest-blanket-impl-local-trait.rs @@ -1,7 +1,7 @@ // Ensure that the compiler include the blanklet implementation suggestion // when inside a `impl` statement are used two local traits. // -// edition:2021 +//@ edition:2021 use std::fmt; trait LocalTraitOne { } diff --git a/tests/ui/suggestions/suggest-box.fixed b/tests/ui/suggestions/suggest-box.fixed index 3de02cd0bd4..7cd62c43183 100644 --- a/tests/ui/suggestions/suggest-box.fixed +++ b/tests/ui/suggestions/suggest-box.fixed @@ -1,4 +1,4 @@ -// run-rustfix +//@ run-rustfix fn main() { let _x: Box Result<(), ()>> = Box::new(|| { //~ ERROR mismatched types diff --git a/tests/ui/suggestions/suggest-box.rs b/tests/ui/suggestions/suggest-box.rs index e680a61db3b..c31320c5485 100644 --- a/tests/ui/suggestions/suggest-box.rs +++ b/tests/ui/suggestions/suggest-box.rs @@ -1,4 +1,4 @@ -// run-rustfix +//@ run-rustfix fn main() { let _x: Box Result<(), ()>> = || { //~ ERROR mismatched types diff --git a/tests/ui/suggestions/suggest-boxed-empty-block.fixed b/tests/ui/suggestions/suggest-boxed-empty-block.fixed index 46683aa0953..25cb4dc74b1 100644 --- a/tests/ui/suggestions/suggest-boxed-empty-block.fixed +++ b/tests/ui/suggestions/suggest-boxed-empty-block.fixed @@ -1,7 +1,7 @@ #![feature(async_closure)] -// edition:2021 -// run-rustfix +//@ edition:2021 +//@ run-rustfix fn foo(_: Box) {} fn bar(_: impl Fn() -> Box) {} diff --git a/tests/ui/suggestions/suggest-boxed-empty-block.rs b/tests/ui/suggestions/suggest-boxed-empty-block.rs index e19670a5018..9a8d6498fb1 100644 --- a/tests/ui/suggestions/suggest-boxed-empty-block.rs +++ b/tests/ui/suggestions/suggest-boxed-empty-block.rs @@ -1,7 +1,7 @@ #![feature(async_closure)] -// edition:2021 -// run-rustfix +//@ edition:2021 +//@ run-rustfix fn foo(_: Box) {} fn bar(_: impl Fn() -> Box) {} diff --git a/tests/ui/suggestions/suggest-dereferencing-index.fixed b/tests/ui/suggestions/suggest-dereferencing-index.fixed index dd4ae4eb14c..2460d542764 100644 --- a/tests/ui/suggestions/suggest-dereferencing-index.fixed +++ b/tests/ui/suggestions/suggest-dereferencing-index.fixed @@ -1,4 +1,4 @@ -// run-rustfix +//@ run-rustfix #![allow(unused_variables)] fn main() { diff --git a/tests/ui/suggestions/suggest-dereferencing-index.rs b/tests/ui/suggestions/suggest-dereferencing-index.rs index 82ebacc49f2..42abb5537c5 100644 --- a/tests/ui/suggestions/suggest-dereferencing-index.rs +++ b/tests/ui/suggestions/suggest-dereferencing-index.rs @@ -1,4 +1,4 @@ -// run-rustfix +//@ run-rustfix #![allow(unused_variables)] fn main() { diff --git a/tests/ui/suggestions/suggest-field-through-deref.fixed b/tests/ui/suggestions/suggest-field-through-deref.fixed index 07ba3aa911f..18511bda4d8 100644 --- a/tests/ui/suggestions/suggest-field-through-deref.fixed +++ b/tests/ui/suggestions/suggest-field-through-deref.fixed @@ -1,4 +1,4 @@ -// run-rustfix +//@ run-rustfix #![allow(dead_code)] use std::sync::Arc; struct S { diff --git a/tests/ui/suggestions/suggest-field-through-deref.rs b/tests/ui/suggestions/suggest-field-through-deref.rs index 6e24b425e95..4189aa71b06 100644 --- a/tests/ui/suggestions/suggest-field-through-deref.rs +++ b/tests/ui/suggestions/suggest-field-through-deref.rs @@ -1,4 +1,4 @@ -// run-rustfix +//@ run-rustfix #![allow(dead_code)] use std::sync::Arc; struct S { diff --git a/tests/ui/suggestions/suggest-fn-ptr-for-fn-item-in-fn-ret.fixed b/tests/ui/suggestions/suggest-fn-ptr-for-fn-item-in-fn-ret.fixed index abb9ef91774..0b0eaa1959b 100644 --- a/tests/ui/suggestions/suggest-fn-ptr-for-fn-item-in-fn-ret.fixed +++ b/tests/ui/suggestions/suggest-fn-ptr-for-fn-item-in-fn-ret.fixed @@ -1,4 +1,4 @@ -// run-rustfix +//@ run-rustfix #![allow(unused)] diff --git a/tests/ui/suggestions/suggest-fn-ptr-for-fn-item-in-fn-ret.rs b/tests/ui/suggestions/suggest-fn-ptr-for-fn-item-in-fn-ret.rs index d2a79c38694..38707887f0e 100644 --- a/tests/ui/suggestions/suggest-fn-ptr-for-fn-item-in-fn-ret.rs +++ b/tests/ui/suggestions/suggest-fn-ptr-for-fn-item-in-fn-ret.rs @@ -1,4 +1,4 @@ -// run-rustfix +//@ run-rustfix #![allow(unused)] diff --git a/tests/ui/suggestions/suggest-impl-trait-lifetime.fixed b/tests/ui/suggestions/suggest-impl-trait-lifetime.fixed index 4f2fd5ba600..3ab3d0a6828 100644 --- a/tests/ui/suggestions/suggest-impl-trait-lifetime.fixed +++ b/tests/ui/suggestions/suggest-impl-trait-lifetime.fixed @@ -1,4 +1,4 @@ -// run-rustfix +//@ run-rustfix use std::fmt::Debug; diff --git a/tests/ui/suggestions/suggest-impl-trait-lifetime.rs b/tests/ui/suggestions/suggest-impl-trait-lifetime.rs index a266e360edb..81411b46be0 100644 --- a/tests/ui/suggestions/suggest-impl-trait-lifetime.rs +++ b/tests/ui/suggestions/suggest-impl-trait-lifetime.rs @@ -1,4 +1,4 @@ -// run-rustfix +//@ run-rustfix use std::fmt::Debug; diff --git a/tests/ui/suggestions/suggest-let-for-assignment.fixed b/tests/ui/suggestions/suggest-let-for-assignment.fixed index 76dc1dad80a..80b9333827e 100644 --- a/tests/ui/suggestions/suggest-let-for-assignment.fixed +++ b/tests/ui/suggestions/suggest-let-for-assignment.fixed @@ -1,4 +1,4 @@ -// run-rustfix +//@ run-rustfix fn main() { let demo = 1; //~ ERROR cannot find value `demo` in this scope diff --git a/tests/ui/suggestions/suggest-let-for-assignment.rs b/tests/ui/suggestions/suggest-let-for-assignment.rs index f1edf65a726..22560083d34 100644 --- a/tests/ui/suggestions/suggest-let-for-assignment.rs +++ b/tests/ui/suggestions/suggest-let-for-assignment.rs @@ -1,4 +1,4 @@ -// run-rustfix +//@ run-rustfix fn main() { demo = 1; //~ ERROR cannot find value `demo` in this scope diff --git a/tests/ui/suggestions/suggest-mut-method-for-loop-hashmap.fixed b/tests/ui/suggestions/suggest-mut-method-for-loop-hashmap.fixed index 556c9543881..fe445410c64 100644 --- a/tests/ui/suggestions/suggest-mut-method-for-loop-hashmap.fixed +++ b/tests/ui/suggestions/suggest-mut-method-for-loop-hashmap.fixed @@ -1,4 +1,4 @@ -// run-rustfix +//@ run-rustfix // https://github.com/rust-lang/rust/issues/82081 use std::collections::HashMap; diff --git a/tests/ui/suggestions/suggest-mut-method-for-loop-hashmap.rs b/tests/ui/suggestions/suggest-mut-method-for-loop-hashmap.rs index b9d49a074ea..1f8bd9ae4d8 100644 --- a/tests/ui/suggestions/suggest-mut-method-for-loop-hashmap.rs +++ b/tests/ui/suggestions/suggest-mut-method-for-loop-hashmap.rs @@ -1,4 +1,4 @@ -// run-rustfix +//@ run-rustfix // https://github.com/rust-lang/rust/issues/82081 use std::collections::HashMap; diff --git a/tests/ui/suggestions/suggest-on-bare-closure-call.rs b/tests/ui/suggestions/suggest-on-bare-closure-call.rs index 496c305bc2a..046fe4803ec 100644 --- a/tests/ui/suggestions/suggest-on-bare-closure-call.rs +++ b/tests/ui/suggestions/suggest-on-bare-closure-call.rs @@ -1,4 +1,4 @@ -// edition:2021 +//@ edition:2021 #![feature(async_closure)] diff --git a/tests/ui/suggestions/suggest-ref-macro.rs b/tests/ui/suggestions/suggest-ref-macro.rs index 730f5fa1b5e..e5084e54115 100644 --- a/tests/ui/suggestions/suggest-ref-macro.rs +++ b/tests/ui/suggestions/suggest-ref-macro.rs @@ -1,5 +1,5 @@ // run-check -// aux-build:proc-macro-type-error.rs +//@ aux-build:proc-macro-type-error.rs extern crate proc_macro_type_error; diff --git a/tests/ui/suggestions/suggest-remove-deref.fixed b/tests/ui/suggestions/suggest-remove-deref.fixed index 4dc12da03dd..d056f9e1f36 100644 --- a/tests/ui/suggestions/suggest-remove-deref.fixed +++ b/tests/ui/suggestions/suggest-remove-deref.fixed @@ -1,4 +1,4 @@ -// run-rustfix +//@ run-rustfix //issue #106496 diff --git a/tests/ui/suggestions/suggest-remove-deref.rs b/tests/ui/suggestions/suggest-remove-deref.rs index c2d385cbdc3..258c183950f 100644 --- a/tests/ui/suggestions/suggest-remove-deref.rs +++ b/tests/ui/suggestions/suggest-remove-deref.rs @@ -1,4 +1,4 @@ -// run-rustfix +//@ run-rustfix //issue #106496 diff --git a/tests/ui/suggestions/suggest-remove-refs-1.fixed b/tests/ui/suggestions/suggest-remove-refs-1.fixed index a39e0fbd119..ff136fbeeba 100644 --- a/tests/ui/suggestions/suggest-remove-refs-1.fixed +++ b/tests/ui/suggestions/suggest-remove-refs-1.fixed @@ -1,4 +1,4 @@ -// run-rustfix +//@ run-rustfix fn main() { let v = vec![0, 1, 2, 3]; diff --git a/tests/ui/suggestions/suggest-remove-refs-1.rs b/tests/ui/suggestions/suggest-remove-refs-1.rs index 6f767f2c170..61e0792f4cf 100644 --- a/tests/ui/suggestions/suggest-remove-refs-1.rs +++ b/tests/ui/suggestions/suggest-remove-refs-1.rs @@ -1,4 +1,4 @@ -// run-rustfix +//@ run-rustfix fn main() { let v = vec![0, 1, 2, 3]; diff --git a/tests/ui/suggestions/suggest-remove-refs-2.fixed b/tests/ui/suggestions/suggest-remove-refs-2.fixed index 0f9c3abfe8e..c5289a5ba4c 100644 --- a/tests/ui/suggestions/suggest-remove-refs-2.fixed +++ b/tests/ui/suggestions/suggest-remove-refs-2.fixed @@ -1,4 +1,4 @@ -// run-rustfix +//@ run-rustfix fn main() { let v = vec![0, 1, 2, 3]; diff --git a/tests/ui/suggestions/suggest-remove-refs-2.rs b/tests/ui/suggestions/suggest-remove-refs-2.rs index 6c94b12d209..a5b8943cf10 100644 --- a/tests/ui/suggestions/suggest-remove-refs-2.rs +++ b/tests/ui/suggestions/suggest-remove-refs-2.rs @@ -1,4 +1,4 @@ -// run-rustfix +//@ run-rustfix fn main() { let v = vec![0, 1, 2, 3]; diff --git a/tests/ui/suggestions/suggest-remove-refs-3.fixed b/tests/ui/suggestions/suggest-remove-refs-3.fixed index 3148fcbe5da..49798baf928 100644 --- a/tests/ui/suggestions/suggest-remove-refs-3.fixed +++ b/tests/ui/suggestions/suggest-remove-refs-3.fixed @@ -1,4 +1,4 @@ -// run-rustfix +//@ run-rustfix fn main() { let v = vec![0, 1, 2, 3]; diff --git a/tests/ui/suggestions/suggest-remove-refs-3.rs b/tests/ui/suggestions/suggest-remove-refs-3.rs index 0622adada0c..5a4c6adc676 100644 --- a/tests/ui/suggestions/suggest-remove-refs-3.rs +++ b/tests/ui/suggestions/suggest-remove-refs-3.rs @@ -1,4 +1,4 @@ -// run-rustfix +//@ run-rustfix fn main() { let v = vec![0, 1, 2, 3]; diff --git a/tests/ui/suggestions/suggest-remove-refs-4.fixed b/tests/ui/suggestions/suggest-remove-refs-4.fixed index dd63d215972..562bd3ff337 100644 --- a/tests/ui/suggestions/suggest-remove-refs-4.fixed +++ b/tests/ui/suggestions/suggest-remove-refs-4.fixed @@ -1,4 +1,4 @@ -// run-rustfix +//@ run-rustfix fn main() { let foo = [1,2,3].iter(); for _i in foo {} //~ ERROR E0277 diff --git a/tests/ui/suggestions/suggest-remove-refs-4.rs b/tests/ui/suggestions/suggest-remove-refs-4.rs index 3c3d9b1b3f9..ac5b13ffad3 100644 --- a/tests/ui/suggestions/suggest-remove-refs-4.rs +++ b/tests/ui/suggestions/suggest-remove-refs-4.rs @@ -1,4 +1,4 @@ -// run-rustfix +//@ run-rustfix fn main() { let foo = &[1,2,3].iter(); for _i in &foo {} //~ ERROR E0277 diff --git a/tests/ui/suggestions/suggest-remove-refs-5.fixed b/tests/ui/suggestions/suggest-remove-refs-5.fixed index 9f59f9c199a..f426a372e5a 100644 --- a/tests/ui/suggestions/suggest-remove-refs-5.fixed +++ b/tests/ui/suggestions/suggest-remove-refs-5.fixed @@ -1,4 +1,4 @@ -// run-rustfix +//@ run-rustfix fn main() { let v = &mut Vec::::new(); for _ in v {} //~ ERROR E0277 diff --git a/tests/ui/suggestions/suggest-remove-refs-5.rs b/tests/ui/suggestions/suggest-remove-refs-5.rs index d56aa0c9ca4..367a366b80e 100644 --- a/tests/ui/suggestions/suggest-remove-refs-5.rs +++ b/tests/ui/suggestions/suggest-remove-refs-5.rs @@ -1,4 +1,4 @@ -// run-rustfix +//@ run-rustfix fn main() { let v = &mut &mut Vec::::new(); for _ in &mut &mut v {} //~ ERROR E0277 diff --git a/tests/ui/suggestions/suggest-ret-on-async-w-late.fixed b/tests/ui/suggestions/suggest-ret-on-async-w-late.fixed index 0a08383317f..8945697a646 100644 --- a/tests/ui/suggestions/suggest-ret-on-async-w-late.fixed +++ b/tests/ui/suggestions/suggest-ret-on-async-w-late.fixed @@ -1,5 +1,5 @@ -// edition: 2021 -// run-rustfix +//@ edition: 2021 +//@ run-rustfix #![allow(unused)] diff --git a/tests/ui/suggestions/suggest-ret-on-async-w-late.rs b/tests/ui/suggestions/suggest-ret-on-async-w-late.rs index 5c8f185bd4b..2b70cdd524e 100644 --- a/tests/ui/suggestions/suggest-ret-on-async-w-late.rs +++ b/tests/ui/suggestions/suggest-ret-on-async-w-late.rs @@ -1,5 +1,5 @@ -// edition: 2021 -// run-rustfix +//@ edition: 2021 +//@ run-rustfix #![allow(unused)] diff --git a/tests/ui/suggestions/suggest-semicolon-for-fn-in-extern-block.fixed b/tests/ui/suggestions/suggest-semicolon-for-fn-in-extern-block.fixed index 5c55566ffe9..99f6b080fea 100644 --- a/tests/ui/suggestions/suggest-semicolon-for-fn-in-extern-block.fixed +++ b/tests/ui/suggestions/suggest-semicolon-for-fn-in-extern-block.fixed @@ -1,4 +1,4 @@ -// run-rustfix +//@ run-rustfix #[allow(dead_code)] diff --git a/tests/ui/suggestions/suggest-semicolon-for-fn-in-extern-block.rs b/tests/ui/suggestions/suggest-semicolon-for-fn-in-extern-block.rs index 91971cba3e8..1fdf640b8bf 100644 --- a/tests/ui/suggestions/suggest-semicolon-for-fn-in-extern-block.rs +++ b/tests/ui/suggestions/suggest-semicolon-for-fn-in-extern-block.rs @@ -1,4 +1,4 @@ -// run-rustfix +//@ run-rustfix #[allow(dead_code)] diff --git a/tests/ui/suggestions/suggest-slice-swap.fixed b/tests/ui/suggestions/suggest-slice-swap.fixed index 05b7ec26379..6418e8265d1 100644 --- a/tests/ui/suggestions/suggest-slice-swap.fixed +++ b/tests/ui/suggestions/suggest-slice-swap.fixed @@ -1,4 +1,4 @@ -// run-rustfix +//@ run-rustfix #![allow(dead_code)] fn swap(arr: &mut [u32; 2]) { diff --git a/tests/ui/suggestions/suggest-slice-swap.rs b/tests/ui/suggestions/suggest-slice-swap.rs index 9f3659aac16..478f8c69edd 100644 --- a/tests/ui/suggestions/suggest-slice-swap.rs +++ b/tests/ui/suggestions/suggest-slice-swap.rs @@ -1,4 +1,4 @@ -// run-rustfix +//@ run-rustfix #![allow(dead_code)] fn swap(arr: &mut [u32; 2]) { diff --git a/tests/ui/suggestions/suggest-std-when-using-type.fixed b/tests/ui/suggestions/suggest-std-when-using-type.fixed index 102c5c1868f..ebbb854175b 100644 --- a/tests/ui/suggestions/suggest-std-when-using-type.fixed +++ b/tests/ui/suggestions/suggest-std-when-using-type.fixed @@ -1,4 +1,4 @@ -// run-rustfix +//@ run-rustfix fn main() { let pi = std::f32::consts::PI; //~ ERROR ambiguous associated type let bytes = "hello world".as_bytes(); diff --git a/tests/ui/suggestions/suggest-std-when-using-type.rs b/tests/ui/suggestions/suggest-std-when-using-type.rs index 5abc016deb0..06aab63d688 100644 --- a/tests/ui/suggestions/suggest-std-when-using-type.rs +++ b/tests/ui/suggestions/suggest-std-when-using-type.rs @@ -1,4 +1,4 @@ -// run-rustfix +//@ run-rustfix fn main() { let pi = f32::consts::PI; //~ ERROR ambiguous associated type let bytes = "hello world".as_bytes(); diff --git a/tests/ui/suggestions/suggest-swapping-self-ty-and-trait-edition-2021.rs b/tests/ui/suggestions/suggest-swapping-self-ty-and-trait-edition-2021.rs index 03c7ed347bd..c4384bce3a9 100644 --- a/tests/ui/suggestions/suggest-swapping-self-ty-and-trait-edition-2021.rs +++ b/tests/ui/suggestions/suggest-swapping-self-ty-and-trait-edition-2021.rs @@ -1,4 +1,4 @@ -// edition:2021 +//@ edition:2021 pub trait Trait<'a, T> {} diff --git a/tests/ui/suggestions/suggest-tryinto-edition-change.rs b/tests/ui/suggestions/suggest-tryinto-edition-change.rs index 70c4b210d3a..c4a24ffee93 100644 --- a/tests/ui/suggestions/suggest-tryinto-edition-change.rs +++ b/tests/ui/suggestions/suggest-tryinto-edition-change.rs @@ -1,6 +1,6 @@ // Make sure that trying to access `TryInto`, `TryFrom`, `FromIterator` in pre-2021 mentions // Edition 2021 change -// edition:2018 +//@ edition:2018 fn test() { let _i: i16 = 0_i32.try_into().unwrap(); diff --git a/tests/ui/suggestions/trait-with-missing-associated-type-restriction-fixable.fixed b/tests/ui/suggestions/trait-with-missing-associated-type-restriction-fixable.fixed index 8ef7e34ab30..47f542d12e2 100644 --- a/tests/ui/suggestions/trait-with-missing-associated-type-restriction-fixable.fixed +++ b/tests/ui/suggestions/trait-with-missing-associated-type-restriction-fixable.fixed @@ -1,4 +1,4 @@ -// run-rustfix +//@ run-rustfix #![allow(unused)] // for the fixed file trait Trait { diff --git a/tests/ui/suggestions/trait-with-missing-associated-type-restriction-fixable.rs b/tests/ui/suggestions/trait-with-missing-associated-type-restriction-fixable.rs index 7bd38d0d45d..245902dad26 100644 --- a/tests/ui/suggestions/trait-with-missing-associated-type-restriction-fixable.rs +++ b/tests/ui/suggestions/trait-with-missing-associated-type-restriction-fixable.rs @@ -1,4 +1,4 @@ -// run-rustfix +//@ run-rustfix #![allow(unused)] // for the fixed file trait Trait { diff --git a/tests/ui/suggestions/try-removing-the-field.rs b/tests/ui/suggestions/try-removing-the-field.rs index 1b7289b229b..dc1bde082c4 100644 --- a/tests/ui/suggestions/try-removing-the-field.rs +++ b/tests/ui/suggestions/try-removing-the-field.rs @@ -1,4 +1,4 @@ -// run-pass +//@ run-pass #![allow(dead_code)] diff --git a/tests/ui/suggestions/type-ascription-instead-of-let.fixed b/tests/ui/suggestions/type-ascription-instead-of-let.fixed index e3d03b6f22a..6a4f23b7820 100644 --- a/tests/ui/suggestions/type-ascription-instead-of-let.fixed +++ b/tests/ui/suggestions/type-ascription-instead-of-let.fixed @@ -1,4 +1,4 @@ -// run-rustfix +//@ run-rustfix fn fun(x: i32) -> i32 { x } diff --git a/tests/ui/suggestions/type-ascription-instead-of-let.rs b/tests/ui/suggestions/type-ascription-instead-of-let.rs index 6e1c86f9671..0a753bf2eef 100644 --- a/tests/ui/suggestions/type-ascription-instead-of-let.rs +++ b/tests/ui/suggestions/type-ascription-instead-of-let.rs @@ -1,4 +1,4 @@ -// run-rustfix +//@ run-rustfix fn fun(x: i32) -> i32 { x } diff --git a/tests/ui/suggestions/type-ascription-instead-of-method.fixed b/tests/ui/suggestions/type-ascription-instead-of-method.fixed index 02e316b264e..1ad7a9f6e61 100644 --- a/tests/ui/suggestions/type-ascription-instead-of-method.fixed +++ b/tests/ui/suggestions/type-ascription-instead-of-method.fixed @@ -1,4 +1,4 @@ -// run-rustfix +//@ run-rustfix fn main() { let _ = Box::new("foo".to_string()); //~^ ERROR path separator must be a double colon diff --git a/tests/ui/suggestions/type-ascription-instead-of-method.rs b/tests/ui/suggestions/type-ascription-instead-of-method.rs index 6f893ee89b2..1984c1b1904 100644 --- a/tests/ui/suggestions/type-ascription-instead-of-method.rs +++ b/tests/ui/suggestions/type-ascription-instead-of-method.rs @@ -1,4 +1,4 @@ -// run-rustfix +//@ run-rustfix fn main() { let _ = Box:new("foo".to_string()); //~^ ERROR path separator must be a double colon diff --git a/tests/ui/suggestions/type-ascription-instead-of-path-2.fixed b/tests/ui/suggestions/type-ascription-instead-of-path-2.fixed index 4cec58be856..d432c5db683 100644 --- a/tests/ui/suggestions/type-ascription-instead-of-path-2.fixed +++ b/tests/ui/suggestions/type-ascription-instead-of-path-2.fixed @@ -1,4 +1,4 @@ -// run-rustfix +//@ run-rustfix fn main() -> Result<(), ()> { let _ = vec![Ok(2)].into_iter().collect::,_>>()?; //~^ ERROR expected one of diff --git a/tests/ui/suggestions/type-ascription-instead-of-path-2.rs b/tests/ui/suggestions/type-ascription-instead-of-path-2.rs index 5695d5a7f72..1f4352277fd 100644 --- a/tests/ui/suggestions/type-ascription-instead-of-path-2.rs +++ b/tests/ui/suggestions/type-ascription-instead-of-path-2.rs @@ -1,4 +1,4 @@ -// run-rustfix +//@ run-rustfix fn main() -> Result<(), ()> { let _ = vec![Ok(2)].into_iter().collect:,_>>()?; //~^ ERROR expected one of diff --git a/tests/ui/suggestions/type-ascription-instead-of-variant.fixed b/tests/ui/suggestions/type-ascription-instead-of-variant.fixed index 04cb2068624..ae46e809abe 100644 --- a/tests/ui/suggestions/type-ascription-instead-of-variant.fixed +++ b/tests/ui/suggestions/type-ascription-instead-of-variant.fixed @@ -1,4 +1,4 @@ -// run-rustfix +//@ run-rustfix fn main() { let _ = Option::Some(""); //~^ ERROR path separator must be a double colon diff --git a/tests/ui/suggestions/type-ascription-instead-of-variant.rs b/tests/ui/suggestions/type-ascription-instead-of-variant.rs index 2cce69bfec8..07e17f81286 100644 --- a/tests/ui/suggestions/type-ascription-instead-of-variant.rs +++ b/tests/ui/suggestions/type-ascription-instead-of-variant.rs @@ -1,4 +1,4 @@ -// run-rustfix +//@ run-rustfix fn main() { let _ = Option:Some(""); //~^ ERROR path separator must be a double colon diff --git a/tests/ui/suggestions/type-mismatch-struct-field-shorthand.fixed b/tests/ui/suggestions/type-mismatch-struct-field-shorthand.fixed index 91758c0b218..135eb41c203 100644 --- a/tests/ui/suggestions/type-mismatch-struct-field-shorthand.fixed +++ b/tests/ui/suggestions/type-mismatch-struct-field-shorthand.fixed @@ -1,4 +1,4 @@ -// run-rustfix +//@ run-rustfix #![allow(dead_code)] struct RGB { r: f64, g: f64, b: f64 } diff --git a/tests/ui/suggestions/type-mismatch-struct-field-shorthand.rs b/tests/ui/suggestions/type-mismatch-struct-field-shorthand.rs index 9d3a17a72b2..f398d18a0e1 100644 --- a/tests/ui/suggestions/type-mismatch-struct-field-shorthand.rs +++ b/tests/ui/suggestions/type-mismatch-struct-field-shorthand.rs @@ -1,4 +1,4 @@ -// run-rustfix +//@ run-rustfix #![allow(dead_code)] struct RGB { r: f64, g: f64, b: f64 } diff --git a/tests/ui/suggestions/undeclared-module-alloc.rs b/tests/ui/suggestions/undeclared-module-alloc.rs index 1defa1cef28..e5f22369b94 100644 --- a/tests/ui/suggestions/undeclared-module-alloc.rs +++ b/tests/ui/suggestions/undeclared-module-alloc.rs @@ -1,4 +1,4 @@ -// edition:2018 +//@ edition:2018 use alloc::rc::Rc; //~ ERROR failed to resolve: use of undeclared crate or module `alloc` diff --git a/tests/ui/suggestions/unsized-function-parameter.fixed b/tests/ui/suggestions/unsized-function-parameter.fixed index 18e93cb96cd..24f0698f176 100644 --- a/tests/ui/suggestions/unsized-function-parameter.fixed +++ b/tests/ui/suggestions/unsized-function-parameter.fixed @@ -1,4 +1,4 @@ -// run-rustfix +//@ run-rustfix #![allow(dead_code, unused_variables)] diff --git a/tests/ui/suggestions/unsized-function-parameter.rs b/tests/ui/suggestions/unsized-function-parameter.rs index 344ee71c1bc..b2c6aa4ee06 100644 --- a/tests/ui/suggestions/unsized-function-parameter.rs +++ b/tests/ui/suggestions/unsized-function-parameter.rs @@ -1,4 +1,4 @@ -// run-rustfix +//@ run-rustfix #![allow(dead_code, unused_variables)] diff --git a/tests/ui/suggestions/use-placement-resolve.fixed b/tests/ui/suggestions/use-placement-resolve.fixed index afe74cff2e9..d15aee00484 100644 --- a/tests/ui/suggestions/use-placement-resolve.fixed +++ b/tests/ui/suggestions/use-placement-resolve.fixed @@ -1,5 +1,5 @@ -// compile-flags: --test -// run-rustfix +//@ compile-flags: --test +//@ run-rustfix // Checks that the `use` suggestion appears *below* this inner attribute. // There was an issue where the test synthetic #[allow(dead)] attribute on // main which has a dummy span caused the suggestion to be placed at the top diff --git a/tests/ui/suggestions/use-placement-resolve.rs b/tests/ui/suggestions/use-placement-resolve.rs index b30ddb3af07..7724718ee79 100644 --- a/tests/ui/suggestions/use-placement-resolve.rs +++ b/tests/ui/suggestions/use-placement-resolve.rs @@ -1,5 +1,5 @@ -// compile-flags: --test -// run-rustfix +//@ compile-flags: --test +//@ run-rustfix // Checks that the `use` suggestion appears *below* this inner attribute. // There was an issue where the test synthetic #[allow(dead)] attribute on // main which has a dummy span caused the suggestion to be placed at the top diff --git a/tests/ui/suggestions/use-placement-typeck.fixed b/tests/ui/suggestions/use-placement-typeck.fixed index 37335da060e..74949495cc3 100644 --- a/tests/ui/suggestions/use-placement-typeck.fixed +++ b/tests/ui/suggestions/use-placement-typeck.fixed @@ -1,5 +1,5 @@ -// compile-flags: --test -// run-rustfix +//@ compile-flags: --test +//@ run-rustfix // Checks that the `use` suggestion appears *below* this inner attribute. // There was an issue where the test synthetic #[allow(dead)] attribute on // main which has a dummy span caused the suggestion to be placed at the top diff --git a/tests/ui/suggestions/use-placement-typeck.rs b/tests/ui/suggestions/use-placement-typeck.rs index aab20d2e90a..74e9edafe81 100644 --- a/tests/ui/suggestions/use-placement-typeck.rs +++ b/tests/ui/suggestions/use-placement-typeck.rs @@ -1,5 +1,5 @@ -// compile-flags: --test -// run-rustfix +//@ compile-flags: --test +//@ run-rustfix // Checks that the `use` suggestion appears *below* this inner attribute. // There was an issue where the test synthetic #[allow(dead)] attribute on // main which has a dummy span caused the suggestion to be placed at the top diff --git a/tests/ui/super-fast-paren-parsing.rs b/tests/ui/super-fast-paren-parsing.rs index cb42ff2c644..ce7283eee03 100644 --- a/tests/ui/super-fast-paren-parsing.rs +++ b/tests/ui/super-fast-paren-parsing.rs @@ -1,10 +1,10 @@ -// run-pass +//@ run-pass #![allow(unused_parens)] #![allow(non_upper_case_globals)] #![allow(dead_code)] -// exec-env:RUST_MIN_STACK=16000000 -// rustc-env:RUST_MIN_STACK=16000000 +//@ exec-env:RUST_MIN_STACK=16000000 +//@ rustc-env:RUST_MIN_STACK=16000000 // // Big stack is needed for pretty printing, a little sad... diff --git a/tests/ui/super.rs b/tests/ui/super.rs index 86c720288c3..5d2ea92e921 100644 --- a/tests/ui/super.rs +++ b/tests/ui/super.rs @@ -1,7 +1,7 @@ -// run-pass +//@ run-pass #![allow(dead_code)] -// pretty-expanded FIXME #23616 +//@ pretty-expanded FIXME #23616 pub mod a { pub fn f() {} diff --git a/tests/ui/svh-add-nothing.rs b/tests/ui/svh-add-nothing.rs index d7d037f0b32..75ef82d0fa3 100644 --- a/tests/ui/svh-add-nothing.rs +++ b/tests/ui/svh-add-nothing.rs @@ -1,10 +1,10 @@ -// run-pass +//@ run-pass // note that these aux-build directives must be in this order -// aux-build:svh-a-base.rs -// aux-build:svh-b.rs -// aux-build:svh-a-base.rs +//@ aux-build:svh-a-base.rs +//@ aux-build:svh-b.rs +//@ aux-build:svh-a-base.rs -// pretty-expanded FIXME #23616 +//@ pretty-expanded FIXME #23616 extern crate a; extern crate b; diff --git a/tests/ui/svh/changing-crates.rs b/tests/ui/svh/changing-crates.rs index 66298e06ed6..78075a5c75f 100644 --- a/tests/ui/svh/changing-crates.rs +++ b/tests/ui/svh/changing-crates.rs @@ -1,8 +1,8 @@ // note that these aux-build directives must be in this order -// aux-build:changing-crates-a1.rs -// aux-build:changing-crates-b.rs -// aux-build:changing-crates-a2.rs -// normalize-stderr-test: "(crate `(\w+)`:) .*" -> "$1 $$PATH_$2" +//@ aux-build:changing-crates-a1.rs +//@ aux-build:changing-crates-b.rs +//@ aux-build:changing-crates-a2.rs +//@ normalize-stderr-test: "(crate `(\w+)`:) .*" -> "$1 $$PATH_$2" extern crate a; extern crate b; //~ ERROR: found possibly newer version of crate `a` which `b` depends on diff --git a/tests/ui/svh/svh-change-lit.rs b/tests/ui/svh/svh-change-lit.rs index ea500711bb7..6ecdd9f2c08 100644 --- a/tests/ui/svh/svh-change-lit.rs +++ b/tests/ui/svh/svh-change-lit.rs @@ -1,8 +1,8 @@ // note that these aux-build directives must be in this order -// aux-build:svh-a-base.rs -// aux-build:svh-b.rs -// aux-build:svh-a-change-lit.rs -// normalize-stderr-test: "(crate `(\w+)`:) .*" -> "$1 $$PATH_$2" +//@ aux-build:svh-a-base.rs +//@ aux-build:svh-b.rs +//@ aux-build:svh-a-change-lit.rs +//@ normalize-stderr-test: "(crate `(\w+)`:) .*" -> "$1 $$PATH_$2" extern crate a; extern crate b; //~ ERROR: found possibly newer version of crate `a` which `b` depends on diff --git a/tests/ui/svh/svh-change-significant-cfg.rs b/tests/ui/svh/svh-change-significant-cfg.rs index ff919ea83d5..c03560ee511 100644 --- a/tests/ui/svh/svh-change-significant-cfg.rs +++ b/tests/ui/svh/svh-change-significant-cfg.rs @@ -1,8 +1,8 @@ // note that these aux-build directives must be in this order -// aux-build:svh-a-base.rs -// aux-build:svh-b.rs -// aux-build:svh-a-change-significant-cfg.rs -// normalize-stderr-test: "(crate `(\w+)`:) .*" -> "$1 $$PATH_$2" +//@ aux-build:svh-a-base.rs +//@ aux-build:svh-b.rs +//@ aux-build:svh-a-change-significant-cfg.rs +//@ normalize-stderr-test: "(crate `(\w+)`:) .*" -> "$1 $$PATH_$2" extern crate a; extern crate b; //~ ERROR: found possibly newer version of crate `a` which `b` depends on diff --git a/tests/ui/svh/svh-change-trait-bound.rs b/tests/ui/svh/svh-change-trait-bound.rs index a4ba06eaf2e..4bbbf45a886 100644 --- a/tests/ui/svh/svh-change-trait-bound.rs +++ b/tests/ui/svh/svh-change-trait-bound.rs @@ -1,8 +1,8 @@ // note that these aux-build directives must be in this order -// aux-build:svh-a-base.rs -// aux-build:svh-b.rs -// aux-build:svh-a-change-trait-bound.rs -// normalize-stderr-test: "(crate `(\w+)`:) .*" -> "$1 $$PATH_$2" +//@ aux-build:svh-a-base.rs +//@ aux-build:svh-b.rs +//@ aux-build:svh-a-change-trait-bound.rs +//@ normalize-stderr-test: "(crate `(\w+)`:) .*" -> "$1 $$PATH_$2" extern crate a; extern crate b; //~ ERROR: found possibly newer version of crate `a` which `b` depends on diff --git a/tests/ui/svh/svh-change-type-arg.rs b/tests/ui/svh/svh-change-type-arg.rs index d1651814bf6..cdc5cf24272 100644 --- a/tests/ui/svh/svh-change-type-arg.rs +++ b/tests/ui/svh/svh-change-type-arg.rs @@ -1,8 +1,8 @@ // note that these aux-build directives must be in this order -// aux-build:svh-a-base.rs -// aux-build:svh-b.rs -// aux-build:svh-a-change-type-arg.rs -// normalize-stderr-test: "(crate `(\w+)`:) .*" -> "$1 $$PATH_$2" +//@ aux-build:svh-a-base.rs +//@ aux-build:svh-b.rs +//@ aux-build:svh-a-change-type-arg.rs +//@ normalize-stderr-test: "(crate `(\w+)`:) .*" -> "$1 $$PATH_$2" extern crate a; extern crate b; //~ ERROR: found possibly newer version of crate `a` which `b` depends on diff --git a/tests/ui/svh/svh-change-type-ret.rs b/tests/ui/svh/svh-change-type-ret.rs index a4be50a6433..f2a579fab63 100644 --- a/tests/ui/svh/svh-change-type-ret.rs +++ b/tests/ui/svh/svh-change-type-ret.rs @@ -1,8 +1,8 @@ // note that these aux-build directives must be in this order -// aux-build:svh-a-base.rs -// aux-build:svh-b.rs -// aux-build:svh-a-change-type-ret.rs -// normalize-stderr-test: "(crate `(\w+)`:) .*" -> "$1 $$PATH_$2" +//@ aux-build:svh-a-base.rs +//@ aux-build:svh-b.rs +//@ aux-build:svh-a-change-type-ret.rs +//@ normalize-stderr-test: "(crate `(\w+)`:) .*" -> "$1 $$PATH_$2" extern crate a; extern crate b; //~ ERROR: found possibly newer version of crate `a` which `b` depends on diff --git a/tests/ui/svh/svh-change-type-static.rs b/tests/ui/svh/svh-change-type-static.rs index c470761be19..489923ddecf 100644 --- a/tests/ui/svh/svh-change-type-static.rs +++ b/tests/ui/svh/svh-change-type-static.rs @@ -1,8 +1,8 @@ // note that these aux-build directives must be in this order -// aux-build:svh-a-base.rs -// aux-build:svh-b.rs -// aux-build:svh-a-change-type-static.rs -// normalize-stderr-test: "(crate `(\w+)`:) .*" -> "$1 $$PATH_$2" +//@ aux-build:svh-a-base.rs +//@ aux-build:svh-b.rs +//@ aux-build:svh-a-change-type-static.rs +//@ normalize-stderr-test: "(crate `(\w+)`:) .*" -> "$1 $$PATH_$2" extern crate a; extern crate b; //~ ERROR: found possibly newer version of crate `a` which `b` depends on diff --git a/tests/ui/svh/svh-use-trait.rs b/tests/ui/svh/svh-use-trait.rs index e144fdffb52..8ac4cc42605 100644 --- a/tests/ui/svh/svh-use-trait.rs +++ b/tests/ui/svh/svh-use-trait.rs @@ -1,8 +1,8 @@ // note that these aux-build directives must be in this order -// aux-build:svh-uta-base.rs -// aux-build:svh-utb.rs -// aux-build:svh-uta-change-use-trait.rs -// normalize-stderr-test: "(crate `(\w+)`:) .*" -> "$1 $$PATH_$2" +//@ aux-build:svh-uta-base.rs +//@ aux-build:svh-utb.rs +//@ aux-build:svh-uta-change-use-trait.rs +//@ normalize-stderr-test: "(crate `(\w+)`:) .*" -> "$1 $$PATH_$2" //! "svh-uta-trait.rs" is checking that we detect a //! change from `use foo::TraitB` to use `foo::TraitB` in the hash diff --git a/tests/ui/swap-1.rs b/tests/ui/swap-1.rs index d87114748dd..b104c3ade42 100644 --- a/tests/ui/swap-1.rs +++ b/tests/ui/swap-1.rs @@ -1,4 +1,4 @@ -// run-pass +//@ run-pass use std::mem::swap; diff --git a/tests/ui/swap-overlapping.rs b/tests/ui/swap-overlapping.rs index 85b357e0c02..f7720e0470d 100644 --- a/tests/ui/swap-overlapping.rs +++ b/tests/ui/swap-overlapping.rs @@ -1,9 +1,9 @@ -// run-pass +//@ run-pass #![allow(dead_code)] // Issue #5041 - avoid overlapping memcpy when src and dest of a swap are the same -// pretty-expanded FIXME #23616 +//@ pretty-expanded FIXME #23616 use std::ptr; diff --git a/tests/ui/symbol-mangling-version/bad-value.rs b/tests/ui/symbol-mangling-version/bad-value.rs index 7623857d49e..f6fa5c85f33 100644 --- a/tests/ui/symbol-mangling-version/bad-value.rs +++ b/tests/ui/symbol-mangling-version/bad-value.rs @@ -1,6 +1,6 @@ -// revisions: no-value blank bad -// [no-value] compile-flags: -Csymbol-mangling-version -// [blank] compile-flags: -Csymbol-mangling-version= -// [bad] compile-flags: -Csymbol-mangling-version=bad-value +//@ revisions: no-value blank bad +//@ [no-value] compile-flags: -Csymbol-mangling-version +//@ [blank] compile-flags: -Csymbol-mangling-version= +//@ [bad] compile-flags: -Csymbol-mangling-version=bad-value fn main() {} diff --git a/tests/ui/symbol-mangling-version/stable.rs b/tests/ui/symbol-mangling-version/stable.rs index dac9bb18d1c..c766ad03977 100644 --- a/tests/ui/symbol-mangling-version/stable.rs +++ b/tests/ui/symbol-mangling-version/stable.rs @@ -1,5 +1,5 @@ -// check-pass -// revisions: v0 -// [v0] compile-flags: -Csymbol-mangling-version=v0 +//@ check-pass +//@ revisions: v0 +//@ [v0] compile-flags: -Csymbol-mangling-version=v0 fn main() {} diff --git a/tests/ui/symbol-mangling-version/unstable.rs b/tests/ui/symbol-mangling-version/unstable.rs index 42750a64574..d5af8542996 100644 --- a/tests/ui/symbol-mangling-version/unstable.rs +++ b/tests/ui/symbol-mangling-version/unstable.rs @@ -1,9 +1,9 @@ -// revisions: legacy legacy-ok hashed hashed-ok -// [legacy] compile-flags: -Csymbol-mangling-version=legacy -// [legacy-ok] check-pass -// [legacy-ok] compile-flags: -Zunstable-options -Csymbol-mangling-version=legacy -// [hashed] compile-flags: -Csymbol-mangling-version=hashed -// [hashed-ok] check-pass -// [hashed-ok] compile-flags: -Zunstable-options -Csymbol-mangling-version=hashed +//@ revisions: legacy legacy-ok hashed hashed-ok +//@ [legacy] compile-flags: -Csymbol-mangling-version=legacy +//@ [legacy-ok] check-pass +//@ [legacy-ok] compile-flags: -Zunstable-options -Csymbol-mangling-version=legacy +//@ [hashed] compile-flags: -Csymbol-mangling-version=hashed +//@ [hashed-ok] check-pass +//@ [hashed-ok] compile-flags: -Zunstable-options -Csymbol-mangling-version=hashed fn main() {} diff --git a/tests/ui/symbol-names/basic.rs b/tests/ui/symbol-names/basic.rs index 65a63262810..dfcac21ccd6 100644 --- a/tests/ui/symbol-names/basic.rs +++ b/tests/ui/symbol-names/basic.rs @@ -1,7 +1,7 @@ -// build-fail -// revisions: legacy v0 -//[legacy]compile-flags: -Z unstable-options -C symbol-mangling-version=legacy - //[v0]compile-flags: -C symbol-mangling-version=v0 +//@ build-fail +//@ revisions: legacy v0 +//@[legacy]compile-flags: -Z unstable-options -C symbol-mangling-version=legacy + //@[v0]compile-flags: -C symbol-mangling-version=v0 #![feature(rustc_attrs)] diff --git a/tests/ui/symbol-names/const-generics-demangling.rs b/tests/ui/symbol-names/const-generics-demangling.rs index 4a04eca67fd..86f24f6af6a 100644 --- a/tests/ui/symbol-names/const-generics-demangling.rs +++ b/tests/ui/symbol-names/const-generics-demangling.rs @@ -1,10 +1,10 @@ -// build-fail -// revisions: legacy v0 -// compile-flags: --crate-name=c -//[legacy]compile-flags: -C symbol-mangling-version=legacy -Z unstable-options -// [v0]compile-flags: -C symbol-mangling-version=v0 -//[legacy]normalize-stderr-test: "h[[:xdigit:]]{16}" -> "h[HASH]" -// [v0]normalize-stderr-test: "c\[.*?\]" -> "c[HASH]" +//@ build-fail +//@ revisions: legacy v0 +//@ compile-flags: --crate-name=c +//@[legacy]compile-flags: -C symbol-mangling-version=legacy -Z unstable-options +//@ [v0]compile-flags: -C symbol-mangling-version=v0 +//@[legacy]normalize-stderr-test: "h[[:xdigit:]]{16}" -> "h[HASH]" +//@ [v0]normalize-stderr-test: "c\[.*?\]" -> "c[HASH]" #![feature(rustc_attrs)] pub struct Unsigned; diff --git a/tests/ui/symbol-names/const-generics-str-demangling.rs b/tests/ui/symbol-names/const-generics-str-demangling.rs index 619b34f2559..871f3694e00 100644 --- a/tests/ui/symbol-names/const-generics-str-demangling.rs +++ b/tests/ui/symbol-names/const-generics-str-demangling.rs @@ -1,6 +1,6 @@ -// build-fail -// compile-flags: -C symbol-mangling-version=v0 --crate-name=c -// normalize-stderr-test: "c\[.*?\]" -> "c[HASH]" +//@ build-fail +//@ compile-flags: -C symbol-mangling-version=v0 --crate-name=c +//@ normalize-stderr-test: "c\[.*?\]" -> "c[HASH]" #![feature(adt_const_params, rustc_attrs)] #![allow(incomplete_features)] diff --git a/tests/ui/symbol-names/const-generics-structural-demangling.rs b/tests/ui/symbol-names/const-generics-structural-demangling.rs index 947fddf3f31..6c79ed7314c 100644 --- a/tests/ui/symbol-names/const-generics-structural-demangling.rs +++ b/tests/ui/symbol-names/const-generics-structural-demangling.rs @@ -1,7 +1,7 @@ -// build-fail -// compile-flags: -C symbol-mangling-version=v0 --crate-name=c +//@ build-fail +//@ compile-flags: -C symbol-mangling-version=v0 --crate-name=c -// normalize-stderr-test: "c\[[0-9a-f]+\]" -> "c[HASH]" +//@ normalize-stderr-test: "c\[[0-9a-f]+\]" -> "c[HASH]" #![feature(adt_const_params, decl_macro, rustc_attrs)] #![allow(incomplete_features)] diff --git a/tests/ui/symbol-names/const-generics.rs b/tests/ui/symbol-names/const-generics.rs index 1242126e0cc..712c2a7249d 100644 --- a/tests/ui/symbol-names/const-generics.rs +++ b/tests/ui/symbol-names/const-generics.rs @@ -1,7 +1,7 @@ -// check-pass -// revisions: legacy v0 -//[legacy]compile-flags: -Z unstable-options -C symbol-mangling-version=legacy --crate-type=lib -//[v0]compile-flags: -C symbol-mangling-version=v0 --crate-type=lib +//@ check-pass +//@ revisions: legacy v0 +//@[legacy]compile-flags: -Z unstable-options -C symbol-mangling-version=legacy --crate-type=lib +//@[v0]compile-flags: -C symbol-mangling-version=v0 --crate-type=lib // `char` pub struct Char; diff --git a/tests/ui/symbol-names/foreign-types.rs b/tests/ui/symbol-names/foreign-types.rs index 8f5b07769ca..2a9aadfcb83 100644 --- a/tests/ui/symbol-names/foreign-types.rs +++ b/tests/ui/symbol-names/foreign-types.rs @@ -1,5 +1,5 @@ -// build-fail -// compile-flags: -C symbol-mangling-version=v0 +//@ build-fail +//@ compile-flags: -C symbol-mangling-version=v0 #![feature(extern_types)] #![feature(rustc_attrs)] diff --git a/tests/ui/symbol-names/impl1.rs b/tests/ui/symbol-names/impl1.rs index 629c2f33ddc..fa4be88f68f 100644 --- a/tests/ui/symbol-names/impl1.rs +++ b/tests/ui/symbol-names/impl1.rs @@ -1,8 +1,8 @@ -// build-fail -// revisions: legacy v0 -//[legacy]compile-flags: -Z unstable-options -C symbol-mangling-version=legacy - //[v0]compile-flags: -C symbol-mangling-version=v0 -//[legacy]normalize-stderr-test: "h[\w]{16}E?\)" -> ")" +//@ build-fail +//@ revisions: legacy v0 +//@[legacy]compile-flags: -Z unstable-options -C symbol-mangling-version=legacy + //@[v0]compile-flags: -C symbol-mangling-version=v0 +//@[legacy]normalize-stderr-test: "h[\w]{16}E?\)" -> ")" #![feature(auto_traits, rustc_attrs)] #![allow(dead_code)] diff --git a/tests/ui/symbol-names/impl2.rs b/tests/ui/symbol-names/impl2.rs index 81aba403d0b..8d103fab43b 100644 --- a/tests/ui/symbol-names/impl2.rs +++ b/tests/ui/symbol-names/impl2.rs @@ -1,4 +1,4 @@ -// build-fail +//@ build-fail #![feature(rustc_attrs)] #![allow(dead_code)] diff --git a/tests/ui/symbol-names/issue-53912.rs b/tests/ui/symbol-names/issue-53912.rs index 65b6825a832..194416cdb70 100644 --- a/tests/ui/symbol-names/issue-53912.rs +++ b/tests/ui/symbol-names/issue-53912.rs @@ -1,4 +1,4 @@ -// build-pass +//@ build-pass // This test is the same code as in ui/symbol-names/issue-60925.rs but this checks that the // reproduction compiles successfully and doesn't segfault, whereas that test just checks that the diff --git a/tests/ui/symbol-names/issue-60925.rs b/tests/ui/symbol-names/issue-60925.rs index ab0a3a7df1d..9f1f007a0fa 100644 --- a/tests/ui/symbol-names/issue-60925.rs +++ b/tests/ui/symbol-names/issue-60925.rs @@ -1,7 +1,7 @@ -// build-fail -// revisions: legacy v0 -//[legacy]compile-flags: -Z unstable-options -C symbol-mangling-version=legacy - //[v0]compile-flags: -C symbol-mangling-version=v0 +//@ build-fail +//@ revisions: legacy v0 +//@[legacy]compile-flags: -Z unstable-options -C symbol-mangling-version=legacy + //@[v0]compile-flags: -C symbol-mangling-version=v0 #![feature(rustc_attrs)] diff --git a/tests/ui/symbol-names/issue-75326.rs b/tests/ui/symbol-names/issue-75326.rs index 4a1f5a21263..a6aef3ddd7d 100644 --- a/tests/ui/symbol-names/issue-75326.rs +++ b/tests/ui/symbol-names/issue-75326.rs @@ -1,8 +1,8 @@ -// build-fail -// revisions: legacy v0 -//[legacy]compile-flags: -Z unstable-options -C symbol-mangling-version=legacy -//[v0]compile-flags: -C symbol-mangling-version=v0 -//[legacy]normalize-stderr-test: "h[\w{16}]+" -> "SYMBOL_HASH" +//@ build-fail +//@ revisions: legacy v0 +//@[legacy]compile-flags: -Z unstable-options -C symbol-mangling-version=legacy +//@[v0]compile-flags: -C symbol-mangling-version=v0 +//@[legacy]normalize-stderr-test: "h[\w{16}]+" -> "SYMBOL_HASH" #![feature(rustc_attrs)] diff --git a/tests/ui/symbol-names/issue-76365.rs b/tests/ui/symbol-names/issue-76365.rs index 932057b6590..f23ff2eff04 100644 --- a/tests/ui/symbol-names/issue-76365.rs +++ b/tests/ui/symbol-names/issue-76365.rs @@ -1,7 +1,7 @@ -// check-pass -// revisions: legacy v0 -//[legacy]compile-flags: -Z unstable-options -C symbol-mangling-version=legacy --crate-type=lib -//[v0]compile-flags: -C symbol-mangling-version=v0 --crate-type=lib +//@ check-pass +//@ revisions: legacy v0 +//@[legacy]compile-flags: -Z unstable-options -C symbol-mangling-version=legacy --crate-type=lib +//@[v0]compile-flags: -C symbol-mangling-version=v0 --crate-type=lib pub struct Bar; diff --git a/tests/ui/symbol-names/trait-objects.rs b/tests/ui/symbol-names/trait-objects.rs index 5bcbc08413f..d3fa40d1f39 100644 --- a/tests/ui/symbol-names/trait-objects.rs +++ b/tests/ui/symbol-names/trait-objects.rs @@ -1,9 +1,9 @@ // Ensure that trait objects don't include more than one binder. See #83611 -// build-fail -// revisions: v0 -//[v0]compile-flags: -C symbol-mangling-version=v0 -//[v0]normalize-stderr-test: "core\[.*?\]" -> "core[HASH]" +//@ build-fail +//@ revisions: v0 +//@[v0]compile-flags: -C symbol-mangling-version=v0 +//@[v0]normalize-stderr-test: "core\[.*?\]" -> "core[HASH]" #![feature(rustc_attrs)] diff --git a/tests/ui/symbol-names/types.rs b/tests/ui/symbol-names/types.rs index 475e8d89abf..b121408c843 100644 --- a/tests/ui/symbol-names/types.rs +++ b/tests/ui/symbol-names/types.rs @@ -1,8 +1,8 @@ -// build-fail -// revisions: legacy verbose-legacy -// compile-flags: --crate-name=a -C symbol-mangling-version=legacy -Z unstable-options -//[verbose-legacy]compile-flags: -Zverbose-internals -// normalize-stderr-test: "h[[:xdigit:]]{16}" -> "h[HASH]" +//@ build-fail +//@ revisions: legacy verbose-legacy +//@ compile-flags: --crate-name=a -C symbol-mangling-version=legacy -Z unstable-options +//@[verbose-legacy]compile-flags: -Zverbose-internals +//@ normalize-stderr-test: "h[[:xdigit:]]{16}" -> "h[HASH]" #![feature(never_type)] #![feature(rustc_attrs)] diff --git a/tests/ui/symbol-names/verbose.rs b/tests/ui/symbol-names/verbose.rs index 2aa43e87627..7aee558a4b6 100644 --- a/tests/ui/symbol-names/verbose.rs +++ b/tests/ui/symbol-names/verbose.rs @@ -3,8 +3,8 @@ // with a different value of the flag (for symbols involving generic // arguments equal to defaults of their respective parameters). // -// build-pass -// compile-flags: -Zverbose-internals +//@ build-pass +//@ compile-flags: -Zverbose-internals pub fn error(msg: String) -> Box { msg.into() diff --git a/tests/ui/symbol-names/x86-stdcall.rs b/tests/ui/symbol-names/x86-stdcall.rs index c0cb42023a1..2375e3e2f70 100644 --- a/tests/ui/symbol-names/x86-stdcall.rs +++ b/tests/ui/symbol-names/x86-stdcall.rs @@ -1,8 +1,8 @@ // ignore-tidy-linelength -// build-pass -// only-x86 -// only-windows -// ignore-gnu - vectorcall is not supported by GCC: https://gcc.gnu.org/bugzilla/show_bug.cgi?id=89485 +//@ build-pass +//@ only-x86 +//@ only-windows +//@ ignore-gnu - vectorcall is not supported by GCC: https://gcc.gnu.org/bugzilla/show_bug.cgi?id=89485 #![crate_type = "cdylib"] #![feature(abi_vectorcall)] diff --git a/tests/ui/syntax-extension-minor.rs b/tests/ui/syntax-extension-minor.rs index 2d6710af392..cdd572b50fc 100644 --- a/tests/ui/syntax-extension-minor.rs +++ b/tests/ui/syntax-extension-minor.rs @@ -1,4 +1,4 @@ -// run-pass +//@ run-pass #![feature(concat_idents)] diff --git a/tests/ui/tag-variant-cast-non-nullary.fixed b/tests/ui/tag-variant-cast-non-nullary.fixed index 53e68c2ac6a..7e22116b955 100644 --- a/tests/ui/tag-variant-cast-non-nullary.fixed +++ b/tests/ui/tag-variant-cast-non-nullary.fixed @@ -1,4 +1,4 @@ -// run-rustfix +//@ run-rustfix #![allow(dead_code, unused_variables)] enum NonNullary { Nullary, diff --git a/tests/ui/tag-variant-cast-non-nullary.rs b/tests/ui/tag-variant-cast-non-nullary.rs index 0d0c6188ad1..1a64cf1933d 100644 --- a/tests/ui/tag-variant-cast-non-nullary.rs +++ b/tests/ui/tag-variant-cast-non-nullary.rs @@ -1,4 +1,4 @@ -// run-rustfix +//@ run-rustfix #![allow(dead_code, unused_variables)] enum NonNullary { Nullary, diff --git a/tests/ui/tail-call-arg-leak.rs b/tests/ui/tail-call-arg-leak.rs index a60944b632d..003fb212fcb 100644 --- a/tests/ui/tail-call-arg-leak.rs +++ b/tests/ui/tail-call-arg-leak.rs @@ -1,6 +1,6 @@ -// run-pass +//@ run-pass // use of tail calls causes arg slot leaks, issue #160. -// pretty-expanded FIXME #23616 +//@ pretty-expanded FIXME #23616 fn inner(dummy: String, b: bool) { if b { return inner(dummy, false); } } diff --git a/tests/ui/tail-cps.rs b/tests/ui/tail-cps.rs index f186683ea66..6305e9ecdbc 100644 --- a/tests/ui/tail-cps.rs +++ b/tests/ui/tail-cps.rs @@ -1,4 +1,4 @@ -// run-pass +//@ run-pass fn checktrue(rs: bool) -> bool { assert!((rs)); return true; } diff --git a/tests/ui/tail-typeck.rs b/tests/ui/tail-typeck.rs index 37a7694c8fa..feef58a3388 100644 --- a/tests/ui/tail-typeck.rs +++ b/tests/ui/tail-typeck.rs @@ -1,4 +1,4 @@ -// error-pattern: mismatched types +//@ error-pattern: mismatched types fn f() -> isize { return g(); } diff --git a/tests/ui/target-feature/aarch64-neon-works.rs b/tests/ui/target-feature/aarch64-neon-works.rs index 3878806fd02..51fc11b2f0e 100644 --- a/tests/ui/target-feature/aarch64-neon-works.rs +++ b/tests/ui/target-feature/aarch64-neon-works.rs @@ -1,5 +1,5 @@ -// only-aarch64 -// run-pass +//@ only-aarch64 +//@ run-pass #![allow(dead_code)] use std::arch::*; use std::arch::aarch64::*; diff --git a/tests/ui/target-feature/feature-hierarchy.rs b/tests/ui/target-feature/feature-hierarchy.rs index 5fbd5e8a28d..4cf9112810c 100644 --- a/tests/ui/target-feature/feature-hierarchy.rs +++ b/tests/ui/target-feature/feature-hierarchy.rs @@ -1,9 +1,9 @@ -// revisions: aarch64-neon aarch64-sve2 -// [aarch64-neon] compile-flags: -Ctarget-feature=+neon --target=aarch64-unknown-linux-gnu -// [aarch64-neon] needs-llvm-components: aarch64 -// [aarch64-sve2] compile-flags: -Ctarget-feature=-neon,+sve2 --target=aarch64-unknown-linux-gnu -// [aarch64-sve2] needs-llvm-components: aarch64 -// build-pass +//@ revisions: aarch64-neon aarch64-sve2 +//@ [aarch64-neon] compile-flags: -Ctarget-feature=+neon --target=aarch64-unknown-linux-gnu +//@ [aarch64-neon] needs-llvm-components: aarch64 +//@ [aarch64-sve2] compile-flags: -Ctarget-feature=-neon,+sve2 --target=aarch64-unknown-linux-gnu +//@ [aarch64-sve2] needs-llvm-components: aarch64 +//@ build-pass #![no_core] #![crate_type = "rlib"] #![feature(intrinsics, rustc_attrs, no_core, lang_items, staged_api)] diff --git a/tests/ui/target-feature/gate.rs b/tests/ui/target-feature/gate.rs index d6a191d7850..af47e84672f 100644 --- a/tests/ui/target-feature/gate.rs +++ b/tests/ui/target-feature/gate.rs @@ -1,4 +1,4 @@ -// only-x86_64 +//@ only-x86_64 // // gate-test-sse4a_target_feature // gate-test-powerpc_target_feature diff --git a/tests/ui/target-feature/invalid-attribute.rs b/tests/ui/target-feature/invalid-attribute.rs index 7c5941f5bae..2f951c4a00a 100644 --- a/tests/ui/target-feature/invalid-attribute.rs +++ b/tests/ui/target-feature/invalid-attribute.rs @@ -1,4 +1,4 @@ -// only-x86_64 +//@ only-x86_64 #![warn(unused_attributes)] diff --git a/tests/ui/target-feature/missing-plusminus-2.rs b/tests/ui/target-feature/missing-plusminus-2.rs index 13168728902..19f4bc6e724 100644 --- a/tests/ui/target-feature/missing-plusminus-2.rs +++ b/tests/ui/target-feature/missing-plusminus-2.rs @@ -1,6 +1,6 @@ -// compile-flags: -Ctarget-feature=rdrand --crate-type=rlib --target=x86_64-unknown-linux-gnu -// build-pass -// needs-llvm-components: x86 +//@ compile-flags: -Ctarget-feature=rdrand --crate-type=rlib --target=x86_64-unknown-linux-gnu +//@ build-pass +//@ needs-llvm-components: x86 #![feature(no_core)] #![no_core] diff --git a/tests/ui/target-feature/missing-plusminus.rs b/tests/ui/target-feature/missing-plusminus.rs index efee6592923..eb3e93c2ef7 100644 --- a/tests/ui/target-feature/missing-plusminus.rs +++ b/tests/ui/target-feature/missing-plusminus.rs @@ -1,2 +1,2 @@ -// compile-flags: -Ctarget-feature=banana --crate-type=rlib -// build-pass +//@ compile-flags: -Ctarget-feature=banana --crate-type=rlib +//@ build-pass diff --git a/tests/ui/target-feature/no-llvm-leaks.rs b/tests/ui/target-feature/no-llvm-leaks.rs index 5a71b2166c3..b4a391e184e 100644 --- a/tests/ui/target-feature/no-llvm-leaks.rs +++ b/tests/ui/target-feature/no-llvm-leaks.rs @@ -1,9 +1,9 @@ -// revisions: aarch64 x86-64 -// [aarch64] compile-flags: -Ctarget-feature=+neon,+fp16,+fhm --target=aarch64-unknown-linux-gnu -// [aarch64] needs-llvm-components: aarch64 -// [x86-64] compile-flags: -Ctarget-feature=+sse4.2,+rdrand --target=x86_64-unknown-linux-gnu -// [x86-64] needs-llvm-components: x86 -// build-pass +//@ revisions: aarch64 x86-64 +//@ [aarch64] compile-flags: -Ctarget-feature=+neon,+fp16,+fhm --target=aarch64-unknown-linux-gnu +//@ [aarch64] needs-llvm-components: aarch64 +//@ [x86-64] compile-flags: -Ctarget-feature=+sse4.2,+rdrand --target=x86_64-unknown-linux-gnu +//@ [x86-64] needs-llvm-components: x86 +//@ build-pass #![no_core] #![crate_type = "rlib"] #![feature(intrinsics, rustc_attrs, no_core, lang_items, staged_api)] diff --git a/tests/ui/target-feature/rust-specific-name-no-warnings.rs b/tests/ui/target-feature/rust-specific-name-no-warnings.rs index 1708a71a981..877d1b7d882 100644 --- a/tests/ui/target-feature/rust-specific-name-no-warnings.rs +++ b/tests/ui/target-feature/rust-specific-name-no-warnings.rs @@ -1,5 +1,5 @@ -// build-pass -// only-x86 -// compile-flags: -C target-feature=+pclmulqdq +//@ build-pass +//@ only-x86 +//@ compile-flags: -C target-feature=+pclmulqdq fn main() {} diff --git a/tests/ui/target-feature/similar-feature-suggestion.rs b/tests/ui/target-feature/similar-feature-suggestion.rs index 4e4e2160cac..242d472b794 100644 --- a/tests/ui/target-feature/similar-feature-suggestion.rs +++ b/tests/ui/target-feature/similar-feature-suggestion.rs @@ -1,6 +1,6 @@ -// compile-flags: -Ctarget-feature=+rdrnd --crate-type=rlib --target=x86_64-unknown-linux-gnu -// build-pass -// needs-llvm-components: x86 +//@ compile-flags: -Ctarget-feature=+rdrnd --crate-type=rlib --target=x86_64-unknown-linux-gnu +//@ build-pass +//@ needs-llvm-components: x86 #![feature(no_core)] #![no_core] diff --git a/tests/ui/target-feature/tied-features-cli.rs b/tests/ui/target-feature/tied-features-cli.rs index 72b7e3da530..1168245461f 100644 --- a/tests/ui/target-feature/tied-features-cli.rs +++ b/tests/ui/target-feature/tied-features-cli.rs @@ -1,16 +1,16 @@ -// revisions: one two three -// compile-flags: --crate-type=rlib --target=aarch64-unknown-linux-gnu -// needs-llvm-components: aarch64 +//@ revisions: one two three +//@ compile-flags: --crate-type=rlib --target=aarch64-unknown-linux-gnu +//@ needs-llvm-components: aarch64 // // -// [one] check-fail -// [one] compile-flags: -C target-feature=+paca -// [two] check-fail -// [two] compile-flags: -C target-feature=-pacg,+pacg -// [three] check-fail -// [three] compile-flags: -C target-feature=+paca,+pacg,-paca -// [four] build-pass -// [four] compile-flags: -C target-feature=-paca,+pacg -C target-feature=+paca +//@ [one] check-fail +//@ [one] compile-flags: -C target-feature=+paca +//@ [two] check-fail +//@ [two] compile-flags: -C target-feature=-pacg,+pacg +//@ [three] check-fail +//@ [three] compile-flags: -C target-feature=+paca,+pacg,-paca +//@ [four] build-pass +//@ [four] compile-flags: -C target-feature=-paca,+pacg -C target-feature=+paca #![feature(no_core, lang_items)] #![no_core] diff --git a/tests/ui/target-feature/tied-features.rs b/tests/ui/target-feature/tied-features.rs index 15f01505eba..e36649d8eb1 100644 --- a/tests/ui/target-feature/tied-features.rs +++ b/tests/ui/target-feature/tied-features.rs @@ -1,6 +1,6 @@ -// build-fail -// compile-flags: --crate-type=rlib --target=aarch64-unknown-linux-gnu -// needs-llvm-components: aarch64 +//@ build-fail +//@ compile-flags: --crate-type=rlib --target=aarch64-unknown-linux-gnu +//@ needs-llvm-components: aarch64 #![feature(no_core, lang_items)] #![no_core] diff --git a/tests/ui/target-feature/unstable-feature.rs b/tests/ui/target-feature/unstable-feature.rs index bd0d72938f4..c74c5ad5d77 100644 --- a/tests/ui/target-feature/unstable-feature.rs +++ b/tests/ui/target-feature/unstable-feature.rs @@ -1,6 +1,6 @@ -// compile-flags: -Ctarget-feature=+vaes --crate-type=rlib --target=x86_64-unknown-linux-gnu -// build-pass -// needs-llvm-components: x86 +//@ compile-flags: -Ctarget-feature=+vaes --crate-type=rlib --target=x86_64-unknown-linux-gnu +//@ build-pass +//@ needs-llvm-components: x86 #![feature(no_core)] #![no_core] diff --git a/tests/ui/target-feature/wasm-safe.rs b/tests/ui/target-feature/wasm-safe.rs index 4b868684a52..32838477608 100644 --- a/tests/ui/target-feature/wasm-safe.rs +++ b/tests/ui/target-feature/wasm-safe.rs @@ -1,5 +1,5 @@ -// only-wasm32 -// check-pass +//@ only-wasm32 +//@ check-pass #![feature(wasm_target_feature)] #![allow(dead_code)] diff --git a/tests/ui/test-attrs/custom-test-frameworks/issue-107454.rs b/tests/ui/test-attrs/custom-test-frameworks/issue-107454.rs index 2bb133e8bfd..8c20d464139 100644 --- a/tests/ui/test-attrs/custom-test-frameworks/issue-107454.rs +++ b/tests/ui/test-attrs/custom-test-frameworks/issue-107454.rs @@ -1,4 +1,4 @@ -// compile-flags: --test +//@ compile-flags: --test #![feature(custom_test_frameworks)] #![deny(unnameable_test_items)] diff --git a/tests/ui/test-attrs/decl-macro-test.rs b/tests/ui/test-attrs/decl-macro-test.rs index fcbe9f49e55..8418b010c5b 100644 --- a/tests/ui/test-attrs/decl-macro-test.rs +++ b/tests/ui/test-attrs/decl-macro-test.rs @@ -1,7 +1,7 @@ // Check that declarative macros can declare tests -// check-pass -// compile-flags: --test +//@ check-pass +//@ compile-flags: --test #![feature(decl_macro)] diff --git a/tests/ui/test-attrs/inaccessible-test-modules.rs b/tests/ui/test-attrs/inaccessible-test-modules.rs index f5b34793794..c9237bf2d4d 100644 --- a/tests/ui/test-attrs/inaccessible-test-modules.rs +++ b/tests/ui/test-attrs/inaccessible-test-modules.rs @@ -1,4 +1,4 @@ -// compile-flags:--test +//@ compile-flags:--test // the `--test` harness creates modules with these textual names, but // they should be inaccessible from normal code. diff --git a/tests/ui/test-attrs/issue-109816.rs b/tests/ui/test-attrs/issue-109816.rs index 21fe5bc53b7..3cabf451c66 100644 --- a/tests/ui/test-attrs/issue-109816.rs +++ b/tests/ui/test-attrs/issue-109816.rs @@ -1,4 +1,4 @@ -// compile-flags: --test +//@ compile-flags: --test fn align_offset_weird_strides() { #[test] diff --git a/tests/ui/test-attrs/issue-12997-1.rs b/tests/ui/test-attrs/issue-12997-1.rs index 9f808dac362..a26a65d8d44 100644 --- a/tests/ui/test-attrs/issue-12997-1.rs +++ b/tests/ui/test-attrs/issue-12997-1.rs @@ -1,4 +1,4 @@ -// compile-flags: --test +//@ compile-flags: --test //! Test that makes sure wrongly-typed bench functions aren't ignored diff --git a/tests/ui/test-attrs/issue-12997-2.rs b/tests/ui/test-attrs/issue-12997-2.rs index 9df965315ab..d2a4202d7bd 100644 --- a/tests/ui/test-attrs/issue-12997-2.rs +++ b/tests/ui/test-attrs/issue-12997-2.rs @@ -1,4 +1,4 @@ -// compile-flags: --test +//@ compile-flags: --test //! Test that makes sure wrongly-typed bench functions are rejected diff --git a/tests/ui/test-attrs/issue-16597-empty.rs b/tests/ui/test-attrs/issue-16597-empty.rs index 2bdd08575c4..64b44f60e80 100644 --- a/tests/ui/test-attrs/issue-16597-empty.rs +++ b/tests/ui/test-attrs/issue-16597-empty.rs @@ -1,5 +1,5 @@ -// run-pass -// compile-flags:--test +//@ run-pass +//@ compile-flags:--test // This verifies that the test generation doesn't crash when we have // no tests - for more information, see PR #16892. diff --git a/tests/ui/test-attrs/issue-16597.rs b/tests/ui/test-attrs/issue-16597.rs index 35769bfc117..28cea142882 100644 --- a/tests/ui/test-attrs/issue-16597.rs +++ b/tests/ui/test-attrs/issue-16597.rs @@ -1,6 +1,6 @@ -// run-pass +//@ run-pass #![allow(unused_imports)] -// compile-flags:--test +//@ compile-flags:--test mod tests { use super::*; diff --git a/tests/ui/test-attrs/issue-20823.rs b/tests/ui/test-attrs/issue-20823.rs index 9e209d5d33a..a5a92478607 100644 --- a/tests/ui/test-attrs/issue-20823.rs +++ b/tests/ui/test-attrs/issue-20823.rs @@ -1,5 +1,5 @@ -// run-pass -// compile-flags: --test +//@ run-pass +//@ compile-flags: --test #[test] pub fn foo() {} diff --git a/tests/ui/test-attrs/issue-34932.rs b/tests/ui/test-attrs/issue-34932.rs index ab568fd01ef..feb6556b60a 100644 --- a/tests/ui/test-attrs/issue-34932.rs +++ b/tests/ui/test-attrs/issue-34932.rs @@ -1,5 +1,5 @@ -// run-pass -// compile-flags:--test +//@ run-pass +//@ compile-flags:--test #![cfg(any())] // This test should be configured away #![feature(rustc_attrs)] // Test that this is allowed on stable/beta #![feature(iter_arith_traits)] // Test that this is not unused diff --git a/tests/ui/test-attrs/issue-36768.rs b/tests/ui/test-attrs/issue-36768.rs index 7531f3621f5..aca012f4af0 100644 --- a/tests/ui/test-attrs/issue-36768.rs +++ b/tests/ui/test-attrs/issue-36768.rs @@ -1,5 +1,5 @@ -// run-pass -// compile-flags:--test +//@ run-pass +//@ compile-flags:--test #![deny(private_interfaces)] #[test] fn foo() {} diff --git a/tests/ui/test-attrs/issue-52557.rs b/tests/ui/test-attrs/issue-52557.rs index 09f7a8c5131..02e95669d32 100644 --- a/tests/ui/test-attrs/issue-52557.rs +++ b/tests/ui/test-attrs/issue-52557.rs @@ -1,10 +1,10 @@ -// run-pass +//@ run-pass #![allow(unused_imports)] // This test checks for namespace pollution by private tests. // Tests used to marked as public causing name conflicts with normal // functions only in test builds. -// compile-flags: --test +//@ compile-flags: --test mod a { pub fn foo() -> bool { diff --git a/tests/ui/test-attrs/issue-53675-a-test-called-panic.rs b/tests/ui/test-attrs/issue-53675-a-test-called-panic.rs index e573038980d..06b9270cc33 100644 --- a/tests/ui/test-attrs/issue-53675-a-test-called-panic.rs +++ b/tests/ui/test-attrs/issue-53675-a-test-called-panic.rs @@ -1,8 +1,8 @@ // rust-lang/rust#53675: At one point the compiler errored when a test // named `panic` used the `assert!` macro in expression position. -// check-pass -// compile-flags: --test +//@ check-pass +//@ compile-flags: --test mod in_expression_position { #[test] diff --git a/tests/ui/test-attrs/run-unexported-tests.rs b/tests/ui/test-attrs/run-unexported-tests.rs index f533a3ef885..fc73eb519d2 100644 --- a/tests/ui/test-attrs/run-unexported-tests.rs +++ b/tests/ui/test-attrs/run-unexported-tests.rs @@ -1,6 +1,6 @@ -// run-fail -// compile-flags:--test -// check-stdout +//@ run-fail +//@ compile-flags:--test +//@ check-stdout mod m { pub fn exported() {} diff --git a/tests/ui/test-attrs/test-attr-non-associated-functions.rs b/tests/ui/test-attrs/test-attr-non-associated-functions.rs index 2481919b616..1a4dfda0909 100644 --- a/tests/ui/test-attrs/test-attr-non-associated-functions.rs +++ b/tests/ui/test-attrs/test-attr-non-associated-functions.rs @@ -1,4 +1,4 @@ -// compile-flags:--test +//@ compile-flags:--test struct A {} diff --git a/tests/ui/test-attrs/test-cant-be-shadowed.rs b/tests/ui/test-attrs/test-cant-be-shadowed.rs index 831372d4506..ff47b1de177 100644 --- a/tests/ui/test-attrs/test-cant-be-shadowed.rs +++ b/tests/ui/test-attrs/test-cant-be-shadowed.rs @@ -1,6 +1,6 @@ -// build-pass (FIXME(62277): could be check-pass?) -// aux-build:test_macro.rs -// compile-flags:--test +//@ build-pass (FIXME(62277): could be check-pass?) +//@ aux-build:test_macro.rs +//@ compile-flags:--test #[macro_use] extern crate test_macro; diff --git a/tests/ui/test-attrs/test-filter-multiple.rs b/tests/ui/test-attrs/test-filter-multiple.rs index 04dd83b7fd0..0347ce457ae 100644 --- a/tests/ui/test-attrs/test-filter-multiple.rs +++ b/tests/ui/test-attrs/test-filter-multiple.rs @@ -1,9 +1,9 @@ -// run-pass -// compile-flags: --test -// run-flags: --test-threads=1 test1 test2 -// check-run-results -// normalize-stdout-test "finished in \d+\.\d+s" -> "finished in $$TIME" -// ignore-emscripten no threads support +//@ run-pass +//@ compile-flags: --test +//@ run-flags: --test-threads=1 test1 test2 +//@ check-run-results +//@ normalize-stdout-test "finished in \d+\.\d+s" -> "finished in $$TIME" +//@ ignore-emscripten no threads support #[test] fn test1() {} diff --git a/tests/ui/test-attrs/test-fn-signature-verification-for-explicit-return-type.rs b/tests/ui/test-attrs/test-fn-signature-verification-for-explicit-return-type.rs index 02fee1a00da..423b5c03b46 100644 --- a/tests/ui/test-attrs/test-fn-signature-verification-for-explicit-return-type.rs +++ b/tests/ui/test-attrs/test-fn-signature-verification-for-explicit-return-type.rs @@ -1,9 +1,9 @@ -// run-pass -// ignore-fuchsia Test must be run out-of-process +//@ run-pass +//@ ignore-fuchsia Test must be run out-of-process #![feature(test)] -// compile-flags: --test +//@ compile-flags: --test extern crate test; #[bench] diff --git a/tests/ui/test-attrs/test-function-signature.rs b/tests/ui/test-attrs/test-function-signature.rs index 9e86e9209e3..0f43245be6f 100644 --- a/tests/ui/test-attrs/test-function-signature.rs +++ b/tests/ui/test-attrs/test-function-signature.rs @@ -1,4 +1,4 @@ -// compile-flags: --test +//@ compile-flags: --test #[test] fn foo() -> Result<(), ()> { diff --git a/tests/ui/test-attrs/test-main-not-dead-attr.rs b/tests/ui/test-attrs/test-main-not-dead-attr.rs index 0b2a9a3541b..1bed915a1b6 100644 --- a/tests/ui/test-attrs/test-main-not-dead-attr.rs +++ b/tests/ui/test-attrs/test-main-not-dead-attr.rs @@ -1,5 +1,5 @@ -// run-pass -// compile-flags: --test +//@ run-pass +//@ compile-flags: --test #![feature(rustc_attrs)] diff --git a/tests/ui/test-attrs/test-main-not-dead.rs b/tests/ui/test-attrs/test-main-not-dead.rs index 30a9c85e3d2..c90dbddb83b 100644 --- a/tests/ui/test-attrs/test-main-not-dead.rs +++ b/tests/ui/test-attrs/test-main-not-dead.rs @@ -1,5 +1,5 @@ -// run-pass -// compile-flags: --test +//@ run-pass +//@ compile-flags: --test #![deny(dead_code)] diff --git a/tests/ui/test-attrs/test-on-not-fn.rs b/tests/ui/test-attrs/test-on-not-fn.rs index a460480afb1..deba26f24ca 100644 --- a/tests/ui/test-attrs/test-on-not-fn.rs +++ b/tests/ui/test-attrs/test-on-not-fn.rs @@ -1,4 +1,4 @@ -// compile-flags: --test +//@ compile-flags: --test #[test] //~ ERROR: the `#[test]` attribute may only be used on a non-associated function mod test {} diff --git a/tests/ui/test-attrs/test-panic-abort-disabled.rs b/tests/ui/test-attrs/test-panic-abort-disabled.rs index fa67a784de4..fbe3d7d5d18 100644 --- a/tests/ui/test-attrs/test-panic-abort-disabled.rs +++ b/tests/ui/test-attrs/test-panic-abort-disabled.rs @@ -1,11 +1,11 @@ -// error-pattern:building tests with panic=abort is not supported -// no-prefer-dynamic -// compile-flags: --test -Cpanic=abort -Zpanic-abort-tests=no -// run-flags: --test-threads=1 +//@ error-pattern:building tests with panic=abort is not supported +//@ no-prefer-dynamic +//@ compile-flags: --test -Cpanic=abort -Zpanic-abort-tests=no +//@ run-flags: --test-threads=1 -// needs-unwind -// ignore-wasm no panic or subprocess support -// ignore-emscripten no panic or subprocess support +//@ needs-unwind +//@ ignore-wasm no panic or subprocess support +//@ ignore-emscripten no panic or subprocess support #![cfg(test)] diff --git a/tests/ui/test-attrs/test-panic-abort-nocapture.rs b/tests/ui/test-attrs/test-panic-abort-nocapture.rs index c7415818e10..03c175a2a49 100644 --- a/tests/ui/test-attrs/test-panic-abort-nocapture.rs +++ b/tests/ui/test-attrs/test-panic-abort-nocapture.rs @@ -1,15 +1,15 @@ -// no-prefer-dynamic -// compile-flags: --test -Cpanic=abort -Zpanic_abort_tests -// run-flags: --test-threads=1 --nocapture -// run-fail -// check-run-results -// exec-env:RUST_BACKTRACE=0 -// normalize-stdout-test "finished in \d+\.\d+s" -> "finished in $$TIME" +//@ no-prefer-dynamic +//@ compile-flags: --test -Cpanic=abort -Zpanic_abort_tests +//@ run-flags: --test-threads=1 --nocapture +//@ run-fail +//@ check-run-results +//@ exec-env:RUST_BACKTRACE=0 +//@ normalize-stdout-test "finished in \d+\.\d+s" -> "finished in $$TIME" -// ignore-android #120567 -// ignore-wasm no panic or subprocess support -// ignore-emscripten no panic or subprocess support -// ignore-sgx no subprocess support +//@ ignore-android #120567 +//@ ignore-wasm no panic or subprocess support +//@ ignore-emscripten no panic or subprocess support +//@ ignore-sgx no subprocess support #![cfg(test)] diff --git a/tests/ui/test-attrs/test-panic-abort.rs b/tests/ui/test-attrs/test-panic-abort.rs index d80e2435614..77efaf05bbc 100644 --- a/tests/ui/test-attrs/test-panic-abort.rs +++ b/tests/ui/test-attrs/test-panic-abort.rs @@ -1,15 +1,15 @@ -// no-prefer-dynamic -// compile-flags: --test -Cpanic=abort -Zpanic_abort_tests -// run-flags: --test-threads=1 -// run-fail -// check-run-results -// exec-env:RUST_BACKTRACE=0 -// normalize-stdout-test "finished in \d+\.\d+s" -> "finished in $$TIME" - -// ignore-android #120567 -// ignore-wasm no panic or subprocess support -// ignore-emscripten no panic or subprocess support -// ignore-sgx no subprocess support +//@ no-prefer-dynamic +//@ compile-flags: --test -Cpanic=abort -Zpanic_abort_tests +//@ run-flags: --test-threads=1 +//@ run-fail +//@ check-run-results +//@ exec-env:RUST_BACKTRACE=0 +//@ normalize-stdout-test "finished in \d+\.\d+s" -> "finished in $$TIME" + +//@ ignore-android #120567 +//@ ignore-wasm no panic or subprocess support +//@ ignore-emscripten no panic or subprocess support +//@ ignore-sgx no subprocess support #![cfg(test)] #![feature(test)] diff --git a/tests/ui/test-attrs/test-panic-while-printing.rs b/tests/ui/test-attrs/test-panic-while-printing.rs index 033c8beb475..a50a15fbe5a 100644 --- a/tests/ui/test-attrs/test-panic-while-printing.rs +++ b/tests/ui/test-attrs/test-panic-while-printing.rs @@ -1,6 +1,6 @@ -// compile-flags:--test -// run-pass -// needs-unwind +//@ compile-flags:--test +//@ run-pass +//@ needs-unwind use std::fmt; use std::fmt::{Display, Formatter}; diff --git a/tests/ui/test-attrs/test-passed-wasm.rs b/tests/ui/test-attrs/test-passed-wasm.rs index 578aa4b1760..614678e2353 100644 --- a/tests/ui/test-attrs/test-passed-wasm.rs +++ b/tests/ui/test-attrs/test-passed-wasm.rs @@ -1,9 +1,9 @@ -// no-prefer-dynamic -// compile-flags: --test -// run-flags: --test-threads=1 -// run-pass -// check-run-results -// only-wasm32 +//@ no-prefer-dynamic +//@ compile-flags: --test +//@ run-flags: --test-threads=1 +//@ run-pass +//@ check-run-results +//@ only-wasm32 // Tests the output of the test harness with only passed tests. diff --git a/tests/ui/test-attrs/test-passed.rs b/tests/ui/test-attrs/test-passed.rs index f65f0003022..afd715322ac 100644 --- a/tests/ui/test-attrs/test-passed.rs +++ b/tests/ui/test-attrs/test-passed.rs @@ -1,10 +1,10 @@ -// no-prefer-dynamic -// compile-flags: --test -// run-flags: --test-threads=1 -// run-pass -// check-run-results -// normalize-stdout-test "finished in \d+\.\d+s" -> "finished in $$TIME" -// ignore-wasm32 no support for `Instant` +//@ no-prefer-dynamic +//@ compile-flags: --test +//@ run-flags: --test-threads=1 +//@ run-pass +//@ check-run-results +//@ normalize-stdout-test "finished in \d+\.\d+s" -> "finished in $$TIME" +//@ ignore-wasm32 no support for `Instant` // Tests the output of the test harness with only passed tests. diff --git a/tests/ui/test-attrs/test-runner-hides-buried-main.rs b/tests/ui/test-attrs/test-runner-hides-buried-main.rs index 346aa868eb4..ef4ef69c661 100644 --- a/tests/ui/test-attrs/test-runner-hides-buried-main.rs +++ b/tests/ui/test-attrs/test-runner-hides-buried-main.rs @@ -1,5 +1,5 @@ -// run-pass -// compile-flags: --test +//@ run-pass +//@ compile-flags: --test #![feature(rustc_attrs)] diff --git a/tests/ui/test-attrs/test-runner-hides-main.rs b/tests/ui/test-attrs/test-runner-hides-main.rs index 0de1d64f0fc..811f16940e7 100644 --- a/tests/ui/test-attrs/test-runner-hides-main.rs +++ b/tests/ui/test-attrs/test-runner-hides-main.rs @@ -1,5 +1,5 @@ -// run-pass -// compile-flags:--test +//@ run-pass +//@ compile-flags:--test // Building as a test runner means that a synthetic main will be run, // not ours pub fn main() { panic!(); } diff --git a/tests/ui/test-attrs/test-runner-hides-start.rs b/tests/ui/test-attrs/test-runner-hides-start.rs index 56212bb6f4b..444ac237cfa 100644 --- a/tests/ui/test-attrs/test-runner-hides-start.rs +++ b/tests/ui/test-attrs/test-runner-hides-start.rs @@ -1,5 +1,5 @@ -// run-pass -// compile-flags: --test +//@ run-pass +//@ compile-flags: --test #![feature(start)] diff --git a/tests/ui/test-attrs/test-should-fail-good-message.rs b/tests/ui/test-attrs/test-should-fail-good-message.rs index 83519c4524a..bf277a343de 100644 --- a/tests/ui/test-attrs/test-should-fail-good-message.rs +++ b/tests/ui/test-attrs/test-should-fail-good-message.rs @@ -1,6 +1,6 @@ -// run-pass -// needs-unwind -// compile-flags: --test +//@ run-pass +//@ needs-unwind +//@ compile-flags: --test #[test] #[should_panic(expected = "foo")] pub fn test_foo() { diff --git a/tests/ui/test-attrs/test-should-panic-attr.rs b/tests/ui/test-attrs/test-should-panic-attr.rs index b71878406d7..df2893b63ed 100644 --- a/tests/ui/test-attrs/test-should-panic-attr.rs +++ b/tests/ui/test-attrs/test-should-panic-attr.rs @@ -1,5 +1,5 @@ -// check-pass -// compile-flags: --test +//@ check-pass +//@ compile-flags: --test #[test] #[should_panic = "foo"] diff --git a/tests/ui/test-attrs/test-thread-capture.rs b/tests/ui/test-attrs/test-thread-capture.rs index 53acca34133..d770964125f 100644 --- a/tests/ui/test-attrs/test-thread-capture.rs +++ b/tests/ui/test-attrs/test-thread-capture.rs @@ -1,11 +1,11 @@ -// compile-flags: --test -// run-fail -// run-flags: --test-threads=1 -// check-run-results -// exec-env:RUST_BACKTRACE=0 -// normalize-stdout-test "finished in \d+\.\d+s" -> "finished in $$TIME" -// ignore-emscripten no threads support -// needs-unwind +//@ compile-flags: --test +//@ run-fail +//@ run-flags: --test-threads=1 +//@ check-run-results +//@ exec-env:RUST_BACKTRACE=0 +//@ normalize-stdout-test "finished in \d+\.\d+s" -> "finished in $$TIME" +//@ ignore-emscripten no threads support +//@ needs-unwind #[test] fn thready_pass() { diff --git a/tests/ui/test-attrs/test-thread-nocapture.rs b/tests/ui/test-attrs/test-thread-nocapture.rs index 2b57eb8aae1..58e5f7e33cb 100644 --- a/tests/ui/test-attrs/test-thread-nocapture.rs +++ b/tests/ui/test-attrs/test-thread-nocapture.rs @@ -1,11 +1,11 @@ -// compile-flags: --test -// run-fail -// run-flags: --test-threads=1 --nocapture -// check-run-results -// exec-env:RUST_BACKTRACE=0 -// normalize-stdout-test "finished in \d+\.\d+s" -> "finished in $$TIME" -// ignore-emscripten no threads support -// needs-unwind +//@ compile-flags: --test +//@ run-fail +//@ run-flags: --test-threads=1 --nocapture +//@ check-run-results +//@ exec-env:RUST_BACKTRACE=0 +//@ normalize-stdout-test "finished in \d+\.\d+s" -> "finished in $$TIME" +//@ ignore-emscripten no threads support +//@ needs-unwind #[test] fn thready_pass() { diff --git a/tests/ui/test-attrs/test-type.rs b/tests/ui/test-attrs/test-type.rs index d6d44a6b446..8f75ff309e0 100644 --- a/tests/ui/test-attrs/test-type.rs +++ b/tests/ui/test-attrs/test-type.rs @@ -1,9 +1,9 @@ -// compile-flags: --test -Zpanic-abort-tests -// run-flags: --test-threads=1 -// check-run-results -// normalize-stdout-test "finished in \d+\.\d+s" -> "finished in $$TIME" -// ignore-emscripten no threads support -// run-pass +//@ compile-flags: --test -Zpanic-abort-tests +//@ run-flags: --test-threads=1 +//@ check-run-results +//@ normalize-stdout-test "finished in \d+\.\d+s" -> "finished in $$TIME" +//@ ignore-emscripten no threads support +//@ run-pass #[test] fn test_ok() { diff --git a/tests/ui/test-attrs/test-vs-cfg-test.rs b/tests/ui/test-attrs/test-vs-cfg-test.rs index cd1cd33c284..d7d9e61103c 100644 --- a/tests/ui/test-attrs/test-vs-cfg-test.rs +++ b/tests/ui/test-attrs/test-vs-cfg-test.rs @@ -1,5 +1,5 @@ -// run-pass -// compile-flags: --cfg test +//@ run-pass +//@ compile-flags: --cfg test // Make sure `--cfg test` does not inject test harness diff --git a/tests/ui/test-attrs/test-warns-dead-code.rs b/tests/ui/test-attrs/test-warns-dead-code.rs index 4190885b6b2..faa7306eee5 100644 --- a/tests/ui/test-attrs/test-warns-dead-code.rs +++ b/tests/ui/test-attrs/test-warns-dead-code.rs @@ -1,4 +1,4 @@ -// compile-flags: --test +//@ compile-flags: --test #![deny(dead_code)] diff --git a/tests/ui/test-attrs/tests-listing-format-default.rs b/tests/ui/test-attrs/tests-listing-format-default.rs index d5df4b57b05..86e871448b9 100644 --- a/tests/ui/test-attrs/tests-listing-format-default.rs +++ b/tests/ui/test-attrs/tests-listing-format-default.rs @@ -1,8 +1,8 @@ -// no-prefer-dynamic -// compile-flags: --test -// run-flags: --list -// run-pass -// check-run-results +//@ no-prefer-dynamic +//@ compile-flags: --test +//@ run-flags: --list +//@ run-pass +//@ check-run-results // Checks the listing of tests with no --format arguments. diff --git a/tests/ui/test-attrs/tests-listing-format-json-without-unstableopts.rs b/tests/ui/test-attrs/tests-listing-format-json-without-unstableopts.rs index 5247f1f8f17..7512e546504 100644 --- a/tests/ui/test-attrs/tests-listing-format-json-without-unstableopts.rs +++ b/tests/ui/test-attrs/tests-listing-format-json-without-unstableopts.rs @@ -1,8 +1,8 @@ -// no-prefer-dynamic -// compile-flags: --test -// run-flags: --list --format json -// run-fail -// check-run-results +//@ no-prefer-dynamic +//@ compile-flags: --test +//@ run-flags: --list --format json +//@ run-fail +//@ check-run-results // Checks that --format json does not work without -Zunstable-options. diff --git a/tests/ui/test-attrs/tests-listing-format-json.rs b/tests/ui/test-attrs/tests-listing-format-json.rs index 5afc2746fe4..b735a82c166 100644 --- a/tests/ui/test-attrs/tests-listing-format-json.rs +++ b/tests/ui/test-attrs/tests-listing-format-json.rs @@ -1,11 +1,11 @@ -// no-prefer-dynamic -// compile-flags: --test -// run-flags: --list --format json -Zunstable-options -// run-pass -// check-run-results -// only-nightly -// normalize-stdout-test: "fake-test-src-base/test-attrs/" -> "$$DIR/" -// normalize-stdout-test: "fake-test-src-base\\test-attrs\\" -> "$$DIR/" +//@ no-prefer-dynamic +//@ compile-flags: --test +//@ run-flags: --list --format json -Zunstable-options +//@ run-pass +//@ check-run-results +//@ only-nightly +//@ normalize-stdout-test: "fake-test-src-base/test-attrs/" -> "$$DIR/" +//@ normalize-stdout-test: "fake-test-src-base\\test-attrs\\" -> "$$DIR/" // Checks the listing of tests with --format json. diff --git a/tests/ui/test-attrs/tests-listing-format-terse.rs b/tests/ui/test-attrs/tests-listing-format-terse.rs index 7835f71759c..b8e7b12b284 100644 --- a/tests/ui/test-attrs/tests-listing-format-terse.rs +++ b/tests/ui/test-attrs/tests-listing-format-terse.rs @@ -1,8 +1,8 @@ -// no-prefer-dynamic -// compile-flags: --test -// run-flags: --list --format terse -// run-pass -// check-run-results +//@ no-prefer-dynamic +//@ compile-flags: --test +//@ run-flags: --list --format terse +//@ run-pass +//@ check-run-results // Checks the listing of tests with --format terse. diff --git a/tests/ui/thir-print/thir-flat-const-variant.rs b/tests/ui/thir-print/thir-flat-const-variant.rs index 2cd87a5cbb2..02a353c4435 100644 --- a/tests/ui/thir-print/thir-flat-const-variant.rs +++ b/tests/ui/thir-print/thir-flat-const-variant.rs @@ -1,5 +1,5 @@ -// compile-flags: -Z unpretty=thir-flat -// check-pass +//@ compile-flags: -Z unpretty=thir-flat +//@ check-pass // Previously, the constants with `Self::Bar(())` would be `Call`s instead of // `Adt`s in THIR. diff --git a/tests/ui/thir-print/thir-flat.rs b/tests/ui/thir-print/thir-flat.rs index 8fa95ce62b5..dc0e45e5a1c 100644 --- a/tests/ui/thir-print/thir-flat.rs +++ b/tests/ui/thir-print/thir-flat.rs @@ -1,4 +1,4 @@ -// compile-flags: -Z unpretty=thir-flat -// check-pass +//@ compile-flags: -Z unpretty=thir-flat +//@ check-pass pub fn main() {} diff --git a/tests/ui/thir-print/thir-tree-match.rs b/tests/ui/thir-print/thir-tree-match.rs index a5511ec9543..c62463b45f4 100644 --- a/tests/ui/thir-print/thir-tree-match.rs +++ b/tests/ui/thir-print/thir-tree-match.rs @@ -1,5 +1,5 @@ -// check-pass -// compile-flags: -Zunpretty=thir-tree +//@ check-pass +//@ compile-flags: -Zunpretty=thir-tree enum Bar { First, diff --git a/tests/ui/thir-print/thir-tree.rs b/tests/ui/thir-print/thir-tree.rs index 32df7905adb..7f9880cc4e9 100644 --- a/tests/ui/thir-print/thir-tree.rs +++ b/tests/ui/thir-print/thir-tree.rs @@ -1,4 +1,4 @@ -// compile-flags: -Z unpretty=thir-tree -// check-pass +//@ compile-flags: -Z unpretty=thir-tree +//@ check-pass pub fn main() {} diff --git a/tests/ui/thread-local/auxiliary/tls-rlib.rs b/tests/ui/thread-local/auxiliary/tls-rlib.rs index 20bc998ec11..42bbfc46154 100644 --- a/tests/ui/thread-local/auxiliary/tls-rlib.rs +++ b/tests/ui/thread-local/auxiliary/tls-rlib.rs @@ -1,4 +1,4 @@ -// no-prefer-dynamic +//@ no-prefer-dynamic #![crate_type = "rlib"] #![feature(thread_local)] diff --git a/tests/ui/thread-local/name-collision.rs b/tests/ui/thread-local/name-collision.rs index dcff9183ad9..fba7b680679 100644 --- a/tests/ui/thread-local/name-collision.rs +++ b/tests/ui/thread-local/name-collision.rs @@ -1,4 +1,4 @@ -// check-pass +//@ check-pass #[allow(non_camel_case_types)] struct u8; diff --git a/tests/ui/thread-local/thread-local-issue-37508.rs b/tests/ui/thread-local/thread-local-issue-37508.rs index 219108c77f7..db430a3229c 100644 --- a/tests/ui/thread-local/thread-local-issue-37508.rs +++ b/tests/ui/thread-local/thread-local-issue-37508.rs @@ -1,6 +1,6 @@ -// only-x86_64 -// compile-flags: -Ccode-model=large --crate-type lib -// build-pass +//@ only-x86_64 +//@ compile-flags: -Ccode-model=large --crate-type lib +//@ build-pass // // Regression test for issue #37508 diff --git a/tests/ui/thread-local/thread-local-static-ref-use-after-free.rs b/tests/ui/thread-local/thread-local-static-ref-use-after-free.rs index c282e2185bc..094ce2994b8 100644 --- a/tests/ui/thread-local/thread-local-static-ref-use-after-free.rs +++ b/tests/ui/thread-local/thread-local-static-ref-use-after-free.rs @@ -1,6 +1,6 @@ -// check-pass -// known-bug: #49682 -// edition:2021 +//@ check-pass +//@ known-bug: #49682 +//@ edition:2021 // Should fail. Keeping references to thread local statics can result in a // use-after-free. diff --git a/tests/ui/thread-local/thread-local-static.rs b/tests/ui/thread-local/thread-local-static.rs index a2c1954881f..a1b72323f71 100644 --- a/tests/ui/thread-local/thread-local-static.rs +++ b/tests/ui/thread-local/thread-local-static.rs @@ -1,4 +1,4 @@ -// edition:2018 +//@ edition:2018 #![feature(thread_local)] #![feature(const_swap)] diff --git a/tests/ui/thread-local/tls-dylib-access.rs b/tests/ui/thread-local/tls-dylib-access.rs index 12c46113cea..53b01674d77 100644 --- a/tests/ui/thread-local/tls-dylib-access.rs +++ b/tests/ui/thread-local/tls-dylib-access.rs @@ -1,6 +1,6 @@ -// aux-build: tls-rlib.rs -// aux-build: tls-export.rs -// run-pass +//@ aux-build: tls-rlib.rs +//@ aux-build: tls-export.rs +//@ run-pass #![feature(cfg_target_thread_local)] diff --git a/tests/ui/thread-local/tls.rs b/tests/ui/thread-local/tls.rs index f03bd3f991b..17096319d23 100644 --- a/tests/ui/thread-local/tls.rs +++ b/tests/ui/thread-local/tls.rs @@ -1,7 +1,7 @@ -// run-pass -// ignore-emscripten no threads support -// compile-flags: -O -// ignore-nto Doesn't work without emulated TLS enabled (in LLVM) +//@ run-pass +//@ ignore-emscripten no threads support +//@ compile-flags: -O +//@ ignore-nto Doesn't work without emulated TLS enabled (in LLVM) #![feature(thread_local)] diff --git a/tests/ui/threads-sendsync/child-outlives-parent.rs b/tests/ui/threads-sendsync/child-outlives-parent.rs index e3a39a44bb8..2fb4a6f637a 100644 --- a/tests/ui/threads-sendsync/child-outlives-parent.rs +++ b/tests/ui/threads-sendsync/child-outlives-parent.rs @@ -1,8 +1,8 @@ -// run-pass +//@ run-pass // Reported as issue #126, child leaks the string. -// pretty-expanded FIXME #23616 -// ignore-emscripten no threads support +//@ pretty-expanded FIXME #23616 +//@ ignore-emscripten no threads support use std::thread; diff --git a/tests/ui/threads-sendsync/clone-with-exterior.rs b/tests/ui/threads-sendsync/clone-with-exterior.rs index 9fc661b1477..58529e4a788 100644 --- a/tests/ui/threads-sendsync/clone-with-exterior.rs +++ b/tests/ui/threads-sendsync/clone-with-exterior.rs @@ -1,7 +1,7 @@ -// run-pass +//@ run-pass #![allow(unused_must_use)] -// ignore-emscripten no threads support +//@ ignore-emscripten no threads support use std::thread; diff --git a/tests/ui/threads-sendsync/comm.rs b/tests/ui/threads-sendsync/comm.rs index aa86e174d44..589859e60a6 100644 --- a/tests/ui/threads-sendsync/comm.rs +++ b/tests/ui/threads-sendsync/comm.rs @@ -1,6 +1,6 @@ -// run-pass +//@ run-pass #![allow(unused_must_use)] -// ignore-emscripten no threads support +//@ ignore-emscripten no threads support use std::thread; use std::sync::mpsc::{channel, Sender}; diff --git a/tests/ui/threads-sendsync/eprint-on-tls-drop.rs b/tests/ui/threads-sendsync/eprint-on-tls-drop.rs index f5243077384..3ff9fb10f24 100644 --- a/tests/ui/threads-sendsync/eprint-on-tls-drop.rs +++ b/tests/ui/threads-sendsync/eprint-on-tls-drop.rs @@ -1,6 +1,6 @@ -// run-pass -// ignore-emscripten no processes -// ignore-sgx no processes +//@ run-pass +//@ ignore-emscripten no processes +//@ ignore-sgx no processes use std::cell::RefCell; use std::env; diff --git a/tests/ui/threads-sendsync/issue-24313.rs b/tests/ui/threads-sendsync/issue-24313.rs index 6694bac0dc7..17e027520c1 100644 --- a/tests/ui/threads-sendsync/issue-24313.rs +++ b/tests/ui/threads-sendsync/issue-24313.rs @@ -1,6 +1,6 @@ -// run-pass -// ignore-emscripten no threads -// ignore-sgx no processes +//@ run-pass +//@ ignore-emscripten no threads +//@ ignore-sgx no processes use std::thread; use std::env; diff --git a/tests/ui/threads-sendsync/issue-29488.rs b/tests/ui/threads-sendsync/issue-29488.rs index 3c9a6a80dbf..c848e7b50bb 100644 --- a/tests/ui/threads-sendsync/issue-29488.rs +++ b/tests/ui/threads-sendsync/issue-29488.rs @@ -1,5 +1,5 @@ -// run-pass -// ignore-emscripten no threads support +//@ run-pass +//@ ignore-emscripten no threads support use std::thread; diff --git a/tests/ui/threads-sendsync/issue-43733-2.rs b/tests/ui/threads-sendsync/issue-43733-2.rs index e9653dbe5c2..5a9ee015cb9 100644 --- a/tests/ui/threads-sendsync/issue-43733-2.rs +++ b/tests/ui/threads-sendsync/issue-43733-2.rs @@ -1,5 +1,5 @@ -// ignore-wasm32 -// dont-check-compiler-stderr +//@ ignore-wasm32 +//@ dont-check-compiler-stderr #![feature(cfg_target_thread_local, thread_local_internals)] // On platforms *without* `#[thread_local]`, use diff --git a/tests/ui/threads-sendsync/issue-43733.rs b/tests/ui/threads-sendsync/issue-43733.rs index 671b45e777f..12207f4e6aa 100644 --- a/tests/ui/threads-sendsync/issue-43733.rs +++ b/tests/ui/threads-sendsync/issue-43733.rs @@ -1,4 +1,4 @@ -// ignore-wasm32 +//@ ignore-wasm32 #![feature(thread_local)] #![feature(cfg_target_thread_local, thread_local_internals)] diff --git a/tests/ui/threads-sendsync/issue-4446.rs b/tests/ui/threads-sendsync/issue-4446.rs index 948f2a7bdf3..b5e3a20ccde 100644 --- a/tests/ui/threads-sendsync/issue-4446.rs +++ b/tests/ui/threads-sendsync/issue-4446.rs @@ -1,5 +1,5 @@ -// run-pass -// ignore-emscripten no threads support +//@ run-pass +//@ ignore-emscripten no threads support use std::sync::mpsc::channel; use std::thread; diff --git a/tests/ui/threads-sendsync/issue-4448.rs b/tests/ui/threads-sendsync/issue-4448.rs index 27d0326891b..0f3bf65c441 100644 --- a/tests/ui/threads-sendsync/issue-4448.rs +++ b/tests/ui/threads-sendsync/issue-4448.rs @@ -1,5 +1,5 @@ -// run-pass -// ignore-emscripten no threads support +//@ run-pass +//@ ignore-emscripten no threads support use std::sync::mpsc::channel; use std::thread; diff --git a/tests/ui/threads-sendsync/issue-8827.rs b/tests/ui/threads-sendsync/issue-8827.rs index 95be7616a4f..b7deef0f34d 100644 --- a/tests/ui/threads-sendsync/issue-8827.rs +++ b/tests/ui/threads-sendsync/issue-8827.rs @@ -1,5 +1,5 @@ -// run-pass -// ignore-emscripten no threads support +//@ run-pass +//@ ignore-emscripten no threads support use std::thread; use std::sync::mpsc::{channel, Receiver}; diff --git a/tests/ui/threads-sendsync/issue-9396.rs b/tests/ui/threads-sendsync/issue-9396.rs index 3e7e9a51cdd..6228f4ba706 100644 --- a/tests/ui/threads-sendsync/issue-9396.rs +++ b/tests/ui/threads-sendsync/issue-9396.rs @@ -1,7 +1,7 @@ -// run-pass +//@ run-pass #![allow(unused_must_use)] #![allow(deprecated)] -// ignore-emscripten no threads support +//@ ignore-emscripten no threads support use std::sync::mpsc::{TryRecvError, channel}; use std::thread; diff --git a/tests/ui/threads-sendsync/mpsc_stress.rs b/tests/ui/threads-sendsync/mpsc_stress.rs index c2e1912deb7..68c40151281 100644 --- a/tests/ui/threads-sendsync/mpsc_stress.rs +++ b/tests/ui/threads-sendsync/mpsc_stress.rs @@ -1,6 +1,6 @@ -// run-pass -// compile-flags:--test -// ignore-emscripten +//@ run-pass +//@ compile-flags:--test +//@ ignore-emscripten use std::sync::mpsc::channel; use std::sync::mpsc::TryRecvError; diff --git a/tests/ui/threads-sendsync/send-is-not-static-par-for.rs b/tests/ui/threads-sendsync/send-is-not-static-par-for.rs index dbe46555101..b943b0c433d 100644 --- a/tests/ui/threads-sendsync/send-is-not-static-par-for.rs +++ b/tests/ui/threads-sendsync/send-is-not-static-par-for.rs @@ -1,4 +1,4 @@ -// run-pass +//@ run-pass #![allow(unused_imports)] use std::thread; use std::sync::Mutex; diff --git a/tests/ui/threads-sendsync/send-resource.rs b/tests/ui/threads-sendsync/send-resource.rs index 023a84d6b6e..32910c5f7d1 100644 --- a/tests/ui/threads-sendsync/send-resource.rs +++ b/tests/ui/threads-sendsync/send-resource.rs @@ -1,10 +1,10 @@ -// run-pass +//@ run-pass #![allow(unused_must_use)] #![allow(dead_code)] #![allow(non_camel_case_types)] -// pretty-expanded FIXME #23616 -// ignore-emscripten no threads support +//@ pretty-expanded FIXME #23616 +//@ ignore-emscripten no threads support use std::thread; use std::sync::mpsc::channel; diff --git a/tests/ui/threads-sendsync/send-type-inference.rs b/tests/ui/threads-sendsync/send-type-inference.rs index 0d9af7512b4..287b3d567ae 100644 --- a/tests/ui/threads-sendsync/send-type-inference.rs +++ b/tests/ui/threads-sendsync/send-type-inference.rs @@ -1,8 +1,8 @@ -// run-pass +//@ run-pass #![allow(unused_must_use)] #![allow(dead_code)] #![allow(unused_mut)] -// pretty-expanded FIXME #23616 +//@ pretty-expanded FIXME #23616 use std::sync::mpsc::{channel, Sender}; diff --git a/tests/ui/threads-sendsync/send_str_hashmap.rs b/tests/ui/threads-sendsync/send_str_hashmap.rs index 7d4cca8ad74..9cbb0bed447 100644 --- a/tests/ui/threads-sendsync/send_str_hashmap.rs +++ b/tests/ui/threads-sendsync/send_str_hashmap.rs @@ -1,4 +1,4 @@ -// run-pass +//@ run-pass use std::collections::HashMap; use std::borrow::Cow; diff --git a/tests/ui/threads-sendsync/send_str_treemap.rs b/tests/ui/threads-sendsync/send_str_treemap.rs index 4d463174590..cc1f560f69b 100644 --- a/tests/ui/threads-sendsync/send_str_treemap.rs +++ b/tests/ui/threads-sendsync/send_str_treemap.rs @@ -1,4 +1,4 @@ -// run-pass +//@ run-pass use std::collections::BTreeMap; use std::borrow::Cow; diff --git a/tests/ui/threads-sendsync/sendable-class.rs b/tests/ui/threads-sendsync/sendable-class.rs index 7facf245bde..3ee1b60a04a 100644 --- a/tests/ui/threads-sendsync/sendable-class.rs +++ b/tests/ui/threads-sendsync/sendable-class.rs @@ -1,4 +1,4 @@ -// run-pass +//@ run-pass #![allow(unused_must_use)] #![allow(dead_code)] #![allow(unused_variables)] @@ -6,7 +6,7 @@ // Test that a class with only sendable fields can be sent -// pretty-expanded FIXME #23616 +//@ pretty-expanded FIXME #23616 use std::sync::mpsc::channel; diff --git a/tests/ui/threads-sendsync/sendfn-is-a-block.rs b/tests/ui/threads-sendsync/sendfn-is-a-block.rs index 62807d8941a..f01b440424a 100644 --- a/tests/ui/threads-sendsync/sendfn-is-a-block.rs +++ b/tests/ui/threads-sendsync/sendfn-is-a-block.rs @@ -1,4 +1,4 @@ -// run-pass +//@ run-pass fn test(f: F) -> usize where F: FnOnce(usize) -> usize { diff --git a/tests/ui/threads-sendsync/sendfn-spawn-with-fn-arg.rs b/tests/ui/threads-sendsync/sendfn-spawn-with-fn-arg.rs index 1e598b9e709..5306d69a7d2 100644 --- a/tests/ui/threads-sendsync/sendfn-spawn-with-fn-arg.rs +++ b/tests/ui/threads-sendsync/sendfn-spawn-with-fn-arg.rs @@ -1,5 +1,5 @@ -// run-pass -// ignore-emscripten no threads support +//@ run-pass +//@ ignore-emscripten no threads support use std::thread; diff --git a/tests/ui/threads-sendsync/spawn-fn.rs b/tests/ui/threads-sendsync/spawn-fn.rs index 1243bb2579f..863c22f70d6 100644 --- a/tests/ui/threads-sendsync/spawn-fn.rs +++ b/tests/ui/threads-sendsync/spawn-fn.rs @@ -1,6 +1,6 @@ -// run-pass +//@ run-pass #![allow(unused_must_use)] -// ignore-emscripten no threads support +//@ ignore-emscripten no threads support use std::thread; diff --git a/tests/ui/threads-sendsync/spawn-types.rs b/tests/ui/threads-sendsync/spawn-types.rs index 1bead6e1bb1..9c1b6550d9b 100644 --- a/tests/ui/threads-sendsync/spawn-types.rs +++ b/tests/ui/threads-sendsync/spawn-types.rs @@ -1,7 +1,7 @@ -// run-pass +//@ run-pass #![allow(non_camel_case_types)] -// ignore-emscripten no threads support +//@ ignore-emscripten no threads support /* Make sure we can spawn tasks that take different types of diff --git a/tests/ui/threads-sendsync/spawn.rs b/tests/ui/threads-sendsync/spawn.rs index b1dcc9417fb..2c06fc2837f 100644 --- a/tests/ui/threads-sendsync/spawn.rs +++ b/tests/ui/threads-sendsync/spawn.rs @@ -1,5 +1,5 @@ -// run-pass -// ignore-emscripten no threads support +//@ run-pass +//@ ignore-emscripten no threads support use std::thread; diff --git a/tests/ui/threads-sendsync/spawn2.rs b/tests/ui/threads-sendsync/spawn2.rs index 83e066aef96..cfe907ea6d9 100644 --- a/tests/ui/threads-sendsync/spawn2.rs +++ b/tests/ui/threads-sendsync/spawn2.rs @@ -1,5 +1,5 @@ -// run-pass -// ignore-emscripten no threads support +//@ run-pass +//@ ignore-emscripten no threads support use std::thread; diff --git a/tests/ui/threads-sendsync/spawning-with-debug.rs b/tests/ui/threads-sendsync/spawning-with-debug.rs index 9d3487ffb29..58f1743527c 100644 --- a/tests/ui/threads-sendsync/spawning-with-debug.rs +++ b/tests/ui/threads-sendsync/spawning-with-debug.rs @@ -1,9 +1,9 @@ -// run-pass +//@ run-pass #![allow(unused_must_use)] #![allow(unused_mut)] -// ignore-windows -// exec-env:RUST_LOG=debug -// ignore-emscripten no threads support +//@ ignore-windows +//@ exec-env:RUST_LOG=debug +//@ ignore-emscripten no threads support // regression test for issue #10405, make sure we don't call println! too soon. diff --git a/tests/ui/threads-sendsync/std-sync-right-kind-impls.rs b/tests/ui/threads-sendsync/std-sync-right-kind-impls.rs index bc64c816243..a443785a678 100644 --- a/tests/ui/threads-sendsync/std-sync-right-kind-impls.rs +++ b/tests/ui/threads-sendsync/std-sync-right-kind-impls.rs @@ -1,5 +1,5 @@ -// run-pass -// pretty-expanded FIXME #23616 +//@ run-pass +//@ pretty-expanded FIXME #23616 use std::sync; diff --git a/tests/ui/threads-sendsync/sync-send-atomics.rs b/tests/ui/threads-sendsync/sync-send-atomics.rs index 6b260311a50..f64506af0a3 100644 --- a/tests/ui/threads-sendsync/sync-send-atomics.rs +++ b/tests/ui/threads-sendsync/sync-send-atomics.rs @@ -1,6 +1,6 @@ -// check-pass +//@ check-pass -// pretty-expanded FIXME #23616 +//@ pretty-expanded FIXME #23616 use std::sync::atomic::*; diff --git a/tests/ui/threads-sendsync/sync-send-in-std.rs b/tests/ui/threads-sendsync/sync-send-in-std.rs index 6d1fba64e42..375e884877a 100644 --- a/tests/ui/threads-sendsync/sync-send-in-std.rs +++ b/tests/ui/threads-sendsync/sync-send-in-std.rs @@ -1,8 +1,8 @@ -// run-pass +//@ run-pass -// ignore-wasm32-bare networking not available -// ignore-sgx ToSocketAddrs cannot be used for DNS Resolution -// ignore-fuchsia Req. test-harness networking privileges +//@ ignore-wasm32-bare networking not available +//@ ignore-sgx ToSocketAddrs cannot be used for DNS Resolution +//@ ignore-fuchsia Req. test-harness networking privileges use std::net::ToSocketAddrs; diff --git a/tests/ui/threads-sendsync/sync-send-iterators-in-libcollections.rs b/tests/ui/threads-sendsync/sync-send-iterators-in-libcollections.rs index 61f54ac4e0b..3b8fdb60acf 100644 --- a/tests/ui/threads-sendsync/sync-send-iterators-in-libcollections.rs +++ b/tests/ui/threads-sendsync/sync-send-iterators-in-libcollections.rs @@ -1,4 +1,4 @@ -// run-pass +//@ run-pass #![allow(warnings)] #![feature(drain, collections_bound, btree_range)] diff --git a/tests/ui/threads-sendsync/sync-send-iterators-in-libcore.rs b/tests/ui/threads-sendsync/sync-send-iterators-in-libcore.rs index 2f6d35f01be..4c77b5d2ad8 100644 --- a/tests/ui/threads-sendsync/sync-send-iterators-in-libcore.rs +++ b/tests/ui/threads-sendsync/sync-send-iterators-in-libcore.rs @@ -1,5 +1,5 @@ -// run-pass -// pretty-expanded FIXME #23616 +//@ run-pass +//@ pretty-expanded FIXME #23616 #![allow(warnings)] diff --git a/tests/ui/threads-sendsync/task-comm-0.rs b/tests/ui/threads-sendsync/task-comm-0.rs index 2b9a50e4d41..06ce739b8e5 100644 --- a/tests/ui/threads-sendsync/task-comm-0.rs +++ b/tests/ui/threads-sendsync/task-comm-0.rs @@ -1,6 +1,6 @@ -// run-pass +//@ run-pass #![allow(unused_must_use)] -// ignore-emscripten no threads support +//@ ignore-emscripten no threads support use std::thread; use std::sync::mpsc::{channel, Sender}; diff --git a/tests/ui/threads-sendsync/task-comm-1.rs b/tests/ui/threads-sendsync/task-comm-1.rs index 68ca62909bf..77ca940e947 100644 --- a/tests/ui/threads-sendsync/task-comm-1.rs +++ b/tests/ui/threads-sendsync/task-comm-1.rs @@ -1,6 +1,6 @@ -// run-pass +//@ run-pass #![allow(unused_must_use)] -// ignore-emscripten no threads support +//@ ignore-emscripten no threads support use std::thread; diff --git a/tests/ui/threads-sendsync/task-comm-10.rs b/tests/ui/threads-sendsync/task-comm-10.rs index 4cac0dc90cf..6f043b64a09 100644 --- a/tests/ui/threads-sendsync/task-comm-10.rs +++ b/tests/ui/threads-sendsync/task-comm-10.rs @@ -1,7 +1,7 @@ -// run-pass +//@ run-pass #![allow(unused_must_use)] #![allow(unused_mut)] -// ignore-emscripten no threads support +//@ ignore-emscripten no threads support use std::thread; use std::sync::mpsc::{channel, Sender}; diff --git a/tests/ui/threads-sendsync/task-comm-11.rs b/tests/ui/threads-sendsync/task-comm-11.rs index 8541e143fb9..51f13434435 100644 --- a/tests/ui/threads-sendsync/task-comm-11.rs +++ b/tests/ui/threads-sendsync/task-comm-11.rs @@ -1,7 +1,7 @@ -// run-pass +//@ run-pass #![allow(unused_must_use)] -// pretty-expanded FIXME #23616 -// ignore-emscripten no threads support +//@ pretty-expanded FIXME #23616 +//@ ignore-emscripten no threads support use std::sync::mpsc::{channel, Sender}; use std::thread; diff --git a/tests/ui/threads-sendsync/task-comm-12.rs b/tests/ui/threads-sendsync/task-comm-12.rs index 613a5cee58b..cb1fb774f10 100644 --- a/tests/ui/threads-sendsync/task-comm-12.rs +++ b/tests/ui/threads-sendsync/task-comm-12.rs @@ -1,7 +1,7 @@ -// run-pass +//@ run-pass #![allow(unused_must_use)] #![allow(unused_mut)] -// ignore-emscripten no threads support +//@ ignore-emscripten no threads support use std::thread; diff --git a/tests/ui/threads-sendsync/task-comm-13.rs b/tests/ui/threads-sendsync/task-comm-13.rs index 327eaaf8fa1..6b5384e3f08 100644 --- a/tests/ui/threads-sendsync/task-comm-13.rs +++ b/tests/ui/threads-sendsync/task-comm-13.rs @@ -1,6 +1,6 @@ -// run-pass +//@ run-pass #![allow(unused_variables)] -// ignore-emscripten no threads support +//@ ignore-emscripten no threads support use std::sync::mpsc::{channel, Sender}; use std::thread; diff --git a/tests/ui/threads-sendsync/task-comm-14.rs b/tests/ui/threads-sendsync/task-comm-14.rs index 88d6b090268..65cc750a7c3 100644 --- a/tests/ui/threads-sendsync/task-comm-14.rs +++ b/tests/ui/threads-sendsync/task-comm-14.rs @@ -1,6 +1,6 @@ -// run-pass +//@ run-pass #![allow(unused_parens)] -// ignore-emscripten no threads support +//@ ignore-emscripten no threads support use std::sync::mpsc::{channel, Sender}; use std::thread; diff --git a/tests/ui/threads-sendsync/task-comm-15.rs b/tests/ui/threads-sendsync/task-comm-15.rs index adb14abdce9..844a18b6158 100644 --- a/tests/ui/threads-sendsync/task-comm-15.rs +++ b/tests/ui/threads-sendsync/task-comm-15.rs @@ -1,7 +1,7 @@ -// run-pass +//@ run-pass #![allow(unused_must_use)] -// ignore-emscripten no threads support -// pretty-expanded FIXME #23616 +//@ ignore-emscripten no threads support +//@ pretty-expanded FIXME #23616 use std::sync::mpsc::{channel, Sender}; use std::thread; diff --git a/tests/ui/threads-sendsync/task-comm-16.rs b/tests/ui/threads-sendsync/task-comm-16.rs index d808fd9aceb..3b0fec11acd 100644 --- a/tests/ui/threads-sendsync/task-comm-16.rs +++ b/tests/ui/threads-sendsync/task-comm-16.rs @@ -1,4 +1,4 @@ -// run-pass +//@ run-pass #![allow(unused_mut)] #![allow(unused_parens)] #![allow(non_camel_case_types)] diff --git a/tests/ui/threads-sendsync/task-comm-17.rs b/tests/ui/threads-sendsync/task-comm-17.rs index 72249787093..14ef4dd3ede 100644 --- a/tests/ui/threads-sendsync/task-comm-17.rs +++ b/tests/ui/threads-sendsync/task-comm-17.rs @@ -1,7 +1,7 @@ -// run-pass +//@ run-pass #![allow(unused_must_use)] -// ignore-emscripten no threads support -// pretty-expanded FIXME #23616 +//@ ignore-emscripten no threads support +//@ pretty-expanded FIXME #23616 // Issue #922 diff --git a/tests/ui/threads-sendsync/task-comm-3.rs b/tests/ui/threads-sendsync/task-comm-3.rs index 570ae0a82ff..1f2a6406d79 100644 --- a/tests/ui/threads-sendsync/task-comm-3.rs +++ b/tests/ui/threads-sendsync/task-comm-3.rs @@ -1,6 +1,6 @@ -// run-pass +//@ run-pass #![allow(unused_must_use)] -// ignore-emscripten no threads support +//@ ignore-emscripten no threads support use std::thread; use std::sync::mpsc::{channel, Sender}; diff --git a/tests/ui/threads-sendsync/task-comm-4.rs b/tests/ui/threads-sendsync/task-comm-4.rs index b259d69d15d..1210cee5582 100644 --- a/tests/ui/threads-sendsync/task-comm-4.rs +++ b/tests/ui/threads-sendsync/task-comm-4.rs @@ -1,4 +1,4 @@ -// run-pass +//@ run-pass #![allow(unused_assignments)] use std::sync::mpsc::channel; diff --git a/tests/ui/threads-sendsync/task-comm-5.rs b/tests/ui/threads-sendsync/task-comm-5.rs index cdedf034ac3..e07aa18c24d 100644 --- a/tests/ui/threads-sendsync/task-comm-5.rs +++ b/tests/ui/threads-sendsync/task-comm-5.rs @@ -1,4 +1,4 @@ -// run-pass +//@ run-pass use std::sync::mpsc::channel; diff --git a/tests/ui/threads-sendsync/task-comm-6.rs b/tests/ui/threads-sendsync/task-comm-6.rs index 990205ad334..6a7dea63993 100644 --- a/tests/ui/threads-sendsync/task-comm-6.rs +++ b/tests/ui/threads-sendsync/task-comm-6.rs @@ -1,4 +1,4 @@ -// run-pass +//@ run-pass #![allow(unused_mut)] #![allow(unused_assignments)] diff --git a/tests/ui/threads-sendsync/task-comm-7.rs b/tests/ui/threads-sendsync/task-comm-7.rs index 0b9673e0033..f6e77986e16 100644 --- a/tests/ui/threads-sendsync/task-comm-7.rs +++ b/tests/ui/threads-sendsync/task-comm-7.rs @@ -1,7 +1,7 @@ -// run-pass +//@ run-pass #![allow(unused_must_use)] #![allow(unused_assignments)] -// ignore-emscripten no threads support +//@ ignore-emscripten no threads support use std::sync::mpsc::{channel, Sender}; use std::thread; diff --git a/tests/ui/threads-sendsync/task-comm-9.rs b/tests/ui/threads-sendsync/task-comm-9.rs index 5ed33012100..f8fe680e5e0 100644 --- a/tests/ui/threads-sendsync/task-comm-9.rs +++ b/tests/ui/threads-sendsync/task-comm-9.rs @@ -1,6 +1,6 @@ -// run-pass +//@ run-pass #![allow(unused_must_use)] -// ignore-emscripten no threads support +//@ ignore-emscripten no threads support use std::thread; use std::sync::mpsc::{channel, Sender}; diff --git a/tests/ui/threads-sendsync/task-comm-chan-nil.rs b/tests/ui/threads-sendsync/task-comm-chan-nil.rs index a93ddff43dc..cfbe05327a8 100644 --- a/tests/ui/threads-sendsync/task-comm-chan-nil.rs +++ b/tests/ui/threads-sendsync/task-comm-chan-nil.rs @@ -1,4 +1,4 @@ -// run-pass +//@ run-pass use std::sync::mpsc::channel; diff --git a/tests/ui/threads-sendsync/task-life-0.rs b/tests/ui/threads-sendsync/task-life-0.rs index 785cff9a0f3..a4652197afc 100644 --- a/tests/ui/threads-sendsync/task-life-0.rs +++ b/tests/ui/threads-sendsync/task-life-0.rs @@ -1,7 +1,7 @@ -// run-pass +//@ run-pass #![allow(unused_must_use)] -// ignore-emscripten no threads support -// pretty-expanded FIXME #23616 +//@ ignore-emscripten no threads support +//@ pretty-expanded FIXME #23616 use std::thread; diff --git a/tests/ui/threads-sendsync/task-spawn-barefn.rs b/tests/ui/threads-sendsync/task-spawn-barefn.rs index e5b899e0af9..2c957878c95 100644 --- a/tests/ui/threads-sendsync/task-spawn-barefn.rs +++ b/tests/ui/threads-sendsync/task-spawn-barefn.rs @@ -1,6 +1,6 @@ -// run-fail -// error-pattern:Ensure that the child thread runs by panicking -// ignore-emscripten Needs threads. +//@ run-fail +//@ error-pattern:Ensure that the child thread runs by panicking +//@ ignore-emscripten Needs threads. use std::thread; diff --git a/tests/ui/threads-sendsync/task-spawn-move-and-copy.rs b/tests/ui/threads-sendsync/task-spawn-move-and-copy.rs index a6390377802..442955421d8 100644 --- a/tests/ui/threads-sendsync/task-spawn-move-and-copy.rs +++ b/tests/ui/threads-sendsync/task-spawn-move-and-copy.rs @@ -1,6 +1,6 @@ -// run-pass +//@ run-pass #![allow(unused_must_use)] -// ignore-emscripten no threads support +//@ ignore-emscripten no threads support use std::thread; use std::sync::mpsc::channel; diff --git a/tests/ui/threads-sendsync/task-stderr.rs b/tests/ui/threads-sendsync/task-stderr.rs index 68d226ffbae..0f215a2b763 100644 --- a/tests/ui/threads-sendsync/task-stderr.rs +++ b/tests/ui/threads-sendsync/task-stderr.rs @@ -1,6 +1,6 @@ -// run-pass -// ignore-emscripten no threads support -// needs-unwind +//@ run-pass +//@ ignore-emscripten no threads support +//@ needs-unwind #![feature(internal_output_capture)] diff --git a/tests/ui/threads-sendsync/tcp-stress.rs b/tests/ui/threads-sendsync/tcp-stress.rs index 17566364340..488cab40140 100644 --- a/tests/ui/threads-sendsync/tcp-stress.rs +++ b/tests/ui/threads-sendsync/tcp-stress.rs @@ -1,8 +1,8 @@ -// run-pass -// ignore-android needs extra network permissions -// ignore-emscripten no threads or sockets support -// ignore-netbsd system ulimit (Too many open files) -// ignore-openbsd system ulimit (Too many open files) +//@ run-pass +//@ ignore-android needs extra network permissions +//@ ignore-emscripten no threads or sockets support +//@ ignore-netbsd system ulimit (Too many open files) +//@ ignore-openbsd system ulimit (Too many open files) use std::io::prelude::*; use std::net::{TcpListener, TcpStream}; diff --git a/tests/ui/threads-sendsync/test-tasks-invalid-value.rs b/tests/ui/threads-sendsync/test-tasks-invalid-value.rs index 6411421429c..4b38b9ce2c9 100644 --- a/tests/ui/threads-sendsync/test-tasks-invalid-value.rs +++ b/tests/ui/threads-sendsync/test-tasks-invalid-value.rs @@ -1,11 +1,11 @@ // This checks that RUST_TEST_THREADS not being 1, 2, ... is detected // properly. -// run-fail -// error-pattern:should be a positive integer -// compile-flags: --test -// exec-env:RUST_TEST_THREADS=foo -// ignore-emscripten +//@ run-fail +//@ error-pattern:should be a positive integer +//@ compile-flags: --test +//@ exec-env:RUST_TEST_THREADS=foo +//@ ignore-emscripten #[test] fn do_nothing() {} diff --git a/tests/ui/threads-sendsync/thread-local-extern-static.rs b/tests/ui/threads-sendsync/thread-local-extern-static.rs index a2dda31aa55..ca66f8ad1d3 100644 --- a/tests/ui/threads-sendsync/thread-local-extern-static.rs +++ b/tests/ui/threads-sendsync/thread-local-extern-static.rs @@ -1,6 +1,6 @@ -// run-pass -// ignore-windows -// aux-build:thread-local-extern-static.rs +//@ run-pass +//@ ignore-windows +//@ aux-build:thread-local-extern-static.rs #![feature(cfg_target_thread_local, thread_local)] diff --git a/tests/ui/threads-sendsync/thread-local-syntax.rs b/tests/ui/threads-sendsync/thread-local-syntax.rs index 2f4805e4731..2cf91f0c1f7 100644 --- a/tests/ui/threads-sendsync/thread-local-syntax.rs +++ b/tests/ui/threads-sendsync/thread-local-syntax.rs @@ -1,4 +1,4 @@ -// run-pass +//@ run-pass #![deny(missing_docs)] //! this tests the syntax of `thread_local!` diff --git a/tests/ui/threads-sendsync/threads.rs b/tests/ui/threads-sendsync/threads.rs index e3da83aa12b..7b7e52abab4 100644 --- a/tests/ui/threads-sendsync/threads.rs +++ b/tests/ui/threads-sendsync/threads.rs @@ -1,6 +1,6 @@ -// run-pass +//@ run-pass #![allow(unused_must_use)] -// ignore-emscripten no threads support +//@ ignore-emscripten no threads support use std::thread; diff --git a/tests/ui/threads-sendsync/tls-dtors-are-run-in-a-static-binary.rs b/tests/ui/threads-sendsync/tls-dtors-are-run-in-a-static-binary.rs index 8baef433410..66fd6169db0 100644 --- a/tests/ui/threads-sendsync/tls-dtors-are-run-in-a-static-binary.rs +++ b/tests/ui/threads-sendsync/tls-dtors-are-run-in-a-static-binary.rs @@ -1,6 +1,6 @@ -// run-pass -// no-prefer-dynamic -// ignore-emscripten no threads support +//@ run-pass +//@ no-prefer-dynamic +//@ ignore-emscripten no threads support static mut HIT: bool = false; diff --git a/tests/ui/threads-sendsync/tls-init-on-init.rs b/tests/ui/threads-sendsync/tls-init-on-init.rs index 193c1815105..ba5e4698e63 100644 --- a/tests/ui/threads-sendsync/tls-init-on-init.rs +++ b/tests/ui/threads-sendsync/tls-init-on-init.rs @@ -1,7 +1,7 @@ -// run-pass +//@ run-pass #![allow(stable_features)] -// ignore-emscripten no threads support +//@ ignore-emscripten no threads support #![feature(thread_local_try_with)] diff --git a/tests/ui/threads-sendsync/tls-try-with.rs b/tests/ui/threads-sendsync/tls-try-with.rs index f36ab4e4f9c..d9af1caf741 100644 --- a/tests/ui/threads-sendsync/tls-try-with.rs +++ b/tests/ui/threads-sendsync/tls-try-with.rs @@ -1,7 +1,7 @@ -// run-pass +//@ run-pass #![allow(stable_features)] -// ignore-emscripten no threads support +//@ ignore-emscripten no threads support #![feature(thread_local_try_with)] diff --git a/tests/ui/threads-sendsync/trivial-message.rs b/tests/ui/threads-sendsync/trivial-message.rs index 5831e867be5..81657373643 100644 --- a/tests/ui/threads-sendsync/trivial-message.rs +++ b/tests/ui/threads-sendsync/trivial-message.rs @@ -1,4 +1,4 @@ -// run-pass +//@ run-pass #![allow(unused_must_use)] /* diff --git a/tests/ui/threads-sendsync/unwind-resource.rs b/tests/ui/threads-sendsync/unwind-resource.rs index 6950a9c40d2..ea9e0c7514c 100644 --- a/tests/ui/threads-sendsync/unwind-resource.rs +++ b/tests/ui/threads-sendsync/unwind-resource.rs @@ -1,8 +1,8 @@ -// run-pass -// needs-unwind +//@ run-pass +//@ needs-unwind #![allow(non_camel_case_types)] -// ignore-emscripten no threads support +//@ ignore-emscripten no threads support use std::sync::mpsc::{channel, Sender}; use std::thread; diff --git a/tests/ui/threads-sendsync/yield.rs b/tests/ui/threads-sendsync/yield.rs index e83ba556078..4d89b10af95 100644 --- a/tests/ui/threads-sendsync/yield.rs +++ b/tests/ui/threads-sendsync/yield.rs @@ -1,8 +1,8 @@ -// run-pass +//@ run-pass #![allow(unused_must_use)] #![allow(unused_mut)] -// ignore-emscripten no threads support +//@ ignore-emscripten no threads support use std::thread; diff --git a/tests/ui/threads-sendsync/yield1.rs b/tests/ui/threads-sendsync/yield1.rs index 002e590550c..b003a70f47e 100644 --- a/tests/ui/threads-sendsync/yield1.rs +++ b/tests/ui/threads-sendsync/yield1.rs @@ -1,8 +1,8 @@ -// run-pass +//@ run-pass #![allow(unused_must_use)] #![allow(unused_mut)] -// ignore-emscripten no threads support +//@ ignore-emscripten no threads support use std::thread; diff --git a/tests/ui/threads-sendsync/yield2.rs b/tests/ui/threads-sendsync/yield2.rs index 376faab0c48..9502f0d33da 100644 --- a/tests/ui/threads-sendsync/yield2.rs +++ b/tests/ui/threads-sendsync/yield2.rs @@ -1,4 +1,4 @@ -// run-pass +//@ run-pass use std::thread; diff --git a/tests/ui/tool-attributes/diagnostic_item2.rs b/tests/ui/tool-attributes/diagnostic_item2.rs index b32a66b16be..241b69adb8c 100644 --- a/tests/ui/tool-attributes/diagnostic_item2.rs +++ b/tests/ui/tool-attributes/diagnostic_item2.rs @@ -1,4 +1,4 @@ -// check-pass +//@ check-pass #[clippy::diagnostic_item = "mep"] struct Mep; diff --git a/tests/ui/tool-attributes/diagnostic_item3.rs b/tests/ui/tool-attributes/diagnostic_item3.rs index c1a236ed1cc..f210c89c299 100644 --- a/tests/ui/tool-attributes/diagnostic_item3.rs +++ b/tests/ui/tool-attributes/diagnostic_item3.rs @@ -1,4 +1,4 @@ -// check-pass +//@ check-pass #![feature(rustc_attrs)] #[rustc_diagnostic_item = "foomp"] diff --git a/tests/ui/tool-attributes/duplicate-diagnostic.rs b/tests/ui/tool-attributes/duplicate-diagnostic.rs index e2cf9508757..5061bcb9e44 100644 --- a/tests/ui/tool-attributes/duplicate-diagnostic.rs +++ b/tests/ui/tool-attributes/duplicate-diagnostic.rs @@ -1,8 +1,8 @@ -// aux-build: p1.rs -// aux-build: p2.rs +//@ aux-build: p1.rs +//@ aux-build: p2.rs -// error-pattern: duplicate diagnostic item in crate `p2` -// error-pattern: note: the diagnostic item is first defined in crate `p1` +//@ error-pattern: duplicate diagnostic item in crate `p2` +//@ error-pattern: note: the diagnostic item is first defined in crate `p1` #![feature(rustc_attrs)] extern crate p1; diff --git a/tests/ui/tool_lints-rpass.rs b/tests/ui/tool_lints-rpass.rs index e467d34376f..458eca19ed6 100644 --- a/tests/ui/tool_lints-rpass.rs +++ b/tests/ui/tool_lints-rpass.rs @@ -1,4 +1,4 @@ -// run-pass +//@ run-pass #![deny(unknown_lints)] diff --git a/tests/ui/tool_lints_2018_preview.rs b/tests/ui/tool_lints_2018_preview.rs index e467d34376f..458eca19ed6 100644 --- a/tests/ui/tool_lints_2018_preview.rs +++ b/tests/ui/tool_lints_2018_preview.rs @@ -1,4 +1,4 @@ -// run-pass +//@ run-pass #![deny(unknown_lints)] diff --git a/tests/ui/track-diagnostics/track.rs b/tests/ui/track-diagnostics/track.rs index 08f926610d7..4b984171480 100644 --- a/tests/ui/track-diagnostics/track.rs +++ b/tests/ui/track-diagnostics/track.rs @@ -1,17 +1,17 @@ -// compile-flags: -Z track-diagnostics -// error-pattern: created at -// rustc-env:RUST_BACKTRACE=0 -// failure-status: 101 +//@ compile-flags: -Z track-diagnostics +//@ error-pattern: created at +//@ rustc-env:RUST_BACKTRACE=0 +//@ failure-status: 101 // 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 "note: rustc .+ running on .+" -> "note: rustc $$VERSION running on $$TARGET" +//@ normalize-stderr-test ".rs:\d+:\d+" -> ".rs:LL:CC" +//@ normalize-stderr-test "note: rustc .+ running on .+" -> "note: rustc $$VERSION running on $$TARGET" // The test becomes too flaky if we care about exact args. If `-Z ui-testing` // from compiletest and `-Z track-diagnostics` from `// compile-flags` at the // top of this file are present, then assume all args are present. -// normalize-stderr-test "note: compiler flags: .*-Z ui-testing.*-Z track-diagnostics" -> "note: compiler flags: ... -Z ui-testing ... -Z track-diagnostics" +//@ normalize-stderr-test "note: compiler flags: .*-Z ui-testing.*-Z track-diagnostics" -> "note: compiler flags: ... -Z ui-testing ... -Z track-diagnostics" fn main() { break rust diff --git a/tests/ui/track-diagnostics/track2.rs b/tests/ui/track-diagnostics/track2.rs index dc105c61d72..00a17ccb291 100644 --- a/tests/ui/track-diagnostics/track2.rs +++ b/tests/ui/track-diagnostics/track2.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" fn main() { let _moved @ _from = String::from("foo"); diff --git a/tests/ui/track-diagnostics/track3.rs b/tests/ui/track-diagnostics/track3.rs index 0699239503a..2d0efdc839f 100644 --- a/tests/ui/track-diagnostics/track3.rs +++ b/tests/ui/track-diagnostics/track3.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" fn main() { let _unimported = Blah { field: u8 }; diff --git a/tests/ui/track-diagnostics/track4.rs b/tests/ui/track-diagnostics/track4.rs index 35eec799bba..788c999e052 100644 --- a/tests/ui/track-diagnostics/track4.rs +++ b/tests/ui/track-diagnostics/track4.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" pub onion { Owo(u8), diff --git a/tests/ui/track-diagnostics/track5.rs b/tests/ui/track-diagnostics/track5.rs index c41d9424e85..28df72915cf 100644 --- a/tests/ui/track-diagnostics/track5.rs +++ b/tests/ui/track-diagnostics/track5.rs @@ -1,8 +1,8 @@ -// 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" } diff --git a/tests/ui/track-diagnostics/track6.rs b/tests/ui/track-diagnostics/track6.rs index fc6f5f23d92..7b0dd7a37a7 100644 --- a/tests/ui/track-diagnostics/track6.rs +++ b/tests/ui/track-diagnostics/track6.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" pub trait Foo { diff --git a/tests/ui/trailing-comma.rs b/tests/ui/trailing-comma.rs index 31091398508..95a8b366ad9 100644 --- a/tests/ui/trailing-comma.rs +++ b/tests/ui/trailing-comma.rs @@ -1,5 +1,5 @@ -// run-pass -// pretty-expanded FIXME #23616 +//@ run-pass +//@ pretty-expanded FIXME #23616 fn f(_: T,) {} diff --git a/tests/ui/trait-bounds/issue-75961.rs b/tests/ui/trait-bounds/issue-75961.rs index 367eac7182a..8f4bc79f1f3 100644 --- a/tests/ui/trait-bounds/issue-75961.rs +++ b/tests/ui/trait-bounds/issue-75961.rs @@ -1,4 +1,4 @@ -// check-pass +//@ check-pass pub fn foo<'a>(s: &'a mut ()) where &'a mut (): Clone { <&mut () as Clone>::clone(&s); diff --git a/tests/ui/trait-bounds/issue-93008.rs b/tests/ui/trait-bounds/issue-93008.rs index f4d21a160b6..ba2b2f7f7b3 100644 --- a/tests/ui/trait-bounds/issue-93008.rs +++ b/tests/ui/trait-bounds/issue-93008.rs @@ -1,5 +1,5 @@ -// build-pass -// compile-flags: -Zmir-opt-level=3 --crate-type=lib +//@ build-pass +//@ compile-flags: -Zmir-opt-level=3 --crate-type=lib #![feature(trivial_bounds)] #![allow(trivial_bounds)] diff --git a/tests/ui/trait-bounds/issue-94680.rs b/tests/ui/trait-bounds/issue-94680.rs index 58e892079e6..7937ce9eadf 100644 --- a/tests/ui/trait-bounds/issue-94680.rs +++ b/tests/ui/trait-bounds/issue-94680.rs @@ -1,4 +1,4 @@ -// check-pass +//@ check-pass fn main() { println!("{:?}", { diff --git a/tests/ui/trait-bounds/issue-94999.rs b/tests/ui/trait-bounds/issue-94999.rs index e131902346f..b6a180a1579 100644 --- a/tests/ui/trait-bounds/issue-94999.rs +++ b/tests/ui/trait-bounds/issue-94999.rs @@ -1,4 +1,4 @@ -// check-pass +//@ check-pass trait Identity { type T; diff --git a/tests/ui/trait-bounds/issue-95640.rs b/tests/ui/trait-bounds/issue-95640.rs index e4e998b5d0b..e8062faebfa 100644 --- a/tests/ui/trait-bounds/issue-95640.rs +++ b/tests/ui/trait-bounds/issue-95640.rs @@ -1,5 +1,5 @@ -// build-pass -// compile-flags:-Zmir-opt-level=3 +//@ build-pass +//@ compile-flags:-Zmir-opt-level=3 struct D; diff --git a/tests/ui/trait-bounds/restrict-assoc-type-of-generic-bound.fixed b/tests/ui/trait-bounds/restrict-assoc-type-of-generic-bound.fixed index b3f5ad52db5..b8dedd7e11c 100644 --- a/tests/ui/trait-bounds/restrict-assoc-type-of-generic-bound.fixed +++ b/tests/ui/trait-bounds/restrict-assoc-type-of-generic-bound.fixed @@ -1,4 +1,4 @@ -// run-rustfix +//@ run-rustfix pub trait MyTrait { type T; diff --git a/tests/ui/trait-bounds/restrict-assoc-type-of-generic-bound.rs b/tests/ui/trait-bounds/restrict-assoc-type-of-generic-bound.rs index 213abda7782..cb41e9abcd1 100644 --- a/tests/ui/trait-bounds/restrict-assoc-type-of-generic-bound.rs +++ b/tests/ui/trait-bounds/restrict-assoc-type-of-generic-bound.rs @@ -1,4 +1,4 @@ -// run-rustfix +//@ run-rustfix pub trait MyTrait { type T; diff --git a/tests/ui/trait-bounds/shadowed-path-in-trait-bound-suggestion.fixed b/tests/ui/trait-bounds/shadowed-path-in-trait-bound-suggestion.fixed index 39e90d7a3f7..e6aac1708ce 100644 --- a/tests/ui/trait-bounds/shadowed-path-in-trait-bound-suggestion.fixed +++ b/tests/ui/trait-bounds/shadowed-path-in-trait-bound-suggestion.fixed @@ -1,4 +1,4 @@ -// run-rustfix +//@ run-rustfix #![allow(non_snake_case)] mod A { pub trait Trait {} diff --git a/tests/ui/trait-bounds/shadowed-path-in-trait-bound-suggestion.rs b/tests/ui/trait-bounds/shadowed-path-in-trait-bound-suggestion.rs index ee6ed0cae67..d5c557dc9c7 100644 --- a/tests/ui/trait-bounds/shadowed-path-in-trait-bound-suggestion.rs +++ b/tests/ui/trait-bounds/shadowed-path-in-trait-bound-suggestion.rs @@ -1,4 +1,4 @@ -// run-rustfix +//@ run-rustfix #![allow(non_snake_case)] mod A { pub trait Trait {} diff --git a/tests/ui/trait-impl-bound-suggestions.fixed b/tests/ui/trait-impl-bound-suggestions.fixed index 342841b4838..9d3168f5acd 100644 --- a/tests/ui/trait-impl-bound-suggestions.fixed +++ b/tests/ui/trait-impl-bound-suggestions.fixed @@ -1,4 +1,4 @@ -// run-rustfix +//@ run-rustfix #[allow(unused)] use std::fmt::Debug; diff --git a/tests/ui/trait-impl-bound-suggestions.rs b/tests/ui/trait-impl-bound-suggestions.rs index 9a494402260..342fb4416ad 100644 --- a/tests/ui/trait-impl-bound-suggestions.rs +++ b/tests/ui/trait-impl-bound-suggestions.rs @@ -1,4 +1,4 @@ -// run-rustfix +//@ run-rustfix #[allow(unused)] use std::fmt::Debug; diff --git a/tests/ui/traits/alias/basic.rs b/tests/ui/traits/alias/basic.rs index d8168f2990c..b1283d27295 100644 --- a/tests/ui/traits/alias/basic.rs +++ b/tests/ui/traits/alias/basic.rs @@ -1,4 +1,4 @@ -// run-pass +//@ run-pass #![feature(trait_alias)] diff --git a/tests/ui/traits/alias/bounds.rs b/tests/ui/traits/alias/bounds.rs index 7b1920bc8f2..30ee5794bc4 100644 --- a/tests/ui/traits/alias/bounds.rs +++ b/tests/ui/traits/alias/bounds.rs @@ -1,4 +1,4 @@ -// run-pass +//@ run-pass #![feature(trait_alias)] diff --git a/tests/ui/traits/alias/cross-crate.rs b/tests/ui/traits/alias/cross-crate.rs index 8919c643400..207216f73bf 100644 --- a/tests/ui/traits/alias/cross-crate.rs +++ b/tests/ui/traits/alias/cross-crate.rs @@ -1,4 +1,4 @@ -// aux-build:send_sync.rs +//@ aux-build:send_sync.rs #![feature(trait_alias)] diff --git a/tests/ui/traits/alias/import-cross-crate.rs b/tests/ui/traits/alias/import-cross-crate.rs index 868585cd097..65e7c90965b 100644 --- a/tests/ui/traits/alias/import-cross-crate.rs +++ b/tests/ui/traits/alias/import-cross-crate.rs @@ -1,5 +1,5 @@ -// run-pass -// aux-build:greeter.rs +//@ run-pass +//@ aux-build:greeter.rs #![feature(trait_alias)] diff --git a/tests/ui/traits/alias/import.rs b/tests/ui/traits/alias/import.rs index 802a8f15698..9469490ca2b 100644 --- a/tests/ui/traits/alias/import.rs +++ b/tests/ui/traits/alias/import.rs @@ -1,4 +1,4 @@ -// run-pass +//@ run-pass #![feature(trait_alias)] diff --git a/tests/ui/traits/alias/issue-107747-do-not-assemble-supertraits.rs b/tests/ui/traits/alias/issue-107747-do-not-assemble-supertraits.rs index 9b41a8096c4..1f686d0b9e0 100644 --- a/tests/ui/traits/alias/issue-107747-do-not-assemble-supertraits.rs +++ b/tests/ui/traits/alias/issue-107747-do-not-assemble-supertraits.rs @@ -1,6 +1,6 @@ // Regression test for #107747: methods from trait alias supertraits were brought into scope // -// check-pass +//@ check-pass #![feature(trait_alias)] diff --git a/tests/ui/traits/alias/issue-60021-assoc-method-resolve.rs b/tests/ui/traits/alias/issue-60021-assoc-method-resolve.rs index 5e27ed3c646..91c04c28e9c 100644 --- a/tests/ui/traits/alias/issue-60021-assoc-method-resolve.rs +++ b/tests/ui/traits/alias/issue-60021-assoc-method-resolve.rs @@ -1,4 +1,4 @@ -// check-pass +//@ check-pass #![feature(trait_alias)] diff --git a/tests/ui/traits/alias/issue-60755.rs b/tests/ui/traits/alias/issue-60755.rs index 6b955a75247..dcb3c5ff6e9 100644 --- a/tests/ui/traits/alias/issue-60755.rs +++ b/tests/ui/traits/alias/issue-60755.rs @@ -1,4 +1,4 @@ -// check-pass +//@ check-pass #![feature(trait_alias)] diff --git a/tests/ui/traits/alias/issue-72415-assoc-const-resolve.rs b/tests/ui/traits/alias/issue-72415-assoc-const-resolve.rs index e49125d1024..8b3e504ac45 100644 --- a/tests/ui/traits/alias/issue-72415-assoc-const-resolve.rs +++ b/tests/ui/traits/alias/issue-72415-assoc-const-resolve.rs @@ -1,4 +1,4 @@ -// check-pass +//@ check-pass #![feature(trait_alias)] diff --git a/tests/ui/traits/alias/issue-75983.rs b/tests/ui/traits/alias/issue-75983.rs index f9a7f36de43..0e81d4c3aac 100644 --- a/tests/ui/traits/alias/issue-75983.rs +++ b/tests/ui/traits/alias/issue-75983.rs @@ -1,4 +1,4 @@ -// check-pass +//@ check-pass #![feature(trait_alias)] diff --git a/tests/ui/traits/alias/maybe-bound.rs b/tests/ui/traits/alias/maybe-bound.rs index 284baa48149..9fdeb714d5e 100644 --- a/tests/ui/traits/alias/maybe-bound.rs +++ b/tests/ui/traits/alias/maybe-bound.rs @@ -1,4 +1,4 @@ -// build-pass (FIXME(62277): could be check-pass?) +//@ build-pass (FIXME(62277): could be check-pass?) // Test that `dyn ... + ?Sized + ...` resulting from the expansion of trait aliases is okay. diff --git a/tests/ui/traits/alias/object-wf.rs b/tests/ui/traits/alias/object-wf.rs index 1440f02df1d..3abffd22d14 100644 --- a/tests/ui/traits/alias/object-wf.rs +++ b/tests/ui/traits/alias/object-wf.rs @@ -1,4 +1,4 @@ -// check-pass +//@ check-pass // This test checks that trait objects involving trait aliases are well-formed. diff --git a/tests/ui/traits/alias/object.rs b/tests/ui/traits/alias/object.rs index 12177cd827f..30626909fae 100644 --- a/tests/ui/traits/alias/object.rs +++ b/tests/ui/traits/alias/object.rs @@ -1,4 +1,4 @@ -// run-pass +//@ run-pass #![feature(trait_alias)] diff --git a/tests/ui/traits/alias/style_lint.rs b/tests/ui/traits/alias/style_lint.rs index 33be20054b5..51c3a5aa773 100644 --- a/tests/ui/traits/alias/style_lint.rs +++ b/tests/ui/traits/alias/style_lint.rs @@ -1,4 +1,4 @@ -// check-pass +//@ check-pass #![feature(trait_alias)] diff --git a/tests/ui/traits/alias/suggest-trait-alias-instead-of-type.fixed b/tests/ui/traits/alias/suggest-trait-alias-instead-of-type.fixed index 8a94abaeb07..aa5ec17a28d 100644 --- a/tests/ui/traits/alias/suggest-trait-alias-instead-of-type.fixed +++ b/tests/ui/traits/alias/suggest-trait-alias-instead-of-type.fixed @@ -1,6 +1,6 @@ // Regression test of #43913. -// run-rustfix +//@ run-rustfix #![feature(trait_alias)] #![allow(bare_trait_objects, dead_code)] diff --git a/tests/ui/traits/alias/suggest-trait-alias-instead-of-type.rs b/tests/ui/traits/alias/suggest-trait-alias-instead-of-type.rs index 40c678c281f..5ed8bc84e0d 100644 --- a/tests/ui/traits/alias/suggest-trait-alias-instead-of-type.rs +++ b/tests/ui/traits/alias/suggest-trait-alias-instead-of-type.rs @@ -1,6 +1,6 @@ // Regression test of #43913. -// run-rustfix +//@ run-rustfix #![feature(trait_alias)] #![allow(bare_trait_objects, dead_code)] diff --git a/tests/ui/traits/alias/syntax.rs b/tests/ui/traits/alias/syntax.rs index 50c77d33c6b..bced5f165cb 100644 --- a/tests/ui/traits/alias/syntax.rs +++ b/tests/ui/traits/alias/syntax.rs @@ -1,4 +1,4 @@ -// check-pass +//@ check-pass #![feature(trait_alias)] diff --git a/tests/ui/traits/alignment-gep-tup-like-1.rs b/tests/ui/traits/alignment-gep-tup-like-1.rs index eb503dcf3b6..66677bb0a09 100644 --- a/tests/ui/traits/alignment-gep-tup-like-1.rs +++ b/tests/ui/traits/alignment-gep-tup-like-1.rs @@ -1,4 +1,4 @@ -// run-pass +//@ run-pass #![allow(non_camel_case_types)] #![allow(dead_code)] diff --git a/tests/ui/traits/anon-static-method.rs b/tests/ui/traits/anon-static-method.rs index ede01afae02..6a348874b4c 100644 --- a/tests/ui/traits/anon-static-method.rs +++ b/tests/ui/traits/anon-static-method.rs @@ -1,4 +1,4 @@ -// run-pass +//@ run-pass struct Foo { x: isize } diff --git a/tests/ui/traits/anon_trait_static_method_exe.rs b/tests/ui/traits/anon_trait_static_method_exe.rs index b4930295499..8a6a8389cf1 100644 --- a/tests/ui/traits/anon_trait_static_method_exe.rs +++ b/tests/ui/traits/anon_trait_static_method_exe.rs @@ -1,7 +1,7 @@ -// run-pass +//@ run-pass #![allow(non_camel_case_types)] -// aux-build:anon_trait_static_method_lib.rs +//@ aux-build:anon_trait_static_method_lib.rs extern crate anon_trait_static_method_lib; use anon_trait_static_method_lib::Foo; diff --git a/tests/ui/traits/assignability-trait.rs b/tests/ui/traits/assignability-trait.rs index a8547c1d271..ce4d9ca5161 100644 --- a/tests/ui/traits/assignability-trait.rs +++ b/tests/ui/traits/assignability-trait.rs @@ -1,4 +1,4 @@ -// run-pass +//@ run-pass #![allow(non_camel_case_types)] // Tests that type assignability is used to search for instances when diff --git a/tests/ui/traits/assoc-type-in-supertrait.rs b/tests/ui/traits/assoc-type-in-supertrait.rs index 7d6a754cc5a..8ea1f170953 100644 --- a/tests/ui/traits/assoc-type-in-supertrait.rs +++ b/tests/ui/traits/assoc-type-in-supertrait.rs @@ -1,4 +1,4 @@ -// run-pass +//@ run-pass // Test case where an associated type is referenced from within the // supertrait definition. Issue #20220. diff --git a/tests/ui/traits/associated_type_bound/check-trait-object-bounds-2-ok.rs b/tests/ui/traits/associated_type_bound/check-trait-object-bounds-2-ok.rs index 1422dda276b..6eaab6e5947 100644 --- a/tests/ui/traits/associated_type_bound/check-trait-object-bounds-2-ok.rs +++ b/tests/ui/traits/associated_type_bound/check-trait-object-bounds-2-ok.rs @@ -1,6 +1,6 @@ // Make sure that we're handling bound lifetimes correctly when validating trait // bounds. -// run-pass +//@ run-pass trait X<'a> { type F: FnOnce(&i32) -> &'a i32; diff --git a/tests/ui/traits/associated_type_bound/impl-is-shadowed.rs b/tests/ui/traits/associated_type_bound/impl-is-shadowed.rs index 6c3125a9fc5..6fa2265e611 100644 --- a/tests/ui/traits/associated_type_bound/impl-is-shadowed.rs +++ b/tests/ui/traits/associated_type_bound/impl-is-shadowed.rs @@ -1,4 +1,4 @@ -// check-pass +//@ check-pass trait Bar<'a> { type Assoc: 'static; } diff --git a/tests/ui/traits/associated_type_bound/issue-51446.rs b/tests/ui/traits/associated_type_bound/issue-51446.rs index 7dd95de73ba..48c1c2858cf 100644 --- a/tests/ui/traits/associated_type_bound/issue-51446.rs +++ b/tests/ui/traits/associated_type_bound/issue-51446.rs @@ -1,5 +1,5 @@ // Regression test for #51446. -// check-pass +//@ check-pass trait Foo { type Item; diff --git a/tests/ui/traits/astconv-cycle-between-and-type.rs b/tests/ui/traits/astconv-cycle-between-and-type.rs index cc8f9dc5190..1d45028657e 100644 --- a/tests/ui/traits/astconv-cycle-between-and-type.rs +++ b/tests/ui/traits/astconv-cycle-between-and-type.rs @@ -1,10 +1,10 @@ -// run-pass +//@ run-pass // Test that we are able to successfully compile a setup where a trait // (`Trait1`) references a struct (`SomeType`) which in turn // carries a predicate that references the trait (`u32 : Trait1`, // substituted). -// pretty-expanded FIXME #23616 +//@ pretty-expanded FIXME #23616 #![allow(dead_code)] diff --git a/tests/ui/traits/augmented-assignments-trait.rs b/tests/ui/traits/augmented-assignments-trait.rs index 75168c4f1e5..37fe42ce1c6 100644 --- a/tests/ui/traits/augmented-assignments-trait.rs +++ b/tests/ui/traits/augmented-assignments-trait.rs @@ -1,4 +1,4 @@ -// run-pass +//@ run-pass use std::ops::AddAssign; struct Int(#[allow(dead_code)] i32); diff --git a/tests/ui/traits/bound/basic.rs b/tests/ui/traits/bound/basic.rs index 8c8a7eb7d9d..85157fdbf62 100644 --- a/tests/ui/traits/bound/basic.rs +++ b/tests/ui/traits/bound/basic.rs @@ -1,8 +1,8 @@ -// run-pass +//@ run-pass #![allow(dead_code)] #![allow(unconditional_recursion)] -// pretty-expanded FIXME #23616 +//@ pretty-expanded FIXME #23616 trait Foo { } diff --git a/tests/ui/traits/bound/generic_trait.rs b/tests/ui/traits/bound/generic_trait.rs index 2484c5a88fb..6099c38ff8e 100644 --- a/tests/ui/traits/bound/generic_trait.rs +++ b/tests/ui/traits/bound/generic_trait.rs @@ -1,4 +1,4 @@ -// run-pass +//@ run-pass #![allow(dead_code)] #![allow(non_camel_case_types)] #![allow(non_snake_case)] diff --git a/tests/ui/traits/bound/impl-comparison-duplicates.rs b/tests/ui/traits/bound/impl-comparison-duplicates.rs index a59662c2797..68b64de3e96 100644 --- a/tests/ui/traits/bound/impl-comparison-duplicates.rs +++ b/tests/ui/traits/bound/impl-comparison-duplicates.rs @@ -1,9 +1,9 @@ -// check-pass +//@ check-pass // Tests that type parameter bounds on an implementation need not match the // trait exactly, as long as the implementation doesn't demand *more* bounds // than the trait. -// pretty-expanded FIXME #23616 +//@ pretty-expanded FIXME #23616 trait A { fn foo(&self); diff --git a/tests/ui/traits/bound/in-arc.rs b/tests/ui/traits/bound/in-arc.rs index a1492c0b982..40a6115e838 100644 --- a/tests/ui/traits/bound/in-arc.rs +++ b/tests/ui/traits/bound/in-arc.rs @@ -1,9 +1,9 @@ -// run-pass +//@ run-pass #![allow(unused_must_use)] // Tests that a heterogeneous list of existential `dyn` types can be put inside an Arc // and shared between threads as long as all types fulfill Send. -// ignore-emscripten no threads support +//@ ignore-emscripten no threads support use std::sync::Arc; use std::sync::mpsc::channel; diff --git a/tests/ui/traits/bound/multiple.rs b/tests/ui/traits/bound/multiple.rs index 868b334070b..385fa8851c1 100644 --- a/tests/ui/traits/bound/multiple.rs +++ b/tests/ui/traits/bound/multiple.rs @@ -1,5 +1,5 @@ -// run-pass -// pretty-expanded FIXME #23616 +//@ run-pass +//@ pretty-expanded FIXME #23616 fn f(_: T) { } diff --git a/tests/ui/traits/bound/not-on-bare-trait-2021.rs b/tests/ui/traits/bound/not-on-bare-trait-2021.rs index 4c2e6f0852b..07b866cb4a6 100644 --- a/tests/ui/traits/bound/not-on-bare-trait-2021.rs +++ b/tests/ui/traits/bound/not-on-bare-trait-2021.rs @@ -1,4 +1,4 @@ -// edition:2021 +//@ edition:2021 trait Foo { fn dummy(&self) {} } diff --git a/tests/ui/traits/bound/on-structs-and-enums-rpass.rs b/tests/ui/traits/bound/on-structs-and-enums-rpass.rs index 4dc4fecc91f..25e1b6b4bc3 100644 --- a/tests/ui/traits/bound/on-structs-and-enums-rpass.rs +++ b/tests/ui/traits/bound/on-structs-and-enums-rpass.rs @@ -1,7 +1,7 @@ -// run-pass +//@ run-pass #![allow(dead_code)] #![allow(unused_variables)] -// pretty-expanded FIXME #23616 +//@ pretty-expanded FIXME #23616 trait U {} trait T { fn get(self) -> X; } diff --git a/tests/ui/traits/bound/on-structs-and-enums-xc.rs b/tests/ui/traits/bound/on-structs-and-enums-xc.rs index 94316d24040..2a32e6dbab8 100644 --- a/tests/ui/traits/bound/on-structs-and-enums-xc.rs +++ b/tests/ui/traits/bound/on-structs-and-enums-xc.rs @@ -1,4 +1,4 @@ -// aux-build:on_structs_and_enums_xc.rs +//@ aux-build:on_structs_and_enums_xc.rs extern crate on_structs_and_enums_xc; diff --git a/tests/ui/traits/bound/on-structs-and-enums-xc1.rs b/tests/ui/traits/bound/on-structs-and-enums-xc1.rs index 5ef35b513e0..5240b76158a 100644 --- a/tests/ui/traits/bound/on-structs-and-enums-xc1.rs +++ b/tests/ui/traits/bound/on-structs-and-enums-xc1.rs @@ -1,4 +1,4 @@ -// aux-build:on_structs_and_enums_xc.rs +//@ aux-build:on_structs_and_enums_xc.rs extern crate on_structs_and_enums_xc; diff --git a/tests/ui/traits/bound/recursion.rs b/tests/ui/traits/bound/recursion.rs index 767040dff3f..1d9832ac917 100644 --- a/tests/ui/traits/bound/recursion.rs +++ b/tests/ui/traits/bound/recursion.rs @@ -1,5 +1,5 @@ -// check-pass -// pretty-expanded FIXME #23616 +//@ check-pass +//@ pretty-expanded FIXME #23616 trait I { fn i(&self) -> Self; } diff --git a/tests/ui/traits/bound/same-crate-name.rs b/tests/ui/traits/bound/same-crate-name.rs index 8d646a41459..06d79a0c8b8 100644 --- a/tests/ui/traits/bound/same-crate-name.rs +++ b/tests/ui/traits/bound/same-crate-name.rs @@ -1,5 +1,5 @@ -// aux-build:crate_a1.rs -// aux-build:crate_a2.rs +//@ aux-build:crate_a1.rs +//@ aux-build:crate_a2.rs // Issue 22750 // This tests the extra help message reported when a trait bound diff --git a/tests/ui/traits/bug-7183-generics.rs b/tests/ui/traits/bug-7183-generics.rs index f53a1736127..4b8135fcbbc 100644 --- a/tests/ui/traits/bug-7183-generics.rs +++ b/tests/ui/traits/bug-7183-generics.rs @@ -1,4 +1,4 @@ -// run-pass +//@ run-pass trait Speak : Sized { fn say(&self, s:&str) -> String; diff --git a/tests/ui/traits/bug-7295.rs b/tests/ui/traits/bug-7295.rs index 156ff2ee82f..bd4e126c220 100644 --- a/tests/ui/traits/bug-7295.rs +++ b/tests/ui/traits/bug-7295.rs @@ -1,5 +1,5 @@ -// run-pass -// pretty-expanded FIXME #23616 +//@ run-pass +//@ pretty-expanded FIXME #23616 pub trait Foo { fn func1(&self, t: U, w: T); diff --git a/tests/ui/traits/cache-issue-18209.rs b/tests/ui/traits/cache-issue-18209.rs index 15676e4554a..e0c309ed97d 100644 --- a/tests/ui/traits/cache-issue-18209.rs +++ b/tests/ui/traits/cache-issue-18209.rs @@ -1,10 +1,10 @@ -// run-pass +//@ run-pass // Test that the cache results from the default method do not pollute // the cache for the later call in `load()`. // // See issue #18209. -// pretty-expanded FIXME #23616 +//@ pretty-expanded FIXME #23616 pub trait Foo { fn load_from() -> Box; diff --git a/tests/ui/traits/coercion-generic.rs b/tests/ui/traits/coercion-generic.rs index bf4dda49519..92678dc35f1 100644 --- a/tests/ui/traits/coercion-generic.rs +++ b/tests/ui/traits/coercion-generic.rs @@ -1,4 +1,4 @@ -// run-pass +//@ run-pass #![allow(dead_code)] trait Trait { fn f(&self, x: T); diff --git a/tests/ui/traits/coercion.rs b/tests/ui/traits/coercion.rs index e62742bac5c..b93c8652796 100644 --- a/tests/ui/traits/coercion.rs +++ b/tests/ui/traits/coercion.rs @@ -1,4 +1,4 @@ -// run-pass +//@ run-pass #![allow(dead_code)] #![allow(unused_mut)] #![allow(unused_variables)] diff --git a/tests/ui/traits/composition-trivial.rs b/tests/ui/traits/composition-trivial.rs index 41e6a556074..26f7673e616 100644 --- a/tests/ui/traits/composition-trivial.rs +++ b/tests/ui/traits/composition-trivial.rs @@ -1,5 +1,5 @@ -// check-pass -// pretty-expanded FIXME #23616 +//@ check-pass +//@ pretty-expanded FIXME #23616 trait Foo { fn foo(&self); diff --git a/tests/ui/traits/conditional-dispatch.rs b/tests/ui/traits/conditional-dispatch.rs index dd882dce666..434b629818b 100644 --- a/tests/ui/traits/conditional-dispatch.rs +++ b/tests/ui/traits/conditional-dispatch.rs @@ -1,4 +1,4 @@ -// run-pass +//@ run-pass // Test that we are able to resolve conditional dispatch. Here, the // blanket impl for T:Copy coexists with an impl for Box, because // Box does not impl Copy. diff --git a/tests/ui/traits/conditional-model-fn.rs b/tests/ui/traits/conditional-model-fn.rs index ba88670032c..604f9b24cb9 100644 --- a/tests/ui/traits/conditional-model-fn.rs +++ b/tests/ui/traits/conditional-model-fn.rs @@ -1,10 +1,10 @@ -// run-pass +//@ run-pass #![allow(unused_imports)] // A model for how the `Fn` traits could work. You can implement at // most one of `Go`, `GoMut`, or `GoOnce`, and then the others follow // automatically. -// aux-build:go_trait.rs +//@ aux-build:go_trait.rs extern crate go_trait; diff --git a/tests/ui/traits/conservative_impl_trait.rs b/tests/ui/traits/conservative_impl_trait.rs index 4f25e57be56..4550778e473 100644 --- a/tests/ui/traits/conservative_impl_trait.rs +++ b/tests/ui/traits/conservative_impl_trait.rs @@ -1,4 +1,4 @@ -// build-pass (FIXME(62277): could be check-pass?) +//@ build-pass (FIXME(62277): could be check-pass?) // #39665 fn batches(n: &u32) -> impl Iterator { diff --git a/tests/ui/traits/copy-is-not-modulo-regions.rs b/tests/ui/traits/copy-is-not-modulo-regions.rs index b899083747a..1e7d2d9c691 100644 --- a/tests/ui/traits/copy-is-not-modulo-regions.rs +++ b/tests/ui/traits/copy-is-not-modulo-regions.rs @@ -1,5 +1,5 @@ -// revisions: not_static yes_static -//[yes_static] check-pass +//@ revisions: not_static yes_static +//@[yes_static] check-pass #[derive(Clone)] struct Foo<'lt>(&'lt ()); diff --git a/tests/ui/traits/copy-requires-self-wf.rs b/tests/ui/traits/copy-requires-self-wf.rs index 9abfdfab9d0..3a8bf8c420e 100644 --- a/tests/ui/traits/copy-requires-self-wf.rs +++ b/tests/ui/traits/copy-requires-self-wf.rs @@ -1,4 +1,4 @@ -// check-pass +//@ check-pass #[derive(Clone)] struct A<'a, T>(&'a T); diff --git a/tests/ui/traits/cycle-generic-bound.rs b/tests/ui/traits/cycle-generic-bound.rs index 77685c26da2..dec51ef35bc 100644 --- a/tests/ui/traits/cycle-generic-bound.rs +++ b/tests/ui/traits/cycle-generic-bound.rs @@ -1,7 +1,7 @@ -// check-pass +//@ check-pass // Regression test for #15477. This test just needs to compile. -// pretty-expanded FIXME #23616 +//@ pretty-expanded FIXME #23616 trait Chromosome> { } diff --git a/tests/ui/traits/cycle-type-trait.rs b/tests/ui/traits/cycle-type-trait.rs index c62d01403c7..f1125c9274a 100644 --- a/tests/ui/traits/cycle-type-trait.rs +++ b/tests/ui/traits/cycle-type-trait.rs @@ -1,9 +1,9 @@ -// run-pass +//@ run-pass #![allow(dead_code)] // Test a case where a supertrait references a type that references // the original trait. This poses no problem at the moment. -// pretty-expanded FIXME #23616 +//@ pretty-expanded FIXME #23616 trait Chromosome: Get> { } diff --git a/tests/ui/traits/default-method/auxiliary/xc_2.rs b/tests/ui/traits/default-method/auxiliary/xc_2.rs index 9792338204c..aa185d560f2 100644 --- a/tests/ui/traits/default-method/auxiliary/xc_2.rs +++ b/tests/ui/traits/default-method/auxiliary/xc_2.rs @@ -1,4 +1,4 @@ -// aux-build:xc.rs +//@ aux-build:xc.rs extern crate xc as aux; use aux::A; diff --git a/tests/ui/traits/default-method/bound-subst.rs b/tests/ui/traits/default-method/bound-subst.rs index 6a5d5c8ba2d..2a3eece7a82 100644 --- a/tests/ui/traits/default-method/bound-subst.rs +++ b/tests/ui/traits/default-method/bound-subst.rs @@ -1,4 +1,4 @@ -// run-pass +//@ run-pass trait A { diff --git a/tests/ui/traits/default-method/bound-subst2.rs b/tests/ui/traits/default-method/bound-subst2.rs index 78eabba2d23..e9437e42670 100644 --- a/tests/ui/traits/default-method/bound-subst2.rs +++ b/tests/ui/traits/default-method/bound-subst2.rs @@ -1,4 +1,4 @@ -// run-pass +//@ run-pass trait A { diff --git a/tests/ui/traits/default-method/bound-subst3.rs b/tests/ui/traits/default-method/bound-subst3.rs index dd39dec4b63..6223f8d9e22 100644 --- a/tests/ui/traits/default-method/bound-subst3.rs +++ b/tests/ui/traits/default-method/bound-subst3.rs @@ -1,4 +1,4 @@ -// run-pass +//@ run-pass trait A { diff --git a/tests/ui/traits/default-method/bound-subst4.rs b/tests/ui/traits/default-method/bound-subst4.rs index 6bc4cf0ef80..3cb0966e8c7 100644 --- a/tests/ui/traits/default-method/bound-subst4.rs +++ b/tests/ui/traits/default-method/bound-subst4.rs @@ -1,4 +1,4 @@ -// run-pass +//@ run-pass #![allow(unused_variables)] diff --git a/tests/ui/traits/default-method/bound.rs b/tests/ui/traits/default-method/bound.rs index 0855a9db851..1e806a3e4a3 100644 --- a/tests/ui/traits/default-method/bound.rs +++ b/tests/ui/traits/default-method/bound.rs @@ -1,4 +1,4 @@ -// run-pass +//@ run-pass trait A { diff --git a/tests/ui/traits/default-method/macro.rs b/tests/ui/traits/default-method/macro.rs index 2b50ee9b422..5f80a73dc56 100644 --- a/tests/ui/traits/default-method/macro.rs +++ b/tests/ui/traits/default-method/macro.rs @@ -1,4 +1,4 @@ -// run-pass +//@ run-pass trait Foo { diff --git a/tests/ui/traits/default-method/mut.rs b/tests/ui/traits/default-method/mut.rs index 3294b96561f..fd8b788035f 100644 --- a/tests/ui/traits/default-method/mut.rs +++ b/tests/ui/traits/default-method/mut.rs @@ -1,6 +1,6 @@ -// check-pass +//@ check-pass #![allow(unused_assignments)] -// pretty-expanded FIXME #23616 +//@ pretty-expanded FIXME #23616 #![allow(unused_variables)] diff --git a/tests/ui/traits/default-method/self.rs b/tests/ui/traits/default-method/self.rs index cdf4d1e148c..8b2e422ad30 100644 --- a/tests/ui/traits/default-method/self.rs +++ b/tests/ui/traits/default-method/self.rs @@ -1,4 +1,4 @@ -// run-pass +//@ run-pass trait Cat { diff --git a/tests/ui/traits/default-method/supervtable.rs b/tests/ui/traits/default-method/supervtable.rs index 939ad51355e..f61b526a798 100644 --- a/tests/ui/traits/default-method/supervtable.rs +++ b/tests/ui/traits/default-method/supervtable.rs @@ -1,4 +1,4 @@ -// run-pass +//@ run-pass // Tests that we can call a function bounded over a supertrait from diff --git a/tests/ui/traits/default-method/trivial.rs b/tests/ui/traits/default-method/trivial.rs index dc41938ec89..38f7388c676 100644 --- a/tests/ui/traits/default-method/trivial.rs +++ b/tests/ui/traits/default-method/trivial.rs @@ -1,4 +1,4 @@ -// run-pass +//@ run-pass trait Cat { diff --git a/tests/ui/traits/default-method/xc-2.rs b/tests/ui/traits/default-method/xc-2.rs index 1de61dcf896..f8274da83bb 100644 --- a/tests/ui/traits/default-method/xc-2.rs +++ b/tests/ui/traits/default-method/xc-2.rs @@ -1,6 +1,6 @@ -// run-pass -// aux-build:xc.rs -// aux-build:xc_2.rs +//@ run-pass +//@ aux-build:xc.rs +//@ aux-build:xc_2.rs diff --git a/tests/ui/traits/default-method/xc.rs b/tests/ui/traits/default-method/xc.rs index 76a1573d6c7..bbf4db03410 100644 --- a/tests/ui/traits/default-method/xc.rs +++ b/tests/ui/traits/default-method/xc.rs @@ -1,8 +1,8 @@ -// run-pass +//@ run-pass #![allow(dead_code)] #![allow(non_camel_case_types)] -// aux-build:xc.rs +//@ aux-build:xc.rs extern crate xc as aux; diff --git a/tests/ui/traits/deny-builtin-object-impl.rs b/tests/ui/traits/deny-builtin-object-impl.rs index d0eb6382e41..8e4e44f6a67 100644 --- a/tests/ui/traits/deny-builtin-object-impl.rs +++ b/tests/ui/traits/deny-builtin-object-impl.rs @@ -1,5 +1,5 @@ -// revisions: current next -//[next] compile-flags: -Znext-solver +//@ revisions: current next +//@[next] compile-flags: -Znext-solver #![feature(rustc_attrs)] diff --git a/tests/ui/traits/dyn-trait.rs b/tests/ui/traits/dyn-trait.rs index 10e69105ced..4fb7aea5cba 100644 --- a/tests/ui/traits/dyn-trait.rs +++ b/tests/ui/traits/dyn-trait.rs @@ -1,4 +1,4 @@ -// run-pass +//@ run-pass use std::fmt::Display; diff --git a/tests/ui/traits/early-vtbl-resolution.rs b/tests/ui/traits/early-vtbl-resolution.rs index f4b69c14095..f2dd2b8a660 100644 --- a/tests/ui/traits/early-vtbl-resolution.rs +++ b/tests/ui/traits/early-vtbl-resolution.rs @@ -1,8 +1,8 @@ -// run-pass +//@ run-pass #![allow(non_camel_case_types)] #![allow(dead_code)] -// pretty-expanded FIXME #23616 +//@ pretty-expanded FIXME #23616 trait thing { fn foo(&self) -> Option; diff --git a/tests/ui/traits/elaborate-type-region.rs b/tests/ui/traits/elaborate-type-region.rs index 03aef0184ba..c4f38a90692 100644 --- a/tests/ui/traits/elaborate-type-region.rs +++ b/tests/ui/traits/elaborate-type-region.rs @@ -1,4 +1,4 @@ -// run-pass +//@ run-pass #![allow(dead_code)] // Test that we elaborate `Type: 'region` constraints and infer various important things. diff --git a/tests/ui/traits/false-ambiguity-where-clause-builtin-bound.rs b/tests/ui/traits/false-ambiguity-where-clause-builtin-bound.rs index 3413db6a684..b41d719d0ec 100644 --- a/tests/ui/traits/false-ambiguity-where-clause-builtin-bound.rs +++ b/tests/ui/traits/false-ambiguity-where-clause-builtin-bound.rs @@ -1,9 +1,9 @@ -// run-pass +//@ run-pass // Test that we do not error out because of a (False) ambiguity // between the builtin rules for Sized and the where clause. Issue // #20959. -// pretty-expanded FIXME #23616 +//@ pretty-expanded FIXME #23616 fn foo(x: Option) where Option : Sized diff --git a/tests/ui/traits/fmt-pointer-trait.rs b/tests/ui/traits/fmt-pointer-trait.rs index b7876b9bd51..edf734597f5 100644 --- a/tests/ui/traits/fmt-pointer-trait.rs +++ b/tests/ui/traits/fmt-pointer-trait.rs @@ -1,4 +1,4 @@ -// run-pass +//@ run-pass use std::ptr; use std::rc::Rc; use std::sync::Arc; diff --git a/tests/ui/traits/generic.rs b/tests/ui/traits/generic.rs index 80efe1c9375..81167272b65 100644 --- a/tests/ui/traits/generic.rs +++ b/tests/ui/traits/generic.rs @@ -1,4 +1,4 @@ -// run-pass +//@ run-pass #![allow(non_camel_case_types)] diff --git a/tests/ui/traits/ice-with-dyn-pointee.rs b/tests/ui/traits/ice-with-dyn-pointee.rs index 9b3b9c8cddf..45361cc4460 100644 --- a/tests/ui/traits/ice-with-dyn-pointee.rs +++ b/tests/ui/traits/ice-with-dyn-pointee.rs @@ -1,4 +1,4 @@ -// run-pass +//@ run-pass #![feature(ptr_metadata)] // Address issue #112737 -- ICE with dyn Pointee extern crate core; diff --git a/tests/ui/traits/impl-2.rs b/tests/ui/traits/impl-2.rs index 804ffec12c2..6cc702800e3 100644 --- a/tests/ui/traits/impl-2.rs +++ b/tests/ui/traits/impl-2.rs @@ -1,8 +1,8 @@ -// run-pass +//@ run-pass #![allow(dead_code)] #![allow(non_snake_case)] -// pretty-expanded FIXME #23616 +//@ pretty-expanded FIXME #23616 pub mod Foo { pub trait Trait { diff --git a/tests/ui/traits/impl-evaluation-order.rs b/tests/ui/traits/impl-evaluation-order.rs index 2ce0b6b0df8..af44243ac5c 100644 --- a/tests/ui/traits/impl-evaluation-order.rs +++ b/tests/ui/traits/impl-evaluation-order.rs @@ -4,7 +4,7 @@ // MIR building) evaluates bounds from normalizing an impl after evaluating // any bounds on the impl. -// check-pass +//@ check-pass #![allow(dropping_copy_types)] diff --git a/tests/ui/traits/impl-implicit-trait.rs b/tests/ui/traits/impl-implicit-trait.rs index fac2bcce248..03c1ec8a53b 100644 --- a/tests/ui/traits/impl-implicit-trait.rs +++ b/tests/ui/traits/impl-implicit-trait.rs @@ -1,8 +1,8 @@ -// run-pass +//@ run-pass #![allow(dead_code)] #![allow(non_camel_case_types)] -// pretty-expanded FIXME #23616 +//@ pretty-expanded FIXME #23616 enum option_ { none_, diff --git a/tests/ui/traits/impl-inherent-prefer-over-trait.rs b/tests/ui/traits/impl-inherent-prefer-over-trait.rs index f03e730d091..29aa073341e 100644 --- a/tests/ui/traits/impl-inherent-prefer-over-trait.rs +++ b/tests/ui/traits/impl-inherent-prefer-over-trait.rs @@ -1,4 +1,4 @@ -// run-pass +//@ run-pass struct Foo; diff --git a/tests/ui/traits/impl-object-overlap-issue-23853.rs b/tests/ui/traits/impl-object-overlap-issue-23853.rs index c0d3af11443..e091a01949f 100644 --- a/tests/ui/traits/impl-object-overlap-issue-23853.rs +++ b/tests/ui/traits/impl-object-overlap-issue-23853.rs @@ -1,4 +1,4 @@ -// run-pass +//@ run-pass // Test that we are able to compile the case where both a blanket impl // and the object type itself supply the required trait obligation. // In this case, the blanket impl for `Foo` applies to any type, diff --git a/tests/ui/traits/impl.rs b/tests/ui/traits/impl.rs index 7bec1b6c9ff..348096f37f7 100644 --- a/tests/ui/traits/impl.rs +++ b/tests/ui/traits/impl.rs @@ -1,7 +1,7 @@ -// run-pass +//@ run-pass // Test calling methods on an impl for a bare trait. -// aux-build:traitimpl.rs +//@ aux-build:traitimpl.rs extern crate traitimpl; use traitimpl::Bar; diff --git a/tests/ui/traits/impl_trait_as_trait_return_position.rs b/tests/ui/traits/impl_trait_as_trait_return_position.rs index c3325fd80ca..07a8ff66fb6 100644 --- a/tests/ui/traits/impl_trait_as_trait_return_position.rs +++ b/tests/ui/traits/impl_trait_as_trait_return_position.rs @@ -1,4 +1,4 @@ -// check-pass +//@ check-pass trait A { type Foo; diff --git a/tests/ui/traits/infer-from-object-issue-26952.rs b/tests/ui/traits/infer-from-object-issue-26952.rs index 9544b4f2088..83eb9bcb62d 100644 --- a/tests/ui/traits/infer-from-object-issue-26952.rs +++ b/tests/ui/traits/infer-from-object-issue-26952.rs @@ -1,4 +1,4 @@ -// run-pass +//@ run-pass #![allow(dead_code)] #![allow(unused_variables)] // Test that when we match a trait reference like `Foo: Foo`, diff --git a/tests/ui/traits/inherent-method-order.rs b/tests/ui/traits/inherent-method-order.rs index f632ae8a9ac..d5179e943f4 100644 --- a/tests/ui/traits/inherent-method-order.rs +++ b/tests/ui/traits/inherent-method-order.rs @@ -1,4 +1,4 @@ -// run-pass +//@ run-pass struct Foo; diff --git a/tests/ui/traits/inheritance/auto-xc-2.rs b/tests/ui/traits/inheritance/auto-xc-2.rs index f2130228d51..1dac885f659 100644 --- a/tests/ui/traits/inheritance/auto-xc-2.rs +++ b/tests/ui/traits/inheritance/auto-xc-2.rs @@ -1,5 +1,5 @@ -// run-pass -// aux-build:auto_xc_2.rs +//@ run-pass +//@ aux-build:auto_xc_2.rs extern crate auto_xc_2 as aux; diff --git a/tests/ui/traits/inheritance/auto-xc.rs b/tests/ui/traits/inheritance/auto-xc.rs index 3d5ae182af1..817f4a8f645 100644 --- a/tests/ui/traits/inheritance/auto-xc.rs +++ b/tests/ui/traits/inheritance/auto-xc.rs @@ -1,6 +1,6 @@ -// run-pass +//@ run-pass #![allow(dead_code)] -// aux-build:auto_xc.rs +//@ aux-build:auto_xc.rs extern crate auto_xc as aux; diff --git a/tests/ui/traits/inheritance/auto.rs b/tests/ui/traits/inheritance/auto.rs index 0be67a55eba..99086f00641 100644 --- a/tests/ui/traits/inheritance/auto.rs +++ b/tests/ui/traits/inheritance/auto.rs @@ -1,4 +1,4 @@ -// run-pass +//@ run-pass #![allow(dead_code)] // Testing that this impl turns A into a Quux, because // A is already a Foo Bar Baz diff --git a/tests/ui/traits/inheritance/basic.rs b/tests/ui/traits/inheritance/basic.rs index 5bfa60b1aec..d9ef5f59220 100644 --- a/tests/ui/traits/inheritance/basic.rs +++ b/tests/ui/traits/inheritance/basic.rs @@ -1,4 +1,4 @@ -// run-pass +//@ run-pass #![allow(dead_code)] trait Foo { fn f(&self) -> isize; } diff --git a/tests/ui/traits/inheritance/call-bound-inherited.rs b/tests/ui/traits/inheritance/call-bound-inherited.rs index 37c2ff63c6a..980325de6bd 100644 --- a/tests/ui/traits/inheritance/call-bound-inherited.rs +++ b/tests/ui/traits/inheritance/call-bound-inherited.rs @@ -1,4 +1,4 @@ -// run-pass +//@ run-pass #![allow(dead_code)] trait Foo { fn f(&self) -> isize; } diff --git a/tests/ui/traits/inheritance/call-bound-inherited2.rs b/tests/ui/traits/inheritance/call-bound-inherited2.rs index 8576d29f251..4a03316a749 100644 --- a/tests/ui/traits/inheritance/call-bound-inherited2.rs +++ b/tests/ui/traits/inheritance/call-bound-inherited2.rs @@ -1,4 +1,4 @@ -// run-pass +//@ run-pass #![allow(dead_code)] trait Foo { fn f(&self) -> isize; } diff --git a/tests/ui/traits/inheritance/cast-without-call-to-supertrait.rs b/tests/ui/traits/inheritance/cast-without-call-to-supertrait.rs index 25159c1adb6..97295636da8 100644 --- a/tests/ui/traits/inheritance/cast-without-call-to-supertrait.rs +++ b/tests/ui/traits/inheritance/cast-without-call-to-supertrait.rs @@ -1,4 +1,4 @@ -// run-pass +//@ run-pass #![allow(dead_code)] // Testing that we can cast to a subtrait and call subtrait // methods. Not testing supertrait methods diff --git a/tests/ui/traits/inheritance/cast.rs b/tests/ui/traits/inheritance/cast.rs index 9070b9d1f56..8b8c8eb5ff3 100644 --- a/tests/ui/traits/inheritance/cast.rs +++ b/tests/ui/traits/inheritance/cast.rs @@ -1,4 +1,4 @@ -// run-pass +//@ run-pass #![allow(dead_code)] // Testing that supertrait methods can be called on subtrait object types diff --git a/tests/ui/traits/inheritance/cross-trait-call-xc.rs b/tests/ui/traits/inheritance/cross-trait-call-xc.rs index 99fbb5c6148..29796c7a0e6 100644 --- a/tests/ui/traits/inheritance/cross-trait-call-xc.rs +++ b/tests/ui/traits/inheritance/cross-trait-call-xc.rs @@ -1,5 +1,5 @@ -// run-pass -// aux-build:xc_call.rs +//@ run-pass +//@ aux-build:xc_call.rs extern crate xc_call as aux; diff --git a/tests/ui/traits/inheritance/cross-trait-call.rs b/tests/ui/traits/inheritance/cross-trait-call.rs index 512c928ca8f..51a371c7c5b 100644 --- a/tests/ui/traits/inheritance/cross-trait-call.rs +++ b/tests/ui/traits/inheritance/cross-trait-call.rs @@ -1,4 +1,4 @@ -// run-pass +//@ run-pass #![allow(dead_code)] trait Foo { fn f(&self) -> isize; } diff --git a/tests/ui/traits/inheritance/diamond.rs b/tests/ui/traits/inheritance/diamond.rs index 32ad0fb4d41..a2b0a5e77ae 100644 --- a/tests/ui/traits/inheritance/diamond.rs +++ b/tests/ui/traits/inheritance/diamond.rs @@ -1,4 +1,4 @@ -// run-pass +//@ run-pass #![allow(dead_code)] // B and C both require A, so D does as well, twice, but that's just fine diff --git a/tests/ui/traits/inheritance/multiple-inheritors.rs b/tests/ui/traits/inheritance/multiple-inheritors.rs index 77ecbd8eb17..37cbb865011 100644 --- a/tests/ui/traits/inheritance/multiple-inheritors.rs +++ b/tests/ui/traits/inheritance/multiple-inheritors.rs @@ -1,4 +1,4 @@ -// run-pass +//@ run-pass #![allow(dead_code)] trait A { fn a(&self) -> isize; } diff --git a/tests/ui/traits/inheritance/multiple-params.rs b/tests/ui/traits/inheritance/multiple-params.rs index 8ff5ba54185..9119726f6aa 100644 --- a/tests/ui/traits/inheritance/multiple-params.rs +++ b/tests/ui/traits/inheritance/multiple-params.rs @@ -1,4 +1,4 @@ -// run-pass +//@ run-pass #![allow(dead_code)] trait A { fn a(&self) -> isize; } diff --git a/tests/ui/traits/inheritance/num.rs b/tests/ui/traits/inheritance/num.rs index 3d63d78cabb..339ff04ff53 100644 --- a/tests/ui/traits/inheritance/num.rs +++ b/tests/ui/traits/inheritance/num.rs @@ -1,7 +1,7 @@ -// run-pass +//@ run-pass #![allow(dead_code)] #![allow(unused_variables)] -// pretty-expanded FIXME #23616 +//@ pretty-expanded FIXME #23616 pub trait NumExt: PartialEq + PartialOrd {} diff --git a/tests/ui/traits/inheritance/num0.rs b/tests/ui/traits/inheritance/num0.rs index c9c73ee00e6..a2ebc5c62d7 100644 --- a/tests/ui/traits/inheritance/num0.rs +++ b/tests/ui/traits/inheritance/num0.rs @@ -1,8 +1,8 @@ -// run-pass +//@ run-pass #![allow(dead_code)] // Extending Num and using inherited static methods -// pretty-expanded FIXME #23616 +//@ pretty-expanded FIXME #23616 pub trait NumCast: Sized { fn from(i: i32) -> Option; diff --git a/tests/ui/traits/inheritance/num1.rs b/tests/ui/traits/inheritance/num1.rs index 663dd3a5eaf..9fa2cde6d22 100644 --- a/tests/ui/traits/inheritance/num1.rs +++ b/tests/ui/traits/inheritance/num1.rs @@ -1,6 +1,6 @@ -// run-pass +//@ run-pass #![allow(dead_code)] -// pretty-expanded FIXME #23616 +//@ pretty-expanded FIXME #23616 pub trait NumCast: Sized { fn from(i: i32) -> Option; diff --git a/tests/ui/traits/inheritance/num2.rs b/tests/ui/traits/inheritance/num2.rs index b713c66a37c..0531cae5eac 100644 --- a/tests/ui/traits/inheritance/num2.rs +++ b/tests/ui/traits/inheritance/num2.rs @@ -1,4 +1,4 @@ -// run-pass +//@ run-pass // A more complex example of numeric extensions pub trait TypeExt {} diff --git a/tests/ui/traits/inheritance/num3.rs b/tests/ui/traits/inheritance/num3.rs index c40be6f8354..bb0c2338637 100644 --- a/tests/ui/traits/inheritance/num3.rs +++ b/tests/ui/traits/inheritance/num3.rs @@ -1,4 +1,4 @@ -// run-pass +//@ run-pass pub trait NumCast: Sized { fn from(i: i32) -> Option; } diff --git a/tests/ui/traits/inheritance/num5.rs b/tests/ui/traits/inheritance/num5.rs index f478618f7b5..b38fb441cff 100644 --- a/tests/ui/traits/inheritance/num5.rs +++ b/tests/ui/traits/inheritance/num5.rs @@ -1,5 +1,5 @@ -// run-pass -// pretty-expanded FIXME #23616 +//@ run-pass +//@ pretty-expanded FIXME #23616 pub trait NumCast: Sized { fn from(i: i32) -> Option; diff --git a/tests/ui/traits/inheritance/overloading-simple.rs b/tests/ui/traits/inheritance/overloading-simple.rs index 800d7bc6b1f..5f0dd291b80 100644 --- a/tests/ui/traits/inheritance/overloading-simple.rs +++ b/tests/ui/traits/inheritance/overloading-simple.rs @@ -1,4 +1,4 @@ -// run-pass +//@ run-pass #![allow(dead_code)] trait MyNum : PartialEq { } diff --git a/tests/ui/traits/inheritance/overloading-xc-exe.rs b/tests/ui/traits/inheritance/overloading-xc-exe.rs index 08778061ba1..356b6c7d866 100644 --- a/tests/ui/traits/inheritance/overloading-xc-exe.rs +++ b/tests/ui/traits/inheritance/overloading-xc-exe.rs @@ -1,5 +1,5 @@ -// run-pass -// aux-build:overloading_xc.rs +//@ run-pass +//@ aux-build:overloading_xc.rs extern crate overloading_xc; diff --git a/tests/ui/traits/inheritance/overloading.rs b/tests/ui/traits/inheritance/overloading.rs index f126847da09..0366ed1f547 100644 --- a/tests/ui/traits/inheritance/overloading.rs +++ b/tests/ui/traits/inheritance/overloading.rs @@ -1,4 +1,4 @@ -// run-pass +//@ run-pass use std::ops::{Add, Sub, Mul}; trait MyNum : Add + Sub + Mul + PartialEq + Clone { } diff --git a/tests/ui/traits/inheritance/repeated-supertrait.rs b/tests/ui/traits/inheritance/repeated-supertrait.rs index cb2581ffa99..bcd1a8fb357 100644 --- a/tests/ui/traits/inheritance/repeated-supertrait.rs +++ b/tests/ui/traits/inheritance/repeated-supertrait.rs @@ -1,4 +1,4 @@ -// run-pass +//@ run-pass // Test a case of a trait which extends the same supertrait twice, but // with difference type parameters. Test that we can invoke the // various methods in various ways successfully. diff --git a/tests/ui/traits/inheritance/self-in-supertype.rs b/tests/ui/traits/inheritance/self-in-supertype.rs index e8a2bd791a5..d71b7b45ca3 100644 --- a/tests/ui/traits/inheritance/self-in-supertype.rs +++ b/tests/ui/traits/inheritance/self-in-supertype.rs @@ -1,4 +1,4 @@ -// run-pass +//@ run-pass // Test for issue #4183: use of Self in supertraits. pub static FUZZY_EPSILON: f64 = 0.1; diff --git a/tests/ui/traits/inheritance/self.rs b/tests/ui/traits/inheritance/self.rs index 5f2559f48eb..73a608f2809 100644 --- a/tests/ui/traits/inheritance/self.rs +++ b/tests/ui/traits/inheritance/self.rs @@ -1,4 +1,4 @@ -// run-pass +//@ run-pass trait Foo { fn f(&self, x: &T); } diff --git a/tests/ui/traits/inheritance/simple.rs b/tests/ui/traits/inheritance/simple.rs index ca3a284e597..cc7fe1744e4 100644 --- a/tests/ui/traits/inheritance/simple.rs +++ b/tests/ui/traits/inheritance/simple.rs @@ -1,4 +1,4 @@ -// run-pass +//@ run-pass #![allow(dead_code)] trait Foo { fn f(&self) -> isize; } diff --git a/tests/ui/traits/inheritance/static.rs b/tests/ui/traits/inheritance/static.rs index 16218fbd236..95ebe83f9a2 100644 --- a/tests/ui/traits/inheritance/static.rs +++ b/tests/ui/traits/inheritance/static.rs @@ -1,4 +1,4 @@ -// run-pass +//@ run-pass pub trait MyNum { fn from_int(_: isize) -> Self; diff --git a/tests/ui/traits/inheritance/static2.rs b/tests/ui/traits/inheritance/static2.rs index bc78e1e2328..ea132595890 100644 --- a/tests/ui/traits/inheritance/static2.rs +++ b/tests/ui/traits/inheritance/static2.rs @@ -1,4 +1,4 @@ -// run-pass +//@ run-pass pub trait MyEq {} pub trait MyNum { diff --git a/tests/ui/traits/inheritance/subst.rs b/tests/ui/traits/inheritance/subst.rs index b2b6503666e..556a8b9544c 100644 --- a/tests/ui/traits/inheritance/subst.rs +++ b/tests/ui/traits/inheritance/subst.rs @@ -1,4 +1,4 @@ -// run-pass +//@ run-pass pub trait Add { fn add(&self, rhs: &RHS) -> Result; diff --git a/tests/ui/traits/inheritance/subst2.rs b/tests/ui/traits/inheritance/subst2.rs index ccc9628c777..345e08eea5b 100644 --- a/tests/ui/traits/inheritance/subst2.rs +++ b/tests/ui/traits/inheritance/subst2.rs @@ -1,4 +1,4 @@ -// run-pass +//@ run-pass trait Panda { fn chomp(&self, bamboo: &T) -> T; diff --git a/tests/ui/traits/inheritance/visibility.rs b/tests/ui/traits/inheritance/visibility.rs index 6ad86492674..3bcaa53212b 100644 --- a/tests/ui/traits/inheritance/visibility.rs +++ b/tests/ui/traits/inheritance/visibility.rs @@ -1,4 +1,4 @@ -// run-pass +//@ run-pass mod traits { pub trait Foo { fn f(&self) -> isize; } diff --git a/tests/ui/traits/issue-103563.rs b/tests/ui/traits/issue-103563.rs index cd3eea09b99..8a905488a50 100644 --- a/tests/ui/traits/issue-103563.rs +++ b/tests/ui/traits/issue-103563.rs @@ -1,4 +1,4 @@ -// build-pass +//@ build-pass fn main() { let mut log_service = LogService { inner: Inner }; diff --git a/tests/ui/traits/issue-104322.rs b/tests/ui/traits/issue-104322.rs index dcc27f1f03a..9f8ee8e5e4d 100644 --- a/tests/ui/traits/issue-104322.rs +++ b/tests/ui/traits/issue-104322.rs @@ -1,4 +1,4 @@ -// build-pass +//@ build-pass // // Tests that overflows do not occur in certain situations // related to generic diesel code diff --git a/tests/ui/traits/issue-18412.rs b/tests/ui/traits/issue-18412.rs index fe1cfb3dffa..611d0e00aba 100644 --- a/tests/ui/traits/issue-18412.rs +++ b/tests/ui/traits/issue-18412.rs @@ -1,4 +1,4 @@ -// run-pass +//@ run-pass // Test that non-static methods can be assigned to local variables as // function pointers. diff --git a/tests/ui/traits/issue-22019.rs b/tests/ui/traits/issue-22019.rs index 605fee510b1..120f611ccb6 100644 --- a/tests/ui/traits/issue-22019.rs +++ b/tests/ui/traits/issue-22019.rs @@ -1,9 +1,9 @@ -// run-pass +//@ run-pass // Test an issue where global caching was causing free regions from // distinct scopes to be compared (`'g` and `'h`). The only important // thing is that compilation succeeds here. -// pretty-expanded FIXME #23616 +//@ pretty-expanded FIXME #23616 #![allow(missing_copy_implementations)] #![allow(unused_variables)] diff --git a/tests/ui/traits/issue-22110.rs b/tests/ui/traits/issue-22110.rs index bdbfee799f1..b0b584bd49d 100644 --- a/tests/ui/traits/issue-22110.rs +++ b/tests/ui/traits/issue-22110.rs @@ -1,9 +1,9 @@ -// run-pass +//@ run-pass // Test an issue where we reported ambiguity between the where-clause // and the blanket impl. The only important thing is that compilation // succeeds here. Issue #22110. -// pretty-expanded FIXME #23616 +//@ pretty-expanded FIXME #23616 #![allow(dead_code)] diff --git a/tests/ui/traits/issue-22655.rs b/tests/ui/traits/issue-22655.rs index bc08ca0a2ba..aaf1b05b6e5 100644 --- a/tests/ui/traits/issue-22655.rs +++ b/tests/ui/traits/issue-22655.rs @@ -1,9 +1,9 @@ -// run-pass +//@ run-pass #![allow(dead_code)] // Regression test for issue #22655: This test should not lead to // infinite recursion. -// pretty-expanded FIXME #23616 +//@ pretty-expanded FIXME #23616 unsafe impl Send for Unique { } diff --git a/tests/ui/traits/issue-23003-overflow.rs b/tests/ui/traits/issue-23003-overflow.rs index c5f471f23c2..ff6b377c4a5 100644 --- a/tests/ui/traits/issue-23003-overflow.rs +++ b/tests/ui/traits/issue-23003-overflow.rs @@ -2,7 +2,7 @@ // types are required. This test now just compiles fine, since the // relevant rules that triggered the overflow were removed. -// check-pass +//@ check-pass #![allow(dead_code)] use std::marker::PhantomData; diff --git a/tests/ui/traits/issue-23003.rs b/tests/ui/traits/issue-23003.rs index 24c2b2ad660..cb05a5dfb6b 100644 --- a/tests/ui/traits/issue-23003.rs +++ b/tests/ui/traits/issue-23003.rs @@ -1,10 +1,10 @@ -// run-pass +//@ run-pass // Test stack overflow triggered by evaluating the implications. To be // WF, the type `Receipt` would require that `::Cancel` be WF. This normalizes to `Receipt` // again, leading to an infinite cycle. Issue #23003. -// pretty-expanded FIXME #23616 +//@ pretty-expanded FIXME #23616 #![allow(dead_code)] #![allow(unused_variables)] diff --git a/tests/ui/traits/issue-23825.rs b/tests/ui/traits/issue-23825.rs index a9f0095d2e2..e873a3b35c0 100644 --- a/tests/ui/traits/issue-23825.rs +++ b/tests/ui/traits/issue-23825.rs @@ -1,4 +1,4 @@ -// run-pass +//@ run-pass trait Stringify { fn to_string(&self) -> String; } diff --git a/tests/ui/traits/issue-24010.rs b/tests/ui/traits/issue-24010.rs index 1eaa5bf0c67..a42a747b2d3 100644 --- a/tests/ui/traits/issue-24010.rs +++ b/tests/ui/traits/issue-24010.rs @@ -1,6 +1,6 @@ -// run-pass -// revisions: classic next -//[next] compile-flags: -Znext-solver +//@ run-pass +//@ revisions: classic next +//@[next] compile-flags: -Znext-solver trait Foo: Fn(i32) -> i32 + Send {} diff --git a/tests/ui/traits/issue-26339.rs b/tests/ui/traits/issue-26339.rs index bedd87cc4cc..0d532fbeb9b 100644 --- a/tests/ui/traits/issue-26339.rs +++ b/tests/ui/traits/issue-26339.rs @@ -1,4 +1,4 @@ -// run-pass +//@ run-pass // Test that the right implementation is called through a trait // object when supertraits include multiple references to the // same trait, with different type parameters. diff --git a/tests/ui/traits/issue-33096.rs b/tests/ui/traits/issue-33096.rs index f0b472e2fe8..bd513b749bf 100644 --- a/tests/ui/traits/issue-33096.rs +++ b/tests/ui/traits/issue-33096.rs @@ -1,5 +1,5 @@ -// run-pass -// compile-flags: -g +//@ run-pass +//@ compile-flags: -g use std::ops::Deref; diff --git a/tests/ui/traits/issue-3683.rs b/tests/ui/traits/issue-3683.rs index b12c450c937..535d492109a 100644 --- a/tests/ui/traits/issue-3683.rs +++ b/tests/ui/traits/issue-3683.rs @@ -1,4 +1,4 @@ -// run-pass +//@ run-pass trait Foo { fn a(&self) -> isize; diff --git a/tests/ui/traits/issue-38033.rs b/tests/ui/traits/issue-38033.rs index 4d76df1e8d5..f3525bd13c4 100644 --- a/tests/ui/traits/issue-38033.rs +++ b/tests/ui/traits/issue-38033.rs @@ -1,4 +1,4 @@ -// run-pass +//@ run-pass use std::marker; use std::mem; diff --git a/tests/ui/traits/issue-40085.rs b/tests/ui/traits/issue-40085.rs index 132044cfd6d..22679b20d16 100644 --- a/tests/ui/traits/issue-40085.rs +++ b/tests/ui/traits/issue-40085.rs @@ -1,4 +1,4 @@ -// run-pass +//@ run-pass use std::ops::Index; fn bar() {} static UNIT: () = (); diff --git a/tests/ui/traits/issue-4107.rs b/tests/ui/traits/issue-4107.rs index 98433e806e3..1a754dab5ad 100644 --- a/tests/ui/traits/issue-4107.rs +++ b/tests/ui/traits/issue-4107.rs @@ -1,4 +1,4 @@ -// run-pass +//@ run-pass #![allow(dead_code)] pub fn main() { diff --git a/tests/ui/traits/issue-43132.rs b/tests/ui/traits/issue-43132.rs index c886f4b0a2d..5f11928b317 100644 --- a/tests/ui/traits/issue-43132.rs +++ b/tests/ui/traits/issue-43132.rs @@ -1,4 +1,4 @@ -// run-pass +//@ run-pass #![allow(unused)] fn main() { diff --git a/tests/ui/traits/issue-5008-borrowed-traitobject-method-call.rs b/tests/ui/traits/issue-5008-borrowed-traitobject-method-call.rs index fc869ae4fec..851036beede 100644 --- a/tests/ui/traits/issue-5008-borrowed-traitobject-method-call.rs +++ b/tests/ui/traits/issue-5008-borrowed-traitobject-method-call.rs @@ -1,4 +1,4 @@ -// run-pass +//@ run-pass /* #5008 cast to &Trait causes code to segfault on method call diff --git a/tests/ui/traits/issue-52893.rs b/tests/ui/traits/issue-52893.rs index d72598d5d59..58a15f702ee 100644 --- a/tests/ui/traits/issue-52893.rs +++ b/tests/ui/traits/issue-52893.rs @@ -1,4 +1,4 @@ -// check-fail +//@ check-fail // // regression test for issue 52893 trait At { diff --git a/tests/ui/traits/issue-56202.rs b/tests/ui/traits/issue-56202.rs index 0952843e60a..7c12e4a4936 100644 --- a/tests/ui/traits/issue-56202.rs +++ b/tests/ui/traits/issue-56202.rs @@ -1,4 +1,4 @@ -// build-pass +//@ build-pass trait FooTrait {} diff --git a/tests/ui/traits/issue-56488.rs b/tests/ui/traits/issue-56488.rs index 8b68f314c04..e33099821bd 100644 --- a/tests/ui/traits/issue-56488.rs +++ b/tests/ui/traits/issue-56488.rs @@ -1,4 +1,4 @@ -// check-pass +//@ check-pass #![feature(trait_alias)] diff --git a/tests/ui/traits/issue-58344.rs b/tests/ui/traits/issue-58344.rs index 0cb04dcb22a..455f831a0f8 100644 --- a/tests/ui/traits/issue-58344.rs +++ b/tests/ui/traits/issue-58344.rs @@ -1,4 +1,4 @@ -// check-pass +//@ check-pass use std::ops::Add; diff --git a/tests/ui/traits/issue-59029-2.rs b/tests/ui/traits/issue-59029-2.rs index fca9f1f13c9..de767b24af9 100644 --- a/tests/ui/traits/issue-59029-2.rs +++ b/tests/ui/traits/issue-59029-2.rs @@ -1,4 +1,4 @@ -// check-pass +//@ check-pass #![feature(trait_alias)] trait Svc { type Res; } diff --git a/tests/ui/traits/issue-6128.rs b/tests/ui/traits/issue-6128.rs index f5fa0de809a..95b61549b5e 100644 --- a/tests/ui/traits/issue-6128.rs +++ b/tests/ui/traits/issue-6128.rs @@ -1,4 +1,4 @@ -// run-pass +//@ run-pass use std::collections::HashMap; diff --git a/tests/ui/traits/issue-6334.rs b/tests/ui/traits/issue-6334.rs index acf48da1543..0f6b40dc0c0 100644 --- a/tests/ui/traits/issue-6334.rs +++ b/tests/ui/traits/issue-6334.rs @@ -1,4 +1,4 @@ -// run-pass +//@ run-pass // Tests that everything still compiles and runs fine even when // we reorder the bounds. diff --git a/tests/ui/traits/issue-66768.rs b/tests/ui/traits/issue-66768.rs index ce42c8b01cc..dc9fe361019 100644 --- a/tests/ui/traits/issue-66768.rs +++ b/tests/ui/traits/issue-66768.rs @@ -1,5 +1,5 @@ // Regression test for #66768. -// check-pass +//@ check-pass #![allow(dead_code)] //-^ "dead code" is needed to reproduce the issue. diff --git a/tests/ui/traits/issue-68295.rs b/tests/ui/traits/issue-68295.rs index 7ff54539adc..147f1dcc8a9 100644 --- a/tests/ui/traits/issue-68295.rs +++ b/tests/ui/traits/issue-68295.rs @@ -1,4 +1,4 @@ -// check-fail +//@ check-fail // // regression test for #68295 diff --git a/tests/ui/traits/issue-70944.rs b/tests/ui/traits/issue-70944.rs index 3286de9d5b8..b9b11d63833 100644 --- a/tests/ui/traits/issue-70944.rs +++ b/tests/ui/traits/issue-70944.rs @@ -1,4 +1,4 @@ -// check-pass +//@ check-pass // Regression test of #70944, should compile fine. use std::ops::Index; diff --git a/tests/ui/traits/issue-72455.rs b/tests/ui/traits/issue-72455.rs index b6c3bb22287..41ecd911933 100644 --- a/tests/ui/traits/issue-72455.rs +++ b/tests/ui/traits/issue-72455.rs @@ -1,4 +1,4 @@ -// check-pass +//@ check-pass pub trait ResultExt { type Ok; diff --git a/tests/ui/traits/issue-77982.rs b/tests/ui/traits/issue-77982.rs index 2331dda9168..57d7899f6dd 100644 --- a/tests/ui/traits/issue-77982.rs +++ b/tests/ui/traits/issue-77982.rs @@ -1,4 +1,4 @@ -// ignore-windows different list of satisfying impls +//@ ignore-windows different list of satisfying impls use std::collections::HashMap; fn what() { diff --git a/tests/ui/traits/issue-78632.rs b/tests/ui/traits/issue-78632.rs index c72a2aef490..11425199c07 100644 --- a/tests/ui/traits/issue-78632.rs +++ b/tests/ui/traits/issue-78632.rs @@ -1,4 +1,4 @@ -// check-pass +//@ check-pass // // Regression test for issue #78632 diff --git a/tests/ui/traits/issue-82830.rs b/tests/ui/traits/issue-82830.rs index 37bae2e90a5..4530f9cc456 100644 --- a/tests/ui/traits/issue-82830.rs +++ b/tests/ui/traits/issue-82830.rs @@ -1,4 +1,4 @@ -// check-pass +//@ check-pass trait A { type B; diff --git a/tests/ui/traits/issue-84399-bad-fresh-caching.rs b/tests/ui/traits/issue-84399-bad-fresh-caching.rs index 1494001564f..c0a6b8d0dac 100644 --- a/tests/ui/traits/issue-84399-bad-fresh-caching.rs +++ b/tests/ui/traits/issue-84399-bad-fresh-caching.rs @@ -1,5 +1,5 @@ -// compile-flags: --crate-type lib -// check-pass +//@ compile-flags: --crate-type lib +//@ check-pass // // Regression test for issue #84399 // Tests that we keep the full `ParamEnv` when diff --git a/tests/ui/traits/issue-85360-eval-obligation-ice.rs b/tests/ui/traits/issue-85360-eval-obligation-ice.rs index 75483a81094..931879a6722 100644 --- a/tests/ui/traits/issue-85360-eval-obligation-ice.rs +++ b/tests/ui/traits/issue-85360-eval-obligation-ice.rs @@ -1,4 +1,4 @@ -// compile-flags: --edition=2021 +//@ compile-flags: --edition=2021 #![feature(rustc_attrs)] diff --git a/tests/ui/traits/issue-89119.rs b/tests/ui/traits/issue-89119.rs index 170f69915e2..52d2ab91a69 100644 --- a/tests/ui/traits/issue-89119.rs +++ b/tests/ui/traits/issue-89119.rs @@ -5,7 +5,7 @@ // // The auxiliary crate used in the test contains the code minimized from `zvariant-2.8.0`. -// check-pass -// aux-build: issue_89119_intercrate_caching.rs +//@ check-pass +//@ aux-build: issue_89119_intercrate_caching.rs fn main() {} diff --git a/tests/ui/traits/issue-90195-2.rs b/tests/ui/traits/issue-90195-2.rs index b739dc46e4e..ad6185a879b 100644 --- a/tests/ui/traits/issue-90195-2.rs +++ b/tests/ui/traits/issue-90195-2.rs @@ -1,4 +1,4 @@ -// check-pass +//@ check-pass pub trait Archive { type Archived; } diff --git a/tests/ui/traits/issue-90195.rs b/tests/ui/traits/issue-90195.rs index 543c9f197e1..c5e146c81cb 100644 --- a/tests/ui/traits/issue-90195.rs +++ b/tests/ui/traits/issue-90195.rs @@ -1,4 +1,4 @@ -// check-pass +//@ check-pass pub trait Archive { type Archived; } diff --git a/tests/ui/traits/issue-90662-projection-caching.rs b/tests/ui/traits/issue-90662-projection-caching.rs index e08ab53fbb0..247cc78979a 100644 --- a/tests/ui/traits/issue-90662-projection-caching.rs +++ b/tests/ui/traits/issue-90662-projection-caching.rs @@ -1,6 +1,6 @@ -// revisions: old next -//[next] compile-flags: -Znext-solver=coherence -// check-pass +//@ revisions: old next +//@[next] compile-flags: -Znext-solver=coherence +//@ check-pass // Regression test for issue #90662 // Tests that projection caching does not cause a spurious error. diff --git a/tests/ui/traits/issue-91949-hangs-on-recursion.rs b/tests/ui/traits/issue-91949-hangs-on-recursion.rs index 312d5d08c7d..ddbbcdd0529 100644 --- a/tests/ui/traits/issue-91949-hangs-on-recursion.rs +++ b/tests/ui/traits/issue-91949-hangs-on-recursion.rs @@ -1,9 +1,9 @@ -// build-fail -// compile-flags: -Zinline-mir=no -// error-pattern: overflow evaluating the requirement ` as Iterator>::Item == ()` -// error-pattern: function cannot return without recursing -// normalize-stderr-test: "long-type-\d+" -> "long-type-hash" -// ignore-compare-mode-next-solver (hangs) +//@ build-fail +//@ compile-flags: -Zinline-mir=no +//@ error-pattern: overflow evaluating the requirement ` as Iterator>::Item == ()` +//@ error-pattern: function cannot return without recursing +//@ normalize-stderr-test: "long-type-\d+" -> "long-type-hash" +//@ ignore-compare-mode-next-solver (hangs) // Regression test for #91949. // This hanged *forever* on 1.56, fixed by #90423. diff --git a/tests/ui/traits/issue-92292.rs b/tests/ui/traits/issue-92292.rs index bb3700a2b5e..e1358157cfb 100644 --- a/tests/ui/traits/issue-92292.rs +++ b/tests/ui/traits/issue-92292.rs @@ -1,4 +1,4 @@ -// check-pass +//@ check-pass use std::marker::PhantomData; diff --git a/tests/ui/traits/issue-9394-inherited-calls.rs b/tests/ui/traits/issue-9394-inherited-calls.rs index cc0dd4fc14a..9eb5c63d337 100644 --- a/tests/ui/traits/issue-9394-inherited-calls.rs +++ b/tests/ui/traits/issue-9394-inherited-calls.rs @@ -1,4 +1,4 @@ -// run-pass +//@ run-pass trait Base: Base2 + Base3{ fn foo(&self) -> String; diff --git a/tests/ui/traits/issue-95311.rs b/tests/ui/traits/issue-95311.rs index 9d40d254ad9..1c91dfeeff7 100644 --- a/tests/ui/traits/issue-95311.rs +++ b/tests/ui/traits/issue-95311.rs @@ -1,4 +1,4 @@ -// check-pass +//@ check-pass // Test to check that pointee trait doesn't let region variables escape into the cache diff --git a/tests/ui/traits/issue-95898.rs b/tests/ui/traits/issue-95898.rs index 41a20b89959..31b7e79c575 100644 --- a/tests/ui/traits/issue-95898.rs +++ b/tests/ui/traits/issue-95898.rs @@ -1,5 +1,5 @@ // Test for #95898: The trait suggestion had an extra `:` after the trait. -// edition:2021 +//@ edition:2021 fn foo(t: T) { t.clone(); diff --git a/tests/ui/traits/issue-96664.rs b/tests/ui/traits/issue-96664.rs index 3c5314af73e..8de78c71fe9 100644 --- a/tests/ui/traits/issue-96664.rs +++ b/tests/ui/traits/issue-96664.rs @@ -1,4 +1,4 @@ -// check-pass +//@ check-pass #![feature(trait_alias)] diff --git a/tests/ui/traits/issue-96665.rs b/tests/ui/traits/issue-96665.rs index a571d48d97a..f38a12dd988 100644 --- a/tests/ui/traits/issue-96665.rs +++ b/tests/ui/traits/issue-96665.rs @@ -1,4 +1,4 @@ -// check-pass +//@ check-pass pub trait Sequence> {} diff --git a/tests/ui/traits/issue-97695-double-trivial-bound.rs b/tests/ui/traits/issue-97695-double-trivial-bound.rs index 213605b5114..7d4749f3b7a 100644 --- a/tests/ui/traits/issue-97695-double-trivial-bound.rs +++ b/tests/ui/traits/issue-97695-double-trivial-bound.rs @@ -1,5 +1,5 @@ -// compile-flags: -Zinline-mir --emit=mir -// build-pass +//@ compile-flags: -Zinline-mir --emit=mir +//@ build-pass pub trait Associate { type Associated; diff --git a/tests/ui/traits/item-inside-macro.rs b/tests/ui/traits/item-inside-macro.rs index 54bf872d028..6866c7313fc 100644 --- a/tests/ui/traits/item-inside-macro.rs +++ b/tests/ui/traits/item-inside-macro.rs @@ -1,4 +1,4 @@ -// run-pass +//@ run-pass // Issue #34183 macro_rules! foo { diff --git a/tests/ui/traits/kindck-owned-contains-1.rs b/tests/ui/traits/kindck-owned-contains-1.rs index 8adb06ba3d0..e4c69744cd7 100644 --- a/tests/ui/traits/kindck-owned-contains-1.rs +++ b/tests/ui/traits/kindck-owned-contains-1.rs @@ -1,4 +1,4 @@ -// run-pass +//@ run-pass #![allow(non_snake_case)] #![allow(non_camel_case_types)] diff --git a/tests/ui/traits/monad.rs b/tests/ui/traits/monad.rs index 5d0612cf8dc..376fe56cb17 100644 --- a/tests/ui/traits/monad.rs +++ b/tests/ui/traits/monad.rs @@ -1,4 +1,4 @@ -// run-pass +//@ run-pass #![allow(non_camel_case_types)] diff --git a/tests/ui/traits/monomorphized-callees-with-ty-params-3314.rs b/tests/ui/traits/monomorphized-callees-with-ty-params-3314.rs index bc314a39d8e..35d6dddfa30 100644 --- a/tests/ui/traits/monomorphized-callees-with-ty-params-3314.rs +++ b/tests/ui/traits/monomorphized-callees-with-ty-params-3314.rs @@ -1,5 +1,5 @@ -// run-pass -// pretty-expanded FIXME #23616 +//@ run-pass +//@ pretty-expanded FIXME #23616 trait Serializer { } diff --git a/tests/ui/traits/multidispatch-conditional-impl-not-considered.rs b/tests/ui/traits/multidispatch-conditional-impl-not-considered.rs index e9ae8ab012a..daefdcff5a5 100644 --- a/tests/ui/traits/multidispatch-conditional-impl-not-considered.rs +++ b/tests/ui/traits/multidispatch-conditional-impl-not-considered.rs @@ -1,4 +1,4 @@ -// run-pass +//@ run-pass // Test that we correctly ignore the blanket impl // because (in this case) `T` does not impl `Clone`. // diff --git a/tests/ui/traits/multidispatch-infer-convert-target.rs b/tests/ui/traits/multidispatch-infer-convert-target.rs index a3653dea2cb..f73792a2b28 100644 --- a/tests/ui/traits/multidispatch-infer-convert-target.rs +++ b/tests/ui/traits/multidispatch-infer-convert-target.rs @@ -1,4 +1,4 @@ -// run-pass +//@ run-pass // Test that we can infer the Target based on the Self or vice versa. diff --git a/tests/ui/traits/multidispatch1.rs b/tests/ui/traits/multidispatch1.rs index f2469e1490e..b8265ec384a 100644 --- a/tests/ui/traits/multidispatch1.rs +++ b/tests/ui/traits/multidispatch1.rs @@ -1,4 +1,4 @@ -// run-pass +//@ run-pass use std::fmt::Debug; diff --git a/tests/ui/traits/multidispatch2.rs b/tests/ui/traits/multidispatch2.rs index 21aa13fd487..69ca012456a 100644 --- a/tests/ui/traits/multidispatch2.rs +++ b/tests/ui/traits/multidispatch2.rs @@ -1,4 +1,4 @@ -// run-pass +//@ run-pass use std::fmt::Debug; diff --git a/tests/ui/traits/negative-bounds/opaque-type-unsatisfied-bound.rs b/tests/ui/traits/negative-bounds/opaque-type-unsatisfied-bound.rs index 01a98a30895..05b167326d4 100644 --- a/tests/ui/traits/negative-bounds/opaque-type-unsatisfied-bound.rs +++ b/tests/ui/traits/negative-bounds/opaque-type-unsatisfied-bound.rs @@ -1,4 +1,4 @@ -// compile-flags: -Znext-solver +//@ compile-flags: -Znext-solver #![feature(negative_bounds, negative_impls)] diff --git a/tests/ui/traits/negative-bounds/opaque-type-unsatisfied-fn-bound.rs b/tests/ui/traits/negative-bounds/opaque-type-unsatisfied-fn-bound.rs index bb2e861a1a7..d714d781c88 100644 --- a/tests/ui/traits/negative-bounds/opaque-type-unsatisfied-fn-bound.rs +++ b/tests/ui/traits/negative-bounds/opaque-type-unsatisfied-fn-bound.rs @@ -1,4 +1,4 @@ -// compile-flags: -Znext-solver +//@ compile-flags: -Znext-solver #![feature(negative_bounds, unboxed_closures)] diff --git a/tests/ui/traits/negative-bounds/supertrait.rs b/tests/ui/traits/negative-bounds/supertrait.rs index a66bc4a60a0..1a0ab274df9 100644 --- a/tests/ui/traits/negative-bounds/supertrait.rs +++ b/tests/ui/traits/negative-bounds/supertrait.rs @@ -1,4 +1,4 @@ -// check-pass +//@ check-pass #![feature(negative_bounds)] diff --git a/tests/ui/traits/negative-impls/eager-mono.rs b/tests/ui/traits/negative-impls/eager-mono.rs index ce770376c0b..dd2f6f27953 100644 --- a/tests/ui/traits/negative-impls/eager-mono.rs +++ b/tests/ui/traits/negative-impls/eager-mono.rs @@ -1,5 +1,5 @@ -// build-pass -// compile-flags:-C link-dead-code=y +//@ build-pass +//@ compile-flags:-C link-dead-code=y #![feature(negative_impls)] diff --git a/tests/ui/traits/negative-impls/negated-auto-traits-rpass.rs b/tests/ui/traits/negative-impls/negated-auto-traits-rpass.rs index 05345d3432b..2d376a9b056 100644 --- a/tests/ui/traits/negative-impls/negated-auto-traits-rpass.rs +++ b/tests/ui/traits/negative-impls/negated-auto-traits-rpass.rs @@ -1,4 +1,4 @@ -// run-pass +//@ run-pass #![allow(unused_variables)] #![feature(negative_impls)] diff --git a/tests/ui/traits/negative-impls/negative-impls-basic.rs b/tests/ui/traits/negative-impls/negative-impls-basic.rs index 474e0381799..3d766cc785d 100644 --- a/tests/ui/traits/negative-impls/negative-impls-basic.rs +++ b/tests/ui/traits/negative-impls/negative-impls-basic.rs @@ -1,7 +1,7 @@ // A simple test that we are able to create negative impls, when the // feature gate is given. // -// run-pass +//@ run-pass #![feature(negative_impls)] #![allow(dead_code)] diff --git a/tests/ui/traits/negative-impls/negative-specializes-negative.rs b/tests/ui/traits/negative-impls/negative-specializes-negative.rs index 01829e41301..bb2856ae7e7 100644 --- a/tests/ui/traits/negative-impls/negative-specializes-negative.rs +++ b/tests/ui/traits/negative-impls/negative-specializes-negative.rs @@ -3,7 +3,7 @@ // Test a negative impl that "specializes" another negative impl. // -// check-pass +//@ check-pass trait MyTrait {} diff --git a/tests/ui/traits/negative-impls/rely-on-negative-impl-in-coherence.rs b/tests/ui/traits/negative-impls/rely-on-negative-impl-in-coherence.rs index c1f96ab8c14..30b82f1f3f7 100644 --- a/tests/ui/traits/negative-impls/rely-on-negative-impl-in-coherence.rs +++ b/tests/ui/traits/negative-impls/rely-on-negative-impl-in-coherence.rs @@ -1,9 +1,9 @@ -// check-pass +//@ check-pass #![feature(negative_impls)] #![feature(with_negative_coherence)] -// aux-build: foreign_trait.rs +//@ aux-build: foreign_trait.rs // Test that we cannot implement `LocalTrait` for `String`, // even though there is a `String: !ForeignTrait` impl. diff --git a/tests/ui/traits/next-solver/alias-bound-preference.rs b/tests/ui/traits/next-solver/alias-bound-preference.rs index 1c6e1209610..99008bddf4f 100644 --- a/tests/ui/traits/next-solver/alias-bound-preference.rs +++ b/tests/ui/traits/next-solver/alias-bound-preference.rs @@ -1,6 +1,6 @@ -// revisions: old next -//[next] compile-flags: -Znext-solver -// run-pass +//@ revisions: old next +//@[next] compile-flags: -Znext-solver +//@ run-pass // A test for https://github.com/rust-lang/trait-system-refactor-initiative/issues/45. diff --git a/tests/ui/traits/next-solver/alias-bound-unsound.rs b/tests/ui/traits/next-solver/alias-bound-unsound.rs index a520bf6c25b..a5bd3e7afa8 100644 --- a/tests/ui/traits/next-solver/alias-bound-unsound.rs +++ b/tests/ui/traits/next-solver/alias-bound-unsound.rs @@ -1,4 +1,4 @@ -// compile-flags: -Znext-solver +//@ compile-flags: -Znext-solver // Makes sure that alias bounds are not unsound! diff --git a/tests/ui/traits/next-solver/alias-eq-in-canonical-response.rs b/tests/ui/traits/next-solver/alias-eq-in-canonical-response.rs index aa7c94791a7..65d55bac968 100644 --- a/tests/ui/traits/next-solver/alias-eq-in-canonical-response.rs +++ b/tests/ui/traits/next-solver/alias-eq-in-canonical-response.rs @@ -1,5 +1,5 @@ -// check-pass -// compile-flags: -Znext-solver +//@ check-pass +//@ compile-flags: -Znext-solver trait Foo { type Gat<'a> diff --git a/tests/ui/traits/next-solver/alias-relate/alias_eq_cant_be_furthur_normalized.rs b/tests/ui/traits/next-solver/alias-relate/alias_eq_cant_be_furthur_normalized.rs index 04d1b949692..1903f87f35a 100644 --- a/tests/ui/traits/next-solver/alias-relate/alias_eq_cant_be_furthur_normalized.rs +++ b/tests/ui/traits/next-solver/alias-relate/alias_eq_cant_be_furthur_normalized.rs @@ -1,5 +1,5 @@ -// check-pass -// compile-flags: -Znext-solver +//@ check-pass +//@ compile-flags: -Znext-solver // check that a goal such as `alias-eq(::Assoc, ::Assoc)` // succeeds with a constraint that `?0 = bool` diff --git a/tests/ui/traits/next-solver/alias-relate/alias_eq_dont_use_normalizes_to_if_substs_eq.rs b/tests/ui/traits/next-solver/alias-relate/alias_eq_dont_use_normalizes_to_if_substs_eq.rs index 48157192a10..f45ee58fcc4 100644 --- a/tests/ui/traits/next-solver/alias-relate/alias_eq_dont_use_normalizes_to_if_substs_eq.rs +++ b/tests/ui/traits/next-solver/alias-relate/alias_eq_dont_use_normalizes_to_if_substs_eq.rs @@ -1,6 +1,6 @@ -// compile-flags: -Znext-solver +//@ compile-flags: -Znext-solver -// check-pass +//@ check-pass // (should not pass, should be turned into a coherence-only test) // check that when computing `alias-eq(<() as Foo>::Assoc, <() as Foo>::Assoc)` diff --git a/tests/ui/traits/next-solver/alias-relate/alias_eq_simple.rs b/tests/ui/traits/next-solver/alias-relate/alias_eq_simple.rs index 21ad1a4fa3c..48c4826ffc7 100644 --- a/tests/ui/traits/next-solver/alias-relate/alias_eq_simple.rs +++ b/tests/ui/traits/next-solver/alias-relate/alias_eq_simple.rs @@ -1,5 +1,5 @@ -// check-pass -// compile-flags: -Znext-solver +//@ check-pass +//@ compile-flags: -Znext-solver // test that the new solver can handle `alias-eq(::Assoc, u32)` diff --git a/tests/ui/traits/next-solver/alias-relate/alias_eq_substs_eq_not_intercrate.rs b/tests/ui/traits/next-solver/alias-relate/alias_eq_substs_eq_not_intercrate.rs index 4717aa80499..1365db4869b 100644 --- a/tests/ui/traits/next-solver/alias-relate/alias_eq_substs_eq_not_intercrate.rs +++ b/tests/ui/traits/next-solver/alias-relate/alias_eq_substs_eq_not_intercrate.rs @@ -1,4 +1,4 @@ -// compile-flags: -Znext-solver +//@ compile-flags: -Znext-solver // check that a `alias-eq(::Assoc, ::Assoc)` goal fails // during coherence. We must not incorrectly constrain `?a` and `?b` to be diff --git a/tests/ui/traits/next-solver/alias-relate/deeply-nested-no-hang.rs b/tests/ui/traits/next-solver/alias-relate/deeply-nested-no-hang.rs index 91cfda37adf..554ec8b560e 100644 --- a/tests/ui/traits/next-solver/alias-relate/deeply-nested-no-hang.rs +++ b/tests/ui/traits/next-solver/alias-relate/deeply-nested-no-hang.rs @@ -1,5 +1,5 @@ -// check-pass -// compile-flags: -Znext-solver +//@ check-pass +//@ compile-flags: -Znext-solver // regression test for trait-system-refactor-initiative#68 trait Identity { type Assoc: ?Sized; diff --git a/tests/ui/traits/next-solver/alias-relate/opaque-hidden-ty-is-rigid-alias.rs b/tests/ui/traits/next-solver/alias-relate/opaque-hidden-ty-is-rigid-alias.rs index 88bbd13f9a2..633092023c1 100644 --- a/tests/ui/traits/next-solver/alias-relate/opaque-hidden-ty-is-rigid-alias.rs +++ b/tests/ui/traits/next-solver/alias-relate/opaque-hidden-ty-is-rigid-alias.rs @@ -1,5 +1,5 @@ -// check-pass -// compile-flags: -Znext-solver +//@ check-pass +//@ compile-flags: -Znext-solver fn test(x: T::Item) -> impl Sized { x diff --git a/tests/ui/traits/next-solver/alias-relate/tait-eq-proj-2.rs b/tests/ui/traits/next-solver/alias-relate/tait-eq-proj-2.rs index 915643f1d2a..cb9fe176ac9 100644 --- a/tests/ui/traits/next-solver/alias-relate/tait-eq-proj-2.rs +++ b/tests/ui/traits/next-solver/alias-relate/tait-eq-proj-2.rs @@ -1,5 +1,5 @@ -// compile-flags: -Znext-solver -// check-pass +//@ compile-flags: -Znext-solver +//@ check-pass #![feature(type_alias_impl_trait)] diff --git a/tests/ui/traits/next-solver/alias-relate/tait-eq-proj.rs b/tests/ui/traits/next-solver/alias-relate/tait-eq-proj.rs index 871e8e1e9fc..8d92c88ae72 100644 --- a/tests/ui/traits/next-solver/alias-relate/tait-eq-proj.rs +++ b/tests/ui/traits/next-solver/alias-relate/tait-eq-proj.rs @@ -1,5 +1,5 @@ -// compile-flags: -Znext-solver -// check-pass +//@ compile-flags: -Znext-solver +//@ check-pass #![feature(type_alias_impl_trait)] diff --git a/tests/ui/traits/next-solver/alias-relate/tait-eq-tait.rs b/tests/ui/traits/next-solver/alias-relate/tait-eq-tait.rs index 2629a124c3a..c813f94a904 100644 --- a/tests/ui/traits/next-solver/alias-relate/tait-eq-tait.rs +++ b/tests/ui/traits/next-solver/alias-relate/tait-eq-tait.rs @@ -1,5 +1,5 @@ -// compile-flags: -Znext-solver -// check-pass +//@ compile-flags: -Znext-solver +//@ check-pass // Not exactly sure if this is the inference behavior we *want*, // but it is a side-effect of the lazy normalization of TAITs. diff --git a/tests/ui/traits/next-solver/alias-sub.rs b/tests/ui/traits/next-solver/alias-sub.rs index f7f23a024dd..fb77990392b 100644 --- a/tests/ui/traits/next-solver/alias-sub.rs +++ b/tests/ui/traits/next-solver/alias-sub.rs @@ -1,5 +1,5 @@ -// compile-flags: -Znext-solver -// check-pass +//@ compile-flags: -Znext-solver +//@ check-pass trait Trait { type Assoc: Sized; diff --git a/tests/ui/traits/next-solver/array-default.rs b/tests/ui/traits/next-solver/array-default.rs index 6bfbce7d433..63dbd825539 100644 --- a/tests/ui/traits/next-solver/array-default.rs +++ b/tests/ui/traits/next-solver/array-default.rs @@ -1,5 +1,5 @@ -// compile-flags: -Znext-solver -// check-pass +//@ compile-flags: -Znext-solver +//@ check-pass fn has_default() where [(); N]: Default {} diff --git a/tests/ui/traits/next-solver/assembly/ambig-projection-self-is-ambig.rs b/tests/ui/traits/next-solver/assembly/ambig-projection-self-is-ambig.rs index 99a368a746f..e4332ced521 100644 --- a/tests/ui/traits/next-solver/assembly/ambig-projection-self-is-ambig.rs +++ b/tests/ui/traits/next-solver/assembly/ambig-projection-self-is-ambig.rs @@ -1,5 +1,5 @@ -// check-pass -// compile-flags: -Znext-solver +//@ check-pass +//@ compile-flags: -Znext-solver trait Reader: Default { fn read_u8_array(&self) -> Result { diff --git a/tests/ui/traits/next-solver/assembly/assemble-normalizing-self-ty-impl-ambiguity.rs b/tests/ui/traits/next-solver/assembly/assemble-normalizing-self-ty-impl-ambiguity.rs index 4401abd0783..b50577485df 100644 --- a/tests/ui/traits/next-solver/assembly/assemble-normalizing-self-ty-impl-ambiguity.rs +++ b/tests/ui/traits/next-solver/assembly/assemble-normalizing-self-ty-impl-ambiguity.rs @@ -1,5 +1,5 @@ -// compile-flags: -Znext-solver -// check-pass +//@ compile-flags: -Znext-solver +//@ check-pass // Checks that we do not get ambiguity by considering an impl // multiple times if we're able to normalize the self type. diff --git a/tests/ui/traits/next-solver/assembly/runaway-impl-candidate-selection.rs b/tests/ui/traits/next-solver/assembly/runaway-impl-candidate-selection.rs index 1edc1a8c58c..03d03e4a91d 100644 --- a/tests/ui/traits/next-solver/assembly/runaway-impl-candidate-selection.rs +++ b/tests/ui/traits/next-solver/assembly/runaway-impl-candidate-selection.rs @@ -1,4 +1,4 @@ -// compile-flags: -Znext-solver +//@ compile-flags: -Znext-solver // In the new solver, we are trying to select `::Item: Debug`, // which, naively can be unified with every impl of `Debug` if we're not careful. diff --git a/tests/ui/traits/next-solver/async.rs b/tests/ui/traits/next-solver/async.rs index 5833c052234..129e4cfaa02 100644 --- a/tests/ui/traits/next-solver/async.rs +++ b/tests/ui/traits/next-solver/async.rs @@ -1,7 +1,7 @@ -// compile-flags: -Znext-solver -// edition: 2021 -// revisions: pass fail -//[pass] check-pass +//@ compile-flags: -Znext-solver +//@ edition: 2021 +//@ revisions: pass fail +//@[pass] check-pass use std::future::Future; diff --git a/tests/ui/traits/next-solver/auto-with-drop_tracking_mir.rs b/tests/ui/traits/next-solver/auto-with-drop_tracking_mir.rs index d4010a55244..c82c1793119 100644 --- a/tests/ui/traits/next-solver/auto-with-drop_tracking_mir.rs +++ b/tests/ui/traits/next-solver/auto-with-drop_tracking_mir.rs @@ -1,7 +1,7 @@ -// compile-flags: -Znext-solver -// edition: 2021 -// revisions: pass fail -//[pass] check-pass +//@ compile-flags: -Znext-solver +//@ edition: 2021 +//@ revisions: pass fail +//@[pass] check-pass #![feature(negative_impls)] diff --git a/tests/ui/traits/next-solver/borrowck-error.rs b/tests/ui/traits/next-solver/borrowck-error.rs index 25f1445941b..1de13d7fd78 100644 --- a/tests/ui/traits/next-solver/borrowck-error.rs +++ b/tests/ui/traits/next-solver/borrowck-error.rs @@ -1,4 +1,4 @@ -// compile-flags: -Znext-solver +//@ compile-flags: -Znext-solver use std::collections::HashMap; diff --git a/tests/ui/traits/next-solver/builtin-fn-must-return-sized.rs b/tests/ui/traits/next-solver/builtin-fn-must-return-sized.rs index eab25214d63..ccb10bab6c1 100644 --- a/tests/ui/traits/next-solver/builtin-fn-must-return-sized.rs +++ b/tests/ui/traits/next-solver/builtin-fn-must-return-sized.rs @@ -1,4 +1,4 @@ -// compile-flags: -Znext-solver +//@ compile-flags: -Znext-solver #![feature(fn_traits)] #![feature(unboxed_closures)] diff --git a/tests/ui/traits/next-solver/canonical-int-var-eq-in-response.rs b/tests/ui/traits/next-solver/canonical-int-var-eq-in-response.rs index ea2740523c9..6c07817ff03 100644 --- a/tests/ui/traits/next-solver/canonical-int-var-eq-in-response.rs +++ b/tests/ui/traits/next-solver/canonical-int-var-eq-in-response.rs @@ -1,5 +1,5 @@ -// compile-flags: -Znext-solver -// check-pass +//@ compile-flags: -Znext-solver +//@ check-pass trait Mirror { type Assoc; diff --git a/tests/ui/traits/next-solver/canonical-ty-var-eq-in-response.rs b/tests/ui/traits/next-solver/canonical-ty-var-eq-in-response.rs index b1e4a9e58cf..2f9e919da2e 100644 --- a/tests/ui/traits/next-solver/canonical-ty-var-eq-in-response.rs +++ b/tests/ui/traits/next-solver/canonical-ty-var-eq-in-response.rs @@ -1,5 +1,5 @@ -// check-pass -// compile-flags: -Znext-solver +//@ check-pass +//@ compile-flags: -Znext-solver trait Mirror { type Item; diff --git a/tests/ui/traits/next-solver/canonicalize-effect-var.rs b/tests/ui/traits/next-solver/canonicalize-effect-var.rs index 4a13ba37303..6d0f09bb9be 100644 --- a/tests/ui/traits/next-solver/canonicalize-effect-var.rs +++ b/tests/ui/traits/next-solver/canonicalize-effect-var.rs @@ -1,5 +1,5 @@ -// compile-flags: -Znext-solver -// check-pass +//@ compile-flags: -Znext-solver +//@ check-pass #![feature(effects)] #![feature(const_trait_impl)] diff --git a/tests/ui/traits/next-solver/cast-checks-handling-projections.rs b/tests/ui/traits/next-solver/cast-checks-handling-projections.rs index 406b4dc1211..4edcc97d09e 100644 --- a/tests/ui/traits/next-solver/cast-checks-handling-projections.rs +++ b/tests/ui/traits/next-solver/cast-checks-handling-projections.rs @@ -1,5 +1,5 @@ -// compile-flags: -Znext-solver -// check-pass +//@ compile-flags: -Znext-solver +//@ check-pass fn main() { (0u8 + 0u8) as char; diff --git a/tests/ui/traits/next-solver/closure-inference-guidance.rs b/tests/ui/traits/next-solver/closure-inference-guidance.rs index 8175b92f882..4ee58a4ad0c 100644 --- a/tests/ui/traits/next-solver/closure-inference-guidance.rs +++ b/tests/ui/traits/next-solver/closure-inference-guidance.rs @@ -1,5 +1,5 @@ -// compile-flags: -Znext-solver -// check-pass +//@ compile-flags: -Znext-solver +//@ check-pass fn foo(i: isize) -> isize { i + 1 } diff --git a/tests/ui/traits/next-solver/closure-signature-inference-2.rs b/tests/ui/traits/next-solver/closure-signature-inference-2.rs index 8fece7ba91f..4b438e673a8 100644 --- a/tests/ui/traits/next-solver/closure-signature-inference-2.rs +++ b/tests/ui/traits/next-solver/closure-signature-inference-2.rs @@ -1,5 +1,5 @@ -// compile-flags: -Znext-solver -// check-pass +//@ compile-flags: -Znext-solver +//@ check-pass fn map U>(f: F) { f(T::default()); diff --git a/tests/ui/traits/next-solver/closure-signature-inference.rs b/tests/ui/traits/next-solver/closure-signature-inference.rs index 355fc790229..00f8a21eb2f 100644 --- a/tests/ui/traits/next-solver/closure-signature-inference.rs +++ b/tests/ui/traits/next-solver/closure-signature-inference.rs @@ -1,5 +1,5 @@ -// compile-flags: -Znext-solver -// check-pass +//@ compile-flags: -Znext-solver +//@ check-pass struct A; impl A { diff --git a/tests/ui/traits/next-solver/closure-substs-ambiguity.rs b/tests/ui/traits/next-solver/closure-substs-ambiguity.rs index cc9ee58f27f..f0f2974e260 100644 --- a/tests/ui/traits/next-solver/closure-substs-ambiguity.rs +++ b/tests/ui/traits/next-solver/closure-substs-ambiguity.rs @@ -1,5 +1,5 @@ -// compile-flags: -Znext-solver -// check-pass +//@ compile-flags: -Znext-solver +//@ check-pass fn main() { let mut x: Vec<_> = vec![]; diff --git a/tests/ui/traits/next-solver/coerce-ambig-alias-to-rigid-alias.rs b/tests/ui/traits/next-solver/coerce-ambig-alias-to-rigid-alias.rs index bcb48b5acc7..cc78dc20eaf 100644 --- a/tests/ui/traits/next-solver/coerce-ambig-alias-to-rigid-alias.rs +++ b/tests/ui/traits/next-solver/coerce-ambig-alias-to-rigid-alias.rs @@ -1,5 +1,5 @@ -// compile-flags: -Znext-solver -// check-pass +//@ compile-flags: -Znext-solver +//@ check-pass trait Trait { type Assoc; diff --git a/tests/ui/traits/next-solver/coherence/issue-102048.rs b/tests/ui/traits/next-solver/coherence/issue-102048.rs index 600e63d4d44..64b223822c6 100644 --- a/tests/ui/traits/next-solver/coherence/issue-102048.rs +++ b/tests/ui/traits/next-solver/coherence/issue-102048.rs @@ -17,7 +17,7 @@ // that to `i32`. We then try to unify `i32` from `impl1` with `u32` from `impl2` which fails, // causing coherence to consider these two impls distinct. -// compile-flags: -Znext-solver +//@ compile-flags: -Znext-solver pub trait Trait {} pub trait WithAssoc1<'a> { diff --git a/tests/ui/traits/next-solver/coherence/trait_ref_is_knowable-norm-overflow.rs b/tests/ui/traits/next-solver/coherence/trait_ref_is_knowable-norm-overflow.rs index d7a2c8e7a92..66409f171e6 100644 --- a/tests/ui/traits/next-solver/coherence/trait_ref_is_knowable-norm-overflow.rs +++ b/tests/ui/traits/next-solver/coherence/trait_ref_is_knowable-norm-overflow.rs @@ -1,4 +1,4 @@ -// compile-flags: -Znext-solver +//@ compile-flags: -Znext-solver // Coherence should handle overflow while normalizing for // `trait_ref_is_knowable` correctly. diff --git a/tests/ui/traits/next-solver/coherence/trait_ref_is_knowable-normalization-1.rs b/tests/ui/traits/next-solver/coherence/trait_ref_is_knowable-normalization-1.rs index e6ffb55b441..aa1c20f5b8e 100644 --- a/tests/ui/traits/next-solver/coherence/trait_ref_is_knowable-normalization-1.rs +++ b/tests/ui/traits/next-solver/coherence/trait_ref_is_knowable-normalization-1.rs @@ -1,5 +1,5 @@ -// compile-flags: -Znext-solver -// check-pass +//@ compile-flags: -Znext-solver +//@ check-pass trait Id { type Assoc; diff --git a/tests/ui/traits/next-solver/coherence/trait_ref_is_knowable-normalization-2.rs b/tests/ui/traits/next-solver/coherence/trait_ref_is_knowable-normalization-2.rs index d16f9d22ce0..f85b865952e 100644 --- a/tests/ui/traits/next-solver/coherence/trait_ref_is_knowable-normalization-2.rs +++ b/tests/ui/traits/next-solver/coherence/trait_ref_is_knowable-normalization-2.rs @@ -1,5 +1,5 @@ -// compile-flags: -Znext-solver -// check-pass +//@ compile-flags: -Znext-solver +//@ check-pass use std::future::{Future, IntoFuture}; use std::pin::Pin; diff --git a/tests/ui/traits/next-solver/coherence/trait_ref_is_knowable-normalization-3.rs b/tests/ui/traits/next-solver/coherence/trait_ref_is_knowable-normalization-3.rs index 90de6b847d0..98fd98ac282 100644 --- a/tests/ui/traits/next-solver/coherence/trait_ref_is_knowable-normalization-3.rs +++ b/tests/ui/traits/next-solver/coherence/trait_ref_is_knowable-normalization-3.rs @@ -1,5 +1,5 @@ -// compile-flags: -Znext-solver -// check-pass +//@ compile-flags: -Znext-solver +//@ check-pass trait Id { type Assoc; diff --git a/tests/ui/traits/next-solver/const-param-placeholder.rs b/tests/ui/traits/next-solver/const-param-placeholder.rs index c22bc54cfca..3dd5cd1f5dd 100644 --- a/tests/ui/traits/next-solver/const-param-placeholder.rs +++ b/tests/ui/traits/next-solver/const-param-placeholder.rs @@ -1,6 +1,6 @@ -// compile-flags: -Znext-solver -// revisions: pass fail -//[pass] check-pass +//@ compile-flags: -Znext-solver +//@ revisions: pass fail +//@[pass] check-pass struct Wrapper([T; N]); diff --git a/tests/ui/traits/next-solver/coroutine.rs b/tests/ui/traits/next-solver/coroutine.rs index 727e2356859..2b5bf01cefd 100644 --- a/tests/ui/traits/next-solver/coroutine.rs +++ b/tests/ui/traits/next-solver/coroutine.rs @@ -1,7 +1,7 @@ -// compile-flags: -Znext-solver -// edition: 2021 -// revisions: pass fail -//[pass] check-pass +//@ compile-flags: -Znext-solver +//@ edition: 2021 +//@ revisions: pass fail +//@[pass] check-pass #![feature(coroutine_trait, coroutines)] diff --git a/tests/ui/traits/next-solver/cycles/coinduction/fixpoint-exponential-growth.rs b/tests/ui/traits/next-solver/cycles/coinduction/fixpoint-exponential-growth.rs index 947b52da7c2..bb168e2cd7a 100644 --- a/tests/ui/traits/next-solver/cycles/coinduction/fixpoint-exponential-growth.rs +++ b/tests/ui/traits/next-solver/cycles/coinduction/fixpoint-exponential-growth.rs @@ -1,4 +1,4 @@ -// compile-flags: -Znext-solver +//@ compile-flags: -Znext-solver // Proving `W: Trait` instantiates `?0` with `(W, W)` and then // proves `W: Trait` and `W: Trait`, resulting in a coinductive cycle. diff --git a/tests/ui/traits/next-solver/cycles/coinduction/incompleteness-unstable-result.rs b/tests/ui/traits/next-solver/cycles/coinduction/incompleteness-unstable-result.rs index a3c07b98722..7eea81ce03c 100644 --- a/tests/ui/traits/next-solver/cycles/coinduction/incompleteness-unstable-result.rs +++ b/tests/ui/traits/next-solver/cycles/coinduction/incompleteness-unstable-result.rs @@ -1,4 +1,4 @@ -// compile-flags: -Znext-solver +//@ compile-flags: -Znext-solver #![feature(rustc_attrs)] // This test is incredibly subtle. At its core the goal is to get a coinductive cycle, diff --git a/tests/ui/traits/next-solver/cycles/double-cycle-inductive-coinductive.rs b/tests/ui/traits/next-solver/cycles/double-cycle-inductive-coinductive.rs index 0f19bc2c592..0d387214208 100644 --- a/tests/ui/traits/next-solver/cycles/double-cycle-inductive-coinductive.rs +++ b/tests/ui/traits/next-solver/cycles/double-cycle-inductive-coinductive.rs @@ -1,4 +1,4 @@ -// compile-flags: -Znext-solver +//@ compile-flags: -Znext-solver #![feature(rustc_attrs)] // Test that having both an inductive and a coinductive cycle diff --git a/tests/ui/traits/next-solver/cycles/fixpoint-rerun-all-cycle-heads.rs b/tests/ui/traits/next-solver/cycles/fixpoint-rerun-all-cycle-heads.rs index f6c75317a34..f7ed0e100c4 100644 --- a/tests/ui/traits/next-solver/cycles/fixpoint-rerun-all-cycle-heads.rs +++ b/tests/ui/traits/next-solver/cycles/fixpoint-rerun-all-cycle-heads.rs @@ -1,4 +1,4 @@ -// compile-flags: -Znext-solver +//@ compile-flags: -Znext-solver #![feature(rustc_attrs)] // Check that we correctly rerun the trait solver for heads of cycles, diff --git a/tests/ui/traits/next-solver/cycles/inductive-cycle-but-err.rs b/tests/ui/traits/next-solver/cycles/inductive-cycle-but-err.rs index fdc7afea378..b0c778e7f57 100644 --- a/tests/ui/traits/next-solver/cycles/inductive-cycle-but-err.rs +++ b/tests/ui/traits/next-solver/cycles/inductive-cycle-but-err.rs @@ -1,4 +1,4 @@ -// compile-flags: -Znext-solver +//@ compile-flags: -Znext-solver #![feature(trivial_bounds, marker_trait_attr)] #![allow(trivial_bounds)] // This previously triggered a bug in the provisional cache. diff --git a/tests/ui/traits/next-solver/cycles/inductive-cycle-but-ok.rs b/tests/ui/traits/next-solver/cycles/inductive-cycle-but-ok.rs index d6d9762bb73..edcf2e5472b 100644 --- a/tests/ui/traits/next-solver/cycles/inductive-cycle-but-ok.rs +++ b/tests/ui/traits/next-solver/cycles/inductive-cycle-but-ok.rs @@ -1,5 +1,5 @@ -// compile-flags: -Znext-solver -// check-pass +//@ compile-flags: -Znext-solver +//@ check-pass #![feature(trivial_bounds, marker_trait_attr)] #![allow(trivial_bounds)] diff --git a/tests/ui/traits/next-solver/cycles/inductive-cycle-discarded-coinductive-constraints.rs b/tests/ui/traits/next-solver/cycles/inductive-cycle-discarded-coinductive-constraints.rs index a32f7a13a03..527ca812efb 100644 --- a/tests/ui/traits/next-solver/cycles/inductive-cycle-discarded-coinductive-constraints.rs +++ b/tests/ui/traits/next-solver/cycles/inductive-cycle-discarded-coinductive-constraints.rs @@ -1,5 +1,5 @@ -// check-pass -// compile-flags: -Znext-solver +//@ check-pass +//@ compile-flags: -Znext-solver #![feature(rustc_attrs, marker_trait_attr)] #[rustc_coinductive] trait Trait {} diff --git a/tests/ui/traits/next-solver/cycles/inductive-fixpoint-hang.rs b/tests/ui/traits/next-solver/cycles/inductive-fixpoint-hang.rs index efeb8d0231e..9cbcc5a3cdf 100644 --- a/tests/ui/traits/next-solver/cycles/inductive-fixpoint-hang.rs +++ b/tests/ui/traits/next-solver/cycles/inductive-fixpoint-hang.rs @@ -1,4 +1,4 @@ -// compile-flags: -Znext-solver +//@ compile-flags: -Znext-solver // This currently hangs if we do not erase constraints from // overflow. diff --git a/tests/ui/traits/next-solver/cycles/inductive-not-on-stack.rs b/tests/ui/traits/next-solver/cycles/inductive-not-on-stack.rs index f2f6e009d54..78683372580 100644 --- a/tests/ui/traits/next-solver/cycles/inductive-not-on-stack.rs +++ b/tests/ui/traits/next-solver/cycles/inductive-not-on-stack.rs @@ -1,4 +1,4 @@ -// compile-flags: -Znext-solver +//@ compile-flags: -Znext-solver #![feature(rustc_attrs, trivial_bounds)] // We have to be careful here: diff --git a/tests/ui/traits/next-solver/cycles/leak-check-coinductive-cycle.rs b/tests/ui/traits/next-solver/cycles/leak-check-coinductive-cycle.rs index 9ff362ec882..c6ec4fd39de 100644 --- a/tests/ui/traits/next-solver/cycles/leak-check-coinductive-cycle.rs +++ b/tests/ui/traits/next-solver/cycles/leak-check-coinductive-cycle.rs @@ -1,5 +1,5 @@ -// compile-flags: -Znext-solver -// check-pass +//@ compile-flags: -Znext-solver +//@ check-pass #![feature(rustc_attrs)] #[rustc_coinductive] diff --git a/tests/ui/traits/next-solver/cycles/mixed-cycles-1.rs b/tests/ui/traits/next-solver/cycles/mixed-cycles-1.rs index 424508dd9d9..6d75d241864 100644 --- a/tests/ui/traits/next-solver/cycles/mixed-cycles-1.rs +++ b/tests/ui/traits/next-solver/cycles/mixed-cycles-1.rs @@ -1,4 +1,4 @@ -// compile-flags: -Znext-solver +//@ compile-flags: -Znext-solver #![feature(rustc_attrs)] // A test intended to check how we handle provisional results diff --git a/tests/ui/traits/next-solver/cycles/mixed-cycles-2.rs b/tests/ui/traits/next-solver/cycles/mixed-cycles-2.rs index 300f30ecad2..c939a6e5ef2 100644 --- a/tests/ui/traits/next-solver/cycles/mixed-cycles-2.rs +++ b/tests/ui/traits/next-solver/cycles/mixed-cycles-2.rs @@ -1,4 +1,4 @@ -// compile-flags: -Znext-solver +//@ compile-flags: -Znext-solver #![feature(rustc_attrs)] // A test showcasing that the solver may need to diff --git a/tests/ui/traits/next-solver/cycles/provisional-cache-impacts-behavior.rs b/tests/ui/traits/next-solver/cycles/provisional-cache-impacts-behavior.rs index ab7c4c7601b..b005b909aed 100644 --- a/tests/ui/traits/next-solver/cycles/provisional-cache-impacts-behavior.rs +++ b/tests/ui/traits/next-solver/cycles/provisional-cache-impacts-behavior.rs @@ -1,5 +1,5 @@ -// compile-flags: -Znext-solver -// check-pass +//@ compile-flags: -Znext-solver +//@ check-pass #![feature(rustc_attrs)] // A test showcasing that using a provisional cache can differ diff --git a/tests/ui/traits/next-solver/cycles/provisional-result-done.rs b/tests/ui/traits/next-solver/cycles/provisional-result-done.rs index 0f3b84ce520..683a4fe4831 100644 --- a/tests/ui/traits/next-solver/cycles/provisional-result-done.rs +++ b/tests/ui/traits/next-solver/cycles/provisional-result-done.rs @@ -1,5 +1,5 @@ -// compile-flags: -Znext-solver -// check-pass +//@ compile-flags: -Znext-solver +//@ check-pass // This tests checks that we update results in the provisional cache when // we pop a goal from the stack. diff --git a/tests/ui/traits/next-solver/deduce-closure-signature-after-normalization.rs b/tests/ui/traits/next-solver/deduce-closure-signature-after-normalization.rs index f9f5a1dc24d..a0fe7f0d0a5 100644 --- a/tests/ui/traits/next-solver/deduce-closure-signature-after-normalization.rs +++ b/tests/ui/traits/next-solver/deduce-closure-signature-after-normalization.rs @@ -1,4 +1,4 @@ -// compile-flags: -Znext-solver +//@ compile-flags: -Znext-solver // FIXME(-Znext-solver): This test is currently broken because the `deduce_closure_signature` // is unable to look at nested obligations. trait Foo { diff --git a/tests/ui/traits/next-solver/deduce-ty-from-object.rs b/tests/ui/traits/next-solver/deduce-ty-from-object.rs index b627fd720e3..ea187b506ac 100644 --- a/tests/ui/traits/next-solver/deduce-ty-from-object.rs +++ b/tests/ui/traits/next-solver/deduce-ty-from-object.rs @@ -1,5 +1,5 @@ -// check-pass -// compile-flags: -Znext-solver +//@ check-pass +//@ compile-flags: -Znext-solver fn main() { let x: Box> = Box::new(std::iter::empty()); diff --git a/tests/ui/traits/next-solver/dedup-regions.rs b/tests/ui/traits/next-solver/dedup-regions.rs index dd406333f27..6efc1aad20d 100644 --- a/tests/ui/traits/next-solver/dedup-regions.rs +++ b/tests/ui/traits/next-solver/dedup-regions.rs @@ -1,5 +1,5 @@ -// compile-flags: -Znext-solver -// check-pass +//@ compile-flags: -Znext-solver +//@ check-pass struct A(*mut ()); diff --git a/tests/ui/traits/next-solver/destruct.rs b/tests/ui/traits/next-solver/destruct.rs index 5093344e4b6..f595cb30db8 100644 --- a/tests/ui/traits/next-solver/destruct.rs +++ b/tests/ui/traits/next-solver/destruct.rs @@ -1,5 +1,5 @@ -// compile-flags: -Znext-solver -// check-pass +//@ compile-flags: -Znext-solver +//@ check-pass #![feature(const_trait_impl)] diff --git a/tests/ui/traits/next-solver/dont-coerce-infer-to-dyn.rs b/tests/ui/traits/next-solver/dont-coerce-infer-to-dyn.rs index da07869f3b6..12fb3d0d9e1 100644 --- a/tests/ui/traits/next-solver/dont-coerce-infer-to-dyn.rs +++ b/tests/ui/traits/next-solver/dont-coerce-infer-to-dyn.rs @@ -1,5 +1,5 @@ -// compile-flags: -Znext-solver -// check-pass +//@ compile-flags: -Znext-solver +//@ check-pass use std::fmt::Display; use std::rc::Rc; diff --git a/tests/ui/traits/next-solver/dont-elaborate-for-projections.rs b/tests/ui/traits/next-solver/dont-elaborate-for-projections.rs index 9123871db97..31517f6655f 100644 --- a/tests/ui/traits/next-solver/dont-elaborate-for-projections.rs +++ b/tests/ui/traits/next-solver/dont-elaborate-for-projections.rs @@ -1,5 +1,5 @@ -// compile-flags: -Znext-solver -// check-pass +//@ compile-flags: -Znext-solver +//@ check-pass trait Iter<'a, I: 'a>: Iterator {} diff --git a/tests/ui/traits/next-solver/dont-ice-on-assoc-projection.rs b/tests/ui/traits/next-solver/dont-ice-on-assoc-projection.rs index 1e1ef8c23a2..cbe489a0430 100644 --- a/tests/ui/traits/next-solver/dont-ice-on-assoc-projection.rs +++ b/tests/ui/traits/next-solver/dont-ice-on-assoc-projection.rs @@ -1,4 +1,4 @@ -// compile-flags: -Znext-solver=coherence +//@ compile-flags: -Znext-solver=coherence // Makes sure we don't ICE on associated const projection when the feature gate // is not enabled, since we should avoid encountering ICEs on stable if possible. diff --git a/tests/ui/traits/next-solver/dont-loop-fulfill-on-region-constraints.rs b/tests/ui/traits/next-solver/dont-loop-fulfill-on-region-constraints.rs index a85098a95ad..207797faa14 100644 --- a/tests/ui/traits/next-solver/dont-loop-fulfill-on-region-constraints.rs +++ b/tests/ui/traits/next-solver/dont-loop-fulfill-on-region-constraints.rs @@ -1,5 +1,5 @@ -// compile-flags: -Znext-solver -// check-pass +//@ compile-flags: -Znext-solver +//@ check-pass trait Eq<'a, 'b, T> {} diff --git a/tests/ui/traits/next-solver/dont-normalize-proj-with-error.rs b/tests/ui/traits/next-solver/dont-normalize-proj-with-error.rs index fd1682cd61a..2f7ea3bb095 100644 --- a/tests/ui/traits/next-solver/dont-normalize-proj-with-error.rs +++ b/tests/ui/traits/next-solver/dont-normalize-proj-with-error.rs @@ -1,4 +1,4 @@ -// compile-flags: -Znext-solver +//@ compile-flags: -Znext-solver // Test that we don't incorrectly leak unconstrained inference variables // if the projection contained an error. This caused an ICE in writeback. diff --git a/tests/ui/traits/next-solver/dont-remap-tait-substs.rs b/tests/ui/traits/next-solver/dont-remap-tait-substs.rs index b089f0df3c7..904bc179495 100644 --- a/tests/ui/traits/next-solver/dont-remap-tait-substs.rs +++ b/tests/ui/traits/next-solver/dont-remap-tait-substs.rs @@ -1,5 +1,5 @@ -// compile-flags: -Znext-solver -// check-pass +//@ compile-flags: -Znext-solver +//@ check-pass // Makes sure we don't prepopulate the MIR typeck of `define` // with `Foo = T`, but instead, `Foo = B`, so that diff --git a/tests/ui/traits/next-solver/dont-type_of-tait-in-defining-scope.rs b/tests/ui/traits/next-solver/dont-type_of-tait-in-defining-scope.rs index 9720a653e2b..10b746cc989 100644 --- a/tests/ui/traits/next-solver/dont-type_of-tait-in-defining-scope.rs +++ b/tests/ui/traits/next-solver/dont-type_of-tait-in-defining-scope.rs @@ -1,5 +1,5 @@ -// revisions: is_send not_send -// compile-flags: -Znext-solver +//@ revisions: is_send not_send +//@ compile-flags: -Znext-solver #![feature(type_alias_impl_trait)] diff --git a/tests/ui/traits/next-solver/dyn-any-dont-prefer-impl.rs b/tests/ui/traits/next-solver/dyn-any-dont-prefer-impl.rs index bb1c24a001f..a63fe729fd6 100644 --- a/tests/ui/traits/next-solver/dyn-any-dont-prefer-impl.rs +++ b/tests/ui/traits/next-solver/dyn-any-dont-prefer-impl.rs @@ -1,5 +1,5 @@ -// compile-flags: -Znext-solver -// check-pass +//@ compile-flags: -Znext-solver +//@ check-pass // Test that selection prefers the builtin trait object impl for `Any` // instead of the user defined impl. Both impls apply to the trait diff --git a/tests/ui/traits/next-solver/elaborate-item-bounds.rs b/tests/ui/traits/next-solver/elaborate-item-bounds.rs index 0f1f6c0445c..c9edf37b7db 100644 --- a/tests/ui/traits/next-solver/elaborate-item-bounds.rs +++ b/tests/ui/traits/next-solver/elaborate-item-bounds.rs @@ -1,5 +1,5 @@ -// compile-flags: -Znext-solver -// check-pass +//@ compile-flags: -Znext-solver +//@ check-pass trait Foo { type Bar: Bar; diff --git a/tests/ui/traits/next-solver/env-shadows-impls/ambig-env-no-shadow.rs b/tests/ui/traits/next-solver/env-shadows-impls/ambig-env-no-shadow.rs index 37730d38c7a..362f911c144 100644 --- a/tests/ui/traits/next-solver/env-shadows-impls/ambig-env-no-shadow.rs +++ b/tests/ui/traits/next-solver/env-shadows-impls/ambig-env-no-shadow.rs @@ -1,5 +1,5 @@ -// compile-flags: -Znext-solver -// check-pass +//@ compile-flags: -Znext-solver +//@ check-pass // If a trait goal is proven using the environment, we discard // impl candidates when normalizing. However, in this example diff --git a/tests/ui/traits/next-solver/env-shadows-impls/discard-impls-shadowed-by-env-1.rs b/tests/ui/traits/next-solver/env-shadows-impls/discard-impls-shadowed-by-env-1.rs index 63742d0d1a1..ce2d6304875 100644 --- a/tests/ui/traits/next-solver/env-shadows-impls/discard-impls-shadowed-by-env-1.rs +++ b/tests/ui/traits/next-solver/env-shadows-impls/discard-impls-shadowed-by-env-1.rs @@ -1,5 +1,5 @@ -// compile-flags: -Znext-solver -// check-pass +//@ compile-flags: -Znext-solver +//@ check-pass // Normalizing `::TraitAssoc` in the elaborated environment // `[T: Trait, T: Super, ::SuperAssoc = ::TraitAssoc]` diff --git a/tests/ui/traits/next-solver/env-shadows-impls/discard-impls-shadowed-by-env-2.rs b/tests/ui/traits/next-solver/env-shadows-impls/discard-impls-shadowed-by-env-2.rs index b0ef0d44baf..583d3c18faf 100644 --- a/tests/ui/traits/next-solver/env-shadows-impls/discard-impls-shadowed-by-env-2.rs +++ b/tests/ui/traits/next-solver/env-shadows-impls/discard-impls-shadowed-by-env-2.rs @@ -1,6 +1,6 @@ -// revisions: next current -//[next] compile-flags: -Znext-solver -// check-pass +//@ revisions: next current +//@[next] compile-flags: -Znext-solver +//@ check-pass #![allow(warnings)] trait Trait { diff --git a/tests/ui/traits/next-solver/env-shadows-impls/discard-impls-shadowed-by-env-3.rs b/tests/ui/traits/next-solver/env-shadows-impls/discard-impls-shadowed-by-env-3.rs index 807e19a4a58..da6f2908ab1 100644 --- a/tests/ui/traits/next-solver/env-shadows-impls/discard-impls-shadowed-by-env-3.rs +++ b/tests/ui/traits/next-solver/env-shadows-impls/discard-impls-shadowed-by-env-3.rs @@ -1,5 +1,5 @@ -// compile-flags: -Znext-solver -// check-pass +//@ compile-flags: -Znext-solver +//@ check-pass // If we normalize using the impl here the constraints from normalization and // trait goals can differ. This is especially bad if normalization results diff --git a/tests/ui/traits/next-solver/env-shadows-impls/normalizes_to_ignores_unnormalizable_candidate.rs b/tests/ui/traits/next-solver/env-shadows-impls/normalizes_to_ignores_unnormalizable_candidate.rs index af2c44ea233..e66d1c485f8 100644 --- a/tests/ui/traits/next-solver/env-shadows-impls/normalizes_to_ignores_unnormalizable_candidate.rs +++ b/tests/ui/traits/next-solver/env-shadows-impls/normalizes_to_ignores_unnormalizable_candidate.rs @@ -1,4 +1,4 @@ -// compile-flags: -Znext-solver +//@ compile-flags: -Znext-solver // Checks whether the new solver is smart enough to infer `?0 = U` when solving: // `normalizes-to( as Trait>::Assoc, u8)` diff --git a/tests/ui/traits/next-solver/env-shadows-impls/param-candidate-shadows-project.rs b/tests/ui/traits/next-solver/env-shadows-impls/param-candidate-shadows-project.rs index 5989e605bd9..ce7a380f07a 100644 --- a/tests/ui/traits/next-solver/env-shadows-impls/param-candidate-shadows-project.rs +++ b/tests/ui/traits/next-solver/env-shadows-impls/param-candidate-shadows-project.rs @@ -1,4 +1,4 @@ -// compile-flags: -Znext-solver +//@ compile-flags: -Znext-solver trait Foo { type Assoc; diff --git a/tests/ui/traits/next-solver/equating-projection-cyclically.rs b/tests/ui/traits/next-solver/equating-projection-cyclically.rs index e7c80cfd797..317eb65745a 100644 --- a/tests/ui/traits/next-solver/equating-projection-cyclically.rs +++ b/tests/ui/traits/next-solver/equating-projection-cyclically.rs @@ -1,5 +1,5 @@ -// check-pass -// compile-flags: -Znext-solver +//@ check-pass +//@ compile-flags: -Znext-solver trait Test { type Assoc; diff --git a/tests/ui/traits/next-solver/escaping-bound-vars-in-writeback-normalization.rs b/tests/ui/traits/next-solver/escaping-bound-vars-in-writeback-normalization.rs index 77bedc351e7..fd4d95b1b71 100644 --- a/tests/ui/traits/next-solver/escaping-bound-vars-in-writeback-normalization.rs +++ b/tests/ui/traits/next-solver/escaping-bound-vars-in-writeback-normalization.rs @@ -1,5 +1,5 @@ -// compile-flags: -Znext-solver -// check-pass +//@ compile-flags: -Znext-solver +//@ check-pass trait Trivial { type Assoc; diff --git a/tests/ui/traits/next-solver/float-canonical.rs b/tests/ui/traits/next-solver/float-canonical.rs index 90d75bacbf4..2d86fc9bdc0 100644 --- a/tests/ui/traits/next-solver/float-canonical.rs +++ b/tests/ui/traits/next-solver/float-canonical.rs @@ -1,5 +1,5 @@ -// compile-flags: -Znext-solver -// check-pass +//@ compile-flags: -Znext-solver +//@ check-pass fn foo(x: f64) { let y = x + 1.0; diff --git a/tests/ui/traits/next-solver/fn-trait-closure.rs b/tests/ui/traits/next-solver/fn-trait-closure.rs index cd2ae1f6fb2..e9d332455c0 100644 --- a/tests/ui/traits/next-solver/fn-trait-closure.rs +++ b/tests/ui/traits/next-solver/fn-trait-closure.rs @@ -1,5 +1,5 @@ -// compile-flags: -Znext-solver -// check-pass +//@ compile-flags: -Znext-solver +//@ check-pass fn require_fn(_: impl Fn() -> i32) {} diff --git a/tests/ui/traits/next-solver/fn-trait.rs b/tests/ui/traits/next-solver/fn-trait.rs index 1e3d8a21c7c..6d6ae9260b0 100644 --- a/tests/ui/traits/next-solver/fn-trait.rs +++ b/tests/ui/traits/next-solver/fn-trait.rs @@ -1,4 +1,4 @@ -// compile-flags: -Znext-solver +//@ compile-flags: -Znext-solver fn require_fn(_: impl Fn() -> i32) {} diff --git a/tests/ui/traits/next-solver/generalize/generalize-proj-new-universe-index-1.rs b/tests/ui/traits/next-solver/generalize/generalize-proj-new-universe-index-1.rs index 4a70bd5f815..afef0e5537c 100644 --- a/tests/ui/traits/next-solver/generalize/generalize-proj-new-universe-index-1.rs +++ b/tests/ui/traits/next-solver/generalize/generalize-proj-new-universe-index-1.rs @@ -1,5 +1,5 @@ -// compile-flags: -Znext-solver -// check-pass +//@ compile-flags: -Znext-solver +//@ check-pass // A minimization of an ambiguity when using typenum. See // https://github.com/rust-lang/trait-system-refactor-initiative/issues/55 diff --git a/tests/ui/traits/next-solver/generalize/generalize-proj-new-universe-index-2.rs b/tests/ui/traits/next-solver/generalize/generalize-proj-new-universe-index-2.rs index 70758e7deaa..4de5eda3a79 100644 --- a/tests/ui/traits/next-solver/generalize/generalize-proj-new-universe-index-2.rs +++ b/tests/ui/traits/next-solver/generalize/generalize-proj-new-universe-index-2.rs @@ -1,5 +1,5 @@ -// compile-flags: -Znext-solver -// known-bug: trait-system-refactor-initiative#60 +//@ compile-flags: -Znext-solver +//@ known-bug: trait-system-refactor-initiative#60 // Generalizing a projection containing an inference variable // which cannot be named by the `root_vid` can result in ambiguity. diff --git a/tests/ui/traits/next-solver/generalize/occurs-check-nested-alias.rs b/tests/ui/traits/next-solver/generalize/occurs-check-nested-alias.rs index e51508d684f..78fbe441527 100644 --- a/tests/ui/traits/next-solver/generalize/occurs-check-nested-alias.rs +++ b/tests/ui/traits/next-solver/generalize/occurs-check-nested-alias.rs @@ -1,10 +1,10 @@ -// revisions: old next -//[old] check-pass +//@ revisions: old next +//@[old] check-pass // Currently always fails to generalize the outer alias, even if it // is treated as rigid by `alias-relate`. -//[next] compile-flags: -Znext-solver -//[next] known-bug: trait-system-refactor-initiative#8 +//@[next] compile-flags: -Znext-solver +//@[next] known-bug: trait-system-refactor-initiative#8 #![crate_type = "lib"] #![allow(unused)] trait Unnormalizable { diff --git a/tests/ui/traits/next-solver/higher-ranked-dyn-bounds.rs b/tests/ui/traits/next-solver/higher-ranked-dyn-bounds.rs index b87210d7fb3..306eaddae1b 100644 --- a/tests/ui/traits/next-solver/higher-ranked-dyn-bounds.rs +++ b/tests/ui/traits/next-solver/higher-ranked-dyn-bounds.rs @@ -1,5 +1,5 @@ -// compile-flags: -Znext-solver -// check-pass +//@ compile-flags: -Znext-solver +//@ check-pass trait Trait<'a> { type Item: for<'b> Trait2<'b>; diff --git a/tests/ui/traits/next-solver/int-var-alias-eq.rs b/tests/ui/traits/next-solver/int-var-alias-eq.rs index 26ba7f8e511..2459b3678dd 100644 --- a/tests/ui/traits/next-solver/int-var-alias-eq.rs +++ b/tests/ui/traits/next-solver/int-var-alias-eq.rs @@ -1,5 +1,5 @@ -// check-pass -// compile-flags: -Znext-solver +//@ check-pass +//@ compile-flags: -Znext-solver // HIR typeck ends up equating `::Output == ?0i`. // Want to make sure that we emit an alias-eq goal for this, diff --git a/tests/ui/traits/next-solver/int-var-is-send.rs b/tests/ui/traits/next-solver/int-var-is-send.rs index d8b963f2008..9c9a91a53ae 100644 --- a/tests/ui/traits/next-solver/int-var-is-send.rs +++ b/tests/ui/traits/next-solver/int-var-is-send.rs @@ -1,5 +1,5 @@ -// compile-flags: -Znext-solver -// check-pass +//@ compile-flags: -Znext-solver +//@ check-pass fn needs_send(_: impl Send) {} diff --git a/tests/ui/traits/next-solver/issue-118950-root-region.rs b/tests/ui/traits/next-solver/issue-118950-root-region.rs index c50276c78b4..8667b3fe466 100644 --- a/tests/ui/traits/next-solver/issue-118950-root-region.rs +++ b/tests/ui/traits/next-solver/issue-118950-root-region.rs @@ -1,4 +1,4 @@ -// compile-flags: -Znext-solver +//@ compile-flags: -Znext-solver // // This is a gnarly test but I don't know how to minimize it, frankly. diff --git a/tests/ui/traits/next-solver/iter-filter-projection.rs b/tests/ui/traits/next-solver/iter-filter-projection.rs index f948831ad52..d111c1c687d 100644 --- a/tests/ui/traits/next-solver/iter-filter-projection.rs +++ b/tests/ui/traits/next-solver/iter-filter-projection.rs @@ -1,5 +1,5 @@ -// compile-flags: -Znext-solver -// check-pass +//@ compile-flags: -Znext-solver +//@ check-pass use std::{iter, slice}; diff --git a/tests/ui/traits/next-solver/lazy-nested-obligations-1.rs b/tests/ui/traits/next-solver/lazy-nested-obligations-1.rs index f9e73a93c27..62803b39f77 100644 --- a/tests/ui/traits/next-solver/lazy-nested-obligations-1.rs +++ b/tests/ui/traits/next-solver/lazy-nested-obligations-1.rs @@ -1,5 +1,5 @@ -// check-pass -// compile-flags: -Znext-solver +//@ check-pass +//@ compile-flags: -Znext-solver // Issue 94358 fn foo(_: C) diff --git a/tests/ui/traits/next-solver/lazy-nested-obligations-2.rs b/tests/ui/traits/next-solver/lazy-nested-obligations-2.rs index b85f9d9736c..51b7f57f7e6 100644 --- a/tests/ui/traits/next-solver/lazy-nested-obligations-2.rs +++ b/tests/ui/traits/next-solver/lazy-nested-obligations-2.rs @@ -1,5 +1,5 @@ -// compile-flags: -Znext-solver -// check-pass +//@ compile-flags: -Znext-solver +//@ check-pass pub trait With { type F; diff --git a/tests/ui/traits/next-solver/lazy-nested-obligations-3.rs b/tests/ui/traits/next-solver/lazy-nested-obligations-3.rs index 5fb4832dd08..0d4f128cc77 100644 --- a/tests/ui/traits/next-solver/lazy-nested-obligations-3.rs +++ b/tests/ui/traits/next-solver/lazy-nested-obligations-3.rs @@ -1,5 +1,5 @@ -// check-pass -// compile-flags: -Znext-solver +//@ check-pass +//@ compile-flags: -Znext-solver // Issue 96750 use std::marker::PhantomData; diff --git a/tests/ui/traits/next-solver/member-constraints-in-root-universe.rs b/tests/ui/traits/next-solver/member-constraints-in-root-universe.rs index 16e95e94ce5..74164ad2aa2 100644 --- a/tests/ui/traits/next-solver/member-constraints-in-root-universe.rs +++ b/tests/ui/traits/next-solver/member-constraints-in-root-universe.rs @@ -1,5 +1,5 @@ -// compile-flags: -Znext-solver -// check-pass +//@ compile-flags: -Znext-solver +//@ check-pass trait Trait { type Ty; diff --git a/tests/ui/traits/next-solver/more-object-bound.rs b/tests/ui/traits/next-solver/more-object-bound.rs index 8522f034d87..511111af83f 100644 --- a/tests/ui/traits/next-solver/more-object-bound.rs +++ b/tests/ui/traits/next-solver/more-object-bound.rs @@ -1,4 +1,4 @@ -// compile-flags: -Znext-solver +//@ compile-flags: -Znext-solver // From #80800 trait SuperTrait { diff --git a/tests/ui/traits/next-solver/negative-coherence-bounds.rs b/tests/ui/traits/next-solver/negative-coherence-bounds.rs index 5436b02c3de..d98cd1147ef 100644 --- a/tests/ui/traits/next-solver/negative-coherence-bounds.rs +++ b/tests/ui/traits/next-solver/negative-coherence-bounds.rs @@ -1,4 +1,4 @@ -// check-pass +//@ check-pass // This test verifies that negative trait predicate cannot be satisfied from a // positive param-env candidate. diff --git a/tests/ui/traits/next-solver/nested-alias-bound.rs b/tests/ui/traits/next-solver/nested-alias-bound.rs index 2e3de0ac66d..5aa887c171f 100644 --- a/tests/ui/traits/next-solver/nested-alias-bound.rs +++ b/tests/ui/traits/next-solver/nested-alias-bound.rs @@ -1,5 +1,5 @@ -// compile-flags: -Znext-solver -// check-pass +//@ compile-flags: -Znext-solver +//@ check-pass trait A { type A: B; diff --git a/tests/ui/traits/next-solver/nested-obligations-with-bound-vars-gat.rs b/tests/ui/traits/next-solver/nested-obligations-with-bound-vars-gat.rs index 94c6c285680..b0695f6afec 100644 --- a/tests/ui/traits/next-solver/nested-obligations-with-bound-vars-gat.rs +++ b/tests/ui/traits/next-solver/nested-obligations-with-bound-vars-gat.rs @@ -1,5 +1,5 @@ -// check-pass -// compile-flags: -Znext-solver +//@ check-pass +//@ compile-flags: -Znext-solver // Issue 96230 use std::fmt::Debug; diff --git a/tests/ui/traits/next-solver/normalize-async-closure-in-trait.rs b/tests/ui/traits/next-solver/normalize-async-closure-in-trait.rs index b58db2be841..8cdde4f4d51 100644 --- a/tests/ui/traits/next-solver/normalize-async-closure-in-trait.rs +++ b/tests/ui/traits/next-solver/normalize-async-closure-in-trait.rs @@ -1,6 +1,6 @@ -// compile-flags: -Znext-solver -// check-pass -// edition:2021 +//@ compile-flags: -Znext-solver +//@ check-pass +//@ edition:2021 trait Foo { async fn bar() {} diff --git a/tests/ui/traits/next-solver/normalize-param-env-1.rs b/tests/ui/traits/next-solver/normalize-param-env-1.rs index 92d4051378b..6f5fdd561f4 100644 --- a/tests/ui/traits/next-solver/normalize-param-env-1.rs +++ b/tests/ui/traits/next-solver/normalize-param-env-1.rs @@ -1,5 +1,5 @@ -// check-pass -// compile-flags: -Znext-solver +//@ check-pass +//@ compile-flags: -Znext-solver // Issue 108933 trait Add { diff --git a/tests/ui/traits/next-solver/normalize-param-env-2.rs b/tests/ui/traits/next-solver/normalize-param-env-2.rs index 9da1f8dbec1..bc387ff6d1c 100644 --- a/tests/ui/traits/next-solver/normalize-param-env-2.rs +++ b/tests/ui/traits/next-solver/normalize-param-env-2.rs @@ -1,5 +1,5 @@ -// compile-flags: -Znext-solver -// known-bug: #92505 +//@ compile-flags: -Znext-solver +//@ known-bug: #92505 // When checking that the impl method where-bounds are implied by the trait, // we prove `<() as A>::Assoc: A` in the environment `<() as A>::Assoc: A`. diff --git a/tests/ui/traits/next-solver/normalize-param-env-3.rs b/tests/ui/traits/next-solver/normalize-param-env-3.rs index e15e1155a1a..9d895df5d3e 100644 --- a/tests/ui/traits/next-solver/normalize-param-env-3.rs +++ b/tests/ui/traits/next-solver/normalize-param-env-3.rs @@ -1,5 +1,5 @@ -// check-pass -// compile-flags: -Znext-solver +//@ check-pass +//@ compile-flags: -Znext-solver // Issue 100177 trait GenericTrait {} diff --git a/tests/ui/traits/next-solver/normalize-param-env-4.rs b/tests/ui/traits/next-solver/normalize-param-env-4.rs index d49f7492297..b28fe5c3bd8 100644 --- a/tests/ui/traits/next-solver/normalize-param-env-4.rs +++ b/tests/ui/traits/next-solver/normalize-param-env-4.rs @@ -1,7 +1,7 @@ -// revisions: current next -//[next] compile-flags: -Znext-solver -//[next] known-bug: #92505 -//[current] check-pass +//@ revisions: current next +//@[next] compile-flags: -Znext-solver +//@[next] known-bug: #92505 +//@[current] check-pass trait Trait { type Assoc; diff --git a/tests/ui/traits/next-solver/normalize-path-for-method.rs b/tests/ui/traits/next-solver/normalize-path-for-method.rs index b95454306cd..bbb66574ea3 100644 --- a/tests/ui/traits/next-solver/normalize-path-for-method.rs +++ b/tests/ui/traits/next-solver/normalize-path-for-method.rs @@ -1,5 +1,5 @@ -// compile-flags: -Znext-solver -// check-pass +//@ compile-flags: -Znext-solver +//@ check-pass trait Mirror { type Assoc; diff --git a/tests/ui/traits/next-solver/normalize-rcvr-for-inherent.rs b/tests/ui/traits/next-solver/normalize-rcvr-for-inherent.rs index d308b1695f5..8e6c6866635 100644 --- a/tests/ui/traits/next-solver/normalize-rcvr-for-inherent.rs +++ b/tests/ui/traits/next-solver/normalize-rcvr-for-inherent.rs @@ -1,5 +1,5 @@ -// compile-flags: -Znext-solver -// check-pass +//@ compile-flags: -Znext-solver +//@ check-pass // Verify that we can assemble inherent impl candidates on a possibly // unnormalized self type. diff --git a/tests/ui/traits/next-solver/normalize-region-obligations.rs b/tests/ui/traits/next-solver/normalize-region-obligations.rs index d189e4893a3..7bf3274f9c6 100644 --- a/tests/ui/traits/next-solver/normalize-region-obligations.rs +++ b/tests/ui/traits/next-solver/normalize-region-obligations.rs @@ -1,6 +1,6 @@ -// revisions: normalize_param_env normalize_obligation hrtb -// check-pass -// compile-flags: -Znext-solver +//@ revisions: normalize_param_env normalize_obligation hrtb +//@ check-pass +//@ compile-flags: -Znext-solver trait Foo { #[cfg(normalize_param_env)] diff --git a/tests/ui/traits/next-solver/normalize-type-outlives-in-param-env.rs b/tests/ui/traits/next-solver/normalize-type-outlives-in-param-env.rs index 7477c56cd54..6f2756d8524 100644 --- a/tests/ui/traits/next-solver/normalize-type-outlives-in-param-env.rs +++ b/tests/ui/traits/next-solver/normalize-type-outlives-in-param-env.rs @@ -1,5 +1,5 @@ -// check-pass -// compile-flags: -Znext-solver +//@ check-pass +//@ compile-flags: -Znext-solver trait Mirror { type Assoc; diff --git a/tests/ui/traits/next-solver/normalize-type-outlives.rs b/tests/ui/traits/next-solver/normalize-type-outlives.rs index f50eb6326e2..6c633b58aed 100644 --- a/tests/ui/traits/next-solver/normalize-type-outlives.rs +++ b/tests/ui/traits/next-solver/normalize-type-outlives.rs @@ -1,4 +1,4 @@ -// check-pass +//@ check-pass trait Tr<'a> { type Assoc; diff --git a/tests/ui/traits/next-solver/normalize-unsize-rhs.rs b/tests/ui/traits/next-solver/normalize-unsize-rhs.rs index 08bb0cf42e8..dc5912b123a 100644 --- a/tests/ui/traits/next-solver/normalize-unsize-rhs.rs +++ b/tests/ui/traits/next-solver/normalize-unsize-rhs.rs @@ -1,5 +1,5 @@ -// compile-flags: -Znext-solver -// check-pass +//@ compile-flags: -Znext-solver +//@ check-pass #![feature(trait_upcasting)] trait A {} diff --git a/tests/ui/traits/next-solver/normalized-const-built-in-op.rs b/tests/ui/traits/next-solver/normalized-const-built-in-op.rs index 0fffe7b4369..d82e0b8d43f 100644 --- a/tests/ui/traits/next-solver/normalized-const-built-in-op.rs +++ b/tests/ui/traits/next-solver/normalized-const-built-in-op.rs @@ -1,5 +1,5 @@ -// compile-flags: -Znext-solver -// check-pass +//@ compile-flags: -Znext-solver +//@ check-pass const fn foo() { let mut x = [1, 2, 3]; diff --git a/tests/ui/traits/next-solver/object-soundness-requires-generalization.rs b/tests/ui/traits/next-solver/object-soundness-requires-generalization.rs index 6e709d9ae8e..11a2617ad42 100644 --- a/tests/ui/traits/next-solver/object-soundness-requires-generalization.rs +++ b/tests/ui/traits/next-solver/object-soundness-requires-generalization.rs @@ -1,5 +1,5 @@ -// compile-flags: -Znext-solver -// ignore-test +//@ compile-flags: -Znext-solver +//@ ignore-test trait Trait { type Gat<'lt>; diff --git a/tests/ui/traits/next-solver/object-unsafety.rs b/tests/ui/traits/next-solver/object-unsafety.rs index cfa53948b97..c9b3b1566a4 100644 --- a/tests/ui/traits/next-solver/object-unsafety.rs +++ b/tests/ui/traits/next-solver/object-unsafety.rs @@ -1,4 +1,4 @@ -// compile-flags: -Znext-solver +//@ compile-flags: -Znext-solver trait Setup { type From: Copy; diff --git a/tests/ui/traits/next-solver/opportunistic-region-resolve.rs b/tests/ui/traits/next-solver/opportunistic-region-resolve.rs index d852332d0e5..b1d89e32671 100644 --- a/tests/ui/traits/next-solver/opportunistic-region-resolve.rs +++ b/tests/ui/traits/next-solver/opportunistic-region-resolve.rs @@ -1,5 +1,5 @@ -// compile-flags: -Znext-solver -// check-pass +//@ compile-flags: -Znext-solver +//@ check-pass #![feature(rustc_attrs)] diff --git a/tests/ui/traits/next-solver/overflow/exponential-trait-goals.rs b/tests/ui/traits/next-solver/overflow/exponential-trait-goals.rs index a465bcecfe0..186d0e8be56 100644 --- a/tests/ui/traits/next-solver/overflow/exponential-trait-goals.rs +++ b/tests/ui/traits/next-solver/overflow/exponential-trait-goals.rs @@ -1,4 +1,4 @@ -// compile-flags: -Znext-solver +//@ compile-flags: -Znext-solver trait Trait {} diff --git a/tests/ui/traits/next-solver/overflow/global-cache.rs b/tests/ui/traits/next-solver/overflow/global-cache.rs index fe4032ca62e..5c5f8e1d1a2 100644 --- a/tests/ui/traits/next-solver/overflow/global-cache.rs +++ b/tests/ui/traits/next-solver/overflow/global-cache.rs @@ -1,4 +1,4 @@ -// compile-flags: -Znext-solver +//@ compile-flags: -Znext-solver // Check that we consider the reached depth of global cache // entries when detecting overflow. We would otherwise be unstable diff --git a/tests/ui/traits/next-solver/overflow/recursion-limit-normalizes-to-constraints.rs b/tests/ui/traits/next-solver/overflow/recursion-limit-normalizes-to-constraints.rs index 03ef93dc233..dee5500aadd 100644 --- a/tests/ui/traits/next-solver/overflow/recursion-limit-normalizes-to-constraints.rs +++ b/tests/ui/traits/next-solver/overflow/recursion-limit-normalizes-to-constraints.rs @@ -1,5 +1,5 @@ -// compile-flags: -Znext-solver=coherence -// check-pass +//@ compile-flags: -Znext-solver=coherence +//@ check-pass // A regression test for trait-system-refactor-initiative#70. diff --git a/tests/ui/traits/next-solver/overflow/recursion-limit-zero-issue-115351.rs b/tests/ui/traits/next-solver/overflow/recursion-limit-zero-issue-115351.rs index 52a17a14281..fb668f83b01 100644 --- a/tests/ui/traits/next-solver/overflow/recursion-limit-zero-issue-115351.rs +++ b/tests/ui/traits/next-solver/overflow/recursion-limit-zero-issue-115351.rs @@ -2,8 +2,8 @@ //~| ERROR overflow evaluating the requirement `Self: Trait` // This is a non-regression test for issue #115351, where a recursion limit of 0 caused an ICE. -// compile-flags: -Znext-solver --crate-type=lib -// check-fail +//@ compile-flags: -Znext-solver --crate-type=lib +//@ check-fail #![recursion_limit = "0"] trait Trait {} diff --git a/tests/ui/traits/next-solver/overflow/recursive-self-normalization-2.rs b/tests/ui/traits/next-solver/overflow/recursive-self-normalization-2.rs index 983a0fec653..0f01a453b33 100644 --- a/tests/ui/traits/next-solver/overflow/recursive-self-normalization-2.rs +++ b/tests/ui/traits/next-solver/overflow/recursive-self-normalization-2.rs @@ -1,4 +1,4 @@ -// compile-flags: -Znext-solver +//@ compile-flags: -Znext-solver trait Foo1 { type Assoc1; diff --git a/tests/ui/traits/next-solver/overflow/recursive-self-normalization.rs b/tests/ui/traits/next-solver/overflow/recursive-self-normalization.rs index 40e2aa9e63f..f435b48737e 100644 --- a/tests/ui/traits/next-solver/overflow/recursive-self-normalization.rs +++ b/tests/ui/traits/next-solver/overflow/recursive-self-normalization.rs @@ -1,4 +1,4 @@ -// compile-flags: -Znext-solver +//@ compile-flags: -Znext-solver trait Foo { type Assoc; diff --git a/tests/ui/traits/next-solver/param-discr-kind.rs b/tests/ui/traits/next-solver/param-discr-kind.rs index c66b0b9f45f..310ee45c763 100644 --- a/tests/ui/traits/next-solver/param-discr-kind.rs +++ b/tests/ui/traits/next-solver/param-discr-kind.rs @@ -1,5 +1,5 @@ -// compile-flags: -Znext-solver -// check-pass +//@ compile-flags: -Znext-solver +//@ check-pass fn foo(x: T) { std::mem::discriminant(&x); diff --git a/tests/ui/traits/next-solver/pointee.rs b/tests/ui/traits/next-solver/pointee.rs index a56df549a8d..a861ce82516 100644 --- a/tests/ui/traits/next-solver/pointee.rs +++ b/tests/ui/traits/next-solver/pointee.rs @@ -1,5 +1,5 @@ -// compile-flags: -Znext-solver -// check-pass +//@ compile-flags: -Znext-solver +//@ check-pass #![feature(ptr_metadata)] use std::ptr::{DynMetadata, Pointee}; diff --git a/tests/ui/traits/next-solver/pointer-like.rs b/tests/ui/traits/next-solver/pointer-like.rs index f6cc718c6e2..bdcad4d4c5e 100644 --- a/tests/ui/traits/next-solver/pointer-like.rs +++ b/tests/ui/traits/next-solver/pointer-like.rs @@ -1,4 +1,4 @@ -// compile-flags: -Znext-solver +//@ compile-flags: -Znext-solver #![feature(pointer_like_trait)] diff --git a/tests/ui/traits/next-solver/prefer-candidate-no-constraints.rs b/tests/ui/traits/next-solver/prefer-candidate-no-constraints.rs index a47f819f192..11ee6aa8b22 100644 --- a/tests/ui/traits/next-solver/prefer-candidate-no-constraints.rs +++ b/tests/ui/traits/next-solver/prefer-candidate-no-constraints.rs @@ -1,5 +1,5 @@ -// compile-flags: -Znext-solver -// check-pass +//@ compile-flags: -Znext-solver +//@ check-pass trait Foo {} diff --git a/tests/ui/traits/next-solver/prefer-param-env-on-ambiguity.rs b/tests/ui/traits/next-solver/prefer-param-env-on-ambiguity.rs index f8c0223e187..ca98eee1981 100644 --- a/tests/ui/traits/next-solver/prefer-param-env-on-ambiguity.rs +++ b/tests/ui/traits/next-solver/prefer-param-env-on-ambiguity.rs @@ -1,5 +1,5 @@ -// compile-flags: -Znext-solver -// check-pass +//@ compile-flags: -Znext-solver +//@ check-pass trait Foo<'a> {} trait Bar<'a> {} diff --git a/tests/ui/traits/next-solver/projection-discr-kind.rs b/tests/ui/traits/next-solver/projection-discr-kind.rs index bf557f8633a..8d62937e07b 100644 --- a/tests/ui/traits/next-solver/projection-discr-kind.rs +++ b/tests/ui/traits/next-solver/projection-discr-kind.rs @@ -1,4 +1,4 @@ -// compile-flags: -Znext-solver +//@ compile-flags: -Znext-solver // Check that `::Discriminant` doesn't normalize // to itself and cause overflow/ambiguity. diff --git a/tests/ui/traits/next-solver/projection/param-env-trait-candidate-1.rs b/tests/ui/traits/next-solver/projection/param-env-trait-candidate-1.rs index b337c067374..6ca8982c4fa 100644 --- a/tests/ui/traits/next-solver/projection/param-env-trait-candidate-1.rs +++ b/tests/ui/traits/next-solver/projection/param-env-trait-candidate-1.rs @@ -1,5 +1,5 @@ -// check-pass -// compile-flags: -Znext-solver +//@ check-pass +//@ compile-flags: -Znext-solver // See https://github.com/rust-lang/trait-system-refactor-initiative/issues/1 // a minimization of a pattern in core. diff --git a/tests/ui/traits/next-solver/projection/param-env-trait-candidate-2.rs b/tests/ui/traits/next-solver/projection/param-env-trait-candidate-2.rs index db8dc1eb9be..874372918de 100644 --- a/tests/ui/traits/next-solver/projection/param-env-trait-candidate-2.rs +++ b/tests/ui/traits/next-solver/projection/param-env-trait-candidate-2.rs @@ -1,5 +1,5 @@ -// check-pass -// compile-flags: -Znext-solver +//@ check-pass +//@ compile-flags: -Znext-solver // See https://github.com/rust-lang/trait-system-refactor-initiative/issues/1, // a minimization of a pattern in core. diff --git a/tests/ui/traits/next-solver/slice-match-byte-lit.rs b/tests/ui/traits/next-solver/slice-match-byte-lit.rs index 1edc9f1e8e9..9416f734b2d 100644 --- a/tests/ui/traits/next-solver/slice-match-byte-lit.rs +++ b/tests/ui/traits/next-solver/slice-match-byte-lit.rs @@ -1,5 +1,5 @@ -// compile-flags: -Znext-solver -// check-pass +//@ compile-flags: -Znext-solver +//@ check-pass fn test(s: &[u8]) { match &s[0..3] { diff --git a/tests/ui/traits/next-solver/specialization-transmute.rs b/tests/ui/traits/next-solver/specialization-transmute.rs index 9b35a267743..41c90322011 100644 --- a/tests/ui/traits/next-solver/specialization-transmute.rs +++ b/tests/ui/traits/next-solver/specialization-transmute.rs @@ -1,4 +1,4 @@ -// compile-flags: -Znext-solver +//@ compile-flags: -Znext-solver //~^ ERROR cannot normalize `::Id: '_` #![feature(specialization)] diff --git a/tests/ui/traits/next-solver/specialization-unconstrained.rs b/tests/ui/traits/next-solver/specialization-unconstrained.rs index 950fb1512bc..f4046fba20b 100644 --- a/tests/ui/traits/next-solver/specialization-unconstrained.rs +++ b/tests/ui/traits/next-solver/specialization-unconstrained.rs @@ -1,4 +1,4 @@ -// compile-flags: -Znext-solver +//@ compile-flags: -Znext-solver #![feature(specialization)] //~^ WARN the feature `specialization` is incomplete diff --git a/tests/ui/traits/next-solver/stall-num-var-auto-trait.rs b/tests/ui/traits/next-solver/stall-num-var-auto-trait.rs index f5bf985cdb2..4ca523ebc56 100644 --- a/tests/ui/traits/next-solver/stall-num-var-auto-trait.rs +++ b/tests/ui/traits/next-solver/stall-num-var-auto-trait.rs @@ -1,6 +1,6 @@ -// compile-flags: -Znext-solver -// revisions: fallback constrain -//[constrain] check-pass +//@ compile-flags: -Znext-solver +//@ revisions: fallback constrain +//@[constrain] check-pass // Tests that we stall the `{integer}: Foo` obligation until after we // constrain the int type (or fallback occurs). diff --git a/tests/ui/traits/next-solver/structural-resolve-field.rs b/tests/ui/traits/next-solver/structural-resolve-field.rs index b247e237534..21700bc3a00 100644 --- a/tests/ui/traits/next-solver/structural-resolve-field.rs +++ b/tests/ui/traits/next-solver/structural-resolve-field.rs @@ -1,5 +1,5 @@ -// compile-flags: -Znext-solver -// check-pass +//@ compile-flags: -Znext-solver +//@ check-pass #[derive(Default)] struct Foo { diff --git a/tests/ui/traits/next-solver/trait-upcast-lhs-needs-normalization.rs b/tests/ui/traits/next-solver/trait-upcast-lhs-needs-normalization.rs index 8e0378e94f0..ee6a7a0986d 100644 --- a/tests/ui/traits/next-solver/trait-upcast-lhs-needs-normalization.rs +++ b/tests/ui/traits/next-solver/trait-upcast-lhs-needs-normalization.rs @@ -1,5 +1,5 @@ -// check-pass -// compile-flags: -Znext-solver +//@ check-pass +//@ compile-flags: -Znext-solver #![feature(trait_upcasting)] pub trait A {} diff --git a/tests/ui/traits/next-solver/try-example.rs b/tests/ui/traits/next-solver/try-example.rs index 92b0b597881..b39bc247aab 100644 --- a/tests/ui/traits/next-solver/try-example.rs +++ b/tests/ui/traits/next-solver/try-example.rs @@ -1,5 +1,5 @@ -// check-pass -// compile-flags: -Znext-solver +//@ check-pass +//@ compile-flags: -Znext-solver use std::error::Error; diff --git a/tests/ui/traits/next-solver/two-projection-param-candidates-are-ambiguous.rs b/tests/ui/traits/next-solver/two-projection-param-candidates-are-ambiguous.rs index d25e372b5d8..40d68dbaffd 100644 --- a/tests/ui/traits/next-solver/two-projection-param-candidates-are-ambiguous.rs +++ b/tests/ui/traits/next-solver/two-projection-param-candidates-are-ambiguous.rs @@ -1,4 +1,4 @@ -// compile-flags: -Znext-solver +//@ compile-flags: -Znext-solver // When we're solving `::Assoc = i32`, we actually first solve // `::Assoc = ?1t`, then unify `?1t` with `i32`. That goal diff --git a/tests/ui/traits/next-solver/unevaluated-const-impl-trait-ref.rs b/tests/ui/traits/next-solver/unevaluated-const-impl-trait-ref.rs index 77a169d48de..8ed903f8925 100644 --- a/tests/ui/traits/next-solver/unevaluated-const-impl-trait-ref.rs +++ b/tests/ui/traits/next-solver/unevaluated-const-impl-trait-ref.rs @@ -1,6 +1,6 @@ -// compile-flags: -Znext-solver -// revisions: works fails -//[works] check-pass +//@ compile-flags: -Znext-solver +//@ revisions: works fails +//@[works] check-pass trait Trait {} diff --git a/tests/ui/traits/next-solver/unsafe-auto-trait-impl.rs b/tests/ui/traits/next-solver/unsafe-auto-trait-impl.rs index f66bf0b87ec..89e3600bbbe 100644 --- a/tests/ui/traits/next-solver/unsafe-auto-trait-impl.rs +++ b/tests/ui/traits/next-solver/unsafe-auto-trait-impl.rs @@ -1,5 +1,5 @@ -// compile-flags: -Znext-solver -// check-pass +//@ compile-flags: -Znext-solver +//@ check-pass struct Foo(*mut ()); diff --git a/tests/ui/traits/next-solver/unsize-although-ambiguous.rs b/tests/ui/traits/next-solver/unsize-although-ambiguous.rs index 8217701b9f8..c55632174ec 100644 --- a/tests/ui/traits/next-solver/unsize-although-ambiguous.rs +++ b/tests/ui/traits/next-solver/unsize-although-ambiguous.rs @@ -1,5 +1,5 @@ -// check-pass -// compile-flags: -Znext-solver +//@ check-pass +//@ compile-flags: -Znext-solver use std::fmt::Display; diff --git a/tests/ui/traits/next-solver/unsize-good.rs b/tests/ui/traits/next-solver/unsize-good.rs index 04ebe66f21c..4456e4f2188 100644 --- a/tests/ui/traits/next-solver/unsize-good.rs +++ b/tests/ui/traits/next-solver/unsize-good.rs @@ -1,5 +1,5 @@ -// compile-flags: -Znext-solver -// check-pass +//@ compile-flags: -Znext-solver +//@ check-pass #![feature(unsized_tuple_coercion)] diff --git a/tests/ui/traits/next-solver/unsound-region-obligation.rs b/tests/ui/traits/next-solver/unsound-region-obligation.rs index b8bfa035388..32a510d1654 100644 --- a/tests/ui/traits/next-solver/unsound-region-obligation.rs +++ b/tests/ui/traits/next-solver/unsound-region-obligation.rs @@ -1,5 +1,5 @@ //~ ERROR the type `<() as StaticTy>::Item<'a>` does not fulfill the required lifetime -// compile-flags: -Znext-solver +//@ compile-flags: -Znext-solver // Regression test for rust-lang/trait-system-refactor-initiative#59 trait StaticTy { diff --git a/tests/ui/traits/next-solver/upcast-right-substs.rs b/tests/ui/traits/next-solver/upcast-right-substs.rs index 5b4f6d4be0c..bbb8a039aa7 100644 --- a/tests/ui/traits/next-solver/upcast-right-substs.rs +++ b/tests/ui/traits/next-solver/upcast-right-substs.rs @@ -1,5 +1,5 @@ -// compile-flags: -Znext-solver -// check-pass +//@ compile-flags: -Znext-solver +//@ check-pass #![feature(trait_upcasting)] trait Foo: Bar + Bar {} diff --git a/tests/ui/traits/next-solver/upcast-wrong-substs.rs b/tests/ui/traits/next-solver/upcast-wrong-substs.rs index 0cd253007fc..473977c527c 100644 --- a/tests/ui/traits/next-solver/upcast-wrong-substs.rs +++ b/tests/ui/traits/next-solver/upcast-wrong-substs.rs @@ -1,4 +1,4 @@ -// compile-flags: -Znext-solver +//@ compile-flags: -Znext-solver trait Foo: Bar + Bar {} diff --git a/tests/ui/traits/next-solver/winnow-specializing-impls.rs b/tests/ui/traits/next-solver/winnow-specializing-impls.rs index d70a9159611..ec0351f404d 100644 --- a/tests/ui/traits/next-solver/winnow-specializing-impls.rs +++ b/tests/ui/traits/next-solver/winnow-specializing-impls.rs @@ -1,5 +1,5 @@ -// build-pass -// compile-flags: -Znext-solver +//@ build-pass +//@ compile-flags: -Znext-solver // Tests that the specializing impl `<() as Foo>` holds during codegen. diff --git a/tests/ui/traits/non-lifetime-via-dyn-builtin.rs b/tests/ui/traits/non-lifetime-via-dyn-builtin.rs index 996cd295dc4..26cf6105c50 100644 --- a/tests/ui/traits/non-lifetime-via-dyn-builtin.rs +++ b/tests/ui/traits/non-lifetime-via-dyn-builtin.rs @@ -1,6 +1,6 @@ -// revisions: current next -//[next] compile-flags: -Znext-solver -// check-pass +//@ revisions: current next +//@[next] compile-flags: -Znext-solver +//@ check-pass #![feature(non_lifetime_binders)] //~^ WARN the feature `non_lifetime_binders` is incomplete and may not be safe diff --git a/tests/ui/traits/non_lifetime_binders/basic.rs b/tests/ui/traits/non_lifetime_binders/basic.rs index a797aae65db..7e45b76434a 100644 --- a/tests/ui/traits/non_lifetime_binders/basic.rs +++ b/tests/ui/traits/non_lifetime_binders/basic.rs @@ -1,4 +1,4 @@ -// check-pass +//@ check-pass // Basic test that show's we can succesfully typeck a `for` where clause. #![feature(non_lifetime_binders)] diff --git a/tests/ui/traits/non_lifetime_binders/bounds-on-type-binders.rs b/tests/ui/traits/non_lifetime_binders/bounds-on-type-binders.rs index 2535eb99c59..b73b34549ad 100644 --- a/tests/ui/traits/non_lifetime_binders/bounds-on-type-binders.rs +++ b/tests/ui/traits/non_lifetime_binders/bounds-on-type-binders.rs @@ -1,4 +1,4 @@ -// check-fail +//@ check-fail #![allow(incomplete_features)] #![feature(non_lifetime_binders)] diff --git a/tests/ui/traits/non_lifetime_binders/disqualifying-object-candidates.rs b/tests/ui/traits/non_lifetime_binders/disqualifying-object-candidates.rs index b999f251d33..8202cf1e6ee 100644 --- a/tests/ui/traits/non_lifetime_binders/disqualifying-object-candidates.rs +++ b/tests/ui/traits/non_lifetime_binders/disqualifying-object-candidates.rs @@ -1,4 +1,4 @@ -// check-pass +//@ check-pass trait Foo { type Bar diff --git a/tests/ui/traits/non_lifetime_binders/drop-impl-pred.rs b/tests/ui/traits/non_lifetime_binders/drop-impl-pred.rs index c65b5ea9ba4..db8f3de2149 100644 --- a/tests/ui/traits/non_lifetime_binders/drop-impl-pred.rs +++ b/tests/ui/traits/non_lifetime_binders/drop-impl-pred.rs @@ -1,5 +1,5 @@ -// revisions: no yes -//[yes] check-pass +//@ revisions: no yes +//@[yes] check-pass // Issue 110557 diff --git a/tests/ui/traits/non_lifetime_binders/method-probe.rs b/tests/ui/traits/non_lifetime_binders/method-probe.rs index 8df240c2082..5f8e31446f5 100644 --- a/tests/ui/traits/non_lifetime_binders/method-probe.rs +++ b/tests/ui/traits/non_lifetime_binders/method-probe.rs @@ -1,4 +1,4 @@ -// check-pass +//@ check-pass #![feature(non_lifetime_binders)] //~^ WARN the feature `non_lifetime_binders` is incomplete diff --git a/tests/ui/traits/non_lifetime_binders/object-lifetime-default-for-late.rs b/tests/ui/traits/non_lifetime_binders/object-lifetime-default-for-late.rs index 9830241c377..e776d5f2f21 100644 --- a/tests/ui/traits/non_lifetime_binders/object-lifetime-default-for-late.rs +++ b/tests/ui/traits/non_lifetime_binders/object-lifetime-default-for-late.rs @@ -1,5 +1,5 @@ -// check-pass -// compile-flags: --crate-type=lib +//@ check-pass +//@ compile-flags: --crate-type=lib #![feature(non_lifetime_binders)] //~^ WARN the feature `non_lifetime_binders` is incomplete diff --git a/tests/ui/traits/non_lifetime_binders/on-rpit.rs b/tests/ui/traits/non_lifetime_binders/on-rpit.rs index c501e057e28..4d1cacb1890 100644 --- a/tests/ui/traits/non_lifetime_binders/on-rpit.rs +++ b/tests/ui/traits/non_lifetime_binders/on-rpit.rs @@ -1,4 +1,4 @@ -// check-pass +//@ check-pass #![feature(non_lifetime_binders)] //~^ WARN the feature `non_lifetime_binders` is incomplete diff --git a/tests/ui/traits/non_lifetime_binders/placeholders-dont-outlive-static.rs b/tests/ui/traits/non_lifetime_binders/placeholders-dont-outlive-static.rs index ae6866511e2..e87863ab251 100644 --- a/tests/ui/traits/non_lifetime_binders/placeholders-dont-outlive-static.rs +++ b/tests/ui/traits/non_lifetime_binders/placeholders-dont-outlive-static.rs @@ -1,6 +1,6 @@ -// revisions: good bad +//@ revisions: good bad -//[good] known-bug: unknown +//@[good] known-bug: unknown // `for T: 'static` doesn't imply itself when processing outlives obligations #![feature(non_lifetime_binders)] diff --git a/tests/ui/traits/non_lifetime_binders/sized-late-bound-issue-114872.rs b/tests/ui/traits/non_lifetime_binders/sized-late-bound-issue-114872.rs index ba55ab07185..e4c3b4d2c78 100644 --- a/tests/ui/traits/non_lifetime_binders/sized-late-bound-issue-114872.rs +++ b/tests/ui/traits/non_lifetime_binders/sized-late-bound-issue-114872.rs @@ -1,4 +1,4 @@ -// check-pass +//@ check-pass #![feature(non_lifetime_binders)] //~^ WARN is incomplete and may not be safe diff --git a/tests/ui/traits/non_lifetime_binders/type-match-with-late-bound.rs b/tests/ui/traits/non_lifetime_binders/type-match-with-late-bound.rs index 53957914e3a..37bb3cea34e 100644 --- a/tests/ui/traits/non_lifetime_binders/type-match-with-late-bound.rs +++ b/tests/ui/traits/non_lifetime_binders/type-match-with-late-bound.rs @@ -1,5 +1,5 @@ -// edition:2021 -// known-bug: unknown +//@ edition:2021 +//@ known-bug: unknown // Checks that test_type_match code doesn't ICE when predicates have late-bound types diff --git a/tests/ui/traits/non_lifetime_binders/unifying-placeholders-in-query-response-2.rs b/tests/ui/traits/non_lifetime_binders/unifying-placeholders-in-query-response-2.rs index bbf1a1f72db..0749cbe1140 100644 --- a/tests/ui/traits/non_lifetime_binders/unifying-placeholders-in-query-response-2.rs +++ b/tests/ui/traits/non_lifetime_binders/unifying-placeholders-in-query-response-2.rs @@ -1,6 +1,6 @@ -// revisions: current next -//[next] compile-flags: -Znext-solver -// check-pass +//@ revisions: current next +//@[next] compile-flags: -Znext-solver +//@ check-pass #![feature(non_lifetime_binders)] //~^ WARN the feature `non_lifetime_binders` is incomplete diff --git a/tests/ui/traits/non_lifetime_binders/unifying-placeholders-in-query-response.rs b/tests/ui/traits/non_lifetime_binders/unifying-placeholders-in-query-response.rs index 5e28a2ba8b9..333f4f80386 100644 --- a/tests/ui/traits/non_lifetime_binders/unifying-placeholders-in-query-response.rs +++ b/tests/ui/traits/non_lifetime_binders/unifying-placeholders-in-query-response.rs @@ -1,6 +1,6 @@ -// revisions: current next -//[next] compile-flags: -Znext-solver -// check-pass +//@ revisions: current next +//@[next] compile-flags: -Znext-solver +//@ check-pass #![feature(non_lifetime_binders)] //~^ WARN the feature `non_lifetime_binders` is incomplete diff --git a/tests/ui/traits/normalize-supertrait.rs b/tests/ui/traits/normalize-supertrait.rs index 021a93eacff..1ab2b8ecfc1 100644 --- a/tests/ui/traits/normalize-supertrait.rs +++ b/tests/ui/traits/normalize-supertrait.rs @@ -3,7 +3,7 @@ // requires us to normalize the `Base<<() as Proj>::S>` to `Base<()>` when // comparing the supertrait `Derived<()>` to the expected trait. -// build-pass +//@ build-pass trait Proj { type S; diff --git a/tests/ui/traits/object-one-type-two-traits.rs b/tests/ui/traits/object-one-type-two-traits.rs index 86a2094eee0..28f994205d6 100644 --- a/tests/ui/traits/object-one-type-two-traits.rs +++ b/tests/ui/traits/object-one-type-two-traits.rs @@ -1,4 +1,4 @@ -// run-pass +//@ run-pass #![allow(dead_code)] #![allow(unused_variables)] // Testing creating two vtables with the same self type, but different diff --git a/tests/ui/traits/object/auto-dedup.rs b/tests/ui/traits/object/auto-dedup.rs index 39d25eb7fe0..732a504e750 100644 --- a/tests/ui/traits/object/auto-dedup.rs +++ b/tests/ui/traits/object/auto-dedup.rs @@ -1,4 +1,4 @@ -// run-pass +//@ run-pass #![allow(unused_assignments)] diff --git a/tests/ui/traits/object/bounds-cycle-1.rs b/tests/ui/traits/object/bounds-cycle-1.rs index 3146764927c..4f2e74cc1b0 100644 --- a/tests/ui/traits/object/bounds-cycle-1.rs +++ b/tests/ui/traits/object/bounds-cycle-1.rs @@ -1,7 +1,7 @@ // Check that we don't have a cycle when we try to normalize `Self::U` in the // bound below. -// check-pass +//@ check-pass trait Is { type T; diff --git a/tests/ui/traits/object/bounds-cycle-2.rs b/tests/ui/traits/object/bounds-cycle-2.rs index 4c1df38058d..b5d11955f1a 100644 --- a/tests/ui/traits/object/bounds-cycle-2.rs +++ b/tests/ui/traits/object/bounds-cycle-2.rs @@ -1,7 +1,7 @@ // Check that we don't have a cycle when we try to normalize `Self::V` in the // bound below. -// check-pass +//@ check-pass trait Is { type T; diff --git a/tests/ui/traits/object/bounds-cycle-3.rs b/tests/ui/traits/object/bounds-cycle-3.rs index 55726a5ae45..1e45f953553 100644 --- a/tests/ui/traits/object/bounds-cycle-3.rs +++ b/tests/ui/traits/object/bounds-cycle-3.rs @@ -1,7 +1,7 @@ // Check that we don't have a cycle when we try to normalize `Self::V` in the // bound below. -// check-pass +//@ check-pass trait Is { type T; diff --git a/tests/ui/traits/object/bounds-cycle-4.rs b/tests/ui/traits/object/bounds-cycle-4.rs index f83cb75c7f2..4fbeaa757ca 100644 --- a/tests/ui/traits/object/bounds-cycle-4.rs +++ b/tests/ui/traits/object/bounds-cycle-4.rs @@ -1,7 +1,7 @@ // Check that we don't have a cycle when we try to normalize `Self::U` in the // bound below. Make sure that having a lifetime on the trait object doesn't break things -// check-pass +//@ check-pass trait Is { type T; diff --git a/tests/ui/traits/object/exclusion.rs b/tests/ui/traits/object/exclusion.rs index 3abd3bbfccf..1f3432aecb8 100644 --- a/tests/ui/traits/object/exclusion.rs +++ b/tests/ui/traits/object/exclusion.rs @@ -1,4 +1,4 @@ -// run-pass +//@ run-pass trait Future: 'static { // The requirement for Self: Sized must prevent instantiation of // Future::forget in vtables, otherwise there's an infinite type diff --git a/tests/ui/traits/object/generics.rs b/tests/ui/traits/object/generics.rs index e2e70d43ab8..462b0bc5bb7 100644 --- a/tests/ui/traits/object/generics.rs +++ b/tests/ui/traits/object/generics.rs @@ -1,4 +1,4 @@ -// run-pass +//@ run-pass // test for #8664 use std::marker; diff --git a/tests/ui/traits/object/issue-33140-traitobject-crate.rs b/tests/ui/traits/object/issue-33140-traitobject-crate.rs index 8abd92da362..00ef6430d63 100644 --- a/tests/ui/traits/object/issue-33140-traitobject-crate.rs +++ b/tests/ui/traits/object/issue-33140-traitobject-crate.rs @@ -1,4 +1,4 @@ -// check-pass +//@ check-pass #![warn(order_dependent_trait_objects)] #![allow(dyn_drop)] diff --git a/tests/ui/traits/object/lifetime-first.rs b/tests/ui/traits/object/lifetime-first.rs index 33757cb7c0a..867ee08f48c 100644 --- a/tests/ui/traits/object/lifetime-first.rs +++ b/tests/ui/traits/object/lifetime-first.rs @@ -1,4 +1,4 @@ -// run-pass +//@ run-pass use std::fmt::Display; static BYTE: u8 = 33; diff --git a/tests/ui/traits/object/print_vtable_sizes.rs b/tests/ui/traits/object/print_vtable_sizes.rs index f510608537a..684458d079e 100644 --- a/tests/ui/traits/object/print_vtable_sizes.rs +++ b/tests/ui/traits/object/print_vtable_sizes.rs @@ -1,5 +1,5 @@ -// check-pass -// compile-flags: -Z print-vtable-sizes +//@ check-pass +//@ compile-flags: -Z print-vtable-sizes #![crate_type = "lib"] trait A: AsRef<[T::V]> + AsMut<[T::V]> {} diff --git a/tests/ui/traits/object/with-lifetime-bound.rs b/tests/ui/traits/object/with-lifetime-bound.rs index 05aab5e3b08..9053d2f7494 100644 --- a/tests/ui/traits/object/with-lifetime-bound.rs +++ b/tests/ui/traits/object/with-lifetime-bound.rs @@ -1,4 +1,4 @@ -// run-pass +//@ run-pass // Uncovered during work on new scoping rules for safe destructors // as an important use case to support properly. diff --git a/tests/ui/traits/object/with-self-in-projection-output-good.rs b/tests/ui/traits/object/with-self-in-projection-output-good.rs index d1b7bf6c2d7..30909e7493c 100644 --- a/tests/ui/traits/object/with-self-in-projection-output-good.rs +++ b/tests/ui/traits/object/with-self-in-projection-output-good.rs @@ -1,4 +1,4 @@ -// build-pass (FIXME(62277): could be check-pass?) +//@ build-pass (FIXME(62277): could be check-pass?) // Regression test related to #56288. Check that a supertrait projection (of // `Output`) that references `Self` can be ok if it is referencing a projection (of diff --git a/tests/ui/traits/object/with-self-in-projection-output-repeated-supertrait.rs b/tests/ui/traits/object/with-self-in-projection-output-repeated-supertrait.rs index 39e817168f6..2d823097332 100644 --- a/tests/ui/traits/object/with-self-in-projection-output-repeated-supertrait.rs +++ b/tests/ui/traits/object/with-self-in-projection-output-repeated-supertrait.rs @@ -1,4 +1,4 @@ -// build-pass (FIXME(62277): could be check-pass?) +//@ build-pass (FIXME(62277): could be check-pass?) // FIXME(eddyb) shorten the name so windows doesn't choke on it. #![crate_name = "trait_test"] diff --git a/tests/ui/traits/objects-owned-object-borrowed-method-headerless.rs b/tests/ui/traits/objects-owned-object-borrowed-method-headerless.rs index fce1341fc74..ec1c5822273 100644 --- a/tests/ui/traits/objects-owned-object-borrowed-method-headerless.rs +++ b/tests/ui/traits/objects-owned-object-borrowed-method-headerless.rs @@ -1,4 +1,4 @@ -// run-pass +//@ run-pass // Test invoked `&self` methods on owned objects where the values // closed over do not contain managed values, and thus the boxes do // not have headers. diff --git a/tests/ui/traits/operator-overloading-issue-52025.rs b/tests/ui/traits/operator-overloading-issue-52025.rs index 7ce638832b0..48e2d5e0386 100644 --- a/tests/ui/traits/operator-overloading-issue-52025.rs +++ b/tests/ui/traits/operator-overloading-issue-52025.rs @@ -1,5 +1,5 @@ -// only-x86_64 -// build-pass +//@ only-x86_64 +//@ build-pass use std::arch::x86_64::*; use std::fmt::Debug; diff --git a/tests/ui/traits/overlap-permitted-for-marker-traits.rs b/tests/ui/traits/overlap-permitted-for-marker-traits.rs index 00823d13b36..c05e5fddae6 100644 --- a/tests/ui/traits/overlap-permitted-for-marker-traits.rs +++ b/tests/ui/traits/overlap-permitted-for-marker-traits.rs @@ -1,4 +1,4 @@ -// run-pass +//@ run-pass // Tests for RFC 1268: we allow overlapping impls of marker traits, // that is, traits without items. In this case, a type `T` is // `MyMarker` if it is either `Debug` or `Display`. diff --git a/tests/ui/traits/parameterized-with-bounds.rs b/tests/ui/traits/parameterized-with-bounds.rs index 832d4f6c89f..2de9bf3d04c 100644 --- a/tests/ui/traits/parameterized-with-bounds.rs +++ b/tests/ui/traits/parameterized-with-bounds.rs @@ -1,5 +1,5 @@ -// run-pass -// pretty-expanded FIXME #23616 +//@ run-pass +//@ pretty-expanded FIXME #23616 #![allow(dead_code)] diff --git a/tests/ui/traits/pointee-deduction.rs b/tests/ui/traits/pointee-deduction.rs index 82e3aa1ae89..541daf23087 100644 --- a/tests/ui/traits/pointee-deduction.rs +++ b/tests/ui/traits/pointee-deduction.rs @@ -1,4 +1,4 @@ -// run-pass +//@ run-pass #![feature(ptr_metadata)] diff --git a/tests/ui/traits/pointee-normalize-equate.rs b/tests/ui/traits/pointee-normalize-equate.rs index 2e75933aca0..3edb010a827 100644 --- a/tests/ui/traits/pointee-normalize-equate.rs +++ b/tests/ui/traits/pointee-normalize-equate.rs @@ -1,6 +1,6 @@ -// check-pass -// revisions: old next -//[next] compile-flags: -Znext-solver +//@ check-pass +//@ revisions: old next +//@[next] compile-flags: -Znext-solver #![feature(ptr_metadata)] diff --git a/tests/ui/traits/pointee-tail-is-generic-errors.rs b/tests/ui/traits/pointee-tail-is-generic-errors.rs index 28bc1da964d..92a83f40b18 100644 --- a/tests/ui/traits/pointee-tail-is-generic-errors.rs +++ b/tests/ui/traits/pointee-tail-is-generic-errors.rs @@ -1,4 +1,4 @@ -// edition:2018 +//@ edition:2018 #![feature(ptr_metadata)] #![feature(type_alias_impl_trait)] diff --git a/tests/ui/traits/pointee-tail-is-generic.rs b/tests/ui/traits/pointee-tail-is-generic.rs index e0da0fc3861..e33b2b2f2bc 100644 --- a/tests/ui/traits/pointee-tail-is-generic.rs +++ b/tests/ui/traits/pointee-tail-is-generic.rs @@ -1,5 +1,5 @@ -// check-pass -// edition:2018 +//@ check-pass +//@ edition:2018 #![feature(ptr_metadata)] #![feature(type_alias_impl_trait)] diff --git a/tests/ui/traits/principal-less-objects.rs b/tests/ui/traits/principal-less-objects.rs index 5fe01efa4f8..e56f23ab5a2 100644 --- a/tests/ui/traits/principal-less-objects.rs +++ b/tests/ui/traits/principal-less-objects.rs @@ -1,4 +1,4 @@ -// run-pass +//@ run-pass // Check that trait objects without a principal codegen properly. use std::sync::atomic::{AtomicUsize, Ordering}; diff --git a/tests/ui/traits/privacy.rs b/tests/ui/traits/privacy.rs index 17a2e05e99f..98e9509645d 100644 --- a/tests/ui/traits/privacy.rs +++ b/tests/ui/traits/privacy.rs @@ -1,4 +1,4 @@ -// build-pass (FIXME(62277): could be check-pass?) +//@ build-pass (FIXME(62277): could be check-pass?) #![allow(dead_code)] mod foo { pub use self::bar::T; diff --git a/tests/ui/traits/project-modulo-regions.rs b/tests/ui/traits/project-modulo-regions.rs index e88f21ecfe8..3af5fbc7ea7 100644 --- a/tests/ui/traits/project-modulo-regions.rs +++ b/tests/ui/traits/project-modulo-regions.rs @@ -1,4 +1,4 @@ -// revisions: with_clause without_clause +//@ revisions: with_clause without_clause // Tests that `EvaluatedToOkModuloRegions` from a projection sub-obligation // is correctly propagated diff --git a/tests/ui/traits/region-pointer-simple.rs b/tests/ui/traits/region-pointer-simple.rs index 0456ca93115..718950388a2 100644 --- a/tests/ui/traits/region-pointer-simple.rs +++ b/tests/ui/traits/region-pointer-simple.rs @@ -1,4 +1,4 @@ -// run-pass +//@ run-pass trait Foo { fn f(&self) -> isize; } diff --git a/tests/ui/traits/reservation-impl/coherence-conflict.rs b/tests/ui/traits/reservation-impl/coherence-conflict.rs index cdea162d64a..558793c25f3 100644 --- a/tests/ui/traits/reservation-impl/coherence-conflict.rs +++ b/tests/ui/traits/reservation-impl/coherence-conflict.rs @@ -1,6 +1,6 @@ // check that reservation impls are accounted for in negative reasoning. -// revisions: old next -//[next] compile-flags: -Znext-solver +//@ revisions: old next +//@[next] compile-flags: -Znext-solver #![feature(rustc_attrs)] trait MyTrait {} diff --git a/tests/ui/traits/reservation-impl/no-use.rs b/tests/ui/traits/reservation-impl/no-use.rs index 10aad3605ea..b470a2815c0 100644 --- a/tests/ui/traits/reservation-impl/no-use.rs +++ b/tests/ui/traits/reservation-impl/no-use.rs @@ -1,6 +1,6 @@ // check that reservation impls can't be used as normal impls in positive reasoning. -// revisions: old next -//[next] compile-flags: -Znext-solver +//@ revisions: old next +//@[next] compile-flags: -Znext-solver #![feature(rustc_attrs)] trait MyTrait { fn foo(&self); } diff --git a/tests/ui/traits/reservation-impl/non-lattice-ok.rs b/tests/ui/traits/reservation-impl/non-lattice-ok.rs index 9a3c2b4f991..32d610bf915 100644 --- a/tests/ui/traits/reservation-impl/non-lattice-ok.rs +++ b/tests/ui/traits/reservation-impl/non-lattice-ok.rs @@ -1,4 +1,4 @@ -// build-pass +//@ build-pass // Check that a reservation impl does not force other impls to follow // a lattice discipline. @@ -33,8 +33,8 @@ // check that reservation impls can't be used as normal impls in positive reasoning. -// revisions: old next -//[next] compile-flags: -Znext-solver +//@ revisions: old next +//@[next] compile-flags: -Znext-solver #![feature(rustc_attrs, never_type)] diff --git a/tests/ui/traits/reservation-impl/ok.rs b/tests/ui/traits/reservation-impl/ok.rs index 2d945f6adeb..cf68c1b2e96 100644 --- a/tests/ui/traits/reservation-impl/ok.rs +++ b/tests/ui/traits/reservation-impl/ok.rs @@ -1,10 +1,10 @@ -// run-pass +//@ run-pass // rpass test for reservation impls. Not 100% required because `From` uses them, // but still. -// revisions: old next -//[next] compile-flags: -Znext-solver +//@ revisions: old next +//@[next] compile-flags: -Znext-solver #![feature(rustc_attrs)] diff --git a/tests/ui/traits/safety-ok-cc.rs b/tests/ui/traits/safety-ok-cc.rs index 099ba80e5b5..fe65ea9d2d7 100644 --- a/tests/ui/traits/safety-ok-cc.rs +++ b/tests/ui/traits/safety-ok-cc.rs @@ -1,5 +1,5 @@ -// run-pass -// aux-build:trait_safety_lib.rs +//@ run-pass +//@ aux-build:trait_safety_lib.rs // Simple smoke test that unsafe traits can be compiled across crates. diff --git a/tests/ui/traits/safety-ok.rs b/tests/ui/traits/safety-ok.rs index d456a78b64d..432ffb40362 100644 --- a/tests/ui/traits/safety-ok.rs +++ b/tests/ui/traits/safety-ok.rs @@ -1,4 +1,4 @@ -// run-pass +//@ run-pass // Simple smoke test that unsafe traits can be compiled etc. diff --git a/tests/ui/traits/safety-trait-impl-cc.rs b/tests/ui/traits/safety-trait-impl-cc.rs index 6f125e5f950..9099cf24a16 100644 --- a/tests/ui/traits/safety-trait-impl-cc.rs +++ b/tests/ui/traits/safety-trait-impl-cc.rs @@ -1,4 +1,4 @@ -// aux-build:trait_safety_lib.rs +//@ aux-build:trait_safety_lib.rs // Check that unsafe traits require unsafe impls and that inherent // impls cannot be unsafe. diff --git a/tests/ui/traits/solver-cycles/inductive-canonical-cycle.rs b/tests/ui/traits/solver-cycles/inductive-canonical-cycle.rs index 5449f5f00d5..f644728ee11 100644 --- a/tests/ui/traits/solver-cycles/inductive-canonical-cycle.rs +++ b/tests/ui/traits/solver-cycles/inductive-canonical-cycle.rs @@ -1,4 +1,4 @@ -// check-pass +//@ check-pass // This test checks that we're correctly dealing with inductive cycles // with canonical inference variables. diff --git a/tests/ui/traits/static-method-overwriting.rs b/tests/ui/traits/static-method-overwriting.rs index f669ffae6bb..7a2a51a4b99 100644 --- a/tests/ui/traits/static-method-overwriting.rs +++ b/tests/ui/traits/static-method-overwriting.rs @@ -1,4 +1,4 @@ -// run-pass +//@ run-pass #![allow(dead_code)] mod base { pub trait HasNew { diff --git a/tests/ui/traits/static-outlives-a-where-clause.rs b/tests/ui/traits/static-outlives-a-where-clause.rs index f0c2c1082b0..c3db2eb8351 100644 --- a/tests/ui/traits/static-outlives-a-where-clause.rs +++ b/tests/ui/traits/static-outlives-a-where-clause.rs @@ -1,4 +1,4 @@ -// run-pass +//@ run-pass trait Foo<'a> { fn xyz(self); diff --git a/tests/ui/traits/suggest-dereferences/issue-39029.fixed b/tests/ui/traits/suggest-dereferences/issue-39029.fixed index a1abf668b8b..0e37a2f73a1 100644 --- a/tests/ui/traits/suggest-dereferences/issue-39029.fixed +++ b/tests/ui/traits/suggest-dereferences/issue-39029.fixed @@ -1,4 +1,4 @@ -// run-rustfix +//@ run-rustfix use std::net::TcpListener; struct NoToSocketAddrs(String); diff --git a/tests/ui/traits/suggest-dereferences/issue-39029.rs b/tests/ui/traits/suggest-dereferences/issue-39029.rs index 90d097105ed..71ddad93a93 100644 --- a/tests/ui/traits/suggest-dereferences/issue-39029.rs +++ b/tests/ui/traits/suggest-dereferences/issue-39029.rs @@ -1,4 +1,4 @@ -// run-rustfix +//@ run-rustfix use std::net::TcpListener; struct NoToSocketAddrs(String); diff --git a/tests/ui/traits/suggest-dereferences/issue-62530.fixed b/tests/ui/traits/suggest-dereferences/issue-62530.fixed index 406caaa007f..0f011638ead 100644 --- a/tests/ui/traits/suggest-dereferences/issue-62530.fixed +++ b/tests/ui/traits/suggest-dereferences/issue-62530.fixed @@ -1,4 +1,4 @@ -// run-rustfix +//@ run-rustfix fn takes_str(_x: &str) {} fn takes_type_parameter(_x: T) where T: SomeTrait {} diff --git a/tests/ui/traits/suggest-dereferences/issue-62530.rs b/tests/ui/traits/suggest-dereferences/issue-62530.rs index 53846be7306..4367bd1aeca 100644 --- a/tests/ui/traits/suggest-dereferences/issue-62530.rs +++ b/tests/ui/traits/suggest-dereferences/issue-62530.rs @@ -1,4 +1,4 @@ -// run-rustfix +//@ run-rustfix fn takes_str(_x: &str) {} fn takes_type_parameter(_x: T) where T: SomeTrait {} diff --git a/tests/ui/traits/suggest-dereferences/multiple-0.fixed b/tests/ui/traits/suggest-dereferences/multiple-0.fixed index b7160b75c60..acc55caabd6 100644 --- a/tests/ui/traits/suggest-dereferences/multiple-0.fixed +++ b/tests/ui/traits/suggest-dereferences/multiple-0.fixed @@ -1,4 +1,4 @@ -// run-rustfix +//@ run-rustfix use std::ops::Deref; trait Happy {} diff --git a/tests/ui/traits/suggest-dereferences/multiple-0.rs b/tests/ui/traits/suggest-dereferences/multiple-0.rs index 9ac55177ffa..f2ea6114561 100644 --- a/tests/ui/traits/suggest-dereferences/multiple-0.rs +++ b/tests/ui/traits/suggest-dereferences/multiple-0.rs @@ -1,4 +1,4 @@ -// run-rustfix +//@ run-rustfix use std::ops::Deref; trait Happy {} diff --git a/tests/ui/traits/suggest-dereferences/root-obligation.fixed b/tests/ui/traits/suggest-dereferences/root-obligation.fixed index d03d733c76d..eecd52304ff 100644 --- a/tests/ui/traits/suggest-dereferences/root-obligation.fixed +++ b/tests/ui/traits/suggest-dereferences/root-obligation.fixed @@ -1,4 +1,4 @@ -// run-rustfix +//@ run-rustfix fn get_vowel_count(string: &str) -> usize { string diff --git a/tests/ui/traits/suggest-dereferences/root-obligation.rs b/tests/ui/traits/suggest-dereferences/root-obligation.rs index 9d9ffb3f55e..d58193f1213 100644 --- a/tests/ui/traits/suggest-dereferences/root-obligation.rs +++ b/tests/ui/traits/suggest-dereferences/root-obligation.rs @@ -1,4 +1,4 @@ -// run-rustfix +//@ run-rustfix fn get_vowel_count(string: &str) -> usize { string diff --git a/tests/ui/traits/suggest-dereferences/suggest-dereferencing-receiver-argument.fixed b/tests/ui/traits/suggest-dereferences/suggest-dereferencing-receiver-argument.fixed index ea3d1bf853a..03cc6580d5e 100644 --- a/tests/ui/traits/suggest-dereferences/suggest-dereferencing-receiver-argument.fixed +++ b/tests/ui/traits/suggest-dereferences/suggest-dereferencing-receiver-argument.fixed @@ -1,4 +1,4 @@ -// run-rustfix +//@ run-rustfix struct TargetStruct; diff --git a/tests/ui/traits/suggest-dereferences/suggest-dereferencing-receiver-argument.rs b/tests/ui/traits/suggest-dereferences/suggest-dereferencing-receiver-argument.rs index 9eda68027b2..9397f46a434 100644 --- a/tests/ui/traits/suggest-dereferences/suggest-dereferencing-receiver-argument.rs +++ b/tests/ui/traits/suggest-dereferences/suggest-dereferencing-receiver-argument.rs @@ -1,4 +1,4 @@ -// run-rustfix +//@ run-rustfix struct TargetStruct; diff --git a/tests/ui/traits/suggest-fully-qualified-closure.rs b/tests/ui/traits/suggest-fully-qualified-closure.rs index 6bbb6a95d7d..f401a3012da 100644 --- a/tests/ui/traits/suggest-fully-qualified-closure.rs +++ b/tests/ui/traits/suggest-fully-qualified-closure.rs @@ -1,7 +1,7 @@ -// check-fail -// known-bug: #103705 -// normalize-stderr-test "\{closure@.*\}" -> "{closure@}" -// normalize-stderr-test "\+* ~" -> "+++ ~" +//@ check-fail +//@ known-bug: #103705 +//@ normalize-stderr-test "\{closure@.*\}" -> "{closure@}" +//@ normalize-stderr-test "\+* ~" -> "+++ ~" // The output of this currently suggests writing a closure in the qualified path. diff --git a/tests/ui/traits/superdefault-generics.rs b/tests/ui/traits/superdefault-generics.rs index e862c0e976b..f3cf4a16df1 100644 --- a/tests/ui/traits/superdefault-generics.rs +++ b/tests/ui/traits/superdefault-generics.rs @@ -1,4 +1,4 @@ -// run-pass +//@ run-pass #![allow(dead_code)] #![allow(non_snake_case)] diff --git a/tests/ui/traits/syntax-polarity.rs b/tests/ui/traits/syntax-polarity.rs index c809f9e89f9..80ad40bad80 100644 --- a/tests/ui/traits/syntax-polarity.rs +++ b/tests/ui/traits/syntax-polarity.rs @@ -1,6 +1,6 @@ -// run-pass +//@ run-pass #![allow(dead_code)] -// pretty-expanded FIXME #23616 +//@ pretty-expanded FIXME #23616 #![feature(negative_impls)] diff --git a/tests/ui/traits/to-str.rs b/tests/ui/traits/to-str.rs index 9670edbfa2b..683edf05551 100644 --- a/tests/ui/traits/to-str.rs +++ b/tests/ui/traits/to-str.rs @@ -1,4 +1,4 @@ -// run-pass +//@ run-pass #![allow(non_camel_case_types)] diff --git a/tests/ui/traits/trait-upcasting/add-supertrait-auto-traits.rs b/tests/ui/traits/trait-upcasting/add-supertrait-auto-traits.rs index 7e242ed9126..5983b13185f 100644 --- a/tests/ui/traits/trait-upcasting/add-supertrait-auto-traits.rs +++ b/tests/ui/traits/trait-upcasting/add-supertrait-auto-traits.rs @@ -1,6 +1,6 @@ -// check-pass -// revisions: current next -//[next] compile-flags: -Znext-solver +//@ check-pass +//@ revisions: current next +//@[next] compile-flags: -Znext-solver #![feature(trait_upcasting)] diff --git a/tests/ui/traits/trait-upcasting/basic.rs b/tests/ui/traits/trait-upcasting/basic.rs index 570ec5160bf..9b9669565ba 100644 --- a/tests/ui/traits/trait-upcasting/basic.rs +++ b/tests/ui/traits/trait-upcasting/basic.rs @@ -1,4 +1,4 @@ -// run-pass +//@ run-pass #![feature(trait_upcasting)] diff --git a/tests/ui/traits/trait-upcasting/correct-supertrait-substitution.rs b/tests/ui/traits/trait-upcasting/correct-supertrait-substitution.rs index eae5cf8d58d..7f4343dbd2f 100644 --- a/tests/ui/traits/trait-upcasting/correct-supertrait-substitution.rs +++ b/tests/ui/traits/trait-upcasting/correct-supertrait-substitution.rs @@ -1,4 +1,4 @@ -// run-pass +//@ run-pass #![feature(trait_upcasting)] trait Foo: Bar + Bar {} diff --git a/tests/ui/traits/trait-upcasting/diamond.rs b/tests/ui/traits/trait-upcasting/diamond.rs index a4f81c464b4..303c99b67bd 100644 --- a/tests/ui/traits/trait-upcasting/diamond.rs +++ b/tests/ui/traits/trait-upcasting/diamond.rs @@ -1,4 +1,4 @@ -// run-pass +//@ run-pass #![feature(trait_upcasting)] diff --git a/tests/ui/traits/trait-upcasting/fewer-associated.rs b/tests/ui/traits/trait-upcasting/fewer-associated.rs index 58e72d9d7ef..214293b0840 100644 --- a/tests/ui/traits/trait-upcasting/fewer-associated.rs +++ b/tests/ui/traits/trait-upcasting/fewer-associated.rs @@ -1,7 +1,7 @@ -// check-pass +//@ check-pass // issue: 114035 -// revisions: current next -//[next] compile-flags: -Znext-solver +//@ revisions: current next +//@[next] compile-flags: -Znext-solver #![feature(trait_upcasting)] diff --git a/tests/ui/traits/trait-upcasting/illegal-upcast-from-impl.rs b/tests/ui/traits/trait-upcasting/illegal-upcast-from-impl.rs index ffed8beb448..2f15d343f9f 100644 --- a/tests/ui/traits/trait-upcasting/illegal-upcast-from-impl.rs +++ b/tests/ui/traits/trait-upcasting/illegal-upcast-from-impl.rs @@ -1,5 +1,5 @@ -// revisions: current next -//[next] compile-flags: -Znext-solver +//@ revisions: current next +//@[next] compile-flags: -Znext-solver #![feature(trait_upcasting)] diff --git a/tests/ui/traits/trait-upcasting/issue-11515-upcast-fn_mut-fn.rs b/tests/ui/traits/trait-upcasting/issue-11515-upcast-fn_mut-fn.rs index b672963ae98..ef3d366c381 100644 --- a/tests/ui/traits/trait-upcasting/issue-11515-upcast-fn_mut-fn.rs +++ b/tests/ui/traits/trait-upcasting/issue-11515-upcast-fn_mut-fn.rs @@ -1,4 +1,4 @@ -// run-pass +//@ run-pass #![feature(trait_upcasting)] struct Test { diff --git a/tests/ui/traits/trait-upcasting/issue-11515.rs b/tests/ui/traits/trait-upcasting/issue-11515.rs index 31ea2fb353c..174be31d139 100644 --- a/tests/ui/traits/trait-upcasting/issue-11515.rs +++ b/tests/ui/traits/trait-upcasting/issue-11515.rs @@ -1,5 +1,5 @@ -// revisions: current next -//[next] compile-flags: -Znext-solver +//@ revisions: current next +//@[next] compile-flags: -Znext-solver struct Test { func: Box, diff --git a/tests/ui/traits/trait-upcasting/lifetime.rs b/tests/ui/traits/trait-upcasting/lifetime.rs index 6486ec3891c..ab006f8bedc 100644 --- a/tests/ui/traits/trait-upcasting/lifetime.rs +++ b/tests/ui/traits/trait-upcasting/lifetime.rs @@ -1,4 +1,4 @@ -// run-pass +//@ run-pass #![feature(trait_upcasting)] diff --git a/tests/ui/traits/trait-upcasting/migrate-lint-different-substs.rs b/tests/ui/traits/trait-upcasting/migrate-lint-different-substs.rs index 8a90a09ff04..8e62c4b95b0 100644 --- a/tests/ui/traits/trait-upcasting/migrate-lint-different-substs.rs +++ b/tests/ui/traits/trait-upcasting/migrate-lint-different-substs.rs @@ -1,4 +1,4 @@ -// check-pass +//@ check-pass use std::ops::Deref; diff --git a/tests/ui/traits/trait-upcasting/multiple-occurrence-ambiguousity.rs b/tests/ui/traits/trait-upcasting/multiple-occurrence-ambiguousity.rs index 2e53a00a90e..754437a3bec 100644 --- a/tests/ui/traits/trait-upcasting/multiple-occurrence-ambiguousity.rs +++ b/tests/ui/traits/trait-upcasting/multiple-occurrence-ambiguousity.rs @@ -1,4 +1,4 @@ -// check-fail +//@ check-fail #![feature(trait_upcasting)] trait Bar { diff --git a/tests/ui/traits/trait-upcasting/normalization.rs b/tests/ui/traits/trait-upcasting/normalization.rs index 24da1ec5dfb..e4b65740ca4 100644 --- a/tests/ui/traits/trait-upcasting/normalization.rs +++ b/tests/ui/traits/trait-upcasting/normalization.rs @@ -1,7 +1,7 @@ -// check-pass +//@ check-pass // issue: 114113 -// revisions: current next -//[next] compile-flags: -Znext-solver +//@ revisions: current next +//@[next] compile-flags: -Znext-solver #![feature(trait_upcasting)] diff --git a/tests/ui/traits/trait-upcasting/replace-vptr.rs b/tests/ui/traits/trait-upcasting/replace-vptr.rs index 5ef65786bb7..4829e3c5c12 100644 --- a/tests/ui/traits/trait-upcasting/replace-vptr.rs +++ b/tests/ui/traits/trait-upcasting/replace-vptr.rs @@ -1,4 +1,4 @@ -// run-pass +//@ run-pass #![feature(trait_upcasting)] diff --git a/tests/ui/traits/trait-upcasting/struct.rs b/tests/ui/traits/trait-upcasting/struct.rs index a3e41696956..39da20259a0 100644 --- a/tests/ui/traits/trait-upcasting/struct.rs +++ b/tests/ui/traits/trait-upcasting/struct.rs @@ -1,4 +1,4 @@ -// run-pass +//@ run-pass #![feature(trait_upcasting)] diff --git a/tests/ui/traits/trait-upcasting/type-checking-test-1.rs b/tests/ui/traits/trait-upcasting/type-checking-test-1.rs index 54c3c5e0c28..0246b7d0566 100644 --- a/tests/ui/traits/trait-upcasting/type-checking-test-1.rs +++ b/tests/ui/traits/trait-upcasting/type-checking-test-1.rs @@ -1,5 +1,5 @@ -// revisions: current next -//[next] compile-flags: -Znext-solver +//@ revisions: current next +//@[next] compile-flags: -Znext-solver #![feature(trait_upcasting)] diff --git a/tests/ui/traits/trait-upcasting/upcast-through-struct-tail.rs b/tests/ui/traits/trait-upcasting/upcast-through-struct-tail.rs index 948f058e528..40850b45a00 100644 --- a/tests/ui/traits/trait-upcasting/upcast-through-struct-tail.rs +++ b/tests/ui/traits/trait-upcasting/upcast-through-struct-tail.rs @@ -1,5 +1,5 @@ -// revisions: current next -//[next] compile-flags: -Znext-solver +//@ revisions: current next +//@[next] compile-flags: -Znext-solver struct Wrapper(T); diff --git a/tests/ui/traits/trivial_impl3.rs b/tests/ui/traits/trivial_impl3.rs index 714f643bc99..e027016d0b8 100644 --- a/tests/ui/traits/trivial_impl3.rs +++ b/tests/ui/traits/trivial_impl3.rs @@ -3,7 +3,7 @@ //! which would break this crate. We want to avoid adding //! more ways in which adding an impl can be a breaking change. -// aux-build:trivial3.rs +//@ aux-build:trivial3.rs extern crate trivial3; diff --git a/tests/ui/traits/trivial_impl4.rs b/tests/ui/traits/trivial_impl4.rs index 518f159c1fb..595f273df6b 100644 --- a/tests/ui/traits/trivial_impl4.rs +++ b/tests/ui/traits/trivial_impl4.rs @@ -5,7 +5,7 @@ //! This test differs from `trivial_impl3` because there actually //! exists any impl for `Trait`, which has an effect on coherence. -// aux-build:trivial4.rs +//@ aux-build:trivial4.rs extern crate trivial4; diff --git a/tests/ui/traits/typeclasses-eq-example-static.rs b/tests/ui/traits/typeclasses-eq-example-static.rs index f982ad6a0dd..baa759e460c 100644 --- a/tests/ui/traits/typeclasses-eq-example-static.rs +++ b/tests/ui/traits/typeclasses-eq-example-static.rs @@ -1,4 +1,4 @@ -// run-pass +//@ run-pass #![allow(non_camel_case_types)] #![allow(non_snake_case)] diff --git a/tests/ui/traits/typeclasses-eq-example.rs b/tests/ui/traits/typeclasses-eq-example.rs index 4400301e61e..0fb5d25d6dd 100644 --- a/tests/ui/traits/typeclasses-eq-example.rs +++ b/tests/ui/traits/typeclasses-eq-example.rs @@ -1,4 +1,4 @@ -// run-pass +//@ run-pass #![allow(non_camel_case_types)] #![allow(non_snake_case)] diff --git a/tests/ui/traits/ufcs-object.rs b/tests/ui/traits/ufcs-object.rs index 700488c22d6..7a41937753e 100644 --- a/tests/ui/traits/ufcs-object.rs +++ b/tests/ui/traits/ufcs-object.rs @@ -1,4 +1,4 @@ -// run-pass +//@ run-pass // Test that when you use ufcs form to invoke a trait method (on a // trait object) everything works fine. diff --git a/tests/ui/traits/unsend-future.rs b/tests/ui/traits/unsend-future.rs index a8367573fbd..061897dc02c 100644 --- a/tests/ui/traits/unsend-future.rs +++ b/tests/ui/traits/unsend-future.rs @@ -1,4 +1,4 @@ -// edition:2021 +//@ edition:2021 // issue 108897 trait Handler {} diff --git a/tests/ui/traits/upcast_soundness_bug.rs b/tests/ui/traits/upcast_soundness_bug.rs index 32e32850925..95b48cdf379 100644 --- a/tests/ui/traits/upcast_soundness_bug.rs +++ b/tests/ui/traits/upcast_soundness_bug.rs @@ -1,6 +1,6 @@ #![feature(trait_upcasting)] -// known-bug: #120222 -// check-pass +//@ known-bug: #120222 +//@ check-pass //! This will segfault at runtime. pub trait SupSupA { diff --git a/tests/ui/traits/use-before-def.rs b/tests/ui/traits/use-before-def.rs index e52dc53fbab..fb7e540db18 100644 --- a/tests/ui/traits/use-before-def.rs +++ b/tests/ui/traits/use-before-def.rs @@ -1,9 +1,9 @@ -// check-pass +//@ check-pass #![allow(non_camel_case_types)] // Issue #1761 -// pretty-expanded FIXME #23616 +//@ pretty-expanded FIXME #23616 impl foo for isize { fn foo(&self) -> isize { 10 } } trait foo { fn foo(&self) -> isize; } diff --git a/tests/ui/traits/vtable/issue-91807.rs b/tests/ui/traits/vtable/issue-91807.rs index f435ff09dc3..88a2e342adf 100644 --- a/tests/ui/traits/vtable/issue-91807.rs +++ b/tests/ui/traits/vtable/issue-91807.rs @@ -1,5 +1,5 @@ -// check-pass -// incremental +//@ check-pass +//@ incremental struct Struct(T); diff --git a/tests/ui/traits/vtable/multiple-markers.rs b/tests/ui/traits/vtable/multiple-markers.rs index 1e6e3087027..8a9e7a006cf 100644 --- a/tests/ui/traits/vtable/multiple-markers.rs +++ b/tests/ui/traits/vtable/multiple-markers.rs @@ -3,7 +3,7 @@ // This test makes sure that multiple marker (method-less) traits can reuse the // same pointer for upcasting. // -// build-fail +//@ build-fail #![crate_type = "lib"] #![feature(rustc_attrs)] diff --git a/tests/ui/traits/vtable/vtable-diamond.rs b/tests/ui/traits/vtable/vtable-diamond.rs index dc3c17ac314..2cfa86c526d 100644 --- a/tests/ui/traits/vtable/vtable-diamond.rs +++ b/tests/ui/traits/vtable/vtable-diamond.rs @@ -1,4 +1,4 @@ -// build-fail +//@ build-fail #![feature(rustc_attrs)] #[rustc_dump_vtable] diff --git a/tests/ui/traits/vtable/vtable-multi-level.rs b/tests/ui/traits/vtable/vtable-multi-level.rs index ebd55bcf39b..bedbf84d303 100644 --- a/tests/ui/traits/vtable/vtable-multi-level.rs +++ b/tests/ui/traits/vtable/vtable-multi-level.rs @@ -1,4 +1,4 @@ -// build-fail +//@ build-fail #![feature(rustc_attrs)] // O --> G --> C --> A diff --git a/tests/ui/traits/vtable/vtable-multiple.rs b/tests/ui/traits/vtable/vtable-multiple.rs index 7a0111c5ef2..beaaf4db6b1 100644 --- a/tests/ui/traits/vtable/vtable-multiple.rs +++ b/tests/ui/traits/vtable/vtable-multiple.rs @@ -1,4 +1,4 @@ -// build-fail +//@ build-fail #![feature(rustc_attrs)] #[rustc_dump_vtable] diff --git a/tests/ui/traits/vtable/vtable-non-object-safe.rs b/tests/ui/traits/vtable/vtable-non-object-safe.rs index 7661bb57461..f98af0f23b7 100644 --- a/tests/ui/traits/vtable/vtable-non-object-safe.rs +++ b/tests/ui/traits/vtable/vtable-non-object-safe.rs @@ -1,4 +1,4 @@ -// build-fail +//@ build-fail #![feature(rustc_attrs)] // Ensure that non-object-safe methods in Iterator does not generate diff --git a/tests/ui/traits/vtable/vtable-vacant.rs b/tests/ui/traits/vtable/vtable-vacant.rs index a6479635834..26de3f60621 100644 --- a/tests/ui/traits/vtable/vtable-vacant.rs +++ b/tests/ui/traits/vtable/vtable-vacant.rs @@ -1,4 +1,4 @@ -// build-fail +//@ build-fail #![feature(rustc_attrs)] #![feature(negative_impls)] #![allow(where_clauses_object_safety)] diff --git a/tests/ui/traits/wf-object/reverse-order.rs b/tests/ui/traits/wf-object/reverse-order.rs index e90c8763d65..b8f2aae8966 100644 --- a/tests/ui/traits/wf-object/reverse-order.rs +++ b/tests/ui/traits/wf-object/reverse-order.rs @@ -1,4 +1,4 @@ -// check-pass +//@ check-pass // Ensure that `dyn $($AutoTrait)+ ObjSafe` is well-formed. diff --git a/tests/ui/traits/where-clause-vs-impl.rs b/tests/ui/traits/where-clause-vs-impl.rs index 7cfee27efb3..074c27036c2 100644 --- a/tests/ui/traits/where-clause-vs-impl.rs +++ b/tests/ui/traits/where-clause-vs-impl.rs @@ -1,4 +1,4 @@ -// run-pass +//@ run-pass #![allow(dead_code)] #![allow(unused_variables)] // Test that when there is a conditional (but blanket) impl and a @@ -6,7 +6,7 @@ // // Issue #18453. -// pretty-expanded FIXME #23616 +//@ pretty-expanded FIXME #23616 use std::rc::Rc; diff --git a/tests/ui/traits/with-bounds-default.rs b/tests/ui/traits/with-bounds-default.rs index 31f73d79cc7..2bc00b68366 100644 --- a/tests/ui/traits/with-bounds-default.rs +++ b/tests/ui/traits/with-bounds-default.rs @@ -1,4 +1,4 @@ -// run-pass +//@ run-pass pub trait Clone2 { /// Returns a copy of the value. The contents of boxes diff --git a/tests/ui/traits/with-dst.rs b/tests/ui/traits/with-dst.rs index a3e3b31df92..fe83a48af8d 100644 --- a/tests/ui/traits/with-dst.rs +++ b/tests/ui/traits/with-dst.rs @@ -1,4 +1,4 @@ -// build-pass (FIXME(62277): could be check-pass?) +//@ build-pass (FIXME(62277): could be check-pass?) // #55266 struct VTable { diff --git a/tests/ui/transmutability/abstraction/abstracted_assume.rs b/tests/ui/transmutability/abstraction/abstracted_assume.rs index 0225c4230dc..0e62dc632bf 100644 --- a/tests/ui/transmutability/abstraction/abstracted_assume.rs +++ b/tests/ui/transmutability/abstraction/abstracted_assume.rs @@ -1,4 +1,4 @@ -// check-pass +//@ check-pass //! The implementation should behave correctly when the `ASSUME` parameters are //! provided indirectly through an abstraction. diff --git a/tests/ui/transmutability/abstraction/const_generic_fn.rs b/tests/ui/transmutability/abstraction/const_generic_fn.rs index e693a09570f..076b7c8999b 100644 --- a/tests/ui/transmutability/abstraction/const_generic_fn.rs +++ b/tests/ui/transmutability/abstraction/const_generic_fn.rs @@ -1,4 +1,4 @@ -// check-pass +//@ check-pass //! An array must have the correct length. #![crate_type = "lib"] diff --git a/tests/ui/transmutability/alignment/align-fail.rs b/tests/ui/transmutability/alignment/align-fail.rs index 7f6090a6e4d..2bb6bfeeaae 100644 --- a/tests/ui/transmutability/alignment/align-fail.rs +++ b/tests/ui/transmutability/alignment/align-fail.rs @@ -1,4 +1,4 @@ -// check-fail +//@ check-fail #![feature(transmutability)] mod assert { diff --git a/tests/ui/transmutability/alignment/align-pass.rs b/tests/ui/transmutability/alignment/align-pass.rs index 62dc672eacb..d97a55f730c 100644 --- a/tests/ui/transmutability/alignment/align-pass.rs +++ b/tests/ui/transmutability/alignment/align-pass.rs @@ -1,4 +1,4 @@ -// check-pass +//@ check-pass #![feature(transmutability)] mod assert { diff --git a/tests/ui/transmutability/arrays/should_have_correct_length.rs b/tests/ui/transmutability/arrays/should_have_correct_length.rs index 353797d0c4b..44a60360014 100644 --- a/tests/ui/transmutability/arrays/should_have_correct_length.rs +++ b/tests/ui/transmutability/arrays/should_have_correct_length.rs @@ -1,4 +1,4 @@ -// check-pass +//@ check-pass //! An array must have the correct length. #![crate_type = "lib"] diff --git a/tests/ui/transmutability/arrays/should_inherit_alignment.rs b/tests/ui/transmutability/arrays/should_inherit_alignment.rs index b00e5c7e400..bb78cd82a34 100644 --- a/tests/ui/transmutability/arrays/should_inherit_alignment.rs +++ b/tests/ui/transmutability/arrays/should_inherit_alignment.rs @@ -1,4 +1,4 @@ -// check-pass +//@ check-pass //! An array must inherit the alignment of its inner type. #![crate_type = "lib"] diff --git a/tests/ui/transmutability/enums/should_order_correctly.rs b/tests/ui/transmutability/enums/should_order_correctly.rs index 1335cc9d2b1..6146e37e54e 100644 --- a/tests/ui/transmutability/enums/should_order_correctly.rs +++ b/tests/ui/transmutability/enums/should_order_correctly.rs @@ -1,4 +1,4 @@ -// check-pass +//@ check-pass //! The payloads of an enum variant should be ordered after its tag. #![crate_type = "lib"] diff --git a/tests/ui/transmutability/issue-110467.rs b/tests/ui/transmutability/issue-110467.rs index 358733b9832..6485ed8aab7 100644 --- a/tests/ui/transmutability/issue-110467.rs +++ b/tests/ui/transmutability/issue-110467.rs @@ -1,4 +1,4 @@ -// check-pass +//@ check-pass #![crate_type = "lib"] #![feature(transmutability)] use std::mem::BikeshedIntrinsicFrom; diff --git a/tests/ui/transmutability/issue-110892.rs b/tests/ui/transmutability/issue-110892.rs index ce926b39996..1baf117518b 100644 --- a/tests/ui/transmutability/issue-110892.rs +++ b/tests/ui/transmutability/issue-110892.rs @@ -1,4 +1,4 @@ -// check-fail +//@ check-fail #![feature(generic_const_exprs, transmutability)] #![allow(incomplete_features)] diff --git a/tests/ui/transmutability/primitives/bool-mut.rs b/tests/ui/transmutability/primitives/bool-mut.rs index 6ee168d1a71..0a74aba8f63 100644 --- a/tests/ui/transmutability/primitives/bool-mut.rs +++ b/tests/ui/transmutability/primitives/bool-mut.rs @@ -1,5 +1,5 @@ -// check-fail -//[next] compile-flags: -Znext-solver +//@ check-fail +//@[next] compile-flags: -Znext-solver #![feature(transmutability)] mod assert { diff --git a/tests/ui/transmutability/primitives/bool.rs b/tests/ui/transmutability/primitives/bool.rs index ac4024b7f33..b7dc309e469 100644 --- a/tests/ui/transmutability/primitives/bool.rs +++ b/tests/ui/transmutability/primitives/bool.rs @@ -1,5 +1,5 @@ -// revisions: current next -//[next] compile-flags: -Znext-solver +//@ revisions: current next +//@[next] compile-flags: -Znext-solver #![feature(transmutability)] mod assert { diff --git a/tests/ui/transmutability/primitives/numbers.rs b/tests/ui/transmutability/primitives/numbers.rs index 1afc7d677ee..8baa4b05216 100644 --- a/tests/ui/transmutability/primitives/numbers.rs +++ b/tests/ui/transmutability/primitives/numbers.rs @@ -1,5 +1,5 @@ -// revisions: current next -//[next] compile-flags: -Znext-solver +//@ revisions: current next +//@[next] compile-flags: -Znext-solver #![crate_type = "lib"] #![feature(transmutability)] diff --git a/tests/ui/transmutability/primitives/unit.rs b/tests/ui/transmutability/primitives/unit.rs index 5ea96cf8ba7..77240dd340b 100644 --- a/tests/ui/transmutability/primitives/unit.rs +++ b/tests/ui/transmutability/primitives/unit.rs @@ -1,5 +1,5 @@ -// revisions: current next -//[next] compile-flags: -Znext-solver +//@ revisions: current next +//@[next] compile-flags: -Znext-solver //! The unit type, `()`, should be one byte. diff --git a/tests/ui/transmutability/references/recursive-wrapper-types-bit-compatible-mut.rs b/tests/ui/transmutability/references/recursive-wrapper-types-bit-compatible-mut.rs index a6e2889d3f2..8e005d83a45 100644 --- a/tests/ui/transmutability/references/recursive-wrapper-types-bit-compatible-mut.rs +++ b/tests/ui/transmutability/references/recursive-wrapper-types-bit-compatible-mut.rs @@ -1,4 +1,4 @@ -// check-fail +//@ check-fail #![feature(transmutability)] mod assert { diff --git a/tests/ui/transmutability/references/recursive-wrapper-types-bit-compatible.rs b/tests/ui/transmutability/references/recursive-wrapper-types-bit-compatible.rs index 709d8cdc762..6dd49863609 100644 --- a/tests/ui/transmutability/references/recursive-wrapper-types-bit-compatible.rs +++ b/tests/ui/transmutability/references/recursive-wrapper-types-bit-compatible.rs @@ -1,4 +1,4 @@ -// check-pass +//@ check-pass #![feature(transmutability)] mod assert { diff --git a/tests/ui/transmutability/references/recursive-wrapper-types-bit-incompatible.rs b/tests/ui/transmutability/references/recursive-wrapper-types-bit-incompatible.rs index e8582d2fd02..bac174014ee 100644 --- a/tests/ui/transmutability/references/recursive-wrapper-types-bit-incompatible.rs +++ b/tests/ui/transmutability/references/recursive-wrapper-types-bit-incompatible.rs @@ -1,4 +1,4 @@ -// check-fail +//@ check-fail #![feature(transmutability)] mod assert { diff --git a/tests/ui/transmutability/references/recursive-wrapper-types.rs b/tests/ui/transmutability/references/recursive-wrapper-types.rs index 090c1fea6db..9556a0e76c7 100644 --- a/tests/ui/transmutability/references/recursive-wrapper-types.rs +++ b/tests/ui/transmutability/references/recursive-wrapper-types.rs @@ -1,4 +1,4 @@ -// check-pass +//@ check-pass #![feature(transmutability)] mod assert { diff --git a/tests/ui/transmutability/references/u8-to-unit.rs b/tests/ui/transmutability/references/u8-to-unit.rs index 8b37492bd6b..bf11372f9cb 100644 --- a/tests/ui/transmutability/references/u8-to-unit.rs +++ b/tests/ui/transmutability/references/u8-to-unit.rs @@ -1,4 +1,4 @@ -// check-pass +//@ check-pass #![feature(transmutability)] mod assert { diff --git a/tests/ui/transmutability/references/unit-to-itself.rs b/tests/ui/transmutability/references/unit-to-itself.rs index 04a7e16d7cc..5c0db04c2e6 100644 --- a/tests/ui/transmutability/references/unit-to-itself.rs +++ b/tests/ui/transmutability/references/unit-to-itself.rs @@ -1,4 +1,4 @@ -// check-pass +//@ check-pass #![feature(transmutability)] mod assert { diff --git a/tests/ui/transmutability/references/unit-to-u8.rs b/tests/ui/transmutability/references/unit-to-u8.rs index eff516e9a96..ccc401042af 100644 --- a/tests/ui/transmutability/references/unit-to-u8.rs +++ b/tests/ui/transmutability/references/unit-to-u8.rs @@ -1,4 +1,4 @@ -// check-fail +//@ check-fail #![feature(transmutability)] mod assert { diff --git a/tests/ui/transmutability/structs/repr/should_handle_align.rs b/tests/ui/transmutability/structs/repr/should_handle_align.rs index ea9bf2a237e..ca18e0f1543 100644 --- a/tests/ui/transmutability/structs/repr/should_handle_align.rs +++ b/tests/ui/transmutability/structs/repr/should_handle_align.rs @@ -1,4 +1,4 @@ -// check-pass +//@ check-pass //! The presence of an `align(X)` annotation must be accounted for. #![crate_type = "lib"] diff --git a/tests/ui/transmutability/structs/repr/should_handle_packed.rs b/tests/ui/transmutability/structs/repr/should_handle_packed.rs index 17dc995fcd9..dcd4e5b80eb 100644 --- a/tests/ui/transmutability/structs/repr/should_handle_packed.rs +++ b/tests/ui/transmutability/structs/repr/should_handle_packed.rs @@ -1,4 +1,4 @@ -// check-pass +//@ check-pass //! The presence of an `align(X)` annotation must be accounted for. #![crate_type = "lib"] diff --git a/tests/ui/transmutability/structs/should_order_fields_correctly.rs b/tests/ui/transmutability/structs/should_order_fields_correctly.rs index 28724562bad..bda5bfb89a2 100644 --- a/tests/ui/transmutability/structs/should_order_fields_correctly.rs +++ b/tests/ui/transmutability/structs/should_order_fields_correctly.rs @@ -1,4 +1,4 @@ -// check-pass +//@ check-pass //! The fields of a struct should be laid out in lexical order. #![crate_type = "lib"] diff --git a/tests/ui/transmutability/unions/boolish.rs b/tests/ui/transmutability/unions/boolish.rs index e469c497353..9ab5f2be59a 100644 --- a/tests/ui/transmutability/unions/boolish.rs +++ b/tests/ui/transmutability/unions/boolish.rs @@ -1,4 +1,4 @@ -// check-pass +//@ check-pass #![crate_type = "lib"] #![feature(transmutability)] diff --git a/tests/ui/transmutability/unions/repr/should_handle_align.rs b/tests/ui/transmutability/unions/repr/should_handle_align.rs index 09c13cc4dc7..652158ecf52 100644 --- a/tests/ui/transmutability/unions/repr/should_handle_align.rs +++ b/tests/ui/transmutability/unions/repr/should_handle_align.rs @@ -1,4 +1,4 @@ -// check-pass +//@ check-pass //! The presence of an `align(X)` annotation must be accounted for. #![crate_type = "lib"] diff --git a/tests/ui/transmutability/unions/repr/should_handle_packed.rs b/tests/ui/transmutability/unions/repr/should_handle_packed.rs index 24c2abd698e..173fec9ff0c 100644 --- a/tests/ui/transmutability/unions/repr/should_handle_packed.rs +++ b/tests/ui/transmutability/unions/repr/should_handle_packed.rs @@ -1,4 +1,4 @@ -// check-pass +//@ check-pass //! The presence of an `align(X)` annotation must be accounted for. #![crate_type = "lib"] diff --git a/tests/ui/transmutability/unions/should_permit_intersecting_if_validity_is_assumed.rs b/tests/ui/transmutability/unions/should_permit_intersecting_if_validity_is_assumed.rs index 1007fdd7954..82cf3aba8a7 100644 --- a/tests/ui/transmutability/unions/should_permit_intersecting_if_validity_is_assumed.rs +++ b/tests/ui/transmutability/unions/should_permit_intersecting_if_validity_is_assumed.rs @@ -1,4 +1,4 @@ -// check-pass +//@ check-pass //! If validity is assumed, there need only be one matching bit-pattern between //! the source and destination types. diff --git a/tests/ui/transmutability/visibility/assume/should_accept_if_dst_has_private_field.rs b/tests/ui/transmutability/visibility/assume/should_accept_if_dst_has_private_field.rs index 8a41669c65e..fa5569325b3 100644 --- a/tests/ui/transmutability/visibility/assume/should_accept_if_dst_has_private_field.rs +++ b/tests/ui/transmutability/visibility/assume/should_accept_if_dst_has_private_field.rs @@ -1,4 +1,4 @@ -// check-pass +//@ check-pass //! If visibility is assumed, a transmutation should be accepted even if the //! destination type contains a private field. diff --git a/tests/ui/transmutability/visibility/assume/should_accept_if_dst_has_private_variant.rs b/tests/ui/transmutability/visibility/assume/should_accept_if_dst_has_private_variant.rs index dd57b877d78..8ff8e2de0e6 100644 --- a/tests/ui/transmutability/visibility/assume/should_accept_if_dst_has_private_variant.rs +++ b/tests/ui/transmutability/visibility/assume/should_accept_if_dst_has_private_variant.rs @@ -1,4 +1,4 @@ -// check-pass +//@ check-pass //! If visibility is assumed, a transmutation should be accepted even if the //! destination type contains a private variant. diff --git a/tests/ui/transmutability/visibility/assume/should_accept_if_dst_has_tricky_unreachable_field.rs b/tests/ui/transmutability/visibility/assume/should_accept_if_dst_has_tricky_unreachable_field.rs index ebce8ce87df..b9cf66ec310 100644 --- a/tests/ui/transmutability/visibility/assume/should_accept_if_dst_has_tricky_unreachable_field.rs +++ b/tests/ui/transmutability/visibility/assume/should_accept_if_dst_has_tricky_unreachable_field.rs @@ -1,4 +1,4 @@ -// check-pass +//@ check-pass //! Unless visibility is assumed, a transmutation should be rejected if the //! destination type contains an unreachable field (e.g., a public field with a //! private type). (This rule is distinct from type privacy, which still may diff --git a/tests/ui/transmutability/visibility/assume/should_accept_if_dst_has_unreachable_field.rs b/tests/ui/transmutability/visibility/assume/should_accept_if_dst_has_unreachable_field.rs index b6129163333..a56145f59d8 100644 --- a/tests/ui/transmutability/visibility/assume/should_accept_if_dst_has_unreachable_field.rs +++ b/tests/ui/transmutability/visibility/assume/should_accept_if_dst_has_unreachable_field.rs @@ -1,4 +1,4 @@ -// check-pass +//@ check-pass //! If visibility is assumed, a transmutation should be accepted even if the //! destination type contains an unreachable field (e.g., a public field with a diff --git a/tests/ui/transmutability/visibility/should_accept_if_src_has_private_field.rs b/tests/ui/transmutability/visibility/should_accept_if_src_has_private_field.rs index 5a0df09d492..22392c53905 100644 --- a/tests/ui/transmutability/visibility/should_accept_if_src_has_private_field.rs +++ b/tests/ui/transmutability/visibility/should_accept_if_src_has_private_field.rs @@ -1,4 +1,4 @@ -// check-pass +//@ check-pass //! The presence of a private field in the source type does not affect //! transmutability. diff --git a/tests/ui/transmutability/visibility/should_accept_if_src_has_private_variant.rs b/tests/ui/transmutability/visibility/should_accept_if_src_has_private_variant.rs index 0f69630cc64..876db7c6589 100644 --- a/tests/ui/transmutability/visibility/should_accept_if_src_has_private_variant.rs +++ b/tests/ui/transmutability/visibility/should_accept_if_src_has_private_variant.rs @@ -1,4 +1,4 @@ -// check-pass +//@ check-pass //! The presence of a private variant in the source type does not affect //! transmutability. diff --git a/tests/ui/transmutability/visibility/should_accept_if_src_has_unreachable_field.rs b/tests/ui/transmutability/visibility/should_accept_if_src_has_unreachable_field.rs index e7742058c57..8b6db9ff150 100644 --- a/tests/ui/transmutability/visibility/should_accept_if_src_has_unreachable_field.rs +++ b/tests/ui/transmutability/visibility/should_accept_if_src_has_unreachable_field.rs @@ -1,4 +1,4 @@ -// check-pass +//@ check-pass //! The presence of an unreachable field in the source type (e.g., a public //! field with a private type does not affect transmutability. (This rule is diff --git a/tests/ui/transmutability/visibility/should_reject_if_dst_has_tricky_unreachable_field.rs b/tests/ui/transmutability/visibility/should_reject_if_dst_has_tricky_unreachable_field.rs index 662c32af17a..9b7b940ca69 100644 --- a/tests/ui/transmutability/visibility/should_reject_if_dst_has_tricky_unreachable_field.rs +++ b/tests/ui/transmutability/visibility/should_reject_if_dst_has_tricky_unreachable_field.rs @@ -1,4 +1,4 @@ -// check-pass +//@ check-pass //! NOTE: This test documents a known-bug in the implementation of the //! transmutability trait. Once fixed, the above "check-pass" header should be //! removed, and an "ERROR cannot be safely transmuted" annotation should be added at the end diff --git a/tests/ui/transmute-equal-assoc-types.rs b/tests/ui/transmute-equal-assoc-types.rs index d1b593b7f0a..526f4ebbffa 100644 --- a/tests/ui/transmute-equal-assoc-types.rs +++ b/tests/ui/transmute-equal-assoc-types.rs @@ -1,4 +1,4 @@ -// check-pass +//@ check-pass trait Foo { type Bar; diff --git a/tests/ui/transmute-non-immediate-to-immediate.rs b/tests/ui/transmute-non-immediate-to-immediate.rs index cf77c113f4c..f5ddf0cfa33 100644 --- a/tests/ui/transmute-non-immediate-to-immediate.rs +++ b/tests/ui/transmute-non-immediate-to-immediate.rs @@ -1,8 +1,8 @@ -// run-pass +//@ run-pass // Issue #7988 // Transmuting non-immediate type to immediate type -// pretty-expanded FIXME #23616 +//@ pretty-expanded FIXME #23616 pub fn main() { unsafe { diff --git a/tests/ui/transmute/lifetimes.rs b/tests/ui/transmute/lifetimes.rs index 94319155139..0114e6205bb 100644 --- a/tests/ui/transmute/lifetimes.rs +++ b/tests/ui/transmute/lifetimes.rs @@ -1,4 +1,4 @@ -// check-pass +//@ check-pass use std::ptr::NonNull; diff --git a/tests/ui/transmute/main.rs b/tests/ui/transmute/main.rs index da4a0a660c8..e4a5f9103cd 100644 --- a/tests/ui/transmute/main.rs +++ b/tests/ui/transmute/main.rs @@ -1,5 +1,5 @@ -// normalize-stderr-32bit: "`&str` \(64 bits\)" -> "`&str` ($$STR bits)" -// normalize-stderr-64bit: "`&str` \(128 bits\)" -> "`&str` ($$STR bits)" +//@ normalize-stderr-32bit: "`&str` \(64 bits\)" -> "`&str` ($$STR bits)" +//@ normalize-stderr-64bit: "`&str` \(128 bits\)" -> "`&str` ($$STR bits)" use std::mem::transmute; diff --git a/tests/ui/transmute/transmute-different-sizes.rs b/tests/ui/transmute/transmute-different-sizes.rs index 690decf6392..4fe79b9fa4e 100644 --- a/tests/ui/transmute/transmute-different-sizes.rs +++ b/tests/ui/transmute/transmute-different-sizes.rs @@ -1,4 +1,4 @@ -// normalize-stderr-test "\d+ bits" -> "N bits" +//@ normalize-stderr-test "\d+ bits" -> "N bits" // Tests that `transmute` cannot be called on types of different size. diff --git a/tests/ui/transmute/transmute-fat-pointers.rs b/tests/ui/transmute/transmute-fat-pointers.rs index 7c1beffd14e..7043e53dbff 100644 --- a/tests/ui/transmute/transmute-fat-pointers.rs +++ b/tests/ui/transmute/transmute-fat-pointers.rs @@ -1,4 +1,4 @@ -// normalize-stderr-test "\d+ bits" -> "N bits" +//@ normalize-stderr-test "\d+ bits" -> "N bits" // Tests that are conservative around thin/fat pointer mismatches. diff --git a/tests/ui/transmute/transmute-impl.rs b/tests/ui/transmute/transmute-impl.rs index df422bda166..617e707cda9 100644 --- a/tests/ui/transmute/transmute-impl.rs +++ b/tests/ui/transmute/transmute-impl.rs @@ -1,4 +1,4 @@ -// normalize-stderr-test "\d+ bits" -> "N bits" +//@ normalize-stderr-test "\d+ bits" -> "N bits" // Tests that are conservative around thin/fat pointer mismatches. diff --git a/tests/ui/treat-err-as-bug/err.rs b/tests/ui/treat-err-as-bug/err.rs index 74992497dab..02eea060494 100644 --- a/tests/ui/treat-err-as-bug/err.rs +++ b/tests/ui/treat-err-as-bug/err.rs @@ -1,10 +1,10 @@ -// compile-flags: -Ztreat-err-as-bug -// failure-status: 101 -// error-pattern: aborting due to `-Z treat-err-as-bug=1` -// error-pattern: [eval_static_initializer] evaluating initializer of static `C` -// normalize-stderr-test "note: .*\n\n" -> "" -// normalize-stderr-test "thread 'rustc' panicked.*:\n.*\n" -> "" -// rustc-env:RUST_BACKTRACE=0 +//@ compile-flags: -Ztreat-err-as-bug +//@ failure-status: 101 +//@ error-pattern: aborting due to `-Z treat-err-as-bug=1` +//@ error-pattern: [eval_static_initializer] evaluating initializer of static `C` +//@ normalize-stderr-test "note: .*\n\n" -> "" +//@ normalize-stderr-test "thread 'rustc' panicked.*:\n.*\n" -> "" +//@ rustc-env:RUST_BACKTRACE=0 #![crate_type = "rlib"] diff --git a/tests/ui/treat-err-as-bug/panic-causes-oom-112708.rs b/tests/ui/treat-err-as-bug/panic-causes-oom-112708.rs index c7d480a773d..0b75bb23faf 100644 --- a/tests/ui/treat-err-as-bug/panic-causes-oom-112708.rs +++ b/tests/ui/treat-err-as-bug/panic-causes-oom-112708.rs @@ -1,8 +1,8 @@ -// compile-flags: -Ztreat-err-as-bug -// dont-check-failure-status -// error-pattern: aborting due to `-Z treat-err-as-bug=1` -// dont-check-compiler-stderr -// rustc-env:RUST_BACKTRACE=0 +//@ compile-flags: -Ztreat-err-as-bug +//@ dont-check-failure-status +//@ error-pattern: aborting due to `-Z treat-err-as-bug=1` +//@ dont-check-compiler-stderr +//@ rustc-env:RUST_BACKTRACE=0 fn main() { #[deny(while_true)] diff --git a/tests/ui/treat-err-as-bug/span_delayed_bug.rs b/tests/ui/treat-err-as-bug/span_delayed_bug.rs index 1ea14aee6c4..7e5a221b6d8 100644 --- a/tests/ui/treat-err-as-bug/span_delayed_bug.rs +++ b/tests/ui/treat-err-as-bug/span_delayed_bug.rs @@ -1,10 +1,10 @@ -// compile-flags: -Ztreat-err-as-bug -Zeagerly-emit-delayed-bugs -// failure-status: 101 -// error-pattern: aborting due to `-Z treat-err-as-bug=1` -// error-pattern: [trigger_delayed_bug] triggering a delayed bug for testing incremental -// normalize-stderr-test "note: .*\n\n" -> "" -// normalize-stderr-test "thread 'rustc' panicked.*:\n.*\n" -> "" -// rustc-env:RUST_BACKTRACE=0 +//@ compile-flags: -Ztreat-err-as-bug -Zeagerly-emit-delayed-bugs +//@ failure-status: 101 +//@ error-pattern: aborting due to `-Z treat-err-as-bug=1` +//@ error-pattern: [trigger_delayed_bug] triggering a delayed bug for testing incremental +//@ normalize-stderr-test "note: .*\n\n" -> "" +//@ normalize-stderr-test "thread 'rustc' panicked.*:\n.*\n" -> "" +//@ rustc-env:RUST_BACKTRACE=0 #![feature(rustc_attrs)] diff --git a/tests/ui/trivial-bounds/issue-73021-impossible-inline.rs b/tests/ui/trivial-bounds/issue-73021-impossible-inline.rs index ab6677e911b..602582310ad 100644 --- a/tests/ui/trivial-bounds/issue-73021-impossible-inline.rs +++ b/tests/ui/trivial-bounds/issue-73021-impossible-inline.rs @@ -1,6 +1,6 @@ -// build-pass -// revisions: no-opt inline -// [inline]compile-flags: -Zmir-opt-level=3 --emit=mir +//@ build-pass +//@ revisions: no-opt inline +//@ [inline]compile-flags: -Zmir-opt-level=3 --emit=mir #![feature(trivial_bounds)] #![allow(unused)] diff --git a/tests/ui/trivial-bounds/trivial-bounds-inconsistent-associated-functions.rs b/tests/ui/trivial-bounds/trivial-bounds-inconsistent-associated-functions.rs index 69eee66e64d..59824873ef5 100644 --- a/tests/ui/trivial-bounds/trivial-bounds-inconsistent-associated-functions.rs +++ b/tests/ui/trivial-bounds/trivial-bounds-inconsistent-associated-functions.rs @@ -1,5 +1,5 @@ -// check-pass -// compile-flags: --emit=mir,link +//@ check-pass +//@ compile-flags: --emit=mir,link // Force mir to be emitted, to ensure that const // propagation doesn't ICE on a function // with an 'impossible' body. See issue #67696 diff --git a/tests/ui/trivial-bounds/trivial-bounds-inconsistent-copy.rs b/tests/ui/trivial-bounds/trivial-bounds-inconsistent-copy.rs index f98c3164d7e..df3b70dcc7f 100644 --- a/tests/ui/trivial-bounds/trivial-bounds-inconsistent-copy.rs +++ b/tests/ui/trivial-bounds/trivial-bounds-inconsistent-copy.rs @@ -1,4 +1,4 @@ -// check-pass +//@ check-pass // Check tautalogically false `Copy` bounds #![feature(trivial_bounds)] diff --git a/tests/ui/trivial-bounds/trivial-bounds-inconsistent-projection.rs b/tests/ui/trivial-bounds/trivial-bounds-inconsistent-projection.rs index b13956673d2..6213017d5c9 100644 --- a/tests/ui/trivial-bounds/trivial-bounds-inconsistent-projection.rs +++ b/tests/ui/trivial-bounds/trivial-bounds-inconsistent-projection.rs @@ -1,4 +1,4 @@ -// run-pass +//@ run-pass // Check that global bounds result in the expected choice of associated type #![feature(trivial_bounds)] diff --git a/tests/ui/trivial-bounds/trivial-bounds-inconsistent-sized.rs b/tests/ui/trivial-bounds/trivial-bounds-inconsistent-sized.rs index bfa083655c4..bc7ec1f6872 100644 --- a/tests/ui/trivial-bounds/trivial-bounds-inconsistent-sized.rs +++ b/tests/ui/trivial-bounds/trivial-bounds-inconsistent-sized.rs @@ -1,4 +1,4 @@ -// run-pass +//@ run-pass // Check tautalogically false `Sized` bounds #![feature(trivial_bounds)] #![allow(unused)] diff --git a/tests/ui/trivial-bounds/trivial-bounds-inconsistent-well-formed.rs b/tests/ui/trivial-bounds/trivial-bounds-inconsistent-well-formed.rs index 9efa22b1071..a08f37c5035 100644 --- a/tests/ui/trivial-bounds/trivial-bounds-inconsistent-well-formed.rs +++ b/tests/ui/trivial-bounds/trivial-bounds-inconsistent-well-formed.rs @@ -1,4 +1,4 @@ -// run-pass +//@ run-pass // Test that inconsistent bounds are used in well-formedness checks #![feature(trivial_bounds)] diff --git a/tests/ui/trivial-bounds/trivial-bounds-inconsistent.rs b/tests/ui/trivial-bounds/trivial-bounds-inconsistent.rs index 7148f5d6da0..90699e6830a 100644 --- a/tests/ui/trivial-bounds/trivial-bounds-inconsistent.rs +++ b/tests/ui/trivial-bounds/trivial-bounds-inconsistent.rs @@ -1,4 +1,4 @@ -// run-pass +//@ run-pass // Check that tautalogically false bounds are accepted, and are used // in type inference. diff --git a/tests/ui/trivial-bounds/trivial-bounds-object.rs b/tests/ui/trivial-bounds/trivial-bounds-object.rs index f5feeea7cd4..a69c94aae00 100644 --- a/tests/ui/trivial-bounds/trivial-bounds-object.rs +++ b/tests/ui/trivial-bounds/trivial-bounds-object.rs @@ -1,4 +1,4 @@ -// run-pass +//@ run-pass // Check that the object bound dyn A + 'a: A is preferred over the // where clause bound dyn A + 'static: A. diff --git a/tests/ui/trivial_casts-rpass.rs b/tests/ui/trivial_casts-rpass.rs index 4653a8df802..701e2f6166f 100644 --- a/tests/ui/trivial_casts-rpass.rs +++ b/tests/ui/trivial_casts-rpass.rs @@ -1,4 +1,4 @@ -// run-pass +//@ run-pass // Test that all coercions can actually be done using casts (modulo the lints). #![allow(trivial_casts, trivial_numeric_casts)] diff --git a/tests/ui/try-block/issue-45124.rs b/tests/ui/try-block/issue-45124.rs index 2cf2ade65e9..e9e0e767efa 100644 --- a/tests/ui/try-block/issue-45124.rs +++ b/tests/ui/try-block/issue-45124.rs @@ -1,6 +1,6 @@ -// run-pass +//@ run-pass #![allow(unreachable_code)] -// compile-flags: --edition 2018 +//@ compile-flags: --edition 2018 #![feature(try_blocks)] diff --git a/tests/ui/try-block/try-block-bad-lifetime.rs b/tests/ui/try-block/try-block-bad-lifetime.rs index d9524e99f9a..bfff757a2df 100644 --- a/tests/ui/try-block/try-block-bad-lifetime.rs +++ b/tests/ui/try-block/try-block-bad-lifetime.rs @@ -1,4 +1,4 @@ -// compile-flags: --edition 2018 +//@ compile-flags: --edition 2018 #![feature(try_blocks)] diff --git a/tests/ui/try-block/try-block-bad-type.rs b/tests/ui/try-block/try-block-bad-type.rs index 30ae96763c0..71eb832dd4e 100644 --- a/tests/ui/try-block/try-block-bad-type.rs +++ b/tests/ui/try-block/try-block-bad-type.rs @@ -1,4 +1,4 @@ -// compile-flags: --edition 2018 +//@ compile-flags: --edition 2018 #![feature(try_blocks)] diff --git a/tests/ui/try-block/try-block-catch.rs b/tests/ui/try-block/try-block-catch.rs index d165015611d..c3aa442ba66 100644 --- a/tests/ui/try-block/try-block-catch.rs +++ b/tests/ui/try-block/try-block-catch.rs @@ -1,4 +1,4 @@ -// compile-flags: --edition 2018 +//@ compile-flags: --edition 2018 #![feature(try_blocks)] diff --git a/tests/ui/try-block/try-block-in-edition2015.rs b/tests/ui/try-block/try-block-in-edition2015.rs index 00964297308..423269df12d 100644 --- a/tests/ui/try-block/try-block-in-edition2015.rs +++ b/tests/ui/try-block/try-block-in-edition2015.rs @@ -1,4 +1,4 @@ -// compile-flags: --edition 2015 +//@ compile-flags: --edition 2015 pub fn main() { let try_result: Option<_> = try { diff --git a/tests/ui/try-block/try-block-in-match-arm.rs b/tests/ui/try-block/try-block-in-match-arm.rs index ea004ebe29f..cecbf724916 100644 --- a/tests/ui/try-block/try-block-in-match-arm.rs +++ b/tests/ui/try-block/try-block-in-match-arm.rs @@ -1,5 +1,5 @@ -// check-pass -// compile-flags: --edition 2018 +//@ check-pass +//@ compile-flags: --edition 2018 #![feature(try_blocks)] diff --git a/tests/ui/try-block/try-block-in-match.rs b/tests/ui/try-block/try-block-in-match.rs index cd0b967e79d..5c62f41efdb 100644 --- a/tests/ui/try-block/try-block-in-match.rs +++ b/tests/ui/try-block/try-block-in-match.rs @@ -1,5 +1,5 @@ -// run-pass -// compile-flags: --edition 2018 +//@ run-pass +//@ compile-flags: --edition 2018 #![feature(try_blocks)] diff --git a/tests/ui/try-block/try-block-in-return.rs b/tests/ui/try-block/try-block-in-return.rs index a15bfeef1c1..ee5ca696b6d 100644 --- a/tests/ui/try-block/try-block-in-return.rs +++ b/tests/ui/try-block/try-block-in-return.rs @@ -1,5 +1,5 @@ -// run-pass -// compile-flags: --edition 2018 +//@ run-pass +//@ compile-flags: --edition 2018 #![feature(try_blocks)] diff --git a/tests/ui/try-block/try-block-in-while.rs b/tests/ui/try-block/try-block-in-while.rs index 69793df525e..88a97136c59 100644 --- a/tests/ui/try-block/try-block-in-while.rs +++ b/tests/ui/try-block/try-block-in-while.rs @@ -1,4 +1,4 @@ -// compile-flags: --edition 2018 +//@ compile-flags: --edition 2018 #![feature(try_blocks)] diff --git a/tests/ui/try-block/try-block-maybe-bad-lifetime.rs b/tests/ui/try-block/try-block-maybe-bad-lifetime.rs index cd2ddf63a2f..52ec0c44a05 100644 --- a/tests/ui/try-block/try-block-maybe-bad-lifetime.rs +++ b/tests/ui/try-block/try-block-maybe-bad-lifetime.rs @@ -1,4 +1,4 @@ -// compile-flags: --edition 2018 +//@ compile-flags: --edition 2018 #![feature(try_blocks)] diff --git a/tests/ui/try-block/try-block-opt-init.rs b/tests/ui/try-block/try-block-opt-init.rs index f4f45abcc75..fbe7f90d030 100644 --- a/tests/ui/try-block/try-block-opt-init.rs +++ b/tests/ui/try-block/try-block-opt-init.rs @@ -1,4 +1,4 @@ -// compile-flags: --edition 2018 +//@ compile-flags: --edition 2018 #![feature(try_blocks)] diff --git a/tests/ui/try-block/try-block-type-error.rs b/tests/ui/try-block/try-block-type-error.rs index fe1993a37f6..79cdb7a2e48 100644 --- a/tests/ui/try-block/try-block-type-error.rs +++ b/tests/ui/try-block/try-block-type-error.rs @@ -1,4 +1,4 @@ -// compile-flags: --edition 2018 +//@ compile-flags: --edition 2018 #![feature(try_blocks)] diff --git a/tests/ui/try-block/try-block-unreachable-code-lint.rs b/tests/ui/try-block/try-block-unreachable-code-lint.rs index e1d82ea360d..62c74b76d59 100644 --- a/tests/ui/try-block/try-block-unreachable-code-lint.rs +++ b/tests/ui/try-block/try-block-unreachable-code-lint.rs @@ -1,7 +1,7 @@ // Test unreachable_code lint for `try {}` block ok-wrapping. See issues #54165, #63324. -// compile-flags: --edition 2018 -// check-pass +//@ compile-flags: --edition 2018 +//@ check-pass #![feature(try_blocks)] #![warn(unreachable_code)] diff --git a/tests/ui/try-block/try-block-unused-delims.fixed b/tests/ui/try-block/try-block-unused-delims.fixed index 756081738c3..348eb8f7965 100644 --- a/tests/ui/try-block/try-block-unused-delims.fixed +++ b/tests/ui/try-block/try-block-unused-delims.fixed @@ -1,6 +1,6 @@ -// check-pass -// compile-flags: --edition 2018 -// run-rustfix +//@ check-pass +//@ compile-flags: --edition 2018 +//@ run-rustfix #![feature(try_blocks)] #![warn(unused_parens, unused_braces)] diff --git a/tests/ui/try-block/try-block-unused-delims.rs b/tests/ui/try-block/try-block-unused-delims.rs index ce087fb351d..f119e1074f6 100644 --- a/tests/ui/try-block/try-block-unused-delims.rs +++ b/tests/ui/try-block/try-block-unused-delims.rs @@ -1,6 +1,6 @@ -// check-pass -// compile-flags: --edition 2018 -// run-rustfix +//@ check-pass +//@ compile-flags: --edition 2018 +//@ run-rustfix #![feature(try_blocks)] #![warn(unused_parens, unused_braces)] diff --git a/tests/ui/try-block/try-block.rs b/tests/ui/try-block/try-block.rs index c29ccc70427..7520cbaad37 100644 --- a/tests/ui/try-block/try-block.rs +++ b/tests/ui/try-block/try-block.rs @@ -1,8 +1,8 @@ -// run-pass +//@ run-pass #![allow(non_camel_case_types)] #![allow(dead_code)] -// compile-flags: --edition 2018 +//@ compile-flags: --edition 2018 #![feature(try_blocks)] diff --git a/tests/ui/try-block/try-is-identifier-edition2015.rs b/tests/ui/try-block/try-is-identifier-edition2015.rs index 90f56d5fa71..54bd049442f 100644 --- a/tests/ui/try-block/try-is-identifier-edition2015.rs +++ b/tests/ui/try-block/try-is-identifier-edition2015.rs @@ -1,7 +1,7 @@ -// run-pass +//@ run-pass #![allow(non_camel_case_types)] -// compile-flags: --edition 2015 +//@ compile-flags: --edition 2015 fn main() { let try = 2; diff --git a/tests/ui/try-from-int-error-partial-eq.rs b/tests/ui/try-from-int-error-partial-eq.rs index 6ee4a4cf319..66a78b3f842 100644 --- a/tests/ui/try-from-int-error-partial-eq.rs +++ b/tests/ui/try-from-int-error-partial-eq.rs @@ -1,4 +1,4 @@ -// run-pass +//@ run-pass #![allow(unused_must_use)] diff --git a/tests/ui/try-operator-hygiene.rs b/tests/ui/try-operator-hygiene.rs index 0b24b4305ac..20538e094c6 100644 --- a/tests/ui/try-operator-hygiene.rs +++ b/tests/ui/try-operator-hygiene.rs @@ -1,4 +1,4 @@ -// run-pass +//@ run-pass #![allow(non_upper_case_globals)] #![allow(dead_code)] diff --git a/tests/ui/try-operator.rs b/tests/ui/try-operator.rs index 516ae4c4090..b9978204557 100644 --- a/tests/ui/try-operator.rs +++ b/tests/ui/try-operator.rs @@ -1,4 +1,4 @@ -// run-pass +//@ run-pass #![allow(dead_code)] diff --git a/tests/ui/try-trait/try-as-monad.rs b/tests/ui/try-trait/try-as-monad.rs index cf09838b304..2854a160069 100644 --- a/tests/ui/try-trait/try-as-monad.rs +++ b/tests/ui/try-trait/try-as-monad.rs @@ -1,4 +1,4 @@ -// run-pass +//@ run-pass #![feature(try_trait_v2)] diff --git a/tests/ui/try-trait/try-on-option-diagnostics.rs b/tests/ui/try-trait/try-on-option-diagnostics.rs index 7ffa0de6c0f..60942d1c4f7 100644 --- a/tests/ui/try-trait/try-on-option-diagnostics.rs +++ b/tests/ui/try-trait/try-on-option-diagnostics.rs @@ -1,4 +1,4 @@ -// edition:2018 +//@ edition:2018 fn main() {} diff --git a/tests/ui/try-trait/try-operator-custom.rs b/tests/ui/try-trait/try-operator-custom.rs index 45636a7fced..ab0772dd228 100644 --- a/tests/ui/try-trait/try-operator-custom.rs +++ b/tests/ui/try-trait/try-operator-custom.rs @@ -1,4 +1,4 @@ -// run-pass +//@ run-pass #![feature(control_flow_enum)] #![feature(try_trait_v2)] diff --git a/tests/ui/try-trait/try-poll.rs b/tests/ui/try-trait/try-poll.rs index d42e51c7405..c349db6e16d 100644 --- a/tests/ui/try-trait/try-poll.rs +++ b/tests/ui/try-trait/try-poll.rs @@ -1,4 +1,4 @@ -// build-pass (FIXME(62277): could be check-pass?) +//@ build-pass (FIXME(62277): could be check-pass?) #![allow(dead_code, unused)] diff --git a/tests/ui/try-trait/yeet-for-option.rs b/tests/ui/try-trait/yeet-for-option.rs index 753fbc1dee7..a83107d004e 100644 --- a/tests/ui/try-trait/yeet-for-option.rs +++ b/tests/ui/try-trait/yeet-for-option.rs @@ -1,4 +1,4 @@ -// run-pass +//@ run-pass #![feature(yeet_expr)] diff --git a/tests/ui/try-trait/yeet-for-result.rs b/tests/ui/try-trait/yeet-for-result.rs index b7b113797cd..67e1b1a2359 100644 --- a/tests/ui/try-trait/yeet-for-result.rs +++ b/tests/ui/try-trait/yeet-for-result.rs @@ -1,4 +1,4 @@ -// run-pass +//@ run-pass #![feature(yeet_expr)] diff --git a/tests/ui/tuple/builtin.rs b/tests/ui/tuple/builtin.rs index d87ce526357..2678ae322e9 100644 --- a/tests/ui/tuple/builtin.rs +++ b/tests/ui/tuple/builtin.rs @@ -1,4 +1,4 @@ -// check-pass +//@ check-pass #![feature(tuple_trait)] diff --git a/tests/ui/tuple/index-float.rs b/tests/ui/tuple/index-float.rs index 53b025c9135..2faf71cb01d 100644 --- a/tests/ui/tuple/index-float.rs +++ b/tests/ui/tuple/index-float.rs @@ -1,4 +1,4 @@ -// check-pass +//@ check-pass fn main() { let tuple = (((),),); diff --git a/tests/ui/tuple/indexing-in-macro.rs b/tests/ui/tuple/indexing-in-macro.rs index bef4a69ab23..8b548ef0524 100644 --- a/tests/ui/tuple/indexing-in-macro.rs +++ b/tests/ui/tuple/indexing-in-macro.rs @@ -1,4 +1,4 @@ -// check-pass +//@ check-pass macro_rules! m { (.$l:literal) => {}; diff --git a/tests/ui/tuple/nested-index.rs b/tests/ui/tuple/nested-index.rs index a3232d6fc36..fc967873d35 100644 --- a/tests/ui/tuple/nested-index.rs +++ b/tests/ui/tuple/nested-index.rs @@ -1,4 +1,4 @@ -// run-pass +//@ run-pass fn main () { let n = (1, (2, 3)).1.1; diff --git a/tests/ui/tuple/one-tuple.rs b/tests/ui/tuple/one-tuple.rs index 00fbadce1ac..a9723029e5d 100644 --- a/tests/ui/tuple/one-tuple.rs +++ b/tests/ui/tuple/one-tuple.rs @@ -1,4 +1,4 @@ -// run-pass +//@ run-pass // Why one-tuples? Because macros. diff --git a/tests/ui/tuple/tup.rs b/tests/ui/tuple/tup.rs index 160477b0b0a..7bc316e7bd0 100644 --- a/tests/ui/tuple/tup.rs +++ b/tests/ui/tuple/tup.rs @@ -1,4 +1,4 @@ -// run-pass +//@ run-pass #![allow(non_camel_case_types)] diff --git a/tests/ui/tuple/tuple-index-fat-types.rs b/tests/ui/tuple/tuple-index-fat-types.rs index 5dda1ed975c..0dbdacde60a 100644 --- a/tests/ui/tuple/tuple-index-fat-types.rs +++ b/tests/ui/tuple/tuple-index-fat-types.rs @@ -1,4 +1,4 @@ -// run-pass +//@ run-pass struct Foo<'a>(&'a [isize]); diff --git a/tests/ui/tuple/tuple-index.rs b/tests/ui/tuple/tuple-index.rs index 3e1d92b42aa..c98eb42af45 100644 --- a/tests/ui/tuple/tuple-index.rs +++ b/tests/ui/tuple/tuple-index.rs @@ -1,4 +1,4 @@ -// run-pass +//@ run-pass struct Point(isize, isize); diff --git a/tests/ui/tydesc-name.rs b/tests/ui/tydesc-name.rs index c432e5b5481..068a42606c2 100644 --- a/tests/ui/tydesc-name.rs +++ b/tests/ui/tydesc-name.rs @@ -1,4 +1,4 @@ -// run-pass +//@ run-pass #![allow(dead_code)] diff --git a/tests/ui/type-alias-enum-variants/enum-variant-generic-args-pass.rs b/tests/ui/type-alias-enum-variants/enum-variant-generic-args-pass.rs index d869794ec0a..b28b9e52dd2 100644 --- a/tests/ui/type-alias-enum-variants/enum-variant-generic-args-pass.rs +++ b/tests/ui/type-alias-enum-variants/enum-variant-generic-args-pass.rs @@ -1,4 +1,4 @@ -// run-pass +//@ run-pass // Check that resolving, in the value namespace, to an `enum` variant // through a type alias is well behaved in the presence of generics. diff --git a/tests/ui/type-alias-enum-variants/issue-57866.rs b/tests/ui/type-alias-enum-variants/issue-57866.rs index 5e105b20a89..5d612925ec8 100644 --- a/tests/ui/type-alias-enum-variants/issue-57866.rs +++ b/tests/ui/type-alias-enum-variants/issue-57866.rs @@ -1,4 +1,4 @@ -// check-pass +//@ check-pass enum Outer { A(T) diff --git a/tests/ui/type-alias-enum-variants/issue-61801-path-pattern-can-infer.rs b/tests/ui/type-alias-enum-variants/issue-61801-path-pattern-can-infer.rs index 9c9eaab8da3..c03052b5733 100644 --- a/tests/ui/type-alias-enum-variants/issue-61801-path-pattern-can-infer.rs +++ b/tests/ui/type-alias-enum-variants/issue-61801-path-pattern-can-infer.rs @@ -1,7 +1,7 @@ // In this regression test we check that a path pattern referring to a unit variant // through a type alias is successful in inferring the generic argument. -// check-pass +//@ check-pass enum Opt { N, diff --git a/tests/ui/type-alias-enum-variants/issue-63151-dead-code-lint-fields-in-patterns.rs b/tests/ui/type-alias-enum-variants/issue-63151-dead-code-lint-fields-in-patterns.rs index 66fb8dd0dea..b38fb7fef77 100644 --- a/tests/ui/type-alias-enum-variants/issue-63151-dead-code-lint-fields-in-patterns.rs +++ b/tests/ui/type-alias-enum-variants/issue-63151-dead-code-lint-fields-in-patterns.rs @@ -1,4 +1,4 @@ -// check-pass +//@ check-pass // Regression test for the issue #63151: // Spurious unused field warning when matching variants under a `Self` scope diff --git a/tests/ui/type-alias-enum-variants/type-alias-enum-variants-pass.rs b/tests/ui/type-alias-enum-variants/type-alias-enum-variants-pass.rs index 39677733d52..b8b7f56e378 100644 --- a/tests/ui/type-alias-enum-variants/type-alias-enum-variants-pass.rs +++ b/tests/ui/type-alias-enum-variants/type-alias-enum-variants-pass.rs @@ -1,4 +1,4 @@ -// run-pass +//@ run-pass // Check that it is possible to resolve, in the value namespace, // to an `enum` variant through a type alias. This includes `Self`. diff --git a/tests/ui/type-alias-impl-trait/argument-types.rs b/tests/ui/type-alias-impl-trait/argument-types.rs index 185207b9800..9e4a8bb8dda 100644 --- a/tests/ui/type-alias-impl-trait/argument-types.rs +++ b/tests/ui/type-alias-impl-trait/argument-types.rs @@ -1,6 +1,6 @@ #![feature(type_alias_impl_trait)] #![allow(dead_code)] -// check-pass +//@ check-pass use std::fmt::Debug; type Foo = impl Debug; diff --git a/tests/ui/type-alias-impl-trait/assoc-projection-ice.rs b/tests/ui/type-alias-impl-trait/assoc-projection-ice.rs index 703e3e8693e..761402582e2 100644 --- a/tests/ui/type-alias-impl-trait/assoc-projection-ice.rs +++ b/tests/ui/type-alias-impl-trait/assoc-projection-ice.rs @@ -1,6 +1,6 @@ #![feature(type_alias_impl_trait)] -// build-pass +//@ build-pass trait T { type Item; } diff --git a/tests/ui/type-alias-impl-trait/assoc-type-const.rs b/tests/ui/type-alias-impl-trait/assoc-type-const.rs index e385fe045fc..3591773209a 100644 --- a/tests/ui/type-alias-impl-trait/assoc-type-const.rs +++ b/tests/ui/type-alias-impl-trait/assoc-type-const.rs @@ -1,9 +1,9 @@ // Tests that we properly detect defining usages when using // const generics in an associated opaque type -// check-pass -// revisions: current next -//[next] compile-flags: -Znext-solver +//@ check-pass +//@ revisions: current next +//@[next] compile-flags: -Znext-solver #![feature(impl_trait_in_assoc_type)] trait UnwrapItemsExt<'a, const C: usize> { diff --git a/tests/ui/type-alias-impl-trait/assoc-type-lifetime.rs b/tests/ui/type-alias-impl-trait/assoc-type-lifetime.rs index 81dacbcfb7e..e5b987f9485 100644 --- a/tests/ui/type-alias-impl-trait/assoc-type-lifetime.rs +++ b/tests/ui/type-alias-impl-trait/assoc-type-lifetime.rs @@ -1,6 +1,6 @@ // Tests that we still detect defining usages when // lifetimes are used in an associated opaque type -// check-pass +//@ check-pass #![feature(impl_trait_in_assoc_type)] diff --git a/tests/ui/type-alias-impl-trait/associated-type-alias-impl-trait.rs b/tests/ui/type-alias-impl-trait/associated-type-alias-impl-trait.rs index 42f07d49ffe..a1185cd5ba8 100644 --- a/tests/ui/type-alias-impl-trait/associated-type-alias-impl-trait.rs +++ b/tests/ui/type-alias-impl-trait/associated-type-alias-impl-trait.rs @@ -1,5 +1,5 @@ #![feature(type_alias_impl_trait)] -// build-pass (FIXME(62277): could be check-pass?) +//@ build-pass (FIXME(62277): could be check-pass?) trait Bar {} struct Dummy; diff --git a/tests/ui/type-alias-impl-trait/associated-type-impl-trait-lifetime.rs b/tests/ui/type-alias-impl-trait/associated-type-impl-trait-lifetime.rs index 58eaa9c2c42..40689406cfe 100644 --- a/tests/ui/type-alias-impl-trait/associated-type-impl-trait-lifetime.rs +++ b/tests/ui/type-alias-impl-trait/associated-type-impl-trait-lifetime.rs @@ -1,4 +1,4 @@ -//check-pass +//@check-pass #![feature(impl_trait_in_assoc_type)] diff --git a/tests/ui/type-alias-impl-trait/auto-trait-leakage.rs b/tests/ui/type-alias-impl-trait/auto-trait-leakage.rs index d9f7c7809b9..a03a146d041 100644 --- a/tests/ui/type-alias-impl-trait/auto-trait-leakage.rs +++ b/tests/ui/type-alias-impl-trait/auto-trait-leakage.rs @@ -1,4 +1,4 @@ -// check-pass +//@ check-pass #![feature(type_alias_impl_trait)] #![allow(dead_code)] diff --git a/tests/ui/type-alias-impl-trait/auxiliary/collect_hidden_types.rs b/tests/ui/type-alias-impl-trait/auxiliary/collect_hidden_types.rs index 444a4e6957f..726b523606e 100644 --- a/tests/ui/type-alias-impl-trait/auxiliary/collect_hidden_types.rs +++ b/tests/ui/type-alias-impl-trait/auxiliary/collect_hidden_types.rs @@ -1,6 +1,6 @@ #![feature(impl_trait_in_assoc_type)] -// edition:2018 +//@ edition:2018 use std::future::Future; diff --git a/tests/ui/type-alias-impl-trait/bound_reduction.rs b/tests/ui/type-alias-impl-trait/bound_reduction.rs index b9b50f0b77a..74012e34e92 100644 --- a/tests/ui/type-alias-impl-trait/bound_reduction.rs +++ b/tests/ui/type-alias-impl-trait/bound_reduction.rs @@ -1,4 +1,4 @@ -// build-pass (FIXME(62277): could be check-pass?) +//@ build-pass (FIXME(62277): could be check-pass?) #![allow(warnings)] #![feature(type_alias_impl_trait)] diff --git a/tests/ui/type-alias-impl-trait/bounds.rs b/tests/ui/type-alias-impl-trait/bounds.rs index dc05b70c5cc..8e24a937d1d 100644 --- a/tests/ui/type-alias-impl-trait/bounds.rs +++ b/tests/ui/type-alias-impl-trait/bounds.rs @@ -1,6 +1,6 @@ #![feature(type_alias_impl_trait)] -// check-pass +//@ check-pass use std::fmt::Debug; diff --git a/tests/ui/type-alias-impl-trait/broken_mir.rs b/tests/ui/type-alias-impl-trait/broken_mir.rs index b68e798fb7c..1b0ec3f7c40 100644 --- a/tests/ui/type-alias-impl-trait/broken_mir.rs +++ b/tests/ui/type-alias-impl-trait/broken_mir.rs @@ -4,8 +4,8 @@ //! This test used to ICE because oli-obk assumed mir validation //! was only ever run after opaque types were revealed in MIR. -// compile-flags: -Zvalidate-mir -// check-pass +//@ compile-flags: -Zvalidate-mir +//@ check-pass fn main() { let _ = Some(()).into_iter().flat_map(|_| Some(()).into_iter().flat_map(func)); diff --git a/tests/ui/type-alias-impl-trait/closure_args.rs b/tests/ui/type-alias-impl-trait/closure_args.rs index 243f9cd6d4f..eb5ab9d67f7 100644 --- a/tests/ui/type-alias-impl-trait/closure_args.rs +++ b/tests/ui/type-alias-impl-trait/closure_args.rs @@ -1,4 +1,4 @@ -// check-pass +//@ check-pass // regression test for https://github.com/rust-lang/rust/issues/100800 diff --git a/tests/ui/type-alias-impl-trait/closure_args2.rs b/tests/ui/type-alias-impl-trait/closure_args2.rs index 1dd5c3e40cd..329596b19e9 100644 --- a/tests/ui/type-alias-impl-trait/closure_args2.rs +++ b/tests/ui/type-alias-impl-trait/closure_args2.rs @@ -1,4 +1,4 @@ -// check-pass +//@ check-pass #![feature(type_alias_impl_trait)] diff --git a/tests/ui/type-alias-impl-trait/closure_infer.rs b/tests/ui/type-alias-impl-trait/closure_infer.rs index 04e2323ec4a..fa0514c34a0 100644 --- a/tests/ui/type-alias-impl-trait/closure_infer.rs +++ b/tests/ui/type-alias-impl-trait/closure_infer.rs @@ -1,4 +1,4 @@ -// check-pass +//@ check-pass // Regression test for an ICE: https://github.com/rust-lang/rust/issues/119916 diff --git a/tests/ui/type-alias-impl-trait/closure_parent_substs.rs b/tests/ui/type-alias-impl-trait/closure_parent_substs.rs index 7d8193b26cc..e78c7c16c8e 100644 --- a/tests/ui/type-alias-impl-trait/closure_parent_substs.rs +++ b/tests/ui/type-alias-impl-trait/closure_parent_substs.rs @@ -5,7 +5,7 @@ // These region parameters are not really useful in this check. // So here we ignore them and replace them with fresh region variables. -// check-pass +//@ check-pass #![feature(type_alias_impl_trait)] #![allow(dead_code)] diff --git a/tests/ui/type-alias-impl-trait/closure_wf_outlives.rs b/tests/ui/type-alias-impl-trait/closure_wf_outlives.rs index 53974dbb36b..430b444aae1 100644 --- a/tests/ui/type-alias-impl-trait/closure_wf_outlives.rs +++ b/tests/ui/type-alias-impl-trait/closure_wf_outlives.rs @@ -4,7 +4,7 @@ // It's not clear if this is the desired behavior but at least // it's consistent and has no back-compat risk. -// check-fail +//@ check-fail #![feature(type_alias_impl_trait)] #![allow(dead_code)] diff --git a/tests/ui/type-alias-impl-trait/coherence.rs b/tests/ui/type-alias-impl-trait/coherence.rs index 1700c800e31..641c0fac17a 100644 --- a/tests/ui/type-alias-impl-trait/coherence.rs +++ b/tests/ui/type-alias-impl-trait/coherence.rs @@ -1,4 +1,4 @@ -// aux-build:foreign-crate.rs +//@ aux-build:foreign-crate.rs #![feature(type_alias_impl_trait)] extern crate foreign_crate; diff --git a/tests/ui/type-alias-impl-trait/coherence_cross_crate.rs b/tests/ui/type-alias-impl-trait/coherence_cross_crate.rs index a63e0a1ee6f..c1958e4f246 100644 --- a/tests/ui/type-alias-impl-trait/coherence_cross_crate.rs +++ b/tests/ui/type-alias-impl-trait/coherence_cross_crate.rs @@ -1,4 +1,4 @@ -// aux-build: coherence_cross_crate_trait_decl.rs +//@ aux-build: coherence_cross_crate_trait_decl.rs // This test ensures that adding an `impl SomeTrait for i32` within // `coherence_cross_crate_trait_decl` is not a breaking change, by // making sure that even without such an impl this test fails to compile. diff --git a/tests/ui/type-alias-impl-trait/coherence_generalization.rs b/tests/ui/type-alias-impl-trait/coherence_generalization.rs index 1ec8877eaeb..2d7de1add49 100644 --- a/tests/ui/type-alias-impl-trait/coherence_generalization.rs +++ b/tests/ui/type-alias-impl-trait/coherence_generalization.rs @@ -1,4 +1,4 @@ -// check-pass +//@ check-pass // FIXME(type_alias_impl_trait): What does this test? This needs a comment // explaining what we're worried about here. diff --git a/tests/ui/type-alias-impl-trait/collect_hidden_types.rs b/tests/ui/type-alias-impl-trait/collect_hidden_types.rs index e78f178e464..694c70f57a3 100644 --- a/tests/ui/type-alias-impl-trait/collect_hidden_types.rs +++ b/tests/ui/type-alias-impl-trait/collect_hidden_types.rs @@ -1,12 +1,12 @@ -// aux-build:collect_hidden_types.rs +//@ aux-build:collect_hidden_types.rs use collect_hidden_types::Service; use std::future::Future; use std::pin::Pin; use std::task::Context; -// build-pass +//@ build-pass -// edition:2018 +//@ edition:2018 extern crate collect_hidden_types; diff --git a/tests/ui/type-alias-impl-trait/cross_crate_ice.rs b/tests/ui/type-alias-impl-trait/cross_crate_ice.rs index c30608176aa..a249c17d7d3 100644 --- a/tests/ui/type-alias-impl-trait/cross_crate_ice.rs +++ b/tests/ui/type-alias-impl-trait/cross_crate_ice.rs @@ -1,5 +1,5 @@ -// aux-build:cross_crate_ice.rs -// build-pass (FIXME(62277): could be check-pass?) +//@ aux-build:cross_crate_ice.rs +//@ build-pass (FIXME(62277): could be check-pass?) extern crate cross_crate_ice; diff --git a/tests/ui/type-alias-impl-trait/cross_crate_ice2.rs b/tests/ui/type-alias-impl-trait/cross_crate_ice2.rs index 3a7e490260f..1f4f3880203 100644 --- a/tests/ui/type-alias-impl-trait/cross_crate_ice2.rs +++ b/tests/ui/type-alias-impl-trait/cross_crate_ice2.rs @@ -1,5 +1,5 @@ -// aux-build:cross_crate_ice2.rs -// build-pass (FIXME(62277): could be check-pass?) +//@ aux-build:cross_crate_ice2.rs +//@ build-pass (FIXME(62277): could be check-pass?) extern crate cross_crate_ice2; diff --git a/tests/ui/type-alias-impl-trait/cross_inference.rs b/tests/ui/type-alias-impl-trait/cross_inference.rs index c5ef75fee61..50777e57112 100644 --- a/tests/ui/type-alias-impl-trait/cross_inference.rs +++ b/tests/ui/type-alias-impl-trait/cross_inference.rs @@ -1,6 +1,6 @@ -// revisions: current next -//[next] compile-flags: -Znext-solver -// check-pass +//@ revisions: current next +//@[next] compile-flags: -Znext-solver +//@ check-pass #![feature(type_alias_impl_trait)] diff --git a/tests/ui/type-alias-impl-trait/cross_inference_pattern_bug.rs b/tests/ui/type-alias-impl-trait/cross_inference_pattern_bug.rs index 31fea42fa5d..4f3f6d37eff 100644 --- a/tests/ui/type-alias-impl-trait/cross_inference_pattern_bug.rs +++ b/tests/ui/type-alias-impl-trait/cross_inference_pattern_bug.rs @@ -1,5 +1,5 @@ -// compile-flags: --edition=2021 -// build-pass +//@ compile-flags: --edition=2021 +//@ build-pass #![feature(type_alias_impl_trait)] fn main() { diff --git a/tests/ui/type-alias-impl-trait/cross_inference_pattern_bug_no_type.rs b/tests/ui/type-alias-impl-trait/cross_inference_pattern_bug_no_type.rs index b929122a6c2..cad1cbf61a2 100644 --- a/tests/ui/type-alias-impl-trait/cross_inference_pattern_bug_no_type.rs +++ b/tests/ui/type-alias-impl-trait/cross_inference_pattern_bug_no_type.rs @@ -1,6 +1,6 @@ -// compile-flags: --edition=2021 --crate-type=lib -// rustc-env:RUST_BACKTRACE=0 -// check-pass +//@ compile-flags: --edition=2021 --crate-type=lib +//@ rustc-env:RUST_BACKTRACE=0 +//@ check-pass // tracked in https://github.com/rust-lang/rust/issues/96572 diff --git a/tests/ui/type-alias-impl-trait/cross_inference_rpit.rs b/tests/ui/type-alias-impl-trait/cross_inference_rpit.rs index f6affbf1759..6afc30b72f4 100644 --- a/tests/ui/type-alias-impl-trait/cross_inference_rpit.rs +++ b/tests/ui/type-alias-impl-trait/cross_inference_rpit.rs @@ -1,4 +1,4 @@ -// check-pass +//@ check-pass fn foo(b: bool) -> impl Copy { if b { diff --git a/tests/ui/type-alias-impl-trait/debug-ty-with-weak.rs b/tests/ui/type-alias-impl-trait/debug-ty-with-weak.rs index 44158349fdd..7e743fc09dd 100644 --- a/tests/ui/type-alias-impl-trait/debug-ty-with-weak.rs +++ b/tests/ui/type-alias-impl-trait/debug-ty-with-weak.rs @@ -1,5 +1,5 @@ -// compile-flags: --crate-type=lib -Cdebuginfo=2 -// build-pass +//@ compile-flags: --crate-type=lib -Cdebuginfo=2 +//@ build-pass #![feature(type_alias_impl_trait)] diff --git a/tests/ui/type-alias-impl-trait/defined-by-user-annotation.rs b/tests/ui/type-alias-impl-trait/defined-by-user-annotation.rs index 5a421ea1dc0..d97a3010a17 100644 --- a/tests/ui/type-alias-impl-trait/defined-by-user-annotation.rs +++ b/tests/ui/type-alias-impl-trait/defined-by-user-annotation.rs @@ -1,5 +1,5 @@ // User type annotation in fn bodies is a a valid defining site for opaque types. -// check-pass +//@ check-pass #![feature(type_alias_impl_trait)] trait Equate { type Proj; } diff --git a/tests/ui/type-alias-impl-trait/defining-use-submodule.rs b/tests/ui/type-alias-impl-trait/defining-use-submodule.rs index 4d84b2cbbe9..3e7bc32640f 100644 --- a/tests/ui/type-alias-impl-trait/defining-use-submodule.rs +++ b/tests/ui/type-alias-impl-trait/defining-use-submodule.rs @@ -1,4 +1,4 @@ -// check-pass +//@ check-pass #![feature(type_alias_impl_trait)] #![allow(dead_code)] diff --git a/tests/ui/type-alias-impl-trait/destructure_tait-ice-113594.rs b/tests/ui/type-alias-impl-trait/destructure_tait-ice-113594.rs index 7c2d68cceb8..eadf21c9138 100644 --- a/tests/ui/type-alias-impl-trait/destructure_tait-ice-113594.rs +++ b/tests/ui/type-alias-impl-trait/destructure_tait-ice-113594.rs @@ -1,5 +1,5 @@ -// build-pass -// edition: 2021 +//@ build-pass +//@ edition: 2021 #![feature(type_alias_impl_trait)] diff --git a/tests/ui/type-alias-impl-trait/destructure_tait-layout_of-ice-113594.rs b/tests/ui/type-alias-impl-trait/destructure_tait-layout_of-ice-113594.rs index 8568b26bea2..17d8a44430d 100644 --- a/tests/ui/type-alias-impl-trait/destructure_tait-layout_of-ice-113594.rs +++ b/tests/ui/type-alias-impl-trait/destructure_tait-layout_of-ice-113594.rs @@ -1,5 +1,5 @@ -// build-pass -// edition: 2021 +//@ build-pass +//@ edition: 2021 #![feature(type_alias_impl_trait)] diff --git a/tests/ui/type-alias-impl-trait/destructuring.rs b/tests/ui/type-alias-impl-trait/destructuring.rs index b752e58380a..5122522dca6 100644 --- a/tests/ui/type-alias-impl-trait/destructuring.rs +++ b/tests/ui/type-alias-impl-trait/destructuring.rs @@ -1,6 +1,6 @@ #![feature(type_alias_impl_trait)] -// check-pass +//@ check-pass // issue: https://github.com/rust-lang/rust/issues/104551 diff --git a/tests/ui/type-alias-impl-trait/different_defining_uses_never_type2.rs b/tests/ui/type-alias-impl-trait/different_defining_uses_never_type2.rs index 8549687ea78..c39cc192dc7 100644 --- a/tests/ui/type-alias-impl-trait/different_defining_uses_never_type2.rs +++ b/tests/ui/type-alias-impl-trait/different_defining_uses_never_type2.rs @@ -1,4 +1,4 @@ -// build-pass (FIXME(62277): could be check-pass?) +//@ build-pass (FIXME(62277): could be check-pass?) #![feature(type_alias_impl_trait)] diff --git a/tests/ui/type-alias-impl-trait/drop-shim-relates-opaque-issue-114375.rs b/tests/ui/type-alias-impl-trait/drop-shim-relates-opaque-issue-114375.rs index 51d28704972..b1658b166f3 100644 --- a/tests/ui/type-alias-impl-trait/drop-shim-relates-opaque-issue-114375.rs +++ b/tests/ui/type-alias-impl-trait/drop-shim-relates-opaque-issue-114375.rs @@ -1,6 +1,6 @@ -// aux-build:drop-shim-relates-opaque-aux.rs -// compile-flags: -Zvalidate-mir --crate-type=lib -// build-pass +//@ aux-build:drop-shim-relates-opaque-aux.rs +//@ compile-flags: -Zvalidate-mir --crate-type=lib +//@ build-pass extern crate drop_shim_relates_opaque_aux; diff --git a/tests/ui/type-alias-impl-trait/duplicate-lifetimes-from-rpit-containing-tait.rs b/tests/ui/type-alias-impl-trait/duplicate-lifetimes-from-rpit-containing-tait.rs index 4c56fe2d1dc..b1d5961067b 100644 --- a/tests/ui/type-alias-impl-trait/duplicate-lifetimes-from-rpit-containing-tait.rs +++ b/tests/ui/type-alias-impl-trait/duplicate-lifetimes-from-rpit-containing-tait.rs @@ -1,4 +1,4 @@ -// check-pass +//@ check-pass #![feature(type_alias_impl_trait)] diff --git a/tests/ui/type-alias-impl-trait/duplicate-lifetimes-from-rpit-containing-tait2.rs b/tests/ui/type-alias-impl-trait/duplicate-lifetimes-from-rpit-containing-tait2.rs index 97f8c799fc5..f0674fb0c97 100644 --- a/tests/ui/type-alias-impl-trait/duplicate-lifetimes-from-rpit-containing-tait2.rs +++ b/tests/ui/type-alias-impl-trait/duplicate-lifetimes-from-rpit-containing-tait2.rs @@ -1,5 +1,5 @@ -// check-pass -// edition: 2021 +//@ check-pass +//@ edition: 2021 #![feature(type_alias_impl_trait)] diff --git a/tests/ui/type-alias-impl-trait/field-types.rs b/tests/ui/type-alias-impl-trait/field-types.rs index d99ed58127b..24e430afac3 100644 --- a/tests/ui/type-alias-impl-trait/field-types.rs +++ b/tests/ui/type-alias-impl-trait/field-types.rs @@ -1,7 +1,7 @@ #![feature(type_alias_impl_trait)] #![allow(dead_code)] -// check-pass +//@ check-pass use std::fmt::Debug; diff --git a/tests/ui/type-alias-impl-trait/future.rs b/tests/ui/type-alias-impl-trait/future.rs index 56323216eff..36d1dcd00ad 100644 --- a/tests/ui/type-alias-impl-trait/future.rs +++ b/tests/ui/type-alias-impl-trait/future.rs @@ -1,7 +1,7 @@ #![feature(type_alias_impl_trait)] -// edition:2021 -// compile-flags: --crate-type=lib +//@ edition:2021 +//@ compile-flags: --crate-type=lib use std::future::Future; diff --git a/tests/ui/type-alias-impl-trait/generic_duplicate_param_use10.rs b/tests/ui/type-alias-impl-trait/generic_duplicate_param_use10.rs index c17d595dbb3..439214911eb 100644 --- a/tests/ui/type-alias-impl-trait/generic_duplicate_param_use10.rs +++ b/tests/ui/type-alias-impl-trait/generic_duplicate_param_use10.rs @@ -1,4 +1,4 @@ -// check-pass +//@ check-pass #![feature(type_alias_impl_trait)] use std::fmt::Debug; diff --git a/tests/ui/type-alias-impl-trait/generic_duplicate_param_use7.rs b/tests/ui/type-alias-impl-trait/generic_duplicate_param_use7.rs index feebf81eef2..adc912294fd 100644 --- a/tests/ui/type-alias-impl-trait/generic_duplicate_param_use7.rs +++ b/tests/ui/type-alias-impl-trait/generic_duplicate_param_use7.rs @@ -1,4 +1,4 @@ -// check-pass +//@ check-pass #![feature(type_alias_impl_trait)] use std::fmt::Debug; diff --git a/tests/ui/type-alias-impl-trait/generic_lifetime_param.rs b/tests/ui/type-alias-impl-trait/generic_lifetime_param.rs index e109c38c986..b9b34f55e7e 100644 --- a/tests/ui/type-alias-impl-trait/generic_lifetime_param.rs +++ b/tests/ui/type-alias-impl-trait/generic_lifetime_param.rs @@ -1,4 +1,4 @@ -// build-pass (FIXME(62277): could be check-pass?) +//@ build-pass (FIXME(62277): could be check-pass?) #![feature(type_alias_impl_trait)] diff --git a/tests/ui/type-alias-impl-trait/hidden_behind_struct_field.rs b/tests/ui/type-alias-impl-trait/hidden_behind_struct_field.rs index 58778702de6..7b59b369d00 100644 --- a/tests/ui/type-alias-impl-trait/hidden_behind_struct_field.rs +++ b/tests/ui/type-alias-impl-trait/hidden_behind_struct_field.rs @@ -4,7 +4,7 @@ //! if the opaque type is actually used in the field. #![feature(impl_trait_in_assoc_type)] -// check-pass +//@ check-pass use std::marker::PhantomData; diff --git a/tests/ui/type-alias-impl-trait/higher_kinded_params.rs b/tests/ui/type-alias-impl-trait/higher_kinded_params.rs index db1a3a1c7a9..e43f53e4057 100644 --- a/tests/ui/type-alias-impl-trait/higher_kinded_params.rs +++ b/tests/ui/type-alias-impl-trait/higher_kinded_params.rs @@ -1,9 +1,9 @@ //! This test checks that walking into binders //! during opaque type collection does not ICE or raise errors. -// edition: 2021 +//@ edition: 2021 -// check-pass +//@ check-pass #![feature(type_alias_impl_trait)] diff --git a/tests/ui/type-alias-impl-trait/higher_kinded_params2.rs b/tests/ui/type-alias-impl-trait/higher_kinded_params2.rs index f011e5b2148..1022e5c4ece 100644 --- a/tests/ui/type-alias-impl-trait/higher_kinded_params2.rs +++ b/tests/ui/type-alias-impl-trait/higher_kinded_params2.rs @@ -1,7 +1,7 @@ //! This test checks the behaviour of walking into binders //! and normalizing something behind them actually works. -// edition: 2021 +//@ edition: 2021 #![feature(type_alias_impl_trait)] diff --git a/tests/ui/type-alias-impl-trait/higher_kinded_params3.rs b/tests/ui/type-alias-impl-trait/higher_kinded_params3.rs index 6edfccaf7d1..e0bb1e2d02f 100644 --- a/tests/ui/type-alias-impl-trait/higher_kinded_params3.rs +++ b/tests/ui/type-alias-impl-trait/higher_kinded_params3.rs @@ -1,7 +1,7 @@ //! This test checks that we can't actually have an opaque type behind //! a binder that references variables from that binder. -// edition: 2021 +//@ edition: 2021 #![feature(type_alias_impl_trait)] diff --git a/tests/ui/type-alias-impl-trait/impl_trait_for_generic_tait.rs b/tests/ui/type-alias-impl-trait/impl_trait_for_generic_tait.rs index 0efbd1c2bd5..91610c92d22 100644 --- a/tests/ui/type-alias-impl-trait/impl_trait_for_generic_tait.rs +++ b/tests/ui/type-alias-impl-trait/impl_trait_for_generic_tait.rs @@ -1,4 +1,4 @@ -// check-pass +//@ check-pass #![feature(type_alias_impl_trait)] trait Foo { diff --git a/tests/ui/type-alias-impl-trait/impl_trait_for_tait.rs b/tests/ui/type-alias-impl-trait/impl_trait_for_tait.rs index 9f32c5d888b..bce5ba7c91c 100644 --- a/tests/ui/type-alias-impl-trait/impl_trait_for_tait.rs +++ b/tests/ui/type-alias-impl-trait/impl_trait_for_tait.rs @@ -1,5 +1,5 @@ -// compile-flags: --crate-type=lib -// check-pass +//@ compile-flags: --crate-type=lib +//@ check-pass #![feature(type_alias_impl_trait)] type Alias = impl Sized; diff --git a/tests/ui/type-alias-impl-trait/impl_trait_in_trait_defined_outside_trait3.rs b/tests/ui/type-alias-impl-trait/impl_trait_in_trait_defined_outside_trait3.rs index dfcf7336533..7db64f3bf33 100644 --- a/tests/ui/type-alias-impl-trait/impl_trait_in_trait_defined_outside_trait3.rs +++ b/tests/ui/type-alias-impl-trait/impl_trait_in_trait_defined_outside_trait3.rs @@ -1,7 +1,7 @@ //! Check that non-defining assoc items can use the opaque type //! opaquely. -// check-pass +//@ check-pass #![feature(impl_trait_in_assoc_type)] diff --git a/tests/ui/type-alias-impl-trait/implied_bounds2.rs b/tests/ui/type-alias-impl-trait/implied_bounds2.rs index b4c4c013cd2..effedb954c3 100644 --- a/tests/ui/type-alias-impl-trait/implied_bounds2.rs +++ b/tests/ui/type-alias-impl-trait/implied_bounds2.rs @@ -1,4 +1,4 @@ -// check-pass +//@ check-pass #![feature(type_alias_impl_trait)] diff --git a/tests/ui/type-alias-impl-trait/implied_bounds3.rs b/tests/ui/type-alias-impl-trait/implied_bounds3.rs index e39c613281d..5e399c3d06c 100644 --- a/tests/ui/type-alias-impl-trait/implied_bounds3.rs +++ b/tests/ui/type-alias-impl-trait/implied_bounds3.rs @@ -1,4 +1,4 @@ -// check-pass +//@ check-pass fn foo(_: F) where diff --git a/tests/ui/type-alias-impl-trait/implied_lifetime_wf_check.rs b/tests/ui/type-alias-impl-trait/implied_lifetime_wf_check.rs index b6a7264a529..bc9d760cd29 100644 --- a/tests/ui/type-alias-impl-trait/implied_lifetime_wf_check.rs +++ b/tests/ui/type-alias-impl-trait/implied_lifetime_wf_check.rs @@ -1,8 +1,8 @@ #![feature(type_alias_impl_trait)] -// known-bug: #99840 +//@ known-bug: #99840 // this should not compile -// check-pass +//@ check-pass type Alias = impl Sized; diff --git a/tests/ui/type-alias-impl-trait/imply_bounds_from_bounds.rs b/tests/ui/type-alias-impl-trait/imply_bounds_from_bounds.rs index 06c119287d7..4a9f162823e 100644 --- a/tests/ui/type-alias-impl-trait/imply_bounds_from_bounds.rs +++ b/tests/ui/type-alias-impl-trait/imply_bounds_from_bounds.rs @@ -1,4 +1,4 @@ -// check-pass +//@ check-pass #![feature(impl_trait_in_assoc_type, type_alias_impl_trait)] diff --git a/tests/ui/type-alias-impl-trait/indirect-recursion-issue-112047.rs b/tests/ui/type-alias-impl-trait/indirect-recursion-issue-112047.rs index e7b23d5f8a1..1aa64810d19 100644 --- a/tests/ui/type-alias-impl-trait/indirect-recursion-issue-112047.rs +++ b/tests/ui/type-alias-impl-trait/indirect-recursion-issue-112047.rs @@ -1,5 +1,5 @@ -// edition: 2021 -// build-fail +//@ edition: 2021 +//@ build-fail #![feature(impl_trait_in_assoc_type)] diff --git a/tests/ui/type-alias-impl-trait/issue-101750.rs b/tests/ui/type-alias-impl-trait/issue-101750.rs index f564f4fa702..1c5261b7a79 100644 --- a/tests/ui/type-alias-impl-trait/issue-101750.rs +++ b/tests/ui/type-alias-impl-trait/issue-101750.rs @@ -1,6 +1,6 @@ #![feature(type_alias_impl_trait)] -// check-pass +//@ check-pass trait Trait {} diff --git a/tests/ui/type-alias-impl-trait/issue-104817.rs b/tests/ui/type-alias-impl-trait/issue-104817.rs index 0d3bace4db1..4679d025fce 100644 --- a/tests/ui/type-alias-impl-trait/issue-104817.rs +++ b/tests/ui/type-alias-impl-trait/issue-104817.rs @@ -2,8 +2,8 @@ #![cfg_attr(specialized, feature(specialization))] #![allow(incomplete_features)] -// revisions: stock specialized -// [specialized]check-pass +//@ revisions: stock specialized +//@ [specialized]check-pass trait OpaqueTrait {} impl OpaqueTrait for T {} diff --git a/tests/ui/type-alias-impl-trait/issue-109054.rs b/tests/ui/type-alias-impl-trait/issue-109054.rs index 1fbec47b14b..51f30779cd9 100644 --- a/tests/ui/type-alias-impl-trait/issue-109054.rs +++ b/tests/ui/type-alias-impl-trait/issue-109054.rs @@ -1,4 +1,4 @@ -// edition:2021 +//@ edition:2021 #![feature(type_alias_impl_trait)] diff --git a/tests/ui/type-alias-impl-trait/issue-53398-cyclic-types.rs b/tests/ui/type-alias-impl-trait/issue-53398-cyclic-types.rs index b89c3e4590f..ae463b6ef5b 100644 --- a/tests/ui/type-alias-impl-trait/issue-53398-cyclic-types.rs +++ b/tests/ui/type-alias-impl-trait/issue-53398-cyclic-types.rs @@ -1,6 +1,6 @@ #![feature(type_alias_impl_trait)] -// check-pass +//@ check-pass type Foo = impl Fn() -> Foo; diff --git a/tests/ui/type-alias-impl-trait/issue-53678-coroutine-and-const-fn.rs b/tests/ui/type-alias-impl-trait/issue-53678-coroutine-and-const-fn.rs index ad1ede9c3e4..cd14bc1fd09 100644 --- a/tests/ui/type-alias-impl-trait/issue-53678-coroutine-and-const-fn.rs +++ b/tests/ui/type-alias-impl-trait/issue-53678-coroutine-and-const-fn.rs @@ -1,7 +1,7 @@ #![feature(coroutines, coroutine_trait, rustc_attrs)] #![feature(type_alias_impl_trait)] -// check-pass +//@ check-pass mod gen { use std::ops::Coroutine; diff --git a/tests/ui/type-alias-impl-trait/issue-55099-lifetime-inference.rs b/tests/ui/type-alias-impl-trait/issue-55099-lifetime-inference.rs index af0780ab0b9..e54dd01122e 100644 --- a/tests/ui/type-alias-impl-trait/issue-55099-lifetime-inference.rs +++ b/tests/ui/type-alias-impl-trait/issue-55099-lifetime-inference.rs @@ -1,4 +1,4 @@ -// check-pass +//@ check-pass // Regression test for issue #55099 // Tests that we don't incorrectly consider a lifetime to part // of the concrete type diff --git a/tests/ui/type-alias-impl-trait/issue-57188-associate-impl-capture.rs b/tests/ui/type-alias-impl-trait/issue-57188-associate-impl-capture.rs index 3bdb3bf1d53..43b72b8e549 100644 --- a/tests/ui/type-alias-impl-trait/issue-57188-associate-impl-capture.rs +++ b/tests/ui/type-alias-impl-trait/issue-57188-associate-impl-capture.rs @@ -1,6 +1,6 @@ // Regression test for #57188 -// check-pass +//@ check-pass #![feature(impl_trait_in_assoc_type)] diff --git a/tests/ui/type-alias-impl-trait/issue-57611-trait-alias.rs b/tests/ui/type-alias-impl-trait/issue-57611-trait-alias.rs index 3917bb3b6cf..eedf7f4a844 100644 --- a/tests/ui/type-alias-impl-trait/issue-57611-trait-alias.rs +++ b/tests/ui/type-alias-impl-trait/issue-57611-trait-alias.rs @@ -1,4 +1,4 @@ -// check-pass +//@ check-pass // Regression test for issue #57611 // Ensures that we don't ICE diff --git a/tests/ui/type-alias-impl-trait/issue-57807-associated-type.rs b/tests/ui/type-alias-impl-trait/issue-57807-associated-type.rs index 841bac5f6a0..e046c73948e 100644 --- a/tests/ui/type-alias-impl-trait/issue-57807-associated-type.rs +++ b/tests/ui/type-alias-impl-trait/issue-57807-associated-type.rs @@ -1,7 +1,7 @@ // Regression test for issue #57807 - ensure // that we properly unify associated types within // a type alias impl trait -// check-pass +//@ check-pass #![feature(impl_trait_in_assoc_type)] trait Bar { diff --git a/tests/ui/type-alias-impl-trait/issue-58662-coroutine-with-lifetime.rs b/tests/ui/type-alias-impl-trait/issue-58662-coroutine-with-lifetime.rs index bc6a3439212..78a1d5116be 100644 --- a/tests/ui/type-alias-impl-trait/issue-58662-coroutine-with-lifetime.rs +++ b/tests/ui/type-alias-impl-trait/issue-58662-coroutine-with-lifetime.rs @@ -1,4 +1,4 @@ -// check-pass +//@ check-pass #![feature(coroutines, coroutine_trait)] #![feature(type_alias_impl_trait)] diff --git a/tests/ui/type-alias-impl-trait/issue-58662-simplified.rs b/tests/ui/type-alias-impl-trait/issue-58662-simplified.rs index a1cf23dab7b..9d74c0687fe 100644 --- a/tests/ui/type-alias-impl-trait/issue-58662-simplified.rs +++ b/tests/ui/type-alias-impl-trait/issue-58662-simplified.rs @@ -1,4 +1,4 @@ -// check-pass +//@ check-pass #![feature(coroutines, coroutine_trait)] #![feature(type_alias_impl_trait)] diff --git a/tests/ui/type-alias-impl-trait/issue-58887.rs b/tests/ui/type-alias-impl-trait/issue-58887.rs index 68d85ed6b0f..51d8595adf1 100644 --- a/tests/ui/type-alias-impl-trait/issue-58887.rs +++ b/tests/ui/type-alias-impl-trait/issue-58887.rs @@ -1,4 +1,4 @@ -// check-pass +//@ check-pass #![feature(impl_trait_in_assoc_type)] diff --git a/tests/ui/type-alias-impl-trait/issue-58951-2.rs b/tests/ui/type-alias-impl-trait/issue-58951-2.rs index e4ba7f8e2a6..fb92b127436 100644 --- a/tests/ui/type-alias-impl-trait/issue-58951-2.rs +++ b/tests/ui/type-alias-impl-trait/issue-58951-2.rs @@ -1,4 +1,4 @@ -// check-pass +//@ check-pass #![feature(type_alias_impl_trait)] diff --git a/tests/ui/type-alias-impl-trait/issue-58951.rs b/tests/ui/type-alias-impl-trait/issue-58951.rs index 7303cbab4a8..8a9e586eb25 100644 --- a/tests/ui/type-alias-impl-trait/issue-58951.rs +++ b/tests/ui/type-alias-impl-trait/issue-58951.rs @@ -1,4 +1,4 @@ -// check-pass +//@ check-pass #![feature(type_alias_impl_trait)] diff --git a/tests/ui/type-alias-impl-trait/issue-60564-working.rs b/tests/ui/type-alias-impl-trait/issue-60564-working.rs index c4687c29de8..f215d1bc69e 100644 --- a/tests/ui/type-alias-impl-trait/issue-60564-working.rs +++ b/tests/ui/type-alias-impl-trait/issue-60564-working.rs @@ -1,6 +1,6 @@ #![feature(impl_trait_in_assoc_type)] -// check-pass +//@ check-pass trait IterBits { type BitsIter: Iterator; diff --git a/tests/ui/type-alias-impl-trait/issue-60662.rs b/tests/ui/type-alias-impl-trait/issue-60662.rs index b9faa668b80..35d96e52fd6 100644 --- a/tests/ui/type-alias-impl-trait/issue-60662.rs +++ b/tests/ui/type-alias-impl-trait/issue-60662.rs @@ -1,5 +1,5 @@ -// check-pass -// compile-flags: -Z unpretty=hir +//@ check-pass +//@ compile-flags: -Z unpretty=hir #![feature(type_alias_impl_trait)] diff --git a/tests/ui/type-alias-impl-trait/issue-60662.stdout b/tests/ui/type-alias-impl-trait/issue-60662.stdout index 5b3d7375de0..e643dba1245 100644 --- a/tests/ui/type-alias-impl-trait/issue-60662.stdout +++ b/tests/ui/type-alias-impl-trait/issue-60662.stdout @@ -1,5 +1,5 @@ -// check-pass -// compile-flags: -Z unpretty=hir +//@ check-pass +//@ compile-flags: -Z unpretty=hir #![feature(type_alias_impl_trait)] #[prelude_import] diff --git a/tests/ui/type-alias-impl-trait/issue-62000-associate-impl-trait-lifetimes.rs b/tests/ui/type-alias-impl-trait/issue-62000-associate-impl-trait-lifetimes.rs index 0245eab7969..8434dcba19d 100644 --- a/tests/ui/type-alias-impl-trait/issue-62000-associate-impl-trait-lifetimes.rs +++ b/tests/ui/type-alias-impl-trait/issue-62000-associate-impl-trait-lifetimes.rs @@ -1,6 +1,6 @@ // Regression test for #62988 -// check-pass +//@ check-pass #![feature(impl_trait_in_assoc_type)] diff --git a/tests/ui/type-alias-impl-trait/issue-63263-closure-return.rs b/tests/ui/type-alias-impl-trait/issue-63263-closure-return.rs index ddea7aeb6cd..38abc3ec7e8 100644 --- a/tests/ui/type-alias-impl-trait/issue-63263-closure-return.rs +++ b/tests/ui/type-alias-impl-trait/issue-63263-closure-return.rs @@ -2,7 +2,7 @@ // Tests that we properly handle closures with an explicit return type // that return an opaque type. -// check-pass +//@ check-pass #![feature(type_alias_impl_trait)] diff --git a/tests/ui/type-alias-impl-trait/issue-63355.rs b/tests/ui/type-alias-impl-trait/issue-63355.rs index 7066a0535e1..0c977b30994 100644 --- a/tests/ui/type-alias-impl-trait/issue-63355.rs +++ b/tests/ui/type-alias-impl-trait/issue-63355.rs @@ -1,5 +1,5 @@ #![feature(type_alias_impl_trait)] -// check-pass +//@ check-pass pub trait Foo {} diff --git a/tests/ui/type-alias-impl-trait/issue-63677-type-alias-coherence.rs b/tests/ui/type-alias-impl-trait/issue-63677-type-alias-coherence.rs index 28f4a85c9f2..51f95637969 100644 --- a/tests/ui/type-alias-impl-trait/issue-63677-type-alias-coherence.rs +++ b/tests/ui/type-alias-impl-trait/issue-63677-type-alias-coherence.rs @@ -1,4 +1,4 @@ -// check-pass +//@ check-pass // Regression test for issue #63677 - ensure that // coherence checking can properly handle 'impl trait' // in type aliases diff --git a/tests/ui/type-alias-impl-trait/issue-65679-inst-opaque-ty-from-val-twice.rs b/tests/ui/type-alias-impl-trait/issue-65679-inst-opaque-ty-from-val-twice.rs index 7b3e9e12405..61251d7f6da 100644 --- a/tests/ui/type-alias-impl-trait/issue-65679-inst-opaque-ty-from-val-twice.rs +++ b/tests/ui/type-alias-impl-trait/issue-65679-inst-opaque-ty-from-val-twice.rs @@ -1,4 +1,4 @@ -// check-pass +//@ check-pass #![feature(type_alias_impl_trait, rustc_attrs)] diff --git a/tests/ui/type-alias-impl-trait/issue-65918.rs b/tests/ui/type-alias-impl-trait/issue-65918.rs index 82cc823e494..c81650876c8 100644 --- a/tests/ui/type-alias-impl-trait/issue-65918.rs +++ b/tests/ui/type-alias-impl-trait/issue-65918.rs @@ -1,4 +1,4 @@ -// build-pass +//@ build-pass #![feature(type_alias_impl_trait)] diff --git a/tests/ui/type-alias-impl-trait/issue-66580-closure-coherence.rs b/tests/ui/type-alias-impl-trait/issue-66580-closure-coherence.rs index d97270c3124..0e3d01c2d61 100644 --- a/tests/ui/type-alias-impl-trait/issue-66580-closure-coherence.rs +++ b/tests/ui/type-alias-impl-trait/issue-66580-closure-coherence.rs @@ -1,7 +1,7 @@ // Regression test for issue #66580 // Ensures that we don't try to determine whether a closure // is foreign when it's the underlying type of an opaque type -// check-pass +//@ check-pass #![feature(type_alias_impl_trait)] type Closure = impl FnOnce(); diff --git a/tests/ui/type-alias-impl-trait/issue-67844-nested-opaque.rs b/tests/ui/type-alias-impl-trait/issue-67844-nested-opaque.rs index cd219328a99..c320b0db31b 100644 --- a/tests/ui/type-alias-impl-trait/issue-67844-nested-opaque.rs +++ b/tests/ui/type-alias-impl-trait/issue-67844-nested-opaque.rs @@ -1,4 +1,4 @@ -// check-pass +//@ check-pass // Regression test for issue #67844 // Ensures that we properly handle nested TAIT occurrences // with generic parameters diff --git a/tests/ui/type-alias-impl-trait/issue-69136-inner-lifetime-resolve-ok.rs b/tests/ui/type-alias-impl-trait/issue-69136-inner-lifetime-resolve-ok.rs index a6916eda8b0..8e631fd1b6a 100644 --- a/tests/ui/type-alias-impl-trait/issue-69136-inner-lifetime-resolve-ok.rs +++ b/tests/ui/type-alias-impl-trait/issue-69136-inner-lifetime-resolve-ok.rs @@ -1,6 +1,6 @@ // Test-pass variant of #69136 -// check-pass +//@ check-pass #![feature(type_alias_impl_trait)] diff --git a/tests/ui/type-alias-impl-trait/issue-69323.rs b/tests/ui/type-alias-impl-trait/issue-69323.rs index a9bd6daf2ac..18bc4cf9178 100644 --- a/tests/ui/type-alias-impl-trait/issue-69323.rs +++ b/tests/ui/type-alias-impl-trait/issue-69323.rs @@ -1,4 +1,4 @@ -// check-pass +//@ check-pass #![feature(type_alias_impl_trait)] diff --git a/tests/ui/type-alias-impl-trait/issue-72793.rs b/tests/ui/type-alias-impl-trait/issue-72793.rs index 828c871143a..9389517e37b 100644 --- a/tests/ui/type-alias-impl-trait/issue-72793.rs +++ b/tests/ui/type-alias-impl-trait/issue-72793.rs @@ -1,5 +1,5 @@ -// check-pass -// compile-flags: -Zmir-opt-level=3 +//@ check-pass +//@ compile-flags: -Zmir-opt-level=3 #![feature(type_alias_impl_trait)] diff --git a/tests/ui/type-alias-impl-trait/issue-76202-trait-impl-for-tait.rs b/tests/ui/type-alias-impl-trait/issue-76202-trait-impl-for-tait.rs index b6906f68ded..f072bb88792 100644 --- a/tests/ui/type-alias-impl-trait/issue-76202-trait-impl-for-tait.rs +++ b/tests/ui/type-alias-impl-trait/issue-76202-trait-impl-for-tait.rs @@ -1,9 +1,9 @@ // Regression test for issue #76202 // Tests that we don't ICE when we have a trait impl on a TAIT. -// revisions: current next -//[next] compile-flags: -Znext-solver -// check-pass +//@ revisions: current next +//@[next] compile-flags: -Znext-solver +//@ check-pass #![feature(type_alias_impl_trait)] trait Test { diff --git a/tests/ui/type-alias-impl-trait/issue-78450.rs b/tests/ui/type-alias-impl-trait/issue-78450.rs index c51dfb6782b..d1328be8475 100644 --- a/tests/ui/type-alias-impl-trait/issue-78450.rs +++ b/tests/ui/type-alias-impl-trait/issue-78450.rs @@ -1,6 +1,6 @@ -// check-pass -// revisions: current next -//[next] compile-flags: -Znext-solver +//@ check-pass +//@ revisions: current next +//@[next] compile-flags: -Znext-solver #![feature(impl_trait_in_assoc_type)] diff --git a/tests/ui/type-alias-impl-trait/issue-84660-trait-impl-for-tait.rs b/tests/ui/type-alias-impl-trait/issue-84660-trait-impl-for-tait.rs index 2ba4befea2a..2a39da1176c 100644 --- a/tests/ui/type-alias-impl-trait/issue-84660-trait-impl-for-tait.rs +++ b/tests/ui/type-alias-impl-trait/issue-84660-trait-impl-for-tait.rs @@ -1,7 +1,7 @@ // Regression test for issues #84660 and #86411: both are variations on #76202. // Tests that we don't ICE when we have an opaque type appearing anywhere in an impl header. -// check-pass +//@ check-pass #![feature(type_alias_impl_trait)] diff --git a/tests/ui/type-alias-impl-trait/issue-87455-static-lifetime-ice.rs b/tests/ui/type-alias-impl-trait/issue-87455-static-lifetime-ice.rs index 80a74eb63a8..987fad2efea 100644 --- a/tests/ui/type-alias-impl-trait/issue-87455-static-lifetime-ice.rs +++ b/tests/ui/type-alias-impl-trait/issue-87455-static-lifetime-ice.rs @@ -1,4 +1,4 @@ -// check-pass +//@ check-pass use std::error::Error as StdError; use std::pin::Pin; diff --git a/tests/ui/type-alias-impl-trait/issue-89686.rs b/tests/ui/type-alias-impl-trait/issue-89686.rs index de070fc9deb..f734c518dd2 100644 --- a/tests/ui/type-alias-impl-trait/issue-89686.rs +++ b/tests/ui/type-alias-impl-trait/issue-89686.rs @@ -1,4 +1,4 @@ -// edition:2018 +//@ edition:2018 #![feature(type_alias_impl_trait)] diff --git a/tests/ui/type-alias-impl-trait/issue-89952.rs b/tests/ui/type-alias-impl-trait/issue-89952.rs index f0ba9fa7cec..608f2ec3d86 100644 --- a/tests/ui/type-alias-impl-trait/issue-89952.rs +++ b/tests/ui/type-alias-impl-trait/issue-89952.rs @@ -1,4 +1,4 @@ -// check-pass +//@ check-pass #![feature(impl_trait_in_assoc_type)] diff --git a/tests/ui/type-alias-impl-trait/issue-93411.rs b/tests/ui/type-alias-impl-trait/issue-93411.rs index 1f8c789267d..2d08b7ba4c1 100644 --- a/tests/ui/type-alias-impl-trait/issue-93411.rs +++ b/tests/ui/type-alias-impl-trait/issue-93411.rs @@ -1,8 +1,8 @@ #![feature(type_alias_impl_trait)] // this test used to stack overflow due to infinite recursion. -// check-pass -// compile-flags: --edition=2018 +//@ check-pass +//@ compile-flags: --edition=2018 use std::future::Future; diff --git a/tests/ui/type-alias-impl-trait/issue-96572-unconstrained.rs b/tests/ui/type-alias-impl-trait/issue-96572-unconstrained.rs index 5bd854be8c6..7097123d608 100644 --- a/tests/ui/type-alias-impl-trait/issue-96572-unconstrained.rs +++ b/tests/ui/type-alias-impl-trait/issue-96572-unconstrained.rs @@ -1,7 +1,7 @@ #![feature(type_alias_impl_trait)] -// check-pass -// revisions: default edition2021 -//[edition2021] compile-flags: --edition 2021 +//@ check-pass +//@ revisions: default edition2021 +//@[edition2021] compile-flags: --edition 2021 fn main() { type T = impl Copy; diff --git a/tests/ui/type-alias-impl-trait/issue-98604.rs b/tests/ui/type-alias-impl-trait/issue-98604.rs index d07fc9822a0..9231e82d9f4 100644 --- a/tests/ui/type-alias-impl-trait/issue-98604.rs +++ b/tests/ui/type-alias-impl-trait/issue-98604.rs @@ -1,4 +1,4 @@ -// edition:2018 +//@ edition:2018 type AsyncFnPtr = Box std::pin::Pin>>>; diff --git a/tests/ui/type-alias-impl-trait/itiat-allow-nested-closures.rs b/tests/ui/type-alias-impl-trait/itiat-allow-nested-closures.rs index 55994d6a325..d7033bf61a7 100644 --- a/tests/ui/type-alias-impl-trait/itiat-allow-nested-closures.rs +++ b/tests/ui/type-alias-impl-trait/itiat-allow-nested-closures.rs @@ -1,7 +1,7 @@ #![feature(impl_trait_in_assoc_type)] -// revisions: ok bad -// [ok] check-pass +//@ revisions: ok bad +//@ [ok] check-pass trait Foo { type Assoc; diff --git a/tests/ui/type-alias-impl-trait/match-unification.rs b/tests/ui/type-alias-impl-trait/match-unification.rs index f5c2abc0efa..27440c2fdd7 100644 --- a/tests/ui/type-alias-impl-trait/match-unification.rs +++ b/tests/ui/type-alias-impl-trait/match-unification.rs @@ -1,6 +1,6 @@ use std::fmt::Debug; -// check-pass +//@ check-pass fn bar() -> impl Debug {} diff --git a/tests/ui/type-alias-impl-trait/multiple-def-uses-in-one-fn-pass.rs b/tests/ui/type-alias-impl-trait/multiple-def-uses-in-one-fn-pass.rs index 83fd9a1da45..40c00e553a6 100644 --- a/tests/ui/type-alias-impl-trait/multiple-def-uses-in-one-fn-pass.rs +++ b/tests/ui/type-alias-impl-trait/multiple-def-uses-in-one-fn-pass.rs @@ -1,4 +1,4 @@ -// check-pass +//@ check-pass #![feature(type_alias_impl_trait)] type X = impl ToString; diff --git a/tests/ui/type-alias-impl-trait/multiple_definitions.rs b/tests/ui/type-alias-impl-trait/multiple_definitions.rs index 9e6268e63cd..f474e30b980 100644 --- a/tests/ui/type-alias-impl-trait/multiple_definitions.rs +++ b/tests/ui/type-alias-impl-trait/multiple_definitions.rs @@ -1,4 +1,4 @@ -// check-pass +//@ check-pass use std::marker::PhantomData; diff --git a/tests/ui/type-alias-impl-trait/mututally-recursive-overflow.rs b/tests/ui/type-alias-impl-trait/mututally-recursive-overflow.rs index 1ccd1b0cbad..4eb16727ba8 100644 --- a/tests/ui/type-alias-impl-trait/mututally-recursive-overflow.rs +++ b/tests/ui/type-alias-impl-trait/mututally-recursive-overflow.rs @@ -1,5 +1,5 @@ -// edition: 2021 -// build-fail +//@ edition: 2021 +//@ build-fail //~^^ ERROR overflow evaluating the requirement `<() as B>::Assoc == _` #![feature(rustc_attrs)] diff --git a/tests/ui/type-alias-impl-trait/nested-rpit-with-lifetimes.rs b/tests/ui/type-alias-impl-trait/nested-rpit-with-lifetimes.rs index 11b659eec97..51841795408 100644 --- a/tests/ui/type-alias-impl-trait/nested-rpit-with-lifetimes.rs +++ b/tests/ui/type-alias-impl-trait/nested-rpit-with-lifetimes.rs @@ -1,6 +1,6 @@ // Regression test for issue #83190, triggering an ICE in borrowck. -// check-pass +//@ check-pass pub trait Any {} impl Any for T {} diff --git a/tests/ui/type-alias-impl-trait/nested_impl_trait_in_assoc_ty.rs b/tests/ui/type-alias-impl-trait/nested_impl_trait_in_assoc_ty.rs index 5f3dbaa1798..ad25f06dc1e 100644 --- a/tests/ui/type-alias-impl-trait/nested_impl_trait_in_assoc_ty.rs +++ b/tests/ui/type-alias-impl-trait/nested_impl_trait_in_assoc_ty.rs @@ -4,8 +4,8 @@ //! a signature. They become part of a signature via `dyn Trait` or `impl Trait`, //! which is something that we process abstractly without looking at its hidden //! types. -// edition: 2021 -// check-pass +//@ edition: 2021 +//@ check-pass #![feature(impl_trait_in_assoc_type)] diff --git a/tests/ui/type-alias-impl-trait/nested_in_closure.rs b/tests/ui/type-alias-impl-trait/nested_in_closure.rs index 362f3d53e88..1d6a5d978ee 100644 --- a/tests/ui/type-alias-impl-trait/nested_in_closure.rs +++ b/tests/ui/type-alias-impl-trait/nested_in_closure.rs @@ -1,5 +1,5 @@ #![feature(type_alias_impl_trait)] -// check-pass +//@ check-pass fn main() { let x = || { diff --git a/tests/ui/type-alias-impl-trait/nested_inference_failure.rs b/tests/ui/type-alias-impl-trait/nested_inference_failure.rs index d2091ca96ea..08acfea0004 100644 --- a/tests/ui/type-alias-impl-trait/nested_inference_failure.rs +++ b/tests/ui/type-alias-impl-trait/nested_inference_failure.rs @@ -1,6 +1,6 @@ -// check-pass -// revisions: new old -//[new] compile-flags: -Znext-solver +//@ check-pass +//@ revisions: new old +//@[new] compile-flags: -Znext-solver //! This test checks that we can successfully infer //! the hidden type of `FooImpl` to be `Foo` diff --git a/tests/ui/type-alias-impl-trait/never_reveal_concrete_type.rs b/tests/ui/type-alias-impl-trait/never_reveal_concrete_type.rs index fed5ac07c90..590107d1038 100644 --- a/tests/ui/type-alias-impl-trait/never_reveal_concrete_type.rs +++ b/tests/ui/type-alias-impl-trait/never_reveal_concrete_type.rs @@ -1,5 +1,5 @@ #![feature(type_alias_impl_trait)] -// check-pass +//@ check-pass fn main() {} type NoReveal = impl std::fmt::Debug; diff --git a/tests/ui/type-alias-impl-trait/normalize-alias-type.rs b/tests/ui/type-alias-impl-trait/normalize-alias-type.rs index 7c62002b931..60579926038 100644 --- a/tests/ui/type-alias-impl-trait/normalize-alias-type.rs +++ b/tests/ui/type-alias-impl-trait/normalize-alias-type.rs @@ -1,5 +1,5 @@ -// check-pass -// compile-flags: -Z mir-opt-level=3 +//@ check-pass +//@ compile-flags: -Z mir-opt-level=3 #![feature(type_alias_impl_trait)] #![crate_type = "lib"] pub trait Tr { diff --git a/tests/ui/type-alias-impl-trait/normalize-hidden-types.rs b/tests/ui/type-alias-impl-trait/normalize-hidden-types.rs index 371cac6da7c..e78e6cf7690 100644 --- a/tests/ui/type-alias-impl-trait/normalize-hidden-types.rs +++ b/tests/ui/type-alias-impl-trait/normalize-hidden-types.rs @@ -1,9 +1,9 @@ // Regression test for #112691 // -// revisions: current next -// [next] compile-flags: -Znext-solver -// [next] check-pass -// [current]: known-bug: #112691 +//@ revisions: current next +//@ [next] compile-flags: -Znext-solver +//@ [next] check-pass +//@ [current]: known-bug: #112691 #![feature(type_alias_impl_trait)] diff --git a/tests/ui/type-alias-impl-trait/not_well_formed.fixed b/tests/ui/type-alias-impl-trait/not_well_formed.fixed index d98e83ff6dd..bd45d8cddae 100644 --- a/tests/ui/type-alias-impl-trait/not_well_formed.fixed +++ b/tests/ui/type-alias-impl-trait/not_well_formed.fixed @@ -1,4 +1,4 @@ -// run-rustfix +//@ run-rustfix #![feature(type_alias_impl_trait)] #![allow(dead_code)] diff --git a/tests/ui/type-alias-impl-trait/not_well_formed.rs b/tests/ui/type-alias-impl-trait/not_well_formed.rs index 18f173a693d..7b5444ae0d3 100644 --- a/tests/ui/type-alias-impl-trait/not_well_formed.rs +++ b/tests/ui/type-alias-impl-trait/not_well_formed.rs @@ -1,4 +1,4 @@ -// run-rustfix +//@ run-rustfix #![feature(type_alias_impl_trait)] #![allow(dead_code)] diff --git a/tests/ui/type-alias-impl-trait/obligation_ice.rs b/tests/ui/type-alias-impl-trait/obligation_ice.rs index 5aef04ff19c..e3698b23be8 100644 --- a/tests/ui/type-alias-impl-trait/obligation_ice.rs +++ b/tests/ui/type-alias-impl-trait/obligation_ice.rs @@ -1,5 +1,5 @@ #![feature(type_alias_impl_trait)] -// check-pass +//@ check-pass use std::iter::{once, Chain}; diff --git a/tests/ui/type-alias-impl-trait/outlives-bound-var.rs b/tests/ui/type-alias-impl-trait/outlives-bound-var.rs index b8fac45b76d..0ae2c9600ce 100644 --- a/tests/ui/type-alias-impl-trait/outlives-bound-var.rs +++ b/tests/ui/type-alias-impl-trait/outlives-bound-var.rs @@ -2,7 +2,7 @@ // opaque types with bound vars in substs. // This was an ICE. // -// check-pass +//@ check-pass #![feature(type_alias_impl_trait)] type Ty<'a> = impl Sized + 'a; diff --git a/tests/ui/type-alias-impl-trait/privacy.rs b/tests/ui/type-alias-impl-trait/privacy.rs index 3efbfaf0916..a5386bbec0d 100644 --- a/tests/ui/type-alias-impl-trait/privacy.rs +++ b/tests/ui/type-alias-impl-trait/privacy.rs @@ -1,4 +1,4 @@ -// check-pass +//@ check-pass #![feature(type_alias_impl_trait)] diff --git a/tests/ui/type-alias-impl-trait/rpit_tait_equality_in_canonical_query.rs b/tests/ui/type-alias-impl-trait/rpit_tait_equality_in_canonical_query.rs index 1b02fce2ad9..88a8f6e11a5 100644 --- a/tests/ui/type-alias-impl-trait/rpit_tait_equality_in_canonical_query.rs +++ b/tests/ui/type-alias-impl-trait/rpit_tait_equality_in_canonical_query.rs @@ -5,19 +5,19 @@ //! query, we attempt to actually check the defining anchor, but now we //! have a situation where the RPIT gets constrained outside its anchor. -// revisions: current next -//[next] compile-flags: -Znext-solver -//[next] check-pass - -//[current] known-bug: #108498 -//[current] failure-status: 101 -//[current] normalize-stderr-test: "DefId\(.*?\]::" -> "DefId(" -//[current] normalize-stderr-test: "(?m)note: we would appreciate a bug report.*\n\n" -> "" -//[current] normalize-stderr-test: "(?m)note: rustc.*running on.*\n\n" -> "" -//[current] normalize-stderr-test: "(?m)note: compiler flags.*\n\n" -> "" -//[current] normalize-stderr-test: "(?m)note: delayed at.*$" -> "" -//[current] normalize-stderr-test: "(?m)^ *\d+: .*\n" -> "" -//[current] normalize-stderr-test: "(?m)^ *at .*\n" -> "" +//@ revisions: current next +//@[next] compile-flags: -Znext-solver +//@[next] check-pass + +//@[current] known-bug: #108498 +//@[current] failure-status: 101 +//@[current] normalize-stderr-test: "DefId\(.*?\]::" -> "DefId(" +//@[current] normalize-stderr-test: "(?m)note: we would appreciate a bug report.*\n\n" -> "" +//@[current] normalize-stderr-test: "(?m)note: rustc.*running on.*\n\n" -> "" +//@[current] normalize-stderr-test: "(?m)note: compiler flags.*\n\n" -> "" +//@[current] normalize-stderr-test: "(?m)note: delayed at.*$" -> "" +//@[current] normalize-stderr-test: "(?m)^ *\d+: .*\n" -> "" +//@[current] normalize-stderr-test: "(?m)^ *at .*\n" -> "" #![feature(type_alias_impl_trait)] diff --git a/tests/ui/type-alias-impl-trait/rpit_tait_equality_in_canonical_query_2.rs b/tests/ui/type-alias-impl-trait/rpit_tait_equality_in_canonical_query_2.rs index 9d7e647dd94..9cb0316b7a3 100644 --- a/tests/ui/type-alias-impl-trait/rpit_tait_equality_in_canonical_query_2.rs +++ b/tests/ui/type-alias-impl-trait/rpit_tait_equality_in_canonical_query_2.rs @@ -1,7 +1,7 @@ // The canonical query `Projection(::Output = Opaque)` // is the *only* site that defines `Opaque` in MIR typeck. // -// check-pass +//@ check-pass #![feature(type_alias_impl_trait)] diff --git a/tests/ui/type-alias-impl-trait/self-referential-2.rs b/tests/ui/type-alias-impl-trait/self-referential-2.rs index 3a765a2e3ef..abba5b3a203 100644 --- a/tests/ui/type-alias-impl-trait/self-referential-2.rs +++ b/tests/ui/type-alias-impl-trait/self-referential-2.rs @@ -1,6 +1,6 @@ -// revisions: current next -//[next] compile-flags: -Znext-solver -//[next] check-pass +//@ revisions: current next +//@[next] compile-flags: -Znext-solver +//@[next] check-pass #![feature(type_alias_impl_trait)] type Foo = impl std::fmt::Debug; diff --git a/tests/ui/type-alias-impl-trait/self-referential-3.rs b/tests/ui/type-alias-impl-trait/self-referential-3.rs index 922ac662071..b33051da2d7 100644 --- a/tests/ui/type-alias-impl-trait/self-referential-3.rs +++ b/tests/ui/type-alias-impl-trait/self-referential-3.rs @@ -1,4 +1,4 @@ -// ignore-compare-mode-next-solver (hangs) +//@ ignore-compare-mode-next-solver (hangs) #![feature(type_alias_impl_trait)] diff --git a/tests/ui/type-alias-impl-trait/self-referential-4.rs b/tests/ui/type-alias-impl-trait/self-referential-4.rs index caa9e33bad0..29b5a042b7d 100644 --- a/tests/ui/type-alias-impl-trait/self-referential-4.rs +++ b/tests/ui/type-alias-impl-trait/self-referential-4.rs @@ -1,4 +1,4 @@ -// ignore-compare-mode-next-solver (hangs) +//@ ignore-compare-mode-next-solver (hangs) #![feature(type_alias_impl_trait)] diff --git a/tests/ui/type-alias-impl-trait/self-referential.rs b/tests/ui/type-alias-impl-trait/self-referential.rs index 0900d7279ca..3090f7733d2 100644 --- a/tests/ui/type-alias-impl-trait/self-referential.rs +++ b/tests/ui/type-alias-impl-trait/self-referential.rs @@ -1,4 +1,4 @@ -// ignore-compare-mode-next-solver (hangs) +//@ ignore-compare-mode-next-solver (hangs) #![feature(type_alias_impl_trait)] diff --git a/tests/ui/type-alias-impl-trait/self_implication.rs b/tests/ui/type-alias-impl-trait/self_implication.rs index 65659a0f3b1..eed13933a03 100644 --- a/tests/ui/type-alias-impl-trait/self_implication.rs +++ b/tests/ui/type-alias-impl-trait/self_implication.rs @@ -1,4 +1,4 @@ -// check-pass +//@ check-pass #![feature(type_alias_impl_trait)] fn foo() { diff --git a/tests/ui/type-alias-impl-trait/static-const-types.rs b/tests/ui/type-alias-impl-trait/static-const-types.rs index 748a279e439..dad515aaa7b 100644 --- a/tests/ui/type-alias-impl-trait/static-const-types.rs +++ b/tests/ui/type-alias-impl-trait/static-const-types.rs @@ -1,7 +1,7 @@ #![feature(type_alias_impl_trait)] #![allow(dead_code)] -// check-pass +//@ check-pass use std::fmt::Debug; diff --git a/tests/ui/type-alias-impl-trait/struct-assignment-validity.rs b/tests/ui/type-alias-impl-trait/struct-assignment-validity.rs index 39f0b9a02ee..9901c8fe25d 100644 --- a/tests/ui/type-alias-impl-trait/struct-assignment-validity.rs +++ b/tests/ui/type-alias-impl-trait/struct-assignment-validity.rs @@ -1,5 +1,5 @@ -// compile-flags: -Zvalidate-mir -// check-pass +//@ compile-flags: -Zvalidate-mir +//@ check-pass // Check that we don't cause cycle errors when validating pre-`Reveal::All` MIR // that assigns opaques through normalized projections. diff --git a/tests/ui/type-alias-impl-trait/tait-normalize.rs b/tests/ui/type-alias-impl-trait/tait-normalize.rs index 26d94dbb42a..38e09b6087b 100644 --- a/tests/ui/type-alias-impl-trait/tait-normalize.rs +++ b/tests/ui/type-alias-impl-trait/tait-normalize.rs @@ -1,4 +1,4 @@ -// check-pass +//@ check-pass #![feature(type_alias_impl_trait)] diff --git a/tests/ui/type-alias-impl-trait/type-alias-impl-trait-assoc-dyn.rs b/tests/ui/type-alias-impl-trait/type-alias-impl-trait-assoc-dyn.rs index f6a83029670..66a6c0a35b5 100644 --- a/tests/ui/type-alias-impl-trait/type-alias-impl-trait-assoc-dyn.rs +++ b/tests/ui/type-alias-impl-trait/type-alias-impl-trait-assoc-dyn.rs @@ -1,4 +1,4 @@ -// check-pass +//@ check-pass #![feature(type_alias_impl_trait)] #![allow(dead_code)] diff --git a/tests/ui/type-alias-impl-trait/type-alias-impl-trait-assoc-impl-trait.rs b/tests/ui/type-alias-impl-trait/type-alias-impl-trait-assoc-impl-trait.rs index fddecfcacf6..e46d2bd559c 100644 --- a/tests/ui/type-alias-impl-trait/type-alias-impl-trait-assoc-impl-trait.rs +++ b/tests/ui/type-alias-impl-trait/type-alias-impl-trait-assoc-impl-trait.rs @@ -1,4 +1,4 @@ -// check-pass +//@ check-pass #![feature(type_alias_impl_trait)] #![allow(dead_code)] diff --git a/tests/ui/type-alias-impl-trait/type-alias-impl-trait-const.rs b/tests/ui/type-alias-impl-trait/type-alias-impl-trait-const.rs index 5630e036be3..6b37552fed1 100644 --- a/tests/ui/type-alias-impl-trait/type-alias-impl-trait-const.rs +++ b/tests/ui/type-alias-impl-trait/type-alias-impl-trait-const.rs @@ -1,5 +1,5 @@ #![feature(type_alias_impl_trait)] -// check-pass +//@ check-pass // Ensures that `const` items can constrain an opaque `impl Trait`. use std::fmt::Debug; diff --git a/tests/ui/type-alias-impl-trait/type-alias-impl-trait-fns.rs b/tests/ui/type-alias-impl-trait/type-alias-impl-trait-fns.rs index 4e7388517a5..bd580a78984 100644 --- a/tests/ui/type-alias-impl-trait/type-alias-impl-trait-fns.rs +++ b/tests/ui/type-alias-impl-trait/type-alias-impl-trait-fns.rs @@ -1,4 +1,4 @@ -// check-pass +//@ check-pass #![feature(type_alias_impl_trait)] diff --git a/tests/ui/type-alias-impl-trait/type-alias-impl-trait-sized.rs b/tests/ui/type-alias-impl-trait/type-alias-impl-trait-sized.rs index c5e8068e5c8..188b23732f9 100644 --- a/tests/ui/type-alias-impl-trait/type-alias-impl-trait-sized.rs +++ b/tests/ui/type-alias-impl-trait/type-alias-impl-trait-sized.rs @@ -1,4 +1,4 @@ -// check-pass +//@ check-pass #![feature(type_alias_impl_trait)] diff --git a/tests/ui/type-alias-impl-trait/type-alias-impl-trait-struct.rs b/tests/ui/type-alias-impl-trait/type-alias-impl-trait-struct.rs index 1a4064055db..1340a4214ee 100644 --- a/tests/ui/type-alias-impl-trait/type-alias-impl-trait-struct.rs +++ b/tests/ui/type-alias-impl-trait/type-alias-impl-trait-struct.rs @@ -1,4 +1,4 @@ -// check-pass +//@ check-pass #![feature(type_alias_impl_trait)] #![allow(dead_code)] diff --git a/tests/ui/type-alias-impl-trait/type-alias-impl-trait-tuple.rs b/tests/ui/type-alias-impl-trait/type-alias-impl-trait-tuple.rs index 7bf899a96be..8d0456e587c 100644 --- a/tests/ui/type-alias-impl-trait/type-alias-impl-trait-tuple.rs +++ b/tests/ui/type-alias-impl-trait/type-alias-impl-trait-tuple.rs @@ -1,6 +1,6 @@ -// revisions: current next -//[next] compile-flags: -Znext-solver -//[current] check-pass +//@ revisions: current next +//@[next] compile-flags: -Znext-solver +//@[current] check-pass #![feature(type_alias_impl_trait)] #![allow(dead_code)] diff --git a/tests/ui/type-alias-impl-trait/type-alias-impl-trait.rs b/tests/ui/type-alias-impl-trait/type-alias-impl-trait.rs index 70c2ee4278c..0fe653ac471 100644 --- a/tests/ui/type-alias-impl-trait/type-alias-impl-trait.rs +++ b/tests/ui/type-alias-impl-trait/type-alias-impl-trait.rs @@ -1,4 +1,4 @@ -// check-pass +//@ check-pass #![allow(dead_code)] #![allow(unused_assignments)] diff --git a/tests/ui/type-alias-impl-trait/type-alias-impl-trait2.rs b/tests/ui/type-alias-impl-trait/type-alias-impl-trait2.rs index 67f56bcde93..65e2feaf795 100644 --- a/tests/ui/type-alias-impl-trait/type-alias-impl-trait2.rs +++ b/tests/ui/type-alias-impl-trait/type-alias-impl-trait2.rs @@ -1,4 +1,4 @@ -// check-pass +//@ check-pass #![allow(dead_code)] #![allow(unused_assignments)] diff --git a/tests/ui/type-alias-impl-trait/type-alias-nested-impl-trait.rs b/tests/ui/type-alias-impl-trait/type-alias-nested-impl-trait.rs index fd954801dc0..af575a4ff36 100644 --- a/tests/ui/type-alias-impl-trait/type-alias-nested-impl-trait.rs +++ b/tests/ui/type-alias-impl-trait/type-alias-nested-impl-trait.rs @@ -1,4 +1,4 @@ -// run-pass +//@ run-pass #![feature(type_alias_impl_trait)] diff --git a/tests/ui/type-alias-impl-trait/type_of_a_let.rs b/tests/ui/type-alias-impl-trait/type_of_a_let.rs index 0f4dac6c683..48fcac92bec 100644 --- a/tests/ui/type-alias-impl-trait/type_of_a_let.rs +++ b/tests/ui/type-alias-impl-trait/type_of_a_let.rs @@ -1,6 +1,6 @@ -// revisions: current next -//[next] compile-flags: -Znext-solver -//[next] check-pass +//@ revisions: current next +//@[next] compile-flags: -Znext-solver +//@[next] check-pass #![feature(type_alias_impl_trait)] #![allow(dead_code)] diff --git a/tests/ui/type-alias-impl-trait/unbounded_opaque_type.rs b/tests/ui/type-alias-impl-trait/unbounded_opaque_type.rs index f43ad7dce1d..03afec859d2 100644 --- a/tests/ui/type-alias-impl-trait/unbounded_opaque_type.rs +++ b/tests/ui/type-alias-impl-trait/unbounded_opaque_type.rs @@ -1,4 +1,4 @@ -// check-pass +//@ check-pass #![feature(type_alias_impl_trait)] type Opaque = impl Sized; diff --git a/tests/ui/type-alias-impl-trait/unused_generic_param.rs b/tests/ui/type-alias-impl-trait/unused_generic_param.rs index ad5e4918cca..b675bc2e622 100644 --- a/tests/ui/type-alias-impl-trait/unused_generic_param.rs +++ b/tests/ui/type-alias-impl-trait/unused_generic_param.rs @@ -1,4 +1,4 @@ -// check-pass +//@ check-pass #![feature(type_alias_impl_trait)] #![allow(dead_code)] diff --git a/tests/ui/type-alias-impl-trait/weird-return-types.rs b/tests/ui/type-alias-impl-trait/weird-return-types.rs index faad5ee956a..29d4faa7ba9 100644 --- a/tests/ui/type-alias-impl-trait/weird-return-types.rs +++ b/tests/ui/type-alias-impl-trait/weird-return-types.rs @@ -1,5 +1,5 @@ -// edition:2018 -// check-pass +//@ edition:2018 +//@ check-pass #![feature(type_alias_impl_trait)] #![allow(dead_code)] diff --git a/tests/ui/type-alias-impl-trait/wf-check-fn-ptrs.rs b/tests/ui/type-alias-impl-trait/wf-check-fn-ptrs.rs index 3b8470e4ae6..1484d9fd073 100644 --- a/tests/ui/type-alias-impl-trait/wf-check-fn-ptrs.rs +++ b/tests/ui/type-alias-impl-trait/wf-check-fn-ptrs.rs @@ -1,6 +1,6 @@ #![feature(type_alias_impl_trait)] -// build-pass +//@ build-pass trait Bar { fn bar(&self); diff --git a/tests/ui/type-alias-impl-trait/wf-check-rpit-lifetimes.rs b/tests/ui/type-alias-impl-trait/wf-check-rpit-lifetimes.rs index b92e15aad56..bca146ffd11 100644 --- a/tests/ui/type-alias-impl-trait/wf-check-rpit-lifetimes.rs +++ b/tests/ui/type-alias-impl-trait/wf-check-rpit-lifetimes.rs @@ -1,4 +1,4 @@ -//check-pass +//@check-pass pub struct Key; #[derive(Clone)] diff --git a/tests/ui/type-alias-impl-trait/wf-in-associated-type.rs b/tests/ui/type-alias-impl-trait/wf-in-associated-type.rs index 22e2b0efd1f..c20be3125bc 100644 --- a/tests/ui/type-alias-impl-trait/wf-in-associated-type.rs +++ b/tests/ui/type-alias-impl-trait/wf-in-associated-type.rs @@ -1,10 +1,10 @@ // WF check for impl Trait in associated type position. // -// revisions: pass pass_next fail -// [pass] check-pass -// [pass_next] compile-flags: -Znext-solver -// [pass_next] check-pass -// [fail] check-fail +//@ revisions: pass pass_next fail +//@ [pass] check-pass +//@ [pass_next] compile-flags: -Znext-solver +//@ [pass_next] check-pass +//@ [fail] check-fail #![feature(impl_trait_in_assoc_type)] diff --git a/tests/ui/type-alias-impl-trait/wf-nested.rs b/tests/ui/type-alias-impl-trait/wf-nested.rs index 2f90c4e00e3..1fc93a3cd27 100644 --- a/tests/ui/type-alias-impl-trait/wf-nested.rs +++ b/tests/ui/type-alias-impl-trait/wf-nested.rs @@ -2,10 +2,10 @@ // `type Outer = impl Trait`. // See the comments below. // -// revisions: pass pass_sound fail -// [pass] check-pass -// [pass_sound] check-fail -// [fail] check-fail +//@ revisions: pass pass_sound fail +//@ [pass] check-pass +//@ [pass_sound] check-fail +//@ [fail] check-fail #![feature(type_alias_impl_trait)] diff --git a/tests/ui/type-alias/issue-14933.rs b/tests/ui/type-alias/issue-14933.rs index bd95332caba..ddad6071017 100644 --- a/tests/ui/type-alias/issue-14933.rs +++ b/tests/ui/type-alias/issue-14933.rs @@ -1,5 +1,5 @@ -// check-pass -// pretty-expanded FIXME #23616 +//@ check-pass +//@ pretty-expanded FIXME #23616 pub type BigRat = T; diff --git a/tests/ui/type-alias/issue-37515.rs b/tests/ui/type-alias/issue-37515.rs index b3a870d505a..28875c97f2d 100644 --- a/tests/ui/type-alias/issue-37515.rs +++ b/tests/ui/type-alias/issue-37515.rs @@ -1,4 +1,4 @@ -// check-pass +//@ check-pass #![warn(unused)] diff --git a/tests/ui/type-id-higher-rank-2.rs b/tests/ui/type-id-higher-rank-2.rs index 5391c849dad..4a76b737e8c 100644 --- a/tests/ui/type-id-higher-rank-2.rs +++ b/tests/ui/type-id-higher-rank-2.rs @@ -1,4 +1,4 @@ -// run-pass +//@ run-pass // Test that we can't ignore lifetimes by going through Any. use std::any::Any; diff --git a/tests/ui/type-inference/generalize-subtyped-variables.rs b/tests/ui/type-inference/generalize-subtyped-variables.rs index f93408a43db..b7cae32ee32 100644 --- a/tests/ui/type-inference/generalize-subtyped-variables.rs +++ b/tests/ui/type-inference/generalize-subtyped-variables.rs @@ -13,7 +13,7 @@ // to generalize `z` to first (when related to the type of `y`). // // Found when considering fixes to #117151 -// check-pass +//@ check-pass fn main() { let mut x = None; diff --git a/tests/ui/type-inference/issue-113283-alllocator-trait-eq.rs b/tests/ui/type-inference/issue-113283-alllocator-trait-eq.rs index 5d0e456d9dd..d4bf3cc5cdb 100644 --- a/tests/ui/type-inference/issue-113283-alllocator-trait-eq.rs +++ b/tests/ui/type-inference/issue-113283-alllocator-trait-eq.rs @@ -1,4 +1,4 @@ -// run-pass +//@ run-pass // Verify that PartialEq implementations do not break type inference when // accepting types with different allocators diff --git a/tests/ui/type-namespace.rs b/tests/ui/type-namespace.rs index 3cc0bc447a5..31dc684a214 100644 --- a/tests/ui/type-namespace.rs +++ b/tests/ui/type-namespace.rs @@ -1,4 +1,4 @@ -// run-pass +//@ run-pass struct A { a: isize } diff --git a/tests/ui/type-param-constraints.rs b/tests/ui/type-param-constraints.rs index 3d87a089fca..a5c36af63fa 100644 --- a/tests/ui/type-param-constraints.rs +++ b/tests/ui/type-param-constraints.rs @@ -1,8 +1,8 @@ -// run-pass +//@ run-pass #![allow(non_camel_case_types)] #![allow(dead_code)] -// pretty-expanded FIXME #23616 +//@ pretty-expanded FIXME #23616 fn p_foo(_pinned: T) { } fn s_foo(_shared: T) { } diff --git a/tests/ui/type-param.rs b/tests/ui/type-param.rs index ca2f24d379b..fdb56feab82 100644 --- a/tests/ui/type-param.rs +++ b/tests/ui/type-param.rs @@ -1,10 +1,10 @@ -// run-pass +//@ run-pass #![allow(non_camel_case_types)] #![allow(dead_code)] -// pretty-expanded FIXME #23616 +//@ pretty-expanded FIXME #23616 type lteq = extern "C" fn(T) -> bool; diff --git a/tests/ui/type-ptr.rs b/tests/ui/type-ptr.rs index 7c2438d38bd..8f3868fc609 100644 --- a/tests/ui/type-ptr.rs +++ b/tests/ui/type-ptr.rs @@ -1,7 +1,7 @@ -// run-pass +//@ run-pass #![allow(dead_code)] -// pretty-expanded FIXME #23616 +//@ pretty-expanded FIXME #23616 fn f(a: *const isize) -> *const isize { return a; } diff --git a/tests/ui/type-use-i1-versus-i8.rs b/tests/ui/type-use-i1-versus-i8.rs index 7315cd2feea..916a77d9934 100644 --- a/tests/ui/type-use-i1-versus-i8.rs +++ b/tests/ui/type-use-i1-versus-i8.rs @@ -1,5 +1,5 @@ -// run-pass -// pretty-expanded FIXME #23616 +//@ run-pass +//@ pretty-expanded FIXME #23616 use std::ptr; diff --git a/tests/ui/type/ascription/issue-47666.fixed b/tests/ui/type/ascription/issue-47666.fixed index 027c692f900..5facc83bc63 100644 --- a/tests/ui/type/ascription/issue-47666.fixed +++ b/tests/ui/type/ascription/issue-47666.fixed @@ -1,4 +1,4 @@ -// run-rustfix +//@ run-rustfix fn main() { let _ = Option::Some(vec![0, 1]); //~ ERROR path separator must be a double colon } diff --git a/tests/ui/type/ascription/issue-47666.rs b/tests/ui/type/ascription/issue-47666.rs index e2f5d03ef74..a529b00b480 100644 --- a/tests/ui/type/ascription/issue-47666.rs +++ b/tests/ui/type/ascription/issue-47666.rs @@ -1,4 +1,4 @@ -// run-rustfix +//@ run-rustfix fn main() { let _ = Option:Some(vec![0, 1]); //~ ERROR path separator must be a double colon } diff --git a/tests/ui/type/ascription/issue-54516.fixed b/tests/ui/type/ascription/issue-54516.fixed index 48622663b4d..cf65d08e2fb 100644 --- a/tests/ui/type/ascription/issue-54516.fixed +++ b/tests/ui/type/ascription/issue-54516.fixed @@ -1,4 +1,4 @@ -// run-rustfix +//@ run-rustfix use std::collections::BTreeMap; fn main() { diff --git a/tests/ui/type/ascription/issue-54516.rs b/tests/ui/type/ascription/issue-54516.rs index 9e71d2af1d3..b087870abb5 100644 --- a/tests/ui/type/ascription/issue-54516.rs +++ b/tests/ui/type/ascription/issue-54516.rs @@ -1,4 +1,4 @@ -// run-rustfix +//@ run-rustfix use std::collections::BTreeMap; fn main() { diff --git a/tests/ui/type/ascription/issue-60933.fixed b/tests/ui/type/ascription/issue-60933.fixed index 016ad4a7e6a..8cce8e96c74 100644 --- a/tests/ui/type/ascription/issue-60933.fixed +++ b/tests/ui/type/ascription/issue-60933.fixed @@ -1,4 +1,4 @@ -// run-rustfix +//@ run-rustfix fn main() { let _: usize = std::mem::size_of::(); //~^ ERROR path separator must be a double colon diff --git a/tests/ui/type/ascription/issue-60933.rs b/tests/ui/type/ascription/issue-60933.rs index 972bf2827f9..048423289cc 100644 --- a/tests/ui/type/ascription/issue-60933.rs +++ b/tests/ui/type/ascription/issue-60933.rs @@ -1,4 +1,4 @@ -// run-rustfix +//@ run-rustfix fn main() { let _: usize = std::mem:size_of::(); //~^ ERROR path separator must be a double colon diff --git a/tests/ui/type/issue-67690-type-alias-bound-diagnostic-crash.rs b/tests/ui/type/issue-67690-type-alias-bound-diagnostic-crash.rs index 68aadcf6053..5ee3c027f40 100644 --- a/tests/ui/type/issue-67690-type-alias-bound-diagnostic-crash.rs +++ b/tests/ui/type/issue-67690-type-alias-bound-diagnostic-crash.rs @@ -1,7 +1,7 @@ // Regression test for issue #67690 // Rustc endless loop out-of-memory and consequent SIGKILL in generic new type -// check-pass +//@ check-pass pub type T = P; //~^ WARN bounds on generic parameters are not enforced in type aliases diff --git a/tests/ui/type/issue-91268.rs b/tests/ui/type/issue-91268.rs index 274ea839e8b..16d5b241145 100644 --- a/tests/ui/type/issue-91268.rs +++ b/tests/ui/type/issue-91268.rs @@ -1,4 +1,4 @@ -// error-pattern: this file contains an unclosed delimiter +//@ error-pattern: this file contains an unclosed delimiter // ignore-tidy-trailing-newlines // `Å£` must be the last character in this file, it cannot be followed by a newline fn main() { diff --git a/tests/ui/type/issue-94187-verbose-type-name.rs b/tests/ui/type/issue-94187-verbose-type-name.rs index 7c765d6d810..3c0dc72f234 100644 --- a/tests/ui/type/issue-94187-verbose-type-name.rs +++ b/tests/ui/type/issue-94187-verbose-type-name.rs @@ -1,8 +1,8 @@ // Ensure the output of `std::any::type_name` does not change based on `-Zverbose-internals` -// run-pass -// edition: 2018 -// revisions: normal verbose -// [verbose]compile-flags:-Zverbose-internals --verbose +//@ run-pass +//@ edition: 2018 +//@ revisions: normal verbose +//@ [verbose]compile-flags:-Zverbose-internals --verbose use std::any::type_name; diff --git a/tests/ui/type/missing-let-in-binding-2.fixed b/tests/ui/type/missing-let-in-binding-2.fixed index d64013c8c83..f4e34c739c5 100644 --- a/tests/ui/type/missing-let-in-binding-2.fixed +++ b/tests/ui/type/missing-let-in-binding-2.fixed @@ -1,4 +1,4 @@ -// run-rustfix +//@ run-rustfix fn main() { let _v: Vec = vec![1, 2, 3]; //~ ERROR expected identifier, found `:` diff --git a/tests/ui/type/missing-let-in-binding-2.rs b/tests/ui/type/missing-let-in-binding-2.rs index f95f7bef215..bb813acbc68 100644 --- a/tests/ui/type/missing-let-in-binding-2.rs +++ b/tests/ui/type/missing-let-in-binding-2.rs @@ -1,4 +1,4 @@ -// run-rustfix +//@ run-rustfix fn main() { _v: Vec = vec![1, 2, 3]; //~ ERROR expected identifier, found `:` diff --git a/tests/ui/type/missing-let-in-binding.fixed b/tests/ui/type/missing-let-in-binding.fixed index 4301fed2312..81eda1a1c0b 100644 --- a/tests/ui/type/missing-let-in-binding.fixed +++ b/tests/ui/type/missing-let-in-binding.fixed @@ -1,4 +1,4 @@ -// run-rustfix +//@ run-rustfix fn main() { let mut _foo: i32 = 1; let _foo: i32 = 4; //~ ERROR expected identifier, found `:` diff --git a/tests/ui/type/missing-let-in-binding.rs b/tests/ui/type/missing-let-in-binding.rs index c0f91d98ff3..215df6e4c55 100644 --- a/tests/ui/type/missing-let-in-binding.rs +++ b/tests/ui/type/missing-let-in-binding.rs @@ -1,4 +1,4 @@ -// run-rustfix +//@ run-rustfix fn main() { let mut _foo: i32 = 1; _foo: i32 = 4; //~ ERROR expected identifier, found `:` diff --git a/tests/ui/type/subtyping-opaque-type.rs b/tests/ui/type/subtyping-opaque-type.rs index beda232ea8b..e17114a3647 100644 --- a/tests/ui/type/subtyping-opaque-type.rs +++ b/tests/ui/type/subtyping-opaque-type.rs @@ -1,5 +1,5 @@ -// check-pass -// compile-flags: -Zvalidate-mir +//@ check-pass +//@ compile-flags: -Zvalidate-mir trait Duh {} impl Duh for i32 {} diff --git a/tests/ui/type/type-alias-bounds.rs b/tests/ui/type/type-alias-bounds.rs index e49731725d5..6d63c0c7e1b 100644 --- a/tests/ui/type/type-alias-bounds.rs +++ b/tests/ui/type/type-alias-bounds.rs @@ -1,6 +1,6 @@ // Test `ignored_generic_bounds` lint warning about bounds in type aliases. -// check-pass +//@ check-pass #![allow(dead_code)] use std::rc::Rc; diff --git a/tests/ui/type/type-arg-out-of-scope.rs b/tests/ui/type/type-arg-out-of-scope.rs index c36f9904e5d..3f8a6ff1016 100644 --- a/tests/ui/type/type-arg-out-of-scope.rs +++ b/tests/ui/type/type-arg-out-of-scope.rs @@ -1,4 +1,4 @@ -// error-pattern:can't use generic parameters from outer item +//@ error-pattern:can't use generic parameters from outer item fn foo(x: T) { fn bar(f: Box T>) { } } diff --git a/tests/ui/type/type-ascription-with-fn-call.fixed b/tests/ui/type/type-ascription-with-fn-call.fixed index 847f3309973..2b85427f91e 100644 --- a/tests/ui/type/type-ascription-with-fn-call.fixed +++ b/tests/ui/type/type-ascription-with-fn-call.fixed @@ -1,4 +1,4 @@ -// run-rustfix +//@ run-rustfix fn main() { f() ; //~ ERROR statements are terminated with a semicolon f(); diff --git a/tests/ui/type/type-ascription-with-fn-call.rs b/tests/ui/type/type-ascription-with-fn-call.rs index 1db48b0adc4..645f6c4536b 100644 --- a/tests/ui/type/type-ascription-with-fn-call.rs +++ b/tests/ui/type/type-ascription-with-fn-call.rs @@ -1,4 +1,4 @@ -// run-rustfix +//@ run-rustfix fn main() { f() : //~ ERROR statements are terminated with a semicolon f(); diff --git a/tests/ui/type/type-ascription.rs b/tests/ui/type/type-ascription.rs index e4a4c89d057..76d6d923aff 100644 --- a/tests/ui/type/type-ascription.rs +++ b/tests/ui/type/type-ascription.rs @@ -1,4 +1,4 @@ -// run-pass +//@ run-pass #![allow(dead_code)] #![allow(unused_variables)] diff --git a/tests/ui/type/type-check/coerce-result-return-value.fixed b/tests/ui/type/type-check/coerce-result-return-value.fixed index 8a05407070d..4fcfe5c3838 100644 --- a/tests/ui/type/type-check/coerce-result-return-value.fixed +++ b/tests/ui/type/type-check/coerce-result-return-value.fixed @@ -1,4 +1,4 @@ -// run-rustfix +//@ run-rustfix struct A; struct B; impl From for B { diff --git a/tests/ui/type/type-check/coerce-result-return-value.rs b/tests/ui/type/type-check/coerce-result-return-value.rs index 442203addb7..79aa8817c80 100644 --- a/tests/ui/type/type-check/coerce-result-return-value.rs +++ b/tests/ui/type/type-check/coerce-result-return-value.rs @@ -1,4 +1,4 @@ -// run-rustfix +//@ run-rustfix struct A; struct B; impl From for B { diff --git a/tests/ui/type/type-check/point-at-inference-3.fixed b/tests/ui/type/type-check/point-at-inference-3.fixed index 15a3b580568..ce572c346b3 100644 --- a/tests/ui/type/type-check/point-at-inference-3.fixed +++ b/tests/ui/type/type-check/point-at-inference-3.fixed @@ -1,4 +1,4 @@ -// run-rustfix +//@ run-rustfix fn main() { let mut v = Vec::new(); v.push(0i32); diff --git a/tests/ui/type/type-check/point-at-inference-3.rs b/tests/ui/type/type-check/point-at-inference-3.rs index a48c4f9862f..9089cc59e55 100644 --- a/tests/ui/type/type-check/point-at-inference-3.rs +++ b/tests/ui/type/type-check/point-at-inference-3.rs @@ -1,4 +1,4 @@ -// run-rustfix +//@ run-rustfix fn main() { let mut v = Vec::new(); v.push(0i32); diff --git a/tests/ui/type/type-check/point-at-inference.fixed b/tests/ui/type/type-check/point-at-inference.fixed index f41fbe59fba..915f63c7080 100644 --- a/tests/ui/type/type-check/point-at-inference.fixed +++ b/tests/ui/type/type-check/point-at-inference.fixed @@ -1,4 +1,4 @@ -// run-rustfix +//@ run-rustfix fn bar(_: Vec) {} fn baz(_: &impl std::any::Any) {} fn main() { diff --git a/tests/ui/type/type-check/point-at-inference.rs b/tests/ui/type/type-check/point-at-inference.rs index 6419e42e70d..e4893eb8534 100644 --- a/tests/ui/type/type-check/point-at-inference.rs +++ b/tests/ui/type/type-check/point-at-inference.rs @@ -1,4 +1,4 @@ -// run-rustfix +//@ run-rustfix fn bar(_: Vec) {} fn baz(_: &impl std::any::Any) {} fn main() { diff --git a/tests/ui/type/type-mismatch-same-crate-name.rs b/tests/ui/type/type-mismatch-same-crate-name.rs index 2a59bd99450..da766165238 100644 --- a/tests/ui/type/type-mismatch-same-crate-name.rs +++ b/tests/ui/type/type-mismatch-same-crate-name.rs @@ -1,5 +1,5 @@ -// aux-build:crate_a1.rs -// aux-build:crate_a2.rs +//@ aux-build:crate_a1.rs +//@ aux-build:crate_a2.rs // This tests the extra note reported when a type error deals with // seemingly identical types. diff --git a/tests/ui/type/type-unsatisfiable.rs b/tests/ui/type/type-unsatisfiable.rs index 7fbbb50dc11..0c05d48c76b 100644 --- a/tests/ui/type/type-unsatisfiable.rs +++ b/tests/ui/type/type-unsatisfiable.rs @@ -1,6 +1,6 @@ -// revisions: lib usage -//[lib] compile-flags: --crate-type=lib -//[lib] build-pass +//@ revisions: lib usage +//@[lib] compile-flags: --crate-type=lib +//@[lib] build-pass use std::ops::Sub; trait Vector2 { diff --git a/tests/ui/type/verbose.rs b/tests/ui/type/verbose.rs index 4ebd5cdccfc..7ee69d99566 100644 --- a/tests/ui/type/verbose.rs +++ b/tests/ui/type/verbose.rs @@ -1,5 +1,5 @@ -// revisions:verbose normal -// [verbose]compile-flags:--verbose +//@ revisions:verbose normal +//@ [verbose]compile-flags:--verbose #![crate_type = "lib"] struct Foo { x: T, y: U } diff --git a/tests/ui/type_length_limit.rs b/tests/ui/type_length_limit.rs index b3c12747414..c60f1be06c6 100644 --- a/tests/ui/type_length_limit.rs +++ b/tests/ui/type_length_limit.rs @@ -1,7 +1,7 @@ -// build-fail -// error-pattern: reached the type-length limit while instantiating -// compile-flags: -Copt-level=0 -// normalize-stderr-test: ".nll/" -> "/" +//@ build-fail +//@ error-pattern: reached the type-length limit while instantiating +//@ compile-flags: -Copt-level=0 +//@ normalize-stderr-test: ".nll/" -> "/" // Test that the type length limit can be changed. // The exact type depends on optimizations, so disable them. diff --git a/tests/ui/typeck/assign-non-lval-derefmut.fixed b/tests/ui/typeck/assign-non-lval-derefmut.fixed index 0c23199af22..6ecec574f2e 100644 --- a/tests/ui/typeck/assign-non-lval-derefmut.fixed +++ b/tests/ui/typeck/assign-non-lval-derefmut.fixed @@ -1,4 +1,4 @@ -// run-rustfix +//@ run-rustfix fn main() { let x = std::sync::Mutex::new(1usize); diff --git a/tests/ui/typeck/assign-non-lval-derefmut.rs b/tests/ui/typeck/assign-non-lval-derefmut.rs index ec1882f5271..ac1be913e2a 100644 --- a/tests/ui/typeck/assign-non-lval-derefmut.rs +++ b/tests/ui/typeck/assign-non-lval-derefmut.rs @@ -1,4 +1,4 @@ -// run-rustfix +//@ run-rustfix fn main() { let x = std::sync::Mutex::new(1usize); diff --git a/tests/ui/typeck/assign-non-lval-mut-ref.fixed b/tests/ui/typeck/assign-non-lval-mut-ref.fixed index 10c7b9dbfb3..5733e74b613 100644 --- a/tests/ui/typeck/assign-non-lval-mut-ref.fixed +++ b/tests/ui/typeck/assign-non-lval-mut-ref.fixed @@ -1,4 +1,4 @@ -// run-rustfix +//@ run-rustfix fn main() { let mut x = vec![1usize]; diff --git a/tests/ui/typeck/assign-non-lval-mut-ref.rs b/tests/ui/typeck/assign-non-lval-mut-ref.rs index bceff0ef09d..d2f1253eb0c 100644 --- a/tests/ui/typeck/assign-non-lval-mut-ref.rs +++ b/tests/ui/typeck/assign-non-lval-mut-ref.rs @@ -1,4 +1,4 @@ -// run-rustfix +//@ run-rustfix fn main() { let mut x = vec![1usize]; diff --git a/tests/ui/typeck/auxiliary/xcrate-issue-61711-b.rs b/tests/ui/typeck/auxiliary/xcrate-issue-61711-b.rs index 88a040529e7..4285ebb7b6c 100644 --- a/tests/ui/typeck/auxiliary/xcrate-issue-61711-b.rs +++ b/tests/ui/typeck/auxiliary/xcrate-issue-61711-b.rs @@ -1,4 +1,4 @@ -// edition:2018 +//@ edition:2018 #![crate_type="lib"] #![crate_name="xcrate_issue_61711_b"] pub struct Struct; diff --git a/tests/ui/typeck/issue-100164.fixed b/tests/ui/typeck/issue-100164.fixed index a5f68beb1d5..4af32cfa3f1 100644 --- a/tests/ui/typeck/issue-100164.fixed +++ b/tests/ui/typeck/issue-100164.fixed @@ -1,4 +1,4 @@ -// run-rustfix +//@ run-rustfix const _A: i32 = 123; //~^ ERROR: missing type for `const` item diff --git a/tests/ui/typeck/issue-100164.rs b/tests/ui/typeck/issue-100164.rs index 7efb9ac6240..46ec1dea0c0 100644 --- a/tests/ui/typeck/issue-100164.rs +++ b/tests/ui/typeck/issue-100164.rs @@ -1,4 +1,4 @@ -// run-rustfix +//@ run-rustfix const _A: = 123; //~^ ERROR: missing type for `const` item diff --git a/tests/ui/typeck/issue-103899.rs b/tests/ui/typeck/issue-103899.rs index ac9e4c71696..5876a34ef55 100644 --- a/tests/ui/typeck/issue-103899.rs +++ b/tests/ui/typeck/issue-103899.rs @@ -1,7 +1,7 @@ -// check-fail -// failure-status: 101 -// dont-check-compiler-stderr -// known-bug: #103899 +//@ check-fail +//@ failure-status: 101 +//@ dont-check-compiler-stderr +//@ known-bug: #103899 trait BaseWithAssoc { type Assoc; diff --git a/tests/ui/typeck/issue-104510-ice.rs b/tests/ui/typeck/issue-104510-ice.rs index 157bdf07e38..627af1fe952 100644 --- a/tests/ui/typeck/issue-104510-ice.rs +++ b/tests/ui/typeck/issue-104510-ice.rs @@ -1,5 +1,5 @@ -// needs-asm-support -// only-x86_64 +//@ needs-asm-support +//@ only-x86_64 struct W(Oops); //~^ ERROR cannot find type `Oops` in this scope diff --git a/tests/ui/typeck/issue-107775.rs b/tests/ui/typeck/issue-107775.rs index 6fbac2ee975..3c3ae8ee552 100644 --- a/tests/ui/typeck/issue-107775.rs +++ b/tests/ui/typeck/issue-107775.rs @@ -1,4 +1,4 @@ -// edition: 2021 +//@ edition: 2021 use std::collections::HashMap; use std::future::Future; diff --git a/tests/ui/typeck/issue-110017-format-into-help-deletes-macro.fixed b/tests/ui/typeck/issue-110017-format-into-help-deletes-macro.fixed index b101cf1dcf5..ff3f392e777 100644 --- a/tests/ui/typeck/issue-110017-format-into-help-deletes-macro.fixed +++ b/tests/ui/typeck/issue-110017-format-into-help-deletes-macro.fixed @@ -1,4 +1,4 @@ -// run-rustfix +//@ run-rustfix #![allow(dead_code)] pub fn foo(x: &str) -> Result<(), Box> { diff --git a/tests/ui/typeck/issue-110017-format-into-help-deletes-macro.rs b/tests/ui/typeck/issue-110017-format-into-help-deletes-macro.rs index cfde912d896..7659d6734ca 100644 --- a/tests/ui/typeck/issue-110017-format-into-help-deletes-macro.rs +++ b/tests/ui/typeck/issue-110017-format-into-help-deletes-macro.rs @@ -1,4 +1,4 @@ -// run-rustfix +//@ run-rustfix #![allow(dead_code)] pub fn foo(x: &str) -> Result<(), Box> { diff --git a/tests/ui/typeck/issue-112007-leaked-writeln-macro-internals.fixed b/tests/ui/typeck/issue-112007-leaked-writeln-macro-internals.fixed index 29b6b8b868f..dcb256de18f 100644 --- a/tests/ui/typeck/issue-112007-leaked-writeln-macro-internals.fixed +++ b/tests/ui/typeck/issue-112007-leaked-writeln-macro-internals.fixed @@ -1,4 +1,4 @@ -// run-rustfix +//@ run-rustfix #![allow(dead_code)] // https://github.com/rust-lang/rust/issues/112007 diff --git a/tests/ui/typeck/issue-112007-leaked-writeln-macro-internals.rs b/tests/ui/typeck/issue-112007-leaked-writeln-macro-internals.rs index bd731e02bd1..58cd6cbf20c 100644 --- a/tests/ui/typeck/issue-112007-leaked-writeln-macro-internals.rs +++ b/tests/ui/typeck/issue-112007-leaked-writeln-macro-internals.rs @@ -1,4 +1,4 @@ -// run-rustfix +//@ run-rustfix #![allow(dead_code)] // https://github.com/rust-lang/rust/issues/112007 diff --git a/tests/ui/typeck/issue-112252-ptr-arithmetics-help.fixed b/tests/ui/typeck/issue-112252-ptr-arithmetics-help.fixed index bdb884f5431..144f6f7a0ff 100644 --- a/tests/ui/typeck/issue-112252-ptr-arithmetics-help.fixed +++ b/tests/ui/typeck/issue-112252-ptr-arithmetics-help.fixed @@ -1,4 +1,4 @@ -// run-rustfix +//@ run-rustfix fn main() { let _ptr1: *const u32 = std::ptr::null(); diff --git a/tests/ui/typeck/issue-112252-ptr-arithmetics-help.rs b/tests/ui/typeck/issue-112252-ptr-arithmetics-help.rs index cf68850cc4d..5e259ab3566 100644 --- a/tests/ui/typeck/issue-112252-ptr-arithmetics-help.rs +++ b/tests/ui/typeck/issue-112252-ptr-arithmetics-help.rs @@ -1,4 +1,4 @@ -// run-rustfix +//@ run-rustfix fn main() { let _ptr1: *const u32 = std::ptr::null(); diff --git a/tests/ui/typeck/issue-116864.rs b/tests/ui/typeck/issue-116864.rs index 88c3f786608..6cbe56b2f92 100644 --- a/tests/ui/typeck/issue-116864.rs +++ b/tests/ui/typeck/issue-116864.rs @@ -1,6 +1,6 @@ -// compile-flags: -Znext-solver -// check-pass -// edition: 2021 +//@ compile-flags: -Znext-solver +//@ check-pass +//@ edition: 2021 use std::future::Future; diff --git a/tests/ui/typeck/issue-18937-1.rs b/tests/ui/typeck/issue-18937-1.rs index 57e56d832c6..e65aab553fd 100644 --- a/tests/ui/typeck/issue-18937-1.rs +++ b/tests/ui/typeck/issue-18937-1.rs @@ -1,4 +1,4 @@ -// run-pass +//@ run-pass // Test that we are able to type-check this example. In particular, // knowing that `T: 'a` allows us to deduce that `[U]: 'a` (because // when `T=[U]` it implies that `U: 'a`). diff --git a/tests/ui/typeck/issue-2063-resource.rs b/tests/ui/typeck/issue-2063-resource.rs index 1d0527447ba..0b34cbb4c5e 100644 --- a/tests/ui/typeck/issue-2063-resource.rs +++ b/tests/ui/typeck/issue-2063-resource.rs @@ -1,4 +1,4 @@ -// check-pass +//@ check-pass #![allow(dead_code)] // test that autoderef of a type like this does not // cause compiler to loop. Note that no instances diff --git a/tests/ui/typeck/issue-2063.rs b/tests/ui/typeck/issue-2063.rs index b00bbc082af..52b5f7ab9fc 100644 --- a/tests/ui/typeck/issue-2063.rs +++ b/tests/ui/typeck/issue-2063.rs @@ -1,4 +1,4 @@ -// run-pass +//@ run-pass // test that autoderef of a type like this does not // cause compiler to loop. Note that no instances // of such a type could ever be constructed. diff --git a/tests/ui/typeck/issue-22375.rs b/tests/ui/typeck/issue-22375.rs index 21a1a4c8380..ec0e9d6a48c 100644 --- a/tests/ui/typeck/issue-22375.rs +++ b/tests/ui/typeck/issue-22375.rs @@ -1,4 +1,4 @@ -// check-pass +//@ check-pass trait A> {} fn main() {} diff --git a/tests/ui/typeck/issue-29181.rs b/tests/ui/typeck/issue-29181.rs index 70e5bc01920..d068356d477 100644 --- a/tests/ui/typeck/issue-29181.rs +++ b/tests/ui/typeck/issue-29181.rs @@ -1,4 +1,4 @@ -// aux-build:issue-29181.rs +//@ aux-build:issue-29181.rs extern crate issue_29181 as foo; diff --git a/tests/ui/typeck/issue-36708.rs b/tests/ui/typeck/issue-36708.rs index c9d9f2a6d50..f65f25d5dfb 100644 --- a/tests/ui/typeck/issue-36708.rs +++ b/tests/ui/typeck/issue-36708.rs @@ -1,4 +1,4 @@ -// aux-build:issue-36708.rs +//@ aux-build:issue-36708.rs extern crate issue_36708 as lib; diff --git a/tests/ui/typeck/issue-43189.rs b/tests/ui/typeck/issue-43189.rs index ce667a5006e..9c8cc70e63a 100644 --- a/tests/ui/typeck/issue-43189.rs +++ b/tests/ui/typeck/issue-43189.rs @@ -1,9 +1,9 @@ // Issue 46112: An extern crate pub re-exporting libcore was causing // paths rooted from `std` to be misrendered in the diagnostic output. -// ignore-windows -// aux-build:xcrate-issue-43189-a.rs -// aux-build:xcrate-issue-43189-b.rs +//@ ignore-windows +//@ aux-build:xcrate-issue-43189-a.rs +//@ aux-build:xcrate-issue-43189-b.rs extern crate xcrate_issue_43189_b; fn main() { diff --git a/tests/ui/typeck/issue-46112.rs b/tests/ui/typeck/issue-46112.rs index 0cdd2c27ff7..4671ddd06c8 100644 --- a/tests/ui/typeck/issue-46112.rs +++ b/tests/ui/typeck/issue-46112.rs @@ -1,8 +1,8 @@ // Issue 46112: An extern crate pub re-exporting libcore was causing // paths rooted from `std` to be misrendered in the diagnostic output. -// ignore-windows -// aux-build:xcrate-issue-46112-rexport-core.rs +//@ ignore-windows +//@ aux-build:xcrate-issue-46112-rexport-core.rs extern crate xcrate_issue_46112_rexport_core; fn test(r: Result, &'static str>) { } diff --git a/tests/ui/typeck/issue-55810-must-typeck-match-pats-before-guards.rs b/tests/ui/typeck/issue-55810-must-typeck-match-pats-before-guards.rs index 23ea0ad61a7..0d91d0d6131 100644 --- a/tests/ui/typeck/issue-55810-must-typeck-match-pats-before-guards.rs +++ b/tests/ui/typeck/issue-55810-must-typeck-match-pats-before-guards.rs @@ -1,4 +1,4 @@ -// check-pass +//@ check-pass // rust-lang/rust#55810: types for a binding in a match arm can be // inferred from arms that come later in the match. diff --git a/tests/ui/typeck/issue-61711-once-caused-rustc-inf-loop.rs b/tests/ui/typeck/issue-61711-once-caused-rustc-inf-loop.rs index de7d6a0d80c..6d00f66a26d 100644 --- a/tests/ui/typeck/issue-61711-once-caused-rustc-inf-loop.rs +++ b/tests/ui/typeck/issue-61711-once-caused-rustc-inf-loop.rs @@ -1,11 +1,11 @@ // Issue 61711: A crate pub re-exporting `crate` was causing an // infinite loop. -// edition:2018 -// aux-build:xcrate-issue-61711-b.rs -// compile-flags:--extern xcrate_issue_61711_b +//@ edition:2018 +//@ aux-build:xcrate-issue-61711-b.rs +//@ compile-flags:--extern xcrate_issue_61711_b -// build-pass +//@ build-pass fn f(_: F) { } fn main() { } diff --git a/tests/ui/typeck/issue-68590-reborrow-through-derefmut.rs b/tests/ui/typeck/issue-68590-reborrow-through-derefmut.rs index e4436260e70..b0f01de26b4 100644 --- a/tests/ui/typeck/issue-68590-reborrow-through-derefmut.rs +++ b/tests/ui/typeck/issue-68590-reborrow-through-derefmut.rs @@ -1,4 +1,4 @@ -// check-pass +//@ check-pass // rust-lang/rust#68590: confusing diagnostics when reborrowing through DerefMut. diff --git a/tests/ui/typeck/issue-72225-call-fnmut-through-derefmut.rs b/tests/ui/typeck/issue-72225-call-fnmut-through-derefmut.rs index 3ea05389f04..cd502c82223 100644 --- a/tests/ui/typeck/issue-72225-call-fnmut-through-derefmut.rs +++ b/tests/ui/typeck/issue-72225-call-fnmut-through-derefmut.rs @@ -1,4 +1,4 @@ -// check-pass +//@ check-pass // rust-lang/rust#72225: confusing diagnostics when calling FnMut through DerefMut. diff --git a/tests/ui/typeck/issue-73592-borrow_mut-through-deref.fixed b/tests/ui/typeck/issue-73592-borrow_mut-through-deref.fixed index 7fdd618c2ec..07096803c11 100644 --- a/tests/ui/typeck/issue-73592-borrow_mut-through-deref.fixed +++ b/tests/ui/typeck/issue-73592-borrow_mut-through-deref.fixed @@ -1,5 +1,5 @@ -// check-pass -// run-rustfix +//@ check-pass +//@ run-rustfix // // rust-lang/rust#73592: borrow_mut through Deref should work. // diff --git a/tests/ui/typeck/issue-73592-borrow_mut-through-deref.rs b/tests/ui/typeck/issue-73592-borrow_mut-through-deref.rs index 3b399e629d3..cdfdd7e8fae 100644 --- a/tests/ui/typeck/issue-73592-borrow_mut-through-deref.rs +++ b/tests/ui/typeck/issue-73592-borrow_mut-through-deref.rs @@ -1,5 +1,5 @@ -// check-pass -// run-rustfix +//@ check-pass +//@ run-rustfix // // rust-lang/rust#73592: borrow_mut through Deref should work. // diff --git a/tests/ui/typeck/issue-74933.rs b/tests/ui/typeck/issue-74933.rs index 4b6c173b8ce..a49ef97ac14 100644 --- a/tests/ui/typeck/issue-74933.rs +++ b/tests/ui/typeck/issue-74933.rs @@ -1,4 +1,4 @@ -// check-pass +//@ check-pass // // rust-lang/rust#74933: Lifetime error when indexing with borrowed index diff --git a/tests/ui/typeck/issue-80207-unsized-return.rs b/tests/ui/typeck/issue-80207-unsized-return.rs index 75430da1482..a192db0ef3e 100644 --- a/tests/ui/typeck/issue-80207-unsized-return.rs +++ b/tests/ui/typeck/issue-80207-unsized-return.rs @@ -1,4 +1,4 @@ -// check-pass +//@ check-pass trait Foo { fn do_stuff() -> Self; diff --git a/tests/ui/typeck/issue-81943.rs b/tests/ui/typeck/issue-81943.rs index 18f5970a350..9c79aa27875 100644 --- a/tests/ui/typeck/issue-81943.rs +++ b/tests/ui/typeck/issue-81943.rs @@ -1,4 +1,4 @@ -// aux-build:issue-81943-lib.rs +//@ aux-build:issue-81943-lib.rs extern crate issue_81943_lib as lib; fn f(f: F) { f(0); } diff --git a/tests/ui/typeck/issue-82772.rs b/tests/ui/typeck/issue-82772.rs index 326273bfe92..b620eee4307 100644 --- a/tests/ui/typeck/issue-82772.rs +++ b/tests/ui/typeck/issue-82772.rs @@ -1,4 +1,4 @@ -// edition:2018 +//@ edition:2018 fn main() { use a::ModPrivateStruct; diff --git a/tests/ui/typeck/issue-86721-return-expr-ice.rs b/tests/ui/typeck/issue-86721-return-expr-ice.rs index 4f882f7a3f1..ea3a2f2fbfe 100644 --- a/tests/ui/typeck/issue-86721-return-expr-ice.rs +++ b/tests/ui/typeck/issue-86721-return-expr-ice.rs @@ -1,6 +1,6 @@ // Regression test for the ICE described in #86721. -// revisions: rev1 rev2 +//@ revisions: rev1 rev2 #![cfg_attr(any(), rev1, rev2)] #![crate_type = "lib"] diff --git a/tests/ui/typeck/issue-88609.rs b/tests/ui/typeck/issue-88609.rs index dc459c885fa..9b74a88edd3 100644 --- a/tests/ui/typeck/issue-88609.rs +++ b/tests/ui/typeck/issue-88609.rs @@ -2,7 +2,7 @@ // The return type for `main` is not normalized while checking if it implements // the trait `std::process::Termination`. -// build-pass +//@ build-pass trait Same { type Output; diff --git a/tests/ui/typeck/issue-88803-call-expr-method.fixed b/tests/ui/typeck/issue-88803-call-expr-method.fixed index 19b96ecf3fc..2a78276a6fe 100644 --- a/tests/ui/typeck/issue-88803-call-expr-method.fixed +++ b/tests/ui/typeck/issue-88803-call-expr-method.fixed @@ -1,4 +1,4 @@ -// run-rustfix +//@ run-rustfix fn main() { let a = Some(42); diff --git a/tests/ui/typeck/issue-88803-call-expr-method.rs b/tests/ui/typeck/issue-88803-call-expr-method.rs index a0619946637..8ddc0340f18 100644 --- a/tests/ui/typeck/issue-88803-call-expr-method.rs +++ b/tests/ui/typeck/issue-88803-call-expr-method.rs @@ -1,4 +1,4 @@ -// run-rustfix +//@ run-rustfix fn main() { let a = Some(42); diff --git a/tests/ui/typeck/issue-89044-wrapped-expr-method.fixed b/tests/ui/typeck/issue-89044-wrapped-expr-method.fixed index 0a3086a345d..584bbe8c946 100644 --- a/tests/ui/typeck/issue-89044-wrapped-expr-method.fixed +++ b/tests/ui/typeck/issue-89044-wrapped-expr-method.fixed @@ -1,4 +1,4 @@ -// run-rustfix +//@ run-rustfix fn main() { let a = Some(42); diff --git a/tests/ui/typeck/issue-89044-wrapped-expr-method.rs b/tests/ui/typeck/issue-89044-wrapped-expr-method.rs index 83617e035e9..717231ffc57 100644 --- a/tests/ui/typeck/issue-89044-wrapped-expr-method.rs +++ b/tests/ui/typeck/issue-89044-wrapped-expr-method.rs @@ -1,4 +1,4 @@ -// run-rustfix +//@ run-rustfix fn main() { let a = Some(42); diff --git a/tests/ui/typeck/issue-89856.fixed b/tests/ui/typeck/issue-89856.fixed index 3e1a006efa0..213a672e397 100644 --- a/tests/ui/typeck/issue-89856.fixed +++ b/tests/ui/typeck/issue-89856.fixed @@ -1,4 +1,4 @@ -// run-rustfix +//@ run-rustfix fn take_str_maybe(_: Option<&str>) { } fn main() { diff --git a/tests/ui/typeck/issue-89856.rs b/tests/ui/typeck/issue-89856.rs index cfe6e19b303..83d88ff34ca 100644 --- a/tests/ui/typeck/issue-89856.rs +++ b/tests/ui/typeck/issue-89856.rs @@ -1,4 +1,4 @@ -// run-rustfix +//@ run-rustfix fn take_str_maybe(_: Option<&str>) { } fn main() { diff --git a/tests/ui/typeck/issue-89935.rs b/tests/ui/typeck/issue-89935.rs index 03f8f09a722..579a12dac69 100644 --- a/tests/ui/typeck/issue-89935.rs +++ b/tests/ui/typeck/issue-89935.rs @@ -1,4 +1,4 @@ -// check-pass +//@ check-pass trait Foo: Baz {} trait Bar {} diff --git a/tests/ui/typeck/issue-90027-async-fn-return-suggestion.rs b/tests/ui/typeck/issue-90027-async-fn-return-suggestion.rs index 8ccb15ca48a..0be1237749f 100644 --- a/tests/ui/typeck/issue-90027-async-fn-return-suggestion.rs +++ b/tests/ui/typeck/issue-90027-async-fn-return-suggestion.rs @@ -1,4 +1,4 @@ -// edition:2018 +//@ edition:2018 async fn hello() { //~ HELP try adding a return type 0 diff --git a/tests/ui/typeck/issue-90483-inaccessible-field-adjustment.rs b/tests/ui/typeck/issue-90483-inaccessible-field-adjustment.rs index 74e50d46e8d..77a2a5c5aa9 100644 --- a/tests/ui/typeck/issue-90483-inaccessible-field-adjustment.rs +++ b/tests/ui/typeck/issue-90483-inaccessible-field-adjustment.rs @@ -1,4 +1,4 @@ -// edition:2021 +//@ edition:2021 mod m { pub struct S { foo: i32 } diff --git a/tests/ui/typeck/issue-91210-ptr-method.fixed b/tests/ui/typeck/issue-91210-ptr-method.fixed index 94200cce73e..7fe9bdc6a1b 100644 --- a/tests/ui/typeck/issue-91210-ptr-method.fixed +++ b/tests/ui/typeck/issue-91210-ptr-method.fixed @@ -1,6 +1,6 @@ // Regression test for issue #91210. -// run-rustfix +//@ run-rustfix #![allow(unused)] diff --git a/tests/ui/typeck/issue-91210-ptr-method.rs b/tests/ui/typeck/issue-91210-ptr-method.rs index ed0ce6effe7..1ae9331e642 100644 --- a/tests/ui/typeck/issue-91210-ptr-method.rs +++ b/tests/ui/typeck/issue-91210-ptr-method.rs @@ -1,6 +1,6 @@ // Regression test for issue #91210. -// run-rustfix +//@ run-rustfix #![allow(unused)] diff --git a/tests/ui/typeck/issue-91328.fixed b/tests/ui/typeck/issue-91328.fixed index c0384399a92..bd646e9f40b 100644 --- a/tests/ui/typeck/issue-91328.fixed +++ b/tests/ui/typeck/issue-91328.fixed @@ -1,6 +1,6 @@ // Regression test for issue #91328. -// run-rustfix +//@ run-rustfix #![allow(dead_code)] diff --git a/tests/ui/typeck/issue-91328.rs b/tests/ui/typeck/issue-91328.rs index 63602d26f97..6d2643dbead 100644 --- a/tests/ui/typeck/issue-91328.rs +++ b/tests/ui/typeck/issue-91328.rs @@ -1,6 +1,6 @@ // Regression test for issue #91328. -// run-rustfix +//@ run-rustfix #![allow(dead_code)] diff --git a/tests/ui/typeck/issue-91334.rs b/tests/ui/typeck/issue-91334.rs index 1ffc56e6612..ec0d4ad70f1 100644 --- a/tests/ui/typeck/issue-91334.rs +++ b/tests/ui/typeck/issue-91334.rs @@ -1,6 +1,6 @@ // Regression test for the ICE described in issue #91334. -// error-pattern: this file contains an unclosed delimiter +//@ error-pattern: this file contains an unclosed delimiter #![feature(coroutines)] diff --git a/tests/ui/typeck/issue-91633.rs b/tests/ui/typeck/issue-91633.rs index 331a798dd7a..e2a8d5fdd94 100644 --- a/tests/ui/typeck/issue-91633.rs +++ b/tests/ui/typeck/issue-91633.rs @@ -1,4 +1,4 @@ -// check-pass +//@ check-pass fn f (it: &[T]) where [T] : std::ops::Index, diff --git a/tests/ui/typeck/issue-92481.rs b/tests/ui/typeck/issue-92481.rs index f752400bbcb..e3783ff8cd2 100644 --- a/tests/ui/typeck/issue-92481.rs +++ b/tests/ui/typeck/issue-92481.rs @@ -1,4 +1,4 @@ -//check-fail +//@check-fail #![crate_type="lib"] diff --git a/tests/ui/typeck/output-type-mismatch.rs b/tests/ui/typeck/output-type-mismatch.rs index 35097aa9ec6..d5691c9c353 100644 --- a/tests/ui/typeck/output-type-mismatch.rs +++ b/tests/ui/typeck/output-type-mismatch.rs @@ -1,4 +1,4 @@ -// error-pattern: mismatched types +//@ error-pattern: mismatched types fn f() { } diff --git a/tests/ui/typeck/pin-unsound-issue-85099-derefmut.rs b/tests/ui/typeck/pin-unsound-issue-85099-derefmut.rs index 03602144e50..f3ece563f54 100644 --- a/tests/ui/typeck/pin-unsound-issue-85099-derefmut.rs +++ b/tests/ui/typeck/pin-unsound-issue-85099-derefmut.rs @@ -1,5 +1,5 @@ -// check-pass -// known-bug: #85099 +//@ check-pass +//@ known-bug: #85099 // Should fail. Can coerce `Pin` into `Pin` where // `T: Deref` and `U: Deref`, using the diff --git a/tests/ui/typeck/prim-with-args.fixed b/tests/ui/typeck/prim-with-args.fixed index e3f99479a38..28150e8dac2 100644 --- a/tests/ui/typeck/prim-with-args.fixed +++ b/tests/ui/typeck/prim-with-args.fixed @@ -1,4 +1,4 @@ -// run-rustfix +//@ run-rustfix fn main() { let _x: isize; //~ ERROR type arguments are not allowed on builtin type diff --git a/tests/ui/typeck/prim-with-args.rs b/tests/ui/typeck/prim-with-args.rs index b10471eccee..c0287b79bc4 100644 --- a/tests/ui/typeck/prim-with-args.rs +++ b/tests/ui/typeck/prim-with-args.rs @@ -1,4 +1,4 @@ -// run-rustfix +//@ run-rustfix fn main() { let _x: isize; //~ ERROR type arguments are not allowed on builtin type diff --git a/tests/ui/typeck/project-cache-issue-37154.rs b/tests/ui/typeck/project-cache-issue-37154.rs index b10239c22d1..0fe0e09b894 100644 --- a/tests/ui/typeck/project-cache-issue-37154.rs +++ b/tests/ui/typeck/project-cache-issue-37154.rs @@ -1,4 +1,4 @@ -// run-pass +//@ run-pass #![allow(dead_code)] // Regression test for #37154: the problem here was that the cache diff --git a/tests/ui/typeck/ptr-null-mutability-suggestions.fixed b/tests/ui/typeck/ptr-null-mutability-suggestions.fixed index d00536b29cf..ff8c14793e1 100644 --- a/tests/ui/typeck/ptr-null-mutability-suggestions.fixed +++ b/tests/ui/typeck/ptr-null-mutability-suggestions.fixed @@ -1,4 +1,4 @@ -// run-rustfix +//@ run-rustfix #[allow(unused_imports)] use std::ptr; diff --git a/tests/ui/typeck/ptr-null-mutability-suggestions.rs b/tests/ui/typeck/ptr-null-mutability-suggestions.rs index ea3066d2289..9fdc7fb8603 100644 --- a/tests/ui/typeck/ptr-null-mutability-suggestions.rs +++ b/tests/ui/typeck/ptr-null-mutability-suggestions.rs @@ -1,4 +1,4 @@ -// run-rustfix +//@ run-rustfix #[allow(unused_imports)] use std::ptr; diff --git a/tests/ui/typeck/remove-extra-argument.fixed b/tests/ui/typeck/remove-extra-argument.fixed index d09306bf794..5fb01c877c4 100644 --- a/tests/ui/typeck/remove-extra-argument.fixed +++ b/tests/ui/typeck/remove-extra-argument.fixed @@ -1,4 +1,4 @@ -// run-rustfix +//@ run-rustfix // Check that the HELP suggestion is `l(vec![])` instead of `l($crate::vec::Vec::new())` fn l(_a: Vec) {} diff --git a/tests/ui/typeck/remove-extra-argument.rs b/tests/ui/typeck/remove-extra-argument.rs index 2181c37cee9..7762231714b 100644 --- a/tests/ui/typeck/remove-extra-argument.rs +++ b/tests/ui/typeck/remove-extra-argument.rs @@ -1,4 +1,4 @@ -// run-rustfix +//@ run-rustfix // Check that the HELP suggestion is `l(vec![])` instead of `l($crate::vec::Vec::new())` fn l(_a: Vec) {} diff --git a/tests/ui/typeck/suggest-adding-missing-zero-to-floating-point-number.fixed b/tests/ui/typeck/suggest-adding-missing-zero-to-floating-point-number.fixed index ba83e79005b..cb4a3967741 100644 --- a/tests/ui/typeck/suggest-adding-missing-zero-to-floating-point-number.fixed +++ b/tests/ui/typeck/suggest-adding-missing-zero-to-floating-point-number.fixed @@ -1,4 +1,4 @@ -// run-rustfix +//@ run-rustfix fn main() { 2.0e1; //~ERROR `{integer}` is a primitive type and therefore doesn't have fields diff --git a/tests/ui/typeck/suggest-adding-missing-zero-to-floating-point-number.rs b/tests/ui/typeck/suggest-adding-missing-zero-to-floating-point-number.rs index c102447f602..e4cafc466c6 100644 --- a/tests/ui/typeck/suggest-adding-missing-zero-to-floating-point-number.rs +++ b/tests/ui/typeck/suggest-adding-missing-zero-to-floating-point-number.rs @@ -1,4 +1,4 @@ -// run-rustfix +//@ run-rustfix fn main() { 2.e1; //~ERROR `{integer}` is a primitive type and therefore doesn't have fields diff --git a/tests/ui/typeck/suggest-box-on-divergent-if-else-arms.fixed b/tests/ui/typeck/suggest-box-on-divergent-if-else-arms.fixed index 9ce46bc1a65..f562b24cc4c 100644 --- a/tests/ui/typeck/suggest-box-on-divergent-if-else-arms.fixed +++ b/tests/ui/typeck/suggest-box-on-divergent-if-else-arms.fixed @@ -1,4 +1,4 @@ -// run-rustfix +//@ run-rustfix trait Trait {} struct Struct; impl Trait for Struct {} diff --git a/tests/ui/typeck/suggest-box-on-divergent-if-else-arms.rs b/tests/ui/typeck/suggest-box-on-divergent-if-else-arms.rs index 7f65a3bb59d..e364e6daa6a 100644 --- a/tests/ui/typeck/suggest-box-on-divergent-if-else-arms.rs +++ b/tests/ui/typeck/suggest-box-on-divergent-if-else-arms.rs @@ -1,4 +1,4 @@ -// run-rustfix +//@ run-rustfix trait Trait {} struct Struct; impl Trait for Struct {} diff --git a/tests/ui/typeck/typeck-closure-to-unsafe-fn-ptr.rs b/tests/ui/typeck/typeck-closure-to-unsafe-fn-ptr.rs index 2530a1e966d..24d1c7be514 100644 --- a/tests/ui/typeck/typeck-closure-to-unsafe-fn-ptr.rs +++ b/tests/ui/typeck/typeck-closure-to-unsafe-fn-ptr.rs @@ -1,4 +1,4 @@ -// run-pass +//@ run-pass unsafe fn call_unsafe(func: unsafe fn() -> ()) -> () { func() diff --git a/tests/ui/typeck/typeck-default-trait-impl-assoc-type.fixed b/tests/ui/typeck/typeck-default-trait-impl-assoc-type.fixed index a9107f99873..b754f64350f 100644 --- a/tests/ui/typeck/typeck-default-trait-impl-assoc-type.fixed +++ b/tests/ui/typeck/typeck-default-trait-impl-assoc-type.fixed @@ -1,4 +1,4 @@ -// run-rustfix +//@ run-rustfix // Test that we do not consider associated types to be sendable without // some applicable trait bound (and we don't ICE). #![allow(dead_code)] diff --git a/tests/ui/typeck/typeck-default-trait-impl-assoc-type.rs b/tests/ui/typeck/typeck-default-trait-impl-assoc-type.rs index bafc1657737..0893533eaa9 100644 --- a/tests/ui/typeck/typeck-default-trait-impl-assoc-type.rs +++ b/tests/ui/typeck/typeck-default-trait-impl-assoc-type.rs @@ -1,4 +1,4 @@ -// run-rustfix +//@ run-rustfix // Test that we do not consider associated types to be sendable without // some applicable trait bound (and we don't ICE). #![allow(dead_code)] diff --git a/tests/ui/typeck/typeck-default-trait-impl-cross-crate-coherence.rs b/tests/ui/typeck/typeck-default-trait-impl-cross-crate-coherence.rs index cc75cd4909a..3e15e28b8fd 100644 --- a/tests/ui/typeck/typeck-default-trait-impl-cross-crate-coherence.rs +++ b/tests/ui/typeck/typeck-default-trait-impl-cross-crate-coherence.rs @@ -1,4 +1,4 @@ -// aux-build:tdticc_coherence_lib.rs +//@ aux-build:tdticc_coherence_lib.rs #![allow(suspicious_auto_trait_impls)] // Test that we do not consider associated types to be sendable without diff --git a/tests/ui/typeck/typeck-fn-to-unsafe-fn-ptr.rs b/tests/ui/typeck/typeck-fn-to-unsafe-fn-ptr.rs index 1e954f56909..3d414aa6f1a 100644 --- a/tests/ui/typeck/typeck-fn-to-unsafe-fn-ptr.rs +++ b/tests/ui/typeck/typeck-fn-to-unsafe-fn-ptr.rs @@ -1,4 +1,4 @@ -// run-pass +//@ run-pass // This tests reification from safe function to `unsafe fn` pointer fn do_nothing() -> () {} diff --git a/tests/ui/typeck/typeck_type_placeholder_1.rs b/tests/ui/typeck/typeck_type_placeholder_1.rs index ea7aa5285b0..d38e5ce16a3 100644 --- a/tests/ui/typeck/typeck_type_placeholder_1.rs +++ b/tests/ui/typeck/typeck_type_placeholder_1.rs @@ -1,4 +1,4 @@ -// run-pass +//@ run-pass #![allow(dead_code)] // This test checks that the `_` type placeholder works diff --git a/tests/ui/typeck/ufcs-type-params.rs b/tests/ui/typeck/ufcs-type-params.rs index eee2b55b2a0..ef8b983b3e9 100644 --- a/tests/ui/typeck/ufcs-type-params.rs +++ b/tests/ui/typeck/ufcs-type-params.rs @@ -1,5 +1,5 @@ -// run-pass -// pretty-expanded FIXME #23616 +//@ run-pass +//@ pretty-expanded FIXME #23616 trait Foo { fn get(&self) -> T; diff --git a/tests/ui/typeck/unify-return-ty.rs b/tests/ui/typeck/unify-return-ty.rs index da1d82e896a..849b72e63e5 100644 --- a/tests/ui/typeck/unify-return-ty.rs +++ b/tests/ui/typeck/unify-return-ty.rs @@ -1,9 +1,9 @@ -// run-pass +//@ run-pass // Tests that the tail expr in null() has its type // unified with the type *T, and so the type variable // in that type gets resolved. -// pretty-expanded FIXME #23616 +//@ pretty-expanded FIXME #23616 use std::mem; diff --git a/tests/ui/typeck/while-type-error.rs b/tests/ui/typeck/while-type-error.rs index 8098bfcd8d9..ca3b8921f54 100644 --- a/tests/ui/typeck/while-type-error.rs +++ b/tests/ui/typeck/while-type-error.rs @@ -1,3 +1,3 @@ -// error-pattern: mismatched types +//@ error-pattern: mismatched types fn main() { while main { } } diff --git a/tests/ui/typeck/wrong-ret-type.rs b/tests/ui/typeck/wrong-ret-type.rs index cbff8dbae21..b83aefad1e9 100644 --- a/tests/ui/typeck/wrong-ret-type.rs +++ b/tests/ui/typeck/wrong-ret-type.rs @@ -1,3 +1,3 @@ -// error-pattern: mismatched types +//@ error-pattern: mismatched types fn mk_int() -> usize { let i: isize = 3; return i; } fn main() { } diff --git a/tests/ui/typeid-intrinsic.rs b/tests/ui/typeid-intrinsic.rs index 5bc4e0c217f..7c4fb3f95a9 100644 --- a/tests/ui/typeid-intrinsic.rs +++ b/tests/ui/typeid-intrinsic.rs @@ -1,8 +1,8 @@ -// run-pass +//@ run-pass #![allow(deprecated)] -// aux-build:typeid-intrinsic-aux1.rs -// aux-build:typeid-intrinsic-aux2.rs +//@ aux-build:typeid-intrinsic-aux1.rs +//@ aux-build:typeid-intrinsic-aux2.rs #![feature(core_intrinsics)] diff --git a/tests/ui/typestate-multi-decl.rs b/tests/ui/typestate-multi-decl.rs index 9f941620559..3d0e79632bb 100644 --- a/tests/ui/typestate-multi-decl.rs +++ b/tests/ui/typestate-multi-decl.rs @@ -1,4 +1,4 @@ -// run-pass +//@ run-pass pub fn main() { let (x, y) = (10, 20); diff --git a/tests/ui/ufcs/ufcs-polymorphic-paths.rs b/tests/ui/ufcs/ufcs-polymorphic-paths.rs index 71b9de8184c..6dc97e5edb1 100644 --- a/tests/ui/ufcs/ufcs-polymorphic-paths.rs +++ b/tests/ui/ufcs/ufcs-polymorphic-paths.rs @@ -1,4 +1,4 @@ -// run-pass +//@ run-pass use std::borrow::Cow; use std::iter::FromIterator; diff --git a/tests/ui/unboxed-closures/issue-18652.rs b/tests/ui/unboxed-closures/issue-18652.rs index 59aa0156842..df233b3cc2b 100644 --- a/tests/ui/unboxed-closures/issue-18652.rs +++ b/tests/ui/unboxed-closures/issue-18652.rs @@ -1,4 +1,4 @@ -// run-pass +//@ run-pass // Tests multiple free variables being passed by value into an unboxed // once closure as an optimization by codegen. This used to hit an // incorrect assert. diff --git a/tests/ui/unboxed-closures/issue-18661.rs b/tests/ui/unboxed-closures/issue-18661.rs index e2427243235..44b4c499352 100644 --- a/tests/ui/unboxed-closures/issue-18661.rs +++ b/tests/ui/unboxed-closures/issue-18661.rs @@ -1,8 +1,8 @@ -// run-pass +//@ run-pass // Test that param substitutions from the correct environment are // used when codegenning unboxed closure calls. -// pretty-expanded FIXME #23616 +//@ pretty-expanded FIXME #23616 pub fn inside(c: F) { c(); diff --git a/tests/ui/unboxed-closures/issue-53448.rs b/tests/ui/unboxed-closures/issue-53448.rs index ea1edf7d450..356bface2f8 100644 --- a/tests/ui/unboxed-closures/issue-53448.rs +++ b/tests/ui/unboxed-closures/issue-53448.rs @@ -1,4 +1,4 @@ -// check-pass +//@ check-pass #![feature(unboxed_closures)] diff --git a/tests/ui/unboxed-closures/type-id-higher-rank.rs b/tests/ui/unboxed-closures/type-id-higher-rank.rs index a9db71a0399..bdc73069e89 100644 --- a/tests/ui/unboxed-closures/type-id-higher-rank.rs +++ b/tests/ui/unboxed-closures/type-id-higher-rank.rs @@ -1,4 +1,4 @@ -// run-pass +//@ run-pass // Test that type IDs correctly account for higher-rank lifetimes // Also acts as a regression test for an ICE (issue #19791) diff --git a/tests/ui/unboxed-closures/unboxed-closures-all-traits.rs b/tests/ui/unboxed-closures/unboxed-closures-all-traits.rs index dfccb02009e..0ca4de56d74 100644 --- a/tests/ui/unboxed-closures/unboxed-closures-all-traits.rs +++ b/tests/ui/unboxed-closures/unboxed-closures-all-traits.rs @@ -1,4 +1,4 @@ -// run-pass +//@ run-pass #![feature(lang_items)] fn a isize>(f: F) -> isize { diff --git a/tests/ui/unboxed-closures/unboxed-closures-blanket-fn-mut.rs b/tests/ui/unboxed-closures/unboxed-closures-blanket-fn-mut.rs index a1001673506..1cf4863bfa9 100644 --- a/tests/ui/unboxed-closures/unboxed-closures-blanket-fn-mut.rs +++ b/tests/ui/unboxed-closures/unboxed-closures-blanket-fn-mut.rs @@ -1,4 +1,4 @@ -// run-pass +//@ run-pass #![allow(unused_variables)] // Test that you can supply `&F` where `F: FnMut()`. diff --git a/tests/ui/unboxed-closures/unboxed-closures-blanket-fn.rs b/tests/ui/unboxed-closures/unboxed-closures-blanket-fn.rs index ca1d31ca544..921bd94ee62 100644 --- a/tests/ui/unboxed-closures/unboxed-closures-blanket-fn.rs +++ b/tests/ui/unboxed-closures/unboxed-closures-blanket-fn.rs @@ -1,4 +1,4 @@ -// run-pass +//@ run-pass #![allow(unused_variables)] // Test that you can supply `&F` where `F: Fn()`. diff --git a/tests/ui/unboxed-closures/unboxed-closures-boxed.rs b/tests/ui/unboxed-closures/unboxed-closures-boxed.rs index 53f0523da70..3240fe79a23 100644 --- a/tests/ui/unboxed-closures/unboxed-closures-boxed.rs +++ b/tests/ui/unboxed-closures/unboxed-closures-boxed.rs @@ -1,4 +1,4 @@ -// run-pass +//@ run-pass fn make_adder(x: i32) -> Boxi32+'static> { diff --git a/tests/ui/unboxed-closures/unboxed-closures-by-ref.rs b/tests/ui/unboxed-closures/unboxed-closures-by-ref.rs index cf4d4d3e136..e43e5285e71 100644 --- a/tests/ui/unboxed-closures/unboxed-closures-by-ref.rs +++ b/tests/ui/unboxed-closures/unboxed-closures-by-ref.rs @@ -1,4 +1,4 @@ -// run-pass +//@ run-pass // Test by-ref capture of environment in unboxed closure types fn call_fn(f: F) { diff --git a/tests/ui/unboxed-closures/unboxed-closures-call-fn-autoderef.rs b/tests/ui/unboxed-closures/unboxed-closures-call-fn-autoderef.rs index e23a75ab334..34486c00b4e 100644 --- a/tests/ui/unboxed-closures/unboxed-closures-call-fn-autoderef.rs +++ b/tests/ui/unboxed-closures/unboxed-closures-call-fn-autoderef.rs @@ -1,4 +1,4 @@ -// run-pass +//@ run-pass #![allow(unused_imports)] // Test that the call operator autoderefs when calling a bounded type parameter. diff --git a/tests/ui/unboxed-closures/unboxed-closures-call-sugar-autoderef.rs b/tests/ui/unboxed-closures/unboxed-closures-call-sugar-autoderef.rs index 8a40c1d4785..39150ab26a1 100644 --- a/tests/ui/unboxed-closures/unboxed-closures-call-sugar-autoderef.rs +++ b/tests/ui/unboxed-closures/unboxed-closures-call-sugar-autoderef.rs @@ -1,4 +1,4 @@ -// run-pass +//@ run-pass // Test that the call operator autoderefs when calling a bounded type parameter. fn call_with_2(x: &mut F) -> isize diff --git a/tests/ui/unboxed-closures/unboxed-closures-call-sugar-object-autoderef.rs b/tests/ui/unboxed-closures/unboxed-closures-call-sugar-object-autoderef.rs index 2433f0757aa..42d96d18e4a 100644 --- a/tests/ui/unboxed-closures/unboxed-closures-call-sugar-object-autoderef.rs +++ b/tests/ui/unboxed-closures/unboxed-closures-call-sugar-object-autoderef.rs @@ -1,4 +1,4 @@ -// run-pass +//@ run-pass // Test that the call operator autoderefs when calling to an object type. fn make_adder(x: isize) -> Boxisize + 'static> { diff --git a/tests/ui/unboxed-closures/unboxed-closures-call-sugar-object.rs b/tests/ui/unboxed-closures/unboxed-closures-call-sugar-object.rs index b27d6104959..c6ad829de9b 100644 --- a/tests/ui/unboxed-closures/unboxed-closures-call-sugar-object.rs +++ b/tests/ui/unboxed-closures/unboxed-closures-call-sugar-object.rs @@ -1,4 +1,4 @@ -// run-pass +//@ run-pass fn make_adder(x: isize) -> Boxisize + 'static> { Box::new(move |y| { x + y }) } diff --git a/tests/ui/unboxed-closures/unboxed-closures-counter-not-moved.rs b/tests/ui/unboxed-closures/unboxed-closures-counter-not-moved.rs index 390386e57fa..42287ac5070 100644 --- a/tests/ui/unboxed-closures/unboxed-closures-counter-not-moved.rs +++ b/tests/ui/unboxed-closures/unboxed-closures-counter-not-moved.rs @@ -1,4 +1,4 @@ -// run-pass +//@ run-pass // Test that we mutate a counter on the stack only when we expect to. fn call(f: F) where F : FnOnce() { diff --git a/tests/ui/unboxed-closures/unboxed-closures-cross-crate.rs b/tests/ui/unboxed-closures/unboxed-closures-cross-crate.rs index 39cc260726d..7825e86f629 100644 --- a/tests/ui/unboxed-closures/unboxed-closures-cross-crate.rs +++ b/tests/ui/unboxed-closures/unboxed-closures-cross-crate.rs @@ -1,10 +1,10 @@ -// run-pass +//@ run-pass #![allow(non_camel_case_types)] // Test that unboxed closures work with cross-crate inlining // Acts as a regression test for #16790, #18378 and #18543 -// aux-build:unboxed-closures-cross-crate.rs +//@ aux-build:unboxed-closures-cross-crate.rs extern crate unboxed_closures_cross_crate as ubcc; diff --git a/tests/ui/unboxed-closures/unboxed-closures-direct-sugary-call.rs b/tests/ui/unboxed-closures/unboxed-closures-direct-sugary-call.rs index 1c5e74e593c..632bffbea18 100644 --- a/tests/ui/unboxed-closures/unboxed-closures-direct-sugary-call.rs +++ b/tests/ui/unboxed-closures/unboxed-closures-direct-sugary-call.rs @@ -1,6 +1,6 @@ -// run-pass +//@ run-pass #![allow(unused_mut)] -// pretty-expanded FIXME #23616 +//@ pretty-expanded FIXME #23616 fn main() { let mut unboxed = || {}; diff --git a/tests/ui/unboxed-closures/unboxed-closures-drop.rs b/tests/ui/unboxed-closures/unboxed-closures-drop.rs index ba3c61ca22b..11be3059480 100644 --- a/tests/ui/unboxed-closures/unboxed-closures-drop.rs +++ b/tests/ui/unboxed-closures/unboxed-closures-drop.rs @@ -1,4 +1,4 @@ -// run-pass +//@ run-pass #![allow(path_statements)] #![allow(dead_code)] // A battery of tests to ensure destructors of unboxed closure environments diff --git a/tests/ui/unboxed-closures/unboxed-closures-extern-fn-hr.rs b/tests/ui/unboxed-closures/unboxed-closures-extern-fn-hr.rs index 3ee1aeb109b..63366ca6cbf 100644 --- a/tests/ui/unboxed-closures/unboxed-closures-extern-fn-hr.rs +++ b/tests/ui/unboxed-closures/unboxed-closures-extern-fn-hr.rs @@ -1,4 +1,4 @@ -// run-pass +//@ run-pass // Checks that higher-ranked extern fn pointers implement the full range of Fn traits. fn square(x: &isize) -> isize { (*x) * (*x) } diff --git a/tests/ui/unboxed-closures/unboxed-closures-extern-fn.rs b/tests/ui/unboxed-closures/unboxed-closures-extern-fn.rs index d07e871b10d..355791cda26 100644 --- a/tests/ui/unboxed-closures/unboxed-closures-extern-fn.rs +++ b/tests/ui/unboxed-closures/unboxed-closures-extern-fn.rs @@ -1,4 +1,4 @@ -// run-pass +//@ run-pass // Checks that extern fn pointers implement the full range of Fn traits. diff --git a/tests/ui/unboxed-closures/unboxed-closures-fn-as-fnmut-and-fnonce.rs b/tests/ui/unboxed-closures/unboxed-closures-fn-as-fnmut-and-fnonce.rs index db1bea0e115..f61ecdd9ccb 100644 --- a/tests/ui/unboxed-closures/unboxed-closures-fn-as-fnmut-and-fnonce.rs +++ b/tests/ui/unboxed-closures/unboxed-closures-fn-as-fnmut-and-fnonce.rs @@ -1,4 +1,4 @@ -// run-pass +//@ run-pass // Checks that the Fn trait hierarchy rules permit // any Fn trait to be used where Fn is implemented. diff --git a/tests/ui/unboxed-closures/unboxed-closures-fnmut-as-fnonce.rs b/tests/ui/unboxed-closures/unboxed-closures-fnmut-as-fnonce.rs index bd577f7c479..3d1a06ef66c 100644 --- a/tests/ui/unboxed-closures/unboxed-closures-fnmut-as-fnonce.rs +++ b/tests/ui/unboxed-closures/unboxed-closures-fnmut-as-fnonce.rs @@ -1,4 +1,4 @@ -// run-pass +//@ run-pass // Checks that the Fn trait hierarchy rules permit // FnMut or FnOnce to be used where FnMut is implemented. diff --git a/tests/ui/unboxed-closures/unboxed-closures-generic.rs b/tests/ui/unboxed-closures/unboxed-closures-generic.rs index 524e756e69b..4419c96b781 100644 --- a/tests/ui/unboxed-closures/unboxed-closures-generic.rs +++ b/tests/ui/unboxed-closures/unboxed-closures-generic.rs @@ -1,4 +1,4 @@ -// run-pass +//@ run-pass fn call_iti32>(y: i32, mut f: F) -> i32 { f(2, y) } diff --git a/tests/ui/unboxed-closures/unboxed-closures-infer-arg-types-from-expected-bound.rs b/tests/ui/unboxed-closures/unboxed-closures-infer-arg-types-from-expected-bound.rs index e0c9105760d..c7c50b7b50e 100644 --- a/tests/ui/unboxed-closures/unboxed-closures-infer-arg-types-from-expected-bound.rs +++ b/tests/ui/unboxed-closures/unboxed-closures-infer-arg-types-from-expected-bound.rs @@ -1,8 +1,8 @@ -// run-pass +//@ run-pass // Test that we are able to infer that the type of `x` is `isize` based // on the expected type from the object. -// pretty-expanded FIXME #23616 +//@ pretty-expanded FIXME #23616 pub trait ToPrimitive { fn to_int(&self) {} diff --git a/tests/ui/unboxed-closures/unboxed-closures-infer-arg-types-from-expected-object-type.rs b/tests/ui/unboxed-closures/unboxed-closures-infer-arg-types-from-expected-object-type.rs index d2eaee30410..a54048d2518 100644 --- a/tests/ui/unboxed-closures/unboxed-closures-infer-arg-types-from-expected-object-type.rs +++ b/tests/ui/unboxed-closures/unboxed-closures-infer-arg-types-from-expected-object-type.rs @@ -1,8 +1,8 @@ -// run-pass +//@ run-pass // Test that we are able to infer that the type of `x` is `isize` based // on the expected type from the object. -// pretty-expanded FIXME #23616 +//@ pretty-expanded FIXME #23616 pub trait ToPrimitive { fn to_int(&self) {} diff --git a/tests/ui/unboxed-closures/unboxed-closures-infer-arg-types-w-bound-regs-from-expected-bound.rs b/tests/ui/unboxed-closures/unboxed-closures-infer-arg-types-w-bound-regs-from-expected-bound.rs index c3abdd8aab0..8c7b1c7534b 100644 --- a/tests/ui/unboxed-closures/unboxed-closures-infer-arg-types-w-bound-regs-from-expected-bound.rs +++ b/tests/ui/unboxed-closures/unboxed-closures-infer-arg-types-w-bound-regs-from-expected-bound.rs @@ -1,8 +1,8 @@ -// run-pass +//@ run-pass // Test that we are able to infer that the type of `x` is `isize` based // on the expected type from the object. -// pretty-expanded FIXME #23616 +//@ pretty-expanded FIXME #23616 pub trait ToPrimitive { fn to_int(&self) {} diff --git a/tests/ui/unboxed-closures/unboxed-closures-infer-explicit-call-early.rs b/tests/ui/unboxed-closures/unboxed-closures-infer-explicit-call-early.rs index 9135c82b4fd..fbf287d5fa8 100644 --- a/tests/ui/unboxed-closures/unboxed-closures-infer-explicit-call-early.rs +++ b/tests/ui/unboxed-closures/unboxed-closures-infer-explicit-call-early.rs @@ -1,4 +1,4 @@ -// run-pass +//@ run-pass #![feature(fn_traits)] fn main() { diff --git a/tests/ui/unboxed-closures/unboxed-closures-infer-fnmut-calling-fnmut.rs b/tests/ui/unboxed-closures/unboxed-closures-infer-fnmut-calling-fnmut.rs index 73f488a4fbb..c5d8e7cc9ef 100644 --- a/tests/ui/unboxed-closures/unboxed-closures-infer-fnmut-calling-fnmut.rs +++ b/tests/ui/unboxed-closures/unboxed-closures-infer-fnmut-calling-fnmut.rs @@ -1,4 +1,4 @@ -// run-pass +//@ run-pass // Test that we are able to infer a suitable kind for this closure // that is just called (`FnMut`). diff --git a/tests/ui/unboxed-closures/unboxed-closures-infer-fnmut-move.rs b/tests/ui/unboxed-closures/unboxed-closures-infer-fnmut-move.rs index 7ac1ae30f77..b497f2575c8 100644 --- a/tests/ui/unboxed-closures/unboxed-closures-infer-fnmut-move.rs +++ b/tests/ui/unboxed-closures/unboxed-closures-infer-fnmut-move.rs @@ -1,4 +1,4 @@ -// run-pass +//@ run-pass // Test that we are able to infer a suitable kind for this `move` // closure that is just called (`FnMut`). diff --git a/tests/ui/unboxed-closures/unboxed-closures-infer-fnmut.rs b/tests/ui/unboxed-closures/unboxed-closures-infer-fnmut.rs index 0fbb504c2ba..f8708a62310 100644 --- a/tests/ui/unboxed-closures/unboxed-closures-infer-fnmut.rs +++ b/tests/ui/unboxed-closures/unboxed-closures-infer-fnmut.rs @@ -1,4 +1,4 @@ -// run-pass +//@ run-pass // Test that we are able to infer a suitable kind for this closure // that is just called (`FnMut`). diff --git a/tests/ui/unboxed-closures/unboxed-closures-infer-fnonce-move.rs b/tests/ui/unboxed-closures/unboxed-closures-infer-fnonce-move.rs index 6381386c4cc..1903c258654 100644 --- a/tests/ui/unboxed-closures/unboxed-closures-infer-fnonce-move.rs +++ b/tests/ui/unboxed-closures/unboxed-closures-infer-fnonce-move.rs @@ -1,4 +1,4 @@ -// run-pass +//@ run-pass // Test that we are able to infer a suitable kind for this `move` // closure that is just called (`FnOnce`). diff --git a/tests/ui/unboxed-closures/unboxed-closures-infer-fnonce.rs b/tests/ui/unboxed-closures/unboxed-closures-infer-fnonce.rs index 3c8ea7d8510..26cff438618 100644 --- a/tests/ui/unboxed-closures/unboxed-closures-infer-fnonce.rs +++ b/tests/ui/unboxed-closures/unboxed-closures-infer-fnonce.rs @@ -1,4 +1,4 @@ -// run-pass +//@ run-pass // Test that we are able to infer a suitable kind for this closure // that is just called (`FnOnce`). diff --git a/tests/ui/unboxed-closures/unboxed-closures-infer-kind.rs b/tests/ui/unboxed-closures/unboxed-closures-infer-kind.rs index fc01bd9b6d9..cbc98d9fb17 100644 --- a/tests/ui/unboxed-closures/unboxed-closures-infer-kind.rs +++ b/tests/ui/unboxed-closures/unboxed-closures-infer-kind.rs @@ -1,4 +1,4 @@ -// run-pass +//@ run-pass // Test that we can infer the "kind" of an unboxed closure based on // the expected type. diff --git a/tests/ui/unboxed-closures/unboxed-closures-infer-recursive-fn.rs b/tests/ui/unboxed-closures/unboxed-closures-infer-recursive-fn.rs index a0fbbafe25f..bd1769af1da 100644 --- a/tests/ui/unboxed-closures/unboxed-closures-infer-recursive-fn.rs +++ b/tests/ui/unboxed-closures/unboxed-closures-infer-recursive-fn.rs @@ -1,4 +1,4 @@ -// run-pass +//@ run-pass #![feature(fn_traits, unboxed_closures)] use std::marker::PhantomData; diff --git a/tests/ui/unboxed-closures/unboxed-closures-infer-upvar.rs b/tests/ui/unboxed-closures/unboxed-closures-infer-upvar.rs index 6a5e5b9c224..a78992f66e0 100644 --- a/tests/ui/unboxed-closures/unboxed-closures-infer-upvar.rs +++ b/tests/ui/unboxed-closures/unboxed-closures-infer-upvar.rs @@ -1,4 +1,4 @@ -// run-pass +//@ run-pass // Test that the type variable in the type(`Vec<_>`) of a closed over // variable does not interfere with type inference. diff --git a/tests/ui/unboxed-closures/unboxed-closures-manual-impl.rs b/tests/ui/unboxed-closures/unboxed-closures-manual-impl.rs index df60b42ab12..2d4e3523b2c 100644 --- a/tests/ui/unboxed-closures/unboxed-closures-manual-impl.rs +++ b/tests/ui/unboxed-closures/unboxed-closures-manual-impl.rs @@ -1,4 +1,4 @@ -// run-pass +//@ run-pass #![feature(unboxed_closures, fn_traits)] struct S; diff --git a/tests/ui/unboxed-closures/unboxed-closures-monomorphization.rs b/tests/ui/unboxed-closures/unboxed-closures-monomorphization.rs index 2df360d4a30..46fa8995c96 100644 --- a/tests/ui/unboxed-closures/unboxed-closures-monomorphization.rs +++ b/tests/ui/unboxed-closures/unboxed-closures-monomorphization.rs @@ -1,4 +1,4 @@ -// run-pass +//@ run-pass // Test that unboxed closures in contexts with free type parameters // monomorphize correctly (issue #16791) diff --git a/tests/ui/unboxed-closures/unboxed-closures-move-from-projection-issue-30046.rs b/tests/ui/unboxed-closures/unboxed-closures-move-from-projection-issue-30046.rs index 4388e6bcf77..105a2a96a88 100644 --- a/tests/ui/unboxed-closures/unboxed-closures-move-from-projection-issue-30046.rs +++ b/tests/ui/unboxed-closures/unboxed-closures-move-from-projection-issue-30046.rs @@ -1,4 +1,4 @@ -// run-pass +//@ run-pass #![allow(unused)] fn foo(f: F) diff --git a/tests/ui/unboxed-closures/unboxed-closures-move-mutable.rs b/tests/ui/unboxed-closures/unboxed-closures-move-mutable.rs index 470904fd391..d883053d276 100644 --- a/tests/ui/unboxed-closures/unboxed-closures-move-mutable.rs +++ b/tests/ui/unboxed-closures/unboxed-closures-move-mutable.rs @@ -1,5 +1,5 @@ -// run-pass -// pretty-expanded FIXME #23616 +//@ run-pass +//@ pretty-expanded FIXME #23616 #![deny(unused_mut)] #![allow(unused_must_use)] diff --git a/tests/ui/unboxed-closures/unboxed-closures-move-some-upvars-in-by-ref-closure.rs b/tests/ui/unboxed-closures/unboxed-closures-move-some-upvars-in-by-ref-closure.rs index 2d219643f3e..55b42e01036 100644 --- a/tests/ui/unboxed-closures/unboxed-closures-move-some-upvars-in-by-ref-closure.rs +++ b/tests/ui/unboxed-closures/unboxed-closures-move-some-upvars-in-by-ref-closure.rs @@ -1,4 +1,4 @@ -// run-pass +//@ run-pass // Test that in a by-ref once closure we move some variables even as // we capture others by mutable reference. diff --git a/tests/ui/unboxed-closures/unboxed-closures-prelude.rs b/tests/ui/unboxed-closures/unboxed-closures-prelude.rs index 89a273b7a43..ca0ca66c035 100644 --- a/tests/ui/unboxed-closures/unboxed-closures-prelude.rs +++ b/tests/ui/unboxed-closures/unboxed-closures-prelude.rs @@ -1,7 +1,7 @@ -// run-pass +//@ run-pass // Tests that the re-exports of `FnOnce` et al from the prelude work. -// pretty-expanded FIXME #23616 +//@ pretty-expanded FIXME #23616 fn main() { let task: Box isize> = Box::new(|x| x); diff --git a/tests/ui/unboxed-closures/unboxed-closures-simple.rs b/tests/ui/unboxed-closures/unboxed-closures-simple.rs index 1449554024c..aa50180725e 100644 --- a/tests/ui/unboxed-closures/unboxed-closures-simple.rs +++ b/tests/ui/unboxed-closures/unboxed-closures-simple.rs @@ -1,4 +1,4 @@ -// run-pass +//@ run-pass #![allow(unused_mut)] #![allow(unused_imports)] use std::ops::FnMut; diff --git a/tests/ui/unboxed-closures/unboxed-closures-single-word-env.rs b/tests/ui/unboxed-closures/unboxed-closures-single-word-env.rs index 8ada7494e02..e9d75386d16 100644 --- a/tests/ui/unboxed-closures/unboxed-closures-single-word-env.rs +++ b/tests/ui/unboxed-closures/unboxed-closures-single-word-env.rs @@ -1,4 +1,4 @@ -// run-pass +//@ run-pass // Ensures that single-word environments work right in unboxed closures. // These take a different path in codegen. diff --git a/tests/ui/unboxed-closures/unboxed-closures-static-call-fn-once.rs b/tests/ui/unboxed-closures/unboxed-closures-static-call-fn-once.rs index 054f284ea2a..6103dbd9959 100644 --- a/tests/ui/unboxed-closures/unboxed-closures-static-call-fn-once.rs +++ b/tests/ui/unboxed-closures/unboxed-closures-static-call-fn-once.rs @@ -1,5 +1,5 @@ -// run-pass -// pretty-expanded FIXME #23616 +//@ run-pass +//@ pretty-expanded FIXME #23616 fn main() { let onetime = |x| x; diff --git a/tests/ui/unboxed-closures/unboxed-closures-sugar-object.rs b/tests/ui/unboxed-closures/unboxed-closures-sugar-object.rs index 1ca25517c3c..56d65367d63 100644 --- a/tests/ui/unboxed-closures/unboxed-closures-sugar-object.rs +++ b/tests/ui/unboxed-closures/unboxed-closures-sugar-object.rs @@ -1,4 +1,4 @@ -// run-pass +//@ run-pass // Test unboxed closure sugar used in object types. #![allow(dead_code)] diff --git a/tests/ui/unboxed-closures/unboxed-closures-unique-type-id.rs b/tests/ui/unboxed-closures/unboxed-closures-unique-type-id.rs index 94bb44d2cf5..4ba1fd21385 100644 --- a/tests/ui/unboxed-closures/unboxed-closures-unique-type-id.rs +++ b/tests/ui/unboxed-closures/unboxed-closures-unique-type-id.rs @@ -1,4 +1,4 @@ -// run-pass +//@ run-pass // This code used to produce the following ICE: // @@ -9,7 +9,7 @@ // // This is a regression test for issue #17021. // -// compile-flags: -g +//@ compile-flags: -g use std::ptr; diff --git a/tests/ui/unboxed-closures/unboxed-closures-zero-args.rs b/tests/ui/unboxed-closures/unboxed-closures-zero-args.rs index 6f41c35584e..81fe12afccf 100644 --- a/tests/ui/unboxed-closures/unboxed-closures-zero-args.rs +++ b/tests/ui/unboxed-closures/unboxed-closures-zero-args.rs @@ -1,6 +1,6 @@ -// run-pass +//@ run-pass #![allow(unused_mut)] -// pretty-expanded FIXME #23616 +//@ pretty-expanded FIXME #23616 fn main() { let mut zero = || {}; diff --git a/tests/ui/underscore-imports/auxiliary/duplicate.rs b/tests/ui/underscore-imports/auxiliary/duplicate.rs index 92d741b6a26..61613d24b9e 100644 --- a/tests/ui/underscore-imports/auxiliary/duplicate.rs +++ b/tests/ui/underscore-imports/auxiliary/duplicate.rs @@ -1,5 +1,5 @@ -// force-host -// no-prefer-dynamic +//@ force-host +//@ no-prefer-dynamic #![crate_type = "proc-macro"] diff --git a/tests/ui/underscore-imports/basic.rs b/tests/ui/underscore-imports/basic.rs index c021ad5ee0d..624ecb47ca6 100644 --- a/tests/ui/underscore-imports/basic.rs +++ b/tests/ui/underscore-imports/basic.rs @@ -1,5 +1,5 @@ -// check-pass -// aux-build:underscore-imports.rs +//@ check-pass +//@ aux-build:underscore-imports.rs #![warn(unused_imports, unused_extern_crates)] diff --git a/tests/ui/underscore-imports/cycle.rs b/tests/ui/underscore-imports/cycle.rs index c8a29368787..f4ca2b72aad 100644 --- a/tests/ui/underscore-imports/cycle.rs +++ b/tests/ui/underscore-imports/cycle.rs @@ -1,6 +1,6 @@ // Check that cyclic glob imports are allowed with underscore imports -// check-pass +//@ check-pass #![allow(noop_method_call)] diff --git a/tests/ui/underscore-imports/duplicate.rs b/tests/ui/underscore-imports/duplicate.rs index 20bc7848acd..4afad77ee4f 100644 --- a/tests/ui/underscore-imports/duplicate.rs +++ b/tests/ui/underscore-imports/duplicate.rs @@ -1,5 +1,5 @@ -// check-pass -// aux-build:duplicate.rs +//@ check-pass +//@ aux-build:duplicate.rs extern crate duplicate; diff --git a/tests/ui/underscore-imports/hygiene-2.rs b/tests/ui/underscore-imports/hygiene-2.rs index 510d91d0d46..d05aa0133cb 100644 --- a/tests/ui/underscore-imports/hygiene-2.rs +++ b/tests/ui/underscore-imports/hygiene-2.rs @@ -1,7 +1,7 @@ // Make sure that underscore imports with different contexts can exist in the // same scope. -// check-pass +//@ check-pass #![feature(decl_macro)] diff --git a/tests/ui/underscore-imports/hygiene.rs b/tests/ui/underscore-imports/hygiene.rs index 7795ccb7971..3c0654a327e 100644 --- a/tests/ui/underscore-imports/hygiene.rs +++ b/tests/ui/underscore-imports/hygiene.rs @@ -1,6 +1,6 @@ // Make sure that underscore imports have the same hygiene considerations as other imports. -// check-pass +//@ check-pass #![feature(decl_macro)] #![allow(noop_method_call)] diff --git a/tests/ui/underscore-imports/intercrate.rs b/tests/ui/underscore-imports/intercrate.rs index 144f95bace1..04de2bcc79a 100644 --- a/tests/ui/underscore-imports/intercrate.rs +++ b/tests/ui/underscore-imports/intercrate.rs @@ -1,5 +1,5 @@ -// check-pass -// aux-build:underscore-imports.rs +//@ check-pass +//@ aux-build:underscore-imports.rs extern crate underscore_imports; diff --git a/tests/ui/underscore-imports/macro-expanded.rs b/tests/ui/underscore-imports/macro-expanded.rs index 43f527bc9a4..dffff5e7710 100644 --- a/tests/ui/underscore-imports/macro-expanded.rs +++ b/tests/ui/underscore-imports/macro-expanded.rs @@ -1,6 +1,6 @@ // Check that macro expanded underscore imports behave as expected -// check-pass +//@ check-pass #![feature(decl_macro, rustc_attrs)] diff --git a/tests/ui/underscore-imports/unused-2018.rs b/tests/ui/underscore-imports/unused-2018.rs index d06a26a5f11..c1295e18a12 100644 --- a/tests/ui/underscore-imports/unused-2018.rs +++ b/tests/ui/underscore-imports/unused-2018.rs @@ -1,4 +1,4 @@ -// edition:2018 +//@ edition:2018 #![deny(unused_imports)] diff --git a/tests/ui/underscore-lifetime/where-clause-inherent-impl-ampersand-rust2015.fixed b/tests/ui/underscore-lifetime/where-clause-inherent-impl-ampersand-rust2015.fixed index 700e4f25423..6bc09917bee 100644 --- a/tests/ui/underscore-lifetime/where-clause-inherent-impl-ampersand-rust2015.fixed +++ b/tests/ui/underscore-lifetime/where-clause-inherent-impl-ampersand-rust2015.fixed @@ -1,4 +1,4 @@ -// run-rustfix +//@ run-rustfix #![allow(dead_code)] trait WithType {} diff --git a/tests/ui/underscore-lifetime/where-clause-inherent-impl-ampersand-rust2015.rs b/tests/ui/underscore-lifetime/where-clause-inherent-impl-ampersand-rust2015.rs index 66ba9b24dac..11c1fd90a4a 100644 --- a/tests/ui/underscore-lifetime/where-clause-inherent-impl-ampersand-rust2015.rs +++ b/tests/ui/underscore-lifetime/where-clause-inherent-impl-ampersand-rust2015.rs @@ -1,4 +1,4 @@ -// run-rustfix +//@ run-rustfix #![allow(dead_code)] trait WithType {} diff --git a/tests/ui/underscore-lifetime/where-clause-inherent-impl-ampersand-rust2018.fixed b/tests/ui/underscore-lifetime/where-clause-inherent-impl-ampersand-rust2018.fixed index 56682db3b0b..5222cf797f7 100644 --- a/tests/ui/underscore-lifetime/where-clause-inherent-impl-ampersand-rust2018.fixed +++ b/tests/ui/underscore-lifetime/where-clause-inherent-impl-ampersand-rust2018.fixed @@ -1,5 +1,5 @@ -// edition:2018 -// run-rustfix +//@ edition:2018 +//@ run-rustfix #![allow(dead_code)] trait WithType {} diff --git a/tests/ui/underscore-lifetime/where-clause-inherent-impl-ampersand-rust2018.rs b/tests/ui/underscore-lifetime/where-clause-inherent-impl-ampersand-rust2018.rs index 5302b2f1576..f2235843a06 100644 --- a/tests/ui/underscore-lifetime/where-clause-inherent-impl-ampersand-rust2018.rs +++ b/tests/ui/underscore-lifetime/where-clause-inherent-impl-ampersand-rust2018.rs @@ -1,5 +1,5 @@ -// edition:2018 -// run-rustfix +//@ edition:2018 +//@ run-rustfix #![allow(dead_code)] trait WithType {} diff --git a/tests/ui/underscore-lifetime/where-clause-inherent-impl-underscore.rs b/tests/ui/underscore-lifetime/where-clause-inherent-impl-underscore.rs index 38189816da8..578b2a453b5 100644 --- a/tests/ui/underscore-lifetime/where-clause-inherent-impl-underscore.rs +++ b/tests/ui/underscore-lifetime/where-clause-inherent-impl-underscore.rs @@ -1,5 +1,5 @@ -// revisions: rust2015 rust2018 -//[rust2018] edition:2018 +//@ revisions: rust2015 rust2018 +//@[rust2018] edition:2018 trait WithType {} trait WithRegion<'a> { } diff --git a/tests/ui/underscore-lifetime/where-clause-trait-impl-region-2015.fixed b/tests/ui/underscore-lifetime/where-clause-trait-impl-region-2015.fixed index f3adc7e7fad..8d9ec9dd747 100644 --- a/tests/ui/underscore-lifetime/where-clause-trait-impl-region-2015.fixed +++ b/tests/ui/underscore-lifetime/where-clause-trait-impl-region-2015.fixed @@ -1,4 +1,4 @@ -// run-rustfix +//@ run-rustfix #![allow(dead_code)] trait WithType {} diff --git a/tests/ui/underscore-lifetime/where-clause-trait-impl-region-2015.rs b/tests/ui/underscore-lifetime/where-clause-trait-impl-region-2015.rs index 1e084e9ad41..3ea02c9478a 100644 --- a/tests/ui/underscore-lifetime/where-clause-trait-impl-region-2015.rs +++ b/tests/ui/underscore-lifetime/where-clause-trait-impl-region-2015.rs @@ -1,4 +1,4 @@ -// run-rustfix +//@ run-rustfix #![allow(dead_code)] trait WithType {} diff --git a/tests/ui/underscore-lifetime/where-clause-trait-impl-region-2018.fixed b/tests/ui/underscore-lifetime/where-clause-trait-impl-region-2018.fixed index dd8074abed7..d14ea8ffce8 100644 --- a/tests/ui/underscore-lifetime/where-clause-trait-impl-region-2018.fixed +++ b/tests/ui/underscore-lifetime/where-clause-trait-impl-region-2018.fixed @@ -1,5 +1,5 @@ -// run-rustfix -// edition:2018 +//@ run-rustfix +//@ edition:2018 #![allow(dead_code)] diff --git a/tests/ui/underscore-lifetime/where-clause-trait-impl-region-2018.rs b/tests/ui/underscore-lifetime/where-clause-trait-impl-region-2018.rs index 4fc9c71b179..18e8591e8b5 100644 --- a/tests/ui/underscore-lifetime/where-clause-trait-impl-region-2018.rs +++ b/tests/ui/underscore-lifetime/where-clause-trait-impl-region-2018.rs @@ -1,5 +1,5 @@ -// run-rustfix -// edition:2018 +//@ run-rustfix +//@ edition:2018 #![allow(dead_code)] diff --git a/tests/ui/underscore-lifetime/where-clause-trait-impl-underscore.rs b/tests/ui/underscore-lifetime/where-clause-trait-impl-underscore.rs index 371d2e4ba43..3837ab7acd2 100644 --- a/tests/ui/underscore-lifetime/where-clause-trait-impl-underscore.rs +++ b/tests/ui/underscore-lifetime/where-clause-trait-impl-underscore.rs @@ -1,5 +1,5 @@ -// revisions: rust2015 rust2018 -//[rust2018] edition:2018 +//@ revisions: rust2015 rust2018 +//@[rust2018] edition:2018 trait WithType {} trait WithRegion<'a> { } diff --git a/tests/ui/underscore-lifetimes.rs b/tests/ui/underscore-lifetimes.rs index a1593880d84..6174f8ce036 100644 --- a/tests/ui/underscore-lifetimes.rs +++ b/tests/ui/underscore-lifetimes.rs @@ -1,4 +1,4 @@ -// run-pass +//@ run-pass #![allow(dead_code)] struct Foo<'a>(&'a u8); diff --git a/tests/ui/underscore-method-after-integer.rs b/tests/ui/underscore-method-after-integer.rs index 7fb8607f97d..d9eb21894e8 100644 --- a/tests/ui/underscore-method-after-integer.rs +++ b/tests/ui/underscore-method-after-integer.rs @@ -1,4 +1,4 @@ -// run-pass +//@ run-pass trait Tr : Sized { fn _method_on_numbers(self) {} diff --git a/tests/ui/uniform-paths/auxiliary/issue-53691.rs b/tests/ui/uniform-paths/auxiliary/issue-53691.rs index a4653317860..6eff37380ef 100644 --- a/tests/ui/uniform-paths/auxiliary/issue-53691.rs +++ b/tests/ui/uniform-paths/auxiliary/issue-53691.rs @@ -1,4 +1,4 @@ -// edition:2018 +//@ edition:2018 mod m { pub fn f() {} } mod n { pub fn g() {} } diff --git a/tests/ui/uniform-paths/basic-nested.rs b/tests/ui/uniform-paths/basic-nested.rs index dcf0eb646f3..2442532b2c0 100644 --- a/tests/ui/uniform-paths/basic-nested.rs +++ b/tests/ui/uniform-paths/basic-nested.rs @@ -1,7 +1,7 @@ // This test is similar to `basic.rs`, but nested in modules. -// run-pass -// edition:2018 +//@ run-pass +//@ edition:2018 #![feature(decl_macro)] diff --git a/tests/ui/uniform-paths/basic.rs b/tests/ui/uniform-paths/basic.rs index ce611a7cacf..12317be18bf 100644 --- a/tests/ui/uniform-paths/basic.rs +++ b/tests/ui/uniform-paths/basic.rs @@ -1,5 +1,5 @@ -// run-pass -// edition:2018 +//@ run-pass +//@ edition:2018 #![allow(unused_imports)] #![allow(non_camel_case_types)] diff --git a/tests/ui/uniform-paths/issue-53691.rs b/tests/ui/uniform-paths/issue-53691.rs index 5c5ca5b70bb..5c87f3c25ef 100644 --- a/tests/ui/uniform-paths/issue-53691.rs +++ b/tests/ui/uniform-paths/issue-53691.rs @@ -1,5 +1,5 @@ -// run-pass -// aux-build:issue-53691.rs +//@ run-pass +//@ aux-build:issue-53691.rs extern crate issue_53691; diff --git a/tests/ui/uniform-paths/macros-nested.rs b/tests/ui/uniform-paths/macros-nested.rs index 175ccd34e98..7643f06a73f 100644 --- a/tests/ui/uniform-paths/macros-nested.rs +++ b/tests/ui/uniform-paths/macros-nested.rs @@ -1,7 +1,7 @@ // This test is similar to `macros.rs`, but nested in modules. -// run-pass -// edition:2018 +//@ run-pass +//@ edition:2018 #![allow(non_camel_case_types)] diff --git a/tests/ui/uniform-paths/macros.rs b/tests/ui/uniform-paths/macros.rs index bf512b30560..f5c794a5373 100644 --- a/tests/ui/uniform-paths/macros.rs +++ b/tests/ui/uniform-paths/macros.rs @@ -1,7 +1,7 @@ // This test is similar to `basic.rs`, but with macros defining local items. -// run-pass -// edition:2018 +//@ run-pass +//@ edition:2018 #![allow(non_camel_case_types)] diff --git a/tests/ui/uniform-paths/same-crate.rs b/tests/ui/uniform-paths/same-crate.rs index ce4cc13d9ec..f32b3148593 100644 --- a/tests/ui/uniform-paths/same-crate.rs +++ b/tests/ui/uniform-paths/same-crate.rs @@ -1,5 +1,5 @@ -// run-pass -// edition:2018 +//@ run-pass +//@ edition:2018 pub const A: usize = 0; diff --git a/tests/ui/uninhabited/diverging-guard.rs b/tests/ui/uninhabited/diverging-guard.rs index 7d57cd51c2d..234d630e345 100644 --- a/tests/ui/uninhabited/diverging-guard.rs +++ b/tests/ui/uninhabited/diverging-guard.rs @@ -1,4 +1,4 @@ -// check-pass +//@ check-pass enum Void {} diff --git a/tests/ui/uninhabited/exhaustive-wo-nevertype-issue-51221.rs b/tests/ui/uninhabited/exhaustive-wo-nevertype-issue-51221.rs index b5943207835..e392d74ea0f 100644 --- a/tests/ui/uninhabited/exhaustive-wo-nevertype-issue-51221.rs +++ b/tests/ui/uninhabited/exhaustive-wo-nevertype-issue-51221.rs @@ -1,4 +1,4 @@ -// check-pass +//@ check-pass #![feature(exhaustive_patterns)] diff --git a/tests/ui/uninhabited/issue-107505.rs b/tests/ui/uninhabited/issue-107505.rs index 61598541ddf..4e895acbb70 100644 --- a/tests/ui/uninhabited/issue-107505.rs +++ b/tests/ui/uninhabited/issue-107505.rs @@ -1,5 +1,5 @@ -// compile-flags: --crate-type=lib -// check-pass +//@ compile-flags: --crate-type=lib +//@ check-pass // Make sure we don't pass inference variables to uninhabitedness checks in borrowck diff --git a/tests/ui/uninhabited/privately-uninhabited-dead-code.rs b/tests/ui/uninhabited/privately-uninhabited-dead-code.rs index f476704cd8a..27e4d8d2073 100644 --- a/tests/ui/uninhabited/privately-uninhabited-dead-code.rs +++ b/tests/ui/uninhabited/privately-uninhabited-dead-code.rs @@ -1,4 +1,4 @@ -// build-pass (FIXME(62277): could be check-pass?) +//@ build-pass (FIXME(62277): could be check-pass?) #![deny(unused_variables)] diff --git a/tests/ui/uninhabited/projection.rs b/tests/ui/uninhabited/projection.rs index be0d3ff7da7..395eeb67579 100644 --- a/tests/ui/uninhabited/projection.rs +++ b/tests/ui/uninhabited/projection.rs @@ -1,4 +1,4 @@ -// check-pass +//@ check-pass #![feature(never_type, exhaustive_patterns)] diff --git a/tests/ui/uninhabited/uninhabited-enum-cast.rs b/tests/ui/uninhabited/uninhabited-enum-cast.rs index 5a75c94c42f..5199721be0e 100644 --- a/tests/ui/uninhabited/uninhabited-enum-cast.rs +++ b/tests/ui/uninhabited/uninhabited-enum-cast.rs @@ -1,4 +1,4 @@ -// check-pass +//@ check-pass enum E {} diff --git a/tests/ui/uninhabited/uninhabited-irrefutable.rs b/tests/ui/uninhabited/uninhabited-irrefutable.rs index 2ef3b668cb0..67622a842a5 100644 --- a/tests/ui/uninhabited/uninhabited-irrefutable.rs +++ b/tests/ui/uninhabited/uninhabited-irrefutable.rs @@ -1,4 +1,4 @@ -// revisions: min_exhaustive_patterns exhaustive_patterns +//@ revisions: min_exhaustive_patterns exhaustive_patterns #![cfg_attr(exhaustive_patterns, feature(exhaustive_patterns))] #![cfg_attr(min_exhaustive_patterns, feature(min_exhaustive_patterns))] #![cfg_attr(min_exhaustive_patterns, allow(incomplete_features))] diff --git a/tests/ui/uninit-empty-types.rs b/tests/ui/uninit-empty-types.rs index b21de882b2c..a6c11c4999a 100644 --- a/tests/ui/uninit-empty-types.rs +++ b/tests/ui/uninit-empty-types.rs @@ -1,7 +1,7 @@ -// build-pass +//@ build-pass // Test the uninit() construct returning various empty types. -// pretty-expanded FIXME #23616 +//@ pretty-expanded FIXME #23616 use std::mem::MaybeUninit; diff --git a/tests/ui/union/issue-99375.rs b/tests/ui/union/issue-99375.rs index 175018a7d71..ead083b21b1 100644 --- a/tests/ui/union/issue-99375.rs +++ b/tests/ui/union/issue-99375.rs @@ -1,4 +1,4 @@ -// check-pass +//@ check-pass union URes { uninit: (), diff --git a/tests/ui/union/projection-as-union-type.rs b/tests/ui/union/projection-as-union-type.rs index 143434c96f8..79e6b8d706f 100644 --- a/tests/ui/union/projection-as-union-type.rs +++ b/tests/ui/union/projection-as-union-type.rs @@ -1,5 +1,5 @@ // Ensures that we can use projections as union field's type. -// check-pass +//@ check-pass #![crate_type = "lib"] diff --git a/tests/ui/union/union-align.rs b/tests/ui/union/union-align.rs index 67ab10fef4b..4df61e6d448 100644 --- a/tests/ui/union/union-align.rs +++ b/tests/ui/union/union-align.rs @@ -1,4 +1,4 @@ -// run-pass +//@ run-pass #![allow(dead_code)] diff --git a/tests/ui/union/union-backcomp.rs b/tests/ui/union/union-backcomp.rs index 21b9fc50e1d..a71813968e8 100644 --- a/tests/ui/union/union-backcomp.rs +++ b/tests/ui/union/union-backcomp.rs @@ -1,4 +1,4 @@ -// run-pass +//@ run-pass #![allow(path_statements)] #![allow(dead_code)] diff --git a/tests/ui/union/union-basic.rs b/tests/ui/union/union-basic.rs index 1009def7d52..027f994ab4c 100644 --- a/tests/ui/union/union-basic.rs +++ b/tests/ui/union/union-basic.rs @@ -1,8 +1,8 @@ -// run-pass +//@ run-pass #![allow(unused_imports)] -// aux-build:union.rs +//@ aux-build:union.rs extern crate union; use std::mem::{size_of, align_of, zeroed}; diff --git a/tests/ui/union/union-const-codegen.rs b/tests/ui/union/union-const-codegen.rs index d5b30559595..6d57b85cc11 100644 --- a/tests/ui/union/union-const-codegen.rs +++ b/tests/ui/union/union-const-codegen.rs @@ -1,4 +1,4 @@ -// run-pass +//@ run-pass union U { a: u64, diff --git a/tests/ui/union/union-const-eval-field.rs b/tests/ui/union/union-const-eval-field.rs index 15a20899a78..0c68a98affc 100644 --- a/tests/ui/union/union-const-eval-field.rs +++ b/tests/ui/union/union-const-eval-field.rs @@ -1,4 +1,4 @@ -// run-pass +//@ run-pass type Field1 = (i32, u32); type Field2 = f32; diff --git a/tests/ui/union/union-const-eval.rs b/tests/ui/union/union-const-eval.rs index 70a97795b75..37def9320be 100644 --- a/tests/ui/union/union-const-eval.rs +++ b/tests/ui/union/union-const-eval.rs @@ -1,4 +1,4 @@ -// check-pass +//@ check-pass union U { a: usize, diff --git a/tests/ui/union/union-derive-rpass.rs b/tests/ui/union/union-derive-rpass.rs index 826b9e5a7c6..05a4ba1e17c 100644 --- a/tests/ui/union/union-derive-rpass.rs +++ b/tests/ui/union/union-derive-rpass.rs @@ -1,4 +1,4 @@ -// run-pass +//@ run-pass #![allow(dead_code)] #![allow(unused_variables)] diff --git a/tests/ui/union/union-drop-assign.rs b/tests/ui/union/union-drop-assign.rs index 215666bdd9d..e9165fddc51 100644 --- a/tests/ui/union/union-drop-assign.rs +++ b/tests/ui/union/union-drop-assign.rs @@ -1,4 +1,4 @@ -// run-pass +//@ run-pass #![allow(unused_assignments)] // Drop works for union itself. diff --git a/tests/ui/union/union-drop.rs b/tests/ui/union/union-drop.rs index 41c1e9243f7..e467eda2935 100644 --- a/tests/ui/union/union-drop.rs +++ b/tests/ui/union/union-drop.rs @@ -1,4 +1,4 @@ -// run-pass +//@ run-pass #![allow(dead_code)] #![allow(unused_variables)] diff --git a/tests/ui/union/union-generic-rpass.rs b/tests/ui/union/union-generic-rpass.rs index 69837f31cab..47fcc2926bc 100644 --- a/tests/ui/union/union-generic-rpass.rs +++ b/tests/ui/union/union-generic-rpass.rs @@ -1,4 +1,4 @@ -// run-pass +//@ run-pass #![allow(dead_code)] use std::mem::ManuallyDrop; diff --git a/tests/ui/union/union-inherent-method.rs b/tests/ui/union/union-inherent-method.rs index 2e75cce7b10..a3f962fb872 100644 --- a/tests/ui/union/union-inherent-method.rs +++ b/tests/ui/union/union-inherent-method.rs @@ -1,4 +1,4 @@ -// run-pass +//@ run-pass union U { a: u8, diff --git a/tests/ui/union/union-macro.rs b/tests/ui/union/union-macro.rs index 5ca013a44cd..01cba85deb3 100644 --- a/tests/ui/union/union-macro.rs +++ b/tests/ui/union/union-macro.rs @@ -1,4 +1,4 @@ -// run-pass +//@ run-pass #![allow(unused_variables)] diff --git a/tests/ui/union/union-manuallydrop-rpass.rs b/tests/ui/union/union-manuallydrop-rpass.rs index ba99e7441e6..c1be39c20e6 100644 --- a/tests/ui/union/union-manuallydrop-rpass.rs +++ b/tests/ui/union/union-manuallydrop-rpass.rs @@ -1,4 +1,4 @@ -// run-pass +//@ run-pass #![allow(dead_code)] use std::mem::needs_drop; diff --git a/tests/ui/union/union-nodrop.rs b/tests/ui/union/union-nodrop.rs index 7ce17a7c825..cfba22c5e30 100644 --- a/tests/ui/union/union-nodrop.rs +++ b/tests/ui/union/union-nodrop.rs @@ -1,4 +1,4 @@ -// run-pass +//@ run-pass #![allow(dead_code)] diff --git a/tests/ui/union/union-nonzero.rs b/tests/ui/union/union-nonzero.rs index e7ab4ebe323..efa87573e94 100644 --- a/tests/ui/union/union-nonzero.rs +++ b/tests/ui/union/union-nonzero.rs @@ -1,4 +1,4 @@ -// run-pass +//@ run-pass #![allow(dead_code)] diff --git a/tests/ui/union/union-overwrite.rs b/tests/ui/union/union-overwrite.rs index 399ed9ae458..cd9a370ff66 100644 --- a/tests/ui/union/union-overwrite.rs +++ b/tests/ui/union/union-overwrite.rs @@ -1,4 +1,4 @@ -// run-pass +//@ run-pass #[repr(C)] #[derive(Copy, Clone)] diff --git a/tests/ui/union/union-packed.rs b/tests/ui/union/union-packed.rs index 538c337a773..b1ab211eae8 100644 --- a/tests/ui/union/union-packed.rs +++ b/tests/ui/union/union-packed.rs @@ -1,4 +1,4 @@ -// run-pass +//@ run-pass #![allow(dead_code)] #![allow(non_snake_case)] diff --git a/tests/ui/union/union-pat-refutability.rs b/tests/ui/union/union-pat-refutability.rs index edcc1add38f..826bd42cd21 100644 --- a/tests/ui/union/union-pat-refutability.rs +++ b/tests/ui/union/union-pat-refutability.rs @@ -1,4 +1,4 @@ -// run-pass +//@ run-pass #![allow(dead_code)] diff --git a/tests/ui/union/union-trait-impl.rs b/tests/ui/union/union-trait-impl.rs index 8a7ac817240..d48ae18dd0e 100644 --- a/tests/ui/union/union-trait-impl.rs +++ b/tests/ui/union/union-trait-impl.rs @@ -1,4 +1,4 @@ -// run-pass +//@ run-pass use std::fmt; diff --git a/tests/ui/union/union-transmute.rs b/tests/ui/union/union-transmute.rs index be8062f6276..72ac4a85d59 100644 --- a/tests/ui/union/union-transmute.rs +++ b/tests/ui/union/union-transmute.rs @@ -1,4 +1,4 @@ -// run-pass +//@ run-pass union U { a: (u8, u8), diff --git a/tests/ui/unit.rs b/tests/ui/unit.rs index 4f2dd4194a5..98ac164b1d4 100644 --- a/tests/ui/unit.rs +++ b/tests/ui/unit.rs @@ -1,8 +1,8 @@ -// run-pass +//@ run-pass #![allow(unused_assignments)] #![allow(unknown_lints)] -// pretty-expanded FIXME #23616 +//@ pretty-expanded FIXME #23616 #![allow(unused_variables)] #![allow(dead_assignment)] diff --git a/tests/ui/unknown-llvm-arg.rs b/tests/ui/unknown-llvm-arg.rs index 289bae24f81..935c083dca6 100644 --- a/tests/ui/unknown-llvm-arg.rs +++ b/tests/ui/unknown-llvm-arg.rs @@ -1,6 +1,6 @@ -// compile-flags: -Cllvm-args=-not-a-real-llvm-arg -// normalize-stderr-test "--help" -> "-help" -// normalize-stderr-test "\n(\n|.)*" -> "" +//@ compile-flags: -Cllvm-args=-not-a-real-llvm-arg +//@ normalize-stderr-test "--help" -> "-help" +//@ normalize-stderr-test "\n(\n|.)*" -> "" // I'm seeing "--help" locally, but "-help" in CI, so I'm normalizing it to just "-help". diff --git a/tests/ui/unknown-unstable-lints/allow-unknown-unstable-lint-command-line.rs b/tests/ui/unknown-unstable-lints/allow-unknown-unstable-lint-command-line.rs index 80e30f23993..c55a5f92a14 100644 --- a/tests/ui/unknown-unstable-lints/allow-unknown-unstable-lint-command-line.rs +++ b/tests/ui/unknown-unstable-lints/allow-unknown-unstable-lint-command-line.rs @@ -1,4 +1,4 @@ -// check-pass -// compile-flags: -Aunknown_lints -Atest_unstable_lint +//@ check-pass +//@ compile-flags: -Aunknown_lints -Atest_unstable_lint fn main() {} diff --git a/tests/ui/unknown-unstable-lints/allow-unknown-unstable-lint-inline.rs b/tests/ui/unknown-unstable-lints/allow-unknown-unstable-lint-inline.rs index 992472c894a..4f5178e4792 100644 --- a/tests/ui/unknown-unstable-lints/allow-unknown-unstable-lint-inline.rs +++ b/tests/ui/unknown-unstable-lints/allow-unknown-unstable-lint-inline.rs @@ -1,4 +1,4 @@ -// check-pass +//@ check-pass #![allow(unknown_lints, test_unstable_lint)] diff --git a/tests/ui/unknown-unstable-lints/deny-unstable-lint-command-line.rs b/tests/ui/unknown-unstable-lints/deny-unstable-lint-command-line.rs index dcc06850de1..7bd4df47220 100644 --- a/tests/ui/unknown-unstable-lints/deny-unstable-lint-command-line.rs +++ b/tests/ui/unknown-unstable-lints/deny-unstable-lint-command-line.rs @@ -1,6 +1,6 @@ -// check-fail -// compile-flags: -Dunknown_lints -Atest_unstable_lint -// error-pattern: unknown lint: `test_unstable_lint` -// error-pattern: the `test_unstable_lint` lint is unstable +//@ check-fail +//@ compile-flags: -Dunknown_lints -Atest_unstable_lint +//@ error-pattern: unknown lint: `test_unstable_lint` +//@ error-pattern: the `test_unstable_lint` lint is unstable fn main() {} diff --git a/tests/ui/unknown-unstable-lints/deny-unstable-lint-inline.rs b/tests/ui/unknown-unstable-lints/deny-unstable-lint-inline.rs index 29c6547abc1..a13c92151ac 100644 --- a/tests/ui/unknown-unstable-lints/deny-unstable-lint-inline.rs +++ b/tests/ui/unknown-unstable-lints/deny-unstable-lint-inline.rs @@ -1,4 +1,4 @@ -// check-fail +//@ check-fail #![deny(unknown_lints)] #![allow(test_unstable_lint)] diff --git a/tests/ui/unknown-unstable-lints/warn-unknown-unstable-lint-command-line.rs b/tests/ui/unknown-unstable-lints/warn-unknown-unstable-lint-command-line.rs index 3778291ebb4..995f65ef83d 100644 --- a/tests/ui/unknown-unstable-lints/warn-unknown-unstable-lint-command-line.rs +++ b/tests/ui/unknown-unstable-lints/warn-unknown-unstable-lint-command-line.rs @@ -1,6 +1,6 @@ -// check-pass -// compile-flags: -Wunknown_lints -Atest_unstable_lint -// error-pattern: unknown lint: `test_unstable_lint` -// error-pattern: the `test_unstable_lint` lint is unstable +//@ check-pass +//@ compile-flags: -Wunknown_lints -Atest_unstable_lint +//@ error-pattern: unknown lint: `test_unstable_lint` +//@ error-pattern: the `test_unstable_lint` lint is unstable fn main() {} diff --git a/tests/ui/unknown-unstable-lints/warn-unknown-unstable-lint-inline.rs b/tests/ui/unknown-unstable-lints/warn-unknown-unstable-lint-inline.rs index 89db84e69f6..507137e69c4 100644 --- a/tests/ui/unknown-unstable-lints/warn-unknown-unstable-lint-inline.rs +++ b/tests/ui/unknown-unstable-lints/warn-unknown-unstable-lint-inline.rs @@ -1,4 +1,4 @@ -// check-pass +//@ check-pass #![warn(unknown_lints)] #![allow(test_unstable_lint)] diff --git a/tests/ui/unnamed_argument_mode.rs b/tests/ui/unnamed_argument_mode.rs index 5b7b4002f47..ba6f84c4dde 100644 --- a/tests/ui/unnamed_argument_mode.rs +++ b/tests/ui/unnamed_argument_mode.rs @@ -1,5 +1,5 @@ -// run-pass -// pretty-expanded FIXME #23616 +//@ run-pass +//@ pretty-expanded FIXME #23616 fn good(_a: &isize) { } diff --git a/tests/ui/unpretty/ast-const-trait-bound.rs b/tests/ui/unpretty/ast-const-trait-bound.rs index dbcba7871ec..f4de86bb0d0 100644 --- a/tests/ui/unpretty/ast-const-trait-bound.rs +++ b/tests/ui/unpretty/ast-const-trait-bound.rs @@ -1,4 +1,4 @@ -// compile-flags: -Zunpretty=normal -// check-pass +//@ compile-flags: -Zunpretty=normal +//@ check-pass fn foo() where T: ~const Bar {} diff --git a/tests/ui/unpretty/ast-const-trait-bound.stdout b/tests/ui/unpretty/ast-const-trait-bound.stdout index dbcba7871ec..f4de86bb0d0 100644 --- a/tests/ui/unpretty/ast-const-trait-bound.stdout +++ b/tests/ui/unpretty/ast-const-trait-bound.stdout @@ -1,4 +1,4 @@ -// compile-flags: -Zunpretty=normal -// check-pass +//@ compile-flags: -Zunpretty=normal +//@ check-pass fn foo() where T: ~const Bar {} diff --git a/tests/ui/unpretty/avoid-crash.rs b/tests/ui/unpretty/avoid-crash.rs index fd84b70d944..94aa7e77dcb 100644 --- a/tests/ui/unpretty/avoid-crash.rs +++ b/tests/ui/unpretty/avoid-crash.rs @@ -1,4 +1,4 @@ -// normalize-stderr-test "error `.*`" -> "$$ERROR_MESSAGE" -// compile-flags: -o/tmp/ -Zunpretty=ast-tree +//@ normalize-stderr-test "error `.*`" -> "$$ERROR_MESSAGE" +//@ compile-flags: -o/tmp/ -Zunpretty=ast-tree fn main() {} diff --git a/tests/ui/unpretty/bad-literal.rs b/tests/ui/unpretty/bad-literal.rs index 6dcc0da30cc..37377898b14 100644 --- a/tests/ui/unpretty/bad-literal.rs +++ b/tests/ui/unpretty/bad-literal.rs @@ -1,5 +1,5 @@ -// compile-flags: -Zunpretty=hir -// check-fail +//@ compile-flags: -Zunpretty=hir +//@ check-fail // In #100948 this caused an ICE with -Zunpretty=hir. fn main() { diff --git a/tests/ui/unpretty/bad-literal.stdout b/tests/ui/unpretty/bad-literal.stdout index 8df93327033..07ecb99dccc 100644 --- a/tests/ui/unpretty/bad-literal.stdout +++ b/tests/ui/unpretty/bad-literal.stdout @@ -2,8 +2,8 @@ use ::std::prelude::rust_2015::*; #[macro_use] extern crate std; -// compile-flags: -Zunpretty=hir -// check-fail +//@ compile-flags: -Zunpretty=hir +//@ check-fail // In #100948 this caused an ICE with -Zunpretty=hir. fn main() { diff --git a/tests/ui/unpretty/box.rs b/tests/ui/unpretty/box.rs index 81f5c88d790..8972eccf3b8 100644 --- a/tests/ui/unpretty/box.rs +++ b/tests/ui/unpretty/box.rs @@ -1,5 +1,5 @@ -// compile-flags: -Zunpretty=hir -// check-pass +//@ compile-flags: -Zunpretty=hir +//@ check-pass #![feature(stmt_expr_attributes, rustc_attrs)] diff --git a/tests/ui/unpretty/box.stdout b/tests/ui/unpretty/box.stdout index 0c6e012e698..0fd51edea24 100644 --- a/tests/ui/unpretty/box.stdout +++ b/tests/ui/unpretty/box.stdout @@ -1,5 +1,5 @@ -// compile-flags: -Zunpretty=hir -// check-pass +//@ compile-flags: -Zunpretty=hir +//@ check-pass #![feature(stmt_expr_attributes, rustc_attrs)] #[prelude_import] diff --git a/tests/ui/unpretty/flattened-format-args.rs b/tests/ui/unpretty/flattened-format-args.rs index 705dded169a..772f44cc268 100644 --- a/tests/ui/unpretty/flattened-format-args.rs +++ b/tests/ui/unpretty/flattened-format-args.rs @@ -1,5 +1,5 @@ -// compile-flags: -Zunpretty=hir -Zflatten-format-args=yes -// check-pass +//@ compile-flags: -Zunpretty=hir -Zflatten-format-args=yes +//@ check-pass fn main() { let x = 1; diff --git a/tests/ui/unpretty/flattened-format-args.stdout b/tests/ui/unpretty/flattened-format-args.stdout index 7fc5d266059..275fa104e66 100644 --- a/tests/ui/unpretty/flattened-format-args.stdout +++ b/tests/ui/unpretty/flattened-format-args.stdout @@ -2,8 +2,8 @@ use ::std::prelude::rust_2015::*; #[macro_use] extern crate std; -// compile-flags: -Zunpretty=hir -Zflatten-format-args=yes -// check-pass +//@ compile-flags: -Zunpretty=hir -Zflatten-format-args=yes +//@ check-pass fn main() { let x = 1; diff --git a/tests/ui/unpretty/mir-unpretty.rs b/tests/ui/unpretty/mir-unpretty.rs index 30620c69fea..c58ef3865aa 100644 --- a/tests/ui/unpretty/mir-unpretty.rs +++ b/tests/ui/unpretty/mir-unpretty.rs @@ -1,4 +1,4 @@ -// compile-flags: -Z unpretty=mir +//@ compile-flags: -Z unpretty=mir fn main() { let x: () = 0; //~ ERROR: mismatched types diff --git a/tests/ui/unpretty/pretty-let-else.rs b/tests/ui/unpretty/pretty-let-else.rs index b5ae529699d..9c231189659 100644 --- a/tests/ui/unpretty/pretty-let-else.rs +++ b/tests/ui/unpretty/pretty-let-else.rs @@ -1,5 +1,5 @@ -// compile-flags: -Zunpretty=hir -// check-pass +//@ compile-flags: -Zunpretty=hir +//@ check-pass diff --git a/tests/ui/unpretty/pretty-let-else.stdout b/tests/ui/unpretty/pretty-let-else.stdout index 35ad1cd1b18..ed55f293876 100644 --- a/tests/ui/unpretty/pretty-let-else.stdout +++ b/tests/ui/unpretty/pretty-let-else.stdout @@ -2,8 +2,8 @@ use ::std::prelude::rust_2015::*; #[macro_use] extern crate std; -// compile-flags: -Zunpretty=hir -// check-pass +//@ compile-flags: -Zunpretty=hir +//@ check-pass diff --git a/tests/ui/unpretty/unpretty-expr-fn-arg.rs b/tests/ui/unpretty/unpretty-expr-fn-arg.rs index 6e1132a3372..7f496e773c2 100644 --- a/tests/ui/unpretty/unpretty-expr-fn-arg.rs +++ b/tests/ui/unpretty/unpretty-expr-fn-arg.rs @@ -4,8 +4,8 @@ // for expressions occurring in function signatures, as in the `foo` example // below, leading to an ICE. -// check-pass -// compile-flags: -Zunpretty=hir,typed +//@ check-pass +//@ compile-flags: -Zunpretty=hir,typed #![allow(dead_code)] fn main() {} diff --git a/tests/ui/unpretty/unpretty-expr-fn-arg.stdout b/tests/ui/unpretty/unpretty-expr-fn-arg.stdout index b745b988631..c424b1afa34 100644 --- a/tests/ui/unpretty/unpretty-expr-fn-arg.stdout +++ b/tests/ui/unpretty/unpretty-expr-fn-arg.stdout @@ -4,8 +4,8 @@ // for expressions occurring in function signatures, as in the `foo` example // below, leading to an ICE. -// check-pass -// compile-flags: -Zunpretty=hir,typed +//@ check-pass +//@ compile-flags: -Zunpretty=hir,typed #![allow(dead_code)] #[prelude_import] use ::std::prelude::rust_2015::*; diff --git a/tests/ui/unreachable-code-1.rs b/tests/ui/unreachable-code-1.rs index ee44f399945..9c5f7c8f451 100644 --- a/tests/ui/unreachable-code-1.rs +++ b/tests/ui/unreachable-code-1.rs @@ -1,4 +1,4 @@ -// run-pass +//@ run-pass #![allow(unused_must_use)] #![allow(unreachable_code)] diff --git a/tests/ui/unreachable-code.rs b/tests/ui/unreachable-code.rs index 64174db7afb..0c46a38d73f 100644 --- a/tests/ui/unreachable-code.rs +++ b/tests/ui/unreachable-code.rs @@ -1,4 +1,4 @@ -// run-pass +//@ run-pass #![allow(unused_must_use)] #![allow(dead_code)] diff --git a/tests/ui/unresolved/unresolved-import-avoid-suggesting-global-path.rs b/tests/ui/unresolved/unresolved-import-avoid-suggesting-global-path.rs index af8207aaadd..8affd6957be 100644 --- a/tests/ui/unresolved/unresolved-import-avoid-suggesting-global-path.rs +++ b/tests/ui/unresolved/unresolved-import-avoid-suggesting-global-path.rs @@ -4,8 +4,8 @@ // [^1]: Counterexample: `unresolved-import-suggest-disambiguated-crate-name.rs` #![feature(decl_macro)] // allows us to create items with hygienic names -// aux-crate:library=library.rs -// edition: 2021 +//@ aux-crate:library=library.rs +//@ edition: 2021 mod hygiene { make!(); diff --git a/tests/ui/unresolved/unresolved-import-suggest-disambiguated-crate-name.fixed b/tests/ui/unresolved/unresolved-import-suggest-disambiguated-crate-name.fixed index 2b20d3f106b..38c5db7e767 100644 --- a/tests/ui/unresolved/unresolved-import-suggest-disambiguated-crate-name.fixed +++ b/tests/ui/unresolved/unresolved-import-suggest-disambiguated-crate-name.fixed @@ -7,11 +7,11 @@ // For context, when it can be avoided we don't prepend `::` to paths referencing crates // from the extern prelude. See also `unresolved-import-avoid-suggesting-global-path.rs`. -// run-rustfix +//@ run-rustfix -// compile-flags: --crate-type=lib -// aux-crate:library=library.rs -// edition: 2021 +//@ compile-flags: --crate-type=lib +//@ aux-crate:library=library.rs +//@ edition: 2021 mod library {} // this module shares the same name as the external crate! diff --git a/tests/ui/unresolved/unresolved-import-suggest-disambiguated-crate-name.rs b/tests/ui/unresolved/unresolved-import-suggest-disambiguated-crate-name.rs index b810a7f5296..c0083a51b34 100644 --- a/tests/ui/unresolved/unresolved-import-suggest-disambiguated-crate-name.rs +++ b/tests/ui/unresolved/unresolved-import-suggest-disambiguated-crate-name.rs @@ -7,11 +7,11 @@ // For context, when it can be avoided we don't prepend `::` to paths referencing crates // from the extern prelude. See also `unresolved-import-avoid-suggesting-global-path.rs`. -// run-rustfix +//@ run-rustfix -// compile-flags: --crate-type=lib -// aux-crate:library=library.rs -// edition: 2021 +//@ compile-flags: --crate-type=lib +//@ aux-crate:library=library.rs +//@ edition: 2021 mod library {} // this module shares the same name as the external crate! diff --git a/tests/ui/unsafe/const_pat_in_layout_restricted.rs b/tests/ui/unsafe/const_pat_in_layout_restricted.rs index 9a085958c10..2ba173ee499 100644 --- a/tests/ui/unsafe/const_pat_in_layout_restricted.rs +++ b/tests/ui/unsafe/const_pat_in_layout_restricted.rs @@ -1,6 +1,6 @@ // Check that ref mut patterns within a const pattern don't get considered // unsafe because they're within a pattern for a layout constrained stuct. -// check-pass +//@ check-pass #![feature(rustc_attrs)] #![feature(inline_const_pat)] diff --git a/tests/ui/unsafe/edition-2024-unsafe_op_in_unsafe_fn.rs b/tests/ui/unsafe/edition-2024-unsafe_op_in_unsafe_fn.rs index f84f12c8301..f12c38939dd 100644 --- a/tests/ui/unsafe/edition-2024-unsafe_op_in_unsafe_fn.rs +++ b/tests/ui/unsafe/edition-2024-unsafe_op_in_unsafe_fn.rs @@ -1,6 +1,6 @@ -// edition: 2024 -// compile-flags: -Zunstable-options -// check-pass +//@ edition: 2024 +//@ compile-flags: -Zunstable-options +//@ check-pass #![crate_type = "lib"] #![deny(unused_unsafe)] diff --git a/tests/ui/unsafe/inline_asm.rs b/tests/ui/unsafe/inline_asm.rs index df45b8640c1..039160f5e17 100644 --- a/tests/ui/unsafe/inline_asm.rs +++ b/tests/ui/unsafe/inline_asm.rs @@ -1,4 +1,4 @@ -// needs-asm-support +//@ needs-asm-support use std::arch::asm; diff --git a/tests/ui/unsafe/issue-106126-good-path-bug.rs b/tests/ui/unsafe/issue-106126-good-path-bug.rs index 93f478ee358..c1a3e074efe 100644 --- a/tests/ui/unsafe/issue-106126-good-path-bug.rs +++ b/tests/ui/unsafe/issue-106126-good-path-bug.rs @@ -1,6 +1,6 @@ // Regression test for #106126. -// check-pass -// aux-build:issue-106126.rs +//@ check-pass +//@ aux-build:issue-106126.rs #![deny(unsafe_op_in_unsafe_fn)] diff --git a/tests/ui/unsafe/issue-85435-unsafe-op-in-let-under-unsafe-under-closure.rs b/tests/ui/unsafe/issue-85435-unsafe-op-in-let-under-unsafe-under-closure.rs index b0d738855d7..85edf044241 100644 --- a/tests/ui/unsafe/issue-85435-unsafe-op-in-let-under-unsafe-under-closure.rs +++ b/tests/ui/unsafe/issue-85435-unsafe-op-in-let-under-unsafe-under-closure.rs @@ -1,4 +1,4 @@ -// check-pass +//@ check-pass // This is issue #85435. But the real story is reflected in issue #85561, where // a bug in the implementation of feature(capture_disjoint_fields) () was diff --git a/tests/ui/unsafe/issue-87414-query-cycle.rs b/tests/ui/unsafe/issue-87414-query-cycle.rs index a004d739422..067beacf302 100644 --- a/tests/ui/unsafe/issue-87414-query-cycle.rs +++ b/tests/ui/unsafe/issue-87414-query-cycle.rs @@ -1,6 +1,6 @@ // Regression test for #87414. -// check-pass +//@ check-pass fn bad() -> Box> { todo!() } diff --git a/tests/ui/unsafe/new-unsafe-pointers.rs b/tests/ui/unsafe/new-unsafe-pointers.rs index d99eb4cbd1c..39566cda90a 100644 --- a/tests/ui/unsafe/new-unsafe-pointers.rs +++ b/tests/ui/unsafe/new-unsafe-pointers.rs @@ -1,5 +1,5 @@ -// run-pass -// pretty-expanded FIXME #23616 +//@ run-pass +//@ pretty-expanded FIXME #23616 fn main() { let _a: *const isize = 3 as *const isize; diff --git a/tests/ui/unsafe/ranged_ints_macro.rs b/tests/ui/unsafe/ranged_ints_macro.rs index 0acc3e0f6b1..44a12bbd0a6 100644 --- a/tests/ui/unsafe/ranged_ints_macro.rs +++ b/tests/ui/unsafe/ranged_ints_macro.rs @@ -1,4 +1,4 @@ -// build-pass +//@ build-pass #![feature(rustc_attrs)] diff --git a/tests/ui/unsafe/union-modification.rs b/tests/ui/unsafe/union-modification.rs index fbcb846be9d..0f123395680 100644 --- a/tests/ui/unsafe/union-modification.rs +++ b/tests/ui/unsafe/union-modification.rs @@ -1,4 +1,4 @@ -// run-pass +//@ run-pass union Foo { bar: i8, _blah: isize, diff --git a/tests/ui/unsafe/union_access_through_block.rs b/tests/ui/unsafe/union_access_through_block.rs index 8b28c33650e..d440e10a20f 100644 --- a/tests/ui/unsafe/union_access_through_block.rs +++ b/tests/ui/unsafe/union_access_through_block.rs @@ -1,4 +1,4 @@ -// check-pass +//@ check-pass #[derive(Copy, Clone)] pub struct Foo { a: bool } diff --git a/tests/ui/unsafe/union_destructure.rs b/tests/ui/unsafe/union_destructure.rs index bb75dbf0997..e7095926eb1 100644 --- a/tests/ui/unsafe/union_destructure.rs +++ b/tests/ui/unsafe/union_destructure.rs @@ -1,4 +1,4 @@ -// run-pass +//@ run-pass #![allow(unreachable_patterns)] #[derive(Copy, Clone)] diff --git a/tests/ui/unsafe/union_wild_or_wild.rs b/tests/ui/unsafe/union_wild_or_wild.rs index 935de97f255..3f6211ce792 100644 --- a/tests/ui/unsafe/union_wild_or_wild.rs +++ b/tests/ui/unsafe/union_wild_or_wild.rs @@ -1,4 +1,4 @@ -// check-pass +//@ check-pass union X { a: i8 } fn main() { diff --git a/tests/ui/unsafe/unsafe-around-compiler-generated-unsafe.rs b/tests/ui/unsafe/unsafe-around-compiler-generated-unsafe.rs index e060c58e408..b371a79d1f3 100644 --- a/tests/ui/unsafe/unsafe-around-compiler-generated-unsafe.rs +++ b/tests/ui/unsafe/unsafe-around-compiler-generated-unsafe.rs @@ -1,4 +1,4 @@ -// edition:2018 +//@ edition:2018 #![deny(unused_unsafe)] diff --git a/tests/ui/unsafe/unsafe-fn-called-from-unsafe-blk.rs b/tests/ui/unsafe/unsafe-fn-called-from-unsafe-blk.rs index 3713a7065f5..d9f244bc4d2 100644 --- a/tests/ui/unsafe/unsafe-fn-called-from-unsafe-blk.rs +++ b/tests/ui/unsafe/unsafe-fn-called-from-unsafe-blk.rs @@ -1,10 +1,10 @@ -// run-pass +//@ run-pass #![allow(dead_code)] // // See also: ui/unsafe/unsafe-fn-called-from-safe.rs -// pretty-expanded FIXME #23616 +//@ pretty-expanded FIXME #23616 unsafe fn f() { return; } diff --git a/tests/ui/unsafe/unsafe-fn-called-from-unsafe-fn.rs b/tests/ui/unsafe/unsafe-fn-called-from-unsafe-fn.rs index 5e953107686..bb7715b7b5c 100644 --- a/tests/ui/unsafe/unsafe-fn-called-from-unsafe-fn.rs +++ b/tests/ui/unsafe/unsafe-fn-called-from-unsafe-fn.rs @@ -1,10 +1,10 @@ -// run-pass +//@ run-pass #![allow(dead_code)] // // See also: ui/unsafe/unsafe-fn-called-from-safe.rs -// pretty-expanded FIXME #23616 +//@ pretty-expanded FIXME #23616 unsafe fn f() { return; } diff --git a/tests/ui/unsafe/unsafe-pointer-assignability.rs b/tests/ui/unsafe/unsafe-pointer-assignability.rs index db822bb6a02..a715c845e90 100644 --- a/tests/ui/unsafe/unsafe-pointer-assignability.rs +++ b/tests/ui/unsafe/unsafe-pointer-assignability.rs @@ -1,4 +1,4 @@ -// run-pass +//@ run-pass fn f(x: *const isize) { unsafe { diff --git a/tests/ui/unsafe/unsafe_op_in_unsafe_fn/edition_2024_default.rs b/tests/ui/unsafe/unsafe_op_in_unsafe_fn/edition_2024_default.rs index 4196b1cae24..06a46b9812d 100644 --- a/tests/ui/unsafe/unsafe_op_in_unsafe_fn/edition_2024_default.rs +++ b/tests/ui/unsafe/unsafe_op_in_unsafe_fn/edition_2024_default.rs @@ -1,6 +1,6 @@ -// edition: 2024 -// compile-flags: -Zunstable-options -// check-pass +//@ edition: 2024 +//@ compile-flags: -Zunstable-options +//@ check-pass // Tests that `unsafe_op_in_unsafe_fn` is warn-by-default in edition 2024 and that the // `unused_unsafe` lint does not consider the inner unsafe block to be unused. diff --git a/tests/ui/unsafe/unsafe_op_in_unsafe_fn/wrapping-unsafe-block-sugg.fixed b/tests/ui/unsafe/unsafe_op_in_unsafe_fn/wrapping-unsafe-block-sugg.fixed index 8f5cc014a3b..c7291866588 100644 --- a/tests/ui/unsafe/unsafe_op_in_unsafe_fn/wrapping-unsafe-block-sugg.fixed +++ b/tests/ui/unsafe/unsafe_op_in_unsafe_fn/wrapping-unsafe-block-sugg.fixed @@ -1,5 +1,5 @@ -// run-rustfix -// aux-build:external_unsafe_macro.rs +//@ run-rustfix +//@ aux-build:external_unsafe_macro.rs #![deny(unsafe_op_in_unsafe_fn)] //~ NOTE #![crate_name = "wrapping_unsafe_block_sugg"] diff --git a/tests/ui/unsafe/unsafe_op_in_unsafe_fn/wrapping-unsafe-block-sugg.rs b/tests/ui/unsafe/unsafe_op_in_unsafe_fn/wrapping-unsafe-block-sugg.rs index 90c9e282396..401fc0bfd31 100644 --- a/tests/ui/unsafe/unsafe_op_in_unsafe_fn/wrapping-unsafe-block-sugg.rs +++ b/tests/ui/unsafe/unsafe_op_in_unsafe_fn/wrapping-unsafe-block-sugg.rs @@ -1,5 +1,5 @@ -// run-rustfix -// aux-build:external_unsafe_macro.rs +//@ run-rustfix +//@ aux-build:external_unsafe_macro.rs #![deny(unsafe_op_in_unsafe_fn)] //~ NOTE #![crate_name = "wrapping_unsafe_block_sugg"] diff --git a/tests/ui/unsized-locals/align.rs b/tests/ui/unsized-locals/align.rs index 01be8f3bb9c..a3820e3e6dc 100644 --- a/tests/ui/unsized-locals/align.rs +++ b/tests/ui/unsized-locals/align.rs @@ -1,6 +1,6 @@ // Test that unsized locals uphold alignment requirements. // Regression test for #71416. -// run-pass +//@ run-pass #![feature(unsized_locals)] #![allow(incomplete_features)] use std::any::Any; diff --git a/tests/ui/unsized-locals/autoderef.rs b/tests/ui/unsized-locals/autoderef.rs index 5dd5898c12e..31b58ba4002 100644 --- a/tests/ui/unsized-locals/autoderef.rs +++ b/tests/ui/unsized-locals/autoderef.rs @@ -1,4 +1,4 @@ -// run-pass +//@ run-pass #![allow(incomplete_features)] #![feature(unsized_locals, unsized_fn_params)] diff --git a/tests/ui/unsized-locals/box-fnonce.rs b/tests/ui/unsized-locals/box-fnonce.rs index 8b2f9b4c9fc..7451fd0ce69 100644 --- a/tests/ui/unsized-locals/box-fnonce.rs +++ b/tests/ui/unsized-locals/box-fnonce.rs @@ -1,4 +1,4 @@ -// run-pass +//@ run-pass fn call_it(f: Box T>) -> T { f() diff --git a/tests/ui/unsized-locals/by-value-trait-object-safety-rpass.rs b/tests/ui/unsized-locals/by-value-trait-object-safety-rpass.rs index b9881defac3..7ccea43d182 100644 --- a/tests/ui/unsized-locals/by-value-trait-object-safety-rpass.rs +++ b/tests/ui/unsized-locals/by-value-trait-object-safety-rpass.rs @@ -1,4 +1,4 @@ -// run-pass +//@ run-pass #![allow(incomplete_features)] #![feature(unsized_locals)] diff --git a/tests/ui/unsized-locals/by-value-trait-object-safety-withdefault.rs b/tests/ui/unsized-locals/by-value-trait-object-safety-withdefault.rs index 957991f853b..1f9b5f11fb5 100644 --- a/tests/ui/unsized-locals/by-value-trait-object-safety-withdefault.rs +++ b/tests/ui/unsized-locals/by-value-trait-object-safety-withdefault.rs @@ -1,4 +1,4 @@ -// run-pass +//@ run-pass #![allow(incomplete_features)] #![feature(unsized_locals, unsized_fn_params)] diff --git a/tests/ui/unsized-locals/reference-unsized-locals.rs b/tests/ui/unsized-locals/reference-unsized-locals.rs index 4e887f32753..5b5fca22a01 100644 --- a/tests/ui/unsized-locals/reference-unsized-locals.rs +++ b/tests/ui/unsized-locals/reference-unsized-locals.rs @@ -1,4 +1,4 @@ -// run-pass +//@ run-pass #![allow(incomplete_features)] #![feature(unsized_locals)] diff --git a/tests/ui/unsized-locals/simple-unsized-locals.rs b/tests/ui/unsized-locals/simple-unsized-locals.rs index 02b7c299aa4..374031b80bd 100644 --- a/tests/ui/unsized-locals/simple-unsized-locals.rs +++ b/tests/ui/unsized-locals/simple-unsized-locals.rs @@ -1,4 +1,4 @@ -// run-pass +//@ run-pass #![allow(incomplete_features)] #![feature(unsized_locals)] diff --git a/tests/ui/unsized-locals/unsized-exprs-rpass.rs b/tests/ui/unsized-locals/unsized-exprs-rpass.rs index 83d3680f72f..a5aada20d3e 100644 --- a/tests/ui/unsized-locals/unsized-exprs-rpass.rs +++ b/tests/ui/unsized-locals/unsized-exprs-rpass.rs @@ -1,4 +1,4 @@ -// run-pass +//@ run-pass #![allow(incomplete_features, unused_braces, unused_parens)] #![feature(unsized_tuple_coercion, unsized_locals, unsized_fn_params)] diff --git a/tests/ui/unsized-locals/unsized-exprs3.rs b/tests/ui/unsized-locals/unsized-exprs3.rs index 2133b01e094..1314e33d42a 100644 --- a/tests/ui/unsized-locals/unsized-exprs3.rs +++ b/tests/ui/unsized-locals/unsized-exprs3.rs @@ -1,4 +1,4 @@ -// aux-build:ufuncs.rs +//@ aux-build:ufuncs.rs extern crate ufuncs; diff --git a/tests/ui/unsized-locals/unsized-index.rs b/tests/ui/unsized-locals/unsized-index.rs index e8782e89481..bd79ca14f43 100644 --- a/tests/ui/unsized-locals/unsized-index.rs +++ b/tests/ui/unsized-locals/unsized-index.rs @@ -1,4 +1,4 @@ -// run-pass +//@ run-pass #![feature(unsized_fn_params)] diff --git a/tests/ui/unsized-locals/unsized-parameters.rs b/tests/ui/unsized-locals/unsized-parameters.rs index a1b772a7eb6..df12dac48ef 100644 --- a/tests/ui/unsized-locals/unsized-parameters.rs +++ b/tests/ui/unsized-locals/unsized-parameters.rs @@ -1,4 +1,4 @@ -// run-pass +//@ run-pass #![allow(incomplete_features)] #![feature(unsized_fn_params)] diff --git a/tests/ui/unsized/issue-115203.rs b/tests/ui/unsized/issue-115203.rs index 5fe7bd64288..7227a5d9673 100644 --- a/tests/ui/unsized/issue-115203.rs +++ b/tests/ui/unsized/issue-115203.rs @@ -1,4 +1,4 @@ -// compile-flags: --emit link +//@ compile-flags: --emit link fn main() { let a: [i32; 0] = []; diff --git a/tests/ui/unsized/issue-115809.rs b/tests/ui/unsized/issue-115809.rs index ff25365ea50..1b1d5234c12 100644 --- a/tests/ui/unsized/issue-115809.rs +++ b/tests/ui/unsized/issue-115809.rs @@ -1,4 +1,4 @@ -// compile-flags: --emit=link -Zmir-opt-level=2 -Zpolymorphize=on +//@ compile-flags: --emit=link -Zmir-opt-level=2 -Zpolymorphize=on fn foo() { let a: [i32; 0] = []; diff --git a/tests/ui/unsized/issue-40231-1.rs b/tests/ui/unsized/issue-40231-1.rs index 999399ec8d3..4d0b02d1311 100644 --- a/tests/ui/unsized/issue-40231-1.rs +++ b/tests/ui/unsized/issue-40231-1.rs @@ -1,4 +1,4 @@ -// check-pass +//@ check-pass #![allow(dead_code)] diff --git a/tests/ui/unsized/issue-40231-2.rs b/tests/ui/unsized/issue-40231-2.rs index 780433b28c5..d4bb6035dd4 100644 --- a/tests/ui/unsized/issue-40231-2.rs +++ b/tests/ui/unsized/issue-40231-2.rs @@ -1,4 +1,4 @@ -// check-pass +//@ check-pass #![allow(dead_code)] diff --git a/tests/ui/unsized/issue-71659.rs b/tests/ui/unsized/issue-71659.rs index 65a867caf8f..fd0b799d889 100644 --- a/tests/ui/unsized/issue-71659.rs +++ b/tests/ui/unsized/issue-71659.rs @@ -1,5 +1,5 @@ -// revisions: current next -//[next] compile-flags: -Znext-solver +//@ revisions: current next +//@[next] compile-flags: -Znext-solver #![feature(unsize)] diff --git a/tests/ui/unsized/issue-75899-but-gats.rs b/tests/ui/unsized/issue-75899-but-gats.rs index 5716817f43d..733a150a941 100644 --- a/tests/ui/unsized/issue-75899-but-gats.rs +++ b/tests/ui/unsized/issue-75899-but-gats.rs @@ -1,4 +1,4 @@ -// check-pass +//@ check-pass use std::fmt::Debug; use std::marker::PhantomData; diff --git a/tests/ui/unsized/issue-75899.rs b/tests/ui/unsized/issue-75899.rs index 56c8a72bfcc..9cfcf0aa13e 100644 --- a/tests/ui/unsized/issue-75899.rs +++ b/tests/ui/unsized/issue-75899.rs @@ -1,6 +1,6 @@ -// revisions: current next -//[next] compile-flags: -Znext-solver -// check-pass +//@ revisions: current next +//@[next] compile-flags: -Znext-solver +//@ check-pass trait Trait {} impl Trait for T {} diff --git a/tests/ui/unsized/issue-97732.rs b/tests/ui/unsized/issue-97732.rs index 72f76503396..625ec71a823 100644 --- a/tests/ui/unsized/issue-97732.rs +++ b/tests/ui/unsized/issue-97732.rs @@ -1,4 +1,4 @@ -// check-pass +//@ check-pass #![feature(coerce_unsized)] diff --git a/tests/ui/unsized/maybe-bounds-where-cpass.rs b/tests/ui/unsized/maybe-bounds-where-cpass.rs index 0e018cdabb2..6470f1c10f1 100644 --- a/tests/ui/unsized/maybe-bounds-where-cpass.rs +++ b/tests/ui/unsized/maybe-bounds-where-cpass.rs @@ -1,4 +1,4 @@ -// check-pass +//@ check-pass struct S(*const T) where T: ?Sized; diff --git a/tests/ui/unsized/unchanged-param.rs b/tests/ui/unsized/unchanged-param.rs index 8aa2ed15344..6abd428db2a 100644 --- a/tests/ui/unsized/unchanged-param.rs +++ b/tests/ui/unsized/unchanged-param.rs @@ -1,4 +1,4 @@ -// run-pass +//@ run-pass // Test that we allow unsizing even if there is an unchanged param in the // field getting unsized. struct A(#[allow(dead_code)] T, B); diff --git a/tests/ui/unsized/unsize-coerce-multiple-adt-params.rs b/tests/ui/unsized/unsize-coerce-multiple-adt-params.rs index eba341ff284..9028208812d 100644 --- a/tests/ui/unsized/unsize-coerce-multiple-adt-params.rs +++ b/tests/ui/unsized/unsize-coerce-multiple-adt-params.rs @@ -1,4 +1,4 @@ -// check-pass +//@ check-pass struct Foo where diff --git a/tests/ui/unsized/unsized-fn-arg.fixed b/tests/ui/unsized/unsized-fn-arg.fixed index fd9b159a481..41a59c08b90 100644 --- a/tests/ui/unsized/unsized-fn-arg.fixed +++ b/tests/ui/unsized/unsized-fn-arg.fixed @@ -1,4 +1,4 @@ -// run-rustfix +//@ run-rustfix #![crate_type="lib"] #![allow(unused)] diff --git a/tests/ui/unsized/unsized-fn-arg.rs b/tests/ui/unsized/unsized-fn-arg.rs index 9fc08bd6d3e..b5ec4bda673 100644 --- a/tests/ui/unsized/unsized-fn-arg.rs +++ b/tests/ui/unsized/unsized-fn-arg.rs @@ -1,4 +1,4 @@ -// run-rustfix +//@ run-rustfix #![crate_type="lib"] #![allow(unused)] diff --git a/tests/ui/unsized/unsized-tuple-impls.rs b/tests/ui/unsized/unsized-tuple-impls.rs index 5e385f33bee..a76e2df5750 100644 --- a/tests/ui/unsized/unsized-tuple-impls.rs +++ b/tests/ui/unsized/unsized-tuple-impls.rs @@ -1,4 +1,4 @@ -// run-pass +//@ run-pass #![feature(unsized_tuple_coercion)] diff --git a/tests/ui/unsized/unsized.rs b/tests/ui/unsized/unsized.rs index 54304834d4b..7ae6d611c29 100644 --- a/tests/ui/unsized/unsized.rs +++ b/tests/ui/unsized/unsized.rs @@ -1,4 +1,4 @@ -// run-pass +//@ run-pass #![allow(type_alias_bounds)] #![allow(dead_code)] diff --git a/tests/ui/unsized/unsized2.rs b/tests/ui/unsized/unsized2.rs index bbeb00d5fed..e2692a7a2c0 100644 --- a/tests/ui/unsized/unsized2.rs +++ b/tests/ui/unsized/unsized2.rs @@ -1,4 +1,4 @@ -// run-pass +//@ run-pass #![allow(unconditional_recursion)] #![allow(dead_code)] diff --git a/tests/ui/unsized/unsized3-rpass.rs b/tests/ui/unsized/unsized3-rpass.rs index a3f92be6cf6..1b3e932bfe6 100644 --- a/tests/ui/unsized/unsized3-rpass.rs +++ b/tests/ui/unsized/unsized3-rpass.rs @@ -1,4 +1,4 @@ -// run-pass +//@ run-pass // Test structs with always-unsized fields. #![allow(warnings)] diff --git a/tests/ui/unused-crate-deps/auxiliary/foo.rs b/tests/ui/unused-crate-deps/auxiliary/foo.rs index 0ef03eb9edf..6093b221c57 100644 --- a/tests/ui/unused-crate-deps/auxiliary/foo.rs +++ b/tests/ui/unused-crate-deps/auxiliary/foo.rs @@ -1,5 +1,5 @@ -// edition:2018 -// aux-crate:bar=bar.rs +//@ edition:2018 +//@ aux-crate:bar=bar.rs pub const FOO: &str = "foo"; pub use bar::BAR; diff --git a/tests/ui/unused-crate-deps/deny-attr.rs b/tests/ui/unused-crate-deps/deny-attr.rs index e9ab18ff63f..3b2e8b5677e 100644 --- a/tests/ui/unused-crate-deps/deny-attr.rs +++ b/tests/ui/unused-crate-deps/deny-attr.rs @@ -1,7 +1,7 @@ // Check for unused crate dep, no path -// edition:2018 -// aux-crate:bar=bar.rs +//@ edition:2018 +//@ aux-crate:bar=bar.rs #![deny(unused_crate_dependencies)] //~^ ERROR external crate `bar` unused in diff --git a/tests/ui/unused-crate-deps/deny-cmdline-json-silent.rs b/tests/ui/unused-crate-deps/deny-cmdline-json-silent.rs index fd9a61d6caa..f0f6d5b704d 100644 --- a/tests/ui/unused-crate-deps/deny-cmdline-json-silent.rs +++ b/tests/ui/unused-crate-deps/deny-cmdline-json-silent.rs @@ -1,8 +1,8 @@ // Check for unused crate dep, json event, deny but we're not reporting that in exit status -// edition:2018 -// check-pass -// compile-flags: -Dunused-crate-dependencies -Zunstable-options --json unused-externs-silent --error-format=json -// aux-crate:bar=bar.rs +//@ edition:2018 +//@ check-pass +//@ compile-flags: -Dunused-crate-dependencies -Zunstable-options --json unused-externs-silent --error-format=json +//@ aux-crate:bar=bar.rs fn main() {} diff --git a/tests/ui/unused-crate-deps/deny-cmdline-json.rs b/tests/ui/unused-crate-deps/deny-cmdline-json.rs index 2b369dee5a0..aab53eb3775 100644 --- a/tests/ui/unused-crate-deps/deny-cmdline-json.rs +++ b/tests/ui/unused-crate-deps/deny-cmdline-json.rs @@ -1,7 +1,7 @@ // Check for unused crate dep, json event, deny, expect compile failure -// edition:2018 -// compile-flags: -Dunused-crate-dependencies -Zunstable-options --json unused-externs --error-format=json -// aux-crate:bar=bar.rs +//@ edition:2018 +//@ compile-flags: -Dunused-crate-dependencies -Zunstable-options --json unused-externs --error-format=json +//@ aux-crate:bar=bar.rs fn main() {} diff --git a/tests/ui/unused-crate-deps/deny-cmdline.rs b/tests/ui/unused-crate-deps/deny-cmdline.rs index 69e28b3319a..d32e8e205af 100644 --- a/tests/ui/unused-crate-deps/deny-cmdline.rs +++ b/tests/ui/unused-crate-deps/deny-cmdline.rs @@ -1,8 +1,8 @@ // Check for unused crate dep, deny, expect failure -// edition:2018 -// compile-flags: -Dunused-crate-dependencies -// aux-crate:bar=bar.rs +//@ edition:2018 +//@ compile-flags: -Dunused-crate-dependencies +//@ aux-crate:bar=bar.rs fn main() {} //~^ ERROR external crate `bar` unused in diff --git a/tests/ui/unused-crate-deps/ignore-pathless-extern.rs b/tests/ui/unused-crate-deps/ignore-pathless-extern.rs index 8c273cb534d..9c720de3634 100644 --- a/tests/ui/unused-crate-deps/ignore-pathless-extern.rs +++ b/tests/ui/unused-crate-deps/ignore-pathless-extern.rs @@ -1,9 +1,9 @@ // Pathless --extern references don't count -// edition:2018 -// check-pass -// aux-crate:bar=bar.rs -// compile-flags:--extern proc_macro +//@ edition:2018 +//@ check-pass +//@ aux-crate:bar=bar.rs +//@ compile-flags:--extern proc_macro #![warn(unused_crate_dependencies)] diff --git a/tests/ui/unused-crate-deps/libfib.rs b/tests/ui/unused-crate-deps/libfib.rs index c1545dca99f..8a5ec758e56 100644 --- a/tests/ui/unused-crate-deps/libfib.rs +++ b/tests/ui/unused-crate-deps/libfib.rs @@ -1,8 +1,8 @@ // Test warnings for a library crate -// check-pass -// aux-crate:bar=bar.rs -// compile-flags:--crate-type lib -Wunused-crate-dependencies +//@ check-pass +//@ aux-crate:bar=bar.rs +//@ compile-flags:--crate-type lib -Wunused-crate-dependencies pub fn fib(n: u32) -> Vec { //~^ WARNING external crate `bar` unused in diff --git a/tests/ui/unused-crate-deps/lint-group.rs b/tests/ui/unused-crate-deps/lint-group.rs index e21ffb5dec2..9d28af42cc9 100644 --- a/tests/ui/unused-crate-deps/lint-group.rs +++ b/tests/ui/unused-crate-deps/lint-group.rs @@ -1,8 +1,8 @@ // `unused_crate_dependencies` is not currently in the `unused` group // due to false positives from Cargo. -// check-pass -// aux-crate:bar=bar.rs +//@ check-pass +//@ aux-crate:bar=bar.rs #![deny(unused)] diff --git a/tests/ui/unused-crate-deps/suppress.rs b/tests/ui/unused-crate-deps/suppress.rs index 8904d04bc14..cd7dea4f23b 100644 --- a/tests/ui/unused-crate-deps/suppress.rs +++ b/tests/ui/unused-crate-deps/suppress.rs @@ -1,8 +1,8 @@ // Suppress by using crate -// edition:2018 -// check-pass -// aux-crate:bar=bar.rs +//@ edition:2018 +//@ check-pass +//@ aux-crate:bar=bar.rs #![warn(unused_crate_dependencies)] diff --git a/tests/ui/unused-crate-deps/test-use-ok.rs b/tests/ui/unused-crate-deps/test-use-ok.rs index 66d6440c9cb..ef95d070793 100644 --- a/tests/ui/unused-crate-deps/test-use-ok.rs +++ b/tests/ui/unused-crate-deps/test-use-ok.rs @@ -1,9 +1,9 @@ // Test-only use OK -// edition:2018 -// check-pass -// aux-crate:bar=bar.rs -// compile-flags:--test +//@ edition:2018 +//@ check-pass +//@ aux-crate:bar=bar.rs +//@ compile-flags:--test #![deny(unused_crate_dependencies)] diff --git a/tests/ui/unused-crate-deps/unused-aliases.rs b/tests/ui/unused-crate-deps/unused-aliases.rs index 1b7cb9b970e..f86f6bbf356 100644 --- a/tests/ui/unused-crate-deps/unused-aliases.rs +++ b/tests/ui/unused-crate-deps/unused-aliases.rs @@ -1,9 +1,9 @@ // Warn about unused aliased for the crate -// edition:2018 -// check-pass -// aux-crate:bar=bar.rs -// aux-crate:barbar=bar.rs +//@ edition:2018 +//@ check-pass +//@ aux-crate:bar=bar.rs +//@ aux-crate:barbar=bar.rs #![warn(unused_crate_dependencies)] //~^ WARNING external crate `barbar` unused in diff --git a/tests/ui/unused-crate-deps/use_extern_crate_2015.rs b/tests/ui/unused-crate-deps/use_extern_crate_2015.rs index f15c87fa0b2..abc679cf320 100644 --- a/tests/ui/unused-crate-deps/use_extern_crate_2015.rs +++ b/tests/ui/unused-crate-deps/use_extern_crate_2015.rs @@ -1,8 +1,8 @@ // Suppress by using crate -// edition:2015 -// check-pass -// aux-crate:bar=bar.rs +//@ edition:2015 +//@ check-pass +//@ aux-crate:bar=bar.rs #![warn(unused_crate_dependencies)] diff --git a/tests/ui/unused-crate-deps/warn-attr.rs b/tests/ui/unused-crate-deps/warn-attr.rs index 1acb307ab21..b558c0678d6 100644 --- a/tests/ui/unused-crate-deps/warn-attr.rs +++ b/tests/ui/unused-crate-deps/warn-attr.rs @@ -1,8 +1,8 @@ // Check for unused crate dep, no path -// edition:2018 -// check-pass -// aux-crate:bar=bar.rs +//@ edition:2018 +//@ check-pass +//@ aux-crate:bar=bar.rs #![warn(unused_crate_dependencies)] //~^ WARNING external crate `bar` unused in diff --git a/tests/ui/unused-crate-deps/warn-cmdline-json.rs b/tests/ui/unused-crate-deps/warn-cmdline-json.rs index 4826c0062d0..b23a9c8d5fb 100644 --- a/tests/ui/unused-crate-deps/warn-cmdline-json.rs +++ b/tests/ui/unused-crate-deps/warn-cmdline-json.rs @@ -1,8 +1,8 @@ // Check for unused crate dep, warn, json event, expect pass -// edition:2018 -// check-pass -// compile-flags: -Wunused-crate-dependencies -Zunstable-options --json unused-externs --error-format=json -// aux-crate:bar=bar.rs +//@ edition:2018 +//@ check-pass +//@ compile-flags: -Wunused-crate-dependencies -Zunstable-options --json unused-externs --error-format=json +//@ aux-crate:bar=bar.rs fn main() {} diff --git a/tests/ui/unused-crate-deps/warn-cmdline-static.rs b/tests/ui/unused-crate-deps/warn-cmdline-static.rs index c609529a6c6..ccb404e3033 100644 --- a/tests/ui/unused-crate-deps/warn-cmdline-static.rs +++ b/tests/ui/unused-crate-deps/warn-cmdline-static.rs @@ -1,10 +1,10 @@ // Check for unused crate dep, no path -// edition:2018 -// check-pass -// compile-flags: -Wunused-crate-dependencies -// aux-crate:bar=bar.rs -// no-prefer-dynamic +//@ edition:2018 +//@ check-pass +//@ compile-flags: -Wunused-crate-dependencies +//@ aux-crate:bar=bar.rs +//@ no-prefer-dynamic fn main() {} //~^ WARNING external crate `bar` unused in diff --git a/tests/ui/unused-crate-deps/warn-cmdline.rs b/tests/ui/unused-crate-deps/warn-cmdline.rs index 3bae61c3ea2..8d390e02ca5 100644 --- a/tests/ui/unused-crate-deps/warn-cmdline.rs +++ b/tests/ui/unused-crate-deps/warn-cmdline.rs @@ -1,9 +1,9 @@ // Check for unused crate dep, no path -// edition:2018 -// check-pass -// compile-flags: -Wunused-crate-dependencies -// aux-crate:bar=bar.rs +//@ edition:2018 +//@ check-pass +//@ compile-flags: -Wunused-crate-dependencies +//@ aux-crate:bar=bar.rs fn main() {} //~^ WARNING external crate `bar` unused in diff --git a/tests/ui/unused-move-capture.rs b/tests/ui/unused-move-capture.rs index efaf10da4a9..c295f8d7914 100644 --- a/tests/ui/unused-move-capture.rs +++ b/tests/ui/unused-move-capture.rs @@ -1,5 +1,5 @@ -// run-pass -// pretty-expanded FIXME #23616 +//@ run-pass +//@ pretty-expanded FIXME #23616 pub fn main() { let _x: Box<_> = Box::new(1); diff --git a/tests/ui/unused-move.rs b/tests/ui/unused-move.rs index 697434d47eb..87398652e93 100644 --- a/tests/ui/unused-move.rs +++ b/tests/ui/unused-move.rs @@ -1,9 +1,9 @@ -// run-pass +//@ run-pass // Issue #3878 // Issue Name: Unused move causes a crash // Abstract: zero-fill to block after drop -// pretty-expanded FIXME #23616 +//@ pretty-expanded FIXME #23616 #![allow(path_statements)] diff --git a/tests/ui/unwind-abis/feature-gate-c_unwind.rs b/tests/ui/unwind-abis/feature-gate-c_unwind.rs index d73fe3e0bda..28ef7d57788 100644 --- a/tests/ui/unwind-abis/feature-gate-c_unwind.rs +++ b/tests/ui/unwind-abis/feature-gate-c_unwind.rs @@ -1,4 +1,4 @@ -// ignore-test +//@ ignore-test // After partial stabilisation, `c_unwind` only contains codegen behaviour changes // and are tested in `src/test/codegen/unwind-abis` diff --git a/tests/ui/unwind-abis/ffi-unwind-calls-lint.rs b/tests/ui/unwind-abis/ffi-unwind-calls-lint.rs index 8f000737656..e05c5ded10d 100644 --- a/tests/ui/unwind-abis/ffi-unwind-calls-lint.rs +++ b/tests/ui/unwind-abis/ffi-unwind-calls-lint.rs @@ -1,5 +1,5 @@ -// build-pass -// needs-unwind +//@ build-pass +//@ needs-unwind #![warn(ffi_unwind_calls)] diff --git a/tests/ui/unwind-no-uwtable.rs b/tests/ui/unwind-no-uwtable.rs index 3bc309233a7..fb8082e3188 100644 --- a/tests/ui/unwind-no-uwtable.rs +++ b/tests/ui/unwind-no-uwtable.rs @@ -1,7 +1,7 @@ -// run-pass -// needs-unwind -// ignore-windows target requires uwtable -// compile-flags: -C panic=unwind -C force-unwind-tables=n +//@ run-pass +//@ needs-unwind +//@ ignore-windows target requires uwtable +//@ compile-flags: -C panic=unwind -C force-unwind-tables=n use std::panic::{self, AssertUnwindSafe}; diff --git a/tests/ui/use-import-export.rs b/tests/ui/use-import-export.rs index 07a6866ba66..f784194c505 100644 --- a/tests/ui/use-import-export.rs +++ b/tests/ui/use-import-export.rs @@ -1,5 +1,5 @@ -// run-pass -// pretty-expanded FIXME #23616 +//@ run-pass +//@ pretty-expanded FIXME #23616 mod foo { pub fn x() -> isize { return 1; } diff --git a/tests/ui/use-keyword-2.rs b/tests/ui/use-keyword-2.rs index ebddb5d1a48..4f3d1ee500d 100644 --- a/tests/ui/use-keyword-2.rs +++ b/tests/ui/use-keyword-2.rs @@ -1,4 +1,4 @@ -// run-pass +//@ run-pass #![allow(unused_variables)] pub struct A; diff --git a/tests/ui/use-module-level-int-consts.rs b/tests/ui/use-module-level-int-consts.rs index 200f742d771..6e8c7053c57 100644 --- a/tests/ui/use-module-level-int-consts.rs +++ b/tests/ui/use-module-level-int-consts.rs @@ -1,4 +1,4 @@ -// run-pass +//@ run-pass // Make sure the module level constants are still there and accessible even after // the corresponding associated constants have been added, and later stabilized. diff --git a/tests/ui/use-nested-groups.rs b/tests/ui/use-nested-groups.rs index 5c739709e9e..c5d66a86935 100644 --- a/tests/ui/use-nested-groups.rs +++ b/tests/ui/use-nested-groups.rs @@ -1,4 +1,4 @@ -// run-pass +//@ run-pass mod a { pub enum B {} diff --git a/tests/ui/use/auxiliary/extern-use-primitive-type-lib.rs b/tests/ui/use/auxiliary/extern-use-primitive-type-lib.rs index 3c7756ef7e6..18aa329ae36 100644 --- a/tests/ui/use/auxiliary/extern-use-primitive-type-lib.rs +++ b/tests/ui/use/auxiliary/extern-use-primitive-type-lib.rs @@ -1,3 +1,3 @@ -// compile-flags: --edition=2018 +//@ compile-flags: --edition=2018 pub use u32; diff --git a/tests/ui/use/issue-18986.rs b/tests/ui/use/issue-18986.rs index f0b292f2911..62fd4769a03 100644 --- a/tests/ui/use/issue-18986.rs +++ b/tests/ui/use/issue-18986.rs @@ -1,4 +1,4 @@ -// aux-build:use-from-trait-xc.rs +//@ aux-build:use-from-trait-xc.rs extern crate use_from_trait_xc; pub use use_from_trait_xc::Trait; diff --git a/tests/ui/use/issue-60976-extern-use-primitive-type.rs b/tests/ui/use/issue-60976-extern-use-primitive-type.rs index 4cd458302a4..3e059818ac2 100644 --- a/tests/ui/use/issue-60976-extern-use-primitive-type.rs +++ b/tests/ui/use/issue-60976-extern-use-primitive-type.rs @@ -1,6 +1,6 @@ // Regression test for #60976: ICE (with <=1.36.0) when another file had `use ;`. -// check-pass -// aux-build:extern-use-primitive-type-lib.rs +//@ check-pass +//@ aux-build:extern-use-primitive-type-lib.rs extern crate extern_use_primitive_type_lib; diff --git a/tests/ui/use/use-from-trait-xc.rs b/tests/ui/use/use-from-trait-xc.rs index 695ed66a1c1..b7b9c834b32 100644 --- a/tests/ui/use/use-from-trait-xc.rs +++ b/tests/ui/use/use-from-trait-xc.rs @@ -1,4 +1,4 @@ -// aux-build:use-from-trait-xc.rs +//@ aux-build:use-from-trait-xc.rs extern crate use_from_trait_xc; diff --git a/tests/ui/use/use-meta-mismatch.rs b/tests/ui/use/use-meta-mismatch.rs index 975209efb0c..2c5ae9cd9a1 100644 --- a/tests/ui/use/use-meta-mismatch.rs +++ b/tests/ui/use/use-meta-mismatch.rs @@ -1,4 +1,4 @@ -// error-pattern:can't find crate for `fake_crate` +//@ error-pattern:can't find crate for `fake_crate` extern crate fake_crate as extra; diff --git a/tests/ui/use/use.rs b/tests/ui/use/use.rs index 1beee4a5143..826a049f2bb 100644 --- a/tests/ui/use/use.rs +++ b/tests/ui/use/use.rs @@ -1,7 +1,7 @@ -// run-pass +//@ run-pass #![allow(stable_features)] -// pretty-expanded FIXME #23616 +//@ pretty-expanded FIXME #23616 #![allow(unused_imports)] #![feature(start, no_core, core)] diff --git a/tests/ui/using-target-feature-unstable.rs b/tests/ui/using-target-feature-unstable.rs index c5da45c0854..5ec0bda5eef 100644 --- a/tests/ui/using-target-feature-unstable.rs +++ b/tests/ui/using-target-feature-unstable.rs @@ -1,6 +1,6 @@ -// run-pass -// only-x86_64 -// aux-build:using-target-feature-unstable.rs +//@ run-pass +//@ only-x86_64 +//@ aux-build:using-target-feature-unstable.rs extern crate using_target_feature_unstable; diff --git a/tests/ui/utf8-bom.rs b/tests/ui/utf8-bom.rs index a3cb0e9a52a..e2e4ccd63c1 100644 --- a/tests/ui/utf8-bom.rs +++ b/tests/ui/utf8-bom.rs @@ -1,4 +1,4 @@ -// run-pass +//@ run-pass // // This file has utf-8 BOM, it should be compiled normally without error. diff --git a/tests/ui/utf8_idents.rs b/tests/ui/utf8_idents.rs index 1f6326dd94b..0c34529d2de 100644 --- a/tests/ui/utf8_idents.rs +++ b/tests/ui/utf8_idents.rs @@ -1,4 +1,4 @@ -// check-pass +//@ check-pass // #![allow(mixed_script_confusables, non_camel_case_types)] diff --git a/tests/ui/variance/variance-intersection-of-ref-and-opt-ref.rs b/tests/ui/variance/variance-intersection-of-ref-and-opt-ref.rs index 74707a98d32..09b530fdc98 100644 --- a/tests/ui/variance/variance-intersection-of-ref-and-opt-ref.rs +++ b/tests/ui/variance/variance-intersection-of-ref-and-opt-ref.rs @@ -1,4 +1,4 @@ -// run-pass +//@ run-pass // Elaborated version of the opening example from RFC 738. This failed // to compile before variance because invariance of `Option` prevented // us from approximating the lifetimes of `field1` and `field2` to a diff --git a/tests/ui/variance/variance-iterators-in-libcore.rs b/tests/ui/variance/variance-iterators-in-libcore.rs index a542e44d517..c42c53a96fc 100644 --- a/tests/ui/variance/variance-iterators-in-libcore.rs +++ b/tests/ui/variance/variance-iterators-in-libcore.rs @@ -1,4 +1,4 @@ -// run-pass +//@ run-pass #![allow(dead_code)] diff --git a/tests/ui/variance/variance-use-contravariant-struct-2.rs b/tests/ui/variance/variance-use-contravariant-struct-2.rs index d4b2d08342a..ef6264d3348 100644 --- a/tests/ui/variance/variance-use-contravariant-struct-2.rs +++ b/tests/ui/variance/variance-use-contravariant-struct-2.rs @@ -2,7 +2,7 @@ // they permit lifetimes to be approximated as expected. #![allow(dead_code)] -// build-pass (FIXME(62277): could be check-pass?) +//@ build-pass (FIXME(62277): could be check-pass?) struct SomeStruct(fn(T)); diff --git a/tests/ui/variance/variance-use-covariant-struct-2.rs b/tests/ui/variance/variance-use-covariant-struct-2.rs index ecd2204c991..14f5d541c69 100644 --- a/tests/ui/variance/variance-use-covariant-struct-2.rs +++ b/tests/ui/variance/variance-use-covariant-struct-2.rs @@ -2,7 +2,7 @@ // be shortened. #![allow(dead_code)] -// build-pass (FIXME(62277): could be check-pass?) +//@ build-pass (FIXME(62277): could be check-pass?) struct SomeStruct(T); diff --git a/tests/ui/variants/variant-namespacing.rs b/tests/ui/variants/variant-namespacing.rs index 975e471fe34..c89804e81ad 100644 --- a/tests/ui/variants/variant-namespacing.rs +++ b/tests/ui/variants/variant-namespacing.rs @@ -1,4 +1,4 @@ -// aux-build:variant-namespacing.rs +//@ aux-build:variant-namespacing.rs pub enum E { Struct { a: u8 }, diff --git a/tests/ui/wait-forked-but-failed-child.rs b/tests/ui/wait-forked-but-failed-child.rs index 82a1dd63713..a5a6cca0637 100644 --- a/tests/ui/wait-forked-but-failed-child.rs +++ b/tests/ui/wait-forked-but-failed-child.rs @@ -1,9 +1,9 @@ -// run-pass -// ignore-emscripten no processes -// ignore-sgx no processes -// ignore-vxworks no 'ps' -// ignore-fuchsia no 'ps' -// ignore-nto no 'ps' +//@ run-pass +//@ ignore-emscripten no processes +//@ ignore-sgx no processes +//@ ignore-vxworks no 'ps' +//@ ignore-fuchsia no 'ps' +//@ ignore-nto no 'ps' #![feature(rustc_private)] diff --git a/tests/ui/wasm/simd-to-array-80108.rs b/tests/ui/wasm/simd-to-array-80108.rs index 0576c2e6be1..c7f8585eaa4 100644 --- a/tests/ui/wasm/simd-to-array-80108.rs +++ b/tests/ui/wasm/simd-to-array-80108.rs @@ -1,6 +1,6 @@ -// only-wasm32 -// compile-flags: --crate-type=lib -Copt-level=2 -// build-pass +//@ only-wasm32 +//@ compile-flags: --crate-type=lib -Copt-level=2 +//@ build-pass #![feature(repr_simd)] // Regression test for #80108 diff --git a/tests/ui/wasm/wasm-custom-section-relocations.rs b/tests/ui/wasm/wasm-custom-section-relocations.rs index c3cca3a35ac..30358c7a8d9 100644 --- a/tests/ui/wasm/wasm-custom-section-relocations.rs +++ b/tests/ui/wasm/wasm-custom-section-relocations.rs @@ -1,4 +1,4 @@ -// only-wasm32 +//@ only-wasm32 #[link_section = "test"] pub static A: &[u8] = &[1]; //~ ERROR: no extra levels of indirection diff --git a/tests/ui/wasm/wasm-hang-issue-76281.rs b/tests/ui/wasm/wasm-hang-issue-76281.rs index a4adfa6d044..0e215bdf197 100644 --- a/tests/ui/wasm/wasm-hang-issue-76281.rs +++ b/tests/ui/wasm/wasm-hang-issue-76281.rs @@ -1,6 +1,6 @@ -// only-wasm32 -// compile-flags: -C opt-level=2 -// build-pass +//@ only-wasm32 +//@ compile-flags: -C opt-level=2 +//@ build-pass // Regression test for #76281. // This seems like an issue related to LLVM rather than diff --git a/tests/ui/weak-new-uninhabited-issue-48493.rs b/tests/ui/weak-new-uninhabited-issue-48493.rs index 39fbf3c9eb4..ce7d5786b41 100644 --- a/tests/ui/weak-new-uninhabited-issue-48493.rs +++ b/tests/ui/weak-new-uninhabited-issue-48493.rs @@ -1,4 +1,4 @@ -// run-pass +//@ run-pass fn main() { enum Void {} diff --git a/tests/ui/weird-exit-code.rs b/tests/ui/weird-exit-code.rs index a067b7b5b1f..e016343f8ba 100644 --- a/tests/ui/weird-exit-code.rs +++ b/tests/ui/weird-exit-code.rs @@ -1,4 +1,4 @@ -// run-pass +//@ run-pass // On Windows the GetExitCodeProcess API is used to get the exit code of a // process, but it's easy to mistake a process exiting with the code 259 as // "still running" because this is the value of the STILL_ACTIVE constant. Make diff --git a/tests/ui/weird-exprs.rs b/tests/ui/weird-exprs.rs index 748fe13c1e4..d856b06e260 100644 --- a/tests/ui/weird-exprs.rs +++ b/tests/ui/weird-exprs.rs @@ -1,4 +1,4 @@ -// run-pass +//@ run-pass #![feature(coroutines)] diff --git a/tests/ui/wf/hir-wf-canonicalized.rs b/tests/ui/wf/hir-wf-canonicalized.rs index eac238f0fca..abdcd1c04ab 100644 --- a/tests/ui/wf/hir-wf-canonicalized.rs +++ b/tests/ui/wf/hir-wf-canonicalized.rs @@ -1,4 +1,4 @@ -// incremental +//@ incremental trait Foo { type V; diff --git a/tests/ui/wf/hir-wf-check-erase-regions.rs b/tests/ui/wf/hir-wf-check-erase-regions.rs index 2820d5f6d07..01893044c27 100644 --- a/tests/ui/wf/hir-wf-check-erase-regions.rs +++ b/tests/ui/wf/hir-wf-check-erase-regions.rs @@ -1,5 +1,5 @@ // Regression test for #87549. -// incremental +//@ incremental pub struct Table([Option; N]); diff --git a/tests/ui/wf/issue-48638.rs b/tests/ui/wf/issue-48638.rs index f0784310332..6a778a4bf21 100644 --- a/tests/ui/wf/issue-48638.rs +++ b/tests/ui/wf/issue-48638.rs @@ -1,4 +1,4 @@ -// check-pass +//@ check-pass pub trait D {} pub struct DT; diff --git a/tests/ui/wf/unnormalized-projection-guides-inference.rs b/tests/ui/wf/unnormalized-projection-guides-inference.rs index ca2d6c2e882..e1fc962c00b 100644 --- a/tests/ui/wf/unnormalized-projection-guides-inference.rs +++ b/tests/ui/wf/unnormalized-projection-guides-inference.rs @@ -1,6 +1,6 @@ // The WF requirements of the *unnormalized* form of type annotations // can guide inference. -// check-pass +//@ check-pass pub trait EqualTo { type Ty; diff --git a/tests/ui/wf/wf-in-where-clause-static.rs b/tests/ui/wf/wf-in-where-clause-static.rs index 86722afdf9f..a3d360e1fb5 100644 --- a/tests/ui/wf/wf-in-where-clause-static.rs +++ b/tests/ui/wf/wf-in-where-clause-static.rs @@ -1,5 +1,5 @@ -// check-pass -// known-bug: #98117 +//@ check-pass +//@ known-bug: #98117 // Should fail. Functions are responsible for checking the well-formedness of // their own where clauses, so this should fail and require an explicit bound diff --git a/tests/ui/wf/wf-normalization-sized.rs b/tests/ui/wf/wf-normalization-sized.rs index 473fc79a8a3..e14be6b62bb 100644 --- a/tests/ui/wf/wf-normalization-sized.rs +++ b/tests/ui/wf/wf-normalization-sized.rs @@ -1,5 +1,5 @@ -// check-pass -// known-bug: #100041 +//@ check-pass +//@ known-bug: #100041 // Should fail. Normalization can bypass well-formedness checking. // `[[[[[[u8]]]]]]` is not a well-formed type since size of type `[u8]` cannot diff --git a/tests/ui/where-clauses/higher-ranked-fn-type.rs b/tests/ui/where-clauses/higher-ranked-fn-type.rs index 5d7308b6c1c..7ad7a896e8d 100644 --- a/tests/ui/where-clauses/higher-ranked-fn-type.rs +++ b/tests/ui/where-clauses/higher-ranked-fn-type.rs @@ -1,5 +1,5 @@ -// revisions: quiet verbose -// [verbose]compile-flags: -Zverbose-internals +//@ revisions: quiet verbose +//@ [verbose]compile-flags: -Zverbose-internals #![allow(unused_parens)] diff --git a/tests/ui/where-clauses/issue-50825-1.rs b/tests/ui/where-clauses/issue-50825-1.rs index 2ee34ad714e..96b48068b0e 100644 --- a/tests/ui/where-clauses/issue-50825-1.rs +++ b/tests/ui/where-clauses/issue-50825-1.rs @@ -1,4 +1,4 @@ -// check-pass +//@ check-pass // regression test for issue #50825 // Make sure that the `impl` bound (): X is preferred over // the (): X bound in the where clause. diff --git a/tests/ui/where-clauses/issue-50825.rs b/tests/ui/where-clauses/issue-50825.rs index 1ece2e9fc84..4c5c2727824 100644 --- a/tests/ui/where-clauses/issue-50825.rs +++ b/tests/ui/where-clauses/issue-50825.rs @@ -1,4 +1,4 @@ -// run-pass +//@ run-pass // regression test for issue #50825 // Make sure that the built-in bound {integer}: Sized is preferred over // the u64: Sized bound in the where clause. diff --git a/tests/ui/where-clauses/self-in-where-clause-allowed.rs b/tests/ui/where-clauses/self-in-where-clause-allowed.rs index 6cf5ed2e46a..fd2cfe2bf65 100644 --- a/tests/ui/where-clauses/self-in-where-clause-allowed.rs +++ b/tests/ui/where-clauses/self-in-where-clause-allowed.rs @@ -1,4 +1,4 @@ -// check-fail +//@ check-fail #![feature(auto_traits)] #![deny(where_clauses_object_safety)] diff --git a/tests/ui/where-clauses/where-clause-bounds-inconsistency.rs b/tests/ui/where-clauses/where-clause-bounds-inconsistency.rs index 65fd2f3096c..be003cbf585 100644 --- a/tests/ui/where-clauses/where-clause-bounds-inconsistency.rs +++ b/tests/ui/where-clauses/where-clause-bounds-inconsistency.rs @@ -1,5 +1,5 @@ -// check-pass -// pretty-expanded FIXME #23616 +//@ check-pass +//@ pretty-expanded FIXME #23616 trait Bound { fn dummy(&self) { } diff --git a/tests/ui/where-clauses/where-clause-early-bound-lifetimes.rs b/tests/ui/where-clauses/where-clause-early-bound-lifetimes.rs index a7ce0590fcd..67088a9818e 100644 --- a/tests/ui/where-clauses/where-clause-early-bound-lifetimes.rs +++ b/tests/ui/where-clauses/where-clause-early-bound-lifetimes.rs @@ -1,7 +1,7 @@ -// run-pass +//@ run-pass #![allow(non_upper_case_globals)] -// pretty-expanded FIXME #23616 +//@ pretty-expanded FIXME #23616 trait TheTrait { fn dummy(&self) { } } //~ WARN method `dummy` is never used diff --git a/tests/ui/where-clauses/where-clause-method-substituion-rpass.rs b/tests/ui/where-clauses/where-clause-method-substituion-rpass.rs index 8f9c6fbff3d..ba409182809 100644 --- a/tests/ui/where-clauses/where-clause-method-substituion-rpass.rs +++ b/tests/ui/where-clauses/where-clause-method-substituion-rpass.rs @@ -1,6 +1,6 @@ -// run-pass +//@ run-pass #![allow(unused_variables)] -// pretty-expanded FIXME #23616 +//@ pretty-expanded FIXME #23616 trait Foo { fn dummy(&self, arg: T) { } } //~ WARN method `dummy` is never used diff --git a/tests/ui/where-clauses/where-clause-placement-assoc-type-in-impl.fixed b/tests/ui/where-clauses/where-clause-placement-assoc-type-in-impl.fixed index 4e1aa59aac0..b53d9d61d67 100644 --- a/tests/ui/where-clauses/where-clause-placement-assoc-type-in-impl.fixed +++ b/tests/ui/where-clauses/where-clause-placement-assoc-type-in-impl.fixed @@ -1,5 +1,5 @@ -// check-pass -// run-rustfix +//@ check-pass +//@ run-rustfix #![allow(dead_code)] diff --git a/tests/ui/where-clauses/where-clause-placement-assoc-type-in-impl.rs b/tests/ui/where-clauses/where-clause-placement-assoc-type-in-impl.rs index 05b2f8c82a4..18955dd8bcc 100644 --- a/tests/ui/where-clauses/where-clause-placement-assoc-type-in-impl.rs +++ b/tests/ui/where-clauses/where-clause-placement-assoc-type-in-impl.rs @@ -1,5 +1,5 @@ -// check-pass -// run-rustfix +//@ check-pass +//@ run-rustfix #![allow(dead_code)] diff --git a/tests/ui/where-clauses/where-clause-placement-assoc-type-in-trait.fixed b/tests/ui/where-clauses/where-clause-placement-assoc-type-in-trait.fixed index 940e2cc8e97..719f1d2a4c6 100644 --- a/tests/ui/where-clauses/where-clause-placement-assoc-type-in-trait.fixed +++ b/tests/ui/where-clauses/where-clause-placement-assoc-type-in-trait.fixed @@ -1,5 +1,5 @@ -// check-pass -// run-rustfix +//@ check-pass +//@ run-rustfix #![allow(dead_code)] #![feature(associated_type_defaults)] diff --git a/tests/ui/where-clauses/where-clause-placement-assoc-type-in-trait.rs b/tests/ui/where-clauses/where-clause-placement-assoc-type-in-trait.rs index 7001a9245a5..a7678741314 100644 --- a/tests/ui/where-clauses/where-clause-placement-assoc-type-in-trait.rs +++ b/tests/ui/where-clauses/where-clause-placement-assoc-type-in-trait.rs @@ -1,5 +1,5 @@ -// check-pass -// run-rustfix +//@ check-pass +//@ run-rustfix #![allow(dead_code)] #![feature(associated_type_defaults)] diff --git a/tests/ui/where-clauses/where-clause-placement-type-alias.rs b/tests/ui/where-clauses/where-clause-placement-type-alias.rs index 62e301cb408..1f3b044c811 100644 --- a/tests/ui/where-clauses/where-clause-placement-type-alias.rs +++ b/tests/ui/where-clauses/where-clause-placement-type-alias.rs @@ -1,4 +1,4 @@ -// check-fail +//@ check-fail // Fine, but lints as unused type Foo where u32: Copy = (); diff --git a/tests/ui/where-clauses/where-clause-region-outlives.rs b/tests/ui/where-clauses/where-clause-region-outlives.rs index 84925345de1..db61638ca2d 100644 --- a/tests/ui/where-clauses/where-clause-region-outlives.rs +++ b/tests/ui/where-clauses/where-clause-region-outlives.rs @@ -1,7 +1,7 @@ -// run-pass +//@ run-pass #![allow(dead_code)] #![allow(unused_variables)] -// pretty-expanded FIXME #23616 +//@ pretty-expanded FIXME #23616 struct A<'a, 'b> where 'a : 'b { x: &'a isize, y: &'b isize } diff --git a/tests/ui/where-clauses/where-clauses-cross-crate.rs b/tests/ui/where-clauses/where-clauses-cross-crate.rs index 9edf0bd5b1d..713808520b5 100644 --- a/tests/ui/where-clauses/where-clauses-cross-crate.rs +++ b/tests/ui/where-clauses/where-clauses-cross-crate.rs @@ -1,5 +1,5 @@ -// run-pass -// aux-build:where_clauses_xc.rs +//@ run-pass +//@ aux-build:where_clauses_xc.rs extern crate where_clauses_xc; diff --git a/tests/ui/where-clauses/where-clauses-lifetimes.rs b/tests/ui/where-clauses/where-clauses-lifetimes.rs index 4bfd9e6590f..8e8c73a3925 100644 --- a/tests/ui/where-clauses/where-clauses-lifetimes.rs +++ b/tests/ui/where-clauses/where-clauses-lifetimes.rs @@ -1,7 +1,7 @@ -// run-pass +//@ run-pass #![allow(unused_mut)] #![allow(unused_variables)] -// pretty-expanded FIXME #23616 +//@ pretty-expanded FIXME #23616 fn foo<'a, I>(mut it: I) where I: Iterator {} diff --git a/tests/ui/where-clauses/where-clauses-method.rs b/tests/ui/where-clauses/where-clauses-method.rs index feecff43565..1759c0f2346 100644 --- a/tests/ui/where-clauses/where-clauses-method.rs +++ b/tests/ui/where-clauses/where-clauses-method.rs @@ -1,4 +1,4 @@ -// run-pass +//@ run-pass // Test that a where clause attached to a method allows us to add // additional constraints to a parameter out of scope. diff --git a/tests/ui/where-clauses/where-clauses-unboxed-closures.rs b/tests/ui/where-clauses/where-clauses-unboxed-closures.rs index 6964cfa2eb0..c2ef65ab0a6 100644 --- a/tests/ui/where-clauses/where-clauses-unboxed-closures.rs +++ b/tests/ui/where-clauses/where-clauses-unboxed-closures.rs @@ -1,6 +1,6 @@ -// run-pass +//@ run-pass #![allow(unused_variables)] -// pretty-expanded FIXME #23616 +//@ pretty-expanded FIXME #23616 struct Bencher; diff --git a/tests/ui/where-clauses/where-clauses.rs b/tests/ui/where-clauses/where-clauses.rs index 905ef7c5e8c..f7bf875d417 100644 --- a/tests/ui/where-clauses/where-clauses.rs +++ b/tests/ui/where-clauses/where-clauses.rs @@ -1,4 +1,4 @@ -// run-pass +//@ run-pass trait Equal { fn equal(&self, other: &Self) -> bool; fn equals(&self, this: &T, that: &T, x: &U, y: &U) -> bool diff --git a/tests/ui/windows-subsystem-invalid.rs b/tests/ui/windows-subsystem-invalid.rs index 0336678b712..c6a6dd00a92 100644 --- a/tests/ui/windows-subsystem-invalid.rs +++ b/tests/ui/windows-subsystem-invalid.rs @@ -1,4 +1,4 @@ -// error-pattern: invalid windows subsystem `wrong`, only `windows` and `console` are allowed +//@ error-pattern: invalid windows subsystem `wrong`, only `windows` and `console` are allowed #![windows_subsystem = "wrong"] diff --git a/tests/ui/write-fmt-errors.rs b/tests/ui/write-fmt-errors.rs index 3fcaefaa63e..f194e25b556 100644 --- a/tests/ui/write-fmt-errors.rs +++ b/tests/ui/write-fmt-errors.rs @@ -1,4 +1,4 @@ -// run-pass +//@ run-pass #![feature(io_error_uncategorized)] diff --git a/tests/ui/wrong-hashset-issue-42918.rs b/tests/ui/wrong-hashset-issue-42918.rs index ef834d915c9..5795cc527cf 100644 --- a/tests/ui/wrong-hashset-issue-42918.rs +++ b/tests/ui/wrong-hashset-issue-42918.rs @@ -1,7 +1,7 @@ -// run-pass +//@ run-pass // #![allow(dead_code)] -// compile-flags: -O +//@ compile-flags: -O use std::collections::HashSet; diff --git a/tests/ui/xcrate/xcrate-private-by-default.rs b/tests/ui/xcrate/xcrate-private-by-default.rs index 299cff54f34..3a5d8131344 100644 --- a/tests/ui/xcrate/xcrate-private-by-default.rs +++ b/tests/ui/xcrate/xcrate-private-by-default.rs @@ -1,4 +1,4 @@ -// aux-build:static_priv_by_default.rs +//@ aux-build:static_priv_by_default.rs extern crate static_priv_by_default; diff --git a/tests/ui/xcrate/xcrate-unit-struct-2.rs b/tests/ui/xcrate/xcrate-unit-struct-2.rs index 7aa3eb0d6c4..c2e3a761129 100644 --- a/tests/ui/xcrate/xcrate-unit-struct-2.rs +++ b/tests/ui/xcrate/xcrate-unit-struct-2.rs @@ -1,6 +1,6 @@ -// run-pass -// aux-build:xcrate_unit_struct.rs -// pretty-expanded FIXME #23616 +//@ run-pass +//@ aux-build:xcrate_unit_struct.rs +//@ pretty-expanded FIXME #23616 #![allow(non_upper_case_globals)] extern crate xcrate_unit_struct; diff --git a/tests/ui/xcrate/xcrate-unit-struct.rs b/tests/ui/xcrate/xcrate-unit-struct.rs index bc14cd8d4c0..1517f843eff 100644 --- a/tests/ui/xcrate/xcrate-unit-struct.rs +++ b/tests/ui/xcrate/xcrate-unit-struct.rs @@ -1,4 +1,4 @@ -// aux-build:xcrate_unit_struct.rs +//@ aux-build:xcrate_unit_struct.rs // Make sure that when we have cross-crate unit structs we don't accidentally // make values out of cross-crate structs that aren't unit. diff --git a/tests/ui/zero-sized/zero-size-type-destructors.rs b/tests/ui/zero-sized/zero-size-type-destructors.rs index fb87d8ea0ba..ebd2a12a6c8 100644 --- a/tests/ui/zero-sized/zero-size-type-destructors.rs +++ b/tests/ui/zero-sized/zero-size-type-destructors.rs @@ -1,4 +1,4 @@ -// run-pass +//@ run-pass #![allow(non_upper_case_globals)] static mut destructions : isize = 3; diff --git a/tests/ui/zero-sized/zero-sized-binary-heap-push.rs b/tests/ui/zero-sized/zero-sized-binary-heap-push.rs index 14cf6c2036b..d35a3cf559e 100644 --- a/tests/ui/zero-sized/zero-sized-binary-heap-push.rs +++ b/tests/ui/zero-sized/zero-sized-binary-heap-push.rs @@ -1,4 +1,4 @@ -// run-pass +//@ run-pass #![allow(unused_variables)] use std::collections::BinaryHeap; diff --git a/tests/ui/zero-sized/zero-sized-btreemap-insert.rs b/tests/ui/zero-sized/zero-sized-btreemap-insert.rs index 52edb33d6ad..be862c85cbb 100644 --- a/tests/ui/zero-sized/zero-sized-btreemap-insert.rs +++ b/tests/ui/zero-sized/zero-sized-btreemap-insert.rs @@ -1,4 +1,4 @@ -// run-pass +//@ run-pass #![allow(unused_variables)] #![allow(unused_imports)] use std::cmp::{Ord, Ordering, PartialOrd}; diff --git a/tests/ui/zero-sized/zero-sized-linkedlist-push.rs b/tests/ui/zero-sized/zero-sized-linkedlist-push.rs index 301f03110b7..c5c5c28eb9e 100644 --- a/tests/ui/zero-sized/zero-sized-linkedlist-push.rs +++ b/tests/ui/zero-sized/zero-sized-linkedlist-push.rs @@ -1,4 +1,4 @@ -// run-pass +//@ run-pass use std::collections::LinkedList; fn main() { diff --git a/tests/ui/zero-sized/zero-sized-tuple-struct.rs b/tests/ui/zero-sized/zero-sized-tuple-struct.rs index 2208590f7d6..8eb56071033 100644 --- a/tests/ui/zero-sized/zero-sized-tuple-struct.rs +++ b/tests/ui/zero-sized/zero-sized-tuple-struct.rs @@ -1,4 +1,4 @@ -// run-pass +//@ run-pass #![allow(unused_braces)] #![allow(unused_assignments)] -- cgit 1.4.1-3-g733a5