Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

fix: use core not std to allow no_std to compile #325

Merged
merged 1 commit into from
Jan 28, 2024

Conversation

ripytide
Copy link
Contributor

@ripytide ripytide commented Jan 28, 2024

Getting a compile error on no_std for the new v0.26.0 release:

> cargo check
error[E0433]: failed to resolve: use of undeclared crate or module `std`
   --> strum/src/lib.rs:226:25
    |
226 | pub trait VariantArray: std::marker::Sized + 'static {
    |                         ^^^ use of undeclared crate or module `std`
    |
help: consider importing this module
    |
33  + use core::marker;
    |
help: if you import `marker`, refer to it directly
    |
226 - pub trait VariantArray: std::marker::Sized + 'static {
226 + pub trait VariantArray: marker::Sized + 'static {
    |

For more information about this error, try `rustc --explain E0433`.
error: could not compile `strum` (lib) due to 1 previous error

The fix was to use core not std.
I'm surprised this sort of thing isn't caught by CI tests?

@Peternator7 Peternator7 merged commit 175b4a3 into Peternator7:master Jan 28, 2024
1 check failed
@Peternator7
Copy link
Owner

just pushed 0.26.1 to fix it. Thanks for catching this.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

2 participants