Description
We had someone in embedded trip over the fact that:
portable-atomic
is an optional dep- the feature is
portable_atomic
- optional deps are allowed to have
-
or_
and are unified - If you select
portable-atomic
as the feature, you don't get a warning because the feature does something, but not what you expect (it still tries to use core::sync::atomic).
An example of the cfg is here: https://github.com/mvdnes/spin-rs/blob/master/src/lib.rs#L66-L67
The user had this in their Cargo.toml:
spin = { version = "0.9.8", default-features = false, features = ["portable-atomic"] }
You might want to add a "trap" for this in spin that will save someone needing to debug this in the future:
#[cfg(feature = "portable-atomic")]
compiler_error!("Oops it's a trap");
Metadata
Assignees
Labels
No labels