mirror of
https://github.com/rust-lang/rust-analyzer.git
synced 2025-09-28 12:54:58 +00:00
internal: fix bugs in tests by simplifying code
This commit is contained in:
parent
80991356e1
commit
940b3afd00
7 changed files with 144 additions and 23 deletions
|
@ -194,10 +194,12 @@ fn opt_visibility(p: &mut Parser) -> bool {
|
|||
// crate fn main() { }
|
||||
// struct S { crate field: u32 }
|
||||
// struct T(crate u32);
|
||||
//
|
||||
// test crate_keyword_path
|
||||
// fn foo() { crate::foo(); }
|
||||
T![crate] if !p.nth_at(1, T![::]) => {
|
||||
T![crate] => {
|
||||
if p.nth_at(1, T![::]) {
|
||||
// test crate_keyword_path
|
||||
// fn foo() { crate::foo(); }
|
||||
return false;
|
||||
}
|
||||
let m = p.start();
|
||||
p.bump(T![crate]);
|
||||
m.complete(p, VISIBILITY);
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue