From 9909cb902f76bbd99e74d9ff91718d9f5a2eba80 Mon Sep 17 00:00:00 2001 From: Oli Scherer Date: Thu, 3 Nov 2022 08:17:55 +0000 Subject: Make the ICEs in the mir typechecker have more spans helpful --- compiler/rustc_const_eval/src/transform/validate.rs | 1 + 1 file changed, 1 insertion(+) (limited to 'compiler/rustc_const_eval/src') 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) { let span = self.body.source_info(location).span; // We use `delay_span_bug` as we might see broken MIR when other errors have already -- cgit 1.4.1-3-g733a5