Store invocation site for eager macros

This commit is contained in:
Jonas Schievink 2020-12-22 14:42:28 +01:00
parent b98ee075ee
commit 26f604b907
5 changed files with 52 additions and 28 deletions

View file

@ -749,6 +749,31 @@ fn test() {
);
}
#[test]
fn goto_through_included_file() {
check(
r#"
//- /main.rs
#[rustc_builtin_macro]
macro_rules! include {}
include!("foo.rs");
//^^^^^^^^^^^^^^^^^^^
fn f() {
foo<|>();
}
mod confuse_index {
pub fn foo() {}
}
//- /foo.rs
fn foo() {}
"#,
);
}
#[test]
fn goto_for_type_param() {
check(