Auto merge of #80843 - Mark-Simulacrum:fmt-bump, r=petrochenkov
Bump rustfmt version
This commit is contained in:
commit
b81f5811f9
30 changed files with 224 additions and 164 deletions
|
@ -1659,12 +1659,15 @@ impl<'tcx> LifetimeContext<'_, 'tcx> {
|
|||
match missing {
|
||||
MissingLifetimeSpot::Generics(generics) => {
|
||||
let (span, sugg) = if let Some(param) = generics.params.iter().find(|p| {
|
||||
!matches!(p.kind, hir::GenericParamKind::Type {
|
||||
synthetic: Some(hir::SyntheticTyParamKind::ImplTrait),
|
||||
..
|
||||
} | hir::GenericParamKind::Lifetime {
|
||||
kind: hir::LifetimeParamKind::Elided,
|
||||
})
|
||||
!matches!(
|
||||
p.kind,
|
||||
hir::GenericParamKind::Type {
|
||||
synthetic: Some(hir::SyntheticTyParamKind::ImplTrait),
|
||||
..
|
||||
} | hir::GenericParamKind::Lifetime {
|
||||
kind: hir::LifetimeParamKind::Elided,
|
||||
}
|
||||
)
|
||||
}) {
|
||||
(param.span.shrink_to_lo(), format!("{}, ", lifetime_ref))
|
||||
} else {
|
||||
|
@ -1844,10 +1847,13 @@ impl<'tcx> LifetimeContext<'_, 'tcx> {
|
|||
msg = "consider introducing a named lifetime parameter".to_string();
|
||||
should_break = true;
|
||||
if let Some(param) = generics.params.iter().find(|p| {
|
||||
!matches!(p.kind, hir::GenericParamKind::Type {
|
||||
synthetic: Some(hir::SyntheticTyParamKind::ImplTrait),
|
||||
..
|
||||
})
|
||||
!matches!(
|
||||
p.kind,
|
||||
hir::GenericParamKind::Type {
|
||||
synthetic: Some(hir::SyntheticTyParamKind::ImplTrait),
|
||||
..
|
||||
}
|
||||
)
|
||||
}) {
|
||||
(param.span.shrink_to_lo(), "'a, ".to_string())
|
||||
} else {
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue