mirror of
https://github.com/rust-lang/rust-analyzer.git
synced 2025-10-01 22:31:43 +00:00
fix: Fix completions not always working in for-loop patterns
This commit is contained in:
parent
fbc1d2a514
commit
d5f8d91872
4 changed files with 63 additions and 17 deletions
|
@ -76,8 +76,14 @@ fn after_target_name_in_impl() {
|
|||
kw for
|
||||
"#]],
|
||||
);
|
||||
// FIXME: This should emit `kw where`
|
||||
check(r"impl Trait for Type $0", expect![[r#""#]]);
|
||||
// FIXME: This should not emit `kw for`
|
||||
check(
|
||||
r"impl Trait for Type $0",
|
||||
expect![[r#"
|
||||
kw where
|
||||
kw for
|
||||
"#]],
|
||||
);
|
||||
}
|
||||
|
||||
#[test]
|
||||
|
|
|
@ -92,6 +92,16 @@ fn quux() {
|
|||
"#,
|
||||
expect![[r#""#]],
|
||||
);
|
||||
check_empty(
|
||||
r#"
|
||||
fn foo() {
|
||||
for &$0 in () {}
|
||||
}
|
||||
"#,
|
||||
expect![[r#"
|
||||
kw mut
|
||||
"#]],
|
||||
);
|
||||
}
|
||||
|
||||
#[test]
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue