diff options
| author | bors <bors@rust-lang.org> | 2022-11-01 21:09:45 +0000 |
|---|---|---|
| committer | bors <bors@rust-lang.org> | 2022-11-01 21:09:45 +0000 |
| commit | 9f2852f9a24d7a55e77067409bd259b734d6daac (patch) | |
| tree | 201d5398d721b8f63fc5a7c9ad83463f73259fc7 /tests/mir-opt/lower_array_len.array_len.NormalizeArrayLen.diff | |
| parent | 16566e97fd0a868e3bce628e6913648254b75fa8 (diff) | |
| parent | 4b1cebbc1868253bdeed54c3b1b1c5bc5ef8807c (diff) | |
| download | rust-9f2852f9a24d7a55e77067409bd259b734d6daac.tar.gz rust-9f2852f9a24d7a55e77067409bd259b734d6daac.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.diff')
0 files changed, 0 insertions, 0 deletions
