cargo-nono icon indicating copy to clipboard operation
cargo-nono copied to clipboard

Special-case rustc-std-workspace-core

Open sunfishcode opened this issue 3 years ago • 0 comments

rustc-std-workspace-core is an explicitly empty crate used by some low-level no_std crates in the Rust ecosystem, such as libc, when the rustc-dep-of-std feature is enabled. It's completely empty, so it doesn't declare #[no_std], so cargo nono flags it as not supporting no_std. For example, within the libc crate:

$ cargo nono check --features rustc-dep-of-std
libc: SUCCESS
rustc-std-workspace-core: FAILURE
  - Did not find a #![no_std] attribute or a simple conditional attribute like #[cfg_attr(not(feature = "std"), no_std)] in the crate source. Crate most likely doesn't support no_std without changes.

It'd be convenient if cargo-nono would special-case rustc-std-workspace-core and suppress this error.

sunfishcode avatar Nov 03 '21 20:11 sunfishcode