Skip to content

Commit ebf0fa8

Browse files
committed
Fix broken test annotations for tests/source/issue-6202/long_pat.rs
1. The test annotations have the wrong syntax. 2. The test is missing a Rust language Edition (>= 2024) for if-let chains. Detected in a subtree sync attempt.
1 parent d5012d8 commit ebf0fa8

File tree

2 files changed

+9
-7
lines changed

2 files changed

+9
-7
lines changed
Lines changed: 5 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,7 @@
1-
// max_width = 120
2-
// error_on_line_overflow = true
3-
// style_edition = "2027"
1+
// rustfmt-max_width: 120
2+
// rustfmt-error_on_line_overflow: true
3+
// rustfmt-style_edition: 2027
4+
// rustfmt-edition: 2024
45

56
impl EarlyLintPass for NeedlessContinue {
67
fn check_expr(&mut self, cx: &EarlyContext<'_>, expr: &Expr) {
@@ -11,4 +12,4 @@ impl EarlyLintPass for NeedlessContinue {
1112
check_final_block_stmt(cx, body, label, expr.span.ctxt());
1213
}
1314
}
14-
}
15+
}

tests/target/issue-6202/long_pat.rs

Lines changed: 4 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,7 @@
1-
// max_width = 120
2-
// error_on_line_overflow = true
3-
// style_edition = "2027"
1+
// rustfmt-max_width: 120
2+
// rustfmt-error_on_line_overflow: true
3+
// rustfmt-style_edition: 2027
4+
// rustfmt-edition: 2024
45

56
impl EarlyLintPass for NeedlessContinue {
67
fn check_expr(&mut self, cx: &EarlyContext<'_>, expr: &Expr) {

0 commit comments

Comments
 (0)