Skip to content

E0297 needs to be updated to new format #35521

Closed
@sophiajt

Description

@sophiajt

From: src/test/compile-fail/E0297.rs

E0297 needs a span_label, updating it from:

error[E0297]: refutable pattern in `for` loop binding: `None` not covered
  --> src/test/compile-fail/E0297.rs:14:5
   |
14 |     for Some(x) in xs {} //~ ERROR E0297
   |     ^^^^^^^^^^^^^^^^^^^^

To:

error[E0297]: refutable pattern in `for` loop binding: `None` not covered
  --> src/test/compile-fail/E0297.rs:14:5
   |
14 |     for Some(x) in xs {} //~ ERROR E0297
   |     ^^^^^^^^^^^^^^^^^^^^ pattern `None` not covered

Bonus: narrow the span to focus on the "for <pattern>" piece:

error[E0297]: refutable pattern in `for` loop binding: `None` not covered
  --> src/test/compile-fail/E0297.rs:14:5
   |
14 |     for Some(x) in xs {} //~ ERROR E0297
   |     ^^^^^^^^^^^ pattern `None` not covered

Metadata

Metadata

Assignees

No one assigned

    Labels

    A-diagnosticsArea: Messages for errors, warnings, and lints

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions