Skip to content

Commit

Permalink
Auto merge of #10774 - c410-f3r:lock-1, r=Jarcho
Browse files Browse the repository at this point in the history
[significant_drop_tightening] Fix #10413

Fix #10413

This is quite a rewrite that unfortunately took a  large amount of time. I tried my best to comment what is going on to easy review but feel free to ask any question.

The problem basically is that the current algorithm is only taking into consideration single blocks which means that things like the following don't work or show unpredictable results.

```rust
let mutex = Mutex::new(1);
{
  let lock = mutex.lock().unwrap();
  {
    let _ = *lock;
  }
}
```

The solve the issue, each path that refers a lock is now being tracked individually.

```
changelog: [`significant_drop_tightening`]: Lift the restriction of only considerate single blocks
```
  • Loading branch information
bors committed Jun 28, 2023
2 parents 1df9110 + 755aa8d commit ed9a2f0
Show file tree
Hide file tree
Showing 4 changed files with 334 additions and 281 deletions.
Loading

0 comments on commit ed9a2f0

Please sign in to comment.