incompatible types when using re-exports of the same crate from different crates (different paths) #105277
Labels
C-bug
Category: This is a bug.
needs-triage-legacy
Old issue that were never triaged. Remove this label once the issue has been sufficiently triaged.
I tried this code:
I expected to see this happen: No error
Instead, this happened:
sickle_query::types::time
andtiberius::time
are re-exports of thetime
crate. For multiple reasons, these may be different versions with different features and are not be assumed to be the same. However, it seems that rustc is detecting that they are the same crate, and then "forgets" the path or assumes the wrong path on line 53. But though the path is explicitly given on both the left and right hand sides of the assignment, so there is no ambiguity.Confirmed this for nightly with
cargo +nightly build --workspace --all-targets --all-features
Note: This seems different than #102882, because I am explicitly stating the paths of which re-export to use, and am not making assumptions that they are the same. rustc seems to arbitrarily pick/unify/dedup a different re-export than what is explicitly stated on one side of the assignment, then fails to do the same with the other side.
Meta
rustc --version --verbose
:Backtrace
No backtrace; it doesn't build.
The text was updated successfully, but these errors were encountered: