4 ms·
> Rust reports potentially useful cfg-disabled items in errors The Rust compiler error team keeps delivering feature to make the developer experience more plea
by littlestymaar 3y ago
> Rust reports potentially useful cfg-disabled items in errors
The Rust compiler error team keeps delivering feature to make the developer experience more pleasant. Thank you so much!
- PoignardAzur 3y agoYeah, I can think of a few times this would have been super helpful. Great feature!
- junon 3y agoThe error messages were the first thing that really impressed me, and not only have they improved a lot over the years but clippy is a thing to add even more guidance to writing better code. Really impressive stuff.
- davidhyde 3y agoThis is huge for embedded rust where cargo Features are used heavily. One of those trial and error things that can be frustrating when learning a new library with missing notes about features.
- epage 3y agoThey should enable the nightly-only "auto cfg" feature to also help out e,g, https://docs.rs/clap/latest/clap/macro.command.html https://docs.rs/clap/latest/clap/macro.command.html To enable - Add a `cfg`: https://github.com/clap-rs/clap/blob/master/Cargo.toml#L48 https://github.com/clap-rs/clap/blob/master/Cargo.toml#L48 - Enable the nightly feature when the `cfg` is present: https://github.com/clap-rs/clap/blob/master/src/lib.rs#L79 https://github.com/clap-rs/clap/blob/master/src/lib.rs#L79