aboutsummaryrefslogtreecommitdiff
path: root/crates
diff options
context:
space:
mode:
Diffstat (limited to 'crates')
-rw-r--r--crates/hir_def/src/body/tests/block.rs33
1 files changed, 33 insertions, 0 deletions
diff --git a/crates/hir_def/src/body/tests/block.rs b/crates/hir_def/src/body/tests/block.rs
index 6b1ed2555..d5f3ac4c5 100644
--- a/crates/hir_def/src/body/tests/block.rs
+++ b/crates/hir_def/src/body/tests/block.rs
@@ -185,3 +185,36 @@ pub mod mark {
185 "#]], 185 "#]],
186 ); 186 );
187} 187}
188
189#[test]
190fn macro_resolve_legacy() {
191 check_at(
192 r#"
193//- /lib.rs
194mod module;
195
196//- /module.rs
197macro_rules! m {
198 () => {
199 struct Def {}
200 };
201}
202
203fn f() {
204 {
205 m!();
206 $0
207 }
208}
209 "#,
210 expect![[r#"
211 block scope
212 Def: t
213 crate
214 module: t
215
216 crate::module
217 f: v
218 "#]],
219 )
220}