Skip to content

Commit 924a4cd

Browse files
committed
bless
1 parent 47cb276 commit 924a4cd

File tree

3 files changed

+7
-7
lines changed

3 files changed

+7
-7
lines changed

src/test/ui/consts/const-eval/ub-ref-ptr.32bit.stderr

+2-2
Original file line numberDiff line numberDiff line change
@@ -158,11 +158,11 @@ error[E0080]: it is undefined behavior to use this value
158158
--> $DIR/ub-ref-ptr.rs:62:1
159159
|
160160
LL | const DATA_FN_PTR: fn() = unsafe { mem::transmute(&13) };
161-
| ^^^^^^^^^^^^^^^^^^^^^^^ constructing invalid value: encountered pointer to alloc43, but expected a function pointer
161+
| ^^^^^^^^^^^^^^^^^^^^^^^ constructing invalid value: encountered pointer to alloc41, but expected a function pointer
162162
|
163163
= 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.
164164
= note: the raw bytes of the constant (size: 4, align: 4) {
165-
╾─alloc43─╼ │ ╾──╼
165+
╾─alloc41─╼ │ ╾──╼
166166
}
167167

168168
error: aborting due to 16 previous errors

src/test/ui/consts/const-eval/ub-ref-ptr.64bit.stderr

+2-2
Original file line numberDiff line numberDiff line change
@@ -158,11 +158,11 @@ error[E0080]: it is undefined behavior to use this value
158158
--> $DIR/ub-ref-ptr.rs:62:1
159159
|
160160
LL | const DATA_FN_PTR: fn() = unsafe { mem::transmute(&13) };
161-
| ^^^^^^^^^^^^^^^^^^^^^^^ constructing invalid value: encountered pointer to alloc43, but expected a function pointer
161+
| ^^^^^^^^^^^^^^^^^^^^^^^ constructing invalid value: encountered pointer to alloc41, but expected a function pointer
162162
|
163163
= 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.
164164
= note: the raw bytes of the constant (size: 8, align: 8) {
165-
╾───────alloc43───────╼ │ ╾──────╼
165+
╾───────alloc41───────╼ │ ╾──────╼
166166
}
167167

168168
error: aborting due to 16 previous errors

src/test/ui/consts/offset_from_ub.stderr

+3-3
Original file line numberDiff line numberDiff line change
@@ -40,19 +40,19 @@ error[E0080]: evaluation of constant value failed
4040
--> $DIR/offset_from_ub.rs:52:14
4141
|
4242
LL | unsafe { ptr_offset_from(end_ptr, start_ptr) }
43-
| ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ out-of-bounds offset_from: alloc20 has size 4, so pointer to 10 bytes starting at offset 0 is out-of-bounds
43+
| ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ out-of-bounds offset_from: alloc18 has size 4, so pointer to 10 bytes starting at offset 0 is out-of-bounds
4444

4545
error[E0080]: evaluation of constant value failed
4646
--> $DIR/offset_from_ub.rs:61:14
4747
|
4848
LL | unsafe { ptr_offset_from(start_ptr, end_ptr) }
49-
| ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ out-of-bounds offset_from: alloc23 has size 4, so pointer to 10 bytes starting at offset 0 is out-of-bounds
49+
| ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ out-of-bounds offset_from: alloc21 has size 4, so pointer to 10 bytes starting at offset 0 is out-of-bounds
5050

5151
error[E0080]: evaluation of constant value failed
5252
--> $DIR/offset_from_ub.rs:69:14
5353
|
5454
LL | unsafe { ptr_offset_from(end_ptr, end_ptr) }
55-
| ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ out-of-bounds offset_from: alloc26 has size 4, so pointer at offset 10 is out-of-bounds
55+
| ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ out-of-bounds offset_from: alloc24 has size 4, so pointer at offset 10 is out-of-bounds
5656

5757
error[E0080]: evaluation of constant value failed
5858
--> $DIR/offset_from_ub.rs:78:27

0 commit comments

Comments
 (0)