diff options
Diffstat (limited to 'tests')
264 files changed, 1448 insertions, 556 deletions
diff --git a/tests/codegen/intrinsics/carrying_mul_add.rs b/tests/codegen/intrinsics/carrying_mul_add.rs new file mode 100644 index 00000000000..174c4077f09 --- /dev/null +++ b/tests/codegen/intrinsics/carrying_mul_add.rs @@ -0,0 +1,137 @@ +//@ revisions: RAW OPT +//@ compile-flags: -C opt-level=1 +//@[RAW] compile-flags: -C no-prepopulate-passes +//@[OPT] min-llvm-version: 19 + +#![crate_type = "lib"] +#![feature(core_intrinsics)] +#![feature(core_intrinsics_fallbacks)] + +// Note that LLVM seems to sometimes permute the order of arguments to mul and add, +// so these tests don't check the arguments in the optimized revision. + +use std::intrinsics::{carrying_mul_add, fallback}; + +// The fallbacks are emitted even when they're never used, but optimize out. + +// RAW: wide_mul_u128 +// OPT-NOT: wide_mul_u128 + +// CHECK-LABEL: @cma_u8 +#[no_mangle] +pub unsafe fn cma_u8(a: u8, b: u8, c: u8, d: u8) -> (u8, u8) { + // CHECK: [[A:%.+]] = zext i8 %a to i16 + // CHECK: [[B:%.+]] = zext i8 %b to i16 + // CHECK: [[C:%.+]] = zext i8 %c to i16 + // CHECK: [[D:%.+]] = zext i8 %d to i16 + // CHECK: [[AB:%.+]] = mul nuw i16 + // RAW-SAME: [[A]], [[B]] + // CHECK: [[ABC:%.+]] = add nuw i16 + // RAW-SAME: [[AB]], [[C]] + // CHECK: [[ABCD:%.+]] = add nuw i16 + // RAW-SAME: [[ABC]], [[D]] + // CHECK: [[LOW:%.+]] = trunc i16 [[ABCD]] to i8 + // CHECK: [[HIGHW:%.+]] = lshr i16 [[ABCD]], 8 + // RAW: [[HIGH:%.+]] = trunc i16 [[HIGHW]] to i8 + // OPT: [[HIGH:%.+]] = trunc nuw i16 [[HIGHW]] to i8 + // CHECK: [[PAIR0:%.+]] = insertvalue { i8, i8 } poison, i8 [[LOW]], 0 + // CHECK: [[PAIR1:%.+]] = insertvalue { i8, i8 } [[PAIR0]], i8 [[HIGH]], 1 + // OPT: ret { i8, i8 } [[PAIR1]] + carrying_mul_add(a, b, c, d) +} + +// CHECK-LABEL: @cma_u32 +#[no_mangle] +pub unsafe fn cma_u32(a: u32, b: u32, c: u32, d: u32) -> (u32, u32) { + // CHECK: [[A:%.+]] = zext i32 %a to i64 + // CHECK: [[B:%.+]] = zext i32 %b to i64 + // CHECK: [[C:%.+]] = zext i32 %c to i64 + // CHECK: [[D:%.+]] = zext i32 %d to i64 + // CHECK: [[AB:%.+]] = mul nuw i64 + // RAW-SAME: [[A]], [[B]] + // CHECK: [[ABC:%.+]] = add nuw i64 + // RAW-SAME: [[AB]], [[C]] + // CHECK: [[ABCD:%.+]] = add nuw i64 + // RAW-SAME: [[ABC]], [[D]] + // CHECK: [[LOW:%.+]] = trunc i64 [[ABCD]] to i32 + // CHECK: [[HIGHW:%.+]] = lshr i64 [[ABCD]], 32 + // RAW: [[HIGH:%.+]] = trunc i64 [[HIGHW]] to i32 + // OPT: [[HIGH:%.+]] = trunc nuw i64 [[HIGHW]] to i32 + // CHECK: [[PAIR0:%.+]] = insertvalue { i32, i32 } poison, i32 [[LOW]], 0 + // CHECK: [[PAIR1:%.+]] = insertvalue { i32, i32 } [[PAIR0]], i32 [[HIGH]], 1 + // OPT: ret { i32, i32 } [[PAIR1]] + carrying_mul_add(a, b, c, d) +} + +// CHECK-LABEL: @cma_u128 +// CHECK-SAME: sret{{.+}}dereferenceable(32){{.+}}%_0,{{.+}}%a,{{.+}}%b,{{.+}}%c,{{.+}}%d +#[no_mangle] +pub unsafe fn cma_u128(a: u128, b: u128, c: u128, d: u128) -> (u128, u128) { + // CHECK: [[A:%.+]] = zext i128 %a to i256 + // CHECK: [[B:%.+]] = zext i128 %b to i256 + // CHECK: [[C:%.+]] = zext i128 %c to i256 + // CHECK: [[D:%.+]] = zext i128 %d to i256 + // CHECK: [[AB:%.+]] = mul nuw i256 + // RAW-SAME: [[A]], [[B]] + // CHECK: [[ABC:%.+]] = add nuw i256 + // RAW-SAME: [[AB]], [[C]] + // CHECK: [[ABCD:%.+]] = add nuw i256 + // RAW-SAME: [[ABC]], [[D]] + // CHECK: [[LOW:%.+]] = trunc i256 [[ABCD]] to i128 + // CHECK: [[HIGHW:%.+]] = lshr i256 [[ABCD]], 128 + // RAW: [[HIGH:%.+]] = trunc i256 [[HIGHW]] to i128 + // OPT: [[HIGH:%.+]] = trunc nuw i256 [[HIGHW]] to i128 + // RAW: [[PAIR0:%.+]] = insertvalue { i128, i128 } poison, i128 [[LOW]], 0 + // RAW: [[PAIR1:%.+]] = insertvalue { i128, i128 } [[PAIR0]], i128 [[HIGH]], 1 + // OPT: store i128 [[LOW]], ptr %_0 + // OPT: [[P1:%.+]] = getelementptr inbounds i8, ptr %_0, {{i32|i64}} 16 + // OPT: store i128 [[HIGH]], ptr [[P1]] + // CHECK: ret void + carrying_mul_add(a, b, c, d) +} + +// CHECK-LABEL: @cma_i128 +// CHECK-SAME: sret{{.+}}dereferenceable(32){{.+}}%_0,{{.+}}%a,{{.+}}%b,{{.+}}%c,{{.+}}%d +#[no_mangle] +pub unsafe fn cma_i128(a: i128, b: i128, c: i128, d: i128) -> (u128, i128) { + // CHECK: [[A:%.+]] = sext i128 %a to i256 + // CHECK: [[B:%.+]] = sext i128 %b to i256 + // CHECK: [[C:%.+]] = sext i128 %c to i256 + // CHECK: [[D:%.+]] = sext i128 %d to i256 + // CHECK: [[AB:%.+]] = mul nsw i256 + // RAW-SAME: [[A]], [[B]] + // CHECK: [[ABC:%.+]] = add nsw i256 + // RAW-SAME: [[AB]], [[C]] + // CHECK: [[ABCD:%.+]] = add nsw i256 + // RAW-SAME: [[ABC]], [[D]] + // CHECK: [[LOW:%.+]] = trunc i256 [[ABCD]] to i128 + // CHECK: [[HIGHW:%.+]] = lshr i256 [[ABCD]], 128 + // RAW: [[HIGH:%.+]] = trunc i256 [[HIGHW]] to i128 + // OPT: [[HIGH:%.+]] = trunc nuw i256 [[HIGHW]] to i128 + // RAW: [[PAIR0:%.+]] = insertvalue { i128, i128 } poison, i128 [[LOW]], 0 + // RAW: [[PAIR1:%.+]] = insertvalue { i128, i128 } [[PAIR0]], i128 [[HIGH]], 1 + // OPT: store i128 [[LOW]], ptr %_0 + // OPT: [[P1:%.+]] = getelementptr inbounds i8, ptr %_0, {{i32|i64}} 16 + // OPT: store i128 [[HIGH]], ptr [[P1]] + // CHECK: ret void + carrying_mul_add(a, b, c, d) +} + +// CHECK-LABEL: @fallback_cma_u32 +#[no_mangle] +pub unsafe fn fallback_cma_u32(a: u32, b: u32, c: u32, d: u32) -> (u32, u32) { + // OPT-DAG: [[A:%.+]] = zext i32 %a to i64 + // OPT-DAG: [[B:%.+]] = zext i32 %b to i64 + // OPT-DAG: [[AB:%.+]] = mul nuw i64 + // OPT-DAG: [[C:%.+]] = zext i32 %c to i64 + // OPT-DAG: [[ABC:%.+]] = add nuw i64{{.+}}[[C]] + // OPT-DAG: [[D:%.+]] = zext i32 %d to i64 + // OPT-DAG: [[ABCD:%.+]] = add nuw i64{{.+}}[[D]] + // OPT-DAG: [[LOW:%.+]] = trunc i64 [[ABCD]] to i32 + // OPT-DAG: [[HIGHW:%.+]] = lshr i64 [[ABCD]], 32 + // OPT-DAG: [[HIGH:%.+]] = trunc nuw i64 [[HIGHW]] to i32 + // OPT-DAG: [[PAIR0:%.+]] = insertvalue { i32, i32 } poison, i32 [[LOW]], 0 + // OPT-DAG: [[PAIR1:%.+]] = insertvalue { i32, i32 } [[PAIR0]], i32 [[HIGH]], 1 + // OPT-DAG: ret { i32, i32 } [[PAIR1]] + fallback::CarryingMulAdd::carrying_mul_add(a, b, c, d) +} diff --git a/tests/crashes/128346.rs b/tests/crashes/128346.rs deleted file mode 100644 index 93d9c40a544..00000000000 --- a/tests/crashes/128346.rs +++ /dev/null @@ -1,13 +0,0 @@ -//@ known-bug: rust-lang/rust#128346 - -macro_rules! one_rep { - ( $($a:ident)* ) => { - A( - const ${concat($a, Z)}: i32 = 3; - )* - }; -} - -fn main() { - one_rep!(A B C); -} diff --git a/tests/run-make/incr-add-rust-src-component/Makefile b/tests/run-make/incr-add-rust-src-component/Makefile deleted file mode 100644 index fd09c2299f9..00000000000 --- a/tests/run-make/incr-add-rust-src-component/Makefile +++ /dev/null @@ -1,45 +0,0 @@ -# ignore-cross-compile -include ../tools.mk - -# rust-lang/rust#70924: Test that if we add rust-src component in between two -# incremental compiles, the compiler does not ICE on the second. - -# This test uses `ln -s` rather than copying to save testing time, but its -# usage doesn't work on windows. So ignore windows. - -# ignore-windows - -SYSROOT:=$(shell $(RUSTC) --print sysroot) -FAKEROOT=$(TMPDIR)/fakeroot -INCR=$(TMPDIR)/incr - -# Make a local copy of the sysroot; then remove the rust-src part of it, if -# present, for the *first* build. Then put in a facsimile of the rust-src -# component for the second build, in order to expose the ICE from issue #70924. -# -# Note that it is much easier to just do `cp -a $(SYSROOT)/* $(FAKEROOT)` as a -# first step, but I am concerned that would be too expensive in a unit test -# compared to making symbolic links. -# -# Anyway, the pattern you'll see here is: For every prefix in -# root/lib/rustlib/src, link all of prefix parent content, then remove the -# prefix, then loop on the next prefix. This way, we basically create a copy of -# the context around root/lib/rustlib/src, and can freely add/remove the src -# component itself. -all: - mkdir $(FAKEROOT) - ln -s $(SYSROOT)/* $(FAKEROOT) - rm -f $(FAKEROOT)/lib - mkdir $(FAKEROOT)/lib - ln -s $(SYSROOT)/lib/* $(FAKEROOT)/lib - rm -f $(FAKEROOT)/lib/rustlib - mkdir $(FAKEROOT)/lib/rustlib - ln -s $(SYSROOT)/lib/rustlib/* $(FAKEROOT)/lib/rustlib - rm -f $(FAKEROOT)/lib/rustlib/src - mkdir $(FAKEROOT)/lib/rustlib/src - ln -s $(SYSROOT)/lib/rustlib/src/* $(FAKEROOT)/lib/rustlib/src - rm -f $(FAKEROOT)/lib/rustlib/src/rust - $(RUSTC) --sysroot $(FAKEROOT) -C incremental=$(INCR) main.rs - mkdir -p $(FAKEROOT)/lib/rustlib/src/rust/src/libstd - touch $(FAKEROOT)/lib/rustlib/src/rust/src/libstd/lib.rs - $(RUSTC) --sysroot $(FAKEROOT) -C incremental=$(INCR) main.rs diff --git a/tests/run-make/incr-add-rust-src-component/rmake.rs b/tests/run-make/incr-add-rust-src-component/rmake.rs new file mode 100644 index 00000000000..964f1410a96 --- /dev/null +++ b/tests/run-make/incr-add-rust-src-component/rmake.rs @@ -0,0 +1,131 @@ +//! Regression test for rust-lang/rust#70924. Check that if we add the `rust-src` component in +//! between two incremental compiles, that the compiler doesn't ICE on the second invocation. +//! +//! This test uses symbolic links to save testing time. +//! +//! The way this test works is that, for every prefix in `root/lib/rustlib/src`, link all of prefix +//! parent content, then remove the prefix, then loop on the next prefix. This way, we basically +//! create a copy of the context around `root/lib/rustlib/src`, and can freely add/remove the src +//! component itself. + +//@ ignore-cross-compile +// Reason: test needs to run. + +//@ needs-symlink +// Reason: test needs symlink to create stub directories and files. + +use std::path::Path; + +use run_make_support::rfs::read_dir_entries; +use run_make_support::{bare_rustc, path, rfs, run}; + +#[derive(Debug, Copy, Clone)] +struct Symlink<'a, 'b> { + src_dir: &'a Path, + dst_dir: &'b Path, +} + +fn shallow_symlink_dir<'a, 'b>(Symlink { src_dir, dst_dir }: Symlink<'a, 'b>) { + eprintln!( + "shallow_symlink_dir: src_dir={} -> dst_dir={}", + src_dir.display(), + dst_dir.display() + ); + + read_dir_entries(src_dir, |src_path| { + let src_metadata = rfs::symlink_metadata(src_path); + let filename = src_path.file_name().unwrap(); + if src_metadata.is_dir() { + rfs::symlink_dir(src_path, dst_dir.join(filename)); + } else if src_metadata.is_file() { + rfs::symlink_file(src_path, dst_dir.join(filename)); + } else if src_metadata.is_symlink() { + rfs::copy_symlink(src_path, dst_dir.join(filename)); + } + }); +} + +fn recreate_dir(path: &Path) { + rfs::recursive_remove(path); + rfs::create_dir(path); +} + +fn main() { + let sysroot = bare_rustc().print("sysroot").run().stdout_utf8(); + let sysroot = sysroot.trim(); + let sysroot = path(sysroot); + + let incr = path("incr"); + + let fakeroot = path("fakeroot"); + rfs::create_dir(&fakeroot); + + shallow_symlink_dir(Symlink { src_dir: &sysroot, dst_dir: &fakeroot }); + recreate_dir(&fakeroot.join("lib")); + + shallow_symlink_dir(Symlink { src_dir: &sysroot.join("lib"), dst_dir: &fakeroot.join("lib") }); + recreate_dir(&fakeroot.join("lib").join("rustlib")); + + shallow_symlink_dir(Symlink { + src_dir: &sysroot.join("lib").join("rustlib"), + dst_dir: &fakeroot.join("lib").join("rustlib"), + }); + recreate_dir(&fakeroot.join("lib").join("rustlib").join("src")); + + shallow_symlink_dir(Symlink { + src_dir: &sysroot.join("lib").join("rustlib").join("src"), + dst_dir: &fakeroot.join("lib").join("rustlib").join("src"), + }); + + rfs::recursive_remove(&fakeroot.join("lib").join("rustlib").join("src").join("rust")); + + let run_incr_rustc = || { + bare_rustc() + .sysroot(&fakeroot) + .arg("-C") + .arg(format!("incremental={}", incr.to_str().unwrap())) + .input("main.rs") + .run(); + }; + + // Run rustc w/ incremental once... + run_incr_rustc(); + + // NOTE: the Makefile version of this used `$SYSROOT/lib/rustlib/src/rust/src/libstd/lib.rs`, + // but that actually got moved around and reorganized over the years. As of Dec 2024, the + // rust-src component is more like (specific for our purposes): + // + // ``` + // $SYSROOT/lib/rustlib/src/rust/ + // library/std/src/lib.rs + // src/ + // ``` + rfs::create_dir_all( + &fakeroot + .join("lib") + .join("rustlib") + .join("src") + .join("rust") + .join("library") + .join("std") + .join("src"), + ); + rfs::write( + &fakeroot + .join("lib") + .join("rustlib") + .join("src") + .join("rust") + .join("library") + .join("std") + .join("src") + .join("lib.rs"), + b"", + ); + + // ... and a second time. + run_incr_rustc(); + + // Basic sanity check that the compiled binary can run. + run("main"); +} diff --git a/tests/rustdoc-js-std/path-maxeditdistance.js b/tests/rustdoc-js-std/path-maxeditdistance.js index af71713f055..fd12a056496 100644 --- a/tests/rustdoc-js-std/path-maxeditdistance.js +++ b/tests/rustdoc-js-std/path-maxeditdistance.js @@ -17,10 +17,10 @@ const EXPECTED = [ { 'path': 'std::vec::IntoIter', 'name': 'into_iter' }, { 'path': 'std::vec::ExtractIf', 'name': 'into_iter' }, { 'path': 'std::vec::Splice', 'name': 'into_iter' }, - { 'path': 'std::collections::vec_deque::VecDeque', 'name': 'iter' }, - { 'path': 'std::collections::vec_deque::VecDeque', 'name': 'iter_mut' }, - { 'path': 'std::collections::vec_deque::VecDeque', 'name': 'from_iter' }, - { 'path': 'std::collections::vec_deque::VecDeque', 'name': 'into_iter' }, + { 'path': 'std::collections::VecDeque', 'name': 'iter' }, + { 'path': 'std::collections::VecDeque', 'name': 'iter_mut' }, + { 'path': 'std::collections::VecDeque', 'name': 'from_iter' }, + { 'path': 'std::collections::VecDeque', 'name': 'into_iter' }, ], }, { diff --git a/tests/rustdoc-js-std/path-ordering.js b/tests/rustdoc-js-std/path-ordering.js index 4bfc6256052..4bec4827d51 100644 --- a/tests/rustdoc-js-std/path-ordering.js +++ b/tests/rustdoc-js-std/path-ordering.js @@ -3,17 +3,17 @@ const EXPECTED = [ query: 'hashset::insert', others: [ // ensure hashset::insert comes first - { 'path': 'std::collections::hash_set::HashSet', 'name': 'insert' }, - { 'path': 'std::collections::hash_set::HashSet', 'name': 'get_or_insert' }, - { 'path': 'std::collections::hash_set::HashSet', 'name': 'get_or_insert_with' }, + { 'path': 'std::collections::HashSet', 'name': 'insert' }, + { 'path': 'std::collections::HashSet', 'name': 'get_or_insert' }, + { 'path': 'std::collections::HashSet', 'name': 'get_or_insert_with' }, ], }, { query: 'hash::insert', others: [ // ensure hashset/hashmap::insert come first - { 'path': 'std::collections::hash_map::HashMap', 'name': 'insert' }, - { 'path': 'std::collections::hash_set::HashSet', 'name': 'insert' }, + { 'path': 'std::collections::HashMap', 'name': 'insert' }, + { 'path': 'std::collections::HashSet', 'name': 'insert' }, ], }, ]; diff --git a/tests/rustdoc-js-std/simd-type-signatures.js b/tests/rustdoc-js-std/simd-type-signatures.js index 4fc14e65ac4..fea34ff97f2 100644 --- a/tests/rustdoc-js-std/simd-type-signatures.js +++ b/tests/rustdoc-js-std/simd-type-signatures.js @@ -11,29 +11,29 @@ const EXPECTED = [ 'query': 'simd<i16>, simd<i16> -> simd<i16>', 'others': [ { - 'path': 'std::simd::prelude::Simd', + 'path': 'std::simd::Simd', 'name': 'simd_max', - 'href': '../std/simd/prelude/struct.Simd.html#impl-SimdOrd-for-Simd%3Ci16,+N%3E/method.simd_max' + 'href': '../std/simd/struct.Simd.html#impl-SimdOrd-for-Simd%3Ci16,+N%3E/method.simd_max' }, { - 'path': 'std::simd::prelude::Simd', + 'path': 'std::simd::Simd', 'name': 'simd_min', - 'href': '../std/simd/prelude/struct.Simd.html#impl-SimdOrd-for-Simd%3Ci16,+N%3E/method.simd_min' + 'href': '../std/simd/struct.Simd.html#impl-SimdOrd-for-Simd%3Ci16,+N%3E/method.simd_min' }, { - 'path': 'std::simd::prelude::Simd', + 'path': 'std::simd::Simd', 'name': 'saturating_add', - 'href': '../std/simd/prelude/struct.Simd.html#impl-SimdInt-for-Simd%3Ci16,+N%3E/method.saturating_add' + 'href': '../std/simd/struct.Simd.html#impl-SimdInt-for-Simd%3Ci16,+N%3E/method.saturating_add' }, { - 'path': 'std::simd::prelude::Simd', + 'path': 'std::simd::Simd', 'name': 'saturating_sub', - 'href': '../std/simd/prelude/struct.Simd.html#impl-SimdInt-for-Simd%3Ci16,+N%3E/method.saturating_sub' + 'href': '../std/simd/struct.Simd.html#impl-SimdInt-for-Simd%3Ci16,+N%3E/method.saturating_sub' }, { - 'path': 'std::simd::prelude::Simd', + 'path': 'std::simd::Simd', 'name': 'simd_clamp', - 'href': '../std/simd/prelude/struct.Simd.html#impl-SimdOrd-for-Simd%3Ci16,+N%3E/method.simd_clamp' + 'href': '../std/simd/struct.Simd.html#impl-SimdOrd-for-Simd%3Ci16,+N%3E/method.simd_clamp' }, ], }, @@ -41,29 +41,29 @@ const EXPECTED = [ 'query': 'simd<i8>, simd<i8> -> simd<i8>', 'others': [ { - 'path': 'std::simd::prelude::Simd', + 'path': 'std::simd::Simd', 'name': 'simd_max', - 'href': '../std/simd/prelude/struct.Simd.html#impl-SimdOrd-for-Simd%3Ci8,+N%3E/method.simd_max' + 'href': '../std/simd/struct.Simd.html#impl-SimdOrd-for-Simd%3Ci8,+N%3E/method.simd_max' }, { - 'path': 'std::simd::prelude::Simd', + 'path': 'std::simd::Simd', 'name': 'simd_min', - 'href': '../std/simd/prelude/struct.Simd.html#impl-SimdOrd-for-Simd%3Ci8,+N%3E/method.simd_min' + 'href': '../std/simd/struct.Simd.html#impl-SimdOrd-for-Simd%3Ci8,+N%3E/method.simd_min' }, { - 'path': 'std::simd::prelude::Simd', + 'path': 'std::simd::Simd', 'name': 'saturating_add', - 'href': '../std/simd/prelude/struct.Simd.html#impl-SimdInt-for-Simd%3Ci8,+N%3E/method.saturating_add' + 'href': '../std/simd/struct.Simd.html#impl-SimdInt-for-Simd%3Ci8,+N%3E/method.saturating_add' }, { - 'path': 'std::simd::prelude::Simd', + 'path': 'std::simd::Simd', 'name': 'saturating_sub', - 'href': '../std/simd/prelude/struct.Simd.html#impl-SimdInt-for-Simd%3Ci8,+N%3E/method.saturating_sub' + 'href': '../std/simd/struct.Simd.html#impl-SimdInt-for-Simd%3Ci8,+N%3E/method.saturating_sub' }, { - 'path': 'std::simd::prelude::Simd', + 'path': 'std::simd::Simd', 'name': 'simd_clamp', - 'href': '../std/simd/prelude/struct.Simd.html#impl-SimdOrd-for-Simd%3Ci8,+N%3E/method.simd_clamp' + 'href': '../std/simd/struct.Simd.html#impl-SimdOrd-for-Simd%3Ci8,+N%3E/method.simd_clamp' }, ], }, diff --git a/tests/rustdoc-ui/2024-doctests-checks.rs b/tests/rustdoc-ui/2024-doctests-checks.rs index f3e4e10f571..0c3a11771f3 100644 --- a/tests/rustdoc-ui/2024-doctests-checks.rs +++ b/tests/rustdoc-ui/2024-doctests-checks.rs @@ -1,9 +1,9 @@ //@ check-pass //@ edition: 2024 //@ compile-flags: --test --test-args=--test-threads=1 -//@ normalize-stdout-test: "tests/rustdoc-ui" -> "$$DIR" -//@ normalize-stdout-test: "finished in \d+\.\d+s" -> "finished in $$TIME" -//@ normalize-stdout-test: ".rs:\d+:\d+" -> ".rs:$$LINE:$$COL" +//@ normalize-stdout: "tests/rustdoc-ui" -> "$$DIR" +//@ normalize-stdout: "finished in \d+\.\d+s" -> "finished in $$TIME" +//@ normalize-stdout: ".rs:\d+:\d+" -> ".rs:$$LINE:$$COL" /// ``` /// let x = 12; diff --git a/tests/rustdoc-ui/2024-doctests-crate-attribute.rs b/tests/rustdoc-ui/2024-doctests-crate-attribute.rs index a353fc7cc44..c9887cbc63b 100644 --- a/tests/rustdoc-ui/2024-doctests-crate-attribute.rs +++ b/tests/rustdoc-ui/2024-doctests-crate-attribute.rs @@ -1,9 +1,9 @@ //@ check-pass //@ edition: 2024 //@ compile-flags: --test --test-args=--test-threads=1 -//@ normalize-stdout-test: "tests/rustdoc-ui" -> "$$DIR" -//@ normalize-stdout-test: "finished in \d+\.\d+s" -> "finished in $$TIME" -//@ normalize-stdout-test: ".rs:\d+:\d+" -> ".rs:$$LINE:$$COL" +//@ normalize-stdout: "tests/rustdoc-ui" -> "$$DIR" +//@ normalize-stdout: "finished in \d+\.\d+s" -> "finished in $$TIME" +//@ normalize-stdout: ".rs:\d+:\d+" -> ".rs:$$LINE:$$COL" /// This doctest is used to ensure that if a crate attribute is present, /// it will not be part of the merged doctests. diff --git a/tests/rustdoc-ui/argfile/commandline-argfile-missing-windows.rs b/tests/rustdoc-ui/argfile/commandline-argfile-missing-windows.rs index 24cfd25ccad..1a1cf6b9e75 100644 --- a/tests/rustdoc-ui/argfile/commandline-argfile-missing-windows.rs +++ b/tests/rustdoc-ui/argfile/commandline-argfile-missing-windows.rs @@ -5,8 +5,8 @@ // line arguments and is only run on windows. // //@ only-windows -//@ normalize-stderr-test: "os error \d+" -> "os error $$ERR" -//@ normalize-stderr-test: "commandline-argfile-missing.args:[^(]*" -> "commandline-argfile-missing.args: $$FILE_MISSING " +//@ normalize-stderr: "os error \d+" -> "os error $$ERR" +//@ normalize-stderr: "commandline-argfile-missing.args:[^(]*" -> "commandline-argfile-missing.args: $$FILE_MISSING " //@ compile-flags: --cfg cmdline_set @{{src-base}}\argfile\commandline-argfile-missing.args #[cfg(not(cmdline_set))] diff --git a/tests/rustdoc-ui/argfile/commandline-argfile-missing.rs b/tests/rustdoc-ui/argfile/commandline-argfile-missing.rs index fe6a849b0c8..8d9335f5add 100644 --- a/tests/rustdoc-ui/argfile/commandline-argfile-missing.rs +++ b/tests/rustdoc-ui/argfile/commandline-argfile-missing.rs @@ -6,8 +6,8 @@ // windows. // //@ ignore-windows -//@ normalize-stderr-test: "os error \d+" -> "os error $$ERR" -//@ normalize-stderr-test: "commandline-argfile-missing.args:[^(]*" -> "commandline-argfile-missing.args: $$FILE_MISSING " +//@ normalize-stderr: "os error \d+" -> "os error $$ERR" +//@ normalize-stderr: "commandline-argfile-missing.args:[^(]*" -> "commandline-argfile-missing.args: $$FILE_MISSING " //@ compile-flags: --cfg cmdline_set @{{src-base}}/argfile/commandline-argfile-missing.args #[cfg(not(cmdline_set))] diff --git a/tests/rustdoc-ui/argfile/commandline-argfile-multiple-windows.rs b/tests/rustdoc-ui/argfile/commandline-argfile-multiple-windows.rs index 84c050d84e2..9cbbd505c57 100644 --- a/tests/rustdoc-ui/argfile/commandline-argfile-multiple-windows.rs +++ b/tests/rustdoc-ui/argfile/commandline-argfile-multiple-windows.rs @@ -5,9 +5,9 @@ // line arguments and is only run on windows. // //@ only-windows -//@ normalize-stderr-test: "os error \d+" -> "os error $$ERR" -//@ normalize-stderr-test: "commandline-argfile-missing.args:[^(]*" -> "commandline-argfile-missing.args: $$FILE_MISSING " -//@ normalize-stderr-test: "commandline-argfile-missing2.args:[^(]*" -> "commandline-argfile-missing2.args: $$FILE_MISSING " +//@ normalize-stderr: "os error \d+" -> "os error $$ERR" +//@ normalize-stderr: "commandline-argfile-missing.args:[^(]*" -> "commandline-argfile-missing.args: $$FILE_MISSING " +//@ normalize-stderr: "commandline-argfile-missing2.args:[^(]*" -> "commandline-argfile-missing2.args: $$FILE_MISSING " //@ compile-flags: --cfg cmdline_set @{{src-base}}\argfile\commandline-argfile-missing.args @{{src-base}}\argfile\commandline-argfile-badutf8.args @{{src-base}}\argfile\commandline-argfile-missing2.args #[cfg(not(cmdline_set))] diff --git a/tests/rustdoc-ui/argfile/commandline-argfile-multiple.rs b/tests/rustdoc-ui/argfile/commandline-argfile-multiple.rs index f658ee34fbb..f211a50892c 100644 --- a/tests/rustdoc-ui/argfile/commandline-argfile-multiple.rs +++ b/tests/rustdoc-ui/argfile/commandline-argfile-multiple.rs @@ -6,9 +6,9 @@ // windows. // //@ ignore-windows -//@ normalize-stderr-test: "os error \d+" -> "os error $$ERR" -//@ normalize-stderr-test: "commandline-argfile-missing.args:[^(]*" -> "commandline-argfile-missing.args: $$FILE_MISSING " -//@ normalize-stderr-test: "commandline-argfile-missing2.args:[^(]*" -> "commandline-argfile-missing2.args: $$FILE_MISSING " +//@ normalize-stderr: "os error \d+" -> "os error $$ERR" +//@ normalize-stderr: "commandline-argfile-missing.args:[^(]*" -> "commandline-argfile-missing.args: $$FILE_MISSING " +//@ normalize-stderr: "commandline-argfile-missing2.args:[^(]*" -> "commandline-argfile-missing2.args: $$FILE_MISSING " //@ compile-flags: --cfg cmdline_set @{{src-base}}/argfile/commandline-argfile-missing.args @{{src-base}}/argfile/commandline-argfile-badutf8.args @{{src-base}}/argfile/commandline-argfile-missing2.args #[cfg(not(cmdline_set))] diff --git a/tests/rustdoc-ui/disambiguator-endswith-named-suffix.rs b/tests/rustdoc-ui/disambiguator-endswith-named-suffix.rs index c3da1fdd7cc..1174e16dd53 100644 --- a/tests/rustdoc-ui/disambiguator-endswith-named-suffix.rs +++ b/tests/rustdoc-ui/disambiguator-endswith-named-suffix.rs @@ -1,5 +1,5 @@ //@ check-pass -//@ normalize-stderr-test: "nightly|beta|1\.[0-9][0-9]\.[0-9]" -> "$$CHANNEL" +//@ normalize-stderr: "nightly|beta|1\.[0-9][0-9]\.[0-9]" -> "$$CHANNEL" //! [struct@m!()] //~ WARN: unmatched disambiguator `struct` and suffix `!()` //! [struct@m!{}] diff --git a/tests/rustdoc-ui/doctest/block-doc-comment.rs b/tests/rustdoc-ui/doctest/block-doc-comment.rs index df953dc49be..84bb5abb244 100644 --- a/tests/rustdoc-ui/doctest/block-doc-comment.rs +++ b/tests/rustdoc-ui/doctest/block-doc-comment.rs @@ -1,6 +1,6 @@ //@ check-pass //@ compile-flags:--test -//@ normalize-stdout-test: "finished in \d+\.\d+s" -> "finished in $$TIME" +//@ normalize-stdout: "finished in \d+\.\d+s" -> "finished in $$TIME" // This test ensures that no code block is detected in the doc comments. diff --git a/tests/rustdoc-ui/doctest/cfg-test.rs b/tests/rustdoc-ui/doctest/cfg-test.rs index 573172349ac..340a2eec87a 100644 --- a/tests/rustdoc-ui/doctest/cfg-test.rs +++ b/tests/rustdoc-ui/doctest/cfg-test.rs @@ -1,7 +1,7 @@ //@ check-pass //@ compile-flags:--test --test-args --test-threads=1 -//@ normalize-stdout-test: "tests/rustdoc-ui/doctest" -> "$$DIR" -//@ normalize-stdout-test: "finished in \d+\.\d+s" -> "finished in $$TIME" +//@ normalize-stdout: "tests/rustdoc-ui/doctest" -> "$$DIR" +//@ normalize-stdout: "finished in \d+\.\d+s" -> "finished in $$TIME" // Crates like core have doctests gated on `cfg(not(test))` so we need to make // sure `cfg(test)` is not active when running `rustdoc --test`. diff --git a/tests/rustdoc-ui/doctest/check-cfg-test.rs b/tests/rustdoc-ui/doctest/check-cfg-test.rs index b3bff381d64..39fdb3a5853 100644 --- a/tests/rustdoc-ui/doctest/check-cfg-test.rs +++ b/tests/rustdoc-ui/doctest/check-cfg-test.rs @@ -1,8 +1,8 @@ //@ check-pass //@ compile-flags: --test --nocapture --check-cfg=cfg(feature,values("test")) -Z unstable-options -//@ normalize-stderr-test: "tests/rustdoc-ui/doctest" -> "$$DIR" -//@ normalize-stdout-test: "tests/rustdoc-ui/doctest" -> "$$DIR" -//@ normalize-stdout-test: "finished in \d+\.\d+s" -> "finished in $$TIME" +//@ normalize-stderr: "tests/rustdoc-ui/doctest" -> "$$DIR" +//@ normalize-stdout: "tests/rustdoc-ui/doctest" -> "$$DIR" +//@ normalize-stdout: "finished in \d+\.\d+s" -> "finished in $$TIME" /// The doctest will produce a warning because feature invalid is unexpected /// ``` diff --git a/tests/rustdoc-ui/doctest/comment-in-attr-134221-2.rs b/tests/rustdoc-ui/doctest/comment-in-attr-134221-2.rs index 8cdd665ff69..944939c8efe 100644 --- a/tests/rustdoc-ui/doctest/comment-in-attr-134221-2.rs +++ b/tests/rustdoc-ui/doctest/comment-in-attr-134221-2.rs @@ -1,8 +1,8 @@ //@ compile-flags:--test --test-args --test-threads=1 //@ failure-status: 101 -//@ normalize-stdout-test: "tests/rustdoc-ui/doctest" -> "$$DIR" -//@ normalize-stdout-test: "finished in \d+\.\d+s" -> "finished in $$TIME" -//@ normalize-stdout-test: ".rs:\d+:\d+" -> ".rs:$$LINE:$$COL" +//@ normalize-stdout: "tests/rustdoc-ui/doctest" -> "$$DIR" +//@ normalize-stdout: "finished in \d+\.\d+s" -> "finished in $$TIME" +//@ normalize-stdout: ".rs:\d+:\d+" -> ".rs:$$LINE:$$COL" //! ``` #![doc = "#![all\ diff --git a/tests/rustdoc-ui/doctest/comment-in-attr-134221.rs b/tests/rustdoc-ui/doctest/comment-in-attr-134221.rs index 3689ebe166a..2fbc8a21560 100644 --- a/tests/rustdoc-ui/doctest/comment-in-attr-134221.rs +++ b/tests/rustdoc-ui/doctest/comment-in-attr-134221.rs @@ -4,9 +4,9 @@ //@ compile-flags:--test --test-args --test-threads=1 //@ failure-status: 101 -//@ normalize-stdout-test: "tests/rustdoc-ui/doctest" -> "$$DIR" -//@ normalize-stdout-test: "finished in \d+\.\d+s" -> "finished in $$TIME" -//@ normalize-stdout-test: ".rs:\d+:\d+" -> ".rs:$$LINE:$$COL" +//@ normalize-stdout: "tests/rustdoc-ui/doctest" -> "$$DIR" +//@ normalize-stdout: "finished in \d+\.\d+s" -> "finished in $$TIME" +//@ normalize-stdout: ".rs:\d+:\d+" -> ".rs:$$LINE:$$COL" /*! ```rust diff --git a/tests/rustdoc-ui/doctest/dead-code-2024.rs b/tests/rustdoc-ui/doctest/dead-code-2024.rs index 41459c5e651..079d44570bb 100644 --- a/tests/rustdoc-ui/doctest/dead-code-2024.rs +++ b/tests/rustdoc-ui/doctest/dead-code-2024.rs @@ -2,8 +2,8 @@ //@ edition: 2024 //@ compile-flags:--test -//@ normalize-stdout-test: "tests/rustdoc-ui/doctest" -> "$$DIR" -//@ normalize-stdout-test: "finished in \d+\.\d+s" -> "finished in $$TIME" +//@ normalize-stdout: "tests/rustdoc-ui/doctest" -> "$$DIR" +//@ normalize-stdout: "finished in \d+\.\d+s" -> "finished in $$TIME" //@ failure-status: 101 #![doc(test(attr(allow(unused_variables), deny(warnings))))] diff --git a/tests/rustdoc-ui/doctest/dead-code.rs b/tests/rustdoc-ui/doctest/dead-code.rs index cb9b4c28f6c..1ea3e1d53ac 100644 --- a/tests/rustdoc-ui/doctest/dead-code.rs +++ b/tests/rustdoc-ui/doctest/dead-code.rs @@ -1,8 +1,8 @@ // This test ensures that the doctest will not use `#[allow(unused)]`. //@ compile-flags:--test -//@ normalize-stdout-test: "tests/rustdoc-ui/doctest" -> "$$DIR" -//@ normalize-stdout-test: "finished in \d+\.\d+s" -> "finished in $$TIME" +//@ normalize-stdout: "tests/rustdoc-ui/doctest" -> "$$DIR" +//@ normalize-stdout: "finished in \d+\.\d+s" -> "finished in $$TIME" //@ failure-status: 101 #![doc(test(attr(allow(unused_variables), deny(warnings))))] diff --git a/tests/rustdoc-ui/doctest/display-output.rs b/tests/rustdoc-ui/doctest/display-output.rs index 70d15ea6f8a..d5de341b696 100644 --- a/tests/rustdoc-ui/doctest/display-output.rs +++ b/tests/rustdoc-ui/doctest/display-output.rs @@ -3,8 +3,8 @@ //@ check-pass //@ edition:2018 //@ compile-flags:--test --test-args=--show-output -//@ normalize-stdout-test: "tests/rustdoc-ui/doctest" -> "$$DIR" -//@ normalize-stdout-test: "finished in \d+\.\d+s" -> "finished in $$TIME" +//@ normalize-stdout: "tests/rustdoc-ui/doctest" -> "$$DIR" +//@ normalize-stdout: "finished in \d+\.\d+s" -> "finished in $$TIME" /// ``` /// #![warn(unused)] diff --git a/tests/rustdoc-ui/doctest/doc-comment-multi-line-attr.rs b/tests/rustdoc-ui/doctest/doc-comment-multi-line-attr.rs index f95d6f82933..135ecca7ffd 100644 --- a/tests/rustdoc-ui/doctest/doc-comment-multi-line-attr.rs +++ b/tests/rustdoc-ui/doctest/doc-comment-multi-line-attr.rs @@ -1,7 +1,7 @@ // Regression test for #97440: Multiline inner attribute triggers ICE during doctest //@ compile-flags:--test -//@ normalize-stdout-test: "tests/rustdoc-ui/doctest" -> "$$DIR" -//@ normalize-stdout-test: "finished in \d+\.\d+s" -> "finished in $$TIME" +//@ normalize-stdout: "tests/rustdoc-ui/doctest" -> "$$DIR" +//@ normalize-stdout: "finished in \d+\.\d+s" -> "finished in $$TIME" //@ check-pass //! ```rust diff --git a/tests/rustdoc-ui/doctest/doc-comment-multi-line-cfg-attr.rs b/tests/rustdoc-ui/doctest/doc-comment-multi-line-cfg-attr.rs index 8cafadfdc82..16adb3c6c54 100644 --- a/tests/rustdoc-ui/doctest/doc-comment-multi-line-cfg-attr.rs +++ b/tests/rustdoc-ui/doctest/doc-comment-multi-line-cfg-attr.rs @@ -1,6 +1,6 @@ //@ compile-flags:--test -//@ normalize-stdout-test: "tests/rustdoc-ui/doctest" -> "$$DIR" -//@ normalize-stdout-test: "finished in \d+\.\d+s" -> "finished in $$TIME" +//@ normalize-stdout: "tests/rustdoc-ui/doctest" -> "$$DIR" +//@ normalize-stdout: "finished in \d+\.\d+s" -> "finished in $$TIME" //@ check-pass /// ``` diff --git a/tests/rustdoc-ui/doctest/doc-test-doctest-feature.rs b/tests/rustdoc-ui/doctest/doc-test-doctest-feature.rs index fca1f51ed21..9c2d200329a 100644 --- a/tests/rustdoc-ui/doctest/doc-test-doctest-feature.rs +++ b/tests/rustdoc-ui/doctest/doc-test-doctest-feature.rs @@ -1,7 +1,7 @@ //@ check-pass //@ compile-flags:--test -//@ normalize-stdout-test: "tests/rustdoc-ui/doctest" -> "$$DIR" -//@ normalize-stdout-test: "finished in \d+\.\d+s" -> "finished in $$TIME" +//@ normalize-stdout: "tests/rustdoc-ui/doctest" -> "$$DIR" +//@ normalize-stdout: "finished in \d+\.\d+s" -> "finished in $$TIME" // Make sure `cfg(doctest)` is set when finding doctests but not inside // the doctests. diff --git a/tests/rustdoc-ui/doctest/doc-test-rustdoc-feature.rs b/tests/rustdoc-ui/doctest/doc-test-rustdoc-feature.rs index 6d12d7af56a..dd04adfe617 100644 --- a/tests/rustdoc-ui/doctest/doc-test-rustdoc-feature.rs +++ b/tests/rustdoc-ui/doctest/doc-test-rustdoc-feature.rs @@ -1,7 +1,7 @@ //@ check-pass //@ compile-flags:--test -//@ normalize-stdout-test: "tests/rustdoc-ui/doctest" -> "$$DIR" -//@ normalize-stdout-test: "finished in \d+\.\d+s" -> "finished in $$TIME" +//@ normalize-stdout: "tests/rustdoc-ui/doctest" -> "$$DIR" +//@ normalize-stdout: "finished in \d+\.\d+s" -> "finished in $$TIME" #![feature(doc_cfg)] diff --git a/tests/rustdoc-ui/doctest/doctest-multiline-crate-attribute.rs b/tests/rustdoc-ui/doctest/doctest-multiline-crate-attribute.rs index b446492e472..1f80e002ef5 100644 --- a/tests/rustdoc-ui/doctest/doctest-multiline-crate-attribute.rs +++ b/tests/rustdoc-ui/doctest/doctest-multiline-crate-attribute.rs @@ -1,6 +1,6 @@ //@ compile-flags:--test --test-args=--test-threads=1 -//@ normalize-stdout-test: "tests/rustdoc-ui/doctest" -> "$$DIR" -//@ normalize-stdout-test: "finished in \d+\.\d+s" -> "finished in $$TIME" +//@ normalize-stdout: "tests/rustdoc-ui/doctest" -> "$$DIR" +//@ normalize-stdout: "finished in \d+\.\d+s" -> "finished in $$TIME" //@ check-pass /// ``` diff --git a/tests/rustdoc-ui/doctest/doctest-output-include-fail.rs b/tests/rustdoc-ui/doctest/doctest-output-include-fail.rs index 58612b682a0..a47bac3daef 100644 --- a/tests/rustdoc-ui/doctest/doctest-output-include-fail.rs +++ b/tests/rustdoc-ui/doctest/doctest-output-include-fail.rs @@ -1,7 +1,7 @@ //@ edition:2024 //@ compile-flags:--test --test-args=--test-threads=1 -//@ normalize-stdout-test: "tests/rustdoc-ui/doctest" -> "$$DIR" -//@ normalize-stdout-test: "finished in \d+\.\d+s" -> "finished in $$TIME" +//@ normalize-stdout: "tests/rustdoc-ui/doctest" -> "$$DIR" +//@ normalize-stdout: "finished in \d+\.\d+s" -> "finished in $$TIME" //@ failure-status: 101 // https://github.com/rust-lang/rust/issues/130470 diff --git a/tests/rustdoc-ui/doctest/doctest-output.rs b/tests/rustdoc-ui/doctest/doctest-output.rs index 946bc550b12..fb4ab068000 100644 --- a/tests/rustdoc-ui/doctest/doctest-output.rs +++ b/tests/rustdoc-ui/doctest/doctest-output.rs @@ -5,8 +5,8 @@ //@[edition2024]edition:2015 //@[edition2024]aux-build:extern_macros.rs //@[edition2024]compile-flags:--test --test-args=--test-threads=1 -//@ normalize-stdout-test: "tests/rustdoc-ui/doctest" -> "$$DIR" -//@ normalize-stdout-test: "finished in \d+\.\d+s" -> "finished in $$TIME" +//@ normalize-stdout: "tests/rustdoc-ui/doctest" -> "$$DIR" +//@ normalize-stdout: "finished in \d+\.\d+s" -> "finished in $$TIME" //@ check-pass //! ``` diff --git a/tests/rustdoc-ui/doctest/failed-doctest-compile-fail.rs b/tests/rustdoc-ui/doctest/failed-doctest-compile-fail.rs index 4d0e035f86e..6f7b2672b56 100644 --- a/tests/rustdoc-ui/doctest/failed-doctest-compile-fail.rs +++ b/tests/rustdoc-ui/doctest/failed-doctest-compile-fail.rs @@ -2,8 +2,8 @@ // adapted to use that, and that normalize line can go away //@ compile-flags:--test -//@ normalize-stdout-test: "tests/rustdoc-ui/doctest" -> "$$DIR" -//@ normalize-stdout-test: "finished in \d+\.\d+s" -> "finished in $$TIME" +//@ normalize-stdout: "tests/rustdoc-ui/doctest" -> "$$DIR" +//@ normalize-stdout: "finished in \d+\.\d+s" -> "finished in $$TIME" //@ failure-status: 101 /// ```compile_fail diff --git a/tests/rustdoc-ui/doctest/failed-doctest-extra-semicolon-on-item.rs b/tests/rustdoc-ui/doctest/failed-doctest-extra-semicolon-on-item.rs index b65ef432705..508faadcf67 100644 --- a/tests/rustdoc-ui/doctest/failed-doctest-extra-semicolon-on-item.rs +++ b/tests/rustdoc-ui/doctest/failed-doctest-extra-semicolon-on-item.rs @@ -2,8 +2,8 @@ // adapted to use that, and that normalize line can go away //@ compile-flags:--test -//@ normalize-stdout-test: "tests/rustdoc-ui/doctest" -> "$$DIR" -//@ normalize-stdout-test: "finished in \d+\.\d+s" -> "finished in $$TIME" +//@ normalize-stdout: "tests/rustdoc-ui/doctest" -> "$$DIR" +//@ normalize-stdout: "finished in \d+\.\d+s" -> "finished in $$TIME" //@ failure-status: 101 /// <https://github.com/rust-lang/rust/issues/91014> diff --git a/tests/rustdoc-ui/doctest/failed-doctest-missing-codes.rs b/tests/rustdoc-ui/doctest/failed-doctest-missing-codes.rs index 766d9486143..ded674bf18a 100644 --- a/tests/rustdoc-ui/doctest/failed-doctest-missing-codes.rs +++ b/tests/rustdoc-ui/doctest/failed-doctest-missing-codes.rs @@ -2,8 +2,8 @@ // adapted to use that, and that normalize line can go away //@ compile-flags:--test -//@ normalize-stdout-test: "tests/rustdoc-ui/doctest" -> "$$DIR" -//@ normalize-stdout-test: "finished in \d+\.\d+s" -> "finished in $$TIME" +//@ normalize-stdout: "tests/rustdoc-ui/doctest" -> "$$DIR" +//@ normalize-stdout: "finished in \d+\.\d+s" -> "finished in $$TIME" //@ failure-status: 101 /// ```compile_fail,E0004 diff --git a/tests/rustdoc-ui/doctest/failed-doctest-output-windows.rs b/tests/rustdoc-ui/doctest/failed-doctest-output-windows.rs index cf0d8b9daa1..3a08faf626f 100644 --- a/tests/rustdoc-ui/doctest/failed-doctest-output-windows.rs +++ b/tests/rustdoc-ui/doctest/failed-doctest-output-windows.rs @@ -7,8 +7,8 @@ //@ compile-flags:--test --test-args --test-threads=1 //@ rustc-env:RUST_BACKTRACE=0 -//@ normalize-stdout-test: "tests/rustdoc-ui/doctest" -> "$$DIR" -//@ normalize-stdout-test: "finished in \d+\.\d+s" -> "finished in $$TIME" +//@ normalize-stdout: "tests/rustdoc-ui/doctest" -> "$$DIR" +//@ normalize-stdout: "finished in \d+\.\d+s" -> "finished in $$TIME" //@ failure-status: 101 // doctest fails at runtime diff --git a/tests/rustdoc-ui/doctest/failed-doctest-output.rs b/tests/rustdoc-ui/doctest/failed-doctest-output.rs index 160796065f3..84c72268881 100644 --- a/tests/rustdoc-ui/doctest/failed-doctest-output.rs +++ b/tests/rustdoc-ui/doctest/failed-doctest-output.rs @@ -7,8 +7,8 @@ //@ compile-flags:--test --test-args --test-threads=1 //@ rustc-env:RUST_BACKTRACE=0 -//@ normalize-stdout-test: "tests/rustdoc-ui/doctest" -> "$$DIR" -//@ normalize-stdout-test: "finished in \d+\.\d+s" -> "finished in $$TIME" +//@ normalize-stdout: "tests/rustdoc-ui/doctest" -> "$$DIR" +//@ normalize-stdout: "finished in \d+\.\d+s" -> "finished in $$TIME" //@ failure-status: 101 // doctest fails at runtime diff --git a/tests/rustdoc-ui/doctest/failed-doctest-should-panic-2021.rs b/tests/rustdoc-ui/doctest/failed-doctest-should-panic-2021.rs index 4fe513b4066..d8c43100d2f 100644 --- a/tests/rustdoc-ui/doctest/failed-doctest-should-panic-2021.rs +++ b/tests/rustdoc-ui/doctest/failed-doctest-should-panic-2021.rs @@ -2,8 +2,8 @@ // adapted to use that, and that normalize line can go away //@ compile-flags:--test --edition 2021 -//@ normalize-stdout-test: "tests/rustdoc-ui/doctest" -> "$$DIR" -//@ normalize-stdout-test: "finished in \d+\.\d+s" -> "finished in $$TIME" +//@ normalize-stdout: "tests/rustdoc-ui/doctest" -> "$$DIR" +//@ normalize-stdout: "finished in \d+\.\d+s" -> "finished in $$TIME" //@ failure-status: 101 /// ```should_panic diff --git a/tests/rustdoc-ui/doctest/failed-doctest-should-panic.rs b/tests/rustdoc-ui/doctest/failed-doctest-should-panic.rs index d057218688c..793f8654661 100644 --- a/tests/rustdoc-ui/doctest/failed-doctest-should-panic.rs +++ b/tests/rustdoc-ui/doctest/failed-doctest-should-panic.rs @@ -3,8 +3,8 @@ //@ edition: 2024 //@ compile-flags:--test -//@ normalize-stdout-test: "tests/rustdoc-ui/doctest" -> "$$DIR" -//@ normalize-stdout-test: "finished in \d+\.\d+s" -> "finished in $$TIME" +//@ normalize-stdout: "tests/rustdoc-ui/doctest" -> "$$DIR" +//@ normalize-stdout: "finished in \d+\.\d+s" -> "finished in $$TIME" //@ failure-status: 101 /// ```should_panic diff --git a/tests/rustdoc-ui/doctest/merged-ignore-no_run.rs b/tests/rustdoc-ui/doctest/merged-ignore-no_run.rs index 754791361e8..7dac64e6de4 100644 --- a/tests/rustdoc-ui/doctest/merged-ignore-no_run.rs +++ b/tests/rustdoc-ui/doctest/merged-ignore-no_run.rs @@ -1,7 +1,7 @@ //@ edition: 2024 //@ compile-flags:--test --test-args=--test-threads=1 -//@ normalize-stdout-test: "tests/rustdoc-ui/doctest" -> "$$DIR" -//@ normalize-stdout-test: "finished in \d+\.\d+s" -> "finished in $$TIME" +//@ normalize-stdout: "tests/rustdoc-ui/doctest" -> "$$DIR" +//@ normalize-stdout: "finished in \d+\.\d+s" -> "finished in $$TIME" //@ check-pass /// ```ignore (test) diff --git a/tests/rustdoc-ui/doctest/nested-main.rs b/tests/rustdoc-ui/doctest/nested-main.rs index e939ba81214..d1b3bd6da40 100644 --- a/tests/rustdoc-ui/doctest/nested-main.rs +++ b/tests/rustdoc-ui/doctest/nested-main.rs @@ -1,7 +1,7 @@ //@ check-pass //@ compile-flags:--test --test-args=--test-threads=1 -//@ normalize-stdout-test: "tests/rustdoc-ui/doctest" -> "$$DIR" -//@ normalize-stdout-test: "finished in \d+\.\d+s" -> "finished in $$TIME" +//@ normalize-stdout: "tests/rustdoc-ui/doctest" -> "$$DIR" +//@ normalize-stdout: "finished in \d+\.\d+s" -> "finished in $$TIME" // Regression test for <https://github.com/rust-lang/rust/issues/131893>. // It ensures that if a function called `main` is nested, it will not consider diff --git a/tests/rustdoc-ui/doctest/no-run-flag.rs b/tests/rustdoc-ui/doctest/no-run-flag.rs index 0f7a0a175f1..8f1381e0760 100644 --- a/tests/rustdoc-ui/doctest/no-run-flag.rs +++ b/tests/rustdoc-ui/doctest/no-run-flag.rs @@ -2,8 +2,8 @@ //@ check-pass //@ compile-flags:-Z unstable-options --test --no-run --test-args=--test-threads=1 -//@ normalize-stdout-test: "tests/rustdoc-ui/doctest" -> "$$DIR" -//@ normalize-stdout-test: "finished in \d+\.\d+s" -> "finished in $$TIME" +//@ normalize-stdout: "tests/rustdoc-ui/doctest" -> "$$DIR" +//@ normalize-stdout: "finished in \d+\.\d+s" -> "finished in $$TIME" /// ``` /// let a = true; diff --git a/tests/rustdoc-ui/doctest/nocapture-fail.rs b/tests/rustdoc-ui/doctest/nocapture-fail.rs index db4062e8494..8c64a49f650 100644 --- a/tests/rustdoc-ui/doctest/nocapture-fail.rs +++ b/tests/rustdoc-ui/doctest/nocapture-fail.rs @@ -1,8 +1,8 @@ //@ check-pass //@ compile-flags:--test -Zunstable-options --nocapture -//@ normalize-stderr-test: "tests/rustdoc-ui/doctest" -> "$$DIR" -//@ normalize-stdout-test: "tests/rustdoc-ui/doctest" -> "$$DIR" -//@ normalize-stdout-test: "finished in \d+\.\d+s" -> "finished in $$TIME" +//@ normalize-stderr: "tests/rustdoc-ui/doctest" -> "$$DIR" +//@ normalize-stdout: "tests/rustdoc-ui/doctest" -> "$$DIR" +//@ normalize-stdout: "finished in \d+\.\d+s" -> "finished in $$TIME" /// ```compile_fail /// fn foo() { diff --git a/tests/rustdoc-ui/doctest/nocapture.rs b/tests/rustdoc-ui/doctest/nocapture.rs index 3b87dad49f9..c4360341864 100644 --- a/tests/rustdoc-ui/doctest/nocapture.rs +++ b/tests/rustdoc-ui/doctest/nocapture.rs @@ -1,7 +1,7 @@ //@ check-pass //@ compile-flags:--test -Zunstable-options --nocapture -//@ normalize-stdout-test: "tests/rustdoc-ui/doctest" -> "$$DIR" -//@ normalize-stdout-test: "finished in \d+\.\d+s" -> "finished in $$TIME" +//@ normalize-stdout: "tests/rustdoc-ui/doctest" -> "$$DIR" +//@ normalize-stdout: "finished in \d+\.\d+s" -> "finished in $$TIME" /// ``` /// println!("hello!"); diff --git a/tests/rustdoc-ui/doctest/non-local-defs-impl.rs b/tests/rustdoc-ui/doctest/non-local-defs-impl.rs index b1ab5323a2b..04fdd285506 100644 --- a/tests/rustdoc-ui/doctest/non-local-defs-impl.rs +++ b/tests/rustdoc-ui/doctest/non-local-defs-impl.rs @@ -3,8 +3,8 @@ //@ failure-status: 101 //@ aux-build:pub_trait.rs //@ compile-flags: --test --test-args --test-threads=1 -//@ normalize-stdout-test: "tests/rustdoc-ui/doctest" -> "$$DIR" -//@ normalize-stdout-test: "finished in \d+\.\d+s" -> "finished in $$TIME" +//@ normalize-stdout: "tests/rustdoc-ui/doctest" -> "$$DIR" +//@ normalize-stdout: "finished in \d+\.\d+s" -> "finished in $$TIME" #![doc(test(attr(deny(non_local_definitions))))] #![doc(test(attr(allow(dead_code))))] diff --git a/tests/rustdoc-ui/doctest/non_local_defs.rs b/tests/rustdoc-ui/doctest/non_local_defs.rs index a2f66c39223..ce65ad2cf72 100644 --- a/tests/rustdoc-ui/doctest/non_local_defs.rs +++ b/tests/rustdoc-ui/doctest/non_local_defs.rs @@ -1,8 +1,8 @@ //@ check-pass //@ compile-flags:--test --test-args --test-threads=1 --nocapture -Zunstable-options -//@ normalize-stdout-test: "tests/rustdoc-ui/doctest" -> "$$DIR" -//@ normalize-stderr-test: "tests/rustdoc-ui/doctest" -> "$$DIR" -//@ normalize-stdout-test: "finished in \d+\.\d+s" -> "finished in $$TIME" +//@ normalize-stdout: "tests/rustdoc-ui/doctest" -> "$$DIR" +//@ normalize-stderr: "tests/rustdoc-ui/doctest" -> "$$DIR" +//@ normalize-stdout: "finished in \d+\.\d+s" -> "finished in $$TIME" //! ``` //! #[macro_export] diff --git a/tests/rustdoc-ui/doctest/relative-path-include-bytes-132203.rs b/tests/rustdoc-ui/doctest/relative-path-include-bytes-132203.rs index 5a1d4d0a60d..5c9e2978e48 100644 --- a/tests/rustdoc-ui/doctest/relative-path-include-bytes-132203.rs +++ b/tests/rustdoc-ui/doctest/relative-path-include-bytes-132203.rs @@ -7,8 +7,8 @@ //@[edition2024]edition:2024 //@[edition2024]check-pass //@[edition2024]compile-flags:--test --test-args=--test-threads=1 -//@ normalize-stdout-test: "tests/rustdoc-ui/doctest" -> "$$DIR" -//@ normalize-stdout-test: "finished in \d+\.\d+s" -> "finished in $$TIME" +//@ normalize-stdout: "tests/rustdoc-ui/doctest" -> "$$DIR" +//@ normalize-stdout: "finished in \d+\.\d+s" -> "finished in $$TIME" // https://github.com/rust-lang/rust/issues/132203 // This version, because it's edition2024, passes thanks to the new diff --git a/tests/rustdoc-ui/doctest/run-directory.rs b/tests/rustdoc-ui/doctest/run-directory.rs index 0e3a30ba461..090bd19c4d9 100644 --- a/tests/rustdoc-ui/doctest/run-directory.rs +++ b/tests/rustdoc-ui/doctest/run-directory.rs @@ -4,8 +4,8 @@ //@ check-pass //@ [correct]compile-flags:--test --test-run-directory={{src-base}} //@ [incorrect]compile-flags:--test --test-run-directory={{src-base}}/coverage -//@ normalize-stdout-test: "tests/rustdoc-ui/doctest" -> "$$DIR" -//@ normalize-stdout-test: "finished in \d+\.\d+s" -> "finished in $$TIME" +//@ normalize-stdout: "tests/rustdoc-ui/doctest" -> "$$DIR" +//@ normalize-stdout: "finished in \d+\.\d+s" -> "finished in $$TIME" /// ``` /// assert_eq!( diff --git a/tests/rustdoc-ui/doctest/rustflags-multiple-args.rs b/tests/rustdoc-ui/doctest/rustflags-multiple-args.rs index 8519920e53b..8d8c60ede58 100644 --- a/tests/rustdoc-ui/doctest/rustflags-multiple-args.rs +++ b/tests/rustdoc-ui/doctest/rustflags-multiple-args.rs @@ -4,8 +4,8 @@ //@ check-pass //@ compile-flags: --test -Zunstable-options --doctest-compilation-args=--cfg=testcase_must_be_present //@ compile-flags: --doctest-compilation-args=--cfg=another -//@ normalize-stdout-test: "tests/rustdoc-ui/doctest" -> "$$DIR" -//@ normalize-stdout-test: "finished in \d+\.\d+s" -> "finished in $$TIME" +//@ normalize-stdout: "tests/rustdoc-ui/doctest" -> "$$DIR" +//@ normalize-stdout: "finished in \d+\.\d+s" -> "finished in $$TIME" /// ``` /// #[cfg(testcase_must_be_present)] diff --git a/tests/rustdoc-ui/doctest/rustflags.rs b/tests/rustdoc-ui/doctest/rustflags.rs index fa460e35547..9f1e6017ea1 100644 --- a/tests/rustdoc-ui/doctest/rustflags.rs +++ b/tests/rustdoc-ui/doctest/rustflags.rs @@ -1,7 +1,7 @@ //@ check-pass //@ compile-flags: --test -Zunstable-options --doctest-compilation-args=--cfg=testcase_must_be_present -//@ normalize-stdout-test: "tests/rustdoc-ui/doctest" -> "$$DIR" -//@ normalize-stdout-test: "finished in \d+\.\d+s" -> "finished in $$TIME" +//@ normalize-stdout: "tests/rustdoc-ui/doctest" -> "$$DIR" +//@ normalize-stdout: "finished in \d+\.\d+s" -> "finished in $$TIME" /// ``` /// #[cfg(testcase_must_be_present)] diff --git a/tests/rustdoc-ui/doctest/standalone-warning-2024.rs b/tests/rustdoc-ui/doctest/standalone-warning-2024.rs index 35d1c738bb1..c53a8b48749 100644 --- a/tests/rustdoc-ui/doctest/standalone-warning-2024.rs +++ b/tests/rustdoc-ui/doctest/standalone-warning-2024.rs @@ -2,9 +2,9 @@ //@ edition: 2024 //@ compile-flags:--test -//@ normalize-stdout-test: "tests/rustdoc-ui/doctest" -> "$$DIR" -//@ normalize-stdout-test: "finished in \d+\.\d+s" -> "finished in $$TIME" -//@ normalize-stdout-test: ".rs:\d+:\d+" -> ".rs:$$LINE:$$COL" +//@ normalize-stdout: "tests/rustdoc-ui/doctest" -> "$$DIR" +//@ normalize-stdout: "finished in \d+\.\d+s" -> "finished in $$TIME" +//@ normalize-stdout: ".rs:\d+:\d+" -> ".rs:$$LINE:$$COL" #![deny(warnings)] diff --git a/tests/rustdoc-ui/doctest/test-no_std.rs b/tests/rustdoc-ui/doctest/test-no_std.rs index b8af892552d..9abfa4a3728 100644 --- a/tests/rustdoc-ui/doctest/test-no_std.rs +++ b/tests/rustdoc-ui/doctest/test-no_std.rs @@ -1,6 +1,6 @@ //@ compile-flags:--test -//@ normalize-stdout-test: "tests/rustdoc-ui/doctest" -> "$$DIR" -//@ normalize-stdout-test: "finished in \d+\.\d+s" -> "finished in $$TIME" +//@ normalize-stdout: "tests/rustdoc-ui/doctest" -> "$$DIR" +//@ normalize-stdout: "finished in \d+\.\d+s" -> "finished in $$TIME" //@ check-pass #![no_std] diff --git a/tests/rustdoc-ui/doctest/test-type.rs b/tests/rustdoc-ui/doctest/test-type.rs index 846a98a853b..28c862fb69b 100644 --- a/tests/rustdoc-ui/doctest/test-type.rs +++ b/tests/rustdoc-ui/doctest/test-type.rs @@ -1,7 +1,7 @@ //@ compile-flags: --test --test-args=--test-threads=1 //@ check-pass -//@ normalize-stdout-test: "tests/rustdoc-ui/doctest" -> "$$DIR" -//@ normalize-stdout-test: "finished in \d+\.\d+s" -> "finished in $$TIME" +//@ normalize-stdout: "tests/rustdoc-ui/doctest" -> "$$DIR" +//@ normalize-stdout: "finished in \d+\.\d+s" -> "finished in $$TIME" /// ``` /// let a = true; diff --git a/tests/rustdoc-ui/doctest/unparseable-doc-test.rs b/tests/rustdoc-ui/doctest/unparseable-doc-test.rs index 43acfa6de3f..d90e152aada 100644 --- a/tests/rustdoc-ui/doctest/unparseable-doc-test.rs +++ b/tests/rustdoc-ui/doctest/unparseable-doc-test.rs @@ -1,6 +1,6 @@ //@ compile-flags: --test -//@ normalize-stdout-test: "tests/rustdoc-ui/doctest" -> "$$DIR" -//@ normalize-stdout-test: "finished in \d+\.\d+s" -> "finished in $$TIME" +//@ normalize-stdout: "tests/rustdoc-ui/doctest" -> "$$DIR" +//@ normalize-stdout: "finished in \d+\.\d+s" -> "finished in $$TIME" //@ failure-status: 101 //@ rustc-env: RUST_BACKTRACE=0 diff --git a/tests/rustdoc-ui/doctest/wrong-ast-2024.rs b/tests/rustdoc-ui/doctest/wrong-ast-2024.rs index a1455c01bc6..3b4fb3f3443 100644 --- a/tests/rustdoc-ui/doctest/wrong-ast-2024.rs +++ b/tests/rustdoc-ui/doctest/wrong-ast-2024.rs @@ -1,8 +1,8 @@ //@ edition: 2024 //@ compile-flags:--test --test-args=--test-threads=1 -//@ normalize-stdout-test: "tests/rustdoc-ui/doctest" -> "$$DIR" -//@ normalize-stdout-test: "finished in \d+\.\d+s" -> "finished in $$TIME" -//@ normalize-stdout-test: ".rs:\d+:\d+" -> ".rs:$$LINE:$$COL" +//@ normalize-stdout: "tests/rustdoc-ui/doctest" -> "$$DIR" +//@ normalize-stdout: "finished in \d+\.\d+s" -> "finished in $$TIME" +//@ normalize-stdout: ".rs:\d+:\d+" -> ".rs:$$LINE:$$COL" //@ failure-status: 101 /// ``` diff --git a/tests/rustdoc-ui/doctest/wrong-ast.rs b/tests/rustdoc-ui/doctest/wrong-ast.rs index 92286b33dcf..be8f5417586 100644 --- a/tests/rustdoc-ui/doctest/wrong-ast.rs +++ b/tests/rustdoc-ui/doctest/wrong-ast.rs @@ -1,6 +1,6 @@ //@ compile-flags:--test --test-args=--test-threads=1 -//@ normalize-stdout-test: "tests/rustdoc-ui/doctest" -> "$$DIR" -//@ normalize-stdout-test: "finished in \d+\.\d+s" -> "finished in $$TIME" +//@ normalize-stdout: "tests/rustdoc-ui/doctest" -> "$$DIR" +//@ normalize-stdout: "finished in \d+\.\d+s" -> "finished in $$TIME" //@ failure-status: 101 /// ``` diff --git a/tests/rustdoc-ui/error-in-impl-trait/infinite-recursive-type-impl-trait-return.rs b/tests/rustdoc-ui/error-in-impl-trait/infinite-recursive-type-impl-trait-return.rs index dfa528acb26..032da8f53f0 100644 --- a/tests/rustdoc-ui/error-in-impl-trait/infinite-recursive-type-impl-trait-return.rs +++ b/tests/rustdoc-ui/error-in-impl-trait/infinite-recursive-type-impl-trait-return.rs @@ -1,5 +1,5 @@ -//@ normalize-stderr-test: "`.*`" -> "`DEF_ID`" -//@ normalize-stdout-test: "`.*`" -> "`DEF_ID`" +//@ normalize-stderr: "`.*`" -> "`DEF_ID`" +//@ normalize-stdout: "`.*`" -> "`DEF_ID`" //@ edition:2018 pub async fn f() -> impl std::fmt::Debug { diff --git a/tests/rustdoc-ui/ice-bug-report-url.rs b/tests/rustdoc-ui/ice-bug-report-url.rs index f270340e07e..9260644e44f 100644 --- a/tests/rustdoc-ui/ice-bug-report-url.rs +++ b/tests/rustdoc-ui/ice-bug-report-url.rs @@ -4,12 +4,12 @@ //@ error-pattern: aborting due to //@ error-pattern: we would appreciate a bug report: https://github.com/rust-lang/rust/issues/new?labels=C-bug%2C+I-ICE%2C+T-rustdoc&template=ice.md -//@ normalize-stderr-test: "note: compiler flags.*\n\n" -> "" -//@ normalize-stderr-test: "note: rustc.*running on.*" -> "note: rustc {version} running on {platform}" -//@ normalize-stderr-test: "thread.*panicked at compiler.*" -> "" -//@ normalize-stderr-test: " +\d{1,}: .*\n" -> "" -//@ normalize-stderr-test: " + at .*\n" -> "" -//@ normalize-stderr-test: ".*note: Some details are omitted.*\n" -> "" +//@ normalize-stderr: "note: compiler flags.*\n\n" -> "" +//@ normalize-stderr: "note: rustc.*running on.*" -> "note: rustc {version} running on {platform}" +//@ normalize-stderr: "thread.*panicked at compiler.*" -> "" +//@ normalize-stderr: " +\d{1,}: .*\n" -> "" +//@ normalize-stderr: " + at .*\n" -> "" +//@ normalize-stderr: ".*note: Some details are omitted.*\n" -> "" fn wrong() //~^ ERROR expected one of diff --git a/tests/rustdoc-ui/intra-doc/email-address-localhost.rs b/tests/rustdoc-ui/intra-doc/email-address-localhost.rs index adef39527eb..3faff8a3cca 100644 --- a/tests/rustdoc-ui/intra-doc/email-address-localhost.rs +++ b/tests/rustdoc-ui/intra-doc/email-address-localhost.rs @@ -1,4 +1,4 @@ -//@ normalize-stderr-test: "nightly|beta|1\.[0-9][0-9]\.[0-9]" -> "$$CHANNEL" +//@ normalize-stderr: "nightly|beta|1\.[0-9][0-9]\.[0-9]" -> "$$CHANNEL" //@ check-pass #![deny(warnings)] diff --git a/tests/rustdoc-ui/intra-doc/unknown-disambiguator.rs b/tests/rustdoc-ui/intra-doc/unknown-disambiguator.rs index 68b818e32b3..86b31cb14d8 100644 --- a/tests/rustdoc-ui/intra-doc/unknown-disambiguator.rs +++ b/tests/rustdoc-ui/intra-doc/unknown-disambiguator.rs @@ -1,4 +1,4 @@ -//@ normalize-stderr-test: "nightly|beta|1\.[0-9][0-9]\.[0-9]" -> "$$CHANNEL" +//@ normalize-stderr: "nightly|beta|1\.[0-9][0-9]\.[0-9]" -> "$$CHANNEL" #![deny(warnings)] //! Linking to [foo@banana] and [`bar@banana!()`]. diff --git a/tests/rustdoc-ui/issues/issue-80992.rs b/tests/rustdoc-ui/issues/issue-80992.rs index 31cc8b78ecc..c328ac53e53 100644 --- a/tests/rustdoc-ui/issues/issue-80992.rs +++ b/tests/rustdoc-ui/issues/issue-80992.rs @@ -1,7 +1,7 @@ //@ check-pass //@ compile-flags:--test -//@ normalize-stdout-test: "tests/rustdoc-ui/issues" -> "$$DIR" -//@ normalize-stdout-test: "finished in \d+\.\d+s" -> "finished in $$TIME" +//@ normalize-stdout: "tests/rustdoc-ui/issues" -> "$$DIR" +//@ normalize-stdout: "finished in \d+\.\d+s" -> "finished in $$TIME" pub fn test() -> Result<(), ()> { //! ```compile_fail diff --git a/tests/rustdoc-ui/issues/issue-81662-shortness.rs b/tests/rustdoc-ui/issues/issue-81662-shortness.rs index 7df63261ce7..8719442c34f 100644 --- a/tests/rustdoc-ui/issues/issue-81662-shortness.rs +++ b/tests/rustdoc-ui/issues/issue-81662-shortness.rs @@ -1,8 +1,8 @@ //@ compile-flags:--test --error-format=short //@ check-stdout //@ error-pattern:cannot find function `foo` -//@ normalize-stdout-test: "tests/rustdoc-ui/issues" -> "$$DIR" -//@ normalize-stdout-test: "finished in \d+\.\d+s" -> "finished in $$TIME" +//@ normalize-stdout: "tests/rustdoc-ui/issues" -> "$$DIR" +//@ normalize-stdout: "finished in \d+\.\d+s" -> "finished in $$TIME" //@ failure-status: 101 /// ```rust diff --git a/tests/rustdoc-ui/issues/issue-83883-describe-lints.rs b/tests/rustdoc-ui/issues/issue-83883-describe-lints.rs index a7b1c734d7f..35d2fda4585 100644 --- a/tests/rustdoc-ui/issues/issue-83883-describe-lints.rs +++ b/tests/rustdoc-ui/issues/issue-83883-describe-lints.rs @@ -6,5 +6,5 @@ // // ignore-tidy-linelength // -//@ normalize-stdout-test: "( +name default meaning\n +---- ------- -------\n)?( *[[:word:]:-]+ (allow |warn |deny |forbid ) [^\n]+\n)+" -> " $$NAMES $$LEVELS $$MEANINGS" -//@ normalize-stdout-test: " +name sub-lints\n +---- ---------\n( *[[:word:]:-]+ [^\n]+\n)+" -> " $$NAMES $$SUB_LINTS" +//@ normalize-stdout: "( +name default meaning\n +---- ------- -------\n)?( *[[:word:]:-]+ (allow |warn |deny |forbid ) [^\n]+\n)+" -> " $$NAMES $$LEVELS $$MEANINGS" +//@ normalize-stdout: " +name sub-lints\n +---- ---------\n( *[[:word:]:-]+ [^\n]+\n)+" -> " $$NAMES $$SUB_LINTS" diff --git a/tests/rustdoc-ui/issues/issue-91134.rs b/tests/rustdoc-ui/issues/issue-91134.rs index 6b1fec957ea..1c53ecfeb8b 100644 --- a/tests/rustdoc-ui/issues/issue-91134.rs +++ b/tests/rustdoc-ui/issues/issue-91134.rs @@ -1,8 +1,8 @@ //@ compile-flags: --test --crate-name=empty_fn --extern=empty_fn --test-args=--test-threads=1 //@ aux-build:empty-fn.rs //@ check-pass -//@ normalize-stdout-test: "tests/rustdoc-ui/issues" -> "$$DIR" -//@ normalize-stdout-test: "finished in \d+\.\d+s" -> "finished in $$TIME" +//@ normalize-stdout: "tests/rustdoc-ui/issues" -> "$$DIR" +//@ normalize-stdout: "finished in \d+\.\d+s" -> "finished in $$TIME" //@ edition:2021 /// <https://github.com/rust-lang/rust/issues/91134> diff --git a/tests/rustdoc-ui/lints/check.rs b/tests/rustdoc-ui/lints/check.rs index 058c5d6c468..61c9f188952 100644 --- a/tests/rustdoc-ui/lints/check.rs +++ b/tests/rustdoc-ui/lints/check.rs @@ -1,6 +1,6 @@ //@ check-pass //@ compile-flags: -Z unstable-options --check -//@ normalize-stderr-test: "nightly|beta|1\.[0-9][0-9]\.[0-9]" -> "$$CHANNEL" +//@ normalize-stderr: "nightly|beta|1\.[0-9][0-9]\.[0-9]" -> "$$CHANNEL" #![feature(rustdoc_missing_doc_code_examples)] //~^ WARN diff --git a/tests/rustdoc-ui/lints/no-crate-level-doc-lint.rs b/tests/rustdoc-ui/lints/no-crate-level-doc-lint.rs index 12d4892d36a..6e631061e8a 100644 --- a/tests/rustdoc-ui/lints/no-crate-level-doc-lint.rs +++ b/tests/rustdoc-ui/lints/no-crate-level-doc-lint.rs @@ -1,5 +1,5 @@ //@ error-pattern: no documentation found -//@ normalize-stderr-test: "nightly|beta|1\.[0-9][0-9]\.[0-9]" -> "$$CHANNEL" +//@ normalize-stderr: "nightly|beta|1\.[0-9][0-9]\.[0-9]" -> "$$CHANNEL" #![deny(rustdoc::missing_crate_level_docs)] //^~ NOTE defined here diff --git a/tests/rustdoc-ui/remap-path-prefix-failed-doctest-output.rs b/tests/rustdoc-ui/remap-path-prefix-failed-doctest-output.rs index 57c0c1af031..72c3330709a 100644 --- a/tests/rustdoc-ui/remap-path-prefix-failed-doctest-output.rs +++ b/tests/rustdoc-ui/remap-path-prefix-failed-doctest-output.rs @@ -4,8 +4,8 @@ //@ failure-status: 101 //@ compile-flags:--test -Z unstable-options --remap-path-prefix={{src-base}}=remapped_path --test-args --test-threads=1 //@ rustc-env:RUST_BACKTRACE=0 -//@ normalize-stdout-test: "finished in \d+\.\d+s" -> "finished in $$TIME" -//@ normalize-stdout-test: "exit (status|code): 101" -> "exit status: 101" +//@ normalize-stdout: "finished in \d+\.\d+s" -> "finished in $$TIME" +//@ normalize-stdout: "exit (status|code): 101" -> "exit status: 101" // doctest fails at runtime /// ``` diff --git a/tests/rustdoc-ui/remap-path-prefix-invalid-doctest.rs b/tests/rustdoc-ui/remap-path-prefix-invalid-doctest.rs index 96a79e85f6b..c18a416d43f 100644 --- a/tests/rustdoc-ui/remap-path-prefix-invalid-doctest.rs +++ b/tests/rustdoc-ui/remap-path-prefix-invalid-doctest.rs @@ -4,7 +4,7 @@ //@ failure-status: 101 //@ compile-flags:--test -Z unstable-options --remap-path-prefix={{src-base}}=remapped_path --test-args --test-threads=1 //@ rustc-env:RUST_BACKTRACE=0 -//@ normalize-stdout-test: "finished in \d+\.\d+s" -> "finished in $$TIME" +//@ normalize-stdout: "finished in \d+\.\d+s" -> "finished in $$TIME" // doctest fails to compile /// ``` diff --git a/tests/rustdoc-ui/remap-path-prefix-passed-doctest-output.rs b/tests/rustdoc-ui/remap-path-prefix-passed-doctest-output.rs index 4c61c43578c..6fa04ef77f3 100644 --- a/tests/rustdoc-ui/remap-path-prefix-passed-doctest-output.rs +++ b/tests/rustdoc-ui/remap-path-prefix-passed-doctest-output.rs @@ -5,7 +5,7 @@ // adapted to use that, and that normalize line can go away //@ compile-flags:--test -Z unstable-options --remap-path-prefix={{src-base}}=remapped_path --test-args --test-threads=1 -//@ normalize-stdout-test: "finished in \d+\.\d+s" -> "finished in $$TIME" +//@ normalize-stdout: "finished in \d+\.\d+s" -> "finished in $$TIME" // doctest passes at runtime /// ``` diff --git a/tests/rustdoc-ui/track-diagnostics.rs b/tests/rustdoc-ui/track-diagnostics.rs index 403b8c78917..5c950a11082 100644 --- a/tests/rustdoc-ui/track-diagnostics.rs +++ b/tests/rustdoc-ui/track-diagnostics.rs @@ -3,7 +3,7 @@ // 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: ".rs:\d+:\d+" -> ".rs:LL:CC" struct A; struct B; diff --git a/tests/rustdoc/inline_local/parent-path-is-better.rs b/tests/rustdoc/inline_local/parent-path-is-better.rs new file mode 100644 index 00000000000..086540d5444 --- /dev/null +++ b/tests/rustdoc/inline_local/parent-path-is-better.rs @@ -0,0 +1,40 @@ +//! Test case for [134702] +//! +//! [134702]: https://github.com/rust-lang/rust/issues/134702 +#![crate_name = "foo"] + +pub mod inside1 { + pub use self::inner::Inside1; + mod inner { + pub struct Inside1; + impl Inside1 { + pub fn stuff(self) {} + } + } +} + +pub mod inside2 { + pub use self::inner::Inside2; + mod inner { + pub struct Inside2; + impl Inside2 { + pub fn stuff(self) {} + } + } +} + +pub mod nested { + //! [Inside1] [Inside2] + //@ has foo/nested/index.html '//a[@href="../struct.Inside1.html"]' 'Inside1' + //@ has foo/nested/index.html '//a[@href="../struct.Inside2.html"]' 'Inside2' + //! [Inside1::stuff] [Inside2::stuff] + //@ has foo/nested/index.html '//a[@href="../struct.Inside1.html#method.stuff"]' 'Inside1::stuff' + //@ has foo/nested/index.html '//a[@href="../struct.Inside2.html#method.stuff"]' 'Inside2::stuff' + use crate::inside1::Inside1; + use crate::inside2::Inside2; +} + +#[doc(inline)] +pub use inside1::Inside1; +#[doc(inline)] +pub use inside2::Inside2; diff --git a/tests/rustdoc/intra-doc/pub-use.rs b/tests/rustdoc/intra-doc/pub-use.rs index 7c70adad7d9..5aeb3eb149e 100644 --- a/tests/rustdoc/intra-doc/pub-use.rs +++ b/tests/rustdoc/intra-doc/pub-use.rs @@ -7,7 +7,7 @@ extern crate inner; /// [mod@std::env] [g] //@ has outer/index.html //@ has - '//a[@href="{{channel}}/std/env/index.html"]' "std::env" -//@ has - '//a[@href="fn.f.html"]' "g" +//@ has - '//a[@href="fn.g.html"]' "g" pub use f as g; // Make sure the documentation is actually correct by documenting an inlined re-export diff --git a/tests/ui-fulldeps/codegen-backend/hotplug.rs b/tests/ui-fulldeps/codegen-backend/hotplug.rs index dc0fb3f9efd..917b20fcdb5 100644 --- a/tests/ui-fulldeps/codegen-backend/hotplug.rs +++ b/tests/ui-fulldeps/codegen-backend/hotplug.rs @@ -3,8 +3,8 @@ //@ ignore-stage1 (requires matching sysroot built with in-tree compiler) //@ aux-codegen-backend: the_backend.rs -//@ normalize-stdout-test: "libthe_backend.dylib" -> "libthe_backend.so" -//@ normalize-stdout-test: "the_backend.dll" -> "libthe_backend.so" +//@ normalize-stdout: "libthe_backend.dylib" -> "libthe_backend.so" +//@ normalize-stdout: "the_backend.dll" -> "libthe_backend.so" //@ revisions: normal dep bindep //@ compile-flags: --crate-type=lib diff --git a/tests/ui-fulldeps/fluent-messages/test.rs b/tests/ui-fulldeps/fluent-messages/test.rs index 3361ebcef01..c1f5fe730c7 100644 --- a/tests/ui-fulldeps/fluent-messages/test.rs +++ b/tests/ui-fulldeps/fluent-messages/test.rs @@ -1,4 +1,4 @@ -//@ normalize-stderr-test: "could not open Fluent resource:.*" -> "could not open Fluent resource: os-specific message" +//@ normalize-stderr: "could not open Fluent resource:.*" -> "could not open Fluent resource: os-specific message" #![feature(rustc_private)] #![crate_type = "lib"] diff --git a/tests/ui-fulldeps/missing-rustc-driver-error.rs b/tests/ui-fulldeps/missing-rustc-driver-error.rs index 23ca39363bc..03ab5ce7b25 100644 --- a/tests/ui-fulldeps/missing-rustc-driver-error.rs +++ b/tests/ui-fulldeps/missing-rustc-driver-error.rs @@ -1,8 +1,8 @@ // Test that we get the following hint when trying to use a compiler crate without rustc_driver. //@ error-pattern: try adding `extern crate rustc_driver;` at the top level of this crate //@ compile-flags: --emit link -//@ normalize-stderr-test: ".*crate .* required.*\n\n" -> "" -//@ normalize-stderr-test: "aborting due to [0-9]+" -> "aborting due to NUMBER" +//@ normalize-stderr: ".*crate .* required.*\n\n" -> "" +//@ normalize-stderr: "aborting due to [0-9]+" -> "aborting due to NUMBER" #![feature(rustc_private)] diff --git a/tests/ui-fulldeps/session-diagnostic/diagnostic-derive-doc-comment-field.rs b/tests/ui-fulldeps/session-diagnostic/diagnostic-derive-doc-comment-field.rs index 7921ede23c5..37f78a7777c 100644 --- a/tests/ui-fulldeps/session-diagnostic/diagnostic-derive-doc-comment-field.rs +++ b/tests/ui-fulldeps/session-diagnostic/diagnostic-derive-doc-comment-field.rs @@ -1,7 +1,7 @@ //@ check-fail // Tests that a doc comment will not preclude a field from being considered a diagnostic argument -//@ normalize-stderr-test: "the following other types implement trait `IntoDiagArg`:(?:.*\n){0,9}\s+and \d+ others" -> "normalized in stderr" -//@ normalize-stderr-test: "(COMPILER_DIR/.*\.rs):[0-9]+:[0-9]+" -> "$1:LL:CC" +//@ normalize-stderr: "the following other types implement trait `IntoDiagArg`:(?:.*\n){0,9}\s+and \d+ others" -> "normalized in stderr" +//@ normalize-stderr: "(COMPILER_DIR/.*\.rs):[0-9]+:[0-9]+" -> "$1:LL:CC" // The proc_macro2 crate handles spans differently when on beta/stable release rather than nightly, // changing the output of this test. Since Subdiagnostic is strictly internal to the compiler diff --git a/tests/ui-fulldeps/session-diagnostic/diagnostic-derive.rs b/tests/ui-fulldeps/session-diagnostic/diagnostic-derive.rs index 1577b68e748..fa2d037064d 100644 --- a/tests/ui-fulldeps/session-diagnostic/diagnostic-derive.rs +++ b/tests/ui-fulldeps/session-diagnostic/diagnostic-derive.rs @@ -1,7 +1,7 @@ //@ check-fail // Tests error conditions for specifying diagnostics using #[derive(Diagnostic)] -//@ normalize-stderr-test: "the following other types implement trait `IntoDiagArg`:(?:.*\n){0,9}\s+and \d+ others" -> "normalized in stderr" -//@ normalize-stderr-test: "(COMPILER_DIR/.*\.rs):[0-9]+:[0-9]+" -> "$1:LL:CC" +//@ normalize-stderr: "the following other types implement trait `IntoDiagArg`:(?:.*\n){0,9}\s+and \d+ others" -> "normalized in stderr" +//@ normalize-stderr: "(COMPILER_DIR/.*\.rs):[0-9]+:[0-9]+" -> "$1:LL:CC" // The proc_macro2 crate handles spans differently when on beta/stable release rather than nightly, // changing the output of this test. Since Diagnostic is strictly internal to the compiler diff --git a/tests/ui/abi/c-zst.rs b/tests/ui/abi/c-zst.rs index 69ebefa09ac..6b299ffadb7 100644 --- a/tests/ui/abi/c-zst.rs +++ b/tests/ui/abi/c-zst.rs @@ -1,4 +1,4 @@ -//@ normalize-stderr-test: "(abi|pref|unadjusted_abi_align): Align\([1-8] bytes\)" -> "$1: $$SOME_ALIGN" +//@ normalize-stderr: "(abi|pref|unadjusted_abi_align): Align\([1-8] bytes\)" -> "$1: $$SOME_ALIGN" /*! C doesn't have zero-sized types... except it does. diff --git a/tests/ui/abi/debug.rs b/tests/ui/abi/debug.rs index 16d61602734..565743bf978 100644 --- a/tests/ui/abi/debug.rs +++ b/tests/ui/abi/debug.rs @@ -1,9 +1,9 @@ -//@ 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: "(abi|pref|unadjusted_abi_align): Align\([1-8] bytes\)" -> "$1: $$SOME_ALIGN" +//@ normalize-stderr: "(size): Size\([48] bytes\)" -> "$1: $$SOME_SIZE" +//@ normalize-stderr: "(can_unwind): (true|false)" -> "$1: $$SOME_BOOL" +//@ normalize-stderr: "(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: "(valid_range): [1-9]\.\.=(429496729[0-9]|1844674407370955161[0-9])" -> "$1: $$NON_NULL" // Some attributes are only computed for release builds: //@ compile-flags: -O #![feature(rustc_attrs)] diff --git a/tests/ui/abi/sysv64-zst.rs b/tests/ui/abi/sysv64-zst.rs index 6f4497e77a1..42ba1fb5f03 100644 --- a/tests/ui/abi/sysv64-zst.rs +++ b/tests/ui/abi/sysv64-zst.rs @@ -1,5 +1,5 @@ //@ only-x86_64 -//@ normalize-stderr-test: "(abi|pref|unadjusted_abi_align): Align\([1-8] bytes\)" -> "$1: $$SOME_ALIGN" +//@ normalize-stderr: "(abi|pref|unadjusted_abi_align): Align\([1-8] bytes\)" -> "$1: $$SOME_ALIGN" #![feature(rustc_attrs)] #![crate_type = "lib"] diff --git a/tests/ui/abi/win64-zst.rs b/tests/ui/abi/win64-zst.rs index a2f7d19eb45..bc4e0e629eb 100644 --- a/tests/ui/abi/win64-zst.rs +++ b/tests/ui/abi/win64-zst.rs @@ -1,4 +1,4 @@ -//@ normalize-stderr-test: "(abi|pref|unadjusted_abi_align): Align\([1-8] bytes\)" -> "$1: $$SOME_ALIGN" +//@ normalize-stderr: "(abi|pref|unadjusted_abi_align): Align\([1-8] bytes\)" -> "$1: $$SOME_ALIGN" //@ only-x86_64 //@ revisions: x86_64-linux diff --git a/tests/ui/argfile/commandline-argfile-missing-windows.rs b/tests/ui/argfile/commandline-argfile-missing-windows.rs index 24cfd25ccad..1a1cf6b9e75 100644 --- a/tests/ui/argfile/commandline-argfile-missing-windows.rs +++ b/tests/ui/argfile/commandline-argfile-missing-windows.rs @@ -5,8 +5,8 @@ // line arguments and is only run on windows. // //@ only-windows -//@ normalize-stderr-test: "os error \d+" -> "os error $$ERR" -//@ normalize-stderr-test: "commandline-argfile-missing.args:[^(]*" -> "commandline-argfile-missing.args: $$FILE_MISSING " +//@ normalize-stderr: "os error \d+" -> "os error $$ERR" +//@ normalize-stderr: "commandline-argfile-missing.args:[^(]*" -> "commandline-argfile-missing.args: $$FILE_MISSING " //@ compile-flags: --cfg cmdline_set @{{src-base}}\argfile\commandline-argfile-missing.args #[cfg(not(cmdline_set))] diff --git a/tests/ui/argfile/commandline-argfile-missing.rs b/tests/ui/argfile/commandline-argfile-missing.rs index fe6a849b0c8..8d9335f5add 100644 --- a/tests/ui/argfile/commandline-argfile-missing.rs +++ b/tests/ui/argfile/commandline-argfile-missing.rs @@ -6,8 +6,8 @@ // windows. // //@ ignore-windows -//@ normalize-stderr-test: "os error \d+" -> "os error $$ERR" -//@ normalize-stderr-test: "commandline-argfile-missing.args:[^(]*" -> "commandline-argfile-missing.args: $$FILE_MISSING " +//@ normalize-stderr: "os error \d+" -> "os error $$ERR" +//@ normalize-stderr: "commandline-argfile-missing.args:[^(]*" -> "commandline-argfile-missing.args: $$FILE_MISSING " //@ compile-flags: --cfg cmdline_set @{{src-base}}/argfile/commandline-argfile-missing.args #[cfg(not(cmdline_set))] diff --git a/tests/ui/argfile/commandline-argfile-multiple-windows.rs b/tests/ui/argfile/commandline-argfile-multiple-windows.rs index 84c050d84e2..9cbbd505c57 100644 --- a/tests/ui/argfile/commandline-argfile-multiple-windows.rs +++ b/tests/ui/argfile/commandline-argfile-multiple-windows.rs @@ -5,9 +5,9 @@ // line arguments and is only run on windows. // //@ only-windows -//@ normalize-stderr-test: "os error \d+" -> "os error $$ERR" -//@ normalize-stderr-test: "commandline-argfile-missing.args:[^(]*" -> "commandline-argfile-missing.args: $$FILE_MISSING " -//@ normalize-stderr-test: "commandline-argfile-missing2.args:[^(]*" -> "commandline-argfile-missing2.args: $$FILE_MISSING " +//@ normalize-stderr: "os error \d+" -> "os error $$ERR" +//@ normalize-stderr: "commandline-argfile-missing.args:[^(]*" -> "commandline-argfile-missing.args: $$FILE_MISSING " +//@ normalize-stderr: "commandline-argfile-missing2.args:[^(]*" -> "commandline-argfile-missing2.args: $$FILE_MISSING " //@ compile-flags: --cfg cmdline_set @{{src-base}}\argfile\commandline-argfile-missing.args @{{src-base}}\argfile\commandline-argfile-badutf8.args @{{src-base}}\argfile\commandline-argfile-missing2.args #[cfg(not(cmdline_set))] diff --git a/tests/ui/argfile/commandline-argfile-multiple.rs b/tests/ui/argfile/commandline-argfile-multiple.rs index f658ee34fbb..f211a50892c 100644 --- a/tests/ui/argfile/commandline-argfile-multiple.rs +++ b/tests/ui/argfile/commandline-argfile-multiple.rs @@ -6,9 +6,9 @@ // windows. // //@ ignore-windows -//@ normalize-stderr-test: "os error \d+" -> "os error $$ERR" -//@ normalize-stderr-test: "commandline-argfile-missing.args:[^(]*" -> "commandline-argfile-missing.args: $$FILE_MISSING " -//@ normalize-stderr-test: "commandline-argfile-missing2.args:[^(]*" -> "commandline-argfile-missing2.args: $$FILE_MISSING " +//@ normalize-stderr: "os error \d+" -> "os error $$ERR" +//@ normalize-stderr: "commandline-argfile-missing.args:[^(]*" -> "commandline-argfile-missing.args: $$FILE_MISSING " +//@ normalize-stderr: "commandline-argfile-missing2.args:[^(]*" -> "commandline-argfile-missing2.args: $$FILE_MISSING " //@ compile-flags: --cfg cmdline_set @{{src-base}}/argfile/commandline-argfile-missing.args @{{src-base}}/argfile/commandline-argfile-badutf8.args @{{src-base}}/argfile/commandline-argfile-missing2.args #[cfg(not(cmdline_set))] diff --git a/tests/ui/associated-inherent-types/bugs/cycle-iat-inside-of-adt.stderr b/tests/ui/associated-inherent-types/bugs/cycle-iat-inside-of-adt.stderr index cf5d8f614dd..7f8ed898525 100644 --- a/tests/ui/associated-inherent-types/bugs/cycle-iat-inside-of-adt.stderr +++ b/tests/ui/associated-inherent-types/bugs/cycle-iat-inside-of-adt.stderr @@ -4,12 +4,12 @@ error[E0391]: cycle detected when computing predicates of `Foo` LL | struct Foo { | ^^^^^^^^^^ | -note: ...which requires computing inferred outlives predicates of `Foo`... +note: ...which requires computing inferred outlives-predicates of `Foo`... --> $DIR/cycle-iat-inside-of-adt.rs:7:1 | LL | struct Foo { | ^^^^^^^^^^ - = note: ...which requires computing the inferred outlives predicates for items in this crate... + = note: ...which requires computing the inferred outlives-predicates for items in this crate... note: ...which requires computing type of `Foo::bar`... --> $DIR/cycle-iat-inside-of-adt.rs:8:5 | 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 98bbff794ca..3c0d66f8a0d 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: "and \d+ other candidates" -> "and N other candidates" trait Get { type Value; diff --git a/tests/ui/attributes/dump-preds.rs b/tests/ui/attributes/dump-preds.rs index ca38e23b237..071a7baede5 100644 --- a/tests/ui/attributes/dump-preds.rs +++ b/tests/ui/attributes/dump-preds.rs @@ -1,4 +1,4 @@ -//@ normalize-stderr-test: "DefId\(.+?\)" -> "DefId(..)" +//@ normalize-stderr: "DefId\(.+?\)" -> "DefId(..)" #![feature(rustc_attrs)] diff --git a/tests/ui/attributes/dump_def_parents.rs b/tests/ui/attributes/dump_def_parents.rs index 04a725f6c14..af117e4fa63 100644 --- a/tests/ui/attributes/dump_def_parents.rs +++ b/tests/ui/attributes/dump_def_parents.rs @@ -1,4 +1,4 @@ -//@ normalize-stderr-test: "DefId\(.+?\)" -> "DefId(..)" +//@ normalize-stderr: "DefId\(.+?\)" -> "DefId(..)" #![feature(rustc_attrs)] fn bar() { diff --git a/tests/ui/attributes/extented-attribute-macro-error.rs b/tests/ui/attributes/extented-attribute-macro-error.rs index 5dcb38d7da9..83060024dac 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: "couldn't read.*" -> "couldn't read the file" #![doc = include_str!("../not_existing_file.md")] struct Documented {} diff --git a/tests/ui/check-cfg/and-more-diagnostic.rs b/tests/ui/check-cfg/and-more-diagnostic.rs index 82867f3b435..977f55e8a6d 100644 --- a/tests/ui/check-cfg/and-more-diagnostic.rs +++ b/tests/ui/check-cfg/and-more-diagnostic.rs @@ -4,8 +4,8 @@ //@ check-pass //@ no-auto-check-cfg //@ compile-flags: --check-cfg=cfg() -//@ normalize-stderr-test: "and \d+ more" -> "and X more" -//@ normalize-stderr-test: "`[a-zA-Z0-9_-]+`" -> "`xxx`" +//@ normalize-stderr: "and \d+ more" -> "and X more" +//@ normalize-stderr: "`[a-zA-Z0-9_-]+`" -> "`xxx`" fn main() { cfg!(target_feature = "zebra"); diff --git a/tests/ui/check-cfg/target_feature.rs b/tests/ui/check-cfg/target_feature.rs index 6028dae66c4..3c0f1a3c2f6 100644 --- a/tests/ui/check-cfg/target_feature.rs +++ b/tests/ui/check-cfg/target_feature.rs @@ -10,7 +10,7 @@ //@ check-pass //@ no-auto-check-cfg //@ compile-flags: --check-cfg=cfg() -Zcheck-cfg-all-expected -//@ normalize-stderr-test: "`, `" -> "`\n`" +//@ normalize-stderr: "`, `" -> "`\n`" fn main() { cfg!(target_feature = "_UNEXPECTED_VALUE"); diff --git a/tests/ui/codegen/mismatched-data-layouts.rs b/tests/ui/codegen/mismatched-data-layouts.rs index 7d63895c65b..955f917ee33 100644 --- a/tests/ui/codegen/mismatched-data-layouts.rs +++ b/tests/ui/codegen/mismatched-data-layouts.rs @@ -4,8 +4,8 @@ //@ 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`" +//@ normalize-stderr: "`, `[A-Za-z0-9-:]*`" -> "`, `normalized data layout`" +//@ normalize-stderr: "layout, `[A-Za-z0-9-:]*`" -> "layout, `normalized data layout`" #![feature(lang_items, no_core, auto_traits)] #![no_core] diff --git a/tests/ui/codegen/target-cpus.rs b/tests/ui/codegen/target-cpus.rs index 363915c6419..f26203171f3 100644 --- a/tests/ui/codegen/target-cpus.rs +++ b/tests/ui/codegen/target-cpus.rs @@ -6,4 +6,4 @@ // output so that the stdout with LLVM-at-HEAD matches the output of the LLVM // versions currently used by default. // FIXME(#133919): Once Rust upgrades to LLVM 20, remove this. -//@ normalize-stdout-test: "(?m)^ *lime1\n" -> "" +//@ normalize-stdout: "(?m)^ *lime1\n" -> "" 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 30851b49cdc..73357d208c0 100644 --- a/tests/ui/const-generics/generic_const_exprs/issue-80742.rs +++ b/tests/ui/const-generics/generic_const_exprs/issue-80742.rs @@ -1,9 +1,9 @@ //@ 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: " +//@ normalize-stderr: "note: .*\n\n" -> "" +//@ normalize-stderr: "thread 'rustc' panicked.*\n" -> "" +//@ normalize-stderr: "(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/transmute-fail.rs b/tests/ui/const-generics/transmute-fail.rs index 95c71160567..cf9064bd8f4 100644 --- a/tests/ui/const-generics/transmute-fail.rs +++ b/tests/ui/const-generics/transmute-fail.rs @@ -1,6 +1,5 @@ // ignore-tidy-linelength -//@ normalize-stderr-32bit: "values of the type `[^`]+` are too big" -> "values of the type $$REALLY_TOO_BIG are too big" -//@ normalize-stderr-64bit: "values of the type `[^`]+` are too big" -> "values of the type $$REALLY_TOO_BIG are too big" +//@ normalize-stderr: "values of the type `[^`]+` are too big" -> "values of the type $$REALLY_TOO_BIG are too big" #![feature(transmute_generic_consts)] diff --git a/tests/ui/const-generics/transmute-fail.stderr b/tests/ui/const-generics/transmute-fail.stderr index 638ce790345..978a9744e88 100644 --- a/tests/ui/const-generics/transmute-fail.stderr +++ b/tests/ui/const-generics/transmute-fail.stderr @@ -1,11 +1,11 @@ error: the constant `W` is not of type `usize` - --> $DIR/transmute-fail.rs:17:42 + --> $DIR/transmute-fail.rs:16:42 | LL | fn bar<const W: bool, const H: usize>(v: [[u32; H]; W]) -> [[u32; W]; H] { | ^^^^^^^^^^^^^ expected `usize`, found `bool` error[E0512]: cannot transmute between types of different sizes, or dependently-sized types - --> $DIR/transmute-fail.rs:12:9 + --> $DIR/transmute-fail.rs:11:9 | LL | std::mem::transmute(v) | ^^^^^^^^^^^^^^^^^^^ @@ -14,13 +14,13 @@ LL | std::mem::transmute(v) = note: target type: `[[u32; W + 1]; H]` (size can vary because of [u32; W + 1]) error: the constant `W` is not of type `usize` - --> $DIR/transmute-fail.rs:20:9 + --> $DIR/transmute-fail.rs:19:9 | LL | std::mem::transmute(v) | ^^^^^^^^^^^^^^^^^^^ expected `usize`, found `bool` error[E0512]: cannot transmute between types of different sizes, or dependently-sized types - --> $DIR/transmute-fail.rs:27:9 + --> $DIR/transmute-fail.rs:26:9 | LL | std::mem::transmute(v) | ^^^^^^^^^^^^^^^^^^^ @@ -29,7 +29,7 @@ LL | std::mem::transmute(v) = note: target type: `[u32; W * H * H]` (this type does not have a fixed size) error[E0512]: cannot transmute between types of different sizes, or dependently-sized types - --> $DIR/transmute-fail.rs:34:9 + --> $DIR/transmute-fail.rs:33:9 | LL | std::mem::transmute(v) | ^^^^^^^^^^^^^^^^^^^ @@ -38,7 +38,7 @@ LL | std::mem::transmute(v) = note: target type: `[[[u32; 9999999]; 777777777]; 8888888]` (values of the type $REALLY_TOO_BIG are too big for the target architecture) error[E0512]: cannot transmute between types of different sizes, or dependently-sized types - --> $DIR/transmute-fail.rs:40:14 + --> $DIR/transmute-fail.rs:39:14 | LL | unsafe { std::mem::transmute(v) } | ^^^^^^^^^^^^^^^^^^^ @@ -47,7 +47,7 @@ LL | unsafe { std::mem::transmute(v) } = note: target type: `[[[u32; 9999999]; 777777777]; 239]` (values of the type $REALLY_TOO_BIG are too big for the target architecture) error[E0512]: cannot transmute between types of different sizes, or dependently-sized types - --> $DIR/transmute-fail.rs:46:9 + --> $DIR/transmute-fail.rs:45:9 | LL | std::mem::transmute(v) | ^^^^^^^^^^^^^^^^^^^ @@ -56,7 +56,7 @@ LL | std::mem::transmute(v) = note: target type: `[[u32; W]; H]` (size can vary because of [u32; W]) error[E0512]: cannot transmute between types of different sizes, or dependently-sized types - --> $DIR/transmute-fail.rs:57:9 + --> $DIR/transmute-fail.rs:56:9 | LL | std::mem::transmute(v) | ^^^^^^^^^^^^^^^^^^^ @@ -65,7 +65,7 @@ LL | std::mem::transmute(v) = note: target type: `[u32; W * H]` (this type does not have a fixed size) error[E0512]: cannot transmute between types of different sizes, or dependently-sized types - --> $DIR/transmute-fail.rs:64:9 + --> $DIR/transmute-fail.rs:63:9 | LL | std::mem::transmute(v) | ^^^^^^^^^^^^^^^^^^^ @@ -74,7 +74,7 @@ LL | std::mem::transmute(v) = note: target type: `[[u32; W]; H]` (size can vary because of [u32; W]) error[E0512]: cannot transmute between types of different sizes, or dependently-sized types - --> $DIR/transmute-fail.rs:73:9 + --> $DIR/transmute-fail.rs:72:9 | LL | std::mem::transmute(v) | ^^^^^^^^^^^^^^^^^^^ @@ -83,7 +83,7 @@ LL | std::mem::transmute(v) = note: target type: `[u32; D * W * H]` (this type does not have a fixed size) error[E0512]: cannot transmute between types of different sizes, or dependently-sized types - --> $DIR/transmute-fail.rs:82:9 + --> $DIR/transmute-fail.rs:81:9 | LL | std::mem::transmute(v) | ^^^^^^^^^^^^^^^^^^^ @@ -92,7 +92,7 @@ LL | std::mem::transmute(v) = note: target type: `[[u32; D * W]; H]` (size can vary because of [u32; D * W]) error[E0512]: cannot transmute between types of different sizes, or dependently-sized types - --> $DIR/transmute-fail.rs:89:9 + --> $DIR/transmute-fail.rs:88:9 | LL | std::mem::transmute(v) | ^^^^^^^^^^^^^^^^^^^ @@ -101,7 +101,7 @@ LL | std::mem::transmute(v) = note: target type: `[u8; L * 2]` (this type does not have a fixed size) error[E0512]: cannot transmute between types of different sizes, or dependently-sized types - --> $DIR/transmute-fail.rs:96:9 + --> $DIR/transmute-fail.rs:95:9 | LL | std::mem::transmute(v) | ^^^^^^^^^^^^^^^^^^^ @@ -110,7 +110,7 @@ LL | std::mem::transmute(v) = note: target type: `[u16; L]` (this type does not have a fixed size) error[E0512]: cannot transmute between types of different sizes, or dependently-sized types - --> $DIR/transmute-fail.rs:103:9 + --> $DIR/transmute-fail.rs:102:9 | LL | std::mem::transmute(v) | ^^^^^^^^^^^^^^^^^^^ @@ -119,7 +119,7 @@ LL | std::mem::transmute(v) = note: target type: `[[u8; 1]; L]` (this type does not have a fixed size) error[E0512]: cannot transmute between types of different sizes, or dependently-sized types - --> $DIR/transmute-fail.rs:112:9 + --> $DIR/transmute-fail.rs:111:9 | LL | std::mem::transmute(v) | ^^^^^^^^^^^^^^^^^^^ diff --git a/tests/ui/const-ptr/forbidden_slices.rs b/tests/ui/const-ptr/forbidden_slices.rs index bc4993466eb..59ea92c5ab3 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]+)?(<imm>)?─*╼ )+ *│.*" -> "HEX_DUMP" +//@ normalize-stderr: "(the raw bytes of the constant) \(size: [0-9]*, align: [0-9]*\)" -> "$1 (size: $$SIZE, align: $$ALIGN)" +//@ normalize-stderr: "([0-9a-f][0-9a-f] |╾─*A(LLOC)?[0-9]+(\+[a-z0-9]+)?(<imm>)?─*╼ )+ *│.*" -> "HEX_DUMP" #![feature( slice_from_ptr_range, 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 c015c5e0c49..8de398787b4 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" -> "" +//@ normalize-stderr: "\nerror: .*unexpectedly panicked.*\n\n" -> "" +//@ normalize-stderr: "note: we would appreciate a bug report.*\n\n" -> "" +//@ normalize-stderr: "note: compiler flags.*\n\n" -> "" +//@ normalize-stderr: "note: rustc.*running on.*\n\n" -> "" +//@ normalize-stderr: "thread.*panicked.*:\n.*\n" -> "" +//@ normalize-stderr: "stack backtrace:\n" -> "" +//@ normalize-stderr: "\s\d{1,}: .*\n" -> "" +//@ normalize-stderr: "\s at .*\n" -> "" +//@ normalize-stderr: ".*note: Some details.*\n" -> "" +//@ normalize-stderr: ".*omitted \d{1,} frame.*\n" -> "" #![allow(unconditional_panic)] const X: i32 = 1 / 0; //~ERROR constant diff --git a/tests/ui/consts/const-eval/heap/dealloc_intrinsic_dangling.rs b/tests/ui/consts/const-eval/heap/dealloc_intrinsic_dangling.rs index 3054e79770d..509c872f609 100644 --- a/tests/ui/consts/const-eval/heap/dealloc_intrinsic_dangling.rs +++ b/tests/ui/consts/const-eval/heap/dealloc_intrinsic_dangling.rs @@ -2,9 +2,9 @@ #![feature(const_heap)] // 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]+)?(<imm>)?─*╼ )+ *│.*" -> "HEX_DUMP" -//@ normalize-stderr-test: "HEX_DUMP\s*\n\s*HEX_DUMP" -> "HEX_DUMP" +//@ normalize-stderr: "(the raw bytes of the constant) \(size: [0-9]*, align: [0-9]*\)" -> "$1 (size: $$SIZE, align: $$ALIGN)" +//@ normalize-stderr: "([0-9a-f][0-9a-f] |╾─*A(LLOC)?[0-9]+(\+[a-z0-9]+)?(<imm>)?─*╼ )+ *│.*" -> "HEX_DUMP" +//@ normalize-stderr: "HEX_DUMP\s*\n\s*HEX_DUMP" -> "HEX_DUMP" use std::intrinsics; diff --git a/tests/ui/consts/const-eval/raw-bytes.rs b/tests/ui/consts/const-eval/raw-bytes.rs index 0df732df30e..9187de56362 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 // ignore-tidy-linelength -//@ normalize-stderr-test: "╾─*ALLOC[0-9]+(\+[a-z0-9]+)?(<imm>)?─*╼" -> "╾ALLOC_ID$1╼" +//@ normalize-stderr: "╾─*ALLOC[0-9]+(\+[a-z0-9]+)?(<imm>)?─*╼" -> "╾ALLOC_ID$1╼" #![allow(invalid_value)] #![feature(never_type, rustc_attrs, ptr_metadata, slice_from_ptr_range, const_slice_from_ptr_range)] diff --git a/tests/ui/consts/const-eval/ub-enum.rs b/tests/ui/consts/const-eval/ub-enum.rs index 728c1666deb..11cd87023d1 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]+)?(<imm>)?─*╼ )+ *│.*" -> "HEX_DUMP" -//@ normalize-stderr-test: "0x0+" -> "0x0" +//@ normalize-stderr: "(the raw bytes of the constant) \(size: [0-9]*, align: [0-9]*\)" -> "$1 (size: $$SIZE, align: $$ALIGN)" +//@ normalize-stderr: "([0-9a-f][0-9a-f] |╾─*ALLOC[0-9]+(\+[a-z0-9]+)?(<imm>)?─*╼ )+ *│.*" -> "HEX_DUMP" +//@ normalize-stderr: "0x0+" -> "0x0" #![feature(never_type)] #![allow(invalid_value)] diff --git a/tests/ui/consts/const-eval/ub-nonnull.rs b/tests/ui/consts/const-eval/ub-nonnull.rs index 47d3ca97fda..b8e312759b4 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: "(the raw bytes of the constant) \(size: [0-9]*, align: [0-9]*\)" -> "$1 (size: $$SIZE, align: $$ALIGN)" +//@ normalize-stderr: "([0-9a-f][0-9a-f] |╾─*ALLOC[0-9]+(\+[a-z0-9]+)?─*╼ )+ *│.*" -> "HEX_DUMP" #![allow(invalid_value)] // make sure we cannot allow away the errors tested here #![feature(rustc_attrs, ptr_metadata)] diff --git a/tests/ui/consts/const-eval/ub-ref-ptr.rs b/tests/ui/consts/const-eval/ub-ref-ptr.rs index 44b25a6438e..78d6fb5b65b 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]+)?(<imm>)?─*╼ )+ *│.*" -> "HEX_DUMP" +//@ normalize-stderr: "(the raw bytes of the constant) \(size: [0-9]*, align: [0-9]*\)" -> "$1 (size: $$SIZE, align: $$ALIGN)" +//@ normalize-stderr: "([0-9a-f][0-9a-f] |╾─*ALLOC[0-9]+(\+[a-z0-9]+)?(<imm>)?─*╼ )+ *│.*" -> "HEX_DUMP" #![allow(invalid_value)] use std::mem; diff --git a/tests/ui/consts/const-eval/ub-uninhabit.rs b/tests/ui/consts/const-eval/ub-uninhabit.rs index 0167de26e94..d0515a4e6f0 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]+)?(<imm>)?─*╼ )+ *│.*" -> "HEX_DUMP" +//@ normalize-stderr: "(the raw bytes of the constant) \(size: [0-9]*, align: [0-9]*\)" -> "$1 (size: $$SIZE, align: $$ALIGN)" +//@ normalize-stderr: "([0-9a-f][0-9a-f] |╾─*ALLOC[0-9]+(\+[a-z0-9]+)?(<imm>)?─*╼ )+ *│.*" -> "HEX_DUMP" #![feature(core_intrinsics)] #![feature(never_type)] diff --git a/tests/ui/consts/const-eval/ub-wide-ptr.rs b/tests/ui/consts/const-eval/ub-wide-ptr.rs index 991d4424dcf..a071a44272b 100644 --- a/tests/ui/consts/const-eval/ub-wide-ptr.rs +++ b/tests/ui/consts/const-eval/ub-wide-ptr.rs @@ -5,10 +5,10 @@ use std::{ptr, 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]+)?(<imm>)?─*╼ )+ *│.*" -> "HEX_DUMP" -//@ normalize-stderr-test: "offset \d+" -> "offset N" -//@ normalize-stderr-test: "size \d+" -> "size N" +//@ normalize-stderr: "(the raw bytes of the constant) \(size: [0-9]*, align: [0-9]*\)" -> "$1 (size: $$SIZE, align: $$ALIGN)" +//@ normalize-stderr: "([0-9a-f][0-9a-f] |╾─*ALLOC[0-9]+(\+[a-z0-9]+)?(<imm>)?─*╼ )+ *│.*" -> "HEX_DUMP" +//@ normalize-stderr: "offset \d+" -> "offset N" +//@ normalize-stderr: "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-mut-refs/mut_ref_in_final.rs b/tests/ui/consts/const-mut-refs/mut_ref_in_final.rs index af7463e6574..283c1224e01 100644 --- a/tests/ui/consts/const-mut-refs/mut_ref_in_final.rs +++ b/tests/ui/consts/const-mut-refs/mut_ref_in_final.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]+)?(<imm>)?─*╼ )+ *│.*" -> " HEX_DUMP" -//@ normalize-stderr-test: "HEX_DUMP\s*\n\s*HEX_DUMP" -> "HEX_DUMP" +//@ normalize-stderr: "(the raw bytes of the constant) \(size: [0-9]*, align: [0-9]*\)" -> "$1 (size: $$SIZE, align: $$ALIGN)" +//@ normalize-stderr: "( 0x[0-9a-f][0-9a-f] │)? ([0-9a-f][0-9a-f] |__ |╾─*ALLOC[0-9]+(\+[a-z0-9]+)?(<imm>)?─*╼ )+ *│.*" -> " HEX_DUMP" +//@ normalize-stderr: "HEX_DUMP\s*\n\s*HEX_DUMP" -> "HEX_DUMP" use std::cell::UnsafeCell; use std::mem; 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 2539fcccb84..ac903fca20a 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]+)?(<imm>)?─*╼ )+ *│.*" -> " HEX_DUMP" -//@ normalize-stderr-test: "HEX_DUMP\s*\n\s*HEX_DUMP" -> "HEX_DUMP" +//@ normalize-stderr: "(the raw bytes of the constant) \(size: [0-9]*, align: [0-9]*\)" -> "$1 (size: $$SIZE, align: $$ALIGN)" +//@ normalize-stderr: "( 0x[0-9a-f][0-9a-f] │)? ([0-9a-f][0-9a-f] |__ |╾─*ALLOC[0-9]+(\+[a-z0-9]+)?(<imm>)?─*╼ )+ *│.*" -> " HEX_DUMP" +//@ normalize-stderr: "HEX_DUMP\s*\n\s*HEX_DUMP" -> "HEX_DUMP" use std::sync::Mutex; diff --git a/tests/ui/consts/const_refs_to_static_fail.rs b/tests/ui/consts/const_refs_to_static_fail.rs index 44e848ab637..596ed50af38 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]+)?(<imm>)?─*╼ )+ *│.*" -> "HEX_DUMP" +//@ normalize-stderr: "(the raw bytes of the constant) \(size: [0-9]*, align: [0-9]*\)" -> "$1 (size: $$SIZE, align: $$ALIGN)" +//@ normalize-stderr: "([0-9a-f][0-9a-f] |╾─*ALLOC[0-9]+(\+[a-z0-9]+)?(<imm>)?─*╼ )+ *│.*" -> "HEX_DUMP" #![feature(sync_unsafe_cell)] 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 aa101cf9d8a..3383a208345 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]+)?(<imm>)?─*╼ )+ *│.*" -> "HEX_DUMP" +//@ normalize-stderr: "(the raw bytes of the constant) \(size: [0-9]*, align: [0-9]*\)" -> "$1 (size: $$SIZE, align: $$ALIGN)" +//@ normalize-stderr: "([0-9a-f][0-9a-f] |╾─*ALLOC[0-9]+(\+[a-z0-9]+)?(<imm>)?─*╼ )+ *│.*" -> "HEX_DUMP" #![allow(static_mut_refs)] fn invalid() { diff --git a/tests/ui/consts/dangling-alloc-id-ice.rs b/tests/ui/consts/dangling-alloc-id-ice.rs index da95d4d1347..8e9493c8d28 100644 --- a/tests/ui/consts/dangling-alloc-id-ice.rs +++ b/tests/ui/consts/dangling-alloc-id-ice.rs @@ -1,8 +1,8 @@ // https://github.com/rust-lang/rust/issues/55223 // 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]+)?(<imm>)?─*╼ )+ *│.*" -> "HEX_DUMP" -//@ normalize-stderr-test: "HEX_DUMP\s*\n\s*HEX_DUMP" -> "HEX_DUMP" +//@ normalize-stderr: "(the raw bytes of the constant) \(size: [0-9]*, align: [0-9]*\)" -> "$1 (size: $$SIZE, align: $$ALIGN)" +//@ normalize-stderr: "([0-9a-f][0-9a-f] |╾─*A(LLOC)?[0-9]+(\+[a-z0-9]+)?(<imm>)?─*╼ )+ *│.*" -> "HEX_DUMP" +//@ normalize-stderr: "HEX_DUMP\s*\n\s*HEX_DUMP" -> "HEX_DUMP" union Foo<'a> { y: &'a (), diff --git a/tests/ui/consts/dangling-zst-ice-issue-126393.rs b/tests/ui/consts/dangling-zst-ice-issue-126393.rs index b56fcd235c7..4beee913a97 100644 --- a/tests/ui/consts/dangling-zst-ice-issue-126393.rs +++ b/tests/ui/consts/dangling-zst-ice-issue-126393.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] |╾─*A(LLOC)?[0-9]+(\+[a-z0-9]+)?(<imm>)?─*╼ )+ *│.*" -> "HEX_DUMP" -//@ normalize-stderr-test: "HEX_DUMP\s*\n\s*HEX_DUMP" -> "HEX_DUMP" +//@ normalize-stderr: "(the raw bytes of the constant) \(size: [0-9]*, align: [0-9]*\)" -> "$1 (size: $$SIZE, align: $$ALIGN)" +//@ normalize-stderr: "([0-9a-f][0-9a-f] |╾─*A(LLOC)?[0-9]+(\+[a-z0-9]+)?(<imm>)?─*╼ )+ *│.*" -> "HEX_DUMP" +//@ normalize-stderr: "HEX_DUMP\s*\n\s*HEX_DUMP" -> "HEX_DUMP" pub struct Wrapper; pub static MAGIC_FFI_REF: &'static Wrapper = unsafe { diff --git a/tests/ui/consts/error-is-freeze.rs b/tests/ui/consts/error-is-freeze.rs new file mode 100644 index 00000000000..fe27d029e66 --- /dev/null +++ b/tests/ui/consts/error-is-freeze.rs @@ -0,0 +1,14 @@ +// Make sure we treat the error type as freeze to suppress useless errors. + +struct MyStruct { + foo: Option<UndefinedType>, + //~^ ERROR cannot find type `UndefinedType` in this scope +} +impl MyStruct { + pub const EMPTY_REF: &'static Self = &Self::EMPTY; + pub const EMPTY: Self = Self { + foo: None, + }; +} + +fn main() {} diff --git a/tests/ui/consts/error-is-freeze.stderr b/tests/ui/consts/error-is-freeze.stderr new file mode 100644 index 00000000000..f3bfd1ea5e2 --- /dev/null +++ b/tests/ui/consts/error-is-freeze.stderr @@ -0,0 +1,14 @@ +error[E0412]: cannot find type `UndefinedType` in this scope + --> $DIR/error-is-freeze.rs:4:17 + | +LL | foo: Option<UndefinedType>, + | ^^^^^^^^^^^^^ not found in this scope + | +help: you might be missing a type parameter + | +LL | struct MyStruct<UndefinedType> { + | +++++++++++++++ + +error: aborting due to 1 previous error + +For more information about this error, try `rustc --explain E0412`. diff --git a/tests/ui/consts/issue-17718-const-bad-values.rs b/tests/ui/consts/issue-17718-const-bad-values.rs index fca6cb08537..c4de7b61f07 100644 --- a/tests/ui/consts/issue-17718-const-bad-values.rs +++ b/tests/ui/consts/issue-17718-const-bad-values.rs @@ -1,6 +1,5 @@ -//@ normalize-stderr-32bit: "\(size: \d+, align: \d+\)" -> "(size: $$PTR, align: $$PTR)" -//@ normalize-stderr-64bit: "\(size: \d+, align: \d+\)" -> "(size: $$PTR, align: $$PTR)" -//@ normalize-stderr-test: "([0-9a-f][0-9a-f] |╾─*A(LLOC)?[0-9]+(\+[a-z0-9]+)?(<imm>)?─*╼ )+ *│.*" -> "HEX_DUMP" +//@ normalize-stderr: "\(size: \d+, align: \d+\)" -> "(size: $$PTR, align: $$PTR)" +//@ normalize-stderr: "([0-9a-f][0-9a-f] |╾─*A(LLOC)?[0-9]+(\+[a-z0-9]+)?(<imm>)?─*╼ )+ *│.*" -> "HEX_DUMP" #![allow(static_mut_refs)] diff --git a/tests/ui/consts/issue-17718-const-bad-values.stderr b/tests/ui/consts/issue-17718-const-bad-values.stderr index 102491e90ba..364fa7be5aa 100644 --- a/tests/ui/consts/issue-17718-const-bad-values.stderr +++ b/tests/ui/consts/issue-17718-const-bad-values.stderr @@ -1,11 +1,11 @@ error[E0764]: mutable references are not allowed in the final value of constants - --> $DIR/issue-17718-const-bad-values.rs:7:34 + --> $DIR/issue-17718-const-bad-values.rs:6:34 | LL | const C1: &'static mut [usize] = &mut []; | ^^^^^^^ error[E0080]: it is undefined behavior to use this value - --> $DIR/issue-17718-const-bad-values.rs:11:1 + --> $DIR/issue-17718-const-bad-values.rs:10:1 | LL | const C2: &'static mut i32 = unsafe { &mut S }; | ^^^^^^^^^^^^^^^^^^^^^^^^^^ constructing invalid value: encountered reference to mutable memory in `const` diff --git a/tests/ui/consts/issue-miri-1910.rs b/tests/ui/consts/issue-miri-1910.rs index a66cb6b6665..107d9742b92 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" +//@ normalize-stderr: "alloc[0-9]+\+0x[a-z0-9]+" -> "ALLOC" const C: () = unsafe { let foo = Some(&42 as *const i32); 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 56259532573..a6691fa2a2f 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]+)?(<imm>)?─*╼ )+ *│.*" -> "HEX_DUMP" +//@ normalize-stderr: "(the raw bytes of the constant) \(size: [0-9]*, align: [0-9]*\)" -> "$1 (size: $$SIZE, align: $$ALIGN)" +//@ normalize-stderr: "([0-9a-f][0-9a-f] |╾─*ALLOC[0-9]+(\+[a-z0-9]+)?(<imm>)?─*╼ )+ *│.*" -> "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 facb21a04ef..b33ebfb06be 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]+)?(<imm>)?─*╼ )+ *│.*" -> "HEX_DUMP" +//@ normalize-stderr: "(the raw bytes of the constant) \(size: [0-9]*, align: [0-9]*\)" -> "$1 (size: $$SIZE, align: $$ALIGN)" +//@ normalize-stderr: "([0-9a-f][0-9a-f] |╾─*ALLOC[0-9]+(\+[a-z0-9]+)?(<imm>)?─*╼ )+ *│.*" -> "HEX_DUMP" #![feature(half_open_range_patterns_in_slices)] #![allow(static_mut_refs)] diff --git a/tests/ui/consts/miri_unleashed/mutable_references.rs b/tests/ui/consts/miri_unleashed/mutable_references.rs index a60058cc5c0..039d0fadfcc 100644 --- a/tests/ui/consts/miri_unleashed/mutable_references.rs +++ b/tests/ui/consts/miri_unleashed/mutable_references.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]+)?(<imm>)?─*╼ )+ *│.*" -> "HEX_DUMP" +//@ normalize-stderr: "(the raw bytes of the constant) \(size: [0-9]*, align: [0-9]*\)" -> "$1 (size: $$SIZE, align: $$ALIGN)" +//@ normalize-stderr: "([0-9a-f][0-9a-f] |╾─*ALLOC[0-9]+(\+[a-z0-9]+)?(<imm>)?─*╼ )+ *│.*" -> "HEX_DUMP" #![allow(static_mut_refs)] use std::cell::UnsafeCell; diff --git a/tests/ui/consts/offset_from_ub.rs b/tests/ui/consts/offset_from_ub.rs index 7efc5dd3e28..0232b03a813 100644 --- a/tests/ui/consts/offset_from_ub.rs +++ b/tests/ui/consts/offset_from_ub.rs @@ -1,4 +1,4 @@ -//@ normalize-stderr-test: "\d+ bytes" -> "$$BYTES bytes" +//@ normalize-stderr: "\d+ bytes" -> "$$BYTES bytes" #![feature(const_ptr_sub_ptr)] #![feature(core_intrinsics)] diff --git a/tests/ui/consts/offset_ub.rs b/tests/ui/consts/offset_ub.rs index 5026d9a2713..dda6dd388f2 100644 --- a/tests/ui/consts/offset_ub.rs +++ b/tests/ui/consts/offset_ub.rs @@ -1,8 +1,8 @@ use std::ptr; -//@ normalize-stderr-test: "0xf+" -> "0xf..f" -//@ normalize-stderr-test: "0x7f+" -> "0x7f..f" -//@ normalize-stderr-test: "\d+ bytes" -> "$$BYTES bytes" +//@ normalize-stderr: "0xf+" -> "0xf..f" +//@ normalize-stderr: "0x7f+" -> "0x7f..f" +//@ normalize-stderr: "\d+ bytes" -> "$$BYTES bytes" pub const BEFORE_START: *const u8 = unsafe { (&0u8 as *const u8).offset(-1) }; //~NOTE diff --git a/tests/ui/consts/overflowing-consts.rs b/tests/ui/consts/overflowing-consts.rs index 68282750dce..5ff205ce58e 100644 --- a/tests/ui/consts/overflowing-consts.rs +++ b/tests/ui/consts/overflowing-consts.rs @@ -6,8 +6,8 @@ //@ [opt]compile-flags: -O //@ [opt_with_overflow_checks]compile-flags: -C overflow-checks=on -O //@ ignore-pass (test tests codegen-time behaviour) -//@ normalize-stderr-test: "shift left by `(64|32)_usize`, which" -> "shift left by `%BITS%`, which" -//@ normalize-stderr-test: "shift right by `(64|32)_usize`, which" -> "shift right by `%BITS%`, which" +//@ normalize-stderr: "shift left by `(64|32)_usize`, which" -> "shift left by `%BITS%`, which" +//@ normalize-stderr: "shift right by `(64|32)_usize`, which" -> "shift right by `%BITS%`, which" #[cfg(target_pointer_width = "32")] diff --git a/tests/ui/consts/validate_never_arrays.rs b/tests/ui/consts/validate_never_arrays.rs index 7585a78a0d3..055bb1c69c8 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]+)?(<imm>)?─*╼ )+ *│.*" -> "HEX_DUMP" +//@ normalize-stderr: "(the raw bytes of the constant) \(size: [0-9]*, align: [0-9]*\)" -> "$1 (size: $$SIZE, align: $$ALIGN)" +//@ normalize-stderr: "([0-9a-f][0-9a-f] |╾─*ALLOC[0-9]+(\+[a-z0-9]+)?(<imm>)?─*╼ )+ *│.*" -> "HEX_DUMP" #![feature(never_type)] const _: &[!; 1] = unsafe { &*(1_usize as *const [!; 1]) }; //~ ERROR undefined behavior diff --git a/tests/ui/coroutine/static-not-unpin.rs b/tests/ui/coroutine/static-not-unpin.rs index b66a248654e..9be7eca63cb 100644 --- a/tests/ui/coroutine/static-not-unpin.rs +++ b/tests/ui/coroutine/static-not-unpin.rs @@ -5,7 +5,7 @@ #![feature(coroutines, stmt_expr_attributes)] -//@ normalize-stderr-test: "std::pin::Unpin" -> "std::marker::Unpin" +//@ normalize-stderr: "std::pin::Unpin" -> "std::marker::Unpin" use std::marker::Unpin; diff --git a/tests/ui/crate-loading/crateresolve1.rs b/tests/ui/crate-loading/crateresolve1.rs index 2fccb744e82..9200b6a6231 100644 --- a/tests/ui/crate-loading/crateresolve1.rs +++ b/tests/ui/crate-loading/crateresolve1.rs @@ -2,9 +2,9 @@ //@ 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: "\.nll/" -> "/" +//@ normalize-stderr: "\\\?\\" -> "" +//@ normalize-stderr: "(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 159ce04c3c4..bec692eb8d2 100644 --- a/tests/ui/crate-loading/crateresolve2.rs +++ b/tests/ui/crate-loading/crateresolve2.rs @@ -4,8 +4,8 @@ //@ aux-build:crateresolve2-2.rs //@ aux-build:crateresolve2-3.rs -//@ normalize-stderr-test: "\.nll/" -> "/" -//@ normalize-stderr-test: "\\\?\\" -> "" +//@ normalize-stderr: "\.nll/" -> "/" +//@ normalize-stderr: "\\\?\\" -> "" extern crate crateresolve2; //~^ ERROR multiple candidates for `rmeta` dependency `crateresolve2` found diff --git a/tests/ui/crate-loading/invalid-rlib.rs b/tests/ui/crate-loading/invalid-rlib.rs index 0b401add8e4..6b463526244 100644 --- a/tests/ui/crate-loading/invalid-rlib.rs +++ b/tests/ui/crate-loading/invalid-rlib.rs @@ -1,5 +1,5 @@ //@ 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'" +//@ normalize-stderr: "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 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 a1922c98ef6..3bff4471698 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 @@ -4,8 +4,6 @@ //@ compile-flags:-C debuginfo=2 //@ build-fail //@ error-pattern: too big for the target 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 3456cd55b75..6a3f8f4c249 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 @@ -6,8 +6,6 @@ //@ compile-flags:-C debuginfo=2 //@ build-fail //@ error-pattern: too big for the target architecture -//@ normalize-stderr-64bit: "18446744073709551615" -> "SIZE" -//@ normalize-stderr-32bit: "4294967295" -> "SIZE" #![crate_type = "rlib"] diff --git a/tests/ui/diagnostic-width/E0271.rs b/tests/ui/diagnostic-width/E0271.rs index dedae4365e8..061ba45c219 100644 --- a/tests/ui/diagnostic-width/E0271.rs +++ b/tests/ui/diagnostic-width/E0271.rs @@ -1,7 +1,7 @@ //@ revisions: ascii unicode //@[ascii] compile-flags: --diagnostic-width=40 //@[unicode] compile-flags: -Zunstable-options --error-format=human-unicode --diagnostic-width=40 -//@ normalize-stderr-test: "long-type-\d+" -> "long-type-hash" +//@ normalize-stderr: "long-type-\d+" -> "long-type-hash" trait Future { type Error; } diff --git a/tests/ui/diagnostic-width/long-E0308.rs b/tests/ui/diagnostic-width/long-E0308.rs index 695852f83ac..93987226020 100644 --- a/tests/ui/diagnostic-width/long-E0308.rs +++ b/tests/ui/diagnostic-width/long-E0308.rs @@ -1,7 +1,7 @@ //@ revisions: ascii unicode //@[ascii] compile-flags: --diagnostic-width=60 -Zwrite-long-types-to-disk=yes //@[unicode] compile-flags: -Zunstable-options --json=diagnostic-unicode --diagnostic-width=60 -Zwrite-long-types-to-disk=yes -//@ normalize-stderr-test: "long-type-\d+" -> "long-type-hash" +//@ normalize-stderr: "long-type-\d+" -> "long-type-hash" mod a { // Force the "short path for unique types" machinery to trip up diff --git a/tests/ui/duplicate_entry_error.rs b/tests/ui/duplicate_entry_error.rs index e8b905a65f6..5a25802c6e7 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: "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/error-codes/E0017.rs b/tests/ui/error-codes/E0017.rs index e103d3bf5b1..8c685aad030 100644 --- a/tests/ui/error-codes/E0017.rs +++ b/tests/ui/error-codes/E0017.rs @@ -1,5 +1,5 @@ -//@ normalize-stderr-test: "\(size: ., align: .\)" -> "" -//@ normalize-stderr-test: " +│ ╾─+╼" -> "" +//@ normalize-stderr: "\(size: ., align: .\)" -> "" +//@ normalize-stderr: " +│ ╾─+╼" -> "" static X: i32 = 1; const C: i32 = 2; diff --git a/tests/ui/error-codes/E0152.rs b/tests/ui/error-codes/E0152.rs index 44d462c27e6..565e92baf02 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: "loaded from .*liballoc-.*.rlib" -> "loaded from SYSROOT/liballoc-*.rlib" #![feature(lang_items)] #[lang = "owned_box"] diff --git a/tests/ui/error-codes/E0275.rs b/tests/ui/error-codes/E0275.rs index 889d9d8be90..df7b606155e 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: "long-type-\d+" -> "long-type-hash" trait Foo {} struct Bar<T>(T); diff --git a/tests/ui/error-codes/E0462.rs b/tests/ui/error-codes/E0462.rs index 2dd3b16394d..12214331445 100644 --- a/tests/ui/error-codes/E0462.rs +++ b/tests/ui/error-codes/E0462.rs @@ -1,8 +1,8 @@ //@ 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: "\.nll/" -> "/" +//@ normalize-stderr: "\\\?\\" -> "" +//@ normalize-stderr: "(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 4ecf21996cc..aaf4d3a8f50 100644 --- a/tests/ui/error-codes/E0464.rs +++ b/tests/ui/error-codes/E0464.rs @@ -2,9 +2,9 @@ //@ 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: "\.nll/" -> "/" +//@ normalize-stderr: "\\\?\\" -> "" +//@ normalize-stderr: "(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/E0523.rs b/tests/ui/error-codes/E0523.rs index 4ecf21996cc..aaf4d3a8f50 100644 --- a/tests/ui/error-codes/E0523.rs +++ b/tests/ui/error-codes/E0523.rs @@ -2,9 +2,9 @@ //@ 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: "\.nll/" -> "/" +//@ normalize-stderr: "\\\?\\" -> "" +//@ normalize-stderr: "(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-emitter/multiline-removal-suggestion.rs b/tests/ui/error-emitter/multiline-removal-suggestion.rs new file mode 100644 index 00000000000..72e9ea357c9 --- /dev/null +++ b/tests/ui/error-emitter/multiline-removal-suggestion.rs @@ -0,0 +1,58 @@ +// Make sure suggestion for removal of a span that covers multiple lines is properly highlighted. +//@ compile-flags: --error-format=human --color=always +//@ edition:2018 +//@ only-linux +// ignore-tidy-tab +// We use `\t` instead of spaces for indentation to ensure that the highlighting logic properly +// accounts for replaced characters (like we do for `\t` with ` `). The naïve way of highlighting +// could be counting chars of the original code, instead of operating on the code as it is being +// displayed. +use std::collections::{HashMap, HashSet}; +fn foo() -> Vec<(bool, HashSet<u8>)> { + let mut hm = HashMap::<bool, Vec<HashSet<u8>>>::new(); + hm.into_iter() + .map(|(is_true, ts)| { + ts.into_iter() + .map(|t| { + ( + is_true, + t, + ) + }).flatten() + }) + .flatten() + .collect() +} +fn bar() -> Vec<(bool, HashSet<u8>)> { + let mut hm = HashMap::<bool, Vec<HashSet<u8>>>::new(); + hm.into_iter() + .map(|(is_true, ts)| { + ts.into_iter() + .map(|t| (is_true, t)) + .flatten() + }) + .flatten() + .collect() +} +fn baz() -> Vec<(bool, HashSet<u8>)> { + let mut hm = HashMap::<bool, Vec<HashSet<u8>>>::new(); + hm.into_iter() + .map(|(is_true, ts)| { + ts.into_iter().map(|t| { + (is_true, t) + }).flatten() + }) + .flatten() + .collect() +} +fn bay() -> Vec<(bool, HashSet<u8>)> { + let mut hm = HashMap::<bool, Vec<HashSet<u8>>>::new(); + hm.into_iter() + .map(|(is_true, ts)| { + ts.into_iter() + .map(|t| (is_true, t)).flatten() + }) + .flatten() + .collect() +} +fn main() {} diff --git a/tests/ui/error-emitter/multiline-removal-suggestion.svg b/tests/ui/error-emitter/multiline-removal-suggestion.svg new file mode 100644 index 00000000000..95c7740f699 --- /dev/null +++ b/tests/ui/error-emitter/multiline-removal-suggestion.svg @@ -0,0 +1,504 @@ +<svg width="1902px" height="4322px" xmlns="http://www.w3.org/2000/svg"> + <style> + .fg { fill: #AAAAAA } + .bg { background: #000000 } + .fg-ansi256-009 { fill: #FF5555 } + .fg-ansi256-010 { fill: #55FF55 } + .fg-ansi256-012 { fill: #5555FF } + .fg-ansi256-014 { fill: #55FFFF } + .container { + padding: 0 10px; + line-height: 18px; + } + .bold { font-weight: bold; } + tspan { + font: 14px SFMono-Regular, Consolas, Liberation Mono, Menlo, monospace; + white-space: pre; + line-height: 18px; + } + </style> + + <rect width="100%" height="100%" y="0" rx="4.5" class="bg" /> + + <text xml:space="preserve" class="container fg"> + <tspan x="10px" y="28px"><tspan class="fg-ansi256-009 bold">error[E0277]</tspan><tspan class="bold">: `(bool, HashSet<u8>)` is not an iterator</tspan> +</tspan> + <tspan x="10px" y="46px"><tspan> </tspan><tspan class="fg-ansi256-012 bold">--> </tspan><tspan>$DIR/multiline-removal-suggestion.rs:21:8</tspan> +</tspan> + <tspan x="10px" y="64px"><tspan> </tspan><tspan class="fg-ansi256-012 bold">|</tspan> +</tspan> + <tspan x="10px" y="82px"><tspan class="fg-ansi256-012 bold">LL</tspan><tspan> </tspan><tspan class="fg-ansi256-012 bold">|</tspan><tspan> }).flatten()</tspan> +</tspan> + <tspan x="10px" y="100px"><tspan> </tspan><tspan class="fg-ansi256-012 bold">|</tspan><tspan> </tspan><tspan class="fg-ansi256-009 bold">^^^^^^^</tspan><tspan> </tspan><tspan class="fg-ansi256-009 bold">`(bool, HashSet<u8>)` is not an iterator</tspan> +</tspan> + <tspan x="10px" y="118px"><tspan> </tspan><tspan class="fg-ansi256-012 bold">|</tspan> +</tspan> + <tspan x="10px" y="136px"><tspan> </tspan><tspan class="fg-ansi256-012 bold">= </tspan><tspan class="bold">help</tspan><tspan>: the trait `Iterator` is not implemented for `(bool, HashSet<u8>)`</tspan> +</tspan> + <tspan x="10px" y="154px"><tspan> </tspan><tspan class="fg-ansi256-012 bold">= </tspan><tspan class="bold">note</tspan><tspan>: required for `(bool, HashSet<u8>)` to implement `IntoIterator`</tspan> +</tspan> + <tspan x="10px" y="172px"><tspan class="fg-ansi256-010 bold">note</tspan><tspan>: required by a bound in `flatten`</tspan> +</tspan> + <tspan x="10px" y="190px"><tspan> </tspan><tspan class="fg-ansi256-012 bold">--> </tspan><tspan>$SRC_DIR/core/src/iter/traits/iterator.rs:LL:COL</tspan> +</tspan> + <tspan x="10px" y="208px"><tspan class="fg-ansi256-014 bold">help</tspan><tspan>: consider removing this method call, as the receiver has type `std::vec::IntoIter<HashSet<u8>>` and `std::vec::IntoIter<HashSet<u8>>: Iterator` trivially holds</tspan> +</tspan> + <tspan x="10px" y="226px"><tspan> </tspan><tspan class="fg-ansi256-012 bold">|</tspan> +</tspan> + <tspan x="10px" y="244px"><tspan class="fg-ansi256-012 bold">LL</tspan><tspan> </tspan><tspan class="fg-ansi256-009">- </tspan><tspan> ts.into_iter()</tspan> +</tspan> + <tspan x="10px" y="262px"><tspan class="fg-ansi256-012 bold">LL</tspan><tspan> </tspan><tspan class="fg-ansi256-009">- .map(|t| {</tspan> +</tspan> + <tspan x="10px" y="280px"><tspan class="fg-ansi256-012 bold">LL</tspan><tspan> </tspan><tspan class="fg-ansi256-009">- (</tspan> +</tspan> + <tspan x="10px" y="298px"><tspan class="fg-ansi256-012 bold">LL</tspan><tspan> </tspan><tspan class="fg-ansi256-009">- is_true,</tspan> +</tspan> + <tspan x="10px" y="316px"><tspan class="fg-ansi256-012 bold">LL</tspan><tspan> </tspan><tspan class="fg-ansi256-009">- t,</tspan> +</tspan> + <tspan x="10px" y="334px"><tspan class="fg-ansi256-012 bold">LL</tspan><tspan> </tspan><tspan class="fg-ansi256-009">- )</tspan> +</tspan> + <tspan x="10px" y="352px"><tspan class="fg-ansi256-012 bold">LL</tspan><tspan> </tspan><tspan class="fg-ansi256-009">- })</tspan><tspan>.flatten()</tspan> +</tspan> + <tspan x="10px" y="370px"><tspan class="fg-ansi256-012 bold">LL</tspan><tspan> </tspan><tspan class="fg-ansi256-010">+ </tspan><tspan> ts.into_iter().flatten()</tspan> +</tspan> + <tspan x="10px" y="388px"><tspan> </tspan><tspan class="fg-ansi256-012 bold">|</tspan> +</tspan> + <tspan x="10px" y="406px"> +</tspan> + <tspan x="10px" y="424px"><tspan class="fg-ansi256-009 bold">error[E0277]</tspan><tspan class="bold">: `(bool, HashSet<u8>)` is not an iterator</tspan> +</tspan> + <tspan x="10px" y="442px"><tspan> </tspan><tspan class="fg-ansi256-012 bold">--> </tspan><tspan>$DIR/multiline-removal-suggestion.rs:13:2</tspan> +</tspan> + <tspan x="10px" y="460px"><tspan> </tspan><tspan class="fg-ansi256-012 bold">|</tspan> +</tspan> + <tspan x="10px" y="478px"><tspan class="fg-ansi256-012 bold">LL</tspan><tspan> </tspan><tspan class="fg-ansi256-012 bold">|</tspan><tspan> </tspan><tspan class="fg-ansi256-009 bold">/</tspan><tspan> hm.into_iter()</tspan> +</tspan> + <tspan x="10px" y="496px"><tspan class="fg-ansi256-012 bold">LL</tspan><tspan> </tspan><tspan class="fg-ansi256-012 bold">|</tspan><tspan> </tspan><tspan class="fg-ansi256-009 bold">|</tspan><tspan> .map(|(is_true, ts)| {</tspan> +</tspan> + <tspan x="10px" y="514px"><tspan class="fg-ansi256-012 bold">LL</tspan><tspan> </tspan><tspan class="fg-ansi256-012 bold">|</tspan><tspan> </tspan><tspan class="fg-ansi256-009 bold">|</tspan><tspan> ts.into_iter()</tspan> +</tspan> + <tspan x="10px" y="532px"><tspan class="fg-ansi256-012 bold">LL</tspan><tspan> </tspan><tspan class="fg-ansi256-012 bold">|</tspan><tspan> </tspan><tspan class="fg-ansi256-009 bold">|</tspan><tspan> .map(|t| {</tspan> +</tspan> + <tspan x="10px" y="550px"><tspan class="fg-ansi256-012 bold">...</tspan><tspan> </tspan><tspan class="fg-ansi256-009 bold">|</tspan> +</tspan> + <tspan x="10px" y="568px"><tspan class="fg-ansi256-012 bold">LL</tspan><tspan> </tspan><tspan class="fg-ansi256-012 bold">|</tspan><tspan> </tspan><tspan class="fg-ansi256-009 bold">|</tspan><tspan> }).flatten()</tspan> +</tspan> + <tspan x="10px" y="586px"><tspan class="fg-ansi256-012 bold">LL</tspan><tspan> </tspan><tspan class="fg-ansi256-012 bold">|</tspan><tspan> </tspan><tspan class="fg-ansi256-009 bold">|</tspan><tspan> })</tspan> +</tspan> + <tspan x="10px" y="604px"><tspan> </tspan><tspan class="fg-ansi256-012 bold">|</tspan><tspan> </tspan><tspan class="fg-ansi256-009 bold">|__________^</tspan><tspan> </tspan><tspan class="fg-ansi256-009 bold">`(bool, HashSet<u8>)` is not an iterator</tspan> +</tspan> + <tspan x="10px" y="622px"><tspan> </tspan><tspan class="fg-ansi256-012 bold">|</tspan> +</tspan> + <tspan x="10px" y="640px"><tspan> </tspan><tspan class="fg-ansi256-012 bold">= </tspan><tspan class="bold">help</tspan><tspan>: the trait `Iterator` is not implemented for `(bool, HashSet<u8>)`</tspan> +</tspan> + <tspan x="10px" y="658px"><tspan> </tspan><tspan class="fg-ansi256-012 bold">= </tspan><tspan class="bold">note</tspan><tspan>: required for `(bool, HashSet<u8>)` to implement `IntoIterator`</tspan> +</tspan> + <tspan x="10px" y="676px"><tspan class="fg-ansi256-010 bold">note</tspan><tspan>: required by a bound in `Flatten`</tspan> +</tspan> + <tspan x="10px" y="694px"><tspan> </tspan><tspan class="fg-ansi256-012 bold">--> </tspan><tspan>$SRC_DIR/core/src/iter/adapters/flatten.rs:LL:COL</tspan> +</tspan> + <tspan x="10px" y="712px"> +</tspan> + <tspan x="10px" y="730px"><tspan class="fg-ansi256-009 bold">error[E0599]</tspan><tspan class="bold">: the method `collect` exists for struct `Flatten<Map<IntoIter<bool, Vec<HashSet<u8>>>, {closure@multiline-removal-suggestion.rs:14:8}>>`, but its trait bounds were not satisfied</tspan> +</tspan> + <tspan x="10px" y="748px"><tspan> </tspan><tspan class="fg-ansi256-012 bold">--> </tspan><tspan>$DIR/multiline-removal-suggestion.rs:24:4</tspan> +</tspan> + <tspan x="10px" y="766px"><tspan> </tspan><tspan class="fg-ansi256-012 bold">|</tspan> +</tspan> + <tspan x="10px" y="784px"><tspan class="fg-ansi256-012 bold">LL</tspan><tspan> </tspan><tspan class="fg-ansi256-012 bold">|</tspan><tspan> </tspan><tspan class="fg-ansi256-012 bold">/</tspan><tspan> hm.into_iter()</tspan> +</tspan> + <tspan x="10px" y="802px"><tspan class="fg-ansi256-012 bold">LL</tspan><tspan> </tspan><tspan class="fg-ansi256-012 bold">|</tspan><tspan> </tspan><tspan class="fg-ansi256-012 bold">|</tspan><tspan> .map(|(is_true, ts)| {</tspan> +</tspan> + <tspan x="10px" y="820px"><tspan class="fg-ansi256-012 bold">LL</tspan><tspan> </tspan><tspan class="fg-ansi256-012 bold">|</tspan><tspan> </tspan><tspan class="fg-ansi256-012 bold">|</tspan><tspan> ts.into_iter()</tspan> +</tspan> + <tspan x="10px" y="838px"><tspan class="fg-ansi256-012 bold">LL</tspan><tspan> </tspan><tspan class="fg-ansi256-012 bold">|</tspan><tspan> </tspan><tspan class="fg-ansi256-012 bold">|</tspan><tspan> .map(|t| {</tspan> +</tspan> + <tspan x="10px" y="856px"><tspan class="fg-ansi256-012 bold">...</tspan><tspan> </tspan><tspan class="fg-ansi256-012 bold">|</tspan> +</tspan> + <tspan x="10px" y="874px"><tspan class="fg-ansi256-012 bold">LL</tspan><tspan> </tspan><tspan class="fg-ansi256-012 bold">|</tspan><tspan> </tspan><tspan class="fg-ansi256-012 bold">|</tspan><tspan> .flatten()</tspan> +</tspan> + <tspan x="10px" y="892px"><tspan class="fg-ansi256-012 bold">LL</tspan><tspan> </tspan><tspan class="fg-ansi256-012 bold">|</tspan><tspan> </tspan><tspan class="fg-ansi256-012 bold">|</tspan><tspan> .collect()</tspan> +</tspan> + <tspan x="10px" y="910px"><tspan> </tspan><tspan class="fg-ansi256-012 bold">|</tspan><tspan> </tspan><tspan class="fg-ansi256-012 bold">|</tspan><tspan> </tspan><tspan class="fg-ansi256-012 bold">-</tspan><tspan class="fg-ansi256-009 bold">^^^^^^^</tspan><tspan> </tspan><tspan class="fg-ansi256-009 bold">method cannot be called due to unsatisfied trait bounds</tspan> +</tspan> + <tspan x="10px" y="928px"><tspan> </tspan><tspan class="fg-ansi256-012 bold">|</tspan><tspan> </tspan><tspan class="fg-ansi256-012 bold">|_________|</tspan> +</tspan> + <tspan x="10px" y="946px"><tspan> </tspan><tspan class="fg-ansi256-012 bold">|</tspan> +</tspan> + <tspan x="10px" y="964px"><tspan> </tspan><tspan class="fg-ansi256-012 bold">|</tspan> +</tspan> + <tspan x="10px" y="982px"><tspan> </tspan><tspan class="fg-ansi256-012 bold">= </tspan><tspan class="bold">note</tspan><tspan>: the following trait bounds were not satisfied:</tspan> +</tspan> + <tspan x="10px" y="1000px"><tspan> `<Flatten<Map<std::vec::IntoIter<HashSet<u8>>, {closure@$DIR/multiline-removal-suggestion.rs:16:10: 16:13}>> as IntoIterator>::IntoIter = _`</tspan> +</tspan> + <tspan x="10px" y="1018px"><tspan> which is required by `Flatten<Map<std::collections::hash_map::IntoIter<bool, Vec<HashSet<u8>>>, {closure@$DIR/multiline-removal-suggestion.rs:14:8: 14:23}>>: Iterator`</tspan> +</tspan> + <tspan x="10px" y="1036px"><tspan> `<Flatten<Map<std::vec::IntoIter<HashSet<u8>>, {closure@$DIR/multiline-removal-suggestion.rs:16:10: 16:13}>> as IntoIterator>::Item = _`</tspan> +</tspan> + <tspan x="10px" y="1054px"><tspan> which is required by `Flatten<Map<std::collections::hash_map::IntoIter<bool, Vec<HashSet<u8>>>, {closure@$DIR/multiline-removal-suggestion.rs:14:8: 14:23}>>: Iterator`</tspan> +</tspan> + <tspan x="10px" y="1072px"><tspan> `Flatten<Map<std::vec::IntoIter<HashSet<u8>>, {closure@$DIR/multiline-removal-suggestion.rs:16:10: 16:13}>>: IntoIterator`</tspan> +</tspan> + <tspan x="10px" y="1090px"><tspan> which is required by `Flatten<Map<std::collections::hash_map::IntoIter<bool, Vec<HashSet<u8>>>, {closure@$DIR/multiline-removal-suggestion.rs:14:8: 14:23}>>: Iterator`</tspan> +</tspan> + <tspan x="10px" y="1108px"><tspan> `Flatten<Map<std::collections::hash_map::IntoIter<bool, Vec<HashSet<u8>>>, {closure@$DIR/multiline-removal-suggestion.rs:14:8: 14:23}>>: Iterator`</tspan> +</tspan> + <tspan x="10px" y="1126px"><tspan> which is required by `&mut Flatten<Map<std::collections::hash_map::IntoIter<bool, Vec<HashSet<u8>>>, {closure@$DIR/multiline-removal-suggestion.rs:14:8: 14:23}>>: Iterator`</tspan> +</tspan> + <tspan x="10px" y="1144px"> +</tspan> + <tspan x="10px" y="1162px"><tspan class="fg-ansi256-009 bold">error[E0277]</tspan><tspan class="bold">: `(bool, HashSet<u8>)` is not an iterator</tspan> +</tspan> + <tspan x="10px" y="1180px"><tspan> </tspan><tspan class="fg-ansi256-012 bold">--> </tspan><tspan>$DIR/multiline-removal-suggestion.rs:32:6</tspan> +</tspan> + <tspan x="10px" y="1198px"><tspan> </tspan><tspan class="fg-ansi256-012 bold">|</tspan> +</tspan> + <tspan x="10px" y="1216px"><tspan class="fg-ansi256-012 bold">LL</tspan><tspan> </tspan><tspan class="fg-ansi256-012 bold">|</tspan><tspan> .flatten()</tspan> +</tspan> + <tspan x="10px" y="1234px"><tspan> </tspan><tspan class="fg-ansi256-012 bold">|</tspan><tspan> </tspan><tspan class="fg-ansi256-009 bold">^^^^^^^</tspan><tspan> </tspan><tspan class="fg-ansi256-009 bold">`(bool, HashSet<u8>)` is not an iterator</tspan> +</tspan> + <tspan x="10px" y="1252px"><tspan> </tspan><tspan class="fg-ansi256-012 bold">|</tspan> +</tspan> + <tspan x="10px" y="1270px"><tspan> </tspan><tspan class="fg-ansi256-012 bold">= </tspan><tspan class="bold">help</tspan><tspan>: the trait `Iterator` is not implemented for `(bool, HashSet<u8>)`</tspan> +</tspan> + <tspan x="10px" y="1288px"><tspan> </tspan><tspan class="fg-ansi256-012 bold">= </tspan><tspan class="bold">note</tspan><tspan>: required for `(bool, HashSet<u8>)` to implement `IntoIterator`</tspan> +</tspan> + <tspan x="10px" y="1306px"><tspan class="fg-ansi256-010 bold">note</tspan><tspan>: required by a bound in `flatten`</tspan> +</tspan> + <tspan x="10px" y="1324px"><tspan> </tspan><tspan class="fg-ansi256-012 bold">--> </tspan><tspan>$SRC_DIR/core/src/iter/traits/iterator.rs:LL:COL</tspan> +</tspan> + <tspan x="10px" y="1342px"><tspan class="fg-ansi256-014 bold">help</tspan><tspan>: consider removing this method call, as the receiver has type `std::vec::IntoIter<HashSet<u8>>` and `std::vec::IntoIter<HashSet<u8>>: Iterator` trivially holds</tspan> +</tspan> + <tspan x="10px" y="1360px"><tspan> </tspan><tspan class="fg-ansi256-012 bold">|</tspan> +</tspan> + <tspan x="10px" y="1378px"><tspan class="fg-ansi256-012 bold">LL</tspan><tspan> </tspan><tspan class="fg-ansi256-009">- </tspan><tspan> ts.into_iter()</tspan> +</tspan> + <tspan x="10px" y="1396px"><tspan class="fg-ansi256-012 bold">LL</tspan><tspan> </tspan><tspan class="fg-ansi256-009">- .map(|t| (is_true, t))</tspan> +</tspan> + <tspan x="10px" y="1414px"><tspan class="fg-ansi256-012 bold">LL</tspan><tspan> </tspan><tspan class="fg-ansi256-010">+ </tspan><tspan> ts.into_iter()</tspan> +</tspan> + <tspan x="10px" y="1432px"><tspan> </tspan><tspan class="fg-ansi256-012 bold">|</tspan> +</tspan> + <tspan x="10px" y="1450px"> +</tspan> + <tspan x="10px" y="1468px"><tspan class="fg-ansi256-009 bold">error[E0277]</tspan><tspan class="bold">: `(bool, HashSet<u8>)` is not an iterator</tspan> +</tspan> + <tspan x="10px" y="1486px"><tspan> </tspan><tspan class="fg-ansi256-012 bold">--> </tspan><tspan>$DIR/multiline-removal-suggestion.rs:28:2</tspan> +</tspan> + <tspan x="10px" y="1504px"><tspan> </tspan><tspan class="fg-ansi256-012 bold">|</tspan> +</tspan> + <tspan x="10px" y="1522px"><tspan class="fg-ansi256-012 bold">LL</tspan><tspan> </tspan><tspan class="fg-ansi256-012 bold">|</tspan><tspan> </tspan><tspan class="fg-ansi256-009 bold">/</tspan><tspan> hm.into_iter()</tspan> +</tspan> + <tspan x="10px" y="1540px"><tspan class="fg-ansi256-012 bold">LL</tspan><tspan> </tspan><tspan class="fg-ansi256-012 bold">|</tspan><tspan> </tspan><tspan class="fg-ansi256-009 bold">|</tspan><tspan> .map(|(is_true, ts)| {</tspan> +</tspan> + <tspan x="10px" y="1558px"><tspan class="fg-ansi256-012 bold">LL</tspan><tspan> </tspan><tspan class="fg-ansi256-012 bold">|</tspan><tspan> </tspan><tspan class="fg-ansi256-009 bold">|</tspan><tspan> ts.into_iter()</tspan> +</tspan> + <tspan x="10px" y="1576px"><tspan class="fg-ansi256-012 bold">LL</tspan><tspan> </tspan><tspan class="fg-ansi256-012 bold">|</tspan><tspan> </tspan><tspan class="fg-ansi256-009 bold">|</tspan><tspan> .map(|t| (is_true, t))</tspan> +</tspan> + <tspan x="10px" y="1594px"><tspan class="fg-ansi256-012 bold">LL</tspan><tspan> </tspan><tspan class="fg-ansi256-012 bold">|</tspan><tspan> </tspan><tspan class="fg-ansi256-009 bold">|</tspan><tspan> .flatten()</tspan> +</tspan> + <tspan x="10px" y="1612px"><tspan class="fg-ansi256-012 bold">LL</tspan><tspan> </tspan><tspan class="fg-ansi256-012 bold">|</tspan><tspan> </tspan><tspan class="fg-ansi256-009 bold">|</tspan><tspan> })</tspan> +</tspan> + <tspan x="10px" y="1630px"><tspan> </tspan><tspan class="fg-ansi256-012 bold">|</tspan><tspan> </tspan><tspan class="fg-ansi256-009 bold">|__________^</tspan><tspan> </tspan><tspan class="fg-ansi256-009 bold">`(bool, HashSet<u8>)` is not an iterator</tspan> +</tspan> + <tspan x="10px" y="1648px"><tspan> </tspan><tspan class="fg-ansi256-012 bold">|</tspan> +</tspan> + <tspan x="10px" y="1666px"><tspan> </tspan><tspan class="fg-ansi256-012 bold">= </tspan><tspan class="bold">help</tspan><tspan>: the trait `Iterator` is not implemented for `(bool, HashSet<u8>)`</tspan> +</tspan> + <tspan x="10px" y="1684px"><tspan> </tspan><tspan class="fg-ansi256-012 bold">= </tspan><tspan class="bold">note</tspan><tspan>: required for `(bool, HashSet<u8>)` to implement `IntoIterator`</tspan> +</tspan> + <tspan x="10px" y="1702px"><tspan class="fg-ansi256-010 bold">note</tspan><tspan>: required by a bound in `Flatten`</tspan> +</tspan> + <tspan x="10px" y="1720px"><tspan> </tspan><tspan class="fg-ansi256-012 bold">--> </tspan><tspan>$SRC_DIR/core/src/iter/adapters/flatten.rs:LL:COL</tspan> +</tspan> + <tspan x="10px" y="1738px"> +</tspan> + <tspan x="10px" y="1756px"><tspan class="fg-ansi256-009 bold">error[E0599]</tspan><tspan class="bold">: the method `collect` exists for struct `Flatten<Map<IntoIter<bool, Vec<HashSet<u8>>>, {closure@multiline-removal-suggestion.rs:29:8}>>`, but its trait bounds were not satisfied</tspan> +</tspan> + <tspan x="10px" y="1774px"><tspan> </tspan><tspan class="fg-ansi256-012 bold">--> </tspan><tspan>$DIR/multiline-removal-suggestion.rs:35:4</tspan> +</tspan> + <tspan x="10px" y="1792px"><tspan> </tspan><tspan class="fg-ansi256-012 bold">|</tspan> +</tspan> + <tspan x="10px" y="1810px"><tspan class="fg-ansi256-012 bold">LL</tspan><tspan> </tspan><tspan class="fg-ansi256-012 bold">|</tspan><tspan> </tspan><tspan class="fg-ansi256-012 bold">/</tspan><tspan> hm.into_iter()</tspan> +</tspan> + <tspan x="10px" y="1828px"><tspan class="fg-ansi256-012 bold">LL</tspan><tspan> </tspan><tspan class="fg-ansi256-012 bold">|</tspan><tspan> </tspan><tspan class="fg-ansi256-012 bold">|</tspan><tspan> .map(|(is_true, ts)| {</tspan> +</tspan> + <tspan x="10px" y="1846px"><tspan class="fg-ansi256-012 bold">LL</tspan><tspan> </tspan><tspan class="fg-ansi256-012 bold">|</tspan><tspan> </tspan><tspan class="fg-ansi256-012 bold">|</tspan><tspan> ts.into_iter()</tspan> +</tspan> + <tspan x="10px" y="1864px"><tspan class="fg-ansi256-012 bold">LL</tspan><tspan> </tspan><tspan class="fg-ansi256-012 bold">|</tspan><tspan> </tspan><tspan class="fg-ansi256-012 bold">|</tspan><tspan> .map(|t| (is_true, t))</tspan> +</tspan> + <tspan x="10px" y="1882px"><tspan class="fg-ansi256-012 bold">...</tspan><tspan> </tspan><tspan class="fg-ansi256-012 bold">|</tspan> +</tspan> + <tspan x="10px" y="1900px"><tspan class="fg-ansi256-012 bold">LL</tspan><tspan> </tspan><tspan class="fg-ansi256-012 bold">|</tspan><tspan> </tspan><tspan class="fg-ansi256-012 bold">|</tspan><tspan> .flatten()</tspan> +</tspan> + <tspan x="10px" y="1918px"><tspan class="fg-ansi256-012 bold">LL</tspan><tspan> </tspan><tspan class="fg-ansi256-012 bold">|</tspan><tspan> </tspan><tspan class="fg-ansi256-012 bold">|</tspan><tspan> .collect()</tspan> +</tspan> + <tspan x="10px" y="1936px"><tspan> </tspan><tspan class="fg-ansi256-012 bold">|</tspan><tspan> </tspan><tspan class="fg-ansi256-012 bold">|</tspan><tspan> </tspan><tspan class="fg-ansi256-012 bold">-</tspan><tspan class="fg-ansi256-009 bold">^^^^^^^</tspan><tspan> </tspan><tspan class="fg-ansi256-009 bold">method cannot be called due to unsatisfied trait bounds</tspan> +</tspan> + <tspan x="10px" y="1954px"><tspan> </tspan><tspan class="fg-ansi256-012 bold">|</tspan><tspan> </tspan><tspan class="fg-ansi256-012 bold">|_________|</tspan> +</tspan> + <tspan x="10px" y="1972px"><tspan> </tspan><tspan class="fg-ansi256-012 bold">|</tspan> +</tspan> + <tspan x="10px" y="1990px"><tspan> </tspan><tspan class="fg-ansi256-012 bold">|</tspan> +</tspan> + <tspan x="10px" y="2008px"><tspan> </tspan><tspan class="fg-ansi256-012 bold">= </tspan><tspan class="bold">note</tspan><tspan>: the following trait bounds were not satisfied:</tspan> +</tspan> + <tspan x="10px" y="2026px"><tspan> `<Flatten<Map<std::vec::IntoIter<HashSet<u8>>, {closure@$DIR/multiline-removal-suggestion.rs:31:10: 31:13}>> as IntoIterator>::IntoIter = _`</tspan> +</tspan> + <tspan x="10px" y="2044px"><tspan> which is required by `Flatten<Map<std::collections::hash_map::IntoIter<bool, Vec<HashSet<u8>>>, {closure@$DIR/multiline-removal-suggestion.rs:29:8: 29:23}>>: Iterator`</tspan> +</tspan> + <tspan x="10px" y="2062px"><tspan> `<Flatten<Map<std::vec::IntoIter<HashSet<u8>>, {closure@$DIR/multiline-removal-suggestion.rs:31:10: 31:13}>> as IntoIterator>::Item = _`</tspan> +</tspan> + <tspan x="10px" y="2080px"><tspan> which is required by `Flatten<Map<std::collections::hash_map::IntoIter<bool, Vec<HashSet<u8>>>, {closure@$DIR/multiline-removal-suggestion.rs:29:8: 29:23}>>: Iterator`</tspan> +</tspan> + <tspan x="10px" y="2098px"><tspan> `Flatten<Map<std::vec::IntoIter<HashSet<u8>>, {closure@$DIR/multiline-removal-suggestion.rs:31:10: 31:13}>>: IntoIterator`</tspan> +</tspan> + <tspan x="10px" y="2116px"><tspan> which is required by `Flatten<Map<std::collections::hash_map::IntoIter<bool, Vec<HashSet<u8>>>, {closure@$DIR/multiline-removal-suggestion.rs:29:8: 29:23}>>: Iterator`</tspan> +</tspan> + <tspan x="10px" y="2134px"><tspan> `Flatten<Map<std::collections::hash_map::IntoIter<bool, Vec<HashSet<u8>>>, {closure@$DIR/multiline-removal-suggestion.rs:29:8: 29:23}>>: Iterator`</tspan> +</tspan> + <tspan x="10px" y="2152px"><tspan> which is required by `&mut Flatten<Map<std::collections::hash_map::IntoIter<bool, Vec<HashSet<u8>>>, {closure@$DIR/multiline-removal-suggestion.rs:29:8: 29:23}>>: Iterator`</tspan> +</tspan> + <tspan x="10px" y="2170px"> +</tspan> + <tspan x="10px" y="2188px"><tspan class="fg-ansi256-009 bold">error[E0277]</tspan><tspan class="bold">: `(bool, HashSet<u8>)` is not an iterator</tspan> +</tspan> + <tspan x="10px" y="2206px"><tspan> </tspan><tspan class="fg-ansi256-012 bold">--> </tspan><tspan>$DIR/multiline-removal-suggestion.rs:43:7</tspan> +</tspan> + <tspan x="10px" y="2224px"><tspan> </tspan><tspan class="fg-ansi256-012 bold">|</tspan> +</tspan> + <tspan x="10px" y="2242px"><tspan class="fg-ansi256-012 bold">LL</tspan><tspan> </tspan><tspan class="fg-ansi256-012 bold">|</tspan><tspan> }).flatten()</tspan> +</tspan> + <tspan x="10px" y="2260px"><tspan> </tspan><tspan class="fg-ansi256-012 bold">|</tspan><tspan> </tspan><tspan class="fg-ansi256-009 bold">^^^^^^^</tspan><tspan> </tspan><tspan class="fg-ansi256-009 bold">`(bool, HashSet<u8>)` is not an iterator</tspan> +</tspan> + <tspan x="10px" y="2278px"><tspan> </tspan><tspan class="fg-ansi256-012 bold">|</tspan> +</tspan> + <tspan x="10px" y="2296px"><tspan> </tspan><tspan class="fg-ansi256-012 bold">= </tspan><tspan class="bold">help</tspan><tspan>: the trait `Iterator` is not implemented for `(bool, HashSet<u8>)`</tspan> +</tspan> + <tspan x="10px" y="2314px"><tspan> </tspan><tspan class="fg-ansi256-012 bold">= </tspan><tspan class="bold">note</tspan><tspan>: required for `(bool, HashSet<u8>)` to implement `IntoIterator`</tspan> +</tspan> + <tspan x="10px" y="2332px"><tspan class="fg-ansi256-010 bold">note</tspan><tspan>: required by a bound in `flatten`</tspan> +</tspan> + <tspan x="10px" y="2350px"><tspan> </tspan><tspan class="fg-ansi256-012 bold">--> </tspan><tspan>$SRC_DIR/core/src/iter/traits/iterator.rs:LL:COL</tspan> +</tspan> + <tspan x="10px" y="2368px"><tspan class="fg-ansi256-014 bold">help</tspan><tspan>: consider removing this method call, as the receiver has type `std::vec::IntoIter<HashSet<u8>>` and `std::vec::IntoIter<HashSet<u8>>: Iterator` trivially holds</tspan> +</tspan> + <tspan x="10px" y="2386px"><tspan> </tspan><tspan class="fg-ansi256-012 bold">|</tspan> +</tspan> + <tspan x="10px" y="2404px"><tspan class="fg-ansi256-012 bold">LL</tspan><tspan> </tspan><tspan class="fg-ansi256-009">- </tspan><tspan> ts.into_iter()</tspan><tspan class="fg-ansi256-009">.map(|t| {</tspan> +</tspan> + <tspan x="10px" y="2422px"><tspan class="fg-ansi256-012 bold">LL</tspan><tspan> </tspan><tspan class="fg-ansi256-009">- (is_true, t)</tspan> +</tspan> + <tspan x="10px" y="2440px"><tspan class="fg-ansi256-012 bold">LL</tspan><tspan> </tspan><tspan class="fg-ansi256-009">- })</tspan><tspan>.flatten()</tspan> +</tspan> + <tspan x="10px" y="2458px"><tspan class="fg-ansi256-012 bold">LL</tspan><tspan> </tspan><tspan class="fg-ansi256-010">+ </tspan><tspan> ts.into_iter().flatten()</tspan> +</tspan> + <tspan x="10px" y="2476px"><tspan> </tspan><tspan class="fg-ansi256-012 bold">|</tspan> +</tspan> + <tspan x="10px" y="2494px"> +</tspan> + <tspan x="10px" y="2512px"><tspan class="fg-ansi256-009 bold">error[E0277]</tspan><tspan class="bold">: `(bool, HashSet<u8>)` is not an iterator</tspan> +</tspan> + <tspan x="10px" y="2530px"><tspan> </tspan><tspan class="fg-ansi256-012 bold">--> </tspan><tspan>$DIR/multiline-removal-suggestion.rs:39:2</tspan> +</tspan> + <tspan x="10px" y="2548px"><tspan> </tspan><tspan class="fg-ansi256-012 bold">|</tspan> +</tspan> + <tspan x="10px" y="2566px"><tspan class="fg-ansi256-012 bold">LL</tspan><tspan> </tspan><tspan class="fg-ansi256-012 bold">|</tspan><tspan> </tspan><tspan class="fg-ansi256-009 bold">/</tspan><tspan> hm.into_iter()</tspan> +</tspan> + <tspan x="10px" y="2584px"><tspan class="fg-ansi256-012 bold">LL</tspan><tspan> </tspan><tspan class="fg-ansi256-012 bold">|</tspan><tspan> </tspan><tspan class="fg-ansi256-009 bold">|</tspan><tspan> .map(|(is_true, ts)| {</tspan> +</tspan> + <tspan x="10px" y="2602px"><tspan class="fg-ansi256-012 bold">LL</tspan><tspan> </tspan><tspan class="fg-ansi256-012 bold">|</tspan><tspan> </tspan><tspan class="fg-ansi256-009 bold">|</tspan><tspan> ts.into_iter().map(|t| {</tspan> +</tspan> + <tspan x="10px" y="2620px"><tspan class="fg-ansi256-012 bold">LL</tspan><tspan> </tspan><tspan class="fg-ansi256-012 bold">|</tspan><tspan> </tspan><tspan class="fg-ansi256-009 bold">|</tspan><tspan> (is_true, t)</tspan> +</tspan> + <tspan x="10px" y="2638px"><tspan class="fg-ansi256-012 bold">LL</tspan><tspan> </tspan><tspan class="fg-ansi256-012 bold">|</tspan><tspan> </tspan><tspan class="fg-ansi256-009 bold">|</tspan><tspan> }).flatten()</tspan> +</tspan> + <tspan x="10px" y="2656px"><tspan class="fg-ansi256-012 bold">LL</tspan><tspan> </tspan><tspan class="fg-ansi256-012 bold">|</tspan><tspan> </tspan><tspan class="fg-ansi256-009 bold">|</tspan><tspan> })</tspan> +</tspan> + <tspan x="10px" y="2674px"><tspan> </tspan><tspan class="fg-ansi256-012 bold">|</tspan><tspan> </tspan><tspan class="fg-ansi256-009 bold">|__________^</tspan><tspan> </tspan><tspan class="fg-ansi256-009 bold">`(bool, HashSet<u8>)` is not an iterator</tspan> +</tspan> + <tspan x="10px" y="2692px"><tspan> </tspan><tspan class="fg-ansi256-012 bold">|</tspan> +</tspan> + <tspan x="10px" y="2710px"><tspan> </tspan><tspan class="fg-ansi256-012 bold">= </tspan><tspan class="bold">help</tspan><tspan>: the trait `Iterator` is not implemented for `(bool, HashSet<u8>)`</tspan> +</tspan> + <tspan x="10px" y="2728px"><tspan> </tspan><tspan class="fg-ansi256-012 bold">= </tspan><tspan class="bold">note</tspan><tspan>: required for `(bool, HashSet<u8>)` to implement `IntoIterator`</tspan> +</tspan> + <tspan x="10px" y="2746px"><tspan class="fg-ansi256-010 bold">note</tspan><tspan>: required by a bound in `Flatten`</tspan> +</tspan> + <tspan x="10px" y="2764px"><tspan> </tspan><tspan class="fg-ansi256-012 bold">--> </tspan><tspan>$SRC_DIR/core/src/iter/adapters/flatten.rs:LL:COL</tspan> +</tspan> + <tspan x="10px" y="2782px"> +</tspan> + <tspan x="10px" y="2800px"><tspan class="fg-ansi256-009 bold">error[E0599]</tspan><tspan class="bold">: the method `collect` exists for struct `Flatten<Map<IntoIter<bool, Vec<HashSet<u8>>>, {closure@multiline-removal-suggestion.rs:40:8}>>`, but its trait bounds were not satisfied</tspan> +</tspan> + <tspan x="10px" y="2818px"><tspan> </tspan><tspan class="fg-ansi256-012 bold">--> </tspan><tspan>$DIR/multiline-removal-suggestion.rs:46:4</tspan> +</tspan> + <tspan x="10px" y="2836px"><tspan> </tspan><tspan class="fg-ansi256-012 bold">|</tspan> +</tspan> + <tspan x="10px" y="2854px"><tspan class="fg-ansi256-012 bold">LL</tspan><tspan> </tspan><tspan class="fg-ansi256-012 bold">|</tspan><tspan> </tspan><tspan class="fg-ansi256-012 bold">/</tspan><tspan> hm.into_iter()</tspan> +</tspan> + <tspan x="10px" y="2872px"><tspan class="fg-ansi256-012 bold">LL</tspan><tspan> </tspan><tspan class="fg-ansi256-012 bold">|</tspan><tspan> </tspan><tspan class="fg-ansi256-012 bold">|</tspan><tspan> .map(|(is_true, ts)| {</tspan> +</tspan> + <tspan x="10px" y="2890px"><tspan class="fg-ansi256-012 bold">LL</tspan><tspan> </tspan><tspan class="fg-ansi256-012 bold">|</tspan><tspan> </tspan><tspan class="fg-ansi256-012 bold">|</tspan><tspan> ts.into_iter().map(|t| {</tspan> +</tspan> + <tspan x="10px" y="2908px"><tspan class="fg-ansi256-012 bold">LL</tspan><tspan> </tspan><tspan class="fg-ansi256-012 bold">|</tspan><tspan> </tspan><tspan class="fg-ansi256-012 bold">|</tspan><tspan> (is_true, t)</tspan> +</tspan> + <tspan x="10px" y="2926px"><tspan class="fg-ansi256-012 bold">...</tspan><tspan> </tspan><tspan class="fg-ansi256-012 bold">|</tspan> +</tspan> + <tspan x="10px" y="2944px"><tspan class="fg-ansi256-012 bold">LL</tspan><tspan> </tspan><tspan class="fg-ansi256-012 bold">|</tspan><tspan> </tspan><tspan class="fg-ansi256-012 bold">|</tspan><tspan> .flatten()</tspan> +</tspan> + <tspan x="10px" y="2962px"><tspan class="fg-ansi256-012 bold">LL</tspan><tspan> </tspan><tspan class="fg-ansi256-012 bold">|</tspan><tspan> </tspan><tspan class="fg-ansi256-012 bold">|</tspan><tspan> .collect()</tspan> +</tspan> + <tspan x="10px" y="2980px"><tspan> </tspan><tspan class="fg-ansi256-012 bold">|</tspan><tspan> </tspan><tspan class="fg-ansi256-012 bold">|</tspan><tspan> </tspan><tspan class="fg-ansi256-012 bold">-</tspan><tspan class="fg-ansi256-009 bold">^^^^^^^</tspan><tspan> </tspan><tspan class="fg-ansi256-009 bold">method cannot be called due to unsatisfied trait bounds</tspan> +</tspan> + <tspan x="10px" y="2998px"><tspan> </tspan><tspan class="fg-ansi256-012 bold">|</tspan><tspan> </tspan><tspan class="fg-ansi256-012 bold">|_________|</tspan> +</tspan> + <tspan x="10px" y="3016px"><tspan> </tspan><tspan class="fg-ansi256-012 bold">|</tspan> +</tspan> + <tspan x="10px" y="3034px"><tspan> </tspan><tspan class="fg-ansi256-012 bold">|</tspan> +</tspan> + <tspan x="10px" y="3052px"><tspan> </tspan><tspan class="fg-ansi256-012 bold">= </tspan><tspan class="bold">note</tspan><tspan>: the following trait bounds were not satisfied:</tspan> +</tspan> + <tspan x="10px" y="3070px"><tspan> `<Flatten<Map<std::vec::IntoIter<HashSet<u8>>, {closure@$DIR/multiline-removal-suggestion.rs:41:23: 41:26}>> as IntoIterator>::IntoIter = _`</tspan> +</tspan> + <tspan x="10px" y="3088px"><tspan> which is required by `Flatten<Map<std::collections::hash_map::IntoIter<bool, Vec<HashSet<u8>>>, {closure@$DIR/multiline-removal-suggestion.rs:40:8: 40:23}>>: Iterator`</tspan> +</tspan> + <tspan x="10px" y="3106px"><tspan> `<Flatten<Map<std::vec::IntoIter<HashSet<u8>>, {closure@$DIR/multiline-removal-suggestion.rs:41:23: 41:26}>> as IntoIterator>::Item = _`</tspan> +</tspan> + <tspan x="10px" y="3124px"><tspan> which is required by `Flatten<Map<std::collections::hash_map::IntoIter<bool, Vec<HashSet<u8>>>, {closure@$DIR/multiline-removal-suggestion.rs:40:8: 40:23}>>: Iterator`</tspan> +</tspan> + <tspan x="10px" y="3142px"><tspan> `Flatten<Map<std::vec::IntoIter<HashSet<u8>>, {closure@$DIR/multiline-removal-suggestion.rs:41:23: 41:26}>>: IntoIterator`</tspan> +</tspan> + <tspan x="10px" y="3160px"><tspan> which is required by `Flatten<Map<std::collections::hash_map::IntoIter<bool, Vec<HashSet<u8>>>, {closure@$DIR/multiline-removal-suggestion.rs:40:8: 40:23}>>: Iterator`</tspan> +</tspan> + <tspan x="10px" y="3178px"><tspan> `Flatten<Map<std::collections::hash_map::IntoIter<bool, Vec<HashSet<u8>>>, {closure@$DIR/multiline-removal-suggestion.rs:40:8: 40:23}>>: Iterator`</tspan> +</tspan> + <tspan x="10px" y="3196px"><tspan> which is required by `&mut Flatten<Map<std::collections::hash_map::IntoIter<bool, Vec<HashSet<u8>>>, {closure@$DIR/multiline-removal-suggestion.rs:40:8: 40:23}>>: Iterator`</tspan> +</tspan> + <tspan x="10px" y="3214px"> +</tspan> + <tspan x="10px" y="3232px"><tspan class="fg-ansi256-009 bold">error[E0277]</tspan><tspan class="bold">: `(bool, HashSet<u8>)` is not an iterator</tspan> +</tspan> + <tspan x="10px" y="3250px"><tspan> </tspan><tspan class="fg-ansi256-012 bold">--> </tspan><tspan>$DIR/multiline-removal-suggestion.rs:53:28</tspan> +</tspan> + <tspan x="10px" y="3268px"><tspan> </tspan><tspan class="fg-ansi256-012 bold">|</tspan> +</tspan> + <tspan x="10px" y="3286px"><tspan class="fg-ansi256-012 bold">LL</tspan><tspan> </tspan><tspan class="fg-ansi256-012 bold">|</tspan><tspan> .map(|t| (is_true, t)).flatten()</tspan> +</tspan> + <tspan x="10px" y="3304px"><tspan> </tspan><tspan class="fg-ansi256-012 bold">|</tspan><tspan> </tspan><tspan class="fg-ansi256-009 bold">^^^^^^^</tspan><tspan> </tspan><tspan class="fg-ansi256-009 bold">`(bool, HashSet<u8>)` is not an iterator</tspan> +</tspan> + <tspan x="10px" y="3322px"><tspan> </tspan><tspan class="fg-ansi256-012 bold">|</tspan> +</tspan> + <tspan x="10px" y="3340px"><tspan> </tspan><tspan class="fg-ansi256-012 bold">= </tspan><tspan class="bold">help</tspan><tspan>: the trait `Iterator` is not implemented for `(bool, HashSet<u8>)`</tspan> +</tspan> + <tspan x="10px" y="3358px"><tspan> </tspan><tspan class="fg-ansi256-012 bold">= </tspan><tspan class="bold">note</tspan><tspan>: required for `(bool, HashSet<u8>)` to implement `IntoIterator`</tspan> +</tspan> + <tspan x="10px" y="3376px"><tspan class="fg-ansi256-010 bold">note</tspan><tspan>: required by a bound in `flatten`</tspan> +</tspan> + <tspan x="10px" y="3394px"><tspan> </tspan><tspan class="fg-ansi256-012 bold">--> </tspan><tspan>$SRC_DIR/core/src/iter/traits/iterator.rs:LL:COL</tspan> +</tspan> + <tspan x="10px" y="3412px"><tspan class="fg-ansi256-014 bold">help</tspan><tspan>: consider removing this method call, as the receiver has type `std::vec::IntoIter<HashSet<u8>>` and `std::vec::IntoIter<HashSet<u8>>: Iterator` trivially holds</tspan> +</tspan> + <tspan x="10px" y="3430px"><tspan> </tspan><tspan class="fg-ansi256-012 bold">|</tspan> +</tspan> + <tspan x="10px" y="3448px"><tspan class="fg-ansi256-012 bold">LL</tspan><tspan> </tspan><tspan class="fg-ansi256-009">- </tspan><tspan> ts.into_iter()</tspan> +</tspan> + <tspan x="10px" y="3466px"><tspan class="fg-ansi256-012 bold">LL</tspan><tspan> </tspan><tspan class="fg-ansi256-009">- .map(|t| (is_true, t))</tspan><tspan>.flatten()</tspan> +</tspan> + <tspan x="10px" y="3484px"><tspan class="fg-ansi256-012 bold">LL</tspan><tspan> </tspan><tspan class="fg-ansi256-010">+ </tspan><tspan> ts.into_iter().flatten()</tspan> +</tspan> + <tspan x="10px" y="3502px"><tspan> </tspan><tspan class="fg-ansi256-012 bold">|</tspan> +</tspan> + <tspan x="10px" y="3520px"> +</tspan> + <tspan x="10px" y="3538px"><tspan class="fg-ansi256-009 bold">error[E0277]</tspan><tspan class="bold">: `(bool, HashSet<u8>)` is not an iterator</tspan> +</tspan> + <tspan x="10px" y="3556px"><tspan> </tspan><tspan class="fg-ansi256-012 bold">--> </tspan><tspan>$DIR/multiline-removal-suggestion.rs:50:2</tspan> +</tspan> + <tspan x="10px" y="3574px"><tspan> </tspan><tspan class="fg-ansi256-012 bold">|</tspan> +</tspan> + <tspan x="10px" y="3592px"><tspan class="fg-ansi256-012 bold">LL</tspan><tspan> </tspan><tspan class="fg-ansi256-012 bold">|</tspan><tspan> </tspan><tspan class="fg-ansi256-009 bold">/</tspan><tspan> hm.into_iter()</tspan> +</tspan> + <tspan x="10px" y="3610px"><tspan class="fg-ansi256-012 bold">LL</tspan><tspan> </tspan><tspan class="fg-ansi256-012 bold">|</tspan><tspan> </tspan><tspan class="fg-ansi256-009 bold">|</tspan><tspan> .map(|(is_true, ts)| {</tspan> +</tspan> + <tspan x="10px" y="3628px"><tspan class="fg-ansi256-012 bold">LL</tspan><tspan> </tspan><tspan class="fg-ansi256-012 bold">|</tspan><tspan> </tspan><tspan class="fg-ansi256-009 bold">|</tspan><tspan> ts.into_iter()</tspan> +</tspan> + <tspan x="10px" y="3646px"><tspan class="fg-ansi256-012 bold">LL</tspan><tspan> </tspan><tspan class="fg-ansi256-012 bold">|</tspan><tspan> </tspan><tspan class="fg-ansi256-009 bold">|</tspan><tspan> .map(|t| (is_true, t)).flatten()</tspan> +</tspan> + <tspan x="10px" y="3664px"><tspan class="fg-ansi256-012 bold">LL</tspan><tspan> </tspan><tspan class="fg-ansi256-012 bold">|</tspan><tspan> </tspan><tspan class="fg-ansi256-009 bold">|</tspan><tspan> })</tspan> +</tspan> + <tspan x="10px" y="3682px"><tspan> </tspan><tspan class="fg-ansi256-012 bold">|</tspan><tspan> </tspan><tspan class="fg-ansi256-009 bold">|__________^</tspan><tspan> </tspan><tspan class="fg-ansi256-009 bold">`(bool, HashSet<u8>)` is not an iterator</tspan> +</tspan> + <tspan x="10px" y="3700px"><tspan> </tspan><tspan class="fg-ansi256-012 bold">|</tspan> +</tspan> + <tspan x="10px" y="3718px"><tspan> </tspan><tspan class="fg-ansi256-012 bold">= </tspan><tspan class="bold">help</tspan><tspan>: the trait `Iterator` is not implemented for `(bool, HashSet<u8>)`</tspan> +</tspan> + <tspan x="10px" y="3736px"><tspan> </tspan><tspan class="fg-ansi256-012 bold">= </tspan><tspan class="bold">note</tspan><tspan>: required for `(bool, HashSet<u8>)` to implement `IntoIterator`</tspan> +</tspan> + <tspan x="10px" y="3754px"><tspan class="fg-ansi256-010 bold">note</tspan><tspan>: required by a bound in `Flatten`</tspan> +</tspan> + <tspan x="10px" y="3772px"><tspan> </tspan><tspan class="fg-ansi256-012 bold">--> </tspan><tspan>$SRC_DIR/core/src/iter/adapters/flatten.rs:LL:COL</tspan> +</tspan> + <tspan x="10px" y="3790px"> +</tspan> + <tspan x="10px" y="3808px"><tspan class="fg-ansi256-009 bold">error[E0599]</tspan><tspan class="bold">: the method `collect` exists for struct `Flatten<Map<IntoIter<bool, Vec<HashSet<u8>>>, {closure@multiline-removal-suggestion.rs:51:8}>>`, but its trait bounds were not satisfied</tspan> +</tspan> + <tspan x="10px" y="3826px"><tspan> </tspan><tspan class="fg-ansi256-012 bold">--> </tspan><tspan>$DIR/multiline-removal-suggestion.rs:56:4</tspan> +</tspan> + <tspan x="10px" y="3844px"><tspan> </tspan><tspan class="fg-ansi256-012 bold">|</tspan> +</tspan> + <tspan x="10px" y="3862px"><tspan class="fg-ansi256-012 bold">LL</tspan><tspan> </tspan><tspan class="fg-ansi256-012 bold">|</tspan><tspan> </tspan><tspan class="fg-ansi256-012 bold">/</tspan><tspan> hm.into_iter()</tspan> +</tspan> + <tspan x="10px" y="3880px"><tspan class="fg-ansi256-012 bold">LL</tspan><tspan> </tspan><tspan class="fg-ansi256-012 bold">|</tspan><tspan> </tspan><tspan class="fg-ansi256-012 bold">|</tspan><tspan> .map(|(is_true, ts)| {</tspan> +</tspan> + <tspan x="10px" y="3898px"><tspan class="fg-ansi256-012 bold">LL</tspan><tspan> </tspan><tspan class="fg-ansi256-012 bold">|</tspan><tspan> </tspan><tspan class="fg-ansi256-012 bold">|</tspan><tspan> ts.into_iter()</tspan> +</tspan> + <tspan x="10px" y="3916px"><tspan class="fg-ansi256-012 bold">LL</tspan><tspan> </tspan><tspan class="fg-ansi256-012 bold">|</tspan><tspan> </tspan><tspan class="fg-ansi256-012 bold">|</tspan><tspan> .map(|t| (is_true, t)).flatten()</tspan> +</tspan> + <tspan x="10px" y="3934px"><tspan class="fg-ansi256-012 bold">LL</tspan><tspan> </tspan><tspan class="fg-ansi256-012 bold">|</tspan><tspan> </tspan><tspan class="fg-ansi256-012 bold">|</tspan><tspan> })</tspan> +</tspan> + <tspan x="10px" y="3952px"><tspan class="fg-ansi256-012 bold">LL</tspan><tspan> </tspan><tspan class="fg-ansi256-012 bold">|</tspan><tspan> </tspan><tspan class="fg-ansi256-012 bold">|</tspan><tspan> .flatten()</tspan> +</tspan> + <tspan x="10px" y="3970px"><tspan class="fg-ansi256-012 bold">LL</tspan><tspan> </tspan><tspan class="fg-ansi256-012 bold">|</tspan><tspan> </tspan><tspan class="fg-ansi256-012 bold">|</tspan><tspan> .collect()</tspan> +</tspan> + <tspan x="10px" y="3988px"><tspan> </tspan><tspan class="fg-ansi256-012 bold">|</tspan><tspan> </tspan><tspan class="fg-ansi256-012 bold">|</tspan><tspan> </tspan><tspan class="fg-ansi256-012 bold">-</tspan><tspan class="fg-ansi256-009 bold">^^^^^^^</tspan><tspan> </tspan><tspan class="fg-ansi256-009 bold">method cannot be called due to unsatisfied trait bounds</tspan> +</tspan> + <tspan x="10px" y="4006px"><tspan> </tspan><tspan class="fg-ansi256-012 bold">|</tspan><tspan> </tspan><tspan class="fg-ansi256-012 bold">|_________|</tspan> +</tspan> + <tspan x="10px" y="4024px"><tspan> </tspan><tspan class="fg-ansi256-012 bold">|</tspan> +</tspan> + <tspan x="10px" y="4042px"><tspan> </tspan><tspan class="fg-ansi256-012 bold">|</tspan> +</tspan> + <tspan x="10px" y="4060px"><tspan> </tspan><tspan class="fg-ansi256-012 bold">= </tspan><tspan class="bold">note</tspan><tspan>: the following trait bounds were not satisfied:</tspan> +</tspan> + <tspan x="10px" y="4078px"><tspan> `<Flatten<Map<std::vec::IntoIter<HashSet<u8>>, {closure@$DIR/multiline-removal-suggestion.rs:53:10: 53:13}>> as IntoIterator>::IntoIter = _`</tspan> +</tspan> + <tspan x="10px" y="4096px"><tspan> which is required by `Flatten<Map<std::collections::hash_map::IntoIter<bool, Vec<HashSet<u8>>>, {closure@$DIR/multiline-removal-suggestion.rs:51:8: 51:23}>>: Iterator`</tspan> +</tspan> + <tspan x="10px" y="4114px"><tspan> `<Flatten<Map<std::vec::IntoIter<HashSet<u8>>, {closure@$DIR/multiline-removal-suggestion.rs:53:10: 53:13}>> as IntoIterator>::Item = _`</tspan> +</tspan> + <tspan x="10px" y="4132px"><tspan> which is required by `Flatten<Map<std::collections::hash_map::IntoIter<bool, Vec<HashSet<u8>>>, {closure@$DIR/multiline-removal-suggestion.rs:51:8: 51:23}>>: Iterator`</tspan> +</tspan> + <tspan x="10px" y="4150px"><tspan> `Flatten<Map<std::vec::IntoIter<HashSet<u8>>, {closure@$DIR/multiline-removal-suggestion.rs:53:10: 53:13}>>: IntoIterator`</tspan> +</tspan> + <tspan x="10px" y="4168px"><tspan> which is required by `Flatten<Map<std::collections::hash_map::IntoIter<bool, Vec<HashSet<u8>>>, {closure@$DIR/multiline-removal-suggestion.rs:51:8: 51:23}>>: Iterator`</tspan> +</tspan> + <tspan x="10px" y="4186px"><tspan> `Flatten<Map<std::collections::hash_map::IntoIter<bool, Vec<HashSet<u8>>>, {closure@$DIR/multiline-removal-suggestion.rs:51:8: 51:23}>>: Iterator`</tspan> +</tspan> + <tspan x="10px" y="4204px"><tspan> which is required by `&mut Flatten<Map<std::collections::hash_map::IntoIter<bool, Vec<HashSet<u8>>>, {closure@$DIR/multiline-removal-suggestion.rs:51:8: 51:23}>>: Iterator`</tspan> +</tspan> + <tspan x="10px" y="4222px"> +</tspan> + <tspan x="10px" y="4240px"><tspan class="fg-ansi256-009 bold">error</tspan><tspan class="bold">: aborting due to 12 previous errors</tspan> +</tspan> + <tspan x="10px" y="4258px"> +</tspan> + <tspan x="10px" y="4276px"><tspan class="bold">Some errors have detailed explanations: E0277, E0599.</tspan> +</tspan> + <tspan x="10px" y="4294px"><tspan class="bold">For more information about an error, try `rustc --explain E0277`.</tspan> +</tspan> + <tspan x="10px" y="4312px"> +</tspan> + </text> + +</svg> diff --git a/tests/ui/errors/remap-path-prefix-sysroot.rs b/tests/ui/errors/remap-path-prefix-sysroot.rs index 4cbb38709be..7281e6da094 100644 --- a/tests/ui/errors/remap-path-prefix-sysroot.rs +++ b/tests/ui/errors/remap-path-prefix-sysroot.rs @@ -8,7 +8,7 @@ // The $SRC_DIR*.rs:LL:COL normalisation doesn't kick in automatically // as the remapped revision will not begin with $SRC_DIR_REAL, // so we have to do it ourselves. -//@ normalize-stderr-test: ".rs:\d+:\d+" -> ".rs:LL:COL" +//@ normalize-stderr: ".rs:\d+:\d+" -> ".rs:LL:COL" use std::thread; struct Worker { diff --git a/tests/ui/errors/remap-path-prefix.rs b/tests/ui/errors/remap-path-prefix.rs index 6283a8737ff..8809caa4d4f 100644 --- a/tests/ui/errors/remap-path-prefix.rs +++ b/tests/ui/errors/remap-path-prefix.rs @@ -5,7 +5,7 @@ // 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: "\\(errors)" -> "/$1" // The remapped paths aren't recognized by compiletest, so we // cannot use line-specific patterns. diff --git a/tests/ui/extern/extern-C-non-FFI-safe-arg-ice-52334.rs b/tests/ui/extern/extern-C-non-FFI-safe-arg-ice-52334.rs index bf060b3d168..33d295f7ebe 100644 --- a/tests/ui/extern/extern-C-non-FFI-safe-arg-ice-52334.rs +++ b/tests/ui/extern/extern-C-non-FFI-safe-arg-ice-52334.rs @@ -1,8 +1,8 @@ // test for ICE when casting extern "C" fn when it has a non-FFI-safe argument // issue: rust-lang/rust#52334 //@ check-pass -//@ normalize-stderr-test: "\[i8\]" -> "[i8 or u8 (arch dependant)]" -//@ normalize-stderr-test: "\[u8\]" -> "[i8 or u8 (arch dependant)]" +//@ normalize-stderr: "\[i8\]" -> "[i8 or u8 (arch dependant)]" +//@ normalize-stderr: "\[u8\]" -> "[i8 or u8 (arch dependant)]" type Foo = extern "C" fn(::std::ffi::CStr); //~^ WARN `extern` fn uses type diff --git a/tests/ui/extern/extern-types-field-offset.rs b/tests/ui/extern/extern-types-field-offset.rs index e9c4bb7b230..75f3eab3e27 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" +//@ normalize-stderr: "(core/src/panicking\.rs):[0-9]+:[0-9]+" -> "$1:$$LINE:$$COL" #![feature(extern_types)] extern "C" { diff --git a/tests/ui/extern/extern-types-size_of_val.rs b/tests/ui/extern/extern-types-size_of_val.rs index cc4d34e59fa..399a5828ff3 100644 --- a/tests/ui/extern/extern-types-size_of_val.rs +++ b/tests/ui/extern/extern-types-size_of_val.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" +//@ normalize-stderr: "(core/src/panicking\.rs):[0-9]+:[0-9]+" -> "$1:$$LINE:$$COL" //@ revisions: size align #![feature(extern_types)] 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 a884c94734a..7b6ba9f7f16 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: "long-type-\d+" -> "long-type-hash" fn id( f: &dyn Fn(u32), diff --git a/tests/ui/higher-ranked/trait-bounds/hrtb-doesnt-borrow-self-1.rs b/tests/ui/higher-ranked/trait-bounds/hrtb-doesnt-borrow-self-1.rs index 799df8cae9f..f880749ec83 100644 --- a/tests/ui/higher-ranked/trait-bounds/hrtb-doesnt-borrow-self-1.rs +++ b/tests/ui/higher-ranked/trait-bounds/hrtb-doesnt-borrow-self-1.rs @@ -1,4 +1,4 @@ -//@ normalize-stderr-test: "long-type-\d+" -> "long-type-hash" +//@ normalize-stderr: "long-type-\d+" -> "long-type-hash" // rust-lang/rust#30786: the use of `for<'b> &'b mut A: Stream<Item=T>` // should act as assertion that item does not borrow from its stream; diff --git a/tests/ui/higher-ranked/trait-bounds/hrtb-doesnt-borrow-self-2.rs b/tests/ui/higher-ranked/trait-bounds/hrtb-doesnt-borrow-self-2.rs index 92e2e7f796e..ff4c0cf24d6 100644 --- a/tests/ui/higher-ranked/trait-bounds/hrtb-doesnt-borrow-self-2.rs +++ b/tests/ui/higher-ranked/trait-bounds/hrtb-doesnt-borrow-self-2.rs @@ -1,4 +1,4 @@ -//@ normalize-stderr-test: "long-type-\d+" -> "long-type-hash" +//@ normalize-stderr: "long-type-\d+" -> "long-type-hash" // rust-lang/rust#30786: the use of `for<'b> &'b mut A: Stream<Item=T` // should act as assertion that item does not borrow from its stream; diff --git a/tests/ui/hygiene/panic-location.rs b/tests/ui/hygiene/panic-location.rs index 580a8bcff05..4731d8e1d53 100644 --- a/tests/ui/hygiene/panic-location.rs +++ b/tests/ui/hygiene/panic-location.rs @@ -1,7 +1,7 @@ //@ run-fail //@ check-run-results //@ exec-env:RUST_BACKTRACE=0 -//@ normalize-stderr-test: ".rs:\d+:\d+" -> ".rs:LL:CC" +//@ normalize-stderr: ".rs:\d+:\d+" -> ".rs:LL:CC" // // Regression test for issue #70963 // The reported panic location should not be `<::core::macros::panic macros>`. diff --git a/tests/ui/hygiene/unpretty-debug.rs b/tests/ui/hygiene/unpretty-debug.rs index 8e05d60e218..4d3d139deda 100644 --- a/tests/ui/hygiene/unpretty-debug.rs +++ b/tests/ui/hygiene/unpretty-debug.rs @@ -2,7 +2,7 @@ //@ compile-flags: -Zunpretty=expanded,hygiene // Don't break whenever Symbol numbering changes -//@ normalize-stdout-test: "\d+#" -> "0#" +//@ normalize-stdout: "\d+#" -> "0#" // minimal junk #![feature(no_core)] diff --git a/tests/ui/hygiene/unpretty-debug.stdout b/tests/ui/hygiene/unpretty-debug.stdout index 1f620cef239..e475cfac2fc 100644 --- a/tests/ui/hygiene/unpretty-debug.stdout +++ b/tests/ui/hygiene/unpretty-debug.stdout @@ -2,7 +2,7 @@ //@ compile-flags: -Zunpretty=expanded,hygiene // Don't break whenever Symbol numbering changes -//@ normalize-stdout-test: "\d+#" -> "0#" +//@ normalize-stdout: "\d+#" -> "0#" // minimal junk #![feature /* 0#0 */(no_core)] diff --git a/tests/crashes/131050.rs b/tests/ui/impl-trait/auto-trait-contains-err.rs index 3e3a600ef3d..d7f094211d7 100644 --- a/tests/crashes/131050.rs +++ b/tests/ui/impl-trait/auto-trait-contains-err.rs @@ -1,9 +1,9 @@ -//@ known-bug: #131050 //@ compile-flags: --edition=2021 use std::future::Future; fn invalid_future() -> impl Future {} +//~^ ERROR `()` is not a future fn create_complex_future() -> impl Future<Output = impl ReturnsSend> { async { &|| async { invalid_future().await } } @@ -21,3 +21,5 @@ where R: Send, { } + +fn main() {} diff --git a/tests/ui/impl-trait/auto-trait-contains-err.stderr b/tests/ui/impl-trait/auto-trait-contains-err.stderr new file mode 100644 index 00000000000..4da6b285ae1 --- /dev/null +++ b/tests/ui/impl-trait/auto-trait-contains-err.stderr @@ -0,0 +1,11 @@ +error[E0277]: `()` is not a future + --> $DIR/auto-trait-contains-err.rs:5:24 + | +LL | fn invalid_future() -> impl Future {} + | ^^^^^^^^^^^ `()` is not a future + | + = help: the trait `Future` is not implemented for `()` + +error: aborting due to 1 previous error + +For more information about this error, try `rustc --explain E0277`. 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 294b27e1dc1..766c37419cd 100644 --- a/tests/ui/impl-trait/erased-regions-in-hidden-ty.rs +++ b/tests/ui/impl-trait/erased-regions-in-hidden-ty.rs @@ -2,7 +2,7 @@ //@ ignore-compare-mode-next-solver (explicit revisions) //@ compile-flags: -Zverbose-internals //@[next] compile-flags: -Znext-solver -//@ normalize-stderr-test: "DefId\([^\)]+\)" -> "DefId(..)" +//@ normalize-stderr: "DefId\([^\)]+\)" -> "DefId(..)" #![feature(rustc_attrs)] #![rustc_hidden_type_of_opaques] diff --git a/tests/ui/include-macros/parent_dir.rs b/tests/ui/include-macros/parent_dir.rs index 5fadff77a37..1dcf27324d1 100644 --- a/tests/ui/include-macros/parent_dir.rs +++ b/tests/ui/include-macros/parent_dir.rs @@ -1,4 +1,4 @@ -//@ normalize-stderr-test: "`: .*" -> "`: $$FILE_NOT_FOUND_MSG" +//@ normalize-stderr: "`: .*" -> "`: $$FILE_NOT_FOUND_MSG" fn main() { let _ = include_str!("include-macros/file.txt"); //~ ERROR couldn't read diff --git a/tests/ui/infinite/infinite-instantiation.rs b/tests/ui/infinite/infinite-instantiation.rs index ed6fe693ebf..7e1bff6b124 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/" -> "/" +//@ normalize-stderr: ".nll/" -> "/" trait ToOpt: Sized { fn to_option(&self) -> Option<Self>; diff --git a/tests/ui/intrinsics/not-overridden.rs b/tests/ui/intrinsics/not-overridden.rs index 16f8e9bcf6a..b57b4e5bc06 100644 --- a/tests/ui/intrinsics/not-overridden.rs +++ b/tests/ui/intrinsics/not-overridden.rs @@ -3,9 +3,9 @@ #![feature(intrinsics)] //@ build-fail //@ failure-status:101 -//@ normalize-stderr-test: ".*note: .*\n\n" -> "" -//@ normalize-stderr-test: "thread 'rustc' panicked.*:\n.*\n" -> "" -//@ normalize-stderr-test: "internal compiler error:.*: intrinsic const_deallocate " -> "" +//@ normalize-stderr: ".*note: .*\n\n" -> "" +//@ normalize-stderr: "thread 'rustc' panicked.*:\n.*\n" -> "" +//@ normalize-stderr: "internal compiler error:.*: intrinsic const_deallocate " -> "" //@ rustc-env:RUST_BACKTRACE=0 #[rustc_intrinsic] diff --git a/tests/ui/invalid/invalid-debugger-visualizer-option.rs b/tests/ui/invalid/invalid-debugger-visualizer-option.rs index 16e5619e8e4..0f1cf15a687 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: "foo.random:.*\(" -> "foo.random: $$FILE_NOT_FOUND_MSG (" +//@ normalize-stderr: "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/io-checks/non-ice-error-on-worker-io-fail.rs b/tests/ui/io-checks/non-ice-error-on-worker-io-fail.rs index a6deb8bab29..7cae77eb67f 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 @@ -19,10 +19,10 @@ //@ 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: "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: "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 diff --git a/tests/ui/issues/issue-20413.rs b/tests/ui/issues/issue-20413.rs index 0f602b32fab..7766f375599 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: "long-type-\d+" -> "long-type-hash" trait Foo { fn answer(self); } diff --git a/tests/ui/issues/issue-21763.rs b/tests/ui/issues/issue-21763.rs index 1d0a0705cbb..c1ed5d94f9b 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: "\S+[\\/]hashbrown\S+" -> "$$HASHBROWN_SRC_LOCATION" use std::collections::HashMap; use std::rc::Rc; diff --git a/tests/ui/issues/issue-28625.rs b/tests/ui/issues/issue-28625.rs index 23f96d10bf2..54ed408e748 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: "\d+ bits" -> "N bits" trait Bar { type Bar; diff --git a/tests/ui/issues/issue-32377.rs b/tests/ui/issues/issue-32377.rs index 3a4942deb83..6737f9820ef 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: "\d+ bits" -> "N bits" use std::mem; use std::marker::PhantomData; 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 96e2691164b..edf4f2fce26 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,5 +1,5 @@ //@ build-fail -//@ normalize-stderr-test: ".nll/" -> "/" +//@ normalize-stderr: ".nll/" -> "/" trait Mirror { type Image; diff --git a/tests/ui/issues/issue-67552.rs b/tests/ui/issues/issue-67552.rs index 26466bf838c..343ae4f262f 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/" -> "/" +//@ normalize-stderr: ".nll/" -> "/" fn main() { rec(Empty); diff --git a/tests/ui/issues/issue-8727.rs b/tests/ui/issues/issue-8727.rs index 4ef66000374..b824be7c12f 100644 --- a/tests/ui/issues/issue-8727.rs +++ b/tests/ui/issues/issue-8727.rs @@ -2,7 +2,7 @@ // recursions. //@ build-fail -//@ normalize-stderr-test: ".nll/" -> "/" +//@ normalize-stderr: ".nll/" -> "/" fn generic<T>() { //~ WARN function cannot return without recursing generic::<Option<T>>(); diff --git a/tests/ui/lang-items/duplicate.rs b/tests/ui/lang-items/duplicate.rs index 3aa7dd2b0be..4594e9456a4 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: "loaded from .*libcore-.*.rlib" -> "loaded from SYSROOT/libcore-*.rlib" #![feature(lang_items)] #[lang = "sized"] diff --git a/tests/ui/layout/debug.rs b/tests/ui/layout/debug.rs index 166321798de..5602c4e711f 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: "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-scalar-pair-int-ptr.rs b/tests/ui/layout/enum-scalar-pair-int-ptr.rs index ebb3fdb1514..60cada5e05a 100644 --- a/tests/ui/layout/enum-scalar-pair-int-ptr.rs +++ b/tests/ui/layout/enum-scalar-pair-int-ptr.rs @@ -1,6 +1,6 @@ -//@ normalize-stderr-test: "pref: Align\([1-8] bytes\)" -> "pref: $$PREF_ALIGN" -//@ normalize-stderr-test: "Int\(I[0-9]+," -> "Int(I?," -//@ normalize-stderr-test: "valid_range: 0..=[0-9]+" -> "valid_range: $$VALID_RANGE" +//@ normalize-stderr: "pref: Align\([1-8] bytes\)" -> "pref: $$PREF_ALIGN" +//@ normalize-stderr: "Int\(I[0-9]+," -> "Int(I?," +//@ normalize-stderr: "valid_range: 0..=[0-9]+" -> "valid_range: $$VALID_RANGE" //! Enum layout tests related to scalar pairs with an int/ptr common primitive. diff --git a/tests/ui/layout/enum.rs b/tests/ui/layout/enum.rs index b58d390a2ef..005faf8ee50 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: "pref: Align\([1-8] bytes\)" -> "pref: $$PREF_ALIGN" //! Various enum layout tests. #![feature(rustc_attrs)] diff --git a/tests/ui/layout/ice-type-error-in-tail-124031.rs b/tests/ui/layout/ice-type-error-in-tail-124031.rs index ecd6f3d56f3..ef5b27cd195 100644 --- a/tests/ui/layout/ice-type-error-in-tail-124031.rs +++ b/tests/ui/layout/ice-type-error-in-tail-124031.rs @@ -1,4 +1,4 @@ -//@ normalize-stderr-test: "\d+ bits" -> "$$BITS bits" +//@ normalize-stderr: "\d+ bits" -> "$$BITS bits" // Regression test for issue #124031 // Checks that we don't ICE when the tail 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 2c8179a63d8..328d204aa3c 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: "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 88863d14cb7..341233a7890 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: "pref: Align\([1-8] bytes\)" -> "pref: $$PREF_ALIGN" #![crate_type = "lib"] #![feature(rustc_attrs)] diff --git a/tests/ui/layout/struct.rs b/tests/ui/layout/struct.rs index 309624e667c..5f652b3d570 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: "pref: Align\([1-8] bytes\)" -> "pref: $$PREF_ALIGN" //! Various struct layout tests. #![feature(rustc_attrs)] diff --git a/tests/ui/layout/valid_range_oob.rs b/tests/ui/layout/valid_range_oob.rs index 38ab5cec7a6..df816e74066 100644 --- a/tests/ui/layout/valid_range_oob.rs +++ b/tests/ui/layout/valid_range_oob.rs @@ -1,6 +1,6 @@ //@ failure-status: 101 -//@ normalize-stderr-test: "note: .*\n\n" -> "" -//@ normalize-stderr-test: "thread 'rustc' panicked.*\n" -> "" +//@ normalize-stderr: "note: .*\n\n" -> "" +//@ normalize-stderr: "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 433db46b7a0..152f44bd863 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: "pref: Align\([1-8] bytes\)" -> "pref: $$PREF_ALIGN" #![crate_type = "lib"] #![feature(rustc_attrs)] diff --git a/tests/ui/limits/huge-enum.rs b/tests/ui/limits/huge-enum.rs index 5664d0ba516..66c5be20693 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" +//@ normalize-stderr: "std::option::Option<\[u32; \d+\]>" -> "TYPE" +//@ normalize-stderr: "\[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 f7ce4f26db1..296147015bf 100644 --- a/tests/ui/limits/huge-struct.rs +++ b/tests/ui/limits/huge-struct.rs @@ -1,9 +1,8 @@ // ignore-tidy-linelength //@ build-fail -//@ normalize-stderr-test: "S32" -> "SXX" -//@ normalize-stderr-test: "S1M" -> "SXX" -//@ normalize-stderr-32bit: "values of the type `[^`]+` are too big" -> "values of the type $$REALLY_TOO_BIG are too big" -//@ normalize-stderr-64bit: "values of the type `[^`]+` are too big" -> "values of the type $$REALLY_TOO_BIG are too big" +//@ normalize-stderr: "S32" -> "SXX" +//@ normalize-stderr: "S1M" -> "SXX" +//@ normalize-stderr: "values of the type `[^`]+` are too big" -> "values of the type $$REALLY_TOO_BIG are too big" struct S32<T> { v0: T, diff --git a/tests/ui/limits/huge-struct.stderr b/tests/ui/limits/huge-struct.stderr index b10455ffd2d..e03456f1c7b 100644 --- a/tests/ui/limits/huge-struct.stderr +++ b/tests/ui/limits/huge-struct.stderr @@ -1,5 +1,5 @@ error: values of the type $REALLY_TOO_BIG are too big for the target architecture - --> $DIR/huge-struct.rs:48:9 + --> $DIR/huge-struct.rs:47:9 | LL | let fat: Option<SXX<SXX<SXX<u32>>>> = None; | ^^^ diff --git a/tests/ui/limits/issue-17913.rs b/tests/ui/limits/issue-17913.rs index 24fd3b542e6..5407902daba 100644 --- a/tests/ui/limits/issue-17913.rs +++ b/tests/ui/limits/issue-17913.rs @@ -1,5 +1,5 @@ //@ build-fail -//@ normalize-stderr-test: "\[&usize; \d+\]" -> "[&usize; usize::MAX]" +//@ normalize-stderr: "\[&usize; \d+\]" -> "[&usize; usize::MAX]" //@ error-pattern: too big for the target architecture #[cfg(target_pointer_width = "64")] diff --git a/tests/ui/limits/issue-55878.rs b/tests/ui/limits/issue-55878.rs index 81696e226fd..db4a2724452 100644 --- a/tests/ui/limits/issue-55878.rs +++ b/tests/ui/limits/issue-55878.rs @@ -1,6 +1,4 @@ //@ build-fail -//@ normalize-stderr-64bit: "18446744073709551615" -> "SIZE" -//@ normalize-stderr-32bit: "4294967295" -> "SIZE" //@ error-pattern: are too big for the target architecture fn main() { diff --git a/tests/ui/limits/issue-55878.stderr b/tests/ui/limits/issue-55878.stderr index 51c4837f458..d2b5150c556 100644 --- a/tests/ui/limits/issue-55878.stderr +++ b/tests/ui/limits/issue-55878.stderr @@ -6,7 +6,7 @@ error[E0080]: evaluation of constant value failed note: inside `std::mem::size_of::<[u8; usize::MAX]>` --> $SRC_DIR/core/src/mem/mod.rs:LL:COL note: inside `main` - --> $DIR/issue-55878.rs:7:26 + --> $DIR/issue-55878.rs:5:26 | LL | println!("Size: {}", std::mem::size_of::<[u8; u64::MAX as usize]>()); | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ diff --git a/tests/ui/link-native-libs/msvc-non-utf8-output.rs b/tests/ui/link-native-libs/msvc-non-utf8-output.rs index 659a832247a..03b1f6516ab 100644 --- a/tests/ui/link-native-libs/msvc-non-utf8-output.rs +++ b/tests/ui/link-native-libs/msvc-non-utf8-output.rs @@ -1,5 +1,5 @@ //@ build-fail //@ compile-flags:-C link-arg=⦺ⅈ⽯⭏⽽◃⡽⚞ //@ only-msvc -//@ normalize-stderr-test: "(?:.|\n)*(⦺ⅈ⽯⭏⽽◃⡽⚞)(?:.|\n)*" -> "$1" +//@ normalize-stderr: "(?:.|\n)*(⦺ⅈ⽯⭏⽽◃⡽⚞)(?:.|\n)*" -> "$1" pub fn main() {} diff --git a/tests/ui/lint/lint-overflowing-ops.rs b/tests/ui/lint/lint-overflowing-ops.rs index eec347010ad..116460f11cc 100644 --- a/tests/ui/lint/lint-overflowing-ops.rs +++ b/tests/ui/lint/lint-overflowing-ops.rs @@ -11,8 +11,8 @@ //@ [opt_with_overflow_checks]compile-flags: -C overflow-checks=on -O -Z deduplicate-diagnostics=yes //@ build-fail //@ ignore-pass (test tests codegen-time behaviour) -//@ normalize-stderr-test: "shift left by `(64|32)_usize`, which" -> "shift left by `%BITS%`, which" -//@ normalize-stderr-test: "shift right by `(64|32)_usize`, which" -> "shift right by `%BITS%`, which" +//@ normalize-stderr: "shift left by `(64|32)_usize`, which" -> "shift left by `%BITS%`, which" +//@ normalize-stderr: "shift right by `(64|32)_usize`, which" -> "shift right by `%BITS%`, which" #![deny(arithmetic_overflow)] diff --git a/tests/ui/lto/lto-duplicate-symbols.rs b/tests/ui/lto/lto-duplicate-symbols.rs index 679d44baae7..27bdde418f8 100644 --- a/tests/ui/lto/lto-duplicate-symbols.rs +++ b/tests/ui/lto/lto-duplicate-symbols.rs @@ -4,7 +4,7 @@ //@ 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" +//@ normalize-stderr: "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/macros/macro-metavar-expr-concat/repetitions.rs b/tests/ui/macros/macro-metavar-expr-concat/repetitions.rs index 781443207ac..52a7d5cd8a7 100644 --- a/tests/ui/macros/macro-metavar-expr-concat/repetitions.rs +++ b/tests/ui/macros/macro-metavar-expr-concat/repetitions.rs @@ -1,5 +1,3 @@ -//@ run-pass - #![feature(macro_metavar_expr_concat)] macro_rules! one_rep { @@ -10,9 +8,29 @@ macro_rules! one_rep { }; } +macro_rules! issue_128346 { + ( $($a:ident)* ) => { + A( + const ${concat($a, Z)}: i32 = 3; + //~^ ERROR invalid syntax + )* + }; +} + +macro_rules! issue_131393 { + ($t:ident $($en:ident)?) => { + read::<${concat($t, $en)}>() + //~^ ERROR invalid syntax + //~| ERROR invalid syntax + } +} + fn main() { one_rep!(A B C); assert_eq!(AZ, 3); assert_eq!(BZ, 3); assert_eq!(CZ, 3); + issue_128346!(A B C); + issue_131393!(u8); + issue_131393!(u16 le); } diff --git a/tests/ui/macros/macro-metavar-expr-concat/repetitions.stderr b/tests/ui/macros/macro-metavar-expr-concat/repetitions.stderr new file mode 100644 index 00000000000..c3006c4be5d --- /dev/null +++ b/tests/ui/macros/macro-metavar-expr-concat/repetitions.stderr @@ -0,0 +1,22 @@ +error: invalid syntax + --> $DIR/repetitions.rs:14:20 + | +LL | const ${concat($a, Z)}: i32 = 3; + | ^^^^^^^^^^^^^^^ + +error: invalid syntax + --> $DIR/repetitions.rs:22:17 + | +LL | read::<${concat($t, $en)}>() + | ^^^^^^^^^^^^^^^^^ + +error: invalid syntax + --> $DIR/repetitions.rs:22:17 + | +LL | read::<${concat($t, $en)}>() + | ^^^^^^^^^^^^^^^^^ + | + = note: duplicate diagnostic emitted due to `-Z deduplicate-diagnostics=no` + +error: aborting due to 3 previous errors + diff --git a/tests/ui/macros/macros-nonfatal-errors.rs b/tests/ui/macros/macros-nonfatal-errors.rs index 658455b1b5b..79beffbe986 100644 --- a/tests/ui/macros/macros-nonfatal-errors.rs +++ b/tests/ui/macros/macros-nonfatal-errors.rs @@ -1,4 +1,4 @@ -//@ normalize-stderr-test: "`: .*" -> "`: $$FILE_NOT_FOUND_MSG" +//@ normalize-stderr: "`: .*" -> "`: $$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/methods/inherent-bound-in-probe.rs b/tests/ui/methods/inherent-bound-in-probe.rs index 265ef93425a..9b9eb91559b 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: "long-type-\d+" -> "long-type-hash" // Fixes #110131 // diff --git a/tests/ui/mir/lint/storage-live.rs b/tests/ui/mir/lint/storage-live.rs index ded02150342..3e0cc4ee061 100644 --- a/tests/ui/mir/lint/storage-live.rs +++ b/tests/ui/mir/lint/storage-live.rs @@ -2,10 +2,10 @@ //@ 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]" -//@ normalize-stderr-test: "(delayed at [^:]+):\d+:\d+ - " -> "$1:LL:CC - " +//@ normalize-stderr: "note: .*\n\n" -> "" +//@ normalize-stderr: "thread 'rustc' panicked.*\n" -> "" +//@ normalize-stderr: "storage_live\[....\]" -> "storage_live[HASH]" +//@ normalize-stderr: "(delayed at [^:]+):\d+:\d+ - " -> "$1:LL:CC - " //@ rustc-env:RUST_BACKTRACE=0 #![feature(custom_mir, core_intrinsics)] diff --git a/tests/ui/modules/path-no-file-name.rs b/tests/ui/modules/path-no-file-name.rs index c36043686fc..23127346e02 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: "\.:.*\(" -> ".: $$ACCESS_DENIED_MSG (" +//@ normalize-stderr: "os error \d+" -> "os error $$ACCESS_DENIED_CODE" #[path = "."] mod m; //~ ERROR couldn't read diff --git a/tests/ui/packed/packed-struct-transmute.rs b/tests/ui/packed/packed-struct-transmute.rs index 0a887e3886d..98feeea8871 100644 --- a/tests/ui/packed/packed-struct-transmute.rs +++ b/tests/ui/packed/packed-struct-transmute.rs @@ -3,7 +3,7 @@ // the error points to the start of the file, not the line with the // transmute -//@ normalize-stderr-test: "\d+ bits" -> "N bits" +//@ normalize-stderr: "\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/panic-handler/panic-handler-std.rs b/tests/ui/panic-handler/panic-handler-std.rs index 82e6de43a2e..4eb05b5365f 100644 --- a/tests/ui/panic-handler/panic-handler-std.rs +++ b/tests/ui/panic-handler/panic-handler-std.rs @@ -1,4 +1,4 @@ -//@ normalize-stderr-test: "loaded from .*libstd-.*.rlib" -> "loaded from SYSROOT/libstd-*.rlib" +//@ normalize-stderr: "loaded from .*libstd-.*.rlib" -> "loaded from SYSROOT/libstd-*.rlib" //@ error-pattern: found duplicate lang item `panic_impl` extern crate core; diff --git a/tests/ui/panics/default-backtrace-ice.rs b/tests/ui/panics/default-backtrace-ice.rs index 7953283f028..c47f458f6e9 100644 --- a/tests/ui/panics/default-backtrace-ice.rs +++ b/tests/ui/panics/default-backtrace-ice.rs @@ -5,12 +5,12 @@ //@ error-pattern:__rust_begin_short_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" -> "" +//@ normalize-stderr: "note: .*" -> "" +//@ normalize-stderr: "thread 'rustc' .*" -> "" +//@ normalize-stderr: " +\d+:.*__rust_begin_short_backtrace.*" -> "(begin_short_backtrace)" +//@ normalize-stderr: " +\d+:.*__rust_end_short_backtrace.*" -> "(end_short_backtrace)" +//@ normalize-stderr: " +\d+:.*\n" -> "" +//@ normalize-stderr: " +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/issue-47429-short-backtraces.rs b/tests/ui/panics/issue-47429-short-backtraces.rs index 0d216fdd653..dff885af1b8 100644 --- a/tests/ui/panics/issue-47429-short-backtraces.rs +++ b/tests/ui/panics/issue-47429-short-backtraces.rs @@ -8,9 +8,11 @@ // This is needed to avoid test output differences across std being built with v0 symbols vs legacy // symbols. -//@ normalize-stderr-test: "begin_panic::<&str>" -> "begin_panic" +//@ normalize-stderr: "begin_panic::<&str>" -> "begin_panic" +// This variant occurs on macOS with `rust.debuginfo-level = "line-tables-only"` (#133997) +//@ normalize-stderr: " begin_panic<&str>" -> " std::panicking::begin_panic" // And this is for differences between std with and without debuginfo. -//@ normalize-stderr-test: "\n +at [^\n]+" -> "" +//@ normalize-stderr: "\n +at [^\n]+" -> "" //@ ignore-msvc see #62897 and `backtrace-debuginfo.rs` test //@ ignore-android FIXME #17520 diff --git a/tests/ui/panics/issue-47429-short-backtraces.run.stderr b/tests/ui/panics/issue-47429-short-backtraces.run.stderr index 1078a2fbc90..6a22e0215fe 100644 --- a/tests/ui/panics/issue-47429-short-backtraces.run.stderr +++ b/tests/ui/panics/issue-47429-short-backtraces.run.stderr @@ -1,4 +1,4 @@ -thread 'main' panicked at $DIR/issue-47429-short-backtraces.rs:24:5: +thread 'main' panicked at $DIR/issue-47429-short-backtraces.rs:26:5: explicit panic stack backtrace: 0: std::panicking::begin_panic diff --git a/tests/ui/panics/panic-in-cleanup.rs b/tests/ui/panics/panic-in-cleanup.rs index c3639c7034e..8cddeb37348 100644 --- a/tests/ui/panics/panic-in-cleanup.rs +++ b/tests/ui/panics/panic-in-cleanup.rs @@ -2,9 +2,9 @@ //@ 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" +//@ normalize-stderr: "\n +[0-9]+:[^\n]+" -> "" +//@ normalize-stderr: "\n +at [^\n]+" -> "" +//@ normalize-stderr: "(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 diff --git a/tests/ui/panics/panic-in-ffi.rs b/tests/ui/panics/panic-in-ffi.rs index c0ae1899f4c..6068e4fdc59 100644 --- a/tests/ui/panics/panic-in-ffi.rs +++ b/tests/ui/panics/panic-in-ffi.rs @@ -3,9 +3,9 @@ //@ check-run-results //@ error-pattern: panic in a function that cannot unwind //@ error-pattern: Noisy Drop -//@ 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" +//@ normalize-stderr: "\n +[0-9]+:[^\n]+" -> "" +//@ normalize-stderr: "\n +at [^\n]+" -> "" +//@ normalize-stderr: "(core/src/panicking\.rs):[0-9]+:[0-9]+" -> "$1:$$LINE:$$COL" //@ needs-unwind //@ ignore-emscripten "RuntimeError" junk in output diff --git a/tests/ui/panics/panic-in-message-fmt.rs b/tests/ui/panics/panic-in-message-fmt.rs index e5bedf96b35..1e9bbaf45c5 100644 --- a/tests/ui/panics/panic-in-message-fmt.rs +++ b/tests/ui/panics/panic-in-message-fmt.rs @@ -4,9 +4,9 @@ //@ exec-env:RUST_BACKTRACE=0 //@ check-run-results //@ error-pattern: panicked while processing panic -//@ 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" +//@ normalize-stderr: "\n +[0-9]+:[^\n]+" -> "" +//@ normalize-stderr: "\n +at [^\n]+" -> "" +//@ normalize-stderr: "(core/src/panicking\.rs):[0-9]+:[0-9]+" -> "$1:$$LINE:$$COL" //@ ignore-emscripten "RuntimeError" junk in output use std::fmt::{Display, self}; 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 70c4a5aaf2b..a56214b73bf 100644 --- a/tests/ui/panics/panic-short-backtrace-windows-x86_64.rs +++ b/tests/ui/panics/panic-short-backtrace-windows-x86_64.rs @@ -17,7 +17,7 @@ // 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: "5: .*" -> "5: some Rust fn" // Backtraces are pretty broken in general on i686-pc-windows-msvc (#62897). //@ only-x86_64-pc-windows-msvc diff --git a/tests/ui/panics/runtime-switch.rs b/tests/ui/panics/runtime-switch.rs index 10dce250909..ffd038f9535 100644 --- a/tests/ui/panics/runtime-switch.rs +++ b/tests/ui/panics/runtime-switch.rs @@ -8,9 +8,11 @@ // This is needed to avoid test output differences across std being built with v0 symbols vs legacy // symbols. -//@ normalize-stderr-test: "begin_panic::<&str>" -> "begin_panic" +//@ normalize-stderr: "begin_panic::<&str>" -> "begin_panic" +// This variant occurs on macOS with `rust.debuginfo-level = "line-tables-only"` (#133997) +//@ normalize-stderr: " begin_panic<&str>" -> " std::panicking::begin_panic" // And this is for differences between std with and without debuginfo. -//@ normalize-stderr-test: "\n +at [^\n]+" -> "" +//@ normalize-stderr: "\n +at [^\n]+" -> "" //@ ignore-msvc see #62897 and `backtrace-debuginfo.rs` test //@ ignore-android FIXME #17520 diff --git a/tests/ui/panics/runtime-switch.run.stderr b/tests/ui/panics/runtime-switch.run.stderr index abbb91eba60..35be010d6be 100644 --- a/tests/ui/panics/runtime-switch.run.stderr +++ b/tests/ui/panics/runtime-switch.run.stderr @@ -1,4 +1,4 @@ -thread 'main' panicked at $DIR/runtime-switch.rs:27:5: +thread 'main' panicked at $DIR/runtime-switch.rs:29:5: explicit panic stack backtrace: 0: std::panicking::begin_panic 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 c2f04cd122c..48f60b14170 100644 --- a/tests/ui/panics/short-ice-remove-middle-frames-2.rs +++ b/tests/ui/panics/short-ice-remove-middle-frames-2.rs @@ -11,9 +11,11 @@ //@ ignore-msvc the `__rust_{begin,end}_short_backtrace` symbols aren't reliable. // This is needed to avoid test output differences across std being built with v0 symbols vs legacy // symbols. -//@ normalize-stderr-test: "begin_panic::<&str>" -> "begin_panic" +//@ normalize-stderr: "begin_panic::<&str>" -> "begin_panic" +// This variant occurs on macOS with `rust.debuginfo-level = "line-tables-only"` (#133997) +//@ normalize-stderr: " begin_panic<&str>" -> " std::panicking::begin_panic" // And this is for differences between std with and without debuginfo. -//@ normalize-stderr-test: "\n +at [^\n]+" -> "" +//@ normalize-stderr: "\n +at [^\n]+" -> "" /// 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-2.run.stderr b/tests/ui/panics/short-ice-remove-middle-frames-2.run.stderr index 67577f3568e..ab23ce78062 100644 --- a/tests/ui/panics/short-ice-remove-middle-frames-2.run.stderr +++ b/tests/ui/panics/short-ice-remove-middle-frames-2.run.stderr @@ -1,4 +1,4 @@ -thread 'main' panicked at $DIR/short-ice-remove-middle-frames-2.rs:61:5: +thread 'main' panicked at $DIR/short-ice-remove-middle-frames-2.rs:63:5: debug!!! stack backtrace: 0: std::panicking::begin_panic diff --git a/tests/ui/panics/short-ice-remove-middle-frames.rs b/tests/ui/panics/short-ice-remove-middle-frames.rs index c035e7e69bc..216c5127799 100644 --- a/tests/ui/panics/short-ice-remove-middle-frames.rs +++ b/tests/ui/panics/short-ice-remove-middle-frames.rs @@ -12,9 +12,11 @@ // This is needed to avoid test output differences across std being built with v0 symbols vs legacy // symbols. -//@ normalize-stderr-test: "begin_panic::<&str>" -> "begin_panic" +//@ normalize-stderr: "begin_panic::<&str>" -> "begin_panic" +// This variant occurs on macOS with `rust.debuginfo-level = "line-tables-only"` (#133997) +//@ normalize-stderr: " begin_panic<&str>" -> " std::panicking::begin_panic" // And this is for differences between std with and without debuginfo. -//@ normalize-stderr-test: "\n +at [^\n]+" -> "" +//@ normalize-stderr: "\n +at [^\n]+" -> "" #[inline(never)] fn __rust_begin_short_backtrace<T, F: FnOnce() -> T>(f: F) -> T { diff --git a/tests/ui/panics/short-ice-remove-middle-frames.run.stderr b/tests/ui/panics/short-ice-remove-middle-frames.run.stderr index 63fa466ab24..d2616911e3b 100644 --- a/tests/ui/panics/short-ice-remove-middle-frames.run.stderr +++ b/tests/ui/panics/short-ice-remove-middle-frames.run.stderr @@ -1,4 +1,4 @@ -thread 'main' panicked at $DIR/short-ice-remove-middle-frames.rs:57:5: +thread 'main' panicked at $DIR/short-ice-remove-middle-frames.rs:59:5: debug!!! stack backtrace: 0: std::panicking::begin_panic diff --git a/tests/ui/parser/issues/issue-5806.rs b/tests/ui/parser/issues/issue-5806.rs index 3f1b7cda931..dbd53a7adc4 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: "parser:.*\(" -> "parser: $$ACCESS_DENIED_MSG (" +//@ normalize-stderr: "os error \d+" -> "os error $$ACCESS_DENIED_CODE" #[path = "../parser"] mod foo; //~ ERROR couldn't read diff --git a/tests/ui/parser/mod_file_with_path_attr.rs b/tests/ui/parser/mod_file_with_path_attr.rs index e2854f3cc8d..ff964f750e2 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: "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/print-request/macos-target.rs b/tests/ui/print-request/macos-target.rs index af74babbed4..70122a52580 100644 --- a/tests/ui/print-request/macos-target.rs +++ b/tests/ui/print-request/macos-target.rs @@ -1,8 +1,8 @@ //@ only-apple //@ compile-flags: --print deployment-target -//@ normalize-stdout-test: "\w*_DEPLOYMENT_TARGET" -> "$$OS_DEPLOYMENT_TARGET" -//@ normalize-stdout-test: "\d+\." -> "$$CURRENT_MAJOR_VERSION." -//@ normalize-stdout-test: "\d+" -> "$$CURRENT_MINOR_VERSION" +//@ normalize-stdout: "\w*_DEPLOYMENT_TARGET" -> "$$OS_DEPLOYMENT_TARGET" +//@ normalize-stdout: "\d+\." -> "$$CURRENT_MAJOR_VERSION." +//@ normalize-stdout: "\d+" -> "$$CURRENT_MINOR_VERSION" //@ check-pass fn main() {} diff --git a/tests/ui/proc-macro/load-panic-backtrace.rs b/tests/ui/proc-macro/load-panic-backtrace.rs index 302bcaea75e..848bdaf9f37 100644 --- a/tests/ui/proc-macro/load-panic-backtrace.rs +++ b/tests/ui/proc-macro/load-panic-backtrace.rs @@ -1,8 +1,8 @@ //@ proc-macro: 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" -> "" +//@ normalize-stderr: "thread '.*' panicked " -> "" +//@ normalize-stderr: "note:.*RUST_BACKTRACE=1.*\n" -> "" //@ needs-unwind proc macro panics to report errors #[macro_use] diff --git a/tests/ui/proc-macro/meta-macro-hygiene.rs b/tests/ui/proc-macro/meta-macro-hygiene.rs index 9fbe9763b44..afe0e1fb601 100644 --- a/tests/ui/proc-macro/meta-macro-hygiene.rs +++ b/tests/ui/proc-macro/meta-macro-hygiene.rs @@ -4,9 +4,9 @@ //@ 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: "\d+#" -> "0#" +//@ normalize-stdout: "expn\d{3,}" -> "expnNNN" +//@ normalize-stdout: "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 ae02b24e1d0..fae8446515a 100644 --- a/tests/ui/proc-macro/meta-macro-hygiene.stdout +++ b/tests/ui/proc-macro/meta-macro-hygiene.stdout @@ -8,9 +8,9 @@ Respanned: TokenStream [Ident { ident: "$crate", span: $DIR/auxiliary/make-macro //@ 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: "\d+#" -> "0#" +//@ normalize-stdout: "expn\d{3,}" -> "expnNNN" +//@ normalize-stdout: "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/nonterminal-token-hygiene.rs b/tests/ui/proc-macro/nonterminal-token-hygiene.rs index 76c71441c80..e2aedb245d0 100644 --- a/tests/ui/proc-macro/nonterminal-token-hygiene.rs +++ b/tests/ui/proc-macro/nonterminal-token-hygiene.rs @@ -4,9 +4,9 @@ //@ 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 */" +//@ normalize-stdout: "\d+#" -> "0#" +//@ normalize-stdout: "expn\d{3,}" -> "expnNNN" +//@ normalize-stdout: "extern crate compiler_builtins /\* \d+ \*/" -> "extern crate compiler_builtins /* NNN */" //@ proc-macro: test-macros.rs #![feature(decl_macro)] diff --git a/tests/ui/proc-macro/nonterminal-token-hygiene.stdout b/tests/ui/proc-macro/nonterminal-token-hygiene.stdout index 1ad14059028..e7dda7d3c16 100644 --- a/tests/ui/proc-macro/nonterminal-token-hygiene.stdout +++ b/tests/ui/proc-macro/nonterminal-token-hygiene.stdout @@ -28,9 +28,9 @@ PRINT-BANG INPUT (DEBUG): TokenStream [ //@ 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 */" +//@ normalize-stdout: "\d+#" -> "0#" +//@ normalize-stdout: "expn\d{3,}" -> "expnNNN" +//@ normalize-stdout: "extern crate compiler_builtins /\* \d+ \*/" -> "extern crate compiler_builtins /* NNN */" //@ proc-macro: test-macros.rs #![feature /* 0#0 */(decl_macro)] diff --git a/tests/ui/process/println-with-broken-pipe.rs b/tests/ui/process/println-with-broken-pipe.rs index 4ac1f7c98cb..d88c6dcc12b 100644 --- a/tests/ui/process/println-with-broken-pipe.rs +++ b/tests/ui/process/println-with-broken-pipe.rs @@ -5,7 +5,7 @@ //@ ignore-fuchsia //@ ignore-horizon //@ ignore-android -//@ normalize-stderr-test: ".rs:\d+:\d+" -> ".rs:LL:CC" +//@ normalize-stderr: ".rs:\d+:\d+" -> ".rs:LL:CC" //@ compile-flags: -Zon-broken-pipe=error // Test what the error message looks like when `println!()` panics because of diff --git a/tests/ui/recursion/issue-23122-2.rs b/tests/ui/recursion/issue-23122-2.rs index 2880b956417..3e14fa92dd0 100644 --- a/tests/ui/recursion/issue-23122-2.rs +++ b/tests/ui/recursion/issue-23122-2.rs @@ -1,4 +1,4 @@ -//@ normalize-stderr-test: "long-type-\d+" -> "long-type-hash" +//@ normalize-stderr: "long-type-\d+" -> "long-type-hash" trait Next { type Next: Next; } diff --git a/tests/ui/recursion/issue-83150.rs b/tests/ui/recursion/issue-83150.rs index e919a2d9309..ea1bef4fce3 100644 --- a/tests/ui/recursion/issue-83150.rs +++ b/tests/ui/recursion/issue-83150.rs @@ -1,7 +1,7 @@ //~ ERROR overflow evaluating the requirement `Map<&mut std::ops::Range<u8>, {closure@$DIR/issue-83150.rs:13:24: 13:27}>: Iterator` //@ build-fail //@ compile-flags: -Copt-level=0 -//@ normalize-stderr-test: "long-type-\d+" -> "long-type-hash" +//@ normalize-stderr: "long-type-\d+" -> "long-type-hash" fn main() { let mut iter = 0u8..1; diff --git a/tests/ui/recursion/recursion.rs b/tests/ui/recursion/recursion.rs index 074e9ed6947..f3c633983b1 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/" -> "/" +//@ normalize-stderr: ".nll/" -> "/" enum Nil {NilValue} struct Cons<T> {head:isize, tail:T} diff --git a/tests/ui/regions/issue-102374.rs b/tests/ui/regions/issue-102374.rs index db2b38334b5..d640c29b2f4 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: "long-type-\d+" -> "long-type-hash" use std::cell::Cell; #[rustfmt::skip] diff --git a/tests/ui/repr/repr-c-dead-variants.rs b/tests/ui/repr/repr-c-dead-variants.rs index cc080b2e59a..3e8ae3d096d 100644 --- a/tests/ui/repr/repr-c-dead-variants.rs +++ b/tests/ui/repr/repr-c-dead-variants.rs @@ -6,7 +6,7 @@ // See also: repr-c-int-dead-variants.rs -//@ normalize-stderr-test: "pref: Align\([1-8] bytes\)" -> "pref: $$SOME_ALIGN" +//@ normalize-stderr: "pref: Align\([1-8] bytes\)" -> "pref: $$SOME_ALIGN" // This test depends on the value of the `c_enum_min_bits` target option. // As there's no way to actually check it from UI test, we only run this test on a subset of archs. diff --git a/tests/ui/repr/repr-c-int-dead-variants.rs b/tests/ui/repr/repr-c-int-dead-variants.rs index ed26174343a..627569e080d 100644 --- a/tests/ui/repr/repr-c-int-dead-variants.rs +++ b/tests/ui/repr/repr-c-int-dead-variants.rs @@ -3,7 +3,7 @@ // See also: repr-c-dead-variants.rs -//@ normalize-stderr-test: "pref: Align\([1-8] bytes\)" -> "pref: $$SOME_ALIGN" +//@ normalize-stderr: "pref: Align\([1-8] bytes\)" -> "pref: $$SOME_ALIGN" // A simple uninhabited type. enum Void {} diff --git a/tests/ui/resolve/multiple_definitions_attribute_merging.rs b/tests/ui/resolve/multiple_definitions_attribute_merging.rs index 7d649476ad2..155abafdd9d 100644 --- a/tests/ui/resolve/multiple_definitions_attribute_merging.rs +++ b/tests/ui/resolve/multiple_definitions_attribute_merging.rs @@ -4,9 +4,9 @@ //@known-bug: #120873 //@ 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: " +//@ normalize-stderr: "note: .*\n\n" -> "" +//@ normalize-stderr: "thread 'rustc' panicked.*\n" -> "" +//@ normalize-stderr: "(error: internal compiler error: [^:]+):\d+:\d+: " -> "$1:LL:CC: " //@ rustc-env:RUST_BACKTRACE=0 #[repr(packed)] diff --git a/tests/ui/resolve/proc_macro_generated_packed.rs b/tests/ui/resolve/proc_macro_generated_packed.rs index 8459fb79f1e..0cba3c1616d 100644 --- a/tests/ui/resolve/proc_macro_generated_packed.rs +++ b/tests/ui/resolve/proc_macro_generated_packed.rs @@ -4,9 +4,9 @@ //@proc-macro: proc_macro_generate_packed.rs //@known-bug: #120873 //@ 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: " +//@ normalize-stderr: "note: .*\n\n" -> "" +//@ normalize-stderr: "thread 'rustc' panicked.*\n" -> "" +//@ normalize-stderr: "(error: internal compiler error: [^:]+):\d+:\d+: " -> "$1:LL:CC: " //@ rustc-env:RUST_BACKTRACE=0 extern crate proc_macro_generate_packed; 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 ea9d48e7859..e69a4537935 100644 --- a/tests/ui/rfcs/rfc-2627-raw-dylib/dlltool-failed.rs +++ b/tests/ui/rfcs/rfc-2627-raw-dylib/dlltool-failed.rs @@ -2,12 +2,12 @@ //@ needs-dlltool //@ compile-flags: --crate-type lib --emit link -//@ normalize-stderr-test: "[^ ']*/dlltool.exe" -> "$$DLLTOOL" -//@ normalize-stderr-test: "[^ ]*/foo.dll_imports.def" -> "$$DEF_FILE" -//@ normalize-stderr-test: "[^ ]*/foo.dll_imports.lib" -> "$$LIB_FILE" -//@ normalize-stderr-test: "-m [^ ]*" -> "$$TARGET_MACHINE" -//@ normalize-stderr-test: "-f [^ ]*" -> "$$ASM_FLAGS" -//@ normalize-stderr-test: "--temp-prefix [^ ]*/foo.dll" -> "$$TEMP_PREFIX" +//@ normalize-stderr: "[^ ']*/dlltool.exe" -> "$$DLLTOOL" +//@ normalize-stderr: "[^ ]*/foo.dll_imports.def" -> "$$DEF_FILE" +//@ normalize-stderr: "[^ ]*/foo.dll_imports.lib" -> "$$LIB_FILE" +//@ normalize-stderr: "-m [^ ]*" -> "$$TARGET_MACHINE" +//@ normalize-stderr: "-f [^ ]*" -> "$$ASM_FLAGS" +//@ normalize-stderr: "--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/statics/mutable_memory_validation.rs b/tests/ui/statics/mutable_memory_validation.rs index 032b903f64e..3bb572d38bc 100644 --- a/tests/ui/statics/mutable_memory_validation.rs +++ b/tests/ui/statics/mutable_memory_validation.rs @@ -1,8 +1,8 @@ //issue: rust-lang/rust#122548 // 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]+)?(<imm>)?─*╼ )+ *│.*" -> "HEX_DUMP" +//@ normalize-stderr: "(the raw bytes of the constant) \(size: [0-9]*, align: [0-9]*\)" -> "$1 (size: $$SIZE, align: $$ALIGN)" +//@ normalize-stderr: "([0-9a-f][0-9a-f] |╾─*A(LLOC)?[0-9]+(\+[a-z0-9]+)?(<imm>)?─*╼ )+ *│.*" -> "HEX_DUMP" use std::cell::UnsafeCell; diff --git a/tests/ui/svh/changing-crates.rs b/tests/ui/svh/changing-crates.rs index 78075a5c75f..39a6473c8d9 100644 --- a/tests/ui/svh/changing-crates.rs +++ b/tests/ui/svh/changing-crates.rs @@ -2,7 +2,7 @@ //@ 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" +//@ normalize-stderr: "(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 6ecdd9f2c08..66f739e144e 100644 --- a/tests/ui/svh/svh-change-lit.rs +++ b/tests/ui/svh/svh-change-lit.rs @@ -2,7 +2,7 @@ //@ 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" +//@ normalize-stderr: "(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 c03560ee511..9e736788d13 100644 --- a/tests/ui/svh/svh-change-significant-cfg.rs +++ b/tests/ui/svh/svh-change-significant-cfg.rs @@ -2,7 +2,7 @@ //@ 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" +//@ normalize-stderr: "(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 4bbbf45a886..1e0fa15b94a 100644 --- a/tests/ui/svh/svh-change-trait-bound.rs +++ b/tests/ui/svh/svh-change-trait-bound.rs @@ -2,7 +2,7 @@ //@ 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" +//@ normalize-stderr: "(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 cdc5cf24272..f275a38acc4 100644 --- a/tests/ui/svh/svh-change-type-arg.rs +++ b/tests/ui/svh/svh-change-type-arg.rs @@ -2,7 +2,7 @@ //@ 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" +//@ normalize-stderr: "(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 f2a579fab63..76118dc9f69 100644 --- a/tests/ui/svh/svh-change-type-ret.rs +++ b/tests/ui/svh/svh-change-type-ret.rs @@ -2,7 +2,7 @@ //@ 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" +//@ normalize-stderr: "(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 489923ddecf..6a658ca36dc 100644 --- a/tests/ui/svh/svh-change-type-static.rs +++ b/tests/ui/svh/svh-change-type-static.rs @@ -2,7 +2,7 @@ //@ 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" +//@ normalize-stderr: "(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 8ac4cc42605..4791bfb5006 100644 --- a/tests/ui/svh/svh-use-trait.rs +++ b/tests/ui/svh/svh-use-trait.rs @@ -2,7 +2,7 @@ //@ 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" +//@ normalize-stderr: "(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/symbol-names/const-generics-demangling.rs b/tests/ui/symbol-names/const-generics-demangling.rs index 86f24f6af6a..9c078d4192a 100644 --- a/tests/ui/symbol-names/const-generics-demangling.rs +++ b/tests/ui/symbol-names/const-generics-demangling.rs @@ -3,8 +3,8 @@ //@ 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]" +//@[legacy]normalize-stderr: "h[[:xdigit:]]{16}" -> "h[HASH]" +//@ [v0]normalize-stderr: "c\[.*?\]" -> "c[HASH]" #![feature(rustc_attrs)] pub struct Unsigned<const F: u8>; diff --git a/tests/ui/symbol-names/const-generics-str-demangling.rs b/tests/ui/symbol-names/const-generics-str-demangling.rs index 87b1fdf8a47..94c3b4c4448 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]" +//@ normalize-stderr: "c\[.*?\]" -> "c[HASH]" #![feature(adt_const_params, unsized_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 9f5f31177b3..06e3ce51fa6 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 -//@ normalize-stderr-test: "c\[[0-9a-f]+\]" -> "c[HASH]" +//@ normalize-stderr: "c\[[0-9a-f]+\]" -> "c[HASH]" #![feature(adt_const_params, unsized_const_params, decl_macro, rustc_attrs)] #![allow(incomplete_features)] diff --git a/tests/ui/symbol-names/impl1.rs b/tests/ui/symbol-names/impl1.rs index 9aefca47447..694cd89bd80 100644 --- a/tests/ui/symbol-names/impl1.rs +++ b/tests/ui/symbol-names/impl1.rs @@ -2,7 +2,7 @@ //@ 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?\)" -> "<SYMBOL_HASH>)" +//@[legacy]normalize-stderr: "h[\w]{16}E?\)" -> "<SYMBOL_HASH>)" #![feature(auto_traits, rustc_attrs)] #![allow(dead_code)] diff --git a/tests/ui/symbol-names/issue-75326.rs b/tests/ui/symbol-names/issue-75326.rs index a6aef3ddd7d..c60b872b0a2 100644 --- a/tests/ui/symbol-names/issue-75326.rs +++ b/tests/ui/symbol-names/issue-75326.rs @@ -2,7 +2,7 @@ //@ 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" +//@[legacy]normalize-stderr: "h[\w{16}]+" -> "SYMBOL_HASH" #![feature(rustc_attrs)] diff --git a/tests/ui/symbol-names/trait-objects.rs b/tests/ui/symbol-names/trait-objects.rs index d3fa40d1f39..da48190285d 100644 --- a/tests/ui/symbol-names/trait-objects.rs +++ b/tests/ui/symbol-names/trait-objects.rs @@ -3,7 +3,7 @@ //@ build-fail //@ revisions: v0 //@[v0]compile-flags: -C symbol-mangling-version=v0 -//@[v0]normalize-stderr-test: "core\[.*?\]" -> "core[HASH]" +//@[v0]normalize-stderr: "core\[.*?\]" -> "core[HASH]" #![feature(rustc_attrs)] diff --git a/tests/ui/symbol-names/types.rs b/tests/ui/symbol-names/types.rs index 38735e1aa50..a4bbbaa02f2 100644 --- a/tests/ui/symbol-names/types.rs +++ b/tests/ui/symbol-names/types.rs @@ -4,8 +4,8 @@ //@ [legacy] compile-flags: -Csymbol-mangling-version=legacy //@ [verbose-legacy] compile-flags: -Csymbol-mangling-version=legacy -Zverbose-internals //@ [v0] compile-flags: -Csymbol-mangling-version=v0 -//@ normalize-stderr-test: "h[[:xdigit:]]{16}" -> "h[HASH]" -//@ [v0] normalize-stderr-test: "\[[[:xdigit:]]{16}\]" -> "[HASH]" +//@ normalize-stderr: "h[[:xdigit:]]{16}" -> "h[HASH]" +//@ [v0] normalize-stderr: "\[[[:xdigit:]]{16}\]" -> "[HASH]" #![feature(never_type)] #![feature(rustc_attrs)] diff --git a/tests/ui/test-attrs/terse.rs b/tests/ui/test-attrs/terse.rs index 74e18915857..6c3f29ed10f 100644 --- a/tests/ui/test-attrs/terse.rs +++ b/tests/ui/test-attrs/terse.rs @@ -3,7 +3,7 @@ //@ run-flags: --test-threads=1 --quiet //@ check-run-results //@ exec-env:RUST_BACKTRACE=0 -//@ normalize-stdout-test: "finished in \d+\.\d+s" -> "finished in $$TIME" +//@ normalize-stdout: "finished in \d+\.\d+s" -> "finished in $$TIME" //@ ignore-emscripten no threads support //@ needs-unwind diff --git a/tests/ui/test-attrs/test-filter-multiple.rs b/tests/ui/test-attrs/test-filter-multiple.rs index c875929e672..49211c61e18 100644 --- a/tests/ui/test-attrs/test-filter-multiple.rs +++ b/tests/ui/test-attrs/test-filter-multiple.rs @@ -2,7 +2,7 @@ //@ compile-flags: --test //@ run-flags: --test-threads=1 test1 test2 //@ check-run-results -//@ normalize-stdout-test: "finished in \d+\.\d+s" -> "finished in $$TIME" +//@ normalize-stdout: "finished in \d+\.\d+s" -> "finished in $$TIME" //@ needs-threads #[test] diff --git a/tests/ui/test-attrs/test-panic-abort-nocapture.rs b/tests/ui/test-attrs/test-panic-abort-nocapture.rs index f3485d9c1fa..4377ae1ac3b 100644 --- a/tests/ui/test-attrs/test-panic-abort-nocapture.rs +++ b/tests/ui/test-attrs/test-panic-abort-nocapture.rs @@ -4,7 +4,7 @@ //@ run-fail //@ check-run-results //@ exec-env:RUST_BACKTRACE=0 -//@ normalize-stdout-test: "finished in \d+\.\d+s" -> "finished in $$TIME" +//@ normalize-stdout: "finished in \d+\.\d+s" -> "finished in $$TIME" //@ ignore-android #120567 //@ ignore-wasm no panic or subprocess support diff --git a/tests/ui/test-attrs/test-panic-abort.rs b/tests/ui/test-attrs/test-panic-abort.rs index 84740161a70..3d203e059a4 100644 --- a/tests/ui/test-attrs/test-panic-abort.rs +++ b/tests/ui/test-attrs/test-panic-abort.rs @@ -4,7 +4,7 @@ //@ run-fail //@ check-run-results //@ exec-env:RUST_BACKTRACE=0 -//@ normalize-stdout-test: "finished in \d+\.\d+s" -> "finished in $$TIME" +//@ normalize-stdout: "finished in \d+\.\d+s" -> "finished in $$TIME" //@ ignore-android #120567 //@ ignore-wasm no panic or subprocess support diff --git a/tests/ui/test-attrs/test-passed.rs b/tests/ui/test-attrs/test-passed.rs index 2a3fca7f002..959470adcc4 100644 --- a/tests/ui/test-attrs/test-passed.rs +++ b/tests/ui/test-attrs/test-passed.rs @@ -3,7 +3,7 @@ //@ run-flags: --test-threads=1 //@ run-pass //@ check-run-results -//@ normalize-stdout-test: "finished in \d+\.\d+s" -> "finished in $$TIME" +//@ normalize-stdout: "finished in \d+\.\d+s" -> "finished in $$TIME" // Tests the output of the test harness with only passed tests. diff --git a/tests/ui/test-attrs/test-thread-capture.rs b/tests/ui/test-attrs/test-thread-capture.rs index 75ff4e0ece6..c56f87f2dda 100644 --- a/tests/ui/test-attrs/test-thread-capture.rs +++ b/tests/ui/test-attrs/test-thread-capture.rs @@ -3,7 +3,7 @@ //@ run-flags: --test-threads=1 //@ check-run-results //@ exec-env:RUST_BACKTRACE=0 -//@ normalize-stdout-test: "finished in \d+\.\d+s" -> "finished in $$TIME" +//@ normalize-stdout: "finished in \d+\.\d+s" -> "finished in $$TIME" //@ ignore-emscripten no threads support //@ needs-unwind diff --git a/tests/ui/test-attrs/test-thread-nocapture.rs b/tests/ui/test-attrs/test-thread-nocapture.rs index 6a36ea8d7d1..5b82e9b2720 100644 --- a/tests/ui/test-attrs/test-thread-nocapture.rs +++ b/tests/ui/test-attrs/test-thread-nocapture.rs @@ -3,7 +3,7 @@ //@ 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" +//@ normalize-stdout: "finished in \d+\.\d+s" -> "finished in $$TIME" //@ ignore-emscripten no threads support //@ needs-unwind diff --git a/tests/ui/test-attrs/test-type.rs b/tests/ui/test-attrs/test-type.rs index 1b71ead55b0..51a6b9245cc 100644 --- a/tests/ui/test-attrs/test-type.rs +++ b/tests/ui/test-attrs/test-type.rs @@ -1,7 +1,7 @@ //@ 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" +//@ normalize-stdout: "finished in \d+\.\d+s" -> "finished in $$TIME" //@ needs-threads //@ run-pass diff --git a/tests/ui/test-attrs/tests-listing-format-json.rs b/tests/ui/test-attrs/tests-listing-format-json.rs index b735a82c166..9d57a6bc383 100644 --- a/tests/ui/test-attrs/tests-listing-format-json.rs +++ b/tests/ui/test-attrs/tests-listing-format-json.rs @@ -4,8 +4,8 @@ //@ 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/" +//@ normalize-stdout: "fake-test-src-base/test-attrs/" -> "$$DIR/" +//@ normalize-stdout: "fake-test-src-base\\test-attrs\\" -> "$$DIR/" // Checks the listing of tests with --format json. diff --git a/tests/ui/track-diagnostics/track.rs b/tests/ui/track-diagnostics/track.rs index 5023f34e4c1..9e81cb53fc1 100644 --- a/tests/ui/track-diagnostics/track.rs +++ b/tests/ui/track-diagnostics/track.rs @@ -5,13 +5,13 @@ // 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: ".rs:\d+:\d+" -> ".rs:LL:CC" +//@ normalize-stderr: "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: "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 7466e9246ce..5805fd21220 100644 --- a/tests/ui/track-diagnostics/track2.rs +++ b/tests/ui/track-diagnostics/track2.rs @@ -3,7 +3,7 @@ // 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: ".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 43ad1dff8b8..bac1fc7e184 100644 --- a/tests/ui/track-diagnostics/track3.rs +++ b/tests/ui/track-diagnostics/track3.rs @@ -3,7 +3,7 @@ // 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: ".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 bc76f6f1451..ec9e3efa481 100644 --- a/tests/ui/track-diagnostics/track4.rs +++ b/tests/ui/track-diagnostics/track4.rs @@ -3,7 +3,7 @@ // 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: ".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 bb82e9a62c8..e72e3482ad3 100644 --- a/tests/ui/track-diagnostics/track5.rs +++ b/tests/ui/track-diagnostics/track5.rs @@ -3,6 +3,6 @@ // 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: ".rs:\d+:\d+" -> ".rs:LL:CC" } diff --git a/tests/ui/track-diagnostics/track6.rs b/tests/ui/track-diagnostics/track6.rs index fc8df68e6d9..e4d124a22e4 100644 --- a/tests/ui/track-diagnostics/track6.rs +++ b/tests/ui/track-diagnostics/track6.rs @@ -3,7 +3,7 @@ // 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: ".rs:\d+:\d+" -> ".rs:LL:CC" pub trait Foo { diff --git a/tests/ui/traits/on_unimplemented_long_types.rs b/tests/ui/traits/on_unimplemented_long_types.rs index 60c3327902e..98749b8db7a 100644 --- a/tests/ui/traits/on_unimplemented_long_types.rs +++ b/tests/ui/traits/on_unimplemented_long_types.rs @@ -1,5 +1,5 @@ //@ compile-flags: --diagnostic-width=60 -Z write-long-types-to-disk=yes -//@ normalize-stderr-test: "long-type-\d+" -> "long-type-hash" +//@ normalize-stderr: "long-type-\d+" -> "long-type-hash" pub fn foo() -> impl std::fmt::Display { //~^ ERROR doesn't implement `std::fmt::Display` diff --git a/tests/ui/traits/trait-upcasting/illegal-upcast-to-impl-opaque.rs b/tests/ui/traits/trait-upcasting/illegal-upcast-to-impl-opaque.rs index ef0a5a7adca..d0418e75fab 100644 --- a/tests/ui/traits/trait-upcasting/illegal-upcast-to-impl-opaque.rs +++ b/tests/ui/traits/trait-upcasting/illegal-upcast-to-impl-opaque.rs @@ -2,10 +2,10 @@ //@[next] compile-flags: -Znext-solver //@[next] failure-status: 101 //@[next] known-bug: unknown -//@[next] normalize-stderr-test: "note: .*\n\n" -> "" -//@[next] normalize-stderr-test: "thread 'rustc' panicked.*\n.*\n" -> "" -//@[next] normalize-stderr-test: "(error: internal compiler error: [^:]+):\d+:\d+: " -> "$1:LL:CC: " -//@[next] normalize-stderr-test: "delayed at .*" -> "" +//@[next] normalize-stderr: "note: .*\n\n" -> "" +//@[next] normalize-stderr: "thread 'rustc' panicked.*\n.*\n" -> "" +//@[next] normalize-stderr: "(error: internal compiler error: [^:]+):\d+:\d+: " -> "$1:LL:CC: " +//@[next] normalize-stderr: "delayed at .*" -> "" //@[next] rustc-env:RUST_BACKTRACE=0 //@ check-pass diff --git a/tests/ui/transmute/transmute-different-sizes.rs b/tests/ui/transmute/transmute-different-sizes.rs index b7fca2b3278..40197a6c53f 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: "\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 d1340c5e860..f095b80dc2d 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: "\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 15d67483cc8..84951a0ee60 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: "\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 82683cdffef..9f0e293b4cb 100644 --- a/tests/ui/treat-err-as-bug/err.rs +++ b/tests/ui/treat-err-as-bug/err.rs @@ -2,8 +2,8 @@ //@ 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" -> "" +//@ normalize-stderr: "note: .*\n\n" -> "" +//@ normalize-stderr: "thread 'rustc' panicked.*:\n.*\n" -> "" //@ rustc-env:RUST_BACKTRACE=0 #![crate_type = "rlib"] 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 97b8e4a3dda..296bdd7a12d 100644 --- a/tests/ui/treat-err-as-bug/span_delayed_bug.rs +++ b/tests/ui/treat-err-as-bug/span_delayed_bug.rs @@ -2,8 +2,8 @@ //@ 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" -> "" +//@ normalize-stderr: "note: .*\n\n" -> "" +//@ normalize-stderr: "thread 'rustc' panicked.*:\n.*\n" -> "" //@ rustc-env:RUST_BACKTRACE=0 #![feature(rustc_attrs)] diff --git a/tests/ui/type/pattern_types/range_patterns.rs b/tests/ui/type/pattern_types/range_patterns.rs index 7c25edb1c3f..ff87444b49e 100644 --- a/tests/ui/type/pattern_types/range_patterns.rs +++ b/tests/ui/type/pattern_types/range_patterns.rs @@ -2,7 +2,7 @@ #![feature(pattern_type_macro)] #![allow(incomplete_features)] -//@ normalize-stderr-test: "pref: Align\([1-8] bytes\)" -> "pref: $$SOME_ALIGN" +//@ normalize-stderr: "pref: Align\([1-8] bytes\)" -> "pref: $$SOME_ALIGN" use std::pat::pattern_type; diff --git a/tests/ui/unknown-llvm-arg.rs b/tests/ui/unknown-llvm-arg.rs index 17908d36417..a8fa55a220a 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|.)*" -> "" +//@ normalize-stderr: "--help" -> "-help" +//@ normalize-stderr: "\n(\n|.)*" -> "" // I'm seeing "--help" locally, but "-help" in CI, so I'm normalizing it to just "-help". diff --git a/tests/ui/unpretty/avoid-crash.rs b/tests/ui/unpretty/avoid-crash.rs index e2bde823622..7fcabfe6a8d 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" +//@ normalize-stderr: "error `.*`" -> "$$ERROR_MESSAGE" //@ compile-flags: -o. -Zunpretty=ast-tree fn main() {} diff --git a/tests/ui/unpretty/staged-api-invalid-path-108697.rs b/tests/ui/unpretty/staged-api-invalid-path-108697.rs index 1b6ef249191..71bad213576 100644 --- a/tests/ui/unpretty/staged-api-invalid-path-108697.rs +++ b/tests/ui/unpretty/staged-api-invalid-path-108697.rs @@ -2,7 +2,7 @@ // ICE: tcx.resolutions(()) is not supported for local crate -Zunpretty=mir // on invalid module path with staged_api //@ compile-flags: -Zunpretty=mir -//@ normalize-stderr-test: "The system cannot find the file specified." -> "No such file or directory" +//@ normalize-stderr: "The system cannot find the file specified." -> "No such file or directory" #![feature(staged_api)] #[path = "lol"] mod foo; |
