summary refs log tree commit diff
path: root/src/doc/nomicon/vec-final.md
AgeCommit message (Collapse)AuthorLines
2016-01-16Fixed indent from tabs to spacesJonas Tepe-8/+8
2016-01-16added zst iterator additions to final codeJonas Tepe-2/+10
2015-09-11std: Internalize almost all of `std::rt`Alex Crichton-5/+4
This commit does some refactoring to make almost all of the `std::rt` private. Specifically, the following items are no longer part of its API: * DEFAULT_ERROR_CODE * backtrace * unwind * args * at_exit * cleanup * heap (this is just alloc::heap) * min_stack * util The module is now tagged as `#[doc(hidden)]` as the only purpose it's serve is an entry point for the `panic!` macro via the `begin_unwind` and `begin_unwind_fmt` reexports.
2015-09-06Rustonomicon: Reword potentially confusing comment in Vec::drain.Jørn Lode-1/+1
2015-09-06Rustonomicon: Fix bug in implementation of Vec::drain()Jørn Lode-5/+8
In the last code snippet on the following page there is a bug in the implementation of Vec::drain(). https://doc.rust-lang.org/nightly/nomicon/vec-drain.html ```rust pub fn drain(&mut self) -> Drain<T> { // Oops, setting it to 0 while we still need the old value! self.len = 0; unsafe { Drain { // len is used to create a &[T] from &self here, // so we end up always creating an empty slice. iter: RawValIter::new(&self), vec: PhantomData, } } } ``` A simple test to verify that Drain is broken can be found here: https://play.rust-lang.org/?gist=30f579565e4bbf4836ce&version=nightly And here's one with a fixed implementation: https://play.rust-lang.org/?gist=2ec0c1a6dcf5defd7a53&version=nightly
2015-08-03rename TARPL to The RustinomiconAlexis Beingessner-0/+311