Skip to content

Commit c208361

Browse files
committed
Always use a colon in //@ normalize-*: headers
1 parent 7a08f84 commit c208361

File tree

94 files changed

+183
-183
lines changed

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

94 files changed

+183
-183
lines changed

tests/ui-fulldeps/fluent-messages/test.rs

+1-1
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
//@ normalize-stderr-test "could not open Fluent resource:.*" -> "could not open Fluent resource: os-specific message"
1+
//@ normalize-stderr-test: "could not open Fluent resource:.*" -> "could not open Fluent resource: os-specific message"
22

33
#![feature(rustc_private)]
44
#![crate_type = "lib"]

tests/ui-fulldeps/missing-rustc-driver-error.rs

+1-1
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,7 @@
11
// Test that we get the following hint when trying to use a compiler crate without rustc_driver.
22
//@ error-pattern: try adding `extern crate rustc_driver;` at the top level of this crate
33
//@ compile-flags: --emit link
4-
//@ normalize-stderr-test ".*crate .* required.*\n\n" -> ""
4+
//@ normalize-stderr-test: ".*crate .* required.*\n\n" -> ""
55
//@ normalize-stderr-test: "aborting due to [0-9]+" -> "aborting due to NUMBER"
66

77
#![feature(rustc_private)]

tests/ui-fulldeps/session-diagnostic/diagnostic-derive-doc-comment-field.rs

+2-2
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,7 @@
11
//@ check-fail
22
// Tests that a doc comment will not preclude a field from being considered a diagnostic argument
3-
//@ normalize-stderr-test "the following other types implement trait `IntoDiagArg`:(?:.*\n){0,9}\s+and \d+ others" -> "normalized in stderr"
4-
//@ normalize-stderr-test "(COMPILER_DIR/.*\.rs):[0-9]+:[0-9]+" -> "$1:LL:CC"
3+
//@ normalize-stderr-test: "the following other types implement trait `IntoDiagArg`:(?:.*\n){0,9}\s+and \d+ others" -> "normalized in stderr"
4+
//@ normalize-stderr-test: "(COMPILER_DIR/.*\.rs):[0-9]+:[0-9]+" -> "$1:LL:CC"
55

66
// The proc_macro2 crate handles spans differently when on beta/stable release rather than nightly,
77
// changing the output of this test. Since Subdiagnostic is strictly internal to the compiler

tests/ui-fulldeps/session-diagnostic/diagnostic-derive.rs

+2-2
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,7 @@
11
//@ check-fail
22
// Tests error conditions for specifying diagnostics using #[derive(Diagnostic)]
3-
//@ normalize-stderr-test "the following other types implement trait `IntoDiagArg`:(?:.*\n){0,9}\s+and \d+ others" -> "normalized in stderr"
4-
//@ normalize-stderr-test "(COMPILER_DIR/.*\.rs):[0-9]+:[0-9]+" -> "$1:LL:CC"
3+
//@ normalize-stderr-test: "the following other types implement trait `IntoDiagArg`:(?:.*\n){0,9}\s+and \d+ others" -> "normalized in stderr"
4+
//@ normalize-stderr-test: "(COMPILER_DIR/.*\.rs):[0-9]+:[0-9]+" -> "$1:LL:CC"
55

66
// The proc_macro2 crate handles spans differently when on beta/stable release rather than nightly,
77
// changing the output of this test. Since Diagnostic is strictly internal to the compiler

tests/ui/abi/debug.rs

