1
Fork 0

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.
This commit is contained in:
Vadim Petrochenkov 2021-11-18 13:25:27 +08:00
parent 6414e0b5b3
commit 91e02177a1
17 changed files with 37 additions and 163 deletions

View file

@ -1338,10 +1338,7 @@ impl<'a, 'hir> LoweringContext<'a, 'hir> {
pure_wrt_drop: false,
bounds: hir_bounds,
span: self.lower_span(span),
kind: hir::GenericParamKind::Type {
default: None,
synthetic: Some(hir::SyntheticTyParamKind::ImplTrait),
},
kind: hir::GenericParamKind::Type { default: None, synthetic: true },
});
hir::TyKind::Path(hir::QPath::Resolved(
@ -1954,12 +1951,7 @@ impl<'a, 'hir> LoweringContext<'a, 'hir> {
default: default.as_ref().map(|x| {
self.lower_ty(x, ImplTraitContext::Disallowed(ImplTraitPosition::Other))
}),
synthetic: param
.attrs
.iter()
.filter(|attr| attr.has_name(sym::rustc_synthetic))
.map(|_| hir::SyntheticTyParamKind::FromAttr)
.next(),
synthetic: false,
};
(hir::ParamName::Plain(self.lower_ident(param.ident)), kind)