aboutsummaryrefslogtreecommitdiff
path: root/crates/base_db
diff options
context:
space:
mode:
authorJonas Schievink <[email protected]>2021-05-24 23:56:19 +0100
committerJonas Schievink <[email protected]>2021-05-24 23:56:24 +0100
commit13b8449a11e51a9381f8e39b629be04a3f35dba0 (patch)
treeb392d80edf93a8e5f5a1916f8f4956031fb4419d /crates/base_db
parent86ca1764b66e65fcb986b7188b6a77e8b53f9758 (diff)
Update `CrateGraph` comment
`cfg` flags are now implemented, and crates *may* have names, it doesn't doesn't matter for name resolution
Diffstat (limited to 'crates/base_db')
-rw-r--r--crates/base_db/src/input.rs14
1 files changed, 9 insertions, 5 deletions
diff --git a/crates/base_db/src/input.rs b/crates/base_db/src/input.rs
index 0ef77ef5d..64ccd11ee 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