Skip to content
This repository was archived by the owner on May 28, 2025. It is now read-only.

Commit f68e79d

Browse files
committed
remove stderr-per-bitwidth from some tests
1 parent 0702701 commit f68e79d

15 files changed

+53
-311
lines changed

tests/ui/consts/const-eval/validate_uninhabited_zsts.64bit.stderr

Lines changed: 0 additions & 52 deletions
This file was deleted.

tests/ui/consts/const-eval/validate_uninhabited_zsts.rs

Lines changed: 0 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,3 @@
1-
// stderr-per-bitwidth
2-
31
const fn foo() -> ! {
42
unsafe { std::mem::transmute(()) }
53
//~^ ERROR evaluation of constant value failed

tests/ui/consts/const-eval/validate_uninhabited_zsts.32bit.stderr renamed to tests/ui/consts/const-eval/validate_uninhabited_zsts.stderr

Lines changed: 8 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
11
warning: the type `!` does not permit zero-initialization
2-
--> $DIR/validate_uninhabited_zsts.rs:4:14
2+
--> $DIR/validate_uninhabited_zsts.rs:2:14
33
|
44
LL | unsafe { std::mem::transmute(()) }
55
| ^^^^^^^^^^^^^^^^^^^^^^^ this code causes undefined behavior when executed
@@ -8,41 +8,41 @@ LL | unsafe { std::mem::transmute(()) }
88
= note: `#[warn(invalid_value)]` on by default
99

1010
error[E0080]: evaluation of constant value failed
11-
--> $DIR/validate_uninhabited_zsts.rs:4:14
11+
--> $DIR/validate_uninhabited_zsts.rs:2:14
1212
|
1313
LL | unsafe { std::mem::transmute(()) }
1414
| ^^^^^^^^^^^^^^^^^^^^^^^ constructing invalid value: encountered a value of the never type `!`
1515
|
1616
note: inside `foo`
17-
--> $DIR/validate_uninhabited_zsts.rs:4:14
17+
--> $DIR/validate_uninhabited_zsts.rs:2:14
1818
|
1919
LL | unsafe { std::mem::transmute(()) }
2020
| ^^^^^^^^^^^^^^^^^^^^^^^
2121
note: inside `FOO`
22-
--> $DIR/validate_uninhabited_zsts.rs:19:33
22+
--> $DIR/validate_uninhabited_zsts.rs:17:33
2323
|
2424
LL | const FOO: [empty::Empty; 3] = [foo(); 3];
2525
| ^^^^^
2626

2727
error[E0080]: evaluation of constant value failed
28-
--> $DIR/validate_uninhabited_zsts.rs:21:42
28+
--> $DIR/validate_uninhabited_zsts.rs:19:42
2929
|
3030
LL | const BAR: [empty::Empty; 3] = [unsafe { std::mem::transmute(()) }; 3];
3131
| ^^^^^^^^^^^^^^^^^^^^^^^ constructing invalid value at .0: encountered a value of uninhabited type `Void`
3232

3333
warning: the type `empty::Empty` does not permit zero-initialization
34-
--> $DIR/validate_uninhabited_zsts.rs:21:42
34+
--> $DIR/validate_uninhabited_zsts.rs:19:42
3535
|
3636
LL | const BAR: [empty::Empty; 3] = [unsafe { std::mem::transmute(()) }; 3];
3737
| ^^^^^^^^^^^^^^^^^^^^^^^ this code causes undefined behavior when executed
3838
|
3939
note: in this struct field
40-
--> $DIR/validate_uninhabited_zsts.rs:16:22
40+
--> $DIR/validate_uninhabited_zsts.rs:14:22
4141
|
4242
LL | pub struct Empty(Void);
4343
| ^^^^
4444
note: enums with no inhabited variants have no valid value
45-
--> $DIR/validate_uninhabited_zsts.rs:13:5
45+
--> $DIR/validate_uninhabited_zsts.rs:11:5
4646
|
4747
LL | enum Void {}
4848
| ^^^^^^^^^

tests/ui/consts/const-mut-refs/issue-76510.64bit.stderr

Lines changed: 0 additions & 26 deletions
This file was deleted.

tests/ui/consts/const-mut-refs/issue-76510.rs

Lines changed: 0 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,3 @@
1-
// stderr-per-bitwidth
2-
31
use std::mem::{transmute, ManuallyDrop};
42

53
const S: &'static mut str = &mut " hello ";

tests/ui/consts/const-mut-refs/issue-76510.32bit.stderr renamed to tests/ui/consts/const-mut-refs/issue-76510.stderr

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1,11 +1,11 @@
11
error[E0764]: mutable references are not allowed in the final value of constants
2-
--> $DIR/issue-76510.rs:5:29
2+
--> $DIR/issue-76510.rs:3:29
33
|
44
LL | const S: &'static mut str = &mut " hello ";
55
| ^^^^^^^^^^^^^^
66

77
error[E0658]: mutation through a reference is not allowed in constants
8-
--> $DIR/issue-76510.rs:5:29
8+
--> $DIR/issue-76510.rs:3:29
99
|
1010
LL | const S: &'static mut str = &mut " hello ";
1111
| ^^^^^^^^^^^^^^
@@ -15,7 +15,7 @@ LL | const S: &'static mut str = &mut " hello ";
1515
= note: this compiler was built on YYYY-MM-DD; consider upgrading it if it is out of date
1616

1717
error[E0596]: cannot borrow data in a `&` reference as mutable
18-
--> $DIR/issue-76510.rs:5:29
18+
--> $DIR/issue-76510.rs:3:29
1919
|
2020
LL | const S: &'static mut str = &mut " hello ";
2121
| ^^^^^^^^^^^^^^ cannot borrow as mutable

tests/ui/consts/const-mut-refs/mut_ref_in_final_dynamic_check.64bit.stderr

Lines changed: 0 additions & 25 deletions
This file was deleted.

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

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,5 @@
1-
// stderr-per-bitwidth
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"
23
#![feature(const_mut_refs, const_refs_to_static)]
34
#![feature(raw_ref_op)]
45

tests/ui/consts/const-mut-refs/mut_ref_in_final_dynamic_check.32bit.stderr renamed to tests/ui/consts/const-mut-refs/mut_ref_in_final_dynamic_check.stderr

Lines changed: 6 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -1,23 +1,23 @@
11
error[E0080]: it is undefined behavior to use this value
2-
--> $DIR/mut_ref_in_final_dynamic_check.rs:16:1
2+
--> $DIR/mut_ref_in_final_dynamic_check.rs:17:1
33
|
44
LL | const A: Option<&mut i32> = helper();
55
| ^^^^^^^^^^^^^^^^^^^^^^^^^ constructing invalid value at .<enum-variant(Some)>.0: encountered mutable reference in a `const` or `static`
66
|
77
= note: The rules on what exactly is undefined behavior aren't clear, so this check might be overzealous. Please open an issue on the rustc repository if you believe it should not be considered undefined behavior.
8-
= note: the raw bytes of the constant (size: 4, align: 4) {
9-
╾ALLOC0╼ │ ╾──╼
8+
= note: the raw bytes of the constant (size: $SIZE, align: $ALIGN) {
9+
HEX_DUMP
1010
}
1111

1212
error[E0080]: it is undefined behavior to use this value
13-
--> $DIR/mut_ref_in_final_dynamic_check.rs:18:1
13+
--> $DIR/mut_ref_in_final_dynamic_check.rs:19:1
1414
|
1515
LL | static A_STATIC: Option<&mut i32> = helper();
1616
| ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ constructing invalid value at .<enum-variant(Some)>.0: encountered mutable reference in a `const` or `static`
1717
|
1818
= note: The rules on what exactly is undefined behavior aren't clear, so this check might be overzealous. Please open an issue on the rustc repository if you believe it should not be considered undefined behavior.
19-
= note: the raw bytes of the constant (size: 4, align: 4) {
20-
╾ALLOC0╼ │ ╾──╼
19+
= note: the raw bytes of the constant (size: $SIZE, align: $ALIGN) {
20+
HEX_DUMP
2121
}
2222

2323
error: aborting due to 2 previous errors

tests/ui/consts/miri_unleashed/const_refers_to_static.64bit.stderr

Lines changed: 0 additions & 65 deletions
This file was deleted.

0 commit comments

Comments
 (0)