mirror of
https://github.com/rust-lang/rust.git
synced 2024-12-04 20:54:13 +00:00
test for different number of fields
This commit is contained in:
parent
5675e0cd40
commit
2329b42407
@ -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 New Issue
Block a user