diff options
Diffstat (limited to 'crates/ra_ssr/src/lib.rs')
-rw-r--r-- | crates/ra_ssr/src/lib.rs | 12 |
1 files changed, 3 insertions, 9 deletions
diff --git a/crates/ra_ssr/src/lib.rs b/crates/ra_ssr/src/lib.rs index 422e15ee6..d6862356d 100644 --- a/crates/ra_ssr/src/lib.rs +++ b/crates/ra_ssr/src/lib.rs | |||
@@ -6,9 +6,12 @@ | |||
6 | mod matching; | 6 | mod matching; |
7 | mod parsing; | 7 | mod parsing; |
8 | mod replacing; | 8 | mod replacing; |
9 | #[macro_use] | ||
10 | mod errors; | ||
9 | #[cfg(test)] | 11 | #[cfg(test)] |
10 | mod tests; | 12 | mod tests; |
11 | 13 | ||
14 | pub use crate::errors::SsrError; | ||
12 | pub use crate::matching::Match; | 15 | pub use crate::matching::Match; |
13 | use crate::matching::{record_match_fails_reasons_scope, MatchFailureReason}; | 16 | use crate::matching::{record_match_fails_reasons_scope, MatchFailureReason}; |
14 | use hir::Semantics; | 17 | use hir::Semantics; |
@@ -41,9 +44,6 @@ pub struct SsrPattern { | |||
41 | pattern: Option<SyntaxNode>, | 44 | pattern: Option<SyntaxNode>, |
42 | } | 45 | } |
43 | 46 | ||
44 | #[derive(Debug, PartialEq)] | ||
45 | pub struct SsrError(String); | ||
46 | |||
47 | #[derive(Debug, Default)] | 47 | #[derive(Debug, Default)] |
48 | pub struct SsrMatches { | 48 | pub struct SsrMatches { |
49 | pub matches: Vec<Match>, | 49 | pub matches: Vec<Match>, |
@@ -216,12 +216,6 @@ pub struct MatchDebugInfo { | |||
216 | matched: Result<Match, MatchFailureReason>, | 216 | matched: Result<Match, MatchFailureReason>, |
217 | } | 217 | } |
218 | 218 | ||
219 | impl std::fmt::Display for SsrError { | ||
220 | fn fmt(&self, f: &mut core::fmt::Formatter<'_>) -> core::fmt::Result { | ||
221 | write!(f, "Parse error: {}", self.0) | ||
222 | } | ||
223 | } | ||
224 | |||
225 | impl std::fmt::Debug for MatchDebugInfo { | 219 | impl std::fmt::Debug for MatchDebugInfo { |
226 | fn fmt(&self, f: &mut std::fmt::Formatter<'_>) -> std::fmt::Result { | 220 | fn fmt(&self, f: &mut std::fmt::Formatter<'_>) -> std::fmt::Result { |
227 | write!(f, "========= PATTERN ==========\n")?; | 221 | write!(f, "========= PATTERN ==========\n")?; |