Auto merge of #16461 - Veykril:expansion-info, r=Veykril

internal: Remove unnecessary usages of ExpansionInfo

And some follow up simplifications to https://github.com/rust-lang/rust-analyzer/pull/16439
This commit is contained in:
bors 2024-01-31 08:58:55 +00:00
commit 2661c272c9
7 changed files with 175 additions and 106 deletions

View file

@ -241,9 +241,8 @@ mod tests {
fn goto_def_in_included_file() {
check(
r#"
//- minicore:include
//- /main.rs
#[rustc_builtin_macro]
macro_rules! include {}
include!("a.rs");
@ -256,6 +255,35 @@ fn func_in_include() {
//^^^^^^^^^^^^^^^
}
fn foo() {
func_in_include$0();
}
"#,
);
}
#[test]
fn goto_def_in_included_file_nested() {
check(
r#"
//- minicore:include
//- /main.rs
macro_rules! passthrough {
($($tt:tt)*) => { $($tt)* }
}
passthrough!(include!("a.rs"));
fn main() {
foo();
}
//- /a.rs
fn func_in_include() {
//^^^^^^^^^^^^^^^
}
fn foo() {
func_in_include$0();
}