about summary refs log tree commit diff
path: root/src
diff options
context:
space:
mode:
authorHuon Wilson <dbau.pp+github@gmail.com>2014-02-02 00:09:11 +1100
committerHuon Wilson <dbau.pp+github@gmail.com>2014-02-02 02:59:04 +1100
commitec4b456b26cd019b8b2a4a8a3f9fa9841904bf09 (patch)
tree31fea04fef0af0ad23812591ade11c7a389f7847 /src
parente39cd20a4311f6e1377a01462cda5a89a4e67c15 (diff)
downloadrust-ec4b456b26cd019b8b2a4a8a3f9fa9841904bf09.tar.gz
rust-ec4b456b26cd019b8b2a4a8a3f9fa9841904bf09.zip
rustc: Remove the vstore handling of @str and @[].
Diffstat (limited to 'src')
-rw-r--r--src/librustc/metadata/tydecode.rs1
-rw-r--r--src/librustc/metadata/tyencode.rs1
-rw-r--r--src/librustc/middle/lint.rs1
-rw-r--r--src/librustc/middle/mem_categorization.rs1
-rw-r--r--src/librustc/middle/trans/common.rs1
-rw-r--r--src/librustc/middle/trans/debuginfo.rs24
-rw-r--r--src/librustc/middle/trans/glue.rs14
-rw-r--r--src/librustc/middle/trans/reflect.rs1
-rw-r--r--src/librustc/middle/trans/tvec.rs32
-rw-r--r--src/librustc/middle/trans/type_of.rs9
-rw-r--r--src/librustc/middle/ty.rs23
-rw-r--r--src/librustc/middle/ty_fold.rs1
-rw-r--r--src/librustc/middle/typeck/astconv.rs50
-rw-r--r--src/librustc/middle/typeck/check/_match.rs2
-rw-r--r--src/librustc/middle/typeck/check/method.rs2
-rw-r--r--src/librustc/middle/typeck/check/regionck.rs5
-rw-r--r--src/librustc/middle/typeck/infer/coercion.rs3
-rw-r--r--src/librustc/middle/typeck/variance.rs2
-rw-r--r--src/librustc/util/ppaux.rs1
-rw-r--r--src/libsyntax/parse/parser.rs2
20 files changed, 47 insertions, 129 deletions
diff --git a/src/librustc/metadata/tydecode.rs b/src/librustc/metadata/tydecode.rs
index c9860162060..92af631c2bd 100644
--- a/src/librustc/metadata/tydecode.rs
+++ b/src/librustc/metadata/tydecode.rs
@@ -156,7 +156,6 @@ fn parse_vstore(st: &mut PState, conv: conv_did) -> ty::vstore {
 
     match next(st) {
       '~' => ty::vstore_uniq,
-      '@' => ty::vstore_box,
       '&' => ty::vstore_slice(parse_region(st, conv)),
       c => st.tcx.sess.bug(format!("parse_vstore(): bad input '{}'", c))
     }
diff --git a/src/librustc/metadata/tyencode.rs b/src/librustc/metadata/tyencode.rs
index b7977f9d643..d17a4516543 100644
--- a/src/librustc/metadata/tyencode.rs
+++ b/src/librustc/metadata/tyencode.rs
@@ -219,7 +219,6 @@ pub fn enc_vstore(w: &mut MemWriter, cx: @ctxt, v: ty::vstore) {
     match v {
         ty::vstore_fixed(u) => mywrite!(w, "{}|", u),
         ty::vstore_uniq => mywrite!(w, "~"),
-        ty::vstore_box => mywrite!(w, "@"),
         ty::vstore_slice(r) => {
             mywrite!(w, "&");
             enc_region(w, cx, r);
diff --git a/src/librustc/middle/lint.rs b/src/librustc/middle/lint.rs
index 39797353993..e674af6b3b3 100644
--- a/src/librustc/middle/lint.rs
+++ b/src/librustc/middle/lint.rs
@@ -888,7 +888,6 @@ fn check_heap_type(cx: &Context, span: Span, ty: ty::t) {
         ty::fold_ty(cx.tcx, ty, |t| {
             match ty::get(t).sty {
                 ty::ty_box(_) |
-                ty::ty_vec(_, ty::vstore_box) |
                 ty::ty_trait(_, _, ty::BoxTraitStore, _, _) => {
                     n_box += 1;
                 }
diff --git a/src/librustc/middle/mem_categorization.rs b/src/librustc/middle/mem_categorization.rs
index 9bab74dc56a..72fd98e56ed 100644
--- a/src/librustc/middle/mem_categorization.rs
+++ b/src/librustc/middle/mem_categorization.rs
@@ -178,7 +178,6 @@ pub fn opt_deref_kind(t: ty::t) -> Option<deref_kind> {
         }
 
         ty::ty_box(_) |
-        ty::ty_vec(_, ty::vstore_box) |
         ty::ty_trait(_, _, ty::BoxTraitStore, _, _) => {
             Some(deref_ptr(gc_ptr))
         }
diff --git a/src/librustc/middle/trans/common.rs b/src/librustc/middle/trans/common.rs
index 04789b9ca70..78affcc69e1 100644
--- a/src/librustc/middle/trans/common.rs
+++ b/src/librustc/middle/trans/common.rs
@@ -768,7 +768,6 @@ pub fn mono_data_classify(t: ty::t) -> MonoDataClass {
         ty::ty_float(_) => MonoFloat,
         ty::ty_rptr(..) | ty::ty_uniq(..) | ty::ty_box(..) |
         ty::ty_str(ty::vstore_uniq) | ty::ty_vec(_, ty::vstore_uniq) |
-        ty::ty_str(ty::vstore_box) | ty::ty_vec(_, ty::vstore_box) |
         ty::ty_bare_fn(..) => MonoNonNull,
         // Is that everything?  Would closures or slices qualify?
         _ => MonoBits
diff --git a/src/librustc/middle/trans/debuginfo.rs b/src/librustc/middle/trans/debuginfo.rs
index b89ec9d19df..3cdb1c52d3c 100644
--- a/src/librustc/middle/trans/debuginfo.rs
+++ b/src/librustc/middle/trans/debuginfo.rs
@@ -1896,23 +1896,6 @@ fn vec_metadata(cx: &CrateContext,
         span);
 }
 
-fn boxed_vec_metadata(cx: &CrateContext,
-                      element_type: ty::t,
-                      span: Span)
-                   -> DICompositeType {
-    let element_llvm_type = type_of::type_of(cx, element_type);
-    let vec_llvm_type = Type::vec(cx.sess.targ_cfg.arch, &element_llvm_type);
-    let vec_type_name: &str = format!("[{}]", ppaux::ty_to_str(cx.tcx, element_type));
-    let vec_metadata = vec_metadata(cx, element_type, span);
-
-    return boxed_type_metadata(
-        cx,
-        Some(vec_type_name),
-        vec_llvm_type,
-        vec_metadata,
-        span);
-}
-
 fn vec_slice_metadata(cx: &CrateContext,
                       vec_type: ty::t,
                       element_type: ty::t,
@@ -2093,9 +2076,6 @@ fn type_metadata(cx: &CrateContext,
                     let vec_metadata = vec_metadata(cx, i8_t, usage_site_span);
                     pointer_type_metadata(cx, t, vec_metadata)
                 }
-                ty::vstore_box => {
-                    fail!("unexpected managed string")
-                }
                 ty::vstore_slice(_region) => {
                     vec_slice_metadata(cx, t, i8_t, usage_site_span)
                 }
@@ -2116,10 +2096,6 @@ fn type_metadata(cx: &CrateContext,
                     let vec_metadata = vec_metadata(cx, mt.ty, usage_site_span);
                     pointer_type_metadata(cx, t, vec_metadata)
                 }
-                ty::vstore_box => {
-                    let boxed_vec_metadata = boxed_vec_metadata(cx, mt.ty, usage_site_span);
-                    pointer_type_metadata(cx, t, boxed_vec_metadata)
-                }
                 ty::vstore_slice(_) => {
                     vec_slice_metadata(cx, t, mt.ty, usage_site_span)
                 }
diff --git a/src/librustc/middle/trans/glue.rs b/src/librustc/middle/trans/glue.rs
index 8002559e3f9..1bfbb3f99b1 100644
--- a/src/librustc/middle/trans/glue.rs
+++ b/src/librustc/middle/trans/glue.rs
@@ -64,10 +64,7 @@ pub fn take_ty<'a>(bcx: &'a Block<'a>, v: ValueRef, t: ty::t)
     // NB: v is an *alias* of type t here, not a direct value.
     let _icx = push_ctxt("take_ty");
     match ty::get(t).sty {
-        ty::ty_box(_) |
-        ty::ty_vec(_, ty::vstore_box) | ty::ty_str(ty::vstore_box) => {
-            incr_refcnt_of_boxed(bcx, v)
-        }
+        ty::ty_box(_) => incr_refcnt_of_boxed(bcx, v),
         ty::ty_trait(_, _, ty::BoxTraitStore, _, _) => {
             incr_refcnt_of_boxed(bcx, GEPi(bcx, v, [0u, abi::trt_field_box]))
         }
@@ -113,10 +110,6 @@ fn simplified_glue_type(tcx: ty::ctxt, field: uint, t: ty::t) -> ty::t {
                 if !ty::type_needs_drop(tcx, typ) =>
             return ty::mk_box(tcx, ty::mk_nil()),
 
-            ty::ty_vec(mt, ty::vstore_box)
-                if !ty::type_needs_drop(tcx, mt.ty) =>
-            return ty::mk_box(tcx, ty::mk_nil()),
-
             ty::ty_uniq(typ)
                 if !ty::type_needs_drop(tcx, typ) =>
             return ty::mk_uniq(tcx, ty::mk_nil()),
@@ -326,11 +319,6 @@ fn make_drop_glue<'a>(bcx: &'a Block<'a>, v0: ValueRef, t: ty::t) -> &'a Block<'
         ty::ty_box(body_ty) => {
             decr_refcnt_maybe_free(bcx, v0, Some(body_ty))
         }
-        ty::ty_str(ty::vstore_box) | ty::ty_vec(_, ty::vstore_box) => {
-            let unit_ty = ty::sequence_element_type(ccx.tcx, t);
-            let unboxed_vec_ty = ty::mk_mut_unboxed_vec(ccx.tcx, unit_ty);
-            decr_refcnt_maybe_free(bcx, v0, Some(unboxed_vec_ty))
-        }
         ty::ty_uniq(content_ty) => {
             let llbox = Load(bcx, v0);
             let not_null = IsNotNull(bcx, llbox);
diff --git a/src/librustc/middle/trans/reflect.rs b/src/librustc/middle/trans/reflect.rs
index 7e01f162bb1..b9d23c47fcd 100644
--- a/src/librustc/middle/trans/reflect.rs
+++ b/src/librustc/middle/trans/reflect.rs
@@ -140,7 +140,6 @@ impl<'a> Reflector<'a> {
             }
             ty::vstore_slice(_) => (~"slice", ~[]),
             ty::vstore_uniq => (~"uniq", ~[]),
-            ty::vstore_box => (~"box", ~[])
         }
     }
 
diff --git a/src/librustc/middle/trans/tvec.rs b/src/librustc/middle/trans/tvec.rs
index ea1e0f78f44..1043ce69ab4 100644
--- a/src/librustc/middle/trans/tvec.rs
+++ b/src/librustc/middle/trans/tvec.rs
@@ -44,9 +44,6 @@ pub fn expand_boxed_vec_ty(tcx: ty::ctxt, t: ty::t) -> ty::t {
         ty::ty_str(ty::vstore_uniq) | ty::ty_vec(_, ty::vstore_uniq) => {
             ty::mk_uniq(tcx, unboxed_vec_ty)
         }
-        ty::ty_str(ty::vstore_box) | ty::ty_vec(_, ty::vstore_box) => {
-            ty::mk_box(tcx, unboxed_vec_ty)
-        }
         _ => tcx.sess.bug("non boxed-vec type \
                            in tvec::expand_boxed_vec_ty")
     }
@@ -65,21 +62,6 @@ pub fn get_alloc(bcx: &Block, vptr: ValueRef) -> ValueRef {
     Load(bcx, GEPi(bcx, vptr, [0u, abi::vec_elt_alloc]))
 }
 
-pub fn get_bodyptr(bcx: &Block, vptr: ValueRef, t: ty::t) -> ValueRef {
-    let vt = vec_types(bcx, t);
-
-    let managed = match ty::get(vt.vec_ty).sty {
-      ty::ty_str(ty::vstore_box) | ty::ty_vec(_, ty::vstore_box) => true,
-      _ => false
-    };
-
-    if managed {
-        GEPi(bcx, vptr, [0u, abi::box_field_body])
-    } else {
-        vptr
-    }
-}
-
 pub fn get_dataptr(bcx: &Block, vptr: ValueRef) -> ValueRef {
     let _icx = push_ctxt("tvec::get_dataptr");
     GEPi(bcx, vptr, [0u, abi::vec_elt_elems, 0u])
@@ -381,7 +363,7 @@ pub fn trans_uniq_or_managed_vstore<'a>(bcx: &'a Block<'a>,
     let temp_scope = fcx.push_custom_cleanup_scope();
     fcx.schedule_free_value(cleanup::CustomScope(temp_scope), val, heap);
 
-    let dataptr = get_dataptr(bcx, get_bodyptr(bcx, val, vt.vec_ty));
+    let dataptr = get_dataptr(bcx, val);
 
     debug!("alloc_vec() returned val={}, dataptr={}",
            bcx.val_to_str(val), bcx.val_to_str(dataptr));
@@ -570,10 +552,9 @@ pub fn get_base_and_byte_len(bcx: &Block,
             let len = Mul(bcx, count, vt.llunit_size);
             (base, len)
         }
-        ty::vstore_uniq | ty::vstore_box => {
+        ty::vstore_uniq => {
             assert!(type_is_immediate(bcx.ccx(), vt.vec_ty));
-            let llval = Load(bcx, llval);
-            let body = get_bodyptr(bcx, llval, vec_ty);
+            let body = Load(bcx, llval);
             (get_dataptr(bcx, body), get_fill(bcx, body))
         }
     }
@@ -610,10 +591,9 @@ pub fn get_base_and_len(bcx: &Block,
             let count = Load(bcx, GEPi(bcx, llval, [0u, abi::slice_elt_len]));
             (base, count)
         }
-        ty::vstore_uniq | ty::vstore_box => {
+        ty::vstore_uniq => {
             assert!(type_is_immediate(bcx.ccx(), vt.vec_ty));
-            let llval = Load(bcx, llval);
-            let body = get_bodyptr(bcx, llval, vec_ty);
+            let body = Load(bcx, llval);
             (get_dataptr(bcx, body), UDiv(bcx, get_fill(bcx, body), vt.llunit_size))
         }
     }
@@ -730,7 +710,7 @@ pub fn iter_vec_uniq<'r,
                      f: iter_vec_block<'r,'b>)
                      -> &'b Block<'b> {
     let _icx = push_ctxt("tvec::iter_vec_uniq");
-    let data_ptr = get_dataptr(bcx, get_bodyptr(bcx, vptr, vec_ty));
+    let data_ptr = get_dataptr(bcx, vptr);
     iter_vec_raw(bcx, data_ptr, vec_ty, fill, f)
 }
 
diff --git a/src/librustc/middle/trans/type_of.rs b/src/librustc/middle/trans/type_of.rs
index b440db66a12..0bc5ffd1019 100644
--- a/src/librustc/middle/trans/type_of.rs
+++ b/src/librustc/middle/trans/type_of.rs
@@ -115,9 +115,7 @@ pub fn sizing_type_of(cx: &CrateContext, t: ty::t) -> Type {
         ty::ty_float(t) => Type::float_from_ty(t),
 
         ty::ty_str(ty::vstore_uniq) |
-        ty::ty_str(ty::vstore_box) |
         ty::ty_vec(_, ty::vstore_uniq) |
-        ty::ty_vec(_, ty::vstore_box) |
         ty::ty_box(..) |
         ty::ty_uniq(..) |
         ty::ty_ptr(..) |
@@ -221,13 +219,6 @@ pub fn type_of(cx: &CrateContext, t: ty::t) -> Type {
         let name = llvm_type_name(cx, an_enum, did, substs.tps);
         adt::incomplete_type_of(cx, repr, name)
       }
-      ty::ty_str(ty::vstore_box) => {
-          fail!("unexpected managed string")
-      }
-      ty::ty_vec(ref mt, ty::vstore_box) => {
-          let e_ty = type_of(cx, mt.ty);
-          Type::at_box(cx, Type::vec(cx.sess.targ_cfg.arch, &e_ty)).ptr_to()
-      }
       ty::ty_box(typ) => {
           Type::at_box(cx, type_of(cx, typ)).ptr_to()
       }
diff --git a/src/librustc/middle/ty.rs b/src/librustc/middle/ty.rs
index 6b42183d42b..7f27b1a0cfa 100644
--- a/src/librustc/middle/ty.rs
+++ b/src/librustc/middle/ty.rs
@@ -130,7 +130,6 @@ pub struct mt {
 pub enum vstore {
     vstore_fixed(uint),
     vstore_uniq,
-    vstore_box,
     vstore_slice(Region)
 }
 
@@ -1558,7 +1557,7 @@ pub fn type_is_box(ty: t) -> bool {
 
 pub fn type_is_boxed(ty: t) -> bool {
     match get(ty).sty {
-      ty_box(_) | ty_vec(_, vstore_box) | ty_str(vstore_box) => true,
+      ty_box(_) => true,
       _ => false
     }
 }
@@ -1682,10 +1681,7 @@ fn type_needs_unwind_cleanup_(cx: ctxt, ty: t,
           }
           ty_uniq(_) |
           ty_str(vstore_uniq) |
-          ty_str(vstore_box) |
-          ty_vec(_, vstore_uniq) |
-          ty_vec(_, vstore_box)
-          => {
+          ty_vec(_, vstore_uniq) => {
             // Once we're inside a box, the annihilator will find
             // it and destroy it.
             if !encountered_box {
@@ -2028,10 +2024,6 @@ pub fn type_contents(cx: ctxt, ty: t) -> TypeContents {
                 tc_mt(cx, mt, cache).owned_pointer()
             }
 
-            ty_vec(mt, vstore_box) => {
-                tc_mt(cx, mt, cache).managed_pointer()
-            }
-
             ty_vec(ref mt, vstore_slice(r)) => {
                 tc_ty(cx, mt.ty, cache).reference(
                     borrowed_contents(r, mt.mutbl))
@@ -2041,10 +2033,6 @@ pub fn type_contents(cx: ctxt, ty: t) -> TypeContents {
                 tc_mt(cx, mt, cache)
             }
 
-            ty_str(vstore_box) => {
-                TC::Managed
-            }
-
             ty_str(vstore_slice(r)) => {
                 borrowed_contents(r, ast::MutImmutable)
             }
@@ -2530,8 +2518,8 @@ pub fn type_is_pod(cx: ctxt, ty: t) -> bool {
       ty_type | ty_ptr(_) | ty_bare_fn(_) => result = true,
       // Boxed types
       ty_box(_) | ty_uniq(_) | ty_closure(_) |
-      ty_str(vstore_uniq) | ty_str(vstore_box) |
-      ty_vec(_, vstore_uniq) | ty_vec(_, vstore_box) |
+      ty_str(vstore_uniq) |
+      ty_vec(_, vstore_uniq) |
       ty_trait(_, _, _, _, _) | ty_rptr(_,_) => result = false,
       // Structural types
       ty_enum(did, ref substs) => {
@@ -4426,7 +4414,7 @@ pub fn normalize_ty(cx: ctxt, t: t) -> t {
 
         fn fold_vstore(&mut self, vstore: vstore) -> vstore {
             match vstore {
-                vstore_fixed(..) | vstore_uniq | vstore_box => vstore,
+                vstore_fixed(..) | vstore_uniq => vstore,
                 vstore_slice(_) => vstore_slice(ReStatic)
             }
         }
@@ -4863,7 +4851,6 @@ pub fn hash_crate_independent(tcx: ctxt, t: t, local_hash: ~str) -> u64 {
         match v {
             vstore_fixed(_) => hash.input([0]),
             vstore_uniq => hash.input([1]),
-            vstore_box => hash.input([2]),
             vstore_slice(r) => {
                 hash.input([3]);
                 region(hash, r);
diff --git a/src/librustc/middle/ty_fold.rs b/src/librustc/middle/ty_fold.rs
index e322792c996..63d6e2ae442 100644
--- a/src/librustc/middle/ty_fold.rs
+++ b/src/librustc/middle/ty_fold.rs
@@ -202,7 +202,6 @@ pub fn super_fold_vstore<T:TypeFolder>(this: &mut T,
     match vstore {
         ty::vstore_fixed(i) => ty::vstore_fixed(i),
         ty::vstore_uniq => ty::vstore_uniq,
-        ty::vstore_box => ty::vstore_box,
         ty::vstore_slice(r) => ty::vstore_slice(this.fold_region(r)),
     }
 }
diff --git a/src/librustc/middle/typeck/astconv.rs b/src/librustc/middle/typeck/astconv.rs
index 0cc646aa5c3..90abdc5ac50 100644
--- a/src/librustc/middle/typeck/astconv.rs
+++ b/src/librustc/middle/typeck/astconv.rs
@@ -384,6 +384,23 @@ pub fn ast_ty_to_ty<AC:AstConv, RS:RegionScope>(
         ty::mt {ty: ast_ty_to_ty(this, rscope, mt.ty), mutbl: mt.mutbl}
     }
 
+    enum PointerTy {
+        Box,
+        VStore(ty::vstore)
+    }
+    impl PointerTy {
+        fn expect_vstore(&self, tcx: ty::ctxt, span: Span, ty: &str) -> ty::vstore {
+            match *self {
+                Box => {
+                    tcx.sess.span_err(span, format!("managed {} are not supported", ty));
+                    // everything can be ~, so this is a worth substitute
+                    ty::vstore_uniq
+                }
+                VStore(vst) => vst
+            }
+        }
+    }
+
     // Handle @, ~, and & being able to mean strs and vecs.
     // If a_seq_ty is a str or a vec, make it a str/vec.
     // Also handle first-class trait types.
@@ -392,17 +409,18 @@ pub fn ast_ty_to_ty<AC:AstConv, RS:RegionScope>(
                   this: &AC,
                   rscope: &RS,
                   a_seq_ty: &ast::MutTy,
-                  vst: ty::vstore,
+                  ptr_ty: PointerTy,
                   constr: |ty::mt| -> ty::t)
                   -> ty::t {
         let tcx = this.tcx();
-        debug!("mk_pointer(vst={:?})", vst);
+        debug!("mk_pointer(ptr_ty={:?})", ptr_ty);
 
         match a_seq_ty.ty.node {
             ast::TyVec(ty) => {
+                let vst = ptr_ty.expect_vstore(tcx, a_seq_ty.ty.span, "vectors");
                 let mut mt = ast_ty_to_mt(this, rscope, ty);
                 if a_seq_ty.mutbl == ast::MutMutable {
-                    mt = ty::mt { ty: mt.ty, mutbl: a_seq_ty.mutbl };
+                    mt.mutbl = ast::MutMutable;
                 }
                 debug!("&[]: vst={:?}", vst);
                 return ty::mk_vec(tcx, mt, vst);
@@ -416,26 +434,19 @@ pub fn ast_ty_to_ty<AC:AstConv, RS:RegionScope>(
                     Some(&ast::DefPrimTy(ast::TyStr)) if
                             a_seq_ty.mutbl == ast::MutImmutable => {
                         check_path_args(tcx, path, NO_TPS | NO_REGIONS);
-                        match vst {
-                            ty::vstore_box => {
-                                tcx.sess.span_err(path.span,
-                                                  "managed strings are not \
-                                                   supported")
-                            }
-                            _ => {}
-                        }
+                        let vst = ptr_ty.expect_vstore(tcx, path.span, "strings");
                         return ty::mk_str(tcx, vst);
                     }
                     Some(&ast::DefTrait(trait_def_id)) => {
                         let result = ast_path_to_trait_ref(
                             this, rscope, trait_def_id, None, path);
-                        let trait_store = match vst {
-                            ty::vstore_box => ty::BoxTraitStore,
-                            ty::vstore_uniq => ty::UniqTraitStore,
-                            ty::vstore_slice(r) => {
+                        let trait_store = match ptr_ty {
+                            Box => ty::BoxTraitStore,
+                            VStore(ty::vstore_uniq) => ty::UniqTraitStore,
+                            VStore(ty::vstore_slice(r)) => {
                                 ty::RegionTraitStore(r)
                             }
-                            ty::vstore_fixed(..) => {
+                            VStore(ty::vstore_fixed(..)) => {
                                 tcx.sess.span_err(
                                     path.span,
                                     "@trait, ~trait or &trait are the only supported \
@@ -483,12 +494,11 @@ pub fn ast_ty_to_ty<AC:AstConv, RS:RegionScope>(
             ast::TyBot => ty::mk_bot(),
             ast::TyBox(ty) => {
                 let mt = ast::MutTy { ty: ty, mutbl: ast::MutImmutable };
-                mk_pointer(this, rscope, &mt, ty::vstore_box,
-                           |tmt| ty::mk_box(tcx, tmt.ty))
+                mk_pointer(this, rscope, &mt, Box, |tmt| ty::mk_box(tcx, tmt.ty))
             }
             ast::TyUniq(ty) => {
                 let mt = ast::MutTy { ty: ty, mutbl: ast::MutImmutable };
-                mk_pointer(this, rscope, &mt, ty::vstore_uniq,
+                mk_pointer(this, rscope, &mt, VStore(ty::vstore_uniq),
                            |tmt| ty::mk_uniq(tcx, tmt.ty))
             }
             ast::TyVec(ty) => {
@@ -502,7 +512,7 @@ pub fn ast_ty_to_ty<AC:AstConv, RS:RegionScope>(
             ast::TyRptr(ref region, ref mt) => {
                 let r = opt_ast_region_to_region(this, rscope, ast_ty.span, region);
                 debug!("ty_rptr r={}", r.repr(this.tcx()));
-                mk_pointer(this, rscope, mt, ty::vstore_slice(r),
+                mk_pointer(this, rscope, mt, VStore(ty::vstore_slice(r)),
                            |tmt| ty::mk_rptr(tcx, r, tmt))
             }
             ast::TyTup(ref fields) => {
diff --git a/src/librustc/middle/typeck/check/_match.rs b/src/librustc/middle/typeck/check/_match.rs
index e57e3ff4712..97b07186f4e 100644
--- a/src/librustc/middle/typeck/check/_match.rs
+++ b/src/librustc/middle/typeck/check/_match.rs
@@ -604,7 +604,7 @@ pub fn check_pat(pcx: &pat_ctxt, pat: &ast::Pat, expected: ty::t) {
           ty::ty_vec(mt, vstore) => {
             let region_var = match vstore {
                 ty::vstore_slice(r) => r,
-                ty::vstore_box | ty::vstore_uniq | ty::vstore_fixed(_) => {
+                ty::vstore_uniq | ty::vstore_fixed(_) => {
                     default_region_var
                 }
             };
diff --git a/src/librustc/middle/typeck/check/method.rs b/src/librustc/middle/typeck/check/method.rs
index e7e4f61741f..d32d51c251a 100644
--- a/src/librustc/middle/typeck/check/method.rs
+++ b/src/librustc/middle/typeck/check/method.rs
@@ -699,7 +699,6 @@ impl<'a> LookupContext<'a> {
         let tcx = self.tcx();
         let sty = ty::get(self_ty).sty.clone();
         match sty {
-            ty_vec(mt, vstore_box) |
             ty_vec(mt, vstore_uniq) |
             ty_vec(mt, vstore_slice(_)) | // NDM(#3148)
             ty_vec(mt, vstore_fixed(_)) => {
@@ -728,7 +727,6 @@ impl<'a> LookupContext<'a> {
                     })
             }
 
-            ty_str(vstore_box) |
             ty_str(vstore_uniq) |
             ty_str(vstore_fixed(_)) => {
                 let entry = self.search_for_some_kind_of_autorefd_method(
diff --git a/src/librustc/middle/typeck/check/regionck.rs b/src/librustc/middle/typeck/check/regionck.rs
index f134fb3b6ae..6d46cd38087 100644
--- a/src/librustc/middle/typeck/check/regionck.rs
+++ b/src/librustc/middle/typeck/check/regionck.rs
@@ -1215,9 +1215,7 @@ pub mod guarantor {
             }
             ty::ty_box(..) |
             ty::ty_ptr(..) |
-            ty::ty_vec(_, ty::vstore_box) |
-            ty::ty_trait(_, _, ty::BoxTraitStore, _, _) |
-            ty::ty_str(ty::vstore_box) => {
+            ty::ty_trait(_, _, ty::BoxTraitStore, _, _) => {
                 OtherPointer
             }
             ty::ty_closure(ref closure_ty) => {
@@ -1301,7 +1299,6 @@ pub mod guarantor {
                 let guarantor1 = match vstore {
                     ty::vstore_fixed(_) | ty::vstore_uniq => guarantor,
                     ty::vstore_slice(r) => Some(r),
-                    ty::vstore_box => None
                 };
 
                 link_ref_bindings_in_pats(rcx, before, guarantor1);
diff --git a/src/librustc/middle/typeck/infer/coercion.rs b/src/librustc/middle/typeck/infer/coercion.rs
index 6a4de959c2b..adf36cf973b 100644
--- a/src/librustc/middle/typeck/infer/coercion.rs
+++ b/src/librustc/middle/typeck/infer/coercion.rs
@@ -67,7 +67,7 @@ we may want to adjust precisely when coercions occur.
 
 use middle::ty::{AutoPtr, AutoBorrowVec, AutoBorrowFn, AutoBorrowObj};
 use middle::ty::{AutoDerefRef};
-use middle::ty::{vstore_slice, vstore_box, vstore_uniq};
+use middle::ty::{vstore_slice, vstore_uniq};
 use middle::ty::{mt};
 use middle::ty;
 use middle::typeck::infer::{CoerceResult, resolve_type, Coercion};
@@ -272,7 +272,6 @@ impl Coerce {
                b.inf_str(self.get_ref().infcx));
 
         match *sty_a {
-            ty::ty_str(vstore_box) |
             ty::ty_str(vstore_uniq) => {}
             _ => {
                 return self.subtype(a, b);
diff --git a/src/librustc/middle/typeck/variance.rs b/src/librustc/middle/typeck/variance.rs
index cd4abd70ecd..51364addfed 100644
--- a/src/librustc/middle/typeck/variance.rs
+++ b/src/librustc/middle/typeck/variance.rs
@@ -736,7 +736,7 @@ impl<'a> ConstraintContext<'a> {
                 self.add_constraints_from_region(r, contra);
             }
 
-            ty::vstore_fixed(_) | ty::vstore_uniq | ty::vstore_box => {
+            ty::vstore_fixed(_) | ty::vstore_uniq => {
             }
         }
     }
diff --git a/src/librustc/util/ppaux.rs b/src/librustc/util/ppaux.rs
index 27d15d73825..eba99c7fb5a 100644
--- a/src/librustc/util/ppaux.rs
+++ b/src/librustc/util/ppaux.rs
@@ -260,7 +260,6 @@ pub fn vstore_to_str(cx: ctxt, vs: ty::vstore) -> ~str {
     match vs {
       ty::vstore_fixed(n) => format!("{}", n),
       ty::vstore_uniq => ~"~",
-      ty::vstore_box => ~"@",
       ty::vstore_slice(r) => region_ptr_to_str(cx, r)
     }
 }
diff --git a/src/libsyntax/parse/parser.rs b/src/libsyntax/parse/parser.rs
index aa33edf28f5..8a3da581607 100644
--- a/src/libsyntax/parse/parser.rs
+++ b/src/libsyntax/parse/parser.rs
@@ -2825,7 +2825,7 @@ impl Parser {
             let hi = self.last_span.hi;
             return @ast::Pat {
                 id: ast::DUMMY_NODE_ID,
-                node: sub,
+                node: PatUniq(sub),
                 span: mk_sp(lo, hi)
             }
           }