@@ -181,7 +181,7 @@ impl LateLintPass for TypeLimits {
181
181
return ;
182
182
}
183
183
}
184
- _ => panic ! ( )
184
+ _ => bug ! ( )
185
185
} ;
186
186
} ,
187
187
ty:: TyUint ( t) => {
@@ -195,7 +195,7 @@ impl LateLintPass for TypeLimits {
195
195
// _v is u8, within range by definition
196
196
ast:: LitKind :: Byte ( _v) => return ,
197
197
ast:: LitKind :: Int ( v, _) => v,
198
- _ => panic ! ( )
198
+ _ => bug ! ( )
199
199
} ;
200
200
if lit_val < min || lit_val > max {
201
201
cx. span_lint ( OVERFLOWING_LITERALS , e. span ,
@@ -212,7 +212,7 @@ impl LateLintPass for TypeLimits {
212
212
Err ( _) => return
213
213
}
214
214
}
215
- _ => panic ! ( )
215
+ _ => bug ! ( )
216
216
} ;
217
217
if lit_val < min || lit_val > max {
218
218
cx. span_lint ( OVERFLOWING_LITERALS , e. span ,
@@ -233,7 +233,7 @@ impl LateLintPass for TypeLimits {
233
233
hir:: BiGt => v >= min && v < max,
234
234
hir:: BiGe => v > min && v <= max,
235
235
hir:: BiEq | hir:: BiNe => v >= min && v <= max,
236
- _ => panic ! ( )
236
+ _ => bug ! ( )
237
237
}
238
238
}
239
239
@@ -319,7 +319,7 @@ impl LateLintPass for TypeLimits {
319
319
ast:: LitKind :: Int ( v, ast:: LitIntType :: Unsuffixed ) => v as i64 ,
320
320
_ => return true
321
321
} ,
322
- _ => panic ! ( )
322
+ _ => bug ! ( )
323
323
} ;
324
324
is_valid ( norm_binop, lit_val, min, max)
325
325
}
@@ -330,7 +330,7 @@ impl LateLintPass for TypeLimits {
330
330
ast:: LitKind :: Int ( v, _) => v,
331
331
_ => return true
332
332
} ,
333
- _ => panic ! ( )
333
+ _ => bug ! ( )
334
334
} ;
335
335
is_valid ( norm_binop, lit_val, min, max)
336
336
}
@@ -589,7 +589,7 @@ impl<'a, 'tcx> ImproperCTypesVisitor<'a, 'tcx> {
589
589
ty:: TyParam ( ..) | ty:: TyInfer ( ..) | ty:: TyError |
590
590
ty:: TyClosure ( ..) | ty:: TyProjection ( ..) |
591
591
ty:: TyFnDef ( ..) => {
592
- panic ! ( "Unexpected type in foreign function" )
592
+ bug ! ( "Unexpected type in foreign function" )
593
593
}
594
594
}
595
595
}
0 commit comments