diff --git a/Cargo.lock b/Cargo.lock index d61343657c4..908319f875b 100644 --- a/Cargo.lock +++ b/Cargo.lock @@ -1081,14 +1081,6 @@ dependencies = [ "drop_bomb", ] -[[package]] -name = "ra_proc_macro" -version = "0.1.0" -dependencies = [ - "ra_mbe", - "ra_tt", -] - [[package]] name = "ra_prof" version = "0.1.0" diff --git a/crates/ra_hir_def/src/lib.rs b/crates/ra_hir_def/src/lib.rs index b3e8116719b..bd32ac20aac 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 { ) -> Option { let def = resolver(self.path.clone())?; Some( - def.as_lazy_macro(db.upcast(), MacroCallKind::Attr(self.ast_id, self.path.to_string())) - .into(), + def.as_lazy_macro( + db.upcast(), + MacroCallKind::Attr(self.ast_id, self.path.segments.last()?.to_string()), + ) + .into(), ) } } diff --git a/crates/ra_hir_expand/src/builtin_derive.rs b/crates/ra_hir_expand/src/builtin_derive.rs index 7f753bbca14..79aea5806c9 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( mod tests { use super::*; use crate::{test_db::TestDB, AstId, MacroCallId, MacroCallKind, MacroCallLoc}; - use name::Name; + use name::{known, Name}; use ra_db::{fixture::WithFixture, SourceDatabase}; fn expand_builtin_derive(s: &str, name: Name) -> String { @@ -261,7 +261,7 @@ mod tests { #[derive(Copy)] struct Foo; "#, - name::known::Copy, + known::Copy, ); assert_eq!(expanded, "impl< >std::marker::CopyforFoo< >{}"); @@ -274,7 +274,7 @@ mod tests { #[derive(Copy)] struct Foo; "#, - name::known::Copy, + known::Copy, ); assert_eq!( @@ -290,7 +290,7 @@ mod tests { #[derive(Copy)] struct Foo; "#, - name::known::Copy, + known::Copy, ); // We currently just ignore lifetimes @@ -308,7 +308,7 @@ mod tests { #[derive(Clone)] struct Foo; "#, - name::known::Clone, + known::Clone, ); assert_eq!(