@@ -7,10 +7,10 @@ LL | unsafe { intrinsics::offset(self, count) }
77 | overflowing in-bounds pointer arithmetic
88 | inside `ptr::const_ptr::<impl *const u8>::offset` at $SRC_DIR/core/src/ptr/const_ptr.rs:LL:COL
99 |
10- ::: $DIR/offset_ub.rs:8 :46
10+ ::: $DIR/offset_ub.rs:7 :46
1111 |
1212LL | pub const BEFORE_START: *const u8 = unsafe { (&0u8 as *const u8).offset(-1) };
13- | ------------------------------ inside `BEFORE_START` at $DIR/offset_ub.rs:8 :46
13+ | ------------------------------ inside `BEFORE_START` at $DIR/offset_ub.rs:7 :46
1414
1515error[E0080]: evaluation of constant value failed
1616 --> $SRC_DIR/core/src/ptr/const_ptr.rs:LL:COL
@@ -21,10 +21,10 @@ LL | unsafe { intrinsics::offset(self, count) }
2121 | pointer arithmetic failed: allocN has size 1, so pointer to 2 bytes starting at offset 0 is out-of-bounds
2222 | inside `ptr::const_ptr::<impl *const u8>::offset` at $SRC_DIR/core/src/ptr/const_ptr.rs:LL:COL
2323 |
24- ::: $DIR/offset_ub.rs:9 :43
24+ ::: $DIR/offset_ub.rs:8 :43
2525 |
2626LL | pub const AFTER_END: *const u8 = unsafe { (&0u8 as *const u8).offset(2) };
27- | ----------------------------- inside `AFTER_END` at $DIR/offset_ub.rs:9 :43
27+ | ----------------------------- inside `AFTER_END` at $DIR/offset_ub.rs:8 :43
2828
2929error[E0080]: evaluation of constant value failed
3030 --> $SRC_DIR/core/src/ptr/const_ptr.rs:LL:COL
@@ -35,10 +35,10 @@ LL | unsafe { intrinsics::offset(self, count) }
3535 | pointer arithmetic failed: allocN has size 100, so pointer to 101 bytes starting at offset 0 is out-of-bounds
3636 | inside `ptr::const_ptr::<impl *const u8>::offset` at $SRC_DIR/core/src/ptr/const_ptr.rs:LL:COL
3737 |
38- ::: $DIR/offset_ub.rs:10 :45
38+ ::: $DIR/offset_ub.rs:9 :45
3939 |
4040LL | pub const AFTER_ARRAY: *const u8 = unsafe { [0u8; 100].as_ptr().offset(101) };
41- | ------------------------------- inside `AFTER_ARRAY` at $DIR/offset_ub.rs:10 :45
41+ | ------------------------------- inside `AFTER_ARRAY` at $DIR/offset_ub.rs:9 :45
4242
4343error[E0080]: evaluation of constant value failed
4444 --> $SRC_DIR/core/src/ptr/const_ptr.rs:LL:COL
@@ -49,10 +49,10 @@ LL | unsafe { intrinsics::offset(self, count) }
4949 | overflowing in-bounds pointer arithmetic
5050 | inside `ptr::const_ptr::<impl *const u16>::offset` at $SRC_DIR/core/src/ptr/const_ptr.rs:LL:COL
5151 |
52- ::: $DIR/offset_ub.rs:12 :43
52+ ::: $DIR/offset_ub.rs:11 :43
5353 |
5454LL | pub const OVERFLOW: *const u16 = unsafe { [0u16; 1].as_ptr().offset(isize::MAX) };
55- | ------------------------------------- inside `OVERFLOW` at $DIR/offset_ub.rs:12 :43
55+ | ------------------------------------- inside `OVERFLOW` at $DIR/offset_ub.rs:11 :43
5656
5757error[E0080]: evaluation of constant value failed
5858 --> $SRC_DIR/core/src/ptr/const_ptr.rs:LL:COL
@@ -63,10 +63,10 @@ LL | unsafe { intrinsics::offset(self, count) }
6363 | overflowing in-bounds pointer arithmetic
6464 | inside `ptr::const_ptr::<impl *const u16>::offset` at $SRC_DIR/core/src/ptr/const_ptr.rs:LL:COL
6565 |
66- ::: $DIR/offset_ub.rs:13 :44
66+ ::: $DIR/offset_ub.rs:12 :44
6767 |
6868LL | pub const UNDERFLOW: *const u16 = unsafe { [0u16; 1].as_ptr().offset(isize::MIN) };
69- | ------------------------------------- inside `UNDERFLOW` at $DIR/offset_ub.rs:13 :44
69+ | ------------------------------------- inside `UNDERFLOW` at $DIR/offset_ub.rs:12 :44
7070
7171error[E0080]: evaluation of constant value failed
7272 --> $SRC_DIR/core/src/ptr/const_ptr.rs:LL:COL
@@ -77,10 +77,10 @@ LL | unsafe { intrinsics::offset(self, count) }
7777 | overflowing in-bounds pointer arithmetic
7878 | inside `ptr::const_ptr::<impl *const u8>::offset` at $SRC_DIR/core/src/ptr/const_ptr.rs:LL:COL
7979 |
80- ::: $DIR/offset_ub.rs:14 :56
80+ ::: $DIR/offset_ub.rs:13 :56
8181 |
8282LL | pub const OVERFLOW_ADDRESS_SPACE: *const u8 = unsafe { (usize::MAX as *const u8).offset(2) };
83- | ----------------------------------- inside `OVERFLOW_ADDRESS_SPACE` at $DIR/offset_ub.rs:14 :56
83+ | ----------------------------------- inside `OVERFLOW_ADDRESS_SPACE` at $DIR/offset_ub.rs:13 :56
8484
8585error[E0080]: evaluation of constant value failed
8686 --> $SRC_DIR/core/src/ptr/const_ptr.rs:LL:COL
@@ -91,10 +91,10 @@ LL | unsafe { intrinsics::offset(self, count) }
9191 | overflowing in-bounds pointer arithmetic
9292 | inside `ptr::const_ptr::<impl *const u8>::offset` at $SRC_DIR/core/src/ptr/const_ptr.rs:LL:COL
9393 |
94- ::: $DIR/offset_ub.rs:15 :57
94+ ::: $DIR/offset_ub.rs:14 :57
9595 |
9696LL | pub const UNDERFLOW_ADDRESS_SPACE: *const u8 = unsafe { (1 as *const u8).offset(-2) };
97- | --------------------------- inside `UNDERFLOW_ADDRESS_SPACE` at $DIR/offset_ub.rs:15 :57
97+ | --------------------------- inside `UNDERFLOW_ADDRESS_SPACE` at $DIR/offset_ub.rs:14 :57
9898
9999error[E0080]: evaluation of constant value failed
100100 --> $SRC_DIR/core/src/ptr/const_ptr.rs:LL:COL
@@ -105,10 +105,10 @@ LL | unsafe { intrinsics::offset(self, count) }
105105 | pointer arithmetic failed: allocN has size 1, so pointer to 2 bytes starting at offset -4 is out-of-bounds
106106 | inside `ptr::const_ptr::<impl *const u8>::offset` at $SRC_DIR/core/src/ptr/const_ptr.rs:LL:COL
107107 |
108- ::: $DIR/offset_ub.rs:16 :49
108+ ::: $DIR/offset_ub.rs:15 :49
109109 |
110110LL | pub const NEGATIVE_OFFSET: *const u8 = unsafe { [0u8; 1].as_ptr().wrapping_offset(-2).offset(-2) };
111- | ------------------------------------------------ inside `NEGATIVE_OFFSET` at $DIR/offset_ub.rs:16 :49
111+ | ------------------------------------------------ inside `NEGATIVE_OFFSET` at $DIR/offset_ub.rs:15 :49
112112
113113error[E0080]: evaluation of constant value failed
114114 --> $SRC_DIR/core/src/ptr/const_ptr.rs:LL:COL
@@ -119,10 +119,10 @@ LL | unsafe { intrinsics::offset(self, count) }
119119 | pointer arithmetic failed: allocN has size 0, so pointer to 1 byte starting at offset 0 is out-of-bounds
120120 | inside `ptr::const_ptr::<impl *const u8>::offset` at $SRC_DIR/core/src/ptr/const_ptr.rs:LL:COL
121121 |
122- ::: $DIR/offset_ub.rs:18 :50
122+ ::: $DIR/offset_ub.rs:17 :50
123123 |
124124LL | pub const ZERO_SIZED_ALLOC: *const u8 = unsafe { [0u8; 0].as_ptr().offset(1) };
125- | --------------------------- inside `ZERO_SIZED_ALLOC` at $DIR/offset_ub.rs:18 :50
125+ | --------------------------- inside `ZERO_SIZED_ALLOC` at $DIR/offset_ub.rs:17 :50
126126
127127error[E0080]: evaluation of constant value failed
128128 --> $SRC_DIR/core/src/ptr/mut_ptr.rs:LL:COL
@@ -133,10 +133,10 @@ LL | unsafe { intrinsics::offset(self, count) as *mut T }
133133 | pointer arithmetic failed: 0x1 is not a valid pointer
134134 | inside `ptr::mut_ptr::<impl *mut u8>::offset` at $SRC_DIR/core/src/ptr/mut_ptr.rs:LL:COL
135135 |
136- ::: $DIR/offset_ub.rs:19 :42
136+ ::: $DIR/offset_ub.rs:18 :42
137137 |
138138LL | pub const DANGLING: *const u8 = unsafe { ptr::NonNull::<u8>::dangling().as_ptr().offset(4) };
139- | ------------------------------------------------- inside `DANGLING` at $DIR/offset_ub.rs:19 :42
139+ | ------------------------------------------------- inside `DANGLING` at $DIR/offset_ub.rs:18 :42
140140
141141error[E0080]: evaluation of constant value failed
142142 --> $SRC_DIR/core/src/ptr/const_ptr.rs:LL:COL
@@ -147,10 +147,10 @@ LL | unsafe { intrinsics::offset(self, count) }
147147 | pointer arithmetic failed: null pointer is not a valid pointer
148148 | inside `ptr::const_ptr::<impl *const u8>::offset` at $SRC_DIR/core/src/ptr/const_ptr.rs:LL:COL
149149 |
150- ::: $DIR/offset_ub.rs:22 :50
150+ ::: $DIR/offset_ub.rs:21 :50
151151 |
152152LL | pub const NULL_OFFSET_ZERO: *const u8 = unsafe { ptr::null::<u8>().offset(0) };
153- | --------------------------- inside `NULL_OFFSET_ZERO` at $DIR/offset_ub.rs:22 :50
153+ | --------------------------- inside `NULL_OFFSET_ZERO` at $DIR/offset_ub.rs:21 :50
154154
155155error[E0080]: evaluation of constant value failed
156156 --> $SRC_DIR/core/src/ptr/const_ptr.rs:LL:COL
@@ -161,10 +161,10 @@ LL | unsafe { intrinsics::offset(self, count) }
161161 | pointer arithmetic failed: 0x7f..f is not a valid pointer
162162 | inside `ptr::const_ptr::<impl *const u8>::offset` at $SRC_DIR/core/src/ptr/const_ptr.rs:LL:COL
163163 |
164- ::: $DIR/offset_ub.rs:25 :47
164+ ::: $DIR/offset_ub.rs:24 :47
165165 |
166166LL | pub const UNDERFLOW_ABS: *const u8 = unsafe { (usize::MAX as *const u8).offset(isize::MIN) };
167- | -------------------------------------------- inside `UNDERFLOW_ABS` at $DIR/offset_ub.rs:25 :47
167+ | -------------------------------------------- inside `UNDERFLOW_ABS` at $DIR/offset_ub.rs:24 :47
168168
169169error: aborting due to 12 previous errors
170170
0 commit comments