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

Update book to mention the min_const_gen feature #37

Merged
merged 1 commit into from Apr 7, 2021
Merged

Update book to mention the min_const_gen feature #37

merged 1 commit into from Apr 7, 2021

Conversation

noslaver
Copy link
Contributor

This PR update the book to mention the new min_const_gen feature.
For more details, see here

Copy link
Member

@dhardy dhardy left a comment

Choose a reason for hiding this comment

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

@@ -72,6 +72,7 @@ Lets go over the distributions by type:
The [`Standard`] and [`Uniform`] distributions each support a selection of
these types (up to 12-tuples and 32-element arrays).
This includes the empty tuple `()` and array.
For arrays of size larger than 32, enable the `min_const_gen` feature.
Copy link
Member

Choose a reason for hiding this comment

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

I don't like the wording. Better:

When using Rustc ≥ 1.51, enable the min_const_gen feature to support arrays larger than 32 elements.

Copy link
Contributor Author

Choose a reason for hiding this comment

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

Done. Should I use the same phrasing in the docs in the original PR?

Copy link
Member

Choose a reason for hiding this comment

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

I guess. There's also the thing I mentioned about non-equivalence with Fill; maybe I'll have a look at that if you like. Currently there's a mention on Rng::gen and some doc on Standard; probably there should be some on Fill.

Copy link
Contributor Author

Choose a reason for hiding this comment

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

There's also the thing I mentioned about non-equivalence with Fill; maybe I'll have a look at that if you like. Currently there's a mention on Rng::gen and some doc on Standard; probably there should be some on Fill.

You mentioned this can somehow be solved with min_specialization, which I am unfamiliar with. Did you mean we should solve this now or in the future?

@dhardy dhardy merged commit f0227cd into rust-random:master Apr 7, 2021
@noslaver noslaver deleted the const-generic-array-size branch April 7, 2021 18:15
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