@@ -60,7 +60,7 @@ pub(crate) fn krate(cx: &mut DocContext<'_>) -> Crate {
60
60
let primitives = local_crate. primitives ( cx. tcx ) ;
61
61
let keywords = local_crate. keywords ( cx. tcx ) ;
62
62
{
63
- let ItemKind :: ModuleItem ( ref mut m) = & mut module. inner . kind else { unreachable ! ( ) } ;
63
+ let ItemKind :: ModuleItem ( m) = & mut module. inner . kind else { unreachable ! ( ) } ;
64
64
m. items . extend ( primitives. iter ( ) . map ( |& ( def_id, prim) | {
65
65
Item :: from_def_id_and_parts (
66
66
def_id,
@@ -302,7 +302,7 @@ pub(crate) fn name_from_pat(p: &hir::Pat<'_>) -> Symbol {
302
302
use rustc_hir:: * ;
303
303
debug ! ( "trying to get a name from pattern: {p:?}" ) ;
304
304
305
- Symbol :: intern ( & match p. kind {
305
+ Symbol :: intern ( & match & p. kind {
306
306
// FIXME(never_patterns): does this make sense?
307
307
PatKind :: Wild
308
308
| PatKind :: Err ( _)
@@ -313,8 +313,9 @@ pub(crate) fn name_from_pat(p: &hir::Pat<'_>) -> Symbol {
313
313
}
314
314
PatKind :: Binding ( _, _, ident, _) => return ident. name ,
315
315
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
+ }
318
319
PatKind :: Or ( pats) => {
319
320
fmt:: from_fn ( |f| pats. iter ( ) . map ( |p| name_from_pat ( p) ) . joined ( " | " , f) ) . to_string ( )
320
321
}
@@ -329,7 +330,7 @@ pub(crate) fn name_from_pat(p: &hir::Pat<'_>) -> Symbol {
329
330
return Symbol :: intern ( "()" ) ;
330
331
}
331
332
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 {
333
334
fmt:: from_fn ( move |f| {
334
335
if wild {
335
336
f. write_str ( ".." ) ?;
@@ -493,7 +494,7 @@ pub(crate) fn resolve_type(cx: &mut DocContext<'_>, path: Path) -> Type {
493
494
pub ( crate ) fn synthesize_auto_trait_and_blanket_impls (
494
495
cx : & mut DocContext < ' _ > ,
495
496
item_def_id : DefId ,
496
- ) -> impl Iterator < Item = Item > {
497
+ ) -> impl Iterator < Item = Item > + use < > {
497
498
let auto_impls = cx
498
499
. sess ( )
499
500
. prof
0 commit comments