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

API Docs: vec #29380

Closed
steveklabnik opened this issue Oct 26, 2015 · 4 comments
Closed

API Docs: vec #29380

steveklabnik opened this issue Oct 26, 2015 · 4 comments

Comments

@steveklabnik
Copy link
Member

Part of #29329

http://doc.rust-lang.org/std/vec/

@e-oz
Copy link

e-oz commented Dec 9, 2015

Please mention danger effect of vec! macros, panicking.
Example:
http://is.gd/tXpV3W

@gyscos
Copy link

gyscos commented Jan 11, 2016

@e-oz , how is this specific to the vec! macro? Isn't this simply out-of-bound indexing?

@e-oz
Copy link

e-oz commented Jan 11, 2016

@gyscos with promises Rust gives, "simply out-of-bound indexing" is oxymoron :) Read example to see how it's related.

@ranma42
Copy link
Contributor

ranma42 commented Jan 11, 2016

It might be appropriate to point out that vec's implementation of Index will result in panics upon out-of-bound, but it should also be expected from conventions and from its signature (it does not return an Option).
It might be desirable to mention that functions which perform allocations might either panic or oom() (abort the whole application instead of the panicking thread). I remember that some discussion had already happened on this (about whether it was an inconsistency to be fixed or not), but I do not think this has been documented.

dirk added a commit to dirk/rust that referenced this issue Feb 15, 2016
Manishearth added a commit to Manishearth/rust that referenced this issue Feb 15, 2016
…t-in-vec-docs, r=steveklabnik

Tweak documentation to clarify the structure of `Vec`s as contiguous arrays of items in memory.

Closes rust-lang#31554; contributes to rust-lang#29380.

r? @steveklabnik
Manishearth pushed a commit to Manishearth/rust that referenced this issue Feb 15, 2016
Manishearth added a commit to Manishearth/rust that referenced this issue Feb 16, 2016
…t-in-vec-docs, r=steveklabnik

Tweak documentation to clarify the structure of `Vec`s as contiguous arrays of items in memory.

Closes rust-lang#31554; contributes to rust-lang#29380.

r? @steveklabnik
bors added a commit that referenced this issue Feb 17, 2016
…cs, r=steveklabnik

Tweak documentation to clarify the structure of `Vec`s as contiguous arrays of items in memory.

Closes #31554; contributes to #29380.

r? @steveklabnik
sanxiyn added a commit to sanxiyn/rust that referenced this issue Aug 3, 2016
sophiajt pushed a commit to sophiajt/rust that referenced this issue Aug 4, 2016
steveklabnik added a commit to steveklabnik/rust that referenced this issue Aug 4, 2016
GuillaumeGomez added a commit to GuillaumeGomez/rust that referenced this issue Aug 5, 2016
GuillaumeGomez added a commit to GuillaumeGomez/rust that referenced this issue Aug 5, 2016
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

No branches or pull requests

4 participants