rust-lang/rust — pull request #19679 by tbu- (2014-12-09 23:49:04+00:00)
Title: Clean up `collections::EnumSet`

Make `EnumSet` portable by using a fixed-size unsigned integer, namely `u32`.
The previous choice of `uint` creates portability hazards as too high enum
variants are only detected at runtime.

Mark the `from_u32` method of the trait `CLike` as unsafe, as it is supposed to
be implemented without checking, thus being unsafe.

Remove the memory-unsafe `Decode` implementation for `EnumSet`.

This is a [breaking-change]. Code using `EnumSet` needs to be updated to use
`u32`s.