[syntax errors] Stabilize version-specific unsupported syntax errors (#18522)

This commit is contained in:
Dylan 2025-06-07 11:30:45 -05:00 committed by Brent Westbrook
parent 9f2ae1f568
commit bf53bc4256
4 changed files with 9 additions and 17 deletions

View file

@ -65,7 +65,7 @@ fn syntax_error() {
fn unsupported_syntax_error() {
check!(
"match 2:\n case 1: ...",
r#"{"preview": true, "target-version": "py39"}"#,
r#"{"target-version": "py39"}"#,
[ExpandedMessage {
code: None,
message: "SyntaxError: Cannot use `match` statement on Python 3.9 (syntax was added in Python 3.10)".to_string(),