From 8c77536526f5ab21b457dc9479dcbbe244b91fc0 Mon Sep 17 00:00:00 2001 From: Patrick Walton Date: Sat, 4 Aug 2012 15:11:54 -0700 Subject: [PATCH] rustc: Normalize region-bounded string slices properly This prevents an LLVM assertion that will bite you if you try to put a static string in an Error. --- src/rustc/middle/ty.rs | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/src/rustc/middle/ty.rs b/src/rustc/middle/ty.rs index af05c3cfcbfe..efa44f96bcee 100644 --- a/src/rustc/middle/ty.rs +++ b/src/rustc/middle/ty.rs @@ -3133,6 +3133,10 @@ fn normalize_ty(cx: ctxt, t: t) -> t { // This type has a vstore. Get rid of it mk_evec(cx, normalize_mt(cx, mt), normalize_vstore(vstore)), + ty_estr(vstore) => + // This type has a vstore. Get rid of it + mk_estr(cx, normalize_vstore(vstore)), + ty_rptr(region, mt) => // This type has a region. Get rid of it mk_rptr(cx, re_static, normalize_mt(cx, mt)),