mirror of
https://github.com/rust-lang/rust-analyzer
synced 2024-11-15 01:17:27 +00:00
test for different number of fields
This commit is contained in:
parent
5675e0cd40
commit
2329b42407
1 changed files with 15 additions and 0 deletions
|
@ -383,6 +383,21 @@ fn func(e: MyEnum) {
|
|||
MyEnum::OptionC(x) => x.classify(),
|
||||
};
|
||||
}
|
||||
"#,
|
||||
);
|
||||
}
|
||||
|
||||
#[test]
|
||||
fn merge_match_arms_same_type_different_number_of_fields() {
|
||||
check_assist_not_applicable(
|
||||
merge_match_arms,
|
||||
r#"//- minicore: result
|
||||
fn func() {
|
||||
match Result::<(f64, f64), (f64)>::Ok((0f64, 0f64)) {
|
||||
Ok(x) => $0x.1.classify(),
|
||||
Err(x) => x.1.classify()
|
||||
};
|
||||
}
|
||||
"#,
|
||||
);
|
||||
}
|
||||
|
|
Loading…
Reference in a new issue