Test for name resolution with DefMap shortcut

This commit is contained in:
Jonas Schievink 2021-02-02 15:55:33 +01:00
parent da57f5dc17
commit 63744fe128

View File

@ -185,3 +185,36 @@ pub mod mark {
"#]],
);
}
#[test]
fn macro_resolve_legacy() {
check_at(
r#"
//- /lib.rs
mod module;
//- /module.rs
macro_rules! m {
() => {
struct Def {}
};
}
fn f() {
{
m!();
$0
}
}
"#,
expect![[r#"
block scope
Def: t
crate
module: t
crate::module
f: v
"#]],
)
}