Config in compiletest::common - Rust
Description: Configuration for `compiletest` per invocation.

Skip to main content

## Config

# Struct Config

Source

    pub(crate) struct Config {Show 89 fields
        pub(crate) bless: bool,
        pub(crate) fail_fast: bool,
        pub(crate) host_compile_lib_path: Utf8PathBuf,
        pub(crate) target_run_lib_path: Utf8PathBuf,
        pub(crate) rustc_path: Utf8PathBuf,
        pub(crate) cargo_path: Option<Utf8PathBuf>,
        pub(crate) stage0_rustc_path: Option<Utf8PathBuf>,
        pub(crate) query_rustc_path: Option<Utf8PathBuf>,
        pub(crate) rustdoc_path: Option<Utf8PathBuf>,
        pub(crate) coverage_dump_path: Option<Utf8PathBuf>,
        pub(crate) python: String,
        pub(crate) jsondocck_path: Option<Utf8PathBuf>,
        pub(crate) jsondoclint_path: Option<Utf8PathBuf>,
        pub(crate) llvm_filecheck: Option<Utf8PathBuf>,
        pub(crate) llvm_bin_dir: Option<Utf8PathBuf>,
        pub(crate) run_clang_based_tests_with: Option<Utf8PathBuf>,
        pub(crate) src_root: Utf8PathBuf,
        pub(crate) src_test_suite_root: Utf8PathBuf,
        pub(crate) build_root: Utf8PathBuf,
        pub(crate) build_test_suite_root: Utf8PathBuf,
        pub(crate) sysroot_base: Utf8PathBuf,
        pub(crate) stage: u32,
        pub(crate) stage_id: String,
        pub(crate) mode: TestMode,
        pub(crate) suite: TestSuite,
        pub(crate) debugger: Option<Debugger>,
        pub(crate) run_ignored: bool,
        pub(crate) with_rustc_debug_assertions: bool,
        pub(crate) with_std_debug_assertions: bool,
        pub(crate) with_std_remap_debuginfo: bool,
        pub(crate) filters: Vec<String>,
        pub(crate) skip: Vec<String>,
        pub(crate) filter_exact: bool,
        pub(crate) force_pass_mode: Option<PassMode>,
        pub(crate) run: Option<bool>,
        pub(crate) runner: Option<String>,
        pub(crate) host_rustcflags: Vec<String>,
        pub(crate) target_rustcflags: Vec<String>,
        pub(crate) rust_randomized_layout: bool,
        pub(crate) optimize_tests: bool,
        pub(crate) target: String,
        pub(crate) host: String,
        pub(crate) cdb: Option<Utf8PathBuf>,
        pub(crate) cdb_version: Option<[u16; 4]>,
        pub(crate) gdb: Option<Utf8PathBuf>,
        pub(crate) gdb_version: Option<u32>,
        pub(crate) lldb: Option<Utf8PathBuf>,
        pub(crate) lldb_version: Option<u32>,
        pub(crate) llvm_version: Option<Version>,
        pub(crate) system_llvm: bool,
        pub(crate) android_cross_path: Option<Utf8PathBuf>,
        pub(crate) adb_path: Option<Utf8PathBuf>,
        pub(crate) adb_test_dir: Option<Utf8PathBuf>,
        pub(crate) adb_device_status: bool,
        pub(crate) verbose: bool,
        pub(crate) remote_test_client: Option<Utf8PathBuf>,
        pub(crate) compare_mode: Option<CompareMode>,
        pub(crate) rustfix_coverage: bool,
        pub(crate) has_enzyme: bool,
        pub(crate) has_offload: bool,
        pub(crate) channel: String,
        pub(crate) git_hash: bool,
        pub(crate) edition: Option<Edition>,
        pub(crate) cc: String,
        pub(crate) cxx: String,
        pub(crate) cflags: String,
        pub(crate) cxxflags: String,
        pub(crate) ar: String,
        pub(crate) target_linker: Option<String>,
        pub(crate) host_linker: Option<String>,
        pub(crate) llvm_components: String,
        pub(crate) nodejs: Option<Utf8PathBuf>,
        pub(crate) force_rerun: bool,
        pub(crate) only_modified: bool,
        pub(crate) target_cfgs: OnceLock<TargetCfgs>,
        pub(crate) builtin_cfg_names: OnceLock<HashSet<String>>,
        pub(crate) supported_crate_types: OnceLock<HashSet<String>>,
        pub(crate) capture: bool,
        pub(crate) nightly_branch: String,
        pub(crate) git_merge_commit_email: String,
        pub(crate) profiler_runtime: bool,
        pub(crate) diff_command: Option<String>,
        pub(crate) minicore_path: Utf8PathBuf,
        pub(crate) default_codegen_backend: CodegenBackend,
        pub(crate) override_codegen_backend: Option<String>,
        pub(crate) bypass_ignore_backends: bool,
        pub(crate) jobs: u32,
        pub(crate) parallel_frontend_threads: u32,
        pub(crate) iteration_count: u32,
    }

Expand description

Configuration for `compiletest` per invocation.

In terms of `bootstrap`, this means that `./x test tests/ui tests/run-make` actually correspond to two separate invocations of `compiletest`.

FIXME: this `Config` struct should be broken up into smaller logically contained sub-config structs, it’s too much of a “soup” of everything at the moment.

## §Configuration sources

Configuration values for `compiletest` comes from several sources:

- CLI args passed from `bootstrap` while running the `compiletest` binary.
- Env vars.
- Discovery (e.g. trying to identify a suitable debugger based on filesystem discovery).
- Cached output of running the `rustc` under test (e.g. output of `rustc` print requests).

FIXME: make sure we clearly account for sources of all config options.

FIXME: audit these options to make sure we are not hashing less than necessary for build stamp (for changed test detection).

## Fields§

§`bless: bool`

Some `TestMode`s support snapshot testing, where a reference snapshot of outputs (of `stdout`, `stderr`, or other form of artifacts) can be compared to the actual output.

This option can be set to `true` to update the reference snapshots in-place, otherwise `compiletest` will only try to compare.

§`fail_fast: bool`

Attempt to stop as soon as possible after any test fails. We may still run a few more tests before stopping when multiple test threads are used.

§`host_compile_lib_path: Utf8PathBuf`

Path to libraries needed to run the staged `rustc`-under-test on the host platform.

For example:

- `/home/ferris/rust/build/x86_64-unknown-linux-gnu/stage1/bin/lib`

§`target_run_lib_path: Utf8PathBuf`

Path to libraries needed to run the compiled executable for the target platform. This corresponds to the target sysroot libraries, including the target standard library.

For example:

- `/home/ferris/rust/build/x86_64-unknown-linux-gnu/stage1/lib/rustlib/i686-unknown-linux-gnu/lib`

FIXME: this is very under-documented in conjunction with the `remote-test-client` scheme and `RUNNER` scheme to actually run the target executable under the target platform environment, cf. `Self::remote_test_client` and `Self::runner`.

§`rustc_path: Utf8PathBuf`

Path to the `rustc`-under-test.

For `ui-fulldeps` test suite specifically:

- This is the stage 0 compiler when testing `ui-fulldeps` under `--stage=1`.
- This is the stage 2 compiler when testing `ui-fulldeps` under `--stage=2`.

See `Self::query_rustc_path` for the `--stage=1` `ui-fulldeps` scenario where a separate in-tree `rustc` is used for querying target information.

For example:

- `/home/ferris/rust/build/x86_64-unknown-linux-gnu/stage1/bin/rustc`

### §Note on forced stage0

It is possible for this `rustc` to be a stage 0 `rustc` if explicitly configured with the bootstrap option `build.compiletest-allow-stage0=true` and specifying `--stage=0`.

§`cargo_path: Option<Utf8PathBuf>`

Path to a staged host platform cargo executable (unless stage 0 is forced). This staged `cargo` is only used within `run-make` test recipes during recipe run time (and is not used to compile the test recipes), and so must be staged as there may be differences between e.g. beta `cargo` vs in-tree `cargo`.

For example:

- `/home/ferris/rust/build/x86_64-unknown-linux-gnu/stage1-tools-bin/cargo`

