-
Notifications
You must be signed in to change notification settings - Fork 13.3k
Improve diagnostic of E0119 with extern crate, try to print the conflicting impl. #45455
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
Conversation
(rust_highfive has picked a reviewer for you, use r? to override) |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Seems good to me! :)
| | ||
= note: conflicting implementation in crate `complex_impl_support`: | ||
- impl<'a, 'b, 'c, T, U, V, W> complex_impl_support::External for (T, complex_impl_support::M<'a, 'b, 'c, std::boxed::Box<U>, V, W>) | ||
where <U as std::ops::FnOnce<(T,)>>::Output == V, <V as std::iter::Iterator>::Item == T, 'b : 'a, T : 'a, U: std::ops::FnOnce<(T,)>, U : 'static, V: std::iter::Iterator, V: std::clone::Clone, W: std::ops::Add, <W as std::ops::Add>::Output: std::marker::Copy; |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
clearly we could do a better job on the formatting here, both for individual where clauses (which could be simplified) and for the listing itself (which could be spread across multiple lines or something. Still, not sure it's worth blocking this PR on that.
@bors r+ |
📌 Commit 9d05006 has been approved by |
…sakis Improve diagnostic of E0119 with extern crate, try to print the conflicting impl. Closes #27403. Closes #23563. Should improve #23980. The diagnostic now looks like: ``` error[E0119]: conflicting implementations of trait `std::convert::Into<_>` for type `GenX<_>`: --> $DIR/issue-27403.rs:15:1 | 15 | / impl<S> Into<S> for GenX<S> { 16 | | fn into(self) -> S { 17 | | self.inner 18 | | } 19 | | } | |_^ | = note: conflicting implementation in crate `core`: - impl<T, U> std::convert::Into<U> for T where U: std::convert::From<T>; error: aborting due to previous error ```
☀️ Test successful - status-appveyor, status-travis |
Closes #27403.
Closes #23563.
Should improve #23980.
The diagnostic now looks like: