aboutsummaryrefslogtreecommitdiff
path: root/crates/ra_syntax/src
diff options
context:
space:
mode:
authorbors[bot] <bors[bot]@users.noreply.github.com>2018-12-21 17:31:43 +0000
committerbors[bot] <bors[bot]@users.noreply.github.com>2018-12-21 17:31:43 +0000
commita106784115b5f55b9bbc4d9f72464bdc31cf5cda (patch)
tree344250a85284d1b3c31e7a3111ef0f43c3833dbe /crates/ra_syntax/src
parente086cc8db5edbf38756abca25c8bcc3334a596ff (diff)
parentbd5a3589109df3afde67640cd4b36b91d9271d8a (diff)
Merge #313
313: Fix where clauses using fully qualified path syntax r=matklad a=DJMcNab Fixes #311. Co-authored-by: DJMcNab <[email protected]>
Diffstat (limited to 'crates/ra_syntax/src')
-rw-r--r--crates/ra_syntax/src/grammar/type_params.rs7
1 files changed, 6 insertions, 1 deletions
diff --git a/crates/ra_syntax/src/grammar/type_params.rs b/crates/ra_syntax/src/grammar/type_params.rs
index 863f8e00c..7db25beba 100644
--- a/crates/ra_syntax/src/grammar/type_params.rs
+++ b/crates/ra_syntax/src/grammar/type_params.rs
@@ -96,6 +96,7 @@ pub(super) fn bounds_without_colon(p: &mut Parser) {
96// 'a: 'b + 'c, 96// 'a: 'b + 'c,
97// T: Clone + Copy + 'static, 97// T: Clone + Copy + 'static,
98// Iterator::Item: 'a, 98// Iterator::Item: 'a,
99// <T as Iterator>::Item: 'a
99// {} 100// {}
100pub(super) fn opt_where_clause(p: &mut Parser) { 101pub(super) fn opt_where_clause(p: &mut Parser) {
101 if !p.at(WHERE_KW) { 102 if !p.at(WHERE_KW) {
@@ -104,7 +105,11 @@ pub(super) fn opt_where_clause(p: &mut Parser) {
104 let m = p.start(); 105 let m = p.start();
105 p.bump(); 106 p.bump();
106 loop { 107 loop {
107 if !(paths::is_path_start(p) || p.current() == LIFETIME || p.current() == FOR_KW) { 108 if !(paths::is_path_start(p)
109 || p.current() == LIFETIME
110 || p.current() == FOR_KW
111 || p.current() == L_ANGLE)
112 {
108 break; 113 break;
109 } 114 }
110 where_predicate(p); 115 where_predicate(p);