aboutsummaryrefslogtreecommitdiff
path: root/crates/ra_hir/src/ids.rs
diff options
context:
space:
mode:
authorFlorian Diebold <[email protected]>2019-01-13 10:58:41 +0000
committerFlorian Diebold <[email protected]>2019-01-19 15:02:06 +0000
commitfa7f9d696f5863dbf28b3d0ef14c1bc9143b2d21 (patch)
tree6dbf221c3ccb3474fd37ff241961359169abae71 /crates/ra_hir/src/ids.rs
parent5862542dedd5aca9bbdcba19c5f8cd895591005d (diff)
Make Module impl methods crate-private, update some comments
Diffstat (limited to 'crates/ra_hir/src/ids.rs')
-rw-r--r--crates/ra_hir/src/ids.rs9
1 files changed, 9 insertions, 0 deletions
diff --git a/crates/ra_hir/src/ids.rs b/crates/ra_hir/src/ids.rs
index 0d8e67547..c5408e277 100644
--- a/crates/ra_hir/src/ids.rs
+++ b/crates/ra_hir/src/ids.rs
@@ -151,6 +151,15 @@ pub(crate) enum DefKind {
151 Type, 151 Type,
152 Item, 152 Item,
153 153
154 /// The constructor of a struct. E.g. if we have `struct Foo(usize)`, the
155 /// name `Foo` needs to resolve to different types depending on whether we
156 /// are in the types or values namespace: As a type, `Foo` of course refers
157 /// to the struct `Foo`; as a value, `Foo` is a callable type with signature
158 /// `(usize) -> Foo`. The cleanest approach to handle this seems to be to
159 /// have different defs in the two namespaces.
160 ///
161 /// rustc does the same; note that it even creates a struct constructor if
162 /// the struct isn't a tuple struct (see `CtorKind::Fictive` in rustc).
154 StructCtor, 163 StructCtor,
155} 164}
156 165