You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Each cargo::rustc-cfg should have an accompanying unconditionalcargo::rustc-check-cfg directive to avoid warnings like this: unexpected cfg condition name: has_foo.
We probably want something like fn emit_check(cfg: &str) to pair with the current emit. Then each AutoCfg::emit_* method should call emit_check unconditionally, while their probe still guards their emit.
Maybe a combined helper is appropriate too, like fn emit_checked(cfg: &str, cond: bool).
The text was updated successfully, but these errors were encountered:
This avoids the `unexpected_cfgs` lint for any of the configs emitted by AutoCfg methods.
This lint is new in Rust 1.80: <https://blog.rust-lang.org/2024/05/06/check-cfg.html>
This adds a `emit_possibility` method to mirror the `emit` method.
Calling `emit` manually does not call `emit_possibility`.
Fixes issue cuviper#64
This avoids the `unexpected_cfgs` lint for any of the configs emitted by AutoCfg methods.
This lint is new in Rust 1.80: <https://blog.rust-lang.org/2024/05/06/check-cfg.html>
This adds a `emit_possibility` method to mirror the `emit` method.
Calling `emit` manually does not call `emit_possibility`.
Fixes issue cuviper#64
Ref: https://blog.rust-lang.org/2024/05/06/check-cfg.html
We probably want something like
fn emit_check(cfg: &str)
to pair with the currentemit
. Then eachAutoCfg::emit_*
method should callemit_check
unconditionally, while their probe still guards theiremit
.Maybe a combined helper is appropriate too, like
fn emit_checked(cfg: &str, cond: bool)
.The text was updated successfully, but these errors were encountered: