Struct literals should not be a BlockLike::Block

This commit is contained in:
DJMcNab 2019-01-26 18:45:29 +00:00
parent d0ef1bde89
commit 7a76433c45
3 changed files with 118 additions and 1 deletions

View file

@ -423,7 +423,7 @@ fn path_expr(p: &mut Parser, r: Restrictions) -> (CompletedMarker, BlockLike) {
match p.current() {
L_CURLY if !r.forbid_structs => {
named_field_list(p);
(m.complete(p, STRUCT_LIT), BlockLike::Block)
(m.complete(p, STRUCT_LIT), BlockLike::NotBlock)
}
EXCL => {
let block_like = items::macro_call_after_excl(p);