aboutsummaryrefslogtreecommitdiff
path: root/crates/ide_completion/src/completions/attribute.rs
diff options
context:
space:
mode:
Diffstat (limited to 'crates/ide_completion/src/completions/attribute.rs')
-rw-r--r--crates/ide_completion/src/completions/attribute.rs18
1 files changed, 9 insertions, 9 deletions
diff --git a/crates/ide_completion/src/completions/attribute.rs b/crates/ide_completion/src/completions/attribute.rs
index 14376b924..e846678b4 100644
--- a/crates/ide_completion/src/completions/attribute.rs
+++ b/crates/ide_completion/src/completions/attribute.rs
@@ -168,20 +168,20 @@ fn complete_derive(acc: &mut Completions, ctx: &CompletionContext, derive_input:
168 ); 168 );
169 let lookup = components.join(", "); 169 let lookup = components.join(", ");
170 let label = components.iter().rev().join(", "); 170 let label = components.iter().rev().join(", ");
171 let mut builder = 171 let mut item =
172 CompletionItem::new(CompletionKind::Attribute, ctx.source_range(), label); 172 CompletionItem::new(CompletionKind::Attribute, ctx.source_range(), label);
173 builder.lookup_by(lookup).kind(CompletionItemKind::Attribute); 173 item.lookup_by(lookup).kind(CompletionItemKind::Attribute);
174 builder.add_to(acc); 174 item.add_to(acc);
175 } 175 }
176 176
177 for custom_derive_name in get_derive_names_in_scope(ctx).difference(&existing_derives) { 177 for custom_derive_name in get_derive_names_in_scope(ctx).difference(&existing_derives) {
178 let mut builder = CompletionItem::new( 178 let mut item = CompletionItem::new(
179 CompletionKind::Attribute, 179 CompletionKind::Attribute,
180 ctx.source_range(), 180 ctx.source_range(),
181 custom_derive_name, 181 custom_derive_name,
182 ); 182 );
183 builder.kind(CompletionItemKind::Attribute); 183 item.kind(CompletionItemKind::Attribute);
184 builder.add_to(acc); 184 item.add_to(acc);
185 } 185 }
186 } 186 }
187} 187}
@@ -197,13 +197,13 @@ fn complete_lint(
197 .into_iter() 197 .into_iter()
198 .filter(|completion| !existing_lints.contains(completion.label)) 198 .filter(|completion| !existing_lints.contains(completion.label))
199 { 199 {
200 let mut builder = CompletionItem::new( 200 let mut item = CompletionItem::new(
201 CompletionKind::Attribute, 201 CompletionKind::Attribute,
202 ctx.source_range(), 202 ctx.source_range(),
203 lint_completion.label, 203 lint_completion.label,
204 ); 204 );
205 builder.kind(CompletionItemKind::Attribute).detail(lint_completion.description); 205 item.kind(CompletionItemKind::Attribute).detail(lint_completion.description);
206 builder.add_to(acc) 206 item.add_to(acc)
207 } 207 }
208 } 208 }
209} 209}