Add support for using qualified paths with structs in expression and pattern
position.
This commit is contained in:
parent
c5fbcd35a8
commit
6936349233
38 changed files with 374 additions and 187 deletions
|
@ -366,7 +366,7 @@ impl<'a> Parser<'a> {
|
|||
let mut snapshot = self.clone();
|
||||
let path =
|
||||
Path { segments: vec![], span: self.prev_token.span.shrink_to_lo(), tokens: None };
|
||||
let struct_expr = snapshot.parse_struct_expr(path, AttrVec::new(), false);
|
||||
let struct_expr = snapshot.parse_struct_expr(None, path, AttrVec::new(), false);
|
||||
let block_tail = self.parse_block_tail(lo, s, AttemptLocalParseRecovery::No);
|
||||
return Some(match (struct_expr, block_tail) {
|
||||
(Ok(expr), Err(mut err)) => {
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue