diff options
author | Kirill Bulatov <[email protected]> | 2020-08-10 22:37:23 +0100 |
---|---|---|
committer | Kirill Bulatov <[email protected]> | 2020-08-11 13:09:08 +0100 |
commit | 29fbc8e02180aac1f4d7819a9626206aa64028a0 (patch) | |
tree | ed97a21451cdb34a33ac984c7df035a5c29ca25e /crates/ra_hir_expand/src | |
parent | 936861993935d5b2c78b953e2f4b719e1992bd73 (diff) |
Move the DiagnosticsWithFix trait on the ide level
Diffstat (limited to 'crates/ra_hir_expand/src')
-rw-r--r-- | crates/ra_hir_expand/src/diagnostics.rs | 7 |
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 | ||
19 | use ra_syntax::SyntaxNodePtr; | 19 | use ra_syntax::SyntaxNodePtr; |
20 | 20 | ||
21 | use crate::{db::AstDatabase, InFile}; | 21 | use crate::InFile; |
22 | 22 | ||
23 | pub trait Diagnostic: Any + Send + Sync + fmt::Debug + 'static { | 23 | pub 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 | ||
32 | pub trait DiagnosticWithFix { | ||
33 | type AST; | ||
34 | fn fix_source(&self, db: &dyn AstDatabase) -> Option<Self::AST>; | ||
35 | } | ||
36 | |||
37 | pub struct DiagnosticSink<'a> { | 32 | pub 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>>, |