Replace cfg_if! macro with cfg_select! fallback - #740
Conversation
| } | ||
| }; | ||
|
|
||
| // match if/else chains lacking a final `else` |
There was a problem hiding this comment.
We actually never used this branch, but I guess we wanted it for completeness.
38ce1ef to
515a828
Compare
|
Perhaps this implementation might work better with |
|
That sure is a simpler implementation. I'll try that one out. |
072dae2 to
297c842
Compare
|
Perhaps someone could publish a |
|
We explicitly avoid depending on |
|
One limitation of the current implementation is that branch bodies must be enclosed in braces. For example, the following is not supported: cfg_select! {
unix => foo()
windows => bar()
} |
|
I’d still include a link to the |
|
That seems pretty unnecessary IMHO. This satisfies our needs until we can update the MSRV to remove it. |
The main benefit this gives is rustfmt support;
cfg_select!is properly formatted, unlikecfg_if!. Additionally, it makes migrating when we eventually bump MSRV easier.