rust-embedded / embedded-hal

A Hardware Abstraction Layer (HAL) for embedded systems
Apache License 2.0
2.01k stars 202 forks source link

e-h-async and e-io-async broken on stable due to unexpected cfg "nightly" #618

Closed eldruin closed 3 months ago

eldruin commented 3 months ago

Rust >= 1.80.0 checks for unexpected cfgs. Here an example of building :

error: unexpected cfg condition name: nightly --> embedded-hal-async/src/lib.rs:8:13 8 #![cfg_attr(nightly, allow(stable_features, unknown_lints))] ^^^^^^^

= help: expected names are: clippy, debug_assertions, doc, docsrs, doctest, feature, miri, overflow_checks, panic, proc_macro, relocation_model, rustfmt, sanitize, sanitizer_cfi_generalize_pointers, sanitizer_cfi_normalize_integers, target_abi, target_arch, target_endian, target_env, target_family, target_feature, target_has_atomic, target_has_atomic_equal_alignment, target_has_atomic_load_store, target_os, target_pointer_width, target_thread_local, target_vendor, test, ub_checks, unix, and windows = help: consider using a Cargo feature instead = help: or consider adding in Cargo.toml the check-cfg lint config for the lint: [lints.rust] unexpected_cfgs = { level = "warn", check-cfg = ['cfg(nightly)'] } = help: or consider adding println!("cargo::rustc-check-cfg=cfg(nightly)"); to the top of the build.rs = note: see https://doc.rust-lang.org/nightly/rustc/check-cfg/cargo-specifics.html for more information about checking conditional configuration = note: -D unexpected-cfgs implied by -D warnings = help: to override -D warnings add #[allow(unexpected_cfgs)]

Do we want to add an explicit feature or maybe use something like rustversion?

Dirbaio commented 3 months ago

I think we can just remove all nightly checks, since AFIT has been stable for a while and we're not relying on any other nightly feature. done in #619