Unnamed repository; edit this file 'description' to name the repository.
-rw-r--r--crates/ide_completion/src/tests/pattern.rs22
1 files changed, 22 insertions, 0 deletions
diff --git a/crates/ide_completion/src/tests/pattern.rs b/crates/ide_completion/src/tests/pattern.rs
index 50d5e01979..c1c73aaf61 100644
--- a/crates/ide_completion/src/tests/pattern.rs
+++ b/crates/ide_completion/src/tests/pattern.rs
@@ -444,3 +444,25 @@ fn foo() {
expect![[r#""#]],
);
}
+
+#[test]
+fn completes_associated_const() {
+ check_empty(
+ r#"
+#[derive(PartialEq, Eq)]
+struct Ty(u8);
+
+impl Ty {
+ const ABC: Self = Self(0);
+}
+
+fn f(t: Ty) {
+ match t {
+ Ty::$0 => {}
+ _ => {}
+ }
+}
+"#,
+ expect![[""]],
+ )
+}