@@ -199,7 +199,7 @@ impl LintPass for TypeLimits {
199
199
match lit. node {
200
200
ast:: LitInt ( v, ast:: SignedIntLit ( _, ast:: Plus ) ) |
201
201
ast:: LitInt ( v, ast:: UnsuffixedIntLit ( ast:: Plus ) ) => {
202
- let int_type = if let ast:: TyIs ( _ ) = t {
202
+ let int_type = if let ast:: TyIs = t {
203
203
cx. sess ( ) . target . int_type
204
204
} else {
205
205
t
@@ -218,7 +218,7 @@ impl LintPass for TypeLimits {
218
218
} ;
219
219
} ,
220
220
ty:: ty_uint( t) => {
221
- let uint_type = if let ast:: TyUs ( _ ) = t {
221
+ let uint_type = if let ast:: TyUs = t {
222
222
cx. sess ( ) . target . uint_type
223
223
} else {
224
224
t
@@ -283,7 +283,7 @@ impl LintPass for TypeLimits {
283
283
// warnings are consistent between 32- and 64-bit platforms
284
284
fn int_ty_range ( int_ty : ast:: IntTy ) -> ( i64 , i64 ) {
285
285
match int_ty {
286
- ast:: TyIs ( _ ) => ( i64:: MIN , i64:: MAX ) ,
286
+ ast:: TyIs => ( i64:: MIN , i64:: MAX ) ,
287
287
ast:: TyI8 => ( i8:: MIN as i64 , i8:: MAX as i64 ) ,
288
288
ast:: TyI16 => ( i16:: MIN as i64 , i16:: MAX as i64 ) ,
289
289
ast:: TyI32 => ( i32:: MIN as i64 , i32:: MAX as i64 ) ,
@@ -293,7 +293,7 @@ impl LintPass for TypeLimits {
293
293
294
294
fn uint_ty_range ( uint_ty : ast:: UintTy ) -> ( u64 , u64 ) {
295
295
match uint_ty {
296
- ast:: TyUs ( _ ) => ( u64:: MIN , u64:: MAX ) ,
296
+ ast:: TyUs => ( u64:: MIN , u64:: MAX ) ,
297
297
ast:: TyU8 => ( u8:: MIN as u64 , u8:: MAX as u64 ) ,
298
298
ast:: TyU16 => ( u16:: MIN as u64 , u16:: MAX as u64 ) ,
299
299
ast:: TyU32 => ( u32:: MIN as u64 , u32:: MAX as u64 ) ,
@@ -310,7 +310,7 @@ impl LintPass for TypeLimits {
310
310
311
311
fn int_ty_bits ( int_ty : ast:: IntTy , target_int_ty : ast:: IntTy ) -> u64 {
312
312
match int_ty {
313
- ast:: TyIs ( _ ) => int_ty_bits ( target_int_ty, target_int_ty) ,
313
+ ast:: TyIs => int_ty_bits ( target_int_ty, target_int_ty) ,
314
314
ast:: TyI8 => i8:: BITS as u64 ,
315
315
ast:: TyI16 => i16:: BITS as u64 ,
316
316
ast:: TyI32 => i32:: BITS as u64 ,
@@ -320,7 +320,7 @@ impl LintPass for TypeLimits {
320
320
321
321
fn uint_ty_bits ( uint_ty : ast:: UintTy , target_uint_ty : ast:: UintTy ) -> u64 {
322
322
match uint_ty {
323
- ast:: TyUs ( _ ) => uint_ty_bits ( target_uint_ty, target_uint_ty) ,
323
+ ast:: TyUs => uint_ty_bits ( target_uint_ty, target_uint_ty) ,
324
324
ast:: TyU8 => u8:: BITS as u64 ,
325
325
ast:: TyU16 => u16:: BITS as u64 ,
326
326
ast:: TyU32 => u32:: BITS as u64 ,
@@ -395,12 +395,12 @@ struct ImproperCTypesVisitor<'a, 'tcx: 'a> {
395
395
impl < ' a , ' tcx > ImproperCTypesVisitor < ' a , ' tcx > {
396
396
fn check_def ( & mut self , sp : Span , id : ast:: NodeId ) {
397
397
match self . cx . tcx . def_map . borrow ( ) . get ( & id) . unwrap ( ) . full_def ( ) {
398
- def:: DefPrimTy ( ast:: TyInt ( ast:: TyIs ( _ ) ) ) => {
398
+ def:: DefPrimTy ( ast:: TyInt ( ast:: TyIs ) ) => {
399
399
self . cx . span_lint ( IMPROPER_CTYPES , sp,
400
400
"found rust type `isize` in foreign module, while \
401
401
libc::c_int or libc::c_long should be used") ;
402
402
}
403
- def:: DefPrimTy ( ast:: TyUint ( ast:: TyUs ( _ ) ) ) => {
403
+ def:: DefPrimTy ( ast:: TyUint ( ast:: TyUs ) ) => {
404
404
self . cx . span_lint ( IMPROPER_CTYPES , sp,
405
405
"found rust type `usize` in foreign module, while \
406
406
libc::c_uint or libc::c_ulong should be used") ;
0 commit comments