FIXME: maybe rename this to reflect that this is a staged host cargo.

§`stage0_rustc_path: Option<Utf8PathBuf>`

Path to the stage 0 `rustc` used to build `run-make` recipes. This must not be confused with `Self::rustc_path`.

For example:

- `/home/ferris/rust/build/x86_64-unknown-linux-gnu/stage0/bin/rustc`

§`query_rustc_path: Option<Utf8PathBuf>`

Path to the stage 1 or higher `rustc` used to obtain target information via `--print=all-target-specs-json` and similar queries.

Normally this is unset, because `Self::rustc_path` can be used instead. But when running “stage 1” ui-fulldeps tests, `rustc_path` is a stage 0 compiler, whereas target specs must be obtained from a stage 1+ compiler (in case the JSON format has changed since the last bootstrap bump).

§`rustdoc_path: Option<Utf8PathBuf>`

Path to the `rustdoc`-under-test. Like `Self::rustc_path`, this `rustdoc` is staged.

§`coverage_dump_path: Option<Utf8PathBuf>`

Path to the `src/tools/coverage-dump/` bootstrap tool executable.

§`python: String`

Path to the Python 3 executable to use for htmldocck and some run-make tests.

§`jsondocck_path: Option<Utf8PathBuf>`

Path to the `src/tools/jsondocck/` bootstrap tool executable.

§`jsondoclint_path: Option<Utf8PathBuf>`

Path to the `src/tools/jsondoclint/` bootstrap tool executable.

§`llvm_filecheck: Option<Utf8PathBuf>`

Path to a host LLVM `FileCheck` executable.

§`llvm_bin_dir: Option<Utf8PathBuf>`

Path to a host LLVM bintools directory.

For example:

- `/home/ferris/rust/build/x86_64-unknown-linux-gnu/llvm/bin`

§`run_clang_based_tests_with: Option<Utf8PathBuf>`

The path to the target `clang` executable to run `clang`-based tests with. If `None`, then these tests will be ignored.

§`src_root: Utf8PathBuf`

Path to the directory containing the sources. This corresponds to the root folder of a `rust-lang/rust` checkout.

For example:

- `/home/ferris/rust`

FIXME: this name is confusing, because this is actually `$checkout_root`, not the `$checkout_root/src/` folder.

§`src_test_suite_root: Utf8PathBuf`

Absolute path to the test suite directory.

For example:

- `/home/ferris/rust/tests/ui`
- `/home/ferris/rust/tests/coverage`

§`build_root: Utf8PathBuf`

Path to the top-level build directory used by bootstrap.

For example:

- `/home/ferris/rust/build`

§`build_test_suite_root: Utf8PathBuf`

Path to the build directory used by the current test suite.

For example:

- `/home/ferris/rust/build/x86_64-unknown-linux-gnu/test/ui`
- `/home/ferris/rust/build/x86_64-unknown-linux-gnu/test/coverage`

§`sysroot_base: Utf8PathBuf`

Path to the directory containing the sysroot of the `rustc`-under-test.

For example:

- `/home/ferris/rust/build/x86_64-unknown-linux-gnu/stage1`
- `/home/ferris/rust/build/x86_64-unknown-linux-gnu/stage2`

When stage 0 is forced, this will correspond to the sysroot of that specified stage 0 `rustc`.

FIXME: this name is confusing, because it doesn’t specify which compiler this sysroot corresponds to. It’s actually the `rustc`-under-test, and not the bootstrap `rustc`, unless stage 0 is forced and no custom stage 0 `rustc` was otherwise specified (so that it happens to run against the bootstrap `rustc`, but this non-custom bootstrap `rustc` case is not really supported).

§`stage: u32`

The number of the stage under test.

§`stage_id: String`

The id of the stage under test (stage1-xxx, etc).

FIXME: reconsider this string; this is hashed for test build stamp.

§`mode: TestMode`

The `TestMode`. E.g. `TestMode::Ui`. Each test mode can correspond to one or more test suites.

FIXME: stop using stringly-typed test suites!

§`suite: TestSuite`

The test suite.

