-
Notifications
You must be signed in to change notification settings - Fork 13.8k
Add note for possible crate mismatches in type errors #28300
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
…m two different crate of the same name (rust-lang#22750)
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.
IIRC all FIXMEs should have an associated issue
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.
fixed, it's the same bug (since this is only a partial fix)
So excited for this patch to land! The messages look good to me. |
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.
You should check that the crates are different - for example:
fn main() {
let _ = [{struct Foo; Foo}, {struct Foo; Foo}];
}
The error in the above code will see the path "main::Foo" for both of the two different types.
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.
You'll want to look up the crate names from the crate numbers in the DefId
s (and/or find the subset of the path which refers to the extern crate
item).
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.
Done
@bors r+ |
📌 Commit c65d338 has been approved by |
Partially fixes #22750 I'll write a test for this when I figure out how to. r? @eddyb cc @steveklabnik
Partially fixes #22750
I'll write a test for this when I figure out how to.
r? @eddyb
cc @steveklabnik