1 error: any use of this value will cause an error
2 --> $SRC_DIR/core/src/ptr/const_ptr.rs:LL:COL
4 LL | unsafe { intrinsics::offset(self, count) }
5 | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
7 | overflowing in-bounds pointer arithmetic
8 | inside `ptr::const_ptr::<impl *const u8>::offset` at $SRC_DIR/core/src/ptr/const_ptr.rs:LL:COL
9 | inside `BEFORE_START` at $DIR/offset_ub.rs:6:46
11 ::: $DIR/offset_ub.rs:6:1
13 LL | pub const BEFORE_START: *const u8 = unsafe { (&0u8 as *const u8).offset(-1) };
14 | ------------------------------------------------------------------------------
16 = note: `#[deny(const_err)]` on by default
17 = warning: this was previously accepted by the compiler but is being phased out; it will become a hard error in a future release!
18 = note: for more information, see issue #71800 <https://github.com/rust-lang/rust/issues/71800>
20 error: any use of this value will cause an error
21 --> $SRC_DIR/core/src/ptr/const_ptr.rs:LL:COL
23 LL | unsafe { intrinsics::offset(self, count) }
24 | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
26 | inbounds test failed: pointer must be in-bounds at offset 2, but is outside bounds of allocN which has size 1
27 | inside `ptr::const_ptr::<impl *const u8>::offset` at $SRC_DIR/core/src/ptr/const_ptr.rs:LL:COL
28 | inside `AFTER_END` at $DIR/offset_ub.rs:7:43
30 ::: $DIR/offset_ub.rs:7:1
32 LL | pub const AFTER_END: *const u8 = unsafe { (&0u8 as *const u8).offset(2) };
33 | --------------------------------------------------------------------------
35 = warning: this was previously accepted by the compiler but is being phased out; it will become a hard error in a future release!
36 = note: for more information, see issue #71800 <https://github.com/rust-lang/rust/issues/71800>
38 error: any use of this value will cause an error
39 --> $SRC_DIR/core/src/ptr/const_ptr.rs:LL:COL
41 LL | unsafe { intrinsics::offset(self, count) }
42 | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
44 | inbounds test failed: pointer must be in-bounds at offset 101, but is outside bounds of allocN which has size 100
45 | inside `ptr::const_ptr::<impl *const u8>::offset` at $SRC_DIR/core/src/ptr/const_ptr.rs:LL:COL
46 | inside `AFTER_ARRAY` at $DIR/offset_ub.rs:8:45
48 ::: $DIR/offset_ub.rs:8:1
50 LL | pub const AFTER_ARRAY: *const u8 = unsafe { [0u8; 100].as_ptr().offset(101) };
51 | ------------------------------------------------------------------------------
53 = warning: this was previously accepted by the compiler but is being phased out; it will become a hard error in a future release!
54 = note: for more information, see issue #71800 <https://github.com/rust-lang/rust/issues/71800>
56 error: any use of this value will cause an error
57 --> $SRC_DIR/core/src/ptr/const_ptr.rs:LL:COL
59 LL | unsafe { intrinsics::offset(self, count) }
60 | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
62 | overflowing in-bounds pointer arithmetic
63 | inside `ptr::const_ptr::<impl *const u16>::offset` at $SRC_DIR/core/src/ptr/const_ptr.rs:LL:COL
64 | inside `OVERFLOW` at $DIR/offset_ub.rs:10:43
66 ::: $DIR/offset_ub.rs:10:1
68 LL | pub const OVERFLOW: *const u16 = unsafe { [0u16; 1].as_ptr().offset(isize::MAX) };
69 | ----------------------------------------------------------------------------------
71 = warning: this was previously accepted by the compiler but is being phased out; it will become a hard error in a future release!
72 = note: for more information, see issue #71800 <https://github.com/rust-lang/rust/issues/71800>
74 error: any use of this value will cause an error
75 --> $SRC_DIR/core/src/ptr/const_ptr.rs:LL:COL
77 LL | unsafe { intrinsics::offset(self, count) }
78 | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
80 | overflowing in-bounds pointer arithmetic
81 | inside `ptr::const_ptr::<impl *const u16>::offset` at $SRC_DIR/core/src/ptr/const_ptr.rs:LL:COL
82 | inside `UNDERFLOW` at $DIR/offset_ub.rs:11:44
84 ::: $DIR/offset_ub.rs:11:1
86 LL | pub const UNDERFLOW: *const u16 = unsafe { [0u16; 1].as_ptr().offset(isize::MIN) };
87 | -----------------------------------------------------------------------------------
89 = warning: this was previously accepted by the compiler but is being phased out; it will become a hard error in a future release!
90 = note: for more information, see issue #71800 <https://github.com/rust-lang/rust/issues/71800>
92 error: any use of this value will cause an error
93 --> $SRC_DIR/core/src/ptr/const_ptr.rs:LL:COL
95 LL | unsafe { intrinsics::offset(self, count) }
96 | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
98 | overflowing in-bounds pointer arithmetic
99 | inside `ptr::const_ptr::<impl *const u8>::offset` at $SRC_DIR/core/src/ptr/const_ptr.rs:LL:COL
100 | inside `OVERFLOW_ADDRESS_SPACE` at $DIR/offset_ub.rs:12:56
102 ::: $DIR/offset_ub.rs:12:1
104 LL | pub const OVERFLOW_ADDRESS_SPACE: *const u8 = unsafe { (usize::MAX as *const u8).offset(2) };
105 | ---------------------------------------------------------------------------------------------
107 = warning: this was previously accepted by the compiler but is being phased out; it will become a hard error in a future release!
108 = note: for more information, see issue #71800 <https://github.com/rust-lang/rust/issues/71800>
110 error: any use of this value will cause an error
111 --> $SRC_DIR/core/src/ptr/const_ptr.rs:LL:COL
113 LL | unsafe { intrinsics::offset(self, count) }
114 | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
116 | overflowing in-bounds pointer arithmetic
117 | inside `ptr::const_ptr::<impl *const u8>::offset` at $SRC_DIR/core/src/ptr/const_ptr.rs:LL:COL
118 | inside `UNDERFLOW_ADDRESS_SPACE` at $DIR/offset_ub.rs:13:57
120 ::: $DIR/offset_ub.rs:13:1
122 LL | pub const UNDERFLOW_ADDRESS_SPACE: *const u8 = unsafe { (1 as *const u8).offset(-2) };
123 | --------------------------------------------------------------------------------------
125 = warning: this was previously accepted by the compiler but is being phased out; it will become a hard error in a future release!
126 = note: for more information, see issue #71800 <https://github.com/rust-lang/rust/issues/71800>
128 error: any use of this value will cause an error
129 --> $SRC_DIR/core/src/ptr/const_ptr.rs:LL:COL
131 LL | unsafe { intrinsics::offset(self, count) }
132 | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
134 | inbounds test failed: pointer must be in-bounds at offset 1, but is outside bounds of allocN which has size 0
135 | inside `ptr::const_ptr::<impl *const u8>::offset` at $SRC_DIR/core/src/ptr/const_ptr.rs:LL:COL
136 | inside `ZERO_SIZED_ALLOC` at $DIR/offset_ub.rs:15:50
138 ::: $DIR/offset_ub.rs:15:1
140 LL | pub const ZERO_SIZED_ALLOC: *const u8 = unsafe { [0u8; 0].as_ptr().offset(1) };
141 | -------------------------------------------------------------------------------
143 = warning: this was previously accepted by the compiler but is being phased out; it will become a hard error in a future release!
144 = note: for more information, see issue #71800 <https://github.com/rust-lang/rust/issues/71800>
146 error: any use of this value will cause an error
147 --> $SRC_DIR/core/src/ptr/mut_ptr.rs:LL:COL
149 LL | unsafe { intrinsics::offset(self, count) as *mut T }
150 | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
152 | unable to turn bytes into a pointer
153 | inside `ptr::mut_ptr::<impl *mut u8>::offset` at $SRC_DIR/core/src/ptr/mut_ptr.rs:LL:COL
154 | inside `DANGLING` at $DIR/offset_ub.rs:16:42
156 ::: $DIR/offset_ub.rs:16:1
158 LL | pub const DANGLING: *const u8 = unsafe { ptr::NonNull::<u8>::dangling().as_ptr().offset(4) };
159 | ---------------------------------------------------------------------------------------------
161 = warning: this was previously accepted by the compiler but is being phased out; it will become a hard error in a future release!
162 = note: for more information, see issue #71800 <https://github.com/rust-lang/rust/issues/71800>
164 error: any use of this value will cause an error
165 --> $SRC_DIR/core/src/ptr/const_ptr.rs:LL:COL
167 LL | unsafe { intrinsics::offset(self, count) }
168 | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
170 | inbounds test failed: 0x0 is not a valid pointer
171 | inside `ptr::const_ptr::<impl *const u8>::offset` at $SRC_DIR/core/src/ptr/const_ptr.rs:LL:COL
172 | inside `NULL_OFFSET_ZERO` at $DIR/offset_ub.rs:19:50
174 ::: $DIR/offset_ub.rs:19:1
176 LL | pub const NULL_OFFSET_ZERO: *const u8 = unsafe { ptr::null::<u8>().offset(0) };
177 | -------------------------------------------------------------------------------
179 = warning: this was previously accepted by the compiler but is being phased out; it will become a hard error in a future release!
180 = note: for more information, see issue #71800 <https://github.com/rust-lang/rust/issues/71800>
182 error: any use of this value will cause an error
183 --> $SRC_DIR/core/src/ptr/const_ptr.rs:LL:COL
185 LL | unsafe { intrinsics::offset(self, count) }
186 | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
188 | unable to turn bytes into a pointer
189 | inside `ptr::const_ptr::<impl *const u8>::offset` at $SRC_DIR/core/src/ptr/const_ptr.rs:LL:COL
190 | inside `UNDERFLOW_ABS` at $DIR/offset_ub.rs:22:47
192 ::: $DIR/offset_ub.rs:22:1
194 LL | pub const UNDERFLOW_ABS: *const u8 = unsafe { (usize::MAX as *const u8).offset(isize::MIN) };
195 | ---------------------------------------------------------------------------------------------
197 = warning: this was previously accepted by the compiler but is being phased out; it will become a hard error in a future release!
198 = note: for more information, see issue #71800 <https://github.com/rust-lang/rust/issues/71800>
200 error: aborting due to 11 previous errors