@@ -59,7 +59,7 @@ impl<'tcx, Tag, Extra> Allocation<Tag, Extra> {
59
59
/// If you want to check bounds before doing a memory access, better use `check_bounds`.
60
60
pub fn check_bounds_ptr (
61
61
& self ,
62
- ptr : Pointer < M :: PointerTag > ,
62
+ ptr : Pointer < Tag > ,
63
63
check : InboundsCheck ,
64
64
) -> EvalResult < ' tcx > {
65
65
let allocation_size = match check {
@@ -85,7 +85,7 @@ impl<'tcx, Tag, Extra> Allocation<Tag, Extra> {
85
85
#[ inline( always) ]
86
86
pub fn check_bounds (
87
87
& self ,
88
- ptr : Pointer < M :: PointerTag > ,
88
+ ptr : Pointer < Tag > ,
89
89
size : Size ,
90
90
check : InboundsCheck ,
91
91
) -> EvalResult < ' tcx > {
@@ -183,9 +183,9 @@ impl<'tcx, Tag, Extra> Allocation<Tag, Extra> {
183
183
/// Return all relocations overlapping with the given ptr-offset pair.
184
184
fn relocations (
185
185
& self ,
186
- ptr : Pointer < M :: PointerTag > ,
186
+ ptr : Pointer < Tag > ,
187
187
size : Size ,
188
- ) -> EvalResult < ' tcx , & [ ( Size , ( M :: PointerTag , AllocId ) ) ] > {
188
+ ) -> EvalResult < ' tcx , & [ ( Size , ( Tag , AllocId ) ) ] > {
189
189
// We have to go back `pointer_size - 1` bytes, as that one would still overlap with
190
190
// the beginning of this range.
191
191
let start = ptr. offset . bytes ( ) . saturating_sub ( self . pointer_size ( ) . bytes ( ) - 1 ) ;
@@ -195,7 +195,7 @@ impl<'tcx, Tag, Extra> Allocation<Tag, Extra> {
195
195
196
196
/// Check that there ar eno relocations overlapping with the given range.
197
197
#[ inline( always) ]
198
- fn check_relocations ( & self , ptr : Pointer < M :: PointerTag > , size : Size ) -> EvalResult < ' tcx > {
198
+ fn check_relocations ( & self , ptr : Pointer < Tag > , size : Size ) -> EvalResult < ' tcx > {
199
199
if self . relocations ( ptr, size) ?. len ( ) != 0 {
200
200
err ! ( ReadPointerAsBytes )
201
201
} else {
@@ -209,7 +209,7 @@ impl<'tcx, Tag, Extra> Allocation<Tag, Extra> {
209
209
/// uninitialized. This is a somewhat odd "spooky action at a distance",
210
210
/// but it allows strictly more code to run than if we would just error
211
211
/// immediately in that case.
212
- fn clear_relocations ( & mut self , ptr : Pointer < M :: PointerTag > , size : Size ) -> EvalResult < ' tcx > {
212
+ fn clear_relocations ( & mut self , ptr : Pointer < Tag > , size : Size ) -> EvalResult < ' tcx > {
213
213
// Find the start and end of the given range and its outermost relocations.
214
214
let ( first, last) = {
215
215
// Find all relocations overlapping the given range.
@@ -244,7 +244,7 @@ impl<'tcx, Tag, Extra> Allocation<Tag, Extra> {
244
244
/// Error if there are relocations overlapping with the edges of the
245
245
/// given memory range.
246
246
#[ inline]
247
- fn check_relocation_edges ( & self , ptr : Pointer < M :: PointerTag > , size : Size ) -> EvalResult < ' tcx > {
247
+ fn check_relocation_edges ( & self , ptr : Pointer < Tag > , size : Size ) -> EvalResult < ' tcx > {
248
248
self . check_relocations ( ptr, Size :: ZERO ) ?;
249
249
self . check_relocations ( ptr. offset ( size, self ) ?, Size :: ZERO ) ?;
250
250
Ok ( ( ) )
@@ -257,7 +257,7 @@ impl<'tcx, Tag, Extra> Allocation<Tag, Extra> {
257
257
/// Checks that a range of bytes is defined. If not, returns the `ReadUndefBytes`
258
258
/// error which will report the first byte which is undefined.
259
259
#[ inline]
260
- fn check_defined ( & self , ptr : Pointer < M :: PointerTag > , size : Size ) -> EvalResult < ' tcx > {
260
+ fn check_defined ( & self , ptr : Pointer < Tag > , size : Size ) -> EvalResult < ' tcx > {
261
261
let alloc = self . get ( ptr. alloc_id ) ?;
262
262
alloc. undef_mask . is_range_defined (
263
263
ptr. offset ,
@@ -267,7 +267,7 @@ impl<'tcx, Tag, Extra> Allocation<Tag, Extra> {
267
267
268
268
pub fn mark_definedness (
269
269
& mut self ,
270
- ptr : Pointer < M :: PointerTag > ,
270
+ ptr : Pointer < Tag > ,
271
271
size : Size ,
272
272
new_state : bool ,
273
273
) -> EvalResult < ' tcx > {
0 commit comments