update ParamKindOrd
This commit is contained in:
parent
ccb5595df2
commit
b79a2b3f73
5 changed files with 13 additions and 42 deletions
|
@ -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));
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue