diff options
| author | Matthias Krüger <matthias.krueger@famsik.de> | 2022-08-01 16:49:27 +0200 |
|---|---|---|
| committer | GitHub <noreply@github.com> | 2022-08-01 16:49:27 +0200 |
| commit | 58042bffaccb8df5e65c9f86f3b5eec8da193773 (patch) | |
| tree | 07db07cf2f9c11786c5d73de632ef956ad201c45 /compiler/rustc_llvm/llvm-wrapper/RustWrapper.cpp | |
| parent | 1f5d8d49eb6111931091f700d07518cd2b80bc18 (diff) | |
| parent | d9f28b7b701321d24ff9930b3f7b5d93b6fd671f (diff) | |
| download | rust-58042bffaccb8df5e65c9f86f3b5eec8da193773.tar.gz rust-58042bffaccb8df5e65c9f86f3b5eec8da193773.zip | |
Rollup merge of #99340 - GoldsteinE:fix-localdefid-debug-ice, r=lcnr
Fix ICE in Definitions::create_def
`Debug` implementation for `LocalDefId` uses global `Definitions`. Normally it’s ok, but we can’t do it while holding a mutable reference to `Definitions`, since it causes ICE or deadlock (depending on whether `parallel_compiler` is enabled).
This PR effectively copies the `Debug` implementation into the problematic method. I don’t particularly love this solution (since it creates code duplication), but I don’t see any other options.
This issue was discovered when running `rustdoc` with `RUSTDOC_LOG=trace` on the following file:
```rust
pub struct SomeStruct;
fn asdf() {
impl SomeStruct {
pub fn qwop(&self) {
println!("hidden function");
}
}
}
```
I’m not sure how to create a test for this behavior.
Diffstat (limited to 'compiler/rustc_llvm/llvm-wrapper/RustWrapper.cpp')
0 files changed, 0 insertions, 0 deletions
