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
$ cargo +nightly --version
cargo 1.86.0-nightly (0e3d73849 2025-02-01)
$ cargo +nightly c --all-features
Checking nix v0.29.0 (/home/steve/Documents/workspace/nix)
error: unused attribute `<cfg_attr>`
--> src/macros.rs:9:13
|
9 |#[cfg_attr(docsrs, doc(cfg($meta)))]| ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
|
::: src/fcntl.rs:235:1
|
235 | / feature! {
236 ||#![feature = "fs"]
237 ||
238 || /// open or create a file for reading, writing or executing
... |
444 || }
||_- in this macro invocation
|
note: the built-in attribute `<cfg_attr>` will be ignored, since it's applied to the macro invocation `cfg_if::cfg_if` --> src/fcntl.rs:293:1 |293 | cfg_if::cfg_if! { | ^^^^^^^^^^^^^^note: the lint level is defined here --> src/lib.rs:51:9 |51 | #![deny(unused)] | ^^^^^^ = note: `#[deny(unused_attributes)]` implied by `#[deny(unused)]` = note: this error originates in the macro `feature` (in Nightly builds, run with -Z macro-backtrace for more info)error: unused attribute `<cfg_attr>` --> src/macros.rs:9:13 |9 | #[cfg_attr(docsrs, doc(cfg($meta)))] | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ | ::: src/sys/signal.rs:387:1 |387 | / feature! {388 | | #![feature = "signal"]389 | |390 | | #[derive(Clone, Copy, Debug, Eq, Hash, PartialEq)]... |434 | | } | |_- in this macro invocation |note: the built-in attribute `<cfg_attr>` will be ignored, since it's applied to the macro invocation `cfg_if`
--> src/sys/signal.rs:425:1
|
425 | cfg_if! {
| ^^^^^^
= note: this error originates in the macro `feature` (in Nightly builds, run with -Z macro-backtrace for more info)
error: could not compile `nix` (lib) due to 2 previous errors
It shows that 2 uses of features!() actually do not work, and it is right:
The text was updated successfully, but these errors were encountered:
SteveLauC
changed the title
The feature! does not work when encountering cfg_if!()
The feature! macro does not work when encountering cfg_if!()Mar 21, 2025
It shows that 2 uses of
features!()
actually do not work, and it is right:fcntl.rs
nix/src/fcntl.rs
Lines 293 to 413 in e4895d3
sys/signal.rs
nix/src/sys/signal.rs
Lines 425 to 433 in e4895d3
The text was updated successfully, but these errors were encountered: