Skip to content

E0409 needs to be updated to new format #35699

Closed

Description

@sophiajt

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

E0409 needs a span_label, updating it from:

error[E0409]: variable `y` is bound with different mode in pattern #2 than in pattern #1
  --> src/test/compile-fail/E0409.rs:15:23
   |
15 |         (0, ref y) | (y, 0) => {} //~ ERROR E0409
   |                       ^

To:

error[E0409]: variable `y` is bound with different mode in pattern #2 than in pattern #1
  --> src/test/compile-fail/E0409.rs:15:23
   |
15 |         (0, ref y) | (y, 0) => {} //~ ERROR E0409
   |                       ^ bound in different ways

Bonus: add the span_label for the previous binding:

error[E0409]: variable `y` is bound with different mode in pattern #2 than in pattern #1
  --> src/test/compile-fail/E0409.rs:15:23
   |
15 |         (0, ref y) | (y, 0) => {} //~ ERROR E0409
   |             -----     ^ bound in different ways
   |             |
   |             first binding

Activity

  1. mikhail-m1 commented on Aug 16, 2016

    @mikhail-m1
    Contributor

    I've managed to solve bonus like this:

      --> src/test/compile-fail/E0409.rs:15:23
    15 |         (0, ref y) | (y, 0) => {} //~ ERROR E0409
       |                 -     ^ bound in different ways
       |                 |
       |                 first binding
    

    Is it OK?

  2. sophiajt commented on Aug 16, 2016

    @sophiajt
    ContributorAuthor

    Yes, underlining the name of the binding works just fine.

      --> src/test/compile-fail/E0409.rs:15:23`
       |
    15 |         (0, ref y) | (y, 0) => {} //~ ERROR E0409
       |                 -     ^ bound in different ways
       |                 |
       |                 first binding
    
  3. added 2 commits that reference this issue on Aug 17, 2016
    df55192
    fbc62af
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions