Unnamed repository; edit this file 'description' to name the repository.
Diffstat (limited to 'crates/ide-completion/src/tests/item.rs')
-rw-r--r--crates/ide-completion/src/tests/item.rs32
1 files changed, 30 insertions, 2 deletions
diff --git a/crates/ide-completion/src/tests/item.rs b/crates/ide-completion/src/tests/item.rs
index 61a9da8c27..2f032c3f4c 100644
--- a/crates/ide-completion/src/tests/item.rs
+++ b/crates/ide-completion/src/tests/item.rs
@@ -116,8 +116,23 @@ fn completes_where() {
check_with_base_items(
r"fn func() $0",
expect![[r#"
- kw where
- "#]],
+ en Enum (adds ->) Enum
+ ma makro!(…) macro_rules! makro
+ md module (adds ->)
+ st Record (adds ->) Record
+ st Tuple (adds ->) Tuple
+ st Unit (adds ->) Unit
+ tt Trait (adds ->)
+ un Union (adds ->) Union
+ bt u32 (adds ->) u32
+ kw crate:: (adds ->)
+ kw dyn (adds ->)
+ kw fn (adds ->)
+ kw for (adds ->)
+ kw impl (adds ->)
+ kw self:: (adds ->)
+ kw where
+ "#]],
);
check_with_base_items(
r"enum Enum $0",
@@ -244,6 +259,19 @@ impl Copy for S where $0
}
#[test]
+fn fn_item_where_kw() {
+ check_edit(
+ "where",
+ r#"
+fn foo() $0
+"#,
+ r#"
+fn foo() where $0
+"#,
+ );
+}
+
+#[test]
fn test_is_not_considered_macro() {
check_with_base_items(
r#"