aboutsummaryrefslogtreecommitdiff
path: root/crates/ra_ssr/src/lib.rs
diff options
context:
space:
mode:
Diffstat (limited to 'crates/ra_ssr/src/lib.rs')
-rw-r--r--crates/ra_ssr/src/lib.rs12
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 @@
6mod matching; 6mod matching;
7mod parsing; 7mod parsing;
8mod replacing; 8mod replacing;
9#[macro_use]
10mod errors;
9#[cfg(test)] 11#[cfg(test)]
10mod tests; 12mod tests;
11 13
14pub use crate::errors::SsrError;
12pub use crate::matching::Match; 15pub use crate::matching::Match;
13use crate::matching::{record_match_fails_reasons_scope, MatchFailureReason}; 16use crate::matching::{record_match_fails_reasons_scope, MatchFailureReason};
14use hir::Semantics; 17use 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)]
45pub struct SsrError(String);
46
47#[derive(Debug, Default)] 47#[derive(Debug, Default)]
48pub struct SsrMatches { 48pub 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
219impl 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
225impl std::fmt::Debug for MatchDebugInfo { 219impl 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")?;