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 {
150
150
// the propagation can be skipped next time.
151
151
// It is a performance loss not to call this function when a foreign access occurs.
152
152
// 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 (
154
157
& mut self ,
155
158
access_kind : AccessKind ,
156
159
rel_pos : AccessRelatedness ,
@@ -613,10 +616,7 @@ impl<'tcx> Tree {
613
616
614
617
let old_state = perm. or_insert ( LocationState :: new_uninit ( node. default_initial_perm ) ) ;
615
618
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) ;
620
620
621
621
let protected = global. borrow ( ) . protected_tags . contains_key ( & node. tag ) ;
622
622
let transition = old_state. perform_access ( access_kind, rel_pos, protected) ?;
You can’t perform that action at this time.
0 commit comments