about summary refs log tree commit diff
diff options
context:
space:
mode:
authorOli Scherer <git-spam-no-reply9815368754983@oli-obk.de>2022-11-03 08:17:55 +0000
committerOli Scherer <git-spam-no-reply9815368754983@oli-obk.de>2022-11-25 08:01:12 +0000
commit9909cb902f76bbd99e74d9ff91718d9f5a2eba80 (patch)
tree80803981808b51d1f72f9bcd3d3068ba9282a965
parent6773e7ee562eb6a3c50bc9f284f767c09b87dfbb (diff)
downloadrust-9909cb902f76bbd99e74d9ff91718d9f5a2eba80.tar.gz
rust-9909cb902f76bbd99e74d9ff91718d9f5a2eba80.zip
Make the ICEs in the mir typechecker have more spans helpful
-rw-r--r--compiler/rustc_const_eval/src/transform/validate.rs1
1 files changed, 1 insertions, 0 deletions
diff --git a/compiler/rustc_const_eval/src/transform/validate.rs b/compiler/rustc_const_eval/src/transform/validate.rs
index a4bd81fb73f..bf700d31224 100644
--- a/compiler/rustc_const_eval/src/transform/validate.rs
+++ b/compiler/rustc_const_eval/src/transform/validate.rs
@@ -81,6 +81,7 @@ struct TypeChecker<'a, 'tcx> {
 }
 
 impl<'a, 'tcx> TypeChecker<'a, 'tcx> {
+    #[track_caller]
     fn fail(&self, location: Location, msg: impl AsRef<str>) {
         let span = self.body.source_info(location).span;
         // We use `delay_span_bug` as we might see broken MIR when other errors have already