internal: unified missing fields diagnostic

This commit is contained in:
Aleksey Kladov 2021-06-13 15:48:54 +03:00
parent c6509a4592
commit 6383252cc2
5 changed files with 95 additions and 143 deletions

View file

@ -1055,20 +1055,6 @@ fn main() {
));
}
#[test]
fn missing_record_pat_field_diagnostic() {
check_diagnostics(
r#"
struct S { foo: i32, bar: () }
fn baz(s: S) {
let S { foo: _ } = s;
//^ Missing structure fields:
//| - bar
}
"#,
);
}
#[test]
fn missing_record_pat_field_no_diagnostic_if_not_exhaustive() {
check_diagnostics(