MetaItemLit in rustc_ast::ast - Rust (original) (raw)

pub struct MetaItemLit {
    pub symbol: Symbol,
    pub suffix: Option<Symbol>,
    pub kind: LitKind,
    pub span: Span,
}

Expand description

A literal in a meta item.

The original literal as written in the source code.

The original suffix as written in the source code.

The “semantic” representation of the literal lowered from the original tokens. Strings are unescaped, hexadecimal forms are eliminated, etc.

Source§

Source

Converts a token literal into a meta item literal.

Source

Cheaply converts a meta item literal into a token literal.

Source

Converts an arbitrary token into meta item literal.

Source§

Source

§

§

§

§

§

§

§

§

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: 40 bytes