1Version 1.96.0 (2026-05-28)
2==========================
3
4<a id="1.96.0-Language"></a>
5
6Language
7--------
8- [Allow passing `expr` metavariable to `cfg`](https://github.com/rust-lang/rust/pull/146961)
9- [Always coerce never types in tuple expressions](https://github.com/rust-lang/rust/pull/147834)
10- [Avoid incorrect inference guidance of function arguments in rare cases](https://github.com/rust-lang/rust/pull/150316)
11- [Support s390x vector registers in inline assembly](https://github.com/rust-lang/rust/pull/154184)
12- [Allow using constants of type `ManuallyDrop` as patterns (fixing a regression introduced in 1.94.0)](https://github.com/rust-lang/rust/pull/154891)
13
14<a id="1.96.0-Compiler"></a>
15
16Compiler
17--------
18- [Enable link relaxation feature for LoongArch Linux targets](https://github.com/rust-lang/rust/pull/153427)
19- [Update `riscv64gc-unknown-fuchsia` baseline to RVA22 + vector](https://github.com/rust-lang/rust/pull/155072)
20
21<a id="1.96.0-Libraries"></a>
22
23Libraries
24---------
25- [Support iterating over ranges of `NonZero` integers](https://github.com/rust-lang/rust/pull/127534)
26- [refactor 'valid for read/write' definition: exclude null; add that as an exception on individual methods instead](https://github.com/rust-lang/rust/pull/152615)
27- [Fix SGX delayed host lookup via ToSocketAddr](https://github.com/rust-lang/rust/pull/152851)
28
29<a id="1.96.0-Stabilized-APIs"></a>
30
31Stabilized APIs
32---------------
33
34- [`assert_matches!`](https://doc.rust-lang.org/stable/std/macro.assert_matches.html)
35- [`debug_assert_matches!`](https://doc.rust-lang.org/stable/std/macro.debug_assert_matches.html)
36- [`From<T> for AssertUnwindSafe<T>`](https://doc.rust-lang.org/stable/std/panic/struct.AssertUnwindSafe.html#impl-From%3CT%3E-for-AssertUnwindSafe%3CT%3E)
37- [`From<T> for LazyCell<T, F>`](https://doc.rust-lang.org/stable/std/cell/struct.LazyCell.html#impl-From%3CT%3E-for-LazyCell%3CT,+F%3E)
38- [`From<T> for LazyLock<T, F>`](https://doc.rust-lang.org/stable/std/sync/struct.LazyLock.html#impl-From%3CT%3E-for-LazyLock%3CT,+F%3E)
39- [`core::range::RangeToInclusive`](https://doc.rust-lang.org/stable/core/range/struct.RangeToInclusive.html)
40- [`core::range::RangeToInclusiveIter`](https://doc.rust-lang.org/stable/core/range/struct.RangeToInclusiveIter.html)
41- [`core::range::RangeFrom`](https://doc.rust-lang.org/stable/core/ops/struct.RangeFrom.html)
42- [`core::range::RangeFromIter`](https://doc.rust-lang.org/stable/core/ops/struct.RangeFromIter.html)
43- [`core::range::Range`](https://doc.rust-lang.org/stable/std/range/struct.Range.html)
44- [`core::range::RangeIter`](https://doc.rust-lang.org/stable/std/range/struct.RangeIter.html)
45
46<a id="1.96.0-Cargo"></a>
47
48Cargo
49-----
50- [Allow a dependency to specify both a git repository and an alternate registry.](https://github.com/rust-lang/cargo/pull/16810/) Just like with crates.io, the git repository will be used locally, but the registry version will be used when published.
51- [Added `target.'cfg(..)'.rustdocflags` support in configuration.](https://github.com/rust-lang/cargo/pull/16846)
52- Fixed [CVE-2026-5222](https://blog.rust-lang.org/2026/05/25/cve-2026-5222/) and [CVE-2026-5223](https://blog.rust-lang.org/2026/05/25/cve-2026-5223/).
53
54<a id="1.96-Rustdoc"></a>
55
56Rustdoc
57-----
58- [Deprecation notes are now rendered like any other documentation](https://github.com/rust-lang/rust/pull/149931). Previously they used the css `white-space: pre-wrap;` property and stripped any `<p>` elements from the rendered html, however this caused issues and unintuitive behavior. The new behavior should be more predictable, however some multi-line deprecation notes will now be rendered as as single lines. If this is undesirable, you can use the standard markdown method of forcing a linebreak, which is two spaces followed by a newline (`"\n"`).
59- [Don't emit rustdoc `missing_doc_code_examples` lint on impl items](https://github.com/rust-lang/rust/pull/154048)
60- [Separate methods and associated functions in sidebar](https://github.com/rust-lang/rust/pull/154644)
61
62<a id="1.96.0-Compatibility-Notes"></a>
63
64Compatibility Notes
65-------------------
66- [Fix layout of `#[repr(Int)]` enums in some edge cases involving fields of uninhabited zero-sized types](https://github.com/rust-lang/rust/pull/146989)
67- [Prevent unsize-coercing into `Pin<Foo>` where `Foo` doesn't implement `Deref`. Some such coercions were previously allowed, but produce a type with no useful public API.](https://github.com/rust-lang/rust/pull/149218)
68- [rustc: Stop passing `--allow-undefined` on wasm targets](https://github.com/rust-lang/rust/pull/149868)
69- [Gate the accidentally stabilized `#![reexport_test_harness_main]` attribute](https://github.com/rust-lang/rust/pull/152210)
70- [Error on return-position-impl-trait-in-traits whose types are too private](https://github.com/rust-lang/rust/pull/152543)
71- [Report the `uninhabited_static` lint in dependencies and make it deny-by-default](https://github.com/rust-lang/rust/pull/152853)
72- [Distributed builds now contain non-split debuginfo for windows-gnu](https://github.com/rust-lang/rust/pull/152870)
73 This appears to improve the quality of backtraces. This change has no effect on the defaults for the output of rustc/cargo on these targets.
74- [Check const generic arguments are correctly typed in more positions](https://github.com/rust-lang/rust/pull/152931)
75- [Remove `-Csoft-float`](https://github.com/rust-lang/rust/pull/152973)
76- [Importing structs with `::{self [as name]}`, e.g., `struct S {}; use S::{self as Other};`, is now no longer permitted because `{self}` imports require a module parent.](https://github.com/rust-lang/rust/pull/152996)
77- [For `export_name`, `link_name`, and `link_section` attributes, if multiple of the same attribute is present, the first one now takes precedence.](https://github.com/rust-lang/rust/pull/153041)
78- [Update the minimum external LLVM to 21](https://github.com/rust-lang/rust/pull/153684)
79- On `avr` targets, C's `double` type is 32-bit by default, so [change `c_double` to `f32` on `avr` targets to match](https://github.com/rust-lang/rust/pull/154647). This is a breaking change, but necessary to make `c_double` match C's double.
80
81<a id="1.96.0-Internal-Changes"></a>
82
83Internal Changes
84----------------
85
86These changes do not affect any public interfaces of Rust, but they represent
87significant improvements to the performance or internals of rustc and related
88tools.
89
90- [JSON targets: `aarch64` softfloat targets now have to have `rustc_abi` set to `"softfloat"`](https://github.com/rust-lang/rust/pull/152941)
91- [target specs: stricter checks for LLVM ABI values, and correlate that with `cfg(target_abi)`](https://github.com/rust-lang/rust/pull/153769)
92
93
94Version 1.95.0 (2026-04-16)
95===========================
96
97<a id="1.95-Language"></a>
98
99Language
100--------
101- [Stabilize `if let` guards on match arms](https://github.com/rust-lang/rust/pull/141295)
102- [`irrefutable_let_patterns` lint no longer lints on let chains](https://github.com/rust-lang/rust/pull/146832)
103- [Support importing path-segment keywords with renaming](https://github.com/rust-lang/rust/pull/146972)
104- [Stabilize inline assembly for PowerPC and PowerPC64](https://github.com/rust-lang/rust/pull/147996)
105- [const-eval: be more consistent in the behavior of padding during typed copies](https://github.com/rust-lang/rust/pull/148967)
106- [Const blocks are no longer evaluated to determine if expressions involving fallible operations can implicitly be constant-promoted.](https://github.com/rust-lang/rust/pull/150557). Expressions whose ability to implicitly be promoted would depend on the result of a const block are no longer implicitly promoted.
107- [Make operational semantics of pattern matching independent of crate and module](https://github.com/rust-lang/rust/pull/150681)
108
109
110<a id="1.95-Compiler"></a>
111
112Compiler
113--------
114
115- [Stabilize `--remap-path-scope` for controlling the scoping of how paths get remapped in the resulting binary](https://github.com/rust-lang/rust/pull/147611)
116- [Apply patches for CVE-2026-6042 and CVE-2026-40200 to vendored musl](https://github.com/rust-lang/rust/pull/155171)
117
118<a id="1.95-Platform-Support"></a>
119
120Platform Support
121----------------
122- [Promote `powerpc64-unknown-linux-musl` to Tier 2 with host tools](https://github.com/rust-lang/rust/pull/149962)
123- [Promote `aarch64-apple-tvos` to Tier 2](https://github.com/rust-lang/rust/pull/152021)
124- [Promote `aarch64-apple-tvos-sim` to Tier 2](https://github.com/rust-lang/rust/pull/152021)
125- [Promote `aarch64-apple-watchos` to Tier 2](https://github.com/rust-lang/rust/pull/152021)
126- [Promote `aarch64-apple-watchos-sim` to Tier 2](https://github.com/rust-lang/rust/pull/152021)
127- [Promote `aarch64-apple-visionos` to Tier 2](https://github.com/rust-lang/rust/pull/152021)
128- [Promote `aarch64-apple-visionos-sim` to Tier 2](https://github.com/rust-lang/rust/pull/152021)
129
130
131Refer to Rust's [platform support page][platform-support-doc]
132for more information on Rust's tiered platform support.
133
134[platform-support-doc]: https://doc.rust-lang.org/rustc/platform-support.html
135
136<a id="1.95-Libraries"></a>
137
138Libraries
139---------
140- [`thread::scope`: document how join interacts with TLS destructors](https://github.com/rust-lang/rust/pull/149482)
141- [Speed up `str::contains` on aarch64 targets with `neon` target feature enabled by default](https://github.com/rust-lang/rust/pull/152176)
142
143
144<a id="1.95-Stabilized-APIs"></a>
145
146Stabilized APIs
147---------------
148
149- [`MaybeUninit<[T; N]>: From<[MaybeUninit<T>; N]>`](https://doc.rust-lang.org/stable/std/mem/union.MaybeUninit.html#impl-From%3CMaybeUninit%3C%5BT;+N%5D%3E%3E-for-%5BMaybeUninit%3CT%3E;+N%5D)
150- [`MaybeUninit<[T; N]>: AsRef<[MaybeUninit<T>; N]>`](https://doc.rust-lang.org/stable/std/mem/union.MaybeUninit.html#impl-AsRef%3C%5BMaybeUninit%3CT%3E;+N%5D%3E-for-MaybeUninit%3C%5BT;+N%5D%3E)
151- [`MaybeUninit<[T; N]>: AsRef<[MaybeUninit<T>]>`](https://doc.rust-lang.org/stable/std/mem/union.MaybeUninit.html#impl-AsRef%3C%5BMaybeUninit%3CT%3E%5D%3E-for-MaybeUninit%3C%5BT;+N%5D%3E)
152- [`MaybeUninit<[T; N]>: AsMut<[MaybeUninit<T>; N]>`](https://doc.rust-lang.org/beta/std/mem/union.MaybeUninit.html#impl-AsMut%3C%5BMaybeUninit%3CT%3E;+N%5D%3E-for-MaybeUninit%3C%5BT;+N%5D%3E)
153- [`MaybeUninit<[T; N]>: AsMut<[MaybeUninit<T>]>`](https://doc.rust-lang.org/stable/std/mem/union.MaybeUninit.html#impl-AsMut%3C%5BMaybeUninit%3CT%3E%5D%3E-for-MaybeUninit%3C%5BT;+N%5D%3E)
154- [`[MaybeUninit<T>; N]: From<MaybeUninit<[T; N]>>`](https://doc.rust-lang.org/stable/std/mem/union.MaybeUninit.html#impl-From%3C%5BMaybeUninit%3CT%3E;+N%5D%3E-for-MaybeUninit%3C%5BT;+N%5D%3E)
155- [`Cell<[T; N]>: AsRef<[Cell<T>; N]>`](https://doc.rust-lang.org/stable/std/cell/struct.Cell.html#impl-AsRef%3C%5BCell%3CT%3E;+N%5D%3E-for-Cell%3C%5BT;+N%5D%3E)
156- [`Cell<[T; N]>: AsRef<[Cell<T>]>`](https://doc.rust-lang.org/stable/std/cell/struct.Cell.html#impl-AsRef%3C%5BCell%3CT%3E%5D%3E-for-Cell%3C%5BT;+N%5D%3E)
157- [`Cell<[T]>: AsRef<[Cell<T>]>`](https://doc.rust-lang.org/stable/std/cell/struct.Cell.html#impl-AsRef%3C%5BCell%3CT%3E%5D%3E-for-Cell%3C%5BT%5D%3E)
158- [`bool: TryFrom<{integer}>`](https://doc.rust-lang.org/stable/std/primitive.bool.html#impl-TryFrom%3Cu128%3E-for-bool)
159- [`AtomicPtr::update`](https://doc.rust-lang.org/stable/std/sync/atomic/struct.AtomicPtr.html#method.update)
160- [`AtomicPtr::try_update`](https://doc.rust-lang.org/stable/std/sync/atomic/struct.AtomicPtr.html#method.try_update)
161- [`AtomicBool::update`](https://doc.rust-lang.org/stable/std/sync/atomic/struct.AtomicBool.html#method.update)
162- [`AtomicBool::try_update`](https://doc.rust-lang.org/stable/std/sync/atomic/struct.AtomicBool.html#method.try_update)
163- [`AtomicIn::update`](https://doc.rust-lang.org/stable/std/sync/atomic/struct.AtomicIsize.html#method.update)
164- [`AtomicIn::try_update`](https://doc.rust-lang.org/stable/std/sync/atomic/struct.AtomicIsize.html#method.try_update)
165- [`AtomicUn::update`](https://doc.rust-lang.org/stable/std/sync/atomic/struct.AtomicUsize.html#method.update)
166- [`AtomicUn::try_update`](https://doc.rust-lang.org/stable/std/sync/atomic/struct.AtomicUsize.html#method.try_update)
167- [`cfg_select!`](https://doc.rust-lang.org/stable/std/macro.cfg_select.html)
168- [`mod core::range`](https://doc.rust-lang.org/stable/core/range/index.html)
169- [`core::range::RangeInclusive`](https://doc.rust-lang.org/stable/core/range/struct.RangeInclusive.html)
170- [`core::range::RangeInclusiveIter`](https://doc.rust-lang.org/stable/core/range/struct.RangeInclusiveIter.html)
171- [`core::hint::cold_path`](https://doc.rust-lang.org/stable/core/hint/fn.cold_path.html)
172- [`<*const T>::as_ref_unchecked`](https://doc.rust-lang.org/stable/std/primitive.pointer.html#method.as_ref_unchecked)
173- [`<*mut T>::as_ref_unchecked`](https://doc.rust-lang.org/stable/std/primitive.pointer.html#method.as_ref_unchecked-1)
174- [`<*mut T>::as_mut_unchecked`](https://doc.rust-lang.org/stable/std/primitive.pointer.html#method.as_mut_unchecked)
175- [`Vec::push_mut`](https://doc.rust-lang.org/stable/std/vec/struct.Vec.html#method.push_mut)
176- [`Vec::insert_mut`](https://doc.rust-lang.org/stable/std/vec/struct.Vec.html#method.insert_mut)
177- [`VecDeque::push_front_mut`](https://doc.rust-lang.org/stable/std/collections/struct.VecDeque.html#method.push_front_mut)
178- [`VecDeque::push_back_mut`](https://doc.rust-lang.org/stable/std/collections/struct.VecDeque.html#method.push_back_mut)
179- [`VecDeque::insert_mut`](https://doc.rust-lang.org/stable/std/collections/struct.VecDeque.html#method.insert_mut)
180- [`LinkedList::push_front_mut`](https://doc.rust-lang.org/stable/std/collections/struct.LinkedList.html#method.push_front_mut)
181- [`LinkedList::push_back_mut`](https://doc.rust-lang.org/stable/std/collections/struct.LinkedList.html#method.push_back_mut)
182- [`Layout::dangling_ptr`](https://doc.rust-lang.org/stable/std/alloc/struct.Layout.html#method.dangling_ptr)
183- [`Layout::repeat`](https://doc.rust-lang.org/stable/std/alloc/struct.Layout.html#method.repeat)
184- [`Layout::repeat_packed`](https://doc.rust-lang.org/stable/std/alloc/struct.Layout.html#method.repeat_packed)
185- [`Layout::extend_packed`](https://doc.rust-lang.org/stable/std/alloc/struct.Layout.html#method.extend_packed)
186
187These previously stable APIs are now stable in const contexts:
188
189- [`fmt::from_fn`](https://doc.rust-lang.org/stable/std/fmt/fn.from_fn.html)
190- [`ControlFlow::is_break`](https://doc.rust-lang.org/stable/core/ops/enum.ControlFlow.html#method.is_break)
191- [`ControlFlow::is_continue`](https://doc.rust-lang.org/stable/core/ops/enum.ControlFlow.html#method.is_continue)
192
193<a id="1.95-Rustdoc"></a>
194
195Rustdoc
196-----
197- [In search results, rank unstable items lower](https://github.com/rust-lang/rust/pull/149460)
198- [Add new "hide deprecated items" setting in rustdoc](https://github.com/rust-lang/rust/pull/151091)
199
200<a id="1.95-Compatibility-Notes"></a>
201
202Compatibility Notes
203-------------------
204- [Array coercions may now result in less inference constraints than before](https://github.com/rust-lang/rust/pull/140283)
205- Importing `$crate` without renaming, i.e. `use $crate::{self};`, is now no longer permitted due to stricter error checking for `self` imports.
206- [const-eval: be more consistent in the behavior of padding during typed copies.](https://github.com/rust-lang/rust/pull/148967)
207 In very rare cases, this may cause compilation errors due to bytes from parts of a pointer ending up in the padding bytes of a `const` or `static`.
208- [A future-incompatibility warning lint `ambiguous_glob_imported_traits` is now reported when using an ambiguously glob imported trait](https://github.com/rust-lang/rust/pull/149058)
209- [Check lifetime bounds of types mentioning only type parameters](https://github.com/rust-lang/rust/pull/149389)
210- [Report more visibility-related ambiguous import errors](https://github.com/rust-lang/rust/pull/149596)
211- [Deprecate `Eq::assert_receiver_is_total_eq` and emit future compatibility warnings on manual impls](https://github.com/rust-lang/rust/pull/149978)
212- [powerpc64: Use the ELF ABI version set in target spec instead of guessing](https://github.com/rust-lang/rust/pull/150468) (fixes the ELF ABI used by the OpenBSD target)
213- Matching on a `#[non_exhaustive]` enum [now reads the discriminant, even if the enum has only one variant](https://github.com/rust-lang/rust/pull/150681). This can cause closures to capture values that they previously wouldn't.
214- `mut ref` and `mut ref mut` patterns, part of the unstable [Match Ergonomics 2024 RFC](https://github.com/rust-lang/rust/issues/123076), were accidentally allowed on stable within struct pattern field shorthand. These patterns are now correctly feature-gated as unstable in this position.
215- [Add future-compatibility warning for derive helper attributes which conflict with built-in attributes](https://github.com/rust-lang/rust/pull/151152)
216- [JSON target specs](https://doc.rust-lang.org/rustc/targets/custom.html) have been destabilized and now require `-Z unstable-options` to use. Previously, they could not be used without the standard library, which has no stable build mechanism. In preparation for the `build-std` project adding that support, JSON target specs are being proactively gated to ensure they remain unstable even if `build-std` is stabilized. Cargo now includes the `-Z json-target-spec` CLI flag to automatically pass `-Z unstable-options` to the compiler when needed. See [#150151](https://github.com/rust-lang/rust/pull/150151), [#151534](https://github.com/rust-lang/rust/pull/150151), and [rust-lang/cargo#16557](https://github.com/rust-lang/cargo/pull/16557).
217- [The arguments of `#[feature]` attributes on invalid targets are now checked](https://github.com/rust-lang/rust/issues/153764)
218
219<a id="1.95-Internal-Changes"></a>
220
221Internal Changes
222----------------
223
224These changes do not affect any public interfaces of Rust, but they represent
225significant improvements to the performance or internals of rustc and related
226tools.
227
228- [Update to LLVM 22](https://github.com/rust-lang/rust/pull/150722)
229
230
231Version 1.94.1 (2026-03-26)
232===========================
233
234<a id="1.94.1"></a>
235
236* [Fix `std::thread::spawn` on wasm32-wasip1-threads](https://github.com/rust-lang/rust/pull/153634)
237* [Remove new methods added to `std::os::windows::fs::OpenOptionsExt`](https://github.com/rust-lang/rust/pull/153491)
238 The new methods were unstable, but the trait itself is not sealed and so
239 cannot be extended with non-default methods.
240* [Clippy: fix ICE in `match_same_arms`](https://github.com/rust-lang/rust-clippy/pull/16685)
241* [Cargo: update tar to 0.4.45](https://github.com/rust-lang/cargo/pull/16769)
242 This resolves CVE-2026-33055 and CVE-2026-33056. Users of crates.io are not affected.
243 See [blog](https://blog.rust-lang.org/2026/03/21/cve-2026-33056/) for more details.
244
245Version 1.94.0 (2026-03-05)
246==========================
247
248<a id="1.94.0-Language"></a>
249
250Language
251--------
252- [Impls and impl items inherit `dead_code` lint level of the corresponding traits and trait items](https://github.com/rust-lang/rust/pull/144113)
253- [Stabilize additional 29 RISC-V target features including large portions of the RVA22U64 / RVA23U64 profiles](https://github.com/rust-lang/rust/pull/145948)
254- [Add warn-by-default `unused_visibilities` lint for visibility on `const _` declarations](https://github.com/rust-lang/rust/pull/147136)
255- [Update to Unicode 17](https://github.com/rust-lang/rust/pull/148321)
256- [Avoid incorrect lifetime errors for closures](https://github.com/rust-lang/rust/pull/148329)
257
258<a id="1.94.0-Platform-Support"></a>
259
260Platform Support
261----------------
262
263- [Add `riscv64im-unknown-none-elf` as a tier 3 target](https://github.com/rust-lang/rust/pull/148790)
264
265Refer to Rust's [platform support page][platform-support-doc]
266for more information on Rust's tiered platform support.
267
268[platform-support-doc]: https://doc.rust-lang.org/rustc/platform-support.html
269
270<a id="1.94.0-Libraries"></a>
271
272Libraries
273---------
274
275- [Relax `T: Ord` bound for some `BinaryHeap<T>` methods.](https://github.com/rust-lang/rust/pull/149408)
276
277<a id="1.94.0-Stabilized-APIs"></a>
278
279Stabilized APIs
280---------------
281
282- [`<[T]>::array_windows`](https://doc.rust-lang.org/stable/std/primitive.slice.html#method.array_windows)
283- [`<[T]>::element_offset`](https://doc.rust-lang.org/stable/std/primitive.slice.html#method.element_offset)
284- [`LazyCell::get`](https://doc.rust-lang.org/stable/std/cell/struct.LazyCell.html#method.get)
285- [`LazyCell::get_mut`](https://doc.rust-lang.org/stable/std/cell/struct.LazyCell.html#method.get_mut)
286- [`LazyCell::force_mut`](https://doc.rust-lang.org/stable/std/cell/struct.LazyCell.html#method.force_mut)
287- [`LazyLock::get`](https://doc.rust-lang.org/stable/std/sync/struct.LazyLock.html#method.get)
288- [`LazyLock::get_mut`](https://doc.rust-lang.org/stable/std/sync/struct.LazyLock.html#method.get_mut)
289- [`LazyLock::force_mut`](https://doc.rust-lang.org/stable/std/sync/struct.LazyLock.html#method.force_mut)
290- [`impl TryFrom<char> for usize`](https://doc.rust-lang.org/stable/std/convert/trait.TryFrom.html#impl-TryFrom%3Cchar%3E-for-usize)
291- [`std::iter::Peekable::next_if_map`](https://doc.rust-lang.org/stable/std/iter/struct.Peekable.html#method.next_if_map)
292- [`std::iter::Peekable::next_if_map_mut`](https://doc.rust-lang.org/stable/std/iter/struct.Peekable.html#method.next_if_map_mut)
293- [x86 `avx512fp16` intrinsics](https://github.com/rust-lang/rust/issues/127213)
294 (excluding those that depend directly on the unstable `f16` type)
295- [AArch64 NEON fp16 intrinsics](https://github.com/rust-lang/rust/issues/136306)
296 (excluding those that depend directly on the unstable `f16` type)
297- [`f32::consts::EULER_GAMMA`](https://doc.rust-lang.org/stable/std/f32/consts/constant.EULER_GAMMA.html)
298- [`f64::consts::EULER_GAMMA`](https://doc.rust-lang.org/stable/std/f64/consts/constant.EULER_GAMMA.html)
299- [`f32::consts::GOLDEN_RATIO`](https://doc.rust-lang.org/stable/std/f32/consts/constant.GOLDEN_RATIO.html)
300- [`f64::consts::GOLDEN_RATIO`](https://doc.rust-lang.org/stable/std/f64/consts/constant.GOLDEN_RATIO.html)
301
302
303These previously stable APIs are now stable in const contexts:
304
305- [`f32::mul_add`](https://doc.rust-lang.org/stable/std/primitive.f32.html#method.mul_add)
306- [`f64::mul_add`](https://doc.rust-lang.org/stable/std/primitive.f64.html#method.mul_add)
307
308
309<a id="1.94.0-Cargo"></a>
310
311Cargo
312-----
313
314- Stabilize the config include key. The top-level include config key allows loading additional config files, enabling better organization, sharing, and management of Cargo configurations across projects and environments. [docs](https://doc.rust-lang.org/nightly/cargo/reference/config.html#including-extra-configuration-files) [#16284](https://github.com/rust-lang/cargo/pull/16284)
315- Stabilize the pubtime field in registry index. This records when a crate version was published and enables time-based dependency resolution in the future. Note that crates.io will gradually backfill existing packages when a new version is published. Not all crates have pubtime yet. [#16369](https://github.com/rust-lang/cargo/pull/16369) [#16372](https://github.com/rust-lang/cargo/pull/16372)
316- Cargo now parses [TOML v1.1](https://toml.io/en/v1.1.0) for manifests and configuration files. Note that using these features in Cargo.toml will raise your development MSRV, but the published manifest remains compatible with older parsers. [#16415](https://github.com/rust-lang/cargo/pull/16415)
317- [Make `CARGO_BIN_EXE_<crate>` available at runtime ](https://github.com/rust-lang/cargo/pull/16421/)
318
319<a id="1.94.0-Compatibility-Notes"></a>
320
321Compatibility Notes
322-------------------
323- [Forbid freely casting lifetime bounds of `dyn`-types](https://github.com/rust-lang/rust/pull/136776)
324- [Make closure capturing have consistent and correct behaviour around patterns](https://github.com/rust-lang/rust/pull/138961)
325 Some finer details of how precise closure captures get affected by pattern matching have been changed. In some cases, this can cause a non-move closure that was previously capturing an entire variable by move, to now capture only part of that variable by move, and other parts by borrow. This can cause the borrow checker to complain where it previously didn't, or cause `Drop` to run at a different point in time.
326- [Standard library macros are now imported via prelude, not via injected `#[macro_use]`](https://github.com/rust-lang/rust/pull/139493)
327 This will raise an error if macros of the same name are glob imported.
328 For example if a crate defines their own `matches` macro and then glob imports that,
329 it's now ambiguous whether the custom or standard library `matches` is meant and
330 an explicit import of the name is required to resolve the ambiguity.
331 One exception is `core::panic` and `std::panic`, if their import is ambiguous
332 a new warning ([`ambiguous_panic_imports`](https://github.com/rust-lang/rust/issues/147319)) is raised.
333 This may raise a new warning ([`ambiguous_panic_imports`](https://github.com/rust-lang/rust/issues/147319)) on `#![no_std]` code glob importing the std crate.
334 Both `core::panic!` and `std::panic!` are then in scope and which is used is ambiguous.
335- [Don't strip shebang in expression-context `include!(…)`s](https://github.com/rust-lang/rust/pull/146377)
336 This can cause previously working includes to no longer compile if they included files which started with a shebang.
337- [Ambiguous glob reexports are now also visible cross-crate](https://github.com/rust-lang/rust/pull/147984)
338 This unifies behavior between local and cross-crate errors on these exports, which may introduce new ambiguity errors.
339- [Don't normalize where-clauses before checking well-formedness](https://github.com/rust-lang/rust/pull/148477)
340- [Introduce a future compatibility warning on codegen attributes on body-free trait methods](https://github.com/rust-lang/rust/pull/148756)
341 These attributes currently have no effect in this position.
342- [On Windows `std::time::SystemTime::checked_sub_duration` will return `None` for times before the Windows epoch (1/1/1601)](https://github.com/rust-lang/rust/pull/148825)
343- [Lifetime identifiers such as `'a` are now NFC normalized](https://github.com/rust-lang/rust/pull/149192).
344- [Overhaul filename handling for cross-compiler consistency](https://github.com/rust-lang/rust/pull/149709)
345 Any paths emitted by compiler now always respect the relative-ness of the paths and `--remap-path-prefix` given originally.
346 One side-effect of this change is that paths emitted for local crates in Cargo (path dependencies and workspace members) are no longer absolute but relative when emitted as part of a diagnostic in a downstream crate.
347
348<a id="1.94.0-Internal-Changes"></a>
349
350Internal Changes
351----------------
352
353These changes do not affect any public interfaces of Rust, but they represent
354significant improvements to the performance or internals of rustc and related
355tools.
356
357- [Switch to `annotate-snippets` for error emission](https://github.com/rust-lang/rust/pull/150032)
358 This should preserve mostly the same outputs in rustc error messages.
359
360Version 1.93.1 (2026-02-12)
361===========================
362
363<a id="1.93.1"></a>
364
365- [Don't try to recover keyword as non-keyword identifier](https://github.com/rust-lang/rust/pull/150590), fixing an ICE that especially [affected rustfmt](https://github.com/rust-lang/rustfmt/issues/6739).
366- [Fix `clippy::panicking_unwrap` false-positive on field access with implicit deref](https://github.com/rust-lang/rust-clippy/pull/16196).
367- [Revert "Update wasm-related dependencies in CI"](https://github.com/rust-lang/rust/pull/152259), fixing file descriptor leaks on the `wasm32-wasip2` target.
368
369Version 1.93.0 (2026-01-22)
370==========================
371
372<a id="1.93.0-Language"></a>
373
374Language
375--------
376- [Stabilize several s390x `vector`-related target features and the `is_s390x_feature_detected!` macro](https://github.com/rust-lang/rust/pull/145656)
377- [Stabilize declaration of C-style variadic functions for the `system` ABI](https://github.com/rust-lang/rust/pull/145954)
378- [Emit error when using some keyword as a `cfg` predicate](https://github.com/rust-lang/rust/pull/146978)
379- [Stabilize `asm_cfg`](https://github.com/rust-lang/rust/pull/147736)
380- [During const-evaluation, support copying pointers byte-by-byte](https://github.com/rust-lang/rust/pull/148259)
381- [LUB coercions now correctly handle function item types, and functions with differing safeties](https://github.com/rust-lang/rust/pull/148602)
382- [Allow `const` items that contain mutable references to `static` (which is *very* unsafe, but not *always* UB)](https://github.com/rust-lang/rust/pull/148746)
383- [Add warn-by-default `const_item_interior_mutations` lint to warn against calls which mutate interior mutable `const` items](https://github.com/rust-lang/rust/pull/148407)
384- [Add warn-by-default `function_casts_as_integer` lint](https://github.com/rust-lang/rust/pull/141470)
385
386
387<a id="1.93.0-Compiler"></a>
388
389Compiler
390--------
391- [Stabilize `-Cjump-tables=bool`](https://github.com/rust-lang/rust/pull/145974). The flag was previously called `-Zno-jump-tables`.
392
393<a id="1.93.0-Platform-Support"></a>
394
395Platform Support
396----------------
397
398- [Promote `riscv64a23-unknown-linux-gnu` to Tier 2 (without host tools)](https://github.com/rust-lang/rust/pull/148435)
399
400Refer to Rust's [platform support page][platform-support-doc]
401for more information on Rust's tiered platform support.
402
403[platform-support-doc]: https://doc.rust-lang.org/rustc/platform-support.html
404
405<a id="1.93.0-Libraries"></a>
406
407Libraries
408---------
409- [Stop internally using `specialization` on the `Copy` trait as it is unsound in the presence of lifetime dependent `Copy` implementations. This may result in some performance regressions as some standard library APIs may now call `Clone::clone` instead of performing bitwise copies](https://github.com/rust-lang/rust/pull/135634)
410- [Allow the global allocator to use thread-local storage and `std::thread::current()`](https://github.com/rust-lang/rust/pull/144465)
411- [Make `BTree::append` not update existing keys when appending an entry which already exists](https://github.com/rust-lang/rust/pull/145628)
412- [Don't require `T: RefUnwindSafe` for `vec::IntoIter<T>: UnwindSafe`](https://github.com/rust-lang/rust/pull/145665)
413
414
415<a id="1.93.0-Stabilized-APIs"></a>
416
417Stabilized APIs
418---------------
419
420- [`<[MaybeUninit<T>]>::assume_init_drop`](https://doc.rust-lang.org/stable/core/primitive.slice.html#method.assume_init_drop)
421- [`<[MaybeUninit<T>]>::assume_init_ref`](https://doc.rust-lang.org/stable/core/primitive.slice.html#method.assume_init_ref)
422- [`<[MaybeUninit<T>]>::assume_init_mut`](https://doc.rust-lang.org/stable/core/primitive.slice.html#method.assume_init_mut)
423- [`<[MaybeUninit<T>]>::write_copy_of_slice`](https://doc.rust-lang.org/stable/std/primitive.slice.html#method.write_copy_of_slice)
424- [`<[MaybeUninit<T>]>::write_clone_of_slice`](https://doc.rust-lang.org/stable/std/primitive.slice.html#method.write_clone_of_slice)
425- [`String::into_raw_parts`](https://doc.rust-lang.org/stable/std/string/struct.String.html#method.into_raw_parts)
426- [`Vec::into_raw_parts`](https://doc.rust-lang.org/stable/std/vec/struct.Vec.html#method.into_raw_parts)
427- [`<iN>::unchecked_neg`](https://doc.rust-lang.org/stable/std/primitive.isize.html#method.unchecked_neg)
428- [`<iN>::unchecked_shl`](https://doc.rust-lang.org/stable/std/primitive.isize.html#method.unchecked_shl)
429- [`<iN>::unchecked_shr`](https://doc.rust-lang.org/stable/std/primitive.isize.html#method.unchecked_shr)
430- [`<uN>::unchecked_shl`](https://doc.rust-lang.org/stable/std/primitive.usize.html#method.unchecked_shl)
431- [`<uN>::unchecked_shr`](https://doc.rust-lang.org/stable/std/primitive.usize.html#method.unchecked_shr)
432- [`<[T]>::as_array`](https://doc.rust-lang.org/stable/std/primitive.slice.html#method.as_array)
433- [`<[T]>::as_mut_array`](https://doc.rust-lang.org/stable/std/primitive.slice.html#method.as_mut_array)
434- [`<*const [T]>::as_array`](https://doc.rust-lang.org/stable/std/primitive.pointer.html#method.as_array)
435- [`<*mut [T]>::as_mut_array`](https://doc.rust-lang.org/stable/std/primitive.pointer.html#method.as_mut_array)
436- [`VecDeque::pop_front_if`](https://doc.rust-lang.org/stable/std/collections/struct.VecDeque.html#method.pop_front_if)
437- [`VecDeque::pop_back_if`](https://doc.rust-lang.org/stable/std/collections/struct.VecDeque.html#method.pop_back_if)
438- [`Duration::from_nanos_u128`](https://doc.rust-lang.org/stable/std/time/struct.Duration.html#method.from_nanos_u128)
439- [`char::MAX_LEN_UTF8`](https://doc.rust-lang.org/stable/std/primitive.char.html#associatedconstant.MAX_LEN_UTF8)
440- [`char::MAX_LEN_UTF16`](https://doc.rust-lang.org/stable/std/primitive.char.html#associatedconstant.MAX_LEN_UTF16)
441- [`std::fmt::from_fn`](https://doc.rust-lang.org/stable/std/fmt/fn.from_fn.html)
442- [`std::fmt::FromFn`](https://doc.rust-lang.org/stable/std/fmt/struct.FromFn.html)
443
444
445<a id="1.93.0-Cargo"></a>
446
447Cargo
448-----
449- [Enable CARGO_CFG_DEBUG_ASSERTIONS in build scripts based on profile](https://github.com/rust-lang/cargo/pull/16160/)
450- [In `cargo tree`, support long forms for `--format` variables](https://github.com/rust-lang/cargo/pull/16204/)
451- [Add `--workspace` to `cargo clean`](https://github.com/rust-lang/cargo/pull/16263/)
452
453<a id="1.93.0-Rustdoc"></a>
454
455Rustdoc
456-----
457- [Remove `#![doc(document_private_items)]`](https://github.com/rust-lang/rust/pull/146495)
458- [Include attribute and derive macros in search filters for "macros"](https://github.com/rust-lang/rust/pull/148176)
459- [Include extern crates in search filters for `import`](https://github.com/rust-lang/rust/pull/148301)
460- [Validate usage of crate-level doc attributes](https://github.com/rust-lang/rust/pull/149197). This means if any of `html_favicon_url`, `html_logo_url`, `html_playground_url`, `issue_tracker_base_url`, or `html_no_source` either has a missing value, an unexpected value, or a value of the wrong type, rustdoc will emit the deny-by-default lint `rustdoc::invalid_doc_attributes`.
461
462
463<a id="1.93.0-Compatibility-Notes"></a>
464
465Compatibility Notes
466-------------------
467- [Introduce `pin_v2` into the builtin attributes namespace](https://github.com/rust-lang/rust/pull/139751)
468- [Update bundled musl to 1.2.5](https://github.com/rust-lang/rust/pull/142682)
469- [On Emscripten, the unwinding ABI used when compiling with `panic=unwind` was changed from the JS exception handling ABI to the wasm exception handling ABI.](https://github.com/rust-lang/rust/pull/147224) If linking C/C++ object files with Rust objects, `-fwasm-exceptions` must be passed to the linker now. On nightly Rust, it is possible to get the old behavior with `-Zwasm-emscripten-eh=false -Zbuild-std`, but it will be removed in a future release.
470- The `#[test]` attribute, used to define tests, was previously ignored in various places where it had no meaning (e.g on trait methods or types). Putting the `#[test]` attribute in these places is no longer ignored, and will now result in an error; this may also result in errors when generating rustdoc. [Error when `test` attribute is applied to structs](https://github.com/rust-lang/rust/pull/147841)
471- Cargo now sets the `CARGO_CFG_DEBUG_ASSERTIONS` environment variable in more situations. This will cause crates depending on `static-init` versions 1.0.1 to 1.0.3 to fail compilation with "failed to resolve: use of unresolved module or unlinked crate `parking_lot`". See [the linked issue](https://github.com/rust-lang/rust/issues/150646#issuecomment-3718964342) for details.
472- [User written types in the `offset_of!` macro are now checked to be well formed.](https://github.com/rust-lang/rust/issues/150465/)
473- `cargo publish` no longer emits `.crate` files as a final artifact for user access when the `build.build-dir` config is unset
474- [Upgrade the `deref_nullptr` lint from warn-by-default to deny-by-default](https://github.com/rust-lang/rust/pull/148122)
475- [Add future-incompatibility warning for `...` function parameters without a pattern outside of `extern` blocks](https://github.com/rust-lang/rust/pull/143619)
476- [Introduce future-compatibility warning for `repr(C)` enums whose discriminant values do not fit into a `c_int` or `c_uint`](https://github.com/rust-lang/rust/pull/147017)
477- [Introduce future-compatibility warning against ignoring `repr(C)` types as part of `repr(transparent)`](https://github.com/rust-lang/rust/pull/147185)
478
479
480Version 1.92.0 (2025-12-11)
481==========================
482
483<a id="1.92.0-Language"></a>
484
485Language
486--------
487- [Document `MaybeUninit` representation and validity](https://github.com/rust-lang/rust/pull/140463)
488- [Allow `&raw [mut | const]` for union field in safe code](https://github.com/rust-lang/rust/pull/141469)
489- [Prefer item bounds of associated types over where-bounds for auto-traits and `Sized`](https://github.com/rust-lang/rust/pull/144064)
490- [Do not materialize `X` in `[X; 0]` when `X` is unsizing a const](https://github.com/rust-lang/rust/pull/145277)
491- [Support combining `#[track_caller]` and `#[no_mangle]` (requires every declaration specifying `#[track_caller]` as well)](https://github.com/rust-lang/rust/pull/145724)
492- [Make never type lints `never_type_fallback_flowing_into_unsafe` and `dependency_on_unit_never_type_fallback` deny-by-default](https://github.com/rust-lang/rust/pull/146167)
493- [Allow specifying multiple bounds for same associated item, except in trait objects](https://github.com/rust-lang/rust/pull/146593)
494- [Slightly strengthen higher-ranked region handling in coherence](https://github.com/rust-lang/rust/pull/146725)
495- [The `unused_must_use` lint no longer warns on `Result<(), Uninhabited>` (for instance, `Result<(), !>`), or `ControlFlow<Uninhabited, ()>`](https://github.com/rust-lang/rust/pull/147382). This avoids having to check for an error that can never happen.
496
497<a id="1.92.0-Compiler"></a>
498
499Compiler
500--------
501- [Make `mips64el-unknown-linux-muslabi64` link dynamically](https://github.com/rust-lang/rust/pull/146858)
502- [Remove current code for embedding command-line args in PDB](https://github.com/rust-lang/rust/pull/147022)
503 Command-line information is typically not needed by debugging tools, and the removed code
504 was causing problems for incremental builds even on targets that don't use PDB debuginfo.
505
506<a id="1.92.0-Libraries"></a>
507
508Libraries
509---------
510- [Specialize `Iterator::eq{_by}` for `TrustedLen` iterators](https://github.com/rust-lang/rust/pull/137122)
511- [Simplify `Extend` for tuples](https://github.com/rust-lang/rust/pull/138799)
512- [Added details to `Debug` for `EncodeWide`](https://github.com/rust-lang/rust/pull/140153).
513- [`iter::Repeat::last`](https://github.com/rust-lang/rust/pull/147258) and [`count`](https://github.com/rust-lang/rust/pull/146410) will now panic, rather than looping infinitely.
514
515<a id="1.92.0-Stabilized-APIs"></a>
516
517Stabilized APIs
518---------------
519
520- [`NonZero<u{N}>::div_ceil`](https://doc.rust-lang.org/stable/std/num/struct.NonZero.html#method.div_ceil)
521- [`Location::file_as_c_str`](https://doc.rust-lang.org/stable/std/panic/struct.Location.html#method.file_as_c_str)
522- [`RwLockWriteGuard::downgrade`](https://doc.rust-lang.org/stable/std/sync/struct.RwLockWriteGuard.html#method.downgrade)
523- [`Box::new_zeroed`](https://doc.rust-lang.org/stable/std/boxed/struct.Box.html#method.new_zeroed)
524- [`Box::new_zeroed_slice`](https://doc.rust-lang.org/stable/std/boxed/struct.Box.html#method.new_zeroed_slice)
525- [`Rc::new_zeroed`](https://doc.rust-lang.org/stable/std/rc/struct.Rc.html#method.new_zeroed)
526- [`Rc::new_zeroed_slice`](https://doc.rust-lang.org/stable/std/rc/struct.Rc.html#method.new_zeroed_slice)
527- [`Arc::new_zeroed`](https://doc.rust-lang.org/stable/std/sync/struct.Arc.html#method.new_zeroed)
528- [`Arc::new_zeroed_slice`](https://doc.rust-lang.org/stable/std/sync/struct.Arc.html#method.new_zeroed_slice)
529- [`btree_map::Entry::insert_entry`](https://doc.rust-lang.org/stable/std/collections/btree_map/enum.Entry.html#method.insert_entry)
530- [`btree_map::VacantEntry::insert_entry`](https://doc.rust-lang.org/stable/std/collections/btree_map/struct.VacantEntry.html#method.insert_entry)
531- [`impl Extend<proc_macro::Group> for proc_macro::TokenStream`](https://doc.rust-lang.org/stable/proc_macro/struct.TokenStream.html#impl-Extend%3CGroup%3E-for-TokenStream)
532- [`impl Extend<proc_macro::Literal> for proc_macro::TokenStream`](https://doc.rust-lang.org/stable/proc_macro/struct.TokenStream.html#impl-Extend%3CLiteral%3E-for-TokenStream)
533- [`impl Extend<proc_macro::Punct> for proc_macro::TokenStream`](https://doc.rust-lang.org/stable/proc_macro/struct.TokenStream.html#impl-Extend%3CPunct%3E-for-TokenStream)
534- [`impl Extend<proc_macro::Ident> for proc_macro::TokenStream`](https://doc.rust-lang.org/stable/proc_macro/struct.TokenStream.html#impl-Extend%3CIdent%3E-for-TokenStream)
535
536These previously stable APIs are now stable in const contexts:
537
538- [`<[_]>::rotate_left`](https://doc.rust-lang.org/stable/std/primitive.slice.html#method.rotate_left)
539- [`<[_]>::rotate_right`](https://doc.rust-lang.org/stable/std/primitive.slice.html#method.rotate_right)
540
541<a id="1.92.0-Cargo"></a>
542
543Cargo
544-----
545- [Added a new chapter](https://github.com/rust-lang/cargo/issues/16119) to the Cargo book, ["Optimizing Build Performance"](https://doc.rust-lang.org/stable/cargo/guide/build-performance.html).
546
547<a id="1.92.0-Rustdoc"></a>
548
549Rustdoc
550-----
551- [If a trait item appears in rustdoc search, hide the corresponding impl items](https://github.com/rust-lang/rust/pull/145898). Previously a search for "last" would show both `Iterator::last` as well as impl methods like `std::vec::IntoIter::last`. Now these impl methods will be hidden, freeing up space for inherent methods like `BTreeSet::last`.
552- [Relax rules for identifiers in search](https://github.com/rust-lang/rust/pull/147860). Previously you could only search for identifiers that were valid in rust code, now searches only need to be valid as part of an identifier. For example, you can now perform a search that starts with a digit.
553
554<a id="1.92.0-Compatibility-Notes"></a>
555
556Compatibility Notes
557-------------------
558* [Fix backtraces with `-C panic=abort` on Linux by generating unwind tables by default](https://github.com/rust-lang/rust/pull/143613). Build with `-C force-unwind-tables=no` to keep omitting unwind tables.
559- As part of the larger effort refactoring compiler built-in attributes and their diagnostics, [the future-compatibility lint `invalid_macro_export_arguments` is upgraded to deny-by-default and will be reported in dependencies too.](https://github.com/rust-lang/rust/pull/143857)
560- [Update the minimum external LLVM to 20](https://github.com/rust-lang/rust/pull/145071)
561- [Prevent downstream `impl DerefMut for Pin<LocalType>`](https://github.com/rust-lang/rust/pull/145608)
562- [Don't apply temporary lifetime extension rules to the arguments of non-extended `pin!` and formatting macros](https://github.com/rust-lang/rust/pull/145838)
563
564
565Version 1.91.1 (2025-11-10)
566===========================
567
568<a id="1.91.1"></a>
569
570- [Enable file locking support in illumos](https://github.com/rust-lang/rust/pull/148322). This fixes Cargo not locking the build directory on illumos.
571- [Fix `wasm_import_module` attribute cross-crate](https://github.com/rust-lang/rust/pull/148363). This fixes linker errors on WASM targets.
572
573Version 1.91.0 (2025-10-30)
574==========================
575
576<a id="1.91.0-Language"></a>
577
578Language
579--------
580
581- [Lower pattern bindings in the order they're written and base drop order on primary bindings' order](https://github.com/rust-lang/rust/pull/143764)
582- [Stabilize declaration of C-style variadic functions for `sysv64`, `win64`, `efiapi`, and `aapcs` ABIs](https://github.com/rust-lang/rust/pull/144066).
583 This brings these ABIs in line with the C ABI: variadic functions can be declared in extern blocks but not defined.
584- [Add `dangling_pointers_from_locals` lint to warn against dangling pointers from local variables](https://github.com/rust-lang/rust/pull/144322)
585- [Upgrade `semicolon_in_expressions_from_macros` from warn to deny](https://github.com/rust-lang/rust/pull/144369)
586- [Stabilize LoongArch32 inline assembly](https://github.com/rust-lang/rust/pull/144402)
587- [Add warn-by-default `integer_to_ptr_transmutes` lint against integer-to-pointer transmutes](https://github.com/rust-lang/rust/pull/144531)
588- [Stabilize `sse4a` and `tbm` target features](https://github.com/rust-lang/rust/pull/144542)
589- [Add `target_env = "macabi"` and `target_env = "sim"` cfgs](https://github.com/rust-lang/rust/pull/139451) as replacements for the `target_abi` cfgs with the same values.
590
591<a id="1.91.0-Compiler"></a>
592
593Compiler
594--------
595
596- [Don't warn on never-to-any `as` casts as unreachable](https://github.com/rust-lang/rust/pull/144804)
597
598<a id="1.91.0-Platform-Support"></a>
599
600Platform Support
601----------------
602
603- [Promote `aarch64-pc-windows-gnullvm` and `x86_64-pc-windows-gnullvm` to Tier 2 with host tools.](https://github.com/rust-lang/rust/pull/143031)
604 Note: llvm-tools and MSI installers are missing but will be added in future releases.
605- [Promote `aarch64-pc-windows-msvc` to Tier 1](https://github.com/rust-lang/rust/pull/145682)
606
607Refer to Rust's [platform support page][platform-support-doc]
608for more information on Rust's tiered platform support.
609
610[platform-support-doc]: https://doc.rust-lang.org/rustc/platform-support.html
611
612<a id="1.91.0-Libraries"></a>
613
614Libraries
615---------
616
617- [Print thread ID in panic message](https://github.com/rust-lang/rust/pull/115746)
618- [Fix overly restrictive lifetime in `core::panic::Location::file` return type](https://github.com/rust-lang/rust/pull/132087)
619- [Guarantee parameter order for `_by()` variants of `min` / `max`/ `minmax` in `std::cmp`](https://github.com/rust-lang/rust/pull/139357)
620- [Document assumptions about `Clone` and `Eq` traits](https://github.com/rust-lang/rust/pull/144330/)
621- [`std::thread`: Return error if setting thread stack size fails](https://github.com/rust-lang/rust/pull/144210)
622 This used to panic within the standard library.
623
624<a id="1.91.0-Stabilized-APIs"></a>
625
626Stabilized APIs
627---------------
628
629- [`Path::file_prefix`](https://doc.rust-lang.org/stable/std/path/struct.Path.html#method.file_prefix)
630- [`AtomicPtr::fetch_ptr_add`](https://doc.rust-lang.org/stable/std/sync/atomic/struct.AtomicPtr.html#method.fetch_ptr_add)
631- [`AtomicPtr::fetch_ptr_sub`](https://doc.rust-lang.org/stable/std/sync/atomic/struct.AtomicPtr.html#method.fetch_ptr_sub)
632- [`AtomicPtr::fetch_byte_add`](https://doc.rust-lang.org/stable/std/sync/atomic/struct.AtomicPtr.html#method.fetch_byte_add)
633- [`AtomicPtr::fetch_byte_sub`](https://doc.rust-lang.org/stable/std/sync/atomic/struct.AtomicPtr.html#method.fetch_byte_sub)
634- [`AtomicPtr::fetch_or`](https://doc.rust-lang.org/stable/std/sync/atomic/struct.AtomicPtr.html#method.fetch_or)
635- [`AtomicPtr::fetch_and`](https://doc.rust-lang.org/stable/std/sync/atomic/struct.AtomicPtr.html#method.fetch_and)
636- [`AtomicPtr::fetch_xor`](https://doc.rust-lang.org/stable/std/sync/atomic/struct.AtomicPtr.html#method.fetch_xor)
637- [`{integer}::strict_add`](https://doc.rust-lang.org/stable/std/primitive.u32.html#method.strict_add)
638- [`{integer}::strict_sub`](https://doc.rust-lang.org/stable/std/primitive.u32.html#method.strict_sub)
639- [`{integer}::strict_mul`](https://doc.rust-lang.org/stable/std/primitive.u32.html#method.strict_mul)
640- [`{integer}::strict_div`](https://doc.rust-lang.org/stable/std/primitive.i32.html#method.strict_div)
641- [`{integer}::strict_div_euclid`](https://doc.rust-lang.org/stable/std/primitive.i32.html#method.strict_div_euclid)
642- [`{integer}::strict_rem`](https://doc.rust-lang.org/stable/std/primitive.i32.html#method.strict_rem)
643- [`{integer}::strict_rem_euclid`](https://doc.rust-lang.org/stable/std/primitive.i32.html#method.strict_rem_euclid)
644- [`{integer}::strict_neg`](https://doc.rust-lang.org/stable/std/primitive.u32.html#method.strict_neg)
645- [`{integer}::strict_shl`](https://doc.rust-lang.org/stable/std/primitive.u32.html#method.strict_shl)
646- [`{integer}::strict_shr`](https://doc.rust-lang.org/stable/std/primitive.u32.html#method.strict_shr)
647- [`{integer}::strict_pow`](https://doc.rust-lang.org/stable/std/primitive.u32.html#method.strict_pow)
648- [`i{N}::strict_add_unsigned`](https://doc.rust-lang.org/stable/std/primitive.i32.html#method.strict_add_unsigned)
649- [`i{N}::strict_sub_unsigned`](https://doc.rust-lang.org/stable/std/primitive.i32.html#method.strict_sub_unsigned)
650- [`i{N}::strict_abs`](https://doc.rust-lang.org/stable/std/primitive.i32.html#method.strict_abs)
651- [`u{N}::strict_add_signed`](https://doc.rust-lang.org/stable/std/primitive.u32.html#method.strict_add_signed)
652- [`u{N}::strict_sub_signed`](https://doc.rust-lang.org/stable/std/primitive.u32.html#method.strict_sub_signed)
653- [`PanicHookInfo::payload_as_str`](https://doc.rust-lang.org/stable/std/panic/struct.PanicHookInfo.html#method.payload_as_str)
654- [`core::iter::chain`](https://doc.rust-lang.org/stable/core/iter/fn.chain.html)
655- [`u{N}::checked_signed_diff`](https://doc.rust-lang.org/stable/std/primitive.u16.html#method.checked_signed_diff)
656- [`core::array::repeat`](https://doc.rust-lang.org/stable/core/array/fn.repeat.html)
657- [`PathBuf::add_extension`](https://doc.rust-lang.org/stable/std/path/struct.PathBuf.html#method.add_extension)
658- [`PathBuf::with_added_extension`](https://doc.rust-lang.org/stable/std/path/struct.PathBuf.html#method.with_added_extension)
659- [`Duration::from_mins`](https://doc.rust-lang.org/stable/std/time/struct.Duration.html#method.from_mins)
660- [`Duration::from_hours`](https://doc.rust-lang.org/stable/std/time/struct.Duration.html#method.from_hours)
661- [`impl PartialEq<str> for PathBuf`](https://doc.rust-lang.org/stable/std/path/struct.PathBuf.html#impl-PartialEq%3Cstr%3E-for-PathBuf)
662- [`impl PartialEq<String> for PathBuf`](https://doc.rust-lang.org/stable/std/path/struct.PathBuf.html#impl-PartialEq%3CString%3E-for-PathBuf)
663- [`impl PartialEq<str> for Path`](https://doc.rust-lang.org/stable/std/path/struct.Path.html#impl-PartialEq%3Cstr%3E-for-Path)
664- [`impl PartialEq<String> for Path`](https://doc.rust-lang.org/stable/std/path/struct.Path.html#impl-PartialEq%3CString%3E-for-Path)
665- [`impl PartialEq<PathBuf> for String`](https://doc.rust-lang.org/stable/std/string/struct.String.html#impl-PartialEq%3CPathBuf%3E-for-String)
666- [`impl PartialEq<Path> for String`](https://doc.rust-lang.org/stable/std/string/struct.String.html#impl-PartialEq%3CPath%3E-for-String)
667- [`impl PartialEq<PathBuf> for str`](https://doc.rust-lang.org/stable/std/primitive.str.html#impl-PartialEq%3CPathBuf%3E-for-str)
668- [`impl PartialEq<Path> for str`](https://doc.rust-lang.org/stable/std/primitive.str.html#impl-PartialEq%3CPath%3E-for-str)
669- [`Ipv4Addr::from_octets`](https://doc.rust-lang.org/stable/std/net/struct.Ipv4Addr.html#method.from_octets)
670- [`Ipv6Addr::from_octets`](https://doc.rust-lang.org/stable/std/net/struct.Ipv6Addr.html#method.from_octets)
671- [`Ipv6Addr::from_segments`](https://doc.rust-lang.org/stable/std/net/struct.Ipv6Addr.html#method.from_segments)
672- [`impl<T> Default for Pin<Box<T>> where Box<T>: Default, T: ?Sized`](https://doc.rust-lang.org/stable/std/default/trait.Default.html#impl-Default-for-Pin%3CBox%3CT%3E%3E)
673- [`impl<T> Default for Pin<Rc<T>> where Rc<T>: Default, T: ?Sized`](https://doc.rust-lang.org/stable/std/default/trait.Default.html#impl-Default-for-Pin%3CRc%3CT%3E%3E)
674- [`impl<T> Default for Pin<Arc<T>> where Arc<T>: Default, T: ?Sized`](https://doc.rust-lang.org/stable/std/default/trait.Default.html#impl-Default-for-Pin%3CArc%3CT%3E%3E)
675- [`Cell::as_array_of_cells`](https://doc.rust-lang.org/stable/std/cell/struct.Cell.html#method.as_array_of_cells)
676- [`u{N}::carrying_add`](https://doc.rust-lang.org/stable/std/primitive.u64.html#method.carrying_add)
677- [`u{N}::borrowing_sub`](https://doc.rust-lang.org/stable/std/primitive.u64.html#method.borrowing_sub)
678- [`u{N}::carrying_mul`](https://doc.rust-lang.org/stable/std/primitive.u64.html#method.carrying_mul)
679- [`u{N}::carrying_mul_add`](https://doc.rust-lang.org/stable/std/primitive.u64.html#method.carrying_mul_add)
680- [`BTreeMap::extract_if`](https://doc.rust-lang.org/stable/std/collections/struct.BTreeMap.html#method.extract_if)
681- [`BTreeSet::extract_if`](https://doc.rust-lang.org/stable/std/collections/struct.BTreeSet.html#method.extract_if)
682- [`impl Debug for windows::ffi::EncodeWide<'_>`](https://doc.rust-lang.org/stable/std/os/windows/ffi/struct.EncodeWide.html#impl-Debug-for-EncodeWide%3C'_%3E)
683- [`str::ceil_char_boundary`](https://doc.rust-lang.org/stable/std/primitive.str.html#method.ceil_char_boundary)
684- [`str::floor_char_boundary`](https://doc.rust-lang.org/stable/std/primitive.str.html#method.floor_char_boundary)
685- [`impl Sum for Saturating<u{N}>`](https://doc.rust-lang.org/stable/std/num/struct.Saturating.html#impl-Sum-for-Saturating%3Cu32%3E)
686- [`impl Sum<&Self> for Saturating<u{N}>`](https://doc.rust-lang.org/stable/std/num/struct.Saturating.html#impl-Sum%3C%26Saturating%3Cu32%3E%3E-for-Saturating%3Cu32%3E)
687- [`impl Product for Saturating<u{N}>`](https://doc.rust-lang.org/stable/std/num/struct.Saturating.html#impl-Product-for-Saturating%3Cu32%3E)
688- [`impl Product<&Self> for Saturating<u{N}>`](https://doc.rust-lang.org/stable/std/num/struct.Saturating.html#impl-Product%3C%26Saturating%3Cu32%3E%3E-for-Saturating%3Cu32%3E)
689
690These previously stable APIs are now stable in const contexts:
691
692- [`<[T; N]>::each_ref`](https://doc.rust-lang.org/stable/std/primitive.array.html#method.each_ref)
693- [`<[T; N]>::each_mut`](https://doc.rust-lang.org/stable/std/primitive.array.html#method.each_mut)
694- [`OsString::new`](https://doc.rust-lang.org/stable/std/ffi/struct.OsString.html#method.new)
695- [`PathBuf::new`](https://doc.rust-lang.org/stable/std/path/struct.PathBuf.html#method.new)
696- [`TypeId::of`](https://doc.rust-lang.org/stable/std/any/struct.TypeId.html#method.of)
697- [`ptr::with_exposed_provenance`](https://doc.rust-lang.org/stable/std/ptr/fn.with_exposed_provenance.html)
698- [`ptr::with_exposed_provenance_mut`](https://doc.rust-lang.org/stable/std/ptr/fn.with_exposed_provenance_mut.html)
699
700<a id="1.91.0-Cargo"></a>
701
702Cargo
703-----
704
705- 🎉 Stabilize `build.build-dir`.
706 This config sets the directory where intermediate build artifacts are stored.
707 These artifacts are produced by Cargo and rustc during the build process.
708 End users usually won't need to interact with them, and the layout inside
709 `build-dir` is an implementation detail that may change without notice.
710 ([config doc](https://doc.rust-lang.org/stable/cargo/reference/config.html#buildbuild-dir))
711 ([build cache doc](https://doc.rust-lang.org/stable/cargo/reference/build-cache.html))
712 [#15833](https://github.com/rust-lang/cargo/pull/15833)
713 [#15840](https://github.com/rust-lang/cargo/pull/15840)
714- The `--target` flag and the `build.target` configuration can now take literal
715 `"host-tuple"` string, which will internally be substituted by the host
716 machine's target triple.
717 [#15838](https://github.com/rust-lang/cargo/pull/15838)
718 [#16003](https://github.com/rust-lang/cargo/pull/16003)
719 [#16032](https://github.com/rust-lang/cargo/pull/16032)
720
721<a id="1.91.0-Rustdoc"></a>
722
723Rustdoc
724-----
725- [In search results, rank doc aliases lower than non-alias items with the same name](https://github.com/rust-lang/rust/pull/145100)
726- [Raw pointers now work in type-based search like references](https://github.com/rust-lang/rust/pull/145731). This means you can now search for things like `*const u8 ->`, and additionally functions that take or return raw pointers will now display their signature properly in search results.
727
728<a id="1.91.0-Compatibility-Notes"></a>
729
730Compatibility Notes
731-------------------
732
733- [Always require coroutine captures to be drop-live](https://github.com/rust-lang/rust/pull/144156)
734- [Apple: Always pass SDK root when linking with `cc`, and pass it via `SDKROOT` env var](https://github.com/rust-lang/rust/pull/131477). This should fix linking issues with `rustc` running inside Xcode. Libraries in `/usr/local/lib` may no longer be linked automatically, if you develop or use a crate that relies on this, you should explicitly set `cargo::rustc-link-search=/usr/local/lib` in a `build.rs` script.
735- [Relaxed bounds in associated type bound position like in `TraitRef<AssocTy: ?Sized>` are now correctly forbidden](https://github.com/rust-lang/rust/pull/135331)
736- [Add unstable `#[sanitize(xyz = "on|off")]` built-in attribute that shadows procedural macros with the same name](https://github.com/rust-lang/rust/pull/142681)
737- [Fix the drop checker being more permissive for bindings declared with let-else](https://github.com/rust-lang/rust/pull/143028)
738- [Be more strict when parsing attributes, erroring on many invalid attributes](https://github.com/rust-lang/rust/pull/144689)
739 - [Error on invalid `#[should_panic]` attributes](https://github.com/rust-lang/rust/pull/143808)
740 - [Error on invalid `#[link]` attributes](https://github.com/rust-lang/rust/pull/143193)
741- [Mark all deprecation lints in name resolution as deny-by-default and also report in dependencies](https://github.com/rust-lang/rust/pull/143929)
742- The lint `semicolon_in_expressions_from_macros`, for `macro_rules!` macros in expression position that expand to end in a semicolon (`;`), is now deny-by-default. It was already warn-by-default, and a future compatibility warning (FCW) that warned even in dependencies. This lint will become a hard error in the future.
743- [Trait impl modifiers (e.g., `unsafe`, `!`, `default`) in inherent impls are no longer syntactically valid](https://github.com/rust-lang/rust/pull/144386)
744- [Start reporting future breakage for `ill_formed_attribute_input` in dependencies](https://github.com/rust-lang/rust/pull/144544)
745- [Restrict the scope of temporaries created by the macros `pin!`, `format_args!`, `write!`, and `writeln!` in `if let` scrutinees in Rust Edition 2024.](https://github.com/rust-lang/rust/pull/145342) This applies [Rust Edition 2024's `if let` temporary scope rules](https://doc.rust-lang.org/edition-guide/rust-2024/temporary-if-let-scope.html) to these temporaries, which previously could live past the `if` expression regardless of Edition.
746- [Invalid numeric literal suffixes in tuple indexing, tuple struct indexing, and struct field name positions are now correctly rejected](https://github.com/rust-lang/rust/pull/145463)
747- [Closures marked with the keyword `static` are now syntactically invalid](https://github.com/rust-lang/rust/pull/145604)
748- [Shebangs inside `--cfg` and `--check-cfg` arguments are no longer allowed](https://github.com/rust-lang/rust/pull/146211)
749- [Add future incompatibility lint for temporary lifetime shortening in Rust 1.92](https://github.com/rust-lang/rust/pull/147056)
750
751Cargo compatibility notes:
752
753- `cargo publish` no longer keeps `.crate` tarballs as final build artifacts
754 when `build.build-dir` is set. These tarballs were previously included due to
755 an oversight and are now treated as intermediate artifacts.
756 To get `.crate` tarballs as final artifacts, use `cargo package`.
757 In a future version, this change will apply regardless of `build.build-dir`.
758 [#15910](https://github.com/rust-lang/cargo/pull/15910)
759- Adjust Cargo messages to match rustc diagnostic style.
760 This changes some of the terminal colors used by Cargo messages.
761 [#15928](https://github.com/rust-lang/cargo/pull/15928)
762- Tools and projects relying on the
763 [internal details of Cargo's `build-dir`](https://doc.rust-lang.org/cargo/reference/build-cache.html)
764 may not work for users changing their `build-dir` layout.
765 For those doing so, we'd recommend proactively testing these cases
766 particularly as we are considering changing the default location of the `build-dir` in the future
767 ([cargo#16147](https://github.com/rust-lang/cargo/issues/16147)).
768 If you can't migrate off of Cargo's internal details,
769 we'd like to learn more about your use case as we prepare to change the layout of the `build-dir`
770 ([cargo#15010](https://github.com/rust-lang/cargo/issues/15010)).
771
772<a id="1.91.0-Internal-Changes"></a>
773
774Internal Changes
775----------------
776
777These changes do not affect any public interfaces of Rust, but they represent
778significant improvements to the performance or internals of rustc and related
779tools.
780
781- [Update to LLVM 21](https://github.com/rust-lang/rust/pull/143684)
782
783
784Version 1.90.0 (2025-09-18)
785===========================
786
787<a id="1.90-Language"></a>
788
789Language
790--------
791- [Split up the `unknown_or_malformed_diagnostic_attributes` lint](https://github.com/rust-lang/rust/pull/140717). This lint has been split up into four finer-grained lints, with `unknown_or_malformed_diagnostic_attributes` now being the lint group that contains these lints:
792 1. `unknown_diagnostic_attributes`: unknown to the current compiler
793 2. `misplaced_diagnostic_attributes`: placed on the wrong item
794 3. `malformed_diagnostic_attributes`: malformed attribute syntax or options
795 4. `malformed_diagnostic_format_literals`: malformed format string literal
796- [Allow constants whose final value has references to mutable/external memory, but reject such constants as patterns](https://github.com/rust-lang/rust/pull/140942)
797- [Allow volatile access to non-Rust memory, including address 0](https://github.com/rust-lang/rust/pull/141260)
798
799
800<a id="1.90-Compiler"></a>
801
802Compiler
803--------
804- [Use `lld` by default on `x86_64-unknown-linux-gnu`](https://github.com/rust-lang/rust/pull/140525).
805- [Tier 3 `musl` targets now link dynamically by default](https://github.com/rust-lang/rust/pull/144410). Affected targets:
806 - `mips64-unknown-linux-muslabi64`
807 - `powerpc64-unknown-linux-musl`
808 - `powerpc-unknown-linux-musl`
809 - `powerpc-unknown-linux-muslspe`
810 - `riscv32gc-unknown-linux-musl`
811 - `s390x-unknown-linux-musl`
812 - `thumbv7neon-unknown-linux-musleabihf`
813
814
815<a id="1.90-Platform-Support"></a>
816
817Platform Support
818----------------
819- [Demote `x86_64-apple-darwin` to Tier 2 with host tools](https://github.com/rust-lang/rust/pull/145252)
820
821
822Refer to Rust's [platform support page][platform-support-doc]
823for more information on Rust's tiered platform support.
824
825[platform-support-doc]: https://doc.rust-lang.org/rustc/platform-support.html
826
827<a id="1.90-Libraries"></a>
828
829Libraries
830---------
831- [Stabilize `u*::{checked,overflowing,saturating,wrapping}_sub_signed`](https://github.com/rust-lang/rust/issues/126043)
832- [Allow comparisons between `CStr`, `CString`, and `Cow<CStr>`](https://github.com/rust-lang/rust/pull/137268)
833- [Remove some unsized tuple impls since unsized tuples can't be constructed](https://github.com/rust-lang/rust/pull/138340)
834- [Set `MSG_NOSIGNAL` for `UnixStream`](https://github.com/rust-lang/rust/pull/140005)
835- [`proc_macro::Ident::new` now supports `$crate`.](https://github.com/rust-lang/rust/pull/141996)
836- [Guarantee the pointer returned from `Thread::into_raw` has at least 8 bytes of alignment](https://github.com/rust-lang/rust/pull/143859)
837
838
839<a id="1.90-Stabilized-APIs"></a>
840
841Stabilized APIs
842---------------
843
844- [`u{n}::checked_sub_signed`](https://doc.rust-lang.org/stable/std/primitive.usize.html#method.checked_sub_signed)
845- [`u{n}::overflowing_sub_signed`](https://doc.rust-lang.org/stable/std/primitive.usize.html#method.overflowing_sub_signed)
846- [`u{n}::saturating_sub_signed`](https://doc.rust-lang.org/stable/std/primitive.usize.html#method.saturating_sub_signed)
847- [`u{n}::wrapping_sub_signed`](https://doc.rust-lang.org/stable/std/primitive.usize.html#method.wrapping_sub_signed)
848- [`impl Copy for IntErrorKind`](https://doc.rust-lang.org/stable/std/num/enum.IntErrorKind.html#impl-Copy-for-IntErrorKind)
849- [`impl Hash for IntErrorKind`](https://doc.rust-lang.org/stable/std/num/enum.IntErrorKind.html#impl-Hash-for-IntErrorKind)
850- [`impl PartialEq<&CStr> for CStr`](https://doc.rust-lang.org/stable/std/ffi/struct.CStr.html#impl-PartialEq%3C%26CStr%3E-for-CStr)
851- [`impl PartialEq<CString> for CStr`](https://doc.rust-lang.org/stable/std/ffi/struct.CStr.html#impl-PartialEq%3CCString%3E-for-CStr)
852- [`impl PartialEq<Cow<CStr>> for CStr`](https://doc.rust-lang.org/stable/std/ffi/struct.CStr.html#impl-PartialEq%3CCow%3C'_,+CStr%3E%3E-for-CStr)
853- [`impl PartialEq<&CStr> for CString`](https://doc.rust-lang.org/stable/std/ffi/struct.CString.html#impl-PartialEq%3C%26CStr%3E-for-CString)
854- [`impl PartialEq<CStr> for CString`](https://doc.rust-lang.org/stable/std/ffi/struct.CString.html#impl-PartialEq%3CCStr%3E-for-CString)
855- [`impl PartialEq<Cow<CStr>> for CString`](https://doc.rust-lang.org/stable/std/ffi/struct.CString.html#impl-PartialEq%3CCow%3C'_,+CStr%3E%3E-for-CString)
856- [`impl PartialEq<&CStr> for Cow<CStr>`](https://doc.rust-lang.org/stable/std/borrow/enum.Cow.html#impl-PartialEq%3C%26CStr%3E-for-Cow%3C'_,+CStr%3E)
857- [`impl PartialEq<CStr> for Cow<CStr>`](https://doc.rust-lang.org/stable/std/borrow/enum.Cow.html#impl-PartialEq%3CCStr%3E-for-Cow%3C'_,+CStr%3E)
858- [`impl PartialEq<CString> for Cow<CStr>`](https://doc.rust-lang.org/stable/std/borrow/enum.Cow.html#impl-PartialEq%3CCString%3E-for-Cow%3C'_,+CStr%3E)
859
860
861These previously stable APIs are now stable in const contexts:
862
863- [`<[T]>::reverse`](https://doc.rust-lang.org/stable/std/primitive.slice.html#method.reverse)
864- [`f32::floor`](https://doc.rust-lang.org/stable/std/primitive.f32.html#method.floor)
865- [`f32::ceil`](https://doc.rust-lang.org/stable/std/primitive.f32.html#method.ceil)
866- [`f32::trunc`](https://doc.rust-lang.org/stable/std/primitive.f32.html#method.trunc)
867- [`f32::fract`](https://doc.rust-lang.org/stable/std/primitive.f32.html#method.fract)
868- [`f32::round`](https://doc.rust-lang.org/stable/std/primitive.f32.html#method.round)
869- [`f32::round_ties_even`](https://doc.rust-lang.org/stable/std/primitive.f32.html#method.round_ties_even)
870- [`f64::floor`](https://doc.rust-lang.org/stable/std/primitive.f64.html#method.floor)
871- [`f64::ceil`](https://doc.rust-lang.org/stable/std/primitive.f64.html#method.ceil)
872- [`f64::trunc`](https://doc.rust-lang.org/stable/std/primitive.f64.html#method.trunc)
873- [`f64::fract`](https://doc.rust-lang.org/stable/std/primitive.f64.html#method.fract)
874- [`f64::round`](https://doc.rust-lang.org/stable/std/primitive.f64.html#method.round)
875- [`f64::round_ties_even`](https://doc.rust-lang.org/stable/std/primitive.f64.html#method.round_ties_even)
876
877
878<a id="1.90-Cargo"></a>
879
880Cargo
881-----
882- [Add `http.proxy-cainfo` config for proxy certs](https://github.com/rust-lang/cargo/pull/15374/)
883- [Use `gix` for `cargo package`](https://github.com/rust-lang/cargo/pull/15534/)
884- [feat(publish): Stabilize multi-package publishing](https://github.com/rust-lang/cargo/pull/15636/)
885
886<a id="1.90-Rustdoc"></a>
887
888Rustdoc
889-----
890- [Add ways to collapse all impl blocks](https://github.com/rust-lang/rust/pull/141663). Previously the "Summary" button and "-" keyboard shortcut would never collapse `impl` blocks, now they do when shift is held
891- [Display unsafe attributes with `unsafe()` wrappers](https://github.com/rust-lang/rust/pull/143662)
892
893
894<a id="1.90-Compatibility-Notes"></a>
895
896Compatibility Notes
897-------------------
898- [Use `lld` by default on `x86_64-unknown-linux-gnu`](https://github.com/rust-lang/rust/pull/140525).
899 See also <https://blog.rust-lang.org/2025/09/01/rust-lld-on-1.90.0-stable/>.
900- [Make `core::iter::Fuse`'s `Default` impl construct `I::default()` internally as promised in the docs instead of always being empty](https://github.com/rust-lang/rust/pull/140985)
901- [Set `MSG_NOSIGNAL` for `UnixStream`](https://github.com/rust-lang/rust/pull/140005)
902 This may change program behavior but results in the same behavior as other primitives (e.g., stdout, network sockets).
903 Programs relying on signals to terminate them should update handling of sockets to handle errors on write by exiting.
904- [On Unix `std::env::home_dir` will use the fallback if the `HOME` environment variable is empty](https://github.com/rust-lang/rust/pull/141840)
905- We now [reject unsupported `extern "{abi}"`s consistently in all positions](https://github.com/rust-lang/rust/pull/142134). This primarily affects the use of implementing traits on an `extern "{abi}"` function pointer, like `extern "stdcall" fn()`, on a platform that doesn't support that, like aarch64-unknown-linux-gnu. Direct usage of these unsupported ABI strings by declaring or defining functions was already rejected, so this is only a change for consistency.
906- [const-eval: error when initializing a static writes to that static](https://github.com/rust-lang/rust/pull/143084)
907- [Check that the `proc_macro_derive` macro has correct arguments when applied to the crate root](https://github.com/rust-lang/rust/pull/143607)
908
909
910Version 1.89.0 (2025-08-07)
911==========================
912
913<a id="1.89.0-Language"></a>
914
915Language
916--------
917- [Stabilize explicitly inferred const arguments (`feature(generic_arg_infer)`)](https://github.com/rust-lang/rust/pull/141610)
918- [Add a warn-by-default `mismatched_lifetime_syntaxes` lint.](https://github.com/rust-lang/rust/pull/138677)
919 This lint detects when the same lifetime is referred to by different syntax categories between function arguments and return values, which can be confusing to read, especially in unsafe code.
920 This lint supersedes the warn-by-default `elided_named_lifetimes` lint.
921- [Expand `unpredictable_function_pointer_comparisons` to also lint on function pointer comparisons in external macros](https://github.com/rust-lang/rust/pull/134536)
922- [Make the `dangerous_implicit_autorefs` lint deny-by-default](https://github.com/rust-lang/rust/pull/141661)
923- [Stabilize the avx512 target features](https://github.com/rust-lang/rust/pull/138940)
924- [Stabilize `kl` and `widekl` target features for x86](https://github.com/rust-lang/rust/pull/140766)
925- [Stabilize `sha512`, `sm3` and `sm4` target features for x86](https://github.com/rust-lang/rust/pull/140767)
926- [Stabilize LoongArch target features `f`, `d`, `frecipe`, `lasx`, `lbt`, `lsx`, and `lvz`](https://github.com/rust-lang/rust/pull/135015)
927- [Remove `i128` and `u128` from `improper_ctypes_definitions`](https://github.com/rust-lang/rust/pull/137306)
928- [Stabilize `repr128` (`#[repr(u128)]`, `#[repr(i128)]`)](https://github.com/rust-lang/rust/pull/138285)
929- [Allow `#![doc(test(attr(..)))]` everywhere](https://github.com/rust-lang/rust/pull/140560)
930- [Extend temporary lifetime extension to also go through tuple struct and tuple variant constructors](https://github.com/rust-lang/rust/pull/140593)
931- [`extern "C"` functions on the `wasm32-unknown-unknown` target now have a standards compliant ABI](https://blog.rust-lang.org/2025/04/04/c-abi-changes-for-wasm32-unknown-unknown/)
932
933<a id="1.89.0-Compiler"></a>
934
935Compiler
936--------
937- [Default to non-leaf frame pointers on aarch64-linux](https://github.com/rust-lang/rust/pull/140832)
938- [Enable non-leaf frame pointers for Arm64EC Windows](https://github.com/rust-lang/rust/pull/140862)
939- [Set Apple frame pointers by architecture](https://github.com/rust-lang/rust/pull/141797)
940
941
942<a id="1.89.0-Platform-Support"></a>
943
944Platform Support
945----------------
946- [Add new Tier-3 targets `loongarch32-unknown-none` and `loongarch32-unknown-none-softfloat`](https://github.com/rust-lang/rust/pull/142053)
947- [`x86_64-apple-darwin` is in the process of being demoted to Tier 2 with host tools](https://github.com/rust-lang/rfcs/pull/3841)
948
949Refer to Rust's [platform support page][platform-support-doc]
950for more information on Rust's tiered platform support.
951
952[platform-support-doc]: https://doc.rust-lang.org/rustc/platform-support.html
953
954<a id="1.89.0-Libraries"></a>
955
956Libraries
957---------
958- [Specify the base path for `file!`](https://github.com/rust-lang/rust/pull/134442)
959- [Allow storing `format_args!()` in a variable](https://github.com/rust-lang/rust/pull/140748)
960- [Add `#[must_use]` to `[T; N]::map`](https://github.com/rust-lang/rust/pull/140957)
961- [Implement `DerefMut` for `Lazy{Cell,Lock}`](https://github.com/rust-lang/rust/pull/129334)
962- [Implement `Default` for `array::IntoIter`](https://github.com/rust-lang/rust/pull/141574)
963- [Implement `Clone` for `slice::ChunkBy`](https://github.com/rust-lang/rust/pull/138016)
964- [Implement `io::Seek` for `io::Take`](https://github.com/rust-lang/rust/pull/138023)
965
966
967<a id="1.89.0-Stabilized-APIs"></a>
968
969Stabilized APIs
970---------------
971
972- [`NonZero<char>`](https://doc.rust-lang.org/stable/std/num/struct.NonZero.html)
973- Many intrinsics for x86, not enumerated here
974 - [AVX512 intrinsics](https://github.com/rust-lang/rust/issues/111137)
975 - [`SHA512`, `SM3` and `SM4` intrinsics](https://github.com/rust-lang/rust/issues/126624)
976- [`File::lock`](https://doc.rust-lang.org/stable/std/fs/struct.File.html#method.lock)
977- [`File::lock_shared`](https://doc.rust-lang.org/stable/std/fs/struct.File.html#method.lock_shared)
978- [`File::try_lock`](https://doc.rust-lang.org/stable/std/fs/struct.File.html#method.try_lock)
979- [`File::try_lock_shared`](https://doc.rust-lang.org/stable/std/fs/struct.File.html#method.try_lock_shared)
980- [`File::unlock`](https://doc.rust-lang.org/stable/std/fs/struct.File.html#method.unlock)
981- [`NonNull::from_ref`](https://doc.rust-lang.org/stable/std/ptr/struct.NonNull.html#method.from_ref)
982- [`NonNull::from_mut`](https://doc.rust-lang.org/stable/std/ptr/struct.NonNull.html#method.from_mut)
983- [`NonNull::without_provenance`](https://doc.rust-lang.org/stable/std/ptr/struct.NonNull.html#method.without_provenance)
984- [`NonNull::with_exposed_provenance`](https://doc.rust-lang.org/stable/std/ptr/struct.NonNull.html#method.with_exposed_provenance)
985- [`NonNull::expose_provenance`](https://doc.rust-lang.org/stable/std/ptr/struct.NonNull.html#method.expose_provenance)
986- [`OsString::leak`](https://doc.rust-lang.org/stable/std/ffi/struct.OsString.html#method.leak)
987- [`PathBuf::leak`](https://doc.rust-lang.org/stable/std/path/struct.PathBuf.html#method.leak)
988- [`Result::flatten`](https://doc.rust-lang.org/stable/std/result/enum.Result.html#method.flatten)
989- [`std::os::linux::net::TcpStreamExt::quickack`](https://doc.rust-lang.org/stable/std/os/linux/net/trait.TcpStreamExt.html#tymethod.quickack)
990- [`std::os::linux::net::TcpStreamExt::set_quickack`](https://doc.rust-lang.org/stable/std/os/linux/net/trait.TcpStreamExt.html#tymethod.set_quickack)
991
992These previously stable APIs are now stable in const contexts:
993
994- [`<[T; N]>::as_mut_slice`](https://doc.rust-lang.org/stable/std/primitive.array.html#method.as_mut_slice)
995- [`<[u8]>::eq_ignore_ascii_case`](https://doc.rust-lang.org/stable/std/primitive.slice.html#impl-%5Bu8%5D/method.eq_ignore_ascii_case)
996- [`str::eq_ignore_ascii_case`](https://doc.rust-lang.org/stable/std/primitive.str.html#impl-str/method.eq_ignore_ascii_case)
997
998
999<a id="1.89.0-Cargo"></a>
1000
1001Cargo
1002-----
1003- [`cargo fix` and `cargo clippy --fix` now default to the same Cargo target selection as other build commands.](https://github.com/rust-lang/cargo/pull/15192/) Previously it would apply to all targets (like binaries, examples, tests, etc.). The `--edition` flag still applies to all targets.
1004- [Stabilize doctest-xcompile.](https://github.com/rust-lang/cargo/pull/15462/) Doctests are now tested when cross-compiling. Just like other tests, it will use the [`runner` setting](https://doc.rust-lang.org/cargo/reference/config.html#targettriplerunner) to run the tests. If you need to disable tests for a target, you can use the [ignore doctest attribute](https://doc.rust-lang.org/rustdoc/write-documentation/documentation-tests.html#ignoring-targets) to specify the targets to ignore.
1005
1006
1007<a id="1.89.0-Rustdoc"></a>
1008
1009Rustdoc
1010-----
1011- [On mobile, make the sidebar full width and linewrap](https://github.com/rust-lang/rust/pull/139831). This makes long section and item names much easier to deal with on mobile.
1012
1013
1014<a id="1.89.0-Compatibility-Notes"></a>
1015
1016Compatibility Notes
1017-------------------
1018- [Make `missing_fragment_specifier` an unconditional error](https://github.com/rust-lang/rust/pull/128425)
1019- [Enabling the `neon` target feature on `aarch64-unknown-none-softfloat` causes a warning](https://github.com/rust-lang/rust/pull/135160) because mixing code with and without that target feature is not properly supported by LLVM
1020- [Sized Hierarchy: Part I](https://github.com/rust-lang/rust/pull/137944)
1021 - Introduces a small breaking change affecting `?Sized` bounds on impls on recursive types which contain associated type projections. It is not expected to affect any existing published crates. Can be fixed by refactoring the involved types or opting into the `sized_hierarchy` unstable feature. See the [FCP report](https://github.com/rust-lang/rust/pull/137944#issuecomment-2912207485) for a code example.
1022- The warn-by-default `elided_named_lifetimes` lint is [superseded by the warn-by-default `mismatched_lifetime_syntaxes` lint.](https://github.com/rust-lang/rust/pull/138677)
1023- [Error on recursive opaque types earlier in the type checker](https://github.com/rust-lang/rust/pull/139419)
1024- [Type inference side effects from requiring element types of array repeat expressions are `Copy` are now only available at the end of type checking](https://github.com/rust-lang/rust/pull/139635)
1025- [The deprecated accidentally-stable `std::intrinsics::{copy,copy_nonoverlapping,write_bytes}` are now proper intrinsics](https://github.com/rust-lang/rust/pull/139916). There are no debug assertions guarding against UB, and they cannot be coerced to function pointers.
1026- [Remove long-deprecated `std::intrinsics::drop_in_place`](https://github.com/rust-lang/rust/pull/140151)
1027- [Make well-formedness predicates no longer coinductive](https://github.com/rust-lang/rust/pull/140208)
1028- [Remove hack when checking impl method compatibility](https://github.com/rust-lang/rust/pull/140557)
1029- [Remove unnecessary type inference due to built-in trait object impls](https://github.com/rust-lang/rust/pull/141352)
1030- [Lint against "stdcall", "fastcall", and "cdecl" on non-x86-32 targets](https://github.com/rust-lang/rust/pull/141435)
1031- [Future incompatibility warnings relating to the never type (`!`) are now reported in dependencies](https://github.com/rust-lang/rust/pull/141937)
1032- [Ensure `std::ptr::copy_*` intrinsics also perform the static self-init checks](https://github.com/rust-lang/rust/pull/142575)
1033- [`extern "C"` functions on the `wasm32-unknown-unknown` target now have a standards compliant ABI](https://blog.rust-lang.org/2025/04/04/c-abi-changes-for-wasm32-unknown-unknown/)
1034
1035<a id="1.89.0-Internal-Changes"></a>
1036
1037Internal Changes
1038----------------
1039
1040These changes do not affect any public interfaces of Rust, but they represent
1041significant improvements to the performance or internals of rustc and related
1042tools.
1043
1044- [Correctly un-remap compiler sources paths with the `rustc-dev` component](https://github.com/rust-lang/rust/pull/142377)
1045
1046
1047Version 1.88.0 (2025-06-26)
1048==========================
1049
1050<a id="1.88.0-Language"></a>
1051
1052Language
1053--------
1054- [Stabilize `#![feature(let_chains)]` in the 2024 edition.](https://github.com/rust-lang/rust/pull/132833)
1055 This feature allows `&&`-chaining `let` statements inside `if` and `while`, allowing intermixture with boolean expressions. The patterns inside the `let` sub-expressions can be irrefutable or refutable.
1056- [Stabilize `#![feature(naked_functions)]`.](https://github.com/rust-lang/rust/pull/134213)
1057 Naked functions allow writing functions with no compiler-generated epilogue and prologue, allowing full control over the generated assembly for a particular function.
1058- [Stabilize `#![feature(cfg_boolean_literals)]`.](https://github.com/rust-lang/rust/pull/138632)
1059 This allows using boolean literals as `cfg` predicates, e.g. `#[cfg(true)]` and `#[cfg(false)]`.
1060- [Fully de-stabilize the `#[bench]` attribute](https://github.com/rust-lang/rust/pull/134273). Usage of `#[bench]` without `#![feature(custom_test_frameworks)]` already triggered a deny-by-default future-incompatibility lint since Rust 1.77, but will now become a hard error.
1061- [Add warn-by-default `dangerous_implicit_autorefs` lint against implicit autoref of raw pointer dereference.](https://github.com/rust-lang/rust/pull/123239)
1062 The lint [will be bumped to deny-by-default](https://github.com/rust-lang/rust/pull/141661) in the next version of Rust.
1063- [Add `invalid_null_arguments` lint to prevent invalid usage of null pointers.](https://github.com/rust-lang/rust/pull/119220)
1064 This lint is uplifted from `clippy::invalid_null_ptr_usage`.
1065- [Change trait impl candidate preference for builtin impls and trivial where-clauses.](https://github.com/rust-lang/rust/pull/138176)
1066- [Check types of generic const parameter defaults](https://github.com/rust-lang/rust/pull/139646)
1067
1068<a id="1.88.0-Compiler"></a>
1069
1070Compiler
1071--------
1072- [Stabilize `-Cdwarf-version` for selecting the version of DWARF debug information to generate.](https://github.com/rust-lang/rust/pull/136926)
1073
1074
1075<a id="1.88.0-Platform-Support"></a>
1076
1077Platform Support
1078----------------
1079- [Demote `i686-pc-windows-gnu` to Tier 2.](https://blog.rust-lang.org/2025/05/26/demoting-i686-pc-windows-gnu/)
1080
1081
1082Refer to Rust's [platform support page][platform-support-doc]
1083for more information on Rust's tiered platform support.
1084
1085[platform-support-doc]: https://doc.rust-lang.org/rustc/platform-support.html
1086
1087<a id="1.88.0-Libraries"></a>
1088
1089Libraries
1090---------
1091- [Remove backticks from `#[should_panic]` test failure message.](https://github.com/rust-lang/rust/pull/136160)
1092- [Guarantee that `[T; N]::from_fn` is generated in order of increasing indices.](https://github.com/rust-lang/rust/pull/139099), for those passing it a stateful closure.
1093- [The libtest flag `--nocapture` is deprecated in favor of the more consistent `--no-capture` flag.](https://github.com/rust-lang/rust/pull/139224)
1094- [Guarantee that `{float}::NAN` is a quiet NaN.](https://github.com/rust-lang/rust/pull/139483)
1095
1096
1097<a id="1.88.0-Stabilized-APIs"></a>
1098
1099Stabilized APIs
1100---------------
1101
1102- [`Cell::update`](https://doc.rust-lang.org/stable/std/cell/struct.Cell.html#method.update)
1103- [`impl Default for *const T`](https://doc.rust-lang.org/stable/std/primitive.pointer.html#impl-Default-for-*const+T)
1104- [`impl Default for *mut T`](https://doc.rust-lang.org/stable/std/primitive.pointer.html#impl-Default-for-*mut+T)
1105- [`HashMap::extract_if`](https://doc.rust-lang.org/stable/std/collections/struct.HashMap.html#method.extract_if)
1106- [`HashSet::extract_if`](https://doc.rust-lang.org/stable/std/collections/struct.HashSet.html#method.extract_if)
1107- [`hint::select_unpredictable`](https://doc.rust-lang.org/stable/std/hint/fn.select_unpredictable.html)
1108- [`proc_macro::Span::line`](https://doc.rust-lang.org/stable/proc_macro/struct.Span.html#method.line)
1109- [`proc_macro::Span::column`](https://doc.rust-lang.org/stable/proc_macro/struct.Span.html#method.column)
1110- [`proc_macro::Span::start`](https://doc.rust-lang.org/stable/proc_macro/struct.Span.html#method.start)
1111- [`proc_macro::Span::end`](https://doc.rust-lang.org/stable/proc_macro/struct.Span.html#method.end)
1112- [`proc_macro::Span::file`](https://doc.rust-lang.org/stable/proc_macro/struct.Span.html#method.file)
1113- [`proc_macro::Span::local_file`](https://doc.rust-lang.org/stable/proc_macro/struct.Span.html#method.local_file)
1114- [`<[T]>::as_chunks`](https://doc.rust-lang.org/stable/std/primitive.slice.html#method.as_chunks)
1115- [`<[T]>::as_chunks_mut`](https://doc.rust-lang.org/stable/std/primitive.slice.html#method.as_chunks_mut)
1116- [`<[T]>::as_chunks_unchecked`](https://doc.rust-lang.org/stable/std/primitive.slice.html#method.as_chunks_unchecked)
1117- [`<[T]>::as_chunks_unchecked_mut`](https://doc.rust-lang.org/stable/std/primitive.slice.html#method.as_chunks_unchecked_mut)
1118- [`<[T]>::as_rchunks`](https://doc.rust-lang.org/stable/std/primitive.slice.html#method.as_rchunks)
1119- [`<[T]>::as_rchunks_mut`](https://doc.rust-lang.org/stable/std/primitive.slice.html#method.as_rchunks_mut)
1120- [`mod ffi::c_str`](https://doc.rust-lang.org/stable/std/ffi/c_str/index.html)
1121
1122These previously stable APIs are now stable in const contexts:
1123
1124- [`NonNull<T>::replace`](https://doc.rust-lang.org/stable/std/ptr/struct.NonNull.html#method.replace)
1125- [`<*mut T>::replace`](https://doc.rust-lang.org/stable/std/primitive.pointer.html#method.replace)
1126- [`std::ptr::swap_nonoverlapping`](https://doc.rust-lang.org/stable/std/ptr/fn.swap_nonoverlapping.html)
1127- [`Cell::replace`](https://doc.rust-lang.org/stable/std/cell/struct.Cell.html#method.replace)
1128- [`Cell::get`](https://doc.rust-lang.org/stable/std/cell/struct.Cell.html#method.get)
1129- [`Cell::get_mut`](https://doc.rust-lang.org/stable/std/cell/struct.Cell.html#method.get_mut)
1130- [`Cell::from_mut`](https://doc.rust-lang.org/stable/std/cell/struct.Cell.html#method.from_mut)
1131- [`Cell::as_slice_of_cells`](https://doc.rust-lang.org/stable/std/cell/struct.Cell.html#method.as_slice_of_cells)
1132
1133
1134<a id="1.88.0-Cargo"></a>
1135
1136Cargo
1137-----
1138- [Stabilize automatic garbage collection.](https://github.com/rust-lang/cargo/pull/14287/)
1139- [use `zlib-rs` for gzip compression in rust code](https://github.com/rust-lang/cargo/pull/15417/)
1140
1141<a id="1.88.0-Rustdoc"></a>
1142
1143Rustdoc
1144-----
1145- [Doctests can be ignored based on target names using `ignore-*` attributes.](https://github.com/rust-lang/rust/pull/137096)
1146- [Stabilize the `--test-runtool` and `--test-runtool-arg` CLI options to specify a program (like qemu) and its arguments to run a doctest.](https://github.com/rust-lang/rust/pull/137096)
1147
1148<a id="1.88.0-Compatibility-Notes"></a>
1149
1150Compatibility Notes
1151-------------------
1152- [Finish changing the internal representation of pasted tokens](https://github.com/rust-lang/rust/pull/124141). Certain invalid declarative macros that were previously accepted in obscure circumstances are now correctly rejected by the compiler. Use of a `tt` fragment specifier can often fix these macros.
1153- [Fully de-stabilize the `#[bench]` attribute](https://github.com/rust-lang/rust/pull/134273). Usage of `#[bench]` without `#![feature(custom_test_frameworks)]` already triggered a deny-by-default future-incompatibility lint since Rust 1.77, but will now become a hard error.
1154- [Fix borrow checking some always-true patterns.](https://github.com/rust-lang/rust/pull/139042)
1155 The borrow checker was overly permissive in some cases, allowing programs that shouldn't have compiled.
1156- [Update the minimum external LLVM to 19.](https://github.com/rust-lang/rust/pull/139275)
1157- [Make it a hard error to use a vector type with a non-Rust ABI without enabling the required target feature.](https://github.com/rust-lang/rust/pull/139309)
1158
1159Version 1.87.0 (2025-05-15)
1160==========================
1161
1162<a id="1.87.0-Language"></a>
1163
1164Language
1165--------
1166- [Stabilize `asm_goto` feature](https://github.com/rust-lang/rust/pull/133870)
1167- [Allow parsing open beginning ranges (`..EXPR`) after unary operators `!`, `-`, and `*`](https://github.com/rust-lang/rust/pull/134900).
1168- [Don't require method impls for methods with `Self: Sized` bounds in `impl`s for unsized types](https://github.com/rust-lang/rust/pull/135480)
1169- [Stabilize `feature(precise_capturing_in_traits)` allowing `use<...>` bounds on return position `impl Trait` in `trait`s](https://github.com/rust-lang/rust/pull/138128)
1170
1171<a id="1.87.0-Compiler"></a>
1172
1173Compiler
1174--------
1175- [x86: make SSE2 required for i686 targets and use it to pass SIMD types](https://github.com/rust-lang/rust/pull/135408)
1176
1177<a id="1.87.0-Platform-Support"></a>
1178
1179Platform Support
1180----------------
1181- [Remove `i586-pc-windows-msvc` target](https://github.com/rust-lang/rust/pull/137957)
1182
1183Refer to Rust's [platform support page][platform-support-doc]
1184for more information on Rust's tiered platform support.
1185
1186[platform-support-doc]: https://doc.rust-lang.org/rustc/platform-support.html
1187
1188<a id="1.87.0-Libraries"></a>
1189
1190Libraries
1191---------
1192- [Stabilize the anonymous pipe API](https://github.com/rust-lang/rust/issues/127154)
1193- [Add support for unbounded left/right shift operations](https://github.com/rust-lang/rust/issues/129375)
1194- [Print pointer metadata in `Debug` impl of raw pointers](https://github.com/rust-lang/rust/pull/135080)
1195- [`Vec::with_capacity` guarantees it allocates with the amount requested, even if `Vec::capacity` returns a different number.](https://github.com/rust-lang/rust/pull/135933)
1196- Most `std::arch` intrinsics which don't take pointer arguments can now be called from safe code if the caller has the appropriate target features already enabled (https://github.com/rust-lang/stdarch/pull/1714, https://github.com/rust-lang/stdarch/pull/1716, https://github.com/rust-lang/stdarch/pull/1717)
1197- [Undeprecate `env::home_dir`](https://github.com/rust-lang/rust/pull/137327)
1198- [Denote `ControlFlow` as `#[must_use]`](https://github.com/rust-lang/rust/pull/137449)
1199- [Macros such as `assert_eq!` and `vec!` now support `const {...}` expressions](https://github.com/rust-lang/rust/pull/138162)
1200
1201<a id="1.87.0-Stabilized-APIs"></a>
1202
1203Stabilized APIs
1204---------------
1205
1206- [`Vec::extract_if`](https://doc.rust-lang.org/stable/std/vec/struct.Vec.html#method.extract_if)
1207- [`vec::ExtractIf`](https://doc.rust-lang.org/stable/std/vec/struct.ExtractIf.html)
1208- [`LinkedList::extract_if`](https://doc.rust-lang.org/stable/std/collections/struct.LinkedList.html#method.extract_if)
1209- [`linked_list::ExtractIf`](https://doc.rust-lang.org/stable/std/collections/linked_list/struct.ExtractIf.html)
1210- [`<[T]>::split_off`](https://doc.rust-lang.org/stable/std/primitive.slice.html#method.split_off)
1211- [`<[T]>::split_off_mut`](https://doc.rust-lang.org/stable/std/primitive.slice.html#method.split_off_mut)
1212- [`<[T]>::split_off_first`](https://doc.rust-lang.org/stable/std/primitive.slice.html#method.split_off_first)
1213- [`<[T]>::split_off_first_mut`](https://doc.rust-lang.org/stable/std/primitive.slice.html#method.split_off_first_mut)
1214- [`<[T]>::split_off_last`](https://doc.rust-lang.org/stable/std/primitive.slice.html#method.split_off_last)
1215- [`<[T]>::split_off_last_mut`](https://doc.rust-lang.org/stable/std/primitive.slice.html#method.split_off_last_mut)
1216- [`String::extend_from_within`](https://doc.rust-lang.org/stable/alloc/string/struct.String.html#method.extend_from_within)
1217- [`os_str::Display`](https://doc.rust-lang.org/stable/std/ffi/os_str/struct.Display.html)
1218- [`OsString::display`](https://doc.rust-lang.org/stable/std/ffi/struct.OsString.html#method.display)
1219- [`OsStr::display`](https://doc.rust-lang.org/stable/std/ffi/struct.OsStr.html#method.display)
1220- [`io::pipe`](https://doc.rust-lang.org/stable/std/io/fn.pipe.html)
1221- [`io::PipeReader`](https://doc.rust-lang.org/stable/std/io/struct.PipeReader.html)
1222- [`io::PipeWriter`](https://doc.rust-lang.org/stable/std/io/struct.PipeWriter.html)
1223- [`impl From<PipeReader> for OwnedHandle`](https://doc.rust-lang.org/stable/std/os/windows/io/struct.OwnedHandle.html#impl-From%3CPipeReader%3E-for-OwnedHandle)
1224- [`impl From<PipeWriter> for OwnedHandle`](https://doc.rust-lang.org/stable/std/os/windows/io/struct.OwnedHandle.html#impl-From%3CPipeWriter%3E-for-OwnedHandle)
1225- [`impl From<PipeReader> for Stdio`](https://doc.rust-lang.org/stable/std/process/struct.Stdio.html)
1226- [`impl From<PipeWriter> for Stdio`](https://doc.rust-lang.org/stable/std/process/struct.Stdio.html#impl-From%3CPipeWriter%3E-for-Stdio)
1227- [`impl From<PipeReader> for OwnedFd`](https://doc.rust-lang.org/stable/std/os/fd/struct.OwnedFd.html#impl-From%3CPipeReader%3E-for-OwnedFd)
1228- [`impl From<PipeWriter> for OwnedFd`](https://doc.rust-lang.org/stable/std/os/fd/struct.OwnedFd.html#impl-From%3CPipeWriter%3E-for-OwnedFd)
1229- [`Box<MaybeUninit<T>>::write`](https://doc.rust-lang.org/stable/std/boxed/struct.Box.html#method.write)
1230- [`impl TryFrom<Vec<u8>> for String`](https://doc.rust-lang.org/stable/std/string/struct.String.html#impl-TryFrom%3CVec%3Cu8%3E%3E-for-String)
1231- [`<*const T>::offset_from_unsigned`](https://doc.rust-lang.org/stable/std/primitive.pointer.html#method.offset_from_unsigned)
1232- [`<*const T>::byte_offset_from_unsigned`](https://doc.rust-lang.org/stable/std/primitive.pointer.html#method.byte_offset_from_unsigned)
1233- [`<*mut T>::offset_from_unsigned`](https://doc.rust-lang.org/stable/std/primitive.pointer.html#method.offset_from_unsigned-1)
1234- [`<*mut T>::byte_offset_from_unsigned`](https://doc.rust-lang.org/stable/std/primitive.pointer.html#method.byte_offset_from_unsigned-1)
1235- [`NonNull::offset_from_unsigned`](https://doc.rust-lang.org/stable/std/ptr/struct.NonNull.html#method.offset_from_unsigned)
1236- [`NonNull::byte_offset_from_unsigned`](https://doc.rust-lang.org/stable/std/ptr/struct.NonNull.html#method.byte_offset_from_unsigned)
1237- [`<uN>::cast_signed`](https://doc.rust-lang.org/stable/std/primitive.usize.html#method.cast_signed)
1238- [`NonZero::<uN>::cast_signed`](https://doc.rust-lang.org/stable/std/num/struct.NonZero.html#method.cast_signed-5).
1239- [`<iN>::cast_unsigned`](https://doc.rust-lang.org/stable/std/primitive.isize.html#method.cast_unsigned).
1240- [`NonZero::<iN>::cast_unsigned`](https://doc.rust-lang.org/stable/std/num/struct.NonZero.html#method.cast_unsigned-5).
1241- [`<uN>::is_multiple_of`](https://doc.rust-lang.org/stable/std/primitive.usize.html#method.is_multiple_of)
1242- [`<uN>::unbounded_shl`](https://doc.rust-lang.org/stable/std/primitive.usize.html#method.unbounded_shl)
1243- [`<uN>::unbounded_shr`](https://doc.rust-lang.org/stable/std/primitive.usize.html#method.unbounded_shr)
1244- [`<iN>::unbounded_shl`](https://doc.rust-lang.org/stable/std/primitive.isize.html#method.unbounded_shl)
1245- [`<iN>::unbounded_shr`](https://doc.rust-lang.org/stable/std/primitive.isize.html#method.unbounded_shr)
1246- [`<iN>::midpoint`](https://doc.rust-lang.org/stable/std/primitive.isize.html#method.midpoint)
1247- [`<str>::from_utf8`](https://doc.rust-lang.org/stable/std/primitive.str.html#method.from_utf8)
1248- [`<str>::from_utf8_mut`](https://doc.rust-lang.org/stable/std/primitive.str.html#method.from_utf8_mut)
1249- [`<str>::from_utf8_unchecked`](https://doc.rust-lang.org/stable/std/primitive.str.html#method.from_utf8_unchecked)
1250- [`<str>::from_utf8_unchecked_mut`](https://doc.rust-lang.org/stable/std/primitive.str.html#method.from_utf8_unchecked_mut)
1251
1252These previously stable APIs are now stable in const contexts:
1253
1254- [`core::str::from_utf8_mut`](https://doc.rust-lang.org/stable/std/str/fn.from_utf8_mut.html)
1255- [`<[T]>::copy_from_slice`](https://doc.rust-lang.org/stable/std/primitive.slice.html#method.copy_from_slice)
1256- [`SocketAddr::set_ip`](https://doc.rust-lang.org/stable/std/net/enum.SocketAddr.html#method.set_ip)
1257- [`SocketAddr::set_port`](https://doc.rust-lang.org/stable/std/net/enum.SocketAddr.html#method.set_port),
1258- [`SocketAddrV4::set_ip`](https://doc.rust-lang.org/stable/std/net/struct.SocketAddrV4.html#method.set_ip)
1259- [`SocketAddrV4::set_port`](https://doc.rust-lang.org/stable/std/net/struct.SocketAddrV4.html#method.set_port),
1260- [`SocketAddrV6::set_ip`](https://doc.rust-lang.org/stable/std/net/struct.SocketAddrV6.html#method.set_ip)
1261- [`SocketAddrV6::set_port`](https://doc.rust-lang.org/stable/std/net/struct.SocketAddrV6.html#method.set_port)
1262- [`SocketAddrV6::set_flowinfo`](https://doc.rust-lang.org/stable/std/net/struct.SocketAddrV6.html#method.set_flowinfo)
1263- [`SocketAddrV6::set_scope_id`](https://doc.rust-lang.org/stable/std/net/struct.SocketAddrV6.html#method.set_scope_id)
1264- [`char::is_digit`](https://doc.rust-lang.org/stable/std/primitive.char.html#method.is_digit)
1265- [`char::is_whitespace`](https://doc.rust-lang.org/stable/std/primitive.char.html#method.is_whitespace)
1266- [`<[[T; N]]>::as_flattened`](https://doc.rust-lang.org/stable/std/primitive.slice.html#method.as_flattened)
1267- [`<[[T; N]]>::as_flattened_mut`](https://doc.rust-lang.org/stable/std/primitive.slice.html#method.as_flattened_mut)
1268- [`String::into_bytes`](https://doc.rust-lang.org/stable/std/string/struct.String.html#method.into_bytes)
1269- [`String::as_str`](https://doc.rust-lang.org/stable/std/string/struct.String.html#method.as_str)
1270- [`String::capacity`](https://doc.rust-lang.org/stable/std/string/struct.String.html#method.capacity)
1271- [`String::as_bytes`](https://doc.rust-lang.org/stable/std/string/struct.String.html#method.as_bytes)
1272- [`String::len`](https://doc.rust-lang.org/stable/std/string/struct.String.html#method.len)
1273- [`String::is_empty`](https://doc.rust-lang.org/stable/std/string/struct.String.html#method.is_empty)
1274- [`String::as_mut_str`](https://doc.rust-lang.org/stable/std/string/struct.String.html#method.as_mut_str)
1275- [`String::as_mut_vec`](https://doc.rust-lang.org/stable/std/string/struct.String.html#method.as_mut_vec)
1276- [`Vec::as_ptr`](https://doc.rust-lang.org/stable/std/vec/struct.Vec.html#method.as_ptr)
1277- [`Vec::as_slice`](https://doc.rust-lang.org/stable/std/vec/struct.Vec.html#method.as_slice)
1278- [`Vec::capacity`](https://doc.rust-lang.org/stable/std/vec/struct.Vec.html#method.capacity)
1279- [`Vec::len`](https://doc.rust-lang.org/stable/std/vec/struct.Vec.html#method.len)
1280- [`Vec::is_empty`](https://doc.rust-lang.org/stable/std/vec/struct.Vec.html#method.is_empty)
1281- [`Vec::as_mut_slice`](https://doc.rust-lang.org/stable/std/vec/struct.Vec.html#method.as_mut_slice)
1282- [`Vec::as_mut_ptr`](https://doc.rust-lang.org/stable/std/vec/struct.Vec.html#method.as_mut_ptr)
1283
1284<a id="1.87.0-Cargo"></a>
1285
1286Cargo
1287-----
1288- [Add terminal integration via ANSI OSC 9;4 sequences](https://github.com/rust-lang/cargo/pull/14615/)
1289- [chore: bump openssl to v3](https://github.com/rust-lang/cargo/pull/15232/)
1290- [feat(package): add --exclude-lockfile flag](https://github.com/rust-lang/cargo/pull/15234/)
1291
1292<a id="1.87.0-Compatibility-Notes"></a>
1293
1294Compatibility Notes
1295-------------------
1296- [Rust now raises an error for macro invocations inside the `#![crate_name]` attribute](https://github.com/rust-lang/rust/pull/127581)
1297- [Unstable fields are now always considered to be inhabited](https://github.com/rust-lang/rust/pull/133889)
1298- [Macro arguments of unary operators followed by open beginning ranges may now be matched differently](https://github.com/rust-lang/rust/pull/134900)
1299- [Make `Debug` impl of raw pointers print metadata if present](https://github.com/rust-lang/rust/pull/135080)
1300- [Warn against function pointers using unsupported ABI strings in dependencies](https://github.com/rust-lang/rust/pull/135767)
1301- [Associated types on `dyn` types are no longer deduplicated](https://github.com/rust-lang/rust/pull/136458)
1302- [Forbid attributes on `..` inside of struct patterns (`let Struct { #[attribute] .. }) =`](https://github.com/rust-lang/rust/pull/136490)
1303- [Make `ptr_cast_add_auto_to_object` lint into hard error](https://github.com/rust-lang/rust/pull/136764)
1304- Many `std::arch` intrinsics are now safe to call in some contexts, there may now be new `unused_unsafe` warnings in existing codebases.
1305- [Limit `width` and `precision` formatting options to 16 bits on all targets](https://github.com/rust-lang/rust/pull/136932)
1306- [Turn order dependent trait objects future incompat warning into a hard error](https://github.com/rust-lang/rust/pull/136968)
1307- [Denote `ControlFlow` as `#[must_use]`](https://github.com/rust-lang/rust/pull/137449)
1308- [Windows: The standard library no longer links `advapi32`, except on win7.](https://github.com/rust-lang/rust/pull/138233) Code such as C libraries that were relying on this assumption may need to explicitly link advapi32.
1309- [Proc macros can no longer observe expanded `cfg(true)` attributes.](https://github.com/rust-lang/rust/pull/138844)
1310- [Start changing the internal representation of pasted tokens](https://github.com/rust-lang/rust/pull/124141). Certain invalid declarative macros that were previously accepted in obscure circumstances are now correctly rejected by the compiler. Use of a `tt` fragment specifier can often fix these macros.
1311- [Don't allow flattened format_args in const.](https://github.com/rust-lang/rust/pull/139624)
1312
1313<a id="1.87.0-Internal-Changes"></a>
1314
1315Internal Changes
1316----------------
1317
1318These changes do not affect any public interfaces of Rust, but they represent
1319significant improvements to the performance or internals of rustc and related
1320tools.
1321
1322- [Update to LLVM 20](https://github.com/rust-lang/rust/pull/135763)
1323
1324
1325Version 1.86.0 (2025-04-03)
1326==========================
1327
1328<a id="1.86.0-Language"></a>
1329
1330Language
1331--------
1332- [Stabilize upcasting trait objects to supertraits.](https://github.com/rust-lang/rust/pull/134367)
1333- [Allow safe functions to be marked with the `#[target_feature]` attribute.](https://github.com/rust-lang/rust/pull/134090)
1334- [The `missing_abi` lint now warns-by-default.](https://github.com/rust-lang/rust/pull/132397)
1335- Rust now lints about double negations, to catch cases that might have intended to be a prefix decrement operator (`--x`) as written in other languages. This was previously a clippy lint, `clippy::double_neg`, and is [now available directly in Rust as `double_negations`.](https://github.com/rust-lang/rust/pull/126604)
1336- [More pointers are now detected as definitely not-null based on their alignment in const eval.](https://github.com/rust-lang/rust/pull/133700)
1337- [Empty `repr()` attribute applied to invalid items are now correctly rejected.](https://github.com/rust-lang/rust/pull/133925)
1338- [Inner attributes `#![test]` and `#![rustfmt::skip]` are no longer accepted in more places than intended.](https://github.com/rust-lang/rust/pull/134276)
1339
1340<a id="1.86.0-Compiler"></a>
1341
1342Compiler
1343--------
1344- [Debug-assert that raw pointers are non-null on access.](https://github.com/rust-lang/rust/pull/134424)
1345- [Change `-O` to mean `-C opt-level=3` instead of `-C opt-level=2` to match Cargo's defaults.](https://github.com/rust-lang/rust/pull/135439)
1346- [Fix emission of `overflowing_literals` under certain macro environments.](https://github.com/rust-lang/rust/pull/136393)
1347
1348<a id="1.86.0-Platform-Support"></a>
1349
1350Platform Support
1351----------------
1352- [Replace `i686-unknown-redox` target with `i586-unknown-redox`.](https://github.com/rust-lang/rust/pull/136698)
1353- [Increase baseline CPU of `i686-unknown-hurd-gnu` to Pentium 4.](https://github.com/rust-lang/rust/pull/136700)
1354- New tier 3 targets:
1355 - [`{aarch64-unknown,x86_64-pc}-nto-qnx710_iosock`](https://github.com/rust-lang/rust/pull/133631).
1356 For supporting Neutrino QNX 7.1 with `io-socket` network stack.
1357 - [`{aarch64-unknown,x86_64-pc}-nto-qnx800`](https://github.com/rust-lang/rust/pull/133631).
1358 For supporting Neutrino QNX 8.0 (`no_std`-only).
1359 - [`{x86_64,i686}-win7-windows-gnu`](https://github.com/rust-lang/rust/pull/134609).
1360 Intended for backwards compatibility with Windows 7. `{x86_64,i686}-win7-windows-msvc` are the Windows MSVC counterparts that already exist as Tier 3 targets.
1361 - [`amdgcn-amd-amdhsa`](https://github.com/rust-lang/rust/pull/134740).
1362 - [`x86_64-pc-cygwin`](https://github.com/rust-lang/rust/pull/134999).
1363 - [`{mips,mipsel}-mti-none-elf`](https://github.com/rust-lang/rust/pull/135074).
1364 Initial bare-metal support.
1365 - [`m68k-unknown-none-elf`](https://github.com/rust-lang/rust/pull/135085).
1366 - [`armv7a-nuttx-{eabi,eabihf}`, `aarch64-unknown-nuttx`, and `thumbv7a-nuttx-{eabi,eabihf}`](https://github.com/rust-lang/rust/pull/135757).
1367
1368Refer to Rust's [platform support page][platform-support-doc]
1369for more information on Rust's tiered platform support.
1370
1371<a id="1.86.0-Libraries"></a>
1372
1373Libraries
1374---------
1375- The type of `FromBytesWithNulError` in `CStr::from_bytes_with_nul(bytes: &[u8]) -> Result<&Self, FromBytesWithNulError>` was [changed from an opaque struct to an enum](https://github.com/rust-lang/rust/pull/134143), allowing users to examine why the conversion failed.
1376- [Remove `RustcDecodable` and `RustcEncodable`.](https://github.com/rust-lang/rust/pull/134272)
1377- [Deprecate libtest's `--logfile` option.](https://github.com/rust-lang/rust/pull/134283)
1378- [On recent versions of Windows, `std::fs::remove_file` will now remove read-only files.](https://github.com/rust-lang/rust/pull/134679)
1379
1380<a id="1.86.0-Stabilized-APIs"></a>
1381
1382Stabilized APIs
1383---------------
1384
1385- [`{float}::next_down`](https://doc.rust-lang.org/stable/std/primitive.f64.html#method.next_down)
1386- [`{float}::next_up`](https://doc.rust-lang.org/stable/std/primitive.f64.html#method.next_up)
1387- [`<[_]>::get_disjoint_mut`](https://doc.rust-lang.org/stable/std/primitive.slice.html#method.get_disjoint_mut)
1388- [`<[_]>::get_disjoint_unchecked_mut`](https://doc.rust-lang.org/stable/std/primitive.slice.html#method.get_disjoint_unchecked_mut)
1389- [`slice::GetDisjointMutError`](https://doc.rust-lang.org/stable/std/slice/enum.GetDisjointMutError.html)
1390- [`HashMap::get_disjoint_mut`](https://doc.rust-lang.org/std/collections/hash_map/struct.HashMap.html#method.get_disjoint_mut)
1391- [`HashMap::get_disjoint_unchecked_mut`](https://doc.rust-lang.org/std/collections/hash_map/struct.HashMap.html#method.get_disjoint_unchecked_mut)
1392- [`NonZero::count_ones`](https://doc.rust-lang.org/stable/std/num/struct.NonZero.html#method.count_ones)
1393- [`Vec::pop_if`](https://doc.rust-lang.org/std/vec/struct.Vec.html#method.pop_if)
1394- [`sync::Once::wait`](https://doc.rust-lang.org/stable/std/sync/struct.Once.html#method.wait)
1395- [`sync::Once::wait_force`](https://doc.rust-lang.org/stable/std/sync/struct.Once.html#method.wait_force)
1396- [`sync::OnceLock::wait`](https://doc.rust-lang.org/stable/std/sync/struct.OnceLock.html#method.wait)
1397
1398These APIs are now stable in const contexts:
1399
1400- [`hint::black_box`](https://doc.rust-lang.org/stable/std/hint/fn.black_box.html)
1401- [`io::Cursor::get_mut`](https://doc.rust-lang.org/stable/std/io/struct.Cursor.html#method.get_mut)
1402- [`io::Cursor::set_position`](https://doc.rust-lang.org/stable/std/io/struct.Cursor.html#method.set_position)
1403- [`str::is_char_boundary`](https://doc.rust-lang.org/stable/std/primitive.str.html#method.is_char_boundary)
1404- [`str::split_at`](https://doc.rust-lang.org/stable/std/primitive.str.html#method.split_at)
1405- [`str::split_at_checked`](https://doc.rust-lang.org/stable/std/primitive.str.html#method.split_at_checked)
1406- [`str::split_at_mut`](https://doc.rust-lang.org/stable/std/primitive.str.html#method.split_at_mut)
1407- [`str::split_at_mut_checked`](https://doc.rust-lang.org/stable/std/primitive.str.html#method.split_at_mut_checked)
1408
1409<a id="1.86.0-Cargo"></a>
1410
1411Cargo
1412-----
1413- [When merging, replace rather than combine configuration keys that refer to a program path and its arguments.](https://github.com/rust-lang/cargo/pull/15066/)
1414- [Error if both `--package` and `--workspace` are passed but the requested package is missing.](https://github.com/rust-lang/cargo/pull/15071/) This was previously silently ignored, which was considered a bug since missing packages should be reported.
1415- [Deprecate the token argument in `cargo login` to avoid shell history leaks.](https://github.com/rust-lang/cargo/pull/15057/)
1416- [Simplify the implementation of `SourceID` comparisons.](https://github.com/rust-lang/cargo/pull/14980/) This may potentially change behavior if the canonicalized URL compares differently in alternative registries.
1417
1418<a id="1.86.0-Rustdoc"></a>
1419
1420Rustdoc
1421-----
1422- [Add a sans-serif font setting.](https://github.com/rust-lang/rust/pull/133636)
1423
1424<a id="1.86.0-Compatibility-Notes"></a>
1425
1426Compatibility Notes
1427-------------------
1428- [The `wasm_c_abi` future compatibility warning is now a hard error.](https://github.com/rust-lang/rust/pull/133951)
1429 Users of `wasm-bindgen` should upgrade to at least version 0.2.89, otherwise compilation will fail.
1430- [Remove long-deprecated no-op attributes `#![no_start]` and `#![crate_id]`.](https://github.com/rust-lang/rust/pull/134300)
1431- [The future incompatibility lint `cenum_impl_drop_cast` has been made into a hard error.](https://github.com/rust-lang/rust/pull/135964) This means it is now an error to cast a field-less enum to an integer if the enum implements `Drop`.
1432- [SSE2 is now required for "i686" 32-bit x86 hard-float targets; disabling it causes a warning that will become a hard error eventually.](https://github.com/rust-lang/rust/pull/137037)
1433 To compile for pre-SSE2 32-bit x86, use a "i586" target instead.
1434
1435<a id="1.86.0-Internal-Changes"></a>
1436
1437Internal Changes
1438----------------
1439
1440These changes do not affect any public interfaces of Rust, but they represent
1441significant improvements to the performance or internals of rustc and related
1442tools.
1443
1444- [Build the rustc on AArch64 Linux with ThinLTO + PGO.](https://github.com/rust-lang/rust/pull/133807)
1445 The ARM 64-bit compiler (AArch64) on Linux is now optimized with ThinLTO and PGO, similar to the optimizations we have already performed for the x86-64 compiler on Linux. This should make it up to 30% faster.
1446
1447
1448Version 1.85.1 (2025-03-18)
1449==========================
1450
1451<a id="1.85.1"></a>
1452
1453- [Fix the doctest-merging feature of the 2024 Edition.](https://github.com/rust-lang/rust/pull/137899/)
1454- [Relax some `target_feature` checks when generating docs.](https://github.com/rust-lang/rust/pull/137632/)
1455- [Fix errors in `std::fs::rename` on Windows 10, version 1607.](https://github.com/rust-lang/rust/pull/137528/)
1456- [Downgrade bootstrap `cc` to fix custom targets.](https://github.com/rust-lang/rust/pull/137460/)
1457- [Skip submodule updates when building Rust from a source tarball.](https://github.com/rust-lang/rust/pull/137338/)
1458
1459Version 1.85.0 (2025-02-20)
1460==========================
1461
1462<a id="1.85.0-Language"></a>
1463
1464Language
1465--------
1466- [The 2024 Edition is now stable.](https://github.com/rust-lang/rust/pull/133349)
1467 See [the edition guide](https://doc.rust-lang.org/nightly/edition-guide/rust-2024/index.html) for more details.
1468- [Stabilize async closures](https://github.com/rust-lang/rust/pull/132706)
1469 See [RFC 3668](https://rust-lang.github.io/rfcs/3668-async-closures.html) for more details.
1470- [Stabilize `#[diagnostic::do_not_recommend]`](https://github.com/rust-lang/rust/pull/132056)
1471- [Add `unpredictable_function_pointer_comparisons` lint to warn against function pointer comparisons](https://github.com/rust-lang/rust/pull/118833)
1472- [Lint on combining `#[no_mangle]` and `#[export_name]` attributes.](https://github.com/rust-lang/rust/pull/131558)
1473
1474<a id="1.85.0-Compiler"></a>
1475
1476Compiler
1477--------
1478- [The unstable flag `-Zpolymorphize` has been removed](https://github.com/rust-lang/rust/pull/133883), see https://github.com/rust-lang/compiler-team/issues/810 for some background.
1479
1480<a id="1.85.0-Platform-Support"></a>
1481
1482Platform Support
1483----------------
1484- [Promote `powerpc64le-unknown-linux-musl` to tier 2 with host tools](https://github.com/rust-lang/rust/pull/133801)
1485
1486Refer to Rust's [platform support page][platform-support-doc]
1487for more information on Rust's tiered platform support.
1488
1489<a id="1.85.0-Libraries"></a>
1490
1491Libraries
1492---------
1493- [Panics in the standard library now have a leading `library/` in their path](https://github.com/rust-lang/rust/pull/132390)
1494- [`std::env::home_dir()` on Windows now ignores the non-standard `$HOME` environment variable](https://github.com/rust-lang/rust/pull/132515)
1495
1496 It will be un-deprecated in a subsequent release.
1497- [Add `AsyncFn*` to the prelude in all editions.](https://github.com/rust-lang/rust/pull/132611)
1498
1499<a id="1.85.0-Stabilized-APIs"></a>
1500
1501Stabilized APIs
1502---------------
1503
1504- [`BuildHasherDefault::new`](https://doc.rust-lang.org/stable/std/hash/struct.BuildHasherDefault.html#method.new)
1505- [`ptr::fn_addr_eq`](https://doc.rust-lang.org/std/ptr/fn.fn_addr_eq.html)
1506- [`io::ErrorKind::QuotaExceeded`](https://doc.rust-lang.org/stable/std/io/enum.ErrorKind.html#variant.QuotaExceeded)
1507- [`io::ErrorKind::CrossesDevices`](https://doc.rust-lang.org/stable/std/io/enum.ErrorKind.html#variant.CrossesDevices)
1508- [`{float}::midpoint`](https://doc.rust-lang.org/core/primitive.f32.html#method.midpoint)
1509- [Unsigned `{integer}::midpoint`](https://doc.rust-lang.org/std/primitive.u64.html#method.midpoint)
1510- [`NonZeroU*::midpoint`](https://doc.rust-lang.org/std/num/type.NonZeroU32.html#method.midpoint)
1511- [impl `std::iter::Extend` for tuples with arity 1 through 12](https://doc.rust-lang.org/stable/std/iter/trait.Extend.html#impl-Extend%3C(A,)%3E-for-(EA,))
1512- [`FromIterator<(A, ...)>` for tuples with arity 1 through 12](https://doc.rust-lang.org/stable/std/iter/trait.FromIterator.html#impl-FromIterator%3C(EA,)%3E-for-(A,))
1513- [`std::task::Waker::noop`](https://doc.rust-lang.org/stable/std/task/struct.Waker.html#method.noop)
1514
1515These APIs are now stable in const contexts:
1516
1517- [`mem::size_of_val`](https://doc.rust-lang.org/stable/std/mem/fn.size_of_val.html)
1518- [`mem::align_of_val`](https://doc.rust-lang.org/stable/std/mem/fn.align_of_val.html)
1519- [`Layout::for_value`](https://doc.rust-lang.org/stable/std/alloc/struct.Layout.html#method.for_value)
1520- [`Layout::align_to`](https://doc.rust-lang.org/stable/std/alloc/struct.Layout.html#method.align_to)
1521- [`Layout::pad_to_align`](https://doc.rust-lang.org/stable/std/alloc/struct.Layout.html#method.pad_to_align)
1522- [`Layout::extend`](https://doc.rust-lang.org/stable/std/alloc/struct.Layout.html#method.extend)
1523- [`Layout::array`](https://doc.rust-lang.org/stable/std/alloc/struct.Layout.html#method.array)
1524- [`std::mem::swap`](https://doc.rust-lang.org/stable/std/mem/fn.swap.html)
1525- [`std::ptr::swap`](https://doc.rust-lang.org/stable/std/ptr/fn.swap.html)
1526- [`NonNull::new`](https://doc.rust-lang.org/stable/std/ptr/struct.NonNull.html#method.new)
1527- [`HashMap::with_hasher`](https://doc.rust-lang.org/stable/std/collections/struct.HashMap.html#method.with_hasher)
1528- [`HashSet::with_hasher`](https://doc.rust-lang.org/stable/std/collections/struct.HashSet.html#method.with_hasher)
1529- [`BuildHasherDefault::new`](https://doc.rust-lang.org/stable/std/hash/struct.BuildHasherDefault.html#method.new)
1530- [`<float>::recip`](https://doc.rust-lang.org/stable/std/primitive.f32.html#method.recip)
1531- [`<float>::to_degrees`](https://doc.rust-lang.org/stable/std/primitive.f32.html#method.to_degrees)
1532- [`<float>::to_radians`](https://doc.rust-lang.org/stable/std/primitive.f32.html#method.to_radians)
1533- [`<float>::max`](https://doc.rust-lang.org/stable/std/primitive.f32.html#method.max)
1534- [`<float>::min`](https://doc.rust-lang.org/stable/std/primitive.f32.html#method.min)
1535- [`<float>::clamp`](https://doc.rust-lang.org/stable/std/primitive.f32.html#method.clamp)
1536- [`<float>::abs`](https://doc.rust-lang.org/stable/std/primitive.f32.html#method.abs)
1537- [`<float>::signum`](https://doc.rust-lang.org/stable/std/primitive.f32.html#method.signum)
1538- [`<float>::copysign`](https://doc.rust-lang.org/stable/std/primitive.f32.html#method.copysign)
1539- [`MaybeUninit::write`](https://doc.rust-lang.org/stable/std/mem/union.MaybeUninit.html#method.write)
1540
1541<a id="1.85.0-Cargo"></a>
1542
1543Cargo
1544-----
1545- [Add future-incompatibility warning against keywords in cfgs and add raw-idents](https://github.com/rust-lang/cargo/pull/14671/)
1546- [Stabilize higher precedence trailing flags](https://github.com/rust-lang/cargo/pull/14900/)
1547- [Pass `CARGO_CFG_FEATURE` to build scripts](https://github.com/rust-lang/cargo/pull/14902/)
1548
1549<a id="1.85.0-Rustdoc"></a>
1550
1551Rustdoc
1552-----
1553- [Doc comment on impl blocks shows the first line, even when the impl block is collapsed](https://github.com/rust-lang/rust/pull/132155)
1554
1555<a id="1.85.0-Compatibility-Notes"></a>
1556
1557Compatibility Notes
1558-------------------
1559- [`rustc` no longer treats the `test` cfg as a well known check-cfg](https://github.com/rust-lang/rust/pull/131729), instead it is up to the build systems and users of `--check-cfg`[^check-cfg] to set it as a well known cfg using `--check-cfg=cfg(test)`.
1560
1561 This is done to enable build systems like Cargo to set it conditionally, as not all source files are suitable for unit tests.
1562 [Cargo (for now) unconditionally sets the `test` cfg as a well known cfg](https://github.com/rust-lang/cargo/pull/14963).
1563 [^check-cfg]: https://doc.rust-lang.org/nightly/rustc/check-cfg.html
1564- [Disable potentially incorrect type inference if there are trivial and non-trivial where-clauses](https://github.com/rust-lang/rust/pull/132325)
1565- `std::env::home_dir()` has been deprecated for years, because it can give surprising results in some Windows configurations if the `HOME` environment variable is set (which is not the normal configuration on Windows). We had previously avoided changing its behavior, out of concern for compatibility with code depending on this non-standard configuration. Given how long this function has been deprecated, we're now fixing its behavior as a bugfix. A subsequent release will remove the deprecation for this function.
1566- [Make `core::ffi::c_char` signedness more closely match that of the platform-default `char`](https://github.com/rust-lang/rust/pull/132975)
1567
1568 This changed `c_char` from an `i8` to `u8` or vice versa on many Tier 2 and 3
1569 targets (mostly Arm and RISC-V embedded targets). The new definition may
1570 result in compilation failures but fixes compatibility issues with C.
1571
1572 The `libc` crate matches this change as of its 0.2.169 release.
1573- [When compiling a nested `macro_rules` macro from an external crate, the content of the inner `macro_rules` is now built with the edition of the external crate, not the local crate.](https://github.com/rust-lang/rust/pull/133274)
1574- [Increase `sparcv9-sun-solaris` and `x86_64-pc-solaris` Solaris baseline to 11.4.](https://github.com/rust-lang/rust/pull/133293)
1575- [Show `abi_unsupported_vector_types` lint in future breakage reports](https://github.com/rust-lang/rust/pull/133374)
1576- [Error if multiple super-trait instantiations of `dyn Trait` need associated types to be specified but only one is provided](https://github.com/rust-lang/rust/pull/133392)
1577- [Change `powerpc64-ibm-aix` default `codemodel` to large](https://github.com/rust-lang/rust/pull/133811)
1578
1579<a id="1.85.0-Internal-Changes"></a>
1580
1581Internal Changes
1582----------------
1583
1584These changes do not affect any public interfaces of Rust, but they represent
1585significant improvements to the performance or internals of rustc and related
1586tools.
1587
1588- [Build `x86_64-unknown-linux-gnu` with LTO for C/C++ code (e.g., `jemalloc`)](https://github.com/rust-lang/rust/pull/134690)
1589
1590Version 1.84.1 (2025-01-30)
1591==========================
1592
1593<a id="1.84.1"></a>
1594
1595- [Fix ICE 132920 in duplicate-crate diagnostics.](https://github.com/rust-lang/rust/pull/133304/)
1596- [Fix errors for overlapping impls in incremental rebuilds.](https://github.com/rust-lang/rust/pull/133828/)
1597- [Fix slow compilation related to the next-generation trait solver.](https://github.com/rust-lang/rust/pull/135618/)
1598- [Fix debuginfo when LLVM's location discriminator value limit is exceeded.](https://github.com/rust-lang/rust/pull/135643/)
1599- Fixes for building Rust from source:
1600 - [Only try to distribute `llvm-objcopy` if llvm tools are enabled.](https://github.com/rust-lang/rust/pull/134240/)
1601 - [Add Profile Override for Non-Git Sources.](https://github.com/rust-lang/rust/pull/135433/)
1602 - [Resolve symlinks of LLVM tool binaries before copying them.](https://github.com/rust-lang/rust/pull/135585/)
1603 - [Make it possible to use ci-rustc on tarball sources.](https://github.com/rust-lang/rust/pull/135722/)
1604
1605Version 1.84.0 (2025-01-09)
1606==========================
1607
1608<a id="1.84.0-Language"></a>
1609
1610Language
1611--------
1612- [Allow `#[deny]` inside `#[forbid]` as a no-op](https://github.com/rust-lang/rust/pull/121560/)
1613- [Show a warning when `-Ctarget-feature` is used to toggle features that can lead to unsoundness due to ABI mismatches](https://github.com/rust-lang/rust/pull/129884)
1614- [Use the next-generation trait solver in coherence](https://github.com/rust-lang/rust/pull/130654)
1615- [Allow coercions to drop the principal of trait objects](https://github.com/rust-lang/rust/pull/131857)
1616- [Support `/` as the path separator for `include!()` in all cases on Windows](https://github.com/rust-lang/rust/pull/125205)
1617- [Taking a raw ref (`raw (const|mut)`) of a deref of a pointer (`*ptr`) is now safe](https://github.com/rust-lang/rust/pull/129248)
1618- [Stabilize s390x inline assembly](https://github.com/rust-lang/rust/pull/131258)
1619- [Stabilize Arm64EC inline assembly](https://github.com/rust-lang/rust/pull/131781)
1620- [Lint against creating pointers to immediately dropped temporaries](https://github.com/rust-lang/rust/pull/128985)
1621- [Execute drop glue when unwinding in an `extern "C"` function](https://github.com/rust-lang/rust/pull/129582)
1622
1623<a id="1.84.0-Compiler"></a>
1624
1625Compiler
1626--------
1627- [Add `--print host-tuple` flag to print the host target tuple and affirm the "target tuple" terminology over "target triple"](https://github.com/rust-lang/rust/pull/125579)
1628- [Declaring functions with a calling convention not supported on the current target now triggers a hard error](https://github.com/rust-lang/rust/pull/129935)
1629- [Set up indirect access to external data for `loongarch64-unknown-linux-{musl,ohos}`](https://github.com/rust-lang/rust/pull/131583)
1630- [Enable XRay instrumentation for LoongArch Linux targets](https://github.com/rust-lang/rust/pull/131818)
1631- [Extend the `unexpected_cfgs` lint to also warn in external macros](https://github.com/rust-lang/rust/pull/132577)
1632- [Stabilize WebAssembly `multivalue`, `reference-types`, and `tail-call` target features](https://github.com/rust-lang/rust/pull/131080)
1633- [Added Tier 2 support for the `wasm32v1-none` target](https://github.com/rust-lang/rust/pull/131487)
1634
1635<a id="1.84.0-Libraries"></a>
1636
1637Libraries
1638---------
1639- [Implement `From<&mut {slice}>` for `Box/Rc/Arc<{slice}>`](https://github.com/rust-lang/rust/pull/129329)
1640- [Move `<float>::copysign`, `<float>::abs`, `<float>::signum` to `core`](https://github.com/rust-lang/rust/pull/131304)
1641- [Add `LowerExp` and `UpperExp` implementations to `NonZero`](https://github.com/rust-lang/rust/pull/131377)
1642- [Implement `FromStr` for `CString` and `TryFrom<CString>` for `String`](https://github.com/rust-lang/rust/pull/130608)
1643- [`std::os::darwin` has been made public](https://github.com/rust-lang/rust/pull/123723)
1644
1645<a id="1.84.0-Stabilized-APIs"></a>
1646
1647Stabilized APIs
1648---------------
1649
1650- [`Ipv6Addr::is_unique_local`](https://doc.rust-lang.org/stable/core/net/struct.Ipv6Addr.html#method.is_unique_local)
1651- [`Ipv6Addr::is_unicast_link_local`](https://doc.rust-lang.org/stable/core/net/struct.Ipv6Addr.html#method.is_unicast_link_local)
1652- [`core::ptr::with_exposed_provenance`](https://doc.rust-lang.org/stable/core/ptr/fn.with_exposed_provenance.html)
1653- [`core::ptr::with_exposed_provenance_mut`](https://doc.rust-lang.org/stable/core/ptr/fn.with_exposed_provenance_mut.html)
1654- [`<ptr>::addr`](https://doc.rust-lang.org/stable/core/primitive.pointer.html#method.addr)
1655- [`<ptr>::expose_provenance`](https://doc.rust-lang.org/stable/core/primitive.pointer.html#method.expose_provenance)
1656- [`<ptr>::with_addr`](https://doc.rust-lang.org/stable/core/primitive.pointer.html#method.with_addr)
1657- [`<ptr>::map_addr`](https://doc.rust-lang.org/stable/core/primitive.pointer.html#method.map_addr)
1658- [`<int>::isqrt`](https://doc.rust-lang.org/stable/core/primitive.i32.html#method.isqrt)
1659- [`<int>::checked_isqrt`](https://doc.rust-lang.org/stable/core/primitive.i32.html#method.checked_isqrt)
1660- [`<uint>::isqrt`](https://doc.rust-lang.org/stable/core/primitive.u32.html#method.isqrt)
1661- [`NonZero::isqrt`](https://doc.rust-lang.org/stable/core/num/struct.NonZero.html#impl-NonZero%3Cu128%3E/method.isqrt)
1662- [`core::ptr::without_provenance`](https://doc.rust-lang.org/stable/core/ptr/fn.without_provenance.html)
1663- [`core::ptr::without_provenance_mut`](https://doc.rust-lang.org/stable/core/ptr/fn.without_provenance_mut.html)
1664- [`core::ptr::dangling`](https://doc.rust-lang.org/stable/core/ptr/fn.dangling.html)
1665- [`core::ptr::dangling_mut`](https://doc.rust-lang.org/stable/core/ptr/fn.dangling_mut.html)
1666- [`Pin::as_deref_mut`](https://doc.rust-lang.org/stable/core/pin/struct.Pin.html#method.as_deref_mut)
1667
1668These APIs are now stable in const contexts
1669
1670- [`AtomicBool::from_ptr`](https://doc.rust-lang.org/stable/core/sync/atomic/struct.AtomicBool.html#method.from_ptr)
1671- [`AtomicPtr::from_ptr`](https://doc.rust-lang.org/stable/core/sync/atomic/struct.AtomicPtr.html#method.from_ptr)
1672- [`AtomicU8::from_ptr`](https://doc.rust-lang.org/stable/core/sync/atomic/struct.AtomicU8.html#method.from_ptr)
1673- [`AtomicU16::from_ptr`](https://doc.rust-lang.org/stable/core/sync/atomic/struct.AtomicU16.html#method.from_ptr)
1674- [`AtomicU32::from_ptr`](https://doc.rust-lang.org/stable/core/sync/atomic/struct.AtomicU32.html#method.from_ptr)
1675- [`AtomicU64::from_ptr`](https://doc.rust-lang.org/stable/core/sync/atomic/struct.AtomicU64.html#method.from_ptr)
1676- [`AtomicUsize::from_ptr`](https://doc.rust-lang.org/stable/core/sync/atomic/struct.AtomicUsize.html#method.from_ptr)
1677- [`AtomicI8::from_ptr`](https://doc.rust-lang.org/stable/core/sync/atomic/struct.AtomicI8.html#method.from_ptr)
1678- [`AtomicI16::from_ptr`](https://doc.rust-lang.org/stable/core/sync/atomic/struct.AtomicI16.html#method.from_ptr)
1679- [`AtomicI32::from_ptr`](https://doc.rust-lang.org/stable/core/sync/atomic/struct.AtomicI32.html#method.from_ptr)
1680- [`AtomicI64::from_ptr`](https://doc.rust-lang.org/stable/core/sync/atomic/struct.AtomicI64.html#method.from_ptr)
1681- [`AtomicIsize::from_ptr`](https://doc.rust-lang.org/stable/core/sync/atomic/struct.AtomicIsize.html#method.from_ptr)
1682- [`<ptr>::is_null`](https://doc.rust-lang.org/stable/core/primitive.pointer.html#method.is_null-1)
1683- [`<ptr>::as_ref`](https://doc.rust-lang.org/stable/core/primitive.pointer.html#method.as_ref-1)
1684- [`<ptr>::as_mut`](https://doc.rust-lang.org/stable/core/primitive.pointer.html#method.as_mut)
1685- [`Pin::new`](https://doc.rust-lang.org/stable/core/pin/struct.Pin.html#method.new)
1686- [`Pin::new_unchecked`](https://doc.rust-lang.org/stable/core/pin/struct.Pin.html#method.new_unchecked)
1687- [`Pin::get_ref`](https://doc.rust-lang.org/stable/core/pin/struct.Pin.html#method.get_ref)
1688- [`Pin::into_ref`](https://doc.rust-lang.org/stable/core/pin/struct.Pin.html#method.into_ref)
1689- [`Pin::get_mut`](https://doc.rust-lang.org/stable/core/pin/struct.Pin.html#method.get_mut)
1690- [`Pin::get_unchecked_mut`](https://doc.rust-lang.org/stable/core/pin/struct.Pin.html#method.get_unchecked_mut)
1691- [`Pin::static_ref`](https://doc.rust-lang.org/stable/core/pin/struct.Pin.html#method.static_ref)
1692- [`Pin::static_mut`](https://doc.rust-lang.org/stable/core/pin/struct.Pin.html#method.static_mut)
1693
1694<a id="1.84.0-Cargo"></a>
1695
1696Cargo
1697-----
1698- [Stabilize MSRV-aware resolver config](https://github.com/rust-lang/cargo/pull/14639/)
1699- [Stabilize resolver v3](https://github.com/rust-lang/cargo/pull/14754/)
1700
1701<a id="1.84-Rustdoc"></a>
1702
1703Rustdoc
1704-------
1705
1706- [rustdoc-search: improve type-driven search](https://github.com/rust-lang/rust/pull/127589)
1707
1708<a id="1.84.0-Compatibility-Notes"></a>
1709
1710Compatibility Notes
1711-------------------
1712- [Enable by default the `LSX` target feature for LoongArch Linux targets](https://github.com/rust-lang/rust/pull/132140)
1713- [The unstable `-Zprofile` flag (“gcov-style” coverage instrumentation) has been removed.](https://github.com/rust-lang/rust/pull/131829) This does not affect the stable flags for coverage instrumentation (`-Cinstrument-coverage`) and profile-guided optimization (`-Cprofile-generate`, `-Cprofile-use`), which are unrelated and remain available.
1714- Support for the target named `wasm32-wasi` has been removed as the target is now named `wasm32-wasip1`. This completes the [transition](https://github.com/rust-lang/compiler-team/issues/607) [plan](https://github.com/rust-lang/compiler-team/issues/695) for this target following [the introduction of `wasm32-wasip1`](https://github.com/rust-lang/rust/pull/120468) in Rust 1.78. Compiler warnings on [use of `wasm32-wasi`](https://github.com/rust-lang/rust/pull/126662) introduced in Rust 1.81 are now gone as well as the target is removed.
1715- [The syntax `&pin (mut|const) T` is now parsed as a type which in theory could affect macro expansion results in some edge cases](https://github.com/rust-lang/rust/pull/130635#issuecomment-2375462821)
1716- [Legacy syntax for calling `std::arch` functions is no longer permitted to declare items or bodies (such as closures, inline consts, or async blocks).](https://github.com/rust-lang/rust/pull/130443#issuecomment-2445678945)
1717- [Declaring functions with a calling convention not supported on the current target now triggers a hard error](https://github.com/rust-lang/rust/pull/129935)
1718- [The next-generation trait solver is now enabled for coherence, fixing multiple soundness issues](https://github.com/rust-lang/rust/pull/130654)
1719
1720Version 1.83.0 (2024-11-28)
1721==========================
1722
1723<a id="1.83.0-Language"></a>
1724
1725Language
1726--------
1727- [Stabilize `&mut`, `*mut`, `&Cell`, and `*const Cell` in const.](https://github.com/rust-lang/rust/pull/129195)
1728- [Allow creating references to statics in `const` initializers.](https://github.com/rust-lang/rust/pull/129759)
1729- [Implement raw lifetimes and labels (`'r#ident`).](https://github.com/rust-lang/rust/pull/126452)
1730- [Define behavior when atomic and non-atomic reads race.](https://github.com/rust-lang/rust/pull/128778)
1731- [Non-exhaustive structs may now be empty.](https://github.com/rust-lang/rust/pull/128934)
1732- [Disallow implicit coercions from places of type `!`](https://github.com/rust-lang/rust/pull/129392)
1733- [`const extern` functions can now be defined for other calling conventions.](https://github.com/rust-lang/rust/pull/129753)
1734- [Stabilize `expr_2021` macro fragment specifier in all editions.](https://github.com/rust-lang/rust/pull/129972)
1735- [The `non_local_definitions` lint now fires on less code and warns by default.](https://github.com/rust-lang/rust/pull/127117)
1736
1737
1738<a id="1.83.0-Compiler"></a>
1739
1740Compiler
1741--------
1742- [Deprecate unsound `-Csoft-float` flag.](https://github.com/rust-lang/rust/pull/129897)
1743- Add many new tier 3 targets:
1744 - [`aarch64_unknown_nto_qnx700`](https://github.com/rust-lang/rust/pull/127897)
1745 - [`arm64e-apple-tvos`](https://github.com/rust-lang/rust/pull/130614)
1746 - [`armv7-rtems-eabihf`](https://github.com/rust-lang/rust/pull/127021)
1747 - [`loongarch64-unknown-linux-ohos`](https://github.com/rust-lang/rust/pull/130750)
1748 - [`riscv32-wrs-vxworks` and `riscv64-wrs-vxworks`](https://github.com/rust-lang/rust/pull/130549)
1749 - [`riscv32{e|em|emc}-unknown-none-elf`](https://github.com/rust-lang/rust/pull/130555)
1750 - [`x86_64-unknown-hurd-gnu`](https://github.com/rust-lang/rust/pull/128345)
1751 - [`x86_64-unknown-trusty`](https://github.com/rust-lang/rust/pull/130453)
1752
1753Refer to Rust's [platform support page][platform-support-doc]
1754for more information on Rust's tiered platform support.
1755
1756
1757<a id="1.83.0-Libraries"></a>
1758
1759Libraries
1760---------
1761- [Implement `PartialEq` for `ExitCode`.](https://github.com/rust-lang/rust/pull/127633)
1762- [Document that `catch_unwind` can deal with foreign exceptions without UB, although the exact behavior is unspecified.](https://github.com/rust-lang/rust/pull/128321)
1763- [Implement `Default` for `HashMap`/`HashSet` iterators that don't already have it.](https://github.com/rust-lang/rust/pull/128711)
1764- [Bump Unicode to version 16.0.0.](https://github.com/rust-lang/rust/pull/130183)
1765- [Change documentation of `ptr::add`/`sub` to not claim equivalence with `offset`.](https://github.com/rust-lang/rust/pull/130229)
1766
1767
1768<a id="1.83.0-Stabilized-APIs"></a>
1769
1770Stabilized APIs
1771---------------
1772
1773- [`BufRead::skip_until`](https://doc.rust-lang.org/stable/std/io/trait.BufRead.html#method.skip_until)
1774- [`ControlFlow::break_value`](https://doc.rust-lang.org/stable/core/ops/enum.ControlFlow.html#method.break_value)
1775- [`ControlFlow::continue_value`](https://doc.rust-lang.org/stable/core/ops/enum.ControlFlow.html#method.continue_value)
1776- [`ControlFlow::map_break`](https://doc.rust-lang.org/stable/core/ops/enum.ControlFlow.html#method.map_break)
1777- [`ControlFlow::map_continue`](https://doc.rust-lang.org/stable/core/ops/enum.ControlFlow.html#method.map_continue)
1778- [`DebugList::finish_non_exhaustive`](https://doc.rust-lang.org/stable/core/fmt/struct.DebugList.html#method.finish_non_exhaustive)
1779- [`DebugMap::finish_non_exhaustive`](https://doc.rust-lang.org/stable/core/fmt/struct.DebugMap.html#method.finish_non_exhaustive)
1780- [`DebugSet::finish_non_exhaustive`](https://doc.rust-lang.org/stable/core/fmt/struct.DebugSet.html#method.finish_non_exhaustive)
1781- [`DebugTuple::finish_non_exhaustive`](https://doc.rust-lang.org/stable/core/fmt/struct.DebugTuple.html#method.finish_non_exhaustive)
1782- [`ErrorKind::ArgumentListTooLong`](https://doc.rust-lang.org/stable/std/io/enum.ErrorKind.html#variant.ArgumentListTooLong)
1783- [`ErrorKind::Deadlock`](https://doc.rust-lang.org/stable/std/io/enum.ErrorKind.html#variant.Deadlock)
1784- [`ErrorKind::DirectoryNotEmpty`](https://doc.rust-lang.org/stable/std/io/enum.ErrorKind.html#variant.DirectoryNotEmpty)
1785- [`ErrorKind::ExecutableFileBusy`](https://doc.rust-lang.org/stable/std/io/enum.ErrorKind.html#variant.ExecutableFileBusy)
1786- [`ErrorKind::FileTooLarge`](https://doc.rust-lang.org/stable/std/io/enum.ErrorKind.html#variant.FileTooLarge)
1787- [`ErrorKind::HostUnreachable`](https://doc.rust-lang.org/stable/std/io/enum.ErrorKind.html#variant.HostUnreachable)
1788- [`ErrorKind::IsADirectory`](https://doc.rust-lang.org/stable/std/io/enum.ErrorKind.html#variant.IsADirectory)
1789- [`ErrorKind::NetworkDown`](https://doc.rust-lang.org/stable/std/io/enum.ErrorKind.html#variant.NetworkDown)
1790- [`ErrorKind::NetworkUnreachable`](https://doc.rust-lang.org/stable/std/io/enum.ErrorKind.html#variant.NetworkUnreachable)
1791- [`ErrorKind::NotADirectory`](https://doc.rust-lang.org/stable/std/io/enum.ErrorKind.html#variant.NotADirectory)
1792- [`ErrorKind::NotSeekable`](https://doc.rust-lang.org/stable/std/io/enum.ErrorKind.html#variant.NotSeekable)
1793- [`ErrorKind::ReadOnlyFilesystem`](https://doc.rust-lang.org/stable/std/io/enum.ErrorKind.html#variant.ReadOnlyFilesystem)
1794- [`ErrorKind::ResourceBusy`](https://doc.rust-lang.org/stable/std/io/enum.ErrorKind.html#variant.ResourceBusy)
1795- [`ErrorKind::StaleNetworkFileHandle`](https://doc.rust-lang.org/stable/std/io/enum.ErrorKind.html#variant.StaleNetworkFileHandle)
1796- [`ErrorKind::StorageFull`](https://doc.rust-lang.org/stable/std/io/enum.ErrorKind.html#variant.StorageFull)
1797- [`ErrorKind::TooManyLinks`](https://doc.rust-lang.org/stable/std/io/enum.ErrorKind.html#variant.TooManyLinks)
1798- [`Option::get_or_insert_default`](https://doc.rust-lang.org/stable/core/option/enum.Option.html#method.get_or_insert_default)
1799- [`Waker::data`](https://doc.rust-lang.org/stable/core/task/struct.Waker.html#method.data)
1800- [`Waker::new`](https://doc.rust-lang.org/stable/core/task/struct.Waker.html#method.new)
1801- [`Waker::vtable`](https://doc.rust-lang.org/stable/core/task/struct.Waker.html#method.vtable)
1802- [`char::MIN`](https://doc.rust-lang.org/stable/core/primitive.char.html#associatedconstant.MIN)
1803- [`hash_map::Entry::insert_entry`](https://doc.rust-lang.org/stable/std/collections/hash_map/enum.Entry.html#method.insert_entry)
1804- [`hash_map::VacantEntry::insert_entry`](https://doc.rust-lang.org/stable/std/collections/hash_map/struct.VacantEntry.html#method.insert_entry)
1805
1806These APIs are now stable in const contexts:
1807
1808- [`Cell::into_inner`](https://doc.rust-lang.org/stable/core/cell/struct.Cell.html#method.into_inner)
1809- [`Duration::as_secs_f32`](https://doc.rust-lang.org/stable/core/time/struct.Duration.html#method.as_secs_f32)
1810- [`Duration::as_secs_f64`](https://doc.rust-lang.org/stable/core/time/struct.Duration.html#method.as_secs_f64)
1811- [`Duration::div_duration_f32`](https://doc.rust-lang.org/stable/core/time/struct.Duration.html#method.div_duration_f32)
1812- [`Duration::div_duration_f64`](https://doc.rust-lang.org/stable/core/time/struct.Duration.html#method.div_duration_f64)
1813- [`MaybeUninit::as_mut_ptr`](https://doc.rust-lang.org/stable/core/mem/union.MaybeUninit.html#method.as_mut_ptr)
1814- [`NonNull::as_mut`](https://doc.rust-lang.org/stable/core/ptr/struct.NonNull.html#method.as_mut)
1815- [`NonNull::copy_from`](https://doc.rust-lang.org/stable/core/ptr/struct.NonNull.html#method.copy_from)
1816- [`NonNull::copy_from_nonoverlapping`](https://doc.rust-lang.org/stable/core/ptr/struct.NonNull.html#method.copy_from_nonoverlapping)
1817- [`NonNull::copy_to`](https://doc.rust-lang.org/stable/core/ptr/struct.NonNull.html#method.copy_to)
1818- [`NonNull::copy_to_nonoverlapping`](https://doc.rust-lang.org/stable/core/ptr/struct.NonNull.html#method.copy_to_nonoverlapping)
1819- [`NonNull::slice_from_raw_parts`](https://doc.rust-lang.org/stable/core/ptr/struct.NonNull.html#method.slice_from_raw_parts)
1820- [`NonNull::write`](https://doc.rust-lang.org/stable/core/ptr/struct.NonNull.html#method.write)
1821- [`NonNull::write_bytes`](https://doc.rust-lang.org/stable/core/ptr/struct.NonNull.html#method.write_bytes)
1822- [`NonNull::write_unaligned`](https://doc.rust-lang.org/stable/core/ptr/struct.NonNull.html#method.write_unaligned)
1823- [`OnceCell::into_inner`](https://doc.rust-lang.org/stable/core/cell/struct.OnceCell.html#method.into_inner)
1824- [`Option::as_mut`](https://doc.rust-lang.org/stable/core/option/enum.Option.html#method.as_mut)
1825- [`Option::expect`](https://doc.rust-lang.org/stable/core/option/enum.Option.html#method.expect)
1826- [`Option::replace`](https://doc.rust-lang.org/stable/core/option/enum.Option.html#method.replace)
1827- [`Option::take`](https://doc.rust-lang.org/stable/core/option/enum.Option.html#method.take)
1828- [`Option::unwrap`](https://doc.rust-lang.org/stable/core/option/enum.Option.html#method.unwrap)
1829- [`Option::unwrap_unchecked`](https://doc.rust-lang.org/stable/core/option/enum.Option.html#method.unwrap_unchecked)
1830- [`Option::<&_>::copied`](https://doc.rust-lang.org/stable/core/option/enum.Option.html#method.copied)
1831- [`Option::<&mut _>::copied`](https://doc.rust-lang.org/stable/core/option/enum.Option.html#method.copied-1)
1832- [`Option::<Option<_>>::flatten`](https://doc.rust-lang.org/stable/core/option/enum.Option.html#method.flatten)
1833- [`Option::<Result<_, _>>::transpose`](https://doc.rust-lang.org/stable/core/option/enum.Option.html#method.transpose)
1834- [`RefCell::into_inner`](https://doc.rust-lang.org/stable/core/cell/struct.RefCell.html#method.into_inner)
1835- [`Result::as_mut`](https://doc.rust-lang.org/stable/core/result/enum.Result.html#method.as_mut)
1836- [`Result::<&_, _>::copied`](https://doc.rust-lang.org/stable/core/result/enum.Result.html#method.copied)
1837- [`Result::<&mut _, _>::copied`](https://doc.rust-lang.org/stable/core/result/enum.Result.html#method.copied-1)
1838- [`Result::<Option<_>, _>::transpose`](https://doc.rust-lang.org/stable/core/result/enum.Result.html#method.transpose)
1839- [`UnsafeCell::get_mut`](https://doc.rust-lang.org/stable/core/cell/struct.UnsafeCell.html#method.get_mut)
1840- [`UnsafeCell::into_inner`](https://doc.rust-lang.org/stable/core/cell/struct.UnsafeCell.html#method.into_inner)
1841- [`array::from_mut`](https://doc.rust-lang.org/stable/core/array/fn.from_mut.html)
1842- [`char::encode_utf8`](https://doc.rust-lang.org/stable/core/primitive.char.html#method.encode_utf8)
1843- [`{float}::classify`](https://doc.rust-lang.org/stable/core/primitive.f64.html#method.classify)
1844- [`{float}::is_finite`](https://doc.rust-lang.org/stable/core/primitive.f64.html#method.is_finite)
1845- [`{float}::is_infinite`](https://doc.rust-lang.org/stable/core/primitive.f64.html#method.is_infinite)
1846- [`{float}::is_nan`](https://doc.rust-lang.org/stable/core/primitive.f64.html#method.is_nan)
1847- [`{float}::is_normal`](https://doc.rust-lang.org/stable/core/primitive.f64.html#method.is_normal)
1848- [`{float}::is_sign_negative`](https://doc.rust-lang.org/stable/core/primitive.f64.html#method.is_sign_negative)
1849- [`{float}::is_sign_positive`](https://doc.rust-lang.org/stable/core/primitive.f64.html#method.is_sign_positive)
1850- [`{float}::is_subnormal`](https://doc.rust-lang.org/stable/core/primitive.f64.html#method.is_subnormal)
1851- [`{float}::from_bits`](https://doc.rust-lang.org/stable/core/primitive.f64.html#method.from_bits)
1852- [`{float}::from_be_bytes`](https://doc.rust-lang.org/stable/core/primitive.f64.html#method.from_be_bytes)
1853- [`{float}::from_le_bytes`](https://doc.rust-lang.org/stable/core/primitive.f64.html#method.from_le_bytes)
1854- [`{float}::from_ne_bytes`](https://doc.rust-lang.org/stable/core/primitive.f64.html#method.from_ne_bytes)
1855- [`{float}::to_bits`](https://doc.rust-lang.org/stable/core/primitive.f64.html#method.to_bits)
1856- [`{float}::to_be_bytes`](https://doc.rust-lang.org/stable/core/primitive.f64.html#method.to_be_bytes)
1857- [`{float}::to_le_bytes`](https://doc.rust-lang.org/stable/core/primitive.f64.html#method.to_le_bytes)
1858- [`{float}::to_ne_bytes`](https://doc.rust-lang.org/stable/core/primitive.f64.html#method.to_ne_bytes)
1859- [`mem::replace`](https://doc.rust-lang.org/stable/core/mem/fn.replace.html)
1860- [`ptr::replace`](https://doc.rust-lang.org/stable/core/ptr/fn.replace.html)
1861- [`ptr::slice_from_raw_parts_mut`](https://doc.rust-lang.org/stable/core/ptr/fn.slice_from_raw_parts_mut.html)
1862- [`ptr::write`](https://doc.rust-lang.org/stable/core/ptr/fn.write.html)
1863- [`ptr::write_unaligned`](https://doc.rust-lang.org/stable/core/ptr/fn.write_unaligned.html)
1864- [`<*const _>::copy_to`](https://doc.rust-lang.org/stable/core/primitive.pointer.html#method.copy_to)
1865- [`<*const _>::copy_to_nonoverlapping`](https://doc.rust-lang.org/stable/core/primitive.pointer.html#method.copy_to_nonoverlapping)
1866- [`<*mut _>::copy_from`](https://doc.rust-lang.org/stable/core/primitive.pointer.html#method.copy_from)
1867- [`<*mut _>::copy_from_nonoverlapping`](https://doc.rust-lang.org/stable/core/primitive.pointer.html#method.copy_from_nonoverlapping)
1868- [`<*mut _>::copy_to`](https://doc.rust-lang.org/stable/core/primitive.pointer.html#method.copy_to-1)
1869- [`<*mut _>::copy_to_nonoverlapping`](https://doc.rust-lang.org/stable/core/primitive.pointer.html#method.copy_to_nonoverlapping-1)
1870- [`<*mut _>::write`](https://doc.rust-lang.org/stable/core/primitive.pointer.html#method.write)
1871- [`<*mut _>::write_bytes`](https://doc.rust-lang.org/stable/core/primitive.pointer.html#method.write_bytes)
1872- [`<*mut _>::write_unaligned`](https://doc.rust-lang.org/stable/core/primitive.pointer.html#method.write_unaligned)
1873- [`slice::from_mut`](https://doc.rust-lang.org/stable/core/slice/fn.from_mut.html)
1874- [`slice::from_raw_parts_mut`](https://doc.rust-lang.org/stable/core/slice/fn.from_raw_parts_mut.html)
1875- [`<[_]>::first_mut`](https://doc.rust-lang.org/stable/core/primitive.slice.html#method.first_mut)
1876- [`<[_]>::last_mut`](https://doc.rust-lang.org/stable/core/primitive.slice.html#method.last_mut)
1877- [`<[_]>::first_chunk_mut`](https://doc.rust-lang.org/stable/core/primitive.slice.html#method.first_chunk_mut)
1878- [`<[_]>::last_chunk_mut`](https://doc.rust-lang.org/stable/core/primitive.slice.html#method.last_chunk_mut)
1879- [`<[_]>::split_at_mut`](https://doc.rust-lang.org/stable/core/primitive.slice.html#method.split_at_mut)
1880- [`<[_]>::split_at_mut_checked`](https://doc.rust-lang.org/stable/core/primitive.slice.html#method.split_at_mut_checked)
1881- [`<[_]>::split_at_mut_unchecked`](https://doc.rust-lang.org/stable/core/primitive.slice.html#method.split_at_mut_unchecked)
1882- [`<[_]>::split_first_mut`](https://doc.rust-lang.org/stable/core/primitive.slice.html#method.split_first_mut)
1883- [`<[_]>::split_last_mut`](https://doc.rust-lang.org/stable/core/primitive.slice.html#method.split_last_mut)
1884- [`<[_]>::split_first_chunk_mut`](https://doc.rust-lang.org/stable/core/primitive.slice.html#method.split_first_chunk_mut)
1885- [`<[_]>::split_last_chunk_mut`](https://doc.rust-lang.org/stable/core/primitive.slice.html#method.split_last_chunk_mut)
1886- [`str::as_bytes_mut`](https://doc.rust-lang.org/stable/core/primitive.str.html#method.as_bytes_mut)
1887- [`str::as_mut_ptr`](https://doc.rust-lang.org/stable/core/primitive.str.html#method.as_mut_ptr)
1888- [`str::from_utf8_unchecked_mut`](https://doc.rust-lang.org/stable/core/str/fn.from_utf8_unchecked_mut.html)
1889
1890
1891<a id="1.83.0-Cargo"></a>
1892
1893Cargo
1894-----
1895- [Introduced a new `CARGO_MANIFEST_PATH` environment variable, similar to `CARGO_MANIFEST_DIR` but pointing directly to the manifest file.](https://github.com/rust-lang/cargo/pull/14404/)
1896- [Added `package.autolib` to the manifest, allowing `[lib]` auto-discovery to be disabled.](https://github.com/rust-lang/cargo/pull/14591/)
1897- [Declare support level for each crate in Cargo's Charter / crate docs.](https://github.com/rust-lang/cargo/pull/14600/)
1898- [Declare new Intentional Artifacts as 'small' changes.](https://github.com/rust-lang/cargo/pull/14599/)
1899
1900
1901<a id="1.83-Rustdoc"></a>
1902
1903Rustdoc
1904-------
1905
1906- [The sidebar / hamburger menu table of contents now includes the `# headers` from the main item's doc comment](https://github.com/rust-lang/rust/pull/120736). This is similar to a third-party feature provided by the rustdoc-search-enhancements browser extension.
1907
1908
1909<a id="1.83.0-Compatibility-Notes"></a>
1910
1911Compatibility Notes
1912-------------------
1913- [Warn against function pointers using unsupported ABI strings.](https://github.com/rust-lang/rust/pull/128784)
1914- [Check well-formedness of the source type's signature in fn pointer casts.](https://github.com/rust-lang/rust/pull/129021) This partly closes a soundness hole that comes when casting a function item to function pointer
1915- [Use equality instead of subtyping when resolving type dependent paths.](https://github.com/rust-lang/rust/pull/129073)
1916- Linking on macOS now correctly includes Rust's default deployment target. Due to a linker bug, you might have to pass `MACOSX_DEPLOYMENT_TARGET` or fix your `#[link]` attributes to point to the correct frameworks. See <https://github.com/rust-lang/rust/pull/129369>.
1917- [Rust will now correctly raise an error for `repr(Rust)` written on non-`struct`/`enum`/`union` items, since it previously did not have any effect.](https://github.com/rust-lang/rust/pull/129422)
1918- The future incompatibility lint `deprecated_cfg_attr_crate_type_name` [has been made into a hard error](https://github.com/rust-lang/rust/pull/129670). It was used to deny usage of `#![crate_type]` and `#![crate_name]` attributes in `#![cfg_attr]`, which required a hack in the compiler to be able to change the used crate type and crate name after cfg expansion.
1919 Users can use `--crate-type` instead of `#![cfg_attr(..., crate_type = "...")]` and `--crate-name` instead of `#![cfg_attr(..., crate_name = "...")]` when running `rustc`/`cargo rustc` on the command line.
1920 Use of those two attributes outside of `#![cfg_attr]` continue to be fully supported.
1921- Until now, paths into the sysroot were always prefixed with `/rustc/$hash` in diagnostics, codegen, backtrace, e.g.
1922 ```
1923 thread 'main' panicked at 'hello world', map-panic.rs:2:50
1924 stack backtrace:
1925 0: std::panicking::begin_panic
1926 at /rustc/a55dd71d5fb0ec5a6a3a9e8c27b2127ba491ce52/library/std/src/panicking.rs:616:12
1927 1: map_panic::main::{{closure}}
1928 at ./map-panic.rs:2:50
1929 2: core::option::Option<T>::map
1930 at /rustc/a55dd71d5fb0ec5a6a3a9e8c27b2127ba491ce52/library/core/src/option.rs:929:29
1931 3: map_panic::main
1932 at ./map-panic.rs:2:30
1933 4: core::ops::function::FnOnce::call_once
1934 at /rustc/a55dd71d5fb0ec5a6a3a9e8c27b2127ba491ce52/library/core/src/ops/function.rs:248:5
1935 note: Some details are omitted, run with `RUST_BACKTRACE=full` for a verbose backtrace.
1936 ```
1937 [RFC 3127 said](https://rust-lang.github.io/rfcs/3127-trim-paths.html#changing-handling-of-sysroot-path-in-rustc)
1938 > We want to change this behaviour such that, when `rust-src` source files can be discovered, the virtual path is discarded and therefore the local path will be embedded, unless there is a `--remap-path-prefix` that causes this local path to be remapped in the usual way.
1939
1940 [#129687](https://github.com/rust-lang/rust/pull/129687) implements this behaviour, when `rust-src` is present at compile time, `rustc` replaces `/rustc/$hash` with a real path into the local `rust-src` component with best effort.
1941 To sanitize this, users must explicitly supply `--remap-path-prefix=<path to rust-src>=foo` or not have the `rust-src` component installed.
1942 - The allow-by-default `missing_docs` lint used to disable itself when invoked through `rustc --test`/`cargo test`, resulting in `#[expect(missing_docs)]` emitting false positives due to the expectation being wrongly unfulfilled. This behavior [has now been removed](https://github.com/rust-lang/rust/pull/130025), which allows `#[expect(missing_docs)]` to be fulfilled in all scenarios, but will also report new `missing_docs` diagnostics for publicly reachable `#[cfg(test)]` items, [integration test](https://doc.rust-lang.org/cargo/reference/cargo-targets.html#integration-tests) crate-level documentation, and publicly reachable items in integration tests.
1943- [The `armv8r-none-eabihf` target now uses the Armv8-R required set of floating-point features.](https://github.com/rust-lang/rust/pull/130295)
1944- [Fix a soundness bug where rustc wouldn't detect unconstrained higher-ranked lifetimes in a `dyn Trait`'s associated types that occur due to supertraits.](https://github.com/rust-lang/rust/pull/130367)
1945- [Update the minimum external LLVM version to 18.](https://github.com/rust-lang/rust/pull/130487)
1946- [Remove `aarch64-fuchsia` and `x86_64-fuchsia` target aliases in favor of `aarch64-unknown-fuchsia` and `x86_64-unknown-fuchsia` respectively.](https://github.com/rust-lang/rust/pull/130657)
1947- [The ABI-level exception class of a Rust panic is now encoded with native-endian bytes, so it is legible in hex dumps.](https://github.com/rust-lang/rust/pull/130897)
1948- [Visual Studio 2013 is no longer supported for MSVC targets.](https://github.com/rust-lang/rust/pull/131070)
1949- [The sysroot no longer contains the `std` dynamic library in its top-level `lib/` dir.](https://github.com/rust-lang/rust/pull/131188)
1950
1951
1952Version 1.82.0 (2024-10-17)
1953==========================
1954
1955<a id="1.82.0-Language"></a>
1956
1957Language
1958--------
1959- [Don't make statement nonterminals match pattern nonterminals](https://github.com/rust-lang/rust/pull/120221/)
1960- [Patterns matching empty types can now be omitted in common cases](https://github.com/rust-lang/rust/pull/122792)
1961- [Enforce supertrait outlives obligations when using trait impls](https://github.com/rust-lang/rust/pull/124336)
1962- [`addr_of(_mut)!` macros and the newly stabilized `&raw (const|mut)` are now safe to use with all static items](https://github.com/rust-lang/rust/pull/125834)
1963- [size_of_val_raw: for length 0 this is safe to call](https://github.com/rust-lang/rust/pull/126152/)
1964- [Reorder trait bound modifiers *after* `for<...>` binder in trait bounds](https://github.com/rust-lang/rust/pull/127054/)
1965- [Stabilize `+ use<'lt>` opaque type precise capturing (RFC 3617)](https://github.com/rust-lang/rust/pull/127672)
1966- [Stabilize `&raw const` and `&raw mut` operators (RFC 2582)](https://github.com/rust-lang/rust/pull/127679)
1967- [Stabilize unsafe extern blocks (RFC 3484)](https://github.com/rust-lang/rust/pull/127921)
1968- [Stabilize nested field access in `offset_of!`](https://github.com/rust-lang/rust/pull/128284)
1969- [Do not require `T` to be live when dropping `[T; 0]`](https://github.com/rust-lang/rust/pull/128438)
1970- [Stabilize `const` operands in inline assembly](https://github.com/rust-lang/rust/pull/128570)
1971- [Stabilize floating-point arithmetic in `const fn`](https://github.com/rust-lang/rust/pull/128596)
1972- [Stabilize explicit opt-in to unsafe attributes](https://github.com/rust-lang/rust/pull/128771)
1973- [Document NaN bit patterns guarantees](https://github.com/rust-lang/rust/pull/129559)
1974
1975
1976<a id="1.82.0-Compiler"></a>
1977
1978Compiler
1979--------
1980- [Promote riscv64gc-unknown-linux-musl to tier 2](https://github.com/rust-lang/rust/pull/122049)
1981- [Promote Mac Catalyst targets `aarch64-apple-ios-macabi` and `x86_64-apple-ios-macabi` to Tier 2, and ship them with rustup](https://github.com/rust-lang/rust/pull/126450)
1982- [Add tier 3 NuttX based targets for RISC-V and ARM](https://github.com/rust-lang/rust/pull/127755)
1983- [Add tier 3 powerpc-unknown-linux-muslspe target](https://github.com/rust-lang/rust/pull/127905)
1984- [Improved diagnostics to explain why a pattern is unreachable](https://github.com/rust-lang/rust/pull/128034)
1985- [The compiler now triggers the unreachable code warning properly for async functions that don't return/are `-> !`](https://github.com/rust-lang/rust/pull/128443)
1986- [Promote `aarch64-apple-darwin` to Tier 1](https://github.com/rust-lang/rust/pull/128592)
1987- [Add Trusty OS target `aarch64-unknown-trusty` and `armv7-unknown-trusty` as tier 3 targets](https://github.com/rust-lang/rust/pull/129490)
1988- [Promote `wasm32-wasip2` to Tier 2.](https://github.com/rust-lang/rust/pull/126967/)
1989
1990
1991<a id="1.82.0-Libraries"></a>
1992
1993Libraries
1994---------
1995- [Generalize `{Rc,Arc}::make_mut()` to `Path`, `OsStr`, and `CStr`.](https://github.com/rust-lang/rust/pull/126877)
1996
1997<a id="1.82.0-Stabilized-APIs"></a>
1998
1999Stabilized APIs
2000---------------
2001
2002- [`std::thread::Builder::spawn_unchecked`](https://doc.rust-lang.org/stable/std/thread/struct.Builder.html#method.spawn_unchecked)
2003- [`std::str::CharIndices::offset`](https://doc.rust-lang.org/nightly/std/str/struct.CharIndices.html#method.offset)
2004- [`std::option::Option::is_none_or`](https://doc.rust-lang.org/nightly/std/option/enum.Option.html#method.is_none_or)
2005- [`[T]::is_sorted`](https://doc.rust-lang.org/nightly/std/primitive.slice.html#method.is_sorted)
2006- [`[T]::is_sorted_by`](https://doc.rust-lang.org/nightly/std/primitive.slice.html#method.is_sorted_by)
2007- [`[T]::is_sorted_by_key`](https://doc.rust-lang.org/nightly/std/primitive.slice.html#method.is_sorted_by_key)
2008- [`Iterator::is_sorted`](https://doc.rust-lang.org/nightly/std/iter/trait.Iterator.html#method.is_sorted)
2009- [`Iterator::is_sorted_by`](https://doc.rust-lang.org/nightly/std/iter/trait.Iterator.html#method.is_sorted_by)
2010- [`Iterator::is_sorted_by_key`](https://doc.rust-lang.org/nightly/std/iter/trait.Iterator.html#method.is_sorted_by_key)
2011- [`std::future::Ready::into_inner`](https://doc.rust-lang.org/nightly/std/future/struct.Ready.html#method.into_inner)
2012- [`std::iter::repeat_n`](https://doc.rust-lang.org/nightly/std/iter/fn.repeat_n.html)
2013- [`impl<T: Clone> DoubleEndedIterator for Take<Repeat<T>>`](https://doc.rust-lang.org/nightly/std/iter/struct.Take.html#impl-DoubleEndedIterator-for-Take%3CRepeat%3CT%3E%3E)
2014- [`impl<T: Clone> ExactSizeIterator for Take<Repeat<T>>`](https://doc.rust-lang.org/nightly/std/iter/struct.Take.html#impl-ExactSizeIterator-for-Take%3CRepeat%3CT%3E%3E)
2015- [`impl<T: Clone> ExactSizeIterator for Take<RepeatWith<T>>`](https://doc.rust-lang.org/nightly/std/iter/struct.Take.html#impl-ExactSizeIterator-for-Take%3CRepeatWith%3CF%3E%3E)
2016- [`impl Default for std::collections::binary_heap::Iter`](https://doc.rust-lang.org/nightly/std/collections/binary_heap/struct.Iter.html#impl-Default-for-Iter%3C'_,+T%3E)
2017- [`impl Default for std::collections::btree_map::RangeMut`](https://doc.rust-lang.org/nightly/std/collections/btree_map/struct.RangeMut.html#impl-Default-for-RangeMut%3C'_,+K,+V%3E)
2018- [`impl Default for std::collections::btree_map::ValuesMut`](https://doc.rust-lang.org/nightly/std/collections/btree_map/struct.ValuesMut.html#impl-Default-for-ValuesMut%3C'_,+K,+V%3E)
2019- [`impl Default for std::collections::vec_deque::Iter`](https://doc.rust-lang.org/nightly/std/collections/vec_deque/struct.Iter.html#impl-Default-for-Iter%3C'_,+T%3E)
2020- [`impl Default for std::collections::vec_deque::IterMut`](https://doc.rust-lang.org/nightly/std/collections/vec_deque/struct.IterMut.html#impl-Default-for-IterMut%3C'_,+T%3E)
2021- [`Rc<T>::new_uninit`](https://doc.rust-lang.org/nightly/std/rc/struct.Rc.html#method.new_uninit)
2022- [`Rc<MaybeUninit<T>>::assume_init`](https://doc.rust-lang.org/nightly/std/rc/struct.Rc.html#method.assume_init)
2023- [`Rc<[T]>::new_uninit_slice`](https://doc.rust-lang.org/nightly/std/rc/struct.Rc.html#method.new_uninit_slice)
2024- [`Rc<[MaybeUninit<T>]>::assume_init`](https://doc.rust-lang.org/nightly/std/rc/struct.Rc.html#method.assume_init-1)
2025- [`Arc<T>::new_uninit`](https://doc.rust-lang.org/nightly/std/sync/struct.Arc.html#method.new_uninit)
2026- [`Arc<MaybeUninit<T>>::assume_init`](https://doc.rust-lang.org/nightly/std/sync/struct.Arc.html#method.assume_init)
2027- [`Arc<[T]>::new_uninit_slice`](https://doc.rust-lang.org/nightly/std/sync/struct.Arc.html#method.new_uninit_slice)
2028- [`Arc<[MaybeUninit<T>]>::assume_init`](https://doc.rust-lang.org/nightly/std/sync/struct.Arc.html#method.assume_init-1)
2029- [`Box<T>::new_uninit`](https://doc.rust-lang.org/nightly/std/boxed/struct.Box.html#method.new_uninit)
2030- [`Box<MaybeUninit<T>>::assume_init`](https://doc.rust-lang.org/nightly/std/boxed/struct.Box.html#method.assume_init)
2031- [`Box<[T]>::new_uninit_slice`](https://doc.rust-lang.org/nightly/std/boxed/struct.Box.html#method.new_uninit_slice)
2032- [`Box<[MaybeUninit<T>]>::assume_init`](https://doc.rust-lang.org/nightly/std/boxed/struct.Box.html#method.assume_init-1)
2033- [`core::arch::x86_64::_bextri_u64`](https://doc.rust-lang.org/stable/core/arch/x86_64/fn._bextri_u64.html)
2034- [`core::arch::x86_64::_bextri_u32`](https://doc.rust-lang.org/stable/core/arch/x86_64/fn._bextri_u32.html)
2035- [`core::arch::x86::_mm_broadcastsi128_si256`](https://doc.rust-lang.org/stable/core/arch/x86/fn._mm_broadcastsi128_si256.html)
2036- [`core::arch::x86::_mm256_stream_load_si256`](https://doc.rust-lang.org/stable/core/arch/x86/fn._mm256_stream_load_si256.html)
2037- [`core::arch::x86::_tzcnt_u16`](https://doc.rust-lang.org/stable/core/arch/x86/fn._tzcnt_u16.html)
2038- [`core::arch::x86::_mm_extracti_si64`](https://doc.rust-lang.org/stable/core/arch/x86/fn._mm_extracti_si64.html)
2039- [`core::arch::x86::_mm_inserti_si64`](https://doc.rust-lang.org/stable/core/arch/x86/fn._mm_inserti_si64.html)
2040- [`core::arch::x86::_mm_storeu_si16`](https://doc.rust-lang.org/stable/core/arch/x86/fn._mm_storeu_si16.html)
2041- [`core::arch::x86::_mm_storeu_si32`](https://doc.rust-lang.org/stable/core/arch/x86/fn._mm_storeu_si32.html)
2042- [`core::arch::x86::_mm_storeu_si64`](https://doc.rust-lang.org/stable/core/arch/x86/fn._mm_storeu_si64.html)
2043- [`core::arch::x86::_mm_loadu_si16`](https://doc.rust-lang.org/stable/core/arch/x86/fn._mm_loadu_si16.html)
2044- [`core::arch::x86::_mm_loadu_si32`](https://doc.rust-lang.org/stable/core/arch/x86/fn._mm_loadu_si32.html)
2045- [`core::arch::wasm32::u8x16_relaxed_swizzle`](https://doc.rust-lang.org/nightly/core/arch/wasm32/fn.u8x16_relaxed_swizzle.html)
2046- [`core::arch::wasm32::i8x16_relaxed_swizzle`](https://doc.rust-lang.org/nightly/core/arch/wasm32/fn.i8x16_relaxed_swizzle.html)
2047- [`core::arch::wasm32::i32x4_relaxed_trunc_f32x4`](https://doc.rust-lang.org/nightly/core/arch/wasm32/fn.i32x4_relaxed_trunc_f32x4.html)
2048- [`core::arch::wasm32::u32x4_relaxed_trunc_f32x4`](https://doc.rust-lang.org/nightly/core/arch/wasm32/fn.u32x4_relaxed_trunc_f32x4.html)
2049- [`core::arch::wasm32::i32x4_relaxed_trunc_f64x2_zero`](https://doc.rust-lang.org/nightly/core/arch/wasm32/fn.i32x4_relaxed_trunc_f64x2_zero.html)
2050- [`core::arch::wasm32::u32x4_relaxed_trunc_f64x2_zero`](https://doc.rust-lang.org/nightly/core/arch/wasm32/fn.u32x4_relaxed_trunc_f64x2_zero.html)
2051- [`core::arch::wasm32::f32x4_relaxed_madd`](https://doc.rust-lang.org/nightly/core/arch/wasm32/fn.f32x4_relaxed_madd.html)
2052- [`core::arch::wasm32::f32x4_relaxed_nmadd`](https://doc.rust-lang.org/nightly/core/arch/wasm32/fn.f32x4_relaxed_nmadd.html)
2053- [`core::arch::wasm32::f64x2_relaxed_madd`](https://doc.rust-lang.org/nightly/core/arch/wasm32/fn.f64x2_relaxed_madd.html)
2054- [`core::arch::wasm32::f64x2_relaxed_nmadd`](https://doc.rust-lang.org/nightly/core/arch/wasm32/fn.f64x2_relaxed_nmadd.html)
2055- [`core::arch::wasm32::i8x16_relaxed_laneselect`](https://doc.rust-lang.org/nightly/core/arch/wasm32/fn.i8x16_relaxed_laneselect.html)
2056- [`core::arch::wasm32::u8x16_relaxed_laneselect`](https://doc.rust-lang.org/nightly/core/arch/wasm32/fn.u8x16_relaxed_laneselect.html)
2057- [`core::arch::wasm32::i16x8_relaxed_laneselect`](https://doc.rust-lang.org/nightly/core/arch/wasm32/fn.i16x8_relaxed_laneselect.html)
2058- [`core::arch::wasm32::u16x8_relaxed_laneselect`](https://doc.rust-lang.org/nightly/core/arch/wasm32/fn.u16x8_relaxed_laneselect.html)
2059- [`core::arch::wasm32::i32x4_relaxed_laneselect`](https://doc.rust-lang.org/nightly/core/arch/wasm32/fn.i32x4_relaxed_laneselect.html)
2060- [`core::arch::wasm32::u32x4_relaxed_laneselect`](https://doc.rust-lang.org/nightly/core/arch/wasm32/fn.u32x4_relaxed_laneselect.html)
2061- [`core::arch::wasm32::i64x2_relaxed_laneselect`](https://doc.rust-lang.org/nightly/core/arch/wasm32/fn.i64x2_relaxed_laneselect.html)
2062- [`core::arch::wasm32::u64x2_relaxed_laneselect`](https://doc.rust-lang.org/nightly/core/arch/wasm32/fn.u64x2_relaxed_laneselect.html)
2063- [`core::arch::wasm32::f32x4_relaxed_min`](https://doc.rust-lang.org/nightly/core/arch/wasm32/fn.f32x4_relaxed_min.html)
2064- [`core::arch::wasm32::f32x4_relaxed_max`](https://doc.rust-lang.org/nightly/core/arch/wasm32/fn.f32x4_relaxed_max.html)
2065- [`core::arch::wasm32::f64x2_relaxed_min`](https://doc.rust-lang.org/nightly/core/arch/wasm32/fn.f64x2_relaxed_min.html)
2066- [`core::arch::wasm32::f64x2_relaxed_max`](https://doc.rust-lang.org/nightly/core/arch/wasm32/fn.f64x2_relaxed_max.html)
2067- [`core::arch::wasm32::i16x8_relaxed_q15mulr`](https://doc.rust-lang.org/nightly/core/arch/wasm32/fn.i16x8_relaxed_q15mulr.html)
2068- [`core::arch::wasm32::u16x8_relaxed_q15mulr`](https://doc.rust-lang.org/nightly/core/arch/wasm32/fn.u16x8_relaxed_q15mulr.html)
2069- [`core::arch::wasm32::i16x8_relaxed_dot_i8x16_i7x16`](https://doc.rust-lang.org/nightly/core/arch/wasm32/fn.i16x8_relaxed_dot_i8x16_i7x16.html)
2070- [`core::arch::wasm32::u16x8_relaxed_dot_i8x16_i7x16`](https://doc.rust-lang.org/nightly/core/arch/wasm32/fn.u16x8_relaxed_dot_i8x16_i7x16.html)
2071- [`core::arch::wasm32::i32x4_relaxed_dot_i8x16_i7x16_add`](https://doc.rust-lang.org/nightly/core/arch/wasm32/fn.i32x4_relaxed_dot_i8x16_i7x16_add.html)
2072- [`core::arch::wasm32::u32x4_relaxed_dot_i8x16_i7x16_add`](https://doc.rust-lang.org/nightly/core/arch/wasm32/fn.u32x4_relaxed_dot_i8x16_i7x16_add.html)
2073
2074These APIs are now stable in const contexts:
2075
2076- [`std::task::Waker::from_raw`](https://doc.rust-lang.org/nightly/std/task/struct.Waker.html#method.from_raw)
2077- [`std::task::Context::from_waker`](https://doc.rust-lang.org/nightly/std/task/struct.Context.html#method.from_waker)
2078- [`std::task::Context::waker`](https://doc.rust-lang.org/nightly/std/task/struct.Context.html#method.waker)
2079- [`{integer}::from_str_radix`](https://doc.rust-lang.org/nightly/std/primitive.u32.html#method.from_str_radix)
2080- [`std::num::ParseIntError::kind`](https://doc.rust-lang.org/nightly/std/num/struct.ParseIntError.html#method.kind)
2081
2082<a id="1.82.0-Cargo"></a>
2083
2084Cargo
2085-----
2086- [feat: Add `info` cargo subcommand](https://github.com/rust-lang/cargo/pull/14141/)
2087
2088<a id="1.82.0-Compatibility-Notes"></a>
2089
2090Compatibility Notes
2091-------------------
2092 - We now [disallow setting some built-in cfgs via the command-line](https://github.com/rust-lang/rust/pull/126158) with the newly added [`explicit_builtin_cfgs_in_flags`](https://doc.rust-lang.org/rustc/lints/listing/deny-by-default.html#explicit-builtin-cfgs-in-flags) lint in order to prevent incoherent state, eg. `windows` cfg active but target is Linux based. The appropriate [`rustc` flag](https://doc.rust-lang.org/rustc/command-line-arguments.html) should be used instead.
2093- The standard library has a new implementation of `binary_search` which significantly improves performance ([#128254](https://github.com/rust-lang/rust/pull/128254)). However when a sorted slice has multiple values which compare equal, the new implementation may select a different value among the equal ones than the old implementation.
2094- [illumos/Solaris now sets `MSG_NOSIGNAL` when writing to sockets](https://github.com/rust-lang/rust/pull/128259). This avoids killing the process with SIGPIPE when writing to a closed socket, which matches the existing behavior on other UNIX targets.
2095- [Removes a problematic hack that always passed the --whole-archive linker flag for tests, which may cause linker errors for code accidentally relying on it.](https://github.com/rust-lang/rust/pull/128400)
2096- The WebAssembly target features `multivalue` and `reference-types` are now
2097 both enabled by default. These two features both have subtle changes implied
2098 for generated WebAssembly binaries. For the `multivalue` feature, WebAssembly
2099 target support has changed when upgrading to LLVM 19. Support for generating
2100 functions with multiple returns no longer works and
2101 `-Ctarget-feature=+multivalue` has a different meaning than it did in LLVM 18
2102 and prior. There is no longer any supported means to generate a module that has
2103 a function with multiple returns in WebAssembly from Rust source code. For the
2104 `reference-types` feature the encoding of immediates in the `call_indirect`, a
2105 commonly used instruction by the WebAssembly backend, has changed. Validators
2106 and parsers which don't understand the `reference-types` proposal will no
2107 longer accept modules produced by LLVM due to this change in encoding of
2108 immediates. Additionally these features being enabled are encoded in the
2109 `target_features` custom section and may affect downstream tooling such as
2110 `wasm-opt` consuming the module. Generating a WebAssembly module that disables
2111 default features requires `-Zbuild-std` support from Cargo and more information
2112 can be found at
2113 [rust-lang/rust#128511](https://github.com/rust-lang/rust/pull/128511).
2114- [Rust now raises unsafety errors for union patterns in parameter-position](https://github.com/rust-lang/rust/pull/130531)
2115
2116
2117<a id="1.82.0-Internal-Changes"></a>
2118
2119Internal Changes
2120----------------
2121
2122These changes do not affect any public interfaces of Rust, but they represent
2123significant improvements to the performance or internals of rustc and related
2124tools.
2125
2126- [Update to LLVM 19](https://github.com/rust-lang/rust/pull/127513)
2127
2128Version 1.81.0 (2024-09-05)
2129==========================
2130
2131<a id="1.81.0-Language"></a>
2132
2133Language
2134--------
2135
2136- [Abort on uncaught panics in `extern "C"` functions.](https://github.com/rust-lang/rust/pull/116088/)
2137- [Fix ambiguous cases of multiple `&` in elided self lifetimes.](https://github.com/rust-lang/rust/pull/117967/)
2138- [Stabilize `#[expect]` for lints (RFC 2383),](https://github.com/rust-lang/rust/pull/120924/) like `#[allow]` with a warning if the lint is _not_ fulfilled.
2139- [Change method resolution to constrain hidden types instead of rejecting method candidates.](https://github.com/rust-lang/rust/pull/123962/)
2140- [Bump `elided_lifetimes_in_associated_constant` to deny.](https://github.com/rust-lang/rust/pull/124211/)
2141- [`offset_from`: always allow pointers to point to the same address.](https://github.com/rust-lang/rust/pull/124921/)
2142- [Allow constraining opaque types during subtyping in the trait system.](https://github.com/rust-lang/rust/pull/125447/)
2143- [Allow constraining opaque types during various unsizing casts.](https://github.com/rust-lang/rust/pull/125610/)
2144- [Deny keyword lifetimes pre-expansion.](https://github.com/rust-lang/rust/pull/126762/)
2145
2146<a id="1.81.0-Compiler"></a>
2147
2148Compiler
2149--------
2150
2151- [Make casts of pointers to trait objects stricter.](https://github.com/rust-lang/rust/pull/120248/)
2152- [Check alias args for well-formedness even if they have escaping bound vars.](https://github.com/rust-lang/rust/pull/123737/)
2153- [Deprecate no-op codegen option `-Cinline-threshold=...`.](https://github.com/rust-lang/rust/pull/124712/)
2154- [Re-implement a type-size based limit.](https://github.com/rust-lang/rust/pull/125507/)
2155- [Properly account for alignment in `transmute` size checks.](https://github.com/rust-lang/rust/pull/125740/)
2156- [Remove the `box_pointers` lint.](https://github.com/rust-lang/rust/pull/126018/)
2157- [Ensure the interpreter checks bool/char for validity when they are used in a cast.](https://github.com/rust-lang/rust/pull/126265/)
2158- [Improve coverage instrumentation for functions containing nested items.](https://github.com/rust-lang/rust/pull/127199/)
2159- Target changes:
2160 - [Add Tier 3 `no_std` Xtensa targets:](https://github.com/rust-lang/rust/pull/125141/) `xtensa-esp32-none-elf`, `xtensa-esp32s2-none-elf`, `xtensa-esp32s3-none-elf`
2161 - [Add Tier 3 `std` Xtensa targets:](https://github.com/rust-lang/rust/pull/126380/) `xtensa-esp32-espidf`, `xtensa-esp32s2-espidf`, `xtensa-esp32s3-espidf`
2162 - [Add Tier 3 i686 Redox OS target:](https://github.com/rust-lang/rust/pull/126192/) `i686-unknown-redox`
2163 - [Promote `arm64ec-pc-windows-msvc` to Tier 2.](https://github.com/rust-lang/rust/pull/126039/)
2164 - [Promote `loongarch64-unknown-linux-musl` to Tier 2 with host tools.](https://github.com/rust-lang/rust/pull/126298/)
2165 - [Enable full tools and profiler for LoongArch Linux targets.](https://github.com/rust-lang/rust/pull/127078/)
2166 - [Unconditionally warn on usage of `wasm32-wasi`.](https://github.com/rust-lang/rust/pull/126662/) (see compatibility note below)
2167 - Refer to Rust's [platform support page][platform-support-doc] for more information on Rust's tiered platform support.
2168
2169<a id="1.81.0-Libraries"></a>
2170
2171Libraries
2172---------
2173
2174- [Split core's `PanicInfo` and std's `PanicInfo`.](https://github.com/rust-lang/rust/pull/115974/) (see compatibility note below)
2175- [Generalize `{Rc,Arc}::make_mut()` to unsized types.](https://github.com/rust-lang/rust/pull/116113/)
2176- [Replace sort implementations with stable `driftsort` and unstable `ipnsort`.](https://github.com/rust-lang/rust/pull/124032/) All `slice::sort*` and `slice::select_nth*` methods are expected to see significant performance improvements. See the [research project](https://github.com/Voultapher/sort-research-rs) for more details.
2177- [Document behavior of `create_dir_all` with respect to empty paths.](https://github.com/rust-lang/rust/pull/125112/)
2178- [Fix interleaved output in the default panic hook when multiple threads panic simultaneously.](https://github.com/rust-lang/rust/pull/127397/)
2179- Fix `Command`'s batch files argument escaping not working when file name has trailing whitespace or periods (CVE-2024-43402).
2180
2181<a id="1.81.0-Stabilized-APIs"></a>
2182
2183Stabilized APIs
2184---------------
2185
2186- [`core::error`](https://doc.rust-lang.org/stable/core/error/index.html)
2187- [`hint::assert_unchecked`](https://doc.rust-lang.org/stable/core/hint/fn.assert_unchecked.html)
2188- [`fs::exists`](https://doc.rust-lang.org/stable/std/fs/fn.exists.html)
2189- [`AtomicBool::fetch_not`](https://doc.rust-lang.org/stable/core/sync/atomic/struct.AtomicBool.html#method.fetch_not)
2190- [`Duration::abs_diff`](https://doc.rust-lang.org/stable/core/time/struct.Duration.html#method.abs_diff)
2191- [`IoSlice::advance`](https://doc.rust-lang.org/stable/std/io/struct.IoSlice.html#method.advance)
2192- [`IoSlice::advance_slices`](https://doc.rust-lang.org/stable/std/io/struct.IoSlice.html#method.advance_slices)
2193- [`IoSliceMut::advance`](https://doc.rust-lang.org/stable/std/io/struct.IoSliceMut.html#method.advance)
2194- [`IoSliceMut::advance_slices`](https://doc.rust-lang.org/stable/std/io/struct.IoSliceMut.html#method.advance_slices)
2195- [`PanicHookInfo`](https://doc.rust-lang.org/stable/std/panic/struct.PanicHookInfo.html)
2196- [`PanicInfo::message`](https://doc.rust-lang.org/stable/core/panic/struct.PanicInfo.html#method.message)
2197- [`PanicMessage`](https://doc.rust-lang.org/stable/core/panic/struct.PanicMessage.html)
2198
2199These APIs are now stable in const contexts:
2200
2201- [`char::from_u32_unchecked`](https://doc.rust-lang.org/stable/core/char/fn.from_u32_unchecked.html) (function)
2202- [`char::from_u32_unchecked`](https://doc.rust-lang.org/stable/core/primitive.char.html#method.from_u32_unchecked) (method)
2203- [`CStr::count_bytes`](https://doc.rust-lang.org/stable/core/ffi/c_str/struct.CStr.html#method.count_bytes)
2204- [`CStr::from_ptr`](https://doc.rust-lang.org/stable/core/ffi/c_str/struct.CStr.html#method.from_ptr)
2205
2206<a id="1.81.0-Cargo"></a>
2207
2208Cargo
2209-----
2210
2211- [Generated `.cargo_vcs_info.json` is always included, even when `--allow-dirty` is passed.](https://github.com/rust-lang/cargo/pull/13960/)
2212- [Disallow `package.license-file` and `package.readme` pointing to non-existent files during packaging.](https://github.com/rust-lang/cargo/pull/13921/)
2213- [Disallow passing `--release`/`--debug` flag along with the `--profile` flag.](https://github.com/rust-lang/cargo/pull/13971/)
2214- [Remove `lib.plugin` key support in `Cargo.toml`. Rust plugin support has been deprecated for four years and was removed in 1.75.0.](https://github.com/rust-lang/cargo/pull/13902/)
2215
2216<a id="1.81.0-Compatibility-Notes"></a>
2217
2218Compatibility Notes
2219-------------------
2220
2221* Usage of the `wasm32-wasi` target will now issue a compiler warning and request users switch to the `wasm32-wasip1` target instead. Both targets are the same, `wasm32-wasi` is only being renamed, and this [change to the WASI target](https://blog.rust-lang.org/2024/04/09/updates-to-rusts-wasi-targets.html) is being done to enable removing `wasm32-wasi` in January 2025.
2222
2223* We have renamed `std::panic::PanicInfo` to `std::panic::PanicHookInfo`. The old name will continue to work as an alias, but will result in a deprecation warning starting in Rust 1.82.0.
2224
2225 `core::panic::PanicInfo` will remain unchanged, however, as this is now a *different type*.
2226
2227 The reason is that these types have different roles: `std::panic::PanicHookInfo` is the argument to the [panic hook](https://doc.rust-lang.org/stable/std/panic/fn.set_hook.html) in std context (where panics can have an arbitrary payload), while `core::panic::PanicInfo` is the argument to the [`#[panic_handler]`](https://doc.rust-lang.org/nomicon/panic-handler.html) in no_std context (where panics always carry a formatted *message*). Separating these types allows us to add more useful methods to these types, such as `std::panic::PanicHookInfo::payload_as_str()` and `core::panic::PanicInfo::message()`.
2228
2229* The new sort implementations may panic if a type's implementation of [`Ord`](https://doc.rust-lang.org/std/cmp/trait.Ord.html) (or the given comparison function) does not implement a [total order](https://en.wikipedia.org/wiki/Total_order) as the trait requires. `Ord`'s supertraits (`PartialOrd`, `Eq`, and `PartialEq`) must also be consistent. The previous implementations would not "notice" any problem, but the new implementations have a good chance of detecting inconsistencies, throwing a panic rather than returning knowingly unsorted data.
2230* [In very rare cases, a change in the internal evaluation order of the trait
2231 solver may result in new fatal overflow errors.](https://github.com/rust-lang/rust/pull/126128)
2232
2233
2234<a id="1.81.0-Internal-Changes"></a>
2235
2236Internal Changes
2237----------------
2238
2239These changes do not affect any public interfaces of Rust, but they represent
2240significant improvements to the performance or internals of rustc and related
2241tools.
2242
2243- [Add a Rust-for-Linux `auto` CI job to check kernel builds.](https://github.com/rust-lang/rust/pull/125209/)
2244
2245Version 1.80.1 (2024-08-08)
2246===========================
2247
2248<a id="1.80.1"></a>
2249
2250- [Fix miscompilation in the jump threading MIR optimization when comparing floats](https://github.com/rust-lang/rust/pull/128271)
2251- [Revert changes to the `dead_code` lint from 1.80.0](https://github.com/rust-lang/rust/pull/128618)
2252
2253Version 1.80.0 (2024-07-25)
2254==========================
2255
2256<a id="1.80-Language"></a>
2257
2258Language
2259--------
2260- [Document maximum allocation size](https://github.com/rust-lang/rust/pull/116675/)
2261- [Allow zero-byte offsets and ZST read/writes on arbitrary pointers](https://github.com/rust-lang/rust/pull/117329/)
2262- [Support C23's variadics without a named parameter](https://github.com/rust-lang/rust/pull/124048/)
2263- [Stabilize `exclusive_range_pattern` feature](https://github.com/rust-lang/rust/pull/124459/)
2264- [Guarantee layout and ABI of `Result` in some scenarios](https://github.com/rust-lang/rust/pull/124870)
2265
2266<a id="1.80-Compiler"></a>
2267
2268Compiler
2269--------
2270- [Update cc crate to v1.0.97 allowing additional spectre mitigations on MSVC targets](https://github.com/rust-lang/rust/pull/124892/)
2271- [Allow field reordering on types marked `repr(packed(1))`](https://github.com/rust-lang/rust/pull/125360/)
2272- [Add a lint against never type fallback affecting unsafe code](https://github.com/rust-lang/rust/pull/123939/)
2273- [Disallow cast with trailing braced macro in let-else](https://github.com/rust-lang/rust/pull/125049/)
2274- [Expand `for_loops_over_fallibles` lint to lint on fallibles behind references.](https://github.com/rust-lang/rust/pull/125156/)
2275- [self-contained linker: retry linking without `-fuse-ld=lld` on CCs that don't support it](https://github.com/rust-lang/rust/pull/125417/)
2276- [Do not parse CVarArgs (`...`) as a type in trait bounds](https://github.com/rust-lang/rust/pull/125863/)
2277- Improvements to LLDB formatting [#124458](https://github.com/rust-lang/rust/pull/124458) [#124500](https://github.com/rust-lang/rust/pull/124500)
2278- [For the wasm32-wasip2 target default to PIC and do not use `-fuse-ld=lld`](https://github.com/rust-lang/rust/pull/124858/)
2279- [Add x86_64-unknown-linux-none as a tier 3 target](https://github.com/rust-lang/rust/pull/125023/)
2280- [Lint on `foo.into_iter()` resolving to `&Box<[T]>: IntoIterator`](https://github.com/rust-lang/rust/pull/124097/)
2281
2282<a id="1.80-Libraries"></a>
2283
2284Libraries
2285---------
2286- [Add `size_of` and `size_of_val` and `align_of` and `align_of_val` to the prelude](https://github.com/rust-lang/rust/pull/123168/)
2287- [Abort a process when FD ownership is violated](https://github.com/rust-lang/rust/pull/124210/)
2288- [io::Write::write_fmt: panic if the formatter fails when the stream does not fail](https://github.com/rust-lang/rust/pull/125012/)
2289- [Panic if `PathBuf::set_extension` would add a path separator](https://github.com/rust-lang/rust/pull/125070/)
2290- [Add assert_unsafe_precondition to unchecked_{add,sub,neg,mul,shl,shr} methods](https://github.com/rust-lang/rust/pull/121571/)
2291- [Update `c_char` on AIX to use the correct type](https://github.com/rust-lang/rust/pull/122986/)
2292- [`offset_of!` no longer returns a temporary](https://github.com/rust-lang/rust/pull/124484/)
2293- [Handle sigma in `str.to_lowercase` correctly](https://github.com/rust-lang/rust/pull/124773/)
2294- [Raise `DEFAULT_MIN_STACK_SIZE` to at least 64KiB](https://github.com/rust-lang/rust/pull/126059/)
2295
2296<a id="1.80-Stabilized-APIs"></a>
2297
2298Stabilized APIs
2299---------------
2300- [`impl Default for Rc<CStr>`](https://doc.rust-lang.org/beta/alloc/rc/struct.Rc.html#impl-Default-for-Rc%3CCStr%3E)
2301- [`impl Default for Rc<str>`](https://doc.rust-lang.org/beta/alloc/rc/struct.Rc.html#impl-Default-for-Rc%3Cstr%3E)
2302- [`impl Default for Rc<[T]>`](https://doc.rust-lang.org/beta/alloc/rc/struct.Rc.html#impl-Default-for-Rc%3C%5BT%5D%3E)
2303- [`impl Default for Arc<str>`](https://doc.rust-lang.org/beta/alloc/sync/struct.Arc.html#impl-Default-for-Arc%3Cstr%3E)
2304- [`impl Default for Arc<CStr>`](https://doc.rust-lang.org/beta/alloc/sync/struct.Arc.html#impl-Default-for-Arc%3CCStr%3E)
2305- [`impl Default for Arc<[T]>`](https://doc.rust-lang.org/beta/alloc/sync/struct.Arc.html#impl-Default-for-Arc%3C%5BT%5D%3E)
2306- [`impl IntoIterator for Box<[T]>`](https://doc.rust-lang.org/beta/alloc/boxed/struct.Box.html#impl-IntoIterator-for-Box%3C%5BI%5D,+A%3E)
2307- [`impl FromIterator<String> for Box<str>`](https://doc.rust-lang.org/beta/alloc/boxed/struct.Box.html#impl-FromIterator%3CString%3E-for-Box%3Cstr%3E)
2308- [`impl FromIterator<char> for Box<str>`](https://doc.rust-lang.org/beta/alloc/boxed/struct.Box.html#impl-FromIterator%3Cchar%3E-for-Box%3Cstr%3E)
2309- [`LazyCell`](https://doc.rust-lang.org/beta/core/cell/struct.LazyCell.html)
2310- [`LazyLock`](https://doc.rust-lang.org/beta/std/sync/struct.LazyLock.html)
2311- [`Duration::div_duration_f32`](https://doc.rust-lang.org/beta/std/time/struct.Duration.html#method.div_duration_f32)
2312- [`Duration::div_duration_f64`](https://doc.rust-lang.org/beta/std/time/struct.Duration.html#method.div_duration_f64)
2313- [`Option::take_if`](https://doc.rust-lang.org/beta/std/option/enum.Option.html#method.take_if)
2314- [`Seek::seek_relative`](https://doc.rust-lang.org/beta/std/io/trait.Seek.html#method.seek_relative)
2315- [`BinaryHeap::as_slice`](https://doc.rust-lang.org/beta/std/collections/struct.BinaryHeap.html#method.as_slice)
2316- [`NonNull::offset`](https://doc.rust-lang.org/beta/std/ptr/struct.NonNull.html#method.offset)
2317- [`NonNull::byte_offset`](https://doc.rust-lang.org/beta/std/ptr/struct.NonNull.html#method.byte_offset)
2318- [`NonNull::add`](https://doc.rust-lang.org/beta/std/ptr/struct.NonNull.html#method.add)
2319- [`NonNull::byte_add`](https://doc.rust-lang.org/beta/std/ptr/struct.NonNull.html#method.byte_add)
2320- [`NonNull::sub`](https://doc.rust-lang.org/beta/std/ptr/struct.NonNull.html#method.sub)
2321- [`NonNull::byte_sub`](https://doc.rust-lang.org/beta/std/ptr/struct.NonNull.html#method.byte_sub)
2322- [`NonNull::offset_from`](https://doc.rust-lang.org/beta/std/ptr/struct.NonNull.html#method.offset_from)
2323- [`NonNull::byte_offset_from`](https://doc.rust-lang.org/beta/std/ptr/struct.NonNull.html#method.byte_offset_from)
2324- [`NonNull::read`](https://doc.rust-lang.org/beta/std/ptr/struct.NonNull.html#method.read)
2325- [`NonNull::read_volatile`](https://doc.rust-lang.org/beta/std/ptr/struct.NonNull.html#method.read_volatile)
2326- [`NonNull::read_unaligned`](https://doc.rust-lang.org/beta/std/ptr/struct.NonNull.html#method.read_unaligned)
2327- [`NonNull::write`](https://doc.rust-lang.org/beta/std/ptr/struct.NonNull.html#method.write)
2328- [`NonNull::write_volatile`](https://doc.rust-lang.org/beta/std/ptr/struct.NonNull.html#method.write_volatile)
2329- [`NonNull::write_unaligned`](https://doc.rust-lang.org/beta/std/ptr/struct.NonNull.html#method.write_unaligned)
2330- [`NonNull::write_bytes`](https://doc.rust-lang.org/beta/std/ptr/struct.NonNull.html#method.write_bytes)
2331- [`NonNull::copy_to`](https://doc.rust-lang.org/beta/std/ptr/struct.NonNull.html#method.copy_to)
2332- [`NonNull::copy_to_nonoverlapping`](https://doc.rust-lang.org/beta/std/ptr/struct.NonNull.html#method.copy_to_nonoverlapping)
2333- [`NonNull::copy_from`](https://doc.rust-lang.org/beta/std/ptr/struct.NonNull.html#method.copy_from)
2334- [`NonNull::copy_from_nonoverlapping`](https://doc.rust-lang.org/beta/std/ptr/struct.NonNull.html#method.copy_from_nonoverlapping)
2335- [`NonNull::replace`](https://doc.rust-lang.org/beta/std/ptr/struct.NonNull.html#method.replace)
2336- [`NonNull::swap`](https://doc.rust-lang.org/beta/std/ptr/struct.NonNull.html#method.swap)
2337- [`NonNull::drop_in_place`](https://doc.rust-lang.org/beta/std/ptr/struct.NonNull.html#method.drop_in_place)
2338- [`NonNull::align_offset`](https://doc.rust-lang.org/beta/std/ptr/struct.NonNull.html#method.align_offset)
2339- [`<[T]>::split_at_checked`](https://doc.rust-lang.org/beta/std/primitive.slice.html#method.split_at_checked)
2340- [`<[T]>::split_at_mut_checked`](https://doc.rust-lang.org/beta/std/primitive.slice.html#method.split_at_mut_checked)
2341- [`str::split_at_checked`](https://doc.rust-lang.org/beta/std/primitive.str.html#method.split_at_checked)
2342- [`str::split_at_mut_checked`](https://doc.rust-lang.org/beta/std/primitive.str.html#method.split_at_mut_checked)
2343- [`str::trim_ascii`](https://doc.rust-lang.org/beta/std/primitive.str.html#method.trim_ascii)
2344- [`str::trim_ascii_start`](https://doc.rust-lang.org/beta/std/primitive.str.html#method.trim_ascii_start)
2345- [`str::trim_ascii_end`](https://doc.rust-lang.org/beta/std/primitive.str.html#method.trim_ascii_end)
2346- [`<[u8]>::trim_ascii`](https://doc.rust-lang.org/beta/core/primitive.slice.html#method.trim_ascii)
2347- [`<[u8]>::trim_ascii_start`](https://doc.rust-lang.org/beta/core/primitive.slice.html#method.trim_ascii_start)
2348- [`<[u8]>::trim_ascii_end`](https://doc.rust-lang.org/beta/core/primitive.slice.html#method.trim_ascii_end)
2349- [`Ipv4Addr::BITS`](https://doc.rust-lang.org/beta/core/net/struct.Ipv4Addr.html#associatedconstant.BITS)
2350- [`Ipv4Addr::to_bits`](https://doc.rust-lang.org/beta/core/net/struct.Ipv4Addr.html#method.to_bits)
2351- [`Ipv4Addr::from_bits`](https://doc.rust-lang.org/beta/core/net/struct.Ipv4Addr.html#method.from_bits)
2352- [`Ipv6Addr::BITS`](https://doc.rust-lang.org/beta/core/net/struct.Ipv6Addr.html#associatedconstant.BITS)
2353- [`Ipv6Addr::to_bits`](https://doc.rust-lang.org/beta/core/net/struct.Ipv6Addr.html#method.to_bits)
2354- [`Ipv6Addr::from_bits`](https://doc.rust-lang.org/beta/core/net/struct.Ipv6Addr.html#method.from_bits)
2355- [`Vec::<[T; N]>::into_flattened`](https://doc.rust-lang.org/beta/alloc/vec/struct.Vec.html#method.into_flattened)
2356- [`<[[T; N]]>::as_flattened`](https://doc.rust-lang.org/beta/core/primitive.slice.html#method.as_flattened)
2357- [`<[[T; N]]>::as_flattened_mut`](https://doc.rust-lang.org/beta/core/primitive.slice.html#method.as_flattened_mut)
2358
2359These APIs are now stable in const contexts:
2360
2361- [`<[T]>::last_chunk`](https://doc.rust-lang.org/beta/core/primitive.slice.html#method.last_chunk)
2362- [`BinaryHeap::new`](https://doc.rust-lang.org/beta/std/collections/struct.BinaryHeap.html#method.new)
2363
2364<a id="1.80-Cargo"></a>
2365
2366Cargo
2367-----
2368- [Stabilize `-Zcheck-cfg` as always enabled](https://github.com/rust-lang/cargo/pull/13571/)
2369- [Warn, rather than fail publish, if a target is excluded](https://github.com/rust-lang/cargo/pull/13713/)
2370- [Add special `check-cfg` lint config for the `unexpected_cfgs` lint](https://github.com/rust-lang/cargo/pull/13913/)
2371- [Stabilize `cargo update --precise <yanked>`](https://github.com/rust-lang/cargo/pull/13974/)
2372- [Don't change file permissions on `Cargo.toml` when using `cargo add`](https://github.com/rust-lang/cargo/pull/13898/)
2373- [Support using `cargo fix` on IPv6-only networks](https://github.com/rust-lang/cargo/pull/13907/)
2374
2375<a id="1.80-Rustdoc"></a>
2376
2377Rustdoc
2378-----
2379
2380- [Allow searching for references](https://github.com/rust-lang/rust/pull/124148/)
2381- [Stabilize `custom_code_classes_in_docs` feature](https://github.com/rust-lang/rust/pull/124577/)
2382- [fix: In cross-crate scenarios show enum variants on type aliases of enums](https://github.com/rust-lang/rust/pull/125300/)
2383
2384<a id="1.80-Compatibility-Notes"></a>
2385
2386Compatibility Notes
2387-------------------
2388- [rustfmt estimates line lengths differently when using non-ascii characters](https://github.com/rust-lang/rustfmt/issues/6203)
2389- [Type aliases are now handled correctly in orphan check](https://github.com/rust-lang/rust/pull/117164/)
2390- [Allow instructing rustdoc to read from stdin via `-`](https://github.com/rust-lang/rust/pull/124611/)
2391- [`std::env::{set_var, remove_var}` can no longer be converted to safe function pointers and no longer implement the `Fn` family of traits](https://github.com/rust-lang/rust/pull/124636)
2392- [Warn (or error) when `Self` constructor from outer item is referenced in inner nested item](https://github.com/rust-lang/rust/pull/124187/)
2393- [Turn `indirect_structural_match` and `pointer_structural_match` lints into hard errors](https://github.com/rust-lang/rust/pull/124661/)
2394- [Make `where_clause_object_safety` lint a regular object safety violation](https://github.com/rust-lang/rust/pull/125380/)
2395- [Turn `proc_macro_back_compat` lint into a hard error.](https://github.com/rust-lang/rust/pull/125596/)
2396- [Detect unused structs even when implementing private traits](https://github.com/rust-lang/rust/pull/122382/)
2397- [`std::sync::ReentrantLockGuard<T>` is no longer `Sync` if `T: !Sync`](https://github.com/rust-lang/rust/pull/125527) which means [`std::io::StdoutLock` and `std::io::StderrLock` are no longer Sync](https://github.com/rust-lang/rust/issues/127340)
2398- [Type inference will fail in some cases due to new implementations of `FromIterator for Box<str>`.](https://github.com/rust-lang/rust/pull/99969/)
2399 Notably, this breaks versions of the `time` crate before 0.3.35, due to no longer inferring the implementation for `Box<[_]>`.
2400
2401<a id="1.80-Internal-Changes"></a>
2402
2403Internal Changes
2404----------------
2405
2406These changes do not affect any public interfaces of Rust, but they represent
2407significant improvements to the performance or internals of rustc and related
2408tools.
2409
2410- Misc improvements to size of generated html by rustdoc e.g. [#124738](https://github.com/rust-lang/rust/pull/124738/) and [#123734](https://github.com/rust-lang/rust/pull/123734/)
2411- [MSVC targets no longer depend on libc](https://github.com/rust-lang/rust/pull/124050/)
2412
2413Version 1.79.0 (2024-06-13)
2414==========================
2415
2416<a id="1.79.0-Language"></a>
2417
2418Language
2419--------
2420- [Stabilize inline `const {}` expressions.](https://github.com/rust-lang/rust/pull/104087/)
2421- [Prevent opaque types being instantiated twice with different regions within the same function.](https://github.com/rust-lang/rust/pull/116935/)
2422- [Stabilize WebAssembly target features that are in phase 4 and 5.](https://github.com/rust-lang/rust/pull/117457/)
2423- [Add the `redundant_lifetimes` lint to detect lifetimes which are semantically redundant.](https://github.com/rust-lang/rust/pull/118391/)
2424- [Stabilize the `unnameable_types` lint for public types that can't be named.](https://github.com/rust-lang/rust/pull/120144/)
2425- [Enable debuginfo in macros, and stabilize `-C collapse-macro-debuginfo` and `#[collapse_debuginfo]`.](https://github.com/rust-lang/rust/pull/120845/)
2426- [Propagate temporary lifetime extension into `if` and `match` expressions.](https://github.com/rust-lang/rust/pull/121346/)
2427- [Restrict promotion of `const fn` calls.](https://github.com/rust-lang/rust/pull/121557/)
2428- [Warn against refining impls of crate-private traits with `refining_impl_trait` lint.](https://github.com/rust-lang/rust/pull/121720/)
2429- [Stabilize associated type bounds (RFC 2289).](https://github.com/rust-lang/rust/pull/122055/)
2430- [Stabilize importing `main` from other modules or crates.](https://github.com/rust-lang/rust/pull/122060/)
2431- [Check return types of function types for well-formedness](https://github.com/rust-lang/rust/pull/115538)
2432- [Rework `impl Trait` lifetime inference](https://github.com/rust-lang/rust/pull/116891/)
2433- [Change inductive trait solver cycles to be ambiguous](https://github.com/rust-lang/rust/pull/122791)
2434
2435<a id="1.79.0-Compiler"></a>
2436
2437Compiler
2438--------
2439- [Define `-C strip` to only affect binaries, not artifacts like `.pdb`.](https://github.com/rust-lang/rust/pull/115120/)
2440- [Stabilize `-Crelro-level` for controlling runtime link hardening.](https://github.com/rust-lang/rust/pull/121694/)
2441- [Stabilize checking of `cfg` names and values at compile-time with `--check-cfg`.](https://github.com/rust-lang/rust/pull/123501/)
2442 *Note that this only stabilizes the compiler part, the Cargo part is still unstable in this release.*
2443- [Add `aarch64-apple-visionos` and `aarch64-apple-visionos-sim` tier 3 targets.](https://github.com/rust-lang/rust/pull/121419/)
2444- [Add `riscv32ima-unknown-none-elf` tier 3 target.](https://github.com/rust-lang/rust/pull/122696/)
2445- [Promote several Windows targets to tier 2](https://github.com/rust-lang/rust/pull/121712): `aarch64-pc-windows-gnullvm`, `i686-pc-windows-gnullvm`, and `x86_64-pc-windows-gnullvm`.
2446
2447Refer to Rust's [platform support page][platform-support-doc]
2448for more information on Rust's tiered platform support.
2449
2450<a id="1.79.0-Libraries"></a>
2451
2452Libraries
2453---------
2454
2455- [Implement `FromIterator` for `(impl Default + Extend, impl Default + Extend)`.](https://github.com/rust-lang/rust/pull/107462/)
2456- [Implement `{Div,Rem}Assign<NonZero<X>>` on `X`.](https://github.com/rust-lang/rust/pull/121952/)
2457- [Document overrides of `clone_from()` in core/std.](https://github.com/rust-lang/rust/pull/122201/)
2458- [Link MSVC default lib in core.](https://github.com/rust-lang/rust/pull/122268/)
2459- [Caution against using `transmute` between pointers and integers.](https://github.com/rust-lang/rust/pull/122379/)
2460- [Enable frame pointers for the standard library.](https://github.com/rust-lang/rust/pull/122646/)
2461
2462<a id="1.79.0-Stabilized-APIs"></a>
2463
2464Stabilized APIs
2465---------------
2466
2467- [`{integer}::unchecked_add`](https://doc.rust-lang.org/stable/core/primitive.i32.html#method.unchecked_add)
2468- [`{integer}::unchecked_mul`](https://doc.rust-lang.org/stable/core/primitive.i32.html#method.unchecked_mul)
2469- [`{integer}::unchecked_sub`](https://doc.rust-lang.org/stable/core/primitive.i32.html#method.unchecked_sub)
2470- [`<[T]>::split_at_unchecked`](https://doc.rust-lang.org/stable/core/primitive.slice.html#method.split_at_unchecked)
2471- [`<[T]>::split_at_mut_unchecked`](https://doc.rust-lang.org/stable/core/primitive.slice.html#method.split_at_mut_unchecked)
2472- [`<[u8]>::utf8_chunks`](https://doc.rust-lang.org/stable/core/primitive.slice.html#method.utf8_chunks)
2473- [`str::Utf8Chunks`](https://doc.rust-lang.org/stable/core/str/struct.Utf8Chunks.html)
2474- [`str::Utf8Chunk`](https://doc.rust-lang.org/stable/core/str/struct.Utf8Chunk.html)
2475- [`<*const T>::is_aligned`](https://doc.rust-lang.org/stable/core/primitive.pointer.html#method.is_aligned)
2476- [`<*mut T>::is_aligned`](https://doc.rust-lang.org/stable/core/primitive.pointer.html#method.is_aligned-1)
2477- [`NonNull::is_aligned`](https://doc.rust-lang.org/stable/core/ptr/struct.NonNull.html#method.is_aligned)
2478- [`<*const [T]>::len`](https://doc.rust-lang.org/stable/core/primitive.pointer.html#method.len)
2479- [`<*mut [T]>::len`](https://doc.rust-lang.org/stable/core/primitive.pointer.html#method.len-1)
2480- [`<*const [T]>::is_empty`](https://doc.rust-lang.org/stable/core/primitive.pointer.html#method.is_empty)
2481- [`<*mut [T]>::is_empty`](https://doc.rust-lang.org/stable/core/primitive.pointer.html#method.is_empty-1)
2482- [`NonNull::<[T]>::is_empty`](https://doc.rust-lang.org/stable/core/ptr/struct.NonNull.html#method.is_empty)
2483- [`CStr::count_bytes`](https://doc.rust-lang.org/stable/core/ffi/c_str/struct.CStr.html#method.count_bytes)
2484- [`io::Error::downcast`](https://doc.rust-lang.org/stable/std/io/struct.Error.html#method.downcast)
2485- [`num::NonZero<T>`](https://doc.rust-lang.org/stable/core/num/struct.NonZero.html)
2486- [`path::absolute`](https://doc.rust-lang.org/stable/std/path/fn.absolute.html)
2487- [`proc_macro::Literal::byte_character`](https://doc.rust-lang.org/stable/proc_macro/struct.Literal.html#method.byte_character)
2488- [`proc_macro::Literal::c_string`](https://doc.rust-lang.org/stable/proc_macro/struct.Literal.html#method.c_string)
2489
2490These APIs are now stable in const contexts:
2491
2492- [`Atomic*::into_inner`](https://doc.rust-lang.org/stable/core/sync/atomic/struct.AtomicUsize.html#method.into_inner)
2493- [`io::Cursor::new`](https://doc.rust-lang.org/stable/std/io/struct.Cursor.html#method.new)
2494- [`io::Cursor::get_ref`](https://doc.rust-lang.org/stable/std/io/struct.Cursor.html#method.get_ref)
2495- [`io::Cursor::position`](https://doc.rust-lang.org/stable/std/io/struct.Cursor.html#method.position)
2496- [`io::empty`](https://doc.rust-lang.org/stable/std/io/fn.empty.html)
2497- [`io::repeat`](https://doc.rust-lang.org/stable/std/io/fn.repeat.html)
2498- [`io::sink`](https://doc.rust-lang.org/stable/std/io/fn.sink.html)
2499- [`panic::Location::caller`](https://doc.rust-lang.org/stable/std/panic/struct.Location.html#method.caller)
2500- [`panic::Location::file`](https://doc.rust-lang.org/stable/std/panic/struct.Location.html#method.file)
2501- [`panic::Location::line`](https://doc.rust-lang.org/stable/std/panic/struct.Location.html#method.line)
2502- [`panic::Location::column`](https://doc.rust-lang.org/stable/std/panic/struct.Location.html#method.column)
2503
2504<a id="1.79.0-Cargo"></a>
2505
2506Cargo
2507-----
2508
2509- [Prevent dashes in `lib.name`, always normalizing to `_`.](https://github.com/rust-lang/cargo/pull/12783/)
2510- [Stabilize MSRV-aware version requirement selection in `cargo add`.](https://github.com/rust-lang/cargo/pull/13608/)
2511- [Switch to using `gitoxide` by default for listing files.](https://github.com/rust-lang/cargo/pull/13696/)
2512
2513<a id="1.79.0-Rustdoc"></a>
2514
2515Rustdoc
2516-----
2517
2518- [Always display stability version even if it's the same as the containing item.](https://github.com/rust-lang/rust/pull/118441/)
2519- [Show a single search result for items with multiple paths.](https://github.com/rust-lang/rust/pull/119912/)
2520- [Support typing `/` in docs to begin a search.](https://github.com/rust-lang/rust/pull/123355/)
2521
2522<a id="1.79.0-Misc"></a>
2523
2524Misc
2525----
2526
2527<a id="1.79.0-Compatibility-Notes"></a>
2528
2529Compatibility Notes
2530-------------------
2531
2532- [Update the minimum external LLVM to 17.](https://github.com/rust-lang/rust/pull/122649/)
2533- [`RustcEncodable` and `RustcDecodable` are soft-destabilized, to be removed
2534 from the prelude in next edition.](https://github.com/rust-lang/rust/pull/116016/)
2535- [The `wasm_c_abi` future-incompatibility lint will warn about use of the
2536 non-spec-compliant C ABI.](https://github.com/rust-lang/rust/pull/117918/)
2537 Use `wasm-bindgen v0.2.88` to generate forward-compatible bindings.
2538- [Check return types of function types for well-formedness](https://github.com/rust-lang/rust/pull/115538)
2539
2540Version 1.78.0 (2024-05-02)
2541==========================
2542
2543<a id="1.78.0-Language"></a>
2544
2545Language
2546--------
2547- [Stabilize `#[cfg(target_abi = ...)]`](https://github.com/rust-lang/rust/pull/119590/)
2548- [Stabilize the `#[diagnostic]` namespace and `#[diagnostic::on_unimplemented]` attribute](https://github.com/rust-lang/rust/pull/119888/)
2549- [Make async-fn-in-trait implementable with concrete signatures](https://github.com/rust-lang/rust/pull/120103/)
2550- [Make matching on NaN a hard error, and remove the rest of `illegal_floating_point_literal_pattern`](https://github.com/rust-lang/rust/pull/116284/)
2551- [static mut: allow mutable reference to arbitrary types, not just slices and arrays](https://github.com/rust-lang/rust/pull/117614/)
2552- [Extend `invalid_reference_casting` to include references casting to bigger memory layout](https://github.com/rust-lang/rust/pull/118983/)
2553- [Add `non_contiguous_range_endpoints` lint for singleton gaps after exclusive ranges](https://github.com/rust-lang/rust/pull/118879/)
2554- [Add `wasm_c_abi` lint for use of older wasm-bindgen versions](https://github.com/rust-lang/rust/pull/117918/)
2555 This lint currently only works when using Cargo.
2556- [Update `indirect_structural_match` and `pointer_structural_match` lints to match RFC](https://github.com/rust-lang/rust/pull/120423/)
2557- [Make non-`PartialEq`-typed consts as patterns a hard error](https://github.com/rust-lang/rust/pull/120805/)
2558- [Split `refining_impl_trait` lint into `_reachable`, `_internal` variants](https://github.com/rust-lang/rust/pull/121720/)
2559- [Remove unnecessary type inference when using associated types inside of higher ranked `where`-bounds](https://github.com/rust-lang/rust/pull/119849)
2560- [Weaken eager detection of cyclic types during type inference](https://github.com/rust-lang/rust/pull/119989)
2561- [`trait Trait: Auto {}`: allow upcasting from `dyn Trait` to `dyn Trait + Auto`](https://github.com/rust-lang/rust/pull/119338)
2562
2563<a id="1.78.0-Compiler"></a>
2564
2565Compiler
2566--------
2567
2568- [Made `INVALID_DOC_ATTRIBUTES` lint deny by default](https://github.com/rust-lang/rust/pull/111505/)
2569- [Increase accuracy of redundant `use` checking](https://github.com/rust-lang/rust/pull/117772/)
2570- [Suggest moving definition if non-found macro_rules! is defined later](https://github.com/rust-lang/rust/pull/121130/)
2571- [Lower transmutes from int to pointer type as gep on null](https://github.com/rust-lang/rust/pull/121282/)
2572
2573Target changes:
2574
2575- [Windows tier 1 targets now require at least Windows 10](https://github.com/rust-lang/rust/pull/115141/)
2576 - [Enable CMPXCHG16B, SSE3, SAHF/LAHF and 128-bit Atomics in tier 1 Windows](https://github.com/rust-lang/rust/pull/120820/)
2577- [Add `wasm32-wasip1` tier 2 (without host tools) target](https://github.com/rust-lang/rust/pull/120468/)
2578- [Add `wasm32-wasip2` tier 3 target](https://github.com/rust-lang/rust/pull/119616/)
2579- [Rename `wasm32-wasi-preview1-threads` to `wasm32-wasip1-threads`](https://github.com/rust-lang/rust/pull/122170/)
2580- [Add `arm64ec-pc-windows-msvc` tier 3 target](https://github.com/rust-lang/rust/pull/119199/)
2581- [Add `armv8r-none-eabihf` tier 3 target for the Cortex-R52](https://github.com/rust-lang/rust/pull/110482/)
2582- [Add `loongarch64-unknown-linux-musl` tier 3 target](https://github.com/rust-lang/rust/pull/121832/)
2583
2584Refer to Rust's [platform support page][platform-support-doc]
2585for more information on Rust's tiered platform support.
2586
2587<a id="1.78.0-Libraries"></a>
2588
2589Libraries
2590---------
2591
2592- [Bump Unicode to version 15.1.0, regenerate tables](https://github.com/rust-lang/rust/pull/120777/)
2593- [Make align_offset, align_to well-behaved in all cases](https://github.com/rust-lang/rust/pull/121201/)
2594- [PartialEq, PartialOrd: document expectations for transitive chains](https://github.com/rust-lang/rust/pull/115386/)
2595- [Optimize away poison guards when std is built with panic=abort](https://github.com/rust-lang/rust/pull/100603/)
2596- [Replace pthread `RwLock` with custom implementation](https://github.com/rust-lang/rust/pull/110211/)
2597- [Implement unwind safety for Condvar on all platforms](https://github.com/rust-lang/rust/pull/121768/)
2598- [Add ASCII fast-path for `char::is_grapheme_extended`](https://github.com/rust-lang/rust/pull/121138/)
2599
2600<a id="1.78.0-Stabilized-APIs"></a>
2601
2602Stabilized APIs
2603---------------
2604
2605- [`impl Read for &Stdin`](https://doc.rust-lang.org/stable/std/io/struct.Stdin.html#impl-Read-for-%26Stdin)
2606- [Accept non `'static` lifetimes for several `std::error::Error` related implementations](https://github.com/rust-lang/rust/pull/113833/)
2607- [Make `impl<Fd: AsFd>` impl take `?Sized`](https://github.com/rust-lang/rust/pull/114655/)
2608- [`impl From<TryReserveError> for io::Error`](https://doc.rust-lang.org/stable/std/io/struct.Error.html#impl-From%3CTryReserveError%3E-for-Error)
2609
2610These APIs are now stable in const contexts:
2611
2612- [`Barrier::new()`](https://doc.rust-lang.org/stable/std/sync/struct.Barrier.html#method.new)
2613
2614<a id="1.78.0-Cargo"></a>
2615
2616Cargo
2617-----
2618
2619- [Stabilize lockfile v4](https://github.com/rust-lang/cargo/pull/12852/)
2620- [Respect `rust-version` when generating lockfile](https://github.com/rust-lang/cargo/pull/12861/)
2621- [Control `--charset` via auto-detecting config value](https://github.com/rust-lang/cargo/pull/13337/)
2622- [Support `target.<triple>.rustdocflags` officially](https://github.com/rust-lang/cargo/pull/13197/)
2623- [Stabilize global cache data tracking](https://github.com/rust-lang/cargo/pull/13492/)
2624
2625<a id="1.78.0-Compatibility-Notes"></a>
2626
2627Compatibility Notes
2628-------------------
2629
2630- [Many unsafe precondition checks now run for user code with debug assertions enabled](https://github.com/rust-lang/rust/pull/120594/)
2631 This change helps users catch undefined behavior in their code, though the details of how much is checked are generally not stable.
2632- [riscv only supports split_debuginfo=off for now](https://github.com/rust-lang/rust/pull/120518/)
2633- [Consistently check bounds on hidden types of `impl Trait`](https://github.com/rust-lang/rust/pull/121679)
2634- [Change equality of higher ranked types to not rely on subtyping](https://github.com/rust-lang/rust/pull/118247)
2635- [When called, additionally check bounds on normalized function return type](https://github.com/rust-lang/rust/pull/118882)
2636- [Expand coverage for `arithmetic_overflow` lint](https://github.com/rust-lang/rust/pull/119432/)
2637- [Fix detection of potential interior mutability in `const` initializers](https://github.com/rust-lang/rust/issues/121250)
2638 This code was accidentally accepted. The fix can break generic code that borrows a value of unknown type,
2639 as there is currently no way to declare "this type has no interior mutability". In the future, stabilizing
2640 the [`Freeze` trait](https://github.com/rust-lang/rust/issues/121675) will allow proper support for such code.
2641
2642<a id="1.78.0-Internal-Changes"></a>
2643
2644Internal Changes
2645----------------
2646
2647These changes do not affect any public interfaces of Rust, but they represent
2648significant improvements to the performance or internals of rustc and related
2649tools.
2650
2651- [Update to LLVM 18](https://github.com/rust-lang/rust/pull/120055/)
2652- [Build `rustc` with 1CGU on `x86_64-pc-windows-msvc`](https://github.com/rust-lang/rust/pull/112267/)
2653- [Build `rustc` with 1CGU on `x86_64-apple-darwin`](https://github.com/rust-lang/rust/pull/112268/)
2654- [Introduce `run-make` V2 infrastructure, a `run_make_support` library and port over 2 tests as example](https://github.com/rust-lang/rust/pull/113026/)
2655- [Windows: Implement condvar, mutex and rwlock using futex](https://github.com/rust-lang/rust/pull/121956/)
2656
2657Version 1.77.2 (2024-04-09)
2658===========================
2659
2660<a id="1.77.2"></a>
2661
2662- [CVE-2024-24576: fix escaping of Windows batch file arguments in `std::process::Command`](https://blog.rust-lang.org/2024/04/09/cve-2024-24576.html)
2663
2664Version 1.77.1 (2024-03-28)
2665===========================
2666
2667<a id="1.77.1"></a>
2668
2669- [Revert stripping debuginfo by default for Windows](https://github.com/rust-lang/cargo/pull/13654)
2670 This fixes a regression in 1.77 by reverting to the previous default.
2671 Platforms other than Windows are not affected.
2672- Internal: [Fix heading anchor rendering in doc pages](https://github.com/rust-lang/rust/pull/122693)
2673
2674Version 1.77.0 (2024-03-21)
2675==========================
2676
2677<a id="1.77.0-Language"></a>
2678
2679Language
2680--------
2681
2682- [Reveal opaque types within the defining body for exhaustiveness checking.](https://github.com/rust-lang/rust/pull/116821/)
2683- [Stabilize C-string literals.](https://github.com/rust-lang/rust/pull/117472/)
2684- [Stabilize THIR unsafeck.](https://github.com/rust-lang/rust/pull/117673/)
2685- [Add lint `static_mut_refs` to warn on references to mutable statics.](https://github.com/rust-lang/rust/pull/117556/)
2686- [Support async recursive calls (as long as they have indirection).](https://github.com/rust-lang/rust/pull/117703/)
2687- [Undeprecate lint `unstable_features` and make use of it in the compiler.](https://github.com/rust-lang/rust/pull/118639/)
2688- [Make inductive cycles in coherence ambiguous always.](https://github.com/rust-lang/rust/pull/118649/)
2689- [Get rid of type-driven traversal in const-eval interning](https://github.com/rust-lang/rust/pull/119044/),
2690 only as a [future compatibility lint](https://github.com/rust-lang/rust/pull/122204) for now.
2691- [Deny braced macro invocations in let-else.](https://github.com/rust-lang/rust/pull/119062/)
2692
2693<a id="1.77.0-Compiler"></a>
2694
2695Compiler
2696--------
2697
2698- [Include lint `soft_unstable` in future breakage reports.](https://github.com/rust-lang/rust/pull/116274/)
2699- [Make `i128` and `u128` 16-byte aligned on x86-based targets.](https://github.com/rust-lang/rust/pull/116672/)
2700- [Use `--verbose` in diagnostic output.](https://github.com/rust-lang/rust/pull/119129/)
2701- [Improve spacing between printed tokens.](https://github.com/rust-lang/rust/pull/120227/)
2702- [Merge the `unused_tuple_struct_fields` lint into `dead_code`.](https://github.com/rust-lang/rust/pull/118297/)
2703- [Error on incorrect implied bounds in well-formedness check](https://github.com/rust-lang/rust/pull/118553/),
2704 with a temporary exception for Bevy.
2705- [Fix coverage instrumentation/reports for non-ASCII source code.](https://github.com/rust-lang/rust/pull/119033/)
2706- [Fix `fn`/`const` items implied bounds and well-formedness check.](https://github.com/rust-lang/rust/pull/120019/)
2707- [Promote `riscv32{im|imafc}-unknown-none-elf` targets to tier 2.](https://github.com/rust-lang/rust/pull/118704/)
2708- Add several new tier 3 targets:
2709 - [`aarch64-unknown-illumos`](https://github.com/rust-lang/rust/pull/112936/)
2710 - [`hexagon-unknown-none-elf`](https://github.com/rust-lang/rust/pull/117601/)
2711 - [`riscv32imafc-esp-espidf`](https://github.com/rust-lang/rust/pull/119738/)
2712 - [`riscv32im-risc0-zkvm-elf`](https://github.com/rust-lang/rust/pull/117958/)
2713
2714Refer to Rust's [platform support page][platform-support-doc]
2715for more information on Rust's tiered platform support.
2716
2717<a id="1.77.0-Libraries"></a>
2718
2719Libraries
2720---------
2721
2722- [Implement `From<&[T; N]>` for `Cow<[T]>`.](https://github.com/rust-lang/rust/pull/113489/)
2723- [Remove special-case handling of `vec.split_off(0)`.](https://github.com/rust-lang/rust/pull/119917/)
2724
2725<a id="1.77.0-Stabilized-APIs"></a>
2726
2727Stabilized APIs
2728---------------
2729
2730- [`array::each_ref`](https://doc.rust-lang.org/stable/std/primitive.array.html#method.each_ref)
2731- [`array::each_mut`](https://doc.rust-lang.org/stable/std/primitive.array.html#method.each_mut)
2732- [`core::net`](https://doc.rust-lang.org/stable/core/net/index.html)
2733- [`f32::round_ties_even`](https://doc.rust-lang.org/stable/std/primitive.f32.html#method.round_ties_even)
2734- [`f64::round_ties_even`](https://doc.rust-lang.org/stable/std/primitive.f64.html#method.round_ties_even)
2735- [`mem::offset_of!`](https://doc.rust-lang.org/stable/std/mem/macro.offset_of.html)
2736- [`slice::first_chunk`](https://doc.rust-lang.org/stable/std/primitive.slice.html#method.first_chunk)
2737- [`slice::first_chunk_mut`](https://doc.rust-lang.org/stable/std/primitive.slice.html#method.first_chunk_mut)
2738- [`slice::split_first_chunk`](https://doc.rust-lang.org/stable/std/primitive.slice.html#method.split_first_chunk)
2739- [`slice::split_first_chunk_mut`](https://doc.rust-lang.org/stable/std/primitive.slice.html#method.split_first_chunk_mut)
2740- [`slice::last_chunk`](https://doc.rust-lang.org/stable/std/primitive.slice.html#method.last_chunk)
2741- [`slice::last_chunk_mut`](https://doc.rust-lang.org/stable/std/primitive.slice.html#method.last_chunk_mut)
2742- [`slice::split_last_chunk`](https://doc.rust-lang.org/stable/std/primitive.slice.html#method.split_last_chunk)
2743- [`slice::split_last_chunk_mut`](https://doc.rust-lang.org/stable/std/primitive.slice.html#method.split_last_chunk_mut)
2744- [`slice::chunk_by`](https://doc.rust-lang.org/stable/std/primitive.slice.html#method.chunk_by)
2745- [`slice::chunk_by_mut`](https://doc.rust-lang.org/stable/std/primitive.slice.html#method.chunk_by_mut)
2746- [`Bound::map`](https://doc.rust-lang.org/stable/std/ops/enum.Bound.html#method.map)
2747- [`File::create_new`](https://doc.rust-lang.org/stable/std/fs/struct.File.html#method.create_new)
2748- [`Mutex::clear_poison`](https://doc.rust-lang.org/stable/std/sync/struct.Mutex.html#method.clear_poison)
2749- [`RwLock::clear_poison`](https://doc.rust-lang.org/stable/std/sync/struct.RwLock.html#method.clear_poison)
2750
2751<a id="1.77.0-Cargo"></a>
2752
2753Cargo
2754-----
2755
2756- [Extend the build directive syntax with `cargo::`.](https://github.com/rust-lang/cargo/pull/12201/)
2757- [Stabilize metadata `id` format as `PackageIDSpec`.](https://github.com/rust-lang/cargo/pull/12914/)
2758- [Pull out `cargo-util-schemas` as a crate.](https://github.com/rust-lang/cargo/pull/13178/)
2759- [Strip all debuginfo when debuginfo is not requested.](https://github.com/rust-lang/cargo/pull/13257/)
2760- [Inherit jobserver from env for all kinds of runners.](https://github.com/rust-lang/cargo/pull/12776/)
2761- [Deprecate rustc plugin support in cargo.](https://github.com/rust-lang/cargo/pull/13248/)
2762
2763<a id="1.77.0-Rustdoc"></a>
2764
2765Rustdoc
2766-----
2767
2768- [Allows links in markdown headings.](https://github.com/rust-lang/rust/pull/117662/)
2769- [Search for tuples and unit by type with `()`.](https://github.com/rust-lang/rust/pull/118194/)
2770- [Clean up the source sidebar's hide button.](https://github.com/rust-lang/rust/pull/119066/)
2771- [Prevent JS injection from `localStorage`.](https://github.com/rust-lang/rust/pull/120250/)
2772
2773<a id="1.77.0-Misc"></a>
2774
2775Misc
2776----
2777
2778- [Recommend version-sorting for all sorting in style guide.](https://github.com/rust-lang/rust/pull/115046/)
2779
2780<a id="1.77.0-Internal-Changes"></a>
2781
2782Internal Changes
2783----------------
2784
2785These changes do not affect any public interfaces of Rust, but they represent
2786significant improvements to the performance or internals of rustc and related
2787tools.
2788
2789- [Add more weirdness to `weird-exprs.rs`.](https://github.com/rust-lang/rust/pull/119028/)
2790
2791Version 1.76.0 (2024-02-08)
2792==========================
2793
2794<a id="1.76.0-Language"></a>
2795
2796Language
2797--------
2798- [Document Rust ABI compatibility between various types](https://github.com/rust-lang/rust/pull/115476/)
2799- [Also: guarantee that char and u32 are ABI-compatible](https://github.com/rust-lang/rust/pull/118032/)
2800- [Add lint `ambiguous_wide_pointer_comparisons` that supersedes `clippy::vtable_address_comparisons`](https://github.com/rust-lang/rust/pull/117758)
2801
2802<a id="1.76.0-Compiler"></a>
2803
2804Compiler
2805--------
2806- [Lint pinned `#[must_use]` pointers (in particular, `Box<T>` where `T` is `#[must_use]`) in `unused_must_use`.](https://github.com/rust-lang/rust/pull/118054/)
2807- [Soundness fix: fix computing the offset of an unsized field in a packed struct](https://github.com/rust-lang/rust/pull/118540/)
2808- [Soundness fix: fix dynamic size/align computation logic for packed types with dyn Trait tail](https://github.com/rust-lang/rust/pull/118538/)
2809- [Add `$message_type` field to distinguish json diagnostic outputs](https://github.com/rust-lang/rust/pull/115691/)
2810- [Enable Rust to use the EHCont security feature of Windows](https://github.com/rust-lang/rust/pull/118013/)
2811- [Add tier 3 {x86_64,i686}-win7-windows-msvc targets](https://github.com/rust-lang/rust/pull/118150/)
2812- [Add tier 3 aarch64-apple-watchos target](https://github.com/rust-lang/rust/pull/119074/)
2813- [Add tier 3 arm64e-apple-ios & arm64e-apple-darwin targets](https://github.com/rust-lang/rust/pull/115526/)
2814
2815Refer to Rust's [platform support page][platform-support-doc]
2816for more information on Rust's tiered platform support.
2817
2818<a id="1.76.0-Libraries"></a>
2819
2820Libraries
2821---------
2822- [Add a column number to `dbg!()`](https://github.com/rust-lang/rust/pull/114962/)
2823- [Add `std::hash::{DefaultHasher, RandomState}` exports](https://github.com/rust-lang/rust/pull/115694/)
2824- [Fix rounding issue with exponents in fmt](https://github.com/rust-lang/rust/pull/116301/)
2825- [Add T: ?Sized to `RwLockReadGuard` and `RwLockWriteGuard`'s Debug impls.](https://github.com/rust-lang/rust/pull/117138/)
2826- [Windows: Allow `File::create` to work on hidden files](https://github.com/rust-lang/rust/pull/116438/)
2827
2828<a id="1.76.0-Stabilized-APIs"></a>
2829
2830Stabilized APIs
2831---------------
2832
2833- [`Arc::unwrap_or_clone`](https://doc.rust-lang.org/stable/std/sync/struct.Arc.html#method.unwrap_or_clone)
2834- [`Rc::unwrap_or_clone`](https://doc.rust-lang.org/stable/std/rc/struct.Rc.html#method.unwrap_or_clone)
2835- [`Result::inspect`](https://doc.rust-lang.org/stable/std/result/enum.Result.html#method.inspect)
2836- [`Result::inspect_err`](https://doc.rust-lang.org/stable/std/result/enum.Result.html#method.inspect_err)
2837- [`Option::inspect`](https://doc.rust-lang.org/stable/std/option/enum.Option.html#method.inspect)
2838- [`type_name_of_val`](https://doc.rust-lang.org/stable/std/any/fn.type_name_of_val.html)
2839- [`std::hash::{DefaultHasher, RandomState}`](https://doc.rust-lang.org/stable/std/hash/index.html#structs)
2840 These were previously available only through `std::collections::hash_map`.
2841- [`ptr::{from_ref, from_mut}`](https://doc.rust-lang.org/stable/std/ptr/fn.from_ref.html)
2842- [`ptr::addr_eq`](https://doc.rust-lang.org/stable/std/ptr/fn.addr_eq.html)
2843
2844<a id="1.76.0-Cargo"></a>
2845
2846Cargo
2847-----
2848
2849See [Cargo release notes](https://github.com/rust-lang/cargo/blob/master/CHANGELOG.md#cargo-176-2024-02-08).
2850
2851<a id="1.76.0-Rustdoc"></a>
2852
2853Rustdoc
2854-------
2855
2856- [Don't merge cfg and doc(cfg) attributes for re-exports](https://github.com/rust-lang/rust/pull/113091/)
2857- [rustdoc: allow resizing the sidebar / hiding the top bar](https://github.com/rust-lang/rust/pull/115660/)
2858- [rustdoc-search: add support for traits and associated types](https://github.com/rust-lang/rust/pull/116085/)
2859- [rustdoc: Add highlighting for comments in items declaration](https://github.com/rust-lang/rust/pull/117869/)
2860
2861<a id="1.76.0-Compatibility-Notes"></a>
2862
2863Compatibility Notes
2864-------------------
2865- [Add allow-by-default lint for unit bindings](https://github.com/rust-lang/rust/pull/112380/)
2866 This is expected to be upgraded to a warning by default in a future Rust
2867 release. Some macros emit bindings with type `()` with user-provided spans,
2868 which means that this lint will warn for user code.
2869- [Remove x86_64-sun-solaris target.](https://github.com/rust-lang/rust/pull/118091/)
2870- [Remove asmjs-unknown-emscripten target](https://github.com/rust-lang/rust/pull/117338/)
2871- [Report errors in jobserver inherited through environment variables](https://github.com/rust-lang/rust/pull/113730/)
2872 This [may warn](https://github.com/rust-lang/rust/issues/120515) on benign problems too.
2873- [Update the minimum external LLVM to 16.](https://github.com/rust-lang/rust/pull/117947/)
2874- [Improve `print_tts`](https://github.com/rust-lang/rust/pull/114571/)
2875 This change can break some naive manual parsing of token trees in proc macro
2876 code which expect a particular structure after `.to_string()`, rather than just arbitrary Rust code.
2877- [Make `IMPLIED_BOUNDS_ENTAILMENT` into a hard error from a lint](https://github.com/rust-lang/rust/pull/117984/)
2878- [Vec's allocation behavior was changed when collecting some iterators](https://github.com/rust-lang/rust/pull/110353)
2879 Allocation behavior is currently not specified, nevertheless changes can be surprising.
2880 See [`impl FromIterator for Vec`](https://doc.rust-lang.org/nightly/std/vec/struct.Vec.html#impl-FromIterator%3CT%3E-for-Vec%3CT%3E)
2881 for more details.
2882- [Properly reject `default` on free const items](https://github.com/rust-lang/rust/pull/117818/)
2883
2884Version 1.75.0 (2023-12-28)
2885==========================
2886
2887<a id="1.75.0-Language"></a>
2888
2889Language
2890--------
2891
2892- [Stabilize `async fn` and return-position `impl Trait` in traits.](https://github.com/rust-lang/rust/pull/115822/)
2893- [Allow function pointer signatures containing `&mut T` in `const` contexts.](https://github.com/rust-lang/rust/pull/116015/)
2894- [Match `usize`/`isize` exhaustively with half-open ranges.](https://github.com/rust-lang/rust/pull/116692/)
2895- [Guarantee that `char` has the same size and alignment as `u32`.](https://github.com/rust-lang/rust/pull/116894/)
2896- [Document that the null pointer has the 0 address.](https://github.com/rust-lang/rust/pull/116988/)
2897- [Allow partially moved values in `match`.](https://github.com/rust-lang/rust/pull/103208/)
2898- [Add notes about non-compliant FP behavior on 32bit x86 targets.](https://github.com/rust-lang/rust/pull/113053/)
2899- [Stabilize ratified RISC-V target features.](https://github.com/rust-lang/rust/pull/116485/)
2900
2901<a id="1.75.0-Compiler"></a>
2902
2903Compiler
2904--------
2905
2906- [Rework negative coherence to properly consider impls that only partly overlap.](https://github.com/rust-lang/rust/pull/112875/)
2907- [Bump `COINDUCTIVE_OVERLAP_IN_COHERENCE` to deny, and warn in dependencies.](https://github.com/rust-lang/rust/pull/116493/)
2908- [Consider alias bounds when computing liveness in NLL.](https://github.com/rust-lang/rust/pull/116733/)
2909- [Add the V (vector) extension to the `riscv64-linux-android` target spec.](https://github.com/rust-lang/rust/pull/116618/)
2910- [Automatically enable cross-crate inlining for small functions](https://github.com/rust-lang/rust/pull/116505)
2911- Add several new tier 3 targets:
2912 - [`csky-unknown-linux-gnuabiv2hf`](https://github.com/rust-lang/rust/pull/117049/)
2913 - [`i586-unknown-netbsd`](https://github.com/rust-lang/rust/pull/117170/)
2914 - [`mipsel-unknown-netbsd`](https://github.com/rust-lang/rust/pull/117356/)
2915
2916Refer to Rust's [platform support page][platform-support-doc]
2917for more information on Rust's tiered platform support.
2918
2919<a id="1.75.0-Libraries"></a>
2920
2921Libraries
2922---------
2923
2924- [Override `Waker::clone_from` to avoid cloning `Waker`s unnecessarily.](https://github.com/rust-lang/rust/pull/96979/)
2925- [Implement `BufRead` for `VecDeque<u8>`.](https://github.com/rust-lang/rust/pull/110604/)
2926- [Implement `FusedIterator` for `DecodeUtf16` when the inner iterator does.](https://github.com/rust-lang/rust/pull/110729/)
2927- [Implement `Not, Bit{And,Or}{,Assign}` for IP addresses.](https://github.com/rust-lang/rust/pull/113747/)
2928- [Implement `Default` for `ExitCode`.](https://github.com/rust-lang/rust/pull/114589/)
2929- [Guarantee representation of None in NPO](https://github.com/rust-lang/rust/pull/115333/)
2930- [Document when atomic loads are guaranteed read-only.](https://github.com/rust-lang/rust/pull/115577/)
2931- [Broaden the consequences of recursive TLS initialization.](https://github.com/rust-lang/rust/pull/116172/)
2932- [Windows: Support sub-millisecond sleep.](https://github.com/rust-lang/rust/pull/116461/)
2933- [Fix generic bound of `str::SplitInclusive`'s `DoubleEndedIterator` impl](https://github.com/rust-lang/rust/pull/100806/)
2934- [Fix exit status / wait status on non-Unix `cfg(unix)` platforms.](https://github.com/rust-lang/rust/pull/115108/)
2935
2936<a id="1.75.0-Stabilized-APIs"></a>
2937
2938Stabilized APIs
2939---------------
2940
2941- [`Atomic*::from_ptr`](https://doc.rust-lang.org/stable/core/sync/atomic/struct.AtomicUsize.html#method.from_ptr)
2942- [`FileTimes`](https://doc.rust-lang.org/stable/std/fs/struct.FileTimes.html)
2943- [`FileTimesExt`](https://doc.rust-lang.org/stable/std/os/windows/fs/trait.FileTimesExt.html)
2944- [`File::set_modified`](https://doc.rust-lang.org/stable/std/fs/struct.File.html#method.set_modified)
2945- [`File::set_times`](https://doc.rust-lang.org/stable/std/fs/struct.File.html#method.set_times)
2946- [`IpAddr::to_canonical`](https://doc.rust-lang.org/stable/core/net/enum.IpAddr.html#method.to_canonical)
2947- [`Ipv6Addr::to_canonical`](https://doc.rust-lang.org/stable/core/net/struct.Ipv6Addr.html#method.to_canonical)
2948- [`Option::as_slice`](https://doc.rust-lang.org/stable/core/option/enum.Option.html#method.as_slice)
2949- [`Option::as_mut_slice`](https://doc.rust-lang.org/stable/core/option/enum.Option.html#method.as_mut_slice)
2950- [`pointer::byte_add`](https://doc.rust-lang.org/stable/core/primitive.pointer.html#method.byte_add)
2951- [`pointer::byte_offset`](https://doc.rust-lang.org/stable/core/primitive.pointer.html#method.byte_offset)
2952- [`pointer::byte_offset_from`](https://doc.rust-lang.org/stable/core/primitive.pointer.html#method.byte_offset_from)
2953- [`pointer::byte_sub`](https://doc.rust-lang.org/stable/core/primitive.pointer.html#method.byte_sub)
2954- [`pointer::wrapping_byte_add`](https://doc.rust-lang.org/stable/core/primitive.pointer.html#method.wrapping_byte_add)
2955- [`pointer::wrapping_byte_offset`](https://doc.rust-lang.org/stable/core/primitive.pointer.html#method.wrapping_byte_offset)
2956- [`pointer::wrapping_byte_sub`](https://doc.rust-lang.org/stable/core/primitive.pointer.html#method.wrapping_byte_sub)
2957
2958These APIs are now stable in const contexts:
2959
2960- [`Ipv6Addr::to_ipv4_mapped`](https://doc.rust-lang.org/stable/core/net/struct.Ipv6Addr.html#method.to_ipv4_mapped)
2961- [`MaybeUninit::assume_init_read`](https://doc.rust-lang.org/stable/core/mem/union.MaybeUninit.html#method.assume_init_read)
2962- [`MaybeUninit::zeroed`](https://doc.rust-lang.org/stable/core/mem/union.MaybeUninit.html#method.zeroed)
2963- [`mem::discriminant`](https://doc.rust-lang.org/stable/core/mem/fn.discriminant.html)
2964- [`mem::zeroed`](https://doc.rust-lang.org/stable/core/mem/fn.zeroed.html)
2965
2966<a id="1.75.0-Cargo"></a>
2967
2968Cargo
2969-----
2970
2971- [Add new packages to `[workspace.members]` automatically.](https://github.com/rust-lang/cargo/pull/12779/)
2972- [Allow version-less `Cargo.toml` manifests.](https://github.com/rust-lang/cargo/pull/12786/)
2973- [Make browser links out of HTML file paths.](https://github.com/rust-lang/cargo/pull/12889)
2974
2975<a id="1.75.0-Rustdoc"></a>
2976
2977Rustdoc
2978-------
2979
2980- [Accept less invalid Rust in rustdoc.](https://github.com/rust-lang/rust/pull/117450/)
2981- [Document lack of object safety on affected traits.](https://github.com/rust-lang/rust/pull/113241/)
2982- [Hide `#[repr(transparent)]` if it isn't part of the public ABI.](https://github.com/rust-lang/rust/pull/115439/)
2983- [Show enum discriminant if it is a C-like variant.](https://github.com/rust-lang/rust/pull/116142/)
2984
2985<a id="1.75.0-Compatibility-Notes"></a>
2986
2987Compatibility Notes
2988-------------------
2989
2990- [FreeBSD targets now require at least version 12.](https://github.com/rust-lang/rust/pull/114521/)
2991- [Formally demote tier 2 MIPS targets to tier 3.](https://github.com/rust-lang/rust/pull/115238/)
2992- [Make misalignment a hard error in `const` contexts.](https://github.com/rust-lang/rust/pull/115524/)
2993- [Fix detecting references to packed unsized fields.](https://github.com/rust-lang/rust/pull/115583/)
2994- [Remove support for compiler plugins.](https://github.com/rust-lang/rust/pull/116412/)
2995
2996<a id="1.75.0-Internal-Changes"></a>
2997
2998Internal Changes
2999----------------
3000
3001These changes do not affect any public interfaces of Rust, but they represent
3002significant improvements to the performance or internals of rustc and related
3003tools.
3004
3005- [Optimize `librustc_driver.so` with BOLT.](https://github.com/rust-lang/rust/pull/116352/)
3006- [Enable parallel rustc front end in dev and nightly builds.](https://github.com/rust-lang/rust/pull/117435/)
3007- [Distribute `rustc-codegen-cranelift` as rustup component on the nightly channel.](https://github.com/rust-lang/rust/pull/81746/)
3008
3009Version 1.74.1 (2023-12-07)
3010===========================
3011
3012- [Resolved spurious STATUS_ACCESS_VIOLATIONs in LLVM](https://github.com/rust-lang/rust/pull/118464)
3013- [Clarify guarantees for std::mem::discriminant](https://github.com/rust-lang/rust/pull/118006)
3014- [Fix some subtyping-related regressions](https://github.com/rust-lang/rust/pull/116415)
3015
3016Version 1.74.0 (2023-11-16)
3017==========================
3018
3019<a id="1.74.0-Language"></a>
3020
3021Language
3022--------
3023
3024- [Codify that `std::mem::Discriminant<T>` does not depend on any lifetimes in T](https://github.com/rust-lang/rust/pull/104299/)
3025- [Replace `private_in_public` lint with `private_interfaces` and `private_bounds` per RFC 2145.](https://github.com/rust-lang/rust/pull/113126/)
3026 Read more in [RFC 2145](https://rust-lang.github.io/rfcs/2145-type-privacy.html).
3027- [Allow explicit `#[repr(Rust)]`](https://github.com/rust-lang/rust/pull/114201/)
3028- [closure field capturing: don't depend on alignment of packed fields](https://github.com/rust-lang/rust/pull/115315/)
3029- [Enable MIR-based drop-tracking for `async` blocks](https://github.com/rust-lang/rust/pull/107421/)
3030- [Stabilize `impl_trait_projections`](https://github.com/rust-lang/rust/pull/115659)
3031
3032<a id="1.74.0-Compiler"></a>
3033
3034Compiler
3035--------
3036
3037- [stabilize combining +bundle and +whole-archive link modifiers](https://github.com/rust-lang/rust/pull/113301/)
3038- [Stabilize `PATH` option for `--print KIND=PATH`](https://github.com/rust-lang/rust/pull/114183/)
3039- [Enable ASAN/LSAN/TSAN for `*-apple-ios-macabi`](https://github.com/rust-lang/rust/pull/115644/)
3040- [Promote loongarch64-unknown-none* to Tier 2](https://github.com/rust-lang/rust/pull/115368/)
3041- [Add `i686-pc-windows-gnullvm` as a tier 3 target](https://github.com/rust-lang/rust/pull/115687/)
3042
3043<a id="1.74.0-Libraries"></a>
3044
3045Libraries
3046---------
3047
3048- [Implement `From<OwnedFd/Handle>` for ChildStdin/out/err](https://github.com/rust-lang/rust/pull/98704/)
3049- [Implement `From<{&,&mut} [T; N]>` for `Vec<T>` where `T: Clone`](https://github.com/rust-lang/rust/pull/111278/)
3050- [impl Step for IP addresses](https://github.com/rust-lang/rust/pull/113748/)
3051- [Implement `From<[T; N]>` for `Rc<[T]>` and `Arc<[T]>`](https://github.com/rust-lang/rust/pull/114041/)
3052- [`impl TryFrom<char> for u16`](https://github.com/rust-lang/rust/pull/114065/)
3053- [Stabilize `io_error_other` feature](https://github.com/rust-lang/rust/pull/115453/)
3054- [Stabilize the `Saturating` type](https://github.com/rust-lang/rust/pull/115477/)
3055- [Stabilize const_transmute_copy](https://github.com/rust-lang/rust/pull/115520/)
3056
3057<a id="1.74.0-Stabilized-APIs"></a>
3058
3059Stabilized APIs
3060---------------
3061
3062- [`core::num::Saturating`](https://doc.rust-lang.org/stable/std/num/struct.Saturating.html)
3063- [`impl From<io::Stdout> for std::process::Stdio`](https://doc.rust-lang.org/stable/std/process/struct.Stdio.html#impl-From%3CStdout%3E-for-Stdio)
3064- [`impl From<io::Stderr> for std::process::Stdio`](https://doc.rust-lang.org/stable/std/process/struct.Stdio.html#impl-From%3CStderr%3E-for-Stdio)
3065- [`impl From<OwnedHandle> for std::process::Child{Stdin, Stdout, Stderr}`](https://doc.rust-lang.org/stable/std/process/struct.ChildStderr.html#impl-From%3COwnedHandle%3E-for-ChildStderr)
3066- [`impl From<OwnedFd> for std::process::Child{Stdin, Stdout, Stderr}`](https://doc.rust-lang.org/stable/std/process/struct.ChildStderr.html#impl-From%3COwnedFd%3E-for-ChildStderr)
3067- [`std::ffi::OsString::from_encoded_bytes_unchecked`](https://doc.rust-lang.org/stable/std/ffi/struct.OsString.html#method.from_encoded_bytes_unchecked)
3068- [`std::ffi::OsString::into_encoded_bytes`](https://doc.rust-lang.org/stable/std/ffi/struct.OsString.html#method.into_encoded_bytes)
3069- [`std::ffi::OsStr::from_encoded_bytes_unchecked`](https://doc.rust-lang.org/stable/std/ffi/struct.OsStr.html#method.from_encoded_bytes_unchecked)
3070- [`std::ffi::OsStr::as_encoded_bytes`](https://doc.rust-lang.org/stable/std/ffi/struct.OsStr.html#method.as_encoded_bytes)
3071- [`std::io::Error::other`](https://doc.rust-lang.org/stable/std/io/struct.Error.html#method.other)
3072- [`impl TryFrom<char> for u16`](https://doc.rust-lang.org/stable/std/primitive.u16.html#impl-TryFrom%3Cchar%3E-for-u16)
3073- [`impl<T: Clone, const N: usize> From<&[T; N]> for Vec<T>`](https://doc.rust-lang.org/stable/std/vec/struct.Vec.html#impl-From%3C%26%5BT;+N%5D%3E-for-Vec%3CT,+Global%3E)
3074- [`impl<T: Clone, const N: usize> From<&mut [T; N]> for Vec<T>`](https://doc.rust-lang.org/stable/std/vec/struct.Vec.html#impl-From%3C%26mut+%5BT;+N%5D%3E-for-Vec%3CT,+Global%3E)
3075- [`impl<T, const N: usize> From<[T; N]> for Arc<[T]>`](https://doc.rust-lang.org/stable/std/sync/struct.Arc.html#impl-From%3C%5BT;+N%5D%3E-for-Arc%3C%5BT%5D,+Global%3E)
3076- [`impl<T, const N: usize> From<[T; N]> for Rc<[T]>`](https://doc.rust-lang.org/stable/std/rc/struct.Rc.html#impl-From%3C%5BT;+N%5D%3E-for-Rc%3C%5BT%5D,+Global%3E)
3077
3078These APIs are now stable in const contexts:
3079
3080- [`core::mem::transmute_copy`](https://doc.rust-lang.org/beta/std/mem/fn.transmute_copy.html)
3081- [`str::is_ascii`](https://doc.rust-lang.org/beta/std/primitive.str.html#method.is_ascii)
3082- [`[u8]::is_ascii`](https://doc.rust-lang.org/beta/std/primitive.slice.html#method.is_ascii)
3083
3084<a id="1.74.0-Cargo"></a>
3085
3086Cargo
3087-----
3088
3089- [In `Cargo.toml`, stabilize `[lints]`](https://github.com/rust-lang/cargo/pull/12648/)
3090- [Stabilize credential-process and registry-auth](https://github.com/rust-lang/cargo/pull/12649/)
3091- [Stabilize `--keep-going` build flag](https://github.com/rust-lang/cargo/pull/12568/)
3092- [Add styling to `--help` output](https://github.com/rust-lang/cargo/pull/12578/)
3093- [For `cargo clean`, add `--dry-run` flag and summary line at the end](https://github.com/rust-lang/cargo/pull/12638)
3094- [For `cargo update`, make `--package` more convenient by being positional](https://github.com/rust-lang/cargo/pull/12545/)
3095- [For `cargo update`, clarify meaning of --aggressive as --recursive](https://github.com/rust-lang/cargo/pull/12544/)
3096- [Add '-n' as an alias for `--dry-run`](https://github.com/rust-lang/cargo/pull/12660/)
3097- [Allow version-prefixes in pkgid's (e.g. `--package` flags) to resolve ambiguities](https://github.com/rust-lang/cargo/pull/12614/)
3098- [In `.cargo/config.toml`, merge lists in precedence order](https://github.com/rust-lang/cargo/pull/12515/)
3099- [Add support for `target.'cfg(..)'.linker`](https://github.com/rust-lang/cargo/pull/12535/)
3100
3101<a id="1.74.0-Rustdoc"></a>
3102
3103Rustdoc
3104-------
3105
3106- [Add warning block support in rustdoc](https://github.com/rust-lang/rust/pull/106561/)
3107- [rustdoc-search: add support for type parameters](https://github.com/rust-lang/rust/pull/112725/)
3108- [rustdoc: show inner enum and struct in type definition for concrete type](https://github.com/rust-lang/rust/pull/114855/)
3109
3110<a id="1.74.0-Compatibility-Notes"></a>
3111
3112Compatibility Notes
3113-------------------
3114
3115- [Raise minimum supported Apple OS versions](https://github.com/rust-lang/rust/pull/104385/)
3116- [make Cell::swap panic if the Cells partially overlap](https://github.com/rust-lang/rust/pull/114795/)
3117- [Reject invalid crate names in `--extern`](https://github.com/rust-lang/rust/pull/116001/)
3118- [Don't resolve generic impls that may be shadowed by dyn built-in impls](https://github.com/rust-lang/rust/pull/114941/)
3119- [The new `impl From<{&,&mut} [T; N]> for Vec<T>` is known to cause some inference failures with overly-generic code.](https://github.com/rust-lang/rust/issues/117054) In those examples using the `tui` crate, the combination of `AsRef<_>` and `Into<Vec>` leaves the middle type ambiguous, and the new `impl` adds another possibility, so it now requires an explicit type annotation.
3120
3121<a id="1.74.0-Internal-Changes"></a>
3122
3123Internal Changes
3124----------------
3125
3126These changes do not affect any public interfaces of Rust, but they represent
3127significant improvements to the performance or internals of rustc and related
3128tools.
3129
3130None this cycle.
3131
3132Version 1.73.0 (2023-10-05)
3133==========================
3134
3135<a id="1.73.0-Language"></a>
3136
3137Language
3138--------
3139
3140- [Uplift `clippy::fn_null_check` lint as `useless_ptr_null_checks`.](https://github.com/rust-lang/rust/pull/111717/)
3141- [Make `noop_method_call` warn by default.](https://github.com/rust-lang/rust/pull/111916/)
3142- [Support interpolated block for `try` and `async` in macros.](https://github.com/rust-lang/rust/pull/112953/)
3143- [Make `unconditional_recursion` lint detect recursive drops.](https://github.com/rust-lang/rust/pull/113902/)
3144- [Future compatibility warning for some impls being incorrectly considered not overlapping.](https://github.com/rust-lang/rust/pull/114023/)
3145- [The `invalid_reference_casting` lint is now **deny-by-default** (instead of allow-by-default)](https://github.com/rust-lang/rust/pull/112431)
3146
3147<a id="1.73.0-Compiler"></a>
3148
3149Compiler
3150--------
3151
3152- [Write version information in a `.comment` section like GCC/Clang.](https://github.com/rust-lang/rust/pull/97550/)
3153- [Add documentation on v0 symbol mangling.](https://github.com/rust-lang/rust/pull/97571/)
3154- [Stabilize `extern "thiscall"` and `"thiscall-unwind"` ABIs.](https://github.com/rust-lang/rust/pull/114562/)
3155- [Only check outlives goals on impl compared to trait.](https://github.com/rust-lang/rust/pull/109356/)
3156- [Infer type in irrefutable slice patterns with fixed length as array.](https://github.com/rust-lang/rust/pull/113199/)
3157- [Discard default auto trait impls if explicit ones exist.](https://github.com/rust-lang/rust/pull/113312/)
3158- Add several new tier 3 targets:
3159 - [`aarch64-unknown-teeos`](https://github.com/rust-lang/rust/pull/113480/)
3160 - [`csky-unknown-linux-gnuabiv2`](https://github.com/rust-lang/rust/pull/113658/)
3161 - [`riscv64-linux-android`](https://github.com/rust-lang/rust/pull/112858/)
3162 - [`riscv64gc-unknown-hermit`](https://github.com/rust-lang/rust/pull/114004/)
3163 - [`x86_64-unikraft-linux-musl`](https://github.com/rust-lang/rust/pull/113411/)
3164 - [`x86_64-unknown-linux-ohos`](https://github.com/rust-lang/rust/pull/113061/)
3165- [Add `wasm32-wasi-preview1-threads` as a tier 2 target.](https://github.com/rust-lang/rust/pull/112922/)
3166
3167Refer to Rust's [platform support page][platform-support-doc]
3168for more information on Rust's tiered platform support.
3169
3170<a id="1.73.0-Libraries"></a>
3171
3172Libraries
3173---------
3174
3175- [Add `Read`, `Write` and `Seek` impls for `Arc<File>`.](https://github.com/rust-lang/rust/pull/94748/)
3176- [Merge functionality of `io::Sink` into `io::Empty`.](https://github.com/rust-lang/rust/pull/98154/)
3177- [Implement `RefUnwindSafe` for `Backtrace`](https://github.com/rust-lang/rust/pull/100455/)
3178- [Make `ExitStatus` implement `Default`](https://github.com/rust-lang/rust/pull/106425/)
3179- [`impl SliceIndex<str> for (Bound<usize>, Bound<usize>)`](https://github.com/rust-lang/rust/pull/111081/)
3180- [Change default panic handler message format.](https://github.com/rust-lang/rust/pull/112849/)
3181- [Cleaner `assert_eq!` & `assert_ne!` panic messages.](https://github.com/rust-lang/rust/pull/111071/)
3182- [Correct the (deprecated) Android `stat` struct definitions.](https://github.com/rust-lang/rust/pull/113130/)
3183
3184<a id="1.73.0-Stabilized-APIs"></a>
3185
3186Stabilized APIs
3187---------------
3188
3189- [Unsigned `{integer}::div_ceil`](https://doc.rust-lang.org/stable/std/primitive.u32.html#method.div_ceil)
3190- [Unsigned `{integer}::next_multiple_of`](https://doc.rust-lang.org/stable/std/primitive.u32.html#method.next_multiple_of)
3191- [Unsigned `{integer}::checked_next_multiple_of`](https://doc.rust-lang.org/stable/std/primitive.u32.html#method.checked_next_multiple_of)
3192- [`std::ffi::FromBytesUntilNulError`](https://doc.rust-lang.org/stable/std/ffi/struct.FromBytesUntilNulError.html)
3193- [`std::os::unix::fs::chown`](https://doc.rust-lang.org/stable/std/os/unix/fs/fn.chown.html)
3194- [`std::os::unix::fs::fchown`](https://doc.rust-lang.org/stable/std/os/unix/fs/fn.fchown.html)
3195- [`std::os::unix::fs::lchown`](https://doc.rust-lang.org/stable/std/os/unix/fs/fn.lchown.html)
3196- [`LocalKey::<Cell<T>>::get`](https://doc.rust-lang.org/stable/std/thread/struct.LocalKey.html#method.get)
3197- [`LocalKey::<Cell<T>>::set`](https://doc.rust-lang.org/stable/std/thread/struct.LocalKey.html#method.set)
3198- [`LocalKey::<Cell<T>>::take`](https://doc.rust-lang.org/stable/std/thread/struct.LocalKey.html#method.take)
3199- [`LocalKey::<Cell<T>>::replace`](https://doc.rust-lang.org/stable/std/thread/struct.LocalKey.html#method.replace)
3200- [`LocalKey::<RefCell<T>>::with_borrow`](https://doc.rust-lang.org/stable/std/thread/struct.LocalKey.html#method.with_borrow)
3201- [`LocalKey::<RefCell<T>>::with_borrow_mut`](https://doc.rust-lang.org/stable/std/thread/struct.LocalKey.html#method.with_borrow_mut)
3202- [`LocalKey::<RefCell<T>>::set`](https://doc.rust-lang.org/stable/std/thread/struct.LocalKey.html#method.set-1)
3203- [`LocalKey::<RefCell<T>>::take`](https://doc.rust-lang.org/stable/std/thread/struct.LocalKey.html#method.take-1)
3204- [`LocalKey::<RefCell<T>>::replace`](https://doc.rust-lang.org/stable/std/thread/struct.LocalKey.html#method.replace-1)
3205
3206These APIs are now stable in const contexts:
3207
3208- [`rc::Weak::new`](https://doc.rust-lang.org/stable/alloc/rc/struct.Weak.html#method.new)
3209- [`sync::Weak::new`](https://doc.rust-lang.org/stable/alloc/sync/struct.Weak.html#method.new)
3210- [`NonNull::as_ref`](https://doc.rust-lang.org/stable/core/ptr/struct.NonNull.html#method.as_ref)
3211
3212<a id="1.73.0-Cargo"></a>
3213
3214Cargo
3215-----
3216
3217- [Bail out an error when using `cargo::` in custom build script.](https://github.com/rust-lang/cargo/pull/12332/)
3218
3219<a id="1.73.0-Misc"></a>
3220
3221Misc
3222----
3223
3224<a id="1.73.0-Compatibility-Notes"></a>
3225
3226Compatibility Notes
3227-------------------
3228
3229- [Update the minimum external LLVM to 15.](https://github.com/rust-lang/rust/pull/114148/)
3230- [Check for non-defining uses of return position `impl Trait`.](https://github.com/rust-lang/rust/pull/112842/)
3231
3232<a id="1.73.0-Internal-Changes"></a>
3233
3234Internal Changes
3235----------------
3236
3237These changes do not affect any public interfaces of Rust, but they represent
3238significant improvements to the performance or internals of rustc and related
3239tools.
3240
3241- [Remove LLVM pointee types, supporting only opaque pointers.](https://github.com/rust-lang/rust/pull/105545/)
3242- [Port PGO/LTO/BOLT optimized build pipeline to Rust.](https://github.com/rust-lang/rust/pull/112235/)
3243- [Replace in-tree `rustc_apfloat` with the new version of the crate.](https://github.com/rust-lang/rust/pull/113843/)
3244- [Update to LLVM 17.](https://github.com/rust-lang/rust/pull/114048/)
3245- [Add `internal_features` lint for internal unstable features.](https://github.com/rust-lang/rust/pull/108955/)
3246- [Mention style for new syntax in tracking issue template.](https://github.com/rust-lang/rust/pull/113586/)
3247
3248Version 1.72.1 (2023-09-19)
3249===========================
3250
3251- [Adjust codegen change to improve LLVM codegen](https://github.com/rust-lang/rust/pull/115236)
3252- [rustdoc: Fix self ty params in objects with lifetimes](https://github.com/rust-lang/rust/pull/115276)
3253- [Fix regression in compile times](https://github.com/rust-lang/rust/pull/114948)
3254- Resolve some ICE regressions in the compiler:
3255 - [#115215](https://github.com/rust-lang/rust/pull/115215)
3256 - [#115559](https://github.com/rust-lang/rust/pull/115559)
3257
3258Version 1.72.0 (2023-08-24)
3259==========================
3260
3261<a id="1.72.0-Language"></a>
3262
3263Language
3264--------
3265
3266- [Replace const eval limit by a lint and add an exponential backoff warning](https://github.com/rust-lang/rust/pull/103877/)
3267- [expand: Change how `#![cfg(FALSE)]` behaves on crate root](https://github.com/rust-lang/rust/pull/110141/)
3268- [Stabilize inline asm for LoongArch64](https://github.com/rust-lang/rust/pull/111235/)
3269- [Uplift `clippy::undropped_manually_drops` lint](https://github.com/rust-lang/rust/pull/111530/)
3270- [Uplift `clippy::invalid_utf8_in_unchecked` lint](https://github.com/rust-lang/rust/pull/111543/) as `invalid_from_utf8_unchecked` and `invalid_from_utf8`
3271- [Uplift `clippy::cast_ref_to_mut` lint](https://github.com/rust-lang/rust/pull/111567/) as `invalid_reference_casting`
3272- [Uplift `clippy::cmp_nan` lint](https://github.com/rust-lang/rust/pull/111818/) as `invalid_nan_comparisons`
3273- [resolve: Remove artificial import ambiguity errors](https://github.com/rust-lang/rust/pull/112086/)
3274- [Don't require associated types with Self: Sized bounds in `dyn Trait` objects](https://github.com/rust-lang/rust/pull/112319/)
3275
3276<a id="1.72.0-Compiler"></a>
3277
3278Compiler
3279--------
3280
3281- [Remember names of `cfg`-ed out items to mention them in diagnostics](https://github.com/rust-lang/rust/pull/109005/)
3282- [Support for native WASM exceptions](https://github.com/rust-lang/rust/pull/111322/)
3283- [Add support for NetBSD/aarch64-be (big-endian arm64).](https://github.com/rust-lang/rust/pull/111326/)
3284- [Write to stdout if `-` is given as output file](https://github.com/rust-lang/rust/pull/111626/)
3285- [Force all native libraries to be statically linked when linking a static binary](https://github.com/rust-lang/rust/pull/111698/)
3286- [Add Tier 3 support for `loongarch64-unknown-none*`](https://github.com/rust-lang/rust/pull/112310/)
3287- [Prevent `.eh_frame` from being emitted for `-C panic=abort`](https://github.com/rust-lang/rust/pull/112403/)
3288- [Support 128-bit enum variant in debuginfo codegen](https://github.com/rust-lang/rust/pull/112474/)
3289- [compiler: update solaris/illumos to enable tsan support.](https://github.com/rust-lang/rust/pull/112039/)
3290
3291Refer to Rust's [platform support page][platform-support-doc]
3292for more information on Rust's tiered platform support.
3293
3294<a id="1.72.0-Libraries"></a>
3295
3296Libraries
3297---------
3298
3299- [Document memory orderings of `thread::{park, unpark}`](https://github.com/rust-lang/rust/pull/99587/)
3300- [io: soften ‘at most one write attempt’ requirement in io::Write::write](https://github.com/rust-lang/rust/pull/107200/)
3301- [Specify behavior of HashSet::insert](https://github.com/rust-lang/rust/pull/107619/)
3302- [Relax implicit `T: Sized` bounds on `BufReader<T>`, `BufWriter<T>` and `LineWriter<T>`](https://github.com/rust-lang/rust/pull/111074/)
3303- [Update runtime guarantee for `select_nth_unstable`](https://github.com/rust-lang/rust/pull/111974/)
3304- [Return `Ok` on kill if process has already exited](https://github.com/rust-lang/rust/pull/112594/)
3305- [Implement PartialOrd for `Vec`s over different allocators](https://github.com/rust-lang/rust/pull/112632/)
3306- [Use 128 bits for TypeId hash](https://github.com/rust-lang/rust/pull/109953/)
3307- [Don't drain-on-drop in DrainFilter impls of various collections.](https://github.com/rust-lang/rust/pull/104455/)
3308- [Make `{Arc,Rc,Weak}::ptr_eq` ignore pointer metadata](https://github.com/rust-lang/rust/pull/106450/)
3309
3310<a id="1.72.0-Rustdoc"></a>
3311
3312Rustdoc
3313-------
3314
3315- [Allow whitespace as path separator like double colon](https://github.com/rust-lang/rust/pull/108537/)
3316- [Add search result item types after their name](https://github.com/rust-lang/rust/pull/110688/)
3317- [Search for slices and arrays by type with `[]`](https://github.com/rust-lang/rust/pull/111958/)
3318- [Clean up type unification and "unboxing"](https://github.com/rust-lang/rust/pull/112233/)
3319
3320<a id="1.72.0-Stabilized-APIs"></a>
3321
3322Stabilized APIs
3323---------------
3324
3325- [`impl<T: Send> Sync for mpsc::Sender<T>`](https://doc.rust-lang.org/stable/std/sync/mpsc/struct.Sender.html#impl-Sync-for-Sender%3CT%3E)
3326- [`impl TryFrom<&OsStr> for &str`](https://doc.rust-lang.org/stable/std/primitive.str.html#impl-TryFrom%3C%26'a+OsStr%3E-for-%26'a+str)
3327- [`String::leak`](https://doc.rust-lang.org/stable/alloc/string/struct.String.html#method.leak)
3328
3329These APIs are now stable in const contexts:
3330
3331- [`CStr::from_bytes_with_nul`](https://doc.rust-lang.org/stable/std/ffi/struct.CStr.html#method.from_bytes_with_nul)
3332- [`CStr::to_bytes`](https://doc.rust-lang.org/stable/std/ffi/struct.CStr.html#method.to_bytes)
3333- [`CStr::to_bytes_with_nul`](https://doc.rust-lang.org/stable/std/ffi/struct.CStr.html#method.to_bytes_with_nul)
3334- [`CStr::to_str`](https://doc.rust-lang.org/stable/std/ffi/struct.CStr.html#method.to_str)
3335
3336<a id="1.72.0-Cargo"></a>
3337
3338Cargo
3339-----
3340
3341- Enable `-Zdoctest-in-workspace` by default. When running each documentation
3342 test, the working directory is set to the root directory of the package the
3343 test belongs to.
3344 [docs](https://doc.rust-lang.org/nightly/cargo/commands/cargo-test.html#working-directory-of-tests)
3345 [#12221](https://github.com/rust-lang/cargo/pull/12221)
3346 [#12288](https://github.com/rust-lang/cargo/pull/12288)
3347- Add support of the "default" keyword to reset previously set `build.jobs`
3348 parallelism back to the default.
3349 [#12222](https://github.com/rust-lang/cargo/pull/12222)
3350
3351<a id="1.72.0-Compatibility-Notes"></a>
3352
3353Compatibility Notes
3354-------------------
3355
3356- [Alter `Display` for `Ipv6Addr` for IPv4-compatible addresses](https://github.com/rust-lang/rust/pull/112606/)
3357- Cargo changed feature name validation check to a hard error. The warning was
3358 added in Rust 1.49. These extended characters aren't allowed on crates.io, so
3359 this should only impact users of other registries, or people who don't publish
3360 to a registry.
3361 [#12291](https://github.com/rust-lang/cargo/pull/12291)
3362- [Demoted `mips*-unknown-linux-gnu*` targets from host tier 2 to target tier 3 support.](https://github.com/rust-lang/rust/pull/113274)
3363
3364Version 1.71.1 (2023-08-03)
3365===========================
3366
3367- [Fix CVE-2023-38497: Cargo did not respect the umask when extracting dependencies](https://github.com/rust-lang/cargo/security/advisories/GHSA-j3xp-wfr4-hx87)
3368- [Fix bash completion for users of Rustup](https://github.com/rust-lang/rust/pull/113579)
3369- [Do not show `suspicious_double_ref_op` lint when calling `borrow()`](https://github.com/rust-lang/rust/pull/112517)
3370- [Fix ICE: substitute types before checking inlining compatibility](https://github.com/rust-lang/rust/pull/113802)
3371- [Fix ICE: don't use `can_eq` in `derive(..)` suggestion for missing method](https://github.com/rust-lang/rust/pull/111516)
3372- [Fix building Rust 1.71.0 from the source tarball](https://github.com/rust-lang/rust/issues/113678)
3373
3374Version 1.71.0 (2023-07-13)
3375==========================
3376
3377<a id="1.71.0-Language"></a>
3378
3379Language
3380--------
3381
3382- [Stabilize `raw-dylib`, `link_ordinal`, `import_name_type` and `-Cdlltool`.](https://github.com/rust-lang/rust/pull/109677/)
3383- [Uplift `clippy::{drop,forget}_{ref,copy}` lints.](https://github.com/rust-lang/rust/pull/109732/)
3384- [Type inference is more conservative around constrained vars.](https://github.com/rust-lang/rust/pull/110100/)
3385- [Use fulfillment to check `Drop` impl compatibility](https://github.com/rust-lang/rust/pull/110577/)
3386
3387<a id="1.71.0-Compiler"></a>
3388
3389Compiler
3390--------
3391
3392- [Evaluate place expression in `PlaceMention`](https://github.com/rust-lang/rust/pull/104844/),
3393 making `let _ =` patterns more consistent with respect to the borrow checker.
3394- [Add `--print deployment-target` flag for Apple targets.](https://github.com/rust-lang/rust/pull/105354/)
3395- [Stabilize `extern "C-unwind"` and friends.](https://github.com/rust-lang/rust/pull/106075/)
3396 The existing `extern "C"` etc. may change behavior for cross-language unwinding in a future release.
3397- [Update the version of musl used on `*-linux-musl` targets to 1.2.3](https://github.com/rust-lang/rust/pull/107129/),
3398 enabling [time64](https://musl.libc.org/time64.html) on 32-bit systems.
3399- [Stabilize `debugger_visualizer`](https://github.com/rust-lang/rust/pull/108668/)
3400 for embedding metadata like Microsoft's Natvis.
3401- [Enable flatten-format-args by default.](https://github.com/rust-lang/rust/pull/109999/)
3402- [Make `Self` respect tuple constructor privacy.](https://github.com/rust-lang/rust/pull/111245/)
3403- [Improve niche placement by trying two strategies and picking the better result.](https://github.com/rust-lang/rust/pull/108106/)
3404- [Use `apple-m1` as the target CPU for `aarch64-apple-darwin`.](https://github.com/rust-lang/rust/pull/109899/)
3405- [Add Tier 3 support for the `x86_64h-apple-darwin` target.](https://github.com/rust-lang/rust/pull/108795/)
3406- [Promote `loongarch64-unknown-linux-gnu` to Tier 2 with host tools.](https://github.com/rust-lang/rust/pull/110936/)
3407
3408Refer to Rust's [platform support page][platform-support-doc]
3409for more information on Rust's tiered platform support.
3410
3411<a id="1.71.0-Libraries"></a>
3412
3413Libraries
3414---------
3415- [Rework handling of recursive panics.](https://github.com/rust-lang/rust/pull/110975/)
3416 Additional panics are allowed while unwinding, as long as they are caught before escaping
3417 a `Drop` implementation, but panicking within a panic hook is now an immediate abort.
3418- [Loosen `From<&[T]> for Box<[T]>` bound to `T: Clone`.](https://github.com/rust-lang/rust/pull/103406/)
3419- [Remove unnecessary `T: Send` bound](https://github.com/rust-lang/rust/pull/111134/)
3420 in `Error for mpsc::SendError<T>` and `TrySendError<T>`.
3421- [Fix docs for `alloc::realloc`](https://github.com/rust-lang/rust/pull/108630/)
3422 to match `Layout` requirements that the size must not exceed `isize::MAX`.
3423- [Document `const {}` syntax for `std::thread_local`.](https://github.com/rust-lang/rust/pull/110620/)
3424 This syntax was stabilized in Rust 1.59, but not previously mentioned in release notes.
3425
3426<a id="1.71.0-Stabilized-APIs"></a>
3427
3428Stabilized APIs
3429---------------
3430
3431- [`CStr::is_empty`](https://doc.rust-lang.org/stable/std/ffi/struct.CStr.html#method.is_empty)
3432- [`BuildHasher::hash_one`](https://doc.rust-lang.org/stable/std/hash/trait.BuildHasher.html#method.hash_one)
3433- [`NonZeroI*::is_positive`](https://doc.rust-lang.org/stable/std/num/struct.NonZeroI32.html#method.is_positive)
3434- [`NonZeroI*::is_negative`](https://doc.rust-lang.org/stable/std/num/struct.NonZeroI32.html#method.is_negative)
3435- [`NonZeroI*::checked_neg`](https://doc.rust-lang.org/stable/std/num/struct.NonZeroI32.html#method.checked_neg)
3436- [`NonZeroI*::overflowing_neg`](https://doc.rust-lang.org/stable/std/num/struct.NonZeroI32.html#method.overflowing_neg)
3437- [`NonZeroI*::saturating_neg`](https://doc.rust-lang.org/stable/std/num/struct.NonZeroI32.html#method.saturating_neg)
3438- [`NonZeroI*::wrapping_neg`](https://doc.rust-lang.org/stable/std/num/struct.NonZeroI32.html#method.wrapping_neg)
3439- [`Neg for NonZeroI*`](https://doc.rust-lang.org/stable/std/num/struct.NonZeroI32.html#impl-Neg-for-NonZeroI32)
3440- [`Neg for &NonZeroI*`](https://doc.rust-lang.org/stable/std/num/struct.NonZeroI32.html#impl-Neg-for-%26NonZeroI32)
3441- [`From<[T; N]> for (T...)`](https://doc.rust-lang.org/stable/std/primitive.array.html#impl-From%3C%5BT;+1%5D%3E-for-(T,))
3442 (array to N-tuple for N in 1..=12)
3443- [`From<(T...)> for [T; N]`](https://doc.rust-lang.org/stable/std/primitive.array.html#impl-From%3C(T,)%3E-for-%5BT;+1%5D)
3444 (N-tuple to array for N in 1..=12)
3445- [`windows::io::AsHandle for Box<T>`](https://doc.rust-lang.org/stable/std/os/windows/io/trait.AsHandle.html#impl-AsHandle-for-Box%3CT%3E)
3446- [`windows::io::AsHandle for Rc<T>`](https://doc.rust-lang.org/stable/std/os/windows/io/trait.AsHandle.html#impl-AsHandle-for-Rc%3CT%3E)
3447- [`windows::io::AsHandle for Arc<T>`](https://doc.rust-lang.org/stable/std/os/windows/io/trait.AsHandle.html#impl-AsHandle-for-Arc%3CT%3E)
3448- [`windows::io::AsSocket for Box<T>`](https://doc.rust-lang.org/stable/std/os/windows/io/trait.AsSocket.html#impl-AsSocket-for-Box%3CT%3E)
3449- [`windows::io::AsSocket for Rc<T>`](https://doc.rust-lang.org/stable/std/os/windows/io/trait.AsSocket.html#impl-AsSocket-for-Rc%3CT%3E)
3450- [`windows::io::AsSocket for Arc<T>`](https://doc.rust-lang.org/stable/std/os/windows/io/trait.AsSocket.html#impl-AsSocket-for-Arc%3CT%3E)
3451
3452These APIs are now stable in const contexts:
3453
3454- [`<*const T>::read`](https://doc.rust-lang.org/stable/std/primitive.pointer.html#method.read)
3455- [`<*const T>::read_unaligned`](https://doc.rust-lang.org/stable/std/primitive.pointer.html#method.read_unaligned)
3456- [`<*mut T>::read`](https://doc.rust-lang.org/stable/std/primitive.pointer.html#method.read-1)
3457- [`<*mut T>::read_unaligned`](https://doc.rust-lang.org/stable/std/primitive.pointer.html#method.read_unaligned-1)
3458- [`ptr::read`](https://doc.rust-lang.org/stable/std/ptr/fn.read.html)
3459- [`ptr::read_unaligned`](https://doc.rust-lang.org/stable/std/ptr/fn.read_unaligned.html)
3460- [`<[T]>::split_at`](https://doc.rust-lang.org/stable/std/primitive.slice.html#method.split_at)
3461
3462<a id="1.71.0-Cargo"></a>
3463
3464Cargo
3465-----
3466- [Allow named debuginfo options in `Cargo.toml`.](https://github.com/rust-lang/cargo/pull/11958/)
3467- [Add `workspace_default_members` to the output of `cargo metadata`.](https://github.com/rust-lang/cargo/pull/11978/)
3468- [Automatically inherit workspace fields when running `cargo new`/`cargo init`.](https://github.com/rust-lang/cargo/pull/12069/)
3469
3470<a id="1.71.0-Rustdoc"></a>
3471
3472Rustdoc
3473-------
3474
3475- [Add a new `rustdoc::unescaped_backticks` lint for broken inline code.](https://github.com/rust-lang/rust/pull/105848/)
3476- [Support strikethrough with single tildes.](https://github.com/rust-lang/rust/pull/111152/) (`~~old~~` vs. `~new~`)
3477
3478<a id="1.71.0-Misc"></a>
3479
3480Misc
3481----
3482
3483<a id="1.71.0-Compatibility-Notes"></a>
3484
3485Compatibility Notes
3486-------------------
3487
3488- [Remove structural match from `TypeId`.](https://github.com/rust-lang/rust/pull/103291/)
3489 Code that uses a constant `TypeId` in a pattern will potentially be broken.
3490 Known cases have already been fixed -- in particular, users of the `log`
3491 crate's `kv_unstable` feature should update to `log v0.4.18` or later.
3492- [Add a `sysroot` crate to represent the standard library crates.](https://github.com/rust-lang/rust/pull/108865/)
3493 This does not affect stable users, but may require adjustment in tools that build their own standard library.
3494- [Cargo optimizes its usage under `rustup`.](https://github.com/rust-lang/cargo/pull/11917/) When
3495 Cargo detects it will run `rustc` pointing to a rustup proxy, it'll try bypassing the proxy and
3496 use the underlying binary directly. There are assumptions around the interaction with rustup and
3497 `RUSTUP_TOOLCHAIN`. However, it's not expected to affect normal users.
3498- [When querying a package, Cargo tries only the original name, all hyphens, and all underscores to
3499 handle misspellings.](https://github.com/rust-lang/cargo/pull/12083/) Previously, Cargo tried each
3500 combination of hyphens and underscores, causing excessive requests to crates.io.
3501- Cargo now [disallows `RUSTUP_HOME`](https://github.com/rust-lang/cargo/pull/12101/) and
3502 [`RUSTUP_TOOLCHAIN`](https://github.com/rust-lang/cargo/pull/12107/) in the `[env]` configuration
3503 table. This is considered to be not a use case Cargo would like to support, since it will likely
3504 cause problems or lead to confusion.
3505
3506<a id="1.71.0-Internal-Changes"></a>
3507
3508Internal Changes
3509----------------
3510
3511These changes do not affect any public interfaces of Rust, but they represent
3512significant improvements to the performance or internals of rustc and related
3513tools.
3514
3515
3516Version 1.70.0 (2023-06-01)
3517==========================
3518
3519<a id="1.70.0-Language"></a>
3520
3521Language
3522--------
3523- [Relax ordering rules for `asm!` operands](https://github.com/rust-lang/rust/pull/105798/)
3524- [Properly allow macro expanded `format_args` invocations to uses captures](https://github.com/rust-lang/rust/pull/106505/)
3525- [Lint ambiguous glob re-exports](https://github.com/rust-lang/rust/pull/107880/)
3526- [Perform const and unsafe checking for expressions in `let _ = expr` position.](https://github.com/rust-lang/rust/pull/102256/)
3527
3528<a id="1.70.0-Compiler"></a>
3529
3530Compiler
3531--------
3532- [Extend -Cdebuginfo with new options and named aliases](https://github.com/rust-lang/rust/pull/109808/)
3533 This provides a smaller version of debuginfo for cases that only need line number information
3534 (`-Cdebuginfo=line-tables-only`), which may eventually become the default for `-Cdebuginfo=1`.
3535- [Make `unused_allocation` lint against `Box::new` too](https://github.com/rust-lang/rust/pull/104363/)
3536- [Detect uninhabited types early in const eval](https://github.com/rust-lang/rust/pull/109435/)
3537- [Switch to LLD as default linker for {arm,thumb}v4t-none-eabi](https://github.com/rust-lang/rust/pull/109721/)
3538- [Add tier 3 target `loongarch64-unknown-linux-gnu`](https://github.com/rust-lang/rust/pull/96971)
3539- [Add tier 3 target for `i586-pc-nto-qnx700` (QNX Neutrino RTOS, version 7.0)](https://github.com/rust-lang/rust/pull/109173/),
3540- [Insert alignment checks for pointer dereferences as debug assertions](https://github.com/rust-lang/rust/pull/98112)
3541 This catches undefined behavior at runtime, and may cause existing code to fail.
3542
3543Refer to Rust's [platform support page][platform-support-doc]
3544for more information on Rust's tiered platform support.
3545
3546<a id="1.70.0-Libraries"></a>
3547
3548Libraries
3549---------
3550- [Document NonZeroXxx layout guarantees](https://github.com/rust-lang/rust/pull/94786/)
3551- [Windows: make `Command` prefer non-verbatim paths](https://github.com/rust-lang/rust/pull/96391/)
3552- [Implement Default for some alloc/core iterators](https://github.com/rust-lang/rust/pull/99929/)
3553- [Fix handling of trailing bare CR in str::lines](https://github.com/rust-lang/rust/pull/100311/)
3554- [allow negative numeric literals in `concat!`](https://github.com/rust-lang/rust/pull/106844/)
3555- [Add documentation about the memory layout of `Cell`](https://github.com/rust-lang/rust/pull/106921/)
3556- [Use `partial_cmp` to implement tuple `lt`/`le`/`ge`/`gt`](https://github.com/rust-lang/rust/pull/108157/)
3557- [Stabilize `atomic_as_ptr`](https://github.com/rust-lang/rust/pull/108419/)
3558- [Stabilize `nonnull_slice_from_raw_parts`](https://github.com/rust-lang/rust/pull/97506/)
3559- [Partial stabilization of `once_cell`](https://github.com/rust-lang/rust/pull/105587/)
3560- [Stabilize `nonzero_min_max`](https://github.com/rust-lang/rust/pull/106633/)
3561- [Flatten/inline format_args!() and (string and int) literal arguments into format_args!()](https://github.com/rust-lang/rust/pull/106824/)
3562- [Stabilize movbe target feature](https://github.com/rust-lang/rust/pull/107711/)
3563- [don't splice from files into pipes in io::copy](https://github.com/rust-lang/rust/pull/108283/)
3564- [Add a builtin unstable `FnPtr` trait that is implemented for all function pointers](https://github.com/rust-lang/rust/pull/108080/)
3565 This extends `Debug`, `Pointer`, `Hash`, `PartialEq`, `Eq`, `PartialOrd`, and `Ord`
3566 implementations for function pointers with all ABIs.
3567
3568<a id="1.70.0-Stabilized-APIs"></a>
3569
3570Stabilized APIs
3571---------------
3572
3573- [`NonZero*::MIN/MAX`](https://doc.rust-lang.org/stable/std/num/struct.NonZeroI8.html#associatedconstant.MIN)
3574- [`BinaryHeap::retain`](https://doc.rust-lang.org/stable/std/collections/struct.BinaryHeap.html#method.retain)
3575- [`Default for std::collections::binary_heap::IntoIter`](https://doc.rust-lang.org/stable/std/collections/binary_heap/struct.IntoIter.html)
3576- [`Default for std::collections::btree_map::{IntoIter, Iter, IterMut}`](https://doc.rust-lang.org/stable/std/collections/btree_map/struct.IntoIter.html)
3577- [`Default for std::collections::btree_map::{IntoKeys, Keys}`](https://doc.rust-lang.org/stable/std/collections/btree_map/struct.IntoKeys.html)
3578- [`Default for std::collections::btree_map::{IntoValues, Values}`](https://doc.rust-lang.org/stable/std/collections/btree_map/struct.IntoValues.html)
3579- [`Default for std::collections::btree_map::Range`](https://doc.rust-lang.org/stable/std/collections/btree_map/struct.Range.html)
3580- [`Default for std::collections::btree_set::{IntoIter, Iter}`](https://doc.rust-lang.org/stable/std/collections/btree_set/struct.IntoIter.html)
3581- [`Default for std::collections::btree_set::Range`](https://doc.rust-lang.org/stable/std/collections/btree_set/struct.Range.html)
3582- [`Default for std::collections::linked_list::{IntoIter, Iter, IterMut}`](https://doc.rust-lang.org/stable/alloc/collections/linked_list/struct.IntoIter.html)
3583- [`Default for std::vec::IntoIter`](https://doc.rust-lang.org/stable/alloc/vec/struct.IntoIter.html#impl-Default-for-IntoIter%3CT,+A%3E)
3584- [`Default for std::iter::Chain`](https://doc.rust-lang.org/stable/std/iter/struct.Chain.html)
3585- [`Default for std::iter::Cloned`](https://doc.rust-lang.org/stable/std/iter/struct.Cloned.html)
3586- [`Default for std::iter::Copied`](https://doc.rust-lang.org/stable/std/iter/struct.Copied.html)
3587- [`Default for std::iter::Enumerate`](https://doc.rust-lang.org/stable/std/iter/struct.Enumerate.html)
3588- [`Default for std::iter::Flatten`](https://doc.rust-lang.org/stable/std/iter/struct.Flatten.html)
3589- [`Default for std::iter::Fuse`](https://doc.rust-lang.org/stable/std/iter/struct.Fuse.html)
3590- [`Default for std::iter::Rev`](https://doc.rust-lang.org/stable/std/iter/struct.Rev.html)
3591- [`Default for std::slice::Iter`](https://doc.rust-lang.org/stable/std/slice/struct.Iter.html)
3592- [`Default for std::slice::IterMut`](https://doc.rust-lang.org/stable/std/slice/struct.IterMut.html)
3593- [`Rc::into_inner`](https://doc.rust-lang.org/stable/alloc/rc/struct.Rc.html#method.into_inner)
3594- [`Arc::into_inner`](https://doc.rust-lang.org/stable/alloc/sync/struct.Arc.html#method.into_inner)
3595- [`std::cell::OnceCell`](https://doc.rust-lang.org/stable/std/cell/struct.OnceCell.html)
3596- [`Option::is_some_and`](https://doc.rust-lang.org/stable/std/option/enum.Option.html#method.is_some_and)
3597- [`NonNull::slice_from_raw_parts`](https://doc.rust-lang.org/stable/std/ptr/struct.NonNull.html#method.slice_from_raw_parts)
3598- [`Result::is_ok_and`](https://doc.rust-lang.org/stable/std/result/enum.Result.html#method.is_ok_and)
3599- [`Result::is_err_and`](https://doc.rust-lang.org/stable/std/result/enum.Result.html#method.is_err_and)
3600- [`std::sync::atomic::Atomic*::as_ptr`](https://doc.rust-lang.org/stable/std/sync/atomic/struct.AtomicU8.html#method.as_ptr)
3601- [`std::io::IsTerminal`](https://doc.rust-lang.org/stable/std/io/trait.IsTerminal.html)
3602- [`std::os::linux::net::SocketAddrExt`](https://doc.rust-lang.org/stable/std/os/linux/net/trait.SocketAddrExt.html)
3603- [`std::os::unix::net::UnixDatagram::bind_addr`](https://doc.rust-lang.org/stable/std/os/unix/net/struct.UnixDatagram.html#method.bind_addr)
3604- [`std::os::unix::net::UnixDatagram::connect_addr`](https://doc.rust-lang.org/stable/std/os/unix/net/struct.UnixDatagram.html#method.connect_addr)
3605- [`std::os::unix::net::UnixDatagram::send_to_addr`](https://doc.rust-lang.org/stable/std/os/unix/net/struct.UnixDatagram.html#method.send_to_addr)
3606- [`std::os::unix::net::UnixListener::bind_addr`](https://doc.rust-lang.org/stable/std/os/unix/net/struct.UnixListener.html#method.bind_addr)
3607- [`std::path::Path::as_mut_os_str`](https://doc.rust-lang.org/stable/std/path/struct.Path.html#method.as_mut_os_str)
3608- [`std::sync::OnceLock`](https://doc.rust-lang.org/stable/std/sync/struct.OnceLock.html)
3609
3610<a id="1.70.0-Cargo"></a>
3611
3612Cargo
3613-----
3614
3615- [Add `CARGO_PKG_README`](https://github.com/rust-lang/cargo/pull/11645/)
3616- [Make `sparse` the default protocol for crates.io](https://github.com/rust-lang/cargo/pull/11791/)
3617- [Accurately show status when downgrading dependencies](https://github.com/rust-lang/cargo/pull/11839/)
3618- [Use registry.default for login/logout](https://github.com/rust-lang/cargo/pull/11949/)
3619- [Stabilize `cargo logout`](https://github.com/rust-lang/cargo/pull/11950/)
3620
3621<a id="1.70.0-Misc"></a>
3622
3623Misc
3624----
3625
3626- [Stabilize rustdoc `--test-run-directory`](https://github.com/rust-lang/rust/pull/103682/)
3627
3628<a id="1.70.0-Compatibility-Notes"></a>
3629
3630Compatibility Notes
3631-------------------
3632
3633- [Prevent stable `libtest` from supporting `-Zunstable-options`](https://github.com/rust-lang/rust/pull/109044/)
3634- [Perform const and unsafe checking for expressions in `let _ = expr` position.](https://github.com/rust-lang/rust/pull/102256/)
3635- [WebAssembly targets enable `sign-ext` and `mutable-globals` features in codegen](https://github.com/rust-lang/rust/issues/109807)
3636 This may cause incompatibility with older execution environments.
3637- [Insert alignment checks for pointer dereferences as debug assertions](https://github.com/rust-lang/rust/pull/98112)
3638 This catches undefined behavior at runtime, and may cause existing code to fail.
3639
3640<a id="1.70.0-Internal-Changes"></a>
3641
3642Internal Changes
3643----------------
3644
3645These changes do not affect any public interfaces of Rust, but they represent
3646significant improvements to the performance or internals of rustc and related
3647tools.
3648
3649- [Upgrade to LLVM 16](https://github.com/rust-lang/rust/pull/109474/)
3650- [Use SipHash-1-3 instead of SipHash-2-4 for StableHasher](https://github.com/rust-lang/rust/pull/107925/)
3651
3652Version 1.69.0 (2023-04-20)
3653==========================
3654
3655<a id="1.69.0-Language"></a>
3656
3657Language
3658--------
3659
3660- [Deriving built-in traits on packed structs works with `Copy` fields.](https://github.com/rust-lang/rust/pull/104429/)
3661- [Stabilize the `cmpxchg16b` target feature on x86 and x86_64.](https://github.com/rust-lang/rust/pull/106774/)
3662- [Improve analysis of trait bounds for associated types.](https://github.com/rust-lang/rust/pull/103695/)
3663- [Allow associated types to be used as union fields.](https://github.com/rust-lang/rust/pull/106938/)
3664- [Allow `Self: Autotrait` bounds on dyn-safe trait methods.](https://github.com/rust-lang/rust/pull/107082/)
3665- [Treat `str` as containing `[u8]` for auto trait purposes.](https://github.com/rust-lang/rust/pull/107941/)
3666
3667<a id="1.69.0-Compiler"></a>
3668
3669Compiler
3670--------
3671
3672- [Upgrade `*-pc-windows-gnu` on CI to mingw-w64 v10 and GCC 12.2.](https://github.com/rust-lang/rust/pull/100178/)
3673- [Rework min_choice algorithm of member constraints.](https://github.com/rust-lang/rust/pull/105300/)
3674- [Support `true` and `false` as boolean flags in compiler arguments.](https://github.com/rust-lang/rust/pull/107043/)
3675- [Default `repr(C)` enums to `c_int` size.](https://github.com/rust-lang/rust/pull/107592/)
3676
3677<a id="1.69.0-Libraries"></a>
3678
3679Libraries
3680---------
3681
3682- [Implement the unstable `DispatchFromDyn` for cell types, allowing downstream experimentation with custom method receivers.](https://github.com/rust-lang/rust/pull/97373/)
3683- [Document that `fmt::Arguments::as_str()` may return `Some(_)` in more cases after optimization, subject to change.](https://github.com/rust-lang/rust/pull/106823/)
3684- [Implement `AsFd` and `AsRawFd` for `Rc`.](https://github.com/rust-lang/rust/pull/107317/)
3685
3686<a id="1.69.0-Stabilized-APIs"></a>
3687
3688Stabilized APIs
3689---------------
3690
3691- [`CStr::from_bytes_until_nul`](https://doc.rust-lang.org/stable/core/ffi/struct.CStr.html#method.from_bytes_until_nul)
3692- [`core::ffi::FromBytesUntilNulError`](https://doc.rust-lang.org/stable/core/ffi/struct.FromBytesUntilNulError.html)
3693
3694These APIs are now stable in const contexts:
3695
3696- [`SocketAddr::new`](https://doc.rust-lang.org/stable/std/net/enum.SocketAddr.html#method.new)
3697- [`SocketAddr::ip`](https://doc.rust-lang.org/stable/std/net/enum.SocketAddr.html#method.ip)
3698- [`SocketAddr::port`](https://doc.rust-lang.org/stable/std/net/enum.SocketAddr.html#method.port)
3699- [`SocketAddr::is_ipv4`](https://doc.rust-lang.org/stable/std/net/enum.SocketAddr.html#method.is_ipv4)
3700- [`SocketAddr::is_ipv6`](https://doc.rust-lang.org/stable/std/net/enum.SocketAddr.html#method.is_ipv6)
3701- [`SocketAddrV4::new`](https://doc.rust-lang.org/stable/std/net/struct.SocketAddrV4.html#method.new)
3702- [`SocketAddrV4::ip`](https://doc.rust-lang.org/stable/std/net/struct.SocketAddrV4.html#method.ip)
3703- [`SocketAddrV4::port`](https://doc.rust-lang.org/stable/std/net/struct.SocketAddrV4.html#method.port)
3704- [`SocketAddrV6::new`](https://doc.rust-lang.org/stable/std/net/struct.SocketAddrV6.html#method.new)
3705- [`SocketAddrV6::ip`](https://doc.rust-lang.org/stable/std/net/struct.SocketAddrV6.html#method.ip)
3706- [`SocketAddrV6::port`](https://doc.rust-lang.org/stable/std/net/struct.SocketAddrV6.html#method.port)
3707- [`SocketAddrV6::flowinfo`](https://doc.rust-lang.org/stable/std/net/struct.SocketAddrV6.html#method.flowinfo)
3708- [`SocketAddrV6::scope_id`](https://doc.rust-lang.org/stable/std/net/struct.SocketAddrV6.html#method.scope_id)
3709
3710<a id="1.69.0-Cargo"></a>
3711
3712Cargo
3713-----
3714
3715- [Cargo now suggests `cargo fix` or `cargo clippy --fix` when compilation warnings are auto-fixable.](https://github.com/rust-lang/cargo/pull/11558/)
3716- [Cargo now suggests `cargo add` if you try to install a library crate.](https://github.com/rust-lang/cargo/pull/11410/)
3717- [Cargo now sets the `CARGO_BIN_NAME` environment variable also for binary examples.](https://github.com/rust-lang/cargo/pull/11705/)
3718
3719<a id="1.69.0-Rustdoc"></a>
3720
3721Rustdoc
3722-----
3723
3724- [Vertically compact trait bound formatting.](https://github.com/rust-lang/rust/pull/102842/)
3725- [Only include stable lints in `rustdoc::all` group.](https://github.com/rust-lang/rust/pull/106316/)
3726- [Compute maximum Levenshtein distance based on the query.](https://github.com/rust-lang/rust/pull/107141/)
3727- [Remove inconsistently-present sidebar tooltips.](https://github.com/rust-lang/rust/pull/107490/)
3728- [Search by macro when query ends with `!`.](https://github.com/rust-lang/rust/pull/108143/)
3729
3730<a id="1.69.0-Compatibility-Notes"></a>
3731
3732Compatibility Notes
3733-------------------
3734
3735- [The `rust-analysis` component from `rustup` now only contains a warning placeholder.](https://github.com/rust-lang/rust/pull/101841/) This was primarily intended for RLS, and the corresponding `-Zsave-analysis` flag has been removed from the compiler as well.
3736- [Unaligned references to packed fields are now a hard error.](https://github.com/rust-lang/rust/pull/102513/) This has been a warning since 1.53, and denied by default with a future-compatibility warning since 1.62.
3737- [Update the minimum external LLVM to 14.](https://github.com/rust-lang/rust/pull/107573/)
3738- [Cargo now emits errors on invalid characters in a registry token.](https://github.com/rust-lang/cargo/pull/11600/)
3739- [When `default-features` is set to false of a workspace dependency, and an inherited dependency of a member has `default-features = true`, Cargo will enable default features of that dependency.](https://github.com/rust-lang/cargo/pull/11409/)
3740- [Cargo denies `CARGO_HOME` in the `[env]` configuration table. Cargo itself doesn't pick up this value, but recursive calls to cargo would, which was not intended.](https://github.com/rust-lang/cargo/pull/11644/)
3741- [Debuginfo for build dependencies is now off if not explicitly set. This is expected to improve the overall build time.](https://github.com/rust-lang/cargo/pull/11252/)
3742- [The Rust distribution no longer always includes rustdoc](https://github.com/rust-lang/rust/pull/106886)
3743 If `tools = [...]` is set in bootstrap.toml, we will respect a missing rustdoc in that list. By
3744 default rustdoc remains included. To retain the prior behavior explicitly add `"rustdoc"` to the
3745 list.
3746
3747<a id="1.69.0-Internal-Changes"></a>
3748
3749Internal Changes
3750----------------
3751
3752These changes do not affect any public interfaces of Rust, but they represent
3753significant improvements to the performance or internals of rustc and related
3754tools.
3755
3756- [Move `format_args!()` into AST (and expand it during AST lowering)](https://github.com/rust-lang/rust/pull/106745/)
3757
3758Version 1.68.2 (2023-03-28)
3759===========================
3760
3761- [Update the GitHub RSA host key bundled within Cargo](https://github.com/rust-lang/cargo/pull/11883).
3762 The key was [rotated by GitHub](https://github.blog/2023-03-23-we-updated-our-rsa-ssh-host-key/)
3763 on 2023-03-24 after the old one leaked.
3764- [Mark the old GitHub RSA host key as revoked](https://github.com/rust-lang/cargo/pull/11889).
3765 This will prevent Cargo from accepting the leaked key even when trusted by
3766 the system.
3767- [Add support for `@revoked` and a better error message for `@cert-authority` in Cargo's SSH host key verification](https://github.com/rust-lang/cargo/pull/11635)
3768
3769Version 1.68.1 (2023-03-23)
3770===========================
3771
3772- [Fix miscompilation in produced Windows MSVC artifacts](https://github.com/rust-lang/rust/pull/109094)
3773 This was introduced by enabling ThinLTO for the distributed rustc which led
3774 to miscompilations in the resulting binary. Currently this is believed to be
3775 limited to the -Zdylib-lto flag used for rustc compilation, rather than a
3776 general bug in ThinLTO, so only rustc artifacts should be affected.
3777- [Fix --enable-local-rust builds](https://github.com/rust-lang/rust/pull/109111/)
3778- [Treat `$prefix-clang` as `clang` in linker detection code](https://github.com/rust-lang/rust/pull/109156)
3779- [Fix panic in compiler code](https://github.com/rust-lang/rust/pull/108162)
3780
3781Version 1.68.0 (2023-03-09)
3782==========================
3783
3784<a id="1.68.0-Language"></a>
3785
3786Language
3787--------
3788
3789- [Stabilize default_alloc_error_handler](https://github.com/rust-lang/rust/pull/102318/)
3790 This allows usage of `alloc` on stable without requiring the
3791 definition of a handler for allocation failure. Defining custom handlers is still unstable.
3792- [Stabilize `efiapi` calling convention.](https://github.com/rust-lang/rust/pull/105795/)
3793- [Remove implicit promotion for types with drop glue](https://github.com/rust-lang/rust/pull/105085/)
3794
3795<a id="1.68.0-Compiler"></a>
3796
3797Compiler
3798--------
3799
3800- [Change `bindings_with_variant_name` to deny-by-default](https://github.com/rust-lang/rust/pull/104154/)
3801- [Allow .. to be parsed as let initializer](https://github.com/rust-lang/rust/pull/105701/)
3802- [Add `armv7-sony-vita-newlibeabihf` as a tier 3 target](https://github.com/rust-lang/rust/pull/105712/)
3803- [Always check alignment during compile-time const evaluation](https://github.com/rust-lang/rust/pull/104616/)
3804- [Disable "split dwarf inlining" by default.](https://github.com/rust-lang/rust/pull/106709/)
3805- [Add vendor to Fuchsia's target triple](https://github.com/rust-lang/rust/pull/106429/)
3806- [Enable sanitizers for s390x-linux](https://github.com/rust-lang/rust/pull/107127/)
3807
3808<a id="1.68.0-Libraries"></a>
3809
3810Libraries
3811---------
3812
3813- [Loosen the bound on the Debug implementation of Weak.](https://github.com/rust-lang/rust/pull/90291/)
3814- [Make `std::task::Context` !Send and !Sync](https://github.com/rust-lang/rust/pull/95985/)
3815- [PhantomData layout guarantees](https://github.com/rust-lang/rust/pull/104081/)
3816- [Don't derive Debug for `OnceWith` & `RepeatWith`](https://github.com/rust-lang/rust/pull/104163/)
3817- [Implement DerefMut for PathBuf](https://github.com/rust-lang/rust/pull/105018/)
3818- [Add O(1) `Vec -> VecDeque` conversion guarantee](https://github.com/rust-lang/rust/pull/105128/)
3819- [Leak amplification for peek_mut() to ensure BinaryHeap's invariant is always met](https://github.com/rust-lang/rust/pull/105851/)
3820
3821<a id="1.68.0-Stabilized-APIs"></a>
3822
3823Stabilized APIs
3824---------------
3825
3826- [`{core,std}::pin::pin!`](https://doc.rust-lang.org/stable/std/pin/macro.pin.html)
3827- [`impl From<bool> for {f32,f64}`](https://doc.rust-lang.org/stable/std/primitive.f32.html#impl-From%3Cbool%3E-for-f32)
3828- [`std::path::MAIN_SEPARATOR_STR`](https://doc.rust-lang.org/stable/std/path/constant.MAIN_SEPARATOR_STR.html)
3829- [`impl DerefMut for PathBuf`](https://doc.rust-lang.org/stable/std/path/struct.PathBuf.html#impl-DerefMut-for-PathBuf)
3830
3831These APIs are now stable in const contexts:
3832
3833- [`VecDeque::new`](https://doc.rust-lang.org/stable/std/collections/struct.VecDeque.html#method.new)
3834
3835<a id="1.68.0-Cargo"></a>
3836
3837Cargo
3838-----
3839
3840- [Stabilize sparse registry support for crates.io](https://github.com/rust-lang/cargo/pull/11224/)
3841- [`cargo build --verbose` tells you more about why it recompiles.](https://github.com/rust-lang/cargo/pull/11407/)
3842- [Show progress of crates.io index update even `net.git-fetch-with-cli` option enabled](https://github.com/rust-lang/cargo/pull/11579/)
3843
3844<a id="1.68.0-Misc"></a>
3845
3846Misc
3847----
3848
3849<a id="1.68.0-Compatibility-Notes"></a>
3850
3851Compatibility Notes
3852-------------------
3853
3854- [Only support Android NDK 25 or newer](https://blog.rust-lang.org/2023/01/09/android-ndk-update-r25.html)
3855- [Add `SEMICOLON_IN_EXPRESSIONS_FROM_MACROS` to future-incompat report](https://github.com/rust-lang/rust/pull/103418/)
3856- [Only specify `--target` by default for `-Zgcc-ld=lld` on wasm](https://github.com/rust-lang/rust/pull/101792/)
3857- [Bump `IMPLIED_BOUNDS_ENTAILMENT` to Deny + ReportNow](https://github.com/rust-lang/rust/pull/106465/)
3858- [`std::task::Context` no longer implements Send and Sync](https://github.com/rust-lang/rust/pull/95985)
3859
3860<a id="1.68.0-Internal-Changes"></a>
3861
3862Internal Changes
3863----------------
3864
3865These changes do not affect any public interfaces of Rust, but they represent
3866significant improvements to the performance or internals of rustc and related
3867tools.
3868
3869- [Encode spans relative to the enclosing item](https://github.com/rust-lang/rust/pull/84762/)
3870- [Don't normalize in AstConv](https://github.com/rust-lang/rust/pull/101947/)
3871- [Find the right lower bound region in the scenario of partial order relations](https://github.com/rust-lang/rust/pull/104765/)
3872- [Fix impl block in const expr](https://github.com/rust-lang/rust/pull/104889/)
3873- [Check ADT fields for copy implementations considering regions](https://github.com/rust-lang/rust/pull/105102/)
3874- [rustdoc: simplify JS search routine by not messing with lev distance](https://github.com/rust-lang/rust/pull/105796/)
3875- [Enable ThinLTO for rustc on `x86_64-pc-windows-msvc`](https://github.com/rust-lang/rust/pull/103591/)
3876- [Enable ThinLTO for rustc on `x86_64-apple-darwin`](https://github.com/rust-lang/rust/pull/103647/)
3877
3878Version 1.67.1 (2023-02-09)
3879===========================
3880
3881- [Fix interoperability with thin archives.](https://github.com/rust-lang/rust/pull/107360)
3882- [Fix an internal error in the compiler build process.](https://github.com/rust-lang/rust/pull/105624)
3883- [Downgrade `clippy::uninlined_format_args` to pedantic.](https://github.com/rust-lang/rust-clippy/pull/10265)
3884
3885Version 1.67.0 (2023-01-26)
3886==========================
3887
3888<a id="1.67.0-Language"></a>
3889
3890Language
3891--------
3892
3893- [Make `Sized` predicates coinductive, allowing cycles.](https://github.com/rust-lang/rust/pull/100386/)
3894- [`#[must_use]` annotations on `async fn` also affect the `Future::Output`.](https://github.com/rust-lang/rust/pull/100633/)
3895- [Elaborate supertrait obligations when deducing closure signatures.](https://github.com/rust-lang/rust/pull/101834/)
3896- [Invalid literals are no longer an error under `cfg(FALSE)`.](https://github.com/rust-lang/rust/pull/102944/)
3897- [Unreserve braced enum variants in value namespace.](https://github.com/rust-lang/rust/pull/103578/)
3898
3899<a id="1.67.0-Compiler"></a>
3900
3901Compiler
3902--------
3903
3904- [Enable varargs support for calling conventions other than `C` or `cdecl`.](https://github.com/rust-lang/rust/pull/97971/)
3905- [Add new MIR constant propagation based on dataflow analysis.](https://github.com/rust-lang/rust/pull/101168/)
3906- [Optimize field ordering by grouping m\*2^n-sized fields with equivalently aligned ones.](https://github.com/rust-lang/rust/pull/102750/)
3907- [Stabilize native library modifier `verbatim`.](https://github.com/rust-lang/rust/pull/104360/)
3908
3909Added, updated, and removed targets:
3910
3911- [Add a tier 3 target for PowerPC on AIX](https://github.com/rust-lang/rust/pull/102293/), `powerpc64-ibm-aix`.
3912- [Add a tier 3 target for the Sony PlayStation 1](https://github.com/rust-lang/rust/pull/102689/), `mipsel-sony-psx`.
3913- [Add tier 3 `no_std` targets for the QNX Neutrino RTOS](https://github.com/rust-lang/rust/pull/102701/),
3914 `aarch64-unknown-nto-qnx710` and `x86_64-pc-nto-qnx710`.
3915- [Promote UEFI targets to tier 2](https://github.com/rust-lang/rust/pull/103933/), `aarch64-unknown-uefi`, `i686-unknown-uefi`, and `x86_64-unknown-uefi`.
3916- [Remove tier 3 `linuxkernel` targets](https://github.com/rust-lang/rust/pull/104015/) (not used by the actual kernel).
3917
3918Refer to Rust's [platform support page][platform-support-doc]
3919for more information on Rust's tiered platform support.
3920
3921<a id="1.67.0-Libraries"></a>
3922
3923Libraries
3924---------
3925
3926- [Merge `crossbeam-channel` into `std::sync::mpsc`.](https://github.com/rust-lang/rust/pull/93563/)
3927- [Fix inconsistent rounding of 0.5 when formatted to 0 decimal places.](https://github.com/rust-lang/rust/pull/102935/)
3928- [Derive `Eq` and `Hash` for `ControlFlow`.](https://github.com/rust-lang/rust/pull/103084/)
3929- [Don't build `compiler_builtins` with `-C panic=abort`.](https://github.com/rust-lang/rust/pull/103786/)
3930
3931<a id="1.67.0-Stabilized-APIs"></a>
3932
3933Stabilized APIs
3934---------------
3935
3936- [`{integer}::checked_ilog`](https://doc.rust-lang.org/stable/std/primitive.i32.html#method.checked_ilog)
3937- [`{integer}::checked_ilog2`](https://doc.rust-lang.org/stable/std/primitive.i32.html#method.checked_ilog2)
3938- [`{integer}::checked_ilog10`](https://doc.rust-lang.org/stable/std/primitive.i32.html#method.checked_ilog10)
3939- [`{integer}::ilog`](https://doc.rust-lang.org/stable/std/primitive.i32.html#method.ilog)
3940- [`{integer}::ilog2`](https://doc.rust-lang.org/stable/std/primitive.i32.html#method.ilog2)
3941- [`{integer}::ilog10`](https://doc.rust-lang.org/stable/std/primitive.i32.html#method.ilog10)
3942- [`NonZeroU*::ilog2`](https://doc.rust-lang.org/stable/std/num/struct.NonZeroU32.html#method.ilog2)
3943- [`NonZeroU*::ilog10`](https://doc.rust-lang.org/stable/std/num/struct.NonZeroU32.html#method.ilog10)
3944- [`NonZero*::BITS`](https://doc.rust-lang.org/stable/std/num/struct.NonZeroU32.html#associatedconstant.BITS)
3945
3946These APIs are now stable in const contexts:
3947
3948- [`char::from_u32`](https://doc.rust-lang.org/stable/std/primitive.char.html#method.from_u32)
3949- [`char::from_digit`](https://doc.rust-lang.org/stable/std/primitive.char.html#method.from_digit)
3950- [`char::to_digit`](https://doc.rust-lang.org/stable/std/primitive.char.html#method.to_digit)
3951- [`core::char::from_u32`](https://doc.rust-lang.org/stable/core/char/fn.from_u32.html)
3952- [`core::char::from_digit`](https://doc.rust-lang.org/stable/core/char/fn.from_digit.html)
3953
3954<a id="1.67.0-Compatibility-Notes"></a>
3955
3956Compatibility Notes
3957-------------------
3958
3959- [The layout of `repr(Rust)` types now groups m\*2^n-sized fields with
3960 equivalently aligned ones.](https://github.com/rust-lang/rust/pull/102750/)
3961 This is intended to be an optimization, but it is also known to increase type
3962 sizes in a few cases for the placement of enum tags. As a reminder, the layout
3963 of `repr(Rust)` types is an implementation detail, subject to change.
3964- [0.5 now rounds to 0 when formatted to 0 decimal places.](https://github.com/rust-lang/rust/pull/102935/)
3965 This makes it consistent with the rest of floating point formatting that
3966 rounds ties toward even digits.
3967- [Chains of `&&` and `||` will now drop temporaries from their sub-expressions in
3968 evaluation order, left-to-right.](https://github.com/rust-lang/rust/pull/103293/)
3969 Previously, it was "twisted" such that the _first_ expression dropped its
3970 temporaries _last_, after all of the other expressions dropped in order.
3971- [Underscore suffixes on string literals are now a hard error.](https://github.com/rust-lang/rust/pull/103914/)
3972 This has been a future-compatibility warning since 1.20.0.
3973- [Stop passing `-export-dynamic` to `wasm-ld`.](https://github.com/rust-lang/rust/pull/105405/)
3974- [`main` is now mangled as `__main_void` on `wasm32-wasi`.](https://github.com/rust-lang/rust/pull/105468/)
3975- [Cargo now emits an error if there are multiple registries in the configuration
3976 with the same index URL.](https://github.com/rust-lang/cargo/pull/10592)
3977
3978<a id="1.67.0-Internal-Changes"></a>
3979
3980Internal Changes
3981----------------
3982
3983These changes do not affect any public interfaces of Rust, but they represent
3984significant improvements to the performance or internals of rustc and related
3985tools.
3986
3987- [Rewrite LLVM's archive writer in Rust.](https://github.com/rust-lang/rust/pull/97485/)
3988
3989Version 1.66.1 (2023-01-10)
3990===========================
3991
3992- Added validation of SSH host keys for git URLs in Cargo ([CVE-2022-46176](https://www.cve.org/CVERecord?id=CVE-2022-46176))
3993
3994Version 1.66.0 (2022-12-15)
3995==========================
3996
3997Language
3998--------
3999- [Permit specifying explicit discriminants on all `repr(Int)` enums](https://github.com/rust-lang/rust/pull/95710/)
4000 ```rust
4001 #[repr(u8)]
4002 enum Foo {
4003 A(u8) = 0,
4004 B(i8) = 1,
4005 C(bool) = 42,
4006 }
4007 ```
4008- [Allow transmutes between the same type differing only in lifetimes](https://github.com/rust-lang/rust/pull/101520/)
4009- [Change constant evaluation errors from a deny-by-default lint to a hard error](https://github.com/rust-lang/rust/pull/102091/)
4010- [Trigger `must_use` on `impl Trait` for supertraits](https://github.com/rust-lang/rust/pull/102287/)
4011 This makes `impl ExactSizeIterator` respect the existing `#[must_use]` annotation on `Iterator`.
4012- [Allow `..=X` in patterns](https://github.com/rust-lang/rust/pull/102275/)
4013- [Uplift `clippy::for_loops_over_fallibles` lint into rustc](https://github.com/rust-lang/rust/pull/99696/)
4014- [Stabilize `sym` operands in inline assembly](https://github.com/rust-lang/rust/pull/103168/)
4015- [Update to Unicode 15](https://github.com/rust-lang/rust/pull/101912/)
4016- [Opaque types no longer imply lifetime bounds](https://github.com/rust-lang/rust/pull/95474/)
4017 This is a soundness fix which may break code that was erroneously relying on this behavior.
4018
4019Compiler
4020--------
4021- [Add armv5te-none-eabi and thumbv5te-none-eabi tier 3 targets](https://github.com/rust-lang/rust/pull/101329/)
4022 - Refer to Rust's [platform support page][platform-support-doc] for more
4023 information on Rust's tiered platform support.
4024- [Add support for linking against macOS universal libraries](https://github.com/rust-lang/rust/pull/98736)
4025
4026Libraries
4027---------
4028- [Fix `#[derive(Default)]` on a generic `#[default]` enum adding unnecessary `Default` bounds](https://github.com/rust-lang/rust/pull/101040/)
4029- [Update to Unicode 15](https://github.com/rust-lang/rust/pull/101821/)
4030
4031Stabilized APIs
4032---------------
4033
4034- [`proc_macro::Span::source_text`](https://doc.rust-lang.org/stable/proc_macro/struct.Span.html#method.source_text)
4035- [`uX::{checked_add_signed, overflowing_add_signed, saturating_add_signed, wrapping_add_signed}`](https://doc.rust-lang.org/stable/std/primitive.u8.html#method.checked_add_signed)
4036- [`iX::{checked_add_unsigned, overflowing_add_unsigned, saturating_add_unsigned, wrapping_add_unsigned}`](https://doc.rust-lang.org/stable/std/primitive.i8.html#method.checked_add_unsigned)
4037- [`iX::{checked_sub_unsigned, overflowing_sub_unsigned, saturating_sub_unsigned, wrapping_sub_unsigned}`](https://doc.rust-lang.org/stable/std/primitive.i8.html#method.checked_sub_unsigned)
4038- [`BTreeSet::{first, last, pop_first, pop_last}`](https://doc.rust-lang.org/stable/std/collections/struct.BTreeSet.html#method.first)
4039- [`BTreeMap::{first_key_value, last_key_value, first_entry, last_entry, pop_first, pop_last}`](https://doc.rust-lang.org/stable/std/collections/struct.BTreeMap.html#method.first_key_value)
4040- [Add `AsFd` implementations for stdio lock types on WASI.](https://github.com/rust-lang/rust/pull/101768/)
4041- [`impl TryFrom<Vec<T>> for Box<[T; N]>`](https://doc.rust-lang.org/stable/std/boxed/struct.Box.html#impl-TryFrom%3CVec%3CT%2C%20Global%3E%3E-for-Box%3C%5BT%3B%20N%5D%2C%20Global%3E)
4042- [`core::hint::black_box`](https://doc.rust-lang.org/stable/std/hint/fn.black_box.html)
4043- [`Duration::try_from_secs_{f32,f64}`](https://doc.rust-lang.org/stable/std/time/struct.Duration.html#method.try_from_secs_f32)
4044- [`Option::unzip`](https://doc.rust-lang.org/stable/std/option/enum.Option.html#method.unzip)
4045- [`std::os::fd`](https://doc.rust-lang.org/stable/std/os/fd/index.html)
4046
4047
4048Rustdoc
4049-------
4050
4051- [Add Rustdoc warning for invalid HTML tags in the documentation](https://github.com/rust-lang/rust/pull/101720/)
4052
4053Cargo
4054-----
4055
4056- [Added `cargo remove` to remove dependencies from Cargo.toml](https://doc.rust-lang.org/nightly/cargo/commands/cargo-remove.html)
4057- [`cargo publish` now waits for the new version to be downloadable before exiting](https://github.com/rust-lang/cargo/pull/11062)
4058
4059See [detailed release notes](https://github.com/rust-lang/cargo/blob/master/CHANGELOG.md#cargo-166-2022-12-15) for more.
4060
4061Compatibility Notes
4062-------------------
4063
4064- [Only apply `ProceduralMasquerade` hack to older versions of `rental`](https://github.com/rust-lang/rust/pull/94063/)
4065- [Don't export `__heap_base` and `__data_end` on wasm32-wasi.](https://github.com/rust-lang/rust/pull/102385/)
4066- [Don't export `__wasm_init_memory` on WebAssembly.](https://github.com/rust-lang/rust/pull/102426/)
4067- [Only export `__tls_*` on wasm32-unknown-unknown.](https://github.com/rust-lang/rust/pull/102440/)
4068- [Don't link to `libresolv` in libstd on Darwin](https://github.com/rust-lang/rust/pull/102766/)
4069- [Update libstd's libc to 0.2.135 (to make `libstd` no longer pull in `libiconv.dylib` on Darwin)](https://github.com/rust-lang/rust/pull/103277/)
4070- [Opaque types no longer imply lifetime bounds](https://github.com/rust-lang/rust/pull/95474/)
4071 This is a soundness fix which may break code that was erroneously relying on this behavior.
4072- [Make `order_dependent_trait_objects` show up in future-breakage reports](https://github.com/rust-lang/rust/pull/102635/)
4073- [Change std::process::Command spawning to default to inheriting the parent's signal mask](https://github.com/rust-lang/rust/pull/101077/)
4074
4075Internal Changes
4076----------------
4077
4078These changes do not affect any public interfaces of Rust, but they represent
4079significant improvements to the performance or internals of rustc and related
4080tools.
4081
4082- [Enable BOLT for LLVM compilation](https://github.com/rust-lang/rust/pull/94381/)
4083- [Enable LTO for rustc_driver.so](https://github.com/rust-lang/rust/pull/101403/)
4084
4085Version 1.65.0 (2022-11-03)
4086==========================
4087
4088Language
4089--------
4090- [Error on `as` casts of enums with `#[non_exhaustive]` variants](https://github.com/rust-lang/rust/pull/92744/)
4091- [Stabilize `let else`](https://github.com/rust-lang/rust/pull/93628/)
4092- [Stabilize generic associated types (GATs)](https://github.com/rust-lang/rust/pull/96709/)
4093- [Add lints `let_underscore_drop` and `let_underscore_lock` from Clippy](https://github.com/rust-lang/rust/pull/97739/)
4094- [Stabilize `break`ing from arbitrary labeled blocks ("label-break-value")](https://github.com/rust-lang/rust/pull/99332/)
4095- [Uninitialized integers, floats, and raw pointers are now considered immediate UB](https://github.com/rust-lang/rust/pull/98919/).
4096 Usage of `MaybeUninit` is the correct way to work with uninitialized memory.
4097- [Stabilize raw-dylib for Windows x86_64, aarch64, and thumbv7a](https://github.com/rust-lang/rust/pull/99916/)
4098- [Do not allow `Drop` impl on foreign ADTs](https://github.com/rust-lang/rust/pull/99576/)
4099
4100Compiler
4101--------
4102- [Stabilize -Csplit-debuginfo on Linux](https://github.com/rust-lang/rust/pull/98051/)
4103- [Use niche-filling optimization even when multiple variants have data](https://github.com/rust-lang/rust/pull/94075/)
4104- [Associated type projections are now verified to be well-formed prior to resolving the underlying type](https://github.com/rust-lang/rust/pull/99217/#issuecomment-1209365630)
4105- [Stringify non-shorthand visibility correctly](https://github.com/rust-lang/rust/pull/100350/)
4106- [Normalize struct field types when unsizing](https://github.com/rust-lang/rust/pull/101831/)
4107- [Update to LLVM 15](https://github.com/rust-lang/rust/pull/99464/)
4108- [Fix aarch64 call abi to correctly zeroext when needed](https://github.com/rust-lang/rust/pull/97800/)
4109- [debuginfo: Generalize C++-like encoding for enums](https://github.com/rust-lang/rust/pull/98393/)
4110- [Add `special_module_name` lint](https://github.com/rust-lang/rust/pull/94467/)
4111- [Add support for generating unique profraw files by default when using `-C instrument-coverage`](https://github.com/rust-lang/rust/pull/100384/)
4112- [Allow dynamic linking for iOS/tvOS targets](https://github.com/rust-lang/rust/pull/100636/)
4113
4114New targets:
4115
4116- [Add armv4t-none-eabi as a tier 3 target](https://github.com/rust-lang/rust/pull/100244/)
4117- [Add powerpc64-unknown-openbsd and riscv64-unknown-openbsd as tier 3 targets](https://github.com/rust-lang/rust/pull/101025/)
4118 - Refer to Rust's [platform support page][platform-support-doc] for more
4119 information on Rust's tiered platform support.
4120
4121Libraries
4122---------
4123
4124- [Don't generate `PartialEq::ne` in derive(PartialEq)](https://github.com/rust-lang/rust/pull/98655/)
4125- [Windows RNG: Use `BCRYPT_RNG_ALG_HANDLE` by default](https://github.com/rust-lang/rust/pull/101325/)
4126- [Forbid mixing `System` with direct system allocator calls](https://github.com/rust-lang/rust/pull/101394/)
4127- [Document no support for writing to non-blocking stdio/stderr](https://github.com/rust-lang/rust/pull/101416/)
4128- [`std::layout::Layout` size must not overflow `isize::MAX` when rounded up to `align`](https://github.com/rust-lang/rust/pull/95295)
4129 This also changes the safety conditions on `Layout::from_size_align_unchecked`.
4130
4131Stabilized APIs
4132---------------
4133
4134- [`std::backtrace::Backtrace`](https://doc.rust-lang.org/stable/std/backtrace/struct.Backtrace.html)
4135- [`Bound::as_ref`](https://doc.rust-lang.org/stable/std/ops/enum.Bound.html#method.as_ref)
4136- [`std::io::read_to_string`](https://doc.rust-lang.org/stable/std/io/fn.read_to_string.html)
4137- [`<*const T>::cast_mut`](https://doc.rust-lang.org/stable/std/primitive.pointer.html#method.cast_mut)
4138- [`<*mut T>::cast_const`](https://doc.rust-lang.org/stable/std/primitive.pointer.html#method.cast_const)
4139
4140These APIs are now stable in const contexts:
4141
4142- [`<*const T>::offset_from`](https://doc.rust-lang.org/stable/std/primitive.pointer.html#method.offset_from)
4143- [`<*mut T>::offset_from`](https://doc.rust-lang.org/stable/std/primitive.pointer.html#method.offset_from)
4144
4145Cargo
4146-----
4147
4148- [Apply GitHub fast path even for partial hashes](https://github.com/rust-lang/cargo/pull/10807/)
4149- [Do not add home bin path to PATH if it's already there](https://github.com/rust-lang/cargo/pull/11023/)
4150- [Take priority into account within the pending queue](https://github.com/rust-lang/cargo/pull/11032/).
4151 This slightly optimizes job scheduling by Cargo, with typically small improvements on larger crate graph builds.
4152
4153Compatibility Notes
4154-------------------
4155
4156- [`std::layout::Layout` size must not overflow `isize::MAX` when rounded up to `align`](https://github.com/rust-lang/rust/pull/95295).
4157 This also changes the safety conditions on `Layout::from_size_align_unchecked`.
4158- [`PollFn` now only implements `Unpin` if the closure is `Unpin`](https://github.com/rust-lang/rust/pull/102737).
4159 This is a possible breaking change if users were relying on the blanket unpin implementation.
4160 See discussion on the PR for details of why this change was made.
4161- [Drop ExactSizeIterator impl from std::char::EscapeAscii](https://github.com/rust-lang/rust/pull/99880)
4162 This is a backwards-incompatible change to the standard library's surface
4163 area, but is unlikely to affect real world usage.
4164- [Do not consider a single repeated lifetime eligible for elision in the return type](https://github.com/rust-lang/rust/pull/103450)
4165 This behavior was unintentionally changed in 1.64.0, and this release reverts that change by making this an error again.
4166- [Reenable disabled early syntax gates as future-incompatibility lints](https://github.com/rust-lang/rust/pull/99935/)
4167- [Update the minimum external LLVM to 13](https://github.com/rust-lang/rust/pull/100460/)
4168- [Don't duplicate file descriptors into stdio fds](https://github.com/rust-lang/rust/pull/101426/)
4169- [Sunset RLS](https://github.com/rust-lang/rust/pull/100863/)
4170- [Deny usage of `#![cfg_attr(..., crate_type = ...)]` to set the crate type](https://github.com/rust-lang/rust/pull/99784/)
4171 This strengthens the forward compatibility lint deprecated_cfg_attr_crate_type_name to deny.
4172- [`llvm-has-rust-patches` allows setting the build system to treat the LLVM as having Rust-specific patches](https://github.com/rust-lang/rust/pull/101072)
4173 This option may need to be set for distributions that are building Rust with a patched LLVM via `llvm-config`, not the built-in LLVM.
4174- Combining three or more languages (e.g. Objective C, C++ and Rust) into one binary may hit linker limitations when using `lld`. For more information, see [issue 102754][102754].
4175
4176[102754]: https://github.com/rust-lang/rust/issues/102754
4177
4178Internal Changes
4179----------------
4180
4181These changes do not affect any public interfaces of Rust, but they represent
4182significant improvements to the performance or internals of rustc and related
4183tools.
4184
4185- [Add `x.sh` and `x.ps1` shell scripts](https://github.com/rust-lang/rust/pull/99992/)
4186- [compiletest: use target cfg instead of hard-coded tables](https://github.com/rust-lang/rust/pull/100260/)
4187- [Use object instead of LLVM for reading bitcode from rlibs](https://github.com/rust-lang/rust/pull/98100/)
4188- [Enable MIR inlining for optimized compilations](https://github.com/rust-lang/rust/pull/91743)
4189 This provides a 3-10% improvement in compiletimes for real world crates. See [perf results](https://perf.rust-lang.org/compare.html?start=aedf78e56b2279cc869962feac5153b6ba7001ed&end=0075bb4fad68e64b6d1be06bf2db366c30bc75e1&stat=instructions:u).
4190
4191Version 1.64.0 (2022-09-22)
4192===========================
4193
4194Language
4195--------
4196- [Unions with mutable references or tuples of allowed types are now allowed](https://github.com/rust-lang/rust/pull/97995/)
4197- It is now considered valid to deallocate memory pointed to by a shared reference `&T` [if every byte in `T` is inside an `UnsafeCell`](https://github.com/rust-lang/rust/pull/98017/)
4198- Unused tuple struct fields are now warned against in an allow-by-default lint, [`unused_tuple_struct_fields`](https://github.com/rust-lang/rust/pull/95977/), similar to the existing warning for unused struct fields. This lint will become warn-by-default in the future.
4199
4200Compiler
4201--------
4202- [Add Nintendo Switch as tier 3 target](https://github.com/rust-lang/rust/pull/88991/)
4203 - Refer to Rust's [platform support page][platform-support-doc] for more
4204 information on Rust's tiered platform support.
4205- [Only compile `#[used]` as llvm.compiler.used for ELF targets](https://github.com/rust-lang/rust/pull/93718/)
4206- [Add the `--diagnostic-width` compiler flag to define the terminal width.](https://github.com/rust-lang/rust/pull/95635/)
4207- [Add support for link-flavor `rust-lld` for iOS, tvOS and watchOS](https://github.com/rust-lang/rust/pull/98771/)
4208
4209Libraries
4210---------
4211- [Remove restrictions on compare-exchange memory ordering.](https://github.com/rust-lang/rust/pull/98383/)
4212- You can now `write!` or `writeln!` into an `OsString`: [Implement `fmt::Write` for `OsString`](https://github.com/rust-lang/rust/pull/97915/)
4213- [Make RwLockReadGuard covariant](https://github.com/rust-lang/rust/pull/96820/)
4214- [Implement `FusedIterator` for `std::net::[Into]Incoming`](https://github.com/rust-lang/rust/pull/97300/)
4215- [`impl<T: AsRawFd> AsRawFd for {Arc,Box}<T>`](https://github.com/rust-lang/rust/pull/97437/)
4216- [`ptr::copy` and `ptr::swap` are doing untyped copies](https://github.com/rust-lang/rust/pull/97712/)
4217- [Add cgroupv1 support to `available_parallelism`](https://github.com/rust-lang/rust/pull/97925/)
4218- [Mitigate many incorrect uses of `mem::uninitialized`](https://github.com/rust-lang/rust/pull/99182/)
4219
4220Stabilized APIs
4221---------------
4222
4223- [`future::IntoFuture`](https://doc.rust-lang.org/stable/std/future/trait.IntoFuture.html)
4224- [`future::poll_fn`](https://doc.rust-lang.org/stable/std/future/fn.poll_fn.html)
4225- [`task::ready!`](https://doc.rust-lang.org/stable/std/task/macro.ready.html)
4226- [`num::NonZero*::checked_mul`](https://doc.rust-lang.org/stable/std/num/struct.NonZeroUsize.html#method.checked_mul)
4227- [`num::NonZero*::checked_pow`](https://doc.rust-lang.org/stable/std/num/struct.NonZeroUsize.html#method.checked_pow)
4228- [`num::NonZero*::saturating_mul`](https://doc.rust-lang.org/stable/std/num/struct.NonZeroUsize.html#method.saturating_mul)
4229- [`num::NonZero*::saturating_pow`](https://doc.rust-lang.org/stable/std/num/struct.NonZeroUsize.html#method.saturating_pow)
4230- [`num::NonZeroI*::abs`](https://doc.rust-lang.org/stable/std/num/struct.NonZeroIsize.html#method.abs)
4231- [`num::NonZeroI*::checked_abs`](https://doc.rust-lang.org/stable/std/num/struct.NonZeroIsize.html#method.checked_abs)
4232- [`num::NonZeroI*::overflowing_abs`](https://doc.rust-lang.org/stable/std/num/struct.NonZeroIsize.html#method.overflowing_abs)
4233- [`num::NonZeroI*::saturating_abs`](https://doc.rust-lang.org/stable/std/num/struct.NonZeroIsize.html#method.saturating_abs)
4234- [`num::NonZeroI*::unsigned_abs`](https://doc.rust-lang.org/stable/std/num/struct.NonZeroIsize.html#method.unsigned_abs)
4235- [`num::NonZeroI*::wrapping_abs`](https://doc.rust-lang.org/stable/std/num/struct.NonZeroIsize.html#method.wrapping_abs)
4236- [`num::NonZeroU*::checked_add`](https://doc.rust-lang.org/stable/std/num/struct.NonZeroUsize.html#method.checked_add)
4237- [`num::NonZeroU*::checked_next_power_of_two`](https://doc.rust-lang.org/stable/std/num/struct.NonZeroUsize.html#method.checked_next_power_of_two)
4238- [`num::NonZeroU*::saturating_add`](https://doc.rust-lang.org/stable/std/num/struct.NonZeroUsize.html#method.saturating_add)
4239- [`os::unix::process::CommandExt::process_group`](https://doc.rust-lang.org/stable/std/os/unix/process/trait.CommandExt.html#tymethod.process_group)
4240- [`os::windows::fs::FileTypeExt::is_symlink_dir`](https://doc.rust-lang.org/stable/std/os/windows/fs/trait.FileTypeExt.html#tymethod.is_symlink_dir)
4241- [`os::windows::fs::FileTypeExt::is_symlink_file`](https://doc.rust-lang.org/stable/std/os/windows/fs/trait.FileTypeExt.html#tymethod.is_symlink_file)
4242
4243These types were previously stable in `std::ffi`, but are now also available in `core` and `alloc`:
4244
4245- [`core::ffi::CStr`](https://doc.rust-lang.org/stable/core/ffi/struct.CStr.html)
4246- [`core::ffi::FromBytesWithNulError`](https://doc.rust-lang.org/stable/core/ffi/struct.FromBytesWithNulError.html)
4247- [`alloc::ffi::CString`](https://doc.rust-lang.org/stable/alloc/ffi/struct.CString.html)
4248- [`alloc::ffi::FromVecWithNulError`](https://doc.rust-lang.org/stable/alloc/ffi/struct.FromVecWithNulError.html)
4249- [`alloc::ffi::IntoStringError`](https://doc.rust-lang.org/stable/alloc/ffi/struct.IntoStringError.html)
4250- [`alloc::ffi::NulError`](https://doc.rust-lang.org/stable/alloc/ffi/struct.NulError.html)
4251
4252These types were previously stable in `std::os::raw`, but are now also available in `core::ffi` and `std::ffi`:
4253
4254- [`ffi::c_char`](https://doc.rust-lang.org/stable/std/ffi/type.c_char.html)
4255- [`ffi::c_double`](https://doc.rust-lang.org/stable/std/ffi/type.c_double.html)
4256- [`ffi::c_float`](https://doc.rust-lang.org/stable/std/ffi/type.c_float.html)
4257- [`ffi::c_int`](https://doc.rust-lang.org/stable/std/ffi/type.c_int.html)
4258- [`ffi::c_long`](https://doc.rust-lang.org/stable/std/ffi/type.c_long.html)
4259- [`ffi::c_longlong`](https://doc.rust-lang.org/stable/std/ffi/type.c_longlong.html)
4260- [`ffi::c_schar`](https://doc.rust-lang.org/stable/std/ffi/type.c_schar.html)
4261- [`ffi::c_short`](https://doc.rust-lang.org/stable/std/ffi/type.c_short.html)
4262- [`ffi::c_uchar`](https://doc.rust-lang.org/stable/std/ffi/type.c_uchar.html)
4263- [`ffi::c_uint`](https://doc.rust-lang.org/stable/std/ffi/type.c_uint.html)
4264- [`ffi::c_ulong`](https://doc.rust-lang.org/stable/std/ffi/type.c_ulong.html)
4265- [`ffi::c_ulonglong`](https://doc.rust-lang.org/stable/std/ffi/type.c_ulonglong.html)
4266- [`ffi::c_ushort`](https://doc.rust-lang.org/stable/std/ffi/type.c_ushort.html)
4267
4268These APIs are now usable in const contexts:
4269
4270- [`slice::from_raw_parts`](https://doc.rust-lang.org/stable/core/slice/fn.from_raw_parts.html)
4271
4272Cargo
4273-----
4274- [Packages can now inherit settings from the workspace so that the settings
4275 can be centralized in one place.](https://github.com/rust-lang/cargo/pull/10859) See
4276 [`workspace.package`](https://doc.rust-lang.org/nightly/cargo/reference/workspaces.html#the-workspacepackage-table)
4277 and
4278 [`workspace.dependencies`](https://doc.rust-lang.org/nightly/cargo/reference/workspaces.html#the-workspacedependencies-table)
4279 for more details on how to define these common settings.
4280- [Cargo commands can now accept multiple `--target` flags to build for
4281 multiple targets at once](https://github.com/rust-lang/cargo/pull/10766), and the
4282 [`build.target`](https://doc.rust-lang.org/nightly/cargo/reference/config.html#buildtarget)
4283 config option may now take an array of multiple targets.
4284- [The `--jobs` argument can now take a negative number to count backwards from
4285 the max CPUs.](https://github.com/rust-lang/cargo/pull/10844)
4286- [`cargo add` will now update `Cargo.lock`.](https://github.com/rust-lang/cargo/pull/10902)
4287- [Added](https://github.com/rust-lang/cargo/pull/10838) the
4288 [`--crate-type`](https://doc.rust-lang.org/nightly/cargo/commands/cargo-rustc.html#option-cargo-rustc---crate-type)
4289 flag to `cargo rustc` to override the crate type.
4290- [Significantly improved the performance fetching git dependencies from GitHub
4291 when using a hash in the `rev` field.](https://github.com/rust-lang/cargo/pull/10079)
4292
4293Misc
4294----
4295- [The `rust-analyzer` rustup component is now available on the stable channel.](https://github.com/rust-lang/rust/pull/98640/)
4296
4297Compatibility Notes
4298-------------------
4299- The minimum required versions for all `-linux-gnu` targets are now at least kernel 3.2 and glibc 2.17, for targets that previously supported older versions: [Increase the minimum linux-gnu versions](https://github.com/rust-lang/rust/pull/95026/)
4300- [Network primitives are now implemented with the ideal Rust layout, not the C system layout](https://github.com/rust-lang/rust/pull/78802/). This can cause problems when transmuting the types.
4301- [Add assertion that `transmute_copy`'s `U` is not larger than `T`](https://github.com/rust-lang/rust/pull/98839/)
4302- [A soundness bug in `BTreeMap` was fixed](https://github.com/rust-lang/rust/pull/99413/) that allowed data it was borrowing to be dropped before the container.
4303- [The Drop behavior of C-like enums cast to ints has changed](https://github.com/rust-lang/rust/pull/96862/). These are already discouraged by a compiler warning.
4304- [Relate late-bound closure lifetimes to parent fn in NLL](https://github.com/rust-lang/rust/pull/98835/)
4305- [Errors at const-eval time are now in future incompatibility reports](https://github.com/rust-lang/rust/pull/97743/)
4306- On the `thumbv6m-none-eabi` target, some incorrect `asm!` statements were erroneously accepted if they used the high registers (r8 to r14) as an input/output operand. [This is no longer accepted](https://github.com/rust-lang/rust/pull/99155/).
4307- [`impl Trait` was accidentally accepted as the associated type value of return-position `impl Trait`](https://github.com/rust-lang/rust/pull/97346/), without fulfilling all the trait bounds of that associated type, as long as the hidden type satisfies said bounds. This has been fixed.
4308
4309Internal Changes
4310----------------
4311
4312These changes do not affect any public interfaces of Rust, but they represent
4313significant improvements to the performance or internals of rustc and related
4314tools.
4315
4316- Windows builds now use profile-guided optimization, providing 10-20% improvements to compiler performance: [Utilize PGO for windows x64 rustc dist builds](https://github.com/rust-lang/rust/pull/96978/)
4317- [Stop keeping metadata in memory before writing it to disk](https://github.com/rust-lang/rust/pull/96544/)
4318- [compiletest: strip debuginfo by default for mode=ui](https://github.com/rust-lang/rust/pull/98140/)
4319- Many improvements to generated code for derives, including performance improvements:
4320 - [Don't use match-destructuring for derived ops on structs.](https://github.com/rust-lang/rust/pull/98446/)
4321 - [Many small deriving cleanups](https://github.com/rust-lang/rust/pull/98741/)
4322 - [More derive output improvements](https://github.com/rust-lang/rust/pull/98758/)
4323 - [Clarify deriving code](https://github.com/rust-lang/rust/pull/98915/)
4324 - [Final derive output improvements](https://github.com/rust-lang/rust/pull/99046/)
4325 - [Stop injecting `#[allow(unused_qualifications)]` in generated `derive` implementations](https://github.com/rust-lang/rust/pull/99485/)
4326 - [Improve `derive(Debug)`](https://github.com/rust-lang/rust/pull/98190/)
4327- [Bump to clap 3](https://github.com/rust-lang/rust/pull/98213/)
4328- [fully move dropck to mir](https://github.com/rust-lang/rust/pull/98641/)
4329- [Optimize `Vec::insert` for the case where `index == len`.](https://github.com/rust-lang/rust/pull/98755/)
4330- [Convert rust-analyzer to an in-tree tool](https://github.com/rust-lang/rust/pull/99603/)
4331
4332Version 1.63.0 (2022-08-11)
4333==========================
4334
4335Language
4336--------
4337- [Remove migrate borrowck mode for pre-NLL errors.][95565]
4338- [Modify MIR building to drop repeat expressions with length zero.][95953]
4339- [Remove label/lifetime shadowing warnings.][96296]
4340- [Allow explicit generic arguments in the presence of `impl Trait` args.][96868]
4341- [Make `cenum_impl_drop_cast` warnings deny-by-default.][97652]
4342- [Prevent unwinding when `-C panic=abort` is used regardless of declared ABI.][96959]
4343- [lub: don't bail out due to empty binders.][97867]
4344
4345Compiler
4346--------
4347- [Stabilize the `bundle` native library modifier,][95818] also removing the
4348 deprecated `static-nobundle` linking kind.
4349- [Add Apple WatchOS compile targets\*.][95243]
4350- [Add a Windows application manifest to rustc-main.][96737]
4351
4352\* Refer to Rust's [platform support page][platform-support-doc] for more
4353 information on Rust's tiered platform support.
4354
4355Libraries
4356---------
4357- [Implement `Copy`, `Clone`, `PartialEq` and `Eq` for `core::fmt::Alignment`.][94530]
4358- [Extend `ptr::null` and `null_mut` to all thin (including extern) types.][94954]
4359- [`impl Read and Write for VecDeque<u8>`.][95632]
4360- [STD support for the Nintendo 3DS.][95897]
4361- [Use rounding in float to Duration conversion methods.][96051]
4362- [Make write/print macros eagerly drop temporaries.][96455]
4363- [Implement internal traits that enable `[OsStr]::join`.][96881]
4364- [Implement `Hash` for `core::alloc::Layout`.][97034]
4365- [Add capacity documentation for `OsString`.][97202]
4366- [Put a bound on collection misbehavior.][97316]
4367- [Make `std::mem::needs_drop` accept `?Sized`.][97675]
4368- [`impl Termination for Infallible` and then make the `Result` impls of `Termination` more generic.][97803]
4369- [Document Rust's stance on `/proc/self/mem`.][97837]
4370
4371Stabilized APIs
4372---------------
4373
4374- [`array::from_fn`]
4375- [`Box::into_pin`]
4376- [`BinaryHeap::try_reserve`]
4377- [`BinaryHeap::try_reserve_exact`]
4378- [`OsString::try_reserve`]
4379- [`OsString::try_reserve_exact`]
4380- [`PathBuf::try_reserve`]
4381- [`PathBuf::try_reserve_exact`]
4382- [`Path::try_exists`]
4383- [`Ref::filter_map`]
4384- [`RefMut::filter_map`]
4385- [`NonNull::<[T]>::len`][`NonNull::<slice>::len`]
4386- [`ToOwned::clone_into`]
4387- [`Ipv6Addr::to_ipv4_mapped`]
4388- [`unix::io::AsFd`]
4389- [`unix::io::BorrowedFd<'fd>`]
4390- [`unix::io::OwnedFd`]
4391- [`windows::io::AsHandle`]
4392- [`windows::io::BorrowedHandle<'handle>`]
4393- [`windows::io::OwnedHandle`]
4394- [`windows::io::HandleOrInvalid`]
4395- [`windows::io::HandleOrNull`]
4396- [`windows::io::InvalidHandleError`]
4397- [`windows::io::NullHandleError`]
4398- [`windows::io::AsSocket`]
4399- [`windows::io::BorrowedSocket<'handle>`]
4400- [`windows::io::OwnedSocket`]
4401- [`thread::scope`]
4402- [`thread::Scope`]
4403- [`thread::ScopedJoinHandle`]
4404
4405These APIs are now usable in const contexts:
4406
4407- [`array::from_ref`]
4408- [`slice::from_ref`]
4409- [`intrinsics::copy`]
4410- [`intrinsics::copy_nonoverlapping`]
4411- [`<*const T>::copy_to`]
4412- [`<*const T>::copy_to_nonoverlapping`]
4413- [`<*mut T>::copy_to`]
4414- [`<*mut T>::copy_to_nonoverlapping`]
4415- [`<*mut T>::copy_from`]
4416- [`<*mut T>::copy_from_nonoverlapping`]
4417- [`str::from_utf8`]
4418- [`Utf8Error::error_len`]
4419- [`Utf8Error::valid_up_to`]
4420- [`Condvar::new`]
4421- [`Mutex::new`]
4422- [`RwLock::new`]
4423
4424Cargo
4425-----
4426- [Stabilize the `--config path` command-line argument.][cargo/10755]
4427- [Expose rust-version in the environment as `CARGO_PKG_RUST_VERSION`.][cargo/10713]
4428
4429Compatibility Notes
4430-------------------
4431
4432- [`#[link]` attributes are now checked more strictly,][96885] which may introduce
4433 errors for invalid attribute arguments that were previously ignored.
4434- [Rounding is now used when converting a float to a `Duration`.][96051] The converted
4435 duration can differ slightly from what it was.
4436
4437Internal Changes
4438----------------
4439
4440These changes provide no direct user facing benefits, but represent significant
4441improvements to the internals and overall performance of rustc
4442and related tools.
4443
4444- [Prepare Rust for LLVM opaque pointers.][94214]
4445
4446[94214]: https://github.com/rust-lang/rust/pull/94214/
4447[94530]: https://github.com/rust-lang/rust/pull/94530/
4448[94954]: https://github.com/rust-lang/rust/pull/94954/
4449[95243]: https://github.com/rust-lang/rust/pull/95243/
4450[95565]: https://github.com/rust-lang/rust/pull/95565/
4451[95632]: https://github.com/rust-lang/rust/pull/95632/
4452[95818]: https://github.com/rust-lang/rust/pull/95818/
4453[95897]: https://github.com/rust-lang/rust/pull/95897/
4454[95953]: https://github.com/rust-lang/rust/pull/95953/
4455[96051]: https://github.com/rust-lang/rust/pull/96051/
4456[96296]: https://github.com/rust-lang/rust/pull/96296/
4457[96455]: https://github.com/rust-lang/rust/pull/96455/
4458[96737]: https://github.com/rust-lang/rust/pull/96737/
4459[96868]: https://github.com/rust-lang/rust/pull/96868/
4460[96881]: https://github.com/rust-lang/rust/pull/96881/
4461[96885]: https://github.com/rust-lang/rust/pull/96885/
4462[96959]: https://github.com/rust-lang/rust/pull/96959/
4463[97034]: https://github.com/rust-lang/rust/pull/97034/
4464[97202]: https://github.com/rust-lang/rust/pull/97202/
4465[97316]: https://github.com/rust-lang/rust/pull/97316/
4466[97652]: https://github.com/rust-lang/rust/pull/97652/
4467[97675]: https://github.com/rust-lang/rust/pull/97675/
4468[97803]: https://github.com/rust-lang/rust/pull/97803/
4469[97837]: https://github.com/rust-lang/rust/pull/97837/
4470[97867]: https://github.com/rust-lang/rust/pull/97867/
4471[cargo/10713]: https://github.com/rust-lang/cargo/pull/10713/
4472[cargo/10755]: https://github.com/rust-lang/cargo/pull/10755/
4473
4474[`array::from_fn`]: https://doc.rust-lang.org/stable/std/array/fn.from_fn.html
4475[`Box::into_pin`]: https://doc.rust-lang.org/stable/std/boxed/struct.Box.html#method.into_pin
4476[`BinaryHeap::try_reserve_exact`]: https://doc.rust-lang.org/stable/alloc/collections/binary_heap/struct.BinaryHeap.html#method.try_reserve_exact
4477[`BinaryHeap::try_reserve`]: https://doc.rust-lang.org/stable/std/collections/struct.BinaryHeap.html#method.try_reserve
4478[`OsString::try_reserve`]: https://doc.rust-lang.org/stable/std/ffi/struct.OsString.html#method.try_reserve
4479[`OsString::try_reserve_exact`]: https://doc.rust-lang.org/stable/std/ffi/struct.OsString.html#method.try_reserve_exact
4480[`PathBuf::try_reserve`]: https://doc.rust-lang.org/stable/std/path/struct.PathBuf.html#method.try_reserve
4481[`PathBuf::try_reserve_exact`]: https://doc.rust-lang.org/stable/std/path/struct.PathBuf.html#method.try_reserve_exact
4482[`Path::try_exists`]: https://doc.rust-lang.org/stable/std/path/struct.Path.html#method.try_exists
4483[`Ref::filter_map`]: https://doc.rust-lang.org/stable/std/cell/struct.Ref.html#method.filter_map
4484[`RefMut::filter_map`]: https://doc.rust-lang.org/stable/std/cell/struct.RefMut.html#method.filter_map
4485[`NonNull::<slice>::len`]: https://doc.rust-lang.org/stable/std/ptr/struct.NonNull.html#method.len
4486[`ToOwned::clone_into`]: https://doc.rust-lang.org/stable/std/borrow/trait.ToOwned.html#method.clone_into
4487[`Ipv6Addr::to_ipv4_mapped`]: https://doc.rust-lang.org/stable/std/net/struct.Ipv6Addr.html#method.to_ipv4_mapped
4488[`unix::io::AsFd`]: https://doc.rust-lang.org/stable/std/os/unix/io/trait.AsFd.html
4489[`unix::io::BorrowedFd<'fd>`]: https://doc.rust-lang.org/stable/std/os/unix/io/struct.BorrowedFd.html
4490[`unix::io::OwnedFd`]: https://doc.rust-lang.org/stable/std/os/unix/io/struct.OwnedFd.html
4491[`windows::io::AsHandle`]: https://doc.rust-lang.org/stable/std/os/windows/io/trait.AsHandle.html
4492[`windows::io::BorrowedHandle<'handle>`]: https://doc.rust-lang.org/stable/std/os/windows/io/struct.BorrowedHandle.html
4493[`windows::io::OwnedHandle`]: https://doc.rust-lang.org/stable/std/os/windows/io/struct.OwnedHandle.html
4494[`windows::io::HandleOrInvalid`]: https://doc.rust-lang.org/stable/std/os/windows/io/struct.HandleOrInvalid.html
4495[`windows::io::HandleOrNull`]: https://doc.rust-lang.org/stable/std/os/windows/io/struct.HandleOrNull.html
4496[`windows::io::InvalidHandleError`]: https://doc.rust-lang.org/stable/std/os/windows/io/struct.InvalidHandleError.html
4497[`windows::io::NullHandleError`]: https://doc.rust-lang.org/stable/std/os/windows/io/struct.NullHandleError.html
4498[`windows::io::AsSocket`]: https://doc.rust-lang.org/stable/std/os/windows/io/trait.AsSocket.html
4499[`windows::io::BorrowedSocket<'handle>`]: https://doc.rust-lang.org/stable/std/os/windows/io/struct.BorrowedSocket.html
4500[`windows::io::OwnedSocket`]: https://doc.rust-lang.org/stable/std/os/windows/io/struct.OwnedSocket.html
4501[`thread::scope`]: https://doc.rust-lang.org/stable/std/thread/fn.scope.html
4502[`thread::Scope`]: https://doc.rust-lang.org/stable/std/thread/struct.Scope.html
4503[`thread::ScopedJoinHandle`]: https://doc.rust-lang.org/stable/std/thread/struct.ScopedJoinHandle.html
4504
4505[`array::from_ref`]: https://doc.rust-lang.org/stable/std/array/fn.from_ref.html
4506[`slice::from_ref`]: https://doc.rust-lang.org/stable/std/slice/fn.from_ref.html
4507[`intrinsics::copy`]: https://doc.rust-lang.org/stable/std/intrinsics/fn.copy.html
4508[`intrinsics::copy_nonoverlapping`]: https://doc.rust-lang.org/stable/std/intrinsics/fn.copy_nonoverlapping.html
4509[`<*const T>::copy_to`]: https://doc.rust-lang.org/stable/std/primitive.pointer.html#method.copy_to
4510[`<*const T>::copy_to_nonoverlapping`]: https://doc.rust-lang.org/stable/std/primitive.pointer.html#method.copy_to_nonoverlapping
4511[`<*mut T>::copy_to`]: https://doc.rust-lang.org/stable/std/primitive.pointer.html#method.copy_to-1
4512[`<*mut T>::copy_to_nonoverlapping`]: https://doc.rust-lang.org/stable/std/primitive.pointer.html#method.copy_to_nonoverlapping-1
4513[`<*mut T>::copy_from`]: https://doc.rust-lang.org/stable/std/primitive.pointer.html#method.copy_from
4514[`<*mut T>::copy_from_nonoverlapping`]: https://doc.rust-lang.org/stable/std/primitive.pointer.html#method.copy_from_nonoverlapping
4515[`str::from_utf8`]: https://doc.rust-lang.org/stable/std/str/fn.from_utf8.html
4516[`Utf8Error::error_len`]: https://doc.rust-lang.org/stable/std/str/struct.Utf8Error.html#method.error_len
4517[`Utf8Error::valid_up_to`]: https://doc.rust-lang.org/stable/std/str/struct.Utf8Error.html#method.valid_up_to
4518[`Condvar::new`]: https://doc.rust-lang.org/stable/std/sync/struct.Condvar.html#method.new
4519[`Mutex::new`]: https://doc.rust-lang.org/stable/std/sync/struct.Mutex.html#method.new
4520[`RwLock::new`]: https://doc.rust-lang.org/stable/std/sync/struct.RwLock.html#method.new
4521
4522Version 1.62.1 (2022-07-19)
4523==========================
4524
4525Rust 1.62.1 addresses a few recent regressions in the compiler and standard
4526library, and also mitigates a CPU vulnerability on Intel SGX.
4527
4528* [The compiler fixed unsound function coercions involving `impl Trait` return types.][98608]
4529* [The compiler fixed an incremental compilation bug with `async fn` lifetimes.][98890]
4530* [Windows added a fallback for overlapped I/O in synchronous reads and writes.][98950]
4531* [The `x86_64-fortanix-unknown-sgx` target added a mitigation for the
4532 MMIO stale data vulnerability][98126], advisory [INTEL-SA-00615].
4533
4534[98608]: https://github.com/rust-lang/rust/issues/98608
4535[98890]: https://github.com/rust-lang/rust/issues/98890
4536[98950]: https://github.com/rust-lang/rust/pull/98950
4537[98126]: https://github.com/rust-lang/rust/pull/98126
4538[INTEL-SA-00615]: https://www.intel.com/content/www/us/en/security-center/advisory/intel-sa-00615.html
4539
4540Version 1.62.0 (2022-06-30)
4541==========================
4542
4543Language
4544--------
4545
4546- [Stabilize `#[derive(Default)]` on enums with a `#[default]` variant][94457]
4547- [Teach flow sensitive checks that visibly uninhabited call expressions never return][93313]
4548- [Fix constants not getting dropped if part of a diverging expression][94775]
4549- [Support unit struct/enum variant in destructuring assignment][95380]
4550- [Remove mutable_borrow_reservation_conflict lint and allow the code pattern][96268]
4551- [`const` functions may now specify `extern "C"` or `extern "Rust"`][95346]
4552
4553Compiler
4554--------
4555
4556- [linker: Stop using whole-archive on dependencies of dylibs][96436]
4557- [Make `unaligned_references` lint deny-by-default][95372]
4558 This lint is also a future compatibility lint, and is expected to eventually
4559 become a hard error.
4560- [Only add codegen backend to dep info if -Zbinary-dep-depinfo is used][93969]
4561- [Reject `#[thread_local]` attribute on non-static items][95006]
4562- [Add tier 3 `aarch64-pc-windows-gnullvm` and `x86_64-pc-windows-gnullvm` targets\*][94872]
4563- [Implement a lint to warn about unused macro rules][96150]
4564- [Promote `x86_64-unknown-none` target to Tier 2\*][95705]
4565
4566\* Refer to Rust's [platform support page][platform-support-doc] for more
4567 information on Rust's tiered platform support.
4568
4569Libraries
4570---------
4571
4572- [Windows: Use a pipe relay for chaining pipes][95841]
4573- [Replace Linux Mutex and Condvar with futex based ones.][95035]
4574- [Replace RwLock by a futex based one on Linux][95801]
4575- [std: directly use pthread in UNIX parker implementation][96393]
4576
4577Stabilized APIs
4578---------------
4579
4580- [`bool::then_some`]
4581- [`f32::total_cmp`]
4582- [`f64::total_cmp`]
4583- [`Stdin::lines`]
4584- [`windows::CommandExt::raw_arg`]
4585- [`impl<T: Default> Default for AssertUnwindSafe<T>`]
4586- [`From<Rc<str>> for Rc<[u8]>`][rc-u8-from-str]
4587- [`From<Arc<str>> for Arc<[u8]>`][arc-u8-from-str]
4588- [`FusedIterator for EncodeWide`]
4589- [RDM intrinsics on aarch64][stdarch/1285]
4590
4591Clippy
4592------
4593
4594- [Create clippy lint against unexpectedly late drop for temporaries in match scrutinee expressions][94206]
4595
4596Cargo
4597-----
4598
4599- Added the `cargo add` command for adding dependencies to `Cargo.toml` from
4600 the command-line.
4601 [docs](https://doc.rust-lang.org/nightly/cargo/commands/cargo-add.html)
4602- Package ID specs now support `name@version` syntax in addition to the
4603 previous `name:version` to align with the behavior in `cargo add` and other
4604 tools. `cargo install` and `cargo yank` also now support this syntax so the
4605 version does not need to passed as a separate flag.
4606- The `git` and `registry` directories in Cargo's home directory (usually
4607 `~/.cargo`) are now marked as cache directories so that they are not
4608 included in backups or content indexing (on Windows).
4609- Added automatic `@` argfile support, which will use "response files" if the
4610 command-line to `rustc` exceeds the operating system's limit.
4611
4612Compatibility Notes
4613-------------------
4614
4615- `cargo test` now passes `--target` to `rustdoc` if the specified target is
4616 the same as the host target.
4617 [#10594](https://github.com/rust-lang/cargo/pull/10594)
4618- [rustdoc: doctests are now run on unexported `macro_rules!` macros, matching other private items][96630]
4619- [rustdoc: Remove .woff font files][96279]
4620- [Enforce Copy bounds for repeat elements while considering lifetimes][95819]
4621- [Windows: Fix potential unsoundness by aborting if `File` reads or writes cannot
4622 complete synchronously][95469].
4623
4624Internal Changes
4625----------------
4626
4627- [Unify ReentrantMutex implementations across all platforms][96042]
4628
4629These changes provide no direct user facing benefits, but represent significant
4630improvements to the internals and overall performance of rustc
4631and related tools.
4632
4633[93313]: https://github.com/rust-lang/rust/pull/93313/
4634[93969]: https://github.com/rust-lang/rust/pull/93969/
4635[94206]: https://github.com/rust-lang/rust/pull/94206/
4636[94457]: https://github.com/rust-lang/rust/pull/94457/
4637[94775]: https://github.com/rust-lang/rust/pull/94775/
4638[94872]: https://github.com/rust-lang/rust/pull/94872/
4639[95006]: https://github.com/rust-lang/rust/pull/95006/
4640[95035]: https://github.com/rust-lang/rust/pull/95035/
4641[95346]: https://github.com/rust-lang/rust/pull/95346/
4642[95372]: https://github.com/rust-lang/rust/pull/95372/
4643[95380]: https://github.com/rust-lang/rust/pull/95380/
4644[95431]: https://github.com/rust-lang/rust/pull/95431/
4645[95469]: https://github.com/rust-lang/rust/pull/95469/
4646[95705]: https://github.com/rust-lang/rust/pull/95705/
4647[95801]: https://github.com/rust-lang/rust/pull/95801/
4648[95819]: https://github.com/rust-lang/rust/pull/95819/
4649[95841]: https://github.com/rust-lang/rust/pull/95841/
4650[96042]: https://github.com/rust-lang/rust/pull/96042/
4651[96150]: https://github.com/rust-lang/rust/pull/96150/
4652[96268]: https://github.com/rust-lang/rust/pull/96268/
4653[96279]: https://github.com/rust-lang/rust/pull/96279/
4654[96393]: https://github.com/rust-lang/rust/pull/96393/
4655[96436]: https://github.com/rust-lang/rust/pull/96436/
4656[96557]: https://github.com/rust-lang/rust/pull/96557/
4657[96630]: https://github.com/rust-lang/rust/pull/96630/
4658
4659[`bool::then_some`]: https://doc.rust-lang.org/stable/std/primitive.bool.html#method.then_some
4660[`f32::total_cmp`]: https://doc.rust-lang.org/stable/std/primitive.f32.html#method.total_cmp
4661[`f64::total_cmp`]: https://doc.rust-lang.org/stable/std/primitive.f64.html#method.total_cmp
4662[`Stdin::lines`]: https://doc.rust-lang.org/stable/std/io/struct.Stdin.html#method.lines
4663[`impl<T: Default> Default for AssertUnwindSafe<T>`]: https://doc.rust-lang.org/stable/std/panic/struct.AssertUnwindSafe.html#impl-Default
4664[rc-u8-from-str]: https://doc.rust-lang.org/stable/std/rc/struct.Rc.html#impl-From%3CRc%3Cstr%3E%3E
4665[arc-u8-from-str]: https://doc.rust-lang.org/stable/std/sync/struct.Arc.html#impl-From%3CArc%3Cstr%3E%3E
4666[stdarch/1285]: https://github.com/rust-lang/stdarch/pull/1285
4667[`windows::CommandExt::raw_arg`]: https://doc.rust-lang.org/stable/std/os/windows/process/trait.CommandExt.html#tymethod.raw_arg
4668[`FusedIterator for EncodeWide`]: https://doc.rust-lang.org/stable/std/os/windows/ffi/struct.EncodeWide.html#impl-FusedIterator
4669
4670Version 1.61.0 (2022-05-19)
4671==========================
4672
4673Language
4674--------
4675
4676- [`const fn` signatures can now include generic trait bounds][93827]
4677- [`const fn` signatures can now use `impl Trait` in argument and return position][93827]
4678- [Function pointers can now be created, cast, and passed around in a `const fn`][93827]
4679- [Recursive calls can now set the value of a function's opaque `impl Trait` return type][94081]
4680
4681Compiler
4682--------
4683
4684- [Linking modifier syntax in `#[link]` attributes and on the command line, as well as the `whole-archive` modifier specifically, are now supported][93901]
4685- [The `char` type is now described as UTF-32 in debuginfo][89887]
4686- The [`#[target_feature]`][target_feature] attribute [can now be used with aarch64 features][90621]
4687- X86 [`#[target_feature = "adx"]` is now stable][93745]
4688
4689Libraries
4690---------
4691
4692- [`ManuallyDrop<T>` is now documented to have the same layout as `T`][88375]
4693- [`#[ignore = "…"]` messages are printed when running tests][92714]
4694- [Consistently show absent stdio handles on Windows as NULL handles][93263]
4695- [Make `std::io::stdio::lock()` return `'static` handles.][93965] Previously, the creation of locked handles to stdin/stdout/stderr would borrow the handles being locked, which prevented writing `let out = std::io::stdout().lock();` because `out` would outlive the return value of `stdout()`. Such code now works, eliminating a common pitfall that affected many Rust users.
4696- [`Vec::from_raw_parts` is now less restrictive about its inputs][95016]
4697- [`std::thread::available_parallelism` now takes cgroup quotas into account.][92697] Since `available_parallelism` is often used to create a thread pool for parallel computation, which may be CPU-bound for performance, `available_parallelism` will return a value consistent with the ability to use that many threads continuously, if possible. For instance, in a container with 8 virtual CPUs but quotas only allowing for 50% usage, `available_parallelism` will return 4.
4698
4699Stabilized APIs
4700---------------
4701
4702- [`Pin::static_mut`]
4703- [`Pin::static_ref`]
4704- [`Vec::retain_mut`]
4705- [`VecDeque::retain_mut`]
4706- [`Write` for `Cursor<[u8; N]>`][cursor-write-array]
4707- [`std::os::unix::net::SocketAddr::from_pathname`]
4708- [`std::process::ExitCode`] and [`std::process::Termination`]. The stabilization of these two APIs now makes it possible for programs to return errors from `main` with custom exit codes.
4709- [`std::thread::JoinHandle::is_finished`]
4710
4711These APIs are now usable in const contexts:
4712
4713- [`<*const T>::offset` and `<*mut T>::offset`][ptr-offset]
4714- [`<*const T>::wrapping_offset` and `<*mut T>::wrapping_offset`][ptr-wrapping_offset]
4715- [`<*const T>::add` and `<*mut T>::add`][ptr-add]
4716- [`<*const T>::sub` and `<*mut T>::sub`][ptr-sub]
4717- [`<*const T>::wrapping_add` and `<*mut T>::wrapping_add`][ptr-wrapping_add]
4718- [`<*const T>::wrapping_sub` and `<*mut T>::wrapping_sub`][ptr-wrapping_sub]
4719- [`<[T]>::as_mut_ptr`][slice-as_mut_ptr]
4720- [`<[T]>::as_ptr_range`][slice-as_ptr_range]
4721- [`<[T]>::as_mut_ptr_range`][slice-as_mut_ptr_range]
4722
4723Cargo
4724-----
4725
4726No feature changes, but see compatibility notes.
4727
4728Compatibility Notes
4729-------------------
4730
4731- Previously native static libraries were linked as `whole-archive` in some cases, but now rustc tries not to use `whole-archive` unless explicitly requested. This [change][93901] may result in linking errors in some cases. To fix such errors, native libraries linked from the command line, build scripts, or [`#[link]` attributes][link-attr] need to
4732 - (more common) either be reordered to respect dependencies between them (if `a` depends on `b` then `a` should go first and `b` second)
4733 - (less common) or be updated to use the [`+whole-archive`] modifier.
4734- [Catching a second unwind from FFI code while cleaning up from a Rust panic now causes the process to abort][92911]
4735- [Proc macros no longer see `ident` matchers wrapped in groups][92472]
4736- [The number of `#` in `r#` raw string literals is now required to be less than 256][95251]
4737- [When checking that a dyn type satisfies a trait bound, supertrait bounds are now enforced][92285]
4738- [`cargo vendor` now only accepts one value for each `--sync` flag][cargo/10448]
4739- [`cfg` predicates in `all()` and `any()` are always evaluated to detect errors, instead of short-circuiting.][94295] The compatibility considerations here arise in nightly-only code that used the short-circuiting behavior of `all` to write something like `cfg(all(feature = "nightly", syntax-requiring-nightly))`, which will now fail to compile. Instead, use either `cfg_attr(feature = "nightly", ...)` or nested uses of `cfg`.
4740- [bootstrap: static-libstdcpp is now enabled by default, and can now be disabled when llvm-tools is enabled][94832]
4741
4742Internal Changes
4743----------------
4744
4745These changes provide no direct user facing benefits, but represent significant
4746improvements to the internals and overall performance of rustc
4747and related tools.
4748
4749- [debuginfo: Refactor debuginfo generation for types][94261]
4750- [Remove the everybody loops pass][93913]
4751
4752[88375]: https://github.com/rust-lang/rust/pull/88375/
4753[89887]: https://github.com/rust-lang/rust/pull/89887/
4754[90621]: https://github.com/rust-lang/rust/pull/90621/
4755[92285]: https://github.com/rust-lang/rust/pull/92285/
4756[92472]: https://github.com/rust-lang/rust/pull/92472/
4757[92697]: https://github.com/rust-lang/rust/pull/92697/
4758[92714]: https://github.com/rust-lang/rust/pull/92714/
4759[92911]: https://github.com/rust-lang/rust/pull/92911/
4760[93263]: https://github.com/rust-lang/rust/pull/93263/
4761[93745]: https://github.com/rust-lang/rust/pull/93745/
4762[93827]: https://github.com/rust-lang/rust/pull/93827/
4763[93901]: https://github.com/rust-lang/rust/pull/93901/
4764[93913]: https://github.com/rust-lang/rust/pull/93913/
4765[93965]: https://github.com/rust-lang/rust/pull/93965/
4766[94081]: https://github.com/rust-lang/rust/pull/94081/
4767[94261]: https://github.com/rust-lang/rust/pull/94261/
4768[94295]: https://github.com/rust-lang/rust/pull/94295/
4769[94832]: https://github.com/rust-lang/rust/pull/94832/
4770[95016]: https://github.com/rust-lang/rust/pull/95016/
4771[95251]: https://github.com/rust-lang/rust/pull/95251/
4772[`+whole-archive`]: https://doc.rust-lang.org/stable/rustc/command-line-arguments.html#linking-modifiers-whole-archive
4773[`Pin::static_mut`]: https://doc.rust-lang.org/stable/std/pin/struct.Pin.html#method.static_mut
4774[`Pin::static_ref`]: https://doc.rust-lang.org/stable/std/pin/struct.Pin.html#method.static_ref
4775[`Vec::retain_mut`]: https://doc.rust-lang.org/stable/std/vec/struct.Vec.html#method.retain_mut
4776[`VecDeque::retain_mut`]: https://doc.rust-lang.org/stable/std/collections/struct.VecDeque.html#method.retain_mut
4777[`std::os::unix::net::SocketAddr::from_pathname`]: https://doc.rust-lang.org/stable/std/os/unix/net/struct.SocketAddr.html#method.from_pathname
4778[`std::process::ExitCode`]: https://doc.rust-lang.org/stable/std/process/struct.ExitCode.html
4779[`std::process::Termination`]: https://doc.rust-lang.org/stable/std/process/trait.Termination.html
4780[`std::thread::JoinHandle::is_finished`]: https://doc.rust-lang.org/stable/std/thread/struct.JoinHandle.html#method.is_finished
4781[cargo/10448]: https://github.com/rust-lang/cargo/pull/10448/
4782[cursor-write-array]: https://doc.rust-lang.org/stable/std/io/struct.Cursor.html#impl-Write-4
4783[link-attr]: https://doc.rust-lang.org/stable/reference/items/external-blocks.html#the-link-attribute
4784[ptr-add]: https://doc.rust-lang.org/stable/std/primitive.pointer.html#method.add
4785[ptr-offset]: https://doc.rust-lang.org/stable/std/primitive.pointer.html#method.offset
4786[ptr-sub]: https://doc.rust-lang.org/stable/std/primitive.pointer.html#method.sub
4787[ptr-wrapping_add]: https://doc.rust-lang.org/stable/std/primitive.pointer.html#method.wrapping_add
4788[ptr-wrapping_offset]: https://doc.rust-lang.org/stable/std/primitive.pointer.html#method.wrapping_offset
4789[ptr-wrapping_sub]: https://doc.rust-lang.org/stable/std/primitive.pointer.html#method.wrapping_sub
4790[slice-as_mut_ptr]: https://doc.rust-lang.org/stable/std/primitive.slice.html#method.as_mut_ptr
4791[slice-as_mut_ptr_range]: https://doc.rust-lang.org/stable/std/primitive.slice.html#method.as_mut_ptr_range
4792[slice-as_ptr_range]: https://doc.rust-lang.org/stable/std/primitive.slice.html#method.as_ptr_range
4793[target_feature]: https://doc.rust-lang.org/reference/attributes/codegen.html#the-target_feature-attribute
4794
4795
4796Version 1.60.0 (2022-04-07)
4797==========================
4798
4799Language
4800--------
4801- [Stabilize `#[cfg(panic = "...")]` for either `"unwind"` or `"abort"`.][93658]
4802- [Stabilize `#[cfg(target_has_atomic = "...")]` for each integer size and `"ptr"`.][93824]
4803
4804Compiler
4805--------
4806- [Enable combining `+crt-static` and `relocation-model=pic` on `x86_64-unknown-linux-gnu`][86374]
4807- [Fixes wrong `unreachable_pub` lints on nested and glob public reexport][87487]
4808- [Stabilize `-Z instrument-coverage` as `-C instrument-coverage`][90132]
4809- [Stabilize `-Z print-link-args` as `--print link-args`][91606]
4810- [Add new Tier 3 target `mips64-openwrt-linux-musl`\*][92300]
4811- [Add new Tier 3 target `armv7-unknown-linux-uclibceabi` (softfloat)\*][92383]
4812- [Fix invalid removal of newlines from doc comments][92357]
4813- [Add kernel target for RustyHermit][92670]
4814- [Deny mixing bin crate type with lib crate types][92933]
4815- [Make rustc use `RUST_BACKTRACE=full` by default][93566]
4816- [Upgrade to LLVM 14][93577]
4817
4818\* Refer to Rust's [platform support page][platform-support-doc] for more
4819 information on Rust's tiered platform support.
4820
4821Libraries
4822---------
4823- [Guarantee call order for `sort_by_cached_key`][89621]
4824- [Improve `Duration::try_from_secs_f32`/`f64` accuracy by directly processing exponent and mantissa][90247]
4825- [Make `Instant::{duration_since, elapsed, sub}` saturating][89926]
4826- [Remove non-monotonic clocks workarounds in `Instant::now`][89926]
4827- [Make `BuildHasherDefault`, `iter::Empty` and `future::Pending` covariant][92630]
4828
4829Stabilized APIs
4830---------------
4831- [`Arc::new_cyclic`][arc_new_cyclic]
4832- [`Rc::new_cyclic`][rc_new_cyclic]
4833- [`slice::EscapeAscii`][slice_escape_ascii]
4834- [`<[u8]>::escape_ascii`][slice_u8_escape_ascii]
4835- [`u8::escape_ascii`][u8_escape_ascii]
4836- [`Vec::spare_capacity_mut`][vec_spare_capacity_mut]
4837- [`MaybeUninit::assume_init_drop`][assume_init_drop]
4838- [`MaybeUninit::assume_init_read`][assume_init_read]
4839- [`i8::abs_diff`][i8_abs_diff]
4840- [`i16::abs_diff`][i16_abs_diff]
4841- [`i32::abs_diff`][i32_abs_diff]
4842- [`i64::abs_diff`][i64_abs_diff]
4843- [`i128::abs_diff`][i128_abs_diff]
4844- [`isize::abs_diff`][isize_abs_diff]
4845- [`u8::abs_diff`][u8_abs_diff]
4846- [`u16::abs_diff`][u16_abs_diff]
4847- [`u32::abs_diff`][u32_abs_diff]
4848- [`u64::abs_diff`][u64_abs_diff]
4849- [`u128::abs_diff`][u128_abs_diff]
4850- [`usize::abs_diff`][usize_abs_diff]
4851- [`Display for io::ErrorKind`][display_error_kind]
4852- [`From<u8> for ExitCode`][from_u8_exit_code]
4853- [`Not for !` (the "never" type)][not_never]
4854- [_Op_`Assign<$t> for Wrapping<$t>`][wrapping_assign_ops]
4855- [`arch::is_aarch64_feature_detected!`][is_aarch64_feature_detected]
4856
4857Cargo
4858-----
4859- [Port cargo from `toml-rs` to `toml_edit`][cargo/10086]
4860- [Stabilize `-Ztimings` as `--timings`][cargo/10245]
4861- [Stabilize namespaced and weak dependency features.][cargo/10269]
4862- [Accept more `cargo:rustc-link-arg-*` types from build script output.][cargo/10274]
4863- [cargo-new should not add ignore rule on Cargo.lock inside subdirs][cargo/10379]
4864
4865Misc
4866----
4867- [Ship docs on Tier 2 platforms by reusing the closest Tier 1 platform docs][92800]
4868- [Drop rustc-docs from complete profile][93742]
4869- [bootstrap: tidy up flag handling for llvm build][93918]
4870
4871Compatibility Notes
4872-------------------
4873- [Remove compiler-rt linking hack on Android][83822]
4874- [Mitigations for platforms with non-monotonic clocks have been removed from
4875 `Instant::now`][89926]. On platforms that don't provide monotonic clocks, an
4876 instant is not guaranteed to be greater than an earlier instant anymore.
4877- [`Instant::{duration_since, elapsed, sub}` do not panic anymore on underflow,
4878 saturating to `0` instead][89926]. In the real world the panic happened mostly
4879 on platforms with buggy monotonic clock implementations rather than catching
4880 programming errors like reversing the start and end times. Such programming
4881 errors will now result in `0` rather than a panic.
4882- In a future release we're planning to increase the baseline requirements for
4883 the Linux kernel to version 3.2, and for glibc to version 2.17. We'd love
4884 your feedback in [PR #95026][95026].
4885
4886Internal Changes
4887----------------
4888
4889These changes provide no direct user facing benefits, but represent significant
4890improvements to the internals and overall performance of rustc
4891and related tools.
4892
4893- [Switch all libraries to the 2021 edition][92068]
4894
4895[83822]: https://github.com/rust-lang/rust/pull/83822
4896[86374]: https://github.com/rust-lang/rust/pull/86374
4897[87487]: https://github.com/rust-lang/rust/pull/87487
4898[89621]: https://github.com/rust-lang/rust/pull/89621
4899[89926]: https://github.com/rust-lang/rust/pull/89926
4900[90132]: https://github.com/rust-lang/rust/pull/90132
4901[90247]: https://github.com/rust-lang/rust/pull/90247
4902[91606]: https://github.com/rust-lang/rust/pull/91606
4903[92068]: https://github.com/rust-lang/rust/pull/92068
4904[92300]: https://github.com/rust-lang/rust/pull/92300
4905[92357]: https://github.com/rust-lang/rust/pull/92357
4906[92383]: https://github.com/rust-lang/rust/pull/92383
4907[92630]: https://github.com/rust-lang/rust/pull/92630
4908[92670]: https://github.com/rust-lang/rust/pull/92670
4909[92800]: https://github.com/rust-lang/rust/pull/92800
4910[92933]: https://github.com/rust-lang/rust/pull/92933
4911[93566]: https://github.com/rust-lang/rust/pull/93566
4912[93577]: https://github.com/rust-lang/rust/pull/93577
4913[93658]: https://github.com/rust-lang/rust/pull/93658
4914[93742]: https://github.com/rust-lang/rust/pull/93742
4915[93824]: https://github.com/rust-lang/rust/pull/93824
4916[93918]: https://github.com/rust-lang/rust/pull/93918
4917[95026]: https://github.com/rust-lang/rust/pull/95026
4918
4919[cargo/10086]: https://github.com/rust-lang/cargo/pull/10086
4920[cargo/10245]: https://github.com/rust-lang/cargo/pull/10245
4921[cargo/10269]: https://github.com/rust-lang/cargo/pull/10269
4922[cargo/10274]: https://github.com/rust-lang/cargo/pull/10274
4923[cargo/10379]: https://github.com/rust-lang/cargo/pull/10379
4924
4925[arc_new_cyclic]: https://doc.rust-lang.org/stable/std/sync/struct.Arc.html#method.new_cyclic
4926[rc_new_cyclic]: https://doc.rust-lang.org/stable/std/rc/struct.Rc.html#method.new_cyclic
4927[slice_escape_ascii]: https://doc.rust-lang.org/stable/std/slice/struct.EscapeAscii.html
4928[slice_u8_escape_ascii]: https://doc.rust-lang.org/stable/std/primitive.slice.html#method.escape_ascii
4929[u8_escape_ascii]: https://doc.rust-lang.org/stable/std/primitive.u8.html#method.escape_ascii
4930[vec_spare_capacity_mut]: https://doc.rust-lang.org/stable/std/vec/struct.Vec.html#method.spare_capacity_mut
4931[assume_init_drop]: https://doc.rust-lang.org/stable/std/mem/union.MaybeUninit.html#method.assume_init_drop
4932[assume_init_read]: https://doc.rust-lang.org/stable/std/mem/union.MaybeUninit.html#method.assume_init_read
4933[i8_abs_diff]: https://doc.rust-lang.org/stable/std/primitive.i8.html#method.abs_diff
4934[i16_abs_diff]: https://doc.rust-lang.org/stable/std/primitive.i16.html#method.abs_diff
4935[i32_abs_diff]: https://doc.rust-lang.org/stable/std/primitive.i32.html#method.abs_diff
4936[i64_abs_diff]: https://doc.rust-lang.org/stable/std/primitive.i64.html#method.abs_diff
4937[i128_abs_diff]: https://doc.rust-lang.org/stable/std/primitive.i128.html#method.abs_diff
4938[isize_abs_diff]: https://doc.rust-lang.org/stable/std/primitive.isize.html#method.abs_diff
4939[u8_abs_diff]: https://doc.rust-lang.org/stable/std/primitive.u8.html#method.abs_diff
4940[u16_abs_diff]: https://doc.rust-lang.org/stable/std/primitive.u16.html#method.abs_diff
4941[u32_abs_diff]: https://doc.rust-lang.org/stable/std/primitive.u32.html#method.abs_diff
4942[u64_abs_diff]: https://doc.rust-lang.org/stable/std/primitive.u64.html#method.abs_diff
4943[u128_abs_diff]: https://doc.rust-lang.org/stable/std/primitive.u128.html#method.abs_diff
4944[usize_abs_diff]: https://doc.rust-lang.org/stable/std/primitive.usize.html#method.abs_diff
4945[display_error_kind]: https://doc.rust-lang.org/stable/std/io/enum.ErrorKind.html#impl-Display
4946[from_u8_exit_code]: https://doc.rust-lang.org/stable/std/process/struct.ExitCode.html#impl-From%3Cu8%3E
4947[not_never]: https://doc.rust-lang.org/stable/std/primitive.never.html#impl-Not
4948[wrapping_assign_ops]: https://doc.rust-lang.org/stable/std/num/struct.Wrapping.html#trait-implementations
4949[is_aarch64_feature_detected]: https://doc.rust-lang.org/stable/std/arch/macro.is_aarch64_feature_detected.html
4950
4951Version 1.59.0 (2022-02-24)
4952==========================
4953
4954Language
4955--------
4956
4957- [Stabilize default arguments for const parameters and remove the ordering restriction for type and const parameters][90207]
4958- [Stabilize destructuring assignment][90521]
4959- [Relax private in public lint on generic bounds and where clauses of trait impls][90586]
4960- [Stabilize asm! and global_asm! for x86, x86_64, ARM, Aarch64, and RISC-V][91728]
4961
4962Compiler
4963--------
4964
4965- [Stabilize new symbol mangling format, leaving it opt-in (-Csymbol-mangling-version=v0)][90128]
4966- [Emit LLVM optimization remarks when enabled with `-Cremark`][90833]
4967- [Fix sparc64 ABI for aggregates with floating point members][91003]
4968- [Warn when a `#[test]`-like built-in attribute macro is present multiple times.][91172]
4969- [Add support for riscv64gc-unknown-freebsd][91284]
4970- [Stabilize `-Z emit-future-incompat` as `--json future-incompat`][91535]
4971- [Soft disable incremental compilation][94124]
4972
4973This release disables incremental compilation, unless the user has explicitly
4974opted in via the newly added RUSTC_FORCE_INCREMENTAL=1 environment variable.
4975This is due to a known and relatively frequently occurring bug in incremental
4976compilation, which causes builds to issue internal compiler errors. This
4977particular bug is already fixed on nightly, but that fix has not yet rolled out
4978to stable and is deemed too risky for a direct stable backport.
4979
4980As always, we encourage users to test with nightly and report bugs so that we
4981can track failures and fix issues earlier.
4982
4983See [94124] for more details.
4984
4985[94124]: https://github.com/rust-lang/rust/issues/94124
4986
4987Libraries
4988---------
4989
4990- [Remove unnecessary bounds for some Hash{Map,Set} methods][91593]
4991
4992Stabilized APIs
4993---------------
4994
4995- [`std::thread::available_parallelism`][available_parallelism]
4996- [`Result::copied`][result-copied]
4997- [`Result::cloned`][result-cloned]
4998- [`arch::asm!`][asm]
4999- [`arch::global_asm!`][global_asm]
5000- [`ops::ControlFlow::is_break`][is_break]
5001- [`ops::ControlFlow::is_continue`][is_continue]
5002- [`TryFrom<char> for u8`][try_from_char_u8]
5003- [`char::TryFromCharError`][try_from_char_err]
5004 implementing `Clone`, `Debug`, `Display`, `PartialEq`, `Copy`, `Eq`, `Error`
5005- [`iter::zip`][zip]
5006- [`NonZeroU8::is_power_of_two`][is_power_of_two8]
5007- [`NonZeroU16::is_power_of_two`][is_power_of_two16]
5008- [`NonZeroU32::is_power_of_two`][is_power_of_two32]
5009- [`NonZeroU64::is_power_of_two`][is_power_of_two64]
5010- [`NonZeroU128::is_power_of_two`][is_power_of_two128]
5011- [`NonZeroUsize::is_power_of_two`][is_power_of_two_usize]
5012- [`DoubleEndedIterator for ToLowercase`][lowercase]
5013- [`DoubleEndedIterator for ToUppercase`][uppercase]
5014- [`TryFrom<&mut [T]> for [T; N]`][tryfrom_ref_arr]
5015- [`UnwindSafe for Once`][unwindsafe_once]
5016- [`RefUnwindSafe for Once`][refunwindsafe_once]
5017- [armv8 neon intrinsics for aarch64][stdarch/1266]
5018
5019Const-stable:
5020
5021- [`mem::MaybeUninit::as_ptr`][muninit_ptr]
5022- [`mem::MaybeUninit::assume_init`][muninit_init]
5023- [`mem::MaybeUninit::assume_init_ref`][muninit_init_ref]
5024- [`ffi::CStr::from_bytes_with_nul_unchecked`][cstr_from_bytes]
5025
5026Cargo
5027-----
5028
5029- [Stabilize the `strip` profile option][cargo/10088]
5030- [Stabilize future-incompat-report][cargo/10165]
5031- [Support abbreviating `--release` as `-r`][cargo/10133]
5032- [Support `term.quiet` configuration][cargo/10152]
5033- [Remove `--host` from cargo {publish,search,login}][cargo/10145]
5034
5035Compatibility Notes
5036-------------------
5037
5038- [Refactor weak symbols in std::sys::unix][90846]
5039 This may add new, versioned, symbols when building with a newer glibc, as the
5040 standard library uses weak linkage rather than dynamically attempting to load
5041 certain symbols at runtime.
5042- [Deprecate crate_type and crate_name nested inside `#![cfg_attr]`][83744]
5043 This adds a future compatibility lint to supporting the use of cfg_attr
5044 wrapping either crate_type or crate_name specification within Rust files;
5045 it is recommended that users migrate to setting the equivalent command line
5046 flags.
5047- [Remove effect of `#[no_link]` attribute on name resolution][92034]
5048 This may expose new names, leading to conflicts with preexisting names in a
5049 given namespace and a compilation failure.
5050- [Cargo will document libraries before binaries.][cargo/10172]
5051- [Respect doc=false in dependencies, not just the root crate][cargo/10201]
5052- [Weaken guarantee around advancing underlying iterators in zip][83791]
5053- [Make split_inclusive() on an empty slice yield an empty output][89825]
5054- [Update std::env::temp_dir to use GetTempPath2 on Windows when available.][89999]
5055- [unreachable! was updated to match other formatting macro behavior on Rust 2021][92137]
5056
5057Internal Changes
5058----------------
5059
5060These changes provide no direct user facing benefits, but represent significant
5061improvements to the internals and overall performance of rustc
5062and related tools.
5063
5064- [Fix many cases of normalization-related ICEs][91255]
5065- [Replace dominators algorithm with simple Lengauer-Tarjan][85013]
5066- [Store liveness in interval sets for region inference][90637]
5067
5068- [Remove `in_band_lifetimes` from the compiler and standard library, in preparation for removing this
5069 unstable feature.][91867]
5070
5071[91867]: https://github.com/rust-lang/rust/issues/91867
5072[83744]: https://github.com/rust-lang/rust/pull/83744/
5073[83791]: https://github.com/rust-lang/rust/pull/83791/
5074[85013]: https://github.com/rust-lang/rust/pull/85013/
5075[89825]: https://github.com/rust-lang/rust/pull/89825/
5076[89999]: https://github.com/rust-lang/rust/pull/89999/
5077[90128]: https://github.com/rust-lang/rust/pull/90128/
5078[90207]: https://github.com/rust-lang/rust/pull/90207/
5079[90521]: https://github.com/rust-lang/rust/pull/90521/
5080[90586]: https://github.com/rust-lang/rust/pull/90586/
5081[90637]: https://github.com/rust-lang/rust/pull/90637/
5082[90833]: https://github.com/rust-lang/rust/pull/90833/
5083[90846]: https://github.com/rust-lang/rust/pull/90846/
5084[91003]: https://github.com/rust-lang/rust/pull/91003/
5085[91172]: https://github.com/rust-lang/rust/pull/91172/
5086[91255]: https://github.com/rust-lang/rust/pull/91255/
5087[91284]: https://github.com/rust-lang/rust/pull/91284/
5088[91535]: https://github.com/rust-lang/rust/pull/91535/
5089[91593]: https://github.com/rust-lang/rust/pull/91593/
5090[91728]: https://github.com/rust-lang/rust/pull/91728/
5091[91878]: https://github.com/rust-lang/rust/pull/91878/
5092[91896]: https://github.com/rust-lang/rust/pull/91896/
5093[91926]: https://github.com/rust-lang/rust/pull/91926/
5094[91984]: https://github.com/rust-lang/rust/pull/91984/
5095[92020]: https://github.com/rust-lang/rust/pull/92020/
5096[92034]: https://github.com/rust-lang/rust/pull/92034/
5097[92137]: https://github.com/rust-lang/rust/pull/92137/
5098[92483]: https://github.com/rust-lang/rust/pull/92483/
5099[cargo/10088]: https://github.com/rust-lang/cargo/pull/10088/
5100[cargo/10133]: https://github.com/rust-lang/cargo/pull/10133/
5101[cargo/10145]: https://github.com/rust-lang/cargo/pull/10145/
5102[cargo/10152]: https://github.com/rust-lang/cargo/pull/10152/
5103[cargo/10165]: https://github.com/rust-lang/cargo/pull/10165/
5104[cargo/10172]: https://github.com/rust-lang/cargo/pull/10172/
5105[cargo/10201]: https://github.com/rust-lang/cargo/pull/10201/
5106[cargo/10269]: https://github.com/rust-lang/cargo/pull/10269/
5107
5108[cstr_from_bytes]: https://doc.rust-lang.org/stable/std/ffi/struct.CStr.html#method.from_bytes_with_nul_unchecked
5109[muninit_ptr]: https://doc.rust-lang.org/stable/std/mem/union.MaybeUninit.html#method.as_ptr
5110[muninit_init]: https://doc.rust-lang.org/stable/std/mem/union.MaybeUninit.html#method.assume_init
5111[muninit_init_ref]: https://doc.rust-lang.org/stable/std/mem/union.MaybeUninit.html#method.assume_init_ref
5112[unwindsafe_once]: https://doc.rust-lang.org/stable/std/sync/struct.Once.html#impl-UnwindSafe
5113[refunwindsafe_once]: https://doc.rust-lang.org/stable/std/sync/struct.Once.html#impl-RefUnwindSafe
5114[tryfrom_ref_arr]: https://doc.rust-lang.org/stable/std/convert/trait.TryFrom.html#impl-TryFrom%3C%26%27_%20mut%20%5BT%5D%3E
5115[lowercase]: https://doc.rust-lang.org/stable/std/char/struct.ToLowercase.html#impl-DoubleEndedIterator
5116[uppercase]: https://doc.rust-lang.org/stable/std/char/struct.ToUppercase.html#impl-DoubleEndedIterator
5117[try_from_char_err]: https://doc.rust-lang.org/stable/std/char/struct.TryFromCharError.html
5118[available_parallelism]: https://doc.rust-lang.org/stable/std/thread/fn.available_parallelism.html
5119[result-copied]: https://doc.rust-lang.org/stable/std/result/enum.Result.html#method.copied
5120[result-cloned]: https://doc.rust-lang.org/stable/std/result/enum.Result.html#method.cloned
5121[asm]: https://doc.rust-lang.org/stable/core/arch/macro.asm.html
5122[global_asm]: https://doc.rust-lang.org/stable/core/arch/macro.global_asm.html
5123[is_break]: https://doc.rust-lang.org/stable/std/ops/enum.ControlFlow.html#method.is_break
5124[is_continue]: https://doc.rust-lang.org/stable/std/ops/enum.ControlFlow.html#method.is_continue
5125[try_from_char_u8]: https://doc.rust-lang.org/stable/std/primitive.char.html#impl-TryFrom%3Cchar%3E
5126[zip]: https://doc.rust-lang.org/stable/std/iter/fn.zip.html
5127[is_power_of_two8]: https://doc.rust-lang.org/stable/core/num/struct.NonZeroU8.html#method.is_power_of_two
5128[is_power_of_two16]: https://doc.rust-lang.org/stable/core/num/struct.NonZeroU16.html#method.is_power_of_two
5129[is_power_of_two32]: https://doc.rust-lang.org/stable/core/num/struct.NonZeroU32.html#method.is_power_of_two
5130[is_power_of_two64]: https://doc.rust-lang.org/stable/core/num/struct.NonZeroU64.html#method.is_power_of_two
5131[is_power_of_two128]: https://doc.rust-lang.org/stable/core/num/struct.NonZeroU128.html#method.is_power_of_two
5132[is_power_of_two_usize]: https://doc.rust-lang.org/stable/core/num/struct.NonZeroUsize.html#method.is_power_of_two
5133[stdarch/1266]: https://github.com/rust-lang/stdarch/pull/1266
5134
5135Version 1.58.1 (2022-01-20)
5136===========================
5137
5138* Fix race condition in `std::fs::remove_dir_all` ([CVE-2022-21658])
5139* [Handle captured arguments in the `useless_format` Clippy lint][clippy/8295]
5140* [Move `non_send_fields_in_send_ty` Clippy lint to nursery][clippy/8075]
5141* [Fix wrong error message displayed when some imports are missing][91254]
5142* [Fix rustfmt not formatting generated files from stdin][92912]
5143
5144[CVE-2022-21658]: https://www.cve.org/CVERecord?id=CVE-2022-21658
5145[91254]: https://github.com/rust-lang/rust/pull/91254
5146[92912]: https://github.com/rust-lang/rust/pull/92912
5147[clippy/8075]: https://github.com/rust-lang/rust-clippy/pull/8075
5148[clippy/8295]: https://github.com/rust-lang/rust-clippy/pull/8295
5149
5150Version 1.58.0 (2022-01-13)
5151==========================
5152
5153Language
5154--------
5155
5156- [Format strings can now capture arguments simply by writing `{ident}` in the string.][90473] This works in all macros accepting format strings. Support for this in `panic!` (`panic!("{ident}")`) requires the 2021 edition; panic invocations in previous editions that appear to be trying to use this will result in a warning lint about not having the intended effect.
5157- [`*const T` pointers can now be dereferenced in const contexts.][89551]
5158- [The rules for when a generic struct implements `Unsize` have been relaxed.][90417]
5159
5160Compiler
5161--------
5162
5163- [Add LLVM CFI support to the Rust compiler][89652]
5164- [Stabilize -Z strip as -C strip][90058]. Note that while release builds already don't add debug symbols for the code you compile, the compiled standard library that ships with Rust includes debug symbols, so you may want to use the `strip` option to remove these symbols to produce smaller release binaries. Note that this release only includes support in rustc, not directly in cargo.
5165- [Add support for LLVM coverage mapping format versions 5 and 6][91207]
5166- [Emit LLVM optimization remarks when enabled with `-Cremark`][90833]
5167- [Update the minimum external LLVM to 12][90175]
5168- [Add `x86_64-unknown-none` at Tier 3*][89062]
5169- [Build musl dist artifacts with debuginfo enabled][90733]. When building release binaries using musl, you may want to use the newly stabilized strip option to remove these debug symbols, reducing the size of your binaries.
5170- [Don't abort compilation after giving a lint error][87337]
5171- [Error messages point at the source of trait bound obligations in more places][89580]
5172
5173\* Refer to Rust's [platform support page][platform-support-doc] for more
5174 information on Rust's tiered platform support.
5175
5176Libraries
5177---------
5178
5179- [All remaining functions in the standard library have `#[must_use]` annotations where appropriate][89692], producing a warning when ignoring their return value. This helps catch mistakes such as expecting a function to mutate a value in place rather than return a new value.
5180- [Paths are automatically canonicalized on Windows for operations that support it][89174]
5181- [Re-enable debug checks for `copy` and `copy_nonoverlapping`][90041]
5182- [Implement `RefUnwindSafe` for `Rc<T>`][87467]
5183- [Make RSplit<T, P>: Clone not require T: Clone][90117]
5184- [Implement `Termination` for `Result<Infallible, E>`][88601]. This allows writing `fn main() -> Result<Infallible, ErrorType>`, for a program whose successful exits never involve returning from `main` (for instance, a program that calls `exit`, or that uses `exec` to run another program).
5185
5186Stabilized APIs
5187---------------
5188
5189- [`Metadata::is_symlink`]
5190- [`Path::is_symlink`]
5191- [`{integer}::saturating_div`]
5192- [`Option::unwrap_unchecked`]
5193- [`Result::unwrap_unchecked`]
5194- [`Result::unwrap_err_unchecked`]
5195- [`File::options`]
5196
5197These APIs are now usable in const contexts:
5198
5199- [`Duration::new`]
5200- [`Duration::checked_add`]
5201- [`Duration::saturating_add`]
5202- [`Duration::checked_sub`]
5203- [`Duration::saturating_sub`]
5204- [`Duration::checked_mul`]
5205- [`Duration::saturating_mul`]
5206- [`Duration::checked_div`]
5207
5208Cargo
5209-----
5210
5211- [Add --message-format for install command][cargo/10107]
5212- [Warn when alias shadows external subcommand][cargo/10082]
5213
5214Rustdoc
5215-------
5216
5217- [Show all Deref implementations recursively in rustdoc][90183]
5218- [Use computed visibility in rustdoc][88447]
5219
5220Compatibility Notes
5221-------------------
5222
5223- [Try all stable method candidates first before trying unstable ones][90329]. This change ensures that adding new nightly-only methods to the Rust standard library will not break code invoking methods of the same name from traits outside the standard library.
5224- Windows: [`std::process::Command` will no longer search the current directory for executables.][87704]
5225- [All proc-macro backward-compatibility lints are now deny-by-default.][88041]
5226- [proc_macro: Append .0 to unsuffixed float if it would otherwise become int token][90297]
5227- [Refactor weak symbols in std::sys::unix][90846]. This optimizes accesses to glibc functions, by avoiding the use of dlopen. This does not increase the [minimum expected version of glibc](https://doc.rust-lang.org/nightly/rustc/platform-support.html). However, software distributions that use symbol versions to detect library dependencies, and which take weak symbols into account in that analysis, may detect rust binaries as requiring newer versions of glibc.
5228- [rustdoc now rejects some unexpected semicolons in doctests][91026]
5229
5230Internal Changes
5231----------------
5232
5233These changes provide no direct user facing benefits, but represent significant
5234improvements to the internals and overall performance of rustc
5235and related tools.
5236
5237- [Implement coherence checks for negative trait impls][90104]
5238- [Add rustc lint, warning when iterating over hashmaps][89558]
5239- [Optimize live point computation][90491]
5240- [Enable verification for 1/32nd of queries loaded from disk][90361]
5241- [Implement version of normalize_erasing_regions that allows for normalization failure][91255]
5242
5243[87337]: https://github.com/rust-lang/rust/pull/87337/
5244[87467]: https://github.com/rust-lang/rust/pull/87467/
5245[87704]: https://github.com/rust-lang/rust/pull/87704/
5246[88041]: https://github.com/rust-lang/rust/pull/88041/
5247[88447]: https://github.com/rust-lang/rust/pull/88447/
5248[88601]: https://github.com/rust-lang/rust/pull/88601/
5249[89062]: https://github.com/rust-lang/rust/pull/89062/
5250[89174]: https://github.com/rust-lang/rust/pull/89174/
5251[89551]: https://github.com/rust-lang/rust/pull/89551/
5252[89558]: https://github.com/rust-lang/rust/pull/89558/
5253[89580]: https://github.com/rust-lang/rust/pull/89580/
5254[89652]: https://github.com/rust-lang/rust/pull/89652/
5255[90041]: https://github.com/rust-lang/rust/pull/90041/
5256[90058]: https://github.com/rust-lang/rust/pull/90058/
5257[90104]: https://github.com/rust-lang/rust/pull/90104/
5258[90117]: https://github.com/rust-lang/rust/pull/90117/
5259[90175]: https://github.com/rust-lang/rust/pull/90175/
5260[90183]: https://github.com/rust-lang/rust/pull/90183/
5261[90297]: https://github.com/rust-lang/rust/pull/90297/
5262[90329]: https://github.com/rust-lang/rust/pull/90329/
5263[90361]: https://github.com/rust-lang/rust/pull/90361/
5264[90417]: https://github.com/rust-lang/rust/pull/90417/
5265[90473]: https://github.com/rust-lang/rust/pull/90473/
5266[90491]: https://github.com/rust-lang/rust/pull/90491/
5267[90733]: https://github.com/rust-lang/rust/pull/90733/
5268[90833]: https://github.com/rust-lang/rust/pull/90833/
5269[90846]: https://github.com/rust-lang/rust/pull/90846/
5270[91026]: https://github.com/rust-lang/rust/pull/91026/
5271[91207]: https://github.com/rust-lang/rust/pull/91207/
5272[91255]: https://github.com/rust-lang/rust/pull/91255/
5273[cargo/10082]: https://github.com/rust-lang/cargo/pull/10082/
5274[cargo/10107]: https://github.com/rust-lang/cargo/pull/10107/
5275[`Metadata::is_symlink`]: https://doc.rust-lang.org/stable/std/fs/struct.Metadata.html#method.is_symlink
5276[`Path::is_symlink`]: https://doc.rust-lang.org/stable/std/path/struct.Path.html#method.is_symlink
5277[`{integer}::saturating_div`]: https://doc.rust-lang.org/stable/std/primitive.i8.html#method.saturating_div
5278[`Option::unwrap_unchecked`]: https://doc.rust-lang.org/stable/std/option/enum.Option.html#method.unwrap_unchecked
5279[`Result::unwrap_unchecked`]: https://doc.rust-lang.org/stable/std/result/enum.Result.html#method.unwrap_unchecked
5280[`Result::unwrap_err_unchecked`]: https://doc.rust-lang.org/stable/std/result/enum.Result.html#method.unwrap_err_unchecked
5281[`File::options`]: https://doc.rust-lang.org/stable/std/fs/struct.File.html#method.options
5282[`Duration::new`]: https://doc.rust-lang.org/stable/std/time/struct.Duration.html#method.new
5283
5284Version 1.57.0 (2021-12-02)
5285==========================
5286
5287Language
5288--------
5289
5290- [Macro attributes may follow `#[derive]` and will see the original (pre-`cfg`) input.][87220]
5291- [Accept curly-brace macros in expressions, like `m!{ .. }.method()` and `m!{ .. }?`.][88690]
5292- [Allow panicking in constant evaluation.][89508]
5293- [Ignore derived `Clone` and `Debug` implementations during dead code analysis.][85200]
5294
5295Compiler
5296--------
5297
5298- [Create more accurate debuginfo for vtables.][89597]
5299- [Add `armv6k-nintendo-3ds` at Tier 3\*.][88529]
5300- [Add `armv7-unknown-linux-uclibceabihf` at Tier 3\*.][88952]
5301- [Add `m68k-unknown-linux-gnu` at Tier 3\*.][88321]
5302- [Add SOLID targets at Tier 3\*:][86191] `aarch64-kmc-solid_asp3`, `armv7a-kmc-solid_asp3-eabi`, `armv7a-kmc-solid_asp3-eabihf`
5303
5304\* Refer to Rust's [platform support page][platform-support-doc] for more
5305 information on Rust's tiered platform support.
5306
5307Libraries
5308---------
5309
5310- [Avoid allocations and copying in `Vec::leak`][89337]
5311- [Add `#[repr(i8)]` to `Ordering`][89507]
5312- [Optimize `File::read_to_end` and `read_to_string`][89582]
5313- [Update to Unicode 14.0][89614]
5314- [Many more functions are marked `#[must_use]`][89692], producing a warning
5315 when ignoring their return value. This helps catch mistakes such as expecting
5316 a function to mutate a value in place rather than return a new value.
5317
5318Stabilised APIs
5319---------------
5320
5321- [`[T; N]::as_mut_slice`][`array::as_mut_slice`]
5322- [`[T; N]::as_slice`][`array::as_slice`]
5323- [`collections::TryReserveError`]
5324- [`HashMap::try_reserve`]
5325- [`HashSet::try_reserve`]
5326- [`String::try_reserve`]
5327- [`String::try_reserve_exact`]
5328- [`Vec::try_reserve`]
5329- [`Vec::try_reserve_exact`]
5330- [`VecDeque::try_reserve`]
5331- [`VecDeque::try_reserve_exact`]
5332- [`Iterator::map_while`]
5333- [`iter::MapWhile`]
5334- [`proc_macro::is_available`]
5335- [`Command::get_program`]
5336- [`Command::get_args`]
5337- [`Command::get_envs`]
5338- [`Command::get_current_dir`]
5339- [`CommandArgs`]
5340- [`CommandEnvs`]
5341
5342These APIs are now usable in const contexts:
5343
5344- [`hint::unreachable_unchecked`]
5345
5346Cargo
5347-----
5348
5349- [Stabilize custom profiles][cargo/9943]
5350
5351Compatibility notes
5352-------------------
5353
5354- [Ignore derived `Clone` and `Debug` implementations during dead code analysis.][85200]
5355 This will break some builds that set `#![deny(dead_code)]`.
5356
5357Internal changes
5358----------------
5359These changes provide no direct user facing benefits, but represent significant
5360improvements to the internals and overall performance of rustc
5361and related tools.
5362
5363- [Added an experimental backend for codegen with `libgccjit`.][87260]
5364
5365[85200]: https://github.com/rust-lang/rust/pull/85200/
5366[86191]: https://github.com/rust-lang/rust/pull/86191/
5367[87220]: https://github.com/rust-lang/rust/pull/87220/
5368[87260]: https://github.com/rust-lang/rust/pull/87260/
5369[88321]: https://github.com/rust-lang/rust/pull/88321/
5370[88529]: https://github.com/rust-lang/rust/pull/88529/
5371[88690]: https://github.com/rust-lang/rust/pull/88690/
5372[88952]: https://github.com/rust-lang/rust/pull/88952/
5373[89337]: https://github.com/rust-lang/rust/pull/89337/
5374[89507]: https://github.com/rust-lang/rust/pull/89507/
5375[89508]: https://github.com/rust-lang/rust/pull/89508/
5376[89582]: https://github.com/rust-lang/rust/pull/89582/
5377[89597]: https://github.com/rust-lang/rust/pull/89597/
5378[89614]: https://github.com/rust-lang/rust/pull/89614/
5379[89692]: https://github.com/rust-lang/rust/issues/89692/
5380[cargo/9943]: https://github.com/rust-lang/cargo/pull/9943/
5381[`array::as_mut_slice`]: https://doc.rust-lang.org/std/primitive.array.html#method.as_mut_slice
5382[`array::as_slice`]: https://doc.rust-lang.org/std/primitive.array.html#method.as_slice
5383[`collections::TryReserveError`]: https://doc.rust-lang.org/std/collections/struct.TryReserveError.html
5384[`HashMap::try_reserve`]: https://doc.rust-lang.org/std/collections/hash_map/struct.HashMap.html#method.try_reserve
5385[`HashSet::try_reserve`]: https://doc.rust-lang.org/std/collections/hash_set/struct.HashSet.html#method.try_reserve
5386[`String::try_reserve`]: https://doc.rust-lang.org/alloc/string/struct.String.html#method.try_reserve
5387[`String::try_reserve_exact`]: https://doc.rust-lang.org/alloc/string/struct.String.html#method.try_reserve_exact
5388[`Vec::try_reserve`]: https://doc.rust-lang.org/std/vec/struct.Vec.html#method.try_reserve
5389[`Vec::try_reserve_exact`]: https://doc.rust-lang.org/std/vec/struct.Vec.html#method.try_reserve_exact
5390[`VecDeque::try_reserve`]: https://doc.rust-lang.org/std/collections/struct.VecDeque.html#method.try_reserve
5391[`VecDeque::try_reserve_exact`]: https://doc.rust-lang.org/std/collections/struct.VecDeque.html#method.try_reserve_exact
5392[`Iterator::map_while`]: https://doc.rust-lang.org/std/iter/trait.Iterator.html#method.map_while
5393[`iter::MapWhile`]: https://doc.rust-lang.org/std/iter/struct.MapWhile.html
5394[`proc_macro::is_available`]: https://doc.rust-lang.org/proc_macro/fn.is_available.html
5395[`Command::get_program`]: https://doc.rust-lang.org/std/process/struct.Command.html#method.get_program
5396[`Command::get_args`]: https://doc.rust-lang.org/std/process/struct.Command.html#method.get_args
5397[`Command::get_envs`]: https://doc.rust-lang.org/std/process/struct.Command.html#method.get_envs
5398[`Command::get_current_dir`]: https://doc.rust-lang.org/std/process/struct.Command.html#method.get_current_dir
5399[`CommandArgs`]: https://doc.rust-lang.org/std/process/struct.CommandArgs.html
5400[`CommandEnvs`]: https://doc.rust-lang.org/std/process/struct.CommandEnvs.html
5401
5402Version 1.56.1 (2021-11-01)
5403===========================
5404
5405- New lints to detect the presence of bidirectional-override Unicode
5406 codepoints in the compiled source code ([CVE-2021-42574])
5407
5408[CVE-2021-42574]: https://cve.mitre.org/cgi-bin/cvename.cgi?name=CVE-2021-42574
5409
5410Version 1.56.0 (2021-10-21)
5411========================
5412
5413Language
5414--------
5415
5416- [The 2021 Edition is now stable.][rust#88100]
5417 See [the edition guide][rust-2021-edition-guide] for more details.
5418- [The pattern in `binding @ pattern` can now also introduce new bindings.][rust#85305]
5419- [Union field access is permitted in `const fn`.][rust#85769]
5420
5421[rust-2021-edition-guide]: https://doc.rust-lang.org/nightly/edition-guide/rust-2021/index.html
5422
5423Compiler
5424--------
5425
5426- [Upgrade to LLVM 13.][rust#87570]
5427- [Support memory, address, and thread sanitizers on aarch64-unknown-freebsd.][rust#88023]
5428- [Allow specifying a deployment target version for all iOS targets][rust#87699]
5429- [Warnings can be forced on with `--force-warn`.][rust#87472]
5430 This feature is primarily intended for usage by `cargo fix`, rather than end users.
5431- [Promote `aarch64-apple-ios-sim` to Tier 2\*.][rust#87760]
5432- [Add `powerpc-unknown-freebsd` at Tier 3\*.][rust#87370]
5433- [Add `riscv32imc-esp-espidf` at Tier 3\*.][rust#87666]
5434
5435\* Refer to Rust's [platform support page][platform-support-doc] for more
5436information on Rust's tiered platform support.
5437
5438Libraries
5439---------
5440
5441- [Allow writing of incomplete UTF-8 sequences via stdout/stderr on Windows.][rust#83342]
5442 The Windows console still requires valid Unicode, but this change allows
5443 splitting a UTF-8 character across multiple write calls. This allows, for
5444 instance, programs that just read and write data buffers (e.g. copying a file
5445 to stdout) without regard for Unicode or character boundaries.
5446- [Prefer `AtomicU{64,128}` over Mutex for Instant backsliding protection.][rust#83093]
5447 For this use case, atomics scale much better under contention.
5448- [Implement `Extend<(A, B)>` for `(Extend<A>, Extend<B>)`][rust#85835]
5449- [impl Default, Copy, Clone for std::io::Sink and std::io::Empty][rust#86744]
5450- [`impl From<[(K, V); N]>` for all collections.][rust#84111]
5451- [Remove `P: Unpin` bound on impl Future for Pin.][rust#81363]
5452- [Treat invalid environment variable names as nonexistent.][rust#86183]
5453 Previously, the environment functions would panic if given a variable name
5454 with an internal null character or equal sign (`=`). Now, these functions will
5455 just treat such names as nonexistent variables, since the OS cannot represent
5456 the existence of a variable with such a name.
5457
5458Stabilised APIs
5459---------------
5460
5461- [`std::os::unix::fs::chroot`]
5462- [`UnsafeCell::raw_get`]
5463- [`BufWriter::into_parts`]
5464- [`core::panic::{UnwindSafe, RefUnwindSafe, AssertUnwindSafe}`]
5465 These APIs were previously stable in `std`, but are now also available in `core`.
5466- [`Vec::shrink_to`]
5467- [`String::shrink_to`]
5468- [`OsString::shrink_to`]
5469- [`PathBuf::shrink_to`]
5470- [`BinaryHeap::shrink_to`]
5471- [`VecDeque::shrink_to`]
5472- [`HashMap::shrink_to`]
5473- [`HashSet::shrink_to`]
5474
5475These APIs are now usable in const contexts:
5476
5477- [`std::mem::transmute`]
5478- [`[T]::first`][`slice::first`]
5479- [`[T]::split_first`][`slice::split_first`]
5480- [`[T]::last`][`slice::last`]
5481- [`[T]::split_last`][`slice::split_last`]
5482
5483Cargo
5484-----
5485
5486- [Cargo supports specifying a minimum supported Rust version in Cargo.toml.][`rust-version`]
5487 This has no effect at present on dependency version selection.
5488 We encourage crates to specify their minimum supported Rust version, and we encourage CI systems
5489 that support Rust code to include a crate's specified minimum version in the test matrix for that
5490 crate by default.
5491
5492Compatibility notes
5493-------------------
5494
5495- [Update to new argument parsing rules on Windows.][rust#87580]
5496 This adjusts Rust's standard library to match the behavior of the standard
5497 libraries for C/C++. The rules have changed slightly over time, and this PR
5498 brings us to the latest set of rules (changed in 2008).
5499- [Disallow the aapcs calling convention on aarch64][rust#88399]
5500 This was already not supported by LLVM; this change surfaces this lack of
5501 support with a better error message.
5502- [Make `SEMICOLON_IN_EXPRESSIONS_FROM_MACROS` warn by default][rust#87385]
5503- [Warn when an escaped newline skips multiple lines.][rust#87671]
5504- [Calls to `libc::getpid` / `std::process::id` from `Command::pre_exec`
5505 may return different values on glibc <= 2.24.][rust#81825]
5506 Rust now invokes the `clone3` system call directly, when available, to use new functionality
5507 available via that system call. Older versions of glibc cache the result of `getpid`, and only
5508 update that cache when calling glibc's clone/fork functions, so a direct system call bypasses
5509 that cache update. glibc 2.25 and newer no longer cache `getpid` for exactly this reason.
5510
5511Internal changes
5512----------------
5513These changes provide no direct user facing benefits, but represent significant
5514improvements to the internals and overall performance of rustc
5515and related tools.
5516
5517- [LLVM is compiled with PGO in published x86_64-unknown-linux-gnu artifacts.][rust#88069]
5518 This improves the performance of most Rust builds.
5519- [Unify representation of macros in internal data structures.][rust#88019]
5520 This change fixes a host of bugs with the handling of macros by the compiler,
5521 as well as rustdoc.
5522
5523[`std::os::unix::fs::chroot`]: https://doc.rust-lang.org/stable/std/os/unix/fs/fn.chroot.html
5524[`UnsafeCell::raw_get`]: https://doc.rust-lang.org/stable/std/cell/struct.UnsafeCell.html#method.raw_get
5525[`BufWriter::into_parts`]: https://doc.rust-lang.org/stable/std/io/struct.BufWriter.html#method.into_parts
5526[`core::panic::{UnwindSafe, RefUnwindSafe, AssertUnwindSafe}`]: https://github.com/rust-lang/rust/pull/84662
5527[`Vec::shrink_to`]: https://doc.rust-lang.org/stable/std/vec/struct.Vec.html#method.shrink_to
5528[`String::shrink_to`]: https://doc.rust-lang.org/stable/std/string/struct.String.html#method.shrink_to
5529[`OsString::shrink_to`]: https://doc.rust-lang.org/stable/std/ffi/struct.OsString.html#method.shrink_to
5530[`PathBuf::shrink_to`]: https://doc.rust-lang.org/stable/std/path/struct.PathBuf.html#method.shrink_to
5531[`BinaryHeap::shrink_to`]: https://doc.rust-lang.org/stable/std/collections/struct.BinaryHeap.html#method.shrink_to
5532[`VecDeque::shrink_to`]: https://doc.rust-lang.org/stable/std/collections/struct.VecDeque.html#method.shrink_to
5533[`HashMap::shrink_to`]: https://doc.rust-lang.org/stable/std/collections/hash_map/struct.HashMap.html#method.shrink_to
5534[`HashSet::shrink_to`]: https://doc.rust-lang.org/stable/std/collections/hash_set/struct.HashSet.html#method.shrink_to
5535[`std::mem::transmute`]: https://doc.rust-lang.org/stable/std/mem/fn.transmute.html
5536[`slice::first`]: https://doc.rust-lang.org/stable/std/primitive.slice.html#method.first
5537[`slice::split_first`]: https://doc.rust-lang.org/stable/std/primitive.slice.html#method.split_first
5538[`slice::last`]: https://doc.rust-lang.org/stable/std/primitive.slice.html#method.last
5539[`slice::split_last`]: https://doc.rust-lang.org/stable/std/primitive.slice.html#method.split_last
5540[`rust-version`]: https://doc.rust-lang.org/nightly/cargo/reference/manifest.html#the-rust-version-field
5541[rust#87671]: https://github.com/rust-lang/rust/pull/87671
5542[rust#86183]: https://github.com/rust-lang/rust/pull/86183
5543[rust#87385]: https://github.com/rust-lang/rust/pull/87385
5544[rust#88100]: https://github.com/rust-lang/rust/pull/88100
5545[rust#85305]: https://github.com/rust-lang/rust/pull/85305
5546[rust#88069]: https://github.com/rust-lang/rust/pull/88069
5547[rust#87472]: https://github.com/rust-lang/rust/pull/87472
5548[rust#87699]: https://github.com/rust-lang/rust/pull/87699
5549[rust#87570]: https://github.com/rust-lang/rust/pull/87570
5550[rust#88023]: https://github.com/rust-lang/rust/pull/88023
5551[rust#87760]: https://github.com/rust-lang/rust/pull/87760
5552[rust#87370]: https://github.com/rust-lang/rust/pull/87370
5553[rust#87580]: https://github.com/rust-lang/rust/pull/87580
5554[rust#83342]: https://github.com/rust-lang/rust/pull/83342
5555[rust#83093]: https://github.com/rust-lang/rust/pull/83093
5556[rust#85835]: https://github.com/rust-lang/rust/pull/85835
5557[rust#86744]: https://github.com/rust-lang/rust/pull/86744
5558[rust#81363]: https://github.com/rust-lang/rust/pull/81363
5559[rust#84111]: https://github.com/rust-lang/rust/pull/84111
5560[rust#85769]: https://github.com/rust-lang/rust/pull/85769#issuecomment-854363720
5561[rust#88399]: https://github.com/rust-lang/rust/pull/88399
5562[rust#81825]: https://github.com/rust-lang/rust/pull/81825#issuecomment-808406918
5563[rust#88019]: https://github.com/rust-lang/rust/pull/88019
5564[rust#87666]: https://github.com/rust-lang/rust/pull/87666
5565
5566Version 1.55.0 (2021-09-09)
5567============================
5568
5569Language
5570--------
5571- [You can now write open "from" range patterns (`X..`), which will start at `X` and
5572 will end at the maximum value of the integer.][83918]
5573- [You can now explicitly import the prelude of different editions
5574 through `std::prelude` (e.g. `use std::prelude::rust_2021::*;`).][86294]
5575
5576Compiler
5577--------
5578- [Added tier 3\* support for `powerpc64le-unknown-freebsd`.][83572]
5579
5580\* Refer to Rust's [platform support page][platform-support-doc] for more
5581 information on Rust's tiered platform support.
5582
5583Libraries
5584---------
5585
5586- [Updated std's float parsing to use the Eisel-Lemire algorithm.][86761]
5587 These improvements should in general provide faster string parsing of floats,
5588 no longer reject certain valid floating point values, and reduce
5589 the produced code size for non-stripped artifacts.
5590- [`string::Drain` now implements `AsRef<str>` and `AsRef<[u8]>`.][86858]
5591
5592Stabilised APIs
5593---------------
5594
5595- [`Bound::cloned`]
5596- [`Drain::as_str`]
5597- [`IntoInnerError::into_error`]
5598- [`IntoInnerError::into_parts`]
5599- [`MaybeUninit::assume_init_mut`]
5600- [`MaybeUninit::assume_init_ref`]
5601- [`MaybeUninit::write`]
5602- [`array::map`]
5603- [`ops::ControlFlow`]
5604- [`x86::_bittest`]
5605- [`x86::_bittestandcomplement`]
5606- [`x86::_bittestandreset`]
5607- [`x86::_bittestandset`]
5608- [`x86_64::_bittest64`]
5609- [`x86_64::_bittestandcomplement64`]
5610- [`x86_64::_bittestandreset64`]
5611- [`x86_64::_bittestandset64`]
5612
5613The following previously stable functions are now `const`.
5614
5615- [`str::from_utf8_unchecked`]
5616
5617
5618Cargo
5619-----
5620- [Cargo will now deduplicate compiler diagnostics to the terminal when invoking
5621 rustc in parallel such as when using `cargo test`.][cargo/9675]
5622- [The package definition in `cargo metadata` now includes the `"default_run"`
5623 field from the manifest.][cargo/9550]
5624- [Added `cargo d` as an alias for `cargo doc`.][cargo/9680]
5625- [Added `{lib}` as formatting option for `cargo tree` to print the `"lib_name"`
5626 of packages.][cargo/9663]
5627
5628Rustdoc
5629-------
5630- [Added "Go to item on exact match" search option.][85876]
5631- [The "Implementors" section on traits no longer shows redundant
5632 method definitions.][85970]
5633- [Trait implementations are toggled open by default.][86260] This should make the
5634 implementations more searchable by tools like `CTRL+F` in your browser.
5635- [Intra-doc links should now correctly resolve associated items (e.g. methods)
5636 through type aliases.][86334]
5637- [Traits which are marked with `#[doc(hidden)]` will no longer appear in the
5638 "Trait Implementations" section.][86513]
5639
5640
5641Compatibility Notes
5642-------------------
5643- [std functions that return an `io::Error` will no longer use the
5644 `ErrorKind::Other` variant.][85746] This is to better reflect that these
5645 kinds of errors could be categorised [into newer more specific `ErrorKind`
5646 variants][79965], and that they do not represent a user error.
5647- [Using environment variable names with `process::Command` on Windows now
5648 behaves as expected.][85270] Previously using environment variables with
5649 `Command` would cause them to be ASCII-uppercased.
5650- [Rustdoc will now warn on using rustdoc lints that aren't prefixed
5651 with `rustdoc::`][86849]
5652- `RUSTFLAGS` is no longer set for build scripts. Build scripts
5653 should use `CARGO_ENCODED_RUSTFLAGS` instead. See the
5654 [documentation](https://doc.rust-lang.org/nightly/cargo/reference/environment-variables.html#environment-variables-cargo-sets-for-build-scripts)
5655 for more details.
5656
5657[86849]: https://github.com/rust-lang/rust/pull/86849
5658[86513]: https://github.com/rust-lang/rust/pull/86513
5659[86334]: https://github.com/rust-lang/rust/pull/86334
5660[86260]: https://github.com/rust-lang/rust/pull/86260
5661[85970]: https://github.com/rust-lang/rust/pull/85970
5662[85876]: https://github.com/rust-lang/rust/pull/85876
5663[83572]: https://github.com/rust-lang/rust/pull/83572
5664[86294]: https://github.com/rust-lang/rust/pull/86294
5665[86858]: https://github.com/rust-lang/rust/pull/86858
5666[86761]: https://github.com/rust-lang/rust/pull/86761
5667[85746]: https://github.com/rust-lang/rust/pull/85746
5668[85270]: https://github.com/rust-lang/rust/pull/85270
5669[83918]: https://github.com/rust-lang/rust/pull/83918
5670[79965]: https://github.com/rust-lang/rust/pull/79965
5671[cargo/9663]: https://github.com/rust-lang/cargo/pull/9663
5672[cargo/9675]: https://github.com/rust-lang/cargo/pull/9675
5673[cargo/9550]: https://github.com/rust-lang/cargo/pull/9550
5674[cargo/9680]: https://github.com/rust-lang/cargo/pull/9680
5675[`array::map`]: https://doc.rust-lang.org/stable/std/primitive.array.html#method.map
5676[`Bound::cloned`]: https://doc.rust-lang.org/stable/std/ops/enum.Bound.html#method.cloned
5677[`Drain::as_str`]: https://doc.rust-lang.org/stable/std/string/struct.Drain.html#method.as_str
5678[`IntoInnerError::into_error`]: https://doc.rust-lang.org/stable/std/io/struct.IntoInnerError.html#method.into_error
5679[`IntoInnerError::into_parts`]: https://doc.rust-lang.org/stable/std/io/struct.IntoInnerError.html#method.into_parts
5680[`MaybeUninit::assume_init_mut`]: https://doc.rust-lang.org/stable/std/mem/union.MaybeUninit.html#method.assume_init_mut
5681[`MaybeUninit::assume_init_ref`]: https://doc.rust-lang.org/stable/std/mem/union.MaybeUninit.html#method.assume_init_ref
5682[`MaybeUninit::write`]: https://doc.rust-lang.org/stable/std/mem/union.MaybeUninit.html#method.write
5683[`ops::ControlFlow`]: https://doc.rust-lang.org/stable/std/ops/enum.ControlFlow.html
5684[`str::from_utf8_unchecked`]: https://doc.rust-lang.org/stable/std/str/fn.from_utf8_unchecked.html
5685[`x86::_bittest`]: https://doc.rust-lang.org/stable/core/arch/x86/fn._bittest.html
5686[`x86::_bittestandcomplement`]: https://doc.rust-lang.org/stable/core/arch/x86/fn._bittestandcomplement.html
5687[`x86::_bittestandreset`]: https://doc.rust-lang.org/stable/core/arch/x86/fn._bittestandreset.html
5688[`x86::_bittestandset`]: https://doc.rust-lang.org/stable/core/arch/x86/fn._bittestandset.html
5689[`x86_64::_bittest64`]: https://doc.rust-lang.org/stable/core/arch/x86_64/fn._bittest64.html
5690[`x86_64::_bittestandcomplement64`]: https://doc.rust-lang.org/stable/core/arch/x86_64/fn._bittestandcomplement64.html
5691[`x86_64::_bittestandreset64`]: https://doc.rust-lang.org/stable/core/arch/x86_64/fn._bittestandreset64.html
5692[`x86_64::_bittestandset64`]: https://doc.rust-lang.org/stable/core/arch/x86_64/fn._bittestandset64.html
5693
5694
5695Version 1.54.0 (2021-07-29)
5696============================
5697
5698Language
5699-----------------------
5700
5701- [You can now use macros for values in some built-in attributes.][83366]
5702 This primarily allows you to call macros within the `#[doc]` attribute. For
5703 example, to include external documentation in your crate, you can now write
5704 the following:
5705 ```rust
5706 #![doc = include_str!("README.md")]
5707 ```
5708
5709- [You can now cast between unsized slice types (and types which contain
5710 unsized slices) in `const fn`.][85078]
5711- [You can now use multiple generic lifetimes with `impl Trait` where the
5712 lifetimes don't explicitly outlive another.][84701] In code this means
5713 that you can now have `impl Trait<'a, 'b>` where as before you could
5714 only have `impl Trait<'a, 'b> where 'b: 'a`.
5715
5716Compiler
5717-----------------------
5718
5719- [Rustc will now search for custom JSON targets in
5720 `/lib/rustlib/<target-triple>/target.json` where `/` is the "sysroot"
5721 directory.][83800] You can find your sysroot directory by running
5722 `rustc --print sysroot`.
5723- [Added `wasm` as a `target_family` for WebAssembly platforms.][84072]
5724- [You can now use `#[target_feature]` on safe functions when targeting
5725 WebAssembly platforms.][84988]
5726- [Improved debugger output for enums on Windows MSVC platforms.][85292]
5727- [Added tier 3\* support for `bpfel-unknown-none`
5728 and `bpfeb-unknown-none`.][79608]
5729- [`-Zmutable-noalias=yes`][82834] is enabled by default when using LLVM 12 or above.
5730
5731\* Refer to Rust's [platform support page][platform-support-doc] for more
5732 information on Rust's tiered platform support.
5733
5734Libraries
5735-----------------------
5736
5737- [`panic::panic_any` will now `#[track_caller]`.][85745]
5738- [Added `OutOfMemory` as a variant of `io::ErrorKind`.][84744]
5739- [ `proc_macro::Literal` now implements `FromStr`.][84717]
5740- [The implementations of vendor intrinsics in core::arch have been
5741 significantly refactored.][83278] The main user-visible changes are
5742 a 50% reduction in the size of libcore.rlib and stricter validation
5743 of constant operands passed to intrinsics. The latter is technically
5744 a breaking change, but allows Rust to more closely match the C vendor
5745 intrinsics API.
5746
5747Stabilized APIs
5748---------------
5749
5750- [`BTreeMap::into_keys`]
5751- [`BTreeMap::into_values`]
5752- [`HashMap::into_keys`]
5753- [`HashMap::into_values`]
5754- [`arch::wasm32`]
5755- [`VecDeque::binary_search`]
5756- [`VecDeque::binary_search_by`]
5757- [`VecDeque::binary_search_by_key`]
5758- [`VecDeque::partition_point`]
5759
5760Cargo
5761-----
5762
5763- [Added the `--prune <spec>` option to `cargo-tree` to remove a package from
5764 the dependency graph.][cargo/9520]
5765- [Added the `--depth` option to `cargo-tree` to print only to a certain depth
5766 in the tree ][cargo/9499]
5767- [Added the `no-proc-macro` value to `cargo-tree --edges` to hide procedural
5768 macro dependencies.][cargo/9488]
5769- [A new environment variable named `CARGO_TARGET_TMPDIR` is available.][cargo/9375]
5770 This variable points to a directory that integration tests and benches
5771 can use as a "scratchpad" for testing filesystem operations.
5772
5773Compatibility Notes
5774-------------------
5775- [Mixing Option and Result via `?` is no longer permitted in closures for inferred types.][86831]
5776- [Previously unsound code is no longer permitted where different constructors in branches
5777 could require different lifetimes.][85574]
5778- As previously mentioned the [`std::arch` intrinsics now uses stricter const checking][83278]
5779 than before and may reject some previously accepted code.
5780- [`i128` multiplication on Cortex M0+ platforms currently unconditionally causes overflow
5781 when compiled with `codegen-units = 1`.][86063]
5782
5783[85574]: https://github.com/rust-lang/rust/issues/85574
5784[86831]: https://github.com/rust-lang/rust/issues/86831
5785[86063]: https://github.com/rust-lang/rust/issues/86063
5786[79608]: https://github.com/rust-lang/rust/pull/79608
5787[84988]: https://github.com/rust-lang/rust/pull/84988
5788[84701]: https://github.com/rust-lang/rust/pull/84701
5789[84072]: https://github.com/rust-lang/rust/pull/84072
5790[85745]: https://github.com/rust-lang/rust/pull/85745
5791[84744]: https://github.com/rust-lang/rust/pull/84744
5792[85078]: https://github.com/rust-lang/rust/pull/85078
5793[84717]: https://github.com/rust-lang/rust/pull/84717
5794[83800]: https://github.com/rust-lang/rust/pull/83800
5795[83366]: https://github.com/rust-lang/rust/pull/83366
5796[83278]: https://github.com/rust-lang/rust/pull/83278
5797[85292]: https://github.com/rust-lang/rust/pull/85292
5798[82834]: https://github.com/rust-lang/rust/pull/82834
5799[cargo/9520]: https://github.com/rust-lang/cargo/pull/9520
5800[cargo/9499]: https://github.com/rust-lang/cargo/pull/9499
5801[cargo/9488]: https://github.com/rust-lang/cargo/pull/9488
5802[cargo/9375]: https://github.com/rust-lang/cargo/pull/9375
5803[`BTreeMap::into_keys`]: https://doc.rust-lang.org/std/collections/struct.BTreeMap.html#method.into_keys
5804[`BTreeMap::into_values`]: https://doc.rust-lang.org/std/collections/struct.BTreeMap.html#method.into_values
5805[`HashMap::into_keys`]: https://doc.rust-lang.org/std/collections/struct.HashMap.html#method.into_keys
5806[`HashMap::into_values`]: https://doc.rust-lang.org/std/collections/struct.HashMap.html#method.into_values
5807[`arch::wasm32`]: https://doc.rust-lang.org/core/arch/wasm32/index.html
5808[`VecDeque::binary_search`]: https://doc.rust-lang.org/std/collections/struct.VecDeque.html#method.binary_search
5809[`VecDeque::binary_search_by`]: https://doc.rust-lang.org/std/collections/struct.VecDeque.html#method.binary_search_by
5810
5811[`VecDeque::binary_search_by_key`]: https://doc.rust-lang.org/std/collections/struct.VecDeque.html#method.binary_search_by_key
5812
5813[`VecDeque::partition_point`]: https://doc.rust-lang.org/std/collections/struct.VecDeque.html#method.partition_point
5814
5815Version 1.53.0 (2021-06-17)
5816============================
5817
5818Language
5819-----------------------
5820- [You can now use unicode for identifiers.][83799] This allows multilingual
5821 identifiers but still doesn't allow glyphs that are not considered characters
5822 such as `◆` or `🦀`. More specifically you can now use any identifier that
5823 matches the UAX #31 "Unicode Identifier and Pattern Syntax" standard. This
5824 is the same standard as languages like Python, however Rust uses NFC
5825 normalization which may be different from other languages.
5826- [You can now specify "or patterns" inside pattern matches.][79278]
5827 Previously you could only use `|` (OR) on complete patterns. E.g.
5828 ```rust
5829 let x = Some(2u8);
5830 // Before
5831 matches!(x, Some(1) | Some(2));
5832 // Now
5833 matches!(x, Some(1 | 2));
5834 ```
5835- [Added the `:pat_param` `macro_rules!` matcher.][83386] This matcher
5836 has the same semantics as the `:pat` matcher. This is to allow `:pat`
5837 to change semantics to being a pattern fragment in a future edition.
5838
5839Compiler
5840-----------------------
5841- [Updated the minimum external LLVM version to LLVM 10.][83387]
5842- [Added Tier 3\* support for the `wasm64-unknown-unknown` target.][80525]
5843- [Improved debuginfo for closures and async functions on Windows MSVC.][83941]
5844
5845\* Refer to Rust's [platform support page][platform-support-doc] for more
5846information on Rust's tiered platform support.
5847
5848Libraries
5849-----------------------
5850- [Abort messages will now forward to `android_set_abort_message` on
5851 Android platforms when available.][81469]
5852- [`slice::IterMut<'_, T>` now implements `AsRef<[T]>`][82771]
5853- [Arrays of any length now implement `IntoIterator`.][84147]
5854 Currently calling `.into_iter()` as a method on an array will
5855 return `impl Iterator<Item=&T>`, but this may change in a
5856 future edition to change `Item` to `T`. Calling `IntoIterator::into_iter`
5857 directly on arrays will provide `impl Iterator<Item=T>` as expected.
5858- [`leading_zeros`, and `trailing_zeros` are now available on all
5859 `NonZero` integer types.][84082]
5860- [`{f32, f64}::from_str` now parse and print special values
5861 (`NaN`, `-0`) according to IEEE 754.][78618]
5862- [You can now index into slices using `(Bound<usize>, Bound<usize>)`.][77704]
5863- [Add the `BITS` associated constant to all numeric types.][82565]
5864
5865Stabilised APIs
5866---------------
5867- [`AtomicBool::fetch_update`]
5868- [`AtomicPtr::fetch_update`]
5869- [`BTreeMap::retain`]
5870- [`BTreeSet::retain`]
5871- [`BufReader::seek_relative`]
5872- [`DebugStruct::non_exhaustive`]
5873- [`Duration::MAX`]
5874- [`Duration::ZERO`]
5875- [`Duration::is_zero`]
5876- [`Duration::saturating_add`]
5877- [`Duration::saturating_mul`]
5878- [`Duration::saturating_sub`]
5879- [`ErrorKind::Unsupported`]
5880- [`Option::insert`]
5881- [`Ordering::is_eq`]
5882- [`Ordering::is_ge`]
5883- [`Ordering::is_gt`]
5884- [`Ordering::is_le`]
5885- [`Ordering::is_lt`]
5886- [`Ordering::is_ne`]
5887- [`OsStr::is_ascii`]
5888- [`OsStr::make_ascii_lowercase`]
5889- [`OsStr::make_ascii_uppercase`]
5890- [`OsStr::to_ascii_lowercase`]
5891- [`OsStr::to_ascii_uppercase`]
5892- [`Peekable::peek_mut`]
5893- [`Rc::decrement_strong_count`]
5894- [`Rc::increment_strong_count`]
5895- [`Vec::extend_from_within`]
5896- [`array::from_mut`]
5897- [`array::from_ref`]
5898- [`cmp::max_by_key`]
5899- [`cmp::max_by`]
5900- [`cmp::min_by_key`]
5901- [`cmp::min_by`]
5902- [`f32::is_subnormal`]
5903- [`f64::is_subnormal`]
5904
5905Cargo
5906-----------------------
5907- [Cargo now supports git repositories where the default `HEAD` branch is not
5908 "master".][cargo/9392] This also includes a switch to the version 3 `Cargo.lock` format
5909 which can handle default branches correctly.
5910- [macOS targets now default to `unpacked` split-debuginfo.][cargo/9298]
5911- [The `authors` field is no longer included in `Cargo.toml` for new
5912 projects.][cargo/9282]
5913
5914Rustdoc
5915-----------------------
5916- [Added the `rustdoc::bare_urls` lint that warns when you have URLs
5917 without hyperlinks.][81764]
5918
5919Compatibility Notes
5920-------------------
5921- [Implement token-based handling of attributes during expansion][82608]
5922- [`Ipv4::from_str` will now reject octal format IP addresses in addition
5923 to rejecting hexadecimal IP addresses.][83652] The octal format can lead
5924 to confusion and potential security vulnerabilities and [is no
5925 longer recommended][ietf6943].
5926- [The added `BITS` constant may conflict with external definitions.][85667]
5927 In particular, this was known to be a problem in the `lexical-core` crate,
5928 but they have published fixes for semantic versions 0.4 through 0.7. To
5929 update this dependency alone, use `cargo update -p lexical-core`.
5930- Incremental compilation remains off by default, unless one uses the `RUSTC_FORCE_INCREMENTAL=1` environment variable added in 1.52.1.
5931
5932Internal Only
5933-------------
5934These changes provide no direct user facing benefits, but represent significant
5935improvements to the internals and overall performance of rustc and
5936related tools.
5937
5938- [Rework the `std::sys::windows::alloc` implementation.][83065]
5939- [rustdoc: Don't enter an infer_ctxt in get_blanket_impls for impls that aren't blanket impls.][82864]
5940- [rustdoc: Only look at blanket impls in `get_blanket_impls`][83681]
5941- [Rework rustdoc const type][82873]
5942
5943[85667]: https://github.com/rust-lang/rust/pull/85667
5944[83386]: https://github.com/rust-lang/rust/pull/83386
5945[82771]: https://github.com/rust-lang/rust/pull/82771
5946[84147]: https://github.com/rust-lang/rust/pull/84147
5947[84082]: https://github.com/rust-lang/rust/pull/84082
5948[83799]: https://github.com/rust-lang/rust/pull/83799
5949[83681]: https://github.com/rust-lang/rust/pull/83681
5950[83652]: https://github.com/rust-lang/rust/pull/83652
5951[83387]: https://github.com/rust-lang/rust/pull/83387
5952[82873]: https://github.com/rust-lang/rust/pull/82873
5953[82864]: https://github.com/rust-lang/rust/pull/82864
5954[82608]: https://github.com/rust-lang/rust/pull/82608
5955[82565]: https://github.com/rust-lang/rust/pull/82565
5956[80525]: https://github.com/rust-lang/rust/pull/80525
5957[79278]: https://github.com/rust-lang/rust/pull/79278
5958[78618]: https://github.com/rust-lang/rust/pull/78618
5959[77704]: https://github.com/rust-lang/rust/pull/77704
5960[83941]: https://github.com/rust-lang/rust/pull/83941
5961[83065]: https://github.com/rust-lang/rust/pull/83065
5962[81764]: https://github.com/rust-lang/rust/pull/81764
5963[81469]: https://github.com/rust-lang/rust/pull/81469
5964[cargo/9298]: https://github.com/rust-lang/cargo/pull/9298
5965[cargo/9282]: https://github.com/rust-lang/cargo/pull/9282
5966[cargo/9392]: https://github.com/rust-lang/cargo/pull/9392
5967[`AtomicBool::fetch_update`]: https://doc.rust-lang.org/std/sync/atomic/struct.AtomicBool.html#method.fetch_update
5968[`AtomicPtr::fetch_update`]: https://doc.rust-lang.org/std/sync/atomic/struct.AtomicPtr.html#method.fetch_update
5969[`BTreeMap::retain`]: https://doc.rust-lang.org/std/collections/struct.BTreeMap.html#method.retain
5970[`BTreeSet::retain`]: https://doc.rust-lang.org/std/collections/struct.BTreeSet.html#method.retain
5971[`BufReader::seek_relative`]: https://doc.rust-lang.org/std/io/struct.BufReader.html#method.seek_relative
5972[`DebugStruct::non_exhaustive`]: https://doc.rust-lang.org/std/fmt/struct.DebugStruct.html#method.finish_non_exhaustive
5973[`Duration::MAX`]: https://doc.rust-lang.org/std/time/struct.Duration.html#associatedconstant.MAX
5974[`Duration::ZERO`]: https://doc.rust-lang.org/std/time/struct.Duration.html#associatedconstant.ZERO
5975[`Duration::is_zero`]: https://doc.rust-lang.org/std/time/struct.Duration.html#method.is_zero
5976[`Duration::saturating_add`]: https://doc.rust-lang.org/std/time/struct.Duration.html#method.saturating_add
5977[`Duration::saturating_mul`]: https://doc.rust-lang.org/std/time/struct.Duration.html#method.saturating_mul
5978[`Duration::saturating_sub`]: https://doc.rust-lang.org/std/time/struct.Duration.html#method.saturating_sub
5979[`ErrorKind::Unsupported`]: https://doc.rust-lang.org/std/io/enum.ErrorKind.html#variant.Unsupported
5980[`Option::insert`]: https://doc.rust-lang.org/std/option/enum.Option.html#method.insert
5981[`Ordering::is_eq`]: https://doc.rust-lang.org/std/cmp/enum.Ordering.html#method.is_eq
5982[`Ordering::is_ge`]: https://doc.rust-lang.org/std/cmp/enum.Ordering.html#method.is_ge
5983[`Ordering::is_gt`]: https://doc.rust-lang.org/std/cmp/enum.Ordering.html#method.is_gt
5984[`Ordering::is_le`]: https://doc.rust-lang.org/std/cmp/enum.Ordering.html#method.is_le
5985[`Ordering::is_lt`]: https://doc.rust-lang.org/std/cmp/enum.Ordering.html#method.is_lt
5986[`Ordering::is_ne`]: https://doc.rust-lang.org/std/cmp/enum.Ordering.html#method.is_ne
5987[`OsStr::is_ascii`]: https://doc.rust-lang.org/std/ffi/struct.OsStr.html#method.is_ascii
5988[`OsStr::make_ascii_lowercase`]: https://doc.rust-lang.org/std/ffi/struct.OsStr.html#method.make_ascii_lowercase
5989[`OsStr::make_ascii_uppercase`]: https://doc.rust-lang.org/std/ffi/struct.OsStr.html#method.make_ascii_uppercase
5990[`OsStr::to_ascii_lowercase`]: https://doc.rust-lang.org/std/ffi/struct.OsStr.html#method.to_ascii_lowercase
5991[`OsStr::to_ascii_uppercase`]: https://doc.rust-lang.org/std/ffi/struct.OsStr.html#method.to_ascii_uppercase
5992[`Peekable::peek_mut`]: https://doc.rust-lang.org/std/iter/struct.Peekable.html#method.peek_mut
5993[`Rc::decrement_strong_count`]: https://doc.rust-lang.org/std/rc/struct.Rc.html#method.decrement_strong_count
5994[`Rc::increment_strong_count`]: https://doc.rust-lang.org/std/rc/struct.Rc.html#method.increment_strong_count
5995[`Vec::extend_from_within`]: https://doc.rust-lang.org/beta/std/vec/struct.Vec.html#method.extend_from_within
5996[`array::from_mut`]: https://doc.rust-lang.org/beta/std/array/fn.from_mut.html
5997[`array::from_ref`]: https://doc.rust-lang.org/beta/std/array/fn.from_ref.html
5998[`cmp::max_by_key`]: https://doc.rust-lang.org/beta/std/cmp/fn.max_by_key.html
5999[`cmp::max_by`]: https://doc.rust-lang.org/beta/std/cmp/fn.max_by.html
6000[`cmp::min_by_key`]: https://doc.rust-lang.org/beta/std/cmp/fn.min_by_key.html
6001[`cmp::min_by`]: https://doc.rust-lang.org/beta/std/cmp/fn.min_by.html
6002[`f32::is_subnormal`]: https://doc.rust-lang.org/std/primitive.f32.html#method.is_subnormal
6003[`f64::is_subnormal`]: https://doc.rust-lang.org/std/primitive.f64.html#method.is_subnormal
6004[ietf6943]: https://datatracker.ietf.org/doc/html/rfc6943#section-3.1.1
6005
6006
6007Version 1.52.1 (2021-05-10)
6008============================
6009
6010This release disables incremental compilation, unless the user has explicitly
6011opted in via the newly added RUSTC_FORCE_INCREMENTAL=1 environment variable.
6012
6013This is due to the widespread, and frequently occurring, breakage encountered by
6014Rust users due to newly enabled incremental verification in 1.52.0. Notably,
6015Rust users **should** upgrade to 1.52.0 or 1.52.1: the bugs that are detected by
6016newly added incremental verification are still present in past stable versions,
6017and are not yet fixed on any channel. These bugs can lead to miscompilation of
6018Rust binaries.
6019
6020These problems only affect incremental builds, so release builds with Cargo
6021should not be affected unless the user has explicitly opted into incremental.
6022Debug and check builds are affected.
6023
6024See [84970] for more details.
6025
6026[84970]: https://github.com/rust-lang/rust/issues/84970
6027
6028Version 1.52.0 (2021-05-06)
6029============================
6030
6031Language
6032--------
6033- [Added the `unsafe_op_in_unsafe_fn` lint, which checks whether the unsafe code
6034 in an `unsafe fn` is wrapped in a `unsafe` block.][79208] This lint
6035 is allowed by default, and may become a warning or hard error in a
6036 future edition.
6037- [You can now cast mutable references to arrays to a pointer of the same type as
6038 the element.][81479]
6039
6040Compiler
6041--------
6042- [Upgraded the default LLVM to LLVM 12.][81451]
6043
6044Added tier 3\* support for the following targets.
6045
6046- [`s390x-unknown-linux-musl`][82166]
6047- [`riscv32gc-unknown-linux-musl` & `riscv64gc-unknown-linux-musl`][82202]
6048- [`powerpc-unknown-openbsd`][82733]
6049
6050\* Refer to Rust's [platform support page][platform-support-doc] for more
6051information on Rust's tiered platform support.
6052
6053Libraries
6054---------
6055- [`OsString` now implements `Extend` and `FromIterator`.][82121]
6056- [`cmp::Reverse` now has `#[repr(transparent)]` representation.][81879]
6057- [`Arc<impl Error>` now implements `error::Error`.][80553]
6058- [All integer division and remainder operations are now `const`.][80962]
6059
6060Stabilised APIs
6061-------------
6062- [`Arguments::as_str`]
6063- [`char::MAX`]
6064- [`char::REPLACEMENT_CHARACTER`]
6065- [`char::UNICODE_VERSION`]
6066- [`char::decode_utf16`]
6067- [`char::from_digit`]
6068- [`char::from_u32_unchecked`]
6069- [`char::from_u32`]
6070- [`slice::partition_point`]
6071- [`str::rsplit_once`]
6072- [`str::split_once`]
6073
6074The following previously stable APIs are now `const`.
6075
6076- [`char::len_utf8`]
6077- [`char::len_utf16`]
6078- [`char::to_ascii_uppercase`]
6079- [`char::to_ascii_lowercase`]
6080- [`char::eq_ignore_ascii_case`]
6081- [`u8::to_ascii_uppercase`]
6082- [`u8::to_ascii_lowercase`]
6083- [`u8::eq_ignore_ascii_case`]
6084
6085Rustdoc
6086-------
6087- [Rustdoc lints are now treated as a tool lint, meaning that
6088 lints are now prefixed with `rustdoc::` (e.g. `#[warn(rustdoc::broken_intra_doc_links)]`).][80527]
6089 Using the old style is still allowed, and will become a warning in
6090 a future release.
6091- [Rustdoc now supports argument files.][82261]
6092- [Rustdoc now generates smart punctuation for documentation.][79423]
6093- [You can now use "task lists" in Rustdoc Markdown.][81766] E.g.
6094 ```markdown
6095 - [x] Complete
6096 - [ ] Todo
6097 ```
6098
6099Misc
6100----
6101- [You can now pass multiple filters to tests.][81356] E.g.
6102 `cargo test -- foo bar` will run all tests that match `foo` and `bar`.
6103- [Rustup now distributes PDB symbols for the `std` library on Windows,
6104 allowing you to see `std` symbols when debugging.][82218]
6105
6106Internal Only
6107-------------
6108These changes provide no direct user facing benefits, but represent significant
6109improvements to the internals and overall performance of rustc and
6110related tools.
6111
6112- [Check the result cache before the DepGraph when ensuring queries][81855]
6113- [Try fast_reject::simplify_type in coherence before doing full check][81744]
6114- [Only store a LocalDefId in some HIR nodes][81611]
6115- [Store HIR attributes in a side table][79519]
6116
6117Compatibility Notes
6118-------------------
6119- [Cargo build scripts are now forbidden from setting `RUSTC_BOOTSTRAP`.][cargo/9181]
6120- [Removed support for the `x86_64-rumprun-netbsd` target.][82594]
6121- [Deprecated the `x86_64-sun-solaris` target in favor of `x86_64-pc-solaris`.][82216]
6122- [Rustdoc now only accepts `,`, ` `, and `\t` as delimiters for specifying
6123 languages in code blocks.][78429]
6124- [Rustc now catches more cases of `pub_use_of_private_extern_crate`][80763]
6125- [Changes in how proc macros handle whitespace may lead to panics when used
6126 with older `proc-macro-hack` versions. A `cargo update` should be sufficient to fix this in all cases.][84136]
6127- [Turn `#[derive]` into a regular macro attribute][79078]
6128
6129[84136]: https://github.com/rust-lang/rust/issues/84136
6130[80763]: https://github.com/rust-lang/rust/pull/80763
6131[82166]: https://github.com/rust-lang/rust/pull/82166
6132[82121]: https://github.com/rust-lang/rust/pull/82121
6133[81879]: https://github.com/rust-lang/rust/pull/81879
6134[82261]: https://github.com/rust-lang/rust/pull/82261
6135[82218]: https://github.com/rust-lang/rust/pull/82218
6136[82216]: https://github.com/rust-lang/rust/pull/82216
6137[82202]: https://github.com/rust-lang/rust/pull/82202
6138[81855]: https://github.com/rust-lang/rust/pull/81855
6139[81766]: https://github.com/rust-lang/rust/pull/81766
6140[81744]: https://github.com/rust-lang/rust/pull/81744
6141[81611]: https://github.com/rust-lang/rust/pull/81611
6142[81479]: https://github.com/rust-lang/rust/pull/81479
6143[81451]: https://github.com/rust-lang/rust/pull/81451
6144[81356]: https://github.com/rust-lang/rust/pull/81356
6145[80962]: https://github.com/rust-lang/rust/pull/80962
6146[80553]: https://github.com/rust-lang/rust/pull/80553
6147[80527]: https://github.com/rust-lang/rust/pull/80527
6148[79519]: https://github.com/rust-lang/rust/pull/79519
6149[79423]: https://github.com/rust-lang/rust/pull/79423
6150[79208]: https://github.com/rust-lang/rust/pull/79208
6151[78429]: https://github.com/rust-lang/rust/pull/78429
6152[82733]: https://github.com/rust-lang/rust/pull/82733
6153[82594]: https://github.com/rust-lang/rust/pull/82594
6154[79078]: https://github.com/rust-lang/rust/pull/79078
6155[cargo/9181]: https://github.com/rust-lang/cargo/pull/9181
6156[`char::MAX`]: https://doc.rust-lang.org/std/primitive.char.html#associatedconstant.MAX
6157[`char::REPLACEMENT_CHARACTER`]: https://doc.rust-lang.org/std/primitive.char.html#associatedconstant.REPLACEMENT_CHARACTER
6158[`char::UNICODE_VERSION`]: https://doc.rust-lang.org/std/primitive.char.html#associatedconstant.UNICODE_VERSION
6159[`char::decode_utf16`]: https://doc.rust-lang.org/std/primitive.char.html#method.decode_utf16
6160[`char::from_u32`]: https://doc.rust-lang.org/std/primitive.char.html#method.from_u32
6161[`char::from_u32_unchecked`]: https://doc.rust-lang.org/std/primitive.char.html#method.from_u32_unchecked
6162[`char::from_digit`]: https://doc.rust-lang.org/std/primitive.char.html#method.from_digit
6163[`Peekable::next_if`]: https://doc.rust-lang.org/stable/std/iter/struct.Peekable.html#method.next_if
6164[`Peekable::next_if_eq`]: https://doc.rust-lang.org/stable/std/iter/struct.Peekable.html#method.next_if_eq
6165[`Arguments::as_str`]: https://doc.rust-lang.org/stable/std/fmt/struct.Arguments.html#method.as_str
6166[`str::split_once`]: https://doc.rust-lang.org/stable/std/primitive.str.html#method.split_once
6167[`str::rsplit_once`]: https://doc.rust-lang.org/stable/std/primitive.str.html#method.rsplit_once
6168[`slice::partition_point`]: https://doc.rust-lang.org/stable/std/primitive.slice.html#method.partition_point
6169[`char::len_utf8`]: https://doc.rust-lang.org/stable/std/primitive.char.html#method.len_utf8
6170[`char::len_utf16`]: https://doc.rust-lang.org/stable/std/primitive.char.html#method.len_utf16
6171[`char::to_ascii_uppercase`]: https://doc.rust-lang.org/stable/std/primitive.char.html#method.to_ascii_uppercase
6172[`char::to_ascii_lowercase`]: https://doc.rust-lang.org/stable/std/primitive.char.html#method.to_ascii_lowercase
6173[`char::eq_ignore_ascii_case`]: https://doc.rust-lang.org/stable/std/primitive.char.html#method.eq_ignore_ascii_case
6174[`u8::to_ascii_uppercase`]: https://doc.rust-lang.org/stable/std/primitive.u8.html#method.to_ascii_uppercase
6175[`u8::to_ascii_lowercase`]: https://doc.rust-lang.org/stable/std/primitive.u8.html#method.to_ascii_lowercase
6176[`u8::eq_ignore_ascii_case`]: https://doc.rust-lang.org/stable/std/primitive.u8.html#method.eq_ignore_ascii_case
6177
6178Version 1.51.0 (2021-03-25)
6179============================
6180
6181Language
6182--------
6183- [You can now parameterize items such as functions, traits, and `struct`s by constant
6184 values in addition to by types and lifetimes.][79135] Also known as "const generics"
6185 E.g. you can now write the following. Note: Only values of primitive integers,
6186 `bool`, or `char` types are currently permitted.
6187 ```rust
6188 struct GenericArray<T, const LENGTH: usize> {
6189 inner: [T; LENGTH]
6190 }
6191
6192 impl<T, const LENGTH: usize> GenericArray<T, LENGTH> {
6193 const fn last(&self) -> Option<&T> {
6194 if LENGTH == 0 {
6195 None
6196 } else {
6197 Some(&self.inner[LENGTH - 1])
6198 }
6199 }
6200 }
6201 ```
6202
6203
6204Compiler
6205--------
6206
6207- [Added the `-Csplit-debuginfo` codegen option for macOS platforms.][79570]
6208 This option controls whether debug information is split across multiple files
6209 or packed into a single file. **Note** This option is unstable on other platforms.
6210- [Added tier 3\* support for `aarch64_be-unknown-linux-gnu`,
6211 `aarch64-unknown-linux-gnu_ilp32`, and `aarch64_be-unknown-linux-gnu_ilp32` targets.][81455]
6212- [Added tier 3 support for `i386-unknown-linux-gnu` and `i486-unknown-linux-gnu` targets.][80662]
6213- [The `target-cpu=native` option will now detect individual features of CPUs.][80749]
6214
6215\* Refer to Rust's [platform support page][platform-support-doc] for more
6216information on Rust's tiered platform support.
6217
6218Libraries
6219---------
6220
6221- [`Box::downcast` is now also implemented for any `dyn Any + Send + Sync` object.][80945]
6222- [`str` now implements `AsMut<str>`.][80279]
6223- [`u64` and `u128` now implement `From<char>`.][79502]
6224- [`Error` is now implemented for `&T` where `T` implements `Error`.][75180]
6225- [`Poll::{map_ok, map_err}` are now implemented for `Poll<Option<Result<T, E>>>`.][80968]
6226- [`unsigned_abs` is now implemented for all signed integer types.][80959]
6227- [`io::Empty` now implements `io::Seek`.][78044]
6228- [`rc::Weak<T>` and `sync::Weak<T>`'s methods such as `as_ptr` are now implemented for
6229 `T: ?Sized` types.][80764]
6230- [`Div` and `Rem` by their `NonZero` variant is now implemented for all unsigned integers.][79134]
6231
6232
6233Stabilized APIs
6234---------------
6235
6236- [`Arc::decrement_strong_count`]
6237- [`Arc::increment_strong_count`]
6238- [`Once::call_once_force`]
6239- [`Peekable::next_if_eq`]
6240- [`Peekable::next_if`]
6241- [`Seek::stream_position`]
6242- [`array::IntoIter`]
6243- [`panic::panic_any`]
6244- [`ptr::addr_of!`]
6245- [`ptr::addr_of_mut!`]
6246- [`slice::fill_with`]
6247- [`slice::split_inclusive_mut`]
6248- [`slice::split_inclusive`]
6249- [`slice::strip_prefix`]
6250- [`slice::strip_suffix`]
6251- [`str::split_inclusive`]
6252- [`sync::OnceState`]
6253- [`task::Wake`]
6254- [`VecDeque::range`]
6255- [`VecDeque::range_mut`]
6256
6257Cargo
6258-----
6259- [Added the `split-debuginfo` profile option to control the -Csplit-debuginfo
6260 codegen option.][cargo/9112]
6261- [Added the `resolver` field to `Cargo.toml` to enable the new feature resolver
6262 and CLI option behavior.][cargo/8997] Version 2 of the feature resolver will try
6263 to avoid unifying features of dependencies where that unification could be unwanted.
6264 Such as using the same dependency with a `std` feature in a build scripts and
6265 proc-macros, while using the `no-std` feature in the final binary. See the
6266 [Cargo book documentation][feature-resolver@2.0] for more information on the feature.
6267
6268Rustdoc
6269-------
6270
6271- [Rustdoc will now include documentation for methods available from _nested_ `Deref` traits.][80653]
6272- [You can now provide a `--default-theme` flag which sets the default theme to use for
6273 documentation.][79642]
6274
6275Various improvements to intra-doc links:
6276
6277- [You can link to non-path primitives such as `slice`.][80181]
6278- [You can link to associated items.][74489]
6279- [You can now include generic parameters when linking to items, like `Vec<T>`.][76934]
6280
6281Misc
6282----
6283- [You can now pass `--include-ignored` to tests (e.g. with
6284 `cargo test -- --include-ignored`) to include testing tests marked `#[ignore]`.][80053]
6285
6286Compatibility Notes
6287-------------------
6288
6289- [WASI platforms no longer use the `wasm-bindgen` ABI, and instead use the wasm32 ABI.][79998]
6290- [`rustc` no longer promotes division, modulo and indexing operations to `const` that
6291 could fail.][80579]
6292- [The minimum version of glibc for the following platforms has been bumped to version 2.31
6293 for the distributed artifacts.][81521]
6294 - `armv5te-unknown-linux-gnueabi`
6295 - `sparc64-unknown-linux-gnu`
6296 - `thumbv7neon-unknown-linux-gnueabihf`
6297 - `armv7-unknown-linux-gnueabi`
6298 - `x86_64-unknown-linux-gnux32`
6299- [`atomic::spin_loop_hint` has been deprecated.][80966] It's recommended to use `hint::spin_loop` instead.
6300
6301Internal Only
6302-------------
6303
6304- [Consistently avoid constructing optimized MIR when not doing codegen][80718]
6305
6306[79135]: https://github.com/rust-lang/rust/pull/79135
6307[74489]: https://github.com/rust-lang/rust/pull/74489
6308[76934]: https://github.com/rust-lang/rust/pull/76934
6309[79570]: https://github.com/rust-lang/rust/pull/79570
6310[80181]: https://github.com/rust-lang/rust/pull/80181
6311[79642]: https://github.com/rust-lang/rust/pull/79642
6312[80945]: https://github.com/rust-lang/rust/pull/80945
6313[80279]: https://github.com/rust-lang/rust/pull/80279
6314[80053]: https://github.com/rust-lang/rust/pull/80053
6315[79502]: https://github.com/rust-lang/rust/pull/79502
6316[75180]: https://github.com/rust-lang/rust/pull/75180
6317[81521]: https://github.com/rust-lang/rust/pull/81521
6318[80968]: https://github.com/rust-lang/rust/pull/80968
6319[80959]: https://github.com/rust-lang/rust/pull/80959
6320[80718]: https://github.com/rust-lang/rust/pull/80718
6321[80653]: https://github.com/rust-lang/rust/pull/80653
6322[80579]: https://github.com/rust-lang/rust/pull/80579
6323[79998]: https://github.com/rust-lang/rust/pull/79998
6324[78044]: https://github.com/rust-lang/rust/pull/78044
6325[81455]: https://github.com/rust-lang/rust/pull/81455
6326[80764]: https://github.com/rust-lang/rust/pull/80764
6327[80749]: https://github.com/rust-lang/rust/pull/80749
6328[80662]: https://github.com/rust-lang/rust/pull/80662
6329[79134]: https://github.com/rust-lang/rust/pull/79134
6330[80966]: https://github.com/rust-lang/rust/pull/80966
6331[cargo/8997]: https://github.com/rust-lang/cargo/pull/8997
6332[cargo/9112]: https://github.com/rust-lang/cargo/pull/9112
6333[feature-resolver@2.0]: https://doc.rust-lang.org/nightly/cargo/reference/features.html#feature-resolver-version-2
6334[`Once::call_once_force`]: https://doc.rust-lang.org/stable/std/sync/struct.Once.html#method.call_once_force
6335[`sync::OnceState`]: https://doc.rust-lang.org/stable/std/sync/struct.OnceState.html
6336[`panic::panic_any`]: https://doc.rust-lang.org/stable/std/panic/fn.panic_any.html
6337[`slice::strip_prefix`]: https://doc.rust-lang.org/stable/std/primitive.slice.html#method.strip_prefix
6338[`slice::strip_suffix`]: https://doc.rust-lang.org/stable/std/primitive.slice.html#method.strip_suffix
6339[`Arc::increment_strong_count`]: https://doc.rust-lang.org/nightly/std/sync/struct.Arc.html#method.increment_strong_count
6340[`Arc::decrement_strong_count`]: https://doc.rust-lang.org/nightly/std/sync/struct.Arc.html#method.decrement_strong_count
6341[`slice::fill_with`]: https://doc.rust-lang.org/nightly/std/primitive.slice.html#method.fill_with
6342[`ptr::addr_of!`]: https://doc.rust-lang.org/nightly/std/ptr/macro.addr_of.html
6343[`ptr::addr_of_mut!`]: https://doc.rust-lang.org/nightly/std/ptr/macro.addr_of_mut.html
6344[`array::IntoIter`]: https://doc.rust-lang.org/nightly/std/array/struct.IntoIter.html
6345[`slice::split_inclusive`]: https://doc.rust-lang.org/nightly/std/primitive.slice.html#method.split_inclusive
6346[`slice::split_inclusive_mut`]: https://doc.rust-lang.org/nightly/std/primitive.slice.html#method.split_inclusive_mut
6347[`str::split_inclusive`]: https://doc.rust-lang.org/nightly/std/primitive.str.html#method.split_inclusive
6348[`task::Wake`]: https://doc.rust-lang.org/nightly/std/task/trait.Wake.html
6349[`Seek::stream_position`]: https://doc.rust-lang.org/nightly/std/io/trait.Seek.html#method.stream_position
6350[`Peekable::next_if`]: https://doc.rust-lang.org/nightly/std/iter/struct.Peekable.html#method.next_if
6351[`Peekable::next_if_eq`]: https://doc.rust-lang.org/nightly/std/iter/struct.Peekable.html#method.next_if_eq
6352[`VecDeque::range`]: https://doc.rust-lang.org/nightly/std/collections/struct.VecDeque.html#method.range
6353[`VecDeque::range_mut`]: https://doc.rust-lang.org/nightly/std/collections/struct.VecDeque.html#method.range_mut
6354
6355Version 1.50.0 (2021-02-11)
6356============================
6357
6358Language
6359-----------------------
6360- [You can now use `const` values for `x` in `[x; N]` array expressions.][79270]
6361 This has been technically possible since 1.38.0, as it was unintentionally stabilized.
6362- [Assignments to `ManuallyDrop<T>` union fields are now considered safe.][78068]
6363
6364Compiler
6365-----------------------
6366- [Added tier 3\* support for the `armv5te-unknown-linux-uclibceabi` target.][78142]
6367- [Added tier 3 support for the `aarch64-apple-ios-macabi` target.][77484]
6368- [The `x86_64-unknown-freebsd` is now built with the full toolset.][79484]
6369- [Dropped support for all cloudabi targets.][78439]
6370
6371\* Refer to Rust's [platform support page][platform-support-doc] for more
6372information on Rust's tiered platform support.
6373
6374Libraries
6375-----------------------
6376
6377- [`proc_macro::Punct` now implements `PartialEq<char>`.][78636]
6378- [`ops::{Index, IndexMut}` are now implemented for fixed sized arrays of any length.][74989]
6379- [On Unix platforms, the `std::fs::File` type now has a "niche" of `-1`.][74699]
6380 This value cannot be a valid file descriptor, and now means `Option<File>` takes
6381 up the same amount of space as `File`.
6382
6383Stabilized APIs
6384---------------
6385
6386- [`bool::then`]
6387- [`btree_map::Entry::or_insert_with_key`]
6388- [`f32::clamp`]
6389- [`f64::clamp`]
6390- [`hash_map::Entry::or_insert_with_key`]
6391- [`Ord::clamp`]
6392- [`RefCell::take`]
6393- [`slice::fill`]
6394- [`UnsafeCell::get_mut`]
6395
6396The following previously stable methods are now `const`.
6397
6398- [`IpAddr::is_ipv4`]
6399- [`IpAddr::is_ipv6`]
6400- [`IpAddr::is_unspecified`]
6401- [`IpAddr::is_loopback`]
6402- [`IpAddr::is_multicast`]
6403- [`Ipv4Addr::octets`]
6404- [`Ipv4Addr::is_loopback`]
6405- [`Ipv4Addr::is_private`]
6406- [`Ipv4Addr::is_link_local`]
6407- [`Ipv4Addr::is_multicast`]
6408- [`Ipv4Addr::is_broadcast`]
6409- [`Ipv4Addr::is_documentation`]
6410- [`Ipv4Addr::to_ipv6_compatible`]
6411- [`Ipv4Addr::to_ipv6_mapped`]
6412- [`Ipv6Addr::segments`]
6413- [`Ipv6Addr::is_unspecified`]
6414- [`Ipv6Addr::is_loopback`]
6415- [`Ipv6Addr::is_multicast`]
6416- [`Ipv6Addr::to_ipv4`]
6417- [`Layout::size`]
6418- [`Layout::align`]
6419- [`Layout::from_size_align`]
6420- `pow` for all integer types.
6421- `checked_pow` for all integer types.
6422- `saturating_pow` for all integer types.
6423- `wrapping_pow` for all integer types.
6424- `next_power_of_two` for all unsigned integer types.
6425- `checked_next_power_of_two` for all unsigned integer types.
6426
6427Cargo
6428-----------------------
6429
6430- [Added the `[build.rustc-workspace-wrapper]` option.][cargo/8976]
6431 This option sets a wrapper to execute instead of `rustc`, for workspace members only.
6432- [`cargo:rerun-if-changed` will now, if provided a directory, scan the entire
6433 contents of that directory for changes.][cargo/8973]
6434- [Added the `--workspace` flag to the `cargo update` command.][cargo/8725]
6435
6436Misc
6437----
6438
6439- [The search results tab and the help button are focusable with keyboard in rustdoc.][79896]
6440- [Running tests will now print the total time taken to execute.][75752]
6441
6442Compatibility Notes
6443-------------------
6444
6445- [The `compare_and_swap` method on atomics has been deprecated.][79261] It's
6446 recommended to use the `compare_exchange` and `compare_exchange_weak` methods instead.
6447- [Changes in how `TokenStream`s are checked have fixed some cases where you could write
6448 unhygenic `macro_rules!` macros.][79472]
6449- [`#![test]` as an inner attribute is now considered unstable like other inner macro
6450 attributes, and reports an error by default through the `soft_unstable` lint.][79003]
6451- [Overriding a `forbid` lint at the same level that it was set is now a hard error.][78864]
6452- [You can no longer intercept `panic!` calls by supplying your own macro.][78343] It's
6453 recommended to use the `#[panic_handler]` attribute to provide your own implementation.
6454- [Semi-colons after item statements (e.g. `struct Foo {};`) now produce a warning.][78296]
6455
6456[74989]: https://github.com/rust-lang/rust/pull/74989
6457[79261]: https://github.com/rust-lang/rust/pull/79261
6458[79896]: https://github.com/rust-lang/rust/pull/79896
6459[79484]: https://github.com/rust-lang/rust/pull/79484
6460[79472]: https://github.com/rust-lang/rust/pull/79472
6461[79270]: https://github.com/rust-lang/rust/pull/79270
6462[79003]: https://github.com/rust-lang/rust/pull/79003
6463[78864]: https://github.com/rust-lang/rust/pull/78864
6464[78636]: https://github.com/rust-lang/rust/pull/78636
6465[78439]: https://github.com/rust-lang/rust/pull/78439
6466[78343]: https://github.com/rust-lang/rust/pull/78343
6467[78296]: https://github.com/rust-lang/rust/pull/78296
6468[78068]: https://github.com/rust-lang/rust/pull/78068
6469[75752]: https://github.com/rust-lang/rust/pull/75752
6470[74699]: https://github.com/rust-lang/rust/pull/74699
6471[78142]: https://github.com/rust-lang/rust/pull/78142
6472[77484]: https://github.com/rust-lang/rust/pull/77484
6473[cargo/8976]: https://github.com/rust-lang/cargo/pull/8976
6474[cargo/8973]: https://github.com/rust-lang/cargo/pull/8973
6475[cargo/8725]: https://github.com/rust-lang/cargo/pull/8725
6476[`IpAddr::is_ipv4`]: https://doc.rust-lang.org/stable/std/net/enum.IpAddr.html#method.is_ipv4
6477[`IpAddr::is_ipv6`]: https://doc.rust-lang.org/stable/std/net/enum.IpAddr.html#method.is_ipv6
6478[`IpAddr::is_unspecified`]: https://doc.rust-lang.org/stable/std/net/enum.IpAddr.html#method.is_unspecified
6479[`IpAddr::is_loopback`]: https://doc.rust-lang.org/stable/std/net/enum.IpAddr.html#method.is_loopback
6480[`IpAddr::is_multicast`]: https://doc.rust-lang.org/stable/std/net/enum.IpAddr.html#method.is_multicast
6481[`Ipv4Addr::octets`]: https://doc.rust-lang.org/stable/std/net/struct.Ipv4Addr.html#method.octets
6482[`Ipv4Addr::is_loopback`]: https://doc.rust-lang.org/stable/std/net/struct.Ipv4Addr.html#method.is_loopback
6483[`Ipv4Addr::is_private`]: https://doc.rust-lang.org/stable/std/net/struct.Ipv4Addr.html#method.is_private
6484[`Ipv4Addr::is_link_local`]: https://doc.rust-lang.org/stable/std/net/struct.Ipv4Addr.html#method.is_link_local
6485[`Ipv4Addr::is_multicast`]: https://doc.rust-lang.org/stable/std/net/struct.Ipv4Addr.html#method.is_multicast
6486[`Ipv4Addr::is_broadcast`]: https://doc.rust-lang.org/stable/std/net/struct.Ipv4Addr.html#method.is_broadcast
6487[`Ipv4Addr::is_documentation`]: https://doc.rust-lang.org/stable/std/net/struct.Ipv4Addr.html#method.is_documentation
6488[`Ipv4Addr::to_ipv6_compatible`]: https://doc.rust-lang.org/stable/std/net/struct.Ipv4Addr.html#method.to_ipv6_compatible
6489[`Ipv4Addr::to_ipv6_mapped`]: https://doc.rust-lang.org/stable/std/net/struct.Ipv4Addr.html#method.to_ipv6_mapped
6490[`Ipv6Addr::segments`]: https://doc.rust-lang.org/stable/std/net/struct.Ipv6Addr.html#method.segments
6491[`Ipv6Addr::is_unspecified`]: https://doc.rust-lang.org/stable/std/net/struct.Ipv6Addr.html#method.is_unspecified
6492[`Ipv6Addr::is_loopback`]: https://doc.rust-lang.org/stable/std/net/struct.Ipv6Addr.html#method.is_loopback
6493[`Ipv6Addr::is_multicast`]: https://doc.rust-lang.org/stable/std/net/struct.Ipv6Addr.html#method.is_multicast
6494[`Ipv6Addr::to_ipv4`]: https://doc.rust-lang.org/stable/std/net/struct.Ipv6Addr.html#method.to_ipv4
6495[`Layout::align`]: https://doc.rust-lang.org/stable/std/alloc/struct.Layout.html#method.align
6496[`Layout::from_size_align`]: https://doc.rust-lang.org/stable/std/alloc/struct.Layout.html#method.from_size_align
6497[`Layout::size`]: https://doc.rust-lang.org/stable/std/alloc/struct.Layout.html#method.size
6498[`Ord::clamp`]: https://doc.rust-lang.org/stable/std/cmp/trait.Ord.html#method.clamp
6499[`RefCell::take`]: https://doc.rust-lang.org/stable/std/cell/struct.RefCell.html#method.take
6500[`UnsafeCell::get_mut`]: https://doc.rust-lang.org/stable/std/cell/struct.UnsafeCell.html#method.get_mut
6501[`bool::then`]: https://doc.rust-lang.org/stable/std/primitive.bool.html#method.then
6502[`btree_map::Entry::or_insert_with_key`]: https://doc.rust-lang.org/stable/std/collections/btree_map/enum.Entry.html#method.or_insert_with_key
6503[`f32::clamp`]: https://doc.rust-lang.org/stable/std/primitive.f32.html#method.clamp
6504[`f64::clamp`]: https://doc.rust-lang.org/stable/std/primitive.f64.html#method.clamp
6505[`hash_map::Entry::or_insert_with_key`]: https://doc.rust-lang.org/stable/std/collections/hash_map/enum.Entry.html#method.or_insert_with_key
6506[`slice::fill`]: https://doc.rust-lang.org/stable/std/primitive.slice.html#method.fill
6507
6508
6509Version 1.49.0 (2020-12-31)
6510============================
6511
6512Language
6513-----------------------
6514
6515- [Unions can now implement `Drop`, and you can now have a field in a union
6516 with `ManuallyDrop<T>`.][77547]
6517- [You can now cast uninhabited enums to integers.][76199]
6518- [You can now bind by reference and by move in patterns.][76119] This
6519 allows you to selectively borrow individual components of a type. E.g.
6520 ```rust
6521 #[derive(Debug)]
6522 struct Person {
6523 name: String,
6524 age: u8,
6525 }
6526
6527 let person = Person {
6528 name: String::from("Alice"),
6529 age: 20,
6530 };
6531
6532 // `name` is moved out of person, but `age` is referenced.
6533 let Person { name, ref age } = person;
6534 println!("{} {}", name, age);
6535 ```
6536
6537Compiler
6538-----------------------
6539
6540- [Added tier 1\* support for `aarch64-unknown-linux-gnu`.][78228]
6541- [Added tier 2 support for `aarch64-apple-darwin`.][75991]
6542- [Added tier 2 support for `aarch64-pc-windows-msvc`.][75914]
6543- [Added tier 3 support for `mipsel-unknown-none`.][78676]
6544- [Raised the minimum supported LLVM version to LLVM 9.][78848]
6545- [Output from threads spawned in tests is now captured.][78227]
6546- [Change os and vendor values to "none" and "unknown" for some targets][78951]
6547
6548\* Refer to Rust's [platform support page][platform-support-doc] for more
6549information on Rust's tiered platform support.
6550
6551Libraries
6552-----------------------
6553
6554- [`RangeInclusive` now checks for exhaustion when calling `contains` and indexing.][78109]
6555- [`ToString::to_string` now no longer shrinks the internal buffer in the default implementation.][77997]
6556
6557Stabilized APIs
6558---------------
6559
6560- [`slice::select_nth_unstable`]
6561- [`slice::select_nth_unstable_by`]
6562- [`slice::select_nth_unstable_by_key`]
6563
6564The following previously stable methods are now `const`.
6565
6566- [`Poll::is_ready`]
6567- [`Poll::is_pending`]
6568
6569Cargo
6570-----------------------
6571- [Building a crate with `cargo-package` should now be independently reproducible.][cargo/8864]
6572- [`cargo-tree` now marks proc-macro crates.][cargo/8765]
6573- [Added `CARGO_PRIMARY_PACKAGE` build-time environment variable.][cargo/8758] This
6574 variable will be set if the crate being built is one the user selected to build, either
6575 with `-p` or through defaults.
6576- [You can now use glob patterns when specifying packages & targets.][cargo/8752]
6577
6578
6579Compatibility Notes
6580-------------------
6581
6582- [Demoted `i686-unknown-freebsd` from host tier 2 to target tier 2 support.][78746]
6583- [Macros that end with a semi-colon are now treated as statements even if they expand to nothing.][78376]
6584- [Rustc will now check for the validity of some built-in attributes on enum variants.][77015]
6585 Previously such invalid or unused attributes could be ignored.
6586- Leading whitespace is stripped more uniformly in documentation comments, which may change behavior. You
6587 read [this post about the changes][rustdoc-ws-post] for more details.
6588- [Trait bounds are no longer inferred for associated types.][79904]
6589
6590Internal Only
6591-------------
6592These changes provide no direct user facing benefits, but represent significant
6593improvements to the internals and overall performance of rustc and
6594related tools.
6595
6596- [rustc's internal crates are now compiled using the `initial-exec` Thread
6597 Local Storage model.][78201]
6598- [Calculate visibilities once in resolve.][78077]
6599- [Added `system` to the `llvm-libunwind` bootstrap config option.][77703]
6600- [Added `--color` for configuring terminal color support to bootstrap.][79004]
6601
6602
6603[75991]: https://github.com/rust-lang/rust/pull/75991
6604[78951]: https://github.com/rust-lang/rust/pull/78951
6605[78848]: https://github.com/rust-lang/rust/pull/78848
6606[78746]: https://github.com/rust-lang/rust/pull/78746
6607[78376]: https://github.com/rust-lang/rust/pull/78376
6608[78228]: https://github.com/rust-lang/rust/pull/78228
6609[78227]: https://github.com/rust-lang/rust/pull/78227
6610[78201]: https://github.com/rust-lang/rust/pull/78201
6611[78109]: https://github.com/rust-lang/rust/pull/78109
6612[78077]: https://github.com/rust-lang/rust/pull/78077
6613[77997]: https://github.com/rust-lang/rust/pull/77997
6614[77703]: https://github.com/rust-lang/rust/pull/77703
6615[77547]: https://github.com/rust-lang/rust/pull/77547
6616[77015]: https://github.com/rust-lang/rust/pull/77015
6617[76199]: https://github.com/rust-lang/rust/pull/76199
6618[76119]: https://github.com/rust-lang/rust/pull/76119
6619[75914]: https://github.com/rust-lang/rust/pull/75914
6620[79004]: https://github.com/rust-lang/rust/pull/79004
6621[78676]: https://github.com/rust-lang/rust/pull/78676
6622[79904]: https://github.com/rust-lang/rust/issues/79904
6623[cargo/8864]: https://github.com/rust-lang/cargo/pull/8864
6624[cargo/8765]: https://github.com/rust-lang/cargo/pull/8765
6625[cargo/8758]: https://github.com/rust-lang/cargo/pull/8758
6626[cargo/8752]: https://github.com/rust-lang/cargo/pull/8752
6627[`slice::select_nth_unstable`]: https://doc.rust-lang.org/nightly/std/primitive.slice.html#method.select_nth_unstable
6628[`slice::select_nth_unstable_by`]: https://doc.rust-lang.org/nightly/std/primitive.slice.html#method.select_nth_unstable_by
6629[`slice::select_nth_unstable_by_key`]: https://doc.rust-lang.org/nightly/std/primitive.slice.html#method.select_nth_unstable_by_key
6630[`Poll::is_ready`]: https://doc.rust-lang.org/stable/std/task/enum.Poll.html#method.is_ready
6631[`Poll::is_pending`]: https://doc.rust-lang.org/stable/std/task/enum.Poll.html#method.is_pending
6632[rustdoc-ws-post]: https://blog.guillaume-gomez.fr/articles/2020-11-11+New+doc+comment+handling+in+rustdoc
6633
6634Version 1.48.0 (2020-11-19)
6635==========================
6636
6637Language
6638--------
6639
6640- [The `unsafe` keyword is now syntactically permitted on modules.][75857] This
6641 is still rejected *semantically*, but can now be parsed by procedural macros.
6642
6643Compiler
6644--------
6645- [Stabilised the `-C link-self-contained=<yes|no>` compiler flag.][76158] This tells
6646 `rustc` whether to link its own C runtime and libraries or to rely on a external
6647 linker to find them. (Supported only on `windows-gnu`, `linux-musl`, and `wasi` platforms.)
6648- [You can now use `-C target-feature=+crt-static` on `linux-gnu` targets.][77386]
6649 Note: If you're using cargo you must explicitly pass the `--target` flag.
6650- [Added tier 2\* support for `aarch64-unknown-linux-musl`.][76420]
6651
6652\* Refer to Rust's [platform support page][platform-support-doc] for more
6653information on Rust's tiered platform support.
6654
6655Libraries
6656---------
6657- [`io::Write` is now implemented for `&ChildStdin` `&Sink`, `&Stdout`,
6658 and `&Stderr`.][76275]
6659- [All arrays of any length now implement `TryFrom<Vec<T>>`.][76310]
6660- [The `matches!` macro now supports having a trailing comma.][74880]
6661- [`Vec<A>` now implements `PartialEq<[B]>` where `A: PartialEq<B>`.][74194]
6662- [The `RefCell::{replace, replace_with, clone}` methods now all use `#[track_caller]`.][77055]
6663
6664Stabilized APIs
6665---------------
6666- [`slice::as_ptr_range`]
6667- [`slice::as_mut_ptr_range`]
6668- [`VecDeque::make_contiguous`]
6669- [`future::pending`]
6670- [`future::ready`]
6671
6672The following previously stable methods are now `const fn`'s:
6673
6674- [`Option::is_some`]
6675- [`Option::is_none`]
6676- [`Option::as_ref`]
6677- [`Result::is_ok`]
6678- [`Result::is_err`]
6679- [`Result::as_ref`]
6680- [`Ordering::reverse`]
6681- [`Ordering::then`]
6682
6683Cargo
6684-----
6685
6686Rustdoc
6687-------
6688- [You can now link to items in `rustdoc` using the intra-doc link
6689 syntax.][74430] E.g. ``/// Uses [`std::future`]`` will automatically generate
6690 a link to `std::future`'s documentation. See ["Linking to items by
6691 name"][intradoc-links] for more information.
6692- [You can now specify `#[doc(alias = "<alias>")]` on items to add search aliases
6693 when searching through `rustdoc`'s UI.][75740]
6694
6695Compatibility Notes
6696-------------------
6697- [Promotion of references to `'static` lifetime inside `const fn` now follows the
6698 same rules as inside a `fn` body.][75502] In particular, `&foo()` will not be
6699 promoted to `'static` lifetime any more inside `const fn`s.
6700- [Associated type bindings on trait objects are now verified to meet the bounds
6701 declared on the trait when checking that they implement the trait.][27675]
6702- [When trait bounds on associated types or opaque types are ambiguous, the
6703 compiler no longer makes an arbitrary choice on which bound to use.][54121]
6704- [Fixed recursive nonterminals not being expanded in macros during
6705 pretty-print/reparse check.][77153] This may cause errors if your macro wasn't
6706 correctly handling recursive nonterminal tokens.
6707- [`&mut` references to non zero-sized types are no longer promoted.][75585]
6708- [`rustc` will now warn if you use attributes like `#[link_name]` or `#[cold]`
6709 in places where they have no effect.][73461]
6710- [Updated `_mm256_extract_epi8` and `_mm256_extract_epi16` signatures in
6711 `arch::{x86, x86_64}` to return `i32` to match the vendor signatures.][73166]
6712- [`mem::uninitialized` will now panic if any inner types inside a struct or enum
6713 disallow zero-initialization.][71274]
6714- [`#[target_feature]` will now error if used in a place where it has no effect.][78143]
6715- [Foreign exceptions are now caught by `catch_unwind` and will cause an abort.][70212]
6716 Note: This behaviour is not guaranteed and is still considered undefined behaviour,
6717 see the [`catch_unwind`] documentation for further information.
6718
6719
6720
6721Internal Only
6722-------------
6723These changes provide no direct user facing benefits, but represent significant
6724improvements to the internals and overall performance of rustc and
6725related tools.
6726
6727- [Building `rustc` from source now uses `ninja` by default over `make`.][74922]
6728 You can continue building with `make` by setting `ninja=false` in
6729 your `bootstrap.toml`.
6730- [cg_llvm: `fewer_names` in `uncached_llvm_type`][76030]
6731- [Made `ensure_sufficient_stack()` non-generic][76680]
6732
6733[78143]: https://github.com/rust-lang/rust/issues/78143
6734[76680]: https://github.com/rust-lang/rust/pull/76680/
6735[76030]: https://github.com/rust-lang/rust/pull/76030/
6736[70212]: https://github.com/rust-lang/rust/pull/70212/
6737[27675]: https://github.com/rust-lang/rust/issues/27675/
6738[54121]: https://github.com/rust-lang/rust/issues/54121/
6739[71274]: https://github.com/rust-lang/rust/pull/71274/
6740[77386]: https://github.com/rust-lang/rust/pull/77386/
6741[77153]: https://github.com/rust-lang/rust/pull/77153/
6742[77055]: https://github.com/rust-lang/rust/pull/77055/
6743[76275]: https://github.com/rust-lang/rust/pull/76275/
6744[76310]: https://github.com/rust-lang/rust/pull/76310/
6745[76420]: https://github.com/rust-lang/rust/pull/76420/
6746[76158]: https://github.com/rust-lang/rust/pull/76158/
6747[75857]: https://github.com/rust-lang/rust/pull/75857/
6748[75585]: https://github.com/rust-lang/rust/pull/75585/
6749[75740]: https://github.com/rust-lang/rust/pull/75740/
6750[75502]: https://github.com/rust-lang/rust/pull/75502/
6751[74880]: https://github.com/rust-lang/rust/pull/74880/
6752[74922]: https://github.com/rust-lang/rust/pull/74922/
6753[74430]: https://github.com/rust-lang/rust/pull/74430/
6754[74194]: https://github.com/rust-lang/rust/pull/74194/
6755[73461]: https://github.com/rust-lang/rust/pull/73461/
6756[73166]: https://github.com/rust-lang/rust/pull/73166/
6757[intradoc-links]: https://doc.rust-lang.org/rustdoc/linking-to-items-by-name.html
6758[`catch_unwind`]: https://doc.rust-lang.org/std/panic/fn.catch_unwind.html
6759[`Option::is_some`]: https://doc.rust-lang.org/std/option/enum.Option.html#method.is_some
6760[`Option::is_none`]: https://doc.rust-lang.org/std/option/enum.Option.html#method.is_none
6761[`Option::as_ref`]: https://doc.rust-lang.org/std/option/enum.Option.html#method.as_ref
6762[`Result::is_ok`]: https://doc.rust-lang.org/std/result/enum.Result.html#method.is_ok
6763[`Result::is_err`]: https://doc.rust-lang.org/std/result/enum.Result.html#method.is_err
6764[`Result::as_ref`]: https://doc.rust-lang.org/std/result/enum.Result.html#method.as_ref
6765[`Ordering::reverse`]: https://doc.rust-lang.org/std/cmp/enum.Ordering.html#method.reverse
6766[`Ordering::then`]: https://doc.rust-lang.org/std/cmp/enum.Ordering.html#method.then
6767[`slice::as_ptr_range`]: https://doc.rust-lang.org/std/primitive.slice.html#method.as_ptr_range
6768[`slice::as_mut_ptr_range`]: https://doc.rust-lang.org/std/primitive.slice.html#method.as_mut_ptr_range
6769[`VecDeque::make_contiguous`]: https://doc.rust-lang.org/std/collections/struct.VecDeque.html#method.make_contiguous
6770[`future::pending`]: https://doc.rust-lang.org/std/future/fn.pending.html
6771[`future::ready`]: https://doc.rust-lang.org/std/future/fn.ready.html
6772
6773
6774Version 1.47.0 (2020-10-08)
6775==========================
6776
6777Language
6778--------
6779- [Closures will now warn when not used.][74869]
6780
6781Compiler
6782--------
6783- [Stabilized the `-C control-flow-guard` codegen option][73893], which enables
6784 [Control Flow Guard][1.47.0-cfg] for Windows platforms, and is ignored on other
6785 platforms.
6786- [Upgraded to LLVM 11.][73526]
6787- [Added tier 3\* support for the `thumbv4t-none-eabi` target.][74419]
6788- [Upgrade the FreeBSD toolchain to version 11.4][75204]
6789- [`RUST_BACKTRACE`'s output is now more compact.][75048]
6790
6791\* Refer to Rust's [platform support page][platform-support-doc] for more
6792information on Rust's tiered platform support.
6793
6794Libraries
6795---------
6796- [`CStr` now implements `Index<RangeFrom<usize>>`.][74021]
6797- [Traits in `std`/`core` are now implemented for arrays of any length, not just
6798 those of length less than 33.][74060]
6799- [`ops::RangeFull` and `ops::Range` now implement Default.][73197]
6800- [`panic::Location` now implements `Copy`, `Clone`, `Eq`, `Hash`, `Ord`,
6801 `PartialEq`, and `PartialOrd`.][73583]
6802
6803Stabilized APIs
6804---------------
6805- [`Ident::new_raw`]
6806- [`Range::is_empty`]
6807- [`RangeInclusive::is_empty`]
6808- [`Result::as_deref`]
6809- [`Result::as_deref_mut`]
6810- [`Vec::leak`]
6811- [`pointer::offset_from`]
6812- [`f32::TAU`]
6813- [`f64::TAU`]
6814
6815The following previously stable APIs have now been made const.
6816
6817- [The `new` method for all `NonZero` integers.][73858]
6818- [The `checked_add`,`checked_sub`,`checked_mul`,`checked_neg`, `checked_shl`,
6819 `checked_shr`, `saturating_add`, `saturating_sub`, and `saturating_mul`
6820 methods for all integers.][73858]
6821- [The `checked_abs`, `saturating_abs`, `saturating_neg`, and `signum` for all
6822 signed integers.][73858]
6823- [The `is_ascii_alphabetic`, `is_ascii_uppercase`, `is_ascii_lowercase`,
6824 `is_ascii_alphanumeric`, `is_ascii_digit`, `is_ascii_hexdigit`,
6825 `is_ascii_punctuation`, `is_ascii_graphic`, `is_ascii_whitespace`, and
6826 `is_ascii_control` methods for `char` and `u8`.][73858]
6827
6828Cargo
6829-----
6830- [`build-dependencies` are now built with opt-level 0 by default.][cargo/8500]
6831 You can override this by setting the following in your `Cargo.toml`.
6832 ```toml
6833 [profile.release.build-override]
6834 opt-level = 3
6835 ```
6836- [`cargo-help` will now display man pages for commands rather just the
6837 `--help` text.][cargo/8456]
6838- [`cargo-metadata` now emits a `test` field indicating if a target has
6839 tests enabled.][cargo/8478]
6840- [`workspace.default-members` now respects `workspace.exclude`.][cargo/8485]
6841- [`cargo-publish` will now use an alternative registry by default if it's the
6842 only registry specified in `package.publish`.][cargo/8571]
6843
6844Misc
6845----
6846- [Added a help button beside Rustdoc's searchbar that explains rustdoc's
6847 type based search.][75366]
6848- [Added the Ayu theme to rustdoc.][71237]
6849
6850Compatibility Notes
6851-------------------
6852- [Bumped the minimum supported Emscripten version to 1.39.20.][75716]
6853- [Fixed a regression parsing `{} && false` in tail expressions.][74650]
6854- [Added changes to how proc-macros are expanded in `macro_rules!` that should
6855 help to preserve more span information.][73084] These changes may cause
6856 compilation errors if your macro was unhygenic or didn't correctly handle
6857 `Delimiter::None`.
6858- [Moved support for the CloudABI target to tier 3.][75568]
6859- [`linux-gnu` targets now require minimum kernel 2.6.32 and glibc 2.11.][74163]
6860- [Added the `rustc-docs` component.][75560] This allows you to install
6861 and read the documentation for the compiler internal APIs. (Currently only
6862 available for `x86_64-unknown-linux-gnu`.)
6863
6864Internal Only
6865--------
6866
6867- [Improved default settings for bootstrapping in `x.py`.][73964] You can read details about this change in the ["Changes to `x.py` defaults"](https://blog.rust-lang.org/inside-rust/2020/08/30/changes-to-x-py-defaults.html) post on the Inside Rust blog.
6868
6869[1.47.0-cfg]: https://docs.microsoft.com/en-us/windows/win32/secbp/control-flow-guard
6870[75048]: https://github.com/rust-lang/rust/pull/75048/
6871[74163]: https://github.com/rust-lang/rust/pull/74163/
6872[71237]: https://github.com/rust-lang/rust/pull/71237/
6873[74869]: https://github.com/rust-lang/rust/pull/74869/
6874[73858]: https://github.com/rust-lang/rust/pull/73858/
6875[75716]: https://github.com/rust-lang/rust/pull/75716/
6876[75560]: https://github.com/rust-lang/rust/pull/75560/
6877[75568]: https://github.com/rust-lang/rust/pull/75568/
6878[75366]: https://github.com/rust-lang/rust/pull/75366/
6879[75204]: https://github.com/rust-lang/rust/pull/75204/
6880[74650]: https://github.com/rust-lang/rust/pull/74650/
6881[74419]: https://github.com/rust-lang/rust/pull/74419/
6882[73964]: https://github.com/rust-lang/rust/pull/73964/
6883[74021]: https://github.com/rust-lang/rust/pull/74021/
6884[74060]: https://github.com/rust-lang/rust/pull/74060/
6885[73893]: https://github.com/rust-lang/rust/pull/73893/
6886[73526]: https://github.com/rust-lang/rust/pull/73526/
6887[73583]: https://github.com/rust-lang/rust/pull/73583/
6888[73084]: https://github.com/rust-lang/rust/pull/73084/
6889[73197]: https://github.com/rust-lang/rust/pull/73197/
6890[cargo/8456]: https://github.com/rust-lang/cargo/pull/8456/
6891[cargo/8478]: https://github.com/rust-lang/cargo/pull/8478/
6892[cargo/8485]: https://github.com/rust-lang/cargo/pull/8485/
6893[cargo/8500]: https://github.com/rust-lang/cargo/pull/8500/
6894[cargo/8571]: https://github.com/rust-lang/cargo/pull/8571/
6895[`Ident::new_raw`]: https://doc.rust-lang.org/nightly/proc_macro/struct.Ident.html#method.new_raw
6896[`Range::is_empty`]: https://doc.rust-lang.org/nightly/std/ops/struct.Range.html#method.is_empty
6897[`RangeInclusive::is_empty`]: https://doc.rust-lang.org/nightly/std/ops/struct.RangeInclusive.html#method.is_empty
6898[`Result::as_deref_mut`]: https://doc.rust-lang.org/nightly/std/result/enum.Result.html#method.as_deref_mut
6899[`Result::as_deref`]: https://doc.rust-lang.org/nightly/std/result/enum.Result.html#method.as_deref
6900[`Vec::leak`]: https://doc.rust-lang.org/nightly/std/vec/struct.Vec.html#method.leak
6901[`f32::TAU`]: https://doc.rust-lang.org/nightly/std/f32/consts/constant.TAU.html
6902[`f64::TAU`]: https://doc.rust-lang.org/nightly/std/f64/consts/constant.TAU.html
6903[`pointer::offset_from`]: https://doc.rust-lang.org/nightly/std/primitive.pointer.html#method.offset_from
6904
6905
6906Version 1.46.0 (2020-08-27)
6907==========================
6908
6909Language
6910--------
6911- [`if`, `match`, and `loop` expressions can now be used in const functions.][72437]
6912- [Additionally you are now also able to coerce and cast to slices (`&[T]`) in
6913 const functions.][73862]
6914- [The `#[track_caller]` attribute can now be added to functions to use the
6915 function's caller's location information for panic messages.][72445]
6916- [Recursively indexing into tuples no longer needs parentheses.][71322] E.g.
6917 `x.0.0` over `(x.0).0`.
6918- [`mem::transmute` can now be used in statics and constants.][72920] **Note**
6919 You currently can't use `mem::transmute` in constant functions.
6920
6921Compiler
6922--------
6923- [You can now use the `cdylib` target on Apple iOS and tvOS platforms.][73516]
6924- [Enabled static "Position Independent Executables" by default
6925 for `x86_64-unknown-linux-musl`.][70740]
6926
6927Libraries
6928---------
6929- [`mem::forget` is now a `const fn`.][73887]
6930- [`String` now implements `From<char>`.][73466]
6931- [The `leading_ones`, and `trailing_ones` methods have been stabilised for all
6932 integer types.][73032]
6933- [`vec::IntoIter<T>` now implements `AsRef<[T]>`.][72583]
6934- [All non-zero integer types (`NonZeroU8`) now implement `TryFrom` for their
6935 zero-able equivalent (e.g. `TryFrom<u8>`).][72717]
6936- [`&[T]` and `&mut [T]` now implement `PartialEq<Vec<T>>`.][71660]
6937- [`(String, u16)` now implements `ToSocketAddrs`.][73007]
6938- [`vec::Drain<'_, T>` now implements `AsRef<[T]>`.][72584]
6939
6940Stabilized APIs
6941---------------
6942- [`Option::zip`]
6943- [`vec::Drain::as_slice`]
6944
6945Cargo
6946-----
6947Added a number of new environment variables that are now available when
6948compiling your crate.
6949
6950- [`CARGO_BIN_NAME` and `CARGO_CRATE_NAME`][cargo/8270] Providing the name of
6951 the specific binary being compiled and the name of the crate.
6952- [`CARGO_PKG_LICENSE`][cargo/8325] The license from the manifest of the package.
6953- [`CARGO_PKG_LICENSE_FILE`][cargo/8387] The path to the license file.
6954
6955Compatibility Notes
6956-------------------
6957- [The target configuration option `abi_blacklist` has been renamed
6958 to `unsupported_abis`.][74150] The old name will still continue to work.
6959- [Rustc will now warn if you cast a C-like enum that implements `Drop`.][72331]
6960 This was previously accepted but will become a hard error in a future release.
6961- [Rustc will fail to compile if you have a struct with
6962 `#[repr(i128)]` or `#[repr(u128)]`.][74109] This representation is currently only
6963 allowed on `enum`s.
6964- [Tokens passed to `macro_rules!` are now always captured.][73293] This helps
6965 ensure that spans have the correct information, and may cause breakage if you
6966 were relying on receiving spans with dummy information.
6967- [The InnoSetup installer for Windows is no longer available.][72569] This was
6968 a legacy installer that was replaced by a MSI installer a few years ago but
6969 was still being built.
6970- [`{f32, f64}::asinh` now returns the correct values for negative numbers.][72486]
6971- [Rustc will no longer accept overlapping trait implementations that only
6972 differ in how the lifetime was bound.][72493]
6973- [Rustc now correctly relates the lifetime of an existential associated
6974 type.][71896] This fixes some edge cases where `rustc` would erroneously allow
6975 you to pass a shorter lifetime than expected.
6976- [Rustc now dynamically links to `libz` (also called `zlib`) on Linux.][74420]
6977 The library will need to be installed for `rustc` to work, even though we
6978 expect it to be already available on most systems.
6979- [Tests annotated with `#[should_panic]` are broken on ARMv7 while running
6980 under QEMU.][74820]
6981- [Pretty printing of some tokens in procedural macros changed.][75453] The
6982 exact output returned by rustc's pretty printing is an unstable
6983 implementation detail: we recommend any macro relying on it to switch to a
6984 more robust parsing system.
6985
6986[75453]: https://github.com/rust-lang/rust/issues/75453/
6987[74820]: https://github.com/rust-lang/rust/issues/74820/
6988[74420]: https://github.com/rust-lang/rust/issues/74420/
6989[74109]: https://github.com/rust-lang/rust/pull/74109/
6990[74150]: https://github.com/rust-lang/rust/pull/74150/
6991[73862]: https://github.com/rust-lang/rust/pull/73862/
6992[73887]: https://github.com/rust-lang/rust/pull/73887/
6993[73466]: https://github.com/rust-lang/rust/pull/73466/
6994[73516]: https://github.com/rust-lang/rust/pull/73516/
6995[73293]: https://github.com/rust-lang/rust/pull/73293/
6996[73007]: https://github.com/rust-lang/rust/pull/73007/
6997[73032]: https://github.com/rust-lang/rust/pull/73032/
6998[72920]: https://github.com/rust-lang/rust/pull/72920/
6999[72569]: https://github.com/rust-lang/rust/pull/72569/
7000[72583]: https://github.com/rust-lang/rust/pull/72583/
7001[72584]: https://github.com/rust-lang/rust/pull/72584/
7002[72717]: https://github.com/rust-lang/rust/pull/72717/
7003[72437]: https://github.com/rust-lang/rust/pull/72437/
7004[72445]: https://github.com/rust-lang/rust/pull/72445/
7005[72486]: https://github.com/rust-lang/rust/pull/72486/
7006[72493]: https://github.com/rust-lang/rust/pull/72493/
7007[72331]: https://github.com/rust-lang/rust/pull/72331/
7008[71896]: https://github.com/rust-lang/rust/pull/71896/
7009[71660]: https://github.com/rust-lang/rust/pull/71660/
7010[71322]: https://github.com/rust-lang/rust/pull/71322/
7011[70740]: https://github.com/rust-lang/rust/pull/70740/
7012[cargo/8270]: https://github.com/rust-lang/cargo/pull/8270/
7013[cargo/8325]: https://github.com/rust-lang/cargo/pull/8325/
7014[cargo/8387]: https://github.com/rust-lang/cargo/pull/8387/
7015[`Option::zip`]: https://doc.rust-lang.org/stable/std/option/enum.Option.html#method.zip
7016[`vec::Drain::as_slice`]: https://doc.rust-lang.org/stable/std/vec/struct.Drain.html#method.as_slice
7017
7018
7019Version 1.45.2 (2020-08-03)
7020==========================
7021
7022* [Fix bindings in tuple struct patterns][74954]
7023* [Fix track_caller integration with trait objects][74784]
7024
7025[74954]: https://github.com/rust-lang/rust/issues/74954
7026[74784]: https://github.com/rust-lang/rust/issues/74784
7027
7028
7029Version 1.45.1 (2020-07-30)
7030==========================
7031
7032* [Fix const propagation with references.][73613]
7033* [rustfmt accepts rustfmt_skip in cfg_attr again.][73078]
7034* [Avoid spurious implicit region bound.][74509]
7035* [Install clippy on x.py install][74457]
7036
7037[73613]: https://github.com/rust-lang/rust/pull/73613
7038[73078]: https://github.com/rust-lang/rust/issues/73078
7039[74509]: https://github.com/rust-lang/rust/pull/74509
7040[74457]: https://github.com/rust-lang/rust/pull/74457
7041
7042
7043Version 1.45.0 (2020-07-16)
7044==========================
7045
7046Language
7047--------
7048- [Out of range float to int conversions using `as` has been defined as a saturating
7049 conversion.][71269] This was previously undefined behaviour, but you can use the
7050 `{f64, f32}::to_int_unchecked` methods to continue using the current behaviour, which
7051 may be desirable in rare performance sensitive situations.
7052- [`mem::Discriminant<T>` now uses `T`'s discriminant type instead of always
7053 using `u64`.][70705]
7054- [Function like procedural macros can now be used in expression, pattern, and statement
7055 positions.][68717] This means you can now use a function-like procedural macro
7056 anywhere you can use a declarative (`macro_rules!`) macro.
7057
7058Compiler
7059--------
7060- [You can now override individual target features through the `target-feature`
7061 flag.][72094] E.g. `-C target-feature=+avx2 -C target-feature=+fma` is now
7062 equivalent to `-C target-feature=+avx2,+fma`.
7063- [Added the `force-unwind-tables` flag.][69984] This option allows
7064 rustc to always generate unwind tables regardless of panic strategy.
7065- [Added the `embed-bitcode` flag.][71716] This codegen flag allows rustc
7066 to include LLVM bitcode into generated `rlib`s (this is on by default).
7067- [Added the `tiny` value to the `code-model` codegen flag.][72397]
7068- [Added tier 3 support\* for the `mipsel-sony-psp` target.][72062]
7069- [Added tier 3 support for the `thumbv7a-uwp-windows-msvc` target.][72133]
7070- [Upgraded to LLVM 10.][67759]
7071
7072\* Refer to Rust's [platform support page][platform-support-doc] for more
7073information on Rust's tiered platform support.
7074
7075
7076Libraries
7077---------
7078- [`net::{SocketAddr, SocketAddrV4, SocketAddrV6}` now implements `PartialOrd`
7079 and `Ord`.][72239]
7080- [`proc_macro::TokenStream` now implements `Default`.][72234]
7081- [You can now use `char` with
7082 `ops::{Range, RangeFrom, RangeFull, RangeInclusive, RangeTo}` to iterate over
7083 a range of codepoints.][72413] E.g.
7084 you can now write the following;
7085 ```rust
7086 for ch in 'a'..='z' {
7087 print!("{}", ch);
7088 }
7089 println!();
7090 // Prints "abcdefghijklmnopqrstuvwxyz"
7091 ```
7092- [`OsString` now implements `FromStr`.][71662]
7093- [The `saturating_neg` method has been added to all signed integer primitive
7094 types, and the `saturating_abs` method has been added for all integer
7095 primitive types.][71886]
7096- [`Arc<T>`, `Rc<T>` now implement `From<Cow<'_, T>>`, and `Box` now
7097 implements `From<Cow>` when `T` is `[T: Copy]`, `str`, `CStr`, `OsStr`,
7098 or `Path`.][71447]
7099- [`Box<[T]>` now implements `From<[T; N]>`.][71095]
7100- [`BitOr` and `BitOrAssign` are implemented for all `NonZero`
7101 integer types.][69813]
7102- [The `fetch_min`, and `fetch_max` methods have been added to all atomic
7103 integer types.][72324]
7104- [The `fetch_update` method has been added to all atomic integer types.][71843]
7105
7106Stabilized APIs
7107---------------
7108- [`Arc::as_ptr`]
7109- [`BTreeMap::remove_entry`]
7110- [`Rc::as_ptr`]
7111- [`rc::Weak::as_ptr`]
7112- [`rc::Weak::from_raw`]
7113- [`rc::Weak::into_raw`]
7114- [`str::strip_prefix`]
7115- [`str::strip_suffix`]
7116- [`sync::Weak::as_ptr`]
7117- [`sync::Weak::from_raw`]
7118- [`sync::Weak::into_raw`]
7119- [`char::UNICODE_VERSION`]
7120- [`Span::resolved_at`]
7121- [`Span::located_at`]
7122- [`Span::mixed_site`]
7123- [`unix::process::CommandExt::arg0`]
7124
7125Cargo
7126-----
7127
7128- [Cargo uses the `embed-bitcode` flag to optimize disk usage and build
7129 time.][cargo/8066]
7130
7131Misc
7132----
7133- [Rustdoc now supports strikethrough text in Markdown.][71928] E.g.
7134 `~~outdated information~~` becomes "~~outdated information~~".
7135- [Added an emoji to Rustdoc's deprecated API message.][72014]
7136
7137Compatibility Notes
7138-------------------
7139- [Trying to self initialize a static value (that is creating a value using
7140 itself) is unsound and now causes a compile error.][71140]
7141- [`{f32, f64}::powi` now returns a slightly different value on Windows.][73420]
7142 This is due to changes in LLVM's intrinsics which `{f32, f64}::powi` uses.
7143- [Rustdoc's CLI's extra error exit codes have been removed.][71900] These were
7144 previously undocumented and not intended for public use. Rustdoc still provides
7145 a non-zero exit code on errors.
7146- [Rustc's `lto` flag is incompatible with the new `embed-bitcode=no`.][71848]
7147 This may cause issues if LTO is enabled through `RUSTFLAGS` or `cargo rustc`
7148 flags while cargo is adding `embed-bitcode` itself. The recommended way to
7149 control LTO is with Cargo profiles, either in `Cargo.toml` or `.cargo/config`,
7150 or by setting `CARGO_PROFILE_<name>_LTO` in the environment.
7151
7152Internals Only
7153--------------
7154- [Make clippy a git subtree instead of a git submodule][70655]
7155- [Unify the undo log of all snapshot types][69464]
7156
7157[71848]: https://github.com/rust-lang/rust/issues/71848/
7158[73420]: https://github.com/rust-lang/rust/issues/73420/
7159[72324]: https://github.com/rust-lang/rust/pull/72324/
7160[71843]: https://github.com/rust-lang/rust/pull/71843/
7161[71886]: https://github.com/rust-lang/rust/pull/71886/
7162[72234]: https://github.com/rust-lang/rust/pull/72234/
7163[72239]: https://github.com/rust-lang/rust/pull/72239/
7164[72397]: https://github.com/rust-lang/rust/pull/72397/
7165[72413]: https://github.com/rust-lang/rust/pull/72413/
7166[72014]: https://github.com/rust-lang/rust/pull/72014/
7167[72062]: https://github.com/rust-lang/rust/pull/72062/
7168[72094]: https://github.com/rust-lang/rust/pull/72094/
7169[72133]: https://github.com/rust-lang/rust/pull/72133/
7170[67759]: https://github.com/rust-lang/rust/pull/67759/
7171[71900]: https://github.com/rust-lang/rust/pull/71900/
7172[71928]: https://github.com/rust-lang/rust/pull/71928/
7173[71662]: https://github.com/rust-lang/rust/pull/71662/
7174[71716]: https://github.com/rust-lang/rust/pull/71716/
7175[71447]: https://github.com/rust-lang/rust/pull/71447/
7176[71269]: https://github.com/rust-lang/rust/pull/71269/
7177[71095]: https://github.com/rust-lang/rust/pull/71095/
7178[71140]: https://github.com/rust-lang/rust/pull/71140/
7179[70655]: https://github.com/rust-lang/rust/pull/70655/
7180[70705]: https://github.com/rust-lang/rust/pull/70705/
7181[69984]: https://github.com/rust-lang/rust/pull/69984/
7182[69813]: https://github.com/rust-lang/rust/pull/69813/
7183[69464]: https://github.com/rust-lang/rust/pull/69464/
7184[68717]: https://github.com/rust-lang/rust/pull/68717/
7185[cargo/8066]: https://github.com/rust-lang/cargo/pull/8066
7186[`Arc::as_ptr`]: https://doc.rust-lang.org/stable/std/sync/struct.Arc.html#method.as_ptr
7187[`BTreeMap::remove_entry`]: https://doc.rust-lang.org/stable/std/collections/struct.BTreeMap.html#method.remove_entry
7188[`Rc::as_ptr`]: https://doc.rust-lang.org/stable/std/rc/struct.Rc.html#method.as_ptr
7189[`rc::Weak::as_ptr`]: https://doc.rust-lang.org/stable/std/rc/struct.Weak.html#method.as_ptr
7190[`rc::Weak::from_raw`]: https://doc.rust-lang.org/stable/std/rc/struct.Weak.html#method.from_raw
7191[`rc::Weak::into_raw`]: https://doc.rust-lang.org/stable/std/rc/struct.Weak.html#method.into_raw
7192[`sync::Weak::as_ptr`]: https://doc.rust-lang.org/stable/std/sync/struct.Weak.html#method.as_ptr
7193[`sync::Weak::from_raw`]: https://doc.rust-lang.org/stable/std/sync/struct.Weak.html#method.from_raw
7194[`sync::Weak::into_raw`]: https://doc.rust-lang.org/stable/std/sync/struct.Weak.html#method.into_raw
7195[`str::strip_prefix`]: https://doc.rust-lang.org/stable/std/primitive.str.html#method.strip_prefix
7196[`str::strip_suffix`]: https://doc.rust-lang.org/stable/std/primitive.str.html#method.strip_suffix
7197[`char::UNICODE_VERSION`]: https://doc.rust-lang.org/stable/std/char/constant.UNICODE_VERSION.html
7198[`Span::resolved_at`]: https://doc.rust-lang.org/stable/proc_macro/struct.Span.html#method.resolved_at
7199[`Span::located_at`]: https://doc.rust-lang.org/stable/proc_macro/struct.Span.html#method.located_at
7200[`Span::mixed_site`]: https://doc.rust-lang.org/stable/proc_macro/struct.Span.html#method.mixed_site
7201[`unix::process::CommandExt::arg0`]: https://doc.rust-lang.org/std/os/unix/process/trait.CommandExt.html#tymethod.arg0
7202
7203
7204Version 1.44.1 (2020-06-18)
7205===========================
7206
7207* [rustfmt accepts rustfmt_skip in cfg_attr again.][73078]
7208* [Don't hash executable filenames on apple platforms, fixing backtraces.][cargo/8329]
7209* [Fix crashes when finding backtrace on macOS.][71397]
7210* [Clippy applies lint levels into different files.][clippy/5356]
7211
7212[71397]: https://github.com/rust-lang/rust/issues/71397
7213[73078]: https://github.com/rust-lang/rust/issues/73078
7214[cargo/8329]: https://github.com/rust-lang/cargo/pull/8329
7215[clippy/5356]: https://github.com/rust-lang/rust-clippy/issues/5356
7216
7217
7218Version 1.44.0 (2020-06-04)
7219==========================
7220
7221Language
7222--------
7223- [You can now use `async/.await` with `#[no_std]` enabled.][69033]
7224- [Added the `unused_braces` lint.][70081]
7225
7226**Syntax-only changes**
7227
7228- [Expansion-driven outline module parsing][69838]
7229```rust
7230#[cfg(FALSE)]
7231mod foo {
7232 mod bar {
7233 mod baz; // `foo/bar/baz.rs` doesn't exist, but no error!
7234 }
7235}
7236```
7237
7238These are still rejected semantically, so you will likely receive an error but
7239these changes can be seen and parsed by macros and conditional compilation.
7240
7241Compiler
7242--------
7243- [Rustc now respects the `-C codegen-units` flag in incremental mode.][70156]
7244 Additionally when in incremental mode rustc defaults to 256 codegen units.
7245- [Refactored `catch_unwind` to have zero-cost, unless unwinding is enabled and
7246 a panic is thrown.][67502]
7247- [Added tier 3\* support for the `aarch64-unknown-none` and
7248 `aarch64-unknown-none-softfloat` targets.][68334]
7249- [Added tier 3 support for `arm64-apple-tvos` and
7250 `x86_64-apple-tvos` targets.][68191]
7251
7252
7253Libraries
7254---------
7255- [Special cased `vec![]` to map directly to `Vec::new()`.][70632] This allows
7256 `vec![]` to be able to be used in `const` contexts.
7257- [`convert::Infallible` now implements `Hash`.][70281]
7258- [`OsString` now implements `DerefMut` and `IndexMut` returning
7259 a `&mut OsStr`.][70048]
7260- [Unicode 13 is now supported.][69929]
7261- [`String` now implements `From<&mut str>`.][69661]
7262- [`IoSlice` now implements `Copy`.][69403]
7263- [`Vec<T>` now implements `From<[T; N]>`.][68692] Where `N` is at most 32.
7264- [`proc_macro::LexError` now implements `fmt::Display` and `Error`.][68899]
7265- [`from_le_bytes`, `to_le_bytes`, `from_be_bytes`, `to_be_bytes`,
7266 `from_ne_bytes`, and `to_ne_bytes` methods are now `const` for all
7267 integer types.][69373]
7268
7269Stabilized APIs
7270---------------
7271- [`PathBuf::with_capacity`]
7272- [`PathBuf::capacity`]
7273- [`PathBuf::clear`]
7274- [`PathBuf::reserve`]
7275- [`PathBuf::reserve_exact`]
7276- [`PathBuf::shrink_to_fit`]
7277- [`f32::to_int_unchecked`]
7278- [`f64::to_int_unchecked`]
7279- [`Layout::align_to`]
7280- [`Layout::pad_to_align`]
7281- [`Layout::array`]
7282- [`Layout::extend`]
7283
7284Cargo
7285-----
7286- [Added the `cargo tree` command which will print a tree graph of
7287 your dependencies.][cargo/8062] E.g.
7288 ```
7289 mdbook v0.3.2 (/Users/src/rust/mdbook)
7290 ├── ammonia v3.0.0
7291 │ ├── html5ever v0.24.0
7292 │ │ ├── log v0.4.8
7293 │ │ │ └── cfg-if v0.1.9
7294 │ │ ├── mac v0.1.1
7295 │ │ └── markup5ever v0.9.0
7296 │ │ ├── log v0.4.8 (*)
7297 │ │ ├── phf v0.7.24
7298 │ │ │ └── phf_shared v0.7.24
7299 │ │ │ ├── siphasher v0.2.3
7300 │ │ │ └── unicase v1.4.2
7301 │ │ │ [build-dependencies]
7302 │ │ │ └── version_check v0.1.5
7303 ...
7304 ```
7305 You can also display dependencies on multiple versions of the same crate with
7306 `cargo tree -d` (short for `cargo tree --duplicates`).
7307
7308Misc
7309----
7310- [Rustdoc now allows you to specify `--crate-version` to have rustdoc include
7311 the version in the sidebar.][69494]
7312
7313Compatibility Notes
7314-------------------
7315- [Rustc now correctly generates static libraries on Windows GNU targets with
7316 the `.a` extension, rather than the previous `.lib`.][70937]
7317- [Removed the `-C no_integrated_as` flag from rustc.][70345]
7318- [The `file_name` property in JSON output of macro errors now points the actual
7319 source file rather than the previous format of `<NAME macros>`.][70969]
7320 **Note:** this may not point to a file that actually exists on the user's system.
7321- [The minimum required external LLVM version has been bumped to LLVM 8.][71147]
7322- [`mem::{zeroed, uninitialised}` will now panic when used with types that do
7323 not allow zero initialization such as `NonZeroU8`.][66059] This was
7324 previously a warning.
7325- [In 1.45.0 (the next release) converting a `f64` to `u32` using the `as`
7326 operator has been defined as a saturating operation.][71269] This was previously
7327 undefined behaviour, but you can use the `{f64, f32}::to_int_unchecked` methods to
7328 continue using the current behaviour, which may be desirable in rare performance
7329 sensitive situations.
7330
7331Internal Only
7332-------------
7333These changes provide no direct user facing benefits, but represent significant
7334improvements to the internals and overall performance of rustc and
7335related tools.
7336
7337- [dep_graph Avoid allocating a set on when the number reads are small.][69778]
7338- [Replace big JS dict with JSON parsing.][71250]
7339
7340[69373]: https://github.com/rust-lang/rust/pull/69373/
7341[66059]: https://github.com/rust-lang/rust/pull/66059/
7342[68191]: https://github.com/rust-lang/rust/pull/68191/
7343[68899]: https://github.com/rust-lang/rust/pull/68899/
7344[71147]: https://github.com/rust-lang/rust/pull/71147/
7345[71250]: https://github.com/rust-lang/rust/pull/71250/
7346[70937]: https://github.com/rust-lang/rust/pull/70937/
7347[70969]: https://github.com/rust-lang/rust/pull/70969/
7348[70632]: https://github.com/rust-lang/rust/pull/70632/
7349[70281]: https://github.com/rust-lang/rust/pull/70281/
7350[70345]: https://github.com/rust-lang/rust/pull/70345/
7351[70048]: https://github.com/rust-lang/rust/pull/70048/
7352[70081]: https://github.com/rust-lang/rust/pull/70081/
7353[70156]: https://github.com/rust-lang/rust/pull/70156/
7354[71269]: https://github.com/rust-lang/rust/pull/71269/
7355[69838]: https://github.com/rust-lang/rust/pull/69838/
7356[69929]: https://github.com/rust-lang/rust/pull/69929/
7357[69661]: https://github.com/rust-lang/rust/pull/69661/
7358[69778]: https://github.com/rust-lang/rust/pull/69778/
7359[69494]: https://github.com/rust-lang/rust/pull/69494/
7360[69403]: https://github.com/rust-lang/rust/pull/69403/
7361[69033]: https://github.com/rust-lang/rust/pull/69033/
7362[68692]: https://github.com/rust-lang/rust/pull/68692/
7363[68334]: https://github.com/rust-lang/rust/pull/68334/
7364[67502]: https://github.com/rust-lang/rust/pull/67502/
7365[cargo/8062]: https://github.com/rust-lang/cargo/pull/8062/
7366[`PathBuf::with_capacity`]: https://doc.rust-lang.org/std/path/struct.PathBuf.html#method.with_capacity
7367[`PathBuf::capacity`]: https://doc.rust-lang.org/std/path/struct.PathBuf.html#method.capacity
7368[`PathBuf::clear`]: https://doc.rust-lang.org/std/path/struct.PathBuf.html#method.clear
7369[`PathBuf::reserve`]: https://doc.rust-lang.org/std/path/struct.PathBuf.html#method.reserve
7370[`PathBuf::reserve_exact`]: https://doc.rust-lang.org/std/path/struct.PathBuf.html#method.reserve_exact
7371[`PathBuf::shrink_to_fit`]: https://doc.rust-lang.org/std/path/struct.PathBuf.html#method.shrink_to_fit
7372[`f32::to_int_unchecked`]: https://doc.rust-lang.org/std/primitive.f32.html#method.to_int_unchecked
7373[`f64::to_int_unchecked`]: https://doc.rust-lang.org/std/primitive.f64.html#method.to_int_unchecked
7374[`Layout::align_to`]: https://doc.rust-lang.org/std/alloc/struct.Layout.html#method.align_to
7375[`Layout::pad_to_align`]: https://doc.rust-lang.org/std/alloc/struct.Layout.html#method.pad_to_align
7376[`Layout::array`]: https://doc.rust-lang.org/std/alloc/struct.Layout.html#method.array
7377[`Layout::extend`]: https://doc.rust-lang.org/std/alloc/struct.Layout.html#method.extend
7378
7379
7380Version 1.43.1 (2020-05-07)
7381===========================
7382
7383* [Updated openssl-src to 1.1.1g for CVE-2020-1967.][71430]
7384* [Fixed the stabilization of AVX-512 features.][71473]
7385* [Fixed `cargo package --list` not working with unpublished dependencies.][cargo/8151]
7386
7387[71430]: https://github.com/rust-lang/rust/pull/71430
7388[71473]: https://github.com/rust-lang/rust/issues/71473
7389[cargo/8151]: https://github.com/rust-lang/cargo/issues/8151
7390
7391
7392Version 1.43.0 (2020-04-23)
7393==========================
7394
7395Language
7396--------
7397- [Fixed using binary operations with `&{number}` (e.g. `&1.0`) not having
7398 the type inferred correctly.][68129]
7399- [Attributes such as `#[cfg()]` can now be used on `if` expressions.][69201]
7400
7401**Syntax only changes**
7402- [Allow `type Foo: Ord` syntactically.][69361]
7403- [Fuse associated and extern items up to defaultness.][69194]
7404- [Syntactically allow `self` in all `fn` contexts.][68764]
7405- [Merge `fn` syntax + cleanup item parsing.][68728]
7406- [`item` macro fragments can be interpolated into `trait`s, `impl`s, and `extern` blocks.][69366]
7407 For example, you may now write:
7408 ```rust
7409 macro_rules! mac_trait {
7410 ($i:item) => {
7411 trait T { $i }
7412 }
7413 }
7414 mac_trait! {
7415 fn foo() {}
7416 }
7417 ```
7418
7419These are still rejected *semantically*, so you will likely receive an error but
7420these changes can be seen and parsed by macros and
7421conditional compilation.
7422
7423
7424Compiler
7425--------
7426- [You can now pass multiple lint flags to rustc to override the previous
7427 flags.][67885] For example; `rustc -D unused -A unused-variables` denies
7428 everything in the `unused` lint group except `unused-variables` which
7429 is explicitly allowed. However, passing `rustc -A unused-variables -D unused` denies
7430 everything in the `unused` lint group **including** `unused-variables` since
7431 the allow flag is specified before the deny flag (and therefore overridden).
7432- [rustc will now prefer your system MinGW libraries over its bundled libraries
7433 if they are available on `windows-gnu`.][67429]
7434- [rustc now buffers errors/warnings printed in JSON.][69227]
7435
7436Libraries
7437---------
7438- [`Arc<[T; N]>`, `Box<[T; N]>`, and `Rc<[T; N]>`, now implement
7439 `TryFrom<Arc<[T]>>`,`TryFrom<Box<[T]>>`, and `TryFrom<Rc<[T]>>`
7440 respectively.][69538] **Note** These conversions are only available when `N`
7441 is `0..=32`.
7442- [You can now use associated constants on floats and integers directly, rather
7443 than having to import the module.][68952] e.g. You can now write `u32::MAX` or
7444 `f32::NAN` with no imports.
7445- [`u8::is_ascii` is now `const`.][68984]
7446- [`String` now implements `AsMut<str>`.][68742]
7447- [Added the `primitive` module to `std` and `core`.][67637] This module
7448 reexports Rust's primitive types. This is mainly useful in macros
7449 where you want avoid these types being shadowed.
7450- [Relaxed some of the trait bounds on `HashMap` and `HashSet`.][67642]
7451- [`string::FromUtf8Error` now implements `Clone + Eq`.][68738]
7452
7453Stabilized APIs
7454---------------
7455- [`Once::is_completed`]
7456- [`f32::LOG10_2`]
7457- [`f32::LOG2_10`]
7458- [`f64::LOG10_2`]
7459- [`f64::LOG2_10`]
7460- [`iter::once_with`]
7461
7462Cargo
7463-----
7464- [You can now set config `[profile]`s in your `.cargo/config`, or through
7465 your environment.][cargo/7823]
7466- [Cargo will now set `CARGO_BIN_EXE_<name>` pointing to a binary's
7467 executable path when running integration tests or benchmarks.][cargo/7697]
7468 `<name>` is the name of your binary as-is e.g. If you wanted the executable
7469 path for a binary named `my-program`you would use `env!("CARGO_BIN_EXE_my-program")`.
7470
7471Misc
7472----
7473- [Certain checks in the `const_err` lint were deemed unrelated to const
7474 evaluation][69185], and have been moved to the `unconditional_panic` and
7475 `arithmetic_overflow` lints.
7476
7477Compatibility Notes
7478-------------------
7479
7480- [Having trailing syntax in the `assert!` macro is now a hard error.][69548] This
7481 has been a warning since 1.36.0.
7482- [Fixed `Self` not having the correctly inferred type.][69340] This incorrectly
7483 led to some instances being accepted, and now correctly emits a hard error.
7484
7485[69340]: https://github.com/rust-lang/rust/pull/69340
7486
7487Internal Only
7488-------------
7489These changes provide no direct user facing benefits, but represent significant
7490improvements to the internals and overall performance of `rustc` and
7491related tools.
7492
7493- [All components are now built with `opt-level=3` instead of `2`.][67878]
7494- [Improved how rustc generates drop code.][67332]
7495- [Improved performance from `#[inline]`-ing certain hot functions.][69256]
7496- [traits: preallocate 2 Vecs of known initial size][69022]
7497- [Avoid exponential behaviour when relating types][68772]
7498- [Skip `Drop` terminators for enum variants without drop glue][68943]
7499- [Improve performance of coherence checks][68966]
7500- [Deduplicate types in the generator witness][68672]
7501- [Invert control in struct_lint_level.][68725]
7502
7503[67332]: https://github.com/rust-lang/rust/pull/67332/
7504[67429]: https://github.com/rust-lang/rust/pull/67429/
7505[67637]: https://github.com/rust-lang/rust/pull/67637/
7506[67642]: https://github.com/rust-lang/rust/pull/67642/
7507[67878]: https://github.com/rust-lang/rust/pull/67878/
7508[67885]: https://github.com/rust-lang/rust/pull/67885/
7509[68129]: https://github.com/rust-lang/rust/pull/68129/
7510[68672]: https://github.com/rust-lang/rust/pull/68672/
7511[68725]: https://github.com/rust-lang/rust/pull/68725/
7512[68728]: https://github.com/rust-lang/rust/pull/68728/
7513[68738]: https://github.com/rust-lang/rust/pull/68738/
7514[68742]: https://github.com/rust-lang/rust/pull/68742/
7515[68764]: https://github.com/rust-lang/rust/pull/68764/
7516[68772]: https://github.com/rust-lang/rust/pull/68772/
7517[68943]: https://github.com/rust-lang/rust/pull/68943/
7518[68952]: https://github.com/rust-lang/rust/pull/68952/
7519[68966]: https://github.com/rust-lang/rust/pull/68966/
7520[68984]: https://github.com/rust-lang/rust/pull/68984/
7521[69022]: https://github.com/rust-lang/rust/pull/69022/
7522[69185]: https://github.com/rust-lang/rust/pull/69185/
7523[69194]: https://github.com/rust-lang/rust/pull/69194/
7524[69201]: https://github.com/rust-lang/rust/pull/69201/
7525[69227]: https://github.com/rust-lang/rust/pull/69227/
7526[69548]: https://github.com/rust-lang/rust/pull/69548/
7527[69256]: https://github.com/rust-lang/rust/pull/69256/
7528[69361]: https://github.com/rust-lang/rust/pull/69361/
7529[69366]: https://github.com/rust-lang/rust/pull/69366/
7530[69538]: https://github.com/rust-lang/rust/pull/69538/
7531[cargo/7823]: https://github.com/rust-lang/cargo/pull/7823
7532[cargo/7697]: https://github.com/rust-lang/cargo/pull/7697
7533[`Once::is_completed`]: https://doc.rust-lang.org/std/sync/struct.Once.html#method.is_completed
7534[`f32::LOG10_2`]: https://doc.rust-lang.org/std/f32/consts/constant.LOG10_2.html
7535[`f32::LOG2_10`]: https://doc.rust-lang.org/std/f32/consts/constant.LOG2_10.html
7536[`f64::LOG10_2`]: https://doc.rust-lang.org/std/f64/consts/constant.LOG10_2.html
7537[`f64::LOG2_10`]: https://doc.rust-lang.org/std/f64/consts/constant.LOG2_10.html
7538[`iter::once_with`]: https://doc.rust-lang.org/std/iter/fn.once_with.html
7539
7540
7541Version 1.42.0 (2020-03-12)
7542==========================
7543
7544Language
7545--------
7546- [You can now use the slice pattern syntax with subslices.][67712] e.g.
7547 ```rust
7548 fn foo(words: &[&str]) {
7549 match words {
7550 ["Hello", "World", "!", ..] => println!("Hello World!"),
7551 ["Foo", "Bar", ..] => println!("Baz"),
7552 rest => println!("{:?}", rest),
7553 }
7554 }
7555 ```
7556- [You can now use `#[repr(transparent)]` on univariant `enum`s.][68122] Meaning
7557 that you can create an enum that has the exact layout and ABI of the type
7558 it contains.
7559- [You can now use outer attribute procedural macros on inline modules.][64273]
7560- [There are some *syntax-only* changes:][67131]
7561 - `default` is syntactically allowed before items in `trait` definitions.
7562 - Items in `impl`s (i.e. `const`s, `type`s, and `fn`s) may syntactically
7563 leave out their bodies in favor of `;`.
7564 - Bounds on associated types in `impl`s are now syntactically allowed
7565 (e.g. `type Foo: Ord;`).
7566 - `...` (the C-variadic type) may occur syntactically directly as the type of
7567 any function parameter.
7568
7569 These are still rejected *semantically*, so you will likely receive an error
7570 but these changes can be seen and parsed by procedural macros and
7571 conditional compilation.
7572
7573Compiler
7574--------
7575- [Added tier 2\* support for `armv7a-none-eabi`.][68253]
7576- [Added tier 2 support for `riscv64gc-unknown-linux-gnu`.][68339]
7577- [`Option::{expect,unwrap}` and
7578 `Result::{expect, expect_err, unwrap, unwrap_err}` now produce panic messages
7579 pointing to the location where they were called, rather than
7580 `core`'s internals. ][67887]
7581
7582\* Refer to Rust's [platform support page][platform-support-doc] for more
7583information on Rust's tiered platform support.
7584
7585Libraries
7586---------
7587- [`iter::Empty<T>` now implements `Send` and `Sync` for any `T`.][68348]
7588- [`Pin::{map_unchecked, map_unchecked_mut}` no longer require the return type
7589 to implement `Sized`.][67935]
7590- [`io::Cursor` now derives `PartialEq` and `Eq`.][67233]
7591- [`Layout::new` is now `const`.][66254]
7592- [Added Standard Library support for `riscv64gc-unknown-linux-gnu`.][66899]
7593
7594
7595Stabilized APIs
7596---------------
7597- [`CondVar::wait_while`]
7598- [`CondVar::wait_timeout_while`]
7599- [`DebugMap::key`]
7600- [`DebugMap::value`]
7601- [`ManuallyDrop::take`]
7602- [`matches!`]
7603- [`ptr::slice_from_raw_parts_mut`]
7604- [`ptr::slice_from_raw_parts`]
7605
7606Cargo
7607-----
7608- [You no longer need to include `extern crate proc_macro;` to be able to
7609 `use proc_macro;` in the `2018` edition.][cargo/7700]
7610
7611Compatibility Notes
7612-------------------
7613- [`Error::description` has been deprecated, and its use will now produce a
7614 warning.][66919] It's recommended to use `Display`/`to_string` instead.
7615
7616[68253]: https://github.com/rust-lang/rust/pull/68253/
7617[68348]: https://github.com/rust-lang/rust/pull/68348/
7618[67935]: https://github.com/rust-lang/rust/pull/67935/
7619[68339]: https://github.com/rust-lang/rust/pull/68339/
7620[68122]: https://github.com/rust-lang/rust/pull/68122/
7621[64273]: https://github.com/rust-lang/rust/pull/64273/
7622[67712]: https://github.com/rust-lang/rust/pull/67712/
7623[67887]: https://github.com/rust-lang/rust/pull/67887/
7624[67131]: https://github.com/rust-lang/rust/pull/67131/
7625[67233]: https://github.com/rust-lang/rust/pull/67233/
7626[66899]: https://github.com/rust-lang/rust/pull/66899/
7627[66919]: https://github.com/rust-lang/rust/pull/66919/
7628[66254]: https://github.com/rust-lang/rust/pull/66254/
7629[cargo/7700]: https://github.com/rust-lang/cargo/pull/7700
7630[`DebugMap::key`]: https://doc.rust-lang.org/stable/std/fmt/struct.DebugMap.html#method.key
7631[`DebugMap::value`]: https://doc.rust-lang.org/stable/std/fmt/struct.DebugMap.html#method.value
7632[`ManuallyDrop::take`]: https://doc.rust-lang.org/stable/std/mem/struct.ManuallyDrop.html#method.take
7633[`matches!`]: https://doc.rust-lang.org/stable/std/macro.matches.html
7634[`ptr::slice_from_raw_parts_mut`]: https://doc.rust-lang.org/stable/std/ptr/fn.slice_from_raw_parts_mut.html
7635[`ptr::slice_from_raw_parts`]: https://doc.rust-lang.org/stable/std/ptr/fn.slice_from_raw_parts.html
7636[`CondVar::wait_while`]: https://doc.rust-lang.org/stable/std/sync/struct.Condvar.html#method.wait_while
7637[`CondVar::wait_timeout_while`]: https://doc.rust-lang.org/stable/std/sync/struct.Condvar.html#method.wait_timeout_while
7638
7639
7640Version 1.41.1 (2020-02-27)
7641===========================
7642
7643* [Always check types of static items][69145]
7644* [Always check lifetime bounds of `Copy` impls][69145]
7645* [Fix miscompilation in callers of `Layout::repeat`][69225]
7646* [Rust 1.41.0 was announced as the last Rust release with tier 1 or tier 2 support for 32-bit Apple targets][apple-32bit-drop].
7647 That announcement did not expect a patch release. 1.41.1 also includes release binaries for these targets.
7648
7649[69225]: https://github.com/rust-lang/rust/issues/69225
7650[69145]: https://github.com/rust-lang/rust/pull/69145
7651
7652
7653Version 1.41.0 (2020-01-30)
7654===========================
7655
7656Language
7657--------
7658
7659- [You can now pass type parameters to foreign items when implementing
7660 traits.][65879] E.g. You can now write `impl<T> From<Foo> for Vec<T> {}`.
7661- [You can now arbitrarily nest receiver types in the `self` position.][64325] E.g. you can
7662 now write `fn foo(self: Box<Box<Self>>) {}`. Previously only `Self`, `&Self`,
7663 `&mut Self`, `Arc<Self>`, `Rc<Self>`, and `Box<Self>` were allowed.
7664- [You can now use any valid identifier in a `format_args` macro.][66847]
7665 Previously identifiers starting with an underscore were not allowed.
7666- [Visibility modifiers (e.g. `pub`) are now syntactically allowed on trait items and
7667 enum variants.][66183] These are still rejected semantically, but
7668 can be seen and parsed by procedural macros and conditional compilation.
7669- [You can now define a Rust `extern "C"` function with `Box<T>` and use `T*` as the corresponding
7670 type on the C side.][62514] Please see [the documentation][box-memory-layout] for more information,
7671 including the important caveat about preferring to avoid `Box<T>` in Rust signatures for functions defined in C.
7672
7673[box-memory-layout]: https://doc.rust-lang.org/std/boxed/index.html#memory-layout
7674
7675Compiler
7676--------
7677
7678- [Rustc will now warn if you have unused loop `'label`s.][66325]
7679- [Removed support for the `i686-unknown-dragonfly` target.][67255]
7680- [Added tier 3 support\* for the `riscv64gc-unknown-linux-gnu` target.][66661]
7681- [You can now pass an arguments file passing the `@path` syntax
7682 to rustc.][66172] Note that the format differs somewhat from what is
7683 found in other tooling; please see [the documentation][argfile-docs] for
7684 more information.
7685- [You can now provide `--extern` flag without a path, indicating that it is
7686 available from the search path or specified with an `-L` flag.][64882]
7687
7688\* Refer to Rust's [platform support page][platform-support-doc] for more
7689information on Rust's tiered platform support.
7690
7691[argfile-docs]: https://doc.rust-lang.org/nightly/rustc/command-line-arguments.html#path-load-command-line-flags-from-a-path
7692
7693Libraries
7694---------
7695
7696- [The `core::panic` module is now stable.][66771] It was already stable
7697 through `std`.
7698- [`NonZero*` numerics now implement `From<NonZero*>` if it's a smaller integer
7699 width.][66277] E.g. `NonZeroU16` now implements `From<NonZeroU8>`.
7700- [`MaybeUninit<T>` now implements `fmt::Debug`.][65013]
7701
7702Stabilized APIs
7703---------------
7704
7705- [`Result::map_or`]
7706- [`Result::map_or_else`]
7707- [`std::rc::Weak::weak_count`]
7708- [`std::rc::Weak::strong_count`]
7709- [`std::sync::Weak::weak_count`]
7710- [`std::sync::Weak::strong_count`]
7711
7712Cargo
7713-----
7714
7715- [Cargo will now document all the private items for binary crates
7716 by default.][cargo/7593]
7717- [`cargo-install` will now reinstall the package if it detects that it is out
7718 of date.][cargo/7560]
7719- [Cargo.lock now uses a more git friendly format that should help to reduce
7720 merge conflicts.][cargo/7579]
7721- [You can now override specific dependencies's build settings][cargo/7591] E.g.
7722 `[profile.dev.package.image] opt-level = 2` sets the `image` crate's
7723 optimisation level to `2` for debug builds. You can also use
7724 `[profile.<profile>.build-override]` to override build scripts and
7725 their dependencies.
7726
7727Misc
7728----
7729
7730- [You can now specify `edition` in documentation code blocks to compile the block
7731 for that edition.][66238] E.g. `edition2018` tells rustdoc that the code sample
7732 should be compiled the 2018 edition of Rust.
7733- [You can now provide custom themes to rustdoc with `--theme`, and check the
7734 current theme with `--check-theme`.][54733]
7735- [You can use `#[cfg(doc)]` to compile an item when building documentation.][61351]
7736
7737Compatibility Notes
7738-------------------
7739
7740- [As previously announced 1.41 will be the last tier 1 release for 32-bit
7741 Apple targets.][apple-32bit-drop] This means that the source code is still
7742 available to build, but the targets are no longer being tested and release
7743 binaries for those platforms will no longer be distributed by the Rust project.
7744 Please refer to the linked blog post for more information.
7745
7746[54733]: https://github.com/rust-lang/rust/pull/54733/
7747[61351]: https://github.com/rust-lang/rust/pull/61351/
7748[62514]: https://github.com/rust-lang/rust/pull/62514/
7749[67255]: https://github.com/rust-lang/rust/pull/67255/
7750[66661]: https://github.com/rust-lang/rust/pull/66661/
7751[66771]: https://github.com/rust-lang/rust/pull/66771/
7752[66847]: https://github.com/rust-lang/rust/pull/66847/
7753[66238]: https://github.com/rust-lang/rust/pull/66238/
7754[66277]: https://github.com/rust-lang/rust/pull/66277/
7755[66325]: https://github.com/rust-lang/rust/pull/66325/
7756[66172]: https://github.com/rust-lang/rust/pull/66172/
7757[66183]: https://github.com/rust-lang/rust/pull/66183/
7758[65879]: https://github.com/rust-lang/rust/pull/65879/
7759[65013]: https://github.com/rust-lang/rust/pull/65013/
7760[64882]: https://github.com/rust-lang/rust/pull/64882/
7761[64325]: https://github.com/rust-lang/rust/pull/64325/
7762[cargo/7560]: https://github.com/rust-lang/cargo/pull/7560/
7763[cargo/7579]: https://github.com/rust-lang/cargo/pull/7579/
7764[cargo/7591]: https://github.com/rust-lang/cargo/pull/7591/
7765[cargo/7593]: https://github.com/rust-lang/cargo/pull/7593/
7766[`Result::map_or_else`]: https://doc.rust-lang.org/std/result/enum.Result.html#method.map_or_else
7767[`Result::map_or`]: https://doc.rust-lang.org/std/result/enum.Result.html#method.map_or
7768[`std::rc::Weak::weak_count`]: https://doc.rust-lang.org/std/rc/struct.Weak.html#method.weak_count
7769[`std::rc::Weak::strong_count`]: https://doc.rust-lang.org/std/rc/struct.Weak.html#method.strong_count
7770[`std::sync::Weak::weak_count`]: https://doc.rust-lang.org/std/sync/struct.Weak.html#method.weak_count
7771[`std::sync::Weak::strong_count`]: https://doc.rust-lang.org/std/sync/struct.Weak.html#method.strong_count
7772[apple-32bit-drop]: https://blog.rust-lang.org/2020/01/03/reducing-support-for-32-bit-apple-targets.html
7773
7774Version 1.40.0 (2019-12-19)
7775===========================
7776
7777Language
7778--------
7779- [You can now use tuple `struct`s and tuple `enum` variant's constructors in
7780 `const` contexts.][65188] e.g.
7781
7782 ```rust
7783 pub struct Point(i32, i32);
7784
7785 const ORIGIN: Point = {
7786 let constructor = Point;
7787
7788 constructor(0, 0)
7789 };
7790 ```
7791
7792- [You can now mark `struct`s, `enum`s, and `enum` variants with the `#[non_exhaustive]` attribute to
7793 indicate that there may be variants or fields added in the future.][64639]
7794 For example this requires adding a wild-card branch (`_ => {}`) to any match
7795 statements on a non-exhaustive `enum`. [(RFC 2008)]
7796- [You can now use function-like procedural macros in `extern` blocks and in
7797 type positions.][63931] e.g. `type Generated = macro!();`
7798- [Function-like and attribute procedural macros can now emit
7799 `macro_rules!` items, so you can now have your macros generate macros.][64035]
7800- [The `meta` pattern matcher in `macro_rules!` now correctly matches the modern
7801 attribute syntax.][63674] For example `(#[$m:meta])` now matches `#[attr]`,
7802 `#[attr{tokens}]`, `#[attr[tokens]]`, and `#[attr(tokens)]`.
7803
7804Compiler
7805--------
7806- [Added tier 3 support\* for the
7807 `thumbv7neon-unknown-linux-musleabihf` target.][66103]
7808- [Added tier 3 support for the
7809 `aarch64-unknown-none-softfloat` target.][64589]
7810- [Added tier 3 support for the `mips64-unknown-linux-muslabi64`, and
7811 `mips64el-unknown-linux-muslabi64` targets.][65843]
7812
7813\* Refer to Rust's [platform support page][platform-support-doc] for more
7814 information on Rust's tiered platform support.
7815
7816Libraries
7817---------
7818- [The `is_power_of_two` method on unsigned numeric types is now a `const` function.][65092]
7819
7820Stabilized APIs
7821---------------
7822- [`BTreeMap::get_key_value`]
7823- [`HashMap::get_key_value`]
7824- [`Option::as_deref_mut`]
7825- [`Option::as_deref`]
7826- [`Option::flatten`]
7827- [`UdpSocket::peer_addr`]
7828- [`f32::to_be_bytes`]
7829- [`f32::to_le_bytes`]
7830- [`f32::to_ne_bytes`]
7831- [`f64::to_be_bytes`]
7832- [`f64::to_le_bytes`]
7833- [`f64::to_ne_bytes`]
7834- [`f32::from_be_bytes`]
7835- [`f32::from_le_bytes`]
7836- [`f32::from_ne_bytes`]
7837- [`f64::from_be_bytes`]
7838- [`f64::from_le_bytes`]
7839- [`f64::from_ne_bytes`]
7840- [`mem::take`]
7841- [`slice::repeat`]
7842- [`todo!`]
7843
7844Cargo
7845-----
7846- [Cargo will now always display warnings, rather than only on
7847 fresh builds.][cargo/7450]
7848- [Feature flags (except `--all-features`) passed to a virtual workspace will
7849 now produce an error.][cargo/7507] Previously these flags were ignored.
7850- [You can now publish `dev-dependencies` without including
7851 a `version`.][cargo/7333]
7852
7853Misc
7854----
7855- [You can now specify the `#[cfg(doctest)]` attribute to include an item only
7856 when running documentation tests with `rustdoc`.][63803]
7857
7858Compatibility Notes
7859-------------------
7860- [As previously announced, any previous NLL warnings in the 2015 edition are
7861 now hard errors.][64221]
7862- [The `include!` macro will now warn if it failed to include the
7863 entire file.][64284] The `include!` macro unintentionally only includes the
7864 first _expression_ in a file, and this can be unintuitive. This will become
7865 either a hard error in a future release, or the behavior may be fixed to include all expressions as expected.
7866- [Using `#[inline]` on function prototypes and consts now emits a warning under
7867 `unused_attribute` lint.][65294] Using `#[inline]` anywhere else inside traits
7868 or `extern` blocks now correctly emits a hard error.
7869
7870[65294]: https://github.com/rust-lang/rust/pull/65294/
7871[66103]: https://github.com/rust-lang/rust/pull/66103/
7872[65843]: https://github.com/rust-lang/rust/pull/65843/
7873[65188]: https://github.com/rust-lang/rust/pull/65188/
7874[65092]: https://github.com/rust-lang/rust/pull/65092/
7875[64589]: https://github.com/rust-lang/rust/pull/64589/
7876[64639]: https://github.com/rust-lang/rust/pull/64639/
7877[64221]: https://github.com/rust-lang/rust/pull/64221/
7878[64284]: https://github.com/rust-lang/rust/pull/64284/
7879[63931]: https://github.com/rust-lang/rust/pull/63931/
7880[64035]: https://github.com/rust-lang/rust/pull/64035/
7881[63674]: https://github.com/rust-lang/rust/pull/63674/
7882[63803]: https://github.com/rust-lang/rust/pull/63803/
7883[cargo/7450]: https://github.com/rust-lang/cargo/pull/7450/
7884[cargo/7507]: https://github.com/rust-lang/cargo/pull/7507/
7885[cargo/7333]: https://github.com/rust-lang/cargo/pull/7333/
7886[(rfc 2008)]: https://rust-lang.github.io/rfcs/2008-non-exhaustive.html
7887[`f32::to_be_bytes`]: https://doc.rust-lang.org/std/primitive.f32.html#method.to_be_bytes
7888[`f32::to_le_bytes`]: https://doc.rust-lang.org/std/primitive.f32.html#method.to_le_bytes
7889[`f32::to_ne_bytes`]: https://doc.rust-lang.org/std/primitive.f32.html#method.to_ne_bytes
7890[`f64::to_be_bytes`]: https://doc.rust-lang.org/std/primitive.f64.html#method.to_be_bytes
7891[`f64::to_le_bytes`]: https://doc.rust-lang.org/std/primitive.f64.html#method.to_le_bytes
7892[`f64::to_ne_bytes`]: https://doc.rust-lang.org/std/primitive.f64.html#method.to_ne_bytes
7893[`f32::from_be_bytes`]: https://doc.rust-lang.org/std/primitive.f32.html#method.from_be_bytes
7894[`f32::from_le_bytes`]: https://doc.rust-lang.org/std/primitive.f32.html#method.from_le_bytes
7895[`f32::from_ne_bytes`]: https://doc.rust-lang.org/std/primitive.f32.html#method.from_ne_bytes
7896[`f64::from_be_bytes`]: https://doc.rust-lang.org/std/primitive.f64.html#method.from_be_bytes
7897[`f64::from_le_bytes`]: https://doc.rust-lang.org/std/primitive.f64.html#method.from_le_bytes
7898[`f64::from_ne_bytes`]: https://doc.rust-lang.org/std/primitive.f64.html#method.from_ne_bytes
7899[`option::flatten`]: https://doc.rust-lang.org/std/option/enum.Option.html#method.flatten
7900[`option::as_deref`]: https://doc.rust-lang.org/std/option/enum.Option.html#method.as_deref
7901[`option::as_deref_mut`]: https://doc.rust-lang.org/std/option/enum.Option.html#method.as_deref_mut
7902[`hashmap::get_key_value`]: https://doc.rust-lang.org/std/collections/struct.HashMap.html#method.get_key_value
7903[`btreemap::get_key_value`]: https://doc.rust-lang.org/std/collections/struct.BTreeMap.html#method.get_key_value
7904[`slice::repeat`]: https://doc.rust-lang.org/std/primitive.slice.html#method.repeat
7905[`mem::take`]: https://doc.rust-lang.org/std/mem/fn.take.html
7906[`udpsocket::peer_addr`]: https://doc.rust-lang.org/std/net/struct.UdpSocket.html#method.peer_addr
7907[`todo!`]: https://doc.rust-lang.org/std/macro.todo.html
7908
7909
7910Version 1.39.0 (2019-11-07)
7911===========================
7912
7913Language
7914--------
7915- [You can now create `async` functions and blocks with `async fn`, `async move {}`, and
7916 `async {}` respectively, and you can now call `.await` on async expressions.][63209]
7917- [You can now use certain attributes on function, closure, and function pointer
7918 parameters.][64010] These attributes include `cfg`, `cfg_attr`, `allow`, `warn`,
7919 `deny`, `forbid` as well as inert helper attributes used by procedural macro
7920 attributes applied to items. e.g.
7921 ```rust
7922 fn len(
7923 #[cfg(windows)] slice: &[u16],
7924 #[cfg(not(windows))] slice: &[u8],
7925 ) -> usize {
7926 slice.len()
7927 }
7928 ```
7929- [You can now take shared references to bind-by-move patterns in the `if` guards
7930 of `match` arms.][63118] e.g.
7931 ```rust
7932 fn main() {
7933 let array: Box<[u8; 4]> = Box::new([1, 2, 3, 4]);
7934
7935 match array {
7936 nums
7937 // ---- `nums` is bound by move.
7938 if nums.iter().sum::<u8>() == 10
7939 // ^------ `.iter()` implicitly takes a reference to `nums`.
7940 => {
7941 drop(nums);
7942 // ----------- Legal as `nums` was bound by move and so we have ownership.
7943 }
7944 _ => unreachable!(),
7945 }
7946 }
7947 ```
7948
7949
7950
7951Compiler
7952--------
7953- [Added tier 3\* support for the `i686-unknown-uefi` target.][64334]
7954- [Added tier 3 support for the `sparc64-unknown-openbsd` target.][63595]
7955- [rustc will now trim code snippets in diagnostics to fit in your terminal.][63402]
7956 **Note** Cargo currently doesn't use this feature. Refer to
7957 [cargo#7315][cargo/7315] to track this feature's progress.
7958- [You can now pass `--show-output` argument to test binaries to print the
7959 output of successful tests.][62600]
7960
7961
7962\* Refer to Rust's [platform support page][platform-support-doc] for more
7963information on Rust's tiered platform support.
7964
7965Libraries
7966---------
7967- [`Vec::new` and `String::new` are now `const` functions.][64028]
7968- [`LinkedList::new` is now a `const` function.][63684]
7969- [`str::len`, `[T]::len` and `str::as_bytes` are now `const` functions.][63770]
7970- [The `abs`, `wrapping_abs`, and `overflowing_abs` numeric functions are
7971 now `const`.][63786]
7972
7973Stabilized APIs
7974---------------
7975- [`Pin::into_inner`]
7976- [`Instant::checked_duration_since`]
7977- [`Instant::saturating_duration_since`]
7978
7979Cargo
7980-----
7981- [You can now publish git dependencies if supplied with a `version`.][cargo/7237]
7982- [The `--all` flag has been renamed to `--workspace`.][cargo/7241] Using
7983 `--all` is now deprecated.
7984
7985Misc
7986----
7987- [You can now pass `-Clinker` to rustdoc to control the linker used
7988 for compiling doctests.][63834]
7989
7990Compatibility Notes
7991-------------------
7992- [Code that was previously accepted by the old borrow checker, but rejected by
7993 the NLL borrow checker is now a hard error in Rust 2018.][63565] This was
7994 previously a warning, and will also become a hard error in the Rust 2015
7995 edition in the 1.40.0 release.
7996- [`rustdoc` now requires `rustc` to be installed and in the same directory to
7997 run tests.][63827] This should improve performance when running a large
7998 amount of doctests.
7999- [The `try!` macro will now issue a deprecation warning.][62672] It is
8000 recommended to use the `?` operator instead.
8001- [`asinh(-0.0)` now correctly returns `-0.0`.][63698] Previously this
8002 returned `0.0`.
8003
8004[62600]: https://github.com/rust-lang/rust/pull/62600/
8005[62672]: https://github.com/rust-lang/rust/pull/62672/
8006[63118]: https://github.com/rust-lang/rust/pull/63118/
8007[63209]: https://github.com/rust-lang/rust/pull/63209/
8008[63402]: https://github.com/rust-lang/rust/pull/63402/
8009[63565]: https://github.com/rust-lang/rust/pull/63565/
8010[63595]: https://github.com/rust-lang/rust/pull/63595/
8011[63684]: https://github.com/rust-lang/rust/pull/63684/
8012[63698]: https://github.com/rust-lang/rust/pull/63698/
8013[63770]: https://github.com/rust-lang/rust/pull/63770/
8014[63786]: https://github.com/rust-lang/rust/pull/63786/
8015[63827]: https://github.com/rust-lang/rust/pull/63827/
8016[63834]: https://github.com/rust-lang/rust/pull/63834/
8017[64010]: https://github.com/rust-lang/rust/pull/64010/
8018[64028]: https://github.com/rust-lang/rust/pull/64028/
8019[64334]: https://github.com/rust-lang/rust/pull/64334/
8020[cargo/7237]: https://github.com/rust-lang/cargo/pull/7237/
8021[cargo/7241]: https://github.com/rust-lang/cargo/pull/7241/
8022[cargo/7315]: https://github.com/rust-lang/cargo/pull/7315/
8023[`Pin::into_inner`]: https://doc.rust-lang.org/std/pin/struct.Pin.html#method.into_inner
8024[`Instant::checked_duration_since`]: https://doc.rust-lang.org/std/time/struct.Instant.html#method.checked_duration_since
8025[`Instant::saturating_duration_since`]: https://doc.rust-lang.org/std/time/struct.Instant.html#method.saturating_duration_since
8026
8027Version 1.38.0 (2019-09-26)
8028==========================
8029
8030Language
8031--------
8032- [The `#[global_allocator]` attribute can now be used in submodules.][62735]
8033- [The `#[deprecated]` attribute can now be used on macros.][62042]
8034
8035Compiler
8036--------
8037- [Added pipelined compilation support to `rustc`.][62766] This will
8038 improve compilation times in some cases. For further information please refer
8039 to the [_"Evaluating pipelined rustc compilation"_][pipeline-internals] thread.
8040- [Added tier 3\* support for the `aarch64-uwp-windows-msvc`, `i686-uwp-windows-gnu`,
8041 `i686-uwp-windows-msvc`, `x86_64-uwp-windows-gnu`, and
8042 `x86_64-uwp-windows-msvc` targets.][60260]
8043- [Added tier 3 support for the `armv7-unknown-linux-gnueabi` and
8044 `armv7-unknown-linux-musleabi` targets.][63107]
8045- [Added tier 3 support for the `hexagon-unknown-linux-musl` target.][62814]
8046- [Added tier 3 support for the `riscv32i-unknown-none-elf` target.][62784]
8047- [Upgraded to LLVM 9.][62592]
8048
8049\* Refer to Rust's [platform support page][platform-support-doc] for more
8050information on Rust's tiered platform support.
8051
8052Libraries
8053---------
8054- [`ascii::EscapeDefault` now implements `Clone` and `Display`.][63421]
8055- [Derive macros for prelude traits (e.g. `Clone`, `Debug`, `Hash`) are now
8056 available at the same path as the trait.][63056] (e.g. The `Clone` derive macro
8057 is available at `std::clone::Clone`). This also makes all built-in macros
8058 available in `std`/`core` root. e.g. `std::include_bytes!`.
8059- [`str::Chars` now implements `Debug`.][63000]
8060- [`slice::{concat, connect, join}` now accepts `&[T]` in addition to `&T`.][62528]
8061- [`*const T` and `*mut T` now implement `marker::Unpin`.][62583]
8062- [`Arc<[T]>` and `Rc<[T]>` now implement `FromIterator<T>`.][61953]
8063- [Added euclidean remainder and division operations (`div_euclid`,
8064 `rem_euclid`) to all numeric primitives.][61884] Additionally `checked`,
8065 `overflowing`, and `wrapping` versions are available for all
8066 integer primitives.
8067- [`thread::AccessError` now implements `Clone`, `Copy`, `Eq`, `Error`, and
8068 `PartialEq`.][61491]
8069- [`iter::{StepBy, Peekable, Take}` now implement `DoubleEndedIterator`.][61457]
8070
8071Stabilized APIs
8072---------------
8073- [`<*const T>::cast`]
8074- [`<*mut T>::cast`]
8075- [`Duration::as_secs_f32`]
8076- [`Duration::as_secs_f64`]
8077- [`Duration::div_f32`]
8078- [`Duration::div_f64`]
8079- [`Duration::from_secs_f32`]
8080- [`Duration::from_secs_f64`]
8081- [`Duration::mul_f32`]
8082- [`Duration::mul_f64`]
8083- [`any::type_name`]
8084
8085Cargo
8086-----
8087- [Added pipelined compilation support to `cargo`.][cargo/7143]
8088- [You can now pass the `--features` option multiple times to enable
8089 multiple features.][cargo/7084]
8090
8091Rustdoc
8092-------
8093
8094- [Documentation on `pub use` statements is prepended to the documentation of the re-exported item][63048]
8095
8096Misc
8097----
8098- [`rustc` will now warn about some incorrect uses of
8099 `mem::{uninitialized, zeroed}` that are known to cause undefined behaviour.][63346]
8100
8101Compatibility Notes
8102-------------------
8103- The [`x86_64-unknown-uefi` platform can not be built][62785] with rustc
8104 1.38.0.
8105- The [`armv7-unknown-linux-gnueabihf` platform is known to have
8106 issues][62896] with certain crates such as libc.
8107
8108[60260]: https://github.com/rust-lang/rust/pull/60260/
8109[61457]: https://github.com/rust-lang/rust/pull/61457/
8110[61491]: https://github.com/rust-lang/rust/pull/61491/
8111[61884]: https://github.com/rust-lang/rust/pull/61884/
8112[61953]: https://github.com/rust-lang/rust/pull/61953/
8113[62042]: https://github.com/rust-lang/rust/pull/62042/
8114[62528]: https://github.com/rust-lang/rust/pull/62528/
8115[62583]: https://github.com/rust-lang/rust/pull/62583/
8116[62735]: https://github.com/rust-lang/rust/pull/62735/
8117[62766]: https://github.com/rust-lang/rust/pull/62766/
8118[62784]: https://github.com/rust-lang/rust/pull/62784/
8119[62592]: https://github.com/rust-lang/rust/pull/62592/
8120[62785]: https://github.com/rust-lang/rust/issues/62785/
8121[62814]: https://github.com/rust-lang/rust/pull/62814/
8122[62896]: https://github.com/rust-lang/rust/issues/62896/
8123[63000]: https://github.com/rust-lang/rust/pull/63000/
8124[63056]: https://github.com/rust-lang/rust/pull/63056/
8125[63107]: https://github.com/rust-lang/rust/pull/63107/
8126[63346]: https://github.com/rust-lang/rust/pull/63346/
8127[63421]: https://github.com/rust-lang/rust/pull/63421/
8128[cargo/7084]: https://github.com/rust-lang/cargo/pull/7084/
8129[cargo/7143]: https://github.com/rust-lang/cargo/pull/7143/
8130[63048]: https://github.com/rust-lang/rust/pull/63048
8131[`<*const T>::cast`]: https://doc.rust-lang.org/std/primitive.pointer.html#method.cast
8132[`<*mut T>::cast`]: https://doc.rust-lang.org/std/primitive.pointer.html#method.cast
8133[`Duration::as_secs_f32`]: https://doc.rust-lang.org/std/time/struct.Duration.html#method.as_secs_f32
8134[`Duration::as_secs_f64`]: https://doc.rust-lang.org/std/time/struct.Duration.html#method.as_secs_f64
8135[`Duration::div_f32`]: https://doc.rust-lang.org/std/time/struct.Duration.html#method.div_f32
8136[`Duration::div_f64`]: https://doc.rust-lang.org/std/time/struct.Duration.html#method.div_f64
8137[`Duration::from_secs_f32`]: https://doc.rust-lang.org/std/time/struct.Duration.html#method.from_secs_f32
8138[`Duration::from_secs_f64`]: https://doc.rust-lang.org/std/time/struct.Duration.html#method.from_secs_f64
8139[`Duration::mul_f32`]: https://doc.rust-lang.org/std/time/struct.Duration.html#method.mul_f32
8140[`Duration::mul_f64`]: https://doc.rust-lang.org/std/time/struct.Duration.html#method.mul_f64
8141[`any::type_name`]: https://doc.rust-lang.org/std/any/fn.type_name.html
8142[platform-support-doc]: https://doc.rust-lang.org/nightly/rustc/platform-support.html
8143[pipeline-internals]: https://internals.rust-lang.org/t/evaluating-pipelined-rustc-compilation/10199
8144
8145Version 1.37.0 (2019-08-15)
8146==========================
8147
8148Language
8149--------
8150- `#[must_use]` will now warn if the type is contained in a [tuple][61100],
8151 [`Box`][62228], or an [array][62235] and unused.
8152- [You can now use the `cfg` and `cfg_attr` attributes on
8153 generic parameters.][61547]
8154- [You can now use enum variants through type alias.][61682] e.g. You can
8155 write the following:
8156 ```rust
8157 type MyOption = Option<u8>;
8158
8159 fn increment_or_zero(x: MyOption) -> u8 {
8160 match x {
8161 MyOption::Some(y) => y + 1,
8162 MyOption::None => 0,
8163 }
8164 }
8165 ```
8166- [You can now use `_` as an identifier for consts.][61347] e.g. You can write
8167 `const _: u32 = 5;`.
8168- [You can now use `#[repr(align(X)]` on enums.][61229]
8169- [The `?` Kleene macro operator is now available in the
8170 2015 edition.][60932]
8171
8172Compiler
8173--------
8174- [You can now enable Profile-Guided Optimization with the `-C profile-generate`
8175 and `-C profile-use` flags.][61268] For more information on how to use profile
8176 guided optimization, please refer to the [rustc book][rustc-book-pgo].
8177- [The `rust-lldb` wrapper script should now work again.][61827]
8178
8179Libraries
8180---------
8181- [`mem::MaybeUninit<T>` is now ABI-compatible with `T`.][61802]
8182
8183Stabilized APIs
8184---------------
8185- [`BufReader::buffer`]
8186- [`BufWriter::buffer`]
8187- [`Cell::from_mut`]
8188- [`Cell<[T]>::as_slice_of_cells`][`Cell<slice>::as_slice_of_cells`]
8189- [`DoubleEndedIterator::nth_back`]
8190- [`Option::xor`]
8191- [`Wrapping::reverse_bits`]
8192- [`i128::reverse_bits`]
8193- [`i16::reverse_bits`]
8194- [`i32::reverse_bits`]
8195- [`i64::reverse_bits`]
8196- [`i8::reverse_bits`]
8197- [`isize::reverse_bits`]
8198- [`slice::copy_within`]
8199- [`u128::reverse_bits`]
8200- [`u16::reverse_bits`]
8201- [`u32::reverse_bits`]
8202- [`u64::reverse_bits`]
8203- [`u8::reverse_bits`]
8204- [`usize::reverse_bits`]
8205
8206Cargo
8207-----
8208- [`Cargo.lock` files are now included by default when publishing executable crates
8209 with executables.][cargo/7026]
8210- [You can now specify `default-run="foo"` in `[package]` to specify the
8211 default executable to use for `cargo run`.][cargo/7056]
8212
8213Misc
8214----
8215
8216Compatibility Notes
8217-------------------
8218- [Using `...` for inclusive range patterns will now warn by default.][61342]
8219 Please transition your code to using the `..=` syntax for inclusive
8220 ranges instead.
8221- [Using a trait object without the `dyn` will now warn by default.][61203]
8222 Please transition your code to use `dyn Trait` for trait objects instead.
8223
8224[62228]: https://github.com/rust-lang/rust/pull/62228/
8225[62235]: https://github.com/rust-lang/rust/pull/62235/
8226[61802]: https://github.com/rust-lang/rust/pull/61802/
8227[61827]: https://github.com/rust-lang/rust/pull/61827/
8228[61547]: https://github.com/rust-lang/rust/pull/61547/
8229[61682]: https://github.com/rust-lang/rust/pull/61682/
8230[61268]: https://github.com/rust-lang/rust/pull/61268/
8231[61342]: https://github.com/rust-lang/rust/pull/61342/
8232[61347]: https://github.com/rust-lang/rust/pull/61347/
8233[61100]: https://github.com/rust-lang/rust/pull/61100/
8234[61203]: https://github.com/rust-lang/rust/pull/61203/
8235[61229]: https://github.com/rust-lang/rust/pull/61229/
8236[60932]: https://github.com/rust-lang/rust/pull/60932/
8237[cargo/7026]: https://github.com/rust-lang/cargo/pull/7026/
8238[cargo/7056]: https://github.com/rust-lang/cargo/pull/7056/
8239[`BufReader::buffer`]: https://doc.rust-lang.org/std/io/struct.BufReader.html#method.buffer
8240[`BufWriter::buffer`]: https://doc.rust-lang.org/std/io/struct.BufWriter.html#method.buffer
8241[`Cell::from_mut`]: https://doc.rust-lang.org/std/cell/struct.Cell.html#method.from_mut
8242[`Cell<slice>::as_slice_of_cells`]: https://doc.rust-lang.org/std/cell/struct.Cell.html#method.as_slice_of_cells
8243[`DoubleEndedIterator::nth_back`]: https://doc.rust-lang.org/std/iter/trait.DoubleEndedIterator.html#method.nth_back
8244[`Option::xor`]: https://doc.rust-lang.org/std/option/enum.Option.html#method.xor
8245[`Wrapping::reverse_bits`]: https://doc.rust-lang.org/std/num/struct.Wrapping.html#method.reverse_bits
8246[`i128::reverse_bits`]: https://doc.rust-lang.org/std/primitive.i128.html#method.reverse_bits
8247[`i16::reverse_bits`]: https://doc.rust-lang.org/std/primitive.i16.html#method.reverse_bits
8248[`i32::reverse_bits`]: https://doc.rust-lang.org/std/primitive.i32.html#method.reverse_bits
8249[`i64::reverse_bits`]: https://doc.rust-lang.org/std/primitive.i64.html#method.reverse_bits
8250[`i8::reverse_bits`]: https://doc.rust-lang.org/std/primitive.i8.html#method.reverse_bits
8251[`isize::reverse_bits`]: https://doc.rust-lang.org/std/primitive.isize.html#method.reverse_bits
8252[`slice::copy_within`]: https://doc.rust-lang.org/std/primitive.slice.html#method.copy_within
8253[`u128::reverse_bits`]: https://doc.rust-lang.org/std/primitive.u128.html#method.reverse_bits
8254[`u16::reverse_bits`]: https://doc.rust-lang.org/std/primitive.u16.html#method.reverse_bits
8255[`u32::reverse_bits`]: https://doc.rust-lang.org/std/primitive.u32.html#method.reverse_bits
8256[`u64::reverse_bits`]: https://doc.rust-lang.org/std/primitive.u64.html#method.reverse_bits
8257[`u8::reverse_bits`]: https://doc.rust-lang.org/std/primitive.u8.html#method.reverse_bits
8258[`usize::reverse_bits`]: https://doc.rust-lang.org/std/primitive.usize.html#method.reverse_bits
8259[rustc-book-pgo]: https://doc.rust-lang.org/rustc/profile-guided-optimization.html
8260
8261
8262Version 1.36.0 (2019-07-04)
8263==========================
8264
8265Language
8266--------
8267- [Non-Lexical Lifetimes are now enabled on the 2015 edition.][59114]
8268- [The order of traits in trait objects no longer affects the semantics of that
8269 object.][59445] e.g. `dyn Send + fmt::Debug` is now equivalent to
8270 `dyn fmt::Debug + Send`, where this was previously not the case.
8271
8272Libraries
8273---------
8274- [`HashMap`'s implementation has been replaced with `hashbrown::HashMap` implementation.][58623]
8275- [`TryFromSliceError` now implements `From<Infallible>`.][60318]
8276- [`mem::needs_drop` is now available as a const fn.][60364]
8277- [`alloc::Layout::from_size_align_unchecked` is now available as a const fn.][60370]
8278- [`String` now implements `BorrowMut<str>`.][60404]
8279- [`io::Cursor` now implements `Default`.][60234]
8280- [Both `NonNull::{dangling, cast}` are now const fns.][60244]
8281- [The `alloc` crate is now stable.][59675] `alloc` allows you to use a subset
8282 of `std` (e.g. `Vec`, `Box`, `Arc`) in `#![no_std]` environments if the
8283 environment has access to heap memory allocation.
8284- [`String` now implements `From<&String>`.][59825]
8285- [You can now pass multiple arguments to the `dbg!` macro.][59826] `dbg!` will
8286 return a tuple of each argument when there is multiple arguments.
8287- [`Result::{is_err, is_ok}` are now `#[must_use]` and will produce a warning if
8288 not used.][59648]
8289
8290Stabilized APIs
8291---------------
8292- [`VecDeque::rotate_left`]
8293- [`VecDeque::rotate_right`]
8294- [`Iterator::copied`]
8295- [`io::IoSlice`]
8296- [`io::IoSliceMut`]
8297- [`Read::read_vectored`]
8298- [`Write::write_vectored`]
8299- [`str::as_mut_ptr`]
8300- [`mem::MaybeUninit`]
8301- [`pointer::align_offset`]
8302- [`future::Future`]
8303- [`task::Context`]
8304- [`task::RawWaker`]
8305- [`task::RawWakerVTable`]
8306- [`task::Waker`]
8307- [`task::Poll`]
8308
8309Cargo
8310-----
8311- [Cargo will now produce an error if you attempt to use the name of a required dependency as a feature.][cargo/6860]
8312- [You can now pass the `--offline` flag to run cargo without accessing the network.][cargo/6934]
8313
8314You can find further change's in [Cargo's 1.36.0 release notes][cargo-1-36-0].
8315
8316Clippy
8317------
8318There have been numerous additions and fixes to clippy, see [Clippy's 1.36.0 release notes][clippy-1-36-0] for more details.
8319
8320Misc
8321----
8322
8323Compatibility Notes
8324-------------------
8325- With the stabilisation of `mem::MaybeUninit`, `mem::uninitialized` use is no
8326 longer recommended, and will be deprecated in 1.39.0.
8327
8328[60318]: https://github.com/rust-lang/rust/pull/60318/
8329[60364]: https://github.com/rust-lang/rust/pull/60364/
8330[60370]: https://github.com/rust-lang/rust/pull/60370/
8331[60404]: https://github.com/rust-lang/rust/pull/60404/
8332[60234]: https://github.com/rust-lang/rust/pull/60234/
8333[60244]: https://github.com/rust-lang/rust/pull/60244/
8334[58623]: https://github.com/rust-lang/rust/pull/58623/
8335[59648]: https://github.com/rust-lang/rust/pull/59648/
8336[59675]: https://github.com/rust-lang/rust/pull/59675/
8337[59825]: https://github.com/rust-lang/rust/pull/59825/
8338[59826]: https://github.com/rust-lang/rust/pull/59826/
8339[59445]: https://github.com/rust-lang/rust/pull/59445/
8340[59114]: https://github.com/rust-lang/rust/pull/59114/
8341[cargo/6860]: https://github.com/rust-lang/cargo/pull/6860/
8342[cargo/6934]: https://github.com/rust-lang/cargo/pull/6934/
8343[`VecDeque::rotate_left`]: https://doc.rust-lang.org/std/collections/struct.VecDeque.html#method.rotate_left
8344[`VecDeque::rotate_right`]: https://doc.rust-lang.org/std/collections/struct.VecDeque.html#method.rotate_right
8345[`Iterator::copied`]: https://doc.rust-lang.org/std/iter/trait.Iterator.html#tymethod.copied
8346[`io::IoSlice`]: https://doc.rust-lang.org/std/io/struct.IoSlice.html
8347[`io::IoSliceMut`]: https://doc.rust-lang.org/std/io/struct.IoSliceMut.html
8348[`Read::read_vectored`]: https://doc.rust-lang.org/std/io/trait.Read.html#method.read_vectored
8349[`Write::write_vectored`]: https://doc.rust-lang.org/std/io/trait.Write.html#method.write_vectored
8350[`str::as_mut_ptr`]: https://doc.rust-lang.org/std/primitive.str.html#method.as_mut_ptr
8351[`mem::MaybeUninit`]: https://doc.rust-lang.org/std/mem/union.MaybeUninit.html
8352[`pointer::align_offset`]: https://doc.rust-lang.org/std/primitive.pointer.html#method.align_offset
8353[`future::Future`]: https://doc.rust-lang.org/std/future/trait.Future.html
8354[`task::Context`]: https://doc.rust-lang.org/beta/std/task/struct.Context.html
8355[`task::RawWaker`]: https://doc.rust-lang.org/beta/std/task/struct.RawWaker.html
8356[`task::RawWakerVTable`]: https://doc.rust-lang.org/beta/std/task/struct.RawWakerVTable.html
8357[`task::Waker`]: https://doc.rust-lang.org/beta/std/task/struct.Waker.html
8358[`task::Poll`]: https://doc.rust-lang.org/beta/std/task/enum.Poll.html
8359[clippy-1-36-0]: https://github.com/rust-lang/rust-clippy/blob/master/CHANGELOG.md#rust-136
8360[cargo-1-36-0]: https://github.com/rust-lang/cargo/blob/master/CHANGELOG.md#cargo-136-2019-07-04
8361
8362
8363Version 1.35.0 (2019-05-23)
8364==========================
8365
8366Language
8367--------
8368- [`FnOnce`, `FnMut`, and the `Fn` traits are now implemented for `Box<FnOnce>`,
8369 `Box<FnMut>`, and `Box<Fn>` respectively.][59500]
8370- [You can now coerce closures into unsafe function pointers.][59580] e.g.
8371 ```rust
8372 unsafe fn call_unsafe(func: unsafe fn()) {
8373 func()
8374 }
8375
8376 pub fn main() {
8377 unsafe { call_unsafe(|| {}); }
8378 }
8379 ```
8380
8381
8382Compiler
8383--------
8384- [Added the `armv6-unknown-freebsd-gnueabihf` and
8385 `armv7-unknown-freebsd-gnueabihf` targets.][58080]
8386- [Added the `wasm32-unknown-wasi` target.][59464]
8387
8388
8389Libraries
8390---------
8391- [`Thread` will now show its ID in `Debug` output.][59460]
8392- [`StdinLock`, `StdoutLock`, and `StderrLock` now implement `AsRawFd`.][59512]
8393- [`alloc::System` now implements `Default`.][59451]
8394- [Expanded `Debug` output (`{:#?}`) for structs now has a trailing comma on the
8395 last field.][59076]
8396- [`char::{ToLowercase, ToUppercase}` now
8397 implement `ExactSizeIterator`.][58778]
8398- [All `NonZero` numeric types now implement `FromStr`.][58717]
8399- [Removed the `Read` trait bounds
8400 on the `BufReader::{get_ref, get_mut, into_inner}` methods.][58423]
8401- [You can now call the `dbg!` macro without any parameters to print the file
8402 and line where it is called.][57847]
8403- [In place ASCII case conversions are now up to 4× faster.][59283]
8404 e.g. `str::make_ascii_lowercase`
8405- [`hash_map::{OccupiedEntry, VacantEntry}` now implement `Sync`
8406 and `Send`.][58369]
8407
8408Stabilized APIs
8409---------------
8410- [`f32::copysign`]
8411- [`f64::copysign`]
8412- [`RefCell::replace_with`]
8413- [`RefCell::map_split`]
8414- [`ptr::hash`]
8415- [`Range::contains`]
8416- [`RangeFrom::contains`]
8417- [`RangeTo::contains`]
8418- [`RangeInclusive::contains`]
8419- [`RangeToInclusive::contains`]
8420- [`Option::copied`]
8421
8422Cargo
8423-----
8424- [You can now set `cargo:rustc-cdylib-link-arg` at build time to pass custom
8425 linker arguments when building a `cdylib`.][cargo/6298] Its usage is highly
8426 platform specific.
8427
8428Misc
8429----
8430- [The Rust toolchain is now available natively for musl based distros.][58575]
8431
8432[59460]: https://github.com/rust-lang/rust/pull/59460/
8433[59464]: https://github.com/rust-lang/rust/pull/59464/
8434[59500]: https://github.com/rust-lang/rust/pull/59500/
8435[59512]: https://github.com/rust-lang/rust/pull/59512/
8436[59580]: https://github.com/rust-lang/rust/pull/59580/
8437[59283]: https://github.com/rust-lang/rust/pull/59283/
8438[59451]: https://github.com/rust-lang/rust/pull/59451/
8439[59076]: https://github.com/rust-lang/rust/pull/59076/
8440[58778]: https://github.com/rust-lang/rust/pull/58778/
8441[58717]: https://github.com/rust-lang/rust/pull/58717/
8442[58369]: https://github.com/rust-lang/rust/pull/58369/
8443[58423]: https://github.com/rust-lang/rust/pull/58423/
8444[58080]: https://github.com/rust-lang/rust/pull/58080/
8445[57847]: https://github.com/rust-lang/rust/pull/57847/
8446[58575]: https://github.com/rust-lang/rust/pull/58575
8447[cargo/6298]: https://github.com/rust-lang/cargo/pull/6298/
8448[`f32::copysign`]: https://doc.rust-lang.org/stable/std/primitive.f32.html#method.copysign
8449[`f64::copysign`]: https://doc.rust-lang.org/stable/std/primitive.f64.html#method.copysign
8450[`RefCell::replace_with`]: https://doc.rust-lang.org/stable/std/cell/struct.RefCell.html#method.replace_with
8451[`RefCell::map_split`]: https://doc.rust-lang.org/stable/std/cell/struct.RefCell.html#method.map_split
8452[`ptr::hash`]: https://doc.rust-lang.org/stable/std/ptr/fn.hash.html
8453[`Range::contains`]: https://doc.rust-lang.org/std/ops/struct.Range.html#method.contains
8454[`RangeFrom::contains`]: https://doc.rust-lang.org/std/ops/struct.RangeFrom.html#method.contains
8455[`RangeTo::contains`]: https://doc.rust-lang.org/std/ops/struct.RangeTo.html#method.contains
8456[`RangeInclusive::contains`]: https://doc.rust-lang.org/std/ops/struct.RangeInclusive.html#method.contains
8457[`RangeToInclusive::contains`]: https://doc.rust-lang.org/std/ops/struct.RangeToInclusive.html#method.contains
8458[`Option::copied`]: https://doc.rust-lang.org/std/option/enum.Option.html#method.copied
8459
8460Version 1.34.2 (2019-05-14)
8461===========================
8462
8463* [Destabilize the `Error::type_id` function due to a security
8464 vulnerability][60785] ([CVE-2019-12083])
8465
8466[60785]: https://github.com/rust-lang/rust/pull/60785
8467[CVE-2019-12083]: https://cve.mitre.org/cgi-bin/cvename.cgi?name=CVE-2019-12083
8468
8469Version 1.34.1 (2019-04-25)
8470===========================
8471
8472* [Fix false positives for the `redundant_closure` Clippy lint][clippy/3821]
8473* [Fix false positives for the `missing_const_for_fn` Clippy lint][clippy/3844]
8474* [Fix Clippy panic when checking some macros][clippy/3805]
8475
8476[clippy/3821]: https://github.com/rust-lang/rust-clippy/pull/3821
8477[clippy/3844]: https://github.com/rust-lang/rust-clippy/pull/3844
8478[clippy/3805]: https://github.com/rust-lang/rust-clippy/pull/3805
8479
8480Version 1.34.0 (2019-04-11)
8481==========================
8482
8483Language
8484--------
8485- [You can now use `#[deprecated = "reason"]`][58166] as a shorthand for
8486 `#[deprecated(note = "reason")]`. This was previously allowed by mistake
8487 but had no effect.
8488- [You can now accept token streams in `#[attr()]`,`#[attr[]]`, and
8489 `#[attr{}]` procedural macros.][57367]
8490- [You can now write `extern crate self as foo;`][57407] to import your
8491 crate's root into the extern prelude.
8492
8493
8494Compiler
8495--------
8496- [You can now target `riscv64imac-unknown-none-elf` and
8497 `riscv64gc-unknown-none-elf`.][58406]
8498- [You can now enable linker plugin LTO optimisations with
8499 `-C linker-plugin-lto`.][58057] This allows rustc to compile your Rust code
8500 into LLVM bitcode allowing LLVM to perform LTO optimisations across C/C++ FFI
8501 boundaries.
8502- [You can now target `powerpc64-unknown-freebsd`.][57809]
8503
8504
8505Libraries
8506---------
8507- [The trait bounds have been removed on some of `HashMap<K, V, S>`'s and
8508 `HashSet<T, S>`'s basic methods.][58370] Most notably you no longer require
8509 the `Hash` trait to create an iterator.
8510- [The `Ord` trait bounds have been removed on some of `BinaryHeap<T>`'s basic
8511 methods.][58421] Most notably you no longer require the `Ord` trait to create
8512 an iterator.
8513- [The methods `overflowing_neg` and `wrapping_neg` are now `const` functions
8514 for all numeric types.][58044]
8515- [Indexing a `str` is now generic over all types that
8516 implement `SliceIndex<str>`.][57604]
8517- [`str::trim`, `str::trim_matches`, `str::trim_{start, end}`, and
8518 `str::trim_{start, end}_matches` are now `#[must_use]`][57106] and will
8519 produce a warning if their returning type is unused.
8520- [The methods `checked_pow`, `saturating_pow`, `wrapping_pow`, and
8521 `overflowing_pow` are now available for all numeric types.][57873] These are
8522 equivalent to methods such as `wrapping_add` for the `pow` operation.
8523
8524
8525Stabilized APIs
8526---------------
8527
8528#### std & core
8529* [`Any::type_id`]
8530* [`Error::type_id`]
8531* [`atomic::AtomicI16`]
8532* [`atomic::AtomicI32`]
8533* [`atomic::AtomicI64`]
8534* [`atomic::AtomicI8`]
8535* [`atomic::AtomicU16`]
8536* [`atomic::AtomicU32`]
8537* [`atomic::AtomicU64`]
8538* [`atomic::AtomicU8`]
8539* [`convert::Infallible`]
8540* [`convert::TryFrom`]
8541* [`convert::TryInto`]
8542* [`iter::from_fn`]
8543* [`iter::successors`]
8544* [`num::NonZeroI128`]
8545* [`num::NonZeroI16`]
8546* [`num::NonZeroI32`]
8547* [`num::NonZeroI64`]
8548* [`num::NonZeroI8`]
8549* [`num::NonZeroIsize`]
8550* [`slice::sort_by_cached_key`]
8551* [`str::escape_debug`]
8552* [`str::escape_default`]
8553* [`str::escape_unicode`]
8554* [`str::split_ascii_whitespace`]
8555
8556#### std
8557* [`Instant::checked_add`]
8558* [`Instant::checked_sub`]
8559* [`SystemTime::checked_add`]
8560* [`SystemTime::checked_sub`]
8561
8562Cargo
8563-----
8564- [You can now use alternative registries to crates.io.][cargo/6654]
8565
8566Misc
8567----
8568- [You can now use the `?` operator in your documentation tests without manually
8569 adding `fn main() -> Result<(), _> {}`.][56470]
8570
8571Compatibility Notes
8572-------------------
8573- [`Command::before_exec` is being replaced by the unsafe method
8574 `Command::pre_exec`][58059] and will be deprecated with Rust 1.37.0.
8575- [Use of `ATOMIC_{BOOL, ISIZE, USIZE}_INIT` is now deprecated][57425] as you
8576 can now use `const` functions in `static` variables.
8577
8578[58370]: https://github.com/rust-lang/rust/pull/58370/
8579[58406]: https://github.com/rust-lang/rust/pull/58406/
8580[58421]: https://github.com/rust-lang/rust/pull/58421/
8581[58166]: https://github.com/rust-lang/rust/pull/58166/
8582[58044]: https://github.com/rust-lang/rust/pull/58044/
8583[58057]: https://github.com/rust-lang/rust/pull/58057/
8584[58059]: https://github.com/rust-lang/rust/pull/58059/
8585[57809]: https://github.com/rust-lang/rust/pull/57809/
8586[57873]: https://github.com/rust-lang/rust/pull/57873/
8587[57604]: https://github.com/rust-lang/rust/pull/57604/
8588[57367]: https://github.com/rust-lang/rust/pull/57367/
8589[57407]: https://github.com/rust-lang/rust/pull/57407/
8590[57425]: https://github.com/rust-lang/rust/pull/57425/
8591[57106]: https://github.com/rust-lang/rust/pull/57106/
8592[56470]: https://github.com/rust-lang/rust/pull/56470/
8593[cargo/6654]: https://github.com/rust-lang/cargo/pull/6654/
8594[`Any::type_id`]: https://doc.rust-lang.org/std/any/trait.Any.html#tymethod.type_id
8595[`Error::type_id`]: https://doc.rust-lang.org/std/error/trait.Error.html#method.type_id
8596[`atomic::AtomicI16`]: https://doc.rust-lang.org/std/sync/atomic/struct.AtomicI16.html
8597[`atomic::AtomicI32`]: https://doc.rust-lang.org/std/sync/atomic/struct.AtomicI32.html
8598[`atomic::AtomicI64`]: https://doc.rust-lang.org/std/sync/atomic/struct.AtomicI64.html
8599[`atomic::AtomicI8`]: https://doc.rust-lang.org/std/sync/atomic/struct.AtomicI8.html
8600[`atomic::AtomicU16`]: https://doc.rust-lang.org/std/sync/atomic/struct.AtomicU16.html
8601[`atomic::AtomicU32`]: https://doc.rust-lang.org/std/sync/atomic/struct.AtomicU32.html
8602[`atomic::AtomicU64`]: https://doc.rust-lang.org/std/sync/atomic/struct.AtomicU64.html
8603[`atomic::AtomicU8`]: https://doc.rust-lang.org/std/sync/atomic/struct.AtomicU8.html
8604[`convert::Infallible`]: https://doc.rust-lang.org/std/convert/enum.Infallible.html
8605[`convert::TryFrom`]: https://doc.rust-lang.org/std/convert/trait.TryFrom.html
8606[`convert::TryInto`]: https://doc.rust-lang.org/std/convert/trait.TryInto.html
8607[`iter::from_fn`]: https://doc.rust-lang.org/std/iter/fn.from_fn.html
8608[`iter::successors`]: https://doc.rust-lang.org/std/iter/fn.successors.html
8609[`num::NonZeroI128`]: https://doc.rust-lang.org/std/num/struct.NonZeroI128.html
8610[`num::NonZeroI16`]: https://doc.rust-lang.org/std/num/struct.NonZeroI16.html
8611[`num::NonZeroI32`]: https://doc.rust-lang.org/std/num/struct.NonZeroI32.html
8612[`num::NonZeroI64`]: https://doc.rust-lang.org/std/num/struct.NonZeroI64.html
8613[`num::NonZeroI8`]: https://doc.rust-lang.org/std/num/struct.NonZeroI8.html
8614[`num::NonZeroIsize`]: https://doc.rust-lang.org/std/num/struct.NonZeroIsize.html
8615[`slice::sort_by_cached_key`]: https://doc.rust-lang.org/std/primitive.slice.html#method.sort_by_cached_key
8616[`str::escape_debug`]: https://doc.rust-lang.org/std/primitive.str.html#method.escape_debug
8617[`str::escape_default`]: https://doc.rust-lang.org/std/primitive.str.html#method.escape_default
8618[`str::escape_unicode`]: https://doc.rust-lang.org/std/primitive.str.html#method.escape_unicode
8619[`str::split_ascii_whitespace`]: https://doc.rust-lang.org/std/primitive.str.html#method.split_ascii_whitespace
8620[`Instant::checked_add`]: https://doc.rust-lang.org/std/time/struct.Instant.html#method.checked_add
8621[`Instant::checked_sub`]: https://doc.rust-lang.org/std/time/struct.Instant.html#method.checked_sub
8622[`SystemTime::checked_add`]: https://doc.rust-lang.org/std/time/struct.SystemTime.html#method.checked_add
8623[`SystemTime::checked_sub`]: https://doc.rust-lang.org/std/time/struct.SystemTime.html#method.checked_sub
8624
8625
8626Version 1.33.0 (2019-02-28)
8627==========================
8628
8629Language
8630--------
8631- [You can now use the `cfg(target_vendor)` attribute.][57465] E.g.
8632 `#[cfg(target_vendor="apple")] fn main() { println!("Hello Apple!"); }`
8633- [Integer patterns such as in a match expression can now be exhaustive.][56362]
8634 E.g. You can have match statement on a `u8` that covers `0..=255` and
8635 you would no longer be required to have a `_ => unreachable!()` case.
8636- [You can now have multiple patterns in `if let` and `while let`
8637 expressions.][57532] You can do this with the same syntax as a `match`
8638 expression. E.g.
8639 ```rust
8640 enum Creature {
8641 Crab(String),
8642 Lobster(String),
8643 Person(String),
8644 }
8645
8646 fn main() {
8647 let state = Creature::Crab("Ferris");
8648
8649 if let Creature::Crab(name) | Creature::Person(name) = state {
8650 println!("This creature's name is: {}", name);
8651 }
8652 }
8653 ```
8654- [You can now have irrefutable `if let` and `while let` patterns.][57535] Using
8655 this feature will by default produce a warning as this behaviour can be
8656 unintuitive. E.g. `if let _ = 5 {}`
8657- [You can now use `let` bindings, assignments, expression statements,
8658 and irrefutable pattern destructuring in const functions.][57175]
8659- [You can now call unsafe const functions.][57067] E.g.
8660 ```rust
8661 const unsafe fn foo() -> i32 { 5 }
8662 const fn bar() -> i32 {
8663 unsafe { foo() }
8664 }
8665 ```
8666- [You can now specify multiple attributes in a `cfg_attr` attribute.][57332]
8667 E.g. `#[cfg_attr(all(), must_use, optimize)]`
8668- [You can now specify a specific alignment with the `#[repr(packed)]`
8669 attribute.][57049] E.g. `#[repr(packed(2))] struct Foo(i16, i32);` is a struct
8670 with an alignment of 2 bytes and a size of 6 bytes.
8671- [You can now import an item from a module as an `_`.][56303] This allows you to
8672 import a trait's impls, and not have the name in the namespace. E.g.
8673 ```rust
8674 use std::io::Read as _;
8675
8676 // Allowed as there is only one `Read` in the module.
8677 pub trait Read {}
8678 ```
8679- [You may now use `Rc`, `Arc`, and `Pin` as method receivers][56805].
8680
8681Compiler
8682--------
8683- [You can now set a linker flavor for `rustc` with the `-Clinker-flavor`
8684 command line argument.][56351]
8685- [The minimum required LLVM version has been bumped to 6.0.][56642]
8686- [Added support for the PowerPC64 architecture on FreeBSD.][57615]
8687- [The `x86_64-fortanix-unknown-sgx` target support has been upgraded to
8688 tier 2 support.][57130] Visit the [platform support][platform-support] page for
8689 information on Rust's platform support.
8690- [Added support for the `thumbv7neon-linux-androideabi` and
8691 `thumbv7neon-unknown-linux-gnueabihf` targets.][56947]
8692- [Added support for the `x86_64-unknown-uefi` target.][56769]
8693
8694Libraries
8695---------
8696- [The methods `overflowing_{add, sub, mul, shl, shr}` are now `const`
8697 functions for all numeric types.][57566]
8698- [The methods `rotate_left`, `rotate_right`, and `wrapping_{add, sub, mul, shl, shr}`
8699 are now `const` functions for all numeric types.][57105]
8700- [The methods `is_positive` and `is_negative` are now `const` functions for
8701 all signed numeric types.][57105]
8702- [The `get` method for all `NonZero` types is now `const`.][57167]
8703- [The methods `count_ones`, `count_zeros`, `leading_zeros`, `trailing_zeros`,
8704 `swap_bytes`, `from_be`, `from_le`, `to_be`, `to_le` are now `const` for all
8705 numeric types.][57234]
8706- [`Ipv4Addr::new` is now a `const` function][57234]
8707
8708Stabilized APIs
8709---------------
8710- [`unix::FileExt::read_exact_at`]
8711- [`unix::FileExt::write_all_at`]
8712- [`Option::transpose`]
8713- [`Result::transpose`]
8714- [`convert::identity`]
8715- [`pin::Pin`]
8716- [`marker::Unpin`]
8717- [`marker::PhantomPinned`]
8718- [`Vec::resize_with`]
8719- [`VecDeque::resize_with`]
8720- [`Duration::as_millis`]
8721- [`Duration::as_micros`]
8722- [`Duration::as_nanos`]
8723
8724
8725Cargo
8726-----
8727- [You can now publish crates that require a feature flag to compile with
8728 `cargo publish --features` or `cargo publish --all-features`.][cargo/6453]
8729- [Cargo should now rebuild a crate if a file was modified during the initial
8730 build.][cargo/6484]
8731
8732Compatibility Notes
8733-------------------
8734- The methods `str::{trim_left, trim_right, trim_left_matches, trim_right_matches}`
8735 are now deprecated in the standard library, and their usage will now produce a warning.
8736 Please use the `str::{trim_start, trim_end, trim_start_matches, trim_end_matches}`
8737 methods instead.
8738- The `Error::cause` method has been deprecated in favor of `Error::source` which supports
8739 downcasting.
8740- [Libtest no longer creates a new thread for each test when
8741 `--test-threads=1`. It also runs the tests in deterministic order][56243]
8742
8743[56243]: https://github.com/rust-lang/rust/pull/56243
8744[56303]: https://github.com/rust-lang/rust/pull/56303/
8745[56351]: https://github.com/rust-lang/rust/pull/56351/
8746[56362]: https://github.com/rust-lang/rust/pull/56362
8747[56642]: https://github.com/rust-lang/rust/pull/56642/
8748[56769]: https://github.com/rust-lang/rust/pull/56769/
8749[56805]: https://github.com/rust-lang/rust/pull/56805
8750[56947]: https://github.com/rust-lang/rust/pull/56947/
8751[57049]: https://github.com/rust-lang/rust/pull/57049/
8752[57067]: https://github.com/rust-lang/rust/pull/57067/
8753[57105]: https://github.com/rust-lang/rust/pull/57105
8754[57130]: https://github.com/rust-lang/rust/pull/57130/
8755[57167]: https://github.com/rust-lang/rust/pull/57167/
8756[57175]: https://github.com/rust-lang/rust/pull/57175/
8757[57234]: https://github.com/rust-lang/rust/pull/57234/
8758[57332]: https://github.com/rust-lang/rust/pull/57332/
8759[57465]: https://github.com/rust-lang/rust/pull/57465/
8760[57532]: https://github.com/rust-lang/rust/pull/57532/
8761[57535]: https://github.com/rust-lang/rust/pull/57535/
8762[57566]: https://github.com/rust-lang/rust/pull/57566/
8763[57615]: https://github.com/rust-lang/rust/pull/57615/
8764[cargo/6453]: https://github.com/rust-lang/cargo/pull/6453/
8765[cargo/6484]: https://github.com/rust-lang/cargo/pull/6484/
8766[`unix::FileExt::read_exact_at`]: https://doc.rust-lang.org/std/os/unix/fs/trait.FileExt.html#method.read_exact_at
8767[`unix::FileExt::write_all_at`]: https://doc.rust-lang.org/std/os/unix/fs/trait.FileExt.html#method.write_all_at
8768[`Option::transpose`]: https://doc.rust-lang.org/std/option/enum.Option.html#method.transpose
8769[`Result::transpose`]: https://doc.rust-lang.org/std/result/enum.Result.html#method.transpose
8770[`convert::identity`]: https://doc.rust-lang.org/std/convert/fn.identity.html
8771[`pin::Pin`]: https://doc.rust-lang.org/std/pin/struct.Pin.html
8772[`marker::Unpin`]: https://doc.rust-lang.org/stable/std/marker/trait.Unpin.html
8773[`marker::PhantomPinned`]: https://doc.rust-lang.org/nightly/std/marker/struct.PhantomPinned.html
8774[`Vec::resize_with`]: https://doc.rust-lang.org/std/vec/struct.Vec.html#method.resize_with
8775[`VecDeque::resize_with`]: https://doc.rust-lang.org/std/collections/struct.VecDeque.html#method.resize_with
8776[`Duration::as_millis`]: https://doc.rust-lang.org/std/time/struct.Duration.html#method.as_millis
8777[`Duration::as_micros`]: https://doc.rust-lang.org/std/time/struct.Duration.html#method.as_micros
8778[`Duration::as_nanos`]: https://doc.rust-lang.org/std/time/struct.Duration.html#method.as_nanos
8779[platform-support]: https://forge.rust-lang.org/platform-support.html
8780
8781Version 1.32.0 (2019-01-17)
8782==========================
8783
8784Language
8785--------
8786#### 2018 edition
8787- [You can now use the `?` operator in macro definitions.][56245] The `?`
8788 operator allows you to specify zero or one repetitions similar to the `*` and
8789 `+` operators.
8790- [Module paths with no leading keyword like `super`, `self`, or `crate`, will
8791 now always resolve to the item (`enum`, `struct`, etc.) available in the
8792 module if present, before resolving to a external crate or an item the prelude.][56759]
8793 E.g.
8794 ```rust
8795 enum Color { Red, Green, Blue }
8796
8797 use Color::*;
8798 ```
8799
8800#### All editions
8801- [You can now match against `PhantomData<T>` types.][55837]
8802- [You can now match against literals in macros with the `literal`
8803 specifier.][56072] This will match against a literal of any type.
8804 E.g. `1`, `'A'`, `"Hello World"`
8805- [Self can now be used as a constructor and pattern for unit and tuple structs.][56365] E.g.
8806 ```rust
8807 struct Point(i32, i32);
8808
8809 impl Point {
8810 pub fn new(x: i32, y: i32) -> Self {
8811 Self(x, y)
8812 }
8813
8814 pub fn is_origin(&self) -> bool {
8815 match self {
8816 Self(0, 0) => true,
8817 _ => false,
8818 }
8819 }
8820 }
8821 ```
8822- [Self can also now be used in type definitions.][56366] E.g.
8823 ```rust
8824 enum List<T>
8825 where
8826 Self: PartialOrd<Self> // can write `Self` instead of `List<T>`
8827 {
8828 Nil,
8829 Cons(T, Box<Self>) // likewise here
8830 }
8831 ```
8832- [You can now mark traits with `#[must_use]`.][55663] This provides a warning if
8833 a `impl Trait` or `dyn Trait` is returned and unused in the program.
8834
8835Compiler
8836--------
8837- [The default allocator has changed from jemalloc to the default allocator on
8838 your system.][55238] The compiler itself on Linux & macOS will still use
8839 jemalloc, but programs compiled with it will use the system allocator.
8840- [Added the `aarch64-pc-windows-msvc` target.][55702]
8841
8842Libraries
8843---------
8844- [`PathBuf` now implements `FromStr`.][55148]
8845- [`Box<[T]>` now implements `FromIterator<T>`.][55843]
8846- [The `dbg!` macro has been stabilized.][56395] This macro enables you to
8847 easily debug expressions in your rust program. E.g.
8848 ```rust
8849 let a = 2;
8850 let b = dbg!(a * 2) + 1;
8851 // ^-- prints: [src/main.rs:4] a * 2 = 4
8852 assert_eq!(b, 5);
8853 ```
8854
8855The following APIs are now `const` functions and can be used in a
8856`const` context.
8857
8858- [`Cell::as_ptr`]
8859- [`UnsafeCell::get`]
8860- [`char::is_ascii`]
8861- [`iter::empty`]
8862- [`ManuallyDrop::new`]
8863- [`ManuallyDrop::into_inner`]
8864- [`RangeInclusive::start`]
8865- [`RangeInclusive::end`]
8866- [`NonNull::as_ptr`]
8867- [`slice::as_ptr`]
8868- [`str::as_ptr`]
8869- [`Duration::as_secs`]
8870- [`Duration::subsec_millis`]
8871- [`Duration::subsec_micros`]
8872- [`Duration::subsec_nanos`]
8873- [`CStr::as_ptr`]
8874- [`Ipv4Addr::is_unspecified`]
8875- [`Ipv6Addr::new`]
8876- [`Ipv6Addr::octets`]
8877
8878Stabilized APIs
8879---------------
8880- [`i8::to_be_bytes`]
8881- [`i8::to_le_bytes`]
8882- [`i8::to_ne_bytes`]
8883- [`i8::from_be_bytes`]
8884- [`i8::from_le_bytes`]
8885- [`i8::from_ne_bytes`]
8886- [`i16::to_be_bytes`]
8887- [`i16::to_le_bytes`]
8888- [`i16::to_ne_bytes`]
8889- [`i16::from_be_bytes`]
8890- [`i16::from_le_bytes`]
8891- [`i16::from_ne_bytes`]
8892- [`i32::to_be_bytes`]
8893- [`i32::to_le_bytes`]
8894- [`i32::to_ne_bytes`]
8895- [`i32::from_be_bytes`]
8896- [`i32::from_le_bytes`]
8897- [`i32::from_ne_bytes`]
8898- [`i64::to_be_bytes`]
8899- [`i64::to_le_bytes`]
8900- [`i64::to_ne_bytes`]
8901- [`i64::from_be_bytes`]
8902- [`i64::from_le_bytes`]
8903- [`i64::from_ne_bytes`]
8904- [`i128::to_be_bytes`]
8905- [`i128::to_le_bytes`]
8906- [`i128::to_ne_bytes`]
8907- [`i128::from_be_bytes`]
8908- [`i128::from_le_bytes`]
8909- [`i128::from_ne_bytes`]
8910- [`isize::to_be_bytes`]
8911- [`isize::to_le_bytes`]
8912- [`isize::to_ne_bytes`]
8913- [`isize::from_be_bytes`]
8914- [`isize::from_le_bytes`]
8915- [`isize::from_ne_bytes`]
8916- [`u8::to_be_bytes`]
8917- [`u8::to_le_bytes`]
8918- [`u8::to_ne_bytes`]
8919- [`u8::from_be_bytes`]
8920- [`u8::from_le_bytes`]
8921- [`u8::from_ne_bytes`]
8922- [`u16::to_be_bytes`]
8923- [`u16::to_le_bytes`]
8924- [`u16::to_ne_bytes`]
8925- [`u16::from_be_bytes`]
8926- [`u16::from_le_bytes`]
8927- [`u16::from_ne_bytes`]
8928- [`u32::to_be_bytes`]
8929- [`u32::to_le_bytes`]
8930- [`u32::to_ne_bytes`]
8931- [`u32::from_be_bytes`]
8932- [`u32::from_le_bytes`]
8933- [`u32::from_ne_bytes`]
8934- [`u64::to_be_bytes`]
8935- [`u64::to_le_bytes`]
8936- [`u64::to_ne_bytes`]
8937- [`u64::from_be_bytes`]
8938- [`u64::from_le_bytes`]
8939- [`u64::from_ne_bytes`]
8940- [`u128::to_be_bytes`]
8941- [`u128::to_le_bytes`]
8942- [`u128::to_ne_bytes`]
8943- [`u128::from_be_bytes`]
8944- [`u128::from_le_bytes`]
8945- [`u128::from_ne_bytes`]
8946- [`usize::to_be_bytes`]
8947- [`usize::to_le_bytes`]
8948- [`usize::to_ne_bytes`]
8949- [`usize::from_be_bytes`]
8950- [`usize::from_le_bytes`]
8951- [`usize::from_ne_bytes`]
8952
8953Cargo
8954-----
8955- [You can now run `cargo c` as an alias for `cargo check`.][cargo/6218]
8956- [Usernames are now allowed in alt registry URLs.][cargo/6242]
8957
8958Misc
8959----
8960- [`libproc_macro` has been added to the `rust-src` distribution.][55280]
8961
8962Compatibility Notes
8963-------------------
8964- [The argument types for AVX's
8965 `_mm256_stream_si256`, `_mm256_stream_pd`, `_mm256_stream_ps`][55610] have
8966 been changed from `*const` to `*mut` as the previous implementation
8967 was unsound.
8968
8969
8970[55148]: https://github.com/rust-lang/rust/pull/55148/
8971[55238]: https://github.com/rust-lang/rust/pull/55238/
8972[55280]: https://github.com/rust-lang/rust/pull/55280/
8973[55610]: https://github.com/rust-lang/rust/pull/55610/
8974[55663]: https://github.com/rust-lang/rust/pull/55663/
8975[55702]: https://github.com/rust-lang/rust/pull/55702/
8976[55837]: https://github.com/rust-lang/rust/pull/55837/
8977[55843]: https://github.com/rust-lang/rust/pull/55843/
8978[56072]: https://github.com/rust-lang/rust/pull/56072/
8979[56245]: https://github.com/rust-lang/rust/pull/56245/
8980[56365]: https://github.com/rust-lang/rust/pull/56365/
8981[56366]: https://github.com/rust-lang/rust/pull/56366/
8982[56395]: https://github.com/rust-lang/rust/pull/56395/
8983[56759]: https://github.com/rust-lang/rust/pull/56759/
8984[cargo/6218]: https://github.com/rust-lang/cargo/pull/6218/
8985[cargo/6242]: https://github.com/rust-lang/cargo/pull/6242/
8986[`CStr::as_ptr`]: https://doc.rust-lang.org/std/ffi/struct.CStr.html#method.as_ptr
8987[`Cell::as_ptr`]: https://doc.rust-lang.org/std/cell/struct.Cell.html#method.as_ptr
8988[`Duration::as_secs`]: https://doc.rust-lang.org/std/time/struct.Duration.html#method.as_secs
8989[`Duration::subsec_micros`]: https://doc.rust-lang.org/std/time/struct.Duration.html#method.subsec_micros
8990[`Duration::subsec_millis`]: https://doc.rust-lang.org/std/time/struct.Duration.html#method.subsec_millis
8991[`Duration::subsec_nanos`]: https://doc.rust-lang.org/std/time/struct.Duration.html#method.subsec_nanos
8992[`Ipv4Addr::is_unspecified`]: https://doc.rust-lang.org/std/net/struct.Ipv4Addr.html#method.is_unspecified
8993[`Ipv6Addr::new`]: https://doc.rust-lang.org/std/net/struct.Ipv6Addr.html#method.new
8994[`Ipv6Addr::octets`]: https://doc.rust-lang.org/std/net/struct.Ipv6Addr.html#method.octets
8995[`ManuallyDrop::into_inner`]: https://doc.rust-lang.org/std/mem/struct.ManuallyDrop.html#method.into_inner
8996[`ManuallyDrop::new`]: https://doc.rust-lang.org/std/mem/struct.ManuallyDrop.html#method.new
8997[`NonNull::as_ptr`]: https://doc.rust-lang.org/std/ptr/struct.NonNull.html#method.as_ptr
8998[`RangeInclusive::end`]: https://doc.rust-lang.org/std/ops/struct.RangeInclusive.html#method.end
8999[`RangeInclusive::start`]: https://doc.rust-lang.org/std/ops/struct.RangeInclusive.html#method.start
9000[`UnsafeCell::get`]: https://doc.rust-lang.org/std/cell/struct.UnsafeCell.html#method.get
9001[`slice::as_ptr`]: https://doc.rust-lang.org/std/primitive.slice.html#method.as_ptr
9002[`char::is_ascii`]: https://doc.rust-lang.org/std/primitive.char.html#method.is_ascii
9003[`i128::from_be_bytes`]: https://doc.rust-lang.org/stable/std/primitive.i128.html#method.from_be_bytes
9004[`i128::from_le_bytes`]: https://doc.rust-lang.org/stable/std/primitive.i128.html#method.from_le_bytes
9005[`i128::from_ne_bytes`]: https://doc.rust-lang.org/stable/std/primitive.i128.html#method.from_ne_bytes
9006[`i128::to_be_bytes`]: https://doc.rust-lang.org/stable/std/primitive.i128.html#method.to_be_bytes
9007[`i128::to_le_bytes`]: https://doc.rust-lang.org/stable/std/primitive.i128.html#method.to_le_bytes
9008[`i128::to_ne_bytes`]: https://doc.rust-lang.org/stable/std/primitive.i128.html#method.to_ne_bytes
9009[`i16::from_be_bytes`]: https://doc.rust-lang.org/stable/std/primitive.i16.html#method.from_be_bytes
9010[`i16::from_le_bytes`]: https://doc.rust-lang.org/stable/std/primitive.i16.html#method.from_le_bytes
9011[`i16::from_ne_bytes`]: https://doc.rust-lang.org/stable/std/primitive.i16.html#method.from_ne_bytes
9012[`i16::to_be_bytes`]: https://doc.rust-lang.org/stable/std/primitive.i16.html#method.to_be_bytes
9013[`i16::to_le_bytes`]: https://doc.rust-lang.org/stable/std/primitive.i16.html#method.to_le_bytes
9014[`i16::to_ne_bytes`]: https://doc.rust-lang.org/stable/std/primitive.i16.html#method.to_ne_bytes
9015[`i32::from_be_bytes`]: https://doc.rust-lang.org/stable/std/primitive.i32.html#method.from_be_bytes
9016[`i32::from_le_bytes`]: https://doc.rust-lang.org/stable/std/primitive.i32.html#method.from_le_bytes
9017[`i32::from_ne_bytes`]: https://doc.rust-lang.org/stable/std/primitive.i32.html#method.from_ne_bytes
9018[`i32::to_be_bytes`]: https://doc.rust-lang.org/stable/std/primitive.i32.html#method.to_be_bytes
9019[`i32::to_le_bytes`]: https://doc.rust-lang.org/stable/std/primitive.i32.html#method.to_le_bytes
9020[`i32::to_ne_bytes`]: https://doc.rust-lang.org/stable/std/primitive.i32.html#method.to_ne_bytes
9021[`i64::from_be_bytes`]: https://doc.rust-lang.org/stable/std/primitive.i64.html#method.from_be_bytes
9022[`i64::from_le_bytes`]: https://doc.rust-lang.org/stable/std/primitive.i64.html#method.from_le_bytes
9023[`i64::from_ne_bytes`]: https://doc.rust-lang.org/stable/std/primitive.i64.html#method.from_ne_bytes
9024[`i64::to_be_bytes`]: https://doc.rust-lang.org/stable/std/primitive.i64.html#method.to_be_bytes
9025[`i64::to_le_bytes`]: https://doc.rust-lang.org/stable/std/primitive.i64.html#method.to_le_bytes
9026[`i64::to_ne_bytes`]: https://doc.rust-lang.org/stable/std/primitive.i64.html#method.to_ne_bytes
9027[`i8::from_be_bytes`]: https://doc.rust-lang.org/stable/std/primitive.i8.html#method.from_be_bytes
9028[`i8::from_le_bytes`]: https://doc.rust-lang.org/stable/std/primitive.i8.html#method.from_le_bytes
9029[`i8::from_ne_bytes`]: https://doc.rust-lang.org/stable/std/primitive.i8.html#method.from_ne_bytes
9030[`i8::to_be_bytes`]: https://doc.rust-lang.org/stable/std/primitive.i8.html#method.to_be_bytes
9031[`i8::to_le_bytes`]: https://doc.rust-lang.org/stable/std/primitive.i8.html#method.to_le_bytes
9032[`i8::to_ne_bytes`]: https://doc.rust-lang.org/stable/std/primitive.i8.html#method.to_ne_bytes
9033[`isize::from_be_bytes`]: https://doc.rust-lang.org/stable/std/primitive.isize.html#method.from_be_bytes
9034[`isize::from_le_bytes`]: https://doc.rust-lang.org/stable/std/primitive.isize.html#method.from_le_bytes
9035[`isize::from_ne_bytes`]: https://doc.rust-lang.org/stable/std/primitive.isize.html#method.from_ne_bytes
9036[`isize::to_be_bytes`]: https://doc.rust-lang.org/stable/std/primitive.isize.html#method.to_be_bytes
9037[`isize::to_le_bytes`]: https://doc.rust-lang.org/stable/std/primitive.isize.html#method.to_le_bytes
9038[`isize::to_ne_bytes`]: https://doc.rust-lang.org/stable/std/primitive.isize.html#method.to_ne_bytes
9039[`iter::empty`]: https://doc.rust-lang.org/std/iter/fn.empty.html
9040[`str::as_ptr`]: https://doc.rust-lang.org/std/primitive.str.html#method.as_ptr
9041[`u128::from_be_bytes`]: https://doc.rust-lang.org/stable/std/primitive.u128.html#method.from_be_bytes
9042[`u128::from_le_bytes`]: https://doc.rust-lang.org/stable/std/primitive.u128.html#method.from_le_bytes
9043[`u128::from_ne_bytes`]: https://doc.rust-lang.org/stable/std/primitive.u128.html#method.from_ne_bytes
9044[`u128::to_be_bytes`]: https://doc.rust-lang.org/stable/std/primitive.u128.html#method.to_be_bytes
9045[`u128::to_le_bytes`]: https://doc.rust-lang.org/stable/std/primitive.u128.html#method.to_le_bytes
9046[`u128::to_ne_bytes`]: https://doc.rust-lang.org/stable/std/primitive.u128.html#method.to_ne_bytes
9047[`u16::from_be_bytes`]: https://doc.rust-lang.org/stable/std/primitive.u16.html#method.from_be_bytes
9048[`u16::from_le_bytes`]: https://doc.rust-lang.org/stable/std/primitive.u16.html#method.from_le_bytes
9049[`u16::from_ne_bytes`]: https://doc.rust-lang.org/stable/std/primitive.u16.html#method.from_ne_bytes
9050[`u16::to_be_bytes`]: https://doc.rust-lang.org/stable/std/primitive.u16.html#method.to_be_bytes
9051[`u16::to_le_bytes`]: https://doc.rust-lang.org/stable/std/primitive.u16.html#method.to_le_bytes
9052[`u16::to_ne_bytes`]: https://doc.rust-lang.org/stable/std/primitive.u16.html#method.to_ne_bytes
9053[`u32::from_be_bytes`]: https://doc.rust-lang.org/stable/std/primitive.u32.html#method.from_be_bytes
9054[`u32::from_le_bytes`]: https://doc.rust-lang.org/stable/std/primitive.u32.html#method.from_le_bytes
9055[`u32::from_ne_bytes`]: https://doc.rust-lang.org/stable/std/primitive.u32.html#method.from_ne_bytes
9056[`u32::to_be_bytes`]: https://doc.rust-lang.org/stable/std/primitive.u32.html#method.to_be_bytes
9057[`u32::to_le_bytes`]: https://doc.rust-lang.org/stable/std/primitive.u32.html#method.to_le_bytes
9058[`u32::to_ne_bytes`]: https://doc.rust-lang.org/stable/std/primitive.u32.html#method.to_ne_bytes
9059[`u64::from_be_bytes`]: https://doc.rust-lang.org/stable/std/primitive.u64.html#method.from_be_bytes
9060[`u64::from_le_bytes`]: https://doc.rust-lang.org/stable/std/primitive.u64.html#method.from_le_bytes
9061[`u64::from_ne_bytes`]: https://doc.rust-lang.org/stable/std/primitive.u64.html#method.from_ne_bytes
9062[`u64::to_be_bytes`]: https://doc.rust-lang.org/stable/std/primitive.u64.html#method.to_be_bytes
9063[`u64::to_le_bytes`]: https://doc.rust-lang.org/stable/std/primitive.u64.html#method.to_le_bytes
9064[`u64::to_ne_bytes`]: https://doc.rust-lang.org/stable/std/primitive.u64.html#method.to_ne_bytes
9065[`u8::from_be_bytes`]: https://doc.rust-lang.org/stable/std/primitive.u8.html#method.from_be_bytes
9066[`u8::from_le_bytes`]: https://doc.rust-lang.org/stable/std/primitive.u8.html#method.from_le_bytes
9067[`u8::from_ne_bytes`]: https://doc.rust-lang.org/stable/std/primitive.u8.html#method.from_ne_bytes
9068[`u8::to_be_bytes`]: https://doc.rust-lang.org/stable/std/primitive.u8.html#method.to_be_bytes
9069[`u8::to_le_bytes`]: https://doc.rust-lang.org/stable/std/primitive.u8.html#method.to_le_bytes
9070[`u8::to_ne_bytes`]: https://doc.rust-lang.org/stable/std/primitive.u8.html#method.to_ne_bytes
9071[`usize::from_be_bytes`]: https://doc.rust-lang.org/stable/std/primitive.usize.html#method.from_be_bytes
9072[`usize::from_le_bytes`]: https://doc.rust-lang.org/stable/std/primitive.usize.html#method.from_le_bytes
9073[`usize::from_ne_bytes`]: https://doc.rust-lang.org/stable/std/primitive.usize.html#method.from_ne_bytes
9074[`usize::to_be_bytes`]: https://doc.rust-lang.org/stable/std/primitive.usize.html#method.to_be_bytes
9075[`usize::to_le_bytes`]: https://doc.rust-lang.org/stable/std/primitive.usize.html#method.to_le_bytes
9076[`usize::to_ne_bytes`]: https://doc.rust-lang.org/stable/std/primitive.usize.html#method.to_ne_bytes
9077
9078
9079Version 1.31.1 (2018-12-20)
9080===========================
9081
9082- [Fix Rust failing to build on `powerpc-unknown-netbsd`][56562]
9083- [Fix broken go-to-definition in RLS][rls/1171]
9084- [Fix infinite loop on hover in RLS][rls/1170]
9085
9086[56562]: https://github.com/rust-lang/rust/pull/56562
9087[rls/1171]: https://github.com/rust-lang/rls/issues/1171
9088[rls/1170]: https://github.com/rust-lang/rls/pull/1170
9089
9090Version 1.31.0 (2018-12-06)
9091==========================
9092
9093Language
9094--------
9095- 🎉 [This version marks the release of the 2018 edition of Rust.][54057] 🎉
9096- [New lifetime elision rules now allow for eliding lifetimes in functions and
9097 impl headers.][54778] E.g. `impl<'a> Reader for BufReader<'a> {}` can now be
9098 `impl Reader for BufReader<'_> {}`. Lifetimes are still required to be defined
9099 in structs.
9100- [You can now define and use `const` functions.][54835] These are currently
9101 a strict minimal subset of the [const fn RFC][RFC-911]. Refer to the
9102 [language reference][const-reference] for what exactly is available.
9103- [You can now use tool lints, which allow you to scope lints from external
9104 tools using attributes.][54870] E.g. `#[allow(clippy::filter_map)]`.
9105- [`#[no_mangle]` and `#[export_name]` attributes can now be located anywhere in
9106 a crate, not just in exported functions.][54451]
9107- [You can now use parentheses in pattern matches.][54497]
9108
9109Compiler
9110--------
9111- [Updated musl to 1.1.20][54430]
9112
9113Libraries
9114---------
9115- [You can now convert `num::NonZero*` types to their raw equivalents using the
9116 `From` trait.][54240] E.g. `u8` now implements `From<NonZeroU8>`.
9117- [You can now convert a `&Option<T>` into `Option<&T>` and `&mut Option<T>`
9118 into `Option<&mut T>` using the `From` trait.][53218]
9119- [You can now multiply (`*`) a `time::Duration` by a `u32`.][52813]
9120
9121
9122Stabilized APIs
9123---------------
9124- [`slice::align_to`]
9125- [`slice::align_to_mut`]
9126- [`slice::chunks_exact`]
9127- [`slice::chunks_exact_mut`]
9128- [`slice::rchunks`]
9129- [`slice::rchunks_mut`]
9130- [`slice::rchunks_exact`]
9131- [`slice::rchunks_exact_mut`]
9132- [`Option::replace`]
9133
9134Cargo
9135-----
9136- [Cargo will now download crates in parallel using HTTP/2.][cargo/6005]
9137- [You can now rename packages in your Cargo.toml][cargo/6319] We have a guide
9138 on [how to use the `package` key in your dependencies.][cargo-rename-reference]
9139
9140[52813]: https://github.com/rust-lang/rust/pull/52813/
9141[53218]: https://github.com/rust-lang/rust/pull/53218/
9142[54057]: https://github.com/rust-lang/rust/pull/54057/
9143[54240]: https://github.com/rust-lang/rust/pull/54240/
9144[54430]: https://github.com/rust-lang/rust/pull/54430/
9145[54451]: https://github.com/rust-lang/rust/pull/54451/
9146[54497]: https://github.com/rust-lang/rust/pull/54497/
9147[54778]: https://github.com/rust-lang/rust/pull/54778/
9148[54835]: https://github.com/rust-lang/rust/pull/54835/
9149[54870]: https://github.com/rust-lang/rust/pull/54870/
9150[RFC-911]: https://github.com/rust-lang/rfcs/pull/911
9151[`Option::replace`]: https://doc.rust-lang.org/std/option/enum.Option.html#method.replace
9152[`slice::align_to_mut`]: https://doc.rust-lang.org/std/primitive.slice.html#method.align_to_mut
9153[`slice::align_to`]: https://doc.rust-lang.org/std/primitive.slice.html#method.align_to
9154[`slice::chunks_exact_mut`]: https://doc.rust-lang.org/std/primitive.slice.html#method.chunks_exact_mut
9155[`slice::chunks_exact`]: https://doc.rust-lang.org/std/primitive.slice.html#method.chunks_exact
9156[`slice::rchunks_exact_mut`]: https://doc.rust-lang.org/std/primitive.slice.html#method.rchunks_mut
9157[`slice::rchunks_exact`]: https://doc.rust-lang.org/std/primitive.slice.html#method.rchunks_exact
9158[`slice::rchunks_mut`]: https://doc.rust-lang.org/std/primitive.slice.html#method.rchunks_mut
9159[`slice::rchunks`]: https://doc.rust-lang.org/std/primitive.slice.html#method.rchunks
9160[cargo/6005]: https://github.com/rust-lang/cargo/pull/6005/
9161[cargo/6319]: https://github.com/rust-lang/cargo/pull/6319/
9162[cargo-rename-reference]: https://doc.rust-lang.org/cargo/reference/specifying-dependencies.html#renaming-dependencies-in-cargotoml
9163[const-reference]: https://doc.rust-lang.org/reference/items/functions.html#const-functions
9164
9165Version 1.30.1 (2018-11-08)
9166===========================
9167
9168- [Fixed overflow ICE in rustdoc][54199]
9169- [Cap Cargo progress bar width at 60 in MSYS terminals][cargo/6122]
9170
9171[54199]: https://github.com/rust-lang/rust/pull/54199
9172[cargo/6122]: https://github.com/rust-lang/cargo/pull/6122
9173
9174Version 1.30.0 (2018-10-25)
9175==========================
9176
9177Language
9178--------
9179- [Procedural macros are now available.][52081] These kinds of macros allow for
9180 more powerful code generation. There is a [new chapter available][proc-macros]
9181 in the Rust Programming Language book that goes further in depth.
9182- [You can now use keywords as identifiers using the raw identifiers
9183 syntax (`r#`),][53236] e.g. `let r#for = true;`
9184- [Using anonymous parameters in traits is now deprecated with a warning and
9185 will be a hard error in the 2018 edition.][53272]
9186- [You can now use `crate` in paths.][54404] This allows you to refer to the
9187 crate root in the path, e.g. `use crate::foo;` refers to `foo` in `src/lib.rs`.
9188- [Using a external crate no longer requires being prefixed with `::`.][54404]
9189 Previously, using a external crate in a module without a use statement
9190 required `let json = ::serde_json::from_str(foo);` but can now be written
9191 as `let json = serde_json::from_str(foo);`.
9192- [You can now apply the `#[used]` attribute to static items to prevent the
9193 compiler from optimising them away, even if they appear to be unused,][51363]
9194 e.g. `#[used] static FOO: u32 = 1;`
9195- [You can now import and reexport macros from other crates with the `use`
9196 syntax.][50911] Macros exported with `#[macro_export]` are now placed into
9197 the root module of the crate. If your macro relies on calling other local
9198 macros, it is recommended to export with the
9199 `#[macro_export(local_inner_macros)]` attribute so users won't have to import
9200 those macros.
9201- [You can now catch visibility keywords (e.g. `pub`, `pub(crate)`) in macros
9202 using the `vis` specifier.][53370]
9203- [Non-macro attributes now allow all forms of literals, not just
9204 strings.][53044] Previously, you would write `#[attr("true")]`, and you can now
9205 write `#[attr(true)]`.
9206- [You can now specify a function to handle a panic in the Rust runtime with the
9207 `#[panic_handler]` attribute.][51366]
9208
9209Compiler
9210--------
9211- [Added the `riscv32imc-unknown-none-elf` target.][53822]
9212- [Added the `aarch64-unknown-netbsd` target][53165]
9213- [Upgraded to LLVM 8.][53611]
9214
9215Libraries
9216---------
9217- [`ManuallyDrop` now allows the inner type to be unsized.][53033]
9218
9219Stabilized APIs
9220---------------
9221- [`Ipv4Addr::BROADCAST`]
9222- [`Ipv4Addr::LOCALHOST`]
9223- [`Ipv4Addr::UNSPECIFIED`]
9224- [`Ipv6Addr::LOCALHOST`]
9225- [`Ipv6Addr::UNSPECIFIED`]
9226- [`Iterator::find_map`]
9227
9228 The following methods are replacement methods for `trim_left`, `trim_right`,
9229 `trim_left_matches`, and `trim_right_matches`, which will be deprecated
9230 in 1.33.0:
9231- [`str::trim_end_matches`]
9232- [`str::trim_end`]
9233- [`str::trim_start_matches`]
9234- [`str::trim_start`]
9235
9236Cargo
9237----
9238- [`cargo run` doesn't require specifying a package in workspaces.][cargo/5877]
9239- [`cargo doc` now supports `--message-format=json`.][cargo/5878] This is
9240 equivalent to calling `rustdoc --error-format=json`.
9241- [Cargo will now provide a progress bar for builds.][cargo/5995]
9242
9243Misc
9244----
9245- [`rustdoc` allows you to specify what edition to treat your code as with the
9246 `--edition` option.][54057]
9247- [`rustdoc` now has the `--color` (specify whether to output color) and
9248 `--error-format` (specify error format, e.g. `json`) options.][53003]
9249- [We now distribute a `rust-gdbgui` script that invokes `gdbgui` with Rust
9250 debug symbols.][53774]
9251- [Attributes from Rust tools such as `rustfmt` or `clippy` are now
9252 available,][53459] e.g. `#[rustfmt::skip]` will skip formatting the next item.
9253
9254[50911]: https://github.com/rust-lang/rust/pull/50911/
9255[51363]: https://github.com/rust-lang/rust/pull/51363/
9256[51366]: https://github.com/rust-lang/rust/pull/51366/
9257[52081]: https://github.com/rust-lang/rust/pull/52081/
9258[53003]: https://github.com/rust-lang/rust/pull/53003/
9259[53033]: https://github.com/rust-lang/rust/pull/53033/
9260[53044]: https://github.com/rust-lang/rust/pull/53044/
9261[53165]: https://github.com/rust-lang/rust/pull/53165/
9262[53611]: https://github.com/rust-lang/rust/pull/53611/
9263[53236]: https://github.com/rust-lang/rust/pull/53236/
9264[53272]: https://github.com/rust-lang/rust/pull/53272/
9265[53370]: https://github.com/rust-lang/rust/pull/53370/
9266[53459]: https://github.com/rust-lang/rust/pull/53459/
9267[53774]: https://github.com/rust-lang/rust/pull/53774/
9268[53822]: https://github.com/rust-lang/rust/pull/53822/
9269[54057]: https://github.com/rust-lang/rust/pull/54057/
9270[54404]: https://github.com/rust-lang/rust/pull/54404/
9271[cargo/5877]: https://github.com/rust-lang/cargo/pull/5877/
9272[cargo/5878]: https://github.com/rust-lang/cargo/pull/5878/
9273[cargo/5995]: https://github.com/rust-lang/cargo/pull/5995/
9274[proc-macros]: https://doc.rust-lang.org/nightly/book/2018-edition/ch19-06-macros.html
9275
9276[`Ipv4Addr::BROADCAST`]: https://doc.rust-lang.org/nightly/std/net/struct.Ipv4Addr.html#associatedconstant.BROADCAST
9277[`Ipv4Addr::LOCALHOST`]: https://doc.rust-lang.org/nightly/std/net/struct.Ipv4Addr.html#associatedconstant.LOCALHOST
9278[`Ipv4Addr::UNSPECIFIED`]: https://doc.rust-lang.org/nightly/std/net/struct.Ipv4Addr.html#associatedconstant.UNSPECIFIED
9279[`Ipv6Addr::LOCALHOST`]: https://doc.rust-lang.org/nightly/std/net/struct.Ipv6Addr.html#associatedconstant.LOCALHOST
9280[`Ipv6Addr::UNSPECIFIED`]: https://doc.rust-lang.org/nightly/std/net/struct.Ipv6Addr.html#associatedconstant.UNSPECIFIED
9281[`Iterator::find_map`]: https://doc.rust-lang.org/std/iter/trait.Iterator.html#method.find_map
9282[`str::trim_end_matches`]: https://doc.rust-lang.org/nightly/std/primitive.str.html#method.trim_end_matches
9283[`str::trim_end`]: https://doc.rust-lang.org/nightly/std/primitive.str.html#method.trim_end
9284[`str::trim_start_matches`]: https://doc.rust-lang.org/nightly/std/primitive.str.html#method.trim_start_matches
9285[`str::trim_start`]: https://doc.rust-lang.org/nightly/std/primitive.str.html#method.trim_start
9286
9287
9288Version 1.29.2 (2018-10-11)
9289===========================
9290
9291- [Workaround for an aliasing-related LLVM bug, which caused miscompilation.][54639]
9292- The `rls-preview` component on the windows-gnu targets has been restored.
9293
9294[54639]: https://github.com/rust-lang/rust/pull/54639
9295
9296
9297Version 1.29.1 (2018-09-25)
9298===========================
9299
9300Security Notes
9301--------------
9302
9303- The standard library's `str::repeat` function contained an out of bounds write
9304 caused by an integer overflow. This has been fixed by deterministically
9305 panicking when an overflow happens.
9306
9307 Thank you to Scott McMurray for responsibly disclosing this vulnerability to
9308 us.
9309
9310
9311Version 1.29.0 (2018-09-13)
9312==========================
9313
9314Compiler
9315--------
9316- [Bumped minimum LLVM version to 5.0.][51899]
9317- [Added `powerpc64le-unknown-linux-musl` target.][51619]
9318- [Added `aarch64-unknown-hermit` and `x86_64-unknown-hermit` targets.][52861]
9319- [Upgraded to LLVM 7.][51966]
9320
9321Libraries
9322---------
9323- [`Once::call_once` no longer requires `Once` to be `'static`.][52239]
9324- [`BuildHasherDefault` now implements `PartialEq` and `Eq`.][52402]
9325- [`Box<CStr>`, `Box<OsStr>`, and `Box<Path>` now implement `Clone`.][51912]
9326- [Implemented `PartialEq<&str>` for `OsString` and `PartialEq<OsString>`
9327 for `&str`.][51178]
9328- [`Cell<T>` now allows `T` to be unsized.][50494]
9329- [`SocketAddr` is now stable on Redox.][52656]
9330
9331Stabilized APIs
9332---------------
9333- [`Arc::downcast`]
9334- [`Iterator::flatten`]
9335- [`Rc::downcast`]
9336
9337Cargo
9338-----
9339- [Cargo can silently fix some bad lockfiles.][cargo/5831] You can use
9340 `--locked` to disable this behavior.
9341- [`cargo-install` will now allow you to cross compile an install
9342 using `--target`.][cargo/5614]
9343- [Added the `cargo-fix` subcommand to automatically move project code from
9344 2015 edition to 2018.][cargo/5723]
9345- [`cargo doc` can now optionally document private types using the
9346 `--document-private-items` flag.][cargo/5543]
9347
9348Misc
9349----
9350- [`rustdoc` now has the `--cap-lints` option which demotes all lints above
9351 the specified level to that level.][52354] For example `--cap-lints warn`
9352 will demote `deny` and `forbid` lints to `warn`.
9353- [`rustc` and `rustdoc` will now have the exit code of `1` if compilation
9354 fails and `101` if there is a panic.][52197]
9355- [A preview of clippy has been made available through rustup.][51122]
9356 You can install the preview with `rustup component add clippy-preview`.
9357
9358Compatibility Notes
9359-------------------
9360- [`str::{slice_unchecked, slice_unchecked_mut}` are now deprecated.][51807]
9361 Use `str::get_unchecked(begin..end)` instead.
9362- [`std::env::home_dir` is now deprecated for its unintuitive behavior.][51656]
9363 Consider using the `home_dir` function from
9364 https://crates.io/crates/dirs instead.
9365- [`rustc` will no longer silently ignore invalid data in target spec.][52330]
9366- [`cfg` attributes and `--cfg` command line flags are now more
9367 strictly validated.][53893]
9368
9369[53893]: https://github.com/rust-lang/rust/pull/53893/
9370[52861]: https://github.com/rust-lang/rust/pull/52861/
9371[51966]: https://github.com/rust-lang/rust/pull/51966/
9372[52656]: https://github.com/rust-lang/rust/pull/52656/
9373[52239]: https://github.com/rust-lang/rust/pull/52239/
9374[52330]: https://github.com/rust-lang/rust/pull/52330/
9375[52354]: https://github.com/rust-lang/rust/pull/52354/
9376[52402]: https://github.com/rust-lang/rust/pull/52402/
9377[52197]: https://github.com/rust-lang/rust/pull/52197/
9378[51807]: https://github.com/rust-lang/rust/pull/51807/
9379[51899]: https://github.com/rust-lang/rust/pull/51899/
9380[51912]: https://github.com/rust-lang/rust/pull/51912/
9381[51619]: https://github.com/rust-lang/rust/pull/51619/
9382[51656]: https://github.com/rust-lang/rust/pull/51656/
9383[51178]: https://github.com/rust-lang/rust/pull/51178/
9384[51122]: https://github.com/rust-lang/rust/pull/51122
9385[50494]: https://github.com/rust-lang/rust/pull/50494/
9386[cargo/5543]: https://github.com/rust-lang/cargo/pull/5543
9387[cargo/5614]: https://github.com/rust-lang/cargo/pull/5614/
9388[cargo/5723]: https://github.com/rust-lang/cargo/pull/5723/
9389[cargo/5831]: https://github.com/rust-lang/cargo/pull/5831/
9390[`Arc::downcast`]: https://doc.rust-lang.org/std/sync/struct.Arc.html#method.downcast
9391[`Iterator::flatten`]: https://doc.rust-lang.org/std/iter/trait.Iterator.html#method.flatten
9392[`Rc::downcast`]: https://doc.rust-lang.org/std/rc/struct.Rc.html#method.downcast
9393
9394
9395Version 1.28.0 (2018-08-02)
9396===========================
9397
9398Language
9399--------
9400- [The `#[repr(transparent)]` attribute is now stable.][51562] This attribute
9401 allows a Rust newtype wrapper (`struct NewType<T>(T);`) to be represented as
9402 the inner type across Foreign Function Interface (FFI) boundaries.
9403- [The keywords `pure`, `sizeof`, `alignof`, and `offsetof` have been unreserved
9404 and can now be used as identifiers.][51196]
9405- [The `GlobalAlloc` trait and `#[global_allocator]` attribute are now
9406 stable.][51241] This will allow users to specify a global allocator for
9407 their program.
9408- [Unit test functions marked with the `#[test]` attribute can now return
9409 `Result<(), E: Debug>` in addition to `()`.][51298]
9410- [The `lifetime` specifier for `macro_rules!` is now stable.][50385] This
9411 allows macros to easily target lifetimes.
9412
9413Compiler
9414--------
9415- [The `s` and `z` optimisation levels are now stable.][50265] These optimisations
9416 prioritise making smaller binary sizes. `z` is the same as `s` with the
9417 exception that it does not vectorise loops, which typically results in an even
9418 smaller binary.
9419- [The short error format is now stable.][49546] Specified with
9420 `--error-format=short` this option will provide a more compressed output of
9421 rust error messages.
9422- [Added a lint warning when you have duplicated `macro_export`s.][50143]
9423- [Reduced the number of allocations in the macro parser.][50855] This can
9424 improve compile times of macro heavy crates on average by 5%.
9425
9426Libraries
9427---------
9428- [Implemented `Default` for `&mut str`.][51306]
9429- [Implemented `From<bool>` for all integer and unsigned number types.][50554]
9430- [Implemented `Extend` for `()`.][50234]
9431- [The `Debug` implementation of `time::Duration` should now be more easily
9432 human readable.][50364] Previously a `Duration` of one second would printed as
9433 `Duration { secs: 1, nanos: 0 }` and will now be printed as `1s`.
9434- [Implemented `From<&String>` for `Cow<str>`, `From<&Vec<T>>` for `Cow<[T]>`,
9435 `From<Cow<CStr>>` for `CString`, `From<CString>, From<CStr>, From<&CString>`
9436 for `Cow<CStr>`, `From<OsString>, From<OsStr>, From<&OsString>` for
9437 `Cow<OsStr>`, `From<&PathBuf>` for `Cow<Path>`, and `From<Cow<Path>>`
9438 for `PathBuf`.][50170]
9439- [Implemented `Shl` and `Shr` for `Wrapping<u128>`
9440 and `Wrapping<i128>`.][50465]
9441- [`DirEntry::metadata` now uses `fstatat` instead of `lstat` when
9442 possible.][51050] This can provide up to a 40% speed increase.
9443- [Improved error messages when using `format!`.][50610]
9444
9445Stabilized APIs
9446---------------
9447- [`Iterator::step_by`]
9448- [`Path::ancestors`]
9449- [`SystemTime::UNIX_EPOCH`]
9450- [`alloc::GlobalAlloc`]
9451- [`alloc::Layout`]
9452- [`alloc::LayoutErr`]
9453- [`alloc::System`]
9454- [`alloc::alloc`]
9455- [`alloc::alloc_zeroed`]
9456- [`alloc::dealloc`]
9457- [`alloc::realloc`]
9458- [`alloc::handle_alloc_error`]
9459- [`btree_map::Entry::or_default`]
9460- [`fmt::Alignment`]
9461- [`hash_map::Entry::or_default`]
9462- [`iter::repeat_with`]
9463- [`num::NonZeroUsize`]
9464- [`num::NonZeroU128`]
9465- [`num::NonZeroU16`]
9466- [`num::NonZeroU32`]
9467- [`num::NonZeroU64`]
9468- [`num::NonZeroU8`]
9469- [`ops::RangeBounds`]
9470- [`slice::SliceIndex`]
9471- [`slice::from_mut`]
9472- [`slice::from_ref`]
9473- [`{Any + Send + Sync}::downcast_mut`]
9474- [`{Any + Send + Sync}::downcast_ref`]
9475- [`{Any + Send + Sync}::is`]
9476
9477Cargo
9478-----
9479- [Cargo will now no longer allow you to publish crates with build scripts that
9480 modify the `src` directory.][cargo/5584] The `src` directory in a crate should be
9481 considered to be immutable.
9482
9483Misc
9484----
9485- [The `suggestion_applicability` field in `rustc`'s json output is now
9486 stable.][50486] This will allow dev tools to check whether a code suggestion
9487 would apply to them.
9488
9489Compatibility Notes
9490-------------------
9491- [Rust will consider trait objects with duplicated constraints to be the same
9492 type as without the duplicated constraint.][51276] For example the below code will
9493 now fail to compile.
9494 ```rust
9495 trait Trait {}
9496
9497 impl Trait + Send {
9498 fn test(&self) { println!("one"); } //~ ERROR duplicate definitions with name `test`
9499 }
9500
9501 impl Trait + Send + Send {
9502 fn test(&self) { println!("two"); }
9503 }
9504 ```
9505
9506[49546]: https://github.com/rust-lang/rust/pull/49546/
9507[50143]: https://github.com/rust-lang/rust/pull/50143/
9508[50170]: https://github.com/rust-lang/rust/pull/50170/
9509[50234]: https://github.com/rust-lang/rust/pull/50234/
9510[50265]: https://github.com/rust-lang/rust/pull/50265/
9511[50364]: https://github.com/rust-lang/rust/pull/50364/
9512[50385]: https://github.com/rust-lang/rust/pull/50385/
9513[50465]: https://github.com/rust-lang/rust/pull/50465/
9514[50486]: https://github.com/rust-lang/rust/pull/50486/
9515[50554]: https://github.com/rust-lang/rust/pull/50554/
9516[50610]: https://github.com/rust-lang/rust/pull/50610/
9517[50855]: https://github.com/rust-lang/rust/pull/50855/
9518[51050]: https://github.com/rust-lang/rust/pull/51050/
9519[51196]: https://github.com/rust-lang/rust/pull/51196/
9520[51241]: https://github.com/rust-lang/rust/pull/51241/
9521[51276]: https://github.com/rust-lang/rust/pull/51276/
9522[51298]: https://github.com/rust-lang/rust/pull/51298/
9523[51306]: https://github.com/rust-lang/rust/pull/51306/
9524[51562]: https://github.com/rust-lang/rust/pull/51562/
9525[cargo/5584]: https://github.com/rust-lang/cargo/pull/5584/
9526[`Iterator::step_by`]: https://doc.rust-lang.org/std/iter/trait.Iterator.html#method.step_by
9527[`Path::ancestors`]: https://doc.rust-lang.org/std/path/struct.Path.html#method.ancestors
9528[`SystemTime::UNIX_EPOCH`]: https://doc.rust-lang.org/std/time/struct.SystemTime.html#associatedconstant.UNIX_EPOCH
9529[`alloc::GlobalAlloc`]: https://doc.rust-lang.org/std/alloc/trait.GlobalAlloc.html
9530[`alloc::Layout`]: https://doc.rust-lang.org/std/alloc/struct.Layout.html
9531[`alloc::LayoutErr`]: https://doc.rust-lang.org/std/alloc/struct.LayoutErr.html
9532[`alloc::System`]: https://doc.rust-lang.org/std/alloc/struct.System.html
9533[`alloc::alloc`]: https://doc.rust-lang.org/std/alloc/fn.alloc.html
9534[`alloc::alloc_zeroed`]: https://doc.rust-lang.org/std/alloc/fn.alloc_zeroed.html
9535[`alloc::dealloc`]: https://doc.rust-lang.org/std/alloc/fn.dealloc.html
9536[`alloc::realloc`]: https://doc.rust-lang.org/std/alloc/fn.realloc.html
9537[`alloc::handle_alloc_error`]: https://doc.rust-lang.org/std/alloc/fn.handle_alloc_error.html
9538[`btree_map::Entry::or_default`]: https://doc.rust-lang.org/std/collections/btree_map/enum.Entry.html#method.or_default
9539[`fmt::Alignment`]: https://doc.rust-lang.org/std/fmt/enum.Alignment.html
9540[`hash_map::Entry::or_default`]: https://doc.rust-lang.org/std/collections/hash_map/enum.Entry.html#method.or_default
9541[`iter::repeat_with`]: https://doc.rust-lang.org/std/iter/fn.repeat_with.html
9542[`num::NonZeroUsize`]: https://doc.rust-lang.org/std/num/struct.NonZeroUsize.html
9543[`num::NonZeroU128`]: https://doc.rust-lang.org/std/num/struct.NonZeroU128.html
9544[`num::NonZeroU16`]: https://doc.rust-lang.org/std/num/struct.NonZeroU16.html
9545[`num::NonZeroU32`]: https://doc.rust-lang.org/std/num/struct.NonZeroU32.html
9546[`num::NonZeroU64`]: https://doc.rust-lang.org/std/num/struct.NonZeroU64.html
9547[`num::NonZeroU8`]: https://doc.rust-lang.org/std/num/struct.NonZeroU8.html
9548[`ops::RangeBounds`]: https://doc.rust-lang.org/std/ops/trait.RangeBounds.html
9549[`slice::SliceIndex`]: https://doc.rust-lang.org/std/slice/trait.SliceIndex.html
9550[`slice::from_mut`]: https://doc.rust-lang.org/std/slice/fn.from_mut.html
9551[`slice::from_ref`]: https://doc.rust-lang.org/std/slice/fn.from_ref.html
9552[`{Any + Send + Sync}::downcast_mut`]: https://doc.rust-lang.org/std/any/trait.Any.html#method.downcast_mut-2
9553[`{Any + Send + Sync}::downcast_ref`]: https://doc.rust-lang.org/std/any/trait.Any.html#method.downcast_ref-2
9554[`{Any + Send + Sync}::is`]: https://doc.rust-lang.org/std/any/trait.Any.html#method.is-2
9555
9556Version 1.27.2 (2018-07-20)
9557===========================
9558
9559Compatibility Notes
9560-------------------
9561
9562- The borrow checker was fixed to avoid potential unsoundness when using
9563 match ergonomics: [#52213][52213].
9564
9565[52213]: https://github.com/rust-lang/rust/issues/52213
9566
9567Version 1.27.1 (2018-07-10)
9568===========================
9569
9570Security Notes
9571--------------
9572
9573- rustdoc would execute plugins in the /tmp/rustdoc/plugins directory
9574 when running, which enabled executing code as some other user on a
9575 given machine. This release fixes that vulnerability; you can read
9576 more about this on the [blog][rustdoc-sec]. The associated CVE is [CVE-2018-1000622].
9577
9578 Thank you to Red Hat for responsibly disclosing this vulnerability to us.
9579
9580Compatibility Notes
9581-------------------
9582
9583- The borrow checker was fixed to avoid an additional potential unsoundness when using
9584 match ergonomics: [#51415][51415], [#49534][49534].
9585
9586[51415]: https://github.com/rust-lang/rust/issues/51415
9587[49534]: https://github.com/rust-lang/rust/issues/49534
9588[rustdoc-sec]: https://blog.rust-lang.org/2018/07/06/security-advisory-for-rustdoc.html
9589[CVE-2018-1000622]: https://cve.mitre.org/cgi-bin/cvename.cgi?name=%20CVE-2018-1000622
9590
9591Version 1.27.0 (2018-06-21)
9592==========================
9593
9594Language
9595--------
9596- [Removed 'proc' from the reserved keywords list.][49699] This allows `proc` to
9597 be used as an identifier.
9598- [The dyn syntax is now available.][49968] This syntax is equivalent to the
9599 bare `Trait` syntax, and should make it clearer when being used in tandem with
9600 `impl Trait` because it is equivalent to the following syntax:
9601 `&Trait == &dyn Trait`, `&mut Trait == &mut dyn Trait`, and
9602 `Box<Trait> == Box<dyn Trait>`.
9603- [Attributes on generic parameters such as types and lifetimes are
9604 now stable.][48851] e.g.
9605 `fn foo<#[lifetime_attr] 'a, #[type_attr] T: 'a>() {}`
9606- [The `#[must_use]` attribute can now also be used on functions as well as
9607 types.][48925] It provides a lint that by default warns users when the
9608 value returned by a function has not been used.
9609
9610Compiler
9611--------
9612- [Added the `armv5te-unknown-linux-musleabi` target.][50423]
9613
9614Libraries
9615---------
9616- [SIMD (Single Instruction Multiple Data) on x86/x86_64 is now stable.][49664]
9617 This includes [`arch::x86`] & [`arch::x86_64`] modules which contain
9618 SIMD intrinsics, a new macro called `is_x86_feature_detected!`, the
9619 `#[target_feature(enable="")]` attribute, and adding `target_feature = ""` to
9620 the `cfg` attribute.
9621- [A lot of methods for `[u8]`, `f32`, and `f64` previously only available in
9622 std are now available in core.][49896]
9623- [The generic `Rhs` type parameter on `ops::{Shl, ShlAssign, Shr}` now defaults
9624 to `Self`.][49630]
9625- [`std::str::replace` now has the `#[must_use]` attribute][50177] to clarify
9626 that the operation isn't done in place.
9627- [`Clone::clone`, `Iterator::collect`, and `ToOwned::to_owned` now have
9628 the `#[must_use]` attribute][49533] to warn about unused potentially
9629 expensive allocations.
9630
9631Stabilized APIs
9632---------------
9633- [`DoubleEndedIterator::rfind`]
9634- [`DoubleEndedIterator::rfold`]
9635- [`DoubleEndedIterator::try_rfold`]
9636- [`Duration::from_micros`]
9637- [`Duration::from_nanos`]
9638- [`Duration::subsec_micros`]
9639- [`Duration::subsec_millis`]
9640- [`HashMap::remove_entry`]
9641- [`Iterator::try_fold`]
9642- [`Iterator::try_for_each`]
9643- [`NonNull::cast`]
9644- [`Option::filter`]
9645- [`String::replace_range`]
9646- [`Take::set_limit`]
9647- [`hint::unreachable_unchecked`]
9648- [`os::unix::process::parent_id`]
9649- [`ptr::swap_nonoverlapping`]
9650- [`slice::rsplit_mut`]
9651- [`slice::rsplit`]
9652- [`slice::swap_with_slice`]
9653
9654Cargo
9655-----
9656- [`cargo-metadata` now includes `authors`, `categories`, `keywords`,
9657 `readme`, and `repository` fields.][cargo/5386]
9658- [`cargo-metadata` now includes a package's `metadata` table.][cargo/5360]
9659- [Added the `--target-dir` optional argument.][cargo/5393] This allows you to specify
9660 a different directory than `target` for placing compilation artifacts.
9661- [Cargo will be adding automatic target inference for binaries, benchmarks,
9662 examples, and tests in the Rust 2018 edition.][cargo/5335] If your project specifies
9663 specific targets, e.g. using `[[bin]]`, and have other binaries in locations
9664 where cargo would infer a binary, Cargo will produce a warning. You can
9665 disable this feature ahead of time by setting any of the following to false:
9666 `autobins`, `autobenches`, `autoexamples`, `autotests`.
9667- [Cargo will now cache compiler information.][cargo/5359] This can be disabled by
9668 setting `CARGO_CACHE_RUSTC_INFO=0` in your environment.
9669
9670Misc
9671----
9672- [Added “The Rustc book” into the official documentation.][49707]
9673 [“The Rustc book”] documents and teaches how to use the rustc compiler.
9674- [All books available on `doc.rust-lang.org` are now searchable.][49623]
9675
9676Compatibility Notes
9677-------------------
9678- [Calling a `CharExt` or `StrExt` method directly on core will no longer
9679 work.][49896] e.g. `::core::prelude::v1::StrExt::is_empty("")` will not
9680 compile, `"".is_empty()` will still compile.
9681- [`Debug` output on `atomic::{AtomicBool, AtomicIsize, AtomicPtr, AtomicUsize}`
9682 will only print the inner type.][48553] E.g.
9683 `print!("{:?}", AtomicBool::new(true))` will print `true`,
9684 not `AtomicBool(true)`.
9685- [The maximum number for `repr(align(N))` is now 2²⁹.][50378] Previously you
9686 could enter higher numbers but they were not supported by LLVM. Up to 512MB
9687 alignment should cover all use cases.
9688- The `.description()` method on the `std::error::Error` trait
9689 [has been soft-deprecated][50163]. It is no longer required to implement it.
9690
9691[48553]: https://github.com/rust-lang/rust/pull/48553/
9692[48851]: https://github.com/rust-lang/rust/pull/48851/
9693[48925]: https://github.com/rust-lang/rust/pull/48925/
9694[49533]: https://github.com/rust-lang/rust/pull/49533/
9695[49623]: https://github.com/rust-lang/rust/pull/49623/
9696[49630]: https://github.com/rust-lang/rust/pull/49630/
9697[49664]: https://github.com/rust-lang/rust/pull/49664/
9698[49699]: https://github.com/rust-lang/rust/pull/49699/
9699[49707]: https://github.com/rust-lang/rust/pull/49707/
9700[49896]: https://github.com/rust-lang/rust/pull/49896/
9701[49968]: https://github.com/rust-lang/rust/pull/49968/
9702[50163]: https://github.com/rust-lang/rust/pull/50163
9703[50177]: https://github.com/rust-lang/rust/pull/50177/
9704[50378]: https://github.com/rust-lang/rust/pull/50378/
9705[50423]: https://github.com/rust-lang/rust/pull/50423/
9706[cargo/5335]: https://github.com/rust-lang/cargo/pull/5335/
9707[cargo/5359]: https://github.com/rust-lang/cargo/pull/5359/
9708[cargo/5360]: https://github.com/rust-lang/cargo/pull/5360/
9709[cargo/5386]: https://github.com/rust-lang/cargo/pull/5386/
9710[cargo/5393]: https://github.com/rust-lang/cargo/pull/5393/
9711[`DoubleEndedIterator::rfind`]: https://doc.rust-lang.org/std/iter/trait.DoubleEndedIterator.html#method.rfind
9712[`DoubleEndedIterator::rfold`]: https://doc.rust-lang.org/std/iter/trait.DoubleEndedIterator.html#method.rfold
9713[`DoubleEndedIterator::try_rfold`]: https://doc.rust-lang.org/std/iter/trait.DoubleEndedIterator.html#method.try_rfold
9714[`Duration::from_micros`]: https://doc.rust-lang.org/std/time/struct.Duration.html#method.from_micros
9715[`Duration::from_nanos`]: https://doc.rust-lang.org/std/time/struct.Duration.html#method.from_nanos
9716[`Duration::subsec_micros`]: https://doc.rust-lang.org/std/time/struct.Duration.html#method.subsec_micros
9717[`Duration::subsec_millis`]: https://doc.rust-lang.org/std/time/struct.Duration.html#method.subsec_millis
9718[`HashMap::remove_entry`]: https://doc.rust-lang.org/std/collections/struct.HashMap.html#method.remove_entry
9719[`Iterator::try_fold`]: https://doc.rust-lang.org/std/iter/trait.Iterator.html#method.try_fold
9720[`Iterator::try_for_each`]: https://doc.rust-lang.org/std/iter/trait.Iterator.html#method.try_for_each
9721[`NonNull::cast`]: https://doc.rust-lang.org/std/ptr/struct.NonNull.html#method.cast
9722[`Option::filter`]: https://doc.rust-lang.org/std/option/enum.Option.html#method.filter
9723[`String::replace_range`]: https://doc.rust-lang.org/std/string/struct.String.html#method.replace_range
9724[`Take::set_limit`]: https://doc.rust-lang.org/std/io/struct.Take.html#method.set_limit
9725[`hint::unreachable_unchecked`]: https://doc.rust-lang.org/std/hint/fn.unreachable_unchecked.html
9726[`os::unix::process::parent_id`]: https://doc.rust-lang.org/std/os/unix/process/fn.parent_id.html
9727[`process::id`]: https://doc.rust-lang.org/std/process/fn.id.html
9728[`ptr::swap_nonoverlapping`]: https://doc.rust-lang.org/std/ptr/fn.swap_nonoverlapping.html
9729[`slice::rsplit_mut`]: https://doc.rust-lang.org/std/primitive.slice.html#method.rsplit_mut
9730[`slice::rsplit`]: https://doc.rust-lang.org/std/primitive.slice.html#method.rsplit
9731[`slice::swap_with_slice`]: https://doc.rust-lang.org/std/primitive.slice.html#method.swap_with_slice
9732[`arch::x86_64`]: https://doc.rust-lang.org/std/arch/x86_64/index.html
9733[`arch::x86`]: https://doc.rust-lang.org/std/arch/x86/index.html
9734[“The Rustc book”]: https://doc.rust-lang.org/rustc
9735
9736
9737Version 1.26.2 (2018-06-05)
9738==========================
9739
9740Compatibility Notes
9741-------------------
9742
9743- [The borrow checker was fixed to avoid unsoundness when using match ergonomics.][51117]
9744
9745[51117]: https://github.com/rust-lang/rust/issues/51117
9746
9747
9748Version 1.26.1 (2018-05-29)
9749==========================
9750
9751Tools
9752-----
9753
9754- [RLS now works on Windows.][50646]
9755- [Rustfmt stopped badly formatting text in some cases.][rustfmt/2695]
9756
9757
9758Compatibility Notes
9759--------
9760
9761- [`fn main() -> impl Trait` no longer works for non-Termination
9762 trait.][50656]
9763 This reverts an accidental stabilization.
9764- [`NaN > NaN` no longer returns true in const-fn contexts.][50812]
9765- [Prohibit using turbofish for `impl Trait` in method arguments.][50950]
9766
9767[50646]: https://github.com/rust-lang/rust/issues/50646
9768[50656]: https://github.com/rust-lang/rust/pull/50656
9769[50812]: https://github.com/rust-lang/rust/pull/50812
9770[50950]: https://github.com/rust-lang/rust/issues/50950
9771[rustfmt/2695]: https://github.com/rust-lang-nursery/rustfmt/issues/2695
9772
9773Version 1.26.0 (2018-05-10)
9774==========================
9775
9776Language
9777--------
9778- [Closures now implement `Copy` and/or `Clone` if all captured variables
9779 implement either or both traits.][49299]
9780- [The inclusive range syntax e.g. `for x in 0..=10` is now stable.][47813]
9781- [The `'_` lifetime is now stable. The underscore lifetime can be used anywhere a
9782 lifetime can be elided.][49458]
9783- [`impl Trait` is now stable allowing you to have abstract types in returns
9784 or in function parameters.][49255] E.g. `fn foo() -> impl Iterator<Item=u8>` or
9785 `fn open(path: impl AsRef<Path>)`.
9786- [Pattern matching will now automatically apply dereferences.][49394]
9787- [128-bit integers in the form of `u128` and `i128` are now stable.][49101]
9788- [`main` can now return `Result<(), E: Debug>`][49162] in addition to `()`.
9789- [A lot of operations are now available in a const context.][46882] E.g. You
9790 can now index into constant arrays, reference and dereference into constants,
9791 and use tuple struct constructors.
9792- [Fixed entry slice patterns are now stable.][48516] E.g.
9793 ```rust
9794 let points = [1, 2, 3, 4];
9795 match points {
9796 [1, 2, 3, 4] => println!("All points were sequential."),
9797 _ => println!("Not all points were sequential."),
9798 }
9799 ```
9800
9801
9802Compiler
9803--------
9804- [LLD is now used as the default linker for `wasm32-unknown-unknown`.][48125]
9805- [Fixed exponential projection complexity on nested types.][48296]
9806 This can provide up to a ~12% reduction in compile times for certain crates.
9807- [Added the `--remap-path-prefix` option to rustc.][48359] Allowing you
9808 to remap path prefixes outputted by the compiler.
9809- [Added `powerpc-unknown-netbsd` target.][48281]
9810
9811Libraries
9812---------
9813- [Implemented `From<u16> for usize` & `From<{u8, i16}> for isize`.][49305]
9814- [Added hexadecimal formatting for integers with fmt::Debug][48978]
9815 e.g. `assert!(format!("{:02x?}", b"Foo\0") == "[46, 6f, 6f, 00]")`
9816- [Implemented `Default, Hash` for `cmp::Reverse`.][48628]
9817- [Optimized `str::repeat` being 8x faster in large cases.][48657]
9818- [`ascii::escape_default` is now available in libcore.][48735]
9819- [Trailing commas are now supported in std and core macros.][48056]
9820- [Implemented `Copy, Clone` for `cmp::Reverse`][47379]
9821- [Implemented `Clone` for `char::{ToLowercase, ToUppercase}`.][48629]
9822
9823Stabilized APIs
9824---------------
9825- [`*const T::add`]
9826- [`*const T::copy_to_nonoverlapping`]
9827- [`*const T::copy_to`]
9828- [`*const T::read_unaligned`]
9829- [`*const T::read_volatile`]
9830- [`*const T::read`]
9831- [`*const T::sub`]
9832- [`*const T::wrapping_add`]
9833- [`*const T::wrapping_sub`]
9834- [`*mut T::add`]
9835- [`*mut T::copy_to_nonoverlapping`]
9836- [`*mut T::copy_to`]
9837- [`*mut T::read_unaligned`]
9838- [`*mut T::read_volatile`]
9839- [`*mut T::read`]
9840- [`*mut T::replace`]
9841- [`*mut T::sub`]
9842- [`*mut T::swap`]
9843- [`*mut T::wrapping_add`]
9844- [`*mut T::wrapping_sub`]
9845- [`*mut T::write_bytes`]
9846- [`*mut T::write_unaligned`]
9847- [`*mut T::write_volatile`]
9848- [`*mut T::write`]
9849- [`Box::leak`]
9850- [`FromUtf8Error::as_bytes`]
9851- [`LocalKey::try_with`]
9852- [`Option::cloned`]
9853- [`btree_map::Entry::and_modify`]
9854- [`fs::read_to_string`]
9855- [`fs::read`]
9856- [`fs::write`]
9857- [`hash_map::Entry::and_modify`]
9858- [`iter::FusedIterator`]
9859- [`ops::RangeInclusive`]
9860- [`ops::RangeToInclusive`]
9861- [`process::id`]
9862- [`slice::rotate_left`]
9863- [`slice::rotate_right`]
9864- [`String::retain`]
9865
9866
9867Cargo
9868-----
9869- [Cargo will now output path to custom commands when `-v` is
9870 passed with `--list`][cargo/5041]
9871- [The Cargo binary version is now the same as the Rust version][cargo/5083]
9872
9873Misc
9874----
9875- [The second edition of "The Rust Programming Language" book is now recommended
9876 over the first.][48404]
9877
9878Compatibility Notes
9879-------------------
9880
9881- [aliasing a `Fn` trait as `dyn` no longer works.][48481] E.g. the following
9882 syntax is now invalid.
9883 ```
9884 use std::ops::Fn as dyn;
9885 fn g(_: Box<dyn(std::fmt::Debug)>) {}
9886 ```
9887- [The result of dereferences are no longer promoted to `'static`.][47408]
9888 e.g.
9889 ```rust
9890 fn main() {
9891 const PAIR: &(i32, i32) = &(0, 1);
9892 let _reversed_pair: &'static _ = &(PAIR.1, PAIR.0); // Doesn't work
9893 }
9894 ```
9895- [Deprecate `AsciiExt` trait in favor of inherent methods.][49109]
9896- [`".e0"` will now no longer parse as `0.0` and will instead cause
9897 an error.][48235]
9898- [Removed hoedown from rustdoc.][48274]
9899- [Bounds on higher-kinded lifetimes a hard error.][48326]
9900
9901[46882]: https://github.com/rust-lang/rust/pull/46882
9902[47379]: https://github.com/rust-lang/rust/pull/47379
9903[47408]: https://github.com/rust-lang/rust/pull/47408
9904[47813]: https://github.com/rust-lang/rust/pull/47813
9905[48056]: https://github.com/rust-lang/rust/pull/48056
9906[48125]: https://github.com/rust-lang/rust/pull/48125
9907[48235]: https://github.com/rust-lang/rust/pull/48235
9908[48274]: https://github.com/rust-lang/rust/pull/48274
9909[48281]: https://github.com/rust-lang/rust/pull/48281
9910[48296]: https://github.com/rust-lang/rust/pull/48296
9911[48326]: https://github.com/rust-lang/rust/pull/48326
9912[48359]: https://github.com/rust-lang/rust/pull/48359
9913[48404]: https://github.com/rust-lang/rust/pull/48404
9914[48481]: https://github.com/rust-lang/rust/pull/48481
9915[48516]: https://github.com/rust-lang/rust/pull/48516
9916[48628]: https://github.com/rust-lang/rust/pull/48628
9917[48629]: https://github.com/rust-lang/rust/pull/48629
9918[48657]: https://github.com/rust-lang/rust/pull/48657
9919[48735]: https://github.com/rust-lang/rust/pull/48735
9920[48978]: https://github.com/rust-lang/rust/pull/48978
9921[49101]: https://github.com/rust-lang/rust/pull/49101
9922[49109]: https://github.com/rust-lang/rust/pull/49109
9923[49162]: https://github.com/rust-lang/rust/pull/49162
9924[49255]: https://github.com/rust-lang/rust/pull/49255
9925[49299]: https://github.com/rust-lang/rust/pull/49299
9926[49305]: https://github.com/rust-lang/rust/pull/49305
9927[49394]: https://github.com/rust-lang/rust/pull/49394
9928[49458]: https://github.com/rust-lang/rust/pull/49458
9929[`*const T::add`]: https://doc.rust-lang.org/std/primitive.pointer.html#method.add
9930[`*const T::copy_to_nonoverlapping`]: https://doc.rust-lang.org/std/primitive.pointer.html#method.copy_to_nonoverlapping
9931[`*const T::copy_to`]: https://doc.rust-lang.org/std/primitive.pointer.html#method.copy_to
9932[`*const T::read_unaligned`]: https://doc.rust-lang.org/std/primitive.pointer.html#method.read_unaligned
9933[`*const T::read_volatile`]: https://doc.rust-lang.org/std/primitive.pointer.html#method.read_volatile
9934[`*const T::read`]: https://doc.rust-lang.org/std/primitive.pointer.html#method.read
9935[`*const T::sub`]: https://doc.rust-lang.org/std/primitive.pointer.html#method.sub
9936[`*const T::wrapping_add`]: https://doc.rust-lang.org/std/primitive.pointer.html#method.wrapping_add
9937[`*const T::wrapping_sub`]: https://doc.rust-lang.org/std/primitive.pointer.html#method.wrapping_sub
9938[`*mut T::add`]: https://doc.rust-lang.org/std/primitive.pointer.html#method.add-1
9939[`*mut T::copy_to_nonoverlapping`]: https://doc.rust-lang.org/std/primitive.pointer.html#method.copy_to_nonoverlapping-1
9940[`*mut T::copy_to`]: https://doc.rust-lang.org/std/primitive.pointer.html#method.copy_to-1
9941[`*mut T::read_unaligned`]: https://doc.rust-lang.org/std/primitive.pointer.html#method.read_unaligned-1
9942[`*mut T::read_volatile`]: https://doc.rust-lang.org/std/primitive.pointer.html#method.read_volatile-1
9943[`*mut T::read`]: https://doc.rust-lang.org/std/primitive.pointer.html#method.read-1
9944[`*mut T::replace`]: https://doc.rust-lang.org/std/primitive.pointer.html#method.replace
9945[`*mut T::sub`]: https://doc.rust-lang.org/std/primitive.pointer.html#method.sub-1
9946[`*mut T::swap`]: https://doc.rust-lang.org/std/primitive.pointer.html#method.swap
9947[`*mut T::wrapping_add`]: https://doc.rust-lang.org/std/primitive.pointer.html#method.wrapping_add-1
9948[`*mut T::wrapping_sub`]: https://doc.rust-lang.org/std/primitive.pointer.html#method.wrapping_sub-1
9949[`*mut T::write_bytes`]: https://doc.rust-lang.org/std/primitive.pointer.html#method.write_bytes
9950[`*mut T::write_unaligned`]: https://doc.rust-lang.org/std/primitive.pointer.html#method.write_unaligned
9951[`*mut T::write_volatile`]: https://doc.rust-lang.org/std/primitive.pointer.html#method.write_volatile
9952[`*mut T::write`]: https://doc.rust-lang.org/std/primitive.pointer.html#method.write
9953[`Box::leak`]: https://doc.rust-lang.org/std/boxed/struct.Box.html#method.leak
9954[`FromUtf8Error::as_bytes`]: https://doc.rust-lang.org/std/string/struct.FromUtf8Error.html#method.as_bytes
9955[`LocalKey::try_with`]: https://doc.rust-lang.org/std/thread/struct.LocalKey.html#method.try_with
9956[`Option::cloned`]: https://doc.rust-lang.org/std/option/enum.Option.html#method.cloned
9957[`btree_map::Entry::and_modify`]: https://doc.rust-lang.org/std/collections/btree_map/enum.Entry.html#method.and_modify
9958[`fs::read_to_string`]: https://doc.rust-lang.org/std/fs/fn.read_to_string.html
9959[`fs::read`]: https://doc.rust-lang.org/std/fs/fn.read.html
9960[`fs::write`]: https://doc.rust-lang.org/std/fs/fn.write.html
9961[`hash_map::Entry::and_modify`]: https://doc.rust-lang.org/std/collections/hash_map/enum.Entry.html#method.and_modify
9962[`iter::FusedIterator`]: https://doc.rust-lang.org/std/iter/trait.FusedIterator.html
9963[`ops::RangeInclusive`]: https://doc.rust-lang.org/std/ops/struct.RangeInclusive.html
9964[`ops::RangeToInclusive`]: https://doc.rust-lang.org/std/ops/struct.RangeToInclusive.html
9965[`process::id`]: https://doc.rust-lang.org/std/process/fn.id.html
9966[`slice::rotate_left`]: https://doc.rust-lang.org/std/primitive.slice.html#method.rotate_left
9967[`slice::rotate_right`]: https://doc.rust-lang.org/std/primitive.slice.html#method.rotate_right
9968[`String::retain`]: https://doc.rust-lang.org/std/string/struct.String.html#method.retain
9969[cargo/5041]: https://github.com/rust-lang/cargo/pull/5041
9970[cargo/5083]: https://github.com/rust-lang/cargo/pull/5083
9971
9972
9973Version 1.25.0 (2018-03-29)
9974==========================
9975
9976Language
9977--------
9978- [The `#[repr(align(x))]` attribute is now stable.][47006] [RFC 1358]
9979- [You can now use nested groups of imports.][47948]
9980 e.g. `use std::{fs::File, io::Read, path::{Path, PathBuf}};`
9981- [You can now have `|` at the start of a match arm.][47947] e.g.
9982```rust
9983enum Foo { A, B, C }
9984
9985fn main() {
9986 let x = Foo::A;
9987 match x {
9988 | Foo::A
9989 | Foo::B => println!("AB"),
9990 | Foo::C => println!("C"),
9991 }
9992}
9993```
9994
9995Compiler
9996--------
9997- [Upgraded to LLVM 6.][47828]
9998- [Added `-C lto=val` option.][47521]
9999- [Added `i586-unknown-linux-musl` target][47282]
10000
10001Libraries
10002---------
10003- [Impl Send for `process::Command` on Unix.][47760]
10004- [Impl PartialEq and Eq for `ParseCharError`.][47790]
10005- [`UnsafeCell::into_inner` is now safe.][47204]
10006- [Implement libstd for CloudABI.][47268]
10007- [`Float::{from_bits, to_bits}` is now available in libcore.][46931]
10008- [Implement `AsRef<Path>` for Component][46985]
10009- [Implemented `Write` for `Cursor<&mut Vec<u8>>`][46830]
10010- [Moved `Duration` to libcore.][46666]
10011
10012Stabilized APIs
10013---------------
10014- [`Location::column`]
10015- [`ptr::NonNull`]
10016
10017The following functions can now be used in a constant expression.
10018eg. `static MINUTE: Duration = Duration::from_secs(60);`
10019- [`Duration::new`][47300]
10020- [`Duration::from_secs`][47300]
10021- [`Duration::from_millis`][47300]
10022
10023Cargo
10024-----
10025- [`cargo new` no longer removes `rust` or `rs` prefixes/suffixes.][cargo/5013]
10026- [`cargo new` now defaults to creating a binary crate, instead of a
10027 library crate.][cargo/5029]
10028
10029Misc
10030----
10031- [Rust by example is now shipped with new releases][46196]
10032
10033Compatibility Notes
10034-------------------
10035- [Deprecated `net::lookup_host`.][47510]
10036- [`rustdoc` has switched to pulldown as the default markdown renderer.][47398]
10037- The borrow checker was sometimes incorrectly permitting overlapping borrows
10038 around indexing operations (see [#47349][47349]). This has been fixed (which also
10039 enabled some correct code that used to cause errors (e.g. [#33903][33903] and [#46095][46095]).
10040- [Removed deprecated unstable attribute `#[simd]`.][47251]
10041
10042[33903]: https://github.com/rust-lang/rust/pull/33903
10043[47947]: https://github.com/rust-lang/rust/pull/47947
10044[47948]: https://github.com/rust-lang/rust/pull/47948
10045[47760]: https://github.com/rust-lang/rust/pull/47760
10046[47790]: https://github.com/rust-lang/rust/pull/47790
10047[47828]: https://github.com/rust-lang/rust/pull/47828
10048[47398]: https://github.com/rust-lang/rust/pull/47398
10049[47510]: https://github.com/rust-lang/rust/pull/47510
10050[47521]: https://github.com/rust-lang/rust/pull/47521
10051[47204]: https://github.com/rust-lang/rust/pull/47204
10052[47251]: https://github.com/rust-lang/rust/pull/47251
10053[47268]: https://github.com/rust-lang/rust/pull/47268
10054[47282]: https://github.com/rust-lang/rust/pull/47282
10055[47300]: https://github.com/rust-lang/rust/pull/47300
10056[47349]: https://github.com/rust-lang/rust/pull/47349
10057[46931]: https://github.com/rust-lang/rust/pull/46931
10058[46985]: https://github.com/rust-lang/rust/pull/46985
10059[47006]: https://github.com/rust-lang/rust/pull/47006
10060[46830]: https://github.com/rust-lang/rust/pull/46830
10061[46095]: https://github.com/rust-lang/rust/pull/46095
10062[46666]: https://github.com/rust-lang/rust/pull/46666
10063[46196]: https://github.com/rust-lang/rust/pull/46196
10064[cargo/5013]: https://github.com/rust-lang/cargo/pull/5013
10065[cargo/5029]: https://github.com/rust-lang/cargo/pull/5029
10066[RFC 1358]: https://github.com/rust-lang/rfcs/pull/1358
10067[`Location::column`]: https://doc.rust-lang.org/std/panic/struct.Location.html#method.column
10068[`ptr::NonNull`]: https://doc.rust-lang.org/std/ptr/struct.NonNull.html
10069
10070
10071Version 1.24.1 (2018-03-01)
10072==========================
10073
10074 - [Do not abort when unwinding through FFI][48251]
10075 - [Emit UTF-16 files for linker arguments on Windows][48318]
10076 - [Make the error index generator work again][48308]
10077 - [Cargo will warn on Windows 7 if an update is needed][cargo/5069].
10078
10079[48251]: https://github.com/rust-lang/rust/issues/48251
10080[48308]: https://github.com/rust-lang/rust/issues/48308
10081[48318]: https://github.com/rust-lang/rust/issues/48318
10082[cargo/5069]: https://github.com/rust-lang/cargo/pull/5069
10083
10084
10085Version 1.24.0 (2018-02-15)
10086==========================
10087
10088Language
10089--------
10090- [External `sysv64` ffi is now available.][46528]
10091 eg. `extern "sysv64" fn foo () {}`
10092
10093Compiler
10094--------
10095- [rustc now uses 16 codegen units by default for release builds.][46910]
10096 For the fastest builds, utilize `codegen-units=1`.
10097- [Added `armv4t-unknown-linux-gnueabi` target.][47018]
10098- [Add `aarch64-unknown-openbsd` support][46760]
10099
10100Libraries
10101---------
10102- [`str::find::<char>` now uses memchr.][46735] This should lead to a 10x
10103 improvement in performance in the majority of cases.
10104- [`OsStr`'s `Debug` implementation is now lossless and consistent
10105 with Windows.][46798]
10106- [`time::{SystemTime, Instant}` now implement `Hash`.][46828]
10107- [impl `From<bool>` for `AtomicBool`][46293]
10108- [impl `From<{CString, &CStr}>` for `{Arc<CStr>, Rc<CStr>}`][45990]
10109- [impl `From<{OsString, &OsStr}>` for `{Arc<OsStr>, Rc<OsStr>}`][45990]
10110- [impl `From<{PathBuf, &Path}>` for `{Arc<Path>, Rc<Path>}`][45990]
10111- [float::from_bits now just uses transmute.][46012] This provides
10112 some optimisations from LLVM.
10113- [Copied `AsciiExt` methods onto `char`][46077]
10114- [Remove `T: Sized` requirement on `ptr::is_null()`][46094]
10115- [impl `From<RecvError>` for `{TryRecvError, RecvTimeoutError}`][45506]
10116- [Optimised `f32::{min, max}` to generate more efficient x86 assembly][47080]
10117- [`[u8]::contains` now uses memchr which provides a 3x speed improvement][46713]
10118
10119Stabilized APIs
10120---------------
10121- [`RefCell::replace`]
10122- [`RefCell::swap`]
10123- [`atomic::spin_loop_hint`]
10124
10125The following functions can now be used in a constant expression.
10126eg. `let buffer: [u8; size_of::<usize>()];`, `static COUNTER: AtomicUsize = AtomicUsize::new(1);`
10127
10128- [`AtomicBool::new`][46287]
10129- [`AtomicUsize::new`][46287]
10130- [`AtomicIsize::new`][46287]
10131- [`AtomicPtr::new`][46287]
10132- [`Cell::new`][46287]
10133- [`{integer}::min_value`][46287]
10134- [`{integer}::max_value`][46287]
10135- [`mem::size_of`][46287]
10136- [`mem::align_of`][46287]
10137- [`ptr::null`][46287]
10138- [`ptr::null_mut`][46287]
10139- [`RefCell::new`][46287]
10140- [`UnsafeCell::new`][46287]
10141
10142Cargo
10143-----
10144- [Added a `workspace.default-members` config that
10145 overrides implied `--all` in virtual workspaces.][cargo/4743]
10146- [Enable incremental by default on development builds.][cargo/4817] Also added
10147 configuration keys to `Cargo.toml` and `.cargo/config` to disable on a
10148 per-project or global basis respectively.
10149
10150Misc
10151----
10152
10153Compatibility Notes
10154-------------------
10155- [Floating point types `Debug` impl now always prints a decimal point.][46831]
10156- [`Ipv6Addr` now rejects superfluous `::`'s in IPv6 addresses][46671] This is
10157 in accordance with IETF RFC 4291 §2.2.
10158- [Unwinding will no longer go past FFI boundaries, and will instead abort.][46833]
10159- [`Formatter::flags` method is now deprecated.][46284] The `sign_plus`,
10160 `sign_minus`, `alternate`, and `sign_aware_zero_pad` should be used instead.
10161- [Leading zeros in tuple struct members is now an error][47084]
10162- [`column!()` macro is one-based instead of zero-based][46977]
10163- [`fmt::Arguments` can no longer be shared across threads][45198]
10164- [Access to `#[repr(packed)]` struct fields is now unsafe][44884]
10165- [Cargo sets a different working directory for the compiler][cargo/4788]
10166
10167[44884]: https://github.com/rust-lang/rust/pull/44884
10168[45198]: https://github.com/rust-lang/rust/pull/45198
10169[45506]: https://github.com/rust-lang/rust/pull/45506
10170[45990]: https://github.com/rust-lang/rust/pull/45990
10171[46012]: https://github.com/rust-lang/rust/pull/46012
10172[46077]: https://github.com/rust-lang/rust/pull/46077
10173[46094]: https://github.com/rust-lang/rust/pull/46094
10174[46284]: https://github.com/rust-lang/rust/pull/46284
10175[46287]: https://github.com/rust-lang/rust/pull/46287
10176[46293]: https://github.com/rust-lang/rust/pull/46293
10177[46528]: https://github.com/rust-lang/rust/pull/46528
10178[46671]: https://github.com/rust-lang/rust/pull/46671
10179[46713]: https://github.com/rust-lang/rust/pull/46713
10180[46735]: https://github.com/rust-lang/rust/pull/46735
10181[46760]: https://github.com/rust-lang/rust/pull/46760
10182[46798]: https://github.com/rust-lang/rust/pull/46798
10183[46828]: https://github.com/rust-lang/rust/pull/46828
10184[46831]: https://github.com/rust-lang/rust/pull/46831
10185[46833]: https://github.com/rust-lang/rust/pull/46833
10186[46910]: https://github.com/rust-lang/rust/pull/46910
10187[46977]: https://github.com/rust-lang/rust/pull/46977
10188[47018]: https://github.com/rust-lang/rust/pull/47018
10189[47080]: https://github.com/rust-lang/rust/pull/47080
10190[47084]: https://github.com/rust-lang/rust/pull/47084
10191[cargo/4743]: https://github.com/rust-lang/cargo/pull/4743
10192[cargo/4788]: https://github.com/rust-lang/cargo/pull/4788
10193[cargo/4817]: https://github.com/rust-lang/cargo/pull/4817
10194[`RefCell::replace`]: https://doc.rust-lang.org/std/cell/struct.RefCell.html#method.replace
10195[`RefCell::swap`]: https://doc.rust-lang.org/std/cell/struct.RefCell.html#method.swap
10196[`atomic::spin_loop_hint`]: https://doc.rust-lang.org/std/sync/atomic/fn.spin_loop_hint.html
10197
10198
10199Version 1.23.0 (2018-01-04)
10200==========================
10201
10202Language
10203--------
10204- [Arbitrary `auto` traits are now permitted in trait objects.][45772]
10205- [rustc now uses subtyping on the left hand side of binary operations.][45435]
10206 Which should fix some confusing errors in some operations.
10207
10208Compiler
10209--------
10210- [Enabled `TrapUnreachable` in LLVM which should mitigate the impact of
10211 undefined behavior.][45920]
10212- [rustc now suggests renaming import if names clash.][45660]
10213- [Display errors/warnings correctly when there are zero-width or
10214 wide characters.][45711]
10215- [rustc now avoids unnecessary copies of arguments that are
10216 simple bindings][45380] This should improve memory usage on average by 5-10%.
10217- [Updated musl used to build musl rustc to 1.1.17][45393]
10218
10219Libraries
10220---------
10221- [Allow a trailing comma in `assert_eq/ne` macro][45887]
10222- [Implement Hash for raw pointers to unsized types][45483]
10223- [impl `From<*mut T>` for `AtomicPtr<T>`][45610]
10224- [impl `From<usize/isize>` for `AtomicUsize/AtomicIsize`.][45610]
10225- [Removed the `T: Sync` requirement for `RwLock<T>: Send`][45267]
10226- [Removed `T: Sized` requirement for `{<*const T>, <*mut T>}::as_ref`
10227 and `<*mut T>::as_mut`][44932]
10228- [Optimized `Thread::{park, unpark}` implementation][45524]
10229- [Improved `SliceExt::binary_search` performance.][45333]
10230- [impl `FromIterator<()>` for `()`][45379]
10231- [Copied `AsciiExt` trait methods to primitive types.][44042] Use of `AsciiExt`
10232 is now deprecated.
10233
10234Stabilized APIs
10235---------------
10236
10237Cargo
10238-----
10239- [Cargo now supports uninstallation of multiple packages][cargo/4561]
10240 eg. `cargo uninstall foo bar` uninstalls `foo` and `bar`.
10241- [Added unit test checking to `cargo check`][cargo/4592]
10242- [Cargo now lets you install a specific version
10243 using `cargo install --version`][cargo/4637]
10244
10245Misc
10246----
10247- [Releases now ship with the Cargo book documentation.][45692]
10248- [rustdoc now prints rendering warnings on every run.][45324]
10249
10250Compatibility Notes
10251-------------------
10252- [Changes have been made to type equality to make it more correct,
10253 in rare cases this could break some code.][45853] [Tracking issue for
10254 further information][45852]
10255- [`char::escape_debug` now uses Unicode 10 over 9.][45571]
10256- [Upgraded Android SDK to 27, and NDK to r15c.][45580] This drops support for
10257 Android 9, the minimum supported version is Android 14.
10258- [Bumped the minimum LLVM to 3.9][45326]
10259
10260[44042]: https://github.com/rust-lang/rust/pull/44042
10261[44932]: https://github.com/rust-lang/rust/pull/44932
10262[45267]: https://github.com/rust-lang/rust/pull/45267
10263[45324]: https://github.com/rust-lang/rust/pull/45324
10264[45326]: https://github.com/rust-lang/rust/pull/45326
10265[45333]: https://github.com/rust-lang/rust/pull/45333
10266[45379]: https://github.com/rust-lang/rust/pull/45379
10267[45380]: https://github.com/rust-lang/rust/pull/45380
10268[45393]: https://github.com/rust-lang/rust/pull/45393
10269[45435]: https://github.com/rust-lang/rust/pull/45435
10270[45483]: https://github.com/rust-lang/rust/pull/45483
10271[45524]: https://github.com/rust-lang/rust/pull/45524
10272[45571]: https://github.com/rust-lang/rust/pull/45571
10273[45580]: https://github.com/rust-lang/rust/pull/45580
10274[45610]: https://github.com/rust-lang/rust/pull/45610
10275[45660]: https://github.com/rust-lang/rust/pull/45660
10276[45692]: https://github.com/rust-lang/rust/pull/45692
10277[45711]: https://github.com/rust-lang/rust/pull/45711
10278[45772]: https://github.com/rust-lang/rust/pull/45772
10279[45852]: https://github.com/rust-lang/rust/issues/45852
10280[45853]: https://github.com/rust-lang/rust/pull/45853
10281[45887]: https://github.com/rust-lang/rust/pull/45887
10282[45920]: https://github.com/rust-lang/rust/pull/45920
10283[cargo/4561]: https://github.com/rust-lang/cargo/pull/4561
10284[cargo/4592]: https://github.com/rust-lang/cargo/pull/4592
10285[cargo/4637]: https://github.com/rust-lang/cargo/pull/4637
10286
10287
10288Version 1.22.1 (2017-11-22)
10289==========================
10290
10291- [Update Cargo to fix an issue with macOS 10.13 "High Sierra"][46183]
10292
10293[46183]: https://github.com/rust-lang/rust/pull/46183
10294
10295Version 1.22.0 (2017-11-22)
10296==========================
10297
10298Language
10299--------
10300- [`non_snake_case` lint now allows extern no-mangle functions][44966]
10301- [Now accepts underscores in unicode escapes][43716]
10302- [`T op= &T` now works for numeric types.][44287] eg. `let mut x = 2; x += &8;`
10303- [types that impl `Drop` are now allowed in `const` and `static` types][44456]
10304
10305Compiler
10306--------
10307- [rustc now defaults to having 16 codegen units at debug on supported platforms.][45064]
10308- [rustc will no longer inline in codegen units when compiling for debug][45075]
10309 This should decrease compile times for debug builds.
10310- [strict memory alignment now enabled on ARMv6][45094]
10311- [Remove support for the PNaCl target `le32-unknown-nacl`][45041]
10312
10313Libraries
10314---------
10315- [Allow atomic operations up to 32 bits
10316 on `armv5te_unknown_linux_gnueabi`][44978]
10317- [`Box<Error>` now impls `From<Cow<str>>`][44466]
10318- [`std::mem::Discriminant` is now guaranteed to be `Send + Sync`][45095]
10319- [`fs::copy` now returns the length of the main stream on NTFS.][44895]
10320- [Properly detect overflow in `Instant += Duration`.][44220]
10321- [impl `Hasher` for `{&mut Hasher, Box<Hasher>}`][44015]
10322- [impl `fmt::Debug` for `SplitWhitespace`.][44303]
10323- [`Option<T>` now impls `Try`][42526] This allows for using `?` with `Option` types.
10324
10325Stabilized APIs
10326---------------
10327
10328Cargo
10329-----
10330- [Cargo will now build multi file examples in subdirectories of the `examples`
10331 folder that have a `main.rs` file.][cargo/4496]
10332- [Changed `[root]` to `[package]` in `Cargo.lock`][cargo/4571] Packages with
10333 the old format will continue to work and can be updated with `cargo update`.
10334- [Now supports vendoring git repositories][cargo/3992]
10335
10336Misc
10337----
10338- [`libbacktrace` is now available on Apple platforms.][44251]
10339- [Stabilised the `compile_fail` attribute for code fences in doc-comments.][43949]
10340 This now lets you specify that a given code example will fail to compile.
10341
10342Compatibility Notes
10343-------------------
10344- [The minimum Android version that rustc can build for has been bumped
10345 to `4.0` from `2.3`][45656]
10346- [Allowing `T op= &T` for numeric types has broken some type
10347 inference cases][45480]
10348
10349
10350[42526]: https://github.com/rust-lang/rust/pull/42526
10351[43716]: https://github.com/rust-lang/rust/pull/43716
10352[43949]: https://github.com/rust-lang/rust/pull/43949
10353[44015]: https://github.com/rust-lang/rust/pull/44015
10354[44220]: https://github.com/rust-lang/rust/pull/44220
10355[44251]: https://github.com/rust-lang/rust/pull/44251
10356[44287]: https://github.com/rust-lang/rust/pull/44287
10357[44303]: https://github.com/rust-lang/rust/pull/44303
10358[44456]: https://github.com/rust-lang/rust/pull/44456
10359[44466]: https://github.com/rust-lang/rust/pull/44466
10360[44895]: https://github.com/rust-lang/rust/pull/44895
10361[44966]: https://github.com/rust-lang/rust/pull/44966
10362[44978]: https://github.com/rust-lang/rust/pull/44978
10363[45041]: https://github.com/rust-lang/rust/pull/45041
10364[45064]: https://github.com/rust-lang/rust/pull/45064
10365[45075]: https://github.com/rust-lang/rust/pull/45075
10366[45094]: https://github.com/rust-lang/rust/pull/45094
10367[45095]: https://github.com/rust-lang/rust/pull/45095
10368[45480]: https://github.com/rust-lang/rust/issues/45480
10369[45656]: https://github.com/rust-lang/rust/pull/45656
10370[cargo/3992]: https://github.com/rust-lang/cargo/pull/3992
10371[cargo/4496]: https://github.com/rust-lang/cargo/pull/4496
10372[cargo/4571]: https://github.com/rust-lang/cargo/pull/4571
10373
10374
10375
10376
10377
10378
10379Version 1.21.0 (2017-10-12)
10380==========================
10381
10382Language
10383--------
10384- [You can now use static references for literals.][43838]
10385 Example:
10386 ```rust
10387 fn main() {
10388 let x: &'static u32 = &0;
10389 }
10390 ```
10391- [Relaxed path syntax. Optional `::` before `<` is now allowed in all contexts.][43540]
10392 Example:
10393 ```rust
10394 my_macro!(Vec<i32>::new); // Always worked
10395 my_macro!(Vec::<i32>::new); // Now works
10396 ```
10397
10398Compiler
10399--------
10400- [Upgraded jemalloc to 4.5.0][43911]
10401- [Enabled unwinding panics on Redox][43917]
10402- [Now runs LLVM in parallel during translation phase.][43506]
10403 This should reduce peak memory usage.
10404
10405Libraries
10406---------
10407- [Generate builtin impls for `Clone` for all arrays and tuples that
10408 are `T: Clone`][43690]
10409- [`Stdin`, `Stdout`, and `Stderr` now implement `AsRawFd`.][43459]
10410- [`Rc` and `Arc` now implement `From<&[T]> where T: Clone`, `From<str>`,
10411 `From<String>`, `From<Box<T>> where T: ?Sized`, and `From<Vec<T>>`.][42565]
10412
10413Stabilized APIs
10414---------------
10415
10416[`std::mem::discriminant`]
10417
10418Cargo
10419-----
10420- [You can now call `cargo install` with multiple package names][cargo/4216]
10421- [Cargo commands inside a virtual workspace will now implicitly
10422 pass `--all`][cargo/4335]
10423- [Added a `[patch]` section to `Cargo.toml` to handle
10424 prepublication dependencies][cargo/4123] [RFC 1969]
10425- [`include` & `exclude` fields in `Cargo.toml` now accept gitignore
10426 like patterns][cargo/4270]
10427- [Added the `--all-targets` option][cargo/4400]
10428- [Using required dependencies as a feature is now deprecated and emits
10429 a warning][cargo/4364]
10430
10431
10432Misc
10433----
10434- [Cargo docs are moving][43916]
10435 to [doc.rust-lang.org/cargo](https://doc.rust-lang.org/cargo)
10436- [The rustdoc book is now available][43863]
10437 at [doc.rust-lang.org/rustdoc](https://doc.rust-lang.org/rustdoc)
10438- [Added a preview of RLS has been made available through rustup][44204]
10439 Install with `rustup component add rls-preview`
10440- [`std::os` documentation for Unix, Linux, and Windows now appears on doc.rust-lang.org][43348]
10441 Previously only showed `std::os::unix`.
10442
10443Compatibility Notes
10444-------------------
10445- [Changes in method matching against higher-ranked types][43880] This may cause
10446 breakage in subtyping corner cases. [A more in-depth explanation is available.][info/43880]
10447- [rustc's JSON error output's byte position start at top of file.][42973]
10448 Was previously relative to the rustc's internal `CodeMap` struct which
10449 required the unstable library `libsyntax` to correctly use.
10450- [`unused_results` lint no longer ignores booleans][43728]
10451
10452[42565]: https://github.com/rust-lang/rust/pull/42565
10453[42973]: https://github.com/rust-lang/rust/pull/42973
10454[43348]: https://github.com/rust-lang/rust/pull/43348
10455[43459]: https://github.com/rust-lang/rust/pull/43459
10456[43506]: https://github.com/rust-lang/rust/pull/43506
10457[43540]: https://github.com/rust-lang/rust/pull/43540
10458[43690]: https://github.com/rust-lang/rust/pull/43690
10459[43728]: https://github.com/rust-lang/rust/pull/43728
10460[43838]: https://github.com/rust-lang/rust/pull/43838
10461[43863]: https://github.com/rust-lang/rust/pull/43863
10462[43880]: https://github.com/rust-lang/rust/pull/43880
10463[43911]: https://github.com/rust-lang/rust/pull/43911
10464[43916]: https://github.com/rust-lang/rust/pull/43916
10465[43917]: https://github.com/rust-lang/rust/pull/43917
10466[44204]: https://github.com/rust-lang/rust/pull/44204
10467[cargo/4123]: https://github.com/rust-lang/cargo/pull/4123
10468[cargo/4216]: https://github.com/rust-lang/cargo/pull/4216
10469[cargo/4270]: https://github.com/rust-lang/cargo/pull/4270
10470[cargo/4335]: https://github.com/rust-lang/cargo/pull/4335
10471[cargo/4364]: https://github.com/rust-lang/cargo/pull/4364
10472[cargo/4400]: https://github.com/rust-lang/cargo/pull/4400
10473[RFC 1969]: https://github.com/rust-lang/rfcs/pull/1969
10474[info/43880]: https://github.com/rust-lang/rust/issues/44224#issuecomment-330058902
10475[`std::mem::discriminant`]: https://doc.rust-lang.org/std/mem/fn.discriminant.html
10476
10477Version 1.20.0 (2017-08-31)
10478===========================
10479
10480Language
10481--------
10482- [Associated constants are now stabilised.][42809]
10483- [A lot of macro bugs are now fixed.][42913]
10484
10485Compiler
10486--------
10487
10488- [Struct fields are now properly coerced to the expected field type.][42807]
10489- [Enabled wasm LLVM backend][42571] WASM can now be built with the
10490 `wasm32-experimental-emscripten` target.
10491- [Changed some of the error messages to be more helpful.][42033]
10492- [Add support for RELRO(RELocation Read-Only) for platforms that support
10493 it.][43170]
10494- [rustc now reports the total number of errors on compilation failure][43015]
10495 previously this was only the number of errors in the pass that failed.
10496- [Expansion in rustc has been sped up 29x.][42533]
10497- [added `msp430-none-elf` target.][43099]
10498- [rustc will now suggest one-argument enum variant to fix type mismatch when
10499 applicable][43178]
10500- [Fixes backtraces on Redox][43228]
10501- [rustc now identifies different versions of same crate when absolute paths of
10502 different types match in an error message.][42826]
10503
10504Libraries
10505---------
10506
10507
10508- [Relaxed Debug constraints on `{HashMap,BTreeMap}::{Keys,Values}`.][42854]
10509- [Impl `PartialEq`, `Eq`, `PartialOrd`, `Ord`, `Debug`, `Hash` for unsized
10510 tuples.][43011]
10511- [Impl `fmt::{Display, Debug}` for `Ref`, `RefMut`, `MutexGuard`,
10512 `RwLockReadGuard`, `RwLockWriteGuard`][42822]
10513- [Impl `Clone` for `DefaultHasher`.][42799]
10514- [Impl `Sync` for `SyncSender`.][42397]
10515- [Impl `FromStr` for `char`][42271]
10516- [Fixed how `{f32, f64}::{is_sign_negative, is_sign_positive}` handles
10517 NaN.][42431]
10518- [allow messages in the `unimplemented!()` macro.][42155]
10519 ie. `unimplemented!("Waiting for 1.21 to be stable")`
10520- [`pub(restricted)` is now supported in the `thread_local!` macro.][43185]
10521- [Upgrade to Unicode 10.0.0][42999]
10522- [Reimplemented `{f32, f64}::{min, max}` in Rust instead of using CMath.][42430]
10523- [Skip the main thread's manual stack guard on Linux][43072]
10524- [Iterator::nth for `ops::{Range, RangeFrom}` is now done in *O*(1) time][43077]
10525- [`#[repr(align(N))]` attribute max number is now 2^31 - 1.][43097] This was
10526 previously 2^15.
10527- [`{OsStr, Path}::Display` now avoids allocations where possible][42613]
10528
10529Stabilized APIs
10530---------------
10531
10532- [`CStr::into_c_string`]
10533- [`CString::as_c_str`]
10534- [`CString::into_boxed_c_str`]
10535- [`Chain::get_mut`]
10536- [`Chain::get_ref`]
10537- [`Chain::into_inner`]
10538- [`Option::get_or_insert_with`]
10539- [`Option::get_or_insert`]
10540- [`OsStr::into_os_string`]
10541- [`OsString::into_boxed_os_str`]
10542- [`Take::get_mut`]
10543- [`Take::get_ref`]
10544- [`Utf8Error::error_len`]
10545- [`char::EscapeDebug`]
10546- [`char::escape_debug`]
10547- [`compile_error!`]
10548- [`f32::from_bits`]
10549- [`f32::to_bits`]
10550- [`f64::from_bits`]
10551- [`f64::to_bits`]
10552- [`mem::ManuallyDrop`]
10553- [`slice::sort_unstable_by_key`]
10554- [`slice::sort_unstable_by`]
10555- [`slice::sort_unstable`]
10556- [`str::from_boxed_utf8_unchecked`]
10557- [`str::as_bytes_mut`]
10558- [`str::as_bytes_mut`]
10559- [`str::from_utf8_mut`]
10560- [`str::from_utf8_unchecked_mut`]
10561- [`str::get_mut`]
10562- [`str::get_unchecked_mut`]
10563- [`str::get_unchecked`]
10564- [`str::get`]
10565- [`str::into_boxed_bytes`]
10566
10567
10568Cargo
10569-----
10570- [Cargo API token location moved from `~/.cargo/config` to
10571 `~/.cargo/credentials`.][cargo/3978]
10572- [Cargo will now build `main.rs` binaries that are in sub-directories of
10573 `src/bin`.][cargo/4214] ie. Having `src/bin/server/main.rs` and
10574 `src/bin/client/main.rs` generates `target/debug/server` and `target/debug/client`
10575- [You can now specify version of a binary when installed through
10576 `cargo install` using `--vers`.][cargo/4229]
10577- [Added `--no-fail-fast` flag to cargo to run all benchmarks regardless of
10578 failure.][cargo/4248]
10579- [Changed the convention around which file is the crate root.][cargo/4259]
10580
10581Compatibility Notes
10582-------------------
10583
10584- [Functions with `'static` in their return types will now not be as usable as
10585 if they were using lifetime parameters instead.][42417]
10586- [The reimplementation of `{f32, f64}::is_sign_{negative, positive}` now
10587 takes the sign of NaN into account where previously didn't.][42430]
10588
10589[42033]: https://github.com/rust-lang/rust/pull/42033
10590[42155]: https://github.com/rust-lang/rust/pull/42155
10591[42271]: https://github.com/rust-lang/rust/pull/42271
10592[42397]: https://github.com/rust-lang/rust/pull/42397
10593[42417]: https://github.com/rust-lang/rust/pull/42417
10594[42430]: https://github.com/rust-lang/rust/pull/42430
10595[42431]: https://github.com/rust-lang/rust/pull/42431
10596[42533]: https://github.com/rust-lang/rust/pull/42533
10597[42571]: https://github.com/rust-lang/rust/pull/42571
10598[42613]: https://github.com/rust-lang/rust/pull/42613
10599[42799]: https://github.com/rust-lang/rust/pull/42799
10600[42807]: https://github.com/rust-lang/rust/pull/42807
10601[42809]: https://github.com/rust-lang/rust/pull/42809
10602[42822]: https://github.com/rust-lang/rust/pull/42822
10603[42826]: https://github.com/rust-lang/rust/pull/42826
10604[42854]: https://github.com/rust-lang/rust/pull/42854
10605[42913]: https://github.com/rust-lang/rust/pull/42913
10606[42999]: https://github.com/rust-lang/rust/pull/42999
10607[43011]: https://github.com/rust-lang/rust/pull/43011
10608[43015]: https://github.com/rust-lang/rust/pull/43015
10609[43072]: https://github.com/rust-lang/rust/pull/43072
10610[43077]: https://github.com/rust-lang/rust/pull/43077
10611[43097]: https://github.com/rust-lang/rust/pull/43097
10612[43099]: https://github.com/rust-lang/rust/pull/43099
10613[43170]: https://github.com/rust-lang/rust/pull/43170
10614[43178]: https://github.com/rust-lang/rust/pull/43178
10615[43185]: https://github.com/rust-lang/rust/pull/43185
10616[43228]: https://github.com/rust-lang/rust/pull/43228
10617[cargo/3978]: https://github.com/rust-lang/cargo/pull/3978
10618[cargo/4214]: https://github.com/rust-lang/cargo/pull/4214
10619[cargo/4229]: https://github.com/rust-lang/cargo/pull/4229
10620[cargo/4248]: https://github.com/rust-lang/cargo/pull/4248
10621[cargo/4259]: https://github.com/rust-lang/cargo/pull/4259
10622[`CStr::into_c_string`]: https://doc.rust-lang.org/std/ffi/struct.CStr.html#method.into_c_string
10623[`CString::as_c_str`]: https://doc.rust-lang.org/std/ffi/struct.CString.html#method.as_c_str
10624[`CString::into_boxed_c_str`]: https://doc.rust-lang.org/std/ffi/struct.CString.html#method.into_boxed_c_str
10625[`Chain::get_mut`]: https://doc.rust-lang.org/std/io/struct.Chain.html#method.get_mut
10626[`Chain::get_ref`]: https://doc.rust-lang.org/std/io/struct.Chain.html#method.get_ref
10627[`Chain::into_inner`]: https://doc.rust-lang.org/std/io/struct.Chain.html#method.into_inner
10628[`Option::get_or_insert_with`]: https://doc.rust-lang.org/std/option/enum.Option.html#method.get_or_insert_with
10629[`Option::get_or_insert`]: https://doc.rust-lang.org/std/option/enum.Option.html#method.get_or_insert
10630[`OsStr::into_os_string`]: https://doc.rust-lang.org/std/ffi/struct.OsStr.html#method.into_os_string
10631[`OsString::into_boxed_os_str`]: https://doc.rust-lang.org/std/ffi/struct.OsString.html#method.into_boxed_os_str
10632[`Take::get_mut`]: https://doc.rust-lang.org/std/io/struct.Take.html#method.get_mut
10633[`Take::get_ref`]: https://doc.rust-lang.org/std/io/struct.Take.html#method.get_ref
10634[`Utf8Error::error_len`]: https://doc.rust-lang.org/std/str/struct.Utf8Error.html#method.error_len
10635[`char::EscapeDebug`]: https://doc.rust-lang.org/std/char/struct.EscapeDebug.html
10636[`char::escape_debug`]: https://doc.rust-lang.org/std/primitive.char.html#method.escape_debug
10637[`compile_error!`]: https://doc.rust-lang.org/std/macro.compile_error.html
10638[`f32::from_bits`]: https://doc.rust-lang.org/std/primitive.f32.html#method.from_bits
10639[`f32::to_bits`]: https://doc.rust-lang.org/std/primitive.f32.html#method.to_bits
10640[`f64::from_bits`]: https://doc.rust-lang.org/std/primitive.f64.html#method.from_bits
10641[`f64::to_bits`]: https://doc.rust-lang.org/std/primitive.f64.html#method.to_bits
10642[`mem::ManuallyDrop`]: https://doc.rust-lang.org/std/mem/union.ManuallyDrop.html
10643[`slice::sort_unstable_by_key`]: https://doc.rust-lang.org/std/primitive.slice.html#method.sort_unstable_by_key
10644[`slice::sort_unstable_by`]: https://doc.rust-lang.org/std/primitive.slice.html#method.sort_unstable_by
10645[`slice::sort_unstable`]: https://doc.rust-lang.org/std/primitive.slice.html#method.sort_unstable
10646[`str::from_boxed_utf8_unchecked`]: https://doc.rust-lang.org/std/str/fn.from_boxed_utf8_unchecked.html
10647[`str::as_bytes_mut`]: https://doc.rust-lang.org/std/primitive.str.html#method.as_bytes_mut
10648[`str::from_utf8_mut`]: https://doc.rust-lang.org/std/str/fn.from_utf8_mut.html
10649[`str::from_utf8_unchecked_mut`]: https://doc.rust-lang.org/std/str/fn.from_utf8_unchecked_mut.html
10650[`str::get_mut`]: https://doc.rust-lang.org/std/primitive.str.html#method.get_mut
10651[`str::get_unchecked_mut`]: https://doc.rust-lang.org/std/primitive.str.html#method.get_unchecked_mut
10652[`str::get_unchecked`]: https://doc.rust-lang.org/std/primitive.str.html#method.get_unchecked
10653[`str::get`]: https://doc.rust-lang.org/std/primitive.str.html#method.get
10654[`str::into_boxed_bytes`]: https://doc.rust-lang.org/std/primitive.str.html#method.into_boxed_bytes
10655
10656
10657Version 1.19.0 (2017-07-20)
10658===========================
10659
10660Language
10661--------
10662
10663- [Numeric fields can now be used for creating tuple structs.][41145] [RFC 1506]
10664 For example `struct Point(u32, u32); let x = Point { 0: 7, 1: 0 };`.
10665- [Macro recursion limit increased to 1024 from 64.][41676]
10666- [Added lint for detecting unused macros.][41907]
10667- [`loop` can now return a value with `break`.][42016] [RFC 1624]
10668 For example: `let x = loop { break 7; };`
10669- [C compatible `union`s are now available.][42068] [RFC 1444] They can only
10670 contain `Copy` types and cannot have a `Drop` implementation.
10671 Example: `union Foo { bar: u8, baz: usize }`
10672- [Non capturing closures can now be coerced into `fn`s,][42162] [RFC 1558]
10673 Example: `let foo: fn(u8) -> u8 = |v: u8| { v };`
10674
10675Compiler
10676--------
10677
10678- [Add support for bootstrapping the Rust compiler toolchain on Android.][41370]
10679- [Change `arm-linux-androideabi` to correspond to the `armeabi`
10680 official ABI.][41656] If you wish to continue targeting the `armeabi-v7a` ABI
10681 you should use `--target armv7-linux-androideabi`.
10682- [Fixed ICE when removing a source file between compilation sessions.][41873]
10683- [Minor optimisation of string operations.][42037]
10684- [Compiler error message is now `aborting due to previous error(s)` instead of
10685 `aborting due to N previous errors`][42150] This was previously inaccurate and
10686 would only count certain kinds of errors.
10687- [The compiler now supports Visual Studio 2017][42225]
10688- [The compiler is now built against LLVM 4.0.1 by default][42948]
10689- [Added a lot][42264] of [new error codes][42302]
10690- [Added `target-feature=+crt-static` option][37406] [RFC 1721] Which allows
10691 libraries with C Run-time Libraries(CRT) to be statically linked.
10692- [Fixed various ARM codegen bugs][42740]
10693
10694Libraries
10695---------
10696
10697- [`String` now implements `FromIterator<Cow<'a, str>>` and
10698 `Extend<Cow<'a, str>>`][41449]
10699- [`Vec` now implements `From<&mut [T]>`][41530]
10700- [`Box<[u8]>` now implements `From<Box<str>>`][41258]
10701- [`SplitWhitespace` now implements `Clone`][41659]
10702- [`[u8]::reverse` is now 5x faster and `[u16]::reverse` is now
10703 1.5x faster][41764]
10704- [`eprint!` and `eprintln!` macros added to prelude.][41192] Same as the `print!`
10705 macros, but for printing to stderr.
10706
10707Stabilized APIs
10708---------------
10709
10710- [`OsString::shrink_to_fit`]
10711- [`cmp::Reverse`]
10712- [`Command::envs`]
10713- [`thread::ThreadId`]
10714
10715Cargo
10716-----
10717
10718- [Build scripts can now add environment variables to the environment
10719 the crate is being compiled in.
10720 Example: `println!("cargo:rustc-env=FOO=bar");`][cargo/3929]
10721- [Subcommands now replace the current process rather than spawning a new
10722 child process][cargo/3970]
10723- [Workspace members can now accept glob file patterns][cargo/3979]
10724- [Added `--all` flag to the `cargo bench` subcommand to run benchmarks of all
10725 the members in a given workspace.][cargo/3988]
10726- [Updated `libssh2-sys` to 0.2.6][cargo/4008]
10727- [Target directory path is now in the cargo metadata][cargo/4022]
10728- [Cargo no longer checks out a local working directory for the
10729 crates.io index][cargo/4026] This should provide smaller file size for the
10730 registry, and improve cloning times, especially on Windows machines.
10731- [Added an `--exclude` option for excluding certain packages when using the
10732 `--all` option][cargo/4031]
10733- [Cargo will now automatically retry when receiving a 5xx error
10734 from crates.io][cargo/4032]
10735- [The `--features` option now accepts multiple comma or space
10736 delimited values.][cargo/4084]
10737- [Added support for custom target specific runners][cargo/3954]
10738
10739Misc
10740----
10741
10742- [Added `rust-windbg.cmd`][39983] for loading rust `.natvis` files in the
10743 Windows Debugger.
10744- [Rust will now release XZ compressed packages][rust-installer/57]
10745- [rustup will now prefer to download rust packages with
10746 XZ compression][rustup/1100] over GZip packages.
10747- [Added the ability to escape `#` in rust documentation][41785] By adding
10748 additional `#`'s ie. `##` is now `#`
10749
10750Compatibility Notes
10751-------------------
10752
10753- [`MutexGuard<T>` may only be `Sync` if `T` is `Sync`.][41624]
10754- [`-Z` flags are now no longer allowed to be used on the stable
10755 compiler.][41751] This has been a warning for a year previous to this.
10756- [As a result of the `-Z` flag change, the `cargo-check` plugin no
10757 longer works][42844]. Users should migrate to the built-in `check`
10758 command, which has been available since 1.16.
10759- [Ending a float literal with `._` is now a hard error.
10760 Example: `42._` .][41946]
10761- [Any use of a private `extern crate` outside of its module is now a
10762 hard error.][36886] This was previously a warning.
10763- [`use ::self::foo;` is now a hard error.][36888] `self` paths are always
10764 relative while the `::` prefix makes a path absolute, but was ignored and the
10765 path was relative regardless.
10766- [Floating point constants in match patterns is now a hard error][36890]
10767 This was previously a warning.
10768- [Struct or enum constants that don't derive `PartialEq` & `Eq` used
10769 match patterns is now a hard error][36891] This was previously a warning.
10770- [Lifetimes named `'_` are no longer allowed.][36892] This was previously
10771 a warning.
10772- [From the pound escape, lines consisting of multiple `#`s are
10773 now visible][41785]
10774- [It is an error to re-export private enum variants][42460]. This is
10775 known to break a number of crates that depend on an older version of
10776 mustache.
10777- [On Windows, if `VCINSTALLDIR` is set incorrectly, `rustc` will try
10778 to use it to find the linker, and the build will fail where it did
10779 not previously][42607]
10780
10781[36886]: https://github.com/rust-lang/rust/issues/36886
10782[36888]: https://github.com/rust-lang/rust/issues/36888
10783[36890]: https://github.com/rust-lang/rust/issues/36890
10784[36891]: https://github.com/rust-lang/rust/issues/36891
10785[36892]: https://github.com/rust-lang/rust/issues/36892
10786[37406]: https://github.com/rust-lang/rust/issues/37406
10787[39983]: https://github.com/rust-lang/rust/pull/39983
10788[41145]: https://github.com/rust-lang/rust/pull/41145
10789[41192]: https://github.com/rust-lang/rust/pull/41192
10790[41258]: https://github.com/rust-lang/rust/pull/41258
10791[41370]: https://github.com/rust-lang/rust/pull/41370
10792[41449]: https://github.com/rust-lang/rust/pull/41449
10793[41530]: https://github.com/rust-lang/rust/pull/41530
10794[41624]: https://github.com/rust-lang/rust/pull/41624
10795[41656]: https://github.com/rust-lang/rust/pull/41656
10796[41659]: https://github.com/rust-lang/rust/pull/41659
10797[41676]: https://github.com/rust-lang/rust/pull/41676
10798[41751]: https://github.com/rust-lang/rust/pull/41751
10799[41764]: https://github.com/rust-lang/rust/pull/41764
10800[41785]: https://github.com/rust-lang/rust/pull/41785
10801[41873]: https://github.com/rust-lang/rust/pull/41873
10802[41907]: https://github.com/rust-lang/rust/pull/41907
10803[41946]: https://github.com/rust-lang/rust/pull/41946
10804[42016]: https://github.com/rust-lang/rust/pull/42016
10805[42037]: https://github.com/rust-lang/rust/pull/42037
10806[42068]: https://github.com/rust-lang/rust/pull/42068
10807[42150]: https://github.com/rust-lang/rust/pull/42150
10808[42162]: https://github.com/rust-lang/rust/pull/42162
10809[42225]: https://github.com/rust-lang/rust/pull/42225
10810[42264]: https://github.com/rust-lang/rust/pull/42264
10811[42302]: https://github.com/rust-lang/rust/pull/42302
10812[42460]: https://github.com/rust-lang/rust/issues/42460
10813[42607]: https://github.com/rust-lang/rust/issues/42607
10814[42740]: https://github.com/rust-lang/rust/pull/42740
10815[42844]: https://github.com/rust-lang/rust/issues/42844
10816[42948]: https://github.com/rust-lang/rust/pull/42948
10817[RFC 1444]: https://github.com/rust-lang/rfcs/pull/1444
10818[RFC 1506]: https://github.com/rust-lang/rfcs/pull/1506
10819[RFC 1558]: https://github.com/rust-lang/rfcs/pull/1558
10820[RFC 1624]: https://github.com/rust-lang/rfcs/pull/1624
10821[RFC 1721]: https://github.com/rust-lang/rfcs/pull/1721
10822[`Command::envs`]: https://doc.rust-lang.org/std/process/struct.Command.html#method.envs
10823[`OsString::shrink_to_fit`]: https://doc.rust-lang.org/std/ffi/struct.OsString.html#method.shrink_to_fit
10824[`cmp::Reverse`]: https://doc.rust-lang.org/std/cmp/struct.Reverse.html
10825[`thread::ThreadId`]: https://doc.rust-lang.org/std/thread/struct.ThreadId.html
10826[cargo/3929]: https://github.com/rust-lang/cargo/pull/3929
10827[cargo/3954]: https://github.com/rust-lang/cargo/pull/3954
10828[cargo/3970]: https://github.com/rust-lang/cargo/pull/3970
10829[cargo/3979]: https://github.com/rust-lang/cargo/pull/3979
10830[cargo/3988]: https://github.com/rust-lang/cargo/pull/3988
10831[cargo/4008]: https://github.com/rust-lang/cargo/pull/4008
10832[cargo/4022]: https://github.com/rust-lang/cargo/pull/4022
10833[cargo/4026]: https://github.com/rust-lang/cargo/pull/4026
10834[cargo/4031]: https://github.com/rust-lang/cargo/pull/4031
10835[cargo/4032]: https://github.com/rust-lang/cargo/pull/4032
10836[cargo/4084]: https://github.com/rust-lang/cargo/pull/4084
10837[rust-installer/57]: https://github.com/rust-lang/rust-installer/pull/57
10838[rustup/1100]: https://github.com/rust-lang-nursery/rustup.rs/pull/1100
10839
10840
10841Version 1.18.0 (2017-06-08)
10842===========================
10843
10844Language
10845--------
10846
10847- [Stabilize pub(restricted)][40556] `pub` can now accept a module path to
10848 make the item visible to just that module tree. Also accepts the keyword
10849 `crate` to make something public to the whole crate but not users of the
10850 library. Example: `pub(crate) mod utils;`. [RFC 1422].
10851- [Stabilize `#![windows_subsystem]` attribute][40870] conservative exposure of the
10852 `/SUBSYSTEM` linker flag on Windows platforms. [RFC 1665].
10853- [Refactor of trait object type parsing][40043] Now `ty` in macros can accept
10854 types like `Write + Send`, trailing `+` are now supported in trait objects,
10855 and better error reporting for trait objects starting with `?Sized`.
10856- [0e+10 is now a valid floating point literal][40589]
10857- [Now warns if you bind a lifetime parameter to 'static][40734]
10858- [Tuples, Enum variant fields, and structs with no `repr` attribute or with
10859 `#[repr(Rust)]` are reordered to minimize padding and produce a smaller
10860 representation in some cases.][40377]
10861
10862Compiler
10863--------
10864
10865- [rustc can now emit mir with `--emit mir`][39891]
10866- [Improved LLVM IR for trivial functions][40367]
10867- [Added explanation for E0090(Wrong number of lifetimes are supplied)][40723]
10868- [rustc compilation is now 15%-20% faster][41469] Thanks to optimisation
10869 opportunities found through profiling
10870- [Improved backtrace formatting when panicking][38165]
10871
10872Libraries
10873---------
10874
10875- [Specialized `Vec::from_iter` being passed `vec::IntoIter`][40731] if the
10876 iterator hasn't been advanced the original `Vec` is reassembled with no actual
10877 iteration or reallocation.
10878- [Simplified HashMap Bucket interface][40561] provides performance
10879 improvements for iterating and cloning.
10880- [Specialize Vec::from_elem to use calloc][40409]
10881- [Fixed Race condition in fs::create_dir_all][39799]
10882- [No longer caching stdio on Windows][40516]
10883- [Optimized insertion sort in slice][40807] insertion sort in some cases
10884 2.50%~ faster and in one case now 12.50% faster.
10885- [Optimized `AtomicBool::fetch_nand`][41143]
10886
10887Stabilized APIs
10888---------------
10889
10890- [`Child::try_wait`]
10891- [`HashMap::retain`]
10892- [`HashSet::retain`]
10893- [`PeekMut::pop`]
10894- [`TcpStream::peek`]
10895- [`UdpSocket::peek`]
10896- [`UdpSocket::peek_from`]
10897
10898Cargo
10899-----
10900
10901- [Added partial Pijul support][cargo/3842] Pijul is a version control system in Rust.
10902 You can now create new cargo projects with Pijul using `cargo new --vcs pijul`
10903- [Now always emits build script warnings for crates that fail to build][cargo/3847]
10904- [Added Android build support][cargo/3885]
10905- [Added `--bins` and `--tests` flags][cargo/3901] now you can build all programs
10906 of a certain type, for example `cargo build --bins` will build all
10907 binaries.
10908- [Added support for haiku][cargo/3952]
10909
10910Misc
10911----
10912
10913- [rustdoc can now use pulldown-cmark with the `--enable-commonmark` flag][40338]
10914- [Rust now uses the official cross compiler for NetBSD][40612]
10915- [rustdoc now accepts `#` at the start of files][40828]
10916- [Fixed jemalloc support for musl][41168]
10917
10918Compatibility Notes
10919-------------------
10920
10921- [Changes to how the `0` flag works in format!][40241] Padding zeroes are now
10922 always placed after the sign if it exists and before the digits. With the `#`
10923 flag the zeroes are placed after the prefix and before the digits.
10924- [Due to the struct field optimisation][40377], using `transmute` on structs
10925 that have no `repr` attribute or `#[repr(Rust)]` will no longer work. This has
10926 always been undefined behavior, but is now more likely to break in practice.
10927- [The refactor of trait object type parsing][40043] fixed a bug where `+` was
10928 receiving the wrong priority parsing things like `&for<'a> Tr<'a> + Send` as
10929 `&(for<'a> Tr<'a> + Send)` instead of `(&for<'a> Tr<'a>) + Send`
10930- [Overlapping inherent `impl`s are now a hard error][40728]
10931- [`PartialOrd` and `Ord` must agree on the ordering.][41270]
10932- [`rustc main.rs -o out --emit=asm,llvm-ir`][41085] Now will output
10933 `out.asm` and `out.ll` instead of only one of the filetypes.
10934- [ calling a function that returns `Self` will no longer work][41805] when
10935 the size of `Self` cannot be statically determined.
10936- [rustc now builds with a "pthreads" flavour of MinGW for Windows GNU][40805]
10937 this has caused a few regressions namely:
10938
10939 - Changed the link order of local static/dynamic libraries (respecting the
10940 order on given rather than having the compiler reorder).
10941 - Changed how MinGW is linked, native code linked to dynamic libraries
10942 may require manually linking to the gcc support library (for the native
10943 code itself)
10944
10945[38165]: https://github.com/rust-lang/rust/pull/38165
10946[39799]: https://github.com/rust-lang/rust/pull/39799
10947[39891]: https://github.com/rust-lang/rust/pull/39891
10948[40043]: https://github.com/rust-lang/rust/pull/40043
10949[40241]: https://github.com/rust-lang/rust/pull/40241
10950[40338]: https://github.com/rust-lang/rust/pull/40338
10951[40367]: https://github.com/rust-lang/rust/pull/40367
10952[40377]: https://github.com/rust-lang/rust/pull/40377
10953[40409]: https://github.com/rust-lang/rust/pull/40409
10954[40516]: https://github.com/rust-lang/rust/pull/40516
10955[40556]: https://github.com/rust-lang/rust/pull/40556
10956[40561]: https://github.com/rust-lang/rust/pull/40561
10957[40589]: https://github.com/rust-lang/rust/pull/40589
10958[40612]: https://github.com/rust-lang/rust/pull/40612
10959[40723]: https://github.com/rust-lang/rust/pull/40723
10960[40728]: https://github.com/rust-lang/rust/pull/40728
10961[40731]: https://github.com/rust-lang/rust/pull/40731
10962[40734]: https://github.com/rust-lang/rust/pull/40734
10963[40805]: https://github.com/rust-lang/rust/pull/40805
10964[40807]: https://github.com/rust-lang/rust/pull/40807
10965[40828]: https://github.com/rust-lang/rust/pull/40828
10966[40870]: https://github.com/rust-lang/rust/pull/40870
10967[41085]: https://github.com/rust-lang/rust/pull/41085
10968[41143]: https://github.com/rust-lang/rust/pull/41143
10969[41168]: https://github.com/rust-lang/rust/pull/41168
10970[41270]: https://github.com/rust-lang/rust/issues/41270
10971[41469]: https://github.com/rust-lang/rust/pull/41469
10972[41805]: https://github.com/rust-lang/rust/issues/41805
10973[RFC 1422]: https://github.com/rust-lang/rfcs/blob/master/text/1422-pub-restricted.md
10974[RFC 1665]: https://github.com/rust-lang/rfcs/blob/master/text/1665-windows-subsystem.md
10975[`Child::try_wait`]: https://doc.rust-lang.org/std/process/struct.Child.html#method.try_wait
10976[`HashMap::retain`]: https://doc.rust-lang.org/std/collections/struct.HashMap.html#method.retain
10977[`HashSet::retain`]: https://doc.rust-lang.org/std/collections/struct.HashSet.html#method.retain
10978[`PeekMut::pop`]: https://doc.rust-lang.org/std/collections/binary_heap/struct.PeekMut.html#method.pop
10979[`TcpStream::peek`]: https://doc.rust-lang.org/std/net/struct.TcpStream.html#method.peek
10980[`UdpSocket::peek_from`]: https://doc.rust-lang.org/std/net/struct.UdpSocket.html#method.peek_from
10981[`UdpSocket::peek`]: https://doc.rust-lang.org/std/net/struct.UdpSocket.html#method.peek
10982[cargo/3842]: https://github.com/rust-lang/cargo/pull/3842
10983[cargo/3847]: https://github.com/rust-lang/cargo/pull/3847
10984[cargo/3885]: https://github.com/rust-lang/cargo/pull/3885
10985[cargo/3901]: https://github.com/rust-lang/cargo/pull/3901
10986[cargo/3952]: https://github.com/rust-lang/cargo/pull/3952
10987
10988
10989Version 1.17.0 (2017-04-27)
10990===========================
10991
10992Language
10993--------
10994
10995* [The lifetime of statics and consts defaults to `'static`][39265]. [RFC 1623]
10996* [Fields of structs may be initialized without duplicating the field/variable
10997 names][39761]. [RFC 1682]
10998* [`Self` may be included in the `where` clause of `impls`][38864]. [RFC 1647]
10999* [When coercing to an unsized type lifetimes must be equal][40319]. That is,
11000 there is no subtyping between `T` and `U` when `T: Unsize<U>`. For example,
11001 coercing `&mut [&'a X; N]` to `&mut [&'b X]` requires `'a` be equal to
11002 `'b`. Soundness fix.
11003* [Values passed to the indexing operator, `[]`, automatically coerce][40166]
11004* [Static variables may contain references to other statics][40027]
11005
11006Compiler
11007--------
11008
11009* [Exit quickly on only `--emit dep-info`][40336]
11010* [Make `-C relocation-model` more correctly determine whether the linker
11011 creates a position-independent executable][40245]
11012* [Add `-C overflow-checks` to directly control whether integer overflow
11013 panics][40037]
11014* [The rustc type checker now checks items on demand instead of in a single
11015 in-order pass][40008]. This is mostly an internal refactoring in support of
11016 future work, including incremental type checking, but also resolves [RFC
11017 1647], allowing `Self` to appear in `impl` `where` clauses.
11018* [Optimize vtable loads][39995]
11019* [Turn off vectorization for Emscripten targets][39990]
11020* [Provide suggestions for unknown macros imported with `use`][39953]
11021* [Fix ICEs in path resolution][39939]
11022* [Strip exception handling code on Emscripten when `panic=abort`][39193]
11023* [Add clearer error message using `&str + &str`][39116]
11024
11025Stabilized APIs
11026---------------
11027
11028* [`Arc::into_raw`]
11029* [`Arc::from_raw`]
11030* [`Arc::ptr_eq`]
11031* [`Rc::into_raw`]
11032* [`Rc::from_raw`]
11033* [`Rc::ptr_eq`]
11034* [`Ordering::then`]
11035* [`Ordering::then_with`]
11036* [`BTreeMap::range`]
11037* [`BTreeMap::range_mut`]
11038* [`collections::Bound`]
11039* [`process::abort`]
11040* [`ptr::read_unaligned`]
11041* [`ptr::write_unaligned`]
11042* [`Result::expect_err`]
11043* [`Cell::swap`]
11044* [`Cell::replace`]
11045* [`Cell::into_inner`]
11046* [`Cell::take`]
11047
11048Libraries
11049---------
11050
11051* [`BTreeMap` and `BTreeSet` can iterate over ranges][27787]
11052* [`Cell` can store non-`Copy` types][39793]. [RFC 1651]
11053* [`String` implements `FromIterator<&char>`][40028]
11054* `Box` [implements][40009] a number of new conversions:
11055 `From<Box<str>> for String`,
11056 `From<Box<[T]>> for Vec<T>`,
11057 `From<Box<CStr>> for CString`,
11058 `From<Box<OsStr>> for OsString`,
11059 `From<Box<Path>> for PathBuf`,
11060 `Into<Box<str>> for String`,
11061 `Into<Box<[T]>> for Vec<T>`,
11062 `Into<Box<CStr>> for CString`,
11063 `Into<Box<OsStr>> for OsString`,
11064 `Into<Box<Path>> for PathBuf`,
11065 `Default for Box<str>`,
11066 `Default for Box<CStr>`,
11067 `Default for Box<OsStr>`,
11068 `From<&CStr> for Box<CStr>`,
11069 `From<&OsStr> for Box<OsStr>`,
11070 `From<&Path> for Box<Path>`
11071* [`ffi::FromBytesWithNulError` implements `Error` and `Display`][39960]
11072* [Specialize `PartialOrd<A> for [A] where A: Ord`][39642]
11073* [Slightly optimize `slice::sort`][39538]
11074* [Add `ToString` trait specialization for `Cow<'a, str>` and `String`][39440]
11075* [`Box<[T]>` implements `From<&[T]> where T: Copy`,
11076 `Box<str>` implements `From<&str>`][39438]
11077* [`IpAddr` implements `From` for various arrays. `SocketAddr` implements
11078 `From<(I, u16)> where I: Into<IpAddr>`][39372]
11079* [`format!` estimates the needed capacity before writing a string][39356]
11080* [Support unprivileged symlink creation in Windows][38921]
11081* [`PathBuf` implements `Default`][38764]
11082* [Implement `PartialEq<[A]>` for `VecDeque<A>`][38661]
11083* [`HashMap` resizes adaptively][38368] to guard against DOS attacks
11084 and poor hash functions.
11085
11086Cargo
11087-----
11088
11089* [Add `cargo check --all`][cargo/3731]
11090* [Add an option to ignore SSL revocation checking][cargo/3699]
11091* [Add `cargo run --package`][cargo/3691]
11092* [Add `required_features`][cargo/3667]
11093* [Assume `build.rs` is a build script][cargo/3664]
11094* [Find workspace via `workspace_root` link in containing member][cargo/3562]
11095
11096Misc
11097----
11098
11099* [Documentation is rendered with mdbook instead of the obsolete, in-tree
11100 `rustbook`][39633]
11101* [The "Unstable Book" documents nightly-only features][ubook]
11102* [Improve the style of the sidebar in rustdoc output][40265]
11103* [Configure build correctly on 64-bit CPU's with the armhf ABI][40261]
11104* [Fix MSP430 breakage due to `i128`][40257]
11105* [Preliminary Solaris/SPARCv9 support][39903]
11106* [`rustc` is linked statically on Windows MSVC targets][39837], allowing it to
11107 run without installing the MSVC runtime.
11108* [`rustdoc --test` includes file names in test names][39788]
11109* This release includes builds of `std` for `sparc64-unknown-linux-gnu`,
11110 `aarch64-unknown-linux-fuchsia`, and `x86_64-unknown-linux-fuchsia`.
11111* [Initial support for `aarch64-unknown-freebsd`][39491]
11112* [Initial support for `i686-unknown-netbsd`][39426]
11113* [This release no longer includes the old makefile build system][39431]. Rust
11114 is built with a custom build system, written in Rust, and with Cargo.
11115* [Add Debug implementations for libcollection structs][39002]
11116* [`TypeId` implements `PartialOrd` and `Ord`][38981]
11117* [`--test-threads=0` produces an error][38945]
11118* [`rustup` installs documentation by default][40526]
11119* [The Rust source includes NatVis visualizations][39843]. These can be used by
11120 WinDbg and Visual Studio to improve the debugging experience.
11121
11122Compatibility Notes
11123-------------------
11124
11125* [Rust 1.17 does not correctly detect the MSVC 2017 linker][38584]. As a
11126 workaround, either use MSVC 2015 or run vcvars.bat.
11127* [When coercing to an unsized type lifetimes must be equal][40319]. That is,
11128 disallow subtyping between `T` and `U` when `T: Unsize<U>`, e.g. coercing
11129 `&mut [&'a X; N]` to `&mut [&'b X]` requires `'a` be equal to `'b`. Soundness
11130 fix.
11131* [`format!` and `Display::to_string` panic if an underlying formatting
11132 implementation returns an error][40117]. Previously the error was silently
11133 ignored. It is incorrect for `write_fmt` to return an error when writing
11134 to a string.
11135* [In-tree crates are verified to be unstable][39851]. Previously, some minor
11136 crates were marked stable and could be accessed from the stable toolchain.
11137* [Rust git source no longer includes vendored crates][39728]. Those that need
11138 to build with vendored crates should build from release tarballs.
11139* [Fix inert attributes from `proc_macro_derives`][39572]
11140* [During crate resolution, rustc prefers a crate in the sysroot if two crates
11141 are otherwise identical][39518]. Unlikely to be encountered outside the Rust
11142 build system.
11143* [Fixed bugs around how type inference interacts with dead-code][39485]. The
11144 existing code generally ignores the type of dead-code unless a type-hint is
11145 provided; this can cause surprising inference interactions particularly around
11146 defaulting. The new code uniformly ignores the result type of dead-code.
11147* [Tuple-struct constructors with private fields are no longer visible][38932]
11148* [Lifetime parameters that do not appear in the arguments are now considered
11149 early-bound][38897], resolving a soundness bug (#[32330]). The
11150 `hr_lifetime_in_assoc_type` future-compatibility lint has been in effect since
11151 April of 2016.
11152* [rustdoc: fix doctests with non-feature crate attributes][38161]
11153* [Make transmuting from fn item types to pointer-sized types a hard
11154 error][34198]
11155
11156[27787]: https://github.com/rust-lang/rust/issues/27787
11157[32330]: https://github.com/rust-lang/rust/issues/32330
11158[34198]: https://github.com/rust-lang/rust/pull/34198
11159[38161]: https://github.com/rust-lang/rust/pull/38161
11160[38368]: https://github.com/rust-lang/rust/pull/38368
11161[38584]: https://github.com/rust-lang/rust/issues/38584
11162[38661]: https://github.com/rust-lang/rust/pull/38661
11163[38764]: https://github.com/rust-lang/rust/pull/38764
11164[38864]: https://github.com/rust-lang/rust/issues/38864
11165[38897]: https://github.com/rust-lang/rust/pull/38897
11166[38921]: https://github.com/rust-lang/rust/pull/38921
11167[38932]: https://github.com/rust-lang/rust/pull/38932
11168[38945]: https://github.com/rust-lang/rust/pull/38945
11169[38981]: https://github.com/rust-lang/rust/pull/38981
11170[39002]: https://github.com/rust-lang/rust/pull/39002
11171[39116]: https://github.com/rust-lang/rust/pull/39116
11172[39193]: https://github.com/rust-lang/rust/pull/39193
11173[39265]: https://github.com/rust-lang/rust/pull/39265
11174[39356]: https://github.com/rust-lang/rust/pull/39356
11175[39372]: https://github.com/rust-lang/rust/pull/39372
11176[39426]: https://github.com/rust-lang/rust/pull/39426
11177[39431]: https://github.com/rust-lang/rust/pull/39431
11178[39438]: https://github.com/rust-lang/rust/pull/39438
11179[39440]: https://github.com/rust-lang/rust/pull/39440
11180[39485]: https://github.com/rust-lang/rust/pull/39485
11181[39491]: https://github.com/rust-lang/rust/pull/39491
11182[39518]: https://github.com/rust-lang/rust/pull/39518
11183[39538]: https://github.com/rust-lang/rust/pull/39538
11184[39572]: https://github.com/rust-lang/rust/pull/39572
11185[39633]: https://github.com/rust-lang/rust/pull/39633
11186[39642]: https://github.com/rust-lang/rust/pull/39642
11187[39728]: https://github.com/rust-lang/rust/pull/39728
11188[39761]: https://github.com/rust-lang/rust/pull/39761
11189[39788]: https://github.com/rust-lang/rust/pull/39788
11190[39793]: https://github.com/rust-lang/rust/pull/39793
11191[39837]: https://github.com/rust-lang/rust/pull/39837
11192[39843]: https://github.com/rust-lang/rust/pull/39843
11193[39851]: https://github.com/rust-lang/rust/pull/39851
11194[39903]: https://github.com/rust-lang/rust/pull/39903
11195[39939]: https://github.com/rust-lang/rust/pull/39939
11196[39953]: https://github.com/rust-lang/rust/pull/39953
11197[39960]: https://github.com/rust-lang/rust/pull/39960
11198[39990]: https://github.com/rust-lang/rust/pull/39990
11199[39995]: https://github.com/rust-lang/rust/pull/39995
11200[40008]: https://github.com/rust-lang/rust/pull/40008
11201[40009]: https://github.com/rust-lang/rust/pull/40009
11202[40027]: https://github.com/rust-lang/rust/pull/40027
11203[40028]: https://github.com/rust-lang/rust/pull/40028
11204[40037]: https://github.com/rust-lang/rust/pull/40037
11205[40117]: https://github.com/rust-lang/rust/pull/40117
11206[40166]: https://github.com/rust-lang/rust/pull/40166
11207[40245]: https://github.com/rust-lang/rust/pull/40245
11208[40257]: https://github.com/rust-lang/rust/pull/40257
11209[40261]: https://github.com/rust-lang/rust/pull/40261
11210[40265]: https://github.com/rust-lang/rust/pull/40265
11211[40319]: https://github.com/rust-lang/rust/pull/40319
11212[40336]: https://github.com/rust-lang/rust/pull/40336
11213[40526]: https://github.com/rust-lang/rust/pull/40526
11214[RFC 1623]: https://github.com/rust-lang/rfcs/blob/master/text/1623-static.md
11215[RFC 1647]: https://github.com/rust-lang/rfcs/blob/master/text/1647-allow-self-in-where-clauses.md
11216[RFC 1651]: https://github.com/rust-lang/rfcs/blob/master/text/1651-movecell.md
11217[RFC 1682]: https://github.com/rust-lang/rfcs/blob/master/text/1682-field-init-shorthand.md
11218[`Arc::from_raw`]: https://doc.rust-lang.org/std/sync/struct.Arc.html#method.from_raw
11219[`Arc::into_raw`]: https://doc.rust-lang.org/std/sync/struct.Arc.html#method.into_raw
11220[`Arc::ptr_eq`]: https://doc.rust-lang.org/std/sync/struct.Arc.html#method.ptr_eq
11221[`BTreeMap::range_mut`]: https://doc.rust-lang.org/std/collections/btree_map/struct.BTreeMap.html#method.range_mut
11222[`BTreeMap::range`]: https://doc.rust-lang.org/std/collections/btree_map/struct.BTreeMap.html#method.range
11223[`Cell::into_inner`]: https://doc.rust-lang.org/std/cell/struct.Cell.html#method.into_inner
11224[`Cell::replace`]: https://doc.rust-lang.org/std/cell/struct.Cell.html#method.replace
11225[`Cell::swap`]: https://doc.rust-lang.org/std/cell/struct.Cell.html#method.swap
11226[`Cell::take`]: https://doc.rust-lang.org/std/cell/struct.Cell.html#method.take
11227[`Ordering::then_with`]: https://doc.rust-lang.org/std/cmp/enum.Ordering.html#method.then_with
11228[`Ordering::then`]: https://doc.rust-lang.org/std/cmp/enum.Ordering.html#method.then
11229[`Rc::from_raw`]: https://doc.rust-lang.org/std/rc/struct.Rc.html#method.from_raw
11230[`Rc::into_raw`]: https://doc.rust-lang.org/std/rc/struct.Rc.html#method.into_raw
11231[`Rc::ptr_eq`]: https://doc.rust-lang.org/std/rc/struct.Rc.html#method.ptr_eq
11232[`Result::expect_err`]: https://doc.rust-lang.org/std/result/enum.Result.html#method.expect_err
11233[`collections::Bound`]: https://doc.rust-lang.org/std/collections/enum.Bound.html
11234[`process::abort`]: https://doc.rust-lang.org/std/process/fn.abort.html
11235[`ptr::read_unaligned`]: https://doc.rust-lang.org/std/ptr/fn.read_unaligned.html
11236[`ptr::write_unaligned`]: https://doc.rust-lang.org/std/ptr/fn.write_unaligned.html
11237[cargo/3562]: https://github.com/rust-lang/cargo/pull/3562
11238[cargo/3664]: https://github.com/rust-lang/cargo/pull/3664
11239[cargo/3667]: https://github.com/rust-lang/cargo/pull/3667
11240[cargo/3691]: https://github.com/rust-lang/cargo/pull/3691
11241[cargo/3699]: https://github.com/rust-lang/cargo/pull/3699
11242[cargo/3731]: https://github.com/rust-lang/cargo/pull/3731
11243[ubook]: https://doc.rust-lang.org/unstable-book/
11244
11245
11246Version 1.16.0 (2017-03-16)
11247===========================
11248
11249Language
11250--------
11251
11252* [The compiler's `dead_code` lint now accounts for type aliases][38051].
11253* [Uninhabitable enums (those without any variants) no longer permit wildcard
11254 match patterns][38069]
11255* [Clean up semantics of `self` in an import list][38313]
11256* [`Self` may appear in `impl` headers][38920]
11257* [`Self` may appear in struct expressions][39282]
11258
11259Compiler
11260--------
11261
11262* [`rustc` now supports `--emit=metadata`, which causes rustc to emit
11263 a `.rmeta` file containing only crate metadata][38571]. This can be
11264 used by tools like the Rust Language Service to perform
11265 metadata-only builds.
11266* [Levenshtein based typo suggestions now work in most places, while
11267 previously they worked only for fields and sometimes for local
11268 variables][38927]. Together with the overhaul of "no
11269 resolution"/"unexpected resolution" errors (#[38154]) they result in
11270 large and systematic improvement in resolution diagnostics.
11271* [Fix `transmute::<T, U>` where `T` requires a bigger alignment than
11272 `U`][38670]
11273* [rustc: use -Xlinker when specifying an rpath with ',' in it][38798]
11274* [`rustc` no longer attempts to provide "consider using an explicit
11275 lifetime" suggestions][37057]. They were inaccurate.
11276
11277Stabilized APIs
11278---------------
11279
11280* [`VecDeque::truncate`]
11281* [`VecDeque::resize`]
11282* [`String::insert_str`]
11283* [`Duration::checked_add`]
11284* [`Duration::checked_sub`]
11285* [`Duration::checked_div`]
11286* [`Duration::checked_mul`]
11287* [`str::replacen`]
11288* [`str::repeat`]
11289* [`SocketAddr::is_ipv4`]
11290* [`SocketAddr::is_ipv6`]
11291* [`IpAddr::is_ipv4`]
11292* [`IpAddr::is_ipv6`]
11293* [`Vec::dedup_by`]
11294* [`Vec::dedup_by_key`]
11295* [`Result::unwrap_or_default`]
11296* [`<*const T>::wrapping_offset`]
11297* [`<*mut T>::wrapping_offset`]
11298* `CommandExt::creation_flags`
11299* [`File::set_permissions`]
11300* [`String::split_off`]
11301
11302Libraries
11303---------
11304
11305* [`[T]::binary_search` and `[T]::binary_search_by_key` now take
11306 their argument by `Borrow` parameter][37761]
11307* [All public types in std implement `Debug`][38006]
11308* [`IpAddr` implements `From<Ipv4Addr>` and `From<Ipv6Addr>`][38327]
11309* [`Ipv6Addr` implements `From<[u16; 8]>`][38131]
11310* [Ctrl-Z returns from `Stdin.read()` when reading from the console on
11311 Windows][38274]
11312* [std: Fix partial writes in `LineWriter`][38062]
11313* [std: Clamp max read/write sizes on Unix][38622]
11314* [Use more specific panic message for `&str` slicing errors][38066]
11315* [`TcpListener::set_only_v6` is deprecated][38304]. This
11316 functionality cannot be achieved in std currently.
11317* [`writeln!`, like `println!`, now accepts a form with no string
11318 or formatting arguments, to just print a newline][38469]
11319* [Implement `iter::Sum` and `iter::Product` for `Result`][38580]
11320* [Reduce the size of static data in `std_unicode::tables`][38781]
11321* [`char::EscapeDebug`, `EscapeDefault`, `EscapeUnicode`,
11322 `CaseMappingIter`, `ToLowercase`, `ToUppercase`, implement
11323 `Display`][38909]
11324* [`Duration` implements `Sum`][38712]
11325* [`String` implements `ToSocketAddrs`][39048]
11326
11327Cargo
11328-----
11329
11330* [The `cargo check` command does a type check of a project without
11331 building it][cargo/3296]
11332* [crates.io will display CI badges from Travis and AppVeyor, if
11333 specified in Cargo.toml][cargo/3546]
11334* [crates.io will display categories listed in Cargo.toml][cargo/3301]
11335* [Compilation profiles accept integer values for `debug`, in addition
11336 to `true` and `false`. These are passed to `rustc` as the value to
11337 `-C debuginfo`][cargo/3534]
11338* [Implement `cargo --version --verbose`][cargo/3604]
11339* [All builds now output 'dep-info' build dependencies compatible with
11340 make and ninja][cargo/3557]
11341* [Build all workspace members with `build --all`][cargo/3511]
11342* [Document all workspace members with `doc --all`][cargo/3515]
11343* [Path deps outside workspace are not members][cargo/3443]
11344
11345Misc
11346----
11347
11348* [`rustdoc` has a `--sysroot` argument that, like `rustc`, specifies
11349 the path to the Rust implementation][38589]
11350* [The `armv7-linux-androideabi` target no longer enables NEON
11351 extensions, per Google's ABI guide][38413]
11352* [The stock standard library can be compiled for Redox OS][38401]
11353* [Rust has initial SPARC support][38726]. Tier 3. No builds
11354 available.
11355* [Rust has experimental support for Nvidia PTX][38559]. Tier 3. No
11356 builds available.
11357* [Fix backtraces on i686-pc-windows-gnu by disabling FPO][39379]
11358
11359Compatibility Notes
11360-------------------
11361
11362* [Uninhabitable enums (those without any variants) no longer permit wildcard
11363 match patterns][38069]
11364* In this release, references to uninhabited types can not be
11365 pattern-matched. This was accidentally allowed in 1.15.
11366* [The compiler's `dead_code` lint now accounts for type aliases][38051].
11367* [Ctrl-Z returns from `Stdin.read()` when reading from the console on
11368 Windows][38274]
11369* [Clean up semantics of `self` in an import list][38313]
11370* Reimplemented lifetime elision. This change was almost entirely compatible
11371 with existing code, but it did close a number of small bugs and loopholes,
11372 as well as being more accepting in some other [cases][41105].
11373
11374[37057]: https://github.com/rust-lang/rust/pull/37057
11375[37761]: https://github.com/rust-lang/rust/pull/37761
11376[38006]: https://github.com/rust-lang/rust/pull/38006
11377[38051]: https://github.com/rust-lang/rust/pull/38051
11378[38062]: https://github.com/rust-lang/rust/pull/38062
11379[38622]: https://github.com/rust-lang/rust/pull/38622
11380[38066]: https://github.com/rust-lang/rust/pull/38066
11381[38069]: https://github.com/rust-lang/rust/pull/38069
11382[38131]: https://github.com/rust-lang/rust/pull/38131
11383[38154]: https://github.com/rust-lang/rust/pull/38154
11384[38274]: https://github.com/rust-lang/rust/pull/38274
11385[38304]: https://github.com/rust-lang/rust/pull/38304
11386[38313]: https://github.com/rust-lang/rust/pull/38313
11387[38327]: https://github.com/rust-lang/rust/pull/38327
11388[38401]: https://github.com/rust-lang/rust/pull/38401
11389[38413]: https://github.com/rust-lang/rust/pull/38413
11390[38469]: https://github.com/rust-lang/rust/pull/38469
11391[38559]: https://github.com/rust-lang/rust/pull/38559
11392[38571]: https://github.com/rust-lang/rust/pull/38571
11393[38580]: https://github.com/rust-lang/rust/pull/38580
11394[38589]: https://github.com/rust-lang/rust/pull/38589
11395[38670]: https://github.com/rust-lang/rust/pull/38670
11396[38712]: https://github.com/rust-lang/rust/pull/38712
11397[38726]: https://github.com/rust-lang/rust/pull/38726
11398[38781]: https://github.com/rust-lang/rust/pull/38781
11399[38798]: https://github.com/rust-lang/rust/pull/38798
11400[38909]: https://github.com/rust-lang/rust/pull/38909
11401[38920]: https://github.com/rust-lang/rust/pull/38920
11402[38927]: https://github.com/rust-lang/rust/pull/38927
11403[39048]: https://github.com/rust-lang/rust/pull/39048
11404[39282]: https://github.com/rust-lang/rust/pull/39282
11405[39379]: https://github.com/rust-lang/rust/pull/39379
11406[41105]: https://github.com/rust-lang/rust/issues/41105
11407[`<*const T>::wrapping_offset`]: https://doc.rust-lang.org/std/primitive.pointer.html#method.wrapping_offset
11408[`<*mut T>::wrapping_offset`]: https://doc.rust-lang.org/std/primitive.pointer.html#method.wrapping_offset-1
11409[`Duration::checked_add`]: https://doc.rust-lang.org/std/time/struct.Duration.html#method.checked_add
11410[`Duration::checked_div`]: https://doc.rust-lang.org/std/time/struct.Duration.html#method.checked_div
11411[`Duration::checked_mul`]: https://doc.rust-lang.org/std/time/struct.Duration.html#method.checked_mul
11412[`Duration::checked_sub`]: https://doc.rust-lang.org/std/time/struct.Duration.html#method.checked_sub
11413[`File::set_permissions`]: https://doc.rust-lang.org/std/fs/struct.File.html#method.set_permissions
11414[`IpAddr::is_ipv4`]: https://doc.rust-lang.org/std/net/enum.IpAddr.html#method.is_ipv4
11415[`IpAddr::is_ipv6`]: https://doc.rust-lang.org/std/net/enum.IpAddr.html#method.is_ipv6
11416[`Result::unwrap_or_default`]: https://doc.rust-lang.org/std/result/enum.Result.html#method.unwrap_or_default
11417[`SocketAddr::is_ipv4`]: https://doc.rust-lang.org/std/net/enum.SocketAddr.html#method.is_ipv4
11418[`SocketAddr::is_ipv6`]: https://doc.rust-lang.org/std/net/enum.SocketAddr.html#method.is_ipv6
11419[`String::insert_str`]: https://doc.rust-lang.org/std/string/struct.String.html#method.insert_str
11420[`String::split_off`]: https://doc.rust-lang.org/std/string/struct.String.html#method.split_off
11421[`Vec::dedup_by_key`]: https://doc.rust-lang.org/std/vec/struct.Vec.html#method.dedup_by_key
11422[`Vec::dedup_by`]: https://doc.rust-lang.org/std/vec/struct.Vec.html#method.dedup_by
11423[`VecDeque::resize`]: https://doc.rust-lang.org/std/collections/vec_deque/struct.VecDeque.html#method.resize
11424[`VecDeque::truncate`]: https://doc.rust-lang.org/std/collections/vec_deque/struct.VecDeque.html#method.truncate
11425[`str::repeat`]: https://doc.rust-lang.org/std/primitive.str.html#method.repeat
11426[`str::replacen`]: https://doc.rust-lang.org/std/primitive.str.html#method.replacen
11427[cargo/3296]: https://github.com/rust-lang/cargo/pull/3296
11428[cargo/3301]: https://github.com/rust-lang/cargo/pull/3301
11429[cargo/3443]: https://github.com/rust-lang/cargo/pull/3443
11430[cargo/3511]: https://github.com/rust-lang/cargo/pull/3511
11431[cargo/3515]: https://github.com/rust-lang/cargo/pull/3515
11432[cargo/3534]: https://github.com/rust-lang/cargo/pull/3534
11433[cargo/3546]: https://github.com/rust-lang/cargo/pull/3546
11434[cargo/3557]: https://github.com/rust-lang/cargo/pull/3557
11435[cargo/3604]: https://github.com/rust-lang/cargo/pull/3604
11436
11437
11438Version 1.15.1 (2017-02-09)
11439===========================
11440
11441* [Fix IntoIter::as_mut_slice's signature][39466]
11442* [Compile compiler builtins with `-fPIC` on 32-bit platforms][39523]
11443
11444[39466]: https://github.com/rust-lang/rust/pull/39466
11445[39523]: https://github.com/rust-lang/rust/pull/39523
11446
11447
11448Version 1.15.0 (2017-02-02)
11449===========================
11450
11451Language
11452--------
11453
11454* Basic procedural macros allowing custom `#[derive]`, aka "macros 1.1", are
11455 stable. This allows popular code-generating crates like Serde and Diesel to
11456 work ergonomically. [RFC 1681].
11457* [Tuple structs may be empty. Unary and empty tuple structs may be instantiated
11458 with curly braces][36868]. Part of [RFC 1506].
11459* [A number of minor changes to name resolution have been activated][37127].
11460 They add up to more consistent semantics, allowing for future evolution of
11461 Rust macros. Specified in [RFC 1560], see its section on ["changes"] for
11462 details of what is different. The breaking changes here have been transitioned
11463 through the [`legacy_imports`] lint since 1.14, with no known regressions.
11464* [In `macro_rules`, `path` fragments can now be parsed as type parameter
11465 bounds][38279]
11466* [`?Sized` can be used in `where` clauses][37791]
11467* [There is now a limit on the size of monomorphized types and it can be
11468 modified with the `#![type_size_limit]` crate attribute, similarly to
11469 the `#![recursion_limit]` attribute][37789]
11470
11471Compiler
11472--------
11473
11474* [On Windows, the compiler will apply dllimport attributes when linking to
11475 extern functions][37973]. Additional attributes and flags can control which
11476 library kind is linked and its name. [RFC 1717].
11477* [Rust-ABI symbols are no longer exported from cdylibs][38117]
11478* [The `--test` flag works with procedural macro crates][38107]
11479* [Fix `extern "aapcs" fn` ABI][37814]
11480* [The `-C no-stack-check` flag is deprecated][37636]. It does nothing.
11481* [The `format!` expander recognizes incorrect `printf` and shell-style
11482 formatting directives and suggests the correct format][37613].
11483* [Only report one error for all unused imports in an import list][37456]
11484
11485Compiler Performance
11486--------------------
11487
11488* [Avoid unnecessary `mk_ty` calls in `Ty::super_fold_with`][37705]
11489* [Avoid more unnecessary `mk_ty` calls in `Ty::super_fold_with`][37979]
11490* [Don't clone in `UnificationTable::probe`][37848]
11491* [Remove `scope_auxiliary` to cut RSS by 10%][37764]
11492* [Use small vectors in type walker][37760]
11493* [Macro expansion performance was improved][37701]
11494* [Change `HirVec<P<T>>` to `HirVec<T>` in `hir::Expr`][37642]
11495* [Replace FNV with a faster hash function][37229]
11496
11497Stabilized APIs
11498---------------
11499
11500* [`std::iter::Iterator::min_by`]
11501* [`std::iter::Iterator::max_by`]
11502* [`std::os::*::fs::FileExt`]
11503* [`std::sync::atomic::Atomic*::get_mut`]
11504* [`std::sync::atomic::Atomic*::into_inner`]
11505* [`std::vec::IntoIter::as_slice`]
11506* [`std::vec::IntoIter::as_mut_slice`]
11507* [`std::sync::mpsc::Receiver::try_iter`]
11508* [`std::os::unix::process::CommandExt::before_exec`]
11509* [`std::rc::Rc::strong_count`]
11510* [`std::rc::Rc::weak_count`]
11511* [`std::sync::Arc::strong_count`]
11512* [`std::sync::Arc::weak_count`]
11513* [`std::char::encode_utf8`]
11514* [`std::char::encode_utf16`]
11515* [`std::cell::Ref::clone`]
11516* [`std::io::Take::into_inner`]
11517
11518Libraries
11519---------
11520
11521* [The standard sorting algorithm has been rewritten for dramatic performance
11522 improvements][38192]. It is a hybrid merge sort, drawing influences from
11523 Timsort. Previously it was a naive merge sort.
11524* [`Iterator::nth` no longer has a `Sized` bound][38134]
11525* [`Extend<&T>` is specialized for `Vec` where `T: Copy`][38182] to improve
11526 performance.
11527* [`chars().count()` is much faster][37888] and so are [`chars().last()`
11528 and `char_indices().last()`][37882]
11529* [Fix ARM Objective-C ABI in `std::env::args`][38146]
11530* [Chinese characters display correctly in `fmt::Debug`][37855]
11531* [Derive `Default` for `Duration`][37699]
11532* [Support creation of anonymous pipes on WinXP/2k][37677]
11533* [`mpsc::RecvTimeoutError` implements `Error`][37527]
11534* [Don't pass overlapped handles to processes][38835]
11535
11536Cargo
11537-----
11538
11539* [In this release, Cargo build scripts no longer have access to the `OUT_DIR`
11540 environment variable at build time via `env!("OUT_DIR")`][cargo/3368]. They
11541 should instead check the variable at runtime with `std::env`. That the value
11542 was set at build time was a bug, and incorrect when cross-compiling. This
11543 change is known to cause breakage.
11544* [Add `--all` flag to `cargo test`][cargo/3221]
11545* [Compile statically against the MSVC CRT][cargo/3363]
11546* [Mix feature flags into fingerprint/metadata shorthash][cargo/3102]
11547* [Link OpenSSL statically on OSX][cargo/3311]
11548* [Apply new fingerprinting to build dir outputs][cargo/3310]
11549* [Test for bad path overrides with summaries][cargo/3336]
11550* [Require `cargo install --vers` to take a semver version][cargo/3338]
11551* [Fix retrying crate downloads for network errors][cargo/3348]
11552* [Implement string lookup for `build.rustflags` config key][cargo/3356]
11553* [Emit more info on --message-format=json][cargo/3319]
11554* [Assume `build.rs` in the same directory as `Cargo.toml` is a build script][cargo/3361]
11555* [Don't ignore errors in workspace manifest][cargo/3409]
11556* [Fix `--message-format JSON` when rustc emits non-JSON warnings][cargo/3410]
11557
11558Tooling
11559-------
11560
11561* [Test runners (binaries built with `--test`) now support a `--list` argument
11562 that lists the tests it contains][38185]
11563* [Test runners now support a `--exact` argument that makes the test filter
11564 match exactly, instead of matching only a substring of the test name][38181]
11565* [rustdoc supports a `--playground-url` flag][37763]
11566* [rustdoc provides more details about `#[should_panic]` errors][37749]
11567
11568Misc
11569----
11570
11571* [The Rust build system is now written in Rust][37817]. The Makefiles may
11572 continue to be used in this release by passing `--disable-rustbuild` to the
11573 configure script, but they will be deleted soon. Note that the new build
11574 system uses a different on-disk layout that will likely affect any scripts
11575 building Rust.
11576* [Rust supports i686-unknown-openbsd][38086]. Tier 3 support. No testing or
11577 releases.
11578* [Rust supports the MSP430][37627]. Tier 3 support. No testing or releases.
11579* [Rust supports the ARMv5TE architecture][37615]. Tier 3 support. No testing or
11580 releases.
11581
11582Compatibility Notes
11583-------------------
11584
11585* [A number of minor changes to name resolution have been activated][37127].
11586 They add up to more consistent semantics, allowing for future evolution of
11587 Rust macros. Specified in [RFC 1560], see its section on ["changes"] for
11588 details of what is different. The breaking changes here have been transitioned
11589 through the [`legacy_imports`] lint since 1.14, with no known regressions.
11590* [In this release, Cargo build scripts no longer have access to the `OUT_DIR`
11591 environment variable at build time via `env!("OUT_DIR")`][cargo/3368]. They
11592 should instead check the variable at runtime with `std::env`. That the value
11593 was set at build time was a bug, and incorrect when cross-compiling. This
11594 change is known to cause breakage.
11595* [Higher-ranked lifetimes are no longer allowed to appear _only_ in associated
11596 types][33685]. The [`hr_lifetime_in_assoc_type` lint] has been a warning since
11597 1.10 and is now an error by default. It will become a hard error in the near
11598 future.
11599* [The semantics relating modules to file system directories are changing in
11600 minor ways][37602]. This is captured in the new `legacy_directory_ownership`
11601 lint, which is a warning in this release, and will become a hard error in the
11602 future.
11603* [Rust-ABI symbols are no longer exported from cdylibs][38117]
11604* [Once `Peekable` peeks a `None` it will return that `None` without re-querying
11605 the underlying iterator][37834]
11606
11607["changes"]: https://github.com/rust-lang/rfcs/blob/master/text/1560-name-resolution.md#changes-to-name-resolution-rules
11608[33685]: https://github.com/rust-lang/rust/issues/33685
11609[36868]: https://github.com/rust-lang/rust/pull/36868
11610[37127]: https://github.com/rust-lang/rust/pull/37127
11611[37229]: https://github.com/rust-lang/rust/pull/37229
11612[37456]: https://github.com/rust-lang/rust/pull/37456
11613[37527]: https://github.com/rust-lang/rust/pull/37527
11614[37602]: https://github.com/rust-lang/rust/pull/37602
11615[37613]: https://github.com/rust-lang/rust/pull/37613
11616[37615]: https://github.com/rust-lang/rust/pull/37615
11617[37636]: https://github.com/rust-lang/rust/pull/37636
11618[37627]: https://github.com/rust-lang/rust/pull/37627
11619[37642]: https://github.com/rust-lang/rust/pull/37642
11620[37677]: https://github.com/rust-lang/rust/pull/37677
11621[37699]: https://github.com/rust-lang/rust/pull/37699
11622[37701]: https://github.com/rust-lang/rust/pull/37701
11623[37705]: https://github.com/rust-lang/rust/pull/37705
11624[37749]: https://github.com/rust-lang/rust/pull/37749
11625[37760]: https://github.com/rust-lang/rust/pull/37760
11626[37763]: https://github.com/rust-lang/rust/pull/37763
11627[37764]: https://github.com/rust-lang/rust/pull/37764
11628[37789]: https://github.com/rust-lang/rust/pull/37789
11629[37791]: https://github.com/rust-lang/rust/pull/37791
11630[37814]: https://github.com/rust-lang/rust/pull/37814
11631[37817]: https://github.com/rust-lang/rust/pull/37817
11632[37834]: https://github.com/rust-lang/rust/pull/37834
11633[37848]: https://github.com/rust-lang/rust/pull/37848
11634[37855]: https://github.com/rust-lang/rust/pull/37855
11635[37882]: https://github.com/rust-lang/rust/pull/37882
11636[37888]: https://github.com/rust-lang/rust/pull/37888
11637[37973]: https://github.com/rust-lang/rust/pull/37973
11638[37979]: https://github.com/rust-lang/rust/pull/37979
11639[38086]: https://github.com/rust-lang/rust/pull/38086
11640[38107]: https://github.com/rust-lang/rust/pull/38107
11641[38117]: https://github.com/rust-lang/rust/pull/38117
11642[38134]: https://github.com/rust-lang/rust/pull/38134
11643[38146]: https://github.com/rust-lang/rust/pull/38146
11644[38181]: https://github.com/rust-lang/rust/pull/38181
11645[38182]: https://github.com/rust-lang/rust/pull/38182
11646[38185]: https://github.com/rust-lang/rust/pull/38185
11647[38192]: https://github.com/rust-lang/rust/pull/38192
11648[38279]: https://github.com/rust-lang/rust/pull/38279
11649[38835]: https://github.com/rust-lang/rust/pull/38835
11650[RFC 1506]: https://github.com/rust-lang/rfcs/blob/master/text/1506-adt-kinds.md
11651[RFC 1560]: https://github.com/rust-lang/rfcs/blob/master/text/1560-name-resolution.md
11652[RFC 1681]: https://github.com/rust-lang/rfcs/blob/master/text/1681-macros-1.1.md
11653[RFC 1717]: https://github.com/rust-lang/rfcs/blob/master/text/1717-dllimport.md
11654[`hr_lifetime_in_assoc_type` lint]: https://github.com/rust-lang/rust/issues/33685
11655[`legacy_imports`]: https://github.com/rust-lang/rust/pull/38271
11656[cargo/3102]: https://github.com/rust-lang/cargo/pull/3102
11657[cargo/3221]: https://github.com/rust-lang/cargo/pull/3221
11658[cargo/3310]: https://github.com/rust-lang/cargo/pull/3310
11659[cargo/3311]: https://github.com/rust-lang/cargo/pull/3311
11660[cargo/3319]: https://github.com/rust-lang/cargo/pull/3319
11661[cargo/3336]: https://github.com/rust-lang/cargo/pull/3336
11662[cargo/3338]: https://github.com/rust-lang/cargo/pull/3338
11663[cargo/3348]: https://github.com/rust-lang/cargo/pull/3348
11664[cargo/3356]: https://github.com/rust-lang/cargo/pull/3356
11665[cargo/3361]: https://github.com/rust-lang/cargo/pull/3361
11666[cargo/3363]: https://github.com/rust-lang/cargo/pull/3363
11667[cargo/3368]: https://github.com/rust-lang/cargo/issues/3368
11668[cargo/3409]: https://github.com/rust-lang/cargo/pull/3409
11669[cargo/3410]: https://github.com/rust-lang/cargo/pull/3410
11670[`std::iter::Iterator::min_by`]: https://doc.rust-lang.org/std/iter/trait.Iterator.html#method.min_by
11671[`std::iter::Iterator::max_by`]: https://doc.rust-lang.org/std/iter/trait.Iterator.html#method.max_by
11672[`std::os::*::fs::FileExt`]: https://doc.rust-lang.org/std/os/unix/fs/trait.FileExt.html
11673[`std::sync::atomic::Atomic*::get_mut`]: https://doc.rust-lang.org/std/sync/atomic/struct.AtomicU8.html#method.get_mut
11674[`std::sync::atomic::Atomic*::into_inner`]: https://doc.rust-lang.org/std/sync/atomic/struct.AtomicU8.html#method.into_inner
11675[`std::vec::IntoIter::as_slice`]: https://doc.rust-lang.org/std/vec/struct.IntoIter.html#method.as_slice
11676[`std::vec::IntoIter::as_mut_slice`]: https://doc.rust-lang.org/std/vec/struct.IntoIter.html#method.as_mut_slice
11677[`std::sync::mpsc::Receiver::try_iter`]: https://doc.rust-lang.org/std/sync/mpsc/struct.Receiver.html#method.try_iter
11678[`std::os::unix::process::CommandExt::before_exec`]: https://doc.rust-lang.org/std/os/unix/process/trait.CommandExt.html#tymethod.before_exec
11679[`std::rc::Rc::strong_count`]: https://doc.rust-lang.org/std/rc/struct.Rc.html#method.strong_count
11680[`std::rc::Rc::weak_count`]: https://doc.rust-lang.org/std/rc/struct.Rc.html#method.weak_count
11681[`std::sync::Arc::strong_count`]: https://doc.rust-lang.org/std/sync/struct.Arc.html#method.strong_count
11682[`std::sync::Arc::weak_count`]: https://doc.rust-lang.org/std/sync/struct.Arc.html#method.weak_count
11683[`std::char::encode_utf8`]: https://doc.rust-lang.org/std/primitive.char.html#method.encode_utf8
11684[`std::char::encode_utf16`]: https://doc.rust-lang.org/std/primitive.char.html#method.encode_utf16
11685[`std::cell::Ref::clone`]: https://doc.rust-lang.org/std/cell/struct.Ref.html#method.clone
11686[`std::io::Take::into_inner`]: https://doc.rust-lang.org/std/io/struct.Take.html#method.into_inner
11687
11688
11689Version 1.14.0 (2016-12-22)
11690===========================
11691
11692Language
11693--------
11694
11695* [`..` matches multiple tuple fields in enum variants, structs
11696 and tuples][36843]. [RFC 1492].
11697* [Safe `fn` items can be coerced to `unsafe fn` pointers][37389]
11698* [`use *` and `use ::*` both glob-import from the crate root][37367]
11699* [It's now possible to call a `Vec<Box<Fn()>>` without explicit
11700 dereferencing][36822]
11701
11702Compiler
11703--------
11704
11705* [Mark enums with non-zero discriminant as non-zero][37224]
11706* [Lower-case `static mut` names are linted like other
11707 statics and consts][37162]
11708* [Fix ICE on some macros in const integer positions
11709 (e.g. `[u8; m!()]`)][36819]
11710* [Improve error message and snippet for "did you mean `x`"][36798]
11711* [Add a panic-strategy field to the target specification][36794]
11712* [Include LLVM version in `--version --verbose`][37200]
11713
11714Compile-time Optimizations
11715--------------------------
11716
11717* [Improve macro expansion performance][37569]
11718* [Shrink `Expr_::ExprInlineAsm`][37445]
11719* [Replace all uses of SHA-256 with BLAKE2b][37439]
11720* [Reduce the number of bytes hashed by `IchHasher`][37427]
11721* [Avoid more allocations when compiling html5ever][37373]
11722* [Use `SmallVector` in `CombineFields::instantiate`][37322]
11723* [Avoid some allocations in the macro parser][37318]
11724* [Use a faster deflate setting][37298]
11725* [Add `ArrayVec` and `AccumulateVec` to reduce heap allocations
11726 during interning of slices][37270]
11727* [Optimize `write_metadata`][37267]
11728* [Don't process obligation forest cycles when stalled][37231]
11729* [Avoid many `CrateConfig` clones][37161]
11730* [Optimize `Substs::super_fold_with`][37108]
11731* [Optimize `ObligationForest`'s `NodeState` handling][36993]
11732* [Speed up `plug_leaks`][36917]
11733
11734Libraries
11735---------
11736
11737* [`println!()`, with no arguments, prints newline][36825].
11738 Previously, an empty string was required to achieve the same.
11739* [`Wrapping` impls standard binary and unary operators, as well as
11740 the `Sum` and `Product` iterators][37356]
11741* [Implement `From<Cow<str>> for String` and `From<Cow<[T]>> for
11742 Vec<T>`][37326]
11743* [Improve `fold` performance for `chain`, `cloned`, `map`, and
11744 `VecDeque` iterators][37315]
11745* [Improve `SipHasher` performance on small values][37312]
11746* [Add Iterator trait TrustedLen to enable better FromIterator /
11747 Extend][37306]
11748* [Expand `.zip()` specialization to `.map()` and `.cloned()`][37230]
11749* [`ReadDir` implements `Debug`][37221]
11750* [Implement `RefUnwindSafe` for atomic types][37178]
11751* [Specialize `Vec::extend` to `Vec::extend_from_slice`][37094]
11752* [Avoid allocations in `Decoder::read_str`][37064]
11753* [`io::Error` implements `From<io::ErrorKind>`][37037]
11754* [Impl `Debug` for raw pointers to unsized data][36880]
11755* [Don't reuse `HashMap` random seeds][37470]
11756* [The internal memory layout of `HashMap` is more cache-friendly, for
11757 significant improvements in some operations][36692]
11758* [`HashMap` uses less memory on 32-bit architectures][36595]
11759* [Impl `Add<{str, Cow<str>}>` for `Cow<str>`][36430]
11760
11761Cargo
11762-----
11763
11764* [Expose rustc cfg values to build scripts][cargo/3243]
11765* [Allow cargo to work with read-only `CARGO_HOME`][cargo/3259]
11766* [Fix passing --features when testing multiple packages][cargo/3280]
11767* [Use a single profile set per workspace][cargo/3249]
11768* [Load `replace` sections from lock files][cargo/3220]
11769* [Ignore `panic` configuration for test/bench profiles][cargo/3175]
11770
11771Tooling
11772-------
11773
11774* [rustup is the recommended Rust installation method][1.14rustup]
11775* This release includes host (rustc) builds for Linux on MIPS, PowerPC, and
11776 S390x. These are [tier 2] platforms and may have major defects. Follow the
11777 instructions on the website to install, or add the targets to an existing
11778 installation with `rustup target add`. The new target triples are:
11779 - `mips-unknown-linux-gnu`
11780 - `mipsel-unknown-linux-gnu`
11781 - `mips64-unknown-linux-gnuabi64`
11782 - `mips64el-unknown-linux-gnuabi64 `
11783 - `powerpc-unknown-linux-gnu`
11784 - `powerpc64-unknown-linux-gnu`
11785 - `powerpc64le-unknown-linux-gnu`
11786 - `s390x-unknown-linux-gnu `
11787* This release includes target (std) builds for ARM Linux running MUSL
11788 libc. These are [tier 2] platforms and may have major defects. Add the
11789 following triples to an existing rustup installation with `rustup target add`:
11790 - `arm-unknown-linux-musleabi`
11791 - `arm-unknown-linux-musleabihf`
11792 - `armv7-unknown-linux-musleabihf`
11793* This release includes [experimental support for WebAssembly][1.14wasm], via
11794 the `wasm32-unknown-emscripten` target. This target is known to have major
11795 defects. Please test, report, and fix.
11796* rustup no longer installs documentation by default. Run `rustup
11797 component add rust-docs` to install.
11798* [Fix line stepping in debugger][37310]
11799* [Enable line number debuginfo in releases][37280]
11800
11801Misc
11802----
11803
11804* [Disable jemalloc on aarch64/powerpc/mips][37392]
11805* [Add support for Fuchsia OS][37313]
11806* [Detect local-rebuild by only MAJOR.MINOR version][37273]
11807
11808Compatibility Notes
11809-------------------
11810
11811* [A number of forward-compatibility lints used by the compiler
11812 to gradually introduce language changes have been converted
11813 to deny by default][36894]:
11814 - ["use of inaccessible extern crate erroneously allowed"][36886]
11815 - ["type parameter default erroneously allowed in invalid location"][36887]
11816 - ["detects super or self keywords at the beginning of global path"][36888]
11817 - ["two overlapping inherent impls define an item with the same name
11818 were erroneously allowed"][36889]
11819 - ["floating-point constants cannot be used in patterns"][36890]
11820 - ["constants of struct or enum type can only be used in a pattern if
11821 the struct or enum has `#[derive(PartialEq, Eq)]`"][36891]
11822 - ["lifetimes or labels named `'_` were erroneously allowed"][36892]
11823* [Prohibit patterns in trait methods without bodies][37378]
11824* [The atomic `Ordering` enum may not be matched exhaustively][37351]
11825* [Future-proofing `#[no_link]` breaks some obscure cases][37247]
11826* [The `$crate` macro variable is accepted in fewer locations][37213]
11827* [Impls specifying extra region requirements beyond the trait
11828 they implement are rejected][37167]
11829* [Enums may not be unsized][37111]. Unsized enums are intended to
11830 work but never have. For now they are forbidden.
11831* [Enforce the shadowing restrictions from RFC 1560 for today's macros][36767]
11832
11833[tier 2]: https://forge.rust-lang.org/platform-support.html
11834[1.14rustup]: https://internals.rust-lang.org/t/beta-testing-rustup-rs/3316/204
11835[1.14wasm]: https://users.rust-lang.org/t/compiling-to-the-web-with-rust-and-emscripten/7627
11836[36430]: https://github.com/rust-lang/rust/pull/36430
11837[36595]: https://github.com/rust-lang/rust/pull/36595
11838[36692]: https://github.com/rust-lang/rust/pull/36692
11839[36767]: https://github.com/rust-lang/rust/pull/36767
11840[36794]: https://github.com/rust-lang/rust/pull/36794
11841[36798]: https://github.com/rust-lang/rust/pull/36798
11842[36819]: https://github.com/rust-lang/rust/pull/36819
11843[36822]: https://github.com/rust-lang/rust/pull/36822
11844[36825]: https://github.com/rust-lang/rust/pull/36825
11845[36843]: https://github.com/rust-lang/rust/pull/36843
11846[36880]: https://github.com/rust-lang/rust/pull/36880
11847[36886]: https://github.com/rust-lang/rust/issues/36886
11848[36887]: https://github.com/rust-lang/rust/issues/36887
11849[36888]: https://github.com/rust-lang/rust/issues/36888
11850[36889]: https://github.com/rust-lang/rust/issues/36889
11851[36890]: https://github.com/rust-lang/rust/issues/36890
11852[36891]: https://github.com/rust-lang/rust/issues/36891
11853[36892]: https://github.com/rust-lang/rust/issues/36892
11854[36894]: https://github.com/rust-lang/rust/pull/36894
11855[36917]: https://github.com/rust-lang/rust/pull/36917
11856[36993]: https://github.com/rust-lang/rust/pull/36993
11857[37037]: https://github.com/rust-lang/rust/pull/37037
11858[37064]: https://github.com/rust-lang/rust/pull/37064
11859[37094]: https://github.com/rust-lang/rust/pull/37094
11860[37108]: https://github.com/rust-lang/rust/pull/37108
11861[37111]: https://github.com/rust-lang/rust/pull/37111
11862[37161]: https://github.com/rust-lang/rust/pull/37161
11863[37162]: https://github.com/rust-lang/rust/pull/37162
11864[37167]: https://github.com/rust-lang/rust/pull/37167
11865[37178]: https://github.com/rust-lang/rust/pull/37178
11866[37200]: https://github.com/rust-lang/rust/pull/37200
11867[37213]: https://github.com/rust-lang/rust/pull/37213
11868[37221]: https://github.com/rust-lang/rust/pull/37221
11869[37224]: https://github.com/rust-lang/rust/pull/37224
11870[37230]: https://github.com/rust-lang/rust/pull/37230
11871[37231]: https://github.com/rust-lang/rust/pull/37231
11872[37247]: https://github.com/rust-lang/rust/pull/37247
11873[37267]: https://github.com/rust-lang/rust/pull/37267
11874[37270]: https://github.com/rust-lang/rust/pull/37270
11875[37273]: https://github.com/rust-lang/rust/pull/37273
11876[37280]: https://github.com/rust-lang/rust/pull/37280
11877[37298]: https://github.com/rust-lang/rust/pull/37298
11878[37306]: https://github.com/rust-lang/rust/pull/37306
11879[37310]: https://github.com/rust-lang/rust/pull/37310
11880[37312]: https://github.com/rust-lang/rust/pull/37312
11881[37313]: https://github.com/rust-lang/rust/pull/37313
11882[37315]: https://github.com/rust-lang/rust/pull/37315
11883[37318]: https://github.com/rust-lang/rust/pull/37318
11884[37322]: https://github.com/rust-lang/rust/pull/37322
11885[37326]: https://github.com/rust-lang/rust/pull/37326
11886[37351]: https://github.com/rust-lang/rust/pull/37351
11887[37356]: https://github.com/rust-lang/rust/pull/37356
11888[37367]: https://github.com/rust-lang/rust/pull/37367
11889[37373]: https://github.com/rust-lang/rust/pull/37373
11890[37378]: https://github.com/rust-lang/rust/pull/37378
11891[37389]: https://github.com/rust-lang/rust/pull/37389
11892[37392]: https://github.com/rust-lang/rust/pull/37392
11893[37427]: https://github.com/rust-lang/rust/pull/37427
11894[37439]: https://github.com/rust-lang/rust/pull/37439
11895[37445]: https://github.com/rust-lang/rust/pull/37445
11896[37470]: https://github.com/rust-lang/rust/pull/37470
11897[37569]: https://github.com/rust-lang/rust/pull/37569
11898[RFC 1492]: https://github.com/rust-lang/rfcs/blob/master/text/1492-dotdot-in-patterns.md
11899[cargo/3175]: https://github.com/rust-lang/cargo/pull/3175
11900[cargo/3220]: https://github.com/rust-lang/cargo/pull/3220
11901[cargo/3243]: https://github.com/rust-lang/cargo/pull/3243
11902[cargo/3249]: https://github.com/rust-lang/cargo/pull/3249
11903[cargo/3259]: https://github.com/rust-lang/cargo/pull/3259
11904[cargo/3280]: https://github.com/rust-lang/cargo/pull/3280
11905
11906
11907Version 1.13.0 (2016-11-10)
11908===========================
11909
11910Language
11911--------
11912
11913* [Stabilize the `?` operator][36995]. `?` is a simple way to propagate
11914 errors, like the `try!` macro, described in [RFC 0243].
11915* [Stabilize macros in type position][36014]. Described in [RFC 873].
11916* [Stabilize attributes on statements][36995]. Described in [RFC 0016].
11917* [Fix `#[derive]` for empty tuple structs/variants][35728]
11918* [Fix lifetime rules for 'if' conditions][36029]
11919* [Avoid loading and parsing unconfigured non-inline modules][36482]
11920
11921Compiler
11922--------
11923
11924* [Add the `-C link-arg` argument][36574]
11925* [Remove the old AST-based backend from rustc_trans][35764]
11926* [Don't enable NEON by default on armv7 Linux][35814]
11927* [Fix debug line number info for macro expansions][35238]
11928* [Do not emit "class method" debuginfo for types that are not
11929 DICompositeType][36008]
11930* [Warn about multiple conflicting #[repr] hints][34623]
11931* [When sizing DST, don't double-count nested struct prefixes][36351]
11932* [Default RUST_MIN_STACK to 16MiB for now][36505]
11933* [Improve rlib metadata format][36551]. Reduces rlib size significantly.
11934* [Reject macros with empty repetitions to avoid infinite loop][36721]
11935* [Expand macros without recursing to avoid stack overflows][36214]
11936
11937Diagnostics
11938-----------
11939
11940* [Replace macro backtraces with labeled local uses][35702]
11941* [Improve error message for misplaced doc comments][33922]
11942* [Buffer unix and lock windows to prevent message interleaving][35975]
11943* [Update lifetime errors to specifically note temporaries][36171]
11944* [Special case a few colors for Windows][36178]
11945* [Suggest `use self` when such an import resolves][36289]
11946* [Be more specific when type parameter shadows primitive type][36338]
11947* Many minor improvements
11948
11949Compile-time Optimizations
11950--------------------------
11951
11952* [Compute and cache HIR hashes at beginning][35854]
11953* [Don't hash types in loan paths][36004]
11954* [Cache projections in trans][35761]
11955* [Optimize the parser's last token handling][36527]
11956* [Only instantiate #[inline] functions in codegen units referencing
11957 them][36524]. This leads to big improvements in cases where crates export
11958 define many inline functions without using them directly.
11959* [Lazily allocate TypedArena's first chunk][36592]
11960* [Don't allocate during default HashSet creation][36734]
11961
11962Stabilized APIs
11963---------------
11964
11965* [`checked_abs`]
11966* [`wrapping_abs`]
11967* [`overflowing_abs`]
11968* [`RefCell::try_borrow`]
11969* [`RefCell::try_borrow_mut`]
11970
11971Libraries
11972---------
11973
11974* [Add `assert_ne!` and `debug_assert_ne!`][35074]
11975* [Make `vec_deque::Drain`, `hash_map::Drain`, and `hash_set::Drain`
11976 covariant][35354]
11977* [Implement `AsRef<[T]>` for `std::slice::Iter`][35559]
11978* [Implement `Debug` for `std::vec::IntoIter`][35707]
11979* [`CString`: avoid excessive growth just to 0-terminate][35871]
11980* [Implement `CoerceUnsized` for `{Cell, RefCell, UnsafeCell}`][35627]
11981* [Use arc4rand on FreeBSD][35884]
11982* [memrchr: Correct aligned offset computation][35969]
11983* [Improve Demangling of Rust Symbols][36059]
11984* [Use monotonic time in condition variables][35048]
11985* [Implement `Debug` for `std::path::{Components,Iter}`][36101]
11986* [Implement conversion traits for `char`][35755]
11987* [Fix illegal instruction caused by overflow in channel cloning][36104]
11988* [Zero first byte of CString on drop][36264]
11989* [Inherit overflow checks for sum and product][36372]
11990* [Add missing Eq implementations][36423]
11991* [Implement `Debug` for `DirEntry`][36631]
11992* [When `getaddrinfo` returns `EAI_SYSTEM` retrieve actual error from
11993 `errno`][36754]
11994* [`SipHasher`] is deprecated. Use [`DefaultHasher`].
11995* [Implement more traits for `std::io::ErrorKind`][35911]
11996* [Optimize BinaryHeap bounds checking][36072]
11997* [Work around pointer aliasing issue in `Vec::extend_from_slice`,
11998 `extend_with_element`][36355]
11999* [Fix overflow checking in unsigned pow()][34942]
12000
12001Cargo
12002-----
12003
12004* This release includes security fixes to both curl and OpenSSL.
12005* [Fix transitive doctests when panic=abort][cargo/3021]
12006* [Add --all-features flag to cargo][cargo/3038]
12007* [Reject path-based dependencies in `cargo package`][cargo/3060]
12008* [Don't parse the home directory more than once][cargo/3078]
12009* [Don't try to generate Cargo.lock on empty workspaces][cargo/3092]
12010* [Update OpenSSL to 1.0.2j][cargo/3121]
12011* [Add license and license_file to cargo metadata output][cargo/3110]
12012* [Make crates-io registry URL optional in config; ignore all changes to
12013 source.crates-io][cargo/3089]
12014* [Don't download dependencies from other platforms][cargo/3123]
12015* [Build transitive dev-dependencies when needed][cargo/3125]
12016* [Add support for per-target rustflags in .cargo/config][cargo/3157]
12017* [Avoid updating registry when adding existing deps][cargo/3144]
12018* [Warn about path overrides that won't work][cargo/3136]
12019* [Use workspaces during `cargo install`][cargo/3146]
12020* [Leak mspdbsrv.exe processes on Windows][cargo/3162]
12021* [Add --message-format flag][cargo/3000]
12022* [Pass target environment for rustdoc][cargo/3205]
12023* [Use `CommandExt::exec` for `cargo run` on Unix][cargo/2818]
12024* [Update curl and curl-sys][cargo/3241]
12025* [Call rustdoc test with the correct cfg flags of a package][cargo/3242]
12026
12027Tooling
12028-------
12029
12030* [rustdoc: Add the `--sysroot` argument][36586]
12031* [rustdoc: Fix a couple of issues with the search results][35655]
12032* [rustdoc: remove the `!` from macro URLs and titles][35234]
12033* [gdb: Fix pretty-printing special-cased Rust types][35585]
12034* [rustdoc: Filter more incorrect methods inherited through Deref][36266]
12035
12036Misc
12037----
12038
12039* [Remove unmaintained style guide][35124]
12040* [Add s390x support][36369]
12041* [Initial work at Haiku OS support][36727]
12042* [Add mips-uclibc targets][35734]
12043* [Crate-ify compiler-rt into compiler-builtins][35021]
12044* [Add rustc version info (git hash + date) to dist tarball][36213]
12045* Many documentation improvements
12046
12047Compatibility Notes
12048-------------------
12049
12050* [`SipHasher`] is deprecated. Use [`DefaultHasher`].
12051* [Deny (by default) transmuting from fn item types to pointer-sized
12052 types][34923]. Continuing the long transition to zero-sized fn items,
12053 per [RFC 401].
12054* [Fix `#[derive]` for empty tuple structs/variants][35728].
12055 Part of [RFC 1506].
12056* [Issue deprecation warnings for safe accesses to extern statics][36173]
12057* [Fix lifetime rules for 'if' conditions][36029].
12058* [Inherit overflow checks for sum and product][36372].
12059* [Forbid user-defined macros named "macro_rules"][36730].
12060
12061[33922]: https://github.com/rust-lang/rust/pull/33922
12062[34623]: https://github.com/rust-lang/rust/pull/34623
12063[34923]: https://github.com/rust-lang/rust/pull/34923
12064[34942]: https://github.com/rust-lang/rust/pull/34942
12065[35021]: https://github.com/rust-lang/rust/pull/35021
12066[35048]: https://github.com/rust-lang/rust/pull/35048
12067[35074]: https://github.com/rust-lang/rust/pull/35074
12068[35124]: https://github.com/rust-lang/rust/pull/35124
12069[35234]: https://github.com/rust-lang/rust/pull/35234
12070[35238]: https://github.com/rust-lang/rust/pull/35238
12071[35354]: https://github.com/rust-lang/rust/pull/35354
12072[35559]: https://github.com/rust-lang/rust/pull/35559
12073[35585]: https://github.com/rust-lang/rust/pull/35585
12074[35627]: https://github.com/rust-lang/rust/pull/35627
12075[35655]: https://github.com/rust-lang/rust/pull/35655
12076[35702]: https://github.com/rust-lang/rust/pull/35702
12077[35707]: https://github.com/rust-lang/rust/pull/35707
12078[35728]: https://github.com/rust-lang/rust/pull/35728
12079[35734]: https://github.com/rust-lang/rust/pull/35734
12080[35755]: https://github.com/rust-lang/rust/pull/35755
12081[35761]: https://github.com/rust-lang/rust/pull/35761
12082[35764]: https://github.com/rust-lang/rust/pull/35764
12083[35814]: https://github.com/rust-lang/rust/pull/35814
12084[35854]: https://github.com/rust-lang/rust/pull/35854
12085[35871]: https://github.com/rust-lang/rust/pull/35871
12086[35884]: https://github.com/rust-lang/rust/pull/35884
12087[35911]: https://github.com/rust-lang/rust/pull/35911
12088[35969]: https://github.com/rust-lang/rust/pull/35969
12089[35975]: https://github.com/rust-lang/rust/pull/35975
12090[36004]: https://github.com/rust-lang/rust/pull/36004
12091[36008]: https://github.com/rust-lang/rust/pull/36008
12092[36014]: https://github.com/rust-lang/rust/pull/36014
12093[36029]: https://github.com/rust-lang/rust/pull/36029
12094[36059]: https://github.com/rust-lang/rust/pull/36059
12095[36072]: https://github.com/rust-lang/rust/pull/36072
12096[36101]: https://github.com/rust-lang/rust/pull/36101
12097[36104]: https://github.com/rust-lang/rust/pull/36104
12098[36171]: https://github.com/rust-lang/rust/pull/36171
12099[36173]: https://github.com/rust-lang/rust/pull/36173
12100[36178]: https://github.com/rust-lang/rust/pull/36178
12101[36213]: https://github.com/rust-lang/rust/pull/36213
12102[36214]: https://github.com/rust-lang/rust/pull/36214
12103[36264]: https://github.com/rust-lang/rust/pull/36264
12104[36266]: https://github.com/rust-lang/rust/pull/36266
12105[36289]: https://github.com/rust-lang/rust/pull/36289
12106[36338]: https://github.com/rust-lang/rust/pull/36338
12107[36351]: https://github.com/rust-lang/rust/pull/36351
12108[36355]: https://github.com/rust-lang/rust/pull/36355
12109[36369]: https://github.com/rust-lang/rust/pull/36369
12110[36372]: https://github.com/rust-lang/rust/pull/36372
12111[36423]: https://github.com/rust-lang/rust/pull/36423
12112[36482]: https://github.com/rust-lang/rust/pull/36482
12113[36505]: https://github.com/rust-lang/rust/pull/36505
12114[36524]: https://github.com/rust-lang/rust/pull/36524
12115[36527]: https://github.com/rust-lang/rust/pull/36527
12116[36551]: https://github.com/rust-lang/rust/pull/36551
12117[36574]: https://github.com/rust-lang/rust/pull/36574
12118[36586]: https://github.com/rust-lang/rust/pull/36586
12119[36592]: https://github.com/rust-lang/rust/pull/36592
12120[36631]: https://github.com/rust-lang/rust/pull/36631
12121[36721]: https://github.com/rust-lang/rust/pull/36721
12122[36727]: https://github.com/rust-lang/rust/pull/36727
12123[36730]: https://github.com/rust-lang/rust/pull/36730
12124[36734]: https://github.com/rust-lang/rust/pull/36734
12125[36754]: https://github.com/rust-lang/rust/pull/36754
12126[36995]: https://github.com/rust-lang/rust/pull/36995
12127[RFC 0016]: https://github.com/rust-lang/rfcs/blob/master/text/0016-more-attributes.md
12128[RFC 0243]: https://github.com/rust-lang/rfcs/blob/master/text/0243-trait-based-exception-handling.md
12129[RFC 1506]: https://github.com/rust-lang/rfcs/blob/master/text/1506-adt-kinds.md
12130[RFC 401]: https://github.com/rust-lang/rfcs/blob/master/text/0401-coercions.md
12131[RFC 873]: https://github.com/rust-lang/rfcs/blob/master/text/0873-type-macros.md
12132[cargo/2818]: https://github.com/rust-lang/cargo/pull/2818
12133[cargo/3000]: https://github.com/rust-lang/cargo/pull/3000
12134[cargo/3021]: https://github.com/rust-lang/cargo/pull/3021
12135[cargo/3038]: https://github.com/rust-lang/cargo/pull/3038
12136[cargo/3060]: https://github.com/rust-lang/cargo/pull/3060
12137[cargo/3078]: https://github.com/rust-lang/cargo/pull/3078
12138[cargo/3089]: https://github.com/rust-lang/cargo/pull/3089
12139[cargo/3092]: https://github.com/rust-lang/cargo/pull/3092
12140[cargo/3110]: https://github.com/rust-lang/cargo/pull/3110
12141[cargo/3121]: https://github.com/rust-lang/cargo/pull/3121
12142[cargo/3123]: https://github.com/rust-lang/cargo/pull/3123
12143[cargo/3125]: https://github.com/rust-lang/cargo/pull/3125
12144[cargo/3136]: https://github.com/rust-lang/cargo/pull/3136
12145[cargo/3144]: https://github.com/rust-lang/cargo/pull/3144
12146[cargo/3146]: https://github.com/rust-lang/cargo/pull/3146
12147[cargo/3157]: https://github.com/rust-lang/cargo/pull/3157
12148[cargo/3162]: https://github.com/rust-lang/cargo/pull/3162
12149[cargo/3205]: https://github.com/rust-lang/cargo/pull/3205
12150[cargo/3241]: https://github.com/rust-lang/cargo/pull/3241
12151[cargo/3242]: https://github.com/rust-lang/cargo/pull/3242
12152[`checked_abs`]: https://doc.rust-lang.org/std/primitive.i32.html#method.checked_abs
12153[`wrapping_abs`]: https://doc.rust-lang.org/std/primitive.i32.html#method.wrapping_abs
12154[`overflowing_abs`]: https://doc.rust-lang.org/std/primitive.i32.html#method.overflowing_abs
12155[`RefCell::try_borrow`]: https://doc.rust-lang.org/std/cell/struct.RefCell.html#method.try_borrow
12156[`RefCell::try_borrow_mut`]: https://doc.rust-lang.org/std/cell/struct.RefCell.html#method.try_borrow_mut
12157[`SipHasher`]: https://doc.rust-lang.org/std/hash/struct.SipHasher.html
12158[`DefaultHasher`]: https://doc.rust-lang.org/std/collections/hash_map/struct.DefaultHasher.html
12159
12160
12161Version 1.12.1 (2016-10-20)
12162===========================
12163
12164Regression Fixes
12165----------------
12166
12167* [ICE: 'rustc' panicked at 'assertion failed: concrete_substs.is_normalized_for_trans()' #36381][36381]
12168* [Confusion with double negation and booleans][36856]
12169* [rustc 1.12.0 fails with SIGSEGV in release mode (syn crate 0.8.0)][36875]
12170* [Rustc 1.12.0 Windows build of `ethcore` crate fails with LLVM error][36924]
12171* [1.12.0: High memory usage when linking in release mode with debug info][36926]
12172* [Corrupted memory after updated to 1.12][36936]
12173* ["Let NullaryConstructor = something;" causes internal compiler error: "tried to overwrite interned AdtDef"][37026]
12174* [Fix ICE: inject bitcast if types mismatch for invokes/calls/stores][37112]
12175* [debuginfo: Handle spread_arg case in MIR-trans in a more stable way.][37153]
12176
12177[36381]: https://github.com/rust-lang/rust/issues/36381
12178[36856]: https://github.com/rust-lang/rust/issues/36856
12179[36875]: https://github.com/rust-lang/rust/issues/36875
12180[36924]: https://github.com/rust-lang/rust/issues/36924
12181[36926]: https://github.com/rust-lang/rust/issues/36926
12182[36936]: https://github.com/rust-lang/rust/issues/36936
12183[37026]: https://github.com/rust-lang/rust/issues/37026
12184[37112]: https://github.com/rust-lang/rust/issues/37112
12185[37153]: https://github.com/rust-lang/rust/issues/37153
12186
12187
12188Version 1.12.0 (2016-09-29)
12189===========================
12190
12191Highlights
12192----------
12193
12194* [`rustc` translates code to LLVM IR via its own "middle" IR (MIR)](https://github.com/rust-lang/rust/pull/34096).
12195 This translation pass is far simpler than the previous AST->LLVM pass, and
12196 creates opportunities to perform new optimizations directly on the MIR. It
12197 was previously described [on the Rust blog](https://blog.rust-lang.org/2016/04/19/MIR.html).
12198* [`rustc` presents a new, more readable error format, along with
12199 machine-readable JSON error output for use by IDEs](https://github.com/rust-lang/rust/pull/35401).
12200 Most common editors supporting Rust have been updated to work with it. It was
12201 previously described [on the Rust blog](https://blog.rust-lang.org/2016/08/10/Shape-of-errors-to-come.html).
12202
12203Compiler
12204--------
12205
12206* [`rustc` translates code to LLVM IR via its own "middle" IR (MIR)](https://github.com/rust-lang/rust/pull/34096).
12207 This translation pass is far simpler than the previous AST->LLVM pass, and
12208 creates opportunities to perform new optimizations directly on the MIR. It
12209 was previously described [on the Rust blog](https://blog.rust-lang.org/2016/04/19/MIR.html).
12210* [Print the Rust target name, not the LLVM target name, with
12211 `--print target-list`](https://github.com/rust-lang/rust/pull/35489)
12212* [The computation of `TypeId` is correct in some cases where it was previously
12213 producing inconsistent results](https://github.com/rust-lang/rust/pull/35267)
12214* [The `mips-unknown-linux-gnu` target uses hardware floating point by default](https://github.com/rust-lang/rust/pull/34910)
12215* [The `rustc` arguments, `--print target-cpus`, `--print target-features`,
12216 `--print relocation-models`, and `--print code-models` print the available
12217 options to the `-C target-cpu`, `-C target-feature`, `-C relocation-model` and
12218 `-C code-model` code generation arguments](https://github.com/rust-lang/rust/pull/34845)
12219* [`rustc` supports three new MUSL targets on ARM: `arm-unknown-linux-musleabi`,
12220 `arm-unknown-linux-musleabihf`, and `armv7-unknown-linux-musleabihf`](https://github.com/rust-lang/rust/pull/35060).
12221 These targets produce statically-linked binaries. There are no binary release
12222 builds yet though.
12223
12224Diagnostics
12225-----------
12226
12227* [`rustc` presents a new, more readable error format, along with
12228 machine-readable JSON error output for use by IDEs](https://github.com/rust-lang/rust/pull/35401).
12229 Most common editors supporting Rust have been updated to work with it. It was
12230 previously described [on the Rust blog](https://blog.rust-lang.org/2016/08/10/Shape-of-errors-to-come.html).
12231* [In error descriptions, references are now described in plain English,
12232 instead of as "&-ptr"](https://github.com/rust-lang/rust/pull/35611)
12233* [In error type descriptions, unknown numeric types are named `{integer}` or
12234 `{float}` instead of `_`](https://github.com/rust-lang/rust/pull/35080)
12235* [`rustc` emits a clearer error when inner attributes follow a doc comment](https://github.com/rust-lang/rust/pull/34676)
12236
12237Language
12238--------
12239
12240* [`macro_rules!` invocations can be made within `macro_rules!` invocations](https://github.com/rust-lang/rust/pull/34925)
12241* [`macro_rules!` meta-variables are hygienic](https://github.com/rust-lang/rust/pull/35453)
12242* [`macro_rules!` `tt` matchers can be reparsed correctly, making them much more
12243 useful](https://github.com/rust-lang/rust/pull/34908)
12244* [`macro_rules!` `stmt` matchers correctly consume the entire contents when
12245 inside non-braces invocations](https://github.com/rust-lang/rust/pull/34886)
12246* [Semicolons are properly required as statement delimiters inside
12247 `macro_rules!` invocations](https://github.com/rust-lang/rust/pull/34660)
12248* [`cfg_attr` works on `path` attributes](https://github.com/rust-lang/rust/pull/34546)
12249
12250Stabilized APIs
12251---------------
12252
12253* [`Cell::as_ptr`](https://doc.rust-lang.org/std/cell/struct.Cell.html#method.as_ptr)
12254* [`RefCell::as_ptr`](https://doc.rust-lang.org/std/cell/struct.RefCell.html#method.as_ptr)
12255* [`IpAddr::is_unspecified`](https://doc.rust-lang.org/std/net/enum.IpAddr.html#method.is_unspecified)
12256* [`IpAddr::is_loopback`](https://doc.rust-lang.org/std/net/enum.IpAddr.html#method.is_loopback)
12257* [`IpAddr::is_multicast`](https://doc.rust-lang.org/std/net/enum.IpAddr.html#method.is_multicast)
12258* [`Ipv4Addr::is_unspecified`](https://doc.rust-lang.org/std/net/struct.Ipv4Addr.html#method.is_unspecified)
12259* [`Ipv6Addr::octets`](https://doc.rust-lang.org/std/net/struct.Ipv6Addr.html#method.octets)
12260* [`LinkedList::contains`](https://doc.rust-lang.org/std/collections/linked_list/struct.LinkedList.html#method.contains)
12261* [`VecDeque::contains`](https://doc.rust-lang.org/std/collections/vec_deque/struct.VecDeque.html#method.contains)
12262* [`ExitStatusExt::from_raw`](https://doc.rust-lang.org/std/os/unix/process/trait.ExitStatusExt.html#tymethod.from_raw).
12263 Both on Unix and Windows.
12264* [`Receiver::recv_timeout`](https://doc.rust-lang.org/std/sync/mpsc/struct.Receiver.html#method.recv_timeout)
12265* [`RecvTimeoutError`](https://doc.rust-lang.org/std/sync/mpsc/enum.RecvTimeoutError.html)
12266* [`BinaryHeap::peek_mut`](https://doc.rust-lang.org/std/collections/binary_heap/struct.BinaryHeap.html#method.peek_mut)
12267* [`PeekMut`](https://doc.rust-lang.org/std/collections/binary_heap/struct.PeekMut.html)
12268* [`iter::Product`](https://doc.rust-lang.org/std/iter/trait.Product.html)
12269* [`iter::Sum`](https://doc.rust-lang.org/std/iter/trait.Sum.html)
12270* [`OccupiedEntry::remove_entry`](https://doc.rust-lang.org/std/collections/btree_map/struct.OccupiedEntry.html#method.remove_entry)
12271* [`VacantEntry::into_key`](https://doc.rust-lang.org/std/collections/btree_map/struct.VacantEntry.html#method.into_key)
12272
12273Libraries
12274---------
12275
12276* [The `format!` macro and friends now allow a single argument to be formatted
12277 in multiple styles](https://github.com/rust-lang/rust/pull/33642)
12278* [The lifetime bounds on `[T]::binary_search_by` and
12279 `[T]::binary_search_by_key` have been adjusted to be more flexible](https://github.com/rust-lang/rust/pull/34762)
12280* [`Option` implements `From` for its contained type](https://github.com/rust-lang/rust/pull/34828)
12281* [`Cell`, `RefCell` and `UnsafeCell` implement `From` for their contained type](https://github.com/rust-lang/rust/pull/35392)
12282* [`RwLock` panics if the reader count overflows](https://github.com/rust-lang/rust/pull/35378)
12283* [`vec_deque::Drain`, `hash_map::Drain` and `hash_set::Drain` are covariant](https://github.com/rust-lang/rust/pull/35354)
12284* [`vec::Drain` and `binary_heap::Drain` are covariant](https://github.com/rust-lang/rust/pull/34951)
12285* [`Cow<str>` implements `FromIterator` for `char`, `&str` and `String`](https://github.com/rust-lang/rust/pull/35064)
12286* [Sockets on Linux are correctly closed in subprocesses via `SOCK_CLOEXEC`](https://github.com/rust-lang/rust/pull/34946)
12287* [`hash_map::Entry`, `hash_map::VacantEntry` and `hash_map::OccupiedEntry`
12288 implement `Debug`](https://github.com/rust-lang/rust/pull/34937)
12289* [`btree_map::Entry`, `btree_map::VacantEntry` and `btree_map::OccupiedEntry`
12290 implement `Debug`](https://github.com/rust-lang/rust/pull/34885)
12291* [`String` implements `AddAssign`](https://github.com/rust-lang/rust/pull/34890)
12292* [Variadic `extern fn` pointers implement the `Clone`, `PartialEq`, `Eq`,
12293 `PartialOrd`, `Ord`, `Hash`, `fmt::Pointer`, and `fmt::Debug` traits](https://github.com/rust-lang/rust/pull/34879)
12294* [`FileType` implements `Debug`](https://github.com/rust-lang/rust/pull/34757)
12295* [References to `Mutex` and `RwLock` are unwind-safe](https://github.com/rust-lang/rust/pull/34756)
12296* [`mpsc::sync_channel` `Receiver`s return any available message before
12297 reporting a disconnect](https://github.com/rust-lang/rust/pull/34731)
12298* [Unicode definitions have been updated to 9.0](https://github.com/rust-lang/rust/pull/34599)
12299* [`env` iterators implement `DoubleEndedIterator`](https://github.com/rust-lang/rust/pull/33312)
12300
12301Cargo
12302-----
12303
12304* [Support local mirrors of registries](https://github.com/rust-lang/cargo/pull/2857)
12305* [Add support for command aliases](https://github.com/rust-lang/cargo/pull/2679)
12306* [Allow `opt-level="s"` / `opt-level="z"` in profile overrides](https://github.com/rust-lang/cargo/pull/3007)
12307* [Make `cargo doc --open --target` work as expected](https://github.com/rust-lang/cargo/pull/2988)
12308* [Speed up noop registry updates](https://github.com/rust-lang/cargo/pull/2974)
12309* [Update OpenSSL](https://github.com/rust-lang/cargo/pull/2971)
12310* [Fix `--panic=abort` with plugins](https://github.com/rust-lang/cargo/pull/2954)
12311* [Always pass `-C metadata` to the compiler](https://github.com/rust-lang/cargo/pull/2946)
12312* [Fix depending on git repos with workspaces](https://github.com/rust-lang/cargo/pull/2938)
12313* [Add a `--lib` flag to `cargo new`](https://github.com/rust-lang/cargo/pull/2921)
12314* [Add `http.cainfo` for custom certs](https://github.com/rust-lang/cargo/pull/2917)
12315* [Indicate the compilation profile after compiling](https://github.com/rust-lang/cargo/pull/2909)
12316* [Allow enabling features for dependencies with `--features`](https://github.com/rust-lang/cargo/pull/2876)
12317* [Add `--jobs` flag to `cargo package`](https://github.com/rust-lang/cargo/pull/2867)
12318* [Add `--dry-run` to `cargo publish`](https://github.com/rust-lang/cargo/pull/2849)
12319* [Add support for `RUSTDOCFLAGS`](https://github.com/rust-lang/cargo/pull/2794)
12320
12321Performance
12322-----------
12323
12324* [`panic::catch_unwind` is more optimized](https://github.com/rust-lang/rust/pull/35444)
12325* [`panic::catch_unwind` no longer accesses thread-local storage on entry](https://github.com/rust-lang/rust/pull/34866)
12326
12327Tooling
12328-------
12329
12330* [Test binaries now support a `--test-threads` argument to specify the number
12331 of threads used to run tests, and which acts the same as the
12332 `RUST_TEST_THREADS` environment variable](https://github.com/rust-lang/rust/pull/35414)
12333* [The test runner now emits a warning when tests run over 60 seconds](https://github.com/rust-lang/rust/pull/35405)
12334* [rustdoc: Fix methods in search results](https://github.com/rust-lang/rust/pull/34752)
12335* [`rust-lldb` warns about unsupported versions of LLDB](https://github.com/rust-lang/rust/pull/34646)
12336* [Rust releases now come with source packages that can be installed by rustup
12337 via `rustup component add rust-src`](https://github.com/rust-lang/rust/pull/34366).
12338 The resulting source code can be used by tools and IDES, located in the
12339 sysroot under `lib/rustlib/src`.
12340
12341Misc
12342----
12343
12344* [The compiler can now be built against LLVM 3.9](https://github.com/rust-lang/rust/pull/35594)
12345* Many minor improvements to the documentation.
12346* [The Rust exception handling "personality" routine is now written in Rust](https://github.com/rust-lang/rust/pull/34832)
12347
12348Compatibility Notes
12349-------------------
12350
12351* [When printing Windows `OsStr`s, unpaired surrogate codepoints are escaped
12352 with the lowercase format instead of the uppercase](https://github.com/rust-lang/rust/pull/35084)
12353* [When formatting strings, if "precision" is specified, the "fill",
12354 "align" and "width" specifiers are no longer ignored](https://github.com/rust-lang/rust/pull/34544)
12355* [The `Debug` impl for strings no longer escapes all non-ASCII characters](https://github.com/rust-lang/rust/pull/34485)
12356
12357
12358Version 1.11.0 (2016-08-18)
12359===========================
12360
12361Language
12362--------
12363
12364* [Support nested `cfg_attr` attributes](https://github.com/rust-lang/rust/pull/34216)
12365* [Allow statement-generating braced macro invocations at the end of blocks](https://github.com/rust-lang/rust/pull/34436)
12366* [Macros can be expanded inside of trait definitions](https://github.com/rust-lang/rust/pull/34213)
12367* [`#[macro_use]` works properly when it is itself expanded from a macro](https://github.com/rust-lang/rust/pull/34032)
12368
12369Stabilized APIs
12370---------------
12371
12372* [`BinaryHeap::append`](https://doc.rust-lang.org/std/collections/binary_heap/struct.BinaryHeap.html#method.append)
12373* [`BTreeMap::append`](https://doc.rust-lang.org/std/collections/btree_map/struct.BTreeMap.html#method.append)
12374* [`BTreeMap::split_off`](https://doc.rust-lang.org/std/collections/btree_map/struct.BTreeMap.html#method.split_off)
12375* [`BTreeSet::append`](https://doc.rust-lang.org/std/collections/btree_set/struct.BTreeSet.html#method.append)
12376* [`BTreeSet::split_off`](https://doc.rust-lang.org/std/collections/btree_set/struct.BTreeSet.html#method.split_off)
12377* [`f32::to_degrees`](https://doc.rust-lang.org/std/primitive.f32.html#method.to_degrees)
12378 (in libcore - previously stabilized in libstd)
12379* [`f32::to_radians`](https://doc.rust-lang.org/std/primitive.f32.html#method.to_radians)
12380 (in libcore - previously stabilized in libstd)
12381* [`f64::to_degrees`](https://doc.rust-lang.org/std/primitive.f64.html#method.to_degrees)
12382 (in libcore - previously stabilized in libstd)
12383* [`f64::to_radians`](https://doc.rust-lang.org/std/primitive.f64.html#method.to_radians)
12384 (in libcore - previously stabilized in libstd)
12385* [`Iterator::sum`](https://doc.rust-lang.org/std/iter/trait.Iterator.html#method.sum)
12386* [`Iterator::product`](https://doc.rust-lang.org/std/iter/trait.Iterator.html#method.product)
12387* [`Cell::get_mut`](https://doc.rust-lang.org/std/cell/struct.Cell.html#method.get_mut)
12388* [`RefCell::get_mut`](https://doc.rust-lang.org/std/cell/struct.RefCell.html#method.get_mut)
12389
12390Libraries
12391---------
12392
12393* [The `thread_local!` macro supports multiple definitions in a single
12394 invocation, and can apply attributes](https://github.com/rust-lang/rust/pull/34077)
12395* [`Cow` implements `Default`](https://github.com/rust-lang/rust/pull/34305)
12396* [`Wrapping` implements binary, octal, lower-hex and upper-hex
12397 `Display` formatting](https://github.com/rust-lang/rust/pull/34190)
12398* [The range types implement `Hash`](https://github.com/rust-lang/rust/pull/34180)
12399* [`lookup_host` ignores unknown address types](https://github.com/rust-lang/rust/pull/34067)
12400* [`assert_eq!` accepts a custom error message, like `assert!` does](https://github.com/rust-lang/rust/pull/33976)
12401* [The main thread is now called "main" instead of "&lt;main&gt;"](https://github.com/rust-lang/rust/pull/33803)
12402
12403Cargo
12404-----
12405
12406* [Disallow specifying features of transitive deps](https://github.com/rust-lang/cargo/pull/2821)
12407* [Add color support for Windows consoles](https://github.com/rust-lang/cargo/pull/2804)
12408* [Fix `harness = false` on `[lib]` sections](https://github.com/rust-lang/cargo/pull/2795)
12409* [Don't panic when `links` contains a '.'](https://github.com/rust-lang/cargo/pull/2787)
12410* [Build scripts can emit warnings](https://github.com/rust-lang/cargo/pull/2630),
12411 and `-vv` prints warnings for all crates.
12412* [Ignore file locks on OS X NFS mounts](https://github.com/rust-lang/cargo/pull/2720)
12413* [Don't warn about `package.metadata` keys](https://github.com/rust-lang/cargo/pull/2668).
12414 This provides room for expansion by arbitrary tools.
12415* [Add support for cdylib crate types](https://github.com/rust-lang/cargo/pull/2741)
12416* [Prevent publishing crates when files are dirty](https://github.com/rust-lang/cargo/pull/2781)
12417* [Don't fetch all crates on clean](https://github.com/rust-lang/cargo/pull/2704)
12418* [Propagate --color option to rustc](https://github.com/rust-lang/cargo/pull/2779)
12419* [Fix `cargo doc --open` on Windows](https://github.com/rust-lang/cargo/pull/2780)
12420* [Improve autocompletion](https://github.com/rust-lang/cargo/pull/2772)
12421* [Configure colors of stderr as well as stdout](https://github.com/rust-lang/cargo/pull/2739)
12422
12423Performance
12424-----------
12425
12426* [Caching projections speeds up type check dramatically for some
12427 workloads](https://github.com/rust-lang/rust/pull/33816)
12428* [The default `HashMap` hasher is SipHash 1-3 instead of SipHash 2-4](https://github.com/rust-lang/rust/pull/33940)
12429 This hasher is faster, but is believed to provide sufficient
12430 protection from collision attacks.
12431* [Comparison of `Ipv4Addr` is 10x faster](https://github.com/rust-lang/rust/pull/33891)
12432
12433Rustdoc
12434-------
12435
12436* [Fix empty implementation section on some module pages](https://github.com/rust-lang/rust/pull/34536)
12437* [Fix inlined renamed re-exports in import lists](https://github.com/rust-lang/rust/pull/34479)
12438* [Fix search result layout for enum variants and struct fields](https://github.com/rust-lang/rust/pull/34477)
12439* [Fix issues with source links to external crates](https://github.com/rust-lang/rust/pull/34387)
12440* [Fix redirect pages for renamed re-exports](https://github.com/rust-lang/rust/pull/34245)
12441
12442Tooling
12443-------
12444
12445* [rustc is better at finding the MSVC toolchain](https://github.com/rust-lang/rust/pull/34492)
12446* [When emitting debug info, rustc emits frame pointers for closures,
12447 shims and glue, as it does for all other functions](https://github.com/rust-lang/rust/pull/33909)
12448* [rust-lldb warns about unsupported versions of LLDB](https://github.com/rust-lang/rust/pull/34646)
12449* Many more errors have been given error codes and extended
12450 explanations
12451* API documentation continues to be improved, with many new examples
12452
12453Misc
12454----
12455
12456* [rustc no longer hangs when dependencies recursively re-export
12457 submodules](https://github.com/rust-lang/rust/pull/34542)
12458* [rustc requires LLVM 3.7+](https://github.com/rust-lang/rust/pull/34104)
12459* [The 'How Safe and Unsafe Interact' chapter of The Rustonomicon was
12460 rewritten](https://github.com/rust-lang/rust/pull/33895)
12461* [rustc support 16-bit pointer sizes](https://github.com/rust-lang/rust/pull/33460).
12462 No targets use this yet, but it works toward AVR support.
12463
12464Compatibility Notes
12465-------------------
12466
12467* [`const`s and `static`s may not have unsized types](https://github.com/rust-lang/rust/pull/34443)
12468* [The new follow-set rules that place restrictions on `macro_rules!`
12469 in order to ensure syntax forward-compatibility have been enabled](https://github.com/rust-lang/rust/pull/33982)
12470 This was an [amendment to RFC 550](https://github.com/rust-lang/rfcs/pull/1384),
12471 and has been a warning since 1.10.
12472* [`cfg` attribute process has been refactored to fix various bugs](https://github.com/rust-lang/rust/pull/33706).
12473 This causes breakage in some corner cases.
12474
12475
12476Version 1.10.0 (2016-07-07)
12477===========================
12478
12479Language
12480--------
12481
12482* [`Copy` types are required to have a trivial implementation of `Clone`](https://github.com/rust-lang/rust/pull/33420).
12483 [RFC 1521](https://github.com/rust-lang/rfcs/blob/master/text/1521-copy-clone-semantics.md).
12484* [Single-variant enums support the `#[repr(..)]` attribute](https://github.com/rust-lang/rust/pull/33355).
12485* [Fix `#[derive(RustcEncodable)]` in the presence of other `encode` methods](https://github.com/rust-lang/rust/pull/32908).
12486* [`panic!` can be converted to a runtime abort with the
12487 `-C panic=abort` flag](https://github.com/rust-lang/rust/pull/32900).
12488 [RFC 1513](https://github.com/rust-lang/rfcs/blob/master/text/1513-less-unwinding.md).
12489* [Add a new crate type, 'cdylib'](https://github.com/rust-lang/rust/pull/33553).
12490 cdylibs are dynamic libraries suitable for loading by non-Rust hosts.
12491 [RFC 1510](https://github.com/rust-lang/rfcs/blob/master/text/1510-cdylib.md).
12492 Note that Cargo does not yet directly support cdylibs.
12493
12494Stabilized APIs
12495---------------
12496
12497* `os::windows::fs::OpenOptionsExt::access_mode`
12498* `os::windows::fs::OpenOptionsExt::share_mode`
12499* `os::windows::fs::OpenOptionsExt::custom_flags`
12500* `os::windows::fs::OpenOptionsExt::attributes`
12501* `os::windows::fs::OpenOptionsExt::security_qos_flags`
12502* `os::unix::fs::OpenOptionsExt::custom_flags`
12503* [`sync::Weak::new`](http://doc.rust-lang.org/alloc/arc/struct.Weak.html#method.new)
12504* `Default for sync::Weak`
12505* [`panic::set_hook`](http://doc.rust-lang.org/std/panic/fn.set_hook.html)
12506* [`panic::take_hook`](http://doc.rust-lang.org/std/panic/fn.take_hook.html)
12507* [`panic::PanicInfo`](http://doc.rust-lang.org/std/panic/struct.PanicInfo.html)
12508* [`panic::PanicInfo::payload`](http://doc.rust-lang.org/std/panic/struct.PanicInfo.html#method.payload)
12509* [`panic::PanicInfo::location`](http://doc.rust-lang.org/std/panic/struct.PanicInfo.html#method.location)
12510* [`panic::Location`](http://doc.rust-lang.org/std/panic/struct.Location.html)
12511* [`panic::Location::file`](http://doc.rust-lang.org/std/panic/struct.Location.html#method.file)
12512* [`panic::Location::line`](http://doc.rust-lang.org/std/panic/struct.Location.html#method.line)
12513* [`ffi::CStr::from_bytes_with_nul`](http://doc.rust-lang.org/std/ffi/struct.CStr.html#method.from_bytes_with_nul)
12514* [`ffi::CStr::from_bytes_with_nul_unchecked`](http://doc.rust-lang.org/std/ffi/struct.CStr.html#method.from_bytes_with_nul_unchecked)
12515* [`ffi::FromBytesWithNulError`](http://doc.rust-lang.org/std/ffi/struct.FromBytesWithNulError.html)
12516* [`fs::Metadata::modified`](http://doc.rust-lang.org/std/fs/struct.Metadata.html#method.modified)
12517* [`fs::Metadata::accessed`](http://doc.rust-lang.org/std/fs/struct.Metadata.html#method.accessed)
12518* [`fs::Metadata::created`](http://doc.rust-lang.org/std/fs/struct.Metadata.html#method.created)
12519* `sync::atomic::Atomic{Usize,Isize,Bool,Ptr}::compare_exchange`
12520* `sync::atomic::Atomic{Usize,Isize,Bool,Ptr}::compare_exchange_weak`
12521* `collections::{btree,hash}_map::{Occupied,Vacant,}Entry::key`
12522* `os::unix::net::{UnixStream, UnixListener, UnixDatagram, SocketAddr}`
12523* [`SocketAddr::is_unnamed`](http://doc.rust-lang.org/std/os/unix/net/struct.SocketAddr.html#method.is_unnamed)
12524* [`SocketAddr::as_pathname`](http://doc.rust-lang.org/std/os/unix/net/struct.SocketAddr.html#method.as_pathname)
12525* [`UnixStream::connect`](http://doc.rust-lang.org/std/os/unix/net/struct.UnixStream.html#method.connect)
12526* [`UnixStream::pair`](http://doc.rust-lang.org/std/os/unix/net/struct.UnixStream.html#method.pair)
12527* [`UnixStream::try_clone`](http://doc.rust-lang.org/std/os/unix/net/struct.UnixStream.html#method.try_clone)
12528* [`UnixStream::local_addr`](http://doc.rust-lang.org/std/os/unix/net/struct.UnixStream.html#method.local_addr)
12529* [`UnixStream::peer_addr`](http://doc.rust-lang.org/std/os/unix/net/struct.UnixStream.html#method.peer_addr)
12530* [`UnixStream::set_read_timeout`](http://doc.rust-lang.org/std/os/unix/net/struct.UnixStream.html#method.read_timeout)
12531* [`UnixStream::set_write_timeout`](http://doc.rust-lang.org/std/os/unix/net/struct.UnixStream.html#method.write_timeout)
12532* [`UnixStream::read_timeout`](http://doc.rust-lang.org/std/os/unix/net/struct.UnixStream.html#method.read_timeout)
12533* [`UnixStream::write_timeout`](http://doc.rust-lang.org/std/os/unix/net/struct.UnixStream.html#method.write_timeout)
12534* [`UnixStream::set_nonblocking`](http://doc.rust-lang.org/std/os/unix/net/struct.UnixStream.html#method.set_nonblocking)
12535* [`UnixStream::take_error`](http://doc.rust-lang.org/std/os/unix/net/struct.UnixStream.html#method.take_error)
12536* [`UnixStream::shutdown`](http://doc.rust-lang.org/std/os/unix/net/struct.UnixStream.html#method.shutdown)
12537* Read/Write/RawFd impls for `UnixStream`
12538* [`UnixListener::bind`](http://doc.rust-lang.org/std/os/unix/net/struct.UnixListener.html#method.bind)
12539* [`UnixListener::accept`](http://doc.rust-lang.org/std/os/unix/net/struct.UnixListener.html#method.accept)
12540* [`UnixListener::try_clone`](http://doc.rust-lang.org/std/os/unix/net/struct.UnixListener.html#method.try_clone)
12541* [`UnixListener::local_addr`](http://doc.rust-lang.org/std/os/unix/net/struct.UnixListener.html#method.local_addr)
12542* [`UnixListener::set_nonblocking`](http://doc.rust-lang.org/std/os/unix/net/struct.UnixListener.html#method.set_nonblocking)
12543* [`UnixListener::take_error`](http://doc.rust-lang.org/std/os/unix/net/struct.UnixListener.html#method.take_error)
12544* [`UnixListener::incoming`](http://doc.rust-lang.org/std/os/unix/net/struct.UnixListener.html#method.incoming)
12545* RawFd impls for `UnixListener`
12546* [`UnixDatagram::bind`](http://doc.rust-lang.org/std/os/unix/net/struct.UnixDatagram.html#method.bind)
12547* [`UnixDatagram::unbound`](http://doc.rust-lang.org/std/os/unix/net/struct.UnixDatagram.html#method.unbound)
12548* [`UnixDatagram::pair`](http://doc.rust-lang.org/std/os/unix/net/struct.UnixDatagram.html#method.pair)
12549* [`UnixDatagram::connect`](http://doc.rust-lang.org/std/os/unix/net/struct.UnixDatagram.html#method.connect)
12550* [`UnixDatagram::try_clone`](http://doc.rust-lang.org/std/os/unix/net/struct.UnixDatagram.html#method.try_clone)
12551* [`UnixDatagram::local_addr`](http://doc.rust-lang.org/std/os/unix/net/struct.UnixDatagram.html#method.local_addr)
12552* [`UnixDatagram::peer_addr`](http://doc.rust-lang.org/std/os/unix/net/struct.UnixDatagram.html#method.peer_addr)
12553* [`UnixDatagram::recv_from`](http://doc.rust-lang.org/std/os/unix/net/struct.UnixDatagram.html#method.recv_from)
12554* [`UnixDatagram::recv`](http://doc.rust-lang.org/std/os/unix/net/struct.UnixDatagram.html#method.recv)
12555* [`UnixDatagram::send_to`](http://doc.rust-lang.org/std/os/unix/net/struct.UnixDatagram.html#method.send_to)
12556* [`UnixDatagram::send`](http://doc.rust-lang.org/std/os/unix/net/struct.UnixDatagram.html#method.send)
12557* [`UnixDatagram::set_read_timeout`](http://doc.rust-lang.org/std/os/unix/net/struct.UnixDatagram.html#method.set_read_timeout)
12558* [`UnixDatagram::set_write_timeout`](http://doc.rust-lang.org/std/os/unix/net/struct.UnixDatagram.html#method.set_write_timeout)
12559* [`UnixDatagram::read_timeout`](http://doc.rust-lang.org/std/os/unix/net/struct.UnixDatagram.html#method.read_timeout)
12560* [`UnixDatagram::write_timeout`](http://doc.rust-lang.org/std/os/unix/net/struct.UnixDatagram.html#method.write_timeout)
12561* [`UnixDatagram::set_nonblocking`](http://doc.rust-lang.org/std/os/unix/net/struct.UnixDatagram.html#method.set_nonblocking)
12562* [`UnixDatagram::take_error`](http://doc.rust-lang.org/std/os/unix/net/struct.UnixDatagram.html#method.take_error)
12563* [`UnixDatagram::shutdown`](http://doc.rust-lang.org/std/os/unix/net/struct.UnixDatagram.html#method.shutdown)
12564* RawFd impls for `UnixDatagram`
12565* `{BTree,Hash}Map::values_mut`
12566* [`<[_]>::binary_search_by_key`](http://doc.rust-lang.org/std/primitive.slice.html#method.binary_search_by_key)
12567
12568Libraries
12569---------
12570
12571* [The `abs_sub` method of floats is deprecated](https://github.com/rust-lang/rust/pull/33664).
12572 The semantics of this minor method are subtle and probably not what
12573 most people want.
12574* [Add implementation of Ord for Cell<T> and RefCell<T> where T: Ord](https://github.com/rust-lang/rust/pull/33306).
12575* [On Linux, if `HashMap`s can't be initialized with `getrandom` they
12576 will fall back to `/dev/urandom` temporarily to avoid blocking
12577 during early boot](https://github.com/rust-lang/rust/pull/33086).
12578* [Implemented negation for wrapping numerals](https://github.com/rust-lang/rust/pull/33067).
12579* [Implement `Clone` for `binary_heap::IntoIter`](https://github.com/rust-lang/rust/pull/33050).
12580* [Implement `Display` and `Hash` for `std::num::Wrapping`](https://github.com/rust-lang/rust/pull/33023).
12581* [Add `Default` implementation for `&CStr`, `CString`](https://github.com/rust-lang/rust/pull/32990).
12582* [Implement `From<Vec<T>>` and `Into<Vec<T>>` for `VecDeque<T>`](https://github.com/rust-lang/rust/pull/32866).
12583* [Implement `Default` for `UnsafeCell`, `fmt::Error`, `Condvar`,
12584 `Mutex`, `RwLock`](https://github.com/rust-lang/rust/pull/32785).
12585
12586Cargo
12587-----
12588* [Cargo.toml supports the `profile.*.panic` option](https://github.com/rust-lang/cargo/pull/2687).
12589 This controls the runtime behavior of the `panic!` macro
12590 and can be either "unwind" (the default), or "abort".
12591 [RFC 1513](https://github.com/rust-lang/rfcs/blob/master/text/1513-less-unwinding.md).
12592* [Don't throw away errors with `-p` arguments](https://github.com/rust-lang/cargo/pull/2723).
12593* [Report status to stderr instead of stdout](https://github.com/rust-lang/cargo/pull/2693).
12594* [Build scripts are passed a `CARGO_MANIFEST_LINKS` environment
12595 variable that corresponds to the `links` field of the manifest](https://github.com/rust-lang/cargo/pull/2710).
12596* [Ban keywords from crate names](https://github.com/rust-lang/cargo/pull/2707).
12597* [Canonicalize `CARGO_HOME` on Windows](https://github.com/rust-lang/cargo/pull/2604).
12598* [Retry network requests](https://github.com/rust-lang/cargo/pull/2396).
12599 By default they are retried twice, which can be customized with the
12600 `net.retry` value in `.cargo/config`.
12601* [Don't print extra error info for failing subcommands](https://github.com/rust-lang/cargo/pull/2674).
12602* [Add `--force` flag to `cargo install`](https://github.com/rust-lang/cargo/pull/2405).
12603* [Don't use `flock` on NFS mounts](https://github.com/rust-lang/cargo/pull/2623).
12604* [Prefer building `cargo install` artifacts in temporary directories](https://github.com/rust-lang/cargo/pull/2610).
12605 Makes it possible to install multiple crates in parallel.
12606* [Add `cargo test --doc`](https://github.com/rust-lang/cargo/pull/2578).
12607* [Add `cargo --explain`](https://github.com/rust-lang/cargo/pull/2551).
12608* [Don't print warnings when `-q` is passed](https://github.com/rust-lang/cargo/pull/2576).
12609* [Add `cargo doc --lib` and `--bin`](https://github.com/rust-lang/cargo/pull/2577).
12610* [Don't require build script output to be UTF-8](https://github.com/rust-lang/cargo/pull/2560).
12611* [Correctly attempt multiple git usernames](https://github.com/rust-lang/cargo/pull/2584).
12612
12613Performance
12614-----------
12615
12616* [rustc memory usage was reduced by refactoring the context used for
12617 type checking](https://github.com/rust-lang/rust/pull/33425).
12618* [Speed up creation of `HashMap`s by caching the random keys used
12619 to initialize the hash state](https://github.com/rust-lang/rust/pull/33318).
12620* [The `find` implementation for `Chain` iterators is 2x faster](https://github.com/rust-lang/rust/pull/33289).
12621* [Trait selection optimizations speed up type checking by 15%](https://github.com/rust-lang/rust/pull/33138).
12622* [Efficient trie lookup for boolean Unicode properties](https://github.com/rust-lang/rust/pull/33098).
12623 10x faster than the previous lookup tables.
12624* [Special case `#[derive(Copy, Clone)]` to avoid bloat](https://github.com/rust-lang/rust/pull/31414).
12625
12626Usability
12627---------
12628
12629* Many incremental improvements to documentation and rustdoc.
12630* [rustdoc: List blanket trait impls](https://github.com/rust-lang/rust/pull/33514).
12631* [rustdoc: Clean up ABI rendering](https://github.com/rust-lang/rust/pull/33151).
12632* [Indexing with the wrong type produces a more informative error](https://github.com/rust-lang/rust/pull/33401).
12633* [Improve diagnostics for constants being used in irrefutable patterns](https://github.com/rust-lang/rust/pull/33406).
12634* [When many method candidates are in scope limit the suggestions to 10](https://github.com/rust-lang/rust/pull/33338).
12635* [Remove confusing suggestion when calling a `fn` type](https://github.com/rust-lang/rust/pull/33325).
12636* [Do not suggest changing `&mut self` to `&mut mut self`](https://github.com/rust-lang/rust/pull/33319).
12637
12638Misc
12639----
12640
12641* [Update i686-linux-android features to match Android ABI](https://github.com/rust-lang/rust/pull/33651).
12642* [Update aarch64-linux-android features to match Android ABI](https://github.com/rust-lang/rust/pull/33500).
12643* [`std` no longer prints backtraces on platforms where the running
12644 module must be loaded with `env::current_exe`, which can't be relied
12645 on](https://github.com/rust-lang/rust/pull/33554).
12646* This release includes std binaries for the i586-unknown-linux-gnu,
12647 i686-unknown-linux-musl, and armv7-linux-androideabi targets. The
12648 i586 target is for old x86 hardware without SSE2, and the armv7
12649 target is for Android running on modern ARM architectures.
12650* [The `rust-gdb` and `rust-lldb` scripts are distributed on all
12651 Unix platforms](https://github.com/rust-lang/rust/pull/32835).
12652* [On Unix the runtime aborts by calling `libc::abort` instead of
12653 generating an illegal instruction](https://github.com/rust-lang/rust/pull/31457).
12654* [Rust is now bootstrapped from the previous release of Rust,
12655 instead of a snapshot from an arbitrary commit](https://github.com/rust-lang/rust/pull/32942).
12656
12657Compatibility Notes
12658-------------------
12659
12660* [`AtomicBool` is now bool-sized, not word-sized](https://github.com/rust-lang/rust/pull/33579).
12661* [`target_env` for Linux ARM targets is just `gnu`, not
12662 `gnueabihf`, `gnueabi`, etc](https://github.com/rust-lang/rust/pull/33403).
12663* [Consistently panic on overflow in `Duration::new`](https://github.com/rust-lang/rust/pull/33072).
12664* [Change `String::truncate` to panic less](https://github.com/rust-lang/rust/pull/32977).
12665* [Add `:block` to the follow set for `:ty` and `:path`](https://github.com/rust-lang/rust/pull/32945).
12666 Affects how macros are parsed.
12667* [Fix macro hygiene bug](https://github.com/rust-lang/rust/pull/32923).
12668* [Feature-gated attributes on macro-generated macro invocations are
12669 now rejected](https://github.com/rust-lang/rust/pull/32791).
12670* [Suppress fallback and ambiguity errors during type inference](https://github.com/rust-lang/rust/pull/32258).
12671 This caused some minor changes to type inference.
12672
12673
12674Version 1.9.0 (2016-05-26)
12675==========================
12676
12677Language
12678--------
12679
12680* The `#[deprecated]` attribute when applied to an API will generate
12681 warnings when used. The warnings may be suppressed with
12682 `#[allow(deprecated)]`. [RFC 1270].
12683* [`fn` item types are zero sized, and each `fn` names a unique
12684 type][1.9fn]. This will break code that transmutes `fn`s, so calling
12685 `transmute` on a `fn` type will generate a warning for a few cycles,
12686 then will be converted to an error.
12687* [Field and method resolution understand visibility, so private
12688 fields and methods cannot prevent the proper use of public fields
12689 and methods][1.9fv].
12690* [The parser considers unicode codepoints in the
12691 `PATTERN_WHITE_SPACE` category to be whitespace][1.9ws].
12692
12693Stabilized APIs
12694---------------
12695
12696* [`std::panic`]
12697* [`std::panic::catch_unwind`] (renamed from `recover`)
12698* [`std::panic::resume_unwind`] (renamed from `propagate`)
12699* [`std::panic::AssertUnwindSafe`] (renamed from `AssertRecoverSafe`)
12700* [`std::panic::UnwindSafe`] (renamed from `RecoverSafe`)
12701* [`str::is_char_boundary`]
12702* [`<*const T>::as_ref`]
12703* [`<*mut T>::as_ref`]
12704* [`<*mut T>::as_mut`]
12705* [`AsciiExt::make_ascii_uppercase`]
12706* [`AsciiExt::make_ascii_lowercase`]
12707* [`char::decode_utf16`]
12708* [`char::DecodeUtf16`]
12709* [`char::DecodeUtf16Error`]
12710* [`char::DecodeUtf16Error::unpaired_surrogate`]
12711* [`BTreeSet::take`]
12712* [`BTreeSet::replace`]
12713* [`BTreeSet::get`]
12714* [`HashSet::take`]
12715* [`HashSet::replace`]
12716* [`HashSet::get`]
12717* [`OsString::with_capacity`]
12718* [`OsString::clear`]
12719* [`OsString::capacity`]
12720* [`OsString::reserve`]
12721* [`OsString::reserve_exact`]
12722* [`OsStr::is_empty`]
12723* [`OsStr::len`]
12724* [`std::os::unix::thread`]
12725* [`RawPthread`]
12726* [`JoinHandleExt`]
12727* [`JoinHandleExt::as_pthread_t`]
12728* [`JoinHandleExt::into_pthread_t`]
12729* [`HashSet::hasher`]
12730* [`HashMap::hasher`]
12731* [`CommandExt::exec`]
12732* [`File::try_clone`]
12733* [`SocketAddr::set_ip`]
12734* [`SocketAddr::set_port`]
12735* [`SocketAddrV4::set_ip`]
12736* [`SocketAddrV4::set_port`]
12737* [`SocketAddrV6::set_ip`]
12738* [`SocketAddrV6::set_port`]
12739* [`SocketAddrV6::set_flowinfo`]
12740* [`SocketAddrV6::set_scope_id`]
12741* [`slice::copy_from_slice`]
12742* [`ptr::read_volatile`]
12743* [`ptr::write_volatile`]
12744* [`OpenOptions::create_new`]
12745* [`TcpStream::set_nodelay`]
12746* [`TcpStream::nodelay`]
12747* [`TcpStream::set_ttl`]
12748* [`TcpStream::ttl`]
12749* [`TcpStream::set_only_v6`]
12750* [`TcpStream::only_v6`]
12751* [`TcpStream::take_error`]
12752* [`TcpStream::set_nonblocking`]
12753* [`TcpListener::set_ttl`]
12754* [`TcpListener::ttl`]
12755* [`TcpListener::set_only_v6`]
12756* [`TcpListener::only_v6`]
12757* [`TcpListener::take_error`]
12758* [`TcpListener::set_nonblocking`]
12759* [`UdpSocket::set_broadcast`]
12760* [`UdpSocket::broadcast`]
12761* [`UdpSocket::set_multicast_loop_v4`]
12762* [`UdpSocket::multicast_loop_v4`]
12763* [`UdpSocket::set_multicast_ttl_v4`]
12764* [`UdpSocket::multicast_ttl_v4`]
12765* [`UdpSocket::set_multicast_loop_v6`]
12766* [`UdpSocket::multicast_loop_v6`]
12767* [`UdpSocket::set_multicast_ttl_v6`]
12768* [`UdpSocket::multicast_ttl_v6`]
12769* [`UdpSocket::set_ttl`]
12770* [`UdpSocket::ttl`]
12771* [`UdpSocket::set_only_v6`]
12772* [`UdpSocket::only_v6`]
12773* [`UdpSocket::join_multicast_v4`]
12774* [`UdpSocket::join_multicast_v6`]
12775* [`UdpSocket::leave_multicast_v4`]
12776* [`UdpSocket::leave_multicast_v6`]
12777* [`UdpSocket::take_error`]
12778* [`UdpSocket::connect`]
12779* [`UdpSocket::send`]
12780* [`UdpSocket::recv`]
12781* [`UdpSocket::set_nonblocking`]
12782
12783Libraries
12784---------
12785
12786* [`std::sync::Once` is poisoned if its initialization function
12787 fails][1.9o].
12788* [`cell::Ref` and `cell::RefMut` can contain unsized types][1.9cu].
12789* [Most types implement `fmt::Debug`][1.9db].
12790* [The default buffer size used by `BufReader` and `BufWriter` was
12791 reduced to 8K, from 64K][1.9bf]. This is in line with the buffer size
12792 used by other languages.
12793* [`Instant`, `SystemTime` and `Duration` implement `+=` and `-=`.
12794 `Duration` additionally implements `*=` and `/=`][1.9ta].
12795* [`Skip` is a `DoubleEndedIterator`][1.9sk].
12796* [`From<[u8; 4]>` is implemented for `Ipv4Addr`][1.9fi].
12797* [`Chain` implements `BufRead`][1.9ch].
12798* [`HashMap`, `HashSet` and iterators are covariant][1.9hc].
12799
12800Cargo
12801-----
12802
12803* [Cargo can now run concurrently][1.9cc].
12804* [Top-level overrides allow specific revisions of crates to be
12805 overridden through the entire crate graph][1.9ct]. This is intended
12806 to make upgrades easier for large projects, by allowing crates to be
12807 forked temporarily until they've been upgraded and republished.
12808* [Cargo exports a `CARGO_PKG_AUTHORS` environment variable][1.9cp].
12809* [Cargo will pass the contents of the `RUSTFLAGS` variable to `rustc`
12810 on the commandline][1.9cf]. `rustc` arguments can also be specified
12811 in the `build.rustflags` configuration key.
12812
12813Performance
12814-----------
12815
12816* [The time complexity of comparing variables for equivalence during type
12817 unification is reduced from _O_(_n_!) to _O_(_n_)][1.9tu]. This leads
12818 to major compilation time improvement in some scenarios.
12819* [`ToString` is specialized for `str`, giving it the same performance
12820 as `to_owned`][1.9ts].
12821* [Spawning processes with `Command::output` no longer creates extra
12822 threads][1.9sp].
12823* [`#[derive(PartialEq)]` and `#[derive(PartialOrd)]` emit less code
12824 for C-like enums][1.9cl].
12825
12826Misc
12827----
12828
12829* [Passing the `--quiet` flag to a test runner will produce
12830 much-abbreviated output][1.9q].
12831* The Rust Project now publishes std binaries for the
12832 `mips-unknown-linux-musl`, `mipsel-unknown-linux-musl`, and
12833 `i586-pc-windows-msvc` targets.
12834
12835Compatibility Notes
12836-------------------
12837
12838* [`std::sync::Once` is poisoned if its initialization function
12839 fails][1.9o].
12840* [It is illegal to define methods with the same name in overlapping
12841 inherent `impl` blocks][1.9sn].
12842* [`fn` item types are zero sized, and each `fn` names a unique
12843 type][1.9fn]. This will break code that transmutes `fn`s, so calling
12844 `transmute` on a `fn` type will generate a warning for a few cycles,
12845 then will be converted to an error.
12846* [Improvements to const evaluation may trigger new errors when integer
12847 literals are out of range][1.9ce].
12848
12849
12850[1.9bf]: https://github.com/rust-lang/rust/pull/32695
12851[1.9cc]: https://github.com/rust-lang/cargo/pull/2486
12852[1.9ce]: https://github.com/rust-lang/rust/pull/30587
12853[1.9cf]: https://github.com/rust-lang/cargo/pull/2241
12854[1.9ch]: https://github.com/rust-lang/rust/pull/32541
12855[1.9cl]: https://github.com/rust-lang/rust/pull/31977
12856[1.9cp]: https://github.com/rust-lang/cargo/pull/2465
12857[1.9ct]: https://github.com/rust-lang/cargo/pull/2385
12858[1.9cu]: https://github.com/rust-lang/rust/pull/32652
12859[1.9db]: https://github.com/rust-lang/rust/pull/32054
12860[1.9fi]: https://github.com/rust-lang/rust/pull/32050
12861[1.9fn]: https://github.com/rust-lang/rust/pull/31710
12862[1.9fv]: https://github.com/rust-lang/rust/pull/31938
12863[1.9hc]: https://github.com/rust-lang/rust/pull/32635
12864[1.9o]: https://github.com/rust-lang/rust/pull/32325
12865[1.9q]: https://github.com/rust-lang/rust/pull/31887
12866[1.9sk]: https://github.com/rust-lang/rust/pull/31700
12867[1.9sn]: https://github.com/rust-lang/rust/pull/31925
12868[1.9sp]: https://github.com/rust-lang/rust/pull/31618
12869[1.9ta]: https://github.com/rust-lang/rust/pull/32448
12870[1.9ts]: https://github.com/rust-lang/rust/pull/32586
12871[1.9tu]: https://github.com/rust-lang/rust/pull/32062
12872[1.9ws]: https://github.com/rust-lang/rust/pull/29734
12873[RFC 1270]: https://github.com/rust-lang/rfcs/blob/master/text/1270-deprecation.md
12874[`<*const T>::as_ref`]: http://doc.rust-lang.org/nightly/std/primitive.pointer.html#method.as_ref
12875[`<*mut T>::as_mut`]: http://doc.rust-lang.org/nightly/std/primitive.pointer.html#method.as_mut
12876[`<*mut T>::as_ref`]: http://doc.rust-lang.org/nightly/std/primitive.pointer.html#method.as_ref
12877[`slice::copy_from_slice`]: http://doc.rust-lang.org/nightly/std/primitive.slice.html#method.copy_from_slice
12878[`AsciiExt::make_ascii_lowercase`]: http://doc.rust-lang.org/nightly/std/ascii/trait.AsciiExt.html#tymethod.make_ascii_lowercase
12879[`AsciiExt::make_ascii_uppercase`]: http://doc.rust-lang.org/nightly/std/ascii/trait.AsciiExt.html#tymethod.make_ascii_uppercase
12880[`BTreeSet::get`]: http://doc.rust-lang.org/nightly/collections/btree/set/struct.BTreeSet.html#method.get
12881[`BTreeSet::replace`]: http://doc.rust-lang.org/nightly/collections/btree/set/struct.BTreeSet.html#method.replace
12882[`BTreeSet::take`]: http://doc.rust-lang.org/nightly/collections/btree/set/struct.BTreeSet.html#method.take
12883[`CommandExt::exec`]: http://doc.rust-lang.org/nightly/std/os/unix/process/trait.CommandExt.html#tymethod.exec
12884[`File::try_clone`]: http://doc.rust-lang.org/nightly/std/fs/struct.File.html#method.try_clone
12885[`HashMap::hasher`]: http://doc.rust-lang.org/nightly/std/collections/struct.HashMap.html#method.hasher
12886[`HashSet::get`]: http://doc.rust-lang.org/nightly/std/collections/struct.HashSet.html#method.get
12887[`HashSet::hasher`]: http://doc.rust-lang.org/nightly/std/collections/struct.HashSet.html#method.hasher
12888[`HashSet::replace`]: http://doc.rust-lang.org/nightly/std/collections/struct.HashSet.html#method.replace
12889[`HashSet::take`]: http://doc.rust-lang.org/nightly/std/collections/struct.HashSet.html#method.take
12890[`JoinHandleExt::as_pthread_t`]: http://doc.rust-lang.org/nightly/std/os/unix/thread/trait.JoinHandleExt.html#tymethod.as_pthread_t
12891[`JoinHandleExt::into_pthread_t`]: http://doc.rust-lang.org/nightly/std/os/unix/thread/trait.JoinHandleExt.html#tymethod.into_pthread_t
12892[`JoinHandleExt`]: http://doc.rust-lang.org/nightly/std/os/unix/thread/trait.JoinHandleExt.html
12893[`OpenOptions::create_new`]: http://doc.rust-lang.org/nightly/std/fs/struct.OpenOptions.html#method.create_new
12894[`OsStr::is_empty`]: http://doc.rust-lang.org/nightly/std/ffi/struct.OsStr.html#method.is_empty
12895[`OsStr::len`]: http://doc.rust-lang.org/nightly/std/ffi/struct.OsStr.html#method.len
12896[`OsString::capacity`]: http://doc.rust-lang.org/nightly/std/ffi/struct.OsString.html#method.capacity
12897[`OsString::clear`]: http://doc.rust-lang.org/nightly/std/ffi/struct.OsString.html#method.clear
12898[`OsString::reserve_exact`]: http://doc.rust-lang.org/nightly/std/ffi/struct.OsString.html#method.reserve_exact
12899[`OsString::reserve`]: http://doc.rust-lang.org/nightly/std/ffi/struct.OsString.html#method.reserve
12900[`OsString::with_capacity`]: http://doc.rust-lang.org/nightly/std/ffi/struct.OsString.html#method.with_capacity
12901[`RawPthread`]: http://doc.rust-lang.org/nightly/std/os/unix/thread/type.RawPthread.html
12902[`SocketAddr::set_ip`]: http://doc.rust-lang.org/nightly/std/net/enum.SocketAddr.html#method.set_ip
12903[`SocketAddr::set_port`]: http://doc.rust-lang.org/nightly/std/net/enum.SocketAddr.html#method.set_port
12904[`SocketAddrV4::set_ip`]: http://doc.rust-lang.org/nightly/std/net/struct.SocketAddrV4.html#method.set_ip
12905[`SocketAddrV4::set_port`]: http://doc.rust-lang.org/nightly/std/net/struct.SocketAddrV4.html#method.set_port
12906[`SocketAddrV6::set_flowinfo`]: http://doc.rust-lang.org/nightly/std/net/struct.SocketAddrV6.html#method.set_flowinfo
12907[`SocketAddrV6::set_ip`]: http://doc.rust-lang.org/nightly/std/net/struct.SocketAddrV6.html#method.set_ip
12908[`SocketAddrV6::set_port`]: http://doc.rust-lang.org/nightly/std/net/struct.SocketAddrV6.html#method.set_port
12909[`SocketAddrV6::set_scope_id`]: http://doc.rust-lang.org/nightly/std/net/struct.SocketAddrV6.html#method.set_scope_id
12910[`TcpListener::only_v6`]: http://doc.rust-lang.org/nightly/std/net/struct.TcpStream.html#method.only_v6
12911[`TcpListener::set_nonblocking`]: http://doc.rust-lang.org/nightly/std/net/struct.TcpStream.html#method.set_nonblocking
12912[`TcpListener::set_only_v6`]: http://doc.rust-lang.org/nightly/std/net/struct.TcpStream.html#method.set_only_v6
12913[`TcpListener::set_ttl`]: http://doc.rust-lang.org/nightly/std/net/struct.TcpStream.html#method.set_ttl
12914[`TcpListener::take_error`]: http://doc.rust-lang.org/nightly/std/net/struct.TcpStream.html#method.take_error
12915[`TcpListener::ttl`]: http://doc.rust-lang.org/nightly/std/net/struct.TcpStream.html#method.ttl
12916[`TcpStream::nodelay`]: http://doc.rust-lang.org/nightly/std/net/struct.TcpStream.html#method.nodelay
12917[`TcpStream::only_v6`]: http://doc.rust-lang.org/nightly/std/net/struct.TcpStream.html#method.only_v6
12918[`TcpStream::set_nodelay`]: http://doc.rust-lang.org/nightly/std/net/struct.TcpStream.html#method.set_nodelay
12919[`TcpStream::set_nonblocking`]: http://doc.rust-lang.org/nightly/std/net/struct.TcpStream.html#method.set_nonblocking
12920[`TcpStream::set_only_v6`]: http://doc.rust-lang.org/nightly/std/net/struct.TcpStream.html#method.set_only_v6
12921[`TcpStream::set_ttl`]: http://doc.rust-lang.org/nightly/std/net/struct.TcpStream.html#method.set_ttl
12922[`TcpStream::take_error`]: http://doc.rust-lang.org/nightly/std/net/struct.TcpStream.html#method.take_error
12923[`TcpStream::ttl`]: http://doc.rust-lang.org/nightly/std/net/struct.TcpStream.html#method.ttl
12924[`UdpSocket::broadcast`]: http://doc.rust-lang.org/nightly/std/net/struct.UdpSocket.html#method.broadcast
12925[`UdpSocket::connect`]: http://doc.rust-lang.org/nightly/std/net/struct.UdpSocket.html#method.connect
12926[`UdpSocket::join_multicast_v4`]: http://doc.rust-lang.org/nightly/std/net/struct.UdpSocket.html#method.join_multicast_v4
12927[`UdpSocket::join_multicast_v6`]: http://doc.rust-lang.org/nightly/std/net/struct.UdpSocket.html#method.join_multicast_v6
12928[`UdpSocket::leave_multicast_v4`]: http://doc.rust-lang.org/nightly/std/net/struct.UdpSocket.html#method.leave_multicast_v4
12929[`UdpSocket::leave_multicast_v6`]: http://doc.rust-lang.org/nightly/std/net/struct.UdpSocket.html#method.leave_multicast_v6
12930[`UdpSocket::multicast_loop_v4`]: http://doc.rust-lang.org/nightly/std/net/struct.UdpSocket.html#method.multicast_loop_v4
12931[`UdpSocket::multicast_loop_v6`]: http://doc.rust-lang.org/nightly/std/net/struct.UdpSocket.html#method.multicast_loop_v6
12932[`UdpSocket::multicast_ttl_v4`]: http://doc.rust-lang.org/nightly/std/net/struct.UdpSocket.html#method.multicast_ttl_v4
12933[`UdpSocket::multicast_ttl_v6`]: http://doc.rust-lang.org/nightly/std/net/struct.UdpSocket.html#method.multicast_ttl_v6
12934[`UdpSocket::only_v6`]: http://doc.rust-lang.org/nightly/std/net/struct.UdpSocket.html#method.only_v6
12935[`UdpSocket::recv`]: http://doc.rust-lang.org/nightly/std/net/struct.UdpSocket.html#method.recv
12936[`UdpSocket::send`]: http://doc.rust-lang.org/nightly/std/net/struct.UdpSocket.html#method.send
12937[`UdpSocket::set_broadcast`]: http://doc.rust-lang.org/nightly/std/net/struct.UdpSocket.html#method.set_broadcast
12938[`UdpSocket::set_multicast_loop_v4`]: http://doc.rust-lang.org/nightly/std/net/struct.UdpSocket.html#method.set_multicast_loop_v4
12939[`UdpSocket::set_multicast_loop_v6`]: http://doc.rust-lang.org/nightly/std/net/struct.UdpSocket.html#method.set_multicast_loop_v6
12940[`UdpSocket::set_multicast_ttl_v4`]: http://doc.rust-lang.org/nightly/std/net/struct.UdpSocket.html#method.set_multicast_ttl_v4
12941[`UdpSocket::set_multicast_ttl_v6`]: http://doc.rust-lang.org/nightly/std/net/struct.UdpSocket.html#method.set_multicast_ttl_v6
12942[`UdpSocket::set_nonblocking`]: http://doc.rust-lang.org/nightly/std/net/struct.UdpSocket.html#method.set_nonblocking
12943[`UdpSocket::set_only_v6`]: http://doc.rust-lang.org/nightly/std/net/struct.UdpSocket.html#method.set_only_v6
12944[`UdpSocket::set_ttl`]: http://doc.rust-lang.org/nightly/std/net/struct.UdpSocket.html#method.set_ttl
12945[`UdpSocket::take_error`]: http://doc.rust-lang.org/nightly/std/net/struct.UdpSocket.html#method.take_error
12946[`UdpSocket::ttl`]: http://doc.rust-lang.org/nightly/std/net/struct.UdpSocket.html#method.ttl
12947[`char::DecodeUtf16Error::unpaired_surrogate`]: http://doc.rust-lang.org/nightly/std/char/struct.DecodeUtf16Error.html#method.unpaired_surrogate
12948[`char::DecodeUtf16Error`]: http://doc.rust-lang.org/nightly/std/char/struct.DecodeUtf16Error.html
12949[`char::DecodeUtf16`]: http://doc.rust-lang.org/nightly/std/char/struct.DecodeUtf16.html
12950[`char::decode_utf16`]: http://doc.rust-lang.org/nightly/std/char/fn.decode_utf16.html
12951[`ptr::read_volatile`]: http://doc.rust-lang.org/nightly/std/ptr/fn.read_volatile.html
12952[`ptr::write_volatile`]: http://doc.rust-lang.org/nightly/std/ptr/fn.write_volatile.html
12953[`std::os::unix::thread`]: http://doc.rust-lang.org/nightly/std/os/unix/thread/index.html
12954[`std::panic::AssertUnwindSafe`]: http://doc.rust-lang.org/nightly/std/panic/struct.AssertUnwindSafe.html
12955[`std::panic::UnwindSafe`]: http://doc.rust-lang.org/nightly/std/panic/trait.UnwindSafe.html
12956[`std::panic::catch_unwind`]: http://doc.rust-lang.org/nightly/std/panic/fn.catch_unwind.html
12957[`std::panic::resume_unwind`]: http://doc.rust-lang.org/nightly/std/panic/fn.resume_unwind.html
12958[`std::panic`]: http://doc.rust-lang.org/nightly/std/panic/index.html
12959[`str::is_char_boundary`]: http://doc.rust-lang.org/nightly/std/primitive.str.html#method.is_char_boundary
12960
12961
12962Version 1.8.0 (2016-04-14)
12963==========================
12964
12965Language
12966--------
12967
12968* Rust supports overloading of compound assignment statements like
12969 `+=` by implementing the [`AddAssign`], [`SubAssign`],
12970 [`MulAssign`], [`DivAssign`], [`RemAssign`], [`BitAndAssign`],
12971 [`BitOrAssign`], [`BitXorAssign`], [`ShlAssign`], or [`ShrAssign`]
12972 traits. [RFC 953].
12973* Empty structs can be defined with braces, as in `struct Foo { }`, in
12974 addition to the non-braced form, `struct Foo;`. [RFC 218].
12975
12976Libraries
12977---------
12978
12979* Stabilized APIs:
12980 * [`str::encode_utf16`] (renamed from `utf16_units`)
12981 * [`str::EncodeUtf16`] (renamed from `Utf16Units`)
12982 * [`Ref::map`]
12983 * [`RefMut::map`]
12984 * [`ptr::drop_in_place`]
12985 * [`time::Instant`]
12986 * [`time::SystemTime`]
12987 * [`Instant::now`]
12988 * [`Instant::duration_since`] (renamed from `duration_from_earlier`)
12989 * [`Instant::elapsed`]
12990 * [`SystemTime::now`]
12991 * [`SystemTime::duration_since`] (renamed from `duration_from_earlier`)
12992 * [`SystemTime::elapsed`]
12993 * Various `Add`/`Sub` impls for `Time` and `SystemTime`
12994 * [`SystemTimeError`]
12995 * [`SystemTimeError::duration`]
12996 * Various impls for `SystemTimeError`
12997 * [`UNIX_EPOCH`]
12998 * [`AddAssign`], [`SubAssign`], [`MulAssign`], [`DivAssign`],
12999 [`RemAssign`], [`BitAndAssign`], [`BitOrAssign`],
13000 [`BitXorAssign`], [`ShlAssign`], [`ShrAssign`].
13001* [The `write!` and `writeln!` macros correctly emit errors if any of
13002 their arguments can't be formatted][1.8w].
13003* [Various I/O functions support large files on 32-bit Linux][1.8l].
13004* [The Unix-specific `raw` modules, which contain a number of
13005 redefined C types are deprecated][1.8r], including `os::raw::unix`,
13006 `os::raw::macos`, and `os::raw::linux`. These modules defined types
13007 such as `ino_t` and `dev_t`. The inconsistency of these definitions
13008 across platforms was making it difficult to implement `std`
13009 correctly. Those that need these definitions should use the `libc`
13010 crate. [RFC 1415].
13011* The Unix-specific `MetadataExt` traits, including
13012 `os::unix::fs::MetadataExt`, which expose values such as inode
13013 numbers [no longer return platform-specific types][1.8r], but
13014 instead return widened integers. [RFC 1415].
13015* [`btree_set::{IntoIter, Iter, Range}` are covariant][1.8cv].
13016* [Atomic loads and stores are not volatile][1.8a].
13017* [All types in `sync::mpsc` implement `fmt::Debug`][1.8mp].
13018
13019Performance
13020-----------
13021
13022* [Inlining hash functions lead to a 3% compile-time improvement in
13023 some workloads][1.8h].
13024* When using jemalloc, its symbols are [unprefixed so that it
13025 overrides the libc malloc implementation][1.8h]. This means that for
13026 rustc, LLVM is now using jemalloc, which results in a 6%
13027 compile-time improvement on a specific workload.
13028* [Avoid quadratic growth in function size due to cleanups][1.8cu].
13029
13030Misc
13031----
13032
13033* [32-bit MSVC builds finally implement unwinding][1.8ms].
13034 i686-pc-windows-msvc is now considered a tier-1 platform.
13035* [The `--print targets` flag prints a list of supported targets][1.8t].
13036* [The `--print cfg` flag prints the `cfg`s defined for the current
13037 target][1.8cf].
13038* [`rustc` can be built with an new Cargo-based build system, written
13039 in Rust][1.8b]. It will eventually replace Rust's Makefile-based
13040 build system. To enable it configure with `configure --rustbuild`.
13041* [Errors for non-exhaustive `match` patterns now list up to 3 missing
13042 variants while also indicating the total number of missing variants
13043 if more than 3][1.8m].
13044* [Executable stacks are disabled on Linux and BSD][1.8nx].
13045* The Rust Project now publishes binary releases of the standard
13046 library for a number of tier-2 targets:
13047 `armv7-unknown-linux-gnueabihf`, `powerpc-unknown-linux-gnu`,
13048 `powerpc64-unknown-linux-gnu`, `powerpc64le-unknown-linux-gnu`
13049 `x86_64-rumprun-netbsd`. These can be installed with
13050 tools such as [multirust][1.8mr].
13051
13052Cargo
13053-----
13054
13055* [`cargo init` creates a new Cargo project in the current
13056 directory][1.8ci]. It is otherwise like `cargo new`.
13057* [Cargo has configuration keys for `-v` and
13058 `--color`][1.8cc]. `verbose` and `color`, respectively, go in the
13059 `[term]` section of `.cargo/config`.
13060* [Configuration keys that evaluate to strings or integers can be set
13061 via environment variables][1.8ce]. For example the `build.jobs` key
13062 can be set via `CARGO_BUILD_JOBS`. Environment variables take
13063 precedence over config files.
13064* [Target-specific dependencies support Rust `cfg` syntax for
13065 describing targets][1.8cfg] so that dependencies for multiple
13066 targets can be specified together. [RFC 1361].
13067* [The environment variables `CARGO_TARGET_ROOT`, `RUSTC`, and
13068 `RUSTDOC` take precedence over the `build.target-dir`,
13069 `build.rustc`, and `build.rustdoc` configuration values][1.8cfv].
13070* [The child process tree is killed on Windows when Cargo is
13071 killed][1.8ck].
13072* [The `build.target` configuration value sets the target platform,
13073 like `--target`][1.8ct].
13074
13075Compatibility Notes
13076-------------------
13077
13078* [Unstable compiler flags have been further restricted][1.8u]. Since
13079 1.0 `-Z` flags have been considered unstable, and other flags that
13080 were considered unstable additionally required passing `-Z
13081 unstable-options` to access. Unlike unstable language and library
13082 features though, these options have been accessible on the stable
13083 release channel. Going forward, *new unstable flags will not be
13084 available on the stable release channel*, and old unstable flags
13085 will warn about their usage. In the future, all unstable flags will
13086 be unavailable on the stable release channel.
13087* [It is no longer possible to `match` on empty enum variants using
13088 the `Variant(..)` syntax][1.8v]. This has been a warning since 1.6.
13089* The Unix-specific `MetadataExt` traits, including
13090 `os::unix::fs::MetadataExt`, which expose values such as inode
13091 numbers [no longer return platform-specific types][1.8r], but
13092 instead return widened integers. [RFC 1415].
13093* [Modules sourced from the filesystem cannot appear within arbitrary
13094 blocks, but only within other modules][1.8mf].
13095* [`--cfg` compiler flags are parsed strictly as identifiers][1.8c].
13096* On Unix, [stack overflow triggers a runtime abort instead of a
13097 SIGSEGV][1.8so].
13098* [`Command::spawn` and its equivalents return an error if any of
13099 its command-line arguments contain interior `NUL`s][1.8n].
13100* [Tuple and unit enum variants from other crates are in the type
13101 namespace][1.8tn].
13102* [On Windows `rustc` emits `.lib` files for the `staticlib` library
13103 type instead of `.a` files][1.8st]. Additionally, for the MSVC
13104 toolchain, `rustc` emits import libraries named `foo.dll.lib`
13105 instead of `foo.lib`.
13106
13107
13108[1.8a]: https://github.com/rust-lang/rust/pull/30962
13109[1.8b]: https://github.com/rust-lang/rust/pull/31123
13110[1.8c]: https://github.com/rust-lang/rust/pull/31530
13111[1.8cc]: https://github.com/rust-lang/cargo/pull/2397
13112[1.8ce]: https://github.com/rust-lang/cargo/pull/2398
13113[1.8cf]: https://github.com/rust-lang/rust/pull/31278
13114[1.8cfg]: https://github.com/rust-lang/cargo/pull/2328
13115[1.8ci]: https://github.com/rust-lang/cargo/pull/2081
13116[1.8ck]: https://github.com/rust-lang/cargo/pull/2370
13117[1.8ct]: https://github.com/rust-lang/cargo/pull/2335
13118[1.8cu]: https://github.com/rust-lang/rust/pull/31390
13119[1.8cfv]: https://github.com/rust-lang/cargo/issues/2365
13120[1.8cv]: https://github.com/rust-lang/rust/pull/30998
13121[1.8h]: https://github.com/rust-lang/rust/pull/31460
13122[1.8l]: https://github.com/rust-lang/rust/pull/31668
13123[1.8m]: https://github.com/rust-lang/rust/pull/31020
13124[1.8mf]: https://github.com/rust-lang/rust/pull/31534
13125[1.8mp]: https://github.com/rust-lang/rust/pull/30894
13126[1.8mr]: https://users.rust-lang.org/t/multirust-0-8-with-cross-std-installation/4901
13127[1.8ms]: https://github.com/rust-lang/rust/pull/30448
13128[1.8n]: https://github.com/rust-lang/rust/pull/31056
13129[1.8nx]: https://github.com/rust-lang/rust/pull/30859
13130[1.8r]: https://github.com/rust-lang/rust/pull/31551
13131[1.8so]: https://github.com/rust-lang/rust/pull/31333
13132[1.8st]: https://github.com/rust-lang/rust/pull/29520
13133[1.8t]: https://github.com/rust-lang/rust/pull/31358
13134[1.8tn]: https://github.com/rust-lang/rust/pull/30882
13135[1.8u]: https://github.com/rust-lang/rust/pull/31793
13136[1.8v]: https://github.com/rust-lang/rust/pull/31757
13137[1.8w]: https://github.com/rust-lang/rust/pull/31904
13138[RFC 1361]: https://github.com/rust-lang/rfcs/blob/master/text/1361-cargo-cfg-dependencies.md
13139[RFC 1415]: https://github.com/rust-lang/rfcs/blob/master/text/1415-trim-std-os.md
13140[RFC 218]: https://github.com/rust-lang/rfcs/blob/master/text/0218-empty-struct-with-braces.md
13141[RFC 953]: https://github.com/rust-lang/rfcs/blob/master/text/0953-op-assign.md
13142[`AddAssign`]: http://doc.rust-lang.org/nightly/std/ops/trait.AddAssign.html
13143[`BitAndAssign`]: http://doc.rust-lang.org/nightly/std/ops/trait.BitAndAssign.html
13144[`BitOrAssign`]: http://doc.rust-lang.org/nightly/std/ops/trait.BitOrAssign.html
13145[`BitXorAssign`]: http://doc.rust-lang.org/nightly/std/ops/trait.BitXorAssign.html
13146[`DivAssign`]: http://doc.rust-lang.org/nightly/std/ops/trait.DivAssign.html
13147[`Instant::duration_since`]: http://doc.rust-lang.org/nightly/std/time/struct.Instant.html#method.duration_since
13148[`Instant::elapsed`]: http://doc.rust-lang.org/nightly/std/time/struct.Instant.html#method.elapsed
13149[`Instant::now`]: http://doc.rust-lang.org/nightly/std/time/struct.Instant.html#method.now
13150[`MulAssign`]: http://doc.rust-lang.org/nightly/std/ops/trait.MulAssign.html
13151[`Ref::map`]: http://doc.rust-lang.org/nightly/std/cell/struct.Ref.html#method.map
13152[`RefMut::map`]: http://doc.rust-lang.org/nightly/std/cell/struct.RefMut.html#method.map
13153[`RemAssign`]: http://doc.rust-lang.org/nightly/std/ops/trait.RemAssign.html
13154[`ShlAssign`]: http://doc.rust-lang.org/nightly/std/ops/trait.ShlAssign.html
13155[`ShrAssign`]: http://doc.rust-lang.org/nightly/std/ops/trait.ShrAssign.html
13156[`SubAssign`]: http://doc.rust-lang.org/nightly/std/ops/trait.SubAssign.html
13157[`SystemTime::duration_since`]: http://doc.rust-lang.org/nightly/std/time/struct.SystemTime.html#method.duration_since
13158[`SystemTime::elapsed`]: http://doc.rust-lang.org/nightly/std/time/struct.SystemTime.html#method.elapsed
13159[`SystemTime::now`]: http://doc.rust-lang.org/nightly/std/time/struct.SystemTime.html#method.now
13160[`SystemTimeError::duration`]: http://doc.rust-lang.org/nightly/std/time/struct.SystemTimeError.html#method.duration
13161[`SystemTimeError`]: http://doc.rust-lang.org/nightly/std/time/struct.SystemTimeError.html
13162[`UNIX_EPOCH`]: http://doc.rust-lang.org/nightly/std/time/constant.UNIX_EPOCH.html
13163[`ptr::drop_in_place`]: http://doc.rust-lang.org/nightly/std/ptr/fn.drop_in_place.html
13164[`str::EncodeUtf16`]: http://doc.rust-lang.org/nightly/std/str/struct.EncodeUtf16.html
13165[`str::encode_utf16`]: http://doc.rust-lang.org/nightly/std/primitive.str.html#method.encode_utf16
13166[`time::Instant`]: http://doc.rust-lang.org/nightly/std/time/struct.Instant.html
13167[`time::SystemTime`]: http://doc.rust-lang.org/nightly/std/time/struct.SystemTime.html
13168
13169
13170Version 1.7.0 (2016-03-03)
13171==========================
13172
13173Libraries
13174---------
13175
13176* Stabilized APIs
13177 * `Path`
13178 * [`Path::strip_prefix`] (renamed from relative_from)
13179 * [`path::StripPrefixError`] (new error type returned from strip_prefix)
13180 * `Ipv4Addr`
13181 * [`Ipv4Addr::is_loopback`]
13182 * [`Ipv4Addr::is_private`]
13183 * [`Ipv4Addr::is_link_local`]
13184 * [`Ipv4Addr::is_multicast`]
13185 * [`Ipv4Addr::is_broadcast`]
13186 * [`Ipv4Addr::is_documentation`]
13187 * `Ipv6Addr`
13188 * [`Ipv6Addr::is_unspecified`]
13189 * [`Ipv6Addr::is_loopback`]
13190 * [`Ipv6Addr::is_multicast`]
13191 * `Vec`
13192 * [`Vec::as_slice`]
13193 * [`Vec::as_mut_slice`]
13194 * `String`
13195 * [`String::as_str`]
13196 * [`String::as_mut_str`]
13197 * Slices
13198 * `<[T]>::`[`clone_from_slice`], which now requires the two slices to
13199 be the same length
13200 * `<[T]>::`[`sort_by_key`]
13201 * checked, saturated, and overflowing operations
13202 * [`i32::checked_rem`], [`i32::checked_neg`], [`i32::checked_shl`], [`i32::checked_shr`]
13203 * [`i32::saturating_mul`]
13204 * [`i32::overflowing_add`], [`i32::overflowing_sub`], [`i32::overflowing_mul`], [`i32::overflowing_div`]
13205 * [`i32::overflowing_rem`], [`i32::overflowing_neg`], [`i32::overflowing_shl`], [`i32::overflowing_shr`]
13206 * [`u32::checked_rem`], [`u32::checked_neg`], [`u32::checked_shl`], [`u32::checked_shl`]
13207 * [`u32::saturating_mul`]
13208 * [`u32::overflowing_add`], [`u32::overflowing_sub`], [`u32::overflowing_mul`], [`u32::overflowing_div`]
13209 * [`u32::overflowing_rem`], [`u32::overflowing_neg`], [`u32::overflowing_shl`], [`u32::overflowing_shr`]
13210 * and checked, saturated, and overflowing operations for other primitive types
13211 * FFI
13212 * [`ffi::IntoStringError`]
13213 * [`CString::into_string`]
13214 * [`CString::into_bytes`]
13215 * [`CString::into_bytes_with_nul`]
13216 * `From<CString> for Vec<u8>`
13217 * `IntoStringError`
13218 * [`IntoStringError::into_cstring`]
13219 * [`IntoStringError::utf8_error`]
13220 * `Error for IntoStringError`
13221 * Hashing
13222 * [`std::hash::BuildHasher`]
13223 * [`BuildHasher::Hasher`]
13224 * [`BuildHasher::build_hasher`]
13225 * [`std::hash::BuildHasherDefault`]
13226 * [`HashMap::with_hasher`]
13227 * [`HashMap::with_capacity_and_hasher`]
13228 * [`HashSet::with_hasher`]
13229 * [`HashSet::with_capacity_and_hasher`]
13230 * [`std::collections::hash_map::RandomState`]
13231 * [`RandomState::new`]
13232* [Validating UTF-8 is faster by a factor of between 7 and 14x for
13233 ASCII input][1.7utf8]. This means that creating `String`s and `str`s
13234 from bytes is faster.
13235* [The performance of `LineWriter` (and thus `io::stdout`) was
13236 improved by using `memchr` to search for newlines][1.7m].
13237* [`f32::to_degrees` and `f32::to_radians` are stable][1.7f]. The
13238 `f64` variants were stabilized previously.
13239* [`BTreeMap` was rewritten to use less memory and improve the performance
13240 of insertion and iteration, the latter by as much as 5x][1.7bm].
13241* [`BTreeSet` and its iterators, `Iter`, `IntoIter`, and `Range` are
13242 covariant over their contained type][1.7bt].
13243* [`LinkedList` and its iterators, `Iter` and `IntoIter` are covariant
13244 over their contained type][1.7ll].
13245* [`str::replace` now accepts a `Pattern`][1.7rp], like other string
13246 searching methods.
13247* [`Any` is implemented for unsized types][1.7a].
13248* [`Hash` is implemented for `Duration`][1.7h].
13249
13250Misc
13251----
13252
13253* [When running tests with `--test`, rustdoc will pass `--cfg`
13254 arguments to the compiler][1.7dt].
13255* [The compiler is built with RPATH information by default][1.7rpa].
13256 This means that it will be possible to run `rustc` when installed in
13257 unusual configurations without configuring the dynamic linker search
13258 path explicitly.
13259* [`rustc` passes `--enable-new-dtags` to GNU ld][1.7dta]. This makes
13260 any RPATH entries (emitted with `-C rpath`) *not* take precedence
13261 over `LD_LIBRARY_PATH`.
13262
13263Cargo
13264-----
13265
13266* [`cargo rustc` accepts a `--profile` flag that runs `rustc` under
13267 any of the compilation profiles, 'dev', 'bench', or 'test'][1.7cp].
13268* [The `rerun-if-changed` build script directive no longer causes the
13269 build script to incorrectly run twice in certain scenarios][1.7rr].
13270
13271Compatibility Notes
13272-------------------
13273
13274* Soundness fixes to the interactions between associated types and
13275 lifetimes, specified in [RFC 1214], [now generate errors][1.7sf] for
13276 code that violates the new rules. This is a significant change that
13277 is known to break existing code, so it has emitted warnings for the
13278 new error cases since 1.4 to give crate authors time to adapt. The
13279 details of what is changing are subtle; read the RFC for more.
13280* [Several bugs in the compiler's visibility calculations were
13281 fixed][1.7v]. Since this was found to break significant amounts of
13282 code, the new errors will be emitted as warnings for several release
13283 cycles, under the `private_in_public` lint.
13284* Defaulted type parameters were accidentally accepted in positions
13285 that were not intended. In this release, [defaulted type parameters
13286 appearing outside of type definitions will generate a
13287 warning][1.7d], which will become an error in future releases.
13288* [Parsing "." as a float results in an error instead of 0][1.7p].
13289 That is, `".".parse::<f32>()` returns `Err`, not `Ok(0.0)`.
13290* [Borrows of closure parameters may not outlive the closure][1.7bc].
13291
13292[1.7a]: https://github.com/rust-lang/rust/pull/30928
13293[1.7bc]: https://github.com/rust-lang/rust/pull/30341
13294[1.7bm]: https://github.com/rust-lang/rust/pull/30426
13295[1.7bt]: https://github.com/rust-lang/rust/pull/30998
13296[1.7cp]: https://github.com/rust-lang/cargo/pull/2224
13297[1.7d]: https://github.com/rust-lang/rust/pull/30724
13298[1.7dt]: https://github.com/rust-lang/rust/pull/30372
13299[1.7dta]: https://github.com/rust-lang/rust/pull/30394
13300[1.7f]: https://github.com/rust-lang/rust/pull/30672
13301[1.7h]: https://github.com/rust-lang/rust/pull/30818
13302[1.7ll]: https://github.com/rust-lang/rust/pull/30663
13303[1.7m]: https://github.com/rust-lang/rust/pull/30381
13304[1.7p]: https://github.com/rust-lang/rust/pull/30681
13305[1.7rp]: https://github.com/rust-lang/rust/pull/29498
13306[1.7rpa]: https://github.com/rust-lang/rust/pull/30353
13307[1.7rr]: https://github.com/rust-lang/cargo/pull/2279
13308[1.7sf]: https://github.com/rust-lang/rust/pull/30389
13309[1.7utf8]: https://github.com/rust-lang/rust/pull/30740
13310[1.7v]: https://github.com/rust-lang/rust/pull/29973
13311[RFC 1214]: https://github.com/rust-lang/rfcs/blob/master/text/1214-projections-lifetimes-and-wf.md
13312[`BuildHasher::Hasher`]: http://doc.rust-lang.org/nightly/std/hash/trait.Hasher.html
13313[`BuildHasher::build_hasher`]: http://doc.rust-lang.org/nightly/std/hash/trait.BuildHasher.html#tymethod.build_hasher
13314[`CString::into_bytes_with_nul`]: http://doc.rust-lang.org/nightly/std/ffi/struct.CString.html#method.into_bytes_with_nul
13315[`CString::into_bytes`]: http://doc.rust-lang.org/nightly/std/ffi/struct.CString.html#method.into_bytes
13316[`CString::into_string`]: http://doc.rust-lang.org/nightly/std/ffi/struct.CString.html#method.into_string
13317[`HashMap::with_capacity_and_hasher`]: http://doc.rust-lang.org/nightly/std/collections/struct.HashMap.html#method.with_capacity_and_hasher
13318[`HashMap::with_hasher`]: http://doc.rust-lang.org/nightly/std/collections/struct.HashMap.html#method.with_hasher
13319[`HashSet::with_capacity_and_hasher`]: http://doc.rust-lang.org/nightly/std/collections/struct.HashSet.html#method.with_capacity_and_hasher
13320[`HashSet::with_hasher`]: http://doc.rust-lang.org/nightly/std/collections/struct.HashSet.html#method.with_hasher
13321[`IntoStringError::into_cstring`]: http://doc.rust-lang.org/nightly/std/ffi/struct.IntoStringError.html#method.into_cstring
13322[`IntoStringError::utf8_error`]: http://doc.rust-lang.org/nightly/std/ffi/struct.IntoStringError.html#method.utf8_error
13323[`Ipv4Addr::is_broadcast`]: http://doc.rust-lang.org/nightly/std/net/struct.Ipv4Addr.html#method.is_broadcast
13324[`Ipv4Addr::is_documentation`]: http://doc.rust-lang.org/nightly/std/net/struct.Ipv4Addr.html#method.is_documentation
13325[`Ipv4Addr::is_link_local`]: http://doc.rust-lang.org/nightly/std/net/struct.Ipv4Addr.html#method.is_link_local
13326[`Ipv4Addr::is_loopback`]: http://doc.rust-lang.org/nightly/std/net/struct.Ipv4Addr.html#method.is_loopback
13327[`Ipv4Addr::is_multicast`]: http://doc.rust-lang.org/nightly/std/net/struct.Ipv4Addr.html#method.is_multicast
13328[`Ipv4Addr::is_private`]: http://doc.rust-lang.org/nightly/std/net/struct.Ipv4Addr.html#method.is_private
13329[`Ipv6Addr::is_loopback`]: http://doc.rust-lang.org/nightly/std/net/struct.Ipv6Addr.html#method.is_loopback
13330[`Ipv6Addr::is_multicast`]: http://doc.rust-lang.org/nightly/std/net/struct.Ipv6Addr.html#method.is_multicast
13331[`Ipv6Addr::is_unspecified`]: http://doc.rust-lang.org/nightly/std/net/struct.Ipv6Addr.html#method.is_unspecified
13332[`Path::strip_prefix`]: http://doc.rust-lang.org/nightly/std/path/struct.Path.html#method.strip_prefix
13333[`RandomState::new`]: http://doc.rust-lang.org/nightly/std/collections/hash_map/struct.RandomState.html#method.new
13334[`String::as_mut_str`]: http://doc.rust-lang.org/nightly/std/string/struct.String.html#method.as_mut_str
13335[`String::as_str`]: http://doc.rust-lang.org/nightly/std/string/struct.String.html#method.as_str
13336[`Vec::as_mut_slice`]: http://doc.rust-lang.org/nightly/std/vec/struct.Vec.html#method.as_mut_slice
13337[`Vec::as_slice`]: http://doc.rust-lang.org/nightly/std/vec/struct.Vec.html#method.as_slice
13338[`clone_from_slice`]: http://doc.rust-lang.org/nightly/std/primitive.slice.html#method.clone_from_slice
13339[`ffi::IntoStringError`]: http://doc.rust-lang.org/nightly/std/ffi/struct.IntoStringError.html
13340[`i32::checked_neg`]: http://doc.rust-lang.org/nightly/std/primitive.i32.html#method.checked_neg
13341[`i32::checked_rem`]: http://doc.rust-lang.org/nightly/std/primitive.i32.html#method.checked_rem
13342[`i32::checked_shl`]: http://doc.rust-lang.org/nightly/std/primitive.i32.html#method.checked_shl
13343[`i32::checked_shr`]: http://doc.rust-lang.org/nightly/std/primitive.i32.html#method.checked_shr
13344[`i32::overflowing_add`]: http://doc.rust-lang.org/nightly/std/primitive.i32.html#method.overflowing_add
13345[`i32::overflowing_div`]: http://doc.rust-lang.org/nightly/std/primitive.i32.html#method.overflowing_div
13346[`i32::overflowing_mul`]: http://doc.rust-lang.org/nightly/std/primitive.i32.html#method.overflowing_mul
13347[`i32::overflowing_neg`]: http://doc.rust-lang.org/nightly/std/primitive.i32.html#method.overflowing_neg
13348[`i32::overflowing_rem`]: http://doc.rust-lang.org/nightly/std/primitive.i32.html#method.overflowing_rem
13349[`i32::overflowing_shl`]: http://doc.rust-lang.org/nightly/std/primitive.i32.html#method.overflowing_shl
13350[`i32::overflowing_shr`]: http://doc.rust-lang.org/nightly/std/primitive.i32.html#method.overflowing_shr
13351[`i32::overflowing_sub`]: http://doc.rust-lang.org/nightly/std/primitive.i32.html#method.overflowing_sub
13352[`i32::saturating_mul`]: http://doc.rust-lang.org/nightly/std/primitive.i32.html#method.saturating_mul
13353[`path::StripPrefixError`]: http://doc.rust-lang.org/nightly/std/path/struct.StripPrefixError.html
13354[`sort_by_key`]: http://doc.rust-lang.org/nightly/std/primitive.slice.html#method.sort_by_key
13355[`std::collections::hash_map::RandomState`]: http://doc.rust-lang.org/nightly/std/collections/hash_map/struct.RandomState.html
13356[`std::hash::BuildHasherDefault`]: http://doc.rust-lang.org/nightly/std/hash/struct.BuildHasherDefault.html
13357[`std::hash::BuildHasher`]: http://doc.rust-lang.org/nightly/std/hash/trait.BuildHasher.html
13358[`u32::checked_neg`]: http://doc.rust-lang.org/nightly/std/primitive.u32.html#method.checked_neg
13359[`u32::checked_rem`]: http://doc.rust-lang.org/nightly/std/primitive.u32.html#method.checked_rem
13360[`u32::checked_neg`]: http://doc.rust-lang.org/nightly/std/primitive.u32.html#method.checked_neg
13361[`u32::checked_shl`]: http://doc.rust-lang.org/nightly/std/primitive.u32.html#method.checked_shl
13362[`u32::overflowing_add`]: http://doc.rust-lang.org/nightly/std/primitive.u32.html#method.overflowing_add
13363[`u32::overflowing_div`]: http://doc.rust-lang.org/nightly/std/primitive.u32.html#method.overflowing_div
13364[`u32::overflowing_mul`]: http://doc.rust-lang.org/nightly/std/primitive.u32.html#method.overflowing_mul
13365[`u32::overflowing_neg`]: http://doc.rust-lang.org/nightly/std/primitive.u32.html#method.overflowing_neg
13366[`u32::overflowing_rem`]: http://doc.rust-lang.org/nightly/std/primitive.u32.html#method.overflowing_rem
13367[`u32::overflowing_shl`]: http://doc.rust-lang.org/nightly/std/primitive.u32.html#method.overflowing_shl
13368[`u32::overflowing_shr`]: http://doc.rust-lang.org/nightly/std/primitive.u32.html#method.overflowing_shr
13369[`u32::overflowing_sub`]: http://doc.rust-lang.org/nightly/std/primitive.u32.html#method.overflowing_sub
13370[`u32::saturating_mul`]: http://doc.rust-lang.org/nightly/std/primitive.u32.html#method.saturating_mul
13371
13372
13373Version 1.6.0 (2016-01-21)
13374==========================
13375
13376Language
13377--------
13378
13379* The `#![no_std]` attribute causes a crate to not be linked to the
13380 standard library, but only the [core library][1.6co], as described
13381 in [RFC 1184]. The core library defines common types and traits but
13382 has no platform dependencies whatsoever, and is the basis for Rust
13383 software in environments that cannot support a full port of the
13384 standard library, such as operating systems. Most of the core
13385 library is now stable.
13386
13387Libraries
13388---------
13389
13390* Stabilized APIs:
13391 [`Read::read_exact`],
13392 [`ErrorKind::UnexpectedEof`] (renamed from `UnexpectedEOF`),
13393 [`fs::DirBuilder`], [`fs::DirBuilder::new`],
13394 [`fs::DirBuilder::recursive`], [`fs::DirBuilder::create`],
13395 [`os::unix::fs::DirBuilderExt`],
13396 [`os::unix::fs::DirBuilderExt::mode`], [`vec::Drain`],
13397 [`vec::Vec::drain`], [`string::Drain`], [`string::String::drain`],
13398 [`vec_deque::Drain`], [`vec_deque::VecDeque::drain`],
13399 [`collections::hash_map::Drain`],
13400 [`collections::hash_map::HashMap::drain`],
13401 [`collections::hash_set::Drain`],
13402 [`collections::hash_set::HashSet::drain`],
13403 [`collections::binary_heap::Drain`],
13404 [`collections::binary_heap::BinaryHeap::drain`],
13405 [`Vec::extend_from_slice`] (renamed from `push_all`),
13406 [`Mutex::get_mut`], [`Mutex::into_inner`], [`RwLock::get_mut`],
13407 [`RwLock::into_inner`],
13408 [`Iterator::min_by_key`] (renamed from `min_by`),
13409 [`Iterator::max_by_key`] (renamed from `max_by`).
13410* The [core library][1.6co] is stable, as are most of its APIs.
13411* [The `assert_eq!` macro supports arguments that don't implement
13412 `Sized`][1.6ae], such as arrays. In this way it behaves more like
13413 `assert!`.
13414* Several timer functions that take duration in milliseconds [are
13415 deprecated in favor of those that take `Duration`][1.6ms]. These
13416 include `Condvar::wait_timeout_ms`, `thread::sleep_ms`, and
13417 `thread::park_timeout_ms`.
13418* The algorithm by which `Vec` reserves additional elements was
13419 [tweaked to not allocate excessive space][1.6a] while still growing
13420 exponentially.
13421* `From` conversions are [implemented from integers to floats][1.6f]
13422 in cases where the conversion is lossless. Thus they are not
13423 implemented for 32-bit ints to `f32`, nor for 64-bit ints to `f32`
13424 or `f64`. They are also not implemented for `isize` and `usize`
13425 because the implementations would be platform-specific. `From` is
13426 also implemented from `f32` to `f64`.
13427* `From<&Path>` and `From<PathBuf>` are implemented for `Cow<Path>`.
13428* `From<T>` is implemented for `Box<T>`, `Rc<T>` and `Arc<T>`.
13429* `IntoIterator` is implemented for `&PathBuf` and `&Path`.
13430* [`BinaryHeap` was refactored][1.6bh] for modest performance
13431 improvements.
13432* Sorting slices that are already sorted [is 50% faster in some
13433 cases][1.6s].
13434
13435Cargo
13436-----
13437
13438* Cargo will look in `$CARGO_HOME/bin` for subcommands [by default][1.6c].
13439* Cargo build scripts can specify their dependencies by emitting the
13440 [`rerun-if-changed`][1.6rr] key.
13441* crates.io will reject publication of crates with dependencies that
13442 have a wildcard version constraint. Crates with wildcard
13443 dependencies were seen to cause a variety of problems, as described
13444 in [RFC 1241]. Since 1.5 publication of such crates has emitted a
13445 warning.
13446* `cargo clean` [accepts a `--release` flag][1.6cc] to clean the
13447 release folder. A variety of artifacts that Cargo failed to clean
13448 are now correctly deleted.
13449
13450Misc
13451----
13452
13453* The `unreachable_code` lint [warns when a function call's argument
13454 diverges][1.6dv].
13455* The parser indicates [failures that may be caused by
13456 confusingly-similar Unicode characters][1.6uc]
13457* Certain macro errors [are reported at definition time][1.6m], not
13458 expansion.
13459
13460Compatibility Notes
13461-------------------
13462
13463* The compiler no longer makes use of the [`RUST_PATH`][1.6rp]
13464 environment variable when locating crates. This was a pre-cargo
13465 feature for integrating with the package manager that was
13466 accidentally never removed.
13467* [A number of bugs were fixed in the privacy checker][1.6p] that
13468 could cause previously-accepted code to break.
13469* [Modules and unit/tuple structs may not share the same name][1.6ts].
13470* [Bugs in pattern matching unit structs were fixed][1.6us]. The tuple
13471 struct pattern syntax (`Foo(..)`) can no longer be used to match
13472 unit structs. This is a warning now, but will become an error in
13473 future releases. Patterns that share the same name as a const are
13474 now an error.
13475* A bug was fixed that causes [rustc not to apply default type
13476 parameters][1.6xc] when resolving certain method implementations of
13477 traits defined in other crates.
13478
13479[1.6a]: https://github.com/rust-lang/rust/pull/29454
13480[1.6ae]: https://github.com/rust-lang/rust/pull/29770
13481[1.6bh]: https://github.com/rust-lang/rust/pull/29811
13482[1.6c]: https://github.com/rust-lang/cargo/pull/2192
13483[1.6cc]: https://github.com/rust-lang/cargo/pull/2131
13484[1.6co]: http://doc.rust-lang.org/core/index.html
13485[1.6dv]: https://github.com/rust-lang/rust/pull/30000
13486[1.6f]: https://github.com/rust-lang/rust/pull/29129
13487[1.6m]: https://github.com/rust-lang/rust/pull/29828
13488[1.6ms]: https://github.com/rust-lang/rust/pull/29604
13489[1.6p]: https://github.com/rust-lang/rust/pull/29726
13490[1.6rp]: https://github.com/rust-lang/rust/pull/30034
13491[1.6rr]: https://github.com/rust-lang/cargo/pull/2134
13492[1.6s]: https://github.com/rust-lang/rust/pull/29675
13493[1.6ts]: https://github.com/rust-lang/rust/issues/21546
13494[1.6uc]: https://github.com/rust-lang/rust/pull/29837
13495[1.6us]: https://github.com/rust-lang/rust/pull/29383
13496[1.6xc]: https://github.com/rust-lang/rust/issues/30123
13497[RFC 1184]: https://github.com/rust-lang/rfcs/blob/master/text/1184-stabilize-no_std.md
13498[RFC 1241]: https://github.com/rust-lang/rfcs/blob/master/text/1241-no-wildcard-deps.md
13499[`ErrorKind::UnexpectedEof`]: http://doc.rust-lang.org/nightly/std/io/enum.ErrorKind.html#variant.UnexpectedEof
13500[`Iterator::max_by_key`]: http://doc.rust-lang.org/nightly/std/iter/trait.Iterator.html#method.max_by_key
13501[`Iterator::min_by_key`]: http://doc.rust-lang.org/nightly/std/iter/trait.Iterator.html#method.min_by_key
13502[`Mutex::get_mut`]: http://doc.rust-lang.org/nightly/std/sync/struct.Mutex.html#method.get_mut
13503[`Mutex::into_inner`]: http://doc.rust-lang.org/nightly/std/sync/struct.Mutex.html#method.into_inner
13504[`Read::read_exact`]: http://doc.rust-lang.org/nightly/std/io/trait.Read.html#method.read_exact
13505[`RwLock::get_mut`]: http://doc.rust-lang.org/nightly/std/sync/struct.RwLock.html#method.get_mut
13506[`RwLock::into_inner`]: http://doc.rust-lang.org/nightly/std/sync/struct.RwLock.html#method.into_inner
13507[`Vec::extend_from_slice`]: http://doc.rust-lang.org/nightly/collections/vec/struct.Vec.html#method.extend_from_slice
13508[`collections::binary_heap::BinaryHeap::drain`]: http://doc.rust-lang.org/nightly/std/collections/binary_heap/struct.BinaryHeap.html#method.drain
13509[`collections::binary_heap::Drain`]: http://doc.rust-lang.org/nightly/std/collections/binary_heap/struct.Drain.html
13510[`collections::hash_map::Drain`]: http://doc.rust-lang.org/nightly/std/collections/hash_map/struct.Drain.html
13511[`collections::hash_map::HashMap::drain`]: http://doc.rust-lang.org/nightly/std/collections/hash_map/struct.HashMap.html#method.drain
13512[`collections::hash_set::Drain`]: http://doc.rust-lang.org/nightly/std/collections/hash_set/struct.Drain.html
13513[`collections::hash_set::HashSet::drain`]: http://doc.rust-lang.org/nightly/std/collections/hash_set/struct.HashSet.html#method.drain
13514[`fs::DirBuilder::create`]: http://doc.rust-lang.org/nightly/std/fs/struct.DirBuilder.html#method.create
13515[`fs::DirBuilder::new`]: http://doc.rust-lang.org/nightly/std/fs/struct.DirBuilder.html#method.new
13516[`fs::DirBuilder::recursive`]: http://doc.rust-lang.org/nightly/std/fs/struct.DirBuilder.html#method.recursive
13517[`fs::DirBuilder`]: http://doc.rust-lang.org/nightly/std/fs/struct.DirBuilder.html
13518[`os::unix::fs::DirBuilderExt::mode`]: http://doc.rust-lang.org/nightly/std/os/unix/fs/trait.DirBuilderExt.html#tymethod.mode
13519[`os::unix::fs::DirBuilderExt`]: http://doc.rust-lang.org/nightly/std/os/unix/fs/trait.DirBuilderExt.html
13520[`string::Drain`]: http://doc.rust-lang.org/nightly/std/string/struct.Drain.html
13521[`string::String::drain`]: http://doc.rust-lang.org/nightly/std/string/struct.String.html#method.drain
13522[`vec::Drain`]: http://doc.rust-lang.org/nightly/std/vec/struct.Drain.html
13523[`vec::Vec::drain`]: http://doc.rust-lang.org/nightly/std/vec/struct.Vec.html#method.drain
13524[`vec_deque::Drain`]: http://doc.rust-lang.org/nightly/std/collections/vec_deque/struct.Drain.html
13525[`vec_deque::VecDeque::drain`]: http://doc.rust-lang.org/nightly/std/collections/vec_deque/struct.VecDeque.html#method.drain
13526
13527
13528Version 1.5.0 (2015-12-10)
13529==========================
13530
13531* ~700 changes, numerous bugfixes
13532
13533Highlights
13534----------
13535
13536* Stabilized APIs:
13537 [`BinaryHeap::from`], [`BinaryHeap::into_sorted_vec`],
13538 [`BinaryHeap::into_vec`], [`Condvar::wait_timeout`],
13539 [`FileTypeExt::is_block_device`], [`FileTypeExt::is_char_device`],
13540 [`FileTypeExt::is_fifo`], [`FileTypeExt::is_socket`],
13541 [`FileTypeExt`], [`Formatter::alternate`], [`Formatter::fill`],
13542 [`Formatter::precision`], [`Formatter::sign_aware_zero_pad`],
13543 [`Formatter::sign_minus`], [`Formatter::sign_plus`],
13544 [`Formatter::width`], [`Iterator::cmp`], [`Iterator::eq`],
13545 [`Iterator::ge`], [`Iterator::gt`], [`Iterator::le`],
13546 [`Iterator::lt`], [`Iterator::ne`], [`Iterator::partial_cmp`],
13547 [`Path::canonicalize`], [`Path::exists`], [`Path::is_dir`],
13548 [`Path::is_file`], [`Path::metadata`], [`Path::read_dir`],
13549 [`Path::read_link`], [`Path::symlink_metadata`],
13550 [`Utf8Error::valid_up_to`], [`Vec::resize`],
13551 [`VecDeque::as_mut_slices`], [`VecDeque::as_slices`],
13552 [`VecDeque::insert`], [`VecDeque::shrink_to_fit`],
13553 [`VecDeque::swap_remove_back`], [`VecDeque::swap_remove_front`],
13554 [`slice::split_first_mut`], [`slice::split_first`],
13555 [`slice::split_last_mut`], [`slice::split_last`],
13556 [`char::from_u32_unchecked`], [`fs::canonicalize`],
13557 [`str::MatchIndices`], [`str::RMatchIndices`],
13558 [`str::match_indices`], [`str::rmatch_indices`],
13559 [`str::slice_mut_unchecked`], [`string::ParseError`].
13560* Rust applications hosted on crates.io can be installed locally to
13561 `~/.cargo/bin` with the [`cargo install`] command. Among other
13562 things this makes it easier to augment Cargo with new subcommands:
13563 when a binary named e.g. `cargo-foo` is found in `$PATH` it can be
13564 invoked as `cargo foo`.
13565* Crates with wildcard (`*`) dependencies will [emit warnings when
13566 published][1.5w]. In 1.6 it will no longer be possible to publish
13567 crates with wildcard dependencies.
13568
13569Breaking Changes
13570----------------
13571
13572* The rules determining when a particular lifetime must outlive
13573 a particular value (known as '[dropck]') have been [modified
13574 to not rely on parametricity][1.5p].
13575* [Implementations of `AsRef` and `AsMut` were added to `Box`, `Rc`,
13576 and `Arc`][1.5a]. Because these smart pointer types implement
13577 `Deref`, this causes breakage in cases where the interior type
13578 contains methods of the same name.
13579* [Correct a bug in Rc/Arc][1.5c] that caused [dropck] to be unaware
13580 that they could drop their content. Soundness fix.
13581* All method invocations are [properly checked][1.5wf1] for
13582 [well-formedness][1.5wf2]. Soundness fix.
13583* Traits whose supertraits contain `Self` are [not object
13584 safe][1.5o]. Soundness fix.
13585* Target specifications support a [`no_default_libraries`][1.5nd]
13586 setting that controls whether `-nodefaultlibs` is passed to the
13587 linker, and in turn the `is_like_windows` setting no longer affects
13588 the `-nodefaultlibs` flag.
13589* `#[derive(Show)]`, long-deprecated, [has been removed][1.5ds].
13590* The `#[inline]` and `#[repr]` attributes [can only appear
13591 in valid locations][1.5at].
13592* Native libraries linked from the local crate are [passed to
13593 the linker before native libraries from upstream crates][1.5nl].
13594* Two rarely-used attributes, `#[no_debug]` and
13595 `#[omit_gdb_pretty_printer_section]` [are feature gated][1.5fg].
13596* Negation of unsigned integers, which has been a warning for
13597 several releases, [is now behind a feature gate and will
13598 generate errors][1.5nu].
13599* The parser accidentally accepted visibility modifiers on
13600 enum variants, a bug [which has been fixed][1.5ev].
13601* [A bug was fixed that allowed `use` statements to import unstable
13602 features][1.5use].
13603
13604Language
13605--------
13606
13607* When evaluating expressions at compile-time that are not
13608 compile-time constants (const-evaluating expressions in non-const
13609 contexts), incorrect code such as overlong bitshifts and arithmetic
13610 overflow will [generate a warning instead of an error][1.5ce],
13611 delaying the error until runtime. This will allow the
13612 const-evaluator to be expanded in the future backwards-compatibly.
13613* The `improper_ctypes` lint [no longer warns about using `isize` and
13614 `usize` in FFI][1.5ict].
13615
13616Libraries
13617---------
13618
13619* `Arc<T>` and `Rc<T>` are [covariant with respect to `T` instead of
13620 invariant][1.5c].
13621* `Default` is [implemented for mutable slices][1.5d].
13622* `FromStr` is [implemented for `SockAddrV4` and `SockAddrV6`][1.5s].
13623* There are now `From` conversions [between floating point
13624 types][1.5f] where the conversions are lossless.
13625* There are now `From` conversions [between integer types][1.5i] where
13626 the conversions are lossless.
13627* [`fs::Metadata` implements `Clone`][1.5fs].
13628* The `parse` method [accepts a leading "+" when parsing
13629 integers][1.5pi].
13630* [`AsMut` is implemented for `Vec`][1.5am].
13631* The `clone_from` implementations for `String` and `BinaryHeap` [have
13632 been optimized][1.5cf] and no longer rely on the default impl.
13633* The `extern "Rust"`, `extern "C"`, `unsafe extern "Rust"` and
13634 `unsafe extern "C"` function types now [implement `Clone`,
13635 `PartialEq`, `Eq`, `PartialOrd`, `Ord`, `Hash`, `fmt::Pointer`, and
13636 `fmt::Debug` for up to 12 arguments][1.5fp].
13637* [Dropping `Vec`s is much faster in unoptimized builds when the
13638 element types don't implement `Drop`][1.5dv].
13639* A bug that caused in incorrect behavior when [combining `VecDeque`
13640 with zero-sized types][1.5vdz] was resolved.
13641* [`PartialOrd` for slices is faster][1.5po].
13642
13643Miscellaneous
13644-------------
13645
13646* [Crate metadata size was reduced by 20%][1.5md].
13647* [Improvements to code generation reduced the size of libcore by 3.3
13648 MB and rustc's memory usage by 18MB][1.5m].
13649* [Improvements to deref translation increased performance in
13650 unoptimized builds][1.5dr].
13651* Various errors in trait resolution [are deduplicated to only be
13652 reported once][1.5te].
13653* Rust has preliminary [support for rumprun kernels][1.5rr].
13654* Rust has preliminary [support for NetBSD on amd64][1.5na].
13655
13656[1.5use]: https://github.com/rust-lang/rust/pull/28364
13657[1.5po]: https://github.com/rust-lang/rust/pull/28436
13658[1.5ev]: https://github.com/rust-lang/rust/pull/28442
13659[1.5nu]: https://github.com/rust-lang/rust/pull/28468
13660[1.5dr]: https://github.com/rust-lang/rust/pull/28491
13661[1.5vdz]: https://github.com/rust-lang/rust/pull/28494
13662[1.5md]: https://github.com/rust-lang/rust/pull/28521
13663[1.5fg]: https://github.com/rust-lang/rust/pull/28522
13664[1.5dv]: https://github.com/rust-lang/rust/pull/28531
13665[1.5na]: https://github.com/rust-lang/rust/pull/28543
13666[1.5fp]: https://github.com/rust-lang/rust/pull/28560
13667[1.5rr]: https://github.com/rust-lang/rust/pull/28593
13668[1.5cf]: https://github.com/rust-lang/rust/pull/28602
13669[1.5nl]: https://github.com/rust-lang/rust/pull/28605
13670[1.5te]: https://github.com/rust-lang/rust/pull/28645
13671[1.5at]: https://github.com/rust-lang/rust/pull/28650
13672[1.5am]: https://github.com/rust-lang/rust/pull/28663
13673[1.5m]: https://github.com/rust-lang/rust/pull/28778
13674[1.5ict]: https://github.com/rust-lang/rust/pull/28779
13675[1.5a]: https://github.com/rust-lang/rust/pull/28811
13676[1.5pi]: https://github.com/rust-lang/rust/pull/28826
13677[1.5ce]: https://github.com/rust-lang/rfcs/blob/master/text/1229-compile-time-asserts.md
13678[1.5p]: https://github.com/rust-lang/rfcs/blob/master/text/1238-nonparametric-dropck.md
13679[1.5i]: https://github.com/rust-lang/rust/pull/28921
13680[1.5fs]: https://github.com/rust-lang/rust/pull/29021
13681[1.5f]: https://github.com/rust-lang/rust/pull/29129
13682[1.5ds]: https://github.com/rust-lang/rust/pull/29148
13683[1.5s]: https://github.com/rust-lang/rust/pull/29190
13684[1.5d]: https://github.com/rust-lang/rust/pull/29245
13685[1.5o]: https://github.com/rust-lang/rust/pull/29259
13686[1.5nd]: https://github.com/rust-lang/rust/pull/28578
13687[1.5wf2]: https://github.com/rust-lang/rfcs/blob/master/text/1214-projections-lifetimes-and-wf.md
13688[1.5wf1]: https://github.com/rust-lang/rust/pull/28669
13689[dropck]: https://doc.rust-lang.org/nightly/nomicon/dropck.html
13690[1.5c]: https://github.com/rust-lang/rust/pull/29110
13691[1.5w]: https://github.com/rust-lang/rfcs/blob/master/text/1241-no-wildcard-deps.md
13692[`cargo install`]: https://github.com/rust-lang/rfcs/blob/master/text/1200-cargo-install.md
13693[`BinaryHeap::from`]: http://doc.rust-lang.org/nightly/std/convert/trait.From.html#method.from
13694[`BinaryHeap::into_sorted_vec`]: http://doc.rust-lang.org/nightly/std/collections/struct.BinaryHeap.html#method.into_sorted_vec
13695[`BinaryHeap::into_vec`]: http://doc.rust-lang.org/nightly/std/collections/struct.BinaryHeap.html#method.into_vec
13696[`Condvar::wait_timeout`]: http://doc.rust-lang.org/nightly/std/sync/struct.Condvar.html#method.wait_timeout
13697[`FileTypeExt::is_block_device`]: http://doc.rust-lang.org/nightly/std/os/unix/fs/trait.FileTypeExt.html#tymethod.is_block_device
13698[`FileTypeExt::is_char_device`]: http://doc.rust-lang.org/nightly/std/os/unix/fs/trait.FileTypeExt.html#tymethod.is_char_device
13699[`FileTypeExt::is_fifo`]: http://doc.rust-lang.org/nightly/std/os/unix/fs/trait.FileTypeExt.html#tymethod.is_fifo
13700[`FileTypeExt::is_socket`]: http://doc.rust-lang.org/nightly/std/os/unix/fs/trait.FileTypeExt.html#tymethod.is_socket
13701[`FileTypeExt`]: http://doc.rust-lang.org/nightly/std/os/unix/fs/trait.FileTypeExt.html
13702[`Formatter::alternate`]: http://doc.rust-lang.org/nightly/core/fmt/struct.Formatter.html#method.alternate
13703[`Formatter::fill`]: http://doc.rust-lang.org/nightly/core/fmt/struct.Formatter.html#method.fill
13704[`Formatter::precision`]: http://doc.rust-lang.org/nightly/core/fmt/struct.Formatter.html#method.precision
13705[`Formatter::sign_aware_zero_pad`]: http://doc.rust-lang.org/nightly/core/fmt/struct.Formatter.html#method.sign_aware_zero_pad
13706[`Formatter::sign_minus`]: http://doc.rust-lang.org/nightly/core/fmt/struct.Formatter.html#method.sign_minus
13707[`Formatter::sign_plus`]: http://doc.rust-lang.org/nightly/core/fmt/struct.Formatter.html#method.sign_plus
13708[`Formatter::width`]: http://doc.rust-lang.org/nightly/core/fmt/struct.Formatter.html#method.width
13709[`Iterator::cmp`]: http://doc.rust-lang.org/nightly/core/iter/trait.Iterator.html#method.cmp
13710[`Iterator::eq`]: http://doc.rust-lang.org/nightly/core/iter/trait.Iterator.html#method.eq
13711[`Iterator::ge`]: http://doc.rust-lang.org/nightly/core/iter/trait.Iterator.html#method.ge
13712[`Iterator::gt`]: http://doc.rust-lang.org/nightly/core/iter/trait.Iterator.html#method.gt
13713[`Iterator::le`]: http://doc.rust-lang.org/nightly/core/iter/trait.Iterator.html#method.le
13714[`Iterator::lt`]: http://doc.rust-lang.org/nightly/core/iter/trait.Iterator.html#method.lt
13715[`Iterator::ne`]: http://doc.rust-lang.org/nightly/core/iter/trait.Iterator.html#method.ne
13716[`Iterator::partial_cmp`]: http://doc.rust-lang.org/nightly/core/iter/trait.Iterator.html#method.partial_cmp
13717[`Path::canonicalize`]: http://doc.rust-lang.org/nightly/std/path/struct.Path.html#method.canonicalize
13718[`Path::exists`]: http://doc.rust-lang.org/nightly/std/path/struct.Path.html#method.exists
13719[`Path::is_dir`]: http://doc.rust-lang.org/nightly/std/path/struct.Path.html#method.is_dir
13720[`Path::is_file`]: http://doc.rust-lang.org/nightly/std/path/struct.Path.html#method.is_file
13721[`Path::metadata`]: http://doc.rust-lang.org/nightly/std/path/struct.Path.html#method.metadata
13722[`Path::read_dir`]: http://doc.rust-lang.org/nightly/std/path/struct.Path.html#method.read_dir
13723[`Path::read_link`]: http://doc.rust-lang.org/nightly/std/path/struct.Path.html#method.read_link
13724[`Path::symlink_metadata`]: http://doc.rust-lang.org/nightly/std/path/struct.Path.html#method.symlink_metadata
13725[`Utf8Error::valid_up_to`]: http://doc.rust-lang.org/nightly/core/str/struct.Utf8Error.html#method.valid_up_to
13726[`Vec::resize`]: http://doc.rust-lang.org/nightly/std/vec/struct.Vec.html#method.resize
13727[`VecDeque::as_mut_slices`]: http://doc.rust-lang.org/nightly/std/collections/struct.VecDeque.html#method.as_mut_slices
13728[`VecDeque::as_slices`]: http://doc.rust-lang.org/nightly/std/collections/struct.VecDeque.html#method.as_slices
13729[`VecDeque::insert`]: http://doc.rust-lang.org/nightly/std/collections/struct.VecDeque.html#method.insert
13730[`VecDeque::shrink_to_fit`]: http://doc.rust-lang.org/nightly/std/collections/struct.VecDeque.html#method.shrink_to_fit
13731[`VecDeque::swap_remove_back`]: http://doc.rust-lang.org/nightly/std/collections/struct.VecDeque.html#method.swap_remove_back
13732[`VecDeque::swap_remove_front`]: http://doc.rust-lang.org/nightly/std/collections/struct.VecDeque.html#method.swap_remove_front
13733[`slice::split_first_mut`]: http://doc.rust-lang.org/nightly/std/primitive.slice.html#method.split_first_mut
13734[`slice::split_first`]: http://doc.rust-lang.org/nightly/std/primitive.slice.html#method.split_first
13735[`slice::split_last_mut`]: http://doc.rust-lang.org/nightly/std/primitive.slice.html#method.split_last_mut
13736[`slice::split_last`]: http://doc.rust-lang.org/nightly/std/primitive.slice.html#method.split_last
13737[`char::from_u32_unchecked`]: http://doc.rust-lang.org/nightly/std/char/fn.from_u32_unchecked.html
13738[`fs::canonicalize`]: http://doc.rust-lang.org/nightly/std/fs/fn.canonicalize.html
13739[`str::MatchIndices`]: http://doc.rust-lang.org/nightly/std/str/struct.MatchIndices.html
13740[`str::RMatchIndices`]: http://doc.rust-lang.org/nightly/std/str/struct.RMatchIndices.html
13741[`str::match_indices`]: http://doc.rust-lang.org/nightly/std/primitive.str.html#method.match_indices
13742[`str::rmatch_indices`]: http://doc.rust-lang.org/nightly/std/primitive.str.html#method.rmatch_indices
13743[`str::slice_mut_unchecked`]: http://doc.rust-lang.org/nightly/std/primitive.str.html#method.slice_mut_unchecked
13744[`string::ParseError`]: http://doc.rust-lang.org/nightly/std/string/enum.ParseError.html
13745
13746Version 1.4.0 (2015-10-29)
13747==========================
13748
13749* ~1200 changes, numerous bugfixes
13750
13751Highlights
13752----------
13753
13754* Windows builds targeting the 64-bit MSVC ABI and linker (instead of
13755 GNU) are now supported and recommended for use.
13756
13757Breaking Changes
13758----------------
13759
13760* [Several changes have been made to fix type soundness and improve
13761 the behavior of associated types][sound]. See [RFC 1214]. Although
13762 we have mostly introduced these changes as warnings this release, to
13763 become errors next release, there are still some scenarios that will
13764 see immediate breakage.
13765* [The `str::lines` and `BufRead::lines` iterators treat `\r\n` as
13766 line breaks in addition to `\n`][crlf].
13767* [Loans of `'static` lifetime extend to the end of a function][stat].
13768* [`str::parse` no longer introduces avoidable rounding error when
13769 parsing floating point numbers. Together with earlier changes to
13770 float formatting/output, "round trips" like f.to_string().parse()
13771 now preserve the value of f exactly. Additionally, leading plus
13772 signs are now accepted][fp3].
13773
13774
13775Language
13776--------
13777
13778* `use` statements that import multiple items [can now rename
13779 them][i], as in `use foo::{bar as kitten, baz as puppy}`.
13780* [Binops work correctly on fat pointers][binfat].
13781* `pub extern crate`, which does not behave as expected, [issues a
13782 warning][pec] until a better solution is found.
13783
13784Libraries
13785---------
13786
13787* [Many APIs were stabilized][stab]: `<Box<str>>::into_string`,
13788 [`Arc::downgrade`], [`Arc::get_mut`], [`Arc::make_mut`],
13789 [`Arc::try_unwrap`], [`Box::from_raw`], [`Box::into_raw`], [`CStr::to_str`],
13790 [`CStr::to_string_lossy`], [`CString::from_raw`], [`CString::into_raw`],
13791 [`IntoRawFd::into_raw_fd`], [`IntoRawFd`],
13792 `IntoRawHandle::into_raw_handle`, `IntoRawHandle`,
13793 `IntoRawSocket::into_raw_socket`, `IntoRawSocket`, [`Rc::downgrade`],
13794 [`Rc::get_mut`], [`Rc::make_mut`], [`Rc::try_unwrap`], [`Result::expect`],
13795 [`String::into_boxed_str`], [`TcpStream::read_timeout`],
13796 [`TcpStream::set_read_timeout`], [`TcpStream::set_write_timeout`],
13797 [`TcpStream::write_timeout`], [`UdpSocket::read_timeout`],
13798 [`UdpSocket::set_read_timeout`], [`UdpSocket::set_write_timeout`],
13799 [`UdpSocket::write_timeout`], `Vec::append`, `Vec::split_off`,
13800 [`VecDeque::append`], [`VecDeque::retain`], [`VecDeque::split_off`],
13801 [`rc::Weak::upgrade`], [`rc::Weak`], [`slice::Iter::as_slice`],
13802 [`slice::IterMut::into_slice`], [`str::CharIndices::as_str`],
13803 [`str::Chars::as_str`], [`str::split_at_mut`], [`str::split_at`],
13804 [`sync::Weak::upgrade`], [`sync::Weak`], [`thread::park_timeout`],
13805 [`thread::sleep`].
13806* [Some APIs were deprecated][dep]: `BTreeMap::with_b`,
13807 `BTreeSet::with_b`, `Option::as_mut_slice`, `Option::as_slice`,
13808 `Result::as_mut_slice`, `Result::as_slice`, `f32::from_str_radix`,
13809 `f64::from_str_radix`.
13810* [Reverse-searching strings is faster with the 'two-way'
13811 algorithm][s].
13812* [`std::io::copy` allows `?Sized` arguments][cc].
13813* The `Windows`, `Chunks`, and `ChunksMut` iterators over slices all
13814 [override `count`, `nth` and `last` with an *O*(1)
13815 implementation][it].
13816* [`Default` is implemented for arrays up to `[T; 32]`][d].
13817* [`IntoRawFd` has been added to the Unix-specific prelude,
13818 `IntoRawSocket` and `IntoRawHandle` to the Windows-specific
13819 prelude][pr].
13820* [`Extend<String>` and `FromIterator<String` are both implemented for
13821 `String`][es].
13822* [`IntoIterator` is implemented for references to `Option` and
13823 `Result`][into2].
13824* [`HashMap` and `HashSet` implement `Extend<&T>` where `T:
13825 Copy`][ext] as part of [RFC 839]. This will cause type inference
13826 breakage in rare situations.
13827* [`BinaryHeap` implements `Debug`][bh2].
13828* [`Borrow` and `BorrowMut` are implemented for fixed-size
13829 arrays][bm].
13830* [`extern fn`s with the "Rust" and "C" ABIs implement common
13831 traits including `Eq`, `Ord`, `Debug`, `Hash`][fp].
13832* [String comparison is faster][faststr].
13833* `&mut T` where `T: std::fmt::Write` [also implements
13834 `std::fmt::Write`][mutw].
13835* [A stable regression in `VecDeque::push_back` and other
13836 capacity-altering methods that caused panics for zero-sized types
13837 was fixed][vd].
13838* [Function pointers implement traits for up to 12 parameters][fp2].
13839
13840Miscellaneous
13841-------------
13842
13843* The compiler [no longer uses the 'morestack' feature to prevent
13844 stack overflow][mm]. Instead it uses guard pages and stack
13845 probes (though stack probes are not yet implemented on any platform
13846 but Windows).
13847* [The compiler matches traits faster when projections are involved][p].
13848* The 'improper_ctypes' lint [no longer warns about use of `isize` and
13849 `usize`][ffi].
13850* [Cargo now displays useful information about what its doing during
13851 `cargo update`][cu].
13852
13853[`Arc::downgrade`]: http://doc.rust-lang.org/nightly/alloc/arc/struct.Arc.html#method.downgrade
13854[`Arc::make_mut`]: http://doc.rust-lang.org/nightly/alloc/arc/struct.Arc.html#method.make_mut
13855[`Arc::get_mut`]: http://doc.rust-lang.org/nightly/alloc/arc/struct.Arc.html#method.get_mut
13856[`Arc::try_unwrap`]: http://doc.rust-lang.org/nightly/alloc/arc/struct.Arc.html#method.try_unwrap
13857[`Box::from_raw`]: http://doc.rust-lang.org/nightly/alloc/boxed/struct.Box.html#method.from_raw
13858[`Box::into_raw`]: http://doc.rust-lang.org/nightly/alloc/boxed/struct.Box.html#method.into_raw
13859[`CStr::to_str`]: http://doc.rust-lang.org/nightly/std/ffi/struct.CStr.html#method.to_str
13860[`CStr::to_string_lossy`]: http://doc.rust-lang.org/nightly/std/ffi/struct.CStr.html#method.to_string_lossy
13861[`CString::from_raw`]: http://doc.rust-lang.org/nightly/std/ffi/struct.CString.html#method.from_raw
13862[`CString::into_raw`]: http://doc.rust-lang.org/nightly/std/ffi/struct.CString.html#method.into_raw
13863[`IntoRawFd::into_raw_fd`]: http://doc.rust-lang.org/nightly/std/os/unix/io/trait.IntoRawFd.html#tymethod.into_raw_fd
13864[`IntoRawFd`]: http://doc.rust-lang.org/nightly/std/os/unix/io/trait.IntoRawFd.html
13865[`Rc::downgrade`]: http://doc.rust-lang.org/nightly/alloc/rc/struct.Rc.html#method.downgrade
13866[`Rc::get_mut`]: http://doc.rust-lang.org/nightly/alloc/rc/struct.Rc.html#method.get_mut
13867[`Rc::make_mut`]: http://doc.rust-lang.org/nightly/alloc/rc/struct.Rc.html#method.make_mut
13868[`Rc::try_unwrap`]: http://doc.rust-lang.org/nightly/alloc/rc/struct.Rc.html#method.try_unwrap
13869[`Result::expect`]: http://doc.rust-lang.org/nightly/core/result/enum.Result.html#method.expect
13870[`String::into_boxed_str`]: http://doc.rust-lang.org/nightly/collections/string/struct.String.html#method.into_boxed_str
13871[`TcpStream::read_timeout`]: http://doc.rust-lang.org/nightly/std/net/struct.TcpStream.html#method.read_timeout
13872[`TcpStream::set_read_timeout`]: http://doc.rust-lang.org/nightly/std/net/struct.TcpStream.html#method.set_read_timeout
13873[`TcpStream::write_timeout`]: http://doc.rust-lang.org/nightly/std/net/struct.TcpStream.html#method.write_timeout
13874[`TcpStream::set_write_timeout`]: http://doc.rust-lang.org/nightly/std/net/struct.TcpStream.html#method.set_write_timeout
13875[`UdpSocket::read_timeout`]: http://doc.rust-lang.org/nightly/std/net/struct.TcpStream.html#method.read_timeout
13876[`UdpSocket::set_read_timeout`]: http://doc.rust-lang.org/nightly/std/net/struct.TcpStream.html#method.set_read_timeout
13877[`UdpSocket::write_timeout`]: http://doc.rust-lang.org/nightly/std/net/struct.TcpStream.html#method.write_timeout
13878[`UdpSocket::set_write_timeout`]: http://doc.rust-lang.org/nightly/std/net/struct.TcpStream.html#method.set_write_timeout
13879[`VecDeque::append`]: http://doc.rust-lang.org/nightly/std/collections/struct.VecDeque.html#method.append
13880[`VecDeque::retain`]: http://doc.rust-lang.org/nightly/std/collections/struct.VecDeque.html#method.retain
13881[`VecDeque::split_off`]: http://doc.rust-lang.org/nightly/std/collections/struct.VecDeque.html#method.split_off
13882[`rc::Weak::upgrade`]: http://doc.rust-lang.org/nightly/std/rc/struct.Weak.html#method.upgrade
13883[`rc::Weak`]: http://doc.rust-lang.org/nightly/std/rc/struct.Weak.html
13884[`slice::Iter::as_slice`]: http://doc.rust-lang.org/nightly/std/slice/struct.Iter.html#method.as_slice
13885[`slice::IterMut::into_slice`]: http://doc.rust-lang.org/nightly/std/slice/struct.IterMut.html#method.into_slice
13886[`str::CharIndices::as_str`]: http://doc.rust-lang.org/nightly/std/str/struct.CharIndices.html#method.as_str
13887[`str::Chars::as_str`]: http://doc.rust-lang.org/nightly/std/str/struct.Chars.html#method.as_str
13888[`str::split_at_mut`]: http://doc.rust-lang.org/nightly/std/primitive.str.html#method.split_at_mut
13889[`str::split_at`]: http://doc.rust-lang.org/nightly/std/primitive.str.html#method.split_at
13890[`sync::Weak::upgrade`]: http://doc.rust-lang.org/nightly/std/sync/struct.Weak.html#method.upgrade
13891[`sync::Weak`]: http://doc.rust-lang.org/nightly/std/sync/struct.Weak.html
13892[`thread::park_timeout`]: http://doc.rust-lang.org/nightly/std/thread/fn.park_timeout.html
13893[`thread::sleep`]: http://doc.rust-lang.org/nightly/std/thread/fn.sleep.html
13894[bh2]: https://github.com/rust-lang/rust/pull/28156
13895[binfat]: https://github.com/rust-lang/rust/pull/28270
13896[bm]: https://github.com/rust-lang/rust/pull/28197
13897[cc]: https://github.com/rust-lang/rust/pull/27531
13898[crlf]: https://github.com/rust-lang/rust/pull/28034
13899[cu]: https://github.com/rust-lang/cargo/pull/1931
13900[d]: https://github.com/rust-lang/rust/pull/27825
13901[dep]: https://github.com/rust-lang/rust/pull/28339
13902[es]: https://github.com/rust-lang/rust/pull/27956
13903[ext]: https://github.com/rust-lang/rust/pull/28094
13904[faststr]: https://github.com/rust-lang/rust/pull/28338
13905[ffi]: https://github.com/rust-lang/rust/pull/28779
13906[fp]: https://github.com/rust-lang/rust/pull/28268
13907[fp2]: https://github.com/rust-lang/rust/pull/28560
13908[fp3]: https://github.com/rust-lang/rust/pull/27307
13909[i]: https://github.com/rust-lang/rust/pull/27451
13910[into2]: https://github.com/rust-lang/rust/pull/28039
13911[it]: https://github.com/rust-lang/rust/pull/27652
13912[mm]: https://github.com/rust-lang/rust/pull/27338
13913[mutw]: https://github.com/rust-lang/rust/pull/28368
13914[sound]: https://github.com/rust-lang/rust/pull/27641
13915[p]: https://github.com/rust-lang/rust/pull/27866
13916[pec]: https://github.com/rust-lang/rust/pull/28486
13917[pr]: https://github.com/rust-lang/rust/pull/27896
13918[RFC 839]: https://github.com/rust-lang/rfcs/blob/master/text/0839-embrace-extend-extinguish.md
13919[RFC 1214]: https://github.com/rust-lang/rfcs/blob/master/text/1214-projections-lifetimes-and-wf.md
13920[s]: https://github.com/rust-lang/rust/pull/27474
13921[stab]: https://github.com/rust-lang/rust/pull/28339
13922[stat]: https://github.com/rust-lang/rust/pull/28321
13923[vd]: https://github.com/rust-lang/rust/pull/28494
13924
13925Version 1.3.0 (2015-09-17)
13926==============================
13927
13928* ~900 changes, numerous bugfixes
13929
13930Highlights
13931----------
13932
13933* The [new object lifetime defaults][nold] have been [turned
13934 on][nold2] after a cycle of warnings about the change. Now types
13935 like `&'a Box<Trait>` (or `&'a Rc<Trait>`, etc) will change from
13936 being interpreted as `&'a Box<Trait+'a>` to `&'a
13937 Box<Trait+'static>`.
13938* [The Rustonomicon][nom] is a new book in the official documentation
13939 that dives into writing unsafe Rust.
13940* The [`Duration`] API, [has been stabilized][ds]. This basic unit of
13941 timekeeping is employed by other std APIs, as well as out-of-tree
13942 time crates.
13943
13944Breaking Changes
13945----------------
13946
13947* The [new object lifetime defaults][nold] have been [turned
13948 on][nold2] after a cycle of warnings about the change.
13949* There is a known [regression][lr] in how object lifetime elision is
13950 interpreted, the proper solution for which is undetermined.
13951* The `#[prelude_import]` attribute, an internal implementation
13952 detail, was accidentally stabilized previously. [It has been put
13953 behind the `prelude_import` feature gate][pi]. This change is
13954 believed to break no existing code.
13955* The behavior of [`size_of_val`][dst1] and [`align_of_val`][dst2] is
13956 [more sane for dynamically sized types][dst3]. Code that relied on
13957 the previous behavior is thought to be broken.
13958* The `dropck` rules, which checks that destructors can't access
13959 destroyed values, [have been updated][dropck] to match the
13960 [RFC][dropckrfc]. This fixes some soundness holes, and as such will
13961 cause some previously-compiling code to no longer build.
13962
13963Language
13964--------
13965
13966* The [new object lifetime defaults][nold] have been [turned
13967 on][nold2] after a cycle of warnings about the change.
13968* Semicolons may [now follow types and paths in
13969 macros](https://github.com/rust-lang/rust/pull/27000).
13970* The behavior of [`size_of_val`][dst1] and [`align_of_val`][dst2] is
13971 [more sane for dynamically sized types][dst3]. Code that relied on
13972 the previous behavior is not known to exist, and suspected to be
13973 broken.
13974* `'static` variables [may now be recursive][st].
13975* `ref` bindings choose between [`Deref`] and [`DerefMut`]
13976 implementations correctly.
13977* The `dropck` rules, which checks that destructors can't access
13978 destroyed values, [have been updated][dropck] to match the
13979 [RFC][dropckrfc].
13980
13981Libraries
13982---------
13983
13984* The [`Duration`] API, [has been stabilized][ds], as well as the
13985 `std::time` module, which presently contains only `Duration`.
13986* `Box<str>` and `Box<[T]>` both implement `Clone`.
13987* The owned C string, [`CString`], implements [`Borrow`] and the
13988 borrowed C string, [`CStr`], implements [`ToOwned`]. The two of
13989 these allow C strings to be borrowed and cloned in generic code.
13990* [`CStr`] implements [`Debug`].
13991* [`AtomicPtr`] implements [`Debug`].
13992* [`Error`] trait objects [can be downcast to their concrete types][e]
13993 in many common configurations, using the [`is`], [`downcast`],
13994 [`downcast_ref`] and [`downcast_mut`] methods, similarly to the
13995 [`Any`] trait.
13996* Searching for substrings now [employs the two-way algorithm][search]
13997 instead of doing a naive search. This gives major speedups to a
13998 number of methods, including [`contains`][sc], [`find`][sf],
13999 [`rfind`][srf], [`split`][ss]. [`starts_with`][ssw] and
14000 [`ends_with`][sew] are also faster.
14001* The performance of `PartialEq` for slices is [much faster][ps].
14002* The [`Hash`] trait offers the default method, [`hash_slice`], which
14003 is overridden and optimized by the implementations for scalars.
14004* The [`Hasher`] trait now has a number of specialized `write_*`
14005 methods for primitive types, for efficiency.
14006* The I/O-specific error type, [`std::io::Error`][ie], gained a set of
14007 methods for accessing the 'inner error', if any: [`get_ref`][iegr],
14008 [`get_mut`][iegm], [`into_inner`][ieii]. As well, the implementation
14009 of [`std::error::Error::cause`][iec] also delegates to the inner
14010 error.
14011* [`process::Child`][pc] gained the [`id`] method, which returns a
14012 `u32` representing the platform-specific process identifier.
14013* The [`connect`] method on slices is deprecated, replaced by the new
14014 [`join`] method (note that both of these are on the *unstable*
14015 [`SliceConcatExt`] trait, but through the magic of the prelude are
14016 available to stable code anyway).
14017* The [`Div`] operator is implemented for [`Wrapping`] types.
14018* [`DerefMut` is implemented for `String`][dms].
14019* Performance of SipHash (the default hasher for `HashMap`) is
14020 [better for long data][sh].
14021* [`AtomicPtr`] implements [`Send`].
14022* The [`read_to_end`] implementations for [`Stdin`] and [`File`]
14023 are now [specialized to use uninitialized buffers for increased
14024 performance][rte].
14025* Lifetime parameters of foreign functions [are now resolved
14026 properly][f].
14027
14028Misc
14029----
14030
14031* Rust can now, with some coercion, [produce programs that run on
14032 Windows XP][xp], though XP is not considered a supported platform.
14033* Porting Rust on Windows from the GNU toolchain to MSVC continues
14034 ([1][win1], [2][win2], [3][win3], [4][win4]). It is still not
14035 recommended for use in 1.3, though should be fully-functional
14036 in the [64-bit 1.4 beta][b14].
14037* On Fedora-based systems installation will [properly configure the
14038 dynamic linker][fl].
14039* The compiler gained many new extended error descriptions, which can
14040 be accessed with the `--explain` flag.
14041* The `dropck` pass, which checks that destructors can't access
14042 destroyed values, [has been rewritten][27261]. This fixes some
14043 soundness holes, and as such will cause some previously-compiling
14044 code to no longer build.
14045* `rustc` now uses [LLVM to write archive files where possible][ar].
14046 Eventually this will eliminate the compiler's dependency on the ar
14047 utility.
14048* Rust has [preliminary support for i686 FreeBSD][26959] (it has long
14049 supported FreeBSD on x86_64).
14050* The [`unused_mut`][lum], [`unconditional_recursion`][lur],
14051 [`improper_ctypes`][lic], and [`negate_unsigned`][lnu] lints are
14052 more strict.
14053* If landing pads are disabled (with `-Z no-landing-pads`), [`panic!`
14054 will kill the process instead of leaking][nlp].
14055
14056[`Any`]: http://doc.rust-lang.org/nightly/std/any/trait.Any.html
14057[`AtomicPtr`]: http://doc.rust-lang.org/nightly/std/sync/atomic/struct.AtomicPtr.html
14058[`Borrow`]: http://doc.rust-lang.org/nightly/std/borrow/trait.Borrow.html
14059[`CStr`]: http://doc.rust-lang.org/nightly/std/ffi/struct.CStr.html
14060[`CString`]: http://doc.rust-lang.org/nightly/std/ffi/struct.CString.html
14061[`Debug`]: http://doc.rust-lang.org/nightly/std/fmt/trait.Debug.html
14062[`DerefMut`]: http://doc.rust-lang.org/nightly/std/ops/trait.DerefMut.html
14063[`Deref`]: http://doc.rust-lang.org/nightly/std/ops/trait.Deref.html
14064[`Div`]: http://doc.rust-lang.org/nightly/std/ops/trait.Div.html
14065[`Duration`]: http://doc.rust-lang.org/nightly/std/time/struct.Duration.html
14066[`Error`]: http://doc.rust-lang.org/nightly/std/error/trait.Error.html
14067[`File`]: http://doc.rust-lang.org/nightly/std/fs/struct.File.html
14068[`Hash`]: http://doc.rust-lang.org/nightly/std/hash/trait.Hash.html
14069[`Hasher`]: http://doc.rust-lang.org/nightly/std/hash/trait.Hasher.html
14070[`Send`]: http://doc.rust-lang.org/nightly/std/marker/trait.Send.html
14071[`SliceConcatExt`]: http://doc.rust-lang.org/nightly/std/slice/trait.SliceConcatExt.html
14072[`Stdin`]: http://doc.rust-lang.org/nightly/std/io/struct.Stdin.html
14073[`ToOwned`]: http://doc.rust-lang.org/nightly/std/borrow/trait.ToOwned.html
14074[`Wrapping`]: http://doc.rust-lang.org/nightly/std/num/struct.Wrapping.html
14075[`connect`]: http://doc.rust-lang.org/nightly/std/slice/trait.SliceConcatExt.html#method.connect
14076[`downcast_mut`]: http://doc.rust-lang.org/nightly/std/error/trait.Error.html#method.downcast_mut
14077[`downcast_ref`]: http://doc.rust-lang.org/nightly/std/error/trait.Error.html#method.downcast_ref
14078[`downcast`]: http://doc.rust-lang.org/nightly/std/error/trait.Error.html#method.downcast
14079[`hash_slice`]: http://doc.rust-lang.org/nightly/std/hash/trait.Hash.html#method.hash_slice
14080[`id`]: http://doc.rust-lang.org/nightly/std/process/struct.Child.html#method.id
14081[`is`]: http://doc.rust-lang.org/nightly/std/error/trait.Error.html#method.is
14082[`join`]: http://doc.rust-lang.org/nightly/std/slice/trait.SliceConcatExt.html#method.join
14083[`read_to_end`]: http://doc.rust-lang.org/nightly/std/io/trait.Read.html#method.read_to_end
14084[ar]: https://github.com/rust-lang/rust/pull/26926
14085[b14]: https://static.rust-lang.org/dist/rust-beta-x86_64-pc-windows-msvc.msi
14086[dms]: https://github.com/rust-lang/rust/pull/26241
14087[27261]: https://github.com/rust-lang/rust/pull/27261
14088[dropckrfc]: https://github.com/rust-lang/rfcs/blob/master/text/0769-sound-generic-drop.md
14089[ds]: https://github.com/rust-lang/rust/pull/26818
14090[dst1]: http://doc.rust-lang.org/nightly/std/mem/fn.size_of_val.html
14091[dst2]: http://doc.rust-lang.org/nightly/std/mem/fn.align_of_val.html
14092[dst3]: https://github.com/rust-lang/rust/pull/27351
14093[e]: https://github.com/rust-lang/rust/pull/24793
14094[f]: https://github.com/rust-lang/rust/pull/26588
14095[26959]: https://github.com/rust-lang/rust/pull/26959
14096[fl]: https://github.com/rust-lang/rust-installer/pull/41
14097[ie]: http://doc.rust-lang.org/nightly/std/io/struct.Error.html
14098[iec]: http://doc.rust-lang.org/nightly/std/io/struct.Error.html#method.cause
14099[iegm]: http://doc.rust-lang.org/nightly/std/io/struct.Error.html#method.get_mut
14100[iegr]: http://doc.rust-lang.org/nightly/std/io/struct.Error.html#method.get_ref
14101[ieii]: http://doc.rust-lang.org/nightly/std/io/struct.Error.html#method.into_inner
14102[lic]: https://github.com/rust-lang/rust/pull/26583
14103[lnu]: https://github.com/rust-lang/rust/pull/27026
14104[lr]: https://github.com/rust-lang/rust/issues/27248
14105[lum]: https://github.com/rust-lang/rust/pull/26378
14106[lur]: https://github.com/rust-lang/rust/pull/26783
14107[nlp]: https://github.com/rust-lang/rust/pull/27176
14108[nold2]: https://github.com/rust-lang/rust/pull/27045
14109[nold]: https://github.com/rust-lang/rfcs/blob/master/text/1156-adjust-default-object-bounds.md
14110[nom]: http://doc.rust-lang.org/nightly/nomicon/
14111[pc]: http://doc.rust-lang.org/nightly/std/process/struct.Child.html
14112[pi]: https://github.com/rust-lang/rust/pull/26699
14113[ps]: https://github.com/rust-lang/rust/pull/26884
14114[rte]: https://github.com/rust-lang/rust/pull/26950
14115[sc]: http://doc.rust-lang.org/nightly/std/primitive.str.html#method.contains
14116[search]: https://github.com/rust-lang/rust/pull/26327
14117[sew]: http://doc.rust-lang.org/nightly/std/primitive.str.html#method.ends_with
14118[sf]: http://doc.rust-lang.org/nightly/std/primitive.str.html#method.find
14119[sh]: https://github.com/rust-lang/rust/pull/27280
14120[srf]: http://doc.rust-lang.org/nightly/std/primitive.str.html#method.rfind
14121[ss]: http://doc.rust-lang.org/nightly/std/primitive.str.html#method.split
14122[ssw]: http://doc.rust-lang.org/nightly/std/primitive.str.html#method.starts_with
14123[st]: https://github.com/rust-lang/rust/pull/26630
14124[win1]: https://github.com/rust-lang/rust/pull/26569
14125[win2]: https://github.com/rust-lang/rust/pull/26741
14126[win3]: https://github.com/rust-lang/rust/pull/26741
14127[win4]: https://github.com/rust-lang/rust/pull/27210
14128[xp]: https://github.com/rust-lang/rust/pull/26569
14129
14130Version 1.2.0 (2015-08-07)
14131==========================
14132
14133* ~1200 changes, numerous bugfixes
14134
14135Highlights
14136----------
14137
14138* [Dynamically-sized-type coercions][dst] allow smart pointer types
14139 like `Rc` to contain types without a fixed size, arrays and trait
14140 objects, finally enabling use of `Rc<[T]>` and completing the
14141 implementation of DST.
14142* [Parallel codegen][parcodegen] is now working again, which can
14143 substantially speed up large builds in debug mode; It also gets
14144 another ~33% speedup when bootstrapping on a 4 core machine (using 8
14145 jobs). It's not enabled by default, but will be "in the near
14146 future". It can be activated with the `-C codegen-units=N` flag to
14147 `rustc`.
14148* This is the first release with [experimental support for linking
14149 with the MSVC linker and lib C on Windows (instead of using the GNU
14150 variants via MinGW)][win]. It is yet recommended only for the most
14151 intrepid Rustaceans.
14152* Benchmark compilations are showing a 30% improvement in
14153 bootstrapping over 1.1.
14154
14155Breaking Changes
14156----------------
14157
14158* The [`to_uppercase`] and [`to_lowercase`] methods on `char` now do
14159 unicode case mapping, which is a previously-planned change in
14160 behavior and considered a bugfix.
14161* [`mem::align_of`] now specifies [the *minimum alignment* for
14162 T][align], which is usually the alignment programs are interested
14163 in, and the same value reported by clang's
14164 `alignof`. [`mem::min_align_of`] is deprecated. This is not known to
14165 break real code.
14166* [The `#[packed]` attribute is no longer silently accepted by the
14167 compiler][packed]. This attribute did nothing and code that
14168 mentioned it likely did not work as intended.
14169* Associated type defaults are [now behind the
14170 `associated_type_defaults` feature gate][ad]. In 1.1 associated type
14171 defaults *did not work*, but could be mentioned syntactically. As
14172 such this breakage has minimal impact.
14173
14174Language
14175--------
14176
14177* Patterns with `ref mut` now correctly invoke [`DerefMut`] when
14178 matching against dereferenceable values.
14179
14180Libraries
14181---------
14182
14183* The [`Extend`] trait, which grows a collection from an iterator, is
14184 implemented over iterators of references, for `String`, `Vec`,
14185 `LinkedList`, `VecDeque`, `EnumSet`, `BinaryHeap`, `VecMap`,
14186 `BTreeSet` and `BTreeMap`. [RFC][extend-rfc].
14187* The [`iter::once`] function returns an iterator that yields a single
14188 element, and [`iter::empty`] returns an iterator that yields no
14189 elements.
14190* The [`matches`] and [`rmatches`] methods on `str` return iterators
14191 over substring matches.
14192* [`Cell`] and [`RefCell`] both implement `Eq`.
14193* A number of methods for wrapping arithmetic are added to the
14194 integral types, [`wrapping_div`], [`wrapping_rem`],
14195 [`wrapping_neg`], [`wrapping_shl`], [`wrapping_shr`]. These are in
14196 addition to the existing [`wrapping_add`], [`wrapping_sub`], and
14197 [`wrapping_mul`] methods, and alternatives to the [`Wrapping`]
14198 type.. It is illegal for the default arithmetic operations in Rust
14199 to overflow; the desire to wrap must be explicit.
14200* The `{:#?}` formatting specifier [displays the alternate,
14201 pretty-printed][debugfmt] form of the `Debug` formatter. This
14202 feature was actually introduced prior to 1.0 with little
14203 fanfare.
14204* [`fmt::Formatter`] implements [`fmt::Write`], a `fmt`-specific trait
14205 for writing data to formatted strings, similar to [`io::Write`].
14206* [`fmt::Formatter`] adds 'debug builder' methods, [`debug_struct`],
14207 [`debug_tuple`], [`debug_list`], [`debug_set`], [`debug_map`]. These
14208 are used by code generators to emit implementations of [`Debug`].
14209* `str` has new [`to_uppercase`][strup] and [`to_lowercase`][strlow]
14210 methods that convert case, following Unicode case mapping.
14211* It is now easier to handle poisoned locks. The [`PoisonError`]
14212 type, returned by failing lock operations, exposes `into_inner`,
14213 `get_ref`, and `get_mut`, which all give access to the inner lock
14214 guard, and allow the poisoned lock to continue to operate. The
14215 `is_poisoned` method of [`RwLock`] and [`Mutex`] can poll for a
14216 poisoned lock without attempting to take the lock.
14217* On Unix the [`FromRawFd`] trait is implemented for [`Stdio`], and
14218 [`AsRawFd`] for [`ChildStdin`], [`ChildStdout`], [`ChildStderr`].
14219 On Windows the `FromRawHandle` trait is implemented for `Stdio`,
14220 and `AsRawHandle` for `ChildStdin`, `ChildStdout`,
14221 `ChildStderr`.
14222* [`io::ErrorKind`] has a new variant, `InvalidData`, which indicates
14223 malformed input.
14224
14225Misc
14226----
14227
14228* `rustc` employs smarter heuristics for guessing at [typos].
14229* `rustc` emits more efficient code for [no-op conversions between
14230 unsafe pointers][nop].
14231* Fat pointers are now [passed in pairs of immediate arguments][fat],
14232 resulting in faster compile times and smaller code.
14233
14234[`Extend`]: https://doc.rust-lang.org/nightly/std/iter/trait.Extend.html
14235[extend-rfc]: https://github.com/rust-lang/rfcs/blob/master/text/0839-embrace-extend-extinguish.md
14236[`iter::once`]: https://doc.rust-lang.org/nightly/std/iter/fn.once.html
14237[`iter::empty`]: https://doc.rust-lang.org/nightly/std/iter/fn.empty.html
14238[`matches`]: https://doc.rust-lang.org/nightly/std/primitive.str.html#method.matches
14239[`rmatches`]: https://doc.rust-lang.org/nightly/std/primitive.str.html#method.rmatches
14240[`Cell`]: https://doc.rust-lang.org/nightly/std/cell/struct.Cell.html
14241[`RefCell`]: https://doc.rust-lang.org/nightly/std/cell/struct.RefCell.html
14242[`wrapping_add`]: https://doc.rust-lang.org/nightly/std/primitive.i8.html#method.wrapping_add
14243[`wrapping_sub`]: https://doc.rust-lang.org/nightly/std/primitive.i8.html#method.wrapping_sub
14244[`wrapping_mul`]: https://doc.rust-lang.org/nightly/std/primitive.i8.html#method.wrapping_mul
14245[`wrapping_div`]: https://doc.rust-lang.org/nightly/std/primitive.i8.html#method.wrapping_div
14246[`wrapping_rem`]: https://doc.rust-lang.org/nightly/std/primitive.i8.html#method.wrapping_rem
14247[`wrapping_neg`]: https://doc.rust-lang.org/nightly/std/primitive.i8.html#method.wrapping_neg
14248[`wrapping_shl`]: https://doc.rust-lang.org/nightly/std/primitive.i8.html#method.wrapping_shl
14249[`wrapping_shr`]: https://doc.rust-lang.org/nightly/std/primitive.i8.html#method.wrapping_shr
14250[`Wrapping`]: https://doc.rust-lang.org/nightly/std/num/struct.Wrapping.html
14251[`fmt::Formatter`]: https://doc.rust-lang.org/nightly/std/fmt/struct.Formatter.html
14252[`fmt::Write`]: https://doc.rust-lang.org/nightly/std/fmt/trait.Write.html
14253[`io::Write`]: https://doc.rust-lang.org/nightly/std/io/trait.Write.html
14254[`debug_struct`]: https://doc.rust-lang.org/nightly/core/fmt/struct.Formatter.html#method.debug_struct
14255[`debug_tuple`]: https://doc.rust-lang.org/nightly/core/fmt/struct.Formatter.html#method.debug_tuple
14256[`debug_list`]: https://doc.rust-lang.org/nightly/core/fmt/struct.Formatter.html#method.debug_list
14257[`debug_set`]: https://doc.rust-lang.org/nightly/core/fmt/struct.Formatter.html#method.debug_set
14258[`debug_map`]: https://doc.rust-lang.org/nightly/core/fmt/struct.Formatter.html#method.debug_map
14259[`Debug`]: https://doc.rust-lang.org/nightly/std/fmt/trait.Debug.html
14260[strup]: https://doc.rust-lang.org/nightly/std/primitive.str.html#method.to_uppercase
14261[strlow]: https://doc.rust-lang.org/nightly/std/primitive.str.html#method.to_lowercase
14262[`to_uppercase`]: https://doc.rust-lang.org/nightly/std/primitive.char.html#method.to_uppercase
14263[`to_lowercase`]: https://doc.rust-lang.org/nightly/std/primitive.char.html#method.to_lowercase
14264[`PoisonError`]: https://doc.rust-lang.org/nightly/std/sync/struct.PoisonError.html
14265[`RwLock`]: https://doc.rust-lang.org/nightly/std/sync/struct.RwLock.html
14266[`Mutex`]: https://doc.rust-lang.org/nightly/std/sync/struct.Mutex.html
14267[`FromRawFd`]: https://doc.rust-lang.org/nightly/std/os/unix/io/trait.FromRawFd.html
14268[`AsRawFd`]: https://doc.rust-lang.org/nightly/std/os/unix/io/trait.AsRawFd.html
14269[`Stdio`]: https://doc.rust-lang.org/nightly/std/process/struct.Stdio.html
14270[`ChildStdin`]: https://doc.rust-lang.org/nightly/std/process/struct.ChildStdin.html
14271[`ChildStdout`]: https://doc.rust-lang.org/nightly/std/process/struct.ChildStdout.html
14272[`ChildStderr`]: https://doc.rust-lang.org/nightly/std/process/struct.ChildStderr.html
14273[`io::ErrorKind`]: https://doc.rust-lang.org/nightly/std/io/enum.ErrorKind.html
14274[debugfmt]: https://www.reddit.com/r/rust/comments/3ceaui/psa_produces_prettyprinted_debug_output/
14275[`DerefMut`]: https://doc.rust-lang.org/nightly/std/ops/trait.DerefMut.html
14276[`mem::align_of`]: https://doc.rust-lang.org/nightly/std/mem/fn.align_of.html
14277[align]: https://github.com/rust-lang/rust/pull/25646
14278[`mem::min_align_of`]: https://doc.rust-lang.org/nightly/std/mem/fn.min_align_of.html
14279[typos]: https://github.com/rust-lang/rust/pull/26087
14280[nop]: https://github.com/rust-lang/rust/pull/26336
14281[fat]: https://github.com/rust-lang/rust/pull/26411
14282[dst]: https://github.com/rust-lang/rfcs/blob/master/text/0982-dst-coercion.md
14283[parcodegen]: https://github.com/rust-lang/rust/pull/26018
14284[packed]: https://github.com/rust-lang/rust/pull/25541
14285[ad]: https://github.com/rust-lang/rust/pull/27382
14286[win]: https://github.com/rust-lang/rust/pull/25350
14287
14288Version 1.1.0 (2015-06-25)
14289=========================
14290
14291* ~850 changes, numerous bugfixes
14292
14293Highlights
14294----------
14295
14296* The [`std::fs` module has been expanded][fs] to expand the set of
14297 functionality exposed:
14298 * `DirEntry` now supports optimizations like `file_type` and `metadata` which
14299 don't incur a syscall on some platforms.
14300 * A `symlink_metadata` function has been added.
14301 * The `fs::Metadata` structure now lowers to its OS counterpart, providing
14302 access to all underlying information.
14303* The compiler now contains extended explanations of many errors. When an error
14304 with an explanation occurs the compiler suggests using the `--explain` flag
14305 to read the explanation. Error explanations are also [available online][err-index].
14306* Thanks to multiple [improvements][sk] to [type checking][pre], as
14307 well as other work, the time to bootstrap the compiler decreased by
14308 32%.
14309
14310Libraries
14311---------
14312
14313* The [`str::split_whitespace`] method splits a string on unicode
14314 whitespace boundaries.
14315* On both Windows and Unix, new extension traits provide conversion of
14316 I/O types to and from the underlying system handles. On Unix, these
14317 traits are [`FromRawFd`] and [`AsRawFd`], on Windows `FromRawHandle`
14318 and `AsRawHandle`. These are implemented for `File`, `TcpStream`,
14319 `TcpListener`, and `UpdSocket`. Further implementations for
14320 `std::process` will be stabilized later.
14321* On Unix, [`std::os::unix::symlink`] creates symlinks. On
14322 Windows, symlinks can be created with
14323 `std::os::windows::symlink_dir` and
14324 `std::os::windows::symlink_file`.
14325* The `mpsc::Receiver` type can now be converted into an iterator with
14326 `into_iter` on the [`IntoIterator`] trait.
14327* `Ipv4Addr` can be created from `u32` with the `From<u32>`
14328 implementation of the [`From`] trait.
14329* The `Debug` implementation for `RangeFull` [creates output that is
14330 more consistent with other implementations][rf].
14331* [`Debug` is implemented for `File`][file].
14332* The `Default` implementation for `Arc` [no longer requires `Sync +
14333 Send`][arc].
14334* [The `Iterator` methods `count`, `nth`, and `last` have been
14335 overridden for slices to have *O*(1) performance instead of *O*(*n*)][si].
14336* Incorrect handling of paths on Windows has been improved in both the
14337 compiler and the standard library.
14338* [`AtomicPtr` gained a `Default` implementation][ap].
14339* In accordance with Rust's policy on arithmetic overflow `abs` now
14340 [panics on overflow when debug assertions are enabled][abs].
14341* The [`Cloned`] iterator, which was accidentally left unstable for
14342 1.0 [has been stabilized][c].
14343* The [`Incoming`] iterator, which iterates over incoming TCP
14344 connections, and which was accidentally unnamable in 1.0, [is now
14345 properly exported][inc].
14346* [`BinaryHeap`] no longer corrupts itself [when functions called by
14347 `sift_up` or `sift_down` panic][bh].
14348* The [`split_off`] method of `LinkedList` [no longer corrupts
14349 the list in certain scenarios][ll].
14350
14351Misc
14352----
14353
14354* Type checking performance [has improved notably][sk] with
14355 [multiple improvements][pre].
14356* The compiler [suggests code changes][ch] for more errors.
14357* rustc and it's build system have experimental support for [building
14358 toolchains against MUSL][m] instead of glibc on Linux.
14359* The compiler defines the `target_env` cfg value, which is used for
14360 distinguishing toolchains that are otherwise for the same
14361 platform. Presently this is set to `gnu` for common GNU Linux
14362 targets and for MinGW targets, and `musl` for MUSL Linux targets.
14363* The [`cargo rustc`][crc] command invokes a build with custom flags
14364 to rustc.
14365* [Android executables are always position independent][pie].
14366* [The `drop_with_repr_extern` lint warns about mixing `repr(C)`
14367 with `Drop`][24935].
14368
14369[`str::split_whitespace`]: https://doc.rust-lang.org/nightly/std/primitive.str.html#method.split_whitespace
14370[`FromRawFd`]: https://doc.rust-lang.org/nightly/std/os/unix/io/trait.FromRawFd.html
14371[`AsRawFd`]: https://doc.rust-lang.org/nightly/std/os/unix/io/trait.AsRawFd.html
14372[`std::os::unix::symlink`]: https://doc.rust-lang.org/nightly/std/os/unix/fs/fn.symlink.html
14373[`IntoIterator`]: https://doc.rust-lang.org/nightly/std/iter/trait.IntoIterator.html
14374[`From`]: https://doc.rust-lang.org/nightly/std/convert/trait.From.html
14375[rf]: https://github.com/rust-lang/rust/pull/24491
14376[err-index]: https://doc.rust-lang.org/error-index.html
14377[sk]: https://github.com/rust-lang/rust/pull/24615
14378[pre]: https://github.com/rust-lang/rust/pull/25323
14379[file]: https://github.com/rust-lang/rust/pull/24598
14380[ch]: https://github.com/rust-lang/rust/pull/24683
14381[arc]: https://github.com/rust-lang/rust/pull/24695
14382[si]: https://github.com/rust-lang/rust/pull/24701
14383[ap]: https://github.com/rust-lang/rust/pull/24834
14384[m]: https://github.com/rust-lang/rust/pull/24777
14385[fs]: https://github.com/rust-lang/rfcs/blob/master/text/1044-io-fs-2.1.md
14386[crc]: https://github.com/rust-lang/cargo/pull/1568
14387[pie]: https://github.com/rust-lang/rust/pull/24953
14388[abs]: https://github.com/rust-lang/rust/pull/25441
14389[c]: https://github.com/rust-lang/rust/pull/25496
14390[`Cloned`]: https://doc.rust-lang.org/nightly/std/iter/struct.Cloned.html
14391[`Incoming`]: https://doc.rust-lang.org/nightly/std/net/struct.Incoming.html
14392[inc]: https://github.com/rust-lang/rust/pull/25522
14393[bh]: https://github.com/rust-lang/rust/pull/25856
14394[`BinaryHeap`]: https://doc.rust-lang.org/nightly/std/collections/struct.BinaryHeap.html
14395[ll]: https://github.com/rust-lang/rust/pull/26022
14396[`split_off`]: https://doc.rust-lang.org/nightly/collections/linked_list/struct.LinkedList.html#method.split_off
14397[24935]: https://github.com/rust-lang/rust/pull/24935
14398
14399Version 1.0.0 (2015-05-15)
14400========================
14401
14402* ~1500 changes, numerous bugfixes
14403
14404Highlights
14405----------
14406
14407* The vast majority of the standard library is now `#[stable]`. It is
14408 no longer possible to use unstable features with a stable build of
14409 the compiler.
14410* Many popular crates on [crates.io] now work on the stable release
14411 channel.
14412* Arithmetic on basic integer types now [checks for overflow in debug
14413 builds][overflow].
14414
14415Language
14416--------
14417
14418* Several [restrictions have been added to trait coherence][coh] in
14419 order to make it easier for upstream authors to change traits
14420 without breaking downstream code.
14421* Digits of binary and octal literals are [lexed more eagerly][lex] to
14422 improve error messages and macro behavior. For example, `0b1234` is
14423 now lexed as `0b1234` instead of two tokens, `0b1` and `234`.
14424* Trait bounds [are always invariant][inv], eliminating the need for
14425 the `PhantomFn` and `MarkerTrait` lang items, which have been
14426 removed.
14427* ["-" is no longer a valid character in crate names][cr], the `extern crate
14428 "foo" as bar` syntax has been replaced with `extern crate foo as
14429 bar`, and Cargo now automatically translates "-" in *package* names
14430 to underscore for the crate name.
14431* [Lifetime shadowing is an error][lt].
14432* [`Send` no longer implies `'static`][send-rfc].
14433* [UFCS now supports trait-less associated paths][moar-ufcs] like
14434 `MyType::default()`.
14435* Primitive types [now have inherent methods][prim-inherent],
14436 obviating the need for extension traits like `SliceExt`.
14437* Methods with `Self: Sized` in their `where` clause are [considered
14438 object-safe][self-sized], allowing many extension traits like
14439 `IteratorExt` to be merged into the traits they extended.
14440* You can now [refer to associated types][assoc-where] whose
14441 corresponding trait bounds appear only in a `where` clause.
14442* The final bits of [OIBIT landed][oibit-final], meaning that traits
14443 like `Send` and `Sync` are now library-defined.
14444* A [Reflect trait][reflect] was introduced, which means that
14445 downcasting via the `Any` trait is effectively limited to concrete
14446 types. This helps retain the potentially-important "parametricity"
14447 property: generic code cannot behave differently for different type
14448 arguments except in minor ways.
14449* The `unsafe_destructor` feature is now deprecated in favor of the
14450 [new `dropck`][rfc769]. This change is a major reduction in unsafe
14451 code.
14452
14453Libraries
14454---------
14455
14456* The `thread_local` module [has been renamed to `std::thread`][th].
14457* The methods of `IteratorExt` [have been moved to the `Iterator`
14458 trait itself][23300].
14459* Several traits that implement Rust's conventions for type
14460 conversions, `AsMut`, `AsRef`, `From`, and `Into` have been
14461 [centralized in the `std::convert` module][con].
14462* The `FromError` trait [was removed in favor of `From`][fe].
14463* The basic sleep function [has moved to
14464 `std::thread::sleep_ms`][slp].
14465* The `splitn` function now takes an `n` parameter that represents the
14466 number of items yielded by the returned iterator [instead of the
14467 number of 'splits'][spl].
14468* [On Unix, all file descriptors are `CLOEXEC` by default][clo].
14469* [Derived implementations of `PartialOrd` now order enums according
14470 to their explicitly-assigned discriminants][po].
14471* [Methods for searching strings are generic over `Pattern`s][pat],
14472 implemented presently by `&char`, `&str`, `FnMut(char) -> bool` and
14473 some others.
14474* [In method resolution, object methods are resolved before inherent
14475 methods][meth].
14476* [`String::from_str` has been deprecated in favor of the `From` impl,
14477 `String::from`][24517].
14478* [`io::Error` implements `Sync`][ios].
14479* [The `words` method on `&str` has been replaced with
14480 `split_whitespace`][sw], to avoid answering the tricky question, 'what is
14481 a word?'
14482* The new path and IO modules are complete and `#[stable]`. This
14483 was the major library focus for this cycle.
14484* The path API was [revised][path-normalize] to normalize `.`,
14485 adjusting the tradeoffs in favor of the most common usage.
14486* A large number of remaining APIs in `std` were also stabilized
14487 during this cycle; about 75% of the non-deprecated API surface
14488 is now stable.
14489* The new [string pattern API][string-pattern] landed, which makes
14490 the string slice API much more internally consistent and flexible.
14491* A new set of [generic conversion traits][conversion] replaced
14492 many existing ad hoc traits.
14493* Generic numeric traits were [completely removed][num-traits]. This
14494 was made possible thanks to inherent methods for primitive types,
14495 and the removal gives maximal flexibility for designing a numeric
14496 hierarchy in the future.
14497* The `Fn` traits are now related via [inheritance][fn-inherit]
14498 and provide ergonomic [blanket implementations][fn-blanket].
14499* The `Index` and `IndexMut` traits were changed to
14500 [take the index by value][index-value], enabling code like
14501 `hash_map["string"]` to work.
14502* `Copy` now [inherits][copy-clone] from `Clone`, meaning that all
14503 `Copy` data is known to be `Clone` as well.
14504
14505Misc
14506----
14507
14508* Many errors now have extended explanations that can be accessed with
14509 the `--explain` flag to `rustc`.
14510* Many new examples have been added to the standard library
14511 documentation.
14512* rustdoc has received a number of improvements focused on completion
14513 and polish.
14514* Metadata was tuned, shrinking binaries [by 27%][metadata-shrink].
14515* Much headway was made on ecosystem-wide CI, making it possible
14516 to [compare builds for breakage][ci-compare].
14517
14518
14519[crates.io]: http://crates.io
14520[clo]: https://github.com/rust-lang/rust/pull/24034
14521[coh]: https://github.com/rust-lang/rfcs/blob/master/text/1023-rebalancing-coherence.md
14522[con]: https://github.com/rust-lang/rust/pull/23875
14523[cr]: https://github.com/rust-lang/rust/pull/23419
14524[fe]: https://github.com/rust-lang/rust/pull/23879
14525[23300]: https://github.com/rust-lang/rust/pull/23300
14526[inv]: https://github.com/rust-lang/rust/pull/23938
14527[ios]: https://github.com/rust-lang/rust/pull/24133
14528[lex]: https://github.com/rust-lang/rfcs/blob/master/text/0879-small-base-lexing.md
14529[lt]: https://github.com/rust-lang/rust/pull/24057
14530[meth]: https://github.com/rust-lang/rust/pull/24056
14531[pat]: https://github.com/rust-lang/rfcs/blob/master/text/0528-string-patterns.md
14532[po]: https://github.com/rust-lang/rust/pull/24270
14533[24517]: https://github.com/rust-lang/rust/pull/24517
14534[slp]: https://github.com/rust-lang/rust/pull/23949
14535[spl]: https://github.com/rust-lang/rfcs/blob/master/text/0979-align-splitn-with-other-languages.md
14536[sw]: https://github.com/rust-lang/rfcs/blob/master/text/1054-str-words.md
14537[th]: https://github.com/rust-lang/rfcs/blob/master/text/0909-move-thread-local-to-std-thread.md
14538[send-rfc]: https://github.com/rust-lang/rfcs/blob/master/text/0458-send-improvements.md
14539[moar-ufcs]: https://github.com/rust-lang/rust/pull/22172
14540[prim-inherent]: https://github.com/rust-lang/rust/pull/23104
14541[overflow]: https://github.com/rust-lang/rfcs/blob/master/text/0560-integer-overflow.md
14542[metadata-shrink]: https://github.com/rust-lang/rust/pull/22971
14543[self-sized]: https://github.com/rust-lang/rust/pull/22301
14544[assoc-where]: https://github.com/rust-lang/rust/pull/22512
14545[string-pattern]: https://github.com/rust-lang/rust/pull/22466
14546[oibit-final]: https://github.com/rust-lang/rust/pull/21689
14547[reflect]: https://github.com/rust-lang/rust/pull/23712
14548[conversion]: https://github.com/rust-lang/rfcs/pull/529
14549[num-traits]: https://github.com/rust-lang/rust/pull/23549
14550[index-value]: https://github.com/rust-lang/rust/pull/23601
14551[rfc769]: https://github.com/rust-lang/rfcs/pull/769
14552[ci-compare]: https://gist.github.com/brson/a30a77836fbec057cbee
14553[fn-inherit]: https://github.com/rust-lang/rust/pull/23282
14554[fn-blanket]: https://github.com/rust-lang/rust/pull/23895
14555[copy-clone]: https://github.com/rust-lang/rust/pull/23860
14556[path-normalize]: https://github.com/rust-lang/rust/pull/23229
14557
14558
14559Version 1.0.0-alpha.2 (2015-02-20)
14560=====================================
14561
14562* ~1300 changes, numerous bugfixes
14563
14564* Highlights
14565
14566 * The various I/O modules were [overhauled][io-rfc] to reduce
14567 unnecessary abstractions and provide better interoperation with
14568 the underlying platform. The old `io` module remains temporarily
14569 at `std::old_io`.
14570 * The standard library now [participates in feature gating][feat],
14571 so use of unstable libraries now requires a `#![feature(...)]`
14572 attribute. The impact of this change is [described on the
14573 forum][feat-forum]. [RFC][feat-rfc].
14574
14575* Language
14576
14577 * `for` loops [now operate on the `IntoIterator` trait][into],
14578 which eliminates the need to call `.iter()`, etc. to iterate
14579 over collections. There are some new subtleties to remember
14580 though regarding what sort of iterators various types yield, in
14581 particular that `for foo in bar { }` yields values from a move
14582 iterator, destroying the original collection. [RFC][into-rfc].
14583 * Objects now have [default lifetime bounds][obj], so you don't
14584 have to write `Box<Trait+'static>` when you don't care about
14585 storing references. [RFC][obj-rfc].
14586 * In types that implement `Drop`, [lifetimes must outlive the
14587 value][drop]. This will soon make it possible to safely
14588 implement `Drop` for types where `#[unsafe_destructor]` is now
14589 required. Read the [gorgeous RFC][drop-rfc] for details.
14590 * The fully qualified <T as Trait>::X syntax lets you set the Self
14591 type for a trait method or associated type. [RFC][ufcs-rfc].
14592 * References to types that implement `Deref<U>` now [automatically
14593 coerce to references][deref] to the dereferenced type `U`,
14594 e.g. `&T where T: Deref<U>` automatically coerces to `&U`. This
14595 should eliminate many unsightly uses of `&*`, as when converting
14596 from references to vectors into references to
14597 slices. [RFC][deref-rfc].
14598 * The explicit [closure kind syntax][close] (`|&:|`, `|&mut:|`,
14599 `|:|`) is obsolete and closure kind is inferred from context.
14600 * [`Self` is a keyword][Self].
14601
14602* Libraries
14603
14604 * The `Show` and `String` formatting traits [have been
14605 renamed][fmt] to `Debug` and `Display` to more clearly reflect
14606 their related purposes. Automatically getting a string
14607 conversion to use with `format!("{:?}", something_to_debug)` is
14608 now written `#[derive(Debug)]`.
14609 * Abstract [OS-specific string types][osstr], `std::ff::{OsString,
14610 OsStr}`, provide strings in platform-specific encodings for easier
14611 interop with system APIs. [RFC][osstr-rfc].
14612 * The `boxed::into_raw` and `Box::from_raw` functions [convert
14613 between `Box<T>` and `*mut T`][boxraw], a common pattern for
14614 creating raw pointers.
14615
14616* Tooling
14617
14618 * Certain long error messages of the form 'expected foo found bar'
14619 are now [split neatly across multiple
14620 lines][multiline]. Examples in the PR.
14621 * On Unix Rust can be [uninstalled][un] by running
14622 `/usr/local/lib/rustlib/uninstall.sh`.
14623 * The `#[rustc_on_unimplemented]` attribute, requiring the
14624 'on_unimplemented' feature, lets rustc [display custom error
14625 messages when a trait is expected to be implemented for a type
14626 but is not][onun].
14627
14628* Misc
14629
14630 * Rust is tested against a [LALR grammar][lalr], which parses
14631 almost all the Rust files that rustc does.
14632
14633[boxraw]: https://github.com/rust-lang/rust/pull/21318
14634[close]: https://github.com/rust-lang/rust/pull/21843
14635[deref]: https://github.com/rust-lang/rust/pull/21351
14636[deref-rfc]: https://github.com/rust-lang/rfcs/blob/master/text/0241-deref-conversions.md
14637[drop]: https://github.com/rust-lang/rust/pull/21972
14638[drop-rfc]: https://github.com/rust-lang/rfcs/blob/master/text/0769-sound-generic-drop.md
14639[feat]: https://github.com/rust-lang/rust/pull/21248
14640[feat-forum]: https://users.rust-lang.org/t/psa-important-info-about-rustcs-new-feature-staging/82/5
14641[feat-rfc]: https://github.com/rust-lang/rfcs/blob/master/text/0507-release-channels.md
14642[fmt]: https://github.com/rust-lang/rust/pull/21457
14643[into]: https://github.com/rust-lang/rust/pull/20790
14644[into-rfc]: https://github.com/rust-lang/rfcs/blob/master/text/0235-collections-conventions.md#intoiterator-and-iterable
14645[io-rfc]: https://github.com/rust-lang/rfcs/blob/master/text/0517-io-os-reform.md
14646[lalr]: https://github.com/rust-lang/rust/pull/21452
14647[multiline]: https://github.com/rust-lang/rust/pull/19870
14648[obj]: https://github.com/rust-lang/rust/pull/22230
14649[obj-rfc]: https://github.com/rust-lang/rfcs/blob/master/text/0599-default-object-bound.md
14650[onun]: https://github.com/rust-lang/rust/pull/20889
14651[osstr]: https://github.com/rust-lang/rust/pull/21488
14652[osstr-rfc]: https://github.com/rust-lang/rfcs/blob/master/text/0517-io-os-reform.md
14653[Self]: https://github.com/rust-lang/rust/pull/22158
14654[ufcs-rfc]: https://github.com/rust-lang/rfcs/blob/master/text/0132-ufcs.md
14655[un]: https://github.com/rust-lang/rust/pull/22256
14656
14657
14658Version 1.0.0-alpha (2015-01-09)
14659==================================
14660
14661 * ~2400 changes, numerous bugfixes
14662
14663 * Highlights
14664
14665 * The language itself is considered feature complete for 1.0,
14666 though there will be many usability improvements and bugfixes
14667 before the final release.
14668 * Nearly 50% of the public API surface of the standard library has
14669 been declared 'stable'. Those interfaces are unlikely to change
14670 before 1.0.
14671 * The long-running debate over integer types has been
14672 [settled][ints]: Rust will ship with types named `isize` and
14673 `usize`, rather than `int` and `uint`, for pointer-sized
14674 integers. Guidelines will be rolled out during the alpha cycle.
14675 * Most crates that are not `std` have been moved out of the Rust
14676 distribution into the Cargo ecosystem so they can evolve
14677 separately and don't need to be stabilized as quickly, including
14678 'time', 'getopts', 'num', 'regex', and 'term'.
14679 * Documentation continues to be expanded with more API coverage, more
14680 examples, and more in-depth explanations. The guides have been
14681 consolidated into [The Rust Programming Language][trpl].
14682 * "[Rust By Example][rbe]" is now maintained by the Rust team.
14683 * All official Rust binary installers now come with [Cargo], the
14684 Rust package manager.
14685
14686* Language
14687
14688 * Closures have been [completely redesigned][unboxed] to be
14689 implemented in terms of traits, can now be used as generic type
14690 bounds and thus monomorphized and inlined, or via an opaque
14691 pointer (boxed) as in the old system. The new system is often
14692 referred to as 'unboxed' closures.
14693 * Traits now support [associated types][assoc], allowing families
14694 of related types to be defined together and used generically in
14695 powerful ways.
14696 * Enum variants are [namespaced by their type names][enum].
14697 * [`where` clauses][where] provide a more versatile and attractive
14698 syntax for specifying generic bounds, though the previous syntax
14699 remains valid.
14700 * Rust again picks a [fallback][fb] (either i32 or f64) for uninferred
14701 numeric types.
14702 * Rust [no longer has a runtime][rt] of any description, and only
14703 supports OS threads, not green threads.
14704 * At long last, Rust has been overhauled for 'dynamically-sized
14705 types' ([DST]), which integrates 'fat pointers' (object types,
14706 arrays, and `str`) more deeply into the type system, making it
14707 more consistent.
14708 * Rust now has a general [range syntax][range], `i..j`, `i..`, and
14709 `..j` that produce range types and which, when combined with the
14710 `Index` operator and multidispatch, leads to a convenient slice
14711 notation, `[i..j]`.
14712 * The new range syntax revealed an ambiguity in the fixed-length
14713 array syntax, so now fixed length arrays [are written `[T;
14714 N]`][arrays].
14715 * The `Copy` trait is no longer implemented automatically. Unsafe
14716 pointers no longer implement `Sync` and `Send` so types
14717 containing them don't automatically either. `Sync` and `Send`
14718 are now 'unsafe traits' so one can "forcibly" implement them via
14719 `unsafe impl` if a type confirms to the requirements for them
14720 even though the internals do not (e.g. structs containing unsafe
14721 pointers like `Arc`). These changes are intended to prevent some
14722 footguns and are collectively known as [opt-in built-in
14723 traits][oibit] (though `Sync` and `Send` will soon become pure
14724 library types unknown to the compiler).
14725 * Operator traits now take their operands [by value][ops], and
14726 comparison traits can use multidispatch to compare one type
14727 against multiple other types, allowing e.g. `String` to be
14728 compared with `&str`.
14729 * `if let` and `while let` are no longer feature-gated.
14730 * Rust has adopted a more [uniform syntax for escaping unicode
14731 characters][unicode].
14732 * `macro_rules!` [has been declared stable][mac]. Though it is a
14733 flawed system it is sufficiently popular that it must be usable
14734 for 1.0. Effort has gone into [future-proofing][mac-future] it
14735 in ways that will allow other macro systems to be developed in
14736 parallel, and won't otherwise impact the evolution of the
14737 language.
14738 * The prelude has been [pared back significantly][prelude] such
14739 that it is the minimum necessary to support the most pervasive
14740 code patterns, and through [generalized where clauses][where]
14741 many of the prelude extension traits have been consolidated.
14742 * Rust's rudimentary reflection [has been removed][refl], as it
14743 incurred too much code generation for little benefit.
14744 * [Struct variants][structvars] are no longer feature-gated.
14745 * Trait bounds can be [polymorphic over lifetimes][hrtb]. Also
14746 known as 'higher-ranked trait bounds', this crucially allows
14747 unboxed closures to work.
14748 * Macros invocations surrounded by parens or square brackets and
14749 not terminated by a semicolon are [parsed as
14750 expressions][macros], which makes expressions like `vec![1i32,
14751 2, 3].len()` work as expected.
14752 * Trait objects now implement their traits automatically, and
14753 traits that can be coerced to objects now must be [object
14754 safe][objsafe].
14755 * Automatically deriving traits is now done with `#[derive(...)]`
14756 not `#[deriving(...)]` for [consistency with other naming
14757 conventions][derive].
14758 * Importing the containing module or enum at the same time as
14759 items or variants they contain is [now done with `self` instead
14760 of `mod`][self], as in use `foo::{self, bar}`
14761 * Glob imports are no longer feature-gated.
14762 * The `box` operator and `box` patterns have been feature-gated
14763 pending a redesign. For now unique boxes should be allocated
14764 like other containers, with `Box::new`.
14765
14766* Libraries
14767
14768 * A [series][coll1] of [efforts][coll2] to establish
14769 [conventions][coll3] for collections types has resulted in API
14770 improvements throughout the standard library.
14771 * New [APIs for error handling][err] provide ergonomic interop
14772 between error types, and [new conventions][err-conv] describe
14773 more clearly the recommended error handling strategies in Rust.
14774 * The `fail!` macro has been renamed to [`panic!`][panic] so that
14775 it is easier to discuss failure in the context of error handling
14776 without making clarifications as to whether you are referring to
14777 the 'fail' macro or failure more generally.
14778 * On Linux, `OsRng` prefers the new, more reliable `getrandom`
14779 syscall when available.
14780 * The 'serialize' crate has been renamed 'rustc-serialize' and
14781 moved out of the distribution to Cargo. Although it is widely
14782 used now, it is expected to be superseded in the near future.
14783 * The `Show` formatter, typically implemented with
14784 `#[derive(Show)]` is [now requested with the `{:?}`
14785 specifier][show] and is intended for use by all types, for uses
14786 such as `println!` debugging. The new `String` formatter must be
14787 implemented by hand, uses the `{}` specifier, and is intended
14788 for full-fidelity conversions of things that can logically be
14789 represented as strings.
14790
14791* Tooling
14792
14793 * [Flexible target specification][flex] allows rustc's code
14794 generation to be configured to support otherwise-unsupported
14795 platforms.
14796 * Rust comes with rust-gdb and rust-lldb scripts that launch their
14797 respective debuggers with Rust-appropriate pretty-printing.
14798 * The Windows installation of Rust is distributed with the
14799 MinGW components currently required to link binaries on that
14800 platform.
14801
14802* Misc
14803
14804 * Nullable enum optimizations have been extended to more types so
14805 that e.g. `Option<Vec<T>>` and `Option<String>` take up no more
14806 space than the inner types themselves.
14807 * Work has begun on supporting AArch64.
14808
14809[Cargo]: https://crates.io
14810[unboxed]: http://smallcultfollowing.com/babysteps/blog/2014/11/26/purging-proc/
14811[enum]: https://github.com/rust-lang/rfcs/blob/master/text/0390-enum-namespacing.md
14812[flex]: https://github.com/rust-lang/rfcs/blob/master/text/0131-target-specification.md
14813[err]: https://github.com/rust-lang/rfcs/blob/master/text/0201-error-chaining.md
14814[err-conv]: https://github.com/rust-lang/rfcs/blob/master/text/0236-error-conventions.md
14815[rt]: https://github.com/rust-lang/rfcs/blob/master/text/0230-remove-runtime.md
14816[mac]: https://github.com/rust-lang/rfcs/blob/master/text/0453-macro-reform.md
14817[mac-future]: https://github.com/rust-lang/rfcs/pull/550
14818[DST]: http://smallcultfollowing.com/babysteps/blog/2014/01/05/dst-take-5/
14819[coll1]: https://github.com/rust-lang/rfcs/blob/master/text/0235-collections-conventions.md
14820[coll2]: https://github.com/rust-lang/rfcs/blob/master/text/0509-collections-reform-part-2.md
14821[coll3]: https://github.com/rust-lang/rfcs/blob/master/text/0216-collection-views.md
14822[ops]: https://github.com/rust-lang/rfcs/blob/master/text/0439-cmp-ops-reform.md
14823[prelude]: https://github.com/rust-lang/rfcs/blob/master/text/0503-prelude-stabilization.md
14824[where]: https://github.com/rust-lang/rfcs/blob/master/text/0135-where.md
14825[refl]: https://github.com/rust-lang/rfcs/blob/master/text/0379-remove-reflection.md
14826[panic]: https://github.com/rust-lang/rfcs/blob/master/text/0221-panic.md
14827[structvars]: https://github.com/rust-lang/rfcs/blob/master/text/0418-struct-variants.md
14828[hrtb]: https://github.com/rust-lang/rfcs/blob/master/text/0387-higher-ranked-trait-bounds.md
14829[unicode]: https://github.com/rust-lang/rfcs/blob/master/text/0446-es6-unicode-escapes.md
14830[oibit]: https://github.com/rust-lang/rfcs/blob/master/text/0019-opt-in-builtin-traits.md
14831[macros]: https://github.com/rust-lang/rfcs/blob/master/text/0378-expr-macros.md
14832[range]: https://github.com/rust-lang/rfcs/blob/master/text/0439-cmp-ops-reform.md#indexing-and-slicing
14833[arrays]: https://github.com/rust-lang/rfcs/blob/master/text/0520-new-array-repeat-syntax.md
14834[show]: https://github.com/rust-lang/rfcs/blob/master/text/0504-show-stabilization.md
14835[derive]: https://github.com/rust-lang/rfcs/blob/master/text/0534-deriving2derive.md
14836[self]: https://github.com/rust-lang/rfcs/blob/master/text/0532-self-in-use.md
14837[fb]: https://github.com/rust-lang/rfcs/blob/master/text/0212-restore-int-fallback.md
14838[objsafe]: https://github.com/rust-lang/rfcs/blob/master/text/0255-object-safety.md
14839[assoc]: https://github.com/rust-lang/rfcs/blob/master/text/0195-associated-items.md
14840[ints]: https://github.com/rust-lang/rfcs/pull/544#issuecomment-68760871
14841[trpl]: https://doc.rust-lang.org/book/index.html
14842[rbe]: http://rustbyexample.com/
14843
14844
14845Version 0.12.0 (2014-10-09)
14846=============================
14847
14848 * ~1900 changes, numerous bugfixes
14849
14850 * Highlights
14851
14852 * The introductory documentation (now called The Rust Guide) has
14853 been completely rewritten, as have a number of supplementary
14854 guides.
14855 * Rust's package manager, Cargo, continues to improve and is
14856 sometimes considered to be quite awesome.
14857 * Many API's in `std` have been reviewed and updated for
14858 consistency with the in-development Rust coding
14859 guidelines. The standard library documentation tracks
14860 stabilization progress.
14861 * Minor libraries have been moved out-of-tree to the rust-lang org
14862 on GitHub: uuid, semver, glob, num, hexfloat, fourcc. They can
14863 be installed with Cargo.
14864 * Lifetime elision allows lifetime annotations to be left off of
14865 function declarations in many common scenarios.
14866 * Rust now works on 64-bit Windows.
14867
14868 * Language
14869 * Indexing can be overloaded with the `Index` and `IndexMut`
14870 traits.
14871 * The `if let` construct takes a branch only if the `let` pattern
14872 matches, currently behind the 'if_let' feature gate.
14873 * 'where clauses', a more flexible syntax for specifying trait
14874 bounds that is more aesthetic, have been added for traits and
14875 free functions. Where clauses will in the future make it
14876 possible to constrain associated types, which would be
14877 impossible with the existing syntax.
14878 * A new slicing syntax (e.g. `[0..4]`) has been introduced behind
14879 the 'slicing_syntax' feature gate, and can be overloaded with
14880 the `Slice` or `SliceMut` traits.
14881 * The syntax for matching of sub-slices has been changed to use a
14882 postfix `..` instead of prefix (.e.g. `[a, b, c..]`), for
14883 consistency with other uses of `..` and to future-proof
14884 potential additional uses of the syntax.
14885 * The syntax for matching inclusive ranges in patterns has changed
14886 from `0..3` to `0...4` to be consistent with the exclusive range
14887 syntax for slicing.
14888 * Matching of sub-slices in non-tail positions (e.g. `[a.., b,
14889 c]`) has been put behind the 'advanced_slice_patterns' feature
14890 gate and may be removed in the future.
14891 * Components of tuples and tuple structs can be extracted using
14892 the `value.0` syntax, currently behind the `tuple_indexing`
14893 feature gate.
14894 * The `#[crate_id]` attribute is no longer supported; versioning
14895 is handled by the package manager.
14896 * Renaming crate imports are now written `extern crate foo as bar`
14897 instead of `extern crate bar = foo`.
14898 * Renaming use statements are now written `use foo as bar` instead
14899 of `use bar = foo`.
14900 * `let` and `match` bindings and argument names in macros are now
14901 hygienic.
14902 * The new, more efficient, closure types ('unboxed closures') have
14903 been added under a feature gate, 'unboxed_closures'. These will
14904 soon replace the existing closure types, once higher-ranked
14905 trait lifetimes are added to the language.
14906 * `move` has been added as a keyword, for indicating closures
14907 that capture by value.
14908 * Mutation and assignment is no longer allowed in pattern guards.
14909 * Generic structs and enums can now have trait bounds.
14910 * The `Share` trait is now called `Sync` to free up the term
14911 'shared' to refer to 'shared reference' (the default reference
14912 type.
14913 * Dynamically-sized types have been mostly implemented,
14914 unifying the behavior of fat-pointer types with the rest of the
14915 type system.
14916 * As part of dynamically-sized types, the `Sized` trait has been
14917 introduced, which qualifying types implement by default, and
14918 which type parameters expect by default. To specify that a type
14919 parameter does not need to be sized, write `<Sized? T>`. Most
14920 types are `Sized`, notable exceptions being unsized arrays
14921 (`[T]`) and trait types.
14922 * Closures can return `!`, as in `|| -> !` or `proc() -> !`.
14923 * Lifetime bounds can now be applied to type parameters and object
14924 types.
14925 * The old, reference counted GC type, `Gc<T>` which was once
14926 denoted by the `@` sigil, has finally been removed. GC will be
14927 revisited in the future.
14928
14929 * Libraries
14930 * Library documentation has been improved for a number of modules.
14931 * Bit-vectors, collections::bitv has been modernized.
14932 * The url crate is deprecated in favor of
14933 http://github.com/servo/rust-url, which can be installed with
14934 Cargo.
14935 * Most I/O stream types can be cloned and subsequently closed from
14936 a different thread.
14937 * A `std::time::Duration` type has been added for use in I/O
14938 methods that rely on timers, as well as in the 'time' crate's
14939 `Timespec` arithmetic.
14940 * The runtime I/O abstraction layer that enabled the green thread
14941 scheduler to do non-thread-blocking I/O has been removed, along
14942 with the libuv-based implementation employed by the green thread
14943 scheduler. This will greatly simplify the future I/O work.
14944 * `collections::btree` has been rewritten to have a more
14945 idiomatic and efficient design.
14946
14947 * Tooling
14948 * rustdoc output now indicates the stability levels of API's.
14949 * The `--crate-name` flag can specify the name of the crate
14950 being compiled, like `#[crate_name]`.
14951 * The `-C metadata` specifies additional metadata to hash into
14952 symbol names, and `-C extra-filename` specifies additional
14953 information to put into the output filename, for use by the
14954 package manager for versioning.
14955 * debug info generation has continued to improve and should be
14956 more reliable under both gdb and lldb.
14957 * rustc has experimental support for compiling in parallel
14958 using the `-C codegen-units` flag.
14959 * rustc no longer encodes rpath information into binaries by
14960 default.
14961
14962 * Misc
14963 * Stack usage has been optimized with LLVM lifetime annotations.
14964 * Official Rust binaries on Linux are more compatible with older
14965 kernels and distributions, built on CentOS 5.10.
14966
14967
14968Version 0.11.0 (2014-07-02)
14969==========================
14970
14971 * ~1700 changes, numerous bugfixes
14972
14973 * Language
14974 * ~[T] has been removed from the language. This type is superseded by
14975 the Vec<T> type.
14976 * ~str has been removed from the language. This type is superseded by
14977 the String type.
14978 * ~T has been removed from the language. This type is superseded by the
14979 Box<T> type.
14980 * @T has been removed from the language. This type is superseded by the
14981 standard library's std::gc::Gc<T> type.
14982 * Struct fields are now all private by default.
14983 * Vector indices and shift amounts are both required to be a `uint`
14984 instead of any integral type.
14985 * Byte character, byte string, and raw byte string literals are now all
14986 supported by prefixing the normal literal with a `b`.
14987 * Multiple ABIs are no longer allowed in an ABI string
14988 * The syntax for lifetimes on closures/procedures has been tweaked
14989 slightly: `<'a>|A, B|: 'b + K -> T`
14990 * Floating point modulus has been removed from the language; however it
14991 is still provided by a library implementation.
14992 * Private enum variants are now disallowed.
14993 * The `priv` keyword has been removed from the language.
14994 * A closure can no longer be invoked through a &-pointer.
14995 * The `use foo, bar, baz;` syntax has been removed from the language.
14996 * The transmute intrinsic no longer works on type parameters.
14997 * Statics now allow blocks/items in their definition.
14998 * Trait bounds are separated from objects with + instead of : now.
14999 * Objects can no longer be read while they are mutably borrowed.
15000 * The address of a static is now marked as insignificant unless the
15001 #[inline(never)] attribute is placed it.
15002 * The #[unsafe_destructor] attribute is now behind a feature gate.
15003 * Struct literals are no longer allowed in ambiguous positions such as
15004 if, while, match, and for..in.
15005 * Declaration of lang items and intrinsics are now feature-gated by
15006 default.
15007 * Integral literals no longer default to `int`, and floating point
15008 literals no longer default to `f64`. Literals must be suffixed with an
15009 appropriate type if inference cannot determine the type of the
15010 literal.
15011 * The Box<T> type is no longer implicitly borrowed to &mut T.
15012 * Procedures are now required to not capture borrowed references.
15013
15014 * Libraries
15015 * The standard library is now a "facade" over a number of underlying
15016 libraries. This means that development on the standard library should
15017 be speedier due to smaller crates, as well as a clearer line between
15018 all dependencies.
15019 * A new library, libcore, lives under the standard library's facade
15020 which is Rust's "0-assumption" library, suitable for embedded and
15021 kernel development for example.
15022 * A regex crate has been added to the standard distribution. This crate
15023 includes statically compiled regular expressions.
15024 * The unwrap/unwrap_err methods on Result require a Show bound for
15025 better error messages.
15026 * The return types of the std::comm primitives have been centralized
15027 around the Result type.
15028 * A number of I/O primitives have gained the ability to time out their
15029 operations.
15030 * A number of I/O primitives have gained the ability to close their
15031 reading/writing halves to cancel pending operations.
15032 * Reverse iterator methods have been removed in favor of `rev()` on
15033 their forward-iteration counterparts.
15034 * A bitflags! macro has been added to enable easy interop with C and
15035 management of bit flags.
15036 * A debug_assert! macro is now provided which is disabled when
15037 `--cfg ndebug` is passed to the compiler.
15038 * A graphviz crate has been added for creating .dot files.
15039 * The std::cast module has been migrated into std::mem.
15040 * The std::local_data api has been migrated from freestanding functions
15041 to being based on methods.
15042 * The Pod trait has been renamed to Copy.
15043 * jemalloc has been added as the default allocator for types.
15044 * The API for allocating memory has been changed to use proper alignment
15045 and sized deallocation
15046 * Connecting a TcpStream or binding a TcpListener is now based on a
15047 string address and a u16 port. This allows connecting to a hostname as
15048 opposed to an IP.
15049 * The Reader trait now contains a core method, read_at_least(), which
15050 correctly handles many repeated 0-length reads.
15051 * The process-spawning API is now centered around a builder-style
15052 Command struct.
15053 * The :? printing qualifier has been moved from the standard library to
15054 an external libdebug crate.
15055 * Eq/Ord have been renamed to PartialEq/PartialOrd. TotalEq/TotalOrd
15056 have been renamed to Eq/Ord.
15057 * The select/plural methods have been removed from format!. The escapes
15058 for { and } have also changed from \{ and \} to {{ and }},
15059 respectively.
15060 * The TaskBuilder API has been re-worked to be a true builder, and
15061 extension traits for spawning native/green tasks have been added.
15062
15063 * Tooling
15064 * All breaking changes to the language or libraries now have their
15065 commit message annotated with `[breaking-change]` to allow for easy
15066 discovery of breaking changes.
15067 * The compiler will now try to suggest how to annotate lifetimes if a
15068 lifetime-related error occurs.
15069 * Debug info continues to be improved greatly with general bug fixes and
15070 better support for situations like link time optimization (LTO).
15071 * Usage of syntax extensions when cross-compiling has been fixed.
15072 * Functionality equivalent to GCC & Clang's -ffunction-sections,
15073 -fdata-sections and --gc-sections has been enabled by default
15074 * The compiler is now stricter about where it will load module files
15075 from when a module is declared via `mod foo;`.
15076 * The #[phase(syntax)] attribute has been renamed to #[phase(plugin)].
15077 Syntax extensions are now discovered via a "plugin registrar" type
15078 which will be extended in the future to other various plugins.
15079 * Lints have been restructured to allow for dynamically loadable lints.
15080 * A number of rustdoc improvements:
15081 * The HTML output has been visually redesigned.
15082 * Markdown is now powered by hoedown instead of sundown.
15083 * Searching heuristics have been greatly improved.
15084 * The search index has been reduced in size by a great amount.
15085 * Cross-crate documentation via `pub use` has been greatly improved.
15086 * Primitive types are now hyperlinked and documented.
15087 * Documentation has been moved from static.rust-lang.org/doc to
15088 doc.rust-lang.org
15089 * A new sandbox, play.rust-lang.org, is available for running and
15090 sharing rust code examples on-line.
15091 * Unused attributes are now more robustly warned about.
15092 * The dead_code lint now warns about unused struct fields.
15093 * Cross-compiling to iOS is now supported.
15094 * Cross-compiling to mipsel is now supported.
15095 * Stability attributes are now inherited by default and no longer apply
15096 to intra-crate usage, only inter-crate usage.
15097 * Error message related to non-exhaustive match expressions have been
15098 greatly improved.
15099
15100
15101Version 0.10 (2014-04-03)
15102=========================
15103
15104 * ~1500 changes, numerous bugfixes
15105
15106 * Language
15107 * A new RFC process is now in place for modifying the language.
15108 * Patterns with `@`-pointers have been removed from the language.
15109 * Patterns with unique vectors (`~[T]`) have been removed from the
15110 language.
15111 * Patterns with unique strings (`~str`) have been removed from the
15112 language.
15113 * `@str` has been removed from the language.
15114 * `@[T]` has been removed from the language.
15115 * `@self` has been removed from the language.
15116 * `@Trait` has been removed from the language.
15117 * Headers on `~` allocations which contain `@` boxes inside the type for
15118 reference counting have been removed.
15119 * The semantics around the lifetimes of temporary expressions have changed,
15120 see #3511 and #11585 for more information.
15121 * Cross-crate syntax extensions are now possible, but feature gated. See
15122 #11151 for more information. This includes both `macro_rules!` macros as
15123 well as syntax extensions such as `format!`.
15124 * New lint modes have been added, and older ones have been turned on to be
15125 warn-by-default.
15126 * Unnecessary parentheses
15127 * Uppercase statics
15128 * Camel Case types
15129 * Uppercase variables
15130 * Publicly visible private types
15131 * `#[deriving]` with raw pointers
15132 * Unsafe functions can no longer be coerced to closures.
15133 * Various obscure macros such as `log_syntax!` are now behind feature gates.
15134 * The `#[simd]` attribute is now behind a feature gate.
15135 * Visibility is no longer allowed on `extern crate` statements, and
15136 unnecessary visibility (`priv`) is no longer allowed on `use` statements.
15137 * Trailing commas are now allowed in argument lists and tuple patterns.
15138 * The `do` keyword has been removed, it is now a reserved keyword.
15139 * Default type parameters have been implemented, but are feature gated.
15140 * Borrowed variables through captures in closures are now considered soundly.
15141 * `extern mod` is now `extern crate`
15142 * The `Freeze` trait has been removed.
15143 * The `Share` trait has been added for types that can be shared among
15144 threads.
15145 * Labels in macros are now hygienic.
15146 * Expression/statement macro invocations can be delimited with `{}` now.
15147 * Treatment of types allowed in `static mut` locations has been tweaked.
15148 * The `*` and `.` operators are now overloadable through the `Deref` and
15149 `DerefMut` traits.
15150 * `~Trait` and `proc` no longer have `Send` bounds by default.
15151 * Partial type hints are now supported with the `_` type marker.
15152 * An `Unsafe` type was introduced for interior mutability. It is now
15153 considered undefined to transmute from `&T` to `&mut T` without using the
15154 `Unsafe` type.
15155 * The #[linkage] attribute was implemented for extern statics/functions.
15156 * The inner attribute syntax has changed from `#[foo];` to `#![foo]`.
15157 * `Pod` was renamed to `Copy`.
15158
15159 * Libraries
15160 * The `libextra` library has been removed. It has now been decomposed into
15161 component libraries with smaller and more focused nuggets of
15162 functionality. The full list of libraries can be found on the
15163 documentation index page.
15164 * std: `std::condition` has been removed. All I/O errors are now propagated
15165 through the `Result` type. In order to assist with error handling, a
15166 `try!` macro for unwrapping errors with an early return and a lint for
15167 unused results has been added. See #12039 for more information.
15168 * std: The `vec` module has been renamed to `slice`.
15169 * std: A new vector type, `Vec<T>`, has been added in preparation for DST.
15170 This will become the only growable vector in the future.
15171 * std: `std::io` now has more public re-exports. Types such as `BufferedReader`
15172 are now found at `std::io::BufferedReader` instead of
15173 `std::io::buffered::BufferedReader`.
15174 * std: `print` and `println` are no longer in the prelude, the `print!` and
15175 `println!` macros are intended to be used instead.
15176 * std: `Rc` now has a `Weak` pointer for breaking cycles, and it no longer
15177 attempts to statically prevent cycles.
15178 * std: The standard distribution is adopting the policy of pushing failure
15179 to the user rather than failing in libraries. Many functions (such as
15180 `slice::last()`) now return `Option<T>` instead of `T` + failing.
15181 * std: `fmt::Default` has been renamed to `fmt::Show`, and it now has a new
15182 deriving mode: `#[deriving(Show)]`.
15183 * std: `ToStr` is now implemented for all types implementing `Show`.
15184 * std: The formatting trait methods now take `&self` instead of `&T`
15185 * std: The `invert()` method on iterators has been renamed to `rev()`
15186 * std: `std::num` has seen a reduction in the genericity of its traits,
15187 consolidating functionality into a few core traits.
15188 * std: Backtraces are now printed on task failure if the environment
15189 variable `RUST_BACKTRACE` is present.
15190 * std: Naming conventions for iterators have been standardized. More details
15191 can be found on the wiki's style guide.
15192 * std: `eof()` has been removed from the `Reader` trait. Specific types may
15193 still implement the function.
15194 * std: Networking types are now cloneable to allow simultaneous reads/writes.
15195 * std: `assert_approx_eq!` has been removed
15196 * std: The `e` and `E` formatting specifiers for floats have been added to
15197 print them in exponential notation.
15198 * std: The `Times` trait has been removed
15199 * std: Indications of variance and opting out of builtin bounds is done
15200 through marker types in `std::kinds::marker` now
15201 * std: `hash` has been rewritten, `IterBytes` has been removed, and
15202 `#[deriving(Hash)]` is now possible.
15203 * std: `SharedChan` has been removed, `Sender` is now cloneable.
15204 * std: `Chan` and `Port` were renamed to `Sender` and `Receiver`.
15205 * std: `Chan::new` is now `channel()`.
15206 * std: A new synchronous channel type has been implemented.
15207 * std: A `select!` macro is now provided for selecting over `Receiver`s.
15208 * std: `hashmap` and `trie` have been moved to `libcollections`
15209 * std: `run` has been rolled into `io::process`
15210 * std: `assert_eq!` now uses `{}` instead of `{:?}`
15211 * std: The equality and comparison traits have seen some reorganization.
15212 * std: `rand` has moved to `librand`.
15213 * std: `to_{lower,upper}case` has been implemented for `char`.
15214 * std: Logging has been moved to `liblog`.
15215 * collections: `HashMap` has been rewritten for higher performance and less
15216 memory usage.
15217 * native: The default runtime is now `libnative`. If `libgreen` is desired,
15218 it can be booted manually. The runtime guide has more information and
15219 examples.
15220 * native: All I/O functionality except signals has been implemented.
15221 * green: Task spawning with `libgreen` has been optimized with stack caching
15222 and various trimming of code.
15223 * green: Tasks spawned by `libgreen` now have an unmapped guard page.
15224 * sync: The `extra::sync` module has been updated to modern rust (and moved
15225 to the `sync` library), tweaking and improving various interfaces while
15226 dropping redundant functionality.
15227 * sync: A new `Barrier` type has been added to the `sync` library.
15228 * sync: An efficient mutex for native and green tasks has been implemented.
15229 * serialize: The `base64` module has seen some improvement. It treats
15230 newlines better, has non-string error values, and has seen general
15231 cleanup.
15232 * fourcc: A `fourcc!` macro was introduced
15233 * hexfloat: A `hexfloat!` macro was implemented for specifying floats via a
15234 hexadecimal literal.
15235
15236 * Tooling
15237 * `rustpkg` has been deprecated and removed from the main repository. Its
15238 replacement, `cargo`, is under development.
15239 * Nightly builds of rust are now available
15240 * The memory usage of rustc has been improved many times throughout this
15241 release cycle.
15242 * The build process supports disabling rpath support for the rustc binary
15243 itself.
15244 * Code generation has improved in some cases, giving more information to the
15245 LLVM optimization passes to enable more extensive optimizations.
15246 * Debuginfo compatibility with lldb on OSX has been restored.
15247 * The master branch is now gated on an android bot, making building for
15248 android much more reliable.
15249 * Output flags have been centralized into one `--emit` flag.
15250 * Crate type flags have been centralized into one `--crate-type` flag.
15251 * Codegen flags have been consolidated behind a `-C` flag.
15252 * Linking against outdated crates now has improved error messages.
15253 * Error messages with lifetimes will often suggest how to annotate the
15254 function to fix the error.
15255 * Many more types are documented in the standard library, and new guides
15256 were written.
15257 * Many `rustdoc` improvements:
15258 * code blocks are syntax highlighted.
15259 * render standalone markdown files.
15260 * the --test flag tests all code blocks by default.
15261 * exported macros are displayed.
15262 * re-exported types have their documentation inlined at the location of the
15263 first re-export.
15264 * search works across crates that have been rendered to the same output
15265 directory.
15266
15267
15268Version 0.9 (2014-01-09)
15269==========================
15270
15271 * ~1800 changes, numerous bugfixes
15272
15273 * Language
15274 * The `float` type has been removed. Use `f32` or `f64` instead.
15275 * A new facility for enabling experimental features (feature gating) has
15276 been added, using the crate-level `#[feature(foo)]` attribute.
15277 * Managed boxes (@) are now behind a feature gate
15278 (`#[feature(managed_boxes)]`) in preparation for future removal. Use the
15279 standard library's `Gc` or `Rc` types instead.
15280 * `@mut` has been removed. Use `std::cell::{Cell, RefCell}` instead.
15281 * Jumping back to the top of a loop is now done with `continue` instead of
15282 `loop`.
15283 * Strings can no longer be mutated through index assignment.
15284 * Raw strings can be created via the basic `r"foo"` syntax or with matched
15285 hash delimiters, as in `r###"foo"###`.
15286 * `~fn` is now written `proc (args) -> retval { ... }` and may only be
15287 called once.
15288 * The `&fn` type is now written `|args| -> ret` to match the literal form.
15289 * `@fn`s have been removed.
15290 * `do` only works with procs in order to make it obvious what the cost
15291 of `do` is.
15292 * Single-element tuple-like structs can no longer be dereferenced to
15293 obtain the inner value. A more comprehensive solution for overloading
15294 the dereference operator will be provided in the future.
15295 * The `#[link(...)]` attribute has been replaced with
15296 `#[crate_id = "name#vers"]`.
15297 * Empty `impl`s must be terminated with empty braces and may not be
15298 terminated with a semicolon.
15299 * Keywords are no longer allowed as lifetime names; the `self` lifetime
15300 no longer has any special meaning.
15301 * The old `fmt!` string formatting macro has been removed.
15302 * `printf!` and `printfln!` (old-style formatting) removed in favor of
15303 `print!` and `println!`.
15304 * `mut` works in patterns now, as in `let (mut x, y) = (1, 2);`.
15305 * The `extern mod foo (name = "bar")` syntax has been removed. Use
15306 `extern mod foo = "bar"` instead.
15307 * New reserved keywords: `alignof`, `offsetof`, `sizeof`.
15308 * Macros can have attributes.
15309 * Macros can expand to items with attributes.
15310 * Macros can expand to multiple items.
15311 * The `asm!` macro is feature-gated (`#[feature(asm)]`).
15312 * Comments may be nested.
15313 * Values automatically coerce to trait objects they implement, without
15314 an explicit `as`.
15315 * Enum discriminants are no longer an entire word but as small as needed to
15316 contain all the variants. The `repr` attribute can be used to override
15317 the discriminant size, as in `#[repr(int)]` for integer-sized, and
15318 `#[repr(C)]` to match C enums.
15319 * Non-string literals are not allowed in attributes (they never worked).
15320 * The FFI now supports variadic functions.
15321 * Octal numeric literals, as in `0o7777`.
15322 * The `concat!` syntax extension performs compile-time string concatenation.
15323 * The `#[fixed_stack_segment]` and `#[rust_stack]` attributes have been
15324 removed as Rust no longer uses segmented stacks.
15325 * Non-ascii identifiers are feature-gated (`#[feature(non_ascii_idents)]`).
15326 * Ignoring all fields of an enum variant or tuple-struct is done with `..`,
15327 not `*`; ignoring remaining fields of a struct is also done with `..`,
15328 not `_`; ignoring a slice of a vector is done with `..`, not `.._`.
15329 * `rustc` supports the "win64" calling convention via `extern "win64"`.
15330 * `rustc` supports the "system" calling convention, which defaults to the
15331 preferred convention for the target platform, "stdcall" on 32-bit Windows,
15332 "C" elsewhere.
15333 * The `type_overflow` lint (default: warn) checks literals for overflow.
15334 * The `unsafe_block` lint (default: allow) checks for usage of `unsafe`.
15335 * The `attribute_usage` lint (default: warn) warns about unknown
15336 attributes.
15337 * The `unknown_features` lint (default: warn) warns about unknown
15338 feature gates.
15339 * The `dead_code` lint (default: warn) checks for dead code.
15340 * Rust libraries can be linked statically to one another
15341 * `#[link_args]` is behind the `link_args` feature gate.
15342 * Native libraries are now linked with `#[link(name = "foo")]`
15343 * Native libraries can be statically linked to a rust crate
15344 (`#[link(name = "foo", kind = "static")]`).
15345 * Native OS X frameworks are now officially supported
15346 (`#[link(name = "foo", kind = "framework")]`).
15347 * The `#[thread_local]` attribute creates thread-local (not task-local)
15348 variables. Currently behind the `thread_local` feature gate.
15349 * The `return` keyword may be used in closures.
15350 * Types that can be copied via a memcpy implement the `Pod` kind.
15351 * The `cfg` attribute can now be used on struct fields and enum variants.
15352
15353 * Libraries
15354 * std: The `option` and `result` API's have been overhauled to make them
15355 simpler, more consistent, and more composable.
15356 * std: The entire `std::io` module has been replaced with one that is
15357 more comprehensive and that properly interfaces with the underlying
15358 scheduler. File, TCP, UDP, Unix sockets, pipes, and timers are all
15359 implemented.
15360 * std: `io::util` contains a number of useful implementations of
15361 `Reader` and `Writer`, including `NullReader`, `NullWriter`,
15362 `ZeroReader`, `TeeReader`.
15363 * std: The reference counted pointer type `extra::rc` moved into std.
15364 * std: The `Gc` type in the `gc` module will replace `@` (it is currently
15365 just a wrapper around it).
15366 * std: The `Either` type has been removed.
15367 * std: `fmt::Default` can be implemented for any type to provide default
15368 formatting to the `format!` macro, as in `format!("{}", myfoo)`.
15369 * std: The `rand` API continues to be tweaked.
15370 * std: The `rust_begin_unwind` function, useful for inserting breakpoints
15371 on failure in gdb, is now named `rust_fail`.
15372 * std: The `each_key` and `each_value` methods on `HashMap` have been
15373 replaced by the `keys` and `values` iterators.
15374 * std: Functions dealing with type size and alignment have moved from the
15375 `sys` module to the `mem` module.
15376 * std: The `path` module was written and API changed.
15377 * std: `str::from_utf8` has been changed to cast instead of allocate.
15378 * std: `starts_with` and `ends_with` methods added to vectors via the
15379 `ImmutableEqVector` trait, which is in the prelude.
15380 * std: Vectors can be indexed with the `get_opt` method, which returns `None`
15381 if the index is out of bounds.
15382 * std: Task failure no longer propagates between tasks, as the model was
15383 complex, expensive, and incompatible with thread-based tasks.
15384 * std: The `Any` type can be used for dynamic typing.
15385 * std: `~Any` can be passed to the `fail!` macro and retrieved via
15386 `task::try`.
15387 * std: Methods that produce iterators generally do not have an `_iter`
15388 suffix now.
15389 * std: `cell::Cell` and `cell::RefCell` can be used to introduce mutability
15390 roots (mutable fields, etc.). Use instead of e.g. `@mut`.
15391 * std: `util::ignore` renamed to `prelude::drop`.
15392 * std: Slices have `sort` and `sort_by` methods via the `MutableVector`
15393 trait.
15394 * std: `vec::raw` has seen a lot of cleanup and API changes.
15395 * std: The standard library no longer includes any C++ code, and very
15396 minimal C, eliminating the dependency on libstdc++.
15397 * std: Runtime scheduling and I/O functionality has been factored out into
15398 extensible interfaces and is now implemented by two different crates:
15399 libnative, for native threading and I/O; and libgreen, for green threading
15400 and I/O. This paves the way for using the standard library in more limited
15401 embedded environments.
15402 * std: The `comm` module has been rewritten to be much faster, have a
15403 simpler, more consistent API, and to work for both native and green
15404 threading.
15405 * std: All libuv dependencies have been moved into the rustuv crate.
15406 * native: New implementations of runtime scheduling on top of OS threads.
15407 * native: New native implementations of TCP, UDP, file I/O, process spawning,
15408 and other I/O.
15409 * green: The green thread scheduler and message passing types are almost
15410 entirely lock-free.
15411 * extra: The `flatpipes` module had bitrotted and was removed.
15412 * extra: All crypto functions have been removed and Rust now has a policy of
15413 not reimplementing crypto in the standard library. In the future crypto
15414 will be provided by external crates with bindings to established libraries.
15415 * extra: `c_vec` has been modernized.
15416 * extra: The `sort` module has been removed. Use the `sort` method on
15417 mutable slices.
15418
15419 * Tooling
15420 * The `rust` and `rusti` commands have been removed, due to lack of
15421 maintenance.
15422 * `rustdoc` was completely rewritten.
15423 * `rustdoc` can test code examples in documentation.
15424 * `rustpkg` can test packages with the argument, 'test'.
15425 * `rustpkg` supports arbitrary dependencies, including C libraries.
15426 * `rustc`'s support for generating debug info is improved again.
15427 * `rustc` has better error reporting for unbalanced delimiters.
15428 * `rustc`'s JIT support was removed due to bitrot.
15429 * Executables and static libraries can be built with LTO (-Z lto)
15430 * `rustc` adds a `--dep-info` flag for communicating dependencies to
15431 build tools.
15432
15433
15434Version 0.8 (2013-09-26)
15435============================
15436
15437 * ~2200 changes, numerous bugfixes
15438
15439 * Language
15440 * The `for` loop syntax has changed to work with the `Iterator` trait.
15441 * At long last, unwinding works on Windows.
15442 * Default methods are ready for use.
15443 * Many trait inheritance bugs fixed.
15444 * Owned and borrowed trait objects work more reliably.
15445 * `copy` is no longer a keyword. It has been replaced by the `Clone` trait.
15446 * rustc can omit emission of code for the `debug!` macro if it is passed
15447 `--cfg ndebug`
15448 * mod.rs is now "blessed". When loading `mod foo;`, rustc will now look
15449 for foo.rs, then foo/mod.rs, and will generate an error when both are
15450 present.
15451 * Strings no longer contain trailing nulls. The new `std::c_str` module
15452 provides new mechanisms for converting to C strings.
15453 * The type of foreign functions is now `extern "C" fn` instead of `*u8'.
15454 * The FFI has been overhauled such that foreign functions are called directly,
15455 instead of through a stack-switching wrapper.
15456 * Calling a foreign function must be done through a Rust function with the
15457 `#[fixed_stack_segment]` attribute.
15458 * The `externfn!` macro can be used to declare both a foreign function and
15459 a `#[fixed_stack_segment]` wrapper at once.
15460 * `pub` and `priv` modifiers on `extern` blocks are no longer parsed.
15461 * `unsafe` is no longer allowed on extern fns - they are all unsafe.
15462 * `priv` is disallowed everywhere except for struct fields and enum variants.
15463 * `&T` (besides `&'static T`) is no longer allowed in `@T`.
15464 * `ref` bindings in irrefutable patterns work correctly now.
15465 * `char` is now prevented from containing invalid code points.
15466 * Casting to `bool` is no longer allowed.
15467 * `\0` is now accepted as an escape in chars and strings.
15468 * `yield` is a reserved keyword.
15469 * `typeof` is a reserved keyword.
15470 * Crates may be imported by URL with `extern mod foo = "url";`.
15471 * Explicit enum discriminants may be given as uints as in `enum E { V = 0u }`
15472 * Static vectors can be initialized with repeating elements,
15473 e.g. `static foo: [u8, .. 100]: [0, .. 100];`.
15474 * Static structs can be initialized with functional record update,
15475 e.g. `static foo: Foo = Foo { a: 5, .. bar };`.
15476 * `cfg!` can be used to conditionally execute code based on the crate
15477 configuration, similarly to `#[cfg(...)]`.
15478 * The `unnecessary_qualification` lint detects unneeded module
15479 prefixes (default: allow).
15480 * Arithmetic operations have been implemented on the SIMD types in
15481 `std::unstable::simd`.
15482 * Exchange allocation headers were removed, reducing memory usage.
15483 * `format!` implements a completely new, extensible, and higher-performance
15484 string formatting system. It will replace `fmt!`.
15485 * `print!` and `println!` write formatted strings (using the `format!`
15486 extension) to stdout.
15487 * `write!` and `writeln!` write formatted strings (using the `format!`
15488 extension) to the new Writers in `std::rt::io`.
15489 * The library section in which a function or static is placed may
15490 be specified with `#[link_section = "..."]`.
15491 * The `proto!` syntax extension for defining bounded message protocols
15492 was removed.
15493 * `macro_rules!` is hygienic for `let` declarations.
15494 * The `#[export_name]` attribute specifies the name of a symbol.
15495 * `unreachable!` can be used to indicate unreachable code, and fails
15496 if executed.
15497
15498 * Libraries
15499 * std: Transitioned to the new runtime, written in Rust.
15500 * std: Added an experimental I/O library, `rt::io`, based on the new
15501 runtime.
15502 * std: A new generic `range` function was added to the prelude, replacing
15503 `uint::range` and friends.
15504 * std: `range_rev` no longer exists. Since range is an iterator it can be
15505 reversed with `range(lo, hi).invert()`.
15506 * std: The `chain` method on option renamed to `and_then`; `unwrap_or_default`
15507 renamed to `unwrap_or`.
15508 * std: The `iterator` module was renamed to `iter`.
15509 * std: Integral types now support the `checked_add`, `checked_sub`, and
15510 `checked_mul` operations for detecting overflow.
15511 * std: Many methods in `str`, `vec`, `option, `result` were renamed for
15512 consistency.
15513 * std: Methods are standardizing on conventions for casting methods:
15514 `to_foo` for copying, `into_foo` for moving, `as_foo` for temporary
15515 and cheap casts.
15516 * std: The `CString` type in `c_str` provides new ways to convert to and
15517 from C strings.
15518 * std: `DoubleEndedIterator` can yield elements in two directions.
15519 * std: The `mut_split` method on vectors partitions an `&mut [T]` into
15520 two splices.
15521 * std: `str::from_bytes` renamed to `str::from_utf8`.
15522 * std: `pop_opt` and `shift_opt` methods added to vectors.
15523 * std: The task-local data interface no longer uses @, and keys are
15524 no longer function pointers.
15525 * std: The `swap_unwrap` method of `Option` renamed to `take_unwrap`.
15526 * std: Added `SharedPort` to `comm`.
15527 * std: `Eq` has a default method for `ne`; only `eq` is required
15528 in implementations.
15529 * std: `Ord` has default methods for `le`, `gt` and `ge`; only `lt`
15530 is required in implementations.
15531 * std: `is_utf8` performance is improved, impacting many string functions.
15532 * std: `os::MemoryMap` provides cross-platform mmap.
15533 * std: `ptr::offset` is now unsafe, but also more optimized. Offsets that
15534 are not 'in-bounds' are considered undefined.
15535 * std: Many freestanding functions in `vec` removed in favor of methods.
15536 * std: Many freestanding functions on scalar types removed in favor of
15537 methods.
15538 * std: Many options to task builders were removed since they don't make
15539 sense in the new scheduler design.
15540 * std: More containers implement `FromIterator` so can be created by the
15541 `collect` method.
15542 * std: More complete atomic types in `unstable::atomics`.
15543 * std: `comm::PortSet` removed.
15544 * std: Mutating methods in the `Set` and `Map` traits have been moved into
15545 the `MutableSet` and `MutableMap` traits. `Container::is_empty`,
15546 `Map::contains_key`, `MutableMap::insert`, and `MutableMap::remove` have
15547 default implementations.
15548 * std: Various `from_str` functions were removed in favor of a generic
15549 `from_str` which is available in the prelude.
15550 * std: `util::unreachable` removed in favor of the `unreachable!` macro.
15551 * extra: `dlist`, the doubly-linked list was modernized.
15552 * extra: Added a `hex` module with `ToHex` and `FromHex` traits.
15553 * extra: Added `glob` module, replacing `std::os::glob`.
15554 * extra: `rope` was removed.
15555 * extra: `deque` was renamed to `ringbuf`. `RingBuf` implements `Deque`.
15556 * extra: `net`, and `timer` were removed. The experimental replacements
15557 are `std::rt::io::net` and `std::rt::io::timer`.
15558 * extra: Iterators implemented for `SmallIntMap`.
15559 * extra: Iterators implemented for `Bitv` and `BitvSet`.
15560 * extra: `SmallIntSet` removed. Use `BitvSet`.
15561 * extra: Performance of JSON parsing greatly improved.
15562 * extra: `semver` updated to SemVer 2.0.0.
15563 * extra: `term` handles more terminals correctly.
15564 * extra: `dbg` module removed.
15565 * extra: `par` module removed.
15566 * extra: `future` was cleaned up, with some method renames.
15567 * extra: Most free functions in `getopts` were converted to methods.
15568
15569 * Other
15570 * rustc's debug info generation (`-Z debug-info`) is greatly improved.
15571 * rustc accepts `--target-cpu` to compile to a specific CPU architecture,
15572 similarly to gcc's `--march` flag.
15573 * rustc's performance compiling small crates is much better.
15574 * rustpkg has received many improvements.
15575 * rustpkg supports git tags as package IDs.
15576 * rustpkg builds into target-specific directories so it can be used for
15577 cross-compiling.
15578 * The number of concurrent test tasks is controlled by the environment
15579 variable RUST_TEST_TASKS.
15580 * The test harness can now report metrics for benchmarks.
15581 * All tools have man pages.
15582 * Programs compiled with `--test` now support the `-h` and `--help` flags.
15583 * The runtime uses jemalloc for allocations.
15584 * Segmented stacks are temporarily disabled as part of the transition to
15585 the new runtime. Stack overflows are possible!
15586 * A new documentation backend, rustdoc_ng, is available for use. It is
15587 still invoked through the normal `rustdoc` command.
15588
15589
15590Version 0.7 (2013-07-03)
15591=======================
15592
15593 * ~2000 changes, numerous bugfixes
15594
15595 * Language
15596 * `impl`s no longer accept a visibility qualifier. Put them on methods
15597 instead.
15598 * The borrow checker has been rewritten with flow-sensitivity, fixing
15599 many bugs and inconveniences.
15600 * The `self` parameter no longer implicitly means `&'self self`,
15601 and can be explicitly marked with a lifetime.
15602 * Overloadable compound operators (`+=`, etc.) have been temporarily
15603 removed due to bugs.
15604 * The `for` loop protocol now requires `for`-iterators to return `bool`
15605 so they compose better.
15606 * The `Durable` trait is replaced with the `'static` bounds.
15607 * Trait default methods work more often.
15608 * Structs with the `#[packed]` attribute have byte alignment and
15609 no padding between fields.
15610 * Type parameters bound by `Copy` must now be copied explicitly with
15611 the `copy` keyword.
15612 * It is now illegal to move out of a dereferenced unsafe pointer.
15613 * `Option<~T>` is now represented as a nullable pointer.
15614 * `@mut` does dynamic borrow checks correctly.
15615 * The `main` function is only detected at the topmost level of the crate.
15616 The `#[main]` attribute is still valid anywhere.
15617 * Struct fields may no longer be mutable. Use inherited mutability.
15618 * The `#[no_send]` attribute makes a type that would otherwise be
15619 `Send`, not.
15620 * The `#[no_freeze]` attribute makes a type that would otherwise be
15621 `Freeze`, not.
15622 * Unbounded recursion will abort the process after reaching the limit
15623 specified by the `RUST_MAX_STACK` environment variable (default: 1GB).
15624 * The `vecs_implicitly_copyable` lint mode has been removed. Vectors
15625 are never implicitly copyable.
15626 * `#[static_assert]` makes compile-time assertions about static bools.
15627 * At long last, 'argument modes' no longer exist.
15628 * The rarely used `use mod` statement no longer exists.
15629
15630 * Syntax extensions
15631 * `fail!` and `assert!` accept `~str`, `&'static str` or `fmt!`-style
15632 argument list.
15633 * `Encodable`, `Decodable`, `Ord`, `TotalOrd`, `TotalEq`, `DeepClone`,
15634 `Rand`, `Zero` and `ToStr` can all be automatically derived with
15635 `#[deriving(...)]`.
15636 * The `bytes!` macro returns a vector of bytes for string, u8, char,
15637 and unsuffixed integer literals.
15638
15639 * Libraries
15640 * The `core` crate was renamed to `std`.
15641 * The `std` crate was renamed to `extra`.
15642 * More and improved documentation.
15643 * std: `iterator` module for external iterator objects.
15644 * Many old-style (internal, higher-order function) iterators replaced by
15645 implementations of `Iterator`.
15646 * std: Many old internal vector and string iterators,
15647 incl. `any`, `all`. removed.
15648 * std: The `finalize` method of `Drop` renamed to `drop`.
15649 * std: The `drop` method now takes `&mut self` instead of `&self`.
15650 * std: The prelude no longer re-exports any modules, only types and traits.
15651 * std: Prelude additions: `print`, `println`, `FromStr`, `ApproxEq`, `Equiv`,
15652 `Iterator`, `IteratorUtil`, many numeric traits, many tuple traits.
15653 * std: New numeric traits: `Fractional`, `Real`, `RealExt`, `Integer`, `Ratio`,
15654 `Algebraic`, `Trigonometric`, `Exponential`, `Primitive`.
15655 * std: Tuple traits and accessors defined for up to 12-tuples, e.g.
15656 `(0, 1, 2).n2()` or `(0, 1, 2).n2_ref()`.
15657 * std: Many types implement `Clone`.
15658 * std: `path` type renamed to `Path`.
15659 * std: `mut` module and `Mut` type removed.
15660 * std: Many standalone functions removed in favor of methods and iterators
15661 in `vec`, `str`. In the future methods will also work as functions.
15662 * std: `reinterpret_cast` removed. Use `transmute`.
15663 * std: ascii string handling in `std::ascii`.
15664 * std: `Rand` is implemented for ~/@.
15665 * std: `run` module for spawning processes overhauled.
15666 * std: Various atomic types added to `unstable::atomic`.
15667 * std: Various types implement `Zero`.
15668 * std: `LinearMap` and `LinearSet` renamed to `HashMap` and `HashSet`.
15669 * std: Borrowed pointer functions moved from `ptr` to `borrow`.
15670 * std: Added `os::mkdir_recursive`.
15671 * std: Added `os::glob` function performs filesystems globs.
15672 * std: `FuzzyEq` renamed to `ApproxEq`.
15673 * std: `Map` now defines `pop` and `swap` methods.
15674 * std: `Cell` constructors converted to static methods.
15675 * extra: `rc` module adds the reference counted pointers, `Rc` and `RcMut`.
15676 * extra: `flate` module moved from `std` to `extra`.
15677 * extra: `fileinput` module for iterating over a series of files.
15678 * extra: `Complex` number type and `complex` module.
15679 * extra: `Rational` number type and `rational` module.
15680 * extra: `BigInt`, `BigUint` implement numeric and comparison traits.
15681 * extra: `term` uses terminfo now, is more correct.
15682 * extra: `arc` functions converted to methods.
15683 * extra: Implementation of fixed output size variations of SHA-2.
15684
15685 * Tooling
15686 * `unused_variables` lint mode for unused variables (default: warn).
15687 * `unused_unsafe` lint mode for detecting unnecessary `unsafe` blocks
15688 (default: warn).
15689 * `unused_mut` lint mode for identifying unused `mut` qualifiers
15690 (default: warn).
15691 * `dead_assignment` lint mode for unread variables (default: warn).
15692 * `unnecessary_allocation` lint mode detects some heap allocations that are
15693 immediately borrowed so could be written without allocating (default: warn).
15694 * `missing_doc` lint mode (default: allow).
15695 * `unreachable_code` lint mode (default: warn).
15696 * The `rusti` command has been rewritten and a number of bugs addressed.
15697 * rustc outputs in color on more terminals.
15698 * rustc accepts a `--link-args` flag to pass arguments to the linker.
15699 * rustc accepts a `-Z print-link-args` flag for debugging linkage.
15700 * Compiling with `-g` will make the binary record information about
15701 dynamic borrowcheck failures for debugging.
15702 * rustdoc has a nicer stylesheet.
15703 * Various improvements to rustdoc.
15704 * Improvements to rustpkg (see the detailed release notes).
15705
15706
15707Version 0.6 (2013-04-03)
15708========================
15709
15710 * ~2100 changes, numerous bugfixes
15711
15712 * Syntax changes
15713 * The self type parameter in traits is now spelled `Self`
15714 * The `self` parameter in trait and impl methods must now be explicitly
15715 named (for example: `fn f(&self) { }`). Implicit self is deprecated.
15716 * Static methods no longer require the `static` keyword and instead
15717 are distinguished by the lack of a `self` parameter
15718 * Replaced the `Durable` trait with the `'static` lifetime
15719 * The old closure type syntax with the trailing sigil has been
15720 removed in favor of the more consistent leading sigil
15721 * `super` is a keyword, and may be prefixed to paths
15722 * Trait bounds are separated with `+` instead of whitespace
15723 * Traits are implemented with `impl Trait for Type`
15724 instead of `impl Type: Trait`
15725 * Lifetime syntax is now `&'l foo` instead of `&l/foo`
15726 * The `export` keyword has finally been removed
15727 * The `move` keyword has been removed (see "Semantic changes")
15728 * The interior mutability qualifier on vectors, `[mut T]`, has been
15729 removed. Use `&mut [T]`, etc.
15730 * `mut` is no longer valid in `~mut T`. Use inherited mutability
15731 * `fail` is no longer a keyword. Use `fail!()`
15732 * `assert` is no longer a keyword. Use `assert!()`
15733 * `log` is no longer a keyword. use `debug!`, etc.
15734 * 1-tuples may be represented as `(T,)`
15735 * Struct fields may no longer be `mut`. Use inherited mutability,
15736 `@mut T`, `core::mut` or `core::cell`
15737 * `extern mod { ... }` is no longer valid syntax for foreign
15738 function modules. Use extern blocks: `extern { ... }`
15739 * Newtype enums removed. Use tuple-structs.
15740 * Trait implementations no longer support visibility modifiers
15741 * Pattern matching over vectors improved and expanded
15742 * `const` renamed to `static` to correspond to lifetime name,
15743 and make room for future `static mut` unsafe mutable globals.
15744 * Replaced `#[deriving_eq]` with `#[deriving(Eq)]`, etc.
15745 * `Clone` implementations can be automatically generated with
15746 `#[deriving(Clone)]`
15747 * Casts to traits must use a pointer sigil, e.g. `@foo as @Bar`
15748 instead of `foo as Bar`.
15749 * Fixed length vector types are now written as `[int, .. 3]`
15750 instead of `[int * 3]`.
15751 * Fixed length vector types can express the length as a constant
15752 expression. (ex: `[int, .. GL_BUFFER_SIZE - 2]`)
15753
15754 * Semantic changes
15755 * Types with owned pointers or custom destructors move by default,
15756 eliminating the `move` keyword
15757 * All foreign functions are considered unsafe
15758 * &mut is now unaliasable
15759 * Writes to borrowed @mut pointers are prevented dynamically
15760 * () has size 0
15761 * The name of the main function can be customized using #[main]
15762 * The default type of an inferred closure is &fn instead of @fn
15763 * `use` statements may no longer be "chained" - they cannot import
15764 identifiers imported by previous `use` statements
15765 * `use` statements are crate relative, importing from the "top"
15766 of the crate by default. Paths may be prefixed with `super::`
15767 or `self::` to change the search behavior.
15768 * Method visibility is inherited from the implementation declaration
15769 * Structural records have been removed
15770 * Many more types can be used in static items, including enums
15771 'static-lifetime pointers and vectors
15772 * Pattern matching over vectors improved and expanded
15773 * Typechecking of closure types has been overhauled to
15774 improve inference and eliminate unsoundness
15775 * Macros leave scope at the end of modules, unless that module is
15776 tagged with #[macro_escape]
15777
15778 * Libraries
15779 * Added big integers to `std::bigint`
15780 * Removed `core::oldcomm` module
15781 * Added pipe-based `core::comm` module
15782 * Numeric traits have been reorganized under `core::num`
15783 * `vec::slice` finally returns a slice
15784 * `debug!` and friends don't require a format string, e.g. `debug!(Foo)`
15785 * Containers reorganized around traits in `core::container`
15786 * `core::dvec` removed, `~[T]` is a drop-in replacement
15787 * `core::send_map` renamed to `core::hashmap`
15788 * `std::map` removed; replaced with `core::hashmap`
15789 * `std::treemap` reimplemented as an owned balanced tree
15790 * `std::deque` and `std::smallintmap` reimplemented as owned containers
15791 * `core::trie` added as a fast ordered map for integer keys
15792 * Set types added to `core::hashmap`, `core::trie` and `std::treemap`
15793 * `Ord` split into `Ord` and `TotalOrd`. `Ord` is still used to
15794 overload the comparison operators, whereas `TotalOrd` is used
15795 by certain container types
15796
15797 * Other
15798 * Replaced the 'cargo' package manager with 'rustpkg'
15799 * Added all-purpose 'rust' tool
15800 * `rustc --test` now supports benchmarks with the `#[bench]` attribute
15801 * rustc now *attempts* to offer spelling suggestions
15802 * Improved support for ARM and Android
15803 * Preliminary MIPS backend
15804 * Improved foreign function ABI implementation for x86, x86_64
15805 * Various memory usage improvements
15806 * Rust code may be embedded in foreign code under limited circumstances
15807 * Inline assembler supported by new asm!() syntax extension.
15808
15809
15810Version 0.5 (2012-12-21)
15811===========================
15812
15813 * ~900 changes, numerous bugfixes
15814
15815 * Syntax changes
15816 * Removed `<-` move operator
15817 * Completed the transition from the `#fmt` extension syntax to `fmt!`
15818 * Removed old fixed length vector syntax - `[T]/N`
15819 * New token-based quasi-quoters, `quote_tokens!`, `quote_expr!`, etc.
15820 * Macros may now expand to items and statements
15821 * `a.b()` is always parsed as a method call, never as a field projection
15822 * `Eq` and `IterBytes` implementations can be automatically generated
15823 with `#[deriving_eq]` and `#[deriving_iter_bytes]` respectively
15824 * Removed the special crate language for `.rc` files
15825 * Function arguments may consist of any irrefutable pattern
15826
15827 * Semantic changes
15828 * `&` and `~` pointers may point to objects
15829 * Tuple structs - `struct Foo(Bar, Baz)`. Will replace newtype enums.
15830 * Enum variants may be structs
15831 * Destructors can be added to all nominal types with the Drop trait
15832 * Structs and nullary enum variants may be constants
15833 * Values that cannot be implicitly copied are now automatically moved
15834 without writing `move` explicitly
15835 * `&T` may now be coerced to `*T`
15836 * Coercions happen in `let` statements as well as function calls
15837 * `use` statements now take crate-relative paths
15838 * The module and type namespaces have been merged so that static
15839 method names can be resolved under the trait in which they are
15840 declared
15841
15842 * Improved support for language features
15843 * Trait inheritance works in many scenarios
15844 * More support for explicit self arguments in methods - `self`, `&self`
15845 `@self`, and `~self` all generally work as expected
15846 * Static methods work in more situations
15847 * Experimental: Traits may declare default methods for the implementations
15848 to use
15849
15850 * Libraries
15851 * New condition handling system in `core::condition`
15852 * Timsort added to `std::sort`
15853 * New priority queue, `std::priority_queue`
15854 * Pipes for serializable types, `std::flatpipes'
15855 * Serialization overhauled to be trait-based
15856 * Expanded `getopts` definitions
15857 * Moved futures to `std`
15858 * More functions are pure now
15859 * `core::comm` renamed to `oldcomm`. Still deprecated
15860 * `rustdoc` and `cargo` are libraries now
15861
15862 * Misc
15863 * Added a preliminary REPL, `rusti`
15864 * License changed from MIT to dual MIT/APL2
15865
15866
15867Version 0.4 (2012-10-15)
15868==========================
15869
15870 * ~2000 changes, numerous bugfixes
15871
15872 * Syntax
15873 * All keywords are now strict and may not be used as identifiers anywhere
15874 * Keyword removal: 'again', 'import', 'check', 'new', 'owned', 'send',
15875 'of', 'with', 'to', 'class'.
15876 * Classes are replaced with simpler structs
15877 * Explicit method self types
15878 * `ret` became `return` and `alt` became `match`
15879 * `import` is now `use`; `use is now `extern mod`
15880 * `extern mod { ... }` is now `extern { ... }`
15881 * `use mod` is the recommended way to import modules
15882 * `pub` and `priv` replace deprecated export lists
15883 * The syntax of `match` pattern arms now uses fat arrow (=>)
15884 * `main` no longer accepts an args vector; use `os::args` instead
15885
15886 * Semantics
15887 * Trait implementations are now coherent, ala Haskell typeclasses
15888 * Trait methods may be static
15889 * Argument modes are deprecated
15890 * Borrowed pointers are much more mature and recommended for use
15891 * Strings and vectors in the static region are stored in constant memory
15892 * Typestate was removed
15893 * Resolution rewritten to be more reliable
15894 * Support for 'dual-mode' data structures (freezing and thawing)
15895
15896 * Libraries
15897 * Most binary operators can now be overloaded via the traits in
15898 `core::ops'
15899 * `std::net::url` for representing URLs
15900 * Sendable hash maps in `core::send_map`
15901 * `core::task' gained a (currently unsafe) task-local storage API
15902
15903 * Concurrency
15904 * An efficient new intertask communication primitive called the pipe,
15905 along with a number of higher-level channel types, in `core::pipes`
15906 * `std::arc`, an atomically reference counted, immutable, shared memory
15907 type
15908 * `std::sync`, various exotic synchronization tools based on arcs and pipes
15909 * Futures are now based on pipes and sendable
15910 * More robust linked task failure
15911 * Improved task builder API
15912
15913 * Other
15914 * Improved error reporting
15915 * Preliminary JIT support
15916 * Preliminary work on precise GC
15917 * Extensive architectural improvements to rustc
15918 * Begun a transition away from buggy C++-based reflection (shape) code to
15919 Rust-based (visitor) code
15920 * All hash functions and tables converted to secure, randomized SipHash
15921
15922
15923Version 0.3 (2012-07-12)
15924========================
15925
15926 * ~1900 changes, numerous bugfixes
15927
15928 * New coding conveniences
15929 * Integer-literal suffix inference
15930 * Per-item control over warnings, errors
15931 * #[cfg(windows)] and #[cfg(unix)] attributes
15932 * Documentation comments
15933 * More compact closure syntax
15934 * 'do' expressions for treating higher-order functions as
15935 control structures
15936 * *-patterns (wildcard extended to all constructor fields)
15937
15938 * Semantic cleanup
15939 * Name resolution pass and exhaustiveness checker rewritten
15940 * Region pointers and borrow checking supersede alias
15941 analysis
15942 * Init-ness checking is now provided by a region-based liveness
15943 pass instead of the typestate pass; same for last-use analysis
15944 * Extensive work on region pointers
15945
15946 * Experimental new language features
15947 * Slices and fixed-size, interior-allocated vectors
15948 * #!-comments for lang versioning, shell execution
15949 * Destructors and iface implementation for classes;
15950 type-parameterized classes and class methods
15951 * 'const' type kind for types that can be used to implement
15952 shared-memory concurrency patterns
15953
15954 * Type reflection
15955
15956 * Removal of various obsolete features
15957 * Keywords: 'be', 'prove', 'syntax', 'note', 'mutable', 'bind',
15958 'crust', 'native' (now 'extern'), 'cont' (now 'again')
15959
15960 * Constructs: do-while loops ('do' repurposed), fn binding,
15961 resources (replaced by destructors)
15962
15963 * Compiler reorganization
15964 * Syntax-layer of compiler split into separate crate
15965 * Clang (from LLVM project) integrated into build
15966 * Typechecker split into sub-modules
15967
15968 * New library code
15969 * New time functions
15970 * Extension methods for many built-in types
15971 * Arc: atomic-refcount read-only / exclusive-use shared cells
15972 * Par: parallel map and search routines
15973 * Extensive work on libuv interface
15974 * Much vector code moved to libraries
15975 * Syntax extensions: #line, #col, #file, #mod, #stringify,
15976 #include, #include_str, #include_bin
15977
15978 * Tool improvements
15979 * Cargo automatically resolves dependencies
15980
15981
15982Version 0.2 (2012-03-29)
15983=========================
15984
15985 * >1500 changes, numerous bugfixes
15986
15987 * New docs and doc tooling
15988
15989 * New port: FreeBSD x86_64
15990
15991 * Compilation model enhancements
15992 * Generics now specialized, multiply instantiated
15993 * Functions now inlined across separate crates
15994
15995 * Scheduling, stack and threading fixes
15996 * Noticeably improved message-passing performance
15997 * Explicit schedulers
15998 * Callbacks from C
15999 * Helgrind clean
16000
16001 * Experimental new language features
16002 * Operator overloading
16003 * Region pointers
16004 * Classes
16005
16006 * Various language extensions
16007 * C-callback function types: 'crust fn ...'
16008 * Infinite-loop construct: 'loop { ... }'
16009 * Shorten 'mutable' to 'mut'
16010 * Required mutable-local qualifier: 'let mut ...'
16011 * Basic glob-exporting: 'export foo::*;'
16012 * Alt now exhaustive, 'alt check' for runtime-checked
16013 * Block-function form of 'for' loop, with 'break' and 'ret'.
16014
16015 * New library code
16016 * AST quasi-quote syntax extension
16017 * Revived libuv interface
16018 * New modules: core::{future, iter}, std::arena
16019 * Merged per-platform std::{os*, fs*} to core::{libc, os}
16020 * Extensive cleanup, regularization in libstd, libcore
16021
16022
16023Version 0.1 (2012-01-20)
16024===============================
16025
16026 * Most language features work, including:
16027 * Unique pointers, unique closures, move semantics
16028 * Interface-constrained generics
16029 * Static interface dispatch
16030 * Stack growth
16031 * Multithread task scheduling
16032 * Typestate predicates
16033 * Failure unwinding, destructors
16034 * Pattern matching and destructuring assignment
16035 * Lightweight block-lambda syntax
16036 * Preliminary macro-by-example
16037
16038 * Compiler works with the following configurations:
16039 * Linux: x86 and x86_64 hosts and targets
16040 * macOS: x86 and x86_64 hosts and targets
16041 * Windows: x86 hosts and targets
16042
16043 * Cross compilation / multi-target configuration supported.
16044
16045 * Preliminary API-documentation and package-management tools included.
16046
16047Known issues:
16048
16049 * Documentation is incomplete.
16050
16051 * Performance is below intended target.
16052
16053 * Standard library APIs are subject to extensive change, reorganization.
16054
16055 * Language-level versioning is not yet operational - future code will
16056 break unexpectedly.