aboutsummaryrefslogtreecommitdiff
path: root/crates/ide/src/references.rs
diff options
context:
space:
mode:
authorLukas Wirth <[email protected]>2021-02-10 08:29:10 +0000
committerLukas Wirth <[email protected]>2021-02-10 08:37:22 +0000
commita195711df068a58069236c2f8d99211f6f231987 (patch)
tree289f52f343cbe0dfb99b1b6ad282c98c0000e26e /crates/ide/src/references.rs
parent36465b34b3b7f991ebf85680924acdb809b0494e (diff)
Resolve TupleStructPat in SourceAnalyzer::resolve_path
Diffstat (limited to 'crates/ide/src/references.rs')
-rw-r--r--crates/ide/src/references.rs23
1 files changed, 23 insertions, 0 deletions
diff --git a/crates/ide/src/references.rs b/crates/ide/src/references.rs
index 40d9487eb..6999dacee 100644
--- a/crates/ide/src/references.rs
+++ b/crates/ide/src/references.rs
@@ -1114,4 +1114,27 @@ trait Foo {
1114 "#]], 1114 "#]],
1115 ); 1115 );
1116 } 1116 }
1117
1118 #[test]
1119 fn test_self_variant_with_payload() {
1120 check(
1121 r#"
1122enum Foo { Bar() }
1123
1124impl Foo {
1125 fn foo(self) {
1126 match self {
1127 Self::Bar$0() => (),
1128 }
1129 }
1130}
1131
1132"#,
1133 expect![[r#"
1134 Bar Variant FileId(0) 11..16 11..14 Other
1135
1136 FileId(0) 89..92 Other
1137 "#]],
1138 );
1139 }
1117} 1140}