Enum rustfmt_nightly::ErrorKind
source · pub enum ErrorKind {
LineOverflow(usize, usize),
TrailingWhitespace,
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)
Line has exceeded character limit (found, maximum).
TrailingWhitespace
Line ends in whitespace.
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.
ModuleResolutionError(ModuleResolutionError)
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)
Invalid glob pattern in ignore
configuration option.
Implementations§
Trait Implementations§
source§impl Error for ErrorKind
impl Error for ErrorKind
source§fn source(&self) -> Option<&(dyn Error + 'static)>
fn source(&self) -> Option<&(dyn Error + 'static)>
1.0.0 · source§fn description(&self) -> &str
fn description(&self) -> &str
source§impl From<ModuleResolutionError> for ErrorKind
impl From<ModuleResolutionError> for ErrorKind
source§fn from(source: ModuleResolutionError) -> Self
fn from(source: ModuleResolutionError) -> Self
Auto Trait Implementations§
impl !RefUnwindSafe for ErrorKind
impl Send for ErrorKind
impl Sync for ErrorKind
impl Unpin for ErrorKind
impl !UnwindSafe for ErrorKind
Blanket Implementations§
source§impl<T> BorrowMut<T> for Twhere
T: ?Sized,
impl<T> BorrowMut<T> for Twhere T: ?Sized,
source§fn borrow_mut(&mut self) -> &mut T
fn borrow_mut(&mut self) -> &mut T
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: 80 bytes
Size for each variant:
LineOverflow
: 24 bytesTrailingWhitespace
: 0 bytesDeprecatedAttr
: 0 bytesBadAttr
: 0 bytesIoError
: 16 bytesModuleResolutionError
: 80 bytesParseError
: 0 bytesVersionMismatch
: 0 bytesLostComment
: 0 bytesInvalidGlobPattern
: 64 bytes