mirror of
https://github.com/rust-lang/rust-analyzer.git
synced 2025-10-01 06:11:35 +00:00
Correct has_ref detection
This commit is contained in:
parent
638cc3e59f
commit
3a57f700d8
2 changed files with 31 additions and 1 deletions
|
@ -1156,6 +1156,22 @@ fn main() {
|
|||
fn foo(…) []
|
||||
"#]],
|
||||
);
|
||||
check_relevance(
|
||||
r#"
|
||||
struct S;
|
||||
fn foo(s: &mut S) {}
|
||||
fn main() {
|
||||
let mut ssss = S;
|
||||
foo(&mut s$0);
|
||||
}
|
||||
"#,
|
||||
expect![[r#"
|
||||
lc ssss [type+local]
|
||||
st S []
|
||||
fn main() []
|
||||
fn foo(…) []
|
||||
"#]],
|
||||
);
|
||||
}
|
||||
|
||||
#[test]
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue