aboutsummaryrefslogtreecommitdiff
path: root/crates/ra_syntax/src
diff options
context:
space:
mode:
authorbors[bot] <bors[bot]@users.noreply.github.com>2018-11-21 15:35:51 +0000
committerbors[bot] <bors[bot]@users.noreply.github.com>2018-11-21 15:35:51 +0000
commitac874b64550c103249e2b951d92e2f1a8c9a5828 (patch)
tree50fdd5d9681ff57a5cd15de3c401cd478e6f3ab5 /crates/ra_syntax/src
parent031bc868293539714157e3d93cc338b011f5661d (diff)
parentedeec6a41487e6458a9d96b328c9b784525d8f06 (diff)
Merge #237
237: This moves parts of completion from ad-hockery to descriptors-based resolve r=matklad a=matklad Co-authored-by: Aleksey Kladov <[email protected]>
Diffstat (limited to 'crates/ra_syntax/src')
-rw-r--r--crates/ra_syntax/src/grammar/items/mod.rs2
-rw-r--r--crates/ra_syntax/src/grammar/paths.rs2
2 files changed, 2 insertions, 2 deletions
diff --git a/crates/ra_syntax/src/grammar/items/mod.rs b/crates/ra_syntax/src/grammar/items/mod.rs
index 06c6b5e6e..682266908 100644
--- a/crates/ra_syntax/src/grammar/items/mod.rs
+++ b/crates/ra_syntax/src/grammar/items/mod.rs
@@ -29,7 +29,7 @@ pub(super) enum ItemFlavor {
29 Trait, 29 Trait,
30} 30}
31 31
32const ITEM_RECOVERY_SET: TokenSet = token_set![ 32pub(super) const ITEM_RECOVERY_SET: TokenSet = token_set![
33 FN_KW, STRUCT_KW, ENUM_KW, IMPL_KW, TRAIT_KW, CONST_KW, STATIC_KW, LET_KW, MOD_KW, PUB_KW, 33 FN_KW, STRUCT_KW, ENUM_KW, IMPL_KW, TRAIT_KW, CONST_KW, STATIC_KW, LET_KW, MOD_KW, PUB_KW,
34 CRATE_KW 34 CRATE_KW
35]; 35];
diff --git a/crates/ra_syntax/src/grammar/paths.rs b/crates/ra_syntax/src/grammar/paths.rs
index a35a339cc..33a11886c 100644
--- a/crates/ra_syntax/src/grammar/paths.rs
+++ b/crates/ra_syntax/src/grammar/paths.rs
@@ -78,7 +78,7 @@ fn path_segment(p: &mut Parser, mode: Mode, first: bool) {
78 // use crate::foo; 78 // use crate::foo;
79 SELF_KW | SUPER_KW | CRATE_KW => p.bump(), 79 SELF_KW | SUPER_KW | CRATE_KW => p.bump(),
80 _ => { 80 _ => {
81 p.err_and_bump("expected identifier"); 81 p.err_recover("expected identifier", items::ITEM_RECOVERY_SET);
82 } 82 }
83 }; 83 };
84 } 84 }