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

E0375 needs to be updated to new format #35635

Closed
sophiajt opened this issue Aug 13, 2016 · 0 comments · Fixed by #35686
Closed

E0375 needs to be updated to new format #35635

sophiajt opened this issue Aug 13, 2016 · 0 comments · Fixed by #35686

Comments

@sophiajt
Copy link
Contributor

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

E0375 needs a span_label, an updated title, and a note, changing it from:

error[E0375]: the trait `CoerceUnsized` may only be implemented for a coercion between structures with one field being coerced, but 2 fields need coercions: b (T to U), c (U to T)
  --> src/test/compile-fail/E0375.rs:20:1
   |
20 | impl<T, U> CoerceUnsized<Foo<U, T>> for Foo<T, U> {} //~ ERROR E0375
   | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^

To:

error[E0375]: implementing the trait `CoerceUnsized` requires multiple coercions
  --> src/test/compile-fail/E0375.rs:20:1
   |
20 | impl<T, U> CoerceUnsized<Foo<U, T>> for Foo<T, U> {} //~ ERROR E0375
   | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ requires multiple coercions
   |
   = note: `CoerceUnsized` may only be implemented for a coercion between structures with one field being coerced
   = note: currently, 2 fields need coercions: b (T to U), c (U to T)

Bonus: Underline CoerceUnsized<Foo<U, T>> (or, alternately Foo<T, U>)

error[E0375]: implementing the trait `CoerceUnsized` requires multiple coercions
  --> src/test/compile-fail/E0375.rs:20:1
   |
20 | impl<T, U> CoerceUnsized<Foo<U, T>> for Foo<T, U> {} //~ ERROR E0375
   |            ^^^^^^^^^^^^^^^^^^^^^^^^ requires multiple coercions
   |
   = note: `CoerceUnsized` may only be implemented for a coercion between structures with one field being coerced
   = note: currently, 2 fields need coercions: b (T to U), c (U to T)
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.

1 participant