Parse try as a keyword only in edition 2018 and up

This commit is contained in:
Lukas Wirth 2024-07-19 15:26:50 +02:00
parent 713c47f25b
commit d235d09bf9
8 changed files with 24 additions and 42 deletions

View file

@ -559,11 +559,17 @@ mod ok {
fn try_expr() { run_and_expect_no_errors("test_data/parser/inline/ok/try_expr.rs"); }
#[test]
fn try_macro_fallback() {
run_and_expect_no_errors("test_data/parser/inline/ok/try_macro_fallback.rs");
run_and_expect_no_errors_with_edition(
"test_data/parser/inline/ok/try_macro_fallback.rs",
crate::Edition::Edition2015,
);
}
#[test]
fn try_macro_rules() {
run_and_expect_no_errors("test_data/parser/inline/ok/try_macro_rules.rs");
run_and_expect_no_errors_with_edition(
"test_data/parser/inline/ok/try_macro_rules.rs",
crate::Edition::Edition2015,
);
}
#[test]
fn tuple_attrs() { run_and_expect_no_errors("test_data/parser/inline/ok/tuple_attrs.rs"); }