aboutsummaryrefslogtreecommitdiff
path: root/crates/ra_hir_expand/src
diff options
context:
space:
mode:
Diffstat (limited to 'crates/ra_hir_expand/src')
-rw-r--r--crates/ra_hir_expand/src/diagnostics.rs7
1 files changed, 1 insertions, 6 deletions
diff --git a/crates/ra_hir_expand/src/diagnostics.rs b/crates/ra_hir_expand/src/diagnostics.rs
index 62a09a73a..8358c488b 100644
--- a/crates/ra_hir_expand/src/diagnostics.rs
+++ b/crates/ra_hir_expand/src/diagnostics.rs
@@ -18,7 +18,7 @@ use std::{any::Any, fmt};
18 18
19use ra_syntax::SyntaxNodePtr; 19use ra_syntax::SyntaxNodePtr;
20 20
21use crate::{db::AstDatabase, InFile}; 21use crate::InFile;
22 22
23pub trait Diagnostic: Any + Send + Sync + fmt::Debug + 'static { 23pub trait Diagnostic: Any + Send + Sync + fmt::Debug + 'static {
24 fn message(&self) -> String; 24 fn message(&self) -> String;
@@ -29,11 +29,6 @@ pub trait Diagnostic: Any + Send + Sync + fmt::Debug + 'static {
29 } 29 }
30} 30}
31 31
32pub trait DiagnosticWithFix {
33 type AST;
34 fn fix_source(&self, db: &dyn AstDatabase) -> Option<Self::AST>;
35}
36
37pub struct DiagnosticSink<'a> { 32pub struct DiagnosticSink<'a> {
38 callbacks: Vec<Box<dyn FnMut(&dyn Diagnostic) -> Result<(), ()> + 'a>>, 33 callbacks: Vec<Box<dyn FnMut(&dyn Diagnostic) -> Result<(), ()> + 'a>>,
39 filters: Vec<Box<dyn FnMut(&dyn Diagnostic) -> bool + 'a>>, 34 filters: Vec<Box<dyn FnMut(&dyn Diagnostic) -> bool + 'a>>,