Subcommand in bootstrap::core::config::flags - Rust
Description: API documentation for the Rust `Subcommand` enum in crate `bootstrap`.

Skip to main content

## Subcommand

# Enum Subcommand

Source

    pub enum Subcommand {
    Show 16 variants    Build {
            timings: bool,
        },
        Check {
            all_targets: bool,
            timings: bool,
        },
        Clippy {
            fix: bool,
            allow_dirty: bool,
            allow_staged: bool,
            allow: Vec<String>,
            deny: Vec<String>,
            warn: Vec<String>,
            forbid: Vec<String>,
        },
        Fix,
        Format {
            check: bool,
            all: bool,
        },
        Doc {
            open: bool,
            json: bool,
        },
        Test {Show 17 fields
            no_fail_fast: bool,
            test_args: Vec<String>,
            compiletest_rustc_args: Vec<String>,
            all_targets: bool,
            doc: bool,
            tests: bool,
            bless: bool,
            extra_checks: Option<String>,
            force_rerun: bool,
            only_modified: bool,
            compare_mode: Option<String>,
            pass: Option<String>,
            run: Option<String>,
            rustfix_coverage: bool,
            no_capture: bool,
            test_codegen_backend: Option<CodegenBackendKind>,
            bypass_ignore_backends: bool,
            /* private fields */
        },
        Miri {
            no_fail_fast: bool,
            test_args: Vec<String>,
            all_targets: bool,
            doc: bool,
            tests: bool,
            /* private fields */
        },
        Bench {
            test_args: Vec<String>,
        },
        Clean {
            all: bool,
            stage: Option<u32>,
        },
        Dist,
        Install,
        Run {
            args: Vec<String>,
        },
        Setup {
            profile: Option<PathBuf>,
        },
        Vendor {
            sync: Vec<PathBuf>,
            versioned_dirs: bool,
        },
        Perf(PerfArgs),
    }

## Variants§

§

### Build

Compile either the compiler or libraries

#### Fields

§`timings: bool`

Pass `--timings` to Cargo to get crate build timings

§

### Check

Compile either the compiler or libraries, using cargo check

#### Fields

§`all_targets: bool`

Check all targets

§`timings: bool`

Pass `--timings` to Cargo to get crate build timings

§

### Clippy

Run Clippy (uses rustup/cargo-installed clippy binary)

#### Fields

§`fix: bool`
§`allow_dirty: bool`
§`allow_staged: bool`
§`allow: Vec<String>`

clippy lints to allow

§`deny: Vec<String>`

clippy lints to deny

§`warn: Vec<String>`

clippy lints to warn on

§`forbid: Vec<String>`

clippy lints to forbid

§

### Fix

Run cargo fix

§

### Format

Run rustfmt

#### Fields

§`check: bool`

check formatting instead of applying

§`all: bool`

apply to all appropriate files, not just those that have been modified

§

### Doc

Build documentation

#### Fields

§`open: bool`

open the docs in a browser

§`json: bool`

render the documentation in JSON format in addition to the usual HTML format

§

### Test

Build and run some test suites

#### Fields

§`no_fail_fast: bool`

run all tests regardless of failure

§`test_args: Vec<String>`

extra arguments to be passed for the test tool being used (e.g. libtest, compiletest or rustdoc)

§`compiletest_rustc_args: Vec<String>`

extra options to pass the compiler when running compiletest tests

§`all_targets: bool`

Run all test targets (no doc tests)

§`doc: bool`

Only run doc tests

§`tests: bool`

Only run unit and integration tests

§`bless: bool`

whether to automatically update stderr/stdout files

§`extra_checks: Option<String>`

comma-separated list of other files types to check (accepts py, py:lint, py:fmt, shell, cpp, cpp:fmt, js, js:lint, js:typecheck, spellcheck)

Any argument can be prefixed with “auto:” to only run if relevant files are modified (eg. “auto:py”).

§`force_rerun: bool`

rerun tests even if the inputs are unchanged

§`only_modified: bool`

only run tests that result has been changed

§`compare_mode: Option<String>`

mode describing what file the actual ui output will be compared to

§`pass: Option<String>`

force {check,build,run}-pass tests to this mode.

§`run: Option<String>`

whether to execute run-* tests

§`rustfix_coverage: bool`

enable this to generate a Rustfix coverage file, which is saved in `/<build_base>/rustfix_missing_coverage.txt`

§`no_capture: bool`

