about summary refs log tree commit diff
path: root/tests/mir-opt/lower_array_len.array_len.NormalizeArrayLen.panic-abort.diff
diff options
context:
space:
mode:
authorbors <bors@rust-lang.org>2022-11-01 21:09:45 +0000
committerbors <bors@rust-lang.org>2022-11-01 21:09:45 +0000
commit5fee21fdd6836ef00e5c5963fe2abafd4ee4f295 (patch)
tree8af7a786dd334d40fb6e51683789fed2c064e48b /tests/mir-opt/lower_array_len.array_len.NormalizeArrayLen.panic-abort.diff
parentaa3ac2715555be874e92601b606bee69330ad153 (diff)
parent657dcf21d8e13265513451f354511a53ea2c3b04 (diff)
downloadrust-5fee21fdd6836ef00e5c5963fe2abafd4ee4f295.tar.gz
rust-5fee21fdd6836ef00e5c5963fe2abafd4ee4f295.zip
Auto merge of #103217 - mejrs:track, r=eholk
Track where diagnostics were created.

This implements the `-Ztrack-diagnostics` flag, which uses `#[track_caller]` to track where diagnostics are created. It is meant as a debugging tool much like `-Ztreat-err-as-bug`.

For example, the following code...

```rust
struct A;
struct B;

fn main(){
    let _: A = B;
}
```
...now emits the following error message:

```
error[E0308]: mismatched types
 --> src\main.rs:5:16
  |
5 |     let _: A = B;
  |            -   ^ expected struct `A`, found struct `B`
  |            |
  |            expected due to this
-Ztrack-diagnostics: created at compiler\rustc_infer\src\infer\error_reporting\mod.rs:2275:31
```
Diffstat (limited to 'tests/mir-opt/lower_array_len.array_len.NormalizeArrayLen.panic-abort.diff')
0 files changed, 0 insertions, 0 deletions