Fix parsing of parenthesized type args and RTN

This commit is contained in:
Lukas Wirth 2024-12-03 18:29:00 +01:00
parent edb432639b
commit 65c0b29720
44 changed files with 1022 additions and 700 deletions

View file

@ -39,10 +39,6 @@ mod ok {
#[test]
fn assoc_type_eq() { run_and_expect_no_errors("test_data/parser/inline/ok/assoc_type_eq.rs"); }
#[test]
fn associated_type_bounds() {
run_and_expect_no_errors("test_data/parser/inline/ok/associated_type_bounds.rs");
}
#[test]
fn async_trait_bound() {
run_and_expect_no_errors("test_data/parser/inline/ok/async_trait_bound.rs");
}
@ -59,12 +55,6 @@ mod ok {
);
}
#[test]
fn bare_dyn_types_with_paren_as_generic_args() {
run_and_expect_no_errors(
"test_data/parser/inline/ok/bare_dyn_types_with_paren_as_generic_args.rs",
);
}
#[test]
fn become_expr() { run_and_expect_no_errors("test_data/parser/inline/ok/become_expr.rs"); }
#[test]
fn bind_pat() { run_and_expect_no_errors("test_data/parser/inline/ok/bind_pat.rs"); }
@ -281,6 +271,10 @@ mod ok {
#[test]
fn generic_arg() { run_and_expect_no_errors("test_data/parser/inline/ok/generic_arg.rs"); }
#[test]
fn generic_arg_bounds() {
run_and_expect_no_errors("test_data/parser/inline/ok/generic_arg_bounds.rs");
}
#[test]
fn generic_param_attribute() {
run_and_expect_no_errors("test_data/parser/inline/ok/generic_param_attribute.rs");
}
@ -423,10 +417,6 @@ mod ok {
#[test]
fn param_list() { run_and_expect_no_errors("test_data/parser/inline/ok/param_list.rs"); }
#[test]
fn param_list_opt_patterns() {
run_and_expect_no_errors("test_data/parser/inline/ok/param_list_opt_patterns.rs");
}
#[test]
fn param_list_vararg() {
run_and_expect_no_errors("test_data/parser/inline/ok/param_list_vararg.rs");
}
@ -521,12 +511,6 @@ mod ok {
#[test]
fn return_expr() { run_and_expect_no_errors("test_data/parser/inline/ok/return_expr.rs"); }
#[test]
fn return_type_syntax_assoc_type_bound() {
run_and_expect_no_errors(
"test_data/parser/inline/ok/return_type_syntax_assoc_type_bound.rs",
);
}
#[test]
fn return_type_syntax_in_path() {
run_and_expect_no_errors("test_data/parser/inline/ok/return_type_syntax_in_path.rs");
}
@ -685,10 +669,6 @@ mod ok {
#[test]
fn use_tree_star() { run_and_expect_no_errors("test_data/parser/inline/ok/use_tree_star.rs"); }
#[test]
fn value_parameters_no_patterns() {
run_and_expect_no_errors("test_data/parser/inline/ok/value_parameters_no_patterns.rs");
}
#[test]
fn variant_discriminant() {
run_and_expect_no_errors("test_data/parser/inline/ok/variant_discriminant.rs");
}
@ -754,6 +734,10 @@ mod err {
run_and_expect_errors("test_data/parser/inline/err/generic_arg_list_recover.rs");
}
#[test]
fn generic_arg_list_recover_expr() {
run_and_expect_errors("test_data/parser/inline/err/generic_arg_list_recover_expr.rs");
}
#[test]
fn generic_param_list_recover() {
run_and_expect_errors("test_data/parser/inline/err/generic_param_list_recover.rs");
}