I considered switching feature gating to use an `EnumSet` a few days ago, since the current implementation is `O(N*M)`, but @huonw downplayed the importance of optimizing something already insignificant.
If we make that change, `Features` would be tiny and we could just stick it in `ty::ctxt`.