about summary refs log tree commit diff
diff options
context:
space:
mode:
-rw-r--r--src/librustc/lint/builtin.rs4
-rw-r--r--src/librustc/middle/ty.rs13
-rw-r--r--src/librustc/util/ppaux.rs2
-rw-r--r--src/librustc_driver/driver.rs4
-rw-r--r--src/librustc_trans/trans/expr.rs2
-rw-r--r--src/librustc_typeck/collect.rs2
-rw-r--r--src/libsyntax/parse/parser.rs6
7 files changed, 16 insertions, 17 deletions
diff --git a/src/librustc/lint/builtin.rs b/src/librustc/lint/builtin.rs
index 0fd69ea25bc..9ce344586fd 100644
--- a/src/librustc/lint/builtin.rs
+++ b/src/librustc/lint/builtin.rs
@@ -1598,7 +1598,7 @@ impl LintPass for MissingCopyImplementations {
                 }
                 ty::mk_struct(cx.tcx,
                               ast_util::local_def(item.id),
-                              Substs::empty())
+                              cx.tcx.mk_substs(Substs::empty()))
             }
             ast::ItemEnum(_, ref ast_generics) => {
                 if ast_generics.is_parameterized() {
@@ -1606,7 +1606,7 @@ impl LintPass for MissingCopyImplementations {
                 }
                 ty::mk_enum(cx.tcx,
                             ast_util::local_def(item.id),
-                            Substs::empty())
+                            cx.tcx.mk_substs(Substs::empty()))
             }
             _ => return,
         };
diff --git a/src/librustc/middle/ty.rs b/src/librustc/middle/ty.rs
index 24e85efde7f..ce02f443318 100644
--- a/src/librustc/middle/ty.rs
+++ b/src/librustc/middle/ty.rs
@@ -803,14 +803,13 @@ bitflags! {
     }
 }
 
