Skip to content

Commit 88ebb95

Browse files
committed
only allow restricting scalar layouts
1 parent 833dc7e commit 88ebb95

File tree

1 file changed

+2
-1
lines changed

1 file changed

+2
-1
lines changed

src/librustc/ty/layout.rs

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -779,7 +779,8 @@ impl<'a, 'tcx> LayoutCx<'tcx, TyCtxt<'a, 'tcx, 'tcx>> {
779779
scalar.valid_range = *scalar.valid_range.start()..=end;
780780
}
781781
}
782-
_ => bug!(
782+
_ => assert!(
783+
start == Bound::Unbounded && end == Bound::Unbounded,
783784
"nonscalar layout for layout_scalar_valid_range type {:?}: {:#?}",
784785
def,
785786
st,

0 commit comments

Comments
 (0)