+5-5
Original file line numberDiff line numberDiff line change
@@ -1,9 +1,9 @@
1-
//@ normalize-stderr-test "(abi|pref|unadjusted_abi_align): Align\([1-8] bytes\)" -> "$1: $$SOME_ALIGN"
2-
//@ normalize-stderr-test "(size): Size\([48] bytes\)" -> "$1: $$SOME_SIZE"
3-
//@ normalize-stderr-test "(can_unwind): (true|false)" -> "$1: $$SOME_BOOL"
4-
//@ normalize-stderr-test "(valid_range): 0\.\.=(4294967295|18446744073709551615)" -> "$1: $$FULL"
1+
//@ normalize-stderr-test: "(abi|pref|unadjusted_abi_align): Align\([1-8] bytes\)" -> "$1: $$SOME_ALIGN"
2+
//@ normalize-stderr-test: "(size): Size\([48] bytes\)" -> "$1: $$SOME_SIZE"
3+
//@ normalize-stderr-test: "(can_unwind): (true|false)" -> "$1: $$SOME_BOOL"
4+
//@ normalize-stderr-test: "(valid_range): 0\.\.=(4294967295|18446744073709551615)" -> "$1: $$FULL"
55
// This pattern is prepared for when we account for alignment in the niche.
6-
//@ normalize-stderr-test "(valid_range): [1-9]\.\.=(429496729[0-9]|1844674407370955161[0-9])" -> "$1: $$NON_NULL"
6+
//@ normalize-stderr-test: "(valid_range): [1-9]\.\.=(429496729[0-9]|1844674407370955161[0-9])" -> "$1: $$NON_NULL"
77
// Some attributes are only computed for release builds:
88
//@ compile-flags: -O
99
#![feature(rustc_attrs)]

tests/ui/const-generics/generic_const_exprs/issue-80742.rs

+3-3
Original file line numberDiff line numberDiff line change
@@ -1,9 +1,9 @@
11
//@ check-fail
22
//@ known-bug: #97477
33
//@ failure-status: 101
4-
//@ normalize-stderr-test "note: .*\n\n" -> ""
5-
//@ normalize-stderr-test "thread 'rustc' panicked.*\n" -> ""
6-
//@ normalize-stderr-test "(error: internal compiler error: [^:]+):\d+:\d+: " -> "$1:LL:CC: "
4+
//@ normalize-stderr-test: "note: .*\n\n" -> ""
5+
//@ normalize-stderr-test: "thread 'rustc' panicked.*\n" -> ""
6+
//@ normalize-stderr-test: "(error: internal compiler error: [^:]+):\d+:\d+: " -> "$1:LL:CC: "
77
//@ rustc-env:RUST_BACKTRACE=0
88

99
// This test used to cause an ICE in rustc_mir::interpret::step::eval_rvalue_into_place

tests/ui/const-ptr/forbidden_slices.rs

+2-2
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
// Strip out raw byte dumps to make comparison platform-independent:
2-
//@ normalize-stderr-test "(the raw bytes of the constant) \(size: [0-9]*, align: [0-9]*\)" -> "$1 (size: $$SIZE, align: $$ALIGN)"
3-
//@ normalize-stderr-test "([0-9a-f][0-9a-f] |╾─*A(LLOC)?[0-9]+(\+[a-z0-9]+)?(<imm>)?─*╼ )+ *│.*" -> "HEX_DUMP"
2+
//@ normalize-stderr-test: "(the raw bytes of the constant) \(size: [0-9]*, align: [0-9]*\)" -> "$1 (size: $$SIZE, align: $$ALIGN)"
3+
//@ normalize-stderr-test: "([0-9a-f][0-9a-f] |╾─*A(LLOC)?[0-9]+(\+[a-z0-9]+)?(<imm>)?─*╼ )+ *│.*" -> "HEX_DUMP"
44

55
#![feature(
66
slice_from_ptr_range,

tests/ui/consts/const-eval/const-eval-query-stack.rs

+10-10
Original file line numberDiff line numberDiff line change
@@ -1,16 +1,16 @@
11
//@ compile-flags: -Ztreat-err-as-bug=1
22
//@ failure-status: 101
33
//@ rustc-env:RUST_BACKTRACE=1
4-
//@ normalize-stderr-test "\nerror: .*unexpectedly panicked.*\n\n" -> ""
5-
//@ normalize-stderr-test "note: we would appreciate a bug report.*\n\n" -> ""
6-
//@ normalize-stderr-test "note: compiler flags.*\n\n" -> ""
7-
//@ normalize-stderr-test "note: rustc.*running on.*\n\n" -> ""
8-
//@ normalize-stderr-test "thread.*panicked.*:\n.*\n" -> ""
9-
//@ normalize-stderr-test "stack backtrace:\n" -> ""
10-
//@ normalize-stderr-test "\s\d{1,}: .*\n" -> ""
11-
//@ normalize-stderr-test "\s at .*\n" -> ""
12-
//@ normalize-stderr-test ".*note: Some details.*\n" -> ""
13-
//@ normalize-stderr-test ".*omitted \d{1,} frame.*\n" -> ""
4+
//@ normalize-stderr-test: "\nerror: .*unexpectedly panicked.*\n\n" -> ""
5+
//@ normalize-stderr-test: "note: we would appreciate a bug report.*\n\n" -> ""
6+
//@ normalize-stderr-test: "note: compiler flags.*\n\n" -> ""
7+
//@ normalize-stderr-test: "note: rustc.*running on.*\n\n" -> ""
8+
//@ normalize-stderr-test: "thread.*panicked.*:\n.*\n" -> ""
9+
//@ normalize-stderr-test: "stack backtrace:\n" -> ""
10+
//@ normalize-stderr-test: "\s\d{1,}: .*\n" -> ""
11+
//@ normalize-stderr-test: "\s at .*\n" -> ""
12+
//@ normalize-stderr-test: ".*note: Some details.*\n" -> ""
13+
//@ normalize-stderr-test: ".*omitted \d{1,} frame.*\n" -> ""
1414
#![allow(unconditional_panic)]
1515

1616
const X: i32 = 1 / 0; //~ERROR constant

tests/ui/consts/const-eval/heap/dealloc_intrinsic_dangling.rs

+3-3
Original file line numberDiff line numberDiff line change
@@ -3,9 +3,9 @@
33
#![feature(const_mut_refs)]
44

55
// Strip out raw byte dumps to make comparison platform-independent:
6-
//@ normalize-stderr-test "(the raw bytes of the constant) \(size: [0-9]*, align: [0-9]*\)" -> "$1 (size: $$SIZE, align: $$ALIGN)"
7-
//@ normalize-stderr-test "([0-9a-f][0-9a-f] |╾─*A(LLOC)?[0-9]+(\+[a-z0-9]+)?(<imm>)?─*╼ )+ *│.*" -> "HEX_DUMP"
8-
//@ normalize-stderr-test "HEX_DUMP\s*\n\s*HEX_DUMP" -> "HEX_DUMP"
6+
//@ normalize-stderr-test: "(the raw bytes of the constant) \(size: [0-9]*, align: [0-9]*\)" -> "$1 (size: $$SIZE, align: $$ALIGN)"
7+
//@ normalize-stderr-test: "([0-9a-f][0-9a-f] |╾─*A(LLOC)?[0-9]+(\+[a-z0-9]+)?(<imm>)?─*╼ )+ *│.*" -> "HEX_DUMP"
8+
//@ normalize-stderr-test: "HEX_DUMP\s*\n\s*HEX_DUMP" -> "HEX_DUMP"
99

1010
use std::intrinsics;
1111

tests/ui/consts/const-eval/raw-bytes.rs

+1-1
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,7 @@
11
//@ stderr-per-bitwidth
22
//@ ignore-endian-big
33
// ignore-tidy-linelength
4-
//@ normalize-stderr-test "╾─*ALLOC[0-9]+(\+[a-z0-9]+)?(<imm>)?─*╼" -> "╾ALLOC_ID$1╼"
4+
//@ normalize-stderr-test: "╾─*ALLOC[0-9]+(\+[a-z0-9]+)?(<imm>)?─*╼" -> "╾ALLOC_ID$1╼"
55
#![allow(invalid_value)]
66
#![feature(never_type, rustc_attrs, ptr_metadata, slice_from_ptr_range, const_slice_from_ptr_range)]
77

tests/ui/consts/const-eval/ub-enum.rs

+3-3
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,7 @@
11
// Strip out raw byte dumps to make comparison platform-independent:
2-
//@ normalize-stderr-test "(the raw bytes of the constant) \(size: [0-9]*, align: [0-9]*\)" -> "$1 (size: $$SIZE, align: $$ALIGN)"
3-
//@ normalize-stderr-test "([0-9a-f][0-9a-f] |╾─*ALLOC[0-9]+(\+[a-z0-9]+)?(<imm>)?─*╼ )+ *│.*" -> "HEX_DUMP"
4-
//@ normalize-stderr-test "0x0+" -> "0x0"
2+
//@ normalize-stderr-test: "(the raw bytes of the constant) \(size: [0-9]*, align: [0-9]*\)" -> "$1 (size: $$SIZE, align: $$ALIGN)"
3+
//@ normalize-stderr-test: "([0-9a-f][0-9a-f] |╾─*ALLOC[0-9]+(\+[a-z0-9]+)?(<imm>)?─*╼ )+ *│.*" -> "HEX_DUMP"
4+
//@ normalize-stderr-test: "0x0+" -> "0x0"
55
#![feature(never_type)]
66
#![allow(invalid_value)]
77

