-
Notifications
You must be signed in to change notification settings - Fork 12.7k
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
Coherence hint wrong for a blanked implementation bounded by a private trait #62194
Comments
I'd like to work on this if that's ok? :) @rustbot claim |
Check that trait is exported or public before adding hint Closes rust-lang#62194. This PR checks the `AccessLevels` of a trait to check whether adding the intercrate ambiguity hint is valid or not. I am unsure of both the use of `.unwrap()` as well as removing hints for [downstream *and* [upstream](https://github.com/rust-lang/rust/blob/92b0f52584c9375505ecdefdd7855b93a5919d51/src/librustc/traits/select.rs#L112-L142).
reopening because of #63145 - we need to come up with a fix to this issue that actually makes things clearer. |
Hi! I'd like to work on this. |
I don't know when this was fixed, but I see the following output on the playground (1.58) https://play.rust-lang.org/?version=stable&mode=debug&edition=2021&gist=f0b6bc2bf8ccf0f3eb3f563f8b3287a1 : trait Private {
}
unsafe impl<T: Private> Send for T {
}
I think this can be closed |
Given code like this:
the diagnostic will read as such:
the last note here is incorrect because the only thing that can implement this trait is the crate which declared the private
Private
trait.The text was updated successfully, but these errors were encountered: