Allow types to come after consts in AST validation

This commit is contained in:
julianknodt 2020-07-30 00:40:50 -07:00 committed by kadmin
parent f9c2177ddc
commit 58b1a04b9e

View File

@ -735,6 +735,7 @@ fn validate_generic_param_order<'a>(
}
let max_param = &mut max_param;
match max_param {
Some(ParamKindOrd::Const) if ParamKindOrd::Type == kind => (),
Some(max_param) if *max_param > kind => {
let entry = out_of_order.entry(kind).or_insert((*max_param, vec![]));
entry.1.push(span);