Add lowering of array lengths in types

Now e.g.

```rust
fn a(b: [u8; 2]) {
}
```

will know about the length of b.
This commit is contained in:
Jade 2021-05-12 04:39:48 -07:00
parent 312f1fe20a
commit 8b147624ff
10 changed files with 114 additions and 79 deletions

View file

@ -12,7 +12,6 @@ mod chalk_db;
mod chalk_ext;
mod infer;
mod interner;
mod consts;
mod lower;
mod mapping;
mod op;
@ -38,9 +37,13 @@ use chalk_ir::{
interner::HasInterner,
UintTy,
};
use hir_def::{expr::ExprId, type_ref::Rawness, TypeParamId};
use hir_def::{
expr::ExprId,
type_ref::{ConstScalar, Rawness},
TypeParamId,
};
use crate::{consts::ConstScalar, db::HirDatabase, display::HirDisplay, utils::generics};
use crate::{db::HirDatabase, display::HirDisplay, utils::generics};
pub use autoderef::autoderef;
pub use builder::TyBuilder;