File tree 1 file changed +5
-2
lines changed
src/tools/miri/src/borrow_tracker/tree_borrows
1 file changed +5
-2
lines changed Original file line number Diff line number Diff line change @@ -28,8 +28,11 @@ impl fmt::Display for AccessCause {
28
28
Self :: Explicit ( kind) => write ! ( f, "{kind}" ) ,
29
29
Self :: Reborrow => write ! ( f, "reborrow" ) ,
30
30
Self :: Dealloc => write ! ( f, "deallocation" ) ,
31
- Self :: FnExit ( AccessKind :: Read ) => write ! ( f, "protector release read" ) ,
32
- Self :: FnExit ( AccessKind :: Write ) => write ! ( f, "protector release write" ) ,
31
+ // This is dead code, since the protector release access itself can never
32
+ // cause UB (while the protector is active, if some other access invalidates
33
+ // further use of the protected tag, that is immediate UB).
34
+ // Describing the cause of UB is the only time this function is called.
35
+ Self :: FnExit ( _) => unreachable ! ( "protector accesses can never be the source of UB" ) ,
33
36
}
34
37
}
35
38
}
You can’t perform that action at this time.
0 commit comments