ParseSess in rustc_session::parse - Rust (original) (raw)

pub struct ParseSess {Show 17 fields
    dcx: DiagCtxt,
    pub unstable_features: UnstableFeatures,
    pub config: Cfg,
    pub check_config: CheckCfg,
    pub edition: Edition,
    pub raw_identifier_spans: AppendOnlyVec<Span>,
    pub bad_unicode_identifiers: Lock<FxIndexMap<Symbol, Vec<Span>>>,
    source_map: Arc<SourceMap>,
    pub buffered_lints: Lock<Vec<BufferedEarlyLint>>,
    pub ambiguous_block_expr_parse: Lock<FxIndexMap<Span, Span>>,
    pub gated_spans: GatedSpans,
    pub symbol_gallery: SymbolGallery,
    pub env_depinfo: Lock<FxIndexSet<(Symbol, Option<Symbol>)>>,
    pub file_depinfo: Lock<FxIndexSet<Symbol>>,
    pub assume_incomplete_release: bool,
    proc_macro_quoted_spans: AppendOnlyVec<Span>,
    pub attr_id_generator: AttrIdGenerator,
}

Expand description

Info about a parsing session.

Places where raw identifiers were used. This is used to avoid complaining about idents clashing with keywords in new editions.

Places where identifiers that contain invalid Unicode codepoints but that look like they should be. Useful to avoid bad tokenization when encountering emoji. We group them to provide a single error per unique incorrect identifier.

Contains the spans of block expressions that could have been incomplete based on the operation token that followed it, but that the parser cannot identify without further analysis.

Environment variables accessed during the build and their values when they exist.

File paths accessed during the build.

Whether cfg(version) should treat the current release as incomplete

Spans passed to proc_macro::quote_span. Each span has a numerical identifier represented by its position in the vector.

Used to generate new AttrIds. Every AttrId is unique.

§

§

§

§

§

§

§

§

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