Avoid too many expected symbols and reduce None
s
This commit is contained in:
parent
41e85c3d23
commit
8c8af6cf99
12 changed files with 58 additions and 64 deletions
|
@ -775,7 +775,7 @@ impl<'a> Parser<'a> {
|
|||
_ => {}
|
||||
}
|
||||
|
||||
match self.parse_path(PathStyle::Expr, None) {
|
||||
match self.parse_path(PathStyle::Expr) {
|
||||
Ok(path) => {
|
||||
let span_after_type = parser_snapshot_after_type.token.span;
|
||||
let expr = mk_expr(
|
||||
|
@ -1314,7 +1314,7 @@ impl<'a> Parser<'a> {
|
|||
}
|
||||
|
||||
let fn_span_lo = self.token.span;
|
||||
let mut seg = self.parse_path_segment(PathStyle::Expr, None, None)?;
|
||||
let mut seg = self.parse_path_segment(PathStyle::Expr, None)?;
|
||||
self.check_trailing_angle_brackets(&seg, &[&token::OpenDelim(Delimiter::Parenthesis)]);
|
||||
self.check_turbofish_missing_angle_brackets(&mut seg);
|
||||
|
||||
|
@ -1544,7 +1544,7 @@ impl<'a> Parser<'a> {
|
|||
})?;
|
||||
(Some(qself), path)
|
||||
} else {
|
||||
(None, self.parse_path(PathStyle::Expr, None)?)
|
||||
(None, self.parse_path(PathStyle::Expr)?)
|
||||
};
|
||||
|
||||
// `!`, as an operator, is prefix, so we know this isn't that.
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue