StashKey in rustc_errors - Rust (original) (raw)
pub enum StashKey {
ItemNoType,
UnderscoreForArrayLengths,
EarlySyntaxWarning,
CallIntoMethod,
LifetimeIsChar,
MaybeFruTypo,
CallAssocMethod,
AssociatedTypeSuggestion,
Cycle,
UndeterminedMacroResolution,
ExprInPat,
GenericInFieldExpr,
}
Expand description
A key denoting where from a diagnostic was stashed.
When an invalid lifetime e.g. '2
should be reinterpreted as a char literal in the parser
Maybe there was a typo where a comma was forgotten before FRU syntax
Query cycle detected, stashing in favor of a better error.
Used by Parser::maybe_recover_trailing_expr
If in the parser we detect a field expr with turbofish generic params it’s possible that it’s a method call without parens. If later on in hir_typeck
we find out that this is the case we suppress this message and we give a better suggestion.
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: 1 byte
Size for each variant:
ItemNoType
: 0 bytesUnderscoreForArrayLengths
: 0 bytesEarlySyntaxWarning
: 0 bytesCallIntoMethod
: 0 bytesLifetimeIsChar
: 0 bytesMaybeFruTypo
: 0 bytesCallAssocMethod
: 0 bytesAssociatedTypeSuggestion
: 0 bytesCycle
: 0 bytesUndeterminedMacroResolution
: 0 bytesExprInPat
: 0 bytesGenericInFieldExpr
: 0 bytes