mirror of
https://github.com/rust-lang/rust-analyzer.git
synced 2025-09-28 12:54:58 +00:00
feat: support negative const generic parameters
* feat: support `bool` & `char` const generics
This commit is contained in:
parent
b9b42e8670
commit
a96f0aa7cd
15 changed files with 153 additions and 126 deletions
|
@ -257,12 +257,7 @@ impl chalk_ir::interner::Interner for Interner {
|
|||
c1: &Self::InternedConcreteConst,
|
||||
c2: &Self::InternedConcreteConst,
|
||||
) -> bool {
|
||||
match (c1, c2) {
|
||||
(&ConstScalar::Usize(a), &ConstScalar::Usize(b)) => a == b,
|
||||
// we were previously assuming this to be true, I'm not whether true or false on
|
||||
// unknown values is safer.
|
||||
(_, _) => true,
|
||||
}
|
||||
c1 == c2
|
||||
}
|
||||
|
||||
fn intern_generic_arg(
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue