about summary refs log tree commit diff
diff options
context:
space:
mode:
authorMichael Howell <michael@notriddle.com>2023-05-08 12:04:27 -0700
committerMichael Howell <michael@notriddle.com>2023-05-25 08:14:33 -0700
commit374024336a0dfed4a5cf5e97ccc99648b18cf00c (patch)
treef22079823946f601d3fb1025b5c533cc358c8f46
parent8488e8aed9eb59e45589974985e7cb377576353c (diff)
downloadrust-374024336a0dfed4a5cf5e97ccc99648b18cf00c.tar.gz
rust-374024336a0dfed4a5cf5e97ccc99648b18cf00c.zip
Improve comments
-rw-r--r--compiler/rustc_metadata/src/rmeta/decoder.rs5
-rw-r--r--src/bootstrap/metadata.rs2
-rwxr-xr-xsrc/tools/rust-installer/combine-installers.sh2
-rwxr-xr-xsrc/tools/rust-installer/gen-installer.sh2
-rwxr-xr-xsrc/tools/rust-installer/make-tarballs.sh2
-rw-r--r--src/tools/tidy/src/main.rs4
6 files changed, 14 insertions, 3 deletions
diff --git a/compiler/rustc_metadata/src/rmeta/decoder.rs b/compiler/rustc_metadata/src/rmeta/decoder.rs
index 46d469f0703..ccba77d7aa7 100644
--- a/compiler/rustc_metadata/src/rmeta/decoder.rs
+++ b/compiler/rustc_metadata/src/rmeta/decoder.rs
@@ -111,8 +111,9 @@ pub(crate) struct CrateMetadata {
     dep_kind: Lock<CrateDepKind>,
     /// Filesystem location of this crate.
     source: Lrc<CrateSource>,
-    /// Whether or not this crate should be consider a private dependency
-    /// for purposes of the 'exported_private_dependencies' lint
+    /// Whether or not this crate should be consider a private dependency.
+    /// Used by the 'exported_private_dependencies' lint, and for determining
+    /// whether to emit suggestions that reference this crate.
     private_dep: Lock<bool>,
     /// The hash for the host proc macro. Used to support `-Z dual-proc-macro`.
     host_hash: Option<Svh>,
diff --git a/src/bootstrap/metadata.rs b/src/bootstrap/metadata.rs
index d8671ef2639..3b20ceac875 100644
--- a/src/bootstrap/metadata.rs
+++ b/src/bootstrap/metadata.rs
@@ -74,6 +74,8 @@ fn workspace_members(build: &Build) -> impl Iterator<Item = Package> {
     let collect_metadata = |manifest_path| {
         let mut cargo = Command::new(&build.initial_cargo);
         cargo
+            // Will read the libstd Cargo.toml
+            // which uses the unstable `public-dependency` feature.
             .env("RUSTC_BOOTSTRAP", "1")
             .arg("metadata")
             .arg("--format-version")
diff --git a/src/tools/rust-installer/combine-installers.sh b/src/tools/rust-installer/combine-installers.sh
index c2de3385a80..01e5a00af4a 100755
--- a/src/tools/rust-installer/combine-installers.sh
+++ b/src/tools/rust-installer/combine-installers.sh
@@ -11,6 +11,8 @@ abs_path() {
     (unset CDPATH && cd "$path" > /dev/null && pwd)
 }
 
+# Running cargo will read the libstd Cargo.toml
+# which uses the unstable `public-dependency` feature.
 export RUSTC_BOOTSTRAP=1
 
 src_dir="$(abs_path $(dirname "$0"))"
diff --git a/src/tools/rust-installer/gen-installer.sh b/src/tools/rust-installer/gen-installer.sh
index 10a69ff5ac5..cc45b5e0803 100755
--- a/src/tools/rust-installer/gen-installer.sh
+++ b/src/tools/rust-installer/gen-installer.sh
@@ -11,6 +11,8 @@ abs_path() {
     (unset CDPATH && cd "$path" > /dev/null && pwd)
 }
 
+# Running cargo will read the libstd Cargo.toml
+# which uses the unstable `public-dependency` feature.
 export RUSTC_BOOTSTRAP=1
 
 src_dir="$(abs_path $(dirname "$0"))"
diff --git a/src/tools/rust-installer/make-tarballs.sh b/src/tools/rust-installer/make-tarballs.sh
index 4aadf078ff1..374e103e89c 100755
--- a/src/tools/rust-installer/make-tarballs.sh
+++ b/src/tools/rust-installer/make-tarballs.sh
@@ -11,6 +11,8 @@ abs_path() {
     (unset CDPATH && cd "$path" > /dev/null && pwd)
 }
 
+# Running cargo will read the libstd Cargo.toml
+# which uses the unstable `public-dependency` feature.
 export RUSTC_BOOTSTRAP=1
 
 src_dir="$(abs_path $(dirname "$0"))"
diff --git a/src/tools/tidy/src/main.rs b/src/tools/tidy/src/main.rs
index 2ad0ae527ac..a9eada22fc0 100644
--- a/src/tools/tidy/src/main.rs
+++ b/src/tools/tidy/src/main.rs
@@ -16,7 +16,9 @@ use std::sync::atomic::{AtomicBool, Ordering};
 use std::thread::{self, scope, ScopedJoinHandle};
 
 fn main() {
-    // Allow using unstable cargo features in the standard library.
+    // Running Cargo will read the libstd Cargo.toml
+    // which uses the unstable `public-dependency` feature.
+    //
     // `setenv` might not be thread safe, so run it before using multiple threads.
     env::set_var("RUSTC_BOOTSTRAP", "1");