[][src]Struct syntax::sess::ParseSess

pub struct ParseSess {
    pub span_diagnostic: Handler,
    pub unstable_features: UnstableFeatures,
    pub config: HashSet<(Symbol, Option<Symbol>), BuildHasherDefault<FxHasher>>,
    pub edition: Edition,
    pub missing_fragment_specifiers: Lock<HashSet<Span, BuildHasherDefault<FxHasher>>>,
    pub raw_identifier_spans: Lock<Vec<Span>>,
    pub included_mod_stack: Lock<Vec<PathBuf>>,
    source_map: Rc<SourceMap>,
    pub buffered_lints: Lock<Vec<BufferedEarlyLint>>,
    pub ambiguous_block_expr_parse: Lock<HashMap<Span, Span, BuildHasherDefault<FxHasher>>>,
    pub injected_crate_name: Once<Symbol>,
    pub gated_spans: GatedSpans,
    pub reached_eof: Lock<bool>,
}
⚙️ This is an internal compiler API. (rustc_private)

This crate is being loaded from the sysroot, a permanently unstable location for private compiler dependencies. It is not intended for general use. Prefer using a public version of this crate from crates.io via Cargo.toml.

Info about a parsing session.

Fields

span_diagnostic: Handler
⚙️ This is an internal compiler API. (rustc_private)

This crate is being loaded from the sysroot, a permanently unstable location for private compiler dependencies. It is not intended for general use. Prefer using a public version of this crate from crates.io via Cargo.toml.

unstable_features: UnstableFeatures
⚙️ This is an internal compiler API. (rustc_private)

This crate is being loaded from the sysroot, a permanently unstable location for private compiler dependencies. It is not intended for general use. Prefer using a public version of this crate from crates.io via Cargo.toml.

config: HashSet<(Symbol, Option<Symbol>), BuildHasherDefault<FxHasher>>
⚙️ This is an internal compiler API. (rustc_private)

This crate is being loaded from the sysroot, a permanently unstable location for private compiler dependencies. It is not intended for general use. Prefer using a public version of this crate from crates.io via Cargo.toml.

edition: Edition
⚙️ This is an internal compiler API. (rustc_private)

This crate is being loaded from the sysroot, a permanently unstable location for private compiler dependencies. It is not intended for general use. Prefer using a public version of this crate from crates.io via Cargo.toml.

missing_fragment_specifiers: Lock<HashSet<Span, BuildHasherDefault<FxHasher>>>
⚙️ This is an internal compiler API. (rustc_private)

This crate is being loaded from the sysroot, a permanently unstable location for private compiler dependencies. It is not intended for general use. Prefer using a public version of this crate from crates.io via Cargo.toml.

raw_identifier_spans: Lock<Vec<Span>>
⚙️ This is an internal compiler API. (rustc_private)

This crate is being loaded from the sysroot, a permanently unstable location for private compiler dependencies. It is not intended for general use. Prefer using a public version of this crate from crates.io via Cargo.toml.

Places where raw identifiers were used. This is used for feature-gating raw identifiers.

included_mod_stack: Lock<Vec<PathBuf>>
⚙️ This is an internal compiler API. (rustc_private)

This crate is being loaded from the sysroot, a permanently unstable location for private compiler dependencies. It is not intended for general use. Prefer using a public version of this crate from crates.io via Cargo.toml.

Used to determine and report recursive module inclusions.

source_map: Rc<SourceMap>
⚙️ This is an internal compiler API. (rustc_private)

This crate is being loaded from the sysroot, a permanently unstable location for private compiler dependencies. It is not intended for general use. Prefer using a public version of this crate from crates.io via Cargo.toml.

buffered_lints: Lock<Vec<BufferedEarlyLint>>
⚙️ This is an internal compiler API. (rustc_private)

This crate is being loaded from the sysroot, a permanently unstable location for private compiler dependencies. It is not intended for general use. Prefer using a public version of this crate from crates.io via Cargo.toml.

ambiguous_block_expr_parse: Lock<HashMap<Span, Span, BuildHasherDefault<FxHasher>>>
⚙️ This is an internal compiler API. (rustc_private)

This crate is being loaded from the sysroot, a permanently unstable location for private compiler dependencies. It is not intended for general use. Prefer using a public version of this crate from crates.io via Cargo.toml.

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.

injected_crate_name: Once<Symbol>
⚙️ This is an internal compiler API. (rustc_private)

This crate is being loaded from the sysroot, a permanently unstable location for private compiler dependencies. It is not intended for general use. Prefer using a public version of this crate from crates.io via Cargo.toml.

gated_spans: GatedSpans
⚙️ This is an internal compiler API. (rustc_private)

This crate is being loaded from the sysroot, a permanently unstable location for private compiler dependencies. It is not intended for general use. Prefer using a public version of this crate from crates.io via Cargo.toml.

reached_eof: Lock<bool>
⚙️ This is an internal compiler API. (rustc_private)

This crate is being loaded from the sysroot, a permanently unstable location for private compiler dependencies. It is not intended for general use. Prefer using a public version of this crate from crates.io via Cargo.toml.

The parser has reached Eof due to an unclosed brace. Used to silence unnecessary errors.

Methods

impl ParseSess[src]

pub fn new(file_path_mapping: FilePathMapping) -> ParseSess[src]

⚙️ This is an internal compiler API. (rustc_private)

This crate is being loaded from the sysroot, a permanently unstable location for private compiler dependencies. It is not intended for general use. Prefer using a public version of this crate from crates.io via Cargo.toml.

pub fn with_span_handler(
    handler: Handler,
    source_map: Rc<SourceMap>
) -> ParseSess
[src]

⚙️ This is an internal compiler API. (rustc_private)

This crate is being loaded from the sysroot, a permanently unstable location for private compiler dependencies. It is not intended for general use. Prefer using a public version of this crate from crates.io via Cargo.toml.

pub fn with_silent_emitter() -> ParseSess[src]

⚙️ This is an internal compiler API. (rustc_private)

This crate is being loaded from the sysroot, a permanently unstable location for private compiler dependencies. It is not intended for general use. Prefer using a public version of this crate from crates.io via Cargo.toml.

pub fn source_map(&self) -> &SourceMap[src]

⚙️ This is an internal compiler API. (rustc_private)

This crate is being loaded from the sysroot, a permanently unstable location for private compiler dependencies. It is not intended for general use. Prefer using a public version of this crate from crates.io via Cargo.toml.

pub fn buffer_lint(
    &self,
    lint_id: &'static Lint,
    span: impl Into<MultiSpan>,
    id: NodeId,
    msg: &str
)
[src]

⚙️ This is an internal compiler API. (rustc_private)

This crate is being loaded from the sysroot, a permanently unstable location for private compiler dependencies. It is not intended for general use. Prefer using a public version of this crate from crates.io via Cargo.toml.

pub fn expr_parentheses_needed(
    &self,
    err: &mut DiagnosticBuilder,
    span: Span,
    alt_snippet: Option<String>
)
[src]

⚙️ This is an internal compiler API. (rustc_private)

This crate is being loaded from the sysroot, a permanently unstable location for private compiler dependencies. It is not intended for general use. Prefer using a public version of this crate from crates.io via Cargo.toml.

Extend an error with a suggestion to wrap an expression with parentheses to allow the parser to continue parsing the following operation as part of the same expression.

Auto Trait Implementations

impl !Send for ParseSess

impl !Sync for ParseSess

impl Unpin for ParseSess

impl !UnwindSafe for ParseSess

impl !RefUnwindSafe for ParseSess

Blanket Implementations

impl<T> From<T> for T[src]

impl<T, U> Into<U> for T where
    U: From<T>, 
[src]

impl<T, U> TryFrom<U> for T where
    U: Into<T>, 
[src]

type Error = !

The type returned in the event of a conversion error.

impl<T, U> TryInto<U> for T where
    U: TryFrom<T>, 
[src]

type Error = <U as TryFrom<T>>::Error

The type returned in the event of a conversion error.

impl<T> Borrow<T> for T where
    T: ?Sized
[src]

impl<T> BorrowMut<T> for T where
    T: ?Sized
[src]

impl<T> Any for T where
    T: 'static + ?Sized
[src]

impl<T> Erased for T[src]

impl<E> SpecializationError for E[src]