mirror of
https://github.com/rust-lang/rust-analyzer.git
synced 2025-10-03 15:15:24 +00:00
fix: variants rendering in pattern path
This commit is contained in:
parent
ec78b6b08a
commit
622b516c74
9 changed files with 83 additions and 73 deletions
|
@ -165,30 +165,15 @@ fn enum_plain_qualified_use_tree() {
|
|||
r#"
|
||||
use Foo::$0
|
||||
|
||||
enum Foo { Variant }
|
||||
impl Foo {
|
||||
const CONST: () = ()
|
||||
fn func() {}
|
||||
}
|
||||
"#,
|
||||
expect![[r#"
|
||||
ev Variant Variant
|
||||
"#]],
|
||||
);
|
||||
}
|
||||
|
||||
#[test]
|
||||
fn enum_no_parens_in_qualified_use_tree() {
|
||||
cov_mark::check!(enum_plain_qualified_use_tree);
|
||||
check(
|
||||
r#"
|
||||
use Foo::$0
|
||||
|
||||
enum Foo {
|
||||
UnitVariant,
|
||||
TupleVariant(),
|
||||
RecordVariant {},
|
||||
}
|
||||
impl Foo {
|
||||
const CONST: () = ()
|
||||
fn func() {}
|
||||
}
|
||||
"#,
|
||||
expect![[r#"
|
||||
ev RecordVariant RecordVariant
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue