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

@ -325,13 +325,11 @@ impl GenericArg<'_> {
}
}
pub fn to_ord(&self, feats: &rustc_feature::Features) -> ast::ParamKindOrd {
pub fn to_ord(&self) -> ast::ParamKindOrd {
match self {
GenericArg::Lifetime(_) => ast::ParamKindOrd::Lifetime,
GenericArg::Type(_) => ast::ParamKindOrd::Type,
GenericArg::Const(_) => {
ast::ParamKindOrd::Const { unordered: feats.unordered_const_ty_params() }
}
GenericArg::Const(_) => ast::ParamKindOrd::Const,
GenericArg::Infer(_) => ast::ParamKindOrd::Infer,
}
}