aboutsummaryrefslogtreecommitdiff
path: root/crates/ide
diff options
context:
space:
mode:
Diffstat (limited to 'crates/ide')
-rw-r--r--crates/ide/src/references.rs25
1 files changed, 25 insertions, 0 deletions
diff --git a/crates/ide/src/references.rs b/crates/ide/src/references.rs
index 55f95ebae..5d0449e56 100644
--- a/crates/ide/src/references.rs
+++ b/crates/ide/src/references.rs
@@ -1224,4 +1224,29 @@ fn test() {}
1224 "#]], 1224 "#]],
1225 ); 1225 );
1226 } 1226 }
1227
1228 #[test]
1229 fn test_const_in_pattern() {
1230 check(
1231 r#"
1232const A$0: i32 = 42;
1233
1234fn main() {
1235 match A {
1236 A => (),
1237 _ => (),
1238 }
1239 if let A = A {}
1240}
1241"#,
1242 expect![[r#"
1243 A Const FileId(0) 0..18 6..7
1244
1245 FileId(0) 42..43
1246 FileId(0) 54..55
1247 FileId(0) 97..98
1248 FileId(0) 101..102
1249 "#]],
1250 );
1251 }
1227} 1252}