Skip to main content

ToolchainError

Enum ToolchainError 

Source
pub enum ToolchainError {
Show 18 variants VswhereMissing { path: PathBuf, }, VswhereFailed { detail: String, }, NoVisualStudio, ClVersionUnknown { path: PathBuf, }, NoWindowsSdk { looked_in: Vec<PathBuf>, }, UnknownCompiler { name: String, source: String, }, UnsupportedCompiler { name: String, source: String, }, CompilerNotFound { compiler: &'static str, }, NoUsableCompiler { compiler: &'static str, excluded: Vec<String>, }, NoMatchingVersion { compiler: &'static str, requirements: Vec<String>, found: Vec<Version>, }, InvalidVersionRequirement { compiler: String, text: String, }, VisualStudioNotAt { path: PathBuf, }, RejectedByStl { compiler: &'static str, version: Version, needed: Option<String>, message: String, }, GccUnreadable { path: PathBuf, asked: &'static str, output: String, }, ProbeFailed { compiler: &'static str, output: String, }, EditionNotSupported { compiler: &'static str, version: Version, edition: &'static str, needed: Version, }, ConfiguredToolMissing { setting: String, path: PathBuf, }, ConfiguredToolUnusable { setting: String, path: PathBuf, why: String, },
}
Expand description

A toolchain problem.

Variants§

§

VswhereMissing

vswhere.exe is not where every Visual Studio 2017+ installer puts it.

Fields

§path: PathBuf

Where it was looked for.

§

VswhereFailed

vswhere.exe ran but failed, or printed something that is not its JSON.

Fields

§detail: String

What went wrong, with vswhere’s own output when it gave any.

§

NoVisualStudio

No Visual Studio or Build Tools installation has the C++ x64 tools.

§

ClVersionUnknown

cl.exe could not be run, or printed no version.

Fields

§path: PathBuf

The cl.exe that was run.

§

NoWindowsSdk

No Windows SDK with the x64 headers and libraries.

Fields

§looked_in: Vec<PathBuf>

The SDK directories looked in, in order.

§

UnknownCompiler

A compiler name cuno does not know.

Fields

§name: String

The name.

§source: String

Where it was given (CUNO_COMPILER, …).

§

UnsupportedCompiler

A compiler cuno does not support yet (gcc, safec).

Fields

§name: String

The name.

§source: String

Where it was chosen.

§

CompilerNotFound

No copy of the chosen compiler was found.

Fields

§compiler: &'static str

The compiler (clang).

§

NoUsableCompiler

Copies were found, but none is eligible (a preview, a MinGW build, one that does not run).

Fields

§compiler: &'static str

The compiler.

§excluded: Vec<String>

Each copy found, with why it was left out.

§

NoMatchingVersion

Copies were found, but none satisfies the requirements.

Fields

§compiler: &'static str

The compiler.

§requirements: Vec<String>

Each requirement, with where it comes from.

§found: Vec<Version>

The versions found.

§

InvalidVersionRequirement

A [toolchain.version] value that is not a requirement.

Fields

§compiler: String

The compiler it is for.

§text: String

The value as written.

§

VisualStudioNotAt

[toolchain.paths] msvc names a directory with no usable Visual Studio.

Fields

§path: PathBuf

The directory.

§

RejectedByStl

The MSVC standard library rejects this Clang (STL1000).

Fields

§compiler: &'static str

The compiler (clang, clang-cl).

§version: Version

Its version.

§needed: Option<String>

The Clang version the library asks for, as written, if it says.

§message: String

The library’s message.

§

GccUnreadable

The GCC selected did not say where its headers or libraries are (toolchain.md, “MinGW (GCC)”), which the build needs to know.

Fields

§path: PathBuf

The gcc.

§asked: &'static str

What it was asked.

§output: String

What it printed, or why it could not run.

§

ProbeFailed

The standard library probe failed for another reason, so no verdict.

Fields

§compiler: &'static str

The compiler.

§output: String

What it printed, or why it could not run.

§

EditionNotSupported

The selected compiler is too old for the package’s edition.

Fields

§compiler: &'static str

The compiler.

§version: Version

Its version.

§edition: &'static str

The edition, as written.

§needed: Version

The oldest version that accepts it.

§

ConfiguredToolMissing

A tool path the user configured has no file.

Fields

§setting: String

The setting, such as [toolchain.paths] clang-tidy.

§path: PathBuf

The path it gives.

§

ConfiguredToolUnusable

A tool path the user configured names a tool that cannot be used (it does not run, prints no version, is a preview, or targets MinGW).

Fields

§setting: String

The setting, such as [toolchain.paths] clang-tidy.

§path: PathBuf

The path it gives.

§why: String

Why it cannot be used, such as it did not run.

Trait Implementations§

Source§

impl Clone for ToolchainError

Source§

fn clone(&self) -> Self

Returns a duplicate of the value. Read more
1.0.0 (const: unstable) · Source§

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

Performs copy-assignment from source. Read more
Source§

impl CunoError for ToolchainError

Source§

fn exit_class(&self) -> ExitClass

Which exit code this error leads to.
Source§

fn help(&self) -> Option<String>

How to fix the problem, shown on a help: line.
Source§

impl Debug for ToolchainError

Source§

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

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

impl Display for ToolchainError

Source§

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

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

impl Error for ToolchainError

1.30.0 · Source§

fn source(&self) -> Option<&(dyn Error + 'static)>

Returns the lower-level source of this error, if any. Read more
1.0.0 · Source§

fn description(&self) -> &str

👎Deprecated since 1.42.0:

use the Display impl or to_string()

1.0.0 · Source§

fn cause(&self) -> Option<&dyn Error>

👎Deprecated since 1.33.0:

replaced by Error::source, which can support downcasting

Replaced by Error::source.
Source§

fn provide<'a>(&'a self, request: &mut Request<'a>)

🔬This is a nightly-only experimental API. (error_generic_member_access)
Provides type-based access to context intended for error reports. Read more

Auto Trait Implementations§

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.

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> ToString for T
where T: Display + ?Sized,

Source§

fn to_string(&self) -> String

Converts the given value to a String. Read more
Source§

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

Source§

type Error = !

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

fn try_from(value: U) -> Result<T, !>

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.