split SyntheticTyParamKind
This commit is contained in:
parent
f865e3d22f
commit
236689d6eb
@ -2210,7 +2210,7 @@ impl<'a, 'hir> LoweringContext<'a, 'hir> {
|
||||
.attrs
|
||||
.iter()
|
||||
.filter(|attr| self.sess.check_name(attr, sym::rustc_synthetic))
|
||||
.map(|_| hir::SyntheticTyParamKind::ImplTrait)
|
||||
.map(|_| hir::SyntheticTyParamKind::Rustc)
|
||||
.next(),
|
||||
};
|
||||
|
||||
|
@ -508,6 +508,8 @@ impl Generics<'hir> {
|
||||
#[derive(HashStable_Generic)]
|
||||
pub enum SyntheticTyParamKind {
|
||||
ImplTrait,
|
||||
// Created by the `#[rustc_synthetic]` attribute.
|
||||
Rustc,
|
||||
}
|
||||
|
||||
/// A where-clause in a definition.
|
||||
|
@ -550,7 +550,8 @@ impl<'o, 'tcx> dyn AstConv<'tcx> + 'o {
|
||||
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,
|
||||
|
Loading…
Reference in New Issue
Block a user