@@ -421,7 +421,7 @@ fn check_fn_args<'cx, 'tcx: 'cx>(
421421 if let ty:: Ref ( _, ty, mutability) = * ty. kind( ) ;
422422 if let ty:: Adt ( adt, substs) = * ty. kind( ) ;
423423
424- if let TyKind :: Rptr ( lt, ref ty) = hir_ty. kind;
424+ if let TyKind :: Ref ( lt, ref ty) = hir_ty. kind;
425425 if let TyKind :: Path ( QPath :: Resolved ( None , path) ) = ty. ty. kind;
426426
427427 // Check that the name as typed matches the actual name of the type.
@@ -503,14 +503,14 @@ fn check_fn_args<'cx, 'tcx: 'cx>(
503503
504504fn check_mut_from_ref < ' tcx > ( cx : & LateContext < ' tcx > , sig : & FnSig < ' _ > , body : Option < & ' tcx Body < ' _ > > ) {
505505 if let FnRetTy :: Return ( ty) = sig. decl . output
506- && let Some ( ( out, Mutability :: Mut , _) ) = get_rptr_lm ( ty)
506+ && let Some ( ( out, Mutability :: Mut , _) ) = get_ref_lm ( ty)
507507 {
508508 let out_region = cx. tcx . named_region ( out. hir_id ) ;
509509 let args: Option < Vec < _ > > = sig
510510 . decl
511511 . inputs
512512 . iter ( )
513- . filter_map ( get_rptr_lm )
513+ . filter_map ( get_ref_lm )
514514 . filter ( |& ( lt, _, _) | cx. tcx . named_region ( lt. hir_id ) == out_region)
515515 . map ( |( _, mutability, span) | ( mutability == Mutability :: Not ) . then_some ( span) )
516516 . collect ( ) ;
@@ -704,8 +704,8 @@ fn matches_preds<'tcx>(
704704 } )
705705}
706706
707- fn get_rptr_lm < ' tcx > ( ty : & ' tcx hir:: Ty < ' tcx > ) -> Option < ( & ' tcx Lifetime , Mutability , Span ) > {
708- if let TyKind :: Rptr ( lt, ref m) = ty. kind {
707+ fn get_ref_lm < ' tcx > ( ty : & ' tcx hir:: Ty < ' tcx > ) -> Option < ( & ' tcx Lifetime , Mutability , Span ) > {
708+ if let TyKind :: Ref ( lt, ref m) = ty. kind {
709709 Some ( ( lt, m. mutbl , ty. span ) )
710710 } else {
711711 None
0 commit comments