Resolve TupleStructPat in SourceAnalyzer::resolve_path

This commit is contained in:
Lukas Wirth 2021-02-10 09:29:10 +01:00
parent 36465b34b3
commit a195711df0
2 changed files with 34 additions and 6 deletions

View file

@ -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
"#]],
);
}
}