diff options
Diffstat (limited to 'crates/base_db/src/input.rs')
-rw-r--r-- | crates/base_db/src/input.rs | 16 |
1 files changed, 10 insertions, 6 deletions
diff --git a/crates/base_db/src/input.rs b/crates/base_db/src/input.rs index 0ef77ef5d..23cb0c839 100644 --- a/crates/base_db/src/input.rs +++ b/crates/base_db/src/input.rs | |||
@@ -53,11 +53,15 @@ impl SourceRoot { | |||
53 | } | 53 | } |
54 | 54 | ||
55 | /// `CrateGraph` is a bit of information which turns a set of text files into a | 55 | /// `CrateGraph` is a bit of information which turns a set of text files into a |
56 | /// number of Rust crates. Each crate is defined by the `FileId` of its root module, | 56 | /// number of Rust crates. |
57 | /// the set of cfg flags (not yet implemented) and the set of dependencies. Note | 57 | /// |
58 | /// that, due to cfg's, there might be several crates for a single `FileId`! As | 58 | /// Each crate is defined by the `FileId` of its root module, the set of enabled |
59 | /// in the rust-lang proper, a crate does not have a name. Instead, names are | 59 | /// `cfg` flags and the set of dependencies. |
60 | /// specified on dependency edges. That is, a crate might be known under | 60 | /// |
61 | /// Note that, due to cfg's, there might be several crates for a single `FileId`! | ||
62 | /// | ||
63 | /// For the purposes of analysis, a crate does not have a name. Instead, names | ||
64 | /// are specified on dependency edges. That is, a crate might be known under | ||
61 | /// different names in different dependent crates. | 65 | /// different names in different dependent crates. |
62 | /// | 66 | /// |
63 | /// Note that `CrateGraph` is build-system agnostic: it's a concept of the Rust | 67 | /// Note that `CrateGraph` is build-system agnostic: it's a concept of the Rust |
@@ -143,7 +147,7 @@ impl CrateDisplayName { | |||
143 | #[derive(Debug, Copy, Clone, PartialEq, Eq, Hash)] | 147 | #[derive(Debug, Copy, Clone, PartialEq, Eq, Hash)] |
144 | pub struct ProcMacroId(pub u32); | 148 | pub struct ProcMacroId(pub u32); |
145 | 149 | ||
146 | #[derive(Copy, Clone, Eq, PartialEq, Debug)] | 150 | #[derive(Copy, Clone, Eq, PartialEq, Debug, Hash)] |
147 | pub enum ProcMacroKind { | 151 | pub enum ProcMacroKind { |
148 | CustomDerive, | 152 | CustomDerive, |
149 | FuncLike, | 153 | FuncLike, |