diff options
Diffstat (limited to 'crates/ide/src/diagnostics/fixes.rs')
-rw-r--r-- | crates/ide/src/diagnostics/fixes.rs | 31 |
1 files changed, 0 insertions, 31 deletions
diff --git a/crates/ide/src/diagnostics/fixes.rs b/crates/ide/src/diagnostics/fixes.rs deleted file mode 100644 index 258ac6974..000000000 --- a/crates/ide/src/diagnostics/fixes.rs +++ /dev/null | |||
@@ -1,31 +0,0 @@ | |||
1 | //! Provides a way to attach fixes to the diagnostics. | ||
2 | //! The same module also has all curret custom fixes for the diagnostics implemented. | ||
3 | mod change_case; | ||
4 | mod create_field; | ||
5 | mod fill_missing_fields; | ||
6 | mod remove_semicolon; | ||
7 | mod replace_with_find_map; | ||
8 | mod unresolved_module; | ||
9 | mod wrap_tail_expr; | ||
10 | |||
11 | use hir::{diagnostics::Diagnostic, Semantics}; | ||
12 | use ide_assists::AssistResolveStrategy; | ||
13 | use ide_db::RootDatabase; | ||
14 | |||
15 | use crate::Assist; | ||
16 | |||
17 | /// A [Diagnostic] that potentially has some fixes available. | ||
18 | /// | ||
19 | /// [Diagnostic]: hir::diagnostics::Diagnostic | ||
20 | pub(crate) trait DiagnosticWithFixes: Diagnostic { | ||
21 | /// `resolve` determines if the diagnostic should fill in the `edit` field | ||
22 | /// of the assist. | ||
23 | /// | ||
24 | /// If `resolve` is false, the edit will be computed later, on demand, and | ||
25 | /// can be omitted. | ||
26 | fn fixes( | ||
27 | &self, | ||
28 | sema: &Semantics<RootDatabase>, | ||
29 | _resolve: &AssistResolveStrategy, | ||
30 | ) -> Option<Vec<Assist>>; | ||
31 | } | ||