diff options
Diffstat (limited to 'RELEASES.md')
| -rw-r--r-- | RELEASES.md | 354 |
1 files changed, 343 insertions, 11 deletions
diff --git a/RELEASES.md b/RELEASES.md index 5dca7abcb26..1e94fb8e42f 100644 --- a/RELEASES.md +++ b/RELEASES.md @@ -1,3 +1,329 @@ +Version 1.52.0 (2021-05-06) +============================ + +Language +-------- +- [Added the `unsafe_op_in_unsafe_fn` lint, which checks whether the unsafe code + in an `unsafe fn` is wrapped in a `unsafe` block.][79208] This lint + is allowed by default, and may become a warning or hard error in a + future edition. +- [You can now cast mutable references to arrays to a pointer of the same type as + the element.][81479] + +Compiler +-------- +- [Upgraded the default LLVM to LLVM 12.][81451] + +Added tier 3\* support for the following targets. + +- [`s390x-unknown-linux-musl`][82166] +- [`riscv32gc-unknown-linux-musl` & `riscv64gc-unknown-linux-musl`][82202] +- [`powerpc-unknown-openbsd`][82733] + +\* Refer to Rust's [platform support page][platform-support-doc] for more +information on Rust's tiered platform support. + +Libraries +--------- +- [`OsString` now implements `Extend` and `FromIterator`.][82121] +- [`cmp::Reverse` now has `#[repr(transparent)]` representation.][81879] +- [`Arc<impl Error>` now implements `error::Error`.][80553] +- [All integer division and remainder operations are now `const`.][80962] + +Stabilised APIs +------------- +- [`Arguments::as_str`] +- [`char::MAX`] +- [`char::REPLACEMENT_CHARACTER`] +- [`char::UNICODE_VERSION`] +- [`char::decode_utf16`] +- [`char::from_digit`] +- [`char::from_u32_unchecked`] +- [`char::from_u32`] +- [`slice::partition_point`] +- [`str::rsplit_once`] +- [`str::split_once`] + +The following previously stable APIs are now `const`. + +- [`char::len_utf8`] +- [`char::len_utf16`] +- [`char::to_ascii_uppercase`] +- [`char::to_ascii_lowercase`] +- [`char::eq_ignore_ascii_case`] +- [`u8::to_ascii_uppercase`] +- [`u8::to_ascii_lowercase`] +- [`u8::eq_ignore_ascii_case`] + +Rustdoc +------- +- [Rustdoc lints are now treated as a tool lint, meaning that + lints are now prefixed with `rustdoc::` (e.g. `#[warn(rustdoc::non_autolinks)]`).][80527] + Using the old style is still allowed, and will become a warning in + a future release. +- [Rustdoc now supports argument files.][82261] +- [Rustdoc now generates smart punctuation for documentation.][79423] +- [You can now use "task lists" in Rustdoc Markdown.][81766] E.g. + ```markdown + - [x] Complete + - [ ] Todo + ``` + +Misc +---- +- [You can now pass multiple filters to tests.][81356] E.g. + `cargo test -- foo bar` will run all tests that match `foo` and `bar`. +- [Rustup now distributes PDB symbols for the `std` library on Windows, + allowing you to see `std` symbols when debugging.][82218] + +Internal Only +------------- +These changes provide no direct user facing benefits, but represent significant +improvements to the internals and overall performance of rustc and +related tools. + +- [Check the result cache before the DepGraph when ensuring queries][81855] +- [Try fast_reject::simplify_type in coherence before doing full check][81744] +- [Only store a LocalDefId in some HIR nodes][81611] +- [Store HIR attributes in a side table][79519] + +Compatibility Notes +------------------- +- [Cargo build scripts are now forbidden from setting `RUSTC_BOOTSTRAP`.][cargo/9181] +- [Removed support for the `x86_64-rumprun-netbsd` target.][82594] +- [Deprecated the `x86_64-sun-solaris` target in favor of `x86_64-pc-solaris`.][82216] +- [Rustdoc now only accepts `,`, ` `, and `\t` as delimiters for specifying + languages in code blocks.][78429] +- [Rustc now catches more cases of `pub_use_of_private_extern_crate`][80763] +- [Changes in how proc macros handle whitespace may lead to panics when used + with older `proc-macro-hack` versions. A `cargo update` should be sufficient to fix this in all cases.][84136] + +[84136]: https://github.com/rust-lang/rust/issues/84136 +[80763]: https://github.com/rust-lang/rust/pull/80763 +[82166]: https://github.com/rust-lang/rust/pull/82166 +[82121]: https://github.com/rust-lang/rust/pull/82121 +[81879]: https://github.com/rust-lang/rust/pull/81879 +[82261]: https://github.com/rust-lang/rust/pull/82261 +[82218]: https://github.com/rust-lang/rust/pull/82218 +[82216]: https://github.com/rust-lang/rust/pull/82216 +[82202]: https://github.com/rust-lang/rust/pull/82202 +[81855]: https://github.com/rust-lang/rust/pull/81855 +[81766]: https://github.com/rust-lang/rust/pull/81766 +[81744]: https://github.com/rust-lang/rust/pull/81744 +[81611]: https://github.com/rust-lang/rust/pull/81611 +[81479]: https://github.com/rust-lang/rust/pull/81479 +[81451]: https://github.com/rust-lang/rust/pull/81451 +[81356]: https://github.com/rust-lang/rust/pull/81356 +[80962]: https://github.com/rust-lang/rust/pull/80962 +[80553]: https://github.com/rust-lang/rust/pull/80553 +[80527]: https://github.com/rust-lang/rust/pull/80527 +[79519]: https://github.com/rust-lang/rust/pull/79519 +[79423]: https://github.com/rust-lang/rust/pull/79423 +[79208]: https://github.com/rust-lang/rust/pull/79208 +[78429]: https://github.com/rust-lang/rust/pull/78429 +[82733]: https://github.com/rust-lang/rust/pull/82733 +[82594]: https://github.com/rust-lang/rust/pull/82594 +[cargo/9181]: https://github.com/rust-lang/cargo/pull/9181 +[`char::MAX`]: https://doc.rust-lang.org/std/primitive.char.html#associatedconstant.MAX +[`char::REPLACEMENT_CHARACTER`]: https://doc.rust-lang.org/std/primitive.char.html#associatedconstant.REPLACEMENT_CHARACTER +[`char::UNICODE_VERSION`]: https://doc.rust-lang.org/std/primitive.char.html#associatedconstant.UNICODE_VERSION +[`char::decode_utf16`]: https://doc.rust-lang.org/std/primitive.char.html#method.decode_utf16 +[`char::from_u32`]: https://doc.rust-lang.org/std/primitive.char.html#method.from_u32 +[`char::from_u32_unchecked`]: https://doc.rust-lang.org/std/primitive.char.html#method.from_u32_unchecked +[`char::from_digit`]: https://doc.rust-lang.org/std/primitive.char.html#method.from_digit +[`Peekable::next_if`]: https://doc.rust-lang.org/stable/std/iter/struct.Peekable.html#method.next_if +[`Peekable::next_if_eq`]: https://doc.rust-lang.org/stable/std/iter/struct.Peekable.html#method.next_if_eq +[`Arguments::as_str`]: https://doc.rust-lang.org/stable/std/fmt/struct.Arguments.html#method.as_str +[`str::split_once`]: https://doc.rust-lang.org/stable/std/primitive.str.html#method.split_once +[`str::rsplit_once`]: https://doc.rust-lang.org/stable/std/primitive.str.html#method.rsplit_once +[`slice::partition_point`]: https://doc.rust-lang.org/stable/std/primitive.slice.html#method.partition_point +[`char::len_utf8`]: https://doc.rust-lang.org/stable/std/primitive.char.html#method.len_utf8 +[`char::len_utf16`]: https://doc.rust-lang.org/stable/std/primitive.char.html#method.len_utf16 +[`char::to_ascii_uppercase`]: https://doc.rust-lang.org/stable/std/primitive.char.html#method.to_ascii_uppercase +[`char::to_ascii_lowercase`]: https://doc.rust-lang.org/stable/std/primitive.char.html#method.to_ascii_lowercase +[`char::eq_ignore_ascii_case`]: https://doc.rust-lang.org/stable/std/primitive.char.html#method.eq_ignore_ascii_case +[`u8::to_ascii_uppercase`]: https://doc.rust-lang.org/stable/std/primitive.u8.html#method.to_ascii_uppercase +[`u8::to_ascii_lowercase`]: https://doc.rust-lang.org/stable/std/primitive.u8.html#method.to_ascii_lowercase +[`u8::eq_ignore_ascii_case`]: https://doc.rust-lang.org/stable/std/primitive.u8.html#method.eq_ignore_ascii_case + +Version 1.51.0 (2021-03-25) +============================ + +Language +-------- +- [You can now parameterize items such as functions, traits, and `struct`s by constant + values in addition to by types and lifetimes.][79135] Also known as "const generics" + E.g. you can now write the following. Note: Only values of primitive integers, + `bool`, or `char` types are currently permitted. + ```rust + struct GenericArray<T, const LENGTH: usize> { + inner: [T; LENGTH] + } + + impl<T, const LENGTH: usize> GenericArray<T, LENGTH> { + const fn last(&self) -> Option<&T> { + if LENGTH == 0 { + None + } else { + Some(&self.inner[LENGTH - 1]) + } + } + } + ``` + + +Compiler +-------- + +- [Added the `-Csplit-debuginfo` codegen option for macOS platforms.][79570] + This option controls whether debug information is split across multiple files + or packed into a single file. **Note** This option is unstable on other platforms. +- [Added tier 3\* support for `aarch64_be-unknown-linux-gnu`, + `aarch64-unknown-linux-gnu_ilp32`, and `aarch64_be-unknown-linux-gnu_ilp32` targets.][81455] +- [Added tier 3 support for `i386-unknown-linux-gnu` and `i486-unknown-linux-gnu` targets.][80662] +- [The `target-cpu=native` option will now detect individual features of CPUs.][80749] + +\* Refer to Rust's [platform support page][platform-support-doc] for more +information on Rust's tiered platform support. + +Libraries +--------- + +- [`Box::downcast` is now also implemented for any `dyn Any + Send + Sync` object.][80945] +- [`str` now implements `AsMut<str>`.][80279] +- [`u64` and `u128` now implement `From<char>`.][79502] +- [`Error` is now implemented for `&T` where `T` implements `Error`.][75180] +- [`Poll::{map_ok, map_err}` are now implemented for `Poll<Option<Result<T, E>>>`.][80968] +- [`unsigned_abs` is now implemented for all signed integer types.][80959] +- [`io::Empty` now implements `io::Seek`.][78044] +- [`rc::Weak<T>` and `sync::Weak<T>`'s methods such as `as_ptr` are now implemented for + `T: ?Sized` types.][80764] +- [`Div` and `Rem` by their `NonZero` variant is now implemented for all unsigned integers.][79134] + + +Stabilized APIs +--------------- + +- [`Arc::decrement_strong_count`] +- [`Arc::increment_strong_count`] +- [`Once::call_once_force`] +- [`Peekable::next_if_eq`] +- [`Peekable::next_if`] +- [`Seek::stream_position`] +- [`array::IntoIter`] +- [`panic::panic_any`] +- [`ptr::addr_of!`] +- [`ptr::addr_of_mut!`] +- [`slice::fill_with`] +- [`slice::split_inclusive_mut`] +- [`slice::split_inclusive`] +- [`slice::strip_prefix`] +- [`slice::strip_suffix`] +- [`str::split_inclusive`] +- [`sync::OnceState`] +- [`task::Wake`] +- [`VecDeque::range`] +- [`VecDeque::range_mut`] + +Cargo +----- +- [Added the `split-debuginfo` profile option to control the -Csplit-debuginfo + codegen option.][cargo/9112] +- [Added the `resolver` field to `Cargo.toml` to enable the new feature resolver + and CLI option behavior.][cargo/8997] Version 2 of the feature resolver will try + to avoid unifying features of dependencies where that unification could be unwanted. + Such as using the same dependency with a `std` feature in a build scripts and + proc-macros, while using the `no-std` feature in the final binary. See the + [Cargo book documentation][feature-resolver@2.0] for more information on the feature. + +Rustdoc +------- + +- [Rustdoc will now include documentation for methods available from _nested_ `Deref` traits.][80653] +- [You can now provide a `--default-theme` flag which sets the default theme to use for + documentation.][79642] + +Various improvements to intra-doc links: + +- [You can link to non-path primitives such as `slice`.][80181] +- [You can link to associated items.][74489] +- [You can now include generic parameters when linking to items, like `Vec<T>`.][76934] + +Misc +---- +- [You can now pass `--include-ignored` to tests (e.g. with + `cargo test -- --include-ignored`) to include testing tests marked `#[ignore]`.][80053] + +Compatibility Notes +------------------- + +- [WASI platforms no longer use the `wasm-bindgen` ABI, and instead use the wasm32 ABI.][79998] +- [`rustc` no longer promotes division, modulo and indexing operations to `const` that + could fail.][80579] +- [The minimum version of glibc for the following platforms has been bumped to version 2.31 + for the distributed artifacts.][81521] + - `armv5te-unknown-linux-gnueabi` + - `sparc64-unknown-linux-gnu` + - `thumbv7neon-unknown-linux-gnueabihf` + - `armv7-unknown-linux-gnueabi` + - `x86_64-unknown-linux-gnux32` +- [`atomic::spin_loop_hint` has been deprecated.][80966] It's recommended to use `hint::spin_loop` instead. + +Internal Only +------------- + +- [Consistently avoid constructing optimized MIR when not doing codegen][80718] + +[79135]: https://github.com/rust-lang/rust/pull/79135 +[74489]: https://github.com/rust-lang/rust/pull/74489 +[76934]: https://github.com/rust-lang/rust/pull/76934 +[79570]: https://github.com/rust-lang/rust/pull/79570 +[80181]: https://github.com/rust-lang/rust/pull/80181 +[79642]: https://github.com/rust-lang/rust/pull/79642 +[80945]: https://github.com/rust-lang/rust/pull/80945 +[80279]: https://github.com/rust-lang/rust/pull/80279 +[80053]: https://github.com/rust-lang/rust/pull/80053 +[79502]: https://github.com/rust-lang/rust/pull/79502 +[75180]: https://github.com/rust-lang/rust/pull/75180 +[79135]: https://github.com/rust-lang/rust/pull/79135 +[81521]: https://github.com/rust-lang/rust/pull/81521 +[80968]: https://github.com/rust-lang/rust/pull/80968 +[80959]: https://github.com/rust-lang/rust/pull/80959 +[80718]: https://github.com/rust-lang/rust/pull/80718 +[80653]: https://github.com/rust-lang/rust/pull/80653 +[80579]: https://github.com/rust-lang/rust/pull/80579 +[79998]: https://github.com/rust-lang/rust/pull/79998 +[78044]: https://github.com/rust-lang/rust/pull/78044 +[81455]: https://github.com/rust-lang/rust/pull/81455 +[80764]: https://github.com/rust-lang/rust/pull/80764 +[80749]: https://github.com/rust-lang/rust/pull/80749 +[80662]: https://github.com/rust-lang/rust/pull/80662 +[79134]: https://github.com/rust-lang/rust/pull/79134 +[80966]: https://github.com/rust-lang/rust/pull/80966 +[cargo/8997]: https://github.com/rust-lang/cargo/pull/8997 +[cargo/9112]: https://github.com/rust-lang/cargo/pull/9112 +[feature-resolver@2.0]: https://doc.rust-lang.org/nightly/cargo/reference/features.html#feature-resolver-version-2 +[`Once::call_once_force`]: https://doc.rust-lang.org/stable/std/sync/struct.Once.html#method.call_once_force +[`sync::OnceState`]: https://doc.rust-lang.org/stable/std/sync/struct.OnceState.html +[`panic::panic_any`]: https://doc.rust-lang.org/stable/std/panic/fn.panic_any.html +[`slice::strip_prefix`]: https://doc.rust-lang.org/stable/std/primitive.slice.html#method.strip_prefix +[`slice::strip_suffix`]: https://doc.rust-lang.org/stable/std/primitive.slice.html#method.strip_prefix +[`Arc::increment_strong_count`]: https://doc.rust-lang.org/nightly/std/sync/struct.Arc.html#method.increment_strong_count +[`Arc::decrement_strong_count`]: https://doc.rust-lang.org/nightly/std/sync/struct.Arc.html#method.decrement_strong_count +[`slice::fill_with`]: https://doc.rust-lang.org/nightly/std/primitive.slice.html#method.fill_with +[`ptr::addr_of!`]: https://doc.rust-lang.org/nightly/std/ptr/macro.addr_of.html +[`ptr::addr_of_mut!`]: https://doc.rust-lang.org/nightly/std/ptr/macro.addr_of_mut.html +[`array::IntoIter`]: https://doc.rust-lang.org/nightly/std/array/struct.IntoIter.html +[`slice::split_inclusive`]: https://doc.rust-lang.org/nightly/std/primitive.slice.html#method.split_inclusive +[`slice::split_inclusive_mut`]: https://doc.rust-lang.org/nightly/std/primitive.slice.html#method.split_inclusive_mut +[`str::split_inclusive`]: https://doc.rust-lang.org/nightly/std/primitive.str.html#method.split_inclusive +[`task::Wake`]: https://doc.rust-lang.org/nightly/std/task/trait.Wake.html +[`Seek::stream_position`]: https://doc.rust-lang.org/nightly/std/io/trait.Seek.html#method.stream_position +[`Peekable::next_if`]: https://doc.rust-lang.org/nightly/std/iter/struct.Peekable.html#method.next_if +[`Peekable::next_if_eq`]: https://doc.rust-lang.org/nightly/std/iter/struct.Peekable.html#method.next_if_eq +[`VecDeque::range`]: https://doc.rust-lang.org/nightly/std/collections/struct.VecDeque.html#method.range +[`VecDeque::range_mut`]: https://doc.rust-lang.org/nightly/std/collections/struct.VecDeque.html#method.range_mut + Version 1.50.0 (2021-02-11) ============================ @@ -14,7 +340,7 @@ Compiler - [The `x86_64-unknown-freebsd` is now built with the full toolset.][79484] - [Dropped support for all cloudabi targets.][78439] -\* Refer to Rust's [platform support page][forge-platform-support] for more +\* Refer to Rust's [platform support page][platform-support-doc] for more information on Rust's tiered platform support. Libraries @@ -191,7 +517,7 @@ Compiler - [Output from threads spawned in tests is now captured.][78227] - [Change os and vendor values to "none" and "unknown" for some targets][78951] -\* Refer to Rust's [platform support page][forge-platform-support] for more +\* Refer to Rust's [platform support page][platform-support-doc] for more information on Rust's tiered platform support. Libraries @@ -296,7 +622,7 @@ Compiler Note: If you're using cargo you must explicitly pass the `--target` flag. - [Added tier 2\* support for `aarch64-unknown-linux-musl`.][76420] -\* Refer to Rust's [platform support page][forge-platform-support] for more +\* Refer to Rust's [platform support page][platform-support-doc] for more information on Rust's tiered platform support. Libraries @@ -435,7 +761,7 @@ Compiler - [Upgrade the FreeBSD toolchain to version 11.4][75204] - [`RUST_BACKTRACE`'s output is now more compact.][75048] -\* Refer to Rust's [platform support page][forge-platform-support] for more +\* Refer to Rust's [platform support page][platform-support-doc] for more information on Rust's tiered platform support. Libraries @@ -720,7 +1046,7 @@ Compiler - [Added tier 3 support for the `thumbv7a-uwp-windows-msvc` target.][72133] - [Upgraded to LLVM 10.][67759] -\* Refer to Rust's [platform support page][forge-platform-support] for more +\* Refer to Rust's [platform support page][platform-support-doc] for more information on Rust's tiered platform support. @@ -1229,7 +1555,7 @@ Compiler 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 +\* Refer to Rust's [platform support page][platform-support-doc] for more information on Rust's tiered platform support. Libraries @@ -1327,7 +1653,7 @@ Compiler - [You can now provide `--extern` flag without a path, indicating that it is available from the search path or specified with an `-L` flag.][64882] -\* Refer to Rust's [platform support page][forge-platform-support] for more +\* Refer to Rust's [platform support page][platform-support-doc] for more information on Rust's tiered platform support. [argfile-docs]: https://doc.rust-lang.org/nightly/rustc/command-line-arguments.html#path-load-command-line-flags-from-a-path @@ -1451,7 +1777,7 @@ Compiler - [Added tier 3 support for the `mips64-unknown-linux-muslabi64`, and `mips64el-unknown-linux-muslabi64` targets.][65843] -\* Refer to Rust's [platform support page][forge-platform-support] for more +\* Refer to Rust's [platform support page][platform-support-doc] for more information on Rust's tiered platform support. Libraries @@ -1601,7 +1927,7 @@ Compiler output of successful tests.][62600] -\* Refer to Rust's [platform support page][forge-platform-support] for more +\* Refer to Rust's [platform support page][platform-support-doc] for more information on Rust's tiered platform support. Libraries @@ -1695,7 +2021,7 @@ Compiler - [Added tier 3 support for the `riscv32i-unknown-none-elf` target.][62784] - [Upgraded to LLVM 9.][62592] -\* Refer to Rust's [platform support page][forge-platform-support] for more +\* Refer to Rust's [platform support page][platform-support-doc] for more information on Rust's tiered platform support. Libraries @@ -1737,6 +2063,11 @@ Cargo - [You can now pass the `--features` option multiple times to enable multiple features.][cargo/7084] +Rustdoc +------- + +- [Documentation on `pub use` statements is prepended to the documentation of the re-exported item][63048] + Misc ---- - [`rustc` will now warn about some incorrect uses of @@ -1771,6 +2102,7 @@ Compatibility Notes [63421]: https://github.com/rust-lang/rust/pull/63421/ [cargo/7084]: https://github.com/rust-lang/cargo/pull/7084/ [cargo/7143]: https://github.com/rust-lang/cargo/pull/7143/ +[63048]: https://github.com/rust-lang/rust/pull/63048 [`<*const T>::cast`]: https://doc.rust-lang.org/std/primitive.pointer.html#method.cast [`<*mut T>::cast`]: https://doc.rust-lang.org/std/primitive.pointer.html#method.cast [`Duration::as_secs_f32`]: https://doc.rust-lang.org/std/time/struct.Duration.html#method.as_secs_f32 @@ -1782,7 +2114,7 @@ Compatibility Notes [`Duration::mul_f32`]: https://doc.rust-lang.org/std/time/struct.Duration.html#method.mul_f32 [`Duration::mul_f64`]: https://doc.rust-lang.org/std/time/struct.Duration.html#method.mul_f64 [`any::type_name`]: https://doc.rust-lang.org/std/any/fn.type_name.html -[forge-platform-support]: https://forge.rust-lang.org/release/platform-support.html +[platform-support-doc]: https://doc.rust-lang.org/nightly/rustc/platform-support.html [pipeline-internals]: https://internals.rust-lang.org/t/evaluating-pipelined-rustc-compilation/10199 Version 1.37.0 (2019-08-15) |
