mirror of
https://github.com/rust-lang/rust-analyzer.git
synced 2025-09-28 21:05:02 +00:00
fix: Fix reference completions being emitted in places other than argument lists
This commit is contained in:
parent
ad91622d11
commit
82ed68c95e
2 changed files with 16 additions and 5 deletions
|
@ -411,3 +411,15 @@ fn main() {
|
|||
expect!["ty: i32, name: ?"],
|
||||
);
|
||||
}
|
||||
|
||||
#[test]
|
||||
fn expected_type_ref_return_pos() {
|
||||
check_expected_type_and_name(
|
||||
r#"
|
||||
fn f(thing: u32) -> &u32 {
|
||||
&thin$0
|
||||
}
|
||||
"#,
|
||||
expect!["ty: u32, name: ?"],
|
||||
);
|
||||
}
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue