Skip to content

Commit 5fee21f

Browse files
committed
Auto merge of rust-lang#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 ```
2 parents aa3ac27 + 657dcf2 commit 5fee21f

File tree

1 file changed

+1
-0
lines changed

1 file changed

+1
-0
lines changed

src/parse/session.rs

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -134,6 +134,7 @@ fn default_handler(
134134
false,
135135
None,
136136
false,
137+
false,
137138
))
138139
};
139140
Handler::with_emitter(

0 commit comments

Comments
 (0)