]> git.lizzy.rs Git - rust.git/blobdiff - src/librustc/middle/trans/consts.rs
auto merge of #14880 : SimonSapin/rust/byte-literals, r=alexcrichton
[rust.git] / src / librustc / middle / trans / consts.rs
index f5e66a527e7fbcf4c89d6388a640e3fde98f70e4..338821537e8c6d098a095a6f63120dd6ccdf6c8d 100644 (file)
@@ -144,7 +144,9 @@ fn const_deref(cx: &CrateContext, v: ValueRef, t: ty::t, explicit: bool)
             let dv = match ty::get(t).sty {
                 ty::ty_ptr(mt) | ty::ty_rptr(_, mt) => {
                     match ty::get(mt.ty).sty {
-                        ty::ty_vec(_, None) | ty::ty_str => cx.sess().bug("unexpected slice"),
+                        ty::ty_vec(_, None) | ty::ty_str | ty::ty_trait(..) => {
+                            cx.sess().bug("unexpected unsized type")
+                        }
                         _ => const_deref_ptr(cx, v),
                     }
                 }