diff options
author | Aleksey Kladov <[email protected]> | 2019-05-23 18:18:47 +0100 |
---|---|---|
committer | Aleksey Kladov <[email protected]> | 2019-05-23 18:18:47 +0100 |
commit | 5d54aa678153d0af0edc8b4dd2d74709d10ca66c (patch) | |
tree | 610413e9cfaf7631b931cf3ca3c57304391cd72d /crates/ra_hir/src/nameres/collector.rs | |
parent | eef24bddc96ddcdbcad5fddb9c0cf0e2ccad7681 (diff) |
add union to code_model
Diffstat (limited to 'crates/ra_hir/src/nameres/collector.rs')
-rw-r--r-- | crates/ra_hir/src/nameres/collector.rs | 6 |
1 files changed, 5 insertions, 1 deletions
diff --git a/crates/ra_hir/src/nameres/collector.rs b/crates/ra_hir/src/nameres/collector.rs index c615d80c3..621236551 100644 --- a/crates/ra_hir/src/nameres/collector.rs +++ b/crates/ra_hir/src/nameres/collector.rs | |||
@@ -6,7 +6,7 @@ use ra_db::FileId; | |||
6 | use ra_syntax::ast; | 6 | use ra_syntax::ast; |
7 | 7 | ||
8 | use crate::{ | 8 | use crate::{ |
9 | Function, Module, Struct, Enum, Const, Static, Trait, TypeAlias, | 9 | Function, Module, Struct, Union, Enum, Const, Static, Trait, TypeAlias, |
10 | DefDatabase, HirFileId, Name, Path, | 10 | DefDatabase, HirFileId, Name, Path, |
11 | KnownName, | 11 | KnownName, |
12 | nameres::{ | 12 | nameres::{ |
@@ -495,6 +495,10 @@ where | |||
495 | let s = def!(Struct, ast_id); | 495 | let s = def!(Struct, ast_id); |
496 | PerNs::both(s, s) | 496 | PerNs::both(s, s) |
497 | } | 497 | } |
498 | raw::DefKind::Union(ast_id) => { | ||
499 | let s = def!(Union, ast_id); | ||
500 | PerNs::both(s, s) | ||
501 | } | ||
498 | raw::DefKind::Enum(ast_id) => PerNs::types(def!(Enum, ast_id)), | 502 | raw::DefKind::Enum(ast_id) => PerNs::types(def!(Enum, ast_id)), |
499 | raw::DefKind::Const(ast_id) => PerNs::values(def!(Const, ast_id)), | 503 | raw::DefKind::Const(ast_id) => PerNs::values(def!(Const, ast_id)), |
500 | raw::DefKind::Static(ast_id) => PerNs::values(def!(Static, ast_id)), | 504 | raw::DefKind::Static(ast_id) => PerNs::values(def!(Static, ast_id)), |