From a195711df068a58069236c2f8d99211f6f231987 Mon Sep 17 00:00:00 2001 From: Lukas Wirth Date: Wed, 10 Feb 2021 09:29:10 +0100 Subject: Resolve TupleStructPat in SourceAnalyzer::resolve_path --- crates/ide/src/references.rs | 23 +++++++++++++++++++++++ 1 file changed, 23 insertions(+) (limited to 'crates/ide/src') 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 { "#]], ); } + + #[test] + fn test_self_variant_with_payload() { + check( + r#" +enum Foo { Bar() } + +impl Foo { + fn foo(self) { + match self { + Self::Bar$0() => (), + } + } +} + +"#, + expect![[r#" + Bar Variant FileId(0) 11..16 11..14 Other + + FileId(0) 89..92 Other + "#]], + ); + } } -- cgit v1.2.3