]> git.proxmox.com Git - rustc.git/blob - RELEASES.md
New upstream version 1.70.0+dfsg1
[rustc.git] / RELEASES.md
1 Version 1.70.0 (2023-06-01)
2 ==========================
3
4 <a id="1.70.0-Language"></a>
5
6 Language
7 --------
8 - [Relax ordering rules for `asm!` operands](https://github.com/rust-lang/rust/pull/105798/)
9 - [Properly allow macro expanded `format_args` invocations to uses captures](https://github.com/rust-lang/rust/pull/106505/)
10 - [Lint ambiguous glob re-exports](https://github.com/rust-lang/rust/pull/107880/)
11 - [Perform const and unsafe checking for expressions in `let _ = expr` position.](https://github.com/rust-lang/rust/pull/102256/)
12
13 <a id="1.70.0-Compiler"></a>
14
15 Compiler
16 --------
17 - [Extend -Cdebuginfo with new options and named aliases](https://github.com/rust-lang/rust/pull/109808/)
18 This provides a smaller version of debuginfo for cases that only need line number information
19 (`-Cdebuginfo=line-tables-only`), which may eventually become the default for `-Cdebuginfo=1`.
20 - [Make `unused_allocation` lint against `Box::new` too](https://github.com/rust-lang/rust/pull/104363/)
21 - [Detect uninhabited types early in const eval](https://github.com/rust-lang/rust/pull/109435/)
22 - [Switch to LLD as default linker for {arm,thumb}v4t-none-eabi](https://github.com/rust-lang/rust/pull/109721/)
23 - [Add tier 3 target `loongarch64-unknown-linux-gnu`](https://github.com/rust-lang/rust/pull/96971)
24 - [Add tier 3 target for `i586-pc-nto-qnx700` (QNX Neutrino RTOS, version 7.0)](https://github.com/rust-lang/rust/pull/109173/),
25 - [Insert alignment checks for pointer dereferences as debug assertions](https://github.com/rust-lang/rust/pull/98112)
26 This catches undefined behavior at runtime, and may cause existing code to fail.
27
28 Refer to Rust's [platform support page][platform-support-doc]
29 for more information on Rust's tiered platform support.
30
31 <a id="1.70.0-Libraries"></a>
32
33 Libraries
34 ---------
35 - [Document NonZeroXxx layout guarantees](https://github.com/rust-lang/rust/pull/94786/)
36 - [Windows: make `Command` prefer non-verbatim paths](https://github.com/rust-lang/rust/pull/96391/)
37 - [Implement Default for some alloc/core iterators](https://github.com/rust-lang/rust/pull/99929/)
38 - [Fix handling of trailing bare CR in str::lines](https://github.com/rust-lang/rust/pull/100311/)
39 - [allow negative numeric literals in `concat!`](https://github.com/rust-lang/rust/pull/106844/)
40 - [Add documentation about the memory layout of `Cell`](https://github.com/rust-lang/rust/pull/106921/)
41 - [Use `partial_cmp` to implement tuple `lt`/`le`/`ge`/`gt`](https://github.com/rust-lang/rust/pull/108157/)
42 - [Stabilize `atomic_as_ptr`](https://github.com/rust-lang/rust/pull/108419/)
43 - [Stabilize `nonnull_slice_from_raw_parts`](https://github.com/rust-lang/rust/pull/97506/)
44 - [Partial stabilization of `once_cell`](https://github.com/rust-lang/rust/pull/105587/)
45 - [Stabilize `nonzero_min_max`](https://github.com/rust-lang/rust/pull/106633/)
46 - [Flatten/inline format_args!() and (string and int) literal arguments into format_args!()](https://github.com/rust-lang/rust/pull/106824/)
47 - [Stabilize movbe target feature](https://github.com/rust-lang/rust/pull/107711/)
48 - [don't splice from files into pipes in io::copy](https://github.com/rust-lang/rust/pull/108283/)
49 - [Add a builtin unstable `FnPtr` trait that is implemented for all function pointers](https://github.com/rust-lang/rust/pull/108080/)
50 This extends `Debug`, `Pointer`, `Hash`, `PartialEq`, `Eq`, `PartialOrd`, and `Ord`
51 implementations for function pointers with all ABIs.
52
53 <a id="1.70.0-Stabilized-APIs"></a>
54
55 Stabilized APIs
56 ---------------
57
58 - [`NonZero*::MIN/MAX`](https://doc.rust-lang.org/stable/std/num/struct.NonZeroI8.html#associatedconstant.MIN)
59 - [`BinaryHeap::retain`](https://doc.rust-lang.org/stable/std/collections/struct.BinaryHeap.html#method.retain)
60 - [`Default for std::collections::binary_heap::IntoIter`](https://doc.rust-lang.org/stable/std/collections/binary_heap/struct.IntoIter.html)
61 - [`Default for std::collections::btree_map::{IntoIter, Iter, IterMut}`](https://doc.rust-lang.org/stable/std/collections/btree_map/struct.IntoIter.html)
62 - [`Default for std::collections::btree_map::{IntoKeys, Keys}`](https://doc.rust-lang.org/stable/std/collections/btree_map/struct.IntoKeys.html)
63 - [`Default for std::collections::btree_map::{IntoValues, Values}`](https://doc.rust-lang.org/stable/std/collections/btree_map/struct.IntoKeys.html)
64 - [`Default for std::collections::btree_map::Range`](https://doc.rust-lang.org/stable/std/collections/btree_map/struct.Range.html)
65 - [`Default for std::collections::btree_set::{IntoIter, Iter}`](https://doc.rust-lang.org/stable/std/collections/btree_set/struct.IntoIter.html)
66 - [`Default for std::collections::btree_set::Range`](https://doc.rust-lang.org/stable/std/collections/btree_set/struct.Range.html)
67 - [`Default for std::collections::linked_list::{IntoIter, Iter, IterMut}`](https://doc.rust-lang.org/stable/alloc/collections/linked_list/struct.IntoIter.html)
68 - [`Default for std::vec::IntoIter`](https://doc.rust-lang.org/stable/alloc/vec/struct.IntoIter.html#impl-Default-for-IntoIter%3CT,+A%3E)
69 - [`Default for std::iter::Chain`](https://doc.rust-lang.org/stable/std/iter/struct.Chain.html)
70 - [`Default for std::iter::Cloned`](https://doc.rust-lang.org/stable/std/iter/struct.Cloned.html)
71 - [`Default for std::iter::Copied`](https://doc.rust-lang.org/stable/std/iter/struct.Copied.html)
72 - [`Default for std::iter::Enumerate`](https://doc.rust-lang.org/stable/std/iter/struct.Enumerate.html)
73 - [`Default for std::iter::Flatten`](https://doc.rust-lang.org/stable/std/iter/struct.Flatten.html)
74 - [`Default for std::iter::Fuse`](https://doc.rust-lang.org/stable/std/iter/struct.Fuse.html)
75 - [`Default for std::iter::Rev`](https://doc.rust-lang.org/stable/std/iter/struct.Rev.html)
76 - [`Default for std::slice::Iter`](https://doc.rust-lang.org/stable/std/slice/struct.Iter.html)
77 - [`Default for std::slice::IterMut`](https://doc.rust-lang.org/stable/std/slice/struct.IterMut.html)
78 - [`Rc::into_inner`](https://doc.rust-lang.org/stable/alloc/rc/struct.Rc.html#method.into_inner)
79 - [`Arc::into_inner`](https://doc.rust-lang.org/stable/alloc/sync/struct.Arc.html#method.into_inner)
80 - [`std::cell::OnceCell`](https://doc.rust-lang.org/stable/std/cell/struct.OnceCell.html)
81 - [`Option::is_some_and`](https://doc.rust-lang.org/stable/std/option/enum.Option.html#method.is_some_and)
82 - [`NonNull::slice_from_raw_parts`](https://doc.rust-lang.org/stable/std/ptr/struct.NonNull.html#method.slice_from_raw_parts)
83 - [`Result::is_ok_and`](https://doc.rust-lang.org/stable/std/result/enum.Result.html#method.is_ok_and)
84 - [`Result::is_err_and`](https://doc.rust-lang.org/stable/std/result/enum.Result.html#method.is_err_and)
85 - [`std::sync::atomic::Atomic*::as_ptr`](https://doc.rust-lang.org/stable/std/sync/atomic/struct.AtomicU8.html#method.as_ptr)
86 - [`std::io::IsTerminal`](https://doc.rust-lang.org/stable/std/io/trait.IsTerminal.html)
87 - [`std::os::linux::net::SocketAddrExt`](https://doc.rust-lang.org/stable/std/os/linux/net/trait.SocketAddrExt.html)
88 - [`std::os::unix::net::UnixDatagram::bind_addr`](https://doc.rust-lang.org/stable/std/os/unix/net/struct.UnixDatagram.html#method.bind_addr)
89 - [`std::os::unix::net::UnixDatagram::connect_addr`](https://doc.rust-lang.org/stable/std/os/unix/net/struct.UnixDatagram.html#method.connect_addr)
90 - [`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)
91 - [`std::os::unix::net::UnixListener::bind_addr`](https://doc.rust-lang.org/stable/std/os/unix/net/struct.UnixListener.html#method.bind_addr)
92 - [`std::path::Path::as_mut_os_str`](https://doc.rust-lang.org/stable/std/path/struct.Path.html#method.as_mut_os_str)
93 - [`std::sync::OnceLock`](https://doc.rust-lang.org/stable/std/sync/struct.OnceLock.html)
94
95 <a id="1.70.0-Cargo"></a>
96
97 Cargo
98 -----
99
100 - [Add `CARGO_PKG_README`](https://github.com/rust-lang/cargo/pull/11645/)
101 - [Make `sparse` the default protocol for crates.io](https://github.com/rust-lang/cargo/pull/11791/)
102 - [Accurately show status when downgrading dependencies](https://github.com/rust-lang/cargo/pull/11839/)
103 - [Use registry.default for login/logout](https://github.com/rust-lang/cargo/pull/11949/)
104 - [Stabilize `cargo logout`](https://github.com/rust-lang/cargo/pull/11950/)
105
106 <a id="1.70.0-Misc"></a>
107
108 Misc
109 ----
110
111 - [Stabilize rustdoc `--test-run-directory`](https://github.com/rust-lang/rust/pull/103682/)
112
113 <a id="1.70.0-Compatibility-Notes"></a>
114
115 Compatibility Notes
116 -------------------
117
118 - [Prevent stable `libtest` from supporting `-Zunstable-options`](https://github.com/rust-lang/rust/pull/109044/)
119 - [Perform const and unsafe checking for expressions in `let _ = expr` position.](https://github.com/rust-lang/rust/pull/102256/)
120 - [WebAssembly targets enable `sign-ext` and `mutable-globals` features in codegen](https://github.com/rust-lang/rust/issues/109807)
121 This may cause incompatibility with older execution environments.
122 - [Insert alignment checks for pointer dereferences as debug assertions](https://github.com/rust-lang/rust/pull/98112)
123 This catches undefined behavior at runtime, and may cause existing code to fail.
124
125 <a id="1.70.0-Internal-Changes"></a>
126
127 Internal Changes
128 ----------------
129
130 These changes do not affect any public interfaces of Rust, but they represent
131 significant improvements to the performance or internals of rustc and related
132 tools.
133
134 - [Upgrade to LLVM 16](https://github.com/rust-lang/rust/pull/109474/)
135 - [Use SipHash-1-3 instead of SipHash-2-4 for StableHasher](https://github.com/rust-lang/rust/pull/107925/)
136
137 Version 1.69.0 (2023-04-20)
138 ==========================
139
140 <a id="1.69.0-Language"></a>
141
142 Language
143 --------
144
145 - [Deriving built-in traits on packed structs works with `Copy` fields.](https://github.com/rust-lang/rust/pull/104429/)
146 - [Stabilize the `cmpxchg16b` target feature on x86 and x86_64.](https://github.com/rust-lang/rust/pull/106774/)
147 - [Improve analysis of trait bounds for associated types.](https://github.com/rust-lang/rust/pull/103695/)
148 - [Allow associated types to be used as union fields.](https://github.com/rust-lang/rust/pull/106938/)
149 - [Allow `Self: Autotrait` bounds on dyn-safe trait methods.](https://github.com/rust-lang/rust/pull/107082/)
150 - [Treat `str` as containing `[u8]` for auto trait purposes.](https://github.com/rust-lang/rust/pull/107941/)
151
152 <a id="1.69.0-Compiler"></a>
153
154 Compiler
155 --------
156
157 - [Upgrade `*-pc-windows-gnu` on CI to mingw-w64 v10 and GCC 12.2.](https://github.com/rust-lang/rust/pull/100178/)
158 - [Rework min_choice algorithm of member constraints.](https://github.com/rust-lang/rust/pull/105300/)
159 - [Support `true` and `false` as boolean flags in compiler arguments.](https://github.com/rust-lang/rust/pull/107043/)
160 - [Default `repr(C)` enums to `c_int` size.](https://github.com/rust-lang/rust/pull/107592/)
161
162 <a id="1.69.0-Libraries"></a>
163
164 Libraries
165 ---------
166
167 - [Implement the unstable `DispatchFromDyn` for cell types, allowing downstream experimentation with custom method receivers.](https://github.com/rust-lang/rust/pull/97373/)
168 - [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/)
169 - [Implement `AsFd` and `AsRawFd` for `Rc`.](https://github.com/rust-lang/rust/pull/107317/)
170
171 <a id="1.69.0-Stabilized-APIs"></a>
172
173 Stabilized APIs
174 ---------------
175
176 - [`CStr::from_bytes_until_nul`](https://doc.rust-lang.org/stable/core/ffi/struct.CStr.html#method.from_bytes_until_nul)
177 - [`core::ffi::FromBytesUntilNulError`](https://doc.rust-lang.org/stable/core/ffi/struct.FromBytesUntilNulError.html)
178
179 These APIs are now stable in const contexts:
180
181 - [`SocketAddr::new`](https://doc.rust-lang.org/stable/std/net/enum.SocketAddr.html#method.new)
182 - [`SocketAddr::ip`](https://doc.rust-lang.org/stable/std/net/enum.SocketAddr.html#method.ip)
183 - [`SocketAddr::port`](https://doc.rust-lang.org/stable/std/net/enum.SocketAddr.html#method.port)
184 - [`SocketAddr::is_ipv4`](https://doc.rust-lang.org/stable/std/net/enum.SocketAddr.html#method.is_ipv4)
185 - [`SocketAddr::is_ipv6`](https://doc.rust-lang.org/stable/std/net/enum.SocketAddr.html#method.is_ipv6)
186 - [`SocketAddrV4::new`](https://doc.rust-lang.org/stable/std/net/struct.SocketAddrV4.html#method.new)
187 - [`SocketAddrV4::ip`](https://doc.rust-lang.org/stable/std/net/struct.SocketAddrV4.html#method.ip)
188 - [`SocketAddrV4::port`](https://doc.rust-lang.org/stable/std/net/struct.SocketAddrV4.html#method.port)
189 - [`SocketAddrV6::new`](https://doc.rust-lang.org/stable/std/net/struct.SocketAddrV6.html#method.new)
190 - [`SocketAddrV6::ip`](https://doc.rust-lang.org/stable/std/net/struct.SocketAddrV6.html#method.ip)
191 - [`SocketAddrV6::port`](https://doc.rust-lang.org/stable/std/net/struct.SocketAddrV6.html#method.port)
192 - [`SocketAddrV6::flowinfo`](https://doc.rust-lang.org/stable/std/net/struct.SocketAddrV6.html#method.flowinfo)
193 - [`SocketAddrV6::scope_id`](https://doc.rust-lang.org/stable/std/net/struct.SocketAddrV6.html#method.scope_id)
194
195 <a id="1.69.0-Cargo"></a>
196
197 Cargo
198 -----
199
200 - [Cargo now suggests `cargo fix` or `cargo clippy --fix` when compilation warnings are auto-fixable.](https://github.com/rust-lang/cargo/pull/11558/)
201 - [Cargo now suggests `cargo add` if you try to install a library crate.](https://github.com/rust-lang/cargo/pull/11410/)
202 - [Cargo now sets the `CARGO_BIN_NAME` environment variable also for binary examples.](https://github.com/rust-lang/cargo/pull/11705/)
203
204 <a id="1.69.0-Rustdoc"></a>
205
206 Rustdoc
207 -----
208
209 - [Vertically compact trait bound formatting.](https://github.com/rust-lang/rust/pull/102842/)
210 - [Only include stable lints in `rustdoc::all` group.](https://github.com/rust-lang/rust/pull/106316/)
211 - [Compute maximum Levenshtein distance based on the query.](https://github.com/rust-lang/rust/pull/107141/)
212 - [Remove inconsistently-present sidebar tooltips.](https://github.com/rust-lang/rust/pull/107490/)
213 - [Search by macro when query ends with `!`.](https://github.com/rust-lang/rust/pull/108143/)
214
215 <a id="1.69.0-Compatibility-Notes"></a>
216
217 Compatibility Notes
218 -------------------
219
220 - [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.
221 - [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.
222 - [Update the minimum external LLVM to 14.](https://github.com/rust-lang/rust/pull/107573/)
223 - [Cargo now emits errors on invalid characters in a registry token.](https://github.com/rust-lang/cargo/pull/11600/)
224 - [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/)
225 - [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/)
226 - [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/)
227 - [The Rust distribution no longer always includes rustdoc](https://github.com/rust-lang/rust/pull/106886)
228 If `tools = [...]` is set in config.toml, we will respect a missing rustdoc in that list. By
229 default rustdoc remains included. To retain the prior behavior explicitly add `"rustdoc"` to the
230 list.
231
232 <a id="1.69.0-Internal-Changes"></a>
233
234 Internal Changes
235 ----------------
236
237 These changes do not affect any public interfaces of Rust, but they represent
238 significant improvements to the performance or internals of rustc and related
239 tools.
240
241 - [Move `format_args!()` into AST (and expand it during AST lowering)](https://github.com/rust-lang/rust/pull/106745/)
242
243 Version 1.68.2 (2023-03-28)
244 ===========================
245
246 - [Update the GitHub RSA host key bundled within Cargo](https://github.com/rust-lang/cargo/pull/11883).
247 The key was [rotated by GitHub](https://github.blog/2023-03-23-we-updated-our-rsa-ssh-host-key/)
248 on 2023-03-24 after the old one leaked.
249 - [Mark the old GitHub RSA host key as revoked](https://github.com/rust-lang/cargo/pull/11889).
250 This will prevent Cargo from accepting the leaked key even when trusted by
251 the system.
252 - [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)
253
254 Version 1.68.1 (2023-03-23)
255 ===========================
256
257 - [Fix miscompilation in produced Windows MSVC artifacts](https://github.com/rust-lang/rust/pull/109094)
258 This was introduced by enabling ThinLTO for the distributed rustc which led
259 to miscompilations in the resulting binary. Currently this is believed to be
260 limited to the -Zdylib-lto flag used for rustc compilation, rather than a
261 general bug in ThinLTO, so only rustc artifacts should be affected.
262 - [Fix --enable-local-rust builds](https://github.com/rust-lang/rust/pull/109111/)
263 - [Treat `$prefix-clang` as `clang` in linker detection code](https://github.com/rust-lang/rust/pull/109156)
264 - [Fix panic in compiler code](https://github.com/rust-lang/rust/pull/108162)
265
266 Version 1.68.0 (2023-03-09)
267 ==========================
268
269 <a id="1.68.0-Language"></a>
270
271 Language
272 --------
273
274 - [Stabilize default_alloc_error_handler](https://github.com/rust-lang/rust/pull/102318/)
275 This allows usage of `alloc` on stable without requiring the
276 definition of a handler for allocation failure. Defining custom handlers is still unstable.
277 - [Stabilize `efiapi` calling convention.](https://github.com/rust-lang/rust/pull/105795/)
278 - [Remove implicit promotion for types with drop glue](https://github.com/rust-lang/rust/pull/105085/)
279
280 <a id="1.68.0-Compiler"></a>
281
282 Compiler
283 --------
284
285 - [Change `bindings_with_variant_name` to deny-by-default](https://github.com/rust-lang/rust/pull/104154/)
286 - [Allow .. to be parsed as let initializer](https://github.com/rust-lang/rust/pull/105701/)
287 - [Add `armv7-sony-vita-newlibeabihf` as a tier 3 target](https://github.com/rust-lang/rust/pull/105712/)
288 - [Always check alignment during compile-time const evaluation](https://github.com/rust-lang/rust/pull/104616/)
289 - [Disable "split dwarf inlining" by default.](https://github.com/rust-lang/rust/pull/106709/)
290 - [Add vendor to Fuchsia's target triple](https://github.com/rust-lang/rust/pull/106429/)
291 - [Enable sanitizers for s390x-linux](https://github.com/rust-lang/rust/pull/107127/)
292
293 <a id="1.68.0-Libraries"></a>
294
295 Libraries
296 ---------
297
298 - [Loosen the bound on the Debug implementation of Weak.](https://github.com/rust-lang/rust/pull/90291/)
299 - [Make `std::task::Context` !Send and !Sync](https://github.com/rust-lang/rust/pull/95985/)
300 - [PhantomData layout guarantees](https://github.com/rust-lang/rust/pull/104081/)
301 - [Don't derive Debug for `OnceWith` & `RepeatWith`](https://github.com/rust-lang/rust/pull/104163/)
302 - [Implement DerefMut for PathBuf](https://github.com/rust-lang/rust/pull/105018/)
303 - [Add O(1) `Vec -> VecDeque` conversion guarantee](https://github.com/rust-lang/rust/pull/105128/)
304 - [Leak amplification for peek_mut() to ensure BinaryHeap's invariant is always met](https://github.com/rust-lang/rust/pull/105851/)
305
306 <a id="1.68.0-Stabilized-APIs"></a>
307
308 Stabilized APIs
309 ---------------
310
311 - [`{core,std}::pin::pin!`](https://doc.rust-lang.org/stable/std/pin/macro.pin.html)
312 - [`impl From<bool> for {f32,f64}`](https://doc.rust-lang.org/stable/std/primitive.f32.html#impl-From%3Cbool%3E-for-f32)
313 - [`std::path::MAIN_SEPARATOR_STR`](https://doc.rust-lang.org/stable/std/path/constant.MAIN_SEPARATOR_STR.html)
314 - [`impl DerefMut for PathBuf`](https://doc.rust-lang.org/stable/std/path/struct.PathBuf.html#impl-DerefMut-for-PathBuf)
315
316 These APIs are now stable in const contexts:
317
318 - [`VecDeque::new`](https://doc.rust-lang.org/stable/std/collections/struct.VecDeque.html#method.new)
319
320 <a id="1.68.0-Cargo"></a>
321
322 Cargo
323 -----
324
325 - [Stabilize sparse registry support for crates.io](https://github.com/rust-lang/cargo/pull/11224/)
326 - [`cargo build --verbose` tells you more about why it recompiles.](https://github.com/rust-lang/cargo/pull/11407/)
327 - [Show progress of crates.io index update even `net.git-fetch-with-cli` option enabled](https://github.com/rust-lang/cargo/pull/11579/)
328
329 <a id="1.68.0-Misc"></a>
330
331 Misc
332 ----
333
334 <a id="1.68.0-Compatibility-Notes"></a>
335
336 Compatibility Notes
337 -------------------
338
339 - [Only support Android NDK 25 or newer](https://blog.rust-lang.org/2023/01/09/android-ndk-update-r25.html)
340 - [Add `SEMICOLON_IN_EXPRESSIONS_FROM_MACROS` to future-incompat report](https://github.com/rust-lang/rust/pull/103418/)
341 - [Only specify `--target` by default for `-Zgcc-ld=lld` on wasm](https://github.com/rust-lang/rust/pull/101792/)
342 - [Bump `IMPLIED_BOUNDS_ENTAILMENT` to Deny + ReportNow](https://github.com/rust-lang/rust/pull/106465/)
343 - [`std::task::Context` no longer implements Send and Sync](https://github.com/rust-lang/rust/pull/95985)
344
345 <a id="1.68.0-Internal-Changes"></a>
346
347 Internal Changes
348 ----------------
349
350 These changes do not affect any public interfaces of Rust, but they represent
351 significant improvements to the performance or internals of rustc and related
352 tools.
353
354 - [Encode spans relative to the enclosing item](https://github.com/rust-lang/rust/pull/84762/)
355 - [Don't normalize in AstConv](https://github.com/rust-lang/rust/pull/101947/)
356 - [Find the right lower bound region in the scenario of partial order relations](https://github.com/rust-lang/rust/pull/104765/)
357 - [Fix impl block in const expr](https://github.com/rust-lang/rust/pull/104889/)
358 - [Check ADT fields for copy implementations considering regions](https://github.com/rust-lang/rust/pull/105102/)
359 - [rustdoc: simplify JS search routine by not messing with lev distance](https://github.com/rust-lang/rust/pull/105796/)
360 - [Enable ThinLTO for rustc on `x86_64-pc-windows-msvc`](https://github.com/rust-lang/rust/pull/103591/)
361 - [Enable ThinLTO for rustc on `x86_64-apple-darwin`](https://github.com/rust-lang/rust/pull/103647/)
362
363 Version 1.67.1 (2023-02-09)
364 ===========================
365
366 - [Fix interoperability with thin archives.](https://github.com/rust-lang/rust/pull/107360)
367 - [Fix an internal error in the compiler build process.](https://github.com/rust-lang/rust/pull/105624)
368 - [Downgrade `clippy::uninlined_format_args` to pedantic.](https://github.com/rust-lang/rust-clippy/pull/10265)
369
370 Version 1.67.0 (2023-01-26)
371 ==========================
372
373 <a id="1.67.0-Language"></a>
374
375 Language
376 --------
377
378 - [Make `Sized` predicates coinductive, allowing cycles.](https://github.com/rust-lang/rust/pull/100386/)
379 - [`#[must_use]` annotations on `async fn` also affect the `Future::Output`.](https://github.com/rust-lang/rust/pull/100633/)
380 - [Elaborate supertrait obligations when deducing closure signatures.](https://github.com/rust-lang/rust/pull/101834/)
381 - [Invalid literals are no longer an error under `cfg(FALSE)`.](https://github.com/rust-lang/rust/pull/102944/)
382 - [Unreserve braced enum variants in value namespace.](https://github.com/rust-lang/rust/pull/103578/)
383
384 <a id="1.67.0-Compiler"></a>
385
386 Compiler
387 --------
388
389 - [Enable varargs support for calling conventions other than `C` or `cdecl`.](https://github.com/rust-lang/rust/pull/97971/)
390 - [Add new MIR constant propagation based on dataflow analysis.](https://github.com/rust-lang/rust/pull/101168/)
391 - [Optimize field ordering by grouping m\*2^n-sized fields with equivalently aligned ones.](https://github.com/rust-lang/rust/pull/102750/)
392 - [Stabilize native library modifier `verbatim`.](https://github.com/rust-lang/rust/pull/104360/)
393
394 Added, updated, and removed targets:
395
396 - [Add a tier 3 target for PowerPC on AIX](https://github.com/rust-lang/rust/pull/102293/), `powerpc64-ibm-aix`.
397 - [Add a tier 3 target for the Sony PlayStation 1](https://github.com/rust-lang/rust/pull/102689/), `mipsel-sony-psx`.
398 - [Add tier 3 `no_std` targets for the QNX Neutrino RTOS](https://github.com/rust-lang/rust/pull/102701/),
399 `aarch64-unknown-nto-qnx710` and `x86_64-pc-nto-qnx710`.
400 - [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`.
401 - [Remove tier 3 `linuxkernel` targets](https://github.com/rust-lang/rust/pull/104015/) (not used by the actual kernel).
402
403 Refer to Rust's [platform support page][platform-support-doc]
404 for more information on Rust's tiered platform support.
405
406 <a id="1.67.0-Libraries"></a>
407
408 Libraries
409 ---------
410
411 - [Merge `crossbeam-channel` into `std::sync::mpsc`.](https://github.com/rust-lang/rust/pull/93563/)
412 - [Fix inconsistent rounding of 0.5 when formatted to 0 decimal places.](https://github.com/rust-lang/rust/pull/102935/)
413 - [Derive `Eq` and `Hash` for `ControlFlow`.](https://github.com/rust-lang/rust/pull/103084/)
414 - [Don't build `compiler_builtins` with `-C panic=abort`.](https://github.com/rust-lang/rust/pull/103786/)
415
416 <a id="1.67.0-Stabilized-APIs"></a>
417
418 Stabilized APIs
419 ---------------
420
421 - [`{integer}::checked_ilog`](https://doc.rust-lang.org/stable/std/primitive.i32.html#method.checked_ilog)
422 - [`{integer}::checked_ilog2`](https://doc.rust-lang.org/stable/std/primitive.i32.html#method.checked_ilog2)
423 - [`{integer}::checked_ilog10`](https://doc.rust-lang.org/stable/std/primitive.i32.html#method.checked_ilog10)
424 - [`{integer}::ilog`](https://doc.rust-lang.org/stable/std/primitive.i32.html#method.ilog)
425 - [`{integer}::ilog2`](https://doc.rust-lang.org/stable/std/primitive.i32.html#method.ilog2)
426 - [`{integer}::ilog10`](https://doc.rust-lang.org/stable/std/primitive.i32.html#method.ilog10)
427 - [`NonZeroU*::ilog2`](https://doc.rust-lang.org/stable/std/num/struct.NonZeroU32.html#method.ilog2)
428 - [`NonZeroU*::ilog10`](https://doc.rust-lang.org/stable/std/num/struct.NonZeroU32.html#method.ilog10)
429 - [`NonZero*::BITS`](https://doc.rust-lang.org/stable/std/num/struct.NonZeroU32.html#associatedconstant.BITS)
430
431 These APIs are now stable in const contexts:
432
433 - [`char::from_u32`](https://doc.rust-lang.org/stable/std/primitive.char.html#method.from_u32)
434 - [`char::from_digit`](https://doc.rust-lang.org/stable/std/primitive.char.html#method.from_digit)
435 - [`char::to_digit`](https://doc.rust-lang.org/stable/std/primitive.char.html#method.to_digit)
436 - [`core::char::from_u32`](https://doc.rust-lang.org/stable/core/char/fn.from_u32.html)
437 - [`core::char::from_digit`](https://doc.rust-lang.org/stable/core/char/fn.from_digit.html)
438
439 <a id="1.67.0-Compatibility-Notes"></a>
440
441 Compatibility Notes
442 -------------------
443
444 - [The layout of `repr(Rust)` types now groups m\*2^n-sized fields with
445 equivalently aligned ones.](https://github.com/rust-lang/rust/pull/102750/)
446 This is intended to be an optimization, but it is also known to increase type
447 sizes in a few cases for the placement of enum tags. As a reminder, the layout
448 of `repr(Rust)` types is an implementation detail, subject to change.
449 - [0.5 now rounds to 0 when formatted to 0 decimal places.](https://github.com/rust-lang/rust/pull/102935/)
450 This makes it consistent with the rest of floating point formatting that
451 rounds ties toward even digits.
452 - [Chains of `&&` and `||` will now drop temporaries from their sub-expressions in
453 evaluation order, left-to-right.](https://github.com/rust-lang/rust/pull/103293/)
454 Previously, it was "twisted" such that the _first_ expression dropped its
455 temporaries _last_, after all of the other expressions dropped in order.
456 - [Underscore suffixes on string literals are now a hard error.](https://github.com/rust-lang/rust/pull/103914/)
457 This has been a future-compatibility warning since 1.20.0.
458 - [Stop passing `-export-dynamic` to `wasm-ld`.](https://github.com/rust-lang/rust/pull/105405/)
459 - [`main` is now mangled as `__main_void` on `wasm32-wasi`.](https://github.com/rust-lang/rust/pull/105468/)
460 - [Cargo now emits an error if there are multiple registries in the configuration
461 with the same index URL.](https://github.com/rust-lang/cargo/pull/10592)
462
463 <a id="1.67.0-Internal-Changes"></a>
464
465 Internal Changes
466 ----------------
467
468 These changes do not affect any public interfaces of Rust, but they represent
469 significant improvements to the performance or internals of rustc and related
470 tools.
471
472 - [Rewrite LLVM's archive writer in Rust.](https://github.com/rust-lang/rust/pull/97485/)
473
474 Version 1.66.1 (2023-01-10)
475 ===========================
476
477 - Added validation of SSH host keys for git URLs in Cargo ([CVE-2022-46176](https://www.cve.org/CVERecord?id=CVE-2022-46176))
478
479 Version 1.66.0 (2022-12-15)
480 ==========================
481
482 Language
483 --------
484 - [Permit specifying explicit discriminants on all `repr(Int)` enums](https://github.com/rust-lang/rust/pull/95710/)
485 ```rust
486 #[repr(u8)]
487 enum Foo {
488 A(u8) = 0,
489 B(i8) = 1,
490 C(bool) = 42,
491 }
492 ```
493 - [Allow transmutes between the same type differing only in lifetimes](https://github.com/rust-lang/rust/pull/101520/)
494 - [Change constant evaluation errors from a deny-by-default lint to a hard error](https://github.com/rust-lang/rust/pull/102091/)
495 - [Trigger `must_use` on `impl Trait` for supertraits](https://github.com/rust-lang/rust/pull/102287/)
496 This makes `impl ExactSizeIterator` respect the existing `#[must_use]` annotation on `Iterator`.
497 - [Allow `..=X` in patterns](https://github.com/rust-lang/rust/pull/102275/)
498 - [Uplift `clippy::for_loops_over_fallibles` lint into rustc](https://github.com/rust-lang/rust/pull/99696/)
499 - [Stabilize `sym` operands in inline assembly](https://github.com/rust-lang/rust/pull/103168/)
500 - [Update to Unicode 15](https://github.com/rust-lang/rust/pull/101912/)
501 - [Opaque types no longer imply lifetime bounds](https://github.com/rust-lang/rust/pull/95474/)
502 This is a soundness fix which may break code that was erroneously relying on this behavior.
503
504 Compiler
505 --------
506 - [Add armv5te-none-eabi and thumbv5te-none-eabi tier 3 targets](https://github.com/rust-lang/rust/pull/101329/)
507 - Refer to Rust's [platform support page][platform-support-doc] for more
508 information on Rust's tiered platform support.
509 - [Add support for linking against macOS universal libraries](https://github.com/rust-lang/rust/pull/98736)
510
511 Libraries
512 ---------
513 - [Fix `#[derive(Default)]` on a generic `#[default]` enum adding unnecessary `Default` bounds](https://github.com/rust-lang/rust/pull/101040/)
514 - [Update to Unicode 15](https://github.com/rust-lang/rust/pull/101821/)
515
516 Stabilized APIs
517 ---------------
518
519 - [`proc_macro::Span::source_text`](https://doc.rust-lang.org/stable/proc_macro/struct.Span.html#method.source_text)
520 - [`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)
521 - [`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)
522 - [`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)
523 - [`BTreeSet::{first, last, pop_first, pop_last}`](https://doc.rust-lang.org/stable/std/collections/struct.BTreeSet.html#method.first)
524 - [`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)
525 - [Add `AsFd` implementations for stdio lock types on WASI.](https://github.com/rust-lang/rust/pull/101768/)
526 - [`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)
527 - [`core::hint::black_box`](https://doc.rust-lang.org/stable/std/hint/fn.black_box.html)
528 - [`Duration::try_from_secs_{f32,f64}`](https://doc.rust-lang.org/stable/std/time/struct.Duration.html#method.try_from_secs_f32)
529 - [`Option::unzip`](https://doc.rust-lang.org/stable/std/option/enum.Option.html#method.unzip)
530 - [`std::os::fd`](https://doc.rust-lang.org/stable/std/os/fd/index.html)
531
532
533 Rustdoc
534 -------
535
536 - [Add Rustdoc warning for invalid HTML tags in the documentation](https://github.com/rust-lang/rust/pull/101720/)
537
538 Cargo
539 -----
540
541 - [Added `cargo remove` to remove dependencies from Cargo.toml](https://doc.rust-lang.org/nightly/cargo/commands/cargo-remove.html)
542 - [`cargo publish` now waits for the new version to be downloadable before exiting](https://github.com/rust-lang/cargo/pull/11062)
543
544 See [detailed release notes](https://github.com/rust-lang/cargo/blob/master/CHANGELOG.md#cargo-166-2022-12-15) for more.
545
546 Compatibility Notes
547 -------------------
548
549 - [Only apply `ProceduralMasquerade` hack to older versions of `rental`](https://github.com/rust-lang/rust/pull/94063/)
550 - [Don't export `__heap_base` and `__data_end` on wasm32-wasi.](https://github.com/rust-lang/rust/pull/102385/)
551 - [Don't export `__wasm_init_memory` on WebAssembly.](https://github.com/rust-lang/rust/pull/102426/)
552 - [Only export `__tls_*` on wasm32-unknown-unknown.](https://github.com/rust-lang/rust/pull/102440/)
553 - [Don't link to `libresolv` in libstd on Darwin](https://github.com/rust-lang/rust/pull/102766/)
554 - [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/)
555 - [Opaque types no longer imply lifetime bounds](https://github.com/rust-lang/rust/pull/95474/)
556 This is a soundness fix which may break code that was erroneously relying on this behavior.
557 - [Make `order_dependent_trait_objects` show up in future-breakage reports](https://github.com/rust-lang/rust/pull/102635/)
558 - [Change std::process::Command spawning to default to inheriting the parent's signal mask](https://github.com/rust-lang/rust/pull/101077/)
559
560 Internal Changes
561 ----------------
562
563 These changes do not affect any public interfaces of Rust, but they represent
564 significant improvements to the performance or internals of rustc and related
565 tools.
566
567 - [Enable BOLT for LLVM compilation](https://github.com/rust-lang/rust/pull/94381/)
568 - [Enable LTO for rustc_driver.so](https://github.com/rust-lang/rust/pull/101403/)
569
570 Version 1.65.0 (2022-11-03)
571 ==========================
572
573 Language
574 --------
575 - [Error on `as` casts of enums with `#[non_exhaustive]` variants](https://github.com/rust-lang/rust/pull/92744/)
576 - [Stabilize `let else`](https://github.com/rust-lang/rust/pull/93628/)
577 - [Stabilize generic associated types (GATs)](https://github.com/rust-lang/rust/pull/96709/)
578 - [Add lints `let_underscore_drop` and `let_underscore_lock` from Clippy](https://github.com/rust-lang/rust/pull/97739/)
579 - [Stabilize `break`ing from arbitrary labeled blocks ("label-break-value")](https://github.com/rust-lang/rust/pull/99332/)
580 - [Uninitialized integers, floats, and raw pointers are now considered immediate UB](https://github.com/rust-lang/rust/pull/98919/).
581 Usage of `MaybeUninit` is the correct way to work with uninitialized memory.
582 - [Stabilize raw-dylib for Windows x86_64, aarch64, and thumbv7a](https://github.com/rust-lang/rust/pull/99916/)
583 - [Do not allow `Drop` impl on foreign ADTs](https://github.com/rust-lang/rust/pull/99576/)
584
585 Compiler
586 --------
587 - [Stabilize -Csplit-debuginfo on Linux](https://github.com/rust-lang/rust/pull/98051/)
588 - [Use niche-filling optimization even when multiple variants have data](https://github.com/rust-lang/rust/pull/94075/)
589 - [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)
590 - [Stringify non-shorthand visibility correctly](https://github.com/rust-lang/rust/pull/100350/)
591 - [Normalize struct field types when unsizing](https://github.com/rust-lang/rust/pull/101831/)
592 - [Update to LLVM 15](https://github.com/rust-lang/rust/pull/99464/)
593 - [Fix aarch64 call abi to correctly zeroext when needed](https://github.com/rust-lang/rust/pull/97800/)
594 - [debuginfo: Generalize C++-like encoding for enums](https://github.com/rust-lang/rust/pull/98393/)
595 - [Add `special_module_name` lint](https://github.com/rust-lang/rust/pull/94467/)
596 - [Add support for generating unique profraw files by default when using `-C instrument-coverage`](https://github.com/rust-lang/rust/pull/100384/)
597 - [Allow dynamic linking for iOS/tvOS targets](https://github.com/rust-lang/rust/pull/100636/)
598
599 New targets:
600
601 - [Add armv4t-none-eabi as a tier 3 target](https://github.com/rust-lang/rust/pull/100244/)
602 - [Add powerpc64-unknown-openbsd and riscv64-unknown-openbsd as tier 3 targets](https://github.com/rust-lang/rust/pull/101025/)
603 - Refer to Rust's [platform support page][platform-support-doc] for more
604 information on Rust's tiered platform support.
605
606 Libraries
607 ---------
608
609 - [Don't generate `PartialEq::ne` in derive(PartialEq)](https://github.com/rust-lang/rust/pull/98655/)
610 - [Windows RNG: Use `BCRYPT_RNG_ALG_HANDLE` by default](https://github.com/rust-lang/rust/pull/101325/)
611 - [Forbid mixing `System` with direct system allocator calls](https://github.com/rust-lang/rust/pull/101394/)
612 - [Document no support for writing to non-blocking stdio/stderr](https://github.com/rust-lang/rust/pull/101416/)
613 - [`std::layout::Layout` size must not overflow `isize::MAX` when rounded up to `align`](https://github.com/rust-lang/rust/pull/95295)
614 This also changes the safety conditions on `Layout::from_size_align_unchecked`.
615
616 Stabilized APIs
617 ---------------
618
619 - [`std::backtrace::Backtrace`](https://doc.rust-lang.org/stable/std/backtrace/struct.Backtrace.html)
620 - [`Bound::as_ref`](https://doc.rust-lang.org/stable/std/ops/enum.Bound.html#method.as_ref)
621 - [`std::io::read_to_string`](https://doc.rust-lang.org/stable/std/io/fn.read_to_string.html)
622 - [`<*const T>::cast_mut`](https://doc.rust-lang.org/stable/std/primitive.pointer.html#method.cast_mut)
623 - [`<*mut T>::cast_const`](https://doc.rust-lang.org/stable/std/primitive.pointer.html#method.cast_const)
624
625 These APIs are now stable in const contexts:
626
627 - [`<*const T>::offset_from`](https://doc.rust-lang.org/stable/std/primitive.pointer.html#method.offset_from)
628 - [`<*mut T>::offset_from`](https://doc.rust-lang.org/stable/std/primitive.pointer.html#method.offset_from)
629
630 Cargo
631 -----
632
633 - [Apply GitHub fast path even for partial hashes](https://github.com/rust-lang/cargo/pull/10807/)
634 - [Do not add home bin path to PATH if it's already there](https://github.com/rust-lang/cargo/pull/11023/)
635 - [Take priority into account within the pending queue](https://github.com/rust-lang/cargo/pull/11032/).
636 This slightly optimizes job scheduling by Cargo, with typically small improvements on larger crate graph builds.
637
638 Compatibility Notes
639 -------------------
640
641 - [`std::layout::Layout` size must not overflow `isize::MAX` when rounded up to `align`](https://github.com/rust-lang/rust/pull/95295).
642 This also changes the safety conditions on `Layout::from_size_align_unchecked`.
643 - [`PollFn` now only implements `Unpin` if the closure is `Unpin`](https://github.com/rust-lang/rust/pull/102737).
644 This is a possible breaking change if users were relying on the blanket unpin implementation.
645 See discussion on the PR for details of why this change was made.
646 - [Drop ExactSizeIterator impl from std::char::EscapeAscii](https://github.com/rust-lang/rust/pull/99880)
647 This is a backwards-incompatible change to the standard library's surface
648 area, but is unlikely to affect real world usage.
649 - [Do not consider a single repeated lifetime eligible for elision in the return type](https://github.com/rust-lang/rust/pull/103450)
650 This behavior was unintentionally changed in 1.64.0, and this release reverts that change by making this an error again.
651 - [Reenable disabled early syntax gates as future-incompatibility lints](https://github.com/rust-lang/rust/pull/99935/)
652 - [Update the minimum external LLVM to 13](https://github.com/rust-lang/rust/pull/100460/)
653 - [Don't duplicate file descriptors into stdio fds](https://github.com/rust-lang/rust/pull/101426/)
654 - [Sunset RLS](https://github.com/rust-lang/rust/pull/100863/)
655 - [Deny usage of `#![cfg_attr(..., crate_type = ...)]` to set the crate type](https://github.com/rust-lang/rust/pull/99784/)
656 This strengthens the forward compatibility lint deprecated_cfg_attr_crate_type_name to deny.
657 - [`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)
658 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.
659 - 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].
660
661 [102754]: https://github.com/rust-lang/rust/issues/102754
662
663 Internal Changes
664 ----------------
665
666 These changes do not affect any public interfaces of Rust, but they represent
667 significant improvements to the performance or internals of rustc and related
668 tools.
669
670 - [Add `x.sh` and `x.ps1` shell scripts](https://github.com/rust-lang/rust/pull/99992/)
671 - [compiletest: use target cfg instead of hard-coded tables](https://github.com/rust-lang/rust/pull/100260/)
672 - [Use object instead of LLVM for reading bitcode from rlibs](https://github.com/rust-lang/rust/pull/98100/)
673 - [Enable MIR inlining for optimized compilations](https://github.com/rust-lang/rust/pull/91743)
674 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).
675
676 Version 1.64.0 (2022-09-22)
677 ===========================
678
679 Language
680 --------
681 - [Unions with mutable references or tuples of allowed types are now allowed](https://github.com/rust-lang/rust/pull/97995/)
682 - 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/)
683 - 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.
684
685 Compiler
686 --------
687 - [Add Nintendo Switch as tier 3 target](https://github.com/rust-lang/rust/pull/88991/)
688 - Refer to Rust's [platform support page][platform-support-doc] for more
689 information on Rust's tiered platform support.
690 - [Only compile `#[used]` as llvm.compiler.used for ELF targets](https://github.com/rust-lang/rust/pull/93718/)
691 - [Add the `--diagnostic-width` compiler flag to define the terminal width.](https://github.com/rust-lang/rust/pull/95635/)
692 - [Add support for link-flavor `rust-lld` for iOS, tvOS and watchOS](https://github.com/rust-lang/rust/pull/98771/)
693
694 Libraries
695 ---------
696 - [Remove restrictions on compare-exchange memory ordering.](https://github.com/rust-lang/rust/pull/98383/)
697 - You can now `write!` or `writeln!` into an `OsString`: [Implement `fmt::Write` for `OsString`](https://github.com/rust-lang/rust/pull/97915/)
698 - [Make RwLockReadGuard covariant](https://github.com/rust-lang/rust/pull/96820/)
699 - [Implement `FusedIterator` for `std::net::[Into]Incoming`](https://github.com/rust-lang/rust/pull/97300/)
700 - [`impl<T: AsRawFd> AsRawFd for {Arc,Box}<T>`](https://github.com/rust-lang/rust/pull/97437/)
701 - [`ptr::copy` and `ptr::swap` are doing untyped copies](https://github.com/rust-lang/rust/pull/97712/)
702 - [Add cgroupv1 support to `available_parallelism`](https://github.com/rust-lang/rust/pull/97925/)
703 - [Mitigate many incorrect uses of `mem::uninitialized`](https://github.com/rust-lang/rust/pull/99182/)
704
705 Stabilized APIs
706 ---------------
707
708 - [`future::IntoFuture`](https://doc.rust-lang.org/stable/std/future/trait.IntoFuture.html)
709 - [`future::poll_fn`](https://doc.rust-lang.org/stable/std/future/fn.poll_fn.html)
710 - [`task::ready!`](https://doc.rust-lang.org/stable/std/task/macro.ready.html)
711 - [`num::NonZero*::checked_mul`](https://doc.rust-lang.org/stable/std/num/struct.NonZeroUsize.html#method.checked_mul)
712 - [`num::NonZero*::checked_pow`](https://doc.rust-lang.org/stable/std/num/struct.NonZeroUsize.html#method.checked_pow)
713 - [`num::NonZero*::saturating_mul`](https://doc.rust-lang.org/stable/std/num/struct.NonZeroUsize.html#method.saturating_mul)
714 - [`num::NonZero*::saturating_pow`](https://doc.rust-lang.org/stable/std/num/struct.NonZeroUsize.html#method.saturating_pow)
715 - [`num::NonZeroI*::abs`](https://doc.rust-lang.org/stable/std/num/struct.NonZeroIsize.html#method.abs)
716 - [`num::NonZeroI*::checked_abs`](https://doc.rust-lang.org/stable/std/num/struct.NonZeroIsize.html#method.checked_abs)
717 - [`num::NonZeroI*::overflowing_abs`](https://doc.rust-lang.org/stable/std/num/struct.NonZeroIsize.html#method.overflowing_abs)
718 - [`num::NonZeroI*::saturating_abs`](https://doc.rust-lang.org/stable/std/num/struct.NonZeroIsize.html#method.saturating_abs)
719 - [`num::NonZeroI*::unsigned_abs`](https://doc.rust-lang.org/stable/std/num/struct.NonZeroIsize.html#method.unsigned_abs)
720 - [`num::NonZeroI*::wrapping_abs`](https://doc.rust-lang.org/stable/std/num/struct.NonZeroIsize.html#method.wrapping_abs)
721 - [`num::NonZeroU*::checked_add`](https://doc.rust-lang.org/stable/std/num/struct.NonZeroUsize.html#method.checked_add)
722 - [`num::NonZeroU*::checked_next_power_of_two`](https://doc.rust-lang.org/stable/std/num/struct.NonZeroUsize.html#method.checked_next_power_of_two)
723 - [`num::NonZeroU*::saturating_add`](https://doc.rust-lang.org/stable/std/num/struct.NonZeroUsize.html#method.saturating_add)
724 - [`os::unix::process::CommandExt::process_group`](https://doc.rust-lang.org/stable/std/os/unix/process/trait.CommandExt.html#tymethod.process_group)
725 - [`os::windows::fs::FileTypeExt::is_symlink_dir`](https://doc.rust-lang.org/stable/std/os/windows/fs/trait.FileTypeExt.html#tymethod.is_symlink_dir)
726 - [`os::windows::fs::FileTypeExt::is_symlink_file`](https://doc.rust-lang.org/stable/std/os/windows/fs/trait.FileTypeExt.html#tymethod.is_symlink_file)
727
728 These types were previously stable in `std::ffi`, but are now also available in `core` and `alloc`:
729
730 - [`core::ffi::CStr`](https://doc.rust-lang.org/stable/core/ffi/struct.CStr.html)
731 - [`core::ffi::FromBytesWithNulError`](https://doc.rust-lang.org/stable/core/ffi/struct.FromBytesWithNulError.html)
732 - [`alloc::ffi::CString`](https://doc.rust-lang.org/stable/alloc/ffi/struct.CString.html)
733 - [`alloc::ffi::FromVecWithNulError`](https://doc.rust-lang.org/stable/alloc/ffi/struct.FromVecWithNulError.html)
734 - [`alloc::ffi::IntoStringError`](https://doc.rust-lang.org/stable/alloc/ffi/struct.IntoStringError.html)
735 - [`alloc::ffi::NulError`](https://doc.rust-lang.org/stable/alloc/ffi/struct.NulError.html)
736
737 These types were previously stable in `std::os::raw`, but are now also available in `core::ffi` and `std::ffi`:
738
739 - [`ffi::c_char`](https://doc.rust-lang.org/stable/std/ffi/type.c_char.html)
740 - [`ffi::c_double`](https://doc.rust-lang.org/stable/std/ffi/type.c_double.html)
741 - [`ffi::c_float`](https://doc.rust-lang.org/stable/std/ffi/type.c_float.html)
742 - [`ffi::c_int`](https://doc.rust-lang.org/stable/std/ffi/type.c_int.html)
743 - [`ffi::c_long`](https://doc.rust-lang.org/stable/std/ffi/type.c_long.html)
744 - [`ffi::c_longlong`](https://doc.rust-lang.org/stable/std/ffi/type.c_longlong.html)
745 - [`ffi::c_schar`](https://doc.rust-lang.org/stable/std/ffi/type.c_schar.html)
746 - [`ffi::c_short`](https://doc.rust-lang.org/stable/std/ffi/type.c_short.html)
747 - [`ffi::c_uchar`](https://doc.rust-lang.org/stable/std/ffi/type.c_uchar.html)
748 - [`ffi::c_uint`](https://doc.rust-lang.org/stable/std/ffi/type.c_uint.html)
749 - [`ffi::c_ulong`](https://doc.rust-lang.org/stable/std/ffi/type.c_ulong.html)
750 - [`ffi::c_ulonglong`](https://doc.rust-lang.org/stable/std/ffi/type.c_ulonglong.html)
751 - [`ffi::c_ushort`](https://doc.rust-lang.org/stable/std/ffi/type.c_ushort.html)
752
753 These APIs are now usable in const contexts:
754
755 - [`slice::from_raw_parts`](https://doc.rust-lang.org/stable/core/slice/fn.from_raw_parts.html)
756
757 Cargo
758 -----
759 - [Packages can now inherit settings from the workspace so that the settings
760 can be centralized in one place.](https://github.com/rust-lang/cargo/pull/10859) See
761 [`workspace.package`](https://doc.rust-lang.org/nightly/cargo/reference/workspaces.html#the-workspacepackage-table)
762 and
763 [`workspace.dependencies`](https://doc.rust-lang.org/nightly/cargo/reference/workspaces.html#the-workspacedependencies-table)
764 for more details on how to define these common settings.
765 - [Cargo commands can now accept multiple `--target` flags to build for
766 multiple targets at once](https://github.com/rust-lang/cargo/pull/10766), and the
767 [`build.target`](https://doc.rust-lang.org/nightly/cargo/reference/config.html#buildtarget)
768 config option may now take an array of multiple targets.
769 - [The `--jobs` argument can now take a negative number to count backwards from
770 the max CPUs.](https://github.com/rust-lang/cargo/pull/10844)
771 - [`cargo add` will now update `Cargo.lock`.](https://github.com/rust-lang/cargo/pull/10902)
772 - [Added](https://github.com/rust-lang/cargo/pull/10838) the
773 [`--crate-type`](https://doc.rust-lang.org/nightly/cargo/commands/cargo-rustc.html#option-cargo-rustc---crate-type)
774 flag to `cargo rustc` to override the crate type.
775 - [Significantly improved the performance fetching git dependencies from GitHub
776 when using a hash in the `rev` field.](https://github.com/rust-lang/cargo/pull/10079)
777
778 Misc
779 ----
780 - [The `rust-analyzer` rustup component is now available on the stable channel.](https://github.com/rust-lang/rust/pull/98640/)
781
782 Compatibility Notes
783 -------------------
784 - 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/)
785 - [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.
786 - [Add assertion that `transmute_copy`'s `U` is not larger than `T`](https://github.com/rust-lang/rust/pull/98839/)
787 - [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.
788 - [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.
789 - [Relate late-bound closure lifetimes to parent fn in NLL](https://github.com/rust-lang/rust/pull/98835/)
790 - [Errors at const-eval time are now in future incompatibility reports](https://github.com/rust-lang/rust/pull/97743/)
791 - 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/).
792 - [`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.
793
794 Internal Changes
795 ----------------
796
797 These changes do not affect any public interfaces of Rust, but they represent
798 significant improvements to the performance or internals of rustc and related
799 tools.
800
801 - 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/)
802 - [Stop keeping metadata in memory before writing it to disk](https://github.com/rust-lang/rust/pull/96544/)
803 - [compiletest: strip debuginfo by default for mode=ui](https://github.com/rust-lang/rust/pull/98140/)
804 - Many improvements to generated code for derives, including performance improvements:
805 - [Don't use match-destructuring for derived ops on structs.](https://github.com/rust-lang/rust/pull/98446/)
806 - [Many small deriving cleanups](https://github.com/rust-lang/rust/pull/98741/)
807 - [More derive output improvements](https://github.com/rust-lang/rust/pull/98758/)
808 - [Clarify deriving code](https://github.com/rust-lang/rust/pull/98915/)
809 - [Final derive output improvements](https://github.com/rust-lang/rust/pull/99046/)
810 - [Stop injecting `#[allow(unused_qualifications)]` in generated `derive` implementations](https://github.com/rust-lang/rust/pull/99485/)
811 - [Improve `derive(Debug)`](https://github.com/rust-lang/rust/pull/98190/)
812 - [Bump to clap 3](https://github.com/rust-lang/rust/pull/98213/)
813 - [fully move dropck to mir](https://github.com/rust-lang/rust/pull/98641/)
814 - [Optimize `Vec::insert` for the case where `index == len`.](https://github.com/rust-lang/rust/pull/98755/)
815 - [Convert rust-analyzer to an in-tree tool](https://github.com/rust-lang/rust/pull/99603/)
816
817 Version 1.63.0 (2022-08-11)
818 ==========================
819
820 Language
821 --------
822 - [Remove migrate borrowck mode for pre-NLL errors.][95565]
823 - [Modify MIR building to drop repeat expressions with length zero.][95953]
824 - [Remove label/lifetime shadowing warnings.][96296]
825 - [Allow explicit generic arguments in the presence of `impl Trait` args.][96868]
826 - [Make `cenum_impl_drop_cast` warnings deny-by-default.][97652]
827 - [Prevent unwinding when `-C panic=abort` is used regardless of declared ABI.][96959]
828 - [lub: don't bail out due to empty binders.][97867]
829
830 Compiler
831 --------
832 - [Stabilize the `bundle` native library modifier,][95818] also removing the
833 deprecated `static-nobundle` linking kind.
834 - [Add Apple WatchOS compile targets\*.][95243]
835 - [Add a Windows application manifest to rustc-main.][96737]
836
837 \* Refer to Rust's [platform support page][platform-support-doc] for more
838 information on Rust's tiered platform support.
839
840 Libraries
841 ---------
842 - [Implement `Copy`, `Clone`, `PartialEq` and `Eq` for `core::fmt::Alignment`.][94530]
843 - [Extend `ptr::null` and `null_mut` to all thin (including extern) types.][94954]
844 - [`impl Read and Write for VecDeque<u8>`.][95632]
845 - [STD support for the Nintendo 3DS.][95897]
846 - [Use rounding in float to Duration conversion methods.][96051]
847 - [Make write/print macros eagerly drop temporaries.][96455]
848 - [Implement internal traits that enable `[OsStr]::join`.][96881]
849 - [Implement `Hash` for `core::alloc::Layout`.][97034]
850 - [Add capacity documentation for `OsString`.][97202]
851 - [Put a bound on collection misbehavior.][97316]
852 - [Make `std::mem::needs_drop` accept `?Sized`.][97675]
853 - [`impl Termination for Infallible` and then make the `Result` impls of `Termination` more generic.][97803]
854 - [Document Rust's stance on `/proc/self/mem`.][97837]
855
856 Stabilized APIs
857 ---------------
858
859 - [`array::from_fn`]
860 - [`Box::into_pin`]
861 - [`BinaryHeap::try_reserve`]
862 - [`BinaryHeap::try_reserve_exact`]
863 - [`OsString::try_reserve`]
864 - [`OsString::try_reserve_exact`]
865 - [`PathBuf::try_reserve`]
866 - [`PathBuf::try_reserve_exact`]
867 - [`Path::try_exists`]
868 - [`Ref::filter_map`]
869 - [`RefMut::filter_map`]
870 - [`NonNull::<[T]>::len`][`NonNull::<slice>::len`]
871 - [`ToOwned::clone_into`]
872 - [`Ipv6Addr::to_ipv4_mapped`]
873 - [`unix::io::AsFd`]
874 - [`unix::io::BorrowedFd<'fd>`]
875 - [`unix::io::OwnedFd`]
876 - [`windows::io::AsHandle`]
877 - [`windows::io::BorrowedHandle<'handle>`]
878 - [`windows::io::OwnedHandle`]
879 - [`windows::io::HandleOrInvalid`]
880 - [`windows::io::HandleOrNull`]
881 - [`windows::io::InvalidHandleError`]
882 - [`windows::io::NullHandleError`]
883 - [`windows::io::AsSocket`]
884 - [`windows::io::BorrowedSocket<'handle>`]
885 - [`windows::io::OwnedSocket`]
886 - [`thread::scope`]
887 - [`thread::Scope`]
888 - [`thread::ScopedJoinHandle`]
889
890 These APIs are now usable in const contexts:
891
892 - [`array::from_ref`]
893 - [`slice::from_ref`]
894 - [`intrinsics::copy`]
895 - [`intrinsics::copy_nonoverlapping`]
896 - [`<*const T>::copy_to`]
897 - [`<*const T>::copy_to_nonoverlapping`]
898 - [`<*mut T>::copy_to`]
899 - [`<*mut T>::copy_to_nonoverlapping`]
900 - [`<*mut T>::copy_from`]
901 - [`<*mut T>::copy_from_nonoverlapping`]
902 - [`str::from_utf8`]
903 - [`Utf8Error::error_len`]
904 - [`Utf8Error::valid_up_to`]
905 - [`Condvar::new`]
906 - [`Mutex::new`]
907 - [`RwLock::new`]
908
909 Cargo
910 -----
911 - [Stabilize the `--config path` command-line argument.][cargo/10755]
912 - [Expose rust-version in the environment as `CARGO_PKG_RUST_VERSION`.][cargo/10713]
913
914 Compatibility Notes
915 -------------------
916
917 - [`#[link]` attributes are now checked more strictly,][96885] which may introduce
918 errors for invalid attribute arguments that were previously ignored.
919 - [Rounding is now used when converting a float to a `Duration`.][96051] The converted
920 duration can differ slightly from what it was.
921
922 Internal Changes
923 ----------------
924
925 These changes provide no direct user facing benefits, but represent significant
926 improvements to the internals and overall performance of rustc
927 and related tools.
928
929 - [Prepare Rust for LLVM opaque pointers.][94214]
930
931 [94214]: https://github.com/rust-lang/rust/pull/94214/
932 [94530]: https://github.com/rust-lang/rust/pull/94530/
933 [94954]: https://github.com/rust-lang/rust/pull/94954/
934 [95243]: https://github.com/rust-lang/rust/pull/95243/
935 [95565]: https://github.com/rust-lang/rust/pull/95565/
936 [95632]: https://github.com/rust-lang/rust/pull/95632/
937 [95818]: https://github.com/rust-lang/rust/pull/95818/
938 [95897]: https://github.com/rust-lang/rust/pull/95897/
939 [95953]: https://github.com/rust-lang/rust/pull/95953/
940 [96051]: https://github.com/rust-lang/rust/pull/96051/
941 [96296]: https://github.com/rust-lang/rust/pull/96296/
942 [96455]: https://github.com/rust-lang/rust/pull/96455/
943 [96737]: https://github.com/rust-lang/rust/pull/96737/
944 [96868]: https://github.com/rust-lang/rust/pull/96868/
945 [96881]: https://github.com/rust-lang/rust/pull/96881/
946 [96885]: https://github.com/rust-lang/rust/pull/96885/
947 [96959]: https://github.com/rust-lang/rust/pull/96959/
948 [97034]: https://github.com/rust-lang/rust/pull/97034/
949 [97202]: https://github.com/rust-lang/rust/pull/97202/
950 [97316]: https://github.com/rust-lang/rust/pull/97316/
951 [97652]: https://github.com/rust-lang/rust/pull/97652/
952 [97675]: https://github.com/rust-lang/rust/pull/97675/
953 [97803]: https://github.com/rust-lang/rust/pull/97803/
954 [97837]: https://github.com/rust-lang/rust/pull/97837/
955 [97867]: https://github.com/rust-lang/rust/pull/97867/
956 [cargo/10713]: https://github.com/rust-lang/cargo/pull/10713/
957 [cargo/10755]: https://github.com/rust-lang/cargo/pull/10755/
958
959 [`array::from_fn`]: https://doc.rust-lang.org/stable/std/array/fn.from_fn.html
960 [`Box::into_pin`]: https://doc.rust-lang.org/stable/std/boxed/struct.Box.html#method.into_pin
961 [`BinaryHeap::try_reserve_exact`]: https://doc.rust-lang.org/stable/alloc/collections/binary_heap/struct.BinaryHeap.html#method.try_reserve_exact
962 [`BinaryHeap::try_reserve`]: https://doc.rust-lang.org/stable/std/collections/struct.BinaryHeap.html#method.try_reserve
963 [`OsString::try_reserve`]: https://doc.rust-lang.org/stable/std/ffi/struct.OsString.html#method.try_reserve
964 [`OsString::try_reserve_exact`]: https://doc.rust-lang.org/stable/std/ffi/struct.OsString.html#method.try_reserve_exact
965 [`PathBuf::try_reserve`]: https://doc.rust-lang.org/stable/std/path/struct.PathBuf.html#method.try_reserve
966 [`PathBuf::try_reserve_exact`]: https://doc.rust-lang.org/stable/std/path/struct.PathBuf.html#method.try_reserve_exact
967 [`Path::try_exists`]: https://doc.rust-lang.org/stable/std/path/struct.Path.html#method.try_exists
968 [`Ref::filter_map`]: https://doc.rust-lang.org/stable/std/cell/struct.Ref.html#method.filter_map
969 [`RefMut::filter_map`]: https://doc.rust-lang.org/stable/std/cell/struct.RefMut.html#method.filter_map
970 [`NonNull::<slice>::len`]: https://doc.rust-lang.org/stable/std/ptr/struct.NonNull.html#method.len
971 [`ToOwned::clone_into`]: https://doc.rust-lang.org/stable/std/borrow/trait.ToOwned.html#method.clone_into
972 [`Ipv6Addr::to_ipv4_mapped`]: https://doc.rust-lang.org/stable/std/net/struct.Ipv6Addr.html#method.to_ipv4_mapped
973 [`unix::io::AsFd`]: https://doc.rust-lang.org/stable/std/os/unix/io/trait.AsFd.html
974 [`unix::io::BorrowedFd<'fd>`]: https://doc.rust-lang.org/stable/std/os/unix/io/struct.BorrowedFd.html
975 [`unix::io::OwnedFd`]: https://doc.rust-lang.org/stable/std/os/unix/io/struct.OwnedFd.html
976 [`windows::io::AsHandle`]: https://doc.rust-lang.org/stable/std/os/windows/io/trait.AsHandle.html
977 [`windows::io::BorrowedHandle<'handle>`]: https://doc.rust-lang.org/stable/std/os/windows/io/struct.BorrowedHandle.html
978 [`windows::io::OwnedHandle`]: https://doc.rust-lang.org/stable/std/os/windows/io/struct.OwnedHandle.html
979 [`windows::io::HandleOrInvalid`]: https://doc.rust-lang.org/stable/std/os/windows/io/struct.HandleOrInvalid.html
980 [`windows::io::HandleOrNull`]: https://doc.rust-lang.org/stable/std/os/windows/io/struct.HandleOrNull.html
981 [`windows::io::InvalidHandleError`]: https://doc.rust-lang.org/stable/std/os/windows/io/struct.InvalidHandleError.html
982 [`windows::io::NullHandleError`]: https://doc.rust-lang.org/stable/std/os/windows/io/struct.NullHandleError.html
983 [`windows::io::AsSocket`]: https://doc.rust-lang.org/stable/std/os/windows/io/trait.AsSocket.html
984 [`windows::io::BorrowedSocket<'handle>`]: https://doc.rust-lang.org/stable/std/os/windows/io/struct.BorrowedSocket.html
985 [`windows::io::OwnedSocket`]: https://doc.rust-lang.org/stable/std/os/windows/io/struct.OwnedSocket.html
986 [`thread::scope`]: https://doc.rust-lang.org/stable/std/thread/fn.scope.html
987 [`thread::Scope`]: https://doc.rust-lang.org/stable/std/thread/struct.Scope.html
988 [`thread::ScopedJoinHandle`]: https://doc.rust-lang.org/stable/std/thread/struct.ScopedJoinHandle.html
989
990 [`array::from_ref`]: https://doc.rust-lang.org/stable/std/array/fn.from_ref.html
991 [`slice::from_ref`]: https://doc.rust-lang.org/stable/std/slice/fn.from_ref.html
992 [`intrinsics::copy`]: https://doc.rust-lang.org/stable/std/intrinsics/fn.copy.html
993 [`intrinsics::copy_nonoverlapping`]: https://doc.rust-lang.org/stable/std/intrinsics/fn.copy_nonoverlapping.html
994 [`<*const T>::copy_to`]: https://doc.rust-lang.org/stable/std/primitive.pointer.html#method.copy_to
995 [`<*const T>::copy_to_nonoverlapping`]: https://doc.rust-lang.org/stable/std/primitive.pointer.html#method.copy_to_nonoverlapping
996 [`<*mut T>::copy_to`]: https://doc.rust-lang.org/stable/std/primitive.pointer.html#method.copy_to-1
997 [`<*mut T>::copy_to_nonoverlapping`]: https://doc.rust-lang.org/stable/std/primitive.pointer.html#method.copy_to_nonoverlapping-1
998 [`<*mut T>::copy_from`]: https://doc.rust-lang.org/stable/std/primitive.pointer.html#method.copy_from
999 [`<*mut T>::copy_from_nonoverlapping`]: https://doc.rust-lang.org/stable/std/primitive.pointer.html#method.copy_from_nonoverlapping
1000 [`str::from_utf8`]: https://doc.rust-lang.org/stable/std/str/fn.from_utf8.html
1001 [`Utf8Error::error_len`]: https://doc.rust-lang.org/stable/std/str/struct.Utf8Error.html#method.error_len
1002 [`Utf8Error::valid_up_to`]: https://doc.rust-lang.org/stable/std/str/struct.Utf8Error.html#method.valid_up_to
1003 [`Condvar::new`]: https://doc.rust-lang.org/stable/std/sync/struct.Condvar.html#method.new
1004 [`Mutex::new`]: https://doc.rust-lang.org/stable/std/sync/struct.Mutex.html#method.new
1005 [`RwLock::new`]: https://doc.rust-lang.org/stable/std/sync/struct.RwLock.html#method.new
1006
1007 Version 1.62.1 (2022-07-19)
1008 ==========================
1009
1010 Rust 1.62.1 addresses a few recent regressions in the compiler and standard
1011 library, and also mitigates a CPU vulnerability on Intel SGX.
1012
1013 * [The compiler fixed unsound function coercions involving `impl Trait` return types.][98608]
1014 * [The compiler fixed an incremental compilation bug with `async fn` lifetimes.][98890]
1015 * [Windows added a fallback for overlapped I/O in synchronous reads and writes.][98950]
1016 * [The `x86_64-fortanix-unknown-sgx` target added a mitigation for the
1017 MMIO stale data vulnerability][98126], advisory [INTEL-SA-00615].
1018
1019 [98608]: https://github.com/rust-lang/rust/issues/98608
1020 [98890]: https://github.com/rust-lang/rust/issues/98890
1021 [98950]: https://github.com/rust-lang/rust/pull/98950
1022 [98126]: https://github.com/rust-lang/rust/pull/98126
1023 [INTEL-SA-00615]: https://www.intel.com/content/www/us/en/security-center/advisory/intel-sa-00615.html
1024
1025 Version 1.62.0 (2022-06-30)
1026 ==========================
1027
1028 Language
1029 --------
1030
1031 - [Stabilize `#[derive(Default)]` on enums with a `#[default]` variant][94457]
1032 - [Teach flow sensitive checks that visibly uninhabited call expressions never return][93313]
1033 - [Fix constants not getting dropped if part of a diverging expression][94775]
1034 - [Support unit struct/enum variant in destructuring assignment][95380]
1035 - [Remove mutable_borrow_reservation_conflict lint and allow the code pattern][96268]
1036 - [`const` functions may now specify `extern "C"` or `extern "Rust"`][95346]
1037
1038 Compiler
1039 --------
1040
1041 - [linker: Stop using whole-archive on dependencies of dylibs][96436]
1042 - [Make `unaligned_references` lint deny-by-default][95372]
1043 This lint is also a future compatibility lint, and is expected to eventually
1044 become a hard error.
1045 - [Only add codegen backend to dep info if -Zbinary-dep-depinfo is used][93969]
1046 - [Reject `#[thread_local]` attribute on non-static items][95006]
1047 - [Add tier 3 `aarch64-pc-windows-gnullvm` and `x86_64-pc-windows-gnullvm` targets\*][94872]
1048 - [Implement a lint to warn about unused macro rules][96150]
1049 - [Promote `x86_64-unknown-none` target to Tier 2\*][95705]
1050
1051 \* Refer to Rust's [platform support page][platform-support-doc] for more
1052 information on Rust's tiered platform support.
1053
1054 Libraries
1055 ---------
1056
1057 - [Windows: Use a pipe relay for chaining pipes][95841]
1058 - [Replace Linux Mutex and Condvar with futex based ones.][95035]
1059 - [Replace RwLock by a futex based one on Linux][95801]
1060 - [std: directly use pthread in UNIX parker implementation][96393]
1061
1062 Stabilized APIs
1063 ---------------
1064
1065 - [`bool::then_some`]
1066 - [`f32::total_cmp`]
1067 - [`f64::total_cmp`]
1068 - [`Stdin::lines`]
1069 - [`windows::CommandExt::raw_arg`]
1070 - [`impl<T: Default> Default for AssertUnwindSafe<T>`]
1071 - [`From<Rc<str>> for Rc<[u8]>`][rc-u8-from-str]
1072 - [`From<Arc<str>> for Arc<[u8]>`][arc-u8-from-str]
1073 - [`FusedIterator for EncodeWide`]
1074 - [RDM intrinsics on aarch64][stdarch/1285]
1075
1076 Clippy
1077 ------
1078
1079 - [Create clippy lint against unexpectedly late drop for temporaries in match scrutinee expressions][94206]
1080
1081 Cargo
1082 -----
1083
1084 - Added the `cargo add` command for adding dependencies to `Cargo.toml` from
1085 the command-line.
1086 [docs](https://doc.rust-lang.org/nightly/cargo/commands/cargo-add.html)
1087 - Package ID specs now support `name@version` syntax in addition to the
1088 previous `name:version` to align with the behavior in `cargo add` and other
1089 tools. `cargo install` and `cargo yank` also now support this syntax so the
1090 version does not need to passed as a separate flag.
1091 - The `git` and `registry` directories in Cargo's home directory (usually
1092 `~/.cargo`) are now marked as cache directories so that they are not
1093 included in backups or content indexing (on Windows).
1094 - Added automatic `@` argfile support, which will use "response files" if the
1095 command-line to `rustc` exceeds the operating system's limit.
1096
1097 Compatibility Notes
1098 -------------------
1099
1100 - `cargo test` now passes `--target` to `rustdoc` if the specified target is
1101 the same as the host target.
1102 [#10594](https://github.com/rust-lang/cargo/pull/10594)
1103 - [rustdoc: doctests are now run on unexported `macro_rules!` macros, matching other private items][96630]
1104 - [rustdoc: Remove .woff font files][96279]
1105 - [Enforce Copy bounds for repeat elements while considering lifetimes][95819]
1106 - [Windows: Fix potential unsoundness by aborting if `File` reads or writes cannot
1107 complete synchronously][95469].
1108
1109 Internal Changes
1110 ----------------
1111
1112 - [Unify ReentrantMutex implementations across all platforms][96042]
1113
1114 These changes provide no direct user facing benefits, but represent significant
1115 improvements to the internals and overall performance of rustc
1116 and related tools.
1117
1118 [93313]: https://github.com/rust-lang/rust/pull/93313/
1119 [93969]: https://github.com/rust-lang/rust/pull/93969/
1120 [94206]: https://github.com/rust-lang/rust/pull/94206/
1121 [94457]: https://github.com/rust-lang/rust/pull/94457/
1122 [94775]: https://github.com/rust-lang/rust/pull/94775/
1123 [94872]: https://github.com/rust-lang/rust/pull/94872/
1124 [95006]: https://github.com/rust-lang/rust/pull/95006/
1125 [95035]: https://github.com/rust-lang/rust/pull/95035/
1126 [95346]: https://github.com/rust-lang/rust/pull/95346/
1127 [95372]: https://github.com/rust-lang/rust/pull/95372/
1128 [95380]: https://github.com/rust-lang/rust/pull/95380/
1129 [95431]: https://github.com/rust-lang/rust/pull/95431/
1130 [95469]: https://github.com/rust-lang/rust/pull/95469/
1131 [95705]: https://github.com/rust-lang/rust/pull/95705/
1132 [95801]: https://github.com/rust-lang/rust/pull/95801/
1133 [95819]: https://github.com/rust-lang/rust/pull/95819/
1134 [95841]: https://github.com/rust-lang/rust/pull/95841/
1135 [96042]: https://github.com/rust-lang/rust/pull/96042/
1136 [96150]: https://github.com/rust-lang/rust/pull/96150/
1137 [96268]: https://github.com/rust-lang/rust/pull/96268/
1138 [96279]: https://github.com/rust-lang/rust/pull/96279/
1139 [96393]: https://github.com/rust-lang/rust/pull/96393/
1140 [96436]: https://github.com/rust-lang/rust/pull/96436/
1141 [96557]: https://github.com/rust-lang/rust/pull/96557/
1142 [96630]: https://github.com/rust-lang/rust/pull/96630/
1143
1144 [`bool::then_some`]: https://doc.rust-lang.org/stable/std/primitive.bool.html#method.then_some
1145 [`f32::total_cmp`]: https://doc.rust-lang.org/stable/std/primitive.f32.html#method.total_cmp
1146 [`f64::total_cmp`]: https://doc.rust-lang.org/stable/std/primitive.f64.html#method.total_cmp
1147 [`Stdin::lines`]: https://doc.rust-lang.org/stable/std/io/struct.Stdin.html#method.lines
1148 [`impl<T: Default> Default for AssertUnwindSafe<T>`]: https://doc.rust-lang.org/stable/std/panic/struct.AssertUnwindSafe.html#impl-Default
1149 [rc-u8-from-str]: https://doc.rust-lang.org/stable/std/rc/struct.Rc.html#impl-From%3CRc%3Cstr%3E%3E
1150 [arc-u8-from-str]: https://doc.rust-lang.org/stable/std/sync/struct.Arc.html#impl-From%3CArc%3Cstr%3E%3E
1151 [stdarch/1285]: https://github.com/rust-lang/stdarch/pull/1285
1152 [`windows::CommandExt::raw_arg`]: https://doc.rust-lang.org/stable/std/os/windows/process/trait.CommandExt.html#tymethod.raw_arg
1153 [`FusedIterator for EncodeWide`]: https://doc.rust-lang.org/stable/std/os/windows/ffi/struct.EncodeWide.html#impl-FusedIterator
1154
1155 Version 1.61.0 (2022-05-19)
1156 ==========================
1157
1158 Language
1159 --------
1160
1161 - [`const fn` signatures can now include generic trait bounds][93827]
1162 - [`const fn` signatures can now use `impl Trait` in argument and return position][93827]
1163 - [Function pointers can now be created, cast, and passed around in a `const fn`][93827]
1164 - [Recursive calls can now set the value of a function's opaque `impl Trait` return type][94081]
1165
1166 Compiler
1167 --------
1168
1169 - [Linking modifier syntax in `#[link]` attributes and on the command line, as well as the `whole-archive` modifier specifically, are now supported][93901]
1170 - [The `char` type is now described as UTF-32 in debuginfo][89887]
1171 - The [`#[target_feature]`][target_feature] attribute [can now be used with aarch64 features][90621]
1172 - X86 [`#[target_feature = "adx"]` is now stable][93745]
1173
1174 Libraries
1175 ---------
1176
1177 - [`ManuallyDrop<T>` is now documented to have the same layout as `T`][88375]
1178 - [`#[ignore = "…"]` messages are printed when running tests][92714]
1179 - [Consistently show absent stdio handles on Windows as NULL handles][93263]
1180 - [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.
1181 - [`Vec::from_raw_parts` is now less restrictive about its inputs][95016]
1182 - [`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.
1183
1184 Stabilized APIs
1185 ---------------
1186
1187 - [`Pin::static_mut`]
1188 - [`Pin::static_ref`]
1189 - [`Vec::retain_mut`]
1190 - [`VecDeque::retain_mut`]
1191 - [`Write` for `Cursor<[u8; N]>`][cursor-write-array]
1192 - [`std::os::unix::net::SocketAddr::from_pathname`]
1193 - [`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.
1194 - [`std::thread::JoinHandle::is_finished`]
1195
1196 These APIs are now usable in const contexts:
1197
1198 - [`<*const T>::offset` and `<*mut T>::offset`][ptr-offset]
1199 - [`<*const T>::wrapping_offset` and `<*mut T>::wrapping_offset`][ptr-wrapping_offset]
1200 - [`<*const T>::add` and `<*mut T>::add`][ptr-add]
1201 - [`<*const T>::sub` and `<*mut T>::sub`][ptr-sub]
1202 - [`<*const T>::wrapping_add` and `<*mut T>::wrapping_add`][ptr-wrapping_add]
1203 - [`<*const T>::wrapping_sub` and `<*mut T>::wrapping_sub`][ptr-wrapping_sub]
1204 - [`<[T]>::as_mut_ptr`][slice-as_mut_ptr]
1205 - [`<[T]>::as_ptr_range`][slice-as_ptr_range]
1206 - [`<[T]>::as_mut_ptr_range`][slice-as_mut_ptr_range]
1207
1208 Cargo
1209 -----
1210
1211 No feature changes, but see compatibility notes.
1212
1213 Compatibility Notes
1214 -------------------
1215
1216 - 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
1217 - (more common) either be reordered to respect dependencies between them (if `a` depends on `b` then `a` should go first and `b` second)
1218 - (less common) or be updated to use the [`+whole-archive`] modifier.
1219 - [Catching a second unwind from FFI code while cleaning up from a Rust panic now causes the process to abort][92911]
1220 - [Proc macros no longer see `ident` matchers wrapped in groups][92472]
1221 - [The number of `#` in `r#` raw string literals is now required to be less than 256][95251]
1222 - [When checking that a dyn type satisfies a trait bound, supertrait bounds are now enforced][92285]
1223 - [`cargo vendor` now only accepts one value for each `--sync` flag][cargo/10448]
1224 - [`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`.
1225 - [bootstrap: static-libstdcpp is now enabled by default, and can now be disabled when llvm-tools is enabled][94832]
1226
1227 Internal Changes
1228 ----------------
1229
1230 These changes provide no direct user facing benefits, but represent significant
1231 improvements to the internals and overall performance of rustc
1232 and related tools.
1233
1234 - [debuginfo: Refactor debuginfo generation for types][94261]
1235 - [Remove the everybody loops pass][93913]
1236
1237 [88375]: https://github.com/rust-lang/rust/pull/88375/
1238 [89887]: https://github.com/rust-lang/rust/pull/89887/
1239 [90621]: https://github.com/rust-lang/rust/pull/90621/
1240 [92285]: https://github.com/rust-lang/rust/pull/92285/
1241 [92472]: https://github.com/rust-lang/rust/pull/92472/
1242 [92697]: https://github.com/rust-lang/rust/pull/92697/
1243 [92714]: https://github.com/rust-lang/rust/pull/92714/
1244 [92911]: https://github.com/rust-lang/rust/pull/92911/
1245 [93263]: https://github.com/rust-lang/rust/pull/93263/
1246 [93745]: https://github.com/rust-lang/rust/pull/93745/
1247 [93827]: https://github.com/rust-lang/rust/pull/93827/
1248 [93901]: https://github.com/rust-lang/rust/pull/93901/
1249 [93913]: https://github.com/rust-lang/rust/pull/93913/
1250 [93965]: https://github.com/rust-lang/rust/pull/93965/
1251 [94081]: https://github.com/rust-lang/rust/pull/94081/
1252 [94261]: https://github.com/rust-lang/rust/pull/94261/
1253 [94295]: https://github.com/rust-lang/rust/pull/94295/
1254 [94832]: https://github.com/rust-lang/rust/pull/94832/
1255 [95016]: https://github.com/rust-lang/rust/pull/95016/
1256 [95251]: https://github.com/rust-lang/rust/pull/95251/
1257 [`+whole-archive`]: https://doc.rust-lang.org/stable/rustc/command-line-arguments.html#linking-modifiers-whole-archive
1258 [`Pin::static_mut`]: https://doc.rust-lang.org/stable/std/pin/struct.Pin.html#method.static_mut
1259 [`Pin::static_ref`]: https://doc.rust-lang.org/stable/std/pin/struct.Pin.html#method.static_ref
1260 [`Vec::retain_mut`]: https://doc.rust-lang.org/stable/std/vec/struct.Vec.html#method.retain_mut
1261 [`VecDeque::retain_mut`]: https://doc.rust-lang.org/stable/std/collections/struct.VecDeque.html#method.retain_mut
1262 [`std::os::unix::net::SocketAddr::from_pathname`]: https://doc.rust-lang.org/stable/std/os/unix/net/struct.SocketAddr.html#method.from_pathname
1263 [`std::process::ExitCode`]: https://doc.rust-lang.org/stable/std/process/struct.ExitCode.html
1264 [`std::process::Termination`]: https://doc.rust-lang.org/stable/std/process/trait.Termination.html
1265 [`std::thread::JoinHandle::is_finished`]: https://doc.rust-lang.org/stable/std/thread/struct.JoinHandle.html#method.is_finished
1266 [cargo/10448]: https://github.com/rust-lang/cargo/pull/10448/
1267 [cursor-write-array]: https://doc.rust-lang.org/stable/std/io/struct.Cursor.html#impl-Write-4
1268 [link-attr]: https://doc.rust-lang.org/stable/reference/items/external-blocks.html#the-link-attribute
1269 [ptr-add]: https://doc.rust-lang.org/stable/std/primitive.pointer.html#method.add
1270 [ptr-offset]: https://doc.rust-lang.org/stable/std/primitive.pointer.html#method.offset
1271 [ptr-sub]: https://doc.rust-lang.org/stable/std/primitive.pointer.html#method.sub
1272 [ptr-wrapping_add]: https://doc.rust-lang.org/stable/std/primitive.pointer.html#method.wrapping_add
1273 [ptr-wrapping_offset]: https://doc.rust-lang.org/stable/std/primitive.pointer.html#method.wrapping_offset
1274 [ptr-wrapping_sub]: https://doc.rust-lang.org/stable/std/primitive.pointer.html#method.wrapping_sub
1275 [slice-as_mut_ptr]: https://doc.rust-lang.org/stable/std/primitive.slice.html#method.as_mut_ptr
1276 [slice-as_mut_ptr_range]: https://doc.rust-lang.org/stable/std/primitive.slice.html#method.as_mut_ptr_range
1277 [slice-as_ptr_range]: https://doc.rust-lang.org/stable/std/primitive.slice.html#method.as_ptr_range
1278 [target_feature]: https://doc.rust-lang.org/reference/attributes/codegen.html#the-target_feature-attribute
1279
1280
1281 Version 1.60.0 (2022-04-07)
1282 ==========================
1283
1284 Language
1285 --------
1286 - [Stabilize `#[cfg(panic = "...")]` for either `"unwind"` or `"abort"`.][93658]
1287 - [Stabilize `#[cfg(target_has_atomic = "...")]` for each integer size and `"ptr"`.][93824]
1288
1289 Compiler
1290 --------
1291 - [Enable combining `+crt-static` and `relocation-model=pic` on `x86_64-unknown-linux-gnu`][86374]
1292 - [Fixes wrong `unreachable_pub` lints on nested and glob public reexport][87487]
1293 - [Stabilize `-Z instrument-coverage` as `-C instrument-coverage`][90132]
1294 - [Stabilize `-Z print-link-args` as `--print link-args`][91606]
1295 - [Add new Tier 3 target `mips64-openwrt-linux-musl`\*][92300]
1296 - [Add new Tier 3 target `armv7-unknown-linux-uclibceabi` (softfloat)\*][92383]
1297 - [Fix invalid removal of newlines from doc comments][92357]
1298 - [Add kernel target for RustyHermit][92670]
1299 - [Deny mixing bin crate type with lib crate types][92933]
1300 - [Make rustc use `RUST_BACKTRACE=full` by default][93566]
1301 - [Upgrade to LLVM 14][93577]
1302
1303 \* Refer to Rust's [platform support page][platform-support-doc] for more
1304 information on Rust's tiered platform support.
1305
1306 Libraries
1307 ---------
1308 - [Guarantee call order for `sort_by_cached_key`][89621]
1309 - [Improve `Duration::try_from_secs_f32`/`f64` accuracy by directly processing exponent and mantissa][90247]
1310 - [Make `Instant::{duration_since, elapsed, sub}` saturating][89926]
1311 - [Remove non-monotonic clocks workarounds in `Instant::now`][89926]
1312 - [Make `BuildHasherDefault`, `iter::Empty` and `future::Pending` covariant][92630]
1313
1314 Stabilized APIs
1315 ---------------
1316 - [`Arc::new_cyclic`][arc_new_cyclic]
1317 - [`Rc::new_cyclic`][rc_new_cyclic]
1318 - [`slice::EscapeAscii`][slice_escape_ascii]
1319 - [`<[u8]>::escape_ascii`][slice_u8_escape_ascii]
1320 - [`u8::escape_ascii`][u8_escape_ascii]
1321 - [`Vec::spare_capacity_mut`][vec_spare_capacity_mut]
1322 - [`MaybeUninit::assume_init_drop`][assume_init_drop]
1323 - [`MaybeUninit::assume_init_read`][assume_init_read]
1324 - [`i8::abs_diff`][i8_abs_diff]
1325 - [`i16::abs_diff`][i16_abs_diff]
1326 - [`i32::abs_diff`][i32_abs_diff]
1327 - [`i64::abs_diff`][i64_abs_diff]
1328 - [`i128::abs_diff`][i128_abs_diff]
1329 - [`isize::abs_diff`][isize_abs_diff]
1330 - [`u8::abs_diff`][u8_abs_diff]
1331 - [`u16::abs_diff`][u16_abs_diff]
1332 - [`u32::abs_diff`][u32_abs_diff]
1333 - [`u64::abs_diff`][u64_abs_diff]
1334 - [`u128::abs_diff`][u128_abs_diff]
1335 - [`usize::abs_diff`][usize_abs_diff]
1336 - [`Display for io::ErrorKind`][display_error_kind]
1337 - [`From<u8> for ExitCode`][from_u8_exit_code]
1338 - [`Not for !` (the "never" type)][not_never]
1339 - [_Op_`Assign<$t> for Wrapping<$t>`][wrapping_assign_ops]
1340 - [`arch::is_aarch64_feature_detected!`][is_aarch64_feature_detected]
1341
1342 Cargo
1343 -----
1344 - [Port cargo from `toml-rs` to `toml_edit`][cargo/10086]
1345 - [Stabilize `-Ztimings` as `--timings`][cargo/10245]
1346 - [Stabilize namespaced and weak dependency features.][cargo/10269]
1347 - [Accept more `cargo:rustc-link-arg-*` types from build script output.][cargo/10274]
1348 - [cargo-new should not add ignore rule on Cargo.lock inside subdirs][cargo/10379]
1349
1350 Misc
1351 ----
1352 - [Ship docs on Tier 2 platforms by reusing the closest Tier 1 platform docs][92800]
1353 - [Drop rustc-docs from complete profile][93742]
1354 - [bootstrap: tidy up flag handling for llvm build][93918]
1355
1356 Compatibility Notes
1357 -------------------
1358 - [Remove compiler-rt linking hack on Android][83822]
1359 - [Mitigations for platforms with non-monotonic clocks have been removed from
1360 `Instant::now`][89926]. On platforms that don't provide monotonic clocks, an
1361 instant is not guaranteed to be greater than an earlier instant anymore.
1362 - [`Instant::{duration_since, elapsed, sub}` do not panic anymore on underflow,
1363 saturating to `0` instead][89926]. In the real world the panic happened mostly
1364 on platforms with buggy monotonic clock implementations rather than catching
1365 programming errors like reversing the start and end times. Such programming
1366 errors will now results in `0` rather than a panic.
1367 - In a future release we're planning to increase the baseline requirements for
1368 the Linux kernel to version 3.2, and for glibc to version 2.17. We'd love
1369 your feedback in [PR #95026][95026].
1370
1371 Internal Changes
1372 ----------------
1373
1374 These changes provide no direct user facing benefits, but represent significant
1375 improvements to the internals and overall performance of rustc
1376 and related tools.
1377
1378 - [Switch all libraries to the 2021 edition][92068]
1379
1380 [83822]: https://github.com/rust-lang/rust/pull/83822
1381 [86374]: https://github.com/rust-lang/rust/pull/86374
1382 [87487]: https://github.com/rust-lang/rust/pull/87487
1383 [89621]: https://github.com/rust-lang/rust/pull/89621
1384 [89926]: https://github.com/rust-lang/rust/pull/89926
1385 [90132]: https://github.com/rust-lang/rust/pull/90132
1386 [90247]: https://github.com/rust-lang/rust/pull/90247
1387 [91606]: https://github.com/rust-lang/rust/pull/91606
1388 [92068]: https://github.com/rust-lang/rust/pull/92068
1389 [92300]: https://github.com/rust-lang/rust/pull/92300
1390 [92357]: https://github.com/rust-lang/rust/pull/92357
1391 [92383]: https://github.com/rust-lang/rust/pull/92383
1392 [92630]: https://github.com/rust-lang/rust/pull/92630
1393 [92670]: https://github.com/rust-lang/rust/pull/92670
1394 [92800]: https://github.com/rust-lang/rust/pull/92800
1395 [92933]: https://github.com/rust-lang/rust/pull/92933
1396 [93566]: https://github.com/rust-lang/rust/pull/93566
1397 [93577]: https://github.com/rust-lang/rust/pull/93577
1398 [93658]: https://github.com/rust-lang/rust/pull/93658
1399 [93742]: https://github.com/rust-lang/rust/pull/93742
1400 [93824]: https://github.com/rust-lang/rust/pull/93824
1401 [93918]: https://github.com/rust-lang/rust/pull/93918
1402 [95026]: https://github.com/rust-lang/rust/pull/95026
1403
1404 [cargo/10086]: https://github.com/rust-lang/cargo/pull/10086
1405 [cargo/10245]: https://github.com/rust-lang/cargo/pull/10245
1406 [cargo/10269]: https://github.com/rust-lang/cargo/pull/10269
1407 [cargo/10274]: https://github.com/rust-lang/cargo/pull/10274
1408 [cargo/10379]: https://github.com/rust-lang/cargo/pull/10379
1409
1410 [arc_new_cyclic]: https://doc.rust-lang.org/stable/std/sync/struct.Arc.html#method.new_cyclic
1411 [rc_new_cyclic]: https://doc.rust-lang.org/stable/std/rc/struct.Rc.html#method.new_cyclic
1412 [slice_escape_ascii]: https://doc.rust-lang.org/stable/std/slice/struct.EscapeAscii.html
1413 [slice_u8_escape_ascii]: https://doc.rust-lang.org/stable/std/primitive.slice.html#method.escape_ascii
1414 [u8_escape_ascii]: https://doc.rust-lang.org/stable/std/primitive.u8.html#method.escape_ascii
1415 [vec_spare_capacity_mut]: https://doc.rust-lang.org/stable/std/vec/struct.Vec.html#method.spare_capacity_mut
1416 [assume_init_drop]: https://doc.rust-lang.org/stable/std/mem/union.MaybeUninit.html#method.assume_init_drop
1417 [assume_init_read]: https://doc.rust-lang.org/stable/std/mem/union.MaybeUninit.html#method.assume_init_read
1418 [i8_abs_diff]: https://doc.rust-lang.org/stable/std/primitive.i8.html#method.abs_diff
1419 [i16_abs_diff]: https://doc.rust-lang.org/stable/std/primitive.i16.html#method.abs_diff
1420 [i32_abs_diff]: https://doc.rust-lang.org/stable/std/primitive.i32.html#method.abs_diff
1421 [i64_abs_diff]: https://doc.rust-lang.org/stable/std/primitive.i64.html#method.abs_diff
1422 [i128_abs_diff]: https://doc.rust-lang.org/stable/std/primitive.i128.html#method.abs_diff
1423 [isize_abs_diff]: https://doc.rust-lang.org/stable/std/primitive.isize.html#method.abs_diff
1424 [u8_abs_diff]: https://doc.rust-lang.org/stable/std/primitive.u8.html#method.abs_diff
1425 [u16_abs_diff]: https://doc.rust-lang.org/stable/std/primitive.u16.html#method.abs_diff
1426 [u32_abs_diff]: https://doc.rust-lang.org/stable/std/primitive.u32.html#method.abs_diff
1427 [u64_abs_diff]: https://doc.rust-lang.org/stable/std/primitive.u64.html#method.abs_diff
1428 [u128_abs_diff]: https://doc.rust-lang.org/stable/std/primitive.u128.html#method.abs_diff
1429 [usize_abs_diff]: https://doc.rust-lang.org/stable/std/primitive.usize.html#method.abs_diff
1430 [display_error_kind]: https://doc.rust-lang.org/stable/std/io/enum.ErrorKind.html#impl-Display
1431 [from_u8_exit_code]: https://doc.rust-lang.org/stable/std/process/struct.ExitCode.html#impl-From%3Cu8%3E
1432 [not_never]: https://doc.rust-lang.org/stable/std/primitive.never.html#impl-Not
1433 [wrapping_assign_ops]: https://doc.rust-lang.org/stable/std/num/struct.Wrapping.html#trait-implementations
1434 [is_aarch64_feature_detected]: https://doc.rust-lang.org/stable/std/arch/macro.is_aarch64_feature_detected.html
1435
1436 Version 1.59.0 (2022-02-24)
1437 ==========================
1438
1439 Language
1440 --------
1441
1442 - [Stabilize default arguments for const parameters and remove the ordering restriction for type and const parameters][90207]
1443 - [Stabilize destructuring assignment][90521]
1444 - [Relax private in public lint on generic bounds and where clauses of trait impls][90586]
1445 - [Stabilize asm! and global_asm! for x86, x86_64, ARM, Aarch64, and RISC-V][91728]
1446
1447 Compiler
1448 --------
1449
1450 - [Stabilize new symbol mangling format, leaving it opt-in (-Csymbol-mangling-version=v0)][90128]
1451 - [Emit LLVM optimization remarks when enabled with `-Cremark`][90833]
1452 - [Fix sparc64 ABI for aggregates with floating point members][91003]
1453 - [Warn when a `#[test]`-like built-in attribute macro is present multiple times.][91172]
1454 - [Add support for riscv64gc-unknown-freebsd][91284]
1455 - [Stabilize `-Z emit-future-incompat` as `--json future-incompat`][91535]
1456 - [Soft disable incremental compilation][94124]
1457
1458 This release disables incremental compilation, unless the user has explicitly
1459 opted in via the newly added RUSTC_FORCE_INCREMENTAL=1 environment variable.
1460 This is due to a known and relatively frequently occurring bug in incremental
1461 compilation, which causes builds to issue internal compiler errors. This
1462 particular bug is already fixed on nightly, but that fix has not yet rolled out
1463 to stable and is deemed too risky for a direct stable backport.
1464
1465 As always, we encourage users to test with nightly and report bugs so that we
1466 can track failures and fix issues earlier.
1467
1468 See [94124] for more details.
1469
1470 [94124]: https://github.com/rust-lang/rust/issues/94124
1471
1472 Libraries
1473 ---------
1474
1475 - [Remove unnecessary bounds for some Hash{Map,Set} methods][91593]
1476
1477 Stabilized APIs
1478 ---------------
1479
1480 - [`std::thread::available_parallelism`][available_parallelism]
1481 - [`Result::copied`][result-copied]
1482 - [`Result::cloned`][result-cloned]
1483 - [`arch::asm!`][asm]
1484 - [`arch::global_asm!`][global_asm]
1485 - [`ops::ControlFlow::is_break`][is_break]
1486 - [`ops::ControlFlow::is_continue`][is_continue]
1487 - [`TryFrom<char> for u8`][try_from_char_u8]
1488 - [`char::TryFromCharError`][try_from_char_err]
1489 implementing `Clone`, `Debug`, `Display`, `PartialEq`, `Copy`, `Eq`, `Error`
1490 - [`iter::zip`][zip]
1491 - [`NonZeroU8::is_power_of_two`][is_power_of_two8]
1492 - [`NonZeroU16::is_power_of_two`][is_power_of_two16]
1493 - [`NonZeroU32::is_power_of_two`][is_power_of_two32]
1494 - [`NonZeroU64::is_power_of_two`][is_power_of_two64]
1495 - [`NonZeroU128::is_power_of_two`][is_power_of_two128]
1496 - [`NonZeroUsize::is_power_of_two`][is_power_of_two_usize]
1497 - [`DoubleEndedIterator for ToLowercase`][lowercase]
1498 - [`DoubleEndedIterator for ToUppercase`][uppercase]
1499 - [`TryFrom<&mut [T]> for [T; N]`][tryfrom_ref_arr]
1500 - [`UnwindSafe for Once`][unwindsafe_once]
1501 - [`RefUnwindSafe for Once`][refunwindsafe_once]
1502 - [armv8 neon intrinsics for aarch64][stdarch/1266]
1503
1504 Const-stable:
1505
1506 - [`mem::MaybeUninit::as_ptr`][muninit_ptr]
1507 - [`mem::MaybeUninit::assume_init`][muninit_init]
1508 - [`mem::MaybeUninit::assume_init_ref`][muninit_init_ref]
1509 - [`ffi::CStr::from_bytes_with_nul_unchecked`][cstr_from_bytes]
1510
1511 Cargo
1512 -----
1513
1514 - [Stabilize the `strip` profile option][cargo/10088]
1515 - [Stabilize future-incompat-report][cargo/10165]
1516 - [Support abbreviating `--release` as `-r`][cargo/10133]
1517 - [Support `term.quiet` configuration][cargo/10152]
1518 - [Remove `--host` from cargo {publish,search,login}][cargo/10145]
1519
1520 Compatibility Notes
1521 -------------------
1522
1523 - [Refactor weak symbols in std::sys::unix][90846]
1524 This may add new, versioned, symbols when building with a newer glibc, as the
1525 standard library uses weak linkage rather than dynamically attempting to load
1526 certain symbols at runtime.
1527 - [Deprecate crate_type and crate_name nested inside `#![cfg_attr]`][83744]
1528 This adds a future compatibility lint to supporting the use of cfg_attr
1529 wrapping either crate_type or crate_name specification within Rust files;
1530 it is recommended that users migrate to setting the equivalent command line
1531 flags.
1532 - [Remove effect of `#[no_link]` attribute on name resolution][92034]
1533 This may expose new names, leading to conflicts with preexisting names in a
1534 given namespace and a compilation failure.
1535 - [Cargo will document libraries before binaries.][cargo/10172]
1536 - [Respect doc=false in dependencies, not just the root crate][cargo/10201]
1537 - [Weaken guarantee around advancing underlying iterators in zip][83791]
1538 - [Make split_inclusive() on an empty slice yield an empty output][89825]
1539 - [Update std::env::temp_dir to use GetTempPath2 on Windows when available.][89999]
1540 - [unreachable! was updated to match other formatting macro behavior on Rust 2021][92137]
1541
1542 Internal Changes
1543 ----------------
1544
1545 These changes provide no direct user facing benefits, but represent significant
1546 improvements to the internals and overall performance of rustc
1547 and related tools.
1548
1549 - [Fix many cases of normalization-related ICEs][91255]
1550 - [Replace dominators algorithm with simple Lengauer-Tarjan][85013]
1551 - [Store liveness in interval sets for region inference][90637]
1552
1553 - [Remove `in_band_lifetimes` from the compiler and standard library, in preparation for removing this
1554 unstable feature.][91867]
1555
1556 [91867]: https://github.com/rust-lang/rust/issues/91867
1557 [83744]: https://github.com/rust-lang/rust/pull/83744/
1558 [83791]: https://github.com/rust-lang/rust/pull/83791/
1559 [85013]: https://github.com/rust-lang/rust/pull/85013/
1560 [89825]: https://github.com/rust-lang/rust/pull/89825/
1561 [89999]: https://github.com/rust-lang/rust/pull/89999/
1562 [90128]: https://github.com/rust-lang/rust/pull/90128/
1563 [90207]: https://github.com/rust-lang/rust/pull/90207/
1564 [90521]: https://github.com/rust-lang/rust/pull/90521/
1565 [90586]: https://github.com/rust-lang/rust/pull/90586/
1566 [90637]: https://github.com/rust-lang/rust/pull/90637/
1567 [90833]: https://github.com/rust-lang/rust/pull/90833/
1568 [90846]: https://github.com/rust-lang/rust/pull/90846/
1569 [91003]: https://github.com/rust-lang/rust/pull/91003/
1570 [91172]: https://github.com/rust-lang/rust/pull/91172/
1571 [91255]: https://github.com/rust-lang/rust/pull/91255/
1572 [91284]: https://github.com/rust-lang/rust/pull/91284/
1573 [91535]: https://github.com/rust-lang/rust/pull/91535/
1574 [91593]: https://github.com/rust-lang/rust/pull/91593/
1575 [91728]: https://github.com/rust-lang/rust/pull/91728/
1576 [91878]: https://github.com/rust-lang/rust/pull/91878/
1577 [91896]: https://github.com/rust-lang/rust/pull/91896/
1578 [91926]: https://github.com/rust-lang/rust/pull/91926/
1579 [91984]: https://github.com/rust-lang/rust/pull/91984/
1580 [92020]: https://github.com/rust-lang/rust/pull/92020/
1581 [92034]: https://github.com/rust-lang/rust/pull/92034/
1582 [92137]: https://github.com/rust-lang/rust/pull/92137/
1583 [92483]: https://github.com/rust-lang/rust/pull/92483/
1584 [cargo/10088]: https://github.com/rust-lang/cargo/pull/10088/
1585 [cargo/10133]: https://github.com/rust-lang/cargo/pull/10133/
1586 [cargo/10145]: https://github.com/rust-lang/cargo/pull/10145/
1587 [cargo/10152]: https://github.com/rust-lang/cargo/pull/10152/
1588 [cargo/10165]: https://github.com/rust-lang/cargo/pull/10165/
1589 [cargo/10172]: https://github.com/rust-lang/cargo/pull/10172/
1590 [cargo/10201]: https://github.com/rust-lang/cargo/pull/10201/
1591 [cargo/10269]: https://github.com/rust-lang/cargo/pull/10269/
1592
1593 [cstr_from_bytes]: https://doc.rust-lang.org/stable/std/ffi/struct.CStr.html#method.from_bytes_with_nul_unchecked
1594 [muninit_ptr]: https://doc.rust-lang.org/stable/std/mem/union.MaybeUninit.html#method.as_ptr
1595 [muninit_init]: https://doc.rust-lang.org/stable/std/mem/union.MaybeUninit.html#method.assume_init
1596 [muninit_init_ref]: https://doc.rust-lang.org/stable/std/mem/union.MaybeUninit.html#method.assume_init_ref
1597 [unwindsafe_once]: https://doc.rust-lang.org/stable/std/sync/struct.Once.html#impl-UnwindSafe
1598 [refunwindsafe_once]: https://doc.rust-lang.org/stable/std/sync/struct.Once.html#impl-RefUnwindSafe
1599 [tryfrom_ref_arr]: https://doc.rust-lang.org/stable/std/convert/trait.TryFrom.html#impl-TryFrom%3C%26%27_%20mut%20%5BT%5D%3E
1600 [lowercase]: https://doc.rust-lang.org/stable/std/char/struct.ToLowercase.html#impl-DoubleEndedIterator
1601 [uppercase]: https://doc.rust-lang.org/stable/std/char/struct.ToUppercase.html#impl-DoubleEndedIterator
1602 [try_from_char_err]: https://doc.rust-lang.org/stable/std/char/struct.TryFromCharError.html
1603 [available_parallelism]: https://doc.rust-lang.org/stable/std/thread/fn.available_parallelism.html
1604 [result-copied]: https://doc.rust-lang.org/stable/std/result/enum.Result.html#method.copied
1605 [result-cloned]: https://doc.rust-lang.org/stable/std/result/enum.Result.html#method.cloned
1606 [asm]: https://doc.rust-lang.org/stable/core/arch/macro.asm.html
1607 [global_asm]: https://doc.rust-lang.org/stable/core/arch/macro.global_asm.html
1608 [is_break]: https://doc.rust-lang.org/stable/std/ops/enum.ControlFlow.html#method.is_break
1609 [is_continue]: https://doc.rust-lang.org/stable/std/ops/enum.ControlFlow.html#method.is_continue
1610 [try_from_char_u8]: https://doc.rust-lang.org/stable/std/primitive.char.html#impl-TryFrom%3Cchar%3E
1611 [zip]: https://doc.rust-lang.org/stable/std/iter/fn.zip.html
1612 [is_power_of_two8]: https://doc.rust-lang.org/stable/core/num/struct.NonZeroU8.html#method.is_power_of_two
1613 [is_power_of_two16]: https://doc.rust-lang.org/stable/core/num/struct.NonZeroU16.html#method.is_power_of_two
1614 [is_power_of_two32]: https://doc.rust-lang.org/stable/core/num/struct.NonZeroU32.html#method.is_power_of_two
1615 [is_power_of_two64]: https://doc.rust-lang.org/stable/core/num/struct.NonZeroU64.html#method.is_power_of_two
1616 [is_power_of_two128]: https://doc.rust-lang.org/stable/core/num/struct.NonZeroU128.html#method.is_power_of_two
1617 [is_power_of_two_usize]: https://doc.rust-lang.org/stable/core/num/struct.NonZeroUsize.html#method.is_power_of_two
1618 [stdarch/1266]: https://github.com/rust-lang/stdarch/pull/1266
1619
1620 Version 1.58.1 (2022-01-20)
1621 ===========================
1622
1623 * Fix race condition in `std::fs::remove_dir_all` ([CVE-2022-21658])
1624 * [Handle captured arguments in the `useless_format` Clippy lint][clippy/8295]
1625 * [Move `non_send_fields_in_send_ty` Clippy lint to nursery][clippy/8075]
1626 * [Fix wrong error message displayed when some imports are missing][91254]
1627 * [Fix rustfmt not formatting generated files from stdin][92912]
1628
1629 [CVE-2022-21658]: https://www.cve.org/CVERecord?id=CVE-2022-21658
1630 [91254]: https://github.com/rust-lang/rust/pull/91254
1631 [92912]: https://github.com/rust-lang/rust/pull/92912
1632 [clippy/8075]: https://github.com/rust-lang/rust-clippy/pull/8075
1633 [clippy/8295]: https://github.com/rust-lang/rust-clippy/pull/8295
1634
1635 Version 1.58.0 (2022-01-13)
1636 ==========================
1637
1638 Language
1639 --------
1640
1641 - [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.
1642 - [`*const T` pointers can now be dereferenced in const contexts.][89551]
1643 - [The rules for when a generic struct implements `Unsize` have been relaxed.][90417]
1644
1645 Compiler
1646 --------
1647
1648 - [Add LLVM CFI support to the Rust compiler][89652]
1649 - [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.
1650 - [Add support for LLVM coverage mapping format versions 5 and 6][91207]
1651 - [Emit LLVM optimization remarks when enabled with `-Cremark`][90833]
1652 - [Update the minimum external LLVM to 12][90175]
1653 - [Add `x86_64-unknown-none` at Tier 3*][89062]
1654 - [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.
1655 - [Don't abort compilation after giving a lint error][87337]
1656 - [Error messages point at the source of trait bound obligations in more places][89580]
1657
1658 \* Refer to Rust's [platform support page][platform-support-doc] for more
1659 information on Rust's tiered platform support.
1660
1661 Libraries
1662 ---------
1663
1664 - [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.
1665 - [Paths are automatically canonicalized on Windows for operations that support it][89174]
1666 - [Re-enable debug checks for `copy` and `copy_nonoverlapping`][90041]
1667 - [Implement `RefUnwindSafe` for `Rc<T>`][87467]
1668 - [Make RSplit<T, P>: Clone not require T: Clone][90117]
1669 - [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).
1670
1671 Stabilized APIs
1672 ---------------
1673
1674 - [`Metadata::is_symlink`]
1675 - [`Path::is_symlink`]
1676 - [`{integer}::saturating_div`]
1677 - [`Option::unwrap_unchecked`]
1678 - [`Result::unwrap_unchecked`]
1679 - [`Result::unwrap_err_unchecked`]
1680 - [`File::options`]
1681
1682 These APIs are now usable in const contexts:
1683
1684 - [`Duration::new`]
1685 - [`Duration::checked_add`]
1686 - [`Duration::saturating_add`]
1687 - [`Duration::checked_sub`]
1688 - [`Duration::saturating_sub`]
1689 - [`Duration::checked_mul`]
1690 - [`Duration::saturating_mul`]
1691 - [`Duration::checked_div`]
1692
1693 Cargo
1694 -----
1695
1696 - [Add --message-format for install command][cargo/10107]
1697 - [Warn when alias shadows external subcommand][cargo/10082]
1698
1699 Rustdoc
1700 -------
1701
1702 - [Show all Deref implementations recursively in rustdoc][90183]
1703 - [Use computed visibility in rustdoc][88447]
1704
1705 Compatibility Notes
1706 -------------------
1707
1708 - [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.
1709 - Windows: [`std::process::Command` will no longer search the current directory for executables.][87704]
1710 - [All proc-macro backward-compatibility lints are now deny-by-default.][88041]
1711 - [proc_macro: Append .0 to unsuffixed float if it would otherwise become int token][90297]
1712 - [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.
1713 - [rustdoc now rejects some unexpected semicolons in doctests][91026]
1714
1715 Internal Changes
1716 ----------------
1717
1718 These changes provide no direct user facing benefits, but represent significant
1719 improvements to the internals and overall performance of rustc
1720 and related tools.
1721
1722 - [Implement coherence checks for negative trait impls][90104]
1723 - [Add rustc lint, warning when iterating over hashmaps][89558]
1724 - [Optimize live point computation][90491]
1725 - [Enable verification for 1/32nd of queries loaded from disk][90361]
1726 - [Implement version of normalize_erasing_regions that allows for normalization failure][91255]
1727
1728 [87337]: https://github.com/rust-lang/rust/pull/87337/
1729 [87467]: https://github.com/rust-lang/rust/pull/87467/
1730 [87704]: https://github.com/rust-lang/rust/pull/87704/
1731 [88041]: https://github.com/rust-lang/rust/pull/88041/
1732 [88447]: https://github.com/rust-lang/rust/pull/88447/
1733 [88601]: https://github.com/rust-lang/rust/pull/88601/
1734 [89062]: https://github.com/rust-lang/rust/pull/89062/
1735 [89174]: https://github.com/rust-lang/rust/pull/89174/
1736 [89551]: https://github.com/rust-lang/rust/pull/89551/
1737 [89558]: https://github.com/rust-lang/rust/pull/89558/
1738 [89580]: https://github.com/rust-lang/rust/pull/89580/
1739 [89652]: https://github.com/rust-lang/rust/pull/89652/
1740 [90041]: https://github.com/rust-lang/rust/pull/90041/
1741 [90058]: https://github.com/rust-lang/rust/pull/90058/
1742 [90104]: https://github.com/rust-lang/rust/pull/90104/
1743 [90117]: https://github.com/rust-lang/rust/pull/90117/
1744 [90175]: https://github.com/rust-lang/rust/pull/90175/
1745 [90183]: https://github.com/rust-lang/rust/pull/90183/
1746 [90297]: https://github.com/rust-lang/rust/pull/90297/
1747 [90329]: https://github.com/rust-lang/rust/pull/90329/
1748 [90361]: https://github.com/rust-lang/rust/pull/90361/
1749 [90417]: https://github.com/rust-lang/rust/pull/90417/
1750 [90473]: https://github.com/rust-lang/rust/pull/90473/
1751 [90491]: https://github.com/rust-lang/rust/pull/90491/
1752 [90733]: https://github.com/rust-lang/rust/pull/90733/
1753 [90833]: https://github.com/rust-lang/rust/pull/90833/
1754 [90846]: https://github.com/rust-lang/rust/pull/90846/
1755 [91026]: https://github.com/rust-lang/rust/pull/91026/
1756 [91207]: https://github.com/rust-lang/rust/pull/91207/
1757 [91255]: https://github.com/rust-lang/rust/pull/91255/
1758 [cargo/10082]: https://github.com/rust-lang/cargo/pull/10082/
1759 [cargo/10107]: https://github.com/rust-lang/cargo/pull/10107/
1760 [`Metadata::is_symlink`]: https://doc.rust-lang.org/stable/std/fs/struct.Metadata.html#method.is_symlink
1761 [`Path::is_symlink`]: https://doc.rust-lang.org/stable/std/path/struct.Path.html#method.is_symlink
1762 [`{integer}::saturating_div`]: https://doc.rust-lang.org/stable/std/primitive.i8.html#method.saturating_div
1763 [`Option::unwrap_unchecked`]: https://doc.rust-lang.org/stable/std/option/enum.Option.html#method.unwrap_unchecked
1764 [`Result::unwrap_unchecked`]: https://doc.rust-lang.org/stable/std/result/enum.Result.html#method.unwrap_unchecked
1765 [`Result::unwrap_err_unchecked`]: https://doc.rust-lang.org/stable/std/result/enum.Result.html#method.unwrap_err_unchecked
1766 [`File::options`]: https://doc.rust-lang.org/stable/std/fs/struct.File.html#method.options
1767 [`Duration::new`]: https://doc.rust-lang.org/stable/std/time/struct.Duration.html#method.new
1768
1769 Version 1.57.0 (2021-12-02)
1770 ==========================
1771
1772 Language
1773 --------
1774
1775 - [Macro attributes may follow `#[derive]` and will see the original (pre-`cfg`) input.][87220]
1776 - [Accept curly-brace macros in expressions, like `m!{ .. }.method()` and `m!{ .. }?`.][88690]
1777 - [Allow panicking in constant evaluation.][89508]
1778 - [Ignore derived `Clone` and `Debug` implementations during dead code analysis.][85200]
1779
1780 Compiler
1781 --------
1782
1783 - [Create more accurate debuginfo for vtables.][89597]
1784 - [Add `armv6k-nintendo-3ds` at Tier 3\*.][88529]
1785 - [Add `armv7-unknown-linux-uclibceabihf` at Tier 3\*.][88952]
1786 - [Add `m68k-unknown-linux-gnu` at Tier 3\*.][88321]
1787 - [Add SOLID targets at Tier 3\*:][86191] `aarch64-kmc-solid_asp3`, `armv7a-kmc-solid_asp3-eabi`, `armv7a-kmc-solid_asp3-eabihf`
1788
1789 \* Refer to Rust's [platform support page][platform-support-doc] for more
1790 information on Rust's tiered platform support.
1791
1792 Libraries
1793 ---------
1794
1795 - [Avoid allocations and copying in `Vec::leak`][89337]
1796 - [Add `#[repr(i8)]` to `Ordering`][89507]
1797 - [Optimize `File::read_to_end` and `read_to_string`][89582]
1798 - [Update to Unicode 14.0][89614]
1799 - [Many more functions are marked `#[must_use]`][89692], producing a warning
1800 when ignoring their return value. This helps catch mistakes such as expecting
1801 a function to mutate a value in place rather than return a new value.
1802
1803 Stabilised APIs
1804 ---------------
1805
1806 - [`[T; N]::as_mut_slice`][`array::as_mut_slice`]
1807 - [`[T; N]::as_slice`][`array::as_slice`]
1808 - [`collections::TryReserveError`]
1809 - [`HashMap::try_reserve`]
1810 - [`HashSet::try_reserve`]
1811 - [`String::try_reserve`]
1812 - [`String::try_reserve_exact`]
1813 - [`Vec::try_reserve`]
1814 - [`Vec::try_reserve_exact`]
1815 - [`VecDeque::try_reserve`]
1816 - [`VecDeque::try_reserve_exact`]
1817 - [`Iterator::map_while`]
1818 - [`iter::MapWhile`]
1819 - [`proc_macro::is_available`]
1820 - [`Command::get_program`]
1821 - [`Command::get_args`]
1822 - [`Command::get_envs`]
1823 - [`Command::get_current_dir`]
1824 - [`CommandArgs`]
1825 - [`CommandEnvs`]
1826
1827 These APIs are now usable in const contexts:
1828
1829 - [`hint::unreachable_unchecked`]
1830
1831 Cargo
1832 -----
1833
1834 - [Stabilize custom profiles][cargo/9943]
1835
1836 Compatibility notes
1837 -------------------
1838
1839 - [Ignore derived `Clone` and `Debug` implementations during dead code analysis.][85200]
1840 This will break some builds that set `#![deny(dead_code)]`.
1841
1842 Internal changes
1843 ----------------
1844 These changes provide no direct user facing benefits, but represent significant
1845 improvements to the internals and overall performance of rustc
1846 and related tools.
1847
1848 - [Added an experimental backend for codegen with `libgccjit`.][87260]
1849
1850 [85200]: https://github.com/rust-lang/rust/pull/85200/
1851 [86191]: https://github.com/rust-lang/rust/pull/86191/
1852 [87220]: https://github.com/rust-lang/rust/pull/87220/
1853 [87260]: https://github.com/rust-lang/rust/pull/87260/
1854 [88321]: https://github.com/rust-lang/rust/pull/88321/
1855 [88529]: https://github.com/rust-lang/rust/pull/88529/
1856 [88690]: https://github.com/rust-lang/rust/pull/88690/
1857 [88952]: https://github.com/rust-lang/rust/pull/88952/
1858 [89337]: https://github.com/rust-lang/rust/pull/89337/
1859 [89507]: https://github.com/rust-lang/rust/pull/89507/
1860 [89508]: https://github.com/rust-lang/rust/pull/89508/
1861 [89582]: https://github.com/rust-lang/rust/pull/89582/
1862 [89597]: https://github.com/rust-lang/rust/pull/89597/
1863 [89614]: https://github.com/rust-lang/rust/pull/89614/
1864 [89692]: https://github.com/rust-lang/rust/issues/89692/
1865 [cargo/9943]: https://github.com/rust-lang/cargo/pull/9943/
1866 [`array::as_mut_slice`]: https://doc.rust-lang.org/std/primitive.array.html#method.as_mut_slice
1867 [`array::as_slice`]: https://doc.rust-lang.org/std/primitive.array.html#method.as_slice
1868 [`collections::TryReserveError`]: https://doc.rust-lang.org/std/collections/struct.TryReserveError.html
1869 [`HashMap::try_reserve`]: https://doc.rust-lang.org/std/collections/hash_map/struct.HashMap.html#method.try_reserve
1870 [`HashSet::try_reserve`]: https://doc.rust-lang.org/std/collections/hash_set/struct.HashSet.html#method.try_reserve
1871 [`String::try_reserve`]: https://doc.rust-lang.org/alloc/string/struct.String.html#method.try_reserve
1872 [`String::try_reserve_exact`]: https://doc.rust-lang.org/alloc/string/struct.String.html#method.try_reserve_exact
1873 [`Vec::try_reserve`]: https://doc.rust-lang.org/std/vec/struct.Vec.html#method.try_reserve
1874 [`Vec::try_reserve_exact`]: https://doc.rust-lang.org/std/vec/struct.Vec.html#method.try_reserve_exact
1875 [`VecDeque::try_reserve`]: https://doc.rust-lang.org/std/collections/struct.VecDeque.html#method.try_reserve
1876 [`VecDeque::try_reserve_exact`]: https://doc.rust-lang.org/std/collections/struct.VecDeque.html#method.try_reserve_exact
1877 [`Iterator::map_while`]: https://doc.rust-lang.org/std/iter/trait.Iterator.html#method.map_while
1878 [`iter::MapWhile`]: https://doc.rust-lang.org/std/iter/struct.MapWhile.html
1879 [`proc_macro::is_available`]: https://doc.rust-lang.org/proc_macro/fn.is_available.html
1880 [`Command::get_program`]: https://doc.rust-lang.org/std/process/struct.Command.html#method.get_program
1881 [`Command::get_args`]: https://doc.rust-lang.org/std/process/struct.Command.html#method.get_args
1882 [`Command::get_envs`]: https://doc.rust-lang.org/std/process/struct.Command.html#method.get_envs
1883 [`Command::get_current_dir`]: https://doc.rust-lang.org/std/process/struct.Command.html#method.get_current_dir
1884 [`CommandArgs`]: https://doc.rust-lang.org/std/process/struct.CommandArgs.html
1885 [`CommandEnvs`]: https://doc.rust-lang.org/std/process/struct.CommandEnvs.html
1886
1887 Version 1.56.1 (2021-11-01)
1888 ===========================
1889
1890 - New lints to detect the presence of bidirectional-override Unicode
1891 codepoints in the compiled source code ([CVE-2021-42574])
1892
1893 [CVE-2021-42574]: https://cve.mitre.org/cgi-bin/cvename.cgi?name=CVE-2021-42574
1894
1895 Version 1.56.0 (2021-10-21)
1896 ========================
1897
1898 Language
1899 --------
1900
1901 - [The 2021 Edition is now stable.][rust#88100]
1902 See [the edition guide][rust-2021-edition-guide] for more details.
1903 - [The pattern in `binding @ pattern` can now also introduce new bindings.][rust#85305]
1904 - [Union field access is permitted in `const fn`.][rust#85769]
1905
1906 [rust-2021-edition-guide]: https://doc.rust-lang.org/nightly/edition-guide/rust-2021/index.html
1907
1908 Compiler
1909 --------
1910
1911 - [Upgrade to LLVM 13.][rust#87570]
1912 - [Support memory, address, and thread sanitizers on aarch64-unknown-freebsd.][rust#88023]
1913 - [Allow specifying a deployment target version for all iOS targets][rust#87699]
1914 - [Warnings can be forced on with `--force-warn`.][rust#87472]
1915 This feature is primarily intended for usage by `cargo fix`, rather than end users.
1916 - [Promote `aarch64-apple-ios-sim` to Tier 2\*.][rust#87760]
1917 - [Add `powerpc-unknown-freebsd` at Tier 3\*.][rust#87370]
1918 - [Add `riscv32imc-esp-espidf` at Tier 3\*.][rust#87666]
1919
1920 \* Refer to Rust's [platform support page][platform-support-doc] for more
1921 information on Rust's tiered platform support.
1922
1923 Libraries
1924 ---------
1925
1926 - [Allow writing of incomplete UTF-8 sequences via stdout/stderr on Windows.][rust#83342]
1927 The Windows console still requires valid Unicode, but this change allows
1928 splitting a UTF-8 character across multiple write calls. This allows, for
1929 instance, programs that just read and write data buffers (e.g. copying a file
1930 to stdout) without regard for Unicode or character boundaries.
1931 - [Prefer `AtomicU{64,128}` over Mutex for Instant backsliding protection.][rust#83093]
1932 For this use case, atomics scale much better under contention.
1933 - [Implement `Extend<(A, B)>` for `(Extend<A>, Extend<B>)`][rust#85835]
1934 - [impl Default, Copy, Clone for std::io::Sink and std::io::Empty][rust#86744]
1935 - [`impl From<[(K, V); N]>` for all collections.][rust#84111]
1936 - [Remove `P: Unpin` bound on impl Future for Pin.][rust#81363]
1937 - [Treat invalid environment variable names as nonexistent.][rust#86183]
1938 Previously, the environment functions would panic if given a variable name
1939 with an internal null character or equal sign (`=`). Now, these functions will
1940 just treat such names as nonexistent variables, since the OS cannot represent
1941 the existence of a variable with such a name.
1942
1943 Stabilised APIs
1944 ---------------
1945
1946 - [`std::os::unix::fs::chroot`]
1947 - [`UnsafeCell::raw_get`]
1948 - [`BufWriter::into_parts`]
1949 - [`core::panic::{UnwindSafe, RefUnwindSafe, AssertUnwindSafe}`]
1950 These APIs were previously stable in `std`, but are now also available in `core`.
1951 - [`Vec::shrink_to`]
1952 - [`String::shrink_to`]
1953 - [`OsString::shrink_to`]
1954 - [`PathBuf::shrink_to`]
1955 - [`BinaryHeap::shrink_to`]
1956 - [`VecDeque::shrink_to`]
1957 - [`HashMap::shrink_to`]
1958 - [`HashSet::shrink_to`]
1959
1960 These APIs are now usable in const contexts:
1961
1962 - [`std::mem::transmute`]
1963 - [`[T]::first`][`slice::first`]
1964 - [`[T]::split_first`][`slice::split_first`]
1965 - [`[T]::last`][`slice::last`]
1966 - [`[T]::split_last`][`slice::split_last`]
1967
1968 Cargo
1969 -----
1970
1971 - [Cargo supports specifying a minimum supported Rust version in Cargo.toml.][`rust-version`]
1972 This has no effect at present on dependency version selection.
1973 We encourage crates to specify their minimum supported Rust version, and we encourage CI systems
1974 that support Rust code to include a crate's specified minimum version in the test matrix for that
1975 crate by default.
1976
1977 Compatibility notes
1978 -------------------
1979
1980 - [Update to new argument parsing rules on Windows.][rust#87580]
1981 This adjusts Rust's standard library to match the behavior of the standard
1982 libraries for C/C++. The rules have changed slightly over time, and this PR
1983 brings us to the latest set of rules (changed in 2008).
1984 - [Disallow the aapcs calling convention on aarch64][rust#88399]
1985 This was already not supported by LLVM; this change surfaces this lack of
1986 support with a better error message.
1987 - [Make `SEMICOLON_IN_EXPRESSIONS_FROM_MACROS` warn by default][rust#87385]
1988 - [Warn when an escaped newline skips multiple lines.][rust#87671]
1989 - [Calls to `libc::getpid` / `std::process::id` from `Command::pre_exec`
1990 may return different values on glibc <= 2.24.][rust#81825]
1991 Rust now invokes the `clone3` system call directly, when available, to use new functionality
1992 available via that system call. Older versions of glibc cache the result of `getpid`, and only
1993 update that cache when calling glibc's clone/fork functions, so a direct system call bypasses
1994 that cache update. glibc 2.25 and newer no longer cache `getpid` for exactly this reason.
1995
1996 Internal changes
1997 ----------------
1998 These changes provide no direct user facing benefits, but represent significant
1999 improvements to the internals and overall performance of rustc
2000 and related tools.
2001
2002 - [LLVM is compiled with PGO in published x86_64-unknown-linux-gnu artifacts.][rust#88069]
2003 This improves the performance of most Rust builds.
2004 - [Unify representation of macros in internal data structures.][rust#88019]
2005 This change fixes a host of bugs with the handling of macros by the compiler,
2006 as well as rustdoc.
2007
2008 [`std::os::unix::fs::chroot`]: https://doc.rust-lang.org/stable/std/os/unix/fs/fn.chroot.html
2009 [`UnsafeCell::raw_get`]: https://doc.rust-lang.org/stable/std/cell/struct.UnsafeCell.html#method.raw_get
2010 [`BufWriter::into_parts`]: https://doc.rust-lang.org/stable/std/io/struct.BufWriter.html#method.into_parts
2011 [`core::panic::{UnwindSafe, RefUnwindSafe, AssertUnwindSafe}`]: https://github.com/rust-lang/rust/pull/84662
2012 [`Vec::shrink_to`]: https://doc.rust-lang.org/stable/std/vec/struct.Vec.html#method.shrink_to
2013 [`String::shrink_to`]: https://doc.rust-lang.org/stable/std/string/struct.String.html#method.shrink_to
2014 [`OsString::shrink_to`]: https://doc.rust-lang.org/stable/std/ffi/struct.OsString.html#method.shrink_to
2015 [`PathBuf::shrink_to`]: https://doc.rust-lang.org/stable/std/path/struct.PathBuf.html#method.shrink_to
2016 [`BinaryHeap::shrink_to`]: https://doc.rust-lang.org/stable/std/collections/struct.BinaryHeap.html#method.shrink_to
2017 [`VecDeque::shrink_to`]: https://doc.rust-lang.org/stable/std/collections/struct.VecDeque.html#method.shrink_to
2018 [`HashMap::shrink_to`]: https://doc.rust-lang.org/stable/std/collections/hash_map/struct.HashMap.html#method.shrink_to
2019 [`HashSet::shrink_to`]: https://doc.rust-lang.org/stable/std/collections/hash_set/struct.HashSet.html#method.shrink_to
2020 [`std::mem::transmute`]: https://doc.rust-lang.org/stable/std/mem/fn.transmute.html
2021 [`slice::first`]: https://doc.rust-lang.org/stable/std/primitive.slice.html#method.first
2022 [`slice::split_first`]: https://doc.rust-lang.org/stable/std/primitive.slice.html#method.split_first
2023 [`slice::last`]: https://doc.rust-lang.org/stable/std/primitive.slice.html#method.last
2024 [`slice::split_last`]: https://doc.rust-lang.org/stable/std/primitive.slice.html#method.split_last
2025 [`rust-version`]: https://doc.rust-lang.org/nightly/cargo/reference/manifest.html#the-rust-version-field
2026 [rust#87671]: https://github.com/rust-lang/rust/pull/87671
2027 [rust#86183]: https://github.com/rust-lang/rust/pull/86183
2028 [rust#87385]: https://github.com/rust-lang/rust/pull/87385
2029 [rust#88100]: https://github.com/rust-lang/rust/pull/88100
2030 [rust#85305]: https://github.com/rust-lang/rust/pull/85305
2031 [rust#88069]: https://github.com/rust-lang/rust/pull/88069
2032 [rust#87472]: https://github.com/rust-lang/rust/pull/87472
2033 [rust#87699]: https://github.com/rust-lang/rust/pull/87699
2034 [rust#87570]: https://github.com/rust-lang/rust/pull/87570
2035 [rust#88023]: https://github.com/rust-lang/rust/pull/88023
2036 [rust#87760]: https://github.com/rust-lang/rust/pull/87760
2037 [rust#87370]: https://github.com/rust-lang/rust/pull/87370
2038 [rust#87580]: https://github.com/rust-lang/rust/pull/87580
2039 [rust#83342]: https://github.com/rust-lang/rust/pull/83342
2040 [rust#83093]: https://github.com/rust-lang/rust/pull/83093
2041 [rust#85835]: https://github.com/rust-lang/rust/pull/85835
2042 [rust#86744]: https://github.com/rust-lang/rust/pull/86744
2043 [rust#81363]: https://github.com/rust-lang/rust/pull/81363
2044 [rust#84111]: https://github.com/rust-lang/rust/pull/84111
2045 [rust#85769]: https://github.com/rust-lang/rust/pull/85769#issuecomment-854363720
2046 [rust#88399]: https://github.com/rust-lang/rust/pull/88399
2047 [rust#81825]: https://github.com/rust-lang/rust/pull/81825#issuecomment-808406918
2048 [rust#88019]: https://github.com/rust-lang/rust/pull/88019
2049 [rust#87666]: https://github.com/rust-lang/rust/pull/87666
2050
2051 Version 1.55.0 (2021-09-09)
2052 ============================
2053
2054 Language
2055 --------
2056 - [You can now write open "from" range patterns (`X..`), which will start at `X` and
2057 will end at the maximum value of the integer.][83918]
2058 - [You can now explicitly import the prelude of different editions
2059 through `std::prelude` (e.g. `use std::prelude::rust_2021::*;`).][86294]
2060
2061 Compiler
2062 --------
2063 - [Added tier 3\* support for `powerpc64le-unknown-freebsd`.][83572]
2064
2065 \* Refer to Rust's [platform support page][platform-support-doc] for more
2066 information on Rust's tiered platform support.
2067
2068 Libraries
2069 ---------
2070
2071 - [Updated std's float parsing to use the Eisel-Lemire algorithm.][86761]
2072 These improvements should in general provide faster string parsing of floats,
2073 no longer reject certain valid floating point values, and reduce
2074 the produced code size for non-stripped artifacts.
2075 - [`string::Drain` now implements `AsRef<str>` and `AsRef<[u8]>`.][86858]
2076
2077 Stabilised APIs
2078 ---------------
2079
2080 - [`Bound::cloned`]
2081 - [`Drain::as_str`]
2082 - [`IntoInnerError::into_error`]
2083 - [`IntoInnerError::into_parts`]
2084 - [`MaybeUninit::assume_init_mut`]
2085 - [`MaybeUninit::assume_init_ref`]
2086 - [`MaybeUninit::write`]
2087 - [`array::map`]
2088 - [`ops::ControlFlow`]
2089 - [`x86::_bittest`]
2090 - [`x86::_bittestandcomplement`]
2091 - [`x86::_bittestandreset`]
2092 - [`x86::_bittestandset`]
2093 - [`x86_64::_bittest64`]
2094 - [`x86_64::_bittestandcomplement64`]
2095 - [`x86_64::_bittestandreset64`]
2096 - [`x86_64::_bittestandset64`]
2097
2098 The following previously stable functions are now `const`.
2099
2100 - [`str::from_utf8_unchecked`]
2101
2102
2103 Cargo
2104 -----
2105 - [Cargo will now deduplicate compiler diagnostics to the terminal when invoking
2106 rustc in parallel such as when using `cargo test`.][cargo/9675]
2107 - [The package definition in `cargo metadata` now includes the `"default_run"`
2108 field from the manifest.][cargo/9550]
2109 - [Added `cargo d` as an alias for `cargo doc`.][cargo/9680]
2110 - [Added `{lib}` as formatting option for `cargo tree` to print the `"lib_name"`
2111 of packages.][cargo/9663]
2112
2113 Rustdoc
2114 -------
2115 - [Added "Go to item on exact match" search option.][85876]
2116 - [The "Implementors" section on traits no longer shows redundant
2117 method definitions.][85970]
2118 - [Trait implementations are toggled open by default.][86260] This should make the
2119 implementations more searchable by tools like `CTRL+F` in your browser.
2120 - [Intra-doc links should now correctly resolve associated items (e.g. methods)
2121 through type aliases.][86334]
2122 - [Traits which are marked with `#[doc(hidden)]` will no longer appear in the
2123 "Trait Implementations" section.][86513]
2124
2125
2126 Compatibility Notes
2127 -------------------
2128 - [std functions that return an `io::Error` will no longer use the
2129 `ErrorKind::Other` variant.][85746] This is to better reflect that these
2130 kinds of errors could be categorised [into newer more specific `ErrorKind`
2131 variants][79965], and that they do not represent a user error.
2132 - [Using environment variable names with `process::Command` on Windows now
2133 behaves as expected.][85270] Previously using environment variables with
2134 `Command` would cause them to be ASCII-uppercased.
2135 - [Rustdoc will now warn on using rustdoc lints that aren't prefixed
2136 with `rustdoc::`][86849]
2137 - `RUSTFLAGS` is no longer set for build scripts. Build scripts
2138 should use `CARGO_ENCODED_RUSTFLAGS` instead. See the
2139 [documentation](https://doc.rust-lang.org/nightly/cargo/reference/environment-variables.html#environment-variables-cargo-sets-for-build-scripts)
2140 for more details.
2141
2142 [86849]: https://github.com/rust-lang/rust/pull/86849
2143 [86513]: https://github.com/rust-lang/rust/pull/86513
2144 [86334]: https://github.com/rust-lang/rust/pull/86334
2145 [86260]: https://github.com/rust-lang/rust/pull/86260
2146 [85970]: https://github.com/rust-lang/rust/pull/85970
2147 [85876]: https://github.com/rust-lang/rust/pull/85876
2148 [83572]: https://github.com/rust-lang/rust/pull/83572
2149 [86294]: https://github.com/rust-lang/rust/pull/86294
2150 [86858]: https://github.com/rust-lang/rust/pull/86858
2151 [86761]: https://github.com/rust-lang/rust/pull/86761
2152 [85746]: https://github.com/rust-lang/rust/pull/85746
2153 [85270]: https://github.com/rust-lang/rust/pull/85270
2154 [83918]: https://github.com/rust-lang/rust/pull/83918
2155 [79965]: https://github.com/rust-lang/rust/pull/79965
2156 [cargo/9663]: https://github.com/rust-lang/cargo/pull/9663
2157 [cargo/9675]: https://github.com/rust-lang/cargo/pull/9675
2158 [cargo/9550]: https://github.com/rust-lang/cargo/pull/9550
2159 [cargo/9680]: https://github.com/rust-lang/cargo/pull/9680
2160 [`array::map`]: https://doc.rust-lang.org/stable/std/primitive.array.html#method.map
2161 [`Bound::cloned`]: https://doc.rust-lang.org/stable/std/ops/enum.Bound.html#method.cloned
2162 [`Drain::as_str`]: https://doc.rust-lang.org/stable/std/string/struct.Drain.html#method.as_str
2163 [`IntoInnerError::into_error`]: https://doc.rust-lang.org/stable/std/io/struct.IntoInnerError.html#method.into_error
2164 [`IntoInnerError::into_parts`]: https://doc.rust-lang.org/stable/std/io/struct.IntoInnerError.html#method.into_parts
2165 [`MaybeUninit::assume_init_mut`]: https://doc.rust-lang.org/stable/std/mem/union.MaybeUninit.html#method.assume_init_mut
2166 [`MaybeUninit::assume_init_ref`]: https://doc.rust-lang.org/stable/std/mem/union.MaybeUninit.html#method.assume_init_ref
2167 [`MaybeUninit::write`]: https://doc.rust-lang.org/stable/std/mem/union.MaybeUninit.html#method.write
2168 [`ops::ControlFlow`]: https://doc.rust-lang.org/stable/std/ops/enum.ControlFlow.html
2169 [`str::from_utf8_unchecked`]: https://doc.rust-lang.org/stable/std/str/fn.from_utf8_unchecked.html
2170 [`x86::_bittest`]: https://doc.rust-lang.org/stable/core/arch/x86/fn._bittest.html
2171 [`x86::_bittestandcomplement`]: https://doc.rust-lang.org/stable/core/arch/x86/fn._bittestandcomplement.html
2172 [`x86::_bittestandreset`]: https://doc.rust-lang.org/stable/core/arch/x86/fn._bittestandreset.html
2173 [`x86::_bittestandset`]: https://doc.rust-lang.org/stable/core/arch/x86/fn._bittestandset.html
2174 [`x86_64::_bittest64`]: https://doc.rust-lang.org/stable/core/arch/x86_64/fn._bittest64.html
2175 [`x86_64::_bittestandcomplement64`]: https://doc.rust-lang.org/stable/core/arch/x86_64/fn._bittestandcomplement64.html
2176 [`x86_64::_bittestandreset64`]: https://doc.rust-lang.org/stable/core/arch/x86_64/fn._bittestandreset64.html
2177 [`x86_64::_bittestandset64`]: https://doc.rust-lang.org/stable/core/arch/x86_64/fn._bittestandset64.html
2178
2179
2180 Version 1.54.0 (2021-07-29)
2181 ============================
2182
2183 Language
2184 -----------------------
2185
2186 - [You can now use macros for values in some built-in attributes.][83366]
2187 This primarily allows you to call macros within the `#[doc]` attribute. For
2188 example, to include external documentation in your crate, you can now write
2189 the following:
2190 ```rust
2191 #![doc = include_str!("README.md")]
2192 ```
2193
2194 - [You can now cast between unsized slice types (and types which contain
2195 unsized slices) in `const fn`.][85078]
2196 - [You can now use multiple generic lifetimes with `impl Trait` where the
2197 lifetimes don't explicitly outlive another.][84701] In code this means
2198 that you can now have `impl Trait<'a, 'b>` where as before you could
2199 only have `impl Trait<'a, 'b> where 'b: 'a`.
2200
2201 Compiler
2202 -----------------------
2203
2204 - [Rustc will now search for custom JSON targets in
2205 `/lib/rustlib/<target-triple>/target.json` where `/` is the "sysroot"
2206 directory.][83800] You can find your sysroot directory by running
2207 `rustc --print sysroot`.
2208 - [Added `wasm` as a `target_family` for WebAssembly platforms.][84072]
2209 - [You can now use `#[target_feature]` on safe functions when targeting
2210 WebAssembly platforms.][84988]
2211 - [Improved debugger output for enums on Windows MSVC platforms.][85292]
2212 - [Added tier 3\* support for `bpfel-unknown-none`
2213 and `bpfeb-unknown-none`.][79608]
2214 - [`-Zmutable-noalias=yes`][82834] is enabled by default when using LLVM 12 or above.
2215
2216 \* Refer to Rust's [platform support page][platform-support-doc] for more
2217 information on Rust's tiered platform support.
2218
2219 Libraries
2220 -----------------------
2221
2222 - [`panic::panic_any` will now `#[track_caller]`.][85745]
2223 - [Added `OutOfMemory` as a variant of `io::ErrorKind`.][84744]
2224 - [ `proc_macro::Literal` now implements `FromStr`.][84717]
2225 - [The implementations of vendor intrinsics in core::arch have been
2226 significantly refactored.][83278] The main user-visible changes are
2227 a 50% reduction in the size of libcore.rlib and stricter validation
2228 of constant operands passed to intrinsics. The latter is technically
2229 a breaking change, but allows Rust to more closely match the C vendor
2230 intrinsics API.
2231
2232 Stabilized APIs
2233 ---------------
2234
2235 - [`BTreeMap::into_keys`]
2236 - [`BTreeMap::into_values`]
2237 - [`HashMap::into_keys`]
2238 - [`HashMap::into_values`]
2239 - [`arch::wasm32`]
2240 - [`VecDeque::binary_search`]
2241 - [`VecDeque::binary_search_by`]
2242 - [`VecDeque::binary_search_by_key`]
2243 - [`VecDeque::partition_point`]
2244
2245 Cargo
2246 -----
2247
2248 - [Added the `--prune <spec>` option to `cargo-tree` to remove a package from
2249 the dependency graph.][cargo/9520]
2250 - [Added the `--depth` option to `cargo-tree` to print only to a certain depth
2251 in the tree ][cargo/9499]
2252 - [Added the `no-proc-macro` value to `cargo-tree --edges` to hide procedural
2253 macro dependencies.][cargo/9488]
2254 - [A new environment variable named `CARGO_TARGET_TMPDIR` is available.][cargo/9375]
2255 This variable points to a directory that integration tests and benches
2256 can use as a "scratchpad" for testing filesystem operations.
2257
2258 Compatibility Notes
2259 -------------------
2260 - [Mixing Option and Result via `?` is no longer permitted in closures for inferred types.][86831]
2261 - [Previously unsound code is no longer permitted where different constructors in branches
2262 could require different lifetimes.][85574]
2263 - As previously mentioned the [`std::arch` intrinsics now uses stricter const checking][83278]
2264 than before and may reject some previously accepted code.
2265 - [`i128` multiplication on Cortex M0+ platforms currently unconditionally causes overflow
2266 when compiled with `codegen-units = 1`.][86063]
2267
2268 [85574]: https://github.com/rust-lang/rust/issues/85574
2269 [86831]: https://github.com/rust-lang/rust/issues/86831
2270 [86063]: https://github.com/rust-lang/rust/issues/86063
2271 [79608]: https://github.com/rust-lang/rust/pull/79608
2272 [84988]: https://github.com/rust-lang/rust/pull/84988
2273 [84701]: https://github.com/rust-lang/rust/pull/84701
2274 [84072]: https://github.com/rust-lang/rust/pull/84072
2275 [85745]: https://github.com/rust-lang/rust/pull/85745
2276 [84744]: https://github.com/rust-lang/rust/pull/84744
2277 [85078]: https://github.com/rust-lang/rust/pull/85078
2278 [84717]: https://github.com/rust-lang/rust/pull/84717
2279 [83800]: https://github.com/rust-lang/rust/pull/83800
2280 [83366]: https://github.com/rust-lang/rust/pull/83366
2281 [83278]: https://github.com/rust-lang/rust/pull/83278
2282 [85292]: https://github.com/rust-lang/rust/pull/85292
2283 [82834]: https://github.com/rust-lang/rust/pull/82834
2284 [cargo/9520]: https://github.com/rust-lang/cargo/pull/9520
2285 [cargo/9499]: https://github.com/rust-lang/cargo/pull/9499
2286 [cargo/9488]: https://github.com/rust-lang/cargo/pull/9488
2287 [cargo/9375]: https://github.com/rust-lang/cargo/pull/9375
2288 [`BTreeMap::into_keys`]: https://doc.rust-lang.org/std/collections/struct.BTreeMap.html#method.into_keys
2289 [`BTreeMap::into_values`]: https://doc.rust-lang.org/std/collections/struct.BTreeMap.html#method.into_values
2290 [`HashMap::into_keys`]: https://doc.rust-lang.org/std/collections/struct.HashMap.html#method.into_keys
2291 [`HashMap::into_values`]: https://doc.rust-lang.org/std/collections/struct.HashMap.html#method.into_values
2292 [`arch::wasm32`]: https://doc.rust-lang.org/core/arch/wasm32/index.html
2293 [`VecDeque::binary_search`]: https://doc.rust-lang.org/std/collections/struct.VecDeque.html#method.binary_search
2294 [`VecDeque::binary_search_by`]: https://doc.rust-lang.org/std/collections/struct.VecDeque.html#method.binary_search_by
2295
2296 [`VecDeque::binary_search_by_key`]: https://doc.rust-lang.org/std/collections/struct.VecDeque.html#method.binary_search_by_key
2297
2298 [`VecDeque::partition_point`]: https://doc.rust-lang.org/std/collections/struct.VecDeque.html#method.partition_point
2299
2300 Version 1.53.0 (2021-06-17)
2301 ============================
2302
2303 Language
2304 -----------------------
2305 - [You can now use unicode for identifiers.][83799] This allows multilingual
2306 identifiers but still doesn't allow glyphs that are not considered characters
2307 such as `◆` or `🦀`. More specifically you can now use any identifier that
2308 matches the UAX #31 "Unicode Identifier and Pattern Syntax" standard. This
2309 is the same standard as languages like Python, however Rust uses NFC
2310 normalization which may be different from other languages.
2311 - [You can now specify "or patterns" inside pattern matches.][79278]
2312 Previously you could only use `|` (OR) on complete patterns. E.g.
2313 ```rust
2314 let x = Some(2u8);
2315 // Before
2316 matches!(x, Some(1) | Some(2));
2317 // Now
2318 matches!(x, Some(1 | 2));
2319 ```
2320 - [Added the `:pat_param` `macro_rules!` matcher.][83386] This matcher
2321 has the same semantics as the `:pat` matcher. This is to allow `:pat`
2322 to change semantics to being a pattern fragment in a future edition.
2323
2324 Compiler
2325 -----------------------
2326 - [Updated the minimum external LLVM version to LLVM 10.][83387]
2327 - [Added Tier 3\* support for the `wasm64-unknown-unknown` target.][80525]
2328 - [Improved debuginfo for closures and async functions on Windows MSVC.][83941]
2329
2330 \* Refer to Rust's [platform support page][platform-support-doc] for more
2331 information on Rust's tiered platform support.
2332
2333 Libraries
2334 -----------------------
2335 - [Abort messages will now forward to `android_set_abort_message` on
2336 Android platforms when available.][81469]
2337 - [`slice::IterMut<'_, T>` now implements `AsRef<[T]>`][82771]
2338 - [Arrays of any length now implement `IntoIterator`.][84147]
2339 Currently calling `.into_iter()` as a method on an array will
2340 return `impl Iterator<Item=&T>`, but this may change in a
2341 future edition to change `Item` to `T`. Calling `IntoIterator::into_iter`
2342 directly on arrays will provide `impl Iterator<Item=T>` as expected.
2343 - [`leading_zeros`, and `trailing_zeros` are now available on all
2344 `NonZero` integer types.][84082]
2345 - [`{f32, f64}::from_str` now parse and print special values
2346 (`NaN`, `-0`) according to IEEE 754.][78618]
2347 - [You can now index into slices using `(Bound<usize>, Bound<usize>)`.][77704]
2348 - [Add the `BITS` associated constant to all numeric types.][82565]
2349
2350 Stabilised APIs
2351 ---------------
2352 - [`AtomicBool::fetch_update`]
2353 - [`AtomicPtr::fetch_update`]
2354 - [`BTreeMap::retain`]
2355 - [`BTreeSet::retain`]
2356 - [`BufReader::seek_relative`]
2357 - [`DebugStruct::non_exhaustive`]
2358 - [`Duration::MAX`]
2359 - [`Duration::ZERO`]
2360 - [`Duration::is_zero`]
2361 - [`Duration::saturating_add`]
2362 - [`Duration::saturating_mul`]
2363 - [`Duration::saturating_sub`]
2364 - [`ErrorKind::Unsupported`]
2365 - [`Option::insert`]
2366 - [`Ordering::is_eq`]
2367 - [`Ordering::is_ge`]
2368 - [`Ordering::is_gt`]
2369 - [`Ordering::is_le`]
2370 - [`Ordering::is_lt`]
2371 - [`Ordering::is_ne`]
2372 - [`OsStr::is_ascii`]
2373 - [`OsStr::make_ascii_lowercase`]
2374 - [`OsStr::make_ascii_uppercase`]
2375 - [`OsStr::to_ascii_lowercase`]
2376 - [`OsStr::to_ascii_uppercase`]
2377 - [`Peekable::peek_mut`]
2378 - [`Rc::decrement_strong_count`]
2379 - [`Rc::increment_strong_count`]
2380 - [`Vec::extend_from_within`]
2381 - [`array::from_mut`]
2382 - [`array::from_ref`]
2383 - [`cmp::max_by_key`]
2384 - [`cmp::max_by`]
2385 - [`cmp::min_by_key`]
2386 - [`cmp::min_by`]
2387 - [`f32::is_subnormal`]
2388 - [`f64::is_subnormal`]
2389
2390 Cargo
2391 -----------------------
2392 - [Cargo now supports git repositories where the default `HEAD` branch is not
2393 "master".][cargo/9392] This also includes a switch to the version 3 `Cargo.lock` format
2394 which can handle default branches correctly.
2395 - [macOS targets now default to `unpacked` split-debuginfo.][cargo/9298]
2396 - [The `authors` field is no longer included in `Cargo.toml` for new
2397 projects.][cargo/9282]
2398
2399 Rustdoc
2400 -----------------------
2401 - [Added the `rustdoc::bare_urls` lint that warns when you have URLs
2402 without hyperlinks.][81764]
2403
2404 Compatibility Notes
2405 -------------------
2406 - [Implement token-based handling of attributes during expansion][82608]
2407 - [`Ipv4::from_str` will now reject octal format IP addresses in addition
2408 to rejecting hexadecimal IP addresses.][83652] The octal format can lead
2409 to confusion and potential security vulnerabilities and [is no
2410 longer recommended][ietf6943].
2411 - [The added `BITS` constant may conflict with external definitions.][85667]
2412 In particular, this was known to be a problem in the `lexical-core` crate,
2413 but they have published fixes for semantic versions 0.4 through 0.7. To
2414 update this dependency alone, use `cargo update -p lexical-core`.
2415 - Incremental compilation remains off by default, unless one uses the `RUSTC_FORCE_INCREMENTAL=1` environment variable added in 1.52.1.
2416
2417 Internal Only
2418 -------------
2419 These changes provide no direct user facing benefits, but represent significant
2420 improvements to the internals and overall performance of rustc and
2421 related tools.
2422
2423 - [Rework the `std::sys::windows::alloc` implementation.][83065]
2424 - [rustdoc: Don't enter an infer_ctxt in get_blanket_impls for impls that aren't blanket impls.][82864]
2425 - [rustdoc: Only look at blanket impls in `get_blanket_impls`][83681]
2426 - [Rework rustdoc const type][82873]
2427
2428 [85667]: https://github.com/rust-lang/rust/pull/85667
2429 [83386]: https://github.com/rust-lang/rust/pull/83386
2430 [82771]: https://github.com/rust-lang/rust/pull/82771
2431 [84147]: https://github.com/rust-lang/rust/pull/84147
2432 [84082]: https://github.com/rust-lang/rust/pull/84082
2433 [83799]: https://github.com/rust-lang/rust/pull/83799
2434 [83681]: https://github.com/rust-lang/rust/pull/83681
2435 [83652]: https://github.com/rust-lang/rust/pull/83652
2436 [83387]: https://github.com/rust-lang/rust/pull/83387
2437 [82873]: https://github.com/rust-lang/rust/pull/82873
2438 [82864]: https://github.com/rust-lang/rust/pull/82864
2439 [82608]: https://github.com/rust-lang/rust/pull/82608
2440 [82565]: https://github.com/rust-lang/rust/pull/82565
2441 [80525]: https://github.com/rust-lang/rust/pull/80525
2442 [79278]: https://github.com/rust-lang/rust/pull/79278
2443 [78618]: https://github.com/rust-lang/rust/pull/78618
2444 [77704]: https://github.com/rust-lang/rust/pull/77704
2445 [83941]: https://github.com/rust-lang/rust/pull/83941
2446 [83065]: https://github.com/rust-lang/rust/pull/83065
2447 [81764]: https://github.com/rust-lang/rust/pull/81764
2448 [81469]: https://github.com/rust-lang/rust/pull/81469
2449 [cargo/9298]: https://github.com/rust-lang/cargo/pull/9298
2450 [cargo/9282]: https://github.com/rust-lang/cargo/pull/9282
2451 [cargo/9392]: https://github.com/rust-lang/cargo/pull/9392
2452 [`AtomicBool::fetch_update`]: https://doc.rust-lang.org/std/sync/atomic/struct.AtomicBool.html#method.fetch_update
2453 [`AtomicPtr::fetch_update`]: https://doc.rust-lang.org/std/sync/atomic/struct.AtomicPtr.html#method.fetch_update
2454 [`BTreeMap::retain`]: https://doc.rust-lang.org/std/collections/struct.BTreeMap.html#method.retain
2455 [`BTreeSet::retain`]: https://doc.rust-lang.org/std/collections/struct.BTreeSet.html#method.retain
2456 [`BufReader::seek_relative`]: https://doc.rust-lang.org/std/io/struct.BufReader.html#method.seek_relative
2457 [`DebugStruct::non_exhaustive`]: https://doc.rust-lang.org/std/fmt/struct.DebugStruct.html#method.finish_non_exhaustive
2458 [`Duration::MAX`]: https://doc.rust-lang.org/std/time/struct.Duration.html#associatedconstant.MAX
2459 [`Duration::ZERO`]: https://doc.rust-lang.org/std/time/struct.Duration.html#associatedconstant.ZERO
2460 [`Duration::is_zero`]: https://doc.rust-lang.org/std/time/struct.Duration.html#method.is_zero
2461 [`Duration::saturating_add`]: https://doc.rust-lang.org/std/time/struct.Duration.html#method.saturating_add
2462 [`Duration::saturating_mul`]: https://doc.rust-lang.org/std/time/struct.Duration.html#method.saturating_mul
2463 [`Duration::saturating_sub`]: https://doc.rust-lang.org/std/time/struct.Duration.html#method.saturating_sub
2464 [`ErrorKind::Unsupported`]: https://doc.rust-lang.org/std/io/enum.ErrorKind.html#variant.Unsupported
2465 [`Option::insert`]: https://doc.rust-lang.org/std/option/enum.Option.html#method.insert
2466 [`Ordering::is_eq`]: https://doc.rust-lang.org/std/cmp/enum.Ordering.html#method.is_eq
2467 [`Ordering::is_ge`]: https://doc.rust-lang.org/std/cmp/enum.Ordering.html#method.is_ge
2468 [`Ordering::is_gt`]: https://doc.rust-lang.org/std/cmp/enum.Ordering.html#method.is_gt
2469 [`Ordering::is_le`]: https://doc.rust-lang.org/std/cmp/enum.Ordering.html#method.is_le
2470 [`Ordering::is_lt`]: https://doc.rust-lang.org/std/cmp/enum.Ordering.html#method.is_lt
2471 [`Ordering::is_ne`]: https://doc.rust-lang.org/std/cmp/enum.Ordering.html#method.is_ne
2472 [`OsStr::is_ascii`]: https://doc.rust-lang.org/std/ffi/struct.OsStr.html#method.is_ascii
2473 [`OsStr::make_ascii_lowercase`]: https://doc.rust-lang.org/std/ffi/struct.OsStr.html#method.make_ascii_lowercase
2474 [`OsStr::make_ascii_uppercase`]: https://doc.rust-lang.org/std/ffi/struct.OsStr.html#method.make_ascii_uppercase
2475 [`OsStr::to_ascii_lowercase`]: https://doc.rust-lang.org/std/ffi/struct.OsStr.html#method.to_ascii_lowercase
2476 [`OsStr::to_ascii_uppercase`]: https://doc.rust-lang.org/std/ffi/struct.OsStr.html#method.to_ascii_uppercase
2477 [`Peekable::peek_mut`]: https://doc.rust-lang.org/std/iter/struct.Peekable.html#method.peek_mut
2478 [`Rc::decrement_strong_count`]: https://doc.rust-lang.org/std/rc/struct.Rc.html#method.increment_strong_count
2479 [`Rc::increment_strong_count`]: https://doc.rust-lang.org/std/rc/struct.Rc.html#method.increment_strong_count
2480 [`Vec::extend_from_within`]: https://doc.rust-lang.org/beta/std/vec/struct.Vec.html#method.extend_from_within
2481 [`array::from_mut`]: https://doc.rust-lang.org/beta/std/array/fn.from_mut.html
2482 [`array::from_ref`]: https://doc.rust-lang.org/beta/std/array/fn.from_ref.html
2483 [`cmp::max_by_key`]: https://doc.rust-lang.org/beta/std/cmp/fn.max_by_key.html
2484 [`cmp::max_by`]: https://doc.rust-lang.org/beta/std/cmp/fn.max_by.html
2485 [`cmp::min_by_key`]: https://doc.rust-lang.org/beta/std/cmp/fn.min_by_key.html
2486 [`cmp::min_by`]: https://doc.rust-lang.org/beta/std/cmp/fn.min_by.html
2487 [`f32::is_subnormal`]: https://doc.rust-lang.org/std/primitive.f64.html#method.is_subnormal
2488 [`f64::is_subnormal`]: https://doc.rust-lang.org/std/primitive.f64.html#method.is_subnormal
2489 [ietf6943]: https://datatracker.ietf.org/doc/html/rfc6943#section-3.1.1
2490
2491
2492 Version 1.52.1 (2021-05-10)
2493 ============================
2494
2495 This release disables incremental compilation, unless the user has explicitly
2496 opted in via the newly added RUSTC_FORCE_INCREMENTAL=1 environment variable.
2497
2498 This is due to the widespread, and frequently occurring, breakage encountered by
2499 Rust users due to newly enabled incremental verification in 1.52.0. Notably,
2500 Rust users **should** upgrade to 1.52.0 or 1.52.1: the bugs that are detected by
2501 newly added incremental verification are still present in past stable versions,
2502 and are not yet fixed on any channel. These bugs can lead to miscompilation of
2503 Rust binaries.
2504
2505 These problems only affect incremental builds, so release builds with Cargo
2506 should not be affected unless the user has explicitly opted into incremental.
2507 Debug and check builds are affected.
2508
2509 See [84970] for more details.
2510
2511 [84970]: https://github.com/rust-lang/rust/issues/84970
2512
2513 Version 1.52.0 (2021-05-06)
2514 ============================
2515
2516 Language
2517 --------
2518 - [Added the `unsafe_op_in_unsafe_fn` lint, which checks whether the unsafe code
2519 in an `unsafe fn` is wrapped in a `unsafe` block.][79208] This lint
2520 is allowed by default, and may become a warning or hard error in a
2521 future edition.
2522 - [You can now cast mutable references to arrays to a pointer of the same type as
2523 the element.][81479]
2524
2525 Compiler
2526 --------
2527 - [Upgraded the default LLVM to LLVM 12.][81451]
2528
2529 Added tier 3\* support for the following targets.
2530
2531 - [`s390x-unknown-linux-musl`][82166]
2532 - [`riscv32gc-unknown-linux-musl` & `riscv64gc-unknown-linux-musl`][82202]
2533 - [`powerpc-unknown-openbsd`][82733]
2534
2535 \* Refer to Rust's [platform support page][platform-support-doc] for more
2536 information on Rust's tiered platform support.
2537
2538 Libraries
2539 ---------
2540 - [`OsString` now implements `Extend` and `FromIterator`.][82121]
2541 - [`cmp::Reverse` now has `#[repr(transparent)]` representation.][81879]
2542 - [`Arc<impl Error>` now implements `error::Error`.][80553]
2543 - [All integer division and remainder operations are now `const`.][80962]
2544
2545 Stabilised APIs
2546 -------------
2547 - [`Arguments::as_str`]
2548 - [`char::MAX`]
2549 - [`char::REPLACEMENT_CHARACTER`]
2550 - [`char::UNICODE_VERSION`]
2551 - [`char::decode_utf16`]
2552 - [`char::from_digit`]
2553 - [`char::from_u32_unchecked`]
2554 - [`char::from_u32`]
2555 - [`slice::partition_point`]
2556 - [`str::rsplit_once`]
2557 - [`str::split_once`]
2558
2559 The following previously stable APIs are now `const`.
2560
2561 - [`char::len_utf8`]
2562 - [`char::len_utf16`]
2563 - [`char::to_ascii_uppercase`]
2564 - [`char::to_ascii_lowercase`]
2565 - [`char::eq_ignore_ascii_case`]
2566 - [`u8::to_ascii_uppercase`]
2567 - [`u8::to_ascii_lowercase`]
2568 - [`u8::eq_ignore_ascii_case`]
2569
2570 Rustdoc
2571 -------
2572 - [Rustdoc lints are now treated as a tool lint, meaning that
2573 lints are now prefixed with `rustdoc::` (e.g. `#[warn(rustdoc::broken_intra_doc_links)]`).][80527]
2574 Using the old style is still allowed, and will become a warning in
2575 a future release.
2576 - [Rustdoc now supports argument files.][82261]
2577 - [Rustdoc now generates smart punctuation for documentation.][79423]
2578 - [You can now use "task lists" in Rustdoc Markdown.][81766] E.g.
2579 ```markdown
2580 - [x] Complete
2581 - [ ] Todo
2582 ```
2583
2584 Misc
2585 ----
2586 - [You can now pass multiple filters to tests.][81356] E.g.
2587 `cargo test -- foo bar` will run all tests that match `foo` and `bar`.
2588 - [Rustup now distributes PDB symbols for the `std` library on Windows,
2589 allowing you to see `std` symbols when debugging.][82218]
2590
2591 Internal Only
2592 -------------
2593 These changes provide no direct user facing benefits, but represent significant
2594 improvements to the internals and overall performance of rustc and
2595 related tools.
2596
2597 - [Check the result cache before the DepGraph when ensuring queries][81855]
2598 - [Try fast_reject::simplify_type in coherence before doing full check][81744]
2599 - [Only store a LocalDefId in some HIR nodes][81611]
2600 - [Store HIR attributes in a side table][79519]
2601
2602 Compatibility Notes
2603 -------------------
2604 - [Cargo build scripts are now forbidden from setting `RUSTC_BOOTSTRAP`.][cargo/9181]
2605 - [Removed support for the `x86_64-rumprun-netbsd` target.][82594]
2606 - [Deprecated the `x86_64-sun-solaris` target in favor of `x86_64-pc-solaris`.][82216]
2607 - [Rustdoc now only accepts `,`, ` `, and `\t` as delimiters for specifying
2608 languages in code blocks.][78429]
2609 - [Rustc now catches more cases of `pub_use_of_private_extern_crate`][80763]
2610 - [Changes in how proc macros handle whitespace may lead to panics when used
2611 with older `proc-macro-hack` versions. A `cargo update` should be sufficient to fix this in all cases.][84136]
2612 - [Turn `#[derive]` into a regular macro attribute][79078]
2613
2614 [84136]: https://github.com/rust-lang/rust/issues/84136
2615 [80763]: https://github.com/rust-lang/rust/pull/80763
2616 [82166]: https://github.com/rust-lang/rust/pull/82166
2617 [82121]: https://github.com/rust-lang/rust/pull/82121
2618 [81879]: https://github.com/rust-lang/rust/pull/81879
2619 [82261]: https://github.com/rust-lang/rust/pull/82261
2620 [82218]: https://github.com/rust-lang/rust/pull/82218
2621 [82216]: https://github.com/rust-lang/rust/pull/82216
2622 [82202]: https://github.com/rust-lang/rust/pull/82202
2623 [81855]: https://github.com/rust-lang/rust/pull/81855
2624 [81766]: https://github.com/rust-lang/rust/pull/81766
2625 [81744]: https://github.com/rust-lang/rust/pull/81744
2626 [81611]: https://github.com/rust-lang/rust/pull/81611
2627 [81479]: https://github.com/rust-lang/rust/pull/81479
2628 [81451]: https://github.com/rust-lang/rust/pull/81451
2629 [81356]: https://github.com/rust-lang/rust/pull/81356
2630 [80962]: https://github.com/rust-lang/rust/pull/80962
2631 [80553]: https://github.com/rust-lang/rust/pull/80553
2632 [80527]: https://github.com/rust-lang/rust/pull/80527
2633 [79519]: https://github.com/rust-lang/rust/pull/79519
2634 [79423]: https://github.com/rust-lang/rust/pull/79423
2635 [79208]: https://github.com/rust-lang/rust/pull/79208
2636 [78429]: https://github.com/rust-lang/rust/pull/78429
2637 [82733]: https://github.com/rust-lang/rust/pull/82733
2638 [82594]: https://github.com/rust-lang/rust/pull/82594
2639 [79078]: https://github.com/rust-lang/rust/pull/79078
2640 [cargo/9181]: https://github.com/rust-lang/cargo/pull/9181
2641 [`char::MAX`]: https://doc.rust-lang.org/std/primitive.char.html#associatedconstant.MAX
2642 [`char::REPLACEMENT_CHARACTER`]: https://doc.rust-lang.org/std/primitive.char.html#associatedconstant.REPLACEMENT_CHARACTER
2643 [`char::UNICODE_VERSION`]: https://doc.rust-lang.org/std/primitive.char.html#associatedconstant.UNICODE_VERSION
2644 [`char::decode_utf16`]: https://doc.rust-lang.org/std/primitive.char.html#method.decode_utf16
2645 [`char::from_u32`]: https://doc.rust-lang.org/std/primitive.char.html#method.from_u32
2646 [`char::from_u32_unchecked`]: https://doc.rust-lang.org/std/primitive.char.html#method.from_u32_unchecked
2647 [`char::from_digit`]: https://doc.rust-lang.org/std/primitive.char.html#method.from_digit
2648 [`Peekable::next_if`]: https://doc.rust-lang.org/stable/std/iter/struct.Peekable.html#method.next_if
2649 [`Peekable::next_if_eq`]: https://doc.rust-lang.org/stable/std/iter/struct.Peekable.html#method.next_if_eq
2650 [`Arguments::as_str`]: https://doc.rust-lang.org/stable/std/fmt/struct.Arguments.html#method.as_str
2651 [`str::split_once`]: https://doc.rust-lang.org/stable/std/primitive.str.html#method.split_once
2652 [`str::rsplit_once`]: https://doc.rust-lang.org/stable/std/primitive.str.html#method.rsplit_once
2653 [`slice::partition_point`]: https://doc.rust-lang.org/stable/std/primitive.slice.html#method.partition_point
2654 [`char::len_utf8`]: https://doc.rust-lang.org/stable/std/primitive.char.html#method.len_utf8
2655 [`char::len_utf16`]: https://doc.rust-lang.org/stable/std/primitive.char.html#method.len_utf16
2656 [`char::to_ascii_uppercase`]: https://doc.rust-lang.org/stable/std/primitive.char.html#method.to_ascii_uppercase
2657 [`char::to_ascii_lowercase`]: https://doc.rust-lang.org/stable/std/primitive.char.html#method.to_ascii_lowercase
2658 [`char::eq_ignore_ascii_case`]: https://doc.rust-lang.org/stable/std/primitive.char.html#method.eq_ignore_ascii_case
2659 [`u8::to_ascii_uppercase`]: https://doc.rust-lang.org/stable/std/primitive.u8.html#method.to_ascii_uppercase
2660 [`u8::to_ascii_lowercase`]: https://doc.rust-lang.org/stable/std/primitive.u8.html#method.to_ascii_lowercase
2661 [`u8::eq_ignore_ascii_case`]: https://doc.rust-lang.org/stable/std/primitive.u8.html#method.eq_ignore_ascii_case
2662
2663 Version 1.51.0 (2021-03-25)
2664 ============================
2665
2666 Language
2667 --------
2668 - [You can now parameterize items such as functions, traits, and `struct`s by constant
2669 values in addition to by types and lifetimes.][79135] Also known as "const generics"
2670 E.g. you can now write the following. Note: Only values of primitive integers,
2671 `bool`, or `char` types are currently permitted.
2672 ```rust
2673 struct GenericArray<T, const LENGTH: usize> {
2674 inner: [T; LENGTH]
2675 }
2676
2677 impl<T, const LENGTH: usize> GenericArray<T, LENGTH> {
2678 const fn last(&self) -> Option<&T> {
2679 if LENGTH == 0 {
2680 None
2681 } else {
2682 Some(&self.inner[LENGTH - 1])
2683 }
2684 }
2685 }
2686 ```
2687
2688
2689 Compiler
2690 --------
2691
2692 - [Added the `-Csplit-debuginfo` codegen option for macOS platforms.][79570]
2693 This option controls whether debug information is split across multiple files
2694 or packed into a single file. **Note** This option is unstable on other platforms.
2695 - [Added tier 3\* support for `aarch64_be-unknown-linux-gnu`,
2696 `aarch64-unknown-linux-gnu_ilp32`, and `aarch64_be-unknown-linux-gnu_ilp32` targets.][81455]
2697 - [Added tier 3 support for `i386-unknown-linux-gnu` and `i486-unknown-linux-gnu` targets.][80662]
2698 - [The `target-cpu=native` option will now detect individual features of CPUs.][80749]
2699
2700 \* Refer to Rust's [platform support page][platform-support-doc] for more
2701 information on Rust's tiered platform support.
2702
2703 Libraries
2704 ---------
2705
2706 - [`Box::downcast` is now also implemented for any `dyn Any + Send + Sync` object.][80945]
2707 - [`str` now implements `AsMut<str>`.][80279]
2708 - [`u64` and `u128` now implement `From<char>`.][79502]
2709 - [`Error` is now implemented for `&T` where `T` implements `Error`.][75180]
2710 - [`Poll::{map_ok, map_err}` are now implemented for `Poll<Option<Result<T, E>>>`.][80968]
2711 - [`unsigned_abs` is now implemented for all signed integer types.][80959]
2712 - [`io::Empty` now implements `io::Seek`.][78044]
2713 - [`rc::Weak<T>` and `sync::Weak<T>`'s methods such as `as_ptr` are now implemented for
2714 `T: ?Sized` types.][80764]
2715 - [`Div` and `Rem` by their `NonZero` variant is now implemented for all unsigned integers.][79134]
2716
2717
2718 Stabilized APIs
2719 ---------------
2720
2721 - [`Arc::decrement_strong_count`]
2722 - [`Arc::increment_strong_count`]
2723 - [`Once::call_once_force`]
2724 - [`Peekable::next_if_eq`]
2725 - [`Peekable::next_if`]
2726 - [`Seek::stream_position`]
2727 - [`array::IntoIter`]
2728 - [`panic::panic_any`]
2729 - [`ptr::addr_of!`]
2730 - [`ptr::addr_of_mut!`]
2731 - [`slice::fill_with`]
2732 - [`slice::split_inclusive_mut`]
2733 - [`slice::split_inclusive`]
2734 - [`slice::strip_prefix`]
2735 - [`slice::strip_suffix`]
2736 - [`str::split_inclusive`]
2737 - [`sync::OnceState`]
2738 - [`task::Wake`]
2739 - [`VecDeque::range`]
2740 - [`VecDeque::range_mut`]
2741
2742 Cargo
2743 -----
2744 - [Added the `split-debuginfo` profile option to control the -Csplit-debuginfo
2745 codegen option.][cargo/9112]
2746 - [Added the `resolver` field to `Cargo.toml` to enable the new feature resolver
2747 and CLI option behavior.][cargo/8997] Version 2 of the feature resolver will try
2748 to avoid unifying features of dependencies where that unification could be unwanted.
2749 Such as using the same dependency with a `std` feature in a build scripts and
2750 proc-macros, while using the `no-std` feature in the final binary. See the
2751 [Cargo book documentation][feature-resolver@2.0] for more information on the feature.
2752
2753 Rustdoc
2754 -------
2755
2756 - [Rustdoc will now include documentation for methods available from _nested_ `Deref` traits.][80653]
2757 - [You can now provide a `--default-theme` flag which sets the default theme to use for
2758 documentation.][79642]
2759
2760 Various improvements to intra-doc links:
2761
2762 - [You can link to non-path primitives such as `slice`.][80181]
2763 - [You can link to associated items.][74489]
2764 - [You can now include generic parameters when linking to items, like `Vec<T>`.][76934]
2765
2766 Misc
2767 ----
2768 - [You can now pass `--include-ignored` to tests (e.g. with
2769 `cargo test -- --include-ignored`) to include testing tests marked `#[ignore]`.][80053]
2770
2771 Compatibility Notes
2772 -------------------
2773
2774 - [WASI platforms no longer use the `wasm-bindgen` ABI, and instead use the wasm32 ABI.][79998]
2775 - [`rustc` no longer promotes division, modulo and indexing operations to `const` that
2776 could fail.][80579]
2777 - [The minimum version of glibc for the following platforms has been bumped to version 2.31
2778 for the distributed artifacts.][81521]
2779 - `armv5te-unknown-linux-gnueabi`
2780 - `sparc64-unknown-linux-gnu`
2781 - `thumbv7neon-unknown-linux-gnueabihf`
2782 - `armv7-unknown-linux-gnueabi`
2783 - `x86_64-unknown-linux-gnux32`
2784 - [`atomic::spin_loop_hint` has been deprecated.][80966] It's recommended to use `hint::spin_loop` instead.
2785
2786 Internal Only
2787 -------------
2788
2789 - [Consistently avoid constructing optimized MIR when not doing codegen][80718]
2790
2791 [79135]: https://github.com/rust-lang/rust/pull/79135
2792 [74489]: https://github.com/rust-lang/rust/pull/74489
2793 [76934]: https://github.com/rust-lang/rust/pull/76934
2794 [79570]: https://github.com/rust-lang/rust/pull/79570
2795 [80181]: https://github.com/rust-lang/rust/pull/80181
2796 [79642]: https://github.com/rust-lang/rust/pull/79642
2797 [80945]: https://github.com/rust-lang/rust/pull/80945
2798 [80279]: https://github.com/rust-lang/rust/pull/80279
2799 [80053]: https://github.com/rust-lang/rust/pull/80053
2800 [79502]: https://github.com/rust-lang/rust/pull/79502
2801 [75180]: https://github.com/rust-lang/rust/pull/75180
2802 [81521]: https://github.com/rust-lang/rust/pull/81521
2803 [80968]: https://github.com/rust-lang/rust/pull/80968
2804 [80959]: https://github.com/rust-lang/rust/pull/80959
2805 [80718]: https://github.com/rust-lang/rust/pull/80718
2806 [80653]: https://github.com/rust-lang/rust/pull/80653
2807 [80579]: https://github.com/rust-lang/rust/pull/80579
2808 [79998]: https://github.com/rust-lang/rust/pull/79998
2809 [78044]: https://github.com/rust-lang/rust/pull/78044
2810 [81455]: https://github.com/rust-lang/rust/pull/81455
2811 [80764]: https://github.com/rust-lang/rust/pull/80764
2812 [80749]: https://github.com/rust-lang/rust/pull/80749
2813 [80662]: https://github.com/rust-lang/rust/pull/80662
2814 [79134]: https://github.com/rust-lang/rust/pull/79134
2815 [80966]: https://github.com/rust-lang/rust/pull/80966
2816 [cargo/8997]: https://github.com/rust-lang/cargo/pull/8997
2817 [cargo/9112]: https://github.com/rust-lang/cargo/pull/9112
2818 [feature-resolver@2.0]: https://doc.rust-lang.org/nightly/cargo/reference/features.html#feature-resolver-version-2
2819 [`Once::call_once_force`]: https://doc.rust-lang.org/stable/std/sync/struct.Once.html#method.call_once_force
2820 [`sync::OnceState`]: https://doc.rust-lang.org/stable/std/sync/struct.OnceState.html
2821 [`panic::panic_any`]: https://doc.rust-lang.org/stable/std/panic/fn.panic_any.html
2822 [`slice::strip_prefix`]: https://doc.rust-lang.org/stable/std/primitive.slice.html#method.strip_prefix
2823 [`slice::strip_suffix`]: https://doc.rust-lang.org/stable/std/primitive.slice.html#method.strip_prefix
2824 [`Arc::increment_strong_count`]: https://doc.rust-lang.org/nightly/std/sync/struct.Arc.html#method.increment_strong_count
2825 [`Arc::decrement_strong_count`]: https://doc.rust-lang.org/nightly/std/sync/struct.Arc.html#method.decrement_strong_count
2826 [`slice::fill_with`]: https://doc.rust-lang.org/nightly/std/primitive.slice.html#method.fill_with
2827 [`ptr::addr_of!`]: https://doc.rust-lang.org/nightly/std/ptr/macro.addr_of.html
2828 [`ptr::addr_of_mut!`]: https://doc.rust-lang.org/nightly/std/ptr/macro.addr_of_mut.html
2829 [`array::IntoIter`]: https://doc.rust-lang.org/nightly/std/array/struct.IntoIter.html
2830 [`slice::split_inclusive`]: https://doc.rust-lang.org/nightly/std/primitive.slice.html#method.split_inclusive
2831 [`slice::split_inclusive_mut`]: https://doc.rust-lang.org/nightly/std/primitive.slice.html#method.split_inclusive_mut
2832 [`str::split_inclusive`]: https://doc.rust-lang.org/nightly/std/primitive.str.html#method.split_inclusive
2833 [`task::Wake`]: https://doc.rust-lang.org/nightly/std/task/trait.Wake.html
2834 [`Seek::stream_position`]: https://doc.rust-lang.org/nightly/std/io/trait.Seek.html#method.stream_position
2835 [`Peekable::next_if`]: https://doc.rust-lang.org/nightly/std/iter/struct.Peekable.html#method.next_if
2836 [`Peekable::next_if_eq`]: https://doc.rust-lang.org/nightly/std/iter/struct.Peekable.html#method.next_if_eq
2837 [`VecDeque::range`]: https://doc.rust-lang.org/nightly/std/collections/struct.VecDeque.html#method.range
2838 [`VecDeque::range_mut`]: https://doc.rust-lang.org/nightly/std/collections/struct.VecDeque.html#method.range_mut
2839
2840 Version 1.50.0 (2021-02-11)
2841 ============================
2842
2843 Language
2844 -----------------------
2845 - [You can now use `const` values for `x` in `[x; N]` array expressions.][79270]
2846 This has been technically possible since 1.38.0, as it was unintentionally stabilized.
2847 - [Assignments to `ManuallyDrop<T>` union fields are now considered safe.][78068]
2848
2849 Compiler
2850 -----------------------
2851 - [Added tier 3\* support for the `armv5te-unknown-linux-uclibceabi` target.][78142]
2852 - [Added tier 3 support for the `aarch64-apple-ios-macabi` target.][77484]
2853 - [The `x86_64-unknown-freebsd` is now built with the full toolset.][79484]
2854 - [Dropped support for all cloudabi targets.][78439]
2855
2856 \* Refer to Rust's [platform support page][platform-support-doc] for more
2857 information on Rust's tiered platform support.
2858
2859 Libraries
2860 -----------------------
2861
2862 - [`proc_macro::Punct` now implements `PartialEq<char>`.][78636]
2863 - [`ops::{Index, IndexMut}` are now implemented for fixed sized arrays of any length.][74989]
2864 - [On Unix platforms, the `std::fs::File` type now has a "niche" of `-1`.][74699]
2865 This value cannot be a valid file descriptor, and now means `Option<File>` takes
2866 up the same amount of space as `File`.
2867
2868 Stabilized APIs
2869 ---------------
2870
2871 - [`bool::then`]
2872 - [`btree_map::Entry::or_insert_with_key`]
2873 - [`f32::clamp`]
2874 - [`f64::clamp`]
2875 - [`hash_map::Entry::or_insert_with_key`]
2876 - [`Ord::clamp`]
2877 - [`RefCell::take`]
2878 - [`slice::fill`]
2879 - [`UnsafeCell::get_mut`]
2880
2881 The following previously stable methods are now `const`.
2882
2883 - [`IpAddr::is_ipv4`]
2884 - [`IpAddr::is_ipv6`]
2885 - [`IpAddr::is_unspecified`]
2886 - [`IpAddr::is_loopback`]
2887 - [`IpAddr::is_multicast`]
2888 - [`Ipv4Addr::octets`]
2889 - [`Ipv4Addr::is_loopback`]
2890 - [`Ipv4Addr::is_private`]
2891 - [`Ipv4Addr::is_link_local`]
2892 - [`Ipv4Addr::is_multicast`]
2893 - [`Ipv4Addr::is_broadcast`]
2894 - [`Ipv4Addr::is_documentation`]
2895 - [`Ipv4Addr::to_ipv6_compatible`]
2896 - [`Ipv4Addr::to_ipv6_mapped`]
2897 - [`Ipv6Addr::segments`]
2898 - [`Ipv6Addr::is_unspecified`]
2899 - [`Ipv6Addr::is_loopback`]
2900 - [`Ipv6Addr::is_multicast`]
2901 - [`Ipv6Addr::to_ipv4`]
2902 - [`Layout::size`]
2903 - [`Layout::align`]
2904 - [`Layout::from_size_align`]
2905 - `pow` for all integer types.
2906 - `checked_pow` for all integer types.
2907 - `saturating_pow` for all integer types.
2908 - `wrapping_pow` for all integer types.
2909 - `next_power_of_two` for all unsigned integer types.
2910 - `checked_next_power_of_two` for all unsigned integer types.
2911
2912 Cargo
2913 -----------------------
2914
2915 - [Added the `[build.rustc-workspace-wrapper]` option.][cargo/8976]
2916 This option sets a wrapper to execute instead of `rustc`, for workspace members only.
2917 - [`cargo:rerun-if-changed` will now, if provided a directory, scan the entire
2918 contents of that directory for changes.][cargo/8973]
2919 - [Added the `--workspace` flag to the `cargo update` command.][cargo/8725]
2920
2921 Misc
2922 ----
2923
2924 - [The search results tab and the help button are focusable with keyboard in rustdoc.][79896]
2925 - [Running tests will now print the total time taken to execute.][75752]
2926
2927 Compatibility Notes
2928 -------------------
2929
2930 - [The `compare_and_swap` method on atomics has been deprecated.][79261] It's
2931 recommended to use the `compare_exchange` and `compare_exchange_weak` methods instead.
2932 - [Changes in how `TokenStream`s are checked have fixed some cases where you could write
2933 unhygenic `macro_rules!` macros.][79472]
2934 - [`#![test]` as an inner attribute is now considered unstable like other inner macro
2935 attributes, and reports an error by default through the `soft_unstable` lint.][79003]
2936 - [Overriding a `forbid` lint at the same level that it was set is now a hard error.][78864]
2937 - [You can no longer intercept `panic!` calls by supplying your own macro.][78343] It's
2938 recommended to use the `#[panic_handler]` attribute to provide your own implementation.
2939 - [Semi-colons after item statements (e.g. `struct Foo {};`) now produce a warning.][78296]
2940
2941 [74989]: https://github.com/rust-lang/rust/pull/74989
2942 [79261]: https://github.com/rust-lang/rust/pull/79261
2943 [79896]: https://github.com/rust-lang/rust/pull/79896
2944 [79484]: https://github.com/rust-lang/rust/pull/79484
2945 [79472]: https://github.com/rust-lang/rust/pull/79472
2946 [79270]: https://github.com/rust-lang/rust/pull/79270
2947 [79003]: https://github.com/rust-lang/rust/pull/79003
2948 [78864]: https://github.com/rust-lang/rust/pull/78864
2949 [78636]: https://github.com/rust-lang/rust/pull/78636
2950 [78439]: https://github.com/rust-lang/rust/pull/78439
2951 [78343]: https://github.com/rust-lang/rust/pull/78343
2952 [78296]: https://github.com/rust-lang/rust/pull/78296
2953 [78068]: https://github.com/rust-lang/rust/pull/78068
2954 [75752]: https://github.com/rust-lang/rust/pull/75752
2955 [74699]: https://github.com/rust-lang/rust/pull/74699
2956 [78142]: https://github.com/rust-lang/rust/pull/78142
2957 [77484]: https://github.com/rust-lang/rust/pull/77484
2958 [cargo/8976]: https://github.com/rust-lang/cargo/pull/8976
2959 [cargo/8973]: https://github.com/rust-lang/cargo/pull/8973
2960 [cargo/8725]: https://github.com/rust-lang/cargo/pull/8725
2961 [`IpAddr::is_ipv4`]: https://doc.rust-lang.org/stable/std/net/enum.IpAddr.html#method.is_ipv4
2962 [`IpAddr::is_ipv6`]: https://doc.rust-lang.org/stable/std/net/enum.IpAddr.html#method.is_ipv6
2963 [`IpAddr::is_unspecified`]: https://doc.rust-lang.org/stable/std/net/enum.IpAddr.html#method.is_unspecified
2964 [`IpAddr::is_loopback`]: https://doc.rust-lang.org/stable/std/net/enum.IpAddr.html#method.is_loopback
2965 [`IpAddr::is_multicast`]: https://doc.rust-lang.org/stable/std/net/enum.IpAddr.html#method.is_multicast
2966 [`Ipv4Addr::octets`]: https://doc.rust-lang.org/stable/std/net/struct.Ipv4Addr.html#method.octets
2967 [`Ipv4Addr::is_loopback`]: https://doc.rust-lang.org/stable/std/net/struct.Ipv4Addr.html#method.is_loopback
2968 [`Ipv4Addr::is_private`]: https://doc.rust-lang.org/stable/std/net/struct.Ipv4Addr.html#method.is_private
2969 [`Ipv4Addr::is_link_local`]: https://doc.rust-lang.org/stable/std/net/struct.Ipv4Addr.html#method.is_link_local
2970 [`Ipv4Addr::is_multicast`]: https://doc.rust-lang.org/stable/std/net/struct.Ipv4Addr.html#method.is_multicast
2971 [`Ipv4Addr::is_broadcast`]: https://doc.rust-lang.org/stable/std/net/struct.Ipv4Addr.html#method.is_broadcast
2972 [`Ipv4Addr::is_documentation`]: https://doc.rust-lang.org/stable/std/net/struct.Ipv4Addr.html#method.is_documentation
2973 [`Ipv4Addr::to_ipv6_compatible`]: https://doc.rust-lang.org/stable/std/net/struct.Ipv4Addr.html#method.to_ipv6_compatible
2974 [`Ipv4Addr::to_ipv6_mapped`]: https://doc.rust-lang.org/stable/std/net/struct.Ipv4Addr.html#method.to_ipv6_mapped
2975 [`Ipv6Addr::segments`]: https://doc.rust-lang.org/stable/std/net/struct.Ipv6Addr.html#method.segments
2976 [`Ipv6Addr::is_unspecified`]: https://doc.rust-lang.org/stable/std/net/struct.Ipv6Addr.html#method.is_unspecified
2977 [`Ipv6Addr::is_loopback`]: https://doc.rust-lang.org/stable/std/net/struct.Ipv6Addr.html#method.is_loopback
2978 [`Ipv6Addr::is_multicast`]: https://doc.rust-lang.org/stable/std/net/struct.Ipv6Addr.html#method.is_multicast
2979 [`Ipv6Addr::to_ipv4`]: https://doc.rust-lang.org/stable/std/net/struct.Ipv6Addr.html#method.to_ipv4
2980 [`Layout::align`]: https://doc.rust-lang.org/stable/std/alloc/struct.Layout.html#method.align
2981 [`Layout::from_size_align`]: https://doc.rust-lang.org/stable/std/alloc/struct.Layout.html#method.from_size_align
2982 [`Layout::size`]: https://doc.rust-lang.org/stable/std/alloc/struct.Layout.html#method.size
2983 [`Ord::clamp`]: https://doc.rust-lang.org/stable/std/cmp/trait.Ord.html#method.clamp
2984 [`RefCell::take`]: https://doc.rust-lang.org/stable/std/cell/struct.RefCell.html#method.take
2985 [`UnsafeCell::get_mut`]: https://doc.rust-lang.org/stable/std/cell/struct.UnsafeCell.html#method.get_mut
2986 [`bool::then`]: https://doc.rust-lang.org/stable/std/primitive.bool.html#method.then
2987 [`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
2988 [`f32::clamp`]: https://doc.rust-lang.org/stable/std/primitive.f32.html#method.clamp
2989 [`f64::clamp`]: https://doc.rust-lang.org/stable/std/primitive.f64.html#method.clamp
2990 [`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
2991 [`slice::fill`]: https://doc.rust-lang.org/stable/std/primitive.slice.html#method.fill
2992
2993
2994 Version 1.49.0 (2020-12-31)
2995 ============================
2996
2997 Language
2998 -----------------------
2999
3000 - [Unions can now implement `Drop`, and you can now have a field in a union
3001 with `ManuallyDrop<T>`.][77547]
3002 - [You can now cast uninhabited enums to integers.][76199]
3003 - [You can now bind by reference and by move in patterns.][76119] This
3004 allows you to selectively borrow individual components of a type. E.g.
3005 ```rust
3006 #[derive(Debug)]
3007 struct Person {
3008 name: String,
3009 age: u8,
3010 }
3011
3012 let person = Person {
3013 name: String::from("Alice"),
3014 age: 20,
3015 };
3016
3017 // `name` is moved out of person, but `age` is referenced.
3018 let Person { name, ref age } = person;
3019 println!("{} {}", name, age);
3020 ```
3021
3022 Compiler
3023 -----------------------
3024
3025 - [Added tier 1\* support for `aarch64-unknown-linux-gnu`.][78228]
3026 - [Added tier 2 support for `aarch64-apple-darwin`.][75991]
3027 - [Added tier 2 support for `aarch64-pc-windows-msvc`.][75914]
3028 - [Added tier 3 support for `mipsel-unknown-none`.][78676]
3029 - [Raised the minimum supported LLVM version to LLVM 9.][78848]
3030 - [Output from threads spawned in tests is now captured.][78227]
3031 - [Change os and vendor values to "none" and "unknown" for some targets][78951]
3032
3033 \* Refer to Rust's [platform support page][platform-support-doc] for more
3034 information on Rust's tiered platform support.
3035
3036 Libraries
3037 -----------------------
3038
3039 - [`RangeInclusive` now checks for exhaustion when calling `contains` and indexing.][78109]
3040 - [`ToString::to_string` now no longer shrinks the internal buffer in the default implementation.][77997]
3041
3042 Stabilized APIs
3043 ---------------
3044
3045 - [`slice::select_nth_unstable`]
3046 - [`slice::select_nth_unstable_by`]
3047 - [`slice::select_nth_unstable_by_key`]
3048
3049 The following previously stable methods are now `const`.
3050
3051 - [`Poll::is_ready`]
3052 - [`Poll::is_pending`]
3053
3054 Cargo
3055 -----------------------
3056 - [Building a crate with `cargo-package` should now be independently reproducible.][cargo/8864]
3057 - [`cargo-tree` now marks proc-macro crates.][cargo/8765]
3058 - [Added `CARGO_PRIMARY_PACKAGE` build-time environment variable.][cargo/8758] This
3059 variable will be set if the crate being built is one the user selected to build, either
3060 with `-p` or through defaults.
3061 - [You can now use glob patterns when specifying packages & targets.][cargo/8752]
3062
3063
3064 Compatibility Notes
3065 -------------------
3066
3067 - [Demoted `i686-unknown-freebsd` from host tier 2 to target tier 2 support.][78746]
3068 - [Macros that end with a semi-colon are now treated as statements even if they expand to nothing.][78376]
3069 - [Rustc will now check for the validity of some built-in attributes on enum variants.][77015]
3070 Previously such invalid or unused attributes could be ignored.
3071 - Leading whitespace is stripped more uniformly in documentation comments, which may change behavior. You
3072 read [this post about the changes][rustdoc-ws-post] for more details.
3073 - [Trait bounds are no longer inferred for associated types.][79904]
3074
3075 Internal Only
3076 -------------
3077 These changes provide no direct user facing benefits, but represent significant
3078 improvements to the internals and overall performance of rustc and
3079 related tools.
3080
3081 - [rustc's internal crates are now compiled using the `initial-exec` Thread
3082 Local Storage model.][78201]
3083 - [Calculate visibilities once in resolve.][78077]
3084 - [Added `system` to the `llvm-libunwind` bootstrap config option.][77703]
3085 - [Added `--color` for configuring terminal color support to bootstrap.][79004]
3086
3087
3088 [75991]: https://github.com/rust-lang/rust/pull/75991
3089 [78951]: https://github.com/rust-lang/rust/pull/78951
3090 [78848]: https://github.com/rust-lang/rust/pull/78848
3091 [78746]: https://github.com/rust-lang/rust/pull/78746
3092 [78376]: https://github.com/rust-lang/rust/pull/78376
3093 [78228]: https://github.com/rust-lang/rust/pull/78228
3094 [78227]: https://github.com/rust-lang/rust/pull/78227
3095 [78201]: https://github.com/rust-lang/rust/pull/78201
3096 [78109]: https://github.com/rust-lang/rust/pull/78109
3097 [78077]: https://github.com/rust-lang/rust/pull/78077
3098 [77997]: https://github.com/rust-lang/rust/pull/77997
3099 [77703]: https://github.com/rust-lang/rust/pull/77703
3100 [77547]: https://github.com/rust-lang/rust/pull/77547
3101 [77015]: https://github.com/rust-lang/rust/pull/77015
3102 [76199]: https://github.com/rust-lang/rust/pull/76199
3103 [76119]: https://github.com/rust-lang/rust/pull/76119
3104 [75914]: https://github.com/rust-lang/rust/pull/75914
3105 [79004]: https://github.com/rust-lang/rust/pull/79004
3106 [78676]: https://github.com/rust-lang/rust/pull/78676
3107 [79904]: https://github.com/rust-lang/rust/issues/79904
3108 [cargo/8864]: https://github.com/rust-lang/cargo/pull/8864
3109 [cargo/8765]: https://github.com/rust-lang/cargo/pull/8765
3110 [cargo/8758]: https://github.com/rust-lang/cargo/pull/8758
3111 [cargo/8752]: https://github.com/rust-lang/cargo/pull/8752
3112 [`slice::select_nth_unstable`]: https://doc.rust-lang.org/nightly/std/primitive.slice.html#method.select_nth_unstable
3113 [`slice::select_nth_unstable_by`]: https://doc.rust-lang.org/nightly/std/primitive.slice.html#method.select_nth_unstable_by
3114 [`slice::select_nth_unstable_by_key`]: https://doc.rust-lang.org/nightly/std/primitive.slice.html#method.select_nth_unstable_by_key
3115 [`Poll::is_ready`]: https://doc.rust-lang.org/stable/std/task/enum.Poll.html#method.is_ready
3116 [`Poll::is_pending`]: https://doc.rust-lang.org/stable/std/task/enum.Poll.html#method.is_pending
3117 [rustdoc-ws-post]: https://blog.guillaume-gomez.fr/articles/2020-11-11+New+doc+comment+handling+in+rustdoc
3118
3119 Version 1.48.0 (2020-11-19)
3120 ==========================
3121
3122 Language
3123 --------
3124
3125 - [The `unsafe` keyword is now syntactically permitted on modules.][75857] This
3126 is still rejected *semantically*, but can now be parsed by procedural macros.
3127
3128 Compiler
3129 --------
3130 - [Stabilised the `-C link-self-contained=<yes|no>` compiler flag.][76158] This tells
3131 `rustc` whether to link its own C runtime and libraries or to rely on a external
3132 linker to find them. (Supported only on `windows-gnu`, `linux-musl`, and `wasi` platforms.)
3133 - [You can now use `-C target-feature=+crt-static` on `linux-gnu` targets.][77386]
3134 Note: If you're using cargo you must explicitly pass the `--target` flag.
3135 - [Added tier 2\* support for `aarch64-unknown-linux-musl`.][76420]
3136
3137 \* Refer to Rust's [platform support page][platform-support-doc] for more
3138 information on Rust's tiered platform support.
3139
3140 Libraries
3141 ---------
3142 - [`io::Write` is now implemented for `&ChildStdin` `&Sink`, `&Stdout`,
3143 and `&Stderr`.][76275]
3144 - [All arrays of any length now implement `TryFrom<Vec<T>>`.][76310]
3145 - [The `matches!` macro now supports having a trailing comma.][74880]
3146 - [`Vec<A>` now implements `PartialEq<[B]>` where `A: PartialEq<B>`.][74194]
3147 - [The `RefCell::{replace, replace_with, clone}` methods now all use `#[track_caller]`.][77055]
3148
3149 Stabilized APIs
3150 ---------------
3151 - [`slice::as_ptr_range`]
3152 - [`slice::as_mut_ptr_range`]
3153 - [`VecDeque::make_contiguous`]
3154 - [`future::pending`]
3155 - [`future::ready`]
3156
3157 The following previously stable methods are now `const fn`'s:
3158
3159 - [`Option::is_some`]
3160 - [`Option::is_none`]
3161 - [`Option::as_ref`]
3162 - [`Result::is_ok`]
3163 - [`Result::is_err`]
3164 - [`Result::as_ref`]
3165 - [`Ordering::reverse`]
3166 - [`Ordering::then`]
3167
3168 Cargo
3169 -----
3170
3171 Rustdoc
3172 -------
3173 - [You can now link to items in `rustdoc` using the intra-doc link
3174 syntax.][74430] E.g. ``/// Uses [`std::future`]`` will automatically generate
3175 a link to `std::future`'s documentation. See ["Linking to items by
3176 name"][intradoc-links] for more information.
3177 - [You can now specify `#[doc(alias = "<alias>")]` on items to add search aliases
3178 when searching through `rustdoc`'s UI.][75740]
3179
3180 Compatibility Notes
3181 -------------------
3182 - [Promotion of references to `'static` lifetime inside `const fn` now follows the
3183 same rules as inside a `fn` body.][75502] In particular, `&foo()` will not be
3184 promoted to `'static` lifetime any more inside `const fn`s.
3185 - [Associated type bindings on trait objects are now verified to meet the bounds
3186 declared on the trait when checking that they implement the trait.][27675]
3187 - [When trait bounds on associated types or opaque types are ambiguous, the
3188 compiler no longer makes an arbitrary choice on which bound to use.][54121]
3189 - [Fixed recursive nonterminals not being expanded in macros during
3190 pretty-print/reparse check.][77153] This may cause errors if your macro wasn't
3191 correctly handling recursive nonterminal tokens.
3192 - [`&mut` references to non zero-sized types are no longer promoted.][75585]
3193 - [`rustc` will now warn if you use attributes like `#[link_name]` or `#[cold]`
3194 in places where they have no effect.][73461]
3195 - [Updated `_mm256_extract_epi8` and `_mm256_extract_epi16` signatures in
3196 `arch::{x86, x86_64}` to return `i32` to match the vendor signatures.][73166]
3197 - [`mem::uninitialized` will now panic if any inner types inside a struct or enum
3198 disallow zero-initialization.][71274]
3199 - [`#[target_feature]` will now error if used in a place where it has no effect.][78143]
3200 - [Foreign exceptions are now caught by `catch_unwind` and will cause an abort.][70212]
3201 Note: This behaviour is not guaranteed and is still considered undefined behaviour,
3202 see the [`catch_unwind`] documentation for further information.
3203
3204
3205
3206 Internal Only
3207 -------------
3208 These changes provide no direct user facing benefits, but represent significant
3209 improvements to the internals and overall performance of rustc and
3210 related tools.
3211
3212 - [Building `rustc` from source now uses `ninja` by default over `make`.][74922]
3213 You can continue building with `make` by setting `ninja=false` in
3214 your `config.toml`.
3215 - [cg_llvm: `fewer_names` in `uncached_llvm_type`][76030]
3216 - [Made `ensure_sufficient_stack()` non-generic][76680]
3217
3218 [78143]: https://github.com/rust-lang/rust/issues/78143
3219 [76680]: https://github.com/rust-lang/rust/pull/76680/
3220 [76030]: https://github.com/rust-lang/rust/pull/76030/
3221 [70212]: https://github.com/rust-lang/rust/pull/70212/
3222 [27675]: https://github.com/rust-lang/rust/issues/27675/
3223 [54121]: https://github.com/rust-lang/rust/issues/54121/
3224 [71274]: https://github.com/rust-lang/rust/pull/71274/
3225 [77386]: https://github.com/rust-lang/rust/pull/77386/
3226 [77153]: https://github.com/rust-lang/rust/pull/77153/
3227 [77055]: https://github.com/rust-lang/rust/pull/77055/
3228 [76275]: https://github.com/rust-lang/rust/pull/76275/
3229 [76310]: https://github.com/rust-lang/rust/pull/76310/
3230 [76420]: https://github.com/rust-lang/rust/pull/76420/
3231 [76158]: https://github.com/rust-lang/rust/pull/76158/
3232 [75857]: https://github.com/rust-lang/rust/pull/75857/
3233 [75585]: https://github.com/rust-lang/rust/pull/75585/
3234 [75740]: https://github.com/rust-lang/rust/pull/75740/
3235 [75502]: https://github.com/rust-lang/rust/pull/75502/
3236 [74880]: https://github.com/rust-lang/rust/pull/74880/
3237 [74922]: https://github.com/rust-lang/rust/pull/74922/
3238 [74430]: https://github.com/rust-lang/rust/pull/74430/
3239 [74194]: https://github.com/rust-lang/rust/pull/74194/
3240 [73461]: https://github.com/rust-lang/rust/pull/73461/
3241 [73166]: https://github.com/rust-lang/rust/pull/73166/
3242 [intradoc-links]: https://doc.rust-lang.org/rustdoc/linking-to-items-by-name.html
3243 [`catch_unwind`]: https://doc.rust-lang.org/std/panic/fn.catch_unwind.html
3244 [`Option::is_some`]: https://doc.rust-lang.org/std/option/enum.Option.html#method.is_some
3245 [`Option::is_none`]: https://doc.rust-lang.org/std/option/enum.Option.html#method.is_none
3246 [`Option::as_ref`]: https://doc.rust-lang.org/std/option/enum.Option.html#method.as_ref
3247 [`Result::is_ok`]: https://doc.rust-lang.org/std/result/enum.Result.html#method.is_ok
3248 [`Result::is_err`]: https://doc.rust-lang.org/std/result/enum.Result.html#method.is_err
3249 [`Result::as_ref`]: https://doc.rust-lang.org/std/result/enum.Result.html#method.as_ref
3250 [`Ordering::reverse`]: https://doc.rust-lang.org/std/cmp/enum.Ordering.html#method.reverse
3251 [`Ordering::then`]: https://doc.rust-lang.org/std/cmp/enum.Ordering.html#method.then
3252 [`slice::as_ptr_range`]: https://doc.rust-lang.org/std/primitive.slice.html#method.as_ptr_range
3253 [`slice::as_mut_ptr_range`]: https://doc.rust-lang.org/std/primitive.slice.html#method.as_mut_ptr_range
3254 [`VecDeque::make_contiguous`]: https://doc.rust-lang.org/std/collections/struct.VecDeque.html#method.make_contiguous
3255 [`future::pending`]: https://doc.rust-lang.org/std/future/fn.pending.html
3256 [`future::ready`]: https://doc.rust-lang.org/std/future/fn.ready.html
3257
3258
3259 Version 1.47.0 (2020-10-08)
3260 ==========================
3261
3262 Language
3263 --------
3264 - [Closures will now warn when not used.][74869]
3265
3266 Compiler
3267 --------
3268 - [Stabilized the `-C control-flow-guard` codegen option][73893], which enables
3269 [Control Flow Guard][1.47.0-cfg] for Windows platforms, and is ignored on other
3270 platforms.
3271 - [Upgraded to LLVM 11.][73526]
3272 - [Added tier 3\* support for the `thumbv4t-none-eabi` target.][74419]
3273 - [Upgrade the FreeBSD toolchain to version 11.4][75204]
3274 - [`RUST_BACKTRACE`'s output is now more compact.][75048]
3275
3276 \* Refer to Rust's [platform support page][platform-support-doc] for more
3277 information on Rust's tiered platform support.
3278
3279 Libraries
3280 ---------
3281 - [`CStr` now implements `Index<RangeFrom<usize>>`.][74021]
3282 - [Traits in `std`/`core` are now implemented for arrays of any length, not just
3283 those of length less than 33.][74060]
3284 - [`ops::RangeFull` and `ops::Range` now implement Default.][73197]
3285 - [`panic::Location` now implements `Copy`, `Clone`, `Eq`, `Hash`, `Ord`,
3286 `PartialEq`, and `PartialOrd`.][73583]
3287
3288 Stabilized APIs
3289 ---------------
3290 - [`Ident::new_raw`]
3291 - [`Range::is_empty`]
3292 - [`RangeInclusive::is_empty`]
3293 - [`Result::as_deref`]
3294 - [`Result::as_deref_mut`]
3295 - [`Vec::leak`]
3296 - [`pointer::offset_from`]
3297 - [`f32::TAU`]
3298 - [`f64::TAU`]
3299
3300 The following previously stable APIs have now been made const.
3301
3302 - [The `new` method for all `NonZero` integers.][73858]
3303 - [The `checked_add`,`checked_sub`,`checked_mul`,`checked_neg`, `checked_shl`,
3304 `checked_shr`, `saturating_add`, `saturating_sub`, and `saturating_mul`
3305 methods for all integers.][73858]
3306 - [The `checked_abs`, `saturating_abs`, `saturating_neg`, and `signum` for all
3307 signed integers.][73858]
3308 - [The `is_ascii_alphabetic`, `is_ascii_uppercase`, `is_ascii_lowercase`,
3309 `is_ascii_alphanumeric`, `is_ascii_digit`, `is_ascii_hexdigit`,
3310 `is_ascii_punctuation`, `is_ascii_graphic`, `is_ascii_whitespace`, and
3311 `is_ascii_control` methods for `char` and `u8`.][73858]
3312
3313 Cargo
3314 -----
3315 - [`build-dependencies` are now built with opt-level 0 by default.][cargo/8500]
3316 You can override this by setting the following in your `Cargo.toml`.
3317 ```toml
3318 [profile.release.build-override]
3319 opt-level = 3
3320 ```
3321 - [`cargo-help` will now display man pages for commands rather just the
3322 `--help` text.][cargo/8456]
3323 - [`cargo-metadata` now emits a `test` field indicating if a target has
3324 tests enabled.][cargo/8478]
3325 - [`workspace.default-members` now respects `workspace.exclude`.][cargo/8485]
3326 - [`cargo-publish` will now use an alternative registry by default if it's the
3327 only registry specified in `package.publish`.][cargo/8571]
3328
3329 Misc
3330 ----
3331 - [Added a help button beside Rustdoc's searchbar that explains rustdoc's
3332 type based search.][75366]
3333 - [Added the Ayu theme to rustdoc.][71237]
3334
3335 Compatibility Notes
3336 -------------------
3337 - [Bumped the minimum supported Emscripten version to 1.39.20.][75716]
3338 - [Fixed a regression parsing `{} && false` in tail expressions.][74650]
3339 - [Added changes to how proc-macros are expanded in `macro_rules!` that should
3340 help to preserve more span information.][73084] These changes may cause
3341 compilation errors if your macro was unhygenic or didn't correctly handle
3342 `Delimiter::None`.
3343 - [Moved support for the CloudABI target to tier 3.][75568]
3344 - [`linux-gnu` targets now require minimum kernel 2.6.32 and glibc 2.11.][74163]
3345 - [Added the `rustc-docs` component.][75560] This allows you to install
3346 and read the documentation for the compiler internal APIs. (Currently only
3347 available for `x86_64-unknown-linux-gnu`.)
3348
3349 Internal Only
3350 --------
3351
3352 - [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.
3353
3354 [1.47.0-cfg]: https://docs.microsoft.com/en-us/windows/win32/secbp/control-flow-guard
3355 [75048]: https://github.com/rust-lang/rust/pull/75048/
3356 [74163]: https://github.com/rust-lang/rust/pull/74163/
3357 [71237]: https://github.com/rust-lang/rust/pull/71237/
3358 [74869]: https://github.com/rust-lang/rust/pull/74869/
3359 [73858]: https://github.com/rust-lang/rust/pull/73858/
3360 [75716]: https://github.com/rust-lang/rust/pull/75716/
3361 [75560]: https://github.com/rust-lang/rust/pull/75560/
3362 [75568]: https://github.com/rust-lang/rust/pull/75568/
3363 [75366]: https://github.com/rust-lang/rust/pull/75366/
3364 [75204]: https://github.com/rust-lang/rust/pull/75204/
3365 [74650]: https://github.com/rust-lang/rust/pull/74650/
3366 [74419]: https://github.com/rust-lang/rust/pull/74419/
3367 [73964]: https://github.com/rust-lang/rust/pull/73964/
3368 [74021]: https://github.com/rust-lang/rust/pull/74021/
3369 [74060]: https://github.com/rust-lang/rust/pull/74060/
3370 [73893]: https://github.com/rust-lang/rust/pull/73893/
3371 [73526]: https://github.com/rust-lang/rust/pull/73526/
3372 [73583]: https://github.com/rust-lang/rust/pull/73583/
3373 [73084]: https://github.com/rust-lang/rust/pull/73084/
3374 [73197]: https://github.com/rust-lang/rust/pull/73197/
3375 [cargo/8456]: https://github.com/rust-lang/cargo/pull/8456/
3376 [cargo/8478]: https://github.com/rust-lang/cargo/pull/8478/
3377 [cargo/8485]: https://github.com/rust-lang/cargo/pull/8485/
3378 [cargo/8500]: https://github.com/rust-lang/cargo/pull/8500/
3379 [cargo/8571]: https://github.com/rust-lang/cargo/pull/8571/
3380 [`Ident::new_raw`]: https://doc.rust-lang.org/nightly/proc_macro/struct.Ident.html#method.new_raw
3381 [`Range::is_empty`]: https://doc.rust-lang.org/nightly/std/ops/struct.Range.html#method.is_empty
3382 [`RangeInclusive::is_empty`]: https://doc.rust-lang.org/nightly/std/ops/struct.RangeInclusive.html#method.is_empty
3383 [`Result::as_deref_mut`]: https://doc.rust-lang.org/nightly/std/result/enum.Result.html#method.as_deref_mut
3384 [`Result::as_deref`]: https://doc.rust-lang.org/nightly/std/result/enum.Result.html#method.as_deref
3385 [`Vec::leak`]: https://doc.rust-lang.org/nightly/std/vec/struct.Vec.html#method.leak
3386 [`f32::TAU`]: https://doc.rust-lang.org/nightly/std/f32/consts/constant.TAU.html
3387 [`f64::TAU`]: https://doc.rust-lang.org/nightly/std/f64/consts/constant.TAU.html
3388 [`pointer::offset_from`]: https://doc.rust-lang.org/nightly/std/primitive.pointer.html#method.offset_from
3389
3390
3391 Version 1.46.0 (2020-08-27)
3392 ==========================
3393
3394 Language
3395 --------
3396 - [`if`, `match`, and `loop` expressions can now be used in const functions.][72437]
3397 - [Additionally you are now also able to coerce and cast to slices (`&[T]`) in
3398 const functions.][73862]
3399 - [The `#[track_caller]` attribute can now be added to functions to use the
3400 function's caller's location information for panic messages.][72445]
3401 - [Recursively indexing into tuples no longer needs parentheses.][71322] E.g.
3402 `x.0.0` over `(x.0).0`.
3403 - [`mem::transmute` can now be used in statics and constants.][72920] **Note**
3404 You currently can't use `mem::transmute` in constant functions.
3405
3406 Compiler
3407 --------
3408 - [You can now use the `cdylib` target on Apple iOS and tvOS platforms.][73516]
3409 - [Enabled static "Position Independent Executables" by default
3410 for `x86_64-unknown-linux-musl`.][70740]
3411
3412 Libraries
3413 ---------
3414 - [`mem::forget` is now a `const fn`.][73887]
3415 - [`String` now implements `From<char>`.][73466]
3416 - [The `leading_ones`, and `trailing_ones` methods have been stabilised for all
3417 integer types.][73032]
3418 - [`vec::IntoIter<T>` now implements `AsRef<[T]>`.][72583]
3419 - [All non-zero integer types (`NonZeroU8`) now implement `TryFrom` for their
3420 zero-able equivalent (e.g. `TryFrom<u8>`).][72717]
3421 - [`&[T]` and `&mut [T]` now implement `PartialEq<Vec<T>>`.][71660]
3422 - [`(String, u16)` now implements `ToSocketAddrs`.][73007]
3423 - [`vec::Drain<'_, T>` now implements `AsRef<[T]>`.][72584]
3424
3425 Stabilized APIs
3426 ---------------
3427 - [`Option::zip`]
3428 - [`vec::Drain::as_slice`]
3429
3430 Cargo
3431 -----
3432 Added a number of new environment variables that are now available when
3433 compiling your crate.
3434
3435 - [`CARGO_BIN_NAME` and `CARGO_CRATE_NAME`][cargo/8270] Providing the name of
3436 the specific binary being compiled and the name of the crate.
3437 - [`CARGO_PKG_LICENSE`][cargo/8325] The license from the manifest of the package.
3438 - [`CARGO_PKG_LICENSE_FILE`][cargo/8387] The path to the license file.
3439
3440 Compatibility Notes
3441 -------------------
3442 - [The target configuration option `abi_blacklist` has been renamed
3443 to `unsupported_abis`.][74150] The old name will still continue to work.
3444 - [Rustc will now warn if you cast a C-like enum that implements `Drop`.][72331]
3445 This was previously accepted but will become a hard error in a future release.
3446 - [Rustc will fail to compile if you have a struct with
3447 `#[repr(i128)]` or `#[repr(u128)]`.][74109] This representation is currently only
3448 allowed on `enum`s.
3449 - [Tokens passed to `macro_rules!` are now always captured.][73293] This helps
3450 ensure that spans have the correct information, and may cause breakage if you
3451 were relying on receiving spans with dummy information.
3452 - [The InnoSetup installer for Windows is no longer available.][72569] This was
3453 a legacy installer that was replaced by a MSI installer a few years ago but
3454 was still being built.
3455 - [`{f32, f64}::asinh` now returns the correct values for negative numbers.][72486]
3456 - [Rustc will no longer accept overlapping trait implementations that only
3457 differ in how the lifetime was bound.][72493]
3458 - [Rustc now correctly relates the lifetime of an existential associated
3459 type.][71896] This fixes some edge cases where `rustc` would erroneously allow
3460 you to pass a shorter lifetime than expected.
3461 - [Rustc now dynamically links to `libz` (also called `zlib`) on Linux.][74420]
3462 The library will need to be installed for `rustc` to work, even though we
3463 expect it to be already available on most systems.
3464 - [Tests annotated with `#[should_panic]` are broken on ARMv7 while running
3465 under QEMU.][74820]
3466 - [Pretty printing of some tokens in procedural macros changed.][75453] The
3467 exact output returned by rustc's pretty printing is an unstable
3468 implementation detail: we recommend any macro relying on it to switch to a
3469 more robust parsing system.
3470
3471 [75453]: https://github.com/rust-lang/rust/issues/75453/
3472 [74820]: https://github.com/rust-lang/rust/issues/74820/
3473 [74420]: https://github.com/rust-lang/rust/issues/74420/
3474 [74109]: https://github.com/rust-lang/rust/pull/74109/
3475 [74150]: https://github.com/rust-lang/rust/pull/74150/
3476 [73862]: https://github.com/rust-lang/rust/pull/73862/
3477 [73887]: https://github.com/rust-lang/rust/pull/73887/
3478 [73466]: https://github.com/rust-lang/rust/pull/73466/
3479 [73516]: https://github.com/rust-lang/rust/pull/73516/
3480 [73293]: https://github.com/rust-lang/rust/pull/73293/
3481 [73007]: https://github.com/rust-lang/rust/pull/73007/
3482 [73032]: https://github.com/rust-lang/rust/pull/73032/
3483 [72920]: https://github.com/rust-lang/rust/pull/72920/
3484 [72569]: https://github.com/rust-lang/rust/pull/72569/
3485 [72583]: https://github.com/rust-lang/rust/pull/72583/
3486 [72584]: https://github.com/rust-lang/rust/pull/72584/
3487 [72717]: https://github.com/rust-lang/rust/pull/72717/
3488 [72437]: https://github.com/rust-lang/rust/pull/72437/
3489 [72445]: https://github.com/rust-lang/rust/pull/72445/
3490 [72486]: https://github.com/rust-lang/rust/pull/72486/
3491 [72493]: https://github.com/rust-lang/rust/pull/72493/
3492 [72331]: https://github.com/rust-lang/rust/pull/72331/
3493 [71896]: https://github.com/rust-lang/rust/pull/71896/
3494 [71660]: https://github.com/rust-lang/rust/pull/71660/
3495 [71322]: https://github.com/rust-lang/rust/pull/71322/
3496 [70740]: https://github.com/rust-lang/rust/pull/70740/
3497 [cargo/8270]: https://github.com/rust-lang/cargo/pull/8270/
3498 [cargo/8325]: https://github.com/rust-lang/cargo/pull/8325/
3499 [cargo/8387]: https://github.com/rust-lang/cargo/pull/8387/
3500 [`Option::zip`]: https://doc.rust-lang.org/stable/std/option/enum.Option.html#method.zip
3501 [`vec::Drain::as_slice`]: https://doc.rust-lang.org/stable/std/vec/struct.Drain.html#method.as_slice
3502
3503
3504 Version 1.45.2 (2020-08-03)
3505 ==========================
3506
3507 * [Fix bindings in tuple struct patterns][74954]
3508 * [Fix track_caller integration with trait objects][74784]
3509
3510 [74954]: https://github.com/rust-lang/rust/issues/74954
3511 [74784]: https://github.com/rust-lang/rust/issues/74784
3512
3513
3514 Version 1.45.1 (2020-07-30)
3515 ==========================
3516
3517 * [Fix const propagation with references.][73613]
3518 * [rustfmt accepts rustfmt_skip in cfg_attr again.][73078]
3519 * [Avoid spurious implicit region bound.][74509]
3520 * [Install clippy on x.py install][74457]
3521
3522 [73613]: https://github.com/rust-lang/rust/pull/73613
3523 [73078]: https://github.com/rust-lang/rust/issues/73078
3524 [74509]: https://github.com/rust-lang/rust/pull/74509
3525 [74457]: https://github.com/rust-lang/rust/pull/74457
3526
3527
3528 Version 1.45.0 (2020-07-16)
3529 ==========================
3530
3531 Language
3532 --------
3533 - [Out of range float to int conversions using `as` has been defined as a saturating
3534 conversion.][71269] This was previously undefined behaviour, but you can use the
3535 `{f64, f32}::to_int_unchecked` methods to continue using the current behaviour, which
3536 may be desirable in rare performance sensitive situations.
3537 - [`mem::Discriminant<T>` now uses `T`'s discriminant type instead of always
3538 using `u64`.][70705]
3539 - [Function like procedural macros can now be used in expression, pattern, and statement
3540 positions.][68717] This means you can now use a function-like procedural macro
3541 anywhere you can use a declarative (`macro_rules!`) macro.
3542
3543 Compiler
3544 --------
3545 - [You can now override individual target features through the `target-feature`
3546 flag.][72094] E.g. `-C target-feature=+avx2 -C target-feature=+fma` is now
3547 equivalent to `-C target-feature=+avx2,+fma`.
3548 - [Added the `force-unwind-tables` flag.][69984] This option allows
3549 rustc to always generate unwind tables regardless of panic strategy.
3550 - [Added the `embed-bitcode` flag.][71716] This codegen flag allows rustc
3551 to include LLVM bitcode into generated `rlib`s (this is on by default).
3552 - [Added the `tiny` value to the `code-model` codegen flag.][72397]
3553 - [Added tier 3 support\* for the `mipsel-sony-psp` target.][72062]
3554 - [Added tier 3 support for the `thumbv7a-uwp-windows-msvc` target.][72133]
3555 - [Upgraded to LLVM 10.][67759]
3556
3557 \* Refer to Rust's [platform support page][platform-support-doc] for more
3558 information on Rust's tiered platform support.
3559
3560
3561 Libraries
3562 ---------
3563 - [`net::{SocketAddr, SocketAddrV4, SocketAddrV6}` now implements `PartialOrd`
3564 and `Ord`.][72239]
3565 - [`proc_macro::TokenStream` now implements `Default`.][72234]
3566 - [You can now use `char` with
3567 `ops::{Range, RangeFrom, RangeFull, RangeInclusive, RangeTo}` to iterate over
3568 a range of codepoints.][72413] E.g.
3569 you can now write the following;
3570 ```rust
3571 for ch in 'a'..='z' {
3572 print!("{}", ch);
3573 }
3574 println!();
3575 // Prints "abcdefghijklmnopqrstuvwxyz"
3576 ```
3577 - [`OsString` now implements `FromStr`.][71662]
3578 - [The `saturating_neg` method has been added to all signed integer primitive
3579 types, and the `saturating_abs` method has been added for all integer
3580 primitive types.][71886]
3581 - [`Arc<T>`, `Rc<T>` now implement `From<Cow<'_, T>>`, and `Box` now
3582 implements `From<Cow>` when `T` is `[T: Copy]`, `str`, `CStr`, `OsStr`,
3583 or `Path`.][71447]
3584 - [`Box<[T]>` now implements `From<[T; N]>`.][71095]
3585 - [`BitOr` and `BitOrAssign` are implemented for all `NonZero`
3586 integer types.][69813]
3587 - [The `fetch_min`, and `fetch_max` methods have been added to all atomic
3588 integer types.][72324]
3589 - [The `fetch_update` method has been added to all atomic integer types.][71843]
3590
3591 Stabilized APIs
3592 ---------------
3593 - [`Arc::as_ptr`]
3594 - [`BTreeMap::remove_entry`]
3595 - [`Rc::as_ptr`]
3596 - [`rc::Weak::as_ptr`]
3597 - [`rc::Weak::from_raw`]
3598 - [`rc::Weak::into_raw`]
3599 - [`str::strip_prefix`]
3600 - [`str::strip_suffix`]
3601 - [`sync::Weak::as_ptr`]
3602 - [`sync::Weak::from_raw`]
3603 - [`sync::Weak::into_raw`]
3604 - [`char::UNICODE_VERSION`]
3605 - [`Span::resolved_at`]
3606 - [`Span::located_at`]
3607 - [`Span::mixed_site`]
3608 - [`unix::process::CommandExt::arg0`]
3609
3610 Cargo
3611 -----
3612
3613 - [Cargo uses the `embed-bitcode` flag to optimize disk usage and build
3614 time.][cargo/8066]
3615
3616 Misc
3617 ----
3618 - [Rustdoc now supports strikethrough text in Markdown.][71928] E.g.
3619 `~~outdated information~~` becomes "~~outdated information~~".
3620 - [Added an emoji to Rustdoc's deprecated API message.][72014]
3621
3622 Compatibility Notes
3623 -------------------
3624 - [Trying to self initialize a static value (that is creating a value using
3625 itself) is unsound and now causes a compile error.][71140]
3626 - [`{f32, f64}::powi` now returns a slightly different value on Windows.][73420]
3627 This is due to changes in LLVM's intrinsics which `{f32, f64}::powi` uses.
3628 - [Rustdoc's CLI's extra error exit codes have been removed.][71900] These were
3629 previously undocumented and not intended for public use. Rustdoc still provides
3630 a non-zero exit code on errors.
3631 - [Rustc's `lto` flag is incompatible with the new `embed-bitcode=no`.][71848]
3632 This may cause issues if LTO is enabled through `RUSTFLAGS` or `cargo rustc`
3633 flags while cargo is adding `embed-bitcode` itself. The recommended way to
3634 control LTO is with Cargo profiles, either in `Cargo.toml` or `.cargo/config`,
3635 or by setting `CARGO_PROFILE_<name>_LTO` in the environment.
3636
3637 Internals Only
3638 --------------
3639 - [Make clippy a git subtree instead of a git submodule][70655]
3640 - [Unify the undo log of all snapshot types][69464]
3641
3642 [71848]: https://github.com/rust-lang/rust/issues/71848/
3643 [73420]: https://github.com/rust-lang/rust/issues/73420/
3644 [72324]: https://github.com/rust-lang/rust/pull/72324/
3645 [71843]: https://github.com/rust-lang/rust/pull/71843/
3646 [71886]: https://github.com/rust-lang/rust/pull/71886/
3647 [72234]: https://github.com/rust-lang/rust/pull/72234/
3648 [72239]: https://github.com/rust-lang/rust/pull/72239/
3649 [72397]: https://github.com/rust-lang/rust/pull/72397/
3650 [72413]: https://github.com/rust-lang/rust/pull/72413/
3651 [72014]: https://github.com/rust-lang/rust/pull/72014/
3652 [72062]: https://github.com/rust-lang/rust/pull/72062/
3653 [72094]: https://github.com/rust-lang/rust/pull/72094/
3654 [72133]: https://github.com/rust-lang/rust/pull/72133/
3655 [67759]: https://github.com/rust-lang/rust/pull/67759/
3656 [71900]: https://github.com/rust-lang/rust/pull/71900/
3657 [71928]: https://github.com/rust-lang/rust/pull/71928/
3658 [71662]: https://github.com/rust-lang/rust/pull/71662/
3659 [71716]: https://github.com/rust-lang/rust/pull/71716/
3660 [71447]: https://github.com/rust-lang/rust/pull/71447/
3661 [71269]: https://github.com/rust-lang/rust/pull/71269/
3662 [71095]: https://github.com/rust-lang/rust/pull/71095/
3663 [71140]: https://github.com/rust-lang/rust/pull/71140/
3664 [70655]: https://github.com/rust-lang/rust/pull/70655/
3665 [70705]: https://github.com/rust-lang/rust/pull/70705/
3666 [69984]: https://github.com/rust-lang/rust/pull/69984/
3667 [69813]: https://github.com/rust-lang/rust/pull/69813/
3668 [69464]: https://github.com/rust-lang/rust/pull/69464/
3669 [68717]: https://github.com/rust-lang/rust/pull/68717/
3670 [cargo/8066]: https://github.com/rust-lang/cargo/pull/8066
3671 [`Arc::as_ptr`]: https://doc.rust-lang.org/stable/std/sync/struct.Arc.html#method.as_ptr
3672 [`BTreeMap::remove_entry`]: https://doc.rust-lang.org/stable/std/collections/struct.BTreeMap.html#method.remove_entry
3673 [`Rc::as_ptr`]: https://doc.rust-lang.org/stable/std/rc/struct.Rc.html#method.as_ptr
3674 [`rc::Weak::as_ptr`]: https://doc.rust-lang.org/stable/std/rc/struct.Weak.html#method.as_ptr
3675 [`rc::Weak::from_raw`]: https://doc.rust-lang.org/stable/std/rc/struct.Weak.html#method.from_raw
3676 [`rc::Weak::into_raw`]: https://doc.rust-lang.org/stable/std/rc/struct.Weak.html#method.into_raw
3677 [`sync::Weak::as_ptr`]: https://doc.rust-lang.org/stable/std/sync/struct.Weak.html#method.as_ptr
3678 [`sync::Weak::from_raw`]: https://doc.rust-lang.org/stable/std/sync/struct.Weak.html#method.from_raw
3679 [`sync::Weak::into_raw`]: https://doc.rust-lang.org/stable/std/sync/struct.Weak.html#method.into_raw
3680 [`str::strip_prefix`]: https://doc.rust-lang.org/stable/std/primitive.str.html#method.strip_prefix
3681 [`str::strip_suffix`]: https://doc.rust-lang.org/stable/std/primitive.str.html#method.strip_suffix
3682 [`char::UNICODE_VERSION`]: https://doc.rust-lang.org/stable/std/char/constant.UNICODE_VERSION.html
3683 [`Span::resolved_at`]: https://doc.rust-lang.org/stable/proc_macro/struct.Span.html#method.resolved_at
3684 [`Span::located_at`]: https://doc.rust-lang.org/stable/proc_macro/struct.Span.html#method.located_at
3685 [`Span::mixed_site`]: https://doc.rust-lang.org/stable/proc_macro/struct.Span.html#method.mixed_site
3686 [`unix::process::CommandExt::arg0`]: https://doc.rust-lang.org/std/os/unix/process/trait.CommandExt.html#tymethod.arg0
3687
3688
3689 Version 1.44.1 (2020-06-18)
3690 ===========================
3691
3692 * [rustfmt accepts rustfmt_skip in cfg_attr again.][73078]
3693 * [Don't hash executable filenames on apple platforms, fixing backtraces.][cargo/8329]
3694 * [Fix crashes when finding backtrace on macOS.][71397]
3695 * [Clippy applies lint levels into different files.][clippy/5356]
3696
3697 [71397]: https://github.com/rust-lang/rust/issues/71397
3698 [73078]: https://github.com/rust-lang/rust/issues/73078
3699 [cargo/8329]: https://github.com/rust-lang/cargo/pull/8329
3700 [clippy/5356]: https://github.com/rust-lang/rust-clippy/issues/5356
3701
3702
3703 Version 1.44.0 (2020-06-04)
3704 ==========================
3705
3706 Language
3707 --------
3708 - [You can now use `async/.await` with `#[no_std]` enabled.][69033]
3709 - [Added the `unused_braces` lint.][70081]
3710
3711 **Syntax-only changes**
3712
3713 - [Expansion-driven outline module parsing][69838]
3714 ```rust
3715 #[cfg(FALSE)]
3716 mod foo {
3717 mod bar {
3718 mod baz; // `foo/bar/baz.rs` doesn't exist, but no error!
3719 }
3720 }
3721 ```
3722
3723 These are still rejected semantically, so you will likely receive an error but
3724 these changes can be seen and parsed by macros and conditional compilation.
3725
3726 Compiler
3727 --------
3728 - [Rustc now respects the `-C codegen-units` flag in incremental mode.][70156]
3729 Additionally when in incremental mode rustc defaults to 256 codegen units.
3730 - [Refactored `catch_unwind` to have zero-cost, unless unwinding is enabled and
3731 a panic is thrown.][67502]
3732 - [Added tier 3\* support for the `aarch64-unknown-none` and
3733 `aarch64-unknown-none-softfloat` targets.][68334]
3734 - [Added tier 3 support for `arm64-apple-tvos` and
3735 `x86_64-apple-tvos` targets.][68191]
3736
3737
3738 Libraries
3739 ---------
3740 - [Special cased `vec![]` to map directly to `Vec::new()`.][70632] This allows
3741 `vec![]` to be able to be used in `const` contexts.
3742 - [`convert::Infallible` now implements `Hash`.][70281]
3743 - [`OsString` now implements `DerefMut` and `IndexMut` returning
3744 a `&mut OsStr`.][70048]
3745 - [Unicode 13 is now supported.][69929]
3746 - [`String` now implements `From<&mut str>`.][69661]
3747 - [`IoSlice` now implements `Copy`.][69403]
3748 - [`Vec<T>` now implements `From<[T; N]>`.][68692] Where `N` is at most 32.
3749 - [`proc_macro::LexError` now implements `fmt::Display` and `Error`.][68899]
3750 - [`from_le_bytes`, `to_le_bytes`, `from_be_bytes`, `to_be_bytes`,
3751 `from_ne_bytes`, and `to_ne_bytes` methods are now `const` for all
3752 integer types.][69373]
3753
3754 Stabilized APIs
3755 ---------------
3756 - [`PathBuf::with_capacity`]
3757 - [`PathBuf::capacity`]
3758 - [`PathBuf::clear`]
3759 - [`PathBuf::reserve`]
3760 - [`PathBuf::reserve_exact`]
3761 - [`PathBuf::shrink_to_fit`]
3762 - [`f32::to_int_unchecked`]
3763 - [`f64::to_int_unchecked`]
3764 - [`Layout::align_to`]
3765 - [`Layout::pad_to_align`]
3766 - [`Layout::array`]
3767 - [`Layout::extend`]
3768
3769 Cargo
3770 -----
3771 - [Added the `cargo tree` command which will print a tree graph of
3772 your dependencies.][cargo/8062] E.g.
3773 ```
3774 mdbook v0.3.2 (/Users/src/rust/mdbook)
3775 ├── ammonia v3.0.0
3776 │ ├── html5ever v0.24.0
3777 │ │ ├── log v0.4.8
3778 │ │ │ └── cfg-if v0.1.9
3779 │ │ ├── mac v0.1.1
3780 │ │ └── markup5ever v0.9.0
3781 │ │ ├── log v0.4.8 (*)
3782 │ │ ├── phf v0.7.24
3783 │ │ │ └── phf_shared v0.7.24
3784 │ │ │ ├── siphasher v0.2.3
3785 │ │ │ └── unicase v1.4.2
3786 │ │ │ [build-dependencies]
3787 │ │ │ └── version_check v0.1.5
3788 ...
3789 ```
3790 You can also display dependencies on multiple versions of the same crate with
3791 `cargo tree -d` (short for `cargo tree --duplicates`).
3792
3793 Misc
3794 ----
3795 - [Rustdoc now allows you to specify `--crate-version` to have rustdoc include
3796 the version in the sidebar.][69494]
3797
3798 Compatibility Notes
3799 -------------------
3800 - [Rustc now correctly generates static libraries on Windows GNU targets with
3801 the `.a` extension, rather than the previous `.lib`.][70937]
3802 - [Removed the `-C no_integrated_as` flag from rustc.][70345]
3803 - [The `file_name` property in JSON output of macro errors now points the actual
3804 source file rather than the previous format of `<NAME macros>`.][70969]
3805 **Note:** this may not point to a file that actually exists on the user's system.
3806 - [The minimum required external LLVM version has been bumped to LLVM 8.][71147]
3807 - [`mem::{zeroed, uninitialised}` will now panic when used with types that do
3808 not allow zero initialization such as `NonZeroU8`.][66059] This was
3809 previously a warning.
3810 - [In 1.45.0 (the next release) converting a `f64` to `u32` using the `as`
3811 operator has been defined as a saturating operation.][71269] This was previously
3812 undefined behaviour, but you can use the `{f64, f32}::to_int_unchecked` methods to
3813 continue using the current behaviour, which may be desirable in rare performance
3814 sensitive situations.
3815
3816 Internal Only
3817 -------------
3818 These changes provide no direct user facing benefits, but represent significant
3819 improvements to the internals and overall performance of rustc and
3820 related tools.
3821
3822 - [dep_graph Avoid allocating a set on when the number reads are small.][69778]
3823 - [Replace big JS dict with JSON parsing.][71250]
3824
3825 [69373]: https://github.com/rust-lang/rust/pull/69373/
3826 [66059]: https://github.com/rust-lang/rust/pull/66059/
3827 [68191]: https://github.com/rust-lang/rust/pull/68191/
3828 [68899]: https://github.com/rust-lang/rust/pull/68899/
3829 [71147]: https://github.com/rust-lang/rust/pull/71147/
3830 [71250]: https://github.com/rust-lang/rust/pull/71250/
3831 [70937]: https://github.com/rust-lang/rust/pull/70937/
3832 [70969]: https://github.com/rust-lang/rust/pull/70969/
3833 [70632]: https://github.com/rust-lang/rust/pull/70632/
3834 [70281]: https://github.com/rust-lang/rust/pull/70281/
3835 [70345]: https://github.com/rust-lang/rust/pull/70345/
3836 [70048]: https://github.com/rust-lang/rust/pull/70048/
3837 [70081]: https://github.com/rust-lang/rust/pull/70081/
3838 [70156]: https://github.com/rust-lang/rust/pull/70156/
3839 [71269]: https://github.com/rust-lang/rust/pull/71269/
3840 [69838]: https://github.com/rust-lang/rust/pull/69838/
3841 [69929]: https://github.com/rust-lang/rust/pull/69929/
3842 [69661]: https://github.com/rust-lang/rust/pull/69661/
3843 [69778]: https://github.com/rust-lang/rust/pull/69778/
3844 [69494]: https://github.com/rust-lang/rust/pull/69494/
3845 [69403]: https://github.com/rust-lang/rust/pull/69403/
3846 [69033]: https://github.com/rust-lang/rust/pull/69033/
3847 [68692]: https://github.com/rust-lang/rust/pull/68692/
3848 [68334]: https://github.com/rust-lang/rust/pull/68334/
3849 [67502]: https://github.com/rust-lang/rust/pull/67502/
3850 [cargo/8062]: https://github.com/rust-lang/cargo/pull/8062/
3851 [`PathBuf::with_capacity`]: https://doc.rust-lang.org/std/path/struct.PathBuf.html#method.with_capacity
3852 [`PathBuf::capacity`]: https://doc.rust-lang.org/std/path/struct.PathBuf.html#method.capacity
3853 [`PathBuf::clear`]: https://doc.rust-lang.org/std/path/struct.PathBuf.html#method.clear
3854 [`PathBuf::reserve`]: https://doc.rust-lang.org/std/path/struct.PathBuf.html#method.reserve
3855 [`PathBuf::reserve_exact`]: https://doc.rust-lang.org/std/path/struct.PathBuf.html#method.reserve_exact
3856 [`PathBuf::shrink_to_fit`]: https://doc.rust-lang.org/std/path/struct.PathBuf.html#method.shrink_to_fit
3857 [`f32::to_int_unchecked`]: https://doc.rust-lang.org/std/primitive.f32.html#method.to_int_unchecked
3858 [`f64::to_int_unchecked`]: https://doc.rust-lang.org/std/primitive.f64.html#method.to_int_unchecked
3859 [`Layout::align_to`]: https://doc.rust-lang.org/std/alloc/struct.Layout.html#method.align_to
3860 [`Layout::pad_to_align`]: https://doc.rust-lang.org/std/alloc/struct.Layout.html#method.pad_to_align
3861 [`Layout::array`]: https://doc.rust-lang.org/std/alloc/struct.Layout.html#method.array
3862 [`Layout::extend`]: https://doc.rust-lang.org/std/alloc/struct.Layout.html#method.extend
3863
3864
3865 Version 1.43.1 (2020-05-07)
3866 ===========================
3867
3868 * [Updated openssl-src to 1.1.1g for CVE-2020-1967.][71430]
3869 * [Fixed the stabilization of AVX-512 features.][71473]
3870 * [Fixed `cargo package --list` not working with unpublished dependencies.][cargo/8151]
3871
3872 [71430]: https://github.com/rust-lang/rust/pull/71430
3873 [71473]: https://github.com/rust-lang/rust/issues/71473
3874 [cargo/8151]: https://github.com/rust-lang/cargo/issues/8151
3875
3876
3877 Version 1.43.0 (2020-04-23)
3878 ==========================
3879
3880 Language
3881 --------
3882 - [Fixed using binary operations with `&{number}` (e.g. `&1.0`) not having
3883 the type inferred correctly.][68129]
3884 - [Attributes such as `#[cfg()]` can now be used on `if` expressions.][69201]
3885
3886 **Syntax only changes**
3887 - [Allow `type Foo: Ord` syntactically.][69361]
3888 - [Fuse associated and extern items up to defaultness.][69194]
3889 - [Syntactically allow `self` in all `fn` contexts.][68764]
3890 - [Merge `fn` syntax + cleanup item parsing.][68728]
3891 - [`item` macro fragments can be interpolated into `trait`s, `impl`s, and `extern` blocks.][69366]
3892 For example, you may now write:
3893 ```rust
3894 macro_rules! mac_trait {
3895 ($i:item) => {
3896 trait T { $i }
3897 }
3898 }
3899 mac_trait! {
3900 fn foo() {}
3901 }
3902 ```
3903
3904 These are still rejected *semantically*, so you will likely receive an error but
3905 these changes can be seen and parsed by macros and
3906 conditional compilation.
3907
3908
3909 Compiler
3910 --------
3911 - [You can now pass multiple lint flags to rustc to override the previous
3912 flags.][67885] For example; `rustc -D unused -A unused-variables` denies
3913 everything in the `unused` lint group except `unused-variables` which
3914 is explicitly allowed. However, passing `rustc -A unused-variables -D unused` denies
3915 everything in the `unused` lint group **including** `unused-variables` since
3916 the allow flag is specified before the deny flag (and therefore overridden).
3917 - [rustc will now prefer your system MinGW libraries over its bundled libraries
3918 if they are available on `windows-gnu`.][67429]
3919 - [rustc now buffers errors/warnings printed in JSON.][69227]
3920
3921 Libraries
3922 ---------
3923 - [`Arc<[T; N]>`, `Box<[T; N]>`, and `Rc<[T; N]>`, now implement
3924 `TryFrom<Arc<[T]>>`,`TryFrom<Box<[T]>>`, and `TryFrom<Rc<[T]>>`
3925 respectively.][69538] **Note** These conversions are only available when `N`
3926 is `0..=32`.
3927 - [You can now use associated constants on floats and integers directly, rather
3928 than having to import the module.][68952] e.g. You can now write `u32::MAX` or
3929 `f32::NAN` with no imports.
3930 - [`u8::is_ascii` is now `const`.][68984]
3931 - [`String` now implements `AsMut<str>`.][68742]
3932 - [Added the `primitive` module to `std` and `core`.][67637] This module
3933 reexports Rust's primitive types. This is mainly useful in macros
3934 where you want avoid these types being shadowed.
3935 - [Relaxed some of the trait bounds on `HashMap` and `HashSet`.][67642]
3936 - [`string::FromUtf8Error` now implements `Clone + Eq`.][68738]
3937
3938 Stabilized APIs
3939 ---------------
3940 - [`Once::is_completed`]
3941 - [`f32::LOG10_2`]
3942 - [`f32::LOG2_10`]
3943 - [`f64::LOG10_2`]
3944 - [`f64::LOG2_10`]
3945 - [`iter::once_with`]
3946
3947 Cargo
3948 -----
3949 - [You can now set config `[profile]`s in your `.cargo/config`, or through
3950 your environment.][cargo/7823]
3951 - [Cargo will now set `CARGO_BIN_EXE_<name>` pointing to a binary's
3952 executable path when running integration tests or benchmarks.][cargo/7697]
3953 `<name>` is the name of your binary as-is e.g. If you wanted the executable
3954 path for a binary named `my-program`you would use `env!("CARGO_BIN_EXE_my-program")`.
3955
3956 Misc
3957 ----
3958 - [Certain checks in the `const_err` lint were deemed unrelated to const
3959 evaluation][69185], and have been moved to the `unconditional_panic` and
3960 `arithmetic_overflow` lints.
3961
3962 Compatibility Notes
3963 -------------------
3964
3965 - [Having trailing syntax in the `assert!` macro is now a hard error.][69548] This
3966 has been a warning since 1.36.0.
3967 - [Fixed `Self` not having the correctly inferred type.][69340] This incorrectly
3968 led to some instances being accepted, and now correctly emits a hard error.
3969
3970 [69340]: https://github.com/rust-lang/rust/pull/69340
3971
3972 Internal Only
3973 -------------
3974 These changes provide no direct user facing benefits, but represent significant
3975 improvements to the internals and overall performance of `rustc` and
3976 related tools.
3977
3978 - [All components are now built with `opt-level=3` instead of `2`.][67878]
3979 - [Improved how rustc generates drop code.][67332]
3980 - [Improved performance from `#[inline]`-ing certain hot functions.][69256]
3981 - [traits: preallocate 2 Vecs of known initial size][69022]
3982 - [Avoid exponential behaviour when relating types][68772]
3983 - [Skip `Drop` terminators for enum variants without drop glue][68943]
3984 - [Improve performance of coherence checks][68966]
3985 - [Deduplicate types in the generator witness][68672]
3986 - [Invert control in struct_lint_level.][68725]
3987
3988 [67332]: https://github.com/rust-lang/rust/pull/67332/
3989 [67429]: https://github.com/rust-lang/rust/pull/67429/
3990 [67637]: https://github.com/rust-lang/rust/pull/67637/
3991 [67642]: https://github.com/rust-lang/rust/pull/67642/
3992 [67878]: https://github.com/rust-lang/rust/pull/67878/
3993 [67885]: https://github.com/rust-lang/rust/pull/67885/
3994 [68129]: https://github.com/rust-lang/rust/pull/68129/
3995 [68672]: https://github.com/rust-lang/rust/pull/68672/
3996 [68725]: https://github.com/rust-lang/rust/pull/68725/
3997 [68728]: https://github.com/rust-lang/rust/pull/68728/
3998 [68738]: https://github.com/rust-lang/rust/pull/68738/
3999 [68742]: https://github.com/rust-lang/rust/pull/68742/
4000 [68764]: https://github.com/rust-lang/rust/pull/68764/
4001 [68772]: https://github.com/rust-lang/rust/pull/68772/
4002 [68943]: https://github.com/rust-lang/rust/pull/68943/
4003 [68952]: https://github.com/rust-lang/rust/pull/68952/
4004 [68966]: https://github.com/rust-lang/rust/pull/68966/
4005 [68984]: https://github.com/rust-lang/rust/pull/68984/
4006 [69022]: https://github.com/rust-lang/rust/pull/69022/
4007 [69185]: https://github.com/rust-lang/rust/pull/69185/
4008 [69194]: https://github.com/rust-lang/rust/pull/69194/
4009 [69201]: https://github.com/rust-lang/rust/pull/69201/
4010 [69227]: https://github.com/rust-lang/rust/pull/69227/
4011 [69548]: https://github.com/rust-lang/rust/pull/69548/
4012 [69256]: https://github.com/rust-lang/rust/pull/69256/
4013 [69361]: https://github.com/rust-lang/rust/pull/69361/
4014 [69366]: https://github.com/rust-lang/rust/pull/69366/
4015 [69538]: https://github.com/rust-lang/rust/pull/69538/
4016 [cargo/7823]: https://github.com/rust-lang/cargo/pull/7823
4017 [cargo/7697]: https://github.com/rust-lang/cargo/pull/7697
4018 [`Once::is_completed`]: https://doc.rust-lang.org/std/sync/struct.Once.html#method.is_completed
4019 [`f32::LOG10_2`]: https://doc.rust-lang.org/std/f32/consts/constant.LOG10_2.html
4020 [`f32::LOG2_10`]: https://doc.rust-lang.org/std/f32/consts/constant.LOG2_10.html
4021 [`f64::LOG10_2`]: https://doc.rust-lang.org/std/f64/consts/constant.LOG10_2.html
4022 [`f64::LOG2_10`]: https://doc.rust-lang.org/std/f64/consts/constant.LOG2_10.html
4023 [`iter::once_with`]: https://doc.rust-lang.org/std/iter/fn.once_with.html
4024
4025
4026 Version 1.42.0 (2020-03-12)
4027 ==========================
4028
4029 Language
4030 --------
4031 - [You can now use the slice pattern syntax with subslices.][67712] e.g.
4032 ```rust
4033 fn foo(words: &[&str]) {
4034 match words {
4035 ["Hello", "World", "!", ..] => println!("Hello World!"),
4036 ["Foo", "Bar", ..] => println!("Baz"),
4037 rest => println!("{:?}", rest),
4038 }
4039 }
4040 ```
4041 - [You can now use `#[repr(transparent)]` on univariant `enum`s.][68122] Meaning
4042 that you can create an enum that has the exact layout and ABI of the type
4043 it contains.
4044 - [You can now use outer attribute procedural macros on inline modules.][64273]
4045 - [There are some *syntax-only* changes:][67131]
4046 - `default` is syntactically allowed before items in `trait` definitions.
4047 - Items in `impl`s (i.e. `const`s, `type`s, and `fn`s) may syntactically
4048 leave out their bodies in favor of `;`.
4049 - Bounds on associated types in `impl`s are now syntactically allowed
4050 (e.g. `type Foo: Ord;`).
4051 - `...` (the C-variadic type) may occur syntactically directly as the type of
4052 any function parameter.
4053
4054 These are still rejected *semantically*, so you will likely receive an error
4055 but these changes can be seen and parsed by procedural macros and
4056 conditional compilation.
4057
4058 Compiler
4059 --------
4060 - [Added tier 2\* support for `armv7a-none-eabi`.][68253]
4061 - [Added tier 2 support for `riscv64gc-unknown-linux-gnu`.][68339]
4062 - [`Option::{expect,unwrap}` and
4063 `Result::{expect, expect_err, unwrap, unwrap_err}` now produce panic messages
4064 pointing to the location where they were called, rather than
4065 `core`'s internals. ][67887]
4066
4067 \* Refer to Rust's [platform support page][platform-support-doc] for more
4068 information on Rust's tiered platform support.
4069
4070 Libraries
4071 ---------
4072 - [`iter::Empty<T>` now implements `Send` and `Sync` for any `T`.][68348]
4073 - [`Pin::{map_unchecked, map_unchecked_mut}` no longer require the return type
4074 to implement `Sized`.][67935]
4075 - [`io::Cursor` now derives `PartialEq` and `Eq`.][67233]
4076 - [`Layout::new` is now `const`.][66254]
4077 - [Added Standard Library support for `riscv64gc-unknown-linux-gnu`.][66899]
4078
4079
4080 Stabilized APIs
4081 ---------------
4082 - [`CondVar::wait_while`]
4083 - [`CondVar::wait_timeout_while`]
4084 - [`DebugMap::key`]
4085 - [`DebugMap::value`]
4086 - [`ManuallyDrop::take`]
4087 - [`matches!`]
4088 - [`ptr::slice_from_raw_parts_mut`]
4089 - [`ptr::slice_from_raw_parts`]
4090
4091 Cargo
4092 -----
4093 - [You no longer need to include `extern crate proc_macro;` to be able to
4094 `use proc_macro;` in the `2018` edition.][cargo/7700]
4095
4096 Compatibility Notes
4097 -------------------
4098 - [`Error::description` has been deprecated, and its use will now produce a
4099 warning.][66919] It's recommended to use `Display`/`to_string` instead.
4100
4101 [68253]: https://github.com/rust-lang/rust/pull/68253/
4102 [68348]: https://github.com/rust-lang/rust/pull/68348/
4103 [67935]: https://github.com/rust-lang/rust/pull/67935/
4104 [68339]: https://github.com/rust-lang/rust/pull/68339/
4105 [68122]: https://github.com/rust-lang/rust/pull/68122/
4106 [64273]: https://github.com/rust-lang/rust/pull/64273/
4107 [67712]: https://github.com/rust-lang/rust/pull/67712/
4108 [67887]: https://github.com/rust-lang/rust/pull/67887/
4109 [67131]: https://github.com/rust-lang/rust/pull/67131/
4110 [67233]: https://github.com/rust-lang/rust/pull/67233/
4111 [66899]: https://github.com/rust-lang/rust/pull/66899/
4112 [66919]: https://github.com/rust-lang/rust/pull/66919/
4113 [66254]: https://github.com/rust-lang/rust/pull/66254/
4114 [cargo/7700]: https://github.com/rust-lang/cargo/pull/7700
4115 [`DebugMap::key`]: https://doc.rust-lang.org/stable/std/fmt/struct.DebugMap.html#method.key
4116 [`DebugMap::value`]: https://doc.rust-lang.org/stable/std/fmt/struct.DebugMap.html#method.value
4117 [`ManuallyDrop::take`]: https://doc.rust-lang.org/stable/std/mem/struct.ManuallyDrop.html#method.take
4118 [`matches!`]: https://doc.rust-lang.org/stable/std/macro.matches.html
4119 [`ptr::slice_from_raw_parts_mut`]: https://doc.rust-lang.org/stable/std/ptr/fn.slice_from_raw_parts_mut.html
4120 [`ptr::slice_from_raw_parts`]: https://doc.rust-lang.org/stable/std/ptr/fn.slice_from_raw_parts.html
4121 [`CondVar::wait_while`]: https://doc.rust-lang.org/stable/std/sync/struct.Condvar.html#method.wait_while
4122 [`CondVar::wait_timeout_while`]: https://doc.rust-lang.org/stable/std/sync/struct.Condvar.html#method.wait_timeout_while
4123
4124
4125 Version 1.41.1 (2020-02-27)
4126 ===========================
4127
4128 * [Always check types of static items][69145]
4129 * [Always check lifetime bounds of `Copy` impls][69145]
4130 * [Fix miscompilation in callers of `Layout::repeat`][69225]
4131 * [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].
4132 That announcement did not expect a patch release. 1.41.1 also includes release binaries for these targets.
4133
4134 [69225]: https://github.com/rust-lang/rust/issues/69225
4135 [69145]: https://github.com/rust-lang/rust/pull/69145
4136
4137
4138 Version 1.41.0 (2020-01-30)
4139 ===========================
4140
4141 Language
4142 --------
4143
4144 - [You can now pass type parameters to foreign items when implementing
4145 traits.][65879] E.g. You can now write `impl<T> From<Foo> for Vec<T> {}`.
4146 - [You can now arbitrarily nest receiver types in the `self` position.][64325] E.g. you can
4147 now write `fn foo(self: Box<Box<Self>>) {}`. Previously only `Self`, `&Self`,
4148 `&mut Self`, `Arc<Self>`, `Rc<Self>`, and `Box<Self>` were allowed.
4149 - [You can now use any valid identifier in a `format_args` macro.][66847]
4150 Previously identifiers starting with an underscore were not allowed.
4151 - [Visibility modifiers (e.g. `pub`) are now syntactically allowed on trait items and
4152 enum variants.][66183] These are still rejected semantically, but
4153 can be seen and parsed by procedural macros and conditional compilation.
4154 - [You can now define a Rust `extern "C"` function with `Box<T>` and use `T*` as the corresponding
4155 type on the C side.][62514] Please see [the documentation][box-memory-layout] for more information,
4156 including the important caveat about preferring to avoid `Box<T>` in Rust signatures for functions defined in C.
4157
4158 [box-memory-layout]: https://doc.rust-lang.org/std/boxed/index.html#memory-layout
4159
4160 Compiler
4161 --------
4162
4163 - [Rustc will now warn if you have unused loop `'label`s.][66325]
4164 - [Removed support for the `i686-unknown-dragonfly` target.][67255]
4165 - [Added tier 3 support\* for the `riscv64gc-unknown-linux-gnu` target.][66661]
4166 - [You can now pass an arguments file passing the `@path` syntax
4167 to rustc.][66172] Note that the format differs somewhat from what is
4168 found in other tooling; please see [the documentation][argfile-docs] for
4169 more information.
4170 - [You can now provide `--extern` flag without a path, indicating that it is
4171 available from the search path or specified with an `-L` flag.][64882]
4172
4173 \* Refer to Rust's [platform support page][platform-support-doc] for more
4174 information on Rust's tiered platform support.
4175
4176 [argfile-docs]: https://doc.rust-lang.org/nightly/rustc/command-line-arguments.html#path-load-command-line-flags-from-a-path
4177
4178 Libraries
4179 ---------
4180
4181 - [The `core::panic` module is now stable.][66771] It was already stable
4182 through `std`.
4183 - [`NonZero*` numerics now implement `From<NonZero*>` if it's a smaller integer
4184 width.][66277] E.g. `NonZeroU16` now implements `From<NonZeroU8>`.
4185 - [`MaybeUninit<T>` now implements `fmt::Debug`.][65013]
4186
4187 Stabilized APIs
4188 ---------------
4189
4190 - [`Result::map_or`]
4191 - [`Result::map_or_else`]
4192 - [`std::rc::Weak::weak_count`]
4193 - [`std::rc::Weak::strong_count`]
4194 - [`std::sync::Weak::weak_count`]
4195 - [`std::sync::Weak::strong_count`]
4196
4197 Cargo
4198 -----
4199
4200 - [Cargo will now document all the private items for binary crates
4201 by default.][cargo/7593]
4202 - [`cargo-install` will now reinstall the package if it detects that it is out
4203 of date.][cargo/7560]
4204 - [Cargo.lock now uses a more git friendly format that should help to reduce
4205 merge conflicts.][cargo/7579]
4206 - [You can now override specific dependencies's build settings][cargo/7591] E.g.
4207 `[profile.dev.package.image] opt-level = 2` sets the `image` crate's
4208 optimisation level to `2` for debug builds. You can also use
4209 `[profile.<profile>.build-override]` to override build scripts and
4210 their dependencies.
4211
4212 Misc
4213 ----
4214
4215 - [You can now specify `edition` in documentation code blocks to compile the block
4216 for that edition.][66238] E.g. `edition2018` tells rustdoc that the code sample
4217 should be compiled the 2018 edition of Rust.
4218 - [You can now provide custom themes to rustdoc with `--theme`, and check the
4219 current theme with `--check-theme`.][54733]
4220 - [You can use `#[cfg(doc)]` to compile an item when building documentation.][61351]
4221
4222 Compatibility Notes
4223 -------------------
4224
4225 - [As previously announced 1.41 will be the last tier 1 release for 32-bit
4226 Apple targets.][apple-32bit-drop] This means that the source code is still
4227 available to build, but the targets are no longer being tested and release
4228 binaries for those platforms will no longer be distributed by the Rust project.
4229 Please refer to the linked blog post for more information.
4230
4231 [54733]: https://github.com/rust-lang/rust/pull/54733/
4232 [61351]: https://github.com/rust-lang/rust/pull/61351/
4233 [62514]: https://github.com/rust-lang/rust/pull/62514/
4234 [67255]: https://github.com/rust-lang/rust/pull/67255/
4235 [66661]: https://github.com/rust-lang/rust/pull/66661/
4236 [66771]: https://github.com/rust-lang/rust/pull/66771/
4237 [66847]: https://github.com/rust-lang/rust/pull/66847/
4238 [66238]: https://github.com/rust-lang/rust/pull/66238/
4239 [66277]: https://github.com/rust-lang/rust/pull/66277/
4240 [66325]: https://github.com/rust-lang/rust/pull/66325/
4241 [66172]: https://github.com/rust-lang/rust/pull/66172/
4242 [66183]: https://github.com/rust-lang/rust/pull/66183/
4243 [65879]: https://github.com/rust-lang/rust/pull/65879/
4244 [65013]: https://github.com/rust-lang/rust/pull/65013/
4245 [64882]: https://github.com/rust-lang/rust/pull/64882/
4246 [64325]: https://github.com/rust-lang/rust/pull/64325/
4247 [cargo/7560]: https://github.com/rust-lang/cargo/pull/7560/
4248 [cargo/7579]: https://github.com/rust-lang/cargo/pull/7579/
4249 [cargo/7591]: https://github.com/rust-lang/cargo/pull/7591/
4250 [cargo/7593]: https://github.com/rust-lang/cargo/pull/7593/
4251 [`Result::map_or_else`]: https://doc.rust-lang.org/std/result/enum.Result.html#method.map_or_else
4252 [`Result::map_or`]: https://doc.rust-lang.org/std/result/enum.Result.html#method.map_or
4253 [`std::rc::Weak::weak_count`]: https://doc.rust-lang.org/std/rc/struct.Weak.html#method.weak_count
4254 [`std::rc::Weak::strong_count`]: https://doc.rust-lang.org/std/rc/struct.Weak.html#method.strong_count
4255 [`std::sync::Weak::weak_count`]: https://doc.rust-lang.org/std/sync/struct.Weak.html#method.weak_count
4256 [`std::sync::Weak::strong_count`]: https://doc.rust-lang.org/std/sync/struct.Weak.html#method.strong_count
4257 [apple-32bit-drop]: https://blog.rust-lang.org/2020/01/03/reducing-support-for-32-bit-apple-targets.html
4258
4259 Version 1.40.0 (2019-12-19)
4260 ===========================
4261
4262 Language
4263 --------
4264 - [You can now use tuple `struct`s and tuple `enum` variant's constructors in
4265 `const` contexts.][65188] e.g.
4266
4267 ```rust
4268 pub struct Point(i32, i32);
4269
4270 const ORIGIN: Point = {
4271 let constructor = Point;
4272
4273 constructor(0, 0)
4274 };
4275 ```
4276
4277 - [You can now mark `struct`s, `enum`s, and `enum` variants with the `#[non_exhaustive]` attribute to
4278 indicate that there may be variants or fields added in the future.][64639]
4279 For example this requires adding a wild-card branch (`_ => {}`) to any match
4280 statements on a non-exhaustive `enum`. [(RFC 2008)]
4281 - [You can now use function-like procedural macros in `extern` blocks and in
4282 type positions.][63931] e.g. `type Generated = macro!();`
4283 - [Function-like and attribute procedural macros can now emit
4284 `macro_rules!` items, so you can now have your macros generate macros.][64035]
4285 - [The `meta` pattern matcher in `macro_rules!` now correctly matches the modern
4286 attribute syntax.][63674] For example `(#[$m:meta])` now matches `#[attr]`,
4287 `#[attr{tokens}]`, `#[attr[tokens]]`, and `#[attr(tokens)]`.
4288
4289 Compiler
4290 --------
4291 - [Added tier 3 support\* for the
4292 `thumbv7neon-unknown-linux-musleabihf` target.][66103]
4293 - [Added tier 3 support for the
4294 `aarch64-unknown-none-softfloat` target.][64589]
4295 - [Added tier 3 support for the `mips64-unknown-linux-muslabi64`, and
4296 `mips64el-unknown-linux-muslabi64` targets.][65843]
4297
4298 \* Refer to Rust's [platform support page][platform-support-doc] for more
4299 information on Rust's tiered platform support.
4300
4301 Libraries
4302 ---------
4303 - [The `is_power_of_two` method on unsigned numeric types is now a `const` function.][65092]
4304
4305 Stabilized APIs
4306 ---------------
4307 - [`BTreeMap::get_key_value`]
4308 - [`HashMap::get_key_value`]
4309 - [`Option::as_deref_mut`]
4310 - [`Option::as_deref`]
4311 - [`Option::flatten`]
4312 - [`UdpSocket::peer_addr`]
4313 - [`f32::to_be_bytes`]
4314 - [`f32::to_le_bytes`]
4315 - [`f32::to_ne_bytes`]
4316 - [`f64::to_be_bytes`]
4317 - [`f64::to_le_bytes`]
4318 - [`f64::to_ne_bytes`]
4319 - [`f32::from_be_bytes`]
4320 - [`f32::from_le_bytes`]
4321 - [`f32::from_ne_bytes`]
4322 - [`f64::from_be_bytes`]
4323 - [`f64::from_le_bytes`]
4324 - [`f64::from_ne_bytes`]
4325 - [`mem::take`]
4326 - [`slice::repeat`]
4327 - [`todo!`]
4328
4329 Cargo
4330 -----
4331 - [Cargo will now always display warnings, rather than only on
4332 fresh builds.][cargo/7450]
4333 - [Feature flags (except `--all-features`) passed to a virtual workspace will
4334 now produce an error.][cargo/7507] Previously these flags were ignored.
4335 - [You can now publish `dev-dependencies` without including
4336 a `version`.][cargo/7333]
4337
4338 Misc
4339 ----
4340 - [You can now specify the `#[cfg(doctest)]` attribute to include an item only
4341 when running documentation tests with `rustdoc`.][63803]
4342
4343 Compatibility Notes
4344 -------------------
4345 - [As previously announced, any previous NLL warnings in the 2015 edition are
4346 now hard errors.][64221]
4347 - [The `include!` macro will now warn if it failed to include the
4348 entire file.][64284] The `include!` macro unintentionally only includes the
4349 first _expression_ in a file, and this can be unintuitive. This will become
4350 either a hard error in a future release, or the behavior may be fixed to include all expressions as expected.
4351 - [Using `#[inline]` on function prototypes and consts now emits a warning under
4352 `unused_attribute` lint.][65294] Using `#[inline]` anywhere else inside traits
4353 or `extern` blocks now correctly emits a hard error.
4354
4355 [65294]: https://github.com/rust-lang/rust/pull/65294/
4356 [66103]: https://github.com/rust-lang/rust/pull/66103/
4357 [65843]: https://github.com/rust-lang/rust/pull/65843/
4358 [65188]: https://github.com/rust-lang/rust/pull/65188/
4359 [65092]: https://github.com/rust-lang/rust/pull/65092/
4360 [64589]: https://github.com/rust-lang/rust/pull/64589/
4361 [64639]: https://github.com/rust-lang/rust/pull/64639/
4362 [64221]: https://github.com/rust-lang/rust/pull/64221/
4363 [64284]: https://github.com/rust-lang/rust/pull/64284/
4364 [63931]: https://github.com/rust-lang/rust/pull/63931/
4365 [64035]: https://github.com/rust-lang/rust/pull/64035/
4366 [63674]: https://github.com/rust-lang/rust/pull/63674/
4367 [63803]: https://github.com/rust-lang/rust/pull/63803/
4368 [cargo/7450]: https://github.com/rust-lang/cargo/pull/7450/
4369 [cargo/7507]: https://github.com/rust-lang/cargo/pull/7507/
4370 [cargo/7333]: https://github.com/rust-lang/cargo/pull/7333/
4371 [(rfc 2008)]: https://rust-lang.github.io/rfcs/2008-non-exhaustive.html
4372 [`f32::to_be_bytes`]: https://doc.rust-lang.org/std/primitive.f32.html#method.to_be_bytes
4373 [`f32::to_le_bytes`]: https://doc.rust-lang.org/std/primitive.f32.html#method.to_le_bytes
4374 [`f32::to_ne_bytes`]: https://doc.rust-lang.org/std/primitive.f32.html#method.to_ne_bytes
4375 [`f64::to_be_bytes`]: https://doc.rust-lang.org/std/primitive.f64.html#method.to_be_bytes
4376 [`f64::to_le_bytes`]: https://doc.rust-lang.org/std/primitive.f64.html#method.to_le_bytes
4377 [`f64::to_ne_bytes`]: https://doc.rust-lang.org/std/primitive.f64.html#method.to_ne_bytes
4378 [`f32::from_be_bytes`]: https://doc.rust-lang.org/std/primitive.f32.html#method.from_be_bytes
4379 [`f32::from_le_bytes`]: https://doc.rust-lang.org/std/primitive.f32.html#method.from_le_bytes
4380 [`f32::from_ne_bytes`]: https://doc.rust-lang.org/std/primitive.f32.html#method.from_ne_bytes
4381 [`f64::from_be_bytes`]: https://doc.rust-lang.org/std/primitive.f64.html#method.from_be_bytes
4382 [`f64::from_le_bytes`]: https://doc.rust-lang.org/std/primitive.f64.html#method.from_le_bytes
4383 [`f64::from_ne_bytes`]: https://doc.rust-lang.org/std/primitive.f64.html#method.from_ne_bytes
4384 [`option::flatten`]: https://doc.rust-lang.org/std/option/enum.Option.html#method.flatten
4385 [`option::as_deref`]: https://doc.rust-lang.org/std/option/enum.Option.html#method.as_deref
4386 [`option::as_deref_mut`]: https://doc.rust-lang.org/std/option/enum.Option.html#method.as_deref_mut
4387 [`hashmap::get_key_value`]: https://doc.rust-lang.org/std/collections/struct.HashMap.html#method.get_key_value
4388 [`btreemap::get_key_value`]: https://doc.rust-lang.org/std/collections/struct.BTreeMap.html#method.get_key_value
4389 [`slice::repeat`]: https://doc.rust-lang.org/std/primitive.slice.html#method.repeat
4390 [`mem::take`]: https://doc.rust-lang.org/std/mem/fn.take.html
4391 [`udpsocket::peer_addr`]: https://doc.rust-lang.org/std/net/struct.UdpSocket.html#method.peer_addr
4392 [`todo!`]: https://doc.rust-lang.org/std/macro.todo.html
4393
4394
4395 Version 1.39.0 (2019-11-07)
4396 ===========================
4397
4398 Language
4399 --------
4400 - [You can now create `async` functions and blocks with `async fn`, `async move {}`, and
4401 `async {}` respectively, and you can now call `.await` on async expressions.][63209]
4402 - [You can now use certain attributes on function, closure, and function pointer
4403 parameters.][64010] These attributes include `cfg`, `cfg_attr`, `allow`, `warn`,
4404 `deny`, `forbid` as well as inert helper attributes used by procedural macro
4405 attributes applied to items. e.g.
4406 ```rust
4407 fn len(
4408 #[cfg(windows)] slice: &[u16],
4409 #[cfg(not(windows))] slice: &[u8],
4410 ) -> usize {
4411 slice.len()
4412 }
4413 ```
4414 - [You can now take shared references to bind-by-move patterns in the `if` guards
4415 of `match` arms.][63118] e.g.
4416 ```rust
4417 fn main() {
4418 let array: Box<[u8; 4]> = Box::new([1, 2, 3, 4]);
4419
4420 match array {
4421 nums
4422 // ---- `nums` is bound by move.
4423 if nums.iter().sum::<u8>() == 10
4424 // ^------ `.iter()` implicitly takes a reference to `nums`.
4425 => {
4426 drop(nums);
4427 // ----------- Legal as `nums` was bound by move and so we have ownership.
4428 }
4429 _ => unreachable!(),
4430 }
4431 }
4432 ```
4433
4434
4435
4436 Compiler
4437 --------
4438 - [Added tier 3\* support for the `i686-unknown-uefi` target.][64334]
4439 - [Added tier 3 support for the `sparc64-unknown-openbsd` target.][63595]
4440 - [rustc will now trim code snippets in diagnostics to fit in your terminal.][63402]
4441 **Note** Cargo currently doesn't use this feature. Refer to
4442 [cargo#7315][cargo/7315] to track this feature's progress.
4443 - [You can now pass `--show-output` argument to test binaries to print the
4444 output of successful tests.][62600]
4445
4446
4447 \* Refer to Rust's [platform support page][platform-support-doc] for more
4448 information on Rust's tiered platform support.
4449
4450 Libraries
4451 ---------
4452 - [`Vec::new` and `String::new` are now `const` functions.][64028]
4453 - [`LinkedList::new` is now a `const` function.][63684]
4454 - [`str::len`, `[T]::len` and `str::as_bytes` are now `const` functions.][63770]
4455 - [The `abs`, `wrapping_abs`, and `overflowing_abs` numeric functions are
4456 now `const`.][63786]
4457
4458 Stabilized APIs
4459 ---------------
4460 - [`Pin::into_inner`]
4461 - [`Instant::checked_duration_since`]
4462 - [`Instant::saturating_duration_since`]
4463
4464 Cargo
4465 -----
4466 - [You can now publish git dependencies if supplied with a `version`.][cargo/7237]
4467 - [The `--all` flag has been renamed to `--workspace`.][cargo/7241] Using
4468 `--all` is now deprecated.
4469
4470 Misc
4471 ----
4472 - [You can now pass `-Clinker` to rustdoc to control the linker used
4473 for compiling doctests.][63834]
4474
4475 Compatibility Notes
4476 -------------------
4477 - [Code that was previously accepted by the old borrow checker, but rejected by
4478 the NLL borrow checker is now a hard error in Rust 2018.][63565] This was
4479 previously a warning, and will also become a hard error in the Rust 2015
4480 edition in the 1.40.0 release.
4481 - [`rustdoc` now requires `rustc` to be installed and in the same directory to
4482 run tests.][63827] This should improve performance when running a large
4483 amount of doctests.
4484 - [The `try!` macro will now issue a deprecation warning.][62672] It is
4485 recommended to use the `?` operator instead.
4486 - [`asinh(-0.0)` now correctly returns `-0.0`.][63698] Previously this
4487 returned `0.0`.
4488
4489 [62600]: https://github.com/rust-lang/rust/pull/62600/
4490 [62672]: https://github.com/rust-lang/rust/pull/62672/
4491 [63118]: https://github.com/rust-lang/rust/pull/63118/
4492 [63209]: https://github.com/rust-lang/rust/pull/63209/
4493 [63402]: https://github.com/rust-lang/rust/pull/63402/
4494 [63565]: https://github.com/rust-lang/rust/pull/63565/
4495 [63595]: https://github.com/rust-lang/rust/pull/63595/
4496 [63684]: https://github.com/rust-lang/rust/pull/63684/
4497 [63698]: https://github.com/rust-lang/rust/pull/63698/
4498 [63770]: https://github.com/rust-lang/rust/pull/63770/
4499 [63786]: https://github.com/rust-lang/rust/pull/63786/
4500 [63827]: https://github.com/rust-lang/rust/pull/63827/
4501 [63834]: https://github.com/rust-lang/rust/pull/63834/
4502 [64010]: https://github.com/rust-lang/rust/pull/64010/
4503 [64028]: https://github.com/rust-lang/rust/pull/64028/
4504 [64334]: https://github.com/rust-lang/rust/pull/64334/
4505 [cargo/7237]: https://github.com/rust-lang/cargo/pull/7237/
4506 [cargo/7241]: https://github.com/rust-lang/cargo/pull/7241/
4507 [cargo/7315]: https://github.com/rust-lang/cargo/pull/7315/
4508 [`Pin::into_inner`]: https://doc.rust-lang.org/std/pin/struct.Pin.html#method.into_inner
4509 [`Instant::checked_duration_since`]: https://doc.rust-lang.org/std/time/struct.Instant.html#method.checked_duration_since
4510 [`Instant::saturating_duration_since`]: https://doc.rust-lang.org/std/time/struct.Instant.html#method.saturating_duration_since
4511
4512 Version 1.38.0 (2019-09-26)
4513 ==========================
4514
4515 Language
4516 --------
4517 - [The `#[global_allocator]` attribute can now be used in submodules.][62735]
4518 - [The `#[deprecated]` attribute can now be used on macros.][62042]
4519
4520 Compiler
4521 --------
4522 - [Added pipelined compilation support to `rustc`.][62766] This will
4523 improve compilation times in some cases. For further information please refer
4524 to the [_"Evaluating pipelined rustc compilation"_][pipeline-internals] thread.
4525 - [Added tier 3\* support for the `aarch64-uwp-windows-msvc`, `i686-uwp-windows-gnu`,
4526 `i686-uwp-windows-msvc`, `x86_64-uwp-windows-gnu`, and
4527 `x86_64-uwp-windows-msvc` targets.][60260]
4528 - [Added tier 3 support for the `armv7-unknown-linux-gnueabi` and
4529 `armv7-unknown-linux-musleabi` targets.][63107]
4530 - [Added tier 3 support for the `hexagon-unknown-linux-musl` target.][62814]
4531 - [Added tier 3 support for the `riscv32i-unknown-none-elf` target.][62784]
4532 - [Upgraded to LLVM 9.][62592]
4533
4534 \* Refer to Rust's [platform support page][platform-support-doc] for more
4535 information on Rust's tiered platform support.
4536
4537 Libraries
4538 ---------
4539 - [`ascii::EscapeDefault` now implements `Clone` and `Display`.][63421]
4540 - [Derive macros for prelude traits (e.g. `Clone`, `Debug`, `Hash`) are now
4541 available at the same path as the trait.][63056] (e.g. The `Clone` derive macro
4542 is available at `std::clone::Clone`). This also makes all built-in macros
4543 available in `std`/`core` root. e.g. `std::include_bytes!`.
4544 - [`str::Chars` now implements `Debug`.][63000]
4545 - [`slice::{concat, connect, join}` now accepts `&[T]` in addition to `&T`.][62528]
4546 - [`*const T` and `*mut T` now implement `marker::Unpin`.][62583]
4547 - [`Arc<[T]>` and `Rc<[T]>` now implement `FromIterator<T>`.][61953]
4548 - [Added euclidean remainder and division operations (`div_euclid`,
4549 `rem_euclid`) to all numeric primitives.][61884] Additionally `checked`,
4550 `overflowing`, and `wrapping` versions are available for all
4551 integer primitives.
4552 - [`thread::AccessError` now implements `Clone`, `Copy`, `Eq`, `Error`, and
4553 `PartialEq`.][61491]
4554 - [`iter::{StepBy, Peekable, Take}` now implement `DoubleEndedIterator`.][61457]
4555
4556 Stabilized APIs
4557 ---------------
4558 - [`<*const T>::cast`]
4559 - [`<*mut T>::cast`]
4560 - [`Duration::as_secs_f32`]
4561 - [`Duration::as_secs_f64`]
4562 - [`Duration::div_f32`]
4563 - [`Duration::div_f64`]
4564 - [`Duration::from_secs_f32`]
4565 - [`Duration::from_secs_f64`]
4566 - [`Duration::mul_f32`]
4567 - [`Duration::mul_f64`]
4568 - [`any::type_name`]
4569
4570 Cargo
4571 -----
4572 - [Added pipelined compilation support to `cargo`.][cargo/7143]
4573 - [You can now pass the `--features` option multiple times to enable
4574 multiple features.][cargo/7084]
4575
4576 Rustdoc
4577 -------
4578
4579 - [Documentation on `pub use` statements is prepended to the documentation of the re-exported item][63048]
4580
4581 Misc
4582 ----
4583 - [`rustc` will now warn about some incorrect uses of
4584 `mem::{uninitialized, zeroed}` that are known to cause undefined behaviour.][63346]
4585
4586 Compatibility Notes
4587 -------------------
4588 - The [`x86_64-unknown-uefi` platform can not be built][62785] with rustc
4589 1.38.0.
4590 - The [`armv7-unknown-linux-gnueabihf` platform is known to have
4591 issues][62896] with certain crates such as libc.
4592
4593 [60260]: https://github.com/rust-lang/rust/pull/60260/
4594 [61457]: https://github.com/rust-lang/rust/pull/61457/
4595 [61491]: https://github.com/rust-lang/rust/pull/61491/
4596 [61884]: https://github.com/rust-lang/rust/pull/61884/
4597 [61953]: https://github.com/rust-lang/rust/pull/61953/
4598 [62042]: https://github.com/rust-lang/rust/pull/62042/
4599 [62528]: https://github.com/rust-lang/rust/pull/62528/
4600 [62583]: https://github.com/rust-lang/rust/pull/62583/
4601 [62735]: https://github.com/rust-lang/rust/pull/62735/
4602 [62766]: https://github.com/rust-lang/rust/pull/62766/
4603 [62784]: https://github.com/rust-lang/rust/pull/62784/
4604 [62592]: https://github.com/rust-lang/rust/pull/62592/
4605 [62785]: https://github.com/rust-lang/rust/issues/62785/
4606 [62814]: https://github.com/rust-lang/rust/pull/62814/
4607 [62896]: https://github.com/rust-lang/rust/issues/62896/
4608 [63000]: https://github.com/rust-lang/rust/pull/63000/
4609 [63056]: https://github.com/rust-lang/rust/pull/63056/
4610 [63107]: https://github.com/rust-lang/rust/pull/63107/
4611 [63346]: https://github.com/rust-lang/rust/pull/63346/
4612 [63421]: https://github.com/rust-lang/rust/pull/63421/
4613 [cargo/7084]: https://github.com/rust-lang/cargo/pull/7084/
4614 [cargo/7143]: https://github.com/rust-lang/cargo/pull/7143/
4615 [63048]: https://github.com/rust-lang/rust/pull/63048
4616 [`<*const T>::cast`]: https://doc.rust-lang.org/std/primitive.pointer.html#method.cast
4617 [`<*mut T>::cast`]: https://doc.rust-lang.org/std/primitive.pointer.html#method.cast
4618 [`Duration::as_secs_f32`]: https://doc.rust-lang.org/std/time/struct.Duration.html#method.as_secs_f32
4619 [`Duration::as_secs_f64`]: https://doc.rust-lang.org/std/time/struct.Duration.html#method.as_secs_f64
4620 [`Duration::div_f32`]: https://doc.rust-lang.org/std/time/struct.Duration.html#method.div_f32
4621 [`Duration::div_f64`]: https://doc.rust-lang.org/std/time/struct.Duration.html#method.div_f64
4622 [`Duration::from_secs_f32`]: https://doc.rust-lang.org/std/time/struct.Duration.html#method.from_secs_f32
4623 [`Duration::from_secs_f64`]: https://doc.rust-lang.org/std/time/struct.Duration.html#method.from_secs_f64
4624 [`Duration::mul_f32`]: https://doc.rust-lang.org/std/time/struct.Duration.html#method.mul_f32
4625 [`Duration::mul_f64`]: https://doc.rust-lang.org/std/time/struct.Duration.html#method.mul_f64
4626 [`any::type_name`]: https://doc.rust-lang.org/std/any/fn.type_name.html
4627 [platform-support-doc]: https://doc.rust-lang.org/nightly/rustc/platform-support.html
4628 [pipeline-internals]: https://internals.rust-lang.org/t/evaluating-pipelined-rustc-compilation/10199
4629
4630 Version 1.37.0 (2019-08-15)
4631 ==========================
4632
4633 Language
4634 --------
4635 - `#[must_use]` will now warn if the type is contained in a [tuple][61100],
4636 [`Box`][62228], or an [array][62235] and unused.
4637 - [You can now use the `cfg` and `cfg_attr` attributes on
4638 generic parameters.][61547]
4639 - [You can now use enum variants through type alias.][61682] e.g. You can
4640 write the following:
4641 ```rust
4642 type MyOption = Option<u8>;
4643
4644 fn increment_or_zero(x: MyOption) -> u8 {
4645 match x {
4646 MyOption::Some(y) => y + 1,
4647 MyOption::None => 0,
4648 }
4649 }
4650 ```
4651 - [You can now use `_` as an identifier for consts.][61347] e.g. You can write
4652 `const _: u32 = 5;`.
4653 - [You can now use `#[repr(align(X)]` on enums.][61229]
4654 - [The `?` Kleene macro operator is now available in the
4655 2015 edition.][60932]
4656
4657 Compiler
4658 --------
4659 - [You can now enable Profile-Guided Optimization with the `-C profile-generate`
4660 and `-C profile-use` flags.][61268] For more information on how to use profile
4661 guided optimization, please refer to the [rustc book][rustc-book-pgo].
4662 - [The `rust-lldb` wrapper script should now work again.][61827]
4663
4664 Libraries
4665 ---------
4666 - [`mem::MaybeUninit<T>` is now ABI-compatible with `T`.][61802]
4667
4668 Stabilized APIs
4669 ---------------
4670 - [`BufReader::buffer`]
4671 - [`BufWriter::buffer`]
4672 - [`Cell::from_mut`]
4673 - [`Cell<[T]>::as_slice_of_cells`][`Cell<slice>::as_slice_of_cells`]
4674 - [`DoubleEndedIterator::nth_back`]
4675 - [`Option::xor`]
4676 - [`Wrapping::reverse_bits`]
4677 - [`i128::reverse_bits`]
4678 - [`i16::reverse_bits`]
4679 - [`i32::reverse_bits`]
4680 - [`i64::reverse_bits`]
4681 - [`i8::reverse_bits`]
4682 - [`isize::reverse_bits`]
4683 - [`slice::copy_within`]
4684 - [`u128::reverse_bits`]
4685 - [`u16::reverse_bits`]
4686 - [`u32::reverse_bits`]
4687 - [`u64::reverse_bits`]
4688 - [`u8::reverse_bits`]
4689 - [`usize::reverse_bits`]
4690
4691 Cargo
4692 -----
4693 - [`Cargo.lock` files are now included by default when publishing executable crates
4694 with executables.][cargo/7026]
4695 - [You can now specify `default-run="foo"` in `[package]` to specify the
4696 default executable to use for `cargo run`.][cargo/7056]
4697
4698 Misc
4699 ----
4700
4701 Compatibility Notes
4702 -------------------
4703 - [Using `...` for inclusive range patterns will now warn by default.][61342]
4704 Please transition your code to using the `..=` syntax for inclusive
4705 ranges instead.
4706 - [Using a trait object without the `dyn` will now warn by default.][61203]
4707 Please transition your code to use `dyn Trait` for trait objects instead.
4708
4709 [62228]: https://github.com/rust-lang/rust/pull/62228/
4710 [62235]: https://github.com/rust-lang/rust/pull/62235/
4711 [61802]: https://github.com/rust-lang/rust/pull/61802/
4712 [61827]: https://github.com/rust-lang/rust/pull/61827/
4713 [61547]: https://github.com/rust-lang/rust/pull/61547/
4714 [61682]: https://github.com/rust-lang/rust/pull/61682/
4715 [61268]: https://github.com/rust-lang/rust/pull/61268/
4716 [61342]: https://github.com/rust-lang/rust/pull/61342/
4717 [61347]: https://github.com/rust-lang/rust/pull/61347/
4718 [61100]: https://github.com/rust-lang/rust/pull/61100/
4719 [61203]: https://github.com/rust-lang/rust/pull/61203/
4720 [61229]: https://github.com/rust-lang/rust/pull/61229/
4721 [60932]: https://github.com/rust-lang/rust/pull/60932/
4722 [cargo/7026]: https://github.com/rust-lang/cargo/pull/7026/
4723 [cargo/7056]: https://github.com/rust-lang/cargo/pull/7056/
4724 [`BufReader::buffer`]: https://doc.rust-lang.org/std/io/struct.BufReader.html#method.buffer
4725 [`BufWriter::buffer`]: https://doc.rust-lang.org/std/io/struct.BufWriter.html#method.buffer
4726 [`Cell::from_mut`]: https://doc.rust-lang.org/std/cell/struct.Cell.html#method.from_mut
4727 [`Cell<slice>::as_slice_of_cells`]: https://doc.rust-lang.org/std/cell/struct.Cell.html#method.as_slice_of_cells
4728 [`DoubleEndedIterator::nth_back`]: https://doc.rust-lang.org/std/iter/trait.DoubleEndedIterator.html#method.nth_back
4729 [`Option::xor`]: https://doc.rust-lang.org/std/option/enum.Option.html#method.xor
4730 [`Wrapping::reverse_bits`]: https://doc.rust-lang.org/std/num/struct.Wrapping.html#method.reverse_bits
4731 [`i128::reverse_bits`]: https://doc.rust-lang.org/std/primitive.i128.html#method.reverse_bits
4732 [`i16::reverse_bits`]: https://doc.rust-lang.org/std/primitive.i16.html#method.reverse_bits
4733 [`i32::reverse_bits`]: https://doc.rust-lang.org/std/primitive.i32.html#method.reverse_bits
4734 [`i64::reverse_bits`]: https://doc.rust-lang.org/std/primitive.i64.html#method.reverse_bits
4735 [`i8::reverse_bits`]: https://doc.rust-lang.org/std/primitive.i8.html#method.reverse_bits
4736 [`isize::reverse_bits`]: https://doc.rust-lang.org/std/primitive.isize.html#method.reverse_bits
4737 [`slice::copy_within`]: https://doc.rust-lang.org/std/primitive.slice.html#method.copy_within
4738 [`u128::reverse_bits`]: https://doc.rust-lang.org/std/primitive.u128.html#method.reverse_bits
4739 [`u16::reverse_bits`]: https://doc.rust-lang.org/std/primitive.u16.html#method.reverse_bits
4740 [`u32::reverse_bits`]: https://doc.rust-lang.org/std/primitive.u32.html#method.reverse_bits
4741 [`u64::reverse_bits`]: https://doc.rust-lang.org/std/primitive.u64.html#method.reverse_bits
4742 [`u8::reverse_bits`]: https://doc.rust-lang.org/std/primitive.u8.html#method.reverse_bits
4743 [`usize::reverse_bits`]: https://doc.rust-lang.org/std/primitive.usize.html#method.reverse_bits
4744 [rustc-book-pgo]: https://doc.rust-lang.org/rustc/profile-guided-optimization.html
4745
4746
4747 Version 1.36.0 (2019-07-04)
4748 ==========================
4749
4750 Language
4751 --------
4752 - [Non-Lexical Lifetimes are now enabled on the 2015 edition.][59114]
4753 - [The order of traits in trait objects no longer affects the semantics of that
4754 object.][59445] e.g. `dyn Send + fmt::Debug` is now equivalent to
4755 `dyn fmt::Debug + Send`, where this was previously not the case.
4756
4757 Libraries
4758 ---------
4759 - [`HashMap`'s implementation has been replaced with `hashbrown::HashMap` implementation.][58623]
4760 - [`TryFromSliceError` now implements `From<Infallible>`.][60318]
4761 - [`mem::needs_drop` is now available as a const fn.][60364]
4762 - [`alloc::Layout::from_size_align_unchecked` is now available as a const fn.][60370]
4763 - [`String` now implements `BorrowMut<str>`.][60404]
4764 - [`io::Cursor` now implements `Default`.][60234]
4765 - [Both `NonNull::{dangling, cast}` are now const fns.][60244]
4766 - [The `alloc` crate is now stable.][59675] `alloc` allows you to use a subset
4767 of `std` (e.g. `Vec`, `Box`, `Arc`) in `#![no_std]` environments if the
4768 environment has access to heap memory allocation.
4769 - [`String` now implements `From<&String>`.][59825]
4770 - [You can now pass multiple arguments to the `dbg!` macro.][59826] `dbg!` will
4771 return a tuple of each argument when there is multiple arguments.
4772 - [`Result::{is_err, is_ok}` are now `#[must_use]` and will produce a warning if
4773 not used.][59648]
4774
4775 Stabilized APIs
4776 ---------------
4777 - [`VecDeque::rotate_left`]
4778 - [`VecDeque::rotate_right`]
4779 - [`Iterator::copied`]
4780 - [`io::IoSlice`]
4781 - [`io::IoSliceMut`]
4782 - [`Read::read_vectored`]
4783 - [`Write::write_vectored`]
4784 - [`str::as_mut_ptr`]
4785 - [`mem::MaybeUninit`]
4786 - [`pointer::align_offset`]
4787 - [`future::Future`]
4788 - [`task::Context`]
4789 - [`task::RawWaker`]
4790 - [`task::RawWakerVTable`]
4791 - [`task::Waker`]
4792 - [`task::Poll`]
4793
4794 Cargo
4795 -----
4796 - [Cargo will now produce an error if you attempt to use the name of a required dependency as a feature.][cargo/6860]
4797 - [You can now pass the `--offline` flag to run cargo without accessing the network.][cargo/6934]
4798
4799 You can find further change's in [Cargo's 1.36.0 release notes][cargo-1-36-0].
4800
4801 Clippy
4802 ------
4803 There have been numerous additions and fixes to clippy, see [Clippy's 1.36.0 release notes][clippy-1-36-0] for more details.
4804
4805 Misc
4806 ----
4807
4808 Compatibility Notes
4809 -------------------
4810 - With the stabilisation of `mem::MaybeUninit`, `mem::uninitialized` use is no
4811 longer recommended, and will be deprecated in 1.39.0.
4812
4813 [60318]: https://github.com/rust-lang/rust/pull/60318/
4814 [60364]: https://github.com/rust-lang/rust/pull/60364/
4815 [60370]: https://github.com/rust-lang/rust/pull/60370/
4816 [60404]: https://github.com/rust-lang/rust/pull/60404/
4817 [60234]: https://github.com/rust-lang/rust/pull/60234/
4818 [60244]: https://github.com/rust-lang/rust/pull/60244/
4819 [58623]: https://github.com/rust-lang/rust/pull/58623/
4820 [59648]: https://github.com/rust-lang/rust/pull/59648/
4821 [59675]: https://github.com/rust-lang/rust/pull/59675/
4822 [59825]: https://github.com/rust-lang/rust/pull/59825/
4823 [59826]: https://github.com/rust-lang/rust/pull/59826/
4824 [59445]: https://github.com/rust-lang/rust/pull/59445/
4825 [59114]: https://github.com/rust-lang/rust/pull/59114/
4826 [cargo/6860]: https://github.com/rust-lang/cargo/pull/6860/
4827 [cargo/6934]: https://github.com/rust-lang/cargo/pull/6934/
4828 [`VecDeque::rotate_left`]: https://doc.rust-lang.org/std/collections/struct.VecDeque.html#method.rotate_left
4829 [`VecDeque::rotate_right`]: https://doc.rust-lang.org/std/collections/struct.VecDeque.html#method.rotate_right
4830 [`Iterator::copied`]: https://doc.rust-lang.org/std/iter/trait.Iterator.html#tymethod.copied
4831 [`io::IoSlice`]: https://doc.rust-lang.org/std/io/struct.IoSlice.html
4832 [`io::IoSliceMut`]: https://doc.rust-lang.org/std/io/struct.IoSliceMut.html
4833 [`Read::read_vectored`]: https://doc.rust-lang.org/std/io/trait.Read.html#method.read_vectored
4834 [`Write::write_vectored`]: https://doc.rust-lang.org/std/io/trait.Write.html#method.write_vectored
4835 [`str::as_mut_ptr`]: https://doc.rust-lang.org/std/primitive.str.html#method.as_mut_ptr
4836 [`mem::MaybeUninit`]: https://doc.rust-lang.org/std/mem/union.MaybeUninit.html
4837 [`pointer::align_offset`]: https://doc.rust-lang.org/std/primitive.pointer.html#method.align_offset
4838 [`future::Future`]: https://doc.rust-lang.org/std/future/trait.Future.html
4839 [`task::Context`]: https://doc.rust-lang.org/beta/std/task/struct.Context.html
4840 [`task::RawWaker`]: https://doc.rust-lang.org/beta/std/task/struct.RawWaker.html
4841 [`task::RawWakerVTable`]: https://doc.rust-lang.org/beta/std/task/struct.RawWakerVTable.html
4842 [`task::Waker`]: https://doc.rust-lang.org/beta/std/task/struct.Waker.html
4843 [`task::Poll`]: https://doc.rust-lang.org/beta/std/task/enum.Poll.html
4844 [clippy-1-36-0]: https://github.com/rust-lang/rust-clippy/blob/master/CHANGELOG.md#rust-136
4845 [cargo-1-36-0]: https://github.com/rust-lang/cargo/blob/master/CHANGELOG.md#cargo-136-2019-07-04
4846
4847
4848 Version 1.35.0 (2019-05-23)
4849 ==========================
4850
4851 Language
4852 --------
4853 - [`FnOnce`, `FnMut`, and the `Fn` traits are now implemented for `Box<FnOnce>`,
4854 `Box<FnMut>`, and `Box<Fn>` respectively.][59500]
4855 - [You can now coerce closures into unsafe function pointers.][59580] e.g.
4856 ```rust
4857 unsafe fn call_unsafe(func: unsafe fn()) {
4858 func()
4859 }
4860
4861 pub fn main() {
4862 unsafe { call_unsafe(|| {}); }
4863 }
4864 ```
4865
4866
4867 Compiler
4868 --------
4869 - [Added the `armv6-unknown-freebsd-gnueabihf` and
4870 `armv7-unknown-freebsd-gnueabihf` targets.][58080]
4871 - [Added the `wasm32-unknown-wasi` target.][59464]
4872
4873
4874 Libraries
4875 ---------
4876 - [`Thread` will now show its ID in `Debug` output.][59460]
4877 - [`StdinLock`, `StdoutLock`, and `StderrLock` now implement `AsRawFd`.][59512]
4878 - [`alloc::System` now implements `Default`.][59451]
4879 - [Expanded `Debug` output (`{:#?}`) for structs now has a trailing comma on the
4880 last field.][59076]
4881 - [`char::{ToLowercase, ToUppercase}` now
4882 implement `ExactSizeIterator`.][58778]
4883 - [All `NonZero` numeric types now implement `FromStr`.][58717]
4884 - [Removed the `Read` trait bounds
4885 on the `BufReader::{get_ref, get_mut, into_inner}` methods.][58423]
4886 - [You can now call the `dbg!` macro without any parameters to print the file
4887 and line where it is called.][57847]
4888 - [In place ASCII case conversions are now up to 4× faster.][59283]
4889 e.g. `str::make_ascii_lowercase`
4890 - [`hash_map::{OccupiedEntry, VacantEntry}` now implement `Sync`
4891 and `Send`.][58369]
4892
4893 Stabilized APIs
4894 ---------------
4895 - [`f32::copysign`]
4896 - [`f64::copysign`]
4897 - [`RefCell::replace_with`]
4898 - [`RefCell::map_split`]
4899 - [`ptr::hash`]
4900 - [`Range::contains`]
4901 - [`RangeFrom::contains`]
4902 - [`RangeTo::contains`]
4903 - [`RangeInclusive::contains`]
4904 - [`RangeToInclusive::contains`]
4905 - [`Option::copied`]
4906
4907 Cargo
4908 -----
4909 - [You can now set `cargo:rustc-cdylib-link-arg` at build time to pass custom
4910 linker arguments when building a `cdylib`.][cargo/6298] Its usage is highly
4911 platform specific.
4912
4913 Misc
4914 ----
4915 - [The Rust toolchain is now available natively for musl based distros.][58575]
4916
4917 [59460]: https://github.com/rust-lang/rust/pull/59460/
4918 [59464]: https://github.com/rust-lang/rust/pull/59464/
4919 [59500]: https://github.com/rust-lang/rust/pull/59500/
4920 [59512]: https://github.com/rust-lang/rust/pull/59512/
4921 [59580]: https://github.com/rust-lang/rust/pull/59580/
4922 [59283]: https://github.com/rust-lang/rust/pull/59283/
4923 [59451]: https://github.com/rust-lang/rust/pull/59451/
4924 [59076]: https://github.com/rust-lang/rust/pull/59076/
4925 [58778]: https://github.com/rust-lang/rust/pull/58778/
4926 [58717]: https://github.com/rust-lang/rust/pull/58717/
4927 [58369]: https://github.com/rust-lang/rust/pull/58369/
4928 [58423]: https://github.com/rust-lang/rust/pull/58423/
4929 [58080]: https://github.com/rust-lang/rust/pull/58080/
4930 [57847]: https://github.com/rust-lang/rust/pull/57847/
4931 [58575]: https://github.com/rust-lang/rust/pull/58575
4932 [cargo/6298]: https://github.com/rust-lang/cargo/pull/6298/
4933 [`f32::copysign`]: https://doc.rust-lang.org/stable/std/primitive.f32.html#method.copysign
4934 [`f64::copysign`]: https://doc.rust-lang.org/stable/std/primitive.f64.html#method.copysign
4935 [`RefCell::replace_with`]: https://doc.rust-lang.org/stable/std/cell/struct.RefCell.html#method.replace_with
4936 [`RefCell::map_split`]: https://doc.rust-lang.org/stable/std/cell/struct.RefCell.html#method.map_split
4937 [`ptr::hash`]: https://doc.rust-lang.org/stable/std/ptr/fn.hash.html
4938 [`Range::contains`]: https://doc.rust-lang.org/std/ops/struct.Range.html#method.contains
4939 [`RangeFrom::contains`]: https://doc.rust-lang.org/std/ops/struct.RangeFrom.html#method.contains
4940 [`RangeTo::contains`]: https://doc.rust-lang.org/std/ops/struct.RangeTo.html#method.contains
4941 [`RangeInclusive::contains`]: https://doc.rust-lang.org/std/ops/struct.RangeInclusive.html#method.contains
4942 [`RangeToInclusive::contains`]: https://doc.rust-lang.org/std/ops/struct.RangeToInclusive.html#method.contains
4943 [`Option::copied`]: https://doc.rust-lang.org/std/option/enum.Option.html#method.copied
4944
4945 Version 1.34.2 (2019-05-14)
4946 ===========================
4947
4948 * [Destabilize the `Error::type_id` function due to a security
4949 vulnerability][60785] ([CVE-2019-12083])
4950
4951 [60785]: https://github.com/rust-lang/rust/pull/60785
4952 [CVE-2019-12083]: https://cve.mitre.org/cgi-bin/cvename.cgi?name=CVE-2019-12083
4953
4954 Version 1.34.1 (2019-04-25)
4955 ===========================
4956
4957 * [Fix false positives for the `redundant_closure` Clippy lint][clippy/3821]
4958 * [Fix false positives for the `missing_const_for_fn` Clippy lint][clippy/3844]
4959 * [Fix Clippy panic when checking some macros][clippy/3805]
4960
4961 [clippy/3821]: https://github.com/rust-lang/rust-clippy/pull/3821
4962 [clippy/3844]: https://github.com/rust-lang/rust-clippy/pull/3844
4963 [clippy/3805]: https://github.com/rust-lang/rust-clippy/pull/3805
4964
4965 Version 1.34.0 (2019-04-11)
4966 ==========================
4967
4968 Language
4969 --------
4970 - [You can now use `#[deprecated = "reason"]`][58166] as a shorthand for
4971 `#[deprecated(note = "reason")]`. This was previously allowed by mistake
4972 but had no effect.
4973 - [You can now accept token streams in `#[attr()]`,`#[attr[]]`, and
4974 `#[attr{}]` procedural macros.][57367]
4975 - [You can now write `extern crate self as foo;`][57407] to import your
4976 crate's root into the extern prelude.
4977
4978
4979 Compiler
4980 --------
4981 - [You can now target `riscv64imac-unknown-none-elf` and
4982 `riscv64gc-unknown-none-elf`.][58406]
4983 - [You can now enable linker plugin LTO optimisations with
4984 `-C linker-plugin-lto`.][58057] This allows rustc to compile your Rust code
4985 into LLVM bitcode allowing LLVM to perform LTO optimisations across C/C++ FFI
4986 boundaries.
4987 - [You can now target `powerpc64-unknown-freebsd`.][57809]
4988
4989
4990 Libraries
4991 ---------
4992 - [The trait bounds have been removed on some of `HashMap<K, V, S>`'s and
4993 `HashSet<T, S>`'s basic methods.][58370] Most notably you no longer require
4994 the `Hash` trait to create an iterator.
4995 - [The `Ord` trait bounds have been removed on some of `BinaryHeap<T>`'s basic
4996 methods.][58421] Most notably you no longer require the `Ord` trait to create
4997 an iterator.
4998 - [The methods `overflowing_neg` and `wrapping_neg` are now `const` functions
4999 for all numeric types.][58044]
5000 - [Indexing a `str` is now generic over all types that
5001 implement `SliceIndex<str>`.][57604]
5002 - [`str::trim`, `str::trim_matches`, `str::trim_{start, end}`, and
5003 `str::trim_{start, end}_matches` are now `#[must_use]`][57106] and will
5004 produce a warning if their returning type is unused.
5005 - [The methods `checked_pow`, `saturating_pow`, `wrapping_pow`, and
5006 `overflowing_pow` are now available for all numeric types.][57873] These are
5007 equivalent to methods such as `wrapping_add` for the `pow` operation.
5008
5009
5010 Stabilized APIs
5011 ---------------
5012
5013 #### std & core
5014 * [`Any::type_id`]
5015 * [`Error::type_id`]
5016 * [`atomic::AtomicI16`]
5017 * [`atomic::AtomicI32`]
5018 * [`atomic::AtomicI64`]
5019 * [`atomic::AtomicI8`]
5020 * [`atomic::AtomicU16`]
5021 * [`atomic::AtomicU32`]
5022 * [`atomic::AtomicU64`]
5023 * [`atomic::AtomicU8`]
5024 * [`convert::Infallible`]
5025 * [`convert::TryFrom`]
5026 * [`convert::TryInto`]
5027 * [`iter::from_fn`]
5028 * [`iter::successors`]
5029 * [`num::NonZeroI128`]
5030 * [`num::NonZeroI16`]
5031 * [`num::NonZeroI32`]
5032 * [`num::NonZeroI64`]
5033 * [`num::NonZeroI8`]
5034 * [`num::NonZeroIsize`]
5035 * [`slice::sort_by_cached_key`]
5036 * [`str::escape_debug`]
5037 * [`str::escape_default`]
5038 * [`str::escape_unicode`]
5039 * [`str::split_ascii_whitespace`]
5040
5041 #### std
5042 * [`Instant::checked_add`]
5043 * [`Instant::checked_sub`]
5044 * [`SystemTime::checked_add`]
5045 * [`SystemTime::checked_sub`]
5046
5047 Cargo
5048 -----
5049 - [You can now use alternative registries to crates.io.][cargo/6654]
5050
5051 Misc
5052 ----
5053 - [You can now use the `?` operator in your documentation tests without manually
5054 adding `fn main() -> Result<(), _> {}`.][56470]
5055
5056 Compatibility Notes
5057 -------------------
5058 - [`Command::before_exec` is being replaced by the unsafe method
5059 `Command::pre_exec`][58059] and will be deprecated with Rust 1.37.0.
5060 - [Use of `ATOMIC_{BOOL, ISIZE, USIZE}_INIT` is now deprecated][57425] as you
5061 can now use `const` functions in `static` variables.
5062
5063 [58370]: https://github.com/rust-lang/rust/pull/58370/
5064 [58406]: https://github.com/rust-lang/rust/pull/58406/
5065 [58421]: https://github.com/rust-lang/rust/pull/58421/
5066 [58166]: https://github.com/rust-lang/rust/pull/58166/
5067 [58044]: https://github.com/rust-lang/rust/pull/58044/
5068 [58057]: https://github.com/rust-lang/rust/pull/58057/
5069 [58059]: https://github.com/rust-lang/rust/pull/58059/
5070 [57809]: https://github.com/rust-lang/rust/pull/57809/
5071 [57873]: https://github.com/rust-lang/rust/pull/57873/
5072 [57604]: https://github.com/rust-lang/rust/pull/57604/
5073 [57367]: https://github.com/rust-lang/rust/pull/57367/
5074 [57407]: https://github.com/rust-lang/rust/pull/57407/
5075 [57425]: https://github.com/rust-lang/rust/pull/57425/
5076 [57106]: https://github.com/rust-lang/rust/pull/57106/
5077 [56470]: https://github.com/rust-lang/rust/pull/56470/
5078 [cargo/6654]: https://github.com/rust-lang/cargo/pull/6654/
5079 [`Any::type_id`]: https://doc.rust-lang.org/std/any/trait.Any.html#tymethod.type_id
5080 [`Error::type_id`]: https://doc.rust-lang.org/std/error/trait.Error.html#method.type_id
5081 [`atomic::AtomicI16`]: https://doc.rust-lang.org/std/sync/atomic/struct.AtomicI16.html
5082 [`atomic::AtomicI32`]: https://doc.rust-lang.org/std/sync/atomic/struct.AtomicI32.html
5083 [`atomic::AtomicI64`]: https://doc.rust-lang.org/std/sync/atomic/struct.AtomicI64.html
5084 [`atomic::AtomicI8`]: https://doc.rust-lang.org/std/sync/atomic/struct.AtomicI8.html
5085 [`atomic::AtomicU16`]: https://doc.rust-lang.org/std/sync/atomic/struct.AtomicU16.html
5086 [`atomic::AtomicU32`]: https://doc.rust-lang.org/std/sync/atomic/struct.AtomicU32.html
5087 [`atomic::AtomicU64`]: https://doc.rust-lang.org/std/sync/atomic/struct.AtomicU64.html
5088 [`atomic::AtomicU8`]: https://doc.rust-lang.org/std/sync/atomic/struct.AtomicU8.html
5089 [`convert::Infallible`]: https://doc.rust-lang.org/std/convert/enum.Infallible.html
5090 [`convert::TryFrom`]: https://doc.rust-lang.org/std/convert/trait.TryFrom.html
5091 [`convert::TryInto`]: https://doc.rust-lang.org/std/convert/trait.TryInto.html
5092 [`iter::from_fn`]: https://doc.rust-lang.org/std/iter/fn.from_fn.html
5093 [`iter::successors`]: https://doc.rust-lang.org/std/iter/fn.successors.html
5094 [`num::NonZeroI128`]: https://doc.rust-lang.org/std/num/struct.NonZeroI128.html
5095 [`num::NonZeroI16`]: https://doc.rust-lang.org/std/num/struct.NonZeroI16.html
5096 [`num::NonZeroI32`]: https://doc.rust-lang.org/std/num/struct.NonZeroI32.html
5097 [`num::NonZeroI64`]: https://doc.rust-lang.org/std/num/struct.NonZeroI64.html
5098 [`num::NonZeroI8`]: https://doc.rust-lang.org/std/num/struct.NonZeroI8.html
5099 [`num::NonZeroIsize`]: https://doc.rust-lang.org/std/num/struct.NonZeroIsize.html
5100 [`slice::sort_by_cached_key`]: https://doc.rust-lang.org/std/primitive.slice.html#method.sort_by_cached_key
5101 [`str::escape_debug`]: https://doc.rust-lang.org/std/primitive.str.html#method.escape_debug
5102 [`str::escape_default`]: https://doc.rust-lang.org/std/primitive.str.html#method.escape_default
5103 [`str::escape_unicode`]: https://doc.rust-lang.org/std/primitive.str.html#method.escape_unicode
5104 [`str::split_ascii_whitespace`]: https://doc.rust-lang.org/std/primitive.str.html#method.split_ascii_whitespace
5105 [`Instant::checked_add`]: https://doc.rust-lang.org/std/time/struct.Instant.html#method.checked_add
5106 [`Instant::checked_sub`]: https://doc.rust-lang.org/std/time/struct.Instant.html#method.checked_sub
5107 [`SystemTime::checked_add`]: https://doc.rust-lang.org/std/time/struct.SystemTime.html#method.checked_add
5108 [`SystemTime::checked_sub`]: https://doc.rust-lang.org/std/time/struct.SystemTime.html#method.checked_sub
5109
5110
5111 Version 1.33.0 (2019-02-28)
5112 ==========================
5113
5114 Language
5115 --------
5116 - [You can now use the `cfg(target_vendor)` attribute.][57465] E.g.
5117 `#[cfg(target_vendor="apple")] fn main() { println!("Hello Apple!"); }`
5118 - [Integer patterns such as in a match expression can now be exhaustive.][56362]
5119 E.g. You can have match statement on a `u8` that covers `0..=255` and
5120 you would no longer be required to have a `_ => unreachable!()` case.
5121 - [You can now have multiple patterns in `if let` and `while let`
5122 expressions.][57532] You can do this with the same syntax as a `match`
5123 expression. E.g.
5124 ```rust
5125 enum Creature {
5126 Crab(String),
5127 Lobster(String),
5128 Person(String),
5129 }
5130
5131 fn main() {
5132 let state = Creature::Crab("Ferris");
5133
5134 if let Creature::Crab(name) | Creature::Person(name) = state {
5135 println!("This creature's name is: {}", name);
5136 }
5137 }
5138 ```
5139 - [You can now have irrefutable `if let` and `while let` patterns.][57535] Using
5140 this feature will by default produce a warning as this behaviour can be
5141 unintuitive. E.g. `if let _ = 5 {}`
5142 - [You can now use `let` bindings, assignments, expression statements,
5143 and irrefutable pattern destructuring in const functions.][57175]
5144 - [You can now call unsafe const functions.][57067] E.g.
5145 ```rust
5146 const unsafe fn foo() -> i32 { 5 }
5147 const fn bar() -> i32 {
5148 unsafe { foo() }
5149 }
5150 ```
5151 - [You can now specify multiple attributes in a `cfg_attr` attribute.][57332]
5152 E.g. `#[cfg_attr(all(), must_use, optimize)]`
5153 - [You can now specify a specific alignment with the `#[repr(packed)]`
5154 attribute.][57049] E.g. `#[repr(packed(2))] struct Foo(i16, i32);` is a struct
5155 with an alignment of 2 bytes and a size of 6 bytes.
5156 - [You can now import an item from a module as an `_`.][56303] This allows you to
5157 import a trait's impls, and not have the name in the namespace. E.g.
5158 ```rust
5159 use std::io::Read as _;
5160
5161 // Allowed as there is only one `Read` in the module.
5162 pub trait Read {}
5163 ```
5164 - [You may now use `Rc`, `Arc`, and `Pin` as method receivers][56805].
5165
5166 Compiler
5167 --------
5168 - [You can now set a linker flavor for `rustc` with the `-Clinker-flavor`
5169 command line argument.][56351]
5170 - [The minimum required LLVM version has been bumped to 6.0.][56642]
5171 - [Added support for the PowerPC64 architecture on FreeBSD.][57615]
5172 - [The `x86_64-fortanix-unknown-sgx` target support has been upgraded to
5173 tier 2 support.][57130] Visit the [platform support][platform-support] page for
5174 information on Rust's platform support.
5175 - [Added support for the `thumbv7neon-linux-androideabi` and
5176 `thumbv7neon-unknown-linux-gnueabihf` targets.][56947]
5177 - [Added support for the `x86_64-unknown-uefi` target.][56769]
5178
5179 Libraries
5180 ---------
5181 - [The methods `overflowing_{add, sub, mul, shl, shr}` are now `const`
5182 functions for all numeric types.][57566]
5183 - [The methods `rotate_left`, `rotate_right`, and `wrapping_{add, sub, mul, shl, shr}`
5184 are now `const` functions for all numeric types.][57105]
5185 - [The methods `is_positive` and `is_negative` are now `const` functions for
5186 all signed numeric types.][57105]
5187 - [The `get` method for all `NonZero` types is now `const`.][57167]
5188 - [The methods `count_ones`, `count_zeros`, `leading_zeros`, `trailing_zeros`,
5189 `swap_bytes`, `from_be`, `from_le`, `to_be`, `to_le` are now `const` for all
5190 numeric types.][57234]
5191 - [`Ipv4Addr::new` is now a `const` function][57234]
5192
5193 Stabilized APIs
5194 ---------------
5195 - [`unix::FileExt::read_exact_at`]
5196 - [`unix::FileExt::write_all_at`]
5197 - [`Option::transpose`]
5198 - [`Result::transpose`]
5199 - [`convert::identity`]
5200 - [`pin::Pin`]
5201 - [`marker::Unpin`]
5202 - [`marker::PhantomPinned`]
5203 - [`Vec::resize_with`]
5204 - [`VecDeque::resize_with`]
5205 - [`Duration::as_millis`]
5206 - [`Duration::as_micros`]
5207 - [`Duration::as_nanos`]
5208
5209
5210 Cargo
5211 -----
5212 - [You can now publish crates that require a feature flag to compile with
5213 `cargo publish --features` or `cargo publish --all-features`.][cargo/6453]
5214 - [Cargo should now rebuild a crate if a file was modified during the initial
5215 build.][cargo/6484]
5216
5217 Compatibility Notes
5218 -------------------
5219 - The methods `str::{trim_left, trim_right, trim_left_matches, trim_right_matches}`
5220 are now deprecated in the standard library, and their usage will now produce a warning.
5221 Please use the `str::{trim_start, trim_end, trim_start_matches, trim_end_matches}`
5222 methods instead.
5223 - The `Error::cause` method has been deprecated in favor of `Error::source` which supports
5224 downcasting.
5225 - [Libtest no longer creates a new thread for each test when
5226 `--test-threads=1`. It also runs the tests in deterministic order][56243]
5227
5228 [56243]: https://github.com/rust-lang/rust/pull/56243
5229 [56303]: https://github.com/rust-lang/rust/pull/56303/
5230 [56351]: https://github.com/rust-lang/rust/pull/56351/
5231 [56362]: https://github.com/rust-lang/rust/pull/56362
5232 [56642]: https://github.com/rust-lang/rust/pull/56642/
5233 [56769]: https://github.com/rust-lang/rust/pull/56769/
5234 [56805]: https://github.com/rust-lang/rust/pull/56805
5235 [56947]: https://github.com/rust-lang/rust/pull/56947/
5236 [57049]: https://github.com/rust-lang/rust/pull/57049/
5237 [57067]: https://github.com/rust-lang/rust/pull/57067/
5238 [57105]: https://github.com/rust-lang/rust/pull/57105
5239 [57130]: https://github.com/rust-lang/rust/pull/57130/
5240 [57167]: https://github.com/rust-lang/rust/pull/57167/
5241 [57175]: https://github.com/rust-lang/rust/pull/57175/
5242 [57234]: https://github.com/rust-lang/rust/pull/57234/
5243 [57332]: https://github.com/rust-lang/rust/pull/57332/
5244 [57465]: https://github.com/rust-lang/rust/pull/57465/
5245 [57532]: https://github.com/rust-lang/rust/pull/57532/
5246 [57535]: https://github.com/rust-lang/rust/pull/57535/
5247 [57566]: https://github.com/rust-lang/rust/pull/57566/
5248 [57615]: https://github.com/rust-lang/rust/pull/57615/
5249 [cargo/6453]: https://github.com/rust-lang/cargo/pull/6453/
5250 [cargo/6484]: https://github.com/rust-lang/cargo/pull/6484/
5251 [`unix::FileExt::read_exact_at`]: https://doc.rust-lang.org/std/os/unix/fs/trait.FileExt.html#method.read_exact_at
5252 [`unix::FileExt::write_all_at`]: https://doc.rust-lang.org/std/os/unix/fs/trait.FileExt.html#method.write_all_at
5253 [`Option::transpose`]: https://doc.rust-lang.org/std/option/enum.Option.html#method.transpose
5254 [`Result::transpose`]: https://doc.rust-lang.org/std/result/enum.Result.html#method.transpose
5255 [`convert::identity`]: https://doc.rust-lang.org/std/convert/fn.identity.html
5256 [`pin::Pin`]: https://doc.rust-lang.org/std/pin/struct.Pin.html
5257 [`marker::Unpin`]: https://doc.rust-lang.org/stable/std/marker/trait.Unpin.html
5258 [`marker::PhantomPinned`]: https://doc.rust-lang.org/nightly/std/marker/struct.PhantomPinned.html
5259 [`Vec::resize_with`]: https://doc.rust-lang.org/std/vec/struct.Vec.html#method.resize_with
5260 [`VecDeque::resize_with`]: https://doc.rust-lang.org/std/collections/struct.VecDeque.html#method.resize_with
5261 [`Duration::as_millis`]: https://doc.rust-lang.org/std/time/struct.Duration.html#method.as_millis
5262 [`Duration::as_micros`]: https://doc.rust-lang.org/std/time/struct.Duration.html#method.as_micros
5263 [`Duration::as_nanos`]: https://doc.rust-lang.org/std/time/struct.Duration.html#method.as_nanos
5264 [platform-support]: https://forge.rust-lang.org/platform-support.html
5265
5266 Version 1.32.0 (2019-01-17)
5267 ==========================
5268
5269 Language
5270 --------
5271 #### 2018 edition
5272 - [You can now use the `?` operator in macro definitions.][56245] The `?`
5273 operator allows you to specify zero or one repetitions similar to the `*` and
5274 `+` operators.
5275 - [Module paths with no leading keyword like `super`, `self`, or `crate`, will
5276 now always resolve to the item (`enum`, `struct`, etc.) available in the
5277 module if present, before resolving to a external crate or an item the prelude.][56759]
5278 E.g.
5279 ```rust
5280 enum Color { Red, Green, Blue }
5281
5282 use Color::*;
5283 ```
5284
5285 #### All editions
5286 - [You can now match against `PhantomData<T>` types.][55837]
5287 - [You can now match against literals in macros with the `literal`
5288 specifier.][56072] This will match against a literal of any type.
5289 E.g. `1`, `'A'`, `"Hello World"`
5290 - [Self can now be used as a constructor and pattern for unit and tuple structs.][56365] E.g.
5291 ```rust
5292 struct Point(i32, i32);
5293
5294 impl Point {
5295 pub fn new(x: i32, y: i32) -> Self {
5296 Self(x, y)
5297 }
5298
5299 pub fn is_origin(&self) -> bool {
5300 match self {
5301 Self(0, 0) => true,
5302 _ => false,
5303 }
5304 }
5305 }
5306 ```
5307 - [Self can also now be used in type definitions.][56366] E.g.
5308 ```rust
5309 enum List<T>
5310 where
5311 Self: PartialOrd<Self> // can write `Self` instead of `List<T>`
5312 {
5313 Nil,
5314 Cons(T, Box<Self>) // likewise here
5315 }
5316 ```
5317 - [You can now mark traits with `#[must_use]`.][55663] This provides a warning if
5318 a `impl Trait` or `dyn Trait` is returned and unused in the program.
5319
5320 Compiler
5321 --------
5322 - [The default allocator has changed from jemalloc to the default allocator on
5323 your system.][55238] The compiler itself on Linux & macOS will still use
5324 jemalloc, but programs compiled with it will use the system allocator.
5325 - [Added the `aarch64-pc-windows-msvc` target.][55702]
5326
5327 Libraries
5328 ---------
5329 - [`PathBuf` now implements `FromStr`.][55148]
5330 - [`Box<[T]>` now implements `FromIterator<T>`.][55843]
5331 - [The `dbg!` macro has been stabilized.][56395] This macro enables you to
5332 easily debug expressions in your rust program. E.g.
5333 ```rust
5334 let a = 2;
5335 let b = dbg!(a * 2) + 1;
5336 // ^-- prints: [src/main.rs:4] a * 2 = 4
5337 assert_eq!(b, 5);
5338 ```
5339
5340 The following APIs are now `const` functions and can be used in a
5341 `const` context.
5342
5343 - [`Cell::as_ptr`]
5344 - [`UnsafeCell::get`]
5345 - [`char::is_ascii`]
5346 - [`iter::empty`]
5347 - [`ManuallyDrop::new`]
5348 - [`ManuallyDrop::into_inner`]
5349 - [`RangeInclusive::start`]
5350 - [`RangeInclusive::end`]
5351 - [`NonNull::as_ptr`]
5352 - [`slice::as_ptr`]
5353 - [`str::as_ptr`]
5354 - [`Duration::as_secs`]
5355 - [`Duration::subsec_millis`]
5356 - [`Duration::subsec_micros`]
5357 - [`Duration::subsec_nanos`]
5358 - [`CStr::as_ptr`]
5359 - [`Ipv4Addr::is_unspecified`]
5360 - [`Ipv6Addr::new`]
5361 - [`Ipv6Addr::octets`]
5362
5363 Stabilized APIs
5364 ---------------
5365 - [`i8::to_be_bytes`]
5366 - [`i8::to_le_bytes`]
5367 - [`i8::to_ne_bytes`]
5368 - [`i8::from_be_bytes`]
5369 - [`i8::from_le_bytes`]
5370 - [`i8::from_ne_bytes`]
5371 - [`i16::to_be_bytes`]
5372 - [`i16::to_le_bytes`]
5373 - [`i16::to_ne_bytes`]
5374 - [`i16::from_be_bytes`]
5375 - [`i16::from_le_bytes`]
5376 - [`i16::from_ne_bytes`]
5377 - [`i32::to_be_bytes`]
5378 - [`i32::to_le_bytes`]
5379 - [`i32::to_ne_bytes`]
5380 - [`i32::from_be_bytes`]
5381 - [`i32::from_le_bytes`]
5382 - [`i32::from_ne_bytes`]
5383 - [`i64::to_be_bytes`]
5384 - [`i64::to_le_bytes`]
5385 - [`i64::to_ne_bytes`]
5386 - [`i64::from_be_bytes`]
5387 - [`i64::from_le_bytes`]
5388 - [`i64::from_ne_bytes`]
5389 - [`i128::to_be_bytes`]
5390 - [`i128::to_le_bytes`]
5391 - [`i128::to_ne_bytes`]
5392 - [`i128::from_be_bytes`]
5393 - [`i128::from_le_bytes`]
5394 - [`i128::from_ne_bytes`]
5395 - [`isize::to_be_bytes`]
5396 - [`isize::to_le_bytes`]
5397 - [`isize::to_ne_bytes`]
5398 - [`isize::from_be_bytes`]
5399 - [`isize::from_le_bytes`]
5400 - [`isize::from_ne_bytes`]
5401 - [`u8::to_be_bytes`]
5402 - [`u8::to_le_bytes`]
5403 - [`u8::to_ne_bytes`]
5404 - [`u8::from_be_bytes`]
5405 - [`u8::from_le_bytes`]
5406 - [`u8::from_ne_bytes`]
5407 - [`u16::to_be_bytes`]
5408 - [`u16::to_le_bytes`]
5409 - [`u16::to_ne_bytes`]
5410 - [`u16::from_be_bytes`]
5411 - [`u16::from_le_bytes`]
5412 - [`u16::from_ne_bytes`]
5413 - [`u32::to_be_bytes`]
5414 - [`u32::to_le_bytes`]
5415 - [`u32::to_ne_bytes`]
5416 - [`u32::from_be_bytes`]
5417 - [`u32::from_le_bytes`]
5418 - [`u32::from_ne_bytes`]
5419 - [`u64::to_be_bytes`]
5420 - [`u64::to_le_bytes`]
5421 - [`u64::to_ne_bytes`]
5422 - [`u64::from_be_bytes`]
5423 - [`u64::from_le_bytes`]
5424 - [`u64::from_ne_bytes`]
5425 - [`u128::to_be_bytes`]
5426 - [`u128::to_le_bytes`]
5427 - [`u128::to_ne_bytes`]
5428 - [`u128::from_be_bytes`]
5429 - [`u128::from_le_bytes`]
5430 - [`u128::from_ne_bytes`]
5431 - [`usize::to_be_bytes`]
5432 - [`usize::to_le_bytes`]
5433 - [`usize::to_ne_bytes`]
5434 - [`usize::from_be_bytes`]
5435 - [`usize::from_le_bytes`]
5436 - [`usize::from_ne_bytes`]
5437
5438 Cargo
5439 -----
5440 - [You can now run `cargo c` as an alias for `cargo check`.][cargo/6218]
5441 - [Usernames are now allowed in alt registry URLs.][cargo/6242]
5442
5443 Misc
5444 ----
5445 - [`libproc_macro` has been added to the `rust-src` distribution.][55280]
5446
5447 Compatibility Notes
5448 -------------------
5449 - [The argument types for AVX's
5450 `_mm256_stream_si256`, `_mm256_stream_pd`, `_mm256_stream_ps`][55610] have
5451 been changed from `*const` to `*mut` as the previous implementation
5452 was unsound.
5453
5454
5455 [55148]: https://github.com/rust-lang/rust/pull/55148/
5456 [55238]: https://github.com/rust-lang/rust/pull/55238/
5457 [55280]: https://github.com/rust-lang/rust/pull/55280/
5458 [55610]: https://github.com/rust-lang/rust/pull/55610/
5459 [55663]: https://github.com/rust-lang/rust/pull/55663/
5460 [55702]: https://github.com/rust-lang/rust/pull/55702/
5461 [55837]: https://github.com/rust-lang/rust/pull/55837/
5462 [55843]: https://github.com/rust-lang/rust/pull/55843/
5463 [56072]: https://github.com/rust-lang/rust/pull/56072/
5464 [56245]: https://github.com/rust-lang/rust/pull/56245/
5465 [56365]: https://github.com/rust-lang/rust/pull/56365/
5466 [56366]: https://github.com/rust-lang/rust/pull/56366/
5467 [56395]: https://github.com/rust-lang/rust/pull/56395/
5468 [56759]: https://github.com/rust-lang/rust/pull/56759/
5469 [cargo/6218]: https://github.com/rust-lang/cargo/pull/6218/
5470 [cargo/6242]: https://github.com/rust-lang/cargo/pull/6242/
5471 [`CStr::as_ptr`]: https://doc.rust-lang.org/std/ffi/struct.CStr.html#method.as_ptr
5472 [`Cell::as_ptr`]: https://doc.rust-lang.org/std/cell/struct.Cell.html#method.as_ptr
5473 [`Duration::as_secs`]: https://doc.rust-lang.org/std/time/struct.Duration.html#method.as_secs
5474 [`Duration::subsec_micros`]: https://doc.rust-lang.org/std/time/struct.Duration.html#method.subsec_micros
5475 [`Duration::subsec_millis`]: https://doc.rust-lang.org/std/time/struct.Duration.html#method.subsec_millis
5476 [`Duration::subsec_nanos`]: https://doc.rust-lang.org/std/time/struct.Duration.html#method.subsec_nanos
5477 [`Ipv4Addr::is_unspecified`]: https://doc.rust-lang.org/std/net/struct.Ipv4Addr.html#method.is_unspecified
5478 [`Ipv6Addr::new`]: https://doc.rust-lang.org/std/net/struct.Ipv6Addr.html#method.new
5479 [`Ipv6Addr::octets`]: https://doc.rust-lang.org/std/net/struct.Ipv6Addr.html#method.octets
5480 [`ManuallyDrop::into_inner`]: https://doc.rust-lang.org/std/mem/struct.ManuallyDrop.html#method.into_inner
5481 [`ManuallyDrop::new`]: https://doc.rust-lang.org/std/mem/struct.ManuallyDrop.html#method.new
5482 [`NonNull::as_ptr`]: https://doc.rust-lang.org/std/ptr/struct.NonNull.html#method.as_ptr
5483 [`RangeInclusive::end`]: https://doc.rust-lang.org/std/ops/struct.RangeInclusive.html#method.end
5484 [`RangeInclusive::start`]: https://doc.rust-lang.org/std/ops/struct.RangeInclusive.html#method.start
5485 [`UnsafeCell::get`]: https://doc.rust-lang.org/std/cell/struct.UnsafeCell.html#method.get
5486 [`slice::as_ptr`]: https://doc.rust-lang.org/std/primitive.slice.html#method.as_ptr
5487 [`char::is_ascii`]: https://doc.rust-lang.org/std/primitive.char.html#method.is_ascii
5488 [`i128::from_be_bytes`]: https://doc.rust-lang.org/stable/std/primitive.i128.html#method.from_be_bytes
5489 [`i128::from_le_bytes`]: https://doc.rust-lang.org/stable/std/primitive.i128.html#method.from_le_bytes
5490 [`i128::from_ne_bytes`]: https://doc.rust-lang.org/stable/std/primitive.i128.html#method.from_ne_bytes
5491 [`i128::to_be_bytes`]: https://doc.rust-lang.org/stable/std/primitive.i128.html#method.to_be_bytes
5492 [`i128::to_le_bytes`]: https://doc.rust-lang.org/stable/std/primitive.i128.html#method.to_le_bytes
5493 [`i128::to_ne_bytes`]: https://doc.rust-lang.org/stable/std/primitive.i128.html#method.to_ne_bytes
5494 [`i16::from_be_bytes`]: https://doc.rust-lang.org/stable/std/primitive.i16.html#method.from_be_bytes
5495 [`i16::from_le_bytes`]: https://doc.rust-lang.org/stable/std/primitive.i16.html#method.from_le_bytes
5496 [`i16::from_ne_bytes`]: https://doc.rust-lang.org/stable/std/primitive.i16.html#method.from_ne_bytes
5497 [`i16::to_be_bytes`]: https://doc.rust-lang.org/stable/std/primitive.i16.html#method.to_be_bytes
5498 [`i16::to_le_bytes`]: https://doc.rust-lang.org/stable/std/primitive.i16.html#method.to_le_bytes
5499 [`i16::to_ne_bytes`]: https://doc.rust-lang.org/stable/std/primitive.i16.html#method.to_ne_bytes
5500 [`i32::from_be_bytes`]: https://doc.rust-lang.org/stable/std/primitive.i32.html#method.from_be_bytes
5501 [`i32::from_le_bytes`]: https://doc.rust-lang.org/stable/std/primitive.i32.html#method.from_le_bytes
5502 [`i32::from_ne_bytes`]: https://doc.rust-lang.org/stable/std/primitive.i32.html#method.from_ne_bytes
5503 [`i32::to_be_bytes`]: https://doc.rust-lang.org/stable/std/primitive.i32.html#method.to_be_bytes
5504 [`i32::to_le_bytes`]: https://doc.rust-lang.org/stable/std/primitive.i32.html#method.to_le_bytes
5505 [`i32::to_ne_bytes`]: https://doc.rust-lang.org/stable/std/primitive.i32.html#method.to_ne_bytes
5506 [`i64::from_be_bytes`]: https://doc.rust-lang.org/stable/std/primitive.i64.html#method.from_be_bytes
5507 [`i64::from_le_bytes`]: https://doc.rust-lang.org/stable/std/primitive.i64.html#method.from_le_bytes
5508 [`i64::from_ne_bytes`]: https://doc.rust-lang.org/stable/std/primitive.i64.html#method.from_ne_bytes
5509 [`i64::to_be_bytes`]: https://doc.rust-lang.org/stable/std/primitive.i64.html#method.to_be_bytes
5510 [`i64::to_le_bytes`]: https://doc.rust-lang.org/stable/std/primitive.i64.html#method.to_le_bytes
5511 [`i64::to_ne_bytes`]: https://doc.rust-lang.org/stable/std/primitive.i64.html#method.to_ne_bytes
5512 [`i8::from_be_bytes`]: https://doc.rust-lang.org/stable/std/primitive.i8.html#method.from_be_bytes
5513 [`i8::from_le_bytes`]: https://doc.rust-lang.org/stable/std/primitive.i8.html#method.from_le_bytes
5514 [`i8::from_ne_bytes`]: https://doc.rust-lang.org/stable/std/primitive.i8.html#method.from_ne_bytes
5515 [`i8::to_be_bytes`]: https://doc.rust-lang.org/stable/std/primitive.i8.html#method.to_be_bytes
5516 [`i8::to_le_bytes`]: https://doc.rust-lang.org/stable/std/primitive.i8.html#method.to_le_bytes
5517 [`i8::to_ne_bytes`]: https://doc.rust-lang.org/stable/std/primitive.i8.html#method.to_ne_bytes
5518 [`isize::from_be_bytes`]: https://doc.rust-lang.org/stable/std/primitive.isize.html#method.from_be_bytes
5519 [`isize::from_le_bytes`]: https://doc.rust-lang.org/stable/std/primitive.isize.html#method.from_le_bytes
5520 [`isize::from_ne_bytes`]: https://doc.rust-lang.org/stable/std/primitive.isize.html#method.from_ne_bytes
5521 [`isize::to_be_bytes`]: https://doc.rust-lang.org/stable/std/primitive.isize.html#method.to_be_bytes
5522 [`isize::to_le_bytes`]: https://doc.rust-lang.org/stable/std/primitive.isize.html#method.to_le_bytes
5523 [`isize::to_ne_bytes`]: https://doc.rust-lang.org/stable/std/primitive.isize.html#method.to_ne_bytes
5524 [`iter::empty`]: https://doc.rust-lang.org/std/iter/fn.empty.html
5525 [`str::as_ptr`]: https://doc.rust-lang.org/std/primitive.str.html#method.as_ptr
5526 [`u128::from_be_bytes`]: https://doc.rust-lang.org/stable/std/primitive.u128.html#method.from_be_bytes
5527 [`u128::from_le_bytes`]: https://doc.rust-lang.org/stable/std/primitive.u128.html#method.from_le_bytes
5528 [`u128::from_ne_bytes`]: https://doc.rust-lang.org/stable/std/primitive.u128.html#method.from_ne_bytes
5529 [`u128::to_be_bytes`]: https://doc.rust-lang.org/stable/std/primitive.u128.html#method.to_be_bytes
5530 [`u128::to_le_bytes`]: https://doc.rust-lang.org/stable/std/primitive.u128.html#method.to_le_bytes
5531 [`u128::to_ne_bytes`]: https://doc.rust-lang.org/stable/std/primitive.u128.html#method.to_ne_bytes
5532 [`u16::from_be_bytes`]: https://doc.rust-lang.org/stable/std/primitive.u16.html#method.from_be_bytes
5533 [`u16::from_le_bytes`]: https://doc.rust-lang.org/stable/std/primitive.u16.html#method.from_le_bytes
5534 [`u16::from_ne_bytes`]: https://doc.rust-lang.org/stable/std/primitive.u16.html#method.from_ne_bytes
5535 [`u16::to_be_bytes`]: https://doc.rust-lang.org/stable/std/primitive.u16.html#method.to_be_bytes
5536 [`u16::to_le_bytes`]: https://doc.rust-lang.org/stable/std/primitive.u16.html#method.to_le_bytes
5537 [`u16::to_ne_bytes`]: https://doc.rust-lang.org/stable/std/primitive.u16.html#method.to_ne_bytes
5538 [`u32::from_be_bytes`]: https://doc.rust-lang.org/stable/std/primitive.u32.html#method.from_be_bytes
5539 [`u32::from_le_bytes`]: https://doc.rust-lang.org/stable/std/primitive.u32.html#method.from_le_bytes
5540 [`u32::from_ne_bytes`]: https://doc.rust-lang.org/stable/std/primitive.u32.html#method.from_ne_bytes
5541 [`u32::to_be_bytes`]: https://doc.rust-lang.org/stable/std/primitive.u32.html#method.to_be_bytes
5542 [`u32::to_le_bytes`]: https://doc.rust-lang.org/stable/std/primitive.u32.html#method.to_le_bytes
5543 [`u32::to_ne_bytes`]: https://doc.rust-lang.org/stable/std/primitive.u32.html#method.to_ne_bytes
5544 [`u64::from_be_bytes`]: https://doc.rust-lang.org/stable/std/primitive.u64.html#method.from_be_bytes
5545 [`u64::from_le_bytes`]: https://doc.rust-lang.org/stable/std/primitive.u64.html#method.from_le_bytes
5546 [`u64::from_ne_bytes`]: https://doc.rust-lang.org/stable/std/primitive.u64.html#method.from_ne_bytes
5547 [`u64::to_be_bytes`]: https://doc.rust-lang.org/stable/std/primitive.u64.html#method.to_be_bytes
5548 [`u64::to_le_bytes`]: https://doc.rust-lang.org/stable/std/primitive.u64.html#method.to_le_bytes
5549 [`u64::to_ne_bytes`]: https://doc.rust-lang.org/stable/std/primitive.u64.html#method.to_ne_bytes
5550 [`u8::from_be_bytes`]: https://doc.rust-lang.org/stable/std/primitive.u8.html#method.from_be_bytes
5551 [`u8::from_le_bytes`]: https://doc.rust-lang.org/stable/std/primitive.u8.html#method.from_le_bytes
5552 [`u8::from_ne_bytes`]: https://doc.rust-lang.org/stable/std/primitive.u8.html#method.from_ne_bytes
5553 [`u8::to_be_bytes`]: https://doc.rust-lang.org/stable/std/primitive.u8.html#method.to_be_bytes
5554 [`u8::to_le_bytes`]: https://doc.rust-lang.org/stable/std/primitive.u8.html#method.to_le_bytes
5555 [`u8::to_ne_bytes`]: https://doc.rust-lang.org/stable/std/primitive.u8.html#method.to_ne_bytes
5556 [`usize::from_be_bytes`]: https://doc.rust-lang.org/stable/std/primitive.usize.html#method.from_be_bytes
5557 [`usize::from_le_bytes`]: https://doc.rust-lang.org/stable/std/primitive.usize.html#method.from_le_bytes
5558 [`usize::from_ne_bytes`]: https://doc.rust-lang.org/stable/std/primitive.usize.html#method.from_ne_bytes
5559 [`usize::to_be_bytes`]: https://doc.rust-lang.org/stable/std/primitive.usize.html#method.to_be_bytes
5560 [`usize::to_le_bytes`]: https://doc.rust-lang.org/stable/std/primitive.usize.html#method.to_le_bytes
5561 [`usize::to_ne_bytes`]: https://doc.rust-lang.org/stable/std/primitive.usize.html#method.to_ne_bytes
5562
5563
5564 Version 1.31.1 (2018-12-20)
5565 ===========================
5566
5567 - [Fix Rust failing to build on `powerpc-unknown-netbsd`][56562]
5568 - [Fix broken go-to-definition in RLS][rls/1171]
5569 - [Fix infinite loop on hover in RLS][rls/1170]
5570
5571 [56562]: https://github.com/rust-lang/rust/pull/56562
5572 [rls/1171]: https://github.com/rust-lang/rls/issues/1171
5573 [rls/1170]: https://github.com/rust-lang/rls/pull/1170
5574
5575 Version 1.31.0 (2018-12-06)
5576 ==========================
5577
5578 Language
5579 --------
5580 - 🎉 [This version marks the release of the 2018 edition of Rust.][54057] 🎉
5581 - [New lifetime elision rules now allow for eliding lifetimes in functions and
5582 impl headers.][54778] E.g. `impl<'a> Reader for BufReader<'a> {}` can now be
5583 `impl Reader for BufReader<'_> {}`. Lifetimes are still required to be defined
5584 in structs.
5585 - [You can now define and use `const` functions.][54835] These are currently
5586 a strict minimal subset of the [const fn RFC][RFC-911]. Refer to the
5587 [language reference][const-reference] for what exactly is available.
5588 - [You can now use tool lints, which allow you to scope lints from external
5589 tools using attributes.][54870] E.g. `#[allow(clippy::filter_map)]`.
5590 - [`#[no_mangle]` and `#[export_name]` attributes can now be located anywhere in
5591 a crate, not just in exported functions.][54451]
5592 - [You can now use parentheses in pattern matches.][54497]
5593
5594 Compiler
5595 --------
5596 - [Updated musl to 1.1.20][54430]
5597
5598 Libraries
5599 ---------
5600 - [You can now convert `num::NonZero*` types to their raw equivalents using the
5601 `From` trait.][54240] E.g. `u8` now implements `From<NonZeroU8>`.
5602 - [You can now convert a `&Option<T>` into `Option<&T>` and `&mut Option<T>`
5603 into `Option<&mut T>` using the `From` trait.][53218]
5604 - [You can now multiply (`*`) a `time::Duration` by a `u32`.][52813]
5605
5606
5607 Stabilized APIs
5608 ---------------
5609 - [`slice::align_to`]
5610 - [`slice::align_to_mut`]
5611 - [`slice::chunks_exact`]
5612 - [`slice::chunks_exact_mut`]
5613 - [`slice::rchunks`]
5614 - [`slice::rchunks_mut`]
5615 - [`slice::rchunks_exact`]
5616 - [`slice::rchunks_exact_mut`]
5617 - [`Option::replace`]
5618
5619 Cargo
5620 -----
5621 - [Cargo will now download crates in parallel using HTTP/2.][cargo/6005]
5622 - [You can now rename packages in your Cargo.toml][cargo/6319] We have a guide
5623 on [how to use the `package` key in your dependencies.][cargo-rename-reference]
5624
5625 [52813]: https://github.com/rust-lang/rust/pull/52813/
5626 [53218]: https://github.com/rust-lang/rust/pull/53218/
5627 [54057]: https://github.com/rust-lang/rust/pull/54057/
5628 [54240]: https://github.com/rust-lang/rust/pull/54240/
5629 [54430]: https://github.com/rust-lang/rust/pull/54430/
5630 [54451]: https://github.com/rust-lang/rust/pull/54451/
5631 [54497]: https://github.com/rust-lang/rust/pull/54497/
5632 [54778]: https://github.com/rust-lang/rust/pull/54778/
5633 [54835]: https://github.com/rust-lang/rust/pull/54835/
5634 [54870]: https://github.com/rust-lang/rust/pull/54870/
5635 [RFC-911]: https://github.com/rust-lang/rfcs/pull/911
5636 [`Option::replace`]: https://doc.rust-lang.org/std/option/enum.Option.html#method.replace
5637 [`slice::align_to_mut`]: https://doc.rust-lang.org/std/primitive.slice.html#method.align_to_mut
5638 [`slice::align_to`]: https://doc.rust-lang.org/std/primitive.slice.html#method.align_to
5639 [`slice::chunks_exact_mut`]: https://doc.rust-lang.org/std/primitive.slice.html#method.chunks_exact_mut
5640 [`slice::chunks_exact`]: https://doc.rust-lang.org/std/primitive.slice.html#method.chunks_exact
5641 [`slice::rchunks_exact_mut`]: https://doc.rust-lang.org/std/primitive.slice.html#method.rchunks_mut
5642 [`slice::rchunks_exact`]: https://doc.rust-lang.org/std/primitive.slice.html#method.rchunks_exact
5643 [`slice::rchunks_mut`]: https://doc.rust-lang.org/std/primitive.slice.html#method.rchunks_mut
5644 [`slice::rchunks`]: https://doc.rust-lang.org/std/primitive.slice.html#method.rchunks
5645 [cargo/6005]: https://github.com/rust-lang/cargo/pull/6005/
5646 [cargo/6319]: https://github.com/rust-lang/cargo/pull/6319/
5647 [cargo-rename-reference]: https://doc.rust-lang.org/cargo/reference/specifying-dependencies.html#renaming-dependencies-in-cargotoml
5648 [const-reference]: https://doc.rust-lang.org/reference/items/functions.html#const-functions
5649
5650 Version 1.30.1 (2018-11-08)
5651 ===========================
5652
5653 - [Fixed overflow ICE in rustdoc][54199]
5654 - [Cap Cargo progress bar width at 60 in MSYS terminals][cargo/6122]
5655
5656 [54199]: https://github.com/rust-lang/rust/pull/54199
5657 [cargo/6122]: https://github.com/rust-lang/cargo/pull/6122
5658
5659 Version 1.30.0 (2018-10-25)
5660 ==========================
5661
5662 Language
5663 --------
5664 - [Procedural macros are now available.][52081] These kinds of macros allow for
5665 more powerful code generation. There is a [new chapter available][proc-macros]
5666 in the Rust Programming Language book that goes further in depth.
5667 - [You can now use keywords as identifiers using the raw identifiers
5668 syntax (`r#`),][53236] e.g. `let r#for = true;`
5669 - [Using anonymous parameters in traits is now deprecated with a warning and
5670 will be a hard error in the 2018 edition.][53272]
5671 - [You can now use `crate` in paths.][54404] This allows you to refer to the
5672 crate root in the path, e.g. `use crate::foo;` refers to `foo` in `src/lib.rs`.
5673 - [Using a external crate no longer requires being prefixed with `::`.][54404]
5674 Previously, using a external crate in a module without a use statement
5675 required `let json = ::serde_json::from_str(foo);` but can now be written
5676 as `let json = serde_json::from_str(foo);`.
5677 - [You can now apply the `#[used]` attribute to static items to prevent the
5678 compiler from optimising them away, even if they appear to be unused,][51363]
5679 e.g. `#[used] static FOO: u32 = 1;`
5680 - [You can now import and reexport macros from other crates with the `use`
5681 syntax.][50911] Macros exported with `#[macro_export]` are now placed into
5682 the root module of the crate. If your macro relies on calling other local
5683 macros, it is recommended to export with the
5684 `#[macro_export(local_inner_macros)]` attribute so users won't have to import
5685 those macros.
5686 - [You can now catch visibility keywords (e.g. `pub`, `pub(crate)`) in macros
5687 using the `vis` specifier.][53370]
5688 - [Non-macro attributes now allow all forms of literals, not just
5689 strings.][53044] Previously, you would write `#[attr("true")]`, and you can now
5690 write `#[attr(true)]`.
5691 - [You can now specify a function to handle a panic in the Rust runtime with the
5692 `#[panic_handler]` attribute.][51366]
5693
5694 Compiler
5695 --------
5696 - [Added the `riscv32imc-unknown-none-elf` target.][53822]
5697 - [Added the `aarch64-unknown-netbsd` target][53165]
5698 - [Upgraded to LLVM 8.][53611]
5699
5700 Libraries
5701 ---------
5702 - [`ManuallyDrop` now allows the inner type to be unsized.][53033]
5703
5704 Stabilized APIs
5705 ---------------
5706 - [`Ipv4Addr::BROADCAST`]
5707 - [`Ipv4Addr::LOCALHOST`]
5708 - [`Ipv4Addr::UNSPECIFIED`]
5709 - [`Ipv6Addr::LOCALHOST`]
5710 - [`Ipv6Addr::UNSPECIFIED`]
5711 - [`Iterator::find_map`]
5712
5713 The following methods are replacement methods for `trim_left`, `trim_right`,
5714 `trim_left_matches`, and `trim_right_matches`, which will be deprecated
5715 in 1.33.0:
5716 - [`str::trim_end_matches`]
5717 - [`str::trim_end`]
5718 - [`str::trim_start_matches`]
5719 - [`str::trim_start`]
5720
5721 Cargo
5722 ----
5723 - [`cargo run` doesn't require specifying a package in workspaces.][cargo/5877]
5724 - [`cargo doc` now supports `--message-format=json`.][cargo/5878] This is
5725 equivalent to calling `rustdoc --error-format=json`.
5726 - [Cargo will now provide a progress bar for builds.][cargo/5995]
5727
5728 Misc
5729 ----
5730 - [`rustdoc` allows you to specify what edition to treat your code as with the
5731 `--edition` option.][54057]
5732 - [`rustdoc` now has the `--color` (specify whether to output color) and
5733 `--error-format` (specify error format, e.g. `json`) options.][53003]
5734 - [We now distribute a `rust-gdbgui` script that invokes `gdbgui` with Rust
5735 debug symbols.][53774]
5736 - [Attributes from Rust tools such as `rustfmt` or `clippy` are now
5737 available,][53459] e.g. `#[rustfmt::skip]` will skip formatting the next item.
5738
5739 [50911]: https://github.com/rust-lang/rust/pull/50911/
5740 [51363]: https://github.com/rust-lang/rust/pull/51363/
5741 [51366]: https://github.com/rust-lang/rust/pull/51366/
5742 [52081]: https://github.com/rust-lang/rust/pull/52081/
5743 [53003]: https://github.com/rust-lang/rust/pull/53003/
5744 [53033]: https://github.com/rust-lang/rust/pull/53033/
5745 [53044]: https://github.com/rust-lang/rust/pull/53044/
5746 [53165]: https://github.com/rust-lang/rust/pull/53165/
5747 [53611]: https://github.com/rust-lang/rust/pull/53611/
5748 [53236]: https://github.com/rust-lang/rust/pull/53236/
5749 [53272]: https://github.com/rust-lang/rust/pull/53272/
5750 [53370]: https://github.com/rust-lang/rust/pull/53370/
5751 [53459]: https://github.com/rust-lang/rust/pull/53459/
5752 [53774]: https://github.com/rust-lang/rust/pull/53774/
5753 [53822]: https://github.com/rust-lang/rust/pull/53822/
5754 [54057]: https://github.com/rust-lang/rust/pull/54057/
5755 [54404]: https://github.com/rust-lang/rust/pull/54404/
5756 [cargo/5877]: https://github.com/rust-lang/cargo/pull/5877/
5757 [cargo/5878]: https://github.com/rust-lang/cargo/pull/5878/
5758 [cargo/5995]: https://github.com/rust-lang/cargo/pull/5995/
5759 [proc-macros]: https://doc.rust-lang.org/nightly/book/2018-edition/ch19-06-macros.html
5760
5761 [`Ipv4Addr::BROADCAST`]: https://doc.rust-lang.org/nightly/std/net/struct.Ipv4Addr.html#associatedconstant.BROADCAST
5762 [`Ipv4Addr::LOCALHOST`]: https://doc.rust-lang.org/nightly/std/net/struct.Ipv4Addr.html#associatedconstant.LOCALHOST
5763 [`Ipv4Addr::UNSPECIFIED`]: https://doc.rust-lang.org/nightly/std/net/struct.Ipv4Addr.html#associatedconstant.UNSPECIFIED
5764 [`Ipv6Addr::LOCALHOST`]: https://doc.rust-lang.org/nightly/std/net/struct.Ipv6Addr.html#associatedconstant.LOCALHOST
5765 [`Ipv6Addr::UNSPECIFIED`]: https://doc.rust-lang.org/nightly/std/net/struct.Ipv6Addr.html#associatedconstant.UNSPECIFIED
5766 [`Iterator::find_map`]: https://doc.rust-lang.org/std/iter/trait.Iterator.html#method.find_map
5767 [`str::trim_end_matches`]: https://doc.rust-lang.org/nightly/std/primitive.str.html#method.trim_end_matches
5768 [`str::trim_end`]: https://doc.rust-lang.org/nightly/std/primitive.str.html#method.trim_end
5769 [`str::trim_start_matches`]: https://doc.rust-lang.org/nightly/std/primitive.str.html#method.trim_start_matches
5770 [`str::trim_start`]: https://doc.rust-lang.org/nightly/std/primitive.str.html#method.trim_start
5771
5772
5773 Version 1.29.2 (2018-10-11)
5774 ===========================
5775
5776 - [Workaround for an aliasing-related LLVM bug, which caused miscompilation.][54639]
5777 - The `rls-preview` component on the windows-gnu targets has been restored.
5778
5779 [54639]: https://github.com/rust-lang/rust/pull/54639
5780
5781
5782 Version 1.29.1 (2018-09-25)
5783 ===========================
5784
5785 Security Notes
5786 --------------
5787
5788 - The standard library's `str::repeat` function contained an out of bounds write
5789 caused by an integer overflow. This has been fixed by deterministically
5790 panicking when an overflow happens.
5791
5792 Thank you to Scott McMurray for responsibly disclosing this vulnerability to
5793 us.
5794
5795
5796 Version 1.29.0 (2018-09-13)
5797 ==========================
5798
5799 Compiler
5800 --------
5801 - [Bumped minimum LLVM version to 5.0.][51899]
5802 - [Added `powerpc64le-unknown-linux-musl` target.][51619]
5803 - [Added `aarch64-unknown-hermit` and `x86_64-unknown-hermit` targets.][52861]
5804 - [Upgraded to LLVM 7.][51966]
5805
5806 Libraries
5807 ---------
5808 - [`Once::call_once` no longer requires `Once` to be `'static`.][52239]
5809 - [`BuildHasherDefault` now implements `PartialEq` and `Eq`.][52402]
5810 - [`Box<CStr>`, `Box<OsStr>`, and `Box<Path>` now implement `Clone`.][51912]
5811 - [Implemented `PartialEq<&str>` for `OsString` and `PartialEq<OsString>`
5812 for `&str`.][51178]
5813 - [`Cell<T>` now allows `T` to be unsized.][50494]
5814 - [`SocketAddr` is now stable on Redox.][52656]
5815
5816 Stabilized APIs
5817 ---------------
5818 - [`Arc::downcast`]
5819 - [`Iterator::flatten`]
5820 - [`Rc::downcast`]
5821
5822 Cargo
5823 -----
5824 - [Cargo can silently fix some bad lockfiles.][cargo/5831] You can use
5825 `--locked` to disable this behavior.
5826 - [`cargo-install` will now allow you to cross compile an install
5827 using `--target`.][cargo/5614]
5828 - [Added the `cargo-fix` subcommand to automatically move project code from
5829 2015 edition to 2018.][cargo/5723]
5830 - [`cargo doc` can now optionally document private types using the
5831 `--document-private-items` flag.][cargo/5543]
5832
5833 Misc
5834 ----
5835 - [`rustdoc` now has the `--cap-lints` option which demotes all lints above
5836 the specified level to that level.][52354] For example `--cap-lints warn`
5837 will demote `deny` and `forbid` lints to `warn`.
5838 - [`rustc` and `rustdoc` will now have the exit code of `1` if compilation
5839 fails and `101` if there is a panic.][52197]
5840 - [A preview of clippy has been made available through rustup.][51122]
5841 You can install the preview with `rustup component add clippy-preview`.
5842
5843 Compatibility Notes
5844 -------------------
5845 - [`str::{slice_unchecked, slice_unchecked_mut}` are now deprecated.][51807]
5846 Use `str::get_unchecked(begin..end)` instead.
5847 - [`std::env::home_dir` is now deprecated for its unintuitive behavior.][51656]
5848 Consider using the `home_dir` function from
5849 https://crates.io/crates/dirs instead.
5850 - [`rustc` will no longer silently ignore invalid data in target spec.][52330]
5851 - [`cfg` attributes and `--cfg` command line flags are now more
5852 strictly validated.][53893]
5853
5854 [53893]: https://github.com/rust-lang/rust/pull/53893/
5855 [52861]: https://github.com/rust-lang/rust/pull/52861/
5856 [51966]: https://github.com/rust-lang/rust/pull/51966/
5857 [52656]: https://github.com/rust-lang/rust/pull/52656/
5858 [52239]: https://github.com/rust-lang/rust/pull/52239/
5859 [52330]: https://github.com/rust-lang/rust/pull/52330/
5860 [52354]: https://github.com/rust-lang/rust/pull/52354/
5861 [52402]: https://github.com/rust-lang/rust/pull/52402/
5862 [52197]: https://github.com/rust-lang/rust/pull/52197/
5863 [51807]: https://github.com/rust-lang/rust/pull/51807/
5864 [51899]: https://github.com/rust-lang/rust/pull/51899/
5865 [51912]: https://github.com/rust-lang/rust/pull/51912/
5866 [51619]: https://github.com/rust-lang/rust/pull/51619/
5867 [51656]: https://github.com/rust-lang/rust/pull/51656/
5868 [51178]: https://github.com/rust-lang/rust/pull/51178/
5869 [51122]: https://github.com/rust-lang/rust/pull/51122
5870 [50494]: https://github.com/rust-lang/rust/pull/50494/
5871 [cargo/5543]: https://github.com/rust-lang/cargo/pull/5543
5872 [cargo/5614]: https://github.com/rust-lang/cargo/pull/5614/
5873 [cargo/5723]: https://github.com/rust-lang/cargo/pull/5723/
5874 [cargo/5831]: https://github.com/rust-lang/cargo/pull/5831/
5875 [`Arc::downcast`]: https://doc.rust-lang.org/std/sync/struct.Arc.html#method.downcast
5876 [`Iterator::flatten`]: https://doc.rust-lang.org/std/iter/trait.Iterator.html#method.flatten
5877 [`Rc::downcast`]: https://doc.rust-lang.org/std/rc/struct.Rc.html#method.downcast
5878
5879
5880 Version 1.28.0 (2018-08-02)
5881 ===========================
5882
5883 Language
5884 --------
5885 - [The `#[repr(transparent)]` attribute is now stable.][51562] This attribute
5886 allows a Rust newtype wrapper (`struct NewType<T>(T);`) to be represented as
5887 the inner type across Foreign Function Interface (FFI) boundaries.
5888 - [The keywords `pure`, `sizeof`, `alignof`, and `offsetof` have been unreserved
5889 and can now be used as identifiers.][51196]
5890 - [The `GlobalAlloc` trait and `#[global_allocator]` attribute are now
5891 stable.][51241] This will allow users to specify a global allocator for
5892 their program.
5893 - [Unit test functions marked with the `#[test]` attribute can now return
5894 `Result<(), E: Debug>` in addition to `()`.][51298]
5895 - [The `lifetime` specifier for `macro_rules!` is now stable.][50385] This
5896 allows macros to easily target lifetimes.
5897
5898 Compiler
5899 --------
5900 - [The `s` and `z` optimisation levels are now stable.][50265] These optimisations
5901 prioritise making smaller binary sizes. `z` is the same as `s` with the
5902 exception that it does not vectorise loops, which typically results in an even
5903 smaller binary.
5904 - [The short error format is now stable.][49546] Specified with
5905 `--error-format=short` this option will provide a more compressed output of
5906 rust error messages.
5907 - [Added a lint warning when you have duplicated `macro_export`s.][50143]
5908 - [Reduced the number of allocations in the macro parser.][50855] This can
5909 improve compile times of macro heavy crates on average by 5%.
5910
5911 Libraries
5912 ---------
5913 - [Implemented `Default` for `&mut str`.][51306]
5914 - [Implemented `From<bool>` for all integer and unsigned number types.][50554]
5915 - [Implemented `Extend` for `()`.][50234]
5916 - [The `Debug` implementation of `time::Duration` should now be more easily
5917 human readable.][50364] Previously a `Duration` of one second would printed as
5918 `Duration { secs: 1, nanos: 0 }` and will now be printed as `1s`.
5919 - [Implemented `From<&String>` for `Cow<str>`, `From<&Vec<T>>` for `Cow<[T]>`,
5920 `From<Cow<CStr>>` for `CString`, `From<CString>, From<CStr>, From<&CString>`
5921 for `Cow<CStr>`, `From<OsString>, From<OsStr>, From<&OsString>` for
5922 `Cow<OsStr>`, `From<&PathBuf>` for `Cow<Path>`, and `From<Cow<Path>>`
5923 for `PathBuf`.][50170]
5924 - [Implemented `Shl` and `Shr` for `Wrapping<u128>`
5925 and `Wrapping<i128>`.][50465]
5926 - [`DirEntry::metadata` now uses `fstatat` instead of `lstat` when
5927 possible.][51050] This can provide up to a 40% speed increase.
5928 - [Improved error messages when using `format!`.][50610]
5929
5930 Stabilized APIs
5931 ---------------
5932 - [`Iterator::step_by`]
5933 - [`Path::ancestors`]
5934 - [`SystemTime::UNIX_EPOCH`]
5935 - [`alloc::GlobalAlloc`]
5936 - [`alloc::Layout`]
5937 - [`alloc::LayoutErr`]
5938 - [`alloc::System`]
5939 - [`alloc::alloc`]
5940 - [`alloc::alloc_zeroed`]
5941 - [`alloc::dealloc`]
5942 - [`alloc::realloc`]
5943 - [`alloc::handle_alloc_error`]
5944 - [`btree_map::Entry::or_default`]
5945 - [`fmt::Alignment`]
5946 - [`hash_map::Entry::or_default`]
5947 - [`iter::repeat_with`]
5948 - [`num::NonZeroUsize`]
5949 - [`num::NonZeroU128`]
5950 - [`num::NonZeroU16`]
5951 - [`num::NonZeroU32`]
5952 - [`num::NonZeroU64`]
5953 - [`num::NonZeroU8`]
5954 - [`ops::RangeBounds`]
5955 - [`slice::SliceIndex`]
5956 - [`slice::from_mut`]
5957 - [`slice::from_ref`]
5958 - [`{Any + Send + Sync}::downcast_mut`]
5959 - [`{Any + Send + Sync}::downcast_ref`]
5960 - [`{Any + Send + Sync}::is`]
5961
5962 Cargo
5963 -----
5964 - [Cargo will now no longer allow you to publish crates with build scripts that
5965 modify the `src` directory.][cargo/5584] The `src` directory in a crate should be
5966 considered to be immutable.
5967
5968 Misc
5969 ----
5970 - [The `suggestion_applicability` field in `rustc`'s json output is now
5971 stable.][50486] This will allow dev tools to check whether a code suggestion
5972 would apply to them.
5973
5974 Compatibility Notes
5975 -------------------
5976 - [Rust will consider trait objects with duplicated constraints to be the same
5977 type as without the duplicated constraint.][51276] For example the below code will
5978 now fail to compile.
5979 ```rust
5980 trait Trait {}
5981
5982 impl Trait + Send {
5983 fn test(&self) { println!("one"); } //~ ERROR duplicate definitions with name `test`
5984 }
5985
5986 impl Trait + Send + Send {
5987 fn test(&self) { println!("two"); }
5988 }
5989 ```
5990
5991 [49546]: https://github.com/rust-lang/rust/pull/49546/
5992 [50143]: https://github.com/rust-lang/rust/pull/50143/
5993 [50170]: https://github.com/rust-lang/rust/pull/50170/
5994 [50234]: https://github.com/rust-lang/rust/pull/50234/
5995 [50265]: https://github.com/rust-lang/rust/pull/50265/
5996 [50364]: https://github.com/rust-lang/rust/pull/50364/
5997 [50385]: https://github.com/rust-lang/rust/pull/50385/
5998 [50465]: https://github.com/rust-lang/rust/pull/50465/
5999 [50486]: https://github.com/rust-lang/rust/pull/50486/
6000 [50554]: https://github.com/rust-lang/rust/pull/50554/
6001 [50610]: https://github.com/rust-lang/rust/pull/50610/
6002 [50855]: https://github.com/rust-lang/rust/pull/50855/
6003 [51050]: https://github.com/rust-lang/rust/pull/51050/
6004 [51196]: https://github.com/rust-lang/rust/pull/51196/
6005 [51241]: https://github.com/rust-lang/rust/pull/51241/
6006 [51276]: https://github.com/rust-lang/rust/pull/51276/
6007 [51298]: https://github.com/rust-lang/rust/pull/51298/
6008 [51306]: https://github.com/rust-lang/rust/pull/51306/
6009 [51562]: https://github.com/rust-lang/rust/pull/51562/
6010 [cargo/5584]: https://github.com/rust-lang/cargo/pull/5584/
6011 [`Iterator::step_by`]: https://doc.rust-lang.org/std/iter/trait.Iterator.html#method.step_by
6012 [`Path::ancestors`]: https://doc.rust-lang.org/std/path/struct.Path.html#method.ancestors
6013 [`SystemTime::UNIX_EPOCH`]: https://doc.rust-lang.org/std/time/struct.SystemTime.html#associatedconstant.UNIX_EPOCH
6014 [`alloc::GlobalAlloc`]: https://doc.rust-lang.org/std/alloc/trait.GlobalAlloc.html
6015 [`alloc::Layout`]: https://doc.rust-lang.org/std/alloc/struct.Layout.html
6016 [`alloc::LayoutErr`]: https://doc.rust-lang.org/std/alloc/struct.LayoutErr.html
6017 [`alloc::System`]: https://doc.rust-lang.org/std/alloc/struct.System.html
6018 [`alloc::alloc`]: https://doc.rust-lang.org/std/alloc/fn.alloc.html
6019 [`alloc::alloc_zeroed`]: https://doc.rust-lang.org/std/alloc/fn.alloc_zeroed.html
6020 [`alloc::dealloc`]: https://doc.rust-lang.org/std/alloc/fn.dealloc.html
6021 [`alloc::realloc`]: https://doc.rust-lang.org/std/alloc/fn.realloc.html
6022 [`alloc::handle_alloc_error`]: https://doc.rust-lang.org/std/alloc/fn.handle_alloc_error.html
6023 [`btree_map::Entry::or_default`]: https://doc.rust-lang.org/std/collections/btree_map/enum.Entry.html#method.or_default
6024 [`fmt::Alignment`]: https://doc.rust-lang.org/std/fmt/enum.Alignment.html
6025 [`hash_map::Entry::or_default`]: https://doc.rust-lang.org/std/collections/hash_map/enum.Entry.html#method.or_default
6026 [`iter::repeat_with`]: https://doc.rust-lang.org/std/iter/fn.repeat_with.html
6027 [`num::NonZeroUsize`]: https://doc.rust-lang.org/std/num/struct.NonZeroUsize.html
6028 [`num::NonZeroU128`]: https://doc.rust-lang.org/std/num/struct.NonZeroU128.html
6029 [`num::NonZeroU16`]: https://doc.rust-lang.org/std/num/struct.NonZeroU16.html
6030 [`num::NonZeroU32`]: https://doc.rust-lang.org/std/num/struct.NonZeroU32.html
6031 [`num::NonZeroU64`]: https://doc.rust-lang.org/std/num/struct.NonZeroU64.html
6032 [`num::NonZeroU8`]: https://doc.rust-lang.org/std/num/struct.NonZeroU8.html
6033 [`ops::RangeBounds`]: https://doc.rust-lang.org/std/ops/trait.RangeBounds.html
6034 [`slice::SliceIndex`]: https://doc.rust-lang.org/std/slice/trait.SliceIndex.html
6035 [`slice::from_mut`]: https://doc.rust-lang.org/std/slice/fn.from_mut.html
6036 [`slice::from_ref`]: https://doc.rust-lang.org/std/slice/fn.from_ref.html
6037 [`{Any + Send + Sync}::downcast_mut`]: https://doc.rust-lang.org/std/any/trait.Any.html#method.downcast_mut-2
6038 [`{Any + Send + Sync}::downcast_ref`]: https://doc.rust-lang.org/std/any/trait.Any.html#method.downcast_ref-2
6039 [`{Any + Send + Sync}::is`]: https://doc.rust-lang.org/std/any/trait.Any.html#method.is-2
6040
6041 Version 1.27.2 (2018-07-20)
6042 ===========================
6043
6044 Compatibility Notes
6045 -------------------
6046
6047 - The borrow checker was fixed to avoid potential unsoundness when using
6048 match ergonomics: [#52213][52213].
6049
6050 [52213]: https://github.com/rust-lang/rust/issues/52213
6051
6052 Version 1.27.1 (2018-07-10)
6053 ===========================
6054
6055 Security Notes
6056 --------------
6057
6058 - rustdoc would execute plugins in the /tmp/rustdoc/plugins directory
6059 when running, which enabled executing code as some other user on a
6060 given machine. This release fixes that vulnerability; you can read
6061 more about this on the [blog][rustdoc-sec]. The associated CVE is [CVE-2018-1000622].
6062
6063 Thank you to Red Hat for responsibly disclosing this vulnerability to us.
6064
6065 Compatibility Notes
6066 -------------------
6067
6068 - The borrow checker was fixed to avoid an additional potential unsoundness when using
6069 match ergonomics: [#51415][51415], [#49534][49534].
6070
6071 [51415]: https://github.com/rust-lang/rust/issues/51415
6072 [49534]: https://github.com/rust-lang/rust/issues/49534
6073 [rustdoc-sec]: https://blog.rust-lang.org/2018/07/06/security-advisory-for-rustdoc.html
6074 [CVE-2018-1000622]: https://cve.mitre.org/cgi-bin/cvename.cgi?name=%20CVE-2018-1000622
6075
6076 Version 1.27.0 (2018-06-21)
6077 ==========================
6078
6079 Language
6080 --------
6081 - [Removed 'proc' from the reserved keywords list.][49699] This allows `proc` to
6082 be used as an identifier.
6083 - [The dyn syntax is now available.][49968] This syntax is equivalent to the
6084 bare `Trait` syntax, and should make it clearer when being used in tandem with
6085 `impl Trait` because it is equivalent to the following syntax:
6086 `&Trait == &dyn Trait`, `&mut Trait == &mut dyn Trait`, and
6087 `Box<Trait> == Box<dyn Trait>`.
6088 - [Attributes on generic parameters such as types and lifetimes are
6089 now stable.][48851] e.g.
6090 `fn foo<#[lifetime_attr] 'a, #[type_attr] T: 'a>() {}`
6091 - [The `#[must_use]` attribute can now also be used on functions as well as
6092 types.][48925] It provides a lint that by default warns users when the
6093 value returned by a function has not been used.
6094
6095 Compiler
6096 --------
6097 - [Added the `armv5te-unknown-linux-musleabi` target.][50423]
6098
6099 Libraries
6100 ---------
6101 - [SIMD (Single Instruction Multiple Data) on x86/x86_64 is now stable.][49664]
6102 This includes [`arch::x86`] & [`arch::x86_64`] modules which contain
6103 SIMD intrinsics, a new macro called `is_x86_feature_detected!`, the
6104 `#[target_feature(enable="")]` attribute, and adding `target_feature = ""` to
6105 the `cfg` attribute.
6106 - [A lot of methods for `[u8]`, `f32`, and `f64` previously only available in
6107 std are now available in core.][49896]
6108 - [The generic `Rhs` type parameter on `ops::{Shl, ShlAssign, Shr}` now defaults
6109 to `Self`.][49630]
6110 - [`std::str::replace` now has the `#[must_use]` attribute][50177] to clarify
6111 that the operation isn't done in place.
6112 - [`Clone::clone`, `Iterator::collect`, and `ToOwned::to_owned` now have
6113 the `#[must_use]` attribute][49533] to warn about unused potentially
6114 expensive allocations.
6115
6116 Stabilized APIs
6117 ---------------
6118 - [`DoubleEndedIterator::rfind`]
6119 - [`DoubleEndedIterator::rfold`]
6120 - [`DoubleEndedIterator::try_rfold`]
6121 - [`Duration::from_micros`]
6122 - [`Duration::from_nanos`]
6123 - [`Duration::subsec_micros`]
6124 - [`Duration::subsec_millis`]
6125 - [`HashMap::remove_entry`]
6126 - [`Iterator::try_fold`]
6127 - [`Iterator::try_for_each`]
6128 - [`NonNull::cast`]
6129 - [`Option::filter`]
6130 - [`String::replace_range`]
6131 - [`Take::set_limit`]
6132 - [`hint::unreachable_unchecked`]
6133 - [`os::unix::process::parent_id`]
6134 - [`ptr::swap_nonoverlapping`]
6135 - [`slice::rsplit_mut`]
6136 - [`slice::rsplit`]
6137 - [`slice::swap_with_slice`]
6138
6139 Cargo
6140 -----
6141 - [`cargo-metadata` now includes `authors`, `categories`, `keywords`,
6142 `readme`, and `repository` fields.][cargo/5386]
6143 - [`cargo-metadata` now includes a package's `metadata` table.][cargo/5360]
6144 - [Added the `--target-dir` optional argument.][cargo/5393] This allows you to specify
6145 a different directory than `target` for placing compilation artifacts.
6146 - [Cargo will be adding automatic target inference for binaries, benchmarks,
6147 examples, and tests in the Rust 2018 edition.][cargo/5335] If your project specifies
6148 specific targets, e.g. using `[[bin]]`, and have other binaries in locations
6149 where cargo would infer a binary, Cargo will produce a warning. You can
6150 disable this feature ahead of time by setting any of the following to false:
6151 `autobins`, `autobenches`, `autoexamples`, `autotests`.
6152 - [Cargo will now cache compiler information.][cargo/5359] This can be disabled by
6153 setting `CARGO_CACHE_RUSTC_INFO=0` in your environment.
6154
6155 Misc
6156 ----
6157 - [Added “The Rustc book” into the official documentation.][49707]
6158 [“The Rustc book”] documents and teaches how to use the rustc compiler.
6159 - [All books available on `doc.rust-lang.org` are now searchable.][49623]
6160
6161 Compatibility Notes
6162 -------------------
6163 - [Calling a `CharExt` or `StrExt` method directly on core will no longer
6164 work.][49896] e.g. `::core::prelude::v1::StrExt::is_empty("")` will not
6165 compile, `"".is_empty()` will still compile.
6166 - [`Debug` output on `atomic::{AtomicBool, AtomicIsize, AtomicPtr, AtomicUsize}`
6167 will only print the inner type.][48553] E.g.
6168 `print!("{:?}", AtomicBool::new(true))` will print `true`,
6169 not `AtomicBool(true)`.
6170 - [The maximum number for `repr(align(N))` is now 2²⁹.][50378] Previously you
6171 could enter higher numbers but they were not supported by LLVM. Up to 512MB
6172 alignment should cover all use cases.
6173 - The `.description()` method on the `std::error::Error` trait
6174 [has been soft-deprecated][50163]. It is no longer required to implement it.
6175
6176 [48553]: https://github.com/rust-lang/rust/pull/48553/
6177 [48851]: https://github.com/rust-lang/rust/pull/48851/
6178 [48925]: https://github.com/rust-lang/rust/pull/48925/
6179 [49533]: https://github.com/rust-lang/rust/pull/49533/
6180 [49623]: https://github.com/rust-lang/rust/pull/49623/
6181 [49630]: https://github.com/rust-lang/rust/pull/49630/
6182 [49664]: https://github.com/rust-lang/rust/pull/49664/
6183 [49699]: https://github.com/rust-lang/rust/pull/49699/
6184 [49707]: https://github.com/rust-lang/rust/pull/49707/
6185 [49896]: https://github.com/rust-lang/rust/pull/49896/
6186 [49968]: https://github.com/rust-lang/rust/pull/49968/
6187 [50163]: https://github.com/rust-lang/rust/pull/50163
6188 [50177]: https://github.com/rust-lang/rust/pull/50177/
6189 [50378]: https://github.com/rust-lang/rust/pull/50378/
6190 [50423]: https://github.com/rust-lang/rust/pull/50423/
6191 [cargo/5335]: https://github.com/rust-lang/cargo/pull/5335/
6192 [cargo/5359]: https://github.com/rust-lang/cargo/pull/5359/
6193 [cargo/5360]: https://github.com/rust-lang/cargo/pull/5360/
6194 [cargo/5386]: https://github.com/rust-lang/cargo/pull/5386/
6195 [cargo/5393]: https://github.com/rust-lang/cargo/pull/5393/
6196 [`DoubleEndedIterator::rfind`]: https://doc.rust-lang.org/std/iter/trait.DoubleEndedIterator.html#method.rfind
6197 [`DoubleEndedIterator::rfold`]: https://doc.rust-lang.org/std/iter/trait.DoubleEndedIterator.html#method.rfold
6198 [`DoubleEndedIterator::try_rfold`]: https://doc.rust-lang.org/std/iter/trait.DoubleEndedIterator.html#method.try_rfold
6199 [`Duration::from_micros`]: https://doc.rust-lang.org/std/time/struct.Duration.html#method.from_micros
6200 [`Duration::from_nanos`]: https://doc.rust-lang.org/std/time/struct.Duration.html#method.from_nanos
6201 [`Duration::subsec_micros`]: https://doc.rust-lang.org/std/time/struct.Duration.html#method.subsec_micros
6202 [`Duration::subsec_millis`]: https://doc.rust-lang.org/std/time/struct.Duration.html#method.subsec_millis
6203 [`HashMap::remove_entry`]: https://doc.rust-lang.org/std/collections/struct.HashMap.html#method.remove_entry
6204 [`Iterator::try_fold`]: https://doc.rust-lang.org/std/iter/trait.Iterator.html#method.try_fold
6205 [`Iterator::try_for_each`]: https://doc.rust-lang.org/std/iter/trait.Iterator.html#method.try_for_each
6206 [`NonNull::cast`]: https://doc.rust-lang.org/std/ptr/struct.NonNull.html#method.cast
6207 [`Option::filter`]: https://doc.rust-lang.org/std/option/enum.Option.html#method.filter
6208 [`String::replace_range`]: https://doc.rust-lang.org/std/string/struct.String.html#method.replace_range
6209 [`Take::set_limit`]: https://doc.rust-lang.org/std/io/struct.Take.html#method.set_limit
6210 [`hint::unreachable_unchecked`]: https://doc.rust-lang.org/std/hint/fn.unreachable_unchecked.html
6211 [`os::unix::process::parent_id`]: https://doc.rust-lang.org/std/os/unix/process/fn.parent_id.html
6212 [`process::id`]: https://doc.rust-lang.org/std/process/fn.id.html
6213 [`ptr::swap_nonoverlapping`]: https://doc.rust-lang.org/std/ptr/fn.swap_nonoverlapping.html
6214 [`slice::rsplit_mut`]: https://doc.rust-lang.org/std/primitive.slice.html#method.rsplit_mut
6215 [`slice::rsplit`]: https://doc.rust-lang.org/std/primitive.slice.html#method.rsplit
6216 [`slice::swap_with_slice`]: https://doc.rust-lang.org/std/primitive.slice.html#method.swap_with_slice
6217 [`arch::x86_64`]: https://doc.rust-lang.org/std/arch/x86_64/index.html
6218 [`arch::x86`]: https://doc.rust-lang.org/std/arch/x86/index.html
6219 [“The Rustc book”]: https://doc.rust-lang.org/rustc
6220
6221
6222 Version 1.26.2 (2018-06-05)
6223 ==========================
6224
6225 Compatibility Notes
6226 -------------------
6227
6228 - [The borrow checker was fixed to avoid unsoundness when using match ergonomics.][51117]
6229
6230 [51117]: https://github.com/rust-lang/rust/issues/51117
6231
6232
6233 Version 1.26.1 (2018-05-29)
6234 ==========================
6235
6236 Tools
6237 -----
6238
6239 - [RLS now works on Windows.][50646]
6240 - [Rustfmt stopped badly formatting text in some cases.][rustfmt/2695]
6241
6242
6243 Compatibility Notes
6244 --------
6245
6246 - [`fn main() -> impl Trait` no longer works for non-Termination
6247 trait.][50656]
6248 This reverts an accidental stabilization.
6249 - [`NaN > NaN` no longer returns true in const-fn contexts.][50812]
6250 - [Prohibit using turbofish for `impl Trait` in method arguments.][50950]
6251
6252 [50646]: https://github.com/rust-lang/rust/issues/50646
6253 [50656]: https://github.com/rust-lang/rust/pull/50656
6254 [50812]: https://github.com/rust-lang/rust/pull/50812
6255 [50950]: https://github.com/rust-lang/rust/issues/50950
6256 [rustfmt/2695]: https://github.com/rust-lang-nursery/rustfmt/issues/2695
6257
6258 Version 1.26.0 (2018-05-10)
6259 ==========================
6260
6261 Language
6262 --------
6263 - [Closures now implement `Copy` and/or `Clone` if all captured variables
6264 implement either or both traits.][49299]
6265 - [The inclusive range syntax e.g. `for x in 0..=10` is now stable.][47813]
6266 - [The `'_` lifetime is now stable. The underscore lifetime can be used anywhere a
6267 lifetime can be elided.][49458]
6268 - [`impl Trait` is now stable allowing you to have abstract types in returns
6269 or in function parameters.][49255] E.g. `fn foo() -> impl Iterator<Item=u8>` or
6270 `fn open(path: impl AsRef<Path>)`.
6271 - [Pattern matching will now automatically apply dereferences.][49394]
6272 - [128-bit integers in the form of `u128` and `i128` are now stable.][49101]
6273 - [`main` can now return `Result<(), E: Debug>`][49162] in addition to `()`.
6274 - [A lot of operations are now available in a const context.][46882] E.g. You
6275 can now index into constant arrays, reference and dereference into constants,
6276 and use tuple struct constructors.
6277 - [Fixed entry slice patterns are now stable.][48516] E.g.
6278 ```rust
6279 let points = [1, 2, 3, 4];
6280 match points {
6281 [1, 2, 3, 4] => println!("All points were sequential."),
6282 _ => println!("Not all points were sequential."),
6283 }
6284 ```
6285
6286
6287 Compiler
6288 --------
6289 - [LLD is now used as the default linker for `wasm32-unknown-unknown`.][48125]
6290 - [Fixed exponential projection complexity on nested types.][48296]
6291 This can provide up to a ~12% reduction in compile times for certain crates.
6292 - [Added the `--remap-path-prefix` option to rustc.][48359] Allowing you
6293 to remap path prefixes outputted by the compiler.
6294 - [Added `powerpc-unknown-netbsd` target.][48281]
6295
6296 Libraries
6297 ---------
6298 - [Implemented `From<u16> for usize` & `From<{u8, i16}> for isize`.][49305]
6299 - [Added hexadecimal formatting for integers with fmt::Debug][48978]
6300 e.g. `assert!(format!("{:02x?}", b"Foo\0") == "[46, 6f, 6f, 00]")`
6301 - [Implemented `Default, Hash` for `cmp::Reverse`.][48628]
6302 - [Optimized `str::repeat` being 8x faster in large cases.][48657]
6303 - [`ascii::escape_default` is now available in libcore.][48735]
6304 - [Trailing commas are now supported in std and core macros.][48056]
6305 - [Implemented `Copy, Clone` for `cmp::Reverse`][47379]
6306 - [Implemented `Clone` for `char::{ToLowercase, ToUppercase}`.][48629]
6307
6308 Stabilized APIs
6309 ---------------
6310 - [`*const T::add`]
6311 - [`*const T::copy_to_nonoverlapping`]
6312 - [`*const T::copy_to`]
6313 - [`*const T::read_unaligned`]
6314 - [`*const T::read_volatile`]
6315 - [`*const T::read`]
6316 - [`*const T::sub`]
6317 - [`*const T::wrapping_add`]
6318 - [`*const T::wrapping_sub`]
6319 - [`*mut T::add`]
6320 - [`*mut T::copy_to_nonoverlapping`]
6321 - [`*mut T::copy_to`]
6322 - [`*mut T::read_unaligned`]
6323 - [`*mut T::read_volatile`]
6324 - [`*mut T::read`]
6325 - [`*mut T::replace`]
6326 - [`*mut T::sub`]
6327 - [`*mut T::swap`]
6328 - [`*mut T::wrapping_add`]
6329 - [`*mut T::wrapping_sub`]
6330 - [`*mut T::write_bytes`]
6331 - [`*mut T::write_unaligned`]
6332 - [`*mut T::write_volatile`]
6333 - [`*mut T::write`]
6334 - [`Box::leak`]
6335 - [`FromUtf8Error::as_bytes`]
6336 - [`LocalKey::try_with`]
6337 - [`Option::cloned`]
6338 - [`btree_map::Entry::and_modify`]
6339 - [`fs::read_to_string`]
6340 - [`fs::read`]
6341 - [`fs::write`]
6342 - [`hash_map::Entry::and_modify`]
6343 - [`iter::FusedIterator`]
6344 - [`ops::RangeInclusive`]
6345 - [`ops::RangeToInclusive`]
6346 - [`process::id`]
6347 - [`slice::rotate_left`]
6348 - [`slice::rotate_right`]
6349 - [`String::retain`]
6350
6351
6352 Cargo
6353 -----
6354 - [Cargo will now output path to custom commands when `-v` is
6355 passed with `--list`][cargo/5041]
6356 - [The Cargo binary version is now the same as the Rust version][cargo/5083]
6357
6358 Misc
6359 ----
6360 - [The second edition of "The Rust Programming Language" book is now recommended
6361 over the first.][48404]
6362
6363 Compatibility Notes
6364 -------------------
6365
6366 - [aliasing a `Fn` trait as `dyn` no longer works.][48481] E.g. the following
6367 syntax is now invalid.
6368 ```
6369 use std::ops::Fn as dyn;
6370 fn g(_: Box<dyn(std::fmt::Debug)>) {}
6371 ```
6372 - [The result of dereferences are no longer promoted to `'static`.][47408]
6373 e.g.
6374 ```rust
6375 fn main() {
6376 const PAIR: &(i32, i32) = &(0, 1);
6377 let _reversed_pair: &'static _ = &(PAIR.1, PAIR.0); // Doesn't work
6378 }
6379 ```
6380 - [Deprecate `AsciiExt` trait in favor of inherent methods.][49109]
6381 - [`".e0"` will now no longer parse as `0.0` and will instead cause
6382 an error.][48235]
6383 - [Removed hoedown from rustdoc.][48274]
6384 - [Bounds on higher-kinded lifetimes a hard error.][48326]
6385
6386 [46882]: https://github.com/rust-lang/rust/pull/46882
6387 [47379]: https://github.com/rust-lang/rust/pull/47379
6388 [47408]: https://github.com/rust-lang/rust/pull/47408
6389 [47813]: https://github.com/rust-lang/rust/pull/47813
6390 [48056]: https://github.com/rust-lang/rust/pull/48056
6391 [48125]: https://github.com/rust-lang/rust/pull/48125
6392 [48235]: https://github.com/rust-lang/rust/pull/48235
6393 [48274]: https://github.com/rust-lang/rust/pull/48274
6394 [48281]: https://github.com/rust-lang/rust/pull/48281
6395 [48296]: https://github.com/rust-lang/rust/pull/48296
6396 [48326]: https://github.com/rust-lang/rust/pull/48326
6397 [48359]: https://github.com/rust-lang/rust/pull/48359
6398 [48404]: https://github.com/rust-lang/rust/pull/48404
6399 [48481]: https://github.com/rust-lang/rust/pull/48481
6400 [48516]: https://github.com/rust-lang/rust/pull/48516
6401 [48628]: https://github.com/rust-lang/rust/pull/48628
6402 [48629]: https://github.com/rust-lang/rust/pull/48629
6403 [48657]: https://github.com/rust-lang/rust/pull/48657
6404 [48735]: https://github.com/rust-lang/rust/pull/48735
6405 [48978]: https://github.com/rust-lang/rust/pull/48978
6406 [49101]: https://github.com/rust-lang/rust/pull/49101
6407 [49109]: https://github.com/rust-lang/rust/pull/49109
6408 [49162]: https://github.com/rust-lang/rust/pull/49162
6409 [49255]: https://github.com/rust-lang/rust/pull/49255
6410 [49299]: https://github.com/rust-lang/rust/pull/49299
6411 [49305]: https://github.com/rust-lang/rust/pull/49305
6412 [49394]: https://github.com/rust-lang/rust/pull/49394
6413 [49458]: https://github.com/rust-lang/rust/pull/49458
6414 [`*const T::add`]: https://doc.rust-lang.org/std/primitive.pointer.html#method.add
6415 [`*const T::copy_to_nonoverlapping`]: https://doc.rust-lang.org/std/primitive.pointer.html#method.copy_to_nonoverlapping
6416 [`*const T::copy_to`]: https://doc.rust-lang.org/std/primitive.pointer.html#method.copy_to
6417 [`*const T::read_unaligned`]: https://doc.rust-lang.org/std/primitive.pointer.html#method.read_unaligned
6418 [`*const T::read_volatile`]: https://doc.rust-lang.org/std/primitive.pointer.html#method.read_volatile
6419 [`*const T::read`]: https://doc.rust-lang.org/std/primitive.pointer.html#method.read
6420 [`*const T::sub`]: https://doc.rust-lang.org/std/primitive.pointer.html#method.sub
6421 [`*const T::wrapping_add`]: https://doc.rust-lang.org/std/primitive.pointer.html#method.wrapping_add
6422 [`*const T::wrapping_sub`]: https://doc.rust-lang.org/std/primitive.pointer.html#method.wrapping_sub
6423 [`*mut T::add`]: https://doc.rust-lang.org/std/primitive.pointer.html#method.add-1
6424 [`*mut T::copy_to_nonoverlapping`]: https://doc.rust-lang.org/std/primitive.pointer.html#method.copy_to_nonoverlapping-1
6425 [`*mut T::copy_to`]: https://doc.rust-lang.org/std/primitive.pointer.html#method.copy_to-1
6426 [`*mut T::read_unaligned`]: https://doc.rust-lang.org/std/primitive.pointer.html#method.read_unaligned-1
6427 [`*mut T::read_volatile`]: https://doc.rust-lang.org/std/primitive.pointer.html#method.read_volatile-1
6428 [`*mut T::read`]: https://doc.rust-lang.org/std/primitive.pointer.html#method.read-1
6429 [`*mut T::replace`]: https://doc.rust-lang.org/std/primitive.pointer.html#method.replace
6430 [`*mut T::sub`]: https://doc.rust-lang.org/std/primitive.pointer.html#method.sub-1
6431 [`*mut T::swap`]: https://doc.rust-lang.org/std/primitive.pointer.html#method.swap
6432 [`*mut T::wrapping_add`]: https://doc.rust-lang.org/std/primitive.pointer.html#method.wrapping_add-1
6433 [`*mut T::wrapping_sub`]: https://doc.rust-lang.org/std/primitive.pointer.html#method.wrapping_sub-1
6434 [`*mut T::write_bytes`]: https://doc.rust-lang.org/std/primitive.pointer.html#method.write_bytes
6435 [`*mut T::write_unaligned`]: https://doc.rust-lang.org/std/primitive.pointer.html#method.write_unaligned
6436 [`*mut T::write_volatile`]: https://doc.rust-lang.org/std/primitive.pointer.html#method.write_volatile
6437 [`*mut T::write`]: https://doc.rust-lang.org/std/primitive.pointer.html#method.write
6438 [`Box::leak`]: https://doc.rust-lang.org/std/boxed/struct.Box.html#method.leak
6439 [`FromUtf8Error::as_bytes`]: https://doc.rust-lang.org/std/string/struct.FromUtf8Error.html#method.as_bytes
6440 [`LocalKey::try_with`]: https://doc.rust-lang.org/std/thread/struct.LocalKey.html#method.try_with
6441 [`Option::cloned`]: https://doc.rust-lang.org/std/option/enum.Option.html#method.cloned
6442 [`btree_map::Entry::and_modify`]: https://doc.rust-lang.org/std/collections/btree_map/enum.Entry.html#method.and_modify
6443 [`fs::read_to_string`]: https://doc.rust-lang.org/std/fs/fn.read_to_string.html
6444 [`fs::read`]: https://doc.rust-lang.org/std/fs/fn.read.html
6445 [`fs::write`]: https://doc.rust-lang.org/std/fs/fn.write.html
6446 [`hash_map::Entry::and_modify`]: https://doc.rust-lang.org/std/collections/hash_map/enum.Entry.html#method.and_modify
6447 [`iter::FusedIterator`]: https://doc.rust-lang.org/std/iter/trait.FusedIterator.html
6448 [`ops::RangeInclusive`]: https://doc.rust-lang.org/std/ops/struct.RangeInclusive.html
6449 [`ops::RangeToInclusive`]: https://doc.rust-lang.org/std/ops/struct.RangeToInclusive.html
6450 [`process::id`]: https://doc.rust-lang.org/std/process/fn.id.html
6451 [`slice::rotate_left`]: https://doc.rust-lang.org/std/primitive.slice.html#method.rotate_left
6452 [`slice::rotate_right`]: https://doc.rust-lang.org/std/primitive.slice.html#method.rotate_right
6453 [`String::retain`]: https://doc.rust-lang.org/std/string/struct.String.html#method.retain
6454 [cargo/5041]: https://github.com/rust-lang/cargo/pull/5041
6455 [cargo/5083]: https://github.com/rust-lang/cargo/pull/5083
6456
6457
6458 Version 1.25.0 (2018-03-29)
6459 ==========================
6460
6461 Language
6462 --------
6463 - [The `#[repr(align(x))]` attribute is now stable.][47006] [RFC 1358]
6464 - [You can now use nested groups of imports.][47948]
6465 e.g. `use std::{fs::File, io::Read, path::{Path, PathBuf}};`
6466 - [You can now have `|` at the start of a match arm.][47947] e.g.
6467 ```rust
6468 enum Foo { A, B, C }
6469
6470 fn main() {
6471 let x = Foo::A;
6472 match x {
6473 | Foo::A
6474 | Foo::B => println!("AB"),
6475 | Foo::C => println!("C"),
6476 }
6477 }
6478 ```
6479
6480 Compiler
6481 --------
6482 - [Upgraded to LLVM 6.][47828]
6483 - [Added `-C lto=val` option.][47521]
6484 - [Added `i586-unknown-linux-musl` target][47282]
6485
6486 Libraries
6487 ---------
6488 - [Impl Send for `process::Command` on Unix.][47760]
6489 - [Impl PartialEq and Eq for `ParseCharError`.][47790]
6490 - [`UnsafeCell::into_inner` is now safe.][47204]
6491 - [Implement libstd for CloudABI.][47268]
6492 - [`Float::{from_bits, to_bits}` is now available in libcore.][46931]
6493 - [Implement `AsRef<Path>` for Component][46985]
6494 - [Implemented `Write` for `Cursor<&mut Vec<u8>>`][46830]
6495 - [Moved `Duration` to libcore.][46666]
6496
6497 Stabilized APIs
6498 ---------------
6499 - [`Location::column`]
6500 - [`ptr::NonNull`]
6501
6502 The following functions can now be used in a constant expression.
6503 eg. `static MINUTE: Duration = Duration::from_secs(60);`
6504 - [`Duration::new`][47300]
6505 - [`Duration::from_secs`][47300]
6506 - [`Duration::from_millis`][47300]
6507
6508 Cargo
6509 -----
6510 - [`cargo new` no longer removes `rust` or `rs` prefixes/suffixes.][cargo/5013]
6511 - [`cargo new` now defaults to creating a binary crate, instead of a
6512 library crate.][cargo/5029]
6513
6514 Misc
6515 ----
6516 - [Rust by example is now shipped with new releases][46196]
6517
6518 Compatibility Notes
6519 -------------------
6520 - [Deprecated `net::lookup_host`.][47510]
6521 - [`rustdoc` has switched to pulldown as the default markdown renderer.][47398]
6522 - The borrow checker was sometimes incorrectly permitting overlapping borrows
6523 around indexing operations (see [#47349][47349]). This has been fixed (which also
6524 enabled some correct code that used to cause errors (e.g. [#33903][33903] and [#46095][46095]).
6525 - [Removed deprecated unstable attribute `#[simd]`.][47251]
6526
6527 [33903]: https://github.com/rust-lang/rust/pull/33903
6528 [47947]: https://github.com/rust-lang/rust/pull/47947
6529 [47948]: https://github.com/rust-lang/rust/pull/47948
6530 [47760]: https://github.com/rust-lang/rust/pull/47760
6531 [47790]: https://github.com/rust-lang/rust/pull/47790
6532 [47828]: https://github.com/rust-lang/rust/pull/47828
6533 [47398]: https://github.com/rust-lang/rust/pull/47398
6534 [47510]: https://github.com/rust-lang/rust/pull/47510
6535 [47521]: https://github.com/rust-lang/rust/pull/47521
6536 [47204]: https://github.com/rust-lang/rust/pull/47204
6537 [47251]: https://github.com/rust-lang/rust/pull/47251
6538 [47268]: https://github.com/rust-lang/rust/pull/47268
6539 [47282]: https://github.com/rust-lang/rust/pull/47282
6540 [47300]: https://github.com/rust-lang/rust/pull/47300
6541 [47349]: https://github.com/rust-lang/rust/pull/47349
6542 [46931]: https://github.com/rust-lang/rust/pull/46931
6543 [46985]: https://github.com/rust-lang/rust/pull/46985
6544 [47006]: https://github.com/rust-lang/rust/pull/47006
6545 [46830]: https://github.com/rust-lang/rust/pull/46830
6546 [46095]: https://github.com/rust-lang/rust/pull/46095
6547 [46666]: https://github.com/rust-lang/rust/pull/46666
6548 [46196]: https://github.com/rust-lang/rust/pull/46196
6549 [cargo/5013]: https://github.com/rust-lang/cargo/pull/5013
6550 [cargo/5029]: https://github.com/rust-lang/cargo/pull/5029
6551 [RFC 1358]: https://github.com/rust-lang/rfcs/pull/1358
6552 [`Location::column`]: https://doc.rust-lang.org/std/panic/struct.Location.html#method.column
6553 [`ptr::NonNull`]: https://doc.rust-lang.org/std/ptr/struct.NonNull.html
6554
6555
6556 Version 1.24.1 (2018-03-01)
6557 ==========================
6558
6559 - [Do not abort when unwinding through FFI][48251]
6560 - [Emit UTF-16 files for linker arguments on Windows][48318]
6561 - [Make the error index generator work again][48308]
6562 - [Cargo will warn on Windows 7 if an update is needed][cargo/5069].
6563
6564 [48251]: https://github.com/rust-lang/rust/issues/48251
6565 [48308]: https://github.com/rust-lang/rust/issues/48308
6566 [48318]: https://github.com/rust-lang/rust/issues/48318
6567 [cargo/5069]: https://github.com/rust-lang/cargo/pull/5069
6568
6569
6570 Version 1.24.0 (2018-02-15)
6571 ==========================
6572
6573 Language
6574 --------
6575 - [External `sysv64` ffi is now available.][46528]
6576 eg. `extern "sysv64" fn foo () {}`
6577
6578 Compiler
6579 --------
6580 - [rustc now uses 16 codegen units by default for release builds.][46910]
6581 For the fastest builds, utilize `codegen-units=1`.
6582 - [Added `armv4t-unknown-linux-gnueabi` target.][47018]
6583 - [Add `aarch64-unknown-openbsd` support][46760]
6584
6585 Libraries
6586 ---------
6587 - [`str::find::<char>` now uses memchr.][46735] This should lead to a 10x
6588 improvement in performance in the majority of cases.
6589 - [`OsStr`'s `Debug` implementation is now lossless and consistent
6590 with Windows.][46798]
6591 - [`time::{SystemTime, Instant}` now implement `Hash`.][46828]
6592 - [impl `From<bool>` for `AtomicBool`][46293]
6593 - [impl `From<{CString, &CStr}>` for `{Arc<CStr>, Rc<CStr>}`][45990]
6594 - [impl `From<{OsString, &OsStr}>` for `{Arc<OsStr>, Rc<OsStr>}`][45990]
6595 - [impl `From<{PathBuf, &Path}>` for `{Arc<Path>, Rc<Path>}`][45990]
6596 - [float::from_bits now just uses transmute.][46012] This provides
6597 some optimisations from LLVM.
6598 - [Copied `AsciiExt` methods onto `char`][46077]
6599 - [Remove `T: Sized` requirement on `ptr::is_null()`][46094]
6600 - [impl `From<RecvError>` for `{TryRecvError, RecvTimeoutError}`][45506]
6601 - [Optimised `f32::{min, max}` to generate more efficient x86 assembly][47080]
6602 - [`[u8]::contains` now uses memchr which provides a 3x speed improvement][46713]
6603
6604 Stabilized APIs
6605 ---------------
6606 - [`RefCell::replace`]
6607 - [`RefCell::swap`]
6608 - [`atomic::spin_loop_hint`]
6609
6610 The following functions can now be used in a constant expression.
6611 eg. `let buffer: [u8; size_of::<usize>()];`, `static COUNTER: AtomicUsize = AtomicUsize::new(1);`
6612
6613 - [`AtomicBool::new`][46287]
6614 - [`AtomicUsize::new`][46287]
6615 - [`AtomicIsize::new`][46287]
6616 - [`AtomicPtr::new`][46287]
6617 - [`Cell::new`][46287]
6618 - [`{integer}::min_value`][46287]
6619 - [`{integer}::max_value`][46287]
6620 - [`mem::size_of`][46287]
6621 - [`mem::align_of`][46287]
6622 - [`ptr::null`][46287]
6623 - [`ptr::null_mut`][46287]
6624 - [`RefCell::new`][46287]
6625 - [`UnsafeCell::new`][46287]
6626
6627 Cargo
6628 -----
6629 - [Added a `workspace.default-members` config that
6630 overrides implied `--all` in virtual workspaces.][cargo/4743]
6631 - [Enable incremental by default on development builds.][cargo/4817] Also added
6632 configuration keys to `Cargo.toml` and `.cargo/config` to disable on a
6633 per-project or global basis respectively.
6634
6635 Misc
6636 ----
6637
6638 Compatibility Notes
6639 -------------------
6640 - [Floating point types `Debug` impl now always prints a decimal point.][46831]
6641 - [`Ipv6Addr` now rejects superfluous `::`'s in IPv6 addresses][46671] This is
6642 in accordance with IETF RFC 4291 §2.2.
6643 - [Unwinding will no longer go past FFI boundaries, and will instead abort.][46833]
6644 - [`Formatter::flags` method is now deprecated.][46284] The `sign_plus`,
6645 `sign_minus`, `alternate`, and `sign_aware_zero_pad` should be used instead.
6646 - [Leading zeros in tuple struct members is now an error][47084]
6647 - [`column!()` macro is one-based instead of zero-based][46977]
6648 - [`fmt::Arguments` can no longer be shared across threads][45198]
6649 - [Access to `#[repr(packed)]` struct fields is now unsafe][44884]
6650 - [Cargo sets a different working directory for the compiler][cargo/4788]
6651
6652 [44884]: https://github.com/rust-lang/rust/pull/44884
6653 [45198]: https://github.com/rust-lang/rust/pull/45198
6654 [45506]: https://github.com/rust-lang/rust/pull/45506
6655 [45990]: https://github.com/rust-lang/rust/pull/45990
6656 [46012]: https://github.com/rust-lang/rust/pull/46012
6657 [46077]: https://github.com/rust-lang/rust/pull/46077
6658 [46094]: https://github.com/rust-lang/rust/pull/46094
6659 [46284]: https://github.com/rust-lang/rust/pull/46284
6660 [46287]: https://github.com/rust-lang/rust/pull/46287
6661 [46293]: https://github.com/rust-lang/rust/pull/46293
6662 [46528]: https://github.com/rust-lang/rust/pull/46528
6663 [46671]: https://github.com/rust-lang/rust/pull/46671
6664 [46713]: https://github.com/rust-lang/rust/pull/46713
6665 [46735]: https://github.com/rust-lang/rust/pull/46735
6666 [46760]: https://github.com/rust-lang/rust/pull/46760
6667 [46798]: https://github.com/rust-lang/rust/pull/46798
6668 [46828]: https://github.com/rust-lang/rust/pull/46828
6669 [46831]: https://github.com/rust-lang/rust/pull/46831
6670 [46833]: https://github.com/rust-lang/rust/pull/46833
6671 [46910]: https://github.com/rust-lang/rust/pull/46910
6672 [46977]: https://github.com/rust-lang/rust/pull/46977
6673 [47018]: https://github.com/rust-lang/rust/pull/47018
6674 [47080]: https://github.com/rust-lang/rust/pull/47080
6675 [47084]: https://github.com/rust-lang/rust/pull/47084
6676 [cargo/4743]: https://github.com/rust-lang/cargo/pull/4743
6677 [cargo/4788]: https://github.com/rust-lang/cargo/pull/4788
6678 [cargo/4817]: https://github.com/rust-lang/cargo/pull/4817
6679 [`RefCell::replace`]: https://doc.rust-lang.org/std/cell/struct.RefCell.html#method.replace
6680 [`RefCell::swap`]: https://doc.rust-lang.org/std/cell/struct.RefCell.html#method.swap
6681 [`atomic::spin_loop_hint`]: https://doc.rust-lang.org/std/sync/atomic/fn.spin_loop_hint.html
6682
6683
6684 Version 1.23.0 (2018-01-04)
6685 ==========================
6686
6687 Language
6688 --------
6689 - [Arbitrary `auto` traits are now permitted in trait objects.][45772]
6690 - [rustc now uses subtyping on the left hand side of binary operations.][45435]
6691 Which should fix some confusing errors in some operations.
6692
6693 Compiler
6694 --------
6695 - [Enabled `TrapUnreachable` in LLVM which should mitigate the impact of
6696 undefined behavior.][45920]
6697 - [rustc now suggests renaming import if names clash.][45660]
6698 - [Display errors/warnings correctly when there are zero-width or
6699 wide characters.][45711]
6700 - [rustc now avoids unnecessary copies of arguments that are
6701 simple bindings][45380] This should improve memory usage on average by 5-10%.
6702 - [Updated musl used to build musl rustc to 1.1.17][45393]
6703
6704 Libraries
6705 ---------
6706 - [Allow a trailing comma in `assert_eq/ne` macro][45887]
6707 - [Implement Hash for raw pointers to unsized types][45483]
6708 - [impl `From<*mut T>` for `AtomicPtr<T>`][45610]
6709 - [impl `From<usize/isize>` for `AtomicUsize/AtomicIsize`.][45610]
6710 - [Removed the `T: Sync` requirement for `RwLock<T>: Send`][45267]
6711 - [Removed `T: Sized` requirement for `{<*const T>, <*mut T>}::as_ref`
6712 and `<*mut T>::as_mut`][44932]
6713 - [Optimized `Thread::{park, unpark}` implementation][45524]
6714 - [Improved `SliceExt::binary_search` performance.][45333]
6715 - [impl `FromIterator<()>` for `()`][45379]
6716 - [Copied `AsciiExt` trait methods to primitive types.][44042] Use of `AsciiExt`
6717 is now deprecated.
6718
6719 Stabilized APIs
6720 ---------------
6721
6722 Cargo
6723 -----
6724 - [Cargo now supports uninstallation of multiple packages][cargo/4561]
6725 eg. `cargo uninstall foo bar` uninstalls `foo` and `bar`.
6726 - [Added unit test checking to `cargo check`][cargo/4592]
6727 - [Cargo now lets you install a specific version
6728 using `cargo install --version`][cargo/4637]
6729
6730 Misc
6731 ----
6732 - [Releases now ship with the Cargo book documentation.][45692]
6733 - [rustdoc now prints rendering warnings on every run.][45324]
6734
6735 Compatibility Notes
6736 -------------------
6737 - [Changes have been made to type equality to make it more correct,
6738 in rare cases this could break some code.][45853] [Tracking issue for
6739 further information][45852]
6740 - [`char::escape_debug` now uses Unicode 10 over 9.][45571]
6741 - [Upgraded Android SDK to 27, and NDK to r15c.][45580] This drops support for
6742 Android 9, the minimum supported version is Android 14.
6743 - [Bumped the minimum LLVM to 3.9][45326]
6744
6745 [44042]: https://github.com/rust-lang/rust/pull/44042
6746 [44932]: https://github.com/rust-lang/rust/pull/44932
6747 [45267]: https://github.com/rust-lang/rust/pull/45267
6748 [45324]: https://github.com/rust-lang/rust/pull/45324
6749 [45326]: https://github.com/rust-lang/rust/pull/45326
6750 [45333]: https://github.com/rust-lang/rust/pull/45333
6751 [45379]: https://github.com/rust-lang/rust/pull/45379
6752 [45380]: https://github.com/rust-lang/rust/pull/45380
6753 [45393]: https://github.com/rust-lang/rust/pull/45393
6754 [45435]: https://github.com/rust-lang/rust/pull/45435
6755 [45483]: https://github.com/rust-lang/rust/pull/45483
6756 [45524]: https://github.com/rust-lang/rust/pull/45524
6757 [45571]: https://github.com/rust-lang/rust/pull/45571
6758 [45580]: https://github.com/rust-lang/rust/pull/45580
6759 [45610]: https://github.com/rust-lang/rust/pull/45610
6760 [45660]: https://github.com/rust-lang/rust/pull/45660
6761 [45692]: https://github.com/rust-lang/rust/pull/45692
6762 [45711]: https://github.com/rust-lang/rust/pull/45711
6763 [45772]: https://github.com/rust-lang/rust/pull/45772
6764 [45852]: https://github.com/rust-lang/rust/issues/45852
6765 [45853]: https://github.com/rust-lang/rust/pull/45853
6766 [45887]: https://github.com/rust-lang/rust/pull/45887
6767 [45920]: https://github.com/rust-lang/rust/pull/45920
6768 [cargo/4561]: https://github.com/rust-lang/cargo/pull/4561
6769 [cargo/4592]: https://github.com/rust-lang/cargo/pull/4592
6770 [cargo/4637]: https://github.com/rust-lang/cargo/pull/4637
6771
6772
6773 Version 1.22.1 (2017-11-22)
6774 ==========================
6775
6776 - [Update Cargo to fix an issue with macOS 10.13 "High Sierra"][46183]
6777
6778 [46183]: https://github.com/rust-lang/rust/pull/46183
6779
6780 Version 1.22.0 (2017-11-22)
6781 ==========================
6782
6783 Language
6784 --------
6785 - [`non_snake_case` lint now allows extern no-mangle functions][44966]
6786 - [Now accepts underscores in unicode escapes][43716]
6787 - [`T op= &T` now works for numeric types.][44287] eg. `let mut x = 2; x += &8;`
6788 - [types that impl `Drop` are now allowed in `const` and `static` types][44456]
6789
6790 Compiler
6791 --------
6792 - [rustc now defaults to having 16 codegen units at debug on supported platforms.][45064]
6793 - [rustc will no longer inline in codegen units when compiling for debug][45075]
6794 This should decrease compile times for debug builds.
6795 - [strict memory alignment now enabled on ARMv6][45094]
6796 - [Remove support for the PNaCl target `le32-unknown-nacl`][45041]
6797
6798 Libraries
6799 ---------
6800 - [Allow atomic operations up to 32 bits
6801 on `armv5te_unknown_linux_gnueabi`][44978]
6802 - [`Box<Error>` now impls `From<Cow<str>>`][44466]
6803 - [`std::mem::Discriminant` is now guaranteed to be `Send + Sync`][45095]
6804 - [`fs::copy` now returns the length of the main stream on NTFS.][44895]
6805 - [Properly detect overflow in `Instant += Duration`.][44220]
6806 - [impl `Hasher` for `{&mut Hasher, Box<Hasher>}`][44015]
6807 - [impl `fmt::Debug` for `SplitWhitespace`.][44303]
6808 - [`Option<T>` now impls `Try`][42526] This allows for using `?` with `Option` types.
6809
6810 Stabilized APIs
6811 ---------------
6812
6813 Cargo
6814 -----
6815 - [Cargo will now build multi file examples in subdirectories of the `examples`
6816 folder that have a `main.rs` file.][cargo/4496]
6817 - [Changed `[root]` to `[package]` in `Cargo.lock`][cargo/4571] Packages with
6818 the old format will continue to work and can be updated with `cargo update`.
6819 - [Now supports vendoring git repositories][cargo/3992]
6820
6821 Misc
6822 ----
6823 - [`libbacktrace` is now available on Apple platforms.][44251]
6824 - [Stabilised the `compile_fail` attribute for code fences in doc-comments.][43949]
6825 This now lets you specify that a given code example will fail to compile.
6826
6827 Compatibility Notes
6828 -------------------
6829 - [The minimum Android version that rustc can build for has been bumped
6830 to `4.0` from `2.3`][45656]
6831 - [Allowing `T op= &T` for numeric types has broken some type
6832 inference cases][45480]
6833
6834
6835 [42526]: https://github.com/rust-lang/rust/pull/42526
6836 [43716]: https://github.com/rust-lang/rust/pull/43716
6837 [43949]: https://github.com/rust-lang/rust/pull/43949
6838 [44015]: https://github.com/rust-lang/rust/pull/44015
6839 [44220]: https://github.com/rust-lang/rust/pull/44220
6840 [44251]: https://github.com/rust-lang/rust/pull/44251
6841 [44287]: https://github.com/rust-lang/rust/pull/44287
6842 [44303]: https://github.com/rust-lang/rust/pull/44303
6843 [44456]: https://github.com/rust-lang/rust/pull/44456
6844 [44466]: https://github.com/rust-lang/rust/pull/44466
6845 [44895]: https://github.com/rust-lang/rust/pull/44895
6846 [44966]: https://github.com/rust-lang/rust/pull/44966
6847 [44978]: https://github.com/rust-lang/rust/pull/44978
6848 [45041]: https://github.com/rust-lang/rust/pull/45041
6849 [45064]: https://github.com/rust-lang/rust/pull/45064
6850 [45075]: https://github.com/rust-lang/rust/pull/45075
6851 [45094]: https://github.com/rust-lang/rust/pull/45094
6852 [45095]: https://github.com/rust-lang/rust/pull/45095
6853 [45480]: https://github.com/rust-lang/rust/issues/45480
6854 [45656]: https://github.com/rust-lang/rust/pull/45656
6855 [cargo/3992]: https://github.com/rust-lang/cargo/pull/3992
6856 [cargo/4496]: https://github.com/rust-lang/cargo/pull/4496
6857 [cargo/4571]: https://github.com/rust-lang/cargo/pull/4571
6858
6859
6860
6861
6862
6863
6864 Version 1.21.0 (2017-10-12)
6865 ==========================
6866
6867 Language
6868 --------
6869 - [You can now use static references for literals.][43838]
6870 Example:
6871 ```rust
6872 fn main() {
6873 let x: &'static u32 = &0;
6874 }
6875 ```
6876 - [Relaxed path syntax. Optional `::` before `<` is now allowed in all contexts.][43540]
6877 Example:
6878 ```rust
6879 my_macro!(Vec<i32>::new); // Always worked
6880 my_macro!(Vec::<i32>::new); // Now works
6881 ```
6882
6883 Compiler
6884 --------
6885 - [Upgraded jemalloc to 4.5.0][43911]
6886 - [Enabled unwinding panics on Redox][43917]
6887 - [Now runs LLVM in parallel during translation phase.][43506]
6888 This should reduce peak memory usage.
6889
6890 Libraries
6891 ---------
6892 - [Generate builtin impls for `Clone` for all arrays and tuples that
6893 are `T: Clone`][43690]
6894 - [`Stdin`, `Stdout`, and `Stderr` now implement `AsRawFd`.][43459]
6895 - [`Rc` and `Arc` now implement `From<&[T]> where T: Clone`, `From<str>`,
6896 `From<String>`, `From<Box<T>> where T: ?Sized`, and `From<Vec<T>>`.][42565]
6897
6898 Stabilized APIs
6899 ---------------
6900
6901 [`std::mem::discriminant`]
6902
6903 Cargo
6904 -----
6905 - [You can now call `cargo install` with multiple package names][cargo/4216]
6906 - [Cargo commands inside a virtual workspace will now implicitly
6907 pass `--all`][cargo/4335]
6908 - [Added a `[patch]` section to `Cargo.toml` to handle
6909 prepublication dependencies][cargo/4123] [RFC 1969]
6910 - [`include` & `exclude` fields in `Cargo.toml` now accept gitignore
6911 like patterns][cargo/4270]
6912 - [Added the `--all-targets` option][cargo/4400]
6913 - [Using required dependencies as a feature is now deprecated and emits
6914 a warning][cargo/4364]
6915
6916
6917 Misc
6918 ----
6919 - [Cargo docs are moving][43916]
6920 to [doc.rust-lang.org/cargo](https://doc.rust-lang.org/cargo)
6921 - [The rustdoc book is now available][43863]
6922 at [doc.rust-lang.org/rustdoc](https://doc.rust-lang.org/rustdoc)
6923 - [Added a preview of RLS has been made available through rustup][44204]
6924 Install with `rustup component add rls-preview`
6925 - [`std::os` documentation for Unix, Linux, and Windows now appears on doc.rust-lang.org][43348]
6926 Previously only showed `std::os::unix`.
6927
6928 Compatibility Notes
6929 -------------------
6930 - [Changes in method matching against higher-ranked types][43880] This may cause
6931 breakage in subtyping corner cases. [A more in-depth explanation is available.][info/43880]
6932 - [rustc's JSON error output's byte position start at top of file.][42973]
6933 Was previously relative to the rustc's internal `CodeMap` struct which
6934 required the unstable library `libsyntax` to correctly use.
6935 - [`unused_results` lint no longer ignores booleans][43728]
6936
6937 [42565]: https://github.com/rust-lang/rust/pull/42565
6938 [42973]: https://github.com/rust-lang/rust/pull/42973
6939 [43348]: https://github.com/rust-lang/rust/pull/43348
6940 [43459]: https://github.com/rust-lang/rust/pull/43459
6941 [43506]: https://github.com/rust-lang/rust/pull/43506
6942 [43540]: https://github.com/rust-lang/rust/pull/43540
6943 [43690]: https://github.com/rust-lang/rust/pull/43690
6944 [43728]: https://github.com/rust-lang/rust/pull/43728
6945 [43838]: https://github.com/rust-lang/rust/pull/43838
6946 [43863]: https://github.com/rust-lang/rust/pull/43863
6947 [43880]: https://github.com/rust-lang/rust/pull/43880
6948 [43911]: https://github.com/rust-lang/rust/pull/43911
6949 [43916]: https://github.com/rust-lang/rust/pull/43916
6950 [43917]: https://github.com/rust-lang/rust/pull/43917
6951 [44204]: https://github.com/rust-lang/rust/pull/44204
6952 [cargo/4123]: https://github.com/rust-lang/cargo/pull/4123
6953 [cargo/4216]: https://github.com/rust-lang/cargo/pull/4216
6954 [cargo/4270]: https://github.com/rust-lang/cargo/pull/4270
6955 [cargo/4335]: https://github.com/rust-lang/cargo/pull/4335
6956 [cargo/4364]: https://github.com/rust-lang/cargo/pull/4364
6957 [cargo/4400]: https://github.com/rust-lang/cargo/pull/4400
6958 [RFC 1969]: https://github.com/rust-lang/rfcs/pull/1969
6959 [info/43880]: https://github.com/rust-lang/rust/issues/44224#issuecomment-330058902
6960 [`std::mem::discriminant`]: https://doc.rust-lang.org/std/mem/fn.discriminant.html
6961
6962 Version 1.20.0 (2017-08-31)
6963 ===========================
6964
6965 Language
6966 --------
6967 - [Associated constants are now stabilised.][42809]
6968 - [A lot of macro bugs are now fixed.][42913]
6969
6970 Compiler
6971 --------
6972
6973 - [Struct fields are now properly coerced to the expected field type.][42807]
6974 - [Enabled wasm LLVM backend][42571] WASM can now be built with the
6975 `wasm32-experimental-emscripten` target.
6976 - [Changed some of the error messages to be more helpful.][42033]
6977 - [Add support for RELRO(RELocation Read-Only) for platforms that support
6978 it.][43170]
6979 - [rustc now reports the total number of errors on compilation failure][43015]
6980 previously this was only the number of errors in the pass that failed.
6981 - [Expansion in rustc has been sped up 29x.][42533]
6982 - [added `msp430-none-elf` target.][43099]
6983 - [rustc will now suggest one-argument enum variant to fix type mismatch when
6984 applicable][43178]
6985 - [Fixes backtraces on Redox][43228]
6986 - [rustc now identifies different versions of same crate when absolute paths of
6987 different types match in an error message.][42826]
6988
6989 Libraries
6990 ---------
6991
6992
6993 - [Relaxed Debug constraints on `{HashMap,BTreeMap}::{Keys,Values}`.][42854]
6994 - [Impl `PartialEq`, `Eq`, `PartialOrd`, `Ord`, `Debug`, `Hash` for unsized
6995 tuples.][43011]
6996 - [Impl `fmt::{Display, Debug}` for `Ref`, `RefMut`, `MutexGuard`,
6997 `RwLockReadGuard`, `RwLockWriteGuard`][42822]
6998 - [Impl `Clone` for `DefaultHasher`.][42799]
6999 - [Impl `Sync` for `SyncSender`.][42397]
7000 - [Impl `FromStr` for `char`][42271]
7001 - [Fixed how `{f32, f64}::{is_sign_negative, is_sign_positive}` handles
7002 NaN.][42431]
7003 - [allow messages in the `unimplemented!()` macro.][42155]
7004 ie. `unimplemented!("Waiting for 1.21 to be stable")`
7005 - [`pub(restricted)` is now supported in the `thread_local!` macro.][43185]
7006 - [Upgrade to Unicode 10.0.0][42999]
7007 - [Reimplemented `{f32, f64}::{min, max}` in Rust instead of using CMath.][42430]
7008 - [Skip the main thread's manual stack guard on Linux][43072]
7009 - [Iterator::nth for `ops::{Range, RangeFrom}` is now done in *O*(1) time][43077]
7010 - [`#[repr(align(N))]` attribute max number is now 2^31 - 1.][43097] This was
7011 previously 2^15.
7012 - [`{OsStr, Path}::Display` now avoids allocations where possible][42613]
7013
7014 Stabilized APIs
7015 ---------------
7016
7017 - [`CStr::into_c_string`]
7018 - [`CString::as_c_str`]
7019 - [`CString::into_boxed_c_str`]
7020 - [`Chain::get_mut`]
7021 - [`Chain::get_ref`]
7022 - [`Chain::into_inner`]
7023 - [`Option::get_or_insert_with`]
7024 - [`Option::get_or_insert`]
7025 - [`OsStr::into_os_string`]
7026 - [`OsString::into_boxed_os_str`]
7027 - [`Take::get_mut`]
7028 - [`Take::get_ref`]
7029 - [`Utf8Error::error_len`]
7030 - [`char::EscapeDebug`]
7031 - [`char::escape_debug`]
7032 - [`compile_error!`]
7033 - [`f32::from_bits`]
7034 - [`f32::to_bits`]
7035 - [`f64::from_bits`]
7036 - [`f64::to_bits`]
7037 - [`mem::ManuallyDrop`]
7038 - [`slice::sort_unstable_by_key`]
7039 - [`slice::sort_unstable_by`]
7040 - [`slice::sort_unstable`]
7041 - [`str::from_boxed_utf8_unchecked`]
7042 - [`str::as_bytes_mut`]
7043 - [`str::as_bytes_mut`]
7044 - [`str::from_utf8_mut`]
7045 - [`str::from_utf8_unchecked_mut`]
7046 - [`str::get_mut`]
7047 - [`str::get_unchecked_mut`]
7048 - [`str::get_unchecked`]
7049 - [`str::get`]
7050 - [`str::into_boxed_bytes`]
7051
7052
7053 Cargo
7054 -----
7055 - [Cargo API token location moved from `~/.cargo/config` to
7056 `~/.cargo/credentials`.][cargo/3978]
7057 - [Cargo will now build `main.rs` binaries that are in sub-directories of
7058 `src/bin`.][cargo/4214] ie. Having `src/bin/server/main.rs` and
7059 `src/bin/client/main.rs` generates `target/debug/server` and `target/debug/client`
7060 - [You can now specify version of a binary when installed through
7061 `cargo install` using `--vers`.][cargo/4229]
7062 - [Added `--no-fail-fast` flag to cargo to run all benchmarks regardless of
7063 failure.][cargo/4248]
7064 - [Changed the convention around which file is the crate root.][cargo/4259]
7065
7066 Compatibility Notes
7067 -------------------
7068
7069 - [Functions with `'static` in their return types will now not be as usable as
7070 if they were using lifetime parameters instead.][42417]
7071 - [The reimplementation of `{f32, f64}::is_sign_{negative, positive}` now
7072 takes the sign of NaN into account where previously didn't.][42430]
7073
7074 [42033]: https://github.com/rust-lang/rust/pull/42033
7075 [42155]: https://github.com/rust-lang/rust/pull/42155
7076 [42271]: https://github.com/rust-lang/rust/pull/42271
7077 [42397]: https://github.com/rust-lang/rust/pull/42397
7078 [42417]: https://github.com/rust-lang/rust/pull/42417
7079 [42430]: https://github.com/rust-lang/rust/pull/42430
7080 [42431]: https://github.com/rust-lang/rust/pull/42431
7081 [42533]: https://github.com/rust-lang/rust/pull/42533
7082 [42571]: https://github.com/rust-lang/rust/pull/42571
7083 [42613]: https://github.com/rust-lang/rust/pull/42613
7084 [42799]: https://github.com/rust-lang/rust/pull/42799
7085 [42807]: https://github.com/rust-lang/rust/pull/42807
7086 [42809]: https://github.com/rust-lang/rust/pull/42809
7087 [42822]: https://github.com/rust-lang/rust/pull/42822
7088 [42826]: https://github.com/rust-lang/rust/pull/42826
7089 [42854]: https://github.com/rust-lang/rust/pull/42854
7090 [42913]: https://github.com/rust-lang/rust/pull/42913
7091 [42999]: https://github.com/rust-lang/rust/pull/42999
7092 [43011]: https://github.com/rust-lang/rust/pull/43011
7093 [43015]: https://github.com/rust-lang/rust/pull/43015
7094 [43072]: https://github.com/rust-lang/rust/pull/43072
7095 [43077]: https://github.com/rust-lang/rust/pull/43077
7096 [43097]: https://github.com/rust-lang/rust/pull/43097
7097 [43099]: https://github.com/rust-lang/rust/pull/43099
7098 [43170]: https://github.com/rust-lang/rust/pull/43170
7099 [43178]: https://github.com/rust-lang/rust/pull/43178
7100 [43185]: https://github.com/rust-lang/rust/pull/43185
7101 [43228]: https://github.com/rust-lang/rust/pull/43228
7102 [cargo/3978]: https://github.com/rust-lang/cargo/pull/3978
7103 [cargo/4214]: https://github.com/rust-lang/cargo/pull/4214
7104 [cargo/4229]: https://github.com/rust-lang/cargo/pull/4229
7105 [cargo/4248]: https://github.com/rust-lang/cargo/pull/4248
7106 [cargo/4259]: https://github.com/rust-lang/cargo/pull/4259
7107 [`CStr::into_c_string`]: https://doc.rust-lang.org/std/ffi/struct.CStr.html#method.into_c_string
7108 [`CString::as_c_str`]: https://doc.rust-lang.org/std/ffi/struct.CString.html#method.as_c_str
7109 [`CString::into_boxed_c_str`]: https://doc.rust-lang.org/std/ffi/struct.CString.html#method.into_boxed_c_str
7110 [`Chain::get_mut`]: https://doc.rust-lang.org/std/io/struct.Chain.html#method.get_mut
7111 [`Chain::get_ref`]: https://doc.rust-lang.org/std/io/struct.Chain.html#method.get_ref
7112 [`Chain::into_inner`]: https://doc.rust-lang.org/std/io/struct.Chain.html#method.into_inner
7113 [`Option::get_or_insert_with`]: https://doc.rust-lang.org/std/option/enum.Option.html#method.get_or_insert_with
7114 [`Option::get_or_insert`]: https://doc.rust-lang.org/std/option/enum.Option.html#method.get_or_insert
7115 [`OsStr::into_os_string`]: https://doc.rust-lang.org/std/ffi/struct.OsStr.html#method.into_os_string
7116 [`OsString::into_boxed_os_str`]: https://doc.rust-lang.org/std/ffi/struct.OsString.html#method.into_boxed_os_str
7117 [`Take::get_mut`]: https://doc.rust-lang.org/std/io/struct.Take.html#method.get_mut
7118 [`Take::get_ref`]: https://doc.rust-lang.org/std/io/struct.Take.html#method.get_ref
7119 [`Utf8Error::error_len`]: https://doc.rust-lang.org/std/str/struct.Utf8Error.html#method.error_len
7120 [`char::EscapeDebug`]: https://doc.rust-lang.org/std/char/struct.EscapeDebug.html
7121 [`char::escape_debug`]: https://doc.rust-lang.org/std/primitive.char.html#method.escape_debug
7122 [`compile_error!`]: https://doc.rust-lang.org/std/macro.compile_error.html
7123 [`f32::from_bits`]: https://doc.rust-lang.org/std/primitive.f32.html#method.from_bits
7124 [`f32::to_bits`]: https://doc.rust-lang.org/std/primitive.f32.html#method.to_bits
7125 [`f64::from_bits`]: https://doc.rust-lang.org/std/primitive.f64.html#method.from_bits
7126 [`f64::to_bits`]: https://doc.rust-lang.org/std/primitive.f64.html#method.to_bits
7127 [`mem::ManuallyDrop`]: https://doc.rust-lang.org/std/mem/union.ManuallyDrop.html
7128 [`slice::sort_unstable_by_key`]: https://doc.rust-lang.org/std/primitive.slice.html#method.sort_unstable_by_key
7129 [`slice::sort_unstable_by`]: https://doc.rust-lang.org/std/primitive.slice.html#method.sort_unstable_by
7130 [`slice::sort_unstable`]: https://doc.rust-lang.org/std/primitive.slice.html#method.sort_unstable
7131 [`str::from_boxed_utf8_unchecked`]: https://doc.rust-lang.org/std/str/fn.from_boxed_utf8_unchecked.html
7132 [`str::as_bytes_mut`]: https://doc.rust-lang.org/std/primitive.str.html#method.as_bytes_mut
7133 [`str::from_utf8_mut`]: https://doc.rust-lang.org/std/str/fn.from_utf8_mut.html
7134 [`str::from_utf8_unchecked_mut`]: https://doc.rust-lang.org/std/str/fn.from_utf8_unchecked_mut.html
7135 [`str::get_mut`]: https://doc.rust-lang.org/std/primitive.str.html#method.get_mut
7136 [`str::get_unchecked_mut`]: https://doc.rust-lang.org/std/primitive.str.html#method.get_unchecked_mut
7137 [`str::get_unchecked`]: https://doc.rust-lang.org/std/primitive.str.html#method.get_unchecked
7138 [`str::get`]: https://doc.rust-lang.org/std/primitive.str.html#method.get
7139 [`str::into_boxed_bytes`]: https://doc.rust-lang.org/std/primitive.str.html#method.into_boxed_bytes
7140
7141
7142 Version 1.19.0 (2017-07-20)
7143 ===========================
7144
7145 Language
7146 --------
7147
7148 - [Numeric fields can now be used for creating tuple structs.][41145] [RFC 1506]
7149 For example `struct Point(u32, u32); let x = Point { 0: 7, 1: 0 };`.
7150 - [Macro recursion limit increased to 1024 from 64.][41676]
7151 - [Added lint for detecting unused macros.][41907]
7152 - [`loop` can now return a value with `break`.][42016] [RFC 1624]
7153 For example: `let x = loop { break 7; };`
7154 - [C compatible `union`s are now available.][42068] [RFC 1444] They can only
7155 contain `Copy` types and cannot have a `Drop` implementation.
7156 Example: `union Foo { bar: u8, baz: usize }`
7157 - [Non capturing closures can now be coerced into `fn`s,][42162] [RFC 1558]
7158 Example: `let foo: fn(u8) -> u8 = |v: u8| { v };`
7159
7160 Compiler
7161 --------
7162
7163 - [Add support for bootstrapping the Rust compiler toolchain on Android.][41370]
7164 - [Change `arm-linux-androideabi` to correspond to the `armeabi`
7165 official ABI.][41656] If you wish to continue targeting the `armeabi-v7a` ABI
7166 you should use `--target armv7-linux-androideabi`.
7167 - [Fixed ICE when removing a source file between compilation sessions.][41873]
7168 - [Minor optimisation of string operations.][42037]
7169 - [Compiler error message is now `aborting due to previous error(s)` instead of
7170 `aborting due to N previous errors`][42150] This was previously inaccurate and
7171 would only count certain kinds of errors.
7172 - [The compiler now supports Visual Studio 2017][42225]
7173 - [The compiler is now built against LLVM 4.0.1 by default][42948]
7174 - [Added a lot][42264] of [new error codes][42302]
7175 - [Added `target-feature=+crt-static` option][37406] [RFC 1721] Which allows
7176 libraries with C Run-time Libraries(CRT) to be statically linked.
7177 - [Fixed various ARM codegen bugs][42740]
7178
7179 Libraries
7180 ---------
7181
7182 - [`String` now implements `FromIterator<Cow<'a, str>>` and
7183 `Extend<Cow<'a, str>>`][41449]
7184 - [`Vec` now implements `From<&mut [T]>`][41530]
7185 - [`Box<[u8]>` now implements `From<Box<str>>`][41258]
7186 - [`SplitWhitespace` now implements `Clone`][41659]
7187 - [`[u8]::reverse` is now 5x faster and `[u16]::reverse` is now
7188 1.5x faster][41764]
7189 - [`eprint!` and `eprintln!` macros added to prelude.][41192] Same as the `print!`
7190 macros, but for printing to stderr.
7191
7192 Stabilized APIs
7193 ---------------
7194
7195 - [`OsString::shrink_to_fit`]
7196 - [`cmp::Reverse`]
7197 - [`Command::envs`]
7198 - [`thread::ThreadId`]
7199
7200 Cargo
7201 -----
7202
7203 - [Build scripts can now add environment variables to the environment
7204 the crate is being compiled in.
7205 Example: `println!("cargo:rustc-env=FOO=bar");`][cargo/3929]
7206 - [Subcommands now replace the current process rather than spawning a new
7207 child process][cargo/3970]
7208 - [Workspace members can now accept glob file patterns][cargo/3979]
7209 - [Added `--all` flag to the `cargo bench` subcommand to run benchmarks of all
7210 the members in a given workspace.][cargo/3988]
7211 - [Updated `libssh2-sys` to 0.2.6][cargo/4008]
7212 - [Target directory path is now in the cargo metadata][cargo/4022]
7213 - [Cargo no longer checks out a local working directory for the
7214 crates.io index][cargo/4026] This should provide smaller file size for the
7215 registry, and improve cloning times, especially on Windows machines.
7216 - [Added an `--exclude` option for excluding certain packages when using the
7217 `--all` option][cargo/4031]
7218 - [Cargo will now automatically retry when receiving a 5xx error
7219 from crates.io][cargo/4032]
7220 - [The `--features` option now accepts multiple comma or space
7221 delimited values.][cargo/4084]
7222 - [Added support for custom target specific runners][cargo/3954]
7223
7224 Misc
7225 ----
7226
7227 - [Added `rust-windbg.cmd`][39983] for loading rust `.natvis` files in the
7228 Windows Debugger.
7229 - [Rust will now release XZ compressed packages][rust-installer/57]
7230 - [rustup will now prefer to download rust packages with
7231 XZ compression][rustup/1100] over GZip packages.
7232 - [Added the ability to escape `#` in rust documentation][41785] By adding
7233 additional `#`'s ie. `##` is now `#`
7234
7235 Compatibility Notes
7236 -------------------
7237
7238 - [`MutexGuard<T>` may only be `Sync` if `T` is `Sync`.][41624]
7239 - [`-Z` flags are now no longer allowed to be used on the stable
7240 compiler.][41751] This has been a warning for a year previous to this.
7241 - [As a result of the `-Z` flag change, the `cargo-check` plugin no
7242 longer works][42844]. Users should migrate to the built-in `check`
7243 command, which has been available since 1.16.
7244 - [Ending a float literal with `._` is now a hard error.
7245 Example: `42._` .][41946]
7246 - [Any use of a private `extern crate` outside of its module is now a
7247 hard error.][36886] This was previously a warning.
7248 - [`use ::self::foo;` is now a hard error.][36888] `self` paths are always
7249 relative while the `::` prefix makes a path absolute, but was ignored and the
7250 path was relative regardless.
7251 - [Floating point constants in match patterns is now a hard error][36890]
7252 This was previously a warning.
7253 - [Struct or enum constants that don't derive `PartialEq` & `Eq` used
7254 match patterns is now a hard error][36891] This was previously a warning.
7255 - [Lifetimes named `'_` are no longer allowed.][36892] This was previously
7256 a warning.
7257 - [From the pound escape, lines consisting of multiple `#`s are
7258 now visible][41785]
7259 - [It is an error to re-export private enum variants][42460]. This is
7260 known to break a number of crates that depend on an older version of
7261 mustache.
7262 - [On Windows, if `VCINSTALLDIR` is set incorrectly, `rustc` will try
7263 to use it to find the linker, and the build will fail where it did
7264 not previously][42607]
7265
7266 [36886]: https://github.com/rust-lang/rust/issues/36886
7267 [36888]: https://github.com/rust-lang/rust/issues/36888
7268 [36890]: https://github.com/rust-lang/rust/issues/36890
7269 [36891]: https://github.com/rust-lang/rust/issues/36891
7270 [36892]: https://github.com/rust-lang/rust/issues/36892
7271 [37406]: https://github.com/rust-lang/rust/issues/37406
7272 [39983]: https://github.com/rust-lang/rust/pull/39983
7273 [41145]: https://github.com/rust-lang/rust/pull/41145
7274 [41192]: https://github.com/rust-lang/rust/pull/41192
7275 [41258]: https://github.com/rust-lang/rust/pull/41258
7276 [41370]: https://github.com/rust-lang/rust/pull/41370
7277 [41449]: https://github.com/rust-lang/rust/pull/41449
7278 [41530]: https://github.com/rust-lang/rust/pull/41530
7279 [41624]: https://github.com/rust-lang/rust/pull/41624
7280 [41656]: https://github.com/rust-lang/rust/pull/41656
7281 [41659]: https://github.com/rust-lang/rust/pull/41659
7282 [41676]: https://github.com/rust-lang/rust/pull/41676
7283 [41751]: https://github.com/rust-lang/rust/pull/41751
7284 [41764]: https://github.com/rust-lang/rust/pull/41764
7285 [41785]: https://github.com/rust-lang/rust/pull/41785
7286 [41873]: https://github.com/rust-lang/rust/pull/41873
7287 [41907]: https://github.com/rust-lang/rust/pull/41907
7288 [41946]: https://github.com/rust-lang/rust/pull/41946
7289 [42016]: https://github.com/rust-lang/rust/pull/42016
7290 [42037]: https://github.com/rust-lang/rust/pull/42037
7291 [42068]: https://github.com/rust-lang/rust/pull/42068
7292 [42150]: https://github.com/rust-lang/rust/pull/42150
7293 [42162]: https://github.com/rust-lang/rust/pull/42162
7294 [42225]: https://github.com/rust-lang/rust/pull/42225
7295 [42264]: https://github.com/rust-lang/rust/pull/42264
7296 [42302]: https://github.com/rust-lang/rust/pull/42302
7297 [42460]: https://github.com/rust-lang/rust/issues/42460
7298 [42607]: https://github.com/rust-lang/rust/issues/42607
7299 [42740]: https://github.com/rust-lang/rust/pull/42740
7300 [42844]: https://github.com/rust-lang/rust/issues/42844
7301 [42948]: https://github.com/rust-lang/rust/pull/42948
7302 [RFC 1444]: https://github.com/rust-lang/rfcs/pull/1444
7303 [RFC 1506]: https://github.com/rust-lang/rfcs/pull/1506
7304 [RFC 1558]: https://github.com/rust-lang/rfcs/pull/1558
7305 [RFC 1624]: https://github.com/rust-lang/rfcs/pull/1624
7306 [RFC 1721]: https://github.com/rust-lang/rfcs/pull/1721
7307 [`Command::envs`]: https://doc.rust-lang.org/std/process/struct.Command.html#method.envs
7308 [`OsString::shrink_to_fit`]: https://doc.rust-lang.org/std/ffi/struct.OsString.html#method.shrink_to_fit
7309 [`cmp::Reverse`]: https://doc.rust-lang.org/std/cmp/struct.Reverse.html
7310 [`thread::ThreadId`]: https://doc.rust-lang.org/std/thread/struct.ThreadId.html
7311 [cargo/3929]: https://github.com/rust-lang/cargo/pull/3929
7312 [cargo/3954]: https://github.com/rust-lang/cargo/pull/3954
7313 [cargo/3970]: https://github.com/rust-lang/cargo/pull/3970
7314 [cargo/3979]: https://github.com/rust-lang/cargo/pull/3979
7315 [cargo/3988]: https://github.com/rust-lang/cargo/pull/3988
7316 [cargo/4008]: https://github.com/rust-lang/cargo/pull/4008
7317 [cargo/4022]: https://github.com/rust-lang/cargo/pull/4022
7318 [cargo/4026]: https://github.com/rust-lang/cargo/pull/4026
7319 [cargo/4031]: https://github.com/rust-lang/cargo/pull/4031
7320 [cargo/4032]: https://github.com/rust-lang/cargo/pull/4032
7321 [cargo/4084]: https://github.com/rust-lang/cargo/pull/4084
7322 [rust-installer/57]: https://github.com/rust-lang/rust-installer/pull/57
7323 [rustup/1100]: https://github.com/rust-lang-nursery/rustup.rs/pull/1100
7324
7325
7326 Version 1.18.0 (2017-06-08)
7327 ===========================
7328
7329 Language
7330 --------
7331
7332 - [Stabilize pub(restricted)][40556] `pub` can now accept a module path to
7333 make the item visible to just that module tree. Also accepts the keyword
7334 `crate` to make something public to the whole crate but not users of the
7335 library. Example: `pub(crate) mod utils;`. [RFC 1422].
7336 - [Stabilize `#![windows_subsystem]` attribute][40870] conservative exposure of the
7337 `/SUBSYSTEM` linker flag on Windows platforms. [RFC 1665].
7338 - [Refactor of trait object type parsing][40043] Now `ty` in macros can accept
7339 types like `Write + Send`, trailing `+` are now supported in trait objects,
7340 and better error reporting for trait objects starting with `?Sized`.
7341 - [0e+10 is now a valid floating point literal][40589]
7342 - [Now warns if you bind a lifetime parameter to 'static][40734]
7343 - [Tuples, Enum variant fields, and structs with no `repr` attribute or with
7344 `#[repr(Rust)]` are reordered to minimize padding and produce a smaller
7345 representation in some cases.][40377]
7346
7347 Compiler
7348 --------
7349
7350 - [rustc can now emit mir with `--emit mir`][39891]
7351 - [Improved LLVM IR for trivial functions][40367]
7352 - [Added explanation for E0090(Wrong number of lifetimes are supplied)][40723]
7353 - [rustc compilation is now 15%-20% faster][41469] Thanks to optimisation
7354 opportunities found through profiling
7355 - [Improved backtrace formatting when panicking][38165]
7356
7357 Libraries
7358 ---------
7359
7360 - [Specialized `Vec::from_iter` being passed `vec::IntoIter`][40731] if the
7361 iterator hasn't been advanced the original `Vec` is reassembled with no actual
7362 iteration or reallocation.
7363 - [Simplified HashMap Bucket interface][40561] provides performance
7364 improvements for iterating and cloning.
7365 - [Specialize Vec::from_elem to use calloc][40409]
7366 - [Fixed Race condition in fs::create_dir_all][39799]
7367 - [No longer caching stdio on Windows][40516]
7368 - [Optimized insertion sort in slice][40807] insertion sort in some cases
7369 2.50%~ faster and in one case now 12.50% faster.
7370 - [Optimized `AtomicBool::fetch_nand`][41143]
7371
7372 Stabilized APIs
7373 ---------------
7374
7375 - [`Child::try_wait`]
7376 - [`HashMap::retain`]
7377 - [`HashSet::retain`]
7378 - [`PeekMut::pop`]
7379 - [`TcpStream::peek`]
7380 - [`UdpSocket::peek`]
7381 - [`UdpSocket::peek_from`]
7382
7383 Cargo
7384 -----
7385
7386 - [Added partial Pijul support][cargo/3842] Pijul is a version control system in Rust.
7387 You can now create new cargo projects with Pijul using `cargo new --vcs pijul`
7388 - [Now always emits build script warnings for crates that fail to build][cargo/3847]
7389 - [Added Android build support][cargo/3885]
7390 - [Added `--bins` and `--tests` flags][cargo/3901] now you can build all programs
7391 of a certain type, for example `cargo build --bins` will build all
7392 binaries.
7393 - [Added support for haiku][cargo/3952]
7394
7395 Misc
7396 ----
7397
7398 - [rustdoc can now use pulldown-cmark with the `--enable-commonmark` flag][40338]
7399 - [Rust now uses the official cross compiler for NetBSD][40612]
7400 - [rustdoc now accepts `#` at the start of files][40828]
7401 - [Fixed jemalloc support for musl][41168]
7402
7403 Compatibility Notes
7404 -------------------
7405
7406 - [Changes to how the `0` flag works in format!][40241] Padding zeroes are now
7407 always placed after the sign if it exists and before the digits. With the `#`
7408 flag the zeroes are placed after the prefix and before the digits.
7409 - [Due to the struct field optimisation][40377], using `transmute` on structs
7410 that have no `repr` attribute or `#[repr(Rust)]` will no longer work. This has
7411 always been undefined behavior, but is now more likely to break in practice.
7412 - [The refactor of trait object type parsing][40043] fixed a bug where `+` was
7413 receiving the wrong priority parsing things like `&for<'a> Tr<'a> + Send` as
7414 `&(for<'a> Tr<'a> + Send)` instead of `(&for<'a> Tr<'a>) + Send`
7415 - [Overlapping inherent `impl`s are now a hard error][40728]
7416 - [`PartialOrd` and `Ord` must agree on the ordering.][41270]
7417 - [`rustc main.rs -o out --emit=asm,llvm-ir`][41085] Now will output
7418 `out.asm` and `out.ll` instead of only one of the filetypes.
7419 - [ calling a function that returns `Self` will no longer work][41805] when
7420 the size of `Self` cannot be statically determined.
7421 - [rustc now builds with a "pthreads" flavour of MinGW for Windows GNU][40805]
7422 this has caused a few regressions namely:
7423
7424 - Changed the link order of local static/dynamic libraries (respecting the
7425 order on given rather than having the compiler reorder).
7426 - Changed how MinGW is linked, native code linked to dynamic libraries
7427 may require manually linking to the gcc support library (for the native
7428 code itself)
7429
7430 [38165]: https://github.com/rust-lang/rust/pull/38165
7431 [39799]: https://github.com/rust-lang/rust/pull/39799
7432 [39891]: https://github.com/rust-lang/rust/pull/39891
7433 [40043]: https://github.com/rust-lang/rust/pull/40043
7434 [40241]: https://github.com/rust-lang/rust/pull/40241
7435 [40338]: https://github.com/rust-lang/rust/pull/40338
7436 [40367]: https://github.com/rust-lang/rust/pull/40367
7437 [40377]: https://github.com/rust-lang/rust/pull/40377
7438 [40409]: https://github.com/rust-lang/rust/pull/40409
7439 [40516]: https://github.com/rust-lang/rust/pull/40516
7440 [40556]: https://github.com/rust-lang/rust/pull/40556
7441 [40561]: https://github.com/rust-lang/rust/pull/40561
7442 [40589]: https://github.com/rust-lang/rust/pull/40589
7443 [40612]: https://github.com/rust-lang/rust/pull/40612
7444 [40723]: https://github.com/rust-lang/rust/pull/40723
7445 [40728]: https://github.com/rust-lang/rust/pull/40728
7446 [40731]: https://github.com/rust-lang/rust/pull/40731
7447 [40734]: https://github.com/rust-lang/rust/pull/40734
7448 [40805]: https://github.com/rust-lang/rust/pull/40805
7449 [40807]: https://github.com/rust-lang/rust/pull/40807
7450 [40828]: https://github.com/rust-lang/rust/pull/40828
7451 [40870]: https://github.com/rust-lang/rust/pull/40870
7452 [41085]: https://github.com/rust-lang/rust/pull/41085
7453 [41143]: https://github.com/rust-lang/rust/pull/41143
7454 [41168]: https://github.com/rust-lang/rust/pull/41168
7455 [41270]: https://github.com/rust-lang/rust/issues/41270
7456 [41469]: https://github.com/rust-lang/rust/pull/41469
7457 [41805]: https://github.com/rust-lang/rust/issues/41805
7458 [RFC 1422]: https://github.com/rust-lang/rfcs/blob/master/text/1422-pub-restricted.md
7459 [RFC 1665]: https://github.com/rust-lang/rfcs/blob/master/text/1665-windows-subsystem.md
7460 [`Child::try_wait`]: https://doc.rust-lang.org/std/process/struct.Child.html#method.try_wait
7461 [`HashMap::retain`]: https://doc.rust-lang.org/std/collections/struct.HashMap.html#method.retain
7462 [`HashSet::retain`]: https://doc.rust-lang.org/std/collections/struct.HashSet.html#method.retain
7463 [`PeekMut::pop`]: https://doc.rust-lang.org/std/collections/binary_heap/struct.PeekMut.html#method.pop
7464 [`TcpStream::peek`]: https://doc.rust-lang.org/std/net/struct.TcpStream.html#method.peek
7465 [`UdpSocket::peek_from`]: https://doc.rust-lang.org/std/net/struct.UdpSocket.html#method.peek_from
7466 [`UdpSocket::peek`]: https://doc.rust-lang.org/std/net/struct.UdpSocket.html#method.peek
7467 [cargo/3842]: https://github.com/rust-lang/cargo/pull/3842
7468 [cargo/3847]: https://github.com/rust-lang/cargo/pull/3847
7469 [cargo/3885]: https://github.com/rust-lang/cargo/pull/3885
7470 [cargo/3901]: https://github.com/rust-lang/cargo/pull/3901
7471 [cargo/3952]: https://github.com/rust-lang/cargo/pull/3952
7472
7473
7474 Version 1.17.0 (2017-04-27)
7475 ===========================
7476
7477 Language
7478 --------
7479
7480 * [The lifetime of statics and consts defaults to `'static`][39265]. [RFC 1623]
7481 * [Fields of structs may be initialized without duplicating the field/variable
7482 names][39761]. [RFC 1682]
7483 * [`Self` may be included in the `where` clause of `impls`][38864]. [RFC 1647]
7484 * [When coercing to an unsized type lifetimes must be equal][40319]. That is,
7485 there is no subtyping between `T` and `U` when `T: Unsize<U>`. For example,
7486 coercing `&mut [&'a X; N]` to `&mut [&'b X]` requires `'a` be equal to
7487 `'b`. Soundness fix.
7488 * [Values passed to the indexing operator, `[]`, automatically coerce][40166]
7489 * [Static variables may contain references to other statics][40027]
7490
7491 Compiler
7492 --------
7493
7494 * [Exit quickly on only `--emit dep-info`][40336]
7495 * [Make `-C relocation-model` more correctly determine whether the linker
7496 creates a position-independent executable][40245]
7497 * [Add `-C overflow-checks` to directly control whether integer overflow
7498 panics][40037]
7499 * [The rustc type checker now checks items on demand instead of in a single
7500 in-order pass][40008]. This is mostly an internal refactoring in support of
7501 future work, including incremental type checking, but also resolves [RFC
7502 1647], allowing `Self` to appear in `impl` `where` clauses.
7503 * [Optimize vtable loads][39995]
7504 * [Turn off vectorization for Emscripten targets][39990]
7505 * [Provide suggestions for unknown macros imported with `use`][39953]
7506 * [Fix ICEs in path resolution][39939]
7507 * [Strip exception handling code on Emscripten when `panic=abort`][39193]
7508 * [Add clearer error message using `&str + &str`][39116]
7509
7510 Stabilized APIs
7511 ---------------
7512
7513 * [`Arc::into_raw`]
7514 * [`Arc::from_raw`]
7515 * [`Arc::ptr_eq`]
7516 * [`Rc::into_raw`]
7517 * [`Rc::from_raw`]
7518 * [`Rc::ptr_eq`]
7519 * [`Ordering::then`]
7520 * [`Ordering::then_with`]
7521 * [`BTreeMap::range`]
7522 * [`BTreeMap::range_mut`]
7523 * [`collections::Bound`]
7524 * [`process::abort`]
7525 * [`ptr::read_unaligned`]
7526 * [`ptr::write_unaligned`]
7527 * [`Result::expect_err`]
7528 * [`Cell::swap`]
7529 * [`Cell::replace`]
7530 * [`Cell::into_inner`]
7531 * [`Cell::take`]
7532
7533 Libraries
7534 ---------
7535
7536 * [`BTreeMap` and `BTreeSet` can iterate over ranges][27787]
7537 * [`Cell` can store non-`Copy` types][39793]. [RFC 1651]
7538 * [`String` implements `FromIterator<&char>`][40028]
7539 * `Box` [implements][40009] a number of new conversions:
7540 `From<Box<str>> for String`,
7541 `From<Box<[T]>> for Vec<T>`,
7542 `From<Box<CStr>> for CString`,
7543 `From<Box<OsStr>> for OsString`,
7544 `From<Box<Path>> for PathBuf`,
7545 `Into<Box<str>> for String`,
7546 `Into<Box<[T]>> for Vec<T>`,
7547 `Into<Box<CStr>> for CString`,
7548 `Into<Box<OsStr>> for OsString`,
7549 `Into<Box<Path>> for PathBuf`,
7550 `Default for Box<str>`,
7551 `Default for Box<CStr>`,
7552 `Default for Box<OsStr>`,
7553 `From<&CStr> for Box<CStr>`,
7554 `From<&OsStr> for Box<OsStr>`,
7555 `From<&Path> for Box<Path>`
7556 * [`ffi::FromBytesWithNulError` implements `Error` and `Display`][39960]
7557 * [Specialize `PartialOrd<A> for [A] where A: Ord`][39642]
7558 * [Slightly optimize `slice::sort`][39538]
7559 * [Add `ToString` trait specialization for `Cow<'a, str>` and `String`][39440]
7560 * [`Box<[T]>` implements `From<&[T]> where T: Copy`,
7561 `Box<str>` implements `From<&str>`][39438]
7562 * [`IpAddr` implements `From` for various arrays. `SocketAddr` implements
7563 `From<(I, u16)> where I: Into<IpAddr>`][39372]
7564 * [`format!` estimates the needed capacity before writing a string][39356]
7565 * [Support unprivileged symlink creation in Windows][38921]
7566 * [`PathBuf` implements `Default`][38764]
7567 * [Implement `PartialEq<[A]>` for `VecDeque<A>`][38661]
7568 * [`HashMap` resizes adaptively][38368] to guard against DOS attacks
7569 and poor hash functions.
7570
7571 Cargo
7572 -----
7573
7574 * [Add `cargo check --all`][cargo/3731]
7575 * [Add an option to ignore SSL revocation checking][cargo/3699]
7576 * [Add `cargo run --package`][cargo/3691]
7577 * [Add `required_features`][cargo/3667]
7578 * [Assume `build.rs` is a build script][cargo/3664]
7579 * [Find workspace via `workspace_root` link in containing member][cargo/3562]
7580
7581 Misc
7582 ----
7583
7584 * [Documentation is rendered with mdbook instead of the obsolete, in-tree
7585 `rustbook`][39633]
7586 * [The "Unstable Book" documents nightly-only features][ubook]
7587 * [Improve the style of the sidebar in rustdoc output][40265]
7588 * [Configure build correctly on 64-bit CPU's with the armhf ABI][40261]
7589 * [Fix MSP430 breakage due to `i128`][40257]
7590 * [Preliminary Solaris/SPARCv9 support][39903]
7591 * [`rustc` is linked statically on Windows MSVC targets][39837], allowing it to
7592 run without installing the MSVC runtime.
7593 * [`rustdoc --test` includes file names in test names][39788]
7594 * This release includes builds of `std` for `sparc64-unknown-linux-gnu`,
7595 `aarch64-unknown-linux-fuchsia`, and `x86_64-unknown-linux-fuchsia`.
7596 * [Initial support for `aarch64-unknown-freebsd`][39491]
7597 * [Initial support for `i686-unknown-netbsd`][39426]
7598 * [This release no longer includes the old makefile build system][39431]. Rust
7599 is built with a custom build system, written in Rust, and with Cargo.
7600 * [Add Debug implementations for libcollection structs][39002]
7601 * [`TypeId` implements `PartialOrd` and `Ord`][38981]
7602 * [`--test-threads=0` produces an error][38945]
7603 * [`rustup` installs documentation by default][40526]
7604 * [The Rust source includes NatVis visualizations][39843]. These can be used by
7605 WinDbg and Visual Studio to improve the debugging experience.
7606
7607 Compatibility Notes
7608 -------------------
7609
7610 * [Rust 1.17 does not correctly detect the MSVC 2017 linker][38584]. As a
7611 workaround, either use MSVC 2015 or run vcvars.bat.
7612 * [When coercing to an unsized type lifetimes must be equal][40319]. That is,
7613 disallow subtyping between `T` and `U` when `T: Unsize<U>`, e.g. coercing
7614 `&mut [&'a X; N]` to `&mut [&'b X]` requires `'a` be equal to `'b`. Soundness
7615 fix.
7616 * [`format!` and `Display::to_string` panic if an underlying formatting
7617 implementation returns an error][40117]. Previously the error was silently
7618 ignored. It is incorrect for `write_fmt` to return an error when writing
7619 to a string.
7620 * [In-tree crates are verified to be unstable][39851]. Previously, some minor
7621 crates were marked stable and could be accessed from the stable toolchain.
7622 * [Rust git source no longer includes vendored crates][39728]. Those that need
7623 to build with vendored crates should build from release tarballs.
7624 * [Fix inert attributes from `proc_macro_derives`][39572]
7625 * [During crate resolution, rustc prefers a crate in the sysroot if two crates
7626 are otherwise identical][39518]. Unlikely to be encountered outside the Rust
7627 build system.
7628 * [Fixed bugs around how type inference interacts with dead-code][39485]. The
7629 existing code generally ignores the type of dead-code unless a type-hint is
7630 provided; this can cause surprising inference interactions particularly around
7631 defaulting. The new code uniformly ignores the result type of dead-code.
7632 * [Tuple-struct constructors with private fields are no longer visible][38932]
7633 * [Lifetime parameters that do not appear in the arguments are now considered
7634 early-bound][38897], resolving a soundness bug (#[32330]). The
7635 `hr_lifetime_in_assoc_type` future-compatibility lint has been in effect since
7636 April of 2016.
7637 * [rustdoc: fix doctests with non-feature crate attributes][38161]
7638 * [Make transmuting from fn item types to pointer-sized types a hard
7639 error][34198]
7640
7641 [27787]: https://github.com/rust-lang/rust/issues/27787
7642 [32330]: https://github.com/rust-lang/rust/issues/32330
7643 [34198]: https://github.com/rust-lang/rust/pull/34198
7644 [38161]: https://github.com/rust-lang/rust/pull/38161
7645 [38368]: https://github.com/rust-lang/rust/pull/38368
7646 [38584]: https://github.com/rust-lang/rust/issues/38584
7647 [38661]: https://github.com/rust-lang/rust/pull/38661
7648 [38764]: https://github.com/rust-lang/rust/pull/38764
7649 [38864]: https://github.com/rust-lang/rust/issues/38864
7650 [38897]: https://github.com/rust-lang/rust/pull/38897
7651 [38921]: https://github.com/rust-lang/rust/pull/38921
7652 [38932]: https://github.com/rust-lang/rust/pull/38932
7653 [38945]: https://github.com/rust-lang/rust/pull/38945
7654 [38981]: https://github.com/rust-lang/rust/pull/38981
7655 [39002]: https://github.com/rust-lang/rust/pull/39002
7656 [39116]: https://github.com/rust-lang/rust/pull/39116
7657 [39193]: https://github.com/rust-lang/rust/pull/39193
7658 [39265]: https://github.com/rust-lang/rust/pull/39265
7659 [39356]: https://github.com/rust-lang/rust/pull/39356
7660 [39372]: https://github.com/rust-lang/rust/pull/39372
7661 [39426]: https://github.com/rust-lang/rust/pull/39426
7662 [39431]: https://github.com/rust-lang/rust/pull/39431
7663 [39438]: https://github.com/rust-lang/rust/pull/39438
7664 [39440]: https://github.com/rust-lang/rust/pull/39440
7665 [39485]: https://github.com/rust-lang/rust/pull/39485
7666 [39491]: https://github.com/rust-lang/rust/pull/39491
7667 [39518]: https://github.com/rust-lang/rust/pull/39518
7668 [39538]: https://github.com/rust-lang/rust/pull/39538
7669 [39572]: https://github.com/rust-lang/rust/pull/39572
7670 [39633]: https://github.com/rust-lang/rust/pull/39633
7671 [39642]: https://github.com/rust-lang/rust/pull/39642
7672 [39728]: https://github.com/rust-lang/rust/pull/39728
7673 [39761]: https://github.com/rust-lang/rust/pull/39761
7674 [39788]: https://github.com/rust-lang/rust/pull/39788
7675 [39793]: https://github.com/rust-lang/rust/pull/39793
7676 [39837]: https://github.com/rust-lang/rust/pull/39837
7677 [39843]: https://github.com/rust-lang/rust/pull/39843
7678 [39851]: https://github.com/rust-lang/rust/pull/39851
7679 [39903]: https://github.com/rust-lang/rust/pull/39903
7680 [39939]: https://github.com/rust-lang/rust/pull/39939
7681 [39953]: https://github.com/rust-lang/rust/pull/39953
7682 [39960]: https://github.com/rust-lang/rust/pull/39960
7683 [39990]: https://github.com/rust-lang/rust/pull/39990
7684 [39995]: https://github.com/rust-lang/rust/pull/39995
7685 [40008]: https://github.com/rust-lang/rust/pull/40008
7686 [40009]: https://github.com/rust-lang/rust/pull/40009
7687 [40027]: https://github.com/rust-lang/rust/pull/40027
7688 [40028]: https://github.com/rust-lang/rust/pull/40028
7689 [40037]: https://github.com/rust-lang/rust/pull/40037
7690 [40117]: https://github.com/rust-lang/rust/pull/40117
7691 [40166]: https://github.com/rust-lang/rust/pull/40166
7692 [40245]: https://github.com/rust-lang/rust/pull/40245
7693 [40257]: https://github.com/rust-lang/rust/pull/40257
7694 [40261]: https://github.com/rust-lang/rust/pull/40261
7695 [40265]: https://github.com/rust-lang/rust/pull/40265
7696 [40319]: https://github.com/rust-lang/rust/pull/40319
7697 [40336]: https://github.com/rust-lang/rust/pull/40336
7698 [40526]: https://github.com/rust-lang/rust/pull/40526
7699 [RFC 1623]: https://github.com/rust-lang/rfcs/blob/master/text/1623-static.md
7700 [RFC 1647]: https://github.com/rust-lang/rfcs/blob/master/text/1647-allow-self-in-where-clauses.md
7701 [RFC 1651]: https://github.com/rust-lang/rfcs/blob/master/text/1651-movecell.md
7702 [RFC 1682]: https://github.com/rust-lang/rfcs/blob/master/text/1682-field-init-shorthand.md
7703 [`Arc::from_raw`]: https://doc.rust-lang.org/std/sync/struct.Arc.html#method.from_raw
7704 [`Arc::into_raw`]: https://doc.rust-lang.org/std/sync/struct.Arc.html#method.into_raw
7705 [`Arc::ptr_eq`]: https://doc.rust-lang.org/std/sync/struct.Arc.html#method.ptr_eq
7706 [`BTreeMap::range_mut`]: https://doc.rust-lang.org/std/collections/btree_map/struct.BTreeMap.html#method.range_mut
7707 [`BTreeMap::range`]: https://doc.rust-lang.org/std/collections/btree_map/struct.BTreeMap.html#method.range
7708 [`Cell::into_inner`]: https://doc.rust-lang.org/std/cell/struct.Cell.html#method.into_inner
7709 [`Cell::replace`]: https://doc.rust-lang.org/std/cell/struct.Cell.html#method.replace
7710 [`Cell::swap`]: https://doc.rust-lang.org/std/cell/struct.Cell.html#method.swap
7711 [`Cell::take`]: https://doc.rust-lang.org/std/cell/struct.Cell.html#method.take
7712 [`Ordering::then_with`]: https://doc.rust-lang.org/std/cmp/enum.Ordering.html#method.then_with
7713 [`Ordering::then`]: https://doc.rust-lang.org/std/cmp/enum.Ordering.html#method.then
7714 [`Rc::from_raw`]: https://doc.rust-lang.org/std/rc/struct.Rc.html#method.from_raw
7715 [`Rc::into_raw`]: https://doc.rust-lang.org/std/rc/struct.Rc.html#method.into_raw
7716 [`Rc::ptr_eq`]: https://doc.rust-lang.org/std/rc/struct.Rc.html#method.ptr_eq
7717 [`Result::expect_err`]: https://doc.rust-lang.org/std/result/enum.Result.html#method.expect_err
7718 [`collections::Bound`]: https://doc.rust-lang.org/std/collections/enum.Bound.html
7719 [`process::abort`]: https://doc.rust-lang.org/std/process/fn.abort.html
7720 [`ptr::read_unaligned`]: https://doc.rust-lang.org/std/ptr/fn.read_unaligned.html
7721 [`ptr::write_unaligned`]: https://doc.rust-lang.org/std/ptr/fn.write_unaligned.html
7722 [cargo/3562]: https://github.com/rust-lang/cargo/pull/3562
7723 [cargo/3664]: https://github.com/rust-lang/cargo/pull/3664
7724 [cargo/3667]: https://github.com/rust-lang/cargo/pull/3667
7725 [cargo/3691]: https://github.com/rust-lang/cargo/pull/3691
7726 [cargo/3699]: https://github.com/rust-lang/cargo/pull/3699
7727 [cargo/3731]: https://github.com/rust-lang/cargo/pull/3731
7728 [ubook]: https://doc.rust-lang.org/unstable-book/
7729
7730
7731 Version 1.16.0 (2017-03-16)
7732 ===========================
7733
7734 Language
7735 --------
7736
7737 * [The compiler's `dead_code` lint now accounts for type aliases][38051].
7738 * [Uninhabitable enums (those without any variants) no longer permit wildcard
7739 match patterns][38069]
7740 * [Clean up semantics of `self` in an import list][38313]
7741 * [`Self` may appear in `impl` headers][38920]
7742 * [`Self` may appear in struct expressions][39282]
7743
7744 Compiler
7745 --------
7746
7747 * [`rustc` now supports `--emit=metadata`, which causes rustc to emit
7748 a `.rmeta` file containing only crate metadata][38571]. This can be
7749 used by tools like the Rust Language Service to perform
7750 metadata-only builds.
7751 * [Levenshtein based typo suggestions now work in most places, while
7752 previously they worked only for fields and sometimes for local
7753 variables][38927]. Together with the overhaul of "no
7754 resolution"/"unexpected resolution" errors (#[38154]) they result in
7755 large and systematic improvement in resolution diagnostics.
7756 * [Fix `transmute::<T, U>` where `T` requires a bigger alignment than
7757 `U`][38670]
7758 * [rustc: use -Xlinker when specifying an rpath with ',' in it][38798]
7759 * [`rustc` no longer attempts to provide "consider using an explicit
7760 lifetime" suggestions][37057]. They were inaccurate.
7761
7762 Stabilized APIs
7763 ---------------
7764
7765 * [`VecDeque::truncate`]
7766 * [`VecDeque::resize`]
7767 * [`String::insert_str`]
7768 * [`Duration::checked_add`]
7769 * [`Duration::checked_sub`]
7770 * [`Duration::checked_div`]
7771 * [`Duration::checked_mul`]
7772 * [`str::replacen`]
7773 * [`str::repeat`]
7774 * [`SocketAddr::is_ipv4`]
7775 * [`SocketAddr::is_ipv6`]
7776 * [`IpAddr::is_ipv4`]
7777 * [`IpAddr::is_ipv6`]
7778 * [`Vec::dedup_by`]
7779 * [`Vec::dedup_by_key`]
7780 * [`Result::unwrap_or_default`]
7781 * [`<*const T>::wrapping_offset`]
7782 * [`<*mut T>::wrapping_offset`]
7783 * `CommandExt::creation_flags`
7784 * [`File::set_permissions`]
7785 * [`String::split_off`]
7786
7787 Libraries
7788 ---------
7789
7790 * [`[T]::binary_search` and `[T]::binary_search_by_key` now take
7791 their argument by `Borrow` parameter][37761]
7792 * [All public types in std implement `Debug`][38006]
7793 * [`IpAddr` implements `From<Ipv4Addr>` and `From<Ipv6Addr>`][38327]
7794 * [`Ipv6Addr` implements `From<[u16; 8]>`][38131]
7795 * [Ctrl-Z returns from `Stdin.read()` when reading from the console on
7796 Windows][38274]
7797 * [std: Fix partial writes in `LineWriter`][38062]
7798 * [std: Clamp max read/write sizes on Unix][38622]
7799 * [Use more specific panic message for `&str` slicing errors][38066]
7800 * [`TcpListener::set_only_v6` is deprecated][38304]. This
7801 functionality cannot be achieved in std currently.
7802 * [`writeln!`, like `println!`, now accepts a form with no string
7803 or formatting arguments, to just print a newline][38469]
7804 * [Implement `iter::Sum` and `iter::Product` for `Result`][38580]
7805 * [Reduce the size of static data in `std_unicode::tables`][38781]
7806 * [`char::EscapeDebug`, `EscapeDefault`, `EscapeUnicode`,
7807 `CaseMappingIter`, `ToLowercase`, `ToUppercase`, implement
7808 `Display`][38909]
7809 * [`Duration` implements `Sum`][38712]
7810 * [`String` implements `ToSocketAddrs`][39048]
7811
7812 Cargo
7813 -----
7814
7815 * [The `cargo check` command does a type check of a project without
7816 building it][cargo/3296]
7817 * [crates.io will display CI badges from Travis and AppVeyor, if
7818 specified in Cargo.toml][cargo/3546]
7819 * [crates.io will display categories listed in Cargo.toml][cargo/3301]
7820 * [Compilation profiles accept integer values for `debug`, in addition
7821 to `true` and `false`. These are passed to `rustc` as the value to
7822 `-C debuginfo`][cargo/3534]
7823 * [Implement `cargo --version --verbose`][cargo/3604]
7824 * [All builds now output 'dep-info' build dependencies compatible with
7825 make and ninja][cargo/3557]
7826 * [Build all workspace members with `build --all`][cargo/3511]
7827 * [Document all workspace members with `doc --all`][cargo/3515]
7828 * [Path deps outside workspace are not members][cargo/3443]
7829
7830 Misc
7831 ----
7832
7833 * [`rustdoc` has a `--sysroot` argument that, like `rustc`, specifies
7834 the path to the Rust implementation][38589]
7835 * [The `armv7-linux-androideabi` target no longer enables NEON
7836 extensions, per Google's ABI guide][38413]
7837 * [The stock standard library can be compiled for Redox OS][38401]
7838 * [Rust has initial SPARC support][38726]. Tier 3. No builds
7839 available.
7840 * [Rust has experimental support for Nvidia PTX][38559]. Tier 3. No
7841 builds available.
7842 * [Fix backtraces on i686-pc-windows-gnu by disabling FPO][39379]
7843
7844 Compatibility Notes
7845 -------------------
7846
7847 * [Uninhabitable enums (those without any variants) no longer permit wildcard
7848 match patterns][38069]
7849 * In this release, references to uninhabited types can not be
7850 pattern-matched. This was accidentally allowed in 1.15.
7851 * [The compiler's `dead_code` lint now accounts for type aliases][38051].
7852 * [Ctrl-Z returns from `Stdin.read()` when reading from the console on
7853 Windows][38274]
7854 * [Clean up semantics of `self` in an import list][38313]
7855 * Reimplemented lifetime elision. This change was almost entirely compatible
7856 with existing code, but it did close a number of small bugs and loopholes,
7857 as well as being more accepting in some other [cases][41105].
7858
7859 [37057]: https://github.com/rust-lang/rust/pull/37057
7860 [37761]: https://github.com/rust-lang/rust/pull/37761
7861 [38006]: https://github.com/rust-lang/rust/pull/38006
7862 [38051]: https://github.com/rust-lang/rust/pull/38051
7863 [38062]: https://github.com/rust-lang/rust/pull/38062
7864 [38622]: https://github.com/rust-lang/rust/pull/38622
7865 [38066]: https://github.com/rust-lang/rust/pull/38066
7866 [38069]: https://github.com/rust-lang/rust/pull/38069
7867 [38131]: https://github.com/rust-lang/rust/pull/38131
7868 [38154]: https://github.com/rust-lang/rust/pull/38154
7869 [38274]: https://github.com/rust-lang/rust/pull/38274
7870 [38304]: https://github.com/rust-lang/rust/pull/38304
7871 [38313]: https://github.com/rust-lang/rust/pull/38313
7872 [38327]: https://github.com/rust-lang/rust/pull/38327
7873 [38401]: https://github.com/rust-lang/rust/pull/38401
7874 [38413]: https://github.com/rust-lang/rust/pull/38413
7875 [38469]: https://github.com/rust-lang/rust/pull/38469
7876 [38559]: https://github.com/rust-lang/rust/pull/38559
7877 [38571]: https://github.com/rust-lang/rust/pull/38571
7878 [38580]: https://github.com/rust-lang/rust/pull/38580
7879 [38589]: https://github.com/rust-lang/rust/pull/38589
7880 [38670]: https://github.com/rust-lang/rust/pull/38670
7881 [38712]: https://github.com/rust-lang/rust/pull/38712
7882 [38726]: https://github.com/rust-lang/rust/pull/38726
7883 [38781]: https://github.com/rust-lang/rust/pull/38781
7884 [38798]: https://github.com/rust-lang/rust/pull/38798
7885 [38909]: https://github.com/rust-lang/rust/pull/38909
7886 [38920]: https://github.com/rust-lang/rust/pull/38920
7887 [38927]: https://github.com/rust-lang/rust/pull/38927
7888 [39048]: https://github.com/rust-lang/rust/pull/39048
7889 [39282]: https://github.com/rust-lang/rust/pull/39282
7890 [39379]: https://github.com/rust-lang/rust/pull/39379
7891 [41105]: https://github.com/rust-lang/rust/issues/41105
7892 [`<*const T>::wrapping_offset`]: https://doc.rust-lang.org/std/primitive.pointer.html#method.wrapping_offset
7893 [`<*mut T>::wrapping_offset`]: https://doc.rust-lang.org/std/primitive.pointer.html#method.wrapping_offset
7894 [`Duration::checked_add`]: https://doc.rust-lang.org/std/time/struct.Duration.html#method.checked_add
7895 [`Duration::checked_div`]: https://doc.rust-lang.org/std/time/struct.Duration.html#method.checked_div
7896 [`Duration::checked_mul`]: https://doc.rust-lang.org/std/time/struct.Duration.html#method.checked_mul
7897 [`Duration::checked_sub`]: https://doc.rust-lang.org/std/time/struct.Duration.html#method.checked_sub
7898 [`File::set_permissions`]: https://doc.rust-lang.org/std/fs/struct.File.html#method.set_permissions
7899 [`IpAddr::is_ipv4`]: https://doc.rust-lang.org/std/net/enum.IpAddr.html#method.is_ipv4
7900 [`IpAddr::is_ipv6`]: https://doc.rust-lang.org/std/net/enum.IpAddr.html#method.is_ipv6
7901 [`Result::unwrap_or_default`]: https://doc.rust-lang.org/std/result/enum.Result.html#method.unwrap_or_default
7902 [`SocketAddr::is_ipv4`]: https://doc.rust-lang.org/std/net/enum.SocketAddr.html#method.is_ipv4
7903 [`SocketAddr::is_ipv6`]: https://doc.rust-lang.org/std/net/enum.SocketAddr.html#method.is_ipv6
7904 [`String::insert_str`]: https://doc.rust-lang.org/std/string/struct.String.html#method.insert_str
7905 [`String::split_off`]: https://doc.rust-lang.org/std/string/struct.String.html#method.split_off
7906 [`Vec::dedup_by_key`]: https://doc.rust-lang.org/std/vec/struct.Vec.html#method.dedup_by_key
7907 [`Vec::dedup_by`]: https://doc.rust-lang.org/std/vec/struct.Vec.html#method.dedup_by
7908 [`VecDeque::resize`]: https://doc.rust-lang.org/std/collections/vec_deque/struct.VecDeque.html#method.resize
7909 [`VecDeque::truncate`]: https://doc.rust-lang.org/std/collections/vec_deque/struct.VecDeque.html#method.truncate
7910 [`str::repeat`]: https://doc.rust-lang.org/std/primitive.str.html#method.repeat
7911 [`str::replacen`]: https://doc.rust-lang.org/std/primitive.str.html#method.replacen
7912 [cargo/3296]: https://github.com/rust-lang/cargo/pull/3296
7913 [cargo/3301]: https://github.com/rust-lang/cargo/pull/3301
7914 [cargo/3443]: https://github.com/rust-lang/cargo/pull/3443
7915 [cargo/3511]: https://github.com/rust-lang/cargo/pull/3511
7916 [cargo/3515]: https://github.com/rust-lang/cargo/pull/3515
7917 [cargo/3534]: https://github.com/rust-lang/cargo/pull/3534
7918 [cargo/3546]: https://github.com/rust-lang/cargo/pull/3546
7919 [cargo/3557]: https://github.com/rust-lang/cargo/pull/3557
7920 [cargo/3604]: https://github.com/rust-lang/cargo/pull/3604
7921
7922
7923 Version 1.15.1 (2017-02-09)
7924 ===========================
7925
7926 * [Fix IntoIter::as_mut_slice's signature][39466]
7927 * [Compile compiler builtins with `-fPIC` on 32-bit platforms][39523]
7928
7929 [39466]: https://github.com/rust-lang/rust/pull/39466
7930 [39523]: https://github.com/rust-lang/rust/pull/39523
7931
7932
7933 Version 1.15.0 (2017-02-02)
7934 ===========================
7935
7936 Language
7937 --------
7938
7939 * Basic procedural macros allowing custom `#[derive]`, aka "macros 1.1", are
7940 stable. This allows popular code-generating crates like Serde and Diesel to
7941 work ergonomically. [RFC 1681].
7942 * [Tuple structs may be empty. Unary and empty tuple structs may be instantiated
7943 with curly braces][36868]. Part of [RFC 1506].
7944 * [A number of minor changes to name resolution have been activated][37127].
7945 They add up to more consistent semantics, allowing for future evolution of
7946 Rust macros. Specified in [RFC 1560], see its section on ["changes"] for
7947 details of what is different. The breaking changes here have been transitioned
7948 through the [`legacy_imports`] lint since 1.14, with no known regressions.
7949 * [In `macro_rules`, `path` fragments can now be parsed as type parameter
7950 bounds][38279]
7951 * [`?Sized` can be used in `where` clauses][37791]
7952 * [There is now a limit on the size of monomorphized types and it can be
7953 modified with the `#![type_size_limit]` crate attribute, similarly to
7954 the `#![recursion_limit]` attribute][37789]
7955
7956 Compiler
7957 --------
7958
7959 * [On Windows, the compiler will apply dllimport attributes when linking to
7960 extern functions][37973]. Additional attributes and flags can control which
7961 library kind is linked and its name. [RFC 1717].
7962 * [Rust-ABI symbols are no longer exported from cdylibs][38117]
7963 * [The `--test` flag works with procedural macro crates][38107]
7964 * [Fix `extern "aapcs" fn` ABI][37814]
7965 * [The `-C no-stack-check` flag is deprecated][37636]. It does nothing.
7966 * [The `format!` expander recognizes incorrect `printf` and shell-style
7967 formatting directives and suggests the correct format][37613].
7968 * [Only report one error for all unused imports in an import list][37456]
7969
7970 Compiler Performance
7971 --------------------
7972
7973 * [Avoid unnecessary `mk_ty` calls in `Ty::super_fold_with`][37705]
7974 * [Avoid more unnecessary `mk_ty` calls in `Ty::super_fold_with`][37979]
7975 * [Don't clone in `UnificationTable::probe`][37848]
7976 * [Remove `scope_auxiliary` to cut RSS by 10%][37764]
7977 * [Use small vectors in type walker][37760]
7978 * [Macro expansion performance was improved][37701]
7979 * [Change `HirVec<P<T>>` to `HirVec<T>` in `hir::Expr`][37642]
7980 * [Replace FNV with a faster hash function][37229]
7981
7982 Stabilized APIs
7983 ---------------
7984
7985 * [`std::iter::Iterator::min_by`]
7986 * [`std::iter::Iterator::max_by`]
7987 * [`std::os::*::fs::FileExt`]
7988 * [`std::sync::atomic::Atomic*::get_mut`]
7989 * [`std::sync::atomic::Atomic*::into_inner`]
7990 * [`std::vec::IntoIter::as_slice`]
7991 * [`std::vec::IntoIter::as_mut_slice`]
7992 * [`std::sync::mpsc::Receiver::try_iter`]
7993 * [`std::os::unix::process::CommandExt::before_exec`]
7994 * [`std::rc::Rc::strong_count`]
7995 * [`std::rc::Rc::weak_count`]
7996 * [`std::sync::Arc::strong_count`]
7997 * [`std::sync::Arc::weak_count`]
7998 * [`std::char::encode_utf8`]
7999 * [`std::char::encode_utf16`]
8000 * [`std::cell::Ref::clone`]
8001 * [`std::io::Take::into_inner`]
8002
8003 Libraries
8004 ---------
8005
8006 * [The standard sorting algorithm has been rewritten for dramatic performance
8007 improvements][38192]. It is a hybrid merge sort, drawing influences from
8008 Timsort. Previously it was a naive merge sort.
8009 * [`Iterator::nth` no longer has a `Sized` bound][38134]
8010 * [`Extend<&T>` is specialized for `Vec` where `T: Copy`][38182] to improve
8011 performance.
8012 * [`chars().count()` is much faster][37888] and so are [`chars().last()`
8013 and `char_indices().last()`][37882]
8014 * [Fix ARM Objective-C ABI in `std::env::args`][38146]
8015 * [Chinese characters display correctly in `fmt::Debug`][37855]
8016 * [Derive `Default` for `Duration`][37699]
8017 * [Support creation of anonymous pipes on WinXP/2k][37677]
8018 * [`mpsc::RecvTimeoutError` implements `Error`][37527]
8019 * [Don't pass overlapped handles to processes][38835]
8020
8021 Cargo
8022 -----
8023
8024 * [In this release, Cargo build scripts no longer have access to the `OUT_DIR`
8025 environment variable at build time via `env!("OUT_DIR")`][cargo/3368]. They
8026 should instead check the variable at runtime with `std::env`. That the value
8027 was set at build time was a bug, and incorrect when cross-compiling. This
8028 change is known to cause breakage.
8029 * [Add `--all` flag to `cargo test`][cargo/3221]
8030 * [Compile statically against the MSVC CRT][cargo/3363]
8031 * [Mix feature flags into fingerprint/metadata shorthash][cargo/3102]
8032 * [Link OpenSSL statically on OSX][cargo/3311]
8033 * [Apply new fingerprinting to build dir outputs][cargo/3310]
8034 * [Test for bad path overrides with summaries][cargo/3336]
8035 * [Require `cargo install --vers` to take a semver version][cargo/3338]
8036 * [Fix retrying crate downloads for network errors][cargo/3348]
8037 * [Implement string lookup for `build.rustflags` config key][cargo/3356]
8038 * [Emit more info on --message-format=json][cargo/3319]
8039 * [Assume `build.rs` in the same directory as `Cargo.toml` is a build script][cargo/3361]
8040 * [Don't ignore errors in workspace manifest][cargo/3409]
8041 * [Fix `--message-format JSON` when rustc emits non-JSON warnings][cargo/3410]
8042
8043 Tooling
8044 -------
8045
8046 * [Test runners (binaries built with `--test`) now support a `--list` argument
8047 that lists the tests it contains][38185]
8048 * [Test runners now support a `--exact` argument that makes the test filter
8049 match exactly, instead of matching only a substring of the test name][38181]
8050 * [rustdoc supports a `--playground-url` flag][37763]
8051 * [rustdoc provides more details about `#[should_panic]` errors][37749]
8052
8053 Misc
8054 ----
8055
8056 * [The Rust build system is now written in Rust][37817]. The Makefiles may
8057 continue to be used in this release by passing `--disable-rustbuild` to the
8058 configure script, but they will be deleted soon. Note that the new build
8059 system uses a different on-disk layout that will likely affect any scripts
8060 building Rust.
8061 * [Rust supports i686-unknown-openbsd][38086]. Tier 3 support. No testing or
8062 releases.
8063 * [Rust supports the MSP430][37627]. Tier 3 support. No testing or releases.
8064 * [Rust supports the ARMv5TE architecture][37615]. Tier 3 support. No testing or
8065 releases.
8066
8067 Compatibility Notes
8068 -------------------
8069
8070 * [A number of minor changes to name resolution have been activated][37127].
8071 They add up to more consistent semantics, allowing for future evolution of
8072 Rust macros. Specified in [RFC 1560], see its section on ["changes"] for
8073 details of what is different. The breaking changes here have been transitioned
8074 through the [`legacy_imports`] lint since 1.14, with no known regressions.
8075 * [In this release, Cargo build scripts no longer have access to the `OUT_DIR`
8076 environment variable at build time via `env!("OUT_DIR")`][cargo/3368]. They
8077 should instead check the variable at runtime with `std::env`. That the value
8078 was set at build time was a bug, and incorrect when cross-compiling. This
8079 change is known to cause breakage.
8080 * [Higher-ranked lifetimes are no longer allowed to appear _only_ in associated
8081 types][33685]. The [`hr_lifetime_in_assoc_type` lint] has been a warning since
8082 1.10 and is now an error by default. It will become a hard error in the near
8083 future.
8084 * [The semantics relating modules to file system directories are changing in
8085 minor ways][37602]. This is captured in the new `legacy_directory_ownership`
8086 lint, which is a warning in this release, and will become a hard error in the
8087 future.
8088 * [Rust-ABI symbols are no longer exported from cdylibs][38117]
8089 * [Once `Peekable` peeks a `None` it will return that `None` without re-querying
8090 the underlying iterator][37834]
8091
8092 ["changes"]: https://github.com/rust-lang/rfcs/blob/master/text/1560-name-resolution.md#changes-to-name-resolution-rules
8093 [33685]: https://github.com/rust-lang/rust/issues/33685
8094 [36868]: https://github.com/rust-lang/rust/pull/36868
8095 [37127]: https://github.com/rust-lang/rust/pull/37127
8096 [37229]: https://github.com/rust-lang/rust/pull/37229
8097 [37456]: https://github.com/rust-lang/rust/pull/37456
8098 [37527]: https://github.com/rust-lang/rust/pull/37527
8099 [37602]: https://github.com/rust-lang/rust/pull/37602
8100 [37613]: https://github.com/rust-lang/rust/pull/37613
8101 [37615]: https://github.com/rust-lang/rust/pull/37615
8102 [37636]: https://github.com/rust-lang/rust/pull/37636
8103 [37627]: https://github.com/rust-lang/rust/pull/37627
8104 [37642]: https://github.com/rust-lang/rust/pull/37642
8105 [37677]: https://github.com/rust-lang/rust/pull/37677
8106 [37699]: https://github.com/rust-lang/rust/pull/37699
8107 [37701]: https://github.com/rust-lang/rust/pull/37701
8108 [37705]: https://github.com/rust-lang/rust/pull/37705
8109 [37749]: https://github.com/rust-lang/rust/pull/37749
8110 [37760]: https://github.com/rust-lang/rust/pull/37760
8111 [37763]: https://github.com/rust-lang/rust/pull/37763
8112 [37764]: https://github.com/rust-lang/rust/pull/37764
8113 [37789]: https://github.com/rust-lang/rust/pull/37789
8114 [37791]: https://github.com/rust-lang/rust/pull/37791
8115 [37814]: https://github.com/rust-lang/rust/pull/37814
8116 [37817]: https://github.com/rust-lang/rust/pull/37817
8117 [37834]: https://github.com/rust-lang/rust/pull/37834
8118 [37848]: https://github.com/rust-lang/rust/pull/37848
8119 [37855]: https://github.com/rust-lang/rust/pull/37855
8120 [37882]: https://github.com/rust-lang/rust/pull/37882
8121 [37888]: https://github.com/rust-lang/rust/pull/37888
8122 [37973]: https://github.com/rust-lang/rust/pull/37973
8123 [37979]: https://github.com/rust-lang/rust/pull/37979
8124 [38086]: https://github.com/rust-lang/rust/pull/38086
8125 [38107]: https://github.com/rust-lang/rust/pull/38107
8126 [38117]: https://github.com/rust-lang/rust/pull/38117
8127 [38134]: https://github.com/rust-lang/rust/pull/38134
8128 [38146]: https://github.com/rust-lang/rust/pull/38146
8129 [38181]: https://github.com/rust-lang/rust/pull/38181
8130 [38182]: https://github.com/rust-lang/rust/pull/38182
8131 [38185]: https://github.com/rust-lang/rust/pull/38185
8132 [38192]: https://github.com/rust-lang/rust/pull/38192
8133 [38279]: https://github.com/rust-lang/rust/pull/38279
8134 [38835]: https://github.com/rust-lang/rust/pull/38835
8135 [RFC 1506]: https://github.com/rust-lang/rfcs/blob/master/text/1506-adt-kinds.md
8136 [RFC 1560]: https://github.com/rust-lang/rfcs/blob/master/text/1560-name-resolution.md
8137 [RFC 1681]: https://github.com/rust-lang/rfcs/blob/master/text/1681-macros-1.1.md
8138 [RFC 1717]: https://github.com/rust-lang/rfcs/blob/master/text/1717-dllimport.md
8139 [`hr_lifetime_in_assoc_type` lint]: https://github.com/rust-lang/rust/issues/33685
8140 [`legacy_imports`]: https://github.com/rust-lang/rust/pull/38271
8141 [cargo/3102]: https://github.com/rust-lang/cargo/pull/3102
8142 [cargo/3221]: https://github.com/rust-lang/cargo/pull/3221
8143 [cargo/3310]: https://github.com/rust-lang/cargo/pull/3310
8144 [cargo/3311]: https://github.com/rust-lang/cargo/pull/3311
8145 [cargo/3319]: https://github.com/rust-lang/cargo/pull/3319
8146 [cargo/3336]: https://github.com/rust-lang/cargo/pull/3336
8147 [cargo/3338]: https://github.com/rust-lang/cargo/pull/3338
8148 [cargo/3348]: https://github.com/rust-lang/cargo/pull/3348
8149 [cargo/3356]: https://github.com/rust-lang/cargo/pull/3356
8150 [cargo/3361]: https://github.com/rust-lang/cargo/pull/3361
8151 [cargo/3363]: https://github.com/rust-lang/cargo/pull/3363
8152 [cargo/3368]: https://github.com/rust-lang/cargo/issues/3368
8153 [cargo/3409]: https://github.com/rust-lang/cargo/pull/3409
8154 [cargo/3410]: https://github.com/rust-lang/cargo/pull/3410
8155 [`std::iter::Iterator::min_by`]: https://doc.rust-lang.org/std/iter/trait.Iterator.html#method.min_by
8156 [`std::iter::Iterator::max_by`]: https://doc.rust-lang.org/std/iter/trait.Iterator.html#method.max_by
8157 [`std::os::*::fs::FileExt`]: https://doc.rust-lang.org/std/os/unix/fs/trait.FileExt.html
8158 [`std::sync::atomic::Atomic*::get_mut`]: https://doc.rust-lang.org/std/sync/atomic/struct.AtomicU8.html#method.get_mut
8159 [`std::sync::atomic::Atomic*::into_inner`]: https://doc.rust-lang.org/std/sync/atomic/struct.AtomicU8.html#method.into_inner
8160 [`std::vec::IntoIter::as_slice`]: https://doc.rust-lang.org/std/vec/struct.IntoIter.html#method.as_slice
8161 [`std::vec::IntoIter::as_mut_slice`]: https://doc.rust-lang.org/std/vec/struct.IntoIter.html#method.as_mut_slice
8162 [`std::sync::mpsc::Receiver::try_iter`]: https://doc.rust-lang.org/std/sync/mpsc/struct.Receiver.html#method.try_iter
8163 [`std::os::unix::process::CommandExt::before_exec`]: https://doc.rust-lang.org/std/os/unix/process/trait.CommandExt.html#tymethod.before_exec
8164 [`std::rc::Rc::strong_count`]: https://doc.rust-lang.org/std/rc/struct.Rc.html#method.strong_count
8165 [`std::rc::Rc::weak_count`]: https://doc.rust-lang.org/std/rc/struct.Rc.html#method.weak_count
8166 [`std::sync::Arc::strong_count`]: https://doc.rust-lang.org/std/sync/struct.Arc.html#method.strong_count
8167 [`std::sync::Arc::weak_count`]: https://doc.rust-lang.org/std/sync/struct.Arc.html#method.weak_count
8168 [`std::char::encode_utf8`]: https://doc.rust-lang.org/std/primitive.char.html#method.encode_utf8
8169 [`std::char::encode_utf16`]: https://doc.rust-lang.org/std/primitive.char.html#method.encode_utf16
8170 [`std::cell::Ref::clone`]: https://doc.rust-lang.org/std/cell/struct.Ref.html#method.clone
8171 [`std::io::Take::into_inner`]: https://doc.rust-lang.org/std/io/struct.Take.html#method.into_inner
8172
8173
8174 Version 1.14.0 (2016-12-22)
8175 ===========================
8176
8177 Language
8178 --------
8179
8180 * [`..` matches multiple tuple fields in enum variants, structs
8181 and tuples][36843]. [RFC 1492].
8182 * [Safe `fn` items can be coerced to `unsafe fn` pointers][37389]
8183 * [`use *` and `use ::*` both glob-import from the crate root][37367]
8184 * [It's now possible to call a `Vec<Box<Fn()>>` without explicit
8185 dereferencing][36822]
8186
8187 Compiler
8188 --------
8189
8190 * [Mark enums with non-zero discriminant as non-zero][37224]
8191 * [Lower-case `static mut` names are linted like other
8192 statics and consts][37162]
8193 * [Fix ICE on some macros in const integer positions
8194 (e.g. `[u8; m!()]`)][36819]
8195 * [Improve error message and snippet for "did you mean `x`"][36798]
8196 * [Add a panic-strategy field to the target specification][36794]
8197 * [Include LLVM version in `--version --verbose`][37200]
8198
8199 Compile-time Optimizations
8200 --------------------------
8201
8202 * [Improve macro expansion performance][37569]
8203 * [Shrink `Expr_::ExprInlineAsm`][37445]
8204 * [Replace all uses of SHA-256 with BLAKE2b][37439]
8205 * [Reduce the number of bytes hashed by `IchHasher`][37427]
8206 * [Avoid more allocations when compiling html5ever][37373]
8207 * [Use `SmallVector` in `CombineFields::instantiate`][37322]
8208 * [Avoid some allocations in the macro parser][37318]
8209 * [Use a faster deflate setting][37298]
8210 * [Add `ArrayVec` and `AccumulateVec` to reduce heap allocations
8211 during interning of slices][37270]
8212 * [Optimize `write_metadata`][37267]
8213 * [Don't process obligation forest cycles when stalled][37231]
8214 * [Avoid many `CrateConfig` clones][37161]
8215 * [Optimize `Substs::super_fold_with`][37108]
8216 * [Optimize `ObligationForest`'s `NodeState` handling][36993]
8217 * [Speed up `plug_leaks`][36917]
8218
8219 Libraries
8220 ---------
8221
8222 * [`println!()`, with no arguments, prints newline][36825].
8223 Previously, an empty string was required to achieve the same.
8224 * [`Wrapping` impls standard binary and unary operators, as well as
8225 the `Sum` and `Product` iterators][37356]
8226 * [Implement `From<Cow<str>> for String` and `From<Cow<[T]>> for
8227 Vec<T>`][37326]
8228 * [Improve `fold` performance for `chain`, `cloned`, `map`, and
8229 `VecDeque` iterators][37315]
8230 * [Improve `SipHasher` performance on small values][37312]
8231 * [Add Iterator trait TrustedLen to enable better FromIterator /
8232 Extend][37306]
8233 * [Expand `.zip()` specialization to `.map()` and `.cloned()`][37230]
8234 * [`ReadDir` implements `Debug`][37221]
8235 * [Implement `RefUnwindSafe` for atomic types][37178]
8236 * [Specialize `Vec::extend` to `Vec::extend_from_slice`][37094]
8237 * [Avoid allocations in `Decoder::read_str`][37064]
8238 * [`io::Error` implements `From<io::ErrorKind>`][37037]
8239 * [Impl `Debug` for raw pointers to unsized data][36880]
8240 * [Don't reuse `HashMap` random seeds][37470]
8241 * [The internal memory layout of `HashMap` is more cache-friendly, for
8242 significant improvements in some operations][36692]
8243 * [`HashMap` uses less memory on 32-bit architectures][36595]
8244 * [Impl `Add<{str, Cow<str>}>` for `Cow<str>`][36430]
8245
8246 Cargo
8247 -----
8248
8249 * [Expose rustc cfg values to build scripts][cargo/3243]
8250 * [Allow cargo to work with read-only `CARGO_HOME`][cargo/3259]
8251 * [Fix passing --features when testing multiple packages][cargo/3280]
8252 * [Use a single profile set per workspace][cargo/3249]
8253 * [Load `replace` sections from lock files][cargo/3220]
8254 * [Ignore `panic` configuration for test/bench profiles][cargo/3175]
8255
8256 Tooling
8257 -------
8258
8259 * [rustup is the recommended Rust installation method][1.14rustup]
8260 * This release includes host (rustc) builds for Linux on MIPS, PowerPC, and
8261 S390x. These are [tier 2] platforms and may have major defects. Follow the
8262 instructions on the website to install, or add the targets to an existing
8263 installation with `rustup target add`. The new target triples are:
8264 - `mips-unknown-linux-gnu`
8265 - `mipsel-unknown-linux-gnu`
8266 - `mips64-unknown-linux-gnuabi64`
8267 - `mips64el-unknown-linux-gnuabi64 `
8268 - `powerpc-unknown-linux-gnu`
8269 - `powerpc64-unknown-linux-gnu`
8270 - `powerpc64le-unknown-linux-gnu`
8271 - `s390x-unknown-linux-gnu `
8272 * This release includes target (std) builds for ARM Linux running MUSL
8273 libc. These are [tier 2] platforms and may have major defects. Add the
8274 following triples to an existing rustup installation with `rustup target add`:
8275 - `arm-unknown-linux-musleabi`
8276 - `arm-unknown-linux-musleabihf`
8277 - `armv7-unknown-linux-musleabihf`
8278 * This release includes [experimental support for WebAssembly][1.14wasm], via
8279 the `wasm32-unknown-emscripten` target. This target is known to have major
8280 defects. Please test, report, and fix.
8281 * rustup no longer installs documentation by default. Run `rustup
8282 component add rust-docs` to install.
8283 * [Fix line stepping in debugger][37310]
8284 * [Enable line number debuginfo in releases][37280]
8285
8286 Misc
8287 ----
8288
8289 * [Disable jemalloc on aarch64/powerpc/mips][37392]
8290 * [Add support for Fuchsia OS][37313]
8291 * [Detect local-rebuild by only MAJOR.MINOR version][37273]
8292
8293 Compatibility Notes
8294 -------------------
8295
8296 * [A number of forward-compatibility lints used by the compiler
8297 to gradually introduce language changes have been converted
8298 to deny by default][36894]:
8299 - ["use of inaccessible extern crate erroneously allowed"][36886]
8300 - ["type parameter default erroneously allowed in invalid location"][36887]
8301 - ["detects super or self keywords at the beginning of global path"][36888]
8302 - ["two overlapping inherent impls define an item with the same name
8303 were erroneously allowed"][36889]
8304 - ["floating-point constants cannot be used in patterns"][36890]
8305 - ["constants of struct or enum type can only be used in a pattern if
8306 the struct or enum has `#[derive(PartialEq, Eq)]`"][36891]
8307 - ["lifetimes or labels named `'_` were erroneously allowed"][36892]
8308 * [Prohibit patterns in trait methods without bodies][37378]
8309 * [The atomic `Ordering` enum may not be matched exhaustively][37351]
8310 * [Future-proofing `#[no_link]` breaks some obscure cases][37247]
8311 * [The `$crate` macro variable is accepted in fewer locations][37213]
8312 * [Impls specifying extra region requirements beyond the trait
8313 they implement are rejected][37167]
8314 * [Enums may not be unsized][37111]. Unsized enums are intended to
8315 work but never have. For now they are forbidden.
8316 * [Enforce the shadowing restrictions from RFC 1560 for today's macros][36767]
8317
8318 [tier 2]: https://forge.rust-lang.org/platform-support.html
8319 [1.14rustup]: https://internals.rust-lang.org/t/beta-testing-rustup-rs/3316/204
8320 [1.14wasm]: https://users.rust-lang.org/t/compiling-to-the-web-with-rust-and-emscripten/7627
8321 [36430]: https://github.com/rust-lang/rust/pull/36430
8322 [36595]: https://github.com/rust-lang/rust/pull/36595
8323 [36692]: https://github.com/rust-lang/rust/pull/36692
8324 [36767]: https://github.com/rust-lang/rust/pull/36767
8325 [36794]: https://github.com/rust-lang/rust/pull/36794
8326 [36798]: https://github.com/rust-lang/rust/pull/36798
8327 [36819]: https://github.com/rust-lang/rust/pull/36819
8328 [36822]: https://github.com/rust-lang/rust/pull/36822
8329 [36825]: https://github.com/rust-lang/rust/pull/36825
8330 [36843]: https://github.com/rust-lang/rust/pull/36843
8331 [36880]: https://github.com/rust-lang/rust/pull/36880
8332 [36886]: https://github.com/rust-lang/rust/issues/36886
8333 [36887]: https://github.com/rust-lang/rust/issues/36887
8334 [36888]: https://github.com/rust-lang/rust/issues/36888
8335 [36889]: https://github.com/rust-lang/rust/issues/36889
8336 [36890]: https://github.com/rust-lang/rust/issues/36890
8337 [36891]: https://github.com/rust-lang/rust/issues/36891
8338 [36892]: https://github.com/rust-lang/rust/issues/36892
8339 [36894]: https://github.com/rust-lang/rust/pull/36894
8340 [36917]: https://github.com/rust-lang/rust/pull/36917
8341 [36993]: https://github.com/rust-lang/rust/pull/36993
8342 [37037]: https://github.com/rust-lang/rust/pull/37037
8343 [37064]: https://github.com/rust-lang/rust/pull/37064
8344 [37094]: https://github.com/rust-lang/rust/pull/37094
8345 [37108]: https://github.com/rust-lang/rust/pull/37108
8346 [37111]: https://github.com/rust-lang/rust/pull/37111
8347 [37161]: https://github.com/rust-lang/rust/pull/37161
8348 [37162]: https://github.com/rust-lang/rust/pull/37162
8349 [37167]: https://github.com/rust-lang/rust/pull/37167
8350 [37178]: https://github.com/rust-lang/rust/pull/37178
8351 [37200]: https://github.com/rust-lang/rust/pull/37200
8352 [37213]: https://github.com/rust-lang/rust/pull/37213
8353 [37221]: https://github.com/rust-lang/rust/pull/37221
8354 [37224]: https://github.com/rust-lang/rust/pull/37224
8355 [37230]: https://github.com/rust-lang/rust/pull/37230
8356 [37231]: https://github.com/rust-lang/rust/pull/37231
8357 [37247]: https://github.com/rust-lang/rust/pull/37247
8358 [37267]: https://github.com/rust-lang/rust/pull/37267
8359 [37270]: https://github.com/rust-lang/rust/pull/37270
8360 [37273]: https://github.com/rust-lang/rust/pull/37273
8361 [37280]: https://github.com/rust-lang/rust/pull/37280
8362 [37298]: https://github.com/rust-lang/rust/pull/37298
8363 [37306]: https://github.com/rust-lang/rust/pull/37306
8364 [37310]: https://github.com/rust-lang/rust/pull/37310
8365 [37312]: https://github.com/rust-lang/rust/pull/37312
8366 [37313]: https://github.com/rust-lang/rust/pull/37313
8367 [37315]: https://github.com/rust-lang/rust/pull/37315
8368 [37318]: https://github.com/rust-lang/rust/pull/37318
8369 [37322]: https://github.com/rust-lang/rust/pull/37322
8370 [37326]: https://github.com/rust-lang/rust/pull/37326
8371 [37351]: https://github.com/rust-lang/rust/pull/37351
8372 [37356]: https://github.com/rust-lang/rust/pull/37356
8373 [37367]: https://github.com/rust-lang/rust/pull/37367
8374 [37373]: https://github.com/rust-lang/rust/pull/37373
8375 [37378]: https://github.com/rust-lang/rust/pull/37378
8376 [37389]: https://github.com/rust-lang/rust/pull/37389
8377 [37392]: https://github.com/rust-lang/rust/pull/37392
8378 [37427]: https://github.com/rust-lang/rust/pull/37427
8379 [37439]: https://github.com/rust-lang/rust/pull/37439
8380 [37445]: https://github.com/rust-lang/rust/pull/37445
8381 [37470]: https://github.com/rust-lang/rust/pull/37470
8382 [37569]: https://github.com/rust-lang/rust/pull/37569
8383 [RFC 1492]: https://github.com/rust-lang/rfcs/blob/master/text/1492-dotdot-in-patterns.md
8384 [cargo/3175]: https://github.com/rust-lang/cargo/pull/3175
8385 [cargo/3220]: https://github.com/rust-lang/cargo/pull/3220
8386 [cargo/3243]: https://github.com/rust-lang/cargo/pull/3243
8387 [cargo/3249]: https://github.com/rust-lang/cargo/pull/3249
8388 [cargo/3259]: https://github.com/rust-lang/cargo/pull/3259
8389 [cargo/3280]: https://github.com/rust-lang/cargo/pull/3280
8390
8391
8392 Version 1.13.0 (2016-11-10)
8393 ===========================
8394
8395 Language
8396 --------
8397
8398 * [Stabilize the `?` operator][36995]. `?` is a simple way to propagate
8399 errors, like the `try!` macro, described in [RFC 0243].
8400 * [Stabilize macros in type position][36014]. Described in [RFC 873].
8401 * [Stabilize attributes on statements][36995]. Described in [RFC 0016].
8402 * [Fix `#[derive]` for empty tuple structs/variants][35728]
8403 * [Fix lifetime rules for 'if' conditions][36029]
8404 * [Avoid loading and parsing unconfigured non-inline modules][36482]
8405
8406 Compiler
8407 --------
8408
8409 * [Add the `-C link-arg` argument][36574]
8410 * [Remove the old AST-based backend from rustc_trans][35764]
8411 * [Don't enable NEON by default on armv7 Linux][35814]
8412 * [Fix debug line number info for macro expansions][35238]
8413 * [Do not emit "class method" debuginfo for types that are not
8414 DICompositeType][36008]
8415 * [Warn about multiple conflicting #[repr] hints][34623]
8416 * [When sizing DST, don't double-count nested struct prefixes][36351]
8417 * [Default RUST_MIN_STACK to 16MiB for now][36505]
8418 * [Improve rlib metadata format][36551]. Reduces rlib size significantly.
8419 * [Reject macros with empty repetitions to avoid infinite loop][36721]
8420 * [Expand macros without recursing to avoid stack overflows][36214]
8421
8422 Diagnostics
8423 -----------
8424
8425 * [Replace macro backtraces with labeled local uses][35702]
8426 * [Improve error message for misplaced doc comments][33922]
8427 * [Buffer unix and lock windows to prevent message interleaving][35975]
8428 * [Update lifetime errors to specifically note temporaries][36171]
8429 * [Special case a few colors for Windows][36178]
8430 * [Suggest `use self` when such an import resolves][36289]
8431 * [Be more specific when type parameter shadows primitive type][36338]
8432 * Many minor improvements
8433
8434 Compile-time Optimizations
8435 --------------------------
8436
8437 * [Compute and cache HIR hashes at beginning][35854]
8438 * [Don't hash types in loan paths][36004]
8439 * [Cache projections in trans][35761]
8440 * [Optimize the parser's last token handling][36527]
8441 * [Only instantiate #[inline] functions in codegen units referencing
8442 them][36524]. This leads to big improvements in cases where crates export
8443 define many inline functions without using them directly.
8444 * [Lazily allocate TypedArena's first chunk][36592]
8445 * [Don't allocate during default HashSet creation][36734]
8446
8447 Stabilized APIs
8448 ---------------
8449
8450 * [`checked_abs`]
8451 * [`wrapping_abs`]
8452 * [`overflowing_abs`]
8453 * [`RefCell::try_borrow`]
8454 * [`RefCell::try_borrow_mut`]
8455
8456 Libraries
8457 ---------
8458
8459 * [Add `assert_ne!` and `debug_assert_ne!`][35074]
8460 * [Make `vec_deque::Drain`, `hash_map::Drain`, and `hash_set::Drain`
8461 covariant][35354]
8462 * [Implement `AsRef<[T]>` for `std::slice::Iter`][35559]
8463 * [Implement `Debug` for `std::vec::IntoIter`][35707]
8464 * [`CString`: avoid excessive growth just to 0-terminate][35871]
8465 * [Implement `CoerceUnsized` for `{Cell, RefCell, UnsafeCell}`][35627]
8466 * [Use arc4rand on FreeBSD][35884]
8467 * [memrchr: Correct aligned offset computation][35969]
8468 * [Improve Demangling of Rust Symbols][36059]
8469 * [Use monotonic time in condition variables][35048]
8470 * [Implement `Debug` for `std::path::{Components,Iter}`][36101]
8471 * [Implement conversion traits for `char`][35755]
8472 * [Fix illegal instruction caused by overflow in channel cloning][36104]
8473 * [Zero first byte of CString on drop][36264]
8474 * [Inherit overflow checks for sum and product][36372]
8475 * [Add missing Eq implementations][36423]
8476 * [Implement `Debug` for `DirEntry`][36631]
8477 * [When `getaddrinfo` returns `EAI_SYSTEM` retrieve actual error from
8478 `errno`][36754]
8479 * [`SipHasher`] is deprecated. Use [`DefaultHasher`].
8480 * [Implement more traits for `std::io::ErrorKind`][35911]
8481 * [Optimize BinaryHeap bounds checking][36072]
8482 * [Work around pointer aliasing issue in `Vec::extend_from_slice`,
8483 `extend_with_element`][36355]
8484 * [Fix overflow checking in unsigned pow()][34942]
8485
8486 Cargo
8487 -----
8488
8489 * This release includes security fixes to both curl and OpenSSL.
8490 * [Fix transitive doctests when panic=abort][cargo/3021]
8491 * [Add --all-features flag to cargo][cargo/3038]
8492 * [Reject path-based dependencies in `cargo package`][cargo/3060]
8493 * [Don't parse the home directory more than once][cargo/3078]
8494 * [Don't try to generate Cargo.lock on empty workspaces][cargo/3092]
8495 * [Update OpenSSL to 1.0.2j][cargo/3121]
8496 * [Add license and license_file to cargo metadata output][cargo/3110]
8497 * [Make crates-io registry URL optional in config; ignore all changes to
8498 source.crates-io][cargo/3089]
8499 * [Don't download dependencies from other platforms][cargo/3123]
8500 * [Build transitive dev-dependencies when needed][cargo/3125]
8501 * [Add support for per-target rustflags in .cargo/config][cargo/3157]
8502 * [Avoid updating registry when adding existing deps][cargo/3144]
8503 * [Warn about path overrides that won't work][cargo/3136]
8504 * [Use workspaces during `cargo install`][cargo/3146]
8505 * [Leak mspdbsrv.exe processes on Windows][cargo/3162]
8506 * [Add --message-format flag][cargo/3000]
8507 * [Pass target environment for rustdoc][cargo/3205]
8508 * [Use `CommandExt::exec` for `cargo run` on Unix][cargo/2818]
8509 * [Update curl and curl-sys][cargo/3241]
8510 * [Call rustdoc test with the correct cfg flags of a package][cargo/3242]
8511
8512 Tooling
8513 -------
8514
8515 * [rustdoc: Add the `--sysroot` argument][36586]
8516 * [rustdoc: Fix a couple of issues with the search results][35655]
8517 * [rustdoc: remove the `!` from macro URLs and titles][35234]
8518 * [gdb: Fix pretty-printing special-cased Rust types][35585]
8519 * [rustdoc: Filter more incorrect methods inherited through Deref][36266]
8520
8521 Misc
8522 ----
8523
8524 * [Remove unmaintained style guide][35124]
8525 * [Add s390x support][36369]
8526 * [Initial work at Haiku OS support][36727]
8527 * [Add mips-uclibc targets][35734]
8528 * [Crate-ify compiler-rt into compiler-builtins][35021]
8529 * [Add rustc version info (git hash + date) to dist tarball][36213]
8530 * Many documentation improvements
8531
8532 Compatibility Notes
8533 -------------------
8534
8535 * [`SipHasher`] is deprecated. Use [`DefaultHasher`].
8536 * [Deny (by default) transmuting from fn item types to pointer-sized
8537 types][34923]. Continuing the long transition to zero-sized fn items,
8538 per [RFC 401].
8539 * [Fix `#[derive]` for empty tuple structs/variants][35728].
8540 Part of [RFC 1506].
8541 * [Issue deprecation warnings for safe accesses to extern statics][36173]
8542 * [Fix lifetime rules for 'if' conditions][36029].
8543 * [Inherit overflow checks for sum and product][36372].
8544 * [Forbid user-defined macros named "macro_rules"][36730].
8545
8546 [33922]: https://github.com/rust-lang/rust/pull/33922
8547 [34623]: https://github.com/rust-lang/rust/pull/34623
8548 [34923]: https://github.com/rust-lang/rust/pull/34923
8549 [34942]: https://github.com/rust-lang/rust/pull/34942
8550 [35021]: https://github.com/rust-lang/rust/pull/35021
8551 [35048]: https://github.com/rust-lang/rust/pull/35048
8552 [35074]: https://github.com/rust-lang/rust/pull/35074
8553 [35124]: https://github.com/rust-lang/rust/pull/35124
8554 [35234]: https://github.com/rust-lang/rust/pull/35234
8555 [35238]: https://github.com/rust-lang/rust/pull/35238
8556 [35354]: https://github.com/rust-lang/rust/pull/35354
8557 [35559]: https://github.com/rust-lang/rust/pull/35559
8558 [35585]: https://github.com/rust-lang/rust/pull/35585
8559 [35627]: https://github.com/rust-lang/rust/pull/35627
8560 [35655]: https://github.com/rust-lang/rust/pull/35655
8561 [35702]: https://github.com/rust-lang/rust/pull/35702
8562 [35707]: https://github.com/rust-lang/rust/pull/35707
8563 [35728]: https://github.com/rust-lang/rust/pull/35728
8564 [35734]: https://github.com/rust-lang/rust/pull/35734
8565 [35755]: https://github.com/rust-lang/rust/pull/35755
8566 [35761]: https://github.com/rust-lang/rust/pull/35761
8567 [35764]: https://github.com/rust-lang/rust/pull/35764
8568 [35814]: https://github.com/rust-lang/rust/pull/35814
8569 [35854]: https://github.com/rust-lang/rust/pull/35854
8570 [35871]: https://github.com/rust-lang/rust/pull/35871
8571 [35884]: https://github.com/rust-lang/rust/pull/35884
8572 [35911]: https://github.com/rust-lang/rust/pull/35911
8573 [35969]: https://github.com/rust-lang/rust/pull/35969
8574 [35975]: https://github.com/rust-lang/rust/pull/35975
8575 [36004]: https://github.com/rust-lang/rust/pull/36004
8576 [36008]: https://github.com/rust-lang/rust/pull/36008
8577 [36014]: https://github.com/rust-lang/rust/pull/36014
8578 [36029]: https://github.com/rust-lang/rust/pull/36029
8579 [36059]: https://github.com/rust-lang/rust/pull/36059
8580 [36072]: https://github.com/rust-lang/rust/pull/36072
8581 [36101]: https://github.com/rust-lang/rust/pull/36101
8582 [36104]: https://github.com/rust-lang/rust/pull/36104
8583 [36171]: https://github.com/rust-lang/rust/pull/36171
8584 [36173]: https://github.com/rust-lang/rust/pull/36173
8585 [36178]: https://github.com/rust-lang/rust/pull/36178
8586 [36213]: https://github.com/rust-lang/rust/pull/36213
8587 [36214]: https://github.com/rust-lang/rust/pull/36214
8588 [36264]: https://github.com/rust-lang/rust/pull/36264
8589 [36266]: https://github.com/rust-lang/rust/pull/36266
8590 [36289]: https://github.com/rust-lang/rust/pull/36289
8591 [36338]: https://github.com/rust-lang/rust/pull/36338
8592 [36351]: https://github.com/rust-lang/rust/pull/36351
8593 [36355]: https://github.com/rust-lang/rust/pull/36355
8594 [36369]: https://github.com/rust-lang/rust/pull/36369
8595 [36372]: https://github.com/rust-lang/rust/pull/36372
8596 [36423]: https://github.com/rust-lang/rust/pull/36423
8597 [36482]: https://github.com/rust-lang/rust/pull/36482
8598 [36505]: https://github.com/rust-lang/rust/pull/36505
8599 [36524]: https://github.com/rust-lang/rust/pull/36524
8600 [36527]: https://github.com/rust-lang/rust/pull/36527
8601 [36551]: https://github.com/rust-lang/rust/pull/36551
8602 [36574]: https://github.com/rust-lang/rust/pull/36574
8603 [36586]: https://github.com/rust-lang/rust/pull/36586
8604 [36592]: https://github.com/rust-lang/rust/pull/36592
8605 [36631]: https://github.com/rust-lang/rust/pull/36631
8606 [36721]: https://github.com/rust-lang/rust/pull/36721
8607 [36727]: https://github.com/rust-lang/rust/pull/36727
8608 [36730]: https://github.com/rust-lang/rust/pull/36730
8609 [36734]: https://github.com/rust-lang/rust/pull/36734
8610 [36754]: https://github.com/rust-lang/rust/pull/36754
8611 [36995]: https://github.com/rust-lang/rust/pull/36995
8612 [RFC 0016]: https://github.com/rust-lang/rfcs/blob/master/text/0016-more-attributes.md
8613 [RFC 0243]: https://github.com/rust-lang/rfcs/blob/master/text/0243-trait-based-exception-handling.md
8614 [RFC 1506]: https://github.com/rust-lang/rfcs/blob/master/text/1506-adt-kinds.md
8615 [RFC 401]: https://github.com/rust-lang/rfcs/blob/master/text/0401-coercions.md
8616 [RFC 873]: https://github.com/rust-lang/rfcs/blob/master/text/0873-type-macros.md
8617 [cargo/2818]: https://github.com/rust-lang/cargo/pull/2818
8618 [cargo/3000]: https://github.com/rust-lang/cargo/pull/3000
8619 [cargo/3021]: https://github.com/rust-lang/cargo/pull/3021
8620 [cargo/3038]: https://github.com/rust-lang/cargo/pull/3038
8621 [cargo/3060]: https://github.com/rust-lang/cargo/pull/3060
8622 [cargo/3078]: https://github.com/rust-lang/cargo/pull/3078
8623 [cargo/3089]: https://github.com/rust-lang/cargo/pull/3089
8624 [cargo/3092]: https://github.com/rust-lang/cargo/pull/3092
8625 [cargo/3110]: https://github.com/rust-lang/cargo/pull/3110
8626 [cargo/3121]: https://github.com/rust-lang/cargo/pull/3121
8627 [cargo/3123]: https://github.com/rust-lang/cargo/pull/3123
8628 [cargo/3125]: https://github.com/rust-lang/cargo/pull/3125
8629 [cargo/3136]: https://github.com/rust-lang/cargo/pull/3136
8630 [cargo/3144]: https://github.com/rust-lang/cargo/pull/3144
8631 [cargo/3146]: https://github.com/rust-lang/cargo/pull/3146
8632 [cargo/3157]: https://github.com/rust-lang/cargo/pull/3157
8633 [cargo/3162]: https://github.com/rust-lang/cargo/pull/3162
8634 [cargo/3205]: https://github.com/rust-lang/cargo/pull/3205
8635 [cargo/3241]: https://github.com/rust-lang/cargo/pull/3241
8636 [cargo/3242]: https://github.com/rust-lang/cargo/pull/3242
8637 [`checked_abs`]: https://doc.rust-lang.org/std/primitive.i32.html#method.checked_abs
8638 [`wrapping_abs`]: https://doc.rust-lang.org/std/primitive.i32.html#method.wrapping_abs
8639 [`overflowing_abs`]: https://doc.rust-lang.org/std/primitive.i32.html#method.overflowing_abs
8640 [`RefCell::try_borrow`]: https://doc.rust-lang.org/std/cell/struct.RefCell.html#method.try_borrow
8641 [`RefCell::try_borrow_mut`]: https://doc.rust-lang.org/std/cell/struct.RefCell.html#method.try_borrow_mut
8642 [`SipHasher`]: https://doc.rust-lang.org/std/hash/struct.SipHasher.html
8643 [`DefaultHasher`]: https://doc.rust-lang.org/std/collections/hash_map/struct.DefaultHasher.html
8644
8645
8646 Version 1.12.1 (2016-10-20)
8647 ===========================
8648
8649 Regression Fixes
8650 ----------------
8651
8652 * [ICE: 'rustc' panicked at 'assertion failed: concrete_substs.is_normalized_for_trans()' #36381][36381]
8653 * [Confusion with double negation and booleans][36856]
8654 * [rustc 1.12.0 fails with SIGSEGV in release mode (syn crate 0.8.0)][36875]
8655 * [Rustc 1.12.0 Windows build of `ethcore` crate fails with LLVM error][36924]
8656 * [1.12.0: High memory usage when linking in release mode with debug info][36926]
8657 * [Corrupted memory after updated to 1.12][36936]
8658 * ["Let NullaryConstructor = something;" causes internal compiler error: "tried to overwrite interned AdtDef"][37026]
8659 * [Fix ICE: inject bitcast if types mismatch for invokes/calls/stores][37112]
8660 * [debuginfo: Handle spread_arg case in MIR-trans in a more stable way.][37153]
8661
8662 [36381]: https://github.com/rust-lang/rust/issues/36381
8663 [36856]: https://github.com/rust-lang/rust/issues/36856
8664 [36875]: https://github.com/rust-lang/rust/issues/36875
8665 [36924]: https://github.com/rust-lang/rust/issues/36924
8666 [36926]: https://github.com/rust-lang/rust/issues/36926
8667 [36936]: https://github.com/rust-lang/rust/issues/36936
8668 [37026]: https://github.com/rust-lang/rust/issues/37026
8669 [37112]: https://github.com/rust-lang/rust/issues/37112
8670 [37153]: https://github.com/rust-lang/rust/issues/37153
8671
8672
8673 Version 1.12.0 (2016-09-29)
8674 ===========================
8675
8676 Highlights
8677 ----------
8678
8679 * [`rustc` translates code to LLVM IR via its own "middle" IR (MIR)](https://github.com/rust-lang/rust/pull/34096).
8680 This translation pass is far simpler than the previous AST->LLVM pass, and
8681 creates opportunities to perform new optimizations directly on the MIR. It
8682 was previously described [on the Rust blog](https://blog.rust-lang.org/2016/04/19/MIR.html).
8683 * [`rustc` presents a new, more readable error format, along with
8684 machine-readable JSON error output for use by IDEs](https://github.com/rust-lang/rust/pull/35401).
8685 Most common editors supporting Rust have been updated to work with it. It was
8686 previously described [on the Rust blog](https://blog.rust-lang.org/2016/08/10/Shape-of-errors-to-come.html).
8687
8688 Compiler
8689 --------
8690
8691 * [`rustc` translates code to LLVM IR via its own "middle" IR (MIR)](https://github.com/rust-lang/rust/pull/34096).
8692 This translation pass is far simpler than the previous AST->LLVM pass, and
8693 creates opportunities to perform new optimizations directly on the MIR. It
8694 was previously described [on the Rust blog](https://blog.rust-lang.org/2016/04/19/MIR.html).
8695 * [Print the Rust target name, not the LLVM target name, with
8696 `--print target-list`](https://github.com/rust-lang/rust/pull/35489)
8697 * [The computation of `TypeId` is correct in some cases where it was previously
8698 producing inconsistent results](https://github.com/rust-lang/rust/pull/35267)
8699 * [The `mips-unknown-linux-gnu` target uses hardware floating point by default](https://github.com/rust-lang/rust/pull/34910)
8700 * [The `rustc` arguments, `--print target-cpus`, `--print target-features`,
8701 `--print relocation-models`, and `--print code-models` print the available
8702 options to the `-C target-cpu`, `-C target-feature`, `-C relocation-model` and
8703 `-C code-model` code generation arguments](https://github.com/rust-lang/rust/pull/34845)
8704 * [`rustc` supports three new MUSL targets on ARM: `arm-unknown-linux-musleabi`,
8705 `arm-unknown-linux-musleabihf`, and `armv7-unknown-linux-musleabihf`](https://github.com/rust-lang/rust/pull/35060).
8706 These targets produce statically-linked binaries. There are no binary release
8707 builds yet though.
8708
8709 Diagnostics
8710 -----------
8711
8712 * [`rustc` presents a new, more readable error format, along with
8713 machine-readable JSON error output for use by IDEs](https://github.com/rust-lang/rust/pull/35401).
8714 Most common editors supporting Rust have been updated to work with it. It was
8715 previously described [on the Rust blog](https://blog.rust-lang.org/2016/08/10/Shape-of-errors-to-come.html).
8716 * [In error descriptions, references are now described in plain English,
8717 instead of as "&-ptr"](https://github.com/rust-lang/rust/pull/35611)
8718 * [In error type descriptions, unknown numeric types are named `{integer}` or
8719 `{float}` instead of `_`](https://github.com/rust-lang/rust/pull/35080)
8720 * [`rustc` emits a clearer error when inner attributes follow a doc comment](https://github.com/rust-lang/rust/pull/34676)
8721
8722 Language
8723 --------
8724
8725 * [`macro_rules!` invocations can be made within `macro_rules!` invocations](https://github.com/rust-lang/rust/pull/34925)
8726 * [`macro_rules!` meta-variables are hygienic](https://github.com/rust-lang/rust/pull/35453)
8727 * [`macro_rules!` `tt` matchers can be reparsed correctly, making them much more
8728 useful](https://github.com/rust-lang/rust/pull/34908)
8729 * [`macro_rules!` `stmt` matchers correctly consume the entire contents when
8730 inside non-braces invocations](https://github.com/rust-lang/rust/pull/34886)
8731 * [Semicolons are properly required as statement delimiters inside
8732 `macro_rules!` invocations](https://github.com/rust-lang/rust/pull/34660)
8733 * [`cfg_attr` works on `path` attributes](https://github.com/rust-lang/rust/pull/34546)
8734
8735 Stabilized APIs
8736 ---------------
8737
8738 * [`Cell::as_ptr`](https://doc.rust-lang.org/std/cell/struct.Cell.html#method.as_ptr)
8739 * [`RefCell::as_ptr`](https://doc.rust-lang.org/std/cell/struct.RefCell.html#method.as_ptr)
8740 * [`IpAddr::is_unspecified`](https://doc.rust-lang.org/std/net/enum.IpAddr.html#method.is_unspecified)
8741 * [`IpAddr::is_loopback`](https://doc.rust-lang.org/std/net/enum.IpAddr.html#method.is_loopback)
8742 * [`IpAddr::is_multicast`](https://doc.rust-lang.org/std/net/enum.IpAddr.html#method.is_multicast)
8743 * [`Ipv4Addr::is_unspecified`](https://doc.rust-lang.org/std/net/struct.Ipv4Addr.html#method.is_unspecified)
8744 * [`Ipv6Addr::octets`](https://doc.rust-lang.org/std/net/struct.Ipv6Addr.html#method.octets)
8745 * [`LinkedList::contains`](https://doc.rust-lang.org/std/collections/linked_list/struct.LinkedList.html#method.contains)
8746 * [`VecDeque::contains`](https://doc.rust-lang.org/std/collections/vec_deque/struct.VecDeque.html#method.contains)
8747 * [`ExitStatusExt::from_raw`](https://doc.rust-lang.org/std/os/unix/process/trait.ExitStatusExt.html#tymethod.from_raw).
8748 Both on Unix and Windows.
8749 * [`Receiver::recv_timeout`](https://doc.rust-lang.org/std/sync/mpsc/struct.Receiver.html#method.recv_timeout)
8750 * [`RecvTimeoutError`](https://doc.rust-lang.org/std/sync/mpsc/enum.RecvTimeoutError.html)
8751 * [`BinaryHeap::peek_mut`](https://doc.rust-lang.org/std/collections/binary_heap/struct.BinaryHeap.html#method.peek_mut)
8752 * [`PeekMut`](https://doc.rust-lang.org/std/collections/binary_heap/struct.PeekMut.html)
8753 * [`iter::Product`](https://doc.rust-lang.org/std/iter/trait.Product.html)
8754 * [`iter::Sum`](https://doc.rust-lang.org/std/iter/trait.Sum.html)
8755 * [`OccupiedEntry::remove_entry`](https://doc.rust-lang.org/std/collections/btree_map/struct.OccupiedEntry.html#method.remove_entry)
8756 * [`VacantEntry::into_key`](https://doc.rust-lang.org/std/collections/btree_map/struct.VacantEntry.html#method.into_key)
8757
8758 Libraries
8759 ---------
8760
8761 * [The `format!` macro and friends now allow a single argument to be formatted
8762 in multiple styles](https://github.com/rust-lang/rust/pull/33642)
8763 * [The lifetime bounds on `[T]::binary_search_by` and
8764 `[T]::binary_search_by_key` have been adjusted to be more flexible](https://github.com/rust-lang/rust/pull/34762)
8765 * [`Option` implements `From` for its contained type](https://github.com/rust-lang/rust/pull/34828)
8766 * [`Cell`, `RefCell` and `UnsafeCell` implement `From` for their contained type](https://github.com/rust-lang/rust/pull/35392)
8767 * [`RwLock` panics if the reader count overflows](https://github.com/rust-lang/rust/pull/35378)
8768 * [`vec_deque::Drain`, `hash_map::Drain` and `hash_set::Drain` are covariant](https://github.com/rust-lang/rust/pull/35354)
8769 * [`vec::Drain` and `binary_heap::Drain` are covariant](https://github.com/rust-lang/rust/pull/34951)
8770 * [`Cow<str>` implements `FromIterator` for `char`, `&str` and `String`](https://github.com/rust-lang/rust/pull/35064)
8771 * [Sockets on Linux are correctly closed in subprocesses via `SOCK_CLOEXEC`](https://github.com/rust-lang/rust/pull/34946)
8772 * [`hash_map::Entry`, `hash_map::VacantEntry` and `hash_map::OccupiedEntry`
8773 implement `Debug`](https://github.com/rust-lang/rust/pull/34937)
8774 * [`btree_map::Entry`, `btree_map::VacantEntry` and `btree_map::OccupiedEntry`
8775 implement `Debug`](https://github.com/rust-lang/rust/pull/34885)
8776 * [`String` implements `AddAssign`](https://github.com/rust-lang/rust/pull/34890)
8777 * [Variadic `extern fn` pointers implement the `Clone`, `PartialEq`, `Eq`,
8778 `PartialOrd`, `Ord`, `Hash`, `fmt::Pointer`, and `fmt::Debug` traits](https://github.com/rust-lang/rust/pull/34879)
8779 * [`FileType` implements `Debug`](https://github.com/rust-lang/rust/pull/34757)
8780 * [References to `Mutex` and `RwLock` are unwind-safe](https://github.com/rust-lang/rust/pull/34756)
8781 * [`mpsc::sync_channel` `Receiver`s return any available message before
8782 reporting a disconnect](https://github.com/rust-lang/rust/pull/34731)
8783 * [Unicode definitions have been updated to 9.0](https://github.com/rust-lang/rust/pull/34599)
8784 * [`env` iterators implement `DoubleEndedIterator`](https://github.com/rust-lang/rust/pull/33312)
8785
8786 Cargo
8787 -----
8788
8789 * [Support local mirrors of registries](https://github.com/rust-lang/cargo/pull/2857)
8790 * [Add support for command aliases](https://github.com/rust-lang/cargo/pull/2679)
8791 * [Allow `opt-level="s"` / `opt-level="z"` in profile overrides](https://github.com/rust-lang/cargo/pull/3007)
8792 * [Make `cargo doc --open --target` work as expected](https://github.com/rust-lang/cargo/pull/2988)
8793 * [Speed up noop registry updates](https://github.com/rust-lang/cargo/pull/2974)
8794 * [Update OpenSSL](https://github.com/rust-lang/cargo/pull/2971)
8795 * [Fix `--panic=abort` with plugins](https://github.com/rust-lang/cargo/pull/2954)
8796 * [Always pass `-C metadata` to the compiler](https://github.com/rust-lang/cargo/pull/2946)
8797 * [Fix depending on git repos with workspaces](https://github.com/rust-lang/cargo/pull/2938)
8798 * [Add a `--lib` flag to `cargo new`](https://github.com/rust-lang/cargo/pull/2921)
8799 * [Add `http.cainfo` for custom certs](https://github.com/rust-lang/cargo/pull/2917)
8800 * [Indicate the compilation profile after compiling](https://github.com/rust-lang/cargo/pull/2909)
8801 * [Allow enabling features for dependencies with `--features`](https://github.com/rust-lang/cargo/pull/2876)
8802 * [Add `--jobs` flag to `cargo package`](https://github.com/rust-lang/cargo/pull/2867)
8803 * [Add `--dry-run` to `cargo publish`](https://github.com/rust-lang/cargo/pull/2849)
8804 * [Add support for `RUSTDOCFLAGS`](https://github.com/rust-lang/cargo/pull/2794)
8805
8806 Performance
8807 -----------
8808
8809 * [`panic::catch_unwind` is more optimized](https://github.com/rust-lang/rust/pull/35444)
8810 * [`panic::catch_unwind` no longer accesses thread-local storage on entry](https://github.com/rust-lang/rust/pull/34866)
8811
8812 Tooling
8813 -------
8814
8815 * [Test binaries now support a `--test-threads` argument to specify the number
8816 of threads used to run tests, and which acts the same as the
8817 `RUST_TEST_THREADS` environment variable](https://github.com/rust-lang/rust/pull/35414)
8818 * [The test runner now emits a warning when tests run over 60 seconds](https://github.com/rust-lang/rust/pull/35405)
8819 * [rustdoc: Fix methods in search results](https://github.com/rust-lang/rust/pull/34752)
8820 * [`rust-lldb` warns about unsupported versions of LLDB](https://github.com/rust-lang/rust/pull/34646)
8821 * [Rust releases now come with source packages that can be installed by rustup
8822 via `rustup component add rust-src`](https://github.com/rust-lang/rust/pull/34366).
8823 The resulting source code can be used by tools and IDES, located in the
8824 sysroot under `lib/rustlib/src`.
8825
8826 Misc
8827 ----
8828
8829 * [The compiler can now be built against LLVM 3.9](https://github.com/rust-lang/rust/pull/35594)
8830 * Many minor improvements to the documentation.
8831 * [The Rust exception handling "personality" routine is now written in Rust](https://github.com/rust-lang/rust/pull/34832)
8832
8833 Compatibility Notes
8834 -------------------
8835
8836 * [When printing Windows `OsStr`s, unpaired surrogate codepoints are escaped
8837 with the lowercase format instead of the uppercase](https://github.com/rust-lang/rust/pull/35084)
8838 * [When formatting strings, if "precision" is specified, the "fill",
8839 "align" and "width" specifiers are no longer ignored](https://github.com/rust-lang/rust/pull/34544)
8840 * [The `Debug` impl for strings no longer escapes all non-ASCII characters](https://github.com/rust-lang/rust/pull/34485)
8841
8842
8843 Version 1.11.0 (2016-08-18)
8844 ===========================
8845
8846 Language
8847 --------
8848
8849 * [Support nested `cfg_attr` attributes](https://github.com/rust-lang/rust/pull/34216)
8850 * [Allow statement-generating braced macro invocations at the end of blocks](https://github.com/rust-lang/rust/pull/34436)
8851 * [Macros can be expanded inside of trait definitions](https://github.com/rust-lang/rust/pull/34213)
8852 * [`#[macro_use]` works properly when it is itself expanded from a macro](https://github.com/rust-lang/rust/pull/34032)
8853
8854 Stabilized APIs
8855 ---------------
8856
8857 * [`BinaryHeap::append`](https://doc.rust-lang.org/std/collections/binary_heap/struct.BinaryHeap.html#method.append)
8858 * [`BTreeMap::append`](https://doc.rust-lang.org/std/collections/btree_map/struct.BTreeMap.html#method.append)
8859 * [`BTreeMap::split_off`](https://doc.rust-lang.org/std/collections/btree_map/struct.BTreeMap.html#method.split_off)
8860 * [`BTreeSet::append`](https://doc.rust-lang.org/std/collections/btree_set/struct.BTreeSet.html#method.append)
8861 * [`BTreeSet::split_off`](https://doc.rust-lang.org/std/collections/btree_set/struct.BTreeSet.html#method.split_off)
8862 * [`f32::to_degrees`](https://doc.rust-lang.org/std/primitive.f32.html#method.to_degrees)
8863 (in libcore - previously stabilized in libstd)
8864 * [`f32::to_radians`](https://doc.rust-lang.org/std/primitive.f32.html#method.to_radians)
8865 (in libcore - previously stabilized in libstd)
8866 * [`f64::to_degrees`](https://doc.rust-lang.org/std/primitive.f64.html#method.to_degrees)
8867 (in libcore - previously stabilized in libstd)
8868 * [`f64::to_radians`](https://doc.rust-lang.org/std/primitive.f64.html#method.to_radians)
8869 (in libcore - previously stabilized in libstd)
8870 * [`Iterator::sum`](https://doc.rust-lang.org/std/iter/trait.Iterator.html#method.sum)
8871 * [`Iterator::product`](https://doc.rust-lang.org/std/iter/trait.Iterator.html#method.sum)
8872 * [`Cell::get_mut`](https://doc.rust-lang.org/std/cell/struct.Cell.html#method.get_mut)
8873 * [`RefCell::get_mut`](https://doc.rust-lang.org/std/cell/struct.RefCell.html#method.get_mut)
8874
8875 Libraries
8876 ---------
8877
8878 * [The `thread_local!` macro supports multiple definitions in a single
8879 invocation, and can apply attributes](https://github.com/rust-lang/rust/pull/34077)
8880 * [`Cow` implements `Default`](https://github.com/rust-lang/rust/pull/34305)
8881 * [`Wrapping` implements binary, octal, lower-hex and upper-hex
8882 `Display` formatting](https://github.com/rust-lang/rust/pull/34190)
8883 * [The range types implement `Hash`](https://github.com/rust-lang/rust/pull/34180)
8884 * [`lookup_host` ignores unknown address types](https://github.com/rust-lang/rust/pull/34067)
8885 * [`assert_eq!` accepts a custom error message, like `assert!` does](https://github.com/rust-lang/rust/pull/33976)
8886 * [The main thread is now called "main" instead of "&lt;main&gt;"](https://github.com/rust-lang/rust/pull/33803)
8887
8888 Cargo
8889 -----
8890
8891 * [Disallow specifying features of transitive deps](https://github.com/rust-lang/cargo/pull/2821)
8892 * [Add color support for Windows consoles](https://github.com/rust-lang/cargo/pull/2804)
8893 * [Fix `harness = false` on `[lib]` sections](https://github.com/rust-lang/cargo/pull/2795)
8894 * [Don't panic when `links` contains a '.'](https://github.com/rust-lang/cargo/pull/2787)
8895 * [Build scripts can emit warnings](https://github.com/rust-lang/cargo/pull/2630),
8896 and `-vv` prints warnings for all crates.
8897 * [Ignore file locks on OS X NFS mounts](https://github.com/rust-lang/cargo/pull/2720)
8898 * [Don't warn about `package.metadata` keys](https://github.com/rust-lang/cargo/pull/2668).
8899 This provides room for expansion by arbitrary tools.
8900 * [Add support for cdylib crate types](https://github.com/rust-lang/cargo/pull/2741)
8901 * [Prevent publishing crates when files are dirty](https://github.com/rust-lang/cargo/pull/2781)
8902 * [Don't fetch all crates on clean](https://github.com/rust-lang/cargo/pull/2704)
8903 * [Propagate --color option to rustc](https://github.com/rust-lang/cargo/pull/2779)
8904 * [Fix `cargo doc --open` on Windows](https://github.com/rust-lang/cargo/pull/2780)
8905 * [Improve autocompletion](https://github.com/rust-lang/cargo/pull/2772)
8906 * [Configure colors of stderr as well as stdout](https://github.com/rust-lang/cargo/pull/2739)
8907
8908 Performance
8909 -----------
8910
8911 * [Caching projections speeds up type check dramatically for some
8912 workloads](https://github.com/rust-lang/rust/pull/33816)
8913 * [The default `HashMap` hasher is SipHash 1-3 instead of SipHash 2-4](https://github.com/rust-lang/rust/pull/33940)
8914 This hasher is faster, but is believed to provide sufficient
8915 protection from collision attacks.
8916 * [Comparison of `Ipv4Addr` is 10x faster](https://github.com/rust-lang/rust/pull/33891)
8917
8918 Rustdoc
8919 -------
8920
8921 * [Fix empty implementation section on some module pages](https://github.com/rust-lang/rust/pull/34536)
8922 * [Fix inlined renamed re-exports in import lists](https://github.com/rust-lang/rust/pull/34479)
8923 * [Fix search result layout for enum variants and struct fields](https://github.com/rust-lang/rust/pull/34477)
8924 * [Fix issues with source links to external crates](https://github.com/rust-lang/rust/pull/34387)
8925 * [Fix redirect pages for renamed re-exports](https://github.com/rust-lang/rust/pull/34245)
8926
8927 Tooling
8928 -------
8929
8930 * [rustc is better at finding the MSVC toolchain](https://github.com/rust-lang/rust/pull/34492)
8931 * [When emitting debug info, rustc emits frame pointers for closures,
8932 shims and glue, as it does for all other functions](https://github.com/rust-lang/rust/pull/33909)
8933 * [rust-lldb warns about unsupported versions of LLDB](https://github.com/rust-lang/rust/pull/34646)
8934 * Many more errors have been given error codes and extended
8935 explanations
8936 * API documentation continues to be improved, with many new examples
8937
8938 Misc
8939 ----
8940
8941 * [rustc no longer hangs when dependencies recursively re-export
8942 submodules](https://github.com/rust-lang/rust/pull/34542)
8943 * [rustc requires LLVM 3.7+](https://github.com/rust-lang/rust/pull/34104)
8944 * [The 'How Safe and Unsafe Interact' chapter of The Rustonomicon was
8945 rewritten](https://github.com/rust-lang/rust/pull/33895)
8946 * [rustc support 16-bit pointer sizes](https://github.com/rust-lang/rust/pull/33460).
8947 No targets use this yet, but it works toward AVR support.
8948
8949 Compatibility Notes
8950 -------------------
8951
8952 * [`const`s and `static`s may not have unsized types](https://github.com/rust-lang/rust/pull/34443)
8953 * [The new follow-set rules that place restrictions on `macro_rules!`
8954 in order to ensure syntax forward-compatibility have been enabled](https://github.com/rust-lang/rust/pull/33982)
8955 This was an [amendment to RFC 550](https://github.com/rust-lang/rfcs/pull/1384),
8956 and has been a warning since 1.10.
8957 * [`cfg` attribute process has been refactored to fix various bugs](https://github.com/rust-lang/rust/pull/33706).
8958 This causes breakage in some corner cases.
8959
8960
8961 Version 1.10.0 (2016-07-07)
8962 ===========================
8963
8964 Language
8965 --------
8966
8967 * [`Copy` types are required to have a trivial implementation of `Clone`](https://github.com/rust-lang/rust/pull/33420).
8968 [RFC 1521](https://github.com/rust-lang/rfcs/blob/master/text/1521-copy-clone-semantics.md).
8969 * [Single-variant enums support the `#[repr(..)]` attribute](https://github.com/rust-lang/rust/pull/33355).
8970 * [Fix `#[derive(RustcEncodable)]` in the presence of other `encode` methods](https://github.com/rust-lang/rust/pull/32908).
8971 * [`panic!` can be converted to a runtime abort with the
8972 `-C panic=abort` flag](https://github.com/rust-lang/rust/pull/32900).
8973 [RFC 1513](https://github.com/rust-lang/rfcs/blob/master/text/1513-less-unwinding.md).
8974 * [Add a new crate type, 'cdylib'](https://github.com/rust-lang/rust/pull/33553).
8975 cdylibs are dynamic libraries suitable for loading by non-Rust hosts.
8976 [RFC 1510](https://github.com/rust-lang/rfcs/blob/master/text/1510-cdylib.md).
8977 Note that Cargo does not yet directly support cdylibs.
8978
8979 Stabilized APIs
8980 ---------------
8981
8982 * `os::windows::fs::OpenOptionsExt::access_mode`
8983 * `os::windows::fs::OpenOptionsExt::share_mode`
8984 * `os::windows::fs::OpenOptionsExt::custom_flags`
8985 * `os::windows::fs::OpenOptionsExt::attributes`
8986 * `os::windows::fs::OpenOptionsExt::security_qos_flags`
8987 * `os::unix::fs::OpenOptionsExt::custom_flags`
8988 * [`sync::Weak::new`](http://doc.rust-lang.org/alloc/arc/struct.Weak.html#method.new)
8989 * `Default for sync::Weak`
8990 * [`panic::set_hook`](http://doc.rust-lang.org/std/panic/fn.set_hook.html)
8991 * [`panic::take_hook`](http://doc.rust-lang.org/std/panic/fn.take_hook.html)
8992 * [`panic::PanicInfo`](http://doc.rust-lang.org/std/panic/struct.PanicInfo.html)
8993 * [`panic::PanicInfo::payload`](http://doc.rust-lang.org/std/panic/struct.PanicInfo.html#method.payload)
8994 * [`panic::PanicInfo::location`](http://doc.rust-lang.org/std/panic/struct.PanicInfo.html#method.location)
8995 * [`panic::Location`](http://doc.rust-lang.org/std/panic/struct.Location.html)
8996 * [`panic::Location::file`](http://doc.rust-lang.org/std/panic/struct.Location.html#method.file)
8997 * [`panic::Location::line`](http://doc.rust-lang.org/std/panic/struct.Location.html#method.line)
8998 * [`ffi::CStr::from_bytes_with_nul`](http://doc.rust-lang.org/std/ffi/struct.CStr.html#method.from_bytes_with_nul)
8999 * [`ffi::CStr::from_bytes_with_nul_unchecked`](http://doc.rust-lang.org/std/ffi/struct.CStr.html#method.from_bytes_with_nul_unchecked)
9000 * [`ffi::FromBytesWithNulError`](http://doc.rust-lang.org/std/ffi/struct.FromBytesWithNulError.html)
9001 * [`fs::Metadata::modified`](http://doc.rust-lang.org/std/fs/struct.Metadata.html#method.modified)
9002 * [`fs::Metadata::accessed`](http://doc.rust-lang.org/std/fs/struct.Metadata.html#method.accessed)
9003 * [`fs::Metadata::created`](http://doc.rust-lang.org/std/fs/struct.Metadata.html#method.created)
9004 * `sync::atomic::Atomic{Usize,Isize,Bool,Ptr}::compare_exchange`
9005 * `sync::atomic::Atomic{Usize,Isize,Bool,Ptr}::compare_exchange_weak`
9006 * `collections::{btree,hash}_map::{Occupied,Vacant,}Entry::key`
9007 * `os::unix::net::{UnixStream, UnixListener, UnixDatagram, SocketAddr}`
9008 * [`SocketAddr::is_unnamed`](http://doc.rust-lang.org/std/os/unix/net/struct.SocketAddr.html#method.is_unnamed)
9009 * [`SocketAddr::as_pathname`](http://doc.rust-lang.org/std/os/unix/net/struct.SocketAddr.html#method.as_pathname)
9010 * [`UnixStream::connect`](http://doc.rust-lang.org/std/os/unix/net/struct.UnixStream.html#method.connect)
9011 * [`UnixStream::pair`](http://doc.rust-lang.org/std/os/unix/net/struct.UnixStream.html#method.pair)
9012 * [`UnixStream::try_clone`](http://doc.rust-lang.org/std/os/unix/net/struct.UnixStream.html#method.try_clone)
9013 * [`UnixStream::local_addr`](http://doc.rust-lang.org/std/os/unix/net/struct.UnixStream.html#method.local_addr)
9014 * [`UnixStream::peer_addr`](http://doc.rust-lang.org/std/os/unix/net/struct.UnixStream.html#method.peer_addr)
9015 * [`UnixStream::set_read_timeout`](http://doc.rust-lang.org/std/os/unix/net/struct.UnixStream.html#method.read_timeout)
9016 * [`UnixStream::set_write_timeout`](http://doc.rust-lang.org/std/os/unix/net/struct.UnixStream.html#method.write_timeout)
9017 * [`UnixStream::read_timeout`](http://doc.rust-lang.org/std/os/unix/net/struct.UnixStream.html#method.read_timeout)
9018 * [`UnixStream::write_timeout`](http://doc.rust-lang.org/std/os/unix/net/struct.UnixStream.html#method.write_timeout)
9019 * [`UnixStream::set_nonblocking`](http://doc.rust-lang.org/std/os/unix/net/struct.UnixStream.html#method.set_nonblocking)
9020 * [`UnixStream::take_error`](http://doc.rust-lang.org/std/os/unix/net/struct.UnixStream.html#method.take_error)
9021 * [`UnixStream::shutdown`](http://doc.rust-lang.org/std/os/unix/net/struct.UnixStream.html#method.shutdown)
9022 * Read/Write/RawFd impls for `UnixStream`
9023 * [`UnixListener::bind`](http://doc.rust-lang.org/std/os/unix/net/struct.UnixListener.html#method.bind)
9024 * [`UnixListener::accept`](http://doc.rust-lang.org/std/os/unix/net/struct.UnixListener.html#method.accept)
9025 * [`UnixListener::try_clone`](http://doc.rust-lang.org/std/os/unix/net/struct.UnixListener.html#method.try_clone)
9026 * [`UnixListener::local_addr`](http://doc.rust-lang.org/std/os/unix/net/struct.UnixListener.html#method.local_addr)
9027 * [`UnixListener::set_nonblocking`](http://doc.rust-lang.org/std/os/unix/net/struct.UnixListener.html#method.set_nonblocking)
9028 * [`UnixListener::take_error`](http://doc.rust-lang.org/std/os/unix/net/struct.UnixListener.html#method.take_error)
9029 * [`UnixListener::incoming`](http://doc.rust-lang.org/std/os/unix/net/struct.UnixListener.html#method.incoming)
9030 * RawFd impls for `UnixListener`
9031 * [`UnixDatagram::bind`](http://doc.rust-lang.org/std/os/unix/net/struct.UnixDatagram.html#method.bind)
9032 * [`UnixDatagram::unbound`](http://doc.rust-lang.org/std/os/unix/net/struct.UnixDatagram.html#method.unbound)
9033 * [`UnixDatagram::pair`](http://doc.rust-lang.org/std/os/unix/net/struct.UnixDatagram.html#method.pair)
9034 * [`UnixDatagram::connect`](http://doc.rust-lang.org/std/os/unix/net/struct.UnixDatagram.html#method.connect)
9035 * [`UnixDatagram::try_clone`](http://doc.rust-lang.org/std/os/unix/net/struct.UnixDatagram.html#method.try_clone)
9036 * [`UnixDatagram::local_addr`](http://doc.rust-lang.org/std/os/unix/net/struct.UnixDatagram.html#method.local_addr)
9037 * [`UnixDatagram::peer_addr`](http://doc.rust-lang.org/std/os/unix/net/struct.UnixDatagram.html#method.peer_addr)
9038 * [`UnixDatagram::recv_from`](http://doc.rust-lang.org/std/os/unix/net/struct.UnixDatagram.html#method.recv_from)
9039 * [`UnixDatagram::recv`](http://doc.rust-lang.org/std/os/unix/net/struct.UnixDatagram.html#method.recv)
9040 * [`UnixDatagram::send_to`](http://doc.rust-lang.org/std/os/unix/net/struct.UnixDatagram.html#method.send_to)
9041 * [`UnixDatagram::send`](http://doc.rust-lang.org/std/os/unix/net/struct.UnixDatagram.html#method.send)
9042 * [`UnixDatagram::set_read_timeout`](http://doc.rust-lang.org/std/os/unix/net/struct.UnixDatagram.html#method.set_read_timeout)
9043 * [`UnixDatagram::set_write_timeout`](http://doc.rust-lang.org/std/os/unix/net/struct.UnixDatagram.html#method.set_write_timeout)
9044 * [`UnixDatagram::read_timeout`](http://doc.rust-lang.org/std/os/unix/net/struct.UnixDatagram.html#method.read_timeout)
9045 * [`UnixDatagram::write_timeout`](http://doc.rust-lang.org/std/os/unix/net/struct.UnixDatagram.html#method.write_timeout)
9046 * [`UnixDatagram::set_nonblocking`](http://doc.rust-lang.org/std/os/unix/net/struct.UnixDatagram.html#method.set_nonblocking)
9047 * [`UnixDatagram::take_error`](http://doc.rust-lang.org/std/os/unix/net/struct.UnixDatagram.html#method.take_error)
9048 * [`UnixDatagram::shutdown`](http://doc.rust-lang.org/std/os/unix/net/struct.UnixDatagram.html#method.shutdown)
9049 * RawFd impls for `UnixDatagram`
9050 * `{BTree,Hash}Map::values_mut`
9051 * [`<[_]>::binary_search_by_key`](http://doc.rust-lang.org/std/primitive.slice.html#method.binary_search_by_key)
9052
9053 Libraries
9054 ---------
9055
9056 * [The `abs_sub` method of floats is deprecated](https://github.com/rust-lang/rust/pull/33664).
9057 The semantics of this minor method are subtle and probably not what
9058 most people want.
9059 * [Add implementation of Ord for Cell<T> and RefCell<T> where T: Ord](https://github.com/rust-lang/rust/pull/33306).
9060 * [On Linux, if `HashMap`s can't be initialized with `getrandom` they
9061 will fall back to `/dev/urandom` temporarily to avoid blocking
9062 during early boot](https://github.com/rust-lang/rust/pull/33086).
9063 * [Implemented negation for wrapping numerals](https://github.com/rust-lang/rust/pull/33067).
9064 * [Implement `Clone` for `binary_heap::IntoIter`](https://github.com/rust-lang/rust/pull/33050).
9065 * [Implement `Display` and `Hash` for `std::num::Wrapping`](https://github.com/rust-lang/rust/pull/33023).
9066 * [Add `Default` implementation for `&CStr`, `CString`](https://github.com/rust-lang/rust/pull/32990).
9067 * [Implement `From<Vec<T>>` and `Into<Vec<T>>` for `VecDeque<T>`](https://github.com/rust-lang/rust/pull/32866).
9068 * [Implement `Default` for `UnsafeCell`, `fmt::Error`, `Condvar`,
9069 `Mutex`, `RwLock`](https://github.com/rust-lang/rust/pull/32785).
9070
9071 Cargo
9072 -----
9073 * [Cargo.toml supports the `profile.*.panic` option](https://github.com/rust-lang/cargo/pull/2687).
9074 This controls the runtime behavior of the `panic!` macro
9075 and can be either "unwind" (the default), or "abort".
9076 [RFC 1513](https://github.com/rust-lang/rfcs/blob/master/text/1513-less-unwinding.md).
9077 * [Don't throw away errors with `-p` arguments](https://github.com/rust-lang/cargo/pull/2723).
9078 * [Report status to stderr instead of stdout](https://github.com/rust-lang/cargo/pull/2693).
9079 * [Build scripts are passed a `CARGO_MANIFEST_LINKS` environment
9080 variable that corresponds to the `links` field of the manifest](https://github.com/rust-lang/cargo/pull/2710).
9081 * [Ban keywords from crate names](https://github.com/rust-lang/cargo/pull/2707).
9082 * [Canonicalize `CARGO_HOME` on Windows](https://github.com/rust-lang/cargo/pull/2604).
9083 * [Retry network requests](https://github.com/rust-lang/cargo/pull/2396).
9084 By default they are retried twice, which can be customized with the
9085 `net.retry` value in `.cargo/config`.
9086 * [Don't print extra error info for failing subcommands](https://github.com/rust-lang/cargo/pull/2674).
9087 * [Add `--force` flag to `cargo install`](https://github.com/rust-lang/cargo/pull/2405).
9088 * [Don't use `flock` on NFS mounts](https://github.com/rust-lang/cargo/pull/2623).
9089 * [Prefer building `cargo install` artifacts in temporary directories](https://github.com/rust-lang/cargo/pull/2610).
9090 Makes it possible to install multiple crates in parallel.
9091 * [Add `cargo test --doc`](https://github.com/rust-lang/cargo/pull/2578).
9092 * [Add `cargo --explain`](https://github.com/rust-lang/cargo/pull/2551).
9093 * [Don't print warnings when `-q` is passed](https://github.com/rust-lang/cargo/pull/2576).
9094 * [Add `cargo doc --lib` and `--bin`](https://github.com/rust-lang/cargo/pull/2577).
9095 * [Don't require build script output to be UTF-8](https://github.com/rust-lang/cargo/pull/2560).
9096 * [Correctly attempt multiple git usernames](https://github.com/rust-lang/cargo/pull/2584).
9097
9098 Performance
9099 -----------
9100
9101 * [rustc memory usage was reduced by refactoring the context used for
9102 type checking](https://github.com/rust-lang/rust/pull/33425).
9103 * [Speed up creation of `HashMap`s by caching the random keys used
9104 to initialize the hash state](https://github.com/rust-lang/rust/pull/33318).
9105 * [The `find` implementation for `Chain` iterators is 2x faster](https://github.com/rust-lang/rust/pull/33289).
9106 * [Trait selection optimizations speed up type checking by 15%](https://github.com/rust-lang/rust/pull/33138).
9107 * [Efficient trie lookup for boolean Unicode properties](https://github.com/rust-lang/rust/pull/33098).
9108 10x faster than the previous lookup tables.
9109 * [Special case `#[derive(Copy, Clone)]` to avoid bloat](https://github.com/rust-lang/rust/pull/31414).
9110
9111 Usability
9112 ---------
9113
9114 * Many incremental improvements to documentation and rustdoc.
9115 * [rustdoc: List blanket trait impls](https://github.com/rust-lang/rust/pull/33514).
9116 * [rustdoc: Clean up ABI rendering](https://github.com/rust-lang/rust/pull/33151).
9117 * [Indexing with the wrong type produces a more informative error](https://github.com/rust-lang/rust/pull/33401).
9118 * [Improve diagnostics for constants being used in irrefutable patterns](https://github.com/rust-lang/rust/pull/33406).
9119 * [When many method candidates are in scope limit the suggestions to 10](https://github.com/rust-lang/rust/pull/33338).
9120 * [Remove confusing suggestion when calling a `fn` type](https://github.com/rust-lang/rust/pull/33325).
9121 * [Do not suggest changing `&mut self` to `&mut mut self`](https://github.com/rust-lang/rust/pull/33319).
9122
9123 Misc
9124 ----
9125
9126 * [Update i686-linux-android features to match Android ABI](https://github.com/rust-lang/rust/pull/33651).
9127 * [Update aarch64-linux-android features to match Android ABI](https://github.com/rust-lang/rust/pull/33500).
9128 * [`std` no longer prints backtraces on platforms where the running
9129 module must be loaded with `env::current_exe`, which can't be relied
9130 on](https://github.com/rust-lang/rust/pull/33554).
9131 * This release includes std binaries for the i586-unknown-linux-gnu,
9132 i686-unknown-linux-musl, and armv7-linux-androideabi targets. The
9133 i586 target is for old x86 hardware without SSE2, and the armv7
9134 target is for Android running on modern ARM architectures.
9135 * [The `rust-gdb` and `rust-lldb` scripts are distributed on all
9136 Unix platforms](https://github.com/rust-lang/rust/pull/32835).
9137 * [On Unix the runtime aborts by calling `libc::abort` instead of
9138 generating an illegal instruction](https://github.com/rust-lang/rust/pull/31457).
9139 * [Rust is now bootstrapped from the previous release of Rust,
9140 instead of a snapshot from an arbitrary commit](https://github.com/rust-lang/rust/pull/32942).
9141
9142 Compatibility Notes
9143 -------------------
9144
9145 * [`AtomicBool` is now bool-sized, not word-sized](https://github.com/rust-lang/rust/pull/33579).
9146 * [`target_env` for Linux ARM targets is just `gnu`, not
9147 `gnueabihf`, `gnueabi`, etc](https://github.com/rust-lang/rust/pull/33403).
9148 * [Consistently panic on overflow in `Duration::new`](https://github.com/rust-lang/rust/pull/33072).
9149 * [Change `String::truncate` to panic less](https://github.com/rust-lang/rust/pull/32977).
9150 * [Add `:block` to the follow set for `:ty` and `:path`](https://github.com/rust-lang/rust/pull/32945).
9151 Affects how macros are parsed.
9152 * [Fix macro hygiene bug](https://github.com/rust-lang/rust/pull/32923).
9153 * [Feature-gated attributes on macro-generated macro invocations are
9154 now rejected](https://github.com/rust-lang/rust/pull/32791).
9155 * [Suppress fallback and ambiguity errors during type inference](https://github.com/rust-lang/rust/pull/32258).
9156 This caused some minor changes to type inference.
9157
9158
9159 Version 1.9.0 (2016-05-26)
9160 ==========================
9161
9162 Language
9163 --------
9164
9165 * The `#[deprecated]` attribute when applied to an API will generate
9166 warnings when used. The warnings may be suppressed with
9167 `#[allow(deprecated)]`. [RFC 1270].
9168 * [`fn` item types are zero sized, and each `fn` names a unique
9169 type][1.9fn]. This will break code that transmutes `fn`s, so calling
9170 `transmute` on a `fn` type will generate a warning for a few cycles,
9171 then will be converted to an error.
9172 * [Field and method resolution understand visibility, so private
9173 fields and methods cannot prevent the proper use of public fields
9174 and methods][1.9fv].
9175 * [The parser considers unicode codepoints in the
9176 `PATTERN_WHITE_SPACE` category to be whitespace][1.9ws].
9177
9178 Stabilized APIs
9179 ---------------
9180
9181 * [`std::panic`]
9182 * [`std::panic::catch_unwind`] (renamed from `recover`)
9183 * [`std::panic::resume_unwind`] (renamed from `propagate`)
9184 * [`std::panic::AssertUnwindSafe`] (renamed from `AssertRecoverSafe`)
9185 * [`std::panic::UnwindSafe`] (renamed from `RecoverSafe`)
9186 * [`str::is_char_boundary`]
9187 * [`<*const T>::as_ref`]
9188 * [`<*mut T>::as_ref`]
9189 * [`<*mut T>::as_mut`]
9190 * [`AsciiExt::make_ascii_uppercase`]
9191 * [`AsciiExt::make_ascii_lowercase`]
9192 * [`char::decode_utf16`]
9193 * [`char::DecodeUtf16`]
9194 * [`char::DecodeUtf16Error`]
9195 * [`char::DecodeUtf16Error::unpaired_surrogate`]
9196 * [`BTreeSet::take`]
9197 * [`BTreeSet::replace`]
9198 * [`BTreeSet::get`]
9199 * [`HashSet::take`]
9200 * [`HashSet::replace`]
9201 * [`HashSet::get`]
9202 * [`OsString::with_capacity`]
9203 * [`OsString::clear`]
9204 * [`OsString::capacity`]
9205 * [`OsString::reserve`]
9206 * [`OsString::reserve_exact`]
9207 * [`OsStr::is_empty`]
9208 * [`OsStr::len`]
9209 * [`std::os::unix::thread`]
9210 * [`RawPthread`]
9211 * [`JoinHandleExt`]
9212 * [`JoinHandleExt::as_pthread_t`]
9213 * [`JoinHandleExt::into_pthread_t`]
9214 * [`HashSet::hasher`]
9215 * [`HashMap::hasher`]
9216 * [`CommandExt::exec`]
9217 * [`File::try_clone`]
9218 * [`SocketAddr::set_ip`]
9219 * [`SocketAddr::set_port`]
9220 * [`SocketAddrV4::set_ip`]
9221 * [`SocketAddrV4::set_port`]
9222 * [`SocketAddrV6::set_ip`]
9223 * [`SocketAddrV6::set_port`]
9224 * [`SocketAddrV6::set_flowinfo`]
9225 * [`SocketAddrV6::set_scope_id`]
9226 * [`slice::copy_from_slice`]
9227 * [`ptr::read_volatile`]
9228 * [`ptr::write_volatile`]
9229 * [`OpenOptions::create_new`]
9230 * [`TcpStream::set_nodelay`]
9231 * [`TcpStream::nodelay`]
9232 * [`TcpStream::set_ttl`]
9233 * [`TcpStream::ttl`]
9234 * [`TcpStream::set_only_v6`]
9235 * [`TcpStream::only_v6`]
9236 * [`TcpStream::take_error`]
9237 * [`TcpStream::set_nonblocking`]
9238 * [`TcpListener::set_ttl`]
9239 * [`TcpListener::ttl`]
9240 * [`TcpListener::set_only_v6`]
9241 * [`TcpListener::only_v6`]
9242 * [`TcpListener::take_error`]
9243 * [`TcpListener::set_nonblocking`]
9244 * [`UdpSocket::set_broadcast`]
9245 * [`UdpSocket::broadcast`]
9246 * [`UdpSocket::set_multicast_loop_v4`]
9247 * [`UdpSocket::multicast_loop_v4`]
9248 * [`UdpSocket::set_multicast_ttl_v4`]
9249 * [`UdpSocket::multicast_ttl_v4`]
9250 * [`UdpSocket::set_multicast_loop_v6`]
9251 * [`UdpSocket::multicast_loop_v6`]
9252 * [`UdpSocket::set_multicast_ttl_v6`]
9253 * [`UdpSocket::multicast_ttl_v6`]
9254 * [`UdpSocket::set_ttl`]
9255 * [`UdpSocket::ttl`]
9256 * [`UdpSocket::set_only_v6`]
9257 * [`UdpSocket::only_v6`]
9258 * [`UdpSocket::join_multicast_v4`]
9259 * [`UdpSocket::join_multicast_v6`]
9260 * [`UdpSocket::leave_multicast_v4`]
9261 * [`UdpSocket::leave_multicast_v6`]
9262 * [`UdpSocket::take_error`]
9263 * [`UdpSocket::connect`]
9264 * [`UdpSocket::send`]
9265 * [`UdpSocket::recv`]
9266 * [`UdpSocket::set_nonblocking`]
9267
9268 Libraries
9269 ---------
9270
9271 * [`std::sync::Once` is poisoned if its initialization function
9272 fails][1.9o].
9273 * [`cell::Ref` and `cell::RefMut` can contain unsized types][1.9cu].
9274 * [Most types implement `fmt::Debug`][1.9db].
9275 * [The default buffer size used by `BufReader` and `BufWriter` was
9276 reduced to 8K, from 64K][1.9bf]. This is in line with the buffer size
9277 used by other languages.
9278 * [`Instant`, `SystemTime` and `Duration` implement `+=` and `-=`.
9279 `Duration` additionally implements `*=` and `/=`][1.9ta].
9280 * [`Skip` is a `DoubleEndedIterator`][1.9sk].
9281 * [`From<[u8; 4]>` is implemented for `Ipv4Addr`][1.9fi].
9282 * [`Chain` implements `BufRead`][1.9ch].
9283 * [`HashMap`, `HashSet` and iterators are covariant][1.9hc].
9284
9285 Cargo
9286 -----
9287
9288 * [Cargo can now run concurrently][1.9cc].
9289 * [Top-level overrides allow specific revisions of crates to be
9290 overridden through the entire crate graph][1.9ct]. This is intended
9291 to make upgrades easier for large projects, by allowing crates to be
9292 forked temporarily until they've been upgraded and republished.
9293 * [Cargo exports a `CARGO_PKG_AUTHORS` environment variable][1.9cp].
9294 * [Cargo will pass the contents of the `RUSTFLAGS` variable to `rustc`
9295 on the commandline][1.9cf]. `rustc` arguments can also be specified
9296 in the `build.rustflags` configuration key.
9297
9298 Performance
9299 -----------
9300
9301 * [The time complexity of comparing variables for equivalence during type
9302 unification is reduced from _O_(_n_!) to _O_(_n_)][1.9tu]. This leads
9303 to major compilation time improvement in some scenarios.
9304 * [`ToString` is specialized for `str`, giving it the same performance
9305 as `to_owned`][1.9ts].
9306 * [Spawning processes with `Command::output` no longer creates extra
9307 threads][1.9sp].
9308 * [`#[derive(PartialEq)]` and `#[derive(PartialOrd)]` emit less code
9309 for C-like enums][1.9cl].
9310
9311 Misc
9312 ----
9313
9314 * [Passing the `--quiet` flag to a test runner will produce
9315 much-abbreviated output][1.9q].
9316 * The Rust Project now publishes std binaries for the
9317 `mips-unknown-linux-musl`, `mipsel-unknown-linux-musl`, and
9318 `i586-pc-windows-msvc` targets.
9319
9320 Compatibility Notes
9321 -------------------
9322
9323 * [`std::sync::Once` is poisoned if its initialization function
9324 fails][1.9o].
9325 * [It is illegal to define methods with the same name in overlapping
9326 inherent `impl` blocks][1.9sn].
9327 * [`fn` item types are zero sized, and each `fn` names a unique
9328 type][1.9fn]. This will break code that transmutes `fn`s, so calling
9329 `transmute` on a `fn` type will generate a warning for a few cycles,
9330 then will be converted to an error.
9331 * [Improvements to const evaluation may trigger new errors when integer
9332 literals are out of range][1.9ce].
9333
9334
9335 [1.9bf]: https://github.com/rust-lang/rust/pull/32695
9336 [1.9cc]: https://github.com/rust-lang/cargo/pull/2486
9337 [1.9ce]: https://github.com/rust-lang/rust/pull/30587
9338 [1.9cf]: https://github.com/rust-lang/cargo/pull/2241
9339 [1.9ch]: https://github.com/rust-lang/rust/pull/32541
9340 [1.9cl]: https://github.com/rust-lang/rust/pull/31977
9341 [1.9cp]: https://github.com/rust-lang/cargo/pull/2465
9342 [1.9ct]: https://github.com/rust-lang/cargo/pull/2385
9343 [1.9cu]: https://github.com/rust-lang/rust/pull/32652
9344 [1.9db]: https://github.com/rust-lang/rust/pull/32054
9345 [1.9fi]: https://github.com/rust-lang/rust/pull/32050
9346 [1.9fn]: https://github.com/rust-lang/rust/pull/31710
9347 [1.9fv]: https://github.com/rust-lang/rust/pull/31938
9348 [1.9hc]: https://github.com/rust-lang/rust/pull/32635
9349 [1.9o]: https://github.com/rust-lang/rust/pull/32325
9350 [1.9q]: https://github.com/rust-lang/rust/pull/31887
9351 [1.9sk]: https://github.com/rust-lang/rust/pull/31700
9352 [1.9sn]: https://github.com/rust-lang/rust/pull/31925
9353 [1.9sp]: https://github.com/rust-lang/rust/pull/31618
9354 [1.9ta]: https://github.com/rust-lang/rust/pull/32448
9355 [1.9ts]: https://github.com/rust-lang/rust/pull/32586
9356 [1.9tu]: https://github.com/rust-lang/rust/pull/32062
9357 [1.9ws]: https://github.com/rust-lang/rust/pull/29734
9358 [RFC 1270]: https://github.com/rust-lang/rfcs/blob/master/text/1270-deprecation.md
9359 [`<*const T>::as_ref`]: http://doc.rust-lang.org/nightly/std/primitive.pointer.html#method.as_ref
9360 [`<*mut T>::as_mut`]: http://doc.rust-lang.org/nightly/std/primitive.pointer.html#method.as_mut
9361 [`<*mut T>::as_ref`]: http://doc.rust-lang.org/nightly/std/primitive.pointer.html#method.as_ref
9362 [`slice::copy_from_slice`]: http://doc.rust-lang.org/nightly/std/primitive.slice.html#method.copy_from_slice
9363 [`AsciiExt::make_ascii_lowercase`]: http://doc.rust-lang.org/nightly/std/ascii/trait.AsciiExt.html#tymethod.make_ascii_lowercase
9364 [`AsciiExt::make_ascii_uppercase`]: http://doc.rust-lang.org/nightly/std/ascii/trait.AsciiExt.html#tymethod.make_ascii_uppercase
9365 [`BTreeSet::get`]: http://doc.rust-lang.org/nightly/collections/btree/set/struct.BTreeSet.html#method.get
9366 [`BTreeSet::replace`]: http://doc.rust-lang.org/nightly/collections/btree/set/struct.BTreeSet.html#method.replace
9367 [`BTreeSet::take`]: http://doc.rust-lang.org/nightly/collections/btree/set/struct.BTreeSet.html#method.take
9368 [`CommandExt::exec`]: http://doc.rust-lang.org/nightly/std/os/unix/process/trait.CommandExt.html#tymethod.exec
9369 [`File::try_clone`]: http://doc.rust-lang.org/nightly/std/fs/struct.File.html#method.try_clone
9370 [`HashMap::hasher`]: http://doc.rust-lang.org/nightly/std/collections/struct.HashMap.html#method.hasher
9371 [`HashSet::get`]: http://doc.rust-lang.org/nightly/std/collections/struct.HashSet.html#method.get
9372 [`HashSet::hasher`]: http://doc.rust-lang.org/nightly/std/collections/struct.HashSet.html#method.hasher
9373 [`HashSet::replace`]: http://doc.rust-lang.org/nightly/std/collections/struct.HashSet.html#method.replace
9374 [`HashSet::take`]: http://doc.rust-lang.org/nightly/std/collections/struct.HashSet.html#method.take
9375 [`JoinHandleExt::as_pthread_t`]: http://doc.rust-lang.org/nightly/std/os/unix/thread/trait.JoinHandleExt.html#tymethod.as_pthread_t
9376 [`JoinHandleExt::into_pthread_t`]: http://doc.rust-lang.org/nightly/std/os/unix/thread/trait.JoinHandleExt.html#tymethod.into_pthread_t
9377 [`JoinHandleExt`]: http://doc.rust-lang.org/nightly/std/os/unix/thread/trait.JoinHandleExt.html
9378 [`OpenOptions::create_new`]: http://doc.rust-lang.org/nightly/std/fs/struct.OpenOptions.html#method.create_new
9379 [`OsStr::is_empty`]: http://doc.rust-lang.org/nightly/std/ffi/struct.OsStr.html#method.is_empty
9380 [`OsStr::len`]: http://doc.rust-lang.org/nightly/std/ffi/struct.OsStr.html#method.len
9381 [`OsString::capacity`]: http://doc.rust-lang.org/nightly/std/ffi/struct.OsString.html#method.capacity
9382 [`OsString::clear`]: http://doc.rust-lang.org/nightly/std/ffi/struct.OsString.html#method.clear
9383 [`OsString::reserve_exact`]: http://doc.rust-lang.org/nightly/std/ffi/struct.OsString.html#method.reserve_exact
9384 [`OsString::reserve`]: http://doc.rust-lang.org/nightly/std/ffi/struct.OsString.html#method.reserve
9385 [`OsString::with_capacity`]: http://doc.rust-lang.org/nightly/std/ffi/struct.OsString.html#method.with_capacity
9386 [`RawPthread`]: http://doc.rust-lang.org/nightly/std/os/unix/thread/type.RawPthread.html
9387 [`SocketAddr::set_ip`]: http://doc.rust-lang.org/nightly/std/net/enum.SocketAddr.html#method.set_ip
9388 [`SocketAddr::set_port`]: http://doc.rust-lang.org/nightly/std/net/enum.SocketAddr.html#method.set_port
9389 [`SocketAddrV4::set_ip`]: http://doc.rust-lang.org/nightly/std/net/struct.SocketAddrV4.html#method.set_ip
9390 [`SocketAddrV4::set_port`]: http://doc.rust-lang.org/nightly/std/net/struct.SocketAddrV4.html#method.set_port
9391 [`SocketAddrV6::set_flowinfo`]: http://doc.rust-lang.org/nightly/std/net/struct.SocketAddrV6.html#method.set_flowinfo
9392 [`SocketAddrV6::set_ip`]: http://doc.rust-lang.org/nightly/std/net/struct.SocketAddrV6.html#method.set_ip
9393 [`SocketAddrV6::set_port`]: http://doc.rust-lang.org/nightly/std/net/struct.SocketAddrV6.html#method.set_port
9394 [`SocketAddrV6::set_scope_id`]: http://doc.rust-lang.org/nightly/std/net/struct.SocketAddrV6.html#method.set_scope_id
9395 [`TcpListener::only_v6`]: http://doc.rust-lang.org/nightly/std/net/struct.TcpStream.html#method.only_v6
9396 [`TcpListener::set_nonblocking`]: http://doc.rust-lang.org/nightly/std/net/struct.TcpStream.html#method.set_nonblocking
9397 [`TcpListener::set_only_v6`]: http://doc.rust-lang.org/nightly/std/net/struct.TcpStream.html#method.set_only_v6
9398 [`TcpListener::set_ttl`]: http://doc.rust-lang.org/nightly/std/net/struct.TcpStream.html#method.set_ttl
9399 [`TcpListener::take_error`]: http://doc.rust-lang.org/nightly/std/net/struct.TcpStream.html#method.take_error
9400 [`TcpListener::ttl`]: http://doc.rust-lang.org/nightly/std/net/struct.TcpStream.html#method.ttl
9401 [`TcpStream::nodelay`]: http://doc.rust-lang.org/nightly/std/net/struct.TcpStream.html#method.nodelay
9402 [`TcpStream::only_v6`]: http://doc.rust-lang.org/nightly/std/net/struct.TcpStream.html#method.only_v6
9403 [`TcpStream::set_nodelay`]: http://doc.rust-lang.org/nightly/std/net/struct.TcpStream.html#method.set_nodelay
9404 [`TcpStream::set_nonblocking`]: http://doc.rust-lang.org/nightly/std/net/struct.TcpStream.html#method.set_nonblocking
9405 [`TcpStream::set_only_v6`]: http://doc.rust-lang.org/nightly/std/net/struct.TcpStream.html#method.set_only_v6
9406 [`TcpStream::set_ttl`]: http://doc.rust-lang.org/nightly/std/net/struct.TcpStream.html#method.set_ttl
9407 [`TcpStream::take_error`]: http://doc.rust-lang.org/nightly/std/net/struct.TcpStream.html#method.take_error
9408 [`TcpStream::ttl`]: http://doc.rust-lang.org/nightly/std/net/struct.TcpStream.html#method.ttl
9409 [`UdpSocket::broadcast`]: http://doc.rust-lang.org/nightly/std/net/struct.UdpSocket.html#method.broadcast
9410 [`UdpSocket::connect`]: http://doc.rust-lang.org/nightly/std/net/struct.UdpSocket.html#method.connect
9411 [`UdpSocket::join_multicast_v4`]: http://doc.rust-lang.org/nightly/std/net/struct.UdpSocket.html#method.join_multicast_v4
9412 [`UdpSocket::join_multicast_v6`]: http://doc.rust-lang.org/nightly/std/net/struct.UdpSocket.html#method.join_multicast_v6
9413 [`UdpSocket::leave_multicast_v4`]: http://doc.rust-lang.org/nightly/std/net/struct.UdpSocket.html#method.leave_multicast_v4
9414 [`UdpSocket::leave_multicast_v6`]: http://doc.rust-lang.org/nightly/std/net/struct.UdpSocket.html#method.leave_multicast_v6
9415 [`UdpSocket::multicast_loop_v4`]: http://doc.rust-lang.org/nightly/std/net/struct.UdpSocket.html#method.multicast_loop_v4
9416 [`UdpSocket::multicast_loop_v6`]: http://doc.rust-lang.org/nightly/std/net/struct.UdpSocket.html#method.multicast_loop_v6
9417 [`UdpSocket::multicast_ttl_v4`]: http://doc.rust-lang.org/nightly/std/net/struct.UdpSocket.html#method.multicast_ttl_v4
9418 [`UdpSocket::multicast_ttl_v6`]: http://doc.rust-lang.org/nightly/std/net/struct.UdpSocket.html#method.multicast_ttl_v6
9419 [`UdpSocket::only_v6`]: http://doc.rust-lang.org/nightly/std/net/struct.UdpSocket.html#method.only_v6
9420 [`UdpSocket::recv`]: http://doc.rust-lang.org/nightly/std/net/struct.UdpSocket.html#method.recv
9421 [`UdpSocket::send`]: http://doc.rust-lang.org/nightly/std/net/struct.UdpSocket.html#method.send
9422 [`UdpSocket::set_broadcast`]: http://doc.rust-lang.org/nightly/std/net/struct.UdpSocket.html#method.set_broadcast
9423 [`UdpSocket::set_multicast_loop_v4`]: http://doc.rust-lang.org/nightly/std/net/struct.UdpSocket.html#method.set_multicast_loop_v4
9424 [`UdpSocket::set_multicast_loop_v6`]: http://doc.rust-lang.org/nightly/std/net/struct.UdpSocket.html#method.set_multicast_loop_v6
9425 [`UdpSocket::set_multicast_ttl_v4`]: http://doc.rust-lang.org/nightly/std/net/struct.UdpSocket.html#method.set_multicast_ttl_v4
9426 [`UdpSocket::set_multicast_ttl_v6`]: http://doc.rust-lang.org/nightly/std/net/struct.UdpSocket.html#method.set_multicast_ttl_v6
9427 [`UdpSocket::set_nonblocking`]: http://doc.rust-lang.org/nightly/std/net/struct.UdpSocket.html#method.set_nonblocking
9428 [`UdpSocket::set_only_v6`]: http://doc.rust-lang.org/nightly/std/net/struct.UdpSocket.html#method.set_only_v6
9429 [`UdpSocket::set_ttl`]: http://doc.rust-lang.org/nightly/std/net/struct.UdpSocket.html#method.set_ttl
9430 [`UdpSocket::take_error`]: http://doc.rust-lang.org/nightly/std/net/struct.UdpSocket.html#method.take_error
9431 [`UdpSocket::ttl`]: http://doc.rust-lang.org/nightly/std/net/struct.UdpSocket.html#method.ttl
9432 [`char::DecodeUtf16Error::unpaired_surrogate`]: http://doc.rust-lang.org/nightly/std/char/struct.DecodeUtf16Error.html#method.unpaired_surrogate
9433 [`char::DecodeUtf16Error`]: http://doc.rust-lang.org/nightly/std/char/struct.DecodeUtf16Error.html
9434 [`char::DecodeUtf16`]: http://doc.rust-lang.org/nightly/std/char/struct.DecodeUtf16.html
9435 [`char::decode_utf16`]: http://doc.rust-lang.org/nightly/std/char/fn.decode_utf16.html
9436 [`ptr::read_volatile`]: http://doc.rust-lang.org/nightly/std/ptr/fn.read_volatile.html
9437 [`ptr::write_volatile`]: http://doc.rust-lang.org/nightly/std/ptr/fn.write_volatile.html
9438 [`std::os::unix::thread`]: http://doc.rust-lang.org/nightly/std/os/unix/thread/index.html
9439 [`std::panic::AssertUnwindSafe`]: http://doc.rust-lang.org/nightly/std/panic/struct.AssertUnwindSafe.html
9440 [`std::panic::UnwindSafe`]: http://doc.rust-lang.org/nightly/std/panic/trait.UnwindSafe.html
9441 [`std::panic::catch_unwind`]: http://doc.rust-lang.org/nightly/std/panic/fn.catch_unwind.html
9442 [`std::panic::resume_unwind`]: http://doc.rust-lang.org/nightly/std/panic/fn.resume_unwind.html
9443 [`std::panic`]: http://doc.rust-lang.org/nightly/std/panic/index.html
9444 [`str::is_char_boundary`]: http://doc.rust-lang.org/nightly/std/primitive.str.html#method.is_char_boundary
9445
9446
9447 Version 1.8.0 (2016-04-14)
9448 ==========================
9449
9450 Language
9451 --------
9452
9453 * Rust supports overloading of compound assignment statements like
9454 `+=` by implementing the [`AddAssign`], [`SubAssign`],
9455 [`MulAssign`], [`DivAssign`], [`RemAssign`], [`BitAndAssign`],
9456 [`BitOrAssign`], [`BitXorAssign`], [`ShlAssign`], or [`ShrAssign`]
9457 traits. [RFC 953].
9458 * Empty structs can be defined with braces, as in `struct Foo { }`, in
9459 addition to the non-braced form, `struct Foo;`. [RFC 218].
9460
9461 Libraries
9462 ---------
9463
9464 * Stabilized APIs:
9465 * [`str::encode_utf16`] (renamed from `utf16_units`)
9466 * [`str::EncodeUtf16`] (renamed from `Utf16Units`)
9467 * [`Ref::map`]
9468 * [`RefMut::map`]
9469 * [`ptr::drop_in_place`]
9470 * [`time::Instant`]
9471 * [`time::SystemTime`]
9472 * [`Instant::now`]
9473 * [`Instant::duration_since`] (renamed from `duration_from_earlier`)
9474 * [`Instant::elapsed`]
9475 * [`SystemTime::now`]
9476 * [`SystemTime::duration_since`] (renamed from `duration_from_earlier`)
9477 * [`SystemTime::elapsed`]
9478 * Various `Add`/`Sub` impls for `Time` and `SystemTime`
9479 * [`SystemTimeError`]
9480 * [`SystemTimeError::duration`]
9481 * Various impls for `SystemTimeError`
9482 * [`UNIX_EPOCH`]
9483 * [`AddAssign`], [`SubAssign`], [`MulAssign`], [`DivAssign`],
9484 [`RemAssign`], [`BitAndAssign`], [`BitOrAssign`],
9485 [`BitXorAssign`], [`ShlAssign`], [`ShrAssign`].
9486 * [The `write!` and `writeln!` macros correctly emit errors if any of
9487 their arguments can't be formatted][1.8w].
9488 * [Various I/O functions support large files on 32-bit Linux][1.8l].
9489 * [The Unix-specific `raw` modules, which contain a number of
9490 redefined C types are deprecated][1.8r], including `os::raw::unix`,
9491 `os::raw::macos`, and `os::raw::linux`. These modules defined types
9492 such as `ino_t` and `dev_t`. The inconsistency of these definitions
9493 across platforms was making it difficult to implement `std`
9494 correctly. Those that need these definitions should use the `libc`
9495 crate. [RFC 1415].
9496 * The Unix-specific `MetadataExt` traits, including
9497 `os::unix::fs::MetadataExt`, which expose values such as inode
9498 numbers [no longer return platform-specific types][1.8r], but
9499 instead return widened integers. [RFC 1415].
9500 * [`btree_set::{IntoIter, Iter, Range}` are covariant][1.8cv].
9501 * [Atomic loads and stores are not volatile][1.8a].
9502 * [All types in `sync::mpsc` implement `fmt::Debug`][1.8mp].
9503
9504 Performance
9505 -----------
9506
9507 * [Inlining hash functions lead to a 3% compile-time improvement in
9508 some workloads][1.8h].
9509 * When using jemalloc, its symbols are [unprefixed so that it
9510 overrides the libc malloc implementation][1.8h]. This means that for
9511 rustc, LLVM is now using jemalloc, which results in a 6%
9512 compile-time improvement on a specific workload.
9513 * [Avoid quadratic growth in function size due to cleanups][1.8cu].
9514
9515 Misc
9516 ----
9517
9518 * [32-bit MSVC builds finally implement unwinding][1.8ms].
9519 i686-pc-windows-msvc is now considered a tier-1 platform.
9520 * [The `--print targets` flag prints a list of supported targets][1.8t].
9521 * [The `--print cfg` flag prints the `cfg`s defined for the current
9522 target][1.8cf].
9523 * [`rustc` can be built with an new Cargo-based build system, written
9524 in Rust][1.8b]. It will eventually replace Rust's Makefile-based
9525 build system. To enable it configure with `configure --rustbuild`.
9526 * [Errors for non-exhaustive `match` patterns now list up to 3 missing
9527 variants while also indicating the total number of missing variants
9528 if more than 3][1.8m].
9529 * [Executable stacks are disabled on Linux and BSD][1.8nx].
9530 * The Rust Project now publishes binary releases of the standard
9531 library for a number of tier-2 targets:
9532 `armv7-unknown-linux-gnueabihf`, `powerpc-unknown-linux-gnu`,
9533 `powerpc64-unknown-linux-gnu`, `powerpc64le-unknown-linux-gnu`
9534 `x86_64-rumprun-netbsd`. These can be installed with
9535 tools such as [multirust][1.8mr].
9536
9537 Cargo
9538 -----
9539
9540 * [`cargo init` creates a new Cargo project in the current
9541 directory][1.8ci]. It is otherwise like `cargo new`.
9542 * [Cargo has configuration keys for `-v` and
9543 `--color`][1.8cc]. `verbose` and `color`, respectively, go in the
9544 `[term]` section of `.cargo/config`.
9545 * [Configuration keys that evaluate to strings or integers can be set
9546 via environment variables][1.8ce]. For example the `build.jobs` key
9547 can be set via `CARGO_BUILD_JOBS`. Environment variables take
9548 precedence over config files.
9549 * [Target-specific dependencies support Rust `cfg` syntax for
9550 describing targets][1.8cfg] so that dependencies for multiple
9551 targets can be specified together. [RFC 1361].
9552 * [The environment variables `CARGO_TARGET_ROOT`, `RUSTC`, and
9553 `RUSTDOC` take precedence over the `build.target-dir`,
9554 `build.rustc`, and `build.rustdoc` configuration values][1.8cfv].
9555 * [The child process tree is killed on Windows when Cargo is
9556 killed][1.8ck].
9557 * [The `build.target` configuration value sets the target platform,
9558 like `--target`][1.8ct].
9559
9560 Compatibility Notes
9561 -------------------
9562
9563 * [Unstable compiler flags have been further restricted][1.8u]. Since
9564 1.0 `-Z` flags have been considered unstable, and other flags that
9565 were considered unstable additionally required passing `-Z
9566 unstable-options` to access. Unlike unstable language and library
9567 features though, these options have been accessible on the stable
9568 release channel. Going forward, *new unstable flags will not be
9569 available on the stable release channel*, and old unstable flags
9570 will warn about their usage. In the future, all unstable flags will
9571 be unavailable on the stable release channel.
9572 * [It is no longer possible to `match` on empty enum variants using
9573 the `Variant(..)` syntax][1.8v]. This has been a warning since 1.6.
9574 * The Unix-specific `MetadataExt` traits, including
9575 `os::unix::fs::MetadataExt`, which expose values such as inode
9576 numbers [no longer return platform-specific types][1.8r], but
9577 instead return widened integers. [RFC 1415].
9578 * [Modules sourced from the filesystem cannot appear within arbitrary
9579 blocks, but only within other modules][1.8mf].
9580 * [`--cfg` compiler flags are parsed strictly as identifiers][1.8c].
9581 * On Unix, [stack overflow triggers a runtime abort instead of a
9582 SIGSEGV][1.8so].
9583 * [`Command::spawn` and its equivalents return an error if any of
9584 its command-line arguments contain interior `NUL`s][1.8n].
9585 * [Tuple and unit enum variants from other crates are in the type
9586 namespace][1.8tn].
9587 * [On Windows `rustc` emits `.lib` files for the `staticlib` library
9588 type instead of `.a` files][1.8st]. Additionally, for the MSVC
9589 toolchain, `rustc` emits import libraries named `foo.dll.lib`
9590 instead of `foo.lib`.
9591
9592
9593 [1.8a]: https://github.com/rust-lang/rust/pull/30962
9594 [1.8b]: https://github.com/rust-lang/rust/pull/31123
9595 [1.8c]: https://github.com/rust-lang/rust/pull/31530
9596 [1.8cc]: https://github.com/rust-lang/cargo/pull/2397
9597 [1.8ce]: https://github.com/rust-lang/cargo/pull/2398
9598 [1.8cf]: https://github.com/rust-lang/rust/pull/31278
9599 [1.8cfg]: https://github.com/rust-lang/cargo/pull/2328
9600 [1.8ci]: https://github.com/rust-lang/cargo/pull/2081
9601 [1.8ck]: https://github.com/rust-lang/cargo/pull/2370
9602 [1.8ct]: https://github.com/rust-lang/cargo/pull/2335
9603 [1.8cu]: https://github.com/rust-lang/rust/pull/31390
9604 [1.8cfv]: https://github.com/rust-lang/cargo/issues/2365
9605 [1.8cv]: https://github.com/rust-lang/rust/pull/30998
9606 [1.8h]: https://github.com/rust-lang/rust/pull/31460
9607 [1.8l]: https://github.com/rust-lang/rust/pull/31668
9608 [1.8m]: https://github.com/rust-lang/rust/pull/31020
9609 [1.8mf]: https://github.com/rust-lang/rust/pull/31534
9610 [1.8mp]: https://github.com/rust-lang/rust/pull/30894
9611 [1.8mr]: https://users.rust-lang.org/t/multirust-0-8-with-cross-std-installation/4901
9612 [1.8ms]: https://github.com/rust-lang/rust/pull/30448
9613 [1.8n]: https://github.com/rust-lang/rust/pull/31056
9614 [1.8nx]: https://github.com/rust-lang/rust/pull/30859
9615 [1.8r]: https://github.com/rust-lang/rust/pull/31551
9616 [1.8so]: https://github.com/rust-lang/rust/pull/31333
9617 [1.8st]: https://github.com/rust-lang/rust/pull/29520
9618 [1.8t]: https://github.com/rust-lang/rust/pull/31358
9619 [1.8tn]: https://github.com/rust-lang/rust/pull/30882
9620 [1.8u]: https://github.com/rust-lang/rust/pull/31793
9621 [1.8v]: https://github.com/rust-lang/rust/pull/31757
9622 [1.8w]: https://github.com/rust-lang/rust/pull/31904
9623 [RFC 1361]: https://github.com/rust-lang/rfcs/blob/master/text/1361-cargo-cfg-dependencies.md
9624 [RFC 1415]: https://github.com/rust-lang/rfcs/blob/master/text/1415-trim-std-os.md
9625 [RFC 218]: https://github.com/rust-lang/rfcs/blob/master/text/0218-empty-struct-with-braces.md
9626 [RFC 953]: https://github.com/rust-lang/rfcs/blob/master/text/0953-op-assign.md
9627 [`AddAssign`]: http://doc.rust-lang.org/nightly/std/ops/trait.AddAssign.html
9628 [`BitAndAssign`]: http://doc.rust-lang.org/nightly/std/ops/trait.BitAndAssign.html
9629 [`BitOrAssign`]: http://doc.rust-lang.org/nightly/std/ops/trait.BitOrAssign.html
9630 [`BitXorAssign`]: http://doc.rust-lang.org/nightly/std/ops/trait.BitXorAssign.html
9631 [`DivAssign`]: http://doc.rust-lang.org/nightly/std/ops/trait.DivAssign.html
9632 [`Instant::duration_since`]: http://doc.rust-lang.org/nightly/std/time/struct.Instant.html#method.duration_since
9633 [`Instant::elapsed`]: http://doc.rust-lang.org/nightly/std/time/struct.Instant.html#method.elapsed
9634 [`Instant::now`]: http://doc.rust-lang.org/nightly/std/time/struct.Instant.html#method.now
9635 [`MulAssign`]: http://doc.rust-lang.org/nightly/std/ops/trait.MulAssign.html
9636 [`Ref::map`]: http://doc.rust-lang.org/nightly/std/cell/struct.Ref.html#method.map
9637 [`RefMut::map`]: http://doc.rust-lang.org/nightly/std/cell/struct.RefMut.html#method.map
9638 [`RemAssign`]: http://doc.rust-lang.org/nightly/std/ops/trait.RemAssign.html
9639 [`ShlAssign`]: http://doc.rust-lang.org/nightly/std/ops/trait.ShlAssign.html
9640 [`ShrAssign`]: http://doc.rust-lang.org/nightly/std/ops/trait.ShrAssign.html
9641 [`SubAssign`]: http://doc.rust-lang.org/nightly/std/ops/trait.SubAssign.html
9642 [`SystemTime::duration_since`]: http://doc.rust-lang.org/nightly/std/time/struct.SystemTime.html#method.duration_since
9643 [`SystemTime::elapsed`]: http://doc.rust-lang.org/nightly/std/time/struct.SystemTime.html#method.elapsed
9644 [`SystemTime::now`]: http://doc.rust-lang.org/nightly/std/time/struct.SystemTime.html#method.now
9645 [`SystemTimeError::duration`]: http://doc.rust-lang.org/nightly/std/time/struct.SystemTimeError.html#method.duration
9646 [`SystemTimeError`]: http://doc.rust-lang.org/nightly/std/time/struct.SystemTimeError.html
9647 [`UNIX_EPOCH`]: http://doc.rust-lang.org/nightly/std/time/constant.UNIX_EPOCH.html
9648 [`ptr::drop_in_place`]: http://doc.rust-lang.org/nightly/std/ptr/fn.drop_in_place.html
9649 [`str::EncodeUtf16`]: http://doc.rust-lang.org/nightly/std/str/struct.EncodeUtf16.html
9650 [`str::encode_utf16`]: http://doc.rust-lang.org/nightly/std/primitive.str.html#method.encode_utf16
9651 [`time::Instant`]: http://doc.rust-lang.org/nightly/std/time/struct.Instant.html
9652 [`time::SystemTime`]: http://doc.rust-lang.org/nightly/std/time/struct.SystemTime.html
9653
9654
9655 Version 1.7.0 (2016-03-03)
9656 ==========================
9657
9658 Libraries
9659 ---------
9660
9661 * Stabilized APIs
9662 * `Path`
9663 * [`Path::strip_prefix`] (renamed from relative_from)
9664 * [`path::StripPrefixError`] (new error type returned from strip_prefix)
9665 * `Ipv4Addr`
9666 * [`Ipv4Addr::is_loopback`]
9667 * [`Ipv4Addr::is_private`]
9668 * [`Ipv4Addr::is_link_local`]
9669 * [`Ipv4Addr::is_multicast`]
9670 * [`Ipv4Addr::is_broadcast`]
9671 * [`Ipv4Addr::is_documentation`]
9672 * `Ipv6Addr`
9673 * [`Ipv6Addr::is_unspecified`]
9674 * [`Ipv6Addr::is_loopback`]
9675 * [`Ipv6Addr::is_multicast`]
9676 * `Vec`
9677 * [`Vec::as_slice`]
9678 * [`Vec::as_mut_slice`]
9679 * `String`
9680 * [`String::as_str`]
9681 * [`String::as_mut_str`]
9682 * Slices
9683 * `<[T]>::`[`clone_from_slice`], which now requires the two slices to
9684 be the same length
9685 * `<[T]>::`[`sort_by_key`]
9686 * checked, saturated, and overflowing operations
9687 * [`i32::checked_rem`], [`i32::checked_neg`], [`i32::checked_shl`], [`i32::checked_shr`]
9688 * [`i32::saturating_mul`]
9689 * [`i32::overflowing_add`], [`i32::overflowing_sub`], [`i32::overflowing_mul`], [`i32::overflowing_div`]
9690 * [`i32::overflowing_rem`], [`i32::overflowing_neg`], [`i32::overflowing_shl`], [`i32::overflowing_shr`]
9691 * [`u32::checked_rem`], [`u32::checked_neg`], [`u32::checked_shl`], [`u32::checked_shl`]
9692 * [`u32::saturating_mul`]
9693 * [`u32::overflowing_add`], [`u32::overflowing_sub`], [`u32::overflowing_mul`], [`u32::overflowing_div`]
9694 * [`u32::overflowing_rem`], [`u32::overflowing_neg`], [`u32::overflowing_shl`], [`u32::overflowing_shr`]
9695 * and checked, saturated, and overflowing operations for other primitive types
9696 * FFI
9697 * [`ffi::IntoStringError`]
9698 * [`CString::into_string`]
9699 * [`CString::into_bytes`]
9700 * [`CString::into_bytes_with_nul`]
9701 * `From<CString> for Vec<u8>`
9702 * `IntoStringError`
9703 * [`IntoStringError::into_cstring`]
9704 * [`IntoStringError::utf8_error`]
9705 * `Error for IntoStringError`
9706 * Hashing
9707 * [`std::hash::BuildHasher`]
9708 * [`BuildHasher::Hasher`]
9709 * [`BuildHasher::build_hasher`]
9710 * [`std::hash::BuildHasherDefault`]
9711 * [`HashMap::with_hasher`]
9712 * [`HashMap::with_capacity_and_hasher`]
9713 * [`HashSet::with_hasher`]
9714 * [`HashSet::with_capacity_and_hasher`]
9715 * [`std::collections::hash_map::RandomState`]
9716 * [`RandomState::new`]
9717 * [Validating UTF-8 is faster by a factor of between 7 and 14x for
9718 ASCII input][1.7utf8]. This means that creating `String`s and `str`s
9719 from bytes is faster.
9720 * [The performance of `LineWriter` (and thus `io::stdout`) was
9721 improved by using `memchr` to search for newlines][1.7m].
9722 * [`f32::to_degrees` and `f32::to_radians` are stable][1.7f]. The
9723 `f64` variants were stabilized previously.
9724 * [`BTreeMap` was rewritten to use less memory and improve the performance
9725 of insertion and iteration, the latter by as much as 5x][1.7bm].
9726 * [`BTreeSet` and its iterators, `Iter`, `IntoIter`, and `Range` are
9727 covariant over their contained type][1.7bt].
9728 * [`LinkedList` and its iterators, `Iter` and `IntoIter` are covariant
9729 over their contained type][1.7ll].
9730 * [`str::replace` now accepts a `Pattern`][1.7rp], like other string
9731 searching methods.
9732 * [`Any` is implemented for unsized types][1.7a].
9733 * [`Hash` is implemented for `Duration`][1.7h].
9734
9735 Misc
9736 ----
9737
9738 * [When running tests with `--test`, rustdoc will pass `--cfg`
9739 arguments to the compiler][1.7dt].
9740 * [The compiler is built with RPATH information by default][1.7rpa].
9741 This means that it will be possible to run `rustc` when installed in
9742 unusual configurations without configuring the dynamic linker search
9743 path explicitly.
9744 * [`rustc` passes `--enable-new-dtags` to GNU ld][1.7dta]. This makes
9745 any RPATH entries (emitted with `-C rpath`) *not* take precedence
9746 over `LD_LIBRARY_PATH`.
9747
9748 Cargo
9749 -----
9750
9751 * [`cargo rustc` accepts a `--profile` flag that runs `rustc` under
9752 any of the compilation profiles, 'dev', 'bench', or 'test'][1.7cp].
9753 * [The `rerun-if-changed` build script directive no longer causes the
9754 build script to incorrectly run twice in certain scenarios][1.7rr].
9755
9756 Compatibility Notes
9757 -------------------
9758
9759 * Soundness fixes to the interactions between associated types and
9760 lifetimes, specified in [RFC 1214], [now generate errors][1.7sf] for
9761 code that violates the new rules. This is a significant change that
9762 is known to break existing code, so it has emitted warnings for the
9763 new error cases since 1.4 to give crate authors time to adapt. The
9764 details of what is changing are subtle; read the RFC for more.
9765 * [Several bugs in the compiler's visibility calculations were
9766 fixed][1.7v]. Since this was found to break significant amounts of
9767 code, the new errors will be emitted as warnings for several release
9768 cycles, under the `private_in_public` lint.
9769 * Defaulted type parameters were accidentally accepted in positions
9770 that were not intended. In this release, [defaulted type parameters
9771 appearing outside of type definitions will generate a
9772 warning][1.7d], which will become an error in future releases.
9773 * [Parsing "." as a float results in an error instead of 0][1.7p].
9774 That is, `".".parse::<f32>()` returns `Err`, not `Ok(0.0)`.
9775 * [Borrows of closure parameters may not outlive the closure][1.7bc].
9776
9777 [1.7a]: https://github.com/rust-lang/rust/pull/30928
9778 [1.7bc]: https://github.com/rust-lang/rust/pull/30341
9779 [1.7bm]: https://github.com/rust-lang/rust/pull/30426
9780 [1.7bt]: https://github.com/rust-lang/rust/pull/30998
9781 [1.7cp]: https://github.com/rust-lang/cargo/pull/2224
9782 [1.7d]: https://github.com/rust-lang/rust/pull/30724
9783 [1.7dt]: https://github.com/rust-lang/rust/pull/30372
9784 [1.7dta]: https://github.com/rust-lang/rust/pull/30394
9785 [1.7f]: https://github.com/rust-lang/rust/pull/30672
9786 [1.7h]: https://github.com/rust-lang/rust/pull/30818
9787 [1.7ll]: https://github.com/rust-lang/rust/pull/30663
9788 [1.7m]: https://github.com/rust-lang/rust/pull/30381
9789 [1.7p]: https://github.com/rust-lang/rust/pull/30681
9790 [1.7rp]: https://github.com/rust-lang/rust/pull/29498
9791 [1.7rpa]: https://github.com/rust-lang/rust/pull/30353
9792 [1.7rr]: https://github.com/rust-lang/cargo/pull/2279
9793 [1.7sf]: https://github.com/rust-lang/rust/pull/30389
9794 [1.7utf8]: https://github.com/rust-lang/rust/pull/30740
9795 [1.7v]: https://github.com/rust-lang/rust/pull/29973
9796 [RFC 1214]: https://github.com/rust-lang/rfcs/blob/master/text/1214-projections-lifetimes-and-wf.md
9797 [`BuildHasher::Hasher`]: http://doc.rust-lang.org/nightly/std/hash/trait.Hasher.html
9798 [`BuildHasher::build_hasher`]: http://doc.rust-lang.org/nightly/std/hash/trait.BuildHasher.html#tymethod.build_hasher
9799 [`CString::into_bytes_with_nul`]: http://doc.rust-lang.org/nightly/std/ffi/struct.CString.html#method.into_bytes_with_nul
9800 [`CString::into_bytes`]: http://doc.rust-lang.org/nightly/std/ffi/struct.CString.html#method.into_bytes
9801 [`CString::into_string`]: http://doc.rust-lang.org/nightly/std/ffi/struct.CString.html#method.into_string
9802 [`HashMap::with_capacity_and_hasher`]: http://doc.rust-lang.org/nightly/std/collections/struct.HashMap.html#method.with_capacity_and_hasher
9803 [`HashMap::with_hasher`]: http://doc.rust-lang.org/nightly/std/collections/struct.HashMap.html#method.with_hasher
9804 [`HashSet::with_capacity_and_hasher`]: http://doc.rust-lang.org/nightly/std/collections/struct.HashSet.html#method.with_capacity_and_hasher
9805 [`HashSet::with_hasher`]: http://doc.rust-lang.org/nightly/std/collections/struct.HashSet.html#method.with_hasher
9806 [`IntoStringError::into_cstring`]: http://doc.rust-lang.org/nightly/std/ffi/struct.IntoStringError.html#method.into_cstring
9807 [`IntoStringError::utf8_error`]: http://doc.rust-lang.org/nightly/std/ffi/struct.IntoStringError.html#method.utf8_error
9808 [`Ipv4Addr::is_broadcast`]: http://doc.rust-lang.org/nightly/std/net/struct.Ipv4Addr.html#method.is_broadcast
9809 [`Ipv4Addr::is_documentation`]: http://doc.rust-lang.org/nightly/std/net/struct.Ipv4Addr.html#method.is_documentation
9810 [`Ipv4Addr::is_link_local`]: http://doc.rust-lang.org/nightly/std/net/struct.Ipv4Addr.html#method.is_link_local
9811 [`Ipv4Addr::is_loopback`]: http://doc.rust-lang.org/nightly/std/net/struct.Ipv4Addr.html#method.is_loopback
9812 [`Ipv4Addr::is_multicast`]: http://doc.rust-lang.org/nightly/std/net/struct.Ipv4Addr.html#method.is_multicast
9813 [`Ipv4Addr::is_private`]: http://doc.rust-lang.org/nightly/std/net/struct.Ipv4Addr.html#method.is_private
9814 [`Ipv6Addr::is_loopback`]: http://doc.rust-lang.org/nightly/std/net/struct.Ipv6Addr.html#method.is_loopback
9815 [`Ipv6Addr::is_multicast`]: http://doc.rust-lang.org/nightly/std/net/struct.Ipv6Addr.html#method.is_multicast
9816 [`Ipv6Addr::is_unspecified`]: http://doc.rust-lang.org/nightly/std/net/struct.Ipv6Addr.html#method.is_unspecified
9817 [`Path::strip_prefix`]: http://doc.rust-lang.org/nightly/std/path/struct.Path.html#method.strip_prefix
9818 [`RandomState::new`]: http://doc.rust-lang.org/nightly/std/collections/hash_map/struct.RandomState.html#method.new
9819 [`String::as_mut_str`]: http://doc.rust-lang.org/nightly/std/string/struct.String.html#method.as_mut_str
9820 [`String::as_str`]: http://doc.rust-lang.org/nightly/std/string/struct.String.html#method.as_str
9821 [`Vec::as_mut_slice`]: http://doc.rust-lang.org/nightly/std/vec/struct.Vec.html#method.as_mut_slice
9822 [`Vec::as_slice`]: http://doc.rust-lang.org/nightly/std/vec/struct.Vec.html#method.as_slice
9823 [`clone_from_slice`]: http://doc.rust-lang.org/nightly/std/primitive.slice.html#method.clone_from_slice
9824 [`ffi::IntoStringError`]: http://doc.rust-lang.org/nightly/std/ffi/struct.IntoStringError.html
9825 [`i32::checked_neg`]: http://doc.rust-lang.org/nightly/std/primitive.i32.html#method.checked_neg
9826 [`i32::checked_rem`]: http://doc.rust-lang.org/nightly/std/primitive.i32.html#method.checked_rem
9827 [`i32::checked_shl`]: http://doc.rust-lang.org/nightly/std/primitive.i32.html#method.checked_shl
9828 [`i32::checked_shr`]: http://doc.rust-lang.org/nightly/std/primitive.i32.html#method.checked_shr
9829 [`i32::overflowing_add`]: http://doc.rust-lang.org/nightly/std/primitive.i32.html#method.overflowing_add
9830 [`i32::overflowing_div`]: http://doc.rust-lang.org/nightly/std/primitive.i32.html#method.overflowing_div
9831 [`i32::overflowing_mul`]: http://doc.rust-lang.org/nightly/std/primitive.i32.html#method.overflowing_mul
9832 [`i32::overflowing_neg`]: http://doc.rust-lang.org/nightly/std/primitive.i32.html#method.overflowing_neg
9833 [`i32::overflowing_rem`]: http://doc.rust-lang.org/nightly/std/primitive.i32.html#method.overflowing_rem
9834 [`i32::overflowing_shl`]: http://doc.rust-lang.org/nightly/std/primitive.i32.html#method.overflowing_shl
9835 [`i32::overflowing_shr`]: http://doc.rust-lang.org/nightly/std/primitive.i32.html#method.overflowing_shr
9836 [`i32::overflowing_sub`]: http://doc.rust-lang.org/nightly/std/primitive.i32.html#method.overflowing_sub
9837 [`i32::saturating_mul`]: http://doc.rust-lang.org/nightly/std/primitive.i32.html#method.saturating_mul
9838 [`path::StripPrefixError`]: http://doc.rust-lang.org/nightly/std/path/struct.StripPrefixError.html
9839 [`sort_by_key`]: http://doc.rust-lang.org/nightly/std/primitive.slice.html#method.sort_by_key
9840 [`std::collections::hash_map::RandomState`]: http://doc.rust-lang.org/nightly/std/collections/hash_map/struct.RandomState.html
9841 [`std::hash::BuildHasherDefault`]: http://doc.rust-lang.org/nightly/std/hash/struct.BuildHasherDefault.html
9842 [`std::hash::BuildHasher`]: http://doc.rust-lang.org/nightly/std/hash/trait.BuildHasher.html
9843 [`u32::checked_neg`]: http://doc.rust-lang.org/nightly/std/primitive.u32.html#method.checked_neg
9844 [`u32::checked_rem`]: http://doc.rust-lang.org/nightly/std/primitive.u32.html#method.checked_rem
9845 [`u32::checked_neg`]: http://doc.rust-lang.org/nightly/std/primitive.u32.html#method.checked_neg
9846 [`u32::checked_shl`]: http://doc.rust-lang.org/nightly/std/primitive.u32.html#method.checked_shl
9847 [`u32::overflowing_add`]: http://doc.rust-lang.org/nightly/std/primitive.u32.html#method.overflowing_add
9848 [`u32::overflowing_div`]: http://doc.rust-lang.org/nightly/std/primitive.u32.html#method.overflowing_div
9849 [`u32::overflowing_mul`]: http://doc.rust-lang.org/nightly/std/primitive.u32.html#method.overflowing_mul
9850 [`u32::overflowing_neg`]: http://doc.rust-lang.org/nightly/std/primitive.u32.html#method.overflowing_neg
9851 [`u32::overflowing_rem`]: http://doc.rust-lang.org/nightly/std/primitive.u32.html#method.overflowing_rem
9852 [`u32::overflowing_shl`]: http://doc.rust-lang.org/nightly/std/primitive.u32.html#method.overflowing_shl
9853 [`u32::overflowing_shr`]: http://doc.rust-lang.org/nightly/std/primitive.u32.html#method.overflowing_shr
9854 [`u32::overflowing_sub`]: http://doc.rust-lang.org/nightly/std/primitive.u32.html#method.overflowing_sub
9855 [`u32::saturating_mul`]: http://doc.rust-lang.org/nightly/std/primitive.u32.html#method.saturating_mul
9856
9857
9858 Version 1.6.0 (2016-01-21)
9859 ==========================
9860
9861 Language
9862 --------
9863
9864 * The `#![no_std]` attribute causes a crate to not be linked to the
9865 standard library, but only the [core library][1.6co], as described
9866 in [RFC 1184]. The core library defines common types and traits but
9867 has no platform dependencies whatsoever, and is the basis for Rust
9868 software in environments that cannot support a full port of the
9869 standard library, such as operating systems. Most of the core
9870 library is now stable.
9871
9872 Libraries
9873 ---------
9874
9875 * Stabilized APIs:
9876 [`Read::read_exact`],
9877 [`ErrorKind::UnexpectedEof`] (renamed from `UnexpectedEOF`),
9878 [`fs::DirBuilder`], [`fs::DirBuilder::new`],
9879 [`fs::DirBuilder::recursive`], [`fs::DirBuilder::create`],
9880 [`os::unix::fs::DirBuilderExt`],
9881 [`os::unix::fs::DirBuilderExt::mode`], [`vec::Drain`],
9882 [`vec::Vec::drain`], [`string::Drain`], [`string::String::drain`],
9883 [`vec_deque::Drain`], [`vec_deque::VecDeque::drain`],
9884 [`collections::hash_map::Drain`],
9885 [`collections::hash_map::HashMap::drain`],
9886 [`collections::hash_set::Drain`],
9887 [`collections::hash_set::HashSet::drain`],
9888 [`collections::binary_heap::Drain`],
9889 [`collections::binary_heap::BinaryHeap::drain`],
9890 [`Vec::extend_from_slice`] (renamed from `push_all`),
9891 [`Mutex::get_mut`], [`Mutex::into_inner`], [`RwLock::get_mut`],
9892 [`RwLock::into_inner`],
9893 [`Iterator::min_by_key`] (renamed from `min_by`),
9894 [`Iterator::max_by_key`] (renamed from `max_by`).
9895 * The [core library][1.6co] is stable, as are most of its APIs.
9896 * [The `assert_eq!` macro supports arguments that don't implement
9897 `Sized`][1.6ae], such as arrays. In this way it behaves more like
9898 `assert!`.
9899 * Several timer functions that take duration in milliseconds [are
9900 deprecated in favor of those that take `Duration`][1.6ms]. These
9901 include `Condvar::wait_timeout_ms`, `thread::sleep_ms`, and
9902 `thread::park_timeout_ms`.
9903 * The algorithm by which `Vec` reserves additional elements was
9904 [tweaked to not allocate excessive space][1.6a] while still growing
9905 exponentially.
9906 * `From` conversions are [implemented from integers to floats][1.6f]
9907 in cases where the conversion is lossless. Thus they are not
9908 implemented for 32-bit ints to `f32`, nor for 64-bit ints to `f32`
9909 or `f64`. They are also not implemented for `isize` and `usize`
9910 because the implementations would be platform-specific. `From` is
9911 also implemented from `f32` to `f64`.
9912 * `From<&Path>` and `From<PathBuf>` are implemented for `Cow<Path>`.
9913 * `From<T>` is implemented for `Box<T>`, `Rc<T>` and `Arc<T>`.
9914 * `IntoIterator` is implemented for `&PathBuf` and `&Path`.
9915 * [`BinaryHeap` was refactored][1.6bh] for modest performance
9916 improvements.
9917 * Sorting slices that are already sorted [is 50% faster in some
9918 cases][1.6s].
9919
9920 Cargo
9921 -----
9922
9923 * Cargo will look in `$CARGO_HOME/bin` for subcommands [by default][1.6c].
9924 * Cargo build scripts can specify their dependencies by emitting the
9925 [`rerun-if-changed`][1.6rr] key.
9926 * crates.io will reject publication of crates with dependencies that
9927 have a wildcard version constraint. Crates with wildcard
9928 dependencies were seen to cause a variety of problems, as described
9929 in [RFC 1241]. Since 1.5 publication of such crates has emitted a
9930 warning.
9931 * `cargo clean` [accepts a `--release` flag][1.6cc] to clean the
9932 release folder. A variety of artifacts that Cargo failed to clean
9933 are now correctly deleted.
9934
9935 Misc
9936 ----
9937
9938 * The `unreachable_code` lint [warns when a function call's argument
9939 diverges][1.6dv].
9940 * The parser indicates [failures that may be caused by
9941 confusingly-similar Unicode characters][1.6uc]
9942 * Certain macro errors [are reported at definition time][1.6m], not
9943 expansion.
9944
9945 Compatibility Notes
9946 -------------------
9947
9948 * The compiler no longer makes use of the [`RUST_PATH`][1.6rp]
9949 environment variable when locating crates. This was a pre-cargo
9950 feature for integrating with the package manager that was
9951 accidentally never removed.
9952 * [A number of bugs were fixed in the privacy checker][1.6p] that
9953 could cause previously-accepted code to break.
9954 * [Modules and unit/tuple structs may not share the same name][1.6ts].
9955 * [Bugs in pattern matching unit structs were fixed][1.6us]. The tuple
9956 struct pattern syntax (`Foo(..)`) can no longer be used to match
9957 unit structs. This is a warning now, but will become an error in
9958 future releases. Patterns that share the same name as a const are
9959 now an error.
9960 * A bug was fixed that causes [rustc not to apply default type
9961 parameters][1.6xc] when resolving certain method implementations of
9962 traits defined in other crates.
9963
9964 [1.6a]: https://github.com/rust-lang/rust/pull/29454
9965 [1.6ae]: https://github.com/rust-lang/rust/pull/29770
9966 [1.6bh]: https://github.com/rust-lang/rust/pull/29811
9967 [1.6c]: https://github.com/rust-lang/cargo/pull/2192
9968 [1.6cc]: https://github.com/rust-lang/cargo/pull/2131
9969 [1.6co]: http://doc.rust-lang.org/core/index.html
9970 [1.6dv]: https://github.com/rust-lang/rust/pull/30000
9971 [1.6f]: https://github.com/rust-lang/rust/pull/29129
9972 [1.6m]: https://github.com/rust-lang/rust/pull/29828
9973 [1.6ms]: https://github.com/rust-lang/rust/pull/29604
9974 [1.6p]: https://github.com/rust-lang/rust/pull/29726
9975 [1.6rp]: https://github.com/rust-lang/rust/pull/30034
9976 [1.6rr]: https://github.com/rust-lang/cargo/pull/2134
9977 [1.6s]: https://github.com/rust-lang/rust/pull/29675
9978 [1.6ts]: https://github.com/rust-lang/rust/issues/21546
9979 [1.6uc]: https://github.com/rust-lang/rust/pull/29837
9980 [1.6us]: https://github.com/rust-lang/rust/pull/29383
9981 [1.6xc]: https://github.com/rust-lang/rust/issues/30123
9982 [RFC 1184]: https://github.com/rust-lang/rfcs/blob/master/text/1184-stabilize-no_std.md
9983 [RFC 1241]: https://github.com/rust-lang/rfcs/blob/master/text/1241-no-wildcard-deps.md
9984 [`ErrorKind::UnexpectedEof`]: http://doc.rust-lang.org/nightly/std/io/enum.ErrorKind.html#variant.UnexpectedEof
9985 [`Iterator::max_by_key`]: http://doc.rust-lang.org/nightly/std/iter/trait.Iterator.html#method.max_by_key
9986 [`Iterator::min_by_key`]: http://doc.rust-lang.org/nightly/std/iter/trait.Iterator.html#method.min_by_key
9987 [`Mutex::get_mut`]: http://doc.rust-lang.org/nightly/std/sync/struct.Mutex.html#method.get_mut
9988 [`Mutex::into_inner`]: http://doc.rust-lang.org/nightly/std/sync/struct.Mutex.html#method.into_inner
9989 [`Read::read_exact`]: http://doc.rust-lang.org/nightly/std/io/trait.Read.html#method.read_exact
9990 [`RwLock::get_mut`]: http://doc.rust-lang.org/nightly/std/sync/struct.RwLock.html#method.get_mut
9991 [`RwLock::into_inner`]: http://doc.rust-lang.org/nightly/std/sync/struct.RwLock.html#method.into_inner
9992 [`Vec::extend_from_slice`]: http://doc.rust-lang.org/nightly/collections/vec/struct.Vec.html#method.extend_from_slice
9993 [`collections::binary_heap::BinaryHeap::drain`]: http://doc.rust-lang.org/nightly/std/collections/binary_heap/struct.BinaryHeap.html#method.drain
9994 [`collections::binary_heap::Drain`]: http://doc.rust-lang.org/nightly/std/collections/binary_heap/struct.Drain.html
9995 [`collections::hash_map::Drain`]: http://doc.rust-lang.org/nightly/std/collections/hash_map/struct.Drain.html
9996 [`collections::hash_map::HashMap::drain`]: http://doc.rust-lang.org/nightly/std/collections/hash_map/struct.HashMap.html#method.drain
9997 [`collections::hash_set::Drain`]: http://doc.rust-lang.org/nightly/std/collections/hash_set/struct.Drain.html
9998 [`collections::hash_set::HashSet::drain`]: http://doc.rust-lang.org/nightly/std/collections/hash_set/struct.HashSet.html#method.drain
9999 [`fs::DirBuilder::create`]: http://doc.rust-lang.org/nightly/std/fs/struct.DirBuilder.html#method.create
10000 [`fs::DirBuilder::new`]: http://doc.rust-lang.org/nightly/std/fs/struct.DirBuilder.html#method.new
10001 [`fs::DirBuilder::recursive`]: http://doc.rust-lang.org/nightly/std/fs/struct.DirBuilder.html#method.recursive
10002 [`fs::DirBuilder`]: http://doc.rust-lang.org/nightly/std/fs/struct.DirBuilder.html
10003 [`os::unix::fs::DirBuilderExt::mode`]: http://doc.rust-lang.org/nightly/std/os/unix/fs/trait.DirBuilderExt.html#tymethod.mode
10004 [`os::unix::fs::DirBuilderExt`]: http://doc.rust-lang.org/nightly/std/os/unix/fs/trait.DirBuilderExt.html
10005 [`string::Drain`]: http://doc.rust-lang.org/nightly/std/string/struct.Drain.html
10006 [`string::String::drain`]: http://doc.rust-lang.org/nightly/std/string/struct.String.html#method.drain
10007 [`vec::Drain`]: http://doc.rust-lang.org/nightly/std/vec/struct.Drain.html
10008 [`vec::Vec::drain`]: http://doc.rust-lang.org/nightly/std/vec/struct.Vec.html#method.drain
10009 [`vec_deque::Drain`]: http://doc.rust-lang.org/nightly/std/collections/vec_deque/struct.Drain.html
10010 [`vec_deque::VecDeque::drain`]: http://doc.rust-lang.org/nightly/std/collections/vec_deque/struct.VecDeque.html#method.drain
10011
10012
10013 Version 1.5.0 (2015-12-10)
10014 ==========================
10015
10016 * ~700 changes, numerous bugfixes
10017
10018 Highlights
10019 ----------
10020
10021 * Stabilized APIs:
10022 [`BinaryHeap::from`], [`BinaryHeap::into_sorted_vec`],
10023 [`BinaryHeap::into_vec`], [`Condvar::wait_timeout`],
10024 [`FileTypeExt::is_block_device`], [`FileTypeExt::is_char_device`],
10025 [`FileTypeExt::is_fifo`], [`FileTypeExt::is_socket`],
10026 [`FileTypeExt`], [`Formatter::alternate`], [`Formatter::fill`],
10027 [`Formatter::precision`], [`Formatter::sign_aware_zero_pad`],
10028 [`Formatter::sign_minus`], [`Formatter::sign_plus`],
10029 [`Formatter::width`], [`Iterator::cmp`], [`Iterator::eq`],
10030 [`Iterator::ge`], [`Iterator::gt`], [`Iterator::le`],
10031 [`Iterator::lt`], [`Iterator::ne`], [`Iterator::partial_cmp`],
10032 [`Path::canonicalize`], [`Path::exists`], [`Path::is_dir`],
10033 [`Path::is_file`], [`Path::metadata`], [`Path::read_dir`],
10034 [`Path::read_link`], [`Path::symlink_metadata`],
10035 [`Utf8Error::valid_up_to`], [`Vec::resize`],
10036 [`VecDeque::as_mut_slices`], [`VecDeque::as_slices`],
10037 [`VecDeque::insert`], [`VecDeque::shrink_to_fit`],
10038 [`VecDeque::swap_remove_back`], [`VecDeque::swap_remove_front`],
10039 [`slice::split_first_mut`], [`slice::split_first`],
10040 [`slice::split_last_mut`], [`slice::split_last`],
10041 [`char::from_u32_unchecked`], [`fs::canonicalize`],
10042 [`str::MatchIndices`], [`str::RMatchIndices`],
10043 [`str::match_indices`], [`str::rmatch_indices`],
10044 [`str::slice_mut_unchecked`], [`string::ParseError`].
10045 * Rust applications hosted on crates.io can be installed locally to
10046 `~/.cargo/bin` with the [`cargo install`] command. Among other
10047 things this makes it easier to augment Cargo with new subcommands:
10048 when a binary named e.g. `cargo-foo` is found in `$PATH` it can be
10049 invoked as `cargo foo`.
10050 * Crates with wildcard (`*`) dependencies will [emit warnings when
10051 published][1.5w]. In 1.6 it will no longer be possible to publish
10052 crates with wildcard dependencies.
10053
10054 Breaking Changes
10055 ----------------
10056
10057 * The rules determining when a particular lifetime must outlive
10058 a particular value (known as '[dropck]') have been [modified
10059 to not rely on parametricity][1.5p].
10060 * [Implementations of `AsRef` and `AsMut` were added to `Box`, `Rc`,
10061 and `Arc`][1.5a]. Because these smart pointer types implement
10062 `Deref`, this causes breakage in cases where the interior type
10063 contains methods of the same name.
10064 * [Correct a bug in Rc/Arc][1.5c] that caused [dropck] to be unaware
10065 that they could drop their content. Soundness fix.
10066 * All method invocations are [properly checked][1.5wf1] for
10067 [well-formedness][1.5wf2]. Soundness fix.
10068 * Traits whose supertraits contain `Self` are [not object
10069 safe][1.5o]. Soundness fix.
10070 * Target specifications support a [`no_default_libraries`][1.5nd]
10071 setting that controls whether `-nodefaultlibs` is passed to the
10072 linker, and in turn the `is_like_windows` setting no longer affects
10073 the `-nodefaultlibs` flag.
10074 * `#[derive(Show)]`, long-deprecated, [has been removed][1.5ds].
10075 * The `#[inline]` and `#[repr]` attributes [can only appear
10076 in valid locations][1.5at].
10077 * Native libraries linked from the local crate are [passed to
10078 the linker before native libraries from upstream crates][1.5nl].
10079 * Two rarely-used attributes, `#[no_debug]` and
10080 `#[omit_gdb_pretty_printer_section]` [are feature gated][1.5fg].
10081 * Negation of unsigned integers, which has been a warning for
10082 several releases, [is now behind a feature gate and will
10083 generate errors][1.5nu].
10084 * The parser accidentally accepted visibility modifiers on
10085 enum variants, a bug [which has been fixed][1.5ev].
10086 * [A bug was fixed that allowed `use` statements to import unstable
10087 features][1.5use].
10088
10089 Language
10090 --------
10091
10092 * When evaluating expressions at compile-time that are not
10093 compile-time constants (const-evaluating expressions in non-const
10094 contexts), incorrect code such as overlong bitshifts and arithmetic
10095 overflow will [generate a warning instead of an error][1.5ce],
10096 delaying the error until runtime. This will allow the
10097 const-evaluator to be expanded in the future backwards-compatibly.
10098 * The `improper_ctypes` lint [no longer warns about using `isize` and
10099 `usize` in FFI][1.5ict].
10100
10101 Libraries
10102 ---------
10103
10104 * `Arc<T>` and `Rc<T>` are [covariant with respect to `T` instead of
10105 invariant][1.5c].
10106 * `Default` is [implemented for mutable slices][1.5d].
10107 * `FromStr` is [implemented for `SockAddrV4` and `SockAddrV6`][1.5s].
10108 * There are now `From` conversions [between floating point
10109 types][1.5f] where the conversions are lossless.
10110 * There are now `From` conversions [between integer types][1.5i] where
10111 the conversions are lossless.
10112 * [`fs::Metadata` implements `Clone`][1.5fs].
10113 * The `parse` method [accepts a leading "+" when parsing
10114 integers][1.5pi].
10115 * [`AsMut` is implemented for `Vec`][1.5am].
10116 * The `clone_from` implementations for `String` and `BinaryHeap` [have
10117 been optimized][1.5cf] and no longer rely on the default impl.
10118 * The `extern "Rust"`, `extern "C"`, `unsafe extern "Rust"` and
10119 `unsafe extern "C"` function types now [implement `Clone`,
10120 `PartialEq`, `Eq`, `PartialOrd`, `Ord`, `Hash`, `fmt::Pointer`, and
10121 `fmt::Debug` for up to 12 arguments][1.5fp].
10122 * [Dropping `Vec`s is much faster in unoptimized builds when the
10123 element types don't implement `Drop`][1.5dv].
10124 * A bug that caused in incorrect behavior when [combining `VecDeque`
10125 with zero-sized types][1.5vdz] was resolved.
10126 * [`PartialOrd` for slices is faster][1.5po].
10127
10128 Miscellaneous
10129 -------------
10130
10131 * [Crate metadata size was reduced by 20%][1.5md].
10132 * [Improvements to code generation reduced the size of libcore by 3.3
10133 MB and rustc's memory usage by 18MB][1.5m].
10134 * [Improvements to deref translation increased performance in
10135 unoptimized builds][1.5dr].
10136 * Various errors in trait resolution [are deduplicated to only be
10137 reported once][1.5te].
10138 * Rust has preliminary [support for rumprun kernels][1.5rr].
10139 * Rust has preliminary [support for NetBSD on amd64][1.5na].
10140
10141 [1.5use]: https://github.com/rust-lang/rust/pull/28364
10142 [1.5po]: https://github.com/rust-lang/rust/pull/28436
10143 [1.5ev]: https://github.com/rust-lang/rust/pull/28442
10144 [1.5nu]: https://github.com/rust-lang/rust/pull/28468
10145 [1.5dr]: https://github.com/rust-lang/rust/pull/28491
10146 [1.5vdz]: https://github.com/rust-lang/rust/pull/28494
10147 [1.5md]: https://github.com/rust-lang/rust/pull/28521
10148 [1.5fg]: https://github.com/rust-lang/rust/pull/28522
10149 [1.5dv]: https://github.com/rust-lang/rust/pull/28531
10150 [1.5na]: https://github.com/rust-lang/rust/pull/28543
10151 [1.5fp]: https://github.com/rust-lang/rust/pull/28560
10152 [1.5rr]: https://github.com/rust-lang/rust/pull/28593
10153 [1.5cf]: https://github.com/rust-lang/rust/pull/28602
10154 [1.5nl]: https://github.com/rust-lang/rust/pull/28605
10155 [1.5te]: https://github.com/rust-lang/rust/pull/28645
10156 [1.5at]: https://github.com/rust-lang/rust/pull/28650
10157 [1.5am]: https://github.com/rust-lang/rust/pull/28663
10158 [1.5m]: https://github.com/rust-lang/rust/pull/28778
10159 [1.5ict]: https://github.com/rust-lang/rust/pull/28779
10160 [1.5a]: https://github.com/rust-lang/rust/pull/28811
10161 [1.5pi]: https://github.com/rust-lang/rust/pull/28826
10162 [1.5ce]: https://github.com/rust-lang/rfcs/blob/master/text/1229-compile-time-asserts.md
10163 [1.5p]: https://github.com/rust-lang/rfcs/blob/master/text/1238-nonparametric-dropck.md
10164 [1.5i]: https://github.com/rust-lang/rust/pull/28921
10165 [1.5fs]: https://github.com/rust-lang/rust/pull/29021
10166 [1.5f]: https://github.com/rust-lang/rust/pull/29129
10167 [1.5ds]: https://github.com/rust-lang/rust/pull/29148
10168 [1.5s]: https://github.com/rust-lang/rust/pull/29190
10169 [1.5d]: https://github.com/rust-lang/rust/pull/29245
10170 [1.5o]: https://github.com/rust-lang/rust/pull/29259
10171 [1.5nd]: https://github.com/rust-lang/rust/pull/28578
10172 [1.5wf2]: https://github.com/rust-lang/rfcs/blob/master/text/1214-projections-lifetimes-and-wf.md
10173 [1.5wf1]: https://github.com/rust-lang/rust/pull/28669
10174 [dropck]: https://doc.rust-lang.org/nightly/nomicon/dropck.html
10175 [1.5c]: https://github.com/rust-lang/rust/pull/29110
10176 [1.5w]: https://github.com/rust-lang/rfcs/blob/master/text/1241-no-wildcard-deps.md
10177 [`cargo install`]: https://github.com/rust-lang/rfcs/blob/master/text/1200-cargo-install.md
10178 [`BinaryHeap::from`]: http://doc.rust-lang.org/nightly/std/convert/trait.From.html#method.from
10179 [`BinaryHeap::into_sorted_vec`]: http://doc.rust-lang.org/nightly/std/collections/struct.BinaryHeap.html#method.into_sorted_vec
10180 [`BinaryHeap::into_vec`]: http://doc.rust-lang.org/nightly/std/collections/struct.BinaryHeap.html#method.into_vec
10181 [`Condvar::wait_timeout`]: http://doc.rust-lang.org/nightly/std/sync/struct.Condvar.html#method.wait_timeout
10182 [`FileTypeExt::is_block_device`]: http://doc.rust-lang.org/nightly/std/os/unix/fs/trait.FileTypeExt.html#tymethod.is_block_device
10183 [`FileTypeExt::is_char_device`]: http://doc.rust-lang.org/nightly/std/os/unix/fs/trait.FileTypeExt.html#tymethod.is_char_device
10184 [`FileTypeExt::is_fifo`]: http://doc.rust-lang.org/nightly/std/os/unix/fs/trait.FileTypeExt.html#tymethod.is_fifo
10185 [`FileTypeExt::is_socket`]: http://doc.rust-lang.org/nightly/std/os/unix/fs/trait.FileTypeExt.html#tymethod.is_socket
10186 [`FileTypeExt`]: http://doc.rust-lang.org/nightly/std/os/unix/fs/trait.FileTypeExt.html
10187 [`Formatter::alternate`]: http://doc.rust-lang.org/nightly/core/fmt/struct.Formatter.html#method.alternate
10188 [`Formatter::fill`]: http://doc.rust-lang.org/nightly/core/fmt/struct.Formatter.html#method.fill
10189 [`Formatter::precision`]: http://doc.rust-lang.org/nightly/core/fmt/struct.Formatter.html#method.precision
10190 [`Formatter::sign_aware_zero_pad`]: http://doc.rust-lang.org/nightly/core/fmt/struct.Formatter.html#method.sign_aware_zero_pad
10191 [`Formatter::sign_minus`]: http://doc.rust-lang.org/nightly/core/fmt/struct.Formatter.html#method.sign_minus
10192 [`Formatter::sign_plus`]: http://doc.rust-lang.org/nightly/core/fmt/struct.Formatter.html#method.sign_plus
10193 [`Formatter::width`]: http://doc.rust-lang.org/nightly/core/fmt/struct.Formatter.html#method.width
10194 [`Iterator::cmp`]: http://doc.rust-lang.org/nightly/core/iter/trait.Iterator.html#method.cmp
10195 [`Iterator::eq`]: http://doc.rust-lang.org/nightly/core/iter/trait.Iterator.html#method.eq
10196 [`Iterator::ge`]: http://doc.rust-lang.org/nightly/core/iter/trait.Iterator.html#method.ge
10197 [`Iterator::gt`]: http://doc.rust-lang.org/nightly/core/iter/trait.Iterator.html#method.gt
10198 [`Iterator::le`]: http://doc.rust-lang.org/nightly/core/iter/trait.Iterator.html#method.le
10199 [`Iterator::lt`]: http://doc.rust-lang.org/nightly/core/iter/trait.Iterator.html#method.lt
10200 [`Iterator::ne`]: http://doc.rust-lang.org/nightly/core/iter/trait.Iterator.html#method.ne
10201 [`Iterator::partial_cmp`]: http://doc.rust-lang.org/nightly/core/iter/trait.Iterator.html#method.partial_cmp
10202 [`Path::canonicalize`]: http://doc.rust-lang.org/nightly/std/path/struct.Path.html#method.canonicalize
10203 [`Path::exists`]: http://doc.rust-lang.org/nightly/std/path/struct.Path.html#method.exists
10204 [`Path::is_dir`]: http://doc.rust-lang.org/nightly/std/path/struct.Path.html#method.is_dir
10205 [`Path::is_file`]: http://doc.rust-lang.org/nightly/std/path/struct.Path.html#method.is_file
10206 [`Path::metadata`]: http://doc.rust-lang.org/nightly/std/path/struct.Path.html#method.metadata
10207 [`Path::read_dir`]: http://doc.rust-lang.org/nightly/std/path/struct.Path.html#method.read_dir
10208 [`Path::read_link`]: http://doc.rust-lang.org/nightly/std/path/struct.Path.html#method.read_link
10209 [`Path::symlink_metadata`]: http://doc.rust-lang.org/nightly/std/path/struct.Path.html#method.symlink_metadata
10210 [`Utf8Error::valid_up_to`]: http://doc.rust-lang.org/nightly/core/str/struct.Utf8Error.html#method.valid_up_to
10211 [`Vec::resize`]: http://doc.rust-lang.org/nightly/std/vec/struct.Vec.html#method.resize
10212 [`VecDeque::as_mut_slices`]: http://doc.rust-lang.org/nightly/std/collections/struct.VecDeque.html#method.as_mut_slices
10213 [`VecDeque::as_slices`]: http://doc.rust-lang.org/nightly/std/collections/struct.VecDeque.html#method.as_slices
10214 [`VecDeque::insert`]: http://doc.rust-lang.org/nightly/std/collections/struct.VecDeque.html#method.insert
10215 [`VecDeque::shrink_to_fit`]: http://doc.rust-lang.org/nightly/std/collections/struct.VecDeque.html#method.shrink_to_fit
10216 [`VecDeque::swap_remove_back`]: http://doc.rust-lang.org/nightly/std/collections/struct.VecDeque.html#method.swap_remove_back
10217 [`VecDeque::swap_remove_front`]: http://doc.rust-lang.org/nightly/std/collections/struct.VecDeque.html#method.swap_remove_front
10218 [`slice::split_first_mut`]: http://doc.rust-lang.org/nightly/std/primitive.slice.html#method.split_first_mut
10219 [`slice::split_first`]: http://doc.rust-lang.org/nightly/std/primitive.slice.html#method.split_first
10220 [`slice::split_last_mut`]: http://doc.rust-lang.org/nightly/std/primitive.slice.html#method.split_last_mut
10221 [`slice::split_last`]: http://doc.rust-lang.org/nightly/std/primitive.slice.html#method.split_last
10222 [`char::from_u32_unchecked`]: http://doc.rust-lang.org/nightly/std/char/fn.from_u32_unchecked.html
10223 [`fs::canonicalize`]: http://doc.rust-lang.org/nightly/std/fs/fn.canonicalize.html
10224 [`str::MatchIndices`]: http://doc.rust-lang.org/nightly/std/str/struct.MatchIndices.html
10225 [`str::RMatchIndices`]: http://doc.rust-lang.org/nightly/std/str/struct.RMatchIndices.html
10226 [`str::match_indices`]: http://doc.rust-lang.org/nightly/std/primitive.str.html#method.match_indices
10227 [`str::rmatch_indices`]: http://doc.rust-lang.org/nightly/std/primitive.str.html#method.rmatch_indices
10228 [`str::slice_mut_unchecked`]: http://doc.rust-lang.org/nightly/std/primitive.str.html#method.slice_mut_unchecked
10229 [`string::ParseError`]: http://doc.rust-lang.org/nightly/std/string/enum.ParseError.html
10230
10231 Version 1.4.0 (2015-10-29)
10232 ==========================
10233
10234 * ~1200 changes, numerous bugfixes
10235
10236 Highlights
10237 ----------
10238
10239 * Windows builds targeting the 64-bit MSVC ABI and linker (instead of
10240 GNU) are now supported and recommended for use.
10241
10242 Breaking Changes
10243 ----------------
10244
10245 * [Several changes have been made to fix type soundness and improve
10246 the behavior of associated types][sound]. See [RFC 1214]. Although
10247 we have mostly introduced these changes as warnings this release, to
10248 become errors next release, there are still some scenarios that will
10249 see immediate breakage.
10250 * [The `str::lines` and `BufRead::lines` iterators treat `\r\n` as
10251 line breaks in addition to `\n`][crlf].
10252 * [Loans of `'static` lifetime extend to the end of a function][stat].
10253 * [`str::parse` no longer introduces avoidable rounding error when
10254 parsing floating point numbers. Together with earlier changes to
10255 float formatting/output, "round trips" like f.to_string().parse()
10256 now preserve the value of f exactly. Additionally, leading plus
10257 signs are now accepted][fp3].
10258
10259
10260 Language
10261 --------
10262
10263 * `use` statements that import multiple items [can now rename
10264 them][i], as in `use foo::{bar as kitten, baz as puppy}`.
10265 * [Binops work correctly on fat pointers][binfat].
10266 * `pub extern crate`, which does not behave as expected, [issues a
10267 warning][pec] until a better solution is found.
10268
10269 Libraries
10270 ---------
10271
10272 * [Many APIs were stabilized][stab]: `<Box<str>>::into_string`,
10273 [`Arc::downgrade`], [`Arc::get_mut`], [`Arc::make_mut`],
10274 [`Arc::try_unwrap`], [`Box::from_raw`], [`Box::into_raw`], [`CStr::to_str`],
10275 [`CStr::to_string_lossy`], [`CString::from_raw`], [`CString::into_raw`],
10276 [`IntoRawFd::into_raw_fd`], [`IntoRawFd`],
10277 `IntoRawHandle::into_raw_handle`, `IntoRawHandle`,
10278 `IntoRawSocket::into_raw_socket`, `IntoRawSocket`, [`Rc::downgrade`],
10279 [`Rc::get_mut`], [`Rc::make_mut`], [`Rc::try_unwrap`], [`Result::expect`],
10280 [`String::into_boxed_str`], [`TcpStream::read_timeout`],
10281 [`TcpStream::set_read_timeout`], [`TcpStream::set_write_timeout`],
10282 [`TcpStream::write_timeout`], [`UdpSocket::read_timeout`],
10283 [`UdpSocket::set_read_timeout`], [`UdpSocket::set_write_timeout`],
10284 [`UdpSocket::write_timeout`], `Vec::append`, `Vec::split_off`,
10285 [`VecDeque::append`], [`VecDeque::retain`], [`VecDeque::split_off`],
10286 [`rc::Weak::upgrade`], [`rc::Weak`], [`slice::Iter::as_slice`],
10287 [`slice::IterMut::into_slice`], [`str::CharIndices::as_str`],
10288 [`str::Chars::as_str`], [`str::split_at_mut`], [`str::split_at`],
10289 [`sync::Weak::upgrade`], [`sync::Weak`], [`thread::park_timeout`],
10290 [`thread::sleep`].
10291 * [Some APIs were deprecated][dep]: `BTreeMap::with_b`,
10292 `BTreeSet::with_b`, `Option::as_mut_slice`, `Option::as_slice`,
10293 `Result::as_mut_slice`, `Result::as_slice`, `f32::from_str_radix`,
10294 `f64::from_str_radix`.
10295 * [Reverse-searching strings is faster with the 'two-way'
10296 algorithm][s].
10297 * [`std::io::copy` allows `?Sized` arguments][cc].
10298 * The `Windows`, `Chunks`, and `ChunksMut` iterators over slices all
10299 [override `count`, `nth` and `last` with an *O*(1)
10300 implementation][it].
10301 * [`Default` is implemented for arrays up to `[T; 32]`][d].
10302 * [`IntoRawFd` has been added to the Unix-specific prelude,
10303 `IntoRawSocket` and `IntoRawHandle` to the Windows-specific
10304 prelude][pr].
10305 * [`Extend<String>` and `FromIterator<String` are both implemented for
10306 `String`][es].
10307 * [`IntoIterator` is implemented for references to `Option` and
10308 `Result`][into2].
10309 * [`HashMap` and `HashSet` implement `Extend<&T>` where `T:
10310 Copy`][ext] as part of [RFC 839]. This will cause type inference
10311 breakage in rare situations.
10312 * [`BinaryHeap` implements `Debug`][bh2].
10313 * [`Borrow` and `BorrowMut` are implemented for fixed-size
10314 arrays][bm].
10315 * [`extern fn`s with the "Rust" and "C" ABIs implement common
10316 traits including `Eq`, `Ord`, `Debug`, `Hash`][fp].
10317 * [String comparison is faster][faststr].
10318 * `&mut T` where `T: std::fmt::Write` [also implements
10319 `std::fmt::Write`][mutw].
10320 * [A stable regression in `VecDeque::push_back` and other
10321 capacity-altering methods that caused panics for zero-sized types
10322 was fixed][vd].
10323 * [Function pointers implement traits for up to 12 parameters][fp2].
10324
10325 Miscellaneous
10326 -------------
10327
10328 * The compiler [no longer uses the 'morestack' feature to prevent
10329 stack overflow][mm]. Instead it uses guard pages and stack
10330 probes (though stack probes are not yet implemented on any platform
10331 but Windows).
10332 * [The compiler matches traits faster when projections are involved][p].
10333 * The 'improper_ctypes' lint [no longer warns about use of `isize` and
10334 `usize`][ffi].
10335 * [Cargo now displays useful information about what its doing during
10336 `cargo update`][cu].
10337
10338 [`Arc::downgrade`]: http://doc.rust-lang.org/nightly/alloc/arc/struct.Arc.html#method.downgrade
10339 [`Arc::make_mut`]: http://doc.rust-lang.org/nightly/alloc/arc/struct.Arc.html#method.make_mut
10340 [`Arc::get_mut`]: http://doc.rust-lang.org/nightly/alloc/arc/struct.Arc.html#method.get_mut
10341 [`Arc::try_unwrap`]: http://doc.rust-lang.org/nightly/alloc/arc/struct.Arc.html#method.try_unwrap
10342 [`Box::from_raw`]: http://doc.rust-lang.org/nightly/alloc/boxed/struct.Box.html#method.from_raw
10343 [`Box::into_raw`]: http://doc.rust-lang.org/nightly/alloc/boxed/struct.Box.html#method.into_raw
10344 [`CStr::to_str`]: http://doc.rust-lang.org/nightly/std/ffi/struct.CStr.html#method.to_str
10345 [`CStr::to_string_lossy`]: http://doc.rust-lang.org/nightly/std/ffi/struct.CStr.html#method.to_string_lossy
10346 [`CString::from_raw`]: http://doc.rust-lang.org/nightly/std/ffi/struct.CString.html#method.from_raw
10347 [`CString::into_raw`]: http://doc.rust-lang.org/nightly/std/ffi/struct.CString.html#method.into_raw
10348 [`IntoRawFd::into_raw_fd`]: http://doc.rust-lang.org/nightly/std/os/unix/io/trait.IntoRawFd.html#tymethod.into_raw_fd
10349 [`IntoRawFd`]: http://doc.rust-lang.org/nightly/std/os/unix/io/trait.IntoRawFd.html
10350 [`Rc::downgrade`]: http://doc.rust-lang.org/nightly/alloc/rc/struct.Rc.html#method.downgrade
10351 [`Rc::get_mut`]: http://doc.rust-lang.org/nightly/alloc/rc/struct.Rc.html#method.get_mut
10352 [`Rc::make_mut`]: http://doc.rust-lang.org/nightly/alloc/rc/struct.Rc.html#method.make_mut
10353 [`Rc::try_unwrap`]: http://doc.rust-lang.org/nightly/alloc/rc/struct.Rc.html#method.try_unwrap
10354 [`Result::expect`]: http://doc.rust-lang.org/nightly/core/result/enum.Result.html#method.expect
10355 [`String::into_boxed_str`]: http://doc.rust-lang.org/nightly/collections/string/struct.String.html#method.into_boxed_str
10356 [`TcpStream::read_timeout`]: http://doc.rust-lang.org/nightly/std/net/struct.TcpStream.html#method.read_timeout
10357 [`TcpStream::set_read_timeout`]: http://doc.rust-lang.org/nightly/std/net/struct.TcpStream.html#method.set_read_timeout
10358 [`TcpStream::write_timeout`]: http://doc.rust-lang.org/nightly/std/net/struct.TcpStream.html#method.write_timeout
10359 [`TcpStream::set_write_timeout`]: http://doc.rust-lang.org/nightly/std/net/struct.TcpStream.html#method.set_write_timeout
10360 [`UdpSocket::read_timeout`]: http://doc.rust-lang.org/nightly/std/net/struct.TcpStream.html#method.read_timeout
10361 [`UdpSocket::set_read_timeout`]: http://doc.rust-lang.org/nightly/std/net/struct.TcpStream.html#method.set_read_timeout
10362 [`UdpSocket::write_timeout`]: http://doc.rust-lang.org/nightly/std/net/struct.TcpStream.html#method.write_timeout
10363 [`UdpSocket::set_write_timeout`]: http://doc.rust-lang.org/nightly/std/net/struct.TcpStream.html#method.set_write_timeout
10364 [`VecDeque::append`]: http://doc.rust-lang.org/nightly/std/collections/struct.VecDeque.html#method.append
10365 [`VecDeque::retain`]: http://doc.rust-lang.org/nightly/std/collections/struct.VecDeque.html#method.retain
10366 [`VecDeque::split_off`]: http://doc.rust-lang.org/nightly/std/collections/struct.VecDeque.html#method.split_off
10367 [`rc::Weak::upgrade`]: http://doc.rust-lang.org/nightly/std/rc/struct.Weak.html#method.upgrade
10368 [`rc::Weak`]: http://doc.rust-lang.org/nightly/std/rc/struct.Weak.html
10369 [`slice::Iter::as_slice`]: http://doc.rust-lang.org/nightly/std/slice/struct.Iter.html#method.as_slice
10370 [`slice::IterMut::into_slice`]: http://doc.rust-lang.org/nightly/std/slice/struct.IterMut.html#method.into_slice
10371 [`str::CharIndices::as_str`]: http://doc.rust-lang.org/nightly/std/str/struct.CharIndices.html#method.as_str
10372 [`str::Chars::as_str`]: http://doc.rust-lang.org/nightly/std/str/struct.Chars.html#method.as_str
10373 [`str::split_at_mut`]: http://doc.rust-lang.org/nightly/std/primitive.str.html#method.split_at_mut
10374 [`str::split_at`]: http://doc.rust-lang.org/nightly/std/primitive.str.html#method.split_at
10375 [`sync::Weak::upgrade`]: http://doc.rust-lang.org/nightly/std/sync/struct.Weak.html#method.upgrade
10376 [`sync::Weak`]: http://doc.rust-lang.org/nightly/std/sync/struct.Weak.html
10377 [`thread::park_timeout`]: http://doc.rust-lang.org/nightly/std/thread/fn.park_timeout.html
10378 [`thread::sleep`]: http://doc.rust-lang.org/nightly/std/thread/fn.sleep.html
10379 [bh2]: https://github.com/rust-lang/rust/pull/28156
10380 [binfat]: https://github.com/rust-lang/rust/pull/28270
10381 [bm]: https://github.com/rust-lang/rust/pull/28197
10382 [cc]: https://github.com/rust-lang/rust/pull/27531
10383 [crlf]: https://github.com/rust-lang/rust/pull/28034
10384 [cu]: https://github.com/rust-lang/cargo/pull/1931
10385 [d]: https://github.com/rust-lang/rust/pull/27825
10386 [dep]: https://github.com/rust-lang/rust/pull/28339
10387 [es]: https://github.com/rust-lang/rust/pull/27956
10388 [ext]: https://github.com/rust-lang/rust/pull/28094
10389 [faststr]: https://github.com/rust-lang/rust/pull/28338
10390 [ffi]: https://github.com/rust-lang/rust/pull/28779
10391 [fp]: https://github.com/rust-lang/rust/pull/28268
10392 [fp2]: https://github.com/rust-lang/rust/pull/28560
10393 [fp3]: https://github.com/rust-lang/rust/pull/27307
10394 [i]: https://github.com/rust-lang/rust/pull/27451
10395 [into2]: https://github.com/rust-lang/rust/pull/28039
10396 [it]: https://github.com/rust-lang/rust/pull/27652
10397 [mm]: https://github.com/rust-lang/rust/pull/27338
10398 [mutw]: https://github.com/rust-lang/rust/pull/28368
10399 [sound]: https://github.com/rust-lang/rust/pull/27641
10400 [p]: https://github.com/rust-lang/rust/pull/27866
10401 [pec]: https://github.com/rust-lang/rust/pull/28486
10402 [pr]: https://github.com/rust-lang/rust/pull/27896
10403 [RFC 839]: https://github.com/rust-lang/rfcs/blob/master/text/0839-embrace-extend-extinguish.md
10404 [RFC 1214]: https://github.com/rust-lang/rfcs/blob/master/text/1214-projections-lifetimes-and-wf.md
10405 [s]: https://github.com/rust-lang/rust/pull/27474
10406 [stab]: https://github.com/rust-lang/rust/pull/28339
10407 [stat]: https://github.com/rust-lang/rust/pull/28321
10408 [vd]: https://github.com/rust-lang/rust/pull/28494
10409
10410 Version 1.3.0 (2015-09-17)
10411 ==============================
10412
10413 * ~900 changes, numerous bugfixes
10414
10415 Highlights
10416 ----------
10417
10418 * The [new object lifetime defaults][nold] have been [turned
10419 on][nold2] after a cycle of warnings about the change. Now types
10420 like `&'a Box<Trait>` (or `&'a Rc<Trait>`, etc) will change from
10421 being interpreted as `&'a Box<Trait+'a>` to `&'a
10422 Box<Trait+'static>`.
10423 * [The Rustonomicon][nom] is a new book in the official documentation
10424 that dives into writing unsafe Rust.
10425 * The [`Duration`] API, [has been stabilized][ds]. This basic unit of
10426 timekeeping is employed by other std APIs, as well as out-of-tree
10427 time crates.
10428
10429 Breaking Changes
10430 ----------------
10431
10432 * The [new object lifetime defaults][nold] have been [turned
10433 on][nold2] after a cycle of warnings about the change.
10434 * There is a known [regression][lr] in how object lifetime elision is
10435 interpreted, the proper solution for which is undetermined.
10436 * The `#[prelude_import]` attribute, an internal implementation
10437 detail, was accidentally stabilized previously. [It has been put
10438 behind the `prelude_import` feature gate][pi]. This change is
10439 believed to break no existing code.
10440 * The behavior of [`size_of_val`][dst1] and [`align_of_val`][dst2] is
10441 [more sane for dynamically sized types][dst3]. Code that relied on
10442 the previous behavior is thought to be broken.
10443 * The `dropck` rules, which checks that destructors can't access
10444 destroyed values, [have been updated][dropck] to match the
10445 [RFC][dropckrfc]. This fixes some soundness holes, and as such will
10446 cause some previously-compiling code to no longer build.
10447
10448 Language
10449 --------
10450
10451 * The [new object lifetime defaults][nold] have been [turned
10452 on][nold2] after a cycle of warnings about the change.
10453 * Semicolons may [now follow types and paths in
10454 macros](https://github.com/rust-lang/rust/pull/27000).
10455 * The behavior of [`size_of_val`][dst1] and [`align_of_val`][dst2] is
10456 [more sane for dynamically sized types][dst3]. Code that relied on
10457 the previous behavior is not known to exist, and suspected to be
10458 broken.
10459 * `'static` variables [may now be recursive][st].
10460 * `ref` bindings choose between [`Deref`] and [`DerefMut`]
10461 implementations correctly.
10462 * The `dropck` rules, which checks that destructors can't access
10463 destroyed values, [have been updated][dropck] to match the
10464 [RFC][dropckrfc].
10465
10466 Libraries
10467 ---------
10468
10469 * The [`Duration`] API, [has been stabilized][ds], as well as the
10470 `std::time` module, which presently contains only `Duration`.
10471 * `Box<str>` and `Box<[T]>` both implement `Clone`.
10472 * The owned C string, [`CString`], implements [`Borrow`] and the
10473 borrowed C string, [`CStr`], implements [`ToOwned`]. The two of
10474 these allow C strings to be borrowed and cloned in generic code.
10475 * [`CStr`] implements [`Debug`].
10476 * [`AtomicPtr`] implements [`Debug`].
10477 * [`Error`] trait objects [can be downcast to their concrete types][e]
10478 in many common configurations, using the [`is`], [`downcast`],
10479 [`downcast_ref`] and [`downcast_mut`] methods, similarly to the
10480 [`Any`] trait.
10481 * Searching for substrings now [employs the two-way algorithm][search]
10482 instead of doing a naive search. This gives major speedups to a
10483 number of methods, including [`contains`][sc], [`find`][sf],
10484 [`rfind`][srf], [`split`][ss]. [`starts_with`][ssw] and
10485 [`ends_with`][sew] are also faster.
10486 * The performance of `PartialEq` for slices is [much faster][ps].
10487 * The [`Hash`] trait offers the default method, [`hash_slice`], which
10488 is overridden and optimized by the implementations for scalars.
10489 * The [`Hasher`] trait now has a number of specialized `write_*`
10490 methods for primitive types, for efficiency.
10491 * The I/O-specific error type, [`std::io::Error`][ie], gained a set of
10492 methods for accessing the 'inner error', if any: [`get_ref`][iegr],
10493 [`get_mut`][iegm], [`into_inner`][ieii]. As well, the implementation
10494 of [`std::error::Error::cause`][iec] also delegates to the inner
10495 error.
10496 * [`process::Child`][pc] gained the [`id`] method, which returns a
10497 `u32` representing the platform-specific process identifier.
10498 * The [`connect`] method on slices is deprecated, replaced by the new
10499 [`join`] method (note that both of these are on the *unstable*
10500 [`SliceConcatExt`] trait, but through the magic of the prelude are
10501 available to stable code anyway).
10502 * The [`Div`] operator is implemented for [`Wrapping`] types.
10503 * [`DerefMut` is implemented for `String`][dms].
10504 * Performance of SipHash (the default hasher for `HashMap`) is
10505 [better for long data][sh].
10506 * [`AtomicPtr`] implements [`Send`].
10507 * The [`read_to_end`] implementations for [`Stdin`] and [`File`]
10508 are now [specialized to use uninitialized buffers for increased
10509 performance][rte].
10510 * Lifetime parameters of foreign functions [are now resolved
10511 properly][f].
10512
10513 Misc
10514 ----
10515
10516 * Rust can now, with some coercion, [produce programs that run on
10517 Windows XP][xp], though XP is not considered a supported platform.
10518 * Porting Rust on Windows from the GNU toolchain to MSVC continues
10519 ([1][win1], [2][win2], [3][win3], [4][win4]). It is still not
10520 recommended for use in 1.3, though should be fully-functional
10521 in the [64-bit 1.4 beta][b14].
10522 * On Fedora-based systems installation will [properly configure the
10523 dynamic linker][fl].
10524 * The compiler gained many new extended error descriptions, which can
10525 be accessed with the `--explain` flag.
10526 * The `dropck` pass, which checks that destructors can't access
10527 destroyed values, [has been rewritten][27261]. This fixes some
10528 soundness holes, and as such will cause some previously-compiling
10529 code to no longer build.
10530 * `rustc` now uses [LLVM to write archive files where possible][ar].
10531 Eventually this will eliminate the compiler's dependency on the ar
10532 utility.
10533 * Rust has [preliminary support for i686 FreeBSD][26959] (it has long
10534 supported FreeBSD on x86_64).
10535 * The [`unused_mut`][lum], [`unconditional_recursion`][lur],
10536 [`improper_ctypes`][lic], and [`negate_unsigned`][lnu] lints are
10537 more strict.
10538 * If landing pads are disabled (with `-Z no-landing-pads`), [`panic!`
10539 will kill the process instead of leaking][nlp].
10540
10541 [`Any`]: http://doc.rust-lang.org/nightly/std/any/trait.Any.html
10542 [`AtomicPtr`]: http://doc.rust-lang.org/nightly/std/sync/atomic/struct.AtomicPtr.html
10543 [`Borrow`]: http://doc.rust-lang.org/nightly/std/borrow/trait.Borrow.html
10544 [`CStr`]: http://doc.rust-lang.org/nightly/std/ffi/struct.CStr.html
10545 [`CString`]: http://doc.rust-lang.org/nightly/std/ffi/struct.CString.html
10546 [`Debug`]: http://doc.rust-lang.org/nightly/std/fmt/trait.Debug.html
10547 [`DerefMut`]: http://doc.rust-lang.org/nightly/std/ops/trait.DerefMut.html
10548 [`Deref`]: http://doc.rust-lang.org/nightly/std/ops/trait.Deref.html
10549 [`Div`]: http://doc.rust-lang.org/nightly/std/ops/trait.Div.html
10550 [`Duration`]: http://doc.rust-lang.org/nightly/std/time/struct.Duration.html
10551 [`Error`]: http://doc.rust-lang.org/nightly/std/error/trait.Error.html
10552 [`File`]: http://doc.rust-lang.org/nightly/std/fs/struct.File.html
10553 [`Hash`]: http://doc.rust-lang.org/nightly/std/hash/trait.Hash.html
10554 [`Hasher`]: http://doc.rust-lang.org/nightly/std/hash/trait.Hasher.html
10555 [`Send`]: http://doc.rust-lang.org/nightly/std/marker/trait.Send.html
10556 [`SliceConcatExt`]: http://doc.rust-lang.org/nightly/std/slice/trait.SliceConcatExt.html
10557 [`Stdin`]: http://doc.rust-lang.org/nightly/std/io/struct.Stdin.html
10558 [`ToOwned`]: http://doc.rust-lang.org/nightly/std/borrow/trait.ToOwned.html
10559 [`Wrapping`]: http://doc.rust-lang.org/nightly/std/num/struct.Wrapping.html
10560 [`connect`]: http://doc.rust-lang.org/nightly/std/slice/trait.SliceConcatExt.html#method.connect
10561 [`downcast_mut`]: http://doc.rust-lang.org/nightly/std/error/trait.Error.html#method.downcast_mut
10562 [`downcast_ref`]: http://doc.rust-lang.org/nightly/std/error/trait.Error.html#method.downcast_ref
10563 [`downcast`]: http://doc.rust-lang.org/nightly/std/error/trait.Error.html#method.downcast
10564 [`hash_slice`]: http://doc.rust-lang.org/nightly/std/hash/trait.Hash.html#method.hash_slice
10565 [`id`]: http://doc.rust-lang.org/nightly/std/process/struct.Child.html#method.id
10566 [`is`]: http://doc.rust-lang.org/nightly/std/error/trait.Error.html#method.is
10567 [`join`]: http://doc.rust-lang.org/nightly/std/slice/trait.SliceConcatExt.html#method.join
10568 [`read_to_end`]: http://doc.rust-lang.org/nightly/std/io/trait.Read.html#method.read_to_end
10569 [ar]: https://github.com/rust-lang/rust/pull/26926
10570 [b14]: https://static.rust-lang.org/dist/rust-beta-x86_64-pc-windows-msvc.msi
10571 [dms]: https://github.com/rust-lang/rust/pull/26241
10572 [27261]: https://github.com/rust-lang/rust/pull/27261
10573 [dropckrfc]: https://github.com/rust-lang/rfcs/blob/master/text/0769-sound-generic-drop.md
10574 [ds]: https://github.com/rust-lang/rust/pull/26818
10575 [dst1]: http://doc.rust-lang.org/nightly/std/mem/fn.size_of_val.html
10576 [dst2]: http://doc.rust-lang.org/nightly/std/mem/fn.align_of_val.html
10577 [dst3]: https://github.com/rust-lang/rust/pull/27351
10578 [e]: https://github.com/rust-lang/rust/pull/24793
10579 [f]: https://github.com/rust-lang/rust/pull/26588
10580 [26959]: https://github.com/rust-lang/rust/pull/26959
10581 [fl]: https://github.com/rust-lang/rust-installer/pull/41
10582 [ie]: http://doc.rust-lang.org/nightly/std/io/struct.Error.html
10583 [iec]: http://doc.rust-lang.org/nightly/std/io/struct.Error.html#method.cause
10584 [iegm]: http://doc.rust-lang.org/nightly/std/io/struct.Error.html#method.get_mut
10585 [iegr]: http://doc.rust-lang.org/nightly/std/io/struct.Error.html#method.get_ref
10586 [ieii]: http://doc.rust-lang.org/nightly/std/io/struct.Error.html#method.into_inner
10587 [lic]: https://github.com/rust-lang/rust/pull/26583
10588 [lnu]: https://github.com/rust-lang/rust/pull/27026
10589 [lr]: https://github.com/rust-lang/rust/issues/27248
10590 [lum]: https://github.com/rust-lang/rust/pull/26378
10591 [lur]: https://github.com/rust-lang/rust/pull/26783
10592 [nlp]: https://github.com/rust-lang/rust/pull/27176
10593 [nold2]: https://github.com/rust-lang/rust/pull/27045
10594 [nold]: https://github.com/rust-lang/rfcs/blob/master/text/1156-adjust-default-object-bounds.md
10595 [nom]: http://doc.rust-lang.org/nightly/nomicon/
10596 [pc]: http://doc.rust-lang.org/nightly/std/process/struct.Child.html
10597 [pi]: https://github.com/rust-lang/rust/pull/26699
10598 [ps]: https://github.com/rust-lang/rust/pull/26884
10599 [rte]: https://github.com/rust-lang/rust/pull/26950
10600 [sc]: http://doc.rust-lang.org/nightly/std/primitive.str.html#method.contains
10601 [search]: https://github.com/rust-lang/rust/pull/26327
10602 [sew]: http://doc.rust-lang.org/nightly/std/primitive.str.html#method.ends_with
10603 [sf]: http://doc.rust-lang.org/nightly/std/primitive.str.html#method.find
10604 [sh]: https://github.com/rust-lang/rust/pull/27280
10605 [srf]: http://doc.rust-lang.org/nightly/std/primitive.str.html#method.rfind
10606 [ss]: http://doc.rust-lang.org/nightly/std/primitive.str.html#method.split
10607 [ssw]: http://doc.rust-lang.org/nightly/std/primitive.str.html#method.starts_with
10608 [st]: https://github.com/rust-lang/rust/pull/26630
10609 [win1]: https://github.com/rust-lang/rust/pull/26569
10610 [win2]: https://github.com/rust-lang/rust/pull/26741
10611 [win3]: https://github.com/rust-lang/rust/pull/26741
10612 [win4]: https://github.com/rust-lang/rust/pull/27210
10613 [xp]: https://github.com/rust-lang/rust/pull/26569
10614
10615 Version 1.2.0 (2015-08-07)
10616 ==========================
10617
10618 * ~1200 changes, numerous bugfixes
10619
10620 Highlights
10621 ----------
10622
10623 * [Dynamically-sized-type coercions][dst] allow smart pointer types
10624 like `Rc` to contain types without a fixed size, arrays and trait
10625 objects, finally enabling use of `Rc<[T]>` and completing the
10626 implementation of DST.
10627 * [Parallel codegen][parcodegen] is now working again, which can
10628 substantially speed up large builds in debug mode; It also gets
10629 another ~33% speedup when bootstrapping on a 4 core machine (using 8
10630 jobs). It's not enabled by default, but will be "in the near
10631 future". It can be activated with the `-C codegen-units=N` flag to
10632 `rustc`.
10633 * This is the first release with [experimental support for linking
10634 with the MSVC linker and lib C on Windows (instead of using the GNU
10635 variants via MinGW)][win]. It is yet recommended only for the most
10636 intrepid Rustaceans.
10637 * Benchmark compilations are showing a 30% improvement in
10638 bootstrapping over 1.1.
10639
10640 Breaking Changes
10641 ----------------
10642
10643 * The [`to_uppercase`] and [`to_lowercase`] methods on `char` now do
10644 unicode case mapping, which is a previously-planned change in
10645 behavior and considered a bugfix.
10646 * [`mem::align_of`] now specifies [the *minimum alignment* for
10647 T][align], which is usually the alignment programs are interested
10648 in, and the same value reported by clang's
10649 `alignof`. [`mem::min_align_of`] is deprecated. This is not known to
10650 break real code.
10651 * [The `#[packed]` attribute is no longer silently accepted by the
10652 compiler][packed]. This attribute did nothing and code that
10653 mentioned it likely did not work as intended.
10654 * Associated type defaults are [now behind the
10655 `associated_type_defaults` feature gate][ad]. In 1.1 associated type
10656 defaults *did not work*, but could be mentioned syntactically. As
10657 such this breakage has minimal impact.
10658
10659 Language
10660 --------
10661
10662 * Patterns with `ref mut` now correctly invoke [`DerefMut`] when
10663 matching against dereferenceable values.
10664
10665 Libraries
10666 ---------
10667
10668 * The [`Extend`] trait, which grows a collection from an iterator, is
10669 implemented over iterators of references, for `String`, `Vec`,
10670 `LinkedList`, `VecDeque`, `EnumSet`, `BinaryHeap`, `VecMap`,
10671 `BTreeSet` and `BTreeMap`. [RFC][extend-rfc].
10672 * The [`iter::once`] function returns an iterator that yields a single
10673 element, and [`iter::empty`] returns an iterator that yields no
10674 elements.
10675 * The [`matches`] and [`rmatches`] methods on `str` return iterators
10676 over substring matches.
10677 * [`Cell`] and [`RefCell`] both implement `Eq`.
10678 * A number of methods for wrapping arithmetic are added to the
10679 integral types, [`wrapping_div`], [`wrapping_rem`],
10680 [`wrapping_neg`], [`wrapping_shl`], [`wrapping_shr`]. These are in
10681 addition to the existing [`wrapping_add`], [`wrapping_sub`], and
10682 [`wrapping_mul`] methods, and alternatives to the [`Wrapping`]
10683 type.. It is illegal for the default arithmetic operations in Rust
10684 to overflow; the desire to wrap must be explicit.
10685 * The `{:#?}` formatting specifier [displays the alternate,
10686 pretty-printed][debugfmt] form of the `Debug` formatter. This
10687 feature was actually introduced prior to 1.0 with little
10688 fanfare.
10689 * [`fmt::Formatter`] implements [`fmt::Write`], a `fmt`-specific trait
10690 for writing data to formatted strings, similar to [`io::Write`].
10691 * [`fmt::Formatter`] adds 'debug builder' methods, [`debug_struct`],
10692 [`debug_tuple`], [`debug_list`], [`debug_set`], [`debug_map`]. These
10693 are used by code generators to emit implementations of [`Debug`].
10694 * `str` has new [`to_uppercase`][strup] and [`to_lowercase`][strlow]
10695 methods that convert case, following Unicode case mapping.
10696 * It is now easier to handle poisoned locks. The [`PoisonError`]
10697 type, returned by failing lock operations, exposes `into_inner`,
10698 `get_ref`, and `get_mut`, which all give access to the inner lock
10699 guard, and allow the poisoned lock to continue to operate. The
10700 `is_poisoned` method of [`RwLock`] and [`Mutex`] can poll for a
10701 poisoned lock without attempting to take the lock.
10702 * On Unix the [`FromRawFd`] trait is implemented for [`Stdio`], and
10703 [`AsRawFd`] for [`ChildStdin`], [`ChildStdout`], [`ChildStderr`].
10704 On Windows the `FromRawHandle` trait is implemented for `Stdio`,
10705 and `AsRawHandle` for `ChildStdin`, `ChildStdout`,
10706 `ChildStderr`.
10707 * [`io::ErrorKind`] has a new variant, `InvalidData`, which indicates
10708 malformed input.
10709
10710 Misc
10711 ----
10712
10713 * `rustc` employs smarter heuristics for guessing at [typos].
10714 * `rustc` emits more efficient code for [no-op conversions between
10715 unsafe pointers][nop].
10716 * Fat pointers are now [passed in pairs of immediate arguments][fat],
10717 resulting in faster compile times and smaller code.
10718
10719 [`Extend`]: https://doc.rust-lang.org/nightly/std/iter/trait.Extend.html
10720 [extend-rfc]: https://github.com/rust-lang/rfcs/blob/master/text/0839-embrace-extend-extinguish.md
10721 [`iter::once`]: https://doc.rust-lang.org/nightly/std/iter/fn.once.html
10722 [`iter::empty`]: https://doc.rust-lang.org/nightly/std/iter/fn.empty.html
10723 [`matches`]: https://doc.rust-lang.org/nightly/std/primitive.str.html#method.matches
10724 [`rmatches`]: https://doc.rust-lang.org/nightly/std/primitive.str.html#method.rmatches
10725 [`Cell`]: https://doc.rust-lang.org/nightly/std/cell/struct.Cell.html
10726 [`RefCell`]: https://doc.rust-lang.org/nightly/std/cell/struct.RefCell.html
10727 [`wrapping_add`]: https://doc.rust-lang.org/nightly/std/primitive.i8.html#method.wrapping_add
10728 [`wrapping_sub`]: https://doc.rust-lang.org/nightly/std/primitive.i8.html#method.wrapping_sub
10729 [`wrapping_mul`]: https://doc.rust-lang.org/nightly/std/primitive.i8.html#method.wrapping_mul
10730 [`wrapping_div`]: https://doc.rust-lang.org/nightly/std/primitive.i8.html#method.wrapping_div
10731 [`wrapping_rem`]: https://doc.rust-lang.org/nightly/std/primitive.i8.html#method.wrapping_rem
10732 [`wrapping_neg`]: https://doc.rust-lang.org/nightly/std/primitive.i8.html#method.wrapping_neg
10733 [`wrapping_shl`]: https://doc.rust-lang.org/nightly/std/primitive.i8.html#method.wrapping_shl
10734 [`wrapping_shr`]: https://doc.rust-lang.org/nightly/std/primitive.i8.html#method.wrapping_shr
10735 [`Wrapping`]: https://doc.rust-lang.org/nightly/std/num/struct.Wrapping.html
10736 [`fmt::Formatter`]: https://doc.rust-lang.org/nightly/std/fmt/struct.Formatter.html
10737 [`fmt::Write`]: https://doc.rust-lang.org/nightly/std/fmt/trait.Write.html
10738 [`io::Write`]: https://doc.rust-lang.org/nightly/std/io/trait.Write.html
10739 [`debug_struct`]: https://doc.rust-lang.org/nightly/core/fmt/struct.Formatter.html#method.debug_struct
10740 [`debug_tuple`]: https://doc.rust-lang.org/nightly/core/fmt/struct.Formatter.html#method.debug_tuple
10741 [`debug_list`]: https://doc.rust-lang.org/nightly/core/fmt/struct.Formatter.html#method.debug_list
10742 [`debug_set`]: https://doc.rust-lang.org/nightly/core/fmt/struct.Formatter.html#method.debug_set
10743 [`debug_map`]: https://doc.rust-lang.org/nightly/core/fmt/struct.Formatter.html#method.debug_map
10744 [`Debug`]: https://doc.rust-lang.org/nightly/std/fmt/trait.Debug.html
10745 [strup]: https://doc.rust-lang.org/nightly/std/primitive.str.html#method.to_uppercase
10746 [strlow]: https://doc.rust-lang.org/nightly/std/primitive.str.html#method.to_lowercase
10747 [`to_uppercase`]: https://doc.rust-lang.org/nightly/std/primitive.char.html#method.to_uppercase
10748 [`to_lowercase`]: https://doc.rust-lang.org/nightly/std/primitive.char.html#method.to_lowercase
10749 [`PoisonError`]: https://doc.rust-lang.org/nightly/std/sync/struct.PoisonError.html
10750 [`RwLock`]: https://doc.rust-lang.org/nightly/std/sync/struct.RwLock.html
10751 [`Mutex`]: https://doc.rust-lang.org/nightly/std/sync/struct.Mutex.html
10752 [`FromRawFd`]: https://doc.rust-lang.org/nightly/std/os/unix/io/trait.FromRawFd.html
10753 [`AsRawFd`]: https://doc.rust-lang.org/nightly/std/os/unix/io/trait.AsRawFd.html
10754 [`Stdio`]: https://doc.rust-lang.org/nightly/std/process/struct.Stdio.html
10755 [`ChildStdin`]: https://doc.rust-lang.org/nightly/std/process/struct.ChildStdin.html
10756 [`ChildStdout`]: https://doc.rust-lang.org/nightly/std/process/struct.ChildStdout.html
10757 [`ChildStderr`]: https://doc.rust-lang.org/nightly/std/process/struct.ChildStderr.html
10758 [`io::ErrorKind`]: https://doc.rust-lang.org/nightly/std/io/enum.ErrorKind.html
10759 [debugfmt]: https://www.reddit.com/r/rust/comments/3ceaui/psa_produces_prettyprinted_debug_output/
10760 [`DerefMut`]: https://doc.rust-lang.org/nightly/std/ops/trait.DerefMut.html
10761 [`mem::align_of`]: https://doc.rust-lang.org/nightly/std/mem/fn.align_of.html
10762 [align]: https://github.com/rust-lang/rust/pull/25646
10763 [`mem::min_align_of`]: https://doc.rust-lang.org/nightly/std/mem/fn.min_align_of.html
10764 [typos]: https://github.com/rust-lang/rust/pull/26087
10765 [nop]: https://github.com/rust-lang/rust/pull/26336
10766 [fat]: https://github.com/rust-lang/rust/pull/26411
10767 [dst]: https://github.com/rust-lang/rfcs/blob/master/text/0982-dst-coercion.md
10768 [parcodegen]: https://github.com/rust-lang/rust/pull/26018
10769 [packed]: https://github.com/rust-lang/rust/pull/25541
10770 [ad]: https://github.com/rust-lang/rust/pull/27382
10771 [win]: https://github.com/rust-lang/rust/pull/25350
10772
10773 Version 1.1.0 (2015-06-25)
10774 =========================
10775
10776 * ~850 changes, numerous bugfixes
10777
10778 Highlights
10779 ----------
10780
10781 * The [`std::fs` module has been expanded][fs] to expand the set of
10782 functionality exposed:
10783 * `DirEntry` now supports optimizations like `file_type` and `metadata` which
10784 don't incur a syscall on some platforms.
10785 * A `symlink_metadata` function has been added.
10786 * The `fs::Metadata` structure now lowers to its OS counterpart, providing
10787 access to all underlying information.
10788 * The compiler now contains extended explanations of many errors. When an error
10789 with an explanation occurs the compiler suggests using the `--explain` flag
10790 to read the explanation. Error explanations are also [available online][err-index].
10791 * Thanks to multiple [improvements][sk] to [type checking][pre], as
10792 well as other work, the time to bootstrap the compiler decreased by
10793 32%.
10794
10795 Libraries
10796 ---------
10797
10798 * The [`str::split_whitespace`] method splits a string on unicode
10799 whitespace boundaries.
10800 * On both Windows and Unix, new extension traits provide conversion of
10801 I/O types to and from the underlying system handles. On Unix, these
10802 traits are [`FromRawFd`] and [`AsRawFd`], on Windows `FromRawHandle`
10803 and `AsRawHandle`. These are implemented for `File`, `TcpStream`,
10804 `TcpListener`, and `UpdSocket`. Further implementations for
10805 `std::process` will be stabilized later.
10806 * On Unix, [`std::os::unix::symlink`] creates symlinks. On
10807 Windows, symlinks can be created with
10808 `std::os::windows::symlink_dir` and
10809 `std::os::windows::symlink_file`.
10810 * The `mpsc::Receiver` type can now be converted into an iterator with
10811 `into_iter` on the [`IntoIterator`] trait.
10812 * `Ipv4Addr` can be created from `u32` with the `From<u32>`
10813 implementation of the [`From`] trait.
10814 * The `Debug` implementation for `RangeFull` [creates output that is
10815 more consistent with other implementations][rf].
10816 * [`Debug` is implemented for `File`][file].
10817 * The `Default` implementation for `Arc` [no longer requires `Sync +
10818 Send`][arc].
10819 * [The `Iterator` methods `count`, `nth`, and `last` have been
10820 overridden for slices to have *O*(1) performance instead of *O*(*n*)][si].
10821 * Incorrect handling of paths on Windows has been improved in both the
10822 compiler and the standard library.
10823 * [`AtomicPtr` gained a `Default` implementation][ap].
10824 * In accordance with Rust's policy on arithmetic overflow `abs` now
10825 [panics on overflow when debug assertions are enabled][abs].
10826 * The [`Cloned`] iterator, which was accidentally left unstable for
10827 1.0 [has been stabilized][c].
10828 * The [`Incoming`] iterator, which iterates over incoming TCP
10829 connections, and which was accidentally unnamable in 1.0, [is now
10830 properly exported][inc].
10831 * [`BinaryHeap`] no longer corrupts itself [when functions called by
10832 `sift_up` or `sift_down` panic][bh].
10833 * The [`split_off`] method of `LinkedList` [no longer corrupts
10834 the list in certain scenarios][ll].
10835
10836 Misc
10837 ----
10838
10839 * Type checking performance [has improved notably][sk] with
10840 [multiple improvements][pre].
10841 * The compiler [suggests code changes][ch] for more errors.
10842 * rustc and it's build system have experimental support for [building
10843 toolchains against MUSL][m] instead of glibc on Linux.
10844 * The compiler defines the `target_env` cfg value, which is used for
10845 distinguishing toolchains that are otherwise for the same
10846 platform. Presently this is set to `gnu` for common GNU Linux
10847 targets and for MinGW targets, and `musl` for MUSL Linux targets.
10848 * The [`cargo rustc`][crc] command invokes a build with custom flags
10849 to rustc.
10850 * [Android executables are always position independent][pie].
10851 * [The `drop_with_repr_extern` lint warns about mixing `repr(C)`
10852 with `Drop`][24935].
10853
10854 [`str::split_whitespace`]: https://doc.rust-lang.org/nightly/std/primitive.str.html#method.split_whitespace
10855 [`FromRawFd`]: https://doc.rust-lang.org/nightly/std/os/unix/io/trait.FromRawFd.html
10856 [`AsRawFd`]: https://doc.rust-lang.org/nightly/std/os/unix/io/trait.AsRawFd.html
10857 [`std::os::unix::symlink`]: https://doc.rust-lang.org/nightly/std/os/unix/fs/fn.symlink.html
10858 [`IntoIterator`]: https://doc.rust-lang.org/nightly/std/iter/trait.IntoIterator.html
10859 [`From`]: https://doc.rust-lang.org/nightly/std/convert/trait.From.html
10860 [rf]: https://github.com/rust-lang/rust/pull/24491
10861 [err-index]: https://doc.rust-lang.org/error-index.html
10862 [sk]: https://github.com/rust-lang/rust/pull/24615
10863 [pre]: https://github.com/rust-lang/rust/pull/25323
10864 [file]: https://github.com/rust-lang/rust/pull/24598
10865 [ch]: https://github.com/rust-lang/rust/pull/24683
10866 [arc]: https://github.com/rust-lang/rust/pull/24695
10867 [si]: https://github.com/rust-lang/rust/pull/24701
10868 [ap]: https://github.com/rust-lang/rust/pull/24834
10869 [m]: https://github.com/rust-lang/rust/pull/24777
10870 [fs]: https://github.com/rust-lang/rfcs/blob/master/text/1044-io-fs-2.1.md
10871 [crc]: https://github.com/rust-lang/cargo/pull/1568
10872 [pie]: https://github.com/rust-lang/rust/pull/24953
10873 [abs]: https://github.com/rust-lang/rust/pull/25441
10874 [c]: https://github.com/rust-lang/rust/pull/25496
10875 [`Cloned`]: https://doc.rust-lang.org/nightly/std/iter/struct.Cloned.html
10876 [`Incoming`]: https://doc.rust-lang.org/nightly/std/net/struct.Incoming.html
10877 [inc]: https://github.com/rust-lang/rust/pull/25522
10878 [bh]: https://github.com/rust-lang/rust/pull/25856
10879 [`BinaryHeap`]: https://doc.rust-lang.org/nightly/std/collections/struct.BinaryHeap.html
10880 [ll]: https://github.com/rust-lang/rust/pull/26022
10881 [`split_off`]: https://doc.rust-lang.org/nightly/collections/linked_list/struct.LinkedList.html#method.split_off
10882 [24935]: https://github.com/rust-lang/rust/pull/24935
10883
10884 Version 1.0.0 (2015-05-15)
10885 ========================
10886
10887 * ~1500 changes, numerous bugfixes
10888
10889 Highlights
10890 ----------
10891
10892 * The vast majority of the standard library is now `#[stable]`. It is
10893 no longer possible to use unstable features with a stable build of
10894 the compiler.
10895 * Many popular crates on [crates.io] now work on the stable release
10896 channel.
10897 * Arithmetic on basic integer types now [checks for overflow in debug
10898 builds][overflow].
10899
10900 Language
10901 --------
10902
10903 * Several [restrictions have been added to trait coherence][coh] in
10904 order to make it easier for upstream authors to change traits
10905 without breaking downstream code.
10906 * Digits of binary and octal literals are [lexed more eagerly][lex] to
10907 improve error messages and macro behavior. For example, `0b1234` is
10908 now lexed as `0b1234` instead of two tokens, `0b1` and `234`.
10909 * Trait bounds [are always invariant][inv], eliminating the need for
10910 the `PhantomFn` and `MarkerTrait` lang items, which have been
10911 removed.
10912 * ["-" is no longer a valid character in crate names][cr], the `extern crate
10913 "foo" as bar` syntax has been replaced with `extern crate foo as
10914 bar`, and Cargo now automatically translates "-" in *package* names
10915 to underscore for the crate name.
10916 * [Lifetime shadowing is an error][lt].
10917 * [`Send` no longer implies `'static`][send-rfc].
10918 * [UFCS now supports trait-less associated paths][moar-ufcs] like
10919 `MyType::default()`.
10920 * Primitive types [now have inherent methods][prim-inherent],
10921 obviating the need for extension traits like `SliceExt`.
10922 * Methods with `Self: Sized` in their `where` clause are [considered
10923 object-safe][self-sized], allowing many extension traits like
10924 `IteratorExt` to be merged into the traits they extended.
10925 * You can now [refer to associated types][assoc-where] whose
10926 corresponding trait bounds appear only in a `where` clause.
10927 * The final bits of [OIBIT landed][oibit-final], meaning that traits
10928 like `Send` and `Sync` are now library-defined.
10929 * A [Reflect trait][reflect] was introduced, which means that
10930 downcasting via the `Any` trait is effectively limited to concrete
10931 types. This helps retain the potentially-important "parametricity"
10932 property: generic code cannot behave differently for different type
10933 arguments except in minor ways.
10934 * The `unsafe_destructor` feature is now deprecated in favor of the
10935 [new `dropck`][rfc769]. This change is a major reduction in unsafe
10936 code.
10937
10938 Libraries
10939 ---------
10940
10941 * The `thread_local` module [has been renamed to `std::thread`][th].
10942 * The methods of `IteratorExt` [have been moved to the `Iterator`
10943 trait itself][23300].
10944 * Several traits that implement Rust's conventions for type
10945 conversions, `AsMut`, `AsRef`, `From`, and `Into` have been
10946 [centralized in the `std::convert` module][con].
10947 * The `FromError` trait [was removed in favor of `From`][fe].
10948 * The basic sleep function [has moved to
10949 `std::thread::sleep_ms`][slp].
10950 * The `splitn` function now takes an `n` parameter that represents the
10951 number of items yielded by the returned iterator [instead of the
10952 number of 'splits'][spl].
10953 * [On Unix, all file descriptors are `CLOEXEC` by default][clo].
10954 * [Derived implementations of `PartialOrd` now order enums according
10955 to their explicitly-assigned discriminants][po].
10956 * [Methods for searching strings are generic over `Pattern`s][pat],
10957 implemented presently by `&char`, `&str`, `FnMut(char) -> bool` and
10958 some others.
10959 * [In method resolution, object methods are resolved before inherent
10960 methods][meth].
10961 * [`String::from_str` has been deprecated in favor of the `From` impl,
10962 `String::from`][24517].
10963 * [`io::Error` implements `Sync`][ios].
10964 * [The `words` method on `&str` has been replaced with
10965 `split_whitespace`][sw], to avoid answering the tricky question, 'what is
10966 a word?'
10967 * The new path and IO modules are complete and `#[stable]`. This
10968 was the major library focus for this cycle.
10969 * The path API was [revised][path-normalize] to normalize `.`,
10970 adjusting the tradeoffs in favor of the most common usage.
10971 * A large number of remaining APIs in `std` were also stabilized
10972 during this cycle; about 75% of the non-deprecated API surface
10973 is now stable.
10974 * The new [string pattern API][string-pattern] landed, which makes
10975 the string slice API much more internally consistent and flexible.
10976 * A new set of [generic conversion traits][conversion] replaced
10977 many existing ad hoc traits.
10978 * Generic numeric traits were [completely removed][num-traits]. This
10979 was made possible thanks to inherent methods for primitive types,
10980 and the removal gives maximal flexibility for designing a numeric
10981 hierarchy in the future.
10982 * The `Fn` traits are now related via [inheritance][fn-inherit]
10983 and provide ergonomic [blanket implementations][fn-blanket].
10984 * The `Index` and `IndexMut` traits were changed to
10985 [take the index by value][index-value], enabling code like
10986 `hash_map["string"]` to work.
10987 * `Copy` now [inherits][copy-clone] from `Clone`, meaning that all
10988 `Copy` data is known to be `Clone` as well.
10989
10990 Misc
10991 ----
10992
10993 * Many errors now have extended explanations that can be accessed with
10994 the `--explain` flag to `rustc`.
10995 * Many new examples have been added to the standard library
10996 documentation.
10997 * rustdoc has received a number of improvements focused on completion
10998 and polish.
10999 * Metadata was tuned, shrinking binaries [by 27%][metadata-shrink].
11000 * Much headway was made on ecosystem-wide CI, making it possible
11001 to [compare builds for breakage][ci-compare].
11002
11003
11004 [crates.io]: http://crates.io
11005 [clo]: https://github.com/rust-lang/rust/pull/24034
11006 [coh]: https://github.com/rust-lang/rfcs/blob/master/text/1023-rebalancing-coherence.md
11007 [con]: https://github.com/rust-lang/rust/pull/23875
11008 [cr]: https://github.com/rust-lang/rust/pull/23419
11009 [fe]: https://github.com/rust-lang/rust/pull/23879
11010 [23300]: https://github.com/rust-lang/rust/pull/23300
11011 [inv]: https://github.com/rust-lang/rust/pull/23938
11012 [ios]: https://github.com/rust-lang/rust/pull/24133
11013 [lex]: https://github.com/rust-lang/rfcs/blob/master/text/0879-small-base-lexing.md
11014 [lt]: https://github.com/rust-lang/rust/pull/24057
11015 [meth]: https://github.com/rust-lang/rust/pull/24056
11016 [pat]: https://github.com/rust-lang/rfcs/blob/master/text/0528-string-patterns.md
11017 [po]: https://github.com/rust-lang/rust/pull/24270
11018 [24517]: https://github.com/rust-lang/rust/pull/24517
11019 [slp]: https://github.com/rust-lang/rust/pull/23949
11020 [spl]: https://github.com/rust-lang/rfcs/blob/master/text/0979-align-splitn-with-other-languages.md
11021 [sw]: https://github.com/rust-lang/rfcs/blob/master/text/1054-str-words.md
11022 [th]: https://github.com/rust-lang/rfcs/blob/master/text/0909-move-thread-local-to-std-thread.md
11023 [send-rfc]: https://github.com/rust-lang/rfcs/blob/master/text/0458-send-improvements.md
11024 [moar-ufcs]: https://github.com/rust-lang/rust/pull/22172
11025 [prim-inherent]: https://github.com/rust-lang/rust/pull/23104
11026 [overflow]: https://github.com/rust-lang/rfcs/blob/master/text/0560-integer-overflow.md
11027 [metadata-shrink]: https://github.com/rust-lang/rust/pull/22971
11028 [self-sized]: https://github.com/rust-lang/rust/pull/22301
11029 [assoc-where]: https://github.com/rust-lang/rust/pull/22512
11030 [string-pattern]: https://github.com/rust-lang/rust/pull/22466
11031 [oibit-final]: https://github.com/rust-lang/rust/pull/21689
11032 [reflect]: https://github.com/rust-lang/rust/pull/23712
11033 [conversion]: https://github.com/rust-lang/rfcs/pull/529
11034 [num-traits]: https://github.com/rust-lang/rust/pull/23549
11035 [index-value]: https://github.com/rust-lang/rust/pull/23601
11036 [rfc769]: https://github.com/rust-lang/rfcs/pull/769
11037 [ci-compare]: https://gist.github.com/brson/a30a77836fbec057cbee
11038 [fn-inherit]: https://github.com/rust-lang/rust/pull/23282
11039 [fn-blanket]: https://github.com/rust-lang/rust/pull/23895
11040 [copy-clone]: https://github.com/rust-lang/rust/pull/23860
11041 [path-normalize]: https://github.com/rust-lang/rust/pull/23229
11042
11043
11044 Version 1.0.0-alpha.2 (2015-02-20)
11045 =====================================
11046
11047 * ~1300 changes, numerous bugfixes
11048
11049 * Highlights
11050
11051 * The various I/O modules were [overhauled][io-rfc] to reduce
11052 unnecessary abstractions and provide better interoperation with
11053 the underlying platform. The old `io` module remains temporarily
11054 at `std::old_io`.
11055 * The standard library now [participates in feature gating][feat],
11056 so use of unstable libraries now requires a `#![feature(...)]`
11057 attribute. The impact of this change is [described on the
11058 forum][feat-forum]. [RFC][feat-rfc].
11059
11060 * Language
11061
11062 * `for` loops [now operate on the `IntoIterator` trait][into],
11063 which eliminates the need to call `.iter()`, etc. to iterate
11064 over collections. There are some new subtleties to remember
11065 though regarding what sort of iterators various types yield, in
11066 particular that `for foo in bar { }` yields values from a move
11067 iterator, destroying the original collection. [RFC][into-rfc].
11068 * Objects now have [default lifetime bounds][obj], so you don't
11069 have to write `Box<Trait+'static>` when you don't care about
11070 storing references. [RFC][obj-rfc].
11071 * In types that implement `Drop`, [lifetimes must outlive the
11072 value][drop]. This will soon make it possible to safely
11073 implement `Drop` for types where `#[unsafe_destructor]` is now
11074 required. Read the [gorgeous RFC][drop-rfc] for details.
11075 * The fully qualified <T as Trait>::X syntax lets you set the Self
11076 type for a trait method or associated type. [RFC][ufcs-rfc].
11077 * References to types that implement `Deref<U>` now [automatically
11078 coerce to references][deref] to the dereferenced type `U`,
11079 e.g. `&T where T: Deref<U>` automatically coerces to `&U`. This
11080 should eliminate many unsightly uses of `&*`, as when converting
11081 from references to vectors into references to
11082 slices. [RFC][deref-rfc].
11083 * The explicit [closure kind syntax][close] (`|&:|`, `|&mut:|`,
11084 `|:|`) is obsolete and closure kind is inferred from context.
11085 * [`Self` is a keyword][Self].
11086
11087 * Libraries
11088
11089 * The `Show` and `String` formatting traits [have been
11090 renamed][fmt] to `Debug` and `Display` to more clearly reflect
11091 their related purposes. Automatically getting a string
11092 conversion to use with `format!("{:?}", something_to_debug)` is
11093 now written `#[derive(Debug)]`.
11094 * Abstract [OS-specific string types][osstr], `std::ff::{OsString,
11095 OsStr}`, provide strings in platform-specific encodings for easier
11096 interop with system APIs. [RFC][osstr-rfc].
11097 * The `boxed::into_raw` and `Box::from_raw` functions [convert
11098 between `Box<T>` and `*mut T`][boxraw], a common pattern for
11099 creating raw pointers.
11100
11101 * Tooling
11102
11103 * Certain long error messages of the form 'expected foo found bar'
11104 are now [split neatly across multiple
11105 lines][multiline]. Examples in the PR.
11106 * On Unix Rust can be [uninstalled][un] by running
11107 `/usr/local/lib/rustlib/uninstall.sh`.
11108 * The `#[rustc_on_unimplemented]` attribute, requiring the
11109 'on_unimplemented' feature, lets rustc [display custom error
11110 messages when a trait is expected to be implemented for a type
11111 but is not][onun].
11112
11113 * Misc
11114
11115 * Rust is tested against a [LALR grammar][lalr], which parses
11116 almost all the Rust files that rustc does.
11117
11118 [boxraw]: https://github.com/rust-lang/rust/pull/21318
11119 [close]: https://github.com/rust-lang/rust/pull/21843
11120 [deref]: https://github.com/rust-lang/rust/pull/21351
11121 [deref-rfc]: https://github.com/rust-lang/rfcs/blob/master/text/0241-deref-conversions.md
11122 [drop]: https://github.com/rust-lang/rust/pull/21972
11123 [drop-rfc]: https://github.com/rust-lang/rfcs/blob/master/text/0769-sound-generic-drop.md
11124 [feat]: https://github.com/rust-lang/rust/pull/21248
11125 [feat-forum]: https://users.rust-lang.org/t/psa-important-info-about-rustcs-new-feature-staging/82/5
11126 [feat-rfc]: https://github.com/rust-lang/rfcs/blob/master/text/0507-release-channels.md
11127 [fmt]: https://github.com/rust-lang/rust/pull/21457
11128 [into]: https://github.com/rust-lang/rust/pull/20790
11129 [into-rfc]: https://github.com/rust-lang/rfcs/blob/master/text/0235-collections-conventions.md#intoiterator-and-iterable
11130 [io-rfc]: https://github.com/rust-lang/rfcs/blob/master/text/0517-io-os-reform.md
11131 [lalr]: https://github.com/rust-lang/rust/pull/21452
11132 [multiline]: https://github.com/rust-lang/rust/pull/19870
11133 [obj]: https://github.com/rust-lang/rust/pull/22230
11134 [obj-rfc]: https://github.com/rust-lang/rfcs/blob/master/text/0599-default-object-bound.md
11135 [onun]: https://github.com/rust-lang/rust/pull/20889
11136 [osstr]: https://github.com/rust-lang/rust/pull/21488
11137 [osstr-rfc]: https://github.com/rust-lang/rfcs/blob/master/text/0517-io-os-reform.md
11138 [Self]: https://github.com/rust-lang/rust/pull/22158
11139 [ufcs-rfc]: https://github.com/rust-lang/rfcs/blob/master/text/0132-ufcs.md
11140 [un]: https://github.com/rust-lang/rust/pull/22256
11141
11142
11143 Version 1.0.0-alpha (2015-01-09)
11144 ==================================
11145
11146 * ~2400 changes, numerous bugfixes
11147
11148 * Highlights
11149
11150 * The language itself is considered feature complete for 1.0,
11151 though there will be many usability improvements and bugfixes
11152 before the final release.
11153 * Nearly 50% of the public API surface of the standard library has
11154 been declared 'stable'. Those interfaces are unlikely to change
11155 before 1.0.
11156 * The long-running debate over integer types has been
11157 [settled][ints]: Rust will ship with types named `isize` and
11158 `usize`, rather than `int` and `uint`, for pointer-sized
11159 integers. Guidelines will be rolled out during the alpha cycle.
11160 * Most crates that are not `std` have been moved out of the Rust
11161 distribution into the Cargo ecosystem so they can evolve
11162 separately and don't need to be stabilized as quickly, including
11163 'time', 'getopts', 'num', 'regex', and 'term'.
11164 * Documentation continues to be expanded with more API coverage, more
11165 examples, and more in-depth explanations. The guides have been
11166 consolidated into [The Rust Programming Language][trpl].
11167 * "[Rust By Example][rbe]" is now maintained by the Rust team.
11168 * All official Rust binary installers now come with [Cargo], the
11169 Rust package manager.
11170
11171 * Language
11172
11173 * Closures have been [completely redesigned][unboxed] to be
11174 implemented in terms of traits, can now be used as generic type
11175 bounds and thus monomorphized and inlined, or via an opaque
11176 pointer (boxed) as in the old system. The new system is often
11177 referred to as 'unboxed' closures.
11178 * Traits now support [associated types][assoc], allowing families
11179 of related types to be defined together and used generically in
11180 powerful ways.
11181 * Enum variants are [namespaced by their type names][enum].
11182 * [`where` clauses][where] provide a more versatile and attractive
11183 syntax for specifying generic bounds, though the previous syntax
11184 remains valid.
11185 * Rust again picks a [fallback][fb] (either i32 or f64) for uninferred
11186 numeric types.
11187 * Rust [no longer has a runtime][rt] of any description, and only
11188 supports OS threads, not green threads.
11189 * At long last, Rust has been overhauled for 'dynamically-sized
11190 types' ([DST]), which integrates 'fat pointers' (object types,
11191 arrays, and `str`) more deeply into the type system, making it
11192 more consistent.
11193 * Rust now has a general [range syntax][range], `i..j`, `i..`, and
11194 `..j` that produce range types and which, when combined with the
11195 `Index` operator and multidispatch, leads to a convenient slice
11196 notation, `[i..j]`.
11197 * The new range syntax revealed an ambiguity in the fixed-length
11198 array syntax, so now fixed length arrays [are written `[T;
11199 N]`][arrays].
11200 * The `Copy` trait is no longer implemented automatically. Unsafe
11201 pointers no longer implement `Sync` and `Send` so types
11202 containing them don't automatically either. `Sync` and `Send`
11203 are now 'unsafe traits' so one can "forcibly" implement them via
11204 `unsafe impl` if a type confirms to the requirements for them
11205 even though the internals do not (e.g. structs containing unsafe
11206 pointers like `Arc`). These changes are intended to prevent some
11207 footguns and are collectively known as [opt-in built-in
11208 traits][oibit] (though `Sync` and `Send` will soon become pure
11209 library types unknown to the compiler).
11210 * Operator traits now take their operands [by value][ops], and
11211 comparison traits can use multidispatch to compare one type
11212 against multiple other types, allowing e.g. `String` to be
11213 compared with `&str`.
11214 * `if let` and `while let` are no longer feature-gated.
11215 * Rust has adopted a more [uniform syntax for escaping unicode
11216 characters][unicode].
11217 * `macro_rules!` [has been declared stable][mac]. Though it is a
11218 flawed system it is sufficiently popular that it must be usable
11219 for 1.0. Effort has gone into [future-proofing][mac-future] it
11220 in ways that will allow other macro systems to be developed in
11221 parallel, and won't otherwise impact the evolution of the
11222 language.
11223 * The prelude has been [pared back significantly][prelude] such
11224 that it is the minimum necessary to support the most pervasive
11225 code patterns, and through [generalized where clauses][where]
11226 many of the prelude extension traits have been consolidated.
11227 * Rust's rudimentary reflection [has been removed][refl], as it
11228 incurred too much code generation for little benefit.
11229 * [Struct variants][structvars] are no longer feature-gated.
11230 * Trait bounds can be [polymorphic over lifetimes][hrtb]. Also
11231 known as 'higher-ranked trait bounds', this crucially allows
11232 unboxed closures to work.
11233 * Macros invocations surrounded by parens or square brackets and
11234 not terminated by a semicolon are [parsed as
11235 expressions][macros], which makes expressions like `vec![1i32,
11236 2, 3].len()` work as expected.
11237 * Trait objects now implement their traits automatically, and
11238 traits that can be coerced to objects now must be [object
11239 safe][objsafe].
11240 * Automatically deriving traits is now done with `#[derive(...)]`
11241 not `#[deriving(...)]` for [consistency with other naming
11242 conventions][derive].
11243 * Importing the containing module or enum at the same time as
11244 items or variants they contain is [now done with `self` instead
11245 of `mod`][self], as in use `foo::{self, bar}`
11246 * Glob imports are no longer feature-gated.
11247 * The `box` operator and `box` patterns have been feature-gated
11248 pending a redesign. For now unique boxes should be allocated
11249 like other containers, with `Box::new`.
11250
11251 * Libraries
11252
11253 * A [series][coll1] of [efforts][coll2] to establish
11254 [conventions][coll3] for collections types has resulted in API
11255 improvements throughout the standard library.
11256 * New [APIs for error handling][err] provide ergonomic interop
11257 between error types, and [new conventions][err-conv] describe
11258 more clearly the recommended error handling strategies in Rust.
11259 * The `fail!` macro has been renamed to [`panic!`][panic] so that
11260 it is easier to discuss failure in the context of error handling
11261 without making clarifications as to whether you are referring to
11262 the 'fail' macro or failure more generally.
11263 * On Linux, `OsRng` prefers the new, more reliable `getrandom`
11264 syscall when available.
11265 * The 'serialize' crate has been renamed 'rustc-serialize' and
11266 moved out of the distribution to Cargo. Although it is widely
11267 used now, it is expected to be superseded in the near future.
11268 * The `Show` formatter, typically implemented with
11269 `#[derive(Show)]` is [now requested with the `{:?}`
11270 specifier][show] and is intended for use by all types, for uses
11271 such as `println!` debugging. The new `String` formatter must be
11272 implemented by hand, uses the `{}` specifier, and is intended
11273 for full-fidelity conversions of things that can logically be
11274 represented as strings.
11275
11276 * Tooling
11277
11278 * [Flexible target specification][flex] allows rustc's code
11279 generation to be configured to support otherwise-unsupported
11280 platforms.
11281 * Rust comes with rust-gdb and rust-lldb scripts that launch their
11282 respective debuggers with Rust-appropriate pretty-printing.
11283 * The Windows installation of Rust is distributed with the
11284 MinGW components currently required to link binaries on that
11285 platform.
11286
11287 * Misc
11288
11289 * Nullable enum optimizations have been extended to more types so
11290 that e.g. `Option<Vec<T>>` and `Option<String>` take up no more
11291 space than the inner types themselves.
11292 * Work has begun on supporting AArch64.
11293
11294 [Cargo]: https://crates.io
11295 [unboxed]: http://smallcultfollowing.com/babysteps/blog/2014/11/26/purging-proc/
11296 [enum]: https://github.com/rust-lang/rfcs/blob/master/text/0390-enum-namespacing.md
11297 [flex]: https://github.com/rust-lang/rfcs/blob/master/text/0131-target-specification.md
11298 [err]: https://github.com/rust-lang/rfcs/blob/master/text/0201-error-chaining.md
11299 [err-conv]: https://github.com/rust-lang/rfcs/blob/master/text/0236-error-conventions.md
11300 [rt]: https://github.com/rust-lang/rfcs/blob/master/text/0230-remove-runtime.md
11301 [mac]: https://github.com/rust-lang/rfcs/blob/master/text/0453-macro-reform.md
11302 [mac-future]: https://github.com/rust-lang/rfcs/pull/550
11303 [DST]: http://smallcultfollowing.com/babysteps/blog/2014/01/05/dst-take-5/
11304 [coll1]: https://github.com/rust-lang/rfcs/blob/master/text/0235-collections-conventions.md
11305 [coll2]: https://github.com/rust-lang/rfcs/blob/master/text/0509-collections-reform-part-2.md
11306 [coll3]: https://github.com/rust-lang/rfcs/blob/master/text/0216-collection-views.md
11307 [ops]: https://github.com/rust-lang/rfcs/blob/master/text/0439-cmp-ops-reform.md
11308 [prelude]: https://github.com/rust-lang/rfcs/blob/master/text/0503-prelude-stabilization.md
11309 [where]: https://github.com/rust-lang/rfcs/blob/master/text/0135-where.md
11310 [refl]: https://github.com/rust-lang/rfcs/blob/master/text/0379-remove-reflection.md
11311 [panic]: https://github.com/rust-lang/rfcs/blob/master/text/0221-panic.md
11312 [structvars]: https://github.com/rust-lang/rfcs/blob/master/text/0418-struct-variants.md
11313 [hrtb]: https://github.com/rust-lang/rfcs/blob/master/text/0387-higher-ranked-trait-bounds.md
11314 [unicode]: https://github.com/rust-lang/rfcs/blob/master/text/0446-es6-unicode-escapes.md
11315 [oibit]: https://github.com/rust-lang/rfcs/blob/master/text/0019-opt-in-builtin-traits.md
11316 [macros]: https://github.com/rust-lang/rfcs/blob/master/text/0378-expr-macros.md
11317 [range]: https://github.com/rust-lang/rfcs/blob/master/text/0439-cmp-ops-reform.md#indexing-and-slicing
11318 [arrays]: https://github.com/rust-lang/rfcs/blob/master/text/0520-new-array-repeat-syntax.md
11319 [show]: https://github.com/rust-lang/rfcs/blob/master/text/0504-show-stabilization.md
11320 [derive]: https://github.com/rust-lang/rfcs/blob/master/text/0534-deriving2derive.md
11321 [self]: https://github.com/rust-lang/rfcs/blob/master/text/0532-self-in-use.md
11322 [fb]: https://github.com/rust-lang/rfcs/blob/master/text/0212-restore-int-fallback.md
11323 [objsafe]: https://github.com/rust-lang/rfcs/blob/master/text/0255-object-safety.md
11324 [assoc]: https://github.com/rust-lang/rfcs/blob/master/text/0195-associated-items.md
11325 [ints]: https://github.com/rust-lang/rfcs/pull/544#issuecomment-68760871
11326 [trpl]: https://doc.rust-lang.org/book/index.html
11327 [rbe]: http://rustbyexample.com/
11328
11329
11330 Version 0.12.0 (2014-10-09)
11331 =============================
11332
11333 * ~1900 changes, numerous bugfixes
11334
11335 * Highlights
11336
11337 * The introductory documentation (now called The Rust Guide) has
11338 been completely rewritten, as have a number of supplementary
11339 guides.
11340 * Rust's package manager, Cargo, continues to improve and is
11341 sometimes considered to be quite awesome.
11342 * Many API's in `std` have been reviewed and updated for
11343 consistency with the in-development Rust coding
11344 guidelines. The standard library documentation tracks
11345 stabilization progress.
11346 * Minor libraries have been moved out-of-tree to the rust-lang org
11347 on GitHub: uuid, semver, glob, num, hexfloat, fourcc. They can
11348 be installed with Cargo.
11349 * Lifetime elision allows lifetime annotations to be left off of
11350 function declarations in many common scenarios.
11351 * Rust now works on 64-bit Windows.
11352
11353 * Language
11354 * Indexing can be overloaded with the `Index` and `IndexMut`
11355 traits.
11356 * The `if let` construct takes a branch only if the `let` pattern
11357 matches, currently behind the 'if_let' feature gate.
11358 * 'where clauses', a more flexible syntax for specifying trait
11359 bounds that is more aesthetic, have been added for traits and
11360 free functions. Where clauses will in the future make it
11361 possible to constrain associated types, which would be
11362 impossible with the existing syntax.
11363 * A new slicing syntax (e.g. `[0..4]`) has been introduced behind
11364 the 'slicing_syntax' feature gate, and can be overloaded with
11365 the `Slice` or `SliceMut` traits.
11366 * The syntax for matching of sub-slices has been changed to use a
11367 postfix `..` instead of prefix (.e.g. `[a, b, c..]`), for
11368 consistency with other uses of `..` and to future-proof
11369 potential additional uses of the syntax.
11370 * The syntax for matching inclusive ranges in patterns has changed
11371 from `0..3` to `0...4` to be consistent with the exclusive range
11372 syntax for slicing.
11373 * Matching of sub-slices in non-tail positions (e.g. `[a.., b,
11374 c]`) has been put behind the 'advanced_slice_patterns' feature
11375 gate and may be removed in the future.
11376 * Components of tuples and tuple structs can be extracted using
11377 the `value.0` syntax, currently behind the `tuple_indexing`
11378 feature gate.
11379 * The `#[crate_id]` attribute is no longer supported; versioning
11380 is handled by the package manager.
11381 * Renaming crate imports are now written `extern crate foo as bar`
11382 instead of `extern crate bar = foo`.
11383 * Renaming use statements are now written `use foo as bar` instead
11384 of `use bar = foo`.
11385 * `let` and `match` bindings and argument names in macros are now
11386 hygienic.
11387 * The new, more efficient, closure types ('unboxed closures') have
11388 been added under a feature gate, 'unboxed_closures'. These will
11389 soon replace the existing closure types, once higher-ranked
11390 trait lifetimes are added to the language.
11391 * `move` has been added as a keyword, for indicating closures
11392 that capture by value.
11393 * Mutation and assignment is no longer allowed in pattern guards.
11394 * Generic structs and enums can now have trait bounds.
11395 * The `Share` trait is now called `Sync` to free up the term
11396 'shared' to refer to 'shared reference' (the default reference
11397 type.
11398 * Dynamically-sized types have been mostly implemented,
11399 unifying the behavior of fat-pointer types with the rest of the
11400 type system.
11401 * As part of dynamically-sized types, the `Sized` trait has been
11402 introduced, which qualifying types implement by default, and
11403 which type parameters expect by default. To specify that a type
11404 parameter does not need to be sized, write `<Sized? T>`. Most
11405 types are `Sized`, notable exceptions being unsized arrays
11406 (`[T]`) and trait types.
11407 * Closures can return `!`, as in `|| -> !` or `proc() -> !`.
11408 * Lifetime bounds can now be applied to type parameters and object
11409 types.
11410 * The old, reference counted GC type, `Gc<T>` which was once
11411 denoted by the `@` sigil, has finally been removed. GC will be
11412 revisited in the future.
11413
11414 * Libraries
11415 * Library documentation has been improved for a number of modules.
11416 * Bit-vectors, collections::bitv has been modernized.
11417 * The url crate is deprecated in favor of
11418 http://github.com/servo/rust-url, which can be installed with
11419 Cargo.
11420 * Most I/O stream types can be cloned and subsequently closed from
11421 a different thread.
11422 * A `std::time::Duration` type has been added for use in I/O
11423 methods that rely on timers, as well as in the 'time' crate's
11424 `Timespec` arithmetic.
11425 * The runtime I/O abstraction layer that enabled the green thread
11426 scheduler to do non-thread-blocking I/O has been removed, along
11427 with the libuv-based implementation employed by the green thread
11428 scheduler. This will greatly simplify the future I/O work.
11429 * `collections::btree` has been rewritten to have a more
11430 idiomatic and efficient design.
11431
11432 * Tooling
11433 * rustdoc output now indicates the stability levels of API's.
11434 * The `--crate-name` flag can specify the name of the crate
11435 being compiled, like `#[crate_name]`.
11436 * The `-C metadata` specifies additional metadata to hash into
11437 symbol names, and `-C extra-filename` specifies additional
11438 information to put into the output filename, for use by the
11439 package manager for versioning.
11440 * debug info generation has continued to improve and should be
11441 more reliable under both gdb and lldb.
11442 * rustc has experimental support for compiling in parallel
11443 using the `-C codegen-units` flag.
11444 * rustc no longer encodes rpath information into binaries by
11445 default.
11446
11447 * Misc
11448 * Stack usage has been optimized with LLVM lifetime annotations.
11449 * Official Rust binaries on Linux are more compatible with older
11450 kernels and distributions, built on CentOS 5.10.
11451
11452
11453 Version 0.11.0 (2014-07-02)
11454 ==========================
11455
11456 * ~1700 changes, numerous bugfixes
11457
11458 * Language
11459 * ~[T] has been removed from the language. This type is superseded by
11460 the Vec<T> type.
11461 * ~str has been removed from the language. This type is superseded by
11462 the String type.
11463 * ~T has been removed from the language. This type is superseded by the
11464 Box<T> type.
11465 * @T has been removed from the language. This type is superseded by the
11466 standard library's std::gc::Gc<T> type.
11467 * Struct fields are now all private by default.
11468 * Vector indices and shift amounts are both required to be a `uint`
11469 instead of any integral type.
11470 * Byte character, byte string, and raw byte string literals are now all
11471 supported by prefixing the normal literal with a `b`.
11472 * Multiple ABIs are no longer allowed in an ABI string
11473 * The syntax for lifetimes on closures/procedures has been tweaked
11474 slightly: `<'a>|A, B|: 'b + K -> T`
11475 * Floating point modulus has been removed from the language; however it
11476 is still provided by a library implementation.
11477 * Private enum variants are now disallowed.
11478 * The `priv` keyword has been removed from the language.
11479 * A closure can no longer be invoked through a &-pointer.
11480 * The `use foo, bar, baz;` syntax has been removed from the language.
11481 * The transmute intrinsic no longer works on type parameters.
11482 * Statics now allow blocks/items in their definition.
11483 * Trait bounds are separated from objects with + instead of : now.
11484 * Objects can no longer be read while they are mutably borrowed.
11485 * The address of a static is now marked as insignificant unless the
11486 #[inline(never)] attribute is placed it.
11487 * The #[unsafe_destructor] attribute is now behind a feature gate.
11488 * Struct literals are no longer allowed in ambiguous positions such as
11489 if, while, match, and for..in.
11490 * Declaration of lang items and intrinsics are now feature-gated by
11491 default.
11492 * Integral literals no longer default to `int`, and floating point
11493 literals no longer default to `f64`. Literals must be suffixed with an
11494 appropriate type if inference cannot determine the type of the
11495 literal.
11496 * The Box<T> type is no longer implicitly borrowed to &mut T.
11497 * Procedures are now required to not capture borrowed references.
11498
11499 * Libraries
11500 * The standard library is now a "facade" over a number of underlying
11501 libraries. This means that development on the standard library should
11502 be speedier due to smaller crates, as well as a clearer line between
11503 all dependencies.
11504 * A new library, libcore, lives under the standard library's facade
11505 which is Rust's "0-assumption" library, suitable for embedded and
11506 kernel development for example.
11507 * A regex crate has been added to the standard distribution. This crate
11508 includes statically compiled regular expressions.
11509 * The unwrap/unwrap_err methods on Result require a Show bound for
11510 better error messages.
11511 * The return types of the std::comm primitives have been centralized
11512 around the Result type.
11513 * A number of I/O primitives have gained the ability to time out their
11514 operations.
11515 * A number of I/O primitives have gained the ability to close their
11516 reading/writing halves to cancel pending operations.
11517 * Reverse iterator methods have been removed in favor of `rev()` on
11518 their forward-iteration counterparts.
11519 * A bitflags! macro has been added to enable easy interop with C and
11520 management of bit flags.
11521 * A debug_assert! macro is now provided which is disabled when
11522 `--cfg ndebug` is passed to the compiler.
11523 * A graphviz crate has been added for creating .dot files.
11524 * The std::cast module has been migrated into std::mem.
11525 * The std::local_data api has been migrated from freestanding functions
11526 to being based on methods.
11527 * The Pod trait has been renamed to Copy.
11528 * jemalloc has been added as the default allocator for types.
11529 * The API for allocating memory has been changed to use proper alignment
11530 and sized deallocation
11531 * Connecting a TcpStream or binding a TcpListener is now based on a
11532 string address and a u16 port. This allows connecting to a hostname as
11533 opposed to an IP.
11534 * The Reader trait now contains a core method, read_at_least(), which
11535 correctly handles many repeated 0-length reads.
11536 * The process-spawning API is now centered around a builder-style
11537 Command struct.
11538 * The :? printing qualifier has been moved from the standard library to
11539 an external libdebug crate.
11540 * Eq/Ord have been renamed to PartialEq/PartialOrd. TotalEq/TotalOrd
11541 have been renamed to Eq/Ord.
11542 * The select/plural methods have been removed from format!. The escapes
11543 for { and } have also changed from \{ and \} to {{ and }},
11544 respectively.
11545 * The TaskBuilder API has been re-worked to be a true builder, and
11546 extension traits for spawning native/green tasks have been added.
11547
11548 * Tooling
11549 * All breaking changes to the language or libraries now have their
11550 commit message annotated with `[breaking-change]` to allow for easy
11551 discovery of breaking changes.
11552 * The compiler will now try to suggest how to annotate lifetimes if a
11553 lifetime-related error occurs.
11554 * Debug info continues to be improved greatly with general bug fixes and
11555 better support for situations like link time optimization (LTO).
11556 * Usage of syntax extensions when cross-compiling has been fixed.
11557 * Functionality equivalent to GCC & Clang's -ffunction-sections,
11558 -fdata-sections and --gc-sections has been enabled by default
11559 * The compiler is now stricter about where it will load module files
11560 from when a module is declared via `mod foo;`.
11561 * The #[phase(syntax)] attribute has been renamed to #[phase(plugin)].
11562 Syntax extensions are now discovered via a "plugin registrar" type
11563 which will be extended in the future to other various plugins.
11564 * Lints have been restructured to allow for dynamically loadable lints.
11565 * A number of rustdoc improvements:
11566 * The HTML output has been visually redesigned.
11567 * Markdown is now powered by hoedown instead of sundown.
11568 * Searching heuristics have been greatly improved.
11569 * The search index has been reduced in size by a great amount.
11570 * Cross-crate documentation via `pub use` has been greatly improved.
11571 * Primitive types are now hyperlinked and documented.
11572 * Documentation has been moved from static.rust-lang.org/doc to
11573 doc.rust-lang.org
11574 * A new sandbox, play.rust-lang.org, is available for running and
11575 sharing rust code examples on-line.
11576 * Unused attributes are now more robustly warned about.
11577 * The dead_code lint now warns about unused struct fields.
11578 * Cross-compiling to iOS is now supported.
11579 * Cross-compiling to mipsel is now supported.
11580 * Stability attributes are now inherited by default and no longer apply
11581 to intra-crate usage, only inter-crate usage.
11582 * Error message related to non-exhaustive match expressions have been
11583 greatly improved.
11584
11585
11586 Version 0.10 (2014-04-03)
11587 =========================
11588
11589 * ~1500 changes, numerous bugfixes
11590
11591 * Language
11592 * A new RFC process is now in place for modifying the language.
11593 * Patterns with `@`-pointers have been removed from the language.
11594 * Patterns with unique vectors (`~[T]`) have been removed from the
11595 language.
11596 * Patterns with unique strings (`~str`) have been removed from the
11597 language.
11598 * `@str` has been removed from the language.
11599 * `@[T]` has been removed from the language.
11600 * `@self` has been removed from the language.
11601 * `@Trait` has been removed from the language.
11602 * Headers on `~` allocations which contain `@` boxes inside the type for
11603 reference counting have been removed.
11604 * The semantics around the lifetimes of temporary expressions have changed,
11605 see #3511 and #11585 for more information.
11606 * Cross-crate syntax extensions are now possible, but feature gated. See
11607 #11151 for more information. This includes both `macro_rules!` macros as
11608 well as syntax extensions such as `format!`.
11609 * New lint modes have been added, and older ones have been turned on to be
11610 warn-by-default.
11611 * Unnecessary parentheses
11612 * Uppercase statics
11613 * Camel Case types
11614 * Uppercase variables
11615 * Publicly visible private types
11616 * `#[deriving]` with raw pointers
11617 * Unsafe functions can no longer be coerced to closures.
11618 * Various obscure macros such as `log_syntax!` are now behind feature gates.
11619 * The `#[simd]` attribute is now behind a feature gate.
11620 * Visibility is no longer allowed on `extern crate` statements, and
11621 unnecessary visibility (`priv`) is no longer allowed on `use` statements.
11622 * Trailing commas are now allowed in argument lists and tuple patterns.
11623 * The `do` keyword has been removed, it is now a reserved keyword.
11624 * Default type parameters have been implemented, but are feature gated.
11625 * Borrowed variables through captures in closures are now considered soundly.
11626 * `extern mod` is now `extern crate`
11627 * The `Freeze` trait has been removed.
11628 * The `Share` trait has been added for types that can be shared among
11629 threads.
11630 * Labels in macros are now hygienic.
11631 * Expression/statement macro invocations can be delimited with `{}` now.
11632 * Treatment of types allowed in `static mut` locations has been tweaked.
11633 * The `*` and `.` operators are now overloadable through the `Deref` and
11634 `DerefMut` traits.
11635 * `~Trait` and `proc` no longer have `Send` bounds by default.
11636 * Partial type hints are now supported with the `_` type marker.
11637 * An `Unsafe` type was introduced for interior mutability. It is now
11638 considered undefined to transmute from `&T` to `&mut T` without using the
11639 `Unsafe` type.
11640 * The #[linkage] attribute was implemented for extern statics/functions.
11641 * The inner attribute syntax has changed from `#[foo];` to `#![foo]`.
11642 * `Pod` was renamed to `Copy`.
11643
11644 * Libraries
11645 * The `libextra` library has been removed. It has now been decomposed into
11646 component libraries with smaller and more focused nuggets of
11647 functionality. The full list of libraries can be found on the
11648 documentation index page.
11649 * std: `std::condition` has been removed. All I/O errors are now propagated
11650 through the `Result` type. In order to assist with error handling, a
11651 `try!` macro for unwrapping errors with an early return and a lint for
11652 unused results has been added. See #12039 for more information.
11653 * std: The `vec` module has been renamed to `slice`.
11654 * std: A new vector type, `Vec<T>`, has been added in preparation for DST.
11655 This will become the only growable vector in the future.
11656 * std: `std::io` now has more public re-exports. Types such as `BufferedReader`
11657 are now found at `std::io::BufferedReader` instead of
11658 `std::io::buffered::BufferedReader`.
11659 * std: `print` and `println` are no longer in the prelude, the `print!` and
11660 `println!` macros are intended to be used instead.
11661 * std: `Rc` now has a `Weak` pointer for breaking cycles, and it no longer
11662 attempts to statically prevent cycles.
11663 * std: The standard distribution is adopting the policy of pushing failure
11664 to the user rather than failing in libraries. Many functions (such as
11665 `slice::last()`) now return `Option<T>` instead of `T` + failing.
11666 * std: `fmt::Default` has been renamed to `fmt::Show`, and it now has a new
11667 deriving mode: `#[deriving(Show)]`.
11668 * std: `ToStr` is now implemented for all types implementing `Show`.
11669 * std: The formatting trait methods now take `&self` instead of `&T`
11670 * std: The `invert()` method on iterators has been renamed to `rev()`
11671 * std: `std::num` has seen a reduction in the genericity of its traits,
11672 consolidating functionality into a few core traits.
11673 * std: Backtraces are now printed on task failure if the environment
11674 variable `RUST_BACKTRACE` is present.
11675 * std: Naming conventions for iterators have been standardized. More details
11676 can be found on the wiki's style guide.
11677 * std: `eof()` has been removed from the `Reader` trait. Specific types may
11678 still implement the function.
11679 * std: Networking types are now cloneable to allow simultaneous reads/writes.
11680 * std: `assert_approx_eq!` has been removed
11681 * std: The `e` and `E` formatting specifiers for floats have been added to
11682 print them in exponential notation.
11683 * std: The `Times` trait has been removed
11684 * std: Indications of variance and opting out of builtin bounds is done
11685 through marker types in `std::kinds::marker` now
11686 * std: `hash` has been rewritten, `IterBytes` has been removed, and
11687 `#[deriving(Hash)]` is now possible.
11688 * std: `SharedChan` has been removed, `Sender` is now cloneable.
11689 * std: `Chan` and `Port` were renamed to `Sender` and `Receiver`.
11690 * std: `Chan::new` is now `channel()`.
11691 * std: A new synchronous channel type has been implemented.
11692 * std: A `select!` macro is now provided for selecting over `Receiver`s.
11693 * std: `hashmap` and `trie` have been moved to `libcollections`
11694 * std: `run` has been rolled into `io::process`
11695 * std: `assert_eq!` now uses `{}` instead of `{:?}`
11696 * std: The equality and comparison traits have seen some reorganization.
11697 * std: `rand` has moved to `librand`.
11698 * std: `to_{lower,upper}case` has been implemented for `char`.
11699 * std: Logging has been moved to `liblog`.
11700 * collections: `HashMap` has been rewritten for higher performance and less
11701 memory usage.
11702 * native: The default runtime is now `libnative`. If `libgreen` is desired,
11703 it can be booted manually. The runtime guide has more information and
11704 examples.
11705 * native: All I/O functionality except signals has been implemented.
11706 * green: Task spawning with `libgreen` has been optimized with stack caching
11707 and various trimming of code.
11708 * green: Tasks spawned by `libgreen` now have an unmapped guard page.
11709 * sync: The `extra::sync` module has been updated to modern rust (and moved
11710 to the `sync` library), tweaking and improving various interfaces while
11711 dropping redundant functionality.
11712 * sync: A new `Barrier` type has been added to the `sync` library.
11713 * sync: An efficient mutex for native and green tasks has been implemented.
11714 * serialize: The `base64` module has seen some improvement. It treats
11715 newlines better, has non-string error values, and has seen general
11716 cleanup.
11717 * fourcc: A `fourcc!` macro was introduced
11718 * hexfloat: A `hexfloat!` macro was implemented for specifying floats via a
11719 hexadecimal literal.
11720
11721 * Tooling
11722 * `rustpkg` has been deprecated and removed from the main repository. Its
11723 replacement, `cargo`, is under development.
11724 * Nightly builds of rust are now available
11725 * The memory usage of rustc has been improved many times throughout this
11726 release cycle.
11727 * The build process supports disabling rpath support for the rustc binary
11728 itself.
11729 * Code generation has improved in some cases, giving more information to the
11730 LLVM optimization passes to enable more extensive optimizations.
11731 * Debuginfo compatibility with lldb on OSX has been restored.
11732 * The master branch is now gated on an android bot, making building for
11733 android much more reliable.
11734 * Output flags have been centralized into one `--emit` flag.
11735 * Crate type flags have been centralized into one `--crate-type` flag.
11736 * Codegen flags have been consolidated behind a `-C` flag.
11737 * Linking against outdated crates now has improved error messages.
11738 * Error messages with lifetimes will often suggest how to annotate the
11739 function to fix the error.
11740 * Many more types are documented in the standard library, and new guides
11741 were written.
11742 * Many `rustdoc` improvements:
11743 * code blocks are syntax highlighted.
11744 * render standalone markdown files.
11745 * the --test flag tests all code blocks by default.
11746 * exported macros are displayed.
11747 * re-exported types have their documentation inlined at the location of the
11748 first re-export.
11749 * search works across crates that have been rendered to the same output
11750 directory.
11751
11752
11753 Version 0.9 (2014-01-09)
11754 ==========================
11755
11756 * ~1800 changes, numerous bugfixes
11757
11758 * Language
11759 * The `float` type has been removed. Use `f32` or `f64` instead.
11760 * A new facility for enabling experimental features (feature gating) has
11761 been added, using the crate-level `#[feature(foo)]` attribute.
11762 * Managed boxes (@) are now behind a feature gate
11763 (`#[feature(managed_boxes)]`) in preparation for future removal. Use the
11764 standard library's `Gc` or `Rc` types instead.
11765 * `@mut` has been removed. Use `std::cell::{Cell, RefCell}` instead.
11766 * Jumping back to the top of a loop is now done with `continue` instead of
11767 `loop`.
11768 * Strings can no longer be mutated through index assignment.
11769 * Raw strings can be created via the basic `r"foo"` syntax or with matched
11770 hash delimiters, as in `r###"foo"###`.
11771 * `~fn` is now written `proc (args) -> retval { ... }` and may only be
11772 called once.
11773 * The `&fn` type is now written `|args| -> ret` to match the literal form.
11774 * `@fn`s have been removed.
11775 * `do` only works with procs in order to make it obvious what the cost
11776 of `do` is.
11777 * Single-element tuple-like structs can no longer be dereferenced to
11778 obtain the inner value. A more comprehensive solution for overloading
11779 the dereference operator will be provided in the future.
11780 * The `#[link(...)]` attribute has been replaced with
11781 `#[crate_id = "name#vers"]`.
11782 * Empty `impl`s must be terminated with empty braces and may not be
11783 terminated with a semicolon.
11784 * Keywords are no longer allowed as lifetime names; the `self` lifetime
11785 no longer has any special meaning.
11786 * The old `fmt!` string formatting macro has been removed.
11787 * `printf!` and `printfln!` (old-style formatting) removed in favor of
11788 `print!` and `println!`.
11789 * `mut` works in patterns now, as in `let (mut x, y) = (1, 2);`.
11790 * The `extern mod foo (name = "bar")` syntax has been removed. Use
11791 `extern mod foo = "bar"` instead.
11792 * New reserved keywords: `alignof`, `offsetof`, `sizeof`.
11793 * Macros can have attributes.
11794 * Macros can expand to items with attributes.
11795 * Macros can expand to multiple items.
11796 * The `asm!` macro is feature-gated (`#[feature(asm)]`).
11797 * Comments may be nested.
11798 * Values automatically coerce to trait objects they implement, without
11799 an explicit `as`.
11800 * Enum discriminants are no longer an entire word but as small as needed to
11801 contain all the variants. The `repr` attribute can be used to override
11802 the discriminant size, as in `#[repr(int)]` for integer-sized, and
11803 `#[repr(C)]` to match C enums.
11804 * Non-string literals are not allowed in attributes (they never worked).
11805 * The FFI now supports variadic functions.
11806 * Octal numeric literals, as in `0o7777`.
11807 * The `concat!` syntax extension performs compile-time string concatenation.
11808 * The `#[fixed_stack_segment]` and `#[rust_stack]` attributes have been
11809 removed as Rust no longer uses segmented stacks.
11810 * Non-ascii identifiers are feature-gated (`#[feature(non_ascii_idents)]`).
11811 * Ignoring all fields of an enum variant or tuple-struct is done with `..`,
11812 not `*`; ignoring remaining fields of a struct is also done with `..`,
11813 not `_`; ignoring a slice of a vector is done with `..`, not `.._`.
11814 * `rustc` supports the "win64" calling convention via `extern "win64"`.
11815 * `rustc` supports the "system" calling convention, which defaults to the
11816 preferred convention for the target platform, "stdcall" on 32-bit Windows,
11817 "C" elsewhere.
11818 * The `type_overflow` lint (default: warn) checks literals for overflow.
11819 * The `unsafe_block` lint (default: allow) checks for usage of `unsafe`.
11820 * The `attribute_usage` lint (default: warn) warns about unknown
11821 attributes.
11822 * The `unknown_features` lint (default: warn) warns about unknown
11823 feature gates.
11824 * The `dead_code` lint (default: warn) checks for dead code.
11825 * Rust libraries can be linked statically to one another
11826 * `#[link_args]` is behind the `link_args` feature gate.
11827 * Native libraries are now linked with `#[link(name = "foo")]`
11828 * Native libraries can be statically linked to a rust crate
11829 (`#[link(name = "foo", kind = "static")]`).
11830 * Native OS X frameworks are now officially supported
11831 (`#[link(name = "foo", kind = "framework")]`).
11832 * The `#[thread_local]` attribute creates thread-local (not task-local)
11833 variables. Currently behind the `thread_local` feature gate.
11834 * The `return` keyword may be used in closures.
11835 * Types that can be copied via a memcpy implement the `Pod` kind.
11836 * The `cfg` attribute can now be used on struct fields and enum variants.
11837
11838 * Libraries
11839 * std: The `option` and `result` API's have been overhauled to make them
11840 simpler, more consistent, and more composable.
11841 * std: The entire `std::io` module has been replaced with one that is
11842 more comprehensive and that properly interfaces with the underlying
11843 scheduler. File, TCP, UDP, Unix sockets, pipes, and timers are all
11844 implemented.
11845 * std: `io::util` contains a number of useful implementations of
11846 `Reader` and `Writer`, including `NullReader`, `NullWriter`,
11847 `ZeroReader`, `TeeReader`.
11848 * std: The reference counted pointer type `extra::rc` moved into std.
11849 * std: The `Gc` type in the `gc` module will replace `@` (it is currently
11850 just a wrapper around it).
11851 * std: The `Either` type has been removed.
11852 * std: `fmt::Default` can be implemented for any type to provide default
11853 formatting to the `format!` macro, as in `format!("{}", myfoo)`.
11854 * std: The `rand` API continues to be tweaked.
11855 * std: The `rust_begin_unwind` function, useful for inserting breakpoints
11856 on failure in gdb, is now named `rust_fail`.
11857 * std: The `each_key` and `each_value` methods on `HashMap` have been
11858 replaced by the `keys` and `values` iterators.
11859 * std: Functions dealing with type size and alignment have moved from the
11860 `sys` module to the `mem` module.
11861 * std: The `path` module was written and API changed.
11862 * std: `str::from_utf8` has been changed to cast instead of allocate.
11863 * std: `starts_with` and `ends_with` methods added to vectors via the
11864 `ImmutableEqVector` trait, which is in the prelude.
11865 * std: Vectors can be indexed with the `get_opt` method, which returns `None`
11866 if the index is out of bounds.
11867 * std: Task failure no longer propagates between tasks, as the model was
11868 complex, expensive, and incompatible with thread-based tasks.
11869 * std: The `Any` type can be used for dynamic typing.
11870 * std: `~Any` can be passed to the `fail!` macro and retrieved via
11871 `task::try`.
11872 * std: Methods that produce iterators generally do not have an `_iter`
11873 suffix now.
11874 * std: `cell::Cell` and `cell::RefCell` can be used to introduce mutability
11875 roots (mutable fields, etc.). Use instead of e.g. `@mut`.
11876 * std: `util::ignore` renamed to `prelude::drop`.
11877 * std: Slices have `sort` and `sort_by` methods via the `MutableVector`
11878 trait.
11879 * std: `vec::raw` has seen a lot of cleanup and API changes.
11880 * std: The standard library no longer includes any C++ code, and very
11881 minimal C, eliminating the dependency on libstdc++.
11882 * std: Runtime scheduling and I/O functionality has been factored out into
11883 extensible interfaces and is now implemented by two different crates:
11884 libnative, for native threading and I/O; and libgreen, for green threading
11885 and I/O. This paves the way for using the standard library in more limited
11886 embedded environments.
11887 * std: The `comm` module has been rewritten to be much faster, have a
11888 simpler, more consistent API, and to work for both native and green
11889 threading.
11890 * std: All libuv dependencies have been moved into the rustuv crate.
11891 * native: New implementations of runtime scheduling on top of OS threads.
11892 * native: New native implementations of TCP, UDP, file I/O, process spawning,
11893 and other I/O.
11894 * green: The green thread scheduler and message passing types are almost
11895 entirely lock-free.
11896 * extra: The `flatpipes` module had bitrotted and was removed.
11897 * extra: All crypto functions have been removed and Rust now has a policy of
11898 not reimplementing crypto in the standard library. In the future crypto
11899 will be provided by external crates with bindings to established libraries.
11900 * extra: `c_vec` has been modernized.
11901 * extra: The `sort` module has been removed. Use the `sort` method on
11902 mutable slices.
11903
11904 * Tooling
11905 * The `rust` and `rusti` commands have been removed, due to lack of
11906 maintenance.
11907 * `rustdoc` was completely rewritten.
11908 * `rustdoc` can test code examples in documentation.
11909 * `rustpkg` can test packages with the argument, 'test'.
11910 * `rustpkg` supports arbitrary dependencies, including C libraries.
11911 * `rustc`'s support for generating debug info is improved again.
11912 * `rustc` has better error reporting for unbalanced delimiters.
11913 * `rustc`'s JIT support was removed due to bitrot.
11914 * Executables and static libraries can be built with LTO (-Z lto)
11915 * `rustc` adds a `--dep-info` flag for communicating dependencies to
11916 build tools.
11917
11918
11919 Version 0.8 (2013-09-26)
11920 ============================
11921
11922 * ~2200 changes, numerous bugfixes
11923
11924 * Language
11925 * The `for` loop syntax has changed to work with the `Iterator` trait.
11926 * At long last, unwinding works on Windows.
11927 * Default methods are ready for use.
11928 * Many trait inheritance bugs fixed.
11929 * Owned and borrowed trait objects work more reliably.
11930 * `copy` is no longer a keyword. It has been replaced by the `Clone` trait.
11931 * rustc can omit emission of code for the `debug!` macro if it is passed
11932 `--cfg ndebug`
11933 * mod.rs is now "blessed". When loading `mod foo;`, rustc will now look
11934 for foo.rs, then foo/mod.rs, and will generate an error when both are
11935 present.
11936 * Strings no longer contain trailing nulls. The new `std::c_str` module
11937 provides new mechanisms for converting to C strings.
11938 * The type of foreign functions is now `extern "C" fn` instead of `*u8'.
11939 * The FFI has been overhauled such that foreign functions are called directly,
11940 instead of through a stack-switching wrapper.
11941 * Calling a foreign function must be done through a Rust function with the
11942 `#[fixed_stack_segment]` attribute.
11943 * The `externfn!` macro can be used to declare both a foreign function and
11944 a `#[fixed_stack_segment]` wrapper at once.
11945 * `pub` and `priv` modifiers on `extern` blocks are no longer parsed.
11946 * `unsafe` is no longer allowed on extern fns - they are all unsafe.
11947 * `priv` is disallowed everywhere except for struct fields and enum variants.
11948 * `&T` (besides `&'static T`) is no longer allowed in `@T`.
11949 * `ref` bindings in irrefutable patterns work correctly now.
11950 * `char` is now prevented from containing invalid code points.
11951 * Casting to `bool` is no longer allowed.
11952 * `\0` is now accepted as an escape in chars and strings.
11953 * `yield` is a reserved keyword.
11954 * `typeof` is a reserved keyword.
11955 * Crates may be imported by URL with `extern mod foo = "url";`.
11956 * Explicit enum discriminants may be given as uints as in `enum E { V = 0u }`
11957 * Static vectors can be initialized with repeating elements,
11958 e.g. `static foo: [u8, .. 100]: [0, .. 100];`.
11959 * Static structs can be initialized with functional record update,
11960 e.g. `static foo: Foo = Foo { a: 5, .. bar };`.
11961 * `cfg!` can be used to conditionally execute code based on the crate
11962 configuration, similarly to `#[cfg(...)]`.
11963 * The `unnecessary_qualification` lint detects unneeded module
11964 prefixes (default: allow).
11965 * Arithmetic operations have been implemented on the SIMD types in
11966 `std::unstable::simd`.
11967 * Exchange allocation headers were removed, reducing memory usage.
11968 * `format!` implements a completely new, extensible, and higher-performance
11969 string formatting system. It will replace `fmt!`.
11970 * `print!` and `println!` write formatted strings (using the `format!`
11971 extension) to stdout.
11972 * `write!` and `writeln!` write formatted strings (using the `format!`
11973 extension) to the new Writers in `std::rt::io`.
11974 * The library section in which a function or static is placed may
11975 be specified with `#[link_section = "..."]`.
11976 * The `proto!` syntax extension for defining bounded message protocols
11977 was removed.
11978 * `macro_rules!` is hygienic for `let` declarations.
11979 * The `#[export_name]` attribute specifies the name of a symbol.
11980 * `unreachable!` can be used to indicate unreachable code, and fails
11981 if executed.
11982
11983 * Libraries
11984 * std: Transitioned to the new runtime, written in Rust.
11985 * std: Added an experimental I/O library, `rt::io`, based on the new
11986 runtime.
11987 * std: A new generic `range` function was added to the prelude, replacing
11988 `uint::range` and friends.
11989 * std: `range_rev` no longer exists. Since range is an iterator it can be
11990 reversed with `range(lo, hi).invert()`.
11991 * std: The `chain` method on option renamed to `and_then`; `unwrap_or_default`
11992 renamed to `unwrap_or`.
11993 * std: The `iterator` module was renamed to `iter`.
11994 * std: Integral types now support the `checked_add`, `checked_sub`, and
11995 `checked_mul` operations for detecting overflow.
11996 * std: Many methods in `str`, `vec`, `option, `result` were renamed for
11997 consistency.
11998 * std: Methods are standardizing on conventions for casting methods:
11999 `to_foo` for copying, `into_foo` for moving, `as_foo` for temporary
12000 and cheap casts.
12001 * std: The `CString` type in `c_str` provides new ways to convert to and
12002 from C strings.
12003 * std: `DoubleEndedIterator` can yield elements in two directions.
12004 * std: The `mut_split` method on vectors partitions an `&mut [T]` into
12005 two splices.
12006 * std: `str::from_bytes` renamed to `str::from_utf8`.
12007 * std: `pop_opt` and `shift_opt` methods added to vectors.
12008 * std: The task-local data interface no longer uses @, and keys are
12009 no longer function pointers.
12010 * std: The `swap_unwrap` method of `Option` renamed to `take_unwrap`.
12011 * std: Added `SharedPort` to `comm`.
12012 * std: `Eq` has a default method for `ne`; only `eq` is required
12013 in implementations.
12014 * std: `Ord` has default methods for `le`, `gt` and `ge`; only `lt`
12015 is required in implementations.
12016 * std: `is_utf8` performance is improved, impacting many string functions.
12017 * std: `os::MemoryMap` provides cross-platform mmap.
12018 * std: `ptr::offset` is now unsafe, but also more optimized. Offsets that
12019 are not 'in-bounds' are considered undefined.
12020 * std: Many freestanding functions in `vec` removed in favor of methods.
12021 * std: Many freestanding functions on scalar types removed in favor of
12022 methods.
12023 * std: Many options to task builders were removed since they don't make
12024 sense in the new scheduler design.
12025 * std: More containers implement `FromIterator` so can be created by the
12026 `collect` method.
12027 * std: More complete atomic types in `unstable::atomics`.
12028 * std: `comm::PortSet` removed.
12029 * std: Mutating methods in the `Set` and `Map` traits have been moved into
12030 the `MutableSet` and `MutableMap` traits. `Container::is_empty`,
12031 `Map::contains_key`, `MutableMap::insert`, and `MutableMap::remove` have
12032 default implementations.
12033 * std: Various `from_str` functions were removed in favor of a generic
12034 `from_str` which is available in the prelude.
12035 * std: `util::unreachable` removed in favor of the `unreachable!` macro.
12036 * extra: `dlist`, the doubly-linked list was modernized.
12037 * extra: Added a `hex` module with `ToHex` and `FromHex` traits.
12038 * extra: Added `glob` module, replacing `std::os::glob`.
12039 * extra: `rope` was removed.
12040 * extra: `deque` was renamed to `ringbuf`. `RingBuf` implements `Deque`.
12041 * extra: `net`, and `timer` were removed. The experimental replacements
12042 are `std::rt::io::net` and `std::rt::io::timer`.
12043 * extra: Iterators implemented for `SmallIntMap`.
12044 * extra: Iterators implemented for `Bitv` and `BitvSet`.
12045 * extra: `SmallIntSet` removed. Use `BitvSet`.
12046 * extra: Performance of JSON parsing greatly improved.
12047 * extra: `semver` updated to SemVer 2.0.0.
12048 * extra: `term` handles more terminals correctly.
12049 * extra: `dbg` module removed.
12050 * extra: `par` module removed.
12051 * extra: `future` was cleaned up, with some method renames.
12052 * extra: Most free functions in `getopts` were converted to methods.
12053
12054 * Other
12055 * rustc's debug info generation (`-Z debug-info`) is greatly improved.
12056 * rustc accepts `--target-cpu` to compile to a specific CPU architecture,
12057 similarly to gcc's `--march` flag.
12058 * rustc's performance compiling small crates is much better.
12059 * rustpkg has received many improvements.
12060 * rustpkg supports git tags as package IDs.
12061 * rustpkg builds into target-specific directories so it can be used for
12062 cross-compiling.
12063 * The number of concurrent test tasks is controlled by the environment
12064 variable RUST_TEST_TASKS.
12065 * The test harness can now report metrics for benchmarks.
12066 * All tools have man pages.
12067 * Programs compiled with `--test` now support the `-h` and `--help` flags.
12068 * The runtime uses jemalloc for allocations.
12069 * Segmented stacks are temporarily disabled as part of the transition to
12070 the new runtime. Stack overflows are possible!
12071 * A new documentation backend, rustdoc_ng, is available for use. It is
12072 still invoked through the normal `rustdoc` command.
12073
12074
12075 Version 0.7 (2013-07-03)
12076 =======================
12077
12078 * ~2000 changes, numerous bugfixes
12079
12080 * Language
12081 * `impl`s no longer accept a visibility qualifier. Put them on methods
12082 instead.
12083 * The borrow checker has been rewritten with flow-sensitivity, fixing
12084 many bugs and inconveniences.
12085 * The `self` parameter no longer implicitly means `&'self self`,
12086 and can be explicitly marked with a lifetime.
12087 * Overloadable compound operators (`+=`, etc.) have been temporarily
12088 removed due to bugs.
12089 * The `for` loop protocol now requires `for`-iterators to return `bool`
12090 so they compose better.
12091 * The `Durable` trait is replaced with the `'static` bounds.
12092 * Trait default methods work more often.
12093 * Structs with the `#[packed]` attribute have byte alignment and
12094 no padding between fields.
12095 * Type parameters bound by `Copy` must now be copied explicitly with
12096 the `copy` keyword.
12097 * It is now illegal to move out of a dereferenced unsafe pointer.
12098 * `Option<~T>` is now represented as a nullable pointer.
12099 * `@mut` does dynamic borrow checks correctly.
12100 * The `main` function is only detected at the topmost level of the crate.
12101 The `#[main]` attribute is still valid anywhere.
12102 * Struct fields may no longer be mutable. Use inherited mutability.
12103 * The `#[no_send]` attribute makes a type that would otherwise be
12104 `Send`, not.
12105 * The `#[no_freeze]` attribute makes a type that would otherwise be
12106 `Freeze`, not.
12107 * Unbounded recursion will abort the process after reaching the limit
12108 specified by the `RUST_MAX_STACK` environment variable (default: 1GB).
12109 * The `vecs_implicitly_copyable` lint mode has been removed. Vectors
12110 are never implicitly copyable.
12111 * `#[static_assert]` makes compile-time assertions about static bools.
12112 * At long last, 'argument modes' no longer exist.
12113 * The rarely used `use mod` statement no longer exists.
12114
12115 * Syntax extensions
12116 * `fail!` and `assert!` accept `~str`, `&'static str` or `fmt!`-style
12117 argument list.
12118 * `Encodable`, `Decodable`, `Ord`, `TotalOrd`, `TotalEq`, `DeepClone`,
12119 `Rand`, `Zero` and `ToStr` can all be automatically derived with
12120 `#[deriving(...)]`.
12121 * The `bytes!` macro returns a vector of bytes for string, u8, char,
12122 and unsuffixed integer literals.
12123
12124 * Libraries
12125 * The `core` crate was renamed to `std`.
12126 * The `std` crate was renamed to `extra`.
12127 * More and improved documentation.
12128 * std: `iterator` module for external iterator objects.
12129 * Many old-style (internal, higher-order function) iterators replaced by
12130 implementations of `Iterator`.
12131 * std: Many old internal vector and string iterators,
12132 incl. `any`, `all`. removed.
12133 * std: The `finalize` method of `Drop` renamed to `drop`.
12134 * std: The `drop` method now takes `&mut self` instead of `&self`.
12135 * std: The prelude no longer re-exports any modules, only types and traits.
12136 * std: Prelude additions: `print`, `println`, `FromStr`, `ApproxEq`, `Equiv`,
12137 `Iterator`, `IteratorUtil`, many numeric traits, many tuple traits.
12138 * std: New numeric traits: `Fractional`, `Real`, `RealExt`, `Integer`, `Ratio`,
12139 `Algebraic`, `Trigonometric`, `Exponential`, `Primitive`.
12140 * std: Tuple traits and accessors defined for up to 12-tuples, e.g.
12141 `(0, 1, 2).n2()` or `(0, 1, 2).n2_ref()`.
12142 * std: Many types implement `Clone`.
12143 * std: `path` type renamed to `Path`.
12144 * std: `mut` module and `Mut` type removed.
12145 * std: Many standalone functions removed in favor of methods and iterators
12146 in `vec`, `str`. In the future methods will also work as functions.
12147 * std: `reinterpret_cast` removed. Use `transmute`.
12148 * std: ascii string handling in `std::ascii`.
12149 * std: `Rand` is implemented for ~/@.
12150 * std: `run` module for spawning processes overhauled.
12151 * std: Various atomic types added to `unstable::atomic`.
12152 * std: Various types implement `Zero`.
12153 * std: `LinearMap` and `LinearSet` renamed to `HashMap` and `HashSet`.
12154 * std: Borrowed pointer functions moved from `ptr` to `borrow`.
12155 * std: Added `os::mkdir_recursive`.
12156 * std: Added `os::glob` function performs filesystems globs.
12157 * std: `FuzzyEq` renamed to `ApproxEq`.
12158 * std: `Map` now defines `pop` and `swap` methods.
12159 * std: `Cell` constructors converted to static methods.
12160 * extra: `rc` module adds the reference counted pointers, `Rc` and `RcMut`.
12161 * extra: `flate` module moved from `std` to `extra`.
12162 * extra: `fileinput` module for iterating over a series of files.
12163 * extra: `Complex` number type and `complex` module.
12164 * extra: `Rational` number type and `rational` module.
12165 * extra: `BigInt`, `BigUint` implement numeric and comparison traits.
12166 * extra: `term` uses terminfo now, is more correct.
12167 * extra: `arc` functions converted to methods.
12168 * extra: Implementation of fixed output size variations of SHA-2.
12169
12170 * Tooling
12171 * `unused_variables` lint mode for unused variables (default: warn).
12172 * `unused_unsafe` lint mode for detecting unnecessary `unsafe` blocks
12173 (default: warn).
12174 * `unused_mut` lint mode for identifying unused `mut` qualifiers
12175 (default: warn).
12176 * `dead_assignment` lint mode for unread variables (default: warn).
12177 * `unnecessary_allocation` lint mode detects some heap allocations that are
12178 immediately borrowed so could be written without allocating (default: warn).
12179 * `missing_doc` lint mode (default: allow).
12180 * `unreachable_code` lint mode (default: warn).
12181 * The `rusti` command has been rewritten and a number of bugs addressed.
12182 * rustc outputs in color on more terminals.
12183 * rustc accepts a `--link-args` flag to pass arguments to the linker.
12184 * rustc accepts a `-Z print-link-args` flag for debugging linkage.
12185 * Compiling with `-g` will make the binary record information about
12186 dynamic borrowcheck failures for debugging.
12187 * rustdoc has a nicer stylesheet.
12188 * Various improvements to rustdoc.
12189 * Improvements to rustpkg (see the detailed release notes).
12190
12191
12192 Version 0.6 (2013-04-03)
12193 ========================
12194
12195 * ~2100 changes, numerous bugfixes
12196
12197 * Syntax changes
12198 * The self type parameter in traits is now spelled `Self`
12199 * The `self` parameter in trait and impl methods must now be explicitly
12200 named (for example: `fn f(&self) { }`). Implicit self is deprecated.
12201 * Static methods no longer require the `static` keyword and instead
12202 are distinguished by the lack of a `self` parameter
12203 * Replaced the `Durable` trait with the `'static` lifetime
12204 * The old closure type syntax with the trailing sigil has been
12205 removed in favor of the more consistent leading sigil
12206 * `super` is a keyword, and may be prefixed to paths
12207 * Trait bounds are separated with `+` instead of whitespace
12208 * Traits are implemented with `impl Trait for Type`
12209 instead of `impl Type: Trait`
12210 * Lifetime syntax is now `&'l foo` instead of `&l/foo`
12211 * The `export` keyword has finally been removed
12212 * The `move` keyword has been removed (see "Semantic changes")
12213 * The interior mutability qualifier on vectors, `[mut T]`, has been
12214 removed. Use `&mut [T]`, etc.
12215 * `mut` is no longer valid in `~mut T`. Use inherited mutability
12216 * `fail` is no longer a keyword. Use `fail!()`
12217 * `assert` is no longer a keyword. Use `assert!()`
12218 * `log` is no longer a keyword. use `debug!`, etc.
12219 * 1-tuples may be represented as `(T,)`
12220 * Struct fields may no longer be `mut`. Use inherited mutability,
12221 `@mut T`, `core::mut` or `core::cell`
12222 * `extern mod { ... }` is no longer valid syntax for foreign
12223 function modules. Use extern blocks: `extern { ... }`
12224 * Newtype enums removed. Use tuple-structs.
12225 * Trait implementations no longer support visibility modifiers
12226 * Pattern matching over vectors improved and expanded
12227 * `const` renamed to `static` to correspond to lifetime name,
12228 and make room for future `static mut` unsafe mutable globals.
12229 * Replaced `#[deriving_eq]` with `#[deriving(Eq)]`, etc.
12230 * `Clone` implementations can be automatically generated with
12231 `#[deriving(Clone)]`
12232 * Casts to traits must use a pointer sigil, e.g. `@foo as @Bar`
12233 instead of `foo as Bar`.
12234 * Fixed length vector types are now written as `[int, .. 3]`
12235 instead of `[int * 3]`.
12236 * Fixed length vector types can express the length as a constant
12237 expression. (ex: `[int, .. GL_BUFFER_SIZE - 2]`)
12238
12239 * Semantic changes
12240 * Types with owned pointers or custom destructors move by default,
12241 eliminating the `move` keyword
12242 * All foreign functions are considered unsafe
12243 * &mut is now unaliasable
12244 * Writes to borrowed @mut pointers are prevented dynamically
12245 * () has size 0
12246 * The name of the main function can be customized using #[main]
12247 * The default type of an inferred closure is &fn instead of @fn
12248 * `use` statements may no longer be "chained" - they cannot import
12249 identifiers imported by previous `use` statements
12250 * `use` statements are crate relative, importing from the "top"
12251 of the crate by default. Paths may be prefixed with `super::`
12252 or `self::` to change the search behavior.
12253 * Method visibility is inherited from the implementation declaration
12254 * Structural records have been removed
12255 * Many more types can be used in static items, including enums
12256 'static-lifetime pointers and vectors
12257 * Pattern matching over vectors improved and expanded
12258 * Typechecking of closure types has been overhauled to
12259 improve inference and eliminate unsoundness
12260 * Macros leave scope at the end of modules, unless that module is
12261 tagged with #[macro_escape]
12262
12263 * Libraries
12264 * Added big integers to `std::bigint`
12265 * Removed `core::oldcomm` module
12266 * Added pipe-based `core::comm` module
12267 * Numeric traits have been reorganized under `core::num`
12268 * `vec::slice` finally returns a slice
12269 * `debug!` and friends don't require a format string, e.g. `debug!(Foo)`
12270 * Containers reorganized around traits in `core::container`
12271 * `core::dvec` removed, `~[T]` is a drop-in replacement
12272 * `core::send_map` renamed to `core::hashmap`
12273 * `std::map` removed; replaced with `core::hashmap`
12274 * `std::treemap` reimplemented as an owned balanced tree
12275 * `std::deque` and `std::smallintmap` reimplemented as owned containers
12276 * `core::trie` added as a fast ordered map for integer keys
12277 * Set types added to `core::hashmap`, `core::trie` and `std::treemap`
12278 * `Ord` split into `Ord` and `TotalOrd`. `Ord` is still used to
12279 overload the comparison operators, whereas `TotalOrd` is used
12280 by certain container types
12281
12282 * Other
12283 * Replaced the 'cargo' package manager with 'rustpkg'
12284 * Added all-purpose 'rust' tool
12285 * `rustc --test` now supports benchmarks with the `#[bench]` attribute
12286 * rustc now *attempts* to offer spelling suggestions
12287 * Improved support for ARM and Android
12288 * Preliminary MIPS backend
12289 * Improved foreign function ABI implementation for x86, x86_64
12290 * Various memory usage improvements
12291 * Rust code may be embedded in foreign code under limited circumstances
12292 * Inline assembler supported by new asm!() syntax extension.
12293
12294
12295 Version 0.5 (2012-12-21)
12296 ===========================
12297
12298 * ~900 changes, numerous bugfixes
12299
12300 * Syntax changes
12301 * Removed `<-` move operator
12302 * Completed the transition from the `#fmt` extension syntax to `fmt!`
12303 * Removed old fixed length vector syntax - `[T]/N`
12304 * New token-based quasi-quoters, `quote_tokens!`, `quote_expr!`, etc.
12305 * Macros may now expand to items and statements
12306 * `a.b()` is always parsed as a method call, never as a field projection
12307 * `Eq` and `IterBytes` implementations can be automatically generated
12308 with `#[deriving_eq]` and `#[deriving_iter_bytes]` respectively
12309 * Removed the special crate language for `.rc` files
12310 * Function arguments may consist of any irrefutable pattern
12311
12312 * Semantic changes
12313 * `&` and `~` pointers may point to objects
12314 * Tuple structs - `struct Foo(Bar, Baz)`. Will replace newtype enums.
12315 * Enum variants may be structs
12316 * Destructors can be added to all nominal types with the Drop trait
12317 * Structs and nullary enum variants may be constants
12318 * Values that cannot be implicitly copied are now automatically moved
12319 without writing `move` explicitly
12320 * `&T` may now be coerced to `*T`
12321 * Coercions happen in `let` statements as well as function calls
12322 * `use` statements now take crate-relative paths
12323 * The module and type namespaces have been merged so that static
12324 method names can be resolved under the trait in which they are
12325 declared
12326
12327 * Improved support for language features
12328 * Trait inheritance works in many scenarios
12329 * More support for explicit self arguments in methods - `self`, `&self`
12330 `@self`, and `~self` all generally work as expected
12331 * Static methods work in more situations
12332 * Experimental: Traits may declare default methods for the implementations
12333 to use
12334
12335 * Libraries
12336 * New condition handling system in `core::condition`
12337 * Timsort added to `std::sort`
12338 * New priority queue, `std::priority_queue`
12339 * Pipes for serializable types, `std::flatpipes'
12340 * Serialization overhauled to be trait-based
12341 * Expanded `getopts` definitions
12342 * Moved futures to `std`
12343 * More functions are pure now
12344 * `core::comm` renamed to `oldcomm`. Still deprecated
12345 * `rustdoc` and `cargo` are libraries now
12346
12347 * Misc
12348 * Added a preliminary REPL, `rusti`
12349 * License changed from MIT to dual MIT/APL2
12350
12351
12352 Version 0.4 (2012-10-15)
12353 ==========================
12354
12355 * ~2000 changes, numerous bugfixes
12356
12357 * Syntax
12358 * All keywords are now strict and may not be used as identifiers anywhere
12359 * Keyword removal: 'again', 'import', 'check', 'new', 'owned', 'send',
12360 'of', 'with', 'to', 'class'.
12361 * Classes are replaced with simpler structs
12362 * Explicit method self types
12363 * `ret` became `return` and `alt` became `match`
12364 * `import` is now `use`; `use is now `extern mod`
12365 * `extern mod { ... }` is now `extern { ... }`
12366 * `use mod` is the recommended way to import modules
12367 * `pub` and `priv` replace deprecated export lists
12368 * The syntax of `match` pattern arms now uses fat arrow (=>)
12369 * `main` no longer accepts an args vector; use `os::args` instead
12370
12371 * Semantics
12372 * Trait implementations are now coherent, ala Haskell typeclasses
12373 * Trait methods may be static
12374 * Argument modes are deprecated
12375 * Borrowed pointers are much more mature and recommended for use
12376 * Strings and vectors in the static region are stored in constant memory
12377 * Typestate was removed
12378 * Resolution rewritten to be more reliable
12379 * Support for 'dual-mode' data structures (freezing and thawing)
12380
12381 * Libraries
12382 * Most binary operators can now be overloaded via the traits in
12383 `core::ops'
12384 * `std::net::url` for representing URLs
12385 * Sendable hash maps in `core::send_map`
12386 * `core::task' gained a (currently unsafe) task-local storage API
12387
12388 * Concurrency
12389 * An efficient new intertask communication primitive called the pipe,
12390 along with a number of higher-level channel types, in `core::pipes`
12391 * `std::arc`, an atomically reference counted, immutable, shared memory
12392 type
12393 * `std::sync`, various exotic synchronization tools based on arcs and pipes
12394 * Futures are now based on pipes and sendable
12395 * More robust linked task failure
12396 * Improved task builder API
12397
12398 * Other
12399 * Improved error reporting
12400 * Preliminary JIT support
12401 * Preliminary work on precise GC
12402 * Extensive architectural improvements to rustc
12403 * Begun a transition away from buggy C++-based reflection (shape) code to
12404 Rust-based (visitor) code
12405 * All hash functions and tables converted to secure, randomized SipHash
12406
12407
12408 Version 0.3 (2012-07-12)
12409 ========================
12410
12411 * ~1900 changes, numerous bugfixes
12412
12413 * New coding conveniences
12414 * Integer-literal suffix inference
12415 * Per-item control over warnings, errors
12416 * #[cfg(windows)] and #[cfg(unix)] attributes
12417 * Documentation comments
12418 * More compact closure syntax
12419 * 'do' expressions for treating higher-order functions as
12420 control structures
12421 * *-patterns (wildcard extended to all constructor fields)
12422
12423 * Semantic cleanup
12424 * Name resolution pass and exhaustiveness checker rewritten
12425 * Region pointers and borrow checking supersede alias
12426 analysis
12427 * Init-ness checking is now provided by a region-based liveness
12428 pass instead of the typestate pass; same for last-use analysis
12429 * Extensive work on region pointers
12430
12431 * Experimental new language features
12432 * Slices and fixed-size, interior-allocated vectors
12433 * #!-comments for lang versioning, shell execution
12434 * Destructors and iface implementation for classes;
12435 type-parameterized classes and class methods
12436 * 'const' type kind for types that can be used to implement
12437 shared-memory concurrency patterns
12438
12439 * Type reflection
12440
12441 * Removal of various obsolete features
12442 * Keywords: 'be', 'prove', 'syntax', 'note', 'mutable', 'bind',
12443 'crust', 'native' (now 'extern'), 'cont' (now 'again')
12444
12445 * Constructs: do-while loops ('do' repurposed), fn binding,
12446 resources (replaced by destructors)
12447
12448 * Compiler reorganization
12449 * Syntax-layer of compiler split into separate crate
12450 * Clang (from LLVM project) integrated into build
12451 * Typechecker split into sub-modules
12452
12453 * New library code
12454 * New time functions
12455 * Extension methods for many built-in types
12456 * Arc: atomic-refcount read-only / exclusive-use shared cells
12457 * Par: parallel map and search routines
12458 * Extensive work on libuv interface
12459 * Much vector code moved to libraries
12460 * Syntax extensions: #line, #col, #file, #mod, #stringify,
12461 #include, #include_str, #include_bin
12462
12463 * Tool improvements
12464 * Cargo automatically resolves dependencies
12465
12466
12467 Version 0.2 (2012-03-29)
12468 =========================
12469
12470 * >1500 changes, numerous bugfixes
12471
12472 * New docs and doc tooling
12473
12474 * New port: FreeBSD x86_64
12475
12476 * Compilation model enhancements
12477 * Generics now specialized, multiply instantiated
12478 * Functions now inlined across separate crates
12479
12480 * Scheduling, stack and threading fixes
12481 * Noticeably improved message-passing performance
12482 * Explicit schedulers
12483 * Callbacks from C
12484 * Helgrind clean
12485
12486 * Experimental new language features
12487 * Operator overloading
12488 * Region pointers
12489 * Classes
12490
12491 * Various language extensions
12492 * C-callback function types: 'crust fn ...'
12493 * Infinite-loop construct: 'loop { ... }'
12494 * Shorten 'mutable' to 'mut'
12495 * Required mutable-local qualifier: 'let mut ...'
12496 * Basic glob-exporting: 'export foo::*;'
12497 * Alt now exhaustive, 'alt check' for runtime-checked
12498 * Block-function form of 'for' loop, with 'break' and 'ret'.
12499
12500 * New library code
12501 * AST quasi-quote syntax extension
12502 * Revived libuv interface
12503 * New modules: core::{future, iter}, std::arena
12504 * Merged per-platform std::{os*, fs*} to core::{libc, os}
12505 * Extensive cleanup, regularization in libstd, libcore
12506
12507
12508 Version 0.1 (2012-01-20)
12509 ===============================
12510
12511 * Most language features work, including:
12512 * Unique pointers, unique closures, move semantics
12513 * Interface-constrained generics
12514 * Static interface dispatch
12515 * Stack growth
12516 * Multithread task scheduling
12517 * Typestate predicates
12518 * Failure unwinding, destructors
12519 * Pattern matching and destructuring assignment
12520 * Lightweight block-lambda syntax
12521 * Preliminary macro-by-example
12522
12523 * Compiler works with the following configurations:
12524 * Linux: x86 and x86_64 hosts and targets
12525 * macOS: x86 and x86_64 hosts and targets
12526 * Windows: x86 hosts and targets
12527
12528 * Cross compilation / multi-target configuration supported.
12529
12530 * Preliminary API-documentation and package-management tools included.
12531
12532 Known issues:
12533
12534 * Documentation is incomplete.
12535
12536 * Performance is below intended target.
12537
12538 * Standard library APIs are subject to extensive change, reorganization.
12539
12540 * Language-level versioning is not yet operational - future code will
12541 break unexpectedly.