Example: `tests/ui/` is `TestSuite::Ui` test suite, which happens to also be of the `TestMode::Ui` test mode.

Note that the same test suite (e.g. `tests/coverage/`) may correspond to multiple test modes, e.g. `tests/coverage/` can be run under both `TestMode::CoverageRun` and `TestMode::CoverageMap`.

§`debugger: Option<Debugger>`

When specified, only the specified `Debugger` will be used to run against the `tests/debuginfo` test suite. When unspecified, `compiletest` will attempt to find all three of {`lldb`, `cdb`, `gdb`} implicitly, and then try to run the `debuginfo` test suite against all three debuggers.

FIXME: this implicit behavior is really nasty, in that it makes it hard for the user to control which debugger(s) are available and used to run the debuginfo test suite. We should have `bootstrap` allow the user to explicitly configure the debuggers, and not try to implicitly discover some random debugger from the user environment. This makes the debuginfo test suite particularly hard to work with.

§`run_ignored: bool`

Run ignored tests unconditionally, overriding their ignore reason.

FIXME: this is wired up through the test execution logic, but not accessible from `bootstrap` directly; `compiletest` exposes this as `--ignored`. I.e. you’d have to use `./x test $test_suite -- --ignored=true`.

§`with_rustc_debug_assertions: bool`

Whether staged `rustc`-under-test was built with debug assertions.

FIXME: make it clearer that this refers to the staged `rustc`-under-test, not stage 0 `rustc`.

§`with_std_debug_assertions: bool`

Whether staged `std` was built with debug assertions.

FIXME: make it clearer that this refers to the staged `std`, not stage 0 `std`.

§`with_std_remap_debuginfo: bool`

Whether staged `std` was built with remapping of debuginfo.

FIXME: make it clearer that this refers to the staged `std`, not stage 0 `std`.

§`filters: Vec<String>`

Only run tests that match these filters (using `libtest` “test name contains” filter logic).

