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

Always compile as a no_std crate #34

Merged
merged 1 commit into from
Oct 29, 2019
Merged

Always compile as a no_std crate #34

merged 1 commit into from
Oct 29, 2019

Conversation

TethysSvensson
Copy link
Contributor

This PR turns changes the std feature flag to do nothing, and always compiles as a no_std crate.

It also enables all code to compile and run with --no-default-features and with --all-features. Before this commit, running e.g. cargo test --no-default-features would fail both on stable and nightly.

Note that this introduces a bit of noise in the output when running cargo test. It looks like this:

error: no global memory allocator found but one is required [...]

Now obviously this looks like it's an error, but it is actually safe to ignore does not actually affect the tests at all. See this comment for more context.

Note also, that nightly clippy gives two additional warnings about doctests in raw_vec.rs. I chose to ignore these, as the tests do not actually work as far as I can tell, are not actually run (they are ignore) and are they part of any public interface.

I promise this is the last PR I will bother you with for now. 😉

This commit also makes sure that all tests compile and run
with --no-default-features and with --all-features.
Copy link
Owner

@fitzgen fitzgen left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Thanks!

@fitzgen fitzgen merged commit 7cd9452 into fitzgen:master Oct 29, 2019
@TethysSvensson TethysSvensson deleted the always-no_std branch October 29, 2019 21:53
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.

2 participants