aboutsummaryrefslogtreecommitdiff
path: root/crates/ide_completion/src/completions/unqualified_path.rs
diff options
context:
space:
mode:
Diffstat (limited to 'crates/ide_completion/src/completions/unqualified_path.rs')
-rw-r--r--crates/ide_completion/src/completions/unqualified_path.rs147
1 files changed, 0 insertions, 147 deletions
diff --git a/crates/ide_completion/src/completions/unqualified_path.rs b/crates/ide_completion/src/completions/unqualified_path.rs
index 81c4fb305..380c1e079 100644
--- a/crates/ide_completion/src/completions/unqualified_path.rs
+++ b/crates/ide_completion/src/completions/unqualified_path.rs
@@ -113,78 +113,6 @@ mod tests {
113 } 113 }
114 114
115 #[test] 115 #[test]
116 fn dont_complete_values_in_type_pos() {
117 check(
118 r#"
119const FOO: () = ();
120static BAR: () = ();
121enum Foo {
122 Bar
123}
124struct Baz;
125fn foo() {
126 let local = ();
127 let _: $0;
128}
129"#,
130 expect![[r#"
131 en Foo
132 st Baz
133 "#]],
134 );
135 }
136
137 #[test]
138 fn bind_pat_and_path_ignore_at() {
139 check(
140 r#"
141enum Enum { A, B }
142fn quux(x: Option<Enum>) {
143 match x {
144 None => (),
145 Some(en$0 @ Enum::A) => (),
146 }
147}
148"#,
149 expect![[r#""#]],
150 );
151 }
152
153 #[test]
154 fn bind_pat_and_path_ignore_ref() {
155 check(
156 r#"
157enum Enum { A, B }
158fn quux(x: Option<Enum>) {
159 match x {
160 None => (),
161 Some(ref en$0) => (),
162 }
163}
164"#,
165 expect![[r#""#]],
166 );
167 }
168
169 #[test]
170 fn bind_pat_and_path() {
171 check(
172 r#"
173enum Enum { A, B }
174fn quux(x: Option<Enum>) {
175 match x {
176 None => (),
177 Some(En$0) => (),
178 }
179}
180"#,
181 expect![[r#"
182 en Enum
183 "#]],
184 );
185 }
186
187 #[test]
188 fn completes_bindings_from_let() { 116 fn completes_bindings_from_let() {
189 check( 117 check(
190 r#" 118 r#"
@@ -289,29 +217,6 @@ fn main() {
289 } 217 }
290 218
291 #[test] 219 #[test]
292 fn completes_generic_params_in_struct() {
293 check(
294 r#"struct S<T> { x: $0}"#,
295 expect![[r#"
296 sp Self
297 tp T
298 st S<…>
299 "#]],
300 );
301 }
302
303 #[test]
304 fn completes_self_in_enum() {
305 check(
306 r#"enum X { Y($0) }"#,
307 expect![[r#"
308 sp Self
309 en X
310 "#]],
311 );
312 }
313
314 #[test]
315 fn completes_module_items() { 220 fn completes_module_items() {
316 check( 221 check(
317 r#" 222 r#"
@@ -365,19 +270,6 @@ mod m {
365 } 270 }
366 271
367 #[test] 272 #[test]
368 fn completes_return_type() {
369 check(
370 r#"
371struct Foo;
372fn x() -> $0
373"#,
374 expect![[r#"
375 st Foo
376 "#]],
377 );
378 }
379
380 #[test]
381 fn dont_show_both_completions_for_shadowing() { 273 fn dont_show_both_completions_for_shadowing() {
382 check( 274 check(
383 r#" 275 r#"
@@ -559,19 +451,6 @@ fn foo() { $0 }
559 } 451 }
560 452
561 #[test] 453 #[test]
562 fn completes_macros_as_type() {
563 check(
564 r#"
565macro_rules! foo { () => {} }
566fn main() { let x: $0 }
567"#,
568 expect![[r#"
569 ma foo!(…) macro_rules! foo
570 "#]],
571 );
572 }
573
574 #[test]
575 fn completes_macros_as_stmt() { 454 fn completes_macros_as_stmt() {
576 check( 455 check(
577 r#" 456 r#"
@@ -716,30 +595,4 @@ fn f() {}
716 expect![[""]], 595 expect![[""]],
717 ) 596 )
718 } 597 }
719
720 #[test]
721 fn completes_types_and_const_in_arg_list() {
722 check(
723 r#"
724enum Bar {
725 Baz
726}
727trait Foo {
728 type Bar;
729}
730
731const CONST: () = ();
732
733fn foo<T: Foo<$0>, const CONST_PARAM: usize>(_: T) {}
734"#,
735 expect![[r#"
736 ta Bar = type Bar;
737 tp T
738 cp CONST_PARAM
739 tt Foo
740 en Bar
741 ct CONST
742 "#]],
743 );
744 }
745} 598}