@@ -405,12 +405,12 @@ impl<'tcx> Stacks {
405405
406406
407407pub trait EvalContextExt < ' tcx > {
408- fn tag_dereference (
408+ fn ptr_dereference (
409409 & self ,
410410 place : MPlaceTy < ' tcx , Borrow > ,
411411 size : Size ,
412412 mutability : Option < Mutability > ,
413- ) -> EvalResult < ' tcx , Borrow > ;
413+ ) -> EvalResult < ' tcx > ;
414414
415415 fn tag_new_allocation (
416416 & mut self ,
@@ -480,13 +480,13 @@ impl<'a, 'mir, 'tcx> EvalContextExt<'tcx> for MiriEvalContext<'a, 'mir, 'tcx> {
480480 ///
481481 /// Note that this does NOT mean that all this memory will actually get accessed/referenced!
482482 /// We could be in the middle of `&(*var).1`.
483- fn tag_dereference (
483+ fn ptr_dereference (
484484 & self ,
485485 place : MPlaceTy < ' tcx , Borrow > ,
486486 size : Size ,
487487 mutability : Option < Mutability > ,
488- ) -> EvalResult < ' tcx , Borrow > {
489- trace ! ( "tag_dereference : Accessing {} reference for {:?} (pointee {})" ,
488+ ) -> EvalResult < ' tcx > {
489+ trace ! ( "ptr_dereference : Accessing {} reference for {:?} (pointee {})" ,
490490 if let Some ( mutability) = mutability { format!( "{:?}" , mutability) } else { format!( "raw" ) } ,
491491 place. ptr, place. layout. ty) ;
492492 let ptr = place. ptr . to_ptr ( ) ?;
@@ -497,12 +497,8 @@ impl<'a, 'mir, 'tcx> EvalContextExt<'tcx> for MiriEvalContext<'a, 'mir, 'tcx> {
497497 // That can transmute a raw ptr to a (shared/mut) ref, and a mut ref to a shared one.
498498 match ( mutability, ptr. tag ) {
499499 ( None , _) => {
500- // Don't use the tag, this is a raw access! They should happen tagless.
501- // This is needed for `*mut` to make any sense: Writes *do* enforce the
502- // `Uniq` tag to be up top, but we must make sure raw writes do not do that.
503- // This does mean, however, that `&*foo` is *not* a NOP *if* `foo` is a raw ptr.
504- // Also don't do any further validation, this is raw after all.
505- return Ok ( Borrow :: default ( ) ) ;
500+ // No further validation on raw accesses.
501+ return Ok ( ( ) ) ;
506502 }
507503 ( Some ( MutMutable ) , Borrow :: Uniq ( _) ) |
508504 ( Some ( MutImmutable ) , Borrow :: Shr ( _) ) => {
@@ -543,8 +539,8 @@ impl<'a, 'mir, 'tcx> EvalContextExt<'tcx> for MiriEvalContext<'a, 'mir, 'tcx> {
543539 alloc. extra . deref ( ptr, size, kind) ?;
544540 }
545541
546- // All is good, and do not change the tag
547- Ok ( ptr . tag )
542+ // All is good
543+ Ok ( ( ) )
548544 }
549545
550546 /// The given place may henceforth be accessed through raw pointers.
0 commit comments