-impl Copy for TypeFlags {}
-
 macro_rules! sty_debug_print {
     ($ctxt: expr, $($variant: ident),*) => {{
         // curious inner module to allow variant names to be used as
         // variable names.
         mod inner {
             use middle::ty;
+            #[deriving(Copy)]
             struct DebugStat {
                 total: uint,
                 region_infer: uint,
@@ -5704,7 +5703,7 @@ pub fn object_region_bounds<'tcx>(tcx: &ctxt<'tcx>,
 
     let opt_trait_ref = opt_principal.map_or(Vec::new(), |principal| {
         let substs = principal.substs().with_self_ty(open_ty);
-        vec!(Rc::new(ty::Binder(ty::TraitRef::new(principal.def_id(), substs))))
+        vec!(Rc::new(ty::Binder(ty::TraitRef::new(principal.def_id(), tcx.mk_substs(substs)))))
     });
 
     let param_bounds = ty::ParamBounds {
@@ -6063,7 +6062,7 @@ pub fn hash_crate_independent<'tcx>(tcx: &ctxt<'tcx>, ty: Ty<'tcx>, svh: &Svh) -
                 }
                 ty_rptr(r, m) => {
                     byte!(13);
-                    region(state, r);
+                    region(state, *r);
                     mt(state, m);
                 }
                 ty_bare_fn(opt_def_id, ref b) => {
@@ -6123,7 +6122,7 @@ pub fn hash_crate_independent<'tcx>(tcx: &ctxt<'tcx>, ty: Ty<'tcx>, svh: &Svh) -
                 ty_unboxed_closure(d, r, _) => {
                     byte!(24);
                     did(state, d);
-                    region(state, r);
+                    region(state, *r);
                 }
             }
             true
@@ -6695,7 +6694,7 @@ pub fn can_type_implement_copy<'tcx>(tcx: &ctxt<'tcx>,
                                      param_env: &ParameterEnvironment<'tcx>)
                                      -> Result<(),CopyImplementationError> {
     match self_type.sty {
-        ty::ty_struct(struct_did, ref substs) => {
+        ty::ty_struct(struct_did, substs) => {
             let fields = ty::struct_fields(tcx, struct_did, substs);
             for field in fields.iter() {
                 if type_moves_by_default(tcx, field.mt.ty, param_env) {
@@ -6703,7 +6702,7 @@ pub fn can_type_implement_copy<'tcx>(tcx: &ctxt<'tcx>,
                 }
             }
         }
-        ty::ty_enum(enum_did, ref substs) => {
+        ty::ty_enum(enum_did, substs) => {
             let enum_variants = ty::enum_variants(tcx, enum_did);
             for variant in enum_variants.iter() {
                 for variant_arg_type in variant.args.iter() {
diff --git a/src/librustc/util/ppaux.rs b/src/librustc/util/ppaux.rs
index 7887c4e2dce..62092a67cbe 100644
--- a/src/librustc/util/ppaux.rs
+++ b/src/librustc/util/ppaux.rs
@@ -759,7 +759,7 @@ impl<'tcx> Repr<'tcx> for ty::TraitRef<'tcx> {
         let trait_def = ty::lookup_trait_def(tcx, self.def_id);
         format!("TraitRef({}, {})",
                 self.substs.self_ty().repr(tcx),
-                parameterized(tcx, base.as_slice(), &self.substs, &trait_def.generics, self.def_id))
+                parameterized(tcx, base.as_slice(), self.substs, &trait_def.generics, self.def_id))
     }
 }
 
diff --git a/src/librustc_driver/driver.rs b/src/librustc_driver/driver.rs
index 6b61bd4f72b..0ac8d6ba734 100644
--- a/src/librustc_driver/driver.rs
+++ b/src/librustc_driver/driver.rs
@@ -83,7 +83,7 @@ pub fn compile_input(sess: Session,
         phase_save_analysis(&analysis.ty_cx.sess, analysis.ty_cx.map.krate(), &analysis, outdir);
 
         if log_enabled!(::log::INFO) {
-            println!("Pre-trans")
+            println!("Pre-trans");
             analysis.ty_cx.print_debug_stats();
         }
 
@@ -91,7 +91,7 @@ pub fn compile_input(sess: Session,
         let (tcx, trans) = phase_4_translate_to_llvm(analysis);
 
         if log_enabled!(::log::INFO) {
-            println!("Post-trans")
+            println!("Post-trans");
             tcx.print_debug_stats();
         }
 
diff --git a/src/librustc_trans/trans/expr.rs b/src/librustc_trans/trans/expr.rs
index ca34b10e394..e3e0fffcd86 100644
--- a/src/librustc_trans/trans/expr.rs
+++ b/src/librustc_trans/trans/expr.rs
@@ -350,7 +350,7 @@ fn apply_adjustments<'blk, 'tcx>(bcx: Block<'blk, 'tcx>,
                                               expr.id,
                                               datum_ty,
                                               |t| ty::mk_rptr(tcx,
-                                                              ty::ReStatic,
+                                                              tcx.mk_region(ty::ReStatic),
                                                               ty::mt{
                                                                   ty: t,
                                                                   mutbl: ast::MutImmutable
diff --git a/src/librustc_typeck/collect.rs b/src/librustc_typeck/collect.rs
index 9252e5a8203..793c5f5b4a0 100644
--- a/src/librustc_typeck/collect.rs
+++ b/src/librustc_typeck/collect.rs
@@ -1419,7 +1419,7 @@ pub fn trait_def_of_item<'a, 'tcx>(ccx: &CrateCtxt<'a, 'tcx>,
                     index += 1;
                     Some(ty::mk_param(ccx.tcx,
                                       subst::AssocSpace,
-                                      index as u32 - 1,
+                                      index - 1,
                                       local_def(trait_item.ty_param.id))).into_iter()
                 }
                 ast::RequiredMethod(_) | ast::ProvidedMethod(_) => {
diff --git a/src/libsyntax/parse/parser.rs b/src/libsyntax/parse/parser.rs
index 15b92b2edbf..a2e2abab03e 100644
--- a/src/libsyntax/parse/parser.rs
+++ b/src/libsyntax/parse/parser.rs
@@ -3746,9 +3746,9 @@ impl<'a> Parser<'a> {
             if id.name == token::special_idents::invalid.name {
                 P(spanned(lo,
                           hi,
-                          StmtMac(spanned(lo,
+                          StmtMac(P(spanned(lo,
                                           hi,
-                                          MacInvocTT(pth, tts, EMPTY_CTXT)),
+                                          MacInvocTT(pth, tts, EMPTY_CTXT))),
                                   style)))
             } else {
                 // if it has a special ident, it's definitely an item
@@ -3911,7 +3911,7 @@ impl<'a> Parser<'a> {
                                 _ => {
                                     let e = self.mk_mac_expr(span.lo,
                                                              span.hi,
-                                                             macro.node);
+                                                             macro.and_then(|m| m.node));
                                     let e =
                                         self.parse_dot_or_call_expr_with(e);
                                     self.handle_expression_like_statement(