Skip to content

Remove the unneeded Sized bound on TypeId creation and fix an ICE in extern { } blocks #20696

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

Merged
merged 1 commit into from
Jan 8, 2015

Conversation

reem
Copy link
Contributor

@reem reem commented Jan 7, 2015

This removes the needlessly constricting bound on intrinsics::type_Id and TypeId::of. Also fixes an ICE where using bounds on type parameters in extern blocks fails to resolve the used traits.

@rust-highfive
Copy link
Contributor

r? @nikomatsakis

(rust_highfive has picked a reviewer for you, use r? to override)

@reem
Copy link
Contributor Author

reem commented Jan 7, 2015

@nikomatsakis added tests for both changes

@reem
Copy link
Contributor Author

reem commented Jan 7, 2015

@nikomatsakis can I get this relatively fast-tracked (p != 0) when it's ready to go? It's needed to get iron building again (hasn't happened for like a week :/).

@reem
Copy link
Contributor Author

reem commented Jan 7, 2015

@nikomatsakis moved the test to compile-fail and added a failing bound. make check passes locally.

This bound is probably unintentional and is unnecessarily
constricting.

To facilitate this change, it was also necessary to modify
resolve to recurse on and resolve type parameters in extern { }
blocks. This fixes an ICE when using bounds on type parameters
during the declaration of intrinsics.

This also adds tests for TypeId on both Sized and Unsized
tests as well as a test for using type parameters and bounds
in extern { } blocks.
alexcrichton added a commit to alexcrichton/rust that referenced this pull request Jan 8, 2015
This removes the needlessly constricting bound on `intrinsics::type_Id` and `TypeId::of`. Also fixes an ICE where using bounds on type parameters in extern blocks fails to resolve the used traits.
@bors bors merged commit 2606f99 into rust-lang:master Jan 8, 2015
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.

5 participants