mirror of
https://github.com/rust-lang/rust-analyzer.git
synced 2025-10-01 14:21:44 +00:00
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:
commit
1cd18f9237
14 changed files with 149 additions and 81 deletions
|
@ -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");
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue