diff options
author | Jonas Schievink <[email protected]> | 2021-05-10 15:35:06 +0100 |
---|---|---|
committer | Jonas Schievink <[email protected]> | 2021-05-10 15:35:06 +0100 |
commit | a87bec51485feb491f7b1b80c06a29d86ebaf681 (patch) | |
tree | f1097192c4e96a97031f31fd7077c08161676c1a /crates/hir_expand/src | |
parent | 07cea5e709f8232b27de646cee67bf1d3f7279c9 (diff) |
Move `AttrId` back into `hir_def`
Diffstat (limited to 'crates/hir_expand/src')
-rw-r--r-- | crates/hir_expand/src/builtin_derive.rs | 4 | ||||
-rw-r--r-- | crates/hir_expand/src/lib.rs | 5 |
2 files changed, 3 insertions, 6 deletions
diff --git a/crates/hir_expand/src/builtin_derive.rs b/crates/hir_expand/src/builtin_derive.rs index 537c03028..b6a6d602f 100644 --- a/crates/hir_expand/src/builtin_derive.rs +++ b/crates/hir_expand/src/builtin_derive.rs | |||
@@ -269,7 +269,7 @@ mod tests { | |||
269 | use expect_test::{expect, Expect}; | 269 | use expect_test::{expect, Expect}; |
270 | use name::AsName; | 270 | use name::AsName; |
271 | 271 | ||
272 | use crate::{test_db::TestDB, AstId, AttrId, MacroCallId, MacroCallKind, MacroCallLoc}; | 272 | use crate::{test_db::TestDB, AstId, MacroCallId, MacroCallKind, MacroCallLoc}; |
273 | 273 | ||
274 | use super::*; | 274 | use super::*; |
275 | 275 | ||
@@ -320,7 +320,7 @@ $0 | |||
320 | kind: MacroCallKind::Derive { | 320 | kind: MacroCallKind::Derive { |
321 | ast_id, | 321 | ast_id, |
322 | derive_name: name.to_string(), | 322 | derive_name: name.to_string(), |
323 | derive_attr: AttrId(0), | 323 | derive_attr_index: 0, |
324 | }, | 324 | }, |
325 | }; | 325 | }; |
326 | 326 | ||
diff --git a/crates/hir_expand/src/lib.rs b/crates/hir_expand/src/lib.rs index 80ab3aeee..57e08eeb0 100644 --- a/crates/hir_expand/src/lib.rs +++ b/crates/hir_expand/src/lib.rs | |||
@@ -293,12 +293,9 @@ pub struct MacroCallLoc { | |||
293 | #[derive(Debug, Clone, PartialEq, Eq, Hash)] | 293 | #[derive(Debug, Clone, PartialEq, Eq, Hash)] |
294 | pub enum MacroCallKind { | 294 | pub enum MacroCallKind { |
295 | FnLike { ast_id: AstId<ast::MacroCall>, fragment: FragmentKind }, | 295 | FnLike { ast_id: AstId<ast::MacroCall>, fragment: FragmentKind }, |
296 | Derive { ast_id: AstId<ast::Item>, derive_name: String, derive_attr: AttrId }, | 296 | Derive { ast_id: AstId<ast::Item>, derive_name: String, derive_attr_index: u32 }, |
297 | } | 297 | } |
298 | 298 | ||
299 | #[derive(Debug, Clone, Copy, PartialEq, Eq, Hash)] | ||
300 | pub struct AttrId(pub u32); | ||
301 | |||
302 | impl MacroCallKind { | 299 | impl MacroCallKind { |
303 | fn file_id(&self) -> HirFileId { | 300 | fn file_id(&self) -> HirFileId { |
304 | match self { | 301 | match self { |