Uh oh!
There was an error while loading. Please reload this page.
Delete EnumSet and remove its final use in rustc - #26705
Conversation
Gankra
commented
Jul 1, 2015
To be clear: EnumSet is already deprecated from libstd, and isn't re-exported there. As such you can just delete it. It's an internal implementation detail that was kept in exclusively for rustc's consumption. |
There was a problem hiding this comment.
You could also just cast the BuiltinBound to an integer. So
pubfninsert(&mutself,bound){self.bits |= (1 << (bound asu8));}pubfncontains(&self,bound){((self.bits >> (bound asu8))&1) == 1}There was a problem hiding this comment.
Yeah good point some of these are probably just my functional programmer side coming through ;)
Gankra
commented
Jul 1, 2015
The collection logic seems legit. |
Gankra
commented
Jul 5, 2015
@jroesch What's the status on this; do you need any more review? r=me if this is good to go. |
jroesch
commented
Jul 6, 2015
@gankro I didn't receive any negative feedback the second time so I assume that we are good to go. |
Gankra
commented
Jul 7, 2015
@bors r+ |
bors
commented
Jul 7, 2015
📌 Commit 2c8ab28 has been approved by |
bors
commented
Jul 8, 2015
⌛ Testing commit 2c8ab28 with merge 057a1d7... |
bors
commented
Jul 8, 2015
💔 Test failed - auto-mac-64-nopt-t |
jroesch
commented
Jul 8, 2015
I didn't run the full test suite since this wasn't a huge change, but one test was still mentioning CLike 😢 |
alexcrichton
commented
Jul 8, 2015
bors
commented
Jul 8, 2015
⌛ Testing commit f4ff8ef with merge ef9570c... |
bors
commented
Jul 8, 2015
💔 Test failed - auto-mac-64-nopt-t |
There was a problem hiding this comment.
isn't this almost exactly the same as bitflags?
steveklabnik
commented
Jul 19, 2015
@jroesch seems like a straightforward failure here |
tamird
commented
Jul 19, 2015
metaquestion: what is the difference between |
arielb1
commented
Jul 19, 2015
One is a macro which declares a statically-sized set, the other is a dynamically-resizing set. |
Gankra
commented
Jul 19, 2015
@arielb1 EnumSet also has a statically known size (number of variants). |
tamird
commented
Jul 20, 2015
Seems like we can avoid introducing |
Gankra
commented
Jul 20, 2015
This sound plausible, yes. @jroesch what's the status? |
jroesch
commented
Jul 20, 2015
@gankro I had forgot this PR was still hanging around. I fixed the test failure, but we could just use |
bors
commented
Jul 26, 2015
☔ The latest upstream changes (presumably #26870) made this pull request unmergeable. Please resolve the merge conflicts. |
jroesch
commented
Jul 26, 2015
I've decided I'm just going to remove BuiltinBounds as per @eddyb 's suggestion will follow up on this PR. |
Gankra
commented
Jul 27, 2015
I'm just going to close this PR, since it sounds like the new one will just be fresh work. Good luck! |
This commit adds an implementation of
BuiltinBoundsthat does not depend on external data structures and removesEnumSetin the standard collections library. We should probably have both a person from the compiler team and libs team look this one over.r? @gankro