Skip to content

Conversation

sanxiyn
Copy link
Contributor

@sanxiyn sanxiyn commented Jul 17, 2014

Importing from types was disallowed in #6462. Flag was set for paths whether it is a module or a type. Type flag was set when impl was seen. The problem is, for cross-crate situations, when reexport is involved, it is possible that impl is seen too late because metadata is loaded lazily.

Fix #15664.

@huonw
Copy link
Contributor

huonw commented Jul 17, 2014

Does this fix #15528 too - after this lands, it should be impossible to trigger that bug?

@sanxiyn
Copy link
Contributor Author

sanxiyn commented Jul 17, 2014

Yes, it should be impossible to trigger that bug using the provided testcase. I am not sure in general though.

bors added a commit that referenced this pull request Jul 18, 2014
Importing from types was disallowed in #6462. Flag was set for paths whether it is a module or a type. Type flag was set when impl was seen. The problem is, for cross-crate situations, when reexport is involved, it is possible that impl is seen too late because metadata is loaded lazily.

Fix #15664.
@bors bors closed this Jul 18, 2014
@edwardw
Copy link
Contributor

edwardw commented Jul 18, 2014

I can confirm that #15528 has been fixed by this.

@sanxiyn sanxiyn deleted the use-from-type branch July 18, 2014 16:05
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Inconsistent behavior when importing type implementation from local crate vs. cross-crate
5 participants