Struct syntax::parse::parser::Parser
[−]
[src]
pub struct Parser<'a> { pub sess: &'a ParseSess, pub token: Token, pub span: Span, pub meta_var_span: Option<Span>, pub prev_span: Span, pub restrictions: Restrictions, pub obsolete_set: HashSet<ObsoleteSyntax>, pub directory: Directory, pub recurse_into_file_modules: bool, pub root_module_name: Option<String>, pub expected_tokens: Vec<TokenType>, pub desugar_doc_comments: bool, pub cfg_mods: bool, // some fields omitted }
🔬 This is a nightly-only experimental API. (rustc_private
)
this crate is being loaded from the sysroot, an unstable location; did you mean to load this crate from crates.io via Cargo.toml
instead?
Fields
sess: &'a ParseSess
🔬 This is a nightly-only experimental API. (rustc_private
)
this crate is being loaded from the sysroot, an unstable location; did you mean to load this crate from crates.io via Cargo.toml
instead?
token: Token
🔬 This is a nightly-only experimental API. (rustc_private
)
this crate is being loaded from the sysroot, an unstable location; did you mean to load this crate from crates.io via Cargo.toml
instead?
the current token:
span: Span
🔬 This is a nightly-only experimental API. (rustc_private
)
this crate is being loaded from the sysroot, an unstable location; did you mean to load this crate from crates.io via Cargo.toml
instead?
the span of the current token:
meta_var_span: Option<Span>
🔬 This is a nightly-only experimental API. (rustc_private
)
this crate is being loaded from the sysroot, an unstable location; did you mean to load this crate from crates.io via Cargo.toml
instead?
the span of the previous token:
prev_span: Span
🔬 This is a nightly-only experimental API. (rustc_private
)
this crate is being loaded from the sysroot, an unstable location; did you mean to load this crate from crates.io via Cargo.toml
instead?
restrictions: Restrictions
🔬 This is a nightly-only experimental API. (rustc_private
)
this crate is being loaded from the sysroot, an unstable location; did you mean to load this crate from crates.io via Cargo.toml
instead?
obsolete_set: HashSet<ObsoleteSyntax>
🔬 This is a nightly-only experimental API. (rustc_private
)
this crate is being loaded from the sysroot, an unstable location; did you mean to load this crate from crates.io via Cargo.toml
instead?
The set of seen errors about obsolete syntax. Used to suppress extra detail when the same error is seen twice
directory: Directory
🔬 This is a nightly-only experimental API. (rustc_private
)
this crate is being loaded from the sysroot, an unstable location; did you mean to load this crate from crates.io via Cargo.toml
instead?
Used to determine the path to externally loaded source files
recurse_into_file_modules: bool
🔬 This is a nightly-only experimental API. (rustc_private
)
this crate is being loaded from the sysroot, an unstable location; did you mean to load this crate from crates.io via Cargo.toml
instead?
Whether to parse sub-modules in other files.
root_module_name: Option<String>
🔬 This is a nightly-only experimental API. (rustc_private
)
this crate is being loaded from the sysroot, an unstable location; did you mean to load this crate from crates.io via Cargo.toml
instead?
Name of the root module this parser originated from. If None
, then the
name is not known. This does not change while the parser is descending
into modules, and sub-parsers have new values for this name.
expected_tokens: Vec<TokenType>
🔬 This is a nightly-only experimental API. (rustc_private
)
this crate is being loaded from the sysroot, an unstable location; did you mean to load this crate from crates.io via Cargo.toml
instead?
desugar_doc_comments: bool
🔬 This is a nightly-only experimental API. (rustc_private
)
this crate is being loaded from the sysroot, an unstable location; did you mean to load this crate from crates.io via Cargo.toml
instead?
cfg_mods: bool
🔬 This is a nightly-only experimental API. (rustc_private
)
this crate is being loaded from the sysroot, an unstable location; did you mean to load this crate from crates.io via Cargo.toml
instead?
Whether we should configure out of line modules as we parse.
Methods
impl<'a> Parser<'a>
[src]
pub fn new(
sess: &'a ParseSess,
tokens: TokenStream,
directory: Option<Directory>,
recurse_into_file_modules: bool,
desugar_doc_comments: bool
) -> Self
[src]
sess: &'a ParseSess,
tokens: TokenStream,
directory: Option<Directory>,
recurse_into_file_modules: bool,
desugar_doc_comments: bool
) -> Self
🔬 This is a nightly-only experimental API. (rustc_private
)
this crate is being loaded from the sysroot, an unstable location; did you mean to load this crate from crates.io via Cargo.toml
instead?
pub fn token_to_string(token: &Token) -> String
[src]
🔬 This is a nightly-only experimental API. (rustc_private
)
this crate is being loaded from the sysroot, an unstable location; did you mean to load this crate from crates.io via Cargo.toml
instead?
Convert a token to a string using self's reader
pub fn this_token_to_string(&self) -> String
[src]
🔬 This is a nightly-only experimental API. (rustc_private
)
this crate is being loaded from the sysroot, an unstable location; did you mean to load this crate from crates.io via Cargo.toml
instead?
Convert the current token to a string using self's reader
pub fn this_token_descr(&self) -> String
[src]
🔬 This is a nightly-only experimental API. (rustc_private
)
this crate is being loaded from the sysroot, an unstable location; did you mean to load this crate from crates.io via Cargo.toml
instead?
pub fn unexpected_last<T>(&self, t: &Token) -> PResult<'a, T>
[src]
🔬 This is a nightly-only experimental API. (rustc_private
)
this crate is being loaded from the sysroot, an unstable location; did you mean to load this crate from crates.io via Cargo.toml
instead?
pub fn unexpected<T>(&mut self) -> PResult<'a, T>
[src]
🔬 This is a nightly-only experimental API. (rustc_private
)
this crate is being loaded from the sysroot, an unstable location; did you mean to load this crate from crates.io via Cargo.toml
instead?
pub fn expect(&mut self, t: &Token) -> PResult<'a, ()>
[src]
🔬 This is a nightly-only experimental API. (rustc_private
)
this crate is being loaded from the sysroot, an unstable location; did you mean to load this crate from crates.io via Cargo.toml
instead?
Expect and consume the token t. Signal an error if the next token is not t.
pub fn expect_one_of(
&mut self,
edible: &[Token],
inedible: &[Token]
) -> PResult<'a, ()>
[src]
&mut self,
edible: &[Token],
inedible: &[Token]
) -> PResult<'a, ()>
🔬 This is a nightly-only experimental API. (rustc_private
)
this crate is being loaded from the sysroot, an unstable location; did you mean to load this crate from crates.io via Cargo.toml
instead?
Expect next token to be edible or inedible token. If edible, then consume it; if inedible, then return without consuming anything. Signal a fatal error if next token is unexpected.
pub fn parse_ident(&mut self) -> PResult<'a, Ident>
[src]
🔬 This is a nightly-only experimental API. (rustc_private
)
this crate is being loaded from the sysroot, an unstable location; did you mean to load this crate from crates.io via Cargo.toml
instead?
pub fn check(&mut self, tok: &Token) -> bool
[src]
🔬 This is a nightly-only experimental API. (rustc_private
)
this crate is being loaded from the sysroot, an unstable location; did you mean to load this crate from crates.io via Cargo.toml
instead?
Check if the next token is tok
, and return true
if so.
This method will automatically add tok
to expected_tokens
if tok
is not
encountered.
pub fn eat(&mut self, tok: &Token) -> bool
[src]
🔬 This is a nightly-only experimental API. (rustc_private
)
this crate is being loaded from the sysroot, an unstable location; did you mean to load this crate from crates.io via Cargo.toml
instead?
Consume token 'tok' if it exists. Returns true if the given token was present, false otherwise.
pub fn check_keyword(&mut self, kw: Keyword) -> bool
[src]
🔬 This is a nightly-only experimental API. (rustc_private
)
this crate is being loaded from the sysroot, an unstable location; did you mean to load this crate from crates.io via Cargo.toml
instead?
pub fn eat_keyword(&mut self, kw: Keyword) -> bool
[src]
🔬 This is a nightly-only experimental API. (rustc_private
)
this crate is being loaded from the sysroot, an unstable location; did you mean to load this crate from crates.io via Cargo.toml
instead?
If the next token is the given keyword, eat it and return true. Otherwise, return false.
pub fn eat_keyword_noexpect(&mut self, kw: Keyword) -> bool
[src]
🔬 This is a nightly-only experimental API. (rustc_private
)
this crate is being loaded from the sysroot, an unstable location; did you mean to load this crate from crates.io via Cargo.toml
instead?
pub fn expect_keyword(&mut self, kw: Keyword) -> PResult<'a, ()>
[src]
🔬 This is a nightly-only experimental API. (rustc_private
)
this crate is being loaded from the sysroot, an unstable location; did you mean to load this crate from crates.io via Cargo.toml
instead?
If the given word is not a keyword, signal an error. If the next token is not the given word, signal an error. Otherwise, eat it.
pub fn expect_no_suffix(&self, sp: Span, kind: &str, suffix: Option<Name>)
[src]
🔬 This is a nightly-only experimental API. (rustc_private
)
this crate is being loaded from the sysroot, an unstable location; did you mean to load this crate from crates.io via Cargo.toml
instead?
pub fn expect_gt(&mut self) -> PResult<'a, ()>
[src]
🔬 This is a nightly-only experimental API. (rustc_private
)
this crate is being loaded from the sysroot, an unstable location; did you mean to load this crate from crates.io via Cargo.toml
instead?
Expect and consume a GT. if a >> is seen, replace it with a single > and continue. If a GT is not seen, signal an error.
pub fn parse_seq_to_before_gt_or_return<T, F>(
&mut self,
sep: Option<Token>,
f: F
) -> PResult<'a, (Vec<T>, bool)> where
F: FnMut(&mut Parser<'a>) -> PResult<'a, Option<T>>,
[src]
&mut self,
sep: Option<Token>,
f: F
) -> PResult<'a, (Vec<T>, bool)> where
F: FnMut(&mut Parser<'a>) -> PResult<'a, Option<T>>,
🔬 This is a nightly-only experimental API. (rustc_private
)
this crate is being loaded from the sysroot, an unstable location; did you mean to load this crate from crates.io via Cargo.toml
instead?
pub fn parse_seq_to_before_gt<T, F>(
&mut self,
sep: Option<Token>,
f: F
) -> PResult<'a, Vec<T>> where
F: FnMut(&mut Parser<'a>) -> PResult<'a, T>,
[src]
&mut self,
sep: Option<Token>,
f: F
) -> PResult<'a, Vec<T>> where
F: FnMut(&mut Parser<'a>) -> PResult<'a, T>,
🔬 This is a nightly-only experimental API. (rustc_private
)
this crate is being loaded from the sysroot, an unstable location; did you mean to load this crate from crates.io via Cargo.toml
instead?
Parse a sequence bracketed by '<' and '>', stopping before the '>'.
pub fn parse_seq_to_gt<T, F>(
&mut self,
sep: Option<Token>,
f: F
) -> PResult<'a, Vec<T>> where
F: FnMut(&mut Parser<'a>) -> PResult<'a, T>,
[src]
&mut self,
sep: Option<Token>,
f: F
) -> PResult<'a, Vec<T>> where
F: FnMut(&mut Parser<'a>) -> PResult<'a, T>,
🔬 This is a nightly-only experimental API. (rustc_private
)
this crate is being loaded from the sysroot, an unstable location; did you mean to load this crate from crates.io via Cargo.toml
instead?
pub fn parse_seq_to_gt_or_return<T, F>(
&mut self,
sep: Option<Token>,
f: F
) -> PResult<'a, (Vec<T>, bool)> where
F: FnMut(&mut Parser<'a>) -> PResult<'a, Option<T>>,
[src]
&mut self,
sep: Option<Token>,
f: F
) -> PResult<'a, (Vec<T>, bool)> where
F: FnMut(&mut Parser<'a>) -> PResult<'a, Option<T>>,
🔬 This is a nightly-only experimental API. (rustc_private
)
this crate is being loaded from the sysroot, an unstable location; did you mean to load this crate from crates.io via Cargo.toml
instead?
pub fn eat_to_tokens(&mut self, kets: &[&Token])
[src]
🔬 This is a nightly-only experimental API. (rustc_private
)
this crate is being loaded from the sysroot, an unstable location; did you mean to load this crate from crates.io via Cargo.toml
instead?
Eat and discard tokens until one of kets
is encountered. Respects token trees,
passes through any errors encountered. Used for error recovery.
pub fn parse_seq_to_end<T, F>(
&mut self,
ket: &Token,
sep: SeqSep,
f: F
) -> PResult<'a, Vec<T>> where
F: FnMut(&mut Parser<'a>) -> PResult<'a, T>,
[src]
&mut self,
ket: &Token,
sep: SeqSep,
f: F
) -> PResult<'a, Vec<T>> where
F: FnMut(&mut Parser<'a>) -> PResult<'a, T>,
🔬 This is a nightly-only experimental API. (rustc_private
)
this crate is being loaded from the sysroot, an unstable location; did you mean to load this crate from crates.io via Cargo.toml
instead?
Parse a sequence, including the closing delimiter. The function f must consume tokens until reaching the next separator or closing bracket.
pub fn parse_seq_to_before_end<T, F>(
&mut self,
ket: &Token,
sep: SeqSep,
f: F
) -> PResult<'a, Vec<T>> where
F: FnMut(&mut Parser<'a>) -> PResult<'a, T>,
[src]
&mut self,
ket: &Token,
sep: SeqSep,
f: F
) -> PResult<'a, Vec<T>> where
F: FnMut(&mut Parser<'a>) -> PResult<'a, T>,
🔬 This is a nightly-only experimental API. (rustc_private
)
this crate is being loaded from the sysroot, an unstable location; did you mean to load this crate from crates.io via Cargo.toml
instead?
Parse a sequence, not including the closing delimiter. The function f must consume tokens until reaching the next separator or closing bracket.
pub fn parse_unspanned_seq<T, F>(
&mut self,
bra: &Token,
ket: &Token,
sep: SeqSep,
f: F
) -> PResult<'a, Vec<T>> where
F: FnMut(&mut Parser<'a>) -> PResult<'a, T>,
[src]
&mut self,
bra: &Token,
ket: &Token,
sep: SeqSep,
f: F
) -> PResult<'a, Vec<T>> where
F: FnMut(&mut Parser<'a>) -> PResult<'a, T>,
🔬 This is a nightly-only experimental API. (rustc_private
)
this crate is being loaded from the sysroot, an unstable location; did you mean to load this crate from crates.io via Cargo.toml
instead?
Parse a sequence, including the closing delimiter. The function f must consume tokens until reaching the next separator or closing bracket.
pub fn parse_seq<T, F>(
&mut self,
bra: &Token,
ket: &Token,
sep: SeqSep,
f: F
) -> PResult<'a, Spanned<Vec<T>>> where
F: FnMut(&mut Parser<'a>) -> PResult<'a, T>,
[src]
&mut self,
bra: &Token,
ket: &Token,
sep: SeqSep,
f: F
) -> PResult<'a, Spanned<Vec<T>>> where
F: FnMut(&mut Parser<'a>) -> PResult<'a, T>,
🔬 This is a nightly-only experimental API. (rustc_private
)
this crate is being loaded from the sysroot, an unstable location; did you mean to load this crate from crates.io via Cargo.toml
instead?
pub fn bump(&mut self)
[src]
🔬 This is a nightly-only experimental API. (rustc_private
)
this crate is being loaded from the sysroot, an unstable location; did you mean to load this crate from crates.io via Cargo.toml
instead?
Advance the parser by one token
pub fn bump_with(&mut self, next: Token, span: Span)
[src]
🔬 This is a nightly-only experimental API. (rustc_private
)
this crate is being loaded from the sysroot, an unstable location; did you mean to load this crate from crates.io via Cargo.toml
instead?
Advance the parser using provided token as a next one. Use this when
consuming a part of a token. For example a single <
from <<
.
pub fn look_ahead<R, F>(&self, dist: usize, f: F) -> R where
F: FnOnce(&Token) -> R,
[src]
F: FnOnce(&Token) -> R,
🔬 This is a nightly-only experimental API. (rustc_private
)
this crate is being loaded from the sysroot, an unstable location; did you mean to load this crate from crates.io via Cargo.toml
instead?
pub fn fatal(&self, m: &str) -> DiagnosticBuilder<'a>
[src]
🔬 This is a nightly-only experimental API. (rustc_private
)
this crate is being loaded from the sysroot, an unstable location; did you mean to load this crate from crates.io via Cargo.toml
instead?
pub fn span_fatal(&self, sp: Span, m: &str) -> DiagnosticBuilder<'a>
[src]
🔬 This is a nightly-only experimental API. (rustc_private
)
this crate is being loaded from the sysroot, an unstable location; did you mean to load this crate from crates.io via Cargo.toml
instead?
pub fn span_fatal_err(&self, sp: Span, err: Error) -> DiagnosticBuilder<'a>
[src]
🔬 This is a nightly-only experimental API. (rustc_private
)
this crate is being loaded from the sysroot, an unstable location; did you mean to load this crate from crates.io via Cargo.toml
instead?
pub fn span_fatal_help(
&self,
sp: Span,
m: &str,
help: &str
) -> DiagnosticBuilder<'a>
[src]
&self,
sp: Span,
m: &str,
help: &str
) -> DiagnosticBuilder<'a>
🔬 This is a nightly-only experimental API. (rustc_private
)
this crate is being loaded from the sysroot, an unstable location; did you mean to load this crate from crates.io via Cargo.toml
instead?
pub fn bug(&self, m: &str) -> !
[src]
🔬 This is a nightly-only experimental API. (rustc_private
)
this crate is being loaded from the sysroot, an unstable location; did you mean to load this crate from crates.io via Cargo.toml
instead?
pub fn warn(&self, m: &str)
[src]
🔬 This is a nightly-only experimental API. (rustc_private
)
this crate is being loaded from the sysroot, an unstable location; did you mean to load this crate from crates.io via Cargo.toml
instead?
pub fn span_warn(&self, sp: Span, m: &str)
[src]
🔬 This is a nightly-only experimental API. (rustc_private
)
this crate is being loaded from the sysroot, an unstable location; did you mean to load this crate from crates.io via Cargo.toml
instead?
pub fn span_err(&self, sp: Span, m: &str)
[src]
🔬 This is a nightly-only experimental API. (rustc_private
)
this crate is being loaded from the sysroot, an unstable location; did you mean to load this crate from crates.io via Cargo.toml
instead?
pub fn span_err_help(&self, sp: Span, m: &str, h: &str)
[src]
🔬 This is a nightly-only experimental API. (rustc_private
)
this crate is being loaded from the sysroot, an unstable location; did you mean to load this crate from crates.io via Cargo.toml
instead?
pub fn span_bug(&self, sp: Span, m: &str) -> !
[src]
🔬 This is a nightly-only experimental API. (rustc_private
)
this crate is being loaded from the sysroot, an unstable location; did you mean to load this crate from crates.io via Cargo.toml
instead?
pub fn abort_if_errors(&self)
[src]
🔬 This is a nightly-only experimental API. (rustc_private
)
this crate is being loaded from the sysroot, an unstable location; did you mean to load this crate from crates.io via Cargo.toml
instead?
pub fn diagnostic(&self) -> &'a Handler
[src]
🔬 This is a nightly-only experimental API. (rustc_private
)
this crate is being loaded from the sysroot, an unstable location; did you mean to load this crate from crates.io via Cargo.toml
instead?
pub fn token_is_bare_fn_keyword(&mut self) -> bool
[src]
🔬 This is a nightly-only experimental API. (rustc_private
)
this crate is being loaded from the sysroot, an unstable location; did you mean to load this crate from crates.io via Cargo.toml
instead?
Is the current token one of the keywords that signals a bare function type?
pub fn parse_ty_bare_fn(
&mut self,
lifetime_defs: Vec<LifetimeDef>
) -> PResult<'a, TyKind>
[src]
&mut self,
lifetime_defs: Vec<LifetimeDef>
) -> PResult<'a, TyKind>
🔬 This is a nightly-only experimental API. (rustc_private
)
this crate is being loaded from the sysroot, an unstable location; did you mean to load this crate from crates.io via Cargo.toml
instead?
parse a TyKind::BareFn type:
pub fn parse_unsafety(&mut self) -> PResult<'a, Unsafety>
[src]
🔬 This is a nightly-only experimental API. (rustc_private
)
this crate is being loaded from the sysroot, an unstable location; did you mean to load this crate from crates.io via Cargo.toml
instead?
pub fn parse_trait_item(&mut self, at_end: &mut bool) -> PResult<'a, TraitItem>
[src]
🔬 This is a nightly-only experimental API. (rustc_private
)
this crate is being loaded from the sysroot, an unstable location; did you mean to load this crate from crates.io via Cargo.toml
instead?
Parse the items in a trait declaration
pub fn parse_ret_ty(&mut self) -> PResult<'a, FunctionRetTy>
[src]
🔬 This is a nightly-only experimental API. (rustc_private
)
this crate is being loaded from the sysroot, an unstable location; did you mean to load this crate from crates.io via Cargo.toml
instead?
Parse optional return type [ -> TY ] in function decl
pub fn parse_ty(&mut self) -> PResult<'a, P<Ty>>
[src]
🔬 This is a nightly-only experimental API. (rustc_private
)
this crate is being loaded from the sysroot, an unstable location; did you mean to load this crate from crates.io via Cargo.toml
instead?
pub fn parse_ptr(&mut self) -> PResult<'a, MutTy>
[src]
🔬 This is a nightly-only experimental API. (rustc_private
)
this crate is being loaded from the sysroot, an unstable location; did you mean to load this crate from crates.io via Cargo.toml
instead?
pub fn parse_arg_general(&mut self, require_name: bool) -> PResult<'a, Arg>
[src]
🔬 This is a nightly-only experimental API. (rustc_private
)
this crate is being loaded from the sysroot, an unstable location; did you mean to load this crate from crates.io via Cargo.toml
instead?
This version of parse arg doesn't necessarily require identifier names.
pub fn parse_arg(&mut self) -> PResult<'a, Arg>
[src]
🔬 This is a nightly-only experimental API. (rustc_private
)
this crate is being loaded from the sysroot, an unstable location; did you mean to load this crate from crates.io via Cargo.toml
instead?
Parse a single function argument
pub fn parse_fn_block_arg(&mut self) -> PResult<'a, Arg>
[src]
🔬 This is a nightly-only experimental API. (rustc_private
)
this crate is being loaded from the sysroot, an unstable location; did you mean to load this crate from crates.io via Cargo.toml
instead?
Parse an argument in a lambda header e.g. |arg, arg|
pub fn maybe_parse_fixed_length_of_vec(
&mut self
) -> PResult<'a, Option<P<Expr>>>
[src]
&mut self
) -> PResult<'a, Option<P<Expr>>>
🔬 This is a nightly-only experimental API. (rustc_private
)
this crate is being loaded from the sysroot, an unstable location; did you mean to load this crate from crates.io via Cargo.toml
instead?
pub fn parse_lit_token(&mut self) -> PResult<'a, LitKind>
[src]
🔬 This is a nightly-only experimental API. (rustc_private
)
this crate is being loaded from the sysroot, an unstable location; did you mean to load this crate from crates.io via Cargo.toml
instead?
Matches token_lit = LIT_INTEGER | ...
pub fn parse_lit(&mut self) -> PResult<'a, Lit>
[src]
🔬 This is a nightly-only experimental API. (rustc_private
)
this crate is being loaded from the sysroot, an unstable location; did you mean to load this crate from crates.io via Cargo.toml
instead?
Matches lit = true | false | token_lit
pub fn parse_pat_literal_maybe_minus(&mut self) -> PResult<'a, P<Expr>>
[src]
🔬 This is a nightly-only experimental API. (rustc_private
)
this crate is being loaded from the sysroot, an unstable location; did you mean to load this crate from crates.io via Cargo.toml
instead?
matches '-' lit | lit (cf. ast_validation::AstValidator::check_expr_within_pat)
pub fn parse_path_segment_ident(&mut self) -> PResult<'a, Ident>
[src]
🔬 This is a nightly-only experimental API. (rustc_private
)
this crate is being loaded from the sysroot, an unstable location; did you mean to load this crate from crates.io via Cargo.toml
instead?
pub fn parse_path(&mut self, style: PathStyle) -> PResult<'a, Path>
[src]
🔬 This is a nightly-only experimental API. (rustc_private
)
this crate is being loaded from the sysroot, an unstable location; did you mean to load this crate from crates.io via Cargo.toml
instead?
Parses simple paths.
path = [::] segment+
segment = ident | ident[::]<args> | ident[::](args) [-> type]
Examples
a::b::C<D>
(without disambiguator)
a::b::C::<D>
(with disambiguator)
Fn(Args)
(without disambiguator)
Fn::(Args)
(with disambiguator)
pub fn parse_path_common(
&mut self,
style: PathStyle,
enable_warning: bool
) -> PResult<'a, Path>
[src]
&mut self,
style: PathStyle,
enable_warning: bool
) -> PResult<'a, Path>
🔬 This is a nightly-only experimental API. (rustc_private
)
this crate is being loaded from the sysroot, an unstable location; did you mean to load this crate from crates.io via Cargo.toml
instead?
pub fn parse_path_allowing_meta(
&mut self,
style: PathStyle
) -> PResult<'a, Path>
[src]
&mut self,
style: PathStyle
) -> PResult<'a, Path>
🔬 This is a nightly-only experimental API. (rustc_private
)
this crate is being loaded from the sysroot, an unstable location; did you mean to load this crate from crates.io via Cargo.toml
instead?
Like parse_path
, but also supports parsing Word
meta items into paths for back-compat.
This is used when parsing derive macro paths in #[derive]
attributes.
pub fn parse_field_name(&mut self) -> PResult<'a, Ident>
[src]
🔬 This is a nightly-only experimental API. (rustc_private
)
this crate is being loaded from the sysroot, an unstable location; did you mean to load this crate from crates.io via Cargo.toml
instead?
pub fn parse_field(&mut self) -> PResult<'a, Field>
[src]
🔬 This is a nightly-only experimental API. (rustc_private
)
this crate is being loaded from the sysroot, an unstable location; did you mean to load this crate from crates.io via Cargo.toml
instead?
Parse ident (COLON expr)?
pub fn mk_expr(
&mut self,
span: Span,
node: ExprKind,
attrs: ThinVec<Attribute>
) -> P<Expr>
[src]
&mut self,
span: Span,
node: ExprKind,
attrs: ThinVec<Attribute>
) -> P<Expr>
🔬 This is a nightly-only experimental API. (rustc_private
)
this crate is being loaded from the sysroot, an unstable location; did you mean to load this crate from crates.io via Cargo.toml
instead?
pub fn mk_unary(&mut self, unop: UnOp, expr: P<Expr>) -> ExprKind
[src]
🔬 This is a nightly-only experimental API. (rustc_private
)
this crate is being loaded from the sysroot, an unstable location; did you mean to load this crate from crates.io via Cargo.toml
instead?
pub fn mk_binary(
&mut self,
binop: BinOp,
lhs: P<Expr>,
rhs: P<Expr>
) -> ExprKind
[src]
&mut self,
binop: BinOp,
lhs: P<Expr>,
rhs: P<Expr>
) -> ExprKind
🔬 This is a nightly-only experimental API. (rustc_private
)
this crate is being loaded from the sysroot, an unstable location; did you mean to load this crate from crates.io via Cargo.toml
instead?
pub fn mk_call(&mut self, f: P<Expr>, args: Vec<P<Expr>>) -> ExprKind
[src]
🔬 This is a nightly-only experimental API. (rustc_private
)
this crate is being loaded from the sysroot, an unstable location; did you mean to load this crate from crates.io via Cargo.toml
instead?
pub fn mk_index(&mut self, expr: P<Expr>, idx: P<Expr>) -> ExprKind
[src]
🔬 This is a nightly-only experimental API. (rustc_private
)
this crate is being loaded from the sysroot, an unstable location; did you mean to load this crate from crates.io via Cargo.toml
instead?
pub fn mk_range(
&mut self,
start: Option<P<Expr>>,
end: Option<P<Expr>>,
limits: RangeLimits
) -> PResult<'a, ExprKind>
[src]
&mut self,
start: Option<P<Expr>>,
end: Option<P<Expr>>,
limits: RangeLimits
) -> PResult<'a, ExprKind>
🔬 This is a nightly-only experimental API. (rustc_private
)
this crate is being loaded from the sysroot, an unstable location; did you mean to load this crate from crates.io via Cargo.toml
instead?
pub fn mk_tup_field(&mut self, expr: P<Expr>, idx: Spanned<usize>) -> ExprKind
[src]
🔬 This is a nightly-only experimental API. (rustc_private
)
this crate is being loaded from the sysroot, an unstable location; did you mean to load this crate from crates.io via Cargo.toml
instead?
pub fn mk_assign_op(
&mut self,
binop: BinOp,
lhs: P<Expr>,
rhs: P<Expr>
) -> ExprKind
[src]
&mut self,
binop: BinOp,
lhs: P<Expr>,
rhs: P<Expr>
) -> ExprKind
🔬 This is a nightly-only experimental API. (rustc_private
)
this crate is being loaded from the sysroot, an unstable location; did you mean to load this crate from crates.io via Cargo.toml
instead?
pub fn mk_mac_expr(
&mut self,
span: Span,
m: Mac_,
attrs: ThinVec<Attribute>
) -> P<Expr>
[src]
&mut self,
span: Span,
m: Mac_,
attrs: ThinVec<Attribute>
) -> P<Expr>
🔬 This is a nightly-only experimental API. (rustc_private
)
this crate is being loaded from the sysroot, an unstable location; did you mean to load this crate from crates.io via Cargo.toml
instead?
pub fn mk_lit_u32(&mut self, i: u32, attrs: ThinVec<Attribute>) -> P<Expr>
[src]
🔬 This is a nightly-only experimental API. (rustc_private
)
this crate is being loaded from the sysroot, an unstable location; did you mean to load this crate from crates.io via Cargo.toml
instead?
pub fn parse_block_expr(
&mut self,
lo: Span,
blk_mode: BlockCheckMode,
outer_attrs: ThinVec<Attribute>
) -> PResult<'a, P<Expr>>
[src]
&mut self,
lo: Span,
blk_mode: BlockCheckMode,
outer_attrs: ThinVec<Attribute>
) -> PResult<'a, P<Expr>>
🔬 This is a nightly-only experimental API. (rustc_private
)
this crate is being loaded from the sysroot, an unstable location; did you mean to load this crate from crates.io via Cargo.toml
instead?
Parse a block or unsafe block
pub fn parse_dot_or_call_expr(
&mut self,
already_parsed_attrs: Option<ThinVec<Attribute>>
) -> PResult<'a, P<Expr>>
[src]
&mut self,
already_parsed_attrs: Option<ThinVec<Attribute>>
) -> PResult<'a, P<Expr>>
🔬 This is a nightly-only experimental API. (rustc_private
)
this crate is being loaded from the sysroot, an unstable location; did you mean to load this crate from crates.io via Cargo.toml
instead?
parse a.b or a(13) or a[4] or just a
pub fn parse_dot_or_call_expr_with(
&mut self,
e0: P<Expr>,
lo: Span,
attrs: ThinVec<Attribute>
) -> PResult<'a, P<Expr>>
[src]
&mut self,
e0: P<Expr>,
lo: Span,
attrs: ThinVec<Attribute>
) -> PResult<'a, P<Expr>>
🔬 This is a nightly-only experimental API. (rustc_private
)
this crate is being loaded from the sysroot, an unstable location; did you mean to load this crate from crates.io via Cargo.toml
instead?
pub fn process_potential_macro_variable(&mut self)
[src]
🔬 This is a nightly-only experimental API. (rustc_private
)
this crate is being loaded from the sysroot, an unstable location; did you mean to load this crate from crates.io via Cargo.toml
instead?
pub fn parse_token_tree(&mut self) -> TokenTree
[src]
🔬 This is a nightly-only experimental API. (rustc_private
)
this crate is being loaded from the sysroot, an unstable location; did you mean to load this crate from crates.io via Cargo.toml
instead?
parse a single token tree from the input.
pub fn parse_all_token_trees(&mut self) -> PResult<'a, Vec<TokenTree>>
[src]
🔬 This is a nightly-only experimental API. (rustc_private
)
this crate is being loaded from the sysroot, an unstable location; did you mean to load this crate from crates.io via Cargo.toml
instead?
pub fn parse_tokens(&mut self) -> TokenStream
[src]
🔬 This is a nightly-only experimental API. (rustc_private
)
this crate is being loaded from the sysroot, an unstable location; did you mean to load this crate from crates.io via Cargo.toml
instead?
pub fn parse_prefix_expr(
&mut self,
already_parsed_attrs: Option<ThinVec<Attribute>>
) -> PResult<'a, P<Expr>>
[src]
&mut self,
already_parsed_attrs: Option<ThinVec<Attribute>>
) -> PResult<'a, P<Expr>>
🔬 This is a nightly-only experimental API. (rustc_private
)
this crate is being loaded from the sysroot, an unstable location; did you mean to load this crate from crates.io via Cargo.toml
instead?
Parse a prefix-unary-operator expr
pub fn parse_assoc_expr(
&mut self,
already_parsed_attrs: Option<ThinVec<Attribute>>
) -> PResult<'a, P<Expr>>
[src]
&mut self,
already_parsed_attrs: Option<ThinVec<Attribute>>
) -> PResult<'a, P<Expr>>
🔬 This is a nightly-only experimental API. (rustc_private
)
this crate is being loaded from the sysroot, an unstable location; did you mean to load this crate from crates.io via Cargo.toml
instead?
Parse an associative expression
This parses an expression accounting for associativity and precedence of the operators in the expression.
pub fn parse_assoc_expr_with(
&mut self,
min_prec: usize,
lhs: LhsExpr
) -> PResult<'a, P<Expr>>
[src]
&mut self,
min_prec: usize,
lhs: LhsExpr
) -> PResult<'a, P<Expr>>
🔬 This is a nightly-only experimental API. (rustc_private
)
this crate is being loaded from the sysroot, an unstable location; did you mean to load this crate from crates.io via Cargo.toml
instead?
Parse an associative expression with operators of at least min_prec
precedence
pub fn parse_if_expr(
&mut self,
attrs: ThinVec<Attribute>
) -> PResult<'a, P<Expr>>
[src]
&mut self,
attrs: ThinVec<Attribute>
) -> PResult<'a, P<Expr>>
🔬 This is a nightly-only experimental API. (rustc_private
)
this crate is being loaded from the sysroot, an unstable location; did you mean to load this crate from crates.io via Cargo.toml
instead?
Parse an 'if' or 'if let' expression ('if' token already eaten)
pub fn parse_if_let_expr(
&mut self,
attrs: ThinVec<Attribute>
) -> PResult<'a, P<Expr>>
[src]
&mut self,
attrs: ThinVec<Attribute>
) -> PResult<'a, P<Expr>>
🔬 This is a nightly-only experimental API. (rustc_private
)
this crate is being loaded from the sysroot, an unstable location; did you mean to load this crate from crates.io via Cargo.toml
instead?
Parse an 'if let' expression ('if' token already eaten)
pub fn parse_lambda_expr(
&mut self,
lo: Span,
capture_clause: CaptureBy,
attrs: ThinVec<Attribute>
) -> PResult<'a, P<Expr>>
[src]
&mut self,
lo: Span,
capture_clause: CaptureBy,
attrs: ThinVec<Attribute>
) -> PResult<'a, P<Expr>>
🔬 This is a nightly-only experimental API. (rustc_private
)
this crate is being loaded from the sysroot, an unstable location; did you mean to load this crate from crates.io via Cargo.toml
instead?
pub fn parse_else_expr(&mut self) -> PResult<'a, P<Expr>>
[src]
🔬 This is a nightly-only experimental API. (rustc_private
)
this crate is being loaded from the sysroot, an unstable location; did you mean to load this crate from crates.io via Cargo.toml
instead?
pub fn parse_for_expr(
&mut self,
opt_ident: Option<SpannedIdent>,
span_lo: Span,
attrs: ThinVec<Attribute>
) -> PResult<'a, P<Expr>>
[src]
&mut self,
opt_ident: Option<SpannedIdent>,
span_lo: Span,
attrs: ThinVec<Attribute>
) -> PResult<'a, P<Expr>>
🔬 This is a nightly-only experimental API. (rustc_private
)
this crate is being loaded from the sysroot, an unstable location; did you mean to load this crate from crates.io via Cargo.toml
instead?
Parse a 'for' .. 'in' expression ('for' token already eaten)
pub fn parse_while_expr(
&mut self,
opt_ident: Option<SpannedIdent>,
span_lo: Span,
attrs: ThinVec<Attribute>
) -> PResult<'a, P<Expr>>
[src]
&mut self,
opt_ident: Option<SpannedIdent>,
span_lo: Span,
attrs: ThinVec<Attribute>
) -> PResult<'a, P<Expr>>
🔬 This is a nightly-only experimental API. (rustc_private
)
this crate is being loaded from the sysroot, an unstable location; did you mean to load this crate from crates.io via Cargo.toml
instead?
Parse a 'while' or 'while let' expression ('while' token already eaten)
pub fn parse_while_let_expr(
&mut self,
opt_ident: Option<SpannedIdent>,
span_lo: Span,
attrs: ThinVec<Attribute>
) -> PResult<'a, P<Expr>>
[src]
&mut self,
opt_ident: Option<SpannedIdent>,
span_lo: Span,
attrs: ThinVec<Attribute>
) -> PResult<'a, P<Expr>>
🔬 This is a nightly-only experimental API. (rustc_private
)
this crate is being loaded from the sysroot, an unstable location; did you mean to load this crate from crates.io via Cargo.toml
instead?
Parse a 'while let' expression ('while' token already eaten)
pub fn parse_loop_expr(
&mut self,
opt_ident: Option<SpannedIdent>,
span_lo: Span,
attrs: ThinVec<Attribute>
) -> PResult<'a, P<Expr>>
[src]
&mut self,
opt_ident: Option<SpannedIdent>,
span_lo: Span,
attrs: ThinVec<Attribute>
) -> PResult<'a, P<Expr>>
🔬 This is a nightly-only experimental API. (rustc_private
)
this crate is being loaded from the sysroot, an unstable location; did you mean to load this crate from crates.io via Cargo.toml
instead?
pub fn parse_catch_expr(
&mut self,
span_lo: Span,
attrs: ThinVec<Attribute>
) -> PResult<'a, P<Expr>>
[src]
&mut self,
span_lo: Span,
attrs: ThinVec<Attribute>
) -> PResult<'a, P<Expr>>
🔬 This is a nightly-only experimental API. (rustc_private
)
this crate is being loaded from the sysroot, an unstable location; did you mean to load this crate from crates.io via Cargo.toml
instead?
Parse a do catch {...}
expression (do catch
token already eaten)
pub fn parse_arm(&mut self) -> PResult<'a, Arm>
[src]
🔬 This is a nightly-only experimental API. (rustc_private
)
this crate is being loaded from the sysroot, an unstable location; did you mean to load this crate from crates.io via Cargo.toml
instead?
pub fn parse_expr(&mut self) -> PResult<'a, P<Expr>>
[src]
🔬 This is a nightly-only experimental API. (rustc_private
)
this crate is being loaded from the sysroot, an unstable location; did you mean to load this crate from crates.io via Cargo.toml
instead?
Parse an expression
pub fn with_res<F, T>(&mut self, r: Restrictions, f: F) -> T where
F: FnOnce(&mut Self) -> T,
[src]
F: FnOnce(&mut Self) -> T,
🔬 This is a nightly-only experimental API. (rustc_private
)
this crate is being loaded from the sysroot, an unstable location; did you mean to load this crate from crates.io via Cargo.toml
instead?
Evaluate the closure with restrictions in place.
After the closure is evaluated, restrictions are reset.
pub fn parse_expr_res(
&mut self,
r: Restrictions,
already_parsed_attrs: Option<ThinVec<Attribute>>
) -> PResult<'a, P<Expr>>
[src]
&mut self,
r: Restrictions,
already_parsed_attrs: Option<ThinVec<Attribute>>
) -> PResult<'a, P<Expr>>
🔬 This is a nightly-only experimental API. (rustc_private
)
this crate is being loaded from the sysroot, an unstable location; did you mean to load this crate from crates.io via Cargo.toml
instead?
Parse an expression, subject to the given restrictions
pub fn parse_pat(&mut self) -> PResult<'a, P<Pat>>
[src]
🔬 This is a nightly-only experimental API. (rustc_private
)
this crate is being loaded from the sysroot, an unstable location; did you mean to load this crate from crates.io via Cargo.toml
instead?
Parse a pattern.
pub fn parse_stmt(&mut self) -> PResult<'a, Option<Stmt>>
[src]
🔬 This is a nightly-only experimental API. (rustc_private
)
this crate is being loaded from the sysroot, an unstable location; did you mean to load this crate from crates.io via Cargo.toml
instead?
Parse a statement. This stops just before trailing semicolons on everything but items.
e.g. a StmtKind::Semi
parses to a StmtKind::Expr
, leaving the trailing ;
unconsumed.
pub fn parse_block(&mut self) -> PResult<'a, P<Block>>
[src]
🔬 This is a nightly-only experimental API. (rustc_private
)
this crate is being loaded from the sysroot, an unstable location; did you mean to load this crate from crates.io via Cargo.toml
instead?
Parse a block. No inner attrs are allowed.
pub fn parse_full_stmt(
&mut self,
macro_legacy_warnings: bool
) -> PResult<'a, Option<Stmt>>
[src]
&mut self,
macro_legacy_warnings: bool
) -> PResult<'a, Option<Stmt>>
🔬 This is a nightly-only experimental API. (rustc_private
)
this crate is being loaded from the sysroot, an unstable location; did you mean to load this crate from crates.io via Cargo.toml
instead?
Parse a statement, including the trailing semicolon.
pub fn parse_generic_params(
&mut self
) -> PResult<'a, (Vec<LifetimeDef>, Vec<TyParam>)>
[src]
&mut self
) -> PResult<'a, (Vec<LifetimeDef>, Vec<TyParam>)>
🔬 This is a nightly-only experimental API. (rustc_private
)
this crate is being loaded from the sysroot, an unstable location; did you mean to load this crate from crates.io via Cargo.toml
instead?
Parses (possibly empty) list of lifetime and type parameters, possibly including trailing comma and erroneous trailing attributes.
pub fn parse_generics(&mut self) -> PResult<'a, Generics>
[src]
🔬 This is a nightly-only experimental API. (rustc_private
)
this crate is being loaded from the sysroot, an unstable location; did you mean to load this crate from crates.io via Cargo.toml
instead?
Parse a set of optional generic type parameter declarations. Where
clauses are not parsed here, and must be added later via
parse_where_clause()
.
matches generics = ( ) | ( < > ) | ( < typaramseq ( , )? > ) | ( < lifetimes ( , )? > ) | ( < lifetimes , typaramseq ( , )? > ) where typaramseq = ( typaram ) | ( typaram , typaramseq )
pub fn parse_where_clause(&mut self) -> PResult<'a, WhereClause>
[src]
🔬 This is a nightly-only experimental API. (rustc_private
)
this crate is being loaded from the sysroot, an unstable location; did you mean to load this crate from crates.io via Cargo.toml
instead?
Parses an optional where
clause and places it in generics
.
where T : Trait<U, V> + 'b, 'a : 'b
pub fn parse_fn_decl(&mut self, allow_variadic: bool) -> PResult<'a, P<FnDecl>>
[src]
🔬 This is a nightly-only experimental API. (rustc_private
)
this crate is being loaded from the sysroot, an unstable location; did you mean to load this crate from crates.io via Cargo.toml
instead?
Parse the argument list and result type of a function declaration
pub fn is_const_item(&mut self) -> bool
[src]
🔬 This is a nightly-only experimental API. (rustc_private
)
this crate is being loaded from the sysroot, an unstable location; did you mean to load this crate from crates.io via Cargo.toml
instead?
true if we are looking at const ID
, false for things like const fn
etc
pub fn parse_fn_front_matter(
&mut self
) -> PResult<'a, (Spanned<Constness>, Unsafety, Abi)>
[src]
&mut self
) -> PResult<'a, (Spanned<Constness>, Unsafety, Abi)>
🔬 This is a nightly-only experimental API. (rustc_private
)
this crate is being loaded from the sysroot, an unstable location; did you mean to load this crate from crates.io via Cargo.toml
instead?
parses all the "front matter" for a fn
declaration, up to
and including the fn
keyword:
const fn
unsafe fn
const unsafe fn
extern fn
- etc
pub fn parse_impl_item(&mut self, at_end: &mut bool) -> PResult<'a, ImplItem>
[src]
🔬 This is a nightly-only experimental API. (rustc_private
)
this crate is being loaded from the sysroot, an unstable location; did you mean to load this crate from crates.io via Cargo.toml
instead?
Parse an impl item.
pub fn parse_record_struct_body(&mut self) -> PResult<'a, Vec<StructField>>
[src]
🔬 This is a nightly-only experimental API. (rustc_private
)
this crate is being loaded from the sysroot, an unstable location; did you mean to load this crate from crates.io via Cargo.toml
instead?
pub fn parse_tuple_struct_body(&mut self) -> PResult<'a, Vec<StructField>>
[src]
🔬 This is a nightly-only experimental API. (rustc_private
)
this crate is being loaded from the sysroot, an unstable location; did you mean to load this crate from crates.io via Cargo.toml
instead?
pub fn parse_single_struct_field(
&mut self,
lo: Span,
vis: Visibility,
attrs: Vec<Attribute>
) -> PResult<'a, StructField>
[src]
&mut self,
lo: Span,
vis: Visibility,
attrs: Vec<Attribute>
) -> PResult<'a, StructField>
🔬 This is a nightly-only experimental API. (rustc_private
)
this crate is being loaded from the sysroot, an unstable location; did you mean to load this crate from crates.io via Cargo.toml
instead?
Parse a structure field declaration
pub fn parse_visibility(
&mut self,
can_take_tuple: bool
) -> PResult<'a, Visibility>
[src]
&mut self,
can_take_tuple: bool
) -> PResult<'a, Visibility>
🔬 This is a nightly-only experimental API. (rustc_private
)
this crate is being loaded from the sysroot, an unstable location; did you mean to load this crate from crates.io via Cargo.toml
instead?
Parse pub
, pub(crate)
and pub(in path)
plus shortcuts pub(self)
for pub(in self)
and pub(super)
for pub(in super)
. If the following element can't be a tuple (i.e. it's
a function definition, it's not a tuple struct field) and the contents within the parens
isn't valid, emit a proper diagnostic.
pub fn submod_path_from_attr(
attrs: &[Attribute],
dir_path: &Path
) -> Option<PathBuf>
[src]
attrs: &[Attribute],
dir_path: &Path
) -> Option<PathBuf>
🔬 This is a nightly-only experimental API. (rustc_private
)
this crate is being loaded from the sysroot, an unstable location; did you mean to load this crate from crates.io via Cargo.toml
instead?
pub fn default_submod_path(
id: Ident,
dir_path: &Path,
codemap: &CodeMap
) -> ModulePath
[src]
id: Ident,
dir_path: &Path,
codemap: &CodeMap
) -> ModulePath
🔬 This is a nightly-only experimental API. (rustc_private
)
this crate is being loaded from the sysroot, an unstable location; did you mean to load this crate from crates.io via Cargo.toml
instead?
Returns either a path to a module, or .
pub fn parse_item(&mut self) -> PResult<'a, Option<P<Item>>>
[src]
🔬 This is a nightly-only experimental API. (rustc_private
)
this crate is being loaded from the sysroot, an unstable location; did you mean to load this crate from crates.io via Cargo.toml
instead?
pub fn parse_crate_mod(&mut self) -> PResult<'a, Crate>
[src]
🔬 This is a nightly-only experimental API. (rustc_private
)
this crate is being loaded from the sysroot, an unstable location; did you mean to load this crate from crates.io via Cargo.toml
instead?
Parses a source module as a crate. This is the main entry point for the parser.
pub fn parse_optional_str(&mut self) -> Option<(Symbol, StrStyle, Option<Name>)>
[src]
🔬 This is a nightly-only experimental API. (rustc_private
)
this crate is being loaded from the sysroot, an unstable location; did you mean to load this crate from crates.io via Cargo.toml
instead?
pub fn parse_str(&mut self) -> PResult<'a, (Symbol, StrStyle)>
[src]
🔬 This is a nightly-only experimental API. (rustc_private
)
this crate is being loaded from the sysroot, an unstable location; did you mean to load this crate from crates.io via Cargo.toml
instead?
impl<'a> Parser<'a>
[src]
pub fn parse_outer_attributes(&mut self) -> PResult<'a, Vec<Attribute>>
[src]
🔬 This is a nightly-only experimental API. (rustc_private
)
this crate is being loaded from the sysroot, an unstable location; did you mean to load this crate from crates.io via Cargo.toml
instead?
Parse attributes that appear before an item
pub fn parse_attribute(&mut self, permit_inner: bool) -> PResult<'a, Attribute>
[src]
🔬 This is a nightly-only experimental API. (rustc_private
)
this crate is being loaded from the sysroot, an unstable location; did you mean to load this crate from crates.io via Cargo.toml
instead?
Matches attribute = # ! [ meta_item ]
If permit_inner is true, then a leading !
indicates an inner
attribute
pub fn parse_path_and_tokens(&mut self) -> PResult<'a, (Path, TokenStream)>
[src]
🔬 This is a nightly-only experimental API. (rustc_private
)
this crate is being loaded from the sysroot, an unstable location; did you mean to load this crate from crates.io via Cargo.toml
instead?
pub fn parse_inner_attributes(&mut self) -> PResult<'a, Vec<Attribute>>
[src]
🔬 This is a nightly-only experimental API. (rustc_private
)
this crate is being loaded from the sysroot, an unstable location; did you mean to load this crate from crates.io via Cargo.toml
instead?
Parse attributes that appear after the opening of an item. These should be preceded by an exclamation mark, but we accept and warn about one terminated by a semicolon. matches inner_attrs*
pub fn parse_meta_item(&mut self) -> PResult<'a, MetaItem>
[src]
🔬 This is a nightly-only experimental API. (rustc_private
)
this crate is being loaded from the sysroot, an unstable location; did you mean to load this crate from crates.io via Cargo.toml
instead?
Per RFC#1559, matches the following grammar:
meta_item : IDENT ( '=' UNSUFFIXED_LIT | '(' meta_item_inner? ')' )? ; meta_item_inner : (meta_item | UNSUFFIXED_LIT) (',' meta_item_inner)? ;
pub fn parse_meta_item_kind(&mut self) -> PResult<'a, MetaItemKind>
[src]
🔬 This is a nightly-only experimental API. (rustc_private
)
this crate is being loaded from the sysroot, an unstable location; did you mean to load this crate from crates.io via Cargo.toml
instead?
impl<'a> Parser<'a>
[src]
pub fn parse_expansion(
&mut self,
kind: ExpansionKind,
macro_legacy_warnings: bool
) -> PResult<'a, Expansion>
[src]
&mut self,
kind: ExpansionKind,
macro_legacy_warnings: bool
) -> PResult<'a, Expansion>
🔬 This is a nightly-only experimental API. (rustc_private
)
this crate is being loaded from the sysroot, an unstable location; did you mean to load this crate from crates.io via Cargo.toml
instead?
pub fn ensure_complete_parse(
&mut self,
macro_path: &Path,
kind_name: &str,
span: Span
)
[src]
&mut self,
macro_path: &Path,
kind_name: &str,
span: Span
)
🔬 This is a nightly-only experimental API. (rustc_private
)
this crate is being loaded from the sysroot, an unstable location; did you mean to load this crate from crates.io via Cargo.toml
instead?
Trait Implementations
impl<'a> Clone for Parser<'a>
[src]
fn clone(&self) -> Parser<'a>
[src]
Returns a copy of the value. Read more
fn clone_from(&mut self, source: &Self)
1.0.0[src]
Performs copy-assignment from source
. Read more
impl<'a> ParserObsoleteMethods for Parser<'a>
[src]
fn obsolete(&mut self, sp: Span, kind: ObsoleteSyntax)
[src]
🔬 This is a nightly-only experimental API. (rustc_private
)
this crate is being loaded from the sysroot, an unstable location; did you mean to load this crate from crates.io via Cargo.toml
instead?
Reports an obsolete syntax non-fatal error.
fn report(
&mut self,
sp: Span,
kind: ObsoleteSyntax,
kind_str: &str,
desc: &str,
error: bool
)
[src]
&mut self,
sp: Span,
kind: ObsoleteSyntax,
kind_str: &str,
desc: &str,
error: bool
)
🔬 This is a nightly-only experimental API. (rustc_private
)
this crate is being loaded from the sysroot, an unstable location; did you mean to load this crate from crates.io via Cargo.toml
instead?