Skip to content

Unexpected cfg condition value: no-std #58

@trappitsch

Description

@trappitsch

I wanted to use this crate to do some unitful returns of instrument queries and wanted to add torr and millitorr (still used heavily in vacuum gauges) as a unit. However, even just running a check or tests on the main branch results in this error (which is elevated from a warning due to the cfg). Is there something I'm doing wrong or is there something I'm missing here? Thanks!

❯ cargo check
warning: no edition set: defaulting to the 2015 edition while the latest is 2024
    Checking measurements v0.11.0 (/home/reto/Documents/code/embedded/rust-measurements)
error: unexpected `cfg` condition value: `no-std`
  --> src/measurement.rs:39:7
   |
39 | #[cfg(feature = "no-std")]
   |       ^^^^^^^^^^^^^^^^^^
   |
   = note: expected values for `feature` are: `from_str`, `regex`, `serde`, and `std`
   = help: consider adding `no-std` as a feature in `Cargo.toml`
   = note: see <https://doc.rust-lang.org/nightly/rustc/check-cfg/cargo-specifics.html> for more information about checking conditional configuration
note: the lint level is defined here
  --> src/lib.rs:9:9
   |
9  | #![deny(warnings, missing_docs)]
   |         ^^^^^^^^
   = note: `#[deny(unexpected_cfgs)]` implied by `#[deny(warnings)]`

error: unexpected `cfg` condition value: `no-std`
  --> src/measurement.rs:42:7
   |
42 | #[cfg(feature = "no-std")]
   |       ^^^^^^^^^^^^^^^^^^
   |
   = note: expected values for `feature` are: `from_str`, `regex`, `serde`, and `std`
   = help: consider adding `no-std` as a feature in `Cargo.toml`
   = note: see <https://doc.rust-lang.org/nightly/rustc/check-cfg/cargo-specifics.html> for more information about checking conditional configuration

error: could not compile `measurements` (lib) due to 2 previous errors

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions