pub struct CliUnstable {Show 41 fields
pub allow_features: Option<AllowFeatures>,
pub print_im_a_teapot: bool,
pub advanced_env: bool,
pub asymmetric_token: bool,
pub avoid_dev_deps: bool,
pub binary_dep_depinfo: bool,
pub bindeps: bool,
pub build_std: Option<Vec<String>>,
pub build_std_features: Option<Vec<String>>,
pub cargo_lints: bool,
pub checksum_freshness: bool,
pub codegen_backend: bool,
pub config_include: bool,
pub direct_minimal_versions: bool,
pub doctest_xcompile: bool,
pub dual_proc_macros: bool,
pub features: Option<Vec<String>>,
pub gc: bool,
pub git: Option<GitFeatures>,
pub gitoxide: Option<GitoxideFeatures>,
pub host_config: bool,
pub minimal_versions: bool,
pub msrv_policy: bool,
pub mtime_on_use: bool,
pub next_lockfile_bump: bool,
pub no_index_update: bool,
pub package_workspace: bool,
pub panic_abort_tests: bool,
pub profile_rustflags: bool,
pub public_dependency: bool,
pub publish_timeout: bool,
pub root_dir: Option<PathBuf>,
pub rustdoc_map: bool,
pub rustdoc_scrape_examples: bool,
pub script: bool,
pub separate_nightlies: bool,
pub skip_rustdoc_fingerprint: bool,
pub target_applies_to_host: bool,
pub trim_paths: bool,
pub unstable_options: bool,
pub warnings: bool,
}
Expand description
A parsed representation of all unstable flags that Cargo accepts.
Cargo, like rustc
, accepts a suite of -Z
flags which are intended for
gating unstable functionality to Cargo. These flags are only available on
the nightly channel of Cargo.
Fields§
§allow_features: Option<AllowFeatures>
Allow only the listed unstable features
print_im_a_teapot: bool
§advanced_env: bool
§asymmetric_token: bool
Allows authenticating with asymmetric tokens
avoid_dev_deps: bool
Avoid installing dev-dependencies if possible
binary_dep_depinfo: bool
Track changes to dependency artifacts
bindeps: bool
Allow Cargo packages to depend on bin, cdylib, and staticlib crates, and use the artifacts built by those crates
build_std: Option<Vec<String>>
Enable Cargo to compile the standard library itself as part of a crate graph compilation
build_std_features: Option<Vec<String>>
Configure features enabled for the standard library itself when building the standard library
cargo_lints: bool
Enable the [lints.cargo]
table
checksum_freshness: bool
Use a checksum to determine if output is fresh rather than filesystem mtime
codegen_backend: bool
Enable the codegen-backend
option in profiles in .cargo/config.toml file
config_include: bool
Enable the include
key in config files
direct_minimal_versions: bool
Resolve minimal dependency versions instead of maximum (direct dependencies only)
doctest_xcompile: bool
Compile and run doctests for non-host target using runner config
dual_proc_macros: bool
Build proc-macros for both the host and the target
features: Option<Vec<String>>
§gc: bool
Track cache usage and “garbage collect” unused files
git: Option<GitFeatures>
Enable support for shallow git fetch operations
gitoxide: Option<GitoxideFeatures>
Use gitoxide for the given git interactions, or all of them if no argument is given
host_config: bool
Enable the [host]
section in the .cargo/config.toml file
minimal_versions: bool
Resolve minimal dependency versions instead of maximum
msrv_policy: bool
Enable rust-version aware policy within cargo
mtime_on_use: bool
Configure Cargo to update the mtime of used files
next_lockfile_bump: bool
§no_index_update: bool
Do not update the registry index even if the cache is outdated
package_workspace: bool
Handle intra-workspace dependencies when packaging
panic_abort_tests: bool
Enable support to run tests with -Cpanic=abort
profile_rustflags: bool
Enable the rustflags
option in profiles in .cargo/config.toml file
public_dependency: bool
Respect a dependency’s public
field in Cargo.toml to control public/private dependencies
publish_timeout: bool
Enable the publish.timeout
key in .cargo/config.toml file
root_dir: Option<PathBuf>
Set the root directory relative to which paths are printed (defaults to workspace root)
rustdoc_map: bool
Allow passing external documentation mappings to rustdoc
rustdoc_scrape_examples: bool
Allows Rustdoc to scrape code examples from reverse-dependencies
script: bool
Enable support for single-file, .rs
packages
separate_nightlies: bool
§skip_rustdoc_fingerprint: bool
§target_applies_to_host: bool
Enable the target-applies-to-host
key in the .cargo/config.toml file
trim_paths: bool
Enable the trim-paths
option in profiles
unstable_options: bool
Allow the usage of unstable options
warnings: bool
Allow use of the build.warnings config key
Implementations§
Source§impl CliUnstable
impl CliUnstable
Source§impl CliUnstable
impl CliUnstable
Sourcepub fn parse(
&mut self,
flags: &[String],
nightly_features_allowed: bool,
) -> CargoResult<Vec<String>>
pub fn parse( &mut self, flags: &[String], nightly_features_allowed: bool, ) -> CargoResult<Vec<String>>
Parses -Z
flags from the command line, and returns messages that warn
if any flag has alreardy been stabilized.
fn add(&mut self, flag: &str, warnings: &mut Vec<String>) -> CargoResult<()>
Sourcepub fn fail_if_stable_opt(&self, flag: &str, issue: u32) -> CargoResult<()>
pub fn fail_if_stable_opt(&self, flag: &str, issue: u32) -> CargoResult<()>
Generates an error if -Z unstable-options
was not used for a new,
unstable command-line flag.
pub fn fail_if_stable_opt_custom_z( &self, flag: &str, issue: u32, z_name: &str, enabled: bool, ) -> CargoResult<()>
Sourcepub fn fail_if_stable_command(
&self,
gctx: &GlobalContext,
command: &str,
issue: u32,
z_name: &str,
enabled: bool,
) -> CargoResult<()>
pub fn fail_if_stable_command( &self, gctx: &GlobalContext, command: &str, issue: u32, z_name: &str, enabled: bool, ) -> CargoResult<()>
Generates an error if -Z unstable-options
was not used for a new,
unstable subcommand.
Trait Implementations§
Source§impl Debug for CliUnstable
impl Debug for CliUnstable
Source§impl Default for CliUnstable
impl Default for CliUnstable
Source§fn default() -> CliUnstable
fn default() -> CliUnstable
Source§impl<'de> Deserialize<'de> for CliUnstablewhere
CliUnstable: Default,
impl<'de> Deserialize<'de> for CliUnstablewhere
CliUnstable: Default,
Source§fn deserialize<__D>(__deserializer: __D) -> Result<Self, __D::Error>where
__D: Deserializer<'de>,
fn deserialize<__D>(__deserializer: __D) -> Result<Self, __D::Error>where
__D: Deserializer<'de>,
Auto Trait Implementations§
impl Freeze for CliUnstable
impl RefUnwindSafe for CliUnstable
impl Send for CliUnstable
impl Sync for CliUnstable
impl Unpin for CliUnstable
impl UnwindSafe for CliUnstable
Blanket Implementations§
Source§impl<T> BorrowMut<T> for Twhere
T: ?Sized,
impl<T> BorrowMut<T> for Twhere
T: ?Sized,
Source§fn borrow_mut(&mut self) -> &mut T
fn borrow_mut(&mut self) -> &mut T
§impl<T> Instrument for T
impl<T> Instrument for T
§fn instrument(self, span: Span) -> Instrumented<Self>
fn instrument(self, span: Span) -> Instrumented<Self>
§fn in_current_span(self) -> Instrumented<Self>
fn in_current_span(self) -> Instrumented<Self>
§impl<T> Pointable for T
impl<T> Pointable for T
§impl<T> WithSubscriber for T
impl<T> WithSubscriber for T
§fn with_subscriber<S>(self, subscriber: S) -> WithDispatch<Self>where
S: Into<Dispatch>,
fn with_subscriber<S>(self, subscriber: S) -> WithDispatch<Self>where
S: Into<Dispatch>,
§fn with_current_subscriber(self) -> WithDispatch<Self>
fn with_current_subscriber(self) -> WithDispatch<Self>
impl<T> DeserializeOwned for Twhere
T: for<'de> Deserialize<'de>,
Layout§
Note: Most layout information is completely unstable and may even differ between compilations. The only exception is types with certain repr(...)
attributes. Please see the Rust Reference's “Type Layout” chapter for details on type layout guarantees.
Size: 168 bytes