aboutsummaryrefslogtreecommitdiff
path: root/crates/ra_hir/src/module/nameres.rs
diff options
context:
space:
mode:
authorbors[bot] <bors[bot]@users.noreply.github.com>2018-12-24 14:40:11 +0000
committerbors[bot] <bors[bot]@users.noreply.github.com>2018-12-24 14:40:11 +0000
commit67e768466ff2e2611eead0f30b2e9c4083c80c20 (patch)
tree8984028019837c91131fc30f60eecf8c2a457368 /crates/ra_hir/src/module/nameres.rs
parentabe09eb5edfe8f4c58baa16140acbd414635836f (diff)
parent4befde1eee5b1e2b7ddc9bf764b77f82b792c318 (diff)
Merge #327
327: Beginnings of type inference r=flodiebold a=flodiebold I was a bit bored, so I thought I'd try to start implementing the type system and see how far I come :wink: This is obviously still extremely WIP, only very basic stuff working, but I thought I'd post this now to get some feedback as to whether this approach makes sense at all. There's no user-visible effect yet, but the type inference has tests similar to the ones for the parser. My next step will probably be to implement struct types, after which this could probably be used to complete fields. I realize this may all get thrown away when/if the compiler query system gets usable, but I feel like there are lots of IDE features that could be implemented with somewhat working type inference in the meantime :smile: Co-authored-by: Florian Diebold <[email protected]>
Diffstat (limited to 'crates/ra_hir/src/module/nameres.rs')
-rw-r--r--crates/ra_hir/src/module/nameres.rs4
1 files changed, 2 insertions, 2 deletions
diff --git a/crates/ra_hir/src/module/nameres.rs b/crates/ra_hir/src/module/nameres.rs
index 39e891cda..0b152a406 100644
--- a/crates/ra_hir/src/module/nameres.rs
+++ b/crates/ra_hir/src/module/nameres.rs
@@ -272,13 +272,13 @@ where
272 } 272 }
273 } 273 }
274 } 274 }
275 // Populate explicitelly declared items, except modules 275 // Populate explicitly declared items, except modules
276 for item in input.items.iter() { 276 for item in input.items.iter() {
277 if item.kind == MODULE { 277 if item.kind == MODULE {
278 continue; 278 continue;
279 } 279 }
280 let def_loc = DefLoc { 280 let def_loc = DefLoc {
281 kind: DefKind::Item, 281 kind: DefKind::for_syntax_kind(item.kind).unwrap_or(DefKind::Item),
282 source_root_id: self.source_root, 282 source_root_id: self.source_root,
283 module_id, 283 module_id,
284 source_item_id: SourceItemId { 284 source_item_id: SourceItemId {