tests/ui/consts/const-eval/ub-nonnull.rs

+2-2
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
// Strip out raw byte dumps to make comparison platform-independent:
2-
//@ normalize-stderr-test "(the raw bytes of the constant) \(size: [0-9]*, align: [0-9]*\)" -> "$1 (size: $$SIZE, align: $$ALIGN)"
3-
//@ normalize-stderr-test "([0-9a-f][0-9a-f] |╾─*ALLOC[0-9]+(\+[a-z0-9]+)?─*╼ )+ *│.*" -> "HEX_DUMP"
2+
//@ normalize-stderr-test: "(the raw bytes of the constant) \(size: [0-9]*, align: [0-9]*\)" -> "$1 (size: $$SIZE, align: $$ALIGN)"
3+
//@ normalize-stderr-test: "([0-9a-f][0-9a-f] |╾─*ALLOC[0-9]+(\+[a-z0-9]+)?─*╼ )+ *│.*" -> "HEX_DUMP"
44
#![allow(invalid_value)] // make sure we cannot allow away the errors tested here
55
#![feature(rustc_attrs, ptr_metadata)]
66

tests/ui/consts/const-eval/ub-ref-ptr.rs

+2-2
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,7 @@
11
// ignore-tidy-linelength
22
// Strip out raw byte dumps to make comparison platform-independent:
3-
//@ normalize-stderr-test "(the raw bytes of the constant) \(size: [0-9]*, align: [0-9]*\)" -> "$1 (size: $$SIZE, align: $$ALIGN)"
4-
//@ normalize-stderr-test "([0-9a-f][0-9a-f] |╾─*ALLOC[0-9]+(\+[a-z0-9]+)?(<imm>)?─*╼ )+ *│.*" -> "HEX_DUMP"
3+
//@ normalize-stderr-test: "(the raw bytes of the constant) \(size: [0-9]*, align: [0-9]*\)" -> "$1 (size: $$SIZE, align: $$ALIGN)"
4+
//@ normalize-stderr-test: "([0-9a-f][0-9a-f] |╾─*ALLOC[0-9]+(\+[a-z0-9]+)?(<imm>)?─*╼ )+ *│.*" -> "HEX_DUMP"
55
#![allow(invalid_value)]
66

77
use std::mem;

tests/ui/consts/const-eval/ub-uninhabit.rs

+2-2
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
// Strip out raw byte dumps to make comparison platform-independent:
2-
//@ normalize-stderr-test "(the raw bytes of the constant) \(size: [0-9]*, align: [0-9]*\)" -> "$1 (size: $$SIZE, align: $$ALIGN)"
3-
//@ normalize-stderr-test "([0-9a-f][0-9a-f] |╾─*ALLOC[0-9]+(\+[a-z0-9]+)?(<imm>)?─*╼ )+ *│.*" -> "HEX_DUMP"
2+
//@ normalize-stderr-test: "(the raw bytes of the constant) \(size: [0-9]*, align: [0-9]*\)" -> "$1 (size: $$SIZE, align: $$ALIGN)"
3+
//@ normalize-stderr-test: "([0-9a-f][0-9a-f] |╾─*ALLOC[0-9]+(\+[a-z0-9]+)?(<imm>)?─*╼ )+ *│.*" -> "HEX_DUMP"
44
#![feature(core_intrinsics)]
55
#![feature(never_type)]
66

tests/ui/consts/const-eval/ub-wide-ptr.rs

+4-4
Original file line numberDiff line numberDiff line change
@@ -5,10 +5,10 @@
55
use std::{ptr, mem};
66

77
// Strip out raw byte dumps to make comparison platform-independent:
8-
//@ normalize-stderr-test "(the raw bytes of the constant) \(size: [0-9]*, align: [0-9]*\)" -> "$1 (size: $$SIZE, align: $$ALIGN)"
9-
//@ normalize-stderr-test "([0-9a-f][0-9a-f] |╾─*ALLOC[0-9]+(\+[a-z0-9]+)?(<imm>)?─*╼ )+ *│.*" -> "HEX_DUMP"
10-
//@ normalize-stderr-test "offset \d+" -> "offset N"
11-
//@ normalize-stderr-test "size \d+" -> "size N"
8+
//@ normalize-stderr-test: "(the raw bytes of the constant) \(size: [0-9]*, align: [0-9]*\)" -> "$1 (size: $$SIZE, align: $$ALIGN)"
9+
//@ normalize-stderr-test: "([0-9a-f][0-9a-f] |╾─*ALLOC[0-9]+(\+[a-z0-9]+)?(<imm>)?─*╼ )+ *│.*" -> "HEX_DUMP"
10+
//@ normalize-stderr-test: "offset \d+" -> "offset N"
11+
//@ normalize-stderr-test: "size \d+" -> "size N"
1212

1313

1414
/// A newtype wrapper to prevent MIR generation from inserting reborrows that would affect the error

tests/ui/consts/const-mut-refs/mut_ref_in_final_dynamic_check.rs

+3-3
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
1-
//@ normalize-stderr-test "(the raw bytes of the constant) \(size: [0-9]*, align: [0-9]*\)" -> "$1 (size: $$SIZE, align: $$ALIGN)"
2-
//@ 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"
3-
//@ normalize-stderr-test "HEX_DUMP\s*\n\s*HEX_DUMP" -> "HEX_DUMP"
1+
//@ normalize-stderr-test: "(the raw bytes of the constant) \(size: [0-9]*, align: [0-9]*\)" -> "$1 (size: $$SIZE, align: $$ALIGN)"
2+
//@ 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"
3+
//@ normalize-stderr-test: "HEX_DUMP\s*\n\s*HEX_DUMP" -> "HEX_DUMP"
44
#![feature(const_mut_refs, const_refs_to_static)]
55
#![feature(raw_ref_op)]
66

tests/ui/consts/const_refs_to_static_fail.rs

+2-2
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
1-
//@ normalize-stderr-test "(the raw bytes of the constant) \(size: [0-9]*, align: [0-9]*\)" -> "$1 (size: $$SIZE, align: $$ALIGN)"
2-
//@ normalize-stderr-test "([0-9a-f][0-9a-f] |╾─*ALLOC[0-9]+(\+[a-z0-9]+)?(<imm>)?─*╼ )+ *│.*" -> "HEX_DUMP"
1+
//@ normalize-stderr-test: "(the raw bytes of the constant) \(size: [0-9]*, align: [0-9]*\)" -> "$1 (size: $$SIZE, align: $$ALIGN)"
2+
//@ normalize-stderr-test: "([0-9a-f][0-9a-f] |╾─*ALLOC[0-9]+(\+[a-z0-9]+)?(<imm>)?─*╼ )+ *│.*" -> "HEX_DUMP"
33
#![feature(const_refs_to_static, const_mut_refs, sync_unsafe_cell)]
44
use std::cell::SyncUnsafeCell;
55

tests/ui/consts/const_refs_to_static_fail_invalid.rs

+2-2
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
1-
//@ normalize-stderr-test "(the raw bytes of the constant) \(size: [0-9]*, align: [0-9]*\)" -> "$1 (size: $$SIZE, align: $$ALIGN)"
2-
//@ normalize-stderr-test "([0-9a-f][0-9a-f] |╾─*ALLOC[0-9]+(\+[a-z0-9]+)?(<imm>)?─*╼ )+ *│.*" -> "HEX_DUMP"
1+
//@ normalize-stderr-test: "(the raw bytes of the constant) \(size: [0-9]*, align: [0-9]*\)" -> "$1 (size: $$SIZE, align: $$ALIGN)"
2+
//@ normalize-stderr-test: "([0-9a-f][0-9a-f] |╾─*ALLOC[0-9]+(\+[a-z0-9]+)?(<imm>)?─*╼ )+ *│.*" -> "HEX_DUMP"
33
#![feature(const_refs_to_static)]
44
#![allow(static_mut_refs)]
55

tests/ui/consts/dangling-alloc-id-ice.rs

