mirror of
https://github.com/rust-lang/rust-analyzer.git
synced 2025-09-28 12:54:58 +00:00
Resolve TupleStructPat in SourceAnalyzer::resolve_path
This commit is contained in:
parent
36465b34b3
commit
a195711df0
2 changed files with 34 additions and 6 deletions
|
@ -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
|
||||
"#]],
|
||||
);
|
||||
}
|
||||
}
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue