about summary refs log tree commit diff
path: root/src
diff options
context:
space:
mode:
authorVadim Petrochenkov <vadim.petrochenkov@gmail.com>2015-10-26 21:10:41 +0300
committerVadim Petrochenkov <vadim.petrochenkov@gmail.com>2015-11-19 11:41:09 +0300
commit35749923eed9060118878c8cb812bafd32bbcd7e (patch)
tree2ea8e1f90d568141e4a7dd6e59f3413bd78b7e95 /src
parent0f8519c341a53a4697f839041bc0a14dd6c6e773 (diff)
downloadrust-35749923eed9060118878c8cb812bafd32bbcd7e.tar.gz
rust-35749923eed9060118878c8cb812bafd32bbcd7e.zip
Fix the fallout
Diffstat (limited to 'src')
-rw-r--r--src/librustc/middle/intrinsicck.rs3
-rw-r--r--src/librustc/middle/mem_categorization.rs2
-rw-r--r--src/librustc/middle/resolve_lifetime.rs4
-rw-r--r--src/librustc/middle/traits/coherence.rs2
-rw-r--r--src/librustc/middle/traits/select.rs10
-rw-r--r--src/librustc/middle/ty/outlives.rs8
-rw-r--r--src/librustc_borrowck/borrowck/check_loans.rs16
-rw-r--r--src/librustc_borrowck/borrowck/gather_loans/restrictions.rs2
-rw-r--r--src/librustc_borrowck/borrowck/mod.rs6
-rw-r--r--src/librustc_mir/build/matches/simplify.rs2
-rw-r--r--src/librustc_resolve/lib.rs2
-rw-r--r--src/librustc_trans/trans/type_of.rs4
-rw-r--r--src/librustc_typeck/check/method/probe.rs2
-rw-r--r--src/librustc_typeck/coherence/mod.rs2
-rw-r--r--src/librustdoc/clean/mod.rs4
-rw-r--r--src/test/compile-fail/move-fragments-2.rs8
-rw-r--r--src/test/compile-fail/move-fragments-3.rs2
-rw-r--r--src/test/run-pass/issue-14308.rs9
-rw-r--r--src/test/run-pass/issue-1701.rs2
19 files changed, 40 insertions, 50 deletions
diff --git a/src/librustc/middle/intrinsicck.rs b/src/librustc/middle/intrinsicck.rs
index 11a28c0b5ea..48d7f44063e 100644
--- a/src/librustc/middle/intrinsicck.rs
+++ b/src/librustc/middle/intrinsicck.rs
@@ -225,11 +225,10 @@ impl<'a, 'tcx, 'v> Visitor<'v> for IntrinsicCheckingVisitor<'a, 'tcx> {
                 intravisit::walk_fn(self, fk, fd, b, s);
                 self.param_envs.pop();
             }
-            FnKind::Closure(..) => {
+            FnKind::Closure => {
                 intravisit::walk_fn(self, fk, fd, b, s);
             }
         }
-
     }
 
     fn visit_expr(&mut self, expr: &hir::Expr) {
diff --git a/src/librustc/middle/mem_categorization.rs b/src/librustc/middle/mem_categorization.rs
index d8031e3134d..70ef112efba 100644
--- a/src/librustc/middle/mem_categorization.rs
+++ b/src/librustc/middle/mem_categorization.rs
@@ -1424,7 +1424,7 @@ impl<'tcx> cmt_<'tcx> {
                 NonAliasable
             }
 
-            Categorization::StaticItem(..) => {
+            Categorization::StaticItem => {
                 if self.mutbl.is_mutable() {
                     FreelyAliasable(AliasableStaticMut)
                 } else {
diff --git a/src/librustc/middle/resolve_lifetime.rs b/src/librustc/middle/resolve_lifetime.rs
index 1452cf2cd76..4425a24590c 100644
--- a/src/librustc/middle/resolve_lifetime.rs
+++ b/src/librustc/middle/resolve_lifetime.rs
@@ -184,7 +184,7 @@ impl<'a, 'v> Visitor<'v> for LifetimeContext<'a> {
                     this.walk_fn(fk, fd, b, s)
                 })
             }
-            FnKind::Closure(..) => {
+            FnKind::Closure => {
                 self.walk_fn(fk, fd, b, s)
             }
         }
@@ -479,7 +479,7 @@ impl<'a> LifetimeContext<'a> {
                 self.visit_generics(&sig.generics);
                 self.visit_explicit_self(&sig.explicit_self);
             }
-            FnKind::Closure(..) => {
+            FnKind::Closure => {
                 intravisit::walk_fn_decl(self, fd);
             }
         }
diff --git a/src/librustc/middle/traits/coherence.rs b/src/librustc/middle/traits/coherence.rs
index a3795a32afc..4323b153c5f 100644
--- a/src/librustc/middle/traits/coherence.rs
+++ b/src/librustc/middle/traits/coherence.rs
@@ -301,7 +301,7 @@ fn ty_is_local_constructor<'tcx>(tcx: &ty::ctxt<'tcx>,
         ty::TyInt(..) |
         ty::TyUint(..) |
         ty::TyFloat(..) |
-        ty::TyStr(..) |
+        ty::TyStr |
         ty::TyBareFn(..) |
         ty::TyArray(..) |
         ty::TySlice(..) |
diff --git a/src/librustc/middle/traits/select.rs b/src/librustc/middle/traits/select.rs
index ba69632fde1..d63d80c4ff8 100644
--- a/src/librustc/middle/traits/select.rs
+++ b/src/librustc/middle/traits/select.rs
@@ -1563,7 +1563,7 @@ impl<'cx, 'tcx> SelectionContext<'cx, 'tcx> {
         }
 
         match other {
-            &ObjectCandidate(..) |
+            &ObjectCandidate |
             &ParamCandidate(_) | &ProjectionCandidate => match victim {
                 &DefaultImplCandidate(..) => {
                     self.tcx().sess.bug(
@@ -1572,16 +1572,16 @@ impl<'cx, 'tcx> SelectionContext<'cx, 'tcx> {
                 }
                 &ImplCandidate(..) |
                 &ClosureCandidate(..) |
-                &FnPointerCandidate(..) |
-                &BuiltinObjectCandidate(..) |
-                &BuiltinUnsizeCandidate(..) |
+                &FnPointerCandidate |
+                &BuiltinObjectCandidate |
+                &BuiltinUnsizeCandidate |
                 &DefaultImplObjectCandidate(..) |
                 &BuiltinCandidate(..) => {
                     // We have a where-clause so don't go around looking
                     // for impls.
                     true
                 }
-                &ObjectCandidate(..) |
+                &ObjectCandidate |
                 &ProjectionCandidate => {
                     // Arbitrarily give param candidates priority
                     // over projection and object candidates.
diff --git a/src/librustc/middle/ty/outlives.rs b/src/librustc/middle/ty/outlives.rs
index 9a2570d710d..ea092ed977e 100644
--- a/src/librustc/middle/ty/outlives.rs
+++ b/src/librustc/middle/ty/outlives.rs
@@ -188,21 +188,21 @@ fn compute_components<'a,'tcx>(infcx: &InferCtxt<'a,'tcx>,
         // the type and then visits the types that are lexically
         // contained within. (The comments refer to relevant rules
         // from RFC1214.)
-        ty::TyBool(..) |        // OutlivesScalar
-        ty::TyChar(..) |        // OutlivesScalar
+        ty::TyBool |            // OutlivesScalar
+        ty::TyChar |            // OutlivesScalar
         ty::TyInt(..) |         // OutlivesScalar
         ty::TyUint(..) |        // OutlivesScalar
         ty::TyFloat(..) |       // OutlivesScalar
         ty::TyEnum(..) |        // OutlivesNominalType
         ty::TyStruct(..) |      // OutlivesNominalType
         ty::TyBox(..) |         // OutlivesNominalType (ish)
-        ty::TyStr(..) |         // OutlivesScalar (ish)
+        ty::TyStr |             // OutlivesScalar (ish)
         ty::TyArray(..) |       // ...
         ty::TySlice(..) |       // ...
         ty::TyRawPtr(..) |      // ...
         ty::TyRef(..) |         // OutlivesReference
         ty::TyTuple(..) |       // ...
-        ty::TyError(..) => {
+        ty::TyError => {
             push_region_constraints(out, ty.regions());
             for subty in ty.walk_shallow() {
                 compute_components(infcx, subty, out);
diff --git a/src/librustc_borrowck/borrowck/check_loans.rs b/src/librustc_borrowck/borrowck/check_loans.rs
index cec0cf18fb7..f6bb51a26ad 100644
--- a/src/librustc_borrowck/borrowck/check_loans.rs
+++ b/src/librustc_borrowck/borrowck/check_loans.rs
@@ -540,14 +540,14 @@ impl<'a, 'tcx> CheckLoanCtxt<'a, 'tcx> {
                             ol, old_loan_msg)
                 }
 
-                euv::OverloadedOperator(..) |
-                euv::AddrOf(..) |
-                euv::AutoRef(..) |
-                euv::AutoUnsafe(..) |
-                euv::ClosureInvocation(..) |
-                euv::ForLoop(..) |
-                euv::RefBinding(..) |
-                euv::MatchDiscriminant(..) => {
+                euv::OverloadedOperator |
+                euv::AddrOf |
+                euv::AutoRef |
+                euv::AutoUnsafe |
+                euv::ClosureInvocation |
+                euv::ForLoop |
+                euv::RefBinding |
+                euv::MatchDiscriminant => {
                     format!("previous borrow of `{}` occurs here{}",
                             ol, old_loan_msg)
                 }
diff --git a/src/librustc_borrowck/borrowck/gather_loans/restrictions.rs b/src/librustc_borrowck/borrowck/gather_loans/restrictions.rs
index 426da7809d8..e7ce9397263 100644
--- a/src/librustc_borrowck/borrowck/gather_loans/restrictions.rs
+++ b/src/librustc_borrowck/borrowck/gather_loans/restrictions.rs
@@ -101,7 +101,7 @@ impl<'a, 'tcx> RestrictionsContext<'a, 'tcx> {
                 self.extend(result, &cmt, LpInterior(i.cleaned()))
             }
 
-            Categorization::StaticItem(..) => {
+            Categorization::StaticItem => {
                 Safe
             }
 
diff --git a/src/librustc_borrowck/borrowck/mod.rs b/src/librustc_borrowck/borrowck/mod.rs
index a9a7b34df12..162c91ee4e9 100644
--- a/src/librustc_borrowck/borrowck/mod.rs
+++ b/src/librustc_borrowck/borrowck/mod.rs
@@ -942,8 +942,8 @@ impl<'a, 'tcx> BorrowckCtxt<'a, 'tcx> {
                            "consider changing this closure to take self by mutable reference");
                 }
             }
-            mc::AliasableStatic(..) |
-            mc::AliasableStaticMut(..) => {
+            mc::AliasableStatic |
+            mc::AliasableStaticMut => {
                 span_err!(
                     self.tcx.sess, span, E0388,
                     "{} in a static location", prefix);
@@ -998,7 +998,7 @@ impl<'a, 'tcx> BorrowckCtxt<'a, 'tcx> {
     pub fn note_and_explain_bckerr(&self, err: BckError<'tcx>) {
         let code = err.code;
         match code {
-            err_mutbl(..) => {
+            err_mutbl => {
                 match err.cmt.note {
                     mc::NoteClosureEnv(upvar_id) | mc::NoteUpvarRef(upvar_id) => {
                         // If this is an `Fn` closure, it simply can't mutate upvars.
diff --git a/src/librustc_mir/build/matches/simplify.rs b/src/librustc_mir/build/matches/simplify.rs
index e69a04322c2..b9637addccf 100644
--- a/src/librustc_mir/build/matches/simplify.rs
+++ b/src/librustc_mir/build/matches/simplify.rs
@@ -66,7 +66,7 @@ impl<'a,'tcx> Builder<'a,'tcx> {
                                  candidate: &mut Candidate<'pat, 'tcx>)
                                  -> Result<BasicBlock, MatchPair<'pat, 'tcx>> {
         match *match_pair.pattern.kind {
-            PatternKind::Wild(..) => {
+            PatternKind::Wild => {
                 // nothing left to do
                 Ok(block)
             }
diff --git a/src/librustc_resolve/lib.rs b/src/librustc_resolve/lib.rs
index 8776ee2d831..4390bac7ac1 100644
--- a/src/librustc_resolve/lib.rs
+++ b/src/librustc_resolve/lib.rs
@@ -625,7 +625,7 @@ impl<'a, 'v, 'tcx> Visitor<'v> for Resolver<'a, 'tcx> {
                 self.visit_explicit_self(&sig.explicit_self);
                 MethodRibKind
             }
-            FnKind::Closure(..) => ClosureRibKind(node_id),
+            FnKind::Closure => ClosureRibKind(node_id),
         };
         self.resolve_function(rib_kind, declaration, block);
     }
diff --git a/src/librustc_trans/trans/type_of.rs b/src/librustc_trans/trans/type_of.rs
index 1e371a16970..e65a212e41b 100644
--- a/src/librustc_trans/trans/type_of.rs
+++ b/src/librustc_trans/trans/type_of.rs
@@ -247,7 +247,7 @@ pub fn sizing_type_of<'a, 'tcx>(cx: &CrateContext<'a, 'tcx>, t: Ty<'tcx>) -> Typ
             }
         }
 
-        ty::TyProjection(..) | ty::TyInfer(..) | ty::TyParam(..) | ty::TyError(..) => {
+        ty::TyProjection(..) | ty::TyInfer(..) | ty::TyParam(..) | ty::TyError => {
             cx.sess().bug(&format!("fictitious type {:?} in sizing_type_of()",
                                    t))
         }
@@ -451,7 +451,7 @@ pub fn in_memory_type_of<'a, 'tcx>(cx: &CrateContext<'a, 'tcx>, t: Ty<'tcx>) ->
       ty::TyInfer(..) => cx.sess().bug("type_of with TyInfer"),
       ty::TyProjection(..) => cx.sess().bug("type_of with TyProjection"),
       ty::TyParam(..) => cx.sess().bug("type_of with ty_param"),
-      ty::TyError(..) => cx.sess().bug("type_of with TyError"),
+      ty::TyError => cx.sess().bug("type_of with TyError"),
     };
 
     debug!("--> mapped t={:?} to llty={}",
diff --git a/src/librustc_typeck/check/method/probe.rs b/src/librustc_typeck/check/method/probe.rs
index c63b081c73c..3d2f80ec8bb 100644
--- a/src/librustc_typeck/check/method/probe.rs
+++ b/src/librustc_typeck/check/method/probe.rs
@@ -1052,7 +1052,7 @@ impl<'a,'tcx> ProbeContext<'a,'tcx> {
                     (impl_def_id, substs, ref_obligations)
                 }
 
-                ObjectCandidate(..) |
+                ObjectCandidate |
                 TraitCandidate |
                 WhereClauseCandidate(..) => {
                     // These have no additional conditions to check.
diff --git a/src/librustc_typeck/coherence/mod.rs b/src/librustc_typeck/coherence/mod.rs
index b3614210eef..cbf21360044 100644
--- a/src/librustc_typeck/coherence/mod.rs
+++ b/src/librustc_typeck/coherence/mod.rs
@@ -69,7 +69,7 @@ fn get_base_type_def_id<'a, 'tcx>(inference_context: &InferCtxt<'a, 'tcx>,
         }
 
         TyBool | TyChar | TyInt(..) | TyUint(..) | TyFloat(..) |
-        TyStr(..) | TyArray(..) | TySlice(..) | TyBareFn(..) | TyTuple(..) |
+        TyStr | TyArray(..) | TySlice(..) | TyBareFn(..) | TyTuple(..) |
         TyParam(..) | TyError |
         TyRawPtr(_) | TyRef(_, _) | TyProjection(..) => {
             None
diff --git a/src/librustdoc/clean/mod.rs b/src/librustdoc/clean/mod.rs
index c88b2dcdb74..9e838970940 100644
--- a/src/librustdoc/clean/mod.rs
+++ b/src/librustdoc/clean/mod.rs
@@ -776,7 +776,7 @@ impl Clean<Option<Lifetime>> for ty::Region {
             ty::ReScope(..) |
             ty::ReVar(..) |
             ty::ReSkolemized(..) |
-            ty::ReEmpty(..) => None
+            ty::ReEmpty => None
         }
     }
 }
@@ -1609,7 +1609,7 @@ impl Clean<Type> for hir::Ty {
             TyPolyTraitRef(ref bounds) => {
                 PolyTraitRef(bounds.clean(cx))
             },
-            TyInfer(..) => {
+            TyInfer => {
                 Infer
             },
             TyTypeof(..) => {
diff --git a/src/test/compile-fail/move-fragments-2.rs b/src/test/compile-fail/move-fragments-2.rs
index 1171755c953..15c28ec2713 100644
--- a/src/test/compile-fail/move-fragments-2.rs
+++ b/src/test/compile-fail/move-fragments-2.rs
@@ -32,7 +32,7 @@ pub fn test_match_partial(p: Lonely<D, D>) {
     //~^ ERROR                 parent_of_fragments: `$(local p)`
     //~| ERROR                  assigned_leaf_path: `($(local p) as Lonely::Zero)`
     match p {
-        Zero(..) => {}
+        Zero => {}
         _ => {}
     }
 }
@@ -44,7 +44,7 @@ pub fn test_match_full(p: Lonely<D, D>) {
     //~| ERROR                  assigned_leaf_path: `($(local p) as Lonely::One)`
     //~| ERROR                  assigned_leaf_path: `($(local p) as Lonely::Two)`
     match p {
-        Zero(..) => {}
+        Zero => {}
         One(..) => {}
         Two(..) => {}
     }
@@ -59,7 +59,7 @@ pub fn test_match_bind_one(p: Lonely<D, D>) {
     //~| ERROR                  assigned_leaf_path: `($(local p) as Lonely::Two)`
     //~| ERROR                  assigned_leaf_path: `$(local data)`
     match p {
-        Zero(..) => {}
+        Zero => {}
         One(data) => {}
         Two(..) => {}
     }
@@ -78,7 +78,7 @@ pub fn test_match_bind_many(p: Lonely<D, D>) {
     //~| ERROR                  assigned_leaf_path: `$(local left)`
     //~| ERROR                  assigned_leaf_path: `$(local right)`
     match p {
-        Zero(..) => {}
+        Zero => {}
         One(data) => {}
         Two(left, right) => {}
     }
diff --git a/src/test/compile-fail/move-fragments-3.rs b/src/test/compile-fail/move-fragments-3.rs
index 34b34471f4f..a1152333900 100644
--- a/src/test/compile-fail/move-fragments-3.rs
+++ b/src/test/compile-fail/move-fragments-3.rs
@@ -38,7 +38,7 @@ pub fn test_match_bind_and_underscore(p: Lonely<D, D>) {
     //~| ERROR                  assigned_leaf_path: `$(local left)`
 
     match p {
-        Zero(..) => {}
+        Zero => {}
 
         One(_) => {}       // <-- does not fragment `($(local p) as One)` ...
 
diff --git a/src/test/run-pass/issue-14308.rs b/src/test/run-pass/issue-14308.rs
index a61cb18faa6..74936411da2 100644
--- a/src/test/run-pass/issue-14308.rs
+++ b/src/test/run-pass/issue-14308.rs
@@ -10,7 +10,6 @@
 
 
 struct A(isize);
-struct B;
 
 fn main() {
     let x = match A(3) {
@@ -22,12 +21,4 @@ fn main() {
         A(..) => 2
     };
     assert_eq!(x, 2);
-
-    // This next test uses a (..) wildcard match on a nullary struct.
-    // There's no particularly good reason to support this, but it's currently allowed,
-    // and this makes sure it doesn't ICE or break LLVM.
-    let x = match B {
-        B(..) => 3
-    };
-    assert_eq!(x, 3);
 }
diff --git a/src/test/run-pass/issue-1701.rs b/src/test/run-pass/issue-1701.rs
index 3a2e46c62b0..49ee99b22a1 100644
--- a/src/test/run-pass/issue-1701.rs
+++ b/src/test/run-pass/issue-1701.rs
@@ -20,7 +20,7 @@ fn noise(a: animal) -> Option<String> {
       animal::cat(..)    => { Some("meow".to_string()) }
       animal::dog(..)    => { Some("woof".to_string()) }
       animal::rabbit(..) => { None }
-      animal::tiger(..)  => { Some("roar".to_string()) }
+      animal::tiger  => { Some("roar".to_string()) }
     }
 }