[−][src]Struct rustc_ap_syntax::sess::ParseSess
Info about a parsing session.
Fields
span_diagnostic: Handler
unstable_features: UnstableFeatures
config: CrateConfig
edition: Edition
missing_fragment_specifiers: Lock<FxHashSet<Span>>
raw_identifier_spans: Lock<Vec<Span>>
Places where raw identifiers were used. This is used for feature-gating raw identifiers.
included_mod_stack: Lock<Vec<PathBuf>>
Used to determine and report recursive module inclusions.
buffered_lints: Lock<Vec<BufferedEarlyLint>>
ambiguous_block_expr_parse: Lock<FxHashMap<Span, Span>>
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>
gated_spans: GatedSpans
reached_eof: Lock<bool>
The parser has reached Eof
due to an unclosed brace. Used to silence unnecessary errors.
process_cfg_mod: ProcessCfgMod
Process the potential cfg
attributes on a module.
Also determine if the module should be included in this configuration.
HACK(Centril): This is used to break a cyclic dependency between
the parser and cfg-stripping as defined in syntax_expand::config
.
The dependency edge from the parser comes from parse_item_mod
.
A principled solution to this hack would be to implement #64197.
Methods
impl ParseSess
[src]
pub fn new(
file_path_mapping: FilePathMapping,
process_cfg_mod: ProcessCfgMod
) -> Self
[src]
file_path_mapping: FilePathMapping,
process_cfg_mod: ProcessCfgMod
) -> Self
pub fn with_span_handler(
handler: Handler,
source_map: Lrc<SourceMap>,
process_cfg_mod: ProcessCfgMod
) -> Self
[src]
handler: Handler,
source_map: Lrc<SourceMap>,
process_cfg_mod: ProcessCfgMod
) -> Self
pub fn with_silent_emitter(process_cfg_mod: ProcessCfgMod) -> Self
[src]
pub fn source_map(&self) -> &SourceMap
[src]
pub fn buffer_lint(
&self,
lint_id: BufferedEarlyLintId,
span: impl Into<MultiSpan>,
id: NodeId,
msg: &str
)
[src]
&self,
lint_id: BufferedEarlyLintId,
span: impl Into<MultiSpan>,
id: NodeId,
msg: &str
)
pub fn expr_parentheses_needed(
&self,
err: &mut DiagnosticBuilder,
span: Span,
alt_snippet: Option<String>
)
[src]
&self,
err: &mut DiagnosticBuilder,
span: Span,
alt_snippet: Option<String>
)
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, U> Into<U> for T where
U: From<T>,
[src]
U: From<T>,
impl<T> From<T> for T
[src]
impl<T, U> TryFrom<U> for T where
U: Into<T>,
[src]
U: Into<T>,
type Error = Infallible
The type returned in the event of a conversion error.
fn try_from(value: U) -> Result<T, <T as TryFrom<U>>::Error>
[src]
impl<T, U> TryInto<U> for T where
U: TryFrom<T>,
[src]
U: TryFrom<T>,
type Error = <U as TryFrom<T>>::Error
The type returned in the event of a conversion error.
fn try_into(self) -> Result<U, <U as TryFrom<T>>::Error>
[src]
impl<T> Borrow<T> for T where
T: ?Sized,
[src]
T: ?Sized,
impl<T> BorrowMut<T> for T where
T: ?Sized,
[src]
T: ?Sized,
fn borrow_mut(&mut self) -> &mut T
[src]
impl<T> Any for T where
T: 'static + ?Sized,
[src]
T: 'static + ?Sized,