-
Notifications
You must be signed in to change notification settings - Fork 13.3k
Expand documentation for the primitive type array #26923
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
Conversation
r? @aturon (rust_highfive has picked a reviewer for you, use r? to override) |
Expand documentation for the primitive type array
@@ -8,19 +8,48 @@ | |||
// option. This file may not be copied, modified, or distributed | |||
// except according to those terms. | |||
|
|||
//! The fixed-size array type (`[T; n]`). | |||
//! A fixed-size array is denoted `[T; N]` for the element type `T` and | |||
//! the compile time constant size `N`. The size should be zero or positive. |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
this is a 'must' rather than should, right?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Yes but it's not the reference, so it's not so technical I thought.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
possibly, i mean we're not going all RFC 2119 or anything :)
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
what RFC is that @steveklabnik
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Apparently RFC 2119. I just had to google it to understand it's their text for defining what MUST, SHOULD etc mean in their standards :)
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
oh, thanks; and here I went looking at Rust RFC repo
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
sorry, I meant IETF RFC :(
On Sat, Jul 11, 2015 at 3:11 PM, Tshepang Lekhonkhobe <
[email protected]> wrote:
In src/libstd/array.rs
#26923 (comment):@@ -8,19 +8,48 @@
// option. This file may not be copied, modified, or distributed
// except according to those terms.-//! The fixed-size array type (
[T; n]
).
+//! A fixed-size array is denoted[T; N]
for the element typeT
and
+//! the compile time constant sizeN
. The size should be zero or positive.oh, thanks; and here I went looking at Rust RFC repo
—
Reply to this email directly or view it on GitHub
https://github.com/rust-lang/rust/pull/26923/files#r34415454.
Small tweaks for the documentation of the primitive type array Follow up to PR rust-lang#26923, fix a few small details.
Small tweaks for the documentation of the primitive type array Follow up to PR rust-lang#26923, fix a few small details.
Expand documentation for the primitive type array