diff options
Diffstat (limited to 'crates/hir_expand/src')
-rw-r--r-- | crates/hir_expand/src/builtin_derive.rs | 2 | ||||
-rw-r--r-- | crates/hir_expand/src/lib.rs | 8 |
2 files changed, 5 insertions, 5 deletions
diff --git a/crates/hir_expand/src/builtin_derive.rs b/crates/hir_expand/src/builtin_derive.rs index 60fd2ebdd..6ece4b289 100644 --- a/crates/hir_expand/src/builtin_derive.rs +++ b/crates/hir_expand/src/builtin_derive.rs | |||
@@ -317,7 +317,7 @@ $0 | |||
317 | local_inner: false, | 317 | local_inner: false, |
318 | }, | 318 | }, |
319 | krate: CrateId(0), | 319 | krate: CrateId(0), |
320 | kind: MacroCallKind::Attr(attr_id, name.to_string()), | 320 | kind: MacroCallKind::Derive(attr_id, name.to_string()), |
321 | }; | 321 | }; |
322 | 322 | ||
323 | let id: MacroCallId = db.intern_macro(loc).into(); | 323 | let id: MacroCallId = db.intern_macro(loc).into(); |
diff --git a/crates/hir_expand/src/lib.rs b/crates/hir_expand/src/lib.rs index 0a379651f..c958b0865 100644 --- a/crates/hir_expand/src/lib.rs +++ b/crates/hir_expand/src/lib.rs | |||
@@ -271,21 +271,21 @@ pub struct MacroCallLoc { | |||
271 | #[derive(Debug, Clone, PartialEq, Eq, Hash)] | 271 | #[derive(Debug, Clone, PartialEq, Eq, Hash)] |
272 | pub enum MacroCallKind { | 272 | pub enum MacroCallKind { |
273 | FnLike(AstId<ast::MacroCall>), | 273 | FnLike(AstId<ast::MacroCall>), |
274 | Attr(AstId<ast::Item>, String), | 274 | Derive(AstId<ast::Item>, String), |
275 | } | 275 | } |
276 | 276 | ||
277 | impl MacroCallKind { | 277 | impl MacroCallKind { |
278 | fn file_id(&self) -> HirFileId { | 278 | fn file_id(&self) -> HirFileId { |
279 | match self { | 279 | match self { |
280 | MacroCallKind::FnLike(ast_id) => ast_id.file_id, | 280 | MacroCallKind::FnLike(ast_id) => ast_id.file_id, |
281 | MacroCallKind::Attr(ast_id, _) => ast_id.file_id, | 281 | MacroCallKind::Derive(ast_id, _) => ast_id.file_id, |
282 | } | 282 | } |
283 | } | 283 | } |
284 | 284 | ||
285 | fn node(&self, db: &dyn db::AstDatabase) -> InFile<SyntaxNode> { | 285 | fn node(&self, db: &dyn db::AstDatabase) -> InFile<SyntaxNode> { |
286 | match self { | 286 | match self { |
287 | MacroCallKind::FnLike(ast_id) => ast_id.with_value(ast_id.to_node(db).syntax().clone()), | 287 | MacroCallKind::FnLike(ast_id) => ast_id.with_value(ast_id.to_node(db).syntax().clone()), |
288 | MacroCallKind::Attr(ast_id, _) => { | 288 | MacroCallKind::Derive(ast_id, _) => { |
289 | ast_id.with_value(ast_id.to_node(db).syntax().clone()) | 289 | ast_id.with_value(ast_id.to_node(db).syntax().clone()) |
290 | } | 290 | } |
291 | } | 291 | } |
@@ -296,7 +296,7 @@ impl MacroCallKind { | |||
296 | MacroCallKind::FnLike(ast_id) => { | 296 | MacroCallKind::FnLike(ast_id) => { |
297 | Some(ast_id.to_node(db).token_tree()?.syntax().clone()) | 297 | Some(ast_id.to_node(db).token_tree()?.syntax().clone()) |
298 | } | 298 | } |
299 | MacroCallKind::Attr(ast_id, _) => Some(ast_id.to_node(db).syntax().clone()), | 299 | MacroCallKind::Derive(ast_id, _) => Some(ast_id.to_node(db).syntax().clone()), |
300 | } | 300 | } |
301 | } | 301 | } |
302 | } | 302 | } |