update ParamKindOrd
This commit is contained in:
@@ -845,10 +845,10 @@ fn validate_generic_param_order(
|
||||
let (kind, bounds, span) = (¶m.kind, ¶m.bounds, ident.span);
|
||||
let (ord_kind, ident) = match ¶m.kind {
|
||||
GenericParamKind::Lifetime => (ParamKindOrd::Lifetime, ident.to_string()),
|
||||
GenericParamKind::Type { default: _ } => (ParamKindOrd::Type, ident.to_string()),
|
||||
GenericParamKind::Type { default: _ } => (ParamKindOrd::TypeOrConst, ident.to_string()),
|
||||
GenericParamKind::Const { ref ty, kw_span: _, default: _ } => {
|
||||
let ty = pprust::ty_to_string(ty);
|
||||
(ParamKindOrd::Const, format!("const {}: {}", ident, ty))
|
||||
(ParamKindOrd::TypeOrConst, format!("const {}: {}", ident, ty))
|
||||
}
|
||||
};
|
||||
param_idents.push((kind, ord_kind, bounds, idx, ident));
|
||||
|
||||
Reference in New Issue
Block a user