diff options
| author | Yuki Okushi <jtitor@2k36.org> | 2021-11-19 02:22:59 +0900 |
|---|---|---|
| committer | GitHub <noreply@github.com> | 2021-11-19 02:22:59 +0900 |
| commit | 08c1639fd933d56d1b5e386eea887f5bbf3e93f1 (patch) | |
| tree | ba516584343a7a1df0e12bb9b5e1feeaf85a8f6d /src/librustdoc | |
| parent | dfbbb3b90092817c4602b80bc48cfce5c8927305 (diff) | |
| parent | 91e02177a1f41aa4f3260fef40caef1fdaf3cc20 (diff) | |
Rollup merge of #91002 - petrochenkov:nosynth, r=davidtwco
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. Noticed while reviewing https://github.com/rust-lang/rust/pull/90947.
Diffstat (limited to 'src/librustdoc')
| -rw-r--r-- | src/librustdoc/clean/mod.rs | 6 | ||||
| -rw-r--r-- | src/librustdoc/clean/types.rs | 19 |
2 files changed, 6 insertions, 19 deletions
diff --git a/src/librustdoc/clean/mod.rs b/src/librustdoc/clean/mod.rs index 5ca532198f4..959dc545337 100644 --- a/src/librustdoc/clean/mod.rs +++ b/src/librustdoc/clean/mod.rs @@ -459,9 +459,7 @@ impl Clean<Generics> for hir::Generics<'_> { // scans them first. fn is_impl_trait(param: &hir::GenericParam<'_>) -> bool { match param.kind { - hir::GenericParamKind::Type { synthetic, .. } => { - synthetic == Some(hir::SyntheticTyParamKind::ImplTrait) - } + hir::GenericParamKind::Type { synthetic, .. } => synthetic, _ => false, } } @@ -560,7 +558,7 @@ impl<'a, 'tcx> Clean<Generics> for (&'a ty::Generics, ty::GenericPredicates<'tcx assert_eq!(param.index, 0); return None; } - if synthetic == Some(hir::SyntheticTyParamKind::ImplTrait) { + if synthetic { impl_trait.insert(param.index.into(), vec![]); return None; } diff --git a/src/librustdoc/clean/types.rs b/src/librustdoc/clean/types.rs index 2dba52afcd9..fb08ced205d 100644 --- a/src/librustdoc/clean/types.rs +++ b/src/librustdoc/clean/types.rs @@ -1238,20 +1238,9 @@ impl WherePredicate { #[derive(Clone, PartialEq, Eq, Debug, Hash)] crate enum GenericParamDefKind { - Lifetime { - outlives: Vec<Lifetime>, - }, - Type { - did: DefId, - bounds: Vec<GenericBound>, - default: Option<Box<Type>>, - synthetic: Option<hir::SyntheticTyParamKind>, - }, - Const { - did: DefId, - ty: Box<Type>, - default: Option<Box<String>>, - }, + Lifetime { outlives: Vec<Lifetime> }, + Type { did: DefId, bounds: Vec<GenericBound>, default: Option<Box<Type>>, synthetic: bool }, + Const { did: DefId, ty: Box<Type>, default: Option<Box<String>> }, } impl GenericParamDefKind { @@ -1285,7 +1274,7 @@ impl GenericParamDef { crate fn is_synthetic_type_param(&self) -> bool { match self.kind { GenericParamDefKind::Lifetime { .. } | GenericParamDefKind::Const { .. } => false, - GenericParamDefKind::Type { ref synthetic, .. } => synthetic.is_some(), + GenericParamDefKind::Type { synthetic, .. } => synthetic, } } |
