Rollup merge of #80538 - JulianKnodt:err_usize, r=lcnr
Add check for `[T;N]`/`usize` mismatch in astconv Helps clarify the issue in #80506 by adding a specific check for mismatches between [T;N] and usize. r? `@lcnr`
This commit is contained in:
commit
be2a3f8642
7 changed files with 95 additions and 41 deletions
|
@ -290,6 +290,14 @@ impl GenericArg<'_> {
|
|||
GenericArg::Const(_) => "const",
|
||||
}
|
||||
}
|
||||
|
||||
pub fn to_ord(&self, feats: &rustc_feature::Features) -> ast::ParamKindOrd {
|
||||
match self {
|
||||
GenericArg::Lifetime(_) => ast::ParamKindOrd::Lifetime,
|
||||
GenericArg::Type(_) => ast::ParamKindOrd::Type,
|
||||
GenericArg::Const(_) => ast::ParamKindOrd::Const { unordered: feats.const_generics },
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
#[derive(Debug, HashStable_Generic)]
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue