]> git.lizzy.rs Git - rust.git/blobdiff - RELEASES.md
Rollup merge of #58420 - dvdhrm:target-uefi-comments, r=nagisa
[rust.git] / RELEASES.md
index 887b6e9c39f700bf80ebffd48ec789fc0c9a111e..83c44774da283ce94eb1c0d8d289941bebf3c0a0 100644 (file)
@@ -7,13 +7,22 @@ Language
 - [You can now use the `?` operator in macro definitions.][56245] The `?`
   operator allows you to specify zero or one repetitions similar to the `*` and
   `+` operators.
+- [Module paths with no leading keyword like `super`, `self`, or `crate`, will
+  now always resolve to the item (`enum`, `struct`, etc.) available in the
+  module if present, before resolving to a external crate or an item the prelude.][56759]
+  E.g.
+  ```rust
+  enum Color { Red, Green, Blue }
+
+  use Color::*;
+  ```
 
 #### All editions
 - [You can now match against `PhantomData<T>` types.][55837]
 - [You can now match against literals in macros with the `literal`
   specifier.][56072] This will match against a literal of any type.
   E.g. `1`, `'A'`, `"Hello World"`
-- [Self can now be used as a constructor and pattern.][56365] E.g. 
+- [Self can now be used as a constructor and pattern for unit and tuple structs.][56365] E.g. 
   ```rust
   struct Point(i32, i32);
 
@@ -34,20 +43,20 @@ Language
   ```rust
   enum List<T>
   where
-  Self: PartialOrd<Self> // can write `Self` instead of `List<T>`
+      Self: PartialOrd<Self> // can write `Self` instead of `List<T>`
   {
-    Nil,
-    Cons(T, Box<Self>) // likewise here
+      Nil,
+      Cons(T, Box<Self>) // likewise here
   }
   ```
+- [You can now mark traits with `#[must_use]`.][55663] This provides a warning if
+  a `impl Trait` or `dyn Trait` is returned and unused in the program.
 
 Compiler
 --------
-- [You can now mark traits with `#[must_use]`.][55663] Providing a warning if
-  they unused in a program.
 - [The default allocator has changed from jemalloc to the default allocator on
   your system.][55238] The compiler itself on Linux & macOS will still use
-  jemalloc, but programs compiled with them will use the system allocator.
+  jemalloc, but programs compiled with it will use the system allocator.
 - [Added the `aarch64-pc-windows-msvc` target.][55702]
 
 Libraries
@@ -75,7 +84,7 @@ The following APIs are now `const` functions and can be used in a
 - [`RangeInclusive::start`]
 - [`RangeInclusive::end`]
 - [`NonNull::as_ptr`]
-- [`[T]::as_ptr`]
+- [`slice::as_ptr`]
 - [`str::as_ptr`]
 - [`Duration::as_secs`]
 - [`Duration::subsec_millis`]
@@ -112,6 +121,12 @@ Stabilized APIs
 - [`i64::from_be_bytes`]
 - [`i64::from_le_bytes`]
 - [`i64::from_ne_bytes`]
+- [`i128::to_be_bytes`]
+- [`i128::to_le_bytes`]
+- [`i128::to_ne_bytes`]
+- [`i128::from_be_bytes`]
+- [`i128::from_le_bytes`]
+- [`i128::from_ne_bytes`]
 - [`isize::to_be_bytes`]
 - [`isize::to_le_bytes`]
 - [`isize::to_ne_bytes`]
@@ -142,6 +157,12 @@ Stabilized APIs
 - [`u64::from_be_bytes`]
 - [`u64::from_le_bytes`]
 - [`u64::from_ne_bytes`]
+- [`u128::to_be_bytes`]
+- [`u128::to_le_bytes`]
+- [`u128::to_ne_bytes`]
+- [`u128::from_be_bytes`]
+- [`u128::from_le_bytes`]
+- [`u128::from_ne_bytes`]
 - [`usize::to_be_bytes`]
 - [`usize::to_le_bytes`]
 - [`usize::to_ne_bytes`]
@@ -165,6 +186,7 @@ Compatibility Notes
   been changed from `*const` to `*mut` as the previous implementation
   was unsound.
 
+
 [55148]: https://github.com/rust-lang/rust/pull/55148/
 [55238]: https://github.com/rust-lang/rust/pull/55238/
 [55280]: https://github.com/rust-lang/rust/pull/55280/
@@ -178,6 +200,7 @@ Compatibility Notes
 [56365]: https://github.com/rust-lang/rust/pull/56365/
 [56366]: https://github.com/rust-lang/rust/pull/56366/
 [56395]: https://github.com/rust-lang/rust/pull/56395/
+[56759]: https://github.com/rust-lang/rust/pull/56759/
 [cargo/6218]: https://github.com/rust-lang/cargo/pull/6218/
 [cargo/6242]: https://github.com/rust-lang/cargo/pull/6242/
 [`CStr::as_ptr`]: https://doc.rust-lang.org/std/ffi/struct.CStr.html#method.as_ptr
@@ -195,8 +218,14 @@ Compatibility Notes
 [`RangeInclusive::end`]: https://doc.rust-lang.org/std/ops/struct.RangeInclusive.html#method.end
 [`RangeInclusive::start`]: https://doc.rust-lang.org/std/ops/struct.RangeInclusive.html#method.start
 [`UnsafeCell::get`]: https://doc.rust-lang.org/std/cell/struct.UnsafeCell.html#method.get
-[`[T]::as_ptr`]: https://doc.rust-lang.org/std/primitive.slice.html#method.as_ptr
+[`slice::as_ptr`]: https://doc.rust-lang.org/std/primitive.slice.html#method.as_ptr
 [`char::is_ascii`]: https://doc.rust-lang.org/std/primitive.char.html#method.is_ascii
+[`i128::from_be_bytes`]: https://doc.rust-lang.org/stable/std/primitive.i128.html#method.from_be_bytes
+[`i128::from_le_bytes`]: https://doc.rust-lang.org/stable/std/primitive.i128.html#method.from_le_bytes
+[`i128::from_ne_bytes`]: https://doc.rust-lang.org/stable/std/primitive.i128.html#method.from_ne_bytes
+[`i128::to_be_bytes`]: https://doc.rust-lang.org/stable/std/primitive.i128.html#method.to_be_bytes
+[`i128::to_le_bytes`]: https://doc.rust-lang.org/stable/std/primitive.i128.html#method.to_le_bytes
+[`i128::to_ne_bytes`]: https://doc.rust-lang.org/stable/std/primitive.i128.html#method.to_ne_bytes
 [`i16::from_be_bytes`]: https://doc.rust-lang.org/stable/std/primitive.i16.html#method.from_be_bytes
 [`i16::from_le_bytes`]: https://doc.rust-lang.org/stable/std/primitive.i16.html#method.from_le_bytes
 [`i16::from_ne_bytes`]: https://doc.rust-lang.org/stable/std/primitive.i16.html#method.from_ne_bytes
@@ -229,6 +258,12 @@ Compatibility Notes
 [`isize::to_ne_bytes`]: https://doc.rust-lang.org/stable/std/primitive.isize.html#method.to_ne_bytes
 [`iter::empty`]: https://doc.rust-lang.org/std/iter/fn.empty.html
 [`str::as_ptr`]: https://doc.rust-lang.org/std/primitive.str.html#method.as_ptr
+[`u128::from_be_bytes`]: https://doc.rust-lang.org/stable/std/primitive.u128.html#method.from_be_bytes
+[`u128::from_le_bytes`]: https://doc.rust-lang.org/stable/std/primitive.u128.html#method.from_le_bytes
+[`u128::from_ne_bytes`]: https://doc.rust-lang.org/stable/std/primitive.u128.html#method.from_ne_bytes
+[`u128::to_be_bytes`]: https://doc.rust-lang.org/stable/std/primitive.u128.html#method.to_be_bytes
+[`u128::to_le_bytes`]: https://doc.rust-lang.org/stable/std/primitive.u128.html#method.to_le_bytes
+[`u128::to_ne_bytes`]: https://doc.rust-lang.org/stable/std/primitive.u128.html#method.to_ne_bytes
 [`u16::from_be_bytes`]: https://doc.rust-lang.org/stable/std/primitive.u16.html#method.from_be_bytes
 [`u16::from_le_bytes`]: https://doc.rust-lang.org/stable/std/primitive.u16.html#method.from_le_bytes
 [`u16::from_ne_bytes`]: https://doc.rust-lang.org/stable/std/primitive.u16.html#method.from_ne_bytes