Rollup merge of #56820 - ljedrz:format_tweaks, r=alexcrichton
format-related tweaks - remove an unreachable condition - inline one-liners related to `parse_expr` (called in succession) - refactor `report_invalid_references` - refactor `verify_arg_type` - minor stylistic improvements
This commit is contained in:
commit
29aa466508
2 changed files with 55 additions and 81 deletions
|
@ -3062,6 +3062,7 @@ impl<'a> Parser<'a> {
|
|||
///
|
||||
/// This parses an expression accounting for associativity and precedence of the operators in
|
||||
/// the expression.
|
||||
#[inline]
|
||||
fn parse_assoc_expr(&mut self,
|
||||
already_parsed_attrs: Option<ThinVec<Attribute>>)
|
||||
-> PResult<'a, P<Expr>> {
|
||||
|
@ -3722,6 +3723,7 @@ impl<'a> Parser<'a> {
|
|||
}
|
||||
|
||||
/// Parse an expression
|
||||
#[inline]
|
||||
pub fn parse_expr(&mut self) -> PResult<'a, P<Expr>> {
|
||||
self.parse_expr_res(Restrictions::empty(), None)
|
||||
}
|
||||
|
@ -3741,6 +3743,7 @@ impl<'a> Parser<'a> {
|
|||
}
|
||||
|
||||
/// Parse an expression, subject to the given restrictions
|
||||
#[inline]
|
||||
fn parse_expr_res(&mut self, r: Restrictions,
|
||||
already_parsed_attrs: Option<ThinVec<Attribute>>)
|
||||
-> PResult<'a, P<Expr>> {
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue