]> git.proxmox.com Git - rustc.git/blame - tests/ui/const-ptr/out_of_bounds_read.stderr
Merge 1.70 into proxmox/bookworm
[rustc.git] / tests / ui / const-ptr / out_of_bounds_read.stderr
CommitLineData
136023e0 1error[E0080]: evaluation of constant value failed
94222f64 2 --> $SRC_DIR/core/src/ptr/mod.rs:LL:COL
136023e0 3 |
353b0b11 4 = note: dereferencing pointer failed: alloc5 has size 4, so pointer to 4 bytes starting at offset 4 is out-of-bounds
487cf647
FG
5 |
6note: inside `std::ptr::read::<u32>`
7 --> $SRC_DIR/core/src/ptr/mod.rs:LL:COL
487cf647
FG
8note: inside `_READ`
9 --> $DIR/out_of_bounds_read.rs:12:33
136023e0
XL
10 |
11LL | const _READ: u32 = unsafe { ptr::read(PAST_END_PTR) };
487cf647 12 | ^^^^^^^^^^^^^^^^^^^^^^^
136023e0
XL
13
14error[E0080]: evaluation of constant value failed
94222f64 15 --> $SRC_DIR/core/src/ptr/mod.rs:LL:COL
136023e0 16 |
353b0b11 17 = note: dereferencing pointer failed: alloc5 has size 4, so pointer to 4 bytes starting at offset 4 is out-of-bounds
94222f64 18 |
487cf647
FG
19note: inside `std::ptr::read::<u32>`
20 --> $SRC_DIR/core/src/ptr/mod.rs:LL:COL
487cf647
FG
21note: inside `ptr::const_ptr::<impl *const u32>::read`
22 --> $SRC_DIR/core/src/ptr/const_ptr.rs:LL:COL
487cf647
FG
23note: inside `_CONST_READ`
24 --> $DIR/out_of_bounds_read.rs:13:39
136023e0
XL
25 |
26LL | const _CONST_READ: u32 = unsafe { PAST_END_PTR.read() };
487cf647 27 | ^^^^^^^^^^^^^^^^^^^
136023e0
XL
28
29error[E0080]: evaluation of constant value failed
94222f64 30 --> $SRC_DIR/core/src/ptr/mod.rs:LL:COL
136023e0 31 |
353b0b11 32 = note: dereferencing pointer failed: alloc5 has size 4, so pointer to 4 bytes starting at offset 4 is out-of-bounds
487cf647
FG
33 |
34note: inside `std::ptr::read::<u32>`
35 --> $SRC_DIR/core/src/ptr/mod.rs:LL:COL
487cf647
FG
36note: inside `ptr::mut_ptr::<impl *mut u32>::read`
37 --> $SRC_DIR/core/src/ptr/mut_ptr.rs:LL:COL
487cf647
FG
38note: inside `_MUT_READ`
39 --> $DIR/out_of_bounds_read.rs:14:37
136023e0
XL
40 |
41LL | const _MUT_READ: u32 = unsafe { (PAST_END_PTR as *mut u32).read() };
487cf647 42 | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
136023e0
XL
43
44error: aborting due to 3 previous errors
45
46For more information about this error, try `rustc --explain E0080`.