Enum rustfmt_nightly::ErrorKind[−][src]

pub enum ErrorKind {
    LineOverflow(usize, usize),
    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(usize, usize)

Tuple Fields

0: usize
1: usize

Line has exceeded character limit (found, maximum).

TrailingWhitespace

Line ends in whitespace.

BadIssue(Issue)

Tuple Fields

0: Issue

TODO or FIXME item without an issue number.

LicenseCheck

License check has failed.

DeprecatedAttr

Used deprecated skip attribute.

BadAttr

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

IoError(Error)

Tuple Fields

0: Error

An io error during reading or writing.

ModuleResolutionError(ModuleResolutionError)

Tuple Fields

Error during module resolution.

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)

Tuple Fields

0: Error

Invalid glob pattern in ignore configuration option.

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:

  • LineOverflow: 23 bytes
  • TrailingWhitespace: 0 bytes
  • BadIssue: 2 bytes
  • LicenseCheck: 0 bytes
  • DeprecatedAttr: 0 bytes
  • BadAttr: 0 bytes
  • IoError: 23 bytes
  • ModuleResolutionError: 63 bytes
  • ParseError: 0 bytes
  • VersionMismatch: 0 bytes
  • LostComment: 0 bytes
  • InvalidGlobPattern: 63 bytes