Change:
PR had removed the notes from the tests for the upstream/downstream printing logic, so now that logic is not tested: Plus, the new error messages are worse: an upstream impl can indeed be , even if the crate is private. I think that even in the OP case, some sort of note should be , unless we change coherence. Again, the test case: There, the error message is a coherence conflict for , where this impl conflicts with the libcore impl, because the compiler can't prove that . Now, the error message says that the reason that the compiler can't prove is because of a possible downstream impl. Of course, no downstream impl can exist as the trait is private, however, I don't think we want to change coherence to account for that, especially not without an RFC. Maybe a wording change is in order? I don't think the "upstream" message needs to change any (see the test diff), it's still good in the private case. Maybe it should try to mention a non-private trait, but that would be some work. Say, for non-exported trait, change the note to say: I'm not even sure the note is a problem, I personally like the state before the PR the best. cc
Actually, I think the version of the note I came up with is even more confusing than the "downstream crate" note, and the current version is worse than both.
That PR was also submitted with no "positive" test to see that it fixes the error message it is purported to fix. That feels clearly wrong to me.

Discussion:
} } <del> let access_levels = tcx.privacy_access_levels(impl_def_id.krate); if let Some(id) = tcx.hir().as_local_hir_id(impl_def_id) { if access_levels.is_exported(id) || access_levels.is_public(id) { for cause in &overlap.intercrate_ambiguity_causes { cause.add_intercrate_ambiguity_hint(&mut err); } } </del> <ins> for cause in &overlap.intercrate_ambiguity_causes { cause.add_intercrate_ambiguity_hint(&mut err); </ins> } if overlap.involves_placeholder {

| --------------------------------- first implementation here LL | impl Foo for i16 {} | ^^^^^^^^^^^^^^^^ conflicting implementation for `i16` <ins> | = note: upstream crates may add new impl of trait `coherence_lib::Remote` for type `i16` in future versions </ins> error: aborting due to previous error

... LL | impl MyTrait for lib::MyFundamentalStruct<(MyType,)> { } | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ conflicting implementation for `lib::MyFundamentalStruct<(MyType,)>` <ins> | = note: upstream crates may add new impl of trait `lib::MyCopy` for type `lib::MyFundamentalStruct<(MyType,)>` in future versions </ins> error: aborting due to previous error

... LL | impl MyTrait for lib::MyStruct<MyType> { } | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ conflicting implementation for `lib::MyStruct<MyType>` <ins> | = note: upstream crates may add new impl of trait `lib::MyCopy` for type `lib::MyStruct<MyType>` in future versions </ins> error: aborting due to previous error

... LL | impl MyTrait for (MyType,) { } | ^^^^^^^^^^^^^^^^^^^^^^^^^^ conflicting implementation for `(MyType,)` <ins> | = note: upstream crates may add new impl of trait `lib::MyCopy` for type `(MyType,)` in future versions </ins> error: aborting due to previous error

... LL | impl<T: Clone + ?Sized> Clone for Node<[T]> { | ------------------------------------------- first implementation here <ins> | = note: upstream crates may add new impl of trait `std::clone::Clone` for type `[_]` in future versions </ins> error: aborting due to previous error

LL | LL |   impl IntoPyDictPointer for () |   ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ conflicting implementation for `()` <ins> | = note: upstream crates may add new impl of trait `std::iter::Iterator` for type `()` in future versions </ins> error: aborting due to previous error