diff options
Diffstat (limited to 'crates/ide_completion/src/completions/unqualified_path.rs')
-rw-r--r-- | crates/ide_completion/src/completions/unqualified_path.rs | 22 |
1 files changed, 22 insertions, 0 deletions
diff --git a/crates/ide_completion/src/completions/unqualified_path.rs b/crates/ide_completion/src/completions/unqualified_path.rs index f370dbdf0..2105bb428 100644 --- a/crates/ide_completion/src/completions/unqualified_path.rs +++ b/crates/ide_completion/src/completions/unqualified_path.rs | |||
@@ -69,6 +69,28 @@ mod tests { | |||
69 | } | 69 | } |
70 | 70 | ||
71 | #[test] | 71 | #[test] |
72 | fn dont_complete_values_in_type_pos() { | ||
73 | check( | ||
74 | r#" | ||
75 | const FOO: () = (); | ||
76 | static BAR: () = (); | ||
77 | enum Foo { | ||
78 | Bar | ||
79 | } | ||
80 | struct Baz; | ||
81 | fn foo() { | ||
82 | let local = (); | ||
83 | let _: $0; | ||
84 | } | ||
85 | "#, | ||
86 | expect![[r#" | ||
87 | en Foo | ||
88 | st Baz | ||
89 | "#]], | ||
90 | ); | ||
91 | } | ||
92 | |||
93 | #[test] | ||
72 | fn only_completes_modules_in_import() { | 94 | fn only_completes_modules_in_import() { |
73 | cov_mark::check!(only_completes_modules_in_import); | 95 | cov_mark::check!(only_completes_modules_in_import); |
74 | check( | 96 | check( |