diff options
| author | bors <bors@rust-lang.org> | 2022-09-08 13:11:57 +0000 |
|---|---|---|
| committer | bors <bors@rust-lang.org> | 2022-09-08 13:11:57 +0000 |
| commit | 24d69920201563f0ee7b530f1cda0f171b205cc2 (patch) | |
| tree | 2071fdf41cd4126e7e1c4ed82e5c37f7fd0f17cd /src/librustdoc | |
| parent | ccb5595df2ed412eda6444edc7eaf06f709fa79d (diff) | |
| parent | e67f39f8bcb12dc4c985abe922d78c0daad7e5cd (diff) | |
Auto merge of #101467 - nnethercote:shrink-hir-Ty-Pat, r=spastorino
Shrink `hir::Ty` and `hir::Pat` r? `@ghost`
Diffstat (limited to 'src/librustdoc')
| -rw-r--r-- | src/librustdoc/clean/mod.rs | 6 |
1 files changed, 3 insertions, 3 deletions
diff --git a/src/librustdoc/clean/mod.rs b/src/librustdoc/clean/mod.rs index c2baea839f6..66f766bfbe8 100644 --- a/src/librustdoc/clean/mod.rs +++ b/src/librustdoc/clean/mod.rs @@ -190,7 +190,7 @@ fn clean_poly_trait_ref_with_bindings<'tcx>( ) } -fn clean_lifetime<'tcx>(lifetime: hir::Lifetime, cx: &mut DocContext<'tcx>) -> Lifetime { +fn clean_lifetime<'tcx>(lifetime: &hir::Lifetime, cx: &mut DocContext<'tcx>) -> Lifetime { let def = cx.tcx.named_region(lifetime.hir_id); if let Some( rl::Region::EarlyBound(node_id) @@ -495,7 +495,7 @@ fn clean_generic_param<'tcx>( .filter(|bp| !bp.in_where_clause) .flat_map(|bp| bp.bounds) .map(|bound| match bound { - hir::GenericBound::Outlives(lt) => clean_lifetime(*lt, cx), + hir::GenericBound::Outlives(lt) => clean_lifetime(lt, cx), _ => panic!(), }) .collect() @@ -1392,7 +1392,7 @@ fn maybe_expand_private_type_alias<'tcx>( } _ => None, }); - if let Some(lt) = lifetime.cloned() { + if let Some(lt) = lifetime { let lt_def_id = cx.tcx.hir().local_def_id(param.hir_id); let cleaned = if !lt.is_elided() { clean_lifetime(lt, cx) } else { Lifetime::elided() }; |
