aboutsummaryrefslogtreecommitdiff
path: root/crates/ra_syntax/src
diff options
context:
space:
mode:
Diffstat (limited to 'crates/ra_syntax/src')
-rw-r--r--crates/ra_syntax/src/ast.rs2
-rw-r--r--crates/ra_syntax/src/grammar/type_params.rs7
-rw-r--r--crates/ra_syntax/src/lexer.rs2
-rw-r--r--crates/ra_syntax/src/string_lexing/byte.rs2
-rw-r--r--crates/ra_syntax/src/string_lexing/byte_string.rs2
-rw-r--r--crates/ra_syntax/src/string_lexing/char.rs2
-rw-r--r--crates/ra_syntax/src/string_lexing/string.rs2
7 files changed, 12 insertions, 7 deletions
diff --git a/crates/ra_syntax/src/ast.rs b/crates/ra_syntax/src/ast.rs
index 91c67119f..f12479fb4 100644
--- a/crates/ra_syntax/src/ast.rs
+++ b/crates/ra_syntax/src/ast.rs
@@ -284,7 +284,7 @@ impl<'a> IfExpr<'a> {
284 } 284 }
285} 285}
286 286
287#[derive(Debug, Clone, Copy)] 287#[derive(Debug, Clone, Copy, PartialEq, Eq)]
288pub enum PathSegmentKind<'a> { 288pub enum PathSegmentKind<'a> {
289 Name(NameRef<'a>), 289 Name(NameRef<'a>),
290 SelfKw, 290 SelfKw,
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);
diff --git a/crates/ra_syntax/src/lexer.rs b/crates/ra_syntax/src/lexer.rs
index f388da273..c6acd095e 100644
--- a/crates/ra_syntax/src/lexer.rs
+++ b/crates/ra_syntax/src/lexer.rs
@@ -160,7 +160,7 @@ fn next_token_inner(c: char, ptr: &mut Ptr) -> SyntaxKind {
160 // if we find one, then this is an invalid character literal 160 // if we find one, then this is an invalid character literal
161 if ptr.at('\'') { 161 if ptr.at('\'') {
162 ptr.bump(); 162 ptr.bump();
163 return CHAR; // TODO: error reporting 163 return CHAR;
164 } 164 }
165 LIFETIME 165 LIFETIME
166 } else { 166 } else {
diff --git a/crates/ra_syntax/src/string_lexing/byte.rs b/crates/ra_syntax/src/string_lexing/byte.rs
index 24424349c..b3228d6ca 100644
--- a/crates/ra_syntax/src/string_lexing/byte.rs
+++ b/crates/ra_syntax/src/string_lexing/byte.rs
@@ -40,7 +40,7 @@ impl<'a> Iterator for ByteComponentIterator<'a> {
40 40
41 assert!( 41 assert!(
42 self.parser.peek() == None, 42 self.parser.peek() == None,
43 "byte literal should leave no unparsed input: src = {}, pos = {}, length = {}", 43 "byte literal should leave no unparsed input: src = {:?}, pos = {}, length = {}",
44 self.parser.src, 44 self.parser.src,
45 self.parser.pos, 45 self.parser.pos,
46 self.parser.src.len() 46 self.parser.src.len()
diff --git a/crates/ra_syntax/src/string_lexing/byte_string.rs b/crates/ra_syntax/src/string_lexing/byte_string.rs
index 5b6dda760..a6056159b 100644
--- a/crates/ra_syntax/src/string_lexing/byte_string.rs
+++ b/crates/ra_syntax/src/string_lexing/byte_string.rs
@@ -40,7 +40,7 @@ impl<'a> Iterator for ByteStringComponentIterator<'a> {
40 40
41 assert!( 41 assert!(
42 self.parser.peek() == None, 42 self.parser.peek() == None,
43 "byte string literal should leave no unparsed input: src = {}, pos = {}, length = {}", 43 "byte string literal should leave no unparsed input: src = {:?}, pos = {}, length = {}",
44 self.parser.src, 44 self.parser.src,
45 self.parser.pos, 45 self.parser.pos,
46 self.parser.src.len() 46 self.parser.src.len()
diff --git a/crates/ra_syntax/src/string_lexing/char.rs b/crates/ra_syntax/src/string_lexing/char.rs
index 885c03b14..e01813176 100644
--- a/crates/ra_syntax/src/string_lexing/char.rs
+++ b/crates/ra_syntax/src/string_lexing/char.rs
@@ -35,7 +35,7 @@ impl<'a> Iterator for CharComponentIterator<'a> {
35 35
36 assert!( 36 assert!(
37 self.parser.peek() == None, 37 self.parser.peek() == None,
38 "char literal should leave no unparsed input: src = {}, pos = {}, length = {}", 38 "char literal should leave no unparsed input: src = {:?}, pos = {}, length = {}",
39 self.parser.src, 39 self.parser.src,
40 self.parser.pos, 40 self.parser.pos,
41 self.parser.src.len() 41 self.parser.src.len()
diff --git a/crates/ra_syntax/src/string_lexing/string.rs b/crates/ra_syntax/src/string_lexing/string.rs
index 1b23029c6..d8351e9af 100644
--- a/crates/ra_syntax/src/string_lexing/string.rs
+++ b/crates/ra_syntax/src/string_lexing/string.rs
@@ -35,7 +35,7 @@ impl<'a> Iterator for StringComponentIterator<'a> {
35 35
36 assert!( 36 assert!(
37 self.parser.peek() == None, 37 self.parser.peek() == None,
38 "string literal should leave no unparsed input: src = {}, pos = {}, length = {}", 38 "string literal should leave no unparsed input: src = {:?}, pos = {}, length = {}",
39 self.parser.src, 39 self.parser.src,
40 self.parser.pos, 40 self.parser.pos,
41 self.parser.src.len() 41 self.parser.src.len()