From d24927dd7e83e3aba4861735f79dc51b31b582be Mon Sep 17 00:00:00 2001 From: Erin Power Date: Sat, 13 Jul 2019 14:15:01 +0200 Subject: [PATCH 1/9] Updated RELEASES.md for 1.37.0 --- RELEASES.md | 121 +++++++++++++++++++++++++++++++++++++++++++++++++++- 1 file changed, 120 insertions(+), 1 deletion(-) diff --git a/RELEASES.md b/RELEASES.md index 355e53cbed25c..24bc295917e18 100644 --- a/RELEASES.md +++ b/RELEASES.md @@ -1,3 +1,122 @@ +Version 1.37.0 (2019-08-15) +========================== + +Language +-------- +- [`#[must_use]` will now warn if the type is in a tuple and unused.][61100] +- [`#[must_use]` will now warn if the type is in a `Box` and unused.][62228] +- [`#[must_use]` will now warn if the type is in a array and unused.][62235] +- [You can now use the `cfg` and `cfg_attr` attributes on + generic parameters.][61547] +- [You can now use enum variants through type alias.][61682] e.g. You can + write the following. + ```rust + type MyOption = Option; + + fn increment_or_zero(x: MyOption) -> u8 { + match x { + MyOption::Some(y) => y + 1, + MyOption::None => 0, + } + } + ``` +- [You can now use `_` as a identifier for consts.][61347] e.g. You can write + `const _: u32 = 5;`. +- [You can now use `#[repr(align)]` on enums.][61229] +- [The `?`/_"Kleene"_ macro operator is now available in the + 2015 edition.][60932] + +Compiler +-------- +- [You can now enable Profile-Guided Optimization with the `-C profile-generate` + and `-C profile-use` flags.][61268] For more information on how to use profile + guided optimization, please refer to the [rustc book](rustc-book-pgo). +- [The `rust-lldb` wrapper script should now work again.][61827] + +Libraries +--------- +- [`mem::MaybeUninit` is now `#[repr(transparent)]`.][61802] + +Stabilized APIs +--------------- +- [`BufReader::buffer`] +- [`BufWriter::buffer`] +- [`Cell::from_mut`] +- [`Cell::as_slice_of_cells`] +- [`DoubleEndedIterator::nth_back`] +- [`Option::xor`] +- [`Wrapping::reverse_bits`] +- [`i128::reverse_bits`] +- [`i16::reverse_bits`] +- [`i32::reverse_bits`] +- [`i64::reverse_bits`] +- [`i8::reverse_bits`] +- [`isize::reverse_bits`] +- [`slice::copy_within`] +- [`u128::reverse_bits`] +- [`u16::reverse_bits`] +- [`u32::reverse_bits`] +- [`u64::reverse_bits`] +- [`u8::reverse_bits`] +- [`usize::reverse_bits`] + +Cargo +----- +- [`Cargo.lock` files are now included when publishing by default for crates + with executables.][cargo/7026] +- [You can now specify `default-run="foo"` in `[package]` to specify the + default executable to use for `cargo run`.][cargo/7056] + +Misc +---- + +Compatibility Notes +------------------- +- [Using `...` for inclusive range patterns is will now warn by default.][61342] + Please transition your code to using the `..=` syntax for inclusive + ranges instead. +- [Using a trait object without the `dyn` will now warn by default.][61203] + Please transition your code to use `dyn Trait` for trait objects instead. + +[62228]: https://github.com/rust-lang/rust/pull/62228/ +[62235]: https://github.com/rust-lang/rust/pull/62235/ +[61802]: https://github.com/rust-lang/rust/pull/61802/ +[61827]: https://github.com/rust-lang/rust/pull/61827/ +[61547]: https://github.com/rust-lang/rust/pull/61547/ +[61682]: https://github.com/rust-lang/rust/pull/61682/ +[61268]: https://github.com/rust-lang/rust/pull/61268/ +[61342]: https://github.com/rust-lang/rust/pull/61342/ +[61347]: https://github.com/rust-lang/rust/pull/61347/ +[61100]: https://github.com/rust-lang/rust/pull/61100/ +[61203]: https://github.com/rust-lang/rust/pull/61203/ +[61229]: https://github.com/rust-lang/rust/pull/61229/ +[60932]: https://github.com/rust-lang/rust/pull/60932/ +[cargo/7026]: https://github.com/rust-lang/cargo/pull/7026/ +[cargo/7056]: https://github.com/rust-lang/cargo/pull/7056/ +[`BufReader::buffer`]: https://doc.rust-lang.org/std/io/struct.BufReader.html#method.buffer +[`BufWriter::buffer`]: https://doc.rust-lang.org/std/io/struct.BufWriter.html#method.buffer +[`Cell::from_mut`]: https://doc.rust-lang.org/std/cell/struct.Cell.html#method.from_mut +[`Cell::as_slice_of_cells`]: https://doc.rust-lang.org/std/cell/struct.Cell.html#method.as_slice_of_cells +[`DoubleEndedIterator::nth_back`]: https://doc.rust-lang.org/std/iter/trait.DoubleEndedIterator.html#method.nth_back +[`Option::xor`]: https://doc.rust-lang.org/std/option/enum.Option.html#method.xor +[`RefCell::try_borrow_unguarded`]: https://doc.rust-lang.org/std/cell/struct.RefCell.html#method.try_borrow_unguarded +[`Wrapping::reverse_bits`]: https://doc.rust-lang.org/std/num/struct.Wrapping.html#method.reverse_bits +[`i128::reverse_bits`]: https://doc.rust-lang.org/std/primitive.i128.html#method.reverse_bits +[`i16::reverse_bits`]: https://doc.rust-lang.org/std/primitive.i16.html#method.reverse_bits +[`i32::reverse_bits`]: https://doc.rust-lang.org/std/primitive.i32.html#method.reverse_bits +[`i64::reverse_bits`]: https://doc.rust-lang.org/std/primitive.i64.html#method.reverse_bits +[`i8::reverse_bits`]: https://doc.rust-lang.org/std/primitive.i8.html#method.reverse_bits +[`isize::reverse_bits`]: https://doc.rust-lang.org/std/primitive.isize.html#method.reverse_bits +[`slice::copy_within`]: https://doc.rust-lang.org/std/primitive.slice.html#method.copy_within +[`u128::reverse_bits`]: https://doc.rust-lang.org/std/primitive.u128.html#method.reverse_bits +[`u16::reverse_bits`]: https://doc.rust-lang.org/std/primitive.u16.html#method.reverse_bits +[`u32::reverse_bits`]: https://doc.rust-lang.org/std/primitive.u32.html#method.reverse_bits +[`u64::reverse_bits`]: https://doc.rust-lang.org/std/primitive.u64.html#method.reverse_bits +[`u8::reverse_bits`]: https://doc.rust-lang.org/std/primitive.u8.html#method.reverse_bits +[`usize::reverse_bits`]: https://doc.rust-lang.org/std/primitive.usize.html#method.reverse_bits +[rustc-book-pgo]: https://doc.rust-lang.org/rustc/profile-guided-optimization.html + + Version 1.36.0 (2019-07-04) ========================== @@ -39,7 +158,7 @@ Stabilized APIs - [`mem::MaybeUninit`] - [`pointer::align_offset`] - [`future::Future`] -- [`task::Context`] +- [`task::Context`] - [`task::RawWaker`] - [`task::RawWakerVTable`] - [`task::Waker`] From 795a2feb0a20e4e7ac2908edf77b56a099b3b135 Mon Sep 17 00:00:00 2001 From: XAMPPRocky <4464295+XAMPPRocky@users.noreply.github.com> Date: Sat, 13 Jul 2019 14:36:19 +0200 Subject: [PATCH 2/9] Update RELEASES.md Co-Authored-By: kennytm --- RELEASES.md | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/RELEASES.md b/RELEASES.md index 24bc295917e18..1fb067a3b9182 100644 --- a/RELEASES.md +++ b/RELEASES.md @@ -72,7 +72,7 @@ Misc Compatibility Notes ------------------- -- [Using `...` for inclusive range patterns is will now warn by default.][61342] +- [Using `...` for inclusive range patterns will now warn by default.][61342] Please transition your code to using the `..=` syntax for inclusive ranges instead. - [Using a trait object without the `dyn` will now warn by default.][61203] From d50542641ccbe70fe1255b2e6691fc1387efa4fd Mon Sep 17 00:00:00 2001 From: XAMPPRocky <4464295+XAMPPRocky@users.noreply.github.com> Date: Sun, 14 Jul 2019 11:33:37 +0200 Subject: [PATCH 3/9] Update RELEASES.md --- RELEASES.md | 9 ++++----- 1 file changed, 4 insertions(+), 5 deletions(-) diff --git a/RELEASES.md b/RELEASES.md index 1fb067a3b9182..45b0150a033be 100644 --- a/RELEASES.md +++ b/RELEASES.md @@ -3,9 +3,8 @@ Version 1.37.0 (2019-08-15) Language -------- -- [`#[must_use]` will now warn if the type is in a tuple and unused.][61100] -- [`#[must_use]` will now warn if the type is in a `Box` and unused.][62228] -- [`#[must_use]` will now warn if the type is in a array and unused.][62235] +- `#[must_use]` will now warn if the type contained in a [tuple][61100], + [`Box`][62228], or an [array][62235] and unused. - [You can now use the `cfg` and `cfg_attr` attributes on generic parameters.][61547] - [You can now use enum variants through type alias.][61682] e.g. You can @@ -30,12 +29,12 @@ Compiler -------- - [You can now enable Profile-Guided Optimization with the `-C profile-generate` and `-C profile-use` flags.][61268] For more information on how to use profile - guided optimization, please refer to the [rustc book](rustc-book-pgo). + guided optimization, please refer to the [rustc book][rustc-book-pgo]. - [The `rust-lldb` wrapper script should now work again.][61827] Libraries --------- -- [`mem::MaybeUninit` is now `#[repr(transparent)]`.][61802] +- [`mem::MaybeUninit` is now ABI-compatible with `T`.][61802] Stabilized APIs --------------- From 70685ef4691cfddd31e795968a38e96ca04381e0 Mon Sep 17 00:00:00 2001 From: XAMPPRocky <4464295+XAMPPRocky@users.noreply.github.com> Date: Sun, 14 Jul 2019 13:25:10 +0200 Subject: [PATCH 4/9] Update RELEASES.md --- RELEASES.md | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/RELEASES.md b/RELEASES.md index 45b0150a033be..38b6a1373998e 100644 --- a/RELEASES.md +++ b/RELEASES.md @@ -42,6 +42,7 @@ Stabilized APIs - [`BufWriter::buffer`] - [`Cell::from_mut`] - [`Cell::as_slice_of_cells`] +- [`Cell<[T]>::as_slice_of_cells`][`Cell::as_slice_of_cells`] - [`DoubleEndedIterator::nth_back`] - [`Option::xor`] - [`Wrapping::reverse_bits`] @@ -95,7 +96,7 @@ Compatibility Notes [`BufReader::buffer`]: https://doc.rust-lang.org/std/io/struct.BufReader.html#method.buffer [`BufWriter::buffer`]: https://doc.rust-lang.org/std/io/struct.BufWriter.html#method.buffer [`Cell::from_mut`]: https://doc.rust-lang.org/std/cell/struct.Cell.html#method.from_mut -[`Cell::as_slice_of_cells`]: https://doc.rust-lang.org/std/cell/struct.Cell.html#method.as_slice_of_cells +[`Cell::as_slice_of_cells`]: https://doc.rust-lang.org/std/cell/struct.Cell.html#method.as_slice_of_cells [`DoubleEndedIterator::nth_back`]: https://doc.rust-lang.org/std/iter/trait.DoubleEndedIterator.html#method.nth_back [`Option::xor`]: https://doc.rust-lang.org/std/option/enum.Option.html#method.xor [`RefCell::try_borrow_unguarded`]: https://doc.rust-lang.org/std/cell/struct.RefCell.html#method.try_borrow_unguarded From b7a29c08247ec27b4e606a795815469f3228a7b8 Mon Sep 17 00:00:00 2001 From: XAMPPRocky <4464295+XAMPPRocky@users.noreply.github.com> Date: Sun, 14 Jul 2019 19:41:12 +0200 Subject: [PATCH 5/9] Apply suggestions from code review Co-Authored-By: Jonas Schievink --- RELEASES.md | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/RELEASES.md b/RELEASES.md index 38b6a1373998e..ecaa34c245c91 100644 --- a/RELEASES.md +++ b/RELEASES.md @@ -3,12 +3,12 @@ Version 1.37.0 (2019-08-15) Language -------- -- `#[must_use]` will now warn if the type contained in a [tuple][61100], +- `#[must_use]` will now warn if the type is contained in a [tuple][61100], [`Box`][62228], or an [array][62235] and unused. - [You can now use the `cfg` and `cfg_attr` attributes on generic parameters.][61547] - [You can now use enum variants through type alias.][61682] e.g. You can - write the following. + write the following: ```rust type MyOption = Option; From 9994ca55f7586adf865f260b79157024eb38c8fc Mon Sep 17 00:00:00 2001 From: XAMPPRocky <4464295+XAMPPRocky@users.noreply.github.com> Date: Sun, 14 Jul 2019 19:42:02 +0200 Subject: [PATCH 6/9] Update RELEASES.md --- RELEASES.md | 1 - 1 file changed, 1 deletion(-) diff --git a/RELEASES.md b/RELEASES.md index ecaa34c245c91..01257c50b8994 100644 --- a/RELEASES.md +++ b/RELEASES.md @@ -41,7 +41,6 @@ Stabilized APIs - [`BufReader::buffer`] - [`BufWriter::buffer`] - [`Cell::from_mut`] -- [`Cell::as_slice_of_cells`] - [`Cell<[T]>::as_slice_of_cells`][`Cell::as_slice_of_cells`] - [`DoubleEndedIterator::nth_back`] - [`Option::xor`] From f2f4c0ed6c247eb8e94845c3e37eb6799ec74885 Mon Sep 17 00:00:00 2001 From: XAMPPRocky <4464295+XAMPPRocky@users.noreply.github.com> Date: Wed, 17 Jul 2019 08:40:05 +0200 Subject: [PATCH 7/9] Update RELEASES.md Co-Authored-By: Josh Stone --- RELEASES.md | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/RELEASES.md b/RELEASES.md index 01257c50b8994..2ff5a57d24ffe 100644 --- a/RELEASES.md +++ b/RELEASES.md @@ -19,7 +19,7 @@ Language } } ``` -- [You can now use `_` as a identifier for consts.][61347] e.g. You can write +- [You can now use `_` as an identifier for consts.][61347] e.g. You can write `const _: u32 = 5;`. - [You can now use `#[repr(align)]` on enums.][61229] - [The `?`/_"Kleene"_ macro operator is now available in the From 6b0f4c6e711cc60f227f7091081ba25819c145ab Mon Sep 17 00:00:00 2001 From: XAMPPRocky <4464295+XAMPPRocky@users.noreply.github.com> Date: Fri, 26 Jul 2019 14:55:08 +0200 Subject: [PATCH 8/9] Update RELEASES.md Co-Authored-By: Mark Rousskov --- RELEASES.md | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/RELEASES.md b/RELEASES.md index 2ff5a57d24ffe..a256e314a0299 100644 --- a/RELEASES.md +++ b/RELEASES.md @@ -61,7 +61,7 @@ Stabilized APIs Cargo ----- -- [`Cargo.lock` files are now included when publishing by default for crates +- [`Cargo.lock` files are now included by default when publishing executable crates with executables.][cargo/7026] - [You can now specify `default-run="foo"` in `[package]` to specify the default executable to use for `cargo run`.][cargo/7056] From f695906147a7e32750b9d55940f0e948ae650d13 Mon Sep 17 00:00:00 2001 From: XAMPPRocky <4464295+XAMPPRocky@users.noreply.github.com> Date: Fri, 26 Jul 2019 14:55:39 +0200 Subject: [PATCH 9/9] Update RELEASES.md --- RELEASES.md | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/RELEASES.md b/RELEASES.md index a256e314a0299..51cd6578ec531 100644 --- a/RELEASES.md +++ b/RELEASES.md @@ -21,7 +21,7 @@ Language ``` - [You can now use `_` as an identifier for consts.][61347] e.g. You can write `const _: u32 = 5;`. -- [You can now use `#[repr(align)]` on enums.][61229] +- [You can now use `#[repr(align(X)]` on enums.][61229] - [The `?`/_"Kleene"_ macro operator is now available in the 2015 edition.][60932]