diff options
Diffstat (limited to 'compiler')
| -rw-r--r-- | compiler/rustc_hir_typeck/src/cast.rs | 5 |
1 files changed, 4 insertions, 1 deletions
diff --git a/compiler/rustc_hir_typeck/src/cast.rs b/compiler/rustc_hir_typeck/src/cast.rs index 316a2bf08cb..9e9a1f678ed 100644 --- a/compiler/rustc_hir_typeck/src/cast.rs +++ b/compiler/rustc_hir_typeck/src/cast.rs @@ -141,7 +141,10 @@ impl<'a, 'tcx> FnCtxt<'a, 'tcx> { | ty::Never | ty::Dynamic(_, _, ty::DynStar) | ty::Error(_) => { - self.dcx().span_bug(span, format!("`{t:?}` should be sized but is not?")); + let guar = self + .dcx() + .span_delayed_bug(span, format!("`{t:?}` should be sized but is not?")); + return Err(guar); } }) } |
