Skip to content

Improve error message on a conflicting explicit impl #337

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

Merged
merged 2 commits into from
Oct 4, 2020
Merged

Conversation

dtolnay
Copy link
Owner

@dtolnay dtolnay commented Oct 4, 2020

Before:

error[E0119]: conflicting implementations of trait `cxx::private::UniquePtrTarget` for type `here::C`:
  --> $DIR/unique_ptr_twice.rs:10:1
   |
1  | #[cxx::bridge]
   | -------------- first implementation here
...
10 | #[cxx::bridge]
   | ^^^^^^^^^^^^^^ conflicting implementation for `here::C`
   |
   = note: this error originates in an attribute macro (in Nightly builds, run with -Z macro-backtrace for more info)

After:

error[E0119]: conflicting implementations of trait `cxx::private::UniquePtrTarget` for type `here::C`:
  --> $DIR/unique_ptr_twice.rs:16:5
   |
7  |     impl UniquePtr<C> {}
   |     ----------------- first implementation here
...
16 |     impl UniquePtr<C> {}
   |     ^^^^^^^^^^^^^^^^^ conflicting implementation for `here::C`

Cleanup of #336.

@dtolnay dtolnay merged commit debd9d5 into master Oct 4, 2020
@dtolnay dtolnay deleted the impl branch October 4, 2020 07:48
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 this pull request may close these issues.

1 participant