Improve comments

This commit is contained in:
Michael Howell 2023-05-08 12:04:27 -07:00
parent 8488e8aed9
commit 374024336a
6 changed files with 14 additions and 3 deletions

View file

@ -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")

View file

@ -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"))"

View file

@ -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"))"

View file

@ -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"))"

View file

@ -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");