Skip to content

Commit 6f7e51e

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

File tree

50 files changed

+117
-103
lines changed

Some content is hidden

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

50 files changed

+117
-103
lines changed

src/librustc/hir/def.rs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -124,7 +124,7 @@ impl Def {
124124
Def::Variant(_, id) | Def::Enum(id) | Def::TyAlias(id) | Def::AssociatedTy(_, id) |
125125
Def::TyParam(id) | Def::Struct(id) | Def::Union(id) | Def::Trait(id) |
126126
Def::Method(id) | Def::Const(id) | Def::AssociatedConst(id) |
127-
Def::Local(id, _) | Def::Upvar(id, _, _, _) => {
127+
Def::Local(id, _) | Def::Upvar(id, ..) => {
128128
id
129129
}
130130

src/librustc/hir/intravisit.rs

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -49,8 +49,8 @@ pub enum FnKind<'a> {
4949
impl<'a> FnKind<'a> {
5050
pub fn attrs(&self) -> &'a [Attribute] {
5151
match *self {
52-
FnKind::ItemFn(_, _, _, _, _, _, attrs) => attrs,
53-
FnKind::Method(_, _, _, attrs) => attrs,
52+
FnKind::ItemFn(.., attrs) => attrs,
53+
FnKind::Method(.., attrs) => attrs,
5454
FnKind::Closure(attrs) => attrs,
5555
}
5656
}
@@ -622,7 +622,7 @@ pub fn walk_fn_decl_nopat<'v, V: Visitor<'v>>(visitor: &mut V, function_declarat
622622

623623
pub fn walk_fn_kind<'v, V: Visitor<'v>>(visitor: &mut V, function_kind: FnKind<'v>) {
624624
match function_kind {
625-
FnKind::ItemFn(_, generics, _, _, _, _, _) => {
625+
FnKind::ItemFn(_, generics, ..) => {
626626
visitor.visit_generics(generics);
627627
}
628628
FnKind::Method(_, sig, _, _) => {

src/librustc/hir/pat_util.rs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -62,7 +62,7 @@ pub fn pat_is_refutable(dm: &DefMap, pat: &hir::Pat) -> bool {
6262
_ => false
6363
}
6464
}
65-
PatKind::Vec(_, _, _) => true,
65+
PatKind::Vec(..) => true,
6666
_ => false
6767
}
6868
}

src/librustc/infer/error_reporting.rs

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1787,7 +1787,7 @@ fn lifetimes_in_scope<'a, 'gcx, 'tcx>(tcx: TyCtxt<'a, 'gcx, 'tcx>,
17871787
let method_id_opt = match tcx.map.find(parent) {
17881788
Some(node) => match node {
17891789
ast_map::NodeItem(item) => match item.node {
1790-
hir::ItemFn(_, _, _, _, ref gen, _) => {
1790+
hir::ItemFn(.., ref gen, _) => {
17911791
taken.extend_from_slice(&gen.lifetimes);
17921792
None
17931793
},
@@ -1811,7 +1811,7 @@ fn lifetimes_in_scope<'a, 'gcx, 'tcx>(tcx: TyCtxt<'a, 'gcx, 'tcx>,
18111811
if let Some(node) = tcx.map.find(parent) {
18121812
match node {
18131813
ast_map::NodeItem(item) => match item.node {
1814-
hir::ItemImpl(_, _, ref gen, _, _, _) => {
1814+
hir::ItemImpl(_, _, ref gen, ..) => {
18151815
taken.extend_from_slice(&gen.lifetimes);
18161816
}
18171817
_ => ()

src/librustc/infer/mod.rs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -248,7 +248,7 @@ impl TypeOrigin {
248248
&TypeOrigin::RelateOutputImplTypes(_) => {
249249
"trait type parameters matches those specified on the impl"
250250
}
251-
&TypeOrigin::MatchExpressionArm(_, _, _) => "match arms have compatible types",
251+
&TypeOrigin::MatchExpressionArm(..) => "match arms have compatible types",
252252
&TypeOrigin::IfExpression(_) => "if and else have compatible types",
253253
&TypeOrigin::IfExpressionWithNoElse(_) => "if missing an else returns ()",
254254
&TypeOrigin::RangeExpression(_) => "start and end of range have compatible types",

src/librustc/lib.rs

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -30,6 +30,7 @@
3030
#![feature(conservative_impl_trait)]
3131
#![feature(const_fn)]
3232
#![feature(core_intrinsics)]
33+
#![feature(dotdot_in_tuple_patterns)]
3334
#![feature(enumset)]
3435
#![feature(libc)]
3536
#![feature(nonzero)]

src/librustc/middle/dead.rs

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -344,7 +344,7 @@ impl<'v> Visitor<'v> for LifeSeeder {
344344
self.worklist.extend(enum_def.variants.iter()
345345
.map(|variant| variant.node.data.id()));
346346
}
347-
hir::ItemTrait(_, _, _, ref trait_items) => {
347+
hir::ItemTrait(.., ref trait_items) => {
348348
for trait_item in trait_items {
349349
match trait_item.node {
350350
hir::ConstTraitItem(_, Some(_)) |
@@ -357,7 +357,7 @@ impl<'v> Visitor<'v> for LifeSeeder {
357357
}
358358
}
359359
}
360-
hir::ItemImpl(_, _, _, ref opt_trait, _, ref impl_items) => {
360+
hir::ItemImpl(.., ref opt_trait, _, ref impl_items) => {
361361
for impl_item in impl_items {
362362
if opt_trait.is_some() ||
363363
has_allow_dead_code_or_lang_attr(&impl_item.attrs) {

src/librustc/middle/effect.rs

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -83,7 +83,7 @@ impl<'a, 'tcx, 'v> Visitor<'v> for EffectCheckVisitor<'a, 'tcx> {
8383
block: &'v hir::Block, span: Span, id: ast::NodeId) {
8484

8585
let (is_item_fn, is_unsafe_fn) = match fn_kind {
86-
FnKind::ItemFn(_, _, unsafety, _, _, _, _) =>
86+
FnKind::ItemFn(_, _, unsafety, ..) =>
8787
(true, unsafety == hir::Unsafety::Unsafe),
8888
FnKind::Method(_, sig, _, _) =>
8989
(true, sig.unsafety == hir::Unsafety::Unsafe),
@@ -143,7 +143,7 @@ impl<'a, 'tcx, 'v> Visitor<'v> for EffectCheckVisitor<'a, 'tcx> {
143143

144144
fn visit_expr(&mut self, expr: &hir::Expr) {
145145
match expr.node {
146-
hir::ExprMethodCall(_, _, _) => {
146+
hir::ExprMethodCall(..) => {
147147
let method_call = MethodCall::expr(expr.id);
148148
let base_type = self.tcx.tables.borrow().method_map[&method_call].ty;
149149
debug!("effect: method call case, base type is {:?}",

src/librustc/middle/expr_use_visitor.rs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -544,7 +544,7 @@ impl<'a, 'gcx, 'tcx> ExprUseVisitor<'a, 'gcx, 'tcx> {
544544
self.consume_expr(&count);
545545
}
546546

547-
hir::ExprClosure(_, _, _, fn_decl_span) => {
547+
hir::ExprClosure(.., fn_decl_span) => {
548548
self.walk_captures(expr, fn_decl_span)
549549
}
550550

src/librustc/middle/reachable.rs

Lines changed: 7 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -46,8 +46,8 @@ fn item_might_be_inlined(item: &hir::Item) -> bool {
4646
}
4747

4848
match item.node {
49-
hir::ItemImpl(_, _, ref generics, _, _, _) |
50-
hir::ItemFn(_, _, _, _, ref generics, _) => {
49+
hir::ItemImpl(_, _, ref generics, ..) |
50+
hir::ItemFn(.., ref generics, _) => {
5151
generics_require_inlining(generics)
5252
}
5353
_ => false,
@@ -187,7 +187,7 @@ impl<'a, 'tcx> ReachableContext<'a, 'tcx> {
187187
// does too.
188188
let impl_node_id = self.tcx.map.as_local_node_id(impl_did).unwrap();
189189
match self.tcx.map.expect_item(impl_node_id).node {
190-
hir::ItemImpl(_, _, ref generics, _, _, _) => {
190+
hir::ItemImpl(_, _, ref generics, ..) => {
191191
generics_require_inlining(generics)
192192
}
193193
_ => false
@@ -226,7 +226,7 @@ impl<'a, 'tcx> ReachableContext<'a, 'tcx> {
226226
// If we are building an executable, only explicitly extern
227227
// types need to be exported.
228228
if let ast_map::NodeItem(item) = *node {
229-
let reachable = if let hir::ItemFn(_, _, _, abi, _, _) = item.node {
229+
let reachable = if let hir::ItemFn(.., abi, _, _) = item.node {
230230
abi != Abi::Rust
231231
} else {
232232
false
@@ -248,7 +248,7 @@ impl<'a, 'tcx> ReachableContext<'a, 'tcx> {
248248
match *node {
249249
ast_map::NodeItem(item) => {
250250
match item.node {
251-
hir::ItemFn(_, _, _, _, _, ref search_block) => {
251+
hir::ItemFn(.., ref search_block) => {
252252
if item_might_be_inlined(&item) {
253253
intravisit::walk_block(self, &search_block)
254254
}
@@ -265,7 +265,7 @@ impl<'a, 'tcx> ReachableContext<'a, 'tcx> {
265265
// inherently and their children are already in the
266266
// worklist, as determined by the privacy pass
267267
hir::ItemExternCrate(_) | hir::ItemUse(_) |
268-
hir::ItemTy(..) | hir::ItemStatic(_, _, _) |
268+
hir::ItemTy(..) | hir::ItemStatic(..) |
269269
hir::ItemMod(..) | hir::ItemForeignMod(..) |
270270
hir::ItemImpl(..) | hir::ItemTrait(..) |
271271
hir::ItemStruct(..) | hir::ItemEnum(..) |
@@ -329,7 +329,7 @@ struct CollectPrivateImplItemsVisitor<'a> {
329329
impl<'a, 'v> Visitor<'v> for CollectPrivateImplItemsVisitor<'a> {
330330
fn visit_item(&mut self, item: &hir::Item) {
331331
// We need only trait impls here, not inherent impls, and only non-exported ones
332-
if let hir::ItemImpl(_, _, _, Some(_), _, ref impl_items) = item.node {
332+
if let hir::ItemImpl(.., Some(_), _, ref impl_items) = item.node {
333333
if !self.access_levels.is_reachable(item.id) {
334334
for impl_item in impl_items {
335335
self.worklist.push(impl_item.id);

0 commit comments

Comments
 (0)