diff options
| author | David Barsky <me@davidbarsky.com> | 2023-09-07 15:30:11 -0400 |
|---|---|---|
| committer | David Barsky <me@davidbarsky.com> | 2023-09-07 15:30:11 -0400 |
| commit | 912b22fa0795b56aab514ed2801fb1a7b40f7704 (patch) | |
| tree | b0ff1370b579c9d0d775d9539001505268007b6a | |
| parent | fad3823a20c453907ee311953fedc69b7ca11d8d (diff) | |
| download | rust-912b22fa0795b56aab514ed2801fb1a7b40f7704.tar.gz rust-912b22fa0795b56aab514ed2801fb1a7b40f7704.zip | |
add doc comment to `rustc_cfg::RustcCfgConfig`
| -rw-r--r-- | crates/project-model/src/rustc_cfg.rs | 8 |
1 files changed, 8 insertions, 0 deletions
diff --git a/crates/project-model/src/rustc_cfg.rs b/crates/project-model/src/rustc_cfg.rs index f4af7b0d2f0..905adff4e5c 100644 --- a/crates/project-model/src/rustc_cfg.rs +++ b/crates/project-model/src/rustc_cfg.rs @@ -7,6 +7,14 @@ use rustc_hash::FxHashMap; use crate::{cfg_flag::CfgFlag, utf8_stdout, ManifestPath, Sysroot}; +/// Determines how `rustc --print cfg` is discovered and invoked. +/// +/// There options are supported: +/// - [`RustcCfgConfig::Cargo`], which relies on `cargo rustc --print cfg` +/// and `RUSTC_BOOTSTRAP`. +/// - [`RustcCfgConfig::Explicit`], which uses an explicit path to the `rustc` +/// binary in the sysroot. +/// - [`RustcCfgConfig::Discover`], which uses [`toolchain::rustc`]. pub(crate) enum RustcCfgConfig<'a> { Cargo(&'a ManifestPath), Explicit(&'a Sysroot), |