don’t capture stdout/stderr of tests

§`test_codegen_backend: Option<CodegenBackendKind>`

Use a different codegen backend when running tests.

§`bypass_ignore_backends: bool`

Ignore `//@ ignore-backends` directives.

§

### Miri

Build and run some test suites in Miri

#### Fields

§`no_fail_fast: bool`

run all tests regardless of failure

§`test_args: Vec<String>`

extra arguments to be passed for the test tool being used (e.g. libtest, compiletest or rustdoc)

§`all_targets: bool`

Run all test targets (no doc tests)

§`doc: bool`

Only run doc tests

§`tests: bool`

Only run unit and integration tests

§

### Bench

Build and run some benchmarks

#### Fields

§`test_args: Vec<String>`
§

### Clean

Clean out build directories

#### Fields

§`all: bool`

Clean the entire build directory (not used by default)

§`stage: Option<u32>`

Clean a specific stage without touching other artifacts. By default, every stage is cleaned if this option is not used.

§

### Dist

Build distribution artifacts

§

### Install

Install distribution artifacts

§

### Run

Run tools contained in this repository

#### Fields

§`args: Vec<String>`

arguments for the tool

§

### Setup

Set up the environment for development

#### Fields

§`profile: Option<PathBuf>`

Either the profile for `bootstrap.toml` or another setup action. May be omitted to set up interactively

§

### Vendor

Vendor dependencies

#### Fields

§`sync: Vec<PathBuf>`

Additional `Cargo.toml` to sync and vendor

§`versioned_dirs: bool`

Always include version in subdir name

§

### Perf(PerfArgs)

Perform profiling and benchmarking of the compiler using `rustc-perf`.

## Implementations§

Source§

### impl Subcommand

Source

#### pub fn kind(&self) -> Kind

Source

#### pub fn compiletest_rustc_args(&self) -> Vec<&str>

Source

#### pub fn fail_fast(&self) -> bool

Source

#### pub fn test_target(&self) -> TestTarget

Source

#### pub fn no_doc(&self) -> bool

Source

#### pub fn bless(&self) -> bool

Source

#### pub fn extra_checks(&self) -> Option<&str>

Source

#### pub fn only_modified(&self) -> bool

Source

#### pub fn force_rerun(&self) -> bool

Source

#### pub fn no_capture(&self) -> bool

Source

#### pub fn rustfix_coverage(&self) -> bool

Source

#### pub fn compare_mode(&self) -> Option<&str>

Source

#### pub fn pass(&self) -> Option<&str>

Source

#### pub fn run(&self) -> Option<&str>

Source

#### pub fn open(&self) -> bool

Source

#### pub fn json(&self) -> bool

Source

#### pub fn timings(&self) -> bool

Source

#### pub fn vendor_versioned_dirs(&self) -> bool

Source

#### pub fn vendor_sync_args(&self) -> Vec<PathBuf>

Source

#### pub fn test_codegen_backend(&self) -> Option<&CodegenBackendKind>

Source

#### pub fn bypass_ignore_backends(&self) -> bool

## Trait Implementations§

Source§

### impl Clone for Subcommand

Source§

#### fn clone(&self) -> Subcommand

Returns a duplicate of the value. Read more
1.0.0 · Source§

#### fn clone_from(&mut self, source: &Self)

Performs copy-assignment from `source`. Read more
Source§

### impl Debug for Subcommand

Source§

#### fn fmt(&self, f: &mut Formatter<'_>) -> Result

Formats the value using the given formatter. Read more
Source§

### impl Default for Subcommand

Source§

#### fn default() -> Self

Returns the “default value” for a type. Read more
Source§

### impl FromArgMatches for Subcommand

Source§

#### fn from_arg_matches(__clap_arg_matches: &ArgMatches) -> Result<Self, Error>

Instantiate `Self` from [`ArgMatches`], parsing the arguments as needed. Read more
Source§

#### fn from_arg_matches_mut( __clap_arg_matches: &mut ArgMatches, ) -> Result<Self, Error>

Instantiate `Self` from [`ArgMatches`], parsing the arguments as needed. Read more
Source§

#### fn update_from_arg_matches( &mut self, __clap_arg_matches: &ArgMatches, ) -> Result<(), Error>

Assign values from `ArgMatches` to `self`.
Source§

#### fn update_from_arg_matches_mut<'b>( &mut self, __clap_arg_matches: &mut ArgMatches, ) -> Result<(), Error>

