@@ -60,7 +60,7 @@ pub(crate) fn krate(cx: &mut DocContext<'_>) -> Crate {
6060 let primitives = local_crate. primitives ( cx. tcx ) ;
6161 let keywords = local_crate. keywords ( cx. tcx ) ;
6262 {
63- let ItemKind :: ModuleItem ( ref mut m) = & mut module. inner . kind else { unreachable ! ( ) } ;
63+ let ItemKind :: ModuleItem ( m) = & mut module. inner . kind else { unreachable ! ( ) } ;
6464 m. items . extend ( primitives. iter ( ) . map ( |& ( def_id, prim) | {
6565 Item :: from_def_id_and_parts (
6666 def_id,
@@ -302,7 +302,7 @@ pub(crate) fn name_from_pat(p: &hir::Pat<'_>) -> Symbol {
302302 use rustc_hir:: * ;
303303 debug ! ( "trying to get a name from pattern: {p:?}" ) ;
304304
305- Symbol :: intern ( & match p. kind {
305+ Symbol :: intern ( & match & p. kind {
306306 // FIXME(never_patterns): does this make sense?
307307 PatKind :: Wild
308308 | PatKind :: Err ( _)
@@ -313,8 +313,9 @@ pub(crate) fn name_from_pat(p: &hir::Pat<'_>) -> Symbol {
313313 }
314314 PatKind :: Binding ( _, _, ident, _) => return ident. name ,
315315 PatKind :: Box ( p) | PatKind :: Ref ( p, _) | PatKind :: Guard ( p, _) => return name_from_pat ( p) ,
316- PatKind :: TupleStruct ( ref p, ..)
317- | PatKind :: Expr ( PatExpr { kind : PatExprKind :: Path ( ref p) , .. } ) => qpath_to_string ( p) ,
316+ PatKind :: TupleStruct ( p, ..) | PatKind :: Expr ( PatExpr { kind : PatExprKind :: Path ( p) , .. } ) => {
317+ qpath_to_string ( p)
318+ }
318319 PatKind :: Or ( pats) => {
319320 fmt:: from_fn ( |f| pats. iter ( ) . map ( |p| name_from_pat ( p) ) . joined ( " | " , f) ) . to_string ( )
320321 }
@@ -329,7 +330,7 @@ pub(crate) fn name_from_pat(p: &hir::Pat<'_>) -> Symbol {
329330 return Symbol :: intern ( "()" ) ;
330331 }
331332 PatKind :: Slice ( begin, mid, end) => {
332- fn print_pat < ' a > ( pat : & ' a Pat < ' a > , wild : bool ) -> impl Display + ' a {
333+ fn print_pat ( pat : & Pat < ' _ > , wild : bool ) -> impl Display {
333334 fmt:: from_fn ( move |f| {
334335 if wild {
335336 f. write_str ( ".." ) ?;
@@ -493,7 +494,7 @@ pub(crate) fn resolve_type(cx: &mut DocContext<'_>, path: Path) -> Type {
493494pub ( crate ) fn synthesize_auto_trait_and_blanket_impls (
494495 cx : & mut DocContext < ' _ > ,
495496 item_def_id : DefId ,
496- ) -> impl Iterator < Item = Item > {
497+ ) -> impl Iterator < Item = Item > + use < > {
497498 let auto_impls = cx
498499 . sess ( )
499500 . prof
0 commit comments