Lines Matching +full:async +full:- +full:prefix
1 // SPDX-License-Identifier: Apache-2.0 OR MIT
121 /// An async block: `async { ... }`.
122 Async(ExprAsync),
162 /// of expressions and is related to `None`-delimited spans in a
201 /// parameters and a qualified self-type.
209 /// Address-of operation: `&raw const place` or `&raw mut place`.
227 /// A try-expression: `expr?`.
293 /// An async block: `async { ... }`.
297 pub async_token: Token![async],
377 pub asyncness: Option<Token![async]>,
437 /// of expressions and is related to `None`-delimited spans in a
562 /// parameters and a qualified self-type.
585 /// Address-of operation: `&raw const place` or `&raw mut place`.
647 /// A try-expression: `expr?`.
763 /// # fn deref(&self) -> &Self::Target {
791 /// For that reason we would want to parse if-conditions using
804 /// # fn doc() -> S {
830 pub fn parse_without_eager_brace(input: ParseStream) -> Result<Expr> { in parse_without_eager_brace()
837 /// expressions at the head of a statement or in the right-hand side of a
892 pub fn parse_with_earlier_boundary_rule(input: ParseStream) -> Result<Expr> { in parse_with_earlier_boundary_rule()
899 /// This classification is a load-bearing part of the grammar of some Rust
908 pub fn peek(input: ParseStream) -> bool { in peek()
915 … || input.peek(Token![-]) && !input.peek(Token![-=]) && !input.peek(Token![->]) // unary minus in peek()
927 pub(crate) fn replace_attrs(&mut self, new: Vec<Attribute>) -> Vec<Attribute> { in replace_attrs()
931 | Expr::Async(ExprAsync { attrs, .. }) in replace_attrs()
986 fn from(ident: Ident) -> Member { in from()
992 fn from(index: Index) -> Member { in from()
998 fn from(index: usize) -> Member { in from()
1006 fn eq(&self, other: &Self) -> bool { in eq()
1026 fn fmt(&self, formatter: &mut fmt::Formatter) -> fmt::Result { in fmt()
1033 fn span(&self) -> Option<Span> { in span()
1043 pub(crate) fn is_named(&self) -> bool { in is_named()
1061 fn from(index: usize) -> Index { in from()
1073 fn eq(&self, other: &Self) -> bool { in eq()
1086 fn fmt(&self, formatter: &mut fmt::Formatter) -> fmt::Result { in fmt()
1090 fn span(&self) -> Option<Span> { in span()
1096 /// A field-value pair in a struct literal.
1127 /// # fn f() -> bool {
1164 /// Mutability of a raw pointer (`*const T`, `*mut T`), in which non-mutable
1225 // https://github.com/rust-lang/rfcs/pull/92
1231 fn parse(input: ParseStream) -> Result<Self> { in parse()
1241 pub(super) fn parse_with_earlier_boundary_rule(input: ParseStream) -> Result<Expr> { in parse_with_earlier_boundary_rule()
1306 fn clone(&self) -> Self { in clone()
1317 ) -> Result<Expr> { in parse_expr()
1321 // A range cannot be the left-hand side of another binary operator. in parse_expr()
1393 fn parse_expr(input: ParseStream, mut lhs: Expr, base: Precedence) -> Result<Expr> { in parse_expr()
1439 ) -> Result<Box<Expr>> { in parse_binop_rhs()
1459 // disallowed in the left-hand side of binary operators, in parse_binop_rhs()
1470 fn peek_precedence(input: ParseStream) -> Precedence { in peek_precedence()
1488 ) -> Result<Expr> { in ambiguous_expr()
1504 fn expr_attrs(input: ParseStream) -> Result<Vec<Attribute>> { in expr_attrs()
1517 fn unary_expr(input: ParseStream, allow_struct: AllowStruct) -> Result<Expr> { in unary_expr()
1559 } else if input.peek(Token![*]) || input.peek(Token![!]) || input.peek(Token![-]) { in unary_expr()
1567 fn unary_expr(input: ParseStream) -> Result<Expr> { in unary_expr()
1575 } else if input.peek(Token![*]) || input.peek(Token![!]) || input.peek(Token![-]) { in unary_expr()
1598 ) -> Result<Expr> { in trailer_expr()
1625 fn trailer_helper(input: ParseStream, mut e: Expr) -> Result<Expr> { in trailer_helper()
1718 fn trailer_expr(input: ParseStream) -> Result<Expr> { in trailer_expr()
1794 fn atom_expr(input: ParseStream, allow_struct: AllowStruct) -> Result<Expr> { in atom_expr()
1799 } else if input.peek(Token![async]) in atom_expr()
1802 input.parse().map(Expr::Async) in atom_expr()
1811 || input.peek(Token![async]) && (input.peek2(Token![|]) || input.peek2(Token![move])) in atom_expr()
1871 fn atom_labeled(input: ParseStream) -> Result<Expr> { in atom_labeled()
1895 fn atom_expr(input: ParseStream) -> Result<Expr> { in atom_expr()
1929 fn expr_builtin(input: ParseStream) -> Result<Expr> { in expr_builtin()
1946 ) -> Result<Expr> { in path_or_macro_or_struct()
1963 ) -> Result<Expr> { in rest_of_path_or_macro_or_struct()
1997 fn parse(input: ParseStream) -> Result<Self> { in parse()
2005 fn paren_or_tuple(input: ParseStream) -> Result<Expr> { in paren_or_tuple()
2044 fn array_or_repeat(input: ParseStream) -> Result<Expr> { in array_or_repeat()
2091 fn parse(input: ParseStream) -> Result<Self> { in parse()
2117 fn parse(input: ParseStream) -> Result<Self> { in parse()
2130 fn continue_parsing_early(mut expr: &Expr) -> bool { in continue_parsing_early()
2150 fn parse(input: ParseStream) -> Result<Self> { in parse()
2161 ) -> Result<Expr> { in expr_group()
2195 fn parse(input: ParseStream) -> Result<Self> { in parse()
2208 fn parse(input: ParseStream) -> Result<Self> { in parse()
2215 fn expr_let(input: ParseStream, allow_struct: AllowStruct) -> Result<ExprLet> { in expr_let()
2231 fn parse(input: ParseStream) -> Result<Self> { in parse()
2285 fn parse(input: ParseStream) -> Result<Self> { in parse()
2296 fn parse(input: ParseStream) -> Result<Self> { in parse()
2326 fn parse(input: ParseStream) -> Result<Self> { in parse()
2348 fn parse(input: ParseStream) -> Result<Self> { in parse()
2379 fn parse(input: ParseStream) -> Result<Self> {
2411 fn parse(input: ParseStream) -> Result<Self> { in parse()
2423 ) -> Result<ExprUnary> { in expr_unary()
2434 fn parse(input: ParseStream) -> Result<Self> { in parse()
2443 fn parse(input: ParseStream) -> Result<Self> { in parse()
2458 fn parse(input: ParseStream) -> Result<Self> { in parse()
2472 fn parse(input: ParseStream) -> Result<Self> { in parse()
2481 fn parse(input: ParseStream) -> Result<Self> { in parse()
2497 fn expr_become(input: ParseStream) -> Result<Expr> { in expr_become()
2507 fn parse(input: ParseStream) -> Result<Self> { in parse()
2519 fn parse(input: ParseStream) -> Result<Self> { in parse()
2535 fn expr_closure(input: ParseStream, allow_struct: AllowStruct) -> Result<ExprClosure> { in expr_closure()
2539 let asyncness: Option<Token![async]> = input.parse()?; in expr_closure()
2559 let (output, body) = if input.peek(Token![->]) { in expr_closure()
2560 let arrow_token: Token![->] = input.parse()?; in expr_closure()
2593 fn parse(input: ParseStream) -> Result<Self> { in parse()
2604 fn closure_arg(input: ParseStream) -> Result<Pat> { in closure_arg()
2642 fn parse(input: ParseStream) -> Result<Self> { in parse()
2666 fn parse(input: ParseStream) -> Result<Self> { in parse()
2685 fn parse(input: ParseStream) -> Result<Self> { in parse()
2696 fn parse(input: ParseStream) -> Result<Self> { in parse()
2708 fn parse(input: ParseStream) -> Result<Self> { in parse()
2718 fn expr_break(input: ParseStream, allow_struct: AllowStruct) -> Result<ExprBreak> { in expr_break()
2753 fn parse(input: ParseStream) -> Result<Self> { in parse()
2782 fn parse(input: ParseStream) -> Result<Self> { in parse()
2793 ) -> Result<ExprStruct> { in expr_struct_helper()
2837 fn parse(input: ParseStream) -> Result<Self> { in parse()
2856 fn parse(input: ParseStream) -> Result<Self> { in parse()
2874 fn expr_range(input: ParseStream, allow_struct: AllowStruct) -> Result<ExprRange> { in expr_range()
2890 ) -> Result<Option<Box<Expr>>> { in parse_range_end()
2907 || input.peek(Token![-=]) in parse_range_end()
2924 fn parse(input: ParseStream) -> Result<Self> { in parse()
2941 pub(crate) fn parse_obsolete(input: ParseStream) -> Result<Self> { in parse_obsolete()
2961 fn parse(input: ParseStream) -> Result<Self> { in parse()
2976 fn parse(input: ParseStream) -> Result<Self> { in parse()
2989 pub(crate) fn parse_multiple(input: ParseStream) -> Result<Vec<Self>> { in parse_multiple()
3001 fn parse(input: ParseStream) -> Result<Arm> { in parse()
3034 fn parse(input: ParseStream) -> Result<Self> { in parse()
3050 fn multi_index(e: &mut Expr, dot_token: &mut Token![.], float: LitFloat) -> Result<bool> { in multi_index()
3056 float_repr.truncate(float_repr.len() - 1); in multi_index()
3087 fn parse(input: ParseStream) -> Result<Self> { in parse()
3099 fn check_cast(input: ParseStream) -> Result<()> { in check_cast()
3211 Expr::Async(e) => e.to_tokens(tokens), in print_expr()
3463 // ^---------------------------------^ in print_expr_break()
3777 // Ensure that we have a comma after a non-block arm, except in to_tokens()
3779 let is_last = i == self.arms.len() - 1; in to_tokens()
3896 let (right_prec, right_fixup) = fixup.rightmost_subexpression(&e.expr, Precedence::Prefix); in print_expr_raw_addr()
3899 right_prec < Precedence::Prefix, in print_expr_raw_addr()
3919 Precedence::Prefix, in print_expr_reference()
3923 right_prec < Precedence::Prefix, in print_expr_reference()
4039 Precedence::Prefix, in print_expr_unary()
4043 right_prec < Precedence::Prefix, in print_expr_unary()