about summary refs log tree commit diff
path: root/compiler/rustc_codegen_llvm/src/context.rs
diff options
context:
space:
mode:
authorbors <bors@rust-lang.org>2022-12-24 08:13:31 +0000
committerbors <bors@rust-lang.org>2022-12-24 08:13:31 +0000
commit245357f61939d2b6d15f8c6b15f7026396f95871 (patch)
tree6747e7279af4e764d4e06b215bb04f51395925f8 /compiler/rustc_codegen_llvm/src/context.rs
parent5b64c91c262a6a148a35d24180b23ffafbbab1dc (diff)
parent81fe37a90099b80ea059e11d2c97759bdff1fa37 (diff)
downloadrust-245357f61939d2b6d15f8c6b15f7026396f95871.tar.gz
rust-245357f61939d2b6d15f8c6b15f7026396f95871.zip
Auto merge of #2646 - saethlin:data-race-spans, r=RalfJung
Data race spans

Fixes https://github.com/rust-lang/miri/issues/2205

This adds output to data race errors very similar to the spans we emit for Stacked Borrows errors. For example, from our test suite:
```
help: The Atomic Load on thread `<unnamed>` is here
  --> tests/fail/data_race/atomic_read_na_write_race1.rs:23:13
   |
23 | ...   (&*c.0).load(Ordering::SeqCst) //~ ERROR: Data race detected between Atomic Load on thread `<unnamed>` and Write o...
   |       ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
help: The Write on thread `<unnamed>` is here
  --> tests/fail/data_race/atomic_read_na_write_race1.rs:19:13
   |
19 |             *(c.0 as *mut usize) = 32;
   |             ^^^^^^^^^^^^^^^^^^^^^^^^^```
```

Because of https://github.com/rust-lang/miri/pull/2647 this comes without a perf regression, according to our benchmarks.
Diffstat (limited to 'compiler/rustc_codegen_llvm/src/context.rs')
0 files changed, 0 insertions, 0 deletions