dtolnay / rustversion

Conditional compilation according to rustc compiler version
Apache License 2.0
336 stars 15 forks source link

Compatibility with `cfg_if` #43

Closed wmmc88 closed 6 months ago

wmmc88 commented 8 months ago

Is there anyway to use rustversion in conjunction with cfg_if? It would nice to be able to do some if/else instead of individual blocks that have rustversion attributes on them

dtolnay commented 6 months ago

I don't think so. But someone should explore different implementation approaches that could work with cfg_if.