@@ -1369,10 +1369,9 @@ impl TypeAliasBounds {
13691369 hir:: QPath :: TypeRelative ( ref ty, _) => {
13701370 // If this is a type variable, we found a `T::Assoc`.
13711371 match ty. kind {
1372- hir:: TyKind :: Path ( hir:: QPath :: Resolved ( None , ref path) ) => match path. res {
1373- Res :: Def ( DefKind :: TyParam , _) => true ,
1374- _ => false ,
1375- } ,
1372+ hir:: TyKind :: Path ( hir:: QPath :: Resolved ( None , ref path) ) => {
1373+ matches ! ( path. res, Res :: Def ( DefKind :: TyParam , _) )
1374+ }
13761375 _ => false ,
13771376 }
13781377 }
@@ -2381,10 +2380,9 @@ impl<'tcx> LateLintPass<'tcx> for InvalidValue {
23812380 return Some ( InitKind :: Zeroed ) ;
23822381 } else if cx. tcx . is_diagnostic_item ( sym:: mem_uninitialized, def_id) {
23832382 return Some ( InitKind :: Uninit ) ;
2384- } else if cx. tcx . is_diagnostic_item ( sym:: transmute, def_id) {
2385- if is_zero ( & args[ 0 ] ) {
2386- return Some ( InitKind :: Zeroed ) ;
2387- }
2383+ } else if cx. tcx . is_diagnostic_item ( sym:: transmute, def_id) && is_zero ( & args[ 0 ] )
2384+ {
2385+ return Some ( InitKind :: Zeroed ) ;
23882386 }
23892387 }
23902388 } else if let hir:: ExprKind :: MethodCall ( _, _, ref args, _) = expr. kind {
@@ -2880,7 +2878,7 @@ impl<'tcx> LateLintPass<'tcx> for ClashingExternDeclarations {
28802878 fn check_foreign_item ( & mut self , cx : & LateContext < ' tcx > , this_fi : & hir:: ForeignItem < ' _ > ) {
28812879 trace ! ( "ClashingExternDeclarations: check_foreign_item: {:?}" , this_fi) ;
28822880 if let ForeignItemKind :: Fn ( ..) = this_fi. kind {
2883- let tcx = * & cx. tcx ;
2881+ let tcx = cx. tcx ;
28842882 if let Some ( existing_hid) = self . insert ( tcx, this_fi) {
28852883 let existing_decl_ty = tcx. type_of ( tcx. hir ( ) . local_def_id ( existing_hid) ) ;
28862884 let this_decl_ty = tcx. type_of ( tcx. hir ( ) . local_def_id ( this_fi. hir_id ) ) ;
0 commit comments