Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

E0409 needs to be updated to new format #35699

Closed
sophiajt opened this issue Aug 15, 2016 · 2 comments · Fixed by #35726
Closed

E0409 needs to be updated to new format #35699

sophiajt opened this issue Aug 15, 2016 · 2 comments · Fixed by #35726

Comments

@sophiajt
Copy link
Contributor

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
@mikhail-m1
Copy link
Contributor

mikhail-m1 commented Aug 16, 2016

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?

@sophiajt
Copy link
Contributor Author

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

sophiajt pushed a commit to sophiajt/rust that referenced this issue Aug 17, 2016
sophiajt pushed a commit to sophiajt/rust that referenced this issue Aug 17, 2016
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging a pull request may close this issue.

2 participants