diff options
-rw-r--r-- | crates/ra_syntax/src/lib.rs | 2 | ||||
-rw-r--r-- | crates/ra_syntax/src/syntax_error.rs | 3 |
2 files changed, 1 insertions, 4 deletions
diff --git a/crates/ra_syntax/src/lib.rs b/crates/ra_syntax/src/lib.rs index cc02c4be5..e3f74da6d 100644 --- a/crates/ra_syntax/src/lib.rs +++ b/crates/ra_syntax/src/lib.rs | |||
@@ -115,7 +115,7 @@ impl Parse<SourceFile> { | |||
115 | pub fn debug_dump(&self) -> String { | 115 | pub fn debug_dump(&self) -> String { |
116 | let mut buf = format!("{:#?}", self.tree().syntax()); | 116 | let mut buf = format!("{:#?}", self.tree().syntax()); |
117 | for err in self.errors.iter() { | 117 | for err in self.errors.iter() { |
118 | writeln!(buf, "error {:?}: {}", err.range(), err.message()).unwrap(); | 118 | writeln!(buf, "error {:?}: {}", err.range(), err).unwrap(); |
119 | } | 119 | } |
120 | buf | 120 | buf |
121 | } | 121 | } |
diff --git a/crates/ra_syntax/src/syntax_error.rs b/crates/ra_syntax/src/syntax_error.rs index 135301bf6..54acf7847 100644 --- a/crates/ra_syntax/src/syntax_error.rs +++ b/crates/ra_syntax/src/syntax_error.rs | |||
@@ -27,9 +27,6 @@ impl SyntaxError { | |||
27 | Self(message.into(), TextRange::offset_len(offset, 0.into())) | 27 | Self(message.into(), TextRange::offset_len(offset, 0.into())) |
28 | } | 28 | } |
29 | 29 | ||
30 | pub fn message(&self) -> &str { | ||
31 | &self.0 | ||
32 | } | ||
33 | pub fn range(&self) -> TextRange { | 30 | pub fn range(&self) -> TextRange { |
34 | self.1 | 31 | self.1 |
35 | } | 32 | } |