rust-lang / cfg-if

A if/elif-like macro for Rust #[cfg] statements
Apache License 2.0
557 stars 40 forks source link

cfg-if is awkward to use with 2018 edition #17

Closed d3zd3z closed 5 years ago

d3zd3z commented 5 years ago

In order to use cfg-if with Rust 2018 style 'use' for macros, it is necessary to also import __cfg_if_apply, and __cfg_if_items. Perhaps these can be referenced via $crate so that the cfg_if macro will work even as the only macro imported.

alexcrichton commented 5 years ago

Just to confirm, but are you using the most recent version of cfg-if? The master branch is supposed to solve these issues

naturallymitchell commented 5 years ago

The master branch is supposed to solve these issues

this was a little bit confusing, but after a second review, afaict, there aren't any newer changes yet to be released, and "0.1.6 is in theory compatible with the 2018 edition macro import story".

seems like this crate is definitely work looking into further

alexcrichton commented 5 years ago

Ah yeah thanks for the reminder! I think this can be closed