iximeow / yaxpeax-x86

x86 decoders for the yaxpeax project
BSD Zero Clause License
129 stars 23 forks source link

Clippy lint to help with no_std support #24

Open i509VCB opened 2 years ago

i509VCB commented 2 years ago

I recently wrote a few lints for clippy that should help with CI testing given the couple of "fix no_std" pull requests I've seen: https://github.com/rust-lang/rust-clippy/pull/9103

Although I don't think these are going to be stable until Rust 1.64

iximeow commented 1 year ago

1.64 is out! grats on landing the lints!

i don't think there've been any no-std pull requests, but some commits if that's what you're thinking? in that case it was kind of mislabeled - i expect the crate to build with no features, so "no_std" (in a minimal sense) is cargo build --no-default-features. that didn't work for mundane reason about the fmt feature, but all did at least get std/core right. even then, cargo build --no-default-features --features "fmt" did work, i believe.. that said, doc comments do reference std::fmt::* because (iirc?) those can't be made to build no-std even if i wanted...

either way i'm super down for std_instead_of_core as a lint! though i rarely run clippy myself. yaxpeax-x86 using alloc would almost certainly be a bug though :grin: