From 81e40278bd0ad707a3be2396a076f151d1ff1072 Mon Sep 17 00:00:00 2001 From: Erin Power Date: Sun, 9 Feb 2020 10:39:48 +0100 Subject: [PATCH 1/5] Update RELEASES.md for 1.42.0 --- RELEASES.md | 77 +++++++++++++++++++++++++++++++++++++++++++++++++++++ 1 file changed, 77 insertions(+) diff --git a/RELEASES.md b/RELEASES.md index 10e485c1a40d5..715c6b5eaaaf1 100644 --- a/RELEASES.md +++ b/RELEASES.md @@ -1,3 +1,80 @@ +Version 1.42.0 (2020-03-12) +========================== + +Language +-------- +- [You can now use `#[repr(transparent)]` on univariant `enum`s.][68122] Meaning + that you can create an enum that has the exact layout and ABI of the type + it contains. +- [You can now use the slice pattern syntax with subslices.][67712] e.g. + ```rust + fn foo(words: &[&str]) { + match words { + ["Hello", "World", "!", ..] => println!("Hello World!"), + ["Foo", "Bar", ..] => println!("Baz"), + rest => println!("{}", rest), + } + } + ``` + +- [Merge `TraitItem` & `ImplItem into `AssocItem`][67131] + +Compiler +-------- +- [Added tier 3\* support for `armv7a-none-eabi`.][68253] +- [Added tier 3 support for `riscv64gc-unknown-linux-gnu`.][68037] +- [`Option::{expect,unwrap}` and + `Result::{expect, expect_err, unwrap, unwrap_err}` now produce panic messages + pointing to the location where they were called, rather than + `core`'s internals. ][67887] + +Libraries +--------- +- [`iter::Empty` now implements Send and Sync for any `T`.][68348] +- [`Pin::{map_unchecked, map_unchecked_mut}` no longer require the return type + to implement `Sized`.][67935] +- [`io::Cursor` now derives `PartialEq` and `Eq`.][67233] +- [`Layout::new` is now `const`.][66254] +- [Added Standard Library support for `riscv64gc-unknown-linux-gnu`.][66899] + + +Stabilized APIs +--------------- +- [`DebugMap::key`] +- [`DebugMap::value`] +- [`ManuallyDrop::take`] +- [`matches!`] +- [`ptr::slice_from_raw_parts_mut`] +- [`ptr::slice_from_raw_parts`] +- [`wait_timeout_while`] +- [`wait_while`] + +Compatibility Notes +------------------- +- [`Error::description` has been deprecated, and its use will now produce a + warning.][66919] It's recommended to use `Display`/`to_string` instead. + +[68253]: https://github.com/rust-lang/rust/pull/68253/ +[68348]: https://github.com/rust-lang/rust/pull/68348/ +[67935]: https://github.com/rust-lang/rust/pull/67935/ +[68037]: https://github.com/rust-lang/rust/pull/68037/ +[68122]: https://github.com/rust-lang/rust/pull/68122/ +[67712]: https://github.com/rust-lang/rust/pull/67712/ +[67887]: https://github.com/rust-lang/rust/pull/67887/ +[67131]: https://github.com/rust-lang/rust/pull/67131/ +[67233]: https://github.com/rust-lang/rust/pull/67233/ +[66899]: https://github.com/rust-lang/rust/pull/66899/ +[66919]: https://github.com/rust-lang/rust/pull/66919/ +[66254]: https://github.com/rust-lang/rust/pull/66254/ +[`DebugMap::key`]: https://doc.rust-lang.org/stable/std/fmt/struct.DebugMap.html#method.key +[`DebugMap::value`]: https://doc.rust-lang.org/stable/std/fmt/struct.DebugMap.html#method.value +[`ManuallyDrop::take`]: https://doc.rust-lang.org/stable/std/mem/struct.ManuallyDrop.html#method.take +[`matches!`]: https://doc.rust-lang.org/stable/std/macro.matches.html +[`ptr::slice_from_raw_parts_mut`]: https://doc.rust-lang.org/stable/std/ptr/fn.slice_from_raw_parts_mut.html +[`ptr::slice_from_raw_parts`]: https://doc.rust-lang.org/stable/std/ptr/fn.slice_from_raw_parts.html +[`wait_while`]: https://doc.rust-lang.org/stable/std/sync/struct.Condvar.html#method.wait_while + + Version 1.41.0 (2020-01-30) =========================== From 26fdcbbc2810474770bb7f87d410a1e34b142b87 Mon Sep 17 00:00:00 2001 From: XAMPPRocky <4464295+XAMPPRocky@users.noreply.github.com> Date: Sun, 9 Feb 2020 14:35:08 +0100 Subject: [PATCH 2/5] Update RELEASES.md --- RELEASES.md | 6 ++++++ 1 file changed, 6 insertions(+) diff --git a/RELEASES.md b/RELEASES.md index 715c6b5eaaaf1..ddd2a0a0e3b6a 100644 --- a/RELEASES.md +++ b/RELEASES.md @@ -49,6 +49,11 @@ Stabilized APIs - [`wait_timeout_while`] - [`wait_while`] +Cargo +----- +- [You no longer need to include `extern crate proc_macro;` to be able to + `use proc_macro;` in the `2018` edition.][cargo/7700] + Compatibility Notes ------------------- - [`Error::description` has been deprecated, and its use will now produce a @@ -66,6 +71,7 @@ Compatibility Notes [66899]: https://github.com/rust-lang/rust/pull/66899/ [66919]: https://github.com/rust-lang/rust/pull/66919/ [66254]: https://github.com/rust-lang/rust/pull/66254/ +[cargo/7700]: https://github.com/rust-lang/cargo/pull/7700 [`DebugMap::key`]: https://doc.rust-lang.org/stable/std/fmt/struct.DebugMap.html#method.key [`DebugMap::value`]: https://doc.rust-lang.org/stable/std/fmt/struct.DebugMap.html#method.value [`ManuallyDrop::take`]: https://doc.rust-lang.org/stable/std/mem/struct.ManuallyDrop.html#method.take From 7ab01b24674b88ff4927b0eb445a582fb9e12aba Mon Sep 17 00:00:00 2001 From: XAMPPRocky <4464295+XAMPPRocky@users.noreply.github.com> Date: Mon, 10 Feb 2020 05:07:39 +0100 Subject: [PATCH 3/5] Update RELEASES.md Co-Authored-By: Mazdak Farrokhzad --- RELEASES.md | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/RELEASES.md b/RELEASES.md index ddd2a0a0e3b6a..f97d902d332e2 100644 --- a/RELEASES.md +++ b/RELEASES.md @@ -30,7 +30,7 @@ Compiler Libraries --------- -- [`iter::Empty` now implements Send and Sync for any `T`.][68348] +- [`iter::Empty` now implements `Send` and `Sync` for any `T`.][68348] - [`Pin::{map_unchecked, map_unchecked_mut}` no longer require the return type to implement `Sized`.][67935] - [`io::Cursor` now derives `PartialEq` and `Eq`.][67233] From 32daa2aa38fafd731ddc27374dece22f38069bc8 Mon Sep 17 00:00:00 2001 From: XAMPPRocky <4464295+XAMPPRocky@users.noreply.github.com> Date: Mon, 10 Feb 2020 15:29:14 +0100 Subject: [PATCH 4/5] Update RELEASES.md --- RELEASES.md | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/RELEASES.md b/RELEASES.md index f97d902d332e2..5d10e658f9015 100644 --- a/RELEASES.md +++ b/RELEASES.md @@ -12,7 +12,7 @@ Language match words { ["Hello", "World", "!", ..] => println!("Hello World!"), ["Foo", "Bar", ..] => println!("Baz"), - rest => println!("{}", rest), + rest => println!("{:?}", rest), } } ``` From e7a344fb745a0a663e21be947b2619df05df6d31 Mon Sep 17 00:00:00 2001 From: XAMPPRocky <4464295+XAMPPRocky@users.noreply.github.com> Date: Sun, 23 Feb 2020 18:04:48 +0100 Subject: [PATCH 5/5] Update RELEASES.md Co-Authored-By: Jonas Schievink Co-Authored-By: Mazdak Farrokhzad --- RELEASES.md | 36 +++++++++++++++++++++++++----------- 1 file changed, 25 insertions(+), 11 deletions(-) diff --git a/RELEASES.md b/RELEASES.md index 5d10e658f9015..2a2bcfb0ea247 100644 --- a/RELEASES.md +++ b/RELEASES.md @@ -3,9 +3,6 @@ Version 1.42.0 (2020-03-12) Language -------- -- [You can now use `#[repr(transparent)]` on univariant `enum`s.][68122] Meaning - that you can create an enum that has the exact layout and ABI of the type - it contains. - [You can now use the slice pattern syntax with subslices.][67712] e.g. ```rust fn foo(words: &[&str]) { @@ -16,18 +13,34 @@ Language } } ``` - -- [Merge `TraitItem` & `ImplItem into `AssocItem`][67131] +- [You can now use `#[repr(transparent)]` on univariant `enum`s.][68122] Meaning + that you can create an enum that has the exact layout and ABI of the type + it contains. +- [There are some *syntax-only* changes:][67131] + - `default` is syntactically allowed before items in `trait` definitions. + - Items in `impl`s (i.e. `const`s, `type`s, and `fn`s) may syntactically + leave out their bodies in favor of `;`. + - Bounds on associated types in `impl`s are now syntactically allowed + (e.g. `type Foo: Ord;`). + - `...` (the C-variadic type) may occur syntactically directly as the type of + any function parameter. + + These are still rejected *semantically*, so you will likely receive an error + but these changes can be seen and parsed by procedural macros and + conditional compilation. Compiler -------- -- [Added tier 3\* support for `armv7a-none-eabi`.][68253] -- [Added tier 3 support for `riscv64gc-unknown-linux-gnu`.][68037] +- [Added tier 2\* support for `armv7a-none-eabi`.][68253] +- [Added tier 2 support for `riscv64gc-unknown-linux-gnu`.][68339] - [`Option::{expect,unwrap}` and `Result::{expect, expect_err, unwrap, unwrap_err}` now produce panic messages pointing to the location where they were called, rather than `core`'s internals. ][67887] +\* Refer to Rust's [platform support page][forge-platform-support] for more +information on Rust's tiered platform support. + Libraries --------- - [`iter::Empty` now implements `Send` and `Sync` for any `T`.][68348] @@ -40,14 +53,14 @@ Libraries Stabilized APIs --------------- +- [`CondVar::wait_while`] +- [`CondVar::wait_timeout_while`] - [`DebugMap::key`] - [`DebugMap::value`] - [`ManuallyDrop::take`] - [`matches!`] - [`ptr::slice_from_raw_parts_mut`] - [`ptr::slice_from_raw_parts`] -- [`wait_timeout_while`] -- [`wait_while`] Cargo ----- @@ -62,7 +75,7 @@ Compatibility Notes [68253]: https://github.com/rust-lang/rust/pull/68253/ [68348]: https://github.com/rust-lang/rust/pull/68348/ [67935]: https://github.com/rust-lang/rust/pull/67935/ -[68037]: https://github.com/rust-lang/rust/pull/68037/ +[68339]: https://github.com/rust-lang/rust/pull/68339/ [68122]: https://github.com/rust-lang/rust/pull/68122/ [67712]: https://github.com/rust-lang/rust/pull/67712/ [67887]: https://github.com/rust-lang/rust/pull/67887/ @@ -78,7 +91,8 @@ Compatibility Notes [`matches!`]: https://doc.rust-lang.org/stable/std/macro.matches.html [`ptr::slice_from_raw_parts_mut`]: https://doc.rust-lang.org/stable/std/ptr/fn.slice_from_raw_parts_mut.html [`ptr::slice_from_raw_parts`]: https://doc.rust-lang.org/stable/std/ptr/fn.slice_from_raw_parts.html -[`wait_while`]: https://doc.rust-lang.org/stable/std/sync/struct.Condvar.html#method.wait_while +[`CondVar::wait_while`]: https://doc.rust-lang.org/stable/std/sync/struct.Condvar.html#method.wait_while +[`CondVar::wait_timeout_while`]: https://doc.rust-lang.org/stable/std/sync/struct.Condvar.html#method.wait_timeout_while Version 1.41.0 (2020-01-30)