- Notifications
You must be signed in to change notification settings - Fork32
nostd: remove left-overs fromno_std feature flag#36
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 ourterms of service andprivacy statement. We’ll occasionally send you account related emails.
Already on GitHub?Sign in to your account
Merged
Uh oh!
There was an error while loading.Please reload this page.
Conversation
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.Learn more about bidirectional Unicode characters
unicode-width no longer depends on `std`. This has been updated inREADME.md in96eaa4a, but the introductory comments in `lib.rs` stillshow the old information.Align `lib.rs` with `README.md` and drop reference to the old `no_std`feature flag.
Manishearth approved these changesApr 9, 2024
Member
Manishearth commentedApr 9, 2024
The regen script also needs to be updated |
The package is always compiled as `no_std` and pulls in `std` and`test` when compiling tests. Hence:- The prelude of `core` is available unconditionally, and it includes `core::options::Option` and its variants. No need to manually declare them.- The `test` crate is in-scope automatically, so no need to manually declare it.
The `std` crate is unconditionally pulled in for test builds, hence wecan rely on it. Drop the redundant guards that check against `no_std`.
The `no_std` feature flag has no effect, anymore (as already documentedin `README.md`). Document this in `Cargo.toml`, but retain it forbackwards compatibility.Note that for better cross-package composability, an `std` flag wouldlikely be preferred in the future, over a `no_std` flag. The formerallows multiple packages with different preferences on this feature tobe combined in a single build, while the latter does not.Hence, suggest that `no_std` as feature flag is a legacy compatibilityflag, and will not be used in the future.
ContributorAuthor
dvdhrm commentedApr 11, 2024
Argh! Sorry, missed the script. Now fixed! Would you mind if I change the script to write to |
Manishearth approved these changesApr 11, 2024
Member
Manishearth commentedApr 11, 2024
shrug I don't consider that too important |
Sign up for freeto join this conversation on GitHub. Already have an account?Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
The
no_stdfeature flag has been reworked in the past and is now basically the default. This PR removes some leftovers, fixes several warnings about redundant use-declarations, and updates the documentation.None of this is critical, so feel free to cherry-pick individual pieces, or let me know how to rework them.
Note that I did not see any
rust-versionor MSVR annotations, so I could not test this with the base version. But I do not think the preludes changed much, so this should be fine.