@@ -56,7 +56,7 @@ impl<'tcx> Tree {
5656 "{} with tag {:?}: {:?}, size {}" ,
5757 access_kind,
5858 prov,
59- Pointer :: new( alloc_id, range. start) ,
59+ interpret :: Pointer :: new( alloc_id, range. start) ,
6060 range. size. bytes( ) ,
6161 ) ;
6262 // TODO: for now we bail out on wildcard pointers. Eventually we should
@@ -195,7 +195,7 @@ trait EvalContextPrivExt<'tcx>: crate::MiriInterpCxExt<'tcx> {
195195 /// Returns the provenance that should be used henceforth.
196196 fn tb_reborrow (
197197 & mut self ,
198- place : & MPlaceTy < ' tcx , Provenance > , // parent tag extracted from here
198+ place : & MPlaceTy < ' tcx > , // parent tag extracted from here
199199 ptr_size : Size ,
200200 new_perm : NewPermission ,
201201 new_tag : BorTag ,
@@ -258,7 +258,7 @@ trait EvalContextPrivExt<'tcx>: crate::MiriInterpCxExt<'tcx> {
258258 new_tag,
259259 orig_tag,
260260 place. layout. ty,
261- Pointer :: new( alloc_id, base_offset) ,
261+ interpret :: Pointer :: new( alloc_id, base_offset) ,
262262 ptr_size. bytes( )
263263 ) ;
264264
@@ -327,9 +327,9 @@ trait EvalContextPrivExt<'tcx>: crate::MiriInterpCxExt<'tcx> {
327327
328328 fn tb_retag_place (
329329 & mut self ,
330- place : & MPlaceTy < ' tcx , Provenance > ,
330+ place : & MPlaceTy < ' tcx > ,
331331 new_perm : NewPermission ,
332- ) -> InterpResult < ' tcx , MPlaceTy < ' tcx , Provenance > > {
332+ ) -> InterpResult < ' tcx , MPlaceTy < ' tcx > > {
333333 let this = self . eval_context_mut ( ) ;
334334
335335 // Determine the size of the reborrow.
@@ -366,9 +366,9 @@ trait EvalContextPrivExt<'tcx>: crate::MiriInterpCxExt<'tcx> {
366366 /// Retags an individual pointer, returning the retagged version.
367367 fn tb_retag_reference (
368368 & mut self ,
369- val : & ImmTy < ' tcx , Provenance > ,
369+ val : & ImmTy < ' tcx > ,
370370 new_perm : NewPermission ,
371- ) -> InterpResult < ' tcx , ImmTy < ' tcx , Provenance > > {
371+ ) -> InterpResult < ' tcx , ImmTy < ' tcx > > {
372372 let this = self . eval_context_mut ( ) ;
373373 let place = this. ref_to_mplace ( val) ?;
374374 let new_place = this. tb_retag_place ( & place, new_perm) ?;
@@ -383,8 +383,8 @@ pub trait EvalContextExt<'tcx>: crate::MiriInterpCxExt<'tcx> {
383383 fn tb_retag_ptr_value (
384384 & mut self ,
385385 kind : RetagKind ,
386- val : & ImmTy < ' tcx , Provenance > ,
387- ) -> InterpResult < ' tcx , ImmTy < ' tcx , Provenance > > {
386+ val : & ImmTy < ' tcx > ,
387+ ) -> InterpResult < ' tcx , ImmTy < ' tcx > > {
388388 let this = self . eval_context_mut ( ) ;
389389 let new_perm = match val. layout . ty . kind ( ) {
390390 & ty:: Ref ( _, pointee, mutability) =>
@@ -402,7 +402,7 @@ pub trait EvalContextExt<'tcx>: crate::MiriInterpCxExt<'tcx> {
402402 fn tb_retag_place_contents (
403403 & mut self ,
404404 kind : RetagKind ,
405- place : & PlaceTy < ' tcx , Provenance > ,
405+ place : & PlaceTy < ' tcx > ,
406406 ) -> InterpResult < ' tcx > {
407407 let this = self . eval_context_mut ( ) ;
408408 let options = this. machine . borrow_tracker . as_mut ( ) . unwrap ( ) . get_mut ( ) ;
@@ -423,7 +423,7 @@ pub trait EvalContextExt<'tcx>: crate::MiriInterpCxExt<'tcx> {
423423 #[ inline( always) ] // yes this helps in our benchmarks
424424 fn retag_ptr_inplace (
425425 & mut self ,
426- place : & PlaceTy < ' tcx , Provenance > ,
426+ place : & PlaceTy < ' tcx > ,
427427 new_perm : Option < NewPermission > ,
428428 ) -> InterpResult < ' tcx > {
429429 if let Some ( new_perm) = new_perm {
@@ -435,7 +435,7 @@ pub trait EvalContextExt<'tcx>: crate::MiriInterpCxExt<'tcx> {
435435 }
436436 }
437437 impl < ' ecx , ' tcx > ValueVisitor < ' tcx , MiriMachine < ' tcx > > for RetagVisitor < ' ecx , ' tcx > {
438- type V = PlaceTy < ' tcx , Provenance > ;
438+ type V = PlaceTy < ' tcx > ;
439439
440440 #[ inline( always) ]
441441 fn ecx ( & self ) -> & MiriInterpCx < ' tcx > {
@@ -445,11 +445,7 @@ pub trait EvalContextExt<'tcx>: crate::MiriInterpCxExt<'tcx> {
445445 /// Regardless of how `Unique` is handled, Boxes are always reborrowed.
446446 /// When `Unique` is also reborrowed, then it behaves exactly like `Box`
447447 /// except for the fact that `Box` has a non-zero-sized reborrow.
448- fn visit_box (
449- & mut self ,
450- box_ty : Ty < ' tcx > ,
451- place : & PlaceTy < ' tcx , Provenance > ,
452- ) -> InterpResult < ' tcx > {
448+ fn visit_box ( & mut self , box_ty : Ty < ' tcx > , place : & PlaceTy < ' tcx > ) -> InterpResult < ' tcx > {
453449 // Only boxes for the global allocator get any special treatment.
454450 if box_ty. is_box_global ( * self . ecx . tcx ) {
455451 let new_perm = NewPermission :: from_unique_ty (
@@ -463,7 +459,7 @@ pub trait EvalContextExt<'tcx>: crate::MiriInterpCxExt<'tcx> {
463459 Ok ( ( ) )
464460 }
465461
466- fn visit_value ( & mut self , place : & PlaceTy < ' tcx , Provenance > ) -> InterpResult < ' tcx > {
462+ fn visit_value ( & mut self , place : & PlaceTy < ' tcx > ) -> InterpResult < ' tcx > {
467463 // If this place is smaller than a pointer, we know that it can't contain any
468464 // pointers we need to retag, so we can stop recursion early.
469465 // This optimization is crucial for ZSTs, because they can contain way more fields
@@ -526,10 +522,7 @@ pub trait EvalContextExt<'tcx>: crate::MiriInterpCxExt<'tcx> {
526522 /// call.
527523 ///
528524 /// This is used to ensure soundness of in-place function argument/return passing.
529- fn tb_protect_place (
530- & mut self ,
531- place : & MPlaceTy < ' tcx , Provenance > ,
532- ) -> InterpResult < ' tcx , MPlaceTy < ' tcx , Provenance > > {
525+ fn tb_protect_place ( & mut self , place : & MPlaceTy < ' tcx > ) -> InterpResult < ' tcx , MPlaceTy < ' tcx > > {
533526 let this = self . eval_context_mut ( ) ;
534527
535528 // Retag it. With protection! That is the entire point.
@@ -581,7 +574,7 @@ pub trait EvalContextExt<'tcx>: crate::MiriInterpCxExt<'tcx> {
581574 /// of `ptr` (with 0 representing `ptr` itself)
582575 fn tb_give_pointer_debug_name (
583576 & mut self ,
584- ptr : Pointer < Option < Provenance > > ,
577+ ptr : Pointer ,
585578 nth_parent : u8 ,
586579 name : & str ,
587580 ) -> InterpResult < ' tcx > {
@@ -604,8 +597,8 @@ pub trait EvalContextExt<'tcx>: crate::MiriInterpCxExt<'tcx> {
604597/// and output can be used by `retag_ptr_inplace`.
605598fn inner_ptr_of_unique < ' tcx > (
606599 ecx : & MiriInterpCx < ' tcx > ,
607- place : & PlaceTy < ' tcx , Provenance > ,
608- ) -> InterpResult < ' tcx , PlaceTy < ' tcx , Provenance > > {
600+ place : & PlaceTy < ' tcx > ,
601+ ) -> InterpResult < ' tcx , PlaceTy < ' tcx > > {
609602 // Follows the same layout as `interpret/visitor.rs:walk_value` for `Box` in
610603 // `rustc_const_eval`, just with one fewer layer.
611604 // Here we have a `Unique(NonNull(*mut), PhantomData)`
0 commit comments