+3-3
Original file line numberDiff line numberDiff line change
@@ -1,8 +1,8 @@
11
// https://github.com/rust-lang/rust/issues/55223
22
// Strip out raw byte dumps to make comparison platform-independent:
3-
//@ normalize-stderr-test "(the raw bytes of the constant) \(size: [0-9]*, align: [0-9]*\)" -> "$1 (size: $$SIZE, align: $$ALIGN)"
4-
//@ normalize-stderr-test "([0-9a-f][0-9a-f] |╾─*A(LLOC)?[0-9]+(\+[a-z0-9]+)?(<imm>)?─*╼ )+ *│.*" -> "HEX_DUMP"
5-
//@ normalize-stderr-test "HEX_DUMP\s*\n\s*HEX_DUMP" -> "HEX_DUMP"
3+
//@ normalize-stderr-test: "(the raw bytes of the constant) \(size: [0-9]*, align: [0-9]*\)" -> "$1 (size: $$SIZE, align: $$ALIGN)"
4+
//@ normalize-stderr-test: "([0-9a-f][0-9a-f] |╾─*A(LLOC)?[0-9]+(\+[a-z0-9]+)?(<imm>)?─*╼ )+ *│.*" -> "HEX_DUMP"
5+
//@ normalize-stderr-test: "HEX_DUMP\s*\n\s*HEX_DUMP" -> "HEX_DUMP"
66

77
union Foo<'a> {
88
y: &'a (),

tests/ui/consts/dangling-zst-ice-issue-126393.rs

+3-3
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,7 @@
11
// Strip out raw byte dumps to make comparison platform-independent:
2-
//@ normalize-stderr-test "(the raw bytes of the constant) \(size: [0-9]*, align: [0-9]*\)" -> "$1 (size: $$SIZE, align: $$ALIGN)"
3-
//@ normalize-stderr-test "([0-9a-f][0-9a-f] |╾─*A(LLOC)?[0-9]+(\+[a-z0-9]+)?(<imm>)?─*╼ )+ *│.*" -> "HEX_DUMP"
4-
//@ normalize-stderr-test "HEX_DUMP\s*\n\s*HEX_DUMP" -> "HEX_DUMP"
2+
//@ normalize-stderr-test: "(the raw bytes of the constant) \(size: [0-9]*, align: [0-9]*\)" -> "$1 (size: $$SIZE, align: $$ALIGN)"
3+
//@ normalize-stderr-test: "([0-9a-f][0-9a-f] |╾─*A(LLOC)?[0-9]+(\+[a-z0-9]+)?(<imm>)?─*╼ )+ *│.*" -> "HEX_DUMP"
4+
//@ normalize-stderr-test: "HEX_DUMP\s*\n\s*HEX_DUMP" -> "HEX_DUMP"
55

66
pub struct Wrapper;
77
pub static MAGIC_FFI_REF: &'static Wrapper = unsafe {

tests/ui/consts/miri_unleashed/const_refers_to_static.rs

+2-2
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
//@ compile-flags: -Zunleash-the-miri-inside-of-you
2-
//@ normalize-stderr-test "(the raw bytes of the constant) \(size: [0-9]*, align: [0-9]*\)" -> "$1 (size: $$SIZE, align: $$ALIGN)"
3-
//@ normalize-stderr-test "([0-9a-f][0-9a-f] |╾─*ALLOC[0-9]+(\+[a-z0-9]+)?(<imm>)?─*╼ )+ *│.*" -> "HEX_DUMP"
2+
//@ normalize-stderr-test: "(the raw bytes of the constant) \(size: [0-9]*, align: [0-9]*\)" -> "$1 (size: $$SIZE, align: $$ALIGN)"
3+
//@ normalize-stderr-test: "([0-9a-f][0-9a-f] |╾─*ALLOC[0-9]+(\+[a-z0-9]+)?(<imm>)?─*╼ )+ *│.*" -> "HEX_DUMP"
44

55
use std::sync::atomic::AtomicUsize;
66
use std::sync::atomic::Ordering;

tests/ui/consts/miri_unleashed/const_refers_to_static_cross_crate.rs

