diff options
| author | Vadim Petrochenkov <vadim.petrochenkov@gmail.com> | 2021-11-18 13:25:27 +0800 |
|---|---|---|
| committer | Vadim Petrochenkov <vadim.petrochenkov@gmail.com> | 2021-11-18 14:32:29 +0800 |
| commit | 91e02177a1f41aa4f3260fef40caef1fdaf3cc20 (patch) | |
| tree | b8fb248ea69ebf05437613542bea6ee745b8454d /compiler/rustc_resolve/src/late | |
| parent | 6414e0b5b308d3ae27da83c6a25098cc8aadc1a9 (diff) | |
| download | rust-91e02177a1f41aa4f3260fef40caef1fdaf3cc20.tar.gz rust-91e02177a1f41aa4f3260fef40caef1fdaf3cc20.zip | |
rustc: Remove `#[rustc_synthetic]`
This function parameter attribute was introduced in https://github.com/rust-lang/rust/pull/44866 as an intermediate step in implementing `impl Trait`, it's not necessary or used anywhere by itself.
Diffstat (limited to 'compiler/rustc_resolve/src/late')
| -rw-r--r-- | compiler/rustc_resolve/src/late/diagnostics.rs | 20 |
1 files changed, 8 insertions, 12 deletions
diff --git a/compiler/rustc_resolve/src/late/diagnostics.rs b/compiler/rustc_resolve/src/late/diagnostics.rs index 4acbb11b13f..d506931b516 100644 --- a/compiler/rustc_resolve/src/late/diagnostics.rs +++ b/compiler/rustc_resolve/src/late/diagnostics.rs @@ -1810,12 +1810,10 @@ impl<'tcx> LifetimeContext<'_, 'tcx> { 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, - } + hir::GenericParamKind::Type { synthetic: true, .. } + | hir::GenericParamKind::Lifetime { + kind: hir::LifetimeParamKind::Elided, + } ) }) { (param.span.shrink_to_lo(), format!("{}, ", lifetime_ref)) @@ -2042,12 +2040,10 @@ impl<'tcx> LifetimeContext<'_, 'tcx> { 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 - } + hir::GenericParamKind::Type { synthetic: true, .. } + | hir::GenericParamKind::Lifetime { + kind: hir::LifetimeParamKind::Elided + } ) }) { (param.span.shrink_to_lo(), "'a, ".to_string()) |
