]> git.lizzy.rs Git - rust.git/commitdiff
rustc: rename ty::vstore and its variants to UpperCamelCase.
authorEduard Burtescu <edy.burt@gmail.com>
Thu, 10 Apr 2014 14:42:02 +0000 (17:42 +0300)
committerEduard Burtescu <edy.burt@gmail.com>
Thu, 10 Apr 2014 17:18:46 +0000 (20:18 +0300)
30 files changed:
src/librustc/metadata/encoder.rs
src/librustc/metadata/tydecode.rs
src/librustc/metadata/tyencode.rs
src/librustc/middle/astencode.rs
src/librustc/middle/check_match.rs
src/librustc/middle/lint.rs
src/librustc/middle/mem_categorization.rs
src/librustc/middle/trans/_match.rs
src/librustc/middle/trans/base.rs
src/librustc/middle/trans/callee.rs
src/librustc/middle/trans/common.rs
src/librustc/middle/trans/consts.rs
src/librustc/middle/trans/debuginfo.rs
src/librustc/middle/trans/expr.rs
src/librustc/middle/trans/glue.rs
src/librustc/middle/trans/reflect.rs
src/librustc/middle/trans/tvec.rs
src/librustc/middle/trans/type_of.rs
src/librustc/middle/ty.rs
src/librustc/middle/ty_fold.rs
src/librustc/middle/typeck/astconv.rs
src/librustc/middle/typeck/check/_match.rs
src/librustc/middle/typeck/check/method.rs
src/librustc/middle/typeck/check/mod.rs
src/librustc/middle/typeck/check/regionck.rs
src/librustc/middle/typeck/check/regionmanip.rs
src/librustc/middle/typeck/infer/coercion.rs
src/librustc/middle/typeck/infer/combine.rs
src/librustc/middle/typeck/variance.rs
src/librustc/util/ppaux.rs

