Unnamed repository; edit this file 'description' to name the repository.
Diffstat (limited to 'crates/ide-completion/src/tests/pattern.rs')
| -rw-r--r-- | crates/ide-completion/src/tests/pattern.rs | 32 |
1 files changed, 28 insertions, 4 deletions
diff --git a/crates/ide-completion/src/tests/pattern.rs b/crates/ide-completion/src/tests/pattern.rs index b8728028bb..0d85f2e9ad 100644 --- a/crates/ide-completion/src/tests/pattern.rs +++ b/crates/ide-completion/src/tests/pattern.rs @@ -122,7 +122,6 @@ fn foo() { st Record st Tuple st Unit - ev TupleV bn Record {…} Record { field$1 }$0 bn Tuple(…) Tuple($1)$0 bn TupleV(…) TupleV($1)$0 @@ -159,8 +158,6 @@ fn foo(foo: Foo) { match foo { Foo { x: $0 } } } expect![[r#" en Bar st Foo - ev Nil - ev Value bn Foo {…} Foo { x$1 }$0 bn Nil Nil$0 bn Value Value$0 @@ -189,7 +186,6 @@ fn foo() { st Record st Tuple st Unit - ev Variant bn Record {…} Record { field$1 }$0 bn Tuple(…) Tuple($1)$0 bn Variant Variant$0 @@ -355,6 +351,34 @@ fn func() { } #[test] +fn enum_unqualified() { + check_with_base_items( + r#" +use Enum::*; +fn func() { + if let $0 = unknown {} +} +"#, + expect![[r#" + ct CONST + en Enum + ma makro!(…) macro_rules! makro + md module + st Record + st Tuple + st Unit + bn Record {…} Record { field$1 }$0 + bn RecordV {…} RecordV { field$1 }$0 + bn Tuple(…) Tuple($1)$0 + bn TupleV(…) TupleV($1)$0 + bn UnitV UnitV$0 + kw mut + kw ref + "#]], + ); +} + +#[test] fn completes_in_record_field_pat() { check( r#" |