Struct syntax::parse::parser::Parser [−][src]
pub struct Parser<'a> {
pub sess: &'a ParseSess,
pub token: Token,
pub span: Span,
meta_var_span: Option<Span>,
pub prev_span: Span,
prev_token_kind: PrevTokenKind,
restrictions: Restrictions,
pub(crate) directory: Directory<'a>,
pub recurse_into_file_modules: bool,
pub root_module_name: Option<String>,
pub(crate) expected_tokens: Vec<TokenType>,
token_cursor: TokenCursor,
desugar_doc_comments: bool,
pub 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?
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?
prev_token_kind: PrevTokenKind
🔬 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 previous token kind
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?
directory: Directory<'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?
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?
token_cursor: TokenCursor
🔬 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]
impl<'a> Parser<'a>pub fn new(
sess: &'a ParseSess,
tokens: TokenStream,
directory: Option<Directory<'a>>,
recurse_into_file_modules: bool,
desugar_doc_comments: bool
) -> Self[src]
pub fn new(
sess: &'a ParseSess,
tokens: TokenStream,
directory: Option<Directory<'a>>,
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?
fn next_tok(&mut self) -> TokenAndSpan[src]
fn next_tok(&mut self) -> TokenAndSpan🔬 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 this_token_to_string(&self) -> String[src]
pub fn this_token_to_string(&self) -> 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?
Convert the current token to a string using self's reader
fn token_descr(&self) -> Option<&'static str>[src]
fn token_descr(&self) -> Option<&'static str>🔬 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?
fn this_token_descr(&self) -> String[src]
fn this_token_descr(&self) -> 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?
fn unexpected_last<T>(&self, t: &Token) -> PResult<'a, T>[src]
fn unexpected_last<T>(&self, t: &Token) -> 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(crate) fn unexpected<T>(&mut self) -> PResult<'a, T>[src]
pub(crate) fn unexpected<T>(&mut self) -> 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 expect(&mut self, t: &Token) -> PResult<'a, ()>[src]
pub fn expect(&mut self, t: &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 and consume the token t. Signal an error if the next token is not t.
fn expect_one_of(
&mut self,
edible: &[Token],
inedible: &[Token]
) -> PResult<'a, ()>[src]
fn expect_one_of(
&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.
fn interpolated_or_expr_span(
&self,
expr: PResult<'a, P<Expr>>
) -> PResult<'a, (Span, P<Expr>)>[src]
fn interpolated_or_expr_span(
&self,
expr: PResult<'a, P<Expr>>
) -> PResult<'a, (Span, 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?
returns the span of expr, if it was not interpolated or the span of the interpolated token
fn expected_ident_found(&self) -> DiagnosticBuilder<'a>[src]
fn expected_ident_found(&self) -> 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 parse_ident(&mut self) -> PResult<'a, Ident>[src]
pub fn parse_ident(&mut self) -> PResult<'a, Ident>🔬 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?
fn parse_ident_common(&mut self, recover: bool) -> PResult<'a, Ident>[src]
fn parse_ident_common(&mut self, recover: bool) -> PResult<'a, Ident>🔬 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?
fn check(&mut self, tok: &Token) -> bool[src]
fn check(&mut self, tok: &Token) -> 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?
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]
pub fn eat(&mut self, tok: &Token) -> 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?
Consume token 'tok' if it exists. Returns true if the given token was present, false otherwise.
fn check_keyword(&mut self, kw: Keyword) -> bool[src]
fn check_keyword(&mut self, kw: Keyword) -> 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?
pub fn eat_keyword(&mut self, kw: Keyword) -> bool[src]
pub fn eat_keyword(&mut self, kw: Keyword) -> 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?
If the next token is the given keyword, eat it and return true. Otherwise, return false.
fn eat_keyword_noexpect(&mut self, kw: Keyword) -> bool[src]
fn eat_keyword_noexpect(&mut self, kw: Keyword) -> 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?
fn expect_keyword(&mut self, kw: Keyword) -> PResult<'a, ()>[src]
fn expect_keyword(&mut self, kw: Keyword) -> 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?
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.
fn check_ident(&mut self) -> bool[src]
fn check_ident(&mut self) -> 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?
fn check_path(&mut self) -> bool[src]
fn check_path(&mut self) -> 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?
fn check_type(&mut self) -> bool[src]
fn check_type(&mut self) -> 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?
fn eat_plus(&mut self) -> bool[src]
fn eat_plus(&mut self) -> 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?
Expect and consume a +. if += is seen, replace it with a =
and continue. If a + is not seen, return false.
This is using when token splitting += into +. See issue 47856 for an example of when this may occur.
fn check_plus(&mut self) -> bool[src]
fn check_plus(&mut self) -> 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?
Checks to see if the next token is either + or +=.
Otherwise returns false.
fn expect_and(&mut self) -> PResult<'a, ()>[src]
fn expect_and(&mut self) -> 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 and consume an &. If && is seen, replace it with a single
& and continue. If an & is not seen, signal an error.
fn expect_or(&mut self) -> PResult<'a, ()>[src]
fn expect_or(&mut self) -> 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 and consume an |. If || is seen, replace it with a single
| and continue. If an | is not seen, signal an error.
fn expect_no_suffix(&self, sp: Span, kind: &str, suffix: Option<Name>)[src]
fn expect_no_suffix(&self, sp: Span, kind: &str, suffix: Option<Name>)🔬 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?
fn eat_lt(&mut self) -> bool[src]
fn eat_lt(&mut self) -> 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?
Attempt to consume a <. If << is seen, replace it with a single
< and continue. If a < is not seen, return false.
This is meant to be used when parsing generics on a path to get the starting token.
fn expect_lt(&mut self) -> PResult<'a, ()>[src]
fn expect_lt(&mut self) -> 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?
fn expect_gt(&mut self) -> PResult<'a, ()>[src]
fn expect_gt(&mut self) -> 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 and consume a GT. if a >> is seen, replace it with a single > and continue. If a GT is not seen, signal an error.
fn eat_to_tokens(&mut self, kets: &[&Token])[src]
fn eat_to_tokens(&mut self, kets: &[&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?
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]
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>, 🔬 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]
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>, 🔬 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.
fn parse_seq_to_before_tokens<T, F>(
&mut self,
kets: &[&Token],
sep: SeqSep,
expect: TokenExpectType,
f: F
) -> PResult<'a, Vec<T>> where
F: FnMut(&mut Parser<'a>) -> PResult<'a, T>, [src]
fn parse_seq_to_before_tokens<T, F>(
&mut self,
kets: &[&Token],
sep: SeqSep,
expect: TokenExpectType,
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?
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]
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>, 🔬 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 bump(&mut self)[src]
pub fn bump(&mut 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?
Advance the parser by one token
fn bump_with(&mut self, next: Token, span: Span)[src]
fn bump_with(&mut self, next: 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?
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]
pub fn look_ahead<R, F>(&self, dist: usize, f: F) -> R where
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?
fn look_ahead_span(&self, dist: usize) -> Span[src]
fn look_ahead_span(&self, dist: usize) -> 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?
pub fn fatal(&self, m: &str) -> DiagnosticBuilder<'a>[src]
pub fn fatal(&self, m: &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 span_fatal<S: Into<MultiSpan>>(
&self,
sp: S,
m: &str
) -> DiagnosticBuilder<'a>[src]
pub fn span_fatal<S: Into<MultiSpan>>(
&self,
sp: S,
m: &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?
fn span_fatal_err<S: Into<MultiSpan>>(
&self,
sp: S,
err: Error
) -> DiagnosticBuilder<'a>[src]
fn span_fatal_err<S: Into<MultiSpan>>(
&self,
sp: S,
err: Error
) -> 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?
fn bug(&self, m: &str) -> ![src]
fn bug(&self, m: &str) -> !🔬 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?
fn span_err<S: Into<MultiSpan>>(&self, sp: S, m: &str)[src]
fn span_err<S: Into<MultiSpan>>(&self, sp: S, m: &str)🔬 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?
fn struct_span_err<S: Into<MultiSpan>>(
&self,
sp: S,
m: &str
) -> DiagnosticBuilder<'a>[src]
fn struct_span_err<S: Into<MultiSpan>>(
&self,
sp: S,
m: &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(crate) fn span_bug<S: Into<MultiSpan>>(&self, sp: S, m: &str) -> ![src]
pub(crate) fn span_bug<S: Into<MultiSpan>>(&self, sp: S, m: &str) -> !🔬 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(crate) fn abort_if_errors(&self)[src]
pub(crate) fn abort_if_errors(&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?
fn cancel(&self, err: &mut DiagnosticBuilder)[src]
fn cancel(&self, err: &mut DiagnosticBuilder)🔬 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(crate) fn diagnostic(&self) -> &'a Handler[src]
pub(crate) fn diagnostic(&self) -> &'a Handler🔬 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?
fn token_is_bare_fn_keyword(&mut self) -> bool[src]
fn token_is_bare_fn_keyword(&mut self) -> 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?
Is the current token one of the keywords that signals a bare function type?
fn parse_ty_bare_fn(
&mut self,
generic_params: Vec<GenericParam>
) -> PResult<'a, TyKind>[src]
fn parse_ty_bare_fn(
&mut self,
generic_params: Vec<GenericParam>
) -> 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:
fn parse_asyncness(&mut self) -> IsAsync[src]
fn parse_asyncness(&mut self) -> IsAsync🔬 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 asyncness: async or nothing
fn parse_unsafety(&mut self) -> Unsafety[src]
fn parse_unsafety(&mut self) -> Unsafety🔬 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 unsafety: unsafe or nothing.
pub fn parse_trait_item(&mut self, at_end: &mut bool) -> PResult<'a, TraitItem>[src]
pub fn parse_trait_item(&mut self, at_end: &mut bool) -> PResult<'a, TraitItem>🔬 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
fn parse_trait_item_(
&mut self,
at_end: &mut bool,
attrs: Vec<Attribute>
) -> PResult<'a, TraitItem>[src]
fn parse_trait_item_(
&mut self,
at_end: &mut bool,
attrs: Vec<Attribute>
) -> PResult<'a, TraitItem>🔬 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?
fn parse_ret_ty(&mut self, allow_plus: bool) -> PResult<'a, FunctionRetTy>[src]
fn parse_ret_ty(&mut self, allow_plus: bool) -> PResult<'a, FunctionRetTy>🔬 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]
pub fn parse_ty(&mut self) -> PResult<'a, P<Ty>>🔬 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?
fn parse_ty_no_plus(&mut self) -> PResult<'a, P<Ty>>[src]
fn parse_ty_no_plus(&mut self) -> PResult<'a, P<Ty>>🔬 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 type in restricted contexts where + is not permitted.
Example 1: &'a TYPE
+ is prohibited to maintain operator priority (P(+) < P(&)).
Example 2: value1 as TYPE + value2
+ is prohibited to avoid interactions with expression grammar.
fn parse_ty_common(
&mut self,
allow_plus: bool,
allow_qpath_recovery: bool
) -> PResult<'a, P<Ty>>[src]
fn parse_ty_common(
&mut self,
allow_plus: bool,
allow_qpath_recovery: bool
) -> PResult<'a, P<Ty>>🔬 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?
fn parse_remaining_bounds(
&mut self,
generic_params: Vec<GenericParam>,
path: Path,
lo: Span,
parse_plus: bool
) -> PResult<'a, TyKind>[src]
fn parse_remaining_bounds(
&mut self,
generic_params: Vec<GenericParam>,
path: Path,
lo: Span,
parse_plus: bool
) -> 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?
fn maybe_report_ambiguous_plus(
&mut self,
allow_plus: bool,
impl_dyn_multi: bool,
ty: &Ty
)[src]
fn maybe_report_ambiguous_plus(
&mut self,
allow_plus: bool,
impl_dyn_multi: bool,
ty: &Ty
)🔬 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?
fn maybe_recover_from_bad_type_plus(
&mut self,
allow_plus: bool,
ty: &Ty
) -> PResult<'a, ()>[src]
fn maybe_recover_from_bad_type_plus(
&mut self,
allow_plus: bool,
ty: &Ty
) -> 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?
fn maybe_recover_from_bad_qpath<T: RecoverQPath>(
&mut self,
base: T,
allow_recovery: bool
) -> PResult<'a, T>[src]
fn maybe_recover_from_bad_qpath<T: RecoverQPath>(
&mut self,
base: T,
allow_recovery: bool
) -> 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?
fn parse_borrowed_pointee(&mut self) -> PResult<'a, TyKind>[src]
fn parse_borrowed_pointee(&mut self) -> 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?
fn parse_ptr(&mut self) -> PResult<'a, MutTy>[src]
fn parse_ptr(&mut self) -> PResult<'a, MutTy>🔬 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?
fn is_named_argument(&mut self) -> bool[src]
fn is_named_argument(&mut self) -> 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?
fn parse_arg_general(&mut self, require_name: bool) -> PResult<'a, Arg>[src]
fn parse_arg_general(&mut self, require_name: bool) -> PResult<'a, Arg>🔬 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(crate) fn parse_arg(&mut self) -> PResult<'a, Arg>[src]
pub(crate) fn parse_arg(&mut self) -> PResult<'a, Arg>🔬 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
fn parse_fn_block_arg(&mut self) -> PResult<'a, Arg>[src]
fn parse_fn_block_arg(&mut self) -> PResult<'a, Arg>🔬 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|
fn maybe_parse_fixed_length_of_vec(&mut self) -> PResult<'a, Option<P<Expr>>>[src]
fn maybe_parse_fixed_length_of_vec(&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?
fn parse_lit_token(&mut self) -> PResult<'a, LitKind>[src]
fn parse_lit_token(&mut self) -> PResult<'a, LitKind>🔬 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(crate) fn parse_lit(&mut self) -> PResult<'a, Lit>[src]
pub(crate) fn parse_lit(&mut self) -> PResult<'a, Lit>🔬 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(crate) fn parse_literal_maybe_minus(&mut self) -> PResult<'a, P<Expr>>[src]
pub(crate) fn parse_literal_maybe_minus(&mut self) -> 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?
matches '-' lit | lit (cf. ast_validation::AstValidator::check_expr_within_pat)
fn parse_path_segment_ident(&mut self) -> PResult<'a, Ident>[src]
fn parse_path_segment_ident(&mut self) -> PResult<'a, Ident>🔬 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?
fn parse_qpath(&mut self, style: PathStyle) -> PResult<'a, (QSelf, Path)>[src]
fn parse_qpath(&mut self, style: PathStyle) -> PResult<'a, (QSelf, 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?
Parses qualified path.
Assumes that the leading < has been parsed already.
qualified_path = <type [as trait_ref]>::path
Examples
<T>::default
<T as U>::a
<T as U>::F::a<S> (without disambiguator)
<T as U>::F::a::<S> (with disambiguator)
pub fn parse_path(&mut self, style: PathStyle) -> PResult<'a, Path>[src]
pub fn parse_path(&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?
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(crate) fn parse_path_common(
&mut self,
style: PathStyle,
enable_warning: bool
) -> PResult<'a, Path>[src]
pub(crate) fn parse_path_common(
&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]
pub fn parse_path_allowing_meta(
&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.
fn parse_path_segments(
&mut self,
segments: &mut Vec<PathSegment>,
style: PathStyle,
enable_warning: bool
) -> PResult<'a, ()>[src]
fn parse_path_segments(
&mut self,
segments: &mut Vec<PathSegment>,
style: PathStyle,
enable_warning: bool
) -> 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?
fn parse_path_segment(
&mut self,
style: PathStyle,
enable_warning: bool
) -> PResult<'a, PathSegment>[src]
fn parse_path_segment(
&mut self,
style: PathStyle,
enable_warning: bool
) -> PResult<'a, PathSegment>🔬 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(crate) fn check_lifetime(&mut self) -> bool[src]
pub(crate) fn check_lifetime(&mut self) -> 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?
pub(crate) fn expect_lifetime(&mut self) -> Lifetime[src]
pub(crate) fn expect_lifetime(&mut self) -> Lifetime🔬 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 single lifetime 'a or panic.
fn eat_label(&mut self) -> Option<Label>[src]
fn eat_label(&mut self) -> Option<Label>🔬 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?
fn parse_mutability(&mut self) -> Mutability[src]
fn parse_mutability(&mut self) -> Mutability🔬 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 mutability (mut or nothing).
fn parse_field_name(&mut self) -> PResult<'a, Ident>[src]
fn parse_field_name(&mut self) -> PResult<'a, Ident>🔬 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?
fn parse_field(&mut self) -> PResult<'a, Field>[src]
fn parse_field(&mut self) -> PResult<'a, Field>🔬 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)?
fn mk_expr(
&mut self,
span: Span,
node: ExprKind,
attrs: ThinVec<Attribute>
) -> P<Expr>[src]
fn mk_expr(
&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?
fn mk_unary(&mut self, unop: UnOp, expr: P<Expr>) -> ExprKind[src]
fn mk_unary(&mut self, unop: UnOp, expr: 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?
fn mk_binary(&mut self, binop: BinOp, lhs: P<Expr>, rhs: P<Expr>) -> ExprKind[src]
fn mk_binary(&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?
fn mk_call(&mut self, f: P<Expr>, args: Vec<P<Expr>>) -> ExprKind[src]
fn mk_call(&mut self, f: P<Expr>, args: Vec<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?
fn mk_index(&mut self, expr: P<Expr>, idx: P<Expr>) -> ExprKind[src]
fn mk_index(&mut self, expr: P<Expr>, idx: 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?
fn mk_range(
&mut self,
start: Option<P<Expr>>,
end: Option<P<Expr>>,
limits: RangeLimits
) -> PResult<'a, ExprKind>[src]
fn mk_range(
&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?
fn mk_assign_op(&mut self, binop: BinOp, lhs: P<Expr>, rhs: P<Expr>) -> ExprKind[src]
fn mk_assign_op(&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]
pub fn mk_mac_expr(
&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?
fn expect_delimited_token_tree(
&mut self
) -> PResult<'a, (MacDelimiter, ThinTokenStream)>[src]
fn expect_delimited_token_tree(
&mut self
) -> PResult<'a, (MacDelimiter, ThinTokenStream)>🔬 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?
fn parse_bottom_expr(&mut self) -> PResult<'a, P<Expr>>[src]
fn parse_bottom_expr(&mut self) -> 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?
At the bottom (top?) of the precedence hierarchy, parse things like parenthesized exprs, macros, return, etc.
NB: This does not parse outer attributes, and is private because it only works correctly if called from parse_dot_or_call_expr().
fn parse_struct_expr(
&mut self,
lo: Span,
pth: Path,
attrs: ThinVec<Attribute>
) -> PResult<'a, P<Expr>>[src]
fn parse_struct_expr(
&mut self,
lo: Span,
pth: Path,
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?
fn parse_or_use_outer_attributes(
&mut self,
already_parsed_attrs: Option<ThinVec<Attribute>>
) -> PResult<'a, ThinVec<Attribute>>[src]
fn parse_or_use_outer_attributes(
&mut self,
already_parsed_attrs: Option<ThinVec<Attribute>>
) -> PResult<'a, ThinVec<Attribute>>🔬 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?
fn parse_block_expr(
&mut self,
opt_label: Option<Label>,
lo: Span,
blk_mode: BlockCheckMode,
outer_attrs: ThinVec<Attribute>
) -> PResult<'a, P<Expr>>[src]
fn parse_block_expr(
&mut self,
opt_label: Option<Label>,
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
fn parse_dot_or_call_expr(
&mut self,
already_parsed_attrs: Option<ThinVec<Attribute>>
) -> PResult<'a, P<Expr>>[src]
fn parse_dot_or_call_expr(
&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
fn parse_dot_or_call_expr_with(
&mut self,
e0: P<Expr>,
lo: Span,
attrs: ThinVec<Attribute>
) -> PResult<'a, P<Expr>>[src]
fn parse_dot_or_call_expr_with(
&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?
fn parse_dot_suffix(
&mut self,
self_arg: P<Expr>,
lo: Span
) -> PResult<'a, P<Expr>>[src]
fn parse_dot_suffix(
&mut self,
self_arg: P<Expr>,
lo: Span
) -> 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?
fn parse_dot_or_call_expr_with_(
&mut self,
e0: P<Expr>,
lo: Span
) -> PResult<'a, P<Expr>>[src]
fn parse_dot_or_call_expr_with_(
&mut self,
e0: P<Expr>,
lo: Span
) -> 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(crate) fn process_potential_macro_variable(&mut self)[src]
pub(crate) fn process_potential_macro_variable(&mut 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(crate) fn parse_token_tree(&mut self) -> TokenTree[src]
pub(crate) fn parse_token_tree(&mut self) -> TokenTree🔬 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]
pub fn parse_all_token_trees(&mut self) -> PResult<'a, Vec<TokenTree>>🔬 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]
pub fn parse_tokens(&mut self) -> TokenStream🔬 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?
fn parse_prefix_expr(
&mut self,
already_parsed_attrs: Option<ThinVec<Attribute>>
) -> PResult<'a, P<Expr>>[src]
fn parse_prefix_expr(
&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
fn parse_assoc_expr(
&mut self,
already_parsed_attrs: Option<ThinVec<Attribute>>
) -> PResult<'a, P<Expr>>[src]
fn parse_assoc_expr(
&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.
fn parse_assoc_expr_with(
&mut self,
min_prec: usize,
lhs: LhsExpr
) -> PResult<'a, P<Expr>>[src]
fn parse_assoc_expr_with(
&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
fn parse_assoc_op_cast(
&mut self,
lhs: P<Expr>,
lhs_span: Span,
expr_kind: fn(_: P<Expr>, _: P<Ty>) -> ExprKind
) -> PResult<'a, P<Expr>>[src]
fn parse_assoc_op_cast(
&mut self,
lhs: P<Expr>,
lhs_span: Span,
expr_kind: fn(_: P<Expr>, _: P<Ty>) -> ExprKind
) -> 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?
fn check_no_chained_comparison(&mut self, lhs: &Expr, outer_op: &AssocOp)[src]
fn check_no_chained_comparison(&mut self, lhs: &Expr, outer_op: &AssocOp)🔬 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?
Produce an error if comparison operators are chained (RFC #558). We only need to check lhs, not rhs, because all comparison ops have same precedence and are left-associative
fn parse_prefix_range_expr(
&mut self,
already_parsed_attrs: Option<ThinVec<Attribute>>
) -> PResult<'a, P<Expr>>[src]
fn parse_prefix_range_expr(
&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 prefix-forms of range notation: ..expr, .., ..=expr
fn is_at_start_of_range_notation_rhs(&self) -> bool[src]
fn is_at_start_of_range_notation_rhs(&self) -> 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?
fn parse_if_expr(&mut self, attrs: ThinVec<Attribute>) -> PResult<'a, P<Expr>>[src]
fn parse_if_expr(&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)
fn parse_if_let_expr(
&mut self,
attrs: ThinVec<Attribute>
) -> PResult<'a, P<Expr>>[src]
fn parse_if_let_expr(
&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)
fn parse_lambda_expr(
&mut self,
attrs: ThinVec<Attribute>
) -> PResult<'a, P<Expr>>[src]
fn parse_lambda_expr(
&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?
fn parse_else_expr(&mut self) -> PResult<'a, P<Expr>>[src]
fn parse_else_expr(&mut self) -> 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?
fn parse_for_expr(
&mut self,
opt_label: Option<Label>,
span_lo: Span,
attrs: ThinVec<Attribute>
) -> PResult<'a, P<Expr>>[src]
fn parse_for_expr(
&mut self,
opt_label: Option<Label>,
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)
fn parse_while_expr(
&mut self,
opt_label: Option<Label>,
span_lo: Span,
attrs: ThinVec<Attribute>
) -> PResult<'a, P<Expr>>[src]
fn parse_while_expr(
&mut self,
opt_label: Option<Label>,
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)
fn parse_while_let_expr(
&mut self,
opt_label: Option<Label>,
span_lo: Span,
attrs: ThinVec<Attribute>
) -> PResult<'a, P<Expr>>[src]
fn parse_while_let_expr(
&mut self,
opt_label: Option<Label>,
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)
fn parse_loop_expr(
&mut self,
opt_label: Option<Label>,
span_lo: Span,
attrs: ThinVec<Attribute>
) -> PResult<'a, P<Expr>>[src]
fn parse_loop_expr(
&mut self,
opt_label: Option<Label>,
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_async_block(
&mut self,
attrs: ThinVec<Attribute>
) -> PResult<'a, P<Expr>>[src]
pub fn parse_async_block(
&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 async move {...} expression
fn parse_catch_expr(
&mut self,
span_lo: Span,
attrs: ThinVec<Attribute>
) -> PResult<'a, P<Expr>>[src]
fn parse_catch_expr(
&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)
fn parse_match_expr(
&mut self,
attrs: ThinVec<Attribute>
) -> PResult<'a, P<Expr>>[src]
fn parse_match_expr(
&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?
pub(crate) fn parse_arm(&mut self) -> PResult<'a, Arm>[src]
pub(crate) fn parse_arm(&mut self) -> PResult<'a, Arm>🔬 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]
pub fn parse_expr(&mut self) -> 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
fn with_res<F, T>(&mut self, r: Restrictions, f: F) -> T where
F: FnOnce(&mut Self) -> T, [src]
fn with_res<F, T>(&mut self, r: Restrictions, f: F) -> T where
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.
fn parse_expr_res(
&mut self,
r: Restrictions,
already_parsed_attrs: Option<ThinVec<Attribute>>
) -> PResult<'a, P<Expr>>[src]
fn parse_expr_res(
&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
fn parse_initializer(&mut self, skip_eq: bool) -> PResult<'a, Option<P<Expr>>>[src]
fn parse_initializer(&mut self, skip_eq: bool) -> 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?
Parse the RHS of a local variable declaration (e.g. '= 14;')
fn parse_pats(&mut self) -> PResult<'a, Vec<P<Pat>>>[src]
fn parse_pats(&mut self) -> PResult<'a, Vec<P<Pat>>>🔬 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 patterns, separated by '|' s
fn parse_parenthesized_pat_list(
&mut self
) -> PResult<'a, (Vec<P<Pat>>, Option<usize>, bool)>[src]
fn parse_parenthesized_pat_list(
&mut self
) -> PResult<'a, (Vec<P<Pat>>, Option<usize>, 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?
fn parse_pat_list(&mut self) -> PResult<'a, (Vec<P<Pat>>, Option<usize>, bool)>[src]
fn parse_pat_list(&mut self) -> PResult<'a, (Vec<P<Pat>>, Option<usize>, 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?
fn parse_pat_vec_elements(
&mut self
) -> PResult<'a, (Vec<P<Pat>>, Option<P<Pat>>, Vec<P<Pat>>)>[src]
fn parse_pat_vec_elements(
&mut self
) -> PResult<'a, (Vec<P<Pat>>, Option<P<Pat>>, Vec<P<Pat>>)>🔬 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?
fn parse_pat_field(
&mut self,
lo: Span,
attrs: Vec<Attribute>
) -> PResult<'a, Spanned<FieldPat>>[src]
fn parse_pat_field(
&mut self,
lo: Span,
attrs: Vec<Attribute>
) -> PResult<'a, Spanned<FieldPat>>🔬 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?
fn parse_pat_fields(&mut self) -> PResult<'a, (Vec<Spanned<FieldPat>>, bool)>[src]
fn parse_pat_fields(&mut self) -> PResult<'a, (Vec<Spanned<FieldPat>>, 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?
Parse the fields of a struct-like pattern
fn parse_pat_range_end(&mut self) -> PResult<'a, P<Expr>>[src]
fn parse_pat_range_end(&mut self) -> 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?
fn parse_as_ident(&mut self) -> bool[src]
fn parse_as_ident(&mut self) -> 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?
fn parse_top_level_pat(&mut self) -> PResult<'a, P<Pat>>[src]
fn parse_top_level_pat(&mut self) -> PResult<'a, P<Pat>>🔬 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?
A wrapper around parse_pat with some special error handling for the
"top-level" patterns in a match arm, for loop, let, &c. (in contast
to subpatterns within such).
pub fn parse_pat(&mut self) -> PResult<'a, P<Pat>>[src]
pub fn parse_pat(&mut self) -> PResult<'a, P<Pat>>🔬 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.
fn parse_pat_with_range_pat(
&mut self,
allow_range_pat: bool
) -> PResult<'a, P<Pat>>[src]
fn parse_pat_with_range_pat(
&mut self,
allow_range_pat: bool
) -> PResult<'a, P<Pat>>🔬 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, with a setting whether modern range patterns e.g. a..=b, a..b are
allowed.
fn parse_pat_ident(&mut self, binding_mode: BindingMode) -> PResult<'a, PatKind>[src]
fn parse_pat_ident(&mut self, binding_mode: BindingMode) -> PResult<'a, PatKind>🔬 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 or ident @ pat used by the copy foo and ref foo patterns to give a good error message when parsing mistakes like ref foo(a,b)
fn parse_local(&mut self, attrs: ThinVec<Attribute>) -> PResult<'a, P<Local>>[src]
fn parse_local(&mut self, attrs: ThinVec<Attribute>) -> PResult<'a, P<Local>>🔬 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 local variable declaration
fn parse_name_and_ty(
&mut self,
lo: Span,
vis: Visibility,
attrs: Vec<Attribute>
) -> PResult<'a, StructField>[src]
fn parse_name_and_ty(
&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
fn expected_item_err(&self, attrs: &[Attribute])[src]
fn expected_item_err(&self, attrs: &[Attribute])🔬 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?
Emit an expected item after attributes error.
pub fn parse_stmt(&mut self) -> PResult<'a, Option<Stmt>>[src]
pub fn parse_stmt(&mut self) -> 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. This stops just before trailing semicolons on everything but items.
e.g. a StmtKind::Semi parses to a StmtKind::Expr, leaving the trailing ; unconsumed.
fn recover_stmt(&mut self)[src]
fn recover_stmt(&mut 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?
fn recover_stmt_(
&mut self,
break_on_semi: SemiColonMode,
break_on_block: BlockMode
)[src]
fn recover_stmt_(
&mut self,
break_on_semi: SemiColonMode,
break_on_block: BlockMode
)🔬 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?
fn parse_stmt_(&mut self, macro_legacy_warnings: bool) -> Option<Stmt>[src]
fn parse_stmt_(&mut self, macro_legacy_warnings: bool) -> 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?
fn is_async_block(&mut self) -> bool[src]
fn is_async_block(&mut self) -> 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?
fn is_catch_expr(&mut self) -> bool[src]
fn is_catch_expr(&mut self) -> 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?
fn is_union_item(&self) -> bool[src]
fn is_union_item(&self) -> 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?
fn is_crate_vis(&self) -> bool[src]
fn is_crate_vis(&self) -> 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?
fn is_extern_non_path(&self) -> bool[src]
fn is_extern_non_path(&self) -> 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?
fn is_existential_type_decl(&self) -> bool[src]
fn is_existential_type_decl(&self) -> 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?
fn is_auto_trait_item(&mut self) -> bool[src]
fn is_auto_trait_item(&mut self) -> 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?
fn eat_macro_def(
&mut self,
attrs: &[Attribute],
vis: &Visibility,
lo: Span
) -> PResult<'a, Option<P<Item>>>[src]
fn eat_macro_def(
&mut self,
attrs: &[Attribute],
vis: &Visibility,
lo: Span
) -> PResult<'a, Option<P<Item>>>🔬 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?
fn parse_stmt_without_recovery(
&mut self,
macro_legacy_warnings: bool
) -> PResult<'a, Option<Stmt>>[src]
fn parse_stmt_without_recovery(
&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?
fn expr_is_complete(&mut self, e: &Expr) -> bool[src]
fn expr_is_complete(&mut self, e: &Expr) -> 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?
Is this expression a successfully-parsed statement?
pub fn parse_block(&mut self) -> PResult<'a, P<Block>>[src]
pub fn parse_block(&mut self) -> PResult<'a, P<Block>>🔬 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.
fn parse_inner_attrs_and_block(
&mut self
) -> PResult<'a, (Vec<Attribute>, P<Block>)>[src]
fn parse_inner_attrs_and_block(
&mut self
) -> PResult<'a, (Vec<Attribute>, P<Block>)>🔬 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. Inner attrs are allowed.
fn parse_block_tail(
&mut self,
lo: Span,
s: BlockCheckMode
) -> PResult<'a, P<Block>>[src]
fn parse_block_tail(
&mut self,
lo: Span,
s: BlockCheckMode
) -> PResult<'a, P<Block>>🔬 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 rest of a block expression or function body Precondition: already parsed the '{'.
pub(crate) fn parse_full_stmt(
&mut self,
macro_legacy_warnings: bool
) -> PResult<'a, Option<Stmt>>[src]
pub(crate) fn parse_full_stmt(
&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.
fn warn_missing_semicolon(&self)[src]
fn warn_missing_semicolon(&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?
fn err_dotdotdot_syntax(&self, span: Span)[src]
fn err_dotdotdot_syntax(&self, 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?
fn parse_generic_bounds_common(
&mut self,
allow_plus: bool
) -> PResult<'a, GenericBounds>[src]
fn parse_generic_bounds_common(
&mut self,
allow_plus: bool
) -> PResult<'a, GenericBounds>🔬 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?
fn parse_generic_bounds(&mut self) -> PResult<'a, GenericBounds>[src]
fn parse_generic_bounds(&mut self) -> PResult<'a, GenericBounds>🔬 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?
fn parse_lt_param_bounds(&mut self) -> GenericBounds[src]
fn parse_lt_param_bounds(&mut self) -> GenericBounds🔬 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?
fn parse_ty_param(
&mut self,
preceding_attrs: Vec<Attribute>
) -> PResult<'a, GenericParam>[src]
fn parse_ty_param(
&mut self,
preceding_attrs: Vec<Attribute>
) -> PResult<'a, GenericParam>🔬 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 typaram = IDENT (? unbound)? optbounds ( EQ ty )?
fn parse_trait_item_assoc_ty(
&mut self
) -> PResult<'a, (Ident, TraitItemKind, Generics)>[src]
fn parse_trait_item_assoc_ty(
&mut self
) -> PResult<'a, (Ident, TraitItemKind, Generics)>🔬 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 the following grammar: TraitItemAssocTy = Ident ["<"...">"] [":" GenericBounds] ["where" ...] ["=" Ty]
pub(crate) fn parse_generic_params(&mut self) -> PResult<'a, Vec<GenericParam>>[src]
pub(crate) fn parse_generic_params(&mut self) -> PResult<'a, Vec<GenericParam>>🔬 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.
fn parse_generics(&mut self) -> PResult<'a, Generics>[src]
fn parse_generics(&mut self) -> PResult<'a, Generics>🔬 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 )
fn parse_generic_args(
&mut self
) -> PResult<'a, (Vec<GenericArg>, Vec<TypeBinding>)>[src]
fn parse_generic_args(
&mut self
) -> PResult<'a, (Vec<GenericArg>, Vec<TypeBinding>)>🔬 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 arguments and associated type bindings, possibly including trailing comma.
fn parse_where_clause(&mut self) -> PResult<'a, WhereClause>[src]
fn parse_where_clause(&mut self) -> PResult<'a, WhereClause>🔬 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
fn parse_fn_args(
&mut self,
named_args: bool,
allow_variadic: bool
) -> PResult<'a, (Vec<Arg>, bool)>[src]
fn parse_fn_args(
&mut self,
named_args: bool,
allow_variadic: bool
) -> PResult<'a, (Vec<Arg>, 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?
fn parse_fn_decl(&mut self, allow_variadic: bool) -> PResult<'a, P<FnDecl>>[src]
fn parse_fn_decl(&mut self, allow_variadic: bool) -> PResult<'a, P<FnDecl>>🔬 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
fn parse_self_arg(&mut self) -> PResult<'a, Option<Arg>>[src]
fn parse_self_arg(&mut self) -> PResult<'a, Option<Arg>>🔬 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 the parsed optional self argument and whether a self shortcut was used.
fn parse_fn_decl_with_self<F>(
&mut self,
parse_arg_fn: F
) -> PResult<'a, P<FnDecl>> where
F: FnMut(&mut Parser<'a>) -> PResult<'a, Arg>, [src]
fn parse_fn_decl_with_self<F>(
&mut self,
parse_arg_fn: F
) -> PResult<'a, P<FnDecl>> where
F: FnMut(&mut Parser<'a>) -> PResult<'a, Arg>, 🔬 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 parameter list and result type of a function that may have a self parameter.
fn parse_fn_block_decl(&mut self) -> PResult<'a, P<FnDecl>>[src]
fn parse_fn_block_decl(&mut self) -> PResult<'a, P<FnDecl>>🔬 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?
fn parse_fn_header(&mut self) -> PResult<'a, (Ident, Generics)>[src]
fn parse_fn_header(&mut self) -> PResult<'a, (Ident, Generics)>🔬 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 name and optional generic types of a function header.
fn mk_item(
&mut self,
span: Span,
ident: Ident,
node: ItemKind,
vis: Visibility,
attrs: Vec<Attribute>
) -> P<Item>[src]
fn mk_item(
&mut self,
span: Span,
ident: Ident,
node: ItemKind,
vis: Visibility,
attrs: Vec<Attribute>
) -> P<Item>🔬 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?
fn parse_item_fn(
&mut self,
unsafety: Unsafety,
asyncness: IsAsync,
constness: Spanned<Constness>,
abi: Abi
) -> PResult<'a, (Ident, ItemKind, Option<Vec<Attribute>>)>[src]
fn parse_item_fn(
&mut self,
unsafety: Unsafety,
asyncness: IsAsync,
constness: Spanned<Constness>,
abi: Abi
) -> PResult<'a, (Ident, ItemKind, Option<Vec<Attribute>>)>🔬 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 item-position function declaration.
fn is_const_item(&mut self) -> bool[src]
fn is_const_item(&mut self) -> 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?
true if we are looking at const ID, false for things like const fn etc
fn parse_fn_front_matter(
&mut self
) -> PResult<'a, (Spanned<Constness>, Unsafety, IsAsync, Abi)>[src]
fn parse_fn_front_matter(
&mut self
) -> PResult<'a, (Spanned<Constness>, Unsafety, IsAsync, 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 fnunsafe fnconst unsafe fnextern fn- etc
pub fn parse_impl_item(&mut self, at_end: &mut bool) -> PResult<'a, ImplItem>[src]
pub fn parse_impl_item(&mut self, at_end: &mut bool) -> PResult<'a, ImplItem>🔬 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.
fn parse_impl_item_(
&mut self,
at_end: &mut bool,
attrs: Vec<Attribute>
) -> PResult<'a, ImplItem>[src]
fn parse_impl_item_(
&mut self,
at_end: &mut bool,
attrs: Vec<Attribute>
) -> PResult<'a, ImplItem>🔬 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?
fn complain_if_pub_macro(&mut self, vis: &VisibilityKind, sp: Span)[src]
fn complain_if_pub_macro(&mut self, vis: &VisibilityKind, sp: 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?
fn complain_if_pub_macro_diag(
&mut self,
vis: &VisibilityKind,
sp: Span
) -> PResult<'a, ()>[src]
fn complain_if_pub_macro_diag(
&mut self,
vis: &VisibilityKind,
sp: Span
) -> 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?
fn missing_assoc_item_kind_err(
&mut self,
item_type: &str,
prev_span: Span
) -> DiagnosticBuilder<'a>[src]
fn missing_assoc_item_kind_err(
&mut self,
item_type: &str,
prev_span: Span
) -> 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?
fn parse_impl_method(
&mut self,
vis: &Visibility,
at_end: &mut bool
) -> PResult<'a, (Ident, Vec<Attribute>, Generics, ImplItemKind)>[src]
fn parse_impl_method(
&mut self,
vis: &Visibility,
at_end: &mut bool
) -> PResult<'a, (Ident, Vec<Attribute>, Generics, ImplItemKind)>🔬 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 method or a macro invocation in a trait impl.
fn parse_item_trait(
&mut self,
is_auto: IsAuto,
unsafety: Unsafety
) -> PResult<'a, (Ident, ItemKind, Option<Vec<Attribute>>)>[src]
fn parse_item_trait(
&mut self,
is_auto: IsAuto,
unsafety: Unsafety
) -> PResult<'a, (Ident, ItemKind, Option<Vec<Attribute>>)>🔬 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 trait Foo { ... } or trait Foo = Bar;
fn choose_generics_over_qpath(&self) -> bool[src]
fn choose_generics_over_qpath(&self) -> 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?
fn parse_impl_body(&mut self) -> PResult<'a, (Vec<ImplItem>, Vec<Attribute>)>[src]
fn parse_impl_body(&mut self) -> PResult<'a, (Vec<ImplItem>, Vec<Attribute>)>🔬 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?
fn parse_item_impl(
&mut self,
unsafety: Unsafety,
defaultness: Defaultness
) -> PResult<'a, (Ident, ItemKind, Option<Vec<Attribute>>)>[src]
fn parse_item_impl(
&mut self,
unsafety: Unsafety,
defaultness: Defaultness
) -> PResult<'a, (Ident, ItemKind, Option<Vec<Attribute>>)>🔬 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 implementation item, impl keyword is already parsed.
impl<'a, T> TYPE { /* impl items / }
impl<'a, T> TRAIT for TYPE { / impl items / }
impl<'a, T> !TRAIT for TYPE { / impl items */ }
We actually parse slightly more relaxed grammar for better error reporting and recovery.
impl GENERICS !? TYPE for? (TYPE | ..) (where PREDICATES)? { BODY }
impl GENERICS !? TYPE (where PREDICATES)? { BODY }
fn parse_late_bound_lifetime_defs(&mut self) -> PResult<'a, Vec<GenericParam>>[src]
fn parse_late_bound_lifetime_defs(&mut self) -> PResult<'a, Vec<GenericParam>>🔬 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?
fn parse_item_struct(
&mut self
) -> PResult<'a, (Ident, ItemKind, Option<Vec<Attribute>>)>[src]
fn parse_item_struct(
&mut self
) -> PResult<'a, (Ident, ItemKind, Option<Vec<Attribute>>)>🔬 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 struct Foo { ... }
fn parse_item_union(
&mut self
) -> PResult<'a, (Ident, ItemKind, Option<Vec<Attribute>>)>[src]
fn parse_item_union(
&mut self
) -> PResult<'a, (Ident, ItemKind, Option<Vec<Attribute>>)>🔬 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 union Foo { ... }
fn consume_block(&mut self, delim: DelimToken)[src]
fn consume_block(&mut self, delim: DelimToken)🔬 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?
fn parse_record_struct_body(&mut self) -> PResult<'a, Vec<StructField>>[src]
fn parse_record_struct_body(&mut self) -> PResult<'a, Vec<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?
fn parse_tuple_struct_body(&mut self) -> PResult<'a, Vec<StructField>>[src]
fn parse_tuple_struct_body(&mut self) -> PResult<'a, Vec<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?
fn parse_single_struct_field(
&mut self,
lo: Span,
vis: Visibility,
attrs: Vec<Attribute>
) -> PResult<'a, StructField>[src]
fn parse_single_struct_field(
&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
fn parse_struct_decl_field(&mut self) -> PResult<'a, StructField>[src]
fn parse_struct_decl_field(&mut self) -> 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 an element of a struct definition
pub fn parse_visibility(
&mut self,
can_take_tuple: bool
) -> PResult<'a, Visibility>[src]
pub fn parse_visibility(
&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.
fn parse_defaultness(&mut self) -> Defaultness[src]
fn parse_defaultness(&mut self) -> Defaultness🔬 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 defaultness: default or nothing.
fn parse_mod_items(&mut self, term: &Token, inner_lo: Span) -> PResult<'a, Mod>[src]
fn parse_mod_items(&mut self, term: &Token, inner_lo: Span) -> PResult<'a, Mod>🔬 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?
Given a termination token, parse all of the items in a module
fn parse_item_const(
&mut self,
m: Option<Mutability>
) -> PResult<'a, (Ident, ItemKind, Option<Vec<Attribute>>)>[src]
fn parse_item_const(
&mut self,
m: Option<Mutability>
) -> PResult<'a, (Ident, ItemKind, Option<Vec<Attribute>>)>🔬 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?
fn parse_item_mod(
&mut self,
outer_attrs: &[Attribute]
) -> PResult<'a, (Ident, ItemKind, Option<Vec<Attribute>>)>[src]
fn parse_item_mod(
&mut self,
outer_attrs: &[Attribute]
) -> PResult<'a, (Ident, ItemKind, Option<Vec<Attribute>>)>🔬 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 mod <foo> { ... } or mod <foo>; item
fn push_directory(&mut self, id: Ident, attrs: &[Attribute])[src]
fn push_directory(&mut self, id: Ident, attrs: &[Attribute])🔬 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 submod_path_from_attr(
attrs: &[Attribute],
dir_path: &Path
) -> Option<PathBuf>[src]
pub fn submod_path_from_attr(
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,
relative: Option<Ident>,
dir_path: &Path,
codemap: &CodeMap
) -> ModulePath[src]
pub fn default_submod_path(
id: Ident,
relative: Option<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 .
fn submod_path(
&mut self,
id: Ident,
outer_attrs: &[Attribute],
id_sp: Span
) -> PResult<'a, ModulePathSuccess>[src]
fn submod_path(
&mut self,
id: Ident,
outer_attrs: &[Attribute],
id_sp: Span
) -> PResult<'a, ModulePathSuccess>🔬 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?
fn eval_src_mod(
&mut self,
path: PathBuf,
directory_ownership: DirectoryOwnership,
name: String,
id_sp: Span
) -> PResult<'a, (ItemKind, Vec<Attribute>)>[src]
fn eval_src_mod(
&mut self,
path: PathBuf,
directory_ownership: DirectoryOwnership,
name: String,
id_sp: Span
) -> PResult<'a, (ItemKind, Vec<Attribute>)>🔬 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?
Read a module from a source file.
fn parse_item_foreign_fn(
&mut self,
vis: Visibility,
lo: Span,
attrs: Vec<Attribute>
) -> PResult<'a, ForeignItem>[src]
fn parse_item_foreign_fn(
&mut self,
vis: Visibility,
lo: Span,
attrs: Vec<Attribute>
) -> PResult<'a, ForeignItem>🔬 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 function declaration from a foreign module
fn parse_item_foreign_static(
&mut self,
vis: Visibility,
lo: Span,
attrs: Vec<Attribute>
) -> PResult<'a, ForeignItem>[src]
fn parse_item_foreign_static(
&mut self,
vis: Visibility,
lo: Span,
attrs: Vec<Attribute>
) -> PResult<'a, ForeignItem>🔬 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 static item from a foreign module.
Assumes that the static keyword is already parsed.
fn parse_item_foreign_type(
&mut self,
vis: Visibility,
lo: Span,
attrs: Vec<Attribute>
) -> PResult<'a, ForeignItem>[src]
fn parse_item_foreign_type(
&mut self,
vis: Visibility,
lo: Span,
attrs: Vec<Attribute>
) -> PResult<'a, ForeignItem>🔬 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 type from a foreign module
fn parse_crate_name_with_dashes(&mut self) -> PResult<'a, Ident>[src]
fn parse_crate_name_with_dashes(&mut self) -> PResult<'a, Ident>🔬 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?
fn parse_item_extern_crate(
&mut self,
lo: Span,
visibility: Visibility,
attrs: Vec<Attribute>
) -> PResult<'a, P<Item>>[src]
fn parse_item_extern_crate(
&mut self,
lo: Span,
visibility: Visibility,
attrs: Vec<Attribute>
) -> PResult<'a, P<Item>>🔬 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?
fn parse_item_foreign_mod(
&mut self,
lo: Span,
opt_abi: Option<Abi>,
visibility: Visibility,
attrs: Vec<Attribute>
) -> PResult<'a, P<Item>>[src]
fn parse_item_foreign_mod(
&mut self,
lo: Span,
opt_abi: Option<Abi>,
visibility: Visibility,
attrs: Vec<Attribute>
) -> PResult<'a, P<Item>>🔬 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 extern for foreign ABIs
modules.
extern is expected to have been
consumed before calling this method
Examples:
extern "C" {} extern {}
fn eat_type(&mut self) -> Option<PResult<'a, (Ident, AliasKind, Generics)>>[src]
fn eat_type(&mut self) -> Option<PResult<'a, (Ident, AliasKind, Generics)>>🔬 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 type Foo = Bar; or existential type Foo: Bar; or return None without modifying the parser state
fn parse_existential_or_alias(
&mut self,
existential: bool
) -> PResult<'a, (Ident, AliasKind, Generics)>[src]
fn parse_existential_or_alias(
&mut self,
existential: bool
) -> PResult<'a, (Ident, AliasKind, Generics)>🔬 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 type alias or existential type
fn parse_enum_def(&mut self, _generics: &Generics) -> PResult<'a, EnumDef>[src]
fn parse_enum_def(&mut self, _generics: &Generics) -> PResult<'a, EnumDef>🔬 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 part of an "enum" decl following the '{'
fn parse_item_enum(
&mut self
) -> PResult<'a, (Ident, ItemKind, Option<Vec<Attribute>>)>[src]
fn parse_item_enum(
&mut self
) -> PResult<'a, (Ident, ItemKind, Option<Vec<Attribute>>)>🔬 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 "enum" declaration
fn parse_opt_abi(&mut self) -> PResult<'a, Option<Abi>>[src]
fn parse_opt_abi(&mut self) -> PResult<'a, Option<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 a string as an ABI spec on an extern type or module. Consumes
the extern keyword, if one is found.
fn is_static_global(&mut self) -> bool[src]
fn is_static_global(&mut self) -> 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?
fn parse_item_(
&mut self,
attrs: Vec<Attribute>,
macros_allowed: bool,
attributes_allowed: bool
) -> PResult<'a, Option<P<Item>>>[src]
fn parse_item_(
&mut self,
attrs: Vec<Attribute>,
macros_allowed: bool,
attributes_allowed: bool
) -> PResult<'a, Option<P<Item>>>🔬 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?
fn parse_item_implementation(
&mut self,
attrs: Vec<Attribute>,
macros_allowed: bool,
attributes_allowed: bool
) -> PResult<'a, Option<P<Item>>>[src]
fn parse_item_implementation(
&mut self,
attrs: Vec<Attribute>,
macros_allowed: bool,
attributes_allowed: bool
) -> PResult<'a, Option<P<Item>>>🔬 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 one of the items allowed by the flags. NB: this function no longer parses the items inside an extern crate.
pub(crate) fn parse_foreign_item(&mut self) -> PResult<'a, Option<ForeignItem>>[src]
pub(crate) fn parse_foreign_item(&mut self) -> PResult<'a, Option<ForeignItem>>🔬 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 foreign item.
fn parse_macro_use_or_failure(
&mut self,
attrs: Vec<Attribute>,
macros_allowed: bool,
attributes_allowed: bool,
lo: Span,
visibility: Visibility
) -> PResult<'a, Option<P<Item>>>[src]
fn parse_macro_use_or_failure(
&mut self,
attrs: Vec<Attribute>,
macros_allowed: bool,
attributes_allowed: bool,
lo: Span,
visibility: Visibility
) -> PResult<'a, Option<P<Item>>>🔬 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 is the fall-through for parsing items.
fn parse_assoc_macro_invoc(
&mut self,
item_kind: &str,
vis: Option<&Visibility>,
at_end: &mut bool
) -> PResult<'a, Option<Mac>>[src]
fn parse_assoc_macro_invoc(
&mut self,
item_kind: &str,
vis: Option<&Visibility>,
at_end: &mut bool
) -> PResult<'a, Option<Mac>>🔬 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 macro invocation inside a trait, impl or extern block
fn collect_tokens<F, R>(&mut self, f: F) -> PResult<'a, (R, TokenStream)> where
F: FnOnce(&mut Self) -> PResult<'a, R>, [src]
fn collect_tokens<F, R>(&mut self, f: F) -> PResult<'a, (R, TokenStream)> where
F: FnOnce(&mut Self) -> PResult<'a, 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 parse_item(&mut self) -> PResult<'a, Option<P<Item>>>[src]
pub fn parse_item(&mut self) -> PResult<'a, Option<P<Item>>>🔬 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?
fn is_import_coupler(&mut self) -> bool[src]
fn is_import_coupler(&mut self) -> 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?
::{ or ::*
fn parse_use_tree(&mut self) -> PResult<'a, UseTree>[src]
fn parse_use_tree(&mut self) -> PResult<'a, UseTree>🔬 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 UseTree
USE_TREE = [::] * |
[::] { USE_TREE_LIST } |
PATH :: * |
PATH :: { USE_TREE_LIST } |
PATH [as IDENT]
fn parse_use_tree_list(&mut self) -> PResult<'a, Vec<(UseTree, NodeId)>>[src]
fn parse_use_tree_list(&mut self) -> PResult<'a, Vec<(UseTree, NodeId)>>🔬 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 UseTreeKind::Nested(list)
USE_TREE_LIST = Ø | (USE_TREE ,)* USE_TREE [,]
fn parse_rename(&mut self) -> PResult<'a, Option<Ident>>[src]
fn parse_rename(&mut self) -> PResult<'a, Option<Ident>>🔬 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]
pub fn parse_crate_mod(&mut self) -> PResult<'a, Crate>🔬 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]
pub fn parse_optional_str(&mut self) -> Option<(Symbol, StrStyle, Option<Name>)>🔬 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]
pub fn parse_str(&mut self) -> PResult<'a, (Symbol, StrStyle)>🔬 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]
impl<'a> Parser<'a>pub(crate) fn parse_outer_attributes(&mut self) -> PResult<'a, Vec<Attribute>>[src]
pub(crate) fn parse_outer_attributes(&mut self) -> PResult<'a, Vec<Attribute>>🔬 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]
pub fn parse_attribute(&mut self, permit_inner: bool) -> PResult<'a, Attribute>🔬 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
fn parse_attribute_with_inner_parse_policy(
&mut self,
inner_parse_policy: InnerAttributeParsePolicy
) -> PResult<'a, Attribute>[src]
fn parse_attribute_with_inner_parse_policy(
&mut self,
inner_parse_policy: InnerAttributeParsePolicy
) -> PResult<'a, Attribute>🔬 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 same as parse_attribute, except it takes in an InnerAttributeParsePolicy
that prescribes how to handle inner attributes.
pub(crate) fn parse_path_and_tokens(
&mut self
) -> PResult<'a, (Path, TokenStream)>[src]
pub(crate) fn parse_path_and_tokens(
&mut self
) -> PResult<'a, (Path, TokenStream)>🔬 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(crate) fn parse_inner_attributes(&mut self) -> PResult<'a, Vec<Attribute>>[src]
pub(crate) fn parse_inner_attributes(&mut self) -> PResult<'a, Vec<Attribute>>🔬 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*
fn parse_unsuffixed_lit(&mut self) -> PResult<'a, Lit>[src]
fn parse_unsuffixed_lit(&mut self) -> PResult<'a, Lit>🔬 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_meta_item(&mut self) -> PResult<'a, MetaItem>[src]
pub fn parse_meta_item(&mut self) -> PResult<'a, MetaItem>🔬 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(crate) fn parse_meta_item_kind(&mut self) -> PResult<'a, MetaItemKind>[src]
pub(crate) fn parse_meta_item_kind(&mut self) -> PResult<'a, MetaItemKind>🔬 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?
fn parse_meta_item_inner(&mut self) -> PResult<'a, NestedMetaItem>[src]
fn parse_meta_item_inner(&mut self) -> PResult<'a, NestedMetaItem>🔬 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 meta_item_inner : (meta_item | UNSUFFIXED_LIT) ;
fn parse_meta_seq(&mut self) -> PResult<'a, Vec<NestedMetaItem>>[src]
fn parse_meta_seq(&mut self) -> PResult<'a, Vec<NestedMetaItem>>🔬 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 meta_seq = ( COMMASEP(meta_item_inner) )
impl<'a> Parser<'a>[src]
impl<'a> Parser<'a>pub fn parse_ast_fragment(
&mut self,
kind: AstFragmentKind,
macro_legacy_warnings: bool
) -> PResult<'a, AstFragment>[src]
pub fn parse_ast_fragment(
&mut self,
kind: AstFragmentKind,
macro_legacy_warnings: bool
) -> PResult<'a, AstFragment>🔬 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]
pub fn ensure_complete_parse(
&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?