diff options
-rw-r--r-- | Cargo.lock | 8 | ||||
-rw-r--r-- | crates/ra_hir_def/src/lib.rs | 7 | ||||
-rw-r--r-- | crates/ra_hir_expand/src/builtin_derive.rs | 10 |
3 files changed, 10 insertions, 15 deletions
diff --git a/Cargo.lock b/Cargo.lock index d61343657..908319f87 100644 --- a/Cargo.lock +++ b/Cargo.lock | |||
@@ -1082,14 +1082,6 @@ dependencies = [ | |||
1082 | ] | 1082 | ] |
1083 | 1083 | ||
1084 | [[package]] | 1084 | [[package]] |
1085 | name = "ra_proc_macro" | ||
1086 | version = "0.1.0" | ||
1087 | dependencies = [ | ||
1088 | "ra_mbe", | ||
1089 | "ra_tt", | ||
1090 | ] | ||
1091 | |||
1092 | [[package]] | ||
1093 | name = "ra_prof" | 1085 | name = "ra_prof" |
1094 | version = "0.1.0" | 1086 | version = "0.1.0" |
1095 | dependencies = [ | 1087 | dependencies = [ |
diff --git a/crates/ra_hir_def/src/lib.rs b/crates/ra_hir_def/src/lib.rs index b3e811671..bd32ac20a 100644 --- a/crates/ra_hir_def/src/lib.rs +++ b/crates/ra_hir_def/src/lib.rs | |||
@@ -476,8 +476,11 @@ impl AsMacroCall for AstIdWithPath<ast::ModuleItem> { | |||
476 | ) -> Option<MacroCallId> { | 476 | ) -> Option<MacroCallId> { |
477 | let def = resolver(self.path.clone())?; | 477 | let def = resolver(self.path.clone())?; |
478 | Some( | 478 | Some( |
479 | def.as_lazy_macro(db.upcast(), MacroCallKind::Attr(self.ast_id, self.path.to_string())) | 479 | def.as_lazy_macro( |
480 | .into(), | 480 | db.upcast(), |
481 | MacroCallKind::Attr(self.ast_id, self.path.segments.last()?.to_string()), | ||
482 | ) | ||
483 | .into(), | ||
481 | ) | 484 | ) |
482 | } | 485 | } |
483 | } | 486 | } |
diff --git a/crates/ra_hir_expand/src/builtin_derive.rs b/crates/ra_hir_expand/src/builtin_derive.rs index 7f753bbca..79aea5806 100644 --- a/crates/ra_hir_expand/src/builtin_derive.rs +++ b/crates/ra_hir_expand/src/builtin_derive.rs | |||
@@ -229,7 +229,7 @@ fn partial_ord_expand( | |||
229 | mod tests { | 229 | mod tests { |
230 | use super::*; | 230 | use super::*; |
231 | use crate::{test_db::TestDB, AstId, MacroCallId, MacroCallKind, MacroCallLoc}; | 231 | use crate::{test_db::TestDB, AstId, MacroCallId, MacroCallKind, MacroCallLoc}; |
232 | use name::Name; | 232 | use name::{known, Name}; |
233 | use ra_db::{fixture::WithFixture, SourceDatabase}; | 233 | use ra_db::{fixture::WithFixture, SourceDatabase}; |
234 | 234 | ||
235 | fn expand_builtin_derive(s: &str, name: Name) -> String { | 235 | fn expand_builtin_derive(s: &str, name: Name) -> String { |
@@ -261,7 +261,7 @@ mod tests { | |||
261 | #[derive(Copy)] | 261 | #[derive(Copy)] |
262 | struct Foo; | 262 | struct Foo; |
263 | "#, | 263 | "#, |
264 | name::known::Copy, | 264 | known::Copy, |
265 | ); | 265 | ); |
266 | 266 | ||
267 | assert_eq!(expanded, "impl< >std::marker::CopyforFoo< >{}"); | 267 | assert_eq!(expanded, "impl< >std::marker::CopyforFoo< >{}"); |
@@ -274,7 +274,7 @@ mod tests { | |||
274 | #[derive(Copy)] | 274 | #[derive(Copy)] |
275 | struct Foo<A, B>; | 275 | struct Foo<A, B>; |
276 | "#, | 276 | "#, |
277 | name::known::Copy, | 277 | known::Copy, |
278 | ); | 278 | ); |
279 | 279 | ||
280 | assert_eq!( | 280 | assert_eq!( |
@@ -290,7 +290,7 @@ mod tests { | |||
290 | #[derive(Copy)] | 290 | #[derive(Copy)] |
291 | struct Foo<A, B, 'a, 'b>; | 291 | struct Foo<A, B, 'a, 'b>; |
292 | "#, | 292 | "#, |
293 | name::known::Copy, | 293 | known::Copy, |
294 | ); | 294 | ); |
295 | 295 | ||
296 | // We currently just ignore lifetimes | 296 | // We currently just ignore lifetimes |
@@ -308,7 +308,7 @@ mod tests { | |||
308 | #[derive(Clone)] | 308 | #[derive(Clone)] |
309 | struct Foo<A, B>; | 309 | struct Foo<A, B>; |
310 | "#, | 310 | "#, |
311 | name::known::Clone, | 311 | known::Clone, |
312 | ); | 312 | ); |
313 | 313 | ||
314 | assert_eq!( | 314 | assert_eq!( |