index fcb0e3136a76e010b3874f25db136cfb09d9bde1..640bd58156c06bbf4b7a3df94c48b1b96094095f 100644 (file)
@@ -234,7 +234,7 @@ pub fn write_type(ecx: &EncodeContext,
 
 pub fn write_vstore(ecx: &EncodeContext,
                     ebml_w: &mut Encoder,
-                    vstore: ty::vstore) {
+                    vstore: ty::Vstore) {
     let ty_str_ctxt = &tyencode::ctxt {
         diag: ecx.diag,
         ds: def_to_str,
index 599a1dad33d22a56124abeb920f890598e0d769e..61a686cea6e58cf8d04f06c48c9bfa1b149e957d 100644 (file)
@@ -145,19 +145,19 @@ fn parse_sigil(st: &mut PState) -> ast::Sigil {
     }
 }
 
-fn parse_vstore(st: &mut PState, conv: conv_did) -> ty::vstore {
+fn parse_vstore(st: &mut PState, conv: conv_did) -> ty::Vstore {
     assert_eq!(next(st), '/');
 
     let c = peek(st);
     if '0' <= c && c <= '9' {
         let n = parse_uint(st);
         assert_eq!(next(st), '|');
-        return ty::vstore_fixed(n);
+        return ty::VstoreFixed(n);
     }
 
     match next(st) {
-      '~' => ty::vstore_uniq,
-      '&' => ty::vstore_slice(parse_region(st, conv)),
+      '~' => ty::VstoreUniq,
+      '&' => ty::VstoreSlice(parse_region(st, conv)),
       c => st.tcx.sess.bug(format!("parse_vstore(): bad input '{}'", c))
     }
 }
index 384c6907aed4fe21fc139fabe72231408298dbe7..0fb55f5e160e28667209e72e34c2c68abf44a93f 100644 (file)
@@ -204,12 +204,12 @@ fn enc_bound_region(w: &mut MemWriter, cx: &ctxt, br: ty::BoundRegion) {
     }
 }
 
-pub fn enc_vstore(w: &mut MemWriter, cx: &ctxt, v: ty::vstore) {
+pub fn enc_vstore(w: &mut MemWriter, cx: &ctxt, v: ty::Vstore) {
     mywrite!(w, "/");
     match v {
-        ty::vstore_fixed(u) => mywrite!(w, "{}|", u),
-        ty::vstore_uniq => mywrite!(w, "~"),
-        ty::vstore_slice(r) => {
+        ty::VstoreFixed(u) => mywrite!(w, "{}|", u),
+        ty::VstoreUniq => mywrite!(w, "~"),
+        ty::VstoreSlice(r) => {
             mywrite!(w, "&");
             enc_region(w, cx, r);
         }
index 3529f2c57c0e29ea801e44ffb88d743e179151a5..d2fe70e08d7359b28778b52c5d4463f9b25978b0 100644 (file)
@@ -823,7 +823,7 @@ fn ty_str_ctxt<'a>(&'a self) -> tyencode::ctxt<'a> {
 
 trait ebml_writer_helpers {
     fn emit_ty(&mut self, ecx: &e::EncodeContext, ty: ty::t);
-    fn emit_vstore(&mut self, ecx: &e::EncodeContext, vstore: ty::vstore);
+    fn emit_vstore(&mut self, ecx: &e::EncodeContext, vstore: ty::Vstore);
     fn emit_tys(&mut self, ecx: &e::EncodeContext, tys: &[ty::t]);
     fn emit_type_param_def(&mut self,
                            ecx: &e::EncodeContext,
@@ -840,7 +840,7 @@ fn emit_ty(&mut self, ecx: &e::EncodeContext, ty: ty::t) {
         self.emit_opaque(|this| Ok(e::write_type(ecx, this, ty)));
     }
 
-    fn emit_vstore(&mut self, ecx: &e::EncodeContext, vstore: ty::vstore) {
+    fn emit_vstore(&mut self, ecx: &e::EncodeContext, vstore: ty::Vstore) {
         self.emit_opaque(|this| Ok(e::write_vstore(ecx, this, vstore)));
     }
 
index e18f8f530eed340ea358d1f432ee7b6a788068fb..f59b2efd1cda95158312743a723b706be9d13bee 100644 (file)
@@ -279,7 +279,7 @@ fn is_useful(cx: &MatchCheckCtxt, m: &matrix, v: &[@Pat]) -> useful {
                 }
                 not_useful
               }
-              ty::ty_vec(_, ty::vstore_fixed(n)) => {
+              ty::ty_vec(_, ty::VstoreFixed(n)) => {
                 is_useful_specialized(cx, m, v, vec(n), n, left_ty)
               }
               ty::ty_vec(..) => {
@@ -441,7 +441,7 @@ fn missing_ctor(cx: &MatchCheckCtxt,
         else if true_found { Some(val(const_bool(false))) }
         else { Some(val(const_bool(true))) }
       }
-      ty::ty_vec(_, ty::vstore_fixed(n)) => {
+      ty::ty_vec(_, ty::VstoreFixed(n)) => {
         let mut missing = true;
         let mut wrong = false;
         for r in m.iter() {
index 22182d7e87e13bcda571bb26db21eefbaee20945..faa82463ef2a0f7d18332176077e78d609756201 100644 (file)
@@ -917,8 +917,8 @@ fn check_heap_type(cx: &Context, span: Span, ty: ty::t) {
                 ty::ty_box(_) => {
                     n_box += 1;
                 }
-                ty::ty_uniq(_) | ty::ty_str(ty::vstore_uniq) |
-                ty::ty_vec(_, ty::vstore_uniq) |
+                ty::ty_uniq(_) | ty::ty_str(ty::VstoreUniq) |
+                ty::ty_vec(_, ty::VstoreUniq) |
                 ty::ty_trait(~ty::TyTrait { store: ty::UniqTraitStore, .. }) => {
                     n_uniq += 1;
                 }
@@ -1158,7 +1158,7 @@ fn check_unused_result(cx: &Context, s: &ast::Stmt) {
 fn check_deprecated_owned_vector(cx: &Context, e: &ast::Expr) {
     let t = ty::expr_ty(cx.tcx, e);
     match ty::get(t).sty {
-        ty::ty_vec(_, ty::vstore_uniq) => {
+        ty::ty_vec(_, ty::VstoreUniq) => {
             cx.span_lint(DeprecatedOwnedVector, e.span,
                          "use of deprecated `~[]` vector; replaced by `std::vec::Vec`")
         }
index e376e66ca6f90c8ba76612db0c44e5d14e8c5aab..97e9f6fd41dbc59aced0a7ca6d455a2566cb2a6c 100644 (file)
@@ -170,14 +170,14 @@ pub fn opt_deref_kind(t: ty::t) -> Option<deref_kind> {
     match ty::get(t).sty {
         ty::ty_uniq(_) |
         ty::ty_trait(~ty::TyTrait { store: ty::UniqTraitStore, .. }) |
-        ty::ty_vec(_, ty::vstore_uniq) |
-        ty::ty_str(ty::vstore_uniq) |
+        ty::ty_vec(_, ty::VstoreUniq) |
+        ty::ty_str(ty::VstoreUniq) |
         ty::ty_closure(~ty::ClosureTy {sigil: ast::OwnedSigil, ..}) => {
             Some(deref_ptr(OwnedPtr))
         }
 
         ty::ty_rptr(r, mt) |
-        ty::ty_vec(mt, ty::vstore_slice(r)) => {
+        ty::ty_vec(mt, ty::VstoreSlice(r)) => {
             let kind = ty::BorrowKind::from_mutbl(mt.mutbl);
             Some(deref_ptr(BorrowedPtr(kind, r)))
         }
@@ -187,7 +187,7 @@ pub fn opt_deref_kind(t: ty::t) -> Option<deref_kind> {
             Some(deref_ptr(BorrowedPtr(kind, r)))
         }
 
-        ty::ty_str(ty::vstore_slice(r)) |
+        ty::ty_str(ty::VstoreSlice(r)) |
         ty::ty_closure(~ty::ClosureTy {sigil: ast::BorrowedSigil,
                                       region: r, ..}) => {
             Some(deref_ptr(BorrowedPtr(ty::ImmBorrow, r)))
@@ -206,8 +206,8 @@ pub fn opt_deref_kind(t: ty::t) -> Option<deref_kind> {
             Some(deref_interior(InteriorField(PositionalField(0))))
         }
 
-        ty::ty_vec(_, ty::vstore_fixed(_)) |
-        ty::ty_str(ty::vstore_fixed(_)) => {
+        ty::ty_vec(_, ty::VstoreFixed(_)) |
+        ty::ty_str(ty::VstoreFixed(_)) => {
             Some(deref_interior(InteriorElement(element_kind(t))))
         }
 
@@ -882,7 +882,7 @@ fn vec_slice_info(tcx: &ty::ctxt,
              */
 
             match ty::get(slice_ty).sty {
-                ty::ty_vec(slice_mt, ty::vstore_slice(slice_r)) => {
+                ty::ty_vec(slice_mt, ty::VstoreSlice(slice_r)) => {
                     (slice_mt.mutbl, slice_r)
                 }
 
index 49163ce96996728ac6b5bfdef8094a32727843de..55aa517ad668b88daa2ea049267660c58ae66d12 100644 (file)
@@ -1111,7 +1111,7 @@ fn extract_vec_elems<'a>(
         let slice_len = Sub(bcx, len, slice_len_offset);
         let slice_ty = ty::mk_vec(bcx.tcx(),
             ty::mt {ty: vt.unit_ty, mutbl: ast::MutImmutable},
-            ty::vstore_slice(ty::ReStatic)
+            ty::VstoreSlice(ty::ReStatic)
         );
         let scratch = rvalue_scratch_datum(bcx, slice_ty, "");
         Store(bcx, slice_begin,
@@ -1319,7 +1319,7 @@ fn compare_values<'a>(
     }
 
     match ty::get(rhs_t).sty {
-        ty::ty_str(ty::vstore_uniq) => {
+        ty::ty_str(ty::VstoreUniq) => {
             let scratch_lhs = alloca(cx, val_ty(lhs), "__lhs");
             Store(cx, lhs, scratch_lhs);
             let scratch_rhs = alloca(cx, val_ty(rhs), "__rhs");
index 69155f3df8ea0ea3edce7d86cb7319d4877aa2b7..0e6b8df0ef8d6b06ebbe0a063543ccaafb004f52 100644 (file)
@@ -188,7 +188,7 @@ fn decl_fn(llmod: ModuleRef, name: &str, cc: lib::llvm::CallConv,
         // FIXME #6750 ~Trait cannot be directly marked as
         // noalias because the actual object pointer is nested.
         ty::ty_uniq(..) | // ty::ty_trait(_, _, ty::UniqTraitStore, _, _) |
-        ty::ty_vec(_, ty::vstore_uniq) | ty::ty_str(ty::vstore_uniq) => {
+        ty::ty_vec(_, ty::VstoreUniq) | ty::ty_str(ty::VstoreUniq) => {
             unsafe {
                 llvm::LLVMAddReturnAttribute(llfn, lib::llvm::NoAliasAttribute as c_uint);
             }
@@ -259,7 +259,7 @@ pub fn decl_rust_fn(ccx: &CrateContext, has_env: bool,
             // FIXME #6750 ~Trait cannot be directly marked as
             // noalias because the actual object pointer is nested.
             ty::ty_uniq(..) | // ty::ty_trait(_, _, ty::UniqTraitStore, _, _) |
-            ty::ty_vec(_, ty::vstore_uniq) | ty::ty_str(ty::vstore_uniq) |
+            ty::ty_vec(_, ty::VstoreUniq) | ty::ty_str(ty::VstoreUniq) |
             ty::ty_closure(~ty::ClosureTy {sigil: ast::OwnedSigil, ..}) => {
                 unsafe {
                     llvm::LLVMAddAttribute(llarg, lib::llvm::NoAliasAttribute as c_uint);
@@ -657,8 +657,8 @@ fn iter_variant<'r,
               }
           })
       }
-      ty::ty_str(ty::vstore_fixed(_)) |
-      ty::ty_vec(_, ty::vstore_fixed(_)) => {
+      ty::ty_str(ty::VstoreFixed(_)) |
+      ty::ty_vec(_, ty::VstoreFixed(_)) => {
         let (base, len) = tvec::get_base_and_byte_len(cx, av, t);
         let unit_ty = ty::sequence_element_type(cx.tcx(), t);
         cx = tvec::iter_vec_raw(cx, base, unit_ty, len, f);
index 13fcaa486f172296db41c16f41034d5f79a903ce..372bba6d51cc523547c9926f156375f731fedaf3 100644 (file)
@@ -654,7 +654,7 @@ pub fn trans_call_inner<'a>(
         match ty::get(ret_ty).sty {
             // `~` pointer return values never alias because ownership
             // is transferred
-            ty::ty_uniq(..) | ty::ty_vec(_, ty::vstore_uniq) => {
+            ty::ty_uniq(..) | ty::ty_vec(_, ty::VstoreUniq) => {
                 attrs.push((0, NoAliasAttribute));
             }
             _ => {}
index d03b13b1b8fb9230179f1949fea69bfee1a7a113..b8f6d445c36377fe76d3f35d2cb209380336a4c8 100644 (file)
@@ -712,7 +712,7 @@ pub fn mono_data_classify(t: ty::t) -> MonoDataClass {
     match ty::get(t).sty {
         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::VstoreUniq) | ty::ty_vec(_, ty::VstoreUniq) |
         ty::ty_bare_fn(..) => MonoNonNull,
         // Is that everything?  Would closures or slices qualify?
         _ => MonoBits
index cb16998f736e632db2f72c723ee7740200b71e10..413b723589cf232b199098386fcb68a73b2fcc85 100644 (file)
@@ -246,7 +246,7 @@ pub fn const_expr(cx: &CrateContext, e: &ast::Expr, is_local: bool) -> (ValueRef
                                     assert_eq!(abi::slice_elt_base, 0);
                                     assert_eq!(abi::slice_elt_len, 1);
                                     match ty::get(ty).sty {
-                                        ty::ty_vec(_, ty::vstore_fixed(len)) => {
+                                        ty::ty_vec(_, ty::VstoreFixed(len)) => {
                                             llconst = C_struct(cx, [
                                                 llptr,
                                                 C_uint(cx, len)
@@ -436,10 +436,10 @@ fn const_expr_unadjusted(cx: &CrateContext, e: &ast::Expr,
               let (arr, len) = match ty::get(bt).sty {
                   ty::ty_vec(_, vstore) | ty::ty_str(vstore) =>
                       match vstore {
-                      ty::vstore_fixed(u) =>
+                      ty::VstoreFixed(u) =>
                           (bv, C_uint(cx, u)),
 
-                      ty::vstore_slice(_) => {
+                      ty::VstoreSlice(_) => {
                           let e1 = const_get_elt(cx, bv, [0]);
                           (const_deref_ptr(cx, e1), const_get_elt(cx, bv, [1]))
                       },
index 8a7f30ee2c42db8ea01472514df7b81457aba67a..bfacc62cfe5cc315e1f6cc12e2232a1358668184 100644 (file)
@@ -2128,14 +2128,14 @@ fn create_pointer_to_box_metadata(cx: &CrateContext,
         ty::ty_str(ref vstore) => {
             let i8_t = ty::mk_i8();
             match *vstore {
-                ty::vstore_fixed(len) => {
+                ty::VstoreFixed(len) => {
                     fixed_vec_metadata(cx, i8_t, len, usage_site_span)
                 },
-                ty::vstore_uniq  => {
+                ty::VstoreUniq  => {
                     let vec_metadata = vec_metadata(cx, i8_t, usage_site_span);
                     pointer_type_metadata(cx, t, vec_metadata)
                 }
-                ty::vstore_slice(_region) => {
+                ty::VstoreSlice(_region) => {
                     vec_slice_metadata(cx, t, i8_t, usage_site_span)
                 }
             }
@@ -2148,14 +2148,14 @@ fn create_pointer_to_box_metadata(cx: &CrateContext,
         },
         ty::ty_vec(ref mt, ref vstore) => {
             match *vstore {
-                ty::vstore_fixed(len) => {
+                ty::VstoreFixed(len) => {
                     fixed_vec_metadata(cx, mt.ty, len, usage_site_span)
                 }
-                ty::vstore_uniq => {
+                ty::VstoreUniq => {
                     let vec_metadata = vec_metadata(cx, mt.ty, usage_site_span);
                     pointer_type_metadata(cx, t, vec_metadata)
                 }
-                ty::vstore_slice(_) => {
+                ty::VstoreSlice(_) => {
                     vec_slice_metadata(cx, t, mt.ty, usage_site_span)
                 }
             }
index c12c8c106cb4f5470e5cef2456a20132f180ca66..e61c4b05dc1af55b5674e13c2d0a0336bb4a5040 100644 (file)
@@ -265,7 +265,7 @@ fn auto_slice<'a>(
         // real one, but it will have the same runtime representation
         let slice_ty = ty::mk_vec(tcx,
                                   ty::mt { ty: unit_ty, mutbl: ast::MutImmutable },
-                                  ty::vstore_slice(ty::ReStatic));
+                                  ty::VstoreSlice(ty::ReStatic));
 
         let scratch = rvalue_scratch_datum(bcx, slice_ty, "__adjust");
         Store(bcx, base, GEPi(bcx, scratch.val, [0u, abi::slice_elt_base]));
index 5aee8b6484809679b11972bf7c55cb7f64e75b0a..5433a4c43b99c02b8380315045fdad820aa9d4e5 100644 (file)
@@ -93,7 +93,7 @@ fn get_drop_glue_type(ccx: &CrateContext, t: ty::t) -> ty::t {
             }
         }
 
-        ty::ty_vec(mt, ty::vstore_uniq) if !ty::type_needs_drop(tcx, mt.ty) =>
+        ty::ty_vec(mt, ty::VstoreUniq) if !ty::type_needs_drop(tcx, mt.ty) =>
             ty::mk_uniq(tcx, ty::mk_i8()),
 
         _ => t
@@ -289,7 +289,7 @@ fn make_drop_glue<'a>(bcx: &'a Block<'a>, v0: ValueRef, t: ty::t) -> &'a Block<'
                 trans_exchange_free(bcx, llbox)
             })
         }
-        ty::ty_vec(_, ty::vstore_uniq) | ty::ty_str(ty::vstore_uniq) => {
+        ty::ty_vec(_, ty::VstoreUniq) | ty::ty_str(ty::VstoreUniq) => {
             let llbox = Load(bcx, v0);
             let not_null = IsNotNull(bcx, llbox);
             with_cond(bcx, not_null, |bcx| {
index 0cfa4f5f6d538a440e95e82dc095dc2092dbf939..cc2a946fde3c606486b7dba8c53d9d61b630a194 100644 (file)
@@ -54,7 +54,7 @@ pub fn c_slice(&mut self, s: InternedString) -> ValueRef {
         // We're careful to not use first class aggregates here because that
         // will kick us off fast isel. (Issue #4352.)
         let bcx = self.bcx;
-        let str_vstore = ty::vstore_slice(ty::ReStatic);
+        let str_vstore = ty::VstoreSlice(ty::ReStatic);
         let str_ty = ty::mk_str(bcx.tcx(), str_vstore);
         let scratch = rvalue_scratch_datum(bcx, str_ty, "");
         let len = C_uint(bcx.ccx(), s.get().len());
@@ -123,15 +123,15 @@ pub fn bracketed(&mut self,
 
     pub fn vstore_name_and_extra(&mut self,
                                  t: ty::t,
-                                 vstore: ty::vstore)
+                                 vstore: ty::Vstore)
                                  -> (~str, Vec<ValueRef> ) {
         match vstore {
-            ty::vstore_fixed(n) => {
+            ty::VstoreFixed(n) => {
                 let extra = (vec!(self.c_uint(n))).append(self.c_size_and_align(t).as_slice());
                 (~"fixed", extra)
             }
-            ty::vstore_slice(_) => (~"slice", Vec::new()),
-            ty::vstore_uniq => (~"uniq", Vec::new()),
+            ty::VstoreSlice(_) => (~"slice", Vec::new()),
+            ty::VstoreUniq => (~"uniq", Vec::new()),
         }
     }
 
index 73370357a92b118563969326c471e006be1795e5..8d8511b883e96e4a2724c076f557e523336aa91f 100644 (file)
@@ -165,7 +165,7 @@ pub fn trans_slice_vstore<'a>(
         let fixed_ty = ty::mk_vec(bcx.tcx(),
                                   ty::mt {ty: vt.unit_ty,
                                           mutbl: ast::MutMutable},
-                                  ty::vstore_fixed(count));
+                                  ty::VstoreFixed(count));
         let llfixed_ty = type_of::type_of(bcx.ccx(), fixed_ty).ptr_to();
         let llfixed_casted = BitCast(bcx, llfixed, llfixed_ty);
         let cleanup_scope = cleanup::temporary_scope(bcx.tcx(), content_expr.id);
@@ -244,7 +244,7 @@ pub fn trans_uniq_vstore<'a>(bcx: &'a Block<'a>,
                     let llptrval = C_cstr(ccx, (*s).clone(), false);
                     let llptrval = PointerCast(bcx, llptrval, Type::i8p(ccx));
                     let llsizeval = C_uint(ccx, s.get().len());
-                    let typ = ty::mk_str(bcx.tcx(), ty::vstore_uniq);
+                    let typ = ty::mk_str(bcx.tcx(), ty::VstoreUniq);
                     let lldestval = rvalue_scratch_datum(bcx,
                                                          typ,
                                                          "");
@@ -461,23 +461,23 @@ pub fn get_base_and_byte_len(bcx: &Block,
 
     let vstore = match ty::get(vec_ty).sty {
         ty::ty_str(vst) | ty::ty_vec(_, vst) => vst,
-        _ => ty::vstore_uniq
+        _ => ty::VstoreUniq
     };
 
     match vstore {
-        ty::vstore_fixed(n) => {
+        ty::VstoreFixed(n) => {
             let base = GEPi(bcx, llval, [0u, 0u]);
             let len = Mul(bcx, C_uint(ccx, n), vt.llunit_size);
             (base, len)
         }
-        ty::vstore_slice(_) => {
+        ty::VstoreSlice(_) => {
             assert!(!type_is_immediate(bcx.ccx(), vec_ty));
             let base = Load(bcx, GEPi(bcx, llval, [0u, abi::slice_elt_base]));
             let count = Load(bcx, GEPi(bcx, llval, [0u, abi::slice_elt_len]));
             let len = Mul(bcx, count, vt.llunit_size);
             (base, len)
         }
-        ty::vstore_uniq => {
+        ty::VstoreUniq => {
             assert!(type_is_immediate(bcx.ccx(), vec_ty));
             let body = Load(bcx, llval);
             (get_dataptr(bcx, body), get_fill(bcx, body))
@@ -502,21 +502,21 @@ pub fn get_base_and_len(bcx: &Block,
 
     let vstore = match ty::get(vec_ty).sty {
         ty::ty_str(vst) | ty::ty_vec(_, vst) => vst,
-        _ => ty::vstore_uniq
+        _ => ty::VstoreUniq
     };
 
     match vstore {
-        ty::vstore_fixed(n) => {
+        ty::VstoreFixed(n) => {
             let base = GEPi(bcx, llval, [0u, 0u]);
             (base, C_uint(ccx, n))
         }
-        ty::vstore_slice(_) => {
+        ty::VstoreSlice(_) => {
             assert!(!type_is_immediate(bcx.ccx(), vec_ty));
             let base = Load(bcx, GEPi(bcx, llval, [0u, abi::slice_elt_base]));
             let count = Load(bcx, GEPi(bcx, llval, [0u, abi::slice_elt_len]));
             (base, count)
         }
-        ty::vstore_uniq => {
+        ty::VstoreUniq => {
             assert!(type_is_immediate(bcx.ccx(), vec_ty));
             let body = Load(bcx, llval);
             (get_dataptr(bcx, body), UDiv(bcx, get_fill(bcx, body), vt.llunit_size))
index 5a4cb1a33ef152f01b0d56d564a71b4c42a334fc..1861c414ccab46af1149a02386d04f7d09d81bd9 100644 (file)
@@ -116,15 +116,15 @@ pub fn sizing_type_of(cx: &CrateContext, t: ty::t) -> Type {
         ty::ty_uint(t) => Type::uint_from_ty(cx, t),
         ty::ty_float(t) => Type::float_from_ty(cx, t),
 
-        ty::ty_str(ty::vstore_uniq) |
-        ty::ty_vec(_, ty::vstore_uniq) |
+        ty::ty_str(ty::VstoreUniq) |
+        ty::ty_vec(_, ty::VstoreUniq) |
         ty::ty_box(..) |
         ty::ty_uniq(..) |
         ty::ty_ptr(..) |
         ty::ty_rptr(..) => Type::i8p(cx),
 
-        ty::ty_str(ty::vstore_slice(..)) |
-        ty::ty_vec(_, ty::vstore_slice(..)) => {
+        ty::ty_str(ty::VstoreSlice(..)) |
+        ty::ty_vec(_, ty::VstoreSlice(..)) => {
             Type::struct_(cx, [Type::i8p(cx), Type::i8p(cx)], false)
         }
 
@@ -132,8 +132,8 @@ pub fn sizing_type_of(cx: &CrateContext, t: ty::t) -> Type {
         ty::ty_closure(..) => Type::struct_(cx, [Type::i8p(cx), Type::i8p(cx)], false),
         ty::ty_trait(..) => Type::opaque_trait(cx),
 
-        ty::ty_str(ty::vstore_fixed(size)) => Type::array(&Type::i8(cx), size as u64),
-        ty::ty_vec(mt, ty::vstore_fixed(size)) => {
+        ty::ty_str(ty::VstoreFixed(size)) => Type::array(&Type::i8(cx), size as u64),
+        ty::ty_vec(mt, ty::VstoreFixed(size)) => {
             Type::array(&sizing_type_of(cx, mt.ty), size as u64)
         }
 
@@ -199,7 +199,7 @@ pub fn type_of(cx: &CrateContext, t: ty::t) -> Type {
       ty::ty_int(t) => Type::int_from_ty(cx, t),
       ty::ty_uint(t) => Type::uint_from_ty(cx, t),
       ty::ty_float(t) => Type::float_from_ty(cx, t),
-      ty::ty_str(ty::vstore_uniq) => {
+      ty::ty_str(ty::VstoreUniq) => {
         Type::vec(cx, &Type::i8(cx)).ptr_to()
       }
       ty::ty_enum(did, ref substs) => {
@@ -217,28 +217,28 @@ pub fn type_of(cx: &CrateContext, t: ty::t) -> Type {
       ty::ty_uniq(typ) => {
           type_of(cx, typ).ptr_to()
       }
-      ty::ty_vec(ref mt, ty::vstore_uniq) => {
+      ty::ty_vec(ref mt, ty::VstoreUniq) => {
           Type::vec(cx, &type_of(cx, mt.ty)).ptr_to()
       }
       ty::ty_ptr(ref mt) => type_of(cx, mt.ty).ptr_to(),
       ty::ty_rptr(_, ref mt) => type_of(cx, mt.ty).ptr_to(),
 
-      ty::ty_vec(ref mt, ty::vstore_slice(_)) => {
+      ty::ty_vec(ref mt, ty::VstoreSlice(_)) => {
           let p_ty = type_of(cx, mt.ty).ptr_to();
           let u_ty = Type::uint_from_ty(cx, ast::TyU);
           Type::struct_(cx, [p_ty, u_ty], false)
       }
 
-      ty::ty_str(ty::vstore_slice(_)) => {
+      ty::ty_str(ty::VstoreSlice(_)) => {
           // This means we get a nicer name in the output
           cx.tn.find_type("str_slice").unwrap()
       }
 
-      ty::ty_str(ty::vstore_fixed(n)) => {
+      ty::ty_str(ty::VstoreFixed(n)) => {
           Type::array(&Type::i8(cx), (n + 1u) as u64)
       }
 
-      ty::ty_vec(ref mt, ty::vstore_fixed(n)) => {
+      ty::ty_vec(ref mt, ty::VstoreFixed(n)) => {
           Type::array(&type_of(cx, mt.ty), n as u64)
       }
 
index a250c6c298ba526808551260075eba516a568034..729cff5167cede7f479d55a966a64e411f886218 100644 (file)
@@ -130,10 +130,10 @@ pub struct mt {
 }
 
 #[deriving(Clone, Eq, TotalEq, Encodable, Decodable, Hash, Show)]
-pub enum vstore {
-    vstore_fixed(uint),
-    vstore_uniq,
-    vstore_slice(Region)
+pub enum Vstore {
+    VstoreFixed(uint),
+    VstoreUniq,
+    VstoreSlice(Region)
 }
 
 #[deriving(Clone, Eq, TotalEq, Hash, Encodable, Decodable, Show)]
@@ -729,11 +729,11 @@ pub enum sty {
     ty_int(ast::IntTy),
     ty_uint(ast::UintTy),
     ty_float(ast::FloatTy),
-    ty_str(vstore),
+    ty_str(Vstore),
     ty_enum(DefId, substs),
     ty_box(t),
     ty_uniq(t),
-    ty_vec(mt, vstore),
+    ty_vec(mt, Vstore),
     ty_ptr(mt),
     ty_rptr(Region, mt),
     ty_bare_fn(BareFnTy),
@@ -811,7 +811,7 @@ pub enum type_err {
     terr_regions_no_overlap(Region, Region),
     terr_regions_insufficiently_polymorphic(BoundRegion, Region),
     terr_regions_overly_polymorphic(BoundRegion, Region),
-    terr_vstores_differ(terr_vstore_kind, expected_found<vstore>),
+    terr_vstores_differ(terr_vstore_kind, expected_found<Vstore>),
     terr_trait_stores_differ(terr_vstore_kind, expected_found<TraitStore>),
     terr_in_field(@type_err, ast::Ident),
     terr_sorts(expected_found<t>),
@@ -1177,10 +1177,10 @@ fn sflags(substs: &substs) -> uint {
         return f;
     }
     match &st {
-      &ty_str(vstore_slice(r)) => {
+      &ty_str(VstoreSlice(r)) => {
         flags |= rflags(r);
       }
-      &ty_vec(ref mt, vstore_slice(r)) => {
+      &ty_vec(ref mt, VstoreSlice(r)) => {
         flags |= rflags(r);
         flags |= get(mt.ty).flags;
       }
@@ -1340,7 +1340,7 @@ pub fn mk_mach_float(tm: ast::FloatTy) -> t {
 #[inline]
 pub fn mk_char() -> t { mk_prim_t(&primitives::TY_CHAR) }
 
-pub fn mk_str(cx: &ctxt, t: vstore) -> t {
+pub fn mk_str(cx: &ctxt, t: Vstore) -> t {
     mk_t(cx, ty_str(t))
 }
 
@@ -1376,7 +1376,7 @@ pub fn mk_nil_ptr(cx: &ctxt) -> t {
     mk_ptr(cx, mt {ty: mk_nil(), mutbl: ast::MutImmutable})
 }
 
-pub fn mk_vec(cx: &ctxt, tm: mt, t: vstore) -> t {
+pub fn mk_vec(cx: &ctxt, tm: mt, t: Vstore) -> t {
     mk_t(cx, ty_vec(tm, t))
 }
 
@@ -1597,8 +1597,8 @@ pub fn type_is_self(ty: t) -> bool {
 pub fn type_is_structural(ty: t) -> bool {
     match get(ty).sty {
       ty_struct(..) | ty_tup(_) | ty_enum(..) | ty_closure(_) | ty_trait(..) |
-      ty_vec(_, vstore_fixed(_)) | ty_str(vstore_fixed(_)) |
-      ty_vec(_, vstore_slice(_)) | ty_str(vstore_slice(_))
+      ty_vec(_, VstoreFixed(_)) | ty_str(VstoreFixed(_)) |
+      ty_vec(_, VstoreSlice(_)) | ty_str(VstoreSlice(_))
       => true,
       _ => false
     }
@@ -1662,7 +1662,7 @@ pub fn type_is_unsafe_ptr(ty: t) -> bool {
 
 pub fn type_is_unique(ty: t) -> bool {
     match get(ty).sty {
-        ty_uniq(_) | ty_vec(_, vstore_uniq) | ty_str(vstore_uniq) => true,
+        ty_uniq(_) | ty_vec(_, VstoreUniq) | ty_str(VstoreUniq) => true,
         _ => false
     }
 }
@@ -1736,8 +1736,8 @@ fn type_needs_unwind_cleanup_(cx: &ctxt, ty: t,
             !needs_unwind_cleanup
           }
           ty_uniq(_) |
-          ty_str(vstore_uniq) |
-          ty_vec(_, vstore_uniq) => {
+          ty_str(VstoreUniq) |
+          ty_vec(_, VstoreUniq) => {
             // Once we're inside a box, the annihilator will find
             // it and destroy it.
             if !encountered_box {
@@ -2050,7 +2050,7 @@ fn tc_ty(cx: &ctxt,
                 TC::None
             }
 
-            ty_str(vstore_uniq) => {
+            ty_str(VstoreUniq) => {
                 TC::OwnsOwned
             }
 
@@ -2079,24 +2079,24 @@ fn tc_ty(cx: &ctxt,
                     borrowed_contents(r, mt.mutbl))
             }
 
-            ty_vec(mt, vstore_uniq) => {
+            ty_vec(mt, VstoreUniq) => {
                 tc_mt(cx, mt, cache).owned_pointer()
             }
 
-            ty_vec(ref mt, vstore_slice(r)) => {
+            ty_vec(ref mt, VstoreSlice(r)) => {
                 tc_ty(cx, mt.ty, cache).reference(
                     borrowed_contents(r, mt.mutbl))
             }
 
-            ty_vec(mt, vstore_fixed(_)) => {
+            ty_vec(mt, VstoreFixed(_)) => {
                 tc_mt(cx, mt, cache)
             }
 
-            ty_str(vstore_slice(r)) => {
+            ty_str(VstoreSlice(r)) => {
                 borrowed_contents(r, ast::MutImmutable)
             }
 
-            ty_str(vstore_fixed(_)) => {
+            ty_str(VstoreFixed(_)) => {
                 TC::None
             }
 
@@ -2328,8 +2328,8 @@ fn subtypes_require(cx: &ctxt, seen: &mut Vec<DefId>,
             // fixed length vectors need special treatment compared to
             // normal vectors, since they don't necessarily have the
             // possibilty to have length zero.
-            ty_vec(_, vstore_fixed(0)) => false, // don't need no contents
-            ty_vec(mt, vstore_fixed(_)) => type_requires(cx, seen, r_ty, mt.ty),
+            ty_vec(_, VstoreFixed(0)) => false, // don't need no contents
+            ty_vec(mt, VstoreFixed(_)) => type_requires(cx, seen, r_ty, mt.ty),
 
             ty_nil |
             ty_bot |
@@ -2466,7 +2466,7 @@ fn type_structurally_recursive(cx: &ctxt, seen: &mut Vec<DefId>,
             }
             // Fixed-length vectors.
             // FIXME(#11924) Behavior undecided for zero-length vectors.
-            ty_vec(mt, vstore_fixed(_)) => {
+            ty_vec(mt, VstoreFixed(_)) => {
                 type_structurally_recursive(cx, seen, mt.ty)
             }
 
@@ -2728,8 +2728,8 @@ pub fn ty_region(tcx: &ctxt,
                  ty: t) -> Region {
     match get(ty).sty {
         ty_rptr(r, _) => r,
-        ty_vec(_, vstore_slice(r)) => r,
-        ty_str(vstore_slice(r)) => r,
+        ty_vec(_, VstoreSlice(r)) => r,
+        ty_str(VstoreSlice(r)) => r,
         ref s => {
             tcx.sess.span_bug(
                 span,
@@ -2946,11 +2946,11 @@ fn borrow_vec(cx: &ctxt, span: Span,
                   ty: ty::t) -> ty::t {
         match get(ty).sty {
             ty_vec(mt, _) => {
-                ty::mk_vec(cx, mt {ty: mt.ty, mutbl: m}, vstore_slice(r))
+                ty::mk_vec(cx, mt {ty: mt.ty, mutbl: m}, VstoreSlice(r))
             }
 
             ty_str(_) => {
-                ty::mk_str(cx, vstore_slice(r))
+                ty::mk_str(cx, VstoreSlice(r))
             }
 
             ref s => {
@@ -4201,10 +4201,10 @@ fn fold_ty(&mut self, t: ty::t) -> ty::t {
             return t_norm;
         }
 
-        fn fold_vstore(&mut self, vstore: vstore) -> vstore {
+        fn fold_vstore(&mut self, vstore: Vstore) -> Vstore {
             match vstore {
-                vstore_fixed(..) | vstore_uniq => vstore,
-                vstore_slice(_) => vstore_slice(ReStatic)
+                VstoreFixed(..) | VstoreUniq => vstore,
+                VstoreSlice(_) => VstoreSlice(ReStatic)
             }
         }
 
@@ -4595,11 +4595,11 @@ pub fn hash_crate_independent(tcx: &ctxt, t: t, svh: &Svh) -> u64 {
             }
         }
     };
-    let vstore = |state: &mut sip::SipState, v: vstore| {
+    let vstore = |state: &mut sip::SipState, v: Vstore| {
         match v {
-            vstore_fixed(_) => 0u8.hash(state),
-            vstore_uniq => 1u8.hash(state),
-            vstore_slice(r) => {
+            VstoreFixed(_) => 0u8.hash(state),
+            VstoreUniq => 1u8.hash(state),
+            VstoreSlice(r) => {
                 2u8.hash(state);
                 region(state, r);
             }
index 8b14741f88145e50247dc631f56032889696ff3a..0564a492d9d47e5810f2b582cf7605d6e0fbfae0 100644 (file)
@@ -69,7 +69,7 @@ fn fold_region(&mut self, r: ty::Region) -> ty::Region {
         r
     }
 
-    fn fold_vstore(&mut self, vstore: ty::vstore) -> ty::vstore {
+    fn fold_vstore(&mut self, vstore: ty::Vstore) -> ty::Vstore {
         super_fold_vstore(self, vstore)
     }
 
@@ -194,12 +194,12 @@ pub fn super_fold_sty<T:TypeFolder>(this: &mut T,
 }
 
 pub fn super_fold_vstore<T:TypeFolder>(this: &mut T,
-                                       vstore: ty::vstore)
-                                       -> ty::vstore {
+                                       vstore: ty::Vstore)
+                                       -> ty::Vstore {
     match vstore {
-        ty::vstore_fixed(i) => ty::vstore_fixed(i),
-        ty::vstore_uniq => ty::vstore_uniq,
-        ty::vstore_slice(r) => ty::vstore_slice(this.fold_region(r)),
+        ty::VstoreFixed(i) => ty::VstoreFixed(i),
+        ty::VstoreUniq => ty::VstoreUniq,
+        ty::VstoreSlice(r) => ty::VstoreSlice(this.fold_region(r)),
     }
 }
 
index 82be783616888aec3e1cdbba8f7d45eb412dbcbb..317a67d262e79f8218b896476b4d262995cdb36c 100644 (file)
@@ -356,7 +356,7 @@ pub fn ast_ty_to_prim_ty(tcx: &ty::ctxt, ast_ty: &ast::Ty) -> Option<ty::t> {
                             tcx.sess.span_err(ast_ty.span,
                                               "bare `str` is not a type");
                             // return /something/ so they can at least get more errors
-                            Some(ty::mk_str(tcx, ty::vstore_uniq))
+                            Some(ty::mk_str(tcx, ty::VstoreUniq))
                         }
                     }
                 }
@@ -386,15 +386,15 @@ fn ast_mt_to_mt<AC:AstConv, RS:RegionScope>(
 
     enum PointerTy {
         Box,
-        VStore(ty::vstore)
+        VStore(ty::Vstore)
     }
     impl PointerTy {
-        fn expect_vstore(&self, tcx: &ty::ctxt, span: Span, ty: &str) -> ty::vstore {
+        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
+                    ty::VstoreUniq
                 }
                 VStore(vst) => vst
             }
@@ -440,8 +440,8 @@ fn mk_pointer<AC:AstConv,
                         let result = ast_path_to_trait_ref(
                             this, rscope, trait_def_id, None, path);
                         let trait_store = match ptr_ty {
-                            VStore(ty::vstore_uniq) => ty::UniqTraitStore,
-                            VStore(ty::vstore_slice(r)) => {
+                            VStore(ty::VstoreUniq) => ty::UniqTraitStore,
+                            VStore(ty::VstoreSlice(r)) => {
                                 ty::RegionTraitStore(r)
                             }
                             _ => {
@@ -495,13 +495,13 @@ fn mk_pointer<AC:AstConv,
             }
             ast::TyUniq(ty) => {
                 let mt = ast::MutTy { ty: ty, mutbl: ast::MutImmutable };
-                mk_pointer(this, rscope, &mt, VStore(ty::vstore_uniq),
+                mk_pointer(this, rscope, &mt, VStore(ty::VstoreUniq),
                            |tmt| ty::mk_uniq(tcx, tmt.ty))
             }
             ast::TyVec(ty) => {
                 tcx.sess.span_err(ast_ty.span, "bare `[]` is not a type");
                 // return /something/ so they can at least get more errors
-                ty::mk_vec(tcx, ast_ty_to_mt(this, rscope, ty), ty::vstore_uniq)
+                ty::mk_vec(tcx, ast_ty_to_mt(this, rscope, ty), ty::VstoreUniq)
             }
             ast::TyPtr(ref mt) => {
                 ty::mk_ptr(tcx, ast_mt_to_mt(this, rscope, mt))
@@ -509,7 +509,7 @@ fn mk_pointer<AC:AstConv,
             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, VStore(ty::vstore_slice(r)),
+                mk_pointer(this, rscope, mt, VStore(ty::VstoreSlice(r)),
                            |tmt| ty::mk_rptr(tcx, r, tmt))
             }
             ast::TyTup(ref fields) => {
@@ -612,10 +612,10 @@ fn mk_pointer<AC:AstConv,
                         match *r {
                             const_eval::const_int(i) =>
                                 ty::mk_vec(tcx, ast_ty_to_mt(this, rscope, ty),
-                                           ty::vstore_fixed(i as uint)),
+                                           ty::VstoreFixed(i as uint)),
                             const_eval::const_uint(i) =>
                                 ty::mk_vec(tcx, ast_ty_to_mt(this, rscope, ty),
-                                           ty::vstore_fixed(i as uint)),
+                                           ty::VstoreFixed(i as uint)),
                             _ => {
                                 tcx.sess.span_fatal(
                                     ast_ty.span, "expected constant expr for vector length");
index bcad3a8758264b525bb4a59462fc85ef2492f194..814c45da43f7ed987849ff850195d1003e1a3228 100644 (file)
@@ -620,8 +620,8 @@ pub fn check_pat(pcx: &pat_ctxt, pat: &ast::Pat, expected: ty::t) {
                                                          expected) {
           ty::ty_vec(mt, vstore) => {
             let region_var = match vstore {
-                ty::vstore_slice(r) => r,
-                ty::vstore_uniq => {
+                ty::VstoreSlice(r) => r,
+                ty::VstoreUniq => {
                     fcx.type_error_message(pat.span,
                                            |_| {
                                             ~"unique vector patterns are no \
@@ -631,7 +631,7 @@ pub fn check_pat(pcx: &pat_ctxt, pat: &ast::Pat, expected: ty::t) {
                                            None);
                     default_region_var
                 }
-                ty::vstore_fixed(_) => {
+                ty::VstoreFixed(_) => {
                     default_region_var
                 }
             };
@@ -668,7 +668,7 @@ pub fn check_pat(pcx: &pat_ctxt, pat: &ast::Pat, expected: ty::t) {
             Some(slice_pat) => {
                 let slice_ty = ty::mk_vec(tcx,
                     ty::mt {ty: elt_type.ty, mutbl: elt_type.mutbl},
-                    ty::vstore_slice(region_var)
+                    ty::VstoreSlice(region_var)
                 );
                 check_pat(pcx, slice_pat, slice_ty);
             }
index 991e21ffab8b55fd32e95a01ba3e75fbb809719d..b9996a57929bd415604f75630eff04b5bbb1d157 100644 (file)
@@ -770,10 +770,10 @@ fn consider_reborrow(&self,
                      autoderefs: autoderefs+1,
                      autoref: Some(ty::AutoPtr(region, self_mt.mutbl))})
             }
-            ty::ty_vec(self_mt, vstore_slice(_)) => {
+            ty::ty_vec(self_mt, VstoreSlice(_)) => {
                 let region =
                     self.infcx().next_region_var(infer::Autoref(self.span));
-                (ty::mk_vec(tcx, self_mt, vstore_slice(region)),
+                (ty::mk_vec(tcx, self_mt, VstoreSlice(region)),
                  ty::AutoDerefRef {
                      autoderefs: autoderefs,
                      autoref: Some(ty::AutoBorrowVec(region, self_mt.mutbl))})
@@ -821,15 +821,15 @@ fn search_for_autosliced_method(&self,
         let tcx = self.tcx();
         let sty = ty::get(self_ty).sty.clone();
         match sty {
-            ty_vec(mt, vstore_uniq) |
-            ty_vec(mt, vstore_slice(_)) | // NDM(#3148)
-            ty_vec(mt, vstore_fixed(_)) => {
+            ty_vec(mt, VstoreUniq) |
+            ty_vec(mt, VstoreSlice(_)) |
+            ty_vec(mt, VstoreFixed(_)) => {
                 // First try to borrow to a slice
                 let entry = self.search_for_some_kind_of_autorefd_method(
                     AutoBorrowVec, autoderefs, [MutImmutable, MutMutable],
                     |m,r| ty::mk_vec(tcx,
                                      ty::mt {ty:mt.ty, mutbl:m},
-                                     vstore_slice(r)));
+                                     VstoreSlice(r)));
 
                 if entry.is_some() { return entry; }
 
@@ -839,7 +839,7 @@ fn search_for_autosliced_method(&self,
                     |m,r| {
                         let slice_ty = ty::mk_vec(tcx,
                                                   ty::mt {ty:mt.ty, mutbl:m},
-                                                  vstore_slice(r));
+                                                  VstoreSlice(r));
                         // NB: we do not try to autoref to a mutable
                         // pointer. That would be creating a pointer
                         // to a temporary pointer (the borrowed
@@ -849,18 +849,18 @@ fn search_for_autosliced_method(&self,
                     })
             }
 
-            ty_str(vstore_uniq) |
-            ty_str(vstore_fixed(_)) => {
+            ty_str(VstoreUniq) |
+            ty_str(VstoreFixed(_)) => {
                 let entry = self.search_for_some_kind_of_autorefd_method(
                     AutoBorrowVec, autoderefs, [MutImmutable],
-                    |_m,r| ty::mk_str(tcx, vstore_slice(r)));
+                    |_m,r| ty::mk_str(tcx, VstoreSlice(r)));
 
                 if entry.is_some() { return entry; }
 
                 self.search_for_some_kind_of_autorefd_method(
                     AutoBorrowVecRef, autoderefs, [MutImmutable],
                     |m,r| {
-                        let slice_ty = ty::mk_str(tcx, vstore_slice(r));
+                        let slice_ty = ty::mk_str(tcx, VstoreSlice(r));
                         ty::mk_rptr(tcx, r, ty::mt {ty:slice_ty, mutbl:m})
                     })
             }
index 9e0f3c9faa5ec93cce99c9a9b3c439a3b578b8db..b4294c549a26e43e8e6b3979fac689187ce2e2be 100644 (file)
@@ -1287,10 +1287,10 @@ pub fn check_lit(fcx: &FnCtxt, lit: &ast::Lit) -> ty::t {
     let tcx = fcx.ccx.tcx;
 
     match lit.node {
-        ast::LitStr(..) => ty::mk_str(tcx, ty::vstore_slice(ty::ReStatic)),
+        ast::LitStr(..) => ty::mk_str(tcx, ty::VstoreSlice(ty::ReStatic)),
         ast::LitBinary(..) => {
             ty::mk_vec(tcx, ty::mt{ ty: ty::mk_u8(), mutbl: ast::MutImmutable },
-                       ty::vstore_slice(ty::ReStatic))
+                       ty::VstoreSlice(ty::ReStatic))
         }
         ast::LitChar(_) => ty::mk_char(),
         ast::LitInt(_, t) => ty::mk_mach_int(t),
@@ -3023,7 +3023,7 @@ fn types_compatible(fcx: &FnCtxt, sp: Span,
             check_expr_has_type(fcx, *e, t);
         }
         let typ = ty::mk_vec(tcx, ty::mt {ty: t, mutbl: ast::MutImmutable},
-                             ty::vstore_fixed(args.len()));
+                             ty::VstoreFixed(args.len()));
         fcx.write_ty(id, typ);
       }
       ast::ExprRepeat(element, count_expr) => {
@@ -3040,7 +3040,7 @@ fn types_compatible(fcx: &FnCtxt, sp: Span,
         }
         else {
             let t = ty::mk_vec(tcx, ty::mt {ty: t, mutbl: ast::MutImmutable},
-                               ty::vstore_fixed(count));
+                               ty::VstoreFixed(count));
             fcx.write_ty(id, t);
         }
       }
@@ -3855,18 +3855,18 @@ pub fn type_is_c_like_enum(fcx: &FnCtxt, sp: Span, typ: ty::t) -> bool {
 pub fn ast_expr_vstore_to_vstore(fcx: &FnCtxt,
                                  e: &ast::Expr,
                                  v: ast::ExprVstore)
-                              -> ty::vstore {
+                              -> ty::Vstore {
     match v {
-        ast::ExprVstoreUniq => ty::vstore_uniq,
+        ast::ExprVstoreUniq => ty::VstoreUniq,
         ast::ExprVstoreSlice | ast::ExprVstoreMutSlice => {
             match e.node {
                 ast::ExprLit(..) => {
                     // string literals and *empty slices* live in static memory
-                    ty::vstore_slice(ty::ReStatic)
+                    ty::VstoreSlice(ty::ReStatic)
                 }
                 ast::ExprVec(ref elements) if elements.len() == 0 => {
                     // string literals and *empty slices* live in static memory
-                    ty::vstore_slice(ty::ReStatic)
+                    ty::VstoreSlice(ty::ReStatic)
                 }
                 ast::ExprRepeat(..) |
                 ast::ExprVec(..) => {
@@ -3874,11 +3874,11 @@ pub fn ast_expr_vstore_to_vstore(fcx: &FnCtxt,
                     match fcx.tcx().region_maps.temporary_scope(e.id) {
                         Some(scope) => {
                             let r = ty::ReScope(scope);
-                            ty::vstore_slice(r)
+                            ty::VstoreSlice(r)
                         }
                         None => {
                             // this slice occurs in a static somewhere
-                            ty::vstore_slice(ty::ReStatic)
+                            ty::VstoreSlice(ty::ReStatic)
                         }
                     }
                 }
index c8613fd70652ee60e8f5909de52c6c4029ea69de..37b648c8b6c69aa61ad7647a42eca88db37e9bd2 100644 (file)
@@ -923,8 +923,8 @@ fn constrain_index(rcx: &mut Rcx,
 
     let r_index_expr = ty::ReScope(index_expr.id);
     match ty::get(indexed_ty).sty {
-        ty::ty_str(ty::vstore_slice(r_ptr)) |
-        ty::ty_vec(_, ty::vstore_slice(r_ptr)) => {
+        ty::ty_str(ty::VstoreSlice(r_ptr)) |
+        ty::ty_vec(_, ty::VstoreSlice(r_ptr)) => {
             rcx.fcx.mk_subr(true, infer::IndexSlice(index_expr.span),
                             r_index_expr, r_ptr);
         }
index febf47add4339b545557bf784a23f205b7e8b8d3..e0d2d2252b000b3e7561868300630702f72380ab 100644 (file)
@@ -101,7 +101,7 @@ fn tcx<'a>(&'a self) -> &'a ty::ctxt {
         fn fold_ty(&mut self, ty: ty::t) -> ty::t {
             match ty::get(ty).sty {
                 ty::ty_rptr(r, ref mt) |
-                ty::ty_vec(ref mt, ty::vstore_slice(r)) => {
+                ty::ty_vec(ref mt, ty::VstoreSlice(r)) => {
                     self.relate(r);
                     self.stack.push(r);
                     ty_fold::super_fold_ty(self, mt.ty);
index 8a1662ca701d349273e4f12dda7ec6be6e0bbb10..d37518c13d5fbc0f9c5cf38ee13e055418983a7d 100644 (file)
@@ -67,7 +67,7 @@ fn foo<A>(a: A, b: A) { ... }
 
 use middle::ty::{AutoPtr, AutoBorrowVec, AutoBorrowFn, AutoBorrowObj};
 use middle::ty::{AutoDerefRef};
-use middle::ty::{vstore_slice, vstore_uniq};
+use middle::ty::{VstoreSlice, VstoreUniq};
 use middle::ty::{mt};
 use middle::ty;
 use middle::typeck::infer::{CoerceResult, resolve_type, Coercion};
@@ -108,13 +108,13 @@ pub fn tys(&self, a: ty::t, b: ty::t) -> CoerceResult {
                 });
             }
 
-            ty::ty_str(vstore_slice(_)) => {
+            ty::ty_str(VstoreSlice(_)) => {
                 return self.unpack_actual_value(a, |sty_a| {
                     self.coerce_borrowed_string(a, sty_a, b)
                 });
             }
 
-            ty::ty_vec(mt_b, vstore_slice(_)) => {
+            ty::ty_vec(mt_b, VstoreSlice(_)) => {
                 return self.unpack_actual_value(a, |sty_a| {
                     self.coerce_borrowed_vector(a, sty_a, b, mt_b)
                 });
@@ -260,14 +260,14 @@ pub fn coerce_borrowed_string(&self,
                b.inf_str(self.get_ref().infcx));
 
         match *sty_a {
-            ty::ty_str(vstore_uniq) => {}
+            ty::ty_str(VstoreUniq) => {}
             _ => {
                 return self.subtype(a, b);
             }
         };
 
         let r_a = self.get_ref().infcx.next_region_var(Coercion(self.get_ref().trace));
-        let a_borrowed = ty::mk_str(self.get_ref().infcx.tcx, vstore_slice(r_a));
+        let a_borrowed = ty::mk_str(self.get_ref().infcx.tcx, VstoreSlice(r_a));
         if_ok!(self.subtype(a_borrowed, b));
         Ok(Some(@AutoDerefRef(AutoDerefRef {
             autoderefs: 0,
@@ -296,7 +296,7 @@ pub fn coerce_borrowed_vector(&self,
 
         let a_borrowed = ty::mk_vec(self.get_ref().infcx.tcx,
                                     mt {ty: ty_inner, mutbl: mt_b.mutbl},
-                                    vstore_slice(r_borrow));
+                                    VstoreSlice(r_borrow));
         if_ok!(sub.tys(a_borrowed, b));
         Ok(Some(@AutoDerefRef(AutoDerefRef {
             autoderefs: 0,
index 749c1ee69387c886acbf160712e0c3cbe1d40541..8352688f4ae72b91d767c62384aee5857761f510 100644 (file)
@@ -264,15 +264,15 @@ fn contraregions(&self, a: ty::Region, b: ty::Region)
 
     fn vstores(&self,
                vk: ty::terr_vstore_kind,
-               a: ty::vstore,
-               b: ty::vstore)
-               -> cres<ty::vstore> {
+               a: ty::Vstore,
+               b: ty::Vstore)
+               -> cres<ty::Vstore> {
         debug!("{}.vstores(a={:?}, b={:?})", self.tag(), a, b);
 
         match (a, b) {
-            (ty::vstore_slice(a_r), ty::vstore_slice(b_r)) => {
+            (ty::VstoreSlice(a_r), ty::VstoreSlice(b_r)) => {
                 self.contraregions(a_r, b_r).and_then(|r| {
-                    Ok(ty::vstore_slice(r))
+                    Ok(ty::VstoreSlice(r))
                 })
             }
 
index 91d9b264a88c95fcce5acb18f502df9a9acc6323..7e7f48a351fa29feef792a84f99b7155692fa9ef 100644 (file)
@@ -716,19 +716,18 @@ fn add_constraints_from_ty(&mut self,
         }
     }
 
-    /// Adds constraints appropriate for a vector with vstore `vstore`
+    /// Adds constraints appropriate for a vector with Vstore `vstore`
     /// appearing in a context with ambient variance `variance`
     fn add_constraints_from_vstore(&mut self,
-                                   vstore: ty::vstore,
+                                   vstore: ty::Vstore,
                                    variance: VarianceTermPtr<'a>) {
         match vstore {
-            ty::vstore_slice(r) => {
+            ty::VstoreSlice(r) => {
                 let contra = self.contravariant(variance);
                 self.add_constraints_from_region(r, contra);
             }
 
-            ty::vstore_fixed(_) | ty::vstore_uniq => {
-            }
+            ty::VstoreFixed(_) | ty::VstoreUniq => {}
         }
     }
 
index 155ceadf0d829048e9e9431cc34ef22db47fdb57..ad60b67fff82ba5a382c2efec404114c5ad2ab82 100644 (file)
@@ -205,24 +205,24 @@ pub fn mt_to_str_wrapped(cx: &ctxt, before: &str, m: &mt, after: &str) -> ~str {
     return format!("{}{}{}{}", mstr, before, ty_to_str(cx, m.ty), after);
 }
 
-pub fn vstore_to_str(cx: &ctxt, vs: ty::vstore) -> ~str {
+pub fn vstore_to_str(cx: &ctxt, vs: ty::Vstore) -> ~str {
     match vs {
-      ty::vstore_fixed(n) => format!("{}", n),
-      ty::vstore_uniq => ~"~",
-      ty::vstore_slice(r) => region_ptr_to_str(cx, r)
+        ty::VstoreFixed(n) => format!("{}", n),
+        ty::VstoreUniq => ~"~",
+        ty::VstoreSlice(r) => region_ptr_to_str(cx, r)
     }
 }
 
 pub fn trait_store_to_str(cx: &ctxt, s: ty::TraitStore) -> ~str {
     match s {
-      ty::UniqTraitStore => ~"~",
-      ty::RegionTraitStore(r) => region_ptr_to_str(cx, r)
+        ty::UniqTraitStore => ~"~",
+        ty::RegionTraitStore(r) => region_ptr_to_str(cx, r)
     }
 }
 
-pub fn vstore_ty_to_str(cx: &ctxt, mt: &mt, vs: ty::vstore) -> ~str {
+pub fn vstore_ty_to_str(cx: &ctxt, mt: &mt, vs: ty::Vstore) -> ~str {
     match vs {
-        ty::vstore_fixed(_) => {
+        ty::VstoreFixed(_) => {
             format!("[{}, .. {}]", mt_to_str(cx, mt), vstore_to_str(cx, vs))
         }
         _ => {
@@ -885,7 +885,7 @@ fn repr(&self, tcx: &ctxt) -> ~str {
     }
 }
 
-impl Repr for ty::vstore {
+impl Repr for ty::Vstore {
     fn repr(&self, tcx: &ctxt) -> ~str {
         vstore_to_str(tcx, *self)
     }