+2-2
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,7 @@
11
//@ compile-flags: -Zunleash-the-miri-inside-of-you
22
//@ aux-build:static_cross_crate.rs
3-
//@ normalize-stderr-test "(the raw bytes of the constant) \(size: [0-9]*, align: [0-9]*\)" -> "$1 (size: $$SIZE, align: $$ALIGN)"
4-
//@ normalize-stderr-test "([0-9a-f][0-9a-f] |╾─*ALLOC[0-9]+(\+[a-z0-9]+)?(<imm>)?─*╼ )+ *│.*" -> "HEX_DUMP"
3+
//@ normalize-stderr-test: "(the raw bytes of the constant) \(size: [0-9]*, align: [0-9]*\)" -> "$1 (size: $$SIZE, align: $$ALIGN)"
4+
//@ normalize-stderr-test: "([0-9a-f][0-9a-f] |╾─*ALLOC[0-9]+(\+[a-z0-9]+)?(<imm>)?─*╼ )+ *│.*" -> "HEX_DUMP"
55
#![feature(half_open_range_patterns_in_slices)]
66
#![allow(static_mut_refs)]
77

tests/ui/consts/miri_unleashed/mutable_references.rs

+2-2
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
//@ compile-flags: -Zunleash-the-miri-inside-of-you
2-
//@ normalize-stderr-test "(the raw bytes of the constant) \(size: [0-9]*, align: [0-9]*\)" -> "$1 (size: $$SIZE, align: $$ALIGN)"
3-
//@ normalize-stderr-test "([0-9a-f][0-9a-f] |╾─*ALLOC[0-9]+(\+[a-z0-9]+)?(<imm>)?─*╼ )+ *│.*" -> "HEX_DUMP"
2+
//@ normalize-stderr-test: "(the raw bytes of the constant) \(size: [0-9]*, align: [0-9]*\)" -> "$1 (size: $$SIZE, align: $$ALIGN)"
3+
//@ normalize-stderr-test: "([0-9a-f][0-9a-f] |╾─*ALLOC[0-9]+(\+[a-z0-9]+)?(<imm>)?─*╼ )+ *│.*" -> "HEX_DUMP"
44

55
#![deny(const_eval_mutable_ptr_in_final_value)]
66
use std::cell::UnsafeCell;

tests/ui/consts/miri_unleashed/mutable_references_err.rs

+2-2
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
//@ compile-flags: -Zunleash-the-miri-inside-of-you
2-
//@ normalize-stderr-test "(the raw bytes of the constant) \(size: [0-9]*, align: [0-9]*\)" -> "$1 (size: $$SIZE, align: $$ALIGN)"
3-
//@ normalize-stderr-test "([0-9a-f][0-9a-f] |╾─*ALLOC[0-9]+(\+[a-z0-9]+)?(<imm>)?─*╼ )+ *│.*" -> "HEX_DUMP"
2+
//@ normalize-stderr-test: "(the raw bytes of the constant) \(size: [0-9]*, align: [0-9]*\)" -> "$1 (size: $$SIZE, align: $$ALIGN)"
3+
//@ normalize-stderr-test: "([0-9a-f][0-9a-f] |╾─*ALLOC[0-9]+(\+[a-z0-9]+)?(<imm>)?─*╼ )+ *│.*" -> "HEX_DUMP"
44
#![allow(invalid_reference_casting, static_mut_refs)]
55
#![deny(const_eval_mutable_ptr_in_final_value)]
66
use std::cell::UnsafeCell;

tests/ui/consts/offset_ub.rs

+1-1
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,7 @@
11
use std::ptr;
22

33

4-
//@ normalize-stderr-test "0x7f+" -> "0x7f..f"
4+
//@ normalize-stderr-test: "0x7f+" -> "0x7f..f"
55

66

77
pub const BEFORE_START: *const u8 = unsafe { (&0u8 as *const u8).offset(-1) }; //~NOTE

tests/ui/consts/overflowing-consts.rs

+2-2
Original file line numberDiff line numberDiff line change
@@ -6,8 +6,8 @@
66
//@ [opt]compile-flags: -O
77
//@ [opt_with_overflow_checks]compile-flags: -C overflow-checks=on -O
88
//@ ignore-pass (test tests codegen-time behaviour)
9-
//@ normalize-stderr-test "shift left by `(64|32)_usize`, which" -> "shift left by `%BITS%`, which"
10-
//@ normalize-stderr-test "shift right by `(64|32)_usize`, which" -> "shift right by `%BITS%`, which"
9+
//@ normalize-stderr-test: "shift left by `(64|32)_usize`, which" -> "shift left by `%BITS%`, which"
10+
//@ normalize-stderr-test: "shift right by `(64|32)_usize`, which" -> "shift right by `%BITS%`, which"
1111

