Skip to content

Commit

Permalink
only allow restricting scalar layouts
Browse files Browse the repository at this point in the history
  • Loading branch information
oli-obk committed Sep 11, 2018
1 parent 833dc7e commit 88ebb95
Showing 1 changed file with 2 additions and 1 deletion.
3 changes: 2 additions & 1 deletion src/librustc/ty/layout.rs
Expand Up @@ -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,
Expand Down

0 comments on commit 88ebb95

Please sign in to comment.