about summary refs log tree commit diff
diff options
context:
space:
mode:
authorOliver Schneider <github35764891676564198441@oli-obk.de>2018-09-10 14:39:22 +0200
committerOliver Schneider <github35764891676564198441@oli-obk.de>2018-09-11 11:25:51 +0200
commit88ebb95f46c077baf165c9d2b174f90e5d369854 (patch)
tree1817752d047a00bc6236fbed3fc61b5c55d67c8d
parent833dc7e6826483b19c819fc19727efe4e8ddbf12 (diff)
downloadrust-88ebb95f46c077baf165c9d2b174f90e5d369854.tar.gz
rust-88ebb95f46c077baf165c9d2b174f90e5d369854.zip
only allow restricting scalar layouts
-rw-r--r--src/librustc/ty/layout.rs3
1 files changed, 2 insertions, 1 deletions
diff --git a/src/librustc/ty/layout.rs b/src/librustc/ty/layout.rs
index 71cdec0f83e..d03b038d6ed 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,