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

Add data for nonzero_is_power_of_two #24

Merged
merged 2 commits into from
Oct 23, 2021

Conversation

jdkaplan
Copy link
Contributor

Add data for nonzero_is_power_of_two, which defines is_power_of_two on nonzero unsigned integer types.

Decisions I made that I'm not totally sure about (but would be happy to fix in this PR):

  1. Put this data under unstable. Data to add #16 has this listed as "stable", but usage still requires nightly Rust and #![feature].
  2. Leave doc_path empty. There are docs for each type (for example, https://doc.rust-lang.org/std/num/struct.NonZeroUsize.html#method.is_power_of_two), but picking just one didn't seem right. The most similar feature (data/1.40/const_is_power_of_two.md) also doesn't set a doc_path.

@jplatte
Copy link
Owner

jplatte commented Oct 23, 2021

Both decisions make sense. That it's listed under stable is a mistake. And doc_path is really more meant for language features that you can't just use the rustdoc search for.

Copy link
Owner

@jplatte jplatte left a comment

Choose a reason for hiding this comment

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

Other than the title, looks good. Thanks!

data/unstable/nonzero_is_power_of_two.md Outdated Show resolved Hide resolved
@jplatte jplatte merged commit d4928ec into jplatte:main Oct 23, 2021
@jdkaplan jdkaplan deleted the nonzero_is_power_of_two branch October 23, 2021 22:26
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