Skip to content
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

Features/move enum set to libstd #13196

Closed

Conversation

richo
Copy link
Contributor

@richo richo commented Mar 29, 2014

Move EnumSet to libstd

This moves EnumSet into libstd and updates everything else in core that uses it.

This is the beginning of an attempt to fix #6085

Obviously, this will break any code that attempts to access enum_set as
collections::enum_set, requiring a simple update (What's the mechanism to
communicate that? ping @cwm to put it in This Week in Rust?)

Right now I've left it as multiple commits to make it easier to look over if there are
things I need to fix, I'll squash this if it's ok to merge.

EDIT: This also is somewhat an extension of #12415

@richo
Copy link
Contributor Author

richo commented Mar 29, 2014

Thanks to kimundi on IRC, the tests pass locally now.

Please let me know if there's anything more I need to do/consider!

EDIT: And if there's nothing else, I'll squish these all together to avoid polluting history.

@alexcrichton
Copy link
Member

Thanks for making progress on #6085! I'd like to discuss this before moving forward, because just using an EnumSet may not be the best solution. For example a bitflags! alternative to EnumSet was proposed in #13072.

This unfortunately suffers from "libstd is what is needed to implement libstd" rather than "libstd is what it should be", because it seems odd to have EnumSet in libstd. Hopefully we can mitigate this before merging!

@richo
Copy link
Contributor Author

richo commented Mar 29, 2014

Entirely valid- the decision to move on this came out of a discussion with strcat on irc.

With that said, EnumSet isn't really that much of a collection either, so it seemed somewhat odd in libcollections.

I figure I'm going to keep fiddling with #6085 for the time being, and wait to see what happens upstream with this?

@richo
Copy link
Contributor Author

richo commented Mar 29, 2014

Oh, looking closer, bitflags! lives in libcollections too, which would also have the issue of unusability in libstd. Is there an issue for that, and is it something reasonable for someone unfamiliar with rust's core to work on?

@alexcrichton
Copy link
Member

Closing due to inactivity. I think the "bit set" data structure is still a bit in flux, and working on #6085 may want to wait for the resolution of this data structure.

@richo
Copy link
Contributor Author

richo commented Apr 15, 2014

Sounds good to me. I'd been periodically peeking at this issue and the surrounding ones for movement.

matthiaskrgr pushed a commit to matthiaskrgr/rust that referenced this pull request Sep 13, 2022
fix: add semicolon completion to mod

fixes rust-lang#13196

`@Veykril` The tests are passing. I added one specifically for this case.
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.

os::mkdir and friends should maybe not take u32
2 participants