From fec6ffc8164692c9acc64078126275a2c2b99bcb Mon Sep 17 00:00:00 2001 From: hi-rustin Date: Mon, 21 Nov 2022 20:03:28 +0800 Subject: [PATCH] Add delay span bug Signed-off-by: hi-rustin --- compiler/rustc_hir_typeck/src/intrinsicck.rs | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/compiler/rustc_hir_typeck/src/intrinsicck.rs b/compiler/rustc_hir_typeck/src/intrinsicck.rs index c9878e381a94..c2dc14024655 100644 --- a/compiler/rustc_hir_typeck/src/intrinsicck.rs +++ b/compiler/rustc_hir_typeck/src/intrinsicck.rs @@ -47,7 +47,7 @@ impl<'a, 'tcx> FnCtxt<'a, 'tcx> { let to = normalize(to); trace!(?from, ?to); if from.has_non_region_infer() || to.has_non_region_infer() { - // We can't check anything if there are inference variables. + tcx.sess.delay_span_bug(span, "argument to transmute has inference variables"); return; } // Transmutes that are only changing lifetimes are always ok.