Add ParamKindOrd::ConstUnordered variant
This commit is contained in:
parent
319c4f45e0
commit
1ae1a6332c
2 changed files with 3 additions and 2 deletions
|
|
@ -314,6 +314,7 @@ pub enum ParamKindOrd {
|
|||
Lifetime,
|
||||
Type,
|
||||
Const,
|
||||
ConstUnordered,
|
||||
}
|
||||
|
||||
impl fmt::Display for ParamKindOrd {
|
||||
|
|
@ -322,6 +323,7 @@ impl fmt::Display for ParamKindOrd {
|
|||
ParamKindOrd::Lifetime => "lifetime".fmt(f),
|
||||
ParamKindOrd::Type => "type".fmt(f),
|
||||
ParamKindOrd::Const => "const".fmt(f),
|
||||
ParamKindOrd::ConstUnordered => "const".fmt(f),
|
||||
}
|
||||
}
|
||||
}
|
||||
|
|
|
|||
|
|
@ -735,8 +735,7 @@ fn validate_generic_param_order<'a>(
|
|||
}
|
||||
let max_param = &mut max_param;
|
||||
match max_param {
|
||||
Some(ParamKindOrd::Const)
|
||||
if ParamKindOrd::Type == kind && sess.features_untracked().const_generics => {}
|
||||
Some(ParamKindOrd::ConstUnordered) if kind != ParamKindOrd::Lifetime => (),
|
||||
Some(max_param) if *max_param > kind => {
|
||||
let entry = out_of_order.entry(kind).or_insert((*max_param, vec![]));
|
||||
entry.1.push(span);
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue