diff --git a/crates/oxc_linter/src/fixer.rs b/crates/oxc_linter/src/fixer.rs index 8f198e907222a..9ce5373eab0c7 100644 --- a/crates/oxc_linter/src/fixer.rs +++ b/crates/oxc_linter/src/fixer.rs @@ -291,7 +291,7 @@ mod test { } fn remove_middle(span: Span) -> OxcDiagnostic { - OxcDiagnostic::warn("removemiddle").with_labels([span]) + OxcDiagnostic::warn("removemiddle").with_label(span) } fn remove_end() -> OxcDiagnostic { @@ -303,15 +303,15 @@ mod test { } fn no_fix(span: Span) -> OxcDiagnostic { - OxcDiagnostic::warn("nofix").with_labels([span]) + OxcDiagnostic::warn("nofix").with_label(span) } fn no_fix_1(span: Span) -> OxcDiagnostic { - OxcDiagnostic::warn("nofix1").with_labels([span]) + OxcDiagnostic::warn("nofix1").with_label(span) } fn no_fix_2(span: Span) -> OxcDiagnostic { - OxcDiagnostic::warn("nofix2").with_labels([span]) + OxcDiagnostic::warn("nofix2").with_label(span) } const TEST_CODE: &str = "var answer = 6 * 7;";