-
Notifications
You must be signed in to change notification settings - Fork 13k
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
rustdoc: Show that repeated expression arrays can be made with constant values #108531
Conversation
Thanks for the pull request, and welcome! The Rust team is excited to review your changes, and you should hear from @thomcc (or someone else) soon. Please see the contribution instructions for more information. |
Hey! It looks like you've submitted a new PR for the library teams! If this PR contains changes to any Examples of
|
Seems good to me. @bors r+ rollup |
…, r=thomcc rustdoc: Show that repeated expression arrays can be made with constant values The [rust reference](https://doc.rust-lang.org/reference/expressions/array-expr.html) currently says that repeated values for arrays can be constant or `Copy` > repeat operand is [Copy](https://doc.rust-lang.org/reference/special-types-and-traits.html#copy) or that it must be a [path](https://doc.rust-lang.org/reference/expressions/path-expr.html) to a constant item This updates the rust documentation on primitive arrays to reflect what the rust reference says (and also compiler suggestions if you do not use a `const` item)
…iaskrgr Rollup of 8 pull requests Successful merges: - rust-lang#108297 (Exit when there are unmatched delims to avoid noisy diagnostics) - rust-lang#108531 (rustdoc: Show that repeated expression arrays can be made with constant values) - rust-lang#108536 (Update books) - rust-lang#108550 (Remove the `capture_disjoint_fields` feature) - rust-lang#108551 (Descriptive error when users try to combine RPITIT/AFIT with specialization) - rust-lang#108554 (Only look for param in item's generics if it actually comes from generics) - rust-lang#108555 (Fix a race in the query system) - rust-lang#108558 (add missing feature in core/tests) Failed merges: r? `@ghost` `@rustbot` modify labels: rollup
The rust reference currently says that repeated values for arrays can be constant or
Copy
This updates the rust documentation on primitive arrays to reflect what the rust reference says (and also compiler suggestions if you do not use a
const
item)