mirror of
https://github.com/rust-lang/rust-analyzer.git
synced 2025-09-27 12:29:21 +00:00
Compute closure captures
This commit is contained in:
parent
51d5862caf
commit
59b6f2d9f2
42 changed files with 2537 additions and 433 deletions
|
@ -1227,6 +1227,24 @@ fn main() {
|
|||
)
|
||||
}
|
||||
|
||||
#[test]
|
||||
fn call_info_for_fn_def_over_reference() {
|
||||
check(
|
||||
r#"
|
||||
struct S;
|
||||
fn foo(s: S) -> i32 { 92 }
|
||||
fn main() {
|
||||
let bar = &&&&&foo;
|
||||
bar($0);
|
||||
}
|
||||
"#,
|
||||
expect![[r#"
|
||||
fn foo(s: S) -> i32
|
||||
^^^^
|
||||
"#]],
|
||||
)
|
||||
}
|
||||
|
||||
#[test]
|
||||
fn call_info_for_fn_ptr() {
|
||||
check(
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue