From bee4f8f9fee56bb00b462cdf4ad3ed317fed682f Mon Sep 17 00:00:00 2001 From: kjeremy Date: Tue, 26 May 2020 14:12:13 -0400 Subject: Pass trivially copy types as copy --- crates/ra_hir_expand/src/proc_macro.rs | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'crates/ra_hir_expand') diff --git a/crates/ra_hir_expand/src/proc_macro.rs b/crates/ra_hir_expand/src/proc_macro.rs index 4e0e069c8..04c026004 100644 --- a/crates/ra_hir_expand/src/proc_macro.rs +++ b/crates/ra_hir_expand/src/proc_macro.rs @@ -25,7 +25,7 @@ impl ProcMacroExpander { } pub fn expand( - &self, + self, db: &dyn AstDatabase, _id: LazyMacroId, tt: &tt::Subtree, -- cgit v1.2.3 From 1cd78a3355ea70d3070cabb00c80a5d195499752 Mon Sep 17 00:00:00 2001 From: robojumper Date: Sun, 31 May 2020 10:59:40 +0200 Subject: correctly infer labelled breaks --- crates/ra_hir_expand/src/name.rs | 5 +++++ 1 file changed, 5 insertions(+) (limited to 'crates/ra_hir_expand') diff --git a/crates/ra_hir_expand/src/name.rs b/crates/ra_hir_expand/src/name.rs index fecce224e..ea495cb11 100644 --- a/crates/ra_hir_expand/src/name.rs +++ b/crates/ra_hir_expand/src/name.rs @@ -37,6 +37,11 @@ impl Name { Name(Repr::TupleField(idx)) } + pub fn new_lifetime(lt: &ra_syntax::SyntaxToken) -> Name { + assert!(lt.kind() == ra_syntax::SyntaxKind::LIFETIME); + Name(Repr::Text(lt.text().clone())) + } + /// Shortcut to create inline plain text name const fn new_inline_ascii(text: &[u8]) -> Name { Name::new_text(SmolStr::new_inline_from_ascii(text.len(), text)) -- cgit v1.2.3 From 4c655c01f31ceffae4f8219f9706992e0e7f188a Mon Sep 17 00:00:00 2001 From: Aaron Loucks Date: Sat, 30 May 2020 14:21:06 -0400 Subject: Enable hover and autocomplete docs on macro generated items --- crates/ra_hir_expand/src/name.rs | 1 + 1 file changed, 1 insertion(+) (limited to 'crates/ra_hir_expand') diff --git a/crates/ra_hir_expand/src/name.rs b/crates/ra_hir_expand/src/name.rs index ea495cb11..660bdfe33 100644 --- a/crates/ra_hir_expand/src/name.rs +++ b/crates/ra_hir_expand/src/name.rs @@ -153,6 +153,7 @@ pub mod known { str, // Special names macro_rules, + doc, // Components of known path (value or mod name) std, core, -- cgit v1.2.3