FIXME(#139660): the current hand-rolled test executor intentionally mimics the `libtest` “test name contains” filter matching logic to preserve previous `libtest` executor behavior, but this is often not intuitive. We should consider changing that behavior with an MCP to do test path prefix matching which better corresponds to how `compiletest` `tests/` are organized, and how users would intuitively expect the filtering logic to work like.

§`skip: Vec<String>`

Skip tests matching these substrings. The matching logic exactly corresponds to `Self::filters` but inverted.

FIXME(#139660): ditto on test matching behavior.

§`filter_exact: bool`

Exactly match the filter, rather than a substring.

FIXME(#139660): ditto on test matching behavior.

§`force_pass_mode: Option<PassMode>`

Force the pass mode of a check/build/run test to instead use this mode instead.

FIXME: make it even more obvious (especially in PR CI where `--pass=check` is used) when a pass mode is forced when the test fails, because it can be very non-obvious when e.g. an error is emitted only when `//@ build-pass` but not `//@ check-pass`.

§`run: Option<bool>`

Explicitly enable or disable running of the target test binary.

FIXME: this scheme is a bit confusing, and at times questionable. Re-evaluate this run scheme.

FIXME: Currently `--run` is a tri-state, it can be `--run={auto,always,never}`, and when `--run=auto` is specified, it’s run if the platform doesn’t end with `-fuchsia`. See `Config::run_enabled`.

§`runner: Option<String>`

A command line to prefix target program execution with, for running under valgrind for example, i.e. `$runner target.exe [args..]`. Similar to `CARGO_*_RUNNER` configuration.

Note: this is not to be confused with `Self::remote_test_client`, which is a different scheme.

FIXME: the runner scheme is very under-documented.

§`host_rustcflags: Vec<String>`

Compiler flags to pass to the staged `rustc`-under-test when building for the host platform.

§`target_rustcflags: Vec<String>`

Compiler flags to pass to the staged `rustc`-under-test when building for the target platform.

§`rust_randomized_layout: bool`

Whether the staged `rustc`-under-test and the associated staged `std` has been built with randomized struct layouts.

§`optimize_tests: bool`

Whether tests should be optimized by default (`-O`). Individual test suites and test files may override this setting.

FIXME: this flag / config option is somewhat misleading. For instance, in ui tests, it’s only applied to the `PassMode::Run` test crate and not its auxiliaries.

§`target: String`

Target platform tuple.

§`host: String`

Host platform tuple.

§`cdb: Option<Utf8PathBuf>`

Path to / name of the Microsoft Console Debugger (CDB) executable.

FIXME: this is an opt-in “override” option. When this isn’t provided, we try to conjure a cdb by looking at the user’s program files on Windows… See `debuggers::find_cdb`.

§`cdb_version: Option<[u16; 4]>`

Version of CDB.

FIXME: `cdb_version` is derived from cdb, but it’s not technically a config!

FIXME: audit cdb version gating.

§`gdb: Option<Utf8PathBuf>`

Path to / name of the GDB executable.

FIXME: the fallback path when `gdb` isn’t provided tries to find a `gdb` or `gdb.exe` from `PATH`, which is… arguably questionable.

FIXME: we are propagating a python from `PYTHONPATH`, not from an explicit config for gdb debugger script.

§`gdb_version: Option<u32>`

Version of GDB, encoded as ((major * 1000) + minor) * 1000 + patch

FIXME: this gdb version gating scheme is possibly questionable – gdb does not use semver, only its major version is likely materially meaningful, cf. https://sourceware.org/gdb/wiki/Internals%20Versions. Even the major version I’m not sure is super meaningful. Maybe min gdb `major.minor` version gating is sufficient for the purposes of debuginfo tests?

FIXME: `gdb_version` is derived from gdb, but it’s not technically a config!

§`lldb: Option<Utf8PathBuf>`

Path to or name of the LLDB executable to use for debuginfo tests.

§`lldb_version: Option<u32>`

Version of LLDB.

FIXME: `lldb_version` is derived from lldb, but it’s not technically a config!

§`llvm_version: Option<Version>`

Version of LLVM.

FIXME: Audit the fallback derivation of `crate::directives::extract_llvm_version_from_binary`, that seems very questionable?

§`system_llvm: bool`

Is LLVM a system LLVM.

§`android_cross_path: Option<Utf8PathBuf>`

Path to the android tools.

Note: this is only used for android gdb debugger script in the debuginfo test suite.

FIXME: take a look at this; this is piggy-backing off of gdb code paths but only for `arm-linux-androideabi` target.

§`adb_path: Option<Utf8PathBuf>`

Extra parameter to run adb on `arm-linux-androideabi`.

FIXME: is this only `arm-linux-androideabi`, or is it also for other Tier 2/3 android targets?

FIXME: take a look at this; this is piggy-backing off of gdb code paths but only for `arm-linux-androideabi` target.

§`adb_test_dir: Option<Utf8PathBuf>`

Extra parameter to run test suite on `arm-linux-androideabi`.

FIXME: is this only `arm-linux-androideabi`, or is it also for other Tier 2/3 android targets?

FIXME: take a look at this; this is piggy-backing off of gdb code paths but only for `arm-linux-androideabi` target.

§`adb_device_status: bool`

Status whether android device available or not. When unavailable, this will cause tests to panic when the test binary is attempted to be run.

FIXME: take a look at this; this also influences adb in gdb code paths in a strange way.

§`verbose: bool`

Verbose dump a lot of info.

FIXME: this is way too coarse; the user can’t select which info to verbosely dump.

§`remote_test_client: Option<Utf8PathBuf>`

Where to find the remote test client process, if we’re using it.

Note: this is only used for target platform executables created by `run-make` test recipes.

Note: this is not to be confused with `Self::runner`, which is a different scheme.

FIXME: the `remote_test_client` scheme is very under-documented.

§`compare_mode: Option<CompareMode>`

`CompareMode` describing what file the actual ui output will be compared to.

FIXME: currently, `CompareMode` is a mishmash of lot of things (different borrow-checker model, different trait solver, different debugger, etc.).

§`rustfix_coverage: bool`

If true, this will generate a coverage file with UI test files that run `MachineApplicable` diagnostics but are missing `run-rustfix` annotations. The generated coverage file is created in `$test_suite_build_root/rustfix_missing_coverage.txt`

§`has_enzyme: bool`

Whether to run `enzyme` autodiff tests.

§`has_offload: bool`

Whether to run `offload` autodiff tests.

§`channel: String`

The current Rust channel info.

FIXME: treat this more carefully; “stable”, “beta” and “nightly” are definitely valid, but channel might also be “dev” or such, which should be treated as “nightly”.

§`git_hash: bool`

Whether adding git commit information such as the commit hash has been enabled for building.

FIXME: `compiletest` cannot trust `bootstrap` for this information, because `bootstrap` can have bugs and had bugs on that logic. We need to figure out how to obtain this e.g. directly from CI or via git locally.

§`edition: Option<Edition>`

The default Rust edition.

§`cc: String`§`cxx: String`§`cflags: String`§`cxxflags: String`§`ar: String`§`target_linker: Option<String>`§`host_linker: Option<String>`§`llvm_components: String`§`nodejs: Option<Utf8PathBuf>`

Path to a NodeJS executable. Used for JS doctests, emscripten and WASM tests.

§`force_rerun: bool`

Whether to rerun tests even if the inputs are unchanged.

§`only_modified: bool`

Only rerun the tests that result has been modified according to `git status`.

FIXME: this is undocumented.

FIXME: how does this interact with `Self::force_rerun`?

§`target_cfgs: OnceLock<TargetCfgs>`§`builtin_cfg_names: OnceLock<HashSet<String>>`§`supported_crate_types: OnceLock<HashSet<String>>`§`capture: bool`

Should we capture console output that would be printed by test runners via their `stdout` and `stderr` trait objects, or via the custom panic hook.

The default is `true`. This can be disabled via the compiletest cli flag `--no-capture` (which mirrors the libtest `--no-capture` flag).

§`nightly_branch: String`

Needed both to construct `build_helper::git::GitConfig`.

§`git_merge_commit_email: String`§`profiler_runtime: bool`

True if the profiler runtime is enabled for this target. Used by the `needs-profiler-runtime` directive in test files.

§`diff_command: Option<String>`

Command for visual diff display, e.g. `diff-tool --color=always`.

§`minicore_path: Utf8PathBuf`

Path to minicore aux library (`tests/auxiliary/minicore.rs`), used for `no_core` tests that need `core` stubs in cross-compilation scenarios that do not otherwise want/need to `-Zbuild-std`. Used in e.g. ABI tests.

§`default_codegen_backend: CodegenBackend`

Current codegen backend used.

§`override_codegen_backend: Option<String>`

Name/path of the backend to use instead of `default_codegen_backend`.

§`bypass_ignore_backends: bool`

Whether to ignore `//@ ignore-backends`.

§`jobs: u32`

Number of parallel jobs configured for the build.

This is forwarded from bootstrap’s `jobs` configuration.

§`parallel_frontend_threads: u32`

Number of parallel threads to use for the frontend when building test artifacts.

§`iteration_count: u32`

Number of times to execute each test.

## Implementations§

Source§

### impl Config

Source

#### pub(crate) const DEFAULT_PARALLEL_FRONTEND_THREADS: u32 = 1

Source

#### pub(crate) const DEFAULT_ITERATION_COUNT: u32 = 1

Source

#### pub(crate) fn run_enabled(&self) -> bool

FIXME: this run scheme is… confusing.

Source

#### pub(crate) fn target_cfgs(&self) -> &TargetCfgs

Source

#### pub(crate) fn target_cfg(&self) -> &TargetCfg

Source

#### pub(crate) fn matches_arch(&self, arch: &str) -> bool

Source

#### pub(crate) fn matches_os(&self, os: &str) -> bool

Source

#### pub(crate) fn matches_env(&self, env: &str) -> bool

Source

#### pub(crate) fn matches_abi(&self, abi: &str) -> bool

Source

#### pub(crate) fn matches_family(&self, family: &str) -> bool

Source

#### pub(crate) fn is_big_endian(&self) -> bool

Source

#### pub(crate) fn get_pointer_width(&self) -> u32

Source

#### pub(crate) fn can_unwind(&self) -> bool

Source

#### pub(crate) fn builtin_cfg_names(&self) -> &HashSet<String>

Get the list of builtin, ‘well known’ cfg names

Source

#### pub(crate) fn supported_crate_types(&self) -> &HashSet<String>

Get the list of crate types that the target platform supports.

Source

#### pub(crate) fn has_threads(&self) -> bool

Source

#### pub(crate) fn has_asm_support(&self) -> bool

Source

#### pub(crate) fn git_config(&self) -> GitConfig<'_>

Source

#### pub(crate) fn has_subprocess_support(&self) -> bool

Source

#### pub(crate) fn parallel_frontend_enabled(&self) -> bool

Whether the parallel frontend is enabled, which is the case when `parallel_frontend_threads` is not set to `1`.

- `0` means auto-detect: use the number of available hardware threads on the host. But we treat it as the parallel frontend being enabled in this case.
- `1` means single-threaded (parallel frontend disabled).
- `>1` means an explicitly configured thread count.

Source§

### impl Config

Source

#### fn parse_and_update_revisions( &self, line: &DirectiveLine<'_>, existing: &mut Vec<String>, )

Source

#### fn parse_env(nv: String) -> (String, String)

Source

#### fn parse_pp_exact(&self, line: &DirectiveLine<'_>) -> Option<Utf8PathBuf>

Source

#### fn parse_custom_normalization( &self, line: &DirectiveLine<'_>, ) -> Option<NormalizeRule>

Source

#### fn parse_name_directive( &self, line: &DirectiveLine<'_>, directive: &str, ) -> bool

Source

#### fn parse_name_value_directive( &self, line: &DirectiveLine<'_>, directive: &str, ) -> Option<String>

Source

#### fn set_name_directive( &self, line: &DirectiveLine<'_>, directive: &str, value: &mut bool, )

Source

#### fn set_name_value_directive<T>( &self, line: &DirectiveLine<'_>, directive: &str, value: &mut Option<T>, parse: impl FnOnce(String) -> T, )

Source

#### fn push_name_value_directive<T>( &self, line: &DirectiveLine<'_>, directive: &str, values: &mut Vec<T>, parse: impl FnOnce(String) -> T, )

## Trait Implementations§

Source§

### impl Clone for Config

Source§

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

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 Config

Source§

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

Formats the value using the given formatter. Read more

## Auto Trait Implementations§

§

### impl !Freeze for Config

§

### impl RefUnwindSafe for Config

§

### impl Send for Config

§

### impl Sync for Config

§

### impl Unpin for Config

§

### impl UnsafeUnpin for Config

§

### impl UnwindSafe for Config

## 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.

§

### impl<T> Instrument for T

§

#### fn instrument(self, span: Span) -> Instrumented<Self>

Instruments this type with the provided [`Span`], returning an `Instrumented` wrapper. Read more
§

#### fn in_current_span(self) -> Instrumented<Self>

Instruments this type with the current `Span`, returning an `Instrumented` wrapper. Read more
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.

Source§

### impl<T> IntoEither for T

Source§

#### fn into_either(self, into_left: bool) -> Either<Self, Self>

Converts `self` into a `Left` variant of `Either<Self, Self>` if `into_left` is `true`. Converts `self` into a `Right` variant of `Either<Self, Self>` otherwise. Read more
Source§

#### fn into_either_with<F>(self, into_left: F) -> Either<Self, Self>
where F: FnOnce(&Self) -> bool,

Converts `self` into a `Left` variant of `Either<Self, Self>` if `into_left(&self)` returns `true`. Converts `self` into a `Right` variant of `Either<Self, Self>` otherwise. Read more
§

### 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> 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.
§

### impl<T> WithSubscriber for T

§

#### fn with_subscriber<S>(self, subscriber: S) -> WithDispatch<Self>
where S: Into<Dispatch>,

Attaches the provided `Subscriber` to this type, returning a [`WithDispatch`] wrapper. Read more
§

#### fn with_current_subscriber(self) -> WithDispatch<Self>

Attaches the current default `Subscriber` to this type, returning a [`WithDispatch`] wrapper. Read more

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