From 50be479475799b6e3f8a2d842faf43f6cc246e4e Mon Sep 17 00:00:00 2001 From: Aaron Power Date: Wed, 6 Feb 2019 15:42:21 +0100 Subject: [PATCH 01/14] Updated RELEASES.md for 1.33.0 --- RELEASES.md | 126 ++++++++++++++++++++++++++++++++++++++++++++++++++++ 1 file changed, 126 insertions(+) diff --git a/RELEASES.md b/RELEASES.md index 83c44774da283..d2d92512d4427 100644 --- a/RELEASES.md +++ b/RELEASES.md @@ -1,3 +1,129 @@ +Version 1.33.0 (2019-02-28) +========================== + +Language +-------- +- [You can now use the `cfg(target_vendor)` attribute.][57465] E.g. + `#[cfg(target_vendor="linux")] fn main() { println!("Hello Linux!"); }` +- [You can now have multiple patterns in `if let` and `while let` + expressions.][57532] You can do this with the same syntax as a `match` + expression. E.g. + ```rust + enum Creature { + Crab(String), + Person(String), + } + + fn main() { + let state = Creature::Crab("Ferrous"); + + if let Creature::Crab(name) | Creature::Person(name) { + println!("This creature's name is: {}", name); + } + } + ``` +- [You can now have irrefutable `if let` and `while let` patterns.][57535] Using + this feature will by default produce a warning as this behaviour can be + unintuitive. E.g. `if let _ = 5 {}` +- [You can now use `let` bindings and pattern destructurcting in + constant functions.][57175] +- [You can now specify multiple attributes in a `cfg_attr` attribute.][57332] + E.g. `#[cfg_attr(all(), must_use, optimize)]` +- [You can now specify a specific alignment with the `#[repr(packed)]` + attribute.][57049] E.g. `#[repr(packed(2))] struct Foo(i16, i32);` is a struct + with an alignment of 2 bytes and a size of 6 bytes. +- [You can now call unsafe constant functions.][57067] E.g. + ```rust + unsafe const fn foo() -> i32 { 5 } + const fn bar() -> i32 { + unsafe { foo() } + } + ``` +- [You can now import an item from a module as a `_`.][56303] This allows you to + import a trait's impls, and not have the name in the namespace. E.g. + ```rust + use std::io::Read as _; + + // Allowed as there is only one `Read` in the module. + pub trait Read {} + ``` +- [`extern` functions will now abort by default when panicking.][55982] + +Compiler +-------- +- [You can now set a linker flavor for `rustc` with the `-Clinker-flavor` + command line argument.][56351] +- [The mininum required LLVM version has been bumped to 6.0.][56642] +- [Added support for the PowerPC64 architecture on FreeBSD.][57615] +- [The `x86_64-fortanix-unknown-sgx` target support has been upgraded to + tier 2 support.][57130] Visit the [platform support] page for information on + Rust's platform support. +- [Added support for the `thumbv7neon-linux-androideabi` and + `thumbv7neon-unknown-linux-gnueabihf` targets.][56947] +- [Added support for the `x86_64-unknown-uefi` target.][56769] + +Libraries +--------- +- [The functions `overflowing_{add, sub, mul, shl, shr}` are now constant + functions for all numeric types.][57566] +- [The `get` method for all `NonZero` types is now constant.][57167] +- [The functions `count_ones`, `count_zeros`, `leading_zeros`, `trailing_zeros`, + `swap_bytes`, `from_be`, `from_le`, `to_be`, `to_le` are now constant for all + numeric types.][57234] +- [`Ipv4Addr::new` is now a constant function][57234] + +Stabilized APIs +--------------- +- [`unix::FileExt::read_exact_at`] +- [`unix::FileExt::write_exact_at`] +- [`Option::transpose`] +- [`Result::transpose`] +- [`convert::identity`] +- [`pin::Pin`] +- [`Vec::resize_with`] +- [`VecDeque::resize_with`] +- [`Duration::as_millis`] +- [`Duration::as_micros`] +- [`Duration::as_nanos`] + +Cargo +----- +- [Cargo should now rebuild a crate if a file was modified during the initial + build.][cargo/6484] + + +[57615]: https://github.com/rust-lang/rust/pull/57615/ +[57465]: https://github.com/rust-lang/rust/pull/57465/ +[57532]: https://github.com/rust-lang/rust/pull/57532/ +[57535]: https://github.com/rust-lang/rust/pull/57535/ +[57566]: https://github.com/rust-lang/rust/pull/57566/ +[57130]: https://github.com/rust-lang/rust/pull/57130/ +[57167]: https://github.com/rust-lang/rust/pull/57167/ +[57175]: https://github.com/rust-lang/rust/pull/57175/ +[57234]: https://github.com/rust-lang/rust/pull/57234/ +[57332]: https://github.com/rust-lang/rust/pull/57332/ +[56947]: https://github.com/rust-lang/rust/pull/56947/ +[57049]: https://github.com/rust-lang/rust/pull/57049/ +[57067]: https://github.com/rust-lang/rust/pull/57067/ +[56769]: https://github.com/rust-lang/rust/pull/56769/ +[56642]: https://github.com/rust-lang/rust/pull/56642/ +[56303]: https://github.com/rust-lang/rust/pull/56303/ +[56351]: https://github.com/rust-lang/rust/pull/56351/ +[55982]: https://github.com/rust-lang/rust/pull/55982/ +[cargo/6484]: https://github.com/rust-lang/cargo/pull/6484/ +[`unix::FileExt::read_exact_at`]: https://doc.rust-lang.org/std/os/unix/fs/trait.FileExt.html#read_exact_at +[`unix::FileExt::write_exact_at`]: https://doc.rust-lang.org/std/os/unix/fs/trait.FileExt.html#write_exact_at +[`Option::transpose`]: https://doc.rust-lang.org/std/option/enum.Option.html#transpose +[`Result::transpose`]: https://doc.rust-lang.org/std/result/enum.Result.html#transpose +[`convert::identity`]: https://doc.rust-lang.org/std/convert/fn.identity.html +[`pin::Pin`]: https://doc.rust-lang.org/std/pin/struct.Pin.html +[`Vec::resize_with`]: https://doc.rust-lang.org/std/vec/struct.Vec.html#resize_with +[`VecDeque::resize_with`]: https://doc.rust-lang.org/std/collections/struct.VecDeque.html#resize_with +[`Duration::as_millis`]: https://doc.rust-lang.org/std/time/struct.Duration.html#as_millis +[`Duration::as_micros`]: https://doc.rust-lang.org/std/time/struct.Duration.html#as_micros +[`Duration::as_nanos`]: https://doc.rust-lang.org/std/time/struct.Duration.html#as_millis + + Version 1.32.0 (2019-01-17) ========================== From 6c71e7d3f7584e2a6d4a41dc7359ea3e06a58328 Mon Sep 17 00:00:00 2001 From: Aaron Power Date: Thu, 7 Feb 2019 10:05:15 +0100 Subject: [PATCH 02/14] Update RELEASES.md --- RELEASES.md | 12 ++++++------ 1 file changed, 6 insertions(+), 6 deletions(-) diff --git a/RELEASES.md b/RELEASES.md index d2d92512d4427..b63ed9cda9c1c 100644 --- a/RELEASES.md +++ b/RELEASES.md @@ -17,7 +17,7 @@ Language fn main() { let state = Creature::Crab("Ferrous"); - if let Creature::Crab(name) | Creature::Person(name) { + if let Creature::Crab(name) | Creature::Person(name) = state { println!("This creature's name is: {}", name); } } @@ -25,7 +25,7 @@ Language - [You can now have irrefutable `if let` and `while let` patterns.][57535] Using this feature will by default produce a warning as this behaviour can be unintuitive. E.g. `if let _ = 5 {}` -- [You can now use `let` bindings and pattern destructurcting in +- [You can now use `let` bindings and pattern destructuring in constant functions.][57175] - [You can now specify multiple attributes in a `cfg_attr` attribute.][57332] E.g. `#[cfg_attr(all(), must_use, optimize)]` @@ -34,7 +34,7 @@ Language with an alignment of 2 bytes and a size of 6 bytes. - [You can now call unsafe constant functions.][57067] E.g. ```rust - unsafe const fn foo() -> i32 { 5 } + const unsafe fn foo() -> i32 { 5 } const fn bar() -> i32 { unsafe { foo() } } @@ -56,8 +56,8 @@ Compiler - [The mininum required LLVM version has been bumped to 6.0.][56642] - [Added support for the PowerPC64 architecture on FreeBSD.][57615] - [The `x86_64-fortanix-unknown-sgx` target support has been upgraded to - tier 2 support.][57130] Visit the [platform support] page for information on - Rust's platform support. + tier 2 support.][57130] Visit the [platform support][platform-support] page for + information on Rust's platform support. - [Added support for the `thumbv7neon-linux-androideabi` and `thumbv7neon-unknown-linux-gnueabihf` targets.][56947] - [Added support for the `x86_64-unknown-uefi` target.][56769] @@ -122,7 +122,7 @@ Cargo [`Duration::as_millis`]: https://doc.rust-lang.org/std/time/struct.Duration.html#as_millis [`Duration::as_micros`]: https://doc.rust-lang.org/std/time/struct.Duration.html#as_micros [`Duration::as_nanos`]: https://doc.rust-lang.org/std/time/struct.Duration.html#as_millis - +[platform-support]: https://forge.rust-lang.org/platform-support.html Version 1.32.0 (2019-01-17) ========================== From fb3ae5738a2d2f1ff236c979ac75f85f1aba0061 Mon Sep 17 00:00:00 2001 From: Who? Me?! Date: Sat, 9 Feb 2019 11:39:06 +0100 Subject: [PATCH 03/14] Update RELEASES.md Co-Authored-By: Aaronepower --- RELEASES.md | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/RELEASES.md b/RELEASES.md index b63ed9cda9c1c..9be10b0cb71c9 100644 --- a/RELEASES.md +++ b/RELEASES.md @@ -15,7 +15,7 @@ Language } fn main() { - let state = Creature::Crab("Ferrous"); + let state = Creature::Crab("Ferris"); if let Creature::Crab(name) | Creature::Person(name) = state { println!("This creature's name is: {}", name); From 73921f67e92a65be7b3fe6454ea39a973c3ab8ba Mon Sep 17 00:00:00 2001 From: Mazdak Farrokhzad Date: Tue, 12 Feb 2019 10:40:07 +0100 Subject: [PATCH 04/14] Update RELEASES.md Co-Authored-By: Aaronepower --- RELEASES.md | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/RELEASES.md b/RELEASES.md index 9be10b0cb71c9..23c38964abcf9 100644 --- a/RELEASES.md +++ b/RELEASES.md @@ -25,7 +25,7 @@ Language - [You can now have irrefutable `if let` and `while let` patterns.][57535] Using this feature will by default produce a warning as this behaviour can be unintuitive. E.g. `if let _ = 5 {}` -- [You can now use `let` bindings and pattern destructuring in +- [You can now use `let` bindings, assignments, expression statements, and pattern destructuring in constant functions.][57175] - [You can now specify multiple attributes in a `cfg_attr` attribute.][57332] E.g. `#[cfg_attr(all(), must_use, optimize)]` From 8a026f1cdd7083ed0a54e0eb41096dcb8fe67364 Mon Sep 17 00:00:00 2001 From: Mazdak Farrokhzad Date: Tue, 12 Feb 2019 10:40:14 +0100 Subject: [PATCH 05/14] Update RELEASES.md Co-Authored-By: Aaronepower --- RELEASES.md | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/RELEASES.md b/RELEASES.md index 23c38964abcf9..db7cb82607b13 100644 --- a/RELEASES.md +++ b/RELEASES.md @@ -26,7 +26,7 @@ Language this feature will by default produce a warning as this behaviour can be unintuitive. E.g. `if let _ = 5 {}` - [You can now use `let` bindings, assignments, expression statements, and pattern destructuring in - constant functions.][57175] + const functions.][57175] - [You can now specify multiple attributes in a `cfg_attr` attribute.][57332] E.g. `#[cfg_attr(all(), must_use, optimize)]` - [You can now specify a specific alignment with the `#[repr(packed)]` From 4c0a3d58942f84605735b74267cdc137f7650f7b Mon Sep 17 00:00:00 2001 From: Mazdak Farrokhzad Date: Tue, 12 Feb 2019 10:40:22 +0100 Subject: [PATCH 06/14] Update RELEASES.md Co-Authored-By: Aaronepower --- RELEASES.md | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/RELEASES.md b/RELEASES.md index db7cb82607b13..5672bacb7365f 100644 --- a/RELEASES.md +++ b/RELEASES.md @@ -68,7 +68,7 @@ Libraries functions for all numeric types.][57566] - [The `get` method for all `NonZero` types is now constant.][57167] - [The functions `count_ones`, `count_zeros`, `leading_zeros`, `trailing_zeros`, - `swap_bytes`, `from_be`, `from_le`, `to_be`, `to_le` are now constant for all + `swap_bytes`, `from_be`, `from_le`, `to_be`, `to_le` are now const for all numeric types.][57234] - [`Ipv4Addr::new` is now a constant function][57234] From ee3371ec912c542298fb693f782e74c8ebdea118 Mon Sep 17 00:00:00 2001 From: Mazdak Farrokhzad Date: Tue, 12 Feb 2019 10:41:39 +0100 Subject: [PATCH 07/14] Update RELEASES.md Co-Authored-By: Aaronepower --- RELEASES.md | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/RELEASES.md b/RELEASES.md index 5672bacb7365f..5ab7571dfcd74 100644 --- a/RELEASES.md +++ b/RELEASES.md @@ -70,7 +70,7 @@ Libraries - [The functions `count_ones`, `count_zeros`, `leading_zeros`, `trailing_zeros`, `swap_bytes`, `from_be`, `from_le`, `to_be`, `to_le` are now const for all numeric types.][57234] -- [`Ipv4Addr::new` is now a constant function][57234] +- [`Ipv4Addr::new` is now a const function][57234] Stabilized APIs --------------- From a4964500a2a7cc680df40847267a1345090b8ed9 Mon Sep 17 00:00:00 2001 From: Mazdak Farrokhzad Date: Wed, 13 Feb 2019 10:54:13 +0100 Subject: [PATCH 08/14] Update RELEASES.md Co-Authored-By: Aaronepower --- RELEASES.md | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/RELEASES.md b/RELEASES.md index 5ab7571dfcd74..b4e4f2f3c662f 100644 --- a/RELEASES.md +++ b/RELEASES.md @@ -39,7 +39,7 @@ Language unsafe { foo() } } ``` -- [You can now import an item from a module as a `_`.][56303] This allows you to +- [You can now import an item from a module as an `_`.][56303] This allows you to import a trait's impls, and not have the name in the namespace. E.g. ```rust use std::io::Read as _; From 262156433e18a2de5a85cb2079c545a34b8934fe Mon Sep 17 00:00:00 2001 From: Aaron Power Date: Wed, 20 Feb 2019 15:51:22 +0100 Subject: [PATCH 09/14] Update RELEASES.md --- RELEASES.md | 69 ++++++++++++++++++++++++++++++++++------------------- 1 file changed, 44 insertions(+), 25 deletions(-) diff --git a/RELEASES.md b/RELEASES.md index b4e4f2f3c662f..659fa901a0101 100644 --- a/RELEASES.md +++ b/RELEASES.md @@ -5,21 +5,25 @@ Language -------- - [You can now use the `cfg(target_vendor)` attribute.][57465] E.g. `#[cfg(target_vendor="linux")] fn main() { println!("Hello Linux!"); }` +- [Integer patterns such as in a match expression can now be exhaustive.][56362] + E.g. You can have match statement on a `u8` that covers `0..=255` and + you would no longer be required to have a `_ => unreachable!()` case. - [You can now have multiple patterns in `if let` and `while let` expressions.][57532] You can do this with the same syntax as a `match` expression. E.g. ```rust enum Creature { - Crab(String), - Person(String), + Crab(String), + Lobster(String), + Person(String), } fn main() { - let state = Creature::Crab("Ferris"); + let state = Creature::Crab("Ferris"); - if let Creature::Crab(name) | Creature::Person(name) = state { - println!("This creature's name is: {}", name); - } + if let Creature::Crab(name) | Creature::Person(name) = state { + println!("This creature's name is: {}", name); + } } ``` - [You can now have irrefutable `if let` and `while let` patterns.][57535] Using @@ -27,18 +31,18 @@ Language unintuitive. E.g. `if let _ = 5 {}` - [You can now use `let` bindings, assignments, expression statements, and pattern destructuring in const functions.][57175] -- [You can now specify multiple attributes in a `cfg_attr` attribute.][57332] - E.g. `#[cfg_attr(all(), must_use, optimize)]` -- [You can now specify a specific alignment with the `#[repr(packed)]` - attribute.][57049] E.g. `#[repr(packed(2))] struct Foo(i16, i32);` is a struct - with an alignment of 2 bytes and a size of 6 bytes. -- [You can now call unsafe constant functions.][57067] E.g. +- [You can now call unsafe const functions.][57067] E.g. ```rust const unsafe fn foo() -> i32 { 5 } const fn bar() -> i32 { unsafe { foo() } } ``` +- [You can now specify multiple attributes in a `cfg_attr` attribute.][57332] + E.g. `#[cfg_attr(all(), must_use, optimize)]` +- [You can now specify a specific alignment with the `#[repr(packed)]` + attribute.][57049] E.g. `#[repr(packed(2))] struct Foo(i16, i32);` is a struct + with an alignment of 2 bytes and a size of 6 bytes. - [You can now import an item from a module as an `_`.][56303] This allows you to import a trait's impls, and not have the name in the namespace. E.g. ```rust @@ -64,13 +68,17 @@ Compiler Libraries --------- -- [The functions `overflowing_{add, sub, mul, shl, shr}` are now constant +- [The functions `overflowing_{add, sub, mul, shl, shr}` are now `const` functions for all numeric types.][57566] -- [The `get` method for all `NonZero` types is now constant.][57167] +- [The functions `rotate_left`, `rotate_right`, and `wrapping_{add, sub, mul, shl, shr}` + are now `const` functions for all numeric types.][57105] +- [The functions `is_positive` and `is_negative` are now `const` functions for + all signed numeric types.][57105] +- [The `get` method for all `NonZero` types is now `const`.][57167] - [The functions `count_ones`, `count_zeros`, `leading_zeros`, `trailing_zeros`, - `swap_bytes`, `from_be`, `from_le`, `to_be`, `to_le` are now const for all + `swap_bytes`, `from_be`, `from_le`, `to_be`, `to_le` are now `const` for all numeric types.][57234] -- [`Ipv4Addr::new` is now a const function][57234] +- [`Ipv4Addr::new` is now a `const` function][57234] Stabilized APIs --------------- @@ -80,17 +88,25 @@ Stabilized APIs - [`Result::transpose`] - [`convert::identity`] - [`pin::Pin`] +- [`marker::Unpin`] +- [`marker::PhantomPinned`] - [`Vec::resize_with`] - [`VecDeque::resize_with`] - [`Duration::as_millis`] - [`Duration::as_micros`] - [`Duration::as_nanos`] + Cargo ----- - [Cargo should now rebuild a crate if a file was modified during the initial build.][cargo/6484] +Compatibility Notes +------------------- +- The functions `str::{trim_left, trim_right, trim_left_matches, trim_right_matches}` + are now offically deprecated, and their usage will now produce a warning. Please use the + `str::{trim_start, trim_end, trim_start_matches, trim_end_matches}` functions instead. [57615]: https://github.com/rust-lang/rust/pull/57615/ [57465]: https://github.com/rust-lang/rust/pull/57465/ @@ -110,18 +126,21 @@ Cargo [56303]: https://github.com/rust-lang/rust/pull/56303/ [56351]: https://github.com/rust-lang/rust/pull/56351/ [55982]: https://github.com/rust-lang/rust/pull/55982/ +[57105]: https://github.com/rust-lang/rust/pull/57105 [cargo/6484]: https://github.com/rust-lang/cargo/pull/6484/ -[`unix::FileExt::read_exact_at`]: https://doc.rust-lang.org/std/os/unix/fs/trait.FileExt.html#read_exact_at -[`unix::FileExt::write_exact_at`]: https://doc.rust-lang.org/std/os/unix/fs/trait.FileExt.html#write_exact_at -[`Option::transpose`]: https://doc.rust-lang.org/std/option/enum.Option.html#transpose -[`Result::transpose`]: https://doc.rust-lang.org/std/result/enum.Result.html#transpose +[`unix::FileExt::read_exact_at`]: https://doc.rust-lang.org/std/os/unix/fs/trait.FileExt.html#method.read_exact_at +[`unix::FileExt::write_exact_at`]: https://doc.rust-lang.org/std/os/unix/fs/trait.FileExt.html#method.write_exact_at +[`Option::transpose`]: https://doc.rust-lang.org/std/option/enum.Option.html#method.transpose +[`Result::transpose`]: https://doc.rust-lang.org/std/result/enum.Result.html#method.transpose [`convert::identity`]: https://doc.rust-lang.org/std/convert/fn.identity.html [`pin::Pin`]: https://doc.rust-lang.org/std/pin/struct.Pin.html -[`Vec::resize_with`]: https://doc.rust-lang.org/std/vec/struct.Vec.html#resize_with -[`VecDeque::resize_with`]: https://doc.rust-lang.org/std/collections/struct.VecDeque.html#resize_with -[`Duration::as_millis`]: https://doc.rust-lang.org/std/time/struct.Duration.html#as_millis -[`Duration::as_micros`]: https://doc.rust-lang.org/std/time/struct.Duration.html#as_micros -[`Duration::as_nanos`]: https://doc.rust-lang.org/std/time/struct.Duration.html#as_millis +[`marker::Unpin`]: https://doc.rust-lang.org/stable/std/marker/trait.Unpin.html +[`marker::PhantomPinned`]: https://doc.rust-lang.org/nightly/std/marker/struct.PhantomPinned.html +[`Vec::resize_with`]: https://doc.rust-lang.org/std/vec/struct.Vec.html#method.resize_with +[`VecDeque::resize_with`]: https://doc.rust-lang.org/std/collections/struct.VecDeque.html#method.resize_with +[`Duration::as_millis`]: https://doc.rust-lang.org/std/time/struct.Duration.html#method.as_millis +[`Duration::as_micros`]: https://doc.rust-lang.org/std/time/struct.Duration.html#method.as_micros +[`Duration::as_nanos`]: https://doc.rust-lang.org/std/time/struct.Duration.html#method.as_nanos [platform-support]: https://forge.rust-lang.org/platform-support.html Version 1.32.0 (2019-01-17) From d072510579e80721bc9c33b01031a6346b33c2f9 Mon Sep 17 00:00:00 2001 From: Aaron Power Date: Wed, 20 Feb 2019 15:53:44 +0100 Subject: [PATCH 10/14] Update RELEASES.md --- RELEASES.md | 2 ++ 1 file changed, 2 insertions(+) diff --git a/RELEASES.md b/RELEASES.md index 659fa901a0101..b0aed965c0205 100644 --- a/RELEASES.md +++ b/RELEASES.md @@ -52,6 +52,7 @@ Language pub trait Read {} ``` - [`extern` functions will now abort by default when panicking.][55982] + This was previously undefined behaviour. Compiler -------- @@ -126,6 +127,7 @@ Compatibility Notes [56303]: https://github.com/rust-lang/rust/pull/56303/ [56351]: https://github.com/rust-lang/rust/pull/56351/ [55982]: https://github.com/rust-lang/rust/pull/55982/ +[56362]: https://github.com/rust-lang/rust/pull/56362 [57105]: https://github.com/rust-lang/rust/pull/57105 [cargo/6484]: https://github.com/rust-lang/cargo/pull/6484/ [`unix::FileExt::read_exact_at`]: https://doc.rust-lang.org/std/os/unix/fs/trait.FileExt.html#method.read_exact_at From 42d749c9ec7b86df782c49ce2d0341c05739f108 Mon Sep 17 00:00:00 2001 From: Trevor Spiteri Date: Wed, 20 Feb 2019 23:10:54 +0100 Subject: [PATCH 11/14] Update RELEASES.md Co-Authored-By: Aaronepower --- RELEASES.md | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/RELEASES.md b/RELEASES.md index b0aed965c0205..e72cfa1eabe92 100644 --- a/RELEASES.md +++ b/RELEASES.md @@ -131,7 +131,7 @@ Compatibility Notes [57105]: https://github.com/rust-lang/rust/pull/57105 [cargo/6484]: https://github.com/rust-lang/cargo/pull/6484/ [`unix::FileExt::read_exact_at`]: https://doc.rust-lang.org/std/os/unix/fs/trait.FileExt.html#method.read_exact_at -[`unix::FileExt::write_exact_at`]: https://doc.rust-lang.org/std/os/unix/fs/trait.FileExt.html#method.write_exact_at +[`unix::FileExt::write_all_at`]: https://doc.rust-lang.org/std/os/unix/fs/trait.FileExt.html#method.write_all_at [`Option::transpose`]: https://doc.rust-lang.org/std/option/enum.Option.html#method.transpose [`Result::transpose`]: https://doc.rust-lang.org/std/result/enum.Result.html#method.transpose [`convert::identity`]: https://doc.rust-lang.org/std/convert/fn.identity.html From 8060eb473d601776e415b007c4ffed2c2e6a5e27 Mon Sep 17 00:00:00 2001 From: Aaron Power Date: Thu, 21 Feb 2019 10:27:22 +0100 Subject: [PATCH 12/14] Update RELEASES.md --- RELEASES.md | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/RELEASES.md b/RELEASES.md index e72cfa1eabe92..1719ab987a3db 100644 --- a/RELEASES.md +++ b/RELEASES.md @@ -84,7 +84,7 @@ Libraries Stabilized APIs --------------- - [`unix::FileExt::read_exact_at`] -- [`unix::FileExt::write_exact_at`] +- [`unix::FileExt::write_all_at`] - [`Option::transpose`] - [`Result::transpose`] - [`convert::identity`] From 0ab2aedb7f08e7f14946769110cfd436622fcf5e Mon Sep 17 00:00:00 2001 From: Aaron Power Date: Thu, 21 Feb 2019 14:10:24 +0100 Subject: [PATCH 13/14] Update RELEASES.md --- RELEASES.md | 15 ++++++++------- 1 file changed, 8 insertions(+), 7 deletions(-) diff --git a/RELEASES.md b/RELEASES.md index 1719ab987a3db..7812fbb612852 100644 --- a/RELEASES.md +++ b/RELEASES.md @@ -69,14 +69,14 @@ Compiler Libraries --------- -- [The functions `overflowing_{add, sub, mul, shl, shr}` are now `const` +- [The methods `overflowing_{add, sub, mul, shl, shr}` are now `const` functions for all numeric types.][57566] -- [The functions `rotate_left`, `rotate_right`, and `wrapping_{add, sub, mul, shl, shr}` +- [The methods `rotate_left`, `rotate_right`, and `wrapping_{add, sub, mul, shl, shr}` are now `const` functions for all numeric types.][57105] -- [The functions `is_positive` and `is_negative` are now `const` functions for +- [The methods `is_positive` and `is_negative` are now `const` functions for all signed numeric types.][57105] - [The `get` method for all `NonZero` types is now `const`.][57167] -- [The functions `count_ones`, `count_zeros`, `leading_zeros`, `trailing_zeros`, +- [The methods `count_ones`, `count_zeros`, `leading_zeros`, `trailing_zeros`, `swap_bytes`, `from_be`, `from_le`, `to_be`, `to_le` are now `const` for all numeric types.][57234] - [`Ipv4Addr::new` is now a `const` function][57234] @@ -105,9 +105,10 @@ Cargo Compatibility Notes ------------------- -- The functions `str::{trim_left, trim_right, trim_left_matches, trim_right_matches}` - are now offically deprecated, and their usage will now produce a warning. Please use the - `str::{trim_start, trim_end, trim_start_matches, trim_end_matches}` functions instead. +- The methods `str::{trim_left, trim_right, trim_left_matches, trim_right_matches}` + are now deprecated in the standard library, and their usage will now produce a warning. + Please use the `str::{trim_start, trim_end, trim_start_matches, trim_end_matches}` + methods instead. [57615]: https://github.com/rust-lang/rust/pull/57615/ [57465]: https://github.com/rust-lang/rust/pull/57465/ From fda51c2fbd0c646af5c5356dba2ad59d2c8ea8f8 Mon Sep 17 00:00:00 2001 From: Mazdak Farrokhzad Date: Fri, 22 Feb 2019 17:50:18 +0100 Subject: [PATCH 14/14] Update RELEASES.md --- RELEASES.md | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/RELEASES.md b/RELEASES.md index 7812fbb612852..841467b69c986 100644 --- a/RELEASES.md +++ b/RELEASES.md @@ -22,20 +22,20 @@ Language let state = Creature::Crab("Ferris"); if let Creature::Crab(name) | Creature::Person(name) = state { - println!("This creature's name is: {}", name); + println!("This creature's name is: {}", name); } } ``` - [You can now have irrefutable `if let` and `while let` patterns.][57535] Using this feature will by default produce a warning as this behaviour can be unintuitive. E.g. `if let _ = 5 {}` -- [You can now use `let` bindings, assignments, expression statements, and pattern destructuring in - const functions.][57175] +- [You can now use `let` bindings, assignments, expression statements, + and irrefutable pattern destructuring in const functions.][57175] - [You can now call unsafe const functions.][57067] E.g. ```rust const unsafe fn foo() -> i32 { 5 } const fn bar() -> i32 { - unsafe { foo() } + unsafe { foo() } } ``` - [You can now specify multiple attributes in a `cfg_attr` attribute.][57332]