Struct rustc_ap_rustc_session::parse::ParseSess [−][src]
pub struct ParseSess {}Show fields
pub span_diagnostic: Handler, pub unstable_features: UnstableFeatures, pub config: CrateConfig, pub edition: Edition, pub missing_fragment_specifiers: Lock<FxHashMap<Span, NodeId>>, pub raw_identifier_spans: Lock<Vec<Span>>, pub buffered_lints: Lock<Vec<BufferedEarlyLint>>, pub ambiguous_block_expr_parse: Lock<FxHashMap<Span, Span>>, pub gated_spans: GatedSpans, pub symbol_gallery: SymbolGallery, pub reached_eof: Lock<bool>, pub env_depinfo: Lock<FxHashSet<(Symbol, Option<Symbol>)>>, pub type_ascription_path_suggestions: Lock<FxHashSet<Span>>, pub assume_incomplete_release: bool, // some fields omitted
Expand description
Info about a parsing session.
Fields
span_diagnostic: Handler
unstable_features: UnstableFeatures
config: CrateConfig
edition: Edition
missing_fragment_specifiers: Lock<FxHashMap<Span, NodeId>>
raw_identifier_spans: Lock<Vec<Span>>
Expand description
Places where raw identifiers were used. This is used for feature-gating raw identifiers.
buffered_lints: Lock<Vec<BufferedEarlyLint>>
ambiguous_block_expr_parse: Lock<FxHashMap<Span, Span>>
Expand description
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.
gated_spans: GatedSpans
symbol_gallery: SymbolGallery
reached_eof: Lock<bool>
Expand description
The parser has reached Eof
due to an unclosed brace. Used to silence unnecessary errors.
env_depinfo: Lock<FxHashSet<(Symbol, Option<Symbol>)>>
Expand description
Environment variables accessed during the build and their values when they exist.
type_ascription_path_suggestions: Lock<FxHashSet<Span>>
Expand description
All the type ascriptions expressions that have had a suggestion for likely path typo.
assume_incomplete_release: bool
Expand description
Whether cfg(version) should treat the current release as incomplete
Implementations
impl ParseSess
[src]
impl ParseSess
[src]pub fn new(file_path_mapping: FilePathMapping) -> Self
[src]
pub fn new(file_path_mapping: FilePathMapping) -> Self
[src]Used for testing.
pub fn with_span_handler(handler: Handler, source_map: Lrc<SourceMap>) -> Self
[src]
pub fn with_silent_emitter() -> Self
[src]
pub fn source_map(&self) -> &SourceMap
[src]
pub fn clone_source_map(&self) -> Lrc<SourceMap>
[src]
pub fn buffer_lint(
&self,
lint: &'static Lint,
span: impl Into<MultiSpan>,
node_id: NodeId,
msg: &str
)
[src]
&self,
lint: &'static Lint,
span: impl Into<MultiSpan>,
node_id: NodeId,
msg: &str
)
pub fn buffer_lint_with_diagnostic(
&self,
lint: &'static Lint,
span: impl Into<MultiSpan>,
node_id: NodeId,
msg: &str,
diagnostic: BuiltinLintDiagnostics
)
[src]
&self,
lint: &'static Lint,
span: impl Into<MultiSpan>,
node_id: NodeId,
msg: &str,
diagnostic: BuiltinLintDiagnostics
)
pub fn expr_parentheses_needed(
&self,
err: &mut DiagnosticBuilder<'_>,
span: Span,
alt_snippet: Option<String>
)
[src]
pub fn expr_parentheses_needed(
&self,
err: &mut DiagnosticBuilder<'_>,
span: Span,
alt_snippet: Option<String>
)
[src]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 !RefUnwindSafe for ParseSess
impl !Send for ParseSess
impl !Sync for ParseSess
impl Unpin for ParseSess
impl !UnwindSafe for ParseSess
Blanket Implementations
impl<T> BorrowMut<T> for T where
T: ?Sized,
[src]
impl<T> BorrowMut<T> for T where
T: ?Sized,
[src]pub fn borrow_mut(&mut self) -> &mut T
[src]
pub fn borrow_mut(&mut self) -> &mut T
[src]Mutably borrows from an owned value. Read more
impl<T> Instrument for T
[src]
impl<T> Instrument for T
[src]fn instrument(self, span: Span) -> Instrumented<Self>
[src]
fn instrument(self, span: Span) -> Instrumented<Self>
[src]Instruments this type with the provided Span
, returning an
Instrumented
wrapper. Read more
fn in_current_span(self) -> Instrumented<Self>
[src]
fn in_current_span(self) -> Instrumented<Self>
[src]impl<T> MaybeResult<T> for T
[src]
impl<T> MaybeResult<T> for T
[src]impl<T> Same<T> for T
impl<T> Same<T> for T
type Output = T
type Output = T
Should always be Self
impl<V, T> VZip<V> for T where
V: MultiLane<T>,
impl<V, T> VZip<V> for T where
V: MultiLane<T>,
pub fn vzip(self) -> V
impl<'a, T> Captures<'a> for T where
T: ?Sized,
[src]
T: ?Sized,