Skip to content

Commit 64c11bc

Browse files
committed
Improve comments
1 parent 8b06850 commit 64c11bc

File tree

6 files changed

+14
-3
lines changed

6 files changed

+14
-3
lines changed

compiler/rustc_metadata/src/rmeta/decoder.rs

Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -109,8 +109,9 @@ pub(crate) struct CrateMetadata {
109109
dep_kind: Lock<CrateDepKind>,
110110
/// Filesystem location of this crate.
111111
source: Lrc<CrateSource>,
112-
/// Whether or not this crate should be consider a private dependency
113-
/// for purposes of the 'exported_private_dependencies' lint
112+
/// Whether or not this crate should be consider a private dependency.
113+
/// Used by the 'exported_private_dependencies' lint, and for determining
114+
/// whether to emit suggestions that reference this crate.
114115
private_dep: Lock<bool>,
115116
/// The hash for the host proc macro. Used to support `-Z dual-proc-macro`.
116117
host_hash: Option<Svh>,

src/bootstrap/metadata.rs

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -74,6 +74,8 @@ fn workspace_members(build: &Build) -> impl Iterator<Item = Package> {
7474
let collect_metadata = |manifest_path| {
7575
let mut cargo = Command::new(&build.initial_cargo);
7676
cargo
77+
// Will read the libstd Cargo.toml
78+
// which uses the unstable `public-dependency` feature.
7779
.env("RUSTC_BOOTSTRAP", "1")
7880
.arg("metadata")
7981
.arg("--format-version")

src/tools/rust-installer/combine-installers.sh

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -11,6 +11,8 @@ abs_path() {
1111
(unset CDPATH && cd "$path" > /dev/null && pwd)
1212
}
1313

14+
# Running cargo will read the libstd Cargo.toml
15+
# which uses the unstable `public-dependency` feature.
1416
export RUSTC_BOOTSTRAP=1
1517

1618
src_dir="$(abs_path $(dirname "$0"))"

src/tools/rust-installer/gen-installer.sh

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -11,6 +11,8 @@ abs_path() {
1111
(unset CDPATH && cd "$path" > /dev/null && pwd)
1212
}
1313

14+
# Running cargo will read the libstd Cargo.toml
15+
# which uses the unstable `public-dependency` feature.
1416
export RUSTC_BOOTSTRAP=1
1517

1618
src_dir="$(abs_path $(dirname "$0"))"

src/tools/rust-installer/make-tarballs.sh

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -11,6 +11,8 @@ abs_path() {
1111
(unset CDPATH && cd "$path" > /dev/null && pwd)
1212
}
1313

14+
# Running cargo will read the libstd Cargo.toml
15+
# which uses the unstable `public-dependency` feature.
1416
export RUSTC_BOOTSTRAP=1
1517

1618
src_dir="$(abs_path $(dirname "$0"))"

src/tools/tidy/src/main.rs

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -16,7 +16,9 @@ use std::sync::atomic::{AtomicBool, Ordering};
1616
use std::thread::{self, scope, ScopedJoinHandle};
1717

1818
fn main() {
19-
// Allow using unstable cargo features in the standard library.
19+
// Running Cargo will read the libstd Cargo.toml
20+
// which uses the unstable `public-dependency` feature.
21+
//
2022
// `setenv` might not be thread safe, so run it before using multiple threads.
2123
env::set_var("RUSTC_BOOTSTRAP", "1");
2224

0 commit comments

Comments
 (0)