From c3601e9860e533c7990d90dbd773a49039bb037e Mon Sep 17 00:00:00 2001 From: Florian Diebold Date: Mon, 7 Feb 2022 19:53:31 +0100 Subject: [PATCH] Reverse fixups --- crates/hir_def/src/macro_expansion_tests/proc_macros.rs | 3 +-- crates/hir_expand/src/db.rs | 4 +++- crates/mbe/src/syntax_bridge.rs | 2 +- 3 files changed, 5 insertions(+), 4 deletions(-) diff --git a/crates/hir_def/src/macro_expansion_tests/proc_macros.rs b/crates/hir_def/src/macro_expansion_tests/proc_macros.rs index e0c5367cf3..0ca30fb799 100644 --- a/crates/hir_def/src/macro_expansion_tests/proc_macros.rs +++ b/crates/hir_def/src/macro_expansion_tests/proc_macros.rs @@ -76,7 +76,6 @@ fn foo() { #[test] fn attribute_macro_syntax_completion_2() { // common case of dot completion while typing - // right now not working check( r#" //- proc_macros: identity_when_valid @@ -88,7 +87,7 @@ fn foo() { bar.; blub } fn foo() { bar.; blub } fn foo() { - bar.; + bar. ; blub }"##]], ); diff --git a/crates/hir_expand/src/db.rs b/crates/hir_expand/src/db.rs index 6576701817..935fb30fa9 100644 --- a/crates/hir_expand/src/db.rs +++ b/crates/hir_expand/src/db.rs @@ -430,7 +430,7 @@ fn macro_expand(db: &dyn AstDatabase, id: MacroCallId) -> ExpandResult return ExpandResult::str_err(format!("invalid macro definition: {}", err)), }; - let ExpandResult { value: tt, err } = expander.expand(db, id, ¯o_arg.0); + let ExpandResult { value: mut tt, err } = expander.expand(db, id, ¯o_arg.0); // Set a hard limit for the expanded tt let count = tt.count(); // XXX: Make ExpandResult a real error and use .map_err instead? @@ -442,6 +442,8 @@ fn macro_expand(db: &dyn AstDatabase, id: MacroCallId) -> ExpandResult