1
Fork 0

Avoid too many expected symbols and reduce Nones

This commit is contained in:
r0cky 2023-08-03 08:56:31 +00:00
parent 41e85c3d23
commit 8c8af6cf99
12 changed files with 58 additions and 64 deletions

View file

@ -1579,7 +1579,7 @@ impl<'a> Parser<'a> {
self.expect(&token::ModSep)?;
let mut path = ast::Path { segments: ThinVec::new(), span: DUMMY_SP, tokens: None };
self.parse_path_segments(&mut path.segments, T::PATH_STYLE, None, None)?;
self.parse_path_segments(&mut path.segments, T::PATH_STYLE, None)?;
path.span = ty_span.to(self.prev_token.span);
let ty_str = self.span_to_snippet(ty_span).unwrap_or_else(|_| pprust::ty_to_string(&ty));