Skip to content

Commit e05e74a

Browse files
committed
Replace _, _ with ..
1 parent 6f7e51e commit e05e74a

File tree

107 files changed

+275
-271
lines changed

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

107 files changed

+275
-271
lines changed

src/libgetopts/lib.rs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -279,7 +279,7 @@ impl OptGroup {
279279
}],
280280
}
281281
}
282-
(_, _) => panic!("something is wrong with the long-form opt"),
282+
_ => panic!("something is wrong with the long-form opt"),
283283
}
284284
}
285285
}

src/librustc/cfg/construct.rs

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -99,7 +99,7 @@ impl<'a, 'tcx> CFGBuilder<'a, 'tcx> {
9999

100100
fn pat(&mut self, pat: &hir::Pat, pred: CFGIndex) -> CFGIndex {
101101
match pat.node {
102-
PatKind::Binding(_, _, None) |
102+
PatKind::Binding(.., None) |
103103
PatKind::Path(..) |
104104
PatKind::Lit(..) |
105105
PatKind::Range(..) |
@@ -109,7 +109,7 @@ impl<'a, 'tcx> CFGBuilder<'a, 'tcx> {
109109

110110
PatKind::Box(ref subpat) |
111111
PatKind::Ref(ref subpat, _) |
112-
PatKind::Binding(_, _, Some(ref subpat)) => {
112+
PatKind::Binding(.., Some(ref subpat)) => {
113113
let subpat_exit = self.pat(&subpat, pred);
114114
self.add_ast_node(pat.id, &[subpat_exit])
115115
}
@@ -306,7 +306,7 @@ impl<'a, 'tcx> CFGBuilder<'a, 'tcx> {
306306
self.call(expr, pred, &func, args.iter().map(|e| &**e))
307307
}
308308

309-
hir::ExprMethodCall(_, _, ref args) => {
309+
hir::ExprMethodCall(.., ref args) => {
310310
self.call(expr, pred, &args[0], args[1..].iter().map(|e| &**e))
311311
}
312312

src/librustc/hir/def.rs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -104,7 +104,7 @@ impl Def {
104104
pub fn var_id(&self) -> ast::NodeId {
105105
match *self {
106106
Def::Local(_, id) |
107-
Def::Upvar(_, id, _, _) => {
107+
Def::Upvar(_, id, ..) => {
108108
id
109109
}
110110

src/librustc/hir/intravisit.rs

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -341,7 +341,7 @@ pub fn walk_item<'v, V: Visitor<'v>>(visitor: &mut V, item: &'v Item) {
341341
visitor.visit_id(item.id);
342342
visitor.visit_trait_ref(trait_ref)
343343
}
344-
ItemImpl(_, _, ref type_parameters, ref opt_trait_reference, ref typ, ref impl_items) => {
344+
ItemImpl(.., ref type_parameters, ref opt_trait_reference, ref typ, ref impl_items) => {
345345
visitor.visit_id(item.id);
346346
visitor.visit_generics(type_parameters);
347347
walk_list!(visitor, visit_trait_ref, opt_trait_reference);
@@ -625,7 +625,7 @@ pub fn walk_fn_kind<'v, V: Visitor<'v>>(visitor: &mut V, function_kind: FnKind<'
625625
FnKind::ItemFn(_, generics, ..) => {
626626
visitor.visit_generics(generics);
627627
}
628-
FnKind::Method(_, sig, _, _) => {
628+
FnKind::Method(_, sig, ..) => {
629629
visitor.visit_generics(&sig.generics);
630630
}
631631
FnKind::Closure(_) => {}

src/librustc/hir/map/collector.rs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -109,7 +109,7 @@ impl<'ast> Visitor<'ast> for NodeCollector<'ast> {
109109
this.insert(struct_def.id(), NodeStructCtor(struct_def));
110110
}
111111
}
112-
ItemTrait(_, _, ref bounds, _) => {
112+
ItemTrait(.., ref bounds, _) => {
113113
for b in bounds.iter() {
114114
if let TraitTyParamBound(ref t, TraitBoundModifier::None) = *b {
115115
this.insert(t.trait_ref.ref_id, NodeItem(i));

src/librustc/hir/mod.rs

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -469,7 +469,7 @@ impl Pat {
469469
}
470470

471471
match self.node {
472-
PatKind::Binding(_, _, Some(ref p)) => p.walk_(it),
472+
PatKind::Binding(.., Some(ref p)) => p.walk_(it),
473473
PatKind::Struct(_, ref fields, _) => {
474474
fields.iter().all(|field| field.node.pat.walk_(it))
475475
}
@@ -486,7 +486,7 @@ impl Pat {
486486
}
487487
PatKind::Wild |
488488
PatKind::Lit(_) |
489-
PatKind::Range(_, _) |
489+
PatKind::Range(..) |
490490
PatKind::Binding(..) |
491491
PatKind::Path(..) => {
492492
true

src/librustc/hir/pat_util.rs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -53,7 +53,7 @@ impl<T: ExactSizeIterator> EnumerateAndAdjustIterator for T {
5353

5454
pub fn pat_is_refutable(dm: &DefMap, pat: &hir::Pat) -> bool {
5555
match pat.node {
56-
PatKind::Lit(_) | PatKind::Range(_, _) | PatKind::Path(Some(..), _) => true,
56+
PatKind::Lit(_) | PatKind::Range(..) | PatKind::Path(Some(..), _) => true,
5757
PatKind::TupleStruct(..) |
5858
PatKind::Path(..) |
5959
PatKind::Struct(..) => {

src/librustc/infer/error_reporting.rs

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -140,9 +140,9 @@ impl<'a, 'gcx, 'tcx> TyCtxt<'a, 'gcx, 'tcx> {
140140
Some(ast_map::NodeExpr(expr)) => match expr.node {
141141
hir::ExprCall(..) => "call",
142142
hir::ExprMethodCall(..) => "method call",
143-
hir::ExprMatch(_, _, hir::MatchSource::IfLetDesugar { .. }) => "if let",
144-
hir::ExprMatch(_, _, hir::MatchSource::WhileLetDesugar) => "while let",
145-
hir::ExprMatch(_, _, hir::MatchSource::ForLoopDesugar) => "for",
143+
hir::ExprMatch(.., hir::MatchSource::IfLetDesugar { .. }) => "if let",
144+
hir::ExprMatch(.., hir::MatchSource::WhileLetDesugar) => "while let",
145+
hir::ExprMatch(.., hir::MatchSource::ForLoopDesugar) => "for",
146146
hir::ExprMatch(..) => "match",
147147
_ => "expression",
148148
},

src/librustc/infer/higher_ranked/mod.rs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -684,7 +684,7 @@ impl<'a, 'gcx, 'tcx> InferCtxt<'a, 'gcx, 'tcx> {
684684
warnings.extend(
685685
match self.region_vars.var_origin(vid) {
686686
LateBoundRegion(_,
687-
ty::BrNamed(_, _, wc),
687+
ty::BrNamed(.., wc),
688688
_) => Some(wc),
689689
_ => None,
690690
});

src/librustc/infer/mod.rs

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -225,7 +225,7 @@ impl TypeOrigin {
225225
&TypeOrigin::RelateOutputImplTypes(_) |
226226
&TypeOrigin::ExprAssignable(_) => "mismatched types",
227227
&TypeOrigin::MethodCompatCheck(_) => "method not compatible with trait",
228-
&TypeOrigin::MatchExpressionArm(_, _, source) => match source {
228+
&TypeOrigin::MatchExpressionArm(.., source) => match source {
229229
hir::MatchSource::IfLetDesugar{..} => "`if let` arms have incompatible types",
230230
_ => "match arms have incompatible types",
231231
},
@@ -1712,7 +1712,7 @@ impl TypeOrigin {
17121712
TypeOrigin::ExprAssignable(span) => span,
17131713
TypeOrigin::Misc(span) => span,
17141714
TypeOrigin::RelateOutputImplTypes(span) => span,
1715-
TypeOrigin::MatchExpressionArm(match_span, _, _) => match_span,
1715+
TypeOrigin::MatchExpressionArm(match_span, ..) => match_span,
17161716
TypeOrigin::IfExpression(span) => span,
17171717
TypeOrigin::IfExpressionWithNoElse(span) => span,
17181718
TypeOrigin::RangeExpression(span) => span,
@@ -1765,7 +1765,7 @@ impl RegionVariableOrigin {
17651765
Autoref(a) => a,
17661766
Coercion(a) => a,
17671767
EarlyBoundRegion(a, _) => a,
1768-
LateBoundRegion(a, _, _) => a,
1768+
LateBoundRegion(a, ..) => a,
17691769
BoundRegionInCoherence(_) => syntax_pos::DUMMY_SP,
17701770
UpvarRegion(_, a) => a
17711771
}

0 commit comments

Comments
 (0)