We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
1 parent c519474 commit 4a85b08Copy full SHA for 4a85b08
src/librustc/middle/trans/consts.rs
@@ -211,11 +211,16 @@ pub fn const_expr(cx: @mut CrateContext, e: @ast::expr) -> ValueRef {
211
}
212
ty::AutoBorrowVec(ty::re_static, m) => {
213
assert!(m != ast::m_mutbl);
214
- let size = machine::llsize_of(cx,
215
- val_ty(llconst));
216
assert_eq!(abi::slice_elt_base, 0);
217
assert_eq!(abi::slice_elt_len, 1);
218
- llconst = C_struct([llptr, size]);
+
+ match ty::get(ty).sty {
+ ty::ty_evec(_, ty::vstore_fixed(*)) => {
219
+ let size = machine::llsize_of(cx, val_ty(llconst));
220
+ llconst = C_struct([llptr, size]);
221
+ }
222
+ _ => {}
223
224
225
_ => {
226
cx.sess.span_bug(e.span,
0 commit comments