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

@ -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>,

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