Skip to content

Commit 9b08cd4

Browse files
committed
librustc: Make &const [T] mean the same thing as &[const T]
1 parent 8fceee6 commit 9b08cd4

File tree

1 file changed

+2
-1
lines changed

1 file changed

+2
-1
lines changed

src/librustc/middle/typeck/astconv.rs

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -216,7 +216,8 @@ pub fn ast_ty_to_ty<AC:AstConv,RS:region_scope + Copy + Durable>(
216216
match a_seq_ty.ty.node {
217217
ast::ty_vec(mt) => {
218218
let mut mt = ast_mt_to_mt(self, rscope, mt);
219-
if a_seq_ty.mutbl == ast::m_mutbl {
219+
if a_seq_ty.mutbl == ast::m_mutbl ||
220+
a_seq_ty.mutbl == ast::m_const {
220221
mt = ty::mt { ty: mt.ty, mutbl: ast::m_mutbl };
221222
}
222223
return ty::mk_evec(tcx, mt, vst);

0 commit comments

Comments
 (0)