about summary refs log tree commit diff
diff options
context:
space:
mode:
authorbors[bot] <26634292+bors[bot]@users.noreply.github.com>2021-05-24 22:58:43 +0000
committerGitHub <noreply@github.com>2021-05-24 22:58:43 +0000
commit6d473c0a8f6acecbae680b69528b3f88a31dc5fc (patch)
tree212effcbe60287cc2d43698d5855ab69bb2adb0d
parent9c63137ef3bd4e4d5d62971d22f8af4bcdb39816 (diff)
parent13b8449a11e51a9381f8e39b629be04a3f35dba0 (diff)
downloadrust-6d473c0a8f6acecbae680b69528b3f88a31dc5fc.tar.gz
rust-6d473c0a8f6acecbae680b69528b3f88a31dc5fc.zip
Merge #8979
8979: minor: update `CrateGraph` comment r=jonas-schievink a=jonas-schievink

`cfg` flags are now implemented, and crates *may* have names, it doesn't
doesn't matter for name resolution

bors r+

Co-authored-by: Jonas Schievink <jonasschievink@gmail.com>
-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 0ef77ef5d66..64ccd11eec8 100644
--- a/crates/base_db/src/input.rs
+++ b/crates/base_db/src/input.rs
@@ -53,11 +53,15 @@ impl SourceRoot {
 }
 
 /// `CrateGraph` is a bit of information which turns a set of text files into a
-/// number of Rust crates. Each crate is defined by the `FileId` of its root module,
-/// the set of cfg flags (not yet implemented) and the set of dependencies. Note
-/// that, due to cfg's, there might be several crates for a single `FileId`! As
-/// in the rust-lang proper, a crate does not have a name. Instead, names are
-/// specified on dependency edges. That is, a crate might be known under
+/// number of Rust crates.
+///
+/// Each crate is defined by the `FileId` of its root module, the set of enabled
+/// `cfg` flags and the set of dependencies.
+///
+/// Note that, due to cfg's, there might be several crates for a single `FileId`!
+///
+/// For the purposes of analysis, a crate does not have a name. Instead, names
+/// are specified on dependency edges. That is, a crate might be known under
 /// different names in different dependent crates.
 ///
 /// Note that `CrateGraph` is build-system agnostic: it's a concept of the Rust