Correct has_ref detection

This commit is contained in:
Wang Ruochen 2022-01-06 11:45:09 -08:00
parent 638cc3e59f
commit 3a57f700d8
No known key found for this signature in database
GPG key ID: C6DEA570A3B026FC
2 changed files with 31 additions and 1 deletions

View file

@ -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]