From c6655c67d2091b49a10512bfeab631d5f8a09d4b Mon Sep 17 00:00:00 2001 From: Roland Ruckerbauer Date: Fri, 10 Jan 2020 21:49:46 +0100 Subject: Added test for file_structure unidentified macro definition --- crates/ra_ide/src/display/structure.rs | 22 ++++++++++++++++++---- 1 file changed, 18 insertions(+), 4 deletions(-) (limited to 'crates/ra_ide') diff --git a/crates/ra_ide/src/display/structure.rs b/crates/ra_ide/src/display/structure.rs index be21fa913..8bdb971fe 100644 --- a/crates/ra_ide/src/display/structure.rs +++ b/crates/ra_ide/src/display/structure.rs @@ -212,6 +212,11 @@ macro_rules! mc { () => {} } +#[macro_export] +macro_rules! mcexp { + () => {} +} + #[deprecated] fn obsolete() {} @@ -386,11 +391,20 @@ fn very_obsolete() {} detail: None, deprecated: false, }, + StructureNode { + parent: None, + label: "mcexp", + navigation_range: [334; 339), + node_range: [305; 356), + kind: MACRO_CALL, + detail: None, + deprecated: false, + }, StructureNode { parent: None, label: "obsolete", - navigation_range: [322; 330), - node_range: [305; 335), + navigation_range: [375; 383), + node_range: [358; 388), kind: FN_DEF, detail: Some( "fn()", @@ -400,8 +414,8 @@ fn very_obsolete() {} StructureNode { parent: None, label: "very_obsolete", - navigation_range: [375; 388), - node_range: [337; 393), + navigation_range: [428; 441), + node_range: [390; 446), kind: FN_DEF, detail: Some( "fn()", -- cgit v1.2.3