diff --git a/RELEASES.md b/RELEASES.md index 2df1a83db81ff..1de44ef7e6d05 100644 --- a/RELEASES.md +++ b/RELEASES.md @@ -1,9 +1,11 @@ -Version 1.15.1 (2017-02-08) +Version 1.15.1 (2017-02-09) =========================== * [Fix IntoIter::as_mut_slice's signature][39466] +* [Compile compiler builtins with `-fPIC` on 32-bit platforms][39523] [39466]: https://github.com/rust-lang/rust/pull/39466 +[39523]: https://github.com/rust-lang/rust/pull/39523 Version 1.15.0 (2017-02-02) diff --git a/src/doc/book/nightly-rust.md b/src/doc/book/nightly-rust.md index 25570cb5503c9..f55bb0784202a 100644 --- a/src/doc/book/nightly-rust.md +++ b/src/doc/book/nightly-rust.md @@ -6,10 +6,13 @@ process, see ‘[Stability as a deliverable][stability]’. [stability]: http://blog.rust-lang.org/2014/10/30/Stability.html -To install nightly Rust, you can use `rustup.sh`: +To install nightly Rust, you can use [rustup.rs][rustup]: + +[rustup]: https://rustup.rs ```bash -$ curl -s https://static.rust-lang.org/rustup.sh | sh -s -- --channel=nightly +$ curl https://sh.rustup.rs -sSf | sh +$ rustup install nightly ``` If you're concerned about the [potential insecurity][insecurity] of using `curl @@ -17,31 +20,28 @@ If you're concerned about the [potential insecurity][insecurity] of using `curl use a two-step version of the installation and examine our installation script: ```bash -$ curl -f -L https://static.rust-lang.org/rustup.sh -O -$ sh rustup.sh --channel=nightly +$ curl https://sh.rustup.rs -sSf -o rustup.sh +$ sh rustup.sh +$ rustup install nightly ``` [insecurity]: http://curlpipesh.tumblr.com -If you're on Windows, please download either the [32-bit installer][win32] or -the [64-bit installer][win64] and run it. +If you're on Windows, please download the [rustup installer][installer] +and run it. -[win32]: https://static.rust-lang.org/dist/rust-nightly-i686-pc-windows-gnu.msi -[win64]: https://static.rust-lang.org/dist/rust-nightly-x86_64-pc-windows-gnu.msi +[installer]: https://win.rustup.rs ## Uninstalling If you decide you don't want Rust anymore, we'll be a bit sad, but that's okay. Not every programming language is great for everyone. Just run the uninstall -script: +command: ```bash -$ sudo /usr/local/lib/rustlib/uninstall.sh +$ rustup self uninstall ``` -If you used the Windows installer, re-run the `.msi` and it will give you -an uninstall option. - Some people, and somewhat rightfully so, get very upset when we tell you to `curl | sh`. Basically, when you do this, you are trusting that the good people who maintain Rust aren't going to hack your computer and do bad things. diff --git a/src/libcollections/vec.rs b/src/libcollections/vec.rs index dc0f33d9bc3e0..3873b3535a07b 100644 --- a/src/libcollections/vec.rs +++ b/src/libcollections/vec.rs @@ -437,7 +437,9 @@ impl Vec { /// Reserves capacity for at least `additional` more elements to be inserted /// in the given `Vec`. The collection may reserve more space to avoid - /// frequent reallocations. + /// frequent reallocations. After calling `reserve`, capacity will be + /// greater than or equal to `self.len() + additional`. Does nothing if + /// capacity is already sufficient. /// /// # Panics /// @@ -456,8 +458,9 @@ impl Vec { } /// Reserves the minimum capacity for exactly `additional` more elements to - /// be inserted in the given `Vec`. Does nothing if the capacity is already - /// sufficient. + /// be inserted in the given `Vec`. After calling `reserve_exact`, + /// capacity will be greater than or equal to `self.len() + additional`. + /// Does nothing if the capacity is already sufficient. /// /// Note that the allocator may give the collection more space than it /// requests. Therefore capacity can not be relied upon to be precisely diff --git a/src/libcore/iter/iterator.rs b/src/libcore/iter/iterator.rs index 3b406873d4b19..d41767cce18fe 100644 --- a/src/libcore/iter/iterator.rs +++ b/src/libcore/iter/iterator.rs @@ -209,11 +209,14 @@ pub trait Iterator { /// Returns the `n`th element of the iterator. /// - /// Note that all preceding elements will be consumed (i.e. discarded). - /// /// Like most indexing operations, the count starts from zero, so `nth(0)` /// returns the first value, `nth(1)` the second, and so on. /// + /// Note that all preceding elements, as well as the returned element, will be + /// consumed from the iterator. That means that the preceding elements will be + /// discarded, and also that calling `nth(0)` multiple times on the same iterator + /// will return different elements. + /// /// `nth()` will return [`None`] if `n` is greater than or equal to the length of the /// iterator. /// diff --git a/src/libcore/slice.rs b/src/libcore/slice.rs index 1a482b75731c1..3e0b842557353 100644 --- a/src/libcore/slice.rs +++ b/src/libcore/slice.rs @@ -2290,9 +2290,10 @@ impl SlicePartialOrd for [A] } } -impl SlicePartialOrd for [u8] { - #[inline] - fn partial_compare(&self, other: &[u8]) -> Option { +impl SlicePartialOrd for [A] + where A: Ord +{ + default fn partial_compare(&self, other: &[A]) -> Option { Some(SliceOrd::compare(self, other)) } } diff --git a/src/test/run-pass/dst-field-align.rs b/src/test/run-pass/dst-field-align.rs index cf2acfe986c21..c36833f2fb627 100644 --- a/src/test/run-pass/dst-field-align.rs +++ b/src/test/run-pass/dst-field-align.rs @@ -25,12 +25,6 @@ struct Baz { a: T } -#[repr(packed)] -struct Packed { - a: u8, - b: T -} - struct HasDrop { ptr: Box, data: T @@ -55,12 +49,6 @@ fn main() { // The pointers should be the same assert_eq!(ptr1, ptr2); - // Test that packed structs are handled correctly - let p : Packed = Packed { a: 0, b: 13 }; - assert_eq!(p.b.get(), 13); - let p : &Packed = &p; - assert_eq!(p.b.get(), 13); - // Test that nested DSTs work properly let f : Foo> = Foo { a: 0, b: Foo { a: 1, b: 17 }}; assert_eq!(f.b.b.get(), 17); diff --git a/src/tools/build-manifest/src/main.rs b/src/tools/build-manifest/src/main.rs index 2a24edd4e3f33..991cd02d215dc 100644 --- a/src/tools/build-manifest/src/main.rs +++ b/src/tools/build-manifest/src/main.rs @@ -179,8 +179,8 @@ impl Builder { // and wrap it up in a `Value::Table`. let mut manifest = BTreeMap::new(); manifest.insert("manifest-version".to_string(), - toml::encode(&manifest_version)); - manifest.insert("date".to_string(), toml::encode(&date)); + toml::Value::String(manifest_version)); + manifest.insert("date".to_string(), toml::Value::String(date)); manifest.insert("pkg".to_string(), toml::encode(&pkg)); let manifest = toml::Value::Table(manifest).to_string(); @@ -362,7 +362,8 @@ impl Builder { fn hash(&self, path: &Path) -> String { let sha = t!(Command::new("shasum") .arg("-a").arg("256") - .arg(path) + .arg(path.file_name().unwrap()) + .current_dir(path.parent().unwrap()) .output()); assert!(sha.status.success());