This repository was archived by the owner on May 28, 2025. It is now read-only.
File tree Expand file tree Collapse file tree 1 file changed +5
-5
lines changed
src/tools/miri/src/borrow_tracker/tree_borrows Expand file tree Collapse file tree 1 file changed +5
-5
lines changed Original file line number Diff line number Diff line change @@ -150,7 +150,10 @@ impl LocationState {
150150 // the propagation can be skipped next time.
151151 // It is a performance loss not to call this function when a foreign access occurs.
152152 // It is unsound not to call this function when a child access occurs.
153- fn skip_if_known_noop (
153+ // FIXME: This optimization is wrong, and is currently disabled (by ignoring the
154+ // result returned here). Since we presumably want an optimization like this,
155+ // we should add it back. See #3864 for more information.
156+ fn update_last_foreign_access (
154157 & mut self ,
155158 access_kind : AccessKind ,
156159 rel_pos : AccessRelatedness ,
@@ -613,10 +616,7 @@ impl<'tcx> Tree {
613616
614617 let old_state = perm. or_insert ( LocationState :: new_uninit ( node. default_initial_perm ) ) ;
615618
616- match old_state. skip_if_known_noop ( access_kind, rel_pos) {
617- ContinueTraversal :: SkipChildren => return Ok ( ContinueTraversal :: SkipChildren ) ,
618- _ => { }
619- }
619+ old_state. update_last_foreign_access ( access_kind, rel_pos) ;
620620
621621 let protected = global. borrow ( ) . protected_tags . contains_key ( & node. tag ) ;
622622 let transition = old_state. perform_access ( access_kind, rel_pos, protected) ?;
You can’t perform that action at this time.
0 commit comments