Skip to content

Commit 73d9c24

Browse files
committed
build-manifest: add documentation on the PkgType methods
1 parent 89ffab7 commit 73d9c24

File tree

1 file changed

+5
-0
lines changed

1 file changed

+5
-0
lines changed

src/tools/build-manifest/src/versions.rs

+5
Original file line numberDiff line numberDiff line change
@@ -38,6 +38,8 @@ impl PkgType {
3838
}
3939
}
4040

41+
/// The directory containing the `Cargo.toml` of this component inside the monorepo, to
42+
/// retrieve the source code version. If `None` is returned Rust's version will be used.
4143
fn rust_monorepo_path(&self) -> Option<&'static str> {
4244
match self {
4345
PkgType::Cargo => Some("src/tools/cargo"),
@@ -53,6 +55,7 @@ impl PkgType {
5355
}
5456
}
5557

58+
/// First part of the tarball name.
5659
fn tarball_component_name(&self) -> &str {
5760
match self {
5861
PkgType::Rust => "rust",
@@ -68,6 +71,8 @@ impl PkgType {
6871
}
6972
}
7073

74+
/// Whether this package has the same version as Rust itself, or has its own `version` and
75+
/// `git-commit-hash` files inside the tarball.
7176
fn should_use_rust_version(&self) -> bool {
7277
match self {
7378
PkgType::Cargo => false,

0 commit comments

Comments
 (0)