Parse generic consts

A lang team experiment, https://github.com/rust-lang/rust/issues/113521.
This commit is contained in:
Chayim Refael Friedman 2025-04-21 02:11:56 +03:00
parent 2f2cff19f8
commit 812a035689
12 changed files with 305 additions and 3 deletions

View file

@ -139,6 +139,10 @@ mod ok {
run_and_expect_no_errors("test_data/parser/inline/ok/const_trait_bound.rs");
}
#[test]
fn const_where_clause() {
run_and_expect_no_errors("test_data/parser/inline/ok/const_where_clause.rs");
}
#[test]
fn continue_expr() { run_and_expect_no_errors("test_data/parser/inline/ok/continue_expr.rs"); }
#[test]
fn crate_path() { run_and_expect_no_errors("test_data/parser/inline/ok/crate_path.rs"); }
@ -278,6 +282,8 @@ mod ok {
run_and_expect_no_errors("test_data/parser/inline/ok/generic_arg_bounds.rs");
}
#[test]
fn generic_const() { run_and_expect_no_errors("test_data/parser/inline/ok/generic_const.rs"); }
#[test]
fn generic_param_attribute() {
run_and_expect_no_errors("test_data/parser/inline/ok/generic_param_attribute.rs");
}
@ -764,6 +770,8 @@ mod err {
run_and_expect_errors("test_data/parser/inline/err/generic_param_list_recover.rs");
}
#[test]
fn generic_static() { run_and_expect_errors("test_data/parser/inline/err/generic_static.rs"); }
#[test]
fn impl_type() { run_and_expect_errors("test_data/parser/inline/err/impl_type.rs"); }
#[test]
fn let_else_right_curly_brace() {
@ -836,6 +844,10 @@ mod err {
run_and_expect_errors("test_data/parser/inline/err/recover_from_missing_const_default.rs");
}
#[test]
fn static_where_clause() {
run_and_expect_errors("test_data/parser/inline/err/static_where_clause.rs");
}
#[test]
fn struct_field_recover() {
run_and_expect_errors("test_data/parser/inline/err/struct_field_recover.rs");
}