.attrs
.iter()
.filter(|attr| self.sess.check_name(attr, sym::rustc_synthetic))
- .map(|_| hir::SyntheticTyParamKind::ImplTrait)
+ .map(|_| hir::SyntheticTyParamKind::Rustc)
.next(),
};
#[derive(HashStable_Generic)]
pub enum SyntheticTyParamKind {
ImplTrait,
+ // Created by the `#[rustc_synthetic]` attribute.
+ Rustc,
}
/// A where-clause in a definition.
let explicit = !seg.infer_args;
let impl_trait = generics.params.iter().any(|param| match param.kind {
ty::GenericParamDefKind::Type {
- synthetic: Some(hir::SyntheticTyParamKind::ImplTrait),
+ synthetic:
+ Some(hir::SyntheticTyParamKind::ImplTrait | hir::SyntheticTyParamKind::Rustc),
..
} => true,
_ => false,