Struct rustc_ap_rustc_ast::ast::Lit [−][src]
Expand description
An AST literal.
Fields
token: LitThe original literal token as written in source code.
kind: LitKindThe “semantic” representation of the literal lowered from the original tokens. Strings are unescaped, hexadecimal forms are eliminated, etc. FIXME: Remove this and only create the semantic representation during lowering to HIR.
span: SpanImplementations
Converts literal token into an AST literal.
Converts arbitrary token into an AST literal.
Keep this in sync with Token::can_begin_literal_or_bool excluding unary negation.
Attempts to recover an AST literal from semantic literal. This function is used when the original token doesn’t exist (e.g. the literal is created by an AST-based macro) or unavailable (e.g. from HIR pretty-printing).
Trait Implementations
Auto Trait Implementations
impl !RefUnwindSafe for Litimpl UnwindSafe for LitBlanket Implementations
Mutably borrows from an owned value. Read more
Instruments this type with the provided Span, returning an
Instrumented wrapper. Read more
type Output = T
type Output = TShould always be Self
pub fn vzip(self) -> V