File tree Expand file tree Collapse file tree 2 files changed +4
-4
lines changed Expand file tree Collapse file tree 2 files changed +4
-4
lines changed Original file line number Diff line number Diff line change @@ -164,7 +164,7 @@ LL | pub static R4: &[u8] = unsafe {
164
164
|
165
165
= 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.
166
166
= note: the raw bytes of the constant (size: 16, align: 8) {
167
- ╾─────── ALLOC_ID───────╼ 01 00 00 00 00 00 00 00 │ ╾──────╼........
167
+ ╾──────ALLOC_ID───────╼ 01 00 00 00 00 00 00 00 │ ╾──────╼........
168
168
}
169
169
170
170
error[E0080]: it is undefined behavior to use this value
Original file line number Diff line number Diff line change @@ -40,19 +40,19 @@ error[E0080]: evaluation of constant value failed
40
40
--> $DIR/offset_from_ub.rs:53:14
41
41
|
42
42
LL | unsafe { ptr_offset_from(end_ptr, start_ptr) }
43
- | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ out-of-bounds offset_from: alloc17 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
44
44
45
45
error[E0080]: evaluation of constant value failed
46
46
--> $DIR/offset_from_ub.rs:62:14
47
47
|
48
48
LL | unsafe { ptr_offset_from(start_ptr, end_ptr) }
49
- | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ out-of-bounds offset_from: alloc20 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
50
50
51
51
error[E0080]: evaluation of constant value failed
52
52
--> $DIR/offset_from_ub.rs:70:14
53
53
|
54
54
LL | unsafe { ptr_offset_from(end_ptr, end_ptr) }
55
- | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ out-of-bounds offset_from: alloc23 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
56
56
57
57
error[E0080]: evaluation of constant value failed
58
58
--> $DIR/offset_from_ub.rs:79:14
You can’t perform that action at this time.
0 commit comments