feat: Implement default-field-values

This commit is contained in:
Shoyu Vanilla 2025-01-23 00:27:31 +09:00
parent 35b55fd67f
commit 7de0b2e75a
33 changed files with 647 additions and 31 deletions

View file

@ -482,6 +482,10 @@ mod ok {
run_and_expect_no_errors("test_data/parser/inline/ok/record_field_attrs.rs");
}
#[test]
fn record_field_default_values() {
run_and_expect_no_errors("test_data/parser/inline/ok/record_field_default_values.rs");
}
#[test]
fn record_field_list() {
run_and_expect_no_errors("test_data/parser/inline/ok/record_field_list.rs");
}
@ -544,6 +548,10 @@ mod ok {
run_and_expect_no_errors("test_data/parser/inline/ok/stmt_postfix_expr_ambiguity.rs");
}
#[test]
fn struct_initializer_with_defaults() {
run_and_expect_no_errors("test_data/parser/inline/ok/struct_initializer_with_defaults.rs");
}
#[test]
fn struct_item() { run_and_expect_no_errors("test_data/parser/inline/ok/struct_item.rs"); }
#[test]
fn trait_alias() { run_and_expect_no_errors("test_data/parser/inline/ok/trait_alias.rs"); }
@ -719,6 +727,10 @@ mod err {
);
}
#[test]
fn comma_after_default_values_syntax() {
run_and_expect_errors("test_data/parser/inline/err/comma_after_default_values_syntax.rs");
}
#[test]
fn crate_visibility_empty_recover() {
run_and_expect_errors("test_data/parser/inline/err/crate_visibility_empty_recover.rs");
}