aboutsummaryrefslogtreecommitdiff
path: root/crates/ra_syntax/src/grammar
diff options
context:
space:
mode:
Diffstat (limited to 'crates/ra_syntax/src/grammar')
-rw-r--r--crates/ra_syntax/src/grammar/mod.rs2
-rw-r--r--crates/ra_syntax/src/grammar/type_params.rs6
2 files changed, 6 insertions, 2 deletions
diff --git a/crates/ra_syntax/src/grammar/mod.rs b/crates/ra_syntax/src/grammar/mod.rs
index 95c437983..06a37d648 100644
--- a/crates/ra_syntax/src/grammar/mod.rs
+++ b/crates/ra_syntax/src/grammar/mod.rs
@@ -53,7 +53,7 @@ pub(crate) fn root(p: &mut Parser) {
53 let m = p.start(); 53 let m = p.start();
54 p.eat(SHEBANG); 54 p.eat(SHEBANG);
55 items::mod_contents(p, false); 55 items::mod_contents(p, false);
56 m.complete(p, ROOT); 56 m.complete(p, SOURCE_FILE);
57} 57}
58 58
59#[derive(Clone, Copy, PartialEq, Eq)] 59#[derive(Clone, Copy, PartialEq, Eq)]
diff --git a/crates/ra_syntax/src/grammar/type_params.rs b/crates/ra_syntax/src/grammar/type_params.rs
index 68eca0ce8..f4c98675c 100644
--- a/crates/ra_syntax/src/grammar/type_params.rs
+++ b/crates/ra_syntax/src/grammar/type_params.rs
@@ -135,7 +135,11 @@ fn where_predicate(p: &mut Parser) {
135 if p.at(FOR_KW) { 135 if p.at(FOR_KW) {
136 types::for_binder(p); 136 types::for_binder(p);
137 } 137 }
138 types::path_type(p); 138 if paths::is_path_start(p) || p.at(L_ANGLE) {
139 types::path_type_(p, false);
140 } else {
141 p.error("expected a type");
142 }
139 if p.at(COLON) { 143 if p.at(COLON) {
140 bounds(p); 144 bounds(p);
141 } else { 145 } else {