@@ -258,7 +258,7 @@ impl<'a, 'tcx, 'v> Visitor<'v> for EmbargoVisitor<'a, 'tcx> {
258
258
// * Private trait impls for private types can be completely ignored
259
259
ast:: ItemImpl ( _, _, _, _, ref ty, ref impl_items) => {
260
260
let public_ty = match ty. node {
261
- ast:: TyPath ( _ ) => {
261
+ ast:: TyPath ( .. ) => {
262
262
match self . tcx . def_map . borrow ( ) [ ty. id ] . full_def ( ) {
263
263
def:: DefPrimTy ( ..) => true ,
264
264
def => {
@@ -325,7 +325,7 @@ impl<'a, 'tcx, 'v> Visitor<'v> for EmbargoVisitor<'a, 'tcx> {
325
325
}
326
326
327
327
ast:: ItemTy ( ref ty, _) if public_first => {
328
- if let ast:: TyPath ( _ ) = ty. node {
328
+ if let ast:: TyPath ( .. ) = ty. node {
329
329
match self . tcx . def_map . borrow ( ) [ ty. id ] . full_def ( ) {
330
330
def:: DefPrimTy ( ..) | def:: DefTyParam ( ..) => { } ,
331
331
def => {
@@ -627,7 +627,7 @@ impl<'a, 'tcx> PrivacyVisitor<'a, 'tcx> {
627
627
// was private.
628
628
ast:: ItemImpl ( _, _, _, _, ref ty, _) => {
629
629
match ty. node {
630
- ast:: TyPath ( _ ) => { }
630
+ ast:: TyPath ( .. ) => { }
631
631
_ => return Some ( ( err_span, err_msg, None ) ) ,
632
632
} ;
633
633
let def = self . tcx . def_map . borrow ( ) [ ty. id ] . full_def ( ) ;
@@ -908,7 +908,7 @@ impl<'a, 'tcx, 'v> Visitor<'v> for PrivacyVisitor<'a, 'tcx> {
908
908
struct type?!") ,
909
909
}
910
910
}
911
- ast:: ExprPath ( _ ) | ast :: ExprQPath ( _ ) => {
911
+ ast:: ExprPath ( .. ) => {
912
912
let guard = |did : ast:: DefId | {
913
913
let fields = ty:: lookup_struct_fields ( self . tcx , did) ;
914
914
let any_priv = fields. iter ( ) . any ( |f| {
@@ -1254,7 +1254,7 @@ impl<'a, 'tcx> VisiblePrivateTypesVisitor<'a, 'tcx> {
1254
1254
1255
1255
impl < ' a , ' b , ' tcx , ' v > Visitor < ' v > for CheckTypeForPrivatenessVisitor < ' a , ' b , ' tcx > {
1256
1256
fn visit_ty ( & mut self , ty : & ast:: Ty ) {
1257
- if let ast:: TyPath ( _ ) = ty. node {
1257
+ if let ast:: TyPath ( .. ) = ty. node {
1258
1258
if self . inner . path_is_private_type ( ty. id ) {
1259
1259
self . contains_private = true ;
1260
1260
// found what we're looking for so let's stop
@@ -1460,7 +1460,7 @@ impl<'a, 'tcx, 'v> Visitor<'v> for VisiblePrivateTypesVisitor<'a, 'tcx> {
1460
1460
}
1461
1461
1462
1462
fn visit_ty ( & mut self , t : & ast:: Ty ) {
1463
- if let ast:: TyPath ( ref p) = t. node {
1463
+ if let ast:: TyPath ( _ , ref p) = t. node {
1464
1464
if !self . tcx . sess . features . borrow ( ) . visible_private_types &&
1465
1465
self . path_is_private_type ( t. id ) {
1466
1466
self . tcx . sess . span_err ( p. span ,
0 commit comments