aboutsummaryrefslogtreecommitdiff
path: root/crates/ide/src/diagnostics/fixes.rs
diff options
context:
space:
mode:
Diffstat (limited to 'crates/ide/src/diagnostics/fixes.rs')
-rw-r--r--crates/ide/src/diagnostics/fixes.rs16
1 files changed, 8 insertions, 8 deletions
diff --git a/crates/ide/src/diagnostics/fixes.rs b/crates/ide/src/diagnostics/fixes.rs
index f23064eac..15821500f 100644
--- a/crates/ide/src/diagnostics/fixes.rs
+++ b/crates/ide/src/diagnostics/fixes.rs
@@ -39,7 +39,7 @@ pub(crate) trait DiagnosticWithFix: Diagnostic {
39 fn fix( 39 fn fix(
40 &self, 40 &self,
41 sema: &Semantics<RootDatabase>, 41 sema: &Semantics<RootDatabase>,
42 _resolve: AssistResolveStrategy, 42 _resolve: &AssistResolveStrategy,
43 ) -> Option<Assist>; 43 ) -> Option<Assist>;
44} 44}
45 45
@@ -47,7 +47,7 @@ impl DiagnosticWithFix for UnresolvedModule {
47 fn fix( 47 fn fix(
48 &self, 48 &self,
49 sema: &Semantics<RootDatabase>, 49 sema: &Semantics<RootDatabase>,
50 _resolve: AssistResolveStrategy, 50 _resolve: &AssistResolveStrategy,
51 ) -> Option<Assist> { 51 ) -> Option<Assist> {
52 let root = sema.db.parse_or_expand(self.file)?; 52 let root = sema.db.parse_or_expand(self.file)?;
53 let unresolved_module = self.decl.to_node(&root); 53 let unresolved_module = self.decl.to_node(&root);
@@ -71,7 +71,7 @@ impl DiagnosticWithFix for NoSuchField {
71 fn fix( 71 fn fix(
72 &self, 72 &self,
73 sema: &Semantics<RootDatabase>, 73 sema: &Semantics<RootDatabase>,
74 _resolve: AssistResolveStrategy, 74 _resolve: &AssistResolveStrategy,
75 ) -> Option<Assist> { 75 ) -> Option<Assist> {
76 let root = sema.db.parse_or_expand(self.file)?; 76 let root = sema.db.parse_or_expand(self.file)?;
77 missing_record_expr_field_fix( 77 missing_record_expr_field_fix(
@@ -86,7 +86,7 @@ impl DiagnosticWithFix for MissingFields {
86 fn fix( 86 fn fix(
87 &self, 87 &self,
88 sema: &Semantics<RootDatabase>, 88 sema: &Semantics<RootDatabase>,
89 _resolve: AssistResolveStrategy, 89 _resolve: &AssistResolveStrategy,
90 ) -> Option<Assist> { 90 ) -> Option<Assist> {
91 // Note that although we could add a diagnostics to 91 // Note that although we could add a diagnostics to
92 // fill the missing tuple field, e.g : 92 // fill the missing tuple field, e.g :
@@ -126,7 +126,7 @@ impl DiagnosticWithFix for MissingOkOrSomeInTailExpr {
126 fn fix( 126 fn fix(
127 &self, 127 &self,
128 sema: &Semantics<RootDatabase>, 128 sema: &Semantics<RootDatabase>,
129 _resolve: AssistResolveStrategy, 129 _resolve: &AssistResolveStrategy,
130 ) -> Option<Assist> { 130 ) -> Option<Assist> {
131 let root = sema.db.parse_or_expand(self.file)?; 131 let root = sema.db.parse_or_expand(self.file)?;
132 let tail_expr = self.expr.to_node(&root); 132 let tail_expr = self.expr.to_node(&root);
@@ -143,7 +143,7 @@ impl DiagnosticWithFix for RemoveThisSemicolon {
143 fn fix( 143 fn fix(
144 &self, 144 &self,
145 sema: &Semantics<RootDatabase>, 145 sema: &Semantics<RootDatabase>,
146 _resolve: AssistResolveStrategy, 146 _resolve: &AssistResolveStrategy,
147 ) -> Option<Assist> { 147 ) -> Option<Assist> {
148 let root = sema.db.parse_or_expand(self.file)?; 148 let root = sema.db.parse_or_expand(self.file)?;
149 149
@@ -167,7 +167,7 @@ impl DiagnosticWithFix for IncorrectCase {
167 fn fix( 167 fn fix(
168 &self, 168 &self,
169 sema: &Semantics<RootDatabase>, 169 sema: &Semantics<RootDatabase>,
170 resolve: AssistResolveStrategy, 170 resolve: &AssistResolveStrategy,
171 ) -> Option<Assist> { 171 ) -> Option<Assist> {
172 let root = sema.db.parse_or_expand(self.file)?; 172 let root = sema.db.parse_or_expand(self.file)?;
173 let name_node = self.ident.to_node(&root); 173 let name_node = self.ident.to_node(&root);
@@ -191,7 +191,7 @@ impl DiagnosticWithFix for ReplaceFilterMapNextWithFindMap {
191 fn fix( 191 fn fix(
192 &self, 192 &self,
193 sema: &Semantics<RootDatabase>, 193 sema: &Semantics<RootDatabase>,
194 _resolve: AssistResolveStrategy, 194 _resolve: &AssistResolveStrategy,
195 ) -> Option<Assist> { 195 ) -> Option<Assist> {
196 let root = sema.db.parse_or_expand(self.file)?; 196 let root = sema.db.parse_or_expand(self.file)?;
197 let next_expr = self.next_expr.to_node(&root); 197 let next_expr = self.next_expr.to_node(&root);