diff options
author | Jade <[email protected]> | 2021-05-12 12:39:48 +0100 |
---|---|---|
committer | Jade <[email protected]> | 2021-05-13 05:22:46 +0100 |
commit | 8b147624ff906a11134d2e18be071c6cb8ec4beb (patch) | |
tree | 28df73a940497bc170ec9f080329657f4b1370b8 /crates/hir_ty/src/lib.rs | |
parent | 312f1fe20a6a0a8e69834c66f51b9abc9db5e0ce (diff) |
Add lowering of array lengths in types
Now e.g.
```rust
fn a(b: [u8; 2]) {
}
```
will know about the length of b.
Diffstat (limited to 'crates/hir_ty/src/lib.rs')
-rw-r--r-- | crates/hir_ty/src/lib.rs | 9 |
1 files changed, 6 insertions, 3 deletions
diff --git a/crates/hir_ty/src/lib.rs b/crates/hir_ty/src/lib.rs index d23eff513..be3f55bdf 100644 --- a/crates/hir_ty/src/lib.rs +++ b/crates/hir_ty/src/lib.rs | |||
@@ -12,7 +12,6 @@ mod chalk_db; | |||
12 | mod chalk_ext; | 12 | mod chalk_ext; |
13 | mod infer; | 13 | mod infer; |
14 | mod interner; | 14 | mod interner; |
15 | mod consts; | ||
16 | mod lower; | 15 | mod lower; |
17 | mod mapping; | 16 | mod mapping; |
18 | mod op; | 17 | mod op; |
@@ -38,9 +37,13 @@ use chalk_ir::{ | |||
38 | interner::HasInterner, | 37 | interner::HasInterner, |
39 | UintTy, | 38 | UintTy, |
40 | }; | 39 | }; |
41 | use hir_def::{expr::ExprId, type_ref::Rawness, TypeParamId}; | 40 | use hir_def::{ |
41 | expr::ExprId, | ||
42 | type_ref::{ConstScalar, Rawness}, | ||
43 | TypeParamId, | ||
44 | }; | ||
42 | 45 | ||
43 | use crate::{consts::ConstScalar, db::HirDatabase, display::HirDisplay, utils::generics}; | 46 | use crate::{db::HirDatabase, display::HirDisplay, utils::generics}; |
44 | 47 | ||
45 | pub use autoderef::autoderef; | 48 | pub use autoderef::autoderef; |
46 | pub use builder::TyBuilder; | 49 | pub use builder::TyBuilder; |