1
Fork 0

loosen ordering restricts for const_generics_defaults

This commit is contained in:
lcnr 2021-04-18 14:31:00 +02:00
parent 259a368e9e
commit 7cb1dcd488
31 changed files with 145 additions and 81 deletions

View file

@ -754,7 +754,7 @@ fn validate_generic_param_order(
GenericParamKind::Type { default: _ } => (ParamKindOrd::Type, ident),
GenericParamKind::Const { ref ty, kw_span: _, default: _ } => {
let ty = pprust::ty_to_string(ty);
let unordered = sess.features_untracked().const_generics;
let unordered = sess.features_untracked().unordered_const_ty_params();
(ParamKindOrd::Const { unordered }, Some(format!("const {}: {}", param.ident, ty)))
}
};