Skip to content

Commit 3574992

Browse files
committed
Fix the fallout
1 parent 0f8519c commit 3574992

File tree

19 files changed

+40
-50
lines changed

19 files changed

+40
-50
lines changed

src/librustc/middle/intrinsicck.rs

+1-2
Original file line numberDiff line numberDiff line change
@@ -225,11 +225,10 @@ impl<'a, 'tcx, 'v> Visitor<'v> for IntrinsicCheckingVisitor<'a, 'tcx> {
225225
intravisit::walk_fn(self, fk, fd, b, s);
226226
self.param_envs.pop();
227227
}
228-
FnKind::Closure(..) => {
228+
FnKind::Closure => {
229229
intravisit::walk_fn(self, fk, fd, b, s);
230230
}
231231
}
232-
233232
}
234233

235234
fn visit_expr(&mut self, expr: &hir::Expr) {

src/librustc/middle/mem_categorization.rs

+1-1
Original file line numberDiff line numberDiff line change
@@ -1424,7 +1424,7 @@ impl<'tcx> cmt_<'tcx> {
14241424
NonAliasable
14251425
}
14261426

1427-
Categorization::StaticItem(..) => {
1427+
Categorization::StaticItem => {
14281428
if self.mutbl.is_mutable() {
14291429
FreelyAliasable(AliasableStaticMut)
14301430
} else {

src/librustc/middle/resolve_lifetime.rs

+2-2
Original file line numberDiff line numberDiff line change
@@ -184,7 +184,7 @@ impl<'a, 'v> Visitor<'v> for LifetimeContext<'a> {
184184
this.walk_fn(fk, fd, b, s)
185185
})
186186
}
187-
FnKind::Closure(..) => {
187+
FnKind::Closure => {
188188
self.walk_fn(fk, fd, b, s)
189189
}
190190
}
@@ -479,7 +479,7 @@ impl<'a> LifetimeContext<'a> {
479479
self.visit_generics(&sig.generics);
480480
self.visit_explicit_self(&sig.explicit_self);
481481
}
482-
FnKind::Closure(..) => {
482+
FnKind::Closure => {
483483
intravisit::walk_fn_decl(self, fd);
484484
}
485485
}

src/librustc/middle/traits/coherence.rs

+1-1
Original file line numberDiff line numberDiff line change
@@ -301,7 +301,7 @@ fn ty_is_local_constructor<'tcx>(tcx: &ty::ctxt<'tcx>,
301301
ty::TyInt(..) |
302302
ty::TyUint(..) |
303303
ty::TyFloat(..) |
304-
ty::TyStr(..) |
304+
ty::TyStr |
305305
ty::TyBareFn(..) |
306306
ty::TyArray(..) |
307307
ty::TySlice(..) |

src/librustc/middle/traits/select.rs

+5-5
Original file line numberDiff line numberDiff line change
@@ -1563,7 +1563,7 @@ impl<'cx, 'tcx> SelectionContext<'cx, 'tcx> {
15631563
}
15641564

15651565
match other {
1566-
&ObjectCandidate(..) |
1566+
&ObjectCandidate |
15671567
&ParamCandidate(_) | &ProjectionCandidate => match victim {
15681568
&DefaultImplCandidate(..) => {
15691569
self.tcx().sess.bug(
@@ -1572,16 +1572,16 @@ impl<'cx, 'tcx> SelectionContext<'cx, 'tcx> {
15721572
}
15731573
&ImplCandidate(..) |
15741574
&ClosureCandidate(..) |
1575-
&FnPointerCandidate(..) |
1576-
&BuiltinObjectCandidate(..) |
1577-
&BuiltinUnsizeCandidate(..) |
1575+
&FnPointerCandidate |
1576+
&BuiltinObjectCandidate |
1577+
&BuiltinUnsizeCandidate |
15781578
&DefaultImplObjectCandidate(..) |
15791579
&BuiltinCandidate(..) => {
15801580
// We have a where-clause so don't go around looking
15811581
// for impls.
15821582
true
15831583
}
1584-
&ObjectCandidate(..) |
1584+
&ObjectCandidate |
15851585
&ProjectionCandidate => {
15861586
// Arbitrarily give param candidates priority
15871587
// over projection and object candidates.

src/librustc/middle/ty/outlives.rs

+4-4
Original file line numberDiff line numberDiff line change
@@ -188,21 +188,21 @@ fn compute_components<'a,'tcx>(infcx: &InferCtxt<'a,'tcx>,
188188
// the type and then visits the types that are lexically
189189
// contained within. (The comments refer to relevant rules
190190
// from RFC1214.)
191-
ty::TyBool(..) | // OutlivesScalar
192-
ty::TyChar(..) | // OutlivesScalar
191+
ty::TyBool | // OutlivesScalar
192+
ty::TyChar | // OutlivesScalar
193193
ty::TyInt(..) | // OutlivesScalar
194194
ty::TyUint(..) | // OutlivesScalar
195195
ty::TyFloat(..) | // OutlivesScalar
196196
ty::TyEnum(..) | // OutlivesNominalType
197197
ty::TyStruct(..) | // OutlivesNominalType
198198
ty::TyBox(..) | // OutlivesNominalType (ish)
199-
ty::TyStr(..) | // OutlivesScalar (ish)
199+
ty::TyStr | // OutlivesScalar (ish)
200200
ty::TyArray(..) | // ...
201201
ty::TySlice(..) | // ...
202202
ty::TyRawPtr(..) | // ...
203203
ty::TyRef(..) | // OutlivesReference
204204
ty::TyTuple(..) | // ...
205-
ty::TyError(..) => {
205+
ty::TyError => {
206206
push_region_constraints(out, ty.regions());
207207
for subty in ty.walk_shallow() {
208208
compute_components(infcx, subty, out);

src/librustc_borrowck/borrowck/check_loans.rs

+8-8
Original file line numberDiff line numberDiff line change
@@ -540,14 +540,14 @@ impl<'a, 'tcx> CheckLoanCtxt<'a, 'tcx> {
540540
ol, old_loan_msg)
541541
}
542542

543-
euv::OverloadedOperator(..) |
544-
euv::AddrOf(..) |
545-
euv::AutoRef(..) |
546-
euv::AutoUnsafe(..) |
547-
euv::ClosureInvocation(..) |
548-
euv::ForLoop(..) |
549-
euv::RefBinding(..) |
550-
euv::MatchDiscriminant(..) => {
543+
euv::OverloadedOperator |
544+
euv::AddrOf |
545+
euv::AutoRef |
546+
euv::AutoUnsafe |
547+
euv::ClosureInvocation |
548+
euv::ForLoop |
549+
euv::RefBinding |
550+
euv::MatchDiscriminant => {
551551
format!("previous borrow of `{}` occurs here{}",
552552
ol, old_loan_msg)
553553
}

src/librustc_borrowck/borrowck/gather_loans/restrictions.rs

+1-1
Original file line numberDiff line numberDiff line change
@@ -101,7 +101,7 @@ impl<'a, 'tcx> RestrictionsContext<'a, 'tcx> {
101101
self.extend(result, &cmt, LpInterior(i.cleaned()))
102102
}
103103

104-
Categorization::StaticItem(..) => {
104+
Categorization::StaticItem => {
105105
Safe
106106
}
107107

src/librustc_borrowck/borrowck/mod.rs

+3-3
Original file line numberDiff line numberDiff line change
@@ -942,8 +942,8 @@ impl<'a, 'tcx> BorrowckCtxt<'a, 'tcx> {
942942
"consider changing this closure to take self by mutable reference");
943943
}
944944
}
945-
mc::AliasableStatic(..) |
946-
mc::AliasableStaticMut(..) => {
945+
mc::AliasableStatic |
946+
mc::AliasableStaticMut => {
947947
span_err!(
948948
self.tcx.sess, span, E0388,
949949
"{} in a static location", prefix);
@@ -998,7 +998,7 @@ impl<'a, 'tcx> BorrowckCtxt<'a, 'tcx> {
998998
pub fn note_and_explain_bckerr(&self, err: BckError<'tcx>) {
999999
let code = err.code;
10001000
match code {
1001-
err_mutbl(..) => {
1001+
err_mutbl => {
10021002
match err.cmt.note {
10031003
mc::NoteClosureEnv(upvar_id) | mc::NoteUpvarRef(upvar_id) => {
10041004
// If this is an `Fn` closure, it simply can't mutate upvars.

src/librustc_mir/build/matches/simplify.rs

+1-1
Original file line numberDiff line numberDiff line change
@@ -66,7 +66,7 @@ impl<'a,'tcx> Builder<'a,'tcx> {
6666
candidate: &mut Candidate<'pat, 'tcx>)
6767
-> Result<BasicBlock, MatchPair<'pat, 'tcx>> {
6868
match *match_pair.pattern.kind {
69-
PatternKind::Wild(..) => {
69+
PatternKind::Wild => {
7070
// nothing left to do
7171
Ok(block)
7272
}

src/librustc_resolve/lib.rs

+1-1
Original file line numberDiff line numberDiff line change
@@ -625,7 +625,7 @@ impl<'a, 'v, 'tcx> Visitor<'v> for Resolver<'a, 'tcx> {
625625
self.visit_explicit_self(&sig.explicit_self);
626626
MethodRibKind
627627
}
628-
FnKind::Closure(..) => ClosureRibKind(node_id),
628+
FnKind::Closure => ClosureRibKind(node_id),
629629
};
630630
self.resolve_function(rib_kind, declaration, block);
631631
}

src/librustc_trans/trans/type_of.rs

+2-2
Original file line numberDiff line numberDiff line change
@@ -247,7 +247,7 @@ pub fn sizing_type_of<'a, 'tcx>(cx: &CrateContext<'a, 'tcx>, t: Ty<'tcx>) -> Typ
247247
}
248248
}
249249

250-
ty::TyProjection(..) | ty::TyInfer(..) | ty::TyParam(..) | ty::TyError(..) => {
250+
ty::TyProjection(..) | ty::TyInfer(..) | ty::TyParam(..) | ty::TyError => {
251251
cx.sess().bug(&format!("fictitious type {:?} in sizing_type_of()",
252252
t))
253253
}
@@ -451,7 +451,7 @@ pub fn in_memory_type_of<'a, 'tcx>(cx: &CrateContext<'a, 'tcx>, t: Ty<'tcx>) ->
451451
ty::TyInfer(..) => cx.sess().bug("type_of with TyInfer"),
452452
ty::TyProjection(..) => cx.sess().bug("type_of with TyProjection"),
453453
ty::TyParam(..) => cx.sess().bug("type_of with ty_param"),
454-
ty::TyError(..) => cx.sess().bug("type_of with TyError"),
454+
ty::TyError => cx.sess().bug("type_of with TyError"),
455455
};
456456

457457
debug!("--> mapped t={:?} to llty={}",

src/librustc_typeck/check/method/probe.rs

+1-1
Original file line numberDiff line numberDiff line change
@@ -1052,7 +1052,7 @@ impl<'a,'tcx> ProbeContext<'a,'tcx> {
10521052
(impl_def_id, substs, ref_obligations)
10531053
}
10541054

1055-
ObjectCandidate(..) |
1055+
ObjectCandidate |
10561056
TraitCandidate |
10571057
WhereClauseCandidate(..) => {
10581058
// These have no additional conditions to check.

src/librustc_typeck/coherence/mod.rs

+1-1
Original file line numberDiff line numberDiff line change
@@ -69,7 +69,7 @@ fn get_base_type_def_id<'a, 'tcx>(inference_context: &InferCtxt<'a, 'tcx>,
6969
}
7070

7171
TyBool | TyChar | TyInt(..) | TyUint(..) | TyFloat(..) |
72-
TyStr(..) | TyArray(..) | TySlice(..) | TyBareFn(..) | TyTuple(..) |
72+
TyStr | TyArray(..) | TySlice(..) | TyBareFn(..) | TyTuple(..) |
7373
TyParam(..) | TyError |
7474
TyRawPtr(_) | TyRef(_, _) | TyProjection(..) => {
7575
None

src/librustdoc/clean/mod.rs

+2-2
Original file line numberDiff line numberDiff line change
@@ -776,7 +776,7 @@ impl Clean<Option<Lifetime>> for ty::Region {
776776
ty::ReScope(..) |
777777
ty::ReVar(..) |
778778
ty::ReSkolemized(..) |
779-
ty::ReEmpty(..) => None
779+
ty::ReEmpty => None
780780
}
781781
}
782782
}
@@ -1609,7 +1609,7 @@ impl Clean<Type> for hir::Ty {
16091609
TyPolyTraitRef(ref bounds) => {
16101610
PolyTraitRef(bounds.clean(cx))
16111611
},
1612-
TyInfer(..) => {
1612+
TyInfer => {
16131613
Infer
16141614
},
16151615
TyTypeof(..) => {

src/test/compile-fail/move-fragments-2.rs

+4-4
Original file line numberDiff line numberDiff line change
@@ -32,7 +32,7 @@ pub fn test_match_partial(p: Lonely<D, D>) {
3232
//~^ ERROR parent_of_fragments: `$(local p)`
3333
//~| ERROR assigned_leaf_path: `($(local p) as Lonely::Zero)`
3434
match p {
35-
Zero(..) => {}
35+
Zero => {}
3636
_ => {}
3737
}
3838
}
@@ -44,7 +44,7 @@ pub fn test_match_full(p: Lonely<D, D>) {
4444
//~| ERROR assigned_leaf_path: `($(local p) as Lonely::One)`
4545
//~| ERROR assigned_leaf_path: `($(local p) as Lonely::Two)`
4646
match p {
47-
Zero(..) => {}
47+
Zero => {}
4848
One(..) => {}
4949
Two(..) => {}
5050
}
@@ -59,7 +59,7 @@ pub fn test_match_bind_one(p: Lonely<D, D>) {
5959
//~| ERROR assigned_leaf_path: `($(local p) as Lonely::Two)`
6060
//~| ERROR assigned_leaf_path: `$(local data)`
6161
match p {
62-
Zero(..) => {}
62+
Zero => {}
6363
One(data) => {}
6464
Two(..) => {}
6565
}
@@ -78,7 +78,7 @@ pub fn test_match_bind_many(p: Lonely<D, D>) {
7878
//~| ERROR assigned_leaf_path: `$(local left)`
7979
//~| ERROR assigned_leaf_path: `$(local right)`
8080
match p {
81-
Zero(..) => {}
81+
Zero => {}
8282
One(data) => {}
8383
Two(left, right) => {}
8484
}

src/test/compile-fail/move-fragments-3.rs

+1-1
Original file line numberDiff line numberDiff line change
@@ -38,7 +38,7 @@ pub fn test_match_bind_and_underscore(p: Lonely<D, D>) {
3838
//~| ERROR assigned_leaf_path: `$(local left)`
3939

4040
match p {
41-
Zero(..) => {}
41+
Zero => {}
4242

4343
One(_) => {} // <-- does not fragment `($(local p) as One)` ...
4444

src/test/run-pass/issue-14308.rs

-9
Original file line numberDiff line numberDiff line change
@@ -10,7 +10,6 @@
1010

1111

1212
struct A(isize);
13-
struct B;
1413

1514
fn main() {
1615
let x = match A(3) {
@@ -22,12 +21,4 @@ fn main() {
2221
A(..) => 2
2322
};
2423
assert_eq!(x, 2);
25-
26-
// This next test uses a (..) wildcard match on a nullary struct.
27-
// There's no particularly good reason to support this, but it's currently allowed,
28-
// and this makes sure it doesn't ICE or break LLVM.
29-
let x = match B {
30-
B(..) => 3
31-
};
32-
assert_eq!(x, 3);
3324
}

src/test/run-pass/issue-1701.rs

+1-1
Original file line numberDiff line numberDiff line change
@@ -20,7 +20,7 @@ fn noise(a: animal) -> Option<String> {
2020
animal::cat(..) => { Some("meow".to_string()) }
2121
animal::dog(..) => { Some("woof".to_string()) }
2222
animal::rabbit(..) => { None }
23-
animal::tiger(..) => { Some("roar".to_string()) }
23+
animal::tiger => { Some("roar".to_string()) }
2424
}
2525
}
2626

0 commit comments

Comments
 (0)