remove feature gate and cleanup code

This commit is contained in:
Ellen
2021-10-23 16:57:13 +01:00
parent 3b263ceb5c
commit 69d2d735bc
10 changed files with 18 additions and 99 deletions

View File

@@ -24,13 +24,11 @@ impl GenericParamDefKind {
GenericParamDefKind::Const { .. } => "constant",
}
}
pub fn to_ord(&self, tcx: TyCtxt<'_>) -> ast::ParamKindOrd {
pub fn to_ord(&self) -> ast::ParamKindOrd {
match self {
GenericParamDefKind::Lifetime => ast::ParamKindOrd::Lifetime,
GenericParamDefKind::Type { .. } => ast::ParamKindOrd::Type,
GenericParamDefKind::Const { .. } => {
ast::ParamKindOrd::Const { unordered: tcx.features().unordered_const_ty_params() }
}
GenericParamDefKind::Const { .. } => ast::ParamKindOrd::Const,
}
}
}