about summary refs log tree commit diff
path: root/compiler/rustc_llvm/llvm-wrapper/RustWrapper.cpp
diff options
context:
space:
mode:
authorbors <bors@rust-lang.org>2023-06-30 02:51:15 +0000
committerbors <bors@rust-lang.org>2023-06-30 02:51:15 +0000
commit73f14176e3876164c518c6dafd9e18dbac1df0f4 (patch)
tree57b1ab56396cf247961f8b99e81a8a9553eb58db /compiler/rustc_llvm/llvm-wrapper/RustWrapper.cpp
parent3d4c536e87f143a1ca5e7877578b33113b174c17 (diff)
parentfc832f0eb74bb4c4023e359cc90dab941dc2654d (diff)
downloadrust-73f14176e3876164c518c6dafd9e18dbac1df0f4.tar.gz
rust-73f14176e3876164c518c6dafd9e18dbac1df0f4.zip
Auto merge of #10774 - c410-f3r:lock-1, r=Jarcho
[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
```
Diffstat (limited to 'compiler/rustc_llvm/llvm-wrapper/RustWrapper.cpp')
0 files changed, 0 insertions, 0 deletions