Skip to content

Commit 6d473c0

Browse files
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 <[email protected]>
2 parents 9c63137 + 13b8449 commit 6d473c0

File tree

1 file changed

+9
-5
lines changed

1 file changed

+9
-5
lines changed

crates/base_db/src/input.rs

Lines changed: 9 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -53,11 +53,15 @@ impl SourceRoot {
5353
}
5454

5555
/// `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,
57-
/// the set of cfg flags (not yet implemented) and the set of dependencies. Note
58-
/// that, due to cfg's, there might be several crates for a single `FileId`! As
59-
/// in the rust-lang proper, a crate does not have a name. Instead, names are
60-
/// specified on dependency edges. That is, a crate might be known under
56+
/// number of Rust crates.
57+
///
58+
/// Each crate is defined by the `FileId` of its root module, the set of enabled
59+
/// `cfg` flags and the set of dependencies.
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
6165
/// different names in different dependent crates.
6266
///
6367
/// Note that `CrateGraph` is build-system agnostic: it's a concept of the Rust

0 commit comments

Comments
 (0)