diff --git a/RELEASES.md b/RELEASES.md index d38d7667a73..97edaa122ef 100644 --- a/RELEASES.md +++ b/RELEASES.md @@ -1,16 +1,6 @@ Version 1.7.0 (2016-03-03) ========================== -Language --------- - -* Soundness fixes to the interactions between associated types and - lifetimes, specified in [RFC 1214], [now generate errors][1.7sf] for - code that violates the new rules. This is a significant change that - is known to break existing code, so it has emitted warnings for the - new error cases since 1.4 to give crate authors time to adapt. The - details of what is changing are subtle; read the RFC for more. - Libraries --------- @@ -59,6 +49,17 @@ Libraries * [`IntoStringError::into_cstring`] * [`IntoStringError::utf8_error`] * `Error for IntoStringError` + * Hashing + * [`std::hash::BuildHasher`] + * [`BuildHasher::Hasher`] + * [`BuildHasher::build_hasher`] + * [`std::hash::BuildHasherDefault`] + * [`HashMap::with_hasher`] + * [`HashMap::with_capacity_and_hasher`] + * [`HashSet::with_hasher`] + * [`HashSet::with_capacity_and_hasher`] + * [`std::collections::hash_map::RandomState`] + * [`RandomState::new`] * [Validating UTF-8 is faster by a factor of between 7 and 14x for ASCII input][1.7utf8]. This means that creating `String`s and `str`s from bytes is faster. @@ -80,9 +81,6 @@ Libraries Misc ---- -* [The `--error-format=json` flag to `rustc` causes it to emit errors - in JSON format][1.7j]. This is an unstable flag and so also requires - the `-Z unstable-options` flag. * [When running tests with `--test`, rustdoc will pass `--cfg` arguments to the compiler][1.7dt]. * [The compiler is built with RPATH information by default][1.7rpa]. @@ -104,6 +102,12 @@ Cargo Compatibility Notes ------------------- +* Soundness fixes to the interactions between associated types and + lifetimes, specified in [RFC 1214], [now generate errors][1.7sf] for + code that violates the new rules. This is a significant change that + is known to break existing code, so it has emitted warnings for the + new error cases since 1.4 to give crate authors time to adapt. The + details of what is changing are subtle; read the RFC for more. * [Several bugs in the compiler's visibility calculations were fixed][1.7v]. Since this was found to break significant amounts of code, the new errors will be emitted as warnings for several release @@ -126,7 +130,6 @@ Compatibility Notes [1.7dta]: https://github.com/rust-lang/rust/pull/30394 [1.7f]: https://github.com/rust-lang/rust/pull/30672 [1.7h]: https://github.com/rust-lang/rust/pull/30818 -[1.7j]: https://github.com/rust-lang/rust/pull/30711 [1.7ll]: https://github.com/rust-lang/rust/pull/30663 [1.7m]: https://github.com/rust-lang/rust/pull/30381 [1.7p]: https://github.com/rust-lang/rust/pull/30681 @@ -137,11 +140,15 @@ Compatibility Notes [1.7utf8]: https://github.com/rust-lang/rust/pull/30740 [1.7v]: https://github.com/rust-lang/rust/pull/29973 [RFC 1214]: https://github.com/rust-lang/rfcs/blob/master/text/1214-projections-lifetimes-and-wf.md -[`clone_from_slice`]: http://doc.rust-lang.org/nightly/std/primitive.slice.html#method.clone_from_slice -[`sort_by_key`]: http://doc.rust-lang.org/nightly/std/primitive.slice.html#method.sort_by_key +[`BuildHasher::Hasher`]: http://doc.rust-lang.org/nightly/std/hash/trait.Hasher.html +[`BuildHasher::build_hasher`]: http://doc.rust-lang.org/nightly/std/hash/trait.BuildHasher.html#tymethod.build_hasher [`CString::into_bytes_with_nul`]: http://doc.rust-lang.org/nightly/std/ffi/struct.CString.html#method.into_bytes_with_nul [`CString::into_bytes`]: http://doc.rust-lang.org/nightly/std/ffi/struct.CString.html#method.into_bytes [`CString::into_string`]: http://doc.rust-lang.org/nightly/std/ffi/struct.CString.html#method.into_string +[`HashMap::with_capacity_and_hasher`]: http://doc.rust-lang.org/nightly/std/collections/struct.HashMap.html#method.with_capacity_and_hasher +[`HashMap::with_hasher`]: http://doc.rust-lang.org/nightly/std/collections/struct.HashMap.html#method.with_hasher +[`HashSet::with_capacity_and_hasher`]: http://doc.rust-lang.org/nightly/std/collections/struct.HashSet.html#method.with_capacity_and_hasher +[`HashSet::with_hasher`]: http://doc.rust-lang.org/nightly/std/collections/struct.HashSet.html#method.with_hasher [`IntoStringError::into_cstring`]: http://doc.rust-lang.org/nightly/std/ffi/struct.IntoStringError.html#method.into_cstring [`IntoStringError::utf8_error`]: http://doc.rust-lang.org/nightly/std/ffi/struct.IntoStringError.html#method.utf8_error [`Ipv4Addr::is_broadcast`]: http://doc.rust-lang.org/nightly/std/net/struct.Ipv4Addr.html#method.is_broadcast @@ -154,10 +161,12 @@ Compatibility Notes [`Ipv6Addr::is_multicast`]: http://doc.rust-lang.org/nightly/std/net/struct.Ipv6Addr.html#method.is_multicast [`Ipv6Addr::is_unspecified`]: http://doc.rust-lang.org/nightly/std/net/struct.Ipv6Addr.html#method.is_unspecified [`Path::strip_prefix`]: http://doc.rust-lang.org/nightly/std/path/struct.Path.html#method.strip_prefix +[`RandomState::new`]: http://doc.rust-lang.org/nightly/std/collections/hash_map/struct.RandomState.html#method.new [`String::as_mut_str`]: http://doc.rust-lang.org/nightly/std/string/struct.String.html#method.as_mut_str [`String::as_str`]: http://doc.rust-lang.org/nightly/std/string/struct.String.html#method.as_str [`Vec::as_mut_slice`]: http://doc.rust-lang.org/nightly/std/vec/struct.Vec.html#method.as_mut_slice [`Vec::as_slice`]: http://doc.rust-lang.org/nightly/std/vec/struct.Vec.html#method.as_slice +[`clone_from_slice`]: http://doc.rust-lang.org/nightly/std/primitive.slice.html#method.clone_from_slice [`ffi::IntoStringError`]: http://doc.rust-lang.org/nightly/std/ffi/struct.IntoStringError.html [`i32::checked_neg`]: http://doc.rust-lang.org/nightly/std/primitive.i32.html#method.checked_neg [`i32::checked_rem`]: http://doc.rust-lang.org/nightly/std/primitive.i32.html#method.checked_rem @@ -173,8 +182,13 @@ Compatibility Notes [`i32::overflowing_sub`]: http://doc.rust-lang.org/nightly/std/primitive.i32.html#method.overflowing_sub [`i32::saturating_mul`]: http://doc.rust-lang.org/nightly/std/primitive.i32.html#method.saturating_mul [`path::StripPrefixError`]: http://doc.rust-lang.org/nightly/std/path/struct.StripPrefixError.html +[`sort_by_key`]: http://doc.rust-lang.org/nightly/std/primitive.slice.html#method.sort_by_key +[`std::collections::hash_map::RandomState`]: http://doc.rust-lang.org/nightly/std/collections/hash_map/struct.RandomState.html +[`std::hash::BuildHasherDefault`]: http://doc.rust-lang.org/nightly/std/hash/struct.BuildHasherDefault.html +[`std::hash::BuildHasher`]: http://doc.rust-lang.org/nightly/std/hash/trait.BuildHasher.html [`u32::checked_neg`]: http://doc.rust-lang.org/nightly/std/primitive.u32.html#method.checked_neg [`u32::checked_rem`]: http://doc.rust-lang.org/nightly/std/primitive.u32.html#method.checked_rem +[`u32::checked_neg`]: http://doc.rust-lang.org/nightly/std/primitive.u32.html#method.checked_neg [`u32::checked_shl`]: http://doc.rust-lang.org/nightly/std/primitive.u32.html#method.checked_shl [`u32::overflowing_add`]: http://doc.rust-lang.org/nightly/std/primitive.u32.html#method.overflowing_add [`u32::overflowing_div`]: http://doc.rust-lang.org/nightly/std/primitive.u32.html#method.overflowing_div diff --git a/mk/main.mk b/mk/main.mk index 38842a3e8a7..887247b80c4 100644 --- a/mk/main.mk +++ b/mk/main.mk @@ -13,7 +13,7 @@ ###################################################################### # The version number -CFG_RELEASE_NUM=1.8.0 +CFG_RELEASE_NUM=1.9.0 # An optional number to put after the label, e.g. '.2' -> '-beta.2' # NB Make sure it starts with a dot to conform to semver pre-release diff --git a/src/doc/book/references-and-borrowing.md b/src/doc/book/references-and-borrowing.md index e7faf174600..0a4e09ed00a 100644 --- a/src/doc/book/references-and-borrowing.md +++ b/src/doc/book/references-and-borrowing.md @@ -211,9 +211,10 @@ fn main() { ``` In other words, the mutable borrow is held through the rest of our example. What -we want is for the mutable borrow to end _before_ we try to call `println!` and -make an immutable borrow. In Rust, borrowing is tied to the scope that the -borrow is valid for. And our scopes look like this: +we want is for the mutable borrow by `y` to end so that the resource can be +returned to the owner, `x`. `x` can then provide a mutable borrow to `println!`. +In Rust, borrowing is tied to the scope that the borrow is valid for. And our +scopes look like this: ```rust,ignore let mut x = 5; @@ -378,4 +379,3 @@ statement 1 at 3:14 In the above example, `y` is declared before `x`, meaning that `y` lives longer than `x`, which is not allowed. - diff --git a/src/doc/book/unsafe.md b/src/doc/book/unsafe.md index ecd196a9f0d..af4e351569f 100644 --- a/src/doc/book/unsafe.md +++ b/src/doc/book/unsafe.md @@ -4,7 +4,7 @@ Rust’s main draw is its powerful static guarantees about behavior. But safety checks are conservative by nature: there are some programs that are actually safe, but the compiler is not able to verify this is true. To write these kinds of programs, we need to tell the compiler to relax its restrictions a bit. For -this, Rust has a keyword, `unsafe`. Code using `unsafe` has less restrictions +this, Rust has a keyword, `unsafe`. Code using `unsafe` has fewer restrictions than normal code does. Let’s go over the syntax, and then we’ll talk semantics. `unsafe` is used in diff --git a/src/libcore/array.rs b/src/libcore/array.rs index 0c5eada2165..45fc5ff8009 100644 --- a/src/libcore/array.rs +++ b/src/libcore/array.rs @@ -12,7 +12,7 @@ //! up to a certain length. Eventually we should able to generalize //! to all lengths. //! -//! *[See also the array primitive type](../primitive.array.html).* +//! *[See also the array primitive type](../../std/primitive.array.html).* #![unstable(feature = "fixed_size_array", reason = "traits and impls are better expressed through generic \ diff --git a/src/libcore/num/i16.rs b/src/libcore/num/i16.rs index 40544979417..1dd820980f4 100644 --- a/src/libcore/num/i16.rs +++ b/src/libcore/num/i16.rs @@ -10,7 +10,7 @@ //! The 16-bit signed integer type. //! -//! *[See also the `i16` primitive type](../primitive.i16.html).* +//! *[See also the `i16` primitive type](../../std/primitive.i16.html).* #![stable(feature = "rust1", since = "1.0.0")] diff --git a/src/libcore/num/i32.rs b/src/libcore/num/i32.rs index 5d2ade8d8e0..8a2168933dc 100644 --- a/src/libcore/num/i32.rs +++ b/src/libcore/num/i32.rs @@ -10,7 +10,7 @@ //! The 32-bit signed integer type. //! -//! *[See also the `i32` primitive type](../primitive.i32.html).* +//! *[See also the `i32` primitive type](../../std/primitive.i32.html).* #![stable(feature = "rust1", since = "1.0.0")] diff --git a/src/libcore/num/i64.rs b/src/libcore/num/i64.rs index b1d43a3b838..2ce9eb11936 100644 --- a/src/libcore/num/i64.rs +++ b/src/libcore/num/i64.rs @@ -10,7 +10,7 @@ //! The 64-bit signed integer type. //! -//! *[See also the `i64` primitive type](../primitive.i64.html).* +//! *[See also the `i64` primitive type](../../std/primitive.i64.html).* #![stable(feature = "rust1", since = "1.0.0")] diff --git a/src/libcore/num/i8.rs b/src/libcore/num/i8.rs index ee003d92b28..8b5a7f1910e 100644 --- a/src/libcore/num/i8.rs +++ b/src/libcore/num/i8.rs @@ -10,7 +10,7 @@ //! The 8-bit signed integer type. //! -//! *[See also the `i8` primitive type](../primitive.i8.html).* +//! *[See also the `i8` primitive type](../../std/primitive.i8.html).* #![stable(feature = "rust1", since = "1.0.0")] diff --git a/src/libcore/num/isize.rs b/src/libcore/num/isize.rs index 034a5c0eb89..de5b1777f93 100644 --- a/src/libcore/num/isize.rs +++ b/src/libcore/num/isize.rs @@ -10,7 +10,7 @@ //! The pointer-sized signed integer type. //! -//! *[See also the `isize` primitive type](../primitive.isize.html).* +//! *[See also the `isize` primitive type](../../std/primitive.isize.html).* #![stable(feature = "rust1", since = "1.0.0")] diff --git a/src/libcore/num/u16.rs b/src/libcore/num/u16.rs index d7e320267c6..d34d87caa55 100644 --- a/src/libcore/num/u16.rs +++ b/src/libcore/num/u16.rs @@ -10,7 +10,7 @@ //! The 16-bit unsigned integer type. //! -//! *[See also the `u16` primitive type](../primitive.u16.html).* +//! *[See also the `u16` primitive type](../../std/primitive.u16.html).* #![stable(feature = "rust1", since = "1.0.0")] diff --git a/src/libcore/num/u32.rs b/src/libcore/num/u32.rs index 9a26a39d5b3..f9c9099e47f 100644 --- a/src/libcore/num/u32.rs +++ b/src/libcore/num/u32.rs @@ -10,7 +10,7 @@ //! The 32-bit unsigned integer type. //! -//! *[See also the `u32` primitive type](../primitive.u32.html).* +//! *[See also the `u32` primitive type](../../std/primitive.u32.html).* #![stable(feature = "rust1", since = "1.0.0")] diff --git a/src/libcore/num/u64.rs b/src/libcore/num/u64.rs index e12c2c26542..8dfe4335a3d 100644 --- a/src/libcore/num/u64.rs +++ b/src/libcore/num/u64.rs @@ -10,7 +10,7 @@ //! The 64-bit unsigned integer type. //! -//! *[See also the `u64` primitive type](../primitive.u64.html).* +//! *[See also the `u64` primitive type](../../std/primitive.u64.html).* #![stable(feature = "rust1", since = "1.0.0")] diff --git a/src/libcore/num/u8.rs b/src/libcore/num/u8.rs index 0eb63bd9f3a..0106ee8e401 100644 --- a/src/libcore/num/u8.rs +++ b/src/libcore/num/u8.rs @@ -10,7 +10,7 @@ //! The 8-bit unsigned integer type. //! -//! *[See also the `u8` primitive type](../primitive.u8.html).* +//! *[See also the `u8` primitive type](../../std/primitive.u8.html).* #![stable(feature = "rust1", since = "1.0.0")] diff --git a/src/libcore/num/usize.rs b/src/libcore/num/usize.rs index 875ab32fa8c..0c7d16a41bc 100644 --- a/src/libcore/num/usize.rs +++ b/src/libcore/num/usize.rs @@ -10,7 +10,7 @@ //! The pointer-sized unsigned integer type. //! -//! *[See also the `usize` primitive type](../primitive.usize.html).* +//! *[See also the `usize` primitive type](../../std/primitive.usize.html).* #![stable(feature = "rust1", since = "1.0.0")] diff --git a/src/libcore/ptr.rs b/src/libcore/ptr.rs index cb109c010c7..3cf722668b2 100644 --- a/src/libcore/ptr.rs +++ b/src/libcore/ptr.rs @@ -12,7 +12,7 @@ //! Raw, unsafe pointers, `*const T`, and `*mut T` //! -//! *[See also the pointer primitive types](../primitive.pointer.html).* +//! *[See also the pointer primitive types](../../std/primitive.pointer.html).* #![stable(feature = "rust1", since = "1.0.0")]