mirror of
https://github.com/rust-lang/rust-analyzer.git
synced 2025-10-01 11:31:15 +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(),
|
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…
x
Reference in New Issue
Block a user