mirror of
https://github.com/rust-lang/rust-analyzer.git
synced 2025-11-01 04:18:20 +00:00
Add basic edition inline parser test support
This commit is contained in:
parent
7a5bf92b89
commit
713c47f25b
8 changed files with 185 additions and 172 deletions
|
|
@ -1,5 +1,5 @@
|
|||
mod ok {
|
||||
use crate::tests::run_and_expect_no_errors;
|
||||
use crate::tests::*;
|
||||
#[test]
|
||||
fn anonymous_const() {
|
||||
run_and_expect_no_errors("test_data/parser/inline/ok/anonymous_const.rs");
|
||||
|
|
@ -267,6 +267,13 @@ mod ok {
|
|||
run_and_expect_no_errors("test_data/parser/inline/ok/function_where_clause.rs");
|
||||
}
|
||||
#[test]
|
||||
fn gen_blocks() {
|
||||
run_and_expect_no_errors_with_edition(
|
||||
"test_data/parser/inline/ok/gen_blocks.rs",
|
||||
crate::Edition::Edition2024,
|
||||
);
|
||||
}
|
||||
#[test]
|
||||
fn generic_arg() { run_and_expect_no_errors("test_data/parser/inline/ok/generic_arg.rs"); }
|
||||
#[test]
|
||||
fn generic_param_attribute() {
|
||||
|
|
@ -666,7 +673,7 @@ mod ok {
|
|||
fn yield_expr() { run_and_expect_no_errors("test_data/parser/inline/ok/yield_expr.rs"); }
|
||||
}
|
||||
mod err {
|
||||
use crate::tests::run_and_expect_errors;
|
||||
use crate::tests::*;
|
||||
#[test]
|
||||
fn angled_path_without_qual() {
|
||||
run_and_expect_errors("test_data/parser/inline/err/angled_path_without_qual.rs");
|
||||
|
|
@ -708,8 +715,6 @@ mod err {
|
|||
run_and_expect_errors("test_data/parser/inline/err/fn_pointer_type_missing_fn.rs");
|
||||
}
|
||||
#[test]
|
||||
fn gen_blocks() { run_and_expect_errors("test_data/parser/inline/err/gen_blocks.rs"); }
|
||||
#[test]
|
||||
fn gen_fn() { run_and_expect_errors("test_data/parser/inline/err/gen_fn.rs"); }
|
||||
#[test]
|
||||
fn generic_arg_list_recover() {
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue