Merge #991
991: Use Marker argument for item parsers r=matklad a=pcpthm Before doing this for expressions, I found that the pattern (Marker argument) should be applied to the item parsers because visiblity and modifiers are parsed in a separate function. Fixed some parser bugs: - Fix pub_expr: `pub 42;` was allowed. - Fix incorrect parsing of crate::path: incorrectly parsed as `crate` as a visibility. Co-authored-by: pcpthm <pcpthm@gmail.com>
This commit is contained in:
@@ -67,8 +67,6 @@ pub(crate) fn expr_block_contents(p: &mut Parser) {
|
||||
Err(m) => m,
|
||||
};
|
||||
|
||||
// test pub_expr
|
||||
// fn foo() { pub 92; } //FIXME
|
||||
if has_attrs {
|
||||
m.abandon(p);
|
||||
p.error("expected a let statement or an item after attributes in block");
|
||||
|
||||
Reference in New Issue
Block a user