diff --git a/src/librustc/ty/layout.rs b/src/librustc/ty/layout.rs index 71cdec0f83eca..d03b038d6edd7 100644 --- a/src/librustc/ty/layout.rs +++ b/src/librustc/ty/layout.rs @@ -779,7 +779,8 @@ impl<'a, 'tcx> LayoutCx<'tcx, TyCtxt<'a, 'tcx, 'tcx>> { scalar.valid_range = *scalar.valid_range.start()..=end; } } - _ => bug!( + _ => assert!( + start == Bound::Unbounded && end == Bound::Unbounded, "nonscalar layout for layout_scalar_valid_range type {:?}: {:#?}", def, st,