Assign values from `ArgMatches` to `self`.
Source§

### impl Subcommand for Subcommand

Source§

#### fn augment_subcommands<'b>(__clap_app: Command) -> Command

Append to [`Command`] so it can instantiate `Self` via [`FromArgMatches::from_arg_matches_mut`] Read more
Source§

#### fn augment_subcommands_for_update<'b>(__clap_app: Command) -> Command

Append to [`Command`] so it can instantiate `self` via [`FromArgMatches::update_from_arg_matches_mut`] Read more
Source§

#### fn has_subcommand(__clap_name: &str) -> bool

Test whether `Self` can parse a specific subcommand

## Auto Trait Implementations§

§

### impl Freeze for Subcommand

§

### impl RefUnwindSafe for Subcommand

§

### impl Send for Subcommand

§

### impl Sync for Subcommand

§

### impl Unpin for Subcommand

§

### impl UnsafeUnpin for Subcommand

§

### impl UnwindSafe for Subcommand

## Blanket Implementations§

Source§

### impl<T> Any for T
where T: 'static + ?Sized,

Source§

#### fn type_id(&self) -> TypeId

Gets the `TypeId` of `self`. Read more
Source§

### impl<T> Borrow<T> for T
where T: ?Sized,

Source§

#### fn borrow(&self) -> &T

Immutably borrows from an owned value. Read more
Source§

### impl<T> BorrowMut<T> for T
where T: ?Sized,

Source§

#### fn borrow_mut(&mut self) -> &mut T

Mutably borrows from an owned value. Read more
Source§

### impl<T> CloneToUninit for T
where T: Clone,

Source§

#### unsafe fn clone_to_uninit(&self, dest: *mut u8)

🔬This is a nightly-only experimental API. (`clone_to_uninit`)
Performs copy-assignment from `self` to `dest`. Read more
Source§

### impl<T> From<T> for T

Source§

#### fn from(t: T) -> T

Returns the argument unchanged.

Source§

### impl<T, U> Into<U> for T
where U: From<T>,

Source§

#### fn into(self) -> U

Calls `U::from(self)`.

That is, this conversion is whatever the implementation of `From<T> for U` chooses to do.

§

### impl<T> Pointable for T

§

#### const ALIGN: usize

The alignment of pointer.
§

#### type Init = T

The type for initializers.
§

#### unsafe fn init(init: <T as Pointable>::Init) -> usize

Initializes a with the given initializer. Read more
§

#### unsafe fn deref<'a>(ptr: usize) -> &'a T

Dereferences the given pointer. Read more
§

#### unsafe fn deref_mut<'a>(ptr: usize) -> &'a mut T

Mutably dereferences the given pointer. Read more
§

#### unsafe fn drop(ptr: usize)

Drops the object pointed to by the given pointer. Read more
Source§

### impl<T> Same for T

Source§

#### type Output = T

Should always be `Self`
Source§

### impl<T> ToOwned for T
where T: Clone,

Source§

#### type Owned = T

The resulting type after obtaining ownership.
Source§

#### fn to_owned(&self) -> T

Creates owned data from borrowed data, usually by cloning. Read more
Source§

#### fn clone_into(&self, target: &mut T)

Uses borrowed data to replace owned data, usually by cloning. Read more
Source§

### impl<T, U> TryFrom<U> for T
where U: Into<T>,

Source§

#### type Error = Infallible

The type returned in the event of a conversion error.
Source§

#### fn try_from(value: U) -> Result<T, <T as TryFrom<U>>::Error>

Performs the conversion.
Source§

### impl<T, U> TryInto<U> for T
where U: TryFrom<T>,

Source§

#### type Error = <U as TryFrom<T>>::Error

The type returned in the event of a conversion error.
Source§

#### fn try_into(self) -> Result<U, <U as TryFrom<T>>::Error>

Performs the conversion.

## 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: 184 bytes

Size for each variant:

- `Build`: 9 bytes
- `Check`: 10 bytes
- `Clippy`: 112 bytes
- `Fix`: 0 bytes
- `Format`: 10 bytes
- `Doc`: 10 bytes
- `Test`: 184 bytes
- `Miri`: 40 bytes
- `Bench`: 32 bytes
- `Clean`: 20 bytes
- `Dist`: 0 bytes
- `Install`: 0 bytes
- `Run`: 32 bytes
- `Setup`: 32 bytes
- `Vendor`: 40 bytes
- `Perf`: 128 bytes