Enum rustfmt_nightly::ErrorKind[][src]

pub enum ErrorKind {
    LineOverflow(usizeusize),
    TrailingWhitespace,
    BadIssue(Issue),
    LicenseCheck,
    DeprecatedAttr,
    BadAttr,
    IoError(Error),
    ModuleResolutionError(ModuleResolutionError),
    ParseError,
    VersionMismatch,
    LostComment,
    InvalidGlobPattern(Error),
}
Expand description

The various errors that can occur during formatting. Note that not all of these can currently be propagated to clients.

Variants

LineOverflow(usizeusize)

Line has exceeded character limit (found, maximum).

Tuple Fields of LineOverflow

0: usize1: usize
TrailingWhitespace

Line ends in whitespace.

BadIssue(Issue)

TODO or FIXME item without an issue number.

Tuple Fields of BadIssue

0: Issue
LicenseCheck

License check has failed.

DeprecatedAttr

Used deprecated skip attribute.

BadAttr

Used a rustfmt:: attribute other than skip or skip::macros.

IoError(Error)

An io error during reading or writing.

Tuple Fields of IoError

0: Error
ModuleResolutionError(ModuleResolutionError)

Error during module resolution.

Tuple Fields of ModuleResolutionError

0: ModuleResolutionError
ParseError

Parse error occurred when parsing the input.

VersionMismatch

The user mandated a version and the current version of Rustfmt does not satisfy that requirement.

LostComment

If we had formatted the given node, then we would have lost a comment.

InvalidGlobPattern(Error)

Invalid glob pattern in ignore configuration option.

Tuple Fields of InvalidGlobPattern

0: Error

Implementations

Trait Implementations

Formats the value using the given formatter. Read more

Formats the value using the given formatter. Read more

The lower-level source of this error, if any. Read more

🔬 This is a nightly-only experimental API. (backtrace)

Returns a stack backtrace, if available, of where this error occurred. Read more

👎 Deprecated since 1.42.0:

use the Display impl or to_string()

👎 Deprecated since 1.33.0:

replaced by Error::source, which can support downcasting

Performs the conversion.

Performs the conversion.

Auto Trait Implementations

Blanket Implementations

Gets the TypeId of self. Read more

Immutably borrows from an owned value. Read more

Mutably borrows from an owned value. Read more

Performs the conversion.

Performs the conversion.

Converts the given value to a String. Read more

The type returned in the event of a conversion error.

Performs the conversion.

The type returned in the event of a conversion 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: 64 bytes

Size for each variant: