test for different number of fields

This commit is contained in:
Jeroen Vannevel 2022-01-10 18:54:59 +00:00
parent 5675e0cd40
commit 2329b42407
No known key found for this signature in database
GPG Key ID: 78EF5F52F38C49BD

View File

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