mirror of
https://github.com/rust-lang/rust-analyzer.git
synced 2025-09-27 04:19:13 +00:00
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:
commit
2661c272c9
7 changed files with 175 additions and 106 deletions
|
@ -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();
|
||||
}
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue