// could be removed without changing functionality, but it's faster
// to have it here, especially for programs with large constants.
token::Literal(_) => parse_lit!(),
// could be removed without changing functionality, but it's faster
// to have it here, especially for programs with large constants.
token::Literal(_) => parse_lit!(),
token::OpenDelim(token::Brace) => {
return self.parse_block_expr(None, lo, BlockCheckMode::Default, attrs);
}
token::BinOp(token::Or) | token::OrOr => return self.parse_closure_expr(attrs),
token::OpenDelim(token::Brace) => {
return self.parse_block_expr(None, lo, BlockCheckMode::Default, attrs);
}
token::BinOp(token::Or) | token::OrOr => return self.parse_closure_expr(attrs),
return Ok(self.mk_expr(lo.to(hi), ExprKind::Path(Some(qself), path), attrs));
}
if self.token.is_path_start() {
return Ok(self.mk_expr(lo.to(hi), ExprKind::Path(Some(qself), path), attrs));
}
if self.token.is_path_start() {
}
if self.check_keyword(kw::Move) || self.check_keyword(kw::Static) {
return self.parse_closure_expr(attrs);
}
if self.check_keyword(kw::Move) || self.check_keyword(kw::Static) {
return self.parse_closure_expr(attrs);
let parse_leading_attr_expr = |p: &mut Self| {
if first {
// `(#![foo] a, b, ...)` is OK...
let parse_leading_attr_expr = |p: &mut Self| {
if first {
// `(#![foo] a, b, ...)` is OK...
- fn parse_array_or_repeat_expr(&mut self) -> PResult<'a, P<Expr>> {
+ fn parse_array_or_repeat_expr(
+ &mut self,
+ mut attrs: ThinVec<Attribute>,
+ ) -> PResult<'a, P<Expr>> {
- fn parse_path_start_expr(&mut self) -> PResult<'a, P<Expr>> {
- let attrs = ThinVec::new();
+ fn parse_path_start_expr(&mut self, attrs: ThinVec<Attribute>) -> PResult<'a, P<Expr>> {