1212

1313
#[cfg(target_pointer_width = "32")]

tests/ui/consts/transmute-size-mismatch-before-typeck.rs

+4-4
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,7 @@
1-
//@ normalize-stderr-64bit "64 bits" -> "word size"
2-
//@ normalize-stderr-32bit "32 bits" -> "word size"
3-
//@ normalize-stderr-64bit "128 bits" -> "2 * word size"
4-
//@ normalize-stderr-32bit "64 bits" -> "2 * word size"
1+
//@ normalize-stderr-64bit: "64 bits" -> "word size"
2+
//@ normalize-stderr-32bit: "32 bits" -> "word size"
3+
//@ normalize-stderr-64bit: "128 bits" -> "2 * word size"
4+
//@ normalize-stderr-32bit: "64 bits" -> "2 * word size"
55

66
fn main() {
77
match &b""[..] {

tests/ui/consts/validate_never_arrays.rs

+2-2
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
// Strip out raw byte dumps to make comparison platform-independent:
2-
//@ normalize-stderr-test "(the raw bytes of the constant) \(size: [0-9]*, align: [0-9]*\)" -> "$1 (size: $$SIZE, align: $$ALIGN)"
3-
//@ normalize-stderr-test "([0-9a-f][0-9a-f] |╾─*ALLOC[0-9]+(\+[a-z0-9]+)?(<imm>)?─*╼ )+ *│.*" -> "HEX_DUMP"
2+
//@ normalize-stderr-test: "(the raw bytes of the constant) \(size: [0-9]*, align: [0-9]*\)" -> "$1 (size: $$SIZE, align: $$ALIGN)"
3+
//@ normalize-stderr-test: "([0-9a-f][0-9a-f] |╾─*ALLOC[0-9]+(\+[a-z0-9]+)?(<imm>)?─*╼ )+ *│.*" -> "HEX_DUMP"
44
#![feature(never_type)]
55

66
const _: &[!; 1] = unsafe { &*(1_usize as *const [!; 1]) }; //~ ERROR undefined behavior

tests/ui/coroutine/static-not-unpin.rs

+1-1
Original file line numberDiff line numberDiff line change
@@ -4,7 +4,7 @@
44

55
#![feature(coroutines, stmt_expr_attributes)]
66

7-
//@ normalize-stderr-test "std::pin::Unpin" -> "std::marker::Unpin"
7+
//@ normalize-stderr-test: "std::pin::Unpin" -> "std::marker::Unpin"
88

99
use std::marker::Unpin;
1010

tests/ui/debuginfo/debuginfo-type-name-layout-ice-94961-1.rs

+2-2
Original file line numberDiff line numberDiff line change
@@ -4,8 +4,8 @@
44
//@ compile-flags:-C debuginfo=2
55
//@ build-fail
66
//@ error-pattern: too big for the current architecture
7-
//@ normalize-stderr-64bit "18446744073709551615" -> "SIZE"
8-
//@ normalize-stderr-32bit "4294967295" -> "SIZE"
7+
//@ normalize-stderr-64bit: "18446744073709551615" -> "SIZE"
8+
//@ normalize-stderr-32bit: "4294967295" -> "SIZE"
99

1010
#![crate_type = "rlib"]
1111

tests/ui/debuginfo/debuginfo-type-name-layout-ice-94961-2.rs

+2-2
Original file line numberDiff line numberDiff line change
@@ -6,8 +6,8 @@
66
//@ compile-flags:-C debuginfo=2
77
//@ build-fail
88
//@ error-pattern: too big for the current architecture
9-
//@ normalize-stderr-64bit "18446744073709551615" -> "SIZE"
10-
//@ normalize-stderr-32bit "4294967295" -> "SIZE"
9+
//@ normalize-stderr-64bit: "18446744073709551615" -> "SIZE"
10+
//@ normalize-stderr-32bit: "4294967295" -> "SIZE"
1111

1212
#![crate_type = "rlib"]
1313

0 commit